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
2,633,329
2,633,330
Get Mounted Drives in c#
<p><code>DriveInfo.GetDrives()</code> will enumerate all volumes mounted with a drive letter, but is there any way (without p/invoking Win32) to enumerate raw volumes, or to see volumes that may be mounted in a folder and not a drive letter?</p>
c#
[0]
2,605,143
2,605,144
AsyncTask - Accessing variable from doInBackground in different class
<p>Basically I am wanting to get access to a variable that has been assigned in doInBackground in a different class but I am not sure how to do this here. Below is my relevant class structure. This is for an android application. Thanks.</p> <pre><code>public class CreateNewPlayers extends AsyncTask&lt;String, String, ...
android
[4]
2,228,574
2,228,575
correct syntax for javascript "src" declaration
<p>trying to add a math.random() method to my embedded js declaration to prevent the linked javascript file from being cached.</p> <p>The problem is that I keep getting syntax errors. I think I'm close but my debugging efforts are proving futile. The code is as follows:</p> <pre><code>&lt;script type="text/javascript...
javascript
[3]
1,055,372
1,055,373
Print value of array without using loop
<p>How to print values of array without using for/foreach loop using C# ?</p> <pre><code>int[] iValue = {12,25,65,14,25,89}; </code></pre> <p>Thanks.</p>
c#
[0]
761,938
761,939
Help with php custom popup
<p>Hi i have create a custom popup using javascript to use in PHP file. thw popup will appear when user click <em>My Special Website</em> i need to change the title header. Can help me how to do it??</p> <pre><code>//function: function myPopup() { window.open( "&lt;?=$CFG-&gt;wwwroot.'/example.php';?&gt;" ,"myWindow"...
javascript
[3]
4,409,384
4,409,385
How to Save Recorded Audio file in application's raw folder
<p>I am creating an application in which I have to record the voice and save it and later play the same. I want to save the recorded audio in the raw folder of the application. How should I give the the directory path of raw folder to save my Audio file.</p>
android
[4]
2,976,586
2,976,587
validation for Time HH:MM am or pm Format using regular expression
<p>I am working on web application using asp.net with vb code.</p> <p>I have a textbox for time field for which i am using regular expression validator.</p> <p>the format i want is HH:MM am. the regular expression i am using is "(0[1-9]|[1][0-2])[:]" + "(0[0-9]|[1-5][0-9])[ ][A|a|P|p][M|m]"</p> <p>i am entering the ...
asp.net
[9]
2,238,390
2,238,391
Cannot Import Counter is encountered in python 2.7.3 on CSH
<p>I am using UNIX's cShell in my Windows 7 OS.<br> When I am executing a prog. it shows an error every time :<code>can not import name Counter</code>.<br> though I have mentioned in the script <code>from collections import Counter</code>.<br> I am using <code>Python 2.7.3</code>, then why this problem is persisting.</...
python
[7]
2,895,716
2,895,717
Reload or maintain DOM state using Jquery after browser back button pressed
<p>I need a browser page to maintain it's post ajax changed state after the user navigates away and hits the back button to return to it. Unfortunately items previously faded out with jQuery are visible or dynamically added items (via ajax) disappear once the user hits the back button to return to a page. </p> <p>I've...
jquery
[5]
4,802,758
4,802,759
getting a specific word using .match and regular expression not working
<p>I am having a little trouble with regular expression.</p> <p>I want to match a regular expression in a sentence.</p> <p>Example :</p> <pre><code>John has two candy ::123:: </code></pre> <p>and i am using this code to look for it:</p> <pre><code>var getid = x$('div').html().match(/::([^:]+)::/g); </code></pre> ...
jquery
[5]
5,049,370
5,049,371
What control to use for display a row from Database
<p>I have something like this </p> <pre><code>select sum(value) from database.table </code></pre> <p>And this will display only one number for example : 6546.00 What is the best control that i should use to display the selected data to my .aspx page I don't want use DatagridView . I think : <code>label , textbox(onl...
asp.net
[9]
3,296,988
3,296,989
stop automatical convert to htmlentities?
<p>I have a div id="ultimativegodemperorofalldivs" It contains some Text like "such a cool &amp; sexy div"</p> <p>when I extract the InnerHTML with JS it converts the <code>&amp;</code> to <code>&amp;amp;</code> I really don't want this. I don't need it for URL's so it really should be a very simple <code>&amp;</code>...
javascript
[3]
2,393,871
2,393,872
Android: keep screen on from widget
<p>I have a home screen widget and I want to add "keep screen on" functionality. So how do I set the flag "FLAG_KEEP_SCREEN_ON" from within an AppWidgetProvider.onReceive method?</p> <p>From within an activity you would do a </p> <pre><code>this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); </...
android
[4]
4,818,186
4,818,187
Checkbox not unchecking
<p>I have this code and it works fine, but the problem is the checkbox does not get removed when you click it again, it only gets removed when the span.removePortfolio is clicked. Thanks!</p> <pre><code>&lt;input type="checkbox" name="portfolio"/&gt; &lt;div&gt; Has Portfolio &lt;span class="removePortfolio"&gt;X&...
jquery
[5]
228,184
228,185
Trying to identify the newest and second newest file in a directory
<p>I am trying to identify the newest and second newest files in a directory. This is the code I intended to use:</p> <pre><code>CONFIGS = "/Users/root/dev/config-files/" allConfigs = sorted(os.listdir(CONFIGS), key=os.path.getctime) t1 = "%s/%s" % (CONFIGS, allConfigs[-1]) t2 = "%s/%s" % (CONFIGS, allConfigs[-2]) </...
python
[7]
3,820,900
3,820,901
Showing calendar Control
<p>I am creating a web application in which i have to select a date. I am using Calendar control. But it occupies too much space and other labels and text boxes are not shown in proper alignment. Is there anything I Can do in which when i click on an image, the calendar control opens, but on the textbox, so that it doe...
c#
[0]
1,195,409
1,195,410
How to convert string to bitmap in android
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2471935/how-to-load-an-imageview-by-url-in-android">How to load an ImageView by URL in Android?</a> </p> </blockquote> <p>How to convert string to bitmap in android.I am getting url value in string .I want to se...
android
[4]
4,566,323
4,566,324
hit enter to click button VC#
<p>I'm working on a WinForm App in C#, and there is only one button on app's screen, app's need is when user hit to enter, button should work as clicked to it. How can this be possible?</p>
c#
[0]
3,789,026
3,789,027
TextView and Button in each row and onListItemClick()
<p>I have a ListView with some elements on it. Each row has a TextView and a Button. It looks like this:</p> <p><strong>| Some text in a row (Button) |</strong></p> <p>Now, when I click on this text nothing happens. Simply no one function is called. But when I click on the button I can handle the event. I use onListI...
android
[4]
4,206,737
4,206,738
rmdir in PHP not working on an empty directory
<p>I'm trying to remove a directory with PHP. </p> <p>I unlink/remove all files/subdirs from the inside out and finally call rmdir on the now empty top directory. Everything goes according to plan until the last call to rmdir. PHP warns that the directory is NOT emtpy and refuses to remove it. But when I look at the d...
php
[2]
2,238,340
2,238,341
using default icons in UITabbar
<p>i am using tab bar control in my app and want to use the default search icon in one of my tab. I am making the tab bar programmically but i am not able to find a property where i can specify UITabBarSystemItemSearch item which i find in apple documentation. Following is my code for tab bar</p> <pre><code>CouponsVie...
iphone
[8]
999,009
999,010
RandomAccessFile read/write start-finish position problem
<p>I've searched this a lot but still can't find... So I hope you can help me to understand :)</p> <p>The question is...</p> <p>I have big file A.dat and I want </p> <ul> <li>A) Read it with RandomAccessFile (to avoid OutOfMemory error) </li> <li>B) Read it by pieces of 4Mb (buffer)</li> <li>C) Write each this 4Mb p...
java
[1]
1,218,340
1,218,341
Parameter is not valid when getting image from stream
<p>I have this code:</p> <pre><code> MemoryStream ms = new MemoryStream(newbytes, 0, newbytes.Length); ms.Position = 0; ms.Write(newbytes, 0, newbytes.Length); Image img = Image.FromStream(ms); img.Save(@"C:\Users\gsira\Pictures\Blue hills5...
c#
[0]
2,300,099
2,300,100
Getting JavaScript object key list
<p>I have a JavaScript object like</p> <pre><code>var obj = { key1: 'value1', key2: 'value2', key3: 'value3', key4: 'value4' } </code></pre> <p>How can I get the length and list of keys in this object?</p>
javascript
[3]
786,049
786,050
How to check my internet access on Android?
<p>What I really want is, when the user has no connection, I want to show some dialog that he or she has no connection. </p> <p>I tried to put this on my MainActivity but still didn't work.</p> <pre><code>public boolean isOnline() { ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY...
android
[4]
1,347,419
1,347,420
Variable with name `None`
<p>I need to have a variable with name <code>None</code>:</p> <pre><code>class QAbstractPrintDialog(QDialog): None = int() # QAbstractPrintDialog.PrintDialogOption enum PrintToFile = int() # QAbstractPrintDialog.PrintDialogOption enum PrintSelection = int() # QAbstractPrintDialog.PrintDialogOption enum ...
python
[7]
305,155
305,156
Random string from 4 to 12 characters using just one character
<p>I need to generate something like this using PHP:</p> <pre><code>****** ********* **** *********** ****** ******** ******* ********* ******* ********** ******** ****** ******** </code></pre> <p>using PHP.</p> <p>So, if i.e. I have this code so far:</p> <pre><code>&lt;?php $character = "*"; //character that wil...
php
[2]
30,708
30,709
Multiple $_POST items
<p>I am trying to post multiple email address when a form is submitted but it is only posting one. Here is the code.</p> <pre><code>$email_to = $_POST['emailto']; $message = stripslashes($message); $respond = $_REQUEST['first_name'] ; mail("$email_to,","Website",$message,"From: $respond","Employment Application"); </c...
php
[2]
2,678,062
2,678,063
Read XML file from a web server
<p>I need to know how I can read a xml file which is placed at web.war. This also needs to be server independent. </p> <p>Appreciate your help.</p> <p>Thank you.</p>
java
[1]
1,095,069
1,095,070
(com process.android.www) has stopped unexpectedly
<p>I have tried restarting, changing to manual network, and tried many solutions.. But nothing is working out.. </p> <blockquote> <p>dialer\res\values\styles.xml:146: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.NoTitleBar.OverlayActionModes'</p> </...
android
[4]
4,632,235
4,632,236
Parse error: syntax error, unexpected T_FUNCTION on line 1? Why this type of function gives error in the server?
<p>My function is:</p> <pre><code>$cb = function() use ( $a, $b ){ .......... return $string; } </code></pre> <p>Output: </p> <blockquote> <p>Parse error: syntax error, unexpected T_FUNCTION on line no ..</p> </blockquote> <p>Why does this type of function give an error in the server?</p>
php
[2]
464,999
465,000
How do closures work in PHP (If at all)?
<pre><code>function outer_function() { $nid = 3; function exists($var) { print $nid; return $var-&gt;nid == $nid; } $a_filtered_array = array_filter($an_array, "exists"); } </code></pre> <p>I'm trying to filter this array using a variable that's defined in the outer function, but the variabl...
php
[2]
4,786,713
4,786,714
ASPX page loaded loaded in android browser, numbers in labels open phone dialer
<p>I have a simple aspx site that is styled for use on the android platform. i have some label that are numbers such as "100>200" or "825". The problem is that when ever one of these labels is touched the phone automatically opens the touched number in the dialer. These are not phone numbers and i do not want the dial...
android
[4]
3,094,800
3,094,801
Resize Imageview and fitXY
<p>I am resizing an ImageView and auto fitting the image to it, I need this for zoom in and out for image, this is the way i wish to implement this because the image is already 2048x2048 and I cant re-size it. Bu the code only works once for some reason, second click does not do anything. If you have other ideas or sug...
android
[4]
1,170,941
1,170,942
Creating link with javascript
<p>I am trying to create a link in JS that moves the person the page from where he has come from. Here is the code.</p> <pre><code>&lt;script language="javascript"&gt; function Jump() { document.href=document.referrer; } &lt;/script&gt; </code></pre> <p>Here is the html,</p> <pre><code>&lt;a href="#" onclick="Jump(...
javascript
[3]
5,336,114
5,336,115
Javascript <script> tag error
<p>I faced a strange issue today at my work place. In a JSP, i had multiple script tags like below, one of which has a empty space in src of the script tag. This JSP is loaded successfully firefox, after i input the values and click submit, the JSP is submitted twice, once with post request and other with get request. ...
javascript
[3]
1,712,079
1,712,080
Define map with add
<p>Hello I want to define map or set that I can add to it values doing loop</p> <pre><code>for example for Map&lt;String,String&gt; listParentChild = new HashMap&lt;String, String&gt;() ; listParentChild.put("Container", "Entity"); </code></pre> <p>but I want the in every loop size the to add the specific names...
java
[1]
4,704,843
4,704,844
How to access an array from within an object?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/7027615/accessing-class-properties-with-spaces">Accessing Class Properties with Spaces</a> </p> </blockquote> <p>i have and object file and i cant get devices list, How to get <strong>devices</strong>?? how to c...
php
[2]
3,721,331
3,721,332
Fetch remote url from POST request
<p>I'm looking for a way to fetch remote URL from where POST request was made to my form. So i.e. I have a form on www.someserver.com/someform.html that does POST to www.myserver.com/some.php. So I need to fetch from POST request "www.someserver.com" on www.myserver.com/some.php page. Is there a way to do that?</p>
php
[2]
4,196,093
4,196,094
How do I safely cast between any numeric types with clipping if required?
<p>I'd like a function of the following form</p> <pre><code>template &lt;typename T, typename U&gt; U clipAndCast(T x) { ... return y; }, </code></pre> <p>where y is x cast to type U, but with x clipped if required so that this cast is well-defined.</p> <p>Is there a library or boost function do to this? I ...
c++
[6]
2,950,596
2,950,597
URL searching in iPhone program
<p>I am a new iPhone programmer.</p> <p>I am making a web based application. I'm taking the user input of a URL to a text box. When the button is pressed they will go to the web address.</p> <p>Now when user type the URL such as <a href="http://www.google.com" rel="nofollow">http://www.google.com</a>, then it works...
iphone
[8]
4,607,860
4,607,861
How to get referer url without the id?
<p>I use this code to get referer url:</p> <pre><code>&lt;?php echo $_SERVER['HTTP_REFERER']; ?&gt; </code></pre> <p>And the output is:</p> <blockquote> <p><a href="http://example.com/application/view/viewleave.php?idleave=1" rel="nofollow">http://example.com/application/view/viewleave.php?idleave=1</a></p> </bloc...
php
[2]
5,529,498
5,529,499
javascript data getting undefined
<p>Variable <code>CIMtrek_Attachement_1</code> getting undefined it is not checking the if condition it moving to this line <code>var selecteditems = CIMtrek_Attachement_1.split("\\");</code></p> <pre><code>var CIMtrek_Attachement_1= $("#CIMtrek_RegWhseCo_Attachement_1").val(); alert("CIMtrek_Attachement_...
javascript
[3]
4,860,545
4,860,546
where are my UIBarButtonItem & UIToolbar on UIPopoverController
<p>I have an iphone app, on the top of screen there is an UIToolbar, there are 2 UIBarButtonItem on the UIToolbar.</p> <p>One is 'Cancel' another is 'Confirm'. But if I migrate the project to ipad and present the view/ViewController using UIPopoverController, these two UIBarButtonItem &amp; UIToolbar disappear.</p> <...
iphone
[8]
1,329,545
1,329,546
Why does `type(myField)` return `<type 'instance'>` and not `<type 'Field'>`?
<p>I am confronted to a python problem. I want to use <code>type()</code> to find out what type of variable I am using. The code looks similar to this one: </p> <pre><code>class Foo(): array=[ myField(23),myField(42),myField("foo"), myField("bar")] def returnArr(self): for i in self.array: ...
python
[7]
5,624,960
5,624,961
jquery multiple click issue
<p>I have the following jquery code:</p> <pre><code>$(document).ready(function() { $("#build_table, a.coursename, .Start Date, .Book Title, .Book Author, .Book Isbn").click(function() { var whichButton = $(this).attr("class"); console.log("Whichbotton = " + whichButton); ...
jquery
[5]
3,626,418
3,626,419
construct an array of integers to achieve specific sequence
<blockquote> <p>construct the shortest possible sequence of integers ending with A, using the following rules:</p> <p>the first element of the sequence is 1, each of the successive elements is the sum of any two preceding elements (adding a single element to itself is also permissible), each element is lar...
c#
[0]
1,242,385
1,242,386
pythonic way to compare compound classes?
<p>I have a class that acts as an item in a tree:</p> <pre><code>class CItem( list ): pass </code></pre> <p>I have two trees, each with CItem as root, each tree item has some dict members (like item._test = 1). Now i need to compare this trees. I can suggest to overload a comparison operator for CItem:</p> <pre><c...
python
[7]
2,437,616
2,437,617
Does Adobe have an Android SDK or API for their PDF reader?
<p>I want to be able to display local PDF files in a View within our app. (running on a tablet under Android 4.03) Currently we install AdobeReader.apk along with our app and launch it with an Intent. (our devices are shipped with our software preinstalled) But that means it runs separately and we have no progra...
android
[4]
3,833,812
3,833,813
Joining multiple event handlers in Javascript
<p>How to join multiple event handlers in Javascript as in the following scenario :</p> <pre><code>onClick="doSomething();" onKeyUp="doSomething();" onLoad="doSomething();" </code></pre>
javascript
[3]
5,492,326
5,492,327
How to format output of methods inside of a class in an efficient way?
<p>I want to write a class with much stuff inside. Right now I want to have <strong>certain options for the output to show data in a disired format</strong>. Im my example a function inside a class should format the output (a former dictionary) as a list. But i really can't figure out how to do it...</p> <p>here my tr...
python
[7]
3,375,964
3,375,965
How to apply a fadeIn effect when adding rows to a table using jQuery
<p>I am currently adding rows to a table using the .insertAfter() funciton within my document.</p> <pre><code>$(document).ready(function () { CheckRowLength(); $("#add").click(function () { $('#querytable tr:last').clone(true).insertAfter('#querytable tr:last'); ...
jquery
[5]
5,663,478
5,663,479
Automatically set parent reference on child items
<p>I have a class that contains an <code>IList&lt;T&gt;</code> property called <code>Children</code>. Each child should reference its parent. My solution has been to set the <code>ChildClass.Parent</code> property in the <code>ParentClass.Children</code> getter. Is there a better way, or is this the best solution?</p> ...
c#
[0]
948,775
948,776
Partial to full expand/collapse w/ jQuery
<p>I'd like to write a function to allow to expand and collapse a div. It is not quite as straight forward though. If the div is more than 50px high I need to add an icon ("expand") to allow expanding it to a full height. And when it is fully expanded I need to change the style of the icon to ("collapse") and collapse ...
jquery
[5]
1,076,207
1,076,208
Java connecting to Http which method to use?
<p>I have been looking around at different ways to connect to URLs and there seem to be a few.</p> <p>My requirements are to do POST and GET queries on a URL and retrieve the result.</p> <p>I have seen</p> <pre><code>URL class DefaultHttpClient class HttpClient - apache commons </code></pre> <p>which method is best...
java
[1]
2,723,009
2,723,010
How to embed a php graph in a web-page
<p>I am using this script which is one of the examples provided by the graph itself. When I put this on a web-page by itself, it's drawing the graph. But when I embed the code in an already existing web-page (with some content), it doesn't draw a graph.</p> <p>I did the experiment using img src and its working fine. B...
php
[2]
1,566,158
1,566,159
Call javascript function with an href
<p>i'm developing a website, but i'm not an expert when it comes to javascript. I'm using a script that i found on the internet for searching the page for a text string. To call this function i use the following code:</p> <pre><code> &lt;div class="pesquisa" id="pesquisa"&gt;&lt;form name="f1" action="" onSubmit="i...
javascript
[3]
1,318,870
1,318,871
Javascript - sort objects in an array alphabetically on one property of the array
<p>Let's say you have a javascript class like this...</p> <pre><code>var DepartmentFactory = function(data) { this.id = data.Id; this.name = data.DepartmentName; this.active = data.Active; } </code></pre> <p>Let's say you then create a number of instances of that class and store them in an array...</p> <...
javascript
[3]
2,254,907
2,254,908
Sort Bitset in c++
<p>I am very new to c++ I am trying to reverse a binary how to do this ? is there any good algorthm to do this ?</p>
c++
[6]
5,056,589
5,056,590
divs display none ie6 and jquery toggle
<p>I am currently using display none for the divs which I would like to use jquery toggle on. As usual something in ie6 is not the same compared to other browsers. First of all display none is adding white space and secondly its doing something weird. Imagine there is a word called elephant in div 1 and there is nothin...
jquery
[5]
5,299,768
5,299,769
Web app on home screen (iphone style)?
<p>just wondering when I had an iphone I was able to create a web app then place some code in it so that when the user pressed "add to homescreen" an icon would be placed on the home screen and when the user clicked it the web app would run full screen (no web navigation bar) so it just looked like a normal app (althou...
android
[4]
3,698,520
3,698,521
How to simulate target="_blank" in JavaScript
<p>When a user clicks on a link, I need to update a field in a database and then open the requested link in a new window. The update is no problem, but I don't know how to open a new window without requiring them to click on another hyperlink.</p> <pre><code>&lt;body onLoad="document.getElementById('redirect').click"...
javascript
[3]
1,593,159
1,593,160
Is there any AJAX-like asynchronous callback method in Android?
<p>I was wondering if there is any way to create asynchronous callback functions in an android client similar to AJAX, binding an event handler to a 'response received' event. I am looking for something like this:</p> <ol> <li>Client sends data through POST or GET to the server and the app is not locked, waiting for r...
android
[4]
5,553,311
5,553,312
Keeping the format of file in c#
<p>In my project, I need to read from a file. But I don't want the format of file to be changed. When I use the common way of reading file in c#, for example the Header of the file comes to the left hand side or the bold words shown as an ordinary words. Can anyone help me and tell me how can I read the file in c# with...
c#
[0]
1,833,058
1,833,059
How to detect iphone4s
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/448162/determine-device-iphone-ipod-touch-with-iphone-sdk">Determine device (iPhone, iPod Touch) with iPhone SDK</a> </p> </blockquote> <p>I am using UIDevice (Hardware) by Erica Sadun to detect the device info....
iphone
[8]
3,167,465
3,167,466
UIButton is crashing the application
<p>Added UIButton to app</p> <pre><code>UIButton *playButton = [UIButton buttonWithType:UIButtonTypeCustom]; [playButton addTarget:self action:@selector(play:) forControlEvents:UIControlEventTouchUpInside]; UIImage *image = [UIImage imageNamed:@"play.png"]; [playButton setImage:image forState:UIControlStateNormal];...
iphone
[8]
5,988,185
5,988,186
Submit Universal apps to the apple app store?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/308290/procedure-to-submit-iphone-application-to-app-store">Procedure to submit iPhone application to App Store?</a> </p> </blockquote> <p>How to submit Universal apps to the apple app store</p>
iphone
[8]
2,981,546
2,981,547
A website with many good and small javascript libraries?
<p>I used to find a website with many good and small javascript libraries, but now I can't remember it now.</p> <p>Can someone tell me such a site?</p>
javascript
[3]
5,241,748
5,241,749
How to implement session handling in Java to be servlet container independent?
<p>AFAIK: <a href="http://www.freeopenbook.com/mysqlcookbook/mysqlckbk-CHP-19-SECT-4.html" rel="nofollow">Session handling is done by the servlet Container</a> (e.g. Tomcat, Glassfish...), i would prefer a solution which is servlet container independent, like php does it, implement some handler or filter and let the ap...
java
[1]
1,034,502
1,034,503
How to change status "Developer Action Needed" in In-App Purchase Feature
<p>My app was rejected earlier and I uploaded it again after resolving issues. I have implemented the In App Purchase feature in the app, but now its status is "Developer Action Needed" and I can see "Rejected" before the language I had selected to display the name of the app. I can't attach the screen shot as my reput...
iphone
[8]
688,877
688,878
How can i get from a directory string only the file name in the end?
<p>I have a <code>List&lt;string&gt;</code> that contain 5 files for example in index[0] I see:</p> <pre><code>D:\New folder (45)\converted.avi_Automatic\Lightning 2 Length 4 [276 - 280]\000276.bmp </code></pre> <p>The line is : </p> <pre><code>label22.Text = files[_indx].ToString(); </code></pre> <p>I want instea...
c#
[0]
5,283,328
5,283,329
How do I check the input data type of a variable in C++?
<p>I'm currently started learning C++, but i've one doubt about how to check the data type of input variable in c++.</p> <pre><code>#include&lt;iostream&gt; using namespace std; int main() { double a,b; cout&lt;&lt;"Enter two double values"; cin&gt;&gt;a&gt;&gt;b; if() //if condition false then cout&lt...
c++
[6]
1,939,241
1,939,242
converting files to utf-8 but character destroyed
<pre><code>foreach (var f in new DirectoryInfo(@"...").GetFiles("*.cs", SearchOption.AllDirectories)) { string s = File.ReadAllText(f.FullName); File.WriteAllText (f.FullName, s, Encoding.UTF8); } </code></pre> <p>but when converting characters get destroyed. How can i prevent that čćžšđ will not be destroyed?</p>...
c#
[0]
2,238,646
2,238,647
Compare same date using java
<p>The date is selected by the user using a drop down for year, month and day. I have to compare the user entered date with today's date. Basically see if they are the same date. For example the user entered 02/16/2012. And if today is 02/16/2012 then I have to display a message. How do I do it? I tried using mill...
java
[1]
4,138,313
4,138,314
Rename Files in a Directory
<p>I have 400 files in a directory (with <code>.png</code> extensions). They start with the name <code>005.png</code> and go up to <code>395.png</code>.</p> <p>I want to rename them using <code>os.rename</code>:</p> <pre><code>os.rename(006.png,005.png) </code></pre> <p>In other words, I want to shift all the number...
python
[7]
634,988
634,989
Creating a function in php that checks that get value is in the order dd/mm/yyy
<p>I'm currently building a room booking system and was wondering how to check if the user has entered a date (get value) in the correct UK format of dd/mm/yyyy.</p> <pre><code>$uk_date = $_GET["date"]; </code></pre> <p>For example to avoid a situation where the user types in 12/2012 or 2012 or uses the incorrect sep...
php
[2]
50,283
50,284
JDOM duplicate element name handling
<p>Say for eg I have an XML like this</p> <pre><code> &lt;Containers&gt; &lt;Container ContainerGrossWeight="0.69" ContainerGrossWeightUOM="lbs" ContainerScm="16757598166153847" TrackingNo="420913119102999949374063023016"&gt; &lt;/Container&gt; &lt;Container ContainerGrossWeight="4.84" Container...
java
[1]
2,079,939
2,079,940
Calculating future date with strtotime doesn't work properly
<p>If I run "next saturday" into strtotime function it shows 4/3/2010 as the date. Why does it not show 4/10?</p>
php
[2]
461,809
461,810
Why do we actually use getters and setters?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/565095/are-getters-and-setters-evil">Are Getters and Setters evil?</a><br> <a href="http://stackoverflow.com/questions/1568091/why-use-getters-and-setters">Why use getters and setters?</a> </p> </blockquote> <...
java
[1]
3,907,858
3,907,859
Click event for dynamically added li element?
<p>I am having totally 20 links.First 10 links directly visible to user and remaining 10 links shown when user hover the down arrow image(used for hover). When user click any one hover link, the link till the currently clicked are moved to left side(another down arrow used for add the right side links to left side dyna...
jquery
[5]
3,032,985
3,032,986
php: how to know what file has contains a php function that is called
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2222142/how-to-find-out-where-a-function-is-defined">How to find out where a function is defined?</a> </p> </blockquote> <p>in a client's website I have a php code:</p> <pre><code>return userHasActivePurchase($...
php
[2]
2,355,908
2,355,909
How to handle form action using php?
<p>In my home page, i had one submit button(form action $_SERVER[PHP_SELF]). By clicking submit button,(by some action), its shows me the "Accept" and "Reject" button. My "Accept" button(data should save in my database) is not at all working for me .(i pointed this also to form action $_SERVER[PHP_SELF]).But if i click...
php
[2]
3,508,043
3,508,044
Field has incomplete type const char * []
<p>I am trying tot pass argv from the main function of my program to the constructor of my class. I want to then set a field in my class to those values. I have <code>const char * _argv[];</code> in my header file. My constructor is:</p> <p><code>Sweeper(int argc, const char * argv[]){_argc = argc; _argv = argv;}</co...
c++
[6]
5,332,387
5,332,388
How do I instantiate an object when it's constructor expects enumerations?
<p>I have a class that uses enumerable data types. In it's constructor, it uses two of these. When I try to instantiate an object of this class from another file, I get an error.<br> Here is part of the code from the class:</p> <pre><code>public class Card { public static enum colorType {BLACK, RED}; public static e...
java
[1]
2,421,553
2,421,554
How to determine the current iPhone OS version at runtime and compare version strings?
<p>How can you determine and compare (>, &lt;, etc.) the current OS version of the iPhone that the app is running on? There is a certain bug in 3.0 but not in 3.1+ so I'd like to be able to skip out a bit of code if the current OS version is not >= 3.1. </p> <p>This needs to be at runtime not compile time!</p>
iphone
[8]
5,273,957
5,273,958
Delphi's like decision cube for c#
<p>I'm looking for a pivot table like component for winforms and c#, like the good-old decision cubes that came with Delphi decades ago. Any pointers?</p> <p>I need one able to be used independently of the underlying database, so capable of getting data programatically and not restricted to sqlserver olap or similar</...
c#
[0]
90,797
90,798
open google search page
<p>I have a text box , and user enters text on here , I want to know how can I handle this textbox so when users enters a text , It opens google search page and search that text , I do not want to using apis , just opens google website in browser and searches for text .</p> <p>thanks</p>
android
[4]
733,189
733,190
asp:SqlDataSource vs ADO.NET coding with C#
<p>I really do not have time to learn new language, in my case asp.net, but would like to start developing website in asp.net. I do not want to use asp:SqlDataSource control. is it ok if i write in codebehind aspx: all database connections and other CRUD operations in ado.net and c#. I already know xhtml, javascript - ...
asp.net
[9]
98,871
98,872
Re-doing the completed tasks when taking the background application
<p>I'm having a searching app, which will search the different restaurants nearby.</p> <p>In ICS based smartphones,</p> <ol> <li>I've launched my app and start searching a keyword at a particular location.</li> <li>Result was shown correctly</li> <li>Now i pressed the home button(without exiting the app) to move the ...
android
[4]
2,549,666
2,549,667
xml/rss file creater
<pre><code>&lt;channel&gt; &lt;title&gt;Company&lt;/title&gt; &lt;link&gt;http://www.ndroid360.com/companypms/index.php/main_con&lt;/link&gt; &lt;description&gt;Companypms - By Keyur Modi &lt;/description&gt; &lt;language&gt;en-us&lt;/language&gt; &lt;image&gt; &lt;title&gt;Company&lt;/title&gt; &lt;u...
php
[2]
4,561,302
4,561,303
Is there any way to prevent access to text files other than encryption?
<p>Basically I am implementing a dictionary and I dont want any user to access my dictionary .txt file. I need to access the file from my program. The txt files are too large that encryption method takes a lot of time to decrypt them. What other methods are there ?</p>
c++
[6]
2,766,711
2,766,712
how to do mailchimp API Integration in Java or PHP
<p>These functions will allow you to create, update, and even reuse campaigns for what we hope is the ultimate flexibility in campaign management. Once you have them ready, we also have several functions to allow you to send your campaigns to emails according to their status</p>
java
[1]
3,297,762
3,297,763
Web login system
<p>So here is my problem: I am designing a website for my project. So a user has got a role, stored as user_role in my database. User roles can be classified as 'police', 'ambulance', 'SMF' or 'fire'. So if the user logs in as 'police', he will be redirected to a specific page and if a user logs in as smf, he will b...
php
[2]
3,482,275
3,482,276
iPhone code forUIImageViewControllerPickerSourceTypeCamera
<pre><code>- (IBAction)pickAndDecode:(id) sender { UIImagePickerControllerSourceType sourceType; int i = [sender tag]; switch (i) { case 0: sourceType = UIImagePickerControllerSourceTypeCamera; break; case 1: sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; break; case 2: sourceType = ...
iphone
[8]
4,508,358
4,508,359
counting characters in php
<p>I want to count how many characters a certain string has in PHP, but I cant get it to work.</p> <p>I did a var_dump and this is what I got:</p> <pre><code>string(23) "Children&amp;#8217;s Center" </code></pre> <p>It seems like <code>'</code> gets translated to <code>&amp;#8217;s</code> </p> <p>This makes it impo...
php
[2]
448,206
448,207
PHP rCopy Set File chMod?
<p>I am using the following code to copy a folder and it's contents from location A to B.</p> <p>It's works file but I have a problem with the file ownerships...it's setting the copy to Nobody</p> <p>I've tried activating suPHP but my website broke so can't do that one.</p> <p>Are there any work arounds?</p> <p>Her...
php
[2]
1,287,817
1,287,818
Stop Infinite event handling for ui tabs
<p>I want to show an alert message if user click on second tan without submitting the form on the first tab, the problem I face of infinite alert messages that's show when user click on tab, here is the code I write</p> <pre><code> $(function() { $('#tabs').tabs({ selected:&lt;?php echo $param ?&gt;, ...
jquery
[5]
4,778,671
4,778,672
Bind JSONArray to adapter
<p>How would you go about to bind a <code>JSONArray</code> to an adapter, the adapter will be used to bind data to a spinner.</p> <p>Of course I could iterate over the strings in the <code>JSONArray</code> and add 'em to a String array, but that seems cumbersome.</p>
android
[4]
2,975,384
2,975,385
Use of #include <iostream.h>
<p>I am working on an older project that still has the deprecated "#include iostream.h" inclusions. I understand that iostream.h is deprecated and should not be used, but some of the systems that this code has to run/compile on are old solaris machines running CC and do not have iostream available. My question is: how ...
c++
[6]
5,280,386
5,280,387
Multiple periodic timers
<p>Is there any standard python module for creating multiple periodic timers. I want to design a system which supports creating multiple periodic timers of different periodicity running in just one thread. The system should be able to cancel a specific timer at any point of time.</p> <p>Thanks in advance for any input...
python
[7]