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
4,121,310
4,121,311
Android: redirect audio to file?
<p>My Android application relies on a closed-source Text-To-Speech API. When I invoke .speak(String s) method it coverts supplied text to sound and plays it back. However, I also want to be able to save that sound to an .mp3 file for later playback.</p> <p>So, is it somehow possible to redirect an AudioStream to a fil...
android
[4]
5,358,136
5,358,137
What's the android AccountManager used for?
<p>I need some help understanding what the account manager offers us. I have a web service which requires a token for use. For example, if a developer wants to use my api, they would use a url like:</p> <pre><code>http://myservice.com/addfriend?name=john&amp;token=abc </code></pre> <p>The token "abc" is retrieved by ...
android
[4]
286,401
286,402
How to generate unique ID in clustering
<p>Is there any clustering API that helps in generating the unique ID across many servers?</p>
java
[1]
2,457,510
2,457,511
Change event function parameters with JQuery
<p>I have an image map that contains certain "Areas" that contain onmouseover events. Most of these events fire a function which passes in some coordinates. I want to be able to manipulate the coords in the function SFX_ShowIconOver.</p> <p>The Image Map is created by a third party app so I can only manipulate render...
jquery
[5]
458,436
458,437
Can't hook form submit event
<p>I'm trying to use jQuery to submit a form so the page doesn't need to be reloaded I cant get it to hook onto the form though.</p> <pre><code>&lt;form action="index.php" method="get" id="frmFilter"&gt; </code></pre> <p>and</p> <pre><code>$("#frmFilter").submit( function () { alert('t'); return false; }); <...
jquery
[5]
4,472,220
4,472,221
managing wimax in android
<p>You can manage wifi connectivity, and you can kind of manage 3G, but what about 4G, more specifically WiMAX? I saw an API on ClearWire's website, but I am not sure if Google is planning to include WiMAX as part of the SDK. Does anyone have an insight? I am looking for connect/disconnect functionality, failover conn...
android
[4]
1,396,363
1,396,364
Android: When to use Dialog vs. Activity
<p>When is it preferable to use a Dialog box as opposed to an Activity in Android? From my understanding, anything you can do with a Dialog box you can also accomplish with an Activity. Are there any tasks that can only be accomplished by an Activity or a Dialog?</p>
android
[4]
886,019
886,020
How to draw mathematic pattern in php?
<p>I want to draw a pattern like this.</p> <pre><code>1 2 3 3 5 8 5 8 13 21 8 13 21 34 55 </code></pre> <p>Can somebody help me? like in php code for this pattern is</p> <pre><code>1 12 123 1234 12345 </code></pre> <p>is</p> <pre><code>&lt;?php for($i=1;$i&lt;=5;$i++) { for($j=1;$j&lt;=$i;$j++) { ...
php
[2]
4,717,821
4,717,822
reload (update) a .py file in the interpreter
<p>I'm new to python (and to programming in general) and here I have a newbie question:</p> <p>let's say I have this python script "script.py" and I load it in the interpreter by typing</p> <pre><code>import script </code></pre> <p>and then I execute my function by typing:</p> <pre><code>script.testFunction(testArg...
python
[7]
3,876,360
3,876,361
Error; Variable Referenced Before Assignment
<p>I'm getting an <code>Error; Variable Referenced Before Assignment</code> for myhp. At the starting of my .py file, I have "myhp = 20" though.</p> <p>What do I do to get this working?</p> <pre><code>def fightmode(name, hp, dmg, gold): print '\n\n\nYou are in a fight with %s' %name print '%s has %sHP' %(name...
python
[7]
3,585,283
3,585,284
java chain exception
<p>hi all i have question regarding chain exception</p> <pre><code>try{ } catch(Exception e) { throw new SomeException(); } </code></pre> <p>if i do like this my eclipse will prompt error at line throw new SomeException(); stating "unhandled exception" and i must put something like </p> <pre><code>try{ } catch(Excep...
java
[1]
4,145,183
4,145,184
How can i redirect a clickable item in list view to some other activity?
<p>I want to link my items present in list view to some other activity, so that i can move to some other activity on clicking a list view item.</p>
android
[4]
1,743,792
1,743,793
Show() not working in jQuery?
<pre><code>&lt;script type="text/javascript"&gt; //Code added by Nitesh for RFE 670082 starts here jQuery("input[name='hideLineItemColumns_quote']").click(function () { alert(jQuery(this).attr('checked')); if(jQuery(this).attr('checked')){ var columnName = $.trim($(this).val()).replace('\u...
jquery
[5]
1,899,873
1,899,874
Using JSON data in a javascript function
<p>I am returing JSON data as a response in a web service I am writing.</p> <p>I am wondering what is the best way to consume the data, returned to a Javascript function (passed as an argument).</p> <p>Do I:</p> <ol> <li>use eval()</li> <li>use Doug Crawfords jSon parser to parse the JSON data into a Javascript obje...
javascript
[3]
555,418
555,419
list union with duplicates
<p>I need to unite two lists in Python3,where duplicates can exist,and for one set of these the resulting list will contain as many as max in both lists.An example might clarify it:</p> <pre><code>[1,2,2,5]( some operator)[2,5,5,5,9]=[1,2,2,5,5,5,9] </code></pre> <p>Ideas?</p>
python
[7]
3,267,129
3,267,130
Facebook Error after xcode upgrade
<p>I have been using xcode 4.1 till yesterday and my facebook integration using FBConnect was also working fine . But when i update my xcode to xcode 4.2 , i am getting error on facebook after successful login like "This endpoint has been deprecated. To temporarily reenable it, you may disable the "august_2012" platfor...
iphone
[8]
470,398
470,399
How do I do implement 'time ago' using the ISO1806 datetime format?
<p>I have go about getting the 'time ago' using the a date time using javascript.</p>
javascript
[3]
2,031,211
2,031,212
Converting .py extension to executable file
<p>Suppose i have a main.py for a calculator application. I used different .py files for different function like(add.py for adding, mul.py for multiplication) and all these files are imported in main.py. When I click main.py it executes successfully and do all function like adding, mul, etc. What i want to do is to mak...
python
[7]
3,389,429
3,389,430
How can I combine counting rows in an IDictionary with merging rows?
<p>I have the following class that checks for errors:</p> <pre><code> public bool ValidateAccountDeletion(Account account) { var _errors = new Dictionary&lt;string, string&gt;(); var accounts = _accountRepository.GetPk(account.PartitionKey); if (_productRepository.GetPk("0000" + account.R...
c#
[0]
4,119,430
4,119,431
Serialization and archiving object
<p>I need to do the same operation but in one stream. May you help me, please?</p> <pre><code>public static byte[] archivingAndSerialization(Object object){ ByteArrayOutputStream serializationByteArray = new ByteArrayOutputStream(); ByteArrayOutputStream archvingByteArray = new ByteArrayOutputStream(); try { ...
java
[1]
5,233,978
5,233,979
Android - query if a sync account is checked for syncing
<p>How can I query if a sync account is checked for syncing or not?</p>
android
[4]
846,823
846,824
Compare two static arrays
<p>I have an issue how to implement to compare two static arrays, ie.</p> <pre><code>string bufferNames[]={"apple","orange","banana","pomegranate","pear"}; string bufferPictures[] = {"apple.bmp","orange.bmp","banana.bmp","pomegranate.bmp","pear.bmp"}; </code></pre> <p>Each item in the bufferNames presents the choice ...
c++
[6]
4,463,315
4,463,316
How to clear a <label>'s text
<p>Trying to figure out how to clear my label's text...clear it out. So far no luck:</p> <pre><code>$("label[id*=\"singleModelText\"]").text().empty(); </code></pre>
jquery
[5]
2,926,938
2,926,939
A -> B, B -> A classes association
<p>This code doesn't do anything special. It's just a snippet to show the problem with forward declarations. Just a short question: why doesn't it work and how to force it to work?</p> <pre><code>class A; class B { A obj; public: int getB() const { return 0; } void doSmth() { int a = o...
c++
[6]
4,793,074
4,793,075
Arranging words within a given string alphabetically
<p>i'm just trying to write a code for arranging the words within a string alphabetically.. But whenever i am running this it' entering in an infinite loop.. i cant figure out what is exactly happening..can anybody help me out plzzz.. below i've attached my code.</p> <pre><code>public class AscendString { String...
java
[1]
2,209,117
2,209,118
android: am pm format of alarm
<p>I am using the alarmmanger class set method for setting the alarm. i takes the input from user through timepicker dialog for setting the alarm.alarm work fine when i set specific hour and minutes but application is not following the am/pm logic. mean if i set the alarm 10:31 am while in system time is 10:30 p...
android
[4]
579,392
579,393
PHP switch function doesn't recognize "less than 0"
<pre><code>$bytes = 0; switch($bytes){ case $bytes == 0: echo 'Equal to 0.'; break; case $bytes &lt; 0: echo 'Less than 0.'; break; } </code></pre> <p>This outputs "Less than 0."</p> <p>Why?</p>
php
[2]
5,749,125
5,749,126
Contains certain text but does not contain certain img, apply a css style to that
<p>How can i express the following in jquery?</p> <p>Apply a yellow background to every td on a table that contains "$" but does NOT contain img src="images/plus.gif"</p> <p>I could do it just for the contain part using:</p> <pre><code>$("#SubscribersManageList tr:contains('$')").css("background", "yellow"); </code>...
jquery
[5]
2,502,578
2,502,579
Two different Selects with the same option, then animate overflowed div or error message
<p>EDIT: Oh well, now im managing to make it work properly. But I need the error message to .hide if the user select the proper option after having the error message.</p> <p>Here is the html/jquery im working on</p> <pre><code> &lt;form&gt; &lt;select&gt; &lt;option&gt;Please Select Your Value&lt;/option&gt; ...
jquery
[5]
501,399
501,400
Clearing an array which is global context
<pre><code>var obj = { obj.arr1 = [], obj.arr2 = [] }; </code></pre> <p>I have this object in the global context, now each time when i add a new user the <code>obj1.arr[]</code> is used for some manipulation. Now when i add another user, the value obj.arr1[] holds the previous data. </p> <p>I tried using <code>ob...
javascript
[3]
1,924,108
1,924,109
GPS Code not working in iPhone os 3.1
<p>I am Using the following code to get the user current location in iPhone o 3.1 but the application get crash.Did the code change in 3.1?</p> <pre><code>CLLocationManager *locmanager =[[CLLocationManager alloc] init]; [locmanager setDelegate:self]; [locmanager setDesiredAccuracy:kCLLocationAccurac...
iphone
[8]
2,675,789
2,675,790
Writing Files to App Directory - NOT SDCARD
<p>Okay, so im having a bit of trouble here. Ive done some Googling but really havent gotten a clear answer.<br> <br> You see, I have a file (with no extension) in my "raw" folder in my project. This file is needed for my apps to write a couple of settings and notes. Id prefer to use something like this just to be extr...
android
[4]
710,070
710,071
I'm looking to make a custom volume monitor
<p>I'm looking to make a simple volume manager app. I know it has been done before but I am just looking to make one to see what its like and to get more familiar with the code and doing certain things with it.</p> <p>I'm hoping that it could include an if statement where if the volume drops below zero it makes a "Toa...
android
[4]
862,614
862,615
Remove value from array based on value?
<p>I have a PHP array with a parent called "items." In that array, I want to remove all values that do not contain a string (which I'm gonna use regex to find). How would I do this?</p>
php
[2]
5,252,043
5,252,044
uninstall a software programatically in java
<p>I want to know if there is a way to uninstall a software programatically using java. <br/> Suppose if I have Firefox installed on my windows machine then how could I use java program to uninstall it.</p> <p>Thanks.</p>
java
[1]
5,115,655
5,115,656
Python inter-computer communication
<p>This whole topic is way out of my depth, so forgive my imprecise question, but I have two computers both connected to one LAN.</p> <p>What I want is to be able to communicate one string between the two, by running a python script on the first (the host) where the string will originate, and a second on the client co...
python
[7]
4,529,913
4,529,914
Need a ROT47 JavaScript Implementation
<p>I found the following code to decode a ROT13 string and put it into a webpage with JavaScript:</p> <pre><code>&lt;script type="text/javascript"&gt; document.write("string".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c&lt;="Z"?90:122)&gt;=(c=c.charCodeAt(0)+13)?c:c-26);})); &lt;/script&gt; </code...
javascript
[3]
604,556
604,557
new keyword without class name in c#
<p>While going through the ASP.NET MVC docs I see this idiom being used alot:</p> <pre><code>new { foo = "bar", baz = "foo" } </code></pre> <p>Is this a Dictionary literal syntax? Is it a new class/struct with the type inferred by the called function definition? If it is how come the vars don't need a type definition...
c#
[0]
5,745,276
5,745,277
How can i close parent window from child window
<p>I opening the logout link in new tab from parent window destroying the session and redirecting the child window page to index or login page. But simultaneously i want to close parent window. How should i do it? It should work in all browser. Thanks in advance.</p>
javascript
[3]
527,094
527,095
Run a php script from a java class
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2874591/execute-external-program-from-java">Execute external program from Java</a> </p> </blockquote> <p>Is it possible to Run a php script from a java class. My project is a struts2 frame work web application. ...
java
[1]
4,518,530
4,518,531
How to count number of time the user use my app?
<p>I want to count number of time the user use my app. eg: a user use my app and i can to count number of time that user use my app. Thanks you so much!</p>
iphone
[8]
3,820,969
3,820,970
jQuery: "diff" two tables; display rows not in common
<h2>In a checkout application:</h2> <p>Need to display only the recently added items.</p> <h2>Constraints:</h2> <p>No control over submit action in form.<br> No control over "row adding" mechanism<br></p> <h2>My idea:</h2> <ol> <li>Clone table upon document load</li> <li>Compare or 'diff' table against clone at "f...
jquery
[5]
1,963,390
1,963,391
Opening a new tab when user clicks on some url in chrome extension
<p>I have written a chrome extension. I'd like all urls to open in a new tab when user clicks on it without using target=_blank in onclick, as it would be tedius work for me. </p> <p>Any suggestions will be highly appreciated.</p> <p>Thanks in advance.</p>
javascript
[3]
2,174,909
2,174,910
Bitmap from url without scaling
<p>i am getting bitamap from a url. Everything is fine but i m having small issue i.e my bitmap from url gets scales down. I want bitmap of original size without scaling. How to achieve this. I tried options but no success yet. here is my code:</p> <pre><code>try { URL url = new URL(src); HttpURLConnection connection ...
android
[4]
5,300,059
5,300,060
convert bitmap to integer array form and then compress it in android
<p>how does bitmap return data in the form of integer array. And how do i convert it into integer array form. After conversion to integer array form i want to compress that integer array form. Is it possible? If so how? Kindly help me out</p>
android
[4]
34,528
34,529
"If" statement - Order of validation of objects?
<p>Simple question about the order of an IF statement in C#.NET</p> <pre><code>if (Company !=null &amp;&amp; Company.ID &gt; 0) { } </code></pre> <p>Does C# work from left to right, and therefore make the check on Company.ID valid?</p> <p>Thanks.</p>
c#
[0]
1,719,789
1,719,790
Scale an array of values with lightning speed
<p>I have an array of double with 12,000 entries. I need to scale each entry's value by a factor (e.g. 0.3345, or 6.78. whatever).</p> <p>What I did was to loop each entry and perform the multiplication. As I am working on an PPC-based 100MHz embedded system, the large number of multiplication calls is slowing it do...
c++
[6]
324,511
324,512
value undefined for jquery
<p>here is my jquery</p> <pre><code> var obj=$("#Connect"); alert($("#Connect").value); </code></pre> <p>The value appeared to be undefined, but I have a html tag there</p> <pre><code>&lt;input type="button" id="Connect" value="Connect"/&gt; </code></pre> <p>what is the problem?</p>
jquery
[5]
1,107,232
1,107,233
Additional checkboxes/radiobutton required for treeview
<p>I understand that treeview in asp.net comes with checkboxes option for usage. However, in my application, I will require 2 additional checkboxes or radiobutton on the righthand side of each leaf node of my treeview.</p> <p>However, I seem to be unable to find a solution to this requirement, and i think treeview str...
asp.net
[9]
2,262,129
2,262,130
Generating a user unique hash
<p>I need to generate an hash, that is unique for a user on an android device. Since they can have multiple users that seems difficult to me. I was about to use the IMEI of the device (or another device, if there is one), but since android supports multiple users, I have to use something else, without changing my permi...
android
[4]
3,191,091
3,191,092
PHP: Injecting code on non-sql code?
<p>I've read about MySQL injection and how it's done. I have a doubt, how could a login code be attacked if it doenst get data from a database?</p> <p>This is what my login code looks like:</p> <pre><code>if($_GET['login'] == "myname" &amp;&amp; $_GET['password'] == "mypass"){ echo 'welcome, admin.'; else e...
php
[2]
2,154,206
2,154,207
Documentation for JavaScript Event Hanlders
<p>I am looking for a list of all JavaScript event handlers (such as onLoad, onSubmit ect...) and the corresponding html tags that they can be applied to. <a href="http://docs.sun.com/source/816-6408-10/handlers.htm" rel="nofollow">This</a> is is the best document I have found so far, but I believe it is is incomplet...
javascript
[3]
2,968,345
2,968,346
Change date string format in android
<p>I am getting date string from SAX parsing like this: <strong>Wed, 18 Apr 2012 07:55:29 +0000</strong></p> <p>Now, I want this string as : <strong>Apr 18, 2012 01:25 PM</strong></p> <p>How can I do this?</p>
android
[4]
711,976
711,977
How to User Variable Names For Opening One or More Files In Python?
<p>Python newb and first-time poster...</p> <p>I'm building a mass disk copying program and have been pretty successful in working through issues until now. I am trying to open from 1 to n (up to 28) files (actually drives in Linux, e.g., /dev/sdc, /dev/sdd, ...), depending on user checkbox selection. </p> <p>I'm usi...
python
[7]
3,995,153
3,995,154
how do i pass data with & in jquery ajax request
<p>Here is a scenario. when ever i pass following in a ajax request.</p> <pre><code>$article = $('#article').val(); $.ajax({ url:'url.php', type:'post', data:'article='+$article, success : function(response){ alert(response) }); </code></pre> <p>so if $article will contain following:</p> ...
jquery
[5]
3,154,136
3,154,137
How to escape a string to be passed into DecimalFormat
<p>May I know how I can escape a string to be passed into decimal format?</p> <pre><code>// currencySymbolPrefix can be any string. NumberFormat numberFormat = new DecimalFormat(currencySymbolPrefix + "#,##0.00"); </code></pre> <p>How can I escape <code>currencySymbolPrefix</code>, so that it may contains any charact...
java
[1]
900,034
900,035
Comparing time stamps with php?
<p>Are there any built in functions that do unix time stamp comparisons in php?</p> <p>EDIT: I mean timestamps of the form "2001-12-20 00:00:01". Also edited title... my apologies as this isn't a unix timestamp</p>
php
[2]
5,392,860
5,392,861
two views orientation problem
<p>I am new to iphone development.. </p> <p>am creating one small application where two viewcontrollers like</p> <ol> <li>loginController </li> <li>updateController</li> </ol> <p>For apply orientation i created two views for each controller like for first controller these are 'landscapeLoginView' &amp; 'portraitLo...
iphone
[8]
1,873,451
1,873,452
Regarding casting
<p>I was doing a short research on type casting , below is the mine code</p> <pre><code>interface Foo {} class Alpha implements Foo {} class Beta extends Alpha {} public class Delta extends Beta { public static void main( String[] args ) { Beta x = new Beta(); Alpha a = x; ...
java
[1]
3,405,475
3,405,476
Context vs. Selector specificy in jQuery
<p>There are times when one can specify the scope in which a particular element might be found either by using a hierarchical selector, ie:</p> <pre><code>$('#someParent .someChildren') </code></pre> <p>...or by using context, ie:</p> <pre><code>$('.someChildren', $('#someParent')) </code></pre> <p>I know there are...
jquery
[5]
1,653,782
1,653,783
Image splitting into 9 pieces
<p>My Code:</p> <pre><code> private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { ngr.Dispose(); List&lt;Image&gt; list = new List&lt;Image&gt;(); Graphics g = Graphics.FromImage(pictureBox1.Image); Brush redBrush = new SolidBrush(Color.Red); ...
c#
[0]
2,654,665
2,654,666
delay the execution of a js function
<p>I wrote a function to display an image in the center of the box. However, when the image is loaded, it comes with some default style including position information. Calling the center image function is essentially happening at the same time as image loading, but it finishes before image is fully loaded. This cause t...
javascript
[3]
3,400,761
3,400,762
Get the row that has been clicked in the gridview
<p>I have added OnClick event dynamically for gridview.So when I click on any of the row on grid view, the event is fired but I can't get which row is clicked. This is the code where I add event.</p> <pre><code>protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { e.Row.Attributes["OnClick...
asp.net
[9]
1,444,522
1,444,523
What is the purpose of NSNotification
<p>i am new Notification.what is the purpose of it... can we use [[NSNotificationCenter defaultCenter] addObserver without postNotification, If we can do it,how it is identified?what is the relationship between addObserver and postNotification?any one can explain in detail?</p>
iphone
[8]
1,685,284
1,685,285
NSURLConnection sends incomplete string
<p>How can i check whether NSURLConnection is sending the whole request string to the webserver or not? I am calling one webservice in which length of request string varies. When i send small request string, the webservice is working fine. But when the request string length is long, the webservice is not giving me p...
iphone
[8]
4,977,811
4,977,812
Php code inside html or html inside php?
<p>I am writing code in php but, i am confuse in following coding styles:</p> <pre><code>&lt;html&gt; &lt;head&gt;&lt;/head&gt; &lt;body&gt; &lt;?php echo 'Hello World'; ?&gt; &lt;div&gt;This is another&lt;/div&gt; &lt;?php echo 'hello again'; ?&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>OR...
php
[2]
5,732,554
5,732,555
Is there any free software for Android that can send my geolocation to a web service?
<p>Is there any free software for Android that can send my mobile phone's geolocation information to a Google map or to my own URL?</p>
android
[4]
5,482,628
5,482,629
PHP functions added since version
<p>Is there a resource that allows me to see the PHP functions added/changed since a certain version release?</p>
php
[2]
1,677,644
1,677,645
Access the SD card files from Android application
<p>I have the following requirement</p> <p>1> When the user clicks on the button , the SD card should be accessible to the user.</p> <p>2> The user clicks on a specific image &amp; I need to save the SD card path of the image selected</p> <p>3> I need to resize the image before displaying that to the user within the...
android
[4]
3,171,673
3,171,674
Redefinition of constructor with inheritance
<p>Why in the underlying example keeps the compiler complaining about a redefinition for the B constructor. If i remove the {} it complains they need to be there. How is this done correctly? I want to implement the constructor of B in the CPP file and not inline.</p> <pre><code>#include &lt;vector&gt; #include &lt;sst...
c++
[6]
3,456,986
3,456,987
Determine if a function is available in a Python module
<p>I am working on some Python socket code that's using the <a href="http://docs.python.org/library/socket.html#socket.fromfd" rel="nofollow"><code>socket.fromfd()</code></a> function.</p> <p>However, this method is not available on all platforms, so I am writing some fallback code in the case that the method is not d...
python
[7]
4,050,958
4,050,959
c++ pointer to a reference
<p>Is it legal to have a pointer of a reference in C++? </p> <p>For example:</p> <pre><code>int &amp;ref = array[idx]; func(&amp;ref); </code></pre> <p>One reason I can think of why you might want to do this if func() already exists in a library which you can't change.</p>
c++
[6]
3,732,223
3,732,224
Null pointer exception on .iterator() call
<p>I'm getting a strange NullPointerException, evidently thrown by the following line of code:</p> <pre><code>Iterator&lt;Note&gt; it = notes.iterator(); </code></pre> <p>I've checked, and at the time the java.util.TreeSet <code>notes</code> is always non-null (with 15 elements). The TreeSet API says nothing about <c...
java
[1]
470,902
470,903
Showing color selected from an image on touch event in an overlay
<p>I want to display the color selected on touch of an image in an enlarged baloon just above the touch point . Similar to showing my current location in maps using itemized overlays. How can that be achieved ?</p>
android
[4]
4,217,247
4,217,248
jQuery: callback doesn't work right
<p>I'm new to jQuery so forgive me (and correct me too please) if I say something wrong here.</p> <p>I have this code and the callback is being executed right the moment the element is clicked, and not after the slideUp has finished:</p> <pre><code>$('.close-button').click(function(){ $('.click-menu div').slideUp...
jquery
[5]
1,020,448
1,020,449
Regular expression with javascript
<p>I have following code in java script</p> <pre><code> var regexp = /\$[A-Z]+[0-9]+/g; for (var i = 0; i &lt; 6; i++) { if (regexp.test("$A1")) { console.log("Matched"); } else { console.log("Unmatched"); } } </code></pre> <p>Please run it on your br...
javascript
[3]
2,453,949
2,453,950
C# .Any() used to check for an already existing element on a single dimensional list
<p>I'm seeing a lot of examples of .Any() used with custom defined lists. I have a list that only contains values and no keys. How can I make use of Any() with a single dimensional list. </p> <p>Here's how far I have gotten already:</p> <pre><code> List&lt;string&gt; thread_pause = null; if (th...
c#
[0]
1,598,022
1,598,023
Passing property as parameter in method
<p>I know the title could probably be a bit more descriptive/better phrased, but it was the best I could come up with. </p> <p>Currently I have a class with a lot of methods looking like the ones below:</p> <pre><code> private static void UpdateArtists() { artists.Clear(); forea...
c#
[0]
4,837,165
4,837,166
C# datatable, duplicate data
<p>For testing I would like to expand my result set. I have a <code>DataTable dt</code> that has 7 or so results. I would like to do something like:</p> <p><code>dt.Rows.Add(dt);</code> a few times, just to make the data set larger.</p> <p>I also tried <code>dt.Rows.Add(dt.Rows[0]);</code></p> <p>The first gave an e...
c#
[0]
939,781
939,782
Jquery fadein/fadeout list
<p>I have a list:</p> <pre><code>&lt;ul class="list"&gt; &lt;li&gt;1&lt;/li&gt; &lt;li&gt;2&lt;/li&gt; &lt;li&gt;3&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>I need to fadein/fadeout all this <code>&lt;li&gt;</code> items. I need a loop, so when the last one appears and disappears, the first appears next.</p>
jquery
[5]
596,537
596,538
developer toolkits
<p>I'm coming from .Net where there are UI toolkits for the desktop, web, etc. like Telerik and Infragistics that have lots of pre-built tools. Are there similar, pre-built widgets for Android Development? I see lots of cool Android Apps and I would like to use some of the same widgets without having to create my own...
android
[4]
2,058,918
2,058,919
Location tracking in background in android
<p>I am working on an application which fetch the location details in a periodic manner.. i have tried service and broadcastreciever but failed to achieve the location details in particular time frame say 30mins or so.. can any help or suggest me some thing through which i can achieve the location details again and aga...
android
[4]
1,399,030
1,399,031
Store private data on external storage
<p>I need that the files generated by my application don't be accessible by others applications. The problem is that these files are multimedia files (photos, videos, audios ...) and are too large to be stored in the internal memory. Encrypt is not an option because the cost of memory for display in galleries or play w...
android
[4]
4,943,301
4,943,302
Android updating a database
<p>I there a way I can set up my app so that things like the database and images can be optionally downloaded/updated when when I make changes to the data, without updating the app. i.e. a kind of syncing with the new data?</p> <p>I would have the database and images on my server and the user can update or not without...
android
[4]
2,092,047
2,092,048
Javascript with IPC like features?
<p>This isn't exactly what I'm doing but its close enough.</p> <p>Lets say I want to implement something simple. Like a todo list that stored serverside. Lets say it is also popular and i'm worried a bit about people will have 200+ items.</p> <p>I want to be able to reorder items. I know how to reorder in javascript ...
javascript
[3]
3,770,701
3,770,702
new ArrayList<Integer>(); giving a syntax error in Java
<p>I am trying to run the following code that I found marked as correct on StackOverflow:</p> <p><a href="http://stackoverflow.com/questions/1073919/how-to-convert-int-into-listinteger-in-java">Code on SO</a></p> <pre><code>List&lt;Integer&gt; intList = new ArrayList&lt;Integer&gt;(); for (int index = 0; index &lt; i...
java
[1]
4,772,687
4,772,688
vector<float>* causing seg fault!
<p>I have a vector of floats, defined by:</p> <pre><code>std::vector&lt;float&gt;* MyVec; </code></pre> <p>and I was filling this inside a for loop later with:</p> <pre><code>MyVec-&gt;push_back(somevalue) </code></pre> <p>and I was getting a seg fault. In order to try and find out what was going on I commented ou...
c++
[6]
2,746,917
2,746,918
how to compare 2 json in python
<p>How to compare 2 json objects in python below are the sample json.</p> <pre><code>sample_json1={ { "globalControlId": 72, "value": 0, "controlId": 2 }, { "globalControlId": 77, "value": 3, "controlId": 7 } } sample_json2={ { "globalControlId": 72, ...
python
[7]
5,540,967
5,540,968
Python logger to dictionary
<p>I am new in python...i am trying to read a python log file and make a dictionary. How will it be done with logger? </p>
python
[7]
4,648,048
4,648,049
Android: GameGuardian doesn't find the values of my app?
<p>I've created a simple app, with a button and a TextView. My value starts at 100 and is stored in an integer variable. When you press the button the value decreases by 1 and the TextView is updated.</p> <p>I installed the application on my phone and tried to find the value with GameGuardian... Fortunately for others...
android
[4]
3,546,814
3,546,815
jQuery check number of instance
<p>So I guess this is mostly that I don't know how to word this to Google it, but basically I'm trying to build a menu that uses a different hover background color for each menu item. I have this so far:</p> <pre><code>$(function() { $('li').hover(function() { $(this).animate({backgroundColor:'#f00'},200)...
jquery
[5]
4,500,562
4,500,563
Cross browser JavaScript (not jQuery...) scroll to top animation
<p>I'm looking for a simple, cross-browser "scroll to top" animation I can apply to a link. I don't want to require a JS library such as jQuery/Moo, etc.</p> <pre><code>// jQuery Equivilant to convert to pure JS... $('html, body').animate({scrollTop:0}, 400); </code></pre> <p>I'm a perfect case for someone who should...
javascript
[3]
3,004,976
3,004,977
Javascript anonymous function argument passing (wrox professionnal javascript p188)
<p>Wrox Profesionnal Javascript p188 I don't understand this part at line 8 where the anonymous function already have an argument of num, but how can (i) is copied into the argument num. Normally a function would stop at the closing bracket }, adding (i) doesn't make sense for me.</p> <pre><code>function createFunctio...
javascript
[3]
5,056,311
5,056,312
What is the proper way to suggest features to be added to the C# language?
<p>What is the proper way to suggest features to be added to the C# language?</p> <p>For example, I would like to have an operator similar to <code>??</code> but for selecting the min or max values.</p> <p>I'd like <code>a &lt;? b</code> to expand to <code>a &lt; b ? a : b</code> likewise for <code>&gt;?</code></p>
c#
[0]
3,823,579
3,823,580
Recursively find the most recent file from each folder in folder hierarchy.
<p>I need to find the most recently created file from each folder under my root folder. The following code returns all the files from the root folder:</p> <pre><code>list&lt;string&gt; capturesList = SafeFileEnumerator.EnumerateFiles(pathToSearch, "*.pcap", SearchOption.AllDirectories).ToList(); </code></pre> <p>The ...
c#
[0]
3,158,468
3,158,469
Asp.net Textbox replacement or better design
<p>Can someone direct me to a good Textbox replacement or css design for the standart one. I think the regular one is boring but functioning well. I just need to make it look nicer.</p> <p>Thanks.</p>
asp.net
[9]
4,732,263
4,732,264
Python elements retrieved from container (list, dict, tuple etc) passed by reference or value?
<p>I have a function that updates data in a cache (implemented as a dictionary).</p> <pre><code>def updateCache(name, new_data): global cache info = cache[name] # is this being passed to me as a val or ref? datarows = info['datarows'] datarows.append(new_data) # These will not be necessary if I w...
python
[7]
1,199,954
1,199,955
Fire jquery script on first page load, and then never again for that user?
<p>I'm using this jQuery Modal Window script on my site: <a href="http://www.zurb.com/playground/reveal-modal-plugin" rel="nofollow">http://www.zurb.com/playground/reveal-modal-plugin</a></p> <p>It currently activates a Modal Window when the user clicks on a link. However, I want to modify it to automatically run once...
jquery
[5]
1,282,217
1,282,218
how can i get only day as an input from user such that he don't have to specify the month and insert the date into database
<p>and this whole will be done through some javascript calender or readymade code.</p>
php
[2]
5,773,277
5,773,278
Checkbox and buttons in grid view to take the data in next column index
<p>I am using C# to build window form with checkbox and buttons inside grid view. And it has to indicate the data next to the cell. I use "INdex" but it doesn't work properly. </p>
c#
[0]