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,178,250
3,178,251
How to change the width of the row of a UITableView
<p>Can we resize the width of the row of a UITableView.</p>
iphone
[8]
2,527,903
2,527,904
How to sort list of objects by some property
<p>I have simple class </p> <pre><code>public class ActiveAlarm { public long timeStarted; public long timeEnded; private String name = ""; private String description = ""; private String event; private boolean live = false; } </code></pre> <p>and List con. How to sort in asc order by timestar...
java
[1]
1,913,815
1,913,816
php date string sql server 2008 insert
<p>Trying to insert date as a string from array to SQL Server 2008 and getting this error </p> <blockquote> <p>Array ( [0] => Array ( [0] => 22007 [SQLSTATE] => 22007 [1] => 241 [code] => 241 [2] => [Microsoft][SQL Server Native Client 11.0][SQL Server]Conversion failed when converting date and/or time from characte...
php
[2]
3,247,791
3,247,792
returning a Tuple with a null item
<p>I have some code that looks like this:</p> <pre><code>public Tuple&lt;bool, SomeObjectModel&gt; CheckIfJsonIsValid(string IncomingJson) { SomeObjectModel TheObjectModel = new SomeObjectModel(); JavascriptSerializer TheSerializer = new JavascriptSerializer(); ..... try { TheObjectModel = TheSe...
c#
[0]
4,018,866
4,018,867
Workaround if the Application is Down
<p>We have deployed an application on the server. Problem is, sometimes the application will be down due to some issue (Ex: While Downloading huge volume of data into Excel). The application will be up after manually restarting the IIS. We are creating a new application, so we are not working to fix this issue. As a wo...
asp.net
[9]
993,210
993,211
How can I make driving navigation app on Android
<p>How can I draw an Arrow showing the driving direction in MapView ?.</p>
android
[4]
5,969,599
5,969,600
jQuery: Selecting an item in a drop down list using the text value
<p>Using jQuery, what is the easiest way to select an item in a drop down list using the text value.</p> <p>For example, I have drop down list that has a list of states. And I have the text value of “PA”. I want to make “PA” be the selected value. What is the best way to do this using jQuery. I have been doing Google...
jquery
[5]
4,275,656
4,275,657
File is being used by another process
<p>I am developing a c# application, backend as sqlite.In my application i have an option for clean databse.It means the curren .db file will delete using File.Delete method and again it create empty databse using File.create method.Now let me explain the problem.</p> <p>To perform cleandatabse task, i have to stop al...
c#
[0]
2,538,988
2,538,989
Run jQuery function immediately after an animate
<p>im using the following JSfiddle: <a href="http://jsfiddle.net/edddotcom/7NQKU/1/" rel="nofollow">http://jsfiddle.net/edddotcom/7NQKU/1/</a></p> <p>I'm using a callback function to change the background of the text immediately after the image is clicked,</p> <p>The is the sibling of the so i was hoping i could ju...
jquery
[5]
5,808,964
5,808,965
How to Initialize a char array inside a class?
<p>I was about to initialize a char array inside a class as</p> <pre><code>class a{ char a[25]; }; a::a(){ a[] = {'a','b','c'}; } </code></pre> <p>but gives compile time error.</p>
c++
[6]
5,155,128
5,155,129
Hyperlink pdf on MUPDF
<p>I have build MUPDF library for android and its working fine to view a pdf but any one know how I can able to view pdf with hyper link using mupdf as mupdf said support hyperlink?????</p>
android
[4]
1,356,659
1,356,660
File encoding from English text to UTF-8
<p>How to convert a Non-ISO extended-ASCII English text, with CRLF line terminators to utf-8 in Python</p>
python
[7]
2,711,424
2,711,425
Jquery - How to check, if child in hidden DIV is visible?
<p>how can i check a div in a hidden div ... if visible or not?</p> <p><strong>HTML</strong></p> <pre><code>&lt;div style="display:none;"&gt; &lt;div id="two_child"&gt;&lt;/div&gt; &lt;div id="three_child" style="display:none"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p><strong>JS</strong></p> <pre><code>if(...
jquery
[5]
5,153,743
5,153,744
Understanding the negate() function example from Eloquent Javascript (Chapter 6)
<p>As a new javascript developer, I have spent some time with this code snippit from <a href="http://eloquentjavascript.net/chapter6.html" rel="nofollow">Chapter 6 of Eloquent Javascript</a>, I am still trying to understand the following code example : </p> <pre><code>function negate(func) { return function(x) { ...
javascript
[3]
4,918,992
4,918,993
Broadcast Receiver not responding
<p>Can any one let me know what is the best practise to do when there is a BroadcastReceiver that hasn't finished executing within 10 seconds</p>
android
[4]
2,324,355
2,324,356
Altering variable in a method
<pre><code>private int myInt; public var(int a) myInt = a; var x = new var(1) var y = new var(5) var z = y; x = increment(y) // where the increment method increments y by 1. </code></pre> <p>If the increment method alters the value of y, is the value of z also changed? In my book, when y is altered, z is also al...
java
[1]
4,180,103
4,180,104
Java real time strategy game development
<p>I'm coming to the end of my first year of CS and I thought a great way to consolidate all the things I've learnt this year would be a personal game project.</p> <p>I would like to implement a 2D based rts, I'm thinking along the lines of starcraft I, warcraft II or even command and conquer. I will have about 3 mont...
java
[1]
717,565
717,566
How to separate a Python list into two lists, according to some aspect of the elements
<p>I have a list like this:</p> <pre><code>[[8, "Plot", "Sunday"], [1, "unPlot", "Monday"], [12, "Plot", "Monday"], [10, "Plot", "Tuesday"], [4, "unPlot", "Tuesday"], [14, "Plot", "Wednesday"], [6, "unPlot", "Wednesday"], [1, "unPlot", "Thursday"], [19, "Plot", "Thursday"], [28, "Plot", "Friday"], [10, "unPlot", "Frid...
python
[7]
5,622,440
5,622,441
Password protect app like Dropbox does it
<p>How do I password protect my app? I didn't think it was possible but the Dropbox app does it.</p>
android
[4]
2,728,192
2,728,193
Best Java 'framework' for LOW-END 3D Graphics?
<p>I've made my share of 2D games on various platforms but I have never developed a 3D game.</p> <p>I want to make a small "mmorpg". I already made my server in python and it works just fine with my flash 2D game but I decided I want to step it up and try out 3D. I want to make a 3D game for the web browser and I th...
java
[1]
5,752,596
5,752,597
Accessing another third party app in android
<p>How to access another third party application from my application in android?</p>
android
[4]
2,043,744
2,043,745
MapView not showing data
<p>I have created the simple <code>MapView</code> example in <code>android</code>, but it is not displaying anything in the emulator</p> <p>Logcat Datails are:</p> <pre><code>01-30 10:24:53.976: W/System.err(1033): IOException processing: 26 01-30 10:24:53.983: W/System.err(1033): java.io.IOException: Server returned...
android
[4]
274,016
274,017
How can you round up a number and display it as a percentage?
<p>I'm a bit rusty on my mathematics so I hope someone can help me. Using the code below I would like to do the following: Depending on the amount of memory installed, I would like to display the percentage of available memory and not how much is left in megabytes.</p> <pre><code>private void timer1_Tick(object sende...
c#
[0]
5,042,294
5,042,295
How to update an value in app.config file?
<p>This is my code:</p> <pre><code>Configuration configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); KeyValueConfigurationCollection settings = configuration.AppSettings.Settings; settings["IP"].Value = "10.0.0.2"; configuration.Save(ConfigurationSaveMode.Modified); </code></pre> ...
c#
[0]
6,024,662
6,024,663
identifying objects, why does the returned value from id(...) change?
<blockquote> <h3>id(object)</h3> <p>This is an integer (or long integer) which is guaranteed to be unique and constant for this object during its lifetime. </p> </blockquote> <p>Can you explain this output? Why does <code>j</code>'s id change?</p> <pre><code>&gt;&gt;&gt; i=10 &gt;&gt;&gt; id(i) 6337824 &...
python
[7]
4,434,997
4,434,998
What minifier was used to generate the official JQuery "minified" version?
<p>I need to edit the current JQuery library 1.4.x (and completely rename the JQuery "object/function") in a high conflicting environment. </p> <p>My question is, with what minifier has the official JQuery minified version been generated. Where can I find this minifier? (As I want to use it for minifing my version too...
jquery
[5]
1,532,630
1,532,631
Android ListView with CheckBox and a selectable item
<p>I have seen plenty of samples which support a checkbox for each item in a list but this seems to be about as far as they go. My problem is that I have two lists of items which interact.</p> <p>The first list displays Method Statements - when the user select a method statement the second list displays a list of Ris...
android
[4]
5,169,212
5,169,213
Random weighted choice
<p>I have data like that:</p> <pre><code>d = ( (701, 1, 0.2), (701, 2, 0.3), (701, 3, 0.5), (702, 1, 0.2), (702, 2, 0.3), (703, 3, 0.5) ) </code></pre> <p>Where (701, 1, 0.2) = (id1, id2, priority) Is where pretty way to choice id2 if I know id1, using priority?</p> <p>func(701) should return:<br> &nbsp;...
python
[7]
290,517
290,518
Limit Geocoder getFromLocationName scope to one specific City
<p>The following is my method:</p> <pre><code>List&lt;Address&gt; addresses = null; addresses = new Geocoder(passengerHomeActivity).getFromLocationName(this.addressInput.getText().toString(), 1); </code></pre> <p>is there any way to limit the <code>Geocoder</code> <code>getFromLocationName</code>'s scope to one s...
android
[4]
3,091,878
3,091,879
why can not display HTML codes?
<p>In test.txt, I have 2 lines of sentences.</p> <pre><code>The heart was made to be broken. There is no surprise more magical than the surprise of being loved. </code></pre> <p>In codes:</p> <pre><code>import urllib2 file = open('/Users/name/Desktop/textfile.txt','r') data = file.readlines() file.close() countline ...
python
[7]
3,804,336
3,804,337
File not found error in Android
<p>I have two folders inside my assets folder which contains 3 html files. I am loading one of this HTML file in a webview and inside this file I am referring other two files using href. When I run this code and click on this link inside the webview I am getting an error in the webview that It cannot find the file. How...
android
[4]
3,103,711
3,103,712
Is there any way to do this without using '__init__'?
<pre><code>class a(object): c=b()# how to call the b method d=4 def __init__(self): print self.c def b(self): return self.d+1 a() </code></pre> <p>how to call the 'b' method not in the <code>__init__</code> </p> <p>thanks</p> <p>the error is :</p> <pre><code>Traceback (most recent ...
python
[7]
2,704,008
2,704,009
Looking for a simple example of informal protocols in Objective C, to understand how informal protocol works actually
<p>I am looking for a simple example, which shows how informal protocols works!</p>
iphone
[8]
4,304,956
4,304,957
Attach to Property's setter
<p>I haven't found similiar post so I'm asking this.<br> Let's say I defined somewhere an application wide available static Property (I mean it's not local) and in one class I would like to know when this property is being changed. Apart from aop (transparentproxy etc.) which I think doesn't suit me well here (and I ca...
c#
[0]
2,617,437
2,617,438
Download file created by PHP without changing windows
<p>I'm generating a file whenever a php script is run, which is downloaded in at the same time by the user (no copies are saved to the server).</p> <p>Currently I'm redirecting a user from the file creation php script back to the original page.</p> <p>I'd like to not redirect the user back to the original page but ha...
php
[2]
2,325,533
2,325,534
Import javascript file in javascript function
<blockquote> <p><strong>Possible Duplicates:</strong><br> <a href="http://stackoverflow.com/questions/3991492/include-a-javascript-file-in-a-javascript-file">Include a javascript file in a javascript file</a><br> <a href="http://stackoverflow.com/questions/950087/include-javascript-file-inside-javascript-file">In...
javascript
[3]
5,816,129
5,816,130
Find in a stl map doesn't work when a custom compare function is written which stops keys from sorting
<pre><code>class compare { public: bool operator()(const int x,const int y) const { if(x-y == 0) return false; else return true; } }; int main() { std::map&lt;char,int,compare&gt; mymap; //Add data into map mymap.insert ( std::pair&lt;char,int&gt;...
c++
[6]
1,716,550
1,716,551
vibration and sound won't be played
<p>I have the following code:</p> <pre><code>String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns); CharSequence tickerText = "HI!"; long when = System.currentTimeMillis(); Notification notification = new Notification(R.drawabl...
android
[4]
64,381
64,382
How can I get the ID of an icon of another application?
<p>I need to create home shortcuts of other applications. in order to do that I need to get the ID of the icon drawable.</p> <p>I can get the actual drawable, but i dont know how to get the ID of it without knowing the name of the drawabale.</p> <p>Is there a way to find the name of the drawable or get the ID from th...
android
[4]
1,781,255
1,781,256
PHP mobile emulator program
<p>I am working on project on page i have a big image of mobile. There is top input box which is looking for any site url.If somebody is any website url theta website output will be display in mobile interface. I am using <p>Thanks in Advance</p>
php
[2]
3,671,120
3,671,121
how to get select elements randomly from an array
<p>i have an array with 12 objects {0,1,2,3,4,5,6,7,8,9,10,11}</p> <p>from this array i have to pick 6 values randomly,but they are unique not repeated.</p> <p>i am using this for (int i =0; i&lt;6; i++) { NSLog(@"%d",rand()%12); } it gets as 7 1 5 2 10 8</p> <p>for second time it gets as 0 2 11...
iphone
[8]
5,961,447
5,961,448
Doing something different with last sequence in a loop
<p>I am looking for the basic syntax of doing something different with the last itteration through a loop, using C#</p>
c#
[0]
412,326
412,327
If offset.top listen
<p>I have a long scrolling page, and want to test if an element is 100px from the top, then apply a class elsewhere (until the next element in line is 100px from the top)</p> <p>If I could just get the basic statement I would be ecstatic, anything extra would be a bonus!</p>
jquery
[5]
1,533,963
1,533,964
how to create a new php page with php- apostrophe issue
<p>To be more clear, I do understand how to create a new php file with php, I'm using <code>fwrite</code>, like so:</p> <pre><code>//actually create the file now $my_file=$post_title_edited . ".php";; $fh= fopen($my_file, 'w'); fwrite($fh, $head); fwrite($fh, $body); fwrite($fh, $php); fwrite($fh, $php2); fwrite($f...
php
[2]
3,669,101
3,669,102
javascript count down timer
<p>Im wanting to make this javascript count down timer show 01 instead of 1 and 00 when theres nothing in that part. im basically just trying to make it look like a digital clock, but it looks weird when theres no 0 making it squeeze in.</p> <p>heres the script i found </p> <pre><code>// JavaScript Document CountDow...
javascript
[3]
5,345,002
5,345,003
sort a List<Tuple> from highest to lowest
<pre><code>List&lt;Tuple&lt;String, int[], int&gt;&gt; </code></pre> <p>I want to sort the <code>List</code> by the <code>int</code> from highest to lowest.</p>
java
[1]
3,089,421
3,089,422
C# can an inherited method or property use the derived class members without creating a new method?
<p>I'm coding a simple game using C# to help me learn basic object oriented concepts.</p> <p>In this code below:</p> <pre><code>class entity { int hp; string name; public entity() { hp = 1; name = "entity"; } public string status() { string result; res...
c#
[0]
5,710,532
5,710,533
get remote image dimensions before accepting it as an upload? getimagesize() too slow
<p>I've been using getimagesize() to get the dimensions of an image a user is uploading, then checking if there is enough memory to process this image. The problem is getimagesize() downloads the file to the server before reading dimensions. So its catch 22. this must be a very common problem but i havent come across a...
php
[2]
3,966,931
3,966,932
How to check application is idle for 1 min?
<p>If my application is idle for 1 min then I want to open the login page (but maintain the activity stack).</p> <p>Can anybody please help me to find the idle of an application</p> <p>Regards, Monali</p>
android
[4]
46,386
46,387
android location detection
<p>So I wanted to detect the user current location when my main activity starts. </p> <p>The way I implemented was to have the GPS location manager and the Wifi location manager and one locationlistener listening to Both. As soon as the locationlistener found the current location. it will stop listening for location c...
android
[4]
3,997,866
3,997,867
jQuery validate : multiple form, single validation
<p>I have 2 forms, namely (ids mentioned) 'add_product' and 'edit_product'</p> <p>Now I am using jQuery validation plug-in, both the forms have same validation (similar to mentioned in following example)</p> <pre><code>jQuery("#add_product").validate({ rules: { name:"required", price:"number" ...
jquery
[5]
1,937,300
1,937,301
Jquery; correctly selecting contents of a script tag
<p>I have a single page web application using jquery and a set of embedded templates. A template may contain tag like below:</p> <pre><code>&lt;script type="html/template" id="sample"&gt; &lt;script type="text/javascript" charset="utf-8"&gt;alert('x');&lt;/script&gt; &lt;/script&gt; </code></pre> <p>and a jquery ...
jquery
[5]
253,035
253,036
How to install multiple apks at a time?
<p>Am developing one Android application which is using thinkfreeoffice.apk for viewing documents in my application. My requirement is I have to download both my application and thinkfreeoffice apks at a time and also install both these apks at a time.</p> <p>anybody did this one before?</p>
android
[4]
3,423,614
3,423,615
in_array not working explode
<p><img src="http://i.stack.imgur.com/rURln.png" alt="enter image description here"></p> <p>I am not able to figure out why my condition is not working while the ip address is in the array. Why condition is failing as shown in image </p> <pre><code>&lt;?php $valid_ip_list = explode(',',$this-&gt;valid_ips); ...
php
[2]
3,294,166
3,294,167
Android app not running in AVD
<p>I have an android app which is not getting launched in AVD. The app was working fine till yesterday but now when i am running it, the AVD gets launched but the app is not starting. Console just shows 'Waiting for HOME ('android.process.acore') to be launched... '. It is not throwing any error but not starting..</p> ...
android
[4]
1,437,679
1,437,680
What does $1, $2, etc. mean in Regular Expressions?
<p>Time and time again I see $1 and $2 being used in code. What does it mean? Can you please include examples?</p>
javascript
[3]
4,739,932
4,739,933
How to replace " and \ from text files using Java?
<p>I'm using <code>replace</code> and <code>replaceAll</code> Java functions to replace strings in text files.</p> <p>I've some issues with some symbols occurring in my text file, such as <code>"</code> and <code>\</code></p> <p>Let's say I have to remove the " from "blablabla", what should i use ? I'm currently usin...
java
[1]
2,547,566
2,547,567
Running an ASP.net Website from the root
<p>I have an ASP.net Website. the project' content is in a folder called MyWebSite. When I run my application from Visual Web developer 2008, the browser displays the following address in the address bar: http: // localhost/ MyWebSite /Default.aspx I want to be able to run my Website from the following address:...
asp.net
[9]
3,506,952
3,506,953
comma separated value in php adding space and small square
<p>I have a text area in a form im writing pasting the comma separated value in the text area</p> <p>like</p> <pre><code>1,2,3,4,5 6,7,8,9,10 11,12,13,14,15 </code></pre> <p>when i submit from its creating a csv file but the csv file in the row 1 contains header </p> <p>its appending the 1 st row with the first r...
php
[2]
3,741,388
3,741,389
is it really wrong to release resources in onDestroy?
<p>Android documentation says (in <a href="http://developer.android.com/training/basics/activity-lifecycle/stopping.html" rel="nofollow">http://developer.android.com/training/basics/activity-lifecycle/stopping.html</a>):</p> <blockquote> <p>In extreme cases, the system might simply kill your app process without call...
android
[4]
159,771
159,772
Android File.delete not working
<p>Im trying to delete an image file after I saved it to SD card, but the delete function is not working. Any help will be appreciated. Here is my code:</p> <pre><code>// Save image to SD card String path = Environment.getExternalStorageDirectory().toString(); File file = new File(path, "tmpimage" + ".jpg"); .... ....
android
[4]
4,717,881
4,717,882
Java Calendar.add in giving inconsistent results
<p>I am having the following code</p> <pre><code> Calendar calendar = Calendar.getInstance(); calendar.set(2011, 7, 29); //case 1 // calendar.set(2011, 7, 30); //case 2 // calendar.set(2011, 7, 31); //case 3 System.out.println("===After seting the date== "+calendar.getTime()); ...
java
[1]
5,930,436
5,930,437
Javascript quirks
<p>I was playing around with Chrome's Javascript console recently, and I discovered this oddity: </p> <pre><code>[] == true false [0] == true false [0] == [] false </code></pre> <p>This doesn't seem to make any sense at first glance (false != false), but I think the real reasoning lies in the polymorphism of the == o...
javascript
[3]
4,147,595
4,147,596
how to merge two images iphone with one image variable height
<p>I have two images.I want to display like where the first image end the next one should start.</p> <p>both have same width but the height of the first one is variable .</p> <p>I am not getting perfect code for it .</p> <p>please help me I am using one above another its displayed as a overlapped ??</p>
iphone
[8]
2,493,196
2,493,197
Python - TypeError: (function) takes exactly 2 arguments (3 given) - but I only gave 2!
<p>I'm parsing a list of patient visits (csv file). To deal with this, I have a custom set of classes:</p> <pre><code>class Patient: def __init__(self,Rx,ID): .... class PtController: def __init__(self,openCSVFile): self.dict=DictReader(openCSVFile) self.currentPt = '' .... de...
python
[7]
3,875,035
3,875,036
am cmd in sh script file does not work
<p>the sh file looks as follows</p> <pre><code>#!/system/bin/sh am start -a android.intent.action.MAIN -n com.android.settings/.Settings echo hello,world exit 1 </code></pre> <p>but it reports error like </p> <pre><code>Starting: Intent { act=android.intent.action.MAIN cmp=com.android.settings/.Sett }gs Error type 3...
android
[4]
2,712,962
2,712,963
can anybody tell how to take picture from camera and set in image view in android
<p>if user click take picture button . can anybody tell how to take picture from camera and set in image view can anybody give example</p> <p>Thanks</p>
android
[4]
1,740,111
1,740,112
JavaScript current URL check
<p>I am wondering how I would get JavaScript to check if a user is on a certain URL so i can build an if statement from the result. </p> <p>My reasoning is that if a user clicks on a link in the menu and they are currently on trucks.php the javascript will redirect them to a certain page. If they are not on trucks.php...
javascript
[3]
5,794,595
5,794,596
how to get 100 links from google search in java
<p>I have been used google custom search engine api but after 100 request google block me to perform request.</p> <p>I only want 100 link from google search without any api, Is there any soultion. Please help me. If any api is available then please tell me about that api.</p> <p>Thnak you.</p>
java
[1]
4,580,940
4,580,941
handling function key press
<p>I have a C# form with 5 buttons. The users enters the information and depending on the press of a function key, a specific action is performed. <kbd>F9</kbd>-Execute Order, <kbd>F6</kbd>-Save, <kbd>F3</kbd>-LookUp.</p> <p>I have added the foolowing code:</p> <p>OnForm_Load</p> <pre><code>this.KeyUp += new System....
c#
[0]
4,520,508
4,520,509
PHP and Timer events
<p>I would like to use a Timer in php, sending messages after a certain period of time (no player activity)? This is for a multi-player game through sockets.</p> <p>I have googled and stackoverflew and found the following</p> <ul> <li>could use a cron (will need to synronize my php classes (socket based) with the cro...
php
[2]
3,603,541
3,603,542
String.IsNullOrEmpty() Check for Space
<p>What is needed to make <code>String.IsNullOrEmpty()</code> count whitespace strings as empty?</p> <p>Eg. I want the following to return <code>true</code> instead of the usual <code>false</code>:</p> <pre><code>String.IsNullOrEmpty(" "); </code></pre> <p>Is there a better approach than:</p> <pre><code> String.IsN...
c#
[0]
2,453,745
2,453,746
What is difference between int.class and Integer.TYPE in java?
<p>I want to know the difference between int.class and Integer.TYPE in Java?</p>
java
[1]
5,671,668
5,671,669
problem with HelloMapView in android
<p>I am trying to write a mapView application .When i extend my class with MapActvity it will ganerates an error force to close application. And in log chat i got an runtime error like classNotFoundException.</p> <p>plz solve my problem. ThanQ.</p>
android
[4]
4,707,381
4,707,382
C# Daylight saving DateTime switch
<p>I have events that get triggered whenever the daylight switches happen.</p> <p>I get when the spring/fall switches are going to happen using </p> <pre><code>TimeZone.CurrentTimeZone.GetDaylightChanges(year) </code></pre> <p>This returns me 2 datetimes: 1. Start Datetime which is Spring cutover 3. End Datetime whi...
c#
[0]
3,210,576
3,210,577
Java-Instance Method Call
<p>When I call as instance method of a class as follows : object_name.function_name(); how the compiler knows that the "function_name" has to be called for that "object_name" behind the scenes ? </p>
java
[1]
2,736,837
2,736,838
How do you store the contents of a POJO in the preference store?
<p>I am looking to find a way to store the value of a POJO (containing Strings, booleans, ints) in a preference variable that I can then retrieve by the key used when I store it. The POJO contains many String / boolean / int attributes, so I don't want to store them each individually. The problem I'm running into is th...
android
[4]
5,179,098
5,179,099
Loop through all td of next() table
<p>I want to loop through each td of a table which is next of $this button clicked </p> <pre><code>&lt;input type="button" class='btn'&gt; &lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;......&lt;/table&gt; &lt;input type="button" class='btn'&gt; &lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&g...
jquery
[5]
1,474,519
1,474,520
getting the full name of an assembly
<p>Suppose I want to display the full name of an assembly, given only a path to the assembly file.</p> <p>I know I could write a command line program or powershell script easily enough, but does the runtime include a command that I could use? (I've seen gacutil do it for assemblies that are in the gac, but about assem...
c#
[0]
2,150,300
2,150,301
how to get position from Spinner adapter
<p>i fill spinner with generic Arraylist of cat Categeory type </p> <p>now i want to get position of Specific Item from it , i try code below but it always return S</p> <p>if (Singleton.getCategory() != null) {</p> <pre><code> cat item =new cat(); String cat= Singleton.getCategory().toString()...
android
[4]
1,751,993
1,751,994
What is the correct way to deal with texts outside the tag?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/298750/how-do-i-select-text-nodes-with-jquery">How do I select text nodes with jQuery?</a> </p> </blockquote> <p>What is the correct way to deal with texts outside the tags</p> <p>I tried all the methods, but a...
jquery
[5]
5,174,991
5,174,992
Link to a page then execute a Javascript request
<p>Does anyone know if it is possible to link to a page using href and then calling a javascript function?</p> <p>Ex: href="http://www.mywebsite.com/Details.aspx?javascript:__doPostBack('INFO','')</p> <p>How would I go about this?</p> <p>Thanks for your help!</p>
javascript
[3]
3,748,677
3,748,678
Can't display mssql image in a http table using php
<p>I know there are many post about displaying a image from mssql, but they seems dont work in my case if i want it display with other table items.</p> <p>I can display the binary image indivially by the following code </p> <p><code>echo $image=base64_decode($MyBinImg);</code></p> <p>then when i wanted to display th...
php
[2]
1,429,252
1,429,253
How can i call a web service without using KSOAP2 in Android?
<p>I can call a webservice with KSOAP2 from android,now i want to know is it possible to call it without using KSOAP.If anyone knows the answer please help me.</p>
android
[4]
195,711
195,712
Why doesn't Android API publicly allow to listen for incoming SMS?
<p>Recently a question here on SO ported this to my attention. Android doesn't have a public API for listening to incoming SMS. There used to be an action <code>android.provider.Telephony.SMS_RECEIVED</code>, but it has been removed from the official API and even if it still works, it's obviously not future-proof. I do...
android
[4]
4,786,445
4,786,446
Is it possible to get detailed help on a given function using the command line?
<p>I am a new Python user :) Is it possible to get detailed help on a given function using the command line ?</p>
python
[7]
2,124,680
2,124,681
Using HBase as L2 Cache for Ehcache
<p>As per our design, i am trying to use HBase as level2 cache of Ehcache. Normally, ehcache employs Terracotta Server Array as level 2 cache. </p> <p>Please can you show a direction and code ASAP. its very urgent! Thanks for your patience!</p> <p>Shouvanik SCJP 1.5</p>
java
[1]
651,324
651,325
How do i save logs in php
<p>How do i save logs in PHP? Is there any "magical" function available in php for doing so, or any library? Or should i have to <code>fopen</code> file everytime and dump in it? I want to save my logs in text file.</p> <p>Thanks in advance :)</p>
php
[2]
2,063,486
2,063,487
Defining Safe zone
<p>I am developing an application which will send a alert message when that particular person goes out of the safe zone. I am using GPS to track the location information. Can anyone suggest me some ideas on how to set the safe zone. </p>
android
[4]
976,429
976,430
iPhone: Handle action event from webview page
<p>I am loading a html page using loadHTMLString.</p> <pre><code>[myWebview loadHTMLString:myHtmlStr baseURL:nil]; </code></pre> <p>Its loading properly. In this html web page, i'm also adding buttons, drop down(with selection) etc. I want to catch the action events in my code now for these web page controls. For exa...
iphone
[8]
3,058,192
3,058,193
How can i use switch to have a checkbox checked in jQuery?
<p>I am trying to use switch() if the check box is checked,but it does not work. What is the probem here i could not figure out. Could you help plz. here is what i tried </p> <pre><code>&lt;input type="checkbox" class="che" value="1" /&gt;age &lt;input type="checkbox" class="che" value="2" /&gt;sex $(".che").click(fu...
jquery
[5]
996,815
996,816
strange xrange() behavior in Python 2
<p>I am familiar with the difference between <code>range()</code> and <code>xrange()</code>. I noticed something weird with <code>xrange()</code>:</p> <pre><code>&gt;&gt;&gt; xrange(1,10,2) xrange(1, 11, 2) &gt;&gt;&gt; xrange(1,10,4) xrange(1, 13, 4) </code></pre> <p>Functionally, it is correct:</p> <pre><code>&gt...
python
[7]
4,136,515
4,136,516
highchart xaxis value on dot
<p>I'm using Highcarts for my charts and I want to know if it's possible to have only an xaxis value where there is a dot. Now I have a dot between two dates so it is not very clear on which date it is.</p>
jquery
[5]
2,173,642
2,173,643
Intent constructor syntax
<p>I am just starting to develop Android (being a .Net developer)</p> <p>I am following the code from a book, and to start a new 'form' (screen) they show this code</p> <pre><code>Intent i = new Intent("net.learn2develop.ACTIVITY2"); </code></pre> <p>The class definition is this:</p> <pre><code>package net.learn2...
android
[4]
3,421,235
3,421,236
Python data structure similar to dictionary where key is two values?
<p>I am looking for a data structure in Python that is similar to a dictionary. The difference is that there is two keys. I want to be able to access the value in constant time. Like:</p> <pre><code>dict.get(dog, smurf) {(dog, smurf): 40} </code></pre> <p>Is this possible?</p> <p>If this doesn't exist, I would just ...
python
[7]
5,475,458
5,475,459
How to make a diagram from arrays in java?
<p>My program needs to draw a diagram like this:</p> <pre><code> --- --- xxx --- xxx +++ --- xxx +++ --- ooo xxx +++ --- ooo xxx +++ --- ooo xxx +++ --- *** ooo xxx +++ --- *** ooo xxx +++ --- *** ooo xxx </code></pre> <p>From this data: </p> <pre><code>private static f...
java
[1]
5,234,971
5,234,972
Open a new page using HTML Response/JS ASP
<p>Alright, I have decided to go about this by opening a new page (newPage.aspx) which will then initiate the download and close after the download is completed. I am opening newPage.aspx using javascript by writing it to the response of the current page. For some reason, however, the window is not being opened before ...
asp.net
[9]
441,253
441,254
How to convert JSON Array to Javascript Object Array
<p>I have the following JSON value pushed from the server.</p> <pre><code> result=[{"id":1492,"name":"Delhi"}, {"id":109,"name":"Coimbatore"}, {"id":576,"name":"Konni"}, {"id":525,"name":"Kottayam"} ] </code></pre> <p>I know how to convert JSO...
javascript
[3]
4,951,124
4,951,125
name of uploaded file in title field
<p>I have seen on youtube when we upload any videos automatically, the title field of form gets filled with the name of the video file. How can i achieve this?</p> <p>my form is </p> <pre><code>&lt;form enctype="multipart/form-data" method="post" action="http://youshare.ca/music/writestorypost"&gt;&lt;p&gt; &lt;s...
javascript
[3]
1,692,218
1,692,219
Java BufferedImage increase width
<p>I have managed to load in an image using:</p> <pre><code>BufferedImage image = ImageIO.read(out); </code></pre> <p>and place text over it however, I want the text to appear next to the image. How can I increase the image width on the right to allow for space for the text to be drawn on. Or do I have to create a ne...
java
[1]