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,708,041
1,708,042
converting this function from Javascript to jQuery
<p>I've tried over and over to change this function to jQuery but I can't seem to get it to run properly. Could anyone give me any help with it at all?</p> <pre><code>window.onresize = resizeImage; function resizeImage(){ var newHeight = document.documentElement.clientHeight; var newWidth = document.documentE...
javascript jquery
[3, 5]
4,057,280
4,057,281
javascript restore style
<p>I want to see a specific div on full-screen and change style and for this, I used this function: </p> <pre><code>$(function () { $('#trigger').click(function () { var screenres = screen.width + 'x' + screen.height; document.getElementById("map").style.backgroundColor = "white"; if (screenres == ...
javascript jquery
[3, 5]
2,863,650
2,863,651
Counting checkboxes in JS/JQuery
<p>I have this simple line, that I was hoping would count all checked checkboxes with the class (.photos):</p> <pre><code>var count = $('.photos').length; </code></pre> <p>It counts all the checkboxes that have that class (.photos) but it doesn't count the checked ones.</p> <p>Does anybody know how to alter this lin...
javascript jquery
[3, 5]
3,601,061
3,601,062
Preloader does not preload and loads the page a second time
<p>I found this nice jQuery <a href="http://www.gayadesign.com/diy/queryloader2-preload-your-images-with-ease/" rel="nofollow">preloader/progress bar</a>, but I cannot get it to work as it is supposed to. The problem is that it first loads my page and after my whole page is loaded the 0%-100% bar displays quickly, afte...
javascript jquery
[3, 5]
3,043,119
3,043,120
Android packaging error
<p>When I compile my Android Project I always get this Error:</p> <blockquote> <p>Error generating final archive: duplicate entry: about.html</p> </blockquote> <p>But I can't find any about.html in my Project. Does anyone know how to solve the error?</p>
java android
[1, 4]
2,605,491
2,605,492
Want to use default configuration for SMTP from <system.net> configuration section
<p>I'd like to put an encrypted password in the configuration section. I have the decryption function, but where do I put it so that when SMTPClient is instantiated using this configuration information that I can run the decryption function for the password?</p> <p>Thanks for any tips!</p>
c# asp.net
[0, 9]
5,628,393
5,628,394
Programmatically get Carrier time in android
<p>I am relying on time in one of my application where We support only when mobile is connected to network, where we are trying to initialize in offline , i.e. It has to work without network where I can't rely on user time.</p> <pre><code> I felt it's a challenging to learn but I have a little time to implement, any...
java android
[1, 4]
4,105,143
4,105,144
Android - Location Listener throughout my application
<p>In my application there are more than 10 activities.With the help of Location manager ,it updates all my changes in the location in a db.But it seems too difficult to code the same in all activities.Since the location updation is meant for whole application,is there is any solution in java so that code size can be e...
java android
[1, 4]
4,579,597
4,579,598
How a Dialog window can modify JS in the parent window
<p>I have a site that opens a dialog. In that dialog I want to be able to modify a JS value in the parent window. The sites are at the same domain.</p> <p>in the parent I can do:</p> <pre><code>currentUserModel.guest(false) </code></pre> <p>In the dialog, how can I do currentUserModel.guest(false)?</p> <p>Right now...
javascript jquery
[3, 5]
4,936,271
4,936,272
Jquery closing in click
<p>im having a problem in a script that i download it in the web, basically what i need is a FAQ question whit the collapse panel interaction, but in this case different in the other out there i want when i click in one question it opens, and when i click in another question the question before closes and open the one ...
javascript jquery
[3, 5]
3,418,674
3,418,675
define an array of input control in aspx.cs
<p>i have an input control of type file.</p> <pre><code>&lt;input id="FileUpload1" type="file" runat="server" size="35" /&gt; </code></pre> <p>there are four input controls like this and in aspx.cs file i m trying to make an array of these ids..</p> <p>i have made an array </p> <pre><code>HtmlInputFile[] fl = new H...
c# asp.net
[0, 9]
4,589,868
4,589,869
Javascript - id's are timestamps, if more than 10 then delete the oldest one
<p>A bit of a tricky one, at least for me. Here is the scenario:</p> <pre><code>&lt;div id="gifs"&gt; &lt;img src="gif/1.jpg" alt="" &gt; &lt;img src="gif/10.jpg" alt="" &gt; &lt;img src="gif/15.jpg" alt="" &gt; &lt;img src="gif/20.jpg" alt="" &gt; &lt;img src="gif/5.jpg" alt="" &gt; &lt;/div&gt; </code></pre> <p>...
javascript jquery
[3, 5]
5,181,245
5,181,246
how to populate textarea when a checkbox is clicked using jquery
<p>i want to detect if the checkbox is set to true and then put some data into a textarea. any examples of this?</p>
asp.net jquery
[9, 5]
4,736,461
4,736,462
Android javax.naming.* replacement?
<p>I am trying to find an API for my android application that will replace the javax.naming package for DNS look up information. The java.net.InetAddress gives me some of the information that I need for my DNS tool, but fails to look up the MX and NS records.</p> <p>Does anyone have a suggestion on the API's I should...
java android
[1, 4]
1,395,399
1,395,400
Why is first sound slow to play with soundmanager2?
<p>I've just finished this jquery plugin to display musical scales:</p> <p><a href="http://www.daveconservatoire.org/tools/scales" rel="nofollow">www.daveconservatoire.org/tools/scales</a></p> <p>The piano keys are clickable and play the relevant notes. I'm using the Soundmanager2 package. </p> <p>I'm loading all t...
javascript jquery
[3, 5]
5,190,413
5,190,414
jQuery - How to make the input values ("email", "password") reappear when out of focus?
<p>When I click inside the input fields the values "Email" and "password" disappear which is what I want. But if the user doesn't enter his email/pass and clicks somewhere else, I want "Email" and "Password" to reappear. </p> <p>jQuery:</p> <pre><code>$('.login-user, .login-pass').focus(function() { $(this).val("...
javascript jquery
[3, 5]
3,491,777
3,491,778
Show elements depending on html value of a tag
<p>I would like to accomplish the following with jquery : </p> <p>When I click on this link </p> <pre><code>&lt;a href="#"&gt;Cars&lt;/a&gt; </code></pre> <p>I would like all divs like those </p> <pre><code>&lt;div class="product"&gt; &lt;div class="category"&gt;Cars&lt;/div&gt; &lt;/div&gt; </code></pre> <p>t...
javascript jquery
[3, 5]
5,627,196
5,627,197
Question about javascript event handler syntax
<p>My question appears to have been deleted yesterday before it could be answered, so I'm starting a new thread on the subject.</p> <p>I've been trying to find cross-browser resize javascript, and ran across this syntax in one answer posted here:</p> <pre><code>$(window).resize(function() </code></pre> <p>I'm afraid...
javascript jquery
[3, 5]
2,789,846
2,789,847
Databind a List<System.Web.UI.WebControls.Image> to a repeater
<p>Im trying to bind a List of Images (<code>System.Web.UI.WebControls.Image</code>) to a repeater, but the image is shown as broken. It seems allright when I put a breakpoint inside the ItemDataBound-event, the DataItem is correct and have the correct ImageUrl. Yet, the result is wrong.</p> <p>This code is very simpl...
c# asp.net
[0, 9]
4,324,826
4,324,827
validate and submit form when enter is pressed in input(textbox) field but does not select history when enter pressed
<p>similar to how we have onfocus and onclick on input tags I am using the below method( if the method is wrong please let me know what would be the proper method ) for submitting a form when someone presses enter on a textbox in a field in a form </p> <p>Example when someone writes the password in the password field...
php javascript
[2, 3]
777,701
777,702
Java Declaration
<p>I am new to android. i know only core java.</p> <p>I saw the declaration </p> <pre><code>ArrayList&lt;ApplicationInfo&gt; mAppInfo; </code></pre> <p>in Android sample project. Can anyone explain what is the meaning of above declaration.</p>
java android
[1, 4]
1,968,324
1,968,325
Like browser,Multiple Tabs loading simultaneously....How to do like this in Javasript or jquery
<p>My question is, how to to use Same function in Two different tabs at same time. Simply Like browser, multiple Tabs loading simultaneously. How to do like this in JavaSript or jQuery. </p>
javascript jquery
[3, 5]
1,380,838
1,380,839
Clearing a session
<p>I have a session class where i am saving text box values(application) in a session. However, when the user times out due to inactivity or just goes back to the home page i want to clear all session data. I tried to set it in the homepage but the !IsPostBack keeps firing.</p> <pre><code>if (!IsPostBack) { J...
c# asp.net
[0, 9]
1,176,878
1,176,879
jQuery detect if an element is visible
<p>Using <code>.fadeIn()</code> and <code>.fadeOut()</code>, I have been hiding/showing an element on my page, but with two buttons, one for hide and one for show. I now want to have one button to toggle both. Therefore, my question is how do I detect if the element is visible or not?</p> <p>My HTML as it is:</p> <pr...
javascript jquery
[3, 5]
92,778
92,779
How can we get the current exchange rate?
<p>We have payment gateway and Fedex shipping in our project. Problem is if the person is from some other country then we have to charge different rates for shipping. How can we get the current exchange rate. Is there any service available?</p>
c# asp.net
[0, 9]
868,213
868,214
Select form option on page load
<p>I would like to select the option contained within a php variable on page load.</p> <pre><code>&lt;?php $pre = 78; ?&gt; &lt;select id="form8" name="form8"&gt; &lt;option value="15"&gt;15&lt;/option&gt; &lt;option value="25"&gt;25&lt;/option&gt; &lt;option value="64"&gt;64&lt;/option&gt; &lt;option value="78"&gt;7...
php javascript jquery
[2, 3, 5]
2,180,067
2,180,068
Ventrilo Status on your website
<p>I'm looking for some examples of how you would show the status of a ventrilo server on your website. What I would like is the ability to show who is logged on and what channel they are logged into. I have found sites that you can purchase, but would like to either find a open source or free solution.</p> <p>If th...
c# php asp.net
[0, 2, 9]
4,785,069
4,785,070
Change CSS with jQuery Sortable
<p>How can I change CSS property once sorted. Something likes this:</p> <pre><code> $( "#sort" ).sortable({ $(#div1).css("background-color","yellow"); }); </code></pre> <p>Thanks alot</p>
javascript jquery
[3, 5]
4,866,617
4,866,618
Count characters with jQuery in case of multiply entries
<p>Here I have html structure. It repeats several times on the page.</p> <pre><code>&lt;article class="boo"&gt; &lt;h4&gt;Here goes the title&lt;/h4&gt; &lt;/arcticle&gt; </code></pre> <p>I want to count the number of characters in each header h4 inside of article.</p> <pre><code>$('article.boo h4').text().lengt...
javascript jquery
[3, 5]
5,083,585
5,083,586
Avoid round number when casting a float to string
<p>I need avoid round number when casting a float to string, I need the number is exactly the same.</p> <p>In this moment if I make this:</p> <pre><code>String value = String.valueOf(1234567.99); </code></pre> <p>The the value = 1234568.0 ,so I need the value = 1234567.99 after casting.</p>
java android
[1, 4]
1,670,669
1,670,670
Font picker Implementation
<p>I want to implement a font and color picker in my project. I implemented the color picker, I got it the code, but still I don't get the code to implement the font picker. Does any one know?</p> <p>Thanks in advance.</p>
php javascript
[2, 3]
598,296
598,297
jQuery: cancel sortable on top-most LI element?
<p>I have two sortables that are straight UL elements, each with at least on LI element and as many as ten, sorted like so:</p> <pre><code>$(".sortable").sortable({ connectWith: ".sortable", cancel: '.no-drag', }).disableSelection(); </code></pre> <p>I want each UL to have a top-most LI element reading 'Title...
javascript jquery
[3, 5]
3,120,567
3,120,568
handler = function?
<p>every time i encounter this word i wonder what it really means. eg an event handler, is that a function?</p> <p>$('a').click(function(){ ... });</p> <p>is the click an event. and the handler the anonymous function?</p>
php jquery
[2, 5]
1,215,043
1,215,044
HOW NOT update a variable in post back
<p>Consider the code</p> <pre><code>public partial class Classname: somethng { bClass objClass = new bClass(); Boolean isfindclicked=false; protected void Page_Load(object sender, EventArgs e) { //rowid = 0; if (!IsPostBack) {...... ... ...
c# asp.net
[0, 9]
5,370,190
5,370,191
How to do client callback for each item in a foreach statement using c#?
<p>I want to show each item Id that is doing now dynamically in a foreach statement. How to do some kind of client callback to show the item Id in a foreach statement?</p> <pre><code>&lt;asp:Label ID="Label1" runat="server" Text="Label"&gt;&lt;/asp:Label&gt; &lt;asp:Button ID="Button1" runat="server" onclick="Button1_...
c# asp.net
[0, 9]
5,301,269
5,301,270
div hide and show javascript having blinking problem in mozilla
<p>My javascript is </p> <pre><code> function Show1() { //document.getElementById("Popup_tooltip").style.overflow="auto"; document.getElementById("Popup_tooltip").style.display="block"; } function Hide1() { /* hide the pop-up */ document.getElementById("Popup_tooltip").styl...
asp.net javascript
[9, 3]
5,501,931
5,501,932
getting installed applications programmattically
<p>I am trying to get the installed application in android after clicking a icon. Under the icon click code I wrote following code:</p> <pre><code>Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.ACTION_ALL_APPS); startActivity(intent); </code></pre> <p>But it kills the application. I want to...
java android
[1, 4]
2,275,088
2,275,089
How to get text around an element?
<p>If I have</p> <pre><code>&lt;div id='wrapper'&gt; &lt;fieldset id='fldset'&gt; &lt;legend&gt;Title&lt;/legend&gt; Body text. &lt;/fieldset&gt; &lt;/div&gt; </code></pre> <p>How could I retrieve the "Body text" without retrieving the text inside of legend tag?</p> <p>For instance, if I wanted to see if...
javascript jquery
[3, 5]
5,150,520
5,150,521
I'm using jQuery boxy plugin for Ajax modal pop up window
<p>I'm using jQuery boxy plug in for Ajax modal pop up window and and populating it through Ajax. In that window populate combo box using Ajax first time it will populate. But when I close modal window and again open it and hit the button, the combo box does not populate.</p> <p>I'm using php as server side language.<...
php jquery
[2, 5]
112,233
112,234
Rounded corners AND shadow applied to one div?
<p>How? Any suggestions besides CSS? </p> <p>I have tried JQuery (dropCurves, shadow, shadedborder, corner osv).</p>
javascript jquery
[3, 5]
670,139
670,140
QueryString to Textbox
<p>I have a table tblProfile, which contains fields with Id, Name, Address. I have 2 aspx page, which are Home.aspx and Here.aspx. On my Home.aspx I have used this code to pass the Id in my Here.aspx:</p> <pre><code>&lt;asp:HyperLink ID="link" runat="server" NavigateUrl="Here.aspx?id={0}" Font-Names="Time...
c# asp.net
[0, 9]
5,008,642
5,008,643
Href Links Dymamically
<p>I have some links in an json file</p> <pre><code>&lt;code&gt; "links": [ {"link": "http://www.google.com/", "id": "1" }, {"link": "http://www.poogle.com/", "id": "2" }, {"link": "http://www.foogle.com/ ", "id": "3" ...
javascript jquery
[3, 5]
5,187,283
5,187,284
How to return a value from a nested and anonymous function?
<p>I have this JS code:</p> <pre><code>function paging() { $('.paging li').click(function(e) { $('.paging li a').removeClass("active"); $(this).find('a').addClass("active"); $('#img-grp-wrap img').hide(); var indexer = $(this).index(); $('#img-grp-wrap img:eq('+indexer+')...
javascript jquery
[3, 5]
2,083,520
2,083,521
on mouse up change button
<p>I have a set of buttons. I want that when I do mouse up on one of the buttons, that particular button will change its back colour while all the other will remain the same. </p> <p>Any help on how to do it without having any post back.?</p>
javascript asp.net
[3, 9]
1,396,716
1,396,717
Trying to delay a for loop until a div is loaded
<p>I'm playing around with loading and moving around div elements on a page. I'm trying to fade in a string and then reverse it. The reverse loop needs to wait until after the initial fade in loop completes. Here is what I have so far but it doesn't execute the reverse loop. I assume because it can't see the initial di...
javascript jquery
[3, 5]
669,537
669,538
Assigning Values to DropDownList in Grid
<p>I have a DropDownList in a Grid and I have a foreach loop that loops through a Query and matches data and fills the drop down list for each row on that. But It is putting the data all in the same dropdownlist. So row 1, row 2, row 3, etc. all get combined into the dropdownlist. I am trying to make it so in row 1 dro...
c# asp.net
[0, 9]
5,542,195
5,542,196
jquery: eventObject.pageY and scrollbar
<p>I am using eventObject.pageY to get the current mouse position when the event is fired. But I noticed the number is relative to the document but not the viewport. </p> <p>I want to get the pageY relative to the viewport(when vertical scrollbar appears it has difference to the pageY relative to the document), how to...
javascript jquery
[3, 5]
5,168,220
5,168,221
In asp.net how to validate textbox depending on other text box?
<p>In asp.net Depending on Experience I should validate the salary of an employee. </p> <p>If the employee is fresher his salary should be 1 lac to 1.5 lac. Or salary = 1.5 lac * years of exp to 3.5 * years of exp.</p> <p><em><strong></em>**</strong> i have tried his*<strong><em>*</em>**</strong> protected void B...
c# asp.net
[0, 9]
1,202,465
1,202,466
gridview is refreshing result rows when clicked on the select command column
<p>I am trying to view one of the result as a report in the report viewer by clicking on the select command in the 1st column. But the other rows are refreshing and showing different rows when the report is displayed below the grid in a report viewer. i don't want the results to change when i select a particular row..<...
c# asp.net
[0, 9]
5,700,313
5,700,314
run function if EITHER statement is true
<p>This below is a snippet from the code that I am working on. The short version of this is when a radio button with a label of <strong>NO</strong> is NOT checked, then the details textbox will show. I simply want to add another condition which allows the box to be shown IF another label is checked. </p> <p>Example: I...
javascript jquery
[3, 5]
3,524,245
3,524,246
Is rewriting a PHP app into Python a productive step?
<p>I have some old apps written in PHP that I'm thinking of converting to Python - both are websites that started as simple static html, then progressed to PHP and now include blogs with admin areas, rss etc. I'm thinking of rewriting them in Python to improve maintainability as well as to take advantage of my increase...
php python
[2, 7]
3,962,170
3,962,171
Java Thread checkAccess
<p>I was pondering, playing around with some code. I came across the following method in the Thread class: <code>checkAccess()</code>. </p> <p>The documentation (literally) says <em>"Does nothing."</em> Why would this possibly be in the Thread class if it does nothing? - Are we possibly dealing with developer trolls?<...
java android
[1, 4]
2,252,118
2,252,119
when to choose ASP.NET and When PHP?
<p>I am not here to add another subjective question.</p> <p>I know that many developers are using only ASP.NET and others Only PHP......</p> <p>in my case where my team uses both, of course more advanced in one, </p> <p>I like to know the keys to choose one ? can you guys list all the Pros, and cons for those langua...
php asp.net
[2, 9]
2,745,653
2,745,654
Unable to update the header summaries for PreferenceActivity on smartphones running 4.x
<p>From what I've noticed, on smartphones running 4.x when you have a PreferenceActivity with headers, the OS will first create an activity containing the headers. When the user clicks on one item from the headers list, another activity will be created representing the PreferenceFragment for that entry. On tablets, the...
java android
[1, 4]
659,121
659,122
Call javascript function from asp.net code behind after server side code executes
<p>I have an asp.net button, that when clicked calls a code behind function. The function does some evaluation, and then I want to call javascript from within this asp.net function.</p>
asp.net javascript
[9, 3]
557,518
557,519
Using jQuery, how do I add elements to a jQuery object that's yet to be created?
<p>Perhaps I am doing this wrong and suggestions on how to improve my code are appreciated. My situation is this: I have a toolbar with different elements that are populated by a callback. I do not want to use the show() or hide() commands, I prefer to use detach, but I think there should be a nice way to deal with it....
javascript jquery
[3, 5]
5,627,077
5,627,078
JavaScript/jQuery HTML Encoding
<p>I'm using Javascript to pull a value out from a hidden field and display it on a textbox</p> <p>The value in the hidden field is encoded.</p> <p>e.g.</p> <pre><code>&lt;input id='hiddenId' type='hidden' value='chalk &amp;amp; cheese' /&gt; </code></pre> <p>gets pulled into</p> <pre><code>&lt;input type='text' v...
javascript jquery
[3, 5]
1,618,634
1,618,635
How to input \t from asp.net
<p>I'm trying to input a control character from an asp.net form. For example I want a user to be able to enter \t into a text box and it be \t not \ \t (The space is there as one of them gets escaped if I put them together). What's the best way to go with this? I've been staring at it continuously now for quite a whil...
c# asp.net
[0, 9]
3,520,862
3,520,863
jquery - disable click
<p>I just want to disable the ability for a user to click on an element for some condition. Here is some of the code I am working with:</p> <pre><code> $('#navigation a').bind('click',function(e){ var $this = $(this); var prev = current; current = $this.parent().index() + 1; // store the positi...
javascript jquery
[3, 5]
5,520,558
5,520,559
IE:how to get popup's opening window when using window.open(url)
<p>we are running a click-to-call service, my idea is basically like this: website have a link on their page, when the link is clicked, a web page(say it is popup.aspx) hosted on our server is popup, user can input their phone number, and click "call me" button to let the website call him. In the button click event, I ...
javascript asp.net
[3, 9]
2,137,492
2,137,493
Image Preview in safari and IE 9 browsers not working
<p><strong>i'm using following code, whick works perfect in IE8 and lower version, chrome, firefox. But it fails to work in Safari and IE 9.</strong></p> <pre><code>&lt;script type="text/javascript"&gt; function readURL0(input) { if (input.files &amp;&amp; input.files[0]) { var reader = new Fil...
javascript asp.net
[3, 9]
5,656,415
5,656,416
Run a PHP function via Jquery onclick event
<p>I am trying to run a php function based on a button click using jquery but not through a POST. It is a function that is using array data that was printed on the form. Is this possible?</p>
php jquery
[2, 5]
4,998,752
4,998,753
Compile C++ .lib files make them DLL for C# enviroment
<p>I've got plenty of these object file library : addrstor.exp authhlp.lib</p> <p>I would like to have them as a DLL and add into the C# project and try to use the method which involved.</p> <p>How could I achieve that ?</p> <p>Thanks</p>
c# c++
[0, 6]
5,067,807
5,067,808
How to get cookie value with javascript or jquery
<p>I am getting following cookie values on my home page.</p> <blockquote> <p>vsettings=HiddenNotifications=%2C19%2C; (referral)|utmcmd=referral|utmcct=/; ASPSESSIONIDQCSBCCAD=LFLGDKACEGPCPFGBANHFFBMK; ASPSESSIONIDSASDCCDA=OFEHPJACGHNKICDLFBOCJNNH; ASPSESSIONIDQCSDDCBC=LGFPBDLCKHLIOLPMCAGJNFIM; ASPSESSIONID...
javascript jquery
[3, 5]
5,911,470
5,911,471
Display title attribute of an image inside a DIV
<p>This is the page I'm trying to do: <a href="http://www.lifetime-watches.com/gal-ws.html" rel="nofollow">Gallery</a></p> <p>And what I'm trying to do is when you hover over the thumbnails, the div in front of the main image would fade in and show the title attribute for the image. Hover over the left and topmost ima...
javascript jquery
[3, 5]
1,892,040
1,892,041
Easiest way to create a confirmation message with jQuery/JavaScript?
<p>How can I achieve this?</p> <ol> <li>A user clicks the delete link (with a class of "confirm").</li> <li>Confirmation message appears asking "Are you sure?" with "Yes" and "Cancel" options.</li> </ol> <p>If yes is selected, the link continues as clicked, but if cancel is selected, the action is canceled.</p> <p><...
javascript jquery
[3, 5]
3,958,289
3,958,290
sending request and parameter when submit from using ajax
<p>I want to submit a form using jquery <code>.post()</code>. I want to send all the input names in addition to another parameter, in there any way to send data and the request?</p> <pre><code> $.post("RegistrarManagementServlet",{"option":"cancelRequest"},function(){ alert("hi"); }); </cod...
javascript jquery
[3, 5]
2,496,272
2,496,273
Javascript/JQuery bouncing text off left and right sides of a div
<p>I want text to bounce of the left and right sides of a div tag (<code>#header</code>). It works fine when it bounces of the right, then goes back and hits the left. The problem is that after it hits the left and starts to go right again it never hits the right side. It just keeps going and the window scrollbar appea...
javascript jquery
[3, 5]
5,253,313
5,253,314
Foreach inside array.map()
<p>I'm trying to map values to a new array. The problem is that the property that I'm mapping can either be a number or an array.</p> <p>I have a problem when it comes to arrays, because my result is an associative array. My goal is to turn <code>[[1,2,3], [1,2,3]]</code> (see below) in to <code>[1,2,3,1,2,3]</code>. ...
javascript jquery
[3, 5]
1,186,543
1,186,544
Finding Changed Form Element With jQuery
<p>i have a form(id="search_options") and i tracking changes in form by:</p> <pre><code> $("#search_options").change(function() { // Bla Bla Bla }); </code></pre> <p>In this form i have many inputs and one of is select(id="project_category") and i want to catch if user changed project_category select ...
javascript jquery
[3, 5]
3,393,721
3,393,722
How to allow users to select the Android app's installation location (SD card or internal storage)
<p>I need to allow a user to select whether the app should be installed to an SD card or the internal memory. I cannot find any information about that at <a href="http://developer.android.com/index.html" rel="nofollow">developer.android.com</a>.</p> <p>The only thing I can do is to specify <code>android:installLocatio...
java android
[1, 4]
1,162,306
1,162,307
Web browser - redirecting F1 (doesn't work always)
<p>I'm using <code>jQuery</code> for redirect <code>F1-F10</code> keys in web browser (MFF or chrome):</p> <pre><code>$('*').live("keydown", function(e) { if (e.keyCode == 112) { document.getElementById('form:f1').click(); return false; } }); </code></pre> <p>So, when I press <code>F1</code>, instead o...
javascript jquery
[3, 5]
3,475,303
3,475,304
Zipentry is not streaming files in order in Android?
<p>I am trying to stream files from a zip file using ZipEntry class in android, however I am not getting the files in alphabetical order.</p> <p>Here is my code:</p> <pre><code>InputStream is = context.getResources().openRawResource(R.raw.file); ZipInputStream zis = new ZipInputStream(new BufferedInputStream(is)...
java android
[1, 4]
4,705,838
4,705,839
What are Python implementation of nextInt(), hasNext() from Java?
<p>I have this input file</p> <pre><code>1 2 10 2 81 3 23 6 2537857295 19 34271891003654321 1267253 </code></pre> <p>I am reading the file like this</p> <pre><code>with open("powersearch.txt") as fileIn: for line in fileIn: print line </code></pre> <p>I am wondering if I want to, for every single line, ...
java python
[1, 7]
4,387,774
4,387,775
how to create a tabhost without xml layout?
<p>currently I am developing an Android game which does not include an XML layout; instead we dealing directly with the Android engine.</p> <p>In an activity, I need to create a tab host which contains 3 tabs.</p> <p>I am using this code:</p> <pre><code>public class InventoryActivity extends BaseGameActivity{ pu...
java android
[1, 4]
794,810
794,811
restricting image size and type in jquery
<p>I have an input with type=file. This is used to upload images. Now I want to restrict images size to 500 kb and type to .png only. Please help</p>
javascript jquery
[3, 5]
3,717,978
3,717,979
Highlighting search words like Chrome with jQuery
<p>I have recently done a very simple highlighting with jQuery and a highlight plugin. It looks like this:</p> <blockquote> <p>$('myButton').click(function() {</p> <p>$('body').highlight($('#myInputText').val());</p> <p>});</p> </blockquote> <p>But I wonder how can I do the Chrome like highlighting, I mea...
javascript jquery
[3, 5]
5,600,606
5,600,607
How can I use a JavaScript variable as a PHP variable?
<p>I'm trying to include JavaScript variables into PHP code as PHP variables, but I'm having problems doing so. When a button is clicked, the following function is called:</p> <pre><code>&lt;script type="text/javascript"&gt; function addTraining(leve, name, date) { var level_var = document.getElementBy...
php javascript
[2, 3]
96,608
96,609
jQuery Inserting Text into a Textarea at the Cursor Position
<p>I've seen this example floating around on how to insert text at the cursor in a text area:</p> <p><a href="http://jsfiddle.net/adamadam123/bTUWa/5/" rel="nofollow">http://jsfiddle.net/adamadam123/bTUWa/5/</a></p> <p>The above works fine but when I've tried to add it to my own code (which is primarily jQuery) I fin...
javascript jquery
[3, 5]
4,484,203
4,484,204
How do I check on whether my synchronized methods are blocking (Android + Java)
<p>I have a feeling that my synchorization may be a little coarse (juddering UI) and was wondering how do I find out when/if my synchronized java methods are blocking on each other. My current project is on Android but I am interested in the more general Java case as well.</p> <p>Thanks, </p>
java android
[1, 4]
2,003,124
2,003,125
HTML to jQuery to PHP, then from PHP to jQuery to HTML
<p>Ok, I have this code:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; function get() { $.post('tt.php', { name : $(this).attr('id') }, function(output) { $('#age').html(...
php javascript jquery
[2, 3, 5]
563,503
563,504
how to make array of labels get their text from DataTable data
<p>could you please help me, I need to get data from my database and then make these data the text of labels here the code</p> <pre><code> protected void Button3_Click(object sender, EventArgs e) { DataTable dt = new DataTable(); dt = DA.SelectAllProper("18"); TableCell[] c = new TableC...
c# asp.net
[0, 9]
879,371
879,372
jQuery animate expand proportionally
<p>I'm now in problem about how to <strong>animate</strong> function in jQuery to expand proportionally. Normally, it expand one-sided only just like expand to bottom or expand to right.</p> <p>What I want is to expand proportionally left-right-top-bottom by using animate.</p> <p><img src="http://i.stack.imgur.com/UQ...
javascript jquery
[3, 5]
5,781,767
5,781,768
Jquery how can i stop the select element from droping down?
<p>i want to stop the user to see the list while clicking select option element :</p> <pre><code>&lt;select name="_users_id_requester"&gt; &lt;option value="0"&gt;-----&lt;/option&gt; &lt;option selected="" value="774"&gt;Asmaa El Habib,Yassine&lt;/option&gt;//except this one &lt;option value="779" title="Ahlam...
javascript jquery
[3, 5]
1,878,780
1,878,781
JavaScript - Checkbox like radiobutton functionality
<p>How i can code the functionality of checkbox like radiobutton,below is mine quick code but it's seems not so perfect.</p> <pre><code>&lt;asp:checkbox id="chkA" runat="server" onClick="SetCheck(this)"/&gt; &lt;asp:checkbox id="chkB" runat="server" onClick="SetCheck(this)"/&gt; &lt;Javascript&gt; function SetCheck(c...
javascript asp.net
[3, 9]
1,261,663
1,261,664
return value from listener
<p>I have static method which plays music. How to return value from this method when play completed?</p> <pre><code>public static int playSample(Context context, int resid) { AssetFileDescriptor afd = context.getResources().openRawResourceFd(resid); try { mediaPlayer.reset(); mediaPlayer.setDataSource(afd...
java android
[1, 4]
263,121
263,122
Slide show/hide content on link click
<p>I have tried to find a solution to what I want to do but nothing matches exactly. Closest thing I have found is a tab accordion. To be precise, I have a horizontal menu comprised of links that when clicked will show extra content below the row of links with a nice slide down animation, and slide up when the same lin...
javascript jquery
[3, 5]
4,313,040
4,313,041
Development under Android
<p>I have the Android-based tablet, and I want to do some development actions on it.</p> <p>Is there a way to code and compile Java and Android applications on my tablet?</p>
java android
[1, 4]
797,521
797,522
Submitting ASP form from Java application
<p>I am writing a Java application that has a log in screen. Ideally, I would like to take the user supplied data (name, password), and submit it to an ASP form that can verify their credentials. I do not own the ASP form, I can only access the URL. I also do not want the user to be entering their credentials straig...
java javascript asp.net
[1, 3, 9]
1,421,629
1,421,630
Can I run a call just _after_ an element is focused?
<p>From what I gather, jQuery's <a href="http://api.jquery.com/focus/" rel="nofollow">focus()</a> gets called before the element is focused. I believe this is so because the element's border is different when focused, and <a href="http://stackoverflow.com/questions/7650892/how-to-scroll-down-the-page-when-a-covered-inp...
javascript jquery
[3, 5]
5,286,189
5,286,190
Validation for number with jquery
<p>How can write jquery code that input just accept number. if was something except number typed does not allow(mean if user type word typed stop, field just accept number no word). How is it without use plugin?</p> <pre><code>&lt;input type="text" name="passport_number" class="number"&gt; </code></pre>
javascript jquery
[3, 5]
2,858,522
2,858,523
Push return value of jQuery callback function from another function
<p>I have the following problem. Let's say there's a function that opens some kind of dialogue:</p> <pre><code>function dialogue(param1, param2, callback) { var has_callback = (arguments.length == 3) ? true : false; $.get('some_url.php', function(response) { if (has_callback) { callback(r...
javascript jquery
[3, 5]
231,893
231,894
Get binding column name of templatefield's texbox
<p>In ASP.net, I'm using textbox in templatefield's itemtemplate. I got it data-bound with no problem. But my problem is, I'm trying to write a function to find column index by its data-bounding table's column name.</p> <p>Something like this :</p> <pre><code>foreach (DataControlFieldCell cell in row.Cells) { ...
c# asp.net
[0, 9]
5,983,854
5,983,855
View for Team List
<p>I have a bit of a 'what is it' question.</p> <p>Currently, I am trying to create a page that will create teams, and allow the user to select the member for those teams.</p> <p>So far, dynamically render ListBoxes (amount based on teams selected) to the page, then the user selects a member, and adds them to the tea...
c# asp.net
[0, 9]
582,914
582,915
Dealing with static resources in dev/live environment ASP.NET MVC
<p>I am going to be serving my site files from a site like cdn.mysite.com and will consume them from site like www.mysite.com. In development I have web projects setup, 1 for CDN and 1 for the actual site (controllers, views, models).</p> <p>What I would like to do is come up with the most elegant way to go from dev ...
javascript asp.net
[3, 9]
2,754,225
2,754,226
How to update main activity to know that prefs are changed?
<p>I have</p> <pre><code>SharedPreferences myPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); </code></pre> <p>and </p> <pre><code>myPreferences.getBoolean("checkbox", true) </code></pre> <p>So, how can my main activity know when user change preferences state? For example if use...
java android
[1, 4]
683,871
683,872
setting values [jquery or javascript]
<p>So I have an input box, and when a user types something in it I want a second textarea change its value to match that of the input's, on click. How can I do this using javascript, jquery, or something simpler, or php...</p> <p>Here's my code:</p> <p>This is the first input:</p> <pre><code>&lt;form class="form1" ...
javascript jquery
[3, 5]
5,008,671
5,008,672
Change date format in jquery
<p>I keep looking for steps in the Internet on how I can change a format of a certain date</p> <pre><code>$j("#activitycalendar").datepicker("setDate", $j.datepicker.parseDate("yy-mm-dd",$_GET.critval)); </code></pre> <p>All I want to do is to set the date of a datepicker depending on what the <code>$_GET.critval</c...
javascript jquery
[3, 5]
1,948,358
1,948,359
Detecting changes in window.location
<p>I am trying to detect changes in window.location (for example to be notified if the user tries to reload the page) but I can't seem to find a way to do that. Are there some events associated with it?</p> <p>Thanks</p>
javascript jquery
[3, 5]
427,012
427,013
jQuery objects as elements
<p>I see this syntax in some advanced jQuery:</p> <pre><code>$container </code></pre> <p>as in:</p> <pre><code>$input = $container.find('.fn_this_timeline') </code></pre> <p>EDIT: based on some of the comments below, just to clarify the first instance of '$container' that I can see is created right at the beginning...
javascript jquery
[3, 5]