Unnamed: 0
int64
65
6.03M
Id
int64
66
6.03M
Title
stringlengths
10
191
input
stringlengths
23
4.18k
output
stringclasses
10 values
Tag_Number
stringclasses
10 values
3,537,369
3,537,370
Need to set a variable based on the value of the selected item in a dropdown
<p>I'm trying to set a variable to the value of the selected item in a dropdown but can't get it to work properly. Here is the html:</p> <pre><code>&lt;select id="locationChoice" name="WorkflowList"&gt; &lt;option value=" "&gt;-- Please Select --&lt;/option&gt; &lt;option value="14643"&gt;Item A&lt;/option&gt; &lt;opt...
jquery
[5]
357,169
357,170
Android IMEI binding with music file
<p>Is there any possibility to develop an application that binds the IMEI with the music file and should not play that music file if IMEI is not registered.</p> <p>The core idea is to protect the licensed file from transferring to other devices.</p>
android
[4]
5,683,273
5,683,274
Display a Dialog while video is streaming
<p>I have created an application that displays XML data information on the top section of my Linear layout. Below that I have a video that is streaming and takes a while to start playing. How would I set a dialogue to display until the video appears?</p>
android
[4]
946,023
946,024
Chat windows in jsf application
<p>I am developing a web app using java technology (jsf 1.2). Now i would like to provide my app with a chat windows that looks just like the one on facebook for example. I want the user of my app to be able sent instant messages through that windows.</p> <p>My problem is how to make such a windows using jsf. Is there...
java
[1]
2,908,035
2,908,036
screen shot for the activity
<p>i want to create a bitmap of whats being currently displayed of my app, one thing i went into is cant read FB buffer requires root, would like to know if it is possible to create a image file for the screen, please i want the help to code this, no 3rd party intents , thanks, answers would be much appreciated</p>
android
[4]
3,792,921
3,792,922
How to decode special character in Request.QueryString?
<p>I am passing '© Alt+ 0169' in my serach fields in query string.</p> <p>When i am getting QueryString in page like Request.QueryString("SearchVal") then value will be : '© Alt 0169' .</p> <p>It reomove '+'. </p> <p>Could u tell me how can i get it..</p> <p>Thanks Pankaj Pareek</p>
asp.net
[9]
2,932,328
2,932,329
What happens to the exectuting threads (other than Main thread) of an App when the user presses the "Home" button
<p>As far as I know the main thread or UI thread will be paused the moment user presses "Home" button as it comes under Activity Life cycle. But what happens to the other exectuting threads of an App when the user presses the "Home" button? Does they be executing like background processes or will be paused? If they con...
android
[4]
5,268,322
5,268,323
please guide me!
<p>hi all i want to use factory class for employees login in a ticket booking system. i have 3 levels of employees : manager,driver and general employee.</p> <p>please guide me.</p>
c#
[0]
4,808,057
4,808,058
How to call setText() using a Float data type?
<pre><code> public void onClick(View v) { switch(v.getId()){ case R.id.save2: s = text.getText().toString(); number = Float.parseFloat(num.getText().toString()); SharedPreferences.Editor editor = shared.edit(); editor.putString("sharedtext",s); editor.putFloat("sharedn...
android
[4]
652,993
652,994
jQuery variable and object caching
<p>This is something that has been bugging me some time and every time I found myself using different solution for this.</p> <p>So, I have link in my document which on click creates new element with some ID.</p> <pre><code>&lt;a href="#" id="test-link"&gt;Link&lt;/a&gt; </code></pre> <p>For the purpose of easier reu...
jquery
[5]
2,104,206
2,104,207
How can I highlight the table row on click?
<p>As my project requirement i have to highlight the table row on onClick. There is any way to do this? Or please suggest me the alternative? </p>
android
[4]
4,042,656
4,042,657
Android - Image editing
<p>My app Features:</p> <ul> <li>(done) Take photo from camera or picture gallery;</li> <li>(done) Collection of funny stickers;</li> <li>(done) Share created comical photos via email, mms etc.</li> <li>(done) Save 'stickered' photos in picture gallery;</li> <li>(NOT done) Move, scale and rotate sticker images: I can ...
android
[4]
4,514,196
4,514,197
Setting attributes on anonymous objects
<p>I thought this was possible in c# .net 2.0 ?</p> <pre><code>header.Cells.Add((new TableCell(){Text = "First header"})); </code></pre> <p>unless I am doing it wrong? this produces the following error:</p> <pre><code>CS1026: ) expected </code></pre> <p>Were is the mistake?</p>
c#
[0]
645,497
645,498
scaling current frequency not displaying appropriate result
<p>I am using cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq to extract the current frequency. But whenever I run this command, I get the maximum frequency being set, while when I pull from DDMS, the file shows different frequency. Can you suggest what could be the error?</p> <p>My Code:</p> <pre><code>pub...
android
[4]
5,843,138
5,843,139
Source code for java.lang.Object
<p>Is there any web site that I could see the source code for the Java standard library? Most so the two classes java.lang.* and java.net.* ??</p>
java
[1]
5,670,768
5,670,769
Why can't I use a member initialization list here?
<p>I just finished creating a "Point" class and was working on a "Line" class that has two Point objects (Point startpoint and Point endpoint) as data members. I created a constructor in my Line class that accepts two Point objects as arguments and had originally created it as follows:</p> <pre><code>Line(const Point&...
c++
[6]
5,640,535
5,640,536
php image type detection
<p>Unable to detect mime type. if I remove <code>($mime=="image/jpeg" || $mime=="image/pjpeg")</code>, it could upload the image successfully.</p> <pre><code>$mime = $_FILES['Filedata']['type']; if((!empty($_FILES['Filedata']['tmp_name'])) &amp;&amp; ($_FILES['Filedata']['error'] == 0)) { $filename = basename($_FILE...
php
[2]
5,541,590
5,541,591
how to use the same button and text view in the secondary class without calling id in secondary class from xml in android
<p>I am using button and text view in main java class and how to use the same button and text view in the secondary class without calling id in secondary class from xml in android</p>
android
[4]
2,525,172
2,525,173
What is this code: %(var)s ? Python maybe?
<p>There is an option on the backend of a website that I use that allows me to customize the data sent in a CSV file when an order has been placed for a product. There are two columns, the left column is where you assign the header and the right column is where you input the variable. The syntax for the existing variab...
python
[7]
5,030,221
5,030,222
What is gpstate file in ASP.NET
<p>In my project I found a .gpState file in the folder, What is the purpose of gpState file?</p>
asp.net
[9]
4,346,965
4,346,966
how to remove numbers from string in Regex.Replace?
<p>i need Regex.Replace that remove all numbers and sign from string</p> <p>ex. "123- abcd33" and i need to get: "abcd"</p> <p>thank's in advance</p>
c#
[0]
3,298,612
3,298,613
Read 40 bytes of binary data as ascii text
<p>I have some binary data, in hex editor it looks like: s.o.m.e.d.a.t.a</p> <p>with all these dots in between each letter</p> <p>when I read with filehandle.read(40) it shows these dots</p> <p>I know that the dots aren't supposed to be there, is there a way to unpack some ascii data that is 40 bytes long with struc...
python
[7]
5,250,155
5,250,156
How do I create named popup windows?
<p>In javascript, the <code>window.open</code> function takes as a second argument the name of a window. I am trying to open Google in a new named window with</p> <pre><code>window.open('http://google.com/', 'myGoogleWindow');​ </code></pre> <p>but nothing happens. However, </p> <pre><code>window.open('http://google...
javascript
[3]
1,236,132
1,236,133
how to create margin moving image view android
<p>please give me sample moving image to my margin destination</p> <p>ilustration</p> <pre><code>image x (margin move image) </code></pre> <p>if image moving with drag image stoped moving to my margin </p> <pre><code>imageView.setOnTouchListener(new OnTouchListener() { public boolean onTouch...
android
[4]
2,756,856
2,756,857
Can someone please explain .map() in laymans terms?
<p><strong>UPDATE 1:</strong></p> <p>Here is more of the script:</p> <pre><code>$(".favorites").sortable( {update:function() { var that = this; var urls = ""; var texts = ""; $.map($(".favorites a"), function(elt) { urls += "url=" + elt.href + "&amp;"; texts += "text=" + $(elt...
jquery
[5]
1,152,617
1,152,618
Change image source but then image doesnt appear
<p>I got this code online and wanted to change the image source from an online picture, to the one i have on my root folder. But everytime i change the file location, image doesnt appear.</p> <pre><code>var firstreel=new reelslideshow({ wrapperid: "myreel", //ID of blank DIV on page to house Slideshow dimensio...
javascript
[3]
1,145,144
1,145,145
radio buttons and javascript
<p>i have a form with a radio button group(6 radio buttons),</p> <p>id's are r1,r2,r3,r4,r5,r6 </p> <p>and there are 6 hidden tables(display=none;) in this page, </p> <p>tables id's are t1,t2,t3,t4,t5,t6 .</p> <p>i want to change the table's dispaly property as inline if a radio button checked,</p> <p>if,</p> <p>...
javascript
[3]
322,967
322,968
linked list push front
<pre><code> void push_front(const dataType &amp;item) { head=new dnode&lt;dataType&gt; (item,NULL,head); if (!empty()) head-&gt;next-&gt;prev=head; else tail=head; numItems++; } </code></pre> <p>I have a piece of code here, however I don't really understand it, what is the line...
c++
[6]
1,192,746
1,192,747
How can I execute this math operation in PHP?
<p>I am trying to do this operation:</p> <pre><code>$math = 1.30644 - 1.3063 </code></pre> <p>I want the result to be the difference in this way:</p> <p>1.4 (Which is 64,4 - 63) because I am dealing with PIPS. How can I achieve this result.</p> <p>What I tried:</p> <pre><code>$math = 1.30644 - 1.3063 echo $math; ...
php
[2]
2,408,642
2,408,643
write content to newly open window using jQuery
<p>I have a function written on some another page load event.i want to open new page and write content (such as textbox value) to newly opened page</p> <pre><code>function updateUser() { $("button").on("click", function () { var code = $(this).attr('id'); $.ajax({ url: '/ajaxExe...
jquery
[5]
4,438,364
4,438,365
basic.types $3.9 /9th point,ISO Standard C++ specification
<p>Point from ISO Standard C++ specification : §3.9 /9th point</p> <blockquote> <p>An object type is a (possibly cv qualified) type that is not a function type, not a reference type, and not a void type.</p> </blockquote> <p>Any one can able to explain this point with programming .(how it fails )</p>
c++
[6]
3,374,839
3,374,840
android location listener question
<p>I am developing an location aware application that needs to know the users location. The problem is that the application doesn't seem to work properly.</p> <p>By properly I mean that every time I have to first open an application (like cardio trainer) in order to get a GPS signal and then run my program, otherwise ...
android
[4]
5,973,385
5,973,386
Matching strings to arrays
<p>I have a problem with this code:</p> <pre><code>var buyerChoice = prompt("Enter a either apple, orange, or banana:", ""); var fruits = new Array ("apple", "orange", "banana"); for(i=0; i &lt; fruits.length; i++) { if(buyerChoice === fruits[i]) { document.write(buyerChoice); } else if (buye...
javascript
[3]
4,937,924
4,937,925
Detect application coming from the background and prompt for PIN in Android
<p>I have an app in which I need to prompt the user to enter the PIN every time the app comes from the background.</p> <p>I looked several answers from stackoverflow from @hackbod and @commonsware I implemented the timeout approach from @commonsware and it worked fine, but my users are not happy with it. They want to ...
android
[4]
4,766,785
4,766,786
Best way of returning a pointer
<p>I have seen at least 5 C++ tutorial sites that return pointers this way:</p> <pre><code>int* somefunction(){ int x = 5; int *result = &amp;x; return result; } </code></pre> <p>Is that not a very, VERY bad idea? My logic tells me that the returned pointer's value can be overwritten at any time. I would ...
c++
[6]
5,163,706
5,163,707
How can I get named parameters in Java in static methods?
<p>Should I implement named parameters in Java using Hash tables?</p> <p>I saw this entry:</p> <p><a href="http://stackoverflow.com/questions/1988016/named-parameter-idiom-in-java">http://stackoverflow.com/questions/1988016/named-parameter-idiom-in-java</a></p> <p>: but I did not want to use the builder method which...
java
[1]
666,850
666,851
How to get active music player -- android
<p>thanks for previous replies,</p> <p>Is it possible to get package name of active and runningin service(background) music player. I can able to get the music actions(metachage or playstateChange) but when i use intent.getPackagename, im getting null. can anyone guide me on how to get the package name of music player...
android
[4]
3,682,531
3,682,532
Difference between the Gridview and Datagrid in Asp.net
<p>I am new to asp.net. what is the difference between the Gridview and Datagrid in Asp.net</p> <p>Thanks sivakumar</p>
asp.net
[9]
3,241,653
3,241,654
Compound Boolean Expression Java, evaluate to true
<p>I don't understand how to answer this questions.. <strong>x&amp;&amp; !y || z==x</strong></p> <p>Which two of the following combinations of true and false values would cause the compound Boolean expression to evalute to true?..with a reason please.</p> <p>A. x= false; y=true; z=true;</p> <hr> <p>B. x= false; y=...
java
[1]
4,718,288
4,718,289
How can I extract a password protected .zip file from within my PHP application?
<p>How can I extract a password protected <code>.zip</code> file from within my PHP application?</p>
php
[2]
2,991,443
2,991,444
OS Process manager Listener in c#
<p>Is there any operating system's Process Manager library in c#? Forexample when new application started or closed I want to get that process name from my code.</p>
c#
[0]
5,783,156
5,783,157
C++ Constructor Implementation Error
<p>C++ Constructor Implementation Error</p> <p>I have 2 class</p> <pre><code>Map2D(parent) &amp; Map3D(child) </code></pre> <p>So this is what happen...</p> <pre><code>class Map3D : public Map2D { private: int z; public: Map3D(); Map3D(int,int,int); int getZ(); } </code></pre> <p>And below is my Map2D</p> <pre>...
c++
[6]
3,786,481
3,786,482
javascript solution to display relavant ads (sth like AdSense)
<p>I would like to place relevant ads on the product pages of an ecommerce site. I know that usually such ads are stored in a database table that links the given product and the ads. But now I wonder if it's possible to code a similar system with javascript. I mean something like a script that is loaded with the page a...
javascript
[3]
2,348,807
2,348,808
Formly jQuery Form Plugin, Submitting on Errors
<p>I've followed the instructions for implementing Formly (<a href="http://thrivingkings.com/formly/" rel="nofollow">http://thrivingkings.com/formly/</a>) and all the validation works a treat, it's just when I add the JS code to handle the submit after the validate, the form submits to the server even though errors occ...
jquery
[5]
2,499,994
2,499,995
Auto select a dropdown based off another dropdown when checkbox is checked
<p>I am working on a form with a two different sections. Both sections have a few text fields and a drop down list. There is also a checkbox in the second section that when checked auto fills the text fields with the information from the previous section. I need to have the selected value from the drop down in the f...
jquery
[5]
1,835,429
1,835,430
regarding implementation of camera in android
<p>I am developing an application of android which involves saving image of camera on click of click button.Can anyone give me a guidance of how to implement camera in android??</p>
android
[4]
3,956,656
3,956,657
C++ filereader giving error
<p>I got code for a filereader for C++ from a website but I can't seem to get it to work for me, is there something wrong with the code or should I just use something else to read text form a textfile?</p> <p>The Error I get is: </p> <p>E:\IT-C++\snake.cpp||In function 'int main()':| E:\IT-C++\snake.cpp|11|error: co...
c++
[6]
3,541,190
3,541,191
Issues with iPhone Http Streaming with concatenated video files
<p>We are seeing this when "tying" two video files together.</p> <p>Example we have Ad video that is segmented and content file which is also segmented. We create a new file which has both Ad and content segment information together. However we are seeing an issue where either the Ad content is truncated or the conten...
iphone
[8]
4,456,562
4,456,563
ASP.NET Entry Point?
<p>Just created a blank "ASP.NET Web Application". Where's the entry point?</p> <p>I see "Default.aspx" which seems to be the default template that calls. "Site.Master" which I guess acts as a layout file. "Global.asax" that seems to provide some method stubs for event handling. And then "Web.config" which seems to ha...
asp.net
[9]
5,308,078
5,308,079
Simple script not working in IE7
<p>I have a simple script that toggles between two divs. It works in IE9 but not in IE7. I am not a js guy so any help would be appreciated.</p> <p>Upon load the solutions div shows, when you click on the industry button the expected behavior is for solutions to disapear and industry to be in it's place. What happens ...
javascript
[3]
3,912,424
3,912,425
How do I get the highest value when using loops?
<p>I want to get the highest value of my array. This are the two ways when I'm working with php functions.</p> <pre><code> $a = array(1,125,1068); 1. $value = max($a); print_r ($value); 2. asort($a); $value = end($a); print_r ($value); </code></pre> <p>I just couldn't figure out how to get the highe...
php
[2]
5,265,589
5,265,590
CJ Flashy Slideshow - Requires page reload to work with Internet Explorer
<p>On my <a href="http://firstchoicelegal.co.uk" rel="nofollow">website</a>, I am using the plugin <a href="http://cjboco.com/projects.cfm/project/cj-flashy-slide-show/1.1.3" rel="nofollow">CJ Flashy Slideshow version 1.13*</a> </p> <p>The plugin works fine under all browsers except for Internet Explorer, where you ha...
jquery
[5]
3,556,326
3,556,327
Adding days to $Date in PHP
<p>I have a date returned as part of a mySQL query in the form 2010-09-17</p> <p>I would like to set the variables $Date2 to $Date5 as follows:</p> <p>$Date2 = $Date + 1</p> <p>$Date3 = $Date + 2 </p> <p>etc..</p> <p>so that it returns 2010-09-18, 2010-09-19 etc...</p> <p>I have tried </p> <pre><code>date('Y-m-d...
php
[2]
4,192,932
4,192,933
The Obsever pattern (or something similar) using a global update() function in C++?
<p>I am creating an MVC application in C++ and I want the lower level model classes to be able to update the GUI with simple text to display output to the reader. I don't want to have to pass around function or object pointers as it would get messy and I would have to pass them around all over the place. What I essenti...
c++
[6]
1,057,504
1,057,505
Can I optimize checking for multiple null values in C#
<p>I have the following code: </p> <pre><code>if (Session["CurrentUrl"] != null &amp; Session["CurrentHost"] != null) </code></pre> <p>I use this in many places. I am wondering if anyone can think of a way to optimize the C# code just to make things slight more clear.</p>
c#
[0]
4,768,103
4,768,104
Putting a closure to JS Closures
<blockquote> <p>a closure is the local variables for a function - kept alive after the function has returned.</p> </blockquote> <p>I'm wrapping my head around JS &amp; jQuery Closures. From the definition above my understanding is a closure allows access to variables outside a function without the need for creat...
javascript
[3]
305,990
305,991
Write/Read from property list on iPhone
<p>I know there are thousands of tutorials on the topic however I don't get it to work. What I am trying to do is to read an value from a plist file. Then I check whether or not I have to update the value. This part is ok. However I don't managed to get the value saved in plist file. I have a Settings.Bundle and it is ...
iphone
[8]
21,813
21,814
Using a subclass method on a base class object
<p>Let's say I have declared the following classes:</p> <pre><code>class BaseClass{ /* properties, constructors, getters, setters etc. */ public static BaseClass Create(string url){ /*will return, depending on url, a BaseClass or a SubClass object*/ } public void Method(){ /* some code here *...
c#
[0]
2,276,473
2,276,474
Creating note for iphone and ipad
<p>I want to create a note (like iphone note)as a subview to a view-controller,my requirement is when the user tap the button the note have to appear in the screen. How to do this? Thanks in advance.</p>
iphone
[8]
4,704,716
4,704,717
How to get rid of the pause command in the batch file which is opened from the command prompt using c#
<p>Below is the code for running the batch file from the command prompt. The problem is that there is a pause command in the batch file which is stopping the application and I am not able to proceed with the next step. Can some one give me an idea to fix this.</p> <pre><code>Process gacCOMprocess = new Process(); info...
c#
[0]
1,455,398
1,455,399
how append text and object at once with jquery?
<p>i have 2 text node and 1 jquery object, i want append them into DOM, when i do this:</p> <pre><code>$('&lt;div&gt;') .append("Ajax Failed, ") .append($("&lt;span&gt;").addClass('counter').countDown({ start:o.time, onEnd:function(){$.ajax(o.ajax);}, onRetryEnd:function(){o.onFailed();} })) .a...
jquery
[5]
3,793,412
3,793,413
how to implement a slide down on a click event with jquery
<p>I know in jquery you can use toggle to display on and off. How do you get a slide down effect similar to what amazon has right now on the home page when you click expand?</p>
jquery
[5]
3,997,793
3,997,794
C# I"m confused with this service routine
<p>So I am using C# with WinForms, My question is what is NewValue in this snippet? e is the event that has occured. So I'm telling the label vsliderecho's text to change to something. </p> <pre><code>private void V_Slider_Bar_scroll(object sender, SCrollEventArgs e) { V_Slider_echo.Text= e.NewValue.ToString(); } ...
c#
[0]
2,690,614
2,690,615
equivalent to $_SERVER['DOCUMENT_ROOT'] that will work when script is called by cron?
<p>I'm using <code>$_SERVER['DOCUMENT_ROOT']</code> for my include paths so files will figure out where they are running from (i.e. whether they're on live or staging) and it works fine, except for scripts that are run by cron in which I have to hardcode the path. </p> <p>Is there another variable I could use that cou...
php
[2]
5,493,386
5,493,387
Checking two events in one html tag
<p>I want to check two things in the form, one is onclick and the other "enter" function. So that, alert will be used by clicking the button or pressing "enter". But, "enter" function is not working(There is no problem with "onclick"). Where is the problem? Codes;</p> <pre><code>&lt;FORM NAME="myform" ACTION="" METHOD...
javascript
[3]
4,879,462
4,879,463
How to Expire Asp.net session in time bound
<p>Hi my problem is in my application i want to expire a session when user is in idel for 5 minutes and then the page want to redirect to login page and when user login I Want TO Redirected to Session expired page directly please send me the solution</p> <p>Am using following code to Expire a session my page also redi...
asp.net
[9]
1,267,885
1,267,886
Is there a way to tell if a program is still running a method?
<p>I'm running a method from my main that generates data and I also fork a thread that monitors a queue that the method is writing to and if there's data it saves it to a disk.</p> <p>My problem is in the past I would multi-thread it and was able to monitor the life of other threads but I'm not sure how to do that if ...
java
[1]
3,629,772
3,629,773
Get image length in iPhone sdk like photoruler
<p>How to measure the image length after taking a picture in iPhone? Example: if I take a picture of FISH then how should I measure the fish actual height and width?</p> <p>Any ideas or sample code would be appreciated.</p>
iphone
[8]
3,578,240
3,578,241
Determine the integrity of a string - PHP
<p>Why are str_rot13() and crypt() inefficient ways to determine the integrity of a string compared to crc32() ? ( according to some zend examination tests ) </p>
php
[2]
1,089,428
1,089,429
How can I prevent decimals being rounded when using DecimalFormat?
<p>Can anyone help how can i prevent rounding decimal value.</p> <pre><code>DecimalFormat df = new DecimalFormat(); Object[] arrayRowResult = (Object[]) rowResult; String a=df.format(arrayRowResult[0]) // [0] contain decimal(2,10) but format results rounded value String b=df.format(arrayRowResult[1]) // [1] contain d...
java
[1]
3,602,105
3,602,106
echo for style in table row and table data
<pre><code>&lt;tr &lt;?php if($isOverDeadline) { echo ' style="background-color:#CC3300"'; } ?&gt;&gt;&lt;td width="250" &lt;?php if($isOverDeadline) { echo ' style="color:#fff"'; } ?&gt;&gt;&lt;?php echo $something; ?&gt; &lt;/td&gt;&lt;/tr&gt; </code></pre> <p>I find that ...
php
[2]
1,004,537
1,004,538
Is there a built in Javascript function to turn the text string of a month into the numerical equivalent?
<p>Is there a built in Javascript function to turn the text string of a month into the numerical equivalent? </p> <p>Ex. I have the name of the month "December" and I want a function to return "12".</p>
javascript
[3]
4,524,272
4,524,273
How to stop the counter from increasing when refreshing the page
<p>Here is my code:</p> <pre><code>$score=0; $sql10=mysql_query("select * from image WHERE fromUser='".$_SESSION['email']."' order by id desc"); $score1=mysql_fetch_array($sql10); $answer=$score1['Correct_answer']; echo $answer; $sql13=mysql_query("select * from image WHERE toUser='".$_SESSION['email']."' order by id...
php
[2]
1,365,703
1,365,704
Error checking in a web form
<p>Is there somewhere to see examples of error checking. I have a web form with several controls. Two of the controls are critical to updating a database and also for the reporting in a gridview. </p> <p>I am not looking for extremely complex checking, just something to stop the user before the submitting an update...
asp.net
[9]
1,401,842
1,401,843
differentiating left and right scroll in gallery
<p>Hie all , is there any method in android that can differentiate the left and the right scrolling actions in android. <img src="http://i.stack.imgur.com/02Lrb.png" alt="enter image description here"> it is actually a customized gallery view so what I am trying to do is that on scroll actions i want to different imag...
android
[4]
3,240,470
3,240,471
Javascript closure
<p>The following program returns "local" and, according to the tutorial I<code>m reading, it is designed to demonstrate the phenomenon of</code>closure`</p> <p>What I don`t understand is why, at the end, in order to call parentfunction, it assigns it to the variable "child" and then calls "child."</p> <p>Why doesn`t ...
javascript
[3]
5,015,408
5,015,409
jQuery: Match a list with less than X items
<p>I want add a class to lists, but only if they have 3 or less items:</p> <pre><code>var ol = $('ol'); var len = ol.children('li').length; //0 based? while(len &lt; 2) { $("ol").addClass("small-list"); } </code></pre> <p><a href="http://jsfiddle.net/hryZ4/2/" rel="nofollow">http://jsfiddle.net/hryZ4/2/</a></p...
jquery
[5]
2,001,493
2,001,494
How to get Client IP address in PHP?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1437771/how-can-i-get-the-clients-ip-address-in-a-php-webservice">How can I get the client&rsquo;s IP address in a PHP webservice?</a> </p> </blockquote> <p>How can I get Client IP address using PHP? I want to k...
php
[2]
5,302,771
5,302,772
PHP 5.2.12 - Interesting Switch Statement Bug With Integers and Strings
<pre><code>&lt;?php $var = 0; switch($var) { case "a": echo "I think var is a"; break; case "b": echo "I think var is b"; break; case "c": echo "I think var is c"; break; default: echo "I know var is $var"; break; } ?&gt; </code></pre> <p>Maybe someone else will find thi...
php
[2]
3,174,773
3,174,774
Output using innerHTML
<p>I need to output the contents of a Javascript variable which has html code in it:</p> <pre><code>var jsVar = '&lt;div&gt; &lt;p&gt; Sample text &lt;/p&gt; &lt;img src="some image.jpg" alt="" /&gt; &lt;div&gt;'; </code></pre> <p>I want to add it to an object on the page using innerHTML. How do I do it ?</p>
javascript
[3]
4,919,456
4,919,457
Control Caps-Lock of android softkeypad
<p>I have an <code>EditText</code>. The softkeypad should popup as "Caps on" state, when I want to edit the editText. Is there any way to do this ? </p>
android
[4]
1,286,153
1,286,154
javascript regular expressions for password
<p>i have to create a regular expression for password in java script with the following criteria 1. The password should contain atleast one alphabet either upper case or lower case 2. It should contain atleast one number 3. It should contain atlease one special character(`,~,!,@,#,$,%,^,&amp;,*,_,+,=)</p>
javascript
[3]
875,881
875,882
detect and suppress errors loading javascript file
<p>I want to source a javascript file from facebook <a href="http://connect.facebook.net/en_US/all.js" rel="nofollow">http://connect.facebook.net/en_US/all.js</a> </p> <p>The organization I work for has a firewall that blocks access to Facebook, it just goes to an html page that says "Access Denied blah blah blah" </...
javascript
[3]
5,890,789
5,890,790
Activity.onDestroy does not destroy my view
<p>In part of my Activity's code, I am calling Activity.finish() to close my activity, and the application returns to the main OS "desktop" window.</p> <p>However, if I click on my application icon again, onCreate does not seem to be called and my view remains the same as when finish was called.</p> <p>Perhaps, I'm n...
android
[4]
17,621
17,622
how to get file from SWFObject?
<p>How can I download a file from flash SWF:</p> <pre><code>var s1 = new SWFObject("http://www.sitename.com/player.swf", "ply", "654", "475", "9", "#000000"); s1.addParam("allowfullscreen", "true"); s1.addParam("allowscriptaccess", "always"); s1.addParam("flashvars", "overlay=http://sitename.com/video/thumbs/5/0/5/e...
javascript
[3]
3,646,979
3,646,980
iterating an object properties
<p>is there a way to iterate an object properties and methods. i need to write a utility function like so:</p> <pre><code>function iterate(obj) { //print all obj properties //print all obj methods } </code></pre> <p>so running this function:</p> <pre><code>iterate(String); </code></pre> <p>will print:<...
javascript
[3]
853,810
853,811
How to set locale to TTS engine dynamically?
<p>I have one requirement in which User will have options to select languages for e.g English and French.</p> <p>App will have set of activities and one background service so when app starts,at that time service will start and TTS engine will get initialize with default language as English in service(onInit() method)....
android
[4]
3,824,126
3,824,127
Adding values to a JList
<p>I have 2 classes, a view where all my controls are placed for my gui and another one for my code.</p> <p>But how do I add values to the <code>JList</code>? I can only do it from the GUI class (first class mentioned below) itself, but that's not a suitable spot.</p> <h3>First class</h3> <pre><code>private JList us...
java
[1]
1,466,065
1,466,066
ASP:Login <LayoutTemplate> always generates a <table>, how can I make it stop?
<p>I've just started tinkering with the ASP:Login control, and want to edit its appearance. So I did the following:</p> <pre><code>&lt;asp:login ID="login" runat="server" onauthenticate="Authenticate"&gt; &lt;LayoutTemplate&gt; &lt;asp:TextBox ID="UserName" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;asp:TextBox I...
asp.net
[9]
478,724
478,725
Read/Write at the same time
<p>What I am doing is opening my file using fstream at the start of the main and closing it at the end. In between I am writing "Hello World" and after that reading what I wrote but the result is always weired charecters and not the "Hello World". I did do a cast to char but that didnt help. Any way I can do this?</p>
c++
[6]
3,111,738
3,111,739
better ways or editors to handle python indention
<p>so python is fun. I'm on day 2.I love how clean it is, and the libraries, etc. I'm not a big fan of the indention yet, but wanted to get some feedback on ways people deal with this. A big issue for me right now is refactoring and then the consequent re-idention that needs to happen for nested calls. This seems like ...
python
[7]
2,926,960
2,926,961
What's the most efficient way to change the last element in a '/' delimited string
<p>I have a string object in c# with a bunch of elements delimited by '/' characters. The string will look something like this:</p> <p>"element1/element2/element3/element4"</p> <p>What's the most efficient way to change the last element in the '/' delimited string?</p> <p>Thanks,</p> <p>helixed</p>
c#
[0]
2,409,020
2,409,021
How to add radio buttons and checkBox in the same ListPreference in android?
<p>HI,</p> <p>How can i add, 4-radiobuttons and 2-checkBoxes in the same ListPreference in Android PreferenceScreen in android ? Need Help. Thanks in adv.</p> <p>rgds, Praween</p>
android
[4]
370,557
370,558
Overllaping view elements
<p>Here's the problem I'm facing : I've got a custom slider that controlls the volume and a label "volume" that I combine together in a liniar Layout to obtain a volume control setting. In the emulator and on a G1 phone these look pretty ok , however , when put on a Xperia mini the label and the slider overlap . What ...
android
[4]
1,385,424
1,385,425
Populate 2 fields with same data, using Javascript
<p>I have a form field, x_amount, being populated with a static number, based on a selection from a drop down, which for some reason came to me as x_ship_to_address. If 1 or 2 are selected, x_amount is poulated with 25 or 45. If 3 or 4 are selected, the user enters a value into payment_mount and then x_amount becomes p...
javascript
[3]
3,602,190
3,602,191
How to build a Json tree
<p>Here's the json I want to build:</p> <pre><code>{ id: 0, item: [{ id: 1, text: "1111" }, { id: 2, text: "222222", item: [{ id: "21", text: "child" }] }, { id: 3, text: "3333" }] } </code></pre> <p>For now I can not build a tree, I can only build something lik...
c#
[0]
5,953,203
5,953,204
Why do the values of my hashes never match in Java?
<p>I have a <code>.jsp</code> which accepts password input. It will not match the hash of a password inside the application, even though a test using <code>attempt.equals(password)</code> works prior to the hashing.</p> <p>I am passing the string thus:</p> <pre><code>PasswordManager.checkPassword(request.getParamete...
java
[1]
410,190
410,191
Hiding Important Data
<p>just want to ask what would be the best way to hide sensitive data (ftp accounts, database connectionstring, etc) in .Net desktop applications.. any suggestions please.. :)</p> <p>i was aware of putting data in the application and got in mind that what if the application will be deobfuscated or decompiled the hidde...
c#
[0]
5,452,231
5,452,232
Dragging and dropping a card
<p>I am developing a card game which includes moving one card from one place to another.The cards are dealt/stored in picture boxes.Once the user clicks a card, I want him to be able to drag and drop the card to another picture box(this is where he wil be playing the card). I also want that when user is dragging the it...
c#
[0]
1,735,210
1,735,211
Whats the main difference between int.Parse() and Convert.ToInt32
<p>I am using C#,and wanted to know the main difference between the two and which one is preferred to use while coding. </p>
c#
[0]