Posts

swift - Use Parse.com Data in iOS 8 Notification Center widget -

I am trying to download some strings from parse.com inside the Notification Center widget. That's why I need to first need to first load credentials to sign in to parse the user, which is the NSUserDefaults (I know about the security aspect.) The app has been saved. This step works fine, but when I follow the following code, the widget says it is not possible to load the data. func signUserIn (username: string, password: string) {PFUser.logInWithUsernameInBackground (username, password: password) {(user: pfusor !, error: nsERr!) - & gt; If in zero (user! = Zero) {SMKeychainService.saveToken (password) var defaults = NSUserDefaults (suiteName: "group.xxx.xxx") defaults.setObject (user name, for: "username") defaults.synchronize () Self. Have you tried to load data from parse.com inside one of you? Widget and how did you do it? I can not even load the data, because as I mentioned widget crash on the user's sign-in. There is no problem signing in...

Change .js in google chrome with php/javascript? -

Hello :) Is it possible to set different javascript files in different browsers? I want to change a JS in Chrome (PC version) I know that is possible with CSS, so I tried this code with a .js file, but apparently do not work .. So what am I asking There is a different way to set .js (if this is possible). & lt ;? Php if (ereg ("chrome", $ _SERVER ['HTTP_USER_AGENT'])) {echo '& lt; Script src = "js /developr.inputCHROME.js"></script> '; } Else {echo '& lt; Script src = "js / developr.input.js" & gt; & Lt; / Script & gt; '; }? & Gt; Thank you in the consultation. Try $ user_agent = $ _SERVER ['HTTP_USER_AGENT' ]; If (strokes ($ user_agent, 'chrome')! == incorrect) {echo '

Android Studio can't find color reference within the same resource file -

यहां मेरी संसाधन फ़ाइल \ res \ values ​​\ colors.xml की सामग्री है: & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8"? & Gt; & LT; संसाधनों & gt; & Lt; color name = "themeGray" & gt; # ff8A9199 & lt; / color & gt; & Lt; color name = "themeLightGray" & gt; # फ़ेफ़ेएया & lt; / color & gt; & Lt; color name = "themeDarkGray" & gt; # ff3f434b & lt; / color & gt; & Lt; color name = "themeRed" & gt; # ffCC292B & lt; / color & gt; & Lt; color name = "themeBlue" & gt; # ff002E63 & lt; / color & gt; & Lt; color name = "themeWhite" & gt; # ffffffff & lt; / color & gt; & Lt; color name = "बटन सामान्य" & gt; @ रंग / थीमग्रे & lt; / color & gt; & Lt; color name = "buttonPressed" & gt; @ रंग / थीमब्लू & lt; / color & gt; & Lt; / संसाधन & gt; ...

How to connect RIDGID LM-400 distance meter with iOS via Bluetooth? -

Image
itemprop = "text"> I have a situation where the business logic is to integrate some popular BLE distance meter Working with me in With the help of iOS CoreBluetooth.framework , I have already found success in integrating some major models. But connecting RIDGID LM-400 gives me real headache I already use BLE ( CoreBluetooth.framework ) , But have tried a lot with no answer. I use the GameKit GKPeerPickerController , GKPeerPickerControllerDelegate , GKession G2CessionDelegate found some tutorials for Bluetooth connectivity with code>, and , but no positive results. Question: What are the other prospects to bluetooth To connect with the device other than CoreBluetooth and GameKit ? I have already tried the private structure but then my app will be rejected, so it is useless. I downloaded from the App Store and installed and I tried to connect the device. As soon as I operated on the device, I found a message that appeared ex...

Android studio res/xml directory not found -

I need to include a searchable configuration file in my project, in the Android documentation they have said that this xml file Res / xml is included in the directory. But the XML directory is not found. Do I need to create an XML directory or add this XML file elsewhere? import android.app.activity; Importroid.os.Bundle; Import android.util.log; Import android.view.View; Import android.widget.TextView; Public class increases main activity {Private static string; APP_TAG = "tag"; See private text view lessons; Override public null on @reate (bundle saved instainstate) {super.naught (savedinstenstate); SetContentView (R.layout.main); TextView = (TextView) findViewById (R.id.textField); findViewById (R.id.readBtn) .setOnClickListener (New View.OnClickListener () {@Override public void onClick (View v) {XmlPullParser parser = getResources () getXml (R.xml.cars) ;. StringBuilder stringbuilder = new StringBuilder ( ); try {while (parser.next () = XmlPullParser.END_DOCUME...

javascript - Element's coordinates relative to its parent -

विधि el.getBoundingClientRect () परिणामस्वरूप व्यूपोर्ट के शीर्ष-बायां कोने के सापेक्ष परिणाम देता है ( 0,0 ), किसी तत्व के अभिभावक के सापेक्ष नहीं, जबकि el.offsetTop , el.offsetLeft (आदि) एक परिणाम के सापेक्ष परिणाम देते हैं माता-पिता। क्या उसके माता पिता के सापेक्ष किसी तत्व के निर्देशांक रखने का सबसे अच्छा अभ्यास है? el.getBoundingClientRect () माता-पिता को (0,0) समन्वय, या फिर el.offsetTop , el.offsetLeft और इतने पर? आप उपयोग कर सकते हैं getBoundingClientRect () , बस मूल के निर्देशांक घटाकर:। वर parentPos = document.getElementById ( 'माता-पिता-आईडी') getBoundingClientRect (), childrenPos = document.getElementById ( 'children- आईडी ')। GetBoundingClientRect (), रिश्तेदार POS = {}; relativePos.top = childrenPos.top - parentPos.top, relativePos.right = childrenPos.right - parentPos.right, relativePos.bottom = childrenPos.bottom - parentPos.bottom, relativePos.left = childrenPos.left - parentPos.left; console.log (relativePos); अब आपके पास...

batch file - How to zip all sub folders inside folder with a specific name -

I want to find all the folders under the name "logfile" inside a slightly different folder structure. For example how do I find the logfile folder inside C: \ ECU \ ECU1 \ Logfile, C: \ ECU \ ECU2 \ Logfile, C: \ ECU \ ECU3 \ Logfile and C: \ ECU \ ECU4 \ Logfile? I then want to zip the .txt contents of this folder in each case. I currently have a batch file that allows me to zip the contents of a folder, which has the same folder structure every time, but the above versions all need to be combined together. Any help would be great ... Thanks. @echo push push "C: \ ECU \ ECU2" || Goto: Zip for all files in the EUREMEM backup directory for %% A in (*. TXT *, * .cpi *) "C: \ Program Files \ WinRAR \ WinRAR.exe" a -r "%% ~ nA" Zip "" %% A "FOR %% A IN (*. TXT, * .cpi) DO DEL" C: \ ECU \ ECU2.cpi * "" %% A "popped Try this first test to see if it prints the correct folders: @echo break / d / r ...