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 |
|---|---|---|---|---|---|
979,473 | 979,474 | Type casting from an Object | <p>I have some code in Java as follows:</p>
<pre><code>private Object addVertex(String label, int posX, int posY) {
Vertex newVertex = new Vertex();
this.getModel().beginUpdate();
try {
newVertex = insertVertex(parent, null, label, posX, posY, 80, 30);
}
finally {
this.getModel().endUpdate();
}
return newVe... | java | [1] |
4,087,818 | 4,087,819 | Jquery variable problem | <p>The HTML:</p>
<pre><code><div class="first" id="first_id">
<div class="second">text sample</div>
<div class="third"><button type="submit" class="some_class" id="some_id">send</button></div>
</div>
</code></pre>
<p>Jquery:</p>
<pre><code>$("#some_id").click(function(... | jquery | [5] |
739,606 | 739,607 | Shared variable scope between two browser tabs? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4079280/javascript-communication-between-browser-tabs-windows">Javascript communication between browser tabs/windows</a> </p>
</blockquote>
<p>I have web application with a HTML form which contains a select/opti... | javascript | [3] |
2,007,453 | 2,007,454 | How to connect Java application to X11 to move cursor | <p>I am trying to write an application like htop or saidar where the application does not keep redrawing the output in the terminal.</p>
<p>I would like to use X11 to move the cursor to where I want it and update the information.</p>
<p>Is there a way to do this?</p>
| java | [1] |
3,240,395 | 3,240,396 | How to add checkboxes dynamically in android | <p>I need to create edittext fields dynamically in android. I have gone through the <a href="http://www.dreamincode.net/forums/topic/130521-android-part-iii-dynamic-layouts" rel="nofollow">link</a> and had written the button click action for it. That is when I click on the button the check boxes has to display. But whe... | android | [4] |
3,032,764 | 3,032,765 | select value in spinner and pass id of that value to server in android | <p>I have got list of "client_id' and "organization" from JSON response and need to passe these organization list to spinner , but when user select organization name from spinner then need to pass client_id associated with that organization to server.</p>
<p>here is my code .</p>
<pre><code> try {
//*** Gett... | android | [4] |
4,599,332 | 4,599,333 | prog to read students particulars such as roll etc from key board using array? | <pre><code>import java. util.*;
class student
{
private int rollno;
private int age;
private String sex;
private float height;
private float weight;
void getinfo()
{
System.out.println("enter the roll no of the student");
Scanner obj=new Scanner(System.in);
rollno=o... | java | [1] |
5,452,123 | 5,452,124 | How to show app icon on the Unlock Screen? | <p>Someone asked me to insert any application icon on the screen before we unlock the screen. Is it possible to add an app icon like we add with the help of Widgets provided by the Android SDK?</p>
<p>Thanks in Advance,
Aagrah</p>
| android | [4] |
4,635,193 | 4,635,194 | C++ how can I get the destination ip from a SOCKET pointer | <p>I am doing a firewall project where I am using LSP(Layered Service Provider) for URL filtering. I want to know how can I get the destination IP from LSP ?</p>
| c++ | [6] |
4,544,419 | 4,544,420 | PHP numbers manipulation | <p><code>$ch</code> is a character.</p>
<p>I need to convert it into 2 numbers like that (example):</p>
<pre><code>$ch = 'A' => ASCII code: 0x41
=> Binary: 0100 0001
=> {4, 1}
</code></pre>
<p>What is the easiest and fastest method to achieve this ?</p>
| php | [2] |
5,520,883 | 5,520,884 | Switch from one tab to other programatically | <p>In a <code>Windows Form</code>, while using tabControl1 how to switch from one tab to other(i.e tabPage1 to tabPage2) on button click in tabPage1..Tried a lot with </p>
<pre><code>tabPage2.Show();
tabControl1.SelectedIndex = tabPage2;
</code></pre>
<p>etc but not giving any o/p...Please help</p>
| c# | [0] |
2,717,429 | 2,717,430 | What is the result of i + ++i? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/949433/could-anyone-explain-these-undefined-behaviors-i-i-i-i-i-etc">Could anyone explain these undefined behaviors (i = i++ + ++i , i = i++, etc…)</a> </p>
</blockquote>
<p>Why this code is generating 8 ... | c++ | [6] |
1,035,813 | 1,035,814 | System.Diagnostics.Process Arguments | <p>How can I pass Argument to the System.Dignostics.Process with spaces. I am doing this:</p>
<pre><code>System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = exePath + @"\bin\test.exe";
string args = String.Format(@"{0}{1}{2}{3}", "-plot " ,pa... | c# | [0] |
56,424 | 56,425 | Android: GameGuardian doesn't find the values of my app? | <p>I've created a simple app, with a button and a TextView. My value starts at 100 and is stored in an integer variable. When you press the button the value decreases by 1 and the TextView is updated.</p>
<p>I installed the application on my phone and tried to find the value with GameGuardian... Fortunately for others... | android | [4] |
3,866,110 | 3,866,111 | Shared memory and runnning multiple copies of an executable | <p>I have an application (winform exe) that I run several times. Does this mean that I have share assemblies or does each instance have its own copie of the assemblies? When I run the app, it uses about 30MB (in task manager) and when I run another copy of the app it uses another 30MB.</p>
<p>How do I work out how muc... | c# | [0] |
639,050 | 639,051 | Dropdownlist inside a Gridview | <p>HI,
i am working on dropdownlist inside datagrid if i select one value in any row of dropdowlist
then if i am select same value in another row of a dropdown then display message 'already added'. </p>
<p><strong>How to do this using javascript</strong></p>
<p>Ravi.</p>
| javascript | [3] |
4,665,801 | 4,665,802 | jquery 1.2.7 how can I replace some text? | <p>I cannot upgrade my jQuery, and I was wondering why this function is not existing. How can I implement this:</p>
<pre><code>$('#block-block-1 .content').replace(/^\s*|\s*$/g,'');
</code></pre>
<p>What I get is: "function doesn't exist"</p>
<p>thanks</p>
| jquery | [5] |
283,661 | 283,662 | Trivial conversion | <p>How can I convert the value returned by <code>System.getProperty("line.separator");</code> to its string representation. </p>
<p>For instance, if the value is <code>"\n"</code> I would like to have the string formed by the characters: <code>['\' + 'n']</code>, if the value is <code>"\r\n"</code> => <code>['\','r... | java | [1] |
3,882,362 | 3,882,363 | Image multiple tap zooming | <p>Can anyone please suggest me a good sample code for multiple tap zooming image. Thanks.</p>
| iphone | [8] |
2,993,567 | 2,993,568 | videoView XML file is showing error ! | <p>Error in the following XML :</p>
<pre><code> <?xml version="1.0" encoding="utf-8"?>
<VideoView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/videoView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</code></pre>
<p>The error sh... | android | [4] |
5,292,823 | 5,292,824 | android.graphics.Point: all methods are stubs | <p>I'm trying to use the Point class from <code>android.graphics</code>, but it appears that all the methods are stubs. For example, the line</p>
<pre><code>Point p = new Point(1, 1);
</code></pre>
<p>causes <code>java.lang.RuntimeException: Stub!</code>. If I look at the bytecode for Point, I see a bunch of stubbe... | android | [4] |
4,516,717 | 4,516,718 | Should I create inner class here or leave as is? | <p>Folks, I have two separate classes. One of them makes http requests/receives response to/from a server and the second one converts received JSON objects into my models (separate classes). I'm thinking it would be an idea to include this class for data converting as an inner class of my first class. Wouldn't my first... | java | [1] |
2,703,778 | 2,703,779 | Saving a same image in different resolution | <p>Hi i am trying to make an android app which should save a image in different resolution,<br>
Help me with further information,<br>
Thank you.</p>
| android | [4] |
25,643 | 25,644 | Handling localization for strings downloaded from the web | <p>I have an android application that must be localizad to spanish and english. The local resource strings are kept in the regular folders (values-es, values-en, etc..). The problem comes when I need to download some configuration files from the web. This files are xml that contain different information that the applic... | android | [4] |
4,697,111 | 4,697,112 | how can i block website? | <p>Code:</p>
<pre><code>string path = @"C:\Windows\System32\drivers\etc\hosts";
StreamWriter sw = new StreamWriter(path, true);
string sitetoblock = "\r\n127.0.0.1 http://" + textBox1.Text +
" 127.0.0.1 http://www." + textBox1.Text;
sw.Write(sitetoblock);
sw.Close();
MessageBox.Show(textBox1.Text + " blocked");
<... | c# | [0] |
3,929,916 | 3,929,917 | Problem deploying an ASP.NET site | <p>I have written my ASP.NET web site code in Visual Studio 2008. When I'm uploading it to the remote server I'm getting an error message about a problem in the web configuration file:</p>
<blockquote>
<p>Section or group name 'system.web.extensions' is already defined.Updates to this may occur at the configuration ... | asp.net | [9] |
3,956,740 | 3,956,741 | Javascript. Pretty date with months and years | <p>I got the below script to convert dates into pretty dates. It works perfectly
fine but only to a level of weeks. I need it to work fine for months and perhaps years to.</p>
<p>How can I modify this code to work?</p>
<pre><code>function prettyDate(time) {
var date = new Date((time || "").replace(/-/g,"/").repl... | javascript | [3] |
705,809 | 705,810 | How to add Activity Indicator as subview to UIButton? | <p>Can we add activity indicator as subview to UIButton?</p>
<p>If yes then plz tell me how to do that?</p>
<p>I used [button addSubview:activityIndicator];</p>
<p>Not working...</p>
| iphone | [8] |
3,329,890 | 3,329,891 | How to set a image (.jpg) in the sd card in android to BufferedImage image | <p>The way i trying to do is this, But i want to set the image to steve.jpg</p>
<pre><code>BufferedImage image = null ;
IplImage originalImage = IplImage.createFrom(image);
</code></pre>
| android | [4] |
242,699 | 242,700 | module name in sys.modules and globals() | <p>If I import a module, the module name shows up in both <code>sys.modules</code> and <code>globals()</code>. If I again delete it, it is removed from <code>globals()</code>, but still resides in <code>sys.modules</code>. Why is it so?</p>
<pre><code>import mymodule
'mymodule' in globals() # True
'mymodule' in sys.... | python | [7] |
252,625 | 252,626 | Does having `const` and non-`const` versions of a member function qualify as overloading? | <p>Is declaring a <code>const</code> and non-<code>const</code> member function with the same name classified as overloading?</p>
<pre><code>iterator find ( const key_type& x );
const_iterator find ( const key_type& x ) const;
</code></pre>
| c++ | [6] |
25,026 | 25,027 | Jquery - how to get the object(node) of the textbox inside a plugin | <p>my code is like this -</p>
<pre><code><input type="text" name="role" id="role" value="abc" onfocus="initRole(this);"
<script>
function initRole(input){
$(input).autocomplete({ ajax_get : get_roles});
}
</script>
</code></pre>
<p>My plugin is defined as - </p>
<pre><code>$.fn.autocom... | jquery | [5] |
820,823 | 820,824 | jQuery animate to show and move elements | <p>Below is an small working script I've made. Have a look <a href="http://jsfiddle.net/knsgp/" rel="nofollow">here</a> </p>
<pre><code>$(document).ready(function ()
{
$("ul li a").hover(function ()
{
$("span", this).fadeIn('fast');
$("label", this).fadeIn('fast');
},
function ()
{
$("... | jquery | [5] |
5,154,654 | 5,154,655 | Android session starts at same time | <p>I am working with one game which is basically a location based game. The duration of game is 5 mins. Everything is working fine. But the problem is on one device game is starting before the game is started on the other device.</p>
<p>Suppose User A has sent request, user b has accepted the request. then only game ... | android | [4] |
5,438,271 | 5,438,272 | How to update the android media database in android | <p>How to update the media database when we delete a file. am developing an file explorer app, so i need to update media database in android?
This link <strong>http://stackoverflow.com/questions/5250515/how-to-update-the-android-media-database</strong></p>
<p>was helpful to me. but what i need is to scan the specific ... | android | [4] |
5,243,357 | 5,243,358 | How to add drawables to a view programmatically from a URL but not in xml layout | <p>I'm currently trying to create an Android View object dynamically and then add this view to a widget based on some user selection from a gallery. The problem is that it does not have setters for drawable resources. The only way to set the images is if I predefine an xml layout. I cannot then set the user selected im... | android | [4] |
1,147,316 | 1,147,317 | How do I know if a File type is PDF? | <ul>
<li><p>This answer <a href="http://stackoverflow.com/questions/941813/how-can-i-determine-if-a-file-is-a-pdf-file">How can I determine if a file is a PDF file? </a> recommends to download another library, but my requirement is that I just need to check if a file is directory is of type PDF or not</p></li>
<li><p>U... | java | [1] |
1,256,321 | 1,256,322 | Why would I use a struct in a program? | <p>I see lot of struct code like below</p>
<pre><code>struct codDrives {
WCHAR letter;
WCHAR volume[100];
} Drives[26];
</code></pre>
<p>We can use variables or array something like that to store the data.</p>
<p>But I am not sure why would I use a struct in the programs?</p>
| c++ | [6] |
1,057,515 | 1,057,516 | Loop array of values | <p>I use the following code to get through each of values</p>
<pre><code>foreach (array('facebook', 'twitter', 'vkontakte', 'mailru', 'odnoklassniki') as $service) {
// Code goes here
}
</code></pre>
<p>But I feel there should be more beautiful solution than this one.</p>
| php | [2] |
380,022 | 380,023 | attaching data to <td> elements | <p>I'm building a web interface to edit values in large tables (2600 x 2600). Because the table is so big, I only load a part of the table into the browser, and the user has the ability to see a small window of the table by specifying xmin, xmax, ymin and ymax values. What is the best way to attach x,y coordinates to e... | jquery | [5] |
1,371,569 | 1,371,570 | Create Drawable with specific height | <p>I want to create a drawable object with a width equal to the screen's width and display 3 images inside the drawable. I know the last part can be done using a LayerDrawable object, but I don't know how to set the drawable sizes. What would be the best way to do this?</p>
<p>Thank you and best regards</p>
| android | [4] |
613,919 | 613,920 | Android: is it possible to refer to an Activity from a 2nd Activity? | <p>This is a pretty simple question, but I have been unable to find anyway to accomplish what I am trying to do...</p>
<p>I want to launch a new Activity to display some complex information. Because of the complexity, it is undesirable to serialize the information into the intent's parameters. Is it possible for the... | android | [4] |
3,461,828 | 3,461,829 | Having two tabs to the same website crashes javascript | <p>I have a javascript function that searches for an element by Id </p>
<pre><code>document.getElementById('myelement').value
</code></pre>
<p>and when I have multiple tabs opened to same website but not same page the script looks for the element on the wrong tab. Does anybody know a way to search for an element by a... | javascript | [3] |
4,825,007 | 4,825,008 | How to alter a float by its smallest increment in Java? | <p>I have a <code>double</code> value <code>d</code> and would like a way to nudge it very slightly larger (or smaller) to get a new value that will be as close as possible to the original but still strictly greater than (or less than) the original.</p>
<p>It doesn't have to be close down to the last bit—it's more imp... | java | [1] |
4,918,597 | 4,918,598 | How to convert from Array<String> to String[] in Java | <p>I have to get a part of my content provider query in a String[] format. Currently I use:</p>
<pre><code> String[] selectionArgs = {"",""};
selectionArgs[0] = Integer.toString(routeScheduleID);
selectionArgs[1] = runDate.toString();
</code></pre>
<p>But in this case I have an unknown number of eleme... | java | [1] |
2,180,927 | 2,180,928 | BadTokenException at AutoCompleteTextView showDropDown() inside a listener | <p>I have two activities, activity1 is starting activity2.
in activity 2 I registered an OnFocusChangeListener to a AutoCompleteTextView:</p>
<pre><code>someTextView.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus)
((Au... | android | [4] |
4,618,749 | 4,618,750 | (Solved) - Put watermark on image that load from DB - php | <p>I had the below code that load image from DB. There are more than 600 rows of image has been inserted into the DB. I need the script that can perform these action:</p>
<p>Step 1) Load the image from DB
Step 2) process the image by putting the watermark
Step 3) Output the image to the browser.</p>
<p>I had the belo... | php | [2] |
3,400,016 | 3,400,017 | Javascript and Forms getting value of selection option | <p>How would I use Javascript to get the value of the options in this form selection?</p>
<p>I know I can use:</p>
<p>document.customerInfo.cardType.selectedIndex==4</p>
<p>but this wont work for me. I have over 30 and I really don't wan to code that much. Is there anyway I can just get the value of the option?</p>
... | javascript | [3] |
1,374,184 | 1,374,185 | Locking the screen in android | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4545079/lock-the-android-device-programatically">Lock the android device programatically</a> </p>
</blockquote>
<p>I want to lock the screen through my program. i am using the following code to do the same..But ... | android | [4] |
1,322,778 | 1,322,779 | should be either NULL or a valid callback | <p>Just moved to a new server and am now getting this message on a form submit that has a multiple checkbox options. Is this php.ini related? I think the old box was on php4 and we are now on 5.</p>
<blockquote>
<p>Warning: array_map() [function.array-map]: The first argument, 'stripslashes_deep_ds', should be eithe... | php | [2] |
2,673,366 | 2,673,367 | how to change the array [1,2,3,4] to [1,3,4] | <p>any simply way ?</p>
<p>this is my code:</p>
<pre><code>var a=[1,2,3,4]
a.slice(0,1)
alert( a)
</code></pre>
<p>and it print [1,2,3,4]</p>
<p>thanks</p>
| javascript | [3] |
4,138,974 | 4,138,975 | Using Multiple Spinners, But Only One Spinner Has All The Data | <p>I have two spinners and two arrays. However, one spinner receives both arrays while the other receives no values from either of the two arrays. Note: I do not want to use radio buttons as the data is shortened for review.</p>
<pre><code>final ArrayList<String> serialnums = new ArrayList<String>();
ser... | android | [4] |
5,773,135 | 5,773,136 | How to get logged in user name? | <p>I want to take the current logged in user name (windows user) using c#, i have done the following.</p>
<ol>
<li>Create one web application</li>
<li>Published the web application</li>
<li>Created the site in iis and given the physical path</li>
</ol>
<p>when i try to get the user name , am getting the application p... | c# | [0] |
1,849,903 | 1,849,904 | JS: How to prevent the default action on images in browsers? | <p>In IE, for example, when you press the left button on an image and keeping it pressed try to move the mouse, the drag n' drop action is taking place; how could I prevent this default action so that doing that way nothing will happen. I am building an image cropper, so you should understand why I need that. I am not ... | javascript | [3] |
2,895,950 | 2,895,951 | Sencha touch for Mobile Web Development | <p>im new at making mobile websites. and I saw sencha touch as it was recommended by most of the people. so i just want to ask you guys if what tools or any experties that i should get to start with. ive already downloaded sencha touch 2.0.1-commercial. Thank you in advance.</p>
| android | [4] |
1,715,122 | 1,715,123 | How to check iPhone keyboard klick sound turned on/off in settings? | <p>I'm working on custom keyboard and need to play tap sound for keys if it enabled in the Settings. Tap sound not a problem but how to check is keyboard click sound enabled ? Thanks.</p>
| iphone | [8] |
1,912,824 | 1,912,825 | asp.net forms authentication redirect problem | <p>The default document feature is turned off in IIS and here's the situation...</p>
<p>My start page for my project say is A.aspx. I run the project and sure enough, A.aspx appears in the url of the browser. Like it should though, A.aspx finds no user logged in and redirects to Login.aspx like it should.</p>
<p>A.... | asp.net | [9] |
3,852,908 | 3,852,909 | How to get the currently loading script name and the url variable of the script? | <p>I am loading a script using the script embed tag and I want to get the url variables and the loading script name inside the script. Is it possible? For Example,</p>
<pre><code><script src="test.js?id=12"></script>
</code></pre>
<p>Inside test.js is there any way to get the url variable id?</p>
<p>Any ... | javascript | [3] |
236,451 | 236,452 | How to get GUID in android? | <p>we are developing the application using the .Net webservice(soap protocal) for that i need Pass GUID from android class.</p>
<p>in .Net we have statement like below
Guid myGuid1 = new Guid();</p>
<p>i need the similar functionality in Android ,
is there any way to make this kind of functionality in android ... | android | [4] |
2,749,207 | 2,749,208 | javascript Class Set? | <p>Is there a javascript class/object name set? In a <a href="http://github.com/DmitryBaranovskiy/raphael/raw/master/raphael.js" rel="nofollow">raphael</a> demo i saw this code </p>
<pre><code>var targets = r.set();
targets.push(r.circle(300, 100, 20),
r.circle(300, 150, 20), ...
</c... | javascript | [3] |
4,753,555 | 4,753,556 | Calling function defined in exe | <p>I need to know a way to call a function defined in the exe from a python script.
I know how to call entire exe from py file.</p>
| python | [7] |
2,926,278 | 2,926,279 | When should I guard against null? | <p>When should I guard against <code>null</code> arguments? Ideally, I would guard against <code>null</code> everywhere, but that gets very bloated and tedious. I also note that people aren't putting guards in things like <code>AsyncCallback</code>s.</p>
<p>To keep from annoying other people with lots of unidiomatic c... | c# | [0] |
86,598 | 86,599 | Data Structure to use in Java | <p>What data stucture should i use in Java to store word frequencies of every word in its sentence as well as its frequency in another sentence i.e. pairwise. Every node must have 2 frequencies one its own and one of its neighboring sentence. This must be repeated for every pair of sentences in a document. Its use it t... | java | [1] |
3,466,425 | 3,466,426 | Need help with jQuery hide/show | <p>I'm using jQuery to show and hide elements upon user interaction. The following code works fine:</p>
<pre><code><script type="text/javascript">
$(document).ready(function () {
$('.c').hide();
$('.b').click(function() {
var t = $(this);
t.parent().find('.c').show();
});
});
... | jquery | [5] |
1,746,011 | 1,746,012 | C# How can I clear a textbox when the backspace button is pressed | <p>I'm using C# and working on a Winform program, when a users clicks in a textbox and presses the backspace button I want to clear the textbox rather than delete one character at a time. How can I do this?</p>
<p>Many thanks
Steve</p>
| c# | [0] |
5,627,391 | 5,627,392 | Porting MouseEvent to Onclick in Android | <p>Anyone know how this is done? Any programs to do it?</p>
| android | [4] |
4,905,301 | 4,905,302 | Indentation in a custom TraceListener | <p>How should I implement supporting indentation in a custom TraceListener?</p>
<pre><code>Trace.Indent();
// or
Trace.Unindent();
</code></pre>
<p>Does not work even if there is an implementation for:</p>
<pre><code>protected override void WriteIndent() { ... }
</code></pre>
<p>In that custom TraceListener.</p>
<... | c# | [0] |
2,491,981 | 2,491,982 | Lame operator redefinition error | <p>Sorry it's lame but I can't figure it out:</p>
<pre><code>class Address {
public:
uint32_t addr;
uint16_t port;
public:
Address();
Address(uint32_t addr, uint16_t port);
Address(const Address & src);
Address& operator=(const Address &src);
bool isNull();
friend std::... | c++ | [6] |
2,784,697 | 2,784,698 | what is intel x86 atom system image in android sdk manager? | <p>I am new to android development. I am setting up development environment.
So my question is, what is intel x86 atom system image in android sdk manager?
Should i install it or not?
the option is present in api level 15 & 16 but not in 17.</p>
<p>Thanks.</p>
| android | [4] |
1,980,618 | 1,980,619 | Android parse xml referenced by string | <p>Is it possible to parse an xml file located in assets by referencing the filename as a string from res/values?</p>
<pre><code> Document doc = db.parse(assetManager.open("questions.xml"));
</code></pre>
<p>and instead of questions.xml something like @string/questions.xml? I am having difficulty getting this to wor... | android | [4] |
2,204,478 | 2,204,479 | How do I link files in PHP? | <p>I have two PHP files that I need to link. How can I link the files together using PHP? The effect I want is to have the user click a button, some information is proccessed on the page, and then the result is displayed in a different page, depending on the button the user clicked.Thanks</p>
| php | [2] |
2,342,023 | 2,342,024 | Understanding C++ Virtual Methods of Instances Allocated on the Stack | <p>For the following code:</p>
<pre><code>#include<iostream>
using namespace std;
class A{
public:
virtual int f(){return 1;}
};
class B : public A{
public:
virtual int f(){return 2;}
};
int main(int argc,char*argv[]){
A b=B();
cout<<b.f()<<endl;
}
</code></pre>
<p>I expect the number <code... | c++ | [6] |
1,997,948 | 1,997,949 | Can I do an assignment operation between two istream_iterators? | <p>Can I do an assignment operation between two istream_iterators? If so then what will be the behaviour, i.e. will both the iterators point to the same location in the file, i.e. will we get two pointers to the same line in a file?</p>
<p>If so, can I increment one iterator, read some lines, and then assign it back t... | c++ | [6] |
1,482,353 | 1,482,354 | Arkanoid in C#, help needed | <p>I have searched on web, but dint find any tips how to do it. IDE to be used in Microsoft Visual Studio. What project type must I choose to make Arkanoid game?</p>
| c# | [0] |
222,342 | 222,343 | Android Activity | <p>I have 5 activities and the flow is like this </p>
<blockquote>
<p>1 → 2 → 3 → 4 → 5 </p>
</blockquote>
<p>at the 5th activity, upon pressing the back button, is it possible to get back to activity 2 or 3 wihtout finishing any activity? Currently I only get to the 4th one.</p>
| android | [4] |
3,935,158 | 3,935,159 | Change value in div when click on button with jquery? | <p>Hi
I have a div that I want to change some values in, when I click a button.</p>
<p>If I click on </p>
<pre><code><button id="image320x150">320 x 150</button>
</code></pre>
<p>then I want to change the width to 100 and the height value to 200 in the div.</p>
<p>and if I click on:</p>
<pre><code><... | jquery | [5] |
5,666,085 | 5,666,086 | Cross dependencies without forward declaring all used functions? | <p>I have class A (in A.h) which depends on class B in (B.h) and vice versa. Forward declaring the used functions works, but this means I have to update everywhere where I forward declared those functions in the future, ex, if I remove, or change argument in those functions they must all be updated to reflect change. I... | c++ | [6] |
305,451 | 305,452 | Crash on loading large number of images | <p>I am creating an app in which I am loading 800 jpg images for the Imageview.On occurance of different enevts different set of images are to be loaded for animation.on fire of first event it works fine but on 2nd event it crashes on iPhone.Any help?
my part of code is as below</p>
<pre><code>for (int aniCount = 1; a... | iphone | [8] |
4,270,424 | 4,270,425 | Print statements without new lines in python? | <p>I was wondering if there is a way to print elements without newlines such as</p>
<pre><code>x=['.','.','.','.','.','.']
for i in x:
print i
</code></pre>
<p>and that would print <code>........</code> instead of what would normally print which would be</p>
<pre><code>.
.
.
.
.
.
.
.
</code></pre>
<p>Thanks!</p>
| python | [7] |
4,531,057 | 4,531,058 | Android deploy APK, reinstall instead of update | <p>I would like to send out an update of my apk, but i did some database changes which will make the app crash. </p>
<p>So the user has to uninstall and then reinstall it. Is there a way to deploy an apk so this is done automatically.</p>
<p>Or clearing the app data of the previous installation.</p>
| android | [4] |
5,344,386 | 5,344,387 | Searching for childNodes returns undefined | <p>I have this in my html page:</p>
<pre><code><nav>
<a></a>
<a></a>
</nav>
</code></pre>
<p>but when I run <code>var menuitem = document.getElementsByTagName('nav').childNodes;</code>
it returns "undefined".</p>
<p>Here is the entire javascript file with the relevant part... | javascript | [3] |
5,112,498 | 5,112,499 | How to handle 'undefined' in javascript | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/27509/detecting-an-undefined-object-property-in-javascript">Detecting an undefined object property in JavaScript</a> </p>
</blockquote>
<p>From the below javascript sample</p>
<pre><code> try {
if(jsVar) {... | javascript | [3] |
5,262,572 | 5,262,573 | Dynamically creating a class from file in Python | <p>I've seen these "Dynamically create a class" questions which are answered saying, "use the type() function". I'm sure I'll have to at some point but right know I'm clueless. But from what I've seen you have to already know something about the class, such as a name. </p>
<p>What I'm trying to do is parse an idl typ... | python | [7] |
2,491,597 | 2,491,598 | get variable from one page | <p>I'am a newbie also my language maybe bad, and looking for solution for my learning php code
let say i have many page i.e. etc page1.php ... page1001.php each page maybe:
inside of page1.php:</p>
<pre><code>$color = "red";
$pages = "two";
$theme = "ocean";
$lang = "eng";
$charset = "ISO-8859-1";
etc (more..)
</code>... | php | [2] |
2,745,181 | 2,745,182 | Javascript click event arg pass to non anonymous function | <p>I have this function:</p>
<pre><code> $("#btn").click(function(e,someOtherArguments)
{ //some code
e.stopPropagation();});
</code></pre>
<p>It works, but If I have named function I can't use <code>e</code> because it is undefined.</p>
<pre><code>var namedFunction= function(e,someOtherArguments)
{
//some... | javascript | [3] |
5,561,262 | 5,561,263 | What is the difference between INT, INT16, INT32 and INT64? | <p>I need to know about the difference of <code>INT</code>, <code>INT16</code>, <code>INT32</code> and <code>INT64</code> other than its size?</p>
| c# | [0] |
2,270,542 | 2,270,543 | Java-Scanner locale of Germany returns 0 while summing up double values | <p>this is a small program using Java Scanner which reads a file of double values and sum it up.</p>
<p>I was verifying using certain locale's, and for German\Germany the value is zero.</p>
<p>Here is the code snippet,</p>
<pre><code>s= new Scanner((Readable) new BufferedReader(new FileReader("ScanNum")));
s.useLoca... | java | [1] |
467,848 | 467,849 | How to urlretrieve encrypted images? | <p>I am trying to urlretrieve some image with code:
urllib.request.urlretrieve(imageURL, Path)</p>
<p>however, the imageURL were encrypted, such as:
<a href="http://example.com/show.php?mod=attachment&aid=MjQ3NTY3fDQzMTFhNDg1fDEzNTE2ODk1Nzl8MTE3Njk%3D&noupdate=yes" rel="nofollow">http://example.com/sho... | python | [7] |
1,525,670 | 1,525,671 | Is it okay to create app data in internal memory | <p>I am developing an app which consists of functionality to take pictures using camera, store it on memory and mail it to the specified users.</p>
<p>I created a folder in the SD card and storing the images there. But some of the new devices like Nexus S are not consisting of any SD card. So, is it okay if we access ... | android | [4] |
3,948,255 | 3,948,256 | how to get the text of a span tag and insert in into a hidden field | <p>I'm trying to get the text of a span tag and add it to a hidden field, any ideas how this is possible with jquery.</p>
<p>thanks</p>
<pre><code> <form>
<span class="descriptionsPizza">EXTRA CHEESE</span>
<input name="textfield1" type="text" id="textfield1" class="valfield" size="2" maxle... | jquery | [5] |
5,269,339 | 5,269,340 | Cost of building a list from string | <p>I need to manipulate a string in python, for this I'm creating a list of characters from the string, since python strings are immutable :</p>
<pre><code>str = 'abc'
list(str)
</code></pre>
<p>The problem is that the string can contain upto a million characters and I am not sure whether creating a list is slowing t... | python | [7] |
3,431,138 | 3,431,139 | Intent.ACTION_HEADSET_PLUG is received when activity starts | <p>I am trying to pause music that is playing when the headset is unplugged. </p>
<p>I have created a BroadcastReceiver that listens for ACTION_HEADSET_PLUG intents and acts upon them when the <em>state</em> extra is 0 (for unplugged). My problem is that an ACTION_HEADSET_PLUG intent is received by my BroadcastReceive... | android | [4] |
3,658,030 | 3,658,031 | jQuery closest() after siblings return 0 | <p>How can I check to make sure the siblings don't contain the class I am looking for before I start traveling up the DOM with <code>closest()</code>? I could do it with the <code>closest()</code> and <code>siblings()</code> functions but I am wondering if there is a jquery function that already exists that would take ... | jquery | [5] |
3,338,778 | 3,338,779 | require_once of function file in a header | <p>ive got an global <code>include/header.php</code> file like:</p>
<p>UPDATE
folder structure :</p>
<pre><code> /
include/
header.php
functions.php
content/
show.php
</code></pre>
<p><strong>include/header.php</strong></p>
<pre><code><?php
require_once('functions.php... | php | [2] |
2,930,767 | 2,930,768 | jQuery 1.4.4, dynamically rendered select doesn't render selected option in IE8 | <p>HTML</p>
<pre><code><div class="ph">
</div>
<div class="ph">
</div>
</code></pre>
<p>Javascript</p>
<pre><code>$(function(){
var htmlStr = '\
<select id="OptionID" name="OptionID">\
<option value="">--- Select ---</option>\
<option v... | jquery | [5] |
4,742,248 | 4,742,249 | iPhone SDK: To the iPhone/iTouch? | <p>I have SDK 3.1 for iPhone.</p>
<p>I have made an application, and i want this to put on my iPod Touch.</p>
<p>How to? Is there a need of paying to Apple for a paid developer account? Or is there a way to NOT pay...?</p>
| iphone | [8] |
794,896 | 794,897 | Detecting movement with an iphone | <p>Can the iphone detect its movement in terms of distance? </p>
<p>Would one be able to use a built in function on an iphone to determine the distance the phone has moved so that the speed of movement can be calculated?</p>
<p>Basically my question is</p>
<p>can an iphone detect its position and distance moved with... | iphone | [8] |
5,455,205 | 5,455,206 | How to exit the loop? | <p>I have below code. I wrote a for loop and inside that I have switch statement. The switch has two cases and if <code>i==someOtherValue</code> is true then entire loop should exit. </p>
<pre><code>for (//iterate over elements){
int i = someValueTakenFromLoop;
if(i==someOtherValue){
switch(i){
... | java | [1] |
4,794,306 | 4,794,307 | How do I condense multiple jQuery functions into one? | <p>I'm fairly new to jQuery still and am trying to pick up ways to help optimize my code. I'm currently working on an application in which I'm calling some calculation methods everytime someone leaves a field (.blur). I only want to call these methods when certain criteria are met (such as value != 0). I have 9 fields ... | jquery | [5] |
3,061,659 | 3,061,660 | A Question About RegExp in Javascript | <p>Dear all, <br />
I wrote a regular expression <br />
^([+/-]?([0-9]+(.)?)|([0-9]*.[0-9]+))$ <br />
I create it by two ways <br /></p>
<pre><code>var _regex = "^([+/-]?([0-9]+(\.)?)|([0-9]*\.[0-9]+))$";
var _regexFloat = new RegExp(_regex);
</code></pre>
<p>and <br /></p>
<pre><code>var _regexFloat = /^([+/-]?([0-... | javascript | [3] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.