Posts

python - Specifying an exit function for an abstract function -

मुझे फ़ंक्शन को एक सार विधि से कॉल करने की आवश्यकता है, अर्थात class A (वस्तु): @ abc.abstractmethod डीईएफ़ Method1 (स्वयं): अपवाद बढ़ा ( "लागू नहीं किया गया विधि") डीईएफ़ Method2 (स्वयं): प्रिंट वर्ग बी (ए) "Method1 समाप्त हो गया": डीईएफ़ Method1 (स्वयं): प्रिंट "से Method1 क्रियान्वित क्लास बी " मुझे method1 के बाद वर्ग ए को स्वचालित रूप से कॉल करने की आवश्यकता है I को निष्पादित किया गया है (यह कक्षा ए पक्ष पर किया जाना चाहिए - स्वतंत्र रूप से विरासत में मिली कक्षाओं से)। क्या ऐसा करने का एक अच्छा तरीका है? आप metaclass का उपयोग कर सकते हैं, जो कक्षा बनाते समय method1 को लपेटता है: मिक्ट कूल आयात से वर्ग मेटा (प्रकार): डीईएफ़ __ एनयूयू (मेटा, नाम, कुर्सियां, एट्र) आती है: method1 = attr ['method1'] अगर नहीं मिलता है attr (विधि, '__isabstractmethod__'): @wraps (Method1) डीईएफ़ आवरण (स्वयं, * args, ** kw): रेस = Method1 (स्वयं, * args, ** kw) self.method2 () वापसी रेस attr [ ' Method1 '] = आवरण वापसी सुपर...

sql - How to improve CROSS JOIN request memory consumption -

For simulation purposes, I need to randomly create rows in the table. I have potential A, Table A and Probability The table of potential events with the column B is. Make Table Systemation (generated as a primary key hash generated by Achievement Inkjer Infhenge); Create table B events (EventIIT Integer defaults by default as primary key hash, Event Probleme Decimal (13,10) Null;) In order to create events, I use a cross-join request: set as a table generated Avent (SELECT SituationId, from EventId (SELECT SituationId, EventId, RAND) () * 100 A Generation Perfection, Event Probability for Citizen's Cross Join Events) where Generation Probability and LT; Event probability); I am using the H2 database only in memory mode (i.e., with the following URL: jdbc: h2: mem: db) and the problem is that in the table of conditions approximately 72k rows and Rows in the 600 event table, I'm running out of memory of JVM, I am using Memory mode to be able to run several JVMs in...

php - Return greek characters from MySQL to Javascript -

I am trying to create a form that is used to get value from a MySQL table of JQuery Autocompletion Uses I am very new to javascript and ajax, but I got it to work. When I type 1 letter in the input field, I get an E drop-down list with values ​​matching the table. It works fine with normal character (AZ, 1- 9). However, I have a table with the following value: 10 ng 100 ng 1 μg The last one is giving me problems because it has a Greek character when I write '1', then it should return all 3 values ​​in the drop-down menu. Instead it does not return anything when I type '10', then it returns the first value before it is expected. While searching around, I found some things about the encoding of the database from the database. I am not sure if this is a problem, and if it is, then I have no clue how to solve it. Edit: IfTrying to visualize a MySQL-table in a simple HTML table, it works without problems ... When I try to print the answer to the console...

ios - Overlay area stays on top after searching a list UIView -

Image
I have a UIView with a list of items when I click on the search bar then the keyboard comes up and the rest The screen has a gray overlay. When I'm on Gray Overlay If I click, the keyboard disappears, though the overlay area remains on the top and is not missing. What is the root cause of this problem? How can I solve it? itemprop = "text"> Check it after: - Write in this console: - By giving a breakpoint to the View Controller Po [self.view subviews] (id) $ 1 = 0x0a3155f0 & lt; __ NSArrayM 0xa3155f0 & gt; (& Lt; AtshadowTableView: 0xc341600; baseClass = UITableView; frame = (0 44, 320 411); clipsToBounds = Yes; gestureRecognizers = NSArray: 0xa627200 & gt;; layer = & lt; CALayer: 0xa626d30 & gt;; ContentOffset: {0, 0} & gt;, & lt; UISearchBar: 0xa618f40; frame = (0; 32044); text = ''; layer = & lt; calyayer: 0xa619040 & gt; & gt; & lt ; UIControl: 0xa329fc0; frame = (0 44, 320 455); alpha = 0...

Outlook PowerShell script does not retrieve latest email -

I have a script that reads an Outlook folder for e-mail, selecting the most recently received email , And saves its attachment in a directory. It does not work properly - It seems that it only knows what email I receive, if I open Outlook before running the script - otherwise, it thinks that the most recent The email received is only that Is there any way to refresh Outlook to refresh before scanning the script? My code is below: $ filepath = $ args [0] $ account = $ args [1 ] & Lt; ## File Path $ filepath = "I: \ folder" $ account = "Account@host.com" ## #set approach $ o = to open new object-conebiz Outlook. App $ n = $ o.GetNamespace ("MAPI") $ account = $ n. Folter | ? {$ _. Name-EC $ account}; $ Inbox = $ account.Folders | ? {$ _. Name-mail 'inbox'}; $ Data = INBox.Folders | ? {$ _. Name-match 'data'}; $ F = $ Data.Folders | ? {$ _. Name-mail 'MyTargetFolder'}; $ Email = $ f.Items | Sort-object receive-time-de...

opengl es - Does Dalvik use native library in Android? -

I read a lot of articles about it, but clearly can not understand a very important issue. So, for example, I wrote a program (in Java) that compiled my program to run in Dualvic after using the ODAGL API (the package included in this API package). And how does this byte code communicate with openges. When does this communication appear? Correct me if I am wrong because the following is just an estimate: The Android Framework has been sent with a set of Java Classes, which implements OpenGL functionality. This Java class will only call the native OpenGL function through JNI, thus, taking advantage of the original OpenGL libraries. If you look at Android Framework sources, you can see the following: public class GLES20 {public static origin zero glClearColor (float red, float green, float Blue, float alpha); // C function zero glider path (GLclamph depth) public static basic zero glider path (float depth); // C function zero glove stencil (GLINTS) public static core zero ...

selenium - Chrome: fake microphone input for test purpose -

For testing purposes with the launcher, I need to simulate the audio input without a microphone with a microphone. I With the "Fake-imitation-device-of-media-stream" flag, Chrome can simulate a fake microphone. However, no input from the fake microphone is coming, so my test fails. Is it possible to simulate the sound that is exiting the microphone? Thank you! I use duplicate video and microphone input two chrome flags - Use-duplicate-device - Use-duplicate-you-can-media-stream Try one with two flags together.