Posts

java - how to get text which is in frame..my code is here -

सार्वजनिक स्ट्रिंग getTextOfFreeResponceField () फेंकता बाधित है Exception {wait.until (ExpectedConditions.presenceOfElementLocated (By.tagName ("textarea" ))); स्ट्रिंग Savetext = driver.findElement (By.tagName ("textarea"))। GetText (); System.out.println ("संदेश =" + सावितेट + "चयनित"); सावितेट वापसी; } ऊपर दिए गए कोड से मैं कंसोल में टेक्स्ट प्रिंट करने में असमर्थ हूं ... अपने कोड को देखकर मुझे लगता है कि आप पाठ के किसी भी पाठ क्षेत्र से पाठ पाने की कोशिश कर रहे हैं, न कि पृष्ठ पर स्थैतिक पाठ। यदि ऐसा है, तो आप getText () का उपयोग नहीं कर सकते हैं के अनुसार: GetAttribute () का उपयोग करने के तरीके के बारे में जानकारी के लिए देखें।

android - Accelerometer's Min and Max value range and sensor data conversion -

I have a Moto G16 GB device from Motorola, it has a LIS 3H3 axis accelerometer. getMaximumRange () to show its or To select is zero, but for my device I'm getting the value of 39.24 39.24 / 9.8 = ~ 4.00 S My range is +/- 4g But when I just read X, Y, ZD data and store it in the file and see if I value the maximal acceleration to my smart phone then its show will be 76 m / sec2 What does this mean? Is this a bug for my device? How to convert these values ​​into +2g values ​​In my algorithm + 2G format, the value of the value is how to give it? How to sample cut-off or down of sensor data values? Moto J has dynamic configure sensor. It is initially configured in 4G mode. But when you give more acceleration on your mobile, it changes the sensor mode and switches to 8g and still gives you more acceleration, it gets 16g mode automatically, after some time it is on 4G mode Comes back You may have on the sensor echrackback callback on this catego...

How can i crop Image like scanmaster.apk in android -

After seeing great solution on picture crop, I ask again for a lot of questions. Please see the scan master. APK, I want to cropping my image in any shape only in rectangular or square format. When you are calling basic activity to capture or select an image from the gallery. You have to pass some important value pair in intent.

image processing - Write text on existing PNG with Node.js -

I am trying to create a static dynamic badge (PNG) so that the application can be embedded in a static page. I have to use an existing PNG image and write some text along with some nodes on it. I've got a lot of libraries, but all of them have to use ImageMagic or Cairo to have basic dependencies, I would like to avoid installing something else on the server. I have received a letter then, but I can not really understand how to write text on an image with it. How can i do You can use it's print method: Var requires GIMP = "GIMP"); Var filename = 'test.png'; Var imageCaption = 'image caption'; Var loaded image; Jimp.read (fileName). Then (function (image) {loadedImage = image; back to Jimp.loadFont (Jimp.FONT_SANS_16_BLACK);}). Then (function (font) {loadedImage.print (font, 10, 10, image caption) .write (fileName);}) .cache (function (mistake) {console.error (err);});

parsing - Parse French date in python -

Can someone please tell me how can I parse French date in Python? Sorry, if the question is duplicate, but I could not find any. Here I have tried to use the dateutil parser: dateutil.parser import parse_dt from locale.setlocale (Locale Import location) # lc_time, 'fr_FR.UTF-8') ## I had previously set local level ## locale. LC_TIME, 'fr_FR.UTF-8') parse_dt ('3 juillet', fuzzy = True) ## Do not work Default month ## Out [2 9]: datetime.datetime (2014, 10, 3, 0, 0) Parse_dt (u'4 AoA T ', Fuzzy = True) # # Edit the same thing by using the same month Edit: Add some references: I The idea of ​​parsing several dates in the fly is parsing the format of your string in advance without preferring the address: parse_dt (u'Aujourd''hui ', fuzzy = tru) pars_date (u 'Hair, fuzzy = true) other library Edit using: To translate Persian words, I can get it by using the Perseidum Library and some regular expressions: Import = ...

jquery - get javascripts asynchronously using getScripts -

I get some scripts unlimited on my login page $ ($. GetScript ("/ scripts / view / scroll-sneak .js"), $ .getScript ("/ scripts / kendo / kendo custom .jj"), $ .dynamic (function (deferred) { $ (Suspended.rolive)) () () () () () () () () () () () ()) ');}); I have two questions here, How can I take advantage of the browser cache here, because matching always takes fresh scripts. How can I promise that this script will be available on all pages of the same domain. Welcome to the alternative solution Thank you. The answer to your first question is the true set of the cache Jquery also mentioned in a way jQuery.cachedScript = function (URL, option) {// type user data type, cache, and url options = $ .extend (option | | {}, {datatype: "script", cache: True, url: url}); // $ .ajax () because it is more flexible than $$. Return jatiScript / jqXHR object so that we can make callback return jQuery.ajax (options); }; // Usage $ CachedS...

javascript - how to encode non-ascii characters in java script? -

Assuming CH = ¡¡is the estimated output = \ u00e1 but output =% E1 when I survived (ca) and current I use output =% C3% A1 when I use encodermonant (ch) I am using API which accepts unicode characters. Try utf8 encoding for characters Here is the code: Https://code.google.com/p/archfirst/source/browse/trunk/html/apps/bfclient-jquery-backbone/js/libs/utf8_encodeJS? R = 1029