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
597,233
597,234
JQuery: Comparing date entered in textbox against today's date
<p>How do i make a check whether a date entered in a text box is greater than today's date? Format retrieved from text box e.g. 14/05/2013</p>
javascript jquery
[3, 5]
3,565,643
3,565,644
how to execute a series of animations one after another using jquery?
<p>This will animate the second image after the first animation is complete: </p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function () { $('#image1').show("slide", { direction: 'left' }, 1000, function() { $('#image2').show("slide", { direction: 'left' }, 100...
javascript jquery
[3, 5]
3,620,746
3,620,747
Failing to link button to intent
<p>When i try this code which reads what the user has clicked and compares it to the button name it only seems to work for one array rather then the 2nd one. If anybody can see why please help me </p> <pre><code> case R.id.new_button: final CharSequence[] items = {"N", "E", "M", "G"}; Al...
java android
[1, 4]
5,555,585
5,555,586
Simple JQuery click-and-show doesn't work
<p>I'm using this simple bit of JQuery to show/hide a div by clicking on the link, I've used the same code a few times before and it worked perfectly but now all of a sudden it refuses to work.</p> <p>JQuery is properly included and the page doesn't give a Javascript error (or any other error for that matter).</p> <p...
javascript jquery
[3, 5]
5,450,789
5,450,790
JQuery - also trigger change on click away
<p>I have a basic JQuery script that changes a few divs when you click - thus showing them - via toggle.</p> <pre><code>&lt;script type="text/javascript"&gt; $('#content_display').click(function() { $(this).toggleClass('selected'); $('#content_display_selector_container').toggle(); }); &lt;...
javascript jquery
[3, 5]
2,842,965
2,842,966
jQuery / Javascript replace function only works once
<p>I have a button as such</p> <pre><code>&lt;button id="toggle_photo"&gt; &lt;span id="photo_text"&gt;Hide Photos (1)&lt;/span&gt; &lt;img class="icon" alt="Photos" src="/img/photos-16.png"&gt; &lt;/button&gt; </code></pre> <p>And jQuery / Javascript to change the text upon clicking</p> <pre><code>$('#toggle_photo'...
javascript jquery
[3, 5]
1,142,218
1,142,219
How do you handle with control binding in jquery
<p>I have a question about jquery and DOM manipulation. How do you handle with DOM controls for e.g.</p> <p>I have to get value from text input so I could this in ways:</p> <pre><code>var SomeClass = function() { var control; this.setControl = function(c) { control = c; } this.getValue = fun...
javascript jquery
[3, 5]
5,346,600
5,346,601
JQuery - Add Selected Elements Together - Combine Child Slectors
<p>I would like to combine my Selector that selects an Element based on an mouseover Event. This is what I have so far.</p> <pre><code>parentItem.mouseenter(function () { var childItems = $(this).add(this + "li:first"); childItems.show(); }); </code></pre> <p>I understand that I can't use 'this' by itself nor...
javascript jquery
[3, 5]
4,354,891
4,354,892
Is it possible to add JavaScript after page load and execute it
<p>Say I have a JavaScript function that is inserted into the page after page load how can I then call that function. For example lets keep things simple. Say I make an Ajax call to get the markup of the script and the following is returned:</p> <pre><code>&lt;script type="text/javascript"&gt; function do_something() ...
javascript jquery
[3, 5]
4,537,458
4,537,459
JQuery: Help with $("#div")
<p>I just started using JQuery, as such, I'm cleaning up old code of mine to use JQuery throughout.</p> <p><strong>Question</strong>: How would I convert the following code to use JQuery?</p> <pre><code>// enable the other link document.getElementById("asc").setAttribute("href", "#"); document.getElementById("asc").o...
javascript jquery
[3, 5]
3,760,486
3,760,487
Combat system in JQuery
<p>i would like to create a pretty simple combat system in JQuery, for a browser game. The idea is that i have combat statistics ( i already have that ), and i want to represent them back to the user in a nice graphical manner.</p> <p>If you have played the game shakes and fidget, you can already see what i'm asking. ...
javascript jquery
[3, 5]
4,784,531
4,784,532
finding the index of an element in relation to a specific parent
<p>Looking at the example here - <a href="http://jsfiddle.net/uqYeQ/3/" rel="nofollow">http://jsfiddle.net/uqYeQ/3/</a></p> <p>The first row behaves as expected, returning the index of the div within it's parent. </p> <p>I'd like the 2nd row to behave in the same way, I'd like it to return between 0 and 4 depending o...
javascript jquery
[3, 5]
3,375,288
3,375,289
How to Check whether Session is Expired or not in asp.net
<p>i ve specified the session time out in web.config file..when the session is timeout im not getting redirect to login page but i am geting error saying object reference not set to an instance.</p> <p>can any one tell me the solution for this?</p>
c# asp.net
[0, 9]
1,096,390
1,096,391
Android browser in background
<p>I am developing a web page for android browser. The page will authenticate users. I placed an iframe that will refresh every 10 minutes to keep the user logging while the page is open. However if the user switch to another application placing the web browser in the background, the refresh to keep logged in stops. So...
android asp.net
[4, 9]
5,299,435
5,299,436
Javascript slider not working or outputting anything to browser
<p>Im triyng to work with the basic jquery slider only for some reason I cant get it to work.</p> <p>When I say it wont work, nothing shows up, none of my images nor text, and nothing is output in my error console. </p> <p>Ive created a fiddle to show you an example</p> <p><a href="http://jsfiddle.net/FYzqq/" rel="n...
javascript jquery
[3, 5]
1,887,085
1,887,086
ASP programmer thinking about learning PHP
<p>What's the best way to go about learning PHP when I've been doing ASP/ASP.NET? I'm not sure it's worth the time, but there seem to be so many projects doing it..</p> <p>What do you think? Anyone crossed the worlds? How did you do it?</p>
c# php asp.net
[0, 2, 9]
5,858,405
5,858,406
Auto-refreshing content (using template engine) using jQuery
<p>I'm looking for a way to use jQuery with a script index.php that is built bit-by-bit using a template engine, like so:</p> <pre><code>&lt;?php global $template; page_header(); // Calls and displays header.html $template-&gt;load('body', 'index.html'); // Loads index.html and calls it 'body' *Code that assigns ...
php javascript jquery
[2, 3, 5]
2,262,765
2,262,766
Dynamically add Button to Panel
<p>I am adding a RadButton dynamically to a Panel. So I am creating the button as so:</p> <pre><code> RadButton btnAwesome = new RadButton(); btnAwesome.AutoPostBack = true; btnAwesome.Text = "Click me..."; btnAwesome.ID = "LinkButtonTest"; btnAwesome.Click += new System.EventHan...
c# asp.net
[0, 9]
701,715
701,716
JQuery Function Do something - Pause - Do something else
<p>I am creating a function where I could execute some jquery code ...then pause for say... 5 secs and then execute something else..</p> <p>Something like this:</p> <pre><code>function myFunc() { var str1 = 'This is the starting text'; var str2 = 'This is the ending text'; $("#label").html(str1)...
javascript jquery
[3, 5]
3,769,556
3,769,557
How do I parse the free format address to save into the DataBase
<p>I have a text area that allow user the type in an address in free format, how do I parse the address user entered into address1, address2, city, state, zip and country and save into DB?</p>
c# asp.net
[0, 9]
192,830
192,831
Float with either comma ',' or '.'
<p>I am experiencing a problem in Asp.net using C# when converting a string to float. At a local database, it works fine with '.' notation for float values but it does not work after uploading the website to the server. I think the server only understands ',' instead of '.'</p> <p>I remember I read this somewhere that...
c# asp.net
[0, 9]
2,051,109
2,051,110
asp.net c# is checkbox checked?
<p>How do I determine if the checkbox is checked or not checked? Very perplexed why this is not working - it is so simple!</p> <p>On my web form:</p> <pre><code>&lt;asp:CheckBox ID="DraftCheckBox" runat="server" Text="Save as Draft?" /&gt; &lt;asp:Button ID="PublishButton" runat="server" Text="Save" CssClass="publish...
c# asp.net
[0, 9]
3,823,088
3,823,089
Load list of image from folder
<p>I have a folder of images, from 10 to 200, a webpage, a jquery fade and a php script that read folder full of images</p> <p>Is there any way to make the php script scan a folder, get a list of image (in an array ?) and pass it to jquery script ? (first question)</p> <p>Now, i can make a xml file from the result ph...
php javascript jquery
[2, 3, 5]
5,200,185
5,200,186
android - best way to get a phone number with a name string such as "Bob"
<p>Goal: take results from recognizer stating a name in contacts, then dial their #.</p> <p>Is their an intent that will do this without a page of code??</p> <p>I have no hair left , as I have spent too much time reading/etc... PLEASE help??</p> <p>Update: I have learned basically to query base contact records with ...
java android
[1, 4]
61,665
61,666
jQuery - scroll down every x seconds, then scroll to the top
<p>I have a scrollable div that I want to scroll down 50 pixels every X seconds. That's fine and working.</p> <p>I also have a seperate function that scrolls the div back to the top when it reaches the bottom. Also fine; working.</p> <p>Now, I need to combine the two so the scrolldown is ignored until we have scrol...
javascript jquery
[3, 5]
5,538,112
5,538,113
Why is JavaScript called JavaScript, if it has nothing to do with Java?
<p>Since JavaScript is not derived from Java, why does it have "Java" in the name?</p>
java javascript
[1, 3]
5,868,503
5,868,504
Button back to main screen not working
<p>This problem I got is a little hard to explain but I simplify and make it as easy as possible. <br /> <br /> The Statement: <br /> As it is obvious in the following picture ,there are 9 divs which is sensitive to click and when you click in any of them another screen appears which is also obvious in second picture d...
javascript jquery
[3, 5]
5,695,971
5,695,972
Change dates inside span to match user's timezone
<p>I have this function:</p> <pre><code>function get_time_zone_offset() { var current_date = new Date(); return -current_date.getTimezoneOffset() / 60; } </code></pre> <p>I want a jQuery code to change every span which class is 'timeago' title value to its value plus the number the function above retur...
javascript jquery
[3, 5]
1,063,881
1,063,882
Can I use a string as an Id?
<p>Still a Noob at Android Development.. So here's My Code</p> <pre><code>for(int i=1;i&lt;=6;i++){ for(int j=startat;j&lt;=7;j++){ String constring = "r" + i + "c" + j; //TextView dtv = (TextView) findViewById(R.id.constring); #commented this out } } </code></pre> <p>Is there a way I could us...
java android
[1, 4]
5,531,126
5,531,127
Mediaelementjs Is not working
<p>I am using Mediaelementjs.js for player. i have to play multiple song on a page and all the songs are coming dynamically. and there are multiple player on the page that is one for each song. and i have to play the song on click of a image not on the click of player button because the players are hidden. on image cli...
javascript jquery
[3, 5]
2,546,196
2,546,197
Javascript confirm without code in code behind
<p>I have a page with dynamically added imagebuttons, and i want them to send a confirm when you click them(for deletion).</p> <p>Since they are dynamic i cant code anything in a .click event.</p> <p>Hows the best way to do this? check if true or false and then send it to a delete function in code behind with the con...
javascript asp.net
[3, 9]
4,062,206
4,062,207
Calling a function as soon as an element is encountered
<p>Suppose I have an element on my page with id "some_id". I want to call a function as soon as I encounter this element. Something like following.</p> <pre><code>$("#some_id").call_a_function(function () { // do stuff }); </code></pre>
javascript jquery
[3, 5]
1,222,164
1,222,165
Jquery Change event for input and select elements
<p>I am trying to alert something when ever a drop down box changes and when ever something is typed into an input. I don't think I can use change for input fields? What would you use for input fields? Also, what about input fields of type file? Same thing. Here is what I have so far and its not working:</p> <pre><cod...
javascript jquery
[3, 5]
2,424,309
2,424,310
Best Books that shows how to use jQuery with ASP.NET
<p>I have searched the stackoverflow site to find if someone has recommended any good books that show how jQuery can be used with asp.net. All the threads lead to only good jQuery books. </p> <p>Can anyone recommend me a good book that shows how to use jquery with asp.net? Any upcoming books are also ok</p>
asp.net jquery
[9, 5]
3,530,803
3,530,804
window.scrollBy fires before hash/anchor scroll in Chrome and Safari
<p>Here's a frustrating problem. I use the following in script inside of a jQuery load block:</p> <pre><code>window.scrollBy(0,-100); </code></pre> <p>I do it because I set a div to be fixed at the top of the page through scrolling, and this line will compensate so that the anchor you've clicked to (http://page.html#...
javascript jquery
[3, 5]
4,486,076
4,486,077
How to organize Javascript and AJAX with PHP?
<p>My javascript is getting out of hand for my PHP application. I have 20 tags that link to various javascript files in a javascript folder. Each javascript file basically controls one element on the DOM. And, if the javascript file uses AJAX, then it will have a corresponding PHP file that the AJAX will call.</p> <p...
php javascript jquery
[2, 3, 5]
1,496,038
1,496,039
How to make web site menus
<p>I want to make a menu on my website.<br> If I move my mouse on it, the menu strip and its item will appear; if I move out of the menu the items disappear and only the menu name will remain. Using visual web developer 2008 express edition and c#.<br> Can any one help me?</p>
c# asp.net
[0, 9]
2,813,374
2,813,375
Add a calendar event using a webpage button via webview
<p>I want to use a webview to pull up a page and on it is a label of an event and a button that says add to calendar. When pushed it will add the details of the event to the google cal on the android phone. </p> <p>I am attempting to use content values but with no luck as of yet. This is what I have but I am open for ...
java android
[1, 4]
2,312,161
2,312,162
How do I get the browser scroll position in jQuery?
<p>I have a web document with scroll. I want to get the value, in pixels, of the current scroll position. When I run the below function it returns the value zero. How can I do this?</p> <pre><code>&lt;script type="text/javascript" src="js/jquery-1.7.2.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js...
javascript jquery
[3, 5]
4,280,960
4,280,961
textbox required equal false
<p>how do I make the textbox that required equal to false in this code </p> <pre><code>$(document).ready(function () { $("#&lt;%= chkSpecialIntegration.ClientID %&gt;").click(function () { if (this.checked) { $("#&lt;%= ddlTypeSpecialIntegration.ClientID %&gt;").show(); ...
c# javascript
[0, 3]
4,331,123
4,331,124
Android application : how to manage handwriting input?
<p>I just want to know if there is some existing libraries to manage handwriting input/recognition? I want to develop an application in which the user could write his text with a srylus, and not with a keyboard. I did research on Google and didn't find anything efficient for that.</p> <p>Thank you, </p>
java android
[1, 4]
3,181,789
3,181,790
Show a random quote on asp.net web page
<p>I'm working on an ASP.NET (C#) web project that is using master pages.</p> <p>I'm looking for an easy way to display a random customer quote each time a page is loaded. </p> <p>Since this is a fairly simple web project I'd like to stay away from storing the quotes in a database. Currently there is no database conn...
c# asp.net
[0, 9]
5,901,512
5,901,513
3d games in android
<p>i want to create 3d games for android but i don't have any information about that. i want to do this in most advanced way like big companies. "most advanced way" means i don't use simple tools that rapidly return result but there is no way to creativity and CREATION. I need an standard way with complete resources an...
java android
[1, 4]
4,162,256
4,162,257
Difference Between commit and apply in Android SharedPreferences
<p>SharedPreferences are used to save Application data in Android.</p> <p><code>commit()</code> and <code>apply()</code> both are used to save the changes in the shared preferences.</p> <p>As mentioned in Android Library:</p> <pre><code>public abstarct void apply(): </code></pre> <blockquote> <p>Unlike commit(), ...
java android
[1, 4]
2,630,611
2,630,612
use javascript variable into python Block
<p>I want to use JavaScript variable into python Block.</p> <pre><code>&lt;script&gt; $(document).ready(function() { $("#WO_cpp_id").change(function() { id = this.selectedIndex; ajax('{{=URL(r=request,f='get_CIs',vars={'CPP_Id':'#here I want to use id variable')}}', ['WO_cpp_id'], 'WO_ci_id'); }) .change(); }...
javascript jquery python
[3, 5, 7]
2,636,237
2,636,238
jquery mouseenter fires continuosly
<p>I have a mousenter/mouseleave function that swaps out content when the element is being hovered over. however instead of it firing only on mouseenter it seems to keep continuously firing. I have created a jsfiddle <a href="http://jsfiddle.net/NCR4m/9/" rel="nofollow">here</a> so hopefully it will be easier to unders...
javascript jquery
[3, 5]
3,323,754
3,323,755
Jquery show img title in span
<p>I want show the image title in a span tag, I use this code, but there has nothing show in the span tag.</p> <pre><code>&lt;script type="text/javascript" src="jquery-1.4.2.min.js" &gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; jQuery(document).ready(function( { $('#thumb ul li a img').fadeIn(function() { ...
php jquery
[2, 5]
3,341,209
3,341,210
How to tell JavaScript to do nothing?
<p>I have a small chunk of code, like this:</p> <pre><code>$("div.footerMenu li").click( function () { $("div.onScreen").hide(); $(this).children("div.onScreen").fadeIn('fast'); },function(){ $("div.onScreen").hide(); });//click </code></pre> <p>And when I click on &lt; li > the di...
javascript jquery
[3, 5]
1,246,672
1,246,673
java.text.parseexception unparseable date in android
<pre><code>String dt=mDateButton.getText().toString(); String tm =mTimeButton.getText().toString(); try { String format ="dd-MM-yyyy hh:mm a"; DateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.ENGLISH); String v_date_str = dt + " " + tm; // String setDate =sdf.format(dt ...
java android
[1, 4]
5,392,008
5,392,009
jQuery 1.2.6 caching
<p>I'm doing quite a bit of DOM manipulation in my app, adding new nodes, and I've found that the children() function can get out of sync. I've got a tbody element with two rows, I use the children() function on this to do some manipulation with these rows. I then add two more rows to the tbody, when I use the children...
javascript jquery
[3, 5]
2,008,353
2,008,354
javascript variable in quoted php code in javascript
<p>the title sounds weird, but here's my question. I am making this loop in Javascript that needs to call PHP variables. </p> <pre><code> var data = new Array("&lt;?php echo count($result) ?&gt;"); for (var i=0; i &lt; "&lt;?php echo count($result) ?&gt;"; i++) { data[i] = "&lt;?php echo $result[i] ?&g...
php javascript
[2, 3]
1,191,794
1,191,795
Jquery autocomplete .NET WebMethod
<p>I have Jquery autocomplete working with a HttpHandler - .ashx file. It works fine, I am wondering is there an easy way to use the autocomplete with a [WebMethod] right in the code behind - and are there any advantages to this? </p>
c# jquery asp.net
[0, 5, 9]
2,200,825
2,200,826
stop() before a highlight is causing the color to not reset
<p>I have the following:</p> <pre><code>$('#list_item_title', this).stop().effect('highlight', {color: '#8DD2F7'}, 700); </code></pre> <p>This occurs when a user tries to submit with 0 input.length. If the user presses enter several times, the highlights stack up which is why I added stop. Problem now is that the ani...
javascript jquery
[3, 5]
3,575,149
3,575,150
Design tool for ASP.Net Pages
<p>I am looking for some tool so that I can design my web pages(layout, color etc...). Does anything exist like that? (Other than Visual Studio, Dreamweaver...) (I dont want to write css for now)</p>
c# asp.net
[0, 9]
714,883
714,884
How do i manipulate select box using jquery?
<p>I have some select boxes like the following:</p> <pre><code>&lt;select id="my_box1" rel="cal_10"&gt; &lt;option value="A"&gt;&lt;/option&gt; &lt;/select&gt; &lt;select id="my_box2" rel="cal_10.50"&gt; &lt;option value="A"&gt;&lt;/option&gt; &lt;/select&gt; .... &lt;select id="my_boxn"&gt; &lt;option ...
javascript jquery
[3, 5]
5,764,036
5,764,037
Can't add listeners to CalendarView events
<p>There is the following code:</p> <pre><code> final CalendarView calendarView=(CalendarView)layout.findViewById(R.id.calendarView); calendarView.setClickable(true); calendarView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Toas...
java android
[1, 4]
3,131,552
3,131,553
Convert separator to enter character
<p>My SQL query retrieves one row of multiple columns. I have stored that in string with '|' separator to differentiate between columns.</p> <p>And then prints that string in <code>&lt;textarea&gt;</code> field of <code>.aspx</code> page. </p> <p>My question is there any way in which after that | separator next colum...
c# asp.net
[0, 9]
2,824,576
2,824,577
change image url during runtime
<pre><code>&lt;asp:Image id="voteaccepeted" ImageUrl="~/UserControls/Vote/Images/before_accept.png" runat="server" class="vote-accept" /&gt; </code></pre> <p>i want to change image url during run time</p> <pre><code>if( bestanswer == true) { // change url.. } </code></pre> <p>how i do it.</p>
c# asp.net
[0, 9]
2,499,061
2,499,062
jquery binding a key value pair
<p>Hi I am using spring mvc in my application. The service returns a json response like,</p> <pre><code>[ { "Key1": "value1" } ] </code></pre> <p>I need to bind only the value part from the response to a drop down list in a jquery dialog. i use an AJAX call to get the list of items and bind it. But it binds the whole...
javascript jquery
[3, 5]
4,403,065
4,403,066
templating/partials with jquery?
<p>I want to generate something similar to a facebook wall type effect and everytime a post is created the wall is updated. I have built out how i would like the css/html to look with php but i want to do it through ajax now.</p> <p>My question- Is their such a thing as jquery partials? like a view i can push into my ...
javascript jquery
[3, 5]
4,027,214
4,027,215
jQuery + setTimeout() + clearTimeout() not working in IE7 & 8
<p>This works in Firefox and Chrome but not in IE.</p> <p>In Internet Explorer the timers are not being cleared out and it appears each time update_slideshow() is called a new timer is created.</p> <pre><code>// slideshow params var currentSlide = 1; var numSlides = 4; var pause = false; function pause_show(bool){ ...
javascript jquery
[3, 5]
1,767,999
1,768,000
sharing a js functions between code in 2 files
<p>My jquery code is divided file is divided over 2 files. </p> <p>In one of the file, I define a function</p> <pre><code>function something(input){ //does something } </code></pre> <p>calling this function only works when the caller line is in the same file. But I need to call it from both files. </p> <p>If I sw...
javascript jquery
[3, 5]
3,532,066
3,532,067
automatic scroll down on search
<p>I have a jsp page in which there are some contents which are hidden.</p> <p><code>onclick</code> of the search button I have displays much content.</p> <p>But I want an automatic scroll down so that user doen't have to take the burden to scroll down.</p> <p>I hope I was</p>
javascript jquery
[3, 5]
3,294,642
3,294,643
Pass a javascript variable to html. jQuery
<p>I have a variable in Javascript: </p> <pre><code>var test ="whatever" </code></pre> <p>I just want to pass this variable inside a hidden input:</p> <pre><code>&lt;input type="hidden" class="myinput" value=""&gt; </code></pre> <p>I tried:</p> <pre><code>$('.myinput').attr('test'); </code></pre> <p>But it does n...
javascript jquery
[3, 5]
4,184,996
4,184,997
Javascript / jQuery flick between two images
<p>I'm struggling with the timer part. I can replace one image with another easily with javascript by calling the function. What I want to be able to do is set a timer to sit and change the images at a specific interval (say 1 second).</p> <p>I've used jQuery to refresh an image every second before, but when I try a...
javascript jquery
[3, 5]
4,971,721
4,971,722
Height div and image
<p>i have a problem with a div height. I have an image in a left div "image_view" and the height of this div is dinamically based on image. On the right side I have a div with some informations. This div must have the same height of the image_view div. how can I do it? This is my code now.</p> <pre><code>&lt;div id="i...
php jquery
[2, 5]
134,129
134,130
Call a function only once
<p>I've 3 divs (<code>#Mask #Intro #Container</code>) so if you click on Mask, Intro gets hidden and Container appears. The problem is that I just want to load this only one time, not every time I refresh the page or anytime I click on the menu or a link, etc.</p> <p>How can I do this?</p> <p>This is the script I'm u...
javascript jquery
[3, 5]
2,271,225
2,271,226
Javascript execute timer function only if window is in focus?
<p>Say I have two separate browser windows open:</p> <pre><code>function onload() { setTimeout("dosomething", 2000); } function dosomething() { $.ajax({ url: "someurl", success: function (data) { document.write("Hello"); } }); setTimeout("dosomething", 2000); } </co...
javascript jquery
[3, 5]
2,028,715
2,028,716
android reading user input in a service
<p>I want to write an android app that would be a background service that would listen for either a specific gesture or key press in the and then trigger an action. Is it even possible to do such a thing with a service? If so could someone guide me the right direction. I have search high and low can could seem to fi...
java android
[1, 4]
2,764,019
2,764,020
Jquery, to set the display of an element width to block
<p>I'm looking to code the jquery to set the display of an element width id "results" to block?</p> <p>Not sure if it's right, sorry im new to programming, help will be appreciate, thank you.</p> <pre><code>$(document.ready(function(){ $('results').width(display:none;); }) </code></pre>
javascript jquery
[3, 5]
1,206,729
1,206,730
jquery attached event with class execute more than once
<p>I have some div`s with same class say:</p> <pre><code>&lt;div id="1" class="same"&gt;..&lt;/div&gt; &lt;div id="2" class="same"&gt;..&lt;/div&gt; &lt;div id="3" class="same"&gt;..&lt;/div&gt; </code></pre> <p>I attach eventhandler all div :</p> <pre><code>$(".same").live({mouseenter : function{ /*code*/ },mouseou...
javascript jquery
[3, 5]
913,387
913,388
How can I edit JS from browser?
<p>Suppose I get, on a page, this simple html/script :</p> <pre><code>&lt;a id="hey" href="#"&gt;try&lt;/a&gt; var myvar=false; $('#hey').click(function () { if(myvar) { alert("Well! You change it!"); } }); </code></pre> <p>clicking on the link, I won't never get the alert show up! So, how can I...
javascript jquery
[3, 5]
138,339
138,340
to get checked items from listview and store it in array
<p>I am new to android..please help me. how to get the checked items from listview and store it an array and display it in another listview in the next layout in the same activity?pls help....</p>
java android
[1, 4]
4,407,432
4,407,433
Extend custom System.Web.UI.Page implementer to include custom property than can be accessed by page and master page
<p>I have created a class called BasePage which inherits System.Web.UI.Page. On this page I've declared a property called UserSession which I want to be able to access from any Page/MasterPage. </p> <pre><code>public class BasePage : System.Web.UI.Page { string UserSession { get; set; } public BasePage() ...
c# asp.net
[0, 9]
4,909,757
4,909,758
sort a dictionary (or whatever key-value data structure in js) on word_number keys efficiently
<p>how do I sort a dictionary by key like</p> <pre><code>dict["word_21"] = "Hello Java"; dict["word_22"] = "Hello World"; dict["word_11"] = "Hello Javascript"; </code></pre> <p>so that I get </p> <pre><code>dict["word_22"] = "Hello World"; dict["word_21"] = "Hello Java"; dict["word_11"] = "Hello Javascript"; </code>...
javascript jquery
[3, 5]
4,390,017
4,390,018
Java: Do global variables save memory and/or time?
<p>I am working on an Android app and a method I am writing might get called a bunch of times. In this method I am making updates to the user interface. Memory use and performance are important to me. The way I see it, I have 2 options for making the UI changes. </p> <p>The first is to makes new objects every time. Th...
java android
[1, 4]
474,044
474,045
How read a local xml file in android
<p>I am trying to read a local xml file from res/xml/myxml.xml This is the xml,</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;Books&gt; &lt;Number id ="1"&gt; &lt;Description&gt;This is science book. &lt;/Description&gt; &lt;/Number&gt; &lt;Number id = "2"&gt; &lt;Description&gt;T...
java android
[1, 4]
1,173,969
1,173,970
Change viewpager item based on click event of viewpagerindicator icon
<p>I am using Viewpager and viewpagerindicator to display some content. Currently if we swipe the indicator selected item will change. But I want the vice versa i.e when I click on circle I need to change viewpager item.</p> <p>Here is the code</p> <pre><code> &lt;android.support.v4.view.ViewPager android:id="@+i...
java android
[1, 4]
4,134,832
4,134,833
Nothing happens when using Regex in asp.net
<p>Regex really does nothing if i run this code: input contains: "geeeeekdldn" </p> <pre><code>Regex.Replace(input, @"g(.|\n)*?n", string.Empty); </code></pre> <p>normally after regex the value of input is "" but i still get "geeeeekdldn" can someone help me please</p>
c# asp.net
[0, 9]
2,927,878
2,927,879
Select value of a RadioButton
<p>I want to select a particular RadioButton based on its value</p> <pre><code>&lt;input id="RadioJ" type="radio" name="grp1" value="AAA" /&gt; &lt;input id="FaroK" type="radio" name="grp1" value="BBB" /&gt; &lt;input id="MartreLK" type="radio" name="grp1" value="CCC" /&gt; </code></pre> <p>Something like this:</p> ...
javascript jquery
[3, 5]
2,586,513
2,586,514
Android HTTP request
<p>In my app I need a feature that means users can email me by filling in a field. This sends via a HTTP request to a PHP script on my server. This then grabs the message and emails me.</p> <p>What I need to be able to do if it is even possible is to have a way for the PHP script to confirm that the request originates...
java php android
[1, 2, 4]
3,862,560
3,862,561
Error when exporting data to PDF from C#
<p>I am writing a PDF file from C# like this:</p> <pre><code>Response.ContentType = "application/vnd.pdf"; Response.AddHeader("content-disposition", "attachment;filename=test.pdf"); Response.Write("&lt;table border='1px'&gt;"); /* Print Headers */ Response.Write("&lt;tr&gt;"); Response.Write("&lt;th colspan='" + cols...
c# asp.net
[0, 9]
3,154,780
3,154,781
Get Phone Number in Android SDK
<p>Is there a way to get the phone that is running my app's number within the app?</p>
java android
[1, 4]
3,318,888
3,318,889
jQuery's dialog plugin
<p>What's the point of storing the ui-dialog-title object in the uiDialogTitle variable, if the variable is never used anywhere in code?</p> <pre><code> uiDialogTitle = $('&lt;span&gt;&lt;/span&gt;') .addClass('ui-dialog-title') .attr('id', titleId) .html(title) ....
javascript jquery
[3, 5]
3,629,037
3,629,038
How can I intercept the F5-button-clicked event using jQuery?
<p>I want to implement keyboard shortcuts using jQuery.</p> <p>Specifically, I want to fire an event when e.g. F5 is clicked.</p> <p>What kind of issues do you run into with keyboard shortcuts?</p> <p><b>Also, any online chart that has all the keyboard mappings to numbers?</b></p>
javascript jquery
[3, 5]
90,850
90,851
How to create an instance of an object in c#
<p>Greeting for the day!</p> <p>I have a question in my mind and looking for answer from some days. If my understanding is correct then only diff between Instance and object is :-</p> <p>instance means just creating a reference(copy) .</p> <p>object :means when memory location is associated with the object( is a run...
c# asp.net
[0, 9]
2,521,334
2,521,335
getLocationOnScreen crashes, pls help
<p>I need to get the coordinates of my app on screen to use them as an offset for a popout.</p> <pre><code> View tempView = (View) findViewById(R.layout.main); int[] loc = {0,0}; tempView.getLocationOnScreen(loc); /// crashes here! </code></pre> <p>Tried this...
java android
[1, 4]
5,391,788
5,391,789
What is different between HttpCacheability.NoCache and Response.CacheControl = "no-cache"?
<p>what is the different between the two lines below? :</p> <pre><code>Response.Cache.SetCacheability(HttpCacheability.NoCache); </code></pre> <p>and</p> <pre><code> Response.CacheControl = "no-cache"; </code></pre>
c# asp.net
[0, 9]
4,531,990
4,531,991
jquery unbind toggle event don't work
<p>i have a div element generate in runmode by javascript I want first click show confirm message and next click remove click event but die or unbind don't work!</p> <pre><code>$('div').live('click',function(e) { $(this).toggle(function () { $(this).html("I'm sure!"); return false; ...
javascript jquery
[3, 5]
5,270,051
5,270,052
Howcome refreshing my web app with F5 is extremely slow and hangs, while hitting enter on the address bar refreshes the page instantly?
<p>I have a web page which uses in PHP and a jQuery DataTable to show data from a database.</p> <p>When I enter the URL and hit enter, the page loads instantly, and I can do this repeatedly and the page keeps loading instantly.</p> <p>However, when I hit F5, the page goes blank and hangs, it is trying to load the pag...
php javascript jquery
[2, 3, 5]
1,898,987
1,898,988
How to get the class names using jquery?
<p>Hey, I'm wondering how I can get the class names dynamically using jquery for the script below.</p> <p>The HTML output looks like this:</p> <pre><code>&lt;div id="main-info-1" class="maini"&gt; &lt;p&gt;this is a paragraph.&lt;/p&gt; &lt;/div&gt; </code></pre> <p>So, I'm trying to get the class name dynamica...
javascript jquery
[3, 5]
1,583,314
1,583,315
Unable to Get Ip address of the http request : Asp.Net [C#]
<p>I have a page, on which a request from other website drops in. I want to track IP address where the request is coming.</p> <p>I am using Asp.Net C# &amp; used three methods</p> <pre><code>1) httpRequest.UserHostAddress </code></pre> <p>Tried Http Server variables as </p> <pre><code>2) httpRequest.ServerVariabl...
c# asp.net
[0, 9]
3,309,238
3,309,239
How to open on click and dynamically pull in modal.html files
<p>I have:</p> <pre><code> $(function () { $('&lt;div&gt;').dialog({ modal: true, open: function () { $(this).load('Modal_ConfirmEmail.html'); }, width: 640, }); }); </code></pre> <p>and I need that to open when I click on test</p> <p>...
javascript jquery
[3, 5]
1,765,054
1,765,055
Reading selected value of dropdown list in HTML by jQuery
<p>I am trying to read the value of the selectedID in a drop down list in html through jQuery but it keeps producing an error. Did I miss something?</p> <pre><code>&lt;select style="width: 80px;" class="text ui-widget-content ui-corner-all" id="metaList"&gt; &lt;option value="4d5e3a8c418416ea16000000"&gt;Wikipedia&lt;...
javascript jquery
[3, 5]
5,758,283
5,758,284
Backslash '\' in console.log() not appearing
<p>I'm trying to use a back slash in <code>console.log()</code> and within <code>&lt;p&gt;&lt;/p&gt;</code> but it seems that when the page loads, all back slashes are removed.</p> <p><strong>Example JS</strong></p> <p><code>console.log('\m/ Lets rock. \m/');</code></p> <p><strong>Result</strong></p> <p><code>m/ Le...
javascript jquery
[3, 5]
3,114,524
3,114,525
Breakpoint not triggers in Broadcast Receiver
<p>The title of the question pretty much sums it all, I want to debug my code in Broadcast Receiver but the break-point doesn't triggers, I am executing my android application from <strong>Debus As --> Android Application</strong>. Please help!</p> <p>[edit]</p> <p>Here is my Broadcast Receiver code:</p> <pre><code>...
java android
[1, 4]
5,710,125
5,710,126
How to restrict repeater rows in asp.net
<p>i have a asp.net repeater control .I have to display only two rows in the repeater .but my dataset has 10 rows ..is there a way to restrict the number of rows of a repater ?</p>
c# asp.net
[0, 9]
4,123,045
4,123,046
Append a dot to element every interval
<p>I have a simple 'processing' <em>dot wait... dot wait.. dot wait..</em> for when a user submits a form.</p> <p>I thought this could be accomplished quite easily with something like</p> <pre><code>&lt;h2&gt;Processing&lt;/h2&gt; </code></pre> <p>and</p> <pre><code>$(document).ready(function(){ setTimeout($('h2...
javascript jquery
[3, 5]
4,519,714
4,519,715
How to call JQuery CheckBox Changed Event inside a Jquery Accordion Header?
<p>Thanks for all your valuable responses to the questions that I have asked before, those suggestions helped me a lot. I have one more question here. I am using a JQuery accordion control in my page,and the accordion header contains a checkbox, Based on the checkbox selection, I need to retrieve some date from the DB....
c# jquery asp.net
[0, 5, 9]
3,552,917
3,552,918
Open a new window using PHP
<p>Is there any way to open a new window or new tab using PHP without using JavaScript.</p>
php javascript
[2, 3]