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
3,565,500
3,565,501
Javascript, callback when object's attributes change?
<p>Functions in javascript are objects:</p> <pre><code>var x = function(){}; x.y = 1; console.log(x.y); //Prints 1 </code></pre> <p>Is there any way to call a function when y changes?</p> <p>My reason for doing this is that I'm trying to override jquery's "$" function so that I can benchmark performance. It works fi...
javascript jquery
[3, 5]
4,473,042
4,473,043
how to edit column value before binding to gridview after retriving from database?
<p>After i retrieved a set of datatable from database, i need to edit the rows value before binding to the gridview. for example, a set of datatable is retrived from database. </p> <p>eg: [userid], [userEmail] --> 1 , james@hotmail.com</p> <p>i would like to change "james@hotmail.com" to "james" then bind it to grid...
c# asp.net
[0, 9]
351,223
351,224
Notify other activity of a preference changed
<p>I'm trying to have the main activity notified of a change in preferences in the PreferenceActivity but the onSharedPreferenceChanged is not firing when I change the preference.</p> <pre><code> SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); prefs.registerOnSharedPreferenceChan...
java android
[1, 4]
1,902,919
1,902,920
ASP.NET object tag and JavaScript
<p>i m using object tag on my .aspx page</p> <pre><code>&lt;object data="collapsibles.htm" height="400" width="300" /&gt; </code></pre> <p>in data attribute of object tag i refer the other HTML page on that HTML page one image that call the JavaScript function:</p> <pre><code>&lt;img src="" alt="ipl" style="border: ...
javascript asp.net
[3, 9]
668,761
668,762
A misunderstanding of how this javascript is working
<p>I bind an event to a channel on the client side that waits for a message from the server and triggers the anonymous function in a callback, passing the message data in the <code>thing</code> parameter.</p> <pre><code>channel.bind('coordinates_sent', function(thing) { var x = thing.left; var y = thing.top;...
javascript jquery
[3, 5]
602,777
602,778
loading second option values when first value is selected with javascript
<p>Got a problem.</p> <p>I have these two javascripts:</p> <pre><code>&lt;script type="text/javascript"&gt; $(function () { function pad(n) { return n &lt; 10 ? '0' + n : n } var date = new Date(); var selectElement = $('&lt;select name="date" id="date" class="validate...
javascript jquery
[3, 5]
351,853
351,854
Why won't my javascript work?
<p>Here's my javascript code (backslashes are for escaping):</p> <pre><code>&lt;script type="text/javascript"&gt; $(function(){ //datepicker $(\'#start\').datepicker({ inline: true }); }); &lt;/script&gt; </code></pre> <p>And the relevant HTML:</p> ...
javascript jquery
[3, 5]
4,076,423
4,076,424
c++ / c# pyramid scheme how to make it?
<p>I am looking for a c++ or c# code for a pyramid scheme (i level: x, second level x x...and so on). thx</p>
c# c++
[0, 6]
2,559,125
2,559,126
PHP Variables inside JQuery/Javascript
<p>I have some javascript/jquery code and need to some php into it be the syntax seems to be wrong...</p> <p>This is what I'm doing:</p> <pre><code>$.post("myphp.php?something=$phpvariablehere",{ etc.... </code></pre> <p>The result right now is that it's taking <strong><em>$phpvariablehere</em></strong> as a string ...
php javascript jquery
[2, 3, 5]
3,073,030
3,073,031
Android Intent usage
<p>I am working developing a tab layout based RSS Feed reader app for my android. I have four different sites to get the feeds from and each feed should go into the separate tab. Now I have the app working fine but I was just wondering if there is a way to pass in the feed url while invoking the feed activity? </p> <p...
java android
[1, 4]
3,961,462
3,961,463
What is a $(function() { ... }) function and when is it called in the following example?
<p>I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I am developing using VSTS 2008 + C# + .Net 3.5 + ASP.Net. I am learning the following code dealing with javascript, my confusion is for $(function(){...} part of code, when it will be called and what is its function? I did not see any...
javascript jquery
[3, 5]
400,124
400,125
Can I refactor if - else with a switch or case statement in javascript?
<p>I have the following code:</p> <pre><code>var btns1 = { 'Submit': function (win) { submitHandler(oLink.$link, $('#main-form'), false); }, 'Submit &amp; Close': function (win) { submitHandler(oLink.$link, $('#main-form'), true); }, 'Close': function (win) { modal.closeModa...
javascript jquery
[3, 5]
5,352,896
5,352,897
check if window is open and opens a new window only for once?
<p>i use the code below to open a new window when a user drops by my site using jquery document ready function.</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ window.open('link','title','width=460,height=500,status=no,scrollbars=yes,toolbar=0,menubar=no,resizable=yes,top=460,left...
javascript jquery
[3, 5]
1,213,733
1,213,734
How to intercept all jquery ajax events?
<p>I have an big JavaScript application with a lot of ajax in there (third-party script). Now I need to intercept all ajax events, i.e. when a message from server comes back with transport text or message, i want this text / message to do replacements.</p> <p>problem: i tried with this, but it never reacts on any ajax...
javascript jquery
[3, 5]
4,957,760
4,957,761
ProgressBar inside SimpleAdapter
<p>I'm trying to add a ProgressBar to my row.xml view but I can't seem to make it work I keep getting</p> <pre><code>06-09 12:44:44.802: ERROR/AndroidRuntime(1012): java.lang.IllegalStateException: android.widget.ProgressBar is not a view that can be bounds by this SimpleAdapter ArrayList arr = new ArrayList(); Hash...
java android
[1, 4]
5,640,056
5,640,057
Android stutter on activity change
<p>I've got an android logging into my web service asynchronously, but when the task is complete, and I switch to the next activity, there is a stutter. This is annoying as there is a progress bar (in circle mode) on my activity and it pauses, restarts and then the activity is closed. This doesn't look all too good.</...
java android
[1, 4]
1,840,511
1,840,512
Converting HashMap into Array
<p>I have a HashMap which I want to convert into a array. Which the code below, I get following: [[2, 11, 10, 9], [value1, value2, value3, value4], [null, null, null, null], [null, null, null, null]] The "null" entries give me a null pointer exception. Why is it two times as big as it should be? I just want the real en...
java android
[1, 4]
5,136,466
5,136,467
Remove a perticular div of specific text
<p>I have the following code in a php page</p> <pre><code>&lt;div class="vmenu"&gt; &lt;div class="first_li"&gt;&lt;span &gt;Add Shift&lt;/span&gt;&lt;/div&gt; &lt;div class="first_li"&gt;&lt;span&gt;Add Comment&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>Now I want to remove the div contains text "A...
javascript jquery
[3, 5]
4,084,590
4,084,591
Displaying tabular data in Android - TableLayout, custom Adapter or both?
<p>In the past when I have needed to display large data sets in a table, I've just looped over the data and on every iteration I'd inflate an xml layout representing a TableRow, obtain references to the child controls, set their properties from the data source and add the row to a TableLayout. When just displaying sim...
java android
[1, 4]
3,818,969
3,818,970
add hyperlink to an image(background image)
<p>I'm a bit lost as to how to add a hyperlink to an image(background image) that is being called into the page with this HTML below:</p> <pre><code>&lt;div style="background-color: #fff; background: #fff url(/affiliate/uploads/images/subs_bg_4e1a7912cf9a79.22853644.jpg) no-repeat right top" class="bigshadow" id="wrap...
javascript jquery
[3, 5]
3,955,788
3,955,789
Building a data dictionary in web
<p>Not a dictionary for language, but data. I.e Car1[Make="Honda",Model="Accord",Colour="Red"]</p> <p>That's how I'd do it in Python, but by the look of things, it's harder to do on the web. I'm using PHP (not ASP).</p> <p>Has anyone had any experience with writing this kind of thing on web? I'm open to JS etc if ...
php javascript
[2, 3]
2,988,715
2,988,716
How to detect is application been showing?
<p>I have been developing Android application that use Activity with "download" button and Service for executing downloading in the background. And I have following task: to show message about downloading if application is currently displayed. How can I detect it? Is there standard Android OS functions for it? Thank yo...
java android
[1, 4]
1,353,525
1,353,526
ASP.NET Repeater - show part of data in column and full data in a tool tip
<p>In my ASP.NET project I want to show the first 20 characters (only a part of the full text) and then display the full text in a tool tip. I need to do because the description can be up to 500 characters long.</p>
c# asp.net
[0, 9]
3,894,734
3,894,735
preventDefault does not behave equal in different browsers
<p>I use jQuery preventDefault on a keydown event: <a href="http://jsbin.com/ixaqok/edit#javascript,html" rel="nofollow">http://jsbin.com/ixaqok/edit#javascript,html</a> When running the example code in Firefox and Opera the keypress event still is fired, but in Chrome, IE8 and Safari it's not.</p> <p>Why? Is preventD...
javascript jquery
[3, 5]
3,077,613
3,077,614
Change asp:Label text from C# code behind
<p>I've been trying with this for an hour or so; just can't seem to figure out. I have an <code>asp:Button</code> on an aspx page, required to complete a couple of functions, one of which is to change the text of an <code>asp:Label</code>. This seems like it should be simple and other online posts indicate that I'm app...
c# asp.net
[0, 9]
1,707,721
1,707,722
How to remove class with this JS function
<p>This function is set up so it simply finds the -a's- within the class of menu-option-set, and says, upon click, add the class "selected" and remove the class "selected" from all others within that list.</p> <p>What I want to do is simply have it so if you click the item that already has the class of "selected" then...
javascript jquery
[3, 5]
1,542,753
1,542,754
jquery saving data in array
<p>I want to save and add on every click data to an array. I tried this </p> <pre><code>var data = []; var save = []; s=0; i=0; some called function(){ data[i++] = some result; data[i++] = some other result; } $('#someelement').click(function(){ save[s++] = data; console.log(save); // for debugging i = 0; data =...
javascript jquery
[3, 5]
2,827,212
2,827,213
GET parameter after routing with RouteTable
<p>I am using RouteTable from System.Web.Routing for routing. </p> <pre><code>RouteTable.Routes.MapPageRoute("gallery-handler", "Gallery/1234.ashx", "~/Handlers/Gallery.aspx?id=1234"); </code></pre> <p>How can i access GET parameter (id) in Page.</p>
c# asp.net
[0, 9]
480,666
480,667
How to remove link property when click on the link with javascript?
<p>I have a working code. What I want is when user click promo code link, the link property will be removed and will be non functional anymore. This is the working example <a href="http://jsfiddle.net/5DbN3/" rel="nofollow">http://jsfiddle.net/5DbN3/</a></p> <pre><code>&lt;script language="javascript"&gt; function ...
javascript jquery
[3, 5]
1,274,423
1,274,424
How can I make a countdown timer in PHP?
<p>How can I make a countdown timer in PHP which starts at 40 seconds and counts in this format:</p> <blockquote> <p>40.59 - 40.48 - 40.47 - etc etc</p> </blockquote> <p>I also need a button that resets it.</p> <p>Is this possible in PHP? Do I need to use JavaScript?</p>
php javascript
[2, 3]
5,740,594
5,740,595
Using a string argument to represent an object
<p>If I have the following code:</p> <pre><code>TextBox txtUsername = new TextBox(); void setEnabled(string str, bool enable) { // use str to find the TextBox object // str.Enabled = enable; } </code></pre> <p>Is this kinda thing even possible?</p> <p>I want to be passing in 'Username' and then be prepending...
c# asp.net
[0, 9]
2,505,472
2,505,473
cms to implement survey module
<p>I haven't worked with content management systems .. As per my project requirements There are questionnaires added at back end and user takes up the survey and answers the questionnaire.. The questions added at back end needs to be versioned.. can anyone suggest a cms which suits the requirement preferably in java or...
java php
[1, 2]
4,295,625
4,295,626
Pass php two dimensional array to javascript and access the values
<p>I can pass an array to javascript from php using Json_encode like this</p> <pre><code>initiate_database(json_encode($_SESSION["ONE_DIMENSION_ARRAY"]); </code></pre> <p>and access the same array easy like this</p> <pre><code>function initiate_databse(database) { var local_array = database; window.alert(local_a...
php javascript
[2, 3]
80,655
80,656
C# display pdf document in iframe in asp.net page
<p>how can i display pdf document in iframe in c# web page:i have a drowpdownlist linked with pdf files,what i need is when i select one item from this list ,iframe will populated with the corresponding pdf document</p>
c# asp.net
[0, 9]
5,774,851
5,774,852
get radio box value in jquery
<p>Am I under the wrong impression that jquery or JS can retrieve the values of radio buttons in a form? The reason i ask is because in my code the script i use to check for all fields in a form, does not seem to recognise the value in <code>id="contact2"</code> in the form, which is a radio group. I have posted my cod...
javascript jquery
[3, 5]
2,421,659
2,421,660
Something in my initiation is causing the app to crash. I'm fresh out of ideas if anyone can help I will be greatfull
<p>The catlog says that the first for cycle completes and the crash happens at the second one. This is the <code>init</code> method for a very simple game.</p> <pre><code>private void init() { Resources res = this.getResources(); int x=R.drawable.crystal0000; for(int i=0;i&lt;=1...
java android
[1, 4]
5,195,825
5,195,826
How to stop link button refreshing the page
<p>In my code I'm using a link button called <code>updateLogButton</code> which shows/hides a div. Because I use a link button everytime its clicked focus is moved to the beginning of the page. How can I stop this default behaviour?</p> <p>Jquery snippet:</p> <pre><code>$('#updateLogText').hide(); $('#updateLogButto...
javascript jquery
[3, 5]
521,448
521,449
jquery class selection
<p>I am having a hard time trying to figure out how to properly select a class inside the menu. </p> <p>It worked fine until I put the menu in a ul. Can anyone tell me what is going on and how to fix it?</p> <p><a href="http://jsfiddle.net/nategines/7XrUk/" rel="nofollow">http://jsfiddle.net/nategines/7XrUk/</a> </p>...
javascript jquery
[3, 5]
168,055
168,056
Use Jquery to get data value and supply it to a session variable
<p>I need help cause I am a total newb on this.</p> <p>I set up a session in my header:</p> <pre><code>session_start(); $_SESSION['catname'] = $catname; </code></pre> <p>Which I retrieve in my single pages:</p> <pre><code>$catname = $_SESSION['catname']; session_destroy(); </code></pre> <p>I have several divs, e...
php jquery
[2, 5]
5,678,915
5,678,916
Complete CONNECTIVITY_SERVICE test
<p>My application connects to the internet onCreate, it does this in an AsyncTaks class and all works fine. I have some error checking in place to make sure there is internet available and works great if I say put my phone on Flight Mode.</p> <p>My problem is when I’m on WIFI, where I live the WWW drops out from time...
java android
[1, 4]
1,601,911
1,601,912
How can I dynamically change text based on input field?
<p>How can I dynamically change a link based upon an input field in a form. For example, if I input <code>1.00</code> into the input field, I want to change the link to this:</p> <p><code>donate.php?amount=1.00</code></p> <p>Where the amount changes to the amount specified in the input field.</p> <p>I'm guessing its...
php jquery
[2, 5]
1,710,395
1,710,396
Hiding radio button list items based on selection of a item in other radiobutton list using jquery
<p>In my scenario I have 2 radio button lists(asp.net server controls). If I select an item in my 1st radio button list then two items in the 2nd radio button list should not be visible.</p>
jquery asp.net
[5, 9]
739,884
739,885
focus() will not work
<p>I am at a loss here, never had a problem with this before.<br> I cannot get focus() to work at all in any browser. I'm using jquery and can't even get it to work with standard javascript. I tried adding the timeout as well but still nothing. All I get in the alert is "undefined".</p> <p>Here is the input</p> <pr...
javascript jquery
[3, 5]
791,058
791,059
Add a property to already created Type at runtime C# ASP.NET
<p>I had a requirement of generating classes and its objects at runtime. Hence, looking at <a href="http://mironabramson.com/blog/post/2008/06/Create-you-own-new-Type-and-use-it-on-run-time-%28C%29.aspx" rel="nofollow">this article</a> I created the same. (using )</p> <p>I am storing all created types in a list.</p> ...
c# asp.net
[0, 9]
4,808,108
4,808,109
Simple way to obfuscate javascript code by PHP
<p>I want to give a free download to my web visitor but I will hide the download link until they click the facebook like button. After they like it then jquery will make the button active and add 'href' attribute to the tag, contains path to the file, so then user will be able to click the link and download the file. ...
php javascript jquery
[2, 3, 5]
340,252
340,253
Android image resize
<p>I have images stored on sd card(size of each ~ 4MB). </p> <p>I want to resize each, than set it to ImageView. </p> <p>But I cannot do it using <code>BitmapFactory.decodeFile(path)</code> becouse Exception<br> <code>java.lang.OutOfMemoryError</code> is appeared. </p> <p>How can i resize image without loading it in...
java android
[1, 4]
4,442,441
4,442,442
Multiple JavaScript Issue
<p>I include the following in my header</p> <pre><code>&lt;!-- scripts --&gt; &lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="./js/script.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="./js/j...
javascript jquery
[3, 5]
5,461,511
5,461,512
Android dialog crashes, when I try to change its image
<p>I've made my custom android dialogue, but when I try to dynamically change an imageview inside it, the application crashes.</p> <pre><code> Dialog dialog = new Dialog(this,R.style.myBackgroundStyle); dialog.setContentView(R.layout.dialog); dialog.show(); ImageView ivDialogLetter = (ImageView) findV...
java android
[1, 4]
4,625,538
4,625,539
HttpURLConnection error: java.net.SocketTimeoutException: Connection timed out
<p>I am using simple urlconnection like this: </p> <pre><code> url = URL+"getClient&amp;uid="+cl_id; URL url = new URL(this.url); Log.d("Set++","get_t URL: "+ url); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); </code></pre> <p>its working fine, but sometimes i get t...
java android
[1, 4]
549,038
549,039
C# - List all .aspx pages in a domain
<p>I'm trying to write a console app that lists all of the aspx pages in a domain, there's about 50 or 60 pages and I'm all out of ideas on how to list them.</p> <p>The pages are not hosted locally and I have no access to them apart from the login page, all I was given was the list of sites to output and so far, I've ...
c# asp.net
[0, 9]
5,026,661
5,026,662
How to Overwrite first some bytes of a file with different bytes in android
<p>I have a problem that I want to overwrite first 2^21 bytes of a video file with another 2^21 bytes, but I don't know how to do that? Please suggest me the right solution for the same.</p> <p>Thanks in advance.</p>
java android
[1, 4]
2,583,421
2,583,422
Preventing the SearchView from collapsing
<p>I have a <code>SearchView</code> in my action-bar. When the user searches, I invoke my <code>AsyncTask</code> to begin fetching the data but after the data is retuned, the <code>SearchView</code>collapses.</p> <p>Here's my code that creates the search widget:</p> <pre><code>public boolean onCreateOptionsMenu(Menu ...
java android
[1, 4]
4,572,373
4,572,374
how to prevent user from typing any non-numbers in the input field in real time using jquery?
<p>yes, as my question says..how to prevent the user from typing non-numeric characters in the input field? ..like e.g when they attempt to type alphabets or special characters, the cursor won't move at all inside the input field ?</p> <pre><code>&lt;input id="1stfield" name="1stfield" value="" readonly/&gt; </code></...
javascript jquery
[3, 5]
1,050,642
1,050,643
Javascript: clearTimeout seems to only suspend, not reset or clear?
<p>I am very new to JS and am trying to modify the JavascriptKit jQuery-based megamenu system to delay showing the menu until the mouse has been hovering over the anchor object for a specified time.</p> <p>The problem I am facing right now is that it seems that the clearTimeout that is called on mouseout only suspends...
javascript jquery
[3, 5]
5,778,350
5,778,351
A page should be opened only in a window
<p>I have a small application in PHP in which when a button (<code>type='button'</code> and not <code>type='submit'</code>) is clicked, a new window is opened and a page is loaded into that window. Some insertion operations into the database are performed on that page on the window using Ajax.</p> <p>The page which is...
php javascript
[2, 3]
5,446,733
5,446,734
a little complex Linq2SQl insert operation (Dynamic user control and page insertion)
<p>i am really trying to do this but i am failing to find a way.</p> <p>here is the scenario, i got a blog module i made for my clients, because it is a repeatative task, so i all i have to do is to just upload it to new client and he can start blogging, but some clients need extra custom fields, let us say he wants t...
c# asp.net
[0, 9]
1,407,673
1,407,674
JQuery Sync Selected Radio Button between 2 radio button groups
<p>I know it can be done with input boxes using keyup paste on JQuery but what about Radio buttons?</p> <p>Example:</p> <p>User Selects option from Area A (radio button) and it selects(syncs) area B</p> <pre><code>&lt;!--AREA A (Source) --&gt; &lt;input id="radio_A" name="radio_A" type="radio" value="Value1" /&gt; &...
javascript jquery
[3, 5]
1,454
1,455
How queries are sent back in an HttpRequest
<p>I'm going to try to use the <a href="http://msdn.microsoft.com/en-us/library/system.net.webclient%28VS.80%29.aspx" rel="nofollow">WebClient</a> object in .NET to grab the response querystring values sent back by the resource.</p> <p>I'm familiar with grabbing xml, json, etc. but typically I haven't worked with many...
c# asp.net
[0, 9]
5,547,319
5,547,320
Why do spaces appear in my string?
<p>I have this function below which returns all IDs of checked boxes on my page seperated by a comma. It works great but the problem is, it seems to put a lot of white space after each checkbox ID. I can't seem to figure out why?</p> <pre><code>/*Returns selected checkbox ID in string seperated by comma */ function ge...
javascript jquery
[3, 5]
296,624
296,625
how to display 3 items at each slide when pulling the data from db and not via static html?
<p>I was looking at the docs of this slider document</p> <pre><code>http://www.slidesjs.com/#docs </code></pre> <p>and i can't seem to find how to display 3 items at a slide e.g if I have a $data object and did a php foreach loop like e.g</p> <pre><code>foreach($data as $item){ //echo out ul li to display image of ...
php javascript jquery
[2, 3, 5]
582,991
582,992
Face recognition library in android
<p>I there any Face recognition sdk/library available that one can use in to android ?</p> <p>whenever i search on google i just came across Recognizr , so does anyone has any idea about sdk or something like that which helps the developer in developing face recognition application </p>
java android
[1, 4]
2,937,857
2,937,858
Real time web site using PHP or ASP.NET
<p>I'm looking for a way to put real time features into my web site.</p> <p>The idea is asynchronous communication between 2 people - like a chat session. If I use the chat example - I'd like the second person to know that the first one has sent a message to him, without refreshing or doing something active on the web...
php asp.net
[2, 9]
748,792
748,793
.each loop are not executed completely ... why ? ( code and log available )
<p>var idd;</p> <pre><code>$.each(data, function (i, items) { //1st each $.each(items, function (j, item) { // 2nd each console.log("Field:" + j + " Value:" + item); if (j=="sha_id"){ idd=item; } }); console.log("Items"); console.log("ID:" + idd); db.transaction(function (tx) { ...
javascript jquery
[3, 5]
5,865,212
5,865,213
menu items doesn't work on click
<p>I want to add menu in my application,but it does not working. Menu's items display correctly but when i select one of them, then nothing happened. Also i want to show an alert dialog on item2. plz help me. I am new to android.</p> <p>thanks in advance</p> <p>i have tried this</p> <pre><code>public boolean onCreat...
java android
[1, 4]
4,067,669
4,067,670
can you tell how to bring the image in image view
<p>I am using camera in my application.Once i click the button to capture an image i need to get the same image in the image view which is placed right side of the preview immediately.Please tell me the code</p>
java android
[1, 4]
1,136,112
1,136,113
jQuery: clone input field without losing keyCode functionality
<p>Been trying to build jQuery support into a text input where pressing return duplicates the div container into the space right below it. What I can't figure out is how to focus on the input field inside the newly-created div automatically, and, even more frustrating, why that new input field loses the functionality t...
javascript jquery
[3, 5]
3,497,259
3,497,260
Word wrap in multiline textbox after 35 characters
<pre><code>&lt;asp:TextBox CssClass="txt" ID="TextBox1" runat="server" onkeyup="CountChars(this);" Rows="20" Columns="35" TextMode="MultiLine" Wrap="true"&gt; &lt;/asp:TextBox&gt; </code></pre> <p>I need to implement word-wrapping in a multi-line textbox. I cannot allow users to write more t...
javascript jquery asp.net
[3, 5, 9]
477,441
477,442
How to constructing Javascript Array with predefined format
<p><strong>From AJAX Call i am constructing this data in my server</strong> </p> <pre><code>{data:[{one:"1",two:"2"},{one:"3",two:"3"}]} </code></pre> <p><strong>I am able to access this data using data.jobs[2].one;</strong></p> <p>My question is that , is it possible to construct a similar array inside javascrip...
javascript jquery
[3, 5]
1,262,858
1,262,859
How to insert text at the current caret position in a textarea
<p>On a function call from an image, I am trying to insert the alt tag value from the image into the textarea at the position where the caret currently is.</p> <p>This is the code that I currently have which inserts the alt tag value to the end of the text area.</p> <pre><code> $("#emoticons").children().children(...
javascript jquery
[3, 5]
3,321,938
3,321,939
jQuery animation - making an image visible from left to right
<p>I am trying to make an image hidden hidden using jQurey. I am using .hide() function. I am applying it to div containing the image which has to be hidden. Its not working for some reason. I have created a fiddle. </p> <p>Is it possible to to an animate so that the image becomes visible from right to left in say 1 s...
javascript jquery
[3, 5]
268,062
268,063
How to get last folder name from folder path in javascript?
<p>In javascript/jquery, given a path to a folder like:</p> <pre><code>"http://www.blah/foo/bar/" </code></pre> <p>or</p> <pre><code>"http://www.blah/foo/bar" (this one doesn't have a slash in the end) </code></pre> <p>How can you extract the name of the last folder? In this case it would be <code>"bar"</code>.</p...
javascript jquery
[3, 5]
5,266,081
5,266,082
coloring a substring in a label
<p>I have the following label element where I'd like the asterisk to be colored red.</p> <pre><code>&lt;label&gt; Lastname * &lt;/label&gt; </code></pre> <p>How can this be done using jQuery, or otherwise?</p>
javascript jquery
[3, 5]
3,369,136
3,369,137
trouble mixing jquery and js
<p>Hey guys I'm a noob to jquery and I've heard it's okay to mix jquery with pure javascript, but I'd like to know if that is what's causing the following code not to work or is it something else that I'm doing wrong?</p> <pre><code>var fnd_child = $('#thumb_slider').children().length; $(document).ready(function(){ ...
javascript jquery
[3, 5]
3,035,244
3,035,245
Onmouseover data keep autorefresh
<p>I have a code like this below :</p> <pre><code>$(document).ready(function() { $("#content2").load("post_rf.php"); // set your initial interval to kick it off var refreshInterval = setInterval(function() { $("#content2").load('post_rf.php?randval='+ Math.random()); }, 1500); // bind an ev...
php javascript jquery
[2, 3, 5]
5,774,784
5,774,785
Does Handler work between processes?
<p><strong>In RemoteService (separate process)</strong></p> <pre><code> catch (ConnectException c) { TweetViewActivity.h.sendEmptyMessage(0); } </code></pre> <p><strong>TweetViewActivity</strong></p> <pre><code> static public Handler h; class LooperThread extends Thread { ...
java android
[1, 4]
2,520,098
2,520,099
Given two objects, how can I update one objects properties based on another
<p>I am trying to match update an object's property based on another object's property. The property names must match. A very simple example of what I am trying to achieve would look like this:</p> <p>Given two objects:</p> <pre><code>var obj1 = { one: "1", two: "2", three: { threeDotOne: "3.1", ...
javascript jquery
[3, 5]
2,872,992
2,872,993
jQuery plugin using reveal prototype pattern
<p>I'm developing a jQuery plugin using the reveal prototype pattern, I'm having some trouble to instantiate my object. Below, the code of the plugin :</p> <pre><code>(function($) { var GammadiaCalendar = function(elem, options) { this.elem = elem; this.$elem = $(elem); this.options = options; }; Gammadi...
javascript jquery
[3, 5]
2,822,203
2,822,204
Get height of dynamically created element
<p>I created one div dynamically and tried to get its height. I didn't assign fixed height to it. But its content is assigned a fixed height. So I tried to get its render height. </p> <pre><code>$(function(){ $services = $(&lt;div id="services"&gt;&lt;/div&gt;); $img = $(&lt;img src="abc.jpg" height="100px" w...
javascript jquery
[3, 5]
4,357,810
4,357,811
How to load a php file on page load (jQuery provided)
<p>Each article of my site has a unique ID number. When a user clicks to read an article I use a function to get the current's article ID, so the option of the same value in a drop down list to be selected automatically. </p> <p>For example if I click in the article with ID = 79</p> <pre><code>&lt;option value="0" &g...
php javascript jquery
[2, 3, 5]
148,767
148,768
asp.net unable to locate a resource file
<p>Im attempting to utilize some custom script and css files within an asp page. In Visual Studio 2010 I am not getting any warnings or errors as to the status of these files, but when I attempt to run the page, and I open the javascript console I get the error: </p> <pre><code>Failed to load resource: the server res...
javascript asp.net
[3, 9]
2,873,090
2,873,091
Using classes in android - working with Context and helper classes
<p>I am still newbie to android, please could someone help. I want to use methods from the Net class as follows:</p> <pre><code>package com.test; import android.app.Activity; import android.os.Bundle; import android.view.Window; import android.widget.TextView; public class MyApp extends Activity { /** Called wh...
java android
[1, 4]
382,021
382,022
hover out function
<pre><code>jQuery("#markets_served").hover(function(){ jQuery.data(document.body, "ms_height", jQuery(this).height()); if(jQuery.data(document.body, "ms_height") == 35) { jQuery(this).stop().animate({height:'195px'},{queue:false, duration:800, easing: 'easeOutQuad'}); jQuery("#btn_ms_close").css...
javascript jquery
[3, 5]
4,472,562
4,472,563
Sequential arithmetic operation in javascript
<p>I've a text input and user will write a string for example <code>10+20-10-2*2+4/2</code> and I want to do an arithmetic operation sequentially, which means I want to <code>(10+20)-(10)-(2)*(2)+(4)/(2)</code> and the result should be <code>20</code> according to above example.</p> <p>In other words I want to do the ...
javascript jquery
[3, 5]
3,596,441
3,596,442
JavaScript/jQuery validation for text box
<p>I have a texbox that is like this:</p> <pre><code>&lt;input type="text" size="30" name="form[id]" id="form_id"&gt; </code></pre> <p>I need a JavaScript function that will validate:</p> <ol> <li>No Spaces allowed.</li> <li>Only numbers, letters, dashes(-) and underscores(_) allowed and no other special character a...
javascript jquery
[3, 5]
5,984,384
5,984,385
Timeout for javascript execution
<pre><code>jQuery(document).click(function () { jQuery('.close-news').css('display', function(){return jQuery('#colorbox').css('display');}); }); </code></pre> <p>I have this script, which make my link appear\dissappear depends on state of #colorbox block. But somewhy link appear\dissappear not immediatelly, ...
javascript jquery
[3, 5]
586,153
586,154
How to know that provided device tokens are real?
<p>I'm developing server-side for IPhone app. This app has ability to subscribe on events (push notifications). Is it possible to know that provided devide token is real (to prevent spam)? I'm afraid that somebody can subscribe millions fake devices and my "push" service will be overwhelmed.</p>
c# iphone
[0, 8]
943,483
943,484
Get folder name from full file path - C#, ASP.NET
<p>How to get the folder name from the full path of the application?</p> <p>This is file path,</p> <p>"c:\projects\roott\wsdlproj\devlop\beta2\text"..</p> <p>Here "text" is the folder name.</p> <p>How can I get that folder name from this path?</p>
c# asp.net
[0, 9]
3,261,333
3,261,334
Javascript matching to see if an email or phone number has been supplied
<p>I created a contact form with a text area input only field, which allows the end user to fill out and include a method on how to be contacted. They can choose to enter an email, phone number or both within their message.</p> <p>I am using jQuery along with javascript to process the form and check if a contact metho...
javascript jquery
[3, 5]
4,239,711
4,239,712
jQuery Template Formatting with Comma
<p>I have the following template. I want to display the categories with a comma in between. How do I do it?</p> <p>Currently it is without comma using <code>Categories: {{each categories}} &lt;i&gt;${$value}&lt;/i&gt; {{/each}}</code></p> <p>Note: There should be no comma after the last item. Also all items should...
javascript jquery
[3, 5]
770,973
770,974
jquery Element to DOM Element returns empty string by function
<p>Why does this code:</p> <pre><code>function fn(el){ return $(el)[0].style.width }; fn('#someElementIdId'); // return -&gt; "" </code></pre> <p>But this code...</p> <pre><code>function fn(el){ return $(el).width() } ; fn('#someElement'); // return -&gt; correct width </code></pre> <p>I have tried different thi...
javascript jquery
[3, 5]
3,416,090
3,416,091
get word click in paragraphs
<p>I have an HTML document with about 30,000 words in it. </p> <p>I'd like to be able to do something when a user clicks any word. For simplicity/concept right now, I'd just like to <code>alert()</code> that word.</p> <p>For example, in the paragraph about, if I were to click on "have" it should run <code>alert("have...
javascript jquery
[3, 5]
824,265
824,266
Java Threading Error IllegalThreadState thread already started
<p>Whenever I start my thread I always do this check. I did not find anywhere that I called start on thread without doing the check below</p> <pre><code>if (!myThread.isAlive()) myThread.start(); </code></pre> <p>Nevertheless, I end up with IllegalThreadStateException : Thread already started. This actually cra...
java android
[1, 4]
109,134
109,135
ASP.NET content display
<p>I am building a profile page in asp.net and it has two tabs(Horizontally), one for profile and one for settings. If a user navigates between tabs, he will see the settings page and the profile page. I know two ways to implement this.</p> <ol> <li><p>Code the page contents in the page and use javascript to hide them...
javascript asp.net
[3, 9]
5,580,162
5,580,163
difference between Immediately-Invoked Function and jQuery Immediately-Invoked Function
<p>i have read that <code>(function(){})();</code> is called immediately and doesn't need to be called. and <code>$(function());</code> is also immediately called.</p> <ul> <li>are they both and have same functionality ?</li> <li>does the Immediately-Invoked Function loaded after the document is completely loaded ?</l...
javascript jquery
[3, 5]
555,377
555,378
Delay a ready function() in javascript or jquery
<pre><code>//this code animates the divs to the left after every 5 secs $(document).ready(function() { var refreshId = setInterval(function() { $('.box').each(function() { if ($(this).offset().left &lt; 0) { $(this).css("left", "150%"); } else if ($(this).offset().le...
javascript jquery
[3, 5]
4,710,487
4,710,488
Use jQuery to change the background image effect
<p>I am trying to use jQuery to change the effect of my background picture.</p> <p>Here is my jquery:</p> <pre><code>$("#piceffect").change(function() { $('#backgroundpicture').css({'background-image': 'repeat'} }); </code></pre> <p>How would I go about getting the background image in my div "backgroundpicture" to r...
javascript jquery
[3, 5]
6,003,609
6,003,610
Jquery trigger() is not working on document ready
<p>I tried a lot of variations of this but it doesn't seem to work.</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ $('#slide_click').trigger('click'); }); &lt;/script&gt; </code></pre> <p>This should triggers a button with an onclick event when the d...
javascript jquery
[3, 5]
2,905,946
2,905,947
Run SpeechRecognizer during call
<p>Is there a way to run SpeechRecognizer while being in a call? I have done it this way:</p> <ul> <li><code>BroadcastReceiver</code> handles change in phone state (e.g. offhook).</li> <li>the <code>SpeechRecognizer</code> is started in the current (main) thread, as it can only be started in the main thread. The appli...
java android
[1, 4]
3,743,029
3,743,030
javascript closure not working as it should
<p>see the first code:</p> <pre><code> var count = 0; (function addLinks() { var count = 0;//this count var is increasing for (var i = 0, link; i &lt; 5; i++) { link = document.createElement("a"); link.innerHTML = "Link " + i; link.onclick = function () { count++; alert(count); ...
javascript jquery
[3, 5]
1,662,916
1,662,917
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]