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,208,039 | 1,208,040 | Java endsWith() not working as expected | <p>I'm probably just overlooking something obvious, but I can't for the life of me figure out why this section of code is not working.</p>
<pre><code>if(txtFileLocation.toString().toLowerCase().endsWith(".twn")){
file = new File(txtFileLocation.getText());
} else {
file = new File(txtFi... | java | [1] |
728,014 | 728,015 | How can i get from a directory string only the file name in the end? | <p>I have a <code>List<string></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] |
3,422,670 | 3,422,671 | How $_POST works | <p>I am a beginner with PHP and I would really like to understand it a lot better. I know you can use $_POST to retrieve information from a form by setting method="$_POST". But why does this work exactly? Is, upon form submission, an array named $_POST created? Does the array then contain all of the element values from... | php | [2] |
1,647,083 | 1,647,084 | registerReceiver issue with in-app billing messages? | <p>I'm implementing in-app billing support in my application. I just realized that even though the application has been stopped, the standard billing broadcast receiver is still receiving billing messages from the market service. So, instead of declaring my receiver inside the manifest file:</p>
<pre><code> <rec... | android | [4] |
141,909 | 141,910 | What is the benefit of using getters and setters on properties in C#? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://programmers.stackexchange.com/questions/21802/when-are-getters-and-setters-justified">When are Getters and Setters Justified</a> </p>
</blockquote>
<p>Why do we use get and set method in C#? And why do we use public and private method prop... | c# | [0] |
4,435,852 | 4,435,853 | How to develop http handler which can handle multiple request | <p>here is my code ashx http handler which send something to client based on request. </p>
<pre><code>public void ProcessRequest(HttpContext context)
{
string startQstring = context.Request.QueryString["start"];
string nextQstring = context.Request.QueryString["next"];
//null check
if ((!string.IsNullO... | c# | [0] |
4,645,231 | 4,645,232 | Convert Hexa array to String | <p>I need convert this array</p>
<pre><code>data = [
#SHO
0x56, 0x0d,
#CMD
0x1, 0x00, 0x00, 0x00,
#ARG
0x1, 0x0,
#SIZE
0x02, 0x00, 0x00, 0x00,
#OPAQUE
0x01, 0x02,
#RESERVED
0x00, 0x00
]
</code></pre>
<p>and produce a string</p>
<pre><code># converted data into s
print s
</code></pre>
| python | [7] |
1,851,528 | 1,851,529 | how to remove a contact using context menu in android | <p>I try the following code to remove contact using context menu item selected by name.</p>
<pre><code>public static boolean deleteContact(Context ctx, String phone, String name) {
Uri contactUri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phone));
Cursor cur = ctx.getContentResolver().q... | android | [4] |
4,546,510 | 4,546,511 | Can someone show me how to properly write Math.cos or Math.acos for android | <p>I have tried writing this in android and I get NAN as the result.
this is my current code can someone verify this correct and if not offer me the correct equation. Thank you.</p>
<pre><code> Math.acos((((a*a)+(c*c))-(b*b))/(2*b*c));
</code></pre>
<p><img src="http://i.stack.imgur.com/L6bPJ.jpg" alt="enter image d... | java | [1] |
998,016 | 998,017 | Writing to HTML with inline javascript in Wordpress | <p>I'm trying to display an email address mailto link on a page from an array of email addresses. </p>
<pre><code><script type="text/javascript">
var arr = ["x@temple.edu", "y@temple.edu", "z@temple.edu"]; //my test array of email addresses
var which = Math.floor(Math.random() * 2); // stores a random #, 0-2
doc... | javascript | [3] |
2,174,650 | 2,174,651 | Tick method in a PoliceOfficer class | <p>My question deals with creating a tick procedure the original tick procedure where it makes a class called PoliceOfficer arrest everyone who is naked around him. </p>
<pre><code>def tick(self):
# next time step for all objects that tick
for t in self.__things:
obj = self.get_thing(t) ... | python | [7] |
1,800,618 | 1,800,619 | Button color should not change when I release the button in Android | <p>
</p>
<pre><code><item android:state_focused="true" >
<shape>
<gradient
android:endColor="#FF9900"
android:startColor="#FF9966"
android:angle="270" />
... | android | [4] |
3,322,720 | 3,322,721 | Find out value of child custom control from parent custom control at client side | <p>How to find out the value of child custom control from parent custom control on client side.</p>
| asp.net | [9] |
4,312,152 | 4,312,153 | Need barcode reader for my own app? | <p>I am developing an application for i-phone 4 and i-pad-2, in which i need to read bar-code to compare prices different site like e bay or amazon, I listened about z bar(open source) bar code reader i read its description in app store, but i can't find that does it support i-pad-2? One thing more i need to ask do you... | iphone | [8] |
1,663 | 1,664 | PHP: keeping the username in field | <p>How do i do if i want to keep the username in the field if the users entered incorrect password, so the person doesnt need to retype the username? Should i use sessions for this?</p>
| php | [2] |
4,079,440 | 4,079,441 | How to get the tail of a std::string? | <p>How to retrieve the tail of a <code>std::string</code>?</p>
<p>If wishes could come true, it would work like that:</p>
<pre><code>string tailString = sourceString.right(6);
</code></pre>
<p>But this seems to be too easy, and doesn't work...</p>
<p>Any nice solution available?</p>
<p>Optional question: How to do... | c++ | [6] |
5,971,583 | 5,971,584 | Trying to use Toast message, but get error | <p>I'm trying to use a Toast message inside a listener method, but I get an error saying something like: Toast is not applicable for the argument.. I don't understand this and can't solve this problem without some help? Thanks!</p>
<pre><code> // Button 1
button_1.setOnClickListener(new View.OnClickListener... | android | [4] |
4,151,546 | 4,151,547 | Send file via bluetooth between two android phone | <p>I want to write a programme for sending a file/image between two android phone. If I already have the dirtectory of my file/image,how can I write the programme?</p>
| android | [4] |
1,886,016 | 1,886,017 | In Java, how to iterate on the constants of an interface? | <p>in an interface, I store constants in this way (I'd like to know what you think of this practice). This is just a dummy example.</p>
<pre><code>interface HttpConstants {
/** 2XX: generally "OK" */
public static final int HTTP_OK = 200;
public static final int HTTP_CREATED = 201;
public static final ... | java | [1] |
4,537,021 | 4,537,022 | how to display spreadsheet like table in android with horizontal and vertical scrollbars | <p>I want to display excel sheet on android screen with horizontal and vertical scrollbars..plz help me.I have searched so much on net.thanks</p>
| android | [4] |
3,723,692 | 3,723,693 | Is there a way to indicate the DateTime object only has Date value? | <p>In the database, there are some field is TimeStamp and some are Date, which means some accept both Date and Time, some accept Date only.</p>
<p>I am trying to write a helper class that can generate the SQL by iternate through the data object's property, and generate proper SQL by the data type of the property.</p>
... | c# | [0] |
5,093,462 | 5,093,463 | Sidescrolling UI on iPhone | <p>Please lead me in the right direction.</p>
<p>I need to provide user with small text centered on the iPhone screen. User can make quick scroll left or right in order to get the next or previous text. There can be hundreds of such text pieces. The process itself is similar to Photo application sidescrolling but much... | iphone | [8] |
4,917,985 | 4,917,986 | Data storage for Android app | <p>I need to write an application with a lot of questions with 4 variant aanswer for each (tests, in short). Where to store the actual answers and the questions? Create a file, or use SQLlite, or Strinq.xml (although it seems this is the most desirable not).</p>
<p>If I use SQLlite, then for example, if somebody downl... | android | [4] |
5,874,693 | 5,874,694 | Add class to <li> based on content of link in <li> | <p>I've added a custom JavaScript file to my header via <code>functions.php</code> and the file is linked fine when I check the source code (listed well below the main call to jQuery). Within the custom JavaScript file I have added the following:</p>
<pre><code>$(document).ready(function(){
$('li.bawmrp_manual >... | jquery | [5] |
1,124,013 | 1,124,014 | python string replace unknown number | <p>I am a beginner with PYTHON and useless with regex and are struggling to replace an unknown number in a file with a new number. I have looked through the python how tos and examples for re but still can't make any progress on how to create the expression.</p>
<pre><code># myfile.txt
Some text
More text
Option "Bla... | python | [7] |
4,496,404 | 4,496,405 | Where to get detail description on understanding android | <p>I found lots of books on android which give basic concept on android Example (calling Activity, Intent, service, broadcast receivers etc). But I want to know brief description on all these concept. in os level or in api level how does it work. Also how connection with wifi or 3g works in api level. </p>
<p>I want t... | android | [4] |
5,120,576 | 5,120,577 | Pass 'this' from one function to another in javascript? | <pre><code>function removeNewsItem(id,idStamp,obj){
$('#whiteCover')show();
$('#contentOfBox').html= ('Are you sure you want ot completely remove this news item?<br/><br/><div style="text-align:center;"><input type="button" class="button blue medium" onclick="removeNewsItemConfirmed(\'' + id + '... | jquery | [5] |
1,164,856 | 1,164,857 | how to get indoor map of a mall in iphone | <p>hi my requirement is show an indoor map of a mall selected by user. and then show route between two shops inside mall and also i want to show navigation path, when user moves from from one location to another inside the shop it will update on map i.e the current location of user , i have done lots of google there... | iphone | [8] |
5,485,243 | 5,485,244 | Embedding Google Maps & Changing Location every 5 seconds | <p>Im trying to create an app which tracks the ISS. From what I've determined from the internet there aren't any xml based location sites available that allow me to scrape the location from the site and use that location on google maps.</p>
<p>However there are plenty of sites that utilise Javascript applications; the... | android | [4] |
3,383,622 | 3,383,623 | Keeping only a certain line and deleting the rest in C# | <p>I was wondering if anyone could give me a quick example of how to do this. What I want to do is parse a .txt file and delete everything but lines containing "Type: Whisper", is there any way to achieve this with relative ease?</p>
| c# | [0] |
881,767 | 881,768 | Android Preview Format when use SetPreviewDisplay in Camera | <p>If I use 'setPreviewDisplay' in the Camera, like the api below</p>
<p>public final void setPreviewDisplay (SurfaceHolder holder)</p>
<p>What kind of format will be passed to SurfaceHolder for display? Is it NY21 or YV12?</p>
<p>Thank you.</p>
| android | [4] |
3,915,784 | 3,915,785 | Php Difference between compile time and run time polymorphism | <p>In case of php, what is the difference between runtime and compile time polymorphism</p>
| php | [2] |
5,586,868 | 5,586,869 | Monitor/logging who signs into the asp.netapp? | <p>I want to have a log file keep rows of who logs in and timestamp. is there a place to do this? And what sort of code is needed?</p>
| asp.net | [9] |
5,895,901 | 5,895,902 | Java is not showing proper Timezone conversion for CDT | <p>I tried to get time difference in java but for CDT as TimeZone in java it's not calculating daylight saving. if i am using CST as TimeZone in java then it's calculating daylight saving.can any one tell me what to do? I am getting this CST / CDT from System and can't use any other thing other than this. is there an... | java | [1] |
2,993,834 | 2,993,835 | Job queuing library/software for Java | <p>The premise is this: For asynchronous job processing I have a homemade framework that:</p>
<ul>
<li>Stores jobs in database</li>
<li>Has a simple java api to create more jobs and processors for them</li>
<li>Processing can be embedded in a web application or can run by itself in on different machines for scaling ou... | java | [1] |
1,417,894 | 1,417,895 | Add UIToolbar to UIViewController | <p>How to add <code>UIToolbar</code> to the below <code>UIViewController</code>.</p>
<pre><code>PageOneViewController *viewController = [[PageOneViewController alloc] init];
[self presentModalViewController:viewController animated:YES];
[viewController release];
</code></pre>
<p>This <code>UIViewController</code> i... | iphone | [8] |
1,429,982 | 1,429,983 | Need a good way to store Name value pairs | <p>I often run into a situation where I want to have a set of key/value pairs. Here's a pseudo code idea:</p>
<pre><code>DataSet MyRequestStatus
{
Accepted = "ACC",
Rejected = "REJ"
}
</code></pre>
<p>Usage:</p>
<pre><code>InsertIntoTable(MyRequestStatus.Accepted.ToString())
</code></pre>
<p>I want to be able ... | c# | [0] |
5,844,767 | 5,844,768 | How to implement a product (video or audio) for sale in a PHP based website | <p>I'm a complete noob when it comes to php. I can implement a site and do minimal coding (trying to get better), but for what I want to do, I'm not even really sure of the correct search terms so I can research. What I'm trying to do is to allow users to go to a certain section of my site that requires them to login. ... | php | [2] |
2,695,143 | 2,695,144 | Response.Redirect and IFrames | <p>I have a Main.aspx page and a Sub.aspx page.</p>
<p>The Sub.aspx page resides in my Main.aspx page via IFrame. So the IFrame contains / loads the Sub.aspx</p>
<p>In another Third.aspx completely unrelated I've got some code that needs to redirect back to Main.aspx but then there are some querystrings that need to... | asp.net | [9] |
1,618,925 | 1,618,926 | usleep() causing everything to "sleep" | <p>I have two php scripts and when I call one that has a loop with usleep() in it, it delays the execution of complete other script?</p>
<p>Any ideas why this would be?</p>
<p>Thanks!</p>
| php | [2] |
2,450,278 | 2,450,279 | Show mp4 and 3gp files for selection in Android | <p>I have an app where i need to select video files of .3gp and .mp4 format only. I use the following code. It shows only 3gp files , how do i show mp4 files also?</p>
<pre><code>intent.setType("video/*");
intent.putExtra("only3gp", true);
</code></pre>
<p>Please help.</p>
| android | [4] |
1,085,915 | 1,085,916 | How to Stop musicplayer when I detach headphones? | <p>I want to stop the currently running MusicPlayer when the user unplugs the headphones (both wired & bluetooth).</p>
<p>I came across sevral posts where use of:</p>
<pre><code>isWiredHeadsetOn(), isBluetoothA2dpOn()
</code></pre>
<p>is suggested.</p>
<p>But Android docs says isWiredHeadsetOn() is deprecated. ... | android | [4] |
4,919,873 | 4,919,874 | array in c#.net1 | <p>I need to understand how to scan values in to a jagged array using loops in Csharp.net. Kindly request to get the answer as fast as possible.</p>
| c# | [0] |
4,939,468 | 4,939,469 | How Do I Place Auto-generated Java Classes in a Single .java File? | <p>As everyone knows - public java classes must be placed in their own file named [ClassName].java </p>
<p>( <a href="http://stackoverflow.com/questions/3263122/when-java-class-x-required-to-be-placed-into-a-file-named-x-java">When java class X required to be placed into a file named X.java?</a> )</p>
<p>However, we ... | java | [1] |
5,691,572 | 5,691,573 | Error with ckfinder fo asp.net | <p>i want a file manager for select image from host and prevent user from upload extra images.
i found ckfinder but i get error when i wanted to build project.
i didnt change anything i just copied CKFinder folder to my project, and pressed Build button</p>
<p>Error 15 The type or namespace name 'Design' does not e... | asp.net | [9] |
36,278 | 36,279 | asp.net session security | <p>If I put some pretty sensitive information in a session variable, how secure is it? Can it be access by a client writing a rogue page and making an ajax call to my application? </p>
<p>Thanks.</p>
| asp.net | [9] |
1,168,266 | 1,168,267 | C++ Cout array values with upper and lower limits | <p>I have an array of prime numbers from 2 to 997. How do you display array values with upper and lower limits? For example:
Upper and lower limits: 0 20
Output:
2, 3, 5, 7, 11, 13, 17, 19</p>
| c++ | [6] |
2,506,857 | 2,506,858 | javascript: overriding (not just defining) a function in if statement | <p>I have the following javascript.</p>
<pre><code>var f = function() { ... };
if (x === 1) {
// redefine f.
f = function() {
...
};
}
</code></pre>
<p>Is that code valid ?
In other words can I redefine a javascript function inside an if statement where I actually write the code. </p>
<p>I am wo... | javascript | [3] |
5,523,103 | 5,523,104 | java servlet programming errror | <pre><code>C:\Tomcat5.5\webapps\WEB-INF\classes>javac MyServlet.java
MyServlet.java:2: package javax.servlet does not exist
import javax.servlet.*;
^
MyServlet.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
MyServlet.java:5: cannot find symbol
symbol: class HttpServlet
public class ... | java | [1] |
5,696,568 | 5,696,569 | In jQuery, how do you select textbox that has a value of multiple spaces? | <p>I need to select such textboxes so as to validate required field. How do I go about doing it? Seems I can use a if statement, but I'm not sure how to implement.</p>
<p>I wrote the following required field validator to test for empty textboxes, but cannot detect textboxes with multiple spaces. Am I not doing validat... | jquery | [5] |
1,054,719 | 1,054,720 | Javascript - use class name to specify which variable to assign value to | <p>I'm trying to be clever with some efficient Javascript but it's causing me headaches and lots of fruitless searching.</p>
<p>I have a set of inputs in a table, each with a given class:</p>
<pre><code>...
<tr>
<td><input name="name" type="text" class="markertitle"/></td>
<td><input ... | javascript | [3] |
3,199,486 | 3,199,487 | How to handle null value while executing the query | <p>suppose there 5 column in my table info(id,loginid,pagename,pagecount,detail).
I am executing the query like, select the pagename when loginid=somthing and id =something.But in column that is pagecount(int) and pagename(varchar),I am not putting any thing ,so it consider as null.When execute the query,result shows t... | asp.net | [9] |
5,090,376 | 5,090,377 | How does operator chaining happen in C++? | <p>I have a totally basic C++ question here.</p>
<pre><code>#include <iostream>
using namespace std;
int main() {
int a = 255;
cout << hex << a << endl; // <-----
}
</code></pre>
<p><strong>In the code piece above, how is the <code>std::cout</code> statement chained?</strong></p>
... | c++ | [6] |
2,307,613 | 2,307,614 | How to 'copy and paste' an element in jQuery? | <p>I'm making a simple lightbox. If you click on an image, it takes that image and shows it full screen with a black background behind it.</p>
<p>Here is my code:</p>
<pre><code>$('.theContent img').live('click', function(e) {
var lbImg = $(this);
$('#lb').toggle();
$('#lb').find("#lbImg").append(lbImg); ... | jquery | [5] |
2,087,128 | 2,087,129 | Python Programming | <p>this is the problem I am working on. I have been programming for a total of 9 days so I am very new. I am attempting to write a function that generates a random integer between -1,200 and 1,200, and returns a statement dependent of the number. The statements are: number generated: is greater than 800, return ‘Heidi... | python | [7] |
5,244,027 | 5,244,028 | Is this really saving allocation? | <p>I've got the following in a static Utility class:</p>
<pre><code>static int[] MonthDays = new int[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
public static int[] GetListOfAllDaysForMonths()
{
return MonthDays;
}
</code></pre>
<p>Is this efficient in that now by call... | c# | [0] |
3,565,223 | 3,565,224 | How can i change the path to a specific folder | <p>the folder structure is like this:</p>
<p>plugin->upload->php->files</p>
<p>list-></p>
<pre><code>'script_url' => $this->getFullUrl().'/'.basename(__FILE__),
//'upload_dir' => dirname(__FILE__).'/files/',
//'upload_url' => $this->getFullUrl().'/files/',
'upload_d... | php | [2] |
1,599,006 | 1,599,007 | XHTML valid way to replace text with jquery | <p>I have the following code</p>
<pre><code>$("#FOO").hover(function() {
$(this).html('<p><a href="somepage.php" target="_self">first text</a></p>');
}, function() {
$(this).html('<p><a href="somepage.php" target="_self">hovered text</a></p>');
});
</code></p... | jquery | [5] |
161,986 | 161,987 | JQuery popup works on load, but then reloads | <p>I am trying to make a simple popup without extensions to jquery. The popup load on page load like it should, but the problem I am having is making some way to close the popup without it automatically re-initating when I do so.Which it currently does, because it is attached to $(document).ready(. Thanks :)</p>
<pre>... | jquery | [5] |
2,250,117 | 2,250,118 | Issues overriding onKey in View.OnKeyListener | <p>I am new to Android programming and relatively new to programming in general so please bear with me here...</p>
<p>I am trying to implement an EditText field and I am having problems with overriding onKey. </p>
<p>I found a couple of errors and fixed them but when I compile I get the following error:</p>
<pre><co... | android | [4] |
5,485,007 | 5,485,008 | jQuery prevent other events after a click | <p>I am trying to prevent multiple clicks on links and items, which is causing problems.</p>
<p>I am using jQuery to bind click events to buttons (jQuery UI) and image links (<code><a><img /></a></code>).</p>
<p>Is there a way to do-once-for-all prevent other events from firing after a click occurs?... | jquery | [5] |
4,748,329 | 4,748,330 | android is hang while android don't find connection | <p>I am creating an android application but while(if?) server is not found, it will hang the tool kit (SDK/emulator?).
I have attached my login code. Please help me to find the solution. I just want that if server is not available, my application will stay on at the login page without hanging itself.</p>
<p>when I de... | android | [4] |
4,768,886 | 4,768,887 | simple create pdf file with hard code | <p>I have generated pdf programatically bt problem is text doesnt appear in pdf.
PLz provide me simple example of pdf creator.</p>
<p>This is my code :</p>
<pre><code>-(void) MyCreatePDFFile //(CGRect pageRect, const char *filename)// 1
{
CGRect pageRect=CGRectMake(10,10,400,600);
const char *filename="/Users/mson... | iphone | [8] |
1,980,277 | 1,980,278 | Diferent integer values | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/8427416/why-is-true-for-some-integer-objects">Why is == true for some Integer objects?</a> </p>
</blockquote>
<p>I have code fragment</p>
<pre><code>Integer i1 = new Integer(a);
Integer i2 = new Integer(b);
if ... | java | [1] |
1,856,055 | 1,856,056 | Finding the path of resource folder? | <p>Is there any way (programmatically) that i can find the location of "Resource" folder. I want to create a new file in it at run time. </p>
| iphone | [8] |
4,216,241 | 4,216,242 | Is there a method that will check if a point intersects a rectangle? | <p>So, Apple includes a <code>CGRectIntersectsRect</code> method which checks if two rectangles are intersecting each other, but do they have a method that I can use the checks if a CGPoint intersects a CGRect? Or do I just have to implement that myself?</p>
| iphone | [8] |
5,852,793 | 5,852,794 | Empty list returned from saving function | <p>This what I asked to do:</p>
<blockquote>
<p><code>save_friends(filename, friends_list)</code> takes a file name and a friends list and writes that list to thefile in the correct format. So, for example,
save_friends('friends.csv', load_friends('friends.csv'))
should overwrite the friends le with exactly the ... | python | [7] |
1,205,523 | 1,205,524 | Android assest folder image attachment to email failed | <p>I'm trying to send a mail attaching assest folder image to the mail, mail is sent successfully, but when i checked it there was no image attached to the mail,
this is my code,</p>
<pre><code>Uri uri = Uri.fromFile(new File("file:///android_asset/Hat_5.png"));
Intent intent = new Intent(Intent.ACTION_SEND);
intent.... | android | [4] |
2,698,958 | 2,698,959 | Get instanceof type out of an array without if statements | <p>Note: This is an abstracted version of my problem as a lot of actual code would probably be confusing and irrelevant to the problem.</p>
<p>I have an array/ArrayList of objects that all inherit their information from another class.</p>
<p>For example</p>
<pre><code>class A
class B extends A
class C extends A
c... | java | [1] |
1,602,390 | 1,602,391 | python: append values to a set | <p>i have a set like this:</p>
<pre><code>keep = set(generic_drugs_mapping[drug] for drug in drug_input)
</code></pre>
<p>how do i add values <code>[0,1,2,3,4,5,6,7,8,9,10]</code> in to this set?</p>
| python | [7] |
4,977,247 | 4,977,248 | function return different objects | <p>I have a function(myFunction) with parameter v, I hope it can return different object depend the value of v.</p>
<p>something like below:</p>
<pre><code>-(NSString*)myFunction:(NSInteger)v;
-(NSNumber*)myFunction:(NSInteger)v;
</code></pre>
<p>Is it possible?</p>
<p>Welcome any comment</p>
<p>Thanks interdev</p... | iphone | [8] |
1,986,276 | 1,986,277 | Starting service from a class extending applicaiton android | <p>I am trying to call a service from a class extending android. The service in turn is starting some threads. When i m stopping the service from list of running services, the <code>onDestroy()</code> of the service is not getting called.</p>
<p>But when i m stopping the service which is started from an activity its <... | android | [4] |
3,511,775 | 3,511,776 | Wait for writing file | <p>I have an small app that write data to file then reading back data, </p>
<pre><code>writeData();
readData();
</code></pre>
<p>but it seems that readData() is executed before WriteData() finished its execution, is there any away to wait for writeData()?
<br>Thank you very much.</p>
| java | [1] |
1,029,271 | 1,029,272 | C# reading data from a csv file, with 8 columns, and sorting it | <p>So I am trying to read a csv file that essentially is a list of data separated by words, and I what I have done so far is used ReadAllLines and then from there separated with text.Split(',');
The only problem is I just read about this sort of list/array class method rather than creating an actual array, so I have no... | c# | [0] |
206,816 | 206,817 | jquery loop functions | <pre><code>function character_1() {
$("#character_1").animate({"top": "0"}, 3000, function() {
$(this).fadeOut(2000);
character_2();
});
};
function character_2() {
$("#character_2").animate({"top": "0"},3000, function() {
$(this).fadeOut(2000);
character_3();
});
};
fu... | jquery | [5] |
4,552,729 | 4,552,730 | how to detect day light saving in java | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1305350/how-to-get-the-current-date-and-time-of-your-timezone-in-java">How to get the current date and time of your timezone in Java?</a> </p>
</blockquote>
<p>I have developed a Attendance System and in use for... | java | [1] |
977,224 | 977,225 | How to update meta tags using jQuery | <p>I had tried using </p>
<pre><code>$('meta[name=description]').attr('content', 'new value');
</code></pre>
<p>But the above is not working in any browser.</p>
<p>Please suggest</p>
| jquery | [5] |
1,503,561 | 1,503,562 | While loop stop at first false condition | <p>I have this <code>while</code> loop:</p>
<pre><code>//All of this code is inside a for loop
positionUp = i - 1;
while ((positionUp > 0) && boardMatrix[positionUp][j] == boardMatrix[i][j]) {
//do something
positionUp--;
}
</code></pre>
<p>At some point, it is possible that <code>positionUp</co... | java | [1] |
4,906,432 | 4,906,433 | Any Rotation cause event not to fire android | <p>I'm developing rotating layout with some image buttons over it, without rotation the Image button events works fine, but when I rotate the layout the button events keep the previous place of the button not the new place so when I click it it fire the event of another button and this is not good</p>
<p>I have tried ... | android | [4] |
5,693,344 | 5,693,345 | Selection of a specific inline style | <p>how can I select only the divs with style "right:200px" in jquery?</p>
<p>Example:</p>
<pre><code><div class="test" style="position:absolute; right:200px; top:10px;"><p>Hello</p></div>
<div class="test" style="position:absolute; right:300px; top:20px;"><p>Hello</p></div... | jquery | [5] |
4,762,757 | 4,762,758 | Copy values from one object to another | <p>Anyone have a suggestion for a good utility class that maps values from one object to another? I want a utility class that uses reflection and takes two objects and copies values from the 1st object to the second if there is a public property with the same name.</p>
<p>I have two entities that are generated from a ... | c# | [0] |
4,947,686 | 4,947,687 | how to add internal frame inside a jdialog | <p>i am using the following code :</p>
<pre><code> JDialog d=new JDialog();
JInternalFrame i=new JInternalFrame("HI",false,false,false,false);
i.setPreferredSize(new Dimension(100,100));
d.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
d.setTitle("Wait dialog");
d.add(i);
d... | java | [1] |
1,642,644 | 1,642,645 | From login page text box text to be display on File page lable | <p>Please can any one help me on this. I am using c# , .net, jquery.</p>
<p>I am trying to show login page textbox user id(when user enters) on
file upload page lable. How to write jquery code here. It has to show user id on lable when file upload page load.
I know how to write code for textbox and lable are in same p... | jquery | [5] |
1,492,619 | 1,492,620 | Content Sliding | <p>I have this mark up.</p>
<pre><code><ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Page</a></li>
</ul>
<section id="home">...</section>
<section id="about">...</section&... | jquery | [5] |
2,692,723 | 2,692,724 | Will two same strings read from the System.in be stored in a common memory location? | <p>Suppose we have program like this:</p>
<pre><code>import java.io.*;
public class ReadString {
public static void main (String[] args) {
// prompt the user to enter their name
System.out.print("Enter your name: ");
// open up standard input
BufferedReader br = new BufferedReader(new ... | java | [1] |
1,635,616 | 1,635,617 | Run my application in background when i start device power on in android | <blockquote>
<p><strong>Possible Duplicates:</strong><br>
<a href="http://stackoverflow.com/questions/2912209/how-to-create-startup-application-in-android">how to create startup application in android?</a><br>
<a href="http://stackoverflow.com/questions/1056570/how-to-autostart-an-android-application">How to Auto... | android | [4] |
5,492,322 | 5,492,323 | const vs new const | <p>No matter what I Google, there doesn't seem to be an answer for this! In a C# class, what does the new keyword do to a const field?</p>
<p>e.g:</p>
<pre><code>private const int ConstOne = 0;
private new const int ConstTwo = 0;
</code></pre>
| c# | [0] |
1,393,579 | 1,393,580 | Access to classes and functions from outside the application | <p>consider we have a program which manages collision detection between 100 rects(Rectangles).
and we have a class or function for collision detection between two rects (CCollisionCheck or CollidsTo ... for example).
and consider for some rects , we have some conditions which affect the collision detection.
for example... | c++ | [6] |
4,623,305 | 4,623,306 | Loading settings from an ini/xml file | <p>How do I load a setting from an external xml file located in the same folder as my program? Or should I be using an old school .ini file? It is only the MySQL server name and a location name that I need to pass to my App.</p>
| c# | [0] |
6,009,752 | 6,009,753 | How to make medical summaries files from java application | <p>I have made a program in Java which is used to collect medical data (personal, diagnosis,treatments) from people with cancer. In this program you fill the forms and all these data are then stored to a database. </p>
<p>Now, what I want to make: if the user selects to see a patient's data, I want to give him the po... | java | [1] |
2,708,266 | 2,708,267 | Black status bar turns white when quitting iPhone app | <p>I gave my iPhone app a black status bar by adding the UIStatusBarStyleOpaqueBlack / UIStatusBarStyle to the Info.plist file. It works great most of the time. The black status bar shows when the app is running and when the Default.png is being shown. </p>
<p>The issue is when I quit the app by pressing the home butt... | iphone | [8] |
5,405,473 | 5,405,474 | how to go to a particular part of the code to execute it in jquery? | <p>Using this snippet code below, how do I loop back to the line that says: </p>
<pre><code> var boxTextWidth = 0;
</code></pre>
<p>and continue excuting from there, like a goto type of execution.
I don't want the $.post line and lines above it to execute</p>
<pre><code> $("#left,#a-z_left").change(f... | jquery | [5] |
232,961 | 232,962 | PHP check IF non-empty, non-zero | <p>I get the width and height of image with getimagesize function, like below:</p>
<pre><code>list($width,$height) = getimagesize($source_pic);
</code></pre>
<p>How can I use IF condition to check that the getimagesize function executed without error and $width and $height got non-empty, non-zero values?</p>
| php | [2] |
5,068,751 | 5,068,752 | Check what error value is in ajax callback | <p>How can I check what the error value returned is in ajax callback error : </p>
<pre><code>$.ajax({
url: "myurl",
type: 'POST',
dataType : "text",
data : ({
json : myjson
}),
success : function(data) {
},
e... | jquery | [5] |
4,264,978 | 4,264,979 | Do I need to edit the ServerManagedPolicy in the Android licensing library? | <p>I am using the LicenseChecker and ServerManagedPolicy in the com.google.android.vending.licensing library. I am quite confused though as I review some of the code there. There are comments in ServerManagedPolicy that state the following:</p>
<p>"You must manually call PreferenceObfuscator.commit() to commit these... | android | [4] |
1,623,877 | 1,623,878 | How to store each row of the csv file to array in php | <p>I have data in csv file as follows.</p>
<p>Mr,Vinay,H S,Application Engineer,vinay.hs@springpeople.com,99005809800,Yes
Mr,Mahammad,Hussain,Application Engineer,vinay.hs@springpeople.com,99005809800,Yes</p>
<p>I want to store each row in each array.explain me how to do that </p>
| php | [2] |
3,760,593 | 3,760,594 | jquery toggle display | <p>I'd like to create a list and be able to toggle the display of children items on click. Should be simple but i can't get it to work. Any thoughts?</p>
<pre><code><script>
$(document).ready(function(){
$("dt a").click(function(e){
$(e.target).children("dd").toggle();
});
});
</script>
<style>... | jquery | [5] |
455,079 | 455,080 | ListView Adapter with Dictionary from xml | <p>I want to set an adapter to a ListView where the ListView's items are a Dictionary.
And for localization purposes, I would prefer that the items are defined in xml below the "values" folder.</p>
<p>At the moment, I use a simple list with strings, where the array is defined in \values\arrays.xml</p>
<p>But I don't... | android | [4] |
1,498,436 | 1,498,437 | Race condition between Application onCreate and resources loaded? | <p>I have the following application class for my app. When the application starts, I want to get some settings from preferences and start a background service.</p>
<pre><code>public class MyApplication extends Application {
public void onCreate() {
SharedPreferences preferences = PreferenceManager.get... | android | [4] |
228,130 | 228,131 | find hour or minute difference between 2 java.sql.Timestamps? | <p>I store a java.sql.Timestamp in a postgresql database as Timestamp data type and I want to find out the difference in minutes or hours from the one stored in the DB to the current timestamp. What is the best way about doing this? are there built in methods for it or do I have to convert it to long or something?</p>
| java | [1] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.