Unnamed: 0 int64 65 6.03M | Id int64 66 6.03M | Title stringlengths 10 191 | input stringlengths 23 4.18k | output stringclasses 10
values | Tag_Number stringclasses 10
values |
|---|---|---|---|---|---|
3,829,583 | 3,829,584 | Why does my comparison always return false? | <p>I have bunch of usernames in this arraylist and I want to check whether username exists in the arraylist or not but the method always returns false.</p>
<pre><code>public bool check_username(ArrayList userList, string username)
{
for (int i = 0; i < userList.Count; i++)
{
if (userList[... | c# | [0] |
1,219,335 | 1,219,336 | extracting file name from a link saved | <p>i have saved a link a database which looks like this</p>
<pre><code>~\quizes\314757_499034200123763_1508831626_a.jpg
</code></pre>
<p>i used the following code to extract the filename </p>
<pre><code>Uri uri = new Uri(BulletedList1.DataValueField.ToString());
string filename=Path.GetFileName(uri.LocalPath... | c# | [0] |
3,706,966 | 3,706,967 | Do functions attached to the prototype property not have closure | <p>I am trying to figure out how I can add methods to a constructor after I have created it.<br>
In my code below, I cannot use Person's prototype property to add a new public method which has access to Person's vars. (Do the functions attached to the prototype property not close over the vars in the main function).<br... | javascript | [3] |
2,310,359 | 2,310,360 | Get URL of ASP.Net Page in code-behind | <p>I have an ASP.Net page that will be hosted on a couple different servers, and I want to get the URL of the page (or even better: the site where the page is hosted) as a string for use in the code-behind. Any ideas?</p>
| asp.net | [9] |
1,928,861 | 1,928,862 | Launching activity from another application not displaying the activity, but it is running | <p>I've done a lot of searching for the last day and haven't found anything that seems to match the problem I'm having.</p>
<p>(For reasons I won't go into) the app is divided into two separate apks. Each have activities. Only the "core" apk has a MAIN activity that is launched from the Android Launcher. The "plugin" ... | android | [4] |
3,178,346 | 3,178,347 | When Open From Background | <p>I see the delegate has the 'didFinishLaunchingWithOptions' for when the first app first loads. I know each page has the DidLoad and WillAppear.</p>
<p>Is there a method/function/class or whatever these things are called for when the app is opened while it is in the background. Either the user clicks it from the bot... | iphone | [8] |
4,486,893 | 4,486,894 | Textarea like the one here in stackoverflow | <p>I have a website that allows it's members to make posts. To make the post, they have to enter their text in a box similar to this one. However, I would like for them to be able to edit the content with html tags (but not abuse this privilege by changing the background color or something using pure html). In addition... | javascript | [3] |
2,477,701 | 2,477,702 | Regular expression for checking any word of at least one letter | <p>Regular expression for checking any word of at least one letter</p>
<p>examples:</p>
<p>fish (right)<br>
fish12 (right)<br>
123 (wrong)<br>
T (right)<br>
12n(right) </p>
| php | [2] |
3,535,086 | 3,535,087 | I need to show/hide elements with jquery | <p><a href="http://jsfiddle.net/MEKRM/" rel="nofollow">http://jsfiddle.net/MEKRM/</a> This is my fiddle</p>
<p>I want to show / hide elements when i click Next / Previous. However, IDs will be generated dynamically(mysql echo). Any ideas how i can proceed? Thanks </p>
| jquery | [5] |
2,097,036 | 2,097,037 | why java doesn't support pointers? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/6924236/why-cant-we-use-pointers-in-java">Why can't we use pointers in Java?</a> </p>
</blockquote>
<p>I want to know are there any pointer concepts in java?</p>
<p>I know that there is no explicit declarat... | java | [1] |
5,208,005 | 5,208,006 | In Java, is 'new' a type of function? | <p>My apologies if this is a silly question. In Java, I just found out that the following code is legal:</p>
<pre><code>KnockKnockServer newServer = new KnockKnockServer();
KnockKnockServer.receiver receive = newServer.new receiver(clientSocket);
</code></pre>
<p>FYI, receiver is a helper class wi... | java | [1] |
363,968 | 363,969 | C# Function Similar to PHP Eval() | <p>I'm looking for a way to display code snippets stored in a database on a webpage with .NET and C# and I saw the exact function that I was looking for a while back, but I cannot remember what search terms I used or the name of the C# function that designed to do that specifically. </p>
<p>Essentially, it's a C# vers... | c# | [0] |
5,643,816 | 5,643,817 | Breakpoints are not fired | <p>I am doing one application. I am developing my application in</p>
<p>Xcode version 4.2(4c199) with iOS 5.0(9A334) and iPhone simulator(9A334).</p>
<p>I have iPhone 4 with iOS 5(9A334) device also.</p>
<p>My problem is when I am running the application in my device, breakpoints are not fired. I was suggested to f... | iphone | [8] |
2,584,077 | 2,584,078 | JQuery coding problem | <p>I'm really new to Jquery and I know my code below is wrong. Can someone help me fix it so it works properly?</p>
<p>Here is my code.</p>
<pre><code>$(document).ready(function() {
setTimeout(function() {
$('a.delete').click(function(){
$("div.delete-banner").delay(6000).fadeOut();
// prevent defau... | jquery | [5] |
4,810,604 | 4,810,605 | Is there a quasi-standard set of attributes to annotate thread safety, immutability etc.? | <p>Except for a blog post here and there, describing the custom attributes someone created, but that do not seem to get any traction - like one describing how to <a href="http://blogs.msdn.com/b/kevinpilchbisson/archive/2007/11/20/enforcing-immutability-in-code.aspx">enforce immutability</a>, another one on <a href="ht... | c# | [0] |
5,063,467 | 5,063,468 | background color not working as expected | <p>I'm trying to apply a custom RGB color to background, but it is not displaying the intended color, instead it always shows white:</p>
<pre><code>UIColor *color = [UIColor colorWithRed:76 green:76 blue:76 alpha:1.0];
mainTable.backgroundColor = color;
self.scrollView.backgroundColor = color;
</code></pre>
<p>... | iphone | [8] |
3,369,444 | 3,369,445 | jQuery and getting back to default settings | <p>I have following piece of code:</p>
<pre><code>$(document).ready(function(){
$("#cont").hide();
$("#slide").show();
$('#slide').click(function(){
$("#cont").slideToggle();
$("#slide").css("background-image", "url('img/slideup.png')");
});
});
</code></pre>
<p>The code simply calls of the... | jquery | [5] |
2,485,709 | 2,485,710 | How to play video from application bundle in iPhone | <p>I have a video in my iPhone application documents directory. I am want to play that using mpmovieplayercontroller. can some one post code to do this.</p>
<p>Thanks,
Naresh</p>
| iphone | [8] |
3,932,898 | 3,932,899 | Get file(name) in the dictionary as key and all directories(if file is in) as the value | <p>I have directories and subdirectories, I want to get all the files in the dictionary and also directories into dictionary... Like this:</p>
<p>{'randomfile': '.\map\randomdirectory' , '\map\map2' , \somerandom\map\map3'}</p>
<p>Where key is file(name) and all the directories where this file exsist are in value.</p... | python | [7] |
4,657,280 | 4,657,281 | singleton and classic constructor | <p>This question is fairly fundamental.I gave a simple and straighfoward test on my cygwin:</p>
<pre><code> class Example {
public:
Example(){ cout<<"dude..."<<endl; }
~Example(){ cout<<"see ya"<<endl; }
public:
static Example *GetInstance(){
if(m_instance==NUL... | c++ | [6] |
1,405,713 | 1,405,714 | javascript button target_blank? | <p>I have a button that links to a website, but i want it to open in a new window. I know its probably a dumb question but i am very new to javascript. Below is my code. it works but opens in the same window. I have tried a few things and they just arent working</p>
<pre><code><input type="button" value="eStore"
... | javascript | [3] |
2,559,344 | 2,559,345 | Not able to invoke jquey Ajax method for fileupload input value | <p>I am trying to invoke the serverside method from the jquery. It is working fine in FireFox but not in IE8 and IE9.</p>
<p>Please find the below code sample :</p>
<pre><code> <div>
<asp:FileUpload ID="flAppIcon" runat="server" onchange="GetFileSize();"/>
<asp:HiddenField ID="_hdnAppIcon" ru... | jquery | [5] |
5,417,670 | 5,417,671 | [Python]How to convert/record the output from subprocess into a file | <p>I am using subprocess module, which Popen class output some results like:</p>
<p>063.245.209.093.00080-128.192.076.180.01039:HTTP/1.1 302 Found
063.245.209.093.00080-128.192.076.180.01040:HTTP/1.1 302 Found</p>
<p>and here is the script I wrote:</p>
<pre><code>import subprocess, shlex, fileinput,filecmp
proc = su... | python | [7] |
3,711,137 | 3,711,138 | PHP - How to display print_r() live | <p>Is it possible to have print_r() displayed live. By live I mean while the script is executed. I do not want to wait the end of the script to have it displayed. Hope I am clear. Thank you in advance for your replies. Cheers. Marc</p>
| php | [2] |
5,927,315 | 5,927,316 | Not getting the full text in output | <p>I have 2 text files , from which I match the second column of txt1 with first column of txt2 before <code>|</code> , well I just mention it below , than I output if they are same , along with its discription , everything is going fine , but I didn't get the <code>new line discription</code> in the output , it just s... | python | [7] |
118,023 | 118,024 | Making a char** with std::? | <p>I have an opengl function that requires a const char**. So essentially a vector of strings. I was wondering if this could be done using the C++ Standard Library without making a vector of <code>const char*</code> which would demand heap allocation.</p>
| c++ | [6] |
5,183,858 | 5,183,859 | Developing an ExpressionBuilder | <p>I am planning to build an expressionbuilder, in which the expressions will be supplied in string format. Is there a way to write a grammar or parse the expressions to validate them for their proper formation and then execute them.</p>
<p>I would like to accomplish this in C# programming language. However, a common ... | c# | [0] |
4,828,029 | 4,828,030 | scrollbar plugin doesn't always work, is there a preload or something I can do? | <p>So here is the site: <a href="http://graysonearle.com/newtest/#prettyPhoto/6/" rel="nofollow">http://graysonearle.com/newtest/#prettyPhoto/6/</a>
That takes you to a little window with a sidebar housing some images. I'm using lionbar, which is great, but it only works 50% of the time. This is not a typical web probl... | jquery | [5] |
1,111,666 | 1,111,667 | What is difference between jquery parse and jquery load ? Isn't load and parse same thing? | <p>Difference between parsing data and loading data?</p>
| jquery | [5] |
1,334,850 | 1,334,851 | jQuery: extend method - how to save/keep/do not break the initial reference? | <p>Here is an example.</p>
<p><a href="http://jsfiddle.net/R9V4p/" rel="nofollow">http://jsfiddle.net/R9V4p/</a></p>
<p>Is it possible to make <code>s.c==60</code> at the end and do not overlap provided values with default ones?
For example i have provided <code>testing</code> function with <code>s.clean=true</code> ... | jquery | [5] |
4,047,109 | 4,047,110 | Count Down Clock doesn't return when time ran out. | <p>I'm using code from this answer: <a href="http://stackoverflow.com/a/6501353/494901">http://stackoverflow.com/a/6501353/494901</a></p>
<p>Basically when the timer ends, I want it to return true to my functions such that when it's over I can do stuff only after it's over. But the script is never returning, it ends,... | javascript | [3] |
5,825,579 | 5,825,580 | Sorting HashMap | <p>I have an <code>ArrayList</code> of <code>HashMap</code>. Each <code>HashMap</code> contains many key-value-pairs. I want to sort the <code>ArrayList</code> by the value of the key <code>distance</code> in the <code>HashMap</code>.</p>
<pre><code>ArrayList<HashMap<String, String>> arrayListHashMap =
... | java | [1] |
4,790,710 | 4,790,711 | Launching application on iPhone for non-developer | <p>Say I have created an application, and I want my friend to have it. (I am not going to submit it to the App Store; I just want my friend to run it on her iPhone). </p>
<p>I am not going to give the code, but is there any way I could create something like an <code>.exe</code> file, where she could launch it easily ?... | iphone | [8] |
3,413,672 | 3,413,673 | "java.net.MalformedURLException: Protocol not found" read to html file | <p>I receviced an error: <code>java.net.MalformedURLException: Protocol not found</code></p>
<p>I want to read an HTML file on the web</p>
<pre><code>mainfest ::::: uses-permission android:name="android.permission.INTERNET"
uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"
import com.doviz.R... | java | [1] |
1,536,287 | 1,536,288 | Jquery loading Problem | <p>I have a JSP Page like Below</p>
<pre><code>< html >
< head >
< head >
< script type="text/javascript" src=../../jquery.js">
</head>
<script type="text/javascript">
$().ready(function() {
alert("Page Is Loading....");
// Do Some
});
</script>
< body >
< s... | jquery | [5] |
381,499 | 381,500 | how to parse a list to get a value | <p>I need some ideas on how to parse a list and print a specific value,Lets say I want to parse dependsontext and then just print the number "249452",please suggest ideas</p>
<pre><code>INPUT:-
dependsontext = [{u'isCurrentPatchSet': True, u'revision': u'ad0beef66e5890cde6f0961ed03d8bc7e3defc63', u'ref': u'refs/chang... | python | [7] |
332,076 | 332,077 | excluding certain files from a search within an array of names | <p>This function grabs all the jpegs from folders which match the page name and prints a background image. On the homepage it searches all the sub directories and chooses one at random. What i would like is to exclude (on the homepage only) certain files which match an array of names...can anyone help?</p>
<pre><cod... | php | [2] |
70,323 | 70,324 | Getting objects from an Array | <p>I may be doing this very badly but I'm new to this!
if I have an array that contains objects like this</p>
<pre><code>var company = [H7 = {companyName:"company1"},F4 = {companyName:"company2"}]
</code></pre>
<p>If I get a reference as a string say "F4" is there any way I can go</p>
<pre><code>myCompName = company... | jquery | [5] |
822,767 | 822,768 | Window.innerheight minus number in javascript | <p>I need a way in javascript to get the inner window height minus 90px.</p>
<p>I know how to get the inner height from te window by using 'window.innerheight' but i dont know how to get the 90px of it.</p>
<p>Can anybody help me?</p>
<p>Thanks</p>
| javascript | [3] |
4,975,571 | 4,975,572 | $.map object properties to a new array with similar names | <p>I have the following array of objects:</p>
<pre><code>var blah = [
{ foo: 1, bar: 2 },
{ foo: 2, bar: 1 }
];
</code></pre>
<p>I would like to change the property names from <code>foo</code> to <code>Foo</code> and <code>bar</code> to <code>Bar</code>. So I gave <code>jQuery.map</code> a try. However, I'm n... | jquery | [5] |
2,646,544 | 2,646,545 | Android application download on SD card | <p>Can Android application request to download on SD card in android 2.1 and lower.
Also I want to know if the application can request some folders that contain videos to download on the sd card ? and how to do that ?</p>
<p>Thanks in advance.</p>
| android | [4] |
1,810,924 | 1,810,925 | "on" not binding to dynamically added elements | <p>My HTML</p>
<pre><code><div>
<span class="more-available" data-completeMessage="This is the complete message you see after clicking more">Hello</span>
</div>
</code></pre>
<p>I add a anchor tag to the end dynamically and then want to attach a click handler to the anchor tag. So I ... | jquery | [5] |
950,206 | 950,207 | How are POST and GET variables handled in Python? | <p>In PHP you can just use <code>$_POST</code> for POST and <code>$_GET</code> for GET (Query string) variables. What's the equivalent in Python?</p>
| python | [7] |
1,684,310 | 1,684,311 | Python urllib.urlretrieve Exception Handling | <p>Download the file to half, or because of network problems cause an error or a timeout when downloading this to do with them?</p>
| python | [7] |
2,638,036 | 2,638,037 | Access from one linked object to another | <p>I have a problem in my c++ project. I compile 2 <code>.cpp</code> files and linked them to a shared
library <code>.so</code>. I want to use a method form one of them to another,but receive <code>undefined reference vtable *</code>. Those files have header files. Anyone can provide any hint?</p>
| c++ | [6] |
2,577,332 | 2,577,333 | ASP.NET Viewstate Optimization/Analyzing Tools | <p>Are there any tools for analyzing the controls in an ASP.NET page, to make sure they do not need to use the viewstate?</p>
<p>We are trying to optimize a website written in C# asp.net 3.5 , and wanted to see if a tool would automatically analyze the project and make recommendations.</p>
| asp.net | [9] |
3,310,075 | 3,310,076 | Android Dev - Text based game within an app | <p>I am looking to add a simple text based trivia type game within an app I already have built for a Business. We would like to get more user interaction in the app. Further, I would like to have high scores...etc display in the app. </p>
<p>Creating a web serice and MySQL database would be simply enough to capture sc... | android | [4] |
1,832,170 | 1,832,171 | Does findViewById have any side effects? | <p>I'm looking at some code that has a call to <code>findViewById</code> without assigning the result or doing anything with it, and want to make sure that's safe to remove. Is there ever a case where someone might call this without doing anything with the result?</p>
| android | [4] |
3,720,067 | 3,720,068 | How to play audio file of format wav in android webview? | <p>This is my code: mp3 format file plays without any error, but wav format brings MediaPlayer error(1,-1):</p>
<pre><code>try {
MediaPlayer player = new MediaPlayer();
player.setAudioStreamType(AudioManager.STREAM_MUSIC);
player.setDataSource("h*.wav");
player.prepare();
player... | android | [4] |
2,548,831 | 2,548,832 | How can I run cygwin from Java? | <p>I want to start nutch from Java. How can I start cygwin from a Java program?</p>
| java | [1] |
5,928,189 | 5,928,190 | Outgoing call duration when it received | <p>Can anybody tell me that how to get outgoing call duration when it received from other side in android.</p>
<p>Thanks in advance ..</p>
| android | [4] |
879,843 | 879,844 | add commas using String.Format for number and | <p>Using String.Format how can i ensure all numbers have commas after every 3 digits
eg 23000 = "23,000" and that 0 returns "0".</p>
<p>String.Format("{0:n}", 0); //gives 0.00 which i dont want.
I dont want any decimal places, all numbers will be integers.</p>
| c# | [0] |
5,814,384 | 5,814,385 | Running the app in AVD without opening the Eclipse | <p>I hav created Calcy app in Eclipse. It is running in Emulator properly. </p>
<p>But i want to run it using AVD manager .</p>
<p>the command for installing the app is "adb install Calcy.apk"</p>
<p>but it is giving the message that </p>
<pre><code>C:\Android\android-sdk\platform-tools>adb install Calcy.apk
25... | android | [4] |
4,811,004 | 4,811,005 | Facing problem while importing project into the workspace | <p>I had the same issue before and tried many ways to slove it. Now it is working fine with importing project. Now am facing some related issue that is, there are some apiDemos in the plugin with my friend. I have copied it and tried to import it into the workspace but here is the same problem again showing that it h... | android | [4] |
5,876,545 | 5,876,546 | java Arrays.binarySearch problem | <pre><code>String[] sortedArray = new String[]{"Quality", "Name", "Testing", "Package"};
// Search for the word "cat"
int index = Arrays.binarySearch(sortedArray, "Quality");
</code></pre>
<p>i always get -3. problem is in "Name". Why i can not have "Name" in my array? Any idea?</p>
| java | [1] |
2,180,871 | 2,180,872 | How do i add words to the suggestions on top of the soft keyboard | <p>Is there any way to add words to the suggestions in the soft keyboard?
For a specific Edittext field i would like to add a list of names to the suggestions that pops up on top of the soft keyboard in android 2.0.</p>
<p>Does anyone know if this is possible?</p>
| android | [4] |
887,226 | 887,227 | put comma after values but not for last one | <p>I am just a beginner in php. I used the following code to display the user names fetched from the database.</p>
<pre><code>$select_tl = "SELECT `varTeamleader` FROM `tbl_team` WHERE `intTeamid` = '" . $id . "'";
$select_tl_res = mysql_query($select_tl);
$select_tl_num = mysql_num_rows($select_tl_res);
if ($select_t... | php | [2] |
5,513,191 | 5,513,192 | What settings in php.ini should I adjust for php to accept data from javascript? | <p>I just installed LAMP. Everything seems to be working fine except when I send data from js to php via ajax, php does not receive the data sent. I suspect this has to do with a setting in php.ini but I don't know which to change. My js ajax function looks like this: </p>
<p>function ajax (url, data_to_be_sent, ca... | php | [2] |
4,875,648 | 4,875,649 | Javascript Number Formatting | <p>Certainly a stupid question, please forgive me. My customer wants decimal numbers to display with five digits. For example: 100.34 or 37.459. I was accomplishing this with <code>val.toPrecision (5);</code>; however, when my numbers get really small, I stop getting what I want. For example, if my number is 0.000347, ... | javascript | [3] |
49,561 | 49,562 | How to stop truncation in JavaScript number division | <p>In Java we use the double or float data type to get results in decimal points. However how do i do this in Javascript? The current calculation i am doing is:</p>
<pre><code>a1 += (a1 * results[0][index]) / 100;
</code></pre>
<p>EDIT, My Apologises, There was a mistake on my side from using the wrong variables. </... | javascript | [3] |
476,112 | 476,113 | Android Maps api release key not working | <p>I looked over all the stackoverflow questions related to this, but nothing worked. Sorry if this is asked already.</p>
<p>I have the Google maps api integrated into my app, and everything works fine in development. I got a debug api key based on the debug.keystore file and it works just fine.</p>
<p>Then I went ah... | android | [4] |
3,379,220 | 3,379,221 | jQuery selecting row inserted using | <p>I'm successfully inserting a row into my table via</p>
<pre><code>$('#fbs tr:last').after('<tr><td><input id="vm" type="checkbox" /></td></tr>');
</code></pre>
<p>However after that I'm trying to select $('#vm') and not receiving anything. Everything looks right but jQuery isn't find... | jquery | [5] |
498,271 | 498,272 | circular image flow using javascript | <p>is there any free javascript library like <a href="http://finnrudolph.de/ImageFlow/Examples#Enable_circular_mode" rel="nofollow">http://finnrudolph.de/ImageFlow/Examples#Enable_circular_mode</a> for GPL License? i like the ciruclar mode image rotate, but they uses Creative Commons Attribution-Noncommercial 3.0 Unpo... | javascript | [3] |
6,009,737 | 6,009,738 | Jquery Question about toggling a layer | <p>Website <a href="http://bit.ly/euXvuJ" rel="nofollow">http://bit.ly/euXvuJ</a></p>
<p>I'm doing the following to toggle the mouse. But when your mouse travels about half way down on the #sideshoppingcart div, the whole div goes away.</p>
<pre><code>$(document).ready(function() {
$("li#menu-item-170").hover(fu... | jquery | [5] |
4,909,569 | 4,909,570 | Android 4.0 x86 full can install on all PC | <p>I want a download link for Android 4 x86 full
install on pc
- support all device
- support numpad
- support all resolution
and any feature for working perfect and download size not important for me</p>
| android | [4] |
4,778,225 | 4,778,226 | PHP & Implementing .Netish Properties | <p>I've decided to have some fun, and implement .Net Properties in PHP. </p>
<p>My current design centers around something like:</p>
<pre><code>$var;
method Var($value = null)
{
if($value == null) {
return $var;
}
else {
$var = $value;
}
}
</code></pre>
<p>Obviously this runs into a bit of an issue if someone is t... | php | [2] |
1,074,858 | 1,074,859 | $_SERVER VARS are empty | <p>I'm using PHP 5.3.12 on a Windows system , i am trying to use some of the <code>$_SERVER</code> variables, but the following <code>$_SERVER</code> variables are empty for me</p>
<pre><code>$_SERVER['SERVER_NAME']
$_SERVER['SERVER_PORT']
$_SERVER['REQUEST_URI']
</code></pre>
<p>i have set <code>ServerName</code> in... | php | [2] |
1,459,703 | 1,459,704 | PhP Undefined Variables | <p>Okay, so I'm trying to teach myself php off of other peoples code; Some of the code is probably outdated, but it works for going through the essentials until I have time to go to school. My issue is an Undefined Variable error. All I can find on the subject at this time is how to hide the error, but I'm not looking ... | php | [2] |
474,445 | 474,446 | How to invalidate 3D list view with fresh data during rotation? | <p>I have downloaded 3D list View code.And I changed it to my requirement. Now the problem is that, I displayed data on each row of Listview, but the data do not invalidate continously, instead it invalidate during scrolling.</p>
<p>Please tell how can i invalidate 3D ListView during rotation/stop with streaming data ... | android | [4] |
5,411,888 | 5,411,889 | when to use Function in javascript? | <p>I have been writing javascript for one or two months , I never used Function keyword , like Function.method(); when I define function , I simply define it as :</p>
<pre><code>function fooBar () {};
</code></pre>
<p>Can you give me an example when using Function is more convenient ?</p>
| javascript | [3] |
1,091,820 | 1,091,821 | Do I need two new List<ParentDetail>() constructors? | <p>I have the following class called Parent. It contains a list of ParentDetail classes:</p>
<pre><code>public class Parent
{
public Parent()
{
this._parentDetails = new List<ParentDetail>();
}
public IList<ParentDetail> ParentDetails
{
get { return _parentDetails; }
... | c# | [0] |
1,479,023 | 1,479,024 | regular expression to remove li in php | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3308530/php-strip-a-specific-tag-from-html-string">PHP: Strip a specific tag from HTML string?</a> </p>
</blockquote>
<p>Hi All,</p>
<p>I want to remove li from a string. I'm using following regular expression,... | php | [2] |
5,548,910 | 5,548,911 | How to create this selector | <p>I want create a selector like this on clicking on a div it must show other options like in image and after selecting another option it must show the selected value in div.</p>
<p><img src="http://i.stack.imgur.com/bgDHs.jpg" alt="enter image description here"></p>
<p>this image is from <a href="http://translate.g... | jquery | [5] |
1,567,410 | 1,567,411 | How to determine an Android View's size in pixels? | <p>Is there a direct programmatic way to get a fill_parent View's pixel height and width? For instance a view in a grid layout in a tab. Or do I have to get the window size and subtract the static sizes of the views around it?</p>
| android | [4] |
3,983,478 | 3,983,479 | How to set Countdown Screen As Home Screen Wallpaper in Android.? | <p>In My application, I make one countdown Screen for remaining days (like Countdown the days till Christmas) and now i want to make that screen as a Home Screen Wallpaper.</p>
<p>like this : </p>
<p><img src="http://i.stack.imgur.com/Wya3b.png" alt="enter image description here"> </p>
| android | [4] |
394,848 | 394,849 | Service runs then dies | <p>I'm running Win 7 Pro 64-bit. I wrote a service in C# using the .NET 4 framework. It installs properly and starts to run. I know that it runs because it writes some output to a log file. However, after a few seconds it dies. When I use Visual Studio 2010 Pro to run this same code not as a service it never dies.... | c# | [0] |
1,565,607 | 1,565,608 | Is there any drawback of not closing the file after reading it? | <p>I often do not close the file after reading it</p>
<pre><code>for line in open(FileName):
# do something
</code></pre>
<p>I also reopen the file again in the same program.</p>
<pre><code>for line in open(FileName):
# do something else
</code></pre>
<p>My question is whether there are any drawbacks in thi... | python | [7] |
3,104,457 | 3,104,458 | Why while loop stop executing on 1 loop, when there is inside another loop? | <p>Example:</p>
<pre><code><?php
$text= "Taigi dabar skaiciuojam zodzius";
$zodziai = str_word_count($text, 1);
$skaicius = str_word_count($text, 0);
$n = 0;
$i = 0;
while ($i++ < 5) {
echo $zodziai[$n++]; echo ' ';
$i = 1;
while ($i <= 10) {
echo $i++;
}
}
?>
</cod... | php | [2] |
1,440,562 | 1,440,563 | Check format of URL | <p>I need a Java code which accepts an URL like <code>http://www.example.com</code> and displays whether the format of URL is correct or not.</p>
| java | [1] |
4,503,999 | 4,504,000 | Need help with foreach and XML | <p>I have the following output (via link) which displays the var_dump of some XML im generating:</p>
<p><a href="http://bit.ly/aoA3qY" rel="nofollow">http://bit.ly/aoA3qY</a></p>
<p>At the very bottom of the page you will see some output, generated by this code:</p>
<pre><code>foreach ($xml->feed as $entry) {
... | php | [2] |
1,467,251 | 1,467,252 | I want to learn Knockout js framework plz give some suggesstion | <p>I want to learn knockout js. which site is more helpful for learn things. Give some link. If you know familiar plz give overview of this framework.</p>
| javascript | [3] |
4,514,814 | 4,514,815 | What is the idea behind creating levels for iPhone games? | <p>I want to know how different levels are made in iPhone games like "AngryBirds". Do they have some large array which has locations where to put the brick or something? How do those kinds of levels are developed? </p>
| iphone | [8] |
4,513,950 | 4,513,951 | Trying to call a function in javascript | <p>This is my code all I need to do is call a function which will write the contents to a dynamic div</p>
<pre>
<script language='javascript' type='text/javascript'>
function getComments(id)
{
alert(id);
}
var resultSet="";
function CreateDiv()
{
resultSet+="<br/><div id='"+rows.data[i].id+"'></di... | javascript | [3] |
2,149,609 | 2,149,610 | Best way to get data from "clean" and "dirty" URLs | <p>I'm writing an application that gets data from URLs, but I want to make it an option whether or not the user uses "clean" urls (ex: <a href="http://example.com/hello/world" rel="nofollow">http://example.com/hello/world</a>) or "dirty" urls (ex: <a href="http://example.com/?action=hello&sub=world" rel="nofollow">... | php | [2] |
4,471,351 | 4,471,352 | Enabling/Disabling the menu item from another thread | <p>I am trying to change a menu item from another thread. I am able to use the InvokeRequired/Invoke on other controls, but since the menu item is not a Control, I am having difficulty in achieving the same functionality.</p>
<p>For other controls, I am doing this:</p>
<pre><code>private delegate void SetControlEnabl... | c# | [0] |
5,454,390 | 5,454,391 | BCL easypdf missing jars in trial | <p>I am trying to run <a href="http://www.pdfonline.com/easypdf/sdk/programming-pdf/java/raster-pdf-to-image.htm" rel="nofollow">this program</a> given on easypdf site. i downloaded their trial version. installed it. but jars are missing i guess. can u plz tell me how to execute this program? thanx</p>
| java | [1] |
3,432,984 | 3,432,985 | Test iPhone App on physical iPhone rather than simulator | <p>I've just made a basic Hello World app for the iPhone. Compiling and running works fine for iPhone Simulator. But now I'd like to put it on my real physical iPhone, to test it. Is there any way to do this, or do I have to pay $100, put it in the app store and download it (with the chance Apple doesn't like it and ju... | iphone | [8] |
480,736 | 480,737 | comparing object identifier with string | <p>is there any possibilities to compare object identifier with string idiom without adding any member e.g. string variable variable to the class? </p>
<pre><code>struct ObjectExample {}ObEX;
string St;
cin >> St >> endl; // you enter ObEX
// What I need to reach is this comparing
if(obEX == St)
{........ | c++ | [6] |
4,780,367 | 4,780,368 | Android Proximity Alerts | <p>Does android Proximity Alerts works even if the phone is totally sleep? </p>
| android | [4] |
2,908,220 | 2,908,221 | Restrict user from switching to video mode | <p>I have requirement in my application in which when he choose take photo option,he should only be allowed to capture photo and cannot switch to video mode. And same for choosing the photo from photolibrary he should only be allowed to choose from available photos, he should not be allowed to choose video.How can I re... | iphone | [8] |
5,936,958 | 5,936,959 | Javascript : is given function empty? | <p>Let's have a function call</p>
<pre><code>function doSomethingAndInvokeCallback(callback){
// do something
callback();
}
</code></pre>
<p>I can check if given argument is function <code>if(typeof callback == 'function')</code> </p>
<p>How can I discover, if given callback function is function and isn't e... | javascript | [3] |
845,949 | 845,950 | Help refactoring this C# function | <p>I have written functions that look like this:</p>
<pre><code>bool IsDry(bool isRaining, bool isWithUmbrella) {
if (isRaining) {
if (isWithUmbrella)
return true;
else
return false;
}
else
return true;
}
</code></pre>
<p>I need to check, if it's raining, th... | c# | [0] |
4,252,171 | 4,252,172 | Bounded stack of integers C++ | <p>Hey, just doing some revision for upcoming exams and i'm looking at a past paper.</p>
<p>I'm asked to write the class implementation for this:</p>
<pre><code>class Stack
{
public:
Stack(int n=1);
int pop();
void push(int);
int isEmpty();
int isFull();
˜Stack();
... | c++ | [6] |
2,717,933 | 2,717,934 | How do I check if System.Data.SqlClient.SqlTransaction has an active transaction? | <p>I have a method which I use to execute all my SQL queries (inserts, updates, delete) and I want to put a check in to make sure the change is within a transaction before the code is executed but I can't find a property against the <code>SqlTransaction</code> to check for.</p>
<p>How should I proceed?</p>
<p>Note: I... | c# | [0] |
1,135,983 | 1,135,984 | get a cookie value from document.open(ed adress) | <p>I want to use JavaScript's <code>document.open(url)</code> to open a website and run JavaScript on it to view a "specified cookie"</p>
<p>For example:</p>
<pre><code>var newone= document.open(mysite)
newone.onload = alert(document.cookie.specified_one)"
</code></pre>
| javascript | [3] |
2,045,832 | 2,045,833 | Store data in executable | <p>I'm just curious about this for a long time.</p>
<p>Is it possible for an application to store some changeable data (like configurations and options) inside its own executable? </p>
<p>for example: is it possible to design a single executable which if a user ran, set some configurations, copied it into another PC,... | c++ | [6] |
2,228,290 | 2,228,291 | android draw rect | <p>is there any way to move the Rect drawn by touching</p>
<p>it should keep on moving when touch action_move..... any one could help with a solution?</p>
<p>thanks in advance</p>
| android | [4] |
2,943,118 | 2,943,119 | Trigger a function (code) at particular time | <p>I have created a small app, but I want it to execute automatically at a particular time. The time must be entered by the user.</p>
<p>For example :
If my activity is, to start a particular game and I enter 5:30pm as the time, it should run that game at 5:30pm automatically, even if I close the application after I ... | android | [4] |
4,106,086 | 4,106,087 | What are the proper dimensions for a background image in an android app? | <p>I would like to create a background image for my app in Photoshop. I understand that I will need to create three different files at the appropriate dpi for ldpi, mdpi and hdpi. But what are the appropriate dimensions and resolutions for each?</p>
| android | [4] |
3,176,440 | 3,176,441 | ASP.net XMLSiteMap Rol Not Logged In | <p>I am using a XMLSitemap to show my menu.
In my menu I have a node "Log in". But I only want to show this to the visitors who are not logged in. (Not to everyone like what the "*" does).
Is there a rolename for those visitors or something like that?</p>
<p>This is my XML SiteMap</p>
<pre><code><?xml version="1.0... | asp.net | [9] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.