Unnamed: 0
int64
302
6.03M
Id
int64
303
6.03M
Title
stringlengths
12
149
input
stringlengths
25
3.08k
output
stringclasses
181 values
Tag_Number
stringclasses
181 values
1,871,479
1,871,480
Adding A Row To An Empty GridView?
<p>I want to add a row inside an empty gridview, i tired the following code but no luck so far:</p> <pre><code> GridViewRow oRow = new GridViewRow(0, 0, DataControlRowType.DataRow, DataControlRowState.Insert); TableCell oCell = new TableCell(); oCell.Text = "XXX"; oRow.Cells.Add(oCell); ...
c# asp.net
[0, 9]
3,796,976
3,796,977
jquery/javascript security
<p>I am using jQuery to disable some form buttons. Simple stuff. But how can I prevent users from editing the DOM and enabling the button themselves so they can work around the restrictions I put in place?</p>
javascript jquery
[3, 5]
792,586
792,587
run a function when a user clicks on any list element
<p>This is probably a very common question, but I was unable to find an answer myself;</p> <p>All my list elements call the function setQuery like this</p> <pre><code>onClick="admin_stats.setQuery(this);" </code></pre> <p>rather than [hardcode] add this to every list element, is there a way to simply have it run wh...
javascript jquery
[3, 5]
2,795,511
2,795,512
jQuery if statement doesnt seem to work
<p>I have an if statement and for some reason I cant seem to get it to work, Can anybody see why?</p> <p><a href="http://jsfiddle.net/7YKgS/1/" rel="nofollow">http://jsfiddle.net/7YKgS/1/</a></p> <p>I have a span tag that contains a string and im trying ot say if this string == X then do this, if not do something els...
javascript jquery
[3, 5]
3,217,646
3,217,647
json and php question
<p>I am using the following in php to return the driving distance details between 2 locations:</p> <pre><code>$url = 'http://maps.google.com/maps/nav?q=from:London%20to:Dover'; $data = @file_get_contents($url); </code></pre> <p>A JSON object is returned, i am not familiar with JSON can somebody please demonstrate how...
php javascript
[2, 3]
1,388,357
1,388,358
Compare today datetime to match (First, second, third, fourth, fifth) weekday(mon, tuesday ect.) of current month
<p>Is There any built in function in c# to compare Compare today's datetime to match like: (First, second, third, fourth, fifth) weekday(mon, tuesday ect.) of current month</p> <p>or can any one please provide the custom solution for the same.</p> <p>Regards</p>
c# asp.net
[0, 9]
829,134
829,135
Seperate Values which are saved in one column
<p>i have one column. In that column is saved the fullname(firstname, surname) of a Person. Sometimes it is saved like</p> <pre><code>Michael, Myers </code></pre> <p>and sometimes the name is saved like</p> <pre><code>Michael Myers </code></pre> <p>without a comma between them. </p> <p>If i load the column and sav...
c# asp.net
[0, 9]
5,328,401
5,328,402
jQuery alert after 100 pixels scrolled
<p>Is it possible to fire an alert after a user scrolls 100 pixels. </p> <p>Here's what I have so far but I know I'm missing something;</p> <pre><code>$(window).scroll(function() { if (document.documentElement.clientHeight + $(document).scrollTop() == "100px") { alert("You've scrolled 100 pi...
javascript jquery
[3, 5]
1,514,220
1,514,221
populate a textarea using javascript
<p>Basically I am using the SCEditor and want a button on forum posts or articles comments called "Quote" where it grabs the text from the message and pastes it into the textarea, i have this code:</p> <pre><code>&lt;script type="text/javascript"&gt; jQuery.noConflict(); //disable global $ for jQuery jQuery(document)....
javascript jquery
[3, 5]
1,668,762
1,668,763
Handling a ArrayList or List type of C# in jquery
<p>I want to bind the HTML select element with the database.</p> <p>I want to bind the text and value of select element</p> <p>The problem is dont want to return the string array with text and value of each option combined using some symbol rather i want to return an array list or some List</p> <p>Now after returnin...
jquery asp.net
[5, 9]
2,924,929
2,924,930
Fastest way of getting a list of installed packages in an Android device
<p>I'm getting a list of packages installed in an Android devices very similar to the code here - <a href="http://www.androidsnippets.com/get-installed-applications-with-name-package-name-version-and-icon" rel="nofollow">http://www.androidsnippets.com/get-installed-applications-with-name-package-name-version-and-icon</...
java android
[1, 4]
2,294,781
2,294,782
OutofMemory Exception (when cropping an Image)
<p>I am trying to crop an Image that coming from a byte array. Unlucky, I get the OutofMemory Exception in my cropImage function. this part show how I write it on a file.</p> <pre><code>System.IO.MemoryStream ms = new System.IO.MemoryStream(strArr); System.Drawing.Rectangle oRectangle = new System.Drawing.Rectangle()...
c# asp.net
[0, 9]
351,902
351,903
Trigger the change event of a textbox in jQuery
<p>I have an asp:TextBox with asp:RegularExpressionValidator to validate if it's a number. Obviously an onchange event will be attached to this textbox while rendering. Also I add a change event at $(document).ready to make some calculation when the value is changed.</p> <pre><code>&lt;asp:TextBox id="myText" runat="s...
c# javascript jquery asp.net
[0, 3, 5, 9]
3,659,594
3,659,595
JavaScrip/jQuery - How to check if a string contain specific words
<pre><code>$a = 'how are you'; if (strpos($a,'are') !== false) { echo 'true'; } </code></pre> <p>In PHP, we can use the code above to check if a string contain specific words, but how can I do the same function in JavaScript/jQuery?</p>
javascript jquery
[3, 5]
1,203,365
1,203,366
Validating more that one email field
<p>Im using <a href="http://jorenrapini.com/blog/javascript/the-simple-quick-and-small-jquery-html-form-validation-solution" rel="nofollow">Joren Rapini's validation code</a> to for my online form. <a href="http://jorenrapini.com/blog/javascript/the-simple-quick-and-small-jquery-html-form-validation-solution" rel="nofo...
javascript jquery
[3, 5]
1,966,194
1,966,195
Code after Javascript for loop with Ajax not executing
<p>Why is the "hello" alert at the end of this code not executing? Everything else is working fine, but the alert doesn't fire. What am I missing? PS, I am a beginner when it comes to Javascript...</p> <pre><code>$('.save_button').click(function(){ var numItems = dataseries.length; var item; var sequence; var ...
javascript jquery
[3, 5]
1,280,125
1,280,126
Performance Extension Method vs. Instance Method
<p>Is there any performance difference between an instance method and an extension method?</p>
c# asp.net
[0, 9]
2,348,639
2,348,640
In JQuery, how do I remove a comma after removing an element?
<pre><code>var body = 'Alex, &lt;a href="blah" title="jason"&gt;Jason&lt;/a&gt;, Kate, how are you?"; </code></pre> <p>I want to use JQuery to remove the anchor element from body, and then also remove the comma after the anchor, if there is any. Note: to make it easy, the comma will always be after the anchor with no...
javascript jquery
[3, 5]
4,906,544
4,906,545
Javascript : Best way to declare functions to be used globally?
<p><strong>My javascript file is getting pretty big (3000+ lines) and I'm getting confused as to how to layout my file and delare functions so that they can called anywhere in the file.</strong></p> <p>To summarise my JS file looks a little like this at the moment:</p> <pre><code>//ALL GLOBAL VARIABLES FIRST DECLARED...
javascript jquery
[3, 5]
1,741,690
1,741,691
Android Application Error
<p>Hi every one i am new to android application. i am reading data from xml which is in server .. for hotel list its reading properly but when i click any of the hotels i am redirecting to another page there its showing an error " application has stopped unexpectedly please try again" i dont where i am wrong can any on...
java android
[1, 4]
851,962
851,963
How to change the Date format that we get from text field "16-JUL-2010" to 20100716 using php or using jquery
<p>How to change the Date format that we get from text field "16-JUL-2010" to 20100716 using php or using jquery</p>
php jquery
[2, 5]
2,965,438
2,965,439
Java or C++ to learn as a first prgramming language
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/345907/should-freshers-learn-java-or-c">Should freshers learn Java or C++?</a> </p> </blockquote> <p>I am a high schooler and am unsure whether to learn Java or C++. I would like to major in aerospace engineer s...
java c++
[1, 6]
3,487,817
3,487,818
Set URL argument for Page_Load in some menu item click Javascript
<p>I am reimplementing an ASP.NET application with a main page (Call it "MyMainPage") which contains a user control. (Call it "MyNavControl") Within that user control is a menu control provided by a third party. Items added to this third party control have an "Href" property that is passed a URL. The code to create...
javascript asp.net
[3, 9]
1,142,257
1,142,258
Javascript .keyCode vs. .which?
<p>I thought this would be answered somewhere on SO, but I can't find it.</p> <p>If I'm listening for a keypress event, should I be using .keyCode or .which to determine if the enter key was pressed?</p> <p>I've always done something like the following:</p> <pre><code>$("#someid").keypress(function(e) { if (e.keyC...
javascript jquery
[3, 5]
2,388,891
2,388,892
md5-encrypted string returns different from database than it is inserted
<p>So, I try to check if passwords match.</p> <p>This is the encryption I use, once when the data is inserted in the database, once to check if the inserted password on the login field matches the one from the database:</p> <pre><code> byte[] pass = Encoding.UTF8.GetBytes(password); MD5 md5 = new MD5CryptoServicePro...
c# asp.net
[0, 9]
5,395,735
5,395,736
What does slash equal in javascript do?
<p>I was recently reviewing some Javascript code in a jQuery plug-in and came across this line of code:</p> <pre><code>duration /= 2; </code></pre> <p>It appears from other code that the duration variable is a numeric value.</p> <p>Can someone explain exactly what that does with the slash equal?</p>
javascript jquery
[3, 5]
78,355
78,356
Encrypt and decrypt
<p>I wrote Decrypt and Encrypt with C# and used it in my project, and right now it works But I am wondering that I have to write Decrypt and Encrypt with JavaScript for Sniff or it is enough?</p>
c# javascript
[0, 3]
5,346,404
5,346,405
Automatic FormsAuthentication.Signout() when user close tab in asp.net
<p>How to make automatic FormsAuthentication.Signout() when user close the tab/pages in asp.net C#</p>
c# asp.net
[0, 9]
4,686,426
4,686,427
Will a script continue to run even after closing a page?
<p>if i call a php file via jquery ajax, that contains a script to do some stuff that takes a while, fon instance uploading a big video, and then i close the page: does the php script keep loading the video or not?</p>
php javascript
[2, 3]
1,783,994
1,783,995
Populate a javascript array with links of a specific class
<p>I'm looking to take a website source and populate an array with a collection of links, filtered by their <code>a class</code>.</p> <p>Say, for instance, the links were <code>&lt;a class="title"&gt;</code>, how could I target each class and add the URL to an array?</p> <p>Would Javascript or jQuery work better?</p>...
javascript jquery
[3, 5]
433,542
433,543
Marshaling exported string vector from C++ dll
<p>How can you marshal a vector of strings exported from a C++ dll ? I would like them to be separated before used in my C# program. Could you help me out ? </p>
c# c++
[0, 6]
2,725,153
2,725,154
Entityspaces showing some row from table
<p>I am trying to display some row of many rows in a table with the source code of Entityspaces. Does someone can tell me how? Thanks in advance...</p>
c# asp.net
[0, 9]
5,489,906
5,489,907
Error in multiple .ready() functions binding
<p>I have a page with some parts of it loaded with jQuery. Many of those parts have javascript code similar to:</p> <pre><code>console.log( "script X loaded"); $(document).ready( function() { console.log( "script X executed"); // ... some code ... }); </code></pre> <p>The issue is that all of those functions...
javascript jquery
[3, 5]
2,891,396
2,891,397
Why isn't java.text.Normalizer available for my Android app?
<p>I'm developing an Android app and in Eclipse, <code>java.text.Normalizer</code> can't be imported. It's like Eclipse can't find it. I saw another SO question asking about <code>Normalizer</code> alternatives to Android apps that are &lt; version 2.3. Is the class limited only to certain Android SDK versions?</p>
java android
[1, 4]
2,520,030
2,520,031
How to save file in the memory of phone?
<p>I have been developing an application which needs to download a file from the Internet and save it into memory; application doesn't need to save directly on to the SD card, because the SD card may be full. How can I save the file in memory using Java? Thank you. </p>
java android
[1, 4]
3,504,211
3,504,212
Set Value of a Dynamically Generated DropDown
<p>I have a dropdown menu that gets automatically populated. I need to set its selected value to a certain option whose ID is being passed in. This code seems to work with dropdowns that were created on page load:</p> <pre><code> $('select[id$=DropDown1] option').each(function (index) { if ($(this).val() ==...
javascript jquery
[3, 5]
4,651,927
4,651,928
Binding event handler to any possible event
<p>I know i can bind event handler to multiple events, but is it possible to fire event handler for all events regardless of event type that occurs on specific element?</p> <p>i meant something like this:</p> <pre><code> $("#myElement").bind(function(){ //this will fire on any event }); </code></pre>
javascript jquery
[3, 5]
1,206,562
1,206,563
looping through json data in JavaScript
<p>This is similar to <a href="http://stackoverflow.com/questions/2556476/ajax-coldfusion-cfc-json-hello-world">this question</a>, but I thought I'd reword it a bit differently in order to make myself more clear. I have this json coming back from a $.ajax call:</p> <p>{"COLUMNS":["PERSONID","FIRSTNAME","LASTNAME"],"DA...
javascript jquery
[3, 5]
2,966,788
2,966,789
Replicating functionality of stackoverflow's tag system
<p>On stackoverflow, while in the Tag-inputbox if you hold the left key button, it will go all the way to the left and open every tag for editing, same goes for the right key, and the backspace. <br>I am trying to replicate the same functionality on mine.</p> <p>I have the following code: <a href="http://jsfiddle.net/...
javascript jquery
[3, 5]
2,168,846
2,168,847
Use The Code Only One Time In my asp.net
<p>I have a class there is a code and this class is execute every time when website start.</p> <p>I want to use the class run only single time when my website is start.</p> <p>What can I do...?</p>
c# asp.net
[0, 9]
2,114,254
2,114,255
Abstract class with static methods. Is that correct?
<p><strong>Task</strong>: I want to use some methods for many classes. Methods are same, so there is no need to implement them for each class. In my case - I work with android SDK and I send http request to server.</p> <p><strong>Problem</strong>: There is idea to use construction like this:</p> <pre><code>class abst...
java android
[1, 4]
3,584,718
3,584,719
using RFID reader in a asp site
<p>I have create a web site and I need to read data which is created by rfid reader. this device has some dll which can be use in windows application. I want to know that is there any way to use those dll in my site in order that I read data from RFID reader? if not is there any way to use that device in web site?</p>
c# asp.net
[0, 9]
3,727,457
3,727,458
check if value changed upon change() trigger
<p>I noticed that change() can be triggered for a <code>&lt;select&gt;</code> even if the option was not changed.</p> <p>See my <a href="http://jsfiddle.net/emMx6/" rel="nofollow">jsfiddle</a> example.</p> <p>Changing the selection will change the text input displayed. However (and I do know it's a bit of stretch) if...
javascript jquery
[3, 5]
1,272,174
1,272,175
how do I return values from an array to populate href values
<p>var standard = $(function(){</p> <pre><code> //should return reversed iterated standard anchor array $.each(standard_anchor,function(value){ return (value) }) }); </code></pre> <p>/////</p> <p>$(function(){</p> <pre><code> /* s...
javascript jquery
[3, 5]
1,989,009
1,989,010
Update scripts folder that get added into a new asp.net web application
<p>How do I make Visual Studio add the latest version of Jquery to the scripts folder when I create a new Asp.Net application on Visual Studio 2010?</p> <p>Thanks</p>
c# asp.net
[0, 9]
5,629,472
5,629,473
How to use push with sub-arrays?
<p>I have 3 arrays like:</p> <pre><code>var arr1 = []; var arr2 = []; var arr3 = []; //When I want to add something into array then I use arr1.push("text"); arr2.push("text"); </code></pre> <p>but is it possible to make something like the following example?</p> <pre><code>//example: var arr = []; arr['group1'].pus...
javascript jquery
[3, 5]
442,648
442,649
Smooth natural motion when page scroll
<p>I am newbie in JS. Right now i am working on an effect in which i want when page scroll first time then the natural motion animation starts but it's creating a problem because when i scroll the element animation became fast.</p> <p>Check this more you got the idea.</p> <p><a href="http://jsfiddle.net/byvLy/" rel="...
javascript jquery
[3, 5]
1,983,376
1,983,377
While-loop divs not reacting
<p>I have a list of divs created using a while-loop</p> <pre><code>while($row = mysql_fetch_array($result)){ $output = "&lt;div id='drag'&gt;$row[id] - $row[name] - $row['email']&lt;/div&gt;"; echo $output;} </code></pre> <p>When I try to make those divs highlighted for a few seconds. Only the first div seems to be r...
php javascript
[2, 3]
2,401,900
2,401,901
Detect 30% from browser window bottom using scrollTop()
<p>My code can detect browser window bottom like below and then run <code>last_msg_funtion();</code> : </p> <pre><code>$(window).scroll(function(){ if ($(window).scrollTop() == $(document).height() - $(window).height()){ last_msg_funtion(); } }); </code></pre> <p>My problem is user need to scroll dow...
javascript jquery
[3, 5]
60,405
60,406
Pass event to parent view?
<p>I have a layout which contains five TextView. When user clicks any of the five TextView, it will do the same thing: open another activity. So, the OnClickerListener behavior to the five TextView is the same. Is it possible that I only add OnClickListerner to one view, e.g. to layout, so I don't have to add OnClickLi...
java android
[1, 4]
4,389,051
4,389,052
Parsing Line Breaks in PHP/JavaScript
<p>EDIT: Ok, thanks for your help guys. Using zerkms' suggestion, I have managed to get <code>&lt;br&gt;</code> tags inserted instead of carriage returns, so it is displayed properly on the page and doesn't break the javascript. The problem is now that when the user clicks on this text, it becomes a textarea and is the...
php javascript
[2, 3]
2,205,291
2,205,292
how to sort an ArrayList by its objects properties?
<p>Say I have an ArrayList of custom object, such as </p> <pre><code>class fileOjb { String path; String format; int size; int dateadd; } </code></pre> <p>How should I sort it by - path, format, size or dateadded?</p> <p>Thanks!</p>
java android
[1, 4]
3,228,708
3,228,709
checkbox filtering system
<p>I came across this page at <a href="http://www.walmart.com/browse/Computers/Desktop-Computers/_/N-96fg?browsein=true&amp;catNavId=3951&amp;ic=48_0&amp;ref=%20428236" rel="nofollow">walmart.com</a> and on the left side of the page is a checkbox filtering system that is done on the client side. When you check the pric...
javascript jquery
[3, 5]
2,756,955
2,756,956
How to reference <a> within <li> with jQuery
<p>I want to replace the <code>HREF</code>s in a list with new URLs.</p> <p>I have something like this:</p> <pre><code>&lt;ul id="sidebarItems"&gt; &lt;li&gt;&lt;a href="/PartBasicInfo/XX"&gt;Part Basic Info&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/SupplierContracts/XX"&gt;Supplier Contracts&lt;/a&gt;&lt;/li...
javascript jquery
[3, 5]
3,781,129
3,781,130
run function onclick of disabled checkbox
<p>I have a checkbox that I do not want the user to have direct access to. I want them to accept some terms. To do this I want them to be able to click on a disabled checkbox which opens this mini popup (not checking the box) that contains the terms so the reader can read them and accept them. Once they accept them the...
javascript jquery
[3, 5]
4,811,746
4,811,747
Cast javascript object to array. How to?
<p>I have made this sandbox test:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;whatever&lt;/title&gt; &lt;script type="text/javascript"&gt; function myLittleTest() { var obj, arr, armap; arr = [1, 2, 3, 5, 7, 11]; obj = {}; ...
javascript jquery
[3, 5]
5,558,996
5,558,997
Show another div if earlier div height<300px
<p>I am working on dynamic page where height of the page is concern.</p> <p>So, What I want is if height of <code>&lt;div id="a"&gt;</code> <strong>&lt; 300px</strong> , <strong>Then only show</strong> new <code>&lt;div id="b"&gt;</code></p> <p>How can I achieve this ?</p> <p>Thanks.</p> <ul> <li>Mandar</li> </ul>
javascript jquery
[3, 5]
5,962,214
5,962,215
In asp.net, how can I tell what triggered an additional page_load call?
<p>Greetings.</p> <p>Is there a good way to determine what is calling my Page_Load method? I've got a few Componentart WebUI grids that call it, although I've checked all of those (using the gridName.IsCallback property). I've also got an update panel, but I'm not sure how to check if it is the caller.</p> <p>I'm b...
c# asp.net
[0, 9]
809,377
809,378
Better alternatives to know whether a control is valid in javascript?
<p>I want to know whether a control is valid or not in javascript. Is there a direct client side API available in Asp.Net which can tell me whether a control is valid or not?</p> <p>Eg. If I have 2 validators attached to a textbox, I need a function that can tell me whether the textbox is valid or not. If even 1 valid...
javascript jquery asp.net
[3, 5, 9]
365,222
365,223
Selecting elements by attributes of given value
<p>I have the table below. I also have this array who's values correspond to the data-id attributes of the rows <strong>[52,24,12]</strong>. One and only one row will exist in the table for each array value. I would like to increment the count column for each row which exists in the array. For instance, 12 would ch...
javascript jquery
[3, 5]
1,599,443
1,599,444
how to send data from front end android client to back end code java server in cloud computing through sockets
<p>Hello I am working on cloud computing project. I need to send 2 dimensional array from android client(front end) ,and this data is to be sent to server(java code back end). How we can send this through socket programming. What are the request response code related to send or receive data from sever to client and vis...
java android
[1, 4]
144,360
144,361
hide validation error when an input receives focus
<p>Here is the code: - here i've declared my variables:</p> <pre><code> var first = $('#first'); var firstError = $('#firsterror'); // the errors are in span tags (if it matters) // and so on... first.blur(validateFirst); last.blur(validateLast); username.blur(validateUsername); pas...
javascript jquery
[3, 5]
1,316,701
1,316,702
setImageresource in android - how to use it for many pictures in a loop
<p>it is a rather simple question. I have 5 imageViews and 5 images in drawable folder. ImageViews are named <code>imageView1</code>...<code>imageView5</code> and images are named <code>image1</code>...<code>image5</code></p> <p>I want how can I write the following elegantly:</p> <pre><code> imageView1.setImageResou...
java android
[1, 4]
2,437,405
2,437,406
jquery toggle from two triggers
<p>I have 2 check boxes that shows and displays some divs.</p> <p>The first check box when toggled will show <strong>bank name and bank address</strong>. The second box when checked will show <strong>bank name and bank branch</strong>. </p> <p>What I want to achieve is that: when both check boxes are checked, the use...
javascript jquery
[3, 5]
5,607,660
5,607,661
jQuery UI interfering with Show()
<p>I use the following code to collapse/show divs in my content page:</p> <pre><code>$(document).ready(function() { // Hookup event handlers and execute HTML DOM-related code $('#nameHyperLink').click(function() { var div = $('#nameDiv'); var link = $('#nameHyperLink'); if (div.css('display') ...
asp.net jquery
[9, 5]
5,962,895
5,962,896
PHP equivalent of indexOf
<p>I have the following JS:</p> <pre><code>if(window.location.href.indexOf("search.php") != -1 || window.location.href.indexOf("list.php") != -1 || window.location.href.indexOf("view.php") != -1 || window.location.href.indexOf("contact.php") != -1) { </code></pre> <p>But want to convert it to PHP. What i...
php javascript
[2, 3]
5,950,552
5,950,553
HTML command-line-like text box
<p>I'm trying to make a text box that executes custom commands with custom syntax, it's for teaching children how to program, a simple example is that if the user wrote an ($) sign the program alerts a message (you are now writing a variable name), on the same text box if he added (!=) the alert says not equal, and so ...
javascript jquery
[3, 5]
3,221,145
3,221,146
Run function after mouse down for set time jQuery/JS
<p>Basically when you hold down any of the buttons with the class of <code>block_delete</code> for more than 1 second, the <code>OpenLoader()</code> should run. I googled and looked around on here and then made this, it kind of works:</p> <pre><code>var functionDeleteBlockDia = function() { $(".block_delete").mou...
javascript jquery
[3, 5]
436,738
436,739
Getting mouse events to function on dynamically loaded elements
<p>I have a simple mouseover event that I am trying to work on elements that are loaded with ajax. For example I have a div that when you mouseover hide/show another div. When I load these divs through ajax they no longer work. For example :</p> <pre><code>&lt;div class="block"&gt; &lt;div class="something"&gt;...
javascript jquery
[3, 5]
2,023,585
2,023,586
Accessing files stored in emulated storage
<p>I currently have an application that downloads files from a server and by default they are stored under /storage/emulated/0/ . I set it up so they download to a folder called "data". The files successfully download and unzip to /storage/emulated/0/data/unzipped , however, when I try to load an html file, stored unde...
java android
[1, 4]
4,141,277
4,141,278
Prevent ddl from triggering unsaved changes warning while still executing OnSelectedIndexChanged event
<p>I'm using this jquery code to detect unsaved changes and warn users before they navigate away.</p> <pre><code> var _changesMade = false; $(document).ready(function () { $('form').bind($.browser.msie ? 'propertychange' : 'change', function () { _changesMade = true; }); $(...
javascript jquery asp.net
[3, 5, 9]
754,764
754,765
hide or show large number of elements using jquery or javascript
<p>I have a situation in a web application, where based on certain conditions, I have to hide or show large number of div elements, numbers ranging from say <strong>500</strong> to <strong>98000</strong></p> <p>.</p> <p>What I am doing is I am applying a common class on all the div elements and then iterating the who...
javascript jquery
[3, 5]
3,314,953
3,314,954
Making smarter jQuery code
<p>I was wondering if anyone has any idea on how I could rewrite this simple jquery code to be more efficient. It's of course working fine now but I imagine adding say 10 more items would make the code really big. I thought maybe I could add the classes to arrays and use some kind of loop? Not sure if that's the right ...
javascript jquery
[3, 5]
1,389,041
1,389,042
condition == between string and constant
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java">How do I compare strings in Java?</a> </p> </blockquote> <p>Someone can tell me why this condition</p> <pre><code>if (lista.getString(0)=="username") </code></pre> <p>d...
java android
[1, 4]
5,097,117
5,097,118
Load Javascript for a widget Worpress
<p>I want to load a special Javascript File just when the widget is loaded in the sidebar. Where do I have to put my <code>wp_enqueue_script(...)</code> lines?</p> <pre><code>class controller_widget extends WP_Widget { function controller_widget() { $this-&gt;color = "red"; $this-&gt;dir = plugin_...
php javascript
[2, 3]
2,839,202
2,839,203
Restrict input field to two decimals with jQuery
<p>I have an input field which I want to restrict so that the user only can input a number with the maximum of two decimals. Want to do this using jQuery.</p> <p>Could I use jQuery <strong>toFixed()</strong> function somehow?</p> <p>Thanx!</p>
javascript jquery
[3, 5]
3,030,712
3,030,713
ImageView In TableLayout
<p>I want to add a ImageView in TableLayout. I do all things, but it isn't shown anything. How can I fix it?</p> <p>This is my code:</p> <pre><code>public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.buddy_list); TableLayout buddy_list_layout = (Tabl...
java android
[1, 4]
3,573,056
3,573,057
creating simple cookies in asp.net c#
<p>My application needs to store cookies. When a user logs on I want to make sure that if the cookie does not exist create it and store value, but if it does modify it.</p> <pre><code>if(cookieExist) { cookiename = "value"; } else { create a new cookie then store the value; } </code></pre> <p>Thanks fo...
c# asp.net
[0, 9]
232,270
232,271
Select every element of a ul li using jquery
<p>I have a menu in form of ul li, and I want to a add different css class to every child of the li.</p> <p>Here is the javascript code:</p> <pre><code>$("#menu").ready(function () { $("#menu ul li").addClass("menu_background1"); }); </code></pre> <p>css:</p> <pre><code>.menu_background1 { background:#FF0; } ...
javascript jquery
[3, 5]
3,891,190
3,891,191
jQuery children returns a boolean?
<p>I've come across this line and I can guess what it's doing but shouldn't there be a <code>length &gt; 0</code> on the children or will it always return/can be used as a boolean?</p> <p>Or does jQuery's children return a boolean, or is this person relying on the existence of the returned children?</p> <pre><code>ap...
javascript jquery
[3, 5]
4,255,587
4,255,588
Beginning Android Programming - Building a short Quiz
<p>Okay, so I'm writing my first Android app and am basically stuck. The app is a short 4 question quiz with two choices per question. This creates 16 possible results, which I've created descriptions for. I want the app to display the description corresponding to the user's responses on each of the questions after the...
java android
[1, 4]
5,195,003
5,195,004
using a div:title tag attribute instead of a:href attribute to toggle divs
<p>I have this script that uses an a:href attribute tag to swap divs out. I'd like to instead use a div tag with the title attribute.</p> <p>Working code</p> <pre><code>$(document).ready(function () { $('#tabs div').hide(); $('#tabs div:first').show(); $('#tabs2 ul li:first').addClass('active'); $('#...
javascript jquery
[3, 5]
1,239,651
1,239,652
how can i get particular text using jquery
<p>how can i get only the cheque number(<code>AA12GH56</code>) not the other texts, here is my code:</p> <p>HTML:</p> <pre><code>&lt;p&gt;your cheque number is :AA12GH56 &lt;br /&gt; your bank credit balance is :32,999&lt;/p&gt; </code></pre> <p>Javascript:</p> <pre><code>$(document).ready(function(){ $('p').clic...
javascript jquery
[3, 5]
3,889,304
3,889,305
Can i write Cocoa Touch[iPhone] applications in C++ language
<p>1) Can i write iPhone applications in pure C++ language, i know that we can use Objective-C++, i just want to know if we can also write it in pure C++ language.</p> <p>2) while creating MAC OX application inXCode, we have an option to create C/C++ application, will the same options work for me to write iPhone appli...
iphone c++
[8, 6]
4,498,219
4,498,220
shim for the required attribute for IE9 users
<p>According to <a href="http://caniuse.com/#search=required" rel="nofollow">CanIuse</a>, the required attribute is not supported in IE9. Is there a shim to provide the same functionality as the native required attribute if the browser doesn't support it?</p>
javascript jquery
[3, 5]
5,842,361
5,842,362
Android App Dev (Beginner)
<p>My question is in two parts, I guess that makes it two questions :-).</p> <p>I have a strong interest in beginning to develop Android applications. I have some knowledge of programming HTML and CSS but no other languages. My research has yielded many folks indicating knowledge of Java is a must-have in order to dev...
java android
[1, 4]
301,202
301,203
Prevent AlertDialog from closing
<p>I have a custom AlertDialog with a bunch of checkboxes. I want to prevent the AlertDialog from closing if none of the checkboxes are selected. Is this possible?</p> <p>I know I can close momentarily and re-open it, but I would rather not do this as I have some code within the setPositiveButton which I do not want t...
java android
[1, 4]
3,341,310
3,341,311
Best way to write a polling capable application
<p>I'm trying to build a basic application which will have 2 separate components which are:<br> 1. Continually poll an external process and store the results within a DB<br> 2. Grab the results from the DB and display it in a webpage</p> <p>I'm looking to do this in .Net so I would normally say to do the first com...
c# asp.net
[0, 9]
2,033,316
2,033,317
How do I make jQuery modify only one div, instead of all divs of the same class?
<p>Each page of my site has 10 (almost) identical divs, varying only in the text within. When a certain part of a div is clicked, I want a different part of that div to be modified.</p> <p>I'm using this code:</p> <pre><code>$(document).ready(function(){ $(".notLogged img").mouseover(function(){ $(this).parent()&g...
javascript jquery
[3, 5]
1,563,664
1,563,665
Coversion from datetime of format "01 Oct 2012 23:59:59:000" to "01-10-2012 23:59:59" in C#
<p>My database contains the "From Date" in the form <strong>"2012-10-01 23:59:59.000"</strong> while taking the value to front end its comming as <strong>"01 Oct 2012 23:59:59:000"</strong>. So how can i get the date without "Oct" format. </p> <p>I tried this also</p> <pre><code> foreach (DataRow dr in _dt.Rows) ...
c# asp.net
[0, 9]
5,819,969
5,819,970
Making a control visible on a seperate page, but not visible on the page which contains the control
<p>I have a masterpage (which we will call 'default'). This contains a second page (web user control) - 'second'. And finally a third 'print' page. The 'print' page is also a web user control, however, it merely has a placeholder that contains the 'second' page.</p> <p>Is there a way I can add a control to the 'second...
c# asp.net
[0, 9]
5,599,518
5,599,519
JQuery: get radio button value
<p>I have the following HTML:</p> <p>HTML:</p> <pre><code>&lt;input type="radio" name="abc" value="0" selected="selected" style="display:none" /&gt; &lt;input type="radio" name="abc" value="1" /&gt;1+ &lt;input type="radio" name="abc" value="2" /&gt;2+ &lt;input type="radio" name="abc" value="3" /&gt;3+ </code></pre>...
javascript jquery
[3, 5]
950,484
950,485
How to rotate menu 180 degrees android
<p>Okay so I am developing an app that will have to players playing against each other. The two players will be opposite each other so I want to be able to the rotate the activity 180 degrees when it is one of the players moves. So far I have been able to do it by overriding any views onDraw() method and applying the r...
java android
[1, 4]
4,864,554
4,864,555
Overflow menu entries with icon?
<p>If I click on the "overflow" action bar icon, I only see my menu items as text, but the icon is not displayed! Is this the default behaviour? How can I force showing the icon?</p> <p>If you look at <a href="http://developer.android.com/design/patterns/actionbar.html" rel="nofollow">http://developer.android.com/desi...
java android
[1, 4]
3,313,934
3,313,935
setOnClickListener(new OnClickListener(){})
<pre><code>package android.example; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.Toast; public class Android_eg1 extends Activity { Button bt; @Override public void onCreate(Bundle savedInstanceState) { super...
java android
[1, 4]
2,089,828
2,089,829
Javascript -- Attach events in loop
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/8909652/adding-click-event-listeners-in-loop">adding ‘click’ event listeners in loop</a> </p> </blockquote> <p>I make a demo.So let's see the HTML first.</p> <pre><code>&lt;a href="#" id="testA"&gt;testA&lt;/a&...
javascript jquery
[3, 5]
4,741,418
4,741,419
How to get all CSS classes of an element?
<p>I have an element with multiple classes and I'd like to get its css classes in an array. How would I do this? Something like this:</p> <pre><code>var classList = $(this).allTheClasses(); </code></pre>
javascript jquery
[3, 5]
2,737,364
2,737,365
jquery history of input select (easy)
<p>I have an input field called email class keyup-an. I validate it easy with this, but it works or when an individual inputs the field manually. How do i make it work also for selecting historical data. when you click email and yesterday you put test@test.com, the history list drops down and you can select it, but its...
javascript jquery
[3, 5]
3,396,887
3,396,888
calculate difference between two double values exactly
<p>I want to calculate the difference between two double values</p> <p>for example : lat1=12.2345673 and lat2=12.2345672 . here i want result as 0.0000001. this much exactly i am not getting while calculate double res=Double.compare(lat1,lat2) in eclipse. it showing 0.0. Please specify the exact formula to overcome th...
java android
[1, 4]
1,495,786
1,495,787
Why use .on() for adding event instead of directly adding event?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/8601482/jquery-on-vs-click-methods">jquery on vs click methods</a> </p> </blockquote> <p>From API:</p> <p>.on() : Attach an event handler function for one or more events to the selected elements.</p> <p>Exampl...
javascript jquery
[3, 5]