Posts

Showing posts from June, 2010

Unwanted comma-splitting when binding string (from inputText) to List in Spring -

I am working with the Spring Web, my JSP is an input text that I am typing in because I I can set input text. The problem is that if I have any input text like "yyyyMMdd hh: mm: ss, SSS", I found a list with two elements: "yyyyMMdd hh: mm: ss" and "sss", when I with all the text Just want to get one. Why? This is the default behavior of how binding works in the spring if you have only one input, and If there is a comma with value for that input, then the spring will change it into the list of values ​​for that attribute. Assume that you have: & lt; Input type = "hidden" name = "field" value = "hi, SO" & gt; Mapping list in the DTO for feature & lt; String & gt; The field will be set to ["Hi", "SO"]. To overcome this, you may get an extra free input just before those people with the actual value of that field. / p> & lt; Input type = "hidden" name = &quo

android - Video Uploading not working in YII -

I have a strange phenomenon. We are using Wi for web service with Android and iOS. Mobile has video uploading page. This UI has the video uploading code: $ file_path_image = ""; $ Directory = 'images / post'; $ file_path_video = ""; $ Model = new Tbl community (); If (isset ($ _ files ['video'])) {$ file = $ _FILES ['video']; Print_r ($ file); $ videoID = $ model- & gt; Match-random string (); $ video_obj = new video upload (); $ Result = array (); $ video_result_temp = $ video_obj- & gt; Upload ($ file, $ Video ID, $ directory); $ Result = cgsson :: decode ($ video_result_temp); If (isset ($ result ['position']) & amp; amp; amp; amp; amp; amp; amp; amp; $ result ['condition'] == 'failed') {$ result ['response'] = array; $ Result ['condition'] = 'failed'; $ This- & gt; _sendResponse (201, CJSON :: Encoded ($ result)); } And {$ file_path_video = Yii :: app () - & gt

How to get ajax post request value in Go lang? -

I'm working in Go . The following code to handle client requests. Package main import ("net / http" "fmt") func main () {http.HandleFunc ("/", func (w http.ResponseWriter, R * http.Request) { fmt.Fprintf (w, "& lt; html> gt; & gt; head & gt; & lt; script & gt; function createGroup () {var xmlhttp, number = document.getElementById ( 'phoneNumber'). value, email = document.getElementById ( 'emailId'). value; var value = {}; values.number = phoneNumber; values.email = emailId; if (window.XMLHttpRequest) {xmlhttp = new XMLHttpRequest ();} and {xmlhttp = new ActiveXObject ( 'Microsoft.XMLHTTP');} xmlhttp.open ( 'post', 'createGroup', true); xmlhttp.send (values.toString ());} & lt; / script & gt; & lt; / head & gt; & lt; body & gt; & lt; h1 & gt; group & lt; / h1 & gt; & lt; input type = 'text' name = 'phone number' id = '

R create ID within a group -

मेरे पास निम्न डेटासेट है: df & lt; -structure (list (idfam = c ("2010 7599 2996 1", "2010 7599 3071 1", "2010 7599 3071 1", "2010 7599 3660 1", "2010 7599 4736 1", "2010 7599 6235 1", "2010 7599 629 9 1", "2010 7599 9 903 1", "2010 75 99 11013 1", "2010 7599 11778 1", "2010 7599 11778 1", "2010 7599 12248 1", "2010 7599 13127 1", "2010 7599 14261 1", " 2010 7599 16280 1 "," 2010 7599 16280 1 "," 2010 7599 16280 1 "," 2010 7599 16280 1 "," 2010 7599 16280 1 "," 2010 7599 17382 1 "), AGED = c (45L, 47L, 24L, 46L, 46L, 44L, 43L, 43L, 43L, 16L, 43L, 46L, 44L, 47L, 43L, 16L, 20L, 18L, 18L, 43L))। नाम = c ("IDFAM", "AGED" ), पंक्ति.नाम = सी ("5614", "5748", "5753", "6864", "8894", "11761", "11884&quo

java - Change output without modifying code -

This question was recently asked in an interview that I participated. Public class MagicOutput {public static zero main (last string argv []) {System.out.println ("Hello, World!"); }} The main signature of the method (name, number and parameter type, return type) and implementation (body of method), The program was told the standard console message "Magic Output!" To output to I took about 2 minutes to answer. My solution was to put a static block there and essential string output. Fixed {System.out.println ("Magic Output!"); } But this works, it prints both magic outputs! and Hello, world! How do I output it to only Magic String? static {System.out.println ("magic output!"); System.exit (0); } or fun (depending on string implementation - works with openjdk 8): static {System.out.println (" Magic output! "); Try {field f = string.clash.gateclined field ("value"); f.setAccessible (true); f.s

synchronization - Synchronizing today's files from remote to local directory using WinSCP -

I need to synchronize the files from remote to local directories using the following command < Code> local synchronize "d: \ FTP @ out" / out This works fine, but is there a way to download files, which are today's date of creation ? Use today's one and use one. local-sync the filemask = "& gt; =% TIMESTAMP # yyyy-mm-dd%" "D: \ ftp \ OUT" / out < P> It requires WinSCP 5.6 and newer. Further reading: Question; WinSCP article.

How to make matlab help pop up in extra window? -

अगर मैं matlab आदेश विंडो में 'help' कमांड का उपयोग करता हूं, तो आउटपुट कमांड विंडो में भी पॉप अप होगा। क्या यह एक अलग विंडो में पॉप अप करने का एक तरीका है? मुझे मिल गया एकमात्र तरीका है यूआई से 'मदद' का उपयोग करना और फिर इसे कहीं डॉक करना है। लेकिन उस मामले में फ़ैसले सहायता पाठ बिल्कुल वही नहीं है और अधिक जगह लेता है .. चीयर्स, सेमज आप कमांड विंडो आउटपुट की बजाय एक चर में रीडायरेक्ट करने के लिए evalc का उपयोग कर सकते हैं: A = evalc ('सहायता मतलब'); तब शायद एक नया विंडो में प्रदर्शित करने के लिए msgbox का उपयोग करें? msgbox (ए); संभवतः पूर्ण समाधान नहीं है, क्योंकि 'हेल्प' आउटपुट में कुछ एचटीएमएल है और msgbox html को संसाधित नहीं करता है, लेकिन इसे केवल पाठ के रूप में दिखाता है। < / div>

How to load dynamic templates in meteor 0.8 version? -

I have the functionality dynamically load the template without using the router package I have two "Registration" and "Login" templates. When I click Login, I will open the login page template, along with the register. I went to solve this code, but did not work. & lt; body & gt; {{& Gt; Content}} & lt; / Body & gt; & Lt; Template name = "content" & gt; {{RenderTemplate}} & lt; / Template & gt; Content Assistant Template.content.helpers ({'renderTemplate': function () {new Handlebars Please help with the solution. Thanks in advance. When you upgrade to 0.8, you should have received a URL on a read-only page. Indicates templates no longer return functions and strings: This car It does not work: template> [session (get the current template)] ({dataKey: 'someValue'}) You can only return the template object. But you will need to change in any way before you call renderTemp

jquery - Using bootbox the show event is not fired -

I am not able to catch show events for the dialog for the dialog to bootbox.confirm to make some CSS adjustments. I tried things like the following but did not succeed: $ (document) .on ("show.bs.modal", function (event) { ...}); $ (Document) .on ("show", function (event) {...}); $ (Document) .on ("show", ".bootbox", function (event) {...}); This should be the bootbox 4.xx and Bootstrap 3.xx for you: var box = bootbox.dialog ({message: '', title: '', button: {}, show: wrong}); Box.on ("show.bs.modal", function () {warning ('this worked!');}); box.modal ('show'); or like it: $ (document) .on ("show.bs.modal", function (event) {...} );

Installing scikit-learn 0.15 (Python) -

I am currently using scikit-learning 0.14.1, which I used to use PIP. I'm running Python version 2.7.6 (64bit), using Canopy Anthot as my IDE. My operating system is OSX 10.9.2 Currently, I'm trying to install SyncKit-Learning 0.15. I cloned the repository in my home directory, put it in the CD, and typed 'Python setup.py install' in the command line I got an error saying: < code> error: 'User / ***** / Library / Anthot / Canopy_64 bit / User / Lib / Python 2 could not be deleted. 7 / site-packages / sklearn / __ check_build / __ init__.py ': deprecated with permission Anyone has advice on how to install a cykite I can learn about 0.15 ? Should I clone the directory in / user / ***** / Library / Enthought / Canopy_64bit / User / lib / python2.7 / site-packages / ? Thank you very much! There is a way to install many Python packages, without which the need for learning, without the help of ropes To learn how to install it locally, dr

java - How I solve this IndexError? -

My problem is that I need to convert this Java code into Python: Public stable byte x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0; The dragon is in the Java code Jaman told me that I can only put it in this line: <<> <<> x = [0] * 6 But now when I run the code I see it: Traceback (make the most recent last call): File "test.py", line 62, I have already seen other posts but I do not get it yet. It is part of the code: # - * - coding: UTF-8 - * - Import serial data OSEM = Baitier (5) print (datosom) detosom [0] = 65 print (detosom) X = [0] * 6 k = 0; Trama = 1; B = 0; C = 0; Conexion = True; Resp = 0 if (conexion): # {print ('conexion ON'), while (resp & lt; 200): print ('save data') while (c == 0): # {print ('what is c ? ') X [0] = datosOEM [k]; If (x [0] == 1): # {Print ('What's x [0]?') X [1] = Detos OEM [K + 1]; If ((x [1] and 1) == 1): # {print ('what is x [1]?') C = 1; #} #} Kash

mysql - Call to a member function query() on a non-object in PHP -

I have a little problem converting from mysql to mysqli, this error has been displayed in: Member Function on a non-object Call query () here is config.php: $ db = new mysqli ($ dbhost, $ dbuser, $ dbpass, $ dbname); If ($ db-> Connect_error) {trigger_error ('error:'. $ Db-> Connect_uper, E_USER_ERROR); } And here is the function in statistics.php: public function getTotalServerCount () {$ sql = 'SELECT * control from paneel.server'; $ Total = $ db- & gt; Query ($ sql); Counterpart $ total; } Please note that this function is contained in class in the name of statistics. I understand that the original code was done in a procedural way and I am trying to convert it to an object oriented way, but I have not yet found any solution. <<>> $ db is the property of the class that can < / p> $ total = $ this- $ db This function is undetermined in scope, & gt; Db- & gt; Query ($ SQL); You can optionally pass it as

dynamic - Android : Draw TextEdit(s) or TextView(s) when user enter number of them.[exp: 6 then draw 6 TextView] -

wants the user to enter the number of text edit or view text, and then attract them. For example, enter user 7, then let seven view text I knew that this is a suitable way, but in my progress I can not change the entire structure, I found this ARO here: tv = new TextView (this); And the error is: "Constructor TextView (new view .onclickList () {}) is undefined". I knew I had to: applies OnClickListener but I can not change PRGRM anymore. Is there anyway TextView (or any objct see) to create 'Layout' without refrence for XML? linerlight take = (linear line) searchVBIID (RIDMIL); For (Int i = 1; I Thanks, You are adding linear layouts to your last line ll.addView (tv); Must be

css - HTML role attribute causes content to not display -

नमस्ते वहाँ मेरे मुख्य सामग्री को परिभाषित करने के लिए role = "main" विशेषता का उपयोग कर रहा हूं पृष्ठ। समस्या यह है कि अगर मैं इसका उपयोग करता हूं: & lt; div role = "main" & gt; & lt; आलेख वर्ग = "पोस्ट-पूर्वावलोकन" & gt; & Lt; div class = "post-preview-img" शैली = "पृष्ठभूमि-छवि: url (आईएमजी / केपीईएनआरजी। जेपीजी);" & gt; & lt; / div & gt; & Lt; / लेख & gt; & Lt; / div & gt; मेरी सामग्री प्रदर्शित नहीं होगी? यदि मैं div टैग को भूमिका विशेषता से किसी भी समस्या के बिना प्रदर्शित करता है, तो इसे हटा देता है। मेरा सीएसएस इस प्रकार है: < कोड> div [भूमिका = "मुख्य"] लेख। पोस्ट-पूर्वावलोकन {चौड़ाई: 100%; ऊंचाई: 100%; मार्जिन: 0 पिक्स; पैडिंग: 0 पिक्सेल; स्थिति: रिश्तेदार; } div [भूमिका = "मुख्य"] लेख.post-preview div.post-preview-img {width: inherit; ऊँचाई: वारिस; पृष्ठभूमि का आकार: कवर; पृष्ठभूमि स्थिति: केंद्र; पृष्ठभूमि दोहराने: नहीं दोहराने; स्थ

c# - How is the Equals, GetHashCode, and Compare called from the following code? (Mystery) -

This code works but none of the methods listed how it does the actual call. It works but it seems to be about how magic is and why it works. I am never equal, or GetHashCode, or not the comparison but the code works. I do not call anything in the Constructor for the Employee Comparative Class. Which applies two interfaces. Question: Is this done automatically only when new keys are installed in the class? (Some items are not just fine) Public Class Employee Commander: IEqualityComparer & lt; Employee & gt ;, IComparer & lt; Employee & gt; Employee Compan: public child equivalent (employee X, employee Y) {return string.qualz (x.Name, y.Name); } Public athoshcode (employee obje) {back obj no Gatehashcode (); } Compare to public intervals (employee X, employee Y) {return string. Compiler (x.Name, y.Name); } class: using the system; Using System.Collections.Generic; Using System.Linq; Using System.Text; Namespace Console Application 1 {Class Program {Pub

Git couldn't find remote ref... but I can't either -

I have a strange problem with Git where I have 2013.rel25 , but I Do not know where it is. This is a branch that was merged and originally deleted earlier. C: \ Project & gt; GIT Bridge Fatal: Report Ref / Head / 2013.rel25 C: \ project & gt; git branch -a * Master remotes / root / head - & gt; Basic / Master Remotes / Basic / MasterC: \ Project> GIT Remote Plan Basic C: \ Project & gt; GIT Bridge Fatal: Report Ref / Head / 2013.rel25 How can I find out that this is referring to the dead branch which is neither locally present nor remote Is on And then, how can I remove or correct the context so that I can go back by dragging the local master from the original / master? Edit: My .git / config file specifically refers to a fret head, I think I have it manually I will remove from: [core] repositoryformatversion = 0 filemode = false bellow = false logallrefupdates = true simulink = false ignore = hide hidden = DotFiles = dotGitOnly [remote "origina

jquery - JavaScript / JSON Recursive Logic Issue using hasOwnProperty -

Here is JSON, the typical problem is the comment // currently does not parse var oarsObject = [{ "coordinateReferenceSystem": "26782,15851 & lt; - not a price", "positionReferenceType": "geogWgs84", "geogWgs84": { "latitude": { "value ".50018514607964015}," longitude ": {" value ": -1.587237735514361}," height ": {" value ": 0.0}}}, {" coordinateReferenceSystem ": {" value ":" Do 26782,15851 & lt - had a value "}," PositionReferenceType ": {" value ":" GeogWgs84 "}," GeogWgs84 ": {" latitude ": {" value ": 0.5001841257180204}," longitude ": {" value ": - 1.5869069927615211}, "height": { "Price": 0.0}}}, { "coordinateReferenceSystem": "26782,15851", "positionReferenceType": "geogWgs84", "ge

javascript - How to display HTML5 convert of a PDF on page without using an IFrame? -

I do not want to embed PDF directly because the PDF itself is indexed by Google, and is returned directly to Google search results (If PDF appears on the page, I can get a profit from ad click). As I have been suggesting elsewhere on the stack overflow, I have used this conversion tool: However, the output of outr Has not been indexed. Framed frames associated with a page with frames Tries to do it, but we do not guarantee that we will. From here: Speculation, what this probably means is that the content should be on the same domain ( To ensure that it is your content) and only once or a short time iframe Do you follow the above ideas and give Google enough time to index the content? For the disclosure, I am a developer at IDRsolutions. We have customers who are infrared with converted content and indexed by Google. You want to try singlefile mode which puts all pages in one file, so that Google Could easily enable index content on pages. If you hav

Using a loop to fill Word forms using Access VBA -

I'm using a code to open the Word document using the access code and then fill out the form field . I feel there is no problem with the code, but I want to change it so that the text box takes multiple IDs (one ID in each line) and displays the remaining code on each code, I split and others Looking for stuff, I have searched but I have no success. I tried to add code so that after saving this field it can automatically save the form, will it work with many IDs? Here is the entry I am using ATM: In the form of a slow app word word. Apps as the Dyke Doc Word Restart the error on the document Resume Err.Clear Set AppWord = GetObject (, "Word.Application") if Err.Number & lt; & Gt; 0 then set AppWord = New Word.Application End if set Doctor = appWord.Documents.Open ("C: \ users \" & Environ $ ("username") & amp; "\ Desktop \ Form.doc", , True) with doctor .formfield ("text4"). Results = DLookup ("[name]&q

javascript - ScrollTop on overflow:hidden list items -

I have a simple list, I want to reset the top position every time I click the click button. Although I do not seem to be able to get my scrolls to work and I do not understand why. This is a HTML: & lt; Div class = "list-controller" & gt; & Lt; Div class = "arrow-up" & gt; & Lt; / Div & gt; & Lt; ul id = "list" & gt; & Lt; Li id = "first" & gt; Item 1 & lt; / li & gt; & Lt; Li & gt; Item 2 & lt; / li & gt; & Lt; Li & gt; Item 3 & lt; / li & gt; & Lt; Li & gt; Item 4 & lt; / li & gt; & Lt; Li & gt; Item 5 & lt; / li & gt; & Lt; Li & gt; Item 6 & lt; / li & gt; & Lt; Li & gt; Item 7 & lt; / li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; Button class = "click" & gt; Click & lt; / Button & gt; CSS: .listContainer {height: 100px; Width: 100px; Backg

arrays - PHP find files on server which contain certain strings -

मेरे चित्र फ़ोल्डर में उदाहरण के लिए कुछ चित्र हैं: User12345_gallery0.png User12345_profilePic .jpg User12345_gallery1.png User12345_gallery2.jpg User54321_gallery0.png मैं जो करने की कोशिश कर रहा हूं वह उपयोगकर्ता को मेरे getimages.php से पास करता है और उस प्रयोक्ता की छवियां प्राप्त करता है। मैंने ऐसा पहले कभी नहीं किया है, इसलिए मैं वाक्य रचना के साथ संघर्ष कर रहा हूं। यहाँ है जो मैंने अभी तक किया है: यदि ($ _ अनुरोध ['उपयोगकर्ता']) {$ ext = array ('jpeg', 'png', 'jpg'); $ Dir = 'images /'; $ User = $ _REQUEST ['उपयोगकर्ता']; $ Images = array (); विदेशी मुद्रा ($ EX $ $ पूर्व) {अगर (file_exists (स्ट्रॉप्स ($ dir। $ उपयोगकर्ता। "_ गैलरी", "गैलरी"))) {// $ चित्रों में फ़ाइल जोड़ें ??? }}} मुझे यह देखना है कि फ़ाइल में उपयोगकर्ता नाम और "गैलरी" का उदाहरण है। मैं उसे कैसे कर सकता हूँ? क्या मैं सही रास्ते पर हूं? ग्लोब () और स्ट्रिपो () इसके लिए .. & lt;? php अगर ($ _ अनुरोध [&#

javascript - cannot recall original 'x' variable of function object? -

यदि कोई वस्तु है, उदा। यह: फ़ंक्शन सर्कल (a, y, r) चर a को बाद में फ़ॉर्म में कहा गया है: सर्किल (var1 + var2 ++, y, r); या। सर्किल (var1 + var2, y, r); xInc = 1; var2 + = xInc; सशर्त के लिए मूल 'ए' चर को याद करने का कोई तरीका है? पहले से ही वस्तु पैरामीटर की सीधे कॉलिंग की कोशिश की है जैसे: यदि (सर्कल.एक्सए> 40) {xInc = -xInc}; जब तक यह रचनात्मक है, तब तक मेरी वर्तमान समझ को टुकड़ों तक खींचने में संकोच न करें;] जब आप फ़ंक्शन कॉल करते हैं, तो आप इसे एक अभिव्यक्ति पास करते हैं। अभिव्यक्ति के मूल्यांकन का परिणाम उस चर में संग्रहीत किया जाएगा जो उस फ़ंक्शन पर स्थानीय होता है। < एक .? फ़ंक्शन के बाहर उपलब्ध नहीं होगा।

c# - UDP based client server model -

I am the new student of C # and I want to send a text file from the client to the server using the server . C#. But I do not know how to create a text file segment and it is sent to the server, please tell me a good solution to this problem Welcome to the overflow stack! Give it a shot Change string; text_to_send = Console.ReadLine (); Here are some files with IO bits.

c# - SqlCommand AddWithValue not working properly -

Image
I have the following block of code ... fieldCount always returns 0. I suspect that AddWithValue is not properly writing SELECT statement ... no idea why? As you can see from the watch, they are valid values ​​( field , fieldId ). Public Zero deleteRows (string table, string field, string field id) {int fieldCount; (SqlCommand command = new SqlCommand (String.Format ("SELECT COUNT (*) FROM {0} WHERE @field IN (@fieldId)",), {command.Parameters.AddWithValue ("@ field", using ) Farm); order. Parameter. Edvat Value ("@field ID", Field ID); FieldCount = (int) command. Exclute form (); } If (field count> 0) { There are two errors in your code: First of all, you do not use the parameter Can you name the name of a table or column so your field parameter is not valid in this context. Secondly, you can not use a parameter to express the full values ​​of these segments. Your example will translate the parameter @ field ID WHERE ...

java - Small addition to current code -

आयात करें java.util.Scanner; पब्लिक क्लास लाइनकॉन्टर {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {System.out.print ("पूर्णांक की रेखा प्रविष्ट करें"); स्कैनर हेलीकॉप्टर = नया स्कैनर (System.in); Int x = हेलिकॉप्टर.एक्सआईटी (); जबकि (हेलिकॉप्टर.hasNextInt ()) {System.out.println (हेलिकॉप्टर.एक्सआईटीआईएनटी ()); मैं जावा के बुनियादी ज्ञान सीखने वाले एक सीएस 1 वर्ग में हूं और एक त्वरित प्रश्न पूछना है, इस कोड पर कोई मुझे बता सकता है कि मैं इसे कैसे प्राप्त कर सकता हूं कि कितने पूर्णांक में टाइप किया गया? आपका समय लूप के ऊपर धन्यवाद घोषित करें: int count = 0; तब आपके समय में लूप का उपयोग गिनती ++; यह आपको 0 पर प्रारंभ करेगा और हर बार यह गिनती बढ़ता

android - Alert Dialog Message -

I am using a if-else statement if the username and password are correct So it goes to the next activity but if they are wrong then I have to display a warning dialog message and when I click OK, I want to return to this login page. I appreciate some help * This is my code, import android.os.bundle; Import android App Import android.app.AlertDialog; Import android.content.DialogInterface; Import android.content.Intent; Import android.view.View; Import android.view.View.OnClickListener; Import android.widget.Button; Import android.widget.EditText; Public class main activity is expanding on the tools OnClickListener {button button; Private editing text is anonymous; Private editing text passw; String uson; String pass; Override public null on @reate (bundle saved instainstate) {super.naught (savedinstenstate); SetContentView (R.layout.activity_main); Button = (Button) findViewById (R.id.login); uname = (EditText) findViewById (R.id.username); passw = (EditText) findViewById (R.

Getting Jquery-UI slider value while sliding -

I got a jquery UI slider and I want to show the slider value in the tooltip (in the slider handler) I'm unable to get the price until the slider is turned off, but I want to update the value when the tooltip is dragged to the slider. Is there a way to get the jQuery UI slider to the current position, not the value? slide {/ code> function $ ( "#slider") .slider ({slide: function (event, UI) {$ ('# value'). text (ui.value);}}); Example

What is the difference between JQuery and JQuery Plugin? -

I have heard that some people only call JQuery, while other JQuery plugin, when I googled, I actually understood the difference Did not get what they are like? Javascript is a collection of jQuery functions (usually called a framework or library) to write Makes easy (for most people) A jQuery plugin has some code which depends on jQuery to work. Therefore, if you use a jQuery plugin on your website, you will also need to include the jQuery framework, but there is no plugin required to do jQuery work.

android - Putting one imagebutton and one button side by side on FrameLayout -

I have a framelayout to show a Google Map, at the top left corner, I have an image button that throws an action Now I have to put a button on the right side. This is my layout because now it is, the Button Button has overlaped the image: & lt; Frame layout xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: tool = "http://schemas.android.com/tools" xmlns: map = "http: // schemas .android.com / apk / res-auto "Android: layout_width =" match_parent "Android: layout_height =" match_parent "tool: reference =". Empresas_Mapa "& gt; & Lt; Android: layout_height = "fill_parent" Android: layout_weight = "1" class = "com.google.android.gms.maps.MapFragment" android: id = "@ + id / map" Android: layout_width = "match_parent" Android: Scrollbar = "vertical" /> & Lt; Android: onDick = "OpenRuta" Android: src = "@ drawable

c++ - Derive the execution time growth rate (BigO) of the following code -

Performance time increment rate What is the big o of this code? zero doDiff (int set a [], int set [], int size a, int size b) {cut int MAX = 10; // validate setA and setB if ((size A == 0) & amp; (sizeB == 0) cout & lt; & Lt; "Both sets are empty" & lt; & Lt; Endl; And cout & lt; & Lt; "Symmetrical difference: {"; For (int i = 0; i gt; size -) if (set [size -1] == n set) is true; return false; } When I calculate the big o of this code, I end up with O (N * N * N) || O (n ^ 3) I'm not sure what the exact execution time increment rate for this code is, please help me. Thanks in advance This seems unfair To fill an answer with, but like the homework, when it sounds, I think that they are a better way of goal (which is for you to understand how it works): What is the "big-o" code of member ? This is important, because doDiff is very dependent on it. How often doDiff call member ? Li> If each

Converting heterogenous vector to array in C++ -

I am looking for a solution to convert a three dimensional vector into a three dimensional array. I can make a loop in order to copy the array content inside a three dimensional vector, but there is a grip: Vector is formed very odd 2D vectors. Here is the argument in the manufacturer of my frame: std :: vector & lt; Std :: vector & lt; Std :: vector & lt; Double & gt; & Gt; & Gt; & Amp; The first size is not a problem, the second size is the number of rows placed in a file, and the last size is always 2 (the number of data for each line) << class = "Lang-none prettyprint-override"> [dataset volume] [volume of lines] [data / row quantity] Addserie to use the freechart function ( In an XY plot), I need an array of 2D arrays, so I have a simple loop with LKR series I might add. I need to be able to get an array like every element of the first dimension of this array: dual data 1 [] [ 2] = {{10, 20,}, {13, 16,}, {7, 30,}, {1

c# - Collect garbage manually? -

व्यक्ति p = नया व्यक्ति ("बॉब", 10); पी = नया व्यक्ति ("जेम्स", 20); बाहर निकलता हूं मैं "बॉब" वाले उदाहरण के लिए एक संदर्भ खो रहा हूं अगर मैं सी # के जीसी पर भरोसा नहीं करना चाहता हूं, तो जेम्स को इंगित करने के लिए पी को फिर से असाइन करने से पहले मैं इस घटना को व्यक्तिगत रूप से कैसे हटा सकता हूं? बस अतिरिक्त कचरा से बचने के लिए। आप इसे बदलने के बजाय, उदाहरण का पुन: उपयोग कर सकते हैं: व्यक्ति p = नया व्यक्ति ("बॉब", 10); P.Name = "जेम्स"; पी। संख्या = 20; इस तरह से कोई भी बॉब उदाहरण नहीं है कि आप संदर्भ को ढीला करते हैं। हालांकि, कोड पठनीयता के लिए और संभावित बग से बचने के लिए आपको उस तरह से चर का पुन: उपयोग नहीं करना चाहिए।

c# - On WriteXml(fileName, writemode), Where is the fileName stored? How to create the file in the directory of .exe program? -

यह वास्तव में मेरे पास बहुत ही विषय है tabelaEC0.WriteXml ("config xml ", XmlWriteMode.WriteSchema); मैं जानना चाहता हूं कि config.xml फ़ाइल कहाँ संग्रहीत है, क्योंकि मैंने एक पूर्ण पथ प्रदान नहीं किया, कुछ लोग स्ट्रिंग से पहले @ का उपयोग करते हैं, ऐसा क्यों है? < P> मैं वास्तव में जहां .xml फ़ाइल बना सकता हूँ, जहां मेरे अंतिम प्रोग्राम के निष्पादन योग्य की निर्देशिका होगी? (Winforms) अद्यतन करें! अपडेट करें! > मुझे पता है कि यह काम क्यों नहीं कर रहा था, मैं प्रोग्राम के अंत में एक फ़ाइल को सहेजने की कोशिश कर रहा था निजी शून्य फ़ॉर्म 1_फॉर्मक्लाज़ (ऑब्जेक्ट प्रेषक, FormClosedEventArgs ई) {tabelaEC0.WriteXml (वर्तमान निर्देशिका, XmlWriteMode .WriteSchema); Application.Exit (); } इस मामले में यह फ़ाइल को सहेजता नहीं है (एक और बटन के साथ की कोशिश की और पूरी तरह से काम किया) तो समस्या है फार्म 1 बंद, कोई संकेत? < p> डिफ़ॉल्ट रूप से इसे आपके ऐप के स्टार्टअप फ़ोल्डर में लिखा जाना चाहिए। लेकिन अगर आप पहले से ही एक OpenFileDialog या SaveFileD

text - How to write to a textfile in c (with the intended functionality) -

I am trying to know the syntax for writing data (characters, integers and strings). I have studied the content of the following link and have written the following code. The purpose of the code is to collect the data in the text file as follows: 33 Hello 15 OK If I have the following inputs 33, hello, 15, ok and 0 make But after running the program, when I open it, the text file is completely empty. Is there someone who is skilled in storing data in a text document, which is doing me wrong, can give me some hint? Or if there is any other good tutorial you know? My test code is attached below [I can compile and run it without any problem, except that it does not do things which I hope: () Text string named name string_ring_input (char msg []) {fp = fopen} stdin_buff [20]; int stdin_int; FILE * fp; char * filename = "data.txt"; // (Filename, "w"); // opens the text file in write mode if (fp == NULL) {printf ("Unable to open file! \ N");} fse

sqlite - Dynamically adding options to a jQuery Mobile Optgroup -

I'm having trouble connecting an option dynamically I currently have an optog with some hardcode values ​​of HTML : & lt; select id = "opt1" multiple = "multiple" data-base-menu = "wrong" data-icon = "grid" data-iconos = "left" & gt; & Lt; optgroup label = "optgroup option" id = "op" & gt; & Lt; Option value = "option1" & gt; Option 1 & lt; / Options & gt; & Lt; Option value = "option 2" & gt; Option 2 & lt; / Options & gt; & Lt; / Optgroup & gt; & Lt; / Select & gt; I would like to add this option to my database dynamically. Currently I'm trying to do this like this: db.transaction (function (transaction) {transaction.executeSql (input input input input from input 'input = =' '', ' [], Function (transaction, result) {if (result! = Null & amp; result.ro! = Null) {for (var i = 0; i & lt;

Error using wget in c++ -

I have downloaded wget from gnuwin32 and I try to run commands in C ++ program using the system () function I am here. I have Visual Studio because I am using the Windows OS 2012 my compiler runs on wget command line, but when I put it in the system function is my error " 'wget' internal or external command, operative program or batch file Has not been identified in the form " Here is my code: #include & lt; Cstdlib & gt; # Include & lt; Iostream & gt; #include & lt; String & gt; using namespace std; int main () {string str = string ("wget ​​-O test.csv \" http: // ") +" somewebsitelink \ ""; Const char * x = str.c_str (); Cout & lt; & Lt; Str & lt; & Lt; Endl; System (x); System ("pause"); Return 0; } In fact, the visual studio is probably overwriting your normal path. Simply put the complete path manually: The system ("c: / path / wget ...");

arrays - Infinite For Loop - Javascript - Whats wrong? -

फ़ंक्शन सॉर्टएरेरे (सरणी) {var tempArray = []; var tempNum; var tempPos; के लिए (var i = 0; i & lt; सरणी.लांबी; i + = 1) {if (i = 0) {tempNum = parseInt (सरणी [i]); tempPos = 0; } else if (parseInt (array [i]) & lt; = tempNum) {tempNum = parseInt (सरणी [i]); tempPos = i; } console.log (i); }} यह एक सरणी लेना चाहिए और इसे कम से कम सबसे बड़ा करने का आदेश दिया जाता है, लेकिन यह भी नहीं मिल पाता है क्योंकि के लिए लूप अनन्त हो जाता है। मैंने क्या किया? आप i = 0 में सेटिंग कर रहे हैं पहले अगर, जिसका अर्थ है कि आप लूप से बाहर निकलने के लिए पर्याप्त नहीं होंगे I आप == के बजाय अर्थात्: का उपयोग करना चाहते हैं यदि (i = 0) {tempNum = parseInt (array [i]); tempPos = 0; } होना चाहिए यदि (i == 0) {tempNum = parseInt (array [i]); tempPos = 0; }

Passing SWI-Prolog Query from Java Program -

There is a query generated in the query variable by my Java program, I want to send SWI-Prolog to get its resolution. Displays the sub-code written in Java to communicate with SWI-Prolog. process P = new process builder ("C: \\ program files \\ swipl \\ bin \\ swipl-win .exe") start () .; BufferedReader process output = new BufferedReader (new InputStreamReader (P.getInputStream ())); BufferedWriter process input = new buffed waist (new output point water (P.getOutputStream ()); String command tset send = query; ProcessInput.write (commandToSend); But the SWI-Prolog window opens, but I'm not writing the procedure to send SWI-Prolog. Can someone recommend me the best way to do this? I also need to produce a query execution from SWI-Prolog in a file. Save your query to the external text file and from the command line (with the appropriate option set) swipl and perform the output redirect to another text file. Example: Save your query in QUERY. : - Stam

How to re-add/include the express/connect json() and urlencoded() parsers that were removed from connect? -

So connected people removed my urlencoder and json parser. There is absolutely nothing wrong with those intermediaries and I want to continue using them to send emails and retrieve form input data. Note: I am not working as a type or file uploader. Also, when I try to use Express / Connect.Urlencoded () and express / connect.json () and I'm wasting two hours by clicking on the Gitbill on the Gitb, the link provided to the error message Tried to go on I do not want a flyer file uploader. Without uploading the file, my normal form parser. Due to a faulty middleware, it does not mean to remove only two working middleware. In Express 4, all bundle middleware (except static) have been removed - however, you can still install. Through NPM: NPM install - side body-parser and its requirement in your app: var bodyParser = is required ('body-parser'); // ... app.use (bodyParser ()); For information about migrating from Express 3 to 4, contact this article: If you s

mysql - How do I generate ADD FOREIGN KEY statements for a group of tables? -

I am using MySQL 5.5.37. Looking at a group of tables, (table_a, table_b, ..., table_n), how do I write a SQL statement (or process) that will generate SQL which produces all the tables that these tables link? Note that although I can run a "mysqldump" that will generate the "created table" statement with the "concert" sections, I only want the statements that will add the foreign key, such as < code> optional table table_a ADD FOREIGN key (PIID) Reference table_x (P_ID) Thanks, - Dave SELECT CONCAT ('optional table', table_name, 'add foreign key (', ban_name, ')', 'context B ', referenced_ table_name,' (', referenced_column_name,'); 'AS) information_schema .key_column_usage from alter_cmd WHERE is not referenced_ table_name;

video streaming - How can I embed a stream from http://tv.majorleaguegaming.com onto a webpage? -

Unlike Youtube or any other streaming or video service, an embedded button is not created in the MLG. Can I embed it in my webpage anyway? Thank you. It seems that MLG embeds an stream by adding an iframe, for example they used it Is: & lt; Iframe width = "672" height = "378" src = "http://tv.majorleaguegaming.com/player/proofy?aid=mlg52_1" scroll = "no" & gt; & Lt; / Iframe & gt; You should be able to copy it in your site in the same way.

How to send several keys in WebDriver with Python? -

How to create a Python code in a Web driver by pressing the Command + Shift + H button on the keyboard (or keys)? Update: information: order to reduce the API work queue: "au.mainApp () .getTreeForXML ()" debug: sending commands to devices: au.mainApp () GetTreeForXML (INSERVER) Socket data received (4494 bytes) information: [INSTERERVER] Send commands to devices: au.mainApp (). getTreeForXML () INFO: [INSTSERVER] Socket data received (8192 bytes) INFO: [INSERVER] INSERVER] Data being rooted for the socket 'CMD' event information: [INSTSERVER] Received results from devices: {"status": 0, "value": "{\" UIAApplication \ ": {\" @ \ " : \ "App \": \ "App \ , \ "Legitimate \": true, \ "visible \": true, \ "signal \ ", \" Path \ ": \" / 0 \ ", \" x \ ": 0, \" y \ ": 20, \" width \ ": 320, \" height \ ": 548} \ "&

Is it possible to upgrade Azure Powershell (ISE) in Windows Server 2012 R2 without reinstalling? -

I am running Windows Server 2012 R2 in an Azure VM in which I have an older version of Azure PowerHell (ISE) - when I run, I searched for instructions on how to update Azure Powerhall (ISE) but how do I set up a scratch copy Whether to upgrade the Azure membership without importing it again One way is - settings file etc? By the way, it is an easy way to find out which version I am on the Great Get-module azure or get-module let me version info per Do not give PowerShell module, you can just run add-ezour account to update your subscription settings.

c# - Confused between Entity classes Generated By VS and the View Model Class for specific display of Data -

I am new to MVC 4 and have been working on an MVC project for the last few days. I am working with the entity framework I am using the first approach of the database so that I can use VS to automatically generate unit sections based on schema. Convenience used. Earlier I had asked the following questions on the stack overflow: The suggestions given were mainly made on the basis of the creation of the visual model sections. Apart from projecting my chosen column, I am confused about the benefits of creating a visual model class. The generating unit class works well for creation , deletion and updates . I can only use my visual model class if I have users Had to show the list of records. Also keep in mind that my code is almost duplicate of VM class generated unit class I often go into the following problem: [HttpPost] [ActionName ("edit")] Public ActionResult EditService_POST (Service Service) {DAL lib = new VFS_DAL (); Int state = lib.UpdateService (service); I

c# - assign string from list -

I've created a list with several options, we call a different color for each character. String A = "#FFB97FC 9"; String b = "#ff 9bcc 50"; // etc. String Answer 1 = Options. Answer 1; AnswerRectangle.Fill = GetColorFromHexa (answer1); We now say that options.Answer1 = A . I want to code answerCectangle # FFB97FC 9 How can I get it? Note: Why not make a dictionary with the answer1 = # FFB97FC 9 glossary & lt; String, string & gt; Color = new dictionary & lt; String, string & gt; (); Colour. Add ("A", "# FFB 97F 9"); Colors.Add ("B", "# FF9BCC50"); and after that: answerRectangle.Fill = GetColorFromHexa (Color [answer1]);

amazon ec2 - docker: possible to create a single file with binaries and packages installed? -

Actually I want to make a "snapshot" of my current Ubuntu box, which compiled binary and various apt-derived packages Have done this on I want to make it a doc as a file, which I can deliver in my AWS EC2 examples which will be stored on the S3 bucket which will be mounted by ec2. Is this possible, and how do you start? You will not be able to take a snapshot of an existing box and use it as a docker container, but you Of course, you can create a container to use on your EC2 instances. Create the system in the same way that you want Once you make the perfect docfiler, Upload to S3 On your EC2 examples, download the tarball and. Do you plan to use some sort of s3fs to mount an S3 bucket? Otherwise, you can simply copy the tarball from your bucket, either during the user's data boot script or during the chef / puppet / responsive provision phase. Depending on how you want to configure it.

Dropdown control in dynamic view in Asp.net mvc3 -

मेरे पास एक मॉडल है सार्वजनिक वर्ग DynamicFields {public string propertyName {get; सेट; } सार्वजनिक स्ट्रिंग propertyType {get; सेट; }} यह मेरे नियंत्रक की सूची के रूप में आबादी होगी। अब मुझे PropertyType टेक्स्ट वैल्यू के आधार पर दृश्य में गतिशील रूप से नियंत्रण प्रदान करना होगा। यदि मूल्य "पाठ बॉक्स" है तो मुझे टेक्स्टबॉक्स नियंत्रण रेंडर करने की आवश्यकता है I इसलिए मैंने नियंत्रण के लिए संपादक का उपयोग किया है। देखें, @ मॉडेल आईआईएनमेरेबल & lt; DynamicFields & gt; @वर्क (मॉड में मॉडल) {@ Html.LabelFor (मॉडल = & gt; field.propertyName) @ Html.EditorFor (मॉडल = & gt; field.propertyName, field.propertyType)} ड्रॉपडाउन सूची के मामले में मुझे यह कैसे पता नहीं है आपकी मदद के लिए अग्रिम धन्यवाद। यह माना जा रहा है कि आप एक पाठ बॉक्स पृष्ठ पर रेंडर करने के बजाय ड्रॉपडाउन लिस्ट को प्रदर्शित करना चाहते हैं। @ मॉडेल IEnumerable & lt; DynamicFields & gt; @foreach (मॉडल में फ़ील्ड) {Html.LabelFor (मॉडल = & gt; field.propertyNam

recursion - Java Recursive algorithm, I can't follow the logic -

So, the questions ask, what will be the output of this method when you pass it 3. I plugged it into JCreator and received 010203010 and I have been completely confused. Public static zero printX (int n) {if (n & lt; = 0) System.out.print (0); Other {printX (N-1); System.out.print (n); PrintX (n-2); }} So this is my reason, it will call 3-1, which will call 2-1, which will call 1-1, which will print zero, Print any one, and then print another zero as 1-2 is at least 0. So far we have backed up 010 so far for the first time in the "plug-in" recursively. So this is where it confuses me, it does not really return anything, it just prints, so tells printx (2-1), where hell is its Get value? I can think that it can call itself repeatedly and calls it only in a short time, and the base case reaches 4 or 5 different times. OK, this argument is: PrintX (3) -> gt; ; PrintX (3 - 1) PrintX (2) - & gt; PrintX (2 - 1) PrintX (1) - & gt; PrintX (1 -

jquery - stop window scroll animation -

Anyone can help me here, I need this function to be closed at the top: -70px; Also, when you click it any time after closing it will open back, but I think I can do that part, the main question is that when I reach, the function prevents - 70px $ (window) .scroll (function () {var topMove = -1 * (620 * $ (this) .scrollTop () / $ ('body'). Height ()) ; $ ('.nav') CSS ({top: Math Max (Topmove)}}}); Thank you! Is it after you? I had to add console.log (topMove) to see what your variable was producing. In fact, it was a negative value. I then added the following to run only when the topMove is greater than or equal to -70 . if (topMove> = -70) {$ ('. NAV'). CSS ({top: Math.Max ​​(headmistress)}); }

How to write a SQL Server query to summarise table data? -

I need help with a SQL Server query I have a table like this: < Code> user_id display_name user named_on ----------------------------- --------------- ------------------------ 2012772 users1. Username 450 9 8885 2012772 user 1 DisplayName 451124897 2155281 User2.UserName 451045840 2162145 User3.UserName 451147363 2162145 User3.DisplayName 451147423 And I need output as below: If the displayed name for the user is present then with update_on - Updated with other user name and its submission. user_id display_name_computed updated_on ---------------------------------- --- --------------- 2012772 user1 Display 451124897 2155281 user2. User Name 451045840 2162145 User 3 Display name 451147423 Should be accompanied by the selection of SQL statement. No floating tables or table variables do not use No delete statements use. Here you go select user_id, < Display_name_computer as updated_on from your table of table, maximum (display_name) as maximum (updated_on)

javascript - Regex for a checkbox to send a form -

I am trying to create a form with a checkbox which only checks the check box (when the dog is a Collar). If the dog does not have a caller (unconscious box) then this message displays: "Your dog needs a collar." I think I need a bracket, quote, or the surrounding colonel (code 5 line)? The form currently works, but it does not distinguish between a check box or an untact box. & lt; Script type = "text / javascript" & gt; Function hgsubmit () {if (/sS+/.test(document.hgmailer.name.value) == false) Warning ("Please provide your name."); Else if (/[havecollar]/.test(document.hgmailer.collar.value) == incorrect) Warning ("Your dog needs to ride a collar."); Else {document.hgmailer.submit (); Warning ('Thank you! \ N your email has been sent'.); }} & lt; / Script & gt; & Lt; Form action = "http://www.example.com/cgi-sys/formmail.pl" method = "post" name = "hgmailer" id = "hgmail

node.js - webstorm 8, how to get rid of warning message -

Image
I expected this warning message to be invalid number of argument, 2. But my code is okay. I run my application I can ignore them, but it just bothers me. How do I get rid of them? It seems that webstorm did not know that the app can only take one argument Have tried - javascript -> libraries, i node there The picture is too small, so I paste your coffeescript code below. App.use favicon () app .use logger 'dev' app.use bodyParser.json () app.use bodyParser.urlencoded () app.use cookieParser () app.use express.static path.join __dirname, 'app / public' This problem is: favicon is expected in Express Dock 2 To get Aramitr. Yet the option shol is likely to be an optional parm. You can either ignore the warning, or else pass {} as the absolute / ** * Provides the favicons provided by the given 'path' * * Public * @little {string | Buffer path * @love (object) option * @ layer (function) middleware * / module.exports = function favico

ios - UICollectionView cells not spacing at all -

Image
I have a collection view that is representative and own data source, and with a defined layout like this: - (id) initWithCoder: (NSCoder *) aDecoder {self = [super initWithCoder: aDecoder]; If (self) {self.dataSource = self; Self. Delegate = self; UICollectionViewFlowLayout * Layout = [[UICollectionViewFlowLayout alloc] init]; Layout.minimumLacingSpacing = 0; Layout.sectionInset = UIEdgeInsetsMake (0, 8, 0, 8); Layout. scrollDirection = UICollectionViewScrollDirectionHorizontal; Layout. Powder references = CGSizeMake (1, 70); Layout.itemSize = CGSizeMake (60, 70); Layout.minimumInteritemSpacing = 4.0f; [Self set calculation break layout: layout]; } Healthy return; } The code is run properly in addition to the minimum interval conditions. The result is a collection view where there is no difference in the objects of each section. The minimum vacancy value I set should be adjusted upward, not downward, right? So I see why the result is similar to this screen? (I gave the

arrays - PHP sort numbers all zero without changing index -

AORT (arrival time []) is not correct. How can all this recover when I keep everyone at zero? The display is: array ([4] => [[3] => 0 [2] => 0 [1] => [0] = & Gt; 0) It should be like this and will not affect the index ... when there is no need to sort all the zeros ... Array ([0] => 0 [1] => [0] [2] = 0 [3] => 0 [4] => 0) < / Code> and when I will not have any other result with input zero array ([0] => 0 [2] => 0 [1] = & gt; 0 [3] => 1 [4] => 2) Can anyone else solve? Edit When I used KSert (this) the result is ... when I input 0, 2, 1 and this is the ordinary code & lt; Php $ test = array (0,2,1); Ksort ($ test); Echo "& lt; east & gt;"; Print_r ($ test); Echo "& lt; / pre & gt;"; ? & Gt; is an output bug array ([0] => 0 [1] => 2 [2] => 1 ) What I want is when I put 0,0,0,1 and can not change the key because this is the same ... Array ([0] =>

python - Django ImportError no module named -

I have been googling this whole day and have not come across a solution, hope you can help: / p> Using Django 1.6, I have created an app called "Builds" as part of a project called "Computer Builder". The site works fine when testing, though I created a file with some items in the database, and when I got the python fillDB.py : < Returns the error in running code> traceback (the most recent call final): file "fillDB.py", line 1, this file my file fillDB.py: builds.models Import BuildsTable moboDB = Open ("Db.txt", "r") line = moboDB.read (). Split ('\ ",' ') Print Lines DEF Main (): Global lines global items for items in lines: mobo = Buildsable.objects .get (moboListing ="% s "% items [0]) price_local = Buildsable.objects .get (moboListing = "% s"% items [1]) if (BuildsTable.objects.filter (moboListing = mobo, price = price_local)) .exists () == false): mydb = buildsable (mob

r - Get "embedded nul(s) found in input" when reading a csv using read.csv() -

I was reading in a CSV file. The code is: mydata = read.csv ("mycsv.csv", header = true, sep = ",", quotation = "\" ") Get the following warning: Warning message: found in the input scan (file = file, what = what, Sep = SEP, quote = Quote, dec = dec ): embedded faucet (s) / P> Now the values ​​represented by "" in some cells in my CSV are remembered. < P> How do I write this code, so that I can not get the above warning? It can be encoded in TF-16. It is not unusual when working with some Windows windows. You can try to load a UTF-16 CSV like this: read.csv ("mycsv.csv", ..., fileEncoding = "UTF-16LE")

Update a mysql table column with sum of joined table columns value? -

आदेश तालिका आईडी ऑर्डर डेट कुल आइटम तालिका आईडी मूल्य मात्रा आदेशआईडी (एफकी -> ऑर्डर। आईडी) ऑर्डर के कई आइटम हैं। mysql में एसक्यूएल, order.total को अपडेट करने का एक तरीका है, ताकि यह उत्पाद की कुल राशि item.price और item.quantity के लिए हो प्रत्येक आइटम? वह है - आदेश। Each: order.items.each: sum + = item.price * item.quantity; Order.total = sum; मैं इसके लिए एक सरल लिपि लिख सकता हूं, लेकिन मैं यह जानना चाहता हूं कि यह कैसे एसक्यूएल में करना है। हाँ आप यह एक update / शामिल के साथ कर सकते हैं। आपको कुल प्राप्त करने के लिए आइटम को एकत्रित करने की आवश्यकता है और फिर परिणाम को वापस करने के लिए आदेश में अपडेट करें: ऑर्डर ऑर्डर करें जुड़ें (i.orderid, sum (i.price * i.quantity) के रूप में मैं i.orderid द्वारा आइटम्स के कुल में) o.orderid = oi.orderid सेट o.total = oi.total;

python - What's the usage to add a comma after self argument in a class method? -

I see in that code, I saw some class methods like this: Class A (B): FDF method (self,): DO_something def method2 (self,): do_something_else Why do the authors leave the comma behind themselves, what is the purpose? Syntactically, the comma behind but does not really mean anything, it's just a stylistic I think the Most Python programmer will leave it (which is the advice I give too), but some might like it to like it so that it is easier to add more logic later Ho. You can also do You will see it more often with the functions that take up many default arguments: x = foo (arg1 = whatever, arg2 = some, arg3 = blatzimuffin,) lst = [x, y, z,] tup = (x, y, z) tup = x, # Not too This is particularly good if you want to format nested stuff well: {"top": ["foo" , "Bar", "falcon",], "down": ["quaux",],} When adding things to the list, Require to Odne / edit, not 2.

c# - all elments duplicated on adding new element in XML -

मेरे पास ऐसा XML फ़ाइल है & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "utf-8" & gt; & LT; रूट & gt; & LT; शिक्षक & gt; & Lt; शिक्षक & gt; अली जावेद & lt; / शिक्षक & gt; & Lt; / शिक्षक & gt; & Lt; / रूट & gt; मैं इस तरह गतिशील रूप से नया तत्व जोड़ रहा हूं। का उपयोग कर (IsolatedStorageFileStream isoStream = नया IsolatedStorageFileStream (शिक्षक XMLPath, FileMode.Open, IsolatedStorageFile.GetUserStoreForApplication ()) ) {String session = tb_session.Text.ToString (); स्ट्रिंग विषय = tb_subject.Text.ToString (); दिनांक समय? _datetime = val_timer.Value; स्ट्रिंग समय = _datetime.Value.Hour + ":" + _datetime.Value.Minute; स्ट्रिंग crdthr = ((ListPickerItem) lst_credithr.SelectedItem) .content.ToString (); स्ट्रिंग टीचर = टीबी_टेचर। टेक्स्ट। टॉस्ट्रिंग (); स्ट्रिंग कक्षा = tb_class.Text.ToString (); स्ट्रिंग day_week = tb_day.Text.ToString (); XDocument लोडेडडेटा = XDocument.Load (isoStream); var tchE

ios - Decimal point on numeric keypad on iphone in Phonegap / Cordova -

I am developing an iPhone application where I need to insert the value with a decimal point. Also tried "or step =" 0.01 ", but it does not show decimal point on numeric keyboard. I am using phone inter / cordova. The code of my current code & lt; Input name = "abc" pattern = "\ d + (\. \ D *)?" Type = "number" & gt; Please help !! Thank you. Try using the pattern in your input type = "number" field < pre> pattern = "\ d + (\. \ d *)?" This will bring the full keyboard but the default in the number / symbol panel. The user can still switch to Alphanumeric, but on the OnBlur event, the pattern kicks and removes any alphanumeric characters (but numbers). It should be both types = "number" and pattern = "\ d + (. \ D *)?" But if you are developing for iOS then you will find this question useful