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 |
|---|---|---|---|---|---|
5,032,954 | 5,032,955 | changing the href with jquery | <p>I have an image with an ID of 27. </p>
<p>I need to change the href of the link that surrounds it. How do i do this with jquery?</p>
<p>Here is my link and image attribute. Note. I cant set the id to the link.</p>
<pre><code><a href=""><img src="" id="27"></a>
</code></pre>
| jquery | [5] |
1,258,197 | 1,258,198 | Get iframe contents using Javascript | <p>I have an iframe and I need to get the contents of it and extract some information from this. Is this possible using Javascript?</p>
<p>I have looked somewhere that this is not possible if the other page runs on a different server but I need to confirm this.</p>
| javascript | [3] |
5,375,136 | 5,375,137 | Javascript version of showOptionDialog | <p>Im wondering if there is a javascript function like java's showOptionDialog, where the user can chose between two different options in the dialog</p>
<p>Thanks,
Matt</p>
| javascript | [3] |
5,651,508 | 5,651,509 | Android application publish | <p>i am using License Verification Library for my paid Android application.<br>
so is there any necessity to add eula(End User License Agreement) to my application? </p>
| android | [4] |
1,965,235 | 1,965,236 | address of elements of structure of different types | <p>i want to find address of elements of structure in memory
here is my code</p>
<pre><code> #include <iostream>
using namespace std;
struct B{
int k;
float t;
char s;
unsigned int m;
long q;
double x;
unsigned long z;
};
int main(){
B b[]={3,4.23,'A',123,123L,23.340,700};
void *t=&b[0];
... | c++ | [6] |
3,767,642 | 3,767,643 | Javascript contains statement | <p>I'm trying check a field in a database to see if it does not contain either "UK_CONTACTS or a blank. If it is either of these conditions I want to copy the that field to another field. I am very very new at this and have come up with the following and have written in text "does not contain" as I don't know the corre... | javascript | [3] |
4,926,574 | 4,926,575 | How to save this string correctly? | <p>This is my code:</p>
<p>URL: </p>
<pre><code>http://www.mysite.com/t.php?title=The%20Police%20-%20Don't%20Stand%20So%20Close%20to%20Me%20'86%20-
</code></pre>
<p>PHP:</p>
<pre><code><?php if(!empty($_GET['title'])){ >
<form method="post" action="t.php?done=yes" enctype="multipart/form-data">
<inpu... | php | [2] |
1,189,480 | 1,189,481 | C++ Hello World not compiling | <p>I just recently installed OSX lion and got xcode 4.</p>
<p>I made a file in a directory somewhere and put this code in it:</p>
<pre><code>#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!";
return 0;
}
</code></pre>
<p>Then I ran gcc filename.cc</p>
<p>and I get these e... | c++ | [6] |
5,375,760 | 5,375,761 | Why doesn't static main work in C++? | <p>The code below doesn't work. </p>
<pre><code>#include<iostream>
class Application
{
public:
static int main(int argc, char** argv)
{
std::cin.get();
}
};
</code></pre>
<p>I thought that static member functions are just the same as normal functions, and static WinMain works fine. Why does... | c++ | [6] |
5,437,246 | 5,437,247 | Validate Session with Http Module | <p>I need to validate the Session with the HTTP Module. I have some aspx pages and in that pages am just validating, whether the sessions are null or not, like</p>
<pre><code> if (Session["LoggedInUser"] != null)
{
user = (User)Session["LoggedInUser"];
}
else
{
FormsAuthentication.SignOut();
FormsAu... | asp.net | [9] |
2,061,512 | 2,061,513 | Access wrapping element with `wrap()` | <p>I'm using the jQuery function <code>wrap()</code>, which returns the original object, not the wrapping object. Is there an easy way to access the wrapping object?</p>
| jquery | [5] |
39,581 | 39,582 | Initializing an array of arrays | <p>I am wondering if there is an easier way to do the same thing than below but with less code.</p>
<pre><code> private $table = array(
array(array(), array(), array(), array(), array()),
array(array(), array(), array(), array(), array()),
array(array(), array(), array(), array(), array()),
... | php | [2] |
4,388,011 | 4,388,012 | [CLOSE]Javascript: how i can know when the IE file download prompt pop up? | <p>Now i have a problem below:</p>
<p>i've added a div on my page to forbid user to click buttons, links or fields when user click the DOWNLOAD button. So i need to remove this div when the IE file download prompt pops up or when user clicks "save", "save as" or "cancel" on it.</p>
<p>How can I reach this?</p>
<p><s... | javascript | [3] |
5,925,250 | 5,925,251 | JQuery - Check when image is loaded? | <p>I am having a bit of trouble working out when an image has been loaded.</p>
<p>I have been told that the following function will work but it isn't doing anything.</p>
<pre><code>$("#photos img:first").load(function (){
alert("Image loaded!");
});
</code></pre>
<p>There are no error's in my code. Everything el... | jquery | [5] |
4,273,692 | 4,273,693 | how to check installed application in iphone device | <p>I am developing an application in which i need to find the apps which are already installed in iphone device such as Skype, facebook. I need to check it objective -c . Please give me code snippet if possible otherwise a link to get the solution. If it not possible then tell me other way to check installed applicatio... | iphone | [8] |
1,348,239 | 1,348,240 | Finding if an element is childless | <p>I have an array that contains all elements on the page. How would I test if an element is childless while looping through the array? I would prefer to stay with standard javascript. Here is pseudocode that explains it:</p>
<pre><code>for each element in elementlist:
if element is childless:
do something... | javascript | [3] |
1,440,001 | 1,440,002 | this.shift = {x:this.x, y:this.y} works but not this.shift.x = this.x and this.shift.y = this.y? | <pre><code>this.x = (Math.random()*canvasWidth);
this.y = (Math.random()*canvasHeight);
(1) this.shift = {x: this.x, y: this.y};
(2) this.shift.x = this.x;
this.shift.y = this.y;
</code></pre>
<p>Hi guys, I am playing with canvas and on my way to create a particle system.</p>
<p>The first (1) one will work but ... | javascript | [3] |
1,810,168 | 1,810,169 | C++ - Values change unexpectedly | <p>For some reason, the values of a passed struct change without me accessing them. I found this out by debugging with Visual Studio. Here is the code:</p>
<pre><code>bool Screen::blitSurface(SDL_Surface* src, int x, int y, SDL_Rect* rect) {
SDL_Rect* offset;
offset->x = x;
offset->y = y;
SDL_BlitSurfac... | c++ | [6] |
1,282,909 | 1,282,910 | jQuery perfomance when trying to hide rows in table | <p>i have the performance problem.
I have a table with 500 rows for example, i try to hide column in it, and spend near 10seconds on waiting.</p>
<pre><code><table>
<thead>
<th class="c1">ColumnName1</th>
<th class="c2">ColumnName2</th>
</thead>
<tbody>
<td class="c1"... | jquery | [5] |
4,136,025 | 4,136,026 | How to manually click a Jquery multiselect box? | <p>I have a few multi select boxes on a page. When the user clicks a certain checkbox, I would like one of the multiselect boxes on the page to automatically be clicked with a certain value. Do you have any idea of how to do this?</p>
<p>Thank you!</p>
<pre><code>$("#select_country").multiselect({
multiple: false,
... | jquery | [5] |
2,860,906 | 2,860,907 | I thought there's only one manifest file in an Android Project | <p>What's it means by that comment of "The activity you are calling should appear not only in the Manifest for its own package, but in the Manifest for the CALLING package, too." I only have one package. </p>
<p><a href="http://stackoverflow.com/questions/3433778/android-content-activitynotfoundexception">android.con... | android | [4] |
1,328,532 | 1,328,533 | javascript copying array to another | <p>i have the following code snippet, where inside for loop the value to contain is not getting assigned, is this is the proper way to copy array to other.??</p>
<p>as here </p>
<pre><code> var groupCondition = "ALL-OF-THEM&ALL-OF-THEM&ALL-OF-THEM&ALL-OF-THEM&";
var groupParam = "rsTxTraceMsgAsi... | javascript | [3] |
1,582,228 | 1,582,229 | Memory allocation for an Exception | <p>Can you please explain, where the instances of Exception or it's children are allocated in memory? Is it heap or stack, or something else?</p>
<p>Thanks!</p>
| java | [1] |
5,428,816 | 5,428,817 | Dictionaries in Python | <p>What do these two statements mean in Python?</p>
<pre><code>distances[(clust[i].id,clust[j].id)]=distance(clust[i].vec,clust[j].vec)
d=distances[(clust[i].id,clust[j].id)]
</code></pre>
<p>I am guessing that the first statement assigns clust[i].id and clust[j].id keys of the distances map to the result of the dis... | python | [7] |
3,567,512 | 3,567,513 | How can I scroll through a set of images using jQuery? | <p>I have a set of MRI images and want to build an interface which people can use to scroll trough them. I can export them as JPGs or 1 AVI. Are there plugins that do this? When I search google I only find these portfolio sliders which are not what I need. When I scroll forward or backward I need the new image to appea... | jquery | [5] |
4,227,391 | 4,227,392 | Inconsistent accessibility error with the following c# code. Why? | <p>Whats wrong with the following c# code? Compiler reports this error:</p>
<p>Inconsistent accessibility: parameter type 'ClassLibrary1.Interface1' is less accessible than method 'ClassLibrary1.Class1.Class1(ClassLibrary1.Interface1)'</p>
<p>with the following code:</p>
<pre><code>interface Interface1<T>
{
... | c# | [0] |
5,563,188 | 5,563,189 | Running a python script from another script | <p>I wish to a run a python script which takes options and arguments from another python script.</p>
<blockquote>
<pre><code>For example run C:\\code\\old_start_training_generic_depth.py -i 10 -l 2 from
C:\\code\\start.py
</code></pre>
</blockquote>
| python | [7] |
2,735,912 | 2,735,913 | What is the difference between an JSON and Array? | <p>What is the difference between an JSON and Array? Why do they call JSON Objects and Array Objects. </p>
<p><a href="http://wiki.appcelerator.org/display/guides/Using+TableViews+-+data.js" rel="nofollow">http://wiki.appcelerator.org/display/guides/Using+TableViews+-+data.js</a></p>
<p>Is this an Array or JSON? How ... | javascript | [3] |
2,034,133 | 2,034,134 | in saveState what's my context? | <p>I am trying to do some cleanup within a saveState() call. I want to pop-up a dialog if there is
an error on exiting the activity, but the activity is already gone by this point.</p>
<p>I want to have this happen from an activity called StudentEdit but what should the context be?
When I use StudentEdit.this, the di... | android | [4] |
5,703,740 | 5,703,741 | Number formatting: how to convert 1 to "01", 2 to "02", etc? | <p>I'm new to C#. I have numbers like 1,2,3 and I would like to make them into strings "01","02" and "03". Can someone tell me how I can do this. </p>
| c# | [0] |
314,902 | 314,903 | How to auto refreash previous content after press back button form current content android | <p>I developed a android notepad application, I have view interface and edit interface, suppose I edit content in edit interface and press back button to view interface, the view interface's content should be changed from previous one, at the moment I can't update the view content in the same time, how can I achieve th... | android | [4] |
3,955,679 | 3,955,680 | how to detect discard button is pressed when sending email android | <p>how to detect discard button is pressed when sending email android</p>
| android | [4] |
4,097,923 | 4,097,924 | Generate random string from a list of string with certain probabilities | <p>I am trying to generate random string from list of array string with required probablities in java.i am able to generate random string but dont know how do with probabilities.I have to run program almost 25 - 30 times </p>
<pre><code>Probability for abc is 10%
for def is 60%
for ghi is 20%
... | java | [1] |
1,818,413 | 1,818,414 | Will hasOwnProperty ever return false from inside a for...in loop? | <p>If I do this: </p>
<pre><code>for (var i in obj) {
if (obj.hasOwnProperty(i)) console.log("Has property: " + i);
else console.log("Doesn't have property: " + i);
}
</code></pre>
<p>Will <code>obj.hasOwnProperty(i)</code> ever return <code>false</code>? If so, when?</p>
| javascript | [3] |
3,285,865 | 3,285,866 | Setting an object to a split array | <p>I'm not a javascript guru. I've got the following code below:</p>
<pre><code>var aCookieValues = sCookieContentString.split('&'); // split out each set of key/value pairs
var aCookieNameValuePairs = aCookieValues.split('='); // return an array of each key/value
</code></pre>
<p>What I'm trying to do is split... | javascript | [3] |
5,990,542 | 5,990,543 | android : communication between service running in background and activity | <p>I have a service running in the background. Based on some condition it has to start some activity. Activity has to send back the response.</p>
<p>I did google search and found out we have to use Notification mechanism. But I am not clear how to send the response back from activity to the service running.</p>
<p>Al... | android | [4] |
3,090,815 | 3,090,816 | Difference between foo() and function() { foo(); } | <p>Is there any advantage of wrapping a function with an anonymous function?
I mean a particular example:</p>
<pre><code>function asyncFuntion(callback) {
setTimeout(callback, 6000);
};
asyncFuntion(function() {
console.log('Calling after 6 s.');
});
</code></pre>
<p>and with the wrapped function:</p>
<p... | javascript | [3] |
1,023,967 | 1,023,968 | How can I avoid vote spam on my PHP site | <p>I am doing a voting system on my website. </p>
<p>Visitors do not need to login to vote the product they like. But how can I prevent them from clicking the like or dislike button many times for one product ?</p>
<p>I intend to detect the IP address of the visitor to avoid vote spam. Is that a good way?</p>
<p>Tha... | php | [2] |
5,685,075 | 5,685,076 | Is it possible that Javascript keep same expression value? | <p>I was wondering if javascript calculate (again) same expressions as it encounters them : </p>
<p>for example : </p>
<p><code>alert(new Date().getTime()+1-1+1-1+1-1+1-1+1-1+1-1+1-1+1-1+1-1+1-1-new Date().getTime())</code></p>
<p><code>output : 0</code></p>
<p>it's hard to test it like it but I thought that all t... | javascript | [3] |
5,184,059 | 5,184,060 | how can i use sqlite with android mobile? | <p>i create sqlite database and it works fine with emulator bur when i try this application on my android mobile it give my exception sqliteException no such table
anyone tell me why and how can i solve this problem ?
Thanks</p>
| android | [4] |
967,607 | 967,608 | Closing a form and doing something on return to another form | <p>I have a mainForm and a saveForm.
I never close the mainForm, just let the saveForm appear over the top.</p>
<p>When i close the saveForm, I want a piece of code to run on returning to mainForm.</p>
<p>What is the best way to achieve this?</p>
| c# | [0] |
1,379,909 | 1,379,910 | Re-run jquery script when ajax call is made | <p>I have a jquery float box plugin. The document is loaded and on a buttonpress an ajaxcall triggers box.php which parse the box <code>#floating-box</code> to be floated (the box is then showed on alla pages from now on). The problem is that the script which is within <code>$(document).ready(function(){..</code> does ... | jquery | [5] |
1,247,737 | 1,247,738 | Changing a library's name in Python | <p>I have a rather large personal python library that I use for projects. I want to release it to the public, but first I wanted to change the name to something a little less silly then the personal anecdote that I named it after. </p>
<p>Lets say I have a library name "FooBarLib" and it is contained within the folder... | python | [7] |
730,188 | 730,189 | How can you restrict certain apps from launching on Android? | <p>I'm trying to build a sandboxed environment in which only certain apps are allowed to be launched.</p>
<p>I had originally decided to try polling all running apps in the background to see which ones were running, then killing any that weren't on the whtielist. However, I discovered that you can only kill background... | android | [4] |
4,216,896 | 4,216,897 | Keeping track of visitors in my shopping cart application? | <p>I'm writing a simple shopping cart application and have hit a road block. Currently my shopping cart application associates the shopping cart (in the DB) with the user's id on the site, but I want to allow visitors to add items to the cart as well. </p>
<p>I asked this question a while back on stackoverflow and the... | php | [2] |
4,409,843 | 4,409,844 | Calculating Day, Month, Year | <p>How do I calculate Day, Month, Year exactly?</p>
<p>Means..</p>
<p>From 2th Jan 1990 to 9th May 2009 is..</p>
<p>xxx Days, xxx Months, xxx Years.</p>
<p>Any idea how to do that?</p>
<p>I tried Timespan and Tick().. Both failed to do so..</p>
| c# | [0] |
1,775,797 | 1,775,798 | Running a jQuery from a different page | <p>So I have the following files <code>a.html</code>, <code>b.html</code>, <code>c.js</code>. I would like to be able to achieve the following:</p>
<p>When I click on a link on <code>a.html</code>, be redirected to <code>b.html</code>, and only after <code>b.html</code> is completely loaded, then my <code>c.js</code> ... | jquery | [5] |
282,813 | 282,814 | uploading a file from iphone to server | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3465361/how-to-upload-a-file-to-the-server-in-iphone-sdk">How to upload a file to the server in iPhone SDK?</a> </p>
</blockquote>
<p>hi </p>
<p>i am a beginner in iphone applications i want to make an applicat... | iphone | [8] |
5,616,955 | 5,616,956 | Refresh content in Tab of TabActivity | <p>I have a tab with an intent as its content:</p>
<pre><code> tabHost.addTab(tabHost.newTabSpec("tab3")
.setIndicator("Chart")
.setContent(lineChartIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));
</code></pre>
<p>How is it possible to refresh the content of a tab? I am t... | android | [4] |
307,395 | 307,396 | I dont want to register my app in facebook ,i need post comments on user facebook wall page | <p>I don't want to register my app in Facebook, I need to post comments on the users Facebook wall page. How to implement this? If I press button it should show users Facebook wall page to publish comments about app.</p>
| android | [4] |
2,099,241 | 2,099,242 | Accessing from an Abstract Class | <pre><code>public abstract class Password {
private String password;
private final static String ENCRYPTION_METHOD;
static {
ENCRYPTION_METHOD = "CLEAR TEXT";
}
public Password(String password) {
password = password;
}
public String getPassword() {
return password;
}
public boolean matches (String... | java | [1] |
3,267,341 | 3,267,342 | PHP giving strange diff. in time | <p>Hi i have a script its returning time diff. on diff. computer when all on same network it return time same on Site but when 1 comp. is on diff. network it return diff. time</p>
<p>i am struggling with this i know php is server side language i have checked there is not any JavaScript code for this so its not taking ... | php | [2] |
3,623,931 | 3,623,932 | PHP array question | <p>How do I show the dates number format next to its name in the array using PHP? So that the number format is saved in the database and the month name is displayed?</p>
<p>Here is the php code.</p>
<pre><code>$month_options = array("Month", "January", "February", "March", "April", "May", "June", "July", "August", "S... | php | [2] |
5,360,231 | 5,360,232 | JSON Parsing NullPointerException in android | <p>I am learning JSON parsing in android. My logcat is showing NullPointerException onpostexecute method. I have shared the code below.</p>
<pre><code> protected String doInBackground(String... urls)
{
// TODO Auto-generated method stub
try {
// defaultHttpClient
DefaultHttpClient httpCli... | android | [4] |
3,741,475 | 3,741,476 | Disable a widget from showing if app isn't licensed? | <p>I just spent around an hour implementing the android market licencing tools into my app.</p>
<p>The app in question is a widget, I want to know how I would go about stopping the widget (a button) from functioning, if the app isn't licensed.</p>
<p>Does anyone know how this could be accomplishes?</p>
| android | [4] |
718,767 | 718,768 | how to find number of similar words in two strings? | <p>I have two stings:</p>
<pre><code>$var_x = "Depending structure";
$var_y = “Depending on the structure of your array ";
</code></pre>
<p>Can you please tell me how can I found out, how many words in var_x is in var_y?
In order to do that, I did the following:</p>
<pre><code>$pieces1 = explode(" ", $var_x);
$piece... | php | [2] |
5,143,902 | 5,143,903 | Precedence between conversion operators in C++ | <p>During parameter resolution for a function which expects a pointer, why is the the reference-to-pointer conversion being selected rather than the pointer conversion?</p>
<pre><code>template<typename T>
class resource_ptr
{
public:
operator T*()const {...} // <- C1: Convert to raw pointer for ... | c++ | [6] |
1,002,912 | 1,002,913 | C++ -- Should the subclass destructor explicitly call base class destructor? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/677620/do-i-need-to-explicitly-call-the-base-virtual-destructor">Do I need to explicitly call the base virtual destructor?</a> </p>
</blockquote>
<p>Hello all,</p>
<p>I would like to know whether or not a sub-c... | c++ | [6] |
3,944,901 | 3,944,902 | How do I consume a key event in javascript, so that it doesn't propagate? | <p>How do I consume a key event in javascript, so that it doesn't propagate?</p>
| javascript | [3] |
2,245,129 | 2,245,130 | Can javascript be used to write to a file? | <p>Can javascript be used to write to a file ?
Sorry restate that (Can javascript be used to write to a file on the web server it is hosted on? ).</p>
| javascript | [3] |
3,311,487 | 3,311,488 | subprocess() arguments in Python | <p>I have an argument in Python that is screwing up my subprocess() command. The argument is:</p>
<pre><code>--server-args="-screen 0, 1280x800x24"
args = [
'xvfb-run',
'--server-args="-screen 0, 1280x800x24"',
'/usr/bin/python',
'/root/AdamN-python-webkit2png-3ae4322/webkit2png.py',
'-o',
filename,
u... | python | [7] |
4,562,883 | 4,562,884 | how to remove first item from spinner | <p>whenever i create a spinner by default it shows first element in spinner. i want to show my own hint on that spinner.</p>
<p><strong>note:- i am receiving data from web services.</strong></p>
<p>my code is:-</p>
<pre><code> <Spinner
android:id="@+id/spinnerAtlasContactSignup"
and... | android | [4] |
123,903 | 123,904 | what does 'objects being subclassable' mean? | <p><a href="http://diveintopython.net/getting_to_know_python/everything_is_an_object.html" rel="nofollow">Dive into Python</a> - </p>
<blockquote>
<p>Different programming languages define “object” in different ways. In some, it means that all objects must have attributes and methods; in others, it means that all ob... | python | [7] |
2,809,233 | 2,809,234 | recursion problems | <p>I'm grabbing links from a website, but I'm having a problem in which the higher I set the recursion depth for the function the results become stranger </p>
<p>for example
when I set the function to the following </p>
<pre><code>crawl_page("http://www.mangastream.com/", 10);
</code></pre>
<p>I will get a results ... | php | [2] |
1,820,853 | 1,820,854 | how to use onclick event of <a> | <p>i want to use <code>onclick</code> event of <code><a></code> when i use srh like below doesn't work</p>
<pre><code>...
<a oncick="reg_Click">...</a>
or
<a onclick="reg_Click" runat="server">...</a>
//function
protected void reg_Click(object sender, EventArgs e)
{...
</code></pre>
| asp.net | [9] |
1,316,510 | 1,316,511 | javascript class - this.method called with setInterval | <p>I have a javascript class</p>
<pre><code>funtion MyClass() {
MyClass.prototype.fooMethod = function () {
// some logic goes here...
}
MyClass.prototype.fooMethod2 = function () {
this.fooMethod();
}
}
</code></pre>
<p>Everything works as expected when I call like this:</p>
<pre><code>var m = MyC... | javascript | [3] |
5,456,896 | 5,456,897 | asp.net now() function with different time zones | <p>I will be entering some values into a database based on input from users. One value will be the date and time of the input.</p>
<p>I'm not sure how this works at all, but a user from e.g. New York enters some data and the website is hosted in the UK...what time will be stored?</p>
<p>Up until now I had been using ... | asp.net | [9] |
1,916,714 | 1,916,715 | iterative Newton's method | <p>I have got this code to solve Newton's method for a given polynomial and initial guess value. I want to turn into an iterative process which Newton's method actually is. The program should keeping running till the output value "x_n" becomes constant. And that final value of x_n is the actual root. Also, while using ... | python | [7] |
2,232,019 | 2,232,020 | Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed | <p>when i create a web request in my class file and execute it then an error occured </p>
<p>Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed</p>
<p>what can i do for this</p>
| asp.net | [9] |
3,833,818 | 3,833,819 | How can I delete specific rows from a table? | <p>I have a table with <code>n</code> number of rows. The value of <code>n</code> changes/updates every minute.
The first <code><td></code> of every row will either contain some text, or it will be blank.
I want to delete/remove all the rows except, the first row and the row whose first cell contains the text <co... | javascript | [3] |
2,685,671 | 2,685,672 | Java Serialization with object input/output stream | <p>In java, we are serializing the objects i.e. object state over network using serializable marker interface and object streams(serilaze and deseriaze). But we are having a different streams to write the object state.why we are marked the serialization for that object?.</p>
| java | [1] |
91,669 | 91,670 | Javascript generate random number from 0 to 75 | <p>I am using something like this:
<code>alert("Random number is: "+ Math.floor(Math.random() * 75) + 0);</code>.
To create a random number between 0 and 75. Any idea how I can create a random number between 0 and 75 that IS NOT one of the numbers in this comma-parsed string:
<code>$not_these_numbers = "17,26,52,75";</... | javascript | [3] |
5,011,120 | 5,011,121 | How back button is working in the browser? | <p>I have listed projects in main work page, If i click on the project it will direct to work page where details have been displayed,If i click on the back button its is redirecting main work page.I want back button should redirect the previous project please help.</p>
| php | [2] |
4,354,335 | 4,354,336 | Javascript getElementById in separate JS file, src written with javascript | <p>i want someone to include a JS file of me which does something neat. I thought i put it up just like Google: you put a script tag in your source and the google js takes care of everything.
in my php file is this:</p>
<pre><code>echo '<script type="text/javascript"
src="http://www.site.com/gadget.js">
</scr... | javascript | [3] |
5,814,182 | 5,814,183 | fetch html content from website | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3577641/how-to-parse-and-process-html-with-php">How to parse and process HTML with PHP?</a> </p>
</blockquote>
<p>I have used this code for fetching html content from given website of url.</p>
<pre><code>**Code... | php | [2] |
1,738,228 | 1,738,229 | Run PHP code on a specific domain only | <p>I need to echo out some specific php code only on the sub-domain of a site. This is where I am so far.</p>
<pre><code><?php
if($_SERVER['SERVER_NAME'] != "http://support.demo.com")
echo "<?php bb_head(); ?>";
?>
</code></pre>
<p>Of course if this worked I'd not be asking a question. Help is... | php | [2] |
5,396,355 | 5,396,356 | how to get world wide current date and time | <p>i want to access the current date/time. i did some query it gives me the system date/time. when i changed the system date then it gives the changed date/time. but i want the current date/time after changing the date/time. </p>
<p>Note: I am not connected to the Internet and i want to do this in windows c#.net</p>
| c# | [0] |
2,386,844 | 2,386,845 | Download PHP array as a file | <p>I have an array with 3 attributes. I want to create a downloadable link for a file which has the array in a tab-delimited format.</p>
<pre><code>ATTR1 ATTR2 ATTR3
23.7 45.89 1.09
.... ..... ....
.... ..... ....
.... ..... ....
</code></pre>
| php | [2] |
1,154,462 | 1,154,463 | need help understanding cin buffer behavior | <p>The code below shows the output as </p>
<blockquote>
<pre><code>enter something
abc
you entered: a
you entered: b
you entered: c
</code></pre>
</blockquote>
<pre><code> #include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
char c;
whil... | c++ | [6] |
1,872,121 | 1,872,122 | Generic Dictionary as ref method param | <p>I am trying to do something like this</p>
<pre><code>public void GetData(ref Dictionary<T,V> dataDictionary)
{
}
</code></pre>
<p>Where T can be GUID, string, or int and V is custom user or item object.</p>
| c# | [0] |
1,510,320 | 1,510,321 | store comparators objects in array | <p>I have defined 4 comparators for my object like this:</p>
<pre><code>public static Comparator<mObject> comp0 = new Comparator<mObject>() {
@Override
public int compare(mObject l, mObject r) {
...compare
}
};
public static Comparator<mObject> comp1 = new Co... | java | [1] |
3,047,221 | 3,047,222 | some questions i have when converting from classic asp to .NET | <p>in my classic asp website, there is an <code>objCMD</code> variable being set to the value of <code>Server.CreateObject("ADODB.Command")</code>. i think that <code>objCMD</code> should be turned into a <code>SqlCommand</code> .NET object, but i need confirmation first. i'm still not sure what <code>Server.CreateObje... | asp.net | [9] |
4,261,240 | 4,261,241 | onclick on span using jquery | <p>I have the following HTML</p>
<pre><code><a title="Prev" data-event="click" data-handler="prev" class="ui-datepicker-prev ui-corner-all">
<span class="ui-icon ui-icon-circle-triangle-w">Prev</span>
</a>
</code></pre>
<p>I need to change 'Prev' once click on span using jquery</p>
... | jquery | [5] |
4,435,095 | 4,435,096 | I have a txt file. How can I take dictionary key values and print the line of text they appear in? | <p>I have a txt file. I have written code that finds the unique words and the number of times each word appears in that file. I now need to figure out how to print the lines that those words apear in as well. How can I go about doing this? </p>
<blockquote>
<p>Here is a sample output:
Analyze what file: itsy_b... | python | [7] |
4,706,473 | 4,706,474 | how to call [object htmlDivElement] | <p>i want to call the functions <strong>movein(this)</strong> & <strong>moveout(this)</strong> directly with out using onmouseover or onmouseout
by the way (<strong>this</strong>) is [object htmlDivElement]</p>
<pre><code> var tb = '<div id="' + o.id + '" onmouseover="movein(this);" onmouseout="moveout(this);"... | javascript | [3] |
4,731,897 | 4,731,898 | Android: When is it appropriate to store images in the assets rather than the drawable folders? | <p>I have a bunch of images that are common for all resolutions (currently I only support one resolution. There are reasons for this).</p>
<p>My question is, when is it appropriate to store images in the assets folder rather than the drawable folder?</p>
| android | [4] |
3,078,022 | 3,078,023 | Extending interfaces using inheritance | <pre><code>class IA
{
public:
virtual void a() = 0;
};
class A: public IA
{
public:
virtual void a()
{
}
};
class IB
{
public:
virtual void b() = 0;
};
class B: public IB, public A
{
public:
virtual void b()
{
}
};
void f(IA* p)
{
}
int main()
{
B b = B();
IB* p = &b;
... | c++ | [6] |
3,373,365 | 3,373,366 | Is it possible to tell if all checkboxes are checked on a dynamic form? | <p>I have a form which can populate from 1-100 elements based on a user's internal preferences. On my subsequent php page, i want to divert action if ALL checkboxes from the previous page are checked. I know checkboxes can come through as an array but I am unable to develop a solution for both a single array (one name,... | php | [2] |
2,311,398 | 2,311,399 | Array PopFront Method C++ | <p>Trying not to lose it here. As you can see below I have assigned intFrontPtr to point to the first cell in the array. And intBackPtr to point to the last cell in the array...:</p>
<pre><code>bool quack::popFront(int& nPopFront)
{
nPopFront = items[top+1].n;
if ( count >= maxSize ) return false;
... | c++ | [6] |
5,717,874 | 5,717,875 | Intercept all current and future links | <p>Just wondering if there is a way with jquery to intercept a link when clicked. The problem is that some of the links on my page are not loaded when the page is first loaded. I have a vague recollection of hearing that jquery has a way of intercepting all current and future links. Here is the code I have. It work... | jquery | [5] |
3,399,036 | 3,399,037 | What is the difference between decodeURIComponent and decodeURI? | <p>What is the difference between the JavaScript functions 'decodeURIComponent' and 'decodeURI'?</p>
| javascript | [3] |
2,139,242 | 2,139,243 | Retrieving data from simplexml_load_file | <p>Working with the simplexml_load_file() function, I get a side effect. To understand what I mean, see this code: </p>
<pre><code>$result = simplexml_load_file($xml_link);
$arr = array();
foreach ($result->element as $elem) {
$arr[] = $elem->number[0];
}
print_r($arr);
</code></pre>
<p>Output:</p>
<pre>... | php | [2] |
2,608,088 | 2,608,089 | Android - is there a way to edit color in a part of a string that is displayed? | <p>I have a part of the code that calls a toString on an object and the toString basically spits out the string that will be shown on the screen.</p>
<p>I would like to change the color of one part of the string. </p>
<p>I just tried something like this:</p>
<pre><code> String coloredString = solutionTopicN... | android | [4] |
4,096,282 | 4,096,283 | Defined error message in the PHP | <p>How do I "make" error messages in best practices? Right now I just have <code>$error = '';</code> and then just a lot of if(){}s that do <code>.= 'Message<br>'</code>, and then <code>if (!empty($error)) { echo $error; }</code>, which I assume is a terrible thing.</p>
| php | [2] |
4,669,132 | 4,669,133 | Getting started with Android code samples - permissions error | <p>New to android. Running Eclipse on Ubuntu 9.10 with Android SDK plugin installed and working. Trying to get some code samples from <a href="http://developer.android.com/resources/samples/get.html" rel="nofollow">http://developer.android.com/resources/samples/get.html</a> , and following its procedure to load said sa... | android | [4] |
3,536,127 | 3,536,128 | Java JNI: How to create an array of byte arrays in native code? | <p>I'm looking to create an array of byte arrays in native code. I plan to use NewObjectArray() for the outer array, since Java arrays are objects. What should I specify as the class identifier for a Java byte array?</p>
| java | [1] |
4,859,192 | 4,859,193 | Android Testing | <p>I have found 'Robolectric' framework to be efficient for testing in android.
I am currently using 'netbeans' as my IDE for developing android app.</p>
<p>So how can I setup Robolectric in netbeans?</p>
<p>Thanks</p>
| android | [4] |
633,266 | 633,267 | Remove Specific Elements from 2D Array | <pre><code>Array (
[0] => Array (
[0] => a
[1] => b
[2] => c
[3] => c
[4] => d
)
)
</code></pre>
<p>I have 2D array as of <code>$arr[0][$i];</code></... | php | [2] |
3,015,744 | 3,015,745 | How to parse a text file with c#? | <p>How do I parse a Textfile like:</p>
<blockquote>
<p>{:block1:} </p>
<p>%param1%= value1</p>
<p>%param2% = value2</p>
<p>%paramn% =valuen</p>
<p>{:block2:}</p>
<p>1st html - sourcecode Just copy 1:1</p>
<p>{:block3:} </p>
<p>2nd html - sourcecode Just copy 1:1
...{:block4:} </p... | c# | [0] |
5,569,415 | 5,569,416 | test object not retaining the value after being passed by the constructor in google test | <p>I am using google test/mock framework for unit testing. I call the constructor of the base class I am testing in my SetUp function. I set certain private members of the class using the object generated in SetUp to modify my test's behavior. When my test function invokes the base function that I am testing, the addre... | c++ | [6] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.