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
2,168,762
2,168,763
How to change finger pointer to crosshair?
<pre><code>var eles = document.querySelectorAll('li.level a'), i; for (i = 0; i &lt; eles.length, i++) { eles[i].onclick = function() { //... }; } </code></pre> <p>now, i want to make when the mouse over the a text, i want to change finger pointer to crosshair.so i make the above code to the following: ...
javascript
[3]
98,894
98,895
JavaScript equivalent of PHP passing parameter
<p>In PHP, I've used this:</p> <pre><code>do_it( $var2 = 'something_cool' ); function do_it( $var1, $var2 ) { // does something } </code></pre> <p>In JavaScript, I'm not quite sure the notation.</p> <pre><code>do_it( var2 = 'something_cool' ); // This isn't right, I don't think. function do_it( var1, var2 ) { // d...
javascript
[3]
3,206,895
3,206,896
Android: How to upload a video to facebook after clicking on a button?
<p>I have an app in which i have a requirement to upload a video in facebook after clicking on a button. How can i do that? can anyone of you suggest a solution?</p>
android
[4]
1,357,534
1,357,535
EditText OnKeyDown
<p>I have declared an EditText programmatically (i.e. not in XML), and want to apply an OnKeyDown handler to it. The code shown does not work. The context is, I'm trying to capture a short string from the keyboard, which should not include control characters (I've started with the Enter key). Maybe there is a better wa...
android
[4]
1,246,934
1,246,935
Value in spinner in android
<p>I have created a spinner widget on which the value are year from 2010 to 2014. My problem is that I want to have the value of the present year, previous year and next year. What i want to ask, is that the value should automatically changes once the year is updated. Like for example: Present year-2012, Previous year ...
android
[4]
397,142
397,143
Iterate through class members in order of their declaration
<p>I got this problem writing a little GUI lib that maps classes to simple table views. Every class member of a certain type = column, and order of columns is important. But...</p> <pre><code>class Person(object): name = None date_of_birth = None nationality = None gender = None address = None ...
python
[7]
2,834,892
2,834,893
How shift graph in Android's Canvas
<p>I draw a graph with canvas in android, but I want to shift it to left or right side. I don't want to scroll it, I just want to shift it in one page by which you can see the graph is shifting lively. I would be appreciated if any body help me.</p>
android
[4]
4,818,635
4,818,636
In Java, how do I dynamically determine the type of an array?
<pre><code>Object o = new Long[0] System.out.println( o.getClass().isArray() ) System.out.println( o.getClass().getName() ) Class ofArray = ??? </code></pre> <p>Running the first 3 lines emits;</p> <pre><code>true [Ljava.lang.Long; </code></pre> <p>How do I get ??? to be type long? I could parse the string and do ...
java
[1]
1,613,360
1,613,361
Load event called way too often
<p>I want to reload an image once it has been loaded. Here is my code:</p> <pre><code>$(function () { function reload() { console.log('Inside reload'); var srcImage = 'http://cam2.camvine.com/axis-cgi/jpg/image.cgi?resolution=320x240' + '&amp;d=' + (new Date()).getTime(); $('img') ...
jquery
[5]
4,908,523
4,908,524
OnItemClickListener listview
<p>I have one problem in getting the selected string from the ListItems for Eg: consider my ListItem has some elements just consider as one,two,three is present in my taskLit,now if i click on the ListItem i,e on One,Two or Three i should get that Particular String value.Is there any possibility to get the Selected Str...
android
[4]
3,632,910
3,632,911
Is there a benefit to defining variables together with a comma vs separately in JavaScript?
<p>Reading Crockfords <a href="http://javascript.crockford.com/style1.html">The Elements of JavaScript Style</a> I notice he prefers defining variables like this:</p> <pre><code>var first='foo', second='bar', third='...'; </code></pre> <p>What, if any benefit does that method provide over this:</p> <pre><code>var fi...
javascript
[3]
1,624,204
1,624,205
How do I properly use a backslash to continue a line in an if statement?
<p>e.g. D, if sum_p is not zero.</p> <pre><code>D = 1/sum_p if sum_p \ else 0 </code></pre> <p>What if I want to return the value? Should I do:</p> <pre><code>return 1/sum_p if sum_p \ else 0 </code></pre> <p>or just write</p> <pre><code>if... else: return 0 </code></pre>
python
[7]
1,163,278
1,163,279
c++ map question
<p>If I have a map like this:</p> <pre><code>std::map&lt;char, std::vector&lt;char&gt; &gt; m; m['A'].push_back('a'); m['A'].push_back('b'); m['A'].push_back('c'); m['B'].push_back('h'); m['B'].push_back('f'); </code></pre> <p>How would I find and delete 'b'? Is this possible?</p>
c++
[6]
1,885,666
1,885,667
Format double to 2 decimal places
<p>I am trying to Format my double value to exact 2 decimal places and it seems to working fine, here is the code i am trying</p> <pre><code>final NumberFormat df = DecimalFormat.getInstance(); df.setMinimumFractionDigits(2); df.setMaximumFractionDigits(2); df.setRoundingMode(RoundingMode.DOWN); df.format(value) </cod...
java
[1]
5,874,547
5,874,548
Got problem converting string to upper case letters
<p>Using following console application i am converting each string to uppercase letters. But string value in output remains unchanged. what I am doing wrong here. Also any help on doing this efficiently would be appreciated.Thanks for your help.</p> <pre><code>int main() { vector&lt;string&gt; svec, svec_out;...
c++
[6]
626,531
626,532
finish an activity gives error
<p>I am a beginner at Android programming and I have a little problem when closing an activity: When I enter my app I navigate to another Activity called <em>"camp"</em>, and I want to close the Activity when I come back to the menu screen, so I wrote this:</p> <pre><code>public void onPause(){ CampActivity.this.f...
android
[4]
83,431
83,432
Android - inconsistent ringtone behavior
<p>I am trying to add ringtones to the media/ringtones folder from my application. If the phone is connected via USB to a computer or mounted on my Mac, the ringtones do not show up in the SD Card, nor in the Ringtone settings.</p> <p>But if I run the application with the USB unplugged, the ringtones appear ok. This i...
android
[4]
3,672,038
3,672,039
place php errors in log file
<p>I am running mac 10.6.4 on an iMac and am using it as a developer server. </p> <p>I have Apache and Entropy php5 installed, when i write my applications, some pages wont run when php has errors, however these are not recorded on a log file, I created one php_errors.log and entered the following on the php.ini file<...
php
[2]
379,681
379,682
onClick cycle through DIVs with same class
<p>I'm trying to create a script to cycle through DIVs (one at a time) that have the same class name. <code>.nextAll()</code> and all that fun stuff is completely foreign to me. How can I get this to function?</p> <p>Here's how it should work. When you click the light grey box on the right, it should show the next <co...
jquery
[5]
984,286
984,287
How to set style to this element
<p>I have this script to set box-shadow if element is hovered. It should also remove the parent(s) style at the same time:</p> <pre><code> var on = { boxShadow : "inset 0px 0px 0px 1px #f80" }; var out = { boxShadow : "inset 0px 0px 0px 0px #f80" }; $('body *').hover(function(e) { $(this).css(out)...
jquery
[5]
4,350,255
4,350,256
IllegalStateException for MediaPlayer.prepareAsync
<pre><code>05-19 11:52:51.622: ERROR/MediaPlayer(1291): prepareAsync called in state 8 05-19 11:52:51.622: WARN/System.err(1291): java.lang.IllegalStateException try { mp = MediaPlayer.create( Main.this, Uri.parse("http://codejanitor.us/good.mp3")); mp....
android
[4]
3,308,395
3,308,396
What are the proper dimensions for a background image in an android app?
<p>I would like to create a background image for my app in Photoshop. I understand that I will need to create three different files at the appropriate dpi for ldpi, mdpi and hdpi. But what are the appropriate dimensions and resolutions for each?</p>
android
[4]
5,023,790
5,023,791
deprecation of apply decorator
<p>There was a beautiful way to organize class property in frame of one function, by using the apply decorator. </p> <pre><code>class Example(object): @apply def myattr(): doc = """This is the doc string.""" def fget(self): return self._half * 2 def fset(self, value): ...
python
[7]
3,309,833
3,309,834
Subset sum recursion with c++
<p>This is one of the solution of getting true or false from given set and target value</p> <pre><code>bool subsetSumExists(Set&lt;int&gt; &amp; set, int target) { if (set.isEmpty()) { return target == 0; } else { int element = set.first(); Set&lt;int&gt; rest = set - element; r...
c++
[6]
1,504,913
1,504,914
createElement() vs. innerHTML When to use?
<p>I have some data in a sql table. I send it via JSON to my JavaScript.</p> <p>From there I need to compose it into HTML for display to the user by 1 of 2 ways.</p> <ul> <li>By composing the html string and inserting into .innerHTML property of the holding element</li> <li>By using createElment() for each element I...
javascript
[3]
4,843,363
4,843,364
How to get Image Texture Features?
<p>My project is Content Based Image Retrieval(CBIR) and purpose of this project is finding similiar images. I created color feature vector but only using color component is not giving sufficient result. so that to get better result I want to get image texture features like contrast, correlation, energy, homogeneity, e...
java
[1]
5,281,541
5,281,542
How To Get Selected RadioButton Object From The RadioButtonList
<p>How To Get The Selected RadioButton Object From The RadioButtonList in the Event of SelectedIndexChanged ??</p> <p>Well for more description</p> <p>i need to catch the radiobutton selected in the radiobuttonlist to focus on it when the radiobuttonlist autopostback</p>
asp.net
[9]
5,481,802
5,481,803
Postback problem when PopupExtender is placed inside a user control
<p>I am creating a ModalPopupExtender inside a Web User Control. When i click on the OK Button in the panel, which is showing as model popup, the Event Handeler of the button is not executing. This problen does not occure when i do not use the Web User Control. Here is the user control (.ascx) file code.</p> <pre><cod...
asp.net
[9]
4,289,713
4,289,714
audioTrack play() plays only once
<p>using Android's AudioTrack for the first time. I have created a class AndroidAudioDevice. I init it with this constructor:</p> <pre><code> public AndroidAudioDevice( ){ // constructor Log.i("Audio", "constructor"); int minSize =AudioTrack.getMinBufferSize( SAMPLE_RATE, AudioFormat.CHANNEL_CON...
android
[4]
2,755,320
2,755,321
Android sdk 2.2 proxy with domain name is not working
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/28380/proxy-with-android-emulator">Proxy with Android Emulator</a> </p> </blockquote> <p>Android sdk 2.2 proxy with domain name is not working. </p> <p>emulator -avd prakash1 -http-proxy <a href="http://Domain/...
android
[4]
5,900,851
5,900,852
How to test for database connection issues?
<p>In our application, we notice recently that there are some codes that will create database connections call unnecessary e.g every data row in the data set is making a database connection call to check certain data.</p> <p>How can we monitor these kind of issue either via code scanning or database queries monitoring...
c#
[0]
2,467,158
2,467,159
javascript with html select box
<p>I have select box with default value,i want to retrieve default value and changed value using javascript,Below is my Html Select box:</p> <pre><code>&lt;SELECT ID="TEST" NAME="TEST" ONCHANGE="TEST()"&gt; &lt;OPTION ID="1" VALUE="TEST1" SELECTED/&gt; &lt;OPTION ID="2" VALUE="TEST2"/&gt; &lt;/SELECT&gt; </code></pre>...
javascript
[3]
5,418,573
5,418,574
Binary search to find the range in which the number lies
<p>I have an array</p> <pre><code>Values array: 12 20 32 40 52 ^ ^ ^ ^ ^ 0 1 2 3 4 </code></pre> <p>on which I have to perform binary search to find the index of the range in which the number lies. For example:</p> <ol> <li>Given the number -> 19 (It lies between index 0 and 1), ...
c++
[6]
2,683,035
2,683,036
OnClickListener error: Source not found
<p>I'm brand new to Android development and right now I am building a simple calculator for healthcare workers. My program implements the OnClickListener class, but every time I click on the button to initiate the calculation, I get an error saying the "Source is not Found".</p> <p>Here is the code:</p> <pre><code>pu...
android
[4]
1,724,811
1,724,812
Asp.net http modules are invoked twice, when used with RouteTable for user friendly url on REST
<p>I created a wcfrestservice, and added routing code in the global.ascx.cs. The routing works fine, But i use custom http module to log user's request, this module is getting invoked twice, Is there a way to prevent this. This started happening only if use the friendly url, if access the direct ulr(physical file), It ...
asp.net
[9]
2,392,959
2,392,960
Android how to close db when query execute
<p>i have a websearch and db search ,this can be done at the same time , in db search am using db cursor for setting the result ,also for making search faster am open the db in OnCreate() and close it in onPause ,both the websearch and dbsearch running in separate async task ,when websearch result comes first am starti...
android
[4]
2,306,063
2,306,064
Project needs to clean again and again?
<p>I am using 2.1 platform. When I start a project the R.java file has not seen in the gen folder.I use the below steps,if the first step not correct the error I will go to second and so on.</p> <ol> <li><p>Clean the project, uncheck the option Build Automatically and Rebuild it.</p></li> <li><p>Import Android.R; </p>...
android
[4]
4,729,859
4,729,860
Facebook user signup api for iphone
<p>Is there any facebook user signup api available for iphone ?</p> <p>Plz help me ? Thanks in advance...</p>
iphone
[8]
2,189,128
2,189,129
C++ by example book
<p>I was programming in c++ at university but have been programming in java for most of my professional life(about 5 years) but I now need to recapture those c++ skills. I have tried a couple of books but they are too basic. Is there some kind of example book on c++ that I can use to revisit c++ in a project style form...
c++
[6]
2,099,612
2,099,613
in which area is c++ mostly used?
<p>I've been asked many times by my juniors about the areas in which C++ is widely used. I usually answer Operating Systems. Are there any other areas where its extensively used?</p>
c++
[6]
812,809
812,810
C# HashSet with struct and string
<p>I created to following code to verify the uniqueness of a series of "tuples":</p> <pre><code>struct MyTuple { public MyTuple(string a, string b, string c) { ValA = a; ValB = b; ValC = c; } private string ValA; private string ValB; private string ValC; } ... HashSet&lt;MyTuple&gt; tupleList...
c#
[0]
2,839,624
2,839,625
php encoding issue (utf8 to iso)
<p>I actually got 2 pages, one is in ISO and the other one in UTF8. I have no possibility to change them without making a big mess.</p> <p>There is a form in the UTF8 page that sends a GET data in Chinese characters to the ISO page.<br> The url looks like <code>search=文員</code> that is UTF8.</p> <p>I receive the data...
php
[2]
1,104,053
1,104,054
Prime divisors of a number in C++
<p>This is my first question on Stackoverflow, so please excuse me if I'm doing something wrong. :) Can you help me with this code? Thank you! :)</p> <pre><code>#include &lt;iostream&gt; using namespace std; </code></pre> <p>1)</p> <pre><code>int divisor(int a) // function that checks the divisors of a number *) { i...
c++
[6]
3,749,494
3,749,495
From hardcoded to user selectable variable value
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/9969229/need-help-to-insert-an-ipaddress-from-an-ini-file">need help to insert an ipaddress from an ini file</a> </p> </blockquote> <p>I have created a C++ win32 window app in MS Visual Studio. My problem is tha...
c++
[6]
5,711,149
5,711,150
checking the page exist or not using javascript and ajax
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3922989/how-to-check-if-a-page-is-exist-or-not-using-javascript">How to check if a page is exist or not using javascript</a> </p> </blockquote> <p>can you provide the code for checking the page exist or not.if n...
javascript
[3]
1,475,646
1,475,647
get prev and next items in array
<p>i have an array of numbers</p> <pre><code>var projects = [ 645,629,648 ]; </code></pre> <p>and a number 645</p> <p>i need to get the next(629) and prev(648) numbers?</p> <p>can i do it with jquery?</p>
jquery
[5]
2,511,959
2,511,960
Changing string text color
<pre><code>&lt;string name="no_city"&gt;&lt;font color='#FF0000'&gt;&lt;b&gt;Please select your location under Preferences in the menu&lt;/b&gt;&lt;/font&gt; &lt;/string&gt; </code></pre> <pre class="lang-java prettyprint-override"><code>@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(sa...
android
[4]
3,396,302
3,396,303
Select button by value
<p>How do I select a button with specific value with jQuery?</p> <pre><code>&lt;input type="button" value="My task"&gt; </code></pre>
jquery
[5]
3,028,005
3,028,006
how to implement authentication using shared preferences in android?
<p>I am new to Android.my requirement is to implement simple authentication logic for login screen by using sharedpreferences in android. can any one suggest me...?</p>
android
[4]
4,907,668
4,907,669
document.writeln doesn't write to a new line
<p>I was just writing some simple code and I noticed that using document.writeln doesn't write to a new line, permit me to demonstrate...</p> <pre><code> // this is my JSON object var myObject = { "firstName": "John", "lastName": "Smith", "age": 25, "address": [{ "Address1": "11 My Street", "Address2" :...
javascript
[3]
846,575
846,576
How to Convert C# Desktop Application Project to website
<p>I Created an application in my desktop using c#.</p> <p>I want to use this application in my website.</p> <p>Is it Possible or there is any other way.</p>
c#
[0]
2,432,642
2,432,643
Convert from a string to datetime
<p>First of all I have a xamdatetimeeditor which is for user to select the date and time. It is in the format of "yyyy/MM/dd HH:mm:ss". From there, I would like to convert it to "yyyyMMddHHmmss" format. Which means just removing the special characters and spaces.</p> <p>Do I have to use the DateTime.TryParseExact meth...
c#
[0]
5,450,140
5,450,141
Javascript indexOf not working
<p>The following code looks for the name of a person in a message that they have entered using the indexOf method.</p> <p>However it is returning the not present result even when the name is present. If I only Darren as the cardMessage it works.</p> <p>Can anyone point out what is wrong. </p> <pre><code>&lt;% firs...
javascript
[3]
4,182,702
4,182,703
Universally Accessible Variable?
<p>I want to increase "BrainsEaten" each time any instance of Zombie executes EatBrains. How can I make this happen?</p> <pre><code>namespace ZombieLand { public int BrainsEaten; // &lt;- This is syntactically incorrect, but illustrates what I want public class Zombie { public void EatBrains() ...
c#
[0]
2,340,342
2,340,343
Post variables to another PHP file
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/6192822/to-convert-a-data-obtained-through-url-to-post-variables">To convert a data obtained through URL to post variables</a> </p> </blockquote> <p>I receive some values in $_GET array, I would like to <strong>...
php
[2]
478,588
478,589
iPhone:Timer pause and resume?
<p>My game application is having a timer(starting from 0:00 then increases) when it is is running. For that i use, NSTimer and then int hrVal = (timeCount/60)<em>60; int minVal = ((timeCount/60)</em>60)+9; etc code.</p> <p>At some point of time, lets say user wins one level, i am showing a winning alert, at this p...
iphone
[8]
4,309,451
4,309,452
list directories and files without using the java.io package
<p>I'm trying to list all the directories and files on windows mobile but I can't use the java.io package because it's not supported. Does anyone have an idea if there is some other package I can use.</p> <p>Thanks for the help.</p> <p>Dim</p>
java
[1]
2,610,952
2,610,953
Java class definition: what does "<>" mean?
<p>Here is the class definition in java code:</p> <pre><code>public class WordCount { public static class Map extends Mapper&lt;LongWritable, Text, Text, IntWritable&gt; { private final static IntWritable one = new IntWritable(1); private Text word = new Text(); public void map(LongWritable key, Text va...
java
[1]
565,937
565,938
how to develop a cross platform application?
<p>I wanted to create application to be deployed in Android Mobile Devices, Web and Desktop application. Is it possible? Or can you suggest tools to achieve this?</p>
java
[1]
3,783,360
3,783,361
Align text in text view
<p>I have two text view first one aligns on the left of parent and contains a single word. the backgroung color of first is different from second one.The next textview contains two lines. I need to display the first line of text to the right of first text view and the second line of text to the bottom of the first t...
android
[4]
3,267,685
3,267,686
Generate dynamic control in ASP.NET
<p>I want to create a dynamic control in my ASPX page. The control is like textbox, button, label, audio, video etc. And also generate the HTML page so i can drag and drop or bind this control.</p> <p>So how can it be done? Please give me some advice or code project so i can understand it.</p> <p>Thanks.</p>
asp.net
[9]
3,785,455
3,785,456
Grab the page which is redirecting
<p>I am trying to grab a file .pdf from a server. There is a hyperlink at the page, by clicking that link it goes to a page, it checks for some privileges, then it redirects to another page which shows the content of the .pdf within an Iframe.</p> <p>lets say beginning url is <a href="http://site.com/docs/1.pdf" rel="...
php
[2]
579,776
579,777
If statements with passed variables
<p>Basically I'm grabbing a variable from the url and I need to send the user to custom pages based on what state they fill in. i.e. if it's one of the coverred states, they'll get sent to custom pages...but if it's any other state they get sent to the standard one.</p> <p>I'm guessing it's just a simple if statement ...
php
[2]
3,393,898
3,393,899
Pointer arithmetic and dereferencing
<p>In the following code, can anyone please explain to my what the line in bold is doing.</p> <pre> struct southParkRec { int stan[4]; int *kyle[4]; int **kenny; string cartman; }; int main() { southParkRec cartoon; cartoon.stan[1] = 4; cartoon.kyle[0] = cartoon.stan + 1; cartoon.kenny...
c++
[6]
2,845,943
2,845,944
Javascript history.go
<p>I need to give user one alert after saving an item.So I am using an open script to display this alert.But when I am moving out from that page and and coming back through history.go(-1) ,again getting the alert.How to make sure that this alert comes only if I am saving the item?</p>
javascript
[3]
5,101,707
5,101,708
Selecting right tools for iphone app dev
<p>I have been surfing the web to find the best to develop small iphone app on WINDOWS XP SP3.</p> <p>Question :- Is it possible to develop a simple iphone application, that connects to MSSQL database gets the data and displays in iphone app.</p> <p>Can anybody please suggest the right tools to select..</p> <p>Thank...
iphone
[8]
1,535,813
1,535,814
How to prevent execution of an event before until the last call is completed
<p>I have this jQuery event:</p> <pre><code>$('#button-next').bind('click', function() { $.ajax({ type: "GET", dataType: "json", url: 'index.php?route=product/category/display&amp;cat=any&amp;limit='+p+',1', cache: false, success: function(data) { var text = data...
jquery
[5]
1,856,692
1,856,693
Programmatically set screen density on Android
<p>I'm writing a game which I want to run on medium and high densities (320x480 and 480x800). In order to run the app on both densities, I had to set support-screens param like this.-</p> <pre><code> &lt;supports-screens android:anyDensity="true" /&gt; </code></pre> <p>My problem is, in some 2nd generation devices...
android
[4]
4,094,102
4,094,103
java open csv file using excel
<p>I am making a project for college and have made a program which creates csv files. I would like there to be a button which you can click which then opens the csv file with excel. Thanks</p>
java
[1]
5,488,451
5,488,452
trigger('click') inside setInterval()
<p>i have this code:</p> <pre><code>setInterval(function() { $('.button2').trigger('click'); $('.button3').trigger('click'); }, 5000); </code></pre> <p>result:</p> <p>it presses .button2 and .button3 at the same time every 5 seconds. I need something like this - 5 seconds passed press .button2, 5 seconds pas...
javascript
[3]
3,121,669
3,121,670
Can arrays be stored in an ASP.NET profile?
<p>Imagine an ASP.NET website which displays stock prices when a user logs in. Can the list of stock ticker symbols be stored in an ASP.NET profile? I only see how to add strings, etc., and not collections like Lists or arrays.</p>
asp.net
[9]
5,265,059
5,265,060
Java method calls
<pre><code>import java.util.Date; public class Example { public static void main(String args[]) { Date d1 = new Date (99, 11, 31); Date d2 = new Date (99, 11, 31); method(d1, d2); System.out.println("d1 is " + d1+ "\nd2 is " + d2); } public static void method(Date d1, Date d2) ...
java
[1]
3,127,896
3,127,897
how to scroll control to the top of screen
<p>How do I scroll (ideally smooth scroll) down such that the specified control is at the top of the screen? (ie, how do I bring the screen down to the comment section such that the 'comments' title is at the top of the screen?)</p>
jquery
[5]
1,994,946
1,994,947
Camera issues on EVO 4G
<p>My app makes use of the camera. After a lot of optimization, everything works fine on the 10+ other devices I've tested on. On the EVO, however, the app just freezes up when I try to take a photo with the camera. In Logcat, I see <code>I/CameraService( 70): Unknow capture mode!!</code> I have no other information ...
android
[4]
965,788
965,789
Managing an Activity with many states
<p>I have an activity that has possibly many different states. </p> <p><strong>For example</strong></p> <ul> <li>no internet </li> <li>no license </li> <li>logged in </li> <li>not logged in </li> <li>pending </li> <li>error </li> <li>restricted</li> <li>deprecated</li> </ul> <p>At the moment I have <code>if stateme...
android
[4]
5,953,998
5,953,999
How to get pointer name
<p>Actually I am hooking memory management functions but one problem that confronts me is that I am unable to get the pointer name for which memory is being allocated in my hooked function. I mean... suppose Myfunction() allocates memory to a pointer Myptr through new operator as geven below.</p> <p>Myfunction() { in...
c++
[6]
2,208,857
2,208,858
How to determine number Saturdays and Sundays comes between two dates in java script
<p>I have requirement as follows I have two dates i need to find how may saturdays and sundays will come in between<br> Date1: 02/06/2011<br> Date2: 02/07/2011<br> 10 days are weekends<br> Thanks Srini</p>
javascript
[3]
3,840,886
3,840,887
How to delete a selected row in database android
<p>I somewhat manage to get the data &amp; stored in Database &amp; also I displayed in Listview. Now I need to delete the selected listview i.e, corresponding row in a database. Can anyone help me pls.</p>
android
[4]
5,565,094
5,565,095
Jquery sorting by user entered text
<p>Is there a way to sort a array of names by a value that a user provides.</p> <p>eg.</p> <pre><code>names = ['Tom', 'John', 'Sam', 'Jane'] </code></pre> <p>if the user then enters the name 'Sam' the array should change to:</p> <pre><code>names = ['Sam', 'Tom', 'John', 'Jane'] </code></pre> <p>also is it possible...
jquery
[5]
2,730,069
2,730,070
Is there a good way to update a TextView when an EditText view is deselected?
<p>I'd like to have a TextView be updated to show what a user has entered in an EditText view in Android.</p> <p>Is there a way to do this when the EditText view is deselected? </p> <p>(I know how to change the TextView to display the text entered in EditText, but I can't find out how to tell when EditText is deselec...
android
[4]
3,574,317
3,574,318
jQuery - Detecting if a file has been selected in the file input
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1299052/jquery-get-the-file-name-selected-from-input-type-file">jQuery: get the file name selected from &lt;input type=&ldquo;file&rdquo; /&gt;</a> </p> </blockquote> <p>I have a standard file input box</p> <pr...
jquery
[5]
4,964,429
4,964,430
Rename files in PHP
<p>How do I rename files by appending .jpg to the name. The files have no extensions as shown in the screenshot. But I would like to add .jpg to each one - is there a php function for doing this sort of bulk renameing?</p> <p><img src="http://www.jroller.com/sennheiserheadphones/resource/imagename.jpg" alt="enter imag...
php
[2]
5,878,648
5,878,649
Can I intercept a function called directly?
<p>In this code I created a function called someFunction. Then I modified Function.prototype.apply and call methods. So instead of my function code is working I am running my interception code (which shows an alert). But neither "call" nor "apply" intercepts direct method call. Is it possiple to intercept this? </p...
javascript
[3]
2,870,674
2,870,675
Jquery multiple events when only one wanted
<p>With the following html and jQuery, if I click the first anchor multiple times and then click the list anchor I get the alert message show up by the number of times I clicked the first anchor. Why is this? How do I stop it happening?</p> <pre><code>&lt;div&gt; &lt;a href="#"&gt;click me&lt;/a&gt; &lt;ul s...
jquery
[5]
3,711,818
3,711,819
where can I found Volume control Source in Android
<p>If Click CellPhone VolumeButton then (get the Click Message and Set Volume)&lt;-I want to know location of here!</p> <p>I mean not AudioManager, I think that more higher layer like UI.</p> <p>If anyone know about it, please give me an advice.</p>
android
[4]
4,301,583
4,301,584
How do I display this number pattern in C++?
<p>I have to display this number pattern:</p> <pre><code>-3 1 5 9 7 12 17 15 21 </code></pre> <p>using:</p> <pre><code>int number = __________________; // assign correct initial value int row, col; for (row = 1; row &lt;= 3; row++) { // adjust number so it displays the correct first value in the row __...
c++
[6]
5,804,464
5,804,465
Android : Handle OutOfMemory Error
<p>Can I handle Out Of Memory error inside of my application , if not then any other alternate solution to handle this error ?</p>
android
[4]
200,738
200,739
Fix resolution issue for asp.net website
<p>net website. But I have the expected appearance in 1024x768 resolution in IE7. But It has different appearance in firefox and in other resolutions of all browsers. How to make adjust my site to have same appearance in all browsers irresptive if resolutions. pleas help me clearly. Its urgent.</p>
asp.net
[9]
2,688,299
2,688,300
Android choose pictures from default gallery?
<p>I am using the following code to choose a picture from gallery.</p> <pre><code>Intent intent_gallery = new Intent(); intent_gallery.setType("image/*"); intent_gallery.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(intent_gallery, 1); </code></pre> <p>However I don't need it to view other applications...
android
[4]
158,820
158,821
How to detect leading double-quote in a string in Java?
<p>I'm writing a tokenizer that reads code from a file and am having difficulty with the - seemingly - trivial task of getting it to branch into the case that handles string constants (any token that starts and ends with a double quote).</p> <p>The conditional I wrote for the branch is </p> <p><code>if (token.charAt(...
java
[1]
5,193,583
5,193,584
Scope of "this" in JavaScript
<p>I have a JavaScript class that looks like this:</p> <pre><code>function SomeFunction() { this.doSomething(function() { this.doSomethingElse(); }); this.doSomethingElse = function() { } } </code></pre> <p>This code throws an error because the scope of "this" inside the function tha...
javascript
[3]
5,796,360
5,796,361
PHP Add Time to Existing Stored Time
<p>I am trying to add 55 minutes to a set time stored in the database. I am running an MySQL Query to get the time information. This is stored in the PHP Script as <code>$row['login_time']</code>.</p> <p>If is getting stored in the database in the format like 2013-04-25 22:48:53 EDT.</p> <p>I am trying to add 5...
php
[2]
5,559,179
5,559,180
python nesting brackets
<p>PHP uses brackets to nest functions, loops, if statements, etc. eg</p> <pre><code>function somefunction(){ for($i = 0; $i &lt; somenumber; ++$i){ } } </code></pre> <p>Python instead uses indents to nest. Is there an alternative to nesting without indents in Python? </p>
python
[7]
93,845
93,846
Python: "subject" not shown when sending email using smtplib module
<p>I am successfully able to send email using the smtplib module. But when the emial is sent, it does not include the subject in the email sent.</p> <pre><code>import smtplib SERVER = &lt;localhost&gt; FROM = &lt;from-address&gt; TO = [&lt;to-addres&gt;] SUBJECT = "Hello!" message = "Test" TEXT = "This message wa...
python
[7]
2,878,034
2,878,035
how to restrict user by clicking outside the alert box in android?
<p>i am having an custom alert view which pop ups on a button click event.all the things are going fine.but the problem is: if user clicks outside alert dialog it disappear.i want to restrict user for clicking out side.I am giving him the choice of cancel/cross button to close alert dialog. so how to restrict user cli...
android
[4]
5,819,807
5,819,808
How can I use ReadableByteChannel to get file contents and store it in byteBuffer?
<p>Below is the code that I have written. I want to do the simple thing, storing binary file data into byteBuffer. </p> <pre><code>File file = new File(fileName); try { ReadableByteChannel channel = new FileInputStream(fileName).getChannel(); ByteBuffer buf = ByteBuffer.allocateDirect(file.length()); // H...
java
[1]
2,510,465
2,510,466
Directed graph: Faster algorithm finding areas with only one "entrance"
<p>I have a directed graph consiting of objects each knowing the objects pointing at it and the objects it points to (m:n). I have one object beeing the start node. I am searching areas with only one entrance. These areas may contain loops and branches and such. The only condition is that you can not enter these areas ...
c#
[0]
2,745,856
2,745,857
How to know sim type(2G, 3G) in android phone
<p>I would like to know sim type(2G or 3G) inserted in android phone.</p> <p>If I insert 2G only SIM card in android phone, which api used for knowing sim card type. In this case, I have to get return value as a 2G Sim.</p> <p>best regards</p>
android
[4]
2,253,645
2,253,646
Finding z-index value using jQuery
<p>How to find a z-index value of a element by jQuery?</p> <p>i.e.: I have 2 divs, both are positioned absolute and z-index 10, 1000 respectively.</p> <p>But unfortunately IE6 displaying second div which has z-index 1000 below the first one.</p> <p>So I want to check what the z-index value of second one and first on...
jquery
[5]
1,513,792
1,513,793
worksheet->hideGridLines() is not working
<p><br> <strong>$worksheet->hideGridLines();</strong> of spreadsheet_excel_writer doesn't seems to be working. what are the possible reason that its not working.</p>
php
[2]