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
804,044
804,045
ssh command in android app
<p>I'm new in Android app Dev. I'm trying to connect my app to an ssh server and execute a simple command. I wrote this code, No errors, no problem during execution on my Galaxy, but the command isn't executed. Any help would be appreciated. Thanks</p> <pre><code>package com.example.testcomando; import java.io.ByteAr...
java android
[1, 4]
2,629,131
2,629,132
jquery: how to find an element which is comming 2 elements before current element
<p>i have a markup which look like this:</p> <pre><code>&lt;h3&gt;Paragraf3-dummytext&lt;/h3&gt; &lt;p&gt; &lt;a name="paragraf3"&gt; Quisque id odio. Praesent venenatis metus at tortor pulvinar varius. Lorem ipsum dolor sit &lt;/a&gt; &lt;/p&gt; </code></pre> <p>what i want to do is to find all 'a' tags with 'name'...
c# javascript jquery
[0, 3, 5]
489,359
489,360
How to store and reload a dynamic form via cookies?
<p>I have a form that the user can add rows to. When that form is submitted I need to store those values in cookies so I can reload the form when the page refreshes or the user leaves the site and returns. I've already got the form being built from javascript and am looking for some sort of js or php tool that will aut...
php javascript jquery
[2, 3, 5]
4,661,133
4,661,134
Getting previous element of given in dom model
<p>I have list of elements on my page</p> <pre><code>input input span input span etc </code></pre> <p>I want to select each input that sits before each span, and after do, whatever i will have to. Is there any available ways to do that?</p>
javascript jquery
[3, 5]
4,421,510
4,421,511
Can someone help me add some dynamic info into my calendar
<p>First of all I want to say in advance that I truly appreciate anything that anyone can contribute to my question. I have a calendar and it has the ability to show events through jquery, but how can I place info from a database into this piece of code dynamically. I know php and fairly well, but I am not sure how to ...
php jquery
[2, 5]
4,294,889
4,294,890
JQuery: If a custom class contains a number greater than 'x' add CSS code
<p>I would like to add css to a assigned span class if it contains a number higher than 55, also this must on a page load and not a button trigger. </p> <p>Thanks any help would be great. </p> <p>Example below: (currently not working) </p> <pre><code>&lt;span class="subTotalPrice"&gt;10&lt;/span&gt; &lt;span class="...
javascript jquery
[3, 5]
5,720,673
5,720,674
how to set adapter for spinner
<p>how to set adapter to spinner if i have <code>ArrayList&lt;HashMap&lt;String, String&gt;&gt;</code> coursesList that contine information that i will display it</p> <p>what is the correct type of adapter that i should use </p>
java android
[1, 4]
624,621
624,622
jQuery click.modalEvent
<p>Revising code of jQuery.reveal plugin (http://www.zurb.com/playground/reveal-modal-plugin) and trying to understand how it handles the modal behaviour, I see that it binds the closeModal function (that closes the popup) to the event <code>'click.modalEvent'</code>.</p> <p>But I can't find any information about thi...
javascript jquery
[3, 5]
4,485,910
4,485,911
How to show multiple text fields on button click one by one
<p>I need to add 2-3 text fields on button click one by one, where 'L' is the ID of the textfield. I am trying this code, but instead of using jQuery I want to use simple javascript because I am implementing this code in a Joomla environment.</p> <pre><code>function WrapperScript () { JQuery('#wrapper1 button').cl...
javascript jquery
[3, 5]
2,455,914
2,455,915
printing binary tree in php based website
<p>I'm making a php+mysql based website and i need to draw a binary tree. Through googling i came to know that jquery is good for this. actually i am completelly unaware of jquery. so should i go for "jquery"? Any suggestion..</p>
php jquery
[2, 5]
1,413,844
1,413,845
how to use OnItemLongClickListener without setOnItemLongClickListener in Android?
<p>I am trying to use OnItemLongClickListener for a listView on Android. This code works fine when added to onCreate method.</p> <pre><code>mContactList.setOnItemLongClickListener(new OnItemLongClickListener() { public boolean onItemLongClick(AdapterView&lt;?&gt; parent, View view, int position, long id) { ...
java android
[1, 4]
2,362,324
2,362,325
Listview with multiple strings
<p>I am trying to create a Listview with multiple strings. </p> <p>Right now I have a function that it will do</p> <pre><code> while(i &lt;= 10){ //GETS DATA FROM WEBPAGE ETC a = DATAFROMWEBPAGE1; b = DATAFROMWEBPAGE2; c = DATAFROMWEBPAGE3 } </code></pre> <p>1...
java android
[1, 4]
2,035,287
2,035,288
About good practices for creating and appending elements with JS
<p><strong>Example code</strong> </p> <pre><code>var jqxhr=$.getJSON("http://search.twitter.com/search.json?callback=?",{q:query}, function(data) { ... question. }); </code></pre> <p><strong>Question</strong></p> <p>Now i need to create for each twe...
javascript jquery
[3, 5]
2,784,478
2,784,479
How to overwrite JQuery plugin function?
<p>How to overwrite a function which is from a JQuery plugin? I am trying to overwrite a function in csv2table plugin called mkTable() in my own javascript file. Is it possible? Here is the original definition:</p> <pre><code>$.fn.csv2table= function(url,setting) { function mkTable(id,rowsAry){ ... } } </code>...
javascript jquery
[3, 5]
4,519,170
4,519,171
jquery / javascript - listen for change in window orientation mode on mobile devices
<p>I'm wondering if there's some sort of cross-device method of listening for orientation mode changes on mobile devices with jquery / javascript?</p>
javascript jquery
[3, 5]
3,696,512
3,696,513
Common techniques of cleaning memory in jquery
<p>I'm trying to debug some code that another developer wrote in jquery since page loads really slow and crashes the browser. I need an advice how to test , debug big amounts of jquery code. Need some good techniques in memory cleanup in point of view of existing code written by somebody else. All the suggestions , ...
javascript jquery
[3, 5]
6,019,871
6,019,872
jQuery post data return comparison not working
<p>I have this bit of code:</p> <pre><code>function addEmail() { email = $("#email").val(); atime = $("select#time").val(); tid = &lt;?= $tid; ?&gt;; $.post("remindme.php", { email: email, time: atime, tid: tid }, function(data) { if (...
javascript jquery
[3, 5]
1,727,511
1,727,512
PHP's 'gzuncompress' function in C#?
<p>PHP's 'gzuncompress' function in C#? Is there a function similar to PHPs gzuncompress in C#? </p>
c# php
[0, 2]
4,039,599
4,039,600
Trouble with multiple age counters (timers)
<p>I have a page where I want to have "age counters" for bids put in by users. The number of users will vary from situation to situation, so that needs to be taken into consideration. I wrote this:</p> <pre><code>function timer(i) { // this selects a 'hh:mm:ss' timestamp if ($("#time_0" + i).text() !...
javascript jquery
[3, 5]
695,037
695,038
ajax jsonp request 503 response
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4778363/display-jquery-ajax-503-error-response">Display jQuery $.ajax 503 error response</a> </p> </blockquote> <p>I am making a call to an api which is a bit temoermental. Alot of the time it is responding with...
javascript jquery
[3, 5]
671,510
671,511
How to convert string to sentence case in jQuery or C#?
<p>How can i convert a string to a sentence case? I don't wanna convert to title case. My requirement is to convert the string to sentence case.</p>
c# javascript jquery
[0, 3, 5]
5,203,650
5,203,651
Is enabling JavaScript in browser a MUST to get working ASP.NET pages?
<p>This is a newbie question (I'm sure it is). I have tried for the first time in a little ASP.NET web application I am working on what happens if I disable Javascript in a browser (I'm testing mainly with Firefox). </p> <p>Result: My application is completely broken, although I didn't ever write any single line of Ja...
asp.net javascript
[9, 3]
2,752,277
2,752,278
Android: How Reliable is InputStream.read() and its "-1" return?
<p>My question is related to a method <strong>InputStream.read()</strong> - socket programming.</p> <p>Every source i have found states that when the server or client closes the connection, "-1" is returned.</p> <p>But, "what if", just saying, "what if" the connection <em>is</em> closed but <strong>read()</strong> do...
java android
[1, 4]
1,740,762
1,740,763
print from HTML to receipt printer using Jquery/php
<p>I have a small tool for address collection. I want to print a particular address through my Thermal Printer. Database is MySQL..I do an AJAX query to list down all the addresses I want to search based on a particular requirement (for ex mobile number). Coding is in PhP and JQuery. I list them down as a table. Now I ...
php jquery
[2, 5]
3,924,509
3,924,510
What would be the jquery equivalent of 'Dive into python'?
<p>I need to , well, dive into client side programming. Is there an equivalent to 'Dive into python' for jquery?</p> <p>I see that jquery 1.4 has been released. Does this change anything w.r.t answers?</p>
javascript jquery python
[3, 5, 7]
4,211,269
4,211,270
ASP.net download page
<p>I have a Reports.aspx ASP.NET page that allows users to download excel report files by clicking on several hyperlinks. When a report hyperlink is clicked, I open a new window using the javascript window.open method and navigate off to the download.aspx page. The code-behind for the download page creates a excel file...
asp.net javascript
[9, 3]
499,212
499,213
Validator inside Server control
<p>I have a server control that inherits from TableRow and INamingContainer. I override the CreateChildControls and add three cells, in the first one I put a label, in the second one I put a textbox (lets call it A) with autopostback true and causevalidation true, a required validator and a range validator, in the thir...
c# asp.net
[0, 9]
2,045,469
2,045,470
Asp. net and Javascript pop up windows
<p>I am writing an intranet application and am considering the use of a pop up window. What are your thoughts on it? I am not worried about accessibility since it's an intranet app. </p> <p>The scenario is such as I need to be able to have the same code be used in a server page as well as in the middle of a process; ...
asp.net javascript
[9, 3]
463,726
463,727
Targetting dynamic text inside paragraph
<p>I have some contact information, in which I wish to wrap the telephone number in a <code>&lt;a&gt;</code>, with the number in the href, for smartphone support.</p> <p>The initial markup:</p> <pre><code>&lt;p class="myClass"&gt; &lt;a href="mailto:mail@mail.com"&gt;mail@mail.com&lt;/a&gt;&lt;br /&gt; Phone:...
javascript jquery
[3, 5]
2,136,093
2,136,094
Variable scope issue with javascript function
<p>I am trying to create a function with spin.js. The function loads the spinner, then if it is called again with it argument, then it stops the spinner. I can't get the variable scope right. So when I call the function to stop, I get an undefined on the <code>submitSpinner</code>.</p> <p><a href="http://jsfiddle.net/...
javascript jquery
[3, 5]
3,847,758
3,847,759
Is it possible to turn off the silent mode programmatically in android?
<p>Is it possible to turn off the silent mode programmatically in android?</p> <p>A simple code can be very helpful. :)</p> <p>Thanks.</p>
java android
[1, 4]
5,923,985
5,923,986
form_custom_elements.js error after dynamically loaded page
<p>We have some issues with form_custom_elements.js. Part of the page is loaded dynamically through ajax and onclick event. All works good, but after clicking on next button, the JS apears: </p> <p><strong>TypeError: inputs[b].previousSibling.style is undefined</strong> </p> <p>and checkboxes we have on the page are ...
php jquery
[2, 5]
819,214
819,215
Append a jQuery element to a string that contains html
<p>I have a jQuery wrapped element which I would like to append to a html row. I can't wrap my head around this, since append() seemingly accepts strings but not existing jQuery elements (I might be mistaken here). I have a following setup:</p> <pre><code>var row='&lt;tr&gt;&lt;td&gt;data1&lt;/td&gt;&lt;td&gt;data2&lt...
javascript jquery
[3, 5]
4,920,453
4,920,454
.show elements and .hide elements
<p>I've got this problem :</p> <ul> <li>I have got 6 "outer" div's each have a img tag inside.</li> <li>Following each 6 div's are another div with content for each 6 divs</li> </ul> <p>I want when i click one "outer" div hide all outer div's and show me the next div content.</p> <p>This is the function. Wich it wor...
javascript jquery
[3, 5]
3,173,191
3,173,192
selecting multiple rows using shift key using jquery
<p>I tried doing selecting multiple rows using jquery but this code look like cranky.</p> <p>some more code added to above one.using shift + up arrow or down arrow using key board.</p> <pre><code>c </code></pre> <p>where am i going wrong?</p>
javascript jquery
[3, 5]
2,447,850
2,447,851
Know of a good way to clean a string in .net to be used in Javascript?
<p>I am creating a javascript confirm message in my asp.net code:</p> <pre><code>deleteButton.Attributes.Add("onclick", "javascript:return confirm('Are you sure you want to delete client " + clientName + "')"); </code></pre> <p>The problem here is that the client name can have apostrophes and other problematic charac...
asp.net javascript
[9, 3]
2,696,348
2,696,349
jQuery/Javascript Invalid left-hand side in assignment
<p>I am using this relatively simple code:</p> <pre><code>var height = help ? 'minus' : 'plus'; var prop = $('#properties'); if(height == 'minus'){ prop.height(prop.height() -= 206); } else { prop.height(prop.height() += 206); } </code></pre> <p>It fails on both lines that do the adding/subtracting! Any idea...
javascript jquery
[3, 5]
5,454,035
5,454,036
ERROR deleting item from database using confirm box
<p>I have the following code which retrieves items from my DB and displays them in a table. The file is manage-products.php.</p> <pre><code>while($row = mysql_fetch_row($result)){ echo '&lt;/tr&gt;'; echo ' &lt;td class="product"&gt;&lt;a href="manage-products-2.php"&gt;'.$row[1].'&lt;/a&gt;&lt;/td&gt;';...
php javascript
[2, 3]
2,012,873
2,012,874
jQuery Check if String Contains Word
<p>I'm working on an application where you can click on user names to add them to the reply list. If the username is already added, it doesn't add their username again. The problem I'm having is that if the user @assassin is added, and I try to add the user @ass, it finds @ass-assin and thinks that @ass is already adde...
javascript jquery
[3, 5]
791,785
791,786
Android rotate viewgroup with childs
<p>i have some serious problems understanding some basics of the android view hierarchy. I have a <code>ViewGroup</code> that is bigger than the screen and overlaps the screen on all for sides. This <code>ViewGroup</code> has some <code>ChildViews/SubViews</code>, e.g. <code>Buttons</code>. Now, i want to rotate the en...
java android
[1, 4]
4,375,691
4,375,692
Find the ID of the window which generates alerts
<p>Is there a way to find out the id of the IE window that generates alert boxes? I assume it is the document or window itself.</p> <p>Either simple html or jQuery can be used.</p> <p>I tried something like:</p> <pre><code>var id = $(this).parent().attr('id'); </code></pre> <p>but to no avail.</p> <p>Ultimately I...
javascript jquery
[3, 5]
4,666,002
4,666,003
Is it possible to find distance from bottom to cuirrent scroll state in jquery
<p>SUpoose i am in the middle of page length.</p> <p>Is it possible to find , how much more distance in length or pixels from bottom.</p> <p>Like when scroll bar hits the bottom then its 0 but if it 500px from the bottom then i need that 500px value.</p> <p>Thanks</p>
javascript jquery
[3, 5]
3,502,604
3,502,605
How do I reference an element by name with [] brackets in it?
<p>How do you reference a element in jquery BY NAME that has the [] in it.</p> <pre><code>&lt;select name="values[]" multiple="true"&gt; &lt;option value="1"&gt;1&lt;/option&gt; &lt;option value="2"&gt;2&lt;/option&gt; &lt;option value="2"&gt;2&lt;/option&gt; &lt;/select&gt; &lt;script type="text/javascript"&gt; $('[...
javascript jquery
[3, 5]
2,978,138
2,978,139
Set selected value for dropdown based on the display value in jquery/javascript
<p>Does anyone know how can I set the selected value for dropdown based on the display value in jquery/javascript </p> <p>Example:</p> <pre><code>&lt;select id='test'&gt; &lt;option value='sgf'&gt;One&lt;/option&gt; &lt;option value='sdf'&gt;Two&lt;/option&gt; &lt;option value='gfr'&gt;Three&lt;/option&gt; &l...
javascript jquery
[3, 5]
2,294,173
2,294,174
How to close a pop up window using the anchor's OnClick in javascript?
<p>I have a php page that opens a pop window. it contains the search results. each result is inside the anchor tags. </p> <p>I can open a new tab containing the information in the parent window, but somehow the <code>OnClick</code> function does not work. what i want to do is when the user select a link, will open a n...
php javascript
[2, 3]
3,935,885
3,935,886
how to use a javascript many time on a page?
<pre><code>&lt;script type="text/javascript"&gt; $(function() { var newYear = document.getElementById('HF'); alert('hehe' + newYear); $('#countdown').countdown({ until: newYear, format: 'DHMS', layout: '&lt;div id="timer"&gt;' + '&lt;hr /&gt;' + '&lt;div id="timer_days" c...
javascript jquery asp.net
[3, 5, 9]
4,364,181
4,364,182
android.view.InflateException: Binary XML file line #4: Error inflating class SwitchPreference
<p>I'm trying to read my app preferences and I get this error:</p> <p>Settings activity:</p> <pre><code>public class Settings extends PreferenceActivity { @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); ...
java android
[1, 4]
5,589,073
5,589,074
'or' statement in function call
<p>In a file I am looking at, I saw a <code>||</code> statement in a javascript function call what does it mean? </p> <pre><code>createObject(a_variable || b_variable) </code></pre> <p>Does the function take in a true/false value or it take in something else?</p> <p>is the above code equivalent to </p> <pre><code>c...
javascript jquery
[3, 5]
911,970
911,971
get unique elements count jquery
<p>I have the following HTML</p> <pre><code>&lt;input type="hidden" name="product_id" value = "1" class="product_id" /&gt; &lt;input type="hidden" name="product_id" value = "2" class="product_id" /&gt; &lt;input type="hidden" name="product_id" value = "5" class="product_id" /&gt; &lt;input type="hidden" name="product_...
javascript jquery
[3, 5]
5,865,502
5,865,503
Javascript - Set date 30 days from now
<p>I need to set a date that would be 30 days from now taking into account months that are 28,29,30,31 days so it doesn't skip any days and shows exactly 30 days from now. How can I do that?</p>
javascript jquery
[3, 5]
5,836,110
5,836,111
jQuery live() failing with UI datepicker
<p>I'm using the jQuery UI datepicker and it's absolutely brilliant.</p> <pre><code>$(document).ready(function() { /********************************************************************************************************* Purpose : To show datepicker calender ************************************************...
jquery asp.net
[5, 9]
4,247,828
4,247,829
how I can read text from html textarea in asp.net page?
<p>I set html textarea in asp.net page with out runat="server" and I need set the text in string variable by C# in code behind </p>
c# asp.net
[0, 9]
4,009,276
4,009,277
how to get client ip address using asp.net header files?
<p>Can any one help me!!! It is an urgent task, Which i need to submit today.</p> <p>how to get client ip address using asp.net header files? </p> <p>Thanks in Advance.</p> <p>Your's PRK</p>
c# asp.net
[0, 9]
4,899,705
4,899,706
how to save the state of a page after F5
<p>How can I save the state of a page after to press F5.(with php or javascript)</p> <p>I have this page, which if I I press the button 1, div 1 disappears, and if you press the div 1 again, it reappears. the button 2 has the same function. is there any way that if I press button 1(or button2) disappears the div, and ...
php javascript
[2, 3]
651,203
651,204
jQuery - setInterval issue
<p>I am using jQuery to generate and add a random amount of Clouds to the Header of the page and move them left on the specified interval. Everything is working fine, execpt the interval only runs once for each Cloud and not again. Here is my code:</p> <pre><code>if(enableClouds) { var cloudCount = Math.floor(Math...
javascript jquery
[3, 5]
3,592,920
3,592,921
javascript object problem
<p>I am trying to mocking mongodb map-reduce.</p> <pre><code>function some_function(){ .... call_some (some_object); .... } function call_some (some_object){ // In here, // How could I use this keyword instead of some_object? // some_object.something =&gt; this.something } </code></pre> <p>in...
javascript jquery
[3, 5]
4,042,303
4,042,304
How to stay within a 'instance' using JQuery
<p>I'm currently learning JavaScript/JQuery, but have an issue at work that I'm running into.</p> <p>I've assigned a class of 'question' to an<code>&lt;a&gt;</code>tag, and 'answer' to a<code>&lt;div&gt;</code>. When a user clicks on the question, the answer will slide down. However, the problem I'm running into is th...
javascript jquery
[3, 5]
4,355,346
4,355,347
Online High Scores Solution
<p>Can anybody advise solution for implementing online high scores table for iPhone game ? I mean simple engine to publish player result by http query and view global high scores table. I'm weak in PHP so trying to find existing solution first. Thanks.</p>
php iphone
[2, 8]
1,699,716
1,699,717
move pannel in webform
<p>how to move pannel in webform...pls help</p>
c# asp.net
[0, 9]
1,706,232
1,706,233
Image upload script to start other tasks to free up UI
<p>I have an Android application that provides image upload functionality. When a user selects a photo the app initializes a php script on a remote server - while the image is uploading there is a progress dialog giving feedback to the user. The upload script is performed in an AsyncTask.</p> <p>Currently the php pr...
php android
[2, 4]
2,200,119
2,200,120
Saving Android application state
<p>I understand how to save an application's state by using SharedPreferences, onSavedInstanceState() &amp; onRestoreInstanceState(), etc as outlined in a similar post ( <a href="http://stackoverflow.com/questions/151777/how-do-i-save-an-android-applications-state">http://stackoverflow.com/questions/151777/how-do-i-sav...
java android
[1, 4]
19,664
19,665
Remove / stop javacript function that are already loaded, from running
<p>I'm trying to manipulate a site. When the site loads it initialize a script, Codaslider <a href="http://www.ndoherty.biz/2009/10/coda-slider-2/" rel="nofollow">http://www.ndoherty.biz/2009/10/coda-slider-2/</a></p> <p>How can I stop it from running? Is it possible to remove it before document ready? </p> <p>The fu...
javascript jquery
[3, 5]
2,052,231
2,052,232
"sexiest" libraries for content presentation
<p>maybe someone will classify this question as "subjective..." but i think it would be useful to have a place where put links to fancy jquery and non-jquery libraries for high impact content presentation ... can you list here your favorite? I'm interested in using it for a project for which i would like to amaze my cu...
javascript jquery
[3, 5]
5,167,329
5,167,330
Toggle button should come back to it's off position
<p>In android ICS 4.0.3 source in WifiEnabler.java class I am adding my code to disable wifi when battery voltage reaches below 3.4, the code is like below</p> <pre><code>public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHAN...
java android
[1, 4]
2,284,545
2,284,546
How to set End Date plus one from Start Date using jQuery DatePicker
<p>I have successfully integrate <a href="http://jqueryui.com/demos/datepicker/" rel="nofollow">jQuery DatePicker</a> on my site and wondering how can I set the following:</p> <ol> <li>Don't allow selection of start date from current date plus 2 days. example if today's date is 7/20/12 then the visitor can select only...
php jquery
[2, 5]
1,328,226
1,328,227
JavaScript hide div element on scroll action
<p>I'm using this bit of code to hide a menu bar when users scroll on a page. It works fine on Chrome 17.0.963.78 but keeps on flickering in and out on other browsers, namely I.E. firefox and safari ..</p> <pre><code>$(window).load(function(){ $(document).scroll(function(){ $('#inner_floating').fadeOut()...
javascript jquery
[3, 5]
588,660
588,661
I want object keys to check for duplicates, but I also want to sort the objects later, what should I do?
<p>I have an array called <code>newposts</code></p> <p>I itterate through it and if it meets certain criteria, I add it to another array:</p> <pre><code>for (newpost in newposts){ if (!( newposts[newpost][0] in currentposts )){ var triploc1 = locations[newposts[newpost][1]].location; var triploc2...
javascript jquery
[3, 5]
4,045,911
4,045,912
Understanding JavaScript anonymous functions, variables, and scoping
<p>We're trying to understand variable scoping inside JavaScript anonymous functions.</p> <p>This code only needs to work inside Webkit browsers since it's for a PhoneGap app.</p> <p>Given the code block below, will the arguments to <strong>setTimeout</strong> always be the same for each item in <strong>all_packs</st...
javascript jquery
[3, 5]
592,600
592,601
Java access object like array
<p>In PHP, there is an ArrayAccess interface which allows you to access an object like an array. Is there a Java-equivalant to this? It would be very handy.</p> <p>thanks</p>
java php
[1, 2]
3,256,350
3,256,351
Set focus to a textbox in a nested iframe
<p>I use TinyMce in my app. So, I have nested body elements and iframes. One from my html page, and one from the TinyMce. To the body of the tinymce I append div with many textboxes. Their ids are hello1, hello2 etc.</p> <p>How to set focus to 'hello1'?</p> <p>This code:</p> <pre><code>$iframe.contents().find('body'...
javascript jquery
[3, 5]
1,632,255
1,632,256
Uploadify v3.1 passing POST Data
<p>Iam getting Crazy with JQuery Uploadify V3.1.</p> <pre><code>// setup fileuploader $("#file_upload").uploadify({ 'swf': 'flash/uploadify.swf', 'uploader' : 'upload/do-upload', 'debug' : false, 'buttonText': 'Files auswählen', 'multi': true, 'method': 'POST', 'auto': false, 'width': 2...
javascript jquery
[3, 5]
3,458,400
3,458,401
How do I send url parameters via GET method to PHP with JavaScript?
<p>Here's my JS code... </p> <pre><code>function da(){ var a=document.forms["user"]["age"].value; if(this.age.value &lt; 18 || this.age.value &gt; 85) { alert('some text...'); this.age.focus(); return false; }else{ window.location.href='file.php?&amp;'+a; } } </code><...
php javascript
[2, 3]
686,750
686,751
Android Getting null image data
<p>I am trying to get the image from the camera. It works fine. I can take a photo and show it on the image view. Actually, I want to send this photo to my server after took. To do that, I try to pull the image in <code>onActivityResult</code>. But, when i check the Intent data, it always return null.Even though, the a...
java android
[1, 4]
1,888,264
1,888,265
Jquery post a Array
<p>I am having a Array which is generated by my Javascript in run time. once that array is full with all the values I want to send it using POST to the server. How can I do that ...</p> <p>Pseudo code:</p> <pre><code> for(i=0;i&lt;result.data.length;i++) { result.data[i].id } $.post("re...
javascript jquery
[3, 5]
5,431,121
5,431,122
javascript: function call to itself
<p>I suppose the following code:</p> <pre><code>jQuery("#mybutton").click(function(){ //do something }); </code></pre> <p>How could I recall to this function "anonymous"?, I can not put a name to this function:</p> <pre><code>var xfun = function(){ //do something } jQuery("#mybutton").click(xfun); </cod...
javascript jquery
[3, 5]
2,697,369
2,697,370
how to run javascript and then do a postback?
<p>I am trying to create an add to 'favourites'button. When the user clicks this button the image has to be changed ( in js). After that I would like to do a postback the asp.net page? how can I make this work? sofar i got:</p> <p>aspx</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "...
c# jquery asp.net
[0, 5, 9]
423,922
423,923
How to execute Java file from JavaScript on client's side
<p>I have a code/class/script in JAVA that I want to be executed when someone clicks on a button/anything that I will handle. What should be the code in JavaScript to launch that class/code/script/compiled program installed on the <b>client's</b> system?</p>
java javascript
[1, 3]
252,196
252,197
How do I access the sending textbox inside an 'onfocus' function?
<p>Given the following HTML and function:</p> <pre><code>&lt;input type="text" onfocus="TextBoxFocus()" id="txtName" /&gt; </code></pre> <p>.</p> <pre><code>function TextBoxFocus() { } </code></pre> <p>Is it possible to get the id of the calling textbox from inside the function? </p> <p>Thanks Kevin</p>
javascript jquery
[3, 5]
5,103,680
5,103,681
Validation in javascript for asp.net tree node
<p>I have a program with a tree control to assign user permissions like student can access only attendance and staff can assign attendance to students and so on...</p> <p>I want to validate this with javascript to see that if no checkbox in tree is selected or all nodes in a tree is deselected or left empty ..i have t...
c# javascript asp.net
[0, 3, 9]
5,511,761
5,511,762
How can I show messagebox when user register successfully and redirect him to Login page?
<p>My signUp button event is </p> <pre><code>protected void signup_Click(object sender, EventArgs e) { string con = ConfigurationManager.ConnectionStrings["connection"].ConnectionString; SqlConnection conn = new SqlConnection(con); conn.Open(); if (selectques.SelectedItem.Text == "...
c# javascript asp.net
[0, 3, 9]
5,251,140
5,251,141
Info to display in a list in Android
<p>I will try to make this as clear as I can. Please let me know if there is anything I can clarify.</p> <p>I am downloading information from an SQL table in a database online to the phone. In the LogCat, I have been able to go through the table and see all the information I want. I am wondering about how best to save...
java android
[1, 4]
4,652,899
4,652,900
Is it considered bad practice if you use an <input> for a textbox compared to <asp:Textbox>?
<p>I have an ASP.NET page that contains a form and a button. In order to use the <code>OnKeyPress</code> and a javascript function (to stop the user from using the enter key and without adding a <code>FilteredTextBoxExtender</code>) attribute I had to change the <code>&lt;asp:Textbox&gt;</code> to an <code>&lt;input&gt...
c# javascript asp.net
[0, 3, 9]
4,672,404
4,672,405
write javascript to page based on a condition
<p>I need to remove some Javascript code based on a server side condition (PHP). What I currently have is a variable holding the Javascript code as text and based on the condition I either echo it or not. However, it's cumbersome to maintain. How do I go about doing it?</p> <p>I also tried to use something like what f...
php javascript
[2, 3]
3,268,718
3,268,719
Selective Framebursting
<p>i would like to implement selective Framebursting for my iframe application.</p> <p>My iframe is available at <code>www.mywebsite.con/iframe.aspx?lic=1234</code></p> <p>When the third party website hosting my iframe is (<code>PayedWebsited1.con</code> OR <code>PayedWebsited2.con</code>) AND the <code>lic=1234</cod...
javascript jquery
[3, 5]
2,352,113
2,352,114
jQuery Sanity Check
<p>This is driving me crazy. Please someone tell me I'm not crazy:</p> <pre><code>var constraints = $('.traffic-constraints :input'); console.log(constraints); var i; for (i = 0; i &lt; constraints.length; i++) { if (constraints[i].val() &gt; 0) { //&lt;-------- errorrzz .... </code></pre> <p>the console tells me ...
javascript jquery
[3, 5]
4,671,372
4,671,373
i want to get the attribute value to the same element
<p>i used this line of code but it didn't work </p> <pre><code>$("a#link").attr("href",$(this).attr('tempref').val()); </code></pre>
javascript jquery
[3, 5]
5,347,471
5,347,472
Jquery: calculating width of hidden input
<p>Pretty simple task: using jquery I need to calculate the width of an input before the input is visible on the screen.</p> <p><a href="http://jsfiddle.net/ajbeaven/mKQx9/" rel="nofollow">http://jsfiddle.net/ajbeaven/mKQx9/</a></p> <p>Here is the code for convenience:</p> <pre><code>&lt;div style="display:none;"&gt...
javascript jquery
[3, 5]
6,017,609
6,017,610
It there an equivalent to PHP's extract in Python?
<p>Looking for the python equivalent of this.</p> <p><a href="http://ca3.php.net/manual/en/function.extract.php" rel="nofollow">http://ca3.php.net/manual/en/function.extract.php</a></p>
php python
[2, 7]
5,862,981
5,862,982
Show the server-side generated HTML in a new window
<p>What is the best way to show the server-side generated HTML (full page) into a new popup window? It should be triggered upon clicking a button (causing a postback to the server).</p> <p>Thanks</p> <p>Edited:</p> <p>The HTML content are dynamically generated in the code behind and the content is full page (<code>&...
c# javascript asp.net
[0, 3, 9]
1,770,292
1,770,293
jQuery Load Without Appending to Element
<p>I am using jQuery's load function to get template data from external html files. In most cases I prefer to storage the data in a variable and append it when I need to later on. For example, I may end up cloning the node several times, or appending other data to it etc etc. The point is I need to be able to load an e...
javascript jquery
[3, 5]
1,991,757
1,991,758
how do i retrieve the incoming phone call's number while ringing and store it in a variable in android?
<p>I am fairly new to and i would like my app to be able to retrieve the phone number of caller while ringing and store it how would i do this? </p> <p>thank you in advance</p>
java android
[1, 4]
781,279
781,280
Re-center Modal Popup with Javascript
<p>I have a modal popup that initially shows some content but expands a div if a checkbox is selected. The modal expands correctly but doesn't recenter unless you scroll up or down. Is there a javascript event I can tack on to my javascript function to recenter the entire modal?</p>
asp.net javascript
[9, 3]
996,174
996,175
image dump from print screen
<p>How would you dump an image captured using the print sreen key into a <code>div</code> tag?</p>
javascript jquery
[3, 5]
5,808,991
5,808,992
Check if a URL's mimetype is not a web page
<p>I want to check if a URL's mimetype is not a webpage. Can I do this in Java? I want to check if the file is a rar or mp3 or mp4 or mpeg or whatever, just not a webpage.</p>
java android
[1, 4]
5,574,619
5,574,620
Javascript post to PHP and get back an array?
<p>So i have this piece of javascript, it posts to <code>foo.php</code> with value <code>val</code>, gets back <code>data</code>, empties the container and call function <code>graph</code> which will fill the container with a new chart.</p> <pre><code>$.post("foo.php", {val: val}, function(data){ if(data.length &g...
php javascript
[2, 3]
5,191,462
5,191,463
Putting LinearLayout to LinearLayout Array
<p>i wanna create button 1 to 9 and i want to do that in loop. But in each 3 count, i want to create a new LinearLayout.</p> <pre><code> final LinearLayout[] ll2 = new LinearLayout[10]; // create an empty array; for(int i=1; i&lt;=9;i++) { Button btnNums = new Button(this); ...
java android
[1, 4]
3,209,701
3,209,702
is it possible to send email with javascript on a button?
<p>Is there a way to make an email sent to the email address in the input when button is clicked? form like:</p> <pre><code>&lt;form action="/" method="post" name="form" target="_blank"&gt; &lt;h3&gt;&lt;span&gt;Subscribe to Newsletter&lt;/span&gt;&lt;/h3&gt; &lt;p class="email_first"&gt; &lt;label for...
javascript jquery
[3, 5]
1,853,067
1,853,068
How to set default application using Intents?
<p>If I need to play Youtube video using default youtube player of Android through Intents I can set it:</p> <pre><code> Intent youtube=new Intent(Intent.ACTION_VIEW, Uri.parse(mLinks[mPosition].trim())); youtube.setPackage("com.google.android.youtube"); startActivityForResult(youtube, 100); </code></pre> ...
java android
[1, 4]
168,223
168,224
I'm building a website that has dual languages with two flags as an entry page
<p>Now I wonder how would they have to configure routing so that when user requests stackoverflow.com/profilePage django handles the request and when user request stackoverflow.com/questions ASP.NET app handles the request</p>
c# php
[0, 2]
4,000,817
4,000,818
can't upload file on server
<p>I am trying use this example <a href="http://www.sajithmr.me/jrecorder/example2.html" rel="nofollow">http://www.sajithmr.me/jrecorder/example2.html</a> for recording audio and send it to my localhost server, but I have issue here. My code describe below</p> <pre><code>&lt;script&gt; $.jRecorder( { ...
php javascript jquery
[2, 3, 5]