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,127,233
1,127,234
Module pattern | Private access to passed in reference
<p>Suppose I have someFunction() that has a public prototype function giveMeAccess() available to the user. </p> <p>Now suppose I want this prototype method to have access to Private variables inside the function that returned it..</p> <p>Is there any way to do this?</p> <p>Yes this has an application as strange as...
javascript
[3]
5,301,142
5,301,143
Javascript to image cycle
<p>Simple request, but I don't know how to do it. I've got a series of 10 images (image0.gif, image1.gif image2.gif etc...) that need to change to the next image in the sequence (cycling around after 9) when another image is pressed. This is what I have so far...</p> <pre><code> &lt;html&gt; &lt;head&gt;&lt;/hea...
javascript
[3]
2,836,827
2,836,828
Create waveform of audio file in android
<p>I want to create the wave forms of audio file in android. Can anyone provide me an example source code?</p>
android
[4]
5,862,065
5,862,066
Input (Scanner) variable in while loop
<p>Im trying to make the program to ask for a percentage (grade) but I want it to ask again after the user has made the first input and has seen the output. I'm having trouble with the loop because the variable myMark is no assigned. </p> <pre><code>import java.util.Scanner; public class passFail{ public static ...
java
[1]
4,740,500
4,740,501
Is it possible to populate an ICredentials object with the current user context?
<p>I need to call a webdav function, and this requires credentials. The user that the rest of the c# code runs under has access to this external website where the webdav function executes. </p> <p>How can I pass the executing users credentials through to the webdav function without manually specifying the username + p...
c#
[0]
2,190,360
2,190,361
Empty "using" statement in Dispose
<p>Recently I've seen some code written as follows:</p> <pre><code>public void Dipose() { using(_myDisposableField) { } } </code></pre> <p>This seems pretty strange to me, I'd prefer to see <code>myDisposableField.Dispose();</code></p> <p>What reasons are there for using "using" to dispose your objects over expli...
c#
[0]
3,067,475
3,067,476
Multiple setTimeout functions but that goes off with different times
<pre><code>switch (e.keyCode) { case 32: $("#Main").prepend('&lt;div class="Bomb" style="absolute; top:' + position.top + 'px; left: '+ position.left +'px;"&gt;&lt;/div&gt;'); setTimeout( function(){ var BombPos = $('.Bomb').position(); var BombPosTopb = BombPos.top; ...
jquery
[5]
3,412,583
3,412,584
Where would I get Microsoft Chart Control sample codes?
<p>Can anyone please tell me where would I get Microsoft Chart Control sample codes ? Link will be sufficient.</p>
asp.net
[9]
4,575,120
4,575,121
jquery got error event change on select element
<p>I got error </p> <blockquote> <p>"Use of attributes' specified attribute is deprecated. It always returns true. return !val || val.specified ? elem.value : elem.text;"</p> </blockquote> <pre><code> $(document).ready(function(){ $("#o_productCategory").change(function(e){ $.getJSON("URI", ({"pare...
jquery
[5]
1,424,294
1,424,295
How to start another program without having to wait on it in C++?
<p>How can I make a C++ program start another program/process (C++ specifically) and not wait for it to end? (so <code>system()</code> won't work here because it starts the other program/process as child, right?)</p> <p>I was thinking about starting the second program/process on another thread or something but I'm not...
c++
[6]
5,533,431
5,533,432
How java import works
<p>I would like to know how the <code>import</code> works. </p> <p>I'm asking this, because I have the following <code>imports</code> in my project</p> <pre><code>import static com.googlecode.javacv.jna.highgui.cvCreateCameraCapture; import static com.googlecode.javacv.jna.highgui.cvGrabFrame; import static com.googl...
java
[1]
3,321,321
3,321,322
AVD Manager - No system image installed for this target
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/13488419/unable-to-create-android-virtual-device">Unable to create Android Virtual Device</a> </p> </blockquote> <p>The CPU/ABI field in Android New AVD popup window shows "No system image installed for this tar...
android
[4]
4,049,294
4,049,295
get mouse coordinates relative to a div position doesn't work in firefox
<p>Why doesn't the example code below work in my browser, firefox v. 19.0.2?</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;style&gt; #example { position: absolute; top: 20px; left: 50px; width: 300px; height: 300px; background-color: #C00; } &lt;/style&gt; &lt;script type="text/javascript" src="http://code.jquery.com/j...
jquery
[5]
2,083,215
2,083,216
select data from row error
<p>I have some code which selects data from a row. It is working and prints the result correctly, but I have an error I can not figure out.</p> <pre><code>$rs=array(); $select=array ("system_name", "location", "alarmtype", "severity", "start_time", "end_time", "duration", "reason","shift_oparation", "system_op...
php
[2]
1,783,409
1,783,410
display date in dd.mm.yyyy format in javascript
<p>I have a date like <code>var string = 2013-02-22</code>. I want to convert it into <code>22.02.2013</code>. How can I do it in JavaScript?</p>
javascript
[3]
1,605,624
1,605,625
How to prevent my app from running in the background on the iPhone
<p>Is there any way to cause an app to quit instead of going to background when the home button is pressed? For security reasons, it would be better if the app did not run in background but actually closed when home is pushed. This is <em>not</em> for users' security, but rather for company data on the app, so it is no...
iphone
[8]
3,568,357
3,568,358
A list of string replacements in Python
<p>Is there a far shorter way to write the following code?</p> <pre><code>my_string = my_string.replace('A', '1') my_string = my_string.replace('B', '2') my_string = my_string.replace('C', '3') my_string = my_string.replace('D', '4') my_string = my_string.replace('E', '5') </code></pre> <p>Note that I don't need thos...
python
[7]
3,526,784
3,526,785
Asp.net bind datatable to gridview
<p>I know how to bind a simple datatable to a gridview, but this is a different scenario (I think). I am calling a class library dll which returns a class. I can say its kind of list.</p> <p>I will call it like,</p> <pre><code>Dim demo = New ABCDataTable() demo = demo.GetTheDataTable(MyConnectionString) GridView1.Dat...
asp.net
[9]
3,869,203
3,869,204
in spinner items display the list array to replace drawable images how can implemented
<p>hi i am using spinner in some application in spinner item list array this text replaced in drawable images how can its implemented</p> <p>p</p> <pre><code>ersonalinformation = (Spinner) findViewById(R.id.SpinnerCategory); ArrayAdapter&lt;?&gt; adapterDefaultpersonal = ArrayAdapter.createFromResource...
android
[4]
4,074,504
4,074,505
Advice on writing to a log file with python
<p>I have some code that will need to write about 20 bytes of data every 10 seconds. I'm on Windows 7 using python 2.7</p> <p>You guys recommend any 'least strain to the os/hard drive' way to do this?</p> <p>I was thinking about opening and closing the same file very 10 seconds:</p> <pre><code>f = open('log_file.txt...
python
[7]
731,489
731,490
How to make use of i++ operator in a set statement in c#
<p>Is there a special method that you can add if you get an i++ type of operation on a property?</p> <p>Here is an example of what I'm trying to do. I know this don't work, but this gives you an idea of what I'm talking about. Actually, I'm working with two internals and I want to increase one on + and the other on -....
c#
[0]
2,992,658
2,992,659
why is there different id syntax in the Android docs?
<p><a href="http://developer.android.com/guide/topics/ui/layout-objects.html" rel="nofollow">This page</a> in the Android documentation defines an element id as follows:</p> <pre><code>&lt;TextView android:id="@+id/label" android:layout_width="fill_parent" android:layout_height="wrap_content" ...
android
[4]
3,392,713
3,392,714
how can I save images to iphone directory and retrieve it?
<p>I want to save image in iphone album and retrieve them on particular index, how can I?</p> <p>I have to save profile of many people, along with their images, so how can I access such concept?</p>
iphone
[8]
3,908,121
3,908,122
How to delete all files but leave directory structure intact?
<p>I want to delete all the files in a folder, and delete all the files in all its sub folders, and sub sub folders, etc, BUT I do not want to delete the folders themselves.</p> <p>What would be the simplest way to do this?</p>
c#
[0]
3,520,636
3,520,637
What is the script in javascript equals to $_SERVER['REQUEST_URI'] in php?
<p>I want to pass a URL to another domain through javascript appending iframe, when exit the iframe, the other domain can return the user to previous page on my site. If use php to submit the exit_url, it is </p> <pre><code>$exit_url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . "&amp;request=example...
javascript
[3]
4,414,939
4,414,940
event Action<> vs event EventHandler<>
<p>Is there any different between declaring <code>event Action&lt;&gt;</code> and <code>event EventHandler&lt;&gt;</code>.</p> <p>Assuming it doesn't matter what object actually raised an event.</p> <p>for example:</p> <pre><code>public event Action&lt;bool, int, Blah&gt; DiagnosticsEvent; </code></pre> <p>vs</p> ...
c#
[0]
172,241
172,242
java quick application
<p>I want to create a database application using Java, currently I am using Netbeans and I am building everything from scratch, so I am reinventing the wheel.<br> Is there is any tools to use that help me to create a quick forms similar to Oracle forms?<br> I think Oracle ADF may be helpful but many articles and friend...
java
[1]
1,450,449
1,450,450
Hiding shopping cart when hovering away from both cart and the tab that opened it
<p>I implemented a shopping cart using two divs. A 'cart' div that contains the cart image and 'cart_items' div containing cart items. I can make cart_items slideDown when clicking on the cart image. I can hide cart_items when hovering it then leaving it, the problems I have are:</p> <ol> <li>I can not hide cart_items...
jquery
[5]
5,210,881
5,210,882
forse close when click button for open google map
<p>in my app when i click the button it opens a Google map it is running well when i open it in android emulator and when i install this application on my device after making .apk folder it install successful and also other functions are going well but when i click button of open Google map it force close.. <strong>is ...
android
[4]
5,301,146
5,301,147
HTML not showing up on browser
<p>I am writing a code in which the user is asked for username and password. If the details provided match the details in the database, then he is displayed the data, else he is prompted with a message that the information provided is not valid. Here is the part of the code that says information is not valid,</p> <p...
php
[2]
495,211
495,212
still didnt get @android:id/list vs @+id/listView1
<p>when extending listactivity it is must to have a @android:id/list</p> <p>question 1> what if i want to implement 2 listviews then ids will be same @android:id/list.</p> <p>question 2> in what scenario i should use @+id/listView1. </p> <p>Thanks in advance. </p>
android
[4]
4,879,717
4,879,718
Formatting Output to Currency
<p>I need to format Gtotals output to currency how can I accomplish this. I just grabbed a quick snippet from my code it is not in order.</p> <pre><code> string Lname, Fname, Depart, Stat, Sex, Salary, cDept, cStat, cSex; double Gtotal; fields = recordIn.Split(DELIM); Lname = fields[0]; ...
c#
[0]
2,658,014
2,658,015
Secure static html files using IIS7 in integrated mode and using custom httphandler
<p>My asp.net application is not using formsauthentication. Instead we make a call to database, check username//password and save the value in session if user is logged in.</p> <p>Now i need to secure my html files. I put IIS7 in integrated mode and added a handler mapping to a statichtmlhandler that i wrote that basi...
asp.net
[9]
2,383,939
2,383,940
Dynamically create controls in thread in WPF
<p>In my WPF form i have button Control when i click that button Dynamically tabcontroll is added in the form inside that tab control one page is there. On that page many data are there .so the tabcontrol take time to load in the form.</p> <p>I want to show the tab control first then i want to add the page in the ta...
c#
[0]
1,018,819
1,018,820
How to add another page ID in a PHP function - newbie asking?
<p>I need some help to see where I am going wrong. </p> <p>I am trying to add a page ID to this original function:</p> <pre><code>&lt;?php if( $post-&gt;ID != '91' ) { get_sidebar(); } ?&gt; &gt; </code></pre> <p>to also exclude the ID 1267. I am trying this, with no success. </p> <pre><code>&lt;?p...
php
[2]
3,037,907
3,037,908
How I can monitor all Internet requests?
<p>Is there any way to monitor all requested URLs using the .NET framework classes?</p>
c#
[0]
2,519,192
2,519,193
How to count online users on a website
<blockquote> <p><strong>Possible Duplicates:</strong><br> <a href="http://stackoverflow.com/questions/568835/script-to-tell-me-who-and-how-many-users-are-online">script to tell me who, and how many users, are online</a><br> <a href="http://stackoverflow.com/questions/1822921/best-way-to-keep-track-of-current-onli...
php
[2]
4,073,637
4,073,638
Where'd padding go, when setting background Drawable?
<p>I have this issue on my <code>EditText</code> and <code>Button</code> views, where I have a nice padding for them to space away from the text, but when I change the background with <code>setBackgroundDrawable</code> or <code>setBackgroundResource</code> that padding is lost forever.</p>
android
[4]
1,906,035
1,906,036
Converting Microsoft Office documents and PDF documents to image file with Java
<p>In my current project, I need to convert Microsoft Office documents and PDF documents to image file with Java. Is there any open source Java library for that. And if so, which is the most reliable? </p>
java
[1]
4,243,064
4,243,065
ObjectStore in C#
<p>Is there an ObjectStore implmentation for csharp that allows be to generate string handles for my own objects, lookup these objects later on on from the string handle. I can see there are implementations for C++, but in dotnet we have a garbage collector! Lars</p>
c#
[0]
1,496,074
1,496,075
Java BufferedImage increase width
<p>I have managed to load in an image using:</p> <pre><code>BufferedImage image = ImageIO.read(out); </code></pre> <p>and place text over it however, I want the text to appear next to the image. How can I increase the image width on the right to allow for space for the text to be drawn on. Or do I have to create a ne...
java
[1]
5,394,135
5,394,136
WebView also Gone when Sreen Time-Out
<p>I would like to find a solution to allow my WebView still alive when screen time-out.</p> <p>I am program to play music using WebView, it's working very properly if the screen alive but when the screen time-out my music in WebView also GONE.</p> <h1>Here is my code:</h1> <pre><code>public class WebViewActivity ex...
android
[4]
3,686,042
3,686,043
iPhone nslog "EXC_BAD_ACCESS"
<p>Im trying to use the NSLog, to print console messages. The problem is sometimes i receive a "EXC_BAD_ACCESS" error when calling it</p> <pre><code>-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { NSLog(@"Working test %d", toInterfaceOrientatio...
iphone
[8]
5,868,163
5,868,164
jquery callback not working
<p>Can anyone tell me what I'm doing wrong in this jquery script? </p> <pre><code>$(document).ready(function() { $("a.book").click(function() { $(this).parent().next('div').slideToggle('slow', function(){ $(this).toggleClass('bookopen'); }); }); }); </code></pre> <p>I want the div...
jquery
[5]
4,624,899
4,624,900
Getting a value from a list
<p>I have a list like that:</p> <pre><code>&lt;select size="1"&gt; &lt;option value="1"&gt;Option 1&lt;/option&gt; &lt;option value="2"&gt;Option 2&lt;/option&gt; &lt;option value="3"&gt;Option 3&lt;/option&gt; &lt;option value="4"&gt;Option 4&lt;/option&gt; &lt;option value="5"&gt;Option 5&lt;/option&gt; &l...
javascript
[3]
3,916,608
3,916,609
Displaying image from server in android
<p>I want to display an image from server. Actaully I need to display a paragraph and along with that an image. I have chosen a list view for this. At present I am displaying the paragraph but when I am trying to display the image it is not working. Help me regarding this...</p> <p>My Code:</p> <pre><code>private cla...
android
[4]
1,204,962
1,204,963
I need role base website security with php
<p>I created one please delete this question;</p>
php
[2]
1,118,432
1,118,433
How can a code in a library project call code in the application project?
<p>In an effort to reduce duplication, I have my app's workspace split into 3 projects:</p> <ul> <li>Main (A library project, where all of the common code lives)</li> <li>Free (To make the free version)</li> <li>Paid (To make the paid version)</li> </ul> <p>Behavior in the free version and the paid version must diffe...
android
[4]
5,421,800
5,421,801
how to use Obtion menu in two class
<p>Hi i have Use Menu in 2 class this is my Menu code:</p> <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;item android:id="@+id/setting" android:icon="@drawable/ic_seting" android:title="Setting"&gt; &lt;/item&gt; &lt;/menu&gt; </code></pre> ...
android
[4]
3,226,080
3,226,081
Why does negating a static member variable produce a linker error?
<p>Please consider the following mini example</p> <pre><code>// CFoo.hpp class CFoo{ private: static const double VPI = 0.5; public: double getVpi(); }; // CFoo.cpp #include "CFoo.hpp" double CFoo::getVpi(){ double x = -VPI; return x; } // main.cpp #include "CFoo.hpp" int main(){ CFoo...
c++
[6]
1,007,546
1,007,547
Start an Activity via Email?
<p>I want in my application the client to send an email which contains coordinates and other information and when the email is received by someone starts an activity in his device which will use this coordinates.Is this possible or I have to use something else?Thanks in Advance!</p>
android
[4]
5,296,420
5,296,421
How to make a power method without for loops or recursion?
<p>I'm thinking of a method that calculates the power (base 10 only) of an integer which will be passed as an argument but without using for loops or recursion:</p> <p>here's the method in it's simplest form using forr loop:</p> <pre><code> static long power(int val) { long y = 10l; if (val == 1) { r...
java
[1]
4,465,559
4,465,560
Problems title-casing a string in Python
<p>I have a name as a string, in this example "markus johansson".</p> <p>I'm trying to code a program that makes 'm' and 'j' uppercase:</p> <pre><code>name = "markus johansson" for i in range(1, len(name)): if name[0] == 'm': name[0] = "M" if name[i] == " ": count = name[i] + 1 if count == 'j':...
python
[7]
2,242,175
2,242,176
How to set color mTitles Array in that API demo?
<p><a href="http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List6.html" rel="nofollow">http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List6.html</a></p> <p>In the above link , how toset color to mTitles string.</p>
android
[4]
3,984,445
3,984,446
JAVA : regarding System.out
<p>JAVA : is there a difference between the two references "p" &amp;&amp; "pp"?</p> <pre><code> PrintStream p = new PrintStream(System.out); p.println("lol"); PrintStream pp = System.out; pp.println("lol"); </code></pre> <p>I would just like to shorten the System.out.println(); statement for some prot...
java
[1]
65,587
65,588
jQuery: jScrollHorizontalPane - Adding content dynamically
<p>I have a set of images in a jScrollHorizontalPane and I want to be able to change the content of the pane per project. </p> <p>Currently this is what I have loading every time a project is selected:</p> <pre><code> $.each(project.images || [], function() { if(this == "") return; imgCont.append('&lt;div ...
jquery
[5]
5,745,557
5,745,558
document.body is null or not an object
<p>I am getting Java script error while loading page: document.body is null or not an object. URL: <a href="https://admit-uat.belgacom.be/WCE/ESW/selectBundle/productId/bun_nettv_go" rel="nofollow">https://admit-uat.belgacom.be/WCE/ESW/selectBundle/productId/bun_nettv_go</a></p> <p>Can you please let me know what is t...
javascript
[3]
2,717,860
2,717,861
Add a custom event handler to an AppWidget component
<p>Is there any way to add a custom event handler to an AppWidget component, i.e an event handler that's not related to an Intent? I just want a listener function, like components in standard activities have. Thanks.</p>
android
[4]
4,578,439
4,578,440
Activating MyFiles app for a URI result
<p>there must be a way to do that, as in the clock alarm app that is built in android, when you press on the change alert button, it opens 2 possibilities, one uses RingtoneManager, and on the other you can choose to find a ringtone using My Files to get an alert ringtone, I want to do the same in my app... how is it d...
android
[4]
2,119,465
2,119,466
Clearing a list using a for loop
<p>I'm making a Black Jack game, and at the start of every new round I need to clear the list of cards that represents the Player's and the Dealer's hands. I used this to do so:</p> <pre><code>public void ClearPlayerHand() { for (int i = 0; i &lt; PlayerHand.Count; ++i) { ...
c#
[0]
5,492,102
5,492,103
How to get the last value in a list/string using Python
<p>I am a beginner in writing Python scripts and I need help on the following:</p> <p><code>Threads::num,47141,47146,47151,47156,47161,47166,47171,47176</code></p> <p>How can I get and display the last value '47176'</p> <p>The following is the part of the code I have written:</p> <pre><code>elif sys.argv[1] == "-c"...
python
[7]
351,291
351,292
Populating data on gridview
<p>In my android app, i have a particular scenario, for one of the screens.</p> <p>I require 2 button,one on each side of the corner(left and right). Below this i want to populate data in a control.</p> <p>If left button is clicked, the control should be a gridview. If right button is clicked , the control should be ...
android
[4]
1,427,608
1,427,609
Is it allowed to assign to a dereferenced this (*this)?
<p>I'm currently refreshing my C++ skills and was wondering if it is possible to assign something to <code>*this</code>. I know assigning to <code>this</code> is forbidden, but can't find the same information for my case.</p> <p>An example:</p> <pre><code>class Foo { int x; public: Foo(int x) : x(x) {} Foo incr...
c++
[6]
1,344,173
1,344,174
Java: thread safe class instances
<p>I have the following two classes:</p> <pre><code>public class MyClass { public static void faceTheWorld(String Input){ SafeClass sC = new SafeClass(); sC.workWithInput(Input); } } public class SafeClass { public void workWithInput{String allInp) work with allInp... } </code></pre> <p>My ...
java
[1]
1,853,680
1,853,681
Javascript not working in FF or IE
<p>I have some javascript code that gets the id of the element selected by the user, it works absolutely fine with Chrome, Safari, Opera but when it comes to Firefox and IE it doesn't seem to work at all.</p> <p>It is located within a closure function and I have done some tests and found that it is this exact line tha...
javascript
[3]
5,575,975
5,575,976
I want buttons that flow with my Div and be displayed next to it
<p>I am writing a javaScript program that has N number of Div's and when ever mouse hovers over a particular div on the left of it there should be displayed a UP and DOWN button. </p> <p>I tried taking two DIV's. even when the mouseOver's the second div the buttons are visible only on the left side of the First Div.</...
javascript
[3]
4,433,448
4,433,449
read text from html body
<p>In my android application i'm signing up a user with username and password, if done correctly it returns value "1" if not then "0" by calling a URL with a username and password as parameters and the result 0 or 1 shows in html body. </p> <p>my signup is doing perfectly but the html result 0 or 1 is not showing, in...
android
[4]
1,533,557
1,533,558
How do I prevent the slow script warning and force the browser to continue running script until it's finished?
<p>Rather than get overly specific to my problem, I'll keep this generic so other people who stumble upon this can find it useful. </p> <p>I have a function that accepts one parameter, a string. If the string is short the function runs fine and completes in a timely fashion. If, however, the string that's passed in i...
javascript
[3]
2,918,417
2,918,418
Android - Strange crash reports when sending the user to android play for the app
<p>I have a button that the user can click which sends them to the app page in the Google Play store. This is the code I use for the button:</p> <pre><code> Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("market://details?id=com.problemio")); startActivity(intent); ...
android
[4]
1,842,273
1,842,274
C++ Add this pointer to a container by calling it in base class constructor
<pre><code>class Base { public: Base (int a, int b); private: int a,b; }; class Derived1 { public: Derived1():base(1,2){} }; </code></pre> <p>similarly Derived2, Derived 3 which doesnt contain any data members on its own</p> <p>Now i need to contain these derived objects in a singleton, so i was thinking to call thi...
c++
[6]
5,365,438
5,365,439
Static Blocks - when are they executed
<p>I'm totally new to Java and I'm wondering why my static block is not executing.</p> <pre><code>public class Main { public static void main(String[] args) { Account firstAccount = new Account(); firstAccount.balance = 100; Account.global = 200; System.out.println("My Balance is : " + firstAccou...
java
[1]
138,278
138,279
asp.net sessions issue
<p>I have a problem of the session not expiring. Here is my case</p> <p>I have a application in asp.net1.1. i am able to handle session when user click logout button. Session is active for 35 minutes. the application is also check if same user is trying to login using multiple machine and blocks it. </p> <p>Now this ...
asp.net
[9]
3,820,271
3,820,272
jquery ajax error when nothing wrong with http request
<p>I am using jquery to do ajax calls:</p> <pre><code> // omitting the code for the options properties var options = { type: Type, url: Url, data: '{aString:"abc"}', contentType: ContentType, dataType: dataType, //processdata: ProcessData, success: functi...
jquery
[5]
1,871,068
1,871,069
Why or why not should I use 'UL' to specify unsigned long?
<pre><code>ulong foo = 0; ulong bar = 0UL;//this seems redundant and unnecessary. but I see it a lot. </code></pre> <p>I also see this in referencing the first element of arrays a good amount</p> <pre><code>blah = arr[0UL];//this seems silly since I don't expect the compiler to magically //turn '0' in...
c++
[6]
843,346
843,347
How to get the last modified files in PHP?
<p>I want to create a list the names of the files which have been last modified at </p> <pre><code> http://www.searchr.us/web-search/ </code></pre> <p>I want to show these file names on my Homepage and they should change according to the last modified files !!</p>
php
[2]
2,967,362
2,967,363
Set a default value to jquery variable
<p>I want to set a default value to a variable.</p> <p>When the body loads it runs a function which needs the variable to get the data.<br>The form will do the same onchange but the form elements will be hidden and added only if the user wants to see the filter options</p> <p>My current code is</p> <pre><code>var gr...
jquery
[5]
4,828,902
4,828,903
How to create new MIME type in Android DownloadProvider?
<p>I want to download a .JSON file from the tomcat server via Android DownloadManager. Is it possible to include the new MIME type like "application/json" in the android downloadprovider?..</p> <p>Thanks in advance, Bala</p>
android
[4]
5,988,961
5,988,962
redirect to a page if response.redirect fails
<p>I have a response.redirect(url), it goes to another site. In the event this fails, how would I redirect again to a 'redirect fail' page? the request is bieng sent from the code behind an aspx page. I have an httpmodule in place already if that could be used? Thanks in advance.</p>
c#
[0]
5,703,770
5,703,771
How do you make an android layout hold widgets programmatically?
<p>I'm trying to make a custom home screen application and can't seem to find an article or a book that explains how to add widgets to a layer programmatically. Anyone know of any good tutorials or a book where I can find this information as a Google search only returned me articles on how to make a widget. Maybe I'm a...
android
[4]
3,110,476
3,110,477
Stop animating a jpg
<p>I have a url which produces a animated jpg. It has a js file attached which uses the property of top and left. Random values are assigned to the top and left. The entire script is pure javascript.[No <code>jQuery</code> is used or <code>jQuery animate</code>]</p> <h2>What I want is</h2> <p>To stop the animation un...
jquery
[5]
5,199,291
5,199,292
problem building matrix through use of a loop
<p>This is my code:</p> <pre><code>var shuffle = function() { var set = []; var waiter = []; var suitset = ["Hearts","Clubs","Diamonds","Spades"]; for (var r = 1;r &lt;= 13;r++) { for (var s = 0;s &lt; suitset.length;s++) { card = []; var cardeval = evalcard(r); //This i...
javascript
[3]
1,084,318
1,084,319
Working with images (playing cards)
<p>What is the best way of working with images, for a playing cards game in my case? Defining a resource for each image I have seems a little overkill. </p>
android
[4]
2,990,632
2,990,633
Query regarding CheckBox in C#
<p>I have list of checkbox with header text, if i check any checkbox then header should be check by default and if i uncheck any then header should be uncheck.</p>
c#
[0]
1,408,234
1,408,235
download file exception handling
<p>In my application I download several critical files from a server, and I want to write some code that handles the case where the a file download didn't complete for a reason or other ,to retry downloading it at next startup. The function that downloads a file at a time however throws only MalformedURLException and ...
java
[1]
1,894,359
1,894,360
forward declaration with vector of class type - pointer to incomplete class type not allowed
<p>I have two classes, foo and bar. foo includes bar and contains a std::vector of pointers to bar objects. at some point during runtime, bar has to access this vector of pointers to other bar objects. Therefor, foo contains a method named getBarObjects() that returns the array of pointers.</p> <p>Therefor, I forward ...
c++
[6]
509,497
509,498
Understanding converView in BaseAdapter
<p>I have the following getView in the BaseAdapter.</p> <pre><code>@Override public View getView(int position, View convertView, ViewGroup parent) { LinearLayout itemLo; if (convertView != null) { itemLo = (LinearLayout) convertView; } else { itemLo = (LinearLayout) LayoutInflater.from(mC...
android
[4]
5,830,873
5,830,874
What is a good PHP script I can use as a poll?
<p>What is a good free PHP script to use as a poll for a website? I'd need a simple script to show on the web page with the standard multiple option vote + bar chart graph. Also an admin interface with add / edit / delete poll would be required.</p>
php
[2]
2,137,529
2,137,530
Persist javascript variables across pages?
<p>Hi Is there a way we can persist javascript variables across various pages? Suppose in Page A I am setting window.someVar = 5. Then I move to Page B, via clicking a hyperlink in A, and do something like alert(window.someVar) -- I should get a message box displaying 5. Is there a technique to persist someVar as such...
javascript
[3]
1,690,084
1,690,085
Change image src based on style width + height
<p>I have an asp.net mvc project, and a function that streams out an image based on url parameters. like: /Image/40/100/50 streams out image with ImageID 40, 100px wide and 50px high.</p> <p>So is there a way to change:</p> <pre><code>&lt;img class="image" src="/Content/View?fileID=31" style="width: 500px; height: 10...
jquery
[5]
319,967
319,968
IME keyboard does not show when OnClickListener set for EditText?
<p>I'm not sure if this is a bug or not with Android OS 1.5, but when I set an OnClickListener for an EditText, then try clicking it (using trackball), the IME keyboard no longer displays itself. With a click listener set, it displays when clicked.</p> <p>Is there another way I can request the IME keyboard to come up ...
android
[4]
1,492,235
1,492,236
why two keywords in c#: String and string
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/215255/string-vs-string-in-c">String vs string in C#</a> </p> </blockquote> <p>I see there are 2 different keywords (classes ?) one which starts with capital S and other with small in c#.</p> <p>String and stri...
c#
[0]
1,066,263
1,066,264
RegisterStartupScript and multiple controls
<p>I have a parentUserControl that loads a childUserControl. Multiple instances (say 3) of parentUserControl is added to the host page.</p> <p>On PageLoad of the parentUserControl, I register JS:</p> <pre><code>ScriptManager.RegisterStartupScript(this, typeof(Page), keyJSLoadBegin, "OnParentLoad();", true); </code></...
asp.net
[9]
2,088,983
2,088,984
How to check for NULL in c++?
<p>Let say for example, I have a struct, and an array of the struct. What I want to do is to iterate through the array and check if any of the item is a null. I tried checking the item against NULL and (struct *) 0, that don't seem to work. Is there any reliable way to check for null value?</p> <p>UPDATE Sample Code</...
c++
[6]
913,400
913,401
Programming keybinds in C++
<p>I am actually not sure what I am looking for, I can not supply allot of information because of that, but what I am trying to do is program key binds, were when you click a certain key a certain sound will play, could someone please supply links as to were I could go to learn this?</p>
c++
[6]
5,091,812
5,091,813
how to pause the UI thread in javascript
<p>I'm wondering what a clean way is to pause the UI thread in javascript? Just for a couple seconds, I have a really good reason to.</p>
javascript
[3]
890,365
890,366
Change an element when an event occurs
<p>I want to change the element an event is attached to. In the below example I try to increase the border from 2px to 10 px without success.</p> <p>Complete minimal example (look for the FAILS row):</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN...
jquery
[5]
4,742,236
4,742,237
App doesn't run. Getting error window
<p>I have a problem with this code. This is a tutorial code that show how to get and show data from mysql DB. But when I try to run it I am getting a problem window that application has stopped unexpectedly. Any ideas how to fix it?</p> <pre><code>public class FoodActivity extends Activity { /** Called when the activi...
android
[4]
4,673,975
4,673,976
problem with integers
<p>can anybody look at this code and tell me why the exception happens? </p> <pre><code>public static void main(String[] args) { int total =100; int discount_Ammount = 20 ; int newAccount=Integer.parseInt( String.valueOf(Math.floor(total - discount_Ammount)).trim()); } </code></pre> <p>Method floor ret...
java
[1]
4,218,716
4,218,717
Whats the difference between these two lines in PHP....Are they both variables?
<p>There's:</p> <pre><code>$myvar="somthing"; </code></pre> <p>and:</p> <pre><code>define('myvar', 'something'); </code></pre> <p>I know the first one is defining a variable and I thought the second one was too, until someone told me its not...</p> <p>Whats the difference between the two? They both do the same thi...
php
[2]
3,409,433
3,409,434
how to check if allow_url_fopen is enabled or not
<p>I'm using the following code</p> <pre><code>echo 'file_get_contents : ', ini_get('allow_url_fopen') ? 'Enabled' : 'Disabled'; </code></pre> <p>this can get it enabled or disabled</p> <p>but i would like to make as function say function name is <code>_isgetcontents</code></p> <p>then i can call it as following an...
php
[2]