Posts

Showing posts from June, 2012

android - wait to asynctask finish from another asynctask -

im is querying a DB with an asyntask that works in an object, and this object is a The problem is that I do not know the way to wait for query results before trying to use methods from this object. This taps point is the reason for exception. I tried with this time and it works, but I know it has not been done properly. // With this constructor I create an asyntask which db empresa = new Empresa (id_empresa); / * While (! Empresa.consulta_terminada) {// none of the advice on this question) * / Log.e ("EMPRESA NOMBRE", empresa.getNombre ()); Sita = new Sita (Itenario, Hora_Farmato, Empressia); Citas.add (cita); Sorry for my english and thanks! Pass a runnab for AsyncTask, and open it on postExecute (). Or use handler and handler thanks to doing async tasks, this will be more flex.

how i change background for all activity android -

I put an image for all the activity in my app (in style.xml ...). How can I change the background for all my activities dynamically, is it possible to change the properties of a theme dynamically? Thank you for your help / P> getWindow () can change setBackgroundDrawable (...); . GetWindow () setBackgroundDrawableResource (...); See the docs.

How to find strings and put them in a list only once in python? -

I have some string in the list like: a = ['Android' . Bros. "Android" Brosser URL 'Android' Messaging "FutureShop" FutureShop Filler "FutureShop" Filter Hello '' FutureShop. Test 'Test' Test. Hello '] What do I have to do, get names of all these stars (Android, FutureShop, Test) and put them in a list. The list will then appear: b = ['Android', 'FutureShop', 'Test'] i.e; There should not be a string more than once. Edit / Note: I did not know about using the set in Python first, this is why I asked this question. Well assume that they are in the list: A = ['Android', 'Android. Bros. ',' Android. Brosser Url ',' android ' Messaging ',' FutureShop ',' FutureShop ' Filler ',' FutureShop. Filter Hello 'You can do this: b = list (set (set (set) (set (set (' set ',' test ',' test.Hello '

c - When the new value specified for SO_RCVBUF in setsockopt() will take effect? -

My query is related to the "SO_RCVBUF" option in the SetCopy () API when the new value specified for SO_RCVBUF in SetOp () is effective Will happen? I am testing the flow control of TCP / IP and below is my environment. The client program is a slow reader and it has a socket to test the flow control, after setting the connection to 5000 bytes Before reducing the value of SO_RCVBUF and getting data, I am decreasing it. I hope that, after sending 5000+ bytes, the client should wait for the program to read. But the server sends the program data to ~ 60000 bytes. After that the server program client will wait to read. When the customer reads 55,000 bytes, I am getting a new value to get buffer (5000 bytes). Is it expected? I think the effect of setocketopt () should be immediate. The initial value of receiving the buffer should not have any effect after the codecot (). Regards, Pacific I think that you connect () Before calling, SO_RCVBUF should be set, because it

vba - Changing Permissions on a live *.mdw file? -

If I write the code to change the permissions / users a *. Mdw add a file; What *. Mdw file is live, while I can run that code? Another word while people are still using it? I am using MS Access 2003. Yes, you can and '* .mdw' file is actually MDB database 'user'; And changes in the 'group' collection are written together there.

know the start date and the latest date on a table on SAS -

I am very fresh in the SAS world, however, although I used SAS during my studies last year but theoretical knowledge On the hands is not the same as knowledge. This is my problem. I have tables on the SAS, which look like the example below: Table 1 date var_1 var_2 var_3 var_4 var_5 1957 m1. . . . 1957 m2. . . 23.5 1957 m3 1.2. . 23.6 1957 M4 1.3. 23.7 1957 M5 1.4 0.123 23.8 1957 M6 1.5 0.124 23.9 1957 M7 1.6 3.0 0.125 23.10 1957 M8 1.7 3.1 0.126 23.11 1957 M 9 1.8 3.2 0.127 23.12 1957M10 2.1 1.9 3.3 0.128 23.13 1957M11 2.2 1.10 3.4 0.129 23.14 1957 M12 2.3 1.11 3.5 0.130 23.15 As you have guessed, each variable is a time serial that is on its authority and date, there is also a time series, which are numerical except column column column That is a character var_1 will start in October (or M10) in 1957 and the latest date will be December (or M12) in L 957 var_4 ac October will (or M10) began in 1 9 57 and the latest date would be December (M 12). I have tried the f

android - Navigation Drawer and MapFragment -

I want to know what is the right approach to implementing mapping with a navigation drawer I already have this work Was doing fine, but I'm reading some documents and maybe it can cause problems in the future. Then, my main square where the navigation drawer has been implemented, it is very common the following selectItem () method: the home activity activity Enhances {// ... // content like purchases (), etc. // ... Private Zero SelectItem {if position (position == 0) {// position 0 navigation drawer piece piece = new mapframement () is the mapped option; Piece Manager Piece Manager = getFragmentManager (); FragmentManager.beginTransaction () .replace (R.id.content_frame, fragment) .commit (); } MDrawerList.setItemChecked (status, true); SetTitle (listaElementosDrawer [status]); MDrawerLayout.closeDrawer (mDrawerList); }} Mapfragment, which is a fragmented piece of main activity, is as follows: the public class spreads the Mapfraggment fragment {public mapfragment

python - Using dynamic lists in query in Pandas -

For example, say I have several types of columns that encode different types of rates ( "Annual Rate" , "1/2 Annual Rate" , etc.). I want to use query on my datafire to search for entries where any of these rates is above 1 . First I Code> Then I want to do something like this: df.query ('any of my columns & gt; 1') I query < / Div> How can I format it for a query? A python expression (with some limitations, for example, you can not use lambda expression or thorium if } / Other expressions). This means that any column referenced in your column string should be a valid Python identifier (a more formal word for "variable name"). One way to check this is to hide the name pattern in the tag in the module: [156] in: tokenize.Name out [156]: '[a-zA-Z _ ] \\ w * 'in [157]: def isidentifier (x): .....: returns re.match (tokenize.Name, x) None .. ...: in [158]: isidentifier ( 'Adsf')

css - Html image gallery -

Image
<div class = "> <p> <code> & lt; div class = 'container' & gt; & Lt;? Php if ($ चित्र):? & Gt; & Lt; div वर्ग = 'गैलरी सीएफ' & gt; & Lt;? Php foreach ($ चित्र $ छवि के रूप में):? & Gt; & Lt; a href = "& lt;? Php echo $ image ['full']? & Gt;" & gt; & Lt; div वर्ग = 'गैलरी-आइटम' शैली = "पृष्ठभूमि: url (& lt;? Php echo $ image ['full']? & Gt;); & gt; & Lt; / div & gt; & lt;! - .gallery-item - & gt; & Lt; / a & gt; & Lt;? Php endforeach; ? & Gt; & Lt; / div & gt; & Lt;! -। गैलरी सीएफ - & gt; & Lt;? Php else:? & Gt; कोई छवियां नहीं हैं & lt;? Php endif; ? & Gt; & Lt; / div & gt; & Lt;! - कंटेनर - & gt; </code> </pre> <p> सीएसएस </p> <pre> <code> .gallery-item {width: number; ऊंचाई: संख्या; पृष्ठभूमि का आकार: कवर; } </code&g

C++ to C++11 in gcc MinGW missing function -

I tried to use SimpleIni "Library" ... this is basically a header: G ++ test.cpp this works fine g ++ -std = c ++ 11 test.cpp > Output: SimpleIni.h: member function 'SI_Error CSimpleIniTempl & LT; SI_CHAR, SI_STRLESS, SI_CONVERTER & gt; :: LoadFile (constant wchar_t *) ': SimpleIni.h: 1328: 35: Erreur: If there are' _wfopen 'that depend on the template parameters, then' _wfopen 'should be announced to have no arguments available [ Fpermissive] SimpleIni.h: 1328: 35: Note: (If you use '-fpermissive', G ++ will accept your code, but the permission of the use of an undeclared name has been removed) SimpleIni .h: Member Function 'SI_Error CSimpleIniTempl & LT; SI_CHAR, SI_STRLESS, SI_CONVERTER & gt; :: savefile (constants wchar_t *, bool) in constants: SimpleIni.h: 2343: 35: error: there is no argument for '_wfopen' which are dependent on the template parameter, hence the announcement of '_wfopen

sql server 2008 r2 - SQL sub total and final total query -

I need to expand my SQL query which currently provides sub totals with this query, sub-sum and gorgeous There is no way to return both: SELECT oi.PurchaseID, SUM (O. Queti * Convert (decimal (18,2), p. AMPRICIS) VPPCCT Can I make another? Nickname for grand total? I have tried a few different ways and till now I am subtracting sub-tattles in a floating table towards INSERT and returning the value in a stored proc. Any advice is highly appreciated! You do not specify the database you are using, but with many databases rollups Clause support for group : SELECT oi.PurchaseID, SUM (o.Quanity * CONVERT (decimal (18,2), p. ItemPrice)) as sub_total FROM VwPurchaseType PL on OIP PL. PA CallerID = OI. Cholerid where oi UserID = 1 Group by OI. Rollup with purchase; This will add an additional line where PurchaseId is NULL . There is totality in it.

javascript - Z-order of elements broken by -webkit-transform: translateZ -

Image
What hardware can be implemented -webkit-transform: translateZ (20px); can be used on some elements while the rest of the page is in the normal z-index: 10; I post this question because I have a problem with some sticky sidemanu which triggers some rendering issues on chrome and therefore -webkit-transform: Was complemented with translateZ (20px); While the rest of the page still uses the z-index, like For example, the footer is covered by sticky side menus, while the bottom is scrolled, used to work (before translateZ), but now the footer appears at the top ... I have tried to add translateZ (10px); To cover the whole page of the success without clergy and divs, this is clearly not something I want to do because I only belong to the product with the side menu and the rest of the page ... Ie footer ... In case: Why does the footer appear above the red box?

php - WampServer 2.4 MySQL instance not starting, icon remains orange -

जब मैं WampServer 2.4 प्रारंभ करता हूं तो MySQL उदाहरण प्रारंभ नहीं होता है। एक दिन यह ठीक काम करता है, अगले दिन यह समस्या थी। मैंने सभी सेवाओं को पुनरारंभ करने की कोशिश की है, मेरी आईएनसी में "innodb_force_recovery = 1" शामिल है और मैंने मेरी इन्हीं में भी इन्टर-इनोड को हटा दिया है। मुझे निम्न त्रुटि मिलती है: 2014-04-28 16:06:51 4408 [नोट] प्लगइन 'फेडेराटेड' अक्षम है 2014-04-28 16:06:51 13dc InnoDB: चेतावनी: innodb_additional_mem_pool_size का उपयोग किया गया है। इस विकल्प को भविष्य के रिलीज में हटाया जा सकता है, विकल्प innodb_use_sys_malloc के साथ और InnoDB के आंतरिक मेमोरी आवंटन के साथ। 2014-04-28 16:06:51 4408 [नोट] InnoDB: InnoDB मेमोरी हीप अक्षम है 2014-04-28 16:06:51 4408 [नोट] InnoDB: Mutexes और rw_locks Windows interlocked कार्य का उपयोग करते हैं 2014-04-28 16:06:51 4408 [नोट] इनओडीबी: संपीडित तालिकाओं का उपयोग करें zlib 1.2.3 2014-04-28 16:06:51 4408 [नोट] इनओडीबी: CPU सीआरसी 32 निर्देशों का उपयोग नहीं करते 2014-04-28 16:06:51 4408 [नोट] इनओडीबी:

php - Making radio buttons a required selection by user -

मेरे पास 5 रेडियो बटन हैं जो मान की एक सीमा प्रदान करते हैं: & lt; इनपुट प्रकार = "रेडियो" नाम = "बुकपरियोड" आईडी = "बुकपरियोड" मान = "1" / & gt; 1 & lt; br & gt; & Lt; input type = "radio" name = "bookperiod" id = "bookperiod" मान = "2" / & gt; 2 & lt; br & gt; & Lt; इनपुट प्रकार = "रेडियो" नाम = "बुकपरियोड" id = "bookperiod" मान = "3" /> 3 & lt; br & gt; & Lt; input type = "radio" name = "bookperiod" id = "bookperiod" मान = "4" / ​​& gt; 4 & lt; br & gt; & Lt; input type = "radio" name = "bookperiod" id = "bookperiod" मान = "5" / & gt; 5 & lt; br & gt; मुझे यह सुनिश्चित करना है कि उपयोगकर्ता ने उन्हें चुना है, क्योंकि वर्तमान में उपयोगकर्ता एक का चयन नहीं कर सकता है और फ़ॉर्म अभी भी जमा होगा। जबकि मै

loops - How to read multiple files in R -

I would like to create a loop to read the file I tried paste0 , but it does not work I am going to do the above order in Kashmir = 1 to Kashmir = 10 files {for (in 1:29) {exprs.file & lt; - paste0 ("LRRadjustedextremes0.5kgchr", k, ".txt") eset & lt; - read.eset (exprs .file = "/ home / proj / mT_nellore / r / eBrowser / adjust / exprs.file")}} cheers An efficient approach is to generate a vector with file names, and it should be lapply : < Pre> read the files with the links listed <1> path> If you have a file inside a folder and want to read them all, then it also works: Paths & lt; - '/ home / proj / MT_Nellore / R / eBrowser / adjust /' files & lt; - list.files (path = path, pattern = '.txt') Additionally, if your files are too large to fit in memory then consider loading one and the entror to load at a time needed. Only your information is required: files & lt; - list.files

java - How to load a persisted Hibernate entity for binding so non-form properties are not lost? -

I am using Spring 4 and Hibernate 4. I have a problem that seems like many other people I want to edit my spring form only a few special properties of an entity, not the whole thing. By default, if I load a permanent unit, then edit some of it in some form to show some properties, post it to my controller and save it ... any property The values ​​which were not included in the form are lost, I think why this happens, and I know of some solutions that float around there. 1) On saving time, load the unit with DB, only copy the properties you want, save the model, save. 2) When the form is started, then load the unit and use the @Session entries feature to store it in sessions between requests. But I am not like either one of these. Maybe I'm missing something, but the solution seems quite simple. Somewhere, the default spring web binder is making an example of the unit to copy the property's form. If I can override it and I can use the ID to load a permanent unit from

uiview - iOS: how to move ball -

नमस्ते मैं आईओएस पर एक चलती गेंद कैसे बनाऊँ? जब प्रोग्राम शुरू होता है, मैं स्क्रीन के बाईं ओर गेंद को प्रदर्शित करूँगा। इसके बाद, हर बार जब मैं एक UIButton पर क्लिक करता हूं, तो मैं उसी एक्स-अक्ष पर दाईं तरफ गेंद कैसे ले जाता हूं मैं गेंद को प्रदर्शित करने में कामयाब रहा, लेकिन जब UIButton दबाया जाता है, तो मैं उसका स्थान कैसे अपडेट और फिर से करना चाहता हूं? वर्तमान में प्रत्येक बार जब मैं UIButton दबाता हूं, तो यह एक नई गेंद बनाता है और पुरानी गेंदों को साफ़ नहीं किया जाता है। मैं इसे समझता हूं क्योंकि मैं गेंद के एक नए उदाहरण को पुनः बनाता हूं। यह मेरा कोड है .... ballView.m @implementation BallView - (आईडी) initWithFrame: (CGRect) फ्रेम {आत्म = [सुपर initWithFrame: फ्रेम]; यदि (स्वयं) {[स्वयं सेटबैकग्राम रंग: [UIColor clearColor]]; } स्वस्थ वापसी; } - (शून्य) ड्रॉरेक्ट: (सीजीएफ़टीएटी) गंदा रेखांकित {एनएसएलॉग (@ "ड्रॉरेक्ट" में); // ग्राफिक्स संदर्भ प्राप्त करें और इसे साफ़ करें CGContextRef ctx = UIGraphicsGetCurrentContext (); // एक ठोस

javascript - TinyMCE in Wordpress automatically decoding to html -

मुझे & amp; # 91; इसके बजाय [ और & Amp; # 93; इसके बजाय ] मेरे वर्डप्रेस टेक्स्ट एडिटर में। मैं इसे एक मॉडल टेक्सटेरा से सम्मिलित कर रहा हूं जो HTML एंटिटी को वर्डप्रेस एडिटर में डालने से पहले एन्कोड करता है। एन्कोडिंग के लिए कोड है: स्ट्रिंग (str)। Replace (/ & amp; g, '& amp; प्रतिस्थापित करें (/ "/ g, '& amp; # 34;')। (/ '/ G,' & amp; # 039; '); मैंने निम्नलिखित की कोशिश की: .replace (/ \ [/ g,' & amp; # 91; ' ) लेकिन संपादक और के बजाय & amp; # 91 में text दृश्य दिखाता है < / Li> अगर मैं मैन्युअल रूप से & amp; # 91; में text दर्ज करता हूं तो इसे स्वचालित रूप से [ दृश्य और टेक्स्ट के बीच सरल, यह इसलिए है क्योंकि आप & amp; # 91 के लिए ऐसा करने से पहले & amp; amp; amp; amp; amp; / कोड>। इसका मतलब है कि इस समय accolade के लिए रूपांतरण में किक करता है, इसमें कोई भी प्रशंसा नहीं मिलती & amp; # 91 क्योंकि कोई भी नहीं है, अपने को बदलें श्

How can i access photo privacy settings through Facebook Graph API? -

I do not want to use FQL because it is taking too long, leaving my app a special user You need to get all the Facebook pictures of Using the graph API first, getting all the pictures for a particular user, then I use all the pictures to check the privacy settings using FQL A Try but it's going to take hours. Photo object does not have any privacy fields on the graph API. D Does anybody know that there is a way without going through FQL?

android - Need Edit PDF component which will work in objective c, java & asp.net -

I want to develop an editable PDF application that can fully edit the PDF, & amp; It should work on all platforms like Android iPhone. Please suggest a library that will work on ASP.net, iPhone. Android (Objective C and Java and Dot Net platform) Any help would be greatly appreciated. Thanks

php - how to modify time ago script to show time in form of DD-MM-YYYY -

I have a time ago script that changes almost a UNIX stamp as a code example: 1 Minutes My script (PHP): My question : How do I modify this script to show the Unix timestamp, which is 2 years old and dd-mm- Yyy format Explanation for those who did not understand A test code / script & lt; Php $ initial_time = "946681200"; // Unix timestamp is for 1 January 2001 $ period = array ("seconds", "minute", "hour", "day", "week", "month", "man"); $ Length = array ("60", "60", "24", "7", "4.35", "12", "10"); $ Span = time () - $ initial_time; $ Stress = "first"; ($ J = 0; $ span & gt; = $ length [$ j] & amp; amp; $ j & lt; counts ($ length) -1; $ j ++) {$ span / = $ length [$ J]; } $ Span = round ($ span); If ($ span! = 1) {$ periods [$ j] = "S"; } $ Time_elapse = $ span ''. $ Perio

google analytics - Visitor Level Custom Variable showing NO Sessions, Pageviews, etc -

Image
I have a site where I am using GA and setting a visitor level custom variable and then I'm firing an incident to set up. By the way: _gaq.push (['_ setCustomVar', 5, 'visitor' ',' some value ', 1]); _gaq.push (['_ trackEvent', 'VisitorStats', 'Setting', 'Visitor ID', 1, Satya]); Now, every time that visitor comes to the site, or makes a pageview, the session and pageviews should be inserted into the bucket for that custom variable - all right? However, when I look at the report in GA, I see only the values ​​for the "new users" metric. Nothing to "session" of "pageview" Can you explain this behavior? Do I need to "set" custom variables with _trackPageview instead of _trackEvent? Below the image of GA - showing values ​​in the custom variable and 0 bizarre result of sessions and 0 pageviews. Additional information pair went to respond to comments, is something t

android - How to reference a color variable in a xml resource file -

मेरे पास मेरे / डोजोबल डायरेक्टरी में यह XML है: & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8"? & Gt; & Lt; चयनकर्ता xmlns: एंड्रॉइड = "http://schemas.android.com/apk/res/android" & gt; & Lt; आइटम & gt; & Lt; आकार एंड्रॉइड: आकृति = "आयत" & gt; & Lt; कोनों एंड्रॉइड: त्रिज्या = "10dip" / & gt; & Lt; स्ट्रोक एंड्रॉइड: width = "1dip" एंड्रॉइड: color = "# 706969" / & gt; & Lt; ढाल एंड्रॉइड: कोण = "- 90" एंड्रॉइड: startColor = "# 117e7a7a" android: endColor = "# BB7e7a7a" / & gt; & Lt; / आकार & gt; & Lt; / मद & gt; & Lt; / चयनकर्ता & gt; मुझे android: startColor = "# 117e7a7a" को रंग वैल्यू के बजाय एक वेरिएबल के संदर्भ में रखना चाहिए। ¿कैसे किया जा सकता है? समझाया गया है कैसे संसाधनों (जैसे रंग) अन्य संसाधनों / लेआउट से संदर्भित किया जा सकता है। संक्षेप में, उपयोग करें: android:

Print text at specified line number bash -

I want to print text from a file to a specified line number. Here's my bash script line = 12 sed -n "$ line {p; q;}" Line number comes in one variable but the above code is not working What should I do? You must give the filename as the argument of sed . line = 12 sed -n "$ line {p; q;}" filename If you assign a file script to a single bidding script , You need to use: line = 12 sed -n "$ line {p; q;}" "$ 1"

python - Filtering by Foreign Key in Django -

We have enhanced the Django user model with our company record model. Each company record is a user with all the profiles when that user is on the login system, so we can pull data into company records. Our campaign model deals with our company with another company. Thus, each company has several campaigns in the record. I want to take those campaigns related to company records. Basically, a company is a registered user. There are several campaigns of a company record when a company Richter is logged in for a user system, so I want to get it from affiliate campaigns. Keeping in mind, I want to take all the campaigns and filter them, only our users related campaigns will be shown. Required parts of our company # models.py class CompanyRecord (models.Model): user = models.OneToOneField (user) company_id = models.IntegerField (primary_key = true) company_name = model. CharField (MAX_LENGTH = 100) class campaign (models.Model): CAMPAIGN_ID = models.IntegerField (primary_key = tru

jquery - Ajax Json Data null at Controller -

I am holding posts in my controller, but string form data is zero. Because of this, I'm unable to use the anti-web feature, as it seems that all data is lost, maybe I serialzeArray ? My post should not use $ ("#SetCommunicationSettingsForm"). Submit (function (e) {Debugger; var postData = $ (this) .serializeArray (); var formURL = $ (this) .attr ( "action"); $ .ajax ({url: formURL, as follows: "Post "datatype" Jason ", data: Postdeta, success: function (data) {debugger; // data: return to server data if (data.success == true) {$ (" # Sevsyuefsful "). show () ; $ ( "# set Sncharnfrmaria"). ( "# Sumbitcommunity.SettingForm"). $ ( "# SumbitCommunicationSettingForm"). Val ( '& lt;%: ServiceSite.Resources.Resources.COMMON_CLOSE% & gt;'); $ ( "# SumbitCommunicationSettingForm"). Unbind ( 'click'); $ ( "#SumbitCommunicationSettingForm"). CLIC K (closeComm

.htaccess rewrite to index.php infinite loop -

I am creating a clean URL system using .htaccess and php. The main idea is that it works for index.php to rewrite everything and to split / to split the URL, but when I upload it to a web server, I get an infinite loop error . My .htaccess file is: RewriteCond% {REQUEST_FILENAME} on RewriteEngine -dRewriteCond% {REQUEST_FILENAME} -f RewriteRule !. Index.php [L] If I get things correctly - the problem is that it redirects itself to index.php, but it should not be because I have Index.php file that handles everything and revoked code% {REQUEST_FILENAME}! -f should stop writing that. Can you please help me with this .htaccess - I want to write everything like index.php and rewrite it as portable as it could be, so i I can use the following: www.mysite.com www.myothersite.com or even www.mysite.com/new/ < P> I also want to redirect to www.mysite.com/articles/it/2 or even www.mysite.com/articles/ with some index.php like www.mysite.com/articles/2 Are there. It / s

Visual Studio Ultimate 2013: Server Explorer 'Add New Table' and 'New Query' menu items missing -

Image
What's wrong with this picture? In the old VS versions, I was used to see 'Add new table' and 'New query' when I right clicked Tables Hope, someone Where there is some experience with Visual Studio 2013 and the SQL Express database. I also hate this problem but this is a simple solution: Choose your Visual Studio 2013 installer> Sync > Check SQL Server Data Tools option. If you do not have the installer, you can go to download SQL Server Data Tools .

java - Type on keyboard right to left? -

I'm looking for a way to type from left to right from the keyboard though user types I want to value and formatting Are there. I'm trying this. The public class manifold textfile implements TextChangeListener {Private Static last long serial VERSIONUID = 1 L; Private Final StringBuilder MONEY_FORMAT = New StringBuilder (); Public MoneyField () {setWidth ("20%"); SetValue ("0,00"); SetMaxLength (14); AddStyleName ("numeros"); SetTextChangeEventMode (TextChangeEventMode.EAGER); AddTextChangeListener (this); Select all (); } @ Override Public Wide Text Change (Text Change Event) {//000.000.000,00 Brazilian currency format (! Event.gate text) () .tim () IsEmpty ()) {if (event.getText (). Length () == 2) {MONEY_FORMAT.setLength (0); MONEY_FORMAT.append (event.getText ()); MONEY_FORMAT.insert (2, ","); } And if (event.getText (). Length () == 6) {MONEY_FORMAT.setLength (0); MONEY_FORMAT.append (event.getText ()); MONEY_FORMAT.insert (6

java - break to lable as default case in switch statment not behaving logically -

Thank you for reading first. Apart from this, I am very aware of how I can do it, the way I want it, I am just experimenting and not getting the expected result. When I run this code, I hope that when I enter the letter X, I will be asked to try again and try again to write again. Well, I am. However, the program will break to start: based on the new value of the label and the process we found in the default case. If I enter the letter B on my second attempt, nothing in the switch statement is executed. If you enter letter B in your second attempt, the program will print that you have entered B and then the program will terminate. Why is it like this? import java.util.Scanner; Public class support {public static zero main (string [] args) {scanner KB = new scanner (System.in); System.out.println ("Enter the letter B:"); Char input = kb.nextLine (). Fourat (0); Start: Switch (Input) {case 'B': System.out.println ("Good job!"); break; Default: System.ou

go - setting values in a new declartion -

क्या new प्रकार की घोषणा में मान शामिल करना संभव है प्रकार वर्टेक्स स्ट्रेट {X, Y int} func main () {v: = new (Vertex {0, 0}) जैसे की तरह fmt.Println (v) // इसके बजाय : V = नया (वर्टेक्स) vX, vy = 12, 4 / x और y fmt.Println (v)} के मूल्यों को प्रारंभ करने के लिए अतिरिक्त लाइन या क्योंकि " Vertex {val, val} "मूल वर्टेक्स प्रकार के बजाय एक शाब्दिक मूल्य यह संभव नहीं है? आप वास्तव में "नया" की आवश्यकता नहीं है, आप बस लिख सकते हैं: v: = vertex {1,2} यदि आप एक स्ट्रेट सभी सदस्य अपने प्रकार के शून्य मान पर सेट होते हैं (जैसे, 0 ints के लिए, शून्य पॉइंटर्स के लिए, "" स्ट्रिंग्स आदि के लिए), यह भी सरल है: v: = vertex {} // वेटेक्स के समान <0,0} आप यह भी केवल कुछ सदस्यों को आरंभ कर सकता है, दूसरों को उनके शून्य मान के साथ छोड़ कर: v: = vertex {Y: 1} // वेरटेक्स {0,1} ध्यान दें कि इन वी के साथ वेरटेक्स प्रकार का एक चर होगा यदि आप एक सूचक को एक ऊर्ध्वाधर में चाहते हैं, तो इसका प्रयोग करें: v: = & amp; vertex {1,2

ios - how can i detect when a user adds a keyboard language in settings -

When I add a new keyboard language to the user in general settings and my application is in the background, I want to receive notification . Can someone suggest what code is needed to get it, or what preference should I look for? I have tried: - [[NSNotificationCenter defaultCenter] addObserver: Self selector: @sillector (changed by default) Name: NSUserDefaultsDidChangeNotification object: zero];

regex - Redirect non-allowed IP's to specific page with .htaccess -

I have the following code, for example, to allow only some IPs to access the page. denies the order, 123.45.67.8 9 Allow all permissions to be denied from 123.45 & lt; Files ~ ". (Xml | jpe | g | png | gif | js) $" & gt; All & lt; / Files & gt; Allow .. But how can I show the user if the user is not allowed? As such, I want to redirect them to a certain page. Put this code in your DOCUMENT_ROOT / Htaccess file: Rewrite code% {REQUEST_URI} on rewriting! \. (Xml | css | jpe? G | png | gif | js) $ [nc] rewrite% {REMOTE_ADDR}! ^ (123 \ .45 \ .19 \ .72 \ .48 \ .56) Rewrite% {REMOTE_ADDR}! ^ 53 \ .81 \ .21 \ .94 rewrite rules! ^ Maintenance $ Html / Maintenance.html [R = 302, L, NC]

excel - Using VBA to name ranges and create charts with those ranges -

Image
I'm new to VBA I am trying to create more than 500 exclambered column charts using two columns of information And I want to speed up the work. The first column contains the names that I want to use for named ranges (i.e.: line1 , line2 , etc.) and the second column contains indirect references to the data range There are I (i.e., sheet 1! C4: D28 , sheet 1! C28: D90 ). I have noticed that if I use a named range for the "Chart Data Series" field, then the data appears well (but I have already mentioned that named category in reference to INDIRECT Formula to be included), (eg: named range line1 = = INDIRECT (sheet 1! C4: C28) ). Categories will be stable In the review earlier, I am unable to find this solution which can choose the first cell in this set and keep its name, then uses another cell to define that category. I think I might need the ActiveWorkbook.Names.Addname Name: = Combine the formula and it with a loop (but I want to define the add name aspe

Difference in SQL syntax for enabling a constraint (SQL Server) -

क्या इन दो विधियों में कोई अंतर है? वैकल्पिक तालिका [table_name] चेक चेक चेक कन्स्ट्रेंट के साथ [constraint_name] और वैकल्पिक तालिका [table_name] से: जांच के साथ | NOCHECK के साथ: यह निर्दिष्ट करता है कि तालिका में मौजूद डेटा नए या जोड़े गए या फिर से सक्षम विदेशी कुंजी या चेक बाधा के विरुद्ध मान्य नहीं है या नहीं। यदि निर्दिष्ट नहीं किया गया है, तो चेक के साथ माना जाता है। इसलिए, चूंकि यह डिफ़ॉल्ट "इसे चेक" करना है, इसमें कोई अंतर नहीं है।

c# - Add dropdown for a specific cell in a datagridview -

I am trying to add different controls to cells in the same column. The drop down does not display and there is no visible setter: Private Zero AddBooleanDropDown (DataGridView grid, integer line, keyValuePair & lt; string, string & gt; kvp) {DataGridViewComboBoxCell dropDownCell = new DataGridViewComboBoxCell (); DropDownCell.DataSource = New String [] {"True", "False"}; Grid Rows [row]. [["Value"] = dropdown cell; } here is very good. DataGridView provides several column types, allowing your users to enter and edit values ​​in different ways. If these column types do not meet the needs of your data-entry, then you can create your own column type with those cells, which are host controls of your choice. To do this, you have to define the sections to be removed from DataGridViewColumn and DataGridViewCell . You must also define a class that turns out of control and applies the IDataGridViewEditingControl interface.

android - How to receive touch events with linux input subsystem? -

I have a pure C for Android (no Java or JNI available) to read touch events directly from Linux input I'm writing code events (/ dev / input / o). The problem is that I can not find any documents for the Linux Touch Event Interface. How are incidents reported? How to retrive them? Is there no document for Linux touch events? Edit: I have also taken a look at Linux / Input H but there is no special structure for touch events.

reflection - How do you loop through the fields in a Golang struct to get and set values in an extensible way? -

मेरे पास एक स्ट्रक्चर व्यक्ति है। प्रकार व्यक्ति संरचना {प्रथमनाम स्ट्रिंग अंतिम नाम स्ट्रिंग वर्ष यूआईटी 8 } फिर मेरे पास इस संरचना, व्यक्तित्व और व्यक्ति के दो उदाहरण हैं। PersonA: = {"", "ओबामा", 6} व्यक्ति: = {"राष्ट्रपति", "कार्टर", 8} मैं एक ऐसा फ़ंक्शन लिखना चाहता हूं जो कि प्रत्येक क्षेत्र (यानी खाली-खाली) के लिए किसी शर्त को व्यक्त करने के लिए PersonA से PersonB के मूल्यों की प्रतिलिपि बनाता है। मुझे यह पता है कि क्षेत्र के नाम को कड़ी मेहनत से कैसे करना है, लेकिन मैं एक फ़ंक्शन चाहूंगा जो काम करता है, भले ही मैं व्यक्ति संरचना को बदलूं मुझे पता है कि जाओ प्रतिबिंब उपयोगी है, लेकिन समस्या मिल रही है और मूल्यों को सेट करने के लिए प्रकार जानना आवश्यक है, यदि आप SetInt जैसे कुछ का उपयोग करना चाहते हैं लेकिन क्या ऐसा करने के लिए "सरल" तरीका है? ** जावास्क्रिप्ट सादृश्य ** जावास्क्रिप्ट में, आप बस (कुछ ऑब्जेक्ट में संपत्ति के लिए) के माध्यम से पाश को कर सकते हैं। (personA में propt के लिए) {if personA [Propt]!

java - Boolean Array NullPointerException -

This question is already an answer here 3 answers I create one The program that is trying to generate two major numbers between the two given integers (A and B) for the T cases, I am implementing the prime living of the ereothinithy. My code is below I have read that the code mentioned in the code Line NullPointerException me a result of not start Boolean array. However, I thought I did this here: boolean [] n = new boolean [b1]; Therefore, I'm confused as to why this exception is being thrown. I do not know any other possible reason why my code is wrong with My error and input: 1 1 5 PrimeNumberFinder.main (Exception in formula on PrimeNumberFinder " Main "java.lang.NullPointerException .Java: 27) My code: class PrimeNumberFinder {public static void (string [] args) {scanner Scheduled Caste = new scanner (in system.); // Read the number of cases of expected problem from the input int t; = Sc.nextInt (); // Read the entire search for prime

SQL Server Stored Procedure Issue. Get Multiple result From Database -

Here are my stored procedures for getting a list of employees and their term is StartDate and End date . ALTER process [dbo]. [Usp_get_employeehourlyreport] @startdate datetime, select as dendetime * Start with * (Select (Register with fullName registration User ID: Usertime.USIRID) Full name, ISUN.NLL (SAM (hours work), 0) Username The hours worked, where check in between CheckArt and @Adidate Group, checkin between checkin) TBL and I'm getting the result: Full name hour Antonio Jake 0 Antonio Jake 0.016 666 So basically it is displaying a row additional with 0 hours. I have no duplicates in my database full name The table structures are: USERTIME : UserTimeI D int uncheck userID int checked check date datetime Gone LoginStatus Navarraction (50) Checked Day varchar (50) Checked hours Workflow Checked date nvarchar (50) Checked Registration : < / P> UserId int unchecked full name varchar (50) checked Try something like this .... Optiona

html5 - Html justify a word in a div -

I need to justify 3 menus in the column: the length of words is different, but I get them 100% vertical Diva (as appropriate) I tried to use paragraphs for each word along with a proper text-alignment and set each separate letter-difference, but without any result I hope I have this problem and solution Is well interpreted. - Thanks HTML: & lt; Div class = "container vert" id = "left" & gt; & Lt; Div class = "container" id = "menu" & gt; & Lt; A href = "" & gt; & Lt; P class = "menuitem" id = "work" & gt; Work & lt; / P & gt; & Lt; / A & gt; & Lt; Br> & Lt; A href = "" & gt; & Lt; P class = "menuitem" id = "contact" & gt; Contact & lt; / P & gt; & Lt; / A & gt; & Lt; Br> & Lt; A href = "" & gt; & Lt; P class = "menuitem" id = "share" & gt; S

google maps - Android GoogleMaps API v2 -

I have a question related to the Android Google Maps API v2. I want to know that it is possible to get the route speed limit. An example: I am on the way, this is the maximum speed of 50 km / h in real life. I am running 60 km / hour on this route. Now I want to signal to the user-> Hey, you are driving in the GTA so fast, for example: P How can I get this 50 km / hour?

java - NoSuchElement using scanner twice -

im is a working code that reads user input, so that I have a process that only the Has made, reads and returns string. . When it calls twice a process, a NoSuchElementException error which I can not do input reader proc locate it: read public static string () {72 scanner Leer = new scanner (System.in); 73 string entry = leer.nextLine (); 74Lear.Clos (); 75 return entry; } How it can be used: ... system.out.println ("input value"); String padre = enter.rade (); System.out.println ("input value"); 27 string rempled = entrada.rade (); ... Getting im thread "exception in the" java.util.NoSuchElementException: a line found in java.util.Scanner.nextLine (unknown source modulocarga.Entrada.leerEntradaUsuario (Entrada.java:73) modulocarga.TablaSimbolica.addTaxonomica (TablaSimbolica.java:27) to (Principal.java:8) on modulocarga.Principal.main) The first time I call it works fine, it crashes, what can it be? Since there is only one Inp

automation - How to put asserts in Selenium webdriver Ruby script? -

I want to check the value on the UI with the value given in the script. And when comparing these two, it should display the message "Passed the test" in the console. I have written the following code: - browser.find_lement (: xpath, "/ / * [@ id =" total "] / tbody / tr / Td [4] / span "). Value.should ==" $ 466,634,599.67 " But it does not display anything console What may be needed next? Thank you! Abhishek rendering, such as . Should == , it is usually used as a testing frame in the form of RSPC, Mintest, Cucumber, etc. These test structures are designed to be claimed near or to report a failed outcome. Given that you are not using a test framework, you manually handle the results of the results. The easiest way to leave the assurance part and if the statement must be used: element_value = Text.string_element == "$ 466,634,599.67 "puts 'test passed' and 'test' fails 'end' end Not

SolrMeter only works with default Solr core (collection1) -

I have installed a 4.7.1 solver. It already comes with the following core: / example / SLR / archive 1 I added the following core: / example / SLR / iambacket I want to test Solar's performance SolrMeter But I am not able to see the solar meter in the IBCKC core. Even the one that I have tried is: I entered http: // localhost: 8983 / solr < / Li> Since I only want to use the Inboxcut core, I took one collection into the 1 back up folder. Problem: Solarmeters are not able to locate a Solr instance at this place, therefore, all solar meter buttons (such as the play button and "optimize now" buttons were in red). To fix this problem, from the menu bar, I have selected Edit> Settings in the "Query Settings" tab, for the field "URL Solar", I have changed the URL after it: http: / / Localhost: 8983 / solr / itembuckets I have also changed this to the value "Url Solar" field under the "Updates Settings" tab

windows - Wix: Passing a property back from a C# custom action -

Is it possible to return assets back with the YX custom verb? I am trying to find a solution for hours, I have seen many answers, but none of them works for me. Public Segment Custom Action [[Custom Action] Public Stable Action Reports Exam session (session session) {0} session ["FOO"] = "bar"; Return action Success; }} WiX FooDlg.wxs & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Wix xmlns = "http://schemas.microsoft.com/wix/2006/wi" & gt; & Lt; Piece & gt; & Lt; Asset ID = "FOO" /> & Lt; UI & gt; & Lt; Dialog ID = "Fuddalg" width = "370" height = "270" title = "foo" & gt; & Lt; Control id = "foo" type = "edit" property = "food" height = "17" width = "45" x = "50" y = "150" text = "[food]" indirect = "no" / & Gt; &

ios - How do I disable property auto-synthesis of properties in Xcode 5? -

I automatically generate NSUserDefaults accessors based on the @ dynamic properties based on the properties you declare For a library has written a 'preferences' category (see) you like this one. M writes property in file: @property (nonatomic, assign) BOOLSeenIntro; And then add it to the .h file: @ dynamic isininfo; It works fine, but if the user accidentally forgets to put in the @ dynamic line, the compiler automatically identifies the same @ synthesis line will not be a warning, but of course my code will not be used for that property. I want to know that there is no way to disable self-property synthesis for this class. Thank you for answering Nikolai, I remember that to make the LLVM warnings promote errors and to wrap the declaration with that error, I can get the effect I was looking for (if the user If you forget to specify the @ dynamic line, then an error will be raised): // Make sure that we get an error, if we get an error For @ dynam

Is there any way to change the background color activity through java file in android? -

I try to change background color activity via Java file but it does not work Such as Is there a way to change background color via a Java file? (Do not XML file)? You can change the background of activity to drawable < / P> using the code. This way getWindow () SetBackgroundDrawableResource (R.drawable.your_bg); Set or color as getWindow (). SetBackgroundDrawable (New ColorDrawable (Color.GREEN));

Error to compile susy on Mavericks ruby version -

This is my problem that I susy to update susy version (2.1.2, 2.1.1) sass (3.3 .6, 3.3 .4) Ruby 2.0.0p0. Then I start working with the compass clock and send this error to the compilation: WARNING: Something went terribly wrong here. Try adjusting your variable line / 104 / line / theme / 1/8 / gm / sushi-1.0.9 / sass / susy / _media.scss on line 104, in line / library / ruby ​​/ james / 1 / 8 / gm / line break from 'breakpoint' Susy-1.0.9 / sass / susy / _grid.scss, thoughts about thoughts / ideas / ideas / ideas / thoughts about thoughts / ideas / ideas / ideas In 36 containers / containers 'container' I do not know why my project is out of date Attempts to use and not the latest How can I change it? "post-text" itemprop = "text"> Sissi is incompatible with that compass version () so I think that the compass only works with the older version You can install existing ones that should work.

java - GPS Application crash -

I have to write an application that does a lot of things including recording the user's GPS location, when a correct username and password Happens to enter I only want latitude and longitude in that exact moment, the recurring check of that nature or nothing. I think that whatever I was looking for, got anything like this: However, Eclipse did not like the reference because I have not started it yet So that code of the whole code: reference reference = getBaseContext (); LocationManager locMan = (LocationManager) context.getSystemService (context.LOCATION_SERVICE); Logs. I (getclass (). GetSimpleName (), called "Location Manager"); Location loc = locMan.getLastKnownLocation (LocationManager.GPS_PROVIDER); Logs. I (getclass (). GetSimpleName (), "get last known location"); Double latitude = loc.getLatitude (); Log.i (getClass () getSimpleName (), "Latitude:" + Latitude.); Double longitude = loc.getLongitude (); Log.i (GetClass () getSimpleNam

asp.net - Regular Expression to reject special characters except slahses? -

I have a regular Express Vivalid to block all the special characters. I currently have my expression: <<> <0> > / ) I'm new to regular expressions and not to make sure how to write them I have seen the surroundings online, but I have a slash Person is not. Any help? Just place the letter where you want match inside your character Square [] . Regular expression: Since you have said that you are new to regular expressions, I started with This will happen For more information about the characters inside the class squared, take a look at

In SQL Server, how to filter lots of elements across multiple columns -

मेरे पास एक तालिका है, t1 , कॉलम जैसे name , code1 , code2 , ..., code20 कहें, 100K पंक्तियाँ हैं। मुझे एक और लुक अप तालिका है, t2 , जिसमें एक कॉलम है, कोड ; इसकी 10 क पंक्तियाँ हैं और प्रत्येक पंक्ति में एक कोड है। इसलिए, इस 1-कॉलम तालिका में पूरी तरह से 10 के कोड हैं। मुझे t1 में सभी पंक्तियों को फ़िल्टर करने की आवश्यकता है, जिसके पास कोड t2 किसी भी स्तंभ से, अर्थात कॉलम code1 से code20 । दूसरे शब्दों में, t1 में प्रत्येक पंक्ति में, कॉलम में एक कोड t2 में एक बार होता है, इसे कब्जा कर लिया जाना चाहिए। क्या ऐसा करने का एक आसान तरीका है? बहुत बहुत धन्यवाद! यह मौजूद नहीं है का उपयोग करने का एक तरीका है : टी 1 से चुनें। * टी 1 से जहां मौजूद नहीं है (टी 2 से 1 का चयन करें जहां टी 2 सीडोड = टी 1 सीडीडीए या टी 2 सीडोड = टी 1 सीडोड 2 या टीएसकोड = टी 1 .code20); नेस्टेड चयन में शर्त के रूप में में का उपयोग करने के लिए मोहक है, लेकिन यह NULL s के साथ कायरता तरीके से व्यवहार करता है प्रत्यक्ष तुलना का क्रम आसान है। उसमें कहा गया है, एक ही प्रका

math - Calculate Euclidean distance between 4-dimensional vectors -

Assume that I have two 4-dimensional vectors (such as A and B) as follows: < How do I calculate Euclidean distance between these Vectors? Euclidean distance calculus dimension Is free. In your case, Eclidian distance between A and B can be written: d (a, b) = sqrt (sum_ {i = 1} ^ {4} (a [i] - b [I]) ^ 2). Or, more specifically: D (A, B) = sqrt (a1-b1) ^ 2 + (A2-B2) ^ 2 + (A3-B3) ^ 2 + (A4-B4) ^ 2).

Can I call a non-async function asynchronously in Dart? -

I want to decode a GIF with the use of decodgefnimation, but it takes a lot of time and freeze my webplay Causes to do There are no async methods in the library. I saw how to do asynchronous processing in dart, and it seems that I need to use futures, though I'm not sure how to make one for my function. Actually it is not sure what I am doing zero decode (Uint8List data) {future animation = decodeGifAnimation (Data); // But it gives the animation, not the future! Anim.then (ready); } "zero-decoded" Data) {new futures (() => decodegraph animation (data)). Then (prepayer); } or future decode (Uint8List data) {new future (= =)> decodeGifAnimation (Data)) then (prepeare). } If you want to do some async processing, then the method comes back to call like the method decode (data) then (xxx);

nlp - How do I tell if a noun is a person, place, or a thing? -

I am attempting to classify the text and then attempt to map names to a person, place or something I am Is there any way or dictionary to do this? Since you are working with classification, it may be interesting to take a look at Alchemy API , http://www.alchemyapi.com/products/features/ . You have a free API key where you can try things. But it does not stop here, if you want to manually do it yourself, because you can see in the @Tripli answer, Wordnet has mentioned, it's something interesting, and you have now The API is where you can use it like Java and can communicate with WordNet. Plus, you have many things and many are independent, these autohlies are normally in OWL or RDF. You can inquire these otograms and get relevant information. For O ओলॉल्स्ज, you have OWLAPI, which you can use to interact for RDF, you can use Apache Jenna and write a SPARQL statement. In addition, you have dBipedia, which is very interesting and I believe it can solve your problem to

javascript - Scrape website and insert a table into my own HTML document -

I want to be able to remove the table from a website and put it in my own HTML page. For example, I want information included in the table class 'tbbox' on this website: I want to avoid executing any server-side code like PHP, which is inserted in my own HTML page. Maybe use javascript for this? In all the instances, I have provided information only about extracting information in only one CSV or text file. Sorry if this question seems a little vague but I do not know how javascript is going on on webpages and not a web developer. I'm just trying to set up a dashboard for personal use. Which will exponate astronomical information from different websites in the same page, which I can open to get information at a glance. Thank you for taking the time. What you do not want to do is do nothing with web scraping, & lt; Iframe & gt; , which gets the desired information from the second source on the load, here is a reference which can help you with it: Note

python - Pushing notifications from a Django app with one server process -

I have a Django app provided by Gunicorn. I want to add WebSocket Notification to it, PostgreSQL as a message queue And want to add either gaget-socketio or torrenadio as a websoclock server. Can I use the same gonorrower process to serve WebSocket? Or, instead, do I use SocketIOServer of the gadget or SocketServer of Tornadoes? Yes, you can use for example and only one for all requests The process is underway. The default socket-IO requests go to /socket.io/ - You can also use the same URL for socket-requests, as well as for others, but assign them to sub-paths ( Such as for proxy configuration). But still it could mean doing a separate process to serve general HTTP requests (like some simple load balances etc ...).

c++ - How to support MySet<int>::iterator -

I am doing a practice and facing a problem. To resolve this practice, I have a template class like code in my CET STL :: Set as the cover, in the following code, like pair and lieutenant; MySasset & lt; Int & gt; :: Iterator, MySet & lt; Int & gt; :: Iterator & gt; P where the pair comes from STL. Now call me MySet & lt; Int & gt; :: what should be done to support iterator ? I have tried typedef set and typedef T * iterator but they all failed. ============================== Edit =========== ============================== #include & lt; Iostream & gt; # Include & lt; Set & gt; using namespace std; Template & lt; Square t, square q = big & lt; T & gt; & Gt; Class MySet {Public: Iterator = Type name set & lt; T, Q & gt; :: iterator; Typedef typename set & lt; T, Q & gt; :: Iterator Itater; Set & lt; T, Q & gt; Tset; Insert zero (T value) {tset.insert (value); }}; Int main () {MySet &