Posts

java - Using Intent, to enable GPS doens't always work correctly. How do I fix -

Image
The code below enables me to turn the user's GPS on and off, but many times it is correctly Although the icon for GPS scanning will be at the top of the screen in the user's Notification Bar The GPS icon will not be highlighted (The proprietor is enabled (eg LocationManager.GPS_PROVIDER );) Do not know if GPS is enabled or not. The code used to enable GPS: intent = new intent ("android.location.GPS_ENABLED_CHANGE"); Intent.putExtra ("enabled", true); SendBroadcast; Screenshots: Does not support

swing - How to set JTextField border size in java -

Image
I want to set the border height, the width of the JTextField and put it in the JFrame center in Java. I tried those ideas, but these ideas do not work. SetSize (), SetPrefferedSize (), SetMaximumSize (); Need help in advance thanks. Import java.awt.BorderLayout; Import javax.swing.JFrame; Import javax.swing.JTextField; Public class P {public static zero main (string [] args) {JFrame frame = new JFrame (); JTextField field = new JTextField (); Frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); . Add frame.getContentPane () (BorderLayout.NORTH, region); Frame.setSize (350,300); Frame.setVisible (true); }} JTextField GridBagLayout For example ... import java.awt.color; Import java.awt.EventQueue; Import java.awt.GridBagLayout; Import javax.swing.JFrame; Import javax.swing.JTextField; Import javax.swing.UIManager; Import javax.swing.UnsupportedLookAndFeelException; Import javax.swing.border.LineBorder; Public category border text {public static zero main (str...

c++ - Error c3892 iterator issue in VS2013 -

I am migrating a Visual Studio 2008 VC ++ project to Visual Studio 2013. I am getting a C3892 error when migrating one of my projects. I Here are some sample codes that have the problem again : Generates: int _tmain (int argc, _TCHAR * argv []) {struct student {int id; Integer digits; Bull changed; The Bull Operator & lt; (Const student and RPPARM) const {return false; } Student (int a, int b) {id = a; Points = b; Change true =; }}; Student X (10,500), y (15,600); Std :: multiset & lt; Students & gt; Myset; Myset.insert (x); Myset.insert (y); Std :: multiset & lt; Students & gt; :: reverse_iterator ear; (ITR = MySasset. RBZ); IARAR = MySite.Rend (); ++ IARAR) {STD :: COAT & LT; & Lt; ITRAT-> ID & LT; & Lt; "\ N"; Std :: Court & lt; & Lt; Iter- & gt; From the trail of & lt; & Lt; "\ N"; Std :: Court & lt; & Lt; Iter- & gt; Has changed & lt; & Lt; "\ N"; Iter- & gt; Cha...

android - Nested linear layout buttons texts cropped off at the end -

Image
एंड्रॉइड स्टूडियो 0.4.5 हैलो, मैंने एक गतिविधि से एक संवाद बॉक्स बनाया है। जो इस प्रकार प्रदर्शित करता है: रद्द करने में '' एल ' और हटाए जाने में 'ए' लापता है मैंने पाठ का आकार समायोजित करने की कोशिश की है, लेकिन वह काम नहीं कर रहा है मैं इसके साथ खेल रहा हूं। लेकिन कोई समाधान नहीं मिल सकता है। यहां मेरा एक्सएमएल लेआउट: & lt; linearLayout xmlns: android = "http://schemas.android.com/ Apk / res / android "android: orientation =" ऊर्ध्वाधर "एंड्रॉइड: layout_width =" match_parent "एंड्रॉइड: layout_height =" wrap_content "& gt; & LT; imageView एंड्रॉयड: आईडी = "@ + id / ivRabbitLogo" एंड्रॉयड: layout_width = "match_parent" एंड्रॉयड: layout_height = "64dp" एंड्रॉयड: scaleType = "केन्द्र" एंड्रॉयड: पृष्ठभूमि = "# ff20a3ff" एंड्रॉयड: सामग्रीमंडलियों = "का लोगो एप्लिकेशन "/ & gt; & LT; EditText एंड्रॉयड: आईडी = "@ + id / etUpdateDlgN...

.net - IP address and domain restrictions in iis through powershell -

Image
मैं powershell में बहुत नया हूँ IIS में powershell के माध्यम से आईपी पता और डोमेन प्रतिबंधों को बदलने के लिए यहाँ स्क्रीन शॉट है कि हम मैनुअल कैसे कर सकते हैं आईआईएस से करो। वर्तमान में मैं सेटिंग्स को बदलने के लिए इस कोड का उपयोग कर रहा हूं। सेट-वेबकॉन्फ़िगरेशन प्रॉपर्टी / सिस्टम। वेबर्स / सिक्युरिटी / एपसेक्युरी -नाम अनुमतिअनुक्रमित -अन्य "सच" -स्थान "IIS: \ Sites \ 123" - Pspath IIS: \ Sites \ 123 पता नहीं यह सही है या नहीं। कृपया मदद करें। संपादित करें: यह कोड अनिर्दिष्ट ग्राहकों के लिए प्रवेश मूल्य को टॉगल करेगा ताकि यह उस संबंध में सही हो। इसे बिना-पीSPath का प्रयोग करें और यह काम करेगा सेट-वेब कॉन्फ़िगरेशन प्रॉपर्टी / सिस्टम। वेबर्स / सिक्युरिटी / एपसेक्युरी -नाम अनुमतिअनुक्रमित -अन्य "सच" -स्थान "IIS: \ Sites \ 123"

c++ - how can i access variables from one form to another -

I am new to Q. There is a doubt about the values ​​passing in the form. I have declared Higher Classifier in Form 1 and have access to it in Form 2. That's why I have declared Higher Classifier in Form 2, but this Higher Classifier shows many announcements in Caseyard. So how can I differentiate between forms? I specify the Higher Classifier using the Extere keyword, but it still does not work. I can not use signals and slots because I have not been declared in the button_click event. When I call Higher Classifier in 2, I need to load that XML file. Nobody can help me. You can use the signal-slot to pass from I emit From where to the value and it will be your sign, then connect the signal with that slot, which is of that value. Your slot will be a way that will get value.

ios - unsigned char allocation comes nils in offset value objective c -

I'm getting pixel color values ​​with touch points. I've been doing this successfully but sometimes app error (EXC_BAD_ACCESS (CODE) = 1, address = 0x41f6864) The memory allocation problem is the source code for your reference. - (UIColor *) getPixelColorAtLocation: (CGPoint) point {UIColor * color = nil ; @try {{CGImageRef inImage = drawImage.image.CGImage; // Create the screen bitmap context close to draw the image format ARGB is 4 bytes for each pixel: low, Red, green, blue CGContextRef cgctx = [self-createARGBBitmapContextFromImage: inImage]; if (cgctx == zero) {zero return; / * error * /} size_t w = CGImageGetWidth (inImage); size_t H = CGImageGetHeight (inImage); CGRAct Rect = {{0,0}, {w, h}}; // Attract the image in the bitmap context. Once we draw, then in the memory allocated for reference for the presentation / then the // will be the raw image Data in the specified color space. CGContextDrawImage (cgctx, rect, inImage); // Now we can get an indicator in image ...