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
3,172,898
3,172,899
Store values into an array Android
<p>In android development, is it possible to store values into an array. I want to store id's into an array. Any help is appreciated</p>
android
[4]
1,255,618
1,255,619
How to append file after string? php
<p>Ok lets say I have a File called File.txt and it contains </p> <pre><code>Hello World !!!!! </code></pre> <p>Ok now I have it so they may Post something to add to the string But it has ot be right under the string "Hello". How would I go about doing that ? </p>
php
[2]
4,243,978
4,243,979
Android emulator Output
<p>when i am trying to run my android application at that time " <code>The application has stopped unexpactadly,Please try again</code>" and force to close application. it comes every time. can anyone try to solve this issue? thanks</p>
android
[4]
1,779,155
1,779,156
Android Activity
<p>if i create static button in one activity and use in another activity it shows error as </p> <pre><code>/********************************* 01-12 19:57:17.030: DEBUG/PhoneWindow(21860): couldn't save which view has focus because the focused view com.android.internal.policy.impl.PhoneWindow$DecorView@2f5671b8 has ...
android
[4]
4,301,578
4,301,579
DateTime constructor throws error when the values are OK
<p>This line:</p> <pre><code>new DateTime(2000, 11, 31, 10, 0, 0) </code></pre> <p>throws error: Year, Month, and Day parameters describe an un-representable DateTime.</p> <p>Why is this happening?</p>
c#
[0]
1,948,025
1,948,026
Celcius to Fahrenheit
<p>I can convert from fahrenheit to celcius, but not the other way around. I have attached the code below. Hopefully it's enough to see what is going on.</p> <pre><code> public void actionPerformed(ActionEvent arg0) { double temps = 0, temp1 = 0; String instrings; instrings = temp.ge...
java
[1]
3,123,682
3,123,683
Showing Pop up screens using JQuery Dialogue
<pre><code>&lt;html&gt; &lt;head&gt; &lt;link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="http://ajax.googleapis.com/ajax/l...
jquery
[5]
3,369,836
3,369,837
ImageView setClickable(true) ... setPressed(true) not staying pressed
<p>I've got an <code>ImageView</code> which I'm setting to <code>setImageResource(R.drawable.someStateListDrawable)</code>. Everything works fine, when it's clicked, it shows the pressed state. However, I've made it so that it <code>onClick</code>, the <code>ImageView</code> is set to "<code>setPressed(true)</code>" so...
android
[4]
5,429,503
5,429,504
Update Table or drop and recreate?
<p>Hii i have a table in which i have to insert values is only one row..so when the values are updated should i update it or drop it and recreate?SQlite Android</p>
android
[4]
2,721,773
2,721,774
Find if a number is a possible sum of two or more numbers in a given set - python
<p>The office supply store sells your favorite types of pens in packages of 5, 8 or 24 pens. Thus, it is possible, for example, to buy exactly 13 pens (with one package of 5 and a second package of 8), but it is not possible to buy exactly 11 pens, since no non-negative integer combination of 5's, 8's and 24's add up t...
python
[7]
3,381,741
3,381,742
What exactly is a JavaScript pragma?
<p>When you want a JavaScript file (or function) to be parsed in "strict mode" you can put..</p> <pre><code>"use strict"; </code></pre> <p>..in the top of your JavaScript file (or function).</p> <p>This "use strict"; is a so-called "pragma".</p> <p>My question: <strong>what exactly is a pragma?</strong> The closest...
javascript
[3]
4,991,863
4,991,864
In JavaScript is there a difference between referencing an object's variable name vs. using `this` when declaring new key:value pairs of the object?
<p>In JavaScript is there a difference between referencing a object's variable name vs. using <code>this</code> when declaring new key:value pairs of the object?</p> <pre><code> var foo = { bar: function() { foo.qux = 'value'; } }; alert(foo.qux); // undefined foo.bar(); alert(f...
javascript
[3]
5,693,901
5,693,902
'this' is undefined in jQuery custom method
<p>I have a method that I want to take some action depending on the 'checked' status of a checkbox. The 'click' event works as expected, but the 'myFunction' call in the foreach loop does not:</p> <pre><code>$(document).ready(function(){ $('#TreeView1 :checkbox') .click(HandleCheckbox); // Works fine // Go th...
jquery
[5]
4,797,341
4,797,342
Android Rest Service Engine
<p>Is there any kind of rest engine service.</p> <p>In general having REST web service and android app that will fetch from it and make some data processing and have it displayed is something that fits to common pattern.</p> <p>It would be natural to have service that could be queried over content provider or similar...
android
[4]
4,548,960
4,548,961
How to provide multilanguage support for an Android Application
<p><br> I want to develop an Android application in which I will display a menu for language selection, in which the user can select a languge . My application is supposed to be done for English and Arabic language. How to develop an application in a language other than english in Android. What are the steps I need to ...
android
[4]
1,219,145
1,219,146
how to convert hour minute and pm/m to strtotime
<p>I have a time value <code>04:30</code> <code>(h:mts am/pm)</code> pm. I want to convert this to strtotime </p> <p>Also I need to convert back from strtotime to this format <code>(h:mits am/pm)</code></p> <p>Thanks</p>
php
[2]
2,034,830
2,034,831
How to escape string in .aspx
<p>I'm trying to get this string to work, I can't escape it correctly or I'm using the wrong syntax " vs '</p> <pre><code>&lt;a href="&lt;%#string.Format("{0}?ItemRemove=true&amp;iID={1}", Page, &lt;%#Container.DataItem.Id )%&gt;"&gt;...&lt;/a&gt; </code></pre>
asp.net
[9]
4,817,321
4,817,322
C# - sorting Dictionary
<p>I have a Dictionary and I want to sort it by Person, could anyone write me how to do it? Yeah, I tried to find it in the internet, but without success :((</p> <p>Class subject has 3 parametres - name (string), family_name (string), age (int).</p> <p>And I want to sort it by for example family_name, if same then b...
c#
[0]
4,904,738
4,904,739
How to find top most Activity for a Task?
<p>I have an app where I'm running a timer event in the background checking for inactivity. When a certain amount of time has passed, I want to call the finish() method for whatever activity is currently top most for my app (task). Note, that my app can be in the background so I can't just use the top most active activ...
android
[4]
4,938,103
4,938,104
How to convert Object array to a Custom Class array?
<p>I have </p> <pre><code>public class ABSInfo { public decimal CodeCoveragePercentage { get; set; } public TestInfo TestInformation { get; set; } } </code></pre> <p>And I have an Object array say "SourceType" </p> <pre><code>public object[] SourceType { get; set; } </code></pre> <p>...
c#
[0]
1,269,259
1,269,260
Issue with javascript inheritance using function prototype
<p>I want to use inheritance concept in js, so what i did is</p> <pre><code>function myGarage(x) { var _x = x; Object.defineProperty(this, "BenZ", { get: function () { return _x; }, set: function (value) { _x = value; }, ...
javascript
[3]
2,292,866
2,292,867
Jquery Templeate, droping last item off in the each
<p>Currently I am using jquery templating with some json data, I have a couple images that I am getting and I would like to drop the last image that I am getting from my json data. Right now I have this coded ( this only a snippet of the spot I am having the problem at):</p> <pre><code> &lt;div class="a...
jquery
[5]
4,246,721
4,246,722
How to empty a line in file and write it back to the original position?
<p>I'm able to read a string from a file but I'm having trouble deleting or emptying that string. Thanks you for helping and have a great day.</p> <pre><code>#include &lt;iostream&gt; #include &lt;fstream&gt; #include &lt;map&gt; #include &lt;string&gt; #include &lt;cstdlib&gt; #include &lt;sstream&gt; using namespa...
c++
[6]
602,539
602,540
How to set always default value for first record in list view in aspx page?
<p>I have an aspx page that uses a simple form to perform a search and the results are presented in a listview.</p> <p>I have added a radio button to one of the columns and have set the value to be the records FlightNo. set always default value for first record in list view.</p> <p>What I need to do is allow the user...
asp.net
[9]
2,291,849
2,291,850
"alert" is not defined when running www.jshint.com
<p>I fixed this by simply adding <code>var alert;</code> However, is this what I should be doing to get the pesky error message to go away? Here is the fix. Here is the fail on <a href="http://www.jshint.com/reports/71017" rel="nofollow">www.jshint.com</a>.</p> <p>I'm trying to learn from the error it throws..not n...
javascript
[3]
4,702,606
4,702,607
audio engine on iPhone
<p>I want to develop a voip application for iPhone. Could you let me know how can I achieve a good voice quality? How should I start with developing a good audio engine for iPhone?</p> <p>Thanks.</p>
iphone
[8]
5,760,321
5,760,322
GridView, replace text by image in column if columns text contains %text%
<p>i have a page with gridview tables that returns the following columns from an SQL DB</p> <blockquote> <p>Device | Message |</p> <hr> <p>Server1 | This error is ping failure from server1</p> <p>Server2 | This error is DFS Backlog failure...
asp.net
[9]
5,973,357
5,973,358
What is wrong with this simple jQuery code?
<p>This is a simple jQuery code, what I want to do is hide <code>#bling</code>, but it does not</p> <pre><code>&lt;script language="javascript"&gt; $("document").ready(function() { $('#bling').hide(); }); &lt;/script&gt; &lt;div id="bling" style="background-color:#FFFF66; width:100px; height:100px;...
jquery
[5]
6,002,181
6,002,182
Generate Seqence of Numbers from ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789
<p>I need to use > ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789 , to generate n number of combinations for primary key. like for possible of single digit(A,B,...Z,1,2...9), and like via two digit (A1,A2..A9,1A..9A..ZA..Z9) and 3(AA1,A1A) ....</p> <p>Please Suggest me is better than GUID with 12Chars?</p> <p><strong>Thanks</s...
c#
[0]
2,306,866
2,306,867
Reference Javascript object from string
<p>Given data similar to:</p> <pre><code>var data = [{id: 12345, name:'my products', items:[{ size: 'XXL', sku: 'awe2345', prices:[{type: 'rrp',prices: 10.99}, {type: 'sell_price', price: 9.99}, {type:'dealer',...
javascript
[3]
3,494,012
3,494,013
NameError: name 'reload' is not defined
<p>I'm using python 3.2.2. When I write a simple program, I meet the problem.</p> <pre><code>&gt;&gt;&gt; reload(recommendations) Traceback (most recent call last): File "&lt;pyshell#6&gt;", line 1, in &lt;module&gt; reload(recommendations) NameError: name 'reload' is not defined </code></pre> <p>How should I d...
python
[7]
2,593,409
2,593,410
c# syntax help What 's coming after the constructor?
<pre><code>public Butler(IWeapon weapon): this(weapon, new Communicate()) {} </code></pre> <p>What does this(weapon, new Communicate()) mean?</p>
c#
[0]
5,189,267
5,189,268
'base' as a function parameter name in C#
<p>I am currently following Microsoft's Naming Guidelines, and so using camelCase in function parameter naming. Now suppose I would like to use the signature</p> <pre><code>public string WriteNumberInBase (int number, int base) </code></pre> <p>in some method and the compiler is complaining about the parameter name j...
c#
[0]
3,362,859
3,362,860
Importing a user subclass in PHP
<p>I've coded a small PHP engine which includes some abstract classes. The user of the engine must implement subclasses of these abstract classes, and supply their subclasses to the engine. The engine has to be able to create and manipulate instances of these subclasses, so the user can't just create an instance and pa...
php
[2]
3,975,647
3,975,648
Concurrency Testing For A Web Service Using Python
<p>I have a web service that is required to handle significant concurrent utilization and volume and I need to test it. Since the service is fairly specialized, it does not lend itself well to a typical testing framework. The test would need to simulate multiple clients concurrently posting to a URL, parsing the result...
python
[7]
2,658,031
2,658,032
Jquery select only neighbor
<p>I've got:</p> <pre><code>&lt;div class="row even"&gt; &lt;div class="more"&gt;more&lt;/div&gt; &lt;div class="body"&gt;Some additional text&lt;/div&gt; &lt;/div&gt; &lt;div class="row odd"&gt; &lt;div class="more"&gt;more&lt;/div&gt; &lt;div class="body"&gt;Anoteher text&lt;/div&gt; &lt;/div&gt; </c...
jquery
[5]
1,618,101
1,618,102
Javascript inheritance & Apply
<p>I have been looking into design patterns in Javascript and found <a href="http://tcorral.github.com/Design-Patterns-in-Javascript/Template/withoutHook/index.html" rel="nofollow">http://tcorral.github.com/Design-Patterns-in-Javascript/Template/withoutHook/index.html</a> to be a great source.</p> <p>Can anyonne expla...
javascript
[3]
5,213,314
5,213,315
What does "(void)!ptr" do?
<p>I see it when I read pugixml source code and I really don't know why it's there.</p> <pre><code>void foo(void* ptr) { (void)!ptr; // What does this line do? } </code></pre>
c++
[6]
2,528,951
2,528,952
How to pickle a empty file?
<p>I want to pickle a file that sometime's is empty. Right now its empty, but my idea is that its going to grow over time.</p> <p>How do i check if a file is "pickable" since it seems that you can not pickle a empty file?</p>
python
[7]
2,055,917
2,055,918
which function is there in android for the following java function--statement = database.createStatement(sqlStatement);?
<pre><code>public void execute(String sqlStatement) throws DBException { Statement statement; try { statement = database.createStatement(sqlStatement); statement.prepare(); statement.execute(); statement.close(); } catch (DatabaseException databaseException) { throw ...
android
[4]
4,970,991
4,970,992
how to read .ics file and add data to Google Calendar in android?
<p>I have the calendar.ics file. I have to read that file from my application and transfer the data in to Google calendar in android. I am new to android. I need some help to do this.Can anyone help me to do this? </p>
android
[4]
2,021,861
2,021,862
Android SherlockFragmentActivity - Tab
<p>I use SherlockFragmentActivity and I have:</p> <pre><code>public class TestActivity extends SherlockFragmentActivity { private static enum Tab { Test1("test1", TestOneFragment.class), Test2("test2", TestTwoFragment.class), private final String title; private final Class&lt;? ex...
android
[4]
1,481,298
1,481,299
Textarea onKeyChange not working?
<p>I'm attempting to write a very basic script using javascript. What I want to do is be able to detect whenever a textarea is modified, and then make some changes to other elements.</p> <p>This is my jsfiddle: <a href="http://jsfiddle.net/QDRHT/1/" rel="nofollow">http://jsfiddle.net/QDRHT/1/</a></p> <p>I'm attempti...
javascript
[3]
565,273
565,274
jQuery hide element, load Ajax in it, and then show element
<p>I am trying to hide an element, then replace its contents while it's hidden with an ajax <code>load()</code>, and as a callback, I would like to show that element again. Unfortunately, after the request completes, the callback is kind of ignored: the element is not shown again.</p> <p>Here's my code, hope I was cle...
jquery
[5]
5,472,793
5,472,794
Repeating while loop, until cancel
<pre><code>countries={'TW':'Taiwan','JP':'Japan','AUS':'Australia'} def add_country(): while True: new_short=raw_input('Country Name in short:') new_full=raw_input('Country Name in full:') countries[new_short]=new_full answer=raw_input('want to add more?') if answer in ('ye...
python
[7]
4,820,536
4,820,537
difference between view and widget
<p>Well this is my simple question. What is the difference between a view and a widget ? </p> <p>Thank you very much</p>
android
[4]
3,206,840
3,206,841
Sort array of objects by object param, then sort those by another param alphabetically
<p>So, I have an array of objects that I want to sort like so:</p> <pre><code>Array ( [463] =&gt; stdClass Object ( [name] =&gt; Organic 12 [total_weight] =&gt; 5 ) [340] =&gt; stdClass Object ( [name] =&gt; Organic 12b [total_weight] =&gt; 5 ) [340] =&gt; stdClass Objec...
php
[2]
4,953,585
4,953,586
Call a function after specific time period
<p>I have one function written in javascript. How can i call this function after specific time interval.Say after each one minute.</p> <pre><code>function FetchData() { } </code></pre>
javascript
[3]
4,482,576
4,482,577
How can I replace a space in a string with an underscore in C#?
<p>I have strings such as:</p> <pre><code>var abc = "Menu Link"; </code></pre> <p>Is there a simple way I can change the space to an underscore?</p>
c#
[0]
6,021,580
6,021,581
how to select input from the drives
<p>i have to write the code using simple java.i have to copy one source file to the destination file.the problem is that the user have to select the source and destination from any drives available.how to call the available drives in the java .no need of buttons thank you.</p>
java
[1]
4,568,441
4,568,442
Jquery - How list id elements contained from a div
<p>If I have a div like this:</p> <pre><code>&lt;div id="box"&gt; &lt;div class="but" id="1"&gt;Text 1&lt;/div&gt; &lt;div class="but" id="2"&gt;Text 2&lt;/div&gt; &lt;/div&gt; </code></pre> <p>How can I create an array of all IDs of the <code>.but</code> elements contained in the <code>#box</code> div?</p> <p>...
jquery
[5]
5,630,515
5,630,516
Android Virtual KeyboardListener
<p>I have an <code>EditText</code> which when some text entered the virtual keyboard appears and when I press enter I can't get focus in my second <code>EditText</code>, but some times it works.</p> <p>Anybody please help.</p> <pre><code>edittext.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v...
android
[4]
3,085,206
3,085,207
How to remove default input text
<p>I have:</p> <pre><code>&lt;input type="text" id="nome" value="Nome..." /&gt; </code></pre> <p>I have to remove it, <strong>one time</strong>....when the focus will be on the input text.</p> <p>I have to use jquery...</p> <p>Thank you</p>
jquery
[5]
5,409,367
5,409,368
C# - Inconsistent math operation result on 32-bit and 64-bit
<p>Consider the following code:</p> <pre><code>double v1 = double.MaxValue; double r = Math.Sqrt(v1 * v1); </code></pre> <p>r = double.MaxValue on 32-bit machine r = Infinity on 64-bit machine</p> <p>We develop on 32-bit machine and thus unaware of the problem until notified by customer. Why such inconsistency happe...
c#
[0]
3,465,497
3,465,498
Why my Image Quality is not good while sending it to server in My Android App?
<p>This is my code to send Image on Server . my image is going to server but not in good quality. </p> <pre><code>photo = (Bitmap) data.getExtras().get("data"); image_from_camera.setImageBitmap(photo); if(photo != null) { ByteArrayOutputStream stream = new ByteArrayOutputStream(); photo.compress(Bitmap.Com...
android
[4]
1,897,615
1,897,616
list out image extension support in android
<p>I would like to know that which <code>extension</code> of image are supported in android? can you give me list of <code>image extension</code> support by android</p> <p>Thanks nik</p>
android
[4]
4,127,626
4,127,627
Android Email Application: Open a Message directly
<p>By looking at the link <a href="http://stackoverflow.com/questions/2001254/downloading-sent-mails-from-yahoo-gmail-and-hotmail">http://stackoverflow.com/questions/2001254/downloading-sent-mails-from-yahoo-gmail-and-hotmail</a> is it possible to invoke or call Gmail and open a message programmatically</p>
android
[4]
841,357
841,358
Does calling .Last() on an IList iterate the entire list?
<p>Does the <code>.Last()</code> extension method take into account if it's called on an <code>IList</code>? I'm just wondering if there's a significant performance difference between these:</p> <pre><code>IList&lt;int&gt; numbers = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int lastNumber1 = numbers.Last(); int lastN...
c#
[0]
739,718
739,719
Java - write obenglobish method
<p>I have problem writing some method ... so if some1 can help, i would really appreciate it. Thank you.</p> <p><strong>Task:</strong> - read word - turn it in "obenglobish" - that means that you must add "OB" before vowel ... for example: english will become --> OBenglOBish ... <strong>exception</strong>: two vowel i...
java
[1]
3,394,124
3,394,125
Line terminators
<p>What are difference between:</p> <ul> <li><code>\r\n</code> - Line feed followed by carriage return.</li> <li><code>\n</code> - Line feed.</li> <li><code>\r</code> - Carriage Return.</li> </ul>
c++
[6]
1,239,936
1,239,937
ASP.Net machinekey, validationkey, and decryptionkey - key lengths
<p>What are the default key lengths that are generated when leaving the ValidationKey and DecryptionKey at their defaults? For example:</p> <pre><code>&lt;machineKey decryptionKey="AutoGenerate,IsolateApps" validationKey="AutoGenerate,IsolateApps" ... /&gt; </code></pre> <p>I have not been able to find this documen...
asp.net
[9]
2,225,857
2,225,858
favicon Problem
<p>How can i get favicon image from its websire url using xcode....</p> <p>Is there any special api for this?</p> <p>Can anyone help me?..... Thanks in advance..</p>
iphone
[8]
5,048,924
5,048,925
add images to toolbar
<p>i have 5 UIbarButton items in a toolbar, how can i set images on each barbutton, i tried through IB, but it not coming up, how can i do it ptogrammatically? one of bar button looks like this</p> <p>aBar = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"a.png"]style:UIBarButtonItemStylePlain target:self...
iphone
[8]
4,927,907
4,927,908
Why this convert into object
<p>Instead of string it is object</p> <pre><code>String.prototype.foo = function () { return this; }; typeof "hello".foo() // object ??? "hello".foo().toString(); //hello </code></pre> <p>it should return string instead i guess. </p>
javascript
[3]
5,351,902
5,351,903
Showing notification in broadcast receiver
<p>HI, I am in a situation that I need to display notification when call arrives. For this I am using broadcast receiver. Code is below</p> <pre><code>public class MyPhoneStateListener extends PhoneStateListener { public Context context; @Override public void onCallStateChanged(int state, String incomingNu...
android
[4]
5,909,110
5,909,111
clearing a link with javascript only works for the first link
<p>Found a bit of javascript that clears the link to current page. So far so good. It worked until there were more than one link.</p> <pre><code>/* CLCP v2.1 Clear Links to Current Page Jonathan Snook This code is offered unto the public domain http://www.snook.ca/jonathan/ */ window.onload = clearCurrentLink; setTim...
javascript
[3]
456,496
456,497
Extract filenames from fileInfos
<p>I have <code>FileInfo[]</code> fileInfos I want to populate <code>string[]</code> filesNames and <code>List&lt;string&gt;</code> fileNamesList using LINQ expression, how should I do it?</p>
c#
[0]
957,879
957,880
Delegate Methods
<p>I am having the parentViewController dismiss the modal view because I want it to reload the UIPicker on the parentViewController. The code is really quite simple:</p> <pre><code>-(void)didDismissFormsView { NSUserDefaults *profiles = [NSUserDefaults standardUserDefaults]; NSArray *array = [[NSArray alloc]initWith...
iphone
[8]
4,835,398
4,835,399
UILabel display problem
<p><img src="http://i.stack.imgur.com/5vtAp.png" alt="enter image description here"></p> <p>In the above figure it shows...</p> <p>I need to display complete data in UILabel.</p> <p>This is an alignment problem with UILabel</p> <pre><code>UILabel *lable=[[UILabel alloc]init]; lable.frame=CGRectMake(350, 25, 50, 50)...
iphone
[8]
167,713
167,714
How do you bulk move files and directories with PHP
<p>I have a site with many files and directories. The directories are several levels deep. The problem is that they are in the wrong directory. They are in <code>/www/upload/site/</code> and everything should be moved to <code>/www/</code>. Is there a short script to move everything two directories up?</p> <p>Thank yo...
php
[2]
1,002,775
1,002,776
Forwarding __getitem__ to getattr
<p>Can someone explain what is happening here?</p> <pre><code>class Test(object): __getitem__ = getattr t = Test() t['foo'] </code></pre> <p>gives error (in Python 2.7 and 3.1):</p> <pre><code>TypeError: getattr expected at least 2 arguments, got 1 </code></pre> <p>whereas:</p> <pre><code>def f(*params): ...
python
[7]
3,374,935
3,374,936
really really simple javascript question
<p>I'm trying to use this plugin <a href="http://www.cssnewbie.com/example/equal-heights/plugin.html" rel="nofollow">http://www.cssnewbie.com/example/equal-heights/plugin.html</a> but haven't used much javascript before. It says:</p> <pre><code>Load the jQuery library in your document’s head. - no probs Load the equal...
javascript
[3]
3,538,926
3,538,927
Run specific method of the class defined by string
<p>I have this sample code</p> <pre><code>class aaa: @staticmethod def method(self): pass @staticmethod def method2(self): pass command = 'method' </code></pre> <p>Now I would like to run method of the class aaa defined by command string. How could I do this? Thank you very much.</p...
python
[7]
3,028,896
3,028,897
Method Resolution Order (MRO) in new style Python classes
<p>In the book "Python in a Nutshell" (2nd Edition) there is an example which uses<br> old style classes to demonstrate how methods are resolved in classic resolution order and<br> how is it different with the new order. </p> <p>I tried the same example by rewriting the example in new style but the result is<br> no di...
python
[7]
5,559,017
5,559,018
smooth scrolling not working
<p>im trying to scroll the window when a certain divs are clicked,the problem i have got is it works perfectly in safari but in IE 6 and above there seems to be flickering.The screen also flickers when you try clicking in the scroll area of the window !! I cant figure out what the problem is.Could some one help please?...
jquery
[5]
4,792,313
4,792,314
use tinymce with fancybox
<p>How to use <strong>tinymce with fancybox</strong>? I have used tinyMCE on my page and also need to open it in fancybox using same page but it is not wokring in <strong>firefox, safari and chrome</strong> but working fine with <strong>IE</strong>.</p>
jquery
[5]
4,980,459
4,980,460
Start coding in Java with NetBeans
<p>There is a lot of information about Java around, but I don't understand how to setup everything.</p> <p>I have a Mac. I heard the JDK comes with Macs. But is it the latest? How do I check that? Is it the J2SE or J2EE?</p> <p>I want to create a web app. I installed NetBeans. When I choose create project there is a ...
java
[1]
2,395,747
2,395,748
Global try-catch for a service
<p>I found a solution for a global try-catch in an activity. (<a href="http://stackoverflow.com/questions/4427515/using-global-exception-handling-on-android">here</a>) Can I do something similar with a service?</p>
android
[4]
4,888,291
4,888,292
Simple account system
<p>I have been working on this small accounting thing, having some problems with the withdrawal section. I need help.</p> <pre><code>public class Account { private double balance; public Account (double initialBalance){ if(initialBalance &gt; 0){ balance = initialBalance; } } public double getDeposi...
java
[1]
172,390
172,391
Call function in document.ready
<p>Can I call function in document.ready(function(){ }) by using "onclick" event...?</p> <pre><code> document.ready(function(){ function MyFunction() { alert("Hello"); } }); &lt;a href="#" onclick="javascript:MyFunction()"&gt;&lt;/a&gt; </...
jquery
[5]
5,327,865
5,327,866
Extended call-syntax: Passing parameters
<p>I have a function that looks like this:</p> <pre><code>def getColumn(self, name, type, **args): </code></pre> <p>Now I would like to have a function</p> <pre><code>def getColumns(self, columns) </code></pre> <p>where I can pass a tuple that contains a tuple, where each entry in that tuple represents the argument...
python
[7]
5,097,132
5,097,133
PHP Show Google Analytics
<p>I use the fololowing code for all links going outisde my website:</p> <pre><code>if ($_GET["url"]) { $urll = base64_decode($_GET["url"]); header("Location: ".$urll); exit(); } </code></pre> <p>How can I show the Google Analytic's tracking code before the user is redirected so the page is tracked?...
php
[2]
4,030,989
4,030,990
Sorting of table
<p>I have looked at many sorting solutions for jQuery but haven't found what I'm looking for yet.</p> <p>I am trying to sort a table which has rows and columns that need to be sorted: <a href="http://jsfiddle.net/rvezE/" rel="nofollow">http://jsfiddle.net/rvezE/</a></p> <pre><code>&lt;table&gt; &lt;tr&gt; &lt;td&...
jquery
[5]
1,027,069
1,027,070
adding 30 minutes to time using javascript - not working
<p>need some help with adding extra time to current time</p> <pre><code>currentTime= new Date(); var hours2 = currentTime.getHours() + 4; var minutes2 = currentTime.setMinutes(currentTime.getMinutes() + 30); </code></pre> <p>however it outputs as: 15:1455880112692PM and does not seem to be adding 4.5 hours? anyone h...
javascript
[3]
1,605,395
1,605,396
PHP foreach iterate twice instead of once
<p>I have a question regarding the foreach function in php:</p> <p>At the moment I have:</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;?php $x=array("one","two","three", "four", "five", "six", "seven", "eight"); foreach ($x as $value) { echo $value . "&lt;br /&gt;"; } ?&gt; </code></pre> <p> </p> <p>...
php
[2]
588,139
588,140
Implementing horizontal and vertical scroll at a time in a custom list view
<p>I am developing a custom list view and putting data using a custom adapter.Normally the list scrolls vertically and it is working fine. But I need to show some more data in each row and need to scroll the list view horizontally also. So, my query would be is it possible to club both horizontal and vertical scroll i...
android
[4]
3,298,100
3,298,101
date picker with current date in android
<p>I am using date picker but i have some problems with date and time picker. I need date picker dialog should appears with current date value. Similarly Time picker should appears with current time value. How to do this, please any body help.</p> <p>Thnks. </p>
android
[4]
4,184,540
4,184,541
How to get email from pop.gmail.com using c#?
<p>i want to read email from pop.gmail.com using console application.</p> <pre><code>Pop3 client = new Pop3(); client.Connect("pop.gmail.com",995); client.Login("xyz@searce.com", "12345"); //client.IsAuthenticated = true; // get message list Pop3MessageCollection list = client.GetMessageList(); if (list.Count == 0...
c#
[0]
4,104,520
4,104,521
What is a good strategy for safely reading values out of a PHP array?
<p>I'm trying to read values from $_SESSION which may or may not be set, while avoiding undefined index warnings. I'm used to Python dicts, which have a <code>d.get('key','default')</code> method, which returns a default parameter if not found. I've resorted to this:</p> <pre><code>function array_get($a, $key, $defa...
php
[2]
5,691,828
5,691,829
jquery - how could prevent clicked link when I move links with drag&drop?
<p>I allow move (drag&amp;drop) some elements which contains inside link (<code>a</code>), After user drop it, it redirects browser to <code>href</code> of moved element. How could I allow to click that element and drag&amp;drop its also? I use <a href="http://dragsort.codeplex.com/" rel="nofollow">http://dragsort.code...
jquery
[5]
641,448
641,449
Is it possible to have a Conditional Compilation for ASP.NET comment?
<p>I'd like to do something like this</p> <pre><code>&lt;# if ANYPREPROCESSORCONSTANT #&gt; &lt;%-- &lt;# endif #&gt; </code></pre> <p>Is it possible (I want to put an asp.net COMMENT conditionally, I don't want to call a method conditionaly) ?</p> <p>Update: seems impossible finally nobody could give any right ans...
asp.net
[9]
270,940
270,941
Target child with jQuery
<p>I have the following code:</p> <pre><code>&lt;div class="topLevel"&gt; &lt;span class="misc pointDown"&gt;&lt;/span&gt; &lt;span class="misc"&gt;&lt;/span&gt; &lt;span class="b"&gt;item&lt;/span&gt; &lt;/div&gt; </code></pre> <p>When I click on the topLevel I need to replace "pointDown" with "pointUp". I think...
jquery
[5]
2,867,309
2,867,310
Identical Javascript code works in separate file
<p>So I was beating my head against a wall, again and again, trying to find the error in my complex code. Finally, with nothing else to do, I copied and pasted the code into another file and called it code2.js and linked my hmtl file to this code. Suddenly, it works. Any ideas? It wasn't even the entire code went from ...
javascript
[3]
3,889,484
3,889,485
c#.net function
<pre><code>namespace csfunction { class Program { static void Main(string[] args) { public int AddNumbers(int number1, int number2) { int result = AddNumbers(10, 5); Console.WriteLine(result); } } } } </code></p...
c#
[0]
5,013,544
5,013,545
Invalid Uri failure when trying to install an apk file programmatically
<p>I am trying to install apk files I store in the assets of my app (that will be moved to a external URL in the future). The app is for rooted devices and has the superuser granted permission. I am developing the app for devices that we own so we don't care about security at all, in case you wonder. </p> <p>I get thi...
android
[4]
4,095,552
4,095,553
Conversion from string "31/03/2012" to type 'Date' is not valid
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/7945310/conversion-from-string-31-03-2012-to-type-date-is-not-valid">Conversion from string &ldquo;31/03/2012&rdquo; to type &#39;Date&#39; is not valid</a> </p> </blockquote> <p>I tried Data.Parse and Convert.t...
asp.net
[9]
6,012,930
6,012,931
why int type value is not boxed as Integer
<pre><code>public class Test { static void test(Integer x) { System.out.println("Integer"); } static void test(long x) { System.out.println("long"); } static void test(Byte x) { System.out.println("byte"); } static void test(Short x) { System.out.println("short"); } public static void main(String[] ...
java
[1]
2,404,767
2,404,768
Working scrolling anchors
<p>Hi guys ive been trying to get smooth scrolling working on my anchors for ages but can never get it right.</p> <p>Ive tried ifxscrollto plugin and it just flat out won't work for me and a few others.... anyone got suggestions?</p> <p>PS: I want a script that automatically grabs named anchors.</p>
jquery
[5]
4,459,780
4,459,781
jquery shake on mouse over?
<p>is it possible to shake a table row if mouse over? and if so how? =)</p> <p>I have done it before when calling a div, but I havent as yet use the mouse over function, any help appreciated</p> <p>Thanks =)</p>
jquery
[5]
5,944,710
5,944,711
What does the b'' sentinel mean in Python iter()?
<p>Let's say I have a process that returns a bunch of lines, which I want to iterate through:</p> <pre><code>import subprocess myCmd = ['foo', '--bar', '--baz'] myProcess = subprocess.Popen(myCmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) for myLine in iter(myProcess.stdout.readline, b''): print myLine </...
python
[7]