Posts

Showing posts from May, 2014

javascript - Bootstrap nested tab not displaying until being re-selected -

I am preparing an admin panel for my application using the nested tabs. Activated and visible initially -1A initial active and visible -1 B inactive -1c idle idle -2A is not initially active but visible - 2b inactive -2c inactive 2a is not visible before because its parent (2) is not active, but 2A has no tag: & lt; Li class = 'active' & gt; When I click on Tab 2, Tab 2A appears to be active, but the tab-panel is empty. To see if the page source shows the data in the tab-panel for 2A, I will have to click on tab 2b, then click back on tab 2a. My first thought was to overcome. Activating 2A requires users to click 2A instead of activating it, then activate again to display the content. When 2 tabs are clicked, then what should I do for 2A to appear immediately, sorry for the long description is the code below, if you are easy to sort. I placed the HTML code in this code because it was too long to include in the post. Edit: There ...

java - Unmarshalling complex types using single JAXB annotated class -

I have the following XML to be used by my application: & Lt; / Files & gt; & Lt; / PackageFiles & gt; To unmarshall with JAXB, I have defined the following two classes: Prefix @xmlRootElement (name = "PackageFiles") public class PackageFiles {@ XmlAttribute (name = "applicationGUID") private string ApplicationGUID; @ XmlElementWrapper (name = "files") @ XmlElement (name = "file") Private list & lt; File & gt; Files; } @ XmlRootElement (name = "file") public class file {@XmlAttribute (name = "name") private string name; } It works great, but I was thinking that PackageFiles is a way to annotate the square so that I can convert the file in the class and instead & lt; File ... & gt; name in the attribute list element PackageFile class? If this type of complexity is often encountered, then you might consider using the transformer Xslt In order to perform a unmarshallin...

parsing - Character from an array of strings -- Java -

इस सवाल का पहले से ही एक उत्तर है: 23 उत्तर मेरे पास लाइन सेट है इस तरह से कुछ: ए एक प्रकार की_मानात्मक बी बी-टाइप_वल्यू सी सी-टाइप_वल्यू बी बी-टाइप_वल्यू सी सी-टाइप_वल्यू सी सी-टाइप_ वेल्यू ए-टाइप_वल्यू मेरा जावा कोड ऐसी फाइलों की तरह लाइनें पढ़ रहा है जैसे: BufferedReader रीडर = नया BufferedReader (नया FileReader ("C: \\ Path \\ to \\" फ़ाइल टेक्स्ट")); कोशिश {while (true) {string line = reader.readLine (); अगर (लाइन == शून्य) तोड़; स्ट्रिंग [] फ़ील्ड = लाइन.split ("\ t"); LineProcess (क्षेत्रों); }} अंत में {reader.close (); रेखाप्रक्रिया () विधि इस तरह दिखती है: सार्वजनिक स्थिर शून्य रेखाप्रक्रिया (स्ट्रिंग [] इनपुट) {int result = 0; स्ट्रिंग datetime = null; Println (इनपुट [0]); यदि (इनपुट [0] == "ए") {परिणाम = पूर्णांक.परिएन्ट (इनपुट [1]); Println (परिणाम); } यदि (इनपुट [0] == "बी") {bvalue = input [1] + इनपुट [2]; Println (bvalue); } यदि (इनपुट [0] == "सी") {System.out.println (इनपुट [1]); } //सि...

linux - Checking if root inside bash script -

I want to know whether the script is running or not before the user can run but it does not seem to work. Currently logged in as root, but I think there is something wrong with syntax. If [[EUID-0]]; Then echo "Sorry, you are not root." Exit 1 else echo "You are root, the script will continue." You have a place between if and [ .

powershell - Encode a string in UTF-8 -

I want to encode the string in PowerShell in UTF8. This is what I have done: $ consumer_key = "xvz1evFS4wEEPTGEFPHbog" $ enc_consumer_key = System.Text.UTF8 encoding ($ consumer_key) But I get an error: is not identified as the name of cmdlet in System.Text.UTF8Encoding Try instead: $ enc = [system.Text.Encoding] :: UTF8 $ Consumer = "xvz1evFS4wEEPTGEFPHbog" $ encconsumerkey = $ enc.GetBytes ($ consumer)

Segmentation fault, no matter on how i change the code C++ -

यह मेरा कोड है #include & lt; unistd.h & gt; # शामिल करें & lt; sys / types.h & gt; # शामिल करें & lt; dirent.h & gt; # शामिल करें & lt; stdio.h & gt; # शामिल करें & lt; cstring & gt; # शामिल करें & lt; iostream & gt; नेमस्पेस एसटीडी का उपयोग करना; bool समाप्त होता है (स्ट्रिंग const और amp; value, string const और ending) {if (value.length () & gt; = ending.length ()) {return (value.compare (value.length () - ending.length () , अंत। लम्बाई (), समापन) == 0); } विवरण झूठा है; } शून्य सूची डीर (कॉन्स्ट चार्ल्स * डायरेक्टरी, कॉन्स्ट चार * एक्सटेंशन) {DIR * dir; struct dirent * प्रविष्टि; अगर (! (dir = opendir (निर्देशिका))) {वापसी; } जबकि (एंट्री = रीडडीयर (डीआईआर)) {if (एंट्री-> डी_ टाइप == DT_DIR) {char path [1024]; Int len ​​= snprintf (मार्ग, आकार (पथ) -1, "% s /% s", डायरेक्टरी, एंट्री- & gt; d_name); पथ [लेन] = 0; यदि (एसआरसीएमपी (एंट्री-> डी_एनए, "।")! = 0 & amp; एआरसीसीएमपी (एंट्री-> डी_...

unit testing - Python mock method call arguments display the last state of a list -

I have a function that takes a list as a parameter function is called multiple times and every time something List prices are updated. I use the counterfeit object to capture call logic, always shows the latest value in the list for all call logic. The problem appears in the following code. MagicMock def multiple_calls_test (): From mock imports: m = MagicMock () Parameters = [xrange (= 0, 'some_fixed_value', 'some_fixed_value'], 10) for i = Parameters [0] = Arguments for MRX in arg.cs_larg_list: print args [0] [0] multiple_calls_test () And here is the output, notice the first list of all calls 9 Element is in the form of. [9, 'some_fixed_value'] [9, 'some_fixed_value'] [9, 'some_fixed_value'] [9, 'some_fixed_value', 'some_fixed_value [9,' some_fixed_value ',' some_fixed_value '] [9,' some_fixed_value ',' What some way to forge a counterfeit object to make a copy of the list argument instead of hold...

zend framework2 - ZF2 select populate with AJAX -

Hello, I have three dropdowns, the first one is filled in my controller, the second is required to populate with the parameters in the Amazon. One third and the third one is required when my form validates all the fields, it prints down the error in both the drop downdown. The input is not found in the hessstack This is my AJAX call $ ("# department_id") .change (function () {$ .ajax ({type: "POST ", Url:" & lt ;? php echo $ this-> url ('zfcadmin / getprovinces')>? ", Data:" Dept = "+ $ (this) .val (), success: Function (msg) {$ ("# province_id") .HTML (msg);}}}}}; This is my controller, am I doing any help wrong? public function getProvincesByIDAction () {$ request = $ this- & gt; GetRequest (); $ Response = $ this-> getResponse (); If ($ request-> isPost ()) {$ response- & gt; Set StatusCode (200); $ CodDpto = $ request & gt; getPost ('department'); $ Data = $ this- & gt; ...

matlab - Changing image aspect ratio of interpolated RGB image. Square to rectangular -

I have some code that takes eye-eye images of a fish and converts it into a rectangular image in every RGB channels . I am having trouble with the fact that the output image is square instead of rectangular. (This means that the picture has been horizontally compressed.) I have tried to successfully convert the output matrix into a more suitable format. Apart from this, I have also found that the code to work for input image should be a class like 500x500. Any idea how to solve this issue? This code is: This code is inspired by light focus, "From the polar / rectangular variations of images" the Exchange file on the mailbox. Edit code now works. function imP = FISHCOLOR2 (IMR) rMin = 0.1; RMax = 1; [MR, NR, DR] = size (IMR); % Size of rectangular image xRc = (Shree + 1) / 2; % Co-coordinate with the center of the image yRc = (NR + 1) / 2; Sx = (Mr. -1) / 2; % Scale factor sy = (NR-1) / 2; Low_dream = minutes (size (IMR, 1), size (IMR, 2)); IMR = IMRSEX (IMR, [low_d...

html5 - Pure CSS slider left margin accretion -

I am in the process of developing a site for a Uni project, and I used an automatic form (This project requires that I do not use anything else) The problem I am facing is that when the slides change, the left margin begins to add, and I do not understand why that is why. I've just tried to create a page with html and CSS to work for the slider and it works properly, but when my main CSS is not included in the page. Any pointers will be appreciated! On this site it can be seen li and img must be spaced on line with no spaces or a carriage return, such as: & Lt; Ul id = "css-slider" & gt; & Lt; Li & gt; & Lt; IMG src = "http://cdn.gtm.net.au/images/catalogue/sp_image_108.jpg" alt = "slider" & gt; & Lt; / li & gt; & Lt; Li & gt; & Lt; Img src = "http://cdn.gtm.net.au/images/catalogue/sp_image_62.jpg" alt = "slider" & gt; & Lt; / li & gt; & Lt; Li & gt; ...

android - How to force a file to download in-app instead of showing up in the default browser -

I have created an Android application with WebView, but I am facing the only problem, that the files are opening instead of the default browser. downloading. This is the webactivity code: extends the web-activity activity of the public class {Private WebWeb Webview; Crate on Public Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); SetContentView (R.layout.main); Find webview = (webview) VVBIID (R.D.WebWeight Electricity 01); WebView.getSettings () setJavaScriptEnabled (true). webView.setWebViewClient (New myWebClient () {@Override Public Zero onPageFinished (WebView to view, string URL) {findViewById (R.id.imageLoading1) .setVisibility (View.GONE); findViewById (R.id.webView01) .setVisibility (See .VISIBLE);}}); WebView.loadUrl ("domain"); webView.setDownloadListener (New DownloadListener) {Public Zero onDownloadStart (String URL, String UserAgent, String contentDisposition, String Mime Type, Long ContentLength) {Intent I = New Intent (Intent.ACTION_VIEW...

c# - Windows Phone webbrowser retrieve cookie -

i. What I am trying to do here allow the user to enter a webpage w / web browser control in their account. ii.Then retrieve the cookie from it. iii. Every time a webpage is loaded / this cookie will contain a unique security arrangement in the page. Iv. I want to recover a security token to request a http post I have already detected the third and fourth part. But I do not know how to get the cookie from web browser control. I have read dozens of posts, yet one can not get a clear idea to achieve this function. Thank you people in advance :) Reference of MSDN Doc: Assume that you have the response as HttpWebResponse response foreach (cookie cookie value in response cookies) {//cookieValue.ToString ()}

python - Having trouble with the self parameter -

I am working on a small project and I am not sure if I am getting an error or whatever I am doing wrong. I am using OOP in the Python running on Wing IDLE. I have the latest version of Python Shell running on Windows 8 PC In my program, I have a method that takes the user input and uses that input, so that it is necessary to create the shelf The subject_name = input ("Enter the name of the subject:") subject_file = topic_name + "file" name = topic_name return subject_name, subject_file, name ' Ideally this program then made three returning statements Abuse will, namely Visy_nam, Visy_fail, and name to open a new shelf. 'def __init __ (self, subject_name, subject_file, name): subject_name = shelve.open ("subject_file", "c") self.name = name print ("the", self Name, "note is created") 'is correct, while: print ("" "1. Create a new note. Add new word 3. View word 4.Exit / Quit" ...

Decimal to Hex converter using Recursion (C++) -

is trying to write a program that converts the decimal number to a hexadecimal number which repeats the execution is. Can not use stuff like cout & lt; & Lt; Hex & lt; & Lt; X & LT; & Lt; Endl; Manually need to know how to write functions. I tried to do this, but it does not actually work: Input is an integer input by user, and nothing in ss before this function is. string convertheck (intu, ostringstream & ss) {int x = num% 16; Switch (x) {Case 10: SS & lt; & Lt; "a"; Return ss.str (); break; Case 11: SS & lt; & Lt; "B"; Return ss.str (); break; Case 12: SS & lt; & Lt; "C"; Return ss.str (); break; Case 13: SS & lt; & Lt; 'D'; Return ss.str (); break; Case 14: SS & lt; & Lt; 'E'; Return ss.str (); break; Case 15: SS & lt; & Lt; 'F'; Return ss.str (); break; Default: SS & lt; & Lt; X; Return ss.str (); break; } Return Convert...

port 3306 continues to close, no access to mysql -

I have a Mac Running Mavericks, which is installed from MySQL. When I try nmap localhost and I think: 3306 / tcp open mysql Computer name: I can not find 3306 , but I'm getting: Code> Port State Service 80 / TCP Open http 3128 / TCP Open Squid-TP8080 / TCP Open http-proxy It also says that my computer name fixes some IP address . When I try to nmap with that code, I get the same feedback as above I want to connect to this database with Visual Studio running on my parallel VM. It happened yesterday and I finally found out that Norton Anti-Virus had blocked that port, so I uninstalled Norton and restarted one of their scripts. Everything was working fine on the job, and then I came home and again, the harbor has been closed. There is no firewall for my Mac or Windows (Parallel VM) machine. I can not understand why this port stops. I have no firewall installed on my home network. This port is on my home network. Has been opened in the past. I have the dis...

objective c - iOS timer/wage calculator -

I am creating a timer that takes hourly wage input and tracks how much money is made per second timer But the formatting works fine, but once the panes are hit by 99, it only adds to zero. Here's what I found seconds = (int) (application time = (requested time - (min * 60)); Pennies = seconds * (rate * 100 per second); If (Penny> 99) {dollar ++; Panese = 0; } Self.moneyDisplay.text = [NSString stringWithFormat: @ "$% 02d.% 02d", dollar, penny]; Try it out: seconds = (int ) (ElapsedTime = (elapsedTime - (min * 60)); Pennies = seconds * (rate * 100 per second); Float Dollar = Pennies / 100.0; Self.moneyDisplay.text = [NSString stringWithFormat: @ "$% .2f", dollar]; or: seconds = (int (elapsedTime = (elapsedTime - (min * 60)); Pennies = seconds * (rate * 100 per second); Int cents = pennies% 100; Int dollar = Pennies / 100; Self.moneyDisplay.text = [NSString stringWithFormat: @ "$% 02d.% 02d", Dollar, St];

php - making dropdown in the very center of the page -

I want to show the dropdown list in the center of the page. How do i do this code: echo & lt; Div class = "dropcenter" align = "center" & gt; '; Echo '& lt; Label & gt; & Lt; SELECT name = "projectDropdown" id = "projectDropdown" class = "select project" & gt; '. '& Lt; Br> & # 39; & # 39; Echo '& lt; OPTION VALUE = "" & gt; ' ''. '& Lt; / OPTION & gt; '; While ($ row = oci_fetch_array ($ compCuttingResult, OCI_ASSOC)) {$ projectName = $ line ['PROJECT_NAME']; Echo "& lt; OPTION VALUE = '$ projectName' & gt; $ projectName & lt; / OPTION & gt;"; } Echo '& lt; / SELECT & gt; & Lt; / Label & gt; & Lt; Br / & gt; '; First, remove all BR and LABL tags from the HTML markup. Add a close div tag at the end of the next markup. PHP Code $ html = Faucet; ...

gwt - Why doesn't GWTP allow Object (created by us) to pass through ActionHandler? -

ठीक है, परिदृश्य है। मेरे पास है: ग्राहक प्रस्तुति.जावा myproject.client पैकेज में। GetCustomer.java myproject.client पैकेज में। GetCustomerResult.java myproject.client पैकेज में। ग्राहक.जावा myproject.shared पैकेज में। GetCustomerActionHandler.java myproject.server पैकेज में। इन सभी फ़ाइलों को eClipse द्वारा स्वचालित रूप से ग्राहक.जावा द्वारा उत्पन्न किया गया था जो कि स्वयं द्वारा बनाए गए थे। CustomerPresenter.java : उपयोगकर्ता टेक्स्ट बॉक्स में ग्राहक विशेषताओं को दर्ज कर सकते हैं & amp; क्लिक बटन फिर सिस्टम को ऐसे ग्राहकों को खोजना चाहिए जो प्रदान की गई विशेषताओं से मेल खाती हैं। GetCustomer.java ग्राहक विशेषताओं जैसे कि setCustomerName & amp; getCustomerNames , setEmail .. आदि GetCustomerResult.java में सेट ग्राहक (ग्राहक) & amp; getCustomer (); // साझा पैकेज से ग्राहक GetCustomerActionHandler.java से कनेक्ट करें डीबी & amp; नाम का चयन करें, ईमेल ... तो ग्राहक को इन सूचनाओं को पास करें Ex: GetCustomerActionHandler....

ios - How do I detect if a text field has text in it rather than a numerical value? -

I have a text field that enters the user number and turns it into an integer. The keyboard set is one of the decimal number and the paste function is still enabled, even though the user can paste text into it. I want to set it to change a label on "Error" if the user enters a numeric value in it. I do not want to disable the paste function because I still want the user to have the ability to copy and paste their numerical values ​​in their app. If you want to apply the restriction only enter numeric values, then UITextField - (BOOL) textField: (UITextField *) textField shouldChangeCharactersInRange: (NSRange) Category Replacement String: (NSString *) string {NSCharacterSet * nonNumberSet = [[ NSCharacterSet decimalDigitCharacterSet] invertedSet]; Return ([string string bitimeter converter inset: non-numberet]. Length = gt;) || [String avastostring: @ ""]; } If the string is numeric, then no yes EDET: Adam's answer is best for ch...

multicast - join igmp_group not working in lightwight IP (lwip) -

I'm new to lwip, and I want to create a multicast receiver with lwip. My steps are as follows: 1. Enable LWIP_IGMP; 2. Set NETIF_FLAG_IGMP in low_level_init (); 3. Join the multicast group, create and bind PCBs; 4. udp_connect to remote_ip (or multicast IP address? Both are tried but unsuccessful) The group is joining the return success, and when it executes this program everything looks fine. Although the multicast receiver does not work, no multicast data network interface comes in. It seems that I would not really be included in my receiver in the igmp group, although the process of joining seems ok. Does anyone know what I am missing? I got "netif-> igmp_mac_filter! = NULL" in igmp_joingroup (), but this callback is set as tap and has not been implemented. Thank you very much for your help! Ryan / div> When you join a multicast group, try Netif- & gt; Igmp_mac_filter Callback is commonly asked to configure the MAC filter in your Ethernet...

javascript - Google maps v3 API - calculate bounds given center coordinates and distance -

So, I've seen the center and zoom counting the boundaries given, but I can calculate the boundary according to the center Trying coordinates and miles in distance How can I do this? Use the two points to calculate a point on the east and west distances of the center Add and call on map.fitBounds on that border.

dynamically create og tags for images for facebook -

I need to draw a picture that will display Facebook from the database & Lt; Meta Http-equiv = "content-type" content = "text / html; charset = ISO-885 9-1" & gt; & Lt; Meta Property = "OG: url" content = "xxx / public / giggid 2.asp? A = & gt; /> & Lt; Meta Property = "OG: Type" content = "website" /> & Lt; Meta Property = "OG: Title" Content = "Live Gig Guide" /> & Lt; Meta Property = "OG: Image" content = "& lt;% = Virus%> & gt; /> & Lt; Meta Property = "Ogg: site_name" content = "MyEpod" /> & Lt; Meta Property = "OG: Details" Content = "Live Gig Guide" /> Can this be done? What am i doing wrong The Open Graph Object Debugger shows that I have all the tags except the image tag and should be capable of bringing the picture of the action with their pages etc ?? OG: image tag c...

asp.net mvc - Getting a value from a model within a model using razor in mvc -

I have a problem on how to model it out of a model and access it in a razor. I have a problem with this model in which there are varieties of models. How would I know about how to reach values ​​through type of razor through razor? It would appear like this, but obviously it does not work? In this way I call this model in this view: @modelimimableable & lt; MyApp.Models Issues & gt; Public Sector Issues {Public Ent ID (Receive; Set;} Public String Title {get; Set;} Public IEnumerable & lt; MyApp.Models.Type & gt; Type {Get; This is my second model; Trying to use values ​​from: public partial class type {public id (get); set;} public string description {get; set;}} So I do something like that I try and look like this, but it does not work clearly. prefix @ html.DisplayNameFor (model = & gt; model.Type.Description ()) You can access this way: @ {foreach (Miscellaneous items in the model) {if item.Types.Count ()> gt; {foreach ...

ios - Error : Define -DNS_BLOCK_ASSERTIONS=1 in Project settings? -

Image
I am trying to create a svg file rendering demo. I am getting the following error that I can not understand. I have read the following answers. but DNS_BLOCK_ASSERTIONS = 1 Look at the code. Lines: #if! NS_BLOCK_ASSERTIONS #Terror & lt; Error message & gt; #endif Checks to see if the NS_BLOCK_ASSERTIONS macro is defined or not You are getting the error because NS_BLOCK_ASSERTIONS has not been set. The message after #error is telling you how to fix the problem. Once you define NS_BLOCK_ASSERTIONS in the "Other C Flag" building settings, the problems will go away.

ios - UIPasteboard pasteboardWithName not working in IOS7.1 -

I have to transfer data from one APP to another. When I use paste board for the first time , but the second time I'm getting zero data from the paste board . This problem is only the IOS7.1 device , in all other devices it is a strange thing. My code is as follows. // set data UIIPTboard * pasteboard = [UIPistboard pasteboardwidthname: @ "test"]: yes]; If (item == zero) {NSLog (@ "** set data is zero"); } If (pasteboard) {[pasteboard set it's: [object with nsere array]: items]]; } // Get the data UIPasteboard * Pasteboard = [UIPistboard PasteboardWidthname: @ "Test": No]; NSDictionary * migrateInfo = Zero; If (Pasteboard! = Zero & Pasteboard.itm.ct> 0) {MigrateInfo = [PasteboardEight ObjectItindex: 0]; DEV_LOG (@ "** has pasteboard data"); } When I transmit the data the second time, I am getting zero values ​​as the migratory object. 1) After reading the data from the pasteboard data removed from the pasteboa...

php - Getting error when trying to declare custom cookie for Apache load balancer -

I have followed several tutorials (like) and set up an Apache load balancer that works fine except for a session I'm trying to modify my redirect (which works until I add an additional flag (?): RewriteRule ^ (. *) $ Public_html / index Php - [CO = JSESSIONID: balancer.view-a: .ea-hq.com] This causes an internal server error: C: / Web server / Apache 24 / htdocs / .htaccess: re Writing: Bad flag delimiter So my sessions are not being held between two servers. I am using if You need to provide more information to me, please say. > I have made the change: Rev. R ^^ (. *) $ - [CO = JSESSIONID: Balancer View-A: .ea-hq.com] Rewrite Rules ^ (. *) $ Public_html / index.php But now many files are not loaded and 302 Does not have a "status" status and These are lean when viewing them through the Inspector in Chrome RewriteRule ^ $ public_html / index.php [CO = jsessionid. (*.): Balancer.view-e: .ea-headquarters .com] gives me the same results....

vb.net - populating dropdown using jquery -

Image
मेरे पास एक वेब विधि है जो एक सूची देता है। & lt; WebMethod () & gt; _ सार्वजनिक साझा समारोह populateDropdown (तिथि के रूप में ByVal aptdate, पूर्णांक के रूप में ByVal दंत चिकित्सक) के रूप में सूची (स्ट्रिंग की) मंद apptime नई सूची के रूप में (स्ट्रिंग की) apttime = डाटाबेस लेयर कोशिश करोअब नियुक्ति समय (aptdate, दंत चिकित्सक) अपवाद के रूप में पकड़ो पिछला परिणाम एंड क्लास लौटने के लिए मैं उपरोक्त परिणाम सेट के साथ ड्रॉपडाउन को पॉप्युलेट करना चाहता हूं मैं एक jquery AJAX फ़ंक्शन का उपयोग कर रहा हूं ऐसा करें। $ .ajax ({प्रकार: "पोस्ट", यूआरएल: "अपॉइंटमेंट.एस्पक्स / पॉप्युलेटडाइपडाउन", डेटा: '{aptdate:' + '"' + aptdate + '" '+', दंत चिकित्सक: '+' "+ दंत चिकित्सक + '"' + '}, कंटेंट टाइप: "एप्लिकेशन / जेसन; वर्णसेट = यूटीएफ -8", डेटा प्रकार: "जेसन", सफलता: कार्य (डेटा) {अलर्ट (data.d.length); var विकल्प = $ ("# drpdwnapttime"); $ .ईईच (डेटा, फ़ंक्शन...

java - How to handle special characters like "\n" in string reverse? -

I have the following code to reverse a string, and I am considering doing test cases for it . I would like to know how the user input "\ n", "\ t"? Private static string reverse 2 (string straight) {if (str == null || Str.length () == 0) return str; Int start = 0; Int end = str.length () - 1; Four [] characters = str.toCharArray (); While (start & lt; end) {four tmp = characters [begin]; Character [start] = character [end]; Character [end] = tmp; Start ++; End--; } Return String.valueOf (character); } "\ nxyz" like string, str.toCharArray (); TRAVET "\ n" There is no problem with your code as a single character, only one thing in the new line will change and this will print in different lines this time.

pandas - finding the difference in years for two common values in a column -

I am using pods and I am trying to find the difference in those years when my data is grouped by label And then the teams are done. I have tried to use a group for the problem with which I am working, but I can not get enough of my desired result here, here is the head of my DF (8) Team Year Labels Hawks 2001 B Hooks 2004 B Nets 1987 B Nets 1988 Nets 2004 B Nets 2001 Nets 2000 C Hawk 2003 A So what makes me say that basically There are two groups that I want - the label and team again, between those years There is need to find the level that would be solved and the results will be different column. Any help would be greatly appreciated. Team Year Labels Inter Hoc 2001 B NAN Hawks 2004 B1 Nets 1987 B NAN Net 1988 A NN Net 2004 B17 Net 2001 a 13 Nets 2000 C NN Hawks 2003 B2 Not sure if label is considered for the last line 'A' or 'b' from your data snippet: Hawk 2003 one Output expected by you: Hawks 2003 b 2 I think the label is considered...

.htaccess - 404 error in yii. url not working -

मेरा url 'urlManager' = & gt; सरणी ('urlFormat' = & gt; 'पथ', 'showScriptName' = & gt; गलत, 'नियम' = & gt; सरणी ('& lt; नियंत्रक: \ w + & gt; / & lt; id: \ d + & gt;' = & gt; '& lt; नियंत्रक & gt; / नियंत्रक: \ w + & gt; / & lt; कार्रवाई: \ w + & gt; / & lt; id: \ d + & gt; '= & gt;' & lt; नियंत्रक & gt; / & lt; कार्रवाई & gt; ',' & Lt; नियंत्रक: \ w + & gt; / & lt; क्रिया: \ w + & gt; '= & gt;' & lt; नियंत्रक & gt; / & lt; क्रिया & gt; ',), मेरे htaccess रीवाइटबेस / पुनर्लेखन पर पुनर्लेखन कोड% {REQUEST_FILENAME}! -f पुनर्लेखन कन्वर्ट% {REQUEST_FILENAME}! -डी रिक्राइट नियम ^ (। *) \? * $ Index.php / $ 1 [एल, क्यूएसए] यह मेरे लिए काम करता है। कृपया 'UrlManager' = & gt; सरणी ('urlFormat' = & gt; 'पथ', 'नियम' = & gt; सरणी (...

Find the Information of USB Devices In C/C++/Java -

I need to use the existing USB Hub and Connected Devices to our C ++ program. I can print devices connected to the terminal from the USB hub and the terminal using the command lsusb lsusb -v I want to use that feature in my C ++ program How can I do this program? Are there any C ++ classes available for use in my CT application or C or Java? This is a help #include & lt; Stdio.h & gt; # Include & lt; Usb.h & gt; Main () {struct usb_bus * bus; Struct usb_device * dev; Usb_init (); usb_find_busses (); usb_find_devices (); (Dev = bus-> devices; dev; dev = dev- & gt; next) {printf (trying to "device% s /% s \ n") (just = usb_busses; bus; bus = bus - & gt; Next), Bus-> Dynamite, Dev- & gt; Filename); Printf ("\ tID_VENDOR = 0x% 04x \ n", dev-> Descriptor.Idvendor); Printf ("\ tID_PRODUCT = 0x% 04x \ n", dev-> Descriptor.Idproduct); } } Does anyone know how this compilation ??? The problem is facing ...

c - GPIO interrupt for different pins in PSoC 1 -

I have encountered a problem with GPIO interrupt. The task is to create a simple UI interface, so I use 3 buttons. The problem is that I do not understand how to use GPIO interrupts for different pins and all my buttons work in the same way. Here is the code: #include & lt; m8c.h & gt; // Part Specific Constants and Macros # Include "PSoCAPI.h" // Include PSOC API Definitions # for all user modules & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; Typedef Structure {int value; // Actual value in which the module is used in four strings [16]; // string that is printed in LCD for user) UI_ELEMENT; #define FIRST_LEVEL3 #define SECOND_LEVEL 3 #define PWM 0 #define PGA1 #define ADC 2 #define PWM_STATE 0 #define PWM_PERIOD # 1 defined PWM_WIDTH 2 #define PWM_STATE_OFF 0 # defined PWM_STATE_ON 1 volatile int buttonmate = 0; #pragma interrupt_handlerButtonButtonButtonRightInt (zero) {// disable button is blocking the M8C_DisableIntMask (INT_MSK0, INT...

ant - jdtCompileLogPublisher javac -

I have an ant build script that compiles and generates my project's compilation log (file compileLog.xml). I use jdtCompileLogPublisher to publish these results to RTC Now the situation occurs when I have the source of the project, its work is fine when I have no source in the project (it is a requirement that there will be an empty project with outside sources), The compile phase is skipped because there is no source, and jdtCompileLogPublisher is failing because file compileLog.xml which is not an input for this step as the compilation itself has been left. I tried to create a new compileLog.xml, if it is not available. As a result, I am facing new issues because the file is empty. Why is Java code missing when compiling it? Is there any possibility that the compiler should execute javac in build.xml version ant: 1.7.1. Snippet of my respective code: & lt; Target name = "compilation" dependent = "ready" description = "compile sour...

extjs4 - Is there any way to disable nodes of treeview in ExtJS 4 -

My purpose is to disable some nodes of tree view in the west region. The snippet below shows: root: {expanded: true, id: 'treeview1', children: [{"text" True: "True, ID: 'HS1', '** disabled **': true," ** hidden ** ": true}}} Why does the disabled and hidden assets not work in EXTPS 4? Is there a plugin to achieve this? The nodes in the paperpellings are Ext.data.NodeInterface objects. It does not have a disabled or hidden property, but it has cls and with it you can not add a display: any that hide it Node has been Example: In the CSS file: .x-hidden-node {display: none! Important:}} In the extjs code: root: {expanded: true, id: 'treeview1', children: [{Text: 'Copy', Leaf: True, ID: 'HS1', CLS: 'X-Chip-Node'}]} For disabled functionality, you can use the beforeitemClick event in PaperPenel in which you can read the disabled property manually. Example:...

d3.js - x coordinate value after drag and drop event -

I am trying to get x-val for a shape so that the code below can be made to make a bela . By Lars Kothoff; But I get the original position in place of the new situation: d3.select All ('circle). Each (function () {console.log (d3.select (this) .attr ("cx"))}); Any ideas on what I'm doing wrong? You have not told us where you are adding code, but in this example cx is not actually set. Instead, the circle is kept using transform (see drag function). This is what you should ask (or directly data) to get the position. For example: d3.selectAll ("circle"). Each (function (e) {console.log (e.x);}); Full demo

php - Getting a value from a dynamic table -

I have a table that is used dynamically. foreach ($ value as $ value) {echo '& lt; Tr & gt; & Lt; TD & gt; '. $ Value- & gt; OBJECT_NAME. ' & Lt; / TD & gt; & Lt; TD & gt; '. $ Value- & gt; ISSN. ' & Lt; / TD & gt; & Lt; TD & gt; '. $ Value- & gt; Object_publisher_name. ' & Lt; / TD & gt; & Lt; TD & gt; '. $ Value->. Comment '& lt; / TD & gt; & Lt; Td id = "chkbutton" & gt; '. $ Form-> Checkbox ($ Model, "Journal_ID"). ' & Lt; / Td> & Lt; td style = "display: none;" & Gt; '$ Value- & gt; Object_id. ' & Lt; / Td> & Lt; / TR & gt; '; } I have to get the value (journal_id) from the hidden column when the respective check box should be checked and then ask the DB to get the data from the relevant ID and fill the drop down list. . How should I do this? You must ...

android - Why Gmap and App Map do not work on Emulator? -

I use Eclipse and Android SDK I recently wrote a program to show a map on it, it works fine on the actual device, but it does not show any map on the emulator. I check the emulator Internet connection and it works and I check the browser on the emulator and it works and I checked the Google Map app on the emulator and it shows me a black page is. I think a graphical library or something will be missing this possible? 1-I can use the Google API 4.2.2 image 2- I know that there are many emulators but they do not work on Eclipse with DDS . For example, DDMS can not send GPS location or SMS to topic or call subject. And give me some log system / Strong> will work like its real device.

amcharts - Force start and end date on an AmStockChart -

The problem I am creating an AmStockChart with annual data is that I have X axis from 1 x to 12/31 I want to go and currently the upper limit is dynamically set with the maximum date in the dataset. Is it possible to force it? It seems that it can be modified in stockguy.valuexis, but the documentation is not really clear to me. To store it, you must dataprider = [ Date: New date (2014,0,1)}, ... {date: new date] requires adding a "dump" entry. (2014,11,31)}]

r - seqedplot using TraMineR: how to plot selected hazard curve in one single graph? -

I am using TraMineRextras and especially interested in the seqedplot function. Here's an example: Data (Actakel.Tc) actacl.tse & lt; - actcal.tse [1: 500,] Isaac & lt; - Unique (Acticle Tte $ ID) NSEX and LT; - Length (ISEC) data (Actual) Actual & LT; - Actakel [Ravels (Actual)% in% ICQ, Actkel. SECE & lt; - Sequet (Actual. Seqe) & lt; - rep (12, nseq) Instead of plotting all curves by: seqedplot (actcal.seqe, type = "hazard", Ignore = 6, Group = Ectical $ Sex, LW = 3) I use the selected curves according to the variable gender and ignore / Code> Options: seqedplot (actcal.seqe, type = "existence", group = actual $ sex, LWD = 3, unblock = c ("NoActivity", "I'm a man Instead of men and women in the same graph How can I make a shell? " From two different graphs? Thank you in advance In order to bind a gender in a way, the event type may be: actcal.tse $ event Because split into...

c# - Table saved only while running -

I'm new to working with the unit framework and used model first approach. I then tried to create a table, but when the program was closed, it is finished. My code: objCtx = new EntityModelContainer ()) {// Join Student ExecuteStoreCommand string command = "Create Tables Clients (ID Integer, Name Navigator (4000))" using ; Int InsertedRows = objCtx.ExecuteStoreCommand (command); } How can I save tables permanently? You objCtx.SaveChanges (); ojbCtx has been found before .

android - Get gmail profile image and full name -

I am preparing a login page for my app. I wanted to do the same thing that Twitter is working, they are helping the user and predefining some areas such as email, name and profile pictures. I have been able to get an email using the GET_ACCOUNTS permission. However, I can not see how I get the full name and profile picture? get public stable string email (reference context) {AccountManager accountManager = AccountManager.get (reference); Account account = received account (account manager); If (account == zero) {return tap; } Else {return account.name; }} Private Static Account getAccount (Account Manager Account Manager) {Account [] Accounts = Account Manager.GetXNetByType ("ComGF"); Account account; If (accounts.length & gt; 0) {account = accounts [0]; } Else {account = null; } Return account; } You need to use it to get it.

javascript - Load JSON into backbone model -

I am trying to load json files in a backbone model: var feed = backbone.model Extension (); Var FeedCollection = Backbone.Collection.extend ({Model: Feed, url: 'feed.json' var feeds = new FeedCollection (); feeds.fetch ({Success: Work} {console.log (feeds);}}) The first log gives the JSON obect inside the file, just gives an object without JSN data. You are overriding the parsing function and are not returning anything to add itself to the collection. parse Permission to populate it from Feedback Alternatively, return the parse to the properties you need from the server's response to define your collection.

asp.net - WcfInstantFeedbackDataSource cannot read valid Data Service source -

I have tried to use 13.2.9 (located in Xpf.Core.Extensions) with DevExpress with Data Services ( Its source is a MongoDB) I intend to use it with an asp.net page so that I can use the following code: ctx = new MongoContext (New URI ("http: // xxxxx.zzwebsites.net/MongoDataService.svc/")); Thread T = New Thread ((=) {Datas = New WCfInstantFeedbackDataSource () {KeyExpression = "_id", Query = (Data Service Service) ctx.test};}); T.SetApartmentState (ApartmentState.STA); T.Start (); I have WCF Data Services 5.6 installed. My data source is a valid Atomix feed: & Lt; Entry & gt; & Lt; ID & gt; Http: //xxxxx.azurewebsites.net/MongoDataService.svc/test ('5347cc29fe4c65b466e604f9') & lt; / Id & gt; & Lt; Category term = "mangotext" scheme = "http://schemas.microsoft.com/aud/2007/08/dataservices/scheme/" gt; & Lt; Link rel = "edit" title = "test" href = "test ('5347cc2...

python - Django 1.6 adding custom fields to the User model -

मुझे निम्न मिला है प्रोफ़ाइल / models.py वर्ग UserProfile (models.Model): user = models.OneToOneField (उपयोगकर्ता) विश्वविद्यालय = models.CharField (max_length = 200, विकल्प = विश्वविद्यालय, शून्य = सत्य) प्रोफ़ाइल / views.py वर्ग UserForm (ModelForm): कक्षा मेटा: मॉडल = उपयोगकर्ताप्रोफाइल फ़ील्ड = ('उपयोगकर्ता नाम', 'प्रथम_नाम', 'अंतिम_नाम', 'ईमेल', 'विश्वविद्यालय') मैंने दक्षिण चलाया है और डेटाबेस अद्यतित है लेकिन मैं अभी भी यह त्रुटि मिलती है django.core.exceptions.FieldError: UserProfile के लिए निर्दिष्ट अज्ञात फ़ील्ड (प्रथम_नाम, उपयोगकर्ता नाम, ईमेल, अंतिम_नाम) मैं यह अनुमान लगा रहा हूं कि तालिकाओं को कैसे जुड़ा हुआ है, इसके साथ ऐसा करना है। मेरी UserProfile तालिका में मेरे पास आईडी, यूज़र_आईडी, और यूनिवर्सिटी कॉलम उनके पास उचित डेटा हैं। ए ModelForm केवल एक मॉडल के लिए फ़ॉर्म फ़ील्ड उत्पन्न कर सकता है, इस मामले में UserProfile । आपके मेटा क्लास में फ़ील्ड्स विशेषता निर्दिष्ट करती है कि किस फॉर्म फ...

cypher - Neo4j: Finding simple path between two nodes takes a lot of time -

Neo4j: Finding Simple Path Between Two Nodes Even after using upper limit (* 1..4) Takes. I do not want to use all the shortstasts or shortpest as it does not return all the paths. Mail P = (({{name: "node 1"}} - [* 1..4] -> (mi {name: "node 2"}) returns P; Any suggestions for making it faster? If you have lots of nodes, try to make an index so that the names with the correct code To search the node 4G DB engine with every node. I am assuming that, in your example, the n and m nodes are actually the same as the "type" of the node if it is true , Then: Add a label to each node (I will call it 'x') (same type of n and m ). You can use the following to add the 'x' label to the node (s) displayed by the variable n . You want to do this before the appropriate MATCH section: SET n: X Create an index at name Property of the nodes with the X label from: Make an index at: x (name); Query for you: MA...

Can I refer to the object within jQuery chain using this keyword? -

Let me say that & lt; P & gt; A numeric character should be increased in the tag. Is it possible to use something like this down? $ ('p'). Text (parse int ("this") + 1); It does not seem that this refers to the same object when I do the example below: $ ('P') Text ($ (this) .height ()). // print $ 731 ('P'). Text ($ (this) .text ()); // Change to empty Yes, but you have to use an anonymous function : $ ('p'). Text is the index of element (i, t) {// i element of the collection, // if there is an element then // is text. Assuming that the first text-letter is a valid number: return parasont (t, 10) + 1;});

javascript - Get all object from array of objects having similar value -

मान लें कि मेरे पास एक 5 ऑब्जेक्ट्स हैं, जैसे सरणी में: var myObjects = [a: 1, b: 2}, {a: 3, b: 4}, {a: 1, b: 6}, {a: 3, b: 8}, {a: 1, b: 9} ]; मैं इस myObjects को पुनरावृति कैसे कर सकता हूं और समान मान वाले कोड प्राप्त कर सकता हूं a = 1 जैसे। {a: 1, b: 2}, {a: 1, b: 6}, {a: 1, b: 9} परिणामस्वरूप? उपयोग करें: var परिणाम = myObjects.filter (फ़ंक्शन (e) {return ea === 1; }); एमडीएन पुराने ब्राउज़रों के लिए एक प्रदान करता है जो इस पद्धति का समर्थन नहीं करते हैं। यदि आप संपत्ति के आधार पर वस्तुओं को समूह करना चाहते हैं एक , तो आप निम्न दृष्टिकोण का उपयोग कर सकते हैं: var परिणाम = {}; के लिए (var i = 0, len = myObjects.length; i & lt; len; i ++) {var obj = myObjects [i]; यदि (परिणाम [obj.a] === अपरिभाषित) {परिणाम [obj.a] = []; } परिणाम [obj.a]। पुश (obj); } Console.log (परिणाम);

javascript - How to convert 2014-04-23T19:45:39 (UTC date) to AST date -

I have a date like this: 2014-04-23T19: 45: 39 which is the UTC format. I want to convert it to AST format or make user's time zone local. How to do this I recommend that you use the library and only add or subtract the number of hours of AST time Compare UTC. new_date = date.add ('hours', 4); Or new_date = date.subtract ('hours', 4);

objective c - How to insert string that contains " character in sqlite ios -

I am using the following code but sqlite is giving me an error NSArray * a = [Object with NSArray array: @ "\" "@" \\ \ "", zero]; Volume = [volume stringing implication ocurrenceoffstring: [an objectwithoutx: 0] with string: [an object atindex: 1]]; queryString = [NSString stringWithFormat: @ "Include Shopping List (Quantity) values ​​(\"% @ \ ")", quantity]; This error returns to: - "diax1": the syntax error in the query is the original amount = 1 piece in the shopping list, medium (4-1 / 2 "diax1 / 8" thick ) Use placeholders to insert special characters in the SQLite (also see which special characters are allowed in Sqlite): queryString = @ "shoppinglists (quantity) included in the values Do (?) "; Sqlite3_stmt * Compiled Statement; If (sqlite3_prepare_v2 (database, query string, -1, and compiled location, zero) == SQLITE_OK} {sqlite3_bind_text (compiled stability, 1, [quantity UTF8String],...

php - Why does MySQL allow VARCHAR(255) to have larger numbers -

When I first learned about the field types in MySQL, I would define anything which no number as VARCHAR There was no and nothing to determine the length. 500 2000, but am I right that the maximum 255 is in fact? If this is the case, then why does MySQL define the column with a very long length and what is it actually doing? Will it allow big length? Does this define column / area as something else? Any advice welcomed. This behavior was changed after 5.0.3: The values ​​in the VARCHAR column are variable-length strings. The length can be specified as 0 to 65,535 in 0 to 255 and 5.0.3 and above versions of MySQL 5.0.3. MySQL 5.0.3 contains the maximum effective length of VARCHAR and later the maximum line size (65,535 bytes, which is shared between all the columns) and the character set. From the document context.

django template link to dynamic url -

I try to create a list from a dictionary, where I have the name of the stored footage ( value1 ). So with every hit of the loop I can link to the right page. The problem is, I can not understand how I should fix {{url "view_name"}} . My Template: & lt; Table & gt; & Lt; TR & gt; & Lt; th colspan = "2" & gt; Timer & lt; / Th & gt; & Lt; / TR & gt; {% For key, value in timer. Idems}} & lt; Tr & gt; & Lt; Td> {{Key}} & lt; / Td> & Lt; Td> & Lt; a href = "{{url values.1}}" & gt; {{Values.0}} & lt; / A & gt; & Lt; / Td> & Lt; / TR & gt; {% Endfor%} & lt; / Table & gt; How can I change the URL, from which it appears on value.1 : (Meditation Keep that idea name (now ',' small job ', [' now ',' short-job ']), (' middle job ') is still very much, but they are used on other occasions) , ('now', ...

How to add text to buttons in table layout and retrieve that text in android developement of tictactoe -

Text after "div class =" itemprop = "text"> Where did I want to put a tablelayout and button inside that tablerow and I wanted to put some text on that button that one such Android application As I click and at the end of time, to retrieve the data what I have put in. This is basically Tic Tac toe. Please help me with somebody This is my first Android app. I have previously done TICTalk toe programming in basic Java code, just on the Android app Trying ` & lt; TableRow Android:. Android: layout_height = "match_parent" Android: layout_weight = "1" Android: gravity = "center" & gt; id = & Lt; Button android: id = "@ + id / Button1" Android: layout_width = "match_parent" Android: layout_height = "match_parent" Android: layout_marginBottom = "2dp" Android: layout_marginLeft = "2dp" Android: layout_weight = "1" Android: Background = "#FFFFF" /> ...

c# - How to access class object in aspx file from its code behind file -

यह कुछ नामस्थान में मेरी कक्षा है सार्वजनिक वर्ग UserObject {public int MasterManagement_roleid = 0 ; } इस क्लास में इस तरह की फ़ाइल के पीछे कोड में उदाहरण घोषित किया गया है सार्वजनिक आंशिक श्रेणी का कंट्रैक्टर प्रबंधन टूटा: सिस्टम। वेब। यूआई पृष्ठ {UserObject objUser = new UserObject (); संरक्षित शून्य Page_Load (वस्तु प्रेषक, EventArgs ई) {\\ कुछ कोड}} और मेरे aspx फ़ाइल में मेरे पास ऐसा कुछ है & lt ;% यदि (objUser.MasterManagement_roleid.ToString ()। ट्रिम ()। बराबर ("- 1")) {% & gt; // यह लाइन त्रुटि हमेशा मदद करता है / कुछ टैग प्रदर्शित करने के लिए कृपया & lt;%}% & gt; त्रुटि है सर्वर अनुप्रयोग '/' इस तरह कुछ आपको objUser सार्वजनिक करने की आवश्यकता है।

oracle - Batch script that delete old Backups and keep just one -

मैं एक स्क्रिप्ट शुरू करते हैं - command = statistics --statdata = SAVEPOINTS & gt; C: \ safepoints.txt जो इस तरह एक आउटपुट उत्पन्न करता है। प्रत्येक बचे हुए संस्करण के लिए पृष्ठ संख्या: 0: संस्करण = 0, स्थिति = 3, ts = 2014-03 -18 16: 24: 51.764, पृष्ठ संख्या = 68861 1: संस्करण = 1, स्थिति = 3, ts = 2014-03-18 17: 49: 25.622, पृष्ठ संख्या = 68861 2: संस्करण = 2, स्थिति = 3, ts = 2014-03-19 05: 00: 10.467, पृष्ठ संख्या = 68 925 3: संस्करण = 3, स्थिति = 2, ts = 2014-03-20 14: 05: 53.267, पृष्ठ संख्या = 2744 4: संस्करण = 4, स्थिति = 3, ts = 2014-03-20 15: 08: 40.607, पृष्ठ संख्या = 6885 9 5: संस्करण = 5, स्थिति = 3, ts = 2014-03-21 05: 00: 10.527, पृष्ठ संख्या = 68926 मेरी आइडिया है, सी: \ सेफपॉइंटटैक्स को पढ़ने के लिए और अगर नवीनतम फाइल को रखने की तुलना में स्थिति = 3 (पूर्ण बैकअप) के साथ मौजूदा फाइल में मौजूद है तो जांचें, और इस तरह एक नया कमांड शुरू करें - command = DELETE_SAVEPOINTS 0-4 मैंने इस प्रकार की स्क्रिप्ट को संशोधित किया है लेकिन यह लूप के बाद &...

html - How can I change the color of a mouse hover underline using CSS? -

इस सवाल का पहले से ही एक उत्तर है: 13 उत्तर 4 जवाब मैं केवल अंडरलाइन का रंग कैसे बदल सकता हूँ, जब माउस का प्रयोग स्ट्रिंग हो जाए? यहां है, सही कोने में आपको मेनू दिखाई देगा। इसे आज़माएं & Lt; शैली प्रकार = "टेक्स्ट / सीएसएस" मीडिया = "स्क्रीन" / & gt; एक {पाठ-सजावट: कोई नहीं; } a: link {color: # 0000FF; सीमा नीचे: 1px ठोस # 0000FF; } a: का दौरा किया {color: # 0000FF; सीमा नीचे: 1px ठोस # C0C0C0; } a: सक्रिय {color: # FF0000; सीमा नीचे: 1 पीएक्स ठोस # एफएफ 0000; } A: होवर {रंग: # 000000; सीमा-नीचे: 2px ठोस # DD0000; } & Lt; / style & gt; & Lt; a href = "http://www.google.com/" & gt; रंग परिवर्तन देखने के लिए इस लिंक पर जाएं & lt; / a & gt;

javascript - Passing between two hidden fields -

I think there are issues of passing a value between two hidden areas I use Google Maps I'm using a jquery plugin for geographic location. The plugin uses a field set that includes two hidden fields, one for latitude and one for one loan. Every time there is a change in pin two values, which are definitely happening and can be seen in the developer tools. I have a form that I want to send all my values ​​to a php file in the same file. I have managed to work it for all other inputs, but it just does not work There is a map with two hidden areas. Hidden classes come with the value of 20 presets, which make changes. & lt; Div class = "gllpMap" & gt; Google Maps & lt; / Div & gt; & Lt; Input type = "hidden" square = "gllpLatitude" value = "20" /> & Lt; Input type = "hidden" square = "gllpLongitude" value = "20" /> & Lt; Input type = "hidden" square = "gllp...

selenium - How to use xpath for extracting text between tag -

मेरे आवेदन में एक बटन का कोड निम्नलिखित है। & lt; span class = "Ms-cui-ctl-largelabel" अचयनित = "पर" & gt; नया & lt; br & gt; मानचित्र & lt; / span & gt; & Lt; / a & gt; & Lt; / span & gt; मैं उस बटन पर क्लिक कर उसके लिए सेलेनियम वेबड्रिवर का उपयोग करना चाहता हूं मैंने कई संयोजनों की कोशिश की लेकिन यह मेरे लिए काम नहीं कर रहा है निम्नलिखित अलग-अलग xpaths हैं जिन्हें मैंने कोशिश की 1 By.xpath ("// span [contains (@class, 'ms-cui-ctl-largelabel') और पाठ () = 'नया / n मैप'])); 2. By.xpath ("// span [contains (@class, 'ms-cui-ctl-largelabel') और पाठ () = 'नया / आर / n मैप'])); 3. By.xpath ("// span [contains (@class, 'ms-cui-ctl-largelabel') और पाठ () = 'नया मानचित्र'])); क्या कोई कृपया मदद कर सकता है? धन्यवाद वैकल्पिक समाधान का उपयोग // span [@ class = "ms-cui-ctl-largelabel" और normalize-space () = "नया मानचित्र"]

counting occurrence of consecutive elements in a list (python) -

given a list a = ['g', 'd', 'r I want to count as GDR incident for example, so I will apply some functions. Returned a.function ('g', 'd', 'r') and sent me 2 (since gdr was 2 times). If they are the only string in the list, And its count method: & gt; & Gt; & Gt; A = ['g', 'd', 'r', 'x', 's', 'g', 'd', 'r']> gt; & Gt; & Gt; For example, if you have a mix of strings and numbers, you can use the map (str, a). And the method will still work before joining: & gt; & Gt; & Gt; a = [1,13,4,2,1,13,4] & gt; & Gt; & Gt; ''. () () (), () () () () () (), () () () () (), def count_pattern (lst, * pattern): return '' .join (L) .count (''. Join (pattern)) and will be able to call it: count_pattern (a, 'g', 'd', ' R ') or count_pattern (a,' gdr ') or even co...