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,878,203
1,878,204
How to add a class in a div somewhere else in the DOM with jQuery?
<p>How can add class <code>.jokjok</code> in the <code>div</code> next of <code>input[bdate]</code>?</p> <p><strong>Example:</strong> <a href="http://jsfiddle.net/cLNJE/1/" rel="nofollow">http://jsfiddle.net/cLNJE/1/</a></p> <p>This code did not work for me:</p> <pre><code>&lt;button&gt;Click Me&lt;/button&gt; &lt;d...
javascript jquery
[3, 5]
3,231,378
3,231,379
closer browser window.close not working
<p>I would like to close the browser window using javascript on button click this is what I tried</p> <pre><code>&lt;script type="text/javascript"&gt; function OpenMyWin() { window.open('', '_self'); window.close(); } &lt;/script&gt; &lt;asp:Button ID="btn" runat="server" Text="Close" OnClient...
javascript asp.net
[3, 9]
5,941,416
5,941,417
Call the same instance of jQuery plugin
<p>I have written a jQuery plugin below and would like to be able to call it again for the same instance on an element.</p> <p>The plugin goes...</p> <pre><code>(function($) { $.fn.myPlugin = function(options){ var settings = { color: null }; if (options) { $.ex...
javascript jquery
[3, 5]
1,201,122
1,201,123
Android layout doesn't stretch on full screen
<p>I have a problem with layout which won't stretch within high resolution like 1024x600.</p> <p>As root layout I use RelativeLayout with following style:</p> <pre><code> &lt;style name="DefaultLayout"&gt; &lt;item name="android:layout_width"&gt;fill_parent&lt;/item&gt; &lt;item name="android:layout_h...
java android
[1, 4]
5,592,992
5,592,993
Asp.net theme not applied to derived pages
<p>We have an ASP.net 2.0 web application which is using themes set on the application level using web.config. The theme gets applied correctly for any web page that inherits from Page. The problem is that theme doesn't get applied to our base page which is also inherits from Page.</p> <p>Suppose our base page is call...
c# asp.net
[0, 9]
3,213,577
3,213,578
How do I figure out what options to use with jQuery's support function?
<p>I was working with the following javascript code(in order to put a calendar-picker in an SSRS page), but I realized it didn't even work because it's deprecated and not supported. They said that the <code>.browser.webkit</code> function should not be used..</p> <pre><code>$(document).ready( function () { ...
javascript jquery
[3, 5]
1,816,315
1,816,316
How to calculate the time difference?
<p>How can i do the calculation to get the time difference. I have both the time of the server and the time of the client system in <code>isoDate</code> date format. Here are the output data i have :</p> <p>Server time which is in UTC converted to local sytem timezone time : </p> <p><code>Tue May 22 2012 14:29:51 GMT...
javascript jquery
[3, 5]
4,637,187
4,637,188
jQuery Easing Bounce
<p>I am trying to add a bounce effect to my animation but am having trouble doing so. I have been following the <a href="http://api.jquery.com/animate/" rel="nofollow">jQuery API animate() page</a> but I keep failing. I am trying to create an effect where my object slides in from the top and bounces before settling int...
javascript jquery
[3, 5]
763,053
763,054
Web site does not show ( Says its down) , no user code is called
<p>The site loads app_offline.htm.</p> <p>The application used to load fine, im not sure whats wrong and im looking for a pointer. Its failing to load on the application. This hosted on the development asp.net server</p> <p>To get this call stack i have to enable A first chance exception in System.Web.HttpExecption, ...
c# asp.net
[0, 9]
3,314,600
3,314,601
Handle a link in the Android browser/webview to start directly an application
<p>I want my application to be opened from a link, by following the directions of <a href="http://stackoverflow.com/questions/3469908/make-a-link-in-the-android-browser-start-up-my-app/3472228">Make a link in the Android browser start up my app?</a> <br/> Well, it works fine (most of the time.... this is the reason I a...
java android
[1, 4]
3,991,181
3,991,182
Use javascript to change second select list based on first select list option
<p>I have two drop-down lists populated from an array of same dates stored in a database. I want to use javascript or jquery to change the second drop-down list based on the selection from the first list. So an example would be if the user selects 03/03/2012 in the first, start date list, then I'd like the second list ...
javascript jquery
[3, 5]
5,667,402
5,667,403
Check whether user is currently online (live)
<p>I've recently finished my application and I've got a huge problem. I need to allow only 1 user to access it at a time. There is an index page accessible for every user everytime and "start" button. When user clicks start, the application locks and other ppl need to wait until the user finishes. When the user closes ...
php jquery
[2, 5]
2,427,767
2,427,768
jquery escape html tag
<p>Really a simple question. I tried to use jquery to insert html table rows. One of my rows has value with a subscript. So my question is what is the correct way to do this? Below is my broken code:</p> <pre><code>$('&lt;td&gt;&lt;input type="text" size="5" name="a" value="&lt;sub&gt;b&lt;/sub&gt;" id="id_a"/&gt;&lt;...
javascript jquery
[3, 5]
1,083,139
1,083,140
Accessing the height of div in javascript
<p>I have a div :</p> <p><strong>css</strong></p> <pre><code> div { width: 200px; height:auto } </code></pre> <p><strong>markup</strong></p> <pre><code> &lt;div contenteditable="true"&gt; Text is editable &lt;/div&gt; </code></pre> <p>Now what should i do to access the <code>height ( numeric value )</code> of...
javascript jquery
[3, 5]
4,548,216
4,548,217
How Do I Select a `td` Element in a Row That Has a Checkbox That is Checked?
<p>I have a table that looks somethings like this:</p> <pre><code>&lt;table&gt; &lt;tr class="row even"&gt; &lt;td&gt;&lt;input type="checkbox" /&gt;&lt;/td&gt; &lt;td class="name"&gt;foo&lt;/td&gt; &lt;td class="metric"&gt;22&lt;/td&gt; &lt;/tr&gt; ...etc </code></pre> <p>What I want to do is get ...
javascript jquery
[3, 5]
894,337
894,338
Javascript function in PHP fromCharCode()
<pre><code>var test = String.fromCharCode(112, 108, 97, 105, 110); document.write(test); // Output: plain </code></pre> <p>Is there any PHP Code to work as <code>String.fromCharCode()</code> of javascript?</p>
php javascript
[2, 3]
4,268,392
4,268,393
Change Action of 'Done' Button on Virtual Keyboard Android
<p>All- I looked at other questions relating to this topic and found out that according to the android development website: "the action key performs a "done" operation, typically meaning the IME will be closed." My question is <strong>how do I edit the action of the done button to make it so it calls one of my methods ...
java android
[1, 4]
824,113
824,114
ConcurrentModificationException on removing Overlay from MapView's overlayList
<p>I'm trying to search for a custom ItemizedOverlay that contains certain data... I keep getting a ConcurrentModificationException on the for-loop when i'm trying to run through all the overlays of my MapView.</p> <p>I hope somebody knows the answer to this problem...</p> <p>here's the code:</p> <pre><code> @Ove...
java android
[1, 4]
80,770
80,771
assign data from table to labels using c#
<p>I'm using c# in a ASP.Net web application.I have the following query:</p> <pre><code>SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["chestionar"].ConnectionString); con.Open(); SqlCommand cmd = new SqlCommand("select * from personal,Intrebari where personal.cod_numeric_personal=@cnp AN...
c# asp.net
[0, 9]
453,212
453,213
Get selected element type
<p>I want to get the type of element, that I've got selected using jQuery selectors.</p> <p>Markup:</p> <pre><code>&lt;select name="a"&gt;&lt;/select&gt; &lt;input name="b" type="text" /&gt; &lt;textarea name="c"&gt;&lt;/textarea&gt; </code></pre> <p>Javascript:</p> <pre><code>var field_names = new Array( 'a', ...
javascript jquery
[3, 5]
5,824,693
5,824,694
A very strange for loop bug in Java for Android?
<p>I'm trying to alter the attributes of an array of Buttons, however I am getting some very strange errors. I am trying to loop through the buttons to edit the height attribute of each one, however when I set up a for loop (i=0; i&lt;3; i++), buttonSkater[i].setHeight(buttonHeight); the result seems to be that 9 butto...
java android
[1, 4]
5,254,201
5,254,202
How to remember changes of html attributes which are changed by jquery
<p>I am using jquery function which changes the class of element</p> <pre><code> $("a").click(function(){ $(this).closest("ul").find("a").parent().removeClass("active"); $(this).parent().addClass("active"); }); </code></pre> <p>but when i refresh page, there are no changes added. How to remember t...
javascript jquery
[3, 5]
682,957
682,958
adding rows dynamically using onclick function in javascript
<p>Am having a task in some onclick functions.I had a table in which each column contains a dropdown list or text box. one of the column contains a button.If i click that button the row with dropdownlist,textboxes including add button have to dynamically add as the next row.how can i do this?which will be better javas...
javascript jquery
[3, 5]
5,527,253
5,527,254
Upload notification
<p>I am using EFUMultiple Uploader to receive files on my site. Does anyone know of a tutorial that will teach me how I can be notified each time there is a new file or batch of files in my uploads folder?</p>
php javascript
[2, 3]
1,659,035
1,659,036
Adding value to list within list
<p>I have a list that has been populated from a fetchXML query, but unfortunately it is returning a lot of events with duplicate titles. So as a solution i'm hoping to loop through each item in the list and, if the title is the same as the previous item, then I would like to add the values from item.YearId &amp; item.Y...
c# asp.net
[0, 9]
5,516,560
5,516,561
Inserting a variable into jQuery .css
<p>I have a JavaScript Variable that stores the width of an element ,called popupWidth, in px, e.g. '200px'. The '' are part of the variable, because jQuery needs them. How can I insert the variable into jQuerys .css?</p> <pre><code>$(this).css({ width: + popupWidth, }); </code></pre> <p>The code above doesn't wor...
javascript jquery
[3, 5]
1,673,857
1,673,858
Key event doesn't work correctly in Google Chrome
<p>On my web site I have the ability for users to use search by pressing <kbd>Enter</kbd>, having typed a string in the search input field. Here is some jQuery code to illustrate this:</p> <pre><code>$(document).ready(function () { $('#search-input').on('keydown keyup keypress', function (event) { event = ...
jquery asp.net
[5, 9]
4,467,156
4,467,157
jQuery ajax POST params with ">" symbol problem
<p>I'm trying to get a textbox value which contains ">" symbol using jQuery ajax with POST method, but I'm not getting the textbox value with ">" symbol. I'm tired of find a solution, please could anyone help me to fix this problem.</p> <pre><code>&lt;div id="subi"&gt;&lt;input type="textbox" id="test"&gt;&lt;button o...
php jquery
[2, 5]
1,912,440
1,912,441
Getting the offset height of a div using javascript
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/11500253/accessing-the-height-of-div-in-javascript">Accessing the height of div in javascript</a> </p> </blockquote> <p>We're trying to alter <a href="http://www.marghoobsuleman.com/jquery-image-dropdown" rel="n...
javascript jquery
[3, 5]
3,009,481
3,009,482
Detecting a 64-bit jre in a 32-bit browser?
<p>Is there any way to detect a 64-bit java install in a 32-bit environment? The Java Deployment Toolkit detects nothing, but I was wondering if there was some secret browser way of detecting the 64-bit install client-side.</p>
java javascript
[1, 3]
5,459,626
5,459,627
How to trim variables without erring if the var is empty?
<p>I'm using the following for event tracking:</p> <pre><code>var dataTrack = e.split(','); // split by comma if (dataTrack !== undefined) { var action = dataTrack[0]; var values = {}; values[dataTrack[1]] = dataTrack[2]; mpq.track(action, values); } </code></pre> <p>How can I trim dataTrack[0], da...
javascript jquery
[3, 5]
215,840
215,841
Group multiple or statements within an IF in javascript
<p>The following code works:</p> <pre><code>$(".valClear").each(function () { if ($(this).val().indexOf(".png") == -1) { $(this).val(''); } }); </code></pre> <p>However this doesn't (the value is removed even if it contains .png or .jpeg), what am I doing wrong?</p> <pre><code>$(".val...
javascript jquery
[3, 5]
3,684,682
3,684,683
asp:DropDownList - invalid postback or callback argument when adding options via JavaScript/jQuery
<p>I have two dropdown lists:</p> <pre><code>&lt;asp:DropDownList ID="Field_Type" runat="server" /&gt; &lt;asp:DropDownList ID="Field_SubType" runat="server" /&gt; </code></pre> <p><code>Field_Type</code> is databound, with a list of types, populated from a database. <code>Field_SubType</code> is set via jQuery / AJA...
asp.net javascript jquery
[9, 3, 5]
5,324,954
5,324,955
how to update filed when user type somethin in field
<p>i create a field with this code </p> <pre><code>&lt;tr&gt;&lt;td&gt; &lt;input type="text" value="good" onfocus="if (this.value == 'good') {this.value=''}" onblur="if(this.value == '') { this.value='good'}" name="name" maxlength="254" class="required" /&gt;&lt;/td&gt;&lt;/tr&gt; </code></pre> <p>when user click o...
javascript jquery
[3, 5]
47,841
47,842
Check if a DIV exist before running some Javascript
<p>I am having a problem, on a blog I have this javascript code below that is used to get the Position of a DIV id <code>author-info</code>. The problem is this div is only on actual article pages and not on any of the directory pages or the index.</p> <p>So on these pages that do not have the div I get this error</p...
javascript jquery
[3, 5]
3,399,245
3,399,246
how to read item template field in c#
<p>I have one dropdown box inside the item template. As per of my requirement I need to update the tooltip field of drop down in aspx.cs page.</p> <p>I use the following code:</p> <pre><code>&lt;asp:TemplateField HeaderStyle-CssClass="grid-label-small" HeaderText="*State"&gt; &lt;ItemTemplate&gt; &lt;asp:DropDo...
c# asp.net
[0, 9]
2,015,436
2,015,437
Question regarding execution of JS code
<p>I just encountered with this code:</p> <pre><code>foo = (function() { var div = document.createElement('div'); return function(html) { div.innerHTML = html; var item = div.firstChild; div.removeChild(item); return item; }; })(); </code></pre> <p>and it is being used like...
javascript jquery
[3, 5]
4,948,196
4,948,197
detect user response in chat window
<p>i am making an interviewing chatbot using programO (i am new to php) in which i want to display a message if for long time there is no activity on chat window. i hav searched jquery plugins but they are for detecting mouse or keyboard strokes but i am just concerend with detecting that whether the chat window is upa...
php javascript jquery
[2, 3, 5]
6,032,798
6,032,799
Template Control events occurs in second click.Not on First Click
<p>i Don't know what i missing here.</p> <p>i have a gridview in which a template control contains a link button.At link button click i scroll down to bottom of page<code>[Focusing a Panel Control]</code>. See this how i doing the <a href="http://stackoverflow.com/questions/9360706/do-the-scrolling-in-client-brower-wi...
c# javascript asp.net
[0, 3, 9]
310,624
310,625
create persistent connection
<p>In my android application I am trying create persistent connection for downloading images. Here is my code </p> <pre><code> public class PersActivity extends Activity { ImageView img; String imageUrl="http://192.168.1.4/JRec/"; @Override public void onCreate(Bundle savedInstanceState) { sup...
java android
[1, 4]
2,853,239
2,853,240
How to split the string in JavaScript
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/96428/how-do-i-split-this-string-with-javascript">How do I split this string with JavaScript?</a><br> <a href="http://stackoverflow.com/questions/1493407/how-to-split-a-string-in-javascript">how to split a string ...
javascript jquery
[3, 5]
2,415,105
2,415,106
On Android, how can i write a code that allow us to click an operating button on the first page get the result of calculation on another next page?
<p>for example: on current page we have 2 Texteditors. We enter numbers to each of the field and then click a operator button to see the result that will be shown on the next page. ^^ help...</p>
java android
[1, 4]
4,824,427
4,824,428
Replace text on page depending on page URL
<p>We are already replacing text with images on the website but have run into a little problem due to the platform we're running on - which is proprietary and provides limited access.</p> <p>Our goal is to replace the price with an image, ONLY for this specific brand and all items within it.</p> <p>It seems that form...
java javascript jquery
[1, 3, 5]
3,813,882
3,813,883
How to tell if a page unload in ASP is a PostBack
<p>This seems like a common question but search is not returning anything.</p> <p>I have the following code that executes before the page unloads.The problem is if the unload is a postback i do not want to fire my warning to the user but i can't figure out how to differentiate between a postback and a user navigating ...
javascript jquery asp.net
[3, 5, 9]
2,669,066
2,669,067
Jquery find all except
<p>I have following HTML:</p> <pre><code>&lt;div id="123" class="test"&gt; &lt;div class="testMessage"&gt;Foo&lt;/div&gt; &lt;div&gt;&lt;div class="testDate"&gt;2010&lt;/div&gt;&lt;/div&gt; &lt;div id="127" class="test"&gt; &lt;div class="testMessage"&gt;Bar&lt;/div&gt; &lt;div&gt;&lt;div class="t...
javascript jquery
[3, 5]
1,312,684
1,312,685
How open a local file with the associated program from a web page?
<p>I know the user of my app has a local file named c:\sourcefile.cs, I need to find a way to render a link to that file so that when he clicks the link, it will open the file in Visual Studio.</p> <p>This is for internal use in our dev team so I don't mind using unconventional means to do that if there is no standard...
javascript jquery
[3, 5]
1,087,786
1,087,787
Trouble with click not unbinding
<p>I'm building a small adventure to help me understand some concepts of JQuery/Javascript and I've hit a snag.</p> <p>What I'm trying to do is by clicking on a "take" button and then on an item on the screen to move it to the inventory. Good news is, that all works. Bad news is that if I press another item without us...
javascript jquery
[3, 5]
3,554,114
3,554,115
JQuery function call from out of context
<p>A js/css template is provided to me. It is very talented in interactive event handling, but i am not talented on js/jquery.</p> <p>In its js library, there is a .js file, and the file has some code like:</p> <pre><code>(function ($) { ... })(jQuery); </code></pre> <p>most of thing happens in it.</p> <p>There are...
javascript jquery
[3, 5]
4,440,773
4,440,774
how to send form data through javascript?
<p>HTML code-</p> <pre><code>&lt;form&gt; .... &lt;a class="art-button" href="edit.php" &gt;Edit&lt;/a&gt; &lt;a class="art-button" href="#" onclick="show_confirm()"&gt;Delete&lt;/a&gt; &lt;/form&gt; </code></pre> <p>JavaScript-</p> <pre><code>&lt;script type="text/javascript"&gt; function show_confirm() { var r...
php javascript
[2, 3]
5,513,157
5,513,158
How to bind click events for popups in leaflet marker cluster
<p>Here is my code, I need to bind click event for ticketStatusCol class. </p> <pre><code>var map = new L.Map('map', {center : latlng, zoom : 1, layers : [cloudmade]}); var markers, prevStatus = null, archivedStatus, html = "", marker, title = ""; markers = new L.MarkerClusterGroup(); var html = ""; html += "&lt;div...
javascript jquery
[3, 5]
5,040,807
5,040,808
jQuery .resize() only works when making the window bigger
<p>I'm trying to resize the main content div #inhalt of my website so that it always fills all the space available. Basically I do this by setting a height of <em>total usable height</em> - <em>top position of #inhalt (pixels from top)</em> - <em>padding etc.</em>. This is my javascript/jQuery code:</p> <pre><code>$(d...
php jquery
[2, 5]
2,234,940
2,234,941
single quote to double quote , and , double quote to single quote in javascript
<p>I want to change </p> <p>every single quote to double quote and every double quote to single quote </p> <p>in jquery or js.</p> <pre><code>var myString = " tes't tes\"t tes\"t te'st "; console.log(myString); for (i = 0; i &lt; myString.length; i++) { console.log(myString[i]); if (myString[i] == "'") { ...
javascript jquery
[3, 5]
5,390,440
5,390,441
Syntax error, unrecognized expression: , $(selector).before(",");
<p>I've been using this one line of code for a couple of years now with jQuery 1.2.6.</p> <pre><code>$("#acListTemp div.amenitiesDiv label").before(","); </code></pre> <p>I just upgraded to jQuery 1.6.1 and now it is giving me this error:</p> <blockquote> <p>Syntax error, unrecognized expression: ,</p> </blockqu...
javascript jquery
[3, 5]
3,069,706
3,069,707
javascript 'over-clicking' bug
<p>I have a bug in Javascript where I am animating the margin left property of a parent container to show its child divs in a sort of next/previous fashion. Problem is if clicking 'next' at a high frequency the if statement seems to be ignored (i.e. only works if click, wait for animation, then click again) :</p> <pre...
javascript jquery
[3, 5]
1,742,381
1,742,382
how do i write a javascript alert box to give a yes or no question and integrate with php calls?
<p>i am trying to figure out how to create a javascript alert box asking the user if they would like to delete a record (that their viewing) and when the user presses yes a query is called through php to delete a database row. and if the user presses no nothing will happend.</p> <p>wondering how this can be done</p> ...
php javascript
[2, 3]
295,564
295,565
Cannot get disable button to work
<p>Hey guys, quick question, I have this javascript/jquery function that basically wraps an input in image brackets, and the first part of the function works, but the button does not disable after and I cannot figure out why (last line does not work). If anyone has an idea, let me know. Thanks in advance.</p> <pre><co...
javascript jquery
[3, 5]
1,156,834
1,156,835
jQuery AutoComplete missing?
<p>I was building something using jQuery's AutoComplete plugin last week, but today I found that it's not working.</p> <p>After some debugging, it seems that the external scripts I've been loading no longer exist:</p> <p><a href="http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgiframe.min.js" rel="n...
c# asp.net jquery
[0, 9, 5]
2,943,288
2,943,289
Send Enquiry Mail from ASP.net webpage
<p>I am working with an ASP.Net Application. In this application I have a form named 'Enquiry'. <code>Name,email,phone,feedback</code> etc fields are there in this 'Enquiry' form.</p> <p>Clients use this form to send their enquiries. How can I send these informations to an email id?</p>
c# asp.net
[0, 9]
783,229
783,230
how detect mouse click area in document - jquery - javascript
<p>I have a page with a div element in it. i want when i clicked on outer area of that div element, then fade it out.</p> <p>but i don't know how detect area of mouse click. how detect that mouse click point is out of div area or not?</p>
javascript jquery
[3, 5]
4,947,510
4,947,511
How to call the following function in JQuery
<pre><code>jQuery.fn.daterangepicker = function(settings){ var rangeInput = jQuery(this); //defaults var options = jQuery.extend({ ........ //function to format a date string function fDate(date){ if(!date.getDate()){return '';} var day = date.getDate(); </code></pre> <...
javascript jquery
[3, 5]
2,652,018
2,652,019
How do I do a jQuery load without a query string and arguments?
<p>I have a dumb network device that has limited HTTP hosting capabilities and I'm trying to write a slightly more dynamic page to display data with. A some current process values can be found in plain-text at <code>/temp.dat</code> on the device, but my stone-simple jQuery script...</p> <pre><code>$(document).ready(...
javascript jquery
[3, 5]
1,768,701
1,768,702
Replacing ASP.NET POSTBACK with jQuery form posting
<p>I have a login screen wheren i have 2 text boxes and 2 radio buttons.I have a ASP.NET button too.When the user clicks on the button in my codebehind, in the click even of button ,i have the below lines to check the user login</p> <pre><code> string emailId=txtEmailId.Text.Trim(); string password=txtPassword...
asp.net jquery
[9, 5]
2,315,515
2,315,516
If element contains child elements run function
<p>I have a carousel on my site, and if there are no elements my jquery seems to crash. </p> <p>My HTML output without elements is...</p> <pre><code>&lt;section class="gallery-viewport-twobedroomapartment viewer"&gt; &lt;ul&gt; &lt;/ul&gt; &lt;a id="simplePrevious"&gt;&lt;img alt="Left Arrow" src="_inc...
javascript jquery
[3, 5]
84,964
84,965
Problem in calling Python script from PHP
<p>This is my python script which creates a "test.txt" file when executed. when I execute using terminal (Ubuntu 11.04) <code>root@gml-VirtualBox:/var/www/HMS# python test.py</code>. It creates the "test.txt" in the <code>/var/www/HMS</code> directory as I expected.</p> <pre> test.py: #!/usr/bin/env python def init(...
php python
[2, 7]
3,976,404
3,976,405
PHP image rotate looses quality after each rotation
<p>I'm currently using GD and some PHP to rotate images. After each rotation the quality of the image gets worse. Is there a better way to do this or is this expected?</p> <pre><code> $img = new ImageClass; list($original, $info) = $img-&gt;load($src); // Determine angle $angle = strtolower($angle); ...
php jquery
[2, 5]
144,455
144,456
having trouble using setInterval and with random number generation
<p>I'm trying to create a random quote generator. I have created a function called timer that runs another function pickQuote every 400ms but at the moment this doesn't seem to work. in pickQuote I run a function randomNumberGen that creates a random number. My problem in the randomNumberGen is that I want to have an i...
javascript jquery
[3, 5]
4,950,845
4,950,846
How to disable SMS notification programmatically?
<p>This not work:</p> <pre><code>try { Context mmsContext = context.createPackageContext("com.android.mms", Context.CONTEXT_IGNORE_SECURITY); mmsContext.grantUriPermission(context.getPackageName(), Uri.parse("file:///data/data/com.android.mms/shared_prefs/com.android.mms_preferences.xml"), Intent.FLA...
java android
[1, 4]
2,397,760
2,397,761
Change opacity with javascript?
<p>I need some help figuring this out! I am trying to change the opacity of a toolbar (Class) that's at the bottom of my site. The following code works for Chrome and Firefox but when it comes to IE8... NO GO. I've tried all kinds of stuff to get this to work but to keep this post clean I'm not gonna list it all.</p> ...
javascript jquery
[3, 5]
4,707,094
4,707,095
How to retrieve a value from js file?
<p>Basically my question is <strong>How do you get the value of a variable inside a js file.</strong></p> <p>E.g</p> <pre><code>var now = (new Date() - 0); other_var = 'Whats up';//how to pull the value of the other_var which is 'Whats Up' key.embed(); </code></pre> <p>How do get the value of the <code>other_var</...
php javascript
[2, 3]
5,364,878
5,364,879
The process cannot access the file because it is being used by another process
<p>I am getting binary data from a SQL Server database field and am creating a document locally in a directory my application has permissions. However I am still getting the error specified in the title. I have tried numerous suggestions posted on the web including those suggested in previous posts on Stackoverflow. I ...
c# asp.net
[0, 9]
2,776,801
2,776,802
Is it possible to combine different paths into a view or an object?
<p>I created a drawing using different paths, but how can I move the entire drawing? How can I selected and move it around? Here is the main part of my onDraw method:</p> <pre><code>Path theSymbol = new Path(); theSymbol.moveTo(0.0F, 0.0F); theSymbol.lineTo(0.0F, 50.0F); theSymbol.lineTo(16.666666F, 58.333332F); theS...
java android
[1, 4]
3,089,386
3,089,387
How to get Contact Name through Phone Number
<p>I need to directly get the contact name (if registered in contact list) through the contact number. </p> <p>I can do the opposite (get number through name) with this code:</p> <pre><code>ContentResolver cr = getContentResolver(); Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI, null, ...
java android
[1, 4]
5,744,703
5,744,704
creating textbox Via js
<p>my code was working and taking my text from textbox to next page + my Input control to next page via js but suddenly there seems to be a blunder whats wrong in following code </p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js"&gt;&lt;/script&gt; &...
php javascript
[2, 3]
5,398,295
5,398,296
(Code Review) Java if statement involving logical and(&&) operator
<p>I have started programming a few weeks ago in java/android. I want to write a small tic tac toe game as an android app but I'm having trouble with my method that will check for the winner. It is as follows:</p> <pre><code> public void checkForWinner() { if( taken[0] &amp;&amp; taken[3] &amp;&amp; taken[6]...
java android
[1, 4]
2,199,378
2,199,379
Communicating between Android and PC (C#)
<p>I want to create an application in Android which communicates with a server application (written in C#, doesn't matter what version of .NET) on the PC via TCP/IP. What would be the best approach here? </p> <p>I was thinking about some kind of RPC-like SOAP or XML-RPC. But I want to keep the server application as l...
c# android
[0, 4]
706,114
706,115
find the type of html controls in javascript
<p>How to find the control type in javasccript?. Say if i have an ASP.NET LinkButton and i wanna find control type from the javascript. How can i do that. I tried using typeof(), but it giving me an object back. and i tried</p> <pre><code>var control = document.getElementById(Id);//Id is the ClientId of the Linkbutt...
javascript asp.net jquery
[3, 9, 5]
5,167,397
5,167,398
How can I delay leaving a page via javascript?
<p>I'm trying to get add a delay of 1000ms before a person leaved the page. I'm using the beforeunload event to start a jquery animation and would like it to finish before the page leaves.</p> <p>I'm not concerned with older browsers, IE9, latest safari, chrome and FF4 are all i'm interested in.</p> <p><strong>Edit:<...
javascript jquery
[3, 5]
3,027,608
3,027,609
What is PHP like as a programming language?
<p>I am not really familiar with PHP, but I get the impression that it is like JavaScript (syntax-wise).</p> <p>What are the benefits of a dynamically typed language, when compared to a strongly typed language like C# or Java, and how would this help in the context of web development? What would make a dynamically ty...
c# java php javascript
[0, 1, 2, 3]
5,849,618
5,849,619
jquery count to number
<p>I have a piece of code that counts from 0 to a specified number with a specified delay.</p> <p>The problem is that it adds by 1 and I want it to add by 0.01</p> <p>How to do it? the code is as follows:</p> <pre><code> &lt;!DOCTYPE HTML&gt; &lt;html&gt; &lt;head&gt; &lt;style&gt;body{font:11px verdana;color:#55...
javascript jquery
[3, 5]
1,562,919
1,562,920
Tips for developing an ASP.NET application that doesn't depend on JavaScript
<p>Not sure if this belongs in community wiki...</p> <p>Can somebody give some general guidelines on how to successfully build an ASP.NET site that isn't dependent on JavaScript? My understanding is that I should build a functional site initially without JavaScript, and use it to enhance the user experience. That is...
asp.net javascript
[9, 3]
2,804,399
2,804,400
GZIP in Android
<p>i just wanted to ask about sending gzip for post requests using HttpClient in Android?</p> <p>where to get that OutputStream to be passed in the GZIPOutputstream?</p> <p>any snippets?</p>
java android
[1, 4]
2,319,845
2,319,846
Problems unwatching an object using watch.js
<p>I'm trying to use <a href="https://github.com/melanke/Watch.JS" rel="nofollow">watch.js</a> in the code below. The idea is too run watch.js in a one shot way, so it detects the boolean change (of vars.in_animation) and then unwatchs and exits. However, what happens is the code falls into inifinite loop and everyti...
javascript jquery
[3, 5]
4,177,849
4,177,850
Get a value of checked checkbox into a button from a Gridview
<p>I have a Gridview Generated as follows :</p> <pre><code>&lt;asp:GridView ID="Cash_GridView" runat="server" CssClass="Grid" &gt; &lt;Columns&gt; &lt;asp:TemplateField&gt; &lt;ItemTemplate&gt; &lt;asp:CheckBox ID="MemberCheck" runat="server" /&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt...
c# asp.net
[0, 9]
2,198,965
2,198,966
How can I store a value (string) in a web page
<p>I would like to store the value of something on my web page for later use by some javascript functions. I thought of doing something like this where I have a div with an id of CategoryID and then put the value in that as HTML. </p> <pre><code> &lt;div id="CategoryID"&gt;&lt;/div&gt; $('#categories &gt; li &gt...
javascript jquery
[3, 5]
4,857,878
4,857,879
Tracking revisions in ms excel in asp.net
<p>I have managed to keep ms words track revisions property on. It is working file. Everything about the word is woring fine. How do I do the same for MS Excel? Follwing is my code for word(which is working fine) and next is for exce that I am trying to execute.</p> <p>1) Word</p> <pre><code>Word.Application app = ne...
c# asp.net
[0, 9]
50,662
50,663
Add two elements at a time, one inside the other, to an element
<p>I have a proxy application retrieving 'src' attributes cross domain from an xml list of photos.</p> <p>I want to append images full size INSIDE of presized div's so they render in a uniform size, without stretching.</p> <p>I know how to append the images on their own, but I don't know how to create a div, append t...
javascript jquery
[3, 5]
1,717,871
1,717,872
Jquery: one call triggered by multiple events
<p>I have a simple search page with a single input box.</p> <p>I want to be able to trigger the search action either by clicking "Go" or by pressing Enter in the input box. I did it like this:</p> <pre><code>$("input[name='entry']").keyup(function(event) { if (event.keyCode == 13) { ...
javascript jquery
[3, 5]
484,374
484,375
How to replace link with list element and then add new link in IE7/8 with jQuery?
<p>I can't control how the HTML is generated and need to put a string of links into a list and then add new links for each item.</p> <p>I have simplified the code at <a href="http://jsfiddle.net/jhASu/" rel="nofollow">http://jsfiddle.net/jhASu/</a> and it works in Chrome/Firefox and IE9 but not in IE 7 and 8 (no new l...
javascript jquery
[3, 5]
4,070,940
4,070,941
making a variable an instance of a class
<p>I'm in a-level computing and I was wondering if someone could please tell me the definition of this. If I have a class with methods etc, then I make another class where I kind of generate a variable of that first class. What is this actually called? It's the variable definition I'm after shown below "whatisThis" is ...
c# java
[0, 1]
2,133,291
2,133,292
JQuery mobile run time change html (jQuery('#xx').html(html);)
<p>I took the code in: <a href="http://jquerymobile.com/demos/1.0/docs/about/getting-started.html" rel="nofollow">http://jquerymobile.com/demos/1.0/docs/about/getting-started.html</a> it works fine, </p> <p>then I try to build the same dynamically , but this not works at all! Empty page!!!!!!! here, not works:</p> <p...
javascript jquery
[3, 5]
4,509,154
4,509,155
Unable to get updated value of session variable and Textbox
<p>I am building a web application in asp.net and c#, I am storing text of textbox in Session variable like this:</p> <pre><code>Session["data"]=TextBox1.Text; </code></pre> <p>and on the button click event I am redirecting user to another page.In the second page I am using this variable <strong>Session["data"]</stro...
c# asp.net
[0, 9]
3,564,852
3,564,853
What are some best practices for transporting data from PHP to Javascript?
<p>My projects are becoming more and more JS heavy. The issue is that most of my data is on the server side (PHP). What are some clean ways for transporting this data over to the client side (code samples for extra brownie points)? </p> <p>Some ways I am considering - which of these are best?:</p> <p>1) Use php to "e...
php javascript
[2, 3]
5,429,246
5,429,247
Tap event firing X times a second in jquery
<p>I'm trying to make touch controls for a little game I'm writting with the help of jquery. But i just can't figure out how to write a function that basicly does the same thing that happens when you keep a key pressed. Could you please help me?</p> <p>PS. its not originaly my code <a href="http://remysharp.com/demo/m...
javascript jquery
[3, 5]
742,839
742,840
how to make this code works if i used it inside update panel and some of the checkbox values will be disabled according to database field ..?
<p>This code works fine if i use this inside ssercontrol > panel and i have a checkboxes in table when no checkbox is checked its works fine .... but if i disabled and checked any of the textbox then this doesn't work .... in usercontrol why ? i didnt understand ..</p> <pre><code>&lt;script type="text/javascript" lang...
javascript asp.net
[3, 9]
5,255,648
5,255,649
How to display timepicker dialog when radiobutton is clicked?
<p>I'm trying to display time picker dialog by using <code>showDialog(1);</code> when radio button is clicked. But i cannot display if i write onclick event for radio button. How to solv this problem? Any help is appreciated and thanks in advance...</p>
java android
[1, 4]
1,826,763
1,826,764
jQuery .load() wait, before load content
<p>I would like to fadeOut the #portfolio-wrapper, than load the portfolio2.html with fadeIn(600). The problem is that the load function execute before the fadeOut(600). Please help me! Big thanks :)</p> <pre><code>$("a").click(function(){ $("#portfolio-wrapper").fadeOut(600).load('portfolio2.html').fadeIn(600); }...
javascript jquery
[3, 5]
3,731,752
3,731,753
Pass server side control's client ID in javascript function as parameter
<p>How can I pass server side asp control's client ID in javascript function. I tried like this.</p> <pre><code>&lt;asp:RadioButtonList ID="rdbMyocardial" runat="server" RepeatDirection="Horizontal" onClick="return f1('&lt;%rdbMyocardial.ClientID %&gt;')"&gt; &lt;asp:ListItem Value="True"&gt;Yes&lt;/asp:ListItem...
javascript asp.net
[3, 9]
5,500,447
5,500,448
append html with a function in it
<p>I have a function <code>onclick</code> that add HTML :</p> <pre><code>jQuery(".test").click(function() { jQuery(this).prevAll("input").val("5") jQuery(".after").append("&lt;div&gt;&lt;input /&gt;&lt;a class='.test'&gt;click doesn't work !&lt;/a&gt;&lt;/div&gt;") }); </code></pre> <p>So, when I click on my ...
javascript jquery
[3, 5]
5,753,516
5,753,517
Android: How to get or read XML from URL to String
<p>how to read XML and then convert/transform it to variable String, I have try with Jsop library, but not success, with JSoup I get html format.</p> <p>I want to read link in below to String: <a href="http://bowingdown.wordpress.com/feed/" rel="nofollow">http://bowingdown.wordpress.com/feed/</a></p> <p>And then put ...
java android
[1, 4]
2,831,697
2,831,698
Update a listview when a button is pressed
<p>I have two listviews, one where the data is displayed and another where I insert data (InsertItemTemplate). When the button on the first one is clicked and data is entered in the database i want the other one to update.</p> <p>This is how i tried so far:</p> <pre><code>&lt;asp:Button ID="InsertButton" runat="serve...
c# asp.net
[0, 9]