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,547,941
1,547,942
Intercept when new rows are added to a table
<p>Within a legacy application I have a table to which initially only a subset of available rows is displayed in order to fit the current page size. When the user scroll down the div containing the table, automatically new rows are added via javascript.</p> <p><strong>What I need to do is to be able to intercept <em>when</em> these rows are added to the table.</strong> <br/>At the beginngin I polled through the setInterval method in order to execute my logic, but unfortunately this interfers with the business logic of the legacy application.</p> <p>I tried the following code (applied once at the div container and once to the table) without any results:</p> <pre><code>$(document).ready(function() { $('#myWebGrid1').change(function() { alert('changed!'); }); }); </code></pre> <p>I tried also the resize() method, but it does not work either since by scrolling the div size does not change.</p>
javascript jquery
[3, 5]
3,973,794
3,973,795
jquery, submit form when field loses focus
<p>How can I submit a form when a field (In this case the form only has one field) loses focus?</p> <p>I tried this, but it's not working:</p> <pre><code>$("form").submit(); </code></pre> <p><strong>UPDATE</strong></p> <p>I forgot to mention that the form was created with jquery as well:</p> <pre><code>$("div").html('&lt;form action="javascript:void(0)" style="display:inline;"&gt;&lt;input type="text" value="' + oldValue + '"&gt;&lt;/form&gt;'); </code></pre> <p>This is probably why it won't submit, I think it's because the events aren't being observed.</p>
javascript jquery
[3, 5]
373,423
373,424
Looping through HTML code in PHP/JavaScript
<p>Instead of writing:</p> <pre><code>&lt;ul class="tabs"&gt; &lt;li&gt;&lt;a href="#tab1"&gt;1-50&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tab2"&gt;51-100&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tab3"&gt;101-150&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tab4"&gt;151-200&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tab5"&gt;201-250&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tab6"&gt;251-300&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tab7"&gt;300-350&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tab8"&gt;351-400&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tab9"&gt;401-500&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>until <strong>950-1000</strong> which will be <strong>tab 20</strong> - is there a way to using a PHP/JavaScript for loop to create more compact code?</p>
php javascript
[2, 3]
2,939,816
2,939,817
Jquery - Loop through Checkboxes and Multiple elements
<p>All,</p> <p>I have a set of elements like this in a form:</p> <pre><code>&lt;input type="checkbox" name="chk[140]"&gt; &lt;input type="hidden" value="3" name="ctcount[140]"&gt; &lt;input type="hidden" value="Apples" name="catname[140]"&gt; &lt;input type="checkbox" name="chk[142]"&gt; &lt;input type="hidden" value="20" name="ctcount[142]"&gt; &lt;input type="hidden" value="Bananas" name="catname[142]"&gt; &lt;input type="checkbox" name="chk[144]"&gt; &lt;input type="hidden" value="200" name="ctcount[144]"&gt; &lt;input type="hidden" value="Strawberries" name="catname[144]"&gt; &lt;input type="checkbox" name="chk[145]"&gt; &lt;input type="hidden" value="0" name="ctcount[145]"&gt; &lt;input type="hidden" value="Carrots" name="catname[145]"&gt; </code></pre> <p>When a user clicks a button, I want the Javascript to:</p> <pre><code> 1. Loop through all the checkboxes 2. For all the checked checkboxes, 2a. Get ctcount value 2b. Get catname value 2c. If ctcount value &gt; 50, alert a message saying "Unable to add item as max limit for 'catname' has reached. 2d. Break the loop after it encountered first ctcount value that is greater than 50. </code></pre> <p>I am new to JQuery..have the following code so far: </p> <p>var checklimit = 50; $('#frmTest input:checkbox:checked').each(function(i) { alert(this.value); });</p> <p>How do I do this using JQuery?</p> <p>Thanks</p>
javascript jquery
[3, 5]
749,811
749,812
Listbox scrolling to the selected item in ASP.net
<p>I wanto to make my ListBox control scroll to the selected item.</p> <p>Here is my code:</p> <pre><code>protected void Button2_Click(object sender, EventArgs e) { ListBox1.SelectionMode = ListSelectionMode.Multiple; ListBox1.SelectedIndex = -1; for (int i = 0; i &lt; ListBox1.Items.Count; i++) { if (ListBox1.Items[i].Text == TextBox1.Text) { ListBox1.SelectedIndex = i; } } } </code></pre> <p>Thank you!</p>
c# asp.net
[0, 9]
1,228,215
1,228,216
getting data out of a function
<p>Im sort of new to this, but I was wondering how I can grab the data (ie:shapeID) from this function and pass it on to other functions making it a global variable.</p> <pre><code>$('.shapes li').click(function(shapeId){ var shapeId = $(this).find('a').attr('id'); var shapeImg = $(this).find('img'); step2.find('div.wrapper').attr('id', shapeId); shapeImg.clone().appendTo('#step2 .model', '#results .model'); step1.fadeOut('500',shownext); step2.find('.waist_box').show(); step2.find('.hotspots #waist').addClass('active'); }); </code></pre> <p>thanks</p>
javascript jquery
[3, 5]
3,580,045
3,580,046
Embedded JavaScript doesn't work
<p>I have embedded JavaScript in ASP.NET application:</p> <pre><code>function HelloFromEmbedded() { window.alert('Hello from embedded resource.'); } </code></pre> <p>In AssemblyInfo.cs file:</p> <pre><code>[assembly: WebResource("JavaScript1.Scripts.EmbeddedJavaScript.js", "text/javascript", PerformSubstitution = true)] </code></pre> <p>This is my ASP.NET web page:</p> <pre><code>protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); ClientScript.RegisterClientScriptInclude("EmbeddedJS", ClientScript.GetWebResourceUrl(this.GetType(), "JavaScript1.Scripts.EmbeddedJavaScript.js")); } </code></pre> <p>I'd like to use embedded JavaScript in onmouseover event of text box in ASP.NET web page:</p> <pre><code>&lt;asp:TextBox ID="TextBox1" runat="server" onmouseover="HelloFromEmbedded();"&gt;&lt;/asp:TextBox&gt; </code></pre> <p>But, it doesn't work. I can't see why.</p>
javascript asp.net
[3, 9]
5,177,943
5,177,944
How to insert additional text using jquery or javascript
<p>I want to know is it possible to insert additional text in HTML elements using jquery or javascript?</p> <p>If there is already a text "Down" in paragraph elements, then I just want to append text "full", so that it would be "Down full". Is this possible? Which method should I use? </p>
javascript jquery
[3, 5]
4,712,651
4,712,652
document.getElementById works, but $ is throwing an error
<p>I have this code here : </p> <pre><code>&lt;select id="test"&gt; &lt;option value="1"&gt;test1&lt;/option&gt; &lt;option value="2" selected="selected"&gt;test2&lt;/option&gt; &lt;option value="3"&gt;test3&lt;/option&gt; &lt;/select&gt; </code></pre> <p>In my script I have these two line of code, one is JavaScript and another one is jquery like so :</p> <pre><code>var e = document.getElementById("user"); var e1 = $("#user"); </code></pre> <p>I even printed out those in my console like this : </p> <pre><code> console.log(e) console.log(e1) </code></pre> <p>They are printing same thing. But when I write a <code>on</code> change event code like this : </p> <pre><code>$("#user").change(function() { console.log(e.options[e.selectedIndex].text) }); </code></pre> <p>It is exactly printing what I choose from drop down. That this javascript way of fetching from dom is working. The same thing with <code>e1</code> like so :</p> <pre><code>$("#user").change(function() { console.log(e1.options[e1.selectedIndex].text) }); </code></pre> <p>is throwing an error : </p> <p><code>Uncaught TypeError: Cannot read property 'undefined' of undefined (anonymous function)create:167 f.event.dispatchjquery-1.7.1.min.js:3 f.event.add.i.h.handle.i</code> </p> <p>(seen from chrome's developer tools)</p> <p>Whats going on? I'm new to both Javascript and jquery! Why in my case jquery is not working?</p>
javascript jquery
[3, 5]
1,972,571
1,972,572
Cancel an OnTouchListener on elapsed time
<pre><code> image.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View arg0, MotionEvent arg1) { String serverResponse = ""; JSONObject responseToJSON = null; try { //if we have Internet connection if(NetworkRequest.hasNetworkConnection(MyActivity.this)){ //download the server response serverResponse = NetworkRequest.getUrlData(array.get(i)); responseToJSON = new JSONObject(serverResponse); String individualDescription = responseToJSON.getString("Description"); } } catch (Exception e) { e.printStackTrace(); } return false; } }); </code></pre> <p>I have the aforementioned code. Where I set an OnClickListener on an image. So, when I will click on the image i override the onTouch method. Then I check if I have internet connection. If I have I try to download a content from the internet. That I want to do is to have something as a Timer and check if the following line of code</p> <pre><code>NetworkRequest.getUrlData(array.get(i)) </code></pre> <p>needs more than 2 seconds to download the content. If needs more that 2 seconds to download the content, I want to cancel both downloading and the OnTouchListener. Is this possible? Any ideas?</p>
java android
[1, 4]
3,852,081
3,852,082
regular expression for string that starts with 'http://'
<p>Hi guys just like in the title - I need regular expression that will match anything that starts with 'http://'</p>
php javascript
[2, 3]
4,591,552
4,591,553
Wrap a nodeValue
<p>I try to wrap a text in this code</p> <pre><code>&lt;div class="div"&gt; &lt;span&gt;&lt;/span&gt; &lt;a&gt;&lt;/a&gt; *text I want to wrap* &lt;span&gt;&lt;/span&gt; &lt;/div&gt; </code></pre> <p>I know what the text is, but I can't know what is his position in the div</p> <pre><code>$(".div:contains('*text*')") </code></pre> <p>I get the right div like that, but I can't figure out how to wrap my text</p>
javascript jquery
[3, 5]
2,367,840
2,367,841
How to run new window.open and auto add Ctrl key?
<p>In ff &amp; chrome Ctrl + click the url, it will open a new tab and the screen keep on the old url. When I try to use javascript window.open it will open a new tab too, but the screen will change to the new tab. How to use window.open open new tab and keep the screen in the old url ??</p> <p>Or,.. can I use jquery auto add ctrl when I click url ??</p> <p><strong>jquery</strong></p> <pre><code>$(".link").mousedown(function(e) { if (e.which === 1) { window.open($(this).attr('href')); } }); </code></pre>
javascript jquery
[3, 5]
2,797,826
2,797,827
How to remove the decimal part from a float number that contains .0 in java
<p>I just want to remove the fractional part of a float number that contains <strong>.0</strong>. All other numbers are acceptable.. For example : </p> <pre><code> I/P: 1.0, 2.2, 88.0, 3.56666, 4.1, 45.00 , 99.560 O/P: 1 , 2.2, 88, 3.567, 4.1, 45 , 99.560 </code></pre> <p>Is there any method available to do that <strong>other than</strong> "<em>comparing number with ".0" and taking substring</em>" ?</p> <p>EDIT : I don't want ACTING FLOAT NUMBERs (like 1.0, 2.0 is nothing but 1 2 right?)</p> <p>I feel my question is a little confusing...<br> Here is my clarification: I just want to display a series of floating point numbers to the user. If the fractional part of a number is zero, then display only the integer part, otherwise display the number as it is. I hope it's clear now..</p>
java android
[1, 4]
290,154
290,155
JQUERY: How do I know if this element is currently open/closed (slidetoggle)
<p>Im using the following to open/close a div</p> <pre><code>$(".alerts").click(function(){ $(this).toggleClass("active").next().slideToggle(50); </code></pre> <p>But I want a certain function to trigger only if the box was closed and is being opened, how can I determine this? I prefer not to use cookies or anything like that</p> <p>thanks!</p>
php jquery
[2, 5]
4,024,134
4,024,135
The type or namespace name 'Exchange' does not exist in the namespace
<p>When I run my ASP.net app I get this error:</p> <pre><code>Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. </code></pre> <p>Compiler Error Message: CS0234: The type or namespace name 'Exchange' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)</p> <p>Source Error:</p> <pre><code> Line 06: using System.Web.UI.WebControls; Line 07: using System.Data.OleDb; Line 08: using Microsoft.Exchange.WebServices.Data; // error Line 09: using System.Net; Line 10: using System.Data.SqlClient; </code></pre>
c# asp.net
[0, 9]
2,997,761
2,997,762
Mac Programming to Android Programming
<p>I would like to get started programming Android apps. I don't know Java, however I do know Objective-C and the Cocoa API. What would be the best resource to learn Android programming if you don't know Java, given my experience?</p>
java android
[1, 4]
3,780,877
3,780,878
When does an input field value equals '', null or undefined
<p>In which cases do an input field value equals <code>''</code>, <code>null</code> or <code>undefined</code>.</p> <p>I'm trying to check empty fields</p> <pre><code>if($('#cur').val() == 'undefined' || $('#cur').val() == '' || $('#cur').val() == 'null'){ alert('Blank'); } </code></pre>
javascript jquery
[3, 5]
2,532,183
2,532,184
Using .text() to select a class but having issues with spaces within the html
<pre><code>$('li.' + $(this).text()).toggle(true); </code></pre> <p>This code is used to take from a subnav below.</p> <pre><code>&lt;div class="subNav"&gt; &lt;ul&gt; &lt;li class="button"&gt;sun protective clothing&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>These are products that will be visible.</p> <pre><code>&lt;div class="sun-protective-clothing"&gt;&lt;/div&gt; </code></pre>
javascript jquery
[3, 5]
1,449,422
1,449,423
How big is the Android market compared to the iPhone appstore?
<p>I'm new to app programming. I know the basics but now I want to focus on one market. Which one is usually more profitable?</p>
iphone android
[8, 4]
5,906,777
5,906,778
Remove element by class using parent()
<p>I am making changes to a jQuery validator, when there is an error it inserts a div to the parent element. I am trying to remove an the inserted div with by the specific class name from the parent. </p> <pre><code>$(element).parent().remove('.removeThis'); </code></pre> <p>I thought the above code would work but it does not remove the the div.</p>
javascript jquery
[3, 5]
1,918,158
1,918,159
Load new image when a user clicks on a link
<p>I'm trying to figure out how to load a new image with ajax when a link is clicked on.</p> <p>The link looks like this (there are several links like this on the page they have little image thumbnails inside them so user can know approximately what image will load when he/she clicks on the link):</p> <pre><code>&lt;div class="box-content2"&gt; &lt;a href="/path/to/image/2.jpg" id="2"&gt; &lt;img src="/path/to/image/thumbnail/2.jpg" title="Image Title 2" /&gt; &lt;/a&gt; &lt;a href="/path/to/image/3.jpg" id="3"&gt; &lt;img src="/path/to/image/thumbnail/3.jpg" title="Image Title 3" /&gt; &lt;/a&gt; &lt;/div&gt; </code></pre> <p>Href attribute contains relative path to the image and the id is the image name (also it's id in the database if it's relevant).</p> <p>And on the same page I have this markup:</p> <pre><code>&lt;div id="media-photo"&gt; &lt;img src="/path/to/image/1.jpg" alt="Image Title 1" /&gt; &lt;/div&gt; </code></pre> <p>I would like the image in #media-photo div to change without the page being reloaded.</p> <p>This is what I have so far:</p> <pre><code>$(document).ready(function() { $('.box-content2 a').click(function() { var path = $(this).attr('href'); $('#media-photo img').html('&lt;img src="' + path + '" /&gt;'); }); }); </code></pre> <p>Not sure if what I'm doing is possible, maybe I need ajax?</p>
javascript jquery
[3, 5]
5,059,447
5,059,448
How to Know Page Location Where the Page is moving when user clicks browser back button
<p>Can Any one tell me that How to Know Page Location Where the Page is moving when user clicks browser back button....</p>
javascript jquery
[3, 5]
4,171,591
4,171,592
How to unbind all events inside a particular div
<p>I have a parent div , say with id="to-remove"</p> <p>This div has multiple children divs and each children div also can have in-turn multiple divs and each of them can have href and/or onclick events.</p> <p>Is there way to remove all these events from inside this parent div using jquery..?</p>
javascript jquery
[3, 5]
4,453,506
4,453,507
Cookie not being set in IE
<p>I am setting a cookie in js and then checking in php whether it exists or not to determine whether the user has js enabled.</p> <p>The non-js and js users are then served a different version of certain pages. This is working fine in ff, but not in IE? in IE we are seeing the version of the page as if no js is enabled, but it is.</p> <p><a href="http://edinburghfloorsanding.com/gallery/" rel="nofollow">http://edinburghfloorsanding.com/gallery/</a></p> <p>Any help gratefully received.</p>
php javascript
[2, 3]
1,349,645
1,349,646
hover over image unwraps a hidden div
<p>I have seen these on many sites. Basically, I'm creating a portfolio and I have a number of divs (squares in grid format) showing screenshots of my projects. I want to be able to hover over each project with my mouse which will in turn slide in a previously hidden div revealing specific information about that particular project.</p> <p>Basically, I am looking for something simple like this: <a href="http://iamyuna.com/" rel="nofollow">http://iamyuna.com/</a></p> <p>Notice if you hover over each shape (i.e. project), it quickly "unwraps" to reveal another image underneath. This may be a bad example since what I want is for the description to show up instead of another picture. However, I love how quickly it unwraps to show the hidden content.</p> <p>Below is how my html is laid out. Would it be possible to implement something similar for my own work? If you guys can help me get started on this or suggest keywords to start with (I've been searching for a tutorial for hours but can't find one), I'd really appreciate it. Thank you.</p> <pre><code>&lt;article class="project" data-id="248"&gt; &lt;div class="project-mask"&gt; &lt;div class="thumbnail"&gt; &lt;img src="image.jpg"&gt; &lt;div class="description"&gt; &lt;h2&gt;Title&lt;/h2&gt; &lt;p&gt;Description&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/article&gt; </code></pre>
javascript jquery
[3, 5]
4,435,143
4,435,144
history.go(-1) function not working for dropdown
<p>i am using the function history.go(-1) function on my button to go back. but i am getting a prob in value selected in dropdown. </p> <p>the sourceview is showing the original value selected but on UI its showing the previous value</p> <p>means when i click on back button,</p> <p>UI shows the same value but when i view the source code then the selected value is the same that need to be appear</p> <p>for example</p> <p>suppose my dropdown has data in format MM/YYYY first i select 02/2010 and then after that i select 04/2010 now when i click on back button having onclick ="history.go(-1)"</p> <p>then the value in dropdown remains the same i.e 04/2010 but when i see the source code, then for dropdown the selected value shows as 02/2010.</p> <p>I cant understand this UI behavior. can any one help me to rectify this</p>
javascript asp.net
[3, 9]
1,992,244
1,992,245
Replace a element instead another element by jQuery
<p>I want replace a(or each) element(number) instead another element(number) in a class while running page.</p> <p>I try as following code but doesn't word true, what do i do?</p> <p><strong>DEMO:</strong> <a href="http://jsfiddle.net/yMnDt/" rel="nofollow">http://jsfiddle.net/yMnDt/</a></p> <pre><code>&lt;div class="myGrid"&gt; 1 &lt;p&gt; 123145 &lt;/div&gt;​ $(".myGrid").clone().find('1').replaceWith( "8" ); </code></pre> <p>​</p>
javascript jquery
[3, 5]
5,793,666
5,793,667
jQuery variable with 0 (zero) value
<p>I have a variable that I past to a function called <code>comment_test</code> that will sometimes be <code>0</code>, but it fails because I guess it reads it as <code>false</code>. I get the error <code>'ReferenceError: Can't find variable: count'</code>.</p> <p>But, I need to know if the variable is indeed <code>0</code> (and not <code>1</code>, <code>2</code>, <code>3</code>, etc). The function works fine with any positive number. How is this achieved or what am I doing wrong? I can't seem to find any info on this.</p> <pre><code>var test = comment_test(0, true); </code></pre>
javascript jquery
[3, 5]
887,012
887,013
How to hard code 7 int positions?
<p>I am using this method to retrieve some images.</p> <p>The only problem is is where </p> <pre><code>aURL = new URL(myRemoteImages[position]); </code></pre> <p>Position is i dont know how to get the position for each image in order to set the tag in my code.</p> <pre><code> i.setTag(mImageURLs[position]); </code></pre> <p>As you see myRemoteimages has 7 strings and thats all. How can i hard code. the int Position to just have 7 positions?</p> <pre><code>public void RetrieveImages() { ImageView i = new ImageView(this); String[] mImageURLs = { urlImage1, urlImage2, urlImage3, urlImage4, urlImage5, urlImage6, urlImage7}; String[] myRemoteImages = { imageUrl, imageUrl2, imageUrl3, imageUrl4, imageUrl5, imageUrl6, imageUrl7}; URL aURL = null; try { aURL = new URL(myRemoteImages[position]); } catch (MalformedURLException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } Log.v("ImageLoader", "Remote images set"); i.setTag(mImageURLs[position]); URI imageUri = null; SharedPreferences myPrefs = getSharedPreferences("imageUri", 0); SharedPreferences.Editor myPrefsEdit = myPrefs.edit(); // Setting the Uri of aURL to imageUri. try { imageUri = aURL.toURI(); myPrefsEdit.putString("uris", imageUri.toString()); myPrefsEdit.commit(); } catch (URISyntaxException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } </code></pre>
java android
[1, 4]
4,421,191
4,421,192
Android GUI gets hanged during registration on berkeke server
<p>I have written a code which involves media transmission between android device and a sip based phone.It works well for audio transmission.Further,I want to register the device on berkeke server but after 8seconds of launching,application gets hanged(device successfully got registered). I am unable to find whether the problem is with GUI or registration process.Earlier,before registration,it works for 90 seconds and then gets hanged.Please help me on this.</p>
java android
[1, 4]
4,751,041
4,751,042
How to render html to image format
<p>I want to render "Hello dalvir" to image format so that hello dalvir shows in red color in image. How i can do it in C#.</p>
c# asp.net
[0, 9]
5,203,794
5,203,795
What does it mean when your javascript is rendered like this?
<p>I was looking at the page source for an ASP.NET page I wrote and noticed that my javascript was being rendered like this:</p> <pre><code>&lt;script type="text/javascript"&gt; // &lt;![CDATA[ document.write('&lt;script src="/_layouts/myProject/js/jquery.min.js?rev=sEo7zNI93reYIUNwemPM%2BQ%3D%3D"&gt;&lt;/' + 'script&gt;'); // ]]&gt; &lt;/script&gt; </code></pre> <p>Does anyone know :</p> <ol> <li>Why there are commented out CDATA tags around my script include? Do these even do anything?</li> <li>Why it's using a <code>document.write</code> inside of the script tag to include... another script tag?</li> </ol>
javascript asp.net
[3, 9]
3,268,382
3,268,383
Access browser close button
<p>I am in state that i need to detect browser close button where i have to show a popup , the problem is when a page is refreshed or you go back same event occurs as it does for close button does any one have idea how to accomplish this.is it possible to get co ordinates of close button of browser ? </p>
javascript jquery
[3, 5]
5,663,702
5,663,703
custom gridview with grouping and export
<p>I am in search for gridview for my asp.net project where i can do grouping of the columns like <a href="http://demos.devexpress.com/ASPxGridViewDemos/GroupingSorting/Grouping.aspx" rel="nofollow">http://demos.devexpress.com/ASPxGridViewDemos/GroupingSorting/Grouping.aspx</a></p> <p>I also want to export the grouping grid into excel and would also really like to remove the grid columns with mouse clicks.. </p> <p>Is there any control which can help me out? I am currently checking jqGrid, it allows grouping but not with the mouse as shown in above link. </p> <p>Do you guys have any other suggestion for my requirement? I am good with js, jquery, custom grid as long as it does the above job.. No need to say, i am looking for free component :)</p>
c# javascript jquery asp.net
[0, 3, 5, 9]
3,504,787
3,504,788
Finding an item in a repeater control?
<p>This one might be simple, but here it is anyway.</p> <p>I have a <code>List&lt;Object&gt;</code> that I bind to a repeater. The repeater binds all of the fields to textboxes <strong><em>except <code>Id</code></em></strong>. In my web page, whenever a user adds a new item, I create a new <code>Object</code> in my list with a unique <code>Id</code> and rebind my repeater.</p> <p>At a certain point in my code, I am trying to read the textbox controls from the repeater and put them into my <code>List&lt;Object&gt;</code>. However, I need access to the <code>Id</code> field to know which List item to insert into. How can I get the specific <code>Id</code> while I'm going through the repeater?</p> <p>I know I can just create a hidden field with the Id in the repeater control and get it that way, but is there a cleaner way to do this?</p> <p>Example: </p> <pre><code>if (DependentRptr.Items.Count &gt; 0) { for (int count = 0; count &lt; DependentRptr.Items.Count; count++) { int did = (form.UserId + (count + 1)); //I'm trying to get the id of this field here. ...get control info... var temp = AddedDependents.ToList().Find(p =&gt; p.Id == did); //here is where I search with the id } } </code></pre>
c# asp.net
[0, 9]
5,419,138
5,419,139
How to Check whether Session is Expired or not in asp.net
<p>i ve specified the session time out in web.config file..when the session is timeout im not getting redirect to login page but i am geting error saying object reference not set to an instance.</p> <p>can any one tell me the solution for this?</p>
c# asp.net
[0, 9]
3,811,340
3,811,341
Open a new link in a pop up is failing with unexpected T_STRING
<p>Is it possible to pop up window from a json line.</p> <p>Example, this link works fine:</p> <pre><code>$json['msg'] = 'Welcome. Please, &lt;a href="http://mylink/?chat_session='.$rows['id'].'"&gt;click here&lt;/a&gt;!'; </code></pre> <p>But when I tried to create a pop up for it, it says errors T string parsing, things like that.</p> <p>For my pop up I tried using:</p> <pre><code>&lt;script language="javascript" type="text/javascript"&gt;&lt;!--function mbetter(url) { newwindow=window.open(url,'name','height=600,width=550'); if (window.focus) {newwindow.focus()} return false;}// --&gt;&lt;/script&gt; </code></pre> <p>and for link</p> <pre><code>$json['msg'] = 'Welcome. Please, &lt;a href="#" onClick="return mbetter('http://mylink/?chat_session='.$rows['id'].'')"&gt;click here&lt;/a&gt;!'; </code></pre> <p>What could be causing this issue?</p>
php javascript
[2, 3]
4,748,919
4,748,920
Retrieving some values in array
<p>Hi I have an array of random question nos (ids). I have one form with a label for the question, a radiobutton list for their answers and a next button &amp; checkbox to review that question. When I click the next button next(random from array) question appears. I want question id(array) those are checked for review. How can I do this? I used code as follows that calculates array (like this:10111) as i gives 1 value for checked &amp; 0 for unchecked rather that this i want array of question ids those are checked :</p> <pre><code>//Code gives array of checked values in terms of 1 &amp; o int g; if (chkmark.Checked == true) { g = 1; } else { g = 0; } int[] chkarray = new int[Convert.ToInt32(Session["Counter"]) - 1]; int[] temp1 = (int[])Session["arrofchk"]; int k, no; if (temp1 == null) no = 0; else no = temp.Length; for (k = 0; k &lt; no; k++) { chkarray[k] = temp1[k]; } chkarray[j] = g; </code></pre>
c# asp.net
[0, 9]
3,463,103
3,463,104
Clear application icon from Recent Activites?
<p>Is there any way I can remove my Application icon from the Recently opened applications that displayed when user presses and hold down the Home button? Once user closes my application I don't want it to be displayed on the recently opened application list.</p>
java android
[1, 4]
4,331,160
4,331,161
jquery, div with table is not visible when I call show();
<pre><code>&lt;div id="abclink"&gt; + click here to view &lt;/div&gt; &lt;div id="abctable" style="display: none;"&gt; some text here, allot of text &lt;/div&gt; </code></pre> <p>So using jquery I try and do:</p> <pre><code>$("#abclink").bind("click", function() { $("#abctable").show(); }); </code></pre> <p>This doesn't work, and I don't know why?</p>
javascript jquery
[3, 5]
1,318,808
1,318,809
Jquery increase/decrease number in input text by up/down arrows keyboard
<p>I have a basic quantity field and would like to allow the user to increase/decrease the number within this input box based on the keyboard up/down.</p> <p>Following on from: EndangeredMassa answer on keyboard code <a href="http://stackoverflow.com/a/375426/560287">http://stackoverflow.com/a/375426/560287</a> how would I add this into a keyup function?</p> <pre><code>var keynum = 0; if(window.event) { keynum = e.keyCode; } // IE (sucks) else if(e.which) { keynum = e.which; } // Netscape/Firefox/Opera if(keynum == 38) { // up //Move selection up } if(keynum == 27) { // down //Move selection down } </code></pre>
javascript jquery
[3, 5]
3,373,826
3,373,827
Getting rid of the onclick when clicked with jQuery
<p>ok so i have some select tags of cities</p> <pre><code> &lt;select onchange="storeCity(this.value, false)" name="search[city]" id="search_city" class="left"&gt; &lt;option value=""&gt;== Select City ==&lt;/option&gt; &lt;optgroup label="Florida"&gt;&lt;option selected="selected" value="ft-myers-sarasota-fl"&gt;Ft. Myers / Sarasota &lt;/option&gt; &lt;option value="jacksonville-fl"&gt;Jacksonville&lt;/option&gt; &lt;option value="miami-fl"&gt;Miami / Ft. Lauderdale &lt;/option&gt; &lt;option value="orlando-fl"&gt;Orlando&lt;/option&gt; &lt;option value="tampa-fl"&gt;Tampa&lt;/option&gt;&lt;/optgroup&gt;&lt;/select&gt; </code></pre> <p>Some cities are not available now so i needed a lightbox to popup when they are clicked...which i have working with this code</p> <pre><code> $('#search_city').change(function(e) { e.preventDefault(); if ($(this).val() == 'jacksonville-fl' || $(this).val() == 'miami-fl' || $(this).val() == 'tampa-fl' || $(this).val() == 'ft-myers-sarasota-fl') { </code></pre> <p>}</p> <p>The problem I have is that it goes to the link anyways and i need it to get rid of the link or the onchange on the select...something is getting the page to refresh...but i dont know what</p>
javascript jquery
[3, 5]
5,882,970
5,882,971
Jquery getting information from php
<p>I need to get information from a php file and put the information in jquery and i also need to know if the information has changed</p>
php jquery
[2, 5]
2,238,369
2,238,370
Enclosing external jQuery file in $(document).ready()
<p>I have external JavaScript files that contain only jQuery. Should I enclose all of the code in each of these external files in $<code>(document).ready()</code>? What is the best practice here?</p> <p>Thanks!</p>
javascript jquery
[3, 5]
1,914,795
1,914,796
detect scroll up and down using javascript
<pre><code>&lt;script type="text/javascript"&gt; function scrollFunc(e) { userScroll=true; if ( typeof scrollFunc.x == 'undefined' ) { scrollFunc.x=window.pageXOffset; scrollFunc.y=window.pageYOffset; } var diffX=scrollFunc.x-window.pageXOffset; var diffY=scrollFunc.y-window.pageYOffset; if(userScroll) { if( diffY&lt;0 ) { $(".myCar").animate({"top": "+=50px"},1000);// Scroll down alert('down'); //$(".myCar").stop(); } else if( diffY&gt;0 ) { $(".myCar").animate({"top": "-=50px"},1000); alert('Up');// Scroll up } else { // First scroll event } userScroll=false; } else { } scrollFunc.x=window.pageXOffset; scrollFunc.y=window.pageYOffset; } window.onscroll=scrollFunc &lt;/script&gt; </code></pre> <p>I'm trying to detect, scrolling up and down, but, it showing alert msg for both, i mean, if i'm scrolling down or up, it is showing both alert msg. Need Help.!!</p>
javascript jquery
[3, 5]
1,788,303
1,788,304
Using jQuery to remove a second form element without losing the child elements
<p>I have some AJAX work that brings across an additional form element that I don't need in the DOM. I don't have the ability to remove it server side, so I'm looking for some jQuery or classic JavaScript that will allow me to capture all the child elements of the form, remove the form I don't need and finally re-append the child elements back to the DOM.</p> <p>Any help would be much appreciated</p> <p>EDIT: Thanks for the quick answers, the below is what I actually used and it works perfect</p> <pre><code> // Captures the children var children = $("form:eq(1)").children(); // Removes the form $("form:eq(1)").remove(); // append the child elements back into the DOM $("#fillDiv").append(children); </code></pre>
javascript jquery
[3, 5]
3,739,292
3,739,293
checkbox check all option
<p>I have checkbox set with Category Subcategorywise... </p> <pre><code>Company Microsoft Apple Country USA UK </code></pre> <p>and checkbox attached to each item. So if I click on checkbox next to Company, then it should automatically mark checkboxes next to Microsoft and Apple checked, like wise if I select Country, it should check the options USA and UK. and there should also be a select all option, which should select all of them.</p> <p>Is it possible to add checkbox check property using javascript or jquery ?</p> <pre><code>&lt;input type="checkbox" class="entityCheckboxHeader1" id="entityCheckboxHeader" name="Company"&gt;Company &lt;input id="modalEntity" class="entity1" type="checkbox" name="CompanySub"&gt;Microsoft &lt;input id="modalEntity" class="entity2" type="checkbox" name="CompanySub"&gt;Apple &lt;input type="checkbox" class="entityCheckboxHeader2" id="entityCheckboxHeader" name="Country"&gt;Country &lt;input id="modalEntity" class="entity3" type="checkbox" name="CountrySub"&gt;USA &lt;input id="modalEntity" class="entity4" type="checkbox" name="CountrySub"&gt;UK </code></pre>
javascript jquery
[3, 5]
854,547
854,548
disable text selection while pressing 'shift'
<p>I'm implementing item selection functionality in javascript (using jQuery). <i>item</i> is a li that contains some html.<br /> the user can click on one item (makes it selected) and then shift-click on another item to select all the items in between. this basically works OK, however the shift-click also selects (higtlights) the text that appears inside the items (the basic browser functionality for shift clicks). is there any way to disable this?</p>
javascript jquery
[3, 5]
3,632,733
3,632,734
When is a cookie available?
<p>Hi i have a web application where i plant a cookie on my page. Then the user goes to another page, and from that page calls my page from a script, like this: </p> <pre><code>&lt;script type="text/javascript" src="http://domain.com/page.aspx?id=6" &gt;&lt;/script&gt; </code></pre> <p>But i cant access the cookie when it calls my page, why not? and how to work around it?</p> <p>Please note that this question is in relation to: <a href="http://stackoverflow.com/questions/2660427/javascript-and-webshop-tracking-affiliate-across-websites-how-to-do">http://stackoverflow.com/questions/2660427/javascript-and-webshop-tracking-affiliate-across-websites-how-to-do</a></p> <p><strong>Edit</strong> The "other" page is on a entirely different domain. My code is in ASP.NET, but as far as i know its the same for all languages: </p> <p>Planting the cookie (Default.aspx):</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { Response.Cookies["affiliate"].Value = "InnovationPartner"; Response.Cookies["affiliate"].Expires = DateTime.Now.AddDays(7); ... } </code></pre> <p>Retrieving the cookie (after round-trip) (Collect.aspx):</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { bool affiliate = Request.Cookies["affiliate"] != null ? true : false; ... } </code></pre>
php asp.net javascript
[2, 9, 3]
1,136,024
1,136,025
Visual Studio 2010 - Debug Breakpoint
<p>Ive just created a new web site project , added a few lines of code in my .cs file set a break point, and nada, website works, but debug point is not hit. Any ideas?</p> <p>Im starting the project with Debugging, running on windows 7 64bit</p> <p>thanks</p>
c# asp.net
[0, 9]
4,211,289
4,211,290
loading default values of combobox?
<p>i am trying to develop a website in php and i am dynamically loading a page in using its id with the help of js and that loaded page has a combo box and i want as the page load in the first option of combo box should be displayed in text box on same page. i tried onload option but it is not working as page is not dynamically loading instead its output is loading by js in <code>&lt;div&gt;</code>.</p>
php javascript
[2, 3]
5,790,742
5,790,743
Jquery Initializing
<p>I am trying to load a Jplayer to my website, and the instructions say to use</p> <pre><code>$('body').ttwVideoPlayer(myPlaylist, {options}); </code></pre> <p>to initialize the plugin. Where do i place this code?</p> <p>I have the player loading and all that script works, it just wont play the the files in the playlist function. </p> <p>Thanks</p>
java jquery
[1, 5]
799,064
799,065
Loop through all checkboxes that are inside a div tag
<p>I need to loop through all checkboxes that are inside a div tag with id #abc123</p> <p>How can I do this?</p> <pre><code>$("#abc123").foreach( ???? ) </code></pre> <p><b>Update</b> my html row looks like:</p> <pre><code>&lt;tr&gt; &lt;td&gt;&lt;input .../&gt; &lt;/td&gt; &lt;td&gt;234&lt;/td&gt; &lt;/tr&gt; </code></pre> <p>I need to add the value of the <code>&lt;td&gt;</code> into the ID of the checkbox.</p> <p>Would I just get the parent, then ancestor it somehow?</p>
javascript jquery
[3, 5]
1,601,021
1,601,022
How to apply jQuery function .one() to element through attribute 'onclick'
<p>I want to clear an input field when it's clicked, but only the first time you click. With jQuery, you can achieve it like this: putting the following snippet anywhere in the document (assuming the element with id=<code>inputf</code> has already been loaded):</p> <pre><code>$('#inputf').one("click", function() { $(this).val(""); }); </code></pre> <p>As you can see in the above snippet, the input field must have <code>id</code> attribute with value <code>inputf</code>.<br> But is there a way to move that snippet to the <code>onclick</code> attribute of the input field, like</p> <pre><code>&lt;input type="text" onclick="$(this)....val('')" /&gt; </code></pre> <p>? It looks like I can't use the function <code>.one()</code>, because that function needs a string containing one or more JavaScript event types. But I just want <code>.one()</code> to be executed each time it is called, without specifying one or more event types.</p>
javascript jquery
[3, 5]
1,141,678
1,141,679
Calling Code Behind Method From Jquery
<p>I am using <code>Asp.net/C#</code> in my project , i have a requirement where in the user enters a name and the details of that person is displayed <code>asp.net gridview</code> ,,,, i am planning to use <code>html button</code> instead of <code>asp.net button</code> because the results displayed will be in tab...However the function which will populate the <code>gridview</code> is in <code>code behind</code> ,, so my question is how will i call that method from <code>jquery</code>,,, is that possible.Or is there any better way of doing this...... Thanks in advance</p>
c# jquery asp.net
[0, 5, 9]
2,763,157
2,763,158
How work the jquery oriented object?
<p>I don't understand how work an object with Jquery/javascript.</p> <p>And how create a private method/variable with? i see on the forum a closure but i have try and not work. And how see if the method/variable is private? because when I run the website, I see always the function and variable with the own value into my script...</p> <p>Thanks for your help :).</p> <p>By e.x:</p> <pre><code>var ClassName=function() { validation : 0, name : 0, privateVar: 0, init : function () { validation = 1; name ="toto"; } privatefunction :function() { alert("a private function"); } }; </code></pre>
javascript jquery
[3, 5]
3,256,609
3,256,610
How to print this javascript object?
<p>I have the following object data:</p> <pre><code>var js_images = { "newborn_set01_01.jpg":{"filename":"newborn_set01_01.jpg","title":"First Pic","description":"First description..."}, "newborn_set01_02.jpg":{"filename":"newborn_set01_02.jpg","title":"Second Pic","description":"Second description"}, "newborn_set01_03.jpg":{"filename":"newborn_set01_03.jpg","title":"Third Pic","description":"Third description"} }; </code></pre> <p>How would I do something as simple as creating an alert to show the description of <code>newborn_set01_03.jpg</code>?</p> <p>This obviously doesnt work:</p> <pre><code>alert(js_images.newborn_set01_03.jpg.description); </code></pre>
javascript jquery
[3, 5]
1,274,377
1,274,378
Alert window if there is no keydown for number of seconds?
<p>I need to know if there are no keydowns or clicks for 10 seconds and if so display an alert window, I can use jquery if it's more efficient than simple js.</p> <p>How can I do it? Thanks</p>
javascript jquery
[3, 5]
4,478,752
4,478,753
Running .vbs script file in asp.net using process class
<p>I need to run a vbscript file in my asp.net application. This vbscript file generate a pdf and store it in specified location. I used process class and give the command it is working fine but when i host the application in IIS 7.0 it is not working rather it does not give any error too. I am using admin user.</p> <p>What could be the issue?</p>
c# asp.net
[0, 9]
3,672,927
3,672,928
Adding li element only if it not already there?
<p>I am constructing an <code>&lt;li&gt;</code> element like this:</p> <pre><code>var element = $("&lt;li&gt;&lt;/li&gt;") .html(mHTML) .attr('id', "elemid"); </code></pre> <p>I am trying to add this element to a <code>&lt;ul&gt;</code> element only if it doesn't already exist. Any ideas on how to do this? Am I supposed to use <code>contains()</code> to see if the <code>ul</code> element contain the html and then decide? For instance,</p> <pre><code>&lt;ul id="elemul"&gt; &lt;li id="elemli1"&gt;Element 1&lt;/li&gt; &lt;li id="elemli2"&gt;Element 2&lt;/li&gt; &lt;li id="elemli3"&gt;Element 3&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>If I try adding Element 1, it should not add it. What should I do if its a longer string (not really long but about 150 characters). </p> <p><strong>Note: I cannot rely on IDs to determine the uniqueness.</strong> i.e. I might end up forming something like: <code>&lt;li id="elemli3"&gt;Element 1&lt;/li&gt;</code></p> <p>Do I go about using hashmaps?</p>
javascript jquery
[3, 5]
5,234,723
5,234,724
php or jquery - How can I make a global index for my site?
<p>I've some templates in my webserver which act like a portfolio and I wanted to do something like dribbble.com, loading the index of each template inside a square.</p> <p>What do you recommend for me?</p>
php jquery
[2, 5]
5,598,734
5,598,735
why won't this web request go thru for valid website
<p>Given the following why are the websites <strong>Not</strong> valid? I'm getting the follwoing error message.</p> <pre><code>try { HttpWebRequest webReq = (HttpWebRequest)WebRequest.Create(@"http://wrtire1.tru-m.com/"); //2 websites that do this // http://wrtire1.tru-m.com/ // http://acuraofaugusta.mobi/index.htm webReq.Method = "HEAD"; HttpWebResponse webRes = (HttpWebResponse)webReq.GetResponse(); if (webRes.StatusCode == HttpStatusCode.OK) Label1.Text = true.ToString(); } catch (Exception e) { Label1.Text = "The remote server returned an error: (403) Forbidden. "; // or I got this: The remote server returned an error: (500) Internal Server Error. } </code></pre> <p><strong>I received this error message</strong></p> <blockquote> <p>The remote server returned an error: (500) Internal Server Error.</p> </blockquote>
c# asp.net
[0, 9]
849,139
849,140
How to parse the response array in json in java script?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4935632/how-to-parse-json-in-javascript">How to parse JSON in JavaScript</a> </p> </blockquote> <p>Hi I have to parse the following response using AJAX.I have been trying it but I didnt get.</p> <pre><code>[{"Status":"True"},{"Data":[{"ApplicationNo":"RE09","ApplicationName":"Salim"},{"ApplicationNo":"RE13","ApplicationName":"V Damodaran"}]}] &lt;script type="text/javascript"&gt; $(document).ready(function () { $("#btnlogin").click(function (e) { e.preventDefault(); var txtUsernameID = $("input#useridtxt").val(); var txtPasswordID = $("input#pwdtxt").val(); alert(txtUsernameID+","+txtPasswordID); $.ajax({ type: 'POST', //data: '{"username":"' + $("input#txtusername").val() + '","password":"' + $("input#txtpassword").val() + '"}', url: '', contentType: 'application/json; charset=utf-8', dataType: 'json', success: function (url, textStatus, XMLHttpRequest) { $.each(url.Data, function(index, item) { alert(item.agentid); }); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(textStatus); } }); }); }); &lt;/script&gt; </code></pre>
javascript jquery
[3, 5]
4,106,564
4,106,565
Passing Control Id from Linkbutton in a gridview
<p>How do I pass the Control ID in a gridview that is derived from a stored procedure into a variable. I will use the variable to pass into the database later on to return some results. Thanks.</p>
c# asp.net
[0, 9]
994,974
994,975
Image not displayed in chrome and firefox using "progid:DXImageTransform.Microsoft.AlphaImageLoader"
<p>i am using "progid:DXImageTransform.Microsoft.AlphaImageLoader" to display iamge in div</p> <p>My code is:</p> <pre><code>&lt;body class="style_page" style="margin: 0px; background: white;" onload="onLoad()" onunload="onUnload()" onresize="onResize()"&gt; &lt;div id="mediaPlayer" style="position: absolute; visibility: hidden;"&gt; &lt;/div&gt; &lt;div id="first" style="position: absolute; left: 50%; top: 0px; width: 800px; height: 600px; font-size: 10pt; background: white;"&gt; &lt;div class="placeholder" style="left: 0%; top: 0%; width: 100%; height: 166%;"&gt; &lt;div class="outline" style="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='output6.jpg');"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p></p> <p>It works fine in IE8 but doesn't work in Mozilla and google chrome</p> <p>Plz help</p> <p>Thanks</p>
c# asp.net
[0, 9]
453,968
453,969
Android conversion string
<p>I want to put the string into one of the Integer/Float/Double, but the results into a NumberFormatException.. My string is: 37,78584, how to transform them for the type I want? First thank you for my answer.</p>
java android
[1, 4]
377,770
377,771
jQuery check if browser support position: fixed
<p>How do I check if browser supports <code>position:fixed</code> using jQuery. I assume I have to use <code>$.support</code> I think, but how?</p> <p>Thank you for your time.</p>
javascript jquery
[3, 5]
5,122,490
5,122,491
Jquery help creating ajax link rendering
<p>I want to make an ajaxlink, but it is not working:</p> <p>My html: </p> <pre><code>&lt;td class="apris"&gt;&lt;p&gt;&lt;a class="current desc" href="/?direction=asc&amp;amp;sort=pris"&gt;Pris pr. md.&lt;/a&gt;&lt;/p&gt;&lt;/td&gt; </code></pre> <p>My Jquery:</p> <pre><code>$('.apris').live('change', function() { var form=$(this).closest('form'); $.ajax({ type:'post', url:"\/finder\/" + $(this).val(), data:form.serialize(), success:function(msg){ $('#formcontent').html(msg); } }); }); </code></pre>
javascript jquery
[3, 5]
2,236,125
2,236,126
Will Java catch up with C#?
<p>Today I posted a question asking about which language C# or Java would be better for me to study. I had some great answers. One thing that came up was that perhaps Java is now rather behind C# with new features. I saw some web links and most pointed out what C# had and what java did not have. </p> <p>So my question to you all is will Java catch up with C# again? And if you were to take a guess where would it stand in 5 years time. Would it have all the things that are maybe now missing? How about Java 7?</p>
java c#
[1, 0]
2,215,557
2,215,558
How can I select an element's parent row in a table?
<p>I have the following function:</p> <pre><code>$("#example tbody").click(function(event) { $(oTable.fnSettings().aoData).each(function (){ $(this.nTr).removeClass('row_selected'); }); $(event.target.parentNode).addClass('row_selected'); }); </code></pre> <p>When a user clicks on a td element in a table it adds the row_selected class to the row. However when a user clicks on an input element inside of a td then it adds the row_selected class to the td. </p> <p>Is there a way that I can change event.target.parentNode so that instead of the parent it adds the class to the parent tr? </p>
javascript jquery
[3, 5]
1,525,450
1,525,451
how to get the asp.net drop down list items in javascript
<p>I have one dropdownlist in my c# code behind page like `DropDownList dl = new DropDownList(); dl.Items.Add("Item 2");</p> <pre><code> dl.Items.FindByText("Item 2").Value="2"; dl.Items.Add("Item 3"); dl.Items.FindByText("Item 3").Value="3";` </code></pre> <p>I like to get that drop down list items in client side java script. one important think note that I like to get values of dropdownlist in the c# code behind page and not the asp.net page. Can anyone know the solution for that problem?</p> <p>Thank you...</p>
c# asp.net
[0, 9]
109,629
109,630
java to javascript communcation
<p>i am trying to pass value from javascript to java (applet ), but everytime its coming out to be null .</p> <p>my java class :</p> <pre><code>package com.vaannila.utility; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.net.URLEncoder; import prefuse.util.ui.JPrefuseApplet; public class dynamicTreeApplet extends JPrefuseApplet { private static final long serialVersionUID = 1L; public static int i = 1; public String dieasenameencode; // System.out.println("asjdjkhcd"+dieasenameencode); public void init() { System.out.println("asjdjkhcd"+dieasenameencode); System.out.println("the value of i is " + i); URL url = null; // String ashu=this.getParameter("dieasenmae"); // System.out.println("the value of the dieases is "+ashu); //Here dieasesname is important to make the page refresh happen //String dencode = dieasenameencode.trim(); try { //String dieasename = URLEncoder.encode(dencode, "UTF-8"); // i want this piece of the code to be called url = new URL("http://localhost:8080/docRuleToolProtocol/appletRefreshAction.do?dieasename="+dieasenameencode); URLConnection con = url.openConnection(); con.setDoOutput(true); con.setDoInput(true); con.setUseCaches(false); InputStream ois = con.getInputStream(); this.setContentPane(dynamicView.demo(ois, "name")); ois.close(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (FileNotFoundException f) { f.printStackTrace(); } catch (IOException io) { io.printStackTrace(); } ++i; } } </code></pre> <p>my javascript :</p> <pre><code>function showSelected(value){ alert("the value given from"+value); var diseasename=value; alert(diseasename); document.decisiontree.dieasenameencode="diseasename"; } </code></pre>
java javascript
[1, 3]
3,947,375
3,947,376
How can i create multitasking between activities?
<p>I want to display two activities at a time and can work on both simultaneously. Is it possible ? if possible please give me some example. I am working in android 2.2 froyo.</p> <p>Thanks in advance</p>
java android
[1, 4]
5,217,772
5,217,773
Allow one element to inherit all events of another
<p>For example say i have 2 links, A and B. If a user hovers over A, the hover event of B will get triggered. Likewise with all other events like onlick, mouseover etc.</p> <p>I'm not looking for adding the events manually like this: </p> <pre><code>$('a#A').click(function(){ $('a#B').trigger('click'); }); </code></pre> <p>Thanks!</p>
javascript jquery
[3, 5]
2,722,348
2,722,349
Add to array or object with INDEX
<p>how can i generate array or object with own index?</p> <p>in php i can:</p> <pre><code>$array = array(); foreach($users as $user){ $array[$user] = $user; } </code></pre> <p>and in jQuery?</p> <pre><code>var arr = new Array(); $('input').each(function(){ arr[$(this).val()] = $(this).val(); }) </code></pre> <p>i would like use JS Object for this, but how?</p>
php javascript jquery
[2, 3, 5]
5,984,284
5,984,285
How to get an object by anchor text?
<p>I have a list of links:</p> <pre><code>&lt;a href="/111"&gt;AAAAA&lt;/a&gt; &lt;a href="/222"&gt;BBBBB&lt;/a&gt; &lt;a href="/333"&gt;CCCCC&lt;/a&gt; </code></pre> <p>I would like to get object <code>$('a')</code> with the contents <code>BBBBB</code>, and in the next step I am going to do:</p> <pre><code>$(this).addClass('current'); </code></pre> <p>How can I select the element with the <code>BBBBB</code> content?</p>
javascript jquery
[3, 5]
488,232
488,233
jquery animate, set interval and inactive window issue
<p>So I have this weird issue that i am hitting, i have a slide show in which set interval fires up jquery animate method. all works great.</p> <p>Until i switch tabs. If i switch back to tab with slideshow in some time, all of the sudden animation is fired repeatedly, with out any inteval in place. Like it is playing catch up.</p> <p>I kind of figured that it has something to do with RequestAnimationFrame and jQuery's animate method. And how animation rendering is suppressed while tab is inactive. While interval is kept on firing up every so often, even when window is inactive.</p> <p>Could any one elaborate more on this, would much appreciate it. </p> <p>Here is the core code that does that:</p> <pre><code>function animate(setCurrent){ animationDistance = opt.cSlideWidth * (opt.cCurrentSlide - 1); carousel.animate({left: '-' + animationDistance}, opt.cTransitionSpeed}); } opt.cSetUpIntervalMethod = function(action){ if (action === 'start') { clearInterval(opt.cSlideTimer); opt.cSlideTimer = setInterval(function(){animate();},opt.cSlideDelay); } } opt.cSetUpIntervalMethod('start'); </code></pre>
javascript jquery
[3, 5]
962,145
962,146
simple fade out image on link click
<pre><code> &lt;script&gt; $("a").click(function () { $("#wrapper").fadeOut("slow"); }); &lt;/script&gt; &lt;div id="wrapper" &gt; &lt;a href="1.html"&gt; &lt;img src="images/landing.png"/&gt;&lt;/a&gt; &lt;/div&gt; </code></pre> <p>I have checked the jquery documentation but it has not solved the problem, have tried to substitute different selectors </p>
javascript jquery
[3, 5]
1,188,810
1,188,811
receiving string from c# to Java mistakes
<p>I want to send String from C# to Jave I do it in C# in 2 side like this</p> <p>Sender: C#</p> <pre><code>NetworkStream ns1 = _client2.GetStream(); byte[] b = { (byte)2 };//this is the command that sent from client to Server ns1.Write(b, 0, 1); string data = "222222222"; byte[] b2 = _AC.GetBytes(data); ns1.Write(b2, 0, b2.Length); </code></pre> <p>Reciever C#</p> <pre><code> Byte[] b = new byte[10]; ns.Read(b, 0, b.Length); string Data = _AE.GetString(b); while (ns.DataAvailable) { b = new byte[10]; ns.Read(b, 0, b.Length); Data += _AE.GetString(b); } </code></pre> <p>I do some coding with no luck in Java .... like this..</p> <pre><code>byte b = is.readByte(); byte[] buff= new byte[8]; is.read(buff,0,10); </code></pre> <p>I receive inside buff[50,50,50,50,50,50,50,50,50]; .....then how to change it to string in java ..... Any help would be great ....thanks</p>
c# java
[0, 1]
5,714,837
5,714,838
Converting iPhone app to Android app or vice versa
<p>Is there any tool that can convert an iPhone app to an Android app or vice versa?</p>
android iphone
[4, 8]
4,872,166
4,872,167
Automatically change JavaScript function value
<p>Here is my problem.. I have some JavaScript that I want to run, however I need it to be unique each time it gets inserted. I tried adding a variable to it that would change it, however it only changes it on the first call/display. Here is the script:</p> <pre><code> &lt;script type=\"text/javascript\"&gt; function validate_f( ) { var x=document.forms[\"fill\"][\"textfield\"].value if (x==null || x==\"\") { alert(\"Field cannot be empty\"); return false; } } &lt;/script&gt; </code></pre> <p>The actual form code is:</p> <pre><code> echo "&lt;td width=\"10%\"&gt; &lt;form method=\"POST\"action=\"$actual_link\" id=\"fill\" onsubmit=\"return validate_f( );\"&gt; &lt;input type=\"hidden\" value=\"{$data['id']}\" name=\"id\"&gt; &lt;input type=\"text\" size=\"20\" class=\"BUTTON_INPUT\" name=\"url\" value=\"\" id=\"textfield\"&gt; &lt;/td&gt; &lt;td width=\"1%\"&gt; &lt;input type=\"Submit\" class=\"BUTTON_FILL\" name=\"fill\" value=\"\"&gt; &lt;/form&gt; </code></pre> <p>The problem is that form gets echoed multiple times with different links, but the script will only work the first time. So my only solution I could think of was to have the JavaScript echoed along with the form and have the function name changed on both the script &amp; the form.</p> <p>I hope what I'm trying to do makes sense, so basically I need "function validate_f( )" &amp; "onsubmit=\"return validate_f( );\"" to change with each repeat/echo ..</p>
php javascript
[2, 3]
4,760,785
4,760,786
jQuery on submit issue
<p>For some reason my submit event is not working, however, if i change it to click on the form, it works, this is my code:</p> <p><strong>JQUERY:</strong></p> <pre><code> &lt;script&gt; (function(){ $('form').on('click',function(){ $.post("../includes/register.php", $('form').serialize(), function(data){ $('body').append(data); }); }); })(); &lt;/script&gt; </code></pre> <p><strong>REGISTER.PHP:</strong></p> <pre><code>&lt;?php if(isset($_POST['username'])){ echo $_POST['username']; } ?&gt; </code></pre> <p>This works perfectly fine, it appends the username whenever I click on a form text input, however, when I try to use the submit method, it doesnt output anything:</p> <pre><code>&lt;script&gt; (function(){ $('form').submit(function(){ $.post("../includes/register.php", $('form').serialize(), function(data){ $('body').append(data); }); }); })(); &lt;/script&gt; </code></pre> <p>As a matter of fact, it doesn't even work when I use button.on('click')</p>
php jquery
[2, 5]
5,941,625
5,941,626
Hosting an executable within Android application
<p>I am working on an Android application that depends on an ELF binary: our Java code interacts with this binary to get things done. This runtime needs to be started and terminated on Application startup and application exit / on demand. </p> <p><strong>Questions:</strong> </p> <ol> <li><p>I am assuming that we will be able to execute this binary using the Runtime.exec() API. Is there any constraints as to where I need to be putting my library in the folder structure? How would the system runtime locate this executable? Is there some sort of class path setting? </p></li> <li><p>Since the application has dependencies on this Runtime, I was thinking of wrapping it around a service so that it can be started or stopped as required. What is the best way to handle such executables in Android project?</p></li> <li><p>What are other alternatives, assuming that I do not have source code for this executable?</p></li> </ol> <p>Please advice.</p> <p>Thanks.</p>
java android
[1, 4]
5,481,286
5,481,287
How can I use/reference the selected value (TextBox) from a JavaScript Function into C# Code behind?
<h1>aspx.cs:</h1> <pre><code>&lt;script type="text/javascript"&gt; $(function () { //ALPHA $('#COLOR_ALPHA_TEXTBOX1').colorPicker({ pickerDefault: "E1E1E1", colors: ["E1E1E1", "33CC00", "FFF000", "CC0000", "996600", "FF9900", "303030", "0066FF", "F9A7B0", "9A0EEA"], transparency: true }); $('#COLOR_ALPHA_TEXTBOX2').colorPicker({ pickerDefault: "E1E1E1", colors: ["E1E1E1", "33CC00", "FFF000", "CC0000", "996600", "FF9900", "303030", "0066FF", "F9A7B0", "9A0EEA"], transparency: true }); }); &lt;/script&gt; &lt;asp:Table ID="Table" runat="server" style="border: medium solid #000000"&gt; &lt;asp:TableRow&gt; &lt;asp:TableCell ID="TC2BC" HorizontalAlign="left" VerticalAlign="top"&gt; &lt;asp:TextBox ID="COLOR_ALPHA_TEXTBOX1" type="text" runat="server" Visible="False"&gt;&lt;/asp:TextBox&gt; &lt;/asp:TableCell&gt; &lt;/asp:TableRow&gt; &lt;asp:TableRow&gt; &lt;asp:TableCell ID="TC9BC" HorizontalAlign="left" VerticalAlign="top" &gt; &lt;asp:TextBox ID="COLOR_ALPHA_TEXTBOX2" type="text" runat="server" Visible="False"&gt;&lt;/asp:TextBox&gt; &lt;/asp:TableCell&gt; &lt;/asp:TableRow&gt; &lt;/asp:Table&gt; </code></pre> <p>I tried to use on the code behind cs:</p> <pre><code>COLOR_ALPHA_TEXTBOX1.SelectedValue </code></pre> <p>But, I don't get that option in C#; What could be an alternative? Thanks so much for the help!</p>
c# javascript asp.net
[0, 3, 9]
1,566,803
1,566,804
appending info to a text file
<p>I have a web site with which I am adding records to a database and The info I am also writing to a log file which is part of the website. The info is written to the file fine...the only question I do have is how to add information with each input into the database. As it is at the moment the information is put int the lof file but with each new insert into the database the existing record in the log file seems to be overwritten and replaced with a new insert so that there is always only one record added to the log file. Advice perhaps... this is the code I used in the btnClick event.</p> <pre><code>protected void btnSubmitRating_Click1(object sender, EventArgs e) { int rating = 0; try { if (radRating.Items[0].Selected) { rating = 1; } if (radRating.Items[1].Selected) { rating = 2; } else if (radRating.Items[2].Selected) { rating = 3; } else if (radRating.Items[3].Selected) { rating = 4; } else if (radRating.Items[4].Selected) { rating = 5; } FileStream rate = new FileStream(Server.MapPath("~/rateBooks.log"), FileMode.Open, FileAccess.ReadWrite); BufferedStream bs = new BufferedStream(rate); rate.Close(); StreamWriter sw = new StreamWriter(Server.MapPath("~/rateBooks.log")); sw.WriteLine("userName " + txtUserName.Text + " " + "bookTitle " + txtBookTitle.Text + " " + "ISBN " + txtISBN.Text); sw.Close(); Service s = new Service(); s.bookRatedAdd(txtBookTitle.Text, rating, txtReview.Text, txtISBN.Text, txtUserName.Text); btnSubmitRating.Enabled = false; radRating.Enabled = false; } catch (Exception em) { lblError.Text = em.Message; //lblError.Text = "This book has already been reviewed by yourself?"; } } </code></pre> <p>Kind regards</p>
c# asp.net
[0, 9]
1,610,832
1,610,833
Clicking checkbox to expand div, doesn't work in IE7
<p>The following code works fine in FF, but doesn't in IE7 - when clicking the checkboxes in IE the divs doesn't toggle.</p> <p>How do I troubleshoot these kind of issues - does anyone have an idea on how to go about this?</p> <pre><code>// hide divs $('.product-optional-toggle1').css({ display: 'none'}); $('.product-optional-toggle2').css({ display: 'none'}); $('.product-optional-toggle3').css({ display: 'none'}); // toggle divs when checkbox is checked $('.product-optional-checkbox1').change(function () { if($(this).attr("checked") === "true") { $('.product-optional-toggle1').toggle('fast'); return; } $('.product-optional-toggle1').toggle('fast'); }); $('.product-optional-checkbox2').change(function () { if($(this).attr("checked") === "true") { $('.product-optional-toggle2').toggle('fast'); return; } $('.product-optional-toggle2').toggle('fast'); }); $('.product-optional-checkbox3').change(function () { if($(this).attr("checked") === "true") { $('.product-optional-toggle3').toggle('fast'); return; } $('.product-optional-toggle3').toggle('fast'); }); </code></pre>
javascript jquery
[3, 5]
3,242,513
3,242,514
Any idea how to write code that can be easily ported to iphone, android and blackberry?
<p>I'm looking for a way to easily port content driven applications from one mobile platform to another. Currently HTML5+js seems to be the only language that can be easily reused.</p> <p>Can you share your experience? I'm looking for a way to go forward.</p>
iphone android
[8, 4]
5,304,150
5,304,151
News section snipits
<p>I have created a news section for a website I'm working on. I'd like to show the first few words of the article then a link to the rest. I'm kicking myself because I remember a few months ago seeing an article on exactly how to do this, but I have no idea where I found it. </p> <p>I know how to grab the first so many characters from a string but it gets more tracking when you are trying to grab words instead. If anyone could point me in the direction of a tutorial or article along these things I’d be very grateful.</p>
c# asp.net
[0, 9]
692,182
692,183
how can I add a progress bar with showing percentage level while uploading file in asp.net
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/11714858/create-file-upload-progress-bar-asp-net-and-javascript">Create File Upload Progress Bar ASP.NET and JavaScript</a> </p> </blockquote> <p>I have to create an web application in asp.net with C#.net in that i have to display progress bar to show uploading status of file how should i can do this?</p>
c# asp.net
[0, 9]
749,281
749,282
Differences between C++ and Java compilation process
<p>I have high level idea on the differences between C++ and Java compilation. But, I want to really understand and dive deep. can you suggest any references or blogs ?</p>
java c++
[1, 6]
3,757,140
3,757,141
Passing 'event' into the function as an argument
<p>I'm novice with both JS and jQuery, and I'm a little bit confused about what situations would require you to pass <code>event</code> as an argument into the function, and what situations you would <strong>not</strong> need to.</p> <p>For example:</p> <pre><code> $(document).ready(function() { $('#foo').click(function() { // Do something }); }); </code></pre> <p>versus</p> <pre><code> $(document).ready(function() { $('#foo').click(function(event) { // Do something }); }); </code></pre>
javascript jquery
[3, 5]
316,235
316,236
How to Loop over ten questions
<p>I'm in the process of creating a simple maths game. I'm trying to create a loop that will display ten questions, one at a time, to a textview. The user will enter the answer into an edittext, press a button, and then question will be validated and the next question in the series of ten will appear in the textview.</p> <p>I'm just not quite sure how to get to the next question. Any help will be greatly appreciated.</p> <p>Here's what I've done so far:</p> <pre><code>int x = 0; while (x &lt; 10) { if (i1 == 1) { answer = q1; editTextEquation.setText(random1 + "+" + random2); x++; } if (i1 == 2) { answer = q2; editTextEquation.setText(random1 + "-" + random2); x++; } if (i1 == 3) { answer = q3; editTextEquation.setText(random1 + "/" + random2); x++; } if (i1 == 4) { answer = q4; editTextEquation.setText(random1 + "*" + random2); x++; } } </code></pre> <p>and then the validation button calls this method</p> <pre><code>private void questions() { int score = 0; int i = Integer.parseInt(editText.getText().toString()); if (i == answer) { editText.setText("Correct"); score++; } else { editText.setText("Incorrect"); } } </code></pre>
java android
[1, 4]
4,805,511
4,805,512
Generate dynamic hyperlink based on querystring
<p>I wanna generate Hyperlink based on query string .Let me explain it more</p> <p>Topics clicked rite now:(here I want my hyperlinks)....,....</p> <p>1.Cat1</p> <p>2.Cat2</p> <p>3.Cat3</p> <p>when i click cat1 it generate querystring: ?Cat=Cat1</p> <p>when I click on cat2 it will generate querystring ?Cat=Cat2</p> <p>so based on that I want to create hyperlink whose text is query string(value)</p> <p>and url is url-(name and value of that query string)lets say for cat1</p> <p>if currently url is <a href="http://www.google.com/?Cat=Cat1&amp;subcat=subcat1" rel="nofollow">http://www.google.com/?Cat=Cat1&amp;subcat=subcat1</a> so text should be cat1(and its url should be www.google.com/?subcat=subcat1)</p>
javascript jquery
[3, 5]
3,129,948
3,129,949
jquery compare arrays $.getJSON
<p>I am trying to compare 2 arrays. One is taken from DOM, generated by <strong>.split(" ")</strong>, the other I would like to be retrived by <strong>$.get</strong> call. </p> <p>All is working fine if I test the <strong>dictionary</strong> array manually. Example: </p> <pre><code> // var dictionary = ["in", "the"]; // &lt;- this one works var dictionary = $.getJSON('job/dictionary/en'); $(this).keyup(function() { var words = $(this) .text() .split(" "), words_final = [], i = 0; jQuery.grep(words, function(word) { if (jQuery.inArray(word, dictionary) == -1) words_final.push(word); i++; }); }); </code></pre> <p>Response from this URL is <em>Content-Type: application/json</em> with response body: </p> <pre><code>[ "in", "the" ] </code></pre> <p>Apparently... then I try to run <strong>$.getJSON('job/dictionary/en')</strong> in chrome dev tools, I get an object back with responseText: <em>"["in","the"]"</em> </p> <p>I've tried with <strong>$.get()</strong> as well with the same result. </p> <p>Any help really appreciated. </p>
javascript jquery
[3, 5]
2,289,972
2,289,973
Disable button inside a GridView TemplateField
<p>I have the following gridview control </p> <pre><code>&lt;asp:Panel runat="server" ID="pnlBeforeSave" Visible="true"&gt; &lt;asp:GridView ID="gvP" runat="server" AutoGenerateColumns="false" AllowPaging="false" AllowSorting="false" CssClass="list-table" HeaderStyle-CssClass="header"&gt; &lt;Columns&gt; &lt;asp:TemplateField HeaderText="Action" ItemStyle-Width="20%" HeaderStyle-HorizontalAlign="Center" ItemStyle-CssClass="unsortable"&gt; &lt;ItemTemplate&gt; &lt;input id="btnPay" type="button" onclick="javascript:OpenEditPaymentItemDialogPage('&lt;%# Eval("PmtId") %&gt;');" value="Edit" class="button save" style="width: 80px" /&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;/Columns&gt; &lt;/asp:GridView&gt; &lt;/asp:Panel&gt; </code></pre> <p>After I save the griview dataset to Database I have to disable the griview. but btnPay still enabled. I need to do it from code behind Any idea?</p>
c# asp.net
[0, 9]
4,000,298
4,000,299
How to maintain ajax results on Back
<p>I have a page in which I have 3 tabs. a 3-step wizard. on the last step - I have an AJAX call to fetch data. once clicked on each of the items in this data, I am redirecting the user to another page.</p> <p>I want to maintain the wizard status (including ajax results) when the user presses BACK on the browser.</p> <p>What is the best method to achieve this? using #step on the URL????</p> <p>Thanks</p>
javascript jquery asp.net
[3, 5, 9]
4,816,643
4,816,644
Change Mouse pointer when ajax call
<p>I want to change the mouse pointer to the "Wait" symbol when we run the AJAX call and return back to default pointer after completing the call. I have tried as follows but my problem is it's just working on Firefox until I dont click/press the mouse button. Here is my code:</p> <pre><code>function initializeAjax(url){ $('html, body').css("cursor", "wait"); try { if (url.substring(0,4) == ".mdf") { var database = window.location.pathname.slice(0,window.location.pathname.lastIndexOf('.mdf')); var url = database + url; } initRequest(url); returnedValues = null; req.onreadystatechange = returnedValues; nocache = Math.random(); req.open("GET", url+"&amp;nocache = "+nocache, false); req.send(null); $('html, body').css("cursor", "auto"); return req.responseText; } catch(err) { return "Error 8"; } } </code></pre> <p>Could anyone please help how to change above to solve the problem soo that it shud work in Firefox and IE too.</p>
javascript jquery
[3, 5]
1,519,760
1,519,761
Can I autoselect a drop down menu?
<p>I am taking text from a table via an autocomplete to pre-load information that was set to the table the last time the user was in it. I can get the information without any problem. Here is the jquery/javascript code that I am having the hard time with:</p> <pre><code> $('#type').val(ui.item.type); var t = $("#type").val(); $('#types').text(t); </code></pre> <p>Here is the HTML code for the drop down menu:</p> <pre><code> &lt;label for="type"&gt;&lt;strong&gt;*&lt;/strong&gt;Tournament Type&lt;/label&gt; &lt;select name="type" id="type"&gt; &lt;option value=""&gt;Please select...&lt;/option&gt;&lt;? while ($type = mysql_fetch_array($types)) { $TID = $type['ID']; $name = htmlspecialchars($type['Type']); echo("&lt;option value = '$name'&gt;$name&lt;/option&gt;\n"); }?&gt; &lt;/select&gt; </code></pre> <p>What I am trying to accomplish here is to make the displayed item on my drop down menu equal to what was previously selected while still maintaining the functionality of the drop down menu in case the information needs to be changed. I have not been able to get this to work thus far. Can I do this or is there another method I should be using to accomplish this?</p>
javascript jquery
[3, 5]
831,324
831,325
Writing a string to textfile in Android
<p>How Can I write a String to a text file,I should be able to specify the location of the file(or some how open and see its content,It is not necessary that it should be located in Computers memory), please provide me with the code snippet. Thank you in advance for all the responses.</p>
java android
[1, 4]