Posts

android - how to refresh layout when i press a button -

When I press a button to change a new language from the new string value but the layout is not changed, how do I Can i do This is my code: btnChangeLng.setOnClickListener (see the new OnClickListener () {@Override click on Public Zero (see V) {string language = "lo"; locale locale = new locale (Language); Locale.setDefault (Locale); Resource Resources = getBaseContext (). GetResources (); DisplayMetrics displayMetrics = resources.getDisplayMetrics (); Configuration Configuration = resources.getConfiguration (); configuration.locale = locale; resources.updateConfiguration ( Configuration, display metrics); Toast. Maketext (Main_activity.es, "Laos", Toast. LNNHTLOS ). To show (); // refresh}}); When I open this app again, languages ​​will change, but when I press a button, I can not make any changes, now I want to refresh my layout. Have you tried to localize this Android? You can refresh your current activity.

c - Why does Valgrind report "Invalid read of size 2"? -

स्ट्रेट आइटम {int a; }; Int main () {item * a = (item *) malloc (sizeof (आइटम)); आइटम * b = (आइटम *) मॉलोक (आकारफ (वस्तु)); लघु * सी = (लघु *) बी; सी + = 3; Memcpy (a, c, sizeof (int)); नि: शुल्क (क); नि: शुल्क (ख); वापसी 0; } एको "आकार 2 के पढ़ने के लिए अमान्य" क्यों करता है? मुझे लगता है कि यह आकार 4 होना चाहिए। वालग्रिंड से उदाहरण संदेश: == 19134 == आकार 2 == 19134 == 0x4C2F7E0 पर पढ़ने के लिए: memcpy @ @ GLIBC_2.14 (/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) == 19134 == द्वारा 0x400625: मुख्य (main.cpp: 19) == 19134 == पता 0x51fd096 ब्लॉक के बाद 2 बाइट्स है आकार 4 आवंटित == 19134 == 0x4C2AB80 पर: malloc (/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) में == 19134 == 0x4005FC द्वारा: मुख्य (main.cpp: 16) मुझे malloc () एक 2x2 एकल चैनल बनावट (4 बाइट्स / uint8_t s)। मैंने मान लिया कि आवंटन बहुत छोटा था - प्रश्न में वास्तुकला पर शब्द का आकार 8 बाइट्स (64-बिट) है - इसलिए मैंने आवंटन दोगुना किया और वाल्ग्रिंड की शिकायतों को बंद कर दिया। चू...

about one function that splits a string with several chars in python -

This is a function that I have found on the internet, but I'm not sure that the line s, res = res , [] Meaning, can anyone explain this to me? Thanks a lot! S: res + = seq .split (sep) in SEC for def my_split (s, seps): res = [s] sps in SSP: s, res = res, [] Returns s, res = res, [] tool s = res res = [] Replacement of variables in a row.

google apps script - Googlesheets - javascript - Hide columns after column 21 that do not equal a given cells value -

itemprop = "text"> My goal is to hide all the columns in all the Google columns based on the text / value of a cell. Range & amp; With column 22 ("U"), the code will hide all the columns in this category, without any line ROW 1 in "J812" (i.e. 812,10), which is a drop down list Is selected through (via data validation). I have been introduced to Java Script now, so please bear up on my innovation! Through search online, I have put my own solution together, the only problem is that when a script is completed, it shows an error ... in a red box, "call reference outside context". I do not know how this error has disappeared ... plz help A part of my code comes from here "" Here's my code: Hide function column () {var ss = SpreadsheetApp.getActiveSpreadsheet (); Var letter = ss.getActiveSheet (); // Get the data var data = sheet.getDataRange (); // Get the number of columns lastCol = data.getLastColumn () + 1; Logger...

dns - SPF record won't validate -

See if our email is being distributed to Gmail in the spam folder, even if it is only with Gmail, we Any possible issue are investigating. Now, we are looking into the SPF record, which looks like this after a cleanup: v = spf1 includes: sendgrid.com This includes: _spf.google.com -all Test We run the result in the "many DNS lookups in the SPF record" error. As far as I know, there are only 2 DNS lookups in the SPF record ... and I examined other SPF records, such as Cendrand and they have more searches and they still have " Return "is the exam. My SPF record is both in the form of an SPF and TXT. Am I missing something? The domain is fulltraffic.net Sample SPF records are three mechanisms that have DNS lookups It may be required: "a" mechanism and two "include" mechanism; this is better than the range of 10 as defined by the latest RFC7208 version (See and this limit was already present in RFC 4408). The culprit here ...

wordpress - Featured image and og meta not showing up in Facebook -

I'm having a problem with thumbnail / featured image, headline and og meta, if I'm pasting a link FB with a specific post but not others. (Flushing the cache on the FB does not work). The WordPress and Yoost SEO plug-in on the site should solve OGY Meta tags if you enter your FB settings correctly in the correct section and I believe I have code in the functions of my subject Stuck. This is my most recent blog post where it has no image or title: - Although it works on other posts On This Debug Tool says: Of course: "D" and: Type 'property is necessary but does not exist'. But this is: It also says: "And the 'og: url' property should be clearly provided, even if the value can be estimated from other tags. "And here it is: Ozzy Meta is exactly at this post as I see As all other posts, the image and other meta information are specifically displayed in FB. I really appreciate it if someone knows why this is happening. ...

angularjs - How can I loop through values in my json file? -

Assume that I have a json file and I would like to loop through values ​​like this: "", "Date": "2014-10-28", "Zodiac": 1111, "Product ID": "2", "Details": "Cash" }; (Value in myModel) {// element (by.model (key)) clear (). SendKeys (value); } This is a part of a jasmine script , but this is not the point Question is how do I write per key through my model ie Can I 'id', 'date' etc. and their values ​​in angular JS? I think you need it: for (Key in myModel) {console.log ("key:", key) console .log ("value: myModel [key]}}