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
1,460,425
1,460,426
Facebook Error after xcode upgrade
<p>I have been using xcode 4.1 till yesterday and my facebook integration using FBConnect was also working fine . But when i update my xcode to xcode 4.2 , i am getting error on facebook after successful login like "This endpoint has been deprecated. To temporarily reenable it, you may disable the "august_2012" platfor...
iphone
[8]
2,601,040
2,601,041
different php versions causing problems
<p>Can anyone spot anything that would be causing me massive problems between the following two server/php configs:</p> <p><a href="http://www.turkishrealestateforsale.com/phpinfo.php" rel="nofollow">http://www.turkishrealestateforsale.com/phpinfo.php</a> and <a href="http://rent-turkey-property.com/phpinfo.php" rel="...
php
[2]
503,036
503,037
'' equals false in Javascript? What would be the safest way to distinguish between '' and boolean false?
<p>We use an external API whcih returns '' or boolean false while Javascript seems to find the both equal. for example:</p> <pre><code>var x = ''; if (!x) { alert(x); // the alert box is shown - empty } if (x=='') { alert(x); // the alert box is shown here too - empty } var z = false; if (!z) { alert(z); // t...
javascript
[3]
2,366,498
2,366,499
System.out.println() not working
<p>this is my first post. I am excited to a part of this community and I have been struggling with this problem for a while, so here goes:</p> <p>In the following code:</p> <pre><code>if (j == 0) { if (!Arrays.equals(cipherData, c)) { System.out.print("C: "); for (int i = 0; ...
java
[1]
866,606
866,607
Increasing a number on the first line of a file by 1 with php
<p>I have a script for counting the number of downloads of a file that I downloaded from the internet. Basically it has a log file that it adds a line of text every time the file is downloaded.</p> <p>I want to modify it slightly so that the first line is a number, and every time a file is downloaded it increases that...
php
[2]
348,560
348,561
android - is any differences exits between emulator and device
<p>My application is working properly in the emulator. In Case of Device it is not working properly. it means application is running but in middle of the application it is forcibly stoped. after that i am getting the NPE(Null Pointer Exception). Why it's came? is any differences exits between emulator and device when ...
android
[4]
4,254,878
4,254,879
how to apply different touch animations
<p>How to apply different touch animations in one application like(drag,single touch,multiple touch and others). i appreciate your reply.</p>
iphone
[8]
4,393,779
4,393,780
How do i find the third longest word in string
<p>Hello im a bit stuck i dont know how to find the third longest word in a string, i have got my code to find the longest but i cant manage to get it to find the third longest. any help?</p> <pre><code>public void longestWord() { string sentance, word; word = " "; char[] a = new char[] { '...
c#
[0]
3,291,982
3,291,983
What does the Python error "name 'self' is not defined" mean?
<p>I can't figure out what's wrong with this <a href="http://ideone.com/wuXCV" rel="nofollow">very simple snippet</a>:</p> <pre><code>class A(object): def printme(self): print "A" self.printme() a = A() </code></pre> <blockquote> <p>Traceback (most recent call last): File "prog.p...
python
[7]
4,564,155
4,564,156
How to raise an action picker with options of Send to via sms, email, etc
<p>I've seen in applications a popup that prompts me what I do want to do with a text. I am prompted to choose from Send by SMS, Send by Email, Send by Bluetooth, Send by Fring etc.</p> <p>How do I make such a popup, it seamed to be automatically built?<br> Also how do I tell what message to use?<br> And if needed how...
android
[4]
1,513,635
1,513,636
C# White Framework
<p>This question is for any expert on White Framework.</p> <p>What's White Framework?</p> <p>As you can see here in <a href="http://white.codeplex.com/" rel="nofollow">http://white.codeplex.com/</a> , it's a powerful framework for automatic functional tests.</p> <p><strong>Fact</strong>: Actually, framework is inten...
c#
[0]
865,925
865,926
How to specify onActivityResult() for 2 views?
<p>I have 3 views in my application. My first view (FIRST_VIEW) has 2 buttons (BTN_2 and BTN_3). Each button will start seperate views, means BTN_2 causes to start SECOND_VIEW and BTN_3 will start THIRD_VIEW. In my FIRST_VIEW i have one onActivityResult() function. How can I set two onActivityResult() functions for eac...
android
[4]
4,586,972
4,586,973
Is it possible to check whether a background image has been loaded using jQuery?
<p>I am trying to find out whether it is possible to check if a background image has been loaded before fading in the content? The background image is set in the css so if the user doesnt have js turned on they are still able to view the site.</p> <p>I have tried <code>$(".quick-load").load(function () { $("#content"...
jquery
[5]
2,053,802
2,053,803
Shortest way to change an array
<p>I have an array</p> <pre><code>$a = array('a', 'b', 'c'); </code></pre> <p>What is the shortest and optimum way to change it to</p> <pre><code>$a = array('1a1', '1b1', '1c1'); </code></pre>
php
[2]
5,533,451
5,533,452
Show an element with handle
<p>I want to show/hide an element with an handle. My dev page is <a href="http://dev.lephonographe.fr/" rel="nofollow">here</a> and the handle is the Contact button. Since I can only show/hide an entire element, I've got a fixed Contact button which can be clicked when the contact page is hidden, and one in the contact...
jquery
[5]
1,501,212
1,501,213
Writing in a text file, without overwriting, it in C #
<p>I would like to know if it is possible to write in a text file without overwriting its current contents and without creating or merging Lists of string etc. So lets say i run the program once and i write Hello , and when i run it again i write Everyone so the txt has now Hello Everyone. Moreover, does anyone know ho...
c#
[0]
921,099
921,100
return value of new in java
<p>What would be the return value of new in java in case of insufficient memory? I have the following code </p> <pre><code>TreeNode newNode = new TreeNode(n); if(newNode == null) return false; </code></pre> <p>eclipse says that it is a dead code. How should we check for memory error in java?</p>
java
[1]
1,020,419
1,020,420
How to swap without third variable in java
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/756750/swap-the-values-of-two-variables-without-using-third-variable">Swap the values of two variables without using third variable</a> </p> </blockquote> <p>I was asked in an interview to swap two numbers, with...
java
[1]
4,125,638
4,125,639
how to create a deck of cards constructor
<p>so far this is what I have</p> <pre><code>import java.util.Random; public class DeckOfCards { public static final int DECK_SIZE = 52; //Instance Variables private boolean[] deck; //An implicit set of 52 Playing-Cards private int cardsInDeck;//Number of cards currently in the deck private Random dealer; //Used to ...
java
[1]
4,214,961
4,214,962
getting value using explode
<p>I am trying to parse following string...</p> <pre><code>IN.Tags.Share({"count":180,"url":"http://domain.org"} </code></pre> <p>is my following approach correct to get the value of count?</p> <pre><code>$str = 'IN.Tags.Share({"count":180,"url":"http://domain.org"}'; $data = explode(':', $str); $val = explode(',', ...
php
[2]
3,860,314
3,860,315
Processing multiple drag and dropped files fails when using regular expressions
<p>In my application the user can drag and drop multiple text files onto a GUI control to convert them to another format. Here is the relevant code: </p> <pre><code> private void panelConverter_DragDrop(object sender, DragEventArgs e) { string[] filenames = (string[])e.Data.GetData(DataFormats.FileDrop)...
c#
[0]
2,792,275
2,792,276
How to combine the UItabbar and navigationcontroller without using UItabbarcontroller?
<p>Iam developing on applocation.In that i want to use the UITabbar and navigation controller.Because every tab in the tabbar contain the back and save buttons for saving that tab information and coming back.So i want use the both UItabbar and navigationcontroller.Please tell me how to use both.</p>
iphone
[8]
4,755,022
4,755,023
Python dictionary optimize this script
<p>I have a string like <code>rdb_master_mongodb</code> where <code>rdb_</code> is fixed and <code>master</code> is a database name which can be anything and <code>mongodb</code> can be one among <code>mysql</code>, <code>mongodb</code>, <code>postgres</code>, <code>mssql</code> or <code>bdb</code>. I need to fetch the...
python
[7]
2,001,522
2,001,523
How to read pdf file in my appliation
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/10299839/how-to-read-pdf-in-my-android-application">How to read pdf in my android application?</a> </p> </blockquote> <p>My application will have a link for a pdf file. When user click on a link, pdf file should...
android
[4]
6,003,048
6,003,049
How to resolve memory issue while scaling / roating a bitmap in android?
<p>I want to zoom and roate a image in an Android activity. I am doing it as follows </p> <pre><code> Matrix matrix = new Matrix(); matrix.postRotate(rotation); matrix.postScale(zoomScale,zoomScale); Bitmap scaledBitmap = Bitmap.createBitmap(bitmap,0,0,bitmap.getWidth(),bitmap.getHeight...
android
[4]
5,764,381
5,764,382
Storing a random byte string in Python
<p>For my project, I need to be able to store random byte strings in a file and read the byte string again later. For example, I want to store randomByteString from the following code:</p> <pre><code>&gt;&gt;&gt; from os import urandom &gt;&gt;&gt; randomByteString=urandom(8) &gt;&gt;&gt; randomByteString b'zOZ\x84\x...
python
[7]
3,688,796
3,688,797
How do I programmatically mute the iPhone or bring the volume to zero?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1465733/setting-iphone-to-vibrate-and-setting-iphone-back-to-sound-via-app">Setting iphone to vibrate and setting iphone back to sound via app.</a> </p> </blockquote> <p>I know there are other questions on this ...
iphone
[8]
1,808,889
1,808,890
Best way to autload class from multiple directory
<p>Hello I'm trying to load classes that are stored in separate directories. I try with SPL but i must set load directory where to search. </p> <p>My structure is like in Zend fw:</p> <blockquote> <p>|--root</p> <p>|-- Library</p> <p>|---- database[dir]</p> <p>|---------adapter.php</p> <p>|-----...
php
[2]
5,948,500
5,948,501
python check if letter part of word in string
<p>I want to write a function which checks whether a letter is part of a word e.g</p> <pre><code>"u" part of word in "i c u" = false "u" part of word in "umbrella" = true </code></pre>
python
[7]
288,999
289,000
chart drawing in Java
<p>I draw a chart using Java, but I don't use anything like JChart2D etc. I opened wolframalpha and draw a plot eg: plot[100*(x^2)] and then when you put a cursor on a plot you will see two crossing lines, which help you specify points. Can i make something like this using Java in jPanel?</p>
java
[1]
522,204
522,205
Missing and Additional values in 2 list
<p>I have two lists:</p> <pre><code>list1 = ['1','2','3','4','5','6'] list2 = ['4','5','6','7','8'] </code></pre> <p>Now I want to find missing and additional value in list2.</p> <p>The output should be:</p> <pre><code>Missing value = 1,2,3 Additional Value = 7,8 </code></pre>
python
[7]
4,774,221
4,774,222
How do I make an Android library for static linking that includes resources?
<p>I am successfully linking some of my code stored in a .jar-based library to my Android app. The .jar code references Android library content just fine.</p> <p>The problem is I need to include 'res' resources in the library but can't work out how to do this.</p> <p>Any suggestions?</p>
android
[4]
2,476,905
2,476,906
Display a list of results with numbers in ASP.NET
<p>I have a common problem in an ASP.NET web form. I'm just surprised that I haven't found a common solution :)</p> <p>I have a list of results being returned from a SQL Server database. I want to show those results in my web page with number to the left of them. For instance, my result set may look like the following...
asp.net
[9]
4,330,536
4,330,537
Internet Explorer 8 choking on function call (JavaScript)
<p>I have this line in a function handling click events. It works in Firefox, but not IE8 and I don't see how to create a workaround. (Jquery answers welcome!). </p> <p>n.b I cannot use the this keyword as in context it will be useless.</p> <pre><code>elementsList[i].previousSibling.lastChild.addEventListener("click"...
javascript
[3]
817,277
817,278
How I detect what language the current system
<p>How I detect what language the current system?</p> <p><img src="http://i.stack.imgur.com/cA1M9.jpg" alt="Taskbar"></p>
c#
[0]
2,104,008
2,104,009
how to display current location when camera is open in iphone
<p>I am implementing one iphone application in which i want to implement below functionality.</p> <p>When i open camera infront of any object(i.e Hotel,bank,ATM) then it will display related its information.</p> <p>I want to implement same functionality same as wikitude which is in apple store.</p> <p>Please help me...
iphone
[8]
5,565,416
5,565,417
how to play wav file in c#
<p>how to play a wav file in c# from windows form resources folder???</p>
c#
[0]
3,223,102
3,223,103
Should if statments be in inner or outer method?
<p>Which of these designs is better? What are the pros and cons of each? Which one would you use? Any other suggestions of how to deal with methods like is are appreciated. </p> <p>It is reasonable to assume that Draw() is the only place that the other draw methods are called from. This needs to expand to many more Dr...
c#
[0]
3,807,513
3,807,514
Jquery dialog window example not working
<p>Trying to learn Jquery and am on the verge of giving up!! Have spent 2 days trying to get a dialog box to display! </p> <p>Can anyone help as to why this code doesnt work? I just get hello at the top of the page!</p> <p>jQuery:</p> <pre><code>&lt;script src="js/jquery-1.5.2.min.js" type="text/javascript"&gt;&lt;/...
jquery
[5]
4,095,103
4,095,104
how can I get the position of a cell in a table using javascript?
<p>By position I mean, how many columns are to the left of the cell and how many rows are on top of it. What I need exactly is two functions:</p> <pre><code>function FindColPos(element) { /* find column position */ return colPos; } function FindRowPos(element) { /* find row position */ return rowPos; } </code></pre> ...
javascript
[3]
1,255,427
1,255,428
How to create multiple objects based on frequency and date
<p>for some reason, I am unable to figure how to code it in a clean way. I have a task object and this object has a start date and end date. I want to pass this object to method that will take this task, clone it X number of times according to the frequency and set its start date to the occurance date.</p> <p>Offcours...
java
[1]
234,593
234,594
have my dns server
<p>I have my own registered domain. I want to set up my own DNS server and host a website completely independent of any third party hosting service. I have Windows Server 2003 and have installed the DNS role and configured it with a single forward zone (I am new to this terminology and am not sure if I am using it corr...
asp.net
[9]
4,792,056
4,792,057
Calling [super scrollViewDidScroll]; on subclass of UIWebView crashes
<p>I'm not sure how this works. I was following this post: <a href="http://stackoverflow.com/questions/8857655/check-if-uiwebview-scrolls-to-the-bottom">check if UIWebView scrolls to the bottom</a></p> <p>I want to know when the scrollViewScrolls to do some custom things. I subclasses UIWebView. All I did was this...
iphone
[8]
388,771
388,772
landscape view not shows image and portrait show
<p>I want to load image runtime in my activity but it is load in portait view only. If I want to load it in landscape it doesn't. I also do it by both seprate xml for landscape and portrait. and also try by only one xml. I draw image like this</p> <pre><code> result_img.setImageDrawable(getResources().getDrawable(R....
android
[4]
3,018,816
3,018,817
jquery hide element not working
<p>I searched SO for a fix for this, found it, but my implementation seems flawed. Any clues?</p> <pre><code> $(document).ready(function(){ $('#updt').ajaxForm(function(data) { if (data==1){ $('#success').fadeIn("slow"); $('#updt').resetForm(); setTimeout(function() { $("#success").hide('blin...
jquery
[5]
3,724,604
3,724,605
Editing the LMC button which copy to clipboard
<p>I have some problems with <a href="http://www.lettersmarket.com/view_blog/a-3-copy_to_clipboard_lmcbutton.html" rel="nofollow">LMC Button</a> because of the way it is coded.</p> <pre><code>ShowLMCButton('Copied Text Here'); </code></pre> <p>An image "Copy" is loaded when the page loads, with the words "Copied Text...
javascript
[3]
3,918,072
3,918,073
Jquery & Variable ID Names
<p>I am trying to avoid having the same code for different ids. Something like submitter1, submitter2, etc. In the same process, having the variable also used to get the input box id of differentlocation1, differentlocation2, etc. Can someone help me out with the code below?</p> <pre><code>$(document).ready(function...
jquery
[5]
3,374,465
3,374,466
How to overcome special characters in Rss feed in android?
<p>i have <code>rss feed</code> when sax parsing the rss feed . it can't parse the entire feed due to some special characters problem like <code>&amp;</code> and <code>€”</code>. how to overcome this problem and display entire feed <code>(item)data</code> in <code>strings</code>.</p>
android
[4]
5,393,361
5,393,362
Any ideas about the best work around for __new__ losing its arguments?
<p>So, I only realised today that <code>__new__</code> is deprecated for receiving arguments, as of python 2.6 (it isn't mentioned in the documentation, which is also not true in terms of the behavior of <code>__new__</code> calling <code>__init__</code> as far as I can see). This means my functional code has started r...
python
[7]
2,957,245
2,957,246
Image button in PHP doesn't work properly
<p>I have an image button on my PHP page. I need to execute a piece of code when this button is clicked. I'm trying the following.</p> <pre><code>&lt;?php if(isset($_POST['btnSubmit'])) { echo "Do some stuff."; } ?&gt; &lt;input type="image" name="btnSubmit" id="btnSubmit" src="images/btnsubmit...
php
[2]
2,015,172
2,015,173
How can I dispose/release a string file in this case?
<p>Im trying to use using but getting error on the using it self.</p> <pre><code>public void Save(string path , bool Locked , PictureBox pb) { string fn; string t = Path.GetFileNameWithoutExtension(wo_name); if (File.Exists(path + "\\" + "DATABASE" + "\\" + t + "\\" + wo_nam...
c#
[0]
373,495
373,496
Android's Processes
<p>I need to know some information about all android's basic processes, such as</p> <ul> <li>com.android.phone<br/></li> <li>android.process.acore<br/></li> <li>com.android.mms<br/></li> <li>com.android.alarmclock<br/></li> <li>com.android.calendar<br/></li> <li>android.process.media<br/></li> <li>com.android.voicedia...
android
[4]
4,585,820
4,585,821
To check if an element exists in the Stacked List
<p>I was supposed to code pop, push and contains for linkd List Stack. I did manage to get pop and push to work but had no luck with contains. For some strange reason it always returns false even if the thing is in the list, could any one help.</p> <hr> <p>public class LinkedListStack implements Stack {</p> <pre><co...
java
[1]
2,400,284
2,400,285
How should Deep Copy Work?
<p>OK when doing a deep copy obviously references should not be copied. However, if the object being copied contains objects that themselves are references to to the same object should that be maintained or should the data just be copied.</p> <p>Example</p> <pre><code>public class Program() { public void Main(Str...
java
[1]
5,757,447
5,757,448
Why do I need to use a lambda expression here instead of using the model object property directly?
<p>I am following an ASP.net MVC 3 tutorial , which sets up an online music store .</p> <p>This code is the <code>Delete.cshtml</code> view for <code>StoreManagerController.cs</code></p> <pre><code>@model MyStore.Models.Album @{ ViewBag.Title = "Delete";} &lt;h2&gt;Delete&lt;/h2&gt; &lt;h3&gt;Are you sure you w...
asp.net
[9]
797,766
797,767
Trying to wrap my head around objects, constructors and prototypes
<p>Consider the following code:</p> <pre><code>function Robot(weapon) { this.weapon = weapon; this.fire = function() { alert('Firing ' + this.weapon + 'projectile.'); }; } var gunRobot = new Robot('gun'); </code></pre> <p>vs.</p> <pre><code>function makeRobot(weapon) { return { weapo...
javascript
[3]
4,770,570
4,770,571
logging and wrapping exceptions. is this good practice?
<p>Do you think it's worth it to wrap all service methods in a try catch block to log exceptions like this:</p> <pre><code>public void attachClean(Car instance) { log.info("attaching clean Car instance"); try { getSessionFactory().getCurrentSession().lock(instance, LockMode.NONE); log.info("att...
java
[1]
1,909,903
1,909,904
How do I check if a function is being passed as a parameter?
<h2>Question:</h2> <p><strong>How do I check if a function is being passed as a parameter?</strong></p> <p>Especially if the function being passed is returning a string etc?</p> <p>IE in the example below I don't want to htmlentities the function html being passed as a parameter, but I do want to htmlentities anythi...
php
[2]
3,991,677
3,991,678
Getting data with out scraping
<p>I've got a directory where people submit data. It's stored and pending while it's moderated to make sure it's o.k.</p> <p>Once approved I'd like another couple of sites that I control and a few I won't (on different servers) to be able to grab that data. This would be on a cron or something so there wouldn't be a...
php
[2]
504,404
504,405
Calling a function in jquery?
<pre><code>// Explicit global $.fn.getRedemptionID = function(){ window.varMy = data.DATA[0].item1; } </code></pre> <p>How do you call the above function to get the variable varMy ?</p>
jquery
[5]
3,920,733
3,920,734
can we configure google+ in our iPhone application?
<p>Actually i need to provide google + connectivity in an universal application so is there any one who can help me or can provide me any reference to start on it.</p> <p>As we configure facebook in our iPhone application.</p> <p>Thank u in advance (you guys are great)</p>
iphone
[8]
831,996
831,997
PHP syntax error issue
<p>I am getting this weird issue for my php script. </p> <p>I have </p> <pre><code>Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in simpleTest.php on line 82 </code></pre> <p>I am not sure why my codes not working. </p> <pre><code>&lt;?php foreach ( $response-&gt;getPods() as $pod ) { ?&gt...
php
[2]
105,714
105,715
How to redirect URLs to login page?
<p>I have an application which has a login page which comes up with the URL: </p> <p><a href="http://localhost:8080/Analyze" rel="nofollow">http://localhost:8080/Analyze</a> </p> <p>when the user fills the login page and clicks submit.it goes to a page with the URL: </p> <p><a href="http://localhost:8080/Analyze/ana...
java
[1]
961,456
961,457
how to break out from outer each loop
<p>I have the following scenario:</p> <pre><code>$.each(array, fucntion() { ... $.each(array1, function() { if condition () { } }); }); </code></pre> <p>How can I break out of outer <code>each</code> loop when my condition evaluates to true inside the inner <code>each</code> loop?</p>
jquery
[5]
5,659,638
5,659,639
Split a list to individual entries
<p>I am extracting some emails from a CSV file and then saving it to another CSV file.</p> <p>email variable should be in this format: </p> <pre><code>email = ['email@email.com'], ['email2@company.com'], ['email3@company2.com'] </code></pre> <p>but in certain cases it will be returned as: </p> <pre><code>email = ['...
python
[7]
4,884,172
4,884,173
is there any easy way to expose methods of private parent class c++
<p>Is there any way to directly expose some methods of private parent class. In the following example if I have an object of type Child I want to be able to directly call method a() of its parent, but not b(); Current solution spawns a lot of boilerplate code especially if there are a lot of arguments.</p> <pre><code>...
c++
[6]
5,252,087
5,252,088
Working of Treeset
<pre><code>import java.util.*; public class Explorer1 { public static void main(String[] args) { TreeSet&lt;Integer&gt; s = new TreeSet&lt;Integer&gt;(); TreeSet&lt;Integer&gt; subs = new TreeSet&lt;Integer&gt;(); for(int i = 606; i &lt; 613; i++) if(i%2 == 0) s.add(i); subs =...
java
[1]
2,848,138
2,848,139
mail parsing subject encoding
<p>i am using this class <a href="https://code.google.com/p/php-mime-mail-parser" rel="nofollow">https://code.google.com/p/php-mime-mail-parser</a></p> <p>to parse emails</p> <p>class is fully of problems</p> <p>today i found big one</p> <p>i have just recieved message from gmail now</p> <p>message subject is enco...
php
[2]
1,816,421
1,816,422
Removing a python module from $pythonpath
<p>Is there any way to 'uninstall' a module from the python path other than removing the files manually?</p> <p>Pip, easy_install, setuptools etc all have install options, but no remove options!</p> <p>I'm using Ubuntu 9.10</p>
python
[7]
2,629,781
2,629,782
Check the type of derived class
<p>In my program I have a class named Entity. Another class Invader inherits Entity. Since I want to have 4 different kinds of invaders, I declare classes Invader1, Invader2, Invader3 and Invader4 which inherit from Invader. Now I declare a Entity pointer type vector to store all Invaders like:</p> <pre><code>entities...
c++
[6]
2,336,513
2,336,514
How to stop running iphone app in background in iphone sdk 4.0 and above
<p>Please tell me some solution for how to stop app at background when we close the app in iphone sdk 4.0 and above.</p> <p>can any one provide me some sample code for it.</p> <p>Thanks, Priyanka</p>
iphone
[8]
2,416,983
2,416,984
making single client and server
<p>I have written a client server program:</p> <pre><code> { import java.net.*; class verify { public static int serverPort=998; public static int clientPort=999; public static int buffer_size=1024; public static DatagramSocket ds; public static byte buffer[]=new byte[buffer_size]; public static void ...
java
[1]
2,436,497
2,436,498
get identifier of link given the class jquery
<p>i have this piece of html</p> <pre><code>&lt;li&gt;&lt;a href="#" id="9000" class="yes vpslink"&gt;&lt;img src="x.gif" /&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" id="9001" class="no vpslink"&gt;&lt;img src="x.gif" /&gt;&lt;/a&gt;&lt;/li&gt; $('.vpslink').click(function(e) { var id='i dont know dude'; ...
jquery
[5]
2,810,325
2,810,326
Put select element in a javascript prompt?
<p>I would like to have a javascript prompt pop up that has a selection element in it rather than a text input. When searching for a solution it seems that using jquery could definitely work but I am new to HTML and javascript and the tutorials for a jquery popup are daunting (I cannot figure out how to implement them)...
javascript
[3]
2,014,122
2,014,123
JQuery multiple hover effects not working
<pre><code>$(document).ready(function () { $("#aboutme-block").hide(); $("#stories-block").hide(); $("div.aboutme").hover(function () { $("#aboutme-block").fadeIn(1000); $("#stories-block").hide(); }); $("div.stories").hover(function () { $("#stories-block").fadeIn(1000); ...
jquery
[5]
4,090,071
4,090,072
PHP classes, inheriting, implements
<p>I am looking at <a href="http://stackoverflow.com/questions/3548253/should-i-use-multiple-classes-for-game">Should I use multiple classes for game?</a> - Robert Pitt's answer.</p> <pre><code>interface Weapons { public function Fire(); } class Colt implements Weapons { function Fire() { echo 'Fir...
php
[2]
3,163,245
3,163,246
Access COM DLL using VS 2008 on Windows 7 64 bit
<p>I am using Windows 7 64 bit OS and VS 2008 SP1 as development environment.</p> <p>One of the console application uses a COM component. When I try to create an instance of a class from the COM component, I got following error:</p> <p>Creating an instance of the COM component with CLSID {CE92C3B9-9A93-40E1-85AB-6A49...
c#
[0]
528,904
528,905
Why is this giving error on using in built qsort
<p>I have written some piece of code which is giving me the error . The code is as follows :- </p> <pre><code> long long int compare (const void * a, const void * b) { return ( *(long long int*)a - *(long long int*)b ); } long long int number; long long int *ar =(long long int *)(malloc(sizeof(long lon...
c++
[6]
4,360,802
4,360,803
bit pattern(variable value) for boolean in java?
<p>as we know in java variables are bit holders with a designated type. And for primitives the bits represents a numeric value. </p> <p>For example. a byte with value 6 has a bit pattern 00000110.</p> <p>so i wanted to know as boolean is also a primitive what is the bit pattern for it for value true and false.</p>
java
[1]
6,012,599
6,012,600
Android Intent Button To Market
<p>I am trying to get a button on my app go to the market place when clicked. Not to another app, but to my publisher area with all my apps. Can anyone help, it just seems to force close at the moment?</p> <p><code>final String APP_MARKET_URL = "market://developer?pub=PUB+ID+HERE";</code></p>
android
[4]
4,782,723
4,782,724
send sms for a missed calls
<p>i would like to develop an app that send a message when ever that receives a missed call.but i have a problem when ever i start that activity that send the sms to previous ones how to solve this problem,i have a small idea a set that particular missed call as read or delete it other wise my app has to...
android
[4]
4,853,467
4,853,468
PHP Send Mail Alternative
<p>I know PHPMailer and I'm using this but I have some user groups and send multiple emails to multiple groups, so at this time it runs too slow. Is there any other way or any third party tools? Is there any library? thanks in advance</p>
php
[2]
1,805,027
1,805,028
background image in html page in iphone
<p>I m the beginner in iphone development.</p> <p>How i call the background image from my project directory in Xcode in html page. I have taken previously UISegment control and after that i calling two html page on webview in uisegmentcontroller. Now i want to set background images on those html pages. It is possible?...
iphone
[8]
1,928,661
1,928,662
constants in Python: at the root of the module or in a namespace inside the module?
<p>I'm building a Python module with about a hundred of constants.</p> <p>I would like to avoid naming issues when people import my module so I was wondering what is the best way to do it.</p> <pre><code>MY_CONSTANT = 1 MY_SECOND_CONSTANT = 2 ... MY2_CONSTANT = "a" MY2_SECOND_CONSTANT = "b" ... </code></pre> <p>Or</...
python
[7]
1,667,627
1,667,628
How to print to the screen - "console.log is not a function"
<p>I have tried numerous ways...what am I doing wrong??? I am determined to learn and really understand this.</p> <pre><code>//On line 2, declare a variable myName and give it your name. var myName = "Jeanne"; //On line 4, use console.log to print out the myName variable. console.log ("Jeanne"); //On line 7, change th...
javascript
[3]
5,943,612
5,943,613
how to change keyboard language programmatically
<p>I have made android app. my client ask me that change default language at soft keyboard case by case. one case, keyboard should be English keyboard, another, Korean keyboard.</p> <p>how can i do?</p>
android
[4]
5,147,180
5,147,181
Hosting Windows Forms control inside ASP.NET page - IE only?
<p>I've just found out that there is a possibility to host a Windows Forms control inside ASP.NET page. But I'm wodnering - will it run only in IE or in other browsers, such as Firefox, too?</p>
asp.net
[9]
1,785,658
1,785,659
handling EOFException in java
<p>I have created a method in my java assignment to write into a file from a <code>LinkedList</code> (I used serialization) , then I have created another method to read the file into the <code>inkedList</code>. The following is my method's body:</p> <pre><code>try { FileInputStream fin = new FileInputStream("c:\\I...
java
[1]
916,082
916,083
Correct usage of GetComputerName - Do I need to reserve extra space for null character
<p>I was wondering, what is the correct usage of <a href="http://msdn.microsoft.com/en-us/library/ms724295%28v=vs.85%29.aspx" rel="nofollow">GetComputerName</a>. Should it be</p> <pre><code>TCHAR computerName[1024 + 1]; DWORD size = 1024; GetComputerName(computerName, &amp;size); </code></pre> <p>or</p> <pre><code>T...
c++
[6]
2,080,160
2,080,161
asp.net datagrid sorting
<p>I have a datagrid that is displaying data that is being returned from a stored procedure. That works fine. The problem is that I want to do sorting. I know that there is sorting functionality in the grid, however, I don't want to go back to the server and get a new set of data. What I want to do is just re-sort ...
asp.net
[9]
965,827
965,828
Monthly calendar
<p>I am new to C# is know some visual basic but I don't know C#. Now my question is I have a monthly calendar on my page and when someone selects the date and hits the submit button the date should appear in the label to the right. Here is a part of my code:</p> <pre><code>private void button1_Click(object sender, Eve...
c#
[0]
4,283,043
4,283,044
getting a specific adjacent element in jquery
<p>if I have the following table:</p> <pre><code>&lt;tr class="alternate"&gt; &lt;td&gt;{$order.titel}&lt;/td&gt; &lt;td&gt;{$order.auteur}&lt;/td&gt; &lt;td&gt;&amp;euro;{$order.prijs}&lt;/td&gt; &lt;td&gt;{$order.aantal}&lt;/td&gt; &lt;td&gt;&amp;euro; {$order.aantal*$order.prijs}&lt;/td&gt; &lt;...
jquery
[5]
938,973
938,974
Why `args[0].Trim() == null` is always false?
<p>I have a method like this:</p> <pre><code>public string StartCapture(string[] args) { if(args[0].Trim() == null || args[0].Trim() == string.Empty ) { //do stuff } } </code></pre> <p>Why I get a note that <code>args[0].Trim() == null</code> will always be false?</p>
c#
[0]
570,835
570,836
All thing is Object
<p>in .Net All Thing is Object but I have question. I write a method </p> <pre><code>public static MvcHtmlString ObjectTable(this HtmlHelper helper, ICollection&lt;Object&gt; objects, ICollection&lt;string&gt; header) </code></pre> <p>but I don't add system.object and get error for add ...
c#
[0]
4,206,955
4,206,956
how to post and retrieve data on different sites using c#
<p>i am trying to post on different websites using c#. I am doing it through a web Browser( the one already in .Net). The code i have done so far is below, in this i am successfully opening facebook and when i click on <code>button_2</code> it automatically fills the login form and i am successfully logged in then. Thi...
c#
[0]
2,456,886
2,456,887
How can we identify the primitive data type of a given variable?
<p>How can we identify the primitive data type of a given variable?</p>
java
[1]
1,677,668
1,677,669
How do I get the UDID of the iPod/iPhone?
<p>I have seen programs that do this, like the very useful 'BetaHelper' application.</p> <p>How do I get the Unique Device Identifier of the iPod of iPhone that my application is running on?</p>
iphone
[8]
1,732,059
1,732,060
Example to see return value in multithread scenario
<p>I have a method. I want to return a value not from the main thread but from separate thread. Can you give example of it?</p>
c#
[0]
2,637,584
2,637,585
How to insert text to rich edit control in Win32 while preserving any previous formatting
<p>I'm developing chat application in win32. Currently i'm dynamically allocating memory for rich edit controls text, append new line and set the new text with SetWindowText.</p> <p>When a message arrives with specific keywords the app colors the line and appends it to the chat window. Everything's fine. Problem arise...
c++
[6]
3,538,234
3,538,235
How shift graph in Android's Canvas
<p>I draw a graph with canvas in android, but I want to shift it to left or right side. I don't want to scroll it, I just want to shift it in one page by which you can see the graph is shifting lively. I would be appreciated if any body help me.</p>
android
[4]