Unnamed: 0
int64
302
6.03M
Id
int64
303
6.03M
Title
stringlengths
12
149
input
stringlengths
25
3.08k
output
stringclasses
181 values
Tag_Number
stringclasses
181 values
3,489,520
3,489,521
How should I give text to textbox which will displayed in textbox at runtime
<p>This is my aspx code </p> <pre><code>&lt;asp:TemplateField HeaderText="Column Name"&gt; &lt;ItemTemplate&gt; &lt;asp:TextBox ID="TextBox1" runat="server" AutoPostBack="false" &gt;&lt;/asp:TextBox&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; </code></pre> <p>t...
c# asp.net
[0, 9]
3,649,156
3,649,157
Call javascript function on page_load event
<p>In asp.net website, inside <strong>.aspx</strong> i have following code</p> <pre><code>&lt;script type="text/javascript"&gt; function callme(option) { document.getElementById("t1").value = option; } &lt;/script&gt; &lt;div id="content" runat="server"&gt;&lt;/div&gt; &lt;input type="text" id="t1" /&...
javascript asp.net
[3, 9]
2,232,431
2,232,432
use javascript to find parameter in url and then apply if then logic
<p>I am trying to make my page perform an action only if it sees that a particular parameter is present in the url.</p> <p>I essentially want the javascript code to do this:</p> <p>consider an example page such as: <a href="http://www.mysite.com?track=yes" rel="nofollow">http://www.mysite.com?track=yes</a></p> <p>If...
javascript jquery
[3, 5]
1,434,476
1,434,477
Is it possible to open another Web Browser form the current browser.
<p><strong>Is it possible to Open another web Browser from current web browser using JavaScript...??</strong></p> <p>For Eg :If i am using Mozilla Firefox to view a web site and while clicking on a particular link (like an online payment mechanism), it must switch the browser to the Internet Explorer even if its not b...
java javascript
[1, 3]
3,216,333
3,216,334
jQuery closest() not selecting class added dynamically
<p>I have the <a href="http://jsfiddle.net/WFawp/" rel="nofollow">following jsFiddle</a> which has a <code>.tab</code> class (on a span) that is supposed to remove/replace the open (or close) class on the <code>.container</code> onclick -- and although my console logs are showing that successfully, using <code>closest(...
javascript jquery
[3, 5]
3,748,598
3,748,599
Help with ternary operator
<p>I don't think I am using the ternary operator correctly as I am not getting the results am I after:</p> <pre><code>buildHTML.push("&lt;a href='http://mysite/user?screen_name=" + data.friend == null ? data.user.me : data.friend + "'&gt;" + data.friend == null ? data.user.me : data.friend + "&lt;/a&gt;"); </code></pr...
javascript jquery
[3, 5]
5,775,625
5,775,626
What is the equivalent to python equivalent to using Class.getResource()
<p>In java if I want to read a file that contains resource data for my algorithms how do I do it so the path is correctly referenced.</p> <p>Clarification I am trying to understand how in the Python world one packages data along with code in a module.</p> <p>For example I might be writing some code that looks at a st...
java python
[1, 7]
113,035
113,036
Setting the width of columns with an array as parameter
<p>I have the following function:</p> <pre><code>function LoadColWidth(thewidtharray) { for (i = 0; i &lt; thewidtharray.length; i++) { $('#MyGrid .tr:first').eq(i).width(thewidtharray[i]); } }; var NarrowWidth = new Array(70, 72, 97, 72, 97, 72, 96, 76, 76, 76, 76, 75); </code></pre> <p>I'm ca...
javascript jquery
[3, 5]
2,869,188
2,869,189
convert string to php array, jquery serialize on form
<p>I have a form and am sending the data to a backend php script using:</p> <pre><code>var fields = $('#myform').serializeArray(); </code></pre> <p>And then doing a post. Some of my inputs are named as arrays so when the data gets posted, I have an array like below. How do I convert the attribute pieces back into o...
php jquery
[2, 5]
4,307,891
4,307,892
Focus lost with jAlert plugin
<p>I'm calling jAlert with this function</p> <pre><code>$('.stcommentdelete').live("click",function() { var ID = $(this).attr("id"); var dataString = 'com_id='+ ID; jConfirm('Oled sa kindel, et tahad kustutada??', '', function(r){ if(r==true){ $.ajax({ type: "POST", ...
javascript jquery
[3, 5]
551,937
551,938
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]
1,471,311
1,471,312
access preloaded images
<p>I have found a script <a href="http://engineeredweb.com/blog/09/12/preloading-images-jquery-and-javascript" rel="nofollow">here</a> that preloads images, but I dont know how can to access them.</p> <pre><code>(function($) { var cache = []; // Arguments are image paths relative to the current page. $.preLoadIm...
javascript jquery
[3, 5]
5,489,789
5,489,790
Run a function in timeout looping
<p>I have the following code:</p> <pre><code>// After 8 seconds change the slide... var timeout = setTimeout("changeSlide()", 8000); $('div.slideshow').mouseover(function() { // If the user hovers the slideshow then reset the setTimeout clearTimeout(timeout); }); ...
javascript jquery
[3, 5]
346,622
346,623
$.ajax JQuery progress bar
<p>I have a sql queries being executed via an ajax call, but I need to be able to check the progress of it and update a progress bar.</p> <p>Here's my simple ajax call (using JQuery):</p> <pre><code>var strResult = (($.ajax({url: URL,async: true}).responseText)); </code></pre> <p>Any ideas how I listen for changes t...
php javascript jquery
[2, 3, 5]
3,211,302
3,211,303
Selecting first item in GridView can't be clicked
<p>I have Button with background images (instead of ImageViews) so i get my position using selectedIndex = (Integer) v.getTag(); somehow i can't click the first one , but after i click the remaining images the index 0 image will show up even when you clicked the other images.</p> <pre><code>Button buttonView; ...
java android
[1, 4]
2,151,171
2,151,172
Validation for input boxes in jQuery or in Javascript
<p>I have 4 input boxes , and I want user enter only one number from 1, 2, 3, 4 in that boxes. If user enter number 1 in one box then he not use 1 number in other box, i.e user enter one number at one time, if list of input boxes goes to increase, this logic is not fail. The image is shown below, user use only 1 to 4 ...
javascript jquery
[3, 5]
4,699,050
4,699,051
Parse String to byte array C#
<p>I have done the following to convert the byte array to string to store in the db</p> <pre><code>byte[] value; String stValue = BitConverter.ToString(value); </code></pre> <p>Now I just want do do the opposite</p> <pre><code>String stValue; byte[] value= (Convert) stValue ??? </code></pre> <p>How to do this??</p>...
c# asp.net
[0, 9]
5,691,242
5,691,243
Help for arrays: converting php code to python
<p>For the first time this is not python => php but php => python. I've got small problem with arrays in python. (I've already been to docs.python.org)</p> <p>Here's my problem: I get in python couples of strings like this:</p> <pre><code>(People 1): &lt;criteria a&gt; &lt;data of the criteria&gt; &lt;criteria b&...
php python
[2, 7]
2,258,561
2,258,562
creating an options menu with quit application function
<p>I'm writing an application for android and I would like to insert an options menu, that would have only one function and that is to quit an application.</p> <p>My options_menu.xml looks like this (I created a new folder under res called menu - just like the instructions said):</p> <pre><code>&lt;?xml version="1.0"...
java android
[1, 4]
3,111,639
3,111,640
What would be the best control/easiest way to output a single record with many columns?
<p>This is a continuation from this: <a href="http://stackoverflow.com/questions/8407025/is-there-an-easy-way-to-check-multiple-columns-to-see-if-the-value-is-null">Is there an easy way to check multiple columns to see if the value is null?</a></p> <p>Now that I've got my single product, it's far too wide to display ...
c# asp.net
[0, 9]
2,946,854
2,946,855
jQuery Show/Hide cookie button
<p>I am looking for a simple jQuery show/hide script that is cookie based. If anyone can provide me with a script, that would be great. </p> <p>Below is the guide on what I am trying to achieve. </p> <ul> <li>if cookie is not set <ul> <li>Set all div's with a class of admin as visible</li> <li>Display hide link</l...
javascript jquery
[3, 5]
3,724,548
3,724,549
Is there any limit on how much text asp:label control can hold?
<p>Should I use it if I wanna store really long text?</p>
c# asp.net
[0, 9]
3,277,396
3,277,397
Mono for Android Release error
<p>I'm using Mono for Android (C#). I'm trying to get the .apk file using MonoDevelop, but when I set project for release (using this guide: <a href="http://docs.xamarin.com/Android/Guides/Deployment,_Testing,_and_Metrics/publishing_an_application/Part_1_-_Preparing_an_Application_for_Release" rel="nofollow">LINK</a>) ...
c# android
[0, 4]
1,492,269
1,492,270
How do I allow the user to move an absolutely positioned div?
<p>I am using jQuery to create a "dialog" that should show up in the center of the page on top of everything and should remain centered at all times unless the user moves it. It has a header area (like a title bar) and I would like the user to be able to click there and drag the dialog "window" around. It is an absolu...
javascript jquery
[3, 5]
3,347,177
3,347,178
Alternative method to display content
<p>The selected radio button will show its corresponding dropdown box.</p> <p>For example, upon the selected radio button ‘Ontario’, a dropdown box with matching cities will show up.</p> <p>I have the following working code for the above example:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready...
javascript jquery
[3, 5]
3,773,455
3,773,456
How to get the value of a javascript object?
<p>I have an object and inside that object are further objects. I want to get the value of those objects. Thanks!</p> <pre><code> foreach($query as $row){ $vehicles[$row-&gt;deviceID] = Array( 'description' =&gt; $row-&gt;description, 'deviceID' =&gt; $row-&gt;deviceID ); ...
php javascript
[2, 3]
3,778,965
3,778,966
jQuery - choosing sum at random
<p>I am creating a "whack-a-mole" style game for primary school children where they have to click on the correct number in correspondence to the sum given. </p> <p>At the moment the program is generating addition sums like this.</p> <pre><code>function createPlusSum(total) { console.log(total) var int1 = Math...
javascript jquery
[3, 5]
5,169,841
5,169,842
How to remove validation from a jQuery script
<p>I found this script from a tutorial but I don't want the validation part, just the posting part.. I tried to delete the validation related commands but it doesn't work. Maybe I did it wrongly, but my thought is if all of these are needed to run the submitHandler.</p> <p>Thank you.</p> <pre><code>$(document).ready(...
javascript jquery
[3, 5]
3,590,761
3,590,762
jQuery - programming style - many bindings vs. conditional single one
<p>I frequently see code like that:</p> <pre><code>$("#foo").live("mouseover mouseout", function(e) { if (e.type == "mouseover") { $("#foo").append("&lt;div id='bar'&gt;"); } else { $("#bar").remove(); } }); </code></pre> <p>instead of more self-explanatory in my opinion:</p> <pre><code>$...
javascript jquery
[3, 5]
5,755,116
5,755,117
Going from PHP to Java
<p>Having been programming in PHP for a year, I now want to start learning Java. I am in a Windows environment. </p> <p>I want to develop a GUI with Java that would query a MySQL database. I know I would use JFC to accomplish this, but my questions are: </p> <ul> <li>Will it be difficult to adapt to Java?</li> <li>Do...
java php
[1, 2]
2,614,474
2,614,475
How do I set my 2nd datepicker one day ahead of the 1st?
<p>I have 2 datepicker textfields: one of them is #from, the other is #to. Right now, my users can have the same date for #from and #to. </p> <p>How do I make the #to datepicker start at #from + 1 day?</p> <p>Here's my current code:</p> <pre><code> var dates = $( "#from, #to" ).datepicker({ numberOfMont...
javascript jquery
[3, 5]
1,093,735
1,093,736
Loop through numerous variables
<p>I have 48 variables (TextViews), like tv1, tv2, tv3, tv4...tv48.</p> <p>I want to set a value for these variables, with a for loop, since I do not want to write down the same row 48 times.</p> <p>Something like this:</p> <pre><code>for (int i=1; i&lt;49; i++) { "tv"+i.setText(i); } </code></pre> <p>How t...
java android
[1, 4]
5,191,289
5,191,290
How do I pull data from another thread or process (Android/Java)
<p>I know of concepts that allow inter-process communication. My program needs to launch a second thread. I know how to pass or "push" data from one thread to another from Java/Android, but I have not seen a lot of information regarding "pulling" data. The child thread needs to grab data on the parent thread every so o...
java android
[1, 4]
179,958
179,959
Help me understand whats wrong with my javascript
<p>If I do this-</p> <pre><code>alert(anchor); </code></pre> <p>I get this-</p> <blockquote> <p>"[object HTMLLIElement]"</p> </blockquote> <p>... ok, yep, it is the element I want. So I want to get that elements ID.</p> <p>So I test it like this:</p> <pre><code>alert(anchor.attr("id")); </code></pre> <p>... bu...
javascript jquery
[3, 5]
5,305,376
5,305,377
Monthly Archives
<p>Say I've got a database with about 5,000 blog posts from the last 2 years, I'm trying to create 'monthly' archives so I can display the data in a much more logical way.</p> <p>For some reason I've never really had to work with date's all that much and my knowledge is lacking.</p> <p>I'm using Linq/C#; can someone ...
c# asp.net
[0, 9]
1,714,297
1,714,298
Server.UrlEncode vs. HttpUtility.UrlEncode
<p>Is there a difference between Server.UrlEncode and HttpUtility.UrlEncode?</p>
c# asp.net
[0, 9]
3,329,719
3,329,720
JavaScript Variable Operators
<p>Are these possible in Javascript?</p> <p>I've got something like this:</p> <pre><code>var op1 = "&lt;"; var op2 = "&gt;"; if (x op1 xval &amp;&amp; y op2 yval) { console.log('yay'); } </code></pre> <p>Basically I need the user to input the operator, its coming from a select box. </p>
javascript jquery
[3, 5]
2,855,021
2,855,022
Checkbox onclick uncheck other checkboxes
<p>I have 6 checkboxes, one for each business day and one that says 'all'.</p> <p>What i want to be able to do is uncheck all the other boxes if someone clicks the 'all' checkbox if that makes sense.</p> <p>For example, if someone has clicked monday and wednesday ... then they come in and click the 'all' checkbox, th...
php javascript jquery
[2, 3, 5]
5,824,096
5,824,097
Should one bind data with Eval on aspx or override ItemDataBound in code-behind?
<p>For data bound controls (Repeater, ListView, GridView, etc.), what's the preferred way of binding data?</p> <p>I've seen it where people use Eval() directly on the aspx/ascx inside the data bound control to pull the data field, but to me, it just seems so...inelegant. It seems particularly inelegant when the data n...
c# asp.net
[0, 9]
4,997,732
4,997,733
jquery loading animation with php form that submits back to itself
<p>I have a PHP file that contains a form and which submits back to itself. Is there any way to show a loading animation after the form is submitted and run until the page is loaded?</p>
php jquery
[2, 5]
4,370,501
4,370,502
to perform validation for amout(price) in ASP.net
<p>I'm using 'Amount' as a column in my datatable for my application.</p> <p>I want to perform the following validations w.r.t 'Amount' which is a string variable.</p> <p>1) i want to check if the amount has more than 2 digits after the decimal point</p> <p>2) if the amount is positive or negative .. (as in case of ...
c# asp.net
[0, 9]
555,094
555,095
Trying to number objects in jQuery
<p>I'm trying to number objects, which can be added to a cart with drag'n'drop. So, this snippet should check the current number written in <code>span.amountVal</code>, and easily add ´+1´ to this number, but the result is always ´1´. When I uncomment the ´alert(i++);´, the snippet work like I want to. I'm confused, wh...
javascript jquery
[3, 5]
3,421,951
3,421,952
Check different date formats
<p>I have function:</p> <pre><code>sample(date){ //operations, for example add one week (7 days) return date; } var one = new Date('2012-07-16'); var two = new Date('07/16/2012'); var new = sample(one); // or sample(two) var day = new.getDate(); var month = new.getMonth(); var year = new.gerYear(); alert(day...
javascript jquery
[3, 5]
5,984,828
5,984,829
Trying to replace 2011 with getFullYear in copyright div
<p>I am trying to replace the year 2011 in a footer that contains the copyright with the current year.</p> <p>Currently I have successfully replaced '2003-2011' with '2003-2012' like this:</p> <pre><code> $(document).ready (function (function(){ $('div.footer').html($('div.footer').html() .replace('2003-2011','200...
javascript jquery
[3, 5]
2,588,119
2,588,120
jquery cycle to vertically scroll through table
<p>Okay I have a table that I am populating with 25 rows of information. I want to use Jquery cycle or something similar to create a vertical scrolling effect, so the rows constantly scroll vertically upwards through a container that can display roughly five rows at a time. </p> <p>I have used jquery cycle for numerou...
javascript jquery
[3, 5]
1,702,000
1,702,001
android: Unable to access struct static data members
<p>I'm having the next kind of error when linking the application:</p> <pre><code>undefined reference to 'MyStructure::K_VARIABLE_A undefined reference to 'MyStructure::K_VARIABLE_B ... </code></pre> <p>The structure is defined inside "MyStructure.h" as:</p> <pre><code>struct MyStructure { const static int K_VARIABL...
android c++
[4, 6]
5,383,564
5,383,565
Listview with detailview in android
<p>Help!!</p> <p>I have a listadapter with a detail view, the problem that I am having is trying to pass values from an xml file to the second view. I can currently do this but only if I show those values in the first view. What I am trying to acheive is on the firstview have just a title and when you click on that ti...
java android
[1, 4]
3,789,737
3,789,738
Remote poll using jQuery/javascript
<p>I want to let my users create their own polls so they could paste my code somewhere on their website and users may rate their own game characters (with 1-5 stars rating).</p> <p>I want to use jQuery or javascript for this purposes, but I have no idea how to start developing something like that. It should be free fr...
javascript jquery
[3, 5]
2,185,143
2,185,144
facebook comment jquery load
<p>I have problem loading facebook comments via jquery <code>.load()</code>.</p> <p>Loading:</p> <pre><code>&lt;div id="comfb" &gt;&lt;/div&gt; &lt;div id="fb-root"&gt;&lt;/div&gt; &lt;script&gt; $(document).ready(function(){ $('#comfb').load('/engine/comments.html'); FB.XFBML.parse( ); }); &lt;/script&gt; ...
javascript jquery
[3, 5]
3,128,120
3,128,121
apply JavaScript to all elements with id
<pre><code>&lt;a id="link" href="http://www.google.co.uk"&gt;link&lt;/a&gt; &lt;a id="link" href="http://stackoverflow.com"&gt;link&lt;/a&gt; </code></pre> <p>the javascript only replaces the first <code>href</code> but i want it to apply to any and all <code>&lt;a&gt;</code> with the <code>id="link"</code> <strong>O...
javascript jquery
[3, 5]
2,730,102
2,730,103
Why put javascript in asp.net?
<p>I have been asked about JavaScript and am unsure on a few points that I mentioned.</p> <p>After use of ASP.net I have found that the term used for handling events it the code behind method.</p> <p>But in other cases I have found that JavaScript is used in asp.net pages.</p> <p>My question is, is this done as the ...
javascript asp.net
[3, 9]
5,655,648
5,655,649
Difference between this.href and $(this).attr("href")
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/6977049/this-href-vs-this-attrhref">this.href vs $(this).attr(&#39;href&#39;)</a> </p> </blockquote> <p>Here is my code:</p> <pre><code> $(function () { $("a.Delete").click(function () { con...
javascript jquery
[3, 5]
1,658,732
1,658,733
how to encrypt third party api key in a website
<p>I got an api key from yelp. I am still learning how to use this api in my website. As of now my api key is in java script which is visible to everyone. I am using visual studio for developing this website.</p> <p>can anyone tell me how to encrypt this api key? </p>
c# javascript jquery asp.net
[0, 3, 5, 9]
2,524,731
2,524,732
why is jQuery selector property undefined within each()?
<p>Given the following code, why does the selector property work in the first instance but not the second? Aren't they both jQuery objects?</p> <pre><code>&lt;span class='tst'&gt;span&lt;/span&gt;​ var tst = $('.tst'); console.log(tst.selector); // prints '.tst' $('.tst').each(function() { console.log(this.selecto...
javascript jquery
[3, 5]
4,226,086
4,226,087
Javascript event like window.onload for subsequent loads
<p>We have a function that changes the iframe height at the window.onload event so we can adjust it to the page contents. The problem is that after clicking in an asp:menu the height its restored to its default and the window.onload event doesnt fire...so we need the event that would fire in subsequent loads (tried win...
c# javascript asp.net
[0, 3, 9]
1,126,721
1,126,722
what is a good test environment to test JQuery
<p>I find that I constantly want to test little snippets of JQuery and i would love a good method. Currently I go to the page that I am trying to test and open up firebug and enter the snippet and it should appear in the console. I was wondering if there is a better place or method that can help</p>
javascript jquery
[3, 5]
2,571,156
2,571,157
Why an Android may delete data saved under Media.EXTERNAL_CONTENT_URI?
<p>Why an Android may delete data saved under Media.EXTERNAL_CONTENT_URI after unmount/mount SD card action? How to avoid this?</p> <p>I save ringtones using this URI and the default content resolver from context.</p> <p>The code is similar to that:</p> <pre><code>ContentValues values = new ContentValues(); values.p...
java android
[1, 4]
5,976,808
5,976,809
Append to window.opener.location?
<p>Friends,</p> <p>Is it possible to append a string to the window.opener.location from the opened window? Ideally, the opener does not refresh, but gets "&amp;t=test" added to then end of it.</p> <p>Thanks so much!</p>
javascript jquery
[3, 5]
4,587,027
4,587,028
cloning only a specific item in a list using .clone() in Jquery
<p>I am trying to add only select items of a list to a new list. So for example, I only wish to add banana to my second list, the following code in my function adds all the items in coll-selected-list to coll-grouped-list. How may I only make a clone of a specific item. Any tips would be great.</p> <p>jQuery:</p> <pr...
javascript jquery
[3, 5]
545,512
545,513
How do I set my environment up for TopCoder?
<p>I tried out TopCoder today. While I liked the problem, the Java editor didn't work for me. The remote compiling time and the lack of unit tests also made it difficult to complete the task.</p> <p>I ended up coding the solution in Eclipse and the pasting it into the TopCoder window. I tried out EclipseCoder, but it ...
java c++
[1, 6]
5,049,073
5,049,074
passing values to nest activity from diff lists
<p>i have a problem of passing two values in different <code>ArrayList</code>s.</p> <p>I made a listView and fetched to it list2 elements. when click on the listView item want to pass the selected item and the element in the list1 at the same position. The problem in next code that its pass only the selected item from...
java android
[1, 4]
2,082,395
2,082,396
jQuery lazy loading image with throttling?
<p>I've been given a design for a commercial affiliate-related website where the homepage has 2500+ images on it. Two directions I'm thinking about to ease the loading of the images is to utilize a lazy image loading script.</p> <p>I've been messing with the jQuery JAIL (Async Image Loader) script. I have it set so th...
javascript jquery
[3, 5]
4,148,258
4,148,259
Japanese characters :Convert lowerCase to upperCase using jquery
<p>I tried using toUppercase() method to convert japanese characters to uppercase but it return same string with out conversion.</p> <p>Is there any other way to do this using jquery or javascript.</p> <pre><code>fieldValue = "ショウコ"; //japanese string. function convertToUppercase(fieldValue) { co...
javascript jquery
[3, 5]
1,889,620
1,889,621
Issue with callback functions
<p>I have three dropdowns I am trying to dynamically populate when an HTML form loads. They all use API callback functions provided by a third-party cloud database provider to retrieve the data and populate the dropdowns. The problem I am encountering is that only the last one populates. Here is how I'm calling the fun...
javascript jquery
[3, 5]
665,793
665,794
Is jQuery.change("callBackFunction") better than jQuery.on("change","callBackFunction")
<p>Is jQuery.change("callBackFunction") better than jQuery.on("change","callBackFunction") or is it the other way around? If so why is that so?</p> <p><strong>Edit</strong> I now know that <a href="http://api.jquery.com/change/" rel="nofollow">http://api.jquery.com/change/</a> says both are same, courtesy to Alexeyss....
javascript jquery
[3, 5]
5,733,898
5,733,899
Going from Java desktop programming to Android Application Developement
<p>I know similar questions have been asked before but i think this is slightly different. for about a year Ive been learning Java. I have been building a few applications on the desktop using my-eclipse and swing GUI. Now i want to start programming for the android. I understand how to do what i want in Java but it al...
java android
[1, 4]
2,258,772
2,258,773
append json objects into json array
<p>I have an form and would like to append the contents of it to an existing array. <br /> I am using <code>JSON.stringify( $('#myForm').serializeObject() )</code> to convert my form elements into <code>json</code> objects. <br /> The form has user info that i would like to append into <code>myArr</code> then append th...
javascript jquery
[3, 5]
2,142,568
2,142,569
Evaluate a JQUERY statement
<p>I use this kind of script to evaluate my javascript code that is injected in the DOM</p> <pre><code>function wilEval(source) { if ('function' == typeof source) { source = '(' + source + ')();' } var script = document.createElement('script'); script.setAttribute("type", "text/javascript"); script.text...
javascript jquery
[3, 5]
4,631,646
4,631,647
Javascript to back button
<p>I have one GridView with Employee search results in it.</p> <p>This GridView shows results of EmpNo, EmpName, Salary. For each EmpNo cell in the GridView, there is a link to ManageEmployee.aspx page.</p> <p>Till here okay, no problem.</p> <p>In ManageEmployee.aspx page there are two buttons 1.Update, 2.Cancel</p>...
javascript asp.net
[3, 9]
3,980,068
3,980,069
JQuery best practices
<p>Ok guys, three questions here. They are all pretty noobish, but I just want to get your guys' thoughts on them.</p> <p><strong>1)</strong> When writing a jquery script, should I include type?</p> <p>IE: </p> <pre><code>&lt;script type="text/javascript" charset="utf-8"&gt; //Jquery here &lt;/script&gt; </code></...
javascript jquery
[3, 5]
15,808
15,809
This RadioGroup layout or its LinearLayout parent is useless
<p>I am trying to embed <code>RadioGroup</code> with <code>LinearLayout</code>, so to add elements dynamically to my Layout. My code goes here</p> <p>`</p> <p></p> <pre><code>&lt;RadioButton android:id="@+id/dailyCheck" android:layout_width="fill_parent" android:layout_height="wrap_content" android:t...
java android
[1, 4]
1,157,789
1,157,790
Get GridView row index from a template field button
<p>first question:</p> <p>I have a gridview 'gvSnacks' with a list of snacks and prices. The first column of the gridview is a templatefield with the button 'btnAdd'.</p> <p>When one of the add buttons is clicked I want it to assign that rows value to an integer so I can retrieve additional data from that row.</p> <...
c# asp.net
[0, 9]
5,809,635
5,809,636
String manipulation in java to get another string
<p>I have the String <code>content://com.android.contact/data/5032</code> in a variable <code>Str1</code>. I want to manipulate <code>Str1</code> so that I will get <code>5032</code> in another string variable. </p> <p>Can anyone suggest the answer?</p>
java android
[1, 4]
2,671,200
2,671,201
Opening a file of any extension in an iframe
<p>I have a web application in which i need to open any files in standard formats such as .doc/docx/.csv/.txt/.xls in an iframe . How can I achieve this ? I tried using the sample code below but it is not opening all the file formats in the iframe. I am getting some XML error.</p> <pre><code>var ext = GetExtension(fil...
c# asp.net
[0, 9]
3,765,996
3,765,997
Android - Can't draw image at coordinates using matrix
<p>Okay, I have a method that takes the variables: an image, int x, int y, float angle.</p> <p>I am using a canvas, and I am using a <code>Matrix transform = new Matrix();</code> to rotate the image at it's center. However, I want the image to be drawn at the coordinates of <code>x</code> and <code>y</code>. For some ...
java android
[1, 4]
3,047,763
3,047,764
How to rotate an image clockwise or counterclockwise, whichever is shorter?
<p>I'm making a web page that includes a clock with an arrow in the center. When the user clicks on an hour, the arrow rotates to point to what he/she has clicked.</p> <p>I'm using a jQuery image rotate plugin (jQueryRotate) to rotate the arrow.</p> <p>Here is the current code to compute the number of degrees to rot...
javascript jquery
[3, 5]
5,428,339
5,428,340
Uploading files in dedicated server with asp.net
<p>I upload files and convert it into bytes and saved it in Database. It works correctly in my local system. but I hosted it in dedicated server, it cannot convert path into bytes. It shows an error </p> <blockquote> <p>'Could not find a part of the path 'C:\fakepath\1003.pdf'.</p> </blockquote> <p>Code:</p> <pre>...
c# asp.net
[0, 9]
5,407,537
5,407,538
Destroy middle activity in android
<p>I just saw a piece of code:</p> <pre><code>public class MyApplication extends Application { private List&lt;Activity&gt; activityList = new LinkedList&lt;Activity&gt;(); private static MyApplication instance; private MyApplication() { } public static MyApplication getInsta...
java android
[1, 4]
3,589,581
3,589,582
Javascript progress animation
<p>I am trying to build a progress bar using jQuery and javascript.</p> <p>It is basically a bar</p> <pre><code>&lt;div id="progressbar"&gt;&lt;div id="progress"&gt;&lt;/div&gt; &lt;div id="number"&gt;0%&lt;/div&gt; </code></pre> <p>when you click on the next button (which isnt here) it changes the width of the prog...
javascript jquery
[3, 5]
1,130,357
1,130,358
How to record video using Intents?
<p>I need to unserstand how I can record video programatically. Now I use this construction:</p> <pre><code>public class AndroidLearningActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedI...
java android
[1, 4]
3,775,509
3,775,510
how to pass the id of a row link to a jquery , in order to use ajax?
<p>how to pass the id of an edit or delete link via jquery in order to use ajax and php ? here's my code at the front-end which displays the links</p> <pre><code>foreach($cat-&gt;getCategories() as $key =&gt; $val){ echo $val."&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a id='editcat' href=edit.php?id=".$key."&gt;Edit&l...
php jquery
[2, 5]
102,471
102,472
CSS Using to Make Many backgrounds Move at speeds that are different by mouse
<p>Hi i want to create an affect where background move to the mouse at different speeds to make an affect almost like 3d.</p> <p>This is what i want to make that with which i have found <a href="http://www.freeglance.co.uk/submit" rel="nofollow">found this</a></p> <p>can someone explained to me or show me some script...
javascript jquery
[3, 5]
766,035
766,036
JQuery Assign a value to a new variable?
<p>Hi am using the following jquery code:</p> <pre><code>$.cookie('the_cookie', 'the_value'); </code></pre> <p>I want to assign the_value to a new variable...</p> <p>like:</p> <pre><code>var newVar = the_value; </code></pre> <p>How can I do this?</p>
javascript jquery
[3, 5]
913,928
913,929
Jquery event doesn't fire in any case
<p>So, here I want just to alert true, when window is closed ( I mean particullary tab in browser).</p> <pre><code>$(document).ready(function(){ }); $(window).unload(function(){ alert('true'); }); </code></pre> <p>tried <code>$(window)</code> also inside <code>$(document).ready()</code>, nothing.</p>
javascript jquery
[3, 5]
3,295,440
3,295,441
android-java error
<p>i am trying a develop a application..following is a snippet </p> <pre><code>class metro_nodes { public String station; public GeoPoint point; } public class mainscreen extends MapActivity { /** Called when the activity is first created. */ MapController controller; double latitude,longitude; LocationManager loc; ...
java android
[1, 4]
1,146,390
1,146,391
How to read an http input stream
<p>The code pasted below was taken from java docs on <a href="http://developer.android.com/reference/java/net/HttpURLConnection.html" rel="nofollow">HttpURLConnection</a>.</p> <p>I get the following error: </p> <pre><code>readStream(in) </code></pre> <p>as there is no such method. </p> <p>I see this same thing in...
java android
[1, 4]
179,721
179,722
Thread.sleep in Canvas
<p>I am not able to display the rectangles after a certain delay in code. Here is what I am doing</p> <p>DashPathEffect dashPath =new DashPathEffect(new float[]{1,0}, 1);</p> <pre><code> paint.setPathEffect(dashPath); paint.setStrokeWidth(300); final int size =300; </code></pre> <p>canvas.dr...
java android
[1, 4]
3,714,694
3,714,695
Creating DIV dynamically, is not taking height and width on fly
<p>I want to create div dynamically based on some calculations.I am able build div's dynamically but the only issue is it's not taking height and width on fly.please any one share their view or code if possible.</p> <p>Here's the script which i used for your reference.</p> <pre><code>&lt;script type="text/javascript"...
javascript jquery
[3, 5]
5,547,086
5,547,087
image button with transparency
<p>I am totally new to Android development, please excuse my ignorance, but is it possible to make an image button that receives onClick events only when the user clicks on a non-transparent pixel of the button's image?</p>
java android
[1, 4]
5,821,938
5,821,939
A slight issue with zClip zJquery ZeroClipboard
<p>Im trying to put a copy function on my website that will copy links Line by line and store them in the clipboard exactly as seen. zClip does that except when it copies the links it appears that the links get shifted. For example,</p> <p>If I copy the links below with normal CTRL+C</p> <pre><code>http://www.steamde...
javascript jquery
[3, 5]
737,914
737,915
Uploading file of 1 gb using jquery or javascript
<p>In my application developed in asp.net, client wants to upload files of 1 GB. please tell me some trick how i can achieve it through it.</p> <p>this application is about to watching video online so the administrator will upload the movies videos file. so now how i can upload files which are large than 1 Gb</p>
javascript jquery asp.net
[3, 5, 9]
120,580
120,581
check box enable in Jquery
<pre><code>&lt;tr id="tr99"&gt;&lt;td&gt;......&lt;/td&gt;&lt;/tr&gt; &lt;input type="checkbox" onclick="toggletr(this);" value="val" id="cbox" /&gt; </code></pre> <p>The javascript:</p> <pre><code>$(document).ready(function() { function toggletr(obj) { if(obj.checked) $(#tr99).hide(); else ...
javascript jquery
[3, 5]
4,236,635
4,236,636
Too much redundant javascript code
<p>On my asp.net pages i need to control for Dirty controls. I'm not that good in javascript so i found a solution on the internet for doing that by doing so : </p> <pre><code>&lt;script type="text/javascript" language="javascript"&gt; //Demo of completely client side dirty flag. function setDirty() { ...
c# javascript asp.net
[0, 3, 9]
1,528,527
1,528,528
how to prevent dublicate record on run time
<p>This code cause double record... i checked my insert code for all tables and it works fine...</p> <p>and this is insert code:</p> <pre><code> StoreDO store = new StoreDO(); List&lt;BrandDO&gt; brandList = new BrandBL().SelectBrands(); StoreBL storeBL = new StoreBL(); store.StoreName...
c# asp.net
[0, 9]
5,996,102
5,996,103
How to hide the div and make it visible again after some interval while using jquery cycle plugin?
<p>I have a fade show of images and on top i have slide show of another div with description using jquery cycle plugin. Both will happen simultaneously.so that description match the image.</p> <p>But I want description div to come in from left after image comes and go back like toggle effect before image changes.</p> ...
javascript jquery
[3, 5]
4,562,187
4,562,188
Find parent or parents directories of a file
<p>I have a file say xyz.doc .I want to find the parent /Parents of this file ,so that i can bind it in a tree view . How can we achive this ?</p> <p>I have the fileinfo class which is obtained by the code </p> <pre><code>FileInfo[] files = Directory.GetFiles(path,"*.*); </code></pre>
c# asp.net
[0, 9]
4,631,377
4,631,378
Bind function to multiple events of different elements at once
<p>I would like to bind a function to the <code>mouseout</code> event of my <code>&lt;canvas&gt;</code> element, and bind the same function to the <code>blur</code> and <code>contextmenu</code> events of my body. How would I go about binding this function to those elements at once, when there are <strong>different elem...
javascript jquery
[3, 5]
4,750,781
4,750,782
js function not working properly, why?
<p>The function isn't working when i'm using <code>$(document).ready(function () { ..... });</code> but it works when i invoke. please take a look.</p> <pre><code>#test {height:25%,width:25% } &lt;body&gt; .... &lt;div id="test"&gt; &lt;image src="file.jpg" /&gt; &lt;/div&gt; ... &lt;/div&gt; &lt;/body&gt; </code...
javascript jquery
[3, 5]
4,208,272
4,208,273
Drag and drop div using jquery
<p>I got a Main Div where i can drop any text and this will be displayed as in a form shown in the below script.</p> <p>I need to drag and drop the dynamically generated div to move it up or down ,from within the current div. Is this possible? </p> <pre><code> &lt;script type="text/javascript"&gt; $(init); f...
jquery asp.net
[5, 9]
642,058
642,059
Need intellisense or autocomplete feature for my own javascript file
<p>Jquery comes with a vsdoc file that help us to get intellisense or autocomplete feature for jquery. if i want to have the same intellisense or autocomplete feature for my own javascript file then what i need to do.....please help. thanks</p>
javascript asp.net
[3, 9]