Posts

Showing posts from January, 2015

Service to keep checking WIFI to turn ON all the time on android using service -

I write a service with WifiManager class to find out if Wifi is turned off or not If my code stops, the current service is turned on, now I have used a utility which manually turns off WiFi when the service is already running. I want to see the service whether Wi-Fi is turned on or not. If this does not turn on, my code is as follows. public int onStartCommand (intended intent, int-flags, int startId) {mainWifi = (WifiManager) getSystemService (reference.wifi_SERVICE); // Check for wifi is disabled if (mainWifi.isWifiEnabled () == incorrect) {// if wifi is disabled, enable it mainWifi.setWifiEnabled (true); } Wi = mainWifi.getConnectionInfo (); Toast. Make Text (this, "Network" + wi.getSSID (), Toast. LNNHHLLG). Show (); Return START_STICKY; } Can anyone tell me how to do this work What I am now seeing is that which I have ever put in on the internet commencement, only once the service started But I want to run it all the time at all times and want to do some operat...

wordpress - PHP Unable To List Files From URL Directory -

I'm trying to get a listing in a WordPress template from a list of CSS files. I am trying to work with some luck to work down what am I doing? $ path = parse_url (TC_BASE_URL. 'Custom / CSS /', PHP_URL_PATH); $ Dir = $ _SERVER ['DOCUMENT_ROOT'] $ path; $ Dir = str_replace ("/", "\\", $ dir); $ Dir = str_replace ("\\\\", "\\", $ dir); If (is_dir ($ dir)) {if ($ dh == opendir ($ dir)) {while (($ file = readdir ($ dh))! == false) {echo "filename: $ file: filetype:" . File type ($ dir $ .file) "\ N"; } Monkey ($ dh); } Else {echo $ dir is not 'Open'; }} And {echo $ dir is not a directory '; } I have the following tests: & Lt ;? Php $ ruta = "c: \\ www \\ wp-content \\ theme \\ custom \\ custom \\ css \\"; If (is_dir ($ ruta)) {if ($ dh = opendir ($ ruta)) {while (($ file = readdir ($ dh))! == false) {echo "file name: $ file: file type: "File type ($ Roota $.)...

git - Command Line custom function -

I was playing around my terminal and I wrote the following basic function in my .zshrc file: function gspecial () {git merge $ 1; Rspec; } With the above, when working with different branches, I can go to my master branch and call GSP with a specific branch, Will be merged with the given branch and immediately run the test. Calling: git (master) $ gspecial development It does this sequence: git (master) $ git merge development git (master) $ rspec My question is, how can I Periphery The following scenario for expanding the universe: git (development) $ git checkout master git (master) $ git merge development git $ rspec Many thanks! Listen to surveillance @ devnal or he can swallow you ... but not seriously , That's right: function gspecial () {git checkout $ 1; GIT $ 2 merge; Rspec; } then: $ gspecial master development will do this: $ git checkout master $ git merge development $ rspec Tip: Use more descriptive names like ...

javascript - Insert the id of a div var (by searching its exact class name) into an input value -

मेरे पास निम्न HTML कोड है: & lt; div class = "stats" id = "sdell_ac359636_ert_stats" & gt; & Lt; var class = "time" id = "sdell_ac359636_time" शैली = "रंग: लाल; फ़ॉन्ट-आकार: 18px;" & gt; 00: 00 & lt; / var & gt; & Lt; var class = "user" id = "sdell_ac359636_select" शैली = "प्रदर्शन: कोई नहीं;" & gt; कुछ भी & lt; / var & gt; & Lt; div class = "user_who_left" & gt; & lt; स्पैन वर्ग = "बायां_लिस्ट_अगर_युजर" & gt; कुछ भी & lt; / span & gt; & lt; / div & gt; & Lt; / div & gt; वर्ग "उपयोगकर्ता" तय हो गया है, आईडी प्रत्येक पृष्ठ में बदलता है, लेकिन यह हमेशा "_select" के साथ समाप्त होता है मेरी वेबसाइट नहीं है, इसलिए मैं उसे नियंत्रित नहीं कर सकता। मैं निम्नलिखित जेएस फॉर्म के डिफ़ॉल्ट मान में id "sdell_ac359636_select" को डालने के लिए क्या करना चाहूंगा: var idDivText = t...

php - How to input value from buttons and checkboxes to textarea -

I have looked around the site, but I have not got anything I want. Anyway, I'm a self-taught HTML / CSS person most of my experience is using Wordpress, but by any means, I'm trying to create an interactive site (unfortunately not in WordPress), which is a large set of code Uses the form to make. & lt; Form id = "drawing" & gt; & Lt; Input type = "radio" name = "draw" value = "normal" & gt; General & lt; Br / & gt; & Lt; Input type = "radio" name = "draw" value = "custom" & gt; Custom & lt; Br / & gt; & Lt; / Form & gt; & Lt; Input type = "submit" value = "print code" & gt; & Lt; Br / & gt; & Lt; Text area & gt; & Lt; / Text field & gt; I want to print the text taken from the radio button in text in this manner: Droppie = (here the value), What is the easiest, lighter? The way to go about? I have se...

c++ - Undefined reference Linker error to a variable already in the same file -

I am making the code for linked lists and when I try to compile with G ++, Getting a strange error. /cygdrive/c/Users/Blas/AppData/Local/Temp/ccEcixjp.o: In function `node ': /cygdrive/c/Users/Blas/Documents/blas.borde/ Trunk / cs170 / lab6 / list.h: 50: 'CS170 :: ListLab :: node :: node_elive' /cygdrive/c/Users/Blas/Documents/blas.borde/trunk/Cs170/Lab6/List.h Undefined Reference: 50: 'undefined reference to' CS170 :: ListLab :: node :: node_elive '/cygdrive/c/Users/Blas/Documents/blas.borde/trunk/Cs170/Lab6/List.h.5 Undefined reference:: ListLab :: ~ Node :: nodes_alive ' And this is my code named place CS 170 {namespace listlab {struct node { Int number; // data part node * next; // Fixed int node_live for the next node in the indicator list; // The number of nodes is still / around / non-default constructor node (int value) {number = value; Next = 0; Nodes_alive ++; // a node was created} // destroyer ~ node () {nodes_alive--; // one node wa...

python - Multiple Broken Axis On A Histogram in Matplotlib -

Image
So I have some data that I want to plot through the frequency density (unequal square width) histogram, and some Search through online, I made it so that I could get permission to do this. NMP import as import matplotlib.pyplot plt plt.xkcd () freqs = np.array ([3221, 1890, 866, 52 9, 434, 494, 382, 92, 32, 7, 7]) bins = np.array ([0, 5, 10, 15, 20, 30, 50, 100, 200, 500, 1000, 1500]) widths = bins [1:] Cans [: - 1] Heights = Frox. Slipes (np.float) / width plt.exlable ('cost in pounds') plt.ylabel ('frequency density') plt.fill_between (bins.repeat (2) [1: -1], heights .repeat (2) , Facecolor = 'steelblue') plt.show () As you can see, this data is spread over thousands of x axis and on the y axis (density) small data ( & Lt; 1) leads to huge data (> 100). To solve this I need to break both the axes. I have found so far to help, which is the hardest to use, will you be able to help? Thanks, AJ. You can use the plot only once. Setting xtick l...

c++ - Simple class constructor initialization errors -

Using the name of the placeholder in the following code pieces can someone please explain that I have C 2065 (Apple undeclared identifier) ​​and C 2228 .weight / .color / .price left) should be square / straight / union? Definitely if the variable matches the declaration, then it should proceed with the loop without any problem. int variable = (algorithm that creates a number); If (variable == fixed number) {Falbug 1 apple (40,50); } Else if (variable == another fixed number) {fruitbag2 apple (25,50); } Else if (variable == another fixed number) {fruitbag3 apple (30,50); } While (position) {while (another condition) {apple.weight (); Apple.colour (); } Apple.price (); } I tried to minimize this problem so that there is no benefit in the same errors: int variable = (algorithm that creates a number ); If (variable == fixed number) {Falbug 1 apple (40,50); } Else if (variable == another fixed number) {fruitbag2 apple (25,50); } Else if (variable == another fixed number) {frui...

jquery - Bootstrap 3 - Control a Nav Panel with 2 Identical Nav Tabs - Update active class for both -

I have bootstrap tabs, but there are several nav tabs to control a nav pane - a set of navs at the top Tabs, and under the tab panel. The code below works if I click on Navigation-Tab 2, but does not update Nav-Tab 1 with the correct 'Active tab'. Does anyone have any idea how to achieve this? Thanks! & lt ;! - Navigation tab 1 - & gt; & Lt; Div class = "concentrated pills" & gt; & Lt; Ul class = "nav nav-pills" & gt; & Lt; Li class = "active" & gt; & Lt; A href = "#a" data-toggle = "tab" & gt; & Lt; Span & gt; Style & lt; / Span & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# b" data-toggle = "tab" & gt; & Lt; Span & gt; B & lt; / Span & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# c" data-toggle = "tab...

css - Bootstrap UI with ASP.NET MVC. Are there any ready made templates available? -

I am working on super simple website and should look good (clean and professional). Was thinking about using bootstrap. Are there templates prepared for ASP.NET which are based on Bootstrap framework? Just to confirm - The aim is to create a super-simple website to look professional and clean, so special UI design is required. I would have been good if there was available, but unfortunately all existing MVC web templates would be ready. , And this is it. However, based on the version of MVC you are working, NuGet packages are available: Some of these And using online examples, you should be able to run very quickly.

Is there a way to make a blocking call in Node.Js? -

The program is sometimes difficult in the program, using continuous (callback) rather than sequential execution models. Can nodes call? Yes, you can do this for example fs.readFile () instead of fs.readFileSync ( ) Can read a file with. Each library typically offers a XXXSync method for synchronous / blocking methods. But you should not often use the sync method Remember that Node.js uses single threads of execution for JavaScript code. If you block this thread, you block it for everyone (Unlike C # / Java, where a new thread will be created for each request.) If the asynch approach is for you Too much, you would want to use other platforms (Ruby, Python, PHP).

vb.net - Empty row doing insert -

I have tried to enter a record with a new table and show the message below: "Input String was not in a correct format." This is my code: dim max_like string = "maximum of the table (reference_number) Select "slow outputs" as the new datativus dim dsi is in the form of new data. Dataset obj_ Populate_dataset_Access_accdb_test (ds_, max_) Integer = Convert as Egg Ref. ToInt32 (ds_.Tables (0). Roov (0) .emem (0) .ostring) Ref = ref The table columns are intact with zero. If the table is empty then the MAX taps will be returned. This means that your Dataraova will have DBNull.Value, whose toasting method gives the string. The empty, which can not be clearly converted into integers, test for the first tap, using Datarou's own isole method. Of course, you can always do as many thousands of developers around the world and make the database sequential id for you.

c# - Setting Row Color based on Cell Contents in .NET CF DataGrid? -

I do SO (and) and for this as well as "ol" college myself "I can easily I want to change colors by getting it easily, or whatever it may be, I can not seem to apply the argument when my criteria is based on the contents of a cell. It is trying to accomplish that if the content of cell [3] = "IN" then cry backlighter = color. Green . I have read through this blog post () and it is downloading one () as well as the example code given on both. Override the paint method in your datagrid column, read the cell value Object cellData = Base. Property descriptor.get value (source.list [row noam]); Add your logic to determine what color your background should be, then call the base color, call the base class painting method, which you want to use the background color. Are

sed not working as intended in bash script -

I am trying to change some strings in the file with sed and I am getting a strange error. Here is the script ... #! / Bin / bash template = / etc / nginx / site template if [-f $ template]; Then echo -nother "template $ TEMPLATE was not found." Function Function Usage {echo "Usage: DOMAIN SITEDIR" echo "Example: createsite.sh test.com / var / www / sites / site"} if [-z $ 1]; So if [-z $ 2]; Then use the Fast SDOMAIN = $ 1 SDIR = $ 2 if use [-f / etc / nginx / sites-enabled / $ SDOMAIN]; Then the echo "The site already exists!" SCONFIG = / etc / nginx / sites-enabled / $ SDNN CP $ template exit $ SCONFIG sed -i -e "/% DOMAIN% / $ SDOMAIN / g" $ SCONFIG sed -i "s /% SITEDIR% / $ SDIR / G "$ scanning mkdir $ sdir zone john: www- data $ sdir r-x, nrwx, g + rx $ sdir ngn -t; Then reload the NGN-S "Run nginx reloaded with new site" file is running it produces low output, and I'm not completely sure why me ...

html - How to skip HTML5 form validation in safari? -

I want to skip verification on URL input / form in Safari. Specifically in Mobile Safari What I can see about it is not supported in Safari By knowing this, how can I recognize the URL input and / or the entire form Can I leave (I can switch it to a text input, but I want that the URL keyboard gives you iOS) You can easily disable URLs by using a slice of JavaScript like below: function hesitate to reach things understandable for your program. For example, onload. & lt; Body onload = "changeInputType ()" & gt; & Lt; Form action = "#" & gt; URL: & lt; Input type = "url" id = "urlInput" /> & Lt; Input type = "submit" value = "submit" /> & Lt; / Form & gt; & Lt; Script type = "text / javascript" & gt; Function changes InputType () {if (Brasrs Safari ()) {var urlTextBox = document.getElementById ( "urlInput"); UrlTextBox.type = "text"...

sqlite3 - IntegrityError in django mptt - column not unique -

I have a problem saving a form in the Django app. I will call a model called 'Model' by the name 'Dataset'. I want to create a model called 'Image', both of which are MPT models. Model Class Image (MPTT Model): Name = Model. Defiled (max_length = 50, exclusive = true) parent = TreeForeignKey ('self', null = true, empty = true, related_name = 'children') DEF __unicode __ (self): return self.name class dataset (MPTTModel) : Name = models.CharField (MAX_LENGTH = 50, unique = true) image = TreeForeignKey (image, void = true, empty = true, unique = true, related_name = 'image') def __unicode __ (self): back self Name class MPTTMeta: parent_attr = 'image' When I try to save a dataset, I get a integrity error: IntegrityError At / associate / column image_id is not unique Request method: Get Request URL: http://127.0.0.1:8000/Assistant / Django version: 1.6.2 Exception type: IntegrityError exception value: column image_id...

processing drawings with real measurement values -

Image
मैं चित्र में दी गई एक स्केच बनाना चाहता हूं; क्या कुछ स्क्रीन आकार और रिज़ॉल्यूशन के लिए ए 4 साइज़ स्केच बनाना संभव है यदि हां, तो मैं इसके लिए मूल्यों की गणना कैसे कर सकता हूं क्योंकि जैसा कि आप जानते हैं कि प्रसंस्करण का आकार () विधि का उपयोग करता है और आकार के लिए मान पिक्सल नहीं हैं सेमी या मिमी इस प्रकार, मैं 8 सेमी लाइनों को आकर्षित करना चाहता हूं और जब भी उपयोगकर्ता लाइन प्रसंस्करण के कुछ बिंदु पर क्लिक करता है तो वह सेमी में केंद्र बिंदु (लाल डॉट) तक दूरी दिखाएगा। मैं इन चीज़ों को पिक्सेल के अनुसार कर सकता हूं। फिर भी मैं कैसे इन मानों को सेमी या मिमी में परिवर्तित नहीं कर सकता। जावा प्यारी प्रिंट-ओवरराइड "> आयात करें java.awt.Toolkit; पूर्ण संकल्प = Toolkit.getDefaultToolkit ()। GetScreenResolution (); Println (संकल्प); हालांकि, पता चलता है कि यह अविश्वसनीय है यदि आप इसे केवल एक मॉनिटर पर चलाना चाहते हैं, तो आप मैन्युअल रूप से इसकी गणना कर सकते हैं: प्रोसेसिंग चौड़ाई = क्षैतिज रिज़ॉल्यूशन (# पिक्सेल) / स्क्रीन चौड़ाई (सेमी) * पृष्ठ चौड़ाई (सेमी) ...

vba - Character encoding in vb6 -

I have an application that stores txt, words and PDF files, then it displays the document to the user when The visual option is selected. We use the following code to convert Unicode string into an array of bytes. aANSISString = StrConv (VerToInsert.FileBuffer, vbFromUnicode) The document is seen by the default application for that particular document type. Like .doc files for Microsoft Word and so on. The problem I face is when the system locale changes to "non-English", for example Arabic (code page 1256), the data is corrupted and not view-enabled. But once system locale is converted into English, everything works fine I do not have to cope with the problem of txt files. Someone can tell me the reason or on a reference page Can indicate. Adding a comment to Bob 77 - About Office Dev Center Document Third Parameter (LCID) : LCID - Optional Locale ID, if system is different from locale (system locale is default.) When you do not specify an LCID, the...

python - How can i implement audio video streaming with RTMPy -

How have I searched for a guide on every side and can not find anyone Can anyone ever get an original with RTMP Audio / Video Streaming is Made? Someone gives me thanks in the right direction Thanks Based on the comments below; I have to broadcast from the camera to the flash and publish the connected client. Apart from this, there is a book in which you can recommend that the basics / rtmp, streaming, audio / video etc. teach the advanced. I always lost so much when I read some articles about streaming.

Having trouble setting up a custom java font -

Java fonts are about to win. Here's my current coding, it's just an easy way to font from the file, then it comes back, but I'm missing something, I do not know ... can anyone help ? Create a private font font () {try {URL FontUrl = getClass (). GetClassLoader (). GetResource ("Res / Fonts / aesysmatt.ttf"); Font mFont = font.create font (font. TRUETYPE_FONT, fontUrl.openStream ()); . GraphicsEnvironment.getLocalGraphicsEnvironment () registerFont (font); Return mFont; } Hold (font format exposure | IOException e) {e.printStackTrace (); } Return tap; } Here are my errors that appear: Inequality on java.lang.NullPointerException. Charteration CollardButton.Courtfont (Colorful buttons. Java: 21) on inequality. Character Creation. Collated Button & Lt; Init & gt; (Colorful buttons.Java 37) On inequality. Character Creation. StartInine Interlise (StartScreen.Javaah: 93) On Inequality Character Creation. StartScreen & Lt; Init & gt; (Star...

Use URLbar to change textbox value? (JavaScript maybe?) -

By any means can I use the URL bar to change the value of a text box (text)? I can type "javascript: alert (document.lastModified)", and it runs just fine - how can I run some javascript "Change the value of text text for X"? Javascript: document.getElementById ('IDOFTEXTBOX'.) Price = 'Some';

java - Exception in Running maven -

I imported from the example how the storm book was used and when I run it I get an exception when executing this INFO] Java class. Null 0 I used this command in the terminal mvn -f pom.xml exec: java -Dstorm.topology = TopologyMain Code: Import Spot. Word Reader; Import backtype.storm.config; Import backtype.storm.LocalCluster; Import backtype.storm.topology.TopologyBuilder; Import backtype.storm.tuple.Fields; Import bolt Import bolt Wardenomizer; Public class topology {Main Static Virus Main (string [] AGR throws interrupted exposure {// Topology Definition Topology Builder Builder = New Topology Builder (); Builder.setSpout ("word-reader", new WordReader ()); Builder. Setball ("word-generic", new verdermlizer ()). Shuffle Group ("word-reader"); Builder. Setball ("word-counter", new word counter), 1) .FilidShowing ("word-normal", new field ("word")); // configuration configuration conf = new configuration...

php - How to better implement Like/Unlike System using mysql -

I am developing a uniform / contrast system using jquery, php, and mysql for my wordpress multizite. Basically, sub-sites contain posts and products, where users can like them and can not contrast them. My plan is to store the choice in a global table so that I use it to display the number of posts and likes for the main site and to use the most preferred posts / products and a different page for some type Can do In my mysql table naming, global_nank I have these columns. like_id | User_id | Blog_id | Object_id | Object_type | Date_added The example would be: like_id | User_id | Blog_id | Object_id | Object_type | Date_added 1 | 24 | 81 403 | Posted in | 2014-01-22 05:55:23 2 36. 29 | 108 | Products | 2013-02-26 12:23:10 In my jquery I use it as part: jQuery.ajax ({url : '/ Wp -content / plugins / plugname / like.php', type: 'post', data: {object_id: object_id, user_id: user_id, type: 'like', blog_id: blog_id, object type: object_type, cou...

pointers - Modifying a const int in C++ -

इस सवाल का पहले से ही एक उत्तर है: 8 जवाब 7 उत्तर निम्न कोड चल रहा है कि & amp; एक्स = ptr पता चलता है, तो कैसे x और * ptr बराबर नहीं हैं const int x = 10; Int * ptr = (int *) और; x; * Ptr = (* ptr) +1; Cout & lt; & lt; & Amp; एक्स & lt; & lt; "" & Lt; & lt; एक्स एंड एलटी; & lt; "" & Lt; & lt; Ptr & lt; & lt; "" & lt; & lt; * ptr; // आउटपुट: 0012 एफएफ 60 10 0012 एफएफ 60 11 सी ++ कार्यान्वयन केवल एक कार्यक्रम के काम अगर आप नियमों का पालन करते हैं आपने नियमों का उल्लंघन किया सी ++ कार्यान्वयन की संभावना इस तरह से हुई: क्योंकि x घोषित किया गया है const , सी ++ कार्यान्वयन जानता है कि इसका मान तब तक नहीं बदल सकता जब तक कि आप नियमों का पालन करो। इसलिए, जहां भी x का उपयोग किया जाता है, सी ++ कार्यान्वयन 10 की जांच के बिना परेशान किए 10 का उपयोग करता है कि x बदल गया है। क्योंकि * ptr एक गैर- const int को इंगित करता है, इसे स्टोर करता है और इसके बारे में पढ़ता है...

ruby on rails - Embedded object saves without error, but does not show in mongo. How can this be? -

I have: embedded tree . (Tree = t). Savings which gives correct returns and B.I.D. Gives a long BSID Then I do: How can this be? Also, I delete it Embeds_one, embedded_in relates and relieves it all by fixing it. What's going on? You can not do this If you have to create an object from the tree, then you have created a tree object There should be code by creating an object from the branch through: t = tree.first || Tree.Scent B = T. Branch Create

jquery - Javascript: how to use multiple play buttons in audio player -

So I use the two play buttons in my audio Trying> Player, this is because I have an audio player and other sidebar for example. Adheres to my JSField: Can anyone help? Inspection: I am using html5 audio and jquery / js on my player You are using the same ID twice twice. ID must be are unique and it works fine and since you are using jQuery, you can use it Can: window.player = $ ('# player') [0]; $ ('#pilpaus, #PlayPoZ2'). Click (function (if player is paused) {player.play (); this.innerHTML = 'pause';} and {player.pause (); this.innerHTMLHTML = 'play';}} )

c - While loop, value k will not increment -

Value is set on increments based on Kashmir, to evaluate l1, l2, l3, l4 K & lt; = G. Am i wrong doing ???? #include & lt; Stdio.h & gt; # Include & lt; Math.h> Int main (zero) {float C = 0, H = 0, x = 0, i = 0; Printf ("Projections # 2 - Juan Perez \ n"); Printf ("The power of the watt?");); Scanf ("% f", & amp; c); Printf ("The height of the lamp (in meters)?"); Scan ("% F", & amp; nbsp;); Printf ("Distance apart? (In meters?)"); Scanf ("% f", & amp; x); Printf ("Interval? (In meters?)"); Scanf ("% f", & amp; i); Printf ("power:% f \ n", c); Printf ("height:% f \ n", h); Printf ("Distance Distance:% F \ n", x); Printf ("Interval:% F \ n", i); Float k = 75, d = 0, e = x, f = 2 * x, g = 3 * x; Float L1 = ((C * H) / (PF ((H * H) + ((KD) * (KD)), 1.5))); Float L2 = ((C * H) / (PF ((H * H) + ((KE) * (K-E)), 1.5))); Float...

java - Why does the Math.round(float f) method in Android check for NaN? -

इस सवाल का पहले से ही एक उत्तर है: 8 जवाब मैं गणित एंड्रॉइड फ़्रेमवर्क में स्रोत और यह है कि राउंड () विधि कैसा दिखता है: सार्वजनिक स्थिर इंराउंड (फ्लोट एफ) { // NaN के लिए चेक करें यदि (च! = एफ) {वापसी 0; } वापसी (इंट) मंजिल (एफ + 0.5 एफ); } मैं सफलता के बिना पहले जांच के मुताबिक अपने सिर को लपेटने की कोशिश कर रहा हूं। कैसे च खुद से अलग हो सकता है? मैं किसी भी टेस्ट केस के बारे में सोच भी नहीं सकता जो यह किसी भी अलग-अलग बना देगा ... कोई भी विचार? कैसे खुद से अलग हो सकता है? यदि f एक नाएन है तो यह अन्य नाएन सहित सभी फ्लोटों से भिन्न के रूप में परीक्षण करेगा। यह परिभाषा है से: "यदि कोई ऑपरेंड नाएन है, तो == का नतीजा झूठा है, लेकिन इसका परिणाम है! = सच है। वास्तव में, परीक्षण x! = X सच है अगर और केवल अगर मूल्य X है नाएन। " मैं भी किसी भी परीक्षण मामले के बारे में नहीं सोच सकता जो यह किसी भी अलग होगा ... कोई विचार? एर, फ़्लोट। एनएएन।

path - python code works but not in p2exe executable -

The following code works on its own. I have made executable with py2exe which is not working. The script manages the process and some CSV files, if I put this code in the "dist" directory where executable is executed (hence it is processed in depth of CSV files), the code works; But in the same directory, executable does not work. import code import pandas pd as current_dir = os.path.dirname (os.path.realpath (__ file__)) directory = Os.path.sep.join (current_dir.split () Os.path.sep) [: - 2]) csvfiles = os.path.join (directory, '* .csv') for csvfile in glob.glob (csvfiles): file name = os.path.basename (csvfile) If '_sorted' is in the file name: Print "Remove this file" os.remove (csvfile) csvfiles = os.path.join (directory, '* .csv') glob in glob (csvfiles) for csvfile: filename = csvfile Df = pd.read_csv (filename) df = df [df ["ORGANIZATION"]! = "WPPL"] df = df.sort ('meeting time start') # New CSV file t...

java - vlcj EmbeddedMediaPlayerComponent does not resize to original size -

Image
Please take a look at the attached images. VLCJ hides the media component control button when the window is changed to the original dimensions after the maximum size. public class Players of the VLCPanel JPanel Extended {Private Embedded Media Player Companent Player Component; Public player VLCPanel () {this.playerComponent = ComponentStore.getCameraStreamer (); Set layout (new border layout ()); Add (this.playerComponent.getVideoSurface (), BorderLayout.CENTER); }} Public Class Camera Camera ControllPlan JPNL {Public CamerasBobControlPanel () Expands {Designgrid Layout Layout = New Design Grid Layout (This); . Layout.row () grid (expertDnLabel) .add (expertDnField); Layout.ro () Right (). Add (Startcombutton, StopCamButton, Start Laser Button, Stop Lager Button) .Fill (); }} Public class mainplayer container JPanel {public mainplayer container (set layout (new box layout (this, box layout.Y_ADIS)) is expanded; add the setborder (new blank border (3, 3, 3, 3)); Finally, i...

qt - how to define qml GroupBox title style -

groupbox {title: qsTr ("I want to change my style") layout.philwheat: true} I want to change the color or size of the title >

javascript - meteor poll on demand without subscribing -

Is there an easy way to use Meteor API to vote on demand without the upper part of real time membership? I do not want to use an API, I want to get it from DDP but excluding membership. Some data does not require that real time thanks! From the section of the meteor docs: The cursor is a reactive data Source for the first time when you retrieve a cursor's documents within a fetch, map, or a reactive computation (for example, a template or autoron), the meteorite will record dependency on the underlying data. Any change in the collection that changes documents in the cursor, will trigger a recycling. To disable this behavior, pass as the option to search {responsive: incorrect} .

javascript - Code modifying to identify category in html code -

OK, I need to modify the code that is able to identify which category of the user. Lose weight below 18.5 Normally 18.5 to 25 25-30 more weight More than 30 obesity And then finally I need to know which category the user is in and displays: This means that you (underweight, general, etc.) Thanks & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; BMI calculator & lt; / Title & gt; & Lt; Script type = "text / javascript" & gt; Function computeBMI () {// user inputs var height = get number (document.getElementById ("height"). Value); Varheightunits = document.getElementById ("heightunits") value Var weight = number (document.getElementById ("weight"). Value); Varweightunits = document.getElementById ("weightunits") value. // Convert all units to metric if height (= = "inch") height = / 39.3700787; If (weight components == "lb") weighs / = 2.20462; // Calculate...

python - Possible bug in Sympy library working with imaginary numbers when there are not any -

I tried to do the regula falsi method in Python using the Simpi library, though I There are some functions found that an issue is telling me that I am working with fictitious numbers. This is my code: DIF reagla falsa (Fx, P, P1, millennium, Iteracy Maxima): Fx = S (Fx) I = 2 q0 = Fx (X, p0) q1 = fx.subs (x, p1) while i & lt; = IteracionesMaximas: p = p1 - q1 * (p1-p0) / (q1-q0) if full (p-p1) & lt; Tolerance: Return p q = fx.subs (x, p) if (q ** q1) & lt; 0: p0 = p q0 = q other: p1 = p q1 = qi + = 1 return p I called it with the following arguments: Fx = 3 * x + sin (x) -2.71828182846 ** x, pO = 0.0, p1 = 2.0, millennium = .0001, iTreasinemaximus = 15 and fx = 2 * x ** 2 + x-1, po = 0.0, p1 = 1.0, tolerancia = .0001, iteracionesMaximas = 15 Sin ( X) As argument, I get NaN on some variables I am using the following traceback: Traceback (Most recent call final): File "../Prakcticas/python/ReglaFalsa.py", type Finance 16, & lt;...

javascript - createJS hit test works in tick event, but not function -

यह आउटपुट देता है: ली जियान शेंग लेबल हिट फ़ंक्शन टिक (घटना) {for (var i = 0; i & lt; allMyLabels.length; i ++) {var pt = allMyLabels [i]। GlobalToLocal (stage.mouseX, stage.mouseY); अगर (सभी माइलैबल्स [आई]। हिट टेस्ट (पीटी.एक्स, पीटी.आई)) {लॉग (सभी माइल लेबल [आई] .टेक्स्ट + "लेबल हिट"); }} Stage.update (घटना); } जब मैं इसे टिकटिक फ़ंक्शन से निकालता हूं, तो मुझे मिल जाता है: अनक्यूट टाइप एरर: विधि 'globalToLocal' कॉल नहीं कर सकता लेकिन, जैसा कि आप टिप्पणी से देख सकते हैं, allMyLabels [] खाली नहीं है, और इसमें एक createJS लेबल है ... cn_label = नया createjs.Text (itemObj.cn_name, "14px एरियल", "सफेद"); Cn_label.y = -45; // सभी लेबलों के माध्यम से लूप, प्रत्येक सभी MyLabels.push (cn_label) के लिए सबसे अच्छा चेक करें; HitTest फ़ंक्शन: फ़ंक्शन hitTest () {for (var i = 0; i & lt; allMyLabels.length; i ++) {लॉग ("लेबल : "+ सभी मील लेबल [आई] .text); // NOT अपरिभाषित, देता है: लेबल: ली जियान शेंग, जैसा कि अ...

java - Send data from a Service's thread to an Activity -

I saw how to send data from the thread declared in this activity in this activity itself, however, I do not know the service How to get data from thread and then send it to my activity. I'm a bit confused, do I still need to use Handler? Edit: I've got a solution! Let's do Yoga First of all, declare your handler within your activity and before starting your service, add some extra data by adding a new messenger linked to your handler. Public Class Home Activity ActionBarActivity extends {ConnectionDetector m_cd; Effect m_networkListenerService; Public handler m_handler = new handler () {@Override public void handleMessage // This is where the main activity thread receives the message {bundle bundle; If (msg.what == 1) // 1 Meaning: New Zealand {Bundle = msg.getData (); System.out.println (bundle .getString ("name")); } Super. HandleMessage (msg); }}; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); SetContentView (...

PHP Force IE to download file -

(download.php) ...... (अन्य HTML कोड) ...... $ filepath = '/storage/uploaded_files/'.$sisSysName; शीर्ष लेख ("सामग्री-प्रकार: आवेदन / बल-डाउनलोड"); हेडर ('सामग्री-विवरण: फ़ाइल स्थानांतरण'); हैडर ('सामग्री-स्थानांतरण-एन्कोडिंग: बाइनरी'); हेडर ('कनेक्शन: एलीवे'); हैडर ('समाप्ति: 0'); हैडर ('कैश-कंट्रोल: आवश्यक-संशोधित, पोस्ट चेक = 0, प्री-चेक = 0'); हैडर ('प्रागमा: सार्वजनिक'); हैडर ('सामग्री-विवाद: अनुलग्नक; फ़ाइल नाम =' '। बेसनेम ($ फ़ाइलपेथ)।' '' '); readfile ($ filepath); ...... (अन्य HTML कोड) ...... संवाद ने IE पर दिखाया था, लेकिन उस फ़ाइल की सामग्री HTML की सामग्री है (डाउनलोड करें। Php)। अजीब। ...... (अन्य एचटीएमएल कोड) ...... (लाइन 1) आप पहले से ही सामग्री को भेजने के बाद एक ब्राउज़र में हेडर भेज सकते हैं। दूसरे शब्दों में, हेडर सबसे पहले एक ब्राउज़र प्राप्त करना चाहिए।

jsp - Stuck in "error unsupported video type or invalid file path" using HTML5 in IE10 -

& lt; meta http-equiv = "एक्स-यूए-संगत" सामग्री = "आईई = किनारे, क्रोम = 1" & gt; & LT; html & gt; & Lt; शीर्ष & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; वीडियो आईडी = "वीडियो" नियंत्रण स्रोत = "$ {maps.url}" ऊंचाई = "598" चौड़ाई = "782" & gt; आपका उपयोगकर्ता एजेंट HTML5 वीडियो तत्व का समर्थन नहीं करता। & Lt; / वीडियो & gt; & Lt; / body & gt; & Lt; / html & gt; यह सही यूआरएल के साथ क्रोम में ठीक काम करता है। IE10 में, हालांकि, यह सही यूआरएल मिलता है लेकिन यह एक त्रुटि संदेश प्रदर्शित करता है; त्रुटि असमर्थित वीडियो प्रकार या अमान्य फ़ाइल पथ क्या कोई मेरी मदद कर सकता है को IE10 में भी सक्षम करने के लिए कोड में जोड़ने के लिए?

Travis-CI + Sauce Connect + Behat: Unable to get Internet Explorer to run tests -

I have a Travis-CI running Sauce Connect Beat Test Everything is fine to run if I use Sausage on Windows 7 I ask to use Firefox 26. But if I change the browser to Internet Explorer (Sausage Labs which is available on Windows 7 - which is available on IE8, IE9 and IE10), then it does not work On, it shows a long video, which does not display anything except is the initial start page for the WebDriver server. indicates that the error message shown at the top of the page is a screenshot of that browser: test was not seeing a new order for 90 seconds The time has expired. However, the screencast is longer than 13 minutes, so at least some commands were received, even if it could not work on them. Meanwhile, on behalf of Travis, I see this: 2014-02-18 04: 34: 13,124 - Request started: receive http: // ctldl .windowsupdate.com / msdownload / update / v3 / static / trustedr / en / disallowedcertstl.cab?f20efc77fc170e42 2014-02-18 04: 34: 13,211 - Received http://ctldl.windowsup...

batch file - using dos commads how can i match a substring from a variable? -

How can I match the sub-string with a variable by using the dos command eg: var = "Lost = 0 (0% loss) "I want to see if it contains" lost "in it I have already tried to get involved, but please suggest error throwing. Thanks in advance and have a nice day. -print resonance% name% | Search strings "string" & gt; Null if error level 1 (counterclock% is not "string" in%) and ("string" in resonance% filename%) Note that if you wish, all this one The line may be on if the lines are broken, then the order ) and ( ) must be on the same line as if and long before (

ios - How to rearrange UIImages? -

I am creating an app where I am adding some UIImages as a subview of UIview. Now if I delete the image, then I want to rearrange remaining UIImages. How can I get this? Edit This is what I have tried so far: for (int i = 0; I & lt; [Array count]; i ++) {id = Dictionary = [array object atindex: I]; UIImageView * imageView = [[UIImageView alloc] initWithFrame: CGRectMake (20, 100 * i + 100, 60, 60)]; [ImageView setbackgram color: [UIColor clearColor]]; [ImageView set tag: I + 1]; [Imagesresad object: image view]; [Self.view addSubView: imageView]; } Add and declare all of you to NSMutableArray NSMutableArray h file self.imagArray = [[NSMutableArray alloc] init]. [Self Imig array add object: [UIImage image W. Names: @ "Image 1 page"]; . . . . [Self. Imagare add object: [UIImage imageWithName: @ "image_N.png"]; and you can easily manage / delete the image by self.imagArray . Write this code if you want to delete any image [self...

ios - error in sqlite3 table creation 'NSInternalInconsistencyException' -

I am having trouble creating a table with sqlite3, I have created a database in code but it returns an error: ' NSInternalInconsistencyException ', reason:' Could not create table ' I tried to review the code to search for bugs but I did not find any code here. - (NSString *) file path {NSArray * paths = NSSearchPathForDirectoriesInDomains (NSD Documentation Directory, NSUIR IRMMask, Yes); Return [[Path ObjectOutIndex: 0] stringBuffing string: @ "dbfile sql"]; } - (zero) OpenDB {if (sqlite3_open ([[auto filepath] UTF8String], & amp; DB!) = SQLITE_OK {sqlite3_close (db); NSAssert (0, "Failed to open database"); } And {nslog (@ "database opened!"); }} - (Zero) createTable: (NSString *) with TableNamefield 1: (NSString *) field 1 withField2: (NSString *) field 2 withField3: (NSString *) field3 withField4: (NSString *) field4 {char * err; NSString * sql = [NSString stringWithFormat: @ "If the table is not present then create ...

javascript - Add multiple js files on runtime in asp.net c# -

I want to add a multiple .js file to my ASP.NET c # page at run time. Larrel Link 2 = New Lightral (); Verbal link 3 = new verbal (); Verbal link 4 = new verbal (); Link2.Text = "& lt; script src = \" Theme1 / js / jquery-1.8.2.min.js \ "type = \" text / javascript \ "/ & gt;"; Link3.Text = "& lt; script src = \" Theme1 / js / supersized.3.2.7.min.js \ "type = \" text / javascript \ "/ & gt;"; Link4.Text = "& lt; script src = \" Theme1 / js / supersized-init.js \ "type = \" text / javascript \ "/ & gt;"; Base.Page.Header.Controls.Add (link2); Base.Page.Header.Controls.Add (link3); Base.Page.Header.Controls.Add (link4); The best way to register a startup script is to: Example: string jsBlock = "& lt; script src = 'myJsFile.js' & gt; & lt; / script & gt; "; If (! Page.ClientScript.IsStartupScriptRegistered ("myJsInclud...

c# - can i cast metadata class type object to partial class type object? -

मेरे पास ऐसा कुछ है [मेटाडाटा टाइप (टाइपफ़ (मेटाडेटा_Course_application))] आंशिक वर्ग COURSE_APPLICATION {} सार्वजनिक वर्ग MetaData_Course_application {[आवश्यक] [स्ट्रिंग लैंग (15, न्यूनतम लैंग = 2)] सार्वजनिक स्ट्रिंग ENTRANCE_ROLL_NO {get; सेट; } सार्वजनिक int SESSION_ID {प्राप्त करें; सेट; } सार्वजनिक int ENTRANCE_ID {get; सेट; } सार्वजनिक Int64 COURSE_ID {get; सेट; } सार्वजनिक दिनांक समय DATE_OF_APPLICATION {प्राप्त करें; सेट; } सार्वजनिक Int64 RANK {get; सेट; } सार्वजनिक Int64 STUDENT_ID {get; सेट; } सार्वजनिक बूल FEE_PAID {get; सेट; } सार्वजनिक बाउल IS_CANCLED_BY_STUDENT {प्राप्त करें; सेट; }} और अब मैं चाहता हूं कि सार्वजनिक शून्य लागू करेंफोर्स (ईआरपी.मैटाडेटा_Course_application Coll) {COURSE_APPLICATION संग्रह = (COURSE_APPLICATION) coll; संदर्भ = नया ईआरपीडाटाकेंटेक्स्ट (); context.COURSE_APPLICATIONs.InsertOnSubmit (संग्रह); context.SubmitChanges (); } ऐसा कुछ ऐसा संभव है? अगर नहीं तो सबसे अच्छा संभव समाधान क्या होना चाहिए? कृपया पहले से धन्यवाद में सहायता करें ...

ios - Why some Outlets are made strong references even tough the documentation specifies that outlets should be weak reference -

Hello I'm a newbie for iOS programming. I know what a strong and weak reference is but I am confused that when I have to deal with the outlet, then what kind of reference is to use. After going through the documents, which states that Shops should generally be vulnerable, except in a nib file (or, in iOS, storyboard view) by the owner of the file. Except top-level objects should be strong. So after going through the above statement, what has been explained to me that the outlets we make are usually weak by default But while studying some tutorials, I have come across the code where people have declared an outlet as a strong reference for example, consider the following code: @interface AboutViewController: UIViewController @property (nonatomic, strong) IBOutlet UIWebView * webView; @end Code: @property (nonatomic, strong) IBOutlet UIWebView * webView; says that there is a UIWebView object in our VCI controller about but for us the UIView object he...

c# - unable to open the default mail client -

I am using the following code to open the default mail client using Tax (Process Mail Process = New Process ()) {ProcessStartInfo processInfo = new ProcessStartInfo (); ProcessInfo.FileName = string.Format (CultureInfo.InvariantCulture, "mailto: {0}? Subject = {1} & body = {2}", sendToAddress.Address, subject, message); ProcessInfo.UseShellExecute = True; ProcessInfo.WindowStyle = Process WindowStyle.Normal; MailProcess.StartInfo = processInfo; Process.Start (processInfo); } This process starts but does not show the mail client. In fact, when I'm using only localhost, this mail does not open the client, even though the process is starting She goes. When I am using Localhost: It works. Can I solve anything? This will start the default email client var process = @ "Mailto: Some.guy@someplace.com? Subject = an email and body = see attachment"; System.Diagnostics.Process.Start (process);

objective c - iOS compare NSUInteger to NSInteger -

I am trying to compare each other with numerical values ​​but compare me with the "integer comparison of different signals" (Aka 'inti') and 'nsuentengar' (aka 'unsigned' int). Which is rational, I do this;) But how can I correct this warning? This is the code that warns: if (page> = self.controllers.count || page & lt; 0) returns; Page -1 can therefore be an NSInteger but is counted on an NSUntiger. Instead of using NSINtegaer for page and -1, use NSUInteger and NSNotFound where you - 1. Then you are comparing the same type. Return (page & gt; = self.controllers.count || page = = NSNotFound);

C# Singleton Pattern -

I use singleton patterns in many places, sometimes the constructor does nothing, for the second time these things Getting Started I was surprised if my code was a way to set an abstract class to reduce duplication, i.e. single single statistic for public reading; In each class, only one base class I understand that the interface is not an option. I have tried to use the following (taken from); Public abstract class singleton & lt; T & gt; Where T: new () {static singleton () {} private static readonly T _ instance = new T (); Example of public static T ({return_instance;}}} The problem with this is that I can not override the manufacturer for those cases where I need to start things Is I trying to make it possible too? Or is it just what I am doing, can not I worry about a Best Singleton Class? I wonder if my code repeats There was a way to set an abstract class to reduce the value No, not as soon as you got an abstract class, you have a class that can be...

css - Header-footer-content layout with inline-block div taking remaining space (no float or overflow: hidden) -

I have (relatively) simple layout, with content of fixed header and footer devices, two "full height" divs In display: inline-block; . Using the left div is right for navigation and real content and in this overflow-y: scroll; . The problem is that I can not set the width of the correct div to fill the remaining space. I have tried to use the float (as the last resort), but the correct div was pushed downwards and, honestly, I would not like to use floats Is the remaining width possible in my scenario? Simple HTML structure: & lt; Html & gt; I do not want to hardcode the width of the very right div. & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & lt; Div id = "container" & gt; & Lt; Div id = "header" & gt; This is the header area. & Lt; / Div & gt; & Lt; Div id = "content" & gt; & Lt; Div id = "leftContent" & gt; & Amp; Nbsp; & Lt; / Div & gt;...

Java Recursive File Copy optimization -

I have a small application that copies the PDF files (subfolder) into a destination folder but it is very slow Works, I want to customize it. Can you help me Code: Public zero pdf foldercopy (file name, file file) throws IOException {if (src.isirectory ()) {if (! Dest.exists ()) {Dest.mkdir (); } String files [] = SRClist (); (String file: files) {file srcFile = new file (src, file); File destFile = new file (file, file); PdfFolderCopy (srcFile, destFile); }} And {if (Dest.exists ()) {System.out.println ("copy:" + src); // Use Apache IO copyFile method: FileUtils.copyFile (src, dest); }}} If every file already exists, it lasted for about half an minute. And about 5 minutes, if we need to copy 500 files. I will just try to do these Where -R means recursive and a process / bin / cp -r- -n is not overwritten meaning a good The chance is that the OS can speed it up, then you For this you should only new processbilder () .command ("/ bin / cp...

c# - Having Problems populating my checkedListBox -

So what's happening here when I press the event button1 to get data from my database I find it from System.Data.DataRowView . But when I press the button1 event then it shows the actual result and the correct data. I want to know how to fix this in a click of a button to display the actual data. Private Zero Button 1_Click (Object Sender, EventArgs e) {SqlConnection con = new SqlConnection (@ "SQLCONNECTIONSTRING"); Con.Open (); SqlCommand CMD = New SQL Commands ("Choose * to tbl_members", Con?); SqlDataAdapter Adapter = New SqlDataAdapter (CMD); SqlDataReader Reader = cmd.ExecuteReader (); Datatable dt = new datatable (); Dt.Columns.Add ("full name", typef (string)); Dt.load (reader); Dataset ds = new dataset (); Adapter.fill (ds); Checklist Button 1 Displaymilk = "full name"; Checklist Button 1 Value = "full name"; Checklistbox 1 Data source = databables [0]; CheckedListBox1.Enabled = true; CheckedListBox1.Refresh (); ...

php - Uncheck values in cakephp -

मेरे पास चेकबॉक्स निम्न हैं & lt; td & gt; & lt;? Php echo $ this- & Gt; फॉर्म- & gt; चेकबॉक्स ('purchase_owner_ccupied', ऐरे ('hiddenField' = & gt; गलत)); & gt; खरीदार स्वामी के कब्जे में & lt; / td & gt; & Lt; td & gt; & lt;? Php echo $ this- & gt; फॉर्म- & gt; चेकबॉक्स ('purchase_an_investment_property', array ('hiddenField' = & gt; गलत)); & gt; एक निवेश की संपत्ति खरीदें & lt; / td & gt; & Lt; td & gt; & lt;? Php echo $ this- & gt; फॉर्म- & gt; चेकबॉक्स ('purchase_land', ऐरे ('छिपाएफ़िल्ड' & gt; गलत));; & gt; खरीद भूमि & lt; / td & gt; जब मैं फिर जांचता हूं तो पोस्ट का मान नीचे जैसा होता है [purchase_owner_ccupied] = & gt; 1 [purchase_an_investment_property] = & gt; 1 [purchase_land] = & gt; 1 मान लें कि मुझे उन जानकारी को संपादित करने की ज़रूरत है जो खरीद_लैंड को अनचेक करने के लिए, जब मैं purchase_l...

How to get key of a value in python dictionary? -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब शब्दकोश मान सूचियां हैं: dictionary_1 = {"एबीसी": [1,2,3], "डीईएफ": [4,5,6]} मैं कैसे करूँ 5 की कुंजी प्राप्त करें, जो "DEF" से dictionary_1 में अजगर? आप रिवर्स शब्द बना सकते हैं: > gt; & gt; डी = {i: के लिए k, k for dictionary.items () में मैं में}} gt; & gt; & gt; डी {1: 'एबीसी', 2: 'एबीसी', 3: 'एबीसी', 4: 'डीईएफ', 5: 'डीईएफ', 6: 'डीएएफ'}> gt; & gt; & gt; डी [5] 'डीईएफ'

datetime - Converting R time column to specific strings -

I have a column that r represents the time in a data frame when I say something like strings on the column; & gt; Str (df2 $ time) factor w / 1441 level "", "00:01", "00:02", "00: 03", ..: 1086 10 9 11 11 and so on The thing is that I want to convert this column to string type as if the time is less than 12:00, then it should be modified in the string "Mooring" if time is 12:00 and 6:00 , Then it is "daylight" and so on. The first step I thought was to convert this vector to the data type column on the type of column, so I used the Cron function. I have typed the following command, & gt; Df2 $ time & lt; -chron (times = df2 $ time, format = c ('h: m')) Error in convert.times (times., Fmt): format h: m may be incorrect Additionally: Warning message: is.na (Outside $ s): is.na () non-applicable to "list" (vector) type "NULL" I guess I should add another parameter to t...

php - Get back to index file in cordova -

Image
I created an Android app using Cordova 3.0, in the index file of this app form, I local Host and then redirect it to a folder in which files created with php and jquery mobile 1.4 are created with window.location.replace and then work according to those files. Are there. The problem is that after reaching localhost , I want to use the index file to get the page to enter IP address in another IP address. Is there any possible way to do this ... ?? In the server side, I am using PHP and JQuery Mobile 1.4 Thanks in any way .. I do not think if you see window.location . Then open a new link in pop-up. You can do whatever you want in that pop-up and click on the button to return to your application. InAppBrowser looks like

c - What makes SPI faster than I2C protocol -

I have basic know-how of I2C and SPI communication as both synchronous protocols I wanted to know that SPI faster than ICC Why is it that if I am not using I2C, then we can use 400kbps, while in SPI we can get 10 Mbps also. Is this due to hardware change? This question was said to me in an interview .. Please correct me if I am wrong. Supporting many masters on the I2C is quite involved. I Simply just use the protocol, for each byte The reason for deliberate delays is to enter an ACK and bus. Apart from this, a maximum maximum bus rate, 100 kHz in original spec, 400 kHz is common today, additional 10 kHz low speed and 3.4 megahertz high-speed mode, 2012 estimate defines 5 MHz ultra fast mode. The SPI lot is simple, with no single bus protocol, no bus protocol is selected, and there is no maximum maximum bus rate if the distance is reduced You can go as fast as you can when you dare The difference between chips between the other is much faster than one inch.

io - Haskell - putStr vs putStrLn and instruction order -

इस सवाल का पहले से ही एक उत्तर है: 3 जवाब मान लें कि हमारे पास कम है हैकेल प्रोग्रामम: मुख्य = do putStr "2 + 2 =" x & lt; - readLn यदि x == 4 तब डाल एसटीआरएलएन "सही" और putStrLn "गलत" यह किस उत्पादन का उत्पादन करता है? 4 2 + 2 = सही अब दूसरे के पास: main = do putStrLn "2 + 2 =" x उस का उत्पादन 2 + 2 = 4 सही जहां बोल्ड 4 उपयोगकर्ता-इनपुट किया गया है। क्या हास्केल से परिचित कोई भी मुझे बता सकता है कि यह क्यों है? और मैं वांछित परिणाम कैसे प्राप्त करूं, जो 2 + 2 = 4 सही रेखा बफरिंग आउटपुट बफ़र "फ़्लिकेड" नहीं है जब तक कि पाठ की एक पूरी पंक्ति लिखी नहीं जाती। दो समाधान: मैन्युअल रूप से बफर फ्लश करें ( putStr बाद में hFlush stdout ।) बफरिंग बंद करें ( hSetBuffering stdout नो बफरिंग ।)