Posts

Showing posts from May, 2014

MongoDB String to Double conversion during aggregation pipeline -

In my documents, decimal values ​​are stored as strings (converted to string due to my BigDCam in Java) . It's absolutely right and necessary when I'm looking at a document at a time. However, I regard them as double during the proper purpose (for example, $ sum). Is there any way that I can repeat the string during $ Project Operations (or otherwise) during my gathering pipeline? That's because my continuous pipeline will sum $ over double field. I do not consider the option of storing them as double, because I will need to keep the base of the document accurate, but I'm fine if the accuracy is lost during the operation. There is no operator to convert to aggregation pipelines. Is it possible to store two different values ​​in the form of BigDisk / String and the other as double / float value? This can be a quick and dirty option if you are okay to ignore the inequality due to temporary point values.

Google Drive SDK - Drive Scopes -

I'm trying to use it: Which Google Drive is SDK for Android I want to be able to list all the files in a user's Google Drive account. Only access to files and folders that are created by the app (or user selected). mGoogleApiClient = New GoogleApiClient.Builder (this) .addApi (Drive.API) .addScope Drive. SCOPE_FILE) .addConnectionCallbacks (this) .addOnConnectionFailedListener (this) .build (); Can Google Dev tell me whether it is possible to list files and folders of users with this SDK, and retrieve the metadata? Only SCOPE_FILE access is allowed. If not, will future reach more? I have tried to use the Java Library (and badly failed), but I can not get it to work. Therefore, I hope that I will be able to include other information from the new SDK (which the Java Library does). Thanks As you watched, currently only available on SCOPE_FILE, Android Users are very much like you have this area, so that they can control which files are being accessed by

Using write.table to write rows row-by-row to a CSV in R, as you would in Python's writerows -

How do I write the CSV file in R, so did I do in Python? In Python, I did this: Import Import CSV Import Numerical Number # Sample Data x = np.asarray ((1,2,3)) Y = np.asarray ((4,5,6)) file name = os.path.normpath ("output_py.csv") f = open (file name, "wb") author = csv.writer (f, delimiter = ',') Author.writerow (X) Writer Author (Y) f.close () writer.writerow works well because I do not need to repeat parameters during writing is . Everything I need to do is specify the array to write. I would like to do this in R. I have done so far: # sample data x Both outputs produce the correct output, 1,2,3 4,5,6 but the problem This is that every time I use the write.table , I have to repeat the parameters. How to write rows without repeating the parameters every time? Any other suggestions for code optimization would be appreciated. Just type your own function write.row , using those criteria Which you would prefer as standa

perl INC content -

after text I'm a newbie in Pearl. Perl is loading libraries from a particular location (@ .inc) to execute the following executables For me to know: For help: Forums: OSNAME = Linux, osvers = 2.6 < Summary of code> $ Pearl V my perl5 (revision 5 version 10 subversion 1) configuration. 9-68.9.lsmp, archname = x86_64-linux uname = 'linux xxxxxx01 2.6.9-68.9.lsmp # 1 SMP Tuesday January 29 09:49:28 2008 x86_64 x86_64 x86_64 gnulinux' ** config_args = '- D -Dprefix = / Home / / / perl_5.10.1 '** sign = recommended, useposix = true, d_sigaction = defined useithreads = undef, usemultiplicity = undef useperlio = define, d_sfio = undef, uselargefiles = define , Usesocks = undef use64bitint = define, use64bitall = define, uselongdouble = undef usemymalloc = n, bincompat5005 = undef Specify the config_args when and how exactly was it. It was during this Pearl installation on this host? Appreciate Tee Support. It was determined when your Perl was confi

iphone - Create new UIImage by adding shadow to existing UIImage -

I have taken a look at this question: but did not work for accepted answers. What am I trying to do is taking a UIImage and putting shadows in it, then a new new UI, shadow and all come back. Trying: - (UIImage *) Image Shadow {CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB (); CGContextRef shadowContext = CGBitmapContextCreate (NULL, self.size.width, self.size.height + 1, CGImageGetBitsPerComponent (auto.cnmage), 0, color touch, kCGImageAlphaPremultipliedLast); CGColorSpaceRelease (colourspace); CGContextSetShadow (Shadow Contact, CGSizeMake (0, -1), 1); CGContextDrawImage (Shadow Context, CGRactMake (0, 0, Self Skies.Wedth, Spie. Size.height), Self. CGImage); CGImageRef shadowedCGImage = CGBitmapContextCreateImage (ShadowContext); CGContextRelease (shadowContext); UIImage * Shaded Image = [UIImage imageWithCGImage: shadowedCGImage]; CGImageRelease (shadowedCGImage); Return shadowed image; } The result is that before I keep it through this method, I get the s

c# - Space represented by a single Kinect pixel at a given depth -

Image
Actually I want to take a straight line between device points and to determine if anything stops it , But in my example, want to make the "laser line" configurable in relation to the distance above the field of view. Now it is only so easy to get in-depth data at a given pixel point. Various Depths INMM = DepthImagePixel.Depth; And it is also easy to say that I want to focus on the 100th line of pixels from the top by doing something like this. (Int i = 0; i & lt; this._DepthPixels.Length; ++ i) //_DepthPixels.Length is clearly 307,200 for 640x480 (if (i & Gt; = 64000 and & amp; i & lt; = 64640) // second vertical pixel line {// Draw line or whatever}} with something like this Ends. but For example, I want to block the line at 50 centimeters from the top of the viewing area at a depth of 3 meters. Now clearly I I understand that the depth increases so much because the area is represented but I am not getting any references or how I work to

AngularJS : multiple promise wait all -

I have a little question about the many promises getInfo: function () { Return promise. Then (function result) {info = result; // This function has also promised to return ServiceA.functionA (info.login). Then (function (favorite) item (info.favorites = favouriteItems; return $ q.when (info);});}); DivX I wrote a reply to another question explaining this problem using the $ q.all approach. Check it out:

matlab - Split word and check spelling error within article -

I want to see the spelling error within an uncle, I have 100 articles, to see if the spelling error No, if an error occurs then the word return is 1 and 0. I want to divide this word into words, then just check. I have done all this here, but the problem is that I could not see the spelling error of the split word. However, I can check with deliberate_mistake = 'tabel'; Output: Suggestion = 'table' checkSpelling.m file / P> < Code> function suggestion = check spelling (word) h = actxserver ('word.application'); H.Document.Add; Correct = H. Check Keyword (word); If true suggestions = []; % Return empty if spelled correctly is% if wrong and suggest, then return them to a cell array if h.GetSpellingSuggestions (word). Count & gt; 0 count = h.GetSpellingSuggestions (words). Calculation; For I = 1: Count Suggestion {i} = h.GetSpellingSuggestions (words) .emem (i) .get ('name'); If at the end% is wrong but there are no suggestions

php ssh password on server -

Our PHP server is using phpseclib for ssh in our cluster. Now, enter the password for the user each time for the cluster. $ ssh = new Net_SSH2 ('www.domain.tld'); If (! $ Ssh-> Login ('Username', 'Password')) {exit ('Login failed'); } Is there a way to ask the user only once the password when login? Then do we in any way store passwords, or open SSI connections? We do not want the user to enter his password all the time. Which would be best / best practice? Thanks

java - Invoking Methods Error -

I am starting a Java in Java when trying to run this program with "Logic 1" (in netbens) argument Or do I have the following message? File name is Media.java Can someone help me? Exception in thread "main" java.lang.RuntimeException: Incompatible source code - unreported exception java.lang.ClassNotFoundException; Should be put in the media or declared. Mine (Media.Java 23) Java Result: 1 import java.lang.reflect.Method; Public Sector Media {Public Boolean Test 1 (String) {System.out.println (s); Back true; } Public int test2 (strings) {return 0; } Public Boolean test 3 (strings) {return true; } Public static zero main (string ... args) {class Try {class <& lt;? & Gt; C = Class.forName (Args [0]); Object T = C. NY instances (); Method [] allMethods = c.getDeclaredMethods (); For (method m: allMethods) {string mname = m.getName (); If (! Mname.equals ("main")) {System.out.println ("affiliate" + mname); Object o = m.inoc (

javascript - first click show markers on google map v3 and the second hide them -

इस सवाल का पहले से ही एक उत्तर है: < / P> 1 जवाब क्या कोई तरीका है गूगल मानचित्र v3 पर यह निर्देश? मानचित्र पर मेरे पास एक बटन है, मैं चाहता हूं, पहली क्लिक पर, मार्करों को दिखाने के लिए और, दूसरे पर, उन्हें नक्शे से निकालने के लिए। अग्रिम के लिए धन्यवाद। // मानचित्र के लिए होटल के मार्करों और इन्फ्राइंडो को जोड़ें google.maps.event.addDomListener (होटल, 'क्लिक', फ़ंक्शन) {for (var i = 0; I & lt; len; i ++) {मार्कर = नया google.maps.Marker ({स्थिति: नया google.maps.LatLng (results.rows.item (i) .lat, results.rows.item (i) .long), मानचित्र: आइकन: आइकन [1], एनिमेशन: google.maps.Animation.DROP,}); मार्कर पीश (मार्कर); google.maps.event.addListener (मार्कर, 'क्लिक', (फ़ंक्शन (मार्कर, I) {return function () {// यदि हम यहाँ infowindow बनाते हैं, तो सभी खिड़कियां infowindow.setContent ("& lt; div शैली = 'पृष्ठभूमि-रंग: लाल;' & gt; & lt; h3 & gt;" + Results.rows.item (i) .nom + "& lt; / h3 & gt; & lt;

python - How to find a file with specific content? -

मेरे पास इस सामग्री के साथ फाइल है: ट्रैश ड्राफ्ट जंक भेजें < / P> और मुझे पायथन के साथ इसे ढूंढना और हटाना है। मुझे पाश को फाइलों को खोजना और फ़ाइल खोलना है और मुझे पता है कि नियमित अभिव्यक्ति कैसे काम करती है, लेकिन रेगेक्स लाइन द्वारा फाइल लाइन को पढ़ता है और मैं सिर्फ मुख्य शब्दों से खोज नहीं कर सकता क्योंकि इसमें बहुत सी फ़ाइलें हैं जिनमें ये शब्द (जैसे 'Send' ) हैं और मैं सटीक सामग्री चाहता हूं। मैं क्या कर सकता हूं? मैंने ऐसा कुछ सोचा: openfile के रूप में (fullsourcefilename) के साथ : openfile.read () == "भेजा \ n ट्रैश \ n ड्राफ्ट \ N जंक ": लेकिन यह काम नहीं करता। एक बहुरेखीय रेगेक्स की कोशिश करें: openfile के रूप में ओपन (पूर्णसोर्सफ़ाइलनाम) के साथ आयात करें: अगर पुनः खोज (r'ent \ n ट्रैश \ n ड्राफ्ट \ n जंक \ n ', openfile.read (), पुनः। मल्टीटाइन): अगर आपके पास बड़ी फाइलें हैं तो यह सबसे इष्टतम जांच नहीं है, लेकिन आपको केवल एक त्वरित और गंदे समाधान की आवश्यकता होती है, तो काम करता है।

Why does Ruby allow me to push an array on itself? -

इस सवाल का पहले से ही एक उत्तर है: < / P> 2 जवाब यह कोड रूबी में मान्य है a = [5,10,15] [5,10,15] एक। एक पश [5,10,15, [...]] सरणी के लिए इंगित चौथे सरणी स्लॉट में परिणाम, (प्रतीत होता है) असीम रूप से रूबी ने यह अनुमति क्यों दी है और क्या कार्यक्षमता किसी भी व्यावहारिक अनुप्रयोगों को पेश करती है? चूंकि रूबी में सब कुछ एक ऑब्जेक्ट है , वेरिएबल्स केवल ऑब्जेक्ट्स को इंगित करते हैं (अधिक सख्ती से, मेमोरी स्थान)। एक सरणी ऐसे संकेतकों का एक संग्रह है, जिसका अर्थ है कि यह एक संकेतक अपने आप को स्टोर कर सकता है। रूबी में यह एक अतिरिक्त सुविधा नहीं है, यह वास्तव में एक अतिरिक्त सुविधा होगी जो इसे अनुमति नहीं दे। अनुप्रयोग के लिए, "" (निर्देशित ग्राफ़ प्रस्तुतिकरण) देखें। हालांकि ध्यान दें, ऐसा कोई सरणी अनंत नहीं है: a = [] a & lt; & lt; एक a.length = 1

smartgwt inline text plus form items -

Image
I am trying to setup a template form using smartgwt which adds text plus form item, but I do not know the smartgwt structure is most suitable, this is what I am trying to do: Basically there are some predefined long text, Some predefined text At places, enter the form widget, like combo box or date picker. The entire structure should be presented to the user in the form of continuous text with options to select on Cambodia, date, etc. The text must be wrapped, end of the lines of the element (a paragraph container) containing Form input (combobox, etc.) in the form of a front of the last text at the same line Should flow. (I will post an image for clarification, but unfortunately I do not have enough reputation) The problem I am experiencing with SmartGT forms is That they are presented in the table structure using the rows to the user and columns which are not consistent with the concept of continuous text. My text is wrapped around the table of the table and the f

linux - BASH: grep/awk/sed to extract variable data -

UPDATE I need to make it clear that Jon8RFC-LT and DOMAIN are just normal for dynamic content Examples are such as IP address and MAC address; Retrieves nmblookup based on IP address and displays full dynamic content If awk is used, then I should have a way to draw 4 dynamic values ​​from nmblookup: IP, hostname / asset name, domain name, mac Address Sorry for the confusion, I updated the code to make it more clear. I have been searching and using my Linux book for a few days and I do not know what I want awk / gawk / grep / examplerep / Sed (I think I have one or more of these I need to: su_nmblookup = $ (nmblookup-A $ ipaddress) which returns < / P> Warning: "idmap backend" option has been removed Added interface eth0 ip = a07d :: a07d: a07d: a07d: a07d% eth0 bcast = b57d :: ffff: ffff: Ffff: ffff% eth0 netmask = fff: ffff: Ffff: ffff :: added interface eth1 ip = b57d :: b57d: b57d: b57d: b57d% eth1 bcast = a07d :: ffff: ffff: ffff: ffff% eth1 netmask

lotus notes - Running Javascript as JSHeader on iNotes Client using IBM Domino Designer for EMail Application -

I have created a subform with a simple link hotspot in IBM Domino Designer. The link only calls the function that adds a signature to the message being edited. Including this subform on the web form (WMMO) works fine when I added a subform in the message form, which runs under iNotes and is not under any web browser, iNotes complains that Unable to find the function. This application comes from a mail template. Javascript function: function InsertSignature () {var body = document.getElementById ("wBody"); Body.value + = "signature"; } I added the function to the JS-Header section of the subform. I assumed that any code written here would be loaded as part of the header of the page, it is common in general. The error I am getting is said: Regions error: Insert signature is not defined. I added a function to the parent's JS-Header, but did not get any help from this. How do any ideas interact with the GUI-elements on the iNotes page? I want t

ios - UIKit Dynamics: recognize rounded Shapes and Boundaries -

Image
I am writing an app where I use UIKit dynamics to simulate the interaction of different circles with each other . I will create my circle with the following circle: self = [super initWithFrame: CGRectMake (location.x - radius / 2.0, location A.a radius / 2, Radius, radius]]; If (self) {(self) Layer Set Corner Radius: Radius / 2.0.0]; Self.clipsToBounds = Yes; Self.layer.masksToBounds = Yes; Self.backgroundColor = color; Self.userInteractionEnabled = NO; } Healthy return; Where the location represents the desired location of the circle, and its radius represents the radius. Then by adding these circles to various UIBehaviours: [_ collapse ed itam: circle]; [_gravity addItem: circle]; [_itemBehavior addItem: circle]; The itemBaviour is defined as: _itemBehaviour = [[UIDynamicItemBehavior alloc] initWithItems: @ [class]]; _itemBehavior.elasticity = 1; _itemBehavior.friction = 0; _itemBehaviour.resistance = 0; _itemBehaviour.angularResistance = 0; _itemBehaviour.allo

dll - Find a reference for a string data reference in Ida Pro -

Image
I would like to hack a DLL. My DLL has an error message (a refund, and no message box) I opened my DLL in IDA Pro. I've got my string data reference but I did not get it from xref when I tried to search by xref, so I could not find "any x-graphic". Can anyone help me? How do I find a reference? I would like to find the test that returns this string to patch this DLL. This is an ODBC driver. This is for a hack, not a crack;) I have a license but I would like to change the restriction in the odbc driver (DLL). Thanks a lot, strings are referred to by strings (third screenshot probably this array). This will translate something like this into the assembly: LiX, String arrary; String ARAE wax ecx, string index load load; Get string index in array mov ex, [xx + ECX * 4]; Eax (dest) = The pointer in the string You need to start the string array to find references (the first string on the array is the reference, hence the referee array).

iOS Google Drive SDK Get Sub folder ID -

that I have listed the files in the following code, which is the root, but it does not list any sub-folders root : NSString * parentId = @ "root"; GTLQueryDrive * queryDrive = [GTL query drive queryFileList]; QueryDrive.q = [NSString stringWithFormat: @ "Parents '% @' and Trashed = Wrong", Parent ID]; [Self.driveService executeQuery: queryDrive completionHandler: ^ (GTLServiceTicket * ticket, GTLDriveFileList * files, NSError * error) {if (error == null) {NSLog (@ "The number of files:% i", [files.items count] ); NSLog (@ "results are"); // files.items on file for array (file in GTLDriveFile * file) {NSLog ("file title:% @ | id:% @", file.title, file.identifier); }} And {NSLog (@ "An error occurred:% @", error); }}]; It lists 7 files in this folder, but at the same level as 7 files, I have a sub folder For example: root-> file1 root-> file2 ... etc all come back but the results are not listed in R

Leaflet taphold to set markers -

I want to set a marker on a sheet map. To achieve this, I tried with little success. In this way I integrate it: $ (map) .off ('taphold'); $ (Map) .bund ('taphold', function (e, option) {... something ...}); It works on the desktop but not on the mobile. 'Map' is an L. map object. The other problem that is associated with it is that I can not get the option. Start and Options. I need this to make a difference to keep a long pole and a marker to pan the map. Does anyone know of this solution? There is actually a systematic implementation of the actual letter written for this: < Code> map.on ('contextmenu', function (e) {.. do something ...}); The problem is that clicking on the right on the desktop is also triggered. Edit: You can call it if (event.button == 2) {...}

c++ - mmap call takes too long (>100 seconds) -

We are currently looking at taking our processes with the mmap call for a very long time. Once the process reaches approximately ~ 2.8 GB, the MMAP takes the call to 100 seconds and is killed by the heart beat mechanism created in this process. Anyone would like to know this problem or will know why it will take more than 100 seconds when asked for memory. Host and compiler information: Host memory: 70 GB OS: All files, Redhat 6.3 compiler: GCC 4.4.6 process memory limit (32 bit): 4 GB no swap configured And if this happens, the host still has 50GB of storage remaining. Stack trace: # 0,55575430 in __kernel_vsyscall () from # 1 0x560f9dd8 mmap () to /lib/libc.so.6 # 2 0x5608f2db New (unsigned int) () /usr/lib/libstdc++.so.6 in /lib/libc.so.6 # 4 0x55fb509a operator from / lib / libc in .so.6 # 3 0x5608fb7e mloc () # 5 0x55f91ed6 std :: out of the original_string & lt; Char, std :: char_traits & lt; Char & gt ;, std :: allocator & lt; Char & gt; &

Need help passing a Struct to a function locally in C -

Creating a simple program related to strings is quite easy, but for some reason, Can not understand how to pass enough. I have declared in my main () structure that I have been impressed by searching on this site that the only way to do this is to create a header file and make that kind of announcement. is it true? main () {struct rect {double x; Double wi; Four colors; Double width; Double height; }; RT, A, B, * REC; And this is where I am trying to pass it: int chk_overlap (struct rect * r1, struct rect * r2) {If (((r1-> x + r1- & gt; width)> = r2- & gt; x) & amp; amp; ((r1- & gt; y)> = (r1 -> y - r2-> height))) {return 1; } And {return 0; }} This is just a trend of my attempt, when I pass it like this, I get a dereferencing for incomplete indicator error. I have also tried to declare it typedef struct rect {double x; Double wi; Four colors; Double width; Double height; } Rectangle; Recap A, B, * REC; It is passing as int chk_ov

c# - Log Stored procedure parameters in new relic trace -

We have new residue logging inplex, and I can see our stored procedure call, but I actually include parameter values Would like to do the trace details inside. Is there an easy way to do this? (App is an asp.net web app) Errors and transaction trace parameters can include parameters , Yes. You must use the .NET API. Instructions for implementing the API can be found here: One of the two ways is used for this: AddCustomParameter (System.String, System. AddCustomParameter (System.String, System.String) for String Values ​​ For more information about numerical values, more information is included in the page by clicking on the right-hand down arrow of each method .

readline - R: navigating history and tab command completion do not work -

I have updated my R key and stopped normal command line navigation in R. In particular, the tab key transfers the cursor and does not compete against the command, the up-arrow key produces "^ [[A"] instead of remembering the last command for the second command. I can not even edit a command because the left and right keys do not take the cursor My OS Fedora 20 (Everything else is fine on my other machine with Debian). Thanks for any indication.

php - Using Javascript to enter data in to form fields in an iframe -

This is not the "how" question at this stage, and more "I can" I am capturing form data at / page1.php - but the submission / page2.php has been loaded, which contains more form fields that are displayed through an iframe. The load that is hosted on the other server (just in case that makes a difference). I have a question; I hope this makes sense, but if someone needs explanation, please let me know. Thanks This part is important: < Blockquote> The form that is loaded is hosted on another server (just in case that makes a difference). There is a big difference, why is it here: "The same basic policy prohibits the document or script loaded from an original source How to talk with a resource from other originals. " You can try to use some Ajax to interact among pages.

go - Catching Ctrl+c on cygwin -

The following Golg line holds Ctrl + c while running from the prompt, but when I press it Ctrl + C when I run it from the cigin Grab anything when it goes. When the Ctrl + C is pressed, what does the signifier do? My OS is running Win7 64bit 32 bit SAGVIN. func main () {c: = make (chan os.Signal, 1) signal.Notify (c, os.Interrupt) go func () Sig: = class c {fmt.println} (Sig.String ())}} () time Sleep (5000 * time. Milliseconds) fmt.println ("rich")} The answer I get in the Sigwin Mail List is that the program should be compiled to give a signal to work and Sigwin linked with a compiler and Linker is not a supported platform for Golland, so I I'm not able to catch Ctrl + C in the Golland program launched from

java - How to access database using Spring MVC -

I am going through reference documents - using the Spring Architecture to connect the database to a web application. Here, the code creates a JDBC template using datasets. Public Sector JdbcCorporateEventDao Corporate Aventador {Private JdbcTemplate jdbcTemplate; Public Zero SetDataSource (Datasource Data Source) {this.jdbc Template = New JDBC Template (Datasource); } // JDBC-supported support for methods on corporateEventDao ... ... The data source is defined in an XML file - & Lt; ? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Bem xmlns = "http://www.springframework.org/schema/beans" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schema location = "http: // Www .springframework.org / schema / beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> & Lt; Bean id = "Corporate Avantao" class = "com.example.jdbcCorporateEventDao" & gt; & L

Receiving unicode string in c -

I want to write a simple program that receives a Unicode string. However, although I compile in Unicode, it seems that my wscanf function looks on string as ANSI string. My code is the same: wchar_t name [25]; Wscanf (l "% s", name); What am I missing? You can specify the format specifier % ls ( % Lc ). wchar_t name [25]; Wscanf (l "% ls", name);

python - Django nose testing order -

I am using the nose with Dijan nose for your tests However, I The problem is being smartly ordering your tests It has been said that in order to execute the nose in alphabetical order, however, this is not a matter with me, no matter what I do I am (my code order, change the names of the functions, clear the compiled files). T runner is very chooses to order. I can definitely divide this big test into the function which I will call, but I believe that there is a better way What do I miss ? Did anyone face the same problem? Side Information: I'm testing against a series of ~ 10, so I argue - especially in my case - against 'test separation'; Rewriting the past actions for each test is not the smartest, nor time efficient in Meri Ray ... and amp; This is where the execution order comes in place. I know this, but I can not "setup" the nose plugin properly, nor the answer to the naming function is working thanks in almost non-stop research After 2 d

php - Catchable fatal error: Object of class DOMNodeList could not be converted to string -

I'm working on my PHP to get the list of URLs. I am using domdocument which for input I have to get the list of URLs and I want to send the request to each url to get the return string. When I tried to do this: if ($ link-> getAttribute ('href')) (if (! $ Link- & gt; ($ Id- Href ')); $ Url = str_replace ("", "% 20", $ link-> getAttribute ('href')); Echo $ url; Echo "& lt; br & gt;"; $ Sdoc = new DOMDocument (); $ Sdoc- & gt; Strict ErrorChecking = false; $ Sdoc- & gt; OK = true @ $ Sdoc- & gt; LoadHTMLFile ($ url); $ Spans = $ sdoc- & gt; GetElementsByTagName ('period'); $ Spans echo; }} I will find: Catastrophic Fatal Error: The class dogdomist's object could not be converted to string. Error is jumping on this line: resize $ spans; Here is the list of time strings for each URL that I want to parse: & lt; Span id = "time1" & gt; 4: 00 of the Prim

css - Is it OK to use both old and new flexbox syntax for wider compatibility? -

.flexcontainer {display: box; प्रदर्शन: फ्लेक्स; } यह लगता है काम करने के लिए ... लेकिन क्या यह एक अच्छा विचार है? मैं पुराने एंड्रॉइड (2.x) और साथ ही नए आईओएस और एंड्रॉइड ब्राउज़र्स पर काम करने के लिए फ्लेक्सबॉक्स प्राप्त करने की कोशिश कर रहा हूं। मुझे इस समस्या के बारे में उपयोगी सीएसएस-ट्रिक्स लेख मिला। ऐसा लगता है कि इन पंक्तियों के साथ सबसे अच्छा तरीका है: प्रदर्शन: -वेबकिट-बॉक्स; / * ओल्ड - आईओएस 6-, सफ़ारी 3.1-6 * / डिस्प्ले: -मोझ-बॉक्स; / * ओल्ड - फ़ायरफ़ॉक्स 1 9- (छोटी गाड़ी पर ज्यादातर काम करता है) * / डिस्प्ले: -एमए-फ्लेक्सबॉक्स; / * TWEENER - आईई 10 * / डिस्प्ले: -वेबकिट-फ्लेक्स; / * नया - क्रोम * / डिस्प्ले: फ्लेक्स; / * नई, युक्ति - ओपेरा 12.1, फ़ायरफ़ॉक्स 20 + * / -वेबकिट बॉक्स-फ्लेक्स: 1; / * ओल्ड - आईओएस 6-, सफ़ारी 3.1-6 * / -मोज़-बॉक्स-फ्लेक्स: 1; / * ओल्ड - फ़ायरफ़ॉक्स 1 9- * / चौड़ाई: 20%; / * पुराने वाक्यविन्यास के लिए, अन्यथा गिर पड़ता है * / -webkit-flex: 1; / * क्रोम * / -एमएम-फ्लेक्स: 1; / * IE 10 * / फ्लेक्स: 1; / * नई, युक्ति - ओपेरा 12.1, फ

objective c - Sorting array of wrapper objects in iOS using NSSortDescriptor -

I'm trying to sort an array of UserWrapper objects. The object is the object in the object, and the user object contains the property username (which I want to sort). It is easy to sort an array of users, but additionally added layer UserWrapper makes things complicated for me Please help! This is my code, which works for a simple user array: NSSortDescriptor * nameDescriptor = [[NSSortDescriptor alloc] initWithKey: @ "UserName" Ascending: Yes selector: @Sillector (localized CASINENCYCAVE COMPRESSOR :)]; NSArray * Diverter = [NSArray arrayWithObject: nameDescriptor]; NSMutableArray * contactsStartingWithKey = [nameIndexesDictionary objectForKey: aKey]; [Type sorting descriptor with contact starters: descriptor]; // Exception was thrown here because the userName UserWrapper has no property, but UserWrapper.User < The key type of argument can have an key path in your case also: [[nssordiscripter alloc] initWithKey : @ "User.UserName" ascendi

python - Openpyxl 1.8.5: Reading the result of a formula typed in a cell using openpyxl -

I'm printing some formula in one of the Excel sheets: wsOld.cell (Line = 1, column = 1) .value = "= B3 = B4" But I can not do this to introduce some other logic, as such: if ((wsOld.cell (line = 1, column = 1) .value) = 'true'): # Copy the second line of the second line Even when I'm trying to print results in the command line, I touch the formula Mapt hereby: > gt; & Gt; Print (wsOld.cell (line = 1, column = 1)) & gt; & Gt; & Gt; = B3 = B4 How can I get the result of the form in the cell and not the formula? OpenPaxL either supports the formula or value of the formula. You can choose whether to open a workbook by using the data_only flag. However, the OpenPixel will not calculate the result of a formula and will not. There is a pycel out of libraries like that which is to do.

opengl - what parameters does the function texture() takes? -

फ्लोट बनावट (gsampler2DArrayShadow sampler, vec4 P, [float bias]); ओपनजीएल ES (शेडर लांग) में इस फ़ंक्शन को देखें मुझे gsampler2DArrayShadow और sampler2DArrayShadow के बीच का अंतर नहीं समझता। क्या आप यह समझा सकते हैं? मैंने पढ़ा है कि 'जी' का कोई मतलब नहीं है या मैं या यू लेकिन फिर इस प्रकार क्या है? इसके अलावा, क्या [फ्लोट पूर्वाग्रह] का मतलब है कि हमारे पास 2 फ़ंक्शन हैं: इस पैरामीटर के साथ और बिना? कभी भी आप एक कोड के साथ एक प्रपत्र प्रोटोटाइप में prefixed GLSL में एक चर प्रकार देखते हैं, यह एक लघुकथा सम्मेलन है जिसका मतलब है कि इसके लिए अधिभार है हर प्रकार के डेटा उदाहरण के लिए, gvec स्वीकार करने वाला एक फ़ंक्शन इसका अर्थ है कि इसमें ivec , uvec , vec , < Code> dvec , bvec और इतने पर। डेस्कटॉप GLSL फिक्स्ड / फ्लोटिंग-प्वाइंट के अलावा पूर्णांक नमूने के लिए समर्थन है ताकि आप बहुत सारे देखेंगे gsampler ... के बजाय sampler ... का उपयोग करके फ़ंक्शन परिभाषित करता है, जिसका मतलब है कि फ़ंक्शन में isampler ... और usampler है। .. अधिक परंपर

ios - NSPredicate weird crash with NSString -

I went created a method for'm trying to get a Kordeta unit on the basis of his name, so , which accepts a name parameter (NSString), so this method: - (minus) Pegrgrashbannam: (NSString *) catName {NSFetchRequest * fetchRequest = [[NSFetchRequest alloc] init ]; NSLog (@ "category name:% @", catam); NSError * Error = Zero; NSEntityDescription * entity = [NSEntityDescription EntityForName: @ Managed Object Contains in "Grading": self.managedObjectContext]; [FetchRequest Set Entity: Entity]; NSPredicate * predicate = [NSPredicate predicateWithFormat: @ "categoria == '% @'", cat's name]; [FetchRequest set candidate: count]; // [fetchRequest setFetchLimit: 1]; NSArray * fetchedObjects = [[Self-managed object contaxes] executeFetchRequest: fetchRequest error: & amp; Error]; If (fetchedObjects.count> 0) {_categoriaAtual = [fetchedObjects objectAtIndex: 0]; } Else {NSLog (@ "Category not found"); }} So I can call in my co

javascript - How to get a subselection of a D3.js selection -

I'm trying to get a sub-selection of a given D3.js selection. Creates the code path: pieces.paths = pieces.groups .append ("path") .attr ("fill", function (d) {return d .data.color;}); Then, I set the D "D" attribute: pieces. Penetration .attr ("d", arc); To do the right thing but pieces. There are 3 elements in the pith, and I want to set the first two elements in the class "highest". How can I do this? is an option: pieces. Filter (function (D, i) {returns i <2;}) .attr ("class", "supreme");

css - javascript image cropping/resizing -

OK, it is not certain what is technically called or how it is done. But how will you make big images - go about getting landscapes and pictures and shaping them, so that they really fit the dimensions of a particular divis without losing aspect ratio? You can use to create image scale and cover the entire element at the same time Are there. Just note that you need to set the image as a background image: background-image: url (...); Background size: cover;

javascript - Show/Hide button loses styling on some browsers when clicked -

I have a show / hide button on a simple webpage, which is a display is a script for viewing text Calls: However, on some browsers (most notably mobile browser), when I click to show, click on the button it loses styling properties and does not work properly. Here is the html: & lt; Div id = "description" & gt; & Lt; Div class = "showHide" & gt; & Lt; Input id = "showbox" type = "button" onclick = "show ()" value = "show app description" /> & Lt; Input id = "hidebox" type = "button" onclick = "hide ()" value = "hide description" /> & Lt; / Div & gt; & Lt; Div id = "descText" & gt; & Lt; P & gt; Description text to be shown on click & lt; / P & gt; & Lt; / Div & gt; & Lt; / Div & gt; Script: & lt; Script & gt; Function show () {document.getElementById ('descText'). Styl

html - Select Spills Over Display Table Cell Parent Container -

I can not think of a better title! I have a pseudo-table structure using the code "& Gt; & Lt; Div class = "table-cell" & gt; & Lt; Gt selection and; & Lt; Options & gt; It's really an option with really long value! & Lt; / Options & gt; & Lt; Options & gt; Here is a general value & Lt; / Options & gt; & Lt; Options & gt; And if this value is too long, then it increases the parents choose! & Lt; / Options & gt; & Lt; / Select & gt; & Lt; / Div & gt; & Lt; Div class = "table-cell" & gt; Cell 2 & lt; / Div & gt; & Lt; Div class = "table-cell" & gt; Cell 3 & lt; / Div & gt; & Lt; / Div & gt; This is styled using the CSS ' display: table-cell , as follows: . Table {display: table; Width: 100%; Table-layout: Fixed; } .table-cell {display: table-cell; Padding: 1am; Width: 33%; Border: 1 px solid # f 60; } The problem

c - error: comparison between a pointer and an integer -

I am trying to write a simple shell that can control redirection. However, I get "error: comparison between a pointer and an integer". I understand why I am getting the error, but I am unsure about fixing it. Args is declared as: stable char * args [512]; This is the code where I'm getting the error: if (args == ' If the error is in line (Args == '& lt;') and if (Args == '>') Any suggestion welcomed I think args is a pointer char (if it is), then you Comparing pointer with single character. You can do this: if (args [0] == '& gt;') // then do something

apache - Why i am getting "File does not exist" in error log? -

I have a definitive question like "a nightmare" and hopefully you have one of my help to get rid of it there is time. I've checked my "error log" file and I think it increases significantly by eating my disk space every day. The problem occurs when a person has said giving an error to the URL: "File does not exist" [Sun April 27 14:23:51 2014] [Error] [Client 12.123.123.123] The file does not exist: / home / games_website / public_html / adult-games, referrals: Actually "adult-games" is not located in my actual folder root folder, but from this database Dynamically generated "Category name" is the nickname. I have followed several .htaccess instructions to follow such requests: ## Start mode_driight engine option + follow-up option options -index rewritingign on Reverebage / ## Ensure that all URLs have trailing slashes. RewriteCond% {REQUEST_FILENAME}! -f RewriteCode% {REQUEST_URI}! (. *) / $ Rewrite rule ^ (. *) $

io - Filesystem lock in Java -

I am using a file system lock when reading and processing lines from a file. The reason for this is that there are more than one application server in my architecture; I only want one server to process every row to avoid data copy. I am making a DTO in a subsidiary law. Object lock is populated with details, which can be returned by the helpful method and can be checked later if the lock is successful or not. If so, the file can be processed on-line. Typically, if two servers process and process the line in the file at the same time, an exception is entered by one of them as the file is locked by another if such a , My code spreads an exception and just goes to the next line in the file. Lock is implemented below: string filename = & lt; Processing unique identifier recording & gt;; File lockfile = new file (System.getProperty ("java.io.tmpdir"), file name); RandomAccessFile Random AccessFile = New RandomAccessFile (Lockfile, "RW"); File channel

windows - What is the Oracle equivalent of the SQL Server command line utility (sqlcmd.exe)? -

What is the equivalent of Oracle of SQL Server Command Line utility to execute SQL, which is contained within the file? I need to do this from a Windows machine. In addition to installing Oracle Client, is there something that it needs to be installed to run from Windows? contains the sqlplus.exe command line to run the SQL command Provides interface.

Python Programming encoding numbers to letters -

I am trying to create a code that is 00 = a 01 = b and it should be done, for example, Str2numsp ('i like python' 'string' 3452110810045241241907141353 'should return. Do you want to use any number on 0 or you can use the unicode value of each character such as: ord ("a ") -> 97, ord (" b) -> 98 .. etc Then you myString = "I like python" and use a list comprehension [ord (i) in [myrring] Which output [73, 32, 108, 105, 107, 101, 32, 80, 121, 116, 104, 111, 110] then insert them as strings ".include ([str (ord (i)) in iString ) returns the final output '73321081051071013280121116104111110' If you want to start with zero < Code> 'a' , you can always decrease 97 (which is 'A') from each code, But you should be careful about special characters (spaces), punctuation marks, etc.).

php - GoDaddy htaccess redirect site root to public folder -

यहां मेरी साइट का नक्शा है: /www.myMainSite.com | .htaccess | Index.php | + --- / www.myShaerHostedSite1.com | + --- / www.myShaerHostedSite2.com | + --- / www.myShaerHostedSite3.com | .htaccess | Index.php | + --- में शामिल हैं | Config.php | Functions.php | \ --- सार्वजनिक | .htaccess | Index.php | + --- त्रुटियां | 404.php | | + --- फॉर्म | Forms.php | | + --- व्यवस्थापक index.php ये मेरे लक्ष्य हैं: www.myShaerHostedSite3.com को पुनर्निर्देशित करें यूआरएल से सार्वजनिक निकालें उप फ़ोल्डर www.myShaerHostedSite3.com/public फ़ोल्डर पासवर्ड > पासवर्ड < एक कस्टम त्रुटि 404 पृष्ठ मैं भी सभी पृष्ठों और सबफ़ोल्डर को देखना चाहता हूं जैसे वे साइट रूट पर रहते हैं: www.myShaerHostedSite3.com/public /about.php ==> www.myShaerHostedSite3.com/about.php www.myShaerHostedSite3.com/public/forms/forms.php ==> www.myShaerHostedSite3.com/forms/forms.php मैं एक GoDaddy होस्टिंग साझा कर रहा हूँ। मुझे पता है (अब) कि बहुत सारे वेब डेवलपर्स उन्हे

visual studio 2012 - Using Iff and Sum SSRS -

I am struggling with my expression, I can remove any value of WebSoldPriceForFmvRatio I am trying and I have tried several attempts to use the combination of iif and sum statements, and in the LastFMV Hiper Mouth Multiply Come back together. Am I using the IFF statement correctly or do I need to use another conditional? Code: = code. (SM (IIF (field! IRPeer monthaprised.value = 0, fields! WebSoldProfFor FMVRTO value, 0)), SM (IIF (Fields! Earpiere Monthored Xerized) .Value = 0), field! LastFMV.Value, 0)) < Li> Your WebSoldPriceForFmvRatio is not in your dataset of table / matrix in same dataset . . Also remember that field names are case sensitive . It must match the field name under the dataset. WebSoldPriceForFmvRatio WebSoldPriceForFmvRatiO or WEBSoldPriceForFMVRatio

multithreading - process files in parallel C# -

I have this code that reads all the words from the file and specifies the ID for each unique word and it's in a dictionary I need to run it in parallel to increase the efficiency of the application. I tried to use foreach instead of parallel.ForEach , but the efficiency has not increased using the lock to add new words and IDs. Can you help people tell me this by telling me how can I explain this code parallel? // Fixed Object Locker = New Object (); String [] fnames; File files are collected by saving the file. & Lt; String, index entry & gt; ID = new dictionary & lt; String, index entry & gt; (); Foreach (var fname in the format) {string [] line = file. Readlline (FNA); For (int i = 0; i & lt; lines.Length; i ++) {string [] Raw = Regex.Split (line [i], @ "\ w +"); For (int j = 0; j end lie; raw; langeth; j ++) {string z = raw [j]; If (id! Kantsenseake (jade)) {id.ed (z, new index indicator); }} If the code for this block is accessed b

sed - Simplify text processing pipeline with awk -

मेरे पास निम्न पाठ डेटा है (अत्यधिक सरलीकृत): dn: cn = config ObjectClass: olcGlobal cn: config कुछ: गुणों dn: cn = {0} kerberos, cn = स्कीमा, cn = config ऑब्जेक्ट क्लास: olcSchemaConfig cn: {0} केरबोर्स कुछ: गुण कुछ: जंक कुछ: अधिक जंक dn: olcDatabase = {- 1} फ़्रंटएन्ड, सीएन = कॉन्फ़िग ऑब्जेक्ट क्लास: ओएलसीडीबेसकुंजः कुछ: गुण वांछित आउटपुट है: डीएन: सीएन = केरबोर्स, सीएन = स्कीमा, सीएन = Config ऑब्जेक्ट क्लास: olcSchemaConfig cn: kerberos some: properties मैंने इसे प्राप्त करने के लिए निम्न शेल पाइपलाइन लिखा है: awk -vRS = -vFS = "\ N" '/ kerberos / {प्रिंट $ 0}' /tmp/input.txt | \ Sed 's / {0} केर्बोरोस / केर्बोर्स /' | \ Sed '/ some: जंक /, $ d' यह सिर्फ ठीक काम करता है, लेकिन मुझे लगता है कि यह 'धोखा दे रहा है' मैं एक एकल ए्वकी स्क्रिप्ट का प्रयोग करके इसे कैसे लागू कर सकता हूं? स्पष्ट रूप से, आपको केवल एक sed कमांड, दो नहीं: sed -e's / {0} केरबोर्स / केर्बोरो / '-e' / कुछ: जंक /, $ d ' <

python - "Got 1 columns instead of ..." error in numpy -

I am working on the following code for random forest classification on train and test sets; Scheln. Import from RandomForestClassifier numpy import from genfromtxt, savetxt def main (): dataset = genepromast (open ('file path', 'r'), delimiter = '', dtype = 'f8') target = [x for x in dataset [0] Train = [X [1:] for X in the dataset) test = genfromtxt (open ('file path', 'r'), delimiter = '', dtype = 'f8') rf = RandomForestClassifier (N_estimators = 100 ) Rf.fit (train, target) predicted_probs = [[index + 1, x [1]] for index, enumerate in x (rf.predict_proba (test)] savetxt ('filepath', predicted_probs, delimiter = ', ', Fmt ='% d,% f ', header =' id, estimation 'Qualification', comments = '') if __ name __ == "__ Muky__": main () However, I get the following error on execution; ----> Dataset = GenePromatex ('C: /Users / Saurabh / Desktop / pgm / Kora

android - Is it possible to have a listView of items in the header of an expandableListView -

Image
Actually I need to have some content dynamically available through an adapter to fill the title of my expandableListView It should be possible but there is really a hard time finding any resource on this issue. Here is a presentation that I want to do. Yes, but you have to override the header such as last expandableListView lExpView = (ExpandableListView) view.findViewById (set a height for listV in R) Will require onGlobalLayout () , and. Id.expandable_list); ViewHDR = getActivity () GetLayoutInflater (). Flowers (R. LayeyPage_Header, LxPew, False); Last ListView lView = (ListView) viewHdr.findViewById (R.id.item_hdr_list); ... lView.getViewTreeObserver (). AddOnGlobalLayoutListener (New ViewTreeObserver.OnGlobalLayoutListener) {@SuppressLint ("NewApi") @SuppressWarnings ("Counter-Notification") @Override Public Zero onGlobalLayout (if {lView.getVisibility () == View.VISIBLE) adjustTotalHeightOfListView (lView, lExpView) ; If (android.os.Bu

postgresql - php remove whitespace during export to csv -

itemprop = "text"> After I trim the values ​​of the empty space as I output, the query results from PostgreSQL in my PHP script Having trouble The line of comment is an array returning from a print_r (); & lt ;? Php $ db = pg_connect ("host = local host dbname = user trial = test password = test"); $ Result = pg_query ($ db, "SELECT * table WHERE field = 'test'"); $ Array = pg_fetch_all ($ result); // array ([0] = & gt; array ([ID_NUMBER] => 214 [country] => Zanzibar [area] => Unguja [site] => Chumbe Island Coral Park (CHICOP ) [Username] = & gt; n) [1] = & gt; array ([ID_NUMBER] => 213 [country] => Zanzibar [area] => Unguja [site] = & gt; ; Chumbe Island Coral Park (CHICOP) [user name] => N ^ ("Trim", $ array_explode); $ array_implode = burst ("", $ array_trimmed); not set ($ array_explode); // **************************************************************** .csv ',

.net - Async abstract method and derived classes in API design -

Image
मेरे पास सार वर्ग MyAbstractDoerClass है जिसमें एक सार विधि है DoItAsync का पालन करें: सार्वजनिक वर्ग MyAbtractDoerClass {सार्वजनिक सार कार्य DoItAsync (); } इसमें कुछ व्युत्पन्न क्लाइंट पेंटरक्लास और एराएरक्लास भी हैं: पब्लिक क्लास पेंटर क्लास: माईएबट्रैक्ट डोर क्लास {सार्वजनिक ओवरराइड एएससिंक टास्क DoItAsync (); } सार्वजनिक वर्ग EraserClass: MyAbtractDoerClass {सार्वजनिक ओवरराइड async कार्य DoItAsync (); } अंत में, एक फैक्टरी पद्धति है जो इन दो श्रेणियों में से किसी एक का उदाहरण देता है। हस्ताक्षर कुछ ऐसा है: सार्वजनिक MyAbstractClass फैक्टरी (स्ट्रिंग डोर टाइप) अब, मेरा कोड ऐसा दिखता है: var करियर = फैक्टरी ("चित्रकार"); कर्ता का इंतजार करो। DoItAsync (); // & lt; --- यहां समस्या है यह देखते हुए कि MyAbstractClass.DoItAsync विधि एक सार है, इसे async के रूप में चिह्नित नहीं किया जा सकता है और इसके कारण मैं API क्लाइंट में खोजशब्द का इंतजार नहीं कर सकता। इससे मेरे एपीआई उपयोगिता बहुत खराब दिखती है। मुझे संदेह है कि मेरे डिजाइन में कुछ गड़ब

java - convert string to date format error -

I want to change the string but the output date is different from the input date string Date string = "04/01/2014"; Simple Format Format = New SimpleDormat ("MM / DD / YYYY"); Try {date date = format.parse (dateString); Println (date); } Grip (ParseException E) {// TODO self generated blocking block e.printStackTrace (); } Output Sun Dec 29 00:00:00 EET 2013 < P> Your format string is incorrect, from - D day in year 18 9 D day in the month of the month And y year year 1996; 96 Y week year 200 9; 09 So, you wanted - string dateString = "04/01/2014"; Simple Format Format = New Simple Format ("MM / DD / Yay"); Try {date date = format.parse (dateString); Println (date); } Grip (ParseException E) {// TODO self generated blocking block e.printStackTrace (); }

php - Displaying same page with diffrent content based on database -

I needed some help in php. I am creating a website in php for a website which is information displayed for each teacher, so the same page will appear in different information, depending on the login email! Right now, I have created my database and login script, but it is without session or cookies, do I need both of those which are a thank you in advance for displaying a different information with mysql query ! ---------- login.php ---------- ? Php require_once ('init.php'); Include_once ("scripts / connect.php"); $ Login_error = ""; $ Email = ""; $ Password = ""; If (isset ($ _GET ['login'])) {$ email = strip_tags (mysql_real_escape_string ($ _ POST ['email'])); $ Password = strip_tags (mysql_real_escape_string ($ _ POST ['password'])); $ Sql ​​= mysql_query ("Select mail_secinegent, Nom_Enignet, MODE_SE_PAPE with ESINGENT where mail_signit = '" .mailer "and thick_de_pace ='"

Return multiple row numbers for a particular value in one column in Excel -

Image
I have a column A date (month, day, year) in ascending order. I want to identify row number in column A along with 1980, line number with 1981, etc. I thought if I would make another column in the first year in which only the year (because I don`t need month and day), and then use a formula that is specific Will call the row number of cells containing the year. With match formula, it returns only 1 row number; I want to call all the line numbers that have a specific year. You can try it, assuming that you are in column 1 of your year 1A Keep it in Cell B1: = MATCH (1980, A1: A990) and in cell B2 this is: B10 : = IF (ISNUMBER (MATCH (1980, indirect ("A" and text (B1 + 1, "0") & amp; ": A10"), 0) + B1), Match (1980, Indirect ("A" and Text (B1 + 1, "0") and ": A10"), 0) + B1, "") < / Pre> Result:

coffeescript - textarea limit to 250 words jquery -

Hello there is a way to limit words in the text, such as using maxlength The same function is only with the use of Jquery or coffeescript and keyboard function because I need to display an exact counter. I am searching around but there can be no way to do this. I have tried to do this but it is on the keyboard and it allows the user to paste more than 250 words. $ (document) .on "keypress", '#company_desc', (e) - & gt; S = $ ("# company_desc"). Val () s = s.replace (/ (^ \ s *) | (\ s * $) / g, "") s = s.replace (/ [] {2 ("counter"). Html (250 Count = "s / s," ") = s.replace (/ \ n /," \ n ") count = s.split (" "remaining word") if calculation == 250 key = (if E. Kakrod then E.Corcard other (if E. Kikode then E. Kekod Others 0)) switch key when e.ctrlKey & amp; Key == key [CTRL_A] Then come back to the truth when E.Control & amp; Amp; Key == key [CTRL_C] Then come back true when

android - OnKeyListener and onEditorAction not working when using swype -

I am trying to deposit functionality in an editable text when you press the enter / return key on soft keyboard in your app. et.setOnEditorActionListener (new EditText.OnEditorActionListener) The following code works using standard keyboards, but not with swype keyboard. () {@ Override Public Boolean On Editor Action (TextView, Int Action Id, Key Event Event) {Log D. (Tag, "Entry was pressed"); Add Comment (); Return true;}}); The method is not called at all. Is this just a limit of swaps? Or am I doing something wrong? If it is a range of Swepe, so I could be how it around, I saw that the other apps, and it works using my swype keyboard My editing text layout Defined as: & lt; EditText android: id = "@ + id / comment_edit_text" Android: Layout_width = "Match_parent" Android: layout_height = "Wrap_content" android: inputType = "textMultiLine" Android: signal = "@ string / Tippni_hint" Android: Visibility we

android - Fragment Default View Wont Change -

Image
I need help How does this look like my application? I get two (2) pieces Where the left side is for the button and on the right is for my details. The bigger piece is a display display that I said splash, an image is seen here, a large image that can take the height of the device. Then my case happens when I press the Click / button 1, it will display that piece, but the image still exists. My question is now, how can I get rid of 'splash display'? Here is my code / ** * Override public null on the main listener * / @MainListener (string keypress) {piece fr = null; If (whatpress.equals ("button1") fr = new fragmentation (); If (whatpress.equals ("button2") fr = new piece (); If (whatpress.equals ("button3") fr = new piece (); Fragment Manager FM = Faculty Manager (); Piece transaction piece transaction = FM. BBT transactions (); Piece transaction. Rale (RD Distragment, FR, Whitpress); FragmentTransaction.commit (); } The above co