Posts

coffeescript - How to compile all scripts in their own directories with Grunt Coffee? -

यह मेरे वर्तमान में है: कॉफी: {options: {bare: true }, Glob_to_multiple: {expand: true, flatten: false, cwd: 'public / js', src: ['* .coffee'], dest: 'public / js', ext: '.js'}}, समस्या यह है कि मेरे पास दो निर्देशिकाएं हैं जो मेरी जेएस फाइलें रखती हैं, और मुझे नहीं पता कि यह दोनों जगहों को देखने के लिए कैसे सेट किया गया है, और जावास्क्रिप्ट को उसी निर्देशिका में कॉम्प्लेक्स करें जिसमें कॉफ़ीसिप्टिप्पियाँ हैं । यह coffeescript कमांड है जो मैं की कार्यक्षमता को दोहराने की कोशिश कर रहा हूं: कॉफी - वॉच - कॉम्पाइल। अगर मैं इसे सही ढंग से समझता हूं और आप दो निर्देशिकाओं में जेएस में कॉम्बल को संकलित करना चाहते हैं, तो आपके लिए दो सरल उपाय हैं। पहले समाधान - संकलन जेएस फ़ाइल मूल कॉफी स्क्रिप्ट फाइल के रूप में एक ही निर्देशिका: कॉफी: विकल्प: नंगे: सही संकलित: फ़ाइलें: [विस्तृत करें: सच्चे स्रोत: ['जेएस / ** / *। कॉफी', 'अन्य / ** / *। कॉफी '] गंतव्य:' दूसरा समाधान - सभी फाइलों के लिए सामान्य निर्देशिका में जेएस फ़ाइल को...

javascript - Class selector returns null when I test -

मेरे पास सेट एचटीएमएल का एक स्निपर है I मूल संरचना & lt; div & gt; & Lt; div & gt; & lt; / div & gt; & Lt; div वर्ग = "कुछ-वर्ग अन्य-श्रेणी टिकट_प्रिंट_वेपर दृश्यमान" & gt; & lt; / div & gt; & Lt; / div & gt; इसलिए मैं कोड के माध्यम से एक और बटन डालने की कोशिश कर रहा हूं। ऐसा करने के लिए, मैं (अब तक कुटिलता से) का उपयोग कर रहा हूं: $ ("। Ticket_print_wrapper")। InsertAfter ("& lt; p & gt; moo & lt; / p & gt;"); यहां एक jsfiddle है: यह एक वस्तु के रूप में "। टिकट / प्रिंट" / स्वीकार नहीं करता है। क्या कोई इस पर मेरी नींद पीड़ा को तोड़ सकता है? कृपया का प्रयोग करें $ ("। ") .append (" & lt; p & gt; moo & lt; / p & gt; "); यदि आप दो बटन के साथ एक और सामग्री जोड़ना चाहते हैं।

swift - set background image xcode6 -

Hope this is not basic for you, how can I set a background image in Xcode 6. I have saved my image * .png saved the supported files just do not need line of code. Thank you. Do you mean background image for the whole scene or a UIButton or something? For UIButton, when you select it in the storyboard, there will be a drop down menu in the attribute inspector, where you can set the background image. If you want something for the whole scene, then you are probably better to use UIImageView as suggested by JMDUK, there will be a drop down menu to set the image in the property inspector. Use UIImageView to resize, use barriers etc. to fill your entire scene. Then arrange under the editors menu and send back your other UI elements will be at the top of your background image.

manual - Why some commands have man entry point, others don't? -

Is every command in manual, or is it currently missing so that you can install the manual later? Sometimes, "- help" also does not give you any information I talk about Bash I am (Terminal app on many computers) No. A "command" is just an executable file that can contain the code in the file that the programmer decides, which it can. So if you add --help as an argument in the command, by default it is ignored, but whoever can create that file - when a logic is passed as argument then something Can choose the option to display support. And as far as the manual page goes, they are found in / usr / share / man / . In it each directory is for different types of manuals (more on that) so if you install a command, then the author of that command manages a page in the / usr / share / man Can keep in

javascript - Algorithm for testing angle equality -

Many of the mandals in my application have been rotated at arbitrary degrees and I need to check whether their rotation is equal (some Regarding the error margin). A grand implementation goes like this: function angle (first, second, error margin) {return mathematics.base (first - second) & lt; = ErrorMargin; } But it fails because rotation can increase to infinity. Thus, we need to make both angles normal: function normal value angle (angle) {angle = angle% (2 * monastery; pi); // normalize the angle gap [-2 * pi, 2 * pi] if (angle and lieutenant; 0) 2 * monastery. PI + angle will return; // interval [0, 2 * pi] normalize the angle of return angle; } It always works about but fails in some corner cases, for example angleEquals (0, 2 * Math.PI - 1e-4, 1e-3) is false . Any suggestions? You need to normalize the gap between the angles, not the angle itself. Calculate diff = angle1-angle2 // difference diff = diff% 2 * PI // [0, 2 * PI] if the (diff> PI...

python - Read GPS data from com port -

I'm trying to read GPS from com port. I do not really know what it means, but I have intelligent -535 GPS receiver and the driver does not produce is properly installed and set up a Jeepisinfo.aksa (GPS receiver sentences, but that's another story ). GPSinfo.exe clearly knows how to read data from com port (using driver or something). So, I need to know how Python reading connect GPS receiver and binary information string so that it is going to produce I put it in the database Please explain later and explain. On the basis of your knowledge, you can tell me that Python library called Do (I read - I think - is built in GPS library but could not get it ... what binary GPS Is there a built in reading data?) And how can I get the data in the first place (i.e. how do i connect to com port? If you know how to do this in java, it will also be useful I Could get Concept bearings, but I prefer Python. If you want to read data from COM ports , Then try. See SO answers fo...

ios - PeerID object received by another peer is different that the original object in MultipeerConnectivity Framework -

I am using Multipoint Connectivity Framework I am saving my coworker to reuse it in NSUserDefaults ( As suggested by the apple) in this way (the following code is faster but there is behavior similar to Objective C): var peerId: MCPeerID = {omitted = NSUserDefaults.standardUserDefaults () ; Datatosno = Default Dataforaki ("KPIRID"); Var peer = NSKeyedUnarchiver.unarchiveObjectWithData (dataToShow) as? MCPeerID; If colleague == blue {peer = MCPIRID (display name: uidive courant device).); Give data: NSDT = NKAd Carrier Archived datahop object (peer); Defaults.setObject (data, forKey: "kPeerID"); Defaults.synchronize (); } Println ("I'm a colleague: \ (peer!)"); Return peer!! } () I send an invitation to the search peer like this: the flash browser (Browser: mcnarbiswrez browser !, found peer pirid: mcpair id! , DiscoveryInfo information with: [NSObject: AnyObject]!) {Println ("\ (self.peerId) found peer (pearID)"); If the browser ...