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
2,750,173
2,750,174
jquery .trigger('click') works only once (in < IE9)
<p>I've searched on the other question but could not find the same situation as i'm in.</p> <p>I've created a overview of items with some dropdowns next to it to filter the results (which will be done by ajax). So when a dropdown is changed, I want to trigger the 'page 1' link so the first page of results will be requ...
jquery
[5]
4,332,152
4,332,153
what's an expression and expression statement in c++?
<p>I've read usually statements in c++ ends with a semicon; so that might help explain what an expression statement would be. but then what would you call an expression by giving an example?</p> <p>In this case, are both just statements or expression statements or expressions?</p> <pre><code>int x; x = 0; </code></pr...
c++
[6]
5,660,121
5,660,122
How to embed a url/page redirection script to a closing pop up window
<p>Please am making use of this script bellow to execute a pop up window when the close button is clicked on but i want to add an extra script that will help me open a new url/page when the "OK" button is clicked please can anyone help me out, here is the javascript am using: </p> <pre><code>&lt;script language="Jav...
javascript
[3]
560,472
560,473
how to show only the last four digit of a credit card number
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/773396/how-to-show-only-part-of-an-int-in-c-sharp-like-cutting-off-a-part-of-a-credit">How to show only part of an int in c# (like cutting off a part of a credit card number)</a> </p> </blockquote> <p>I want to ...
c#
[0]
4,901,419
4,901,420
Java if-else comparison
<p>I've a program test to see if the user input is a positive number and an integer. The <code>if</code> statement test if it is an integer, the <code>else if</code> test if it is negative. If it is a negative or a decimals, the user is asked to input a positive integer. The problem is at the else statement, it is wait...
java
[1]
5,826,235
5,826,236
Check if a file was included orloaded
<p>Is there any elegant way to check if a file was included by using <code>include</code>/<code>include_once</code>/<code>require</code>/<code>require_once</code> or if the page was actually loaded directly? I'm trying to set up a testing file inside class files while I'm creating them.</p> <p>I'm looking for somethin...
php
[2]
1,956,532
1,956,533
Hiding row on dropdown selected index change
<p>I am using an asp.net formsview in my asp.net page and updatepanel . It has two templates Insertemplate and EditTemplate. Indie both templates there is a dropdownlist with id ddlCountry. I have a dropdownlist with all countries. I am showing states dropdown, if country is US and want to hide the row where states dro...
asp.net
[9]
4,783,953
4,783,954
How do you know the correct path to use in a PHP require_once() statement
<p>As many do I have a config.php file in the root of a web app that I want to include in almost every other php file. So most of them have a line like:</p> <pre><code>require_once("config.php"); </code></pre> <p>or sometimes</p> <pre><code>require_once("../config.php"); </code></pre> <p>or even</p> <pre><code>re...
php
[2]
3,482,590
3,482,591
Object methods of same class have same id?
<pre><code>class parent(object): @classmethod def a_class_method(cls): print "in class method %s" % cls @staticmethod def a_static_method(): print "static method" def useless_func(self): pass p1, p2 = parent(),parent() id(p1) == id(p2) // False id(p1.useless_func) == id(p2.useless...
python
[7]
4,364,763
4,364,764
Reverse htmlentities()
<p>For special characters like <strong>áéí</strong> I can call htmlentities():</p> <p><code>$mycaption = htmlentities($mycaption, ENT_QUOTES);</code> </p> <p>to get the corresponding html entities: </p> <p><code>&amp;aacute;&amp;eacute;&amp;iacute;</code></p> <p>How can I reverse this back to "áéí"? Thanks</p>
php
[2]
2,080,967
2,080,968
how to handle this error in jquery library
<p>I am using particular library for constrain on my textbox it giving me following error. How can I resolve it...</p> <pre><code>$.constrain usage: //jquery.constrain.js: 5Uncaught SyntaxError: Unexpected identifier </code></pre> <p>link for library is at</p> <p><a href="http://jsfiddle.net/U9N63/" rel="nofollow">h...
jquery
[5]
173,621
173,622
how to create login form using sqlite in iphone view based application?
<p>i want to create login form using sqlite in iphone view based application please help me.give any idea about sqlite in iphone and any sqlite tutorial for iphone application development..</p>
iphone
[8]
3,318,379
3,318,380
How to read from a file char by char in C++?
<p>I'm trying to read from a file, but the only thing I get on working is using getline().</p> <p>The problem is that reading a whole line doesnt to the job for me.</p> <p>My input file looks like this:</p> <pre><code>abc 10 20 bbb 10 30 ddd 40 20 </code></pre> <p>when the first word in each line should be s...
c++
[6]
4,158,964
4,158,965
How to move values around in a HashMap
<p>I have class, lets say Hockey. The Hockey class will set the hockey's score like the code below:</p> <pre><code>public class Hockey{ private HashMap&lt;String, Integer&gt; hockeyScore; public Hockey(){ hockeyScore = new HashMap&lt;String, Integer&gt;(); } public void setHockeyScore(String clubName, in...
java
[1]
3,488,776
3,488,777
python coding speed and cleanest
<p>Python is pretty clean, and I can code neat apps quickly. But I notice I have some minor error someplace and I dont find the error at compile but at run time. Then I need to change and run the script again. Is there a way to have it break and let me modify and run?</p> <p>Also, I dislike how python has no enums. If...
python
[7]
4,697,620
4,697,621
Java - Image flicker
<p>OK so take a look at this vid (it's 3 seconds long..) showing the problem:</p> <p><a href="http://www.screenr.com/VbV" rel="nofollow">http://www.screenr.com/VbV</a></p> <p>See how the images flicker when you first enter the room?</p> <p>Here's how I have the images set up (they are pulled from <code>tiles</code> ...
java
[1]
5,210,986
5,210,987
I have to create speech recognition software for iphone
<p>I have to create a sample application of speech recognition for iPhone. Please provide me some resources, API and sample projects.</p>
iphone
[8]
5,398,139
5,398,140
move_uploaded_file how to build a upload directory
<p>I got a easy question, but didn't found answer on Google. I am building an application that will have to run on various servers and I have no idea if it will be installed in root, subdir, or in any other way. Also I don't have idea if it will be installed on IIS, Apache, or other type od server. I have a realy nasty...
php
[2]
4,435,644
4,435,645
Saving image captured using webcam in metro apps
<p>I'm new to metro app coding. I know how to capture image and display in image block. But then I want to save in picture library and I do not have any idea about it what to do. Here is the code of what I have done till now.</p> <pre><code>private async void Button_Click_1(object sender, RoutedEventArgs e) { ...
c#
[0]
5,241,836
5,241,837
User comes though the proper path
<p>I want to make sure that the user comes though the proper path.</p> <p>So if the user hits page2 or page3 without having been to index then I want to send them back to page1.</p> <p>What is the best way to do this?</p>
php
[2]
351,312
351,313
how to draw vertical line dynamically?
<p>I want a vertical line drawn dynamically inside the a table row. Some thing like below in XML:</p> <p>I was able to get all the layout from code, except the "View". Any suggestion would be appreciated!</p> <pre><code>&lt;TableRow&gt; &lt;LinearLayout ...... android:orientation="vertical"&gt; &lt...
android
[4]
1,228,117
1,228,118
Get the running page in an application
<p>For example my application contain 3 pages and run that application when the middle of that application means at 2 page i got a phone call after that phone call again i start that application using menu in home screen .At that time i want a page where we stop in previous(that means 2 page).Give me the suggestions ...
android
[4]
915,690
915,691
how to set the row number of row for checkboxlist in asp.net?
<p>I have one checkboxlist with repeat columns=3. If the item count for the datasource of it is less than 20,i need to generate 20 rows with single column.If it is between 21 and 40 then 20 rows and two columns.if it is between 41 to 60 then 20 rows and 3 columns and for more than 60 records then as normal that checkbo...
asp.net
[9]
2,502,555
2,502,556
How to access content page controls from master page in asp.net
<p>it is very easy to access master page control from content page like </p> <pre><code>protected void Page_Load(object sender, EventArgs e) { // content page load event DropDownList thisDropDown = this.Master.FindControl("someDropDown") as DropDownList; userLabel.Text = thisDropDown.SelectedValue; } </cod...
asp.net
[9]
3,530,566
3,530,567
how to get date from table then store it to variable in php
<p>I have a table that stores current_date by timestamp when users get registered.</p> <pre><code>seeker name.. current_date ali...2012-04-22 22:12:36 </code></pre> <p>Now I have to store this date in some variable. I am using this query:</p> <pre><code>$uname= $_REQUEST['name2']; $qry5= "select current_date from...
php
[2]
4,578,070
4,578,071
how to populate option menu(drop down box) on the selection of another option menu in python?
<p>I want to know about the python code of which i asked. the thing is:</p> <p>two option menu 1-country 2-city</p> <p>when we select the country ,should be populate all city to second option menu which is related to that particular country which we select from country option menu.</p> <p>please give me reply very ...
python
[7]
4,244,424
4,244,425
Using compare validator
<p>Is there a way in using compare validator that when you use lessthanequal or greaterthanequal operator it automatically treat the type as int? Let's say adding additional tag in web config or any setup? thanks</p>
asp.net
[9]
4,940,637
4,940,638
Trouble editing a link with str_replace
<p>Ideally I want to use the php script as an include that will be on every page. </p> <p>I have link: <a href="http://www.facebook.com/sharer.php?u=http://123.456.789.101/~user/file.php" rel="nofollow">http://www.facebook.com/sharer.php?u=http://123.456.789.101/~user/file.php</a></p> <p>and I want to make it look li...
php
[2]
1,800,355
1,800,356
Bug in rstrip or what?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/6311968/python-rstrip-removes-one-additional-character">python .rstrip removes one additional character</a> </p> </blockquote> <p>What is the problem here? it seems that rstrip removes more than necessary in the...
python
[7]
5,108,075
5,108,076
How can i get 64 bits of the fractional part of the square root of a number in java?
<p>How can i get 64 bits of the fractional part of the square root of a number in java?</p>
java
[1]
3,967,312
3,967,313
Android app with street view image API
<p>I used the street view image API in my android app, and the following code is the way I retrieve images in my app :</p> <hr> <pre><code>URL url2 = new URL("http://maps.googleapis.com/maps/api/streetview?size=400x400" + "&amp;location="+x_str+","+y_str+"&amp;sensor=false"+"&amp;heading="...
android
[4]
791,407
791,408
Why am I getting the error "parameter pack 'F' must be at the end of the template parameter list"
<p>I have code that uses a variadic template and I'm trying to understand where to put the ellipsis. In the below code I put them, like the error says, at the <em>end</em> of the template parameter list. But I still get errors. What am I doing wrong?</p> <pre><code>template &lt;typename T&gt; struct S { void oper...
c++
[6]
1,645,690
1,645,691
How to get Hindi Keyboard/translate into hindi text programatically in Android
<p>I am developing an application in Android Tablet , i created below query to get hindi text dynamically but no response. <a href="http://stackoverflow.com/questions/8006418/how-to-dynamically-convert-and-show-data-in-hindi-in-android">How to dynamically Convert and show data in Hindi in Android</a></p> <p>If it's n...
android
[4]
1,263,606
1,263,607
Overloading and a "flexible" function
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/12682722/overloading-and-any-number-of-arguments">Overloading and any number of arguments</a> </p> </blockquote> <p>Write a new function called superOperator() that can take any number of arguments (up to 3). Fi...
c++
[6]
3,735,469
3,735,470
Cannot retrieve all saved objects and show in listView
<p>Hi in my application I am saving string information entered by the user. then serializing those string for retrival later. When I go to open the file to where they are saved I always only get the last string that was entered. Can you see where i am going wrong? </p> <p>This is the retrival code</p> <pre><cod...
android
[4]
4,349,345
4,349,346
Why is my app filtered for Android 1.5 and 1.6 devices?
<p>Our last update for our application caused it to be filtered out for Android 1.5 and Android 1.6 devices. We did not change anything in our manifest (aside from the updated version code). </p> <p>These similar questions did not help:<br> <a href="http://stackoverflow.com/questions/4952197/android-app-no-longer-visi...
android
[4]
654,148
654,149
Is possible to position the popup near the LinkButton in datalist asp.net?
<p>I have a DataList that displays the news, and a LinkButton to open a ModalPopupExtender I would like to position the popup near the LinkButton.Per can someone please tell me how to do it with jquery? Thank you all Fabrizio</p>
asp.net
[9]
5,291,761
5,291,762
Redirect to error page when the browser back button hit?
<p>I want to redirect to my Error page. If the user clicks the Back button in my web application. I want to achieve this simply in Javascript. Do anyone knows?</p>
javascript
[3]
3,464,156
3,464,157
What is the most fast way to run 2 for loop ?
<p>I have simple code </p> <pre><code>for( int i = 0 ; i &lt; arr.GetLength(0) ; i++) { for( int j = 0 ; j &lt; arr.GetLength(1) ; j++) { arr[i, j ] = 0; } } </code></pre> <p>I need to make this code to be very fast - so i want to use the <code>Tasks.Parallel.For</code></p> <p>What will be the m...
c#
[0]
4,965,439
4,965,440
PHP - Divide sequence of numbers by decimal seperation
<p>I have a number that represents a software version (ex: 1.2.0.14) and I need to separate each number that is divided by a decimal and store each number as a separate variable.</p> <p>Example:</p> <p>Original number is 1.2.0.14</p> <pre><code>$current_version_major = 1; $current_version_minor = 2; $current_version...
php
[2]
2,484,673
2,484,674
Why do I get error can't multiply sequence by non-int of type 'float' PYTHON
<p>I wrote a simple program to calculate tax for some electrical parts, it goes like this:</p> <pre><code>print "How much does it cost?", price = raw_input() print "Tax: %s" % (price * 0.25) print "Price including tax: %s" % (price * 1.25) raw_input ("Press ENTER to exit") </code></pre> <p>And I keep ...
python
[7]
5,651,451
5,651,452
ASP.NET button click event only works when on Top level master page
<p>I have base.master (top-level), second.master (submaster). A button in the top-level master fires the click event fine, on a page which ues that one master, if its on page where the second.master is used, that button click event doesn't work.</p> <p>No buttons that I place in the submaster work either, heres the co...
asp.net
[9]
1,405,168
1,405,169
python interpreter with ellipsis _ function?
<pre><code>&gt;&gt;&gt; type(_) &lt;type 'ellipsis'&gt; &gt;&gt;&gt; 1 + 1 2 &gt;&gt;&gt; _ 2 &gt;&gt;&gt; </code></pre> <p>what's the usefulness of this _ function?</p>
python
[7]
4,287,275
4,287,276
ViewState as Attribute
<p>Instead of this .. </p> <pre><code> public string Text { get { return ViewState["Text"] as string; } set { ViewState["Text"] = value; } } </code></pre> <p>I would like this .. </p> <pre><code> [ViewState] public String Text { get; set; } </code></pre> <p>Can it be done?</...
asp.net
[9]
5,340,712
5,340,713
assign passed object to member object in constructor
<p>for some reason I can´t achieve this.</p> <pre><code>Line::Line(const Pixel &amp;aStart, const Pixel &amp;aEnd){ start = aStart; end = aEnd; } </code></pre> <p>the Line class:</p> <pre><code>class Line : public Vertex{ public: Line(const Pixel &amp;start, const Pixel &amp;end); Pixel getStart(); Pixel g...
c++
[6]
3,992,373
3,992,374
how to convert html2pdf in asp.net with ItextSharp?
<p>i want to create PDF from some XHTML code. is it possible. i use itextsharp but not success. i am finding open source code or Dll. if any one have ItextSharp code to convert Xhtml code to PDf , we welcome.</p>
asp.net
[9]
4,637,770
4,637,771
best way to find a prime number
<p>what will be the best way to find a prime number so that the time complexity is much reduced.</p>
c++
[6]
3,412,193
3,412,194
Not getting Form value, in java
<p>I have a form and bean. From bean I am retreiving values and setting in DTO. That is also setting in FORM. But getter property value is null. I don't know what is the problem here. Can anybody suggest on this?</p> <pre><code>import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.ArrayList;...
java
[1]
1,846,344
1,846,345
How to do it right : embedding a png directory to an android project and reffering to its items
<p>what i did was that i added a directory named Images, which is full of png files to src\ (so all the images are in src\Images and then reffered to it in code like this:</p> <pre><code>BitmapFactory.decodeFile("Images\\"+i+".png"); </code></pre> <p>it didnt work, how can it be done correctly?</p>
android
[4]
146,057
146,058
customization of the camera overlay
<p>My first question for customization is at <a href="http://stackoverflow.com/questions/10147458/add-a-uibarbutton-for-zbarreaderviewcontroller/10147745#comment13026724_10147745">here</a> and with help from <a href="http://stackoverflow.com/users/251513/mat">Mat</a>. I can customize it. Now I would like to customize t...
iphone
[8]
66,054
66,055
Upload files directly to Amazon S3 from ASP.NET application
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/117810/upload-files-directly-to-amazon-s3-from-asp-net-application">Upload files directly to Amazon S3 from ASP.NET application</a> </p> </blockquote> <p>My ASP.NET MVC application will take a lot of bandwidth a...
asp.net
[9]
5,477,112
5,477,113
asp.net roles provider sample code
<p>i want to implement asp.net role provider to assign users over my LAN to roles and have my asp.net intranet app implement security based on roles.</p> <p>i dont want to use VS to manage this witht he built in tools but rather hand this off to users to manage themselves. i want an admin folder with a few pages for a...
asp.net
[9]
4,551,950
4,551,951
JQuery: Specify placement of error messages inline using Metadata and Validate plugins
<p>I'm doing form validation using JQuery with the validate and metadata plugins. I'm using the metadata plugin so I can specify the rules and messages inline in the html form instead of in the javascript in the page . I'm getting an error when I try to specify the location of the error message using errorPlacement. ...
jquery
[5]
4,635,556
4,635,557
C# - error : Unable to read the project file
<p>Have a bigSmall problem here. I cant open any type of project in visual studios. Even when i creating a new one I get the error: </p> <p><strong>C:\Windows\Microsoft.NET\Framework\v4.0.30319 The element &lt;#text> beneath element is unrecognized.</strong></p> <p>When I choose to open a SLN file or open trough Fi...
c#
[0]
1,876,206
1,876,207
App icon and Default.png is not working properly in 2G iphone?
<p>My app icon of my application is not working in 2g version of the iphone (icon.png). only appear white icon with application name and also problem in default.png. can any one help me</p>
iphone
[8]
4,639,898
4,639,899
I sometimes recieve a parse error when loading script
<p>I don't know if this has happended to some of you developers before but sometimes when I reload a script on the browser, I receive this php error:</p> <blockquote> <p>Parse error: syntax error, unexpected $end in /.../ on ...</p> </blockquote> <p>It will point to different line numbers on my script for every tim...
php
[2]
1,202,327
1,202,328
Global variables in Javascript across multiple files
<p>A bunch of my JavaScript code is in an external file called helpers.js. Inside the HTML that calls this JavaScript code I find myself in need of knowing if a certain function from helpers.js has been called.</p> <p>I have attempted to create a global variable by defining:</p> <pre><code>var myFunctionTag = true; <...
javascript
[3]
74,532
74,533
Why is new being used with a function expression?
<p>While looking at some source code I found this:</p> <pre><code>require["./helpers"] = new function() {...}; </code></pre> <p>Why is <code>new</code> being used here? When I run this on JSLint I get</p> <p><code>Weird construction. Delete 'new'.</code></p> <p>So is this just a form of style, personal preference? ...
javascript
[3]
2,501,777
2,501,778
how to get timezone offset value
<p>My requirement is , i need to convert the time zone value to offset value for ex.. Asia/Dubai to +4 .. consider am intializing date in js. </p> <pre><code>var currentDate = new Date(); </code></pre> <p>and it is possible to set the time zone and get the offset..</p> <pre><code>currentDate.setTimezone("Asia/Duba...
javascript
[3]
60,290
60,291
Will C/C++ libraries work on Android Phone
<p>Does anyone have any experience using JNI to call native C/C++ libraries in Android? Is the environment suitable for running C/C++ libraries and if so is there anything specific about the environment which you need to accommodate? Thanks</p>
android
[4]
2,967,366
2,967,367
Understanding flow of object creation
<p>I'm new to java and I wonder if there is simple way to know flow like the following of object creation, I'm using eclipse and when I write <code>new ObjectInputStream</code> and press <kbd>CTRL</kbd>+<kbd>SPACE</kbd>. I don't see any option that I can enter new BufferedInputStream (I have copied the code from exampl...
java
[1]
5,626,518
5,626,519
How to pass array value from one class to other class
<p>How can i pass an array value from a delegate class to view controller class</p> <pre><code>const char *query2=[tempQuery UTF8String]; NSMutableArray *arr1 = [[NSMutableArray alloc]init];; if (sqlite3_prepare_v2(database,query2,-1,&amp;statement1,NULL)==SQLITE_OK) { //NSLog(@"vt", vt); while (sqlite3_step(...
iphone
[8]
3,539,966
3,539,967
What's the best way to learn jQuery?
<p>I have just started learning jQuery and what I've found is that there are tutorials for the basics and copy-paste tutorials for premade plugins, but nothing on how to get to that advanced level that I have found. What would you recommend as a way to learn jQuery?</p>
jquery
[5]
3,663,617
3,663,618
How can I prevent selecting text in Google Chrome?
<p>Doesn't oEvent.preventDefault(); work in GC? I need to prevent selecting text when the onmove event is triggered. </p> <p><b>EDIT:</b> It turns out to be very easy...</p> <pre><code>function disableSelection() { document.onselectstart = function() {return false;} // ie document.onmousedown = function() {retu...
javascript
[3]
2,519,351
2,519,352
How to print the name of an array in java
<p>I wanna print the name of an array within a function that I pass as an String argument:</p> <pre><code>public static String[][] cleanCSVtable(String[][] data_table) {} </code></pre> <p>instead of something like this: </p> <pre><code>[[Ljava.lang.String;@ba4539 </code></pre> <p>For example lets assume that I hav...
java
[1]
3,452,539
3,452,540
how can we include favourite functionality in android?? please provide any example
<p>how can we include favourite functionality in android?? please provide any example i mean to say there is a one phase in my app "favourite". when you click on particular item from the list that particular item will be add into the favourite and you can view that selected item in that favourite list.</p>
android
[4]
1,428,681
1,428,682
Changing image depending on div contents
<p>I have a jquery div returning simple text and I want to display a different image without the user noticing a flash every few seconds. </p> <pre><code>&lt;script&gt; function status(){ $('#status').empty(); $('#status').load('status/&lt;?php echo $call-&gt;sid;?&gt;'); setTimeout(status, 5000);} ...
jquery
[5]
2,142,307
2,142,308
chat application implementation in iphone os
<p>I am required to make an app which includes the feature for multiple chat client. I have seen several apps on itunes. I was just wondering how to implement this. Am new to iphone application development and not aware where to begin.</p> <p>Also, I have seen the mention of xmpp framework. Can someone please elaborat...
iphone
[8]
3,770,632
3,770,633
Load javascript into bottom of head
<p>I need some help. Is there a way to use javascript to add scripts src's to the end of the head? I have some dynamic scripts that are now allowing me to put my scripts at the bottom of the head Is there a way to do this with javascript.</p> <p>For example, I need these to be at the bottom of the head tag:</p> <pre>...
javascript
[3]
2,480,961
2,480,962
Generate some unique numbers and put into array
<p>I'm trying to create a method that produces 10 unique random numbers, but the numbers are not unique, I get several duplicates! How can I improve the code to work as I want?</p> <pre><code> int[] randomNumbers = new int[10]; Random random = new Random(); int index = 0; do {...
c#
[0]
5,036,791
5,036,792
good C# interview questions book
<p>Please suggest me a good C# interview questions book</p>
c#
[0]
1,735,301
1,735,302
cannot pass string variable to function
<p>When I am trying to run this code the variable $column it's not passing. But instead if I use a string (eg "ABC") it gets passed. What's wrong?</p> <pre><code>(a) calling function foreach ($columns as $column) { if(PMA_SQP_isKeyWord($column)) { (b) called function function PMA_SQP_isKeyWord($column) { </code><...
php
[2]
4,094,721
4,094,722
How to handle multiple popup dialogs in Web Application
<p>What is the best way to handle multiple popup dialogs in ASP.Net Web Application? Trying I have approx 5+ popup dialogs to show in the main page. currently I am using the ModalPopUpExtender to display the first popup. Do I have to Create a (New Panel and ModalPopUpExtender) for every popup? All this code in the main...
asp.net
[9]
4,922,521
4,922,522
Creating a System.Func without specifying the generic argument
<p>I have the following piece of code I use in my tests which has a bit of duplication:</p> <pre><code>Func&lt;string, User&gt; getUser = GetFirstItem&lt;User&gt;; Func&lt;string, Plan&gt; getPlan = GetFirstItem&lt;Plan&gt;; _planLeader = UserRoleHelper.GetUserWithAdditionalPlans(_commonDao, getUser, getPlan, 5); </...
c#
[0]
3,180,774
3,180,775
Android Trun on backlight
<p>I need to turn on screen back-light and keyboard backlight when my application receive notification. I have tried with PowerManager It it wasn't successful. </p> <p>Is there any way to turn on screen and keyboard backlights?</p> <p>Thank You. </p>
android
[4]
5,343,319
5,343,320
Templated Vector and Colour Maths library (Specialisation)
<p>I have created a maths library that operates via templates, it allows the user to specify the size and type of the array within a class which is then used to create a maths vector of any dimension up to four. As soon as I went to create a colour class, it struck me how similar the vector and colour class are. Is the...
c++
[6]
2,422,163
2,422,164
iphone mailcomposer
<p>i have my tabbar and i can hide this tab bar by the following code below but when tapping cancle of iphone mail composer does not return to the default screen can you please guide how can i do this</p> <pre><code>-(void)displayComposerSheet { MFMailComposeViewController *picker = [[MFMailComposeViewController a...
iphone
[8]
1,403,390
1,403,391
How can I check whether multiple variables are equal to the same value?
<p>How do I compare multiple items? For example, I wish to check if all the variables A, B, and C are equal to the char 'X' or all three are equal to 'O'. (If 2 of them are X and one is O it should return false.)</p> <p>I tried:</p> <pre><code>if (A, B, C == 'X' || A, B, C == 'O') { //Do whatever } </code></...
c++
[6]
1,466,918
1,466,919
Converting string to double in C#
<p>I have a string with double-type values ("value1#value2#value3#...). I split it to string table. Then i want to convert an element from this table to double, and I get a n error. What is wrong? How can I get from this string (string a) values in double type?</p> <p>Greetings!</p> <pre><code>string a = "52.8725945#...
c#
[0]
4,920,512
4,920,513
IE7 turns the edges of my rollover images black
<p>I am using jquery script for my image rollovers and I am encountering a problem in IE7 only where all of my images load in properly but once you rollover the image and roll out the edge of the top image turns black. Does anyone have any idea as to what might be causing this. The site can be found at free-to-be-me.co...
jquery
[5]
5,952,096
5,952,097
What does this 'static' mean and why is it like that
<pre><code>public class tt { static{ System.out.println("class tt"); } } </code></pre> <p>It the first time ive come across it and im wondering what it is and what it's used for</p>
java
[1]
1,041,424
1,041,425
PHP require/include coding practices
<p>Just curious...when writing a require/include statement, what do you prefer as better practice?</p> <pre><code>require('filename.php'); </code></pre> <p>or</p> <pre><code>require 'filename.php'; </code></pre> <p>Thanks!</p>
php
[2]
4,059,078
4,059,079
Making a char** with std::?
<p>I have an opengl function that requires a const char**. So essentially a vector of strings. I was wondering if this could be done using the C++ Standard Library without making a vector of <code>const char*</code> which would demand heap allocation.</p>
c++
[6]
281,198
281,199
Simple JavaScript Word Count Function
<p>I finally started to learn JavaScript and for some reason I can't get this simple function to work. Please tell me what I am doing wrong.</p> <pre><code>function countWords(str) { /*Complete the function body below to count the number of words in str. Assume str has at least one word, e.g. it is not empty. Do s...
javascript
[3]
552,713
552,714
Is there any way to take only part of string in jquery?
<p>I have some anchor links which has id's starts with <code>"menu-"</code>. </p> <pre><code>&lt;a href="" id="menu-alphabetic"&gt; &lt;a href="" id="menu-city"&gt; &lt;a href="" id="menu-country"&gt; </code></pre> <p>In my jquery code, I want to take only anchor links' ids after <code>menu-</code></p> <pre><code>F...
jquery
[5]
4,605,887
4,605,888
How build hash map for key and 2 values in Java?
<p>I want to build hash map to contain</p> <pre><code>&lt;string, array and double(sum(double2). array contain string, int1, double1, double2 (int1*double1) </code></pre> <p>for example:</p> <pre><code>string1, word1,2,1.1,2.2 , 7.3 (2.2+1.1+4.0) string1, word2,1,1.0,1.1 , 7.3 string1, word3,2,2.0,4.0 , 7.3 string...
java
[1]
913,374
913,375
Incorrect behaviour of size() and at() in string class
<p>I've got this code:</p> <pre><code>string test("żaba"); cout &lt;&lt; "Word: " &lt;&lt; test &lt;&lt; endl; cout &lt;&lt; "Length: " &lt;&lt; test.size() &lt;&lt; endl; cout &lt;&lt; "Letter: " &lt;&lt; test.at(0) &lt;&lt; endl; </code></pre> <p>The output is strange:</p> <pre><code>Word: żaba Length: 5 Letter: ...
c++
[6]
1,145,827
1,145,828
Create a private namespace independent of other javascript?
<p>I am creating a script which may be used on a variety of websites. Since I don't know the circumstances of it's use, I'd like to be able to place it in a sandbox of sorts, where it does not affect other javascripts on the page, and is in turn not effected by other javascripts.</p> <p>The most basic start is using a...
javascript
[3]
6,504
6,505
Accessing password protected url from python script
<p>In python, I want to send a request to a url which will return some information to me. The problem is if I try to access the url from the browser, a popup box appears and asks for a username and password. I have a username and password for this url however, I don't know how to make python automatically complete thes...
python
[7]
4,077,388
4,077,389
Running jQuery inside $(window).load() function but not inside $(document).ready function
<p>I have this existing function that will icons in a web page using jQuery UI position plugin:</p> <pre><code>&lt;script type='text/javascript'&gt; jQuery( document ).ready( function( $ ) { var element_selector='.test'; if ( $(element_selector).length !== 0) { //jQuery UI Position code here } }); &lt;/script&gt; ...
jquery
[5]
4,116,343
4,116,344
How to run openGrads script commands using c#
<p>I have been encountering the error of Metafile not open. When I execute the c# program the command line opens up and shoots this error without performing the activity to be initiated by the script. How do I solve this? Here is the code where I pass all my commands--</p> <pre><code>static void Main(string[] args) { ...
c#
[0]
1,648,027
1,648,028
Can I stop <a> action?
<p>Basically if I have <code>&lt;a href="" onclick="someFunction();"&gt;&lt;/a&gt;</code> which will download a file. If the user says NO to <code>confirm("Do you agree?")</code> dialog, we don't want to let the user download this file. </p> <p>This is all done with HTML and Javascript. All on client.</p> <p>We want ...
javascript
[3]
2,941,407
2,941,408
How to filter out repeating HTML with jQuery
<p>I have some HTML I'm working on using programming from a CMS I didn't write and it's outputting some HTML radio options and is repeating them. Unfortunately I can't control the output of this programming, so I'm attempting an alternative route of just trying to only allow 1 instance of the HTML to show up. Here's ...
jquery
[5]
4,457,715
4,457,716
Android app development software
<p>What is the best software for creating Android applications? This software have to have possibility to make string connection to remote database. Also, have to have possibility to create or change allready created templates and screens. One more think I need from that software is possibility to make push notificatio...
android
[4]
4,949,529
4,949,530
how to console with google chrome
<p>I want to console with google chrome when I test my website. If I found some error, I want to see in Developer > Developer Tools >console using link. Now, my google chrome doesn't shown error link. eg. when I query from database, and I show this query using jquery but It has some error. But console can't not output ...
php
[2]
2,686,804
2,686,805
Sending a whatsapp message from app
<p>is there a way in android to send a whatsapp message straight from my own app? I want the user to select a whatsapp contact and then have my app send the whatsapp message</p> <p>Thanks</p>
android
[4]
4,890,331
4,890,332
ASP.NET Wizard Steps: Getting form data to next page?
<p>I can't figure out how to pass form data from a Wizard Steps Control to a new page. I posted <a href="http://stackoverflow.com/questions/1461273/pass-hiddenfield-value-within-a-wizardsteps-control-to-next-site">THIS POST</a> some days ago, but the answer here didn't really help me because i can't even get the value ...
asp.net
[9]
5,099,055
5,099,056
Android, get app size
<p>I'm looking for a way to calculate the size of an installed Android application/package. I can't find this information in neither ApplicationInfo nor PackageInfo objects. From the ApplicationInfo I can get the path for the data and the app itself. Data is a directory structure, but when attempting to read it recursi...
android
[4]
4,967,062
4,967,063
Client server interaction
<p>Hi guys i am new to android, can anyone guide me how server interact with client. Please give some useful links for simple client server interaction with source file. </p>
android
[4]
633,224
633,225
help with navigation for iphone
<p>this is my flow <strong>navA-> navB->navC</strong> then when user press NavC back button he goes to navA</p> <p>but when user again press navA he should go to navB but its going on navC i dont know why</p> <p>in navC i did this</p> <pre><code>XMLAppDelegate *appDelegate=(XMLAppDelegate*)[UIApplication sharedAp...
iphone
[8]