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
6,032,740
6,032,741
My android Application instance(Application class) is destroyed after I stay my application in background after 2-3 minutes
<p>I use <code>Application</code> class to store my android application global parameters.But when I go to other app and stay my app to background for about several minutes, my app can not run again. Because I get parameters from the <code>Application</code> class but now it becomes empty.</p> <p>My question is why it...
java android
[1, 4]
3,261,887
3,261,888
How to set a value for slider if its position is 2 or 3 or 4
<p>I am using jQuery slider.Is it possible to set a value for slide basing on its position.</p> <p>Ex:</p> <p>min (1 2 3 4 5 ) Max</p> <p>value('100' '150' '200' '400' '500')</p> <p>if the slider is at position 3, it should show the value 200 in the label.</p> <p>Thank you. </p>
javascript jquery
[3, 5]
3,517,778
3,517,779
Fill empty spaces in a list element
<p>I have a fluid grid (in height and width). The LIs are always rectangular and adapt them self's to the screen size.</p> <p>Now i need to fill the lists, so they all have the same height. This would be easy if the all the columns had a with of one LI element. But there are double sized columns and some of them can c...
javascript jquery
[3, 5]
234,340
234,341
Image is in use, access denied can not delete
<p>I am working on one application which deals with images.</p> <p>I have code for creating new image from byte array.</p> <p>When i create some new images with same name as that of the old file names.</p> <p>and tries to delete the old files </p> <p>it gives me exception that file is in use, access denied.</p> <p...
c# asp.net
[0, 9]
143,381
143,382
Another Easy jQuery Question
<p>I have the bellow code, I wish to create an IF statement so the loadScript function is only called for a specific HREF. But when I try and alert the value of the href it returns "Undefined"... </p> <p>Many Thanks, J </p> <pre><code>$(document).ready(function() { $('.jNav').click(function() ...
javascript jquery
[3, 5]
3,547,975
3,547,976
Verify a php variable if there is a javascript code
<p>I have some variables in PHP (strings) and I vould like to check if inside of those strings I have some javascript code. If so, I would like to make this code inactive and be displayed as string on the website, not to be executed as javascript code.</p> <p>This will be a kind of security method.</p> <p>Is there a ...
php javascript
[2, 3]
1,808,385
1,808,386
embed string in the html
<p>Asp.net c# I am using the below code..</p> <pre><code> &lt;%String h = "hello";%&gt; &lt;!-- "wall_com_insert.aspx?Tid=" + Application.Get("Tid");--&gt; &lt;div id="content_sr_comment" style="height: auto"&gt;&amp;nbsp;&lt;asp:Label ID="Label8" runat="server" Text="&lt;%=h%&...
c# asp.net
[0, 9]
4,501,007
4,501,008
Return clickable URL from text URL in JavaScript
<p>I'm working on a cascading dropdown list. When the last item is selected, it pulls up info from a .cs list based on all of the previous selections. This is working well. However, I would like the displayed results to include a clickable link as well as the other info. Right now I'm using document.write to open a new...
c# javascript
[0, 3]
1,324,866
1,324,867
Readability a=b=c or a=c; b=c;?
<p>I have a class which has a group of integers, say</p> <pre><code>foo() { int a; int b; int c; int d; .... string s; } </code></pre> <p>Now the question is for the best readbility, the init() function for foo(), should it look like</p> <pre><code>void init() { a=b=c=d=1; //for some reason they are in...
c# c++
[0, 6]
5,506,075
5,506,076
How to trim content of element and put "..." if the characters go over a certain limit?
<p>I would like to trim a part of the <code>&lt;td&gt;</code> if it is too long. This will make sure the table doesn't get messed up. All the data in the following table is retrieved from a database. On the "Subject" part, how could I make the text shorten and put "..." if it goes over a certain character limit? Here i...
javascript jquery
[3, 5]
3,330,619
3,330,620
how to pass uploaded file name to java script asp.net
<p>for the </p> <pre><code>&lt;input type="file" name="addfile" id="addfile" /&gt; &lt;input type="submit" id="btnadd" value="Addfile" onclick="filetype(addfile)" /&gt; </code></pre> <p>i need to check the file type(pdf or doc etc) in javascript that is added for this what do i need to pass in filetype onclick funct...
javascript jquery
[3, 5]
1,639,612
1,639,613
Object.hasOwnProperty.call(object, key) in php
<p>Is there an equivalent of this JavaScript code in PHP?</p> <pre><code>var object = {}, key; Object.hasOwnProperty.call(object, key) </code></pre>
php javascript
[2, 3]
3,559,257
3,559,258
How can i get inside parentheses value in a string
<p>How can i get inside parentheses value in a string. </p> <pre><code>String str= "United Arab Emirates Dirham (AED)"; </code></pre> <p>I need only AED text. Thanks</p>
java android
[1, 4]
1,933,865
1,933,866
Automated WebForm Generation
<p>I have a bunch of C# functions with string, int and bool arguments that serve as data entry interfaces. I'd like to be able to create a webform for each method; a textbox for each string/int and a checkbox for each bool. </p> <p>Is there a way to automate this process?</p>
c# asp.net
[0, 9]
140,648
140,649
Slider Menu Open Close Issues/ Jquery
<p>How are you. I'm building a content menu/accordion and I was having some trouble building out 3 segment of it.</p> <p>1) Wanted When you click on button, to keep the previous menu open, menu should be closed manually and not automatically. Currently it automatically closes the previous.</p> <p>2) A close All click...
javascript jquery
[3, 5]
1,895,814
1,895,815
Need to implement a grid in android
<p>I need to implement a grid that will show the position of some physical objects. I want to interact with the objects: I want to be able to send commands or request their "health" status (the objects happen to be sensor nodes). <br><br>The size of the grid is given by the user but is always square (<code>width=length...
java android
[1, 4]
4,844,030
4,844,031
Add a space in a javascript line
<p>I have this line of code:</p> <pre><code>var bgposh = "-37"; $(element).find('.toggle_box').css({'-webkit-transition': 'background-position 0.2s linear', 'background-position': '147px "+ bgposh +"px'}); </code></pre> <p>but the background position does not get set. I think it is because there is no space between...
javascript jquery
[3, 5]
5,131,488
5,131,489
jQuery override form submit not working when submit called by javascript on a element
<p>I've got a page with a normal form with a submit button and some jQuery which binds to the form submit event and overrides it with <code>e.preventDefault()</code> and runs an AJAX command. This works fine when the submit button is clicked but when a link with <code>onclick='document.formName.submit();'</code> is cli...
javascript jquery
[3, 5]
2,792,983
2,792,984
Detecting Browser History Actions
<p>I am building a Html 5 website using push state and I wondering whether its possible in javascript or JQuery to detect whether the browser's back button has been pushed. I would like to include it in an if statement like so:</p> <pre><code>if (back_btn clicked){ //do stuff } if (forward_btn clicked){ } </code></pr...
javascript jquery
[3, 5]
4,364,679
4,364,680
Explanation of two argments for jQuery .each() method
<p>In the following jQuery, the <code>.each()</code> method takes two arguments: <code>'ul li a'</code> and <code>menu</code>. What do these two arguments mean?</p> <pre><code>var menu = $('.menu'); $('ul li a', menu).each(function() { $(this).append('&lt;span /&gt;'); }); </code></pre> <p>HTML:</p> <pre><code>&...
javascript jquery
[3, 5]
3,872,786
3,872,787
Convert multi-lined variable into a single lined variable using Javascript?
<p>I have a variable:</p> <pre><code> var remoteControlPage = ' &lt;table&gt; &lt;tr&gt; &lt;td class="stats"&gt;sadfsadf&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; '; </code></pre> <p>and I want to use it in a Jquery <code>.html</code> function like this:</p>...
javascript jquery
[3, 5]
2,510,023
2,510,024
how to catch exception in C# which call a C++ dll
<p>My C# called a method from a C++ dll, after the call returned, my application just gone without any message. want to add try catch to get the reason. how can I do it. Just a try-catch in the method call?</p> <p>EDIT: the [HandledProcessCorruptedStateExceptions] is not belong to C#?</p>
c# c++
[0, 6]
3,151,962
3,151,963
Jquery Clone Function
<p>Is there any way to customize html by JQUERY clone function let say i have a div</p> <pre><code>&lt;div id="my_Div" style="margin-right:14px;"&gt; Name : &lt;input type="text" name="file_name[]" id="file_name" class="validate[required]"/&gt; &amp;nbsp;&amp;nbsp; Choose File : ...
javascript jquery
[3, 5]
1,529,451
1,529,452
jquery - perform effect on any event
<p>i have 5 elements in a page. i have selected them using class names <code>$('.class')</code></p> <p>i am trying to perform a function for those selected elements irrespective of event (click or hover or watever). </p> <p>eg:</p> <pre><code>$('.class').hover(function(){definition1}); $('.class').click(function...
javascript jquery
[3, 5]
3,978,468
3,978,469
How to Rebind Listview which is already bind with a datatable
<p>I have a <code>Listview</code> which have a <code>DataTable</code> as a <code>DataSource</code>. Now i want to rebind it with a Generic list. After that both <code>Listview</code> data, <code>DataTable</code> and Generic list data will be persisted. Is it possible?</p> <p>With <code>DataTable</code> Binding <code>L...
c# asp.net
[0, 9]
2,094,890
2,094,891
Javascript to jQuery conversion need
<p>Not sure the code below 100% correct but it was doing the job and now need to convert for jQuery.</p> <pre><code>var count = 0.00; var currency = "R$"; function doCount() { count = count + 1.99; document.getElementById("number").innerHTML = currency + parseFloat(count).toFixed(2).replace(/\./g, ','); v...
javascript jquery
[3, 5]
4,746,762
4,746,763
Exclude a certain div in jQuery global validation?
<p>Okay, so we have around 30 input boxes in our page, and instead of writing a no data line for each one, we have a simple statement:</p> <pre><code>if( $(div).find('input:text[value=""]').length &gt; 0 || $('#checkbox1Wrap').find('input:checkbox:not(:checked)').length &gt; 0 || $('#checkbox2Wrap').find('inpu...
javascript jquery
[3, 5]
4,976,977
4,976,978
DetailsView binding correctly but only one field being displayed
<p>I have my DetailsView bound to get data. It correctly returns 4 rows of information but only displays</p> <p>Skill : Javascript</p> <p>I assume im missing some sort of loop to implement it to display</p> <pre><code>Skill : Javascript Skill : C# Skill : Actionscript 3 Skill : HTML </code></pre> <p>How would I go ...
c# asp.net
[0, 9]
5,040,402
5,040,403
Updating Twitter Status using JTwitter
<p>I am trying to write a code in android that would help update my twitter status from within my app, but am having problems with it.Below is the code snippet</p> <pre><code>public void onClick(View v) { String statusText = edit.getText().toString(); new PostToTwitter().execute(statusText); } ...
java android
[1, 4]
1,629,537
1,629,538
Function treats string as single value instead of parsing
<p>I'm using a tags plugin that takes input like this just fine:</p> <pre><code>$(this).tagHandler({ assignedTags: [ 'test','from','reddit' ] }); </code></pre> <p>If however I create a variable named tags that is a string:</p> <pre><code>tags = "'test','from','reddit'"; </code></pre> <p>And attempt to use it in ...
javascript jquery
[3, 5]
1,185,413
1,185,414
Set screen resolution for canvas/surfaceview
<p>I am trying to create an animation for a mobile phone app in android, and have created an image that is 320pix high. But when he appears at position 0,0 on my Galaxy S3, he's a bit small.... (Portrait mode and landscape). I would prefer to not create large images for such a high resolution, so is there a way to set ...
java android
[1, 4]
3,233,015
3,233,016
php, jquery, load function and page address
<p>i have two files. In first (parent, address: www.myaddress.com/fun/test.php) is jQuery function:</p> <pre><code>&lt;script type="text/javascript"&gt; $(function(){ $(document).ready(function() { import_f = setInterval(function() { $('#file').load('fun2.php?id='+ Math.ran...
php jquery
[2, 5]
3,677,623
3,677,624
IIS 6 "Maximum request length exceeded." trigger before Global.asax
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3853767/maximum-request-length-exceeded">Maximum request length exceeded</a> </p> </blockquote> <p>I'm using IIS 6 to host my Asp.net site. I'm having </p> <blockquote> <p>"Maximum request length exceeded."</...
c# asp.net
[0, 9]
1,242,934
1,242,935
Draggable element covers another one when moving back
<p>Currently I'm having a small problem with the demo at <a href="http://jsfiddle.net/nivea75ml/yCnh5/" rel="nofollow">http://jsfiddle.net/nivea75ml/yCnh5/</a>. Whenever I drag a pink box from the list to the grey area and later move it back, it covers another one in the same list. </p> <p>How can this behaviour be av...
javascript jquery
[3, 5]
4,535,843
4,535,844
Is Dirty in ASP.NET Web Page
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/155739/detecting-unsaved-changes-using-javascript">Detecting Unsaved Changes using JavaScript</a> </p> </blockquote> <p>My Web application has 3 web forms ,I implemented the validations in my webpage.I want to i...
c# asp.net
[0, 9]
2,412,470
2,412,471
Trouble edit and save data from one Activity to another Activity
<p>Currently working on an android application using php as an API to retrive data from SQL.</p> <p>I am able to view on one activity but when I go to next activity for edit, it only displays empty content.</p> <p>I posted the full code in Code Review site <a href="http://codereview.stackexchange.com/questions/14223/...
java android
[1, 4]
930,439
930,440
Android: how to run a thread in service after the device has been rebooted
<p>How to run a thread in background, after the device is rebooted. I'm trying to re schedule the alarm using alarm manager after the device is rebooted. But miserably it is ringing once after reboot and the scheduled alarms are cleared after reboot. so i've to make a thread run in background service that re-schedules ...
java android
[1, 4]
5,478,711
5,478,712
android Button :
<p>Why we use Button in this way to initialize.</p> <blockquote> <p><strong>b1=(Button) findViewById(R.id.bEdit1);</strong></p> </blockquote> <p>And why we use (Button) before findViewById.</p> <p>Thanks</p>
java android
[1, 4]
4,516,243
4,516,244
Convert dd/MM/yyyy to yyyy/MM/dd?
<p>I want to convert a string '30/12/2012' to '2012/12/30'. My application is set to "en-CA" however the database accepts yyyy/MM/dd as default.</p> <blockquote> <p>How can I do this without depending on the current culture info set at server?</p> </blockquote>
c# asp.net
[0, 9]
3,626,536
3,626,537
how to check parent in jquery
<p>I bind a click event over the <code>document</code>. I have a div with id <code>parent</code>. Now whenever the click event occur over the <code>document</code> than i am trying to check the target element is the child of <code>div ( id = parent )</code> or not.</p> <pre><code> &lt;div id="parent"&gt; &lt;div...
javascript jquery
[3, 5]
4,587,723
4,587,724
jQuery change text in link
<p>I have a simple question for jQuery...</p> <p>I have a table with a link like this</p> <pre><code>&lt;table&gt; &lt;tr&gt; &lt;td class="views-field"&gt; &lt;a href="ciao"&gt;201105&lt;/a&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>Now I would change the link's text from 201105 t...
javascript jquery
[3, 5]
4,919,543
4,919,544
Getting difference of 1 day when date is sent from android application to php
<p>I am developing the android application in which persons can enter leave application. Here users select the date from the Android Calendar and from this selected Date Epoch value is sent to php page on converting the epoch readable date format i get a difference of 1 Day.</p> <p>As on php page i calculate the to da...
java php android
[1, 2, 4]
3,554,210
3,554,211
Parse date in android
<p>I have the following code to pase a date</p> <pre><code>DateFormat df = new SimpleDateFormat("EEE, dd MMM yyyy kk:mm:ss", Locale.getDefault()); Date _pubDate = df.parse(_pubDateE.getFirstChild().getNodeValue()); </code></pre> <p>But I get this error:</p> <p>java.text.ParseException: Unparseable date: "Fri, 12 Au...
java android
[1, 4]
671,796
671,797
How to prevent users from opening apps
<p>... I want that if I unlock the lock screen and open home page of my app then how to prevent the user from open any apps in the mobile? </p>
javascript android
[3, 4]
1,702,982
1,702,983
How to capitalize only the first letter of a string, while lowercasing the rest?
<p>My string is:</p> <blockquote> <p>1 STATE OF GOA THROUGH CHIEF</p> </blockquote> <p>I want the output to be like</p> <blockquote> <p>1 State of goa through chief</p> </blockquote> <p>How can I keep the first letter capital and convert other to small? I had used <code>.ToLower()</code>, but it converts all ...
c# asp.net
[0, 9]
3,714,997
3,714,998
Streaming ACC file by opencore-aacdec
<p>I have founded that for streaming ACC file with MediaPlayer there is a code <a href="http://code.google.com/p/opencore-aacdec/" rel="nofollow">http://code.google.com/p/opencore-aacdec/</a></p> <p>but that file is library file and only contain .c and .h file can any body suggest me how to use that library in android...
java android
[1, 4]
2,700,042
2,700,043
Jquery simple modal dialog with iframe and generated elements
<p>Ok, guys, I need your help. My English is not so good, so I hope that you'll understand what I want. </p> <p>I need some very simple modal dialog that will be generated only through JavaScript or Jquery. In that modal I will have some iframe. Modal and iframe in it must be generated via JavaScript or Jquery, becaus...
javascript jquery
[3, 5]
4,445,295
4,445,296
How to prevent simultaneous login with same user on different pcs
<p>We have a build a intranet application where users have to login to do certain tasks... We have to make sure that no "application user" is logged in more than once at the same time.</p> <p>So what I do at the moment is that I store the current asp .net session id in the database and then i compare at every page loa...
c# asp.net
[0, 9]
4,736,465
4,736,466
how to find out the selected row in a gridview
<p>I am doing a project in .net with c#. in that there is a registration form of new users into the site. admin should approve the registration. for that I'm using a GridView. How to find out the selected row in the grid view?</p>
c# asp.net
[0, 9]
1,201,892
1,201,893
JS callback on asp button
<p>Um, I have this guy:</p> <p><code>&lt;div class="buttonRight"&gt;&lt;asp:Button ID="btnOK" runat="server" Text="OK" Width="68px"/&gt;&lt;/div&gt;</code></p> <p>which renders out to</p> <p><code>&lt;div class="buttonRight"&gt; &lt;input type="submit" name="_$_$pc$pc$tabTO$_$uc0$popupSelectCompetition$btnOK" value=...
asp.net javascript
[9, 3]
4,129,107
4,129,108
Exception got "Unable to connect to the remote server" while sending an email
<p>When I remove the comment "//stmp.timeout" it gives timeout error. What should I do to fix that?</p> <p>Here is my code:</p> <pre><code>public ActionResult Index(EmailModel model) { var smtp = new System.Net.Mail.SmtpClient(); { smtp.Host = "smtp.gmail.com"; smtp.Port = 180; smtp.En...
c# asp.net
[0, 9]
1,997,799
1,997,800
Implement and editable label?
<p>I would like to present a user with a normal screen with a few fields (Description, Date etc). But I would like them to click the label and without a postback (visible) the label becomes editable, and a 'Save' button appears somewhere.</p> <p>Once they click save, the data gets saved, and the edit boxes turn back i...
c# asp.net
[0, 9]
686,255
686,256
Jquery & query string
<p>the below way i call my pageload function by jquery. so please tell me how to pass query string.</p> <pre><code>&lt;script type="text/javascript" src="script/jquery-1.3.2.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $('#Customers').change(function() { ...
jquery asp.net
[5, 9]
5,612,061
5,612,062
How do I get the value of td using hierarchy?
<pre><code>&lt;tr&gt; &lt;td&gt;#&lt;/td&gt; &lt;td&gt;2009&lt;/td&gt; &lt;td&gt;&lt;a class="delete_this"&gt;Click&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; </code></pre> <p>I want to use jquery and get the text of 2nd (second) "td" when clicking the anchor. I want the "td" in the same tr as the anchor...</p> <p>How do I ...
javascript jquery
[3, 5]
3,471,860
3,471,861
InDirect Download Link From Asp.net
<p>I Want to give users, link to my files on server but I dont want to get them direct link</p> <p>I know how to do this (using rewrite or handler), I don't want how to I need a library in C# that do this perfect thank you very much</p>
c# asp.net
[0, 9]
4,490,307
4,490,308
jquery - Get the occurrence of an element
<p>I have a div which contains 5 images.</p> <p>I want to write to a p tag every occurrence of the img</p> <pre><code>$("#myDiv img").each( function() { $("p").append($(this).length); }); </code></pre> <p>The above returns:</p> <p><code>11111</code></p> <p>What I want to return is:</p> <p><code>12345</code></...
javascript jquery
[3, 5]
4,673,578
4,673,579
Correct Namespace For GetHtmlPage
<p>Can anyone tell me the namespace for GetHtmlPage? I have:</p> <pre><code>using System.Net; using System.IO; </code></pre> <p>as per the instructions found here: <a href="http://www.mikesdotnetting.com/Article/49/How-to-read-a-remote-web-page-with-ASP.NET-2.0" rel="nofollow">http://www.mikesdotnetting.com/Article/...
c# asp.net
[0, 9]
4,719,931
4,719,932
LosFormatter and data serialization
<p>I have app with two sites, one where design is done and other which returns Images.I was storing my values to generic types and then converted them to query string and just set Image src on desing page to return changes. Code was getting bad and I was struggling with diffrent data on every place(since I have few dif...
c# asp.net
[0, 9]
307,536
307,537
want to match only whole words in javascript for error
<p>So I am trying to create a little form validation on entering a Name I want to not allow certain characters, already created names, and internally reserved words. The problem is say when I want to put "posts" in a name it says that it is matching "pos" and fails.</p> <pre><code>var badchar = new Array('"', "," , "'...
javascript jquery
[3, 5]
3,936,084
3,936,085
To find Control in Other page
<p>I'm creating a web application using C#.net My webpage contains a Hidden Field Control. I need to use this control's value in another page. I declared a method and inside this method i passed the entire page as a parameter. In another classfile i defined this method. Inside the method i tried to access the Controls ...
c# asp.net
[0, 9]
4,888,641
4,888,642
jquery Ajax URl issue
<p>I have looked around quite a bit and it seems absolute urls is the way to go here. I have no problem in chrome but firefox and IE IE still wants to redirect fully to the wrong page.</p> <p>my states:</p> <pre><code>&lt;script type="text/javascript"&gt; $(function() { $('#page_submit').click(function (...
php javascript jquery
[2, 3, 5]
4,753,914
4,753,915
Test for NaN in java
<p>I'm wondering if there is a way to test for NaN in java. The code below is returning NaN where it should be returning "NA".</p> <pre><code>if (tempAlloc == Double.NaN) { tv4.setText("NA"); } else { tv4.setText(customFormat("###.#%", Double.toString...
java android
[1, 4]
380,651
380,652
Drag Drop on ASP.Net Tree View
<p>I am trying to implement the drag drop functionality on ASP.Net tree view. In my tree view the file and folder is showing. </p> <p>I want user select a file from his computer and drag drop to ASP.Net Tree and file will upload on the server.</p> <p>Is this possible in ASP.Net Tree View?</p>
jquery asp.net
[5, 9]
2,461,581
2,461,582
click event on a div should not be triggered by it's children
<p>Let's say I have the following Code:</p> <pre><code>&lt;div id="parent"&gt; &lt;div id="child"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>Now I attach an onClick event to the parent div:</p> <pre><code>$('#parent').click(function() { ... }); </code></pre> <p>Is there an easy way to stop the event from tri...
javascript jquery
[3, 5]
5,816,119
5,816,120
Access to restricted URI denied" code: "1012
<p>I am using jsGantt chart. To fill chart I am using xml file.<br><br> <strong>Problem is that xml file is outside project(root directory). so when jsgantt.js try to load xml file to fill chart it gives error like <br></strong> <img src="http://i.stack.imgur.com/yJ8kZ.png" alt="enter image description here"></p> <p>j...
javascript asp.net
[3, 9]
1,479,156
1,479,157
Javascript: Find numbers of keywords in textarea
<p><strong>Input:</strong></p> <pre><code>var text = $('#id_textarea').val(); var keywords = $('#id_keywords').val().split(','); </code></pre> <p><strong>Output:</strong> Number of <code>keywords</code> in <code>text</code></p> <p><strong>Example:</strong></p> <pre><code>text = "jquery javascript js jquery-js js dj...
javascript jquery
[3, 5]
3,501,372
3,501,373
Calling function within .each()
<p>I would like to repeat the chained events starting at <code>.animate()</code> from inside itself (indicated by comment). What is the correct way to write this?</p> <pre><code>$("div").each(function(i, e){ $(this).animate({ left: $(this).parent().width() }, d[i], "linear", function(){ $(this).css({left: -...
javascript jquery
[3, 5]
4,782,506
4,782,507
How to make global "Intent explicitIntent = new Intent(...)" methods
<p>I have the same methods in various classes (views) and would like to abstract them somehow so I don't have the identical code parts in multiple classes. How do I have to do this in Android?</p> <p>The method I have multiple times in my project looks like this:</p> <pre><code> public void goHome() { Intent e...
java android
[1, 4]
3,677,004
3,677,005
how to fix $(this) inside another $(this)
<p>u gave a problem in this code it gives me $(this).fadeIn() is not a function, any thoughts ?</p> <pre><code>$('img').hide().each(function(){ $(this).load(function(){ $(this).fadeIn(); }); }); </code></pre>
javascript jquery
[3, 5]
144,574
144,575
dropdownlist selected index changed in asp.net using C#
<p>I have 2 drop down list.</p> <ul> <li>First for city and</li> <li>second for state</li> </ul> <p>I want to fill the state list when the city is selected...</p> <p>I'm using the code</p> <pre><code>protected void Ddl_SelectedIndexChanged(object sender, EventArgs e) { String sqlQuery="select SM.StateI...
c# asp.net
[0, 9]
2,158,016
2,158,017
modifying global javascript variables and accessing them in the HTML
<p>I'm very new to fiddling with javascript - but here is what I'm trying to accomplish.</p> <p>I have code like such:</p> <pre><code> $('#numberItems').keyup(function () { var num = parseInt($(this).val()); var price = parseInt($('#price').text()); var.cost = num * price $('#total').text(c...
javascript jquery
[3, 5]
1,462,432
1,462,433
Which are your asp.net C# debugging wrappers
<p>Did not receive any exact answer, thus I would have to accept mine ... See code bellow</p>
c# asp.net
[0, 9]
1,173,522
1,173,523
move to given div using jquery
<p>In my html i have got div with given class.</p> <p>After clicking a button I would like to set the position to the top of that div. it may go the in smooth way . How can I do that ?</p> <p>thanks for help</p>
jquery asp.net
[5, 9]
666,193
666,194
When is better to use jQuery plugin instead javascript object?
<p>I was wondering in what circumstances should I write jQuery plugin instead javascript object?</p>
javascript jquery
[3, 5]
943,195
943,196
Countdown with jQuery
<p>So, I have this outputted from my DB: <code>00:01:53</code><br> Inside a span tag</p> <pre><code>&lt;span class="jb_timer"&gt;00:01:53&lt;/span&gt; </code></pre> <p>So my question is, how can I make it countdown with jQuery?</p> <p>Thanks.</p>
javascript jquery
[3, 5]
4,336,466
4,336,467
Create a sideshow/carousel navigation based on number of list items
<p>I am trying to create my sideshow nav based on the number of slides.</p> <pre class="lang-javascript prettyprint-override"><code>var navList = $('&lt;li class="cItem"&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/li&gt;'); var carouselItems = el.find('li'); for (var i = 0, len = carouselItems.length; i &lt; len; i++){ var...
javascript jquery
[3, 5]
1,076,990
1,076,991
How to check that this event would occur after DOM is ready in jquery?
<p>I want to get page_tag information from the page and want to make sure that DOM for this page is already ready before getting the page tag information. </p> <p>I am doing </p> <pre><code>$(document).ready( { alert("test"); var page_tag : $("head meta[name='page_tag']").attr('content'); page_tag : (page_ta...
javascript jquery
[3, 5]
1,759,077
1,759,078
Comparing shared_ptr to managed language references
<p>Could someone explain to a C++ programmer most important differences between Java (and C# as well) references and shared_ptr (from Boost or from C++0x).</p> <p>I more or less aware how shared_ptr is implemented. I am curious about differences in the following ares:</p> <p>1) Performance. 2) Cycling. shared_ptr can...
c# java c++
[0, 1, 6]
83,141
83,142
remove text in parentheses and the parentheses using .filter() or .slice()
<p>i have a table with code like this:</p> <pre><code> &lt;tr&gt; &lt;th scope="row"&gt;5-17&lt;/th&gt; &lt;td&gt;23.6 (22.0-24.0)&lt;/td&gt; &lt;td&gt;18.0 (17-20.0)&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th scope="row"&gt;Total 0-17&lt;...
javascript jquery
[3, 5]
5,347,429
5,347,430
transform jquery ajax into standard javascript
<p>Jquery is quite heavy and bloated. Unfortunately I do not know how to code "real" javascript.</p> <p>I have this code:</p> <pre><code>$(document).ready(function () { if(window.navigator.standalone){ $('a').click(function(e) { e.preventDefault(); $("body").load(this.href); });}}); </code></pre> <p>Could somebody ...
javascript jquery
[3, 5]
1,522,727
1,522,728
converting list to json format - quick and easy way
<p>Let's say I have an object MyObject that looks like this:</p> <pre><code>public class MyObject { int ObjectID {get;set;} string ObjectString {get;set;} } </code></pre> <p>I have a list of MyObject and I'm looking to convert it in a json string with a stringbuilder. I know how to create a JavascriptConverter a...
c# asp.net
[0, 9]
4,142,947
4,142,948
slideUp is not working
<p>following is my code. slideDown is working fine , but slideUp is not working. what is the mistake in my code.</p> <pre><code>var a=0; $(document).ready(function() { $("#login").click(function(){ if (a==0){ $("#banner").slideDown("slow"); a=1; } else { $("#banner...
javascript jquery
[3, 5]
1,128,161
1,128,162
Embed python code in PHP failed
<p>I want to embed python code in PHP. For that it ask me to install python package for PHP using pear installer by the command</p> <pre><code># pecl install python </code></pre> <p>when i run this command its failed install every time, showing the error message..</p> <pre><code>configure: error: Please specify path...
php python
[2, 7]
4,160,137
4,160,138
Android - editing multi column multi row file
<p>I have a file something like this</p> <pre><code> 192000: 812500 310500: 875000 384000: 875000 432000: 887500 486000: 912500 540000: 925000 594000: 937500 648000: 950000 702000: 975000 756000: 1000000 810000: 1012500 864000: 1037500 918000: 1062500 972000: 1087500 1026000: 11250...
java android
[1, 4]
3,121,442
3,121,443
Delete one row from DOM built table
<p>I have a table that is dynamically built using DOM. It has 10 cols, and on each row i have some data that i get from a websocket, text boxes and a submit button to add each row to the database.</p> <p>How can i remove a row after i submitted it?<br> Someone mentioned jQuery but can't figure it out how to do that.</...
javascript jquery
[3, 5]
557,753
557,754
JS: Posting form directly
<p>If on document.ready, I want my form to auto post itself, is this possible?</p> <p>So when the document has loaded, then it posts itself and takes to the action="" (in this case is ?upload=true).</p> <p>I heard about $.post() jquery, but this is just for posting in the background?</p>
javascript jquery
[3, 5]
4,372,258
4,372,259
Trying to get 1 day or 2min ago from a timestamp in JS
<p>Hi i want to auto convert timestamps to things like that :</p> <p>X min ago X hour ago X month ago</p> <p>But i dont know what to do after :</p> <pre><code>function getTimeAgo(timestamp){ var a = new Date(timestamp*1000); .. } </code></pre> <p>I'm new with javascript, does anyone has already coded that kind of...
javascript jquery
[3, 5]
418,015
418,016
Adding javascript functions to asp control
<p>iv'e got an asp button which performs another task besides postback </p> <p>i have done this by adding javascript code to the button as follows </p> <pre><code> if( !IsPostBack ) btn1.Attributes.Add("onclick", "f();"); </code></pre> <p>i'm not sure of 2 things </p> <p>the first :</p> <p>where ...
c# asp.net
[0, 9]
3,234,612
3,234,613
viewstate/databinding for gridview
<p>I have a gridview on my page that gets bound to user search results. There can be many pages upto say 1000. Each page shows 50 records. I have the built in paging turned on for the grid. I want to disable the viewstate on the grid but then I have to bind the results on every page load. (bind twice on paging). The se...
c# asp.net
[0, 9]
4,884,725
4,884,726
Using .append() with click()
<p>Hello i want to replace the text in div when user click on it i have tried this code but there is something wrong with my code </p> <pre><code>&lt;script&gt; $(document).ready(function(){ //alert('hi'); $('div').append('hi') $('div').click(function(){ $('this').append('how r u'); }) ...
javascript jquery
[3, 5]
920,890
920,891
Javascript error ( missing } )
<p>Just checking my JS and I have an error, but I cannot see where. WOnder if you can ?</p> <pre><code>$(document).ready(function(){ $('input').hover(function() { $(this).popover('show') }); $("#loginnow").validate({ rules:{ username:{ ...
javascript jquery
[3, 5]
2,460,896
2,460,897
9 patch image not working
<p>Here is the image: <img src="http://i.stack.imgur.com/zujDz.png" alt="Here is the image"></p> <p>It seem to be working fine in Eclipse, i.e. button is resized as expected and black bars are not shown. However in the emulator it shows up with black bars and stretched. </p> <p>Image is saved as <code>&lt;name&gt;.9....
java android
[1, 4]
1,756,818
1,756,819
trouble accessing working HTTPService from Android
<p>I have a working .Net WCF HTTP service. If I put the URL into I.E, FireFox, or google Chrome browsers, I get back the correct stream. But when I try to access that same service in an android app (running in Eclipse) I get a socketException with the detail message "Permission Denied". The service is running on my ...
java android
[1, 4]
2,969,420
2,969,421
master and content pages and jquery
<p>I want to use jQuery in my ASP.NET 3.5 website that uses master pages and content pages. How do I do document ready() functions for the child pages for those that will use jQuery ? Where do I put the code?</p> <p>I figured the jQuery declarations should go in the master page, but don't know how to make sure any jQu...
asp.net jquery
[9, 5]
2,122,889
2,122,890
Which is faster: input[type="checkbox"] or :checkbox?
<p>So which should I use to select elements? I'm using checkbox as just an example, this question refers to all form elements.</p> <p>Actually while we are at it, which of these are faster:</p> <pre><code>li:first </code></pre> <p>or </p> <pre><code>li:eq(0) </code></pre> <p>?</p>
javascript jquery
[3, 5]
4,932,292
4,932,293
Appending an object more than once using jQuery
<p>I have tried to write a very simple code of jquery to append an element. Here is an example code -</p> <pre><code>&lt;script type="text/javascript"&gt; var v=$("strong"); $(document).ready(function(){ $("button").click(function(){ $(".c1").append($ (v) ); }); ...
javascript jquery
[3, 5]
759,995
759,996
How to capture comments nodeType 8 in IE using JS/jQuery?
<p>I am trying to capture a specific commented line. The following code works ok for every browser except IE of course:</p> <pre><code>&lt;script&gt; var llf = jQuery('.select').contents().filter(function() { return this.nodeType === 8 // Comment node })[2].nodeValue.replace("LLF: ", "").trim(); console.log(llf); aler...
javascript jquery
[3, 5]
353,032
353,033
jquery not() not working as expected
<pre><code>&lt;div class="row"&gt; &lt;img src="images/image.png" width="30" height="30" alt=""/&gt; &lt;a href="#"&gt;View&lt;/a&gt; &lt;/div&gt; $(".row").not(".row a").click(function(){ // irrelevant }) </code></pre> <p>I can't figure out why this isn't working. I don't want to call the func...
javascript jquery
[3, 5]
6,030,609
6,030,610
How does javascript evaluate arguments?
<p>I write a simple javascript function to display a progressbar with the help of JQuery ProgressBar(<a href="http://t.wits.sg/misc/jQueryProgressBar/demo.php#" rel="nofollow">http://t.wits.sg/misc/jQueryProgressBar/demo.php#</a>)</p> <p>The progressBar function can be set to display different background images with d...
javascript jquery
[3, 5]
56,030
56,031
Question about select all H3 inside DIV
<p>Wouldn't this work if I want to apply a new class to all H3 tags inside the RelArtik div?</p> <pre><code>$("h3",$("#RelArtik")).addClass("underrubrik"); </code></pre> <p>Thanks.</p>
javascript jquery
[3, 5]