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
1,000,863
1,000,864
Javascript rounding issue
<p>I've got a weird maths/rounding problem in Javascript.</p> <p>The snippet below is a very basic example of the code I'm running. Obviously it's not this exact code, but I'm taking a decimal value from a text box, working out a percentage and taking this away from one.</p> <pre><code>var ten = "10"; var eight = "8"...
javascript
[3]
5,958,233
5,958,234
Android How do I get a reference to a current instance of media player?
<p>I want to create an application that runs everytime a song is played, say, a notification saying the title of the song and the corresponding artist. A similar application exists - Lyrics App. It gets the lyrics of the song currently played. So, this means, what I wanted to happen is possible.</p> <p>The question is...
android
[4]
1,220,634
1,220,635
How to gain reference to a clicked Hyperlink
<p>I understand that I can use the .click() method on a hyperlink element. But how do I know which element was clicked? First I have to gain reference to the hyperlink's ID.</p> <p>So lets say I have a page of hyperlinks like this in view source:</p> <pre><code>&lt;a href="addButton1" href="...someurl"&gt;&lt;img s...
jquery
[5]
5,013,217
5,013,218
IE7/IE8 get unload when call jquery post
<p>I call like below function when user click button,</p> <pre><code>&lt;script type="text/javascript"&gt; function callTest() { $.post("/testcall1", function(data){ $('#testDiv1').html(data); $.post('/testcall2', function(data){ $('#testDiv2').html(data); }); }); } &lt;/script&g...
jquery
[5]
5,095,660
5,095,661
TabBar rotation from protrait to landscape
<p>I am making a TabBar based universal app. I have added few extra tabs and changed the viewController to navigationController. Now when i am trying to rotate the view from protrait to landscape, its rotating the inside view but tabBar does not rotate and it stays at the same place ie at the bottom of the protrait mo...
iphone
[8]
3,490,874
3,490,875
Java Programming using eclipse
<p>how do you compile in Eclipse? And how do you run the program using this given with the choices: Java Applet or Java Application?</p>
java
[1]
2,738,881
2,738,882
nl2br in PHP suddenly doesn't work anymore
<p>I noticed that one of my scripts wasn't working anymore, and started investigating. Eventually it boiled down to <code>nl2br()</code> not working anymore. Check out what results I get from a test script:</p> <pre><code>nl2br("asd",true): NULL nl2br("asd",false): NULL nl2br("asd"): string(3) "asd" </code></pre> <p>...
php
[2]
3,460,793
3,460,794
jQuery hide/show div using variables
<p>I am a nOOb to jQuery.</p> <p>I want to use variables in jQuery to hide/show divs.</p> <p>what I have so far is:</p> <pre><code>$(document).ready(function(){ $('#listMenu a').click(function () { var getPage = $(this).attr("id"); var getName = $(this).attr("name"); //console...
jquery
[5]
2,692,691
2,692,692
how remove a class after an ajax load using jquery?
<p>how remove a class after an ajax load using jquery?</p> <p>First thing, I load an html file containing only list information into a ul id of ul_list</p> <pre><code> $("#ul_list").load("testListResults"); </code></pre> <p>Next, I try to remove all highlight class file:</p> <pre><code> $("#ul_list li...
jquery
[5]
2,255,036
2,255,037
How to solve Window leaked Exception in Android while changing the from landscape to portrait or vice versa?
<p>I am getting the exception of window leaked changing the from landscape to portrait or vice versa ?</p>
android
[4]
5,505,112
5,505,113
One Javascript Line Causes the Rest of the File to Not Function
<p>I have a Javascript file that I use to check the input of a form. However, when I uncomment the commented line, the javascript file does not function properly, and the form is submitted even if some of the fields are blank. In fact, the Javascript file doesn't even make it to the second alert function. What is going...
javascript
[3]
5,204,237
5,204,238
Valid javascript object property names
<p>I'm trying to work out what is considered valid for the property name of a javascript object. For example</p> <pre><code>var b = {} b['-^colour'] = "blue"; // Works fine in Firefox, Chrome, Safari b['colour'] = "green"; // Ditto alert(b['-^colour']); // Ditto alert(b.colour); // Ditto for...
javascript
[3]
523,529
523,530
C++ class pointer
<p>I know that you can get a reference to a static method like this:</p> <pre><code>typedef void (*pointer)(); pointer p = &amp;MyClass::MyMethod; </code></pre> <p>But is there a way to get a reference to the class itself? </p> <p>EDIT: I'd like to store a class name to a variable so i could instantiate different ki...
c++
[6]
4,873,568
4,873,569
c# project-wide using alias directives
<p>C# has a feature called <a href="http://msdn.microsoft.com/en-us/library/aa664765%28v=vs.71%29.aspx" rel="nofollow">Using alias directives</a>. They allows you do make an alias of a type like this:</p> <pre><code>using CustomerId = MyComp.MyProject.Core.EntityKey&lt;Customer, int&gt;; </code></pre> <p>This feature...
c#
[0]
2,391,999
2,392,000
how to print a specific area of a web page in c sharp
<p>hey guys, m building a web-page in that theres a <p> tag which holds some documentary data, so i want to print that specific data and not the whole page i.e banner, textfeilds etc... since i know window.print() function prints the whole page, but how to print a sepicific area in a page.</p>
asp.net
[9]
179,578
179,579
"This can only be used with fragments not in the back stack" what does it mean?
<p>I see on Android document that : </p> <blockquote> <p>public void setRetainInstance (boolean retain)</p> <p>Since: API Level 11 Control whether a fragment instance is retained across Activity re-creation (such as from a >configuration change). <strong>This can only be used with fragments not in the back st...
android
[4]
1,414,793
1,414,794
Getting PHP Error while sending query to database
<p>I keep getting this error; Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in </p> <p>I checked other questions and their answer and couldn<code>t figure it out. My query works fine when I do it from phpmyadmin with any number in $number. But like this it doesn</code>t work.</p> <pre...
php
[2]
2,187,773
2,187,774
php modulo return wrong result
<p>I got problem with this code:</p> <pre><code>if (!empty($_GET[ "lic" ])) $lic = $_GET[ "lic" ]; else $e = true; echo ($lic % 11); </code></pre> <p>When I post <code>8911076856</code> it echoes <code>1</code>, but it should be <code>0</code>.</p>
php
[2]
4,397,750
4,397,751
jquery animation from right to left
<p>I am trying to make an animation(Please tell me if my approach is correct) with using css sprites, please check following jquery code...</p> <pre><code>$(document).ready(function() { setTimeout("boat()",20); }); function boat(){ $("#boat").animate({right:"+=110%"},20000).css("background-position","0 0").ani...
jquery
[5]
6,032,346
6,032,347
"exists" keyword in Python?
<p>I've recently made the following example for Pythons for ... else:</p> <pre><code>def isPrime(element): """ just a helper function! don't get religious about it! """ if element == 2: return True elif element &lt;= 1 or element % 2 == 0: return False else: for i in xrange(3, e...
python
[7]
5,578,426
5,578,427
POSTmethod and PHP- login verification
<p>I wrote a code for login verification..I got output with GET. But i need output with POST since it is more secure.pls let me know if there is any error in my code.</p> <p>javascript code:</p> <pre><code>var xml; function verifyusernamepasswd(pass) { //pass is password that will be passed as parameter xml=new XMLHt...
php
[2]
5,401,742
5,401,743
publish asp.net website into single dll file
<p>I got a asp.net website from my client that need to be modified. The problem is that the old company was uploading the project as a release which means no code but a sinlge dll file.</p> <p>We can make a single dll file the project type is web application not a website!!</p> <p>Can you adivse how to publish sinlgl...
asp.net
[9]
1,111,087
1,111,088
How to print "at" inside php date function?
<p>i tried using <code>date("F j, Y \a\t h:i a", strtotime($date));</code></p> <p>but this produces <code>May 20, 2013 a 04:37 pm</code></p> <p>i also tried <code>date("F j, Y \at\ h:i a", strtotime($date));</code> <strong>and</strong> </p> <pre><code>date("F j, Y \a\t\ h:i a", strtotime($date)); </code></pre> <p>a...
php
[2]
1,244,675
1,244,676
how to add multiple css classes to a html element usin javascript
<p>I want to add multiple classes to an html element </p> <p>I know the following code is possible.</p> <pre><code>$("ul#List").find("li.template") .removeClass("template") .addClass("entry") </code></pre> <p>But i want to know if the following code is also possible.?</p> <pre><code>$("ul#Li...
javascript
[3]
5,791,382
5,791,383
Can I merge the standard output and standard error of a Process with the output of a console window in C#?
<p>I am starting a process via Process.Start and redirecting the standard output. I have access to the standard output via the standard output stream on the process instance, but I have to keep checking for it. Is it possible to redirect that output to the standard output of my console window?</p>
c#
[0]
4,707,491
4,707,492
Why "throw ex;" hides original stack trace
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/178456/what-is-the-proper-way-to-re-throw-an-exception-in-c">What is the proper way to re-throw an exception in C#?</a> </p> </blockquote> <p>I want to understand why the "throw ex" usage hides the original stac...
c#
[0]
4,921,480
4,921,481
How can I parse out text from a string containing HTML identifiers?
<p>I have web pages that contain text areas with HTML inside of them. For example here's a sample of text:</p> <pre><code>var a = "some text follows&lt;p&gt;&lt;p&gt;Give the following test text:&lt;/p&gt; &lt;pre&gt;abc {&lt;br /&gt; int size;&lt;br /&gt; String name;&lt;br /&gt; Test ( String name, int size...
c#
[0]
4,159,060
4,159,061
php setAttribute replacing & with &amp;
<p>I'm trying to do somwthing like this (where $doc is a DOMDocument)</p> <pre><code>$link_found = $doc-&gt;getElementsByTagName('a'); foreach ($link_found as $idx =&gt; $link) { $link-&gt;setAttribute('href', "/test.php?t=1&amp;q=2" ) ; } </code></pre> <p>All is working, but in the href now I got </p> <pre><co...
php
[2]
2,226,119
2,226,120
Are named functions or anonymous functions preferred in JavaScript?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/336859/javascript-var-functionname-function-vs-function-functionname">JavaScript: var functionName = function() {} vs function functionName() {}</a> </p> </blockquote> <p>There are two possible methods for pulli...
javascript
[3]
1,482,577
1,482,578
Connecting ASP.net with Access 2007
<p>Hi im a beginner and i want to know how to connect asp.net with access 2007. i need to add, update and delete data in a data grid. can you please help me out? im new and i need full instructions to do it. its really urgent... can you please provide me the complete steps to do this?</p>
asp.net
[9]
1,242,656
1,242,657
how to write "insert" in vector?
<p>I write this,but it didn't work...</p> <pre><code>template&lt;typename T&gt; typename vector&lt;T&gt;::iterator vector&lt;T&gt;::insert(iterator pos,const T&amp; val) { int a=0,b=0; if(capacity()==0) a=capacity()+1; if(capacity()==size()) { a=capacity()*2; T *start2=operator new[](a*...
c++
[6]
4,799,603
4,799,604
postInvalidate() is working slow?
<p>I am using LinearLayout implemented in order to paint polygon on it. But my implemented dispatchDraw(Canvas canvas) method is working very slow.</p> <p>Approximately, one draw cycle finish in 535ms (milliseconds).</p> <p>To call myLinearLayout.postInvalidate() from non UI thread, using following code :</p> <pre>...
android
[4]
4,050,441
4,050,442
trying to login from facebook native app
<p>i am trying to authorize my app with facebook native app. But after log in it request for opening it in browser. It says as "choose action from" and then list of browser.But i want to complete my process with facebook native app only. </p> <p>My code is as follows</p> <pre><code> private void checkFacebook() { ...
android
[4]
3,036,784
3,036,785
How to Auto send SMS on a Particular Date and Time in iphone
<p>Please provide me the code for sending sms on a particular Date and time in iphone. Please suggest me the best way to do this.</p> <p>I want to send sms after saving value in sqlite database like ph no. name, message.</p> <p>Thanks in advance.</p>
iphone
[8]
2,340,325
2,340,326
On losing focus - input not auto-filling
<p>So I have a multi-part form that is supposed to auto fill another input. I have used blur to recognize when the input has lost focus, but I cannot get it to auto fill the other input with the value of the input losing focus. What I have looks pretty simple and logical to me, simply is not working. </p> <p>Any help ...
jquery
[5]
5,563,668
5,563,669
How to call window installer from Java Application
<p>We work on the Java application .Our the application we need to call some service which is a window installer and that when run from the command prompt accept the input file and gives the result as an output file. Java application is on Linux and window service is on window so my question is that how can i call this...
java
[1]
4,381,314
4,381,315
'this' prefix in Java?
<p>Does the <code>this</code> prefix for accessing member variables exist in Java? </p> <p>Here is my HelloWorld code:</p> <pre><code>public class HelloWorld { public static int x = 0; public static void main(String[] args) { HelloWorld.x = 45; System.out.println(HelloWorld.x); } } </c...
java
[1]
3,499,457
3,499,458
"Calling" UI activity method from a class
<p>I have an Activity which mainly handles the UI, and I do most of the rest from another class (not a service). One of the things I do from that class is playing audio. What I need to do is tell my Activity when the audio finished playing (OnCompletionListener).</p> <pre><code>public class MyClass implements OnComple...
android
[4]
5,949,578
5,949,579
In the format of date and time in php, the timing is not correct
<p>When I am fetching the date n time using this function:</p> <pre><code>date("d-M-Y h:i A"); </code></pre> <p>It gives the wrong timing. The current correct timing is 04.30 pm but my function is showing 11.00 am. That means showing 5.30 hours early. help me out to fetch the correct timing.</p>
php
[2]
5,408,276
5,408,277
C# streamwriter formatting issue
<p>I'd like to thank Stackoverflow member <a href="http://stackoverflow.com/users/231511/pratap-r">Pratap .R</a> first because he helped me with the code. I'm still have a small formating issue with one of my replace functions. What is happening is when I replace <code>&lt;/me&gt;</code> it replaces with <code>;</cod...
c#
[0]
763,800
763,801
$_GET php security question
<p>Do coding this way pose any security risks?</p> <pre><code>$test = $_GET['test']; if($test) { $sql = mysql_query("SELECT * FROM tbl WHERE col2 = 'ABC'"); $row ... } </code></pre> <p>Thank you for your guidance</p>
php
[2]
5,522,576
5,522,577
Change python source while running
<p>Is it possible to change python source file while running an application and have this changes reflected immediately in the application?</p> <p>Let say I have a foo.py file with a class Foo. In other module I'm calling functions on the Foo on user action. Now, I would like to change source of the Foo without restar...
python
[7]
3,209,185
3,209,186
jquery validation error replacing select list value
<p>Is it possible to replace a select list (that is required) default value with an error message if it isn't changed? EX if you click submit without selecting a value, replacing the default "Please Select" that has no option value with a "Please select an option" message? If so, how?</p>
jquery
[5]
2,426,937
2,426,938
looping problem while appending data to existing text file
<pre><code> try { stmt = conn.createStatement(); stmt1 = conn.createStatement(); stmt2 = conn.createStatement(); rs = stmt.executeQuery("select cust from trip1"); rs1 = stmt1.executeQuery("select cust from trip2"); rs2 = stmt2.executeQuery("select cust from trip3"); File f = new ...
java
[1]
4,891,905
4,891,906
Packing numbers efficiently
<p>I have <code>n</code> numbers in the range of <code>0..m-1</code>. <code>m</code> doen't have to be a power of 2.<br> The most efficient way to pack them into a stream of bytes will require exactly <code>log2(m)*n</code> bits rounded up.<br> I get the numbers as a <code>List&lt;int&gt;</code> and <code>m</code> as <...
c#
[0]
5,211,500
5,211,501
Integrating ckEditor and kcFinder Not Showing Browse
<p>I edited the config.js file in CKEditor as instructed to integrate KCEditor but when I click the images button and then the Upload Tab, the only thing showing is the label "Send it to the server" and the blue button saying "Send it to the server." The browse button and the text box that shows on the KCFinder demo is...
jquery
[5]
1,385,214
1,385,215
ShortCut Icon Not working On Ice Cream sandwich 4.0 But works fine on SDK < 14
<p>Shortcut icon created is working fine except in Android 4.0 when clicking on the shortcut it is showing </p> <blockquote> <p>THE APP ISN'T INSTALLED</p> </blockquote> <p>here is my code</p> <pre><code>public class shortcutlauncher extends Activity { @Override protected void onCreate(Bundle savedInstanceState) ...
android
[4]
91,280
91,281
Seperate string by array
<p>I have no idea on how to do this, it'd probably use an explode but that'd not do exactly as I wanted.</p> <p>Say I have a string:</p> <pre><code>a,1,1,0,0;0,1,1,0,0;r,1,1,0,0; </code></pre> <p>and I have an array:</p> <pre><code>a = atv p = 330c U = blista c = BMW D = bobcat r = charger </code></pre> <p>I'd lik...
php
[2]
4,166,450
4,166,451
Creating a list containing 30k numbers
<p>So I am trying to compare the speeds of sorting a list. I wrote my own insertion sort function and I am comparing it with pythons built in sorting method. I now am trying to create a list that randomly generates like 30,000 or whatever numbers. Then I'm going to use a for loop to start with a list of like 1000 nu...
python
[7]
5,938,649
5,938,650
What/Where is the android ActionBar?
<p>I've never really handled an android device before. I've read most of the discussion on here : </p> <p><a href="http://developer.android.com/guide/topics/ui/actionbar.html#ActionItems" rel="nofollow">http://developer.android.com/guide/topics/ui/actionbar.html#ActionItems</a></p> <p>From what I gather if I'm using ...
android
[4]
2,843,389
2,843,390
C# deploy, problems with folders
<p>I've finished my app and used the visual studio installer to create a package with all the files that aplication need.</p> <p>But the problem is that, if the user install the program in ProgramFiles directory, it won't start because he needs admin Rigths (This because the program needs sqlServerCe).</p> <p>How i c...
c#
[0]
5,617,799
5,617,800
Android reading from InputStream not consistent
<p>I have a rooted android phone. I am trying to read the output of "ls" via my program:</p> <pre><code> Process p = null; p = Runtime.getRuntime().exec(new String[]{"su", "-c", "system/bin/sh"}); DataOutputStream stdin = new DataOutputStream(p.getOutputStream()); stdin.w...
android
[4]
4,898,142
4,898,143
how to submit a from with validation in PHP?
<p>I want to submit this form through PHP. with validation for required field and validation for phone number and email field also</p> <pre><code>&lt;form action="" method="" id="get-protected"&gt; &lt;div class="row requiredRow"&gt; &lt;label for="txt_FirstName"&gt; First Name&lt;/label&gt; &lt;input ...
php
[2]
3,331,316
3,331,317
Android app force closing
<p>I'm new to Android app development and Java in general. I have been watching some tutorials but decided it was time to start doing something on my own. I'm trying to make a fat caliper calculator where I insert all the info in one activity, calculate it and then pass the results on to another activity for displaying...
android
[4]
2,026,641
2,026,642
Using Intents to switch between classes
<p>I have a 'home page' on my app with a button in. I have implemented an onClickListener. I want to change to a different class when clicking the button. (Navigating to another page within the app with a different XML file) What am I doing wrong??</p> <pre><code>Intent myIntent = new Intent(this, menu_two.class); ...
android
[4]
3,340,268
3,340,269
Auto-login into vendors ASP.Net application in my own environment
<p>I've got an Intranet that I manage, and we've just purchased some vendor's system that has no out-of-the-box LDAP/AD support. I think it's an ASP.Net application (there's a form on the login.aspx [hint1] that has id="aspnetForm" [hint2]), and I thought, in my perfectly-run imagination, that all I had to do was pass ...
asp.net
[9]
1,554,542
1,554,543
prevent navigationbaritem from animating in iphone
<p>I have a navigation bar which i push 2 navigationBarIems without animation (animate:NO).</p> <p>I am animating the transition from views, so i don't want those items to animate atomatically. The problem is that when i touch the button from the bar to go to the previous view in the stack, it DOES get animated. How c...
iphone
[8]
5,205,711
5,205,712
what is difference between sleep method and yield method of multi threading?
<p>As currently executing thread while it encounters the call <code>sleep();</code> then thread moves immediately into sleeping state where as for <code>yield();</code> thread moves into runnable state/ready state </p>
java
[1]
2,050,708
2,050,709
Is it necessary to destroy the temp uploaded file if requirements are not met
<p>I'm uploading files using php. The file has to be below a certain size. If it's not, the script returns an error.</p> <p>I've noticed that php stores the uploaded file in (my case) C:\Windows\Temp\filename.extension Right now, if the file is above the Max size, the script only returns an error. So what happens to t...
php
[2]
1,631,562
1,631,563
jQuery - If URL matches href then move LI to top of UL?
<p>Been trying to get this to work unsuccessfuly. Any help would be appreciated.</p> <p>Search UL, if any href are equal to the current URL then move it's list item to the top of the UL list stack.</p> <pre><code>var url = window.location.toString(); $('#partnerCharities li.panel h1 a').each(function(){ var myHre...
jquery
[5]
3,329,131
3,329,132
Manually changing username in Asp.Net Membership
<p>I am able to change a username by directly accessing the asp.net membership user tables. However, the old username is preserved in a new row and assigned a new UserID automatically by asp.net. How do I stop that from happening?</p> <p><strong>EDIT: only in the users table and roles table, not the membership table...
asp.net
[9]
1,466,794
1,466,795
Don't print last segment of URL
<p>I have some php which prints a url. Can I contain this with PHP to leave off the last segment?</p> <p>So this:</p> <pre><code>www.mysite.com/name/james </code></pre> <p>would become this:</p> <pre><code>www.mysite.com/name </code></pre> <p>I'm using expression engine so the code is just {site_url}. </p>
php
[2]
1,195,009
1,195,010
When should one use intval and when int
<p>What is the better option:</p> <pre><code>// Option 1: $intValue = (int) $numericValue; // Option 2: $intValue = intval($numericValue); </code></pre> <p>Is there any difference between these two lines, and which should be used in which situation?</p>
php
[2]
1,541,987
1,541,988
how we get end position of a progress bar /seek bar?
<p>i create a audio player and wanna play a audio several times but once it complete 1st time, the progress bar get stuck at the end.i tried to get the last position of progress bar by</p> <pre><code>boolean atEnd = audioStreamer.getMediaPlayer().getDuration() - audioStreamer.getMediaPlayer().getCurren...
android
[4]
5,909,291
5,909,292
Confused with PHP 5.4.4
<p>I saw about PHP 5.4.4 at <a href="http://www.php-developers.org" rel="nofollow">http://www.php-developers.org</a></p> <p>How this is different from other PHP 5 Versions ? May i need to upgrade PHP 5.4.3 TO 5.4.4 to develop applications in 5.4.4 ?</p>
php
[2]
2,284,901
2,284,902
std::transform behavior when iterating past container.end()
<p>Code:</p> <pre><code>static int counter = 0; int add(int x) { counter++; return ++x; } int main() { vector&lt;int&gt; b; b.push_back(1); b.push_back(1); b.push_back(1); transform(b.begin(),b.end(),b.begin()+2,add); for (vector&lt;int&gt;::iterator it = b.begin(); it != b.end(); i...
c++
[6]
4,865,195
4,865,196
OOP javascript object inheritance (parent/child)
<p>Hello I'm working with Javascript OOP and I can't get it to work. I want to call functions from another object (parent) via the child. This is my "class" code:</p> <pre><code>function Unit(_x, _y, _speed) { this.x = _x; this.y = _y; this.dx = _speed; this.dy = _speed; this.gravity = 0; } Unit.pr...
javascript
[3]
5,973,952
5,973,953
C++ Run and closes when finish?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2529617/how-to-stop-c-console-application-from-exiting-immediately">How to stop C++ console application from exiting immediately?</a> </p> </blockquote> <p>I'm currently learning C++ and cant figure out how to s...
c++
[6]
5,997,133
5,997,134
JavaScript keyDown Does Not Fire
<p>I have a page in a modal window where I am displaying a slide show. The intended audience is for tablet users and they navigate the show by swiping from the right to the left or the left to the right to see the next or previous slide. This all works beautifully. </p> <p>However, in the event that someone does view ...
javascript
[3]
4,439,824
4,439,825
Retreving Data from Mysql and sending it to sqlite
<p>I am getting all the records from the mysql database through php and jason and inserting those records in Sqlite.But everytime when that activity creates it is inserting duplicate entries in Sqlite.I want to check that if that value already exists in sqlite table then value should not be inserted in Sqlite</p>
android
[4]
1,927,589
1,927,590
strange animation of iphone UI
<p>I am making my UI from nib files and have added a few animations for UIKit.But as i continue to use my application UI starts to load while animating.Even Navigation bar show with an animation.It seems some kind of memory issue or by some reason uikit is taking time to draw its controls.Would appreciate any kind of h...
iphone
[8]
5,477,602
5,477,603
How can I get the unique id of an Object after overwriting its toString() method?
<p>I can get the unique id like className@2345 of my object by calling its toString() method, but after I overwrite the toString() method, how can I get that unique id?</p>
java
[1]
4,026,999
4,027,000
How to Navigate through the table inside a fieldset
<p>There will be a Table inside a Fieldset, I am using below code to access that table. But it is not working. </p> <pre><code> $('Fieldset_A TABLE TBODY TR').each(function() { ....... } </code></pre> <p>My HTML Code is like this </p> <pre><code> &lt;div class="gridanswers"&gt;&lt;fieldset id="Fieldset_A"...
jquery
[5]
1,329,940
1,329,941
Problem getting the response from php in a new location
<p>Currently the location of my Html is <a href="http://severname.com/qotw.html" rel="nofollow">http://severname.com/qotw.html</a>. Onclick of a button i call the login();</p> <p>the login() javascript function, looks like this:</p> <pre><code>function login() { passwrd = document.f_signin.password.value; user...
javascript
[3]
5,733,642
5,733,643
How do I use a monochrome bitmap to display a color image on the iPhone?
<p>I have a sequence of bits for a monochrome image (0 => black, 1 => white). I want to take this data and draw an image on the iPhone in color. If a pixel value == 0, then paint it color1, else color2.</p> <p>I have gotten absolutely nowhere. Originally, I thought I could use glBitmap, but it is not supported on t...
iphone
[8]
1,373,584
1,373,585
php login behaving strangely
<p>The login works as a typical login should, the problem is that you can ONLY put in the username and it will log you in. Pretty much if the username is correct then the password doesnt even matter.</p> <p>php</p> <pre><code>&lt;?php include 'password.php'; session_start(); if (!isset($_SESSION['loggedIn'])) { ...
php
[2]
1,462,299
1,462,300
How can I display 20-25 lines of text when I click on an image in a gridview?
<p>I have about 50 images with in a grid view within my Android app. When I click on an image, I want the description of that image to be displayed.</p> <p>This is the code I have so far:</p> <pre><code>public class HarryActivity extends Activity { //---the images to display--- Integer[] imageIDs = {...
android
[4]
6,016,143
6,016,144
Jquery IsFocus result different for safari and Other browsers
<p>I have a jquery code like:</p> <pre><code>alert(!$('#txtSearchTextBox').is(":focus")); </code></pre> <p>Now the safari shows the message true and the other browsers show the message false when i write in the textbox.</p> <p>Any help is appreciated</p>
jquery
[5]
1,898,155
1,898,156
Android different screen sizes and AVD
<p>I'd like to implement several layouts: one for phone, another - tablet. This means I need to create a few folders: layout-normal, layout-large. Next, in order to test mechanism I need to somehow force avd to launch machine with specific width and height parameters (inches ?) - how is it done ?</p>
android
[4]
4,169,884
4,169,885
one page and two <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
<p>sorry for bad english. i have the page (index.html) with a line </p> <pre><code> &lt;script type="text/javascript" src="/js/jquery-1.4.2.min.js"&gt;&lt;/script&gt;. </code></pre> <p>this page loads ajax page (page2.html). this ajax page include <code>&lt;script type="text/javascript" src="/js/jquery-1.4.2.min.j...
jquery
[5]
2,186,282
2,186,283
how to delete object b, after setting object a to it, but not remove object a aswell?
<p>I'm trying to do this:</p> <pre><code> Data4JS D4JS = (Data4JS)GlobalHelper.GetCurrentSession()["Data4JS"]; GlobalHelper.GetCurrentSession()["Data4JS"] = null; return D4JS; </code></pre> <p>Problem is it sets D4JS to null as well, I don't really want to split my code up into a few method calls, how else...
c#
[0]
3,944,246
3,944,247
Cookie having "=" in value
<p>I have to check whether cookie exist or not while making request. The problem is that Cookie value is having "=" in it for e.g.</p> <p>....;username=firstName=Meet;....</p> <p>Here cookie name is "username" and cookie value is "firstName=Meet". The problem is when I try to get cookie from document.cookies. I am g...
javascript
[3]
5,168,728
5,168,729
difference between layout-finger and layout directory
<p>In android, there are different sub-directory under 'res' * layout * layout-finger * layout-land-finger</p> <p>Can you please explain what are the difference between these directories?</p> <p>Thank you.</p>
android
[4]
1,536,314
1,536,315
ASP.NET dynamic user interface OR form designer
<p>I need to create an application that allows users to design forms for various purposes. basically users should be able to design a form just like developers can do it in design mode using Visual studio (drag and drop controls and add data). for example users should be able to create a set of questions for a survey a...
asp.net
[9]
736,943
736,944
structure of SGMLParser sample from diveintopython
<p>I am just trying to adopt sample from chapter <a href="http://www.diveintopython.net/html_processing/index.html" rel="nofollow">http://www.diveintopython.net/html_processing/index.html</a>. Idea is to change urls inside in html file source. I came up with next code</p> <pre><code>from BaseHTMLProcessor import BaseH...
python
[7]
3,514,294
3,514,295
jquery keeping count of dynamically added/removed elements
<p>I have a bit of jQuery that generates a "div" when a button is pressed. There is a limit of 10 "div"s per page. The counter works, but when I delete one, it doesn't quite work the way I want it to. When one is deleted, and I continue adding, it duplicates the last number.</p> <p>For example if I create 6 "div"s a...
jquery
[5]
3,551,913
3,551,914
creating instances of classes in context of parent child relation ship-java
<p>i am trying to understand how instances of class or subclass are created in parent/child context.Take a look at this code:</p> <pre><code>class A { public void methodl() { //class "A" method caled } } class B extends A { public void methodl() { //class "B" method caled } } public class Test { ...
java
[1]
2,107,382
2,107,383
How to use Internal API's
<p>I want to use com.android.internal.telephony API's in my project, For that I downloaded "framework_intermediates-classes-full-debug.jar" and added to my project. I am able to import Call.java class but not CallManager.java class. I think I downloaded older version of jar file which does't included CallManager class....
android
[4]
5,730,738
5,730,739
How to access the files that are in USB device?
<p>i want through the code to access specific folder in the USB device that connected to my machine and view it's files, how can I do that?</p>
c#
[0]
2,704,270
2,704,271
Problem in email validation
<p>I have used regular expression in email field validation . But after i used session and authentication in my website,none of the regular expression is working for me.</p> <p>Can anybody help me out of this???</p>
asp.net
[9]
5,890,554
5,890,555
What is new Bytef[int] in C++?
<p>I have a code snippet below, I'm not quite sure what the last line does. More specifically what's a Bytef[]? </p> <pre><code>FILE* read_file_handle = fopen(read_filename, "rb"); fseek(read_file_handle, 0, SEEK_END); size_t no_bytes_to_read = ftell(read_file_handle); Bytef* read_buffer = new Bytef[no_bytes_to_read];...
c++
[6]
3,998,452
3,998,453
C# override OnDrawItem
<p><img src="http://i.stack.imgur.com/LpFkD.png" alt="enter image description here">I am making a trying to make this combo box: see picture attached. For the LineStyle combo box.</p> <p>Here's the code I have so far</p> <pre><code>public partial class frmDlgGraphOptions : Form public partial class frmDlgGraphO...
c#
[0]
2,257,812
2,257,813
Basic python script giving Internal Server Error
<p>I'm using hostgator and they swear that python is supported, but I've yet to see one working python script. I've tried several scripts, my latest one is the one they give on their website:</p> <pre><code>#!/usr/bin/python print "Content-type: text/html\n\n"; print "&lt;html&gt;&lt;head&gt;"; print "&lt;title&gt;CGI...
python
[7]
3,566,191
3,566,192
How to make a small image move from one side of the screen to the other with js or jquery?
<p>Sorry, if the question is a tough to work at. But, I have this small plane which is animated and has the sign that says " Welcome to the site ", and I want to plane to move in a loop from left screen to the right. Just come out, then disappear. Now, I know this can been done with JS, but I have no idea. Is it very h...
javascript
[3]
4,627,789
4,627,790
Python Exercise +=
<pre><code>k = 0 for z in xrange(x,y,2): k += 1 print (k == 3) </code></pre> <p>so I'm trying to find values for x &amp; y that fulfill this. I'm getting x = 1 and y =2 because 1+2=3=k. But the += part is throwing me up. anyone able to solve this?</p>
python
[7]
5,611,019
5,611,020
Retrieve the number and IMEI of the mobile phone
<p>I want to retrieve the own mobile number and the IMEI.</p> <p>How do I get this information from the Android phone?</p>
android
[4]
1,411,054
1,411,055
Remote function for validation
<p>I keep getting an undefined for the val that gets passed and not sure why when there's something being put for the form field.</p> <pre><code>$('#addNewUserForm input[name="username"]').rules('add', { remote: { type: 'post', url: 'addnewuser/is_username_available', data: { 'u...
jquery
[5]
2,527,806
2,527,807
build multidimensional array from string php
<p>EDIT: Here is a portion of <code>$preparedstring</code>:</p> <blockquote> <p>555555,Jones,Brian,NYC,1000,2011-10-21 00:00:00,Check,1542,0, ,Check, ,0, ,Check, ,; 6666666,Miler,Christopher,Chicago,1000,2011-10-26 00:00:00,Check,6406,0, ,Check, ,0, ,Check, ,;</p> </blockquote> <p>I am trying to convert a HTML t...
php
[2]
4,903,943
4,903,944
How to add wordpress plugin in cs-cart
<p>I had integrate the wordpress with the cs-cart.How to add the wordpress plugins in the cs-cart site(inside the page)?</p>
php
[2]
208,260
208,261
how to determine an application version from own application
<p>IThe scenario is that my application search all installed application in order to determine versions of those applications. Then store name of the application with its versions on the same file. If new version of the application is available, then give notification to the user. The question is "how can I learn the v...
android
[4]