Posts

android Parse.com get specific data[SOLVED] -

Image
यहां मेरे स्क्रीनशॉट है मेरे activity.java में btnSearchemail = (बटन ) खोजव्यूबीआईआईडी (आर.आई.डी। बीटीएनएसएचरमाइम); TxtSearchemail = (EditText) findViewById (R.id.txtSearchemail); सर्चैमेल = टीएसटीएसएआरईएकेएममेल.गेट टेक्स्ट ()। ToString (); TxtFname = (TextView) ढूंढें ViewById (R.id.txtFname); TxtLname = (TextView) findViewById (R.id.txtLname); btnSearchemail.setOnClickListener (नई OnClickListener () {सार्वजनिक शून्य onClick (देखें v) {अंतिम ParseQuery & LT; ParseObject & gt; क्वेरी = ParseQuery .getQuery ( "खाता"); query.whereEqualTo ( "ईमेल", Searchemail); query.findInBackground (नई FindCallback करें & lt ; ParseObject & gt; () {सार्वजनिक शून्य किया (सूची के & lt; ParseObject & gt; परिणाम, ParseException ई) {if (ई == नल) {// परिणाम सभी ईमेल के लिए पाया की एक सूची है (ParseObject एक्स: परिणाम) {स्ट्रिंग fname = x.getString ( "firstName"); स्ट्रिंग lname = x.getString ( "lastName");} // मैं इसे यहाँ की जगह इस ...

javascript - Simple timer, and setinterval -

What is the best way to create timers in JS? I am using it by now: var sec = 0; Set interval (function () {sec + = 1}, 1000); I have seen that, when I need milliseconds, it is very slow, the change in the browser tab completely stops. var milisec = 0; SetInterval (function () {millisec + = 1}, 1); I'm looking for a better way to handle it, which will continue to work even when the browser window is changed. With milliseconds, the resolution of the timer is not sufficient. In most cases, callback should be approximately 50 Not more than 250 times will be called, even when you set the interval to 1 mms. Look for an explanation (as specified by Sani Hattunenen). With 1000ms this will work better. But still when the tab becomes inactive, and when the CPU is busy or any other script is running on your page, the delay may occur. A solution is not to increase a counter, but to test how much time has passed since the last call of the timer, in this way, time rema...

Folding of PHPDoc comments on open not working in Eclipse Luna (why)? -

Image
Why does this checkbox have no effect for me? All PHPDoc comments are still expanded I open a PHP file This is not the real answer, but: This looks like a classic bug in the software, you should report it to the authorized eclipse Bugzilla (). Please add some extra information to your bug, such as: Is this php project and / or external file? Luna Edition (4.4.0 or 4.4.1) Example (broken) file Logs (if any) Thanks.

javascript - AngularJS throws unknown error -

मेरा कोड ऐसा है & lt; body & gt; & Lt; div & gt; & Lt; तालिका एनजी-ऐप = 'मेरा ऐप' & gt; & LT; thead & gt; & Lt; / thead & gt; & Lt; tbody ng-controller = "MainCtrl" & gt; & Lt; tr ng-repeat = "पीएलडी एलेमेंट इन पैलेट एलेमेंट" & gt; & LT; टीडी & gt; {{prdElement.name}} & lt; / td & gt; & LT; टीडी & gt; {{prdElement.itemId}} & lt; / td & gt; & LT; टीडी & gt; {{prdElement.shipmentId}} & lt; / td & gt; & LT; टीडी & gt; {{prdElement.itemCode}} & lt; td & gt; {{prdElement.description}} & lt; / td & gt; & LT; टीडी & gt; {{PrdElement.handlingUnit}} & lt; / td & gt; & LT; टीडी & gt; {{prdElement.weight}} & lt; / td & gt; & LT; टीडी & gt; {{prdElement.class}} & lt; / td & gt; & LT; टीडी & gt; {{PrdElement.lenght}} & lt; / td & gt; & LT; टीडी & gt; {{prdElement.widt...

JavaScript Setting up a JSON array for later use -

I want to create a JSON array, create fields and later populate it with the data in my code. I'm just wondering what the syntax has to go about this. I have tried so far, but there are some parse errors; & lt; Script & gt; Var myJSONArray = [{items :, cost: quantity:}; // to prepare populated array for population] then later .... myJSONArray.push (milk, 1.99,2) ; // Then change item in array areas If you really want to create one You can use the JSON.stringify method, JSON array (you currently use a JavaScript ARM in which there is a javascript object). Using Andy's Code: var arr = []; Arr.push ({item: 'milk', cost: 1.99, quantity: 2}); // prints the JavaScript array as a JSON array: console.log (JSON.stringify (arr)); The function will return a JavaScript value string in JSON format. You can then parse it with another language or store it in a new .json file. If this was the purpose of you. UPDATE : Output of the previous code: ...

sql - JSONB performance degrades as number of keys increase -

I am testing the performance of jsonb datatype in postgresql. Each document will have around 1500 keys which are not ordered. Here's how the document is flattened and what the document looks like. Make a table ztable0 (ID serial primary key, data jsonb) Here is a sample document: / p> {"0": 301, "90": 23, "61": 4001, "11": 9 2 9} ... You can see that the document does not have hierarchies and all values ​​are integers Columns: 2 The key in the document: 1500 + Search for a particular value of a key When performing a set of time or performance, it is very carefully slowed down. This query: & gt; & Gt; '1') Select (data -> gt; & gt; '1') :: Integer, by ztable0 (data -> gt; & gt; '1') from calculation (*) :: Integer limit 100 Does it take about 2 seconds to complete Is there any way to improve the performance of jsonb documents? This is a known issue in 9.4beta2 , ...

javascript - How do I add events to array elements? -

मेरा कोड var बक्से = document.getElementsByClassName ("box"); के लिए (var i = 0; i & lt; बॉक्स। लम्बाई; i ++) {बक्से [i] .addEventListener ("dblclick", फ़ंक्शन (e) {this.classList.add ("animateSize"); this.style.width = " 2px "; this.style.height =" 2px "; window.setTimeout (2000);}); } शुरू में मेरे पास केवल एक बॉक्स है, फिर मैं और अधिक बक्से बनाता हूं, लेकिन जब मैं किसी नए बने बक्से में कोई भी दोबारा क्लिक नहीं करता होता है, तब ही जब मैं प्रारंभिक बॉक्स को डबल क्लिक करता हूं, तो ईवेंट ट्रिगर होता है । मैं क्या कर रहा हूँ गलत? पी एस जब मैंने सृजित किया (बक्से की लम्बाई), उसके बाद मैंने 4 बक्से कहने लगा, मुझे सही लंबाई सतर्क (5 = 4 + 1 प्रारंभिक बॉक्स) मिलता है। समस्या यह है कि आपका कोड केवल उन मैचों के लिए ईवेंट हैंडलर्स को जोड़ता है जो वर्तमान में DOM में लोड किए गए हैं यदि यह डीओएम लोड पर है, तो कोई 'भविष्य' तत्वों पर इवेंट जुड़ा नहीं होगा। आप एक स्थिर कंटेनर (मैं दस्तावेज़ के लिए गए हैं) पर एक डबल क्...