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
718,737
718,738
Python - convert comma separated string into reducing string list
<p>Given a Python string like this:</p> <pre><code>location_in = 'London, Greater London, England, United Kingdom' </code></pre> <p>I would like to convert it into a list like this:</p> <pre><code>location_out = ['London, Greater London, England, United Kingdom', 'Greater London, England, United King...
python
[7]
5,825,681
5,825,682
Float Formatting
<p>I will need to format a float value to string as given below</p> <pre><code>1.0E11 -- 1.0E11 1.21 -- 1.21 </code></pre> <p>When tried with <code>ToString("0.00")</code> I got the following values:</p> <pre><code>1.0E11- "10000000000.00" 1.21 - 1.21 </code></pre> <p>How can we convert the float value to strin...
c#
[0]
2,998,738
2,998,739
Clear Default Android Application
<p>Can we know that user has set default application for particular action? i. e. android.intent.action.CALL_PRIVILEGED </p> <p>Suppose I my application also provide called on action of Call_privilaged. but user has set inbuilt dialer as default launcher for Call_privilaged action. </p> <p>My question is can I know...
android
[4]
3,731,362
3,731,363
Can you detect "dragging" in jQuery?
<p>I have a throbber that is to appear when a user clicks a link.</p> <p>The problem is is that that same link can be clicked and dragged to be rearranged. In this case, I wouldn't need the throbber to appear. It only needs to appear if its actually waiting to go somewhere.</p> <p>How can I, with jQuery, create an ev...
jquery
[5]
79,039
79,040
what should i use with a c++ class, with or without "new"?
<p>When should i use the pointer and when not? Whats the better Way? Must i delete the cat object of the pointer at the end of the programm?</p> <p>Example:</p> <pre><code>cat piki; piki.miao(); cat *piki2 = new cat(); piki2-&gt;miao(); </code></pre>
c++
[6]
4,946,900
4,946,901
jquery, response from the POST method
<p>I get a response from the POST method. Inside I see the value, but after the POST method returns an empty value. Why, hot fix this?</p> <p>sample:</p> <pre><code>$.post('/news/add/', {parent: name, title: 'none'}, function(data){ new_id = data; alert(new_id); //11 }); alert(new_id); //empty </code></pre>
jquery
[5]
5,530,816
5,530,817
Why is not the code executed serially in a python for loop
<p>I have the following functionality in a python script:</p> <pre><code>invoke the shell to create some files(it is a split command from the shell) for f in a folder open f and write something commands.. </code></pre> <p>I have seen that when the program goes to commands after the execution of the for loop many...
python
[7]
1,277,348
1,277,349
java: how to convert this string to ArrayList?
<pre><code>String text = '[["item1","item2","item3"], ["some", "item"], ["far", "out", "string"]]'; </code></pre> <p>I would like to iterate over each individual ArrayList. I don't know how to turn that string into appropriate ArrayList object.</p>
java
[1]
391,006
391,007
Using Javascript mailto and getting errors when url is >600 characters
<p>My method for sending an email works pretty much like this,</p> <pre><code>function sendMail() { var link = "mailto:me@example.com" + "?cc=myCCaddress@example.com" + "&amp;subject=" + escape("This is my subject") + "&amp;body=" + escape(document.getElementById...
javascript
[3]
5,889,029
5,889,030
C# insert query not working
<p>i have written insert query for my application to create new user with password, but its not working, please check and correct it.</p> <pre><code> con.Open(); string a; a = "insert into tbl_KKSUser(EName,Uname,Password)values(@en,@un,@pas)"; SqlCommand cm = new SqlCommand(a, con); Sq...
c#
[0]
2,559,370
2,559,371
Providing Arabic language support to an application
<p>I have a chat application . I want to give Arabic language support to my application. Is there any way to change language when a user selects his language from a select box? The User requires to Write in Arabic in his text area.</p>
jquery
[5]
3,277,218
3,277,219
Modifying list elements in a for loop
<p>I have a list <code>a</code> for which I want to change the elements <code>a[i: j]</code> according to a function <code>f</code>. Can I do better than the naive way?</p> <pre><code>for index in range(i, j): a[index] = f(a) </code></pre> <p>[By better I mean something closer to <code>map(f, a)</code>, or someth...
python
[7]
4,057,757
4,057,758
How to compare 2 strings containing same characters
<p>My question is that, I have 2 strings, say String1 &amp; String2. Now I want to check whether these 2 strings contain same characters or not, irrespective of their sequence.</p> <p>Suppose <code>String1= "qwerty"</code>, <code>String2= "qywter"</code>. Now these Strings contain same characters but are in different ...
java
[1]
437,741
437,742
Recursively find the correct order of reads
<p>I've some trouble with this task for some hours, and I'm simply stuck at what to do.</p> <p>First I need a function that takes a dictionary argument and then returns the key associated with the largest value. This is what I've tried:</p> <pre><code>def findKeyForLargestValue(d): maxKey = '' maxValue = 0 ...
python
[7]
48,600
48,601
Creating a dictionary of two-dimensional arrays in c#
<p>I'm trying to create a dictionary of two-dimensional arrays in C#, I can't figure out the proper syntax. I've tried the following to no avail, but it shows what I'm trying to accomplish.</p> <pre><code> Dictionary dictLocOne = new Dictionary&lt;String,double[][]&gt;(); </code></pre>
c#
[0]
1,680,335
1,680,336
how to obtain activity locale in android?
<p>i have made a multilingual application in android. On my language select activity i make the user select their language of preference. when the user selects i change the configuration of the application using the following code:</p> <pre><code> Locale locale = new Locale(lang); Locale.setDefault(locale); ...
android
[4]
3,009,931
3,009,932
Scope of static variable and methods in Java
<p>I have some doubts about usage of static method in Java. I read many places static variables are instance independent so be comes global.</p> <pre><code>public class ThirdClass { public static var = "Java"; } public class Second { public static void main(String[] args) { ThirdClass ob1 = new ThirdC...
java
[1]
2,827,832
2,827,833
is it advisable to use php for creating a billing system?
<p>a client(hotelier) approached me asking if i could develop a billing and accounts system for his restaurant. and i responded positively. now the only programming languages i am good at is PHP and MySQL. and of course(HTML,CSS &amp; JS). </p> <p>do you think i should go ahead and build the application using PHP and...
php
[2]
387,691
387,692
Get generic interface class object
<p>How to get class object of a generic interface? For example, Boolean.class, Date.class. But List&lt;Boolean&gt;.class doesn't seem to be syntax-valid.</p>
java
[1]
792,400
792,401
form is submitimg even I am using return false
<p>form is submitimg even I am calling return false my code</p> <pre><code>$(document).ready(function() { $('.submit').click(function() { $('.hour').each(function() { var $hours = $(this).val(); if ($hours == "") { alert(" Active Time is required"); ...
jquery
[5]
3,561,453
3,561,454
How do I implement a LINQ-type IComparer<T> overload where T implements IComparable<T>?
<p>I am implementing a class that in the style of the LINQ libraries has an overload for a custom IComparer. (e.g. OrderBy: <code>OrderBy&lt;TSource, TKey&gt;(IEnumerable&lt;TSource&gt;, Func&lt;TSource, TKey&gt;)</code> and <code>OrderBy&lt;TSource, TKey&gt;(IEnumerable&lt;TSource&gt;, Func&lt;TSource, TKey&gt;, IComp...
c#
[0]
303,260
303,261
how to read column names of an excel sheet using asp.net?
<p>im trying to read column names from excel ..somebody help</p>
asp.net
[9]
1,401,308
1,401,309
Image from file, Server MapPath
<p>Why does this work:</p> <pre><code>System.Drawing.Image imageBmp = System.Drawing.Image.FromFile(Server.MapPath("~/Images/Image.jpg")); imageBmp.Save(Server.MapPath("~/Images2/Image.jpg"), System.Drawing.Imaging.ImageFormat.Bmp); Bitmap bmp = new Bitmap(imageBmp); </code></pre> <p>And this not? (the filename is ...
asp.net
[9]
2,624,930
2,624,931
Event is not occuring after adding the UIDatePicker on UIActionSheet
<p>Please review the code</p> <pre><code> -(IBAction)showDateSheet{ dateSheet=[[UIActionSheet alloc]initWithTitle:@"Select Test Date" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:nil]; datePicker=[[UIDatePicker alloc]init]; [datePicker addTarget:self action:@selector(changeDa...
iphone
[8]
4,839,571
4,839,572
How to get the date difference in Hours?
<p>I have a date coming from the database which in this format 2011-11-30 18:38:00 +0000 and i need date difference from now.How it's is possible?this what i am doing:-</p> <pre><code> NSDate* pDateEnd; NSLog(@"PDateEnd=%@",pDateEnd); //it has value=2011-11-30 18:38:00 +0000 NSTimeInterval secForDeal = [pDateEn...
iphone
[8]
137,857
137,858
how to get src element in javascript for firefox
<p>I am try to catch form event in javascript</p> <pre><code>var event = window.event.srcElement; </code></pre> <p>This is working fine in IE, but in Netscape/Firefox where event return undefined.</p> <p>Can someone tel me how to catch event in Netscape/Firefox?</p>
javascript
[3]
1,313,342
1,313,343
PHP png image compositing
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1394061/how-to-merge-transparent-png-with-image-using-php">How to merge transparent PNG with image using PHP?</a> </p> </blockquote> <p>I am completely lost here, so help would be greatly appreciated. I am new t...
php
[2]
6,028,267
6,028,268
PHP Detect if any URL variables have been set
<p>I have a webpage to which any amount of URL varibales could be set.. examples:</p> <ul> <li>index.php?source=lol </li> <li>index.php?source=lol&amp;sub=haha</li> <li>index.php?aff=123</li> <li>index.php?keyword=pizza</li> </ul> <p>I want a way that I can detect that any url variable has been set, if a url variab...
php
[2]
5,775,556
5,775,557
bit shift to divide str.length by 2k
<p>I have a chunk of data coming from an ajax call. I need to split this chunk up into smaller chunks of a predefined amount, not by a delimiter character, but by an amount. 2k is what I would like. I am trying to come up with a snippet that would bit shift divide the data, and place each chunk including the remaining ...
javascript
[3]
2,596,584
2,596,585
Simulate low battery & low memory in Android
<p>In order to generate the notifications i need to know about how to generate the low battery and low memory interrupts programmatically. Can any one please provide your suggestions.I am aware of Intents.</p>
android
[4]
4,932,755
4,932,756
Block a certain website using java
<p>I'm working on a small (i hope so) project and I'm in a very begginning. I've googled around and still couldn't get started. Let me explain my idea. First I type a website's address (let say codeproject.com) in a JTextField. Then after hitting on a JButton (let say Block), I can't open that site using internet brows...
java
[1]
3,960,161
3,960,162
Is it possible to "return a getter" in javascript
<p>I want to do something like this:</p> <pre><code>function x(){ var o = {}; o.__defineGetter__('y', function(){ return new Date(); }); return o.y; } var z = x(); console.log(z); //Wait 1 second console.log(z); //Date should be one second past the last printing </code></pre> <p>Of course, t...
javascript
[3]
437,277
437,278
Frame by Frame animation
<p>I need to animate the image in sequence when i pinch the screen on android mobile how can i do that.... </p>
android
[4]
1,683,963
1,683,964
confusing mixing datat type in c++
<p>I am trying to figure out what is happening this code</p> <pre><code>int i = 10, j = 7, l; unsigned int k; double q = 3.56; char c; c = q * i * j; l = c; std::cout &lt;&lt; l &lt;&lt; "\n"; // result is -7 std::cout &lt;&lt; c &lt;&lt; "\n"; // result is ? </code></pre> <p>I couldn't understand why l result is '7...
c++
[6]
54,146
54,147
Html dom parser problem in Domain
<p>I have using simple html dom parser in php(simple_html_dom.php) for parsing the web page data and displaying it. It works fine in localhost [wamp server] (http://localhost/test/read.php)but, read.php:</p> <pre><code>&lt;?php include('simple_html_dom.php'); $html = file_get_html('http://www.google.co.in/inde...
php
[2]
133,107
133,108
how to add event in ipod ical from ios 5 application?
<p>every one i am using EKEventStore to add events into iphone calender from my app, its working for the devices of ios version 4.2, and from my application the events are added into ical perfectly but when i installed the same app in ipod with ios version 5, strangely the events are not adding into ical, here is my fu...
iphone
[8]
3,464,669
3,464,670
php include and include_once
<p>really quick question does php 5 still support include_once because I am getting some unusual characters "..." when I use include_once but not when I use include</p>
php
[2]
2,168,910
2,168,911
HTTPException and IOException correct usage
<p>Whats wrong with the following exception handling... I was told this is not correct, Now my exception handling is no the greatest...</p> <pre><code> try { } catch (UnsupportedEncodingException | HttpException e) { } catch (IOException e) { } </code></pre> <p>Any guidance?</p>
java
[1]
3,097,268
3,097,269
Simple loop/repeat on hover in jQuery?
<p>I have a function that animates when a div is hovered on:</p> <pre><code>$('.left_scroll_button').hover(function(){ $(".scrolling_list").stop().animate({scrollLeft: '-=5px'}, 1); }); </code></pre> <p>This just animates the thing once. I want to repeat the animation continuously.. Is there some easy way to...
jquery
[5]
2,123,563
2,123,564
why is reference type can be different from object type in java
<pre><code>class Animal { } class Horse extends Animal { } public class Test { public static void main(){ Animal a = new Horse();//mark1 } } Animal ah = new Horse();// reference type is Animal and object is Horse </code></pre> <p>I can't fully understand this below: <strong>Animal ah = new Horse(...
java
[1]
2,245,370
2,245,371
The address and the arguments framework
<p>How should look the address and the arguments in the framework?</p> <p>Do you write:</p> <pre><code>site.com/controller/method?arg=1&amp;arg=2 </code></pre> <p>It is good?</p> <p>Do better the record:</p> <pre><code>site.com/controller/method/arg/1/arg2/2 </code></pre> <p>I would ask for example, as is the int...
php
[2]
4,274,444
4,274,445
php require_once
<p>i have this in the first page "login.php"</p> <pre><code>&lt;?php session_start(); $msg=''; if ((isset($_POST))&amp;&amp; (!empty($_POST))) { require_once('log.php') or die(mysql_error()); $p=md5($pass); if (login($login,$p)) { header('location:index.php');; } else { $msg="Login ou mot de passe incorrect";...
php
[2]
646,132
646,133
How to configure IIS first time for any web app?
<p>I have a website made in ASP.NET .Currently is being opened directly with Visual Studio. Now i want this to be opened with localhost with IIS features enabled.</p> <p>I need steps to make this website totally IIS enabled</p>
asp.net
[9]
4,073,903
4,073,904
When I change a parameter inside a function, does it change for the caller, too?
<p>I have written a function below:</p> <pre><code>void trans(double x,double y,double theta,double m,double n) { m=cos(theta)*x+sin(theta)*y; n=-sin(theta)*x+cos(theta)*y; } </code></pre> <p>If I call them in the same file by </p> <pre><code>trans(center_x,center_y,angle,xc,yc); </code></pre> <p>will the v...
c++
[6]
3,081,359
3,081,360
includes - php
<p>where should includes be stored in a file system??</p>
php
[2]
3,296,755
3,296,756
Why Don't "a=a++" Operation Increase The Value "a"
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/13516689/if-i-0-why-is-i-i-0-in-c">If i == 0, why is (i += i++) == 0 in C#?</a> </p> </blockquote> <p>I know this is not a logic implementation and I know I should use prefix ++ but I am curious about this code:...
c#
[0]
3,107,172
3,107,173
jquery change element partially working
<p>I'm having trouble changing text in an element that is near another element. The function is fairly straightforward, but for some reason I can't get this text change to work.</p> <p>When I click on #dislike_text, it goes blank (as it should), but the .like_text doesn't change. Note that there is also a postlike fun...
jquery
[5]
3,393,395
3,393,396
softkeyboard in landscape mode does not pop up in android emulator
<p>In android emulator, I am in landscape mode and double click the text edit panel. the softkeyboard does not show up. However, it works in portrait mode. </p> <p>I have check some of posts on line. They said because of hardkeyboard is available in landscape mode. If that so, how can i disable the hardkeyboard. Or is...
android
[4]
5,850,893
5,850,894
how use in it in main project?
<p>I have the following interface:</p> <pre><code>public interface MyFunctor { int myFunction(int x); } </code></pre> <p>And I created a class which implements this interface :</p> <pre><code>public class Myfunction1 implements MyFunctor { } </code></pre> <p>how use in main project? i have corrected mistake now ...
java
[1]
861,393
861,394
Howto display popup/tooltip below single word in html input field
<p>I want todo some spellchecking on an html input field. For this i would like to highlight the wrong word and display alternatives down under the word. </p> <p>Functionality in background is already working, ight now i am using <a href="http://jquery-spellchecker.badsyntax.co/" rel="nofollow">http://jquery-spellchec...
javascript
[3]
4,321,956
4,321,957
Request information from Android APP by Widget
<p>What I would like to do is get the value of variable stored in the main Application when the widget is first installed. Every time the variable is updated the main application sends it to the widget using sendBroadcast(intent); However, this means the first time the widget is installed it displays nothing.</p> <p>C...
android
[4]
2,005,641
2,005,642
creating flat list from two lists
<p>Given a list of values:</p> <pre><code>data = [100, 80, 200, 20, 300, 100, 400, 40, 500, 120, 600, 60] </code></pre> <p>I want to extract the first two and the last two values, and create a new list. Unfortunately, the way I'm doing things right now, I get a list which contains two lists:</p> <pre><code>bla = [da...
python
[7]
4,092,367
4,092,368
php hyperlink and variables?
<p>How I can convert this hyperlink into a variables???</p> <pre><code>echo '&lt;td&gt;&lt;a href="whateverpage?id='.$row['ServiceId'].'"&gt;'. $row['Title'] . '&lt;/a&gt;&lt;/td&gt;'; </code></pre>
php
[2]
3,897,931
3,897,932
PHP: What's wrong with this code, and why won't the variable increment?
<pre><code>$blogDir = 'blog/'; $blogdirHandle = opendir( $blogDir ); $checkingFile; $number = 0; $codeNumber = '-'.$number.'-'; if( $blogdirHandle = opendir( 'blog/' ) ) { while( ( $checkingFile = readdir( $blogdirHandle ) ) !== false ) { if( $checkingFile != '.' &amp;&amp; $checkingFile != '..' &amp;&...
php
[2]
516,459
516,460
what does <?= meaning in C++
<blockquote> <p><strong>Possible Duplicates:</strong><br> <a href="http://stackoverflow.com/questions/6974373/c-weird-usage-of-conditional-operator">C++ weird usage of conditional operator (&gt;?=)</a><br> <a href="http://stackoverflow.com/questions/3437410/c-extension-and-operators">C extension: &lt;? and &gt;? ...
c++
[6]
614,889
614,890
Virtual buttons are not visible in android 4.0 emulater
<p>Does android-sdk 4.0 platform supports virtual buttons(like: back button, home button etc). I installed android 4.0 in my eclipse and created AVD with respect to 4.0. but virtual buttons are not visible in my emulator.? How to show these virtual buttons in emulator.</p> <p>Thanks</p>
android
[4]
4,865,116
4,865,117
Java - Updating a string inside an if statement
<p>The string postcode at the end is used as an input later on in my code and as you can see, it's hard-coded. What I want to do is make it more dynamic. So boolean pc4 is set to the countries that accept 4-digit postcodes. pc5 is 5-digit and pc6 6-digits.</p> <p>What I want to do is something like:</p> <pre><code>if...
java
[1]
2,186,248
2,186,249
How to Get popup window Div element ID Value using Jquery
<p>how to get popup window div element id value using jquery. i want to disable checkbox on the popup window when i click on the edit button from the main window.. on clicking the edit button popup window is open which contain checkbox.</p>
jquery
[5]
2,276,119
2,276,120
Change the background image and making it stay on every page
<p>I have created a site where the user can change the image of a page from 4 available imges(which works fine), but when you go to another page, the image changes back to the default. </p> <p>I'm new at Javascript and trying to create an if else statement but I can't seem to get it to work.</p> <p>This is something ...
javascript
[3]
1,957,224
1,957,225
How to forcefully cast a string(generated by formating some date) into Date?
<p>I have a string (Jan12) (generated by applying some operations on current date {20-jan-2012}) Now i want to convert back this string into Date format . Also the value should be same i.e the new Date object should have value jan12 and not (20-jan-2012) . Pls help . I have tried doing</p> <pre><code> java.sql.Date.va...
java
[1]
5,495,211
5,495,212
PHP GD: Bad quality on resize?
<p>I dont like the resized image i get out, </p> <pre><code>imagecopyresized($resized_img, $new_img, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); ImageJpeg ($resized_img,"$path_thumbs/$rand_name.$file_ext", 100); </code></pre> <p>I added 100 in ImageJpeg, because i wish to improve the quality, but it didnt g...
php
[2]
4,641,153
4,641,154
How to disable options in jquery dropdown-check-list
<p>I using the plugin <a href="https://code.google.com/p/dropdown-check-list/" rel="nofollow">https://code.google.com/p/dropdown-check-list/</a> Here i ve the options which are selected in var values,but need to know how to disable unchecked options which are not selected </p> <pre><code> $("#s").dropdownchecklist({ ...
jquery
[5]
3,811,468
3,811,469
Adding prebuilt library to android apk
<p>I have built a dynamic library in android using android build system. This library provides jni interface for functions inside it. Now I want to include this library in an application (.apk). I am using eclipse for application development. Now, how can I use the prebuild dynamice library (.so) in my application ? I ...
android
[4]
2,976,502
2,976,503
How do I make the javascript more fluid? it seems to lag when two things are happening at once
<p>I have created this website but noticed the javascript image slider seems to lag the menu pointer when a image transition is happening..</p> <p>Anyone got any tips for optimization or ideas on how I could resolve this issue?</p> <p>Thanks!</p> <p>Website: <a href="http://roseground.co.uk/index.html" rel="nofollow...
javascript
[3]
4,071,100
4,071,101
New to C#, why does Property Set throw StackOverflow exception?
<p>I am new to c# just trying to mess with it to teach it to myself. I know java and would normally put in getter/setter methods. I am interested in doing it with the following code, but it throws a stack overflow. What am I doing wrong</p> <p>Calling Code</p> <p><pre><code>c.firstName = "a";</pre></code></p> <p>Pro...
c#
[0]
2,768,490
2,768,491
Dropdown selected change event fire on button Click event
<p>Hi All I have write the code in .Net. When I click the Buttun then fired below event. Please help how to do this.</p> <p>protected void ddldesignation_SelectedIndexChanged(object sender, EventArgs e) { Code. }</p>
asp.net
[9]
468,409
468,410
MaintainScrollPositionOnPostback property doesn't works with mozilla
<p>MaintainScrollPositionOnPostback = true</p> <p>its working with IE but not with mozilla(version 9)</p> <p>suggest another way of maintaining scroll position that is browser independent..</p> <p>thanxx</p>
asp.net
[9]
2,424,442
2,424,443
Iphone-exif 0.91 not working when I add it to my project, gives error ".objc_class_name_EXFJpeg", referenced from:
<p>When I add libiphone-exif.a to snapandrun in objectiveflickr I get this error:</p> <pre><code>".objc_class_name_EXFJpeg", referenced from: literal-pointer@__OBJC@__cls_refs@EXFJpeg in SnapAndRunViewController.o ld: symbol(s) not found collect2: ld returned 1 exit status </code></pre> <p>I do not know what this mea...
iphone
[8]
497,415
497,416
C# how to search a list
<p>I have a list of strings like:</p> <p>List myList</p> <p>How can I search the list using the .Find() method and see if a specific value exists?</p>
c#
[0]
1,554,237
1,554,238
Specifying site directory outside of the script
<p>Is it possible to specify site directories through python command line or environment? Right now I'm using <code>site.addsitedir</code>, but I would like to make the script agnostic of the site-setting logic</p>
python
[7]
3,095,759
3,095,760
Redirect HTTPS to HTTP
<p>Very simple issue we cannot resolve. The following code does not redirect properly:</p> <pre><code>$location = str_replace("http","https",$this-&gt;page-&gt;current_url); header( "Location: ".$location ); </code></pre> <p>I get a 400 Error: "Your browser sent a request that this server could not understand. Reason...
php
[2]
4,717,047
4,717,048
jQuery: renumber all rows by changing first column's values
<p>I'm trying to renumber my rows, starting with a given start index, after an event. Here's the HTML for my table:</p> <pre><code>&lt;table id="table4"&gt; &lt;tr&gt; &lt;td&gt;&lt;span class='col1'&gt;6&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Score&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&...
jquery
[5]
3,309,762
3,309,763
PHP not dividing correctly
<p>I have some PHP code that is dividing two numbers that are pulled from a mySQL database however it is not computing correctly. When I echo $comm and <code>$total_fix</code> individually, the numbers are correct. However, when I echo the division of the two it is not the correct answer. Both numbers are <code>DECIMAL...
php
[2]
3,151,035
3,151,036
What about the long term aspects of iphone development Both at Career-Biz Level?
<p>Hii People, i m new to iphone development and started my career after campus out and started learning on my own its around 2 weeks now i m pretty inspired with iphone dev but i m not clear with </p> <p>*does apple will retain its biz on iphone/ipad develp-on a long term basis?</p> <p>*what are the key points ...
iphone
[8]
3,853,733
3,853,734
Android: Unable to login to a web session and parse XML data using DOM on the same login session
<p>Android Development: I'm needing to log into a web session using POST, then make another request of which I parse XML to get Lat/Long, then submit this to a google maps overlay. </p> <p>My issue is I'm able to log into my system, but when I submit a command to parse XML, it is acting like a completely new session ...
android
[4]
677,007
677,008
How to programmatically disable predictive text (with no EditText)
<p>There is an Android application containing self-made input field (no <code>TextView</code> or <code>EditText</code> elements), so I have to show/hide keyboard, handle user input and show entered symbols on my own.</p> <p>I need to disable predictive text mode for standard view. Unfortunately Android <code>View</cod...
android
[4]
1,171,629
1,171,630
Android marquee float Images
<p>I am developing application where I need random alphabets floating from left side of screen to right side of screen. Can anybody help me, how to make floating of alphabet i.e. some image from left to right or viceversa? Images floats like marquee as in HTMl. they start from left side and ends at right side of scree...
android
[4]
2,406,289
2,406,290
Optimizing simple Python file matching & replacement script
<p>just wondering if anyone has a suggestion for how I can optimize my simple but slow file replacement script:</p> <pre><code>def switchFiles(args): for root1, dirs1, files1 in os.walk(args.folder): for f1 in files1: for root2, dirs2, files2 in os.walk(args.database): for f2 in files2: ...
python
[7]
5,586,991
5,586,992
Sorting multi-dimensional arrays
<p>I have an array like this:</p> <pre><code>Array ( [0] =&gt; Array ( [tag] =&gt; /nn [count] =&gt; 55 ) [1] =&gt; Array ( [tag] =&gt; /vb [count] =&gt; 7 ) ) </code></pre> <p>and I want to sort it. In this example it's already like I want it to be. Sorted by co...
php
[2]
3,162,763
3,162,764
php image file upload- php× 241958
<p>I'm new to PHP and copied this code from a book. In the file upload.html:</p> <pre><code> &lt;form method="POST" action="do_upload.php" enctype="multipart/form-data"&gt; &lt;input type="file" name="img1" size="30"&gt;&lt;/p&gt; </code></pre> <p>In the PHP script do_upload.php:</p> <pre><code>if($_FILES["img1"] !...
php
[2]
3,421,171
3,421,172
Internet Explorer does NOT respect jQuery's slideDown effect
<p>I Use internet explorer and last version of jquery. effetcs like slidedown, fadein, fadeout dont work with ie but works good with Google Chrome. How to fix it?</p> <p>Code runs fine in Google Chrome:</p> <pre><code>jQuery.noConflict(); jQuery(document).ready(function(){ jQuery("#form1").hide(); jQuery("#form1").fa...
jquery
[5]
189,498
189,499
Image of imageview not remove?
<p>I have an ImageView after getting id from xml.as on ImageView we set clicklistener which open gallery and camera opetion you can set image from camera as well gallery ain #2</p> <pre><code> profileimage = (ImageView) findViewById(R.id.profileimage); profileimage.setBackgroundResource(R.drawable.no_img); ...
android
[4]
4,646,070
4,646,071
onItemSelected / setOnItemSelectedListener not triggering
<blockquote> <blockquote> <p>I am opening spiiner with onclick on button but my spinner is not trigger setOnItemSelectedListener this portion of code is not working public void onItemSelected(AdapterView arg0, View arg1, int pos, long id) { ...
android
[4]
2,514,952
2,514,953
Python __slots__
<p>In Python, when would I want to use <a href="http://docs.python.org/reference/datamodel.html?highlight=__slots__#slots"><code>__slots__</code></a> and when would I want to avoid it?</p>
python
[7]
226,227
226,228
Android: Implementing an image slider like the Sportscenter App
<p>I'm trying to implement a slideshow of layouts where the user touches a view, slides, and while the finger is still touching the view, the slideshow follows his gesture movement transitioning to the next layout. If my description is unclear, please refer to SportsCenter and Gallery apps because they represent this ...
android
[4]
1,335,346
1,335,347
Updating a database periodically with Java
<p>I would like to perform updates to a MySQL database using two separate classes (that do different things) -- one doing so every 10 seconds, and the second every minute. I have a few gaps in my Java knowledge and I'm wondering what the best way to achieve it is.</p> <p>Importantly, if connectivity to the database is...
java
[1]
4,680,454
4,680,455
How do I display a date/time in the user's locale format and time offset?
<p>I want the server to always serve dates in UTC in the html, and have javascript on the client site convert it to the user's local timezone.</p> <p>Bonus if I can output in the user's locale date format.</p>
javascript
[3]
4,253,596
4,253,597
how to achivie double tap Zoom for API 2.2?
<p>I have Relative Layout whose background is static Image and many ImageViews as subchild. Now how to achieve double tap zoom on the background of the relative layout. User will click on the Background image anywhere and it will get zoom.</p> <p>How will I achieve it ?</p>
android
[4]
4,793,592
4,793,593
Split string to get hours
<pre><code>var date = '28/05/2011 12:05'; var elem = date.split(''); hours = elem[0]; </code></pre> <p>I have the above date format, please tell me how to split this, so that I can obtain <code>12</code> (hours) from this string?</p>
javascript
[3]
4,639,413
4,639,414
Why would this javascript not work in IE7 or Safari?
<p>Firefox handles it fine, but Safari and IE7 silently fail and do not insert the element.</p> <pre><code>&lt;script type="text/javascript"&gt; var ul = document.getElementById('xg_navigation').getElementsByTagName('ul')[0]; ul.innerHTML = '&lt;li id="xg_tab_home" class="xg_subtab"&gt;&lt;a href="http://somedomai...
javascript
[3]
3,263,125
3,263,126
Project Euler problem number 4
<pre><code>n = 0 for a in xrange(999, 100, -1): for b in xrange(a, 100, -1): x = a * b if x &gt; n: s = str(a * b) if s == s[::-1]: n = a * b print n </code></pre> <p>I have a question about this solution to <a href="http://projecteuler.net/index.php?section...
python
[7]
4,889,803
4,889,804
How to resize the Asp.Net Page based on the screen resolution
<p>I am developing a web application which has Chart Controls. I have developed a common chart User Control to use across the application. </p> <p>I am looking for an elegent way to set the Chart control's along with other control's width, height based on the screen(browser size).</p> <p>Please help me Thanks Shaik...
asp.net
[9]
1,934,088
1,934,089
How can i get values from checkbox in android
<p>i want to get the name of the item selected in the checkbox.But i got only some alphanumeric numbers.How can i obtain the name of the selected item from checkbox</p> <pre><code>public View getView(int position, View convertView, ViewGroup parent) { View view = null; if (convertView == null) { ...
android
[4]
3,715,852
3,715,853
setOnItemClickListener was not work with the checkbox?
<p>My <code>ListView</code> contains Ten Rows. Each rows contained the <code>CheckBox</code>. How to checked and unchecked the <code>CheckBox</code> using <code>setOnItemClickListener</code></p> <p>Sample Code : (it's not working for me)</p> <pre><code> listview.setOnItemClickListener( new OnItemClickListener(...
android
[4]
4,919,030
4,919,031
jquery: animate $('id1').before('some html') to fadeIn and from red to transparent
<p>I want to make something just like on this site (when you/or somebody else adds an answer)</p> <p>the answer appears and fades in and comes from orange to transparent, anybody knows how ?</p>
jquery
[5]
5,494,033
5,494,034
how to get a reference to the defining 'class' inside an inner method in JavaScript?
<p>I have the following JS code:</p> <pre><code>var Item = function () { this.property = ''; this.myfunction = function () { var value = this.property; }; }; </code></pre> <p>however, <code>this</code> does not point to the defining class so value doesn't get anything.</p> <p>how do I access...
javascript
[3]
1,798,655
1,798,656
Is it better to cast to a (Float) or declare a new Float when filling a map in a loop?
<p>Which version of the loop would be more efficient? Or does it really not matter? </p> <pre><code>SortedMap&lt;Float,Float&gt; map = uDataMaster.getMap(); for (int i = 0; i &lt; mzNumbers.length; i++) { map.put((Float)mzNumbers[i].floatValue(),(Float)intNumbers[i].floatValue()); } </code></pre> <p>versus</p>...
java
[1]
4,631,381
4,631,382
POST a SESSION variable on another page
<p>When I use the code provided below everything works fine unless there is an apostrophe or other html special characters in the SESSION I am trying to pass in the value. I have tried both htmlspecialchars() and htmlentities() with no success. please help. thanks, James</p> <pre><code>&lt;?php &lt;form action='ashlyB...
php
[2]
54,677
54,678
Android QR Barcode using Media Player
<p>I am developing an application which consists of Qrbarcode reader as well as MediaPlayer,Here is my problem?</p> <ol> <li>QR Barcode is successfully working for me.</li> <li>when QRBarcode is scanned it will show some URl right.</li> <li>The URL which is displayed Should Run Mediaplayer.</li> </ol>
android
[4]
4,780,950
4,780,951
header value php
<p>Hello having problems with this line of code.</p> <pre><code> header('Location: student.php?student_id='&lt;?php echo $get-&gt;student_id ?&gt;; </code></pre> <p>error it gives out is:</p> <p>Parse error: syntax error, unexpected '?' in C:\xampp\htdocs\Thesis\svalidate_user.php on line 28</p> <p>Appreciate an...
php
[2]