Posts

Showing posts from July, 2014

vim - How to expand the snippet with only part of the trigger? -

I have Wiim with UltiSnips and it is working, but only then I write the whole trigger. Is there a way to extend the snippet only a part of the trigger? I used to work with the snippet and used to work. Example: If I have a trigger like this: Snippet SomeTrigger Blow Bull Indianipat When I type snippet Extension of: someTrigger & lt; tab & gt; But when I type something & lt; tab & gt; Ultisnips usually & lt; C-Tab> Provides an mapped API; UltiSnips # ListSnippets () If you want to avoid typing the full snippet name, it should be used, though the probability of conflict will be high.

vb.net - Windows custom shortcuts -

A few years ago, Google was offering an exe when pressing Alt (or ctl) key twice on windows, pressing Get a google-search-box / widget from the screen. I am constantly switching from other windows to the text editor, so how can I customize the windows so that when I press twice twice quickly, my text editor is brought to the foreground . By default, Windows is not a method to implement verbs, Autohotki (AHK) is a good scripting language with a large community on the basis and I believe it can register an event that you describe. Just a quick search shows this, shows evidence of the concept.

php - Trouble creating array -

I have a problem ?? | I am trying to create an array from a mysql table but I do not know how to format data coming from MySQL in an array in php. Even what I have done so far ... // Generate organization data $ result_org = mysql_query ("select emp_no, sup_empno, name, employees by title"); // starts a container array $ orgArray = array (); While ($ line = mysql_fetch_array ($ result_org, MYSQL_ASSOC)) {$ currempno = $ row ['emp_no']; $ Currsupervisor = $ row ['sup_empno']; Title = $ line ['name'] for $. '\ N'. $ Line ['title']; // This is where I have no clue to get the right shape ... ?? // Enter the records of each database in a $ $ buildorg = array ("$ currempno", "$ currsupervisor", "$ currtitle"); // Container array adds each array in array_push ($ orgArray, $ buildorg); } // Show data to verify resonance ($ orgArray); / / o.addNode (003, 002, '', 'Jane Doe \ nAst Manag...

html - width:100% vs max-width: 100% -

width can be: 100% and maximum-width: 100% can be used once if any of them Is used only once? For example, I get the following results: img {width: 100%; } and with: img {max-width: 100%; } Am I missing something here? If your images are always higher than they are both within the rules, behaviors Will appear to If an IMG is shorter than the original element than the first rule, then its parents will extend to the full width. The second will not be the rule.

c++ - expected primary-expression before '<<' token -

Anyone can explain this error, I do not understand why to get it. 310: 32: error: expected primary-expression '& lt; & lt; & gt; Token In this line of code. cout & lt; & Lt; "Name:" & lt; & Lt; Setup (22) & lt; & Lt; Profile [x] .name & lt; & Lt; You forgot to add the following at the beginning of your file: #include & lt; Iostream & gt; # Include & lt; iomanip & gt; Using std :: cout; using std :: endl; Using std :: setw;

How to get Python 3.4 on Sublime Text 3? -

Is there a step by step process to get the latest version of Python for a beginner (3.4) on the subtext text 3 to work? I tried to add Python 3 as another build but I do not think I was adding it correctly (instructions were given how to add it to the sublight text 2) because I created my function I can not do it when I set my profile to Python 3 on the Sublime Text 3. Only the original Python build version is working. How can I work with Python 3.4? Thanks actually need immediate help geto tool & gt; Build & gt; Enter the new build system and the following. {"cmd": ["python3", "-u", "$ file"], "file_regex": "^ [] * file \" (... *) " "Source", "encoding": "utf8", "path": "/ library / framework / Python.framework / version / 3.4 / bin / \", "line ([0-9] *)", line ([0-9] *) "} Save the file and restart the subtext text If it still does n...

android - Dialog and displaying it in a TextView -

IÂ've had a dialog where I can select many things, in my example content for a pizza. I want to select / select more than one item but every time I run the app, I can select more than one but it only displays one. Here's my code, I was ignoring it once but my mistake could not be found. I hope you can help me. Thanks in advance;) Private Zero pizzaBelagDialog () {// Variablen Ultimate ArrayList & LT; Integer & gt; Arraybill = new arreelist & lt; Integer & gt; (); DialogBuilder = New AlertDialog.Builder (this); Last string [] strBelaege = {"Hühnchen", "Pepperoni", "Pilze", "Zwiebeln", "Speak", "Oliven", "Ananas", "Pommes", "SOA ?? e", "Meeresfrüchte"} ; // process strBelag = "\ n Belag: \ n"; DialogBuilder.setTitle ("WAhle deinen Belag aus"); dialogBuilder.setMultiChoiceItems (strBelaege, null, New DialogInterface.OnMultiChoiceClickList...

android - Convert JSONArray to String[] -

JSONArray due to some problems in the format, it will be out this way: string [] title = {"commentator's name 1", "commentator's name 2", "commentator's name 3"}; This is my JSON: "commentator": [ "commentator's name 1", "commentator's name 2", "commentator's name 3 "] and this is my code: // getting JSON string URL JSONObject json = userFunction.getAudios (); & Lt; String & gt; List = New Arrestist & lt; String & gt; (); Try {Commenter = json.getJSONArray (TAG_COMENTATOR); Log D. ("Commentator", commentator.stosting ()); //sistmkautkprintelan("******************************) if (commentator! = NULL) to { (Int i = 0; i & lt; Kmentetrklambi (); i ++) {log d. ( "for" loop, "value" + commentator .getString (i)); list.add (commentator. GetString (i));}}} Grab (Jasonnexpress E) {// Tudo auto-generated catch block e.printStack...

html - Heading tag in css creates new line -

I'm trying to make it some input box in input, but every time I do text style in CSS, Styling closes my input box in "a new line" The first 2 text parts in the image are shaky, and the next 4 does not want to make a new line to my styling texts. Image: html part: & lt; H0 & gt; Flowers nuen: & lt; / H5> & Lt; Input type = "article" name = "name" & gt; & Lt; Br> & Lt; H0 & gt; E-mail: & lt; / H5> & Lt; Input type = "text" name = "email" & gt; & Lt; Br> & Lt; H5 & gt; Telephone NR: & lt; / H5> & Lt; Input type = "text" name = "tlf" & gt; & Lt; Br> & Lt; H5 & gt; Interlaced person: & lt; / H5> & Lt; Input type = "text" name = "pane" & gt; & Lt; Br> & Lt; H5 & gt; Flytype: & lt; / H5> & Lt; Input type = "article" name = "type" ...

Creating a table from a multidimensional array in PHP -

I am receiving an error from an API that has a variable number of fields and I try to get it in the table I am doing A sample object looks like this: array 'silver' => Array 'property' = & gt; Array 'paragraph' = & gt; Float2 'ROS_Medium_1' = & gt; Float 37704 'ROS_Medium_2' = & gt; Float 37711 'ROS_Medium_3' = & gt; Float 37546 'ROS_Leaderboard_Footer' => Float 37 9 41 'ROS_Leaderboard_Infinite Scroll' = & gt; Float 3636 'price' = & gt; Float 375 'discount' = & gt; Int 0 'banner_cpm' = & gt; Float 12.7 9 'banner_sov' = & gt; Float 0.0099 'content_cpm' = & gt; Float 150 'content_sov' => float 0.0028 'fixed_cpm' = & gt; Float 0 'blended CPM' => Float 26.26 'gold' => Array 'property' = & gt; Array 'paragraph' = & gt; Float2 'ros_layerboard' = & gt;...

Android back button going to main activity when i pressed log out button -

* मैंने मुख्य गतिविधि और लॉगिन गतिविधि बनाई है .. * मेरा ऐप उपयोगकर्ता को लॉगिन करने के लिए रीडायरेक्ट करेगा Actvity जब वे लॉगआउट बटन पर क्लिक करें, लेकिन समस्या है जब मैं वापस क्लिक करें यह अभी भी मुख्य गतिविधि पर जा रहा है जो मैं नहीं करना चाहता है मेरा ऐप .. * मेरे अनुसार वापस बटन श्रोता के साथ कुछ शर्त लेखन कुछ तरह से मदद कर सकते हैं लेकिन इससे कोई भी अच्छा उपाय नहीं है? जब आप लॉगिन गतिविधि शुरू करते हैं > FLAG_ACTIVITY_CLEAR_TASK फ्लैग किसी भी मौजूदा कार्य जो कार्यकलाप शुरू होने से पहले क्रियाकलाप को मंजूरी के साथ जोड़ा जाएगा । अर्थात, गतिविधि नई जड़ बन जाती है और किसी भी पुरानी गतिविधियां समाप्त हो जाती हैं। यह ध्वज केवल FLAG_ACTIVITY_NEW_TASK उदाहरण के साथ संयोजन में किया जा सकता है: आशय इरादा = नया आशय (यह, लॉगिनविशक्ति। वर्ग); Intent.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK | आशय। FLAG_ACTIVITY_CLEAR_TASK); startActivity (आशय); नोट: आप का उपयोग करके लॉग इन अट्रिटीटी को बंद करने के बाद और यदि आप `गतिविधि इतिहास 'से लॉन्च करते हैं तो लॉगनऍक्टिवि...

typescript compiler ignoring define/import in 1 file -

I am suddenly having a very awkward collection of one of my files. comm.ts: import documents = required ('./documents / documents'); Import element = requirement ('./document / elements / element'); Import Paragraph = Required ('./documents / element / paragraph'); Import list body = requires ('. / Document / list-body'); // ... comm.js: var __extends = this .__ extends || Function (D, B) {for (in var p) B (BHSOPPPERTI (P)) D [P] = B [P]; Function __ () {this.constructor = d; } __. Prototype = bprotype; D.prototype = new __ (); }; Define ("Required", "Export"), Function (Required, Export) {// ... What does the extension define with more important? Is 4 imports? They are used in code. And the big problem is that when I run I receive an error: SCRIPT5007: The property's 'prototype' Unable to obtain text"> with extension what Typuscript prepares it for assistance with heritage, ie, the...

php - How to attach access token to a google calendar API request -

Many documents attach an access token without a clear token when authorizing Google API reference. The request I make is: https://www.googleapis.com/calendar/v3/calendars/mtnmath@mtnmath.com/events?ya29.1.AADTN I have removed most access tokens in the above line. This token was successfully received in the following way: $ client- & gt; Adscope ("https://www.googleapis.com/auth/calendar"); $ Customer & gt; AddScope ("https://www.googleapis.com/auth/calendar.readonly"); and $ _ session ['access_token'] = $ client- & gt; GetAccessToken (); In Php, token will be sent to $ client- & gt; GetAccessToken (); I was not sure that the problem is attached to the token but it's a matter of concern about. The result was "403 forbidden" I would appreciate any suggestions. I found a site that gives a clear example, although it still tries two The site to get from appears to add the "access_token =" acce...

c# - Changing the BackColor of a Windows Form -

Why can not I change the backcolor of my form in this form? MainForm BackColor = System.Drawing.Color.Black; In this console I get: requires an object reference to non-static field, method, or property 'System.Windows. forms.Control.BackColor.get '(CS0120) are classes that are not Instantiated Static classes are static methods or static properties (or both) when you use a line like this: The mainform. Backside = System Drawing Collar Black; // & lt; Class name & gt; & Lt; Property & gt; What the first C # compiler does is for the local class variable called MainForm . Since there was no one, it was seen outside of your local area and got its own code named "Windows.Form class MainForm . Then it was seen to see that there is a fixed asset in class MainForm which is called BackColor . Compiler said, "Oh look, BackColor is a property called , but its not static ", which is when the compiler complains to you and threw...

find command problems in perl script -

I am writing a script that will create a new tar file which will only be created in the files of the previous tar.gz file Afterwards were made were made. My $ path_to_logs = "/ home / myscripts /"; My $ FNAME = `ls -t * .tar.gz | Head-n1`; My $ FILENAME = $ path_to_logs $ FNAME; Chomp ($ FILENAME); If (-i $ FILENAME) {my $ converted = `search '-name' * .log '- new $ FILENAME`; $ Chomp changed; $ Command = "tar-cvzT" $ has been changed. "-f Delevestem - $ (date +% Y-% m-% d-% H-% M-% S) .tar.gz"; Chomp $ command; Print $ order; } However, the outbound order of $ order shows that each result is on the new line, so why am I not receiving concerted command for the tar? Thank you. How to solve your immediate problem? : find my $ find_cmd = "-name" * .log "-newer $ filename"; Open in my $, '-', $ find_cmd or die "command can not be executed Could. $! \ N "; While doing something with {chomp; p...

javascript - jQuery append, wait till rendered with no timeout -

I have an AJAX that adds HTML to the page with jQuery's append method HTML is something big and I can change the colors of the cells , Those colors have been determined by CSS in the same HTML document. My problem is that, if I loop cells immediately after append method, then all the cells have no color, I have to wait a few seconds to work. Right now, I am ending a time to start looping through the cells, but I do not want to do this. I want to know 1) Why the page has not been provided with an attachment, why HTML is sung completely and 2) What options do I have? I am thinking of putting an interval to check for the specific value of a cell at the end of HTML, but I am not very happy with that approach. Thank you! Do not use interval on AJAX responses. They work if you set enough time for the time, but you have to set for maximum time, who requests you to take, which still has the chance to fail after 5 seconds. In addition, if the request takes milliseconds, nothi...

MYSQL return results where there exist at least one from the other table -

Say I have data from these two tables: Student table column: ID | Name Course table column: id | Code | Name And I want to use the student and course as Student.id. To obtain the following course as a course: Student Course ----------------- 1 | C1 | B1 | A2 F2 | B2 | A3 C3 | B3 | F How do I ask it, with only one course, and the students will return with their other courses: Student Course ----- ------------ 1 | C1 | B1 | A3 C3 | B3 | F ? I have tried: Choose Student.id, Course Course Course Inner Student On Course. Study = Student. ID where course. Code = 'C' but only me student. Course ----------------- 1 | C3 | C select s.id, c c course c INNER JOIN student C. on S. Where studied = s.id is present (from selection 1 to course c 1 where c. Studded = c 1. student and c 1. course = 'c')

input - Closing a Tkinter Entry Box in Python -

I am trying to create a simple popup text entry for the user in which a user enters a text and submits Does (one button) When I click on submit, I want to close the popup entry box and continue with the rest of the code. The sample code to display below is what I've taken: Tycooner import from * root = Tk () nameLabel = Label (root, text = "name") ent = Entry (root, Bd = 5) def getName (): print ent.get () = submit button (root, text = "submit", command = found), nameLabel.pack () ent.pack () submit.pack (side = Bottom) Route. Mainloop () Print "The rest of the code goes here" I do not have much experience with the tanker, so I'm not sure where and how to do the proper function to close the entry. The user then hits 'Submit', my guess is that it should be inside the getName () function? If I understand you correctly, you just need to call the root window method at the end getName function: def getName (): print ent.get ...

javascript - Can PHP run after the page is loaded? -

Image
Then PHP is executed server-side. But is PHP possible to run after the page is loaded? For example, if I have a value (put in a file, I say) that has changed every second when I press a button that uses Javascript then get that value To ask PHP to do, it shows what is currently the price or what is on page load? I think you will need to get one of the diagrams that shows the original HTTP and web How the server works. This is explained in plain words from here, you will understand more. In the simplest possible case, you can type the address, and get a web page with its contents, because the request / response your browser and a The connection between the web server is located somewhere in the world. Plain HTML In a less simple way, think of it in this way. Basically, if a page happens during a fresh phase, (which means that you have made a few clicks and waiting for the data to return), it means that the feedback / loads from the web server If PHP is not installed a...

php - Error when trying to connect to database -

Then I'm trying to connect to the database and I get this error Warning: Mysqli_connect (): (HY000 / 1045): Access denied for user's root '@ localhost' (using password: yes) line 2 in /usr/local/zend/share/userServer/register.php On line 2 $ conn = mysqli_connect ("localhost", "root", "xxxx", "db"); Definitely where to go from here .... Besides my credentials are 100% correct You are trying to add a database with mysql user root @ localhost, check that the user exists or not your database: mysql Choose from user * where user = 'root' and host = 'localhost'; The user will have the same row if the root @ localhost exists.

c++ - Force Templated Constructor to Run? -

I understand that the inlet is the trick to be forced to create a global object where it is used. It is used for std :: cout believe me. #ifndef GUARD_H # Defined GUARD_H class magical {// default constructor and such ...}; Class init {public: init (); }; External magical amp; Magic; Namespace {Init __magical_initializer; // this works as an object, created in each source file) it is included in #endif src: #include "magical.h" # Include & lt; New & gt; Static count; // believe that there is a sample, which says that global integers are started with zero fixed alignment (magical) four buffers [sums (magical)]; Magical & amp; Magic = * re-reference & lt; Magical * & gt; (Buffer); Init :: init () {if (! Count ++) {new (buffer) magical; }} I was thinking that there is a template in it because my code would look something like this: template There is no way to resolve this problem because the template does not exist in source files Can...

inheritance - How to pass javascript object value to its "child" object -

I am trying to pass a variable for a child object of my original object, but its return is undefined. (Obviously I'm not sure how a JS object works) var = {pid: '565', child: {cid: this.pid + '_child_789', say hello: function () {warning ('my id is' + this.cid ); }}} Calling parent.child.sayHello () log this.cid as undefined. I am wrong (wrong) thinking that the child will be the heir to the property of the property and it can be specified by this.pid , but can not do it. Is there any way to do this with a hard-coding quality? I know that I can do this after creating the parent.child.cid = parent.pid + '_child_789' object, but it is not scalable or practical for me. You can not use that kind of property in your object; I will go into more detail, However, this question has already been answered several times in advance. Please review the following questions:

javascript - Passing variable to a PHP page with Spaces -

I have a selected element as shown below. I'm passing the value of an option as a variable on a PHP page as the javascript is shown below: Now that I am able to resize $ _GET ['area1'] in PHP page; When Queenstown is selected, but whenever I am trying to pass Queens Town, it is working now. Anyone can help. You have to run correctly with the values, otherwise you will end up with a URL like this: / p> selectcity.php? City1 = xyz and area1 = Queens Town The one you want is not likely to work. Use it instead: var data = {city1: city1, area1: $ ('# regions'). Val ()}; $ ('# List') Load ('selectcity.php?' + $ .premium (data)); Also see:

networking - How To Access External IP Inside Own Network? -

This is my representation of our IP in our home network. Default gateway - 1902.18.1.1 server - 192.168.1.4 External IP (our IP with the help of whatsmyip.org) - 122.x .xx.xxx I am using a server which I want to use in the same network to use our external IP, what is currently happening when I url our Type in external IP which is 122.x.xx.xxx, Browser redirects me * Note: Other computers (computer store, 3G) Etc.) which is outside the network, is accessed on our external IP, and on my default gateway, I have access to the file that I had put there, for example they type on the url: 122.x The .xx.xxx / SamplePHP browser will display the PHP program that I created. Do you want to set port redirection for your webserver or access all resources Like your internal network were you in your internal network? If in the past, I would consult my router's manual how to set up port forwarding. Less short story, highlighting the outer world of your router's webserver (a...

javascript - can anyone offer help on how to make this code more efficient? -

I am very new to coding, so please forgive me a newbie mistakes made by me. Any and all help is appreciated! By using the GVT API, I was able to drag images from the Flix database and was able to put them in a spread sheet, but my used process seems to be unnecessarily painstaking. Here is the function that I used to draw the image URL from the database: function kwURL (keyword) {var response = UrlFetchApp.fetch ("https: / /www.flickr.com/search/?q= "+ keyword) var content = response.getContentText (); Var length = content.length; Var calculation = 0; (Var i = 0; i & lt; = length -3; i ++) {if (content.substring (i, 5 + i) .equals ("src = \" ")) {var start = I + 5 ; Count + 1 (if (content.substring (e, e + 1) .equals ("\" ")) {var end = 1} (count == 4) {for (var e = start; e & lt; Length-1; e ++) e break;}}} If (calculation == 4) {break;}}} Logger.log (content.substring (start, end)); return content.substring (start, end) :} ...

unix - Return a value from a thread in C -

I have the thread in C which is using the Pthreads library I use pthread_exit (...) to return the value, and wait for it to be included in main . The thing is, I was testing it and with two threads, the result of one of them was fine, but the other was something that was not understandable. As an example, both threads should return 32, one of them was OK, but other returns-123456789 can someone help me? Zero * contar (zero * arg) {// funcion thread int i, j = 0; Int * aux = (int *) arg; Int id = * aux; Int Strip = N / T; Int inicio = id * strip; Int Fin = Inisio + Bar; Printf ("% d% d% d \ n", id, inicio, fin); For (i = inicio; i & lt; fin; i ++) {if ([VEC [i] == X) {j ++; }} Pthread_exit (& amp; j); } Int main (int argc, char * argv []) {int i, j, k; Zero * reserve; Int * aux; Int Akum = 0; N = (argc> 1)? Atoi (argv [1]): n; T = (argc> 2)? Atoi (argv [2]): t; X = (RGC & gt; 3)? Atoi (argv [3]): x; // Aloka Memoria for Vilar VEC = (Int *) Mallok (S...

sql server - .SQL to .DB conversion -

I have a large database in .sql format for some projects (~ 40gigs). The server on which I can run it is not SQL Server and I can only use SQLite 3, is there any way to convert to 2 formats? You can try this on a free of charge on CodeProject Net converter is. Here are some business tools and also.

ruby on rails - Automatically create relationship unless it already exists -

कक्षा कैट & lt; ActiveRecord :: बेस है has_many: catbowls है has_many: कटोरे, के माध्यम से:: catbowls अंत वर्ग CatBowl & lt; ActiveRecord :: बेस is_to: बिल्लियों belong_to: कटोरे के अंत वर्ग बाउल & lt; ActiveRecord :: बेस has_many: catbowls has_many: बिल्लियों, के माध्यम से: अंत catbowls रेल कंसोल में मैं एक बिल्ली के लिए एक कटोरा दे सकते हैं: बिल्ली = बिल्ली। बनाएं (नाम: 'टिब्ब्ल्स') कटोरा = बाउल। बनाएं (रंग: 'नीला') cat.catbowls # = & gt; [] Cat.catbowls.create (bowl_id: bowl.id) cat.catbowls # = & gt; [# & Lt; बाउल आईडी: 1, रंग: "नीला", बनाया गया_आट: "2014-04-23 22:53:15", अपडेट किया गया_आइट: "2014-04-23 22:53:15" & gt;] यह समझ में आता है, और निम्नलिखित सहयोग मौजूद हैं: CatBowl.all # = & gt; [# & Lt; Bowl id: 1, cat_id: 1, bowl_id: 1 & gt;] हालांकि, यह मेरी समस्या है अगर मैं फिर से एसोसिएशन बनाऊं, तो यह वास्तव में नतीजे बदल नहीं सकता है, लेकिन मुझे एक अप्रभावी समान कैटबोवल रिश...

javascript - return false; onclick submit button not working -

If there is an error in my code, then I am trying to get my submit button to return false, But this is a broken page, I have tried in the console of Firefox and there are no errors. Thanks The return lies on the bottom code: function searchform ( ) {// To check all the boxes, whether any error is confirmed, FName (); ConfirmLName (); Confirm Email(); ConfirmAddress1 (); ConfirmAddress2 (); confirmCity (); confirmCode (); confirmUName (); confirm pass(); // Be sure to check that a region is selected (nhlForm.regbox == "select the country first", "select your country first") {// error message shows showMessage (nhlForm.regbox, "error", " * Select an area "); ShowMessage (nhlForm.counBox, "Error", "* Select a Country"); } // Check if checkbox is checked, if not, Messi will appear and will not send form (nhlForm.agebox.checked == true) {showMessage (nhlForm.agebox, "bingo", ""); } Else {// shows error ...

vim - vi editor for html indenting -

इस सवाल का पहले से ही एक उत्तर है: 9 जवाब मैं अपना विकास कर रहा हूँ संस्करण 7.2 के vim वाला एक redhat linux बॉक्स। मैं एचटीएमएल, सीएसएस और जावास्क्रिप्ट विकास कर रहा हूं। अगली पंक्ति, रंग कोडिंग आदि पर मैं इंडेंटेन्टेशन फीचर जैसी सुविधाओं कैसे प्राप्त कर सकता हूं.कृपया मुझे कॉन्फ़िगर करने के लिए सुझाव दें ताकि मेरा विकास तेज़ हो जाएगा और मुझे सभी फाइलों को मेरी स्थानीय मशीन को सिर्फ इंडैन्टेशन के लिए कॉपी करने की ज़रूरत नहीं है। वाक्यरचना हाइलाइट करने के लिए आपको इन 2 लाइनों को अपने vimrc में रखना होगा; फ़ाइल प्रकार विशिष्ट प्लगइन्स & amp; इंडेंटेशन नियम: पर फ़ाइलप्रकार प्लगइन इंडेंट पर सिंटैक्स, इसके अलावा, आपको अपने vimrc में यह विकल्प भी जोड़ना चाहिए कि आप अपने कोड को स्वत: संदर्भ पर जब आप & lt; CR & gt; : सेट ऑटो इंडेंट इसके अलावा, कई वर्कफ़्लोज़ भी हो सकते हैं जिनका उपयोग आप कर सकते हैं, वीआईएम वितरण के साथ पैक किए गए एक प्लगइन को आप खोलने में सक्षम बनाता है ; फाइलों को एफटीपी, आरसीपी, एससीपी आदि जैसे प्रोटोकॉल पर सहेजें ताकि आप सीधे अपनी...

javascript - Show context menu on right click High-chart v3.0.10 -

I am using bar charts of the High-Chart API v3.0.10. I need to show the context menu on the right click to show the value of bars X and Y axis I understand how to implement the changes given in the given link. To get acquainted with the CustomEvents.js plugin, which allows adding custom right click events.

python - How to change time format -

I have a python script that connects to DB and "% H:% M:% S \ n" I need to change that time in seconds how can I do this? p_out = p.stdout.read ) bar = [time.strptime (p_out, "% H:% M:% S \ n ")] m1 = time.maketime (bar [0] .timetplay ()) print m1 returns 0 main () If you need the total number only after the second, just insert the following code sample p_out = p.stdout. Read () times = [time.strptime (p_out, "% H:% M:% S \ n")] seconds S = (bar [0] .tm_hour * 60 * 60) + (bar [0] .tm_min * 60) + times [0] .tm_sec print second

c# - How to Write MemoryStream to End of Text File -

I've used this code to write in Memoristrym data text file. dim author as new writers as dim memory New Memoristrym () (Memoristrem) New Failstrym (app. Startappath and "\ Doksog" and ".txt", Failmod. Open File Access. Write, FileShare. Readwrit) Now type the memorystream file memorystream. Rightto (The file) But when I write data in a text file, I delete it from the previous content. How do I write a memory stream at the end of the text file? (Just add memory stream data at the end of the file) what File. Search (0, SeekOrigin.End) Before writing

networking - URL filtering , issues with URL -

I am working on a URL filtering project. I have been given a database in which the URL needs to be blocked (eg: a.b.com/d/e) I get http requests from Yuri and Domains. I compare what I get with my database and redirect the user without problems. So far, so good. The problem begins with the URL, which contains query strings and other magics with the URL. As an example, if the user enters abcom / d / e? Junk, what I am getting will not match my database, and users will bypass my filter, and they are still on abcom / d / e Will be able to go. I tried some worthless work after special characters like "?, #" But there are problems like url: youtube.com/watch?v=12vh55_1ul8, which youtube.com/watch like becames and All YouTube blocks This solution creates more problems for me. Now I am very confused about how to solve this problem. Is there a guide or a library that I can use in C ++? Try this code: string str (get_requsted_uri ()) ; String Straw ("http://ge...

kango framework - extension appearing in the context menu of the browsers -

I am developing a cross browser extension using the Congo framework. I want to add my extension to the browser's context menu. I have already set up "context_menu": the extension_info.json file is correct in the permissions array, but my extension does not appear in the context menu (when there is a right click in the browser window). how can I do this? You need to add an event listener to main.js like this: kango.ui.contextMenuItem.addEventListener (kango.ui.contextMenuItem.event.CLICK, function () {kango.browser.tabs.getCurrent (function (tab) {tab.dispatchMessage ('ContextMenuItemClick');}) ;}); And in content.js you need to consume such an event: function handleContextMenuClick () {var clickedElement = null; If (document 'addEventListener') {document.addEventListener ('mousedown', function (event) {if (event.button == 2 & amp; IsSupported ()) {clickedElement = event.target; kango.console .log ('StopIt menu item 1 click...

php - The capturing group in the regular expression isn't output -

& lt ;? Php $ string = 'This is my regular expression'; $ Array = array (); Preg_match ('/^.* (my)) Regular (expression)?) $ / I', $ string, $ array); var_dump ($ array); ? & Gt; After the execution of this script I have: array (size = 4) 0 = & gt; String 'This is my regular expression' (length = 29) 1 = & gt; String 'regular expression' (length = 19) 2 = & gt; String '' (length = 0) 3 = & gt; String 'expression' (length = 10) Why does not this capturing group (mine)? The reason for this is that you have a greedy quantifier . Before this you instead of the following kind of a non-greedy quantifier * . should use: & lt ;? Php $ string = 'This is my regular expression'; $ Array = array (); Preg_match ('/^.*? ((My)? Regular (expression)?) $ / I', $ string, $ array); var_dump ($ array); ? & Gt; [OUTPUT] array (size = 4) 0 = & gt; String 'This is my regular ...

How can I resolve the "LOCALDB_ERROR_AUTO_INSTANCE_CREATE_FAILED" error after installing SQL Server 2014 Express LocalDB? -

I am using SQL Server 2012 and Visual Studio 2013 on Windows 8.1. All work fine After installing the SQL Server 2014 Express LocalDB, I have not been able to work with LocalDB . I get odd errors, according to one I LOCALDB_ERROR_AUTO_INSTANCE_CREATE_FAILED and according to I should get the information in the event log, but there is nothing in the event log. When sqllocaldb command works and I can set LocalDB in this form: C : \ & Gt; Sqllocaldb v Microsoft SQL Server 2014 (12.0.2000.8) But whenever I try to work with my projects, I get connection related errors. The inherent error indicates that automatic Example creation did not work. It is resolved by changing the connection string from (localDB) \ v11.0 to (locali) \ v12.0 UPDATE may be: (localdb) \ projectsv12 I have had a similar problem. Try it: D

regex - PostgreSQL check constraint not working -

I am trying to bring down barriers to postgresql which checks columns WOD for patterns. If the pattern does not match, then the error should be thrown. Contract wicking check (wcode :: text ~ '[\ w] {4,4} - [\ w] {2,2} - [\ w] {1,1} :: text); Geniun input string is "AA14-AM-1" which actually works but the problem is that if I use "AA14-AM-14" or "AA-14-AM - 1444 ", then it does not do this through an error I want to restrict the input to use this (" AA-14-AM-1 ") pattern. You have an "unlimited" regex (not sure that this is the right technical term). Which basically means that the pattern has come anywhere inside the input string. To match the input string with the exact pattern, you need "anchored" regex: contract wcoding check (wcode :: text ~ '^ [ \ W] {4,4} - [\ w] {2,2} - [\ w] {1,1} $ '); The "anchor" pattern on the start and end of the ^ and $ which indicates the result tha...

qt - QWebView: Only disable javascript coming from websites? -

I am currently writing a small browser, and want to interact with pages via javascript (e.g. Like-like-users). However I want to disable javascript loading of webpages via QWebSettings . Now when I do something like this: settings = QWebSettings.globalSettings () settings.setAttribute (QWebSettings.JavascriptEnabled, False) Javascript from the web Is not working, but evaluate javascript or addToJavaScriptWindowObject of QWebFrame no longer does not work is. > I believe that based on WebKitGettee, this javascript dismisses directly by using the Coeur Library. Can I do something similar, as if to evaluate the copy of the user and somehow pull him for webwish? Although it does not seem like easy solution for me. today I just this means at least I do something like that I can: > Webview.page (). MainFrame () DocumentElement (). EvaluateJavaScript ("...") And it works fine.

c++ - How to correctly restore widgets that are resized by windows 7/vista aero snap -

Windows 7 has this functionality, where a window is pulled to the side of the screen, then it is maximized to take half of it. . My problem is that I am trying to restore the size and position of the widget and when Windows 7 creates the "max" widget, QT still gives its status and size as if it is just now Also shown as normal , i.e. - completely incorrect position and size. Is there any control in QT5? I can not find it anywhere in the docs and its weird It is essentially what I do I am doing It seems that "framagemetry" part is necessary to compensate for widget boundaries. QT + = gui-private .pro is required for the file to work below. #include & lt; WinUser.h & gt; # Include & lt; Qpa / qplatformnativeinterface.h & gt; Fixed QWindow * windowForWidget (Constricted * Widget) {QWindow * window = widget- & gt; Windowhandle (); If (window) return window; Const QWidget * Basics = Widget-> NetworkWidget (); If (Native) Native ...

ios - Objective-C way or compiler directive to force a class file include a method without adding a protocol? -

I have a custom singleton mycolor class that can easily easily change the color of several buttons with many UIViewController s can change at the same time. I put #import "MyColors.h" in every code I need to get the color of a button. Everything works perfectly and setting the color value in MyColors , the color is applied correctly where I want to. Now, I want to change the vibrant colors so I send NSNotification name "COLORS_CHANGED" . So every class sees it and immediately applies color. What do I have to do: Force XCode to remind me that .m file containing MyColors H is included to see the colorsChanged method should also be included, therefore, it will stop the mistake of adding a supervisor to me OR: Add something like category or something like this MyColors.h to do this ... What I do not want to do: I do not want to make a protocol and it is not Yek is .m Add as representatives to the files of the file, inclu...

ios - getting latest saved file from Directory -

I searched a lot but failed to find any solutions I am working on the app that is making the video and local The directory has been saved and is showing these saved videos on the front of the app. But I want to show only 6 latest saved videos on the screen. How do I get the latest video path from the directory? help please. This is the code that I have used to get all the video files [[NSFileManager defaultManager] fileExistsAtPath: DocumentPath isDirectory: & amp; IsDir]; If (isDir) {NSMutableArray * contentItemArray = [[NSMutableArray alloc] init]; NSArray * contentOf directory = [[NSFileManager defaultManager] Contentoff DirectoryAct: Last Directory Error: NULL]; For (Int i = 0; I & lt; [contentOf Directory Number]; i ++) {NSString * fileName = [contentOfDirectory ObjectIntext: i]; If ([FileName.pathExtension is EqualToString: @ "mov"]) {[contentItemArray addObject: fileName]; }}}} You may find the date of creation and the last 6 Has been created, by...

python - file to dictionary:value is a dictionary where the key is repeated -

I open a file containing: No transaction customer customer purchase Purchase ---- --------- ---- ---------- ------------- 1 09-04-2014 Barco Bama Potato: 2.67, sugar: 1.98, cereals: 5.99 crisps: 1.0 9 2 11-04-2014 Barcoba parsley: 0.76 grains: 3.22 3 11-04-2014 vladimirputin bread: 0.66, milk: 2.87, parsley: 1.33 > and I would like the output dictionary like this: {'milk': {'vladimirputin': 2.87}, 'grain': {'barcomba': 9.21 }, 'Roti': {'' '' potato ': {' barcomba ': 2.67},' sugar ': {' barcomba ': 1 9 8}, 'parsley': {'vladimirputin': 1.33, I did this: for the line in the file C = {} File = open (filename name, 'r'): if the line [0] .isdigit (): fields = line partition () c = {} f = open (fileNameStr): if not line [0] .isdigit (): continue the transaction, _date, customerId , PurchasePairs = line for pairs in purchase .split () pair.Split (','):...

apk - Android install source -

Is it possible to get a source to install from a Android app? I mean, I want to see if installed by app Play Store , Amazon Appstore or by executing APK. PS: I think my app looks at crashes and I was able to send a bug report that was installed through my app Play Store Was there. How do I get this value? Package Manager class provides the method that will tell you the name of the package that you specified That package was installed. There will be no cost in side-loading apps. The latest version of Amazon Store finally sets PackageManager.getInstallerPackageName () to the contrary to " com.amazon.venezia " Source: For an example:

machine learning - Why linear transformation improves accuracy and efficiency of classification for high-dimensional data? -

Let's have an MA? N (M: number of records, and n: number of properties) should be dataset. When the number of properties is large and the dataset is X noise, the classification becomes more complex and the accuracy of the classification decreases. One way to eliminate this problem is to use linear changes, that is, to classify on Y = XR, where R is an N.O. P Matrix and P & lt; = n I was wondering how linear change simplifies classification? And why the classified accuracy increases, if we classify the conversion data, then is the Y X noise? will not work as a linear conversion, but some linear changes are sometimes useful especially , And linear changes are often used for dimensional reduction. The basic idea is that most information is probably contained in some linear combinations of the features of the dataset, and that, away from throwing everyone else, we force ourselves to use simple models Are / are in short dose. It is not always so great, for example, eve...

javascript - Jquery: prepend content retrieved with .load -

I am loading an SVG via AJAX with jquery: $ ("Body") .load ("https://upload.wikimedia.org/wikipedia/commons/0/02/SVG_logo.svg"); Which load is fine, but changes all the contents in the body What I want to do is load first in SDG, so SVG does not change everything, but & lt; body & gt; After is inserted as the first element. Try it out: $ ajax ({url: "https://upload.wikimedia.org/wikipedia/commons/0/02/SVG_logo.svg", method: "GET", data type: "html", success: function (data) {$ ("body"). Prepaid (data);}}) If you want to get different content (such as XML / JSN elements), you have to adjust the Datat Type . Works with your example - SVG just below the body and your #svg div

matlab - Opening image and text file with the same name -

My problem is that I have a folder in which there are some images, such as a.jpg, b.jpg, and Similarly, text files in another folder include a.txt, b.txt, and so on. I will select an image like a.jpg is selected with the image, the text file a.txt is also displayed. How to do it You need to remove the file name (such as 'a' / code>) Full-file name (e.g., 'a.jpg' ). You can use the fileparts command for this termination in the 'A.jpg' for 'a' and 'jpg' Please read the documentation for more information.

web services - Storing image in DB vs filesystem for user uploaded images in website -

I am creating a website where users will be allowed to upload images. The image can be restricted to as much space as possible. I have two thoughts in mind. To store the image in the NoCQL DB such as Mongo DB using Gridfus The file system has the path stored in the DB and to store the image. Which is better than the above? And why? sigh Why do all jump into Gridfix? Based on the case of size and precision of images, I recommend to store images in DB directly (not through GridFS). The file system works well to store images, but it is not not trivial You will need a separate backup system, failover, replication, etc. It can be divops-prudent. You will need to create a smart directory structure that is a leak intact, because different file systems are very different features. Some people have to store 16k files in a folder The problem is not the other, only start to disturb the 1k files af / 2c / af2c2ab3852df91.jpg , where folders af and 2c fi...

php - Add multiple arrays in single table -

& lt; तालिका सीमा = "2" & gt; & Lt;? Php foreach ($ value1 $ मान) {गूंज '& lt; tr & gt; & lt; td & gt;';; प्रतिध्वनि $ मान; गूंज & lt; / td & gt; & lt; / tr & gt; '; }? & Gt; & Lt; / तालिका & gt; मेरे पास अधिक सरणी हैं: array2, array3 उपरोक्त कोड केवल array1 के मान निष्पादित करता है, लेकिन मुझे एक समान तालिका में सभी सरणी के सभी मान अलग कॉलम में चाहिए! array1 | सरणी 2 | सरणी 3 ------------------------ | | | | | | | | मुझे इस तरह से कुछ चाहिए ... मैंने कोड को संशोधित करने की कोशिश की लेकिन पता नहीं कि यह कैसे सही तरीके से करना है। $ data = mysql_query ("SELECT * User_pokemon_db से WHERE user_id = '"$ id।"' "); जबकि ($ पंक्तियां = mysql_fetch_assoc ($ डेटा)) {$ db_id = $ पंक्तियाँ ['आईडी']; $ सरणी [] = $ db_id; $ Level = $ पंक्तियाँ ['स्तर']; $ Array1 [] = $ स्तर; $ Exp = $ पंक्तियां ['exp']; $ Array2 [] = $ exp; $ Pkmn_id = $ पंक्तियाँ ['...

Jasmine Testing for AngularJS -

Unable to test data provided by promus variables. My code contains a factory function draggraph () in which the json data has been retrieved by $ http service. In the controller, I am using the promise to check successful callback and data retrieval. That's why I can not get the data out of promise Then () function. How can I write Jasmine test cases to check that data values? I wrote a stack overflow question and responded to help with such a thing. / P> Post some code if it does not help you to start it This unit is an example test - a small art unit test - which uses $ httpBackend Is first (injection (function ($ httpBackend, Products, PATH) {httpBackend = $ httpBackend; httpBackend.when ('JSONP', PATH.url + 'products? Callback = JSON_CALLBACK') Answer (products);}));

grep - selecting different values from two lines from output in shell -

I am using the runmqsc command to get the output as the following. But something I should be fired out I am using egrep and cut, but not getting the required result. Runmqsc command: echo "dis clusqmgr (*) suspended" | runmqsc QMGR1 Original output: 1: dis clusqmgr (*) Suspended AMQ8441: Performance Cluster Queue Manager Details. CUSUmMGR (GWD1) Channel (TGBD1 SSL) Cluster (CUSD) Suspended (NE) AMQ 8441: Cluster Content Details Details Details CUSUMMGR (GWD2) Channel (TZW 2.SLL) Cluster (CUSD) Suspended ( No) desired output: CUSUmMGR (GWD1) suspended Command to get it Using: echo " Dis clusqmgr (*) suspended "| Runmqsc qmgr1 For example 'CULUMMGR | Suspended '| tr ')' '\ n' | Grep "CLUSQMGR (" | cut-2 2-d ")" Please help. One way to pipe your output: For 'CLUSQMGR | Suspend '| Paste - - | For example, for example 'CLUSQMGR | SUSPEND 'filename | 'Awk' {print $ 1,...

javascript - d3.js can't change outer radius of arc -

I have some donut layouts in my code: var cityPercentage = [50, 30, 20,10]; Var width = 300, height = 300, radius = 100; Var color = d3.scale.linear () .domain ([0,60]). Color (["red", "blue"]); ("Width", width) .attr ("height", height) .attr ("class", "span4"); var city division = d.seselect ("# cities") .append ("svg"). Var group = citydivision.endend ("g") .attr ("conversion", "translation (" + width / 2 + "," + height / 2 + ")"); Var arc = d3.svg.arc (). Witrateredius (Radius-19) .Untra radius (radius); var pi = d3 Layout. (). Value (function (d) {return d;}); Var arcs = group.selectAll (". Arc"). Data (Pie (city credit)). Center () .append ("g") .attr ("class", "arc") .attr ("id", function (d) {return d.data;}); Arcs.append ("path") .attr ("d", arc) .attr ("fill", functi...

tsql - Ignore last character when comparing strings -

मेरे पास निम्न स्ट्रिंग हैं जो मैं तुलना करना चाहता हूं: DECLARE @ a VARCHAR (20) , @ बी VARCHAR (20) SET @ ए = '05Y2203-B10' --SET @ ए = '05Y2203-B10B' SET @ बी = '05 यॉ 2203-बी 10 सी' जब तुलना करते हैं, मैं आखिरी चरित्र को अनदेखा करना चाहता हूं, लेकिन केवल अगर - 4 के बाद सबस्ट्रिंग की लंबाई 4 है। '05Y2203-B10B' --इग्नेर द 'बी '05 यॉ 2203-बी 10' - '0' को अनदेखा न करें कुछ उदाहरण: '05Y2203-B10B' = '05 या 2203-बी 10 बी '- मैच' 05 या 2203-बी 10 बी '=' 05 यॉ 2203-बी 10 सी '- मैच' 05 यॉ 2203-बी 10 '=' 05 यॉ 2203-बी 10 बी '- मैच' 05 यॉ 2203-बी 10 '=' 05 या 2203-बी -11 '- कोई मैच' 05 या -2203- B10 '=' 18G9987-B10 '- कोई मेल स्ट्रिंग हमेशा निम्न में से किसी एक पैटर्न की तरह दिखाई देगी: '% - [AZ ] [0- 9] [0- 9] '- पिछले चरित्र'% - [एजेड] [0- 9] [0- 9] [एजी] 'के साथ- पिछले चरित्र के साथ - से पहले सबस्ट्रिंग की लंबाई अल...

Export all data to Excel using GridView with paging enabled..in asp.net with c# -

I am trying to export data in Excel and I have GridView with Paging enabled when I use HtmlTextWriter Downloading data, it only downloads visible records in GridView. Can we download all records in a single excel file? And the downloaded data should be accompanied by the same orderly status as that sorted in Gridview? Customer source code & lt; Asp: gridview id = "gvDetailFleet" runat = "server" datasource id = "SqlDataSource2" allow = "wrong" allow = "true" autozanerate column = true "datakiname =" oracle id "cellpadding =" 4 "Foreclosure =" # 333333 "Gridlines =" None "& gt; & Lt; RowStyle BackColor = "#EFF3FB" /> & Lt; FooterStyle BackColor = "# 507CD1" font-bold = "true" ForeColor = "white" /> & Lt; PagerStyle BackColor = "# 2461BF" ForeColor = "White" Horizontal Alliance = "Center" ...

Ruby: at given an index in a 2d array, replace the first element in the subarray at that index -

I have a 2D array that looks: array = [["apple" I want to change some strings in the code like "," [orange ", 12], [" peach ", 15], [" lemon ", 7]] / code>, (except the second code in array unchanged) with the help of another 2d array is included in the string that I want to use as a replacement and in other case there is an index. Want to code> etc. In the first position of the array on index 1, put the blanket . Viewing the output Output Anyone can help me: ["Apple", 10], ["blanket", 12], ["Peach", 15], ["Footwear ", 7]] this? should do the following : replacements.each {| r | array [r [1]] [0] = r [0]}

python - pywinusb send a LED OFF_HOOK (0x17) on HID -

I have the following definitions: Telephony device page: 0x0B, telephony headset: 0x05, LED Page: 0x08, LED OFHOK: 0x17 I would like to send "LED OFF_HOOK = 0x17" using the example "Send Simple" example below pywinusb-0.3, but this error "target device was found, but the requested use is not present! " I will appriciate any help thank you import pywinusb Hid def as click_signal (target_usage, target_vendor_id): all_devices = hid.HidDeviceFilter (vendor_id = target_vendor_id) .get_devices () if not all_devices: print ("Can not find target device (vendor_id = 0x% 04x)!"% Target_vendor_id ) Other: All_devices for the device: Try: device.open () DD = device.find_output_reports () report in DD: C = target_usage report in the target_usage report: Report [target_usage] = 1 # Yes, changing value That is the easy report.send () report [target_usage] = 0 report.send () print ("\ nUGUSE CLICKED! \ N") Finally return: device.close () (...

java - Connecting to Iframe using JSoup -

I am using Jesup to use credentials on this page: and redirects to a new page: There is an ifr in which I have the necessary information. The URL of the iframe is: The problem is that I can not connect to that page. The code that is using this code to enter the IFrame is // Variable 'data' are the credentials stored in a map response response = Jsoup.connect ("https: // www .particulares.santandertotta.pt / bepp / sanpt / tarjetas / listadomovimientostarjeetare.fi / 0 ,,, 0.shtml ") data (data) .timeout (15000) .method (Method.GET) .execute (); Every time I run this code and parse the result, it tells me some kind of message that my use was forbidden for security reasons to maintain connections for long periods of time. Can someone explain to me what I am doing wrong? Thank you. Can anyone explain to me what I am doing? In such a situation, to find out what is going on under the cover, Jasp can be doing something wrong, follow those st...

.htaccess - Friendly url using php and htaccess -

I have been able to change the URL according to the values ​​received from the database. In my URL, I have been able to give this article ID and paragraph title Must have to pass this way. $ articleId = 123; $ ArticleTitle = 'first article'; Echoes' & lt; A href = "'. $ ArticleId.' And 'str_replace (", "-", $ article title). '' & gt; Read more & lt; / A & gt; '; In my htaccess file option + follow link reverted to revoked code% {REQUEST_FILENAME}! -f rewrite code% {REQUEST_FILENAME}! -d Recruit Rule (. *) display.php? Id = $ 1 and $ 2 Then on the Display.php I will find the Article ID to get the method. But my problem occurs when I see the URL which is showing it like this. http: // localhost / news / 123 and the first article but I need to display the url in this way. http: // localhost / news / first-article and display the details of the article on Display.php file. I hope I have expl...

special characters between php and java android using Json encode -

As I have a site in the title, I have emphasized the character encoding problem. I have found many solutions on the web but this Does not work or I do not have to use it. In the beginning: I am collecting all the data in php myssql base and I give the json_encode function for application in the data. This is where it crashes all the fields where there is a character with accents, it is placed in an empty space. The data base is either a website (which I can not change it) and it is encoded in Windows 1252 which is inserted directly with wampPHP, why I got a solution $ Liste_amis = $ bdd-> Query ('select FROM lieux'); $ Nombre_amis = 0; While ($ myliste = $ liste_amis-> fetch ()) {foreach ($ myliste as & $ value) {$ value = mb_convert_encoding ($ value, "UTF-8", "Windows-1252"); } $ Output [] = array_map ('utf8_encode', $ myliste); } Print (json_encode ($ output)); But it only works for data inserted with wampPHP and it looks like ...

css - turning links swhite in a div using psudocode -

I am trying to change the color of the link in white in a div, but only in CSS in that DS .leftnav: a {color: white;} something like & lt; Div class = "leftnav" & gt; & Lt; A & gt; Http: /google.com< / A & gt; & Lt; / Div & gt; .leftnav a {color: black}

android - How to return result from onActivityresult -

I am trying to contact the default contact app. I successfully got information from a contact. Now I want to save this data in the array list, in the type of contact. How onActivityResult? I am searching for it for 5 hours. I am new to Android. Here is the code for my on-activative result Active Result on Public Zero (result code, intent data of int record, int) {super.onActivityResult (reqCode) , Resultcode, data); Switch (Rickcode) {case (PICK_CONTACT): if (resultCode == RESULT_OK) {Ure contact data = data .getData (); ContentResolver cr = getContentResolver (); Cursor c = cr.query (contact data, empty, blank, null, empty); If (c.moveToFirst ()) {string id = cgetstring (c .getColumnIndexOrThrow (contact contact ._id)); Long CID = (double) double. Prsd double (id); String name = cgetstring (c .getColumnIndex (ContactsContract.Contacts.DISPLAY_NAME)); Int isfnumber = c .getInt (c.getColumnIndex (contactsContract.Contacts.HAS_PHONE_NUMBER)); If (HephoneNumber> 0) {// this co...