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
291,878
291,879
Question with setting variables in if statements
<p>Here is the sample:</p> <pre><code>if(($test = array('key'=&gt;true)) &amp;&amp; $test['key']){ // works } if($test = array('key'=&gt;true) &amp;&amp; $test['key']){ // does not work } </code></pre> <p>Why is the parenthesis required? My understanding is that it computes the first conditional then the seco...
php
[2]
3,881,604
3,881,605
ASP.NET page maintain State after postback with EnableViewState = false
<p>In ASP.NET webpage, I have set the EnableViewState to false to the page and all the controls of the page. Still I am getting the PostBack data in the Controls. </p> <p>Is there any way to remove this? How do we remove the page life cycle event like restore PostBackData? Actually _ViewState is maintained for all c...
asp.net
[9]
4,102,726
4,102,727
javascript event
<p>I have an interesting question, i hope..I have a textarea in my form..when a user comes to enter values in it it displays some cached values in an autocomplete format..thats fine..I want to call an ajax function after the user selects such a cached value in it..so that the ajax call should pass this selected value.....
javascript
[3]
165,816
165,817
Ics features on the previous android versions
<p>I'm a Junior Android developer. I have got a new project that have an ICS design with features like theese:</p> <p><img src="http://i.stack.imgur.com/YEHzr.jpg" alt="enter image description here"></p> <p><img src="http://i.stack.imgur.com/uj8nT.jpg" alt="enter image description here"></p> <p><img src="http://i.st...
android
[4]
4,305,894
4,305,895
JQuery - How to fix mouseover and mouseleave auto loop a lot of times?
<p>When I faster to mouseover and leave #go in a short time, it will auto loop a lot of times. How to fix it??</p> <pre><code>$("#go").mouseover(function(){ $("#block").animate({ width: "900px" }, 300 ); }); $("#go").mouseleave(function(){ $("#block").animate({ width: "0px" }, 300 ); }); </...
jquery
[5]
5,263,614
5,263,615
php can make desktop application or only make webbase application?
<p>Hello everybody Can anybody tell me in php desktop application possible? like a software we install in our system or run is it possible? Thanks</p>
php
[2]
4,902,604
4,902,605
Command Line Speech Recognition event handler issue
<p>I have this command line software that listens for speech recognition for couple of words.</p> <p>In the main function I have this event handler:</p> <pre><code>speechRecognitionEngine.SpeechRecognized += new EventHandler&lt;SpeechRecognizedEventArgs&gt;(engine_SpeechRecognized); </code></pre> <p>and the f...
c#
[0]
5,071,615
5,071,616
How to set tab in the bottom of the display in android?
<p>I want to set one tab in the center bottom of the display.</p>
android
[4]
5,965,456
5,965,457
Using object's method as callback function for $.post
<pre><code>$.Comment = function() { this.alertme = "Alert!"; } $.Comment.prototype.send = function() { var self = this; $.post( self.url, { 'somedata' : self.somedata }, function(data, self) { self.callback(data); } ); } $.Comment.prototype.callback = function(data) { aler...
jquery
[5]
394,626
394,627
What's the correct way to save state of an Activity
<p>I have an Activity, which contains a bunch of check boxes and a submit button.</p> <p>When the submit button is clicked, the activity will exit (finish() will be called). Before the activity exits, I want to save the states of the check boxes in the activity, so when the activity starts again, the check boxes can s...
android
[4]
2,765,458
2,765,459
array of strings as property in C#
<p>Consider the code below,</p> <pre><code>private void Convert_Click(Object sender, RoutedEventArgs e) { string[] strCmdLineParams = { "str1", "str2", "str3" }; FormatterUI format = new FormatterUI(); format.CmdLineParams = strCmdLineParams; format.ExecuteRequest(); } public ...
c#
[0]
809,209
809,210
Embedding Inline image in email body
<p>In my application i have to send image in body not as an attachment. I have spent more than one week and found no success. I have implemented same via Java mail API. But need to implement with intent. What i have tried is:</p> <pre><code>Spanned emailText11 = Html.fromHtml("&lt;body&gt;&lt;p&gt;&lt;img src=\"http...
android
[4]
1,760,378
1,760,379
How to save a python script directly from python shell?
<p>Currently, I am working on python interactive shell version 6. When i start python shell, i use to code some line. but i don't know how to store what i code. So, is there any command or or keyword to save my session on python shell as like .py </p>
python
[7]
377,592
377,593
Php don't print if line begins with
<p>I have the below code which prints out lines of text as long as the lines aren't empty:</p> <pre><code>$textChunk = wordwrap($value, 35, "\n"); foreach(explode("\n", $textChunk) as $textLine) { if ($textLine!=='') { $page-&gt;drawText(strip_tags(ltrim($textLine)), 75, $line, 'UT...
php
[2]
5,343,362
5,343,363
Is there default properties file to put configurations into?
<p>Any default properties file which java can automatcially load?</p>
java
[1]
139,291
139,292
How is Set.toString() implemented?
<p>The <code>toString</code> method is not overridden in <code>Set</code> or its hierarchy, so how are the elements printed?</p> <pre><code>import java.lang.Math; import java.util.HashSet; class Hello{ public String name= ""; Hello(String name){ this.name = name; } public static void main(String args[]){...
java
[1]
1,116,212
1,116,213
converting double/floating to integer in C#
<p>My question might looks like silly, but i struck with it. I have a string value "155.300" and i want to convert it to integer. I tryed but throwing System.FormatException....pls someone help me out. </p>
c#
[0]
1,794,016
1,794,017
Google Autocomplete service for places (cities, countries, not establishment such as business)
<p>I need to offer in my application the ability to predict (auto suggest) places, as user typing. I know that Google have such service. The issue is, Google Autocomplete service predict places (business) while I need to autocomplete, places, such as cities, countries (not establishment such as business). Does Google o...
android
[4]
1,110,036
1,110,037
How to use AsyncTask manager with this code?
<p>I have this code and i would like to use asyncTask manager with this to let the user know something is happening. How would i allow this to happen with this snippet of code. i cant seem to figure it out. I know the asyncTask will be better than using a Hanlder. Or would it? But anyway here is an example. if anyone c...
android
[4]
1,957,459
1,957,460
String Concatentation
<p>I have the following code and the return is confusing me. I am new to java and not exactly sure why it is returning the way it is. Any help would be great.</p> <p>When the data has <code>PE846</code> and <code>A846</code> it returns <code>engine</code>, <code>ambo</code> and <code>engineambo</code>. I'm looking to...
java
[1]
389,409
389,410
jQuery function has to repeat to work
<p>I'm just getting into jQuery and notice strange behavior in the way some of my code is executed. When I execute a function based on a click action, the function runs twice, the first time with an "undefined" value for the click and the second with the expected value. The end result is the code "works" but I want to ...
jquery
[5]
5,798,275
5,798,276
problem with printf() function
<p>i have the variable $a = 5; i want to show it in binary form, with length, equal 8, with writing * at white spaces, just like this, like this * * * * *101</p> <hr> <p>here the script</p> <pre><code>$number = 5; printf("%*8b", $number); </code></pre> <p>it doesn't work with *, but if "0"-s it works</p> <pre><c...
php
[2]
2,357,840
2,357,841
Converting 'const char [6]' to 'WCHAR**
<p>I am new to C++, can someone please help me solve this error: cannot convert <code>'const char [6]'</code> to <code>'WCHAR** {aka wchar_t**}'</code></p> <p>My code is as follows:</p> <pre><code>const char name[] = "madz"; void method1(LPCWSTR lpServer, LPWSTR* lpNameBuffer, PNETSETUP_JOIN_STATUS Buff...
c++
[6]
4,426,015
4,426,016
Which is more efficient in Python: standard imports or contextual imports?
<p>I apologize in advance if this question seems remedial.</p> <p>Which would be considered more efficient in Python:</p> <p><strong>Standard import</strong></p> <pre><code>import logging try: ...some code... exception Exception, e: logging.error(e) </code></pre> <p>...or...</p> <p><strong>Contextual import</...
python
[7]
4,923,032
4,923,033
name = "this or that" in jQuery?
<p>I have this code:</p> <pre><code>$("input[name=foo]:checked,input[name=bar]:checked") </code></pre> <p>but I would like to make it smaller with something like:</p> <pre><code>$("input[name=foo|bar]:checked") </code></pre> <p>Is there anything like that?</p>
jquery
[5]
3,927,175
3,927,176
Hide element if mouse is not over it for a certain period of time
<p>I have a dropdown menu which gets fired when mouse moves over a specific link. I want that dropdown menu to fade out if the mouse is away from the dropdown for a specific period of time?</p> <p>Is it possible?</p> <p>This is my jQuery for opening the dropdown menu:</p> <pre><code>$('.cartpopup').css({'display':'n...
jquery
[5]
2,271,452
2,271,453
android adb won't start
<p>I can't get the adb to run. From the dos line when I type adb I get "error: write failure during connection. I'm running Motodev's eclipse (probably Ganymede or Galileo) on windows XP. I've reinstalled eclipse and android three times from an administrator's account, and I've removed all virus software from the compu...
android
[4]
4,628,215
4,628,216
Personal preference on online data
<p>Thanks in advance to all. I have a pretty good grip on basic android, and I want to start incorporating databases and online storage in my app. I want to host a simple online file/server/database (not to sure the terms) with six movie titles each with a title, image, and show times. I am not looking for code as muc...
android
[4]
3,905,215
3,905,216
What does !!~ do?
<p>I was reading <a href="http://robertpitt.me/2012/09/5-tips-for-nodejs-in-production-mode/">this blog post</a> which mentioned using:</p> <pre><code>!!~ </code></pre> <p>I have no idea what this does? at first I thought it would give an error, but the code below does run:</p> <pre><code>var _sessions = [ "_SI...
javascript
[3]
661,388
661,389
How to add a column to a two dimensional array
<p>I have data in a two dimensional array with n rows and p columns.</p> <p>For example:</p> <pre><code>vector&lt;vector&lt;int&gt; &gt; dynamicArray(ROWS, vector&lt;int&gt;(COLUMNS)); for(int i = 0;i &lt; dynamicArray.size();++i){ for(int j = 0;j &lt; dynamicArray[i].size();++j){ dynamicArray[i][j]...
c++
[6]
5,489,441
5,489,442
Calling a method asynchronously
<p>I have a method named <code>X()</code>. I need to call that method asynchronously. Can anyone give sample code for this?</p>
c#
[0]
5,307,479
5,307,480
is_int and GET or POST
<p>Why does <code>is_int</code> always return false in the following situation?</p> <pre><code>echo $_GET['id']; //3 if(is_int($_GET['id'])) echo 'int'; //not executed </code></pre>
php
[2]
3,777,041
3,777,042
Function not being called
<p>I'm trying to test some jQuery in <a href="http://jsfiddle.net/adrianjsfiddlenetuser/WhKqZ/" rel="nofollow">this fiddle</a>:</p> <pre><code>&lt;div id="myDiv"&gt;&lt;/div&gt; &lt;input name="Button3" type="button" value="Invoke" onclick="get()"&gt; </code></pre> <pre class="lang-js prettyprint-override"><code>func...
jquery
[5]
289,424
289,425
Application time setting
<p>I am creating a web application.. When a user want to register with that application Local time of that user must be registered in this application.. I tried to get the browser time to register ..It is working ..Now i want to improve this.. The user can have incorrect time in his system... SO i need a solution to so...
asp.net
[9]
4,654,018
4,654,019
jQuery IE7 / IE8: Prevent change event triggering on Enter
<p>Here is sample code:</p> <p><a href="http://jsfiddle.net/BSjGX/1/" rel="nofollow">http://jsfiddle.net/BSjGX/1/</a></p> <pre><code>&lt;input id="testing" /&gt; $('#testing') .keydown(function(e){ if(e.keyCode==13) {return false;} }) .change(function(){ $('body').append('&lt;br /&gt;chan...
jquery
[5]
1,357,355
1,357,356
Get the value of id from spans inside a div using jquery
<p>I want to get the id value from the spans.</p> <p>Thanks Jean</p>
jquery
[5]
6,016,309
6,016,310
How to check if an object is defined?
<p>I would like to check if an object is defined or exists using C#.</p> <p>Something like this:</p> <pre><code>if (defined(Object)){ } </code></pre>
c#
[0]
3,917,393
3,917,394
I need an Arabic keyboard on iPhone without installing anything?
<p>There are already inbuilt fonts for Arabic</p> <p>I need to use Arabic keyboard - without installing any software.</p> <p>I don't want internal - keyboard.</p> <p>That is => if I change my setting to iPhone =>keyboard arab &amp; english on.</p> <p>In textField I will have option to switch on both language.</p> ...
iphone
[8]
5,290,587
5,290,588
php error log, how to remove the duplicates/find unique errors
<p>Is there a way to search the error log for only unique errors. Reason being I have a lot of duplicate errors and don't want to miss the rare ones. </p> <p>How would I go about writing a custom script which parses the error log, and filters out all of the duplicates excluding the datetime.</p>
php
[2]
1,942,831
1,942,832
Python: How do i split the file?
<p>I have this txt file which is ls -R of etc directory in a linux system. Example file: </p> <pre><code>etc: ArchiveSEL xinetd.d etc/cmm: CMM_5085.bin cmm_sel storage.cfg etc/crontabs: root etc/pam.d: ftp rsh etc/rc.d: eth.set.sh rc.sysinit etc/rc.d/init.d: cmm functions userSc...
python
[7]
66,090
66,091
How can i call NStimer form one viewcontroller from unother viewcontroller?
<p>At first time i call the timer like this in Third viewcontroller</p> <pre><code>timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(targetMethod) userInfo:nil repeats:NO]; </code></pre> <p>Then timer called the targetMethod</p> <pre><code>-(void)targetMethod { First * sVC = [[First...
iphone
[8]
1,092,143
1,092,144
Add a leading zero until the number 10
<p>I have a list of numbers up to the number 10: 1,2,3,4,5,6,7,8,9,10</p> <p>I need to put a zero in front of each number except the number 10. </p> <p>So it looks like this: 01,02,03,04,05,06,07,08,09,10</p> <p>HTML looks like this:</p> <pre><code>&lt;p class=​"number weight-400"&gt;​1&lt;/p&gt;​ &lt;p class=​"nu...
jquery
[5]
181,108
181,109
Getting the value of an item from a SelectListItem List?
<p>I have the following class:</p> <pre><code>public static IEnumerable&lt;SelectListItem&gt; GetDatastore() { return new[] { new SelectListItem { Value = "DEV", Text = "Development" }, new SelectListItem { Value = "DC1", Text = "Production" }, }; } </code></pre> <p>What I...
c#
[0]
1,123,071
1,123,072
A easier or better way of doing this?
<p>I'm currenty working on a website (which consists of cms with a forum), and I'm wanting to give each user points for doing specific tasks (++ everytime), which should eventually give them a rank.</p> <p>E.g. if the user did a post they'd get 5 points, if the user submitted a thread/topic they'd get 20 points and so...
php
[2]
2,086,922
2,086,923
Shortest Program in c++
<p>I came across this code recently that compiles, but runs with segmentation fault(g++). Here's the original link from topcoder <a href="http://www.topcoder.com/tc?module=MemberProfile&amp;cr=22689214&amp;tab=alg" rel="nofollow">topcoder profile</a></p> <pre><code>#include &lt;iostream&gt; int main = ( std::cout &lt...
c++
[6]
2,141,157
2,141,158
What is wrong with my attempt to do a string replace operation in Python?
<p>What am I doing wrong here?</p> <pre><code>import re x = "The sky is red" r = re.compile ("red") y = r.sub(x, "blue") print x # Prints "The sky is red" print y # Prints "blue" </code></pre> <p>How do i get it to print "The sky is blue"?</p>
python
[7]
2,268,948
2,268,949
Use of => in PHP
<p>What does this mean in PHP and when is the time to use it?</p> <pre><code> =&gt; </code></pre> <p>Another example.</p> <pre><code> foreach ($parent as $task_id =&gt; $todo) </code></pre>
php
[2]
5,357,145
5,357,146
C# Converting ListBox to String then Aggregate
<p>I have a listbox being populated from a combo box. What i need to do is string all the contents of the listbox together and then Aggregate it.</p> <pre><code>string cols = listbox1.items.Aggregate((f, s) =&gt; f.value + "," + s.value); </code></pre> <p>doesnt work.</p>
c#
[0]
2,982,924
2,982,925
Detect the specific element and scroll to vertically down
<p>I have an item page and each item has an "image link", hovering mouse over image link a tool tip is shown describing the item. My page is scrollable that indicates good amount of items are viewed. My problem is when I am at the bottom of the page, and put mouse over the "image Link" the tool-tip is not fully shown [...
javascript
[3]
4,327,724
4,327,725
Special Characters Validation
<p>I have a JQuery code like this:</p> <pre><code>// Validation to avoid non alphanumeric characters from being typed function alphanumeric(eventSource) { var numaric = eventSource.val(); for (var j = 0; j &lt; numaric.length; j++) { var alphaa = numaric.charAt(j); var hh = alphaa.charCodeAt(0)...
jquery
[5]
4,216,594
4,216,595
context menu in asp.net
<p>HOw can i create a contextmenu for asp.net application.i want to display the contextmenu when i right click on a listbox.Please help me.</p>
asp.net
[9]
1,928,268
1,928,269
code for desing and implement an registration form in asp.net
<p>i need the code for desing and implement the registeration form </p>
asp.net
[9]
3,405,931
3,405,932
Python wildcard search in string
<p>Lets say that I have a list </p> <pre><code>list = ['this','is','just','a','test'] </code></pre> <p>how can I have a user do a wildcard search?</p> <p>Search Word: 'th_s'</p> <p>Would return 'this'</p>
python
[7]
4,039,516
4,039,517
How do I send an array using jQuery and the .ajax method without escaping the brackets?
<p>I am trying to send the same parameter name with multiple destinations, but even after reading the posts on SO can't figure out how to do it...i want to have multiple destination_input:</p> <pre><code>var myObject = { search_zip: params.search_zip, search_distance: params.search_...
jquery
[5]
2,617,739
2,617,740
How to find all img tags on a string?
<p>I want to find all img tags in a string of text and put a surrounding link - a tag around it. What's the best way to do it? And I want to retrieve the src link and put in the href attribute. </p> <p>By the way I'm doing it in C# but the way should be similar in every language. Has anybody done such filtering and re...
c#
[0]
1,542,218
1,542,219
How do I install Python packages on Windows?
<p>I'm having a hard time setting up python packages. EasyInstall from <a href="http://pypi.python.org/pypi/setuptools">SetupTools</a> is supposed to help that, but they don't have an executable for Python 2.6.</p> <p>For instance to install Mechanize, I'm just supposed to put the Mechanize folder in C:\Python24\Lib\s...
python
[7]
4,346,286
4,346,287
ValueError in Python
<pre><code>Traceback (most recent call last): File "filter_import.py", line 77, in &lt;module&gt; get(sys.argv[1]) File "filter_import.py", line 35, in get timestamp, ip, hash_value = lines.split() ValueError: need more than 2 values to unpack </code></pre> <p>I got this error message when I ru...
python
[7]
5,114,066
5,114,067
Storing 'struct' data to binary file
<p>I need to store a binary file with a 12 byte header composed of 4 fields. They are namely: sSamples (4-bytes integer), sSampPeriod (4-bytes integer), sSampSize (2-bytes integer), and finally sParmKind (2-bytes integer). I'm using 'struct' to my variables to the desired fields. Now that I have them defined separately...
python
[7]
5,322,918
5,322,919
Play music in queue through Av player
<p>Please suggest me play music in queue. Actually I have array of songs url from web. I success to play the songs through AV player on clik of songs cell. I want to play songs automatically one be one like in queue.please help me how can do this only av player...</p> <p>Thanks..........</p>
iphone
[8]
3,041,311
3,041,312
android detecting touch
<p>I have a webview, and a touch listener on the viewContainer. What I want is, when a touch is detected lights out mode is on, and also if that touch is on a clickable area over webview that click must do his work.</p> <p>Now touchlistener just not working over my webview.</p> <p>Here is my similar question, which i...
android
[4]
747,542
747,543
Where would I get Microsoft Chart Control sample codes?
<p>Can anyone please tell me where would I get Microsoft Chart Control sample codes ? Link will be sufficient.</p>
asp.net
[9]
1,151,257
1,151,258
android how to handle out of memory exception
<p>HI in my application i have photos videos etc, in the case of image i done the scaling ,but i get out of memory exception in sometimes, how can i handle the out of memory exception efficently.</p>
android
[4]
1,953,130
1,953,131
List<T> defined as member of class
<p>I have a list where i want the type to be definined by the call for example in the class i want something like</p> <pre><code>public class ClassName { public ListType&lt;T&gt; ListName { get; set; } // other class items } </code></pre> <p>and then the usage to be what sets the class type like</p> <pre><co...
c#
[0]
5,902,605
5,902,606
What difference does it makes when I use '' against ""?
<p>What difference does it makes when I use <code>''</code> against <code>""</code> ?</p> <p>For example:</p> <pre><code>$example = 'Merry Christmas in Advance'; $eg = "Merry Christmas"; echo "$example"; echo '$example'; echo "$eg"; echo '$eg'; </code></pre> <p>What would the output for each echo statements and ...
php
[2]
5,808,120
5,808,121
Set alarm using android manager?
<p>OK... my app needs to be set off a few times a week depending what days the user picks. I know you can use datapicker. Is there anyway that i can auto add one date on to todays date as in today is 19/04/2011 is there any way i can go +1 and it bring it up to 20/4/2011?</p>
android
[4]
1,342,436
1,342,437
killProcess can be used in some cases?
<p>I have a logout button in my activity. In my case the killProcess do what I want to do instead of the finish(), but is it a good idea to use killProcess? I have read that is better not to use killProcess but in some cases seems to be useful. </p>
android
[4]
154,810
154,811
twitter connectivity via iphone application
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3642129/send-images-to-twitter-through-code">Send images to twitter through code</a> </p> </blockquote> <p>I have to upload text and image on twitter via my iphone application. I couldnt find sample code or ...
iphone
[8]
3,811,164
3,811,165
The Java Web Translator library
<p>please ,can you help me for using of this library"The Java Web Translator library" in my applicatin ,or give me an example; how i can use it in my code java? I have seen the google api translator but i chose JWT because it's provides automatic language translation to the client's locale. Thank's in advance</p>
java
[1]
2,318,421
2,318,422
How to stop the media player on a service?
<p>I have a media player inside a service which would play a beep at particular time for some seconds..</p> <p>I want to stop it from a new activity that is launched from the service..Whether it is possible?</p> <p>Whether I can reference the object for mediaplayer I have created and stop it?How to reference an objec...
android
[4]
1,037,199
1,037,200
Javascript, Intellisense and compiler notification
<p>Being a C# developer, I cannot grasp why in the world one would spend time designing a perfect class in javascript, when you can't get any editor today with intellisense that will fully show you your class rules. There is only one way to maintain a well designed class in JS by documenting everything, and requiring a...
javascript
[3]
3,193,257
3,193,258
C++ whats the difference between uint64 and *uint64?
<p>Why does:</p> <pre><code>const char example; </code></pre> <p><code>(uint64*)example</code> have a value of 140734799798420</p> <p>and</p> <p><code>*(uint64*)example</code> have a value of 7004431430466964258</p> <p>p.s. dont worry about the type cast, I am interested why the second <code>*</code> increases the...
c++
[6]
5,320,399
5,320,400
Uncaught ReferenceError: Class is not defined?
<p>I'm curious to know why I'm getting this error? I've copied it exact from the website beezid.com (carousel.js) file, and I'm trying to get the same slide as them onto my website to update it.. As you can see I'm having issues with this?? Their site doesn't come up with this error? >></p> <p>Carousel = Class.create(...
javascript
[3]
3,064,514
3,064,515
Adding behavior to a function in JavaScript?
<p>Say I am writing a web-app, and I'd like to add certain behavior to a function after it has been declared in multiple places without overriding the old behaviors of the function.</p> <p>Here is some simplified code (notice the <strong>window.onmousedown</strong> function</p> <pre><code>var createMenu = function(){...
javascript
[3]
1,544,371
1,544,372
how to hook UIView's animation?
<p>I want to send my own message during UIView's animation process. For example:</p> <pre><code>myView.alpha = 1.0; [UIView animateWithDuration:2.0f animations:^{myView.alpha = 0.0;} completion:^(BOOL isFinished){}]; </code></pre> <p>I want to send the message when iOS render the specific alpha's animation frame.</p...
iphone
[8]
3,407,555
3,407,556
class with changing parameters
<p>I want to define a Python class that accepts different variables as input. However I only want to declare one of them when calling the class, because the variables determine each other and in different situations I have different inputs at hand. So it should be something like a class price that I call as:</p> <pre>...
python
[7]
1,922,008
1,922,009
Unable to get property 'mouse' of undefined or null
<p>What is this error :</p> <blockquote> <p>Line: 15 Error: Unable to get property 'mouse' of undefined or null reference</p> </blockquote> <p>When I run my asp.net mvc application with IE it occurs, but no problem with firefox.</p>
javascript
[3]
583,435
583,436
J query scroller asp.net
<p>I have to make a jquery scroller as given in <a href="http://www.isango.com/" rel="nofollow">http://www.isango.com/</a>. Look at the bottom of the site. Please Help me making this. </p> <p>Any help will be appreciated. Thanks</p>
jquery
[5]
4,935,061
4,935,062
recursion cannot get this right
<p>We have triangle made of blocks. The topmost row has 1 block, the next row down has 2 blocks, the next row has 3 blocks, and so on. Compute recursively (no loops or multiplication) the total number of blocks in such a triangle with the given number of rows. </p> <pre><code>triangle(0) → 0 triangle(1) → 1 triangle(2...
java
[1]
4,597,394
4,597,395
Get Output from my process
<p>I am querying the version of sql server using sqlcmd (from my app) and would like to display the info, say, on a rich text box, how do i go about it, here's the code:</p> <pre><code> Process proc = new Process(); proc.StartInfo.UseShellExecute = false; proc.StartInfo.RedirectStandardOutput = ...
c#
[0]
4,925,794
4,925,795
how to get difference in year where dates are in yyyy-mm-dd?
<p>i want to get the difference between two dates which are give in yyyy-mm-dd format difference should be in year. </p> <pre><code> var ds='2002-09-23'; var today_date = new Date(); alert(today_date); Date.prototype.yyyymmdd = function() { var mm = (this.getMonth()+1).toS...
javascript
[3]
2,118,319
2,118,320
Why are my imovies imported from iphoto sometimes sideways, upside down?
<p>I finally figured out how to get my movies from my iphone to imovies - thank you - but now sometimes they are upside down or sideways in the big viewing screen top right. How do I correct this?</p>
iphone
[8]
4,534,814
4,534,815
detail disclosure indicator on UIButton
<p>Is there a simple way to place a detail disclosure icon on a UIButton? I'm using a navigation controller and I want a button press to push a new view on the stack, so I thought a detail disclosure icon would be appropriate, but I haven't found a straightforward way to do that yet.</p> <p>What I have in mind is some...
iphone
[8]
5,042,226
5,042,227
Unknown server tag 'FCKeditorV2:FCKeditor
<p>So i`m getting an unknown server tag for FCKeditor in my aspx page. <a href="http://pastebin.com/SvQfXCd3" rel="nofollow">Here is the link to the source code </a></p> <p>Among the solutions tried:</p> <p>1) <code>&lt;%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %...
asp.net
[9]
3,525,580
3,525,581
How to get data from a method and put in a ListView?
<p>I have this class:</p> <pre><code>public class Bookmark extends ArrayList&lt;Bkm&gt; { public static Bookmark getBookmark(Context context) { Bookmark bookmarks = new Bookmark (); String[] titles = context.getResources().getStringArray(R.array.bookmark_titles); String[] urls = conte...
android
[4]
5,915,420
5,915,421
PHP: is there a way to see "invisible" characters like \n
<p>Is there a way to see invisible characters like whitespace, newlines, and other non-printing characters in a manner like print_r() ?</p> <p>Reason is there is some sort of character in my array that I can't see and breaking things.</p> <pre><code>Object Object ( [name] =&gt; name [numbers] =&gt; Array ( ...
php
[2]
6,027,129
6,027,130
ASP.Net Master Pages and Contents
<p>I have tried my best to solve this but i cannot figure this out. Please could you assist me:</p> <p>I have a master page with 3 containers: </p> <p>I created my own Login page as a start page and then it redirects after successfull login to Default.aspx wich is a web content form with master as its master page. ...
asp.net
[9]
4,788,884
4,788,885
How do I include two versions of jquery on a single page ( one of them is minified )
<p>I am using this code </p> <pre><code>&lt;!-- load jQuery 1.1.3 --&gt; &lt;script type="text/javascript" src="http://example.com/jquery-1.1.3.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var jQuery_1_1_3 = $.noConflict(true); &lt;/script&gt; &lt;!-- load jQuery 1.3.2 --&gt; &lt;script type="text/jav...
jquery
[5]
2,373,693
2,373,694
Why do these custom fonts crash my Android application?
<p>My Android application was running correctly in versions 2.1, 2.2 and up to 3. The app crashes in 4.0 and 4.1 because of a custom font. How can this get resolved?</p> <pre><code> Typeface font2 = Typeface.createFromAsset(getAssets(), "fonts/Helvitica.ttf"); TextView customText1 = (TextView)findViewById...
android
[4]
1,733,111
1,733,112
Java Question mark inside println()
<p>I'm trying to make a program that solves equations, i want the answer to be displayed in the right way, if the number is negative, to display -x and not +-x, for example, Eq1: 4x-3 and not 4x+-3, but when it is positive to display 4x+3. I can't use the plus sign inside the quotations. I wanted to use the ? : operato...
java
[1]
4,142,277
4,142,278
Swap Image from jpg to swf
<p>Is there a javascript function to swap a still image(jpg) to a movie(swf)? If there is is there a disjointed swap image path?</p>
javascript
[3]
1,016,905
1,016,906
how to implement web page mirror with jQuery?
<p>Put all contents on another web page into a fixed size div.</p> <p>How to achieve this?</p>
jquery
[5]
4,397,615
4,397,616
Zoom interference with move Android
<p>My specification requires me to use two fingers for both scroll and zoom movement.(ie) Pinch gesture for zooming up the canvas and simple two finger swipe for movement.However these two events interfere with each other.I tried modified the code to use single finger ( ie without using event.getPointerCount()==2) and ...
android
[4]
4,626,302
4,626,303
Jquery to accept both negative and nonnegative values
<p>I have tried this. This accepts only integers. I want both negative and non negative.</p> <pre><code> $(function () { $('.spinner').keyup(function () { if (this.value.match(/[^0-9]/g)) { this.value = this.value.replace(/[^0-9]/g, ''); } }); }); </code><...
jquery
[5]
321,651
321,652
the js immediate function exec sequence
<pre><code>var Gadget = function () { // static variable/property var counter = 0; // returning the new implementation // of the constructor return function () { console.log(counter += 1); }; }(); // execute immediately var g1 = new Gadget(); // logs 1 var g2 = new Gadget(); // logs 2 v...
javascript
[3]
5,277,838
5,277,839
Android app-sounds
<p>Why do i get error while loading sound file into res? i used a valid name for the sound, didnt use any key or reserved words.</p>
android
[4]
3,465,706
3,465,707
how can i change text of TextView in ListView when we click the Button?
<p><strong>I have a ListView with a Button and a TextView and i want to change text of TextView when i click in Button. I handle the click and when i click the Button <code>android:onClick="myClickHandler"</code> i change the text value of TextView but the problem is when i scroll the ListView i found the same text in ...
android
[4]
5,759,432
5,759,433
Better data structure to handle this array
<p>I have an array of data get from the server(ordered by date):</p> <p><code>[ {date:"2012-8", name:"Tokyo"}, {date:"2012-3", name:"Beijing"}, {date:"2011-10", name:"New York"} ]</code></p> <p>I'd like to :</p> <ol> <li>get the name of the first element whose date is in a given year, for example, given <code>2012</...
javascript
[3]
2,247,345
2,247,346
Retrieve date for browsed web pages in android from browser history
<p>How do I get the date on which web pages were accesed from browser history in android. I can get the url and title index, but am not able to get the date for the browsed web page from it, as Browser.SEARCHES_PROJECTION_DATE_INDEX is not giving the proper info wrt the current date. Thanks.</p>
android
[4]
5,975,063
5,975,064
jquery elementby class and set name
<p>can some one help me with code to get element by classname and also change the name </p> <p>currently ive tried</p> <pre><code>$('selected').attr("name", 'blah blah'); </code></pre> <p>and also</p> <pre><code>$('.selected').attr("name", 'blah blah'); </code></pre> <p>noneof these work thanks</p>
jquery
[5]
3,768,704
3,768,705
is there a sleep() workaround for JavaScript?
<p>So that I could use a loop, and have it pause, say 250 ms after each iteration? [ without setTimeout or setInterval?]</p> <p>Edit: Ok, so I have a for loop that uses AJAX to post data (<strong>$.ajax()</strong>) . It has lots of vars in it, like <strong>data: 'uid=' + <em>uid</em>, + '&amp;othervars=' + <em>morev...
javascript
[3]