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,354,791
1,354,792
How can this Javascript be expressed more succinctly?
<p>I have some Python code that I'm porting to Javascript:</p> <pre><code>word_groups = defaultdict(set) for sentence in sentences: sentence.tokens = stemmed_words(sentence.str_) for token in sentence.tokens: word_groups[sentence.actual_val].add(token) </code></pre> <p>I don't know a lot about Javascr...
javascript python
[3, 7]
2,049,803
2,049,804
How to set header Access-Control-Allow-Origin for XDomain
<p>How to set header Access-Control-Allow-Origin for XDomain</p> <p>i am trying to do this by java code or by script code.</p> <p>Please suggest me some way.</p>
java javascript
[1, 3]
3,336,705
3,336,706
Display image in new tab
<p>I display the image thumbnail on datalist as: <img src="http://i.stack.imgur.com/28Y3P.png" alt="enter image description here"></p> <pre><code>&lt;asp:DataList ID="dtlistImages" runat="server" RepeatColumns="5" RepeatDirection="Horizontal" BorderColor="#336699" BorderStyle="Solid" BorderWidt...
c# asp.net
[0, 9]
3,180,744
3,180,745
Odd behavior in javascript
<p>I have a table like so</p> <pre><code>&lt;table&gt; &lt;tr id="trRow1" runat="server" style="display: none"&gt; &lt;td&gt;First Name:&lt;/td&gt; &lt;td&gt;&lt;asp:Label id="lblFirstName" runat="server"&gt;&lt;/asp:Label&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Last Name:&lt;/td&gt; &lt;...
asp.net javascript
[9, 3]
5,341,195
5,341,196
This JQuery works in Chrome and Safari, Not FF?
<p>I have a bunch of code that will open and close a div using the slidetoggle/toggleclass method</p> <p>Now while the DIv is opened, I added in this little bit to allow the window to close if someone clicks outside of the now opened div.</p> <pre><code>$("body").live("click", function() { if($(event.target).pare...
php jquery
[2, 5]
5,311,603
5,311,604
Is Id necessary in applying jquery functions?
<p>Suppose I have two <code>p</code> tags in the document. I want to call two different effects using <strong>jQuery</strong> when <strong>onMouseOver</strong> event happens. Is it necessary that these two <code>p</code> tags be given Ids. Can't it be achieved without giving Ids to these tags ?</p>
javascript jquery
[3, 5]
2,190,392
2,190,393
jquery treeview expand given node
<p>Im building ul li list dynamically on the serverside code. How can I determine which node should be expanded when page is loaded ?</p> <p>Im using plugin: <a href="http://bassistance.de/jquery-plugins/jquery-plugin-treeview/" rel="nofollow">http://bassistance.de/jquery-plugins/jquery-plugin-treeview/</a></p> <p>th...
javascript jquery asp.net
[3, 5, 9]
2,218,525
2,218,526
javascript variable into php
<p>I have a php function, in this function I have a javascript which get the value of my element from parent window. My problem now is, how can I pass this value into php variables</p> <p>Any help would greatly appreciated.</p> <p>Thanks</p> <p>Tirso</p> <p>I tried this code but I got value always 1</p> <p>here is...
php javascript
[2, 3]
2,538,217
2,538,218
JQuery get text start with an element
<p>i have this code.</p> <pre><code>&lt;p&gt;jQuery is free, open source software, dual-licensed under the &lt;span&gt;MIT License&lt;/span&gt; or the GNU General Public License, Version 2.&lt;/p&gt; &lt;p&gt;&lt;span id="elt"&gt;jQuery is a&lt;/span&gt; cross-browser &lt;span&gt;JavaScript&lt;/span&gt;library designe...
javascript jquery
[3, 5]
1,362,076
1,362,077
Does JQuery get() + array access break the chain?
<p>I'm a noob at Jquery so forgive me if this is ridiculous, but does get() and [] break the method chain ? I'm attempting to retrieve a single element from a returned Jquery Object :</p> <pre><code>&lt;HTML&gt; &lt;HEAD&gt;&lt;TITLE&gt;A test page&lt;/TITLE&gt;&lt;/HEAD&gt; &lt;BODY&gt; &lt;p&gt;This is a paragr...
javascript jquery
[3, 5]
224,927
224,928
How display data in the textbox in jquery
<p>I am getting problem to display selected data in textbox I have following code which display data bellow the text box according to user suggestion</p> <pre><code>$('input[name=profileOrg]').keyup(function(){ var q = $(this).val(); $.get("CHI_custom/customScripts/getorgname.php?q="+q, function(data){ ...
php jquery
[2, 5]
3,529,416
3,529,417
String manipulation in Javascript code
<p>I have two text boxes on my Form. One is <code>txtNumberOfTablets</code> and the other one is <code>txtTotalQuantity</code>.</p> <p>I have a HiddenField and I am setting its value in code behind file on page load.</p> <p><code>hdfMedicationDosage = "2/3/4";</code></p> <p>What I want is, whatever user enters to <c...
c# javascript asp.net
[0, 3, 9]
3,736,128
3,736,129
IOException: Broken pipe when running Android application
<p>When trying to run my Android app from Eclipse I get this error in the console:</p> <pre><code> [2013-03-04 14:19:05 - ddmlib] Broken pipe java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcherImpl.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) ...
java android
[1, 4]
1,280,560
1,280,561
setInterval works online on same sytem (with 2 browsers open) but not online on separate systems
<p>I have a setinterval code updating a div. This works fine when tested in two separate browsers on the same system but when I test online on say a separate mac and PC and it stops. </p> <p>The code is as follows:-</p> <p>Javascript:</p> <pre><code> function setupAjaxIntervalDiscuss(){ setInterval(function()...
php javascript jquery
[2, 3, 5]
3,941,068
3,941,069
Javascript if syntax
<p>i have syntax error when i'm trying to run a simple if statements</p> <blockquote> <p>[Break On This Error] }); </p> </blockquote> <p>invalid assignment left-hand side [Break On This Error] container += </p> <p>what is my problem and how i can make:</p> <pre><code>if this.ewCount != 0 then {} elseif NotDoneh...
javascript jquery
[3, 5]
862,084
862,085
when a web app generate most markup by javascript ...
<p>I have seen a web app that generate most of a page's markup by javascript+ jquery. The server only generate a web page with just 1 DIV . The rest are done with create on client side via javascript+jquery+AJAX .</p> <p>What are the pros and cons of this javascript centric approach ?</p>
javascript jquery asp.net
[3, 5, 9]
5,693,145
5,693,146
Show random classes
<p>Let's say I have some classes like:</p> <pre><code>&lt;div class="something" style="display: none"&gt;Some text I would like to show&lt;/div&gt; &lt;div class="something" style="display: none"&gt;Some text2 I would like to show&lt;/div&gt; &lt;div class="something" style="display: none"&gt;Some text3 I would like t...
javascript jquery
[3, 5]
3,311,012
3,311,013
Without using jquery, how to cycle through images to make a simple slideshow
<p>You have a div, with 3 images in it.</p> <p>How to create a simple slideshow that cycles through the images, and displays each image for 5 seconds and goes back to the first image when done and continues looping.</p> <p><strong>Without using jquery or any other framework.</strong></p>
javascript jquery
[3, 5]
4,801,584
4,801,585
Can set the div content with jquery
<p>Why can't I put dynamic text on a div called foo? The following is on a metho in the asp.net codebehind.</p> <pre><code>StringBuilder script = new StringBuilder(); script.Append("&lt;script type='text/javascript'&gt;"); script.Append(" $(document).ready(function () {")...
c# javascript jquery asp.net
[0, 3, 5, 9]
1,799,507
1,799,508
Open Ms Word in write mode using microsoft.office.interop.word
<p>I am trying to open a MS Word Document through C#. But the open method is opening the document in a read-only mode. I want the file to be opened in write mode without creating another copy of i, so that I can save the changes to Database. Here is the code for opening the file.</p> <pre><code>public void def() { ...
c# asp.net
[0, 9]
5,829,589
5,829,590
AJAX validation "freezes" in jQuery?
<pre><code>function checkuser(user) { var ret = false; $.ajax({ type:'POST', url:'user.php', async:false, data:{'user':user}, success:function (data) { if (data == 1) ret = true } }); return ret; } </code></pre> <p>I use bvali...
javascript jquery
[3, 5]
1,131,463
1,131,464
Assign a Value to a Div so I can keep track of it
<p>I am creating and appending images (divs) like this:</p> <pre><code>$('#event_list_main').append('&lt;img class="listed_event" id="random_event" src="final_tutorial_buttons/random.png" height="50" width="50" onclick="one_band_event_action();" /&gt;'); </code></pre> <p>so each time this is executed, an image pops u...
javascript jquery
[3, 5]
5,446,755
5,446,756
Jquery multi DIVs hide/show
<p>i want to show hide multiple divs with jquery or javascript. I seached the web but i find codes that must have unique divs like:</p> <pre><code>&lt;div id="div1"&gt;text&lt;/div&gt; &lt;div id="div2"&gt;text&lt;/div&gt; </code></pre> <p>and so on, but i want to add the divs in a foreache php function so i can't ha...
php javascript jquery
[2, 3, 5]
4,104,364
4,104,365
Asp.net webpage has a lot of blank space at bottom
<p>My asp.net webpage has a ton of white space at the bottom of a div within a content page, and I have no idea where its coming from. There are NOT a ton of <code>&lt;br /&gt;</code> 's or &amp;nbsp's in the source view. How can I find out where the space is coming from and correct?</p> <p>Could this element be tak...
c# asp.net
[0, 9]
884,992
884,993
Remove common string from a string using jquery or Javascript
<p>How can remove the 'tp.','ta.' and 'tta.' from below string from each place where it is coming</p> <pre><code>str = " tp.FirstName, tp.FamilyName, ta.DOB, tta.TypeOfLocation WHERE tp.DateStamp BETWEEN '2012-02-12 15:13:00' AND '2013-02-12 15:13:00' AND tta.db_name_id =21 AND tp.FirstName = 'Darlene'"; </code></p...
javascript jquery
[3, 5]
2,052,902
2,052,903
Redirect to same page after login becuse of session time out in asp.net
<p>Hi is there a anyway to land same page after sign in because of session time out in asp.net web application. I am recently migrated from java to .net and any suggestion will be greatly helpful. As a example </p> <p>I am on <strong>Page1</strong> and while i am idle on <strong>Page1</strong> my session was destroyed...
c# asp.net
[0, 9]
4,954,273
4,954,274
Floating tab on page?
<p>I'm looking to create a simple page tab... thing.</p> <p>The issue is, I don't even know the proper terminology for them. I'm talking about those little tabs that stick to one side of the window, they're commonly used for support windows.</p> <p>Here's an example: <a href="http://www.livechatinc.com/" rel="nofollo...
php javascript
[2, 3]
4,679,098
4,679,099
AlphaAnimation Class Not Work In CountDownTimer
<p>Actually I write a AlphaAnimation in XML and use it in my activity. When I want to use it onFinish CountDownTime method, it doesn't work. How can I fix it?</p> <p>This is my code:</p> <pre><code>new CountDownTimer(1000, 1000) { @Override public void onTick(long millisUntilFinished) {} // end -&gt; method -&gt; on...
java android
[1, 4]
214,170
214,171
Making a jquery name tagger
<p>I am trying to make a name tagger in jquery + php. I have done the PHP part and jquery code is 99% done, but my problem is passing the string to search for after the '@' sign. I currently use a div with contentEditable set to true. From what I see in console log the name variable is indeed @+search string, but the l...
javascript jquery
[3, 5]
1,244,674
1,244,675
How to similate download speed with bar?
<p>How is it possible to simulate a download speed with a bar?</p> <p>Example show with a bar how long time it takes to download 5 MB with a 1 Mbyte/s connection.</p> <p>I have made a bar with CSS and HTML to simulate 40%: <a href="http://jsfiddle.net/JxfAk/3/" rel="nofollow">http://jsfiddle.net/JxfAk/3/</a></p> <p>...
javascript jquery
[3, 5]
1,301,149
1,301,150
Can I reduce this jquery script down to one line?
<p>I have written this code</p> <pre><code>if (forw == true) { if ($('.tickertape li.active')[0] != $('.tickertape li').last()[0]) { $('.tickertape li.active').removeClass('active').next().addClass('active'); } else { $('.tickertape li.active').removeClass('active');...
javascript jquery
[3, 5]
5,520,285
5,520,286
Push Notification in Asp.net
<p>I am working on the Asp.net and want to send the push notification to iPhone using ASP.NET(C#). How can I achieve this.Can you provide the detail on the same. I have little bit Knowledge about APSN-sharp",but I don't know how to user it. </p> <p>Thanks in Advance.</p>
c# iphone asp.net
[0, 8, 9]
531,062
531,063
Only swipeone is working with jGestures
<p>I'm trying to implement touch evens with jGestures. swipeone works fine but anything else (swipeleft, swiperight etc) is not firing.</p> <pre><code>&lt;div id="wrap" style="height:500px; width:500px; background: blue;"&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; $('#wrap').bind('swipelef...
javascript jquery
[3, 5]
2,004,367
2,004,368
How to check the last char of a string and see its a blank space
<p>How to check the last char of a string and see its a blank space.If its ablankspace remove it ?</p>
c# asp.net
[0, 9]
4,068,154
4,068,155
PHP code in JavaScript to get variable
<p>When I press on any of the ‘region’ names in the list ('<code>href</code>' links), the matching list of 'cities' is showing underneath.</p> <pre><code>&lt;?php while(has_list_regions()) { ?&gt; &lt;a href="javascript:show_region('&lt;?php echo list_region_id() ?&gt;');"&gt;&lt;/a&gt; &lt;?php } ?&gt; &lt;script ...
php javascript
[2, 3]
4,413,335
4,413,336
Can you write Javascript object init shorthand C# style?
<p>I have the following Javascript:</p> <pre><code>function TestModel() { this.name = "Testvalue"; this.id = 0; } var test = new TestModel(); alert(test.name); </code></pre> <p>If I want to initialize an object with different parameters without the use of a constructor I would need to call the follow...
c# javascript
[0, 3]
498,325
498,326
Asp.Net page reload problem after login
<p>I am devolping a web application.the problem is that i am using a login control (not a .NET control) which is a part of master page and is acessible from all pages. if user log In from a page the login control updates itself and displlay some statistics of logged In user but the specific page does not reload. (some ...
c# asp.net
[0, 9]
3,271,589
3,271,590
Having problems with importing dropbox and getting it to run?
<p>I downloaded the dropbox sdk zip off the dropbox website, then imported the program into eclispe. Then i configured the build path and added the 2.2 jar file to run, theres no errors until I load up the aplication, when I ran it on the 1.5 emulator it gave me a Uncaught handler: thread main exiting due to uncaught e...
java android
[1, 4]
5,744,725
5,744,726
How do you make animations not fire unless previous is done (withtout using callback)
<p>I have a function called: </p> <pre><code>this.makeStuffHappen() </code></pre> <p>Which makes different animations according to a switch statement and a couple of variables. Is it possible to make a function not fire unless all previous are done resolving.</p> <p>I want to write something like </p> <...
javascript jquery
[3, 5]
3,270,108
3,270,109
jQuery ":contains" alternative for a links
<p>There is a selector in jQuery - :contains</p> <p>Example:</p> <pre><code>str = 'test'; blocked_div = $(".mydiv:contains("+str+")"); blocked_div.find('img').hide(); ... &lt;a href="http://example.com"&gt;test&lt;/a&gt; ... </code></pre> <p>As I understand it's search for a "test" text inside a ".mydiv" element. Bu...
javascript jquery
[3, 5]
169,593
169,594
Can't understand how to do it with javascript and jquery code
<p>Sorry guys for asking that dumb question but I have problem with that thing. Have such script, it should return true or false, but after drawing that html pop-up window and getting response from that methods. </p> <pre><code> $("#pageInfo a.btnDel").click(function () { $("#cmsSmallPo...
javascript jquery
[3, 5]
5,197,449
5,197,450
How to write xml file using C#
<p>I am newer person in c# asp.net . I want to write xml file in c# code behind file in my asp.net web application and pass this xml file as a string to a webservice . Can any one able to help me its will very useful for my project . Thank you </p>
c# asp.net
[0, 9]
2,257,694
2,257,695
javascript code to edit&save file on linux server?
<p>is there any javascript code that I can use to <strong>edit</strong> (and maybe download and later upload the modified) text file on a linux server?</p> <p>So I do not have to leave my web browser and do ssh all the time when I need to edit or even only check some config files? The server is not accessible from the...
php javascript
[2, 3]
1,056,521
1,056,522
jQuery toggle running twice
<p>It seems that this code:</p> <pre><code>$(function(){ $('.show_hide_login').toggle( function (){ alert('show'); $("div#fullpage").show(); $("div#loginbox").show(); }, function (){ alert('hide'); $("div#loginbox").hide(); $("di...
javascript jquery
[3, 5]
2,949,415
2,949,416
ie prevent mousewheel while mouse is over a div
<p>How do i prevent the mouse wheel from scrolling the entire html page which im over a div which can mousewheel?</p>
javascript jquery
[3, 5]
2,696,933
2,696,934
Why does has my javascript stopped working on live site, but works fine in test environment?
<p>Okay, this is very weird...</p> <p><a href="http://connecttofriends.com/admin/login" rel="nofollow">http://connecttofriends.com/admin/login</a></p> <p>I'm writing an administration control panel and am using a template from Theme Forest (because I didn't sign on to create any graphics, so my client bought it). For...
javascript jquery
[3, 5]
5,534,747
5,534,748
Javascript object key by element id? (jQuery)
<p>This looks like a very simple issue, but I just can't get it to work.</p> <p>I have a Javascript object like this:</p> <pre><code>var person = {}; person.one = {gender: 'male', name: 'John'}; person.two = {gender: 'male', name: 'Doe'}; person.three = {gender: 'female', name: 'Jane'}; </code></pre> <p>Then I have ...
javascript jquery
[3, 5]
5,302,525
5,302,526
Online Python interpreter for use *from* the iPhone?
<p>Is there an online Python interpreter or some such that would allow me to try out simple python code from my iPhone?</p> <p>Something like <a href="http://tryruby.hobix.com/">try ruby! (in your browser)</a> for Python, and works with the iPhone?</p>
iphone python
[8, 7]
5,642,196
5,642,197
PHP and mySQL Data Errors
<p>I currently have 2 users registered on my website; jason and jason1.</p> <p>I have a mySQL database that stores the following fields: <code>id message reciever sender</code></p> <p>When a message is sent from jason1 to jason, the data comes up correctly. However, when a message is sent from jason to jason1 both t...
php javascript
[2, 3]
5,985,080
5,985,081
jQuery ID Number Range
<p>I am trying to write a jQuery script that will add a class to list items within a certain ID range. I use numbers in my ID's and want to adjust a range of ID's.</p> <pre><code>&lt;li id="item-15"&gt;Something&lt;/li&gt; &lt;li id="item-16"&gt;Something&lt;/li&gt; &lt;li id="item-17"&gt;Something&lt;/li&gt; &lt;li i...
javascript jquery
[3, 5]
5,127,988
5,127,989
Update datatable from gridview
<p>I have a scenario in my project I have a grid view and submit button which generates dynamic rows and there is an image button <code>Edit</code> which edits those rows and these rows bind with datatable first and when we click on save button all the reflect changes in datatable save in database there is no <code>Upd...
c# asp.net
[0, 9]
3,214,848
3,214,849
Using a different connection string in web.config and a different sitemap based on if it is a development server or live server?
<p>Currently,</p> <p>When I deploy to a development server, I use one connection string, but when I deploy to a live server, I have to comment out the development connection string and use a live connection string. I also have to do this with a sitemap, where I may have a menu item show up on the development server, ...
c# asp.net
[0, 9]
768,356
768,357
Android 1.6 SDK - Internal File Path Issue
<p>I am trying to read a csv file from assets/file.csv, but the log keeps spitting out that it doesn't exist. Is my path correct for internal file storage? This is the class file:</p> <pre><code>package com.xxx.view; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOExc...
java android
[1, 4]
5,892,572
5,892,573
How to Load Google's jQuery in External Script?
<p>Stupid question, but does anyone know how to load google's jquery from an external script so it doesnt clunk up my header? In other words, I want to take the code below (probably starting at the google.load stuff and save it inside another file to include in my header. I want to keep my view source pretty :)</p> <p...
php javascript jquery
[2, 3, 5]
2,781,231
2,781,232
How to render text in Directwrite?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5166709/is-there-any-way-to-render-text-into-directwrite">Is there any way to render text into DirectWrite????</a> </p> </blockquote> <p>Hello, all is it possible to render text in Directwrite and save it as png...
c# asp.net
[0, 9]
3,896,312
3,896,313
How do I get an auto completion from a database in visual studio ?
<p>I'm trying to make a program, which is basically a shopping list. The purpose is to type something in, while typing the program will fetch items from the database that matches and you will be able to select an item and write a quantity. Later I want to sorts this.</p> <p>My problem is I have no idea how to make th...
c# c++
[0, 6]
424,014
424,015
In ASP.NET, what's a good strategy for maintaining dynamically generated controls across Postbacks?
<p>Although <a href="http://www.4guysfromrolla.com/articles/092904-1.aspx" rel="nofollow">this</a> is a great article on handling dynamic controls in ASP.NET, I have an application where I cannot generate controls on PageLoad or PageInit. They are generated much later, after the user has input data. Is there a good str...
c# asp.net
[0, 9]
3,258,025
3,258,026
Toggle .html text on click with jQuery
<p>Im trying to build a collase expand function on my website. </p> <p>I have the following that toggle ths hidden div only im trying to change the 'Expand' text to collapse, and then if clicked again, collapse > expand. </p> <p>Can anybvody see what im doing wrong?</p> <pre><code>$('.coverage .expand').click(functi...
javascript jquery
[3, 5]
5,144,440
5,144,441
adding a try catch around a large method call
<p>I have a web service that's pretty simple; something like this:</p> <pre><code>public class LeadService : System.Web.Services.WebService { [WebMethod(EnableSession = true)] public string MyService(string TheIncomingData) { string ReturnData = ""; MyClass TheClass = new MyClas...
c# asp.net
[0, 9]
1,745,818
1,745,819
function from on:press not firing
<p>I am trying to call a function from a on:press event and for some reason, it is not firing. I am using flexigrid and am passing the correct parameters to the function so it should respond. Can anyone spot an error with this or offer some debug advice. Thanks</p> <pre><code>function editbox(com,grid) { if(com =...
javascript jquery
[3, 5]
3,994,532
3,994,533
How to change the color of string
<p>I am making an application in which i am using strings to diaplay some text on screen.But i want to change the color of the string to red.I don't know how to change the color of string to red.Please tell me how to do it.This is the string:</p> <pre><code>strRightAnswer = "Right Answers:" + " " + String.valueOf(nRi...
java android
[1, 4]
4,043,836
4,043,837
How can i access static class without using object in android?
<p>Can i access static class to another class without using object for that static class. help me how to access.</p>
java android
[1, 4]
3,218,389
3,218,390
How to create an empty jQuery result
<blockquote> <p><strong>Edit</strong>: As of jQuery 1.4, using <code>$()</code> will work as described below.</p> </blockquote> <hr> <p>I need to loop through an array and create a number of elements which I want to have in a single jQuery result object.</p> <pre><code>for (var i = 0; i &lt; 10; ++i) { $myJQue...
javascript jquery
[3, 5]
138,103
138,104
Javascript alert in php script
<p>I wanted to popup an alert box. After that, the site would redirect to main page. But, it seems that it directly redirect to the mainpage without alerting anything. </p> <pre><code>if($registerquery) { ?&gt; &lt;script&gt;alert('received!')&lt;/script&gt; &lt;?php } header("Location: mainpage...
php javascript
[2, 3]
4,356,734
4,356,735
My jQuery BBCode script doesn't work properly, there is a little bug
<p>I currently use a basic BBCode script for my projects.</p> <p>The problem is, BBCode only works for the first textarea. If I include other textareas, it start bugging.</p> <p>For example; In the first textarea, if I press the B image (means BBCode bold) it writes "[b] [/b]" in <strong>both</strong> of the textarea...
javascript jquery
[3, 5]
1,181,186
1,181,187
Inline javascript checks in PHP
<p>I was trying to use <code>&lt;script&gt; &lt;noscript&gt;</code> checks inline with my PHP to render different form elements depending on weather or not someone has javascript enabled.</p> <p>To display something to non enabled users <strong>only</strong> I can successfully use </p> <pre><code>&lt;noscript&gt; &lt...
php javascript
[2, 3]
311,663
311,664
Detect if capslock is down
<p>What I need is to detect, whether the caps lock key at the very moment is down. So I don't need the state (on/off), I want to check if the user keeps the caps lock pressed down. Is it possible with javascript? I want to create something like an Enso Launcher inside the browser.</p>
javascript jquery
[3, 5]
4,631,568
4,631,569
Retrieving Android Battery Metrics Every n Seconds [Efficiently]
<p>I have found numerous sources for monitoring battery levels, but none of them describe how to check it at a fixed time interval. Suppose I want to check the battery every n seconds. What is the most efficient way to do this?</p> <p>Currently, I create a BroadcastReceiver and register it in my service with a filter....
java android
[1, 4]
4,322,941
4,322,942
Enter Key as Tab and Move Focus to next Control in asp.net
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4494552/change-enter-from-submission-to-tab">Change Enter from submission to Tab?</a> </p> </blockquote> <p>Hi Experts How to override tab key with enter key in asp.net web form and move to next control on ente...
javascript asp.net
[3, 9]
2,728,332
2,728,333
RegisterStartupScript on master page not working. Alternatives?
<p>I have tried using RegisterStartupScript and ScriptManager.RegisterClientScriptBlock to no effect. both are failing to send my list of javascript arrays.</p> <p>I am doing this on the masterpage's page load and can only assume the fact that I'm doing it on a master page is the problem.</p> <p>I have the exact same...
c# javascript asp.net
[0, 3, 9]
73,554
73,555
jQuery: What is a "Value Callback"?
<p>I'm working my way through "Learning jQuery" (Third Edition).</p> <p>In Chapter 4: "Manipulating the DOM" there is a section explaining something called the "<strong><em>Value Callback</em></strong>". This is a new one for me.</p> <p>The author explains this via an example of list of links wherein the ID's of each...
javascript jquery
[3, 5]
806,039
806,040
what are the OOP features which are not in java but c++ has those features?
<p>Respected Sir!</p> <p>As i have not learnt java yet but most people say that C++ has more OOP features than Java, I would like to know that what are the features that c++ has and java doesn't. Please explain.</p>
java c++
[1, 6]
1,433,911
1,433,912
Call c# function in javascript
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3713/call-asp-net-function-from-javascript">Call ASP.NET Function From Javascript?</a> </p> </blockquote> <p>I have a C# function containing an if statement </p> <pre><code>if (condition) test=true else ...
c# javascript asp.net
[0, 3, 9]
5,686,116
5,686,117
Is there a way to bypass or throw away a mouse event?
<p>I was wondering if there was a way to "throw away", if that is the right term, or ignore a mouse event when it occurs.</p> <p>For example,</p> <p>Say I have a mouseenter bound to an object and I have a specific handler attached to it. Is there a way to ignore certain mouseenter events on that object so that the ha...
javascript jquery
[3, 5]
4,888,518
4,888,519
jquery .find callbak
<p>I was wondering is there a way to get a callback from a jquery .find function.</p> <p>So it would be</p> <pre><code>$('#Div').find($('.items')).each(function () {}).Callback(function(){//Do stuff}); </code></pre> <p>Thanks to anyone who can help</p>
javascript jquery
[3, 5]
586,266
586,267
Page_ClientValidate() Question
<pre><code>function Subscribe() { if (typeof (Page_ClientValidate) == 'function') { Page_ClientValidate(); } if (Page_IsValid) { // do something CheckUser(); } } </code></pre> <p>The script is tied to an asp.net button with regular expression validators. I have ano...
javascript asp.net
[3, 9]
5,728,041
5,728,042
Jquery - if page loaded
<p>Is there any trick how to start a function in javascript, which starts when the page is completly loaded?</p> <p>thanks</p>
javascript jquery
[3, 5]
4,435,854
4,435,855
How to handle click event in jquery for a button?
<p>I have a grid view in which I have a button feild for deleting that particular row in the grid view, using the GridView_RowDeleting() event.</p> <p>So when that particular row gets renders it's such</p> <pre><code>&lt;input type="button" value="Delete" onclick="javascript:__doPostBack('ctl00$ContentPlaceHolderBody...
c# jquery asp.net
[0, 5, 9]
5,848,883
5,848,884
Using :not selector with $(this)
<p>I have the following line which works OK</p> <pre><code>$("#myDiv img:not(:eq(0))").hide(); </code></pre> <p>I want to write a similar line but using "this". So:</p> <pre><code>$(this":not(:eq(0))").hide(); </code></pre> <p>But that doesn't work... Any ideas where it's gone wrong?</p>
javascript jquery
[3, 5]
183,252
183,253
Want to show Busy Loading message with percentage download when form will load using JQuery
<p>suppose my page content is huge so in my asp.net application i want to show busy icon with percentage downloading the content in client side. i saw many flash and sliver light site that they show busy icon and also they show percentage that means how much content has been loading in client machine. how could i achie...
asp.net jquery
[9, 5]
5,827,573
5,827,574
Calling JavaScript Function on Demand Causing Strange Results
<p>I have a dropdownlist which is declared as follows: </p> <pre><code>&lt;select onchange="reloadValues(this,event);"&gt; ... options here &lt;/select&gt; </code></pre> <p>When the user change the selection reloadValues is invoked and everything works perfectly. Now, I want to add the reloadValues when the user ...
javascript jquery
[3, 5]
245,947
245,948
Android most efficient way to have many views
<p>I have an app that will allow the user to drag many views onto a "canvas". The user can pan, rotate, flip, and scale these views. Each view will need to have a image on it. I was thinking of simply inflating imageviews and letting the user interact with those.</p> <p>Is there a more efficient way to have up to 5...
java android
[1, 4]
2,623,904
2,623,905
Display label text with line breaks in c#
<p>Is it possible to display the label text with line breaks exactly as per the image</p> <p><img src="http://i.stack.imgur.com/YkAPV.jpg" alt="enter image description here"></p> <p>I need the text on the label to be printed exactly can some one help me, my desired text that has to be shown on the label will be store...
c# asp.net
[0, 9]
110,856
110,857
C# Eval aspx Fun
<p>This works:</p> <pre><code>&lt;asp:Label ID="asdf" runat="server" Text='&lt;%# Eval("Image1") %&gt;'&gt;&lt;/asp:Label&gt; </code></pre> <p>displaying data like: L8_Pic_1.jpg</p> <p>This doesn't:</p> <pre><code>&lt;asp:Label ID="asdfaf111" runat="server" Text='&lt;%# Eval("Image1").ToString() %&gt;'&gt;&lt;/asp...
c# asp.net
[0, 9]
1,828,775
1,828,776
Changing just the text in a div with jQuery
<p>I have a structure like so:</p> <pre><code>&lt;div class="comment"&gt; Some text goes here. &lt;div class="controls"&gt; Controls go here. &lt;/div&gt; &lt;/div&gt; </code></pre> <p>How can I replace just "Some text goes here" without affecting the <code>controls</code> div?</p> <p>Clearly anoth...
javascript jquery
[3, 5]
3,404,278
3,404,279
Number of app columns is different on different devices
<p>So the issue I'm having right now is that my widget for my app should be 2x4 and on my device (Nexus 4) it is. However I tested it on my Note 2 and the widget is 1x4 and doesn't display all the content. I specified the minimum size, shouldn't that work. Or is there a way to always make sure its 2x4?</p> <p><strong>...
java android
[1, 4]
5,871,683
5,871,684
jQuery persistent non-event bindings
<pre><code> var $thingy = $('.thingy'), $window = $(window); $window.on('resize', function(){ thingy.width($window.width()/12); }); </code></pre> <p>Is it possible to add more <code>.thingy</code>s to the page and have them resize without re-querying?</p> <p>I am aware that the following will work:</p>...
javascript jquery
[3, 5]
4,510,158
4,510,159
how to Validate Client Side with jquery and Server side at same time?
<p>i really love the jquery validation plugins, look neat stylish and accessible, but as you know JavaScript can be turned off and boom your user can enter what ever he wants, therefore you should validate on server too, so what is the best approach here ?</p> <p>do double validation one with jquery and one on server ...
c# asp.net jquery
[0, 9, 5]
3,896,470
3,896,471
Launch / Check application
<p>I have the following script which I am using in an intranet environment:</p> <pre><code>function LaunchApp(the_app) { var ws = new ActiveXObject("WScript.Shell"); ws.Exec(the_app); } </code></pre> <p>This allows me to pass it an exe path to launch directly from a web page as long as internet explorer's int...
javascript jquery
[3, 5]
1,733,877
1,733,878
Click on Div to get information box for a few seconds
<p>I have this code below: And what I need to do is to be able to click on the Div right below and when done the #info_page div would show up in the middle of the screen for a few seconds. Like a dialog but just a simple jquery temp show() with a timer? Is this possible?</p> <p>The current code is below.</p> <pre><co...
javascript jquery
[3, 5]
972,394
972,395
Dynamically add/remove function while calling one single function using parameters
<p>I have a function called f0 having some parameters. When i call it, it calls some other functions with some parameters(for example the same parameters). The problem is, can i add somehow these functions dynamically?</p> <p>A simple solution would be something like this:</p> <pre><code>var callf1=true; var callf2=t...
javascript jquery
[3, 5]
822,237
822,238
Multiple Selection Tree View Control for ASP.Net Web Application using C#.Net
<p>Would like to know about the TREE VIEW CONTROL which would allow me to select multiple nodes and those selected nodes can then be dragged and dropped onto the other drive.Is there any Property available for multiple selection or how exactly we can go about doing it.. Thank You</p>
c# asp.net
[0, 9]
1,467,315
1,467,316
DropDownList.SelectedIndexChanged does not fire when selecting index in C# code behind
<p>i am trying to select the index in DropDownList in C# code behind but the SelectedIndexChanged event does not fire. What is the right way to do it?</p> <pre><code> DropDownListChapterTitles.SelectedIndex = 1; protected void DropDownListChapterTitles_SelectedIndexChanged(object sender, EventArgs e) { } </code...
c# asp.net
[0, 9]
3,230,459
3,230,460
disabling controls via checkbox in javascript
<p>I currently have 4 textboxes, 1 checkbox and a dropdownlist. I am attempting to disable the textboexes and dropdownlist upon the checkbox being checked. My current code does not work, but I can't seem to find the error in it. I am new to using JavaScript. </p> <pre><code>function enableCheckBox(phyAddressCheckBox,...
javascript asp.net
[3, 9]
1,318,298
1,318,299
Is there a way to export the content in DIV to a image programmatically?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/60455/take-a-screenshot-of-a-webpage-with-javascript">Take a screenshot of a webpage with javascript?</a> </p> </blockquote> <p>I hope to export the content in DIV to a image programmatically? How can I do? whic...
javascript asp.net
[3, 9]
2,733,027
2,733,028
Is there a better way to write this simple line of jQuery?
<p>I am learning jQuery and I have written a very simple script that works great. Now I would like to find out if there is a better way to write this line.</p> <pre><code>$("form").submit(function() { $('div.beforeRecover').animate({ opacity: 'toggle' }, 300).delay(800); $('div.betweenRecover').animate({ opaci...
javascript jquery
[3, 5]
658,173
658,174
.net membership unsuspend account
<p>I am using .net membership to manage my user roles. Currently users are suspended after a long period of inactivity. Is there a membership api to unsuspend the user?</p>
c# asp.net
[0, 9]
529,317
529,318
Javascript/Jquery click enable
<p>The following code's else part isnt working, i.e. click is not getting enabled.</p> <pre><code>if $("#section1").click(function(event){ return false; }); else $("#section1").click(function(event){ return true; }); </code></pre> <p>So basically, I want to remove the click function...
javascript jquery
[3, 5]
739,111
739,112
Use UP/DOWN arrow keys to call a function (and passing parameter)
<p>I have a survey in which there are numerous text inputs taking numerical value each of which has a pair of increment/decrement buttons. I have a working function as follows:</p> <p>HTML:</p> <pre><code>&lt;div class="text-input-wrapper"&gt; &lt;input type="text" /&gt; &lt;div class="buttons inc-dec"&gt; ...
javascript jquery
[3, 5]
1,527,252
1,527,253
get the title from a context
<p>How Do I select the title of the context? I am suppose to select it to change the title of the page.</p> <pre><code>var handler = function(context){ document.title = //context's title .... } //sample context from ajax request var context = '&lt;!DOCTYPE html&gt;&lt;html&gt;\ &lt;head&gt;&lt;tit...
javascript jquery
[3, 5]