Sunday, 15 January 2012

angularjs - Button flickering on mouseover with ng-clip and ng-show/ng-hide -


I see strange flicker when NG clips mounted on the extended buttons I have NG-clip is shown, which is enhanced buttons / Hidden when attached to the divisive box, because the user moves the mouse to the button, this flicker? I'm it allows some to do with dealing with the incident between Zeroclipboard and angular code

Here is a Plunker page displaying problems:

Code Plunker:

  & lt ;; Doctype html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Link href = "// netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel = "stylesheet" & gt; & Lt; Script src = "// cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js"></script> & Lt; Script src = "// cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.1.6/ZeroClipboard.min.js"></script> & Lt; Script src = "// rawgit.com/asafdav/ng-clip/master/src/ngClip.js"></script> & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div ng-app = "myapp" & gt; & Lt; Div class = "container" ng-controller = "micrrl" ng-mouseover = "hahoeing = true" ng-moutout = "hahoeing = fotl" & gt; & Lt; Div class = "page-header" & gt; & Lt; H1 & gt; NgClip & lt; Small & gt; Example & lt; / Small> & Lt; / H1> & Lt; / Div & gt; & Lt; Form & gt; & Lt; Div style = "background: red;" Class = "form group" & gt; & Lt; Label & gt; Copy # 1 & lt; / Labels & gt; & Lt; Input type = "text" class = "form-control" placeholder = "enter text to copy" ng-model = "copy1" & gt; & Lt; Button ng-if = "hohoing" class = "btn btn-default" clip-copy = "copy 1" & gt; Copy! & Lt; / Button & gt; & Lt; / Div & gt; & Lt; Br / & gt; & Lt; Br / & gt; & Lt; Br / & gt; & Lt; Textarea class = "form-control" rows = "3" placeholder = "paste here" & gt; & Lt; / Textarea & gt; & Lt; / Form & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Script & gt; Var myapp = angular.module ('myapp', ["ngClipboard"]); myapp.config ([ 'ngClipProvider', function (ngClipProvider) {ngClipProvider.setPath ( "// cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.1.6/ZeroClipboard.swf"); ngClipProvider.setConfig ({bubbleEvents: false     })   }]); myapp.controller ( 'myctrl', function ($ scope) {$ scope.fallback = function (copy) {window.prompt ( 'press Cmd + C to copy the text below.', CC);}; $ scope .showMessage = function () {console.log ("clip-click works!");};}); & Lt; / Script & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

I also had this problem. Instead of using ng-mouseover and ng-mouselevel, I have decided to use ng-mouseenter on ng-mouseover that on an internal device instead of ng-mouseout No flicker

then:

  & lt; Div ng-app = "myApp" ng-mouseenter = "isHovering = true" & gt; & Lt; Div class = "container" ng-controller = "mactal" ng-mouseleave = "hashoin = fottal" & gt; & Lt; Div class = "page-header" & gt; & Lt; H1 & gt; NgClip & lt; Small & gt; Example & lt; / Small> & Lt; / H1> & Lt; / Div & gt; & Lt; Form & gt; & Lt; Div style = "background: red;" Class = "form group" & gt; & Lt; Label & gt; Copy # 1 & lt; / Labels & gt; & Lt; Input type = "text" class = "form-control" placeholder = "enter text to copy" ng-model = "copy1" & gt; & Lt; Button ng-if = "hohoing" class = "btn btn-default" clip-copy = "copy 1" & gt; Copy! & Lt; / Button & gt; & Lt; / Div & gt; & Lt; Br / & gt; & Lt; Br / & gt; & Lt; Br / & gt; & Lt; Textarea class = "form-control" rows = "3" placeholder = "paste here" & gt; & Lt; / Textarea & gt; & Lt; / Form & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

java - how do you make buttons flash or blink different colours in android eclipse? -


I'm making a tic tac toe program. I can get the button to display X or 0 but I can not get them to display different colors How do i do this

Use a selector to change the color of the button when clicked.

/res/drawable/btn_selector.xml

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Selector xmlns: Android = "http://schemas.android.com/apk/res/android" & gt; & Lt; Item Android: state_pressed = "true" & gt; & Lt; Size & gt; & Lt; Solid Android: Color = "# FFAA 66" /> & Lt; / Size & gt; & Lt; / Item & gt; & Lt; Items & gt; & Lt; Size & gt; & Lt; Solid Android: Color = "# ffdd99" /> & Lt; / Size & gt; & Lt; / Item & gt; & Lt; / Selector & gt;  

And now apply this xml to android: background on the button.


openui5 - SAPUI5 odata GET error -


I am getting this error

Get $ 40 metadata (not found)

My code for URL assignment is below

  var sServiceUrl = getServiceUrl ("http://xx.yyy.net:8000/sap/opu/odata/SAP/ZXXX_SRV") ; Function getServiceUrl (sServiceUrl) {var sOrigin = window.location.protocol + "//" + window.location.hostname + (window.location.port? ":" + Window.location.port: ""); If (! JQuery.sap.startsWith (sServiceUrl, sOrigin)) {return "proxy" + sServiceUrl.replace (": //", "/"); } {Return sServiceUrl.substring (sOrigin.length)}}  

Is there any idea what I'm missing

thanks

The user originally answered this question in two of his comments. However, I think the original poster (OP) and the general audience really need some background to understand the problem and the suggested solution. That's why I want to repeat this problem first and then I want to provide a solution.

Replacing the problem

The root cause of the problem is that the Javascript code is drawn by OP to their query, local web server, in this case http: / / Localhost: 8888 , and then it wants to call an ODATA service on the javascript code http: //xx.yyy. Net: 8000 In the background (using XMLHttpRequest-Object) it violates the same basic policy (SOP) applied by almost all browsers, which states that such background calls only protocol (HT), server ( Localhost) and port (8888).

A common solution for this problem should be a proxy inside the local server, which contains all requests for a particular form (in our case http: // localhost: 8888 / proxy / \ * < / Code>) at a remote address (in our case http://xx.yy.net:8009/\* ).

Receives local server calls, and inside Proxy locals server (which is not under SOP) takes it forward for the Odata service. Everything looks fine for the browser.

Why does it run in Eclipse

SAP has provided such a proxy in the form of a Java servlet. This proxy can be used by Eclipse (built-in Jetty, or any other web server like Tomcat) in any Java based web server. OP was clearly able to run this eclipse web server and properly configure the proxy provided.

Why this node does not run in J.J.

Just node .js application is apparently not able to run the OP proxy instead of node.js server Some javascript proxy is required behind such a screen, during Goghil I found the first one but there are a lot more available.


regex - How more effectively find the substrings between the separator in PL/SQL? -


अब मैं यह करता हूं:

  declare str varchar2 (1000): = '1a2b3c / A1B2C3 '; शुरू dbms_output.enable; Dbms_output.put_line (regexp_replace (str, '(। *) /। *', '' 1 ')); - 1a2b3c dbms_output.put_line (regexp_replace (str,'। * / (। *) ',' 1 ' )); - a1b2c3 अंत;  

मैं यह कैसे एक अलग तरीके से कर सकता हूँ?

मैं इसे और अधिक कुशलता से कैसे कर सकता हूं?

का प्रयोग करें INSTR () और / :

  DECLARE को ढूंढें Str varchar2 (1000): = '1a2b3c / a1b2c3'; BEGIN DBMS_OUTPUT.ENABLE; DBMS_OUTPUT.PUT_LINE (TRIM (SUBSTR (str, 1, INSTR (str, '/') - 1))); DBMS_OUTPUT.PUT_LINE (TRIM (SUBSTR (एसआरआर, INSTR (str, '/') + 1, LENGTH (str) - INSTR (स्ट्र, '/')))); समाप्त;  

आप REGEXP_SUBSTR () का भी उपयोग कर सकते हैं, लेकिन अगर आप REGEXP_REPLACE () का उपयोग नहीं करना चाहते हैं, तो संभवतः आप नियमित अभिव्यक्ति का उपयोग करना चाहते हैं:

  DBMS_OUTPUT.ENABLE; DBMS_OUTPUT.PUT_LINE (TRIM (REGEXP_SUBSTR (str, '^ [^ \ /] *'))); DBMS_OUTPUT.PUT_LINE (TRIM (REGEXP_SUBSTR (str, '[^ \ /] * $')));  

apache - Do I need to repeat a RewriteCond in my .htaccess file? -


मेरे पास तीन डोमेन हैं - domain.com , domain.co.uk और domain.ru । मैं एक .htaccess फ़ाइल में निम्नलिखित रीडायरेक्ट प्राप्त करने की कोशिश कर रहा हूं:

  • सभी अनुरोधों को उपसर्ग www।
  • (Www।) Domain.com को सभी अनुरोधों को www.domain.co.uk पर पुनर्निर्देशित किया जाना चाहिए
  • http पर सभी अनुरोधों को https का उपयोग करने के लिए निर्देशित किया जाना चाहिए

निम्नलिखित मेजबान द्वारा प्रदान किए गए प्रलेखन, थोड़ा खोज-फू (और बहुत सिर खरोंचना), मैंने मिलकर बना दिया है- निम्न में से:

  विकल्प + अनुवर्ती लिंक पुनर्विन्यास इंजन पर पुनर्लेखन% {HTTP: X-Forwarded -SSL}! रीवाइट कंड पर% {HTTP_HOST} (www \।)? डोमेन। (कॉम | सह.युक्सेन) $ [एनसी] रीव्रेट नियम ^ (। *) $ Https://www.domain.co.uk/$1 [आर = 301, एल] रीराइटकंड% {HTTP_HOST} (www।।)? डोमेन.ru $ [एनसी] रीव्रेट नियम ^ (। *) $ Https://www.domain.ru/$1 [आर = 301, एल]  

यह वास्तव में ठीक काम करने के लिए प्रतीत होता है, लेकिन मुझे वाकई पता नहीं है कि RewriteCond% {HTTP: X-Forwarded-SSL}! करता है, और I 'मैं सोच रहा हूं कि तर्क दोषपूर्ण है।

मेजबान पर सेट अप की वजह से, कभी भी ऐसा नहीं होता है कि पहली शर्त सही हो, जबकि दूसरी और तीसरी स्थिति झूठी हो। लेकिन अन्य स्थितियों के लिए, जिस तरह से मैं इसे देख रहा हूं वह है:

  • यदि पहली और दूसरी स्थितियाँ सत्य हैं, तो पहले नियम को निष्पादित करें;
  • यदि पहली स्थिति है सच है, दूसरी शर्त झूठी है, लेकिन तीसरे सत्य है, फिर दूसरे नियम को निष्पादित करें;

तो क्या होगा यदि पहली शर्त गलत है? क्या होगा? क्या तर्क दूसरी स्थिति को अनदेखा करता है और तीसरे को आगे बढ़ता है, या यह उस समय केवल बाहर निकल जाएगा? अगर ऐसा मामला है, तो शायद पहले नियम के बाद मुझे पहली शर्त दोहरायी जानी चाहिए, तो यह दोनों परिदृश्यों के लिए काम करे?

क्या ऐसा करने का एक बेहतर / सही / अधिक सटीक तरीका है?

पिछले नियम और मौजूदा नियम के बीच स्थितियां उस नियम पर लागू होती हैं तो नीचे दिए गए उदाहरण में, # 1, # 2 और # 3 एक दूसरे के साथ हैं और # 4 और # 5 एक दूसरे के साथ हैं यदि # 1, # 2 और # 3 सत्य हैं तो नियम # 3 को निष्पादित किया जाता है यदि # 4 और # 5 सही हैं तो नियम # 5 को निष्पादित किया जाता है मेरा मानना ​​है कि mod_rewrite पहले RewriteRule की पहली तर्क का मूल्यांकन करता है, फिर उस नियम से संबंधित किसी भी स्थिति का मूल्यांकन करता है यदि सभी सत्य हैं (या उनमें से कुछ [OR] ध्वज के साथ सही हैं), तो यूआरएल को RewriteRule के दूसरे तर्क के आधार पर फिर से लिखा जाएगा।

> <प्री> रिवेराइटकंड # 1 रिवेराइटकंड # 2 रेवर्ट राउल # 3 रिवेराइटकंड # 4 रेवराइटर्यूल # 5

शर्त के लिए रीवाइटकंड% {HTTP: X-Forwarded-SSL }! पर :

यह जांचता है कि अगर X-Forwarded-SSL हैडर मौजूद नहीं है यदि यह क्लाइंट SSL के साथ HTTP के साथ आपके बाहरी सर्वर से संपर्क करेगा और यह शीर्ष लेख मौजूद होगा, तो बाह्य सर्वर एचटीटीपी बिना HTTP पर एक आंतरिक सर्वर से संपर्क करेगा। आंतरिक सर्वर यह नहीं जानता कि प्रारंभिक अनुरोध एसएसएल के साथ था, और बाहरी सर्वर पर प्रतिक्रिया वापस भेज देगा, और उसके बाद ग्राहक को https को पुनर्निर्देशित करने के लिए भेजा जाएगा चूंकि यह पहले से ही मामला था, इसलिए इसका परिणाम अनंत लूप में होगा। संभवत: आपको इसकी ज़रूरत नहीं है जब तक आप इसे विशेष रूप से सेट नहीं करते। यदि कनेक्शन का केवल एक हिस्सा एन्क्रिप्ट किया गया है, तो किसी अनजान ट्रैफ़िक के जरिए नेटवर्क तक पहुंच हो जाने पर यह छिपकर छिपने या एमआईटीएम हमले के लिए कमजोर हो सकता है।


python - equally busy cpu cores -


I was recently identified on computational intensive dragon program (without threading), which is Windows (Win8.1 x 64) is not under CPU occupation (of my 4 logical, 2 physical core) completely occupied, instead of every logical core is busy up to ~ 25%. In this all one core is 100% busy. Does windows work to spread, but not really good? Is it something to do, to keep the core as cold as possible? Or is there something to do with Python? I run the same program under Linux and the work I do here works (one core is 100% busy)

Do you really see in Windows what is expected of default behavior of interactive CPU scheduler (Windows or Linux, other Unix version or macros)?

When you execute a thread, the OS is running to send a timed interrupt (clock interrupt) which is the kernel space (the OS process is running) from the user space (the app you are running) And enables it to restart the process to run the OS, after the other processes, the same (or the other) CPU core had its own share of "CPU Pie". This principle is similar if Your process is the main CPU consumer (usually there are processes besides your background)

This behavior is an extremely important feature of interactive scheduling mode (which is the default for most OS nowadays, because They are well interactive ...) because it allows all running processes to get a piece of CPU resource without any appetite. Each process is to take CPU sharing between them the entire CPU resources and "CPU hog" and by not giving it back, allowing each process running to "interactive".

Now, you can improve that behavior, for example, by setting a core in relation to a process or by giving "real time" priority to the process what did you do

< P> Any of them can cause the process to run on the same core (affinity is trivial, ask you to run from OS only on 1 core). Realtime bus stop interrupts the process. This makes your machine less interactive, but it also prevents the walking process, so it starts moving on to the same core.

Now, about the behavior you specify on Linux. I think this is one of the following two explanations:

  1. You are in no way determining the process of running on SCHED_FIFO (this is "real time "Windows is equal to)

    To verify it, use the PID of your process and execute

      chrt -p & lt; Your Process PID & gt;  
  2. You misunderstood a device that showed you that the process is running on a single core, in fact it spreads all over the core is. If you can elaborate on how you reached the conclusion that it runs on all the core in Linux then I would be happy to hear it.


database - Android, What is the right way to write a file to a subdirectory of the data/data/'package' folder -


I am able to find the right way to write a file in a subdirectory of the Android data I have tried over the last few days folder. The majority of the answers I found were unclear or did not solve the problem in the correct and working way, so I decided to finally ask. I am giving a user the possibility of backing up my data on my server by basically uploading a database to a server via a PHP script. Database

  '/ data / data / com.package / database / data.db is located in'  

The problem is that when a user wants To reload a back up database, download the application file and then write it (overwrite the old one) / / into the database / data.db file, and then reload. I have managed to do everything, as far as I have to download the downloaded file because FileOutputStream tells an invalid argument exception that I can not use path separator in the way. I understand that FileOutputStream can only write to the first level of the data folder and not for sub-directories. How can this be done? If this can not be done, is there a way to set the default database path to the first level of the 'data' directory to solve this problem? If this is a completely wrong approach that I want to achieve, I am open for criticism, but it will still be good to get the answer, only for the future. ) {If (valid Krensserrspons (FeedkResult)) Try directory {// Copy database {FileOutputStream fos = ctx.openFileOutput (ctx.getDatabasePath (DataDatabaseHelper.DBNAME) .getAbsolutePath (), Context.MODE_PRIVATE); Fos.write (feed.DownloadedBytes, 0, feed.DownloadedBytes.length); Fos.close (); } Hold (IOException e) {e.printStackTrace (); }} And Toast Mektekst (Sitiaks, Sitiakskjetrisors (). GetString (r. Stringknofilsonsrvr), toast. Elananjiacaiacoarti). Show (); }

Thanks in advance.

How can

To write a file in the standard location for the database for your app.

Regardless of your path separator issue, database / directory is not


Can vim indent XML without changing the file? -


I've read, but I want to do something different:

  • Do I use Can I indent an entire XML file, but without changing the file. Only one thing should be changed, that is representation, but not the file itself.

For those interested: I work with books in XML format. If the file has changed, it usually happens by adding tabs and / or spaces. It messes up my data (because actually there may be spaces in the tabs or texts).

You have some options:

Change the width of the tab

< P> If you have a tab-based indent in XML, you can change the view format of the indent by changing the 'tabstop' value. This file contains the physical & lt; Tab & gt; does not affect the characters.

Pre- / post process

You can change the amount of indent after typing, and undo it before typing Here is an example which is half / double space: / P>

 : autocmd BufReadPost, BufWritePost *% substitute / ^ \ (\ + \) \ 1/1 / e: autocmd BufWritePre *% substitute / ^ \ + / & Amp; Amp; / E  

jquery - Cant get my Javascript to run properly on local machine? -


I am using some javascript which seems to reveal a specific ID when you are able to reach a certain point Scroll, it works and appears when you scroll back up, but it does not remain, but it disappears.

Here's JSField where it works -

And where is it not? -

Before you ask, I have copied the code working from above but it does not work. So if it is a way of working while working in another way, then it should work. Any ideas?

This is also Javascript because it is in my JS file.

  $ (function () {var startY = 300; $ (window) .scroll (function () () () () () () () () () () () () () ) ($ (Window) .scrollTop () Start) {$ ('# sketch-progress, # photoshop-progress, # illustrator-progress, #indus-progress, #css-progress, # html- Progress, #make-progress, # window-progress '). Slide Down ();} and {$ (' # Sketch-Progress, #Photoshop-Progress, # Illustrator- Progress, # Indesin-Progress, # CSS-Progress, # Html- Progress, #Make-Progress, # Window-Progress'). SlideUp ();}} Check Y ();});  

This occurs when it comes back to the Scroll Laughs that I'm having trouble missing anything?

My impression is that To do this, let's take a look at your code.

  $ (define function () {// Height loading bar var starty = 300 should be displayed; // Turn on this function you scroll $ (window) .scroll (function () {checkY ();}); // function is scrolling while function function (check) / If the window position is more than the predetermined height ($ (window) .scrollTop () & gt; StartY) {// Slide all these IDs down $ ('# sketch-progress, #photoshop-progress, # illustrator-progress, # ind-progress, #css-progress, # html-progress, #make-progress, # Window-progress'). Slidedown (); // If the window position is not high then} {// slide all these IDs back to $ ('# sketch-progress, #photoshop - progress, # illustrator-progress, #indus-progress, #css-progress, # Html-progress, # mac-progress, # window-progress'). SlideUp ();}} // Repeat this function again? The scroll function is not really necessary with the check ();});  

tl; Dr As you can see, the else statement in that function removes your loading icon if your statement is not correct, therefore, if you want it to remain and only once appears , What you have to do is remove the else in the if statement.

Was this what you want to know?

  // Try it instead of your original check. Function function check w () {if ($ (window) .scrollTop () startY) {$ ('# sketch-progress, # photoshop-progress, # illustrator-progress, #indus-progress, #css-progress , # Html-progress, # mac-progress, # window-progress'). Slidedown (); }}  

javascript - A fast solution for filtering number using jQuery or pure JS -


यह मेरा पृष्ठ है: छवि विवरण यहाँ दर्ज करें

मैं कुंजीपटल पर रिकॉर्ड फ़िल्टर करने के लिए निम्न कोड का उपयोग करता हूं:

  फ़ंक्शन खोज () {$ ('। Co')। (); $ ('। Co')। प्रत्येक (फ़ंक्शन () {var showco = true; for (var i = 1; i & lt; = 9; i ++) {if ($ ('.txtfilter' + i.toString ()) .val ()। ट्रिम ()! = '') {If ($ (this) .find ('। डी' + i.toString ())। पाठ ()! = $ ('.txtfilter' + i.toString ())। Val ()) {showco = false;};};}; अगर (! शोसिम) {$ (यह) .hide ();};}); };  

यह 200 रिकॉर्ड के लिए अच्छा काम करता है, लेकिन अभिलेख 5000 या अधिक हो सकते हैं, यह बहुत अधिक समय लेता है और शायद ब्राउज़र लटका हुआ है।

मुझे पता है कि मेरा कोड नहीं है अनुकूलित और मुझे यकीन है कि ऐसा करने के लिए अन्य तरीके हैं, तो ऐसा करने का सबसे अच्छा और तेज़ तरीका क्या है?

किसी भी मदद की सराहना की जाएगी।


linux - Run bash command via PHP, change dir then execute binary -


So what I'm trying to do here is to start a binary under a PHP script I am trying to Apache has pseudo access, this work works fine when it runs through a logged-in screen as a "test".

  Pastor ('Bash-C' pseudo-o test CD / home / test / cs /; / hlls_r un '');  

I can also add

  past ('Bash-C' pseudo-o test. / Home / test / cs / hlds_run "') ;  

How the binary is written, will not work because of this (unless you test it on the terminal, it will not get the resource)

If everyone has access to / home / test / cs :

  Pastra ('CD / Home / Test / CS & SUUDO-U Test ./hlds_run');  

If only user test has access to the directory:

  passhtru ('sudo -u test sh -c' cd / home / test / cs & amp; / hlds_run ''); To arrive at the second allocation, you should already be familiar with the  system  vs  execve  ( passthru  and  sudo  Respectively). 

  1. This is the shell string we set to run as a specific user:

    CD / Home / Test / CS & amp; ./hlds_run

  2. We can make sure that it always runs with sudo as a specific user, but sudo Uses Exotic Semantics We need to convert our Shell string to a execve array, and because this command is a shell functionality such as cd Is dependent on and does not include dynamic values ​​in B, the best way to do this is simply to interpret verbatim To open a shell is:

    { sh , -c , cd / home / test / cs & amp;

  3. Now we can implement sudo to run as our specific user:

    {< Code> pseudo , -u , test , sh , -c , cd / Home / test / cs & amp; Amp; ./hlds_run }

  4. passthru runs in the form of a shell, so now let us see the execve shell The above array in the string, quoting to ensure the shell, will be parsed in the exact logic list above with extreme caution. Fortunately this is a relatively simple matter:

    pseudo-o test sh -c "cd / home / test / cs and ./ hlds_run"

    < / Li>
  5. Now let us give it to passthru :

    passthru ('sudo -u test sh -c) for CD / Home / Test Can / cs & amp; ./hlds_run "');


php - How to calculate luck factor based on bet winchance/result? -


I am working on a website where users can bet on events with variable win chances. One has to display a fixed user's "Luck factor" based on his wager.

Here is the definition of fortune factor:

The percentage of destined display indicates how many bets you have won, how much do you live in comparison to this? For example, if you play 10 times with a 10% chance of winning and winning two of the 10 bets, then your fate will show up as 200% because you win twice as much as you want. While calculating fortune, the condition size is not kept in mind, so it is possible to get less than 100% fortune and will still show the benefit if your winning bets take more risk than your losing bets.

Here is my (

  • winchance (0.01 - 99.99)
  • Win (true / false)

The application is written in PHP, but I'm sure a pseudo-angle example will push me in the right direction.

If I understand your question, okay, then using the mysql winchance column and the actual winning ratio Can take the average of the chance of winning (number of wins / total bets). These two values In view of the fact, the actual proportion / factor of fate will be average * 100. For example, the average win chance is 0.1 and the real winning ratio is 2/10 = 0.2, then the factor of luck is 0.2 / 0.1 * 100 = 200%. It will be easily calculated with the mysql inbuilt function.


mobilefirst / worklight - hybrid application background color -


There is a second partition during the startup sequence where the skin loader index.html is loading. Background color is white during this time. Is there a way to permanently set the background color of the application so that it matches the background color of your splash / index page? Any help appreciated.

Starting Vertical 6.2, you can fully customize the splash screen of your application . This can be done by increasing the time of the splash image displayed to create a completely different user experience.

You can read about this.

Options that you can try:

  1. Change the color of white background in skinLoader.js; This file can be found in the root folder of the environment (for iFile \ country \ www \ default \ and other similar environments)

  2. Expand the splash image length as shown in the tutorial

  3. To make something completely different, follow the instructions given in the Knowledge Center (also linked to the tutorial).


php - How to alert a user to click logout when he wants to leave the website? -


How to write a php code to notify a user for logout when they click on the window without logout Close the webpage ...

First check that the session is continuous, for example Check that the value is set, then output the javascript code.

  & lt;? If (isset ($ _ session ['user'])) {echo '& lt; Script type = "text / javascript" & gt; Window.onbeforeunload = function () {Return "Did you save your luggage?" } '; }? & Gt;  

How can I return a php code from a php function? -


  & lt;? Php फ़ंक्शन ए () {वापस "& lt;? Php echo \" कुछ पाठ \ "; ? & gt; "; } एको ए (); ? & Gt;  

मुझे पृष्ठ पर "कुछ टेक्स्ट" देखने की उम्मीद है, लेकिन मैंने नहीं किया। तो मैं यह कोड कैसे काम कर सकता हूं? अग्रिम धन्यवाद।

UPD: स्पष्ट विवरण के लिए मुझे खेद है। मैं इनपुट के मूल्य में एक यादृच्छिक संख्या डालूंगा।

  & lt;? Php फ़ंक्शन print_form () {वापसी "& lt; form method = \" post \ "& gt; & lt ; इनपुट प्रकार = \ "text \" name = \ "code1 \" मान = \ "& lt;? Php इको रैंड (0, 99 99 99); ? & Gt; \ "/ & Gt; & lt; / form & gt;"; } गूंज print_form (); ? & Gt;  

फ़ंक्शन की वापसी को सम्मिलित करें:

  वापसी "& lt; form method = \" post \ "& gt; & lt; इनपुट प्रकार = \" text \ "name = \" code1 \ "मान = \" "। रैंड (0, 99 99 99)।" \ "/ & Gt; & lt; / प्रपत्र & gt; ";  

python - How to convert a string to float (without adding lines) -


I'm probably trying to program a dragon calculator in at least lines, I have yet (in theory) it Below 10. The only problem is that I can not seem to work how to change the two strings to float, without adding more lines.

  x = raw_input ("enter calc instructions.") A, B, c = x.split () If B == "-": print (AC) alif B == Print "A" Know that I have to do  float ()  somewhere, I have not yet managed to find where to find  

EDIT: * I am trying to reduce the less I can reduce it, in this example, I do not care that this is a mess. Besides, I do not even know that your code is also 'overlapping' and misleading.

  x = raw_input ("enter calc directions.") A, B, C = X.split () If B == "-": Print Float (A) - Float (C) Alif B == "+": Print Float (A) + Float (C) Alief B == "*": Print Float (A) * Float (C) Alief B == "/": Print Float (A) / Float (C) #B to B to  

php - How can I 'push' data from one table to another in MS Access? -


This is the second attempt to figure out a figure. I saw other answers and tested the answer with my previous post.

found here:

There is a hold on this that does not work for me. The main reason is that the orders are very customized and are not predefined.

I sell shirts and they can make pictures and monograms (among other things), which sell a specific shirt that can be stored and databases can be selected.

The more I can down to two possibly three, the more general my tables make an account. TBL (account number, shipping information and payment method, etc.) and an order TBL (shirt color, picture attachment, monogram etc.) A possible third table (Account ID and Order ID).

I asked one of my Sehgal and what I think could be something to handle PHP. I do not know the first thing about PHP or actually there is either access. I just make shirts :)

I'm assuming I'll need a button when I press: 1.) Saves data 2.) Account From ID to account Account by Account Account on ID ID. TBL 3.) Change from Order.frm to Account.frm

I have # 1 and # 3 but I have not got any way to do # 2 from alone.

I have tried to build relationships with the primary key and the foreign key but do not keep track of who is giving orders to my table just fill with unrelated data: /

Is there a solution in access? PHP will solve this? Is there a simple PHP code for this? If not, where should I look in PHP language?

Any help or suggestion will be appreciated.

If you do not have any prior knowledge of PHP then about this project for it Do not waste time learning in

If you are building a database application to run on your own computer and you already have access 2013 then this is all you need.

If you intend to create a web application that your customers can access on the Internet, then you know a little about PHP based on the tools or frameworks used to build your site. By knowing possibly can get the benefit. However, in that case you should use the Access database as a data repository for not a web application.


java - runnable Jar file not working,first to third exports is working but several exports dont -


This has been done for 2 hours for googling, what could be the problem of the exported jar file from my expleps.

My first export is not the first problem and my jar file is not run. But in many exports, the generated jar file is not working already help. please.

I have JR and JDK installed. My environment variables are fine.


javascript - Add CSS on click of a disabled button -


After various other posts I have disabled a submit button, unless the form has not been selected.

What do I want to do, when the disabled button is clicked, highlight the selection box. I am thinking of the easiest way to do this, with a click function, CSS border color is applied in the selection box. But I'm not sure how to achieve this.

My script goes so far:

  $ ('# submitorder'). Prop ('disabled', true); Function updated formatted () {if (verification edits ()) {$ ('# submitorder'). Prop ('incompetent', false); } And {$ ('# submitorder'). Prop ('disabled', true); }} Function verifyAdSettings () {if ($ ('$ course1choice'). Val ()! = '' & Amp; $ ('# course2choice'). Val ()! = '') {True; } Else {return false}} $ ('# course1choice'). Change (updateFormEnabled); $ ('# Course2choice') change (updateFormEnabled)  

My HTML:

  & lt; Form id = "productchoices" & gt; & Lt; Choose name = "92" id = "course1choice" & gt; & Lt; Option value = "" & gt; Select Course 1 & lt; / Option & gt; & Lt; Option value = "659" & gt; Lesson plan & lt; / Options & gt; & Lt; Option value = "660" & gt; Teaching from a & lt; / Options & gt; & Lt; Option value = "661" & gt; Teaching Users & lt; / Option & gt; & Lt; Option value = "662" & gt; Teaching young learners & lt; / Option & gt; & Lt; / Select & gt; & Lt; Select Name = "91" id = "Course 2 Choice" & gt; & Lt; Option value = "" & gt; Choose Course 2 & lt; / Option & gt; & Lt; Option value = "655" & gt; Lesson plan & lt; / Options & gt; & Lt; Option value = "656" & gt; Teaching from a & lt; / Options & gt; & Lt; Option value = "657" & gt; Teaching Users & lt; / Option & gt; & Lt; Option value = "658" & gt; Teaching young learners & lt; / Option & gt; & Lt; / Select & gt; & Lt; Button type = "submit" id = "submitorder" & gt; Book now & lt; / Button & gt; & Lt; / Form & gt;  

Please refer to the examples below for modifying some examples.

  & lt; Form id = "productchoices" & gt; & Lt; Select name = "92" id = "course1choice" class = "likes" & gt; & Lt; Option value = "" & gt; Select Course 1 & lt; / Option & gt; & Lt; Option value = "659" & gt; Lesson plan & lt; / Options & gt; & Lt; Option value = "660" & gt; Teaching from a & lt; / Options & gt; & Lt; Option value = "661" & gt; Teaching Users & lt; / Option & gt; & Lt; Option value = "662" & gt; Teaching young learners & lt; / Option & gt; & Lt; / Select & gt; & Lt; Select Name = "91" id = "Course 2 Choice" category = "Like" & gt; & Lt; Option value = "" & gt; Choose Course 2 & lt; / Option & gt; & Lt; Option value = "655" & gt; Lesson plan & lt; / Options & gt; & Lt; Option value = "656" & gt; Teaching from a & lt; / Options & gt; & Lt; Option value = "657" & gt; Teaching Users & lt; / Option & gt; & Lt; Option value = "658" & gt; Teaching young learners & lt; / Option & gt; & Lt; / Select & gt; & Lt; Button type = "submit" id = "submitorder" & gt; Book now & lt; / Button & gt; & Lt; / Form & gt; $ (Document) .ready (function () {$ ("# submitorder") .prop ("disabled", true); $ ('.choice'). ('Change', function () {if ($ ( Pro) ("disabled", false);) () "" ("disabled", true);} and {$ ("# submitorder").});  

}) ;

Let me know if there is a query.


gem - How to install Foundation in Rails Engine 4.1.5 -


It seems that the foundation does not seem to "play well" with the rail engine. I am preparing a style layout engine so that I can plug and play this engine in various backend apps.

I tried to walk in the beginning:

  $ rg foundation: install  

who returned:

  "Generator foundation could not be found: install"  

I double checked my bundle, because I added zurb-foundation to my gemspec file. It was in my bundle, so I thought it was a compatibility problem with me, instead of using a regular railroad train engine using the rail engine, which I found this article:

I followed the directions of @Ivens Tried to give me these errors in my Chrome console:

  foundation.js? Body = 1: 26 Uncut Typair Foundation. Lars. Js? Body = 1: 58 Uncouted Referrence Arrow: Foundation Foundation has not been defined .clearing.js? Body = 1: 517 Unfair reference reference: foundation foundation.cookie.js? Body = 1: 75 Unwanted Reference Reference: Foundation foundation.dropdown.js? Body = 1: 184 Unfair Reference Reference: Foundation is not Defined Defined is not found in foundation.forms.js? Body = 1: 556 Uncaught ReferenceError: Foundation has not been defined by the foundation. Joyride.js? Body = 1: 853 Uncaught ReferenceError: Foundation Foundation is not defined. Magellan.js? Body = 1: 137 Unfair Reference Context: Foundation has not been defined as foundation. Orbit.js? Body = 1: 432 Unfair Reference Reference: Foundation has not been defined as foundation. Body = 1: 354 Uncaught ReferenceError: Foundation Foundation has not been defined. Section.js? Body = 1: 431 Unfair reference references: Foundation has not been defined by the foundation. Tolitis.js? Body = 1: 210 Unfair Reference Context: Foundation has not been defined as foundation. Popbar.js? Body = 1: 371 Unfair reference references: Foundation to foundation.interchange.js? Body = 1: 281 Unfamiliar reference references are not defined: Foundation has not been set up for the foundation. Body.js = body = 1: 195 Uncaught ReferenceError: Foundation is not defined application.js? Body = 1: 15 Uncaught ReferenceError: $ Not Defined  

Then I tried the regular ol 'manual installation guide about the documentation of the Foundation: who gave me the errors listed above. Has anyone participated in these problems, and can point me in the direction of the right documentation, or explained to me how you have successfully installed in the rail engine? As a last note, the foundation is working just fine in my dummy app. In my dummy app, I was able to run founder foundation successfully to run successfully, it's just in my actual engine where I can not get it to play well. My actual engine needs manual installation instead of Rail Generator.

Edit:

I added the Mani 'Foundation-Rail' and now I have a root-foundation gem and in my engine the foundation-rail gem Includes. This was getting rid of the 'Uncut Reference Error' errors I was getting. But now the context of jQuery is not working. My Google console error "jQuery is not defined." From this I believe that manual installation is still not going well. I am referring to the foundation in my application.js such as:

  // = foundations require $ (document). Foundation ();  

With a foundation not able to install correctly in the railway, a known The problem is the increasing engine I am currently submitting a bridge request and will update this answer once about the solution.


ibm mobilefirst - Worklight app authenticity is failing for some situations -


We are developing WL applications using WL Enterprise Works (6.2.0.1). Fix Pack 1.

We had been applied correctly by 3 months before the application authenticity and everything worked (no change on authenticationConfig.xml).

Today, all our applications are unsuccessful application authenticity (Dev, QA) for both environments, WL error on the server:

  [3/10/15 14: 13: 43: 821 EDT] 000000d3 AuthenticityL is I failed to investigate com.worklight.core.auth.ext.appauth.AuthenticityLoginModuleImpl login FWLSE0127E: authenticity app 'APPNAME' sharedData = ca.company.AppIDiPhone, challengeData = 514738N882129N341449C605766C744589X0355BCA6S214650C169432N928395XEDA8943BS085337C264942N797462X2B0C6AA2S462207X9035E6C7S. [Project Name] [3/10/15 14: 13: 43: 853 EDT] 000000d3 LoginContext W com.worklight.core.auth.impl.LoginContext invokeLoginModule FWLSE0239W: Realm authentication 'wl_authenticityRealm' failed login failed [Project name]  

Allows the app to see the error at the time of launch, and it is inconsistent, it (1/10) is often

AuthenticationConfig.xml :.

& lt; Security Tests & gt; & Lt; CustomSecurityTest name = "CompanyTestmobile" & gt; & Lt; Test realm = "wl_antiXSRFRealm" step = "1" /> & Lt; Test realm = "wl_authenticityRealm" step = "1" /> & Lt; Test realm = "wl_remoteDisableRealm" step = "1" /> & Lt; Test realm = "wl_directUpdateRealm" mode = "per session" step = "1" /> & Lt; Test realm = "wl_anonymousUserRealm" is INInternutUserID = "true" step = "1" /> & Lt; Test realm = "wl_deviceNoProvisioningRealm" is InternalDeviceID = "true" step = "2" /> & Lt; / CustomSecurityTest & gt; & Lt; WebSecurityTest name = "CompanyTest" & gt; & Lt; TestUser realm = "company reel" /> & Lt; / WebSecurityTest & gt; & Lt; CustomSecurityTest name = "subscribe search" & gt; & Lt; Test realm = "subscribe search" isInUserUserID = "true" /> & Lt; / CustomSecurityTest & gt; & Lt; / SecurityTests & gt;

Application- descriptor.xml (for iPhone):

  & lt; Iphone applicationId = "AppID" bundleId = "ca.company.AppIDiPhone" securityTest = "companytestmobile" version = "1.0" & gt; & Lt; WorklightSettings include = "incorrect" /> & Lt; Security & gt; & Lt; EncryptWebResources enabled = "true" /> & Lt; testWebResourcesChecksum enabled = "true" Andekhafail extension = "PNG, JPG, JPEG, GIF, MP4, MP 3" / & gt; & Lt; / Safety & gt; & Lt; / Iphone & gt;  

All our configurations match the WL document.

PS1: According to my understanding, aptitude will always fail or will not fail at all. Sometimes this is failing and working another time.

PS2: Deployment on our servers is not touchable and once we are deployed it can not be modified. It is a confirmation that the environment is stable and safe.

Thank you.

Because of the race condition triggered by epithelial code to call Epiator requests simultaneously, This appears to be, due to which there was a complete failure of authenticity tests.

The customer has a condition after which the problem can not be redone.


ios - Check if users are friends before sending push notification in parse.com cloud code -


I'm almost ready to release an iOS app on App Store, but I have trouble switching the cloud from the client Code is push notification.

Each user in the app is in the "user" object pars, and they have the property (array) of each friend.

I want the user to be able to send every other information, but I do not want the client push to be enabled for security purposes.

Basically, when a user sends a message to a friend, I have to figure out what the user is in the friend's friend list, and if he is, send the push notification to that friend with the message .


How do I use user-created R functions inside F#? -


I have my own R function which I would like to use in F # How do i do this

  open RPO open open RDNnetnet F1 = R.val (R. PRSE (text = "function (x) x + 1")). AsFunction () // I hope to give me the following line 5 but this f1 ([| 4 |]) does not work  

function, you have to give value to R by using the type provider. Then, call the function passed in the data on the R-side, and finally return the result to F #:

  let res = r.sapply (rc (4), f1) .AsInteger () [0]  

This product has the following output

val f1: function

val res: int = 5

You can find more information about

, showing a detailed example of the moving technology through data walking, which contains data. Frame:


azure - WebException "The remote server returned an error: (409) Conflict" -


I have a fixed webboy that is hosted on the " Always " website and I trigger I am doing scm site (via C # request)

Most of the time it works well, but occasionally, I get an error: WebException Remote Server has an error Return: (409) Conflict at System.Net.HttpWebRequest.GetResponse ()

More information: The website was not running at the time of the new request. Use Rhn or SDK'm not. The website is called every 30 seconds.

I really appreciate it if someone helps me to understand what is going wrong.

Thank you!

If WebJob is currently running (in any instances of your web app)


csv - MATLAB: Import a very large file in batches -


I am trying to import a large CSV file (215000X3) in 50 batches. 'Textscan' I used this code below

  N = 50; Fid = fopen ('PIDFile.csv'); FormatSpec = '% s% s% s'; K = 0; While ~ feof (fid) k = k + 1; Block = textscan (fid, formatSpec, N, 'delimiter', ',');  

After running this part of the code, I get 'block' as follows:

  34X1 cell 34X1 cell 34X1 cell  

The file being imported is a regular CSV file, I am looking at Fred, FSAN, CSVD etc. but not all the examples / sloths that offer block import.

Oh ok, any suggestions / comments will be highly appreciated

All I had to do was:

  block = cell2 matte (texasan (feed, format sapc, n, 'delimiter', ','));  

And the solution to that problem!


scope - How do I use a variable from one session (a Powershell ISE tab) in another? -


Here's a barebones code of what I'm trying to achieve ..

  $ DestinationDir = "subdir1" #creating tab $ newtab = $ psise.PowerShellTabs.Add () Do {sleep-m 100} While $rbin.Invoke ($ CD $ destinationDir) required script #running in the tab (! $ NewTab.CanInvoke) })  

Since the $ destinationDir parent does not start in the tab, it is limited to its scope and I

  the CD Kids tab The following error gets in: can not be process logic because The value of Rk "path" Change tap-tap assume the value of zero argument "path".  

How can I remove it and use the value in the hair tab?

Brief answer: You can not make each tab in PowerShell ISE built with a new runspace. There is no method available for injection of the variable in this runspace.

Long answer: There are always workmen. I have two here.

Use the invocation script block to transfer 1 new runpace variable:

  $ destinationDir = "subdir1" #creating tab $ newtab = $ Psise.PowerShellTabs.Add () do {sleep -m 100} while $ ($ $ newTab.CanInvoke) $ scriptblock = "` $ destinationDir = `" $ ($ destinationDir) `'in the CD $$ destinationDir" Running essential script $ newTab.Invoke ($ scriptblock)  

Use 2 environment variable EN:

  $ env: DestinationDir = "subdir1" #creating tab $ newtab = $ psise.PowerShellTabs.Add () Do {sleep-m 100} while $ ($ $ NEWTab.CanInvoke) tab $ newTab.Invoke ({CD $ env: destinationDir} in #running Need A script)  

linux - EACESS error when executing bower -


I am trying to set up a polymer project using the aqueduct,

I have successfully used the nodejs And am installing bower. But when I try to execute

  init bower  

in the command line, I always get this error

 Trace on StandardRenderer.error (/usr/lib/node_modules/bower/lib/renderers/StandardRenderer.js:82:17) on the logger & lt: stack trace: error: EACCES, open '/ kuda / Bower.json 'console detection. ; Anonymous & gt; (/ Usr / lib / node_modules / bower / bin / bover: 110: 22) at logger.emit (events.js: 95: 17) at logger.emit (/ usr / lib / node_modules / bover / node_modules / bover-logger /lib/Logger.js:29:39) _rejected at /usr/lib/node_modules/bower/lib/commands/index.js:40:20 (/ usr / lib on / node_modules / bover / node_modules / q / q. Js: 797: 24) /usr/lib/node_modules/bower/node_modules/q/q.js:823:30 Promise.when on (/usr/lib/node_modules/bower/node_modules/q/q.js:1035 : 31) at Promise.promise.promiseDispatch (/usr/lib/node_modules/bower/node_modules/q/q.js:741:41) at /usr/lib/node_modules/bower/node_modules/q/q.jsitter57 : 44  

pls help

You do not have permission < Go to Code> / usr / lib / node_modules /..., so this is a permission problem Is there.

A fool will now try sudo -E bower init - permission-root but this is not really a solution (though it works). Do not do that if you do not know what it does and which is the risk , which is counted for all the sudo commands 'Just when Pudo does not work' Actually there is not a good solution.

You probably run sudo npm install -g bower when you install Biver, because without Sudo did not work when this happens, So you do not own the Bower program, but you have no access to this root user and so on.

Try it:

  1. Delete Trash
  2. Follw this post:
  3. What is the NPM Bover , Without installing sudo
  4. Try init bower again

Form a single list from multiple answers in Prolog -


मैं वर्तमान में प्रोलॉग में कोड का यह टुकड़ा है

  s1 (Q, 100): - उत्पन्न (क्यू)। उत्पन्न ([एक्स, वाई, एस, पी]): - नेट (एक्स, 49), नेट (वाई, 9 8), एस एक्स + वाई, पी एक्स है * वाई, एस = & lt; 100, एक्स एंड एलटी; वाई। नेट (2, _) नेट (एक्स, एन): - N & gt; 2, एम एन -1, एनएटी (वाई, एम), एक्स Y + 1 है। यह वर्तमान में चौगुना,  एक्स, वाई, एस, पी की एक सूची तैयार करता है।  ऐसा है कि 

  • 1 & lt; एक्स एंड एलटी; 49
  • 1 & lt; वाई एंड एलटी; 98
  • 1 & lt; एक्स एंड एलटी; वाई
  • एक्स + वाई और एलटी; = 100
  • पी = एक्स * वाई
  • एस = एक्स + वाई

यह काम करता है और सभी संभव समाधान बनाता है, लेकिन कई उत्तरों के साथ (यानी, अगले परिणाम प्राप्त करने के लिए हर बार ; दबाएं।)

एक सूची सभी का गठन कैसे हो सकती है उदाहरण के लिए,

  [[2, 3, 5, 6], [2, 4, 6, 8], ...]  
< findall / 3

बिना सबसे पहले, आप X और वाई के लिए दिए गए अंतराल की सीमा दोनों एक करके बंद हैं:

  • < कोड> 1 & lt; एक्स एंड एलटी; 49 मेल नहीं खाता nat (X, 49) , 1 & lt; एक्स = & lt; 49 करता है।
  • 1 & lt; वाई एंड एलटी; 98 मेल नहीं खाता नेट (वाई, 98) , 1 & lt; वाई = & lt; 98 करता है।

चलो इसे आरंभ करें!

यदि आप सभी कोड एकत्र करना चाहते हैं बिना का उपयोग कर findall / 3 (आदि), एक तरीका दो सूचियों Xs और वाईएस के (उर्फ क्रॉस-उत्पाद) की गणना करना है।

Xs और वाईएस प्राप्त करने के लिए, हम अंतर्निहित परिभाषा का उपयोग कर सकते हैं:

 ? - numlist (2,49, Xs)। Xs = [2,3,4, / * लगातार पूर्णांक 5 से 47 छोड़े गए * /, 48,49] ? - संख्या सूची (2,98, वाईएस) वाईएस = [2,3,4, / * लगातार पूर्णांक 5 से 96 छोड़े गए * /, 97,98]  वाई  में प्रत्येक  वाई  में  X  में  Xs  को गठबंधन करने के लिए  

हम उपयोग करते हैं।

जो चौगुना एकत्र करने के लिए चुनते हैं, व्याकरण नियम x_y_maybe_quadruple // 2 :

  x_y_maybe_quadruple (एक्स, वाई) का उपयोग करें - - & gt; यदि इन सभी स्थितियों से मुलाकात की जाती है - (पी  

चलो इसे एक साथ रख दो!

 ? - संख्या सूची (2,49, एक्स), संख्या सूची (2,98, वाईएस), वाक्यांश (xproduct) (x_y_maybe_quadruple, Xs, Y), QSS)। क्यूएसएस = [[2,3,5,6], [2,4,6,8], / * बहुत सारे क्वाड्रुपले छोड़े गए * /, [48,51,99,2448], [48,52,100,24 9] ]।  

तो ... क्या हम वास्तव में सभी चतुर्भुज प्राप्त करते हैं यदि हम findall / 3 ?

 ? - findall (क्यू, उत्पन्न (क्यू), Qss1), संख्या सूची (2,49, Xs), संख्या सूची (2,98, वाईएस), वाक्यांश (एक्सप्रोडक्ट (x_y_maybe_quadruple, Xs, Ys) Qss2), Qss1 = Qss2 Qss1 = Qss2, Qss2 = [[2, 3, 5, 6], [2, 4, 6, 8], [2 | ...], [... | ...] | ...], एक्स = [2, 3, 4, 5, 6, 7, 8, 9, 10 | ...], वाईएस = [2, 3, 4, 5, 6, 7, 8, 9, 10 | ... ]।  

यह काम करता है! और ऐसा न कि: हम ठीक उसी चौगुनी सटीक उसी क्रम !


malware detection - How to group yara's results by file? -


I'm trying to detect some malware by using yara

< P> The problem is that I would like to group the results by file

The content command line that is using is:

  $ yara -r rules.yar Malware_folder  

Here's the answer because I've found something where

< Blockquote>

$ $ i in $ (search e / -type f); Docho -n "$ i,"; IFS = $ "\ n" YES RULES. Alright "$ i" | Cut-D '' -f1 | Tr -t \ n,; Echo; Done> results.csv


Perl data process -


मेरे पास डेटा नीचे कुछ जैसा है:

  $ data = [[qw (xy) ], [Qw (x)], [qw (xz)], [qw (z)],];  

और मैं इसे नीचे की तरह कुछ में परिवर्तित करना चाहूंगा:

  [x, x, x, z]  

नियम पहले तत्व से शुरू हो रहा है, पहले दो तत्वों के बीच सामान्य तत्व ढूंढें, यदि कोई सामान्य पाया गया है, तो दोनों तत्वों के लिए सामान्य मान असाइन करें अब दूसरे और तीसरे तत्व को चुनें, यदि उन दोनों के बीच कोई भी आम मान है तो वही करो और जब तक आप अंतिम तत्व तक नहीं पहुंच जाते तब तक जारी रखें। यदि आप पिछले दो युग्मों के बीच सामान्य मान पाते हैं तो केवल उसे अंतिम तत्व में निर्दिष्ट करें।

यह लगता है जैसे आप अपने डेटा बिंदुओं के किसी प्रकार के चौराहे की गणना करना चाहते हैं? मैं ऐसा कुछ करूँगा:

  #! / Usr / bin / env perl सख्त; चेतावनियों का उपयोग करें; ऑटोडी का उपयोग करें; डेटा का उपयोग करें: Dumper; मेरा @डेटा = ([qw (x y)], [qw (x)], [qw (x z)], [qw (z)],); उप intersect {my ($ a, $ b) = @_; मेरी $ union = {}; मेरी $ isect = {}; विदेशी मुद्रा $ $ ($ $ a, @ $ b) {$ union- & gt; {$ e} ++ & amp; amp; $ Isect- & gt; {$ ई} ++; } वापसी कुंजी% $ isect; } मेरे @ रुट = (); मेरे $ i (0 .. $ # डेटा - 1) {my @intersection = intersect ($ डेटा [$ i], $ डेटा [$ i + 1]) के लिए; अगर (स्केलर @ चिह्न) {my $ isect = shift @ छद्म; अगर ($ i == 0) {push @result, $ isect; } धक्का @ रुट, $ isect; } Else {die sprintf ("डेटा अंक स्थिति% डी पर छेद नहीं करते", $ i + 1); }} प्रिंट Dumper \ @result;  

इस स्क्रिप्ट को चलाने से मुझे निम्न आउटपुट मिलता है:

  $ ./intersection.pl $ VAR1 = ['x', 'x', 'x ',' जेड '];  

आशा है कि यह मदद करता है।

एक और कोष्ठक विधि भी Array :: Utils पैकेज में उपलब्ध है सीपीएएन।


phone number - android getLine1Number() returns empty string -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 3 जवाब

मुझे मोबाइल मिलना है उपयोगकर्ताओं की संख्या, जिन्हें डिफ़ॉल्ट रूप से उपयोगकर्ता नाम के रूप में लिया जाएगा, जब मैंने मोबाइल नंबर प्राप्त करने के लिए निम्नलिखित कोड का इस्तेमाल किया, तो यह एक खाली स्ट्रिंग देता है

  टेलीफोनी प्रबंधक टीएमजीआर = (टेलीफोनी प्रबंधक) getApplicationContext ()। GetSystemService (Context.TELEPHONY_SERVICE); MPhoneNumber = tmgr.getLine1Number (); स्ट्रिंग mobNo = mPhoneNumber.replace ("+", "");  

एक कारण मैंने पाया है मेरा फ़ोन नंबर है अज्ञात सेटिंग्स-> फ़ोन के बारे में-> स्थिति-> सिम स्थिति । उपयोगकर्ता को कोई बोझ दिए बिना इस मुद्दे को कैसे सुधारें।

यहां छवि विवरण दर्ज करें

वहां कम से कम कुछ सिम कार्ड / ऑपरेटर्स हैं जो नंबर प्रदान नहीं करते - मैंने देखा है यह और आपने इसे देखा है। शायद इसके बारे में कुछ भी नहीं है।


c# - Windows 8.1 control that opens the appbar? -


In the Internet Explorer app, there is a small strip on the bottom that is used to open the app / command bar.

This mail also appears in the app: windows mail app

< P> I have just a simple commander at this time, which is completely hidden from user right-click or swipe down from:

  & lt; Page. BottomAppBar & gt; & Lt; CommandBar & gt; & Lt; AppBarButton x: Name = "ButtonSave" Icon = "Save" label = "Save" Click = "Button_Ev_click" /> & Lt; CommandBar.SecondaryCommands & gt; & Lt; AppBarButton Icon = "Crop" label = "Canvas Size" & gt; & Lt; / AppBarButton & gt; & Lt; AppBarButton label = "grid size" icon = "see now" & gt; & Lt; / AppBarButton & gt; & Lt; /CommandBar.SecondaryCommands> & Lt; / CommandBar & gt; & Lt; /Page.BottomAppBar>  

Rather than just creating your control, it would be good if one used to use it was already present. I do not know the name of this "Command Bar Hold", so I can not get much information about it if it is present, then what is its name? And if not, any ideas about how to make someone? Maybe I just use one rectangle and add "..." to the side.

I have seen it in some app other than Microsoft, but there is no information in control. /p>

There is no standard control for this, either the box box app on Windows 8.1 hides or shows It does not have intermediate hint mode.

You can apply yourself by creating a panel at the bottom of the page that animates your position, or it shows either fully visible or only elusive, by setting the visual status for visible and hinting states And can get control while switching to the visible position when the control receives focus or pointer input. As Robert Hartley points out, from the oval 0xE10C ("more"), the UI can be found in the signals font

  & lt; TextBlock Text = "& amp; # xE10C;" Horizontal alignment = "right" vertical alignment = "top" fontfiled = "segoyi UI symbol" />  

I have not used it, but Dave Schmidt has provided a sample which applies the Hinting app bar for Windows. You may also consider how they did it.


jpa - How to use @IdClass annotation with composite key -


Examples of two organizations working on master-extension patterns using composite keys for any eclipseLink (JPA 2.1) Can share @IdClass

Here is an example

  public Class EmployeePK Serializable applies {private long empId; Private long department; Public Employee (PK) {} Public Long-Term Emp () {return.empId; } Public Zero Setampid (long empId) {this.empId = empId; } Public long department () (back to this department); } Public Zero Set Department (Long Section) {This Department = Department; } Public Action Hashod () {Return (int) this.empId.hashCode (); } Public boolean par (object obj) {if (obj == this) back true; If (Obj exampleof EmployeePK) false return! Employee pk pk = (employee pk) obj; Return pk.empId.equals (this.empId) & amp; Amp; Pk.department.equals (this.department); }}  

and

  @IdClass (Employee PK class) applies @ Anti-Public Class Employee Employee Serial Job {@Id long empId; @ ID @ManyToOne Department Department; ...}  

Perl class::dbi - multiple connections -


I have a class library which I have developed in the last few years which uses Pearl Class :: DBI Wrap up a relational database (DB scheme for prestashop, this is not important)

Is anyone aware of any of the Perl scripts to create several "instances" of this class, different Pointing to the database? Like now I do something like this:

  Use MyClassLib; MyClassLib- & gt; Connection ('dbi: mysql: mydatabase', 'username', 'password'); MyClassLib- & gt; Some_method ()  

It all works well.

What I am trying to do is essentially the nickname MyClassLib being able to use another "example" to point to another database. Class :: DBi stores its database connection as a static state.

Use MyClassLib in some way such a code

 ; Use MyClassLibAlias ​​as MyClassLib; MyClassLib- & gt; Connection ('dbi: mysql: mydatabase', 'username', 'password'); MyClassLibAlias- & gt; Connection ('dbi: mysql: mynewdatabase', 'username', 'password'); MyClassLib- & gt; Some_method ()  

and then code access MyClassLib and MyClassLibAlias ​​. I know that the solution using class :: dbi legacy and dBiX :: class would also be appreciated if class :: dbi Does not exist

thanks

class :: dbi You can provide your own db_Main () method instead of using Connection () . I believe it can handle a standard DBI, but class :: DBI ima :: DBI uses internally. You can use a single square for this, but to mirror your proxy code:

  package MyClassLibAlias; Use base qw (MyClassLib); Sub db_Main {my $ self = shift; My ($ DSN, $ username, $ password) = ...; Return IMA :: DBi- & gt; Connected ($ DSN, $ username, $ password); }  

You will refer to DSN, username and password using class attributes.


javascript - KnockoutJS observableArray: group data in foreach -


knockout.js बाइंडिंग के साथ टेबल currenlty दिखता है:

  स्रोत कुल प्रभाग 00234 4506 div1 30222 456 div2 63321 23 div2 40941 189 div1  

वांछित आउटपुट नीचे जैसा कुछ होगा डेटा को विभाजन द्वारा समूहित करने की आवश्यकता है।

  स्रोत कुल div1 00234 4506 40941 189 div2 30222 456 63321 23  

यह मेरा है देखेंमोडेल:

<प्री> var रिपोर्टिंगवियमोडेल; ReportingViewModel = {परिणाम: ko.observableArray (null)}

ReportingViewModel एक एजेक्स अनुरोध के जरिए आबादी हो जाती है:

  रिपोर्टिंग व्यू मॉडल .Results (डेटा [ "डेटा"] [ "रिपोर्ट"]);  Q:  मैं वांछित आउटपुट कैसे प्राप्त कर सकता हूं?  

संपादित करें:
यहां मेरा दृश्य है :

  & lt; तालिका वर्ग = "तालिका तालिका-संघनित" id = "रिपोर्ट डेटा" & gt; & LT; thead & gt; & LT; टीआर & gt; & LT; वें & gt; स्रोत & lt; / वें & gt; & LT; वें & gt; कुल & lt; / वें & gt; & LT; वें & gt; विभाजन & lt; / वें & gt; & Lt; / टीआर & gt; & Lt; / thead & gt; & Lt; tbody डेटा-बाइंड = "foreach: परिणाम" & gt; & LT; टीआर & gt; & Lt; td डेटा-बाइंड = "टेक्स्ट: स्रोत" & gt; & lt; / td & gt; & Lt; td डेटा-बाइंड = "टेक्स्ट: कुल" & gt; & lt; / td & gt; & Lt; td डेटा-बाइंड = "टेक्स्ट: विभाजन" & gt; & lt; / td & gt; & Lt; / टीआर & gt; & Lt; / tbody & gt; & Lt; / तालिका & gt; & Lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" & gt; $ (दस्तावेज़) .ready (function () {reportingingViewModel.Results (null); e.preventDefault (); var number = null; if ($ ('# numberdd')। ("विकल्प: चयनित")। ;) {Number = $ ('# numberdd')। ("विकल्प: चयनित");} यदि (संख्या! = नल) {$ .ajax ({url: '/ रिपोर्टिंग / रिपोर्टडेटा.एस्पक्स', टाइप करें: 'पोस्ट', डेटा: नंबर, डेटा प्रकार: 'जेसन', कंटेंट टाइप: "एप्लिकेशन / जेसन", सफलता: फ़ंक्शन (डेटा) {रिपोर्टिंग व्यू मॉडल। परिणाम (डेटा ["डेटा"] ["रिपोर्ट"]);}, त्रुटि: फ़ंक्शन () {चेतावनी ('त्रुटि रनिंग रिपोर्ट');}});} और {चेतावनी ('डेटा नहीं है!');}}); Var रिपोर्टिंगव्यूमोडेल; रिपोर्टिंग व्यूमोडेल = {परिणाम: को.सॉर्सवेबलअरे (नल),} को.एपलीबिंन्डिंग्स (रिपोर्टिंग व्यूमोडेल); }); & Lt; / स्क्रिप्ट & gt; नॉकआउट 2.0 में डेटा समूहबद्ध करने के लिए यह आपके लिए काम करना चाहिए पर एक उचित बेला है।  

सबसे महत्वपूर्ण बात, आपको अपने डेटा को रूपांतरित करना चाहिए ताकि आपके पास विभाजन के माध्यम से लूप के रूप में एक तत्व हो और प्रत्येक डिवीज़न में एक गणित बच्चे हो जो मेल खाते को वापस देता है। वह इस का प्रबंधन करने के लिए अवलोकन संपत्ति पर स्वयं का विस्तार करने के लिए होता है ...

  को.ओब्सर्वबलअरेरे.फं। डार्स्टिक्ट = फ़ंक्शन (प्रोप) {var target = this; Target.index = {}; Target.index [prop] = ko.observable ({}); Ko.computed (function () {// rebuild index var propIndex = {}; ko.utils.arrayForEach (लक्ष्य), फ़ंक्शन (आइटम) {var key = ko.utils.unwrapObservable (item [prop]); यदि ( कुंजी) {प्रोइंडेक्स [कुंजी] = प्रोइंडेक्स [कुंजी] || []; प्रोइंडएक्स [कुंजी] .पश (आइटम);}}); लक्ष्य.आंडक्स [प्रोप] (प्रोइंडएक्स);}); वापसी लक्ष्य; };  

फिर अपने मार्कअप में आपके डिवीज़न के माध्यम से डेटा-बाइंड लूप तक।


python - Iron worker and scrapy -


I am trying to make an iron.

I have created a folder named module , which will have all third party modules and will be installed through PP.

Tracebacks (Lastest Call Last): File "module / scrape / __init__.py", line 10, & lt; Module & gt; Is happening in

  __version__ = pkgutil.get_data (__ package__, 'version'). Decode ('ascii'). Strip () file "/usr/lib/python2.7/pkgutil.py", line 578, get_data loader = get_loader (file) "/usr/lib/python2.7/pkgutil.py", line 464, get_loader Return find_loader (fullname) "/usr/lib/python2.7/pkgutil.py" in the file, line 474, finder_importers (fullname) in the find_loader for the importer: file "/usr/lib/python2.7/pkgutil.py" , Line 424, iter_importers if fullname.startswith ('.'): Attribute: 'startwith' has no attribute in the 'any type' object  

You probably want to use scraps from your IronWorker code, such as the command line She is on the front page of the tutorial or:

After using it in Ironworker, after installing PIP, make sure:

  pip 'scrapy'  

In your workwork file again in your worker script, you will import it:

  import scrapy  

Then use it as it is written in the tutorial link above.


python - Sympy Lambdify get 3d plot for 2d equation in mayavi -


  str_exp = "x + y" expr = sympify ((str_expr)) एक्स, वाई, जेड = एनपी ओग्रिड [x_start: x_end: no_x_points, y_start: y_end: no_y_points, z_start: z_end: no_z_points] f = lambdify ((x, y, z), expr) foo = f (एक्स, वाई, जेड)  

भले ही expr x और y का एक फ़ंक्शन है, मुझे उम्मीद है कि foo 3d का निर्माण करने के लिए डेटा के रूप में z भी विविध किया जा रहा है जब मैं मायावी का उपयोग करके foo साजिश करने की कोशिश करता हूं, तो एक विमान की बजाए एक पंक्ति का प्लॉट किया जा रहा है।

मुझे यकीन है कि यह सिम्पी के lamdify के रूप में foo है (100,100,1) का आयाम है। जब expr है x + y

मैं लगता है कि समस्या यह होगी कि expr में केवल 2 चर होंगे और इसलिए आपको आवश्यकतानुसार 3 डी सरणी नहीं मिलेगी। इसलिए, सिम्पी की सिम्फ़िफाइ फ़ंक्शन अभिव्यक्ति (या स्ट्रिंग दी गई) को सरल नहीं करता है। तो, आप "(z + 1) ** 2 - z * z - 2 * z - 1" (या कुछ सरल अभिव्यक्ति जैसे कि z शब्द को रद्द नहीं कर सकते हैं) को जोड़ सकते हैं < Code> str_exp यदि आपके पास इसमें 'z' शब्द नहीं है।

इस प्रकार sympify इस तरह से आप z के साथ अभिव्यक्ति वापस करेगा।

  & gt; str_expr = "x + y + (z + 1) ** 2 - z * z - 2 * z - 1" & gt; & gt; sympify ((str_expr)) x + y - z ** 2 - 2 * z + (z + 1) ** 2 - 1  

Getting “Too many redirects” error with nginx rewrite rule -


This is nginx.conf.
There is a problem that continues to redirect.
I have a "many redirects" error
What are the problems?

Let me "/aaa/test.do" uri to http Want to
"/aaa/test.do" uri to https
Please help thank you

map $ uri $ example_org_preferred_proto {default https; ~ ^ / Aaa / test.do http; }

........

  server {80 says; Server_name www.test.com; Charset UTF-8; If ($ example_org_preferred_proto = "https") {return 301 https: // $ server_name $ request_uri; } Location / hosts $ host {proxy_set_header; Proxy_set_header X-real-IP $ remote_adder; Proxy_set_header X-Forward-Host $ host; Proxy_set_header X-Forward-Server $ host; Proxy_set_header X-Forward- $ proxy_add_x_forwarded_for; Proxy_set_header host $ http_host; Proxy_redirect closed; Proxy_buffering off; Proxy_connect_timeout 60; Proxy_read_timeout 60; Proxy_pass http: // wwwteestcom; }} # HTTPS server # server {443 Listen; Server_name www.test.com; Charset UTF-8; Ssl on; Ssl_certificate D: /nginx-1.7.10/ssl/cert.pem; Ssl_certificate_key D: /nginx-1.7.10/ssl/key.pem; Ssl_session_timeout 5m; Ssl_protocols SSLv3 TLSv1; ASDH: RC4 + RSA: + High:! XP: + EAUAL: AES 256-SHA; Ssl_prefer_server_ciphers ON; If ($ example_org_preferred_proto = "http") {return 301 http: // $ server_name $ request_uri; } Location / hosts $ host {proxy_set_header; Proxy_set_header X-real-IP $ remote_adder; Proxy_set_header X-Forward-Host $ host; Proxy_set_header X-Forward-Server $ host; Proxy_set_header X-Forward- $ proxy_add_x_forwarded_for; Proxy_set_header host $ http_host; Proxy_redirect closed; Proxy_buffering off; Proxy_connect_timeout 60; Proxy_read_timeout 60; Proxy_pass http: // wwwteestcom; Proxy_ssl_session_reuse turned off; } "<">  / P> 
  map $ uri $ example_org_preferred_proto {default "https"; ~ ^ / Aaa / test.do "http"; }  

In addition, I suggest defining different access and error logs for HTTP and HTTPS servers. Checking messages in those log files will help you debug the issue right away.


php - I need help using the merge function with oracle -


I have three tables (partial_subs_2015, partial_reference and new subscribers), which include the customer's phone number and customer's name). Actually what I want to do, the number number in the load number and the customer name is partial_subs_new from partial_subs_2015, in a way that if those numbers are already present in partial_subs_2015, then nothing happens (update clause) and when These numbers are available in full_listers, they are removed from them Partial_subs_2015 (delete clause). And finally if the numbers are not found in partial_subs_2015 (no matches) in the partial_sub__ numbers, then they are inserted into that table (partial_subs_2015) (insert clause).

My query runs without indefinitely and I do not know why any kind of help would be appreciated. Actually this will give me a dynamic table so that customers will be fully converted, they have been removed from the partial_subs--2015 table. I have this question: merge into partial_subs_2015 on partial_subs_new E (e.customer_name = p.customer_name) when matching is done, remove update p.msisdn = p.msisdn where p Insert (MSIDN, Customer_N) Value (E.M.S.DN, E.C. Customer_Name)

in MSISDN (Choose MSISDN from Full_Subscriber) Html>

excel - VBA listbox created during runtime, not triggering event -


I created a list box from within the vba code when I selected some combo box items, in fact when selecting the combo box item , A SQL is run on a database table and the resulting archive set is fed into an array, which later fills a multi-dimensional listbox.

It appears within the UserFed modules but I have added a click and a double click event for the list box, but neither work.

The following code is used to create a list box within the user module.

Dim control as lst.CleumnCount with lst = me.Controls.Add ("Forms.Listbox.1", "lstOutputList") line = UBound (output list, 2) = X = 0 column for column - 1 for y = 0 rows. If the item is not out (output list (X, Y)) Then list (y, x) = output list (x, y) other List (y, x) = = "for the end if the next y = next to the next count. ListContact + 1 Step-1 for rows. Revight numbers - 1 next count. Boundcollege = 2. Multi Select = FM Multi Select Singal. Left = 270 .Pept = 100 .Width = column * 70 if rows & gt; 50 then = 300 others Heat = Rows * Ends with end and end

, lists are created and look fine on the form, these are just events that do not firing I have tried both lst_click () and lstOutputList_Click () events and equivalent double click events, nothing does not work


osx - sed on linux and MacOS in Makefile -


I am writing a makefile which is working on Linux and Macod system. I use the sed program It has been found that BSD sed and gnu sed differ in a small but significant detail I quote from the man page:

  BSD: -I extension ... GNU: -i [SOFFIX], -in-place [= SUFFIX]  

then call me on Mac

 < The empty string is required after code> sed -i '' -e / foo / bar / 'file.tmp  

where -i , while on the Linux machine I call

sed -i 's / foo / bar /' file.tmp

here The question is:

Is there a safe way to distinguish between two OS in the makefile?

I definitely call the user Makefile.mac or Makefile.linux , but instead I avoid it.

safe way -i option sed Do not use it. This option is an unused eligible extension and is not part of POSIX.


Linux Create user with specials login options -


Hello I need to create some special user privileges which:

  • A user Can only login with local SSI, no local
  • Other users who can login locally and ssh but can not open any graphical interface
  • Other users who can not load the desktop, but
  • < / Ul>

    One way to do this is, Thz


ios - acos and cos with degrees not giving proper result -


जब मैं नीचे लिखे कोड लिखता हूं

  NSLog (@ "% f ", acos (क्योंकि (1)));  


यह परिणाम के रूप में 1 देता है, लेकिन अगर मैंने रेडियन के बजाय डिग्री से परिणाम प्राप्त करने की कोशिश की तो नीचे की समस्या का सामना करना पड़ रहा है

<पूर्व> #degineDEGREES_TO_RADIANS (कोण) ((कोण) / 180.0 * M_PI) NSLog (@ "% f", एसीएसओ (कॉस (डीजीईआरईओएचडीएआरडीआईएन्स (1))));


फिर यह 0.017453 के बजाय 1 देता है।
यदि मैं नीचे लिख रहा हूँ

  एनएसएलॉग (@ "% एफ", एसीओएस (कॉस (डीजीईआरईओएचओ_आरएडीआईएनएस (1))) * 180 / एमओपीआई);  


तो मुझे उचित 1 परिणाम के रूप में मिल रहा है।
लेकिन अगर मैं नीचे लिखूँगा

  NSString * a1 = [NSString stringWithFormat: @ "% f", (कॉस (DEGREES_TO_RADIANS (1)))]; NSString * a2 = [NSString stringWithFormat: @ "% f", (acos ([a1 डबल वैल्यू]) * 180 / M_PI)]; एनएसएलॉग (@ "% एफ", [ए 2 डबल वेल्यू]);  

तो मुझे परिणाम के रूप में 0.998999 मिल रहा है
फिर जहां समस्या है?
कृपया मेरी मदद करें

0.017453 यह है कि कितने रेडियन एक डिग्री में हैं।

यदि आप अपने लॉगिंग लाइन को आउटपुट 1 में चाहते हैं, तो आपको वापस डिग्री में बदलने की आवश्यकता होगी।

  #define RADIANS_TO_DEGREES (कोण) ((कोण ) * 180.0 / एमओपीआई) एनएसएलॉग (@ "% एफ", आरडीआईआईडीओओएजीईआरईईएस (एसीसीएस (कॉस (डीजीईआरईएचओआरडीएन्स (1)))));  

ध्यान दें कि आपको 0.9 999 जैसे नतीजे मिल सकते हैं, हालांकि, त्रिकोणमिति कार्यों की सीमित सटीकता और सामान्य रूप से फ्लोट की वजह से।


java - Jackson unable to Map Class using ObjectMapper -


I am trying to serialize a square with a map of two strings and strings using Jackson. Here's Jason, I'm trying to serialize. I am thinking that there is a problem because I want to serial the empty array series. {"Test": ["hi"], "group": [], "group": [], "chain": [], "chainshot" : [], "Location": [], "location of place": [], "report": [], "reports": []}, "date from": "09.03.2015", "toDate": "16.03.2015"}

Here is a class that is being used to use and sort it.

  Public Category FilterRequest {public string getToDate () {back to; } Public Zero Settud (String Tundet) {this.toDate = toDate; } Public string getFromDate () {Return from date; } Public Zero setformat (string sendet) {this.fromDate = fromDate; } Public Map & lt; String, string []> GetFilters () {Return Filter; } Public Zero Set Filter (Map & lt; String, String [] & gt; Filters) {this.filters = filters; } Private string toddade; Private string sender; Private map & lt; String, string []> Filter; Public Filter Request () {Filters = New Hashmap & lt; String, string []> (); }}  

The code that is failing is simply

  object mapper mapper = new objectmap (); FilterRequest request mercury = mapper.readValue (requestBody, FilterRequest.class);  

I'm getting the error

  No suitable constructor for type [General Type, class com.aramburu.overall.web.controller. FilterController $ [Source: {"filter": ["hi"], "group": [], "groupsOT": Instant to JSON object (need to add / enable information type?) "]": [], "Chainsot": [], "location": [], "placesOT": [], "report": [], "reportsot": []}, "FromDate": "09.03.2015" "todate": "2015/03/16"}; Line: 1, column: 2]  

Output: is not a suitable manufacturer [Simple type, class com.aramburu.overall.web.controller.filterController $ FilterRequest found for the type that means FilterRequest is an internal range.

Make FilterRequest class static (or - better still - remove it from FilterController ).


matlab - How to convert settling time to natural frequency? -


ए = समय तय करना (5%) & lt; 2 सेकेंड।

  1. ए को प्राकृतिक freq कन्वर्ट कैसे करें
  2. ए में "5%" और "2 सेकंड" क्या है?

उपर्युक्त विनिर्देशों के अनुरूप पोल कैसे छापें।

मैं यह क्यूशन कह रहा हूँ क्योंकि मैं rlocus और sgrid फ़ंक्शंस का उपयोग कर रहा हूं। मैंने निम्नलिखित सूत्र का उपयोग करके sgrid के लिए पहली तर्क गणना की है, जो कि औसत प्रतिशत को ढंका हुआ अनुपात की गणना करता है, लेकिन मुझे दूसरे आर्ग के साथ मदद की ज़रूरत है।

यहां छवि विवरण दर्ज करें

वर्तमान कोड:

<पूर्व> सीएलसी; सभी साफ करें; S = टीएफ ('एस'); % TF मॉडल P = 1 / (s + 1); % संयंत्र सी = 1; % लगातार लाभ के = 1; % लगातार लाभ आर = 1 / एस; % इनपुट जी = के * सी * पी; % आउटपुट एच = फीडबैक (जी, 1) वाई = आर * एच आर्लोकस (वाई); अक्ष ([- 15 15-15 15]) जीटा = 0.5 9; डंपिंग अनुपात Wn = ???; % प्राकृतिक आवृत्ति sgrid (ज़ेटा, डब्लूएन)

व्यवस्थित समय और पैरामीटर के बीच संबंध दूसरा ऑर्डर अंडरैम्पड मॉडल के द्वारा पाया जा सकता है:

सामान्य तौर पर, आपके द्वारा व्यवस्थित समय की गणना करने के लिए उपयोग किए जाने वाला सूत्र निम्न द्वारा दिया जाता है:

स्रोत :

इसलिए, यदि आप 5% चाहते हैं, तो बस सहिष्णुता अंश के रूप में 0.05 निर्दिष्ट करें, और -ln (0.05) लगभग 3 है।

< P> आपने कहा है कि आपको भिगोना अनुपात दिया गया है, साथ ही साथ 5% मानदंड के भीतर निपटने का समय दिया गया है .... तो पुनर्व्यवस्थित करें, और प्राकृतिक आवृत्ति के लिए हल करें।

अब 5% 2 सेकेंड का मतलब है, इसका मतलब है कि जब आप अपने बंद-लूप नियंत्रण प्रणाली के लिए एक कदम प्रतिक्रिया प्रदान करते हैं स्थिर-राज्य मान के 5% के भीतर बसने के लिए ओसीलासमेंट्स के लिए यह 2 सेकंड लेता है।

बीटीडब्लू, आपका दूसरा प्रश्न है, इसलिए आपको 2 सेकंड तक इंतजार करना होगा ताकि सिस्टम के कदम की प्रतिक्रिया को 5% के भीतर शामिल किया जा सके जो कि नियंत्रण प्रणाली का स्थिर-राज्य मान है।

पूछने पर कि कैसे बस समय के उपयोग के संबंध में खंभे को साजिश करना थोड़ा सा अस्पष्ट है क्या आप केवल दूसरी ऑर्डर अंडरैम्पड मॉडल मानते हैं? यदि आप हैं, तो यह बस एक जटिल पोल जोड़ी है जहां मॉडल की जड़ों को पाया जा सकता है:

बस अपने भिगोना उपरोक्त समीकरण में अनुपात और प्राकृतिक आवृत्ति, और उन दो खंभे का साजिश करें।


Get difference between values in MySQL -


I have a table with the following columns

  id pl_date month score that ID 1 20015 / 02/04 02 9 244 2 20015/02/05 02 12 244 3 20015/02/08 02 8 244 4 20015/02/22 02 24 244 5 20015/03/10 03 10 244 6 20015/03/11 03 12 244 7/2005/03/12 03 10 244 8 20015/03/13 03 12 244  

My goal score with a specific SELECT with mysql

 Calculate the difference between I  id pl_date month score kid difference 1 2015/02/04 02 9 244 -3 2 2015/02/05 02 12 244 +4 3 2015/02/08 02 8 244 -16 4 2015-02-22 22 24 244 +14 5 2015-03-03 03 10 244 -2 6 2015/03/11 03 12 244 +2 7 2015-03-03 03 10 244 -2 8 2015/03/13 0 3 12 244 12  

I got down Eaten by trying to use the subkey, but it does not work.

  SELECT b.id, (b.max_count -bmIQQ) from AS DIFF (SELECT id, MAX (score) as MaxCount, MIN (score) MYTable WHERE months = 03 by min_count and KID = 244 by the group KID) 
< P> You can join the table with yourself (one yourself involved), but with the transfer of the ID to one:
  select t1. *, Ifnull (t1.scores - t2.scores, t1.scores) table 1 t1 left as a diff, t1.id + 1 = t2.id on table 1 t2  

If you want to calculate the difference in only a few groups (such as IDs), just add those conditions by adding them.

Another approach is a correlated subquery (this uses the date rather than the id to determine the successor):

  select t1. *, T1.scores - ifnull ((Select table where pl_dat E & gt; T1.pl_date limit1), 0) ID by table 1 as T1 order diff;  

(both views)


ember.js - {{content-for 'head'}} Ember-cli -



ember.js - {{content-for 'head'}} Ember-cli -

i've been using yeoman ember generator past 1 month , now, i'd give ember-cli try. i'm sorry if question seem extremely newbie, i'm desperately need explanation.

i run generator , launch app, works fine.

ember new my-new-app ember server

but i'd know how

{{content-for 'head'}}

in app/index.html works?

when looking @ other examples http://www.ember-cli.com/#tutorials, none of them using particular helper? because using older version of ember-cli? why weren't using content-for helper?

i'm pretty sure ember.js doesn't have content-for helper in default, i'm guessing ember-cli wrote somewhere? , for?

also, when inspect element of my-new-app page, div tag of 'welcome ember.js' appeared @ body tag instead of head tag? how possible? {{mind-blown}}

( in app/index.html, {{content-for 'head'}} placed within head tag)

thank much help.

it added ember-cli based on this discussion.

here relevant code commit:

emberapp.prototype.contentfor = function(config, match, type) { var content = []; if (type === 'head') { content.push(calculatebasetag(config)); content.push('<meta name="' + config.moduleprefix + '/config/environment" ' + 'content="' + escape(json.stringify(config)) + '">'); } content = this.project.addons.reduce(function(content, addon) { if (addon.contentfor) { homecoming content.concat(addon.contentfor(type, config)); } homecoming content; }, content); homecoming content.join('\n'); };

ember.js ember-cli

spring - multi-module bean injection failure -



spring - multi-module bean injection failure -

i have 2 maven modules, api , impl. impl di based , has next code

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemalocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd"> <context:component-scan base-package="com.name.mongo.client.impl" annotation-config="true"/> </beans>

note: used annotation-config repositoryimpl class has @repository annotation

i have 3rd sample maven module spring-jersey based , has api , impl dependencies. spring-jersey webapp working fine tested sample classes. here class modified class accessing service

@component @path("/payment") public class paymentservice { @autowired @qualifier(value="mongorepositoryimpl") mongorepository mongorepositoryimpl;

but when test project modules autowiring fails , see exception

org.springframework.beans.factory.beancreationexception: error creating bean name 'paymentservice': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: com.name.mongo.client.api.mongorepository com.mkyong.rest.paymentservice.transactionbo; nested exception org.springframework.beans.factory.nosuchbeandefinitionexception: no qualifying bean of type [com.name.mongo.client.api.mongorepository] found dependency: expected @ to the lowest degree 1 bean qualifies autowire candidate dependency. dependency annotations: {@org.springframework.beans.factory.annotation.autowired(required=true), @org.springframework.beans.factory.annotation.qualifier(value=mongorepositoryimpl)} @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotationbeanpostprocessor.java:326) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.populatebean(abstractautowirecapablebeanfactory.java:1204) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:538) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:476) @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:302) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:229) @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:298) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:193) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.preinstantiatesingletons(defaultlistablebeanfactory.java:725) @ org.springframework.context.support.abstractapplicationcontext.finishbeanfactoryinitialization(abstractapplicationcontext.java:757) @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:480) @ org.springframework.web.context.contextloader.configureandrefreshwebapplicationcontext(contextloader.java:403) @ org.springframework.web.context.contextloader.initwebapplicationcontext(contextloader.java:306) @ org.springframework.web.context.contextloaderlistener.contextinitialized(contextloaderlistener.java:106) @ org.apache.catalina.core.standardcontext.listenerstart(standardcontext.java:4760) @ org.apache.catalina.core.standardcontext.startinternal(standardcontext.java:5184) @ org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:150) @ org.apache.catalina.core.containerbase.addchildinternal(containerbase.java:724) @ org.apache.catalina.core.containerbase.addchild(containerbase.java:700) @ org.apache.catalina.core.standardhost.addchild(standardhost.java:714) @ org.apache.catalina.startup.hostconfig.deploywar(hostconfig.java:919) @ org.apache.catalina.startup.hostconfig$deploywar.run(hostconfig.java:1704) @ java.util.concurrent.executors$runnableadapter.call(executors.java:511) @ java.util.concurrent.futuretask.run(futuretask.java:266) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617) @ java.lang.thread.run(thread.java:745) caused by: org.springframework.beans.factory.beancreationexception: not autowire field: com.name.mongo.client.api.mongorepository com.mkyong.rest.paymentservice.transactionbo; nested exception org.springframework.beans.factory.nosuchbeandefinitionexception: no qualifying bean of type [com.name.mongo.client.api.mongorepository] found dependency: expected @ to the lowest degree 1 bean qualifies autowire candidate dependency. dependency annotations: {@org.springframework.beans.factory.annotation.autowired(required=true), @org.springframework.beans.factory.annotation.qualifier(value=mongorepositoryimpl)} @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredfieldelement.inject(autowiredannotationbeanpostprocessor.java:542) @ org.springframework.beans.factory.annotation.injectionmetadata.inject(injectionmetadata.java:87) @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotationbeanpostprocessor.java:323) ... 26 more caused by: org.springframework.beans.factory.nosuchbeandefinitionexception: no qualifying bean of type [com.name.mongo.client.api.mongorepository] found dependency: expected @ to the lowest degree 1 bean qualifies autowire candidate dependency. dependency annotations: {@org.springframework.beans.factory.annotation.autowired(required=true), @org.springframework.beans.factory.annotation.qualifier(value=mongorepositoryimpl)} @ org.springframework.beans.factory.support.defaultlistablebeanfactory.raisenosuchbeandefinitionexception(defaultlistablebeanfactory.java:1261) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.doresolvedependency(defaultlistablebeanfactory.java:1009) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.resolvedependency(defaultlistablebeanfactory.java:904) @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredfieldelement.inject(autowiredannotationbeanpostprocessor.java:514) ... 28 more

the issue impl module using spring bean instantiation consuming or api module i.e. spring-jersey webapp or api not aware of context existing. how can create them aware of contexts , interact each other.

spring spring-bean

angularjs - angular directive scope: setting a default value -



angularjs - angular directive scope: setting a default value -

i'm creating datepicker directive, part of markup is:

<select class="form-control" ng-model="day" ng-options="day.nr day in alldays">

i'm trying define alldays in scope attribute this:

ehrapp.directive('datepicker', function() { homecoming { scope: { alldays: [ {'nr': 1}, {'nr': 2}, {'nr': 3}, (...) {'nr': 31} ] },

but doesn't work, fails "typeerror: undefined not function".

any ideas how accomplish this?

you defining value within scope attribute of directive configuration, you'd define isolate scopes directive uses. instead of doing there, either in link function or in controller function:

return { link : function (scope, element, attrs) { scope.alldays = [{nr : 1}]; } }

or

return { controller : function ($scope, $element) { $scope.alldays = [{nr : 1}]; } }

angularjs angularjs-directive angularjs-scope

html - Making a webpage automatically initiate an audio file download -



html - Making a webpage automatically initiate an audio file download -

i trying create page on site such when user lands on page sound file download initiated.

i attempted putting next code in between header tag

<meta http-equiv="refresh" content="1; url=myaudiofile.mp3">

however, doesn't start automatic download after 1 second, rather redirects user www.mywebsite.com/myaudiofile.mp3. essentially, result in sound beingness streamed opposed beingness downloaded.

how can modify code create mp3 file automatically download opposed having streamed?

note: reason why beingness done because there email goes out "download sound file" button. want url of button point page automatically download sound file without user having click on download button.

the web-server can configured handle *.mp3 files mime type downloaded.

instead of audio/mpeg mime-type can set application/octet-stream.

for apache can configure on per-directory basis using .htaccess file.

option 1)

<filesmatch "\.(?i:mp3)$"> forcetype application/octet-stream header set content-disposition attachment </filesmatch>

option 2)

addtype application/octet-stream .mp3

html download meta-tags url-redirection

c# - SQLite Connection or SQLite Async Connection -



c# - SQLite Connection or SQLite Async Connection -

i'm start using sqlite wp8 , article

i found there're 2 version of sqliteconnection here: async , non-async. while i'm using wp8, want utilize async version smooth performance, seem async-version class doesn't implement idispose ( can utilize using non-async version). solution should utilize here ?

i involve consider size of project , scope of it, illustration if little project utilize simple, non-async, it's less code , easier maintain, , of little operations happen in milliseconds.

if want high performance, go async, write code , improve user experience.

or maybe utilize async big operations , non-async little ones?

i believe it's different every project, , utilize mixed approach sometimes, that's imho.

c# sqlite windows-phone-8

powershell - Invoking functions from nested modules in a script module do not always trigger a module to autoload -



powershell - Invoking functions from nested modules in a script module do not always trigger a module to autoload -

if create manifest module nested modules, exported functions nested modules after first not appear in list of available commands , don't trigger module autoload.

they not appear when run "get-module -listavailable".

only exported functions first nested module appear in list of commands.

if explicitly import module, exported functions available.

in illustration below, update-legacyservices not available until module has been explicitly imported.

the way can create work rename module files end ps1 instead of psm1 , include them in scriptstoprocess, seems bad idea.

module manifest (psd1)

@{ # script module or binary module file associated manifest. # rootmodule = '' # version number of module. moduleversion = '1.0.0.1' # id used uniquely identify module guid = 'c11d6aca-d531-4d06-a732-5fb95113357f' # author of module author = 'luke' # company or vendor of module companyname = '' # copyright statement module copyright = '' # description of functionality provided module # description = 'mybudget developer powershell module' # minimum version of windows powershell engine required module powershellversion = '4.0' # name of windows powershell host required module # powershellhostname = '' # minimum version of windows powershell host required module # powershellhostversion = '' # minimum version of .net framework required module dotnetframeworkversion = '4.5.0' # minimum version of mutual language runtime (clr) required module clrversion = '4.0.30319.18444' # processor architecture (none, x86, amd64) required module # processorarchitecture = '' # modules must imported global environment prior importing module requiredmodules = 'bitstransfer' # assemblies must loaded prior importing module # requiredassemblies = @() # script files (.ps1) run in caller's environment prior importing module. scriptstoprocess = @() # type files (.ps1xml) loaded when importing module # typestoprocess = @() # format files (.ps1xml) loaded when importing module # formatstoprocess = @() # modules import nested modules of module specified in rootmodule/moduletoprocess nestedmodules = @('database\database.psm1', 'build\build.psm1') # functions export module #functionstoexport = '*' # cmdlets export module cmdletstoexport = '*' # variables export module variablestoexport = '*' # aliases export module aliasestoexport = '*' # list of modules packaged module. modulelist = @('database\database.psm1', 'build\build.psm1') # list of files packaged module # filelist = @() # private info pass module specified in rootmodule/moduletoprocess # privatedata = '' # helpinfo uri of module # helpinfouri = '' # default prefix commands exported module. override default prefix using import-module -prefix. # defaultcommandprefix = '' }

module 1 (build\build.psm1)

function update-legacyservices() { echo "update" } export-modulemember -function update-legacyservices

module 2 (database\database.psm1)

function get-backup($directory, $name) { echo "get-backup" } export-modulemember -function get-backup

i had line in .psd1 file

functionstoexport = 'funcfrommainpsm1 funcfromsecondpsm1'

which inferred line generated powershell tools visual studio:

# functions export module functionstoexport = '*'

this caused get-module -listavailable show looked right thing

script 1.0 mymmodule funcfrommainpsm1 funcfromsecondpsm1

but when called funcfromsecondpsm1 i'd "the term 'funcfromsecondpsm1' not recognized...".

so changed export line to

functionstoexport = @('funcfrommainpsm1', 'funcfromsecondpsm1')

and works. can phone call both functions after module loads, whether via autoload or import-module.

i have tried , without both modulelist , filelist set. create no difference.

powershell