Unnamed: 0
int64
65
6.03M
Id
int64
66
6.03M
Title
stringlengths
10
191
input
stringlengths
23
4.18k
output
stringclasses
10 values
Tag_Number
stringclasses
10 values
5,510,625
5,510,626
Define class variable which refers to a previous class variable in python
<pre><code>class Foo(object): a = "/admin' b = Foo.a + '/hello' </code></pre> <p><code>a</code> refers to a base path. And I want to define the class variable <code>b</code> based on <code>a</code>. How do I achieve this ?</p>
python
[7]
1,805,924
1,805,925
How do I check GPU usage of Android device?
<p>I wanted to calculate the GPU usage. Is there any file for GPU similar the way cpu stats are saved at /proc/stat ?</p> <p>What could be the approach to get the GPU details like frequency etc</p> <p>Thanks</p>
android
[4]
5,438,572
5,438,573
c++ limit process child ignore SIGXCPU
<p>I have this code </p> <pre><code>static void sigXCPU(int pTmp){ cout&lt;&lt;" .... "; } ..... pid_t vPid=fork(); int vStat; switch(vPid){ case -1: perror("fork"); exit(1); case 0: //limit on data struct rlimit vLimD; vLimD.rlim_cur = 100000; vLimD.rlim_max = 1000000; setrl...
c++
[6]
3,678,507
3,678,508
Most elegant way to apply an operator found as a string in java?
<p>Potentially dumb: Assuming I have a string containing an operator what's the best way to apply this operator ? </p> <p>What i tend to do is :</p> <pre><code>if(n.getString(1).equals("&lt;&lt;")) { result = tmp1 &lt;&lt; tmp2; } </code></pre> <p>for each kind of operator I have. Is there a better way ? </p>
java
[1]
1,370,226
1,370,227
Avoiding compiler issues with abs()
<p>When using the <code>double</code> variant of the <code>std::abs()</code> function without the <code>std</code> with g++ 4.6.1, no warning or error is given.</p> <pre><code>#include &lt;algorithm&gt; #include &lt;cmath&gt; double foobar(double a) { return abs(a); } </code></pre> <p>This version of g++ seems ...
c++
[6]
3,184,497
3,184,498
PHP Code and Linefeeds/Carriage Returns
<p>Just wondering, would the following code arrangement cause any issues when calling mysql_connect, i.e.:</p> <pre><code>public function connect() { mysql_connect($this-&gt;host, $this-&gt;username, $this-&gt;password) or die("Could not connect. " . mysql_error()); </co...
php
[2]
2,158,893
2,158,894
How to create an sqlconnection in a class with c# to use in all form?
<ol> <li>Create sqlserver connection in class</li> <li>call connection class to use all form.</li> </ol> <p>I want to create SQLServer connection in class with C# to use all forms.</p> <p>Hereabout code of connection in class file </p> <pre><code>public System.Data.SqlClient.SqlConnection Con = new System.Data.SqlCl...
c#
[0]
3,464,389
3,464,390
onclick is only invoked after second time for dynamically inflated rows android
<p>I am dynamically creating a table. I am inflating the rows using another layout file. But the onclick event for these dynamic rows is triggered only after the second time. Please assist.</p> <pre><code>private void populateRouteDetails(){ TableRow row; View[] lArray = new View[24]; View lV...
android
[4]
5,667,277
5,667,278
calling inner-function dynamically in javascript
<p>is it possible to call inner function dynamically(by it's name)?</p> <p>e.g.</p> <pre><code>function a(){ function b(){..} var funcName = "b"; //calling the function b somehow using funcName } </code></pre> <p>I know it's possible by using eval, but I rather not using eval, if b was global function I ...
javascript
[3]
5,827,645
5,827,646
Parameter argument not working right (beginner)
<p>Newb question, when I write:</p> <pre><code>def right_indent(s): print ' '*70+'s' #puts argument after 70 spaces right_indent('michael') s </code></pre> <p>Why does it return s as a result? Shouldn't it be michael? This seems really sim...
python
[7]
5,981,684
5,981,685
will concurrent multi thread upload improve uploadprocess?
<p>i am uploading files to azure by using intent service, i know that it uses one thread, and i have to upload 20 images. right now it is taking 20-30 minits.</p> <p>if i make 3 threads and uploading simultaneously to azure, will it improve anything and my uploading time will decrease?</p> <p>if it is, please advise...
android
[4]
895,994
895,995
Python | How to create complex dictionary
<p>I want to create a data structure that will be parse as a JSON object. The out put must look like this and this should be a dynamic data structure.</p> <pre><code>{"data": [{"type": "locale", "lat": -34.43778387240597, "lon": 150.04799169921876}, {"type": "poi", "lat": -34.96615974838191, "lon": 149.89967626953126}...
python
[7]
562,550
562,551
setInterval of a private function
<p>i want to do a setInterval of a function that is at the same level as the declaration of the setinterval but not global</p> <p><strong>Example:</strong></p> <pre><code>function a() { function b(){alert("hi");} setInterval("b()",1000); } </code></pre>
javascript
[3]
2,574,378
2,574,379
The Pythonic way to do this? (multiply certain elements in string)
<p>I just want to calculate the product of certain elements (whose index value + 1 is in <strong>N</strong>) of a string.</p> <p>This works fine:</p> <pre><code>start = 1 end = 1000000 N = (1, 10, 100, 1000, 10000, 100000, 1000000) product = 1 concatenated_numbers_str = ''.join([str(x) for x in range(1, end + 1)]) ...
python
[7]
138,714
138,715
How to append this span if the LI element is parent AND has UL (children or submenu)
<p>I basically want to add arrow if the mousehover my navigation. But two rules should apply:</p> <ol> <li>It has to be the TOP parent (I already resolve that in the code)</li> <li>It has to have CHILD elements (UL) submenu, etc. (Which is the problem!)</li> </ol> <p>I can not, no matter what I do get it to only show...
jquery
[5]
5,464,615
5,464,616
dynamic onClick not working
<p>I know im doing something really really stupid here.Im getting the error document.getElementById() is null or not an object. Could some one please help me with this?</p> <pre><code>&lt;body&gt; &lt;div id="box1" style="width:100px;height:100px;background:#ccc;"&gt;&lt;/div&gt; &lt;div id="box2" style="width:100px;h...
javascript
[3]
421,496
421,497
Indexpath.row value not updating
<p>in iphone application.</p> <p>I'm trying to get indexPath.row value (out of didselectedrowatindexpath method) to do something on the basis of row selected in programmatically created tableview.</p> <p>i need to access indexpath.row out of didselectedrowatindexpath method where if/else will define the action on the...
iphone
[8]
2,487,490
2,487,491
Invoke gmail, google+, facebook from android activity
<p>I have an application where I want to share some text data using either gmail/google+/facebook/bluetooth or any sharable application.</p> <p>Please guide me how this can be done.</p> <p>android.intent.action.SEND invoking only gmail and bluetooth</p> <p>Regards,</p> <p>Shankar</p>
android
[4]
2,471,187
2,471,188
Help creating textboxes via loop in aspx file
<p>I am having issues with giving id to a text box in the aspx for</p> <p>heres my code</p> <pre><code> &lt;%for (int i = 2; i &lt;= 10; i++)%&gt; &lt;% {%&gt; &lt;div id="divPerson&lt;%= i %&gt;"&gt; &lt;label for="txtFirstNameFriend&lt;%= i %&gt;"&gt;Friends First Name&lt;/label&gt; ...
asp.net
[9]
2,480,165
2,480,166
DataGridView column width settings ignored?
<p>I'm using the designer in Visual C# Express to set the column widths. One column has a fixed width, the other two are auto fill. However, after I populate the grid...</p> <pre><code>document = XDocument.Load(databasepath); releases_dataGridView.DataSource = document; //query releases_dataGridView.DataSource = q.T...
c#
[0]
5,944,896
5,944,897
how to remove attached browser process from my applicaion service
<p>I am working on android application in which</p> <p>I have started a service in android in which i am using <code>getcontentresolver()</code> for browser.</p> <pre><code>getcontentresolver().query(uri,String[],null,null,null); </code></pre> <p>Data fetched properly, but the problem is "<code>com.android.browser</...
android
[4]
2,772,320
2,772,321
Where can i find platform android-14 in my computer?
<p>I'm used to find all SDK resources (such as images, that is what I want) in folder <code>android-sdk&gt;platforms&gt;android-[VERSION_NUMBER]&gt;data&gt;res</code> but I can't find the new android-14 folder.</p> <p><img src="http://i.stack.imgur.com/vAfBw.png" alt="enter image description here"> </p> <p>I've updat...
android
[4]
4,316,217
4,316,218
Is there an integer equivalent of __toString()
<p>Is there a way to tell PHP how to convert your objects to ints? Ideally it would look something like</p> <pre><code>class ExampleClass { ... public function __toString() { return $this-&gt;getName(); } public function __toInt() { return $this-&gt;getId(); } } </code></p...
php
[2]
2,032,903
2,032,904
How to disable GestureListener in android?
<p>I have implemented GestureListener, and it is working perfectly, but how can I remove GestureListener from my view?</p> <pre><code>@Override public boolean onTouchEvent(MotionEvent event) { if ( event.getAction() == MotionEvent.ACTION_UP ) { // remove gestureDetector } else { mGestureDetec...
android
[4]
660,916
660,917
Recomendations for c++ course
<p>I'm planning on learning c++ and was wondering if someone here would be able to recommend some sort of online c++ course or class. I'm not opposed to using a book but I figured a class would be more interactive and would allow me to ask questions about topics I'm confused about. The extra accountability would also b...
c++
[6]
1,210,625
1,210,626
Getting elements on page to reset to default size after font increase/decrease
<p>How do I get the elements on my page to reset back to default after font increase/decrease</p> <p>I've tried the following but with little success (font increase/decrease works):</p> <p><a href="http://jsfiddle.net/R3NGU/6/" rel="nofollow">jsfiddle</a></p> <p>Here is my code:</p> <pre><code>$(".resetFont").click...
jquery
[5]
1,362,034
1,362,035
Warnings when file_get_content wrong url
<p>I have this code:</p> <pre><code>&lt;?php $url = "http://asdsfsfsfsfsdfad.com"; $file = file_get_contents($url); if(preg_match("/&lt;title&gt;(.+)&lt;\/title&gt;/i",$file,$m)) print "$m[1]"; else print "The page doesn't have a title tag"; ?&gt; </code></pre> <p>It works fine when the url is a proper url, ...
php
[2]
2,681,449
2,681,450
How to pass client id of Item in repeater to javascript
<p>I need to pass div client id to JavaScript of a repeater </p> <p>I have 3 divs inside a repeater i have onmouseover event i want to grab client id of div element Is there any way i can pass exact client of div element </p> <p>Can u guys help me out Thanks</p>
asp.net
[9]
4,044,607
4,044,608
When to use "::" and when to use "."
<p>Apologies for a question that I assume is extremely basic.</p> <p>I am having trouble finding out online the difference between the operator :: and . in C++</p> <p>I have a few years experience with C# and Java, and am familiar with the concept of using . operator for member access.</p> <p>Could anyone explain wh...
c++
[6]
2,678,666
2,678,667
Android dynamic icon in listview
<p>I have a ListActivity in my application. The list is populated from a parsed http response in the form of an ArrayList of hashmaps.</p> <pre>final ArrayList&lt;HashMap&lt;String,String>> LIST = new ArrayList&lt;HashMap&lt;String,String>>(); ... SimpleAdapter adapter = new SimpleAdapter(this, LIST, R.layout.item_ro...
android
[4]
2,363,582
2,363,583
How to give event on force close dialog's ok button
<p>Hi I want to know can I perform my own operations on Force Close Dialog's OK Button ?</p>
android
[4]
3,210,834
3,210,835
Java convert a HEX String to a BigInt
<p>Hi am trying to convert a hex string such as String hexStr = "1b0ee1e3"; to a bigInt, ideally i'd like to convert hexStr to a bigint in its decimal form,</p> <p>I can convert a string to a bigInt w/o issues but when the string contains hex values i run into problems</p>
java
[1]
2,487,045
2,487,046
When to delete objects from the heap in C++?
<p>I am a little confused when/how to delete objects from the heap in C++.</p> <p>When:</p> <p>If you are executing a program which is relatively short, computes something and then passes standard output to the console is it worth destroying all your objects just after the console has output the result or would the p...
c++
[6]
2,781,392
2,781,393
Get Row ID when click on link in cell
<p>Lets say I want to get the ID of a row when I click on a span in a cell as below</p> <pre><code>&lt;tr id="theRowID"&gt; &lt;td&gt;&lt;span class="getRowID"&gt;get this rows ID&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; </code></pre> <p>Would this be accurate?</p> <pre><code>$(".getRowID").click(function(){ $(th...
jquery
[5]
118,946
118,947
How to get screen identification number from Screen class
<p>i need to show dialog in screen by its identification number, for example i have this situation <img src="http://i.stack.imgur.com/YXZyu.png" alt="screen setup on windows"></p> <p>I want to show something on fourth, when i get all screens by using Screen.AllScreens, my fourth screen is 0 element in array, because A...
c#
[0]
5,342,556
5,342,557
Javascript closure
<p>I read the () at the end of the closure will execute it immediately. So, what is the difference between these two. I saw the first usage in some code.</p> <p>thanks.</p> <pre><code>for (var a=selectsomeobj(),i=0,len=a.length;i&lt;len;++i){ (function(val){ anotherFn(val); })(a[i]); } fo...
javascript
[3]
4,864,077
4,864,078
Make a hovered element move to the centre (horizontally) of the viewport with jQuery when clicked
<p>I currently have several divs that enlarge when hovered. The user can then open a details DIV (fixed size) on a click function. </p> <p>What I'm trying to figure out is how to move the hovered element to the middle of the viewport and then open the details div. (timeout function I guess). </p> <p>When the users mo...
jquery
[5]
3,617,675
3,617,676
Listview in Listview
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5244797/listview-setadapter-raising-nullpointer-exception">Listview.setadapter raising nullpointer exception.</a> </p> </blockquote> <p>Hi, How to create a listview in a listview. I have a tabbar application. Th...
android
[4]
855,845
855,846
Do headers slow down PHP code?
<p>If you have a large class that executes after output(headers/text) is already sent, will that have any affect on your applications performance?</p> <p><strong>Edit</strong>: To clear things up, when output is sent, default headers are sent with it.</p>
php
[2]
519,958
519,959
How to append div tag dynamically in html using javascript/
<p>I am creating one div dynamically and want to add it inside another div.</p> <pre><code> (js) var divtag = document.createElement("div"); divtag.innerHTML = xmlhttp.responseText;//Ajax call working fine document.getElementById('con').appendChild(divtag); </code></pre> <p>h...
javascript
[3]
2,252,634
2,252,635
Create bitmap mask programatically
<p>I have an awful feeling this is stupidly easy, but I can't figure it out.</p> <p>It's also not easy to describe, but here goes. I have this code in onDraw().</p> <pre><code>radius = drawGmpImage(this.gmpImage, canvas); canvas.drawCircle(kHorizontalOffset, kScreenVerticalOffset, radius , maskPaint); </code></pre> ...
android
[4]
4,716,389
4,716,390
Output HTML from number of strings
<p>I'm trying to figure out how best to organise an inline c# page that makes a number of DB connections and passes values to strings and need some advice.</p> <p>So basically a CMS in use with my place of work only allows for inline code so I'm doing a course search page that hooks up to some stored procedures and pa...
c#
[0]
3,816,433
3,816,434
Jquery integration with my theme
<p>I want to add a slide side ways jquery to my website, I tried the following code, but seems not to be working</p> <p>Jquery code:-</p> <pre><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="http://tab-slide-out.googlecode....
jquery
[5]
4,650,535
4,650,536
How to use php to sync two dir?
<p>Is there a good way?</p>
php
[2]
5,515,945
5,515,946
Best way to launch different tasks
<p>I am developing an application for blind people. I have to work all the time with the TextToSpeech module, GPS and Network connection.</p> <p>I need to do a query like this: Consult the GPS, do a JSON call and calling the TextToSpeech(TTS) module.</p> <p>I am wondering the best way to deal with the different tasks...
android
[4]
5,327,419
5,327,420
Count folder inside the folder
<p>Can you help me how to count the folders inside the folder.</p> <p>How can i count the sub folders after the FolderBrowserDialog is popup and choose that main folder consist of 3 folders.</p> <p>I'm using </p> <pre><code>FolderBrowserDialog fbdialog = new FolderBrowswerDialog(); </code></pre>
c#
[0]
5,216,087
5,216,088
get custom event from control in repeater
<p>I have this markup Main.ascx:</p> <pre><code>asp:Repeater ID="rptSource" runat="server"&gt; &lt;ItemTemplate&gt; &lt;uc1:CustomControlsUC ID="CustomControlsUC1" runat="server" DataSource='&lt;%#Container.DataItem %&gt;' /&gt; &lt;/ItemTemplate&gt; &lt;/asp:Repeater&gt; </code></pre> <p>and in CustomControl...
asp.net
[9]
4,295,859
4,295,860
Conversions and Promotions
<p>I just wondering why this works (in Java):</p> <pre><code>byte b = 27; </code></pre> <p>but being method declared like this:</p> <pre><code>public void method(byte b){ System.out.println(b); } </code></pre> <p>This doesn't work:</p> <pre><code>a.method(27); </code></pre> <p>Gives a Compiler error as follow...
java
[1]
2,885,332
2,885,333
Only showing first x rows of a Database in a listview
<p>I'm building an app that contains a listview that is populated from a database query. The list works fine but I'm worried that I may start to display too much data when database gets larger. I would like to display the top 25 entries then add a list item called "show more" at the bottom of the list where I could app...
android
[4]
797,016
797,017
Different syntax for passing methods as arguments?
<p>I'm currently trying to teach myself more about javascript, and I find myself stumbling over the syntax for passing a method as an argument to another method call. Say you have two functions like these:</p> <pre><code> function FirstFunction() { DoesSomething(); } function SecondFunction(fu...
javascript
[3]
701,008
701,009
file handling in python
<p><br /> Thanks in advance. I have written a program which works for small files. But that doesn't work for files of 1 GB. Please tell me is there is any way to handle big file. Here is the code.</p> <pre><code>fh=open('reg.fa','r') c=fh.readlines() fh.close() s='' for i in range(0,(len(c))): s=s+c[i] ...
python
[7]
3,885,547
3,885,548
Python iterations
<p>Has anybody any idea why this code fails to run smooth? It seems not to like iterations with the yield keyword: I am trying to mine all the numbers from any level of lists or dicts ( especially interested in lists ). At the second iteration it finds [2,3] but fails to print 2 and 3 one after other...Imagine also tha...
python
[7]
2,249,000
2,249,001
How to flip Imageview in Android?
<p>I am working on an application I need to flip image view on touch and transfer control to the second activity. please help me. i tried a lot but i haven't succeed. thank you all in advance.</p>
android
[4]
5,898,800
5,898,801
Get the html from the webview, and then manipulate it and load back
<pre><code>http://stackoverflow.com/questions/3479833/is-it-possible-to-get-the-html-code-from-webview </code></pre> <p>got many links to get the html code from webview, but need to manipulate it and then again load it back. Is it possible to do that.if yes, please give some ideas. I have not that much idea of java sc...
android
[4]
3,425,780
3,425,781
Not getting desired output for ArrayList elements, could any one clarify?
<p>I have defined the arraylist as follows:</p> <pre><code>ArrayList&lt;Node&gt; nodes = new ArrayList&lt;Node&gt;(); </code></pre> <p>Where Node is a class which has one character data type for storing a single character.</p> <p>The output is showing some garbage value instead of printing characters:</p> <p>Here i...
java
[1]
4,139,103
4,139,104
Clarifications on a python script file
<p>Just need some clarification on how to design a python script file test.py.</p> <ol> <li><p>When defining functions, do they have to go on the top of the file right after the imports?</p></li> <li><p>should I be doing that <strong>main</strong> check in my file?</p></li> <li><p>I want to run this file on my server...
python
[7]
116,957
116,958
limit textbox to x number of characters
<p>I have a textbox on an aspx page which I have limited to accept 250 characters. This works fine when a user just types data in, but if they paste the textbox will accept way more. Is there a way I can get around this? I dont want to disable pasting in the textbox though.</p> <p>thanks again</p>
asp.net
[9]
5,295,623
5,295,624
PHP multi dimensional array search
<p>i have an array where i want to search the uid and get the key of the multidimensional array for eg search 100(uid of first user) and the function should return 0 and if i search 40489 the function should return 2 I tried making loops but i want a faster exxecuting code, Any help :(</p> <pre><code>$userdb=Array ( ...
php
[2]
5,696,798
5,696,799
I don't know what to do with a .apk file
<p>I was given a library on an .apk file. see: <a href="http://code.google.com/p/android-serialport-api/downloads/list" rel="nofollow">http://code.google.com/p/android-serialport-api/downloads/list</a></p> <p>I assume it contains the package that I will have to import, but what do I do with it? </p>
android
[4]
4,020,730
4,020,731
Profile Photo Upload
<p>I thinking to create a option whereby a user able to upload photo to their profile in a website. </p> <p>When a user upload a photo, a folder with the user login ID can be generated inside a root folder "C:\wamp\www". In other words, each user will have a folder store their profile image, folder name will be the us...
php
[2]
1,994,567
1,994,568
How to make a new application for the existing developer?
<p>I have a developer account in iOS provisioning portal and already have all the certificates for one application. Now I want to build a new application with a new app ID within the same account.</p> <p>Should I have to repeat all the steps once more? Can anybody help me with the steps I need to do in iOS provisionin...
iphone
[8]
1,485,628
1,485,629
How to do an onListItemClick?
<p>I have an <code>Activity</code> and I want to do a <code>setOnListItemClick</code> on my <code>Listview</code> but I seem unable to do it. </p> <p>I am only able to do it with ListActivity but I need an <code>EditText</code> so I can't use the <code>ListActivity</code>.</p> <p>Can anyone help me?</p> <pre><code>p...
android
[4]
2,213,018
2,213,019
How can I configure EditTextPreference to have scroll bar
<p>In my android application, I have a EditTextPreference as one of my preferences in my PreferenceActivity. My question is how I can add a 'scroll bar' for the text of the EditText Preference? Sometime when the text is too long and when the 'soft keyboard' pops up, I don't see the buttons of the edit text dialog.</p> ...
android
[4]
4,001,245
4,001,246
run jar file without swing libraries
<p>I have program , I create the jar file, but then when I run the jar file nothing is display, is it because it is not an swing program? How should I run this program?</p> <pre><code>`package first; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.StringReade...
java
[1]
1,273,775
1,273,776
Position views at specific location?
<p>Is there a way to place widgets / views on the screen at any specific position required?</p> <p>Something like a calendar with daily events that could overlap. e.g. if every hour in a day is represented by 1 hour and there are 2 appointments that overlap partially (say 12:00 - 12:30 and 12:20 - 01:00) this would be...
android
[4]
2,401,787
2,401,788
what is the efficient way to use google to search duplicate content..?
<p>I am making a software that helps to search duplicate contents(only text) in web. I think I can use google as it is very efficient and faster. So I developed an algorithm But it is not efficient. </p> <p>Here is my idea. The user enters a content of 300-500 character length. This content is searched in google. 1st ...
c#
[0]
158,841
158,842
how to go back to previous screen in tableview?
<p>My appliaction is viewbased application in which i have one button . On click of that button i will push to other screen that is table view screen on which what i want when i select any data from row in table view it will get back to previous view automatically instead of selecting the navigation back button genera...
iphone
[8]
959,666
959,667
How to Make Structure as Null in C#?
<p>How to Make Structure as Null in C# ?</p> <pre><code>EMPLOYEE? objEmployee = null; EMPLOYEE stEmployee = objEmployee.GetValueOrDefault(); </code></pre> <p>but this make <code>stEmployee</code> fields as null,but i want to make this structure as null. It shows <code>stEmployee.FirstName = null</code>,<code>stEmp...
c#
[0]
2,077,197
2,077,198
When/why to call System.out.flush() in Java
<p>Why do certain streams need to be flushed (<code>FileOutputStream</code> and streams from Sockets) while the standard output stream does not?</p> <p>Every time someone uses the <code>System.out</code> <code>PrintStream</code> object, be it while calling <code>println()</code> or <code>write()</code>, they never flu...
java
[1]
736,648
736,649
Find webpage get image from text
<p>Now I am creating a dictionary online that have a part: "image dictionary" and I want to find a webpage that when i enter a string ,if it's corressponding, page will return a image with URL. If you know..please answer to help me. one star!</p>
android
[4]
2,110,051
2,110,052
Error Placement for jquery validation plugin
<p>For some reason its not putting the error messages down in the div with a class of errorContainer and I'm not sure why when there is an error, however how it looks in the jsfiddle looks messed up compared to my actual page.</p> <pre><code>[http://jsfiddle.net/xtremer360/VtXdk/][1] </code></pre>
jquery
[5]
2,195,535
2,195,536
Do containers of primitive types in C# use value semantics or pointer/reference semantics?
<p>When a <code>List&lt;&gt;</code> of primitive types is created in C# (e.g. a <code>List&lt;int&gt;</code>), are the elements inside the list stored by value, or are they stored by reference?</p> <p>In other words, is C# <code>List&lt;int&gt;</code> equivalent to C++ <code>std::vector&lt;int&gt;</code> or to C++ <co...
c#
[0]
4,840,848
4,840,849
Gallery limit fling distance
<p>I'm using an approach for this <a href="http://stackoverflow.com/questions/5426439/how-to-disable-fling-in-android-gallery">thread</a> in order to make gallery change one image per swipe. My problem is that for this image-change to happen user has to drag image for at least 50% of the width of the gallery, which can...
android
[4]
661,870
661,871
unable to set textView1.setAutoLinkMask(0) - it remains clickable
<p>I try to reuse a TextView. Sometimes it contains a URL and sometimes not. If I try to set the TextView back to textView.setAutoLinkMask(0) it does unfortunately nothing and the new text remains clickable.</p> <pre><code>TextView snippet = new TextView(); snippet.setText("someText"); if (ifSomeTextContainsURL) { ...
android
[4]
4,313,298
4,313,299
Why does the class get reloaded?
<p>I am creating an android app that will send a SMS to another SIM connected to an electrical circuit. When the receiving SIM gets the message with a particular text, the electrical circuit will be closed and a motor will start running. Here is the program</p> <pre><code>public class SendSMSActivity extends Activity ...
android
[4]
3,092,416
3,092,417
I could not understand this that why to use flush() method of a PrintWriter class?
<p>Why the code here is using <code>flush()</code> method of the <code>PrintWriter</code> class after getting message from <code>messageBox</code> field....?</p> <pre><code>public void connectToSocket() { try { Socket socket = new Socket("localhost", 80); PrintWriter writer = new PrintWriter(socke...
java
[1]
3,228,313
3,228,314
Browser's zoom-in and zoom-out function calling
<p>Is it possible to trigger a javascript function with Browser's zoom-in and zoom-out?</p>
javascript
[3]
3,521,779
3,521,780
Stuck to create Paypal App Id to integrate with iPhone application
<p>I am trying to develop iPhone shopping application. In my app, I integrate with Paypay checkout payment. It request "Paypal App ID".</p> <p>When I try to create "Paypal App ID" in <a href="http://www.x.com" rel="nofollow">http://www.x.com</a> (login with Paypal account and go to "My Account" and then "New App" ). I...
iphone
[8]
4,855,144
4,855,145
Head First Java example explanation needed
<p>Hi! I'm reading Head First Java and i can't understand the behaviour of the following code:</p> <pre><code>public class Dog { String name; public static void main(String[] args) { // make a Dog object and access it Dog dog1 = new Dog(); dog1.bark(); dog1.name = "Bart"; ...
java
[1]
2,431,920
2,431,921
PHP script no longer works because of v.4 to v5 migration
<p>Recently my webserver migrated from PHP v.4 to v.5.3. I know, I know, long time coming :)</p> <p>But now a number of my scripts do not display results when a user enters the required data. Here is the script:</p> <pre><code>&lt;?php if ($ok) { if ($heightft == "" || $heightin == "" || $weight == "") { ...
php
[2]
3,845,654
3,845,655
killProcess can be used in some cases?
<p>I have a logout button in my activity. In my case the killProcess do what I want to do instead of the finish(), but is it a good idea to use killProcess? I have read that is better not to use killProcess but in some cases seems to be useful. </p>
android
[4]
4,196,460
4,196,461
Does foreach do its work on a copy of the input array?
<p>I've been studying some test questions. One of the questions about array iteration. Here it is : </p> <blockquote> <p>What is the best way to iterate through the $myarray array, assuming you want to modify the value of each element as you do?</p> <pre><code>&lt;?php $myarray = array ("My String", "Another Stri...
php
[2]
2,403,377
2,403,378
PHP- Date function confusion in tamil format
<p>I want like this in PHP date format</p> <p><code>$date1= 2012-02-22 15:31:01;</code> is to </p> <p>புதன்கிழமை, 22 பெப்ரவரி 2012, 07:55.53 மு.ப GMT</p>
php
[2]
2,556,391
2,556,392
Error Message 'class::function' : illegal call of non-static member function
<p>i was trying to call a static function of class using scope resolution operator, the way to access static function but still generating error. what are the possibilities.</p>
c++
[6]
5,217,268
5,217,269
google analytics how does it save data?
<p>I understand that google analytics uses first party cookie tracking, so it sets the cookie from the domain being visited with javascript (rather than setting the cookie from google-analytics.com)</p> <p>I am wondering how the ga.js google analytics script saves the cookie data to the database to be reported on by g...
javascript
[3]
2,309,773
2,309,774
Send file to user
<p>How to send a file to the user so they can choose directory and file name. The code below let the user download the file but it does not allow for directory selection in Firefox. How can I fix it?</p> <pre><code>// We'll be outputting a PDF header('Content-type: application/pdf'); // It will be called downloaded.pd...
php
[2]
1,743,309
1,743,310
How to split the array values and store in a string in android?
<p>I am getting the values from arraylist <strong>arr</strong> and storing those values in a string with comma separator. But for the last value also comma is adding. How can I remove that? Please help me...</p> <p>My Code:</p> <pre><code>ArrayList&lt;String&gt; arr; String str; for (int i = 0; i &lt; arr.size...
android
[4]
3,519,805
3,519,806
How to store binary data in PHP
<p>People know all about storing binary data in database server as BLOBs. How would one accomplish the same thing in PHP? </p> <p>In other words, how do i store blobs in a php variable?</p>
php
[2]
2,662,564
2,662,565
If you grow a div and shrink a div in the same column of divs simultaneously, how can you keep the vertical position stable?
<p>Say I have a column of DIV siblings. A click on DIV 3 causes DIV 1 to "unexpand" and DIV 3 to expand (grow longer). This is usually okay if DIV 1 and DIV 3 are about the same height when expanded and unexpanded. But if DIV 1 and DIV 3 are very different heights, then the the browser viewport shifts the mouse pointe...
jquery
[5]
1,358,826
1,358,827
crashes Application class
<p>I sit with the problem. Here's the thing. I am writing an application to display pdf files.</p> <p>The process of rendering files, runs parallel to the main stream. For very frequent turns the screen comes a time when all the objects in my class application become null.</p> <p>how do I disable screen rotation and ...
android
[4]
718,588
718,589
In ASP.net Page life cycle on which state Controls is accessible?
<p>In an ASP.net page life cycle, on which state are controls accessible? According to me it is after Initialize, is that correct?</p>
asp.net
[9]
4,267,631
4,267,632
Issues with creating a new profile for an existing application
<p>I have a working android application. And I am using ant to build the code. I give the following command for building the code.</p> <p>ant compile -Dbuild.scope=XXX -Dbuild.mode=debug -Dbuild.profile=ABC</p> <p>now the scope here is referring to what all applications I need to build for that product and profile re...
android
[4]
3,841,268
3,841,269
Isolating picture attachment from email with php
<p>I'm using the following php script to receive and process emails, putting the various pieces into variables to handle later on.</p> <pre><code>#!/usr/bin/php -q &lt;?php // read from stdin $fd = fopen("php://stdin", "r"); $email = ""; while (!feof($fd)) { $email .= fread($fd, 1024); } fclose($fd); // handle email ...
php
[2]
463,449
463,450
how to replace (update) text in a file line by line
<p>I am trying to replace text in a text file by reading each line, testing it, then writing if it needs to be updated. I DO NOT want to save as a new file, as my script already backs up the files first and operates on the backups.</p> <p>Here is what I have so far... I get fpath from os.walk() and I guarantee that ...
python
[7]
4,350,063
4,350,064
what are the mathematical formulas/concepts used in implementing Chart API (bar chart, pie chart etc.,)
<p>Trying to implement chart API in Java. But I am unsure of the mathematical formulas/concepts used in drawing each of the chart type. Can someone specify the mathematical concepts to be known for drawing each sort of the chart.</p>
java
[1]
4,516,425
4,516,426
Java concurrency lock and condition usage
<p>I can use <code>object.wait</code> ,<code>object.notify</code> and <code>synchronized blocks</code> to solve the producer consumer type of problems. At the same time I can use <code>locks</code> and <code>conditions</code> from <code>java.util.concurrent</code> package. I am sure I am not able to understand why we n...
java
[1]
5,296,355
5,296,356
need to understand Java SE before delving into Java EE?
<p>i want to learn coding web apps with java using glassfish.</p> <p>i have bought a book "Beginning JAVA EE 6 Platform with Glassfish 3 - From Novice to Professional". I wonder if I can jump to this book directly or do I need to read a book about JAVA SE first?</p> <p>I just want to develop web apps and not desktop ...
java
[1]
4,812,603
4,812,604
Dual or triple (or even multiple) comparison in JavaScript
<p>Almighty Gurus, Please tell me, I want to know can comparison sm. set of variables in row, like this:</p> <pre><code>x &lt; y &gt;= z </code></pre> <p>or i need to do it in two steps?</p> <pre><code>(x &lt; y) &amp;&amp; (y &gt;= z) </code></pre>
javascript
[3]
2,340,497
2,340,498
Cannot Import Counter is encountered in python 2.7.3 on CSH
<p>I am using UNIX's cShell in my Windows 7 OS.<br> When I am executing a prog. it shows an error every time :<code>can not import name Counter</code>.<br> though I have mentioned in the script <code>from collections import Counter</code>.<br> I am using <code>Python 2.7.3</code>, then why this problem is persisting.</...
python
[7]
5,282,348
5,282,349
DOM running slow on jQuery click function
<p>I have a small issue with the DOM taking up to 30 seconds to recognize that a click has been made. When I click back and forth between "A" and "C" the menu that shows up takes more and more clicks to show up. The DOM sometimes takes up to 30 seconds to recognize the change has been made and I usually end up having t...
jquery
[5]