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
2,304,087
2,304,088
Get text of the node
<p>In an ASP.NET application I have a IreeView.</p> <p>Here is one of the nodes in the view:</p> <pre><code>&lt;td style="white-space: nowrap;"&gt; &lt;input id="TreeView1n10CheckBox" type="checkbox" checked="checked" name="TreeView1n10CheckBox"&gt; &lt;a id="TreeView1t10" onclick="TreeView_SelectNode(TreeView1_Dat...
c# javascript asp.net
[0, 3, 9]
4,953,372
4,953,373
jQuery closest with attribute filter
<p>Does jQuery 1.5.1 support attribute selectors in the closest method?</p> <p>Given the structure below, <code>el</code> represents the checkbox with the value 513, and I'm trying to reach up and check the ancestor checkbox with the value of 0 with</p> <pre><code>$(el).closest("input[value='0']")[0].checked = true; ...
javascript jquery
[3, 5]
5,712,540
5,712,541
Problem with big amount of dom elements
<p>I have problem with DOM elements I need to add 2000 blocks. I try to do this by setTimeout, but then events not working with this elements. Anyone what mistake I have made?</p> <pre><code>function init(){ $('#regions').prepend("&lt;ul&gt;&lt;/ul&gt;"); setTimeout(function(){ var opt=$('#regions u...
javascript jquery
[3, 5]
5,356,861
5,356,862
Remove space between buttons
<p>i have bunch of buttons within linear layout. But there is spaces buttons. I set padding as 0 but there no change. There is someone who already had the same problem at <a href="http://www.mail-archive.com/android-developers@googlegroups.com/msg51104.html" rel="nofollow">http://www.mail-archive.com/android-developers...
java android
[1, 4]
3,749,727
3,749,728
Error while implemening single sign on in my asp.net application
<p>I am using single sign on method to redirect from on e website to another.I am using forms authentication in both sites and gave the <strong>validationkey</strong> in machine key tag in both webconfig.While i am redirecting i get this error " <strong>Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redir...
c# asp.net
[0, 9]
2,421,210
2,421,211
How to perform jquery actions on elements not yet visible
<p>I have a textarea in a div that I need to call a jquery function on to activate my rich textbox. The div is initially hidden and becomes visible through a button click on the server side:</p> <pre><code>&lt;div id="RichTextDiv" style="display:none"&gt; &lt;textarea id="RichText" /&gt; &lt;/div&gt; &lt;script typ...
javascript jquery
[3, 5]
1,142,279
1,142,280
setInterval update ajax column unless mouseover
<p>I have a column in my web design, which is periodically refreshed by a JS function "refreshColumn()" and updated by AJAX.</p> <pre><code>setInterval('refreshColumn()',60000); function refreshColumn() { ..make call with AJAX and load response to element... document.getElementById('myColumn').innerHTML = xmlhttp.res...
javascript jquery
[3, 5]
2,457,290
2,457,291
jQuery StopPropagation issue
<p>I want to close the div if someone clicked outside that div. I have the below code:</p> <pre><code> $('body').click(function(e) { $('div.test').slideUp('slow'); }); $('div.test').live('click',function(e) { e.stopPropagation(); }); </code></pre> <p>But the issue is that when someone cl...
javascript jquery asp.net
[3, 5, 9]
4,293,181
4,293,182
Removing duplicate strings using javascript
<p>I have an array of 800 sentences. I want to remove all duplicates (sentences that have the same exact words, but in different order) from the array. So for example "this is a sentence" and "is this a sentence" are duplicates. Only one one of them should remain in the array (it doesn't matter which one). </p> <p>My ...
javascript jquery
[3, 5]
2,716,922
2,716,923
Drag and Drop label to panel in asp.net
<p>I know how to drag and drop in windows application, but I cannot find the mousedown event in the <code>asp:label</code> control.</p> <p>Any idea how to do that?</p>
javascript asp.net
[3, 9]
3,676,891
3,676,892
How to assign value of an array variable into another array variable
<pre><code>String[] msgoptions; String[] finalmsgs3 = finalmsgs2[3].split("RR"); for(i = 1; i &lt; finalmsgs3.length; i++) { msgoptions[i] = finalmsgs3[i]; Log.e(TAG, "---------------" + msgoptions[i]); } </code></pre> <p>I need your help, if you can resolve issues of my code. Actually i'm trying to assign val...
java android
[1, 4]
1,437,804
1,437,805
Can I get Jquery Pulsate Effect without using Jquery UI?
<p>I have in a situation where I cannot use Jquery UI for a reason. I am trying to do get Jquery UI Pulsate Effect without using Jquery UI. Similar to this link, <a href="http://docs.jquery.com/UI/Effects/Pulsate" rel="nofollow">http://docs.jquery.com/UI/Effects/Pulsate</a>. I have search a lot but couldn't find anythi...
javascript jquery
[3, 5]
5,440,567
5,440,568
Add onMouseOver Javascript Function to Asp.Net Dynamic Menu Items
<p>How do you add a mouseover javascript function to an asp.net menu item when the menu items are created dynamically? Doesn't allow you to add .attributes function.</p> <p>[Javasript]</p> <pre><code>&lt;script type="text/javascript"&gt; function ChangeProjectImage(obj) { var ctrl = document.getElementByI...
javascript asp.net
[3, 9]
2,197,883
2,197,884
Android Media.insertImage and retrieve image from sd card
<p>I'm trying to save a bitmap to the sd card and by using the string returned in Media.insertImage, create an instance of the bitmap later on. But recreating it is not working. It is saving the bitmap correctly as i can see it in the gallery app but i just can't get the bitmap path correct or something. Any help i wou...
java android
[1, 4]
4,266,717
4,266,718
How to change a default Horizontal ProgressBar to vertical?
<p>So far i have a working horizontal progress bar.</p> <p>This is my xml file</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" &gt; &lt;ProgressBar ...
java android
[1, 4]
2,185,632
2,185,633
Slide Screens in Activity android sdk
<p>I have Activity where i have information. How can i do so that when i slide to the side i could see another information? Is this possible to do it in one Activity? What the java code should be? What should i change in .xml files ?</p> <p>java:</p> <pre><code>package com.lineage.goddess; import java.io.BufferedRea...
java android
[1, 4]
5,929,418
5,929,419
How do I define multiple OnInit events on the same page in asp.net?
<p>I have a page in which I create dynamic controls via OnInit. On the page I also have a custom user control in which i want to create other dynamic controls via OnInit (defined with override). The event in the user control overrides the event on the page: how do i prevent this?</p>
c# asp.net
[0, 9]
3,879,674
3,879,675
jQuery fadeout woes
<p>Using the <code>keyup</code> on jQuery, is there a way to check a what textfield <strong>currently</strong> has in it's box?</p> <p>I mean if the textbox currently <strong>does not</strong> have the word 'apples' then <strong>do</strong> a jQuery function, then if it <strong>does</strong> have the word apples... th...
javascript jquery
[3, 5]
4,469,803
4,469,804
What is the equivalent of Java's .length for arrays in C#?
<p>I'm new to C#, and I'm trying to convert this code from java into C#.</p> <pre><code> static public double euclidean_2(double[] x, double[] y) { if (x.length != y.length) throw new RuntimeException("Arguments must have same number of dimensions."); double cumssq = 0.0; for (int i = 0...
c# java
[0, 1]
722,013
722,014
use onclick to create session variable with jquery or javascript?
<p>Is it possible onclick to create session variable with javascript or jquery then use this variable with php ?</p> <p>For example someone click link at the bottom</p> <pre><code>&lt;div id="list"&gt;&lt;a onclick = "" href="javascript:void(0);"&gt;+&lt;/a&gt;&lt;/div&gt; </code></pre> <p>there will be created vari...
php javascript jquery
[2, 3, 5]
2,820,549
2,820,550
Problems when assigning values via JavaScript to Asp.net labels and then passing via C# session object
<p>I am assigning variables to asp labels via javascript with a simple innerHTML call</p> <p>example:<br/></p> <p><code>document.getElementById('labelName').innerHTML = parseFloat(var).toFixed(2);</code></p> <p><br/> It appears in the label fine, and I am able to continue to manipulate it via javascript.</p> <p>I t...
c# javascript asp.net
[0, 3, 9]
4,867,323
4,867,324
C# directive for code to run only when working on localhost
<p>Is there any directive in C# that runs a code (server side code) only when the application runs on localhost and ignores it on production (not the debug true or false)?</p> <p>It can be something that reads a web.config appsettings variable, if it's true, run the code, if it's false, ignore it (just an idea).</p>
c# asp.net
[0, 9]
458,589
458,590
What does this PHP syntax mean and why is this variable NaN?
<p>question marks are hard to search for in google.</p> <p>What does this mean step by step?</p> <pre><code> $page = isset($_POST['page'])?$_POST['page']:"0"; </code></pre> <p>I am guessing it means if <code>Post['page']</code> is set use that value and if not use <code>0</code>? but i dont get it in detail. Also wh...
php javascript jquery
[2, 3, 5]
4,530,304
4,530,305
Theme in user control
<p>How can I change <code>Page.Theme</code> dynamically in <code>UserControl</code>?</p> <p>As far as I know it can be done in <code>Page_PreInit</code> but <code>UserControl</code> dont have such an event, it`s exists only in Page class.</p>
c# asp.net
[0, 9]
992,454
992,455
How do I run a function only when a div gets loaded?
<p>I want to run a function only when a div gets loaded.</p> <p>When I load the page, a number of files are loaded. At the end of the list, PHP echoes a div. When this one is displayed, jQuery should run a function.</p> <p>I can do this with a click-event, but I want it to work automatically, without pushing a button...
php javascript jquery
[2, 3, 5]
352,913
352,914
What's the correct way to pass in tilde path in javascript in order to get the relative path?
<p>I have a tilde path. I would like to convert it into client url</p> <pre><code> var path = "~/Presentation/Resources/Images/masterPage/cleanup.png"; var a = '&lt;%=Page.ResolveClientUrl(" '+path+' ") %&gt;'; var b = '&lt;%=ResolveUrl("~/Presentation/Resources/Images/masterPage/cleanup.png") %&gt;'; al...
c# javascript jquery asp.net
[0, 3, 5, 9]
5,073,332
5,073,333
Add or Subtracting into $(window).scrollTop + $(window).height == $(document).height() - Scrolled to bottom of page equation
<p>I'm running an if function when the user gets to the bottom of the page which works great as is like this</p> <pre><code>if($(window).scrollTop() + $(window).height() == $(document).height()) {} </code></pre> <p>However I want it to run slightly before the bottom - about 300px before. </p> <p>I've tried</p> <pre...
javascript jquery
[3, 5]
2,073,013
2,073,014
trigger event in js when opening email?
<p>I am trying to track when a user opens an email for a subscription service I have. Is it possible to trigger some event in javascript or something else when an email is opened?</p>
javascript asp.net
[3, 9]
5,720,198
5,720,199
Custom Page class
<p>I'm trying to create a custom class for my pages in my project.</p> <p>Here's the default.aspx.cs</p> <pre><code>using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class _Default : FrontPage { public String ...
c# asp.net
[0, 9]
4,558,122
4,558,123
detecting change in a text input box using jquery/javascript
<p>in html and javascript, I can use keyup, focus, blur to detect most of the content changes in a text input, however if the user do a copy and paste into the text input, how do I capture this change? The issue here is that the input is already in focus when user paste into it.</p>
javascript jquery
[3, 5]
1,685,689
1,685,690
How do I execute an event using jQuery through an html object(button) created through Javascript?
<p>I'm just new here. So here's where I'm stuck:</p> <p>I created an html table using javascript. I have a button,which when clicked, will create set of tables with exactly the same structure but the objects(eg. button, text) inside those tables have different ID's. Now when I try to execute a click function using ...
javascript jquery
[3, 5]
4,126,808
4,126,809
How can I change the font color of the textview in the listview from xml file item? android
<p>Depending on the value:</p> <p>Example</p> <p>Pay:+200 </p> <p>Pay:-100</p> <p>If the value of pay is higher the color of 200 is green. If the value of pay is lower the color of 100 is red.</p> <p>It changes color every seconds because I have xml file link from the browser and update the xml file every second...
java android
[1, 4]
4,673,861
4,673,862
Help with js function explanation - Why $this = $(this)...?
<p>A user called "mu" as provide me the following answer that I really like. However, I do have some questions here, and I hope anyone could help me out.</p> <p>Given the following:</p> <pre><code>function() { var $this = $(this); $this.data('orig', $this.html()).html('&lt;a href="blabla.org"&gt;go h...
javascript jquery
[3, 5]
436,893
436,894
How to call javascript on user control
<p>I have webapplication in c# asp.net 4.0 </p> <p>I have User Control in that I have written javascript :-</p> <pre><code>&lt;script&gt; function SetValue() { alert(document.getElementById('offSetClient').value); } &lt;/script&gt; &lt;asp:HiddenField ID="clientDateTime" runat="server" /&gt; ...
c# javascript asp.net
[0, 3, 9]
1,114,619
1,114,620
Upload image to the server without file upload control
<p>Am currenty working on writing code in c# to handle some operation for our iphone app.These code files will be in our server and the url are used by iPhone team to call those specific files and ger their values.</p> <p>Now am working on photo upload functionality.I have no idea how to proceed.In asp.net i used file...
c# asp.net
[0, 9]
2,630,710
2,630,711
How to get correct table format ? Jquery ques
<p>This code prints output as given below... <strong>code</strong>:</p> <pre><code>$('#calendar').append('&lt;table&gt;&lt;thead&gt;&lt;tr&gt;'); var i; for(i=0;i&lt;=6;i++) { $('#calendar').append('&lt;td&gt;'+week[i]+'&lt;/td&gt;'); } $('#calendar').append('&lt;/tr&gt;&lt;/th...
jquery javascript
[5, 3]
2,349,048
2,349,049
How to bind a repeater to an array of a custom class?
<p>I have a class like this </p> <pre><code> public class Link { public string LinkID { get; set; } public string Title { get; set; } public string URL { get; set; } } </code></pre> <p>and a method that returns an array of <code>Link[]</code> </p> <p>Could I bind that to a repeat...
c# asp.net
[0, 9]
2,267,695
2,267,696
prevent users to continue to the action page using a JS method
<p>I have a form that when I click on button sumbit it redirects me to the action page, and I have a test on the fields using JavaScript, that I created a function for which returns true if all fields are filled or false if there is some field which is still empty. The problem is that the method that will prevent the u...
php javascript
[2, 3]
5,278,483
5,278,484
jquery sortable except this one
<p>Need a way to allow sorting except for last item with in a list. </p> <p>Tried using the cancel option but it didn't work and I don't think that's what its for.</p> <p>I think a solution may be with events but would like your take on it.</p> <p>In practice the list is dynamically generated and relies on tag and ...
javascript jquery
[3, 5]
1,466,996
1,466,997
syntax error missing ), don't know where to place it in order to echo input
<p>I want to know what is the correct way of display a text input in an echo in the code below because nothing is being outputted:</p> <pre><code>&lt;script language="javascript" type="text/javascript"&gt; window.top.stopVideoUpload( &lt;?php echo $result; ?&gt;, '&lt;?php echo "&lt;input name='vidid' type='...
php javascript
[2, 3]
3,326,170
3,326,171
how to prevent $(document).ready(function() {} from calling a function
<p>i have a simple but bit complicated problem. what i want to do is that in my php page i have added this</p> <pre><code>$(document).ready(function() { $("a[rel^='prettyPhoto']").prettyPhoto({social_tools:false,overlay_gallery:false}); }); </code></pre> <p>now this page get call through ajax too.normal call of pa...
javascript jquery
[3, 5]
4,864,173
4,864,174
JQuery - DIV-Content-Change should be another URL
<p>after the user logged in, the project-url is root/inside/. The site has 4 different main-sections, which will be displayed in a div via Ajax. The url does not change, after clicking on the links. How can i do it, that the url changes like this after clicking on the links for the main sections:</p> <pre><code>root/i...
javascript jquery
[3, 5]
5,737,277
5,737,278
Full calender application in php
<p>The application is for a clinic.A patient can see the calender in the website and he/she can book the date for consulting.Once a patient booked a date, that day will shown as "booked". so no more person can book that day.The admin can view the days and patient details. How can we implement this.</p> <p>I got two s...
php jquery
[2, 5]
1,906,010
1,906,011
jquery check variable values
<p>In jQuery I have the following 4 variables. </p> <pre><code>var add var city var state var zip </code></pre> <p>I need to check to see that any one of the above have a value. If none have a value that is OK. If all of them have a value that is OK.</p> <p>Just need to check that at least one of them do not have a...
javascript jquery
[3, 5]
1,537,670
1,537,671
How to transfer a variable to a external js file in javascript?
<p><strong>Case 1:</strong> I have passed a variable to a external js file like this</p> <pre><code>&lt;script type="text/javascript"&gt; var data1, data2, data3, data4; function plotGraph() { var oHead1 = document.getElementsByTagName('HEAD').item(0); var paramScript = document.createElement("script"); ...
javascript jquery
[3, 5]
5,846,046
5,846,047
Jquery dynamically create link
<p>I have a piece of JQuery that creates a row in a table and in one of the cells there is an X that is surrounded by a class. When it is dynamically created and then clicked on the click listener does not fire. Here is the code.</p> <pre><code>$('#add').click(function() { $( '#table' ).append('&lt;td class="x"&gt;...
javascript jquery
[3, 5]
3,035,481
3,035,482
How do I output the location using gps on Android
<p>I am trying to output the location into a textview. I have used the locationManager.toString(), but it would only give me the output android.location.LocationManager@44ee7718. I would like to output the location like Los Angeles, CA 90501.</p> <p>The code for LocationManager:</p> <pre><code>LocationManager lm = (L...
java android
[1, 4]
3,631,820
3,631,821
how to append anchor tag into parent of div?
<p>My html code is:</p> <pre><code>&lt;div title="test" class="xyz"&gt;Tesing&lt;/div&gt; </code></pre> <p>I want it to look like:</p> <pre><code> &lt;a href='#'&gt; &lt;div title="test" class="xyz"&gt;Tesing&lt;/div&gt;&lt;/a&gt; </code></pre> <p>How to do it using JavaScript?</p>
javascript jquery
[3, 5]
4,394,024
4,394,025
Show / hide elements on mouse move
<p>I'm building a site where I want the certain sections to be hidden until the mouse is moved. They then remain visible whilst the mouse is moving, however, if it remains still for a couple of seconds they hide again.</p> <p>I'm using jQuery on the site, in my ready state I have:</p> <pre><code>var hide = setTimeout...
javascript jquery
[3, 5]
4,979,603
4,979,604
Organizing script files
<p>I usually have jQuery code that is page specific along with a handful of functions that many pages share. One approach is to make seperate files for organizing, but i'm thinking that putting all the script in one file and making comments in the file for readability would also work. Then when the site goes live I can...
javascript jquery
[3, 5]
3,720,802
3,720,803
Open clicked thumbnail in a new tab
<p>I have the below code on one page:</p> <pre><code>&lt;div id="prodoneid" class="prodcls"&gt; &lt;a href="javascript:void(changeIt('big.png', 'pagewrapid')());"&gt; &lt;img src="images/zara/thumbnails/1.png" alt="ZARA"/&gt; &lt;/a&gt; &lt;/div&gt; </code></pre> <p>By the below code I am opening the ...
javascript jquery
[3, 5]
3,777,018
3,777,019
how to make trial version of win and web application in .Net technology
<p>how to develop a trial version of window or web application in dotnet technology. as a result user can use that windows or web apps for certain day and also will not be able to use after resetting his system clock.how could make this type of trial version both in window and web. please give me the concept in detail....
c# asp.net
[0, 9]
3,876,058
3,876,059
Check if value is null
<pre><code>var isempty = 0; collegeArray = $(form).find(".cname").serializeArray(); for (var i = 0; i &lt; collegeArray.length; i++) { alert(collegeArray[i].value); if (collegeArray[i].value = "") { isempty = isempty + 1; } } if (isempty == 0) { container.innerHTML = ""; document.getElement...
javascript jquery
[3, 5]
3,818,349
3,818,350
IndexOf with decimals
<p>I'm looking for a bit of help ironing out a bug in a search form I'm working on. </p> <p>I have a form of multiple checkboxes which submits via AJAX to PHP and returns a query string for use in deep-linking. The query string is used to check checkboxes on the page that appear in the query string. </p> <p>The query...
javascript jquery
[3, 5]
3,185,929
3,185,930
jquery: find out at which position (order) a particular element is among its neighbors
<p>I think this should be simple but I haven't been able to figure it out:</p> <p>I have a container with a couple of children:</p> <pre><code>&lt;div id='container'&gt; &lt;div id='one'&gt;some&lt;/div&gt; &lt;div id='two'&gt;random&lt;/div&gt; &lt;div id='three'&gt;text&lt;/div&gt; &lt;/div&gt; </code></pre> ...
javascript jquery
[3, 5]
481,293
481,294
asp net javascript Cache clear
<p>I have a website that i did some time ago now they request some new features and i did some changes in some javascript files, but when i publish the clients that use the IE have problems with cache so in they browser they have old version of javascript. How can i clear the client cache so when they visit website the...
c# asp.net javascript
[0, 9, 3]
4,332,098
4,332,099
JavaScript alert doesn't show
<p>I am trying to built a select option menu. If the user chooses the first (default) option, the alert window should be shown, but it isn't shown. Need help, thanks!</p> <p>Here is my html code</p> <pre><code> &lt;select name="sets" id ="selectset"&gt; &lt;option value="General"&gt;Select Set&lt;/option&g...
javascript jquery
[3, 5]
5,000,678
5,000,679
Get date in the 17-05-2012 format
<p>im stuck at a problem here im getting the date in the following format</p> <pre><code>Wed May 16 2012 10:22:39 GMT+0500 </code></pre> <p>i have tried </p> <pre><code>.toString('dd-MM-yyy'); </code></pre> <p>but to no avail how can i parse the given format into the required one.</p>
javascript jquery
[3, 5]
1,120,640
1,120,641
Javascript to make a component to dynamically follow another one
<p>I have a dynamically rendered div/span that needs to follow a particular component e.g. a textbox. Currently it is set to a particular coordinate on the page and it is shown as appearing right beneath the textbox. But it no longer appears that way when a div above the textbox gets collapsed/expanded (i.e. it goes ...
javascript jquery
[3, 5]
3,667,259
3,667,260
Jquery DIV count add class
<p>Add class of test after div count</p> <p>Any help would be appreciated :-)</p> <pre><code>$(function() { var coloumnCount = $("#plans-wrapper").children("div.column").length(); if(coloumnCount &gt; 3 { $("column").addClass("test"); }); }); </code></pre>
javascript jquery
[3, 5]
4,411,901
4,411,902
How to disable checkbox one after another?
<p>I have two checkboxes with different names:</p> <pre><code>&lt;input type="checkbox" name="checkbox1" value="checkbox1"&gt; &lt;input type="checkbox" name="checkbox2" value="checkbox2"&gt; </code></pre> <p>I'd like to implement code where when checkbox1 is checked, checkbox2 is disabled and when checkbox2 is check...
javascript jquery
[3, 5]
4,349,935
4,349,936
PHP Code to generate event to repeat in a random shuffle of intervals between 1-20 seconds
<p>This program sends an email every 20 sec. </p> <p>How can I amend the code to have it send an email, then pause for a random number of seconds between 1 and 20, then repeat till the end ? Any help on this is much appreciate. Thanks in advance! </p> <p>Here is the code that is associated with the Delay section of t...
php javascript
[2, 3]
739,477
739,478
Javascript script timer issue
<p>I am trying to make a count down timer. I manage to make one but the problem with this is it stops when I close browser. So when user revisit my site it restart again. What I want is to keep that timer. <em>For example, if user leaves my site at timer 22:14:09. So timer will continue. Lets say the user revisits my s...
javascript jquery
[3, 5]
3,939,224
3,939,225
JS scroll starts bottom. I want it start at top
<p>The site I am working on: <a href="http://bit.ly/OZSjT9" rel="nofollow">http://bit.ly/OZSjT9</a></p> <p>Please view source code. I have so many different JS codes I think it's conflicting.</p> <p>I am sooo new at Javascript that I have to get code online to get things to work. Well my trouble is this. Every tim...
javascript jquery
[3, 5]
1,679,916
1,679,917
When JavaScriptSerializer is mandatory?
<p>here i attach a sample code. they used JavaScriptSerializer to generate data in json format and send back the data to client</p> <p>GetPersons() has been called by jquery ajax function. code here</p> <pre><code>$.ajax({ type: "POST", url: "Default.aspx/GetPersons", contentType: "application/json; c...
jquery asp.net
[5, 9]
2,749,111
2,749,112
Javascript Variable value in PHP
<p>I have my code look like this </p> <pre><code>var bal=$(this).val(); var findbalance="&lt;?=balancefromid(bal);?&gt;"; alert(findbalance); </code></pre> <p>is that possible?</p>
php javascript
[2, 3]
2,893,018
2,893,019
How to get list of all Session Variables created in a Solution / Project
<p>I am working on an existing ASP.NET / C# project. How can I find all session variables created in the project in different code behind / in line code / class file, without running the project in debug mode. I am using vs 2008.</p> <p>Thanks</p>
c# asp.net
[0, 9]
3,015,183
3,015,184
Toast can't be used in new runnable?
<p>as the title,i was used toast in runnable but there is an error my code:</p> <pre><code>public Runnable backgroud=new Runnable(){ public void run() { // TODO Auto-generated method stub try { while(!Thread.interrupted()) { String msg="this is a test"; ...
java android
[1, 4]
751,804
751,805
Global EditText Variables
<p>I'm writing my first android app, and I have an EditText object that I want to be read across my entire program (multiple activities). I'd like to take in a user's name on one screen/activity/layout and read it in several others to manipulate or display it, so I've found that the string needs to be public and static...
java android
[1, 4]
262,770
262,771
generating DOM inside a div tag from javascript
<p>I have this javascript function:</p> <pre><code>jQuery(document).ready(function() { FB.api('/me/friends', function(response) { if(response.data) { $.each(response.data,function(index,friend) { $("#fb_friends").append("&...
javascript jquery
[3, 5]
5,225,023
5,225,024
Download using WebClient - IIS Basic Authentication
<p>I am using this to download html content from a site published on IIS:</p> <pre><code>using (var client = new WebClient()) { client.Credentials = CredentialCache.DefaultCredentials; string html = client.DownloadString("http://site.com"); } </code></pre> <p>But when the IIS is set to Basic Authentication thi...
c# asp.net
[0, 9]
3,826,163
3,826,164
Android: Saving ArrayList of User Defined Objects between onPause and onResume
<p>I am working on an application where i am saving the state of an application in an ArrayList. Now, to save this state, i tried to use Serialization. But, somewhere in the user defined object, i am using Button, which is not letting me serialize the entire object. </p> <p>I wanted to know, is there any other way of...
java android
[1, 4]
1,662,367
1,662,368
ViewTreeObserver Listener not called after some time
<p>I have great difficulties when using ViewTreeObserver. All works fine for some unpredictable period of time, and then the listener is not operational anymore. It is certainly because of what is written in the doc:<strong>The returned ViewTreeObserver observer is not guaranteed to remain valid for the lifetime of thi...
java android
[1, 4]
2,307,759
2,307,760
How do I prevent button presses until form request is completed when form request causes a file download
<p>In my Asp.net webforms site I have a form where users select various options and those options are sent back in a postback that generates a PDF report and sends that file back to the user for download via the following code:</p> <pre><code> protected void btnTopGenReport_Click(object sender, EventArgs e) { ...
c# asp.net
[0, 9]
3,429,164
3,429,165
Select a Multi-select DropDown by values with jquery
<p>I have asked a similar <a href="http://stackoverflow.com/questions/12584387/select-a-dropdown-by-values-with-jquery">question</a> this morning, how to select a dropdown by its value rather than sequence.</p> <p>The problem is now how to use a multi-select dropdown and select the options by their value rather than s...
javascript jquery
[3, 5]
3,666,786
3,666,787
Recording button ID's in Javascript
<p>I am trying to create an item selection menu, where the user is presented with multiple buttons to pick their choices. I am creating several divs with PHP.</p> <pre><code> &lt;div id="h1-1"&gt;&lt;input type="button" value="h1-1" onclick="recordValue()"&gt;&lt;/div&gt; &lt;div id="h1-2"&gt;&lt;input type="...
php javascript
[2, 3]
3,632,650
3,632,651
jQuery Functions Syntax Difference
<p>How does:</p> <pre><code>(function($) { /// code })(jQuery) </code></pre> <p>differ from <code>$(document).ready(function()</code> in jquery?</p> <p>I know what the <code>ready</code> function does. It awaits until the HTML is loaded before it starts. However, does <code>(function($)</code> do the same?</...
javascript jquery
[3, 5]
319,174
319,175
jQuery .slideUp() effect running issue
<p>Can anybody tell me why the Effect is running so often is hovered. I mean you hover 3 times without to wait that the Effect is finished and than you can wait until the Effect has run 3 times. </p> <pre><code> $(function() { $('#dropdown_nav li').find('.sub_nav').hide(); $('#dropdown_nav li...
javascript jquery
[3, 5]
207,200
207,201
how to store AdminId in session using 3tire
<p>how to store adminId in session using 3tire.</p>
c# asp.net
[0, 9]
280,791
280,792
How can I find wifi speed in Android and how can I display wifi speed in TextView?
<p>To find wifi speed I used this code:</p> <pre><code>WifiManager wifiManager = (WifiManager)this.getSystemService(Context.WIFI_SERVICE); WifiInfo wifiInfo = wifiManager.getConnectionInfo(); if (wifiInfo != null) { int linkSpeed = wifiInfo.getLinkSpeed(); //measured using WifiInfo.LINK_SPEED_UNITS //txtSpeed....
java android
[1, 4]
4,545,246
4,545,247
JQuery Getting Dynamically Created Select Value
<p>I have been reviewing a lot of pages about this and can't seem to figure out why this isn't working. </p> <p>In an HTML page I am using PHP to dynamically create a dropdown box on the page like this:</p> <pre><code>$sel = '&lt;select "id"="userPhones"&gt;'; foreach ($user_phones as $single_phone) { $phoneId = $s...
php jquery
[2, 5]
5,585,506
5,585,507
Correct usage of Asp.Net Response.TransmitFile and Response.End()
<p>What is the correct usage of this code?</p> <pre><code>httpContext.Response.AddHeader("Content-Disposition", "inline; filename=" + HttpUtility.UrlPathEncode(fileName)); httpContext.Response.ContentType = "image/png"; httpContext.Response.AddHeader("Content-Length", new FileInfo(physicalFileName).Length.ToString());...
c# asp.net
[0, 9]
1,073,689
1,073,690
Mono for Android WebClient Special characters
<p>I'm using Mono for Android (C#) and WebClient DownloadString to get source code of a HTML website, that uses special characters (č,š,ž). But when displaying the code, it shows � instead of the characters. Is there a way to show the correct characters?</p>
c# android
[0, 4]
3,810,069
3,810,070
close a menu with a "anywhere click"
<p>as u guys can see, i have a drop down menu.</p> <p>have alot of columns, each one have a option to open the menu.</p> <pre><code>$(".optionCont").live("click", function(){ $(".dropMenuCont").slideUp(); if($(this).next().css("display") == "none"){ $(this).next().slideDown(); }else{ $(thi...
javascript jquery
[3, 5]
1,897,210
1,897,211
Cant add jquery to the head dynamically and run jquery code
<p>I have got this code:</p> <pre><code>function init(){ if (typeof window.jQuery !== 'function') { var link = document.createElement('script'); link.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'; document.getElementsByTagName('head')[0].appendChild(link); } } ...
javascript jquery
[3, 5]
5,801,682
5,801,683
JQuery fadeIn fadeOut with setInterval working sporadically
<p>I have a bunch of images that need to rotate in and out one at a time every 2 seconds with fancy JQuery fadeIn and fadeOut. I have all the images in the HTML to pre-load them and a setInterval timer that fades the current image out, then fades the next image in. Problem is that sometimes when you are clicking or s...
javascript jquery
[3, 5]
166,366
166,367
facebook or twitter style load more option
<p>I've been trying to create a facebook or twitter like load more option as an alternative for ordinary pagination. I've been trying to create a feature without any external plugins, just using jQuery alone. The load more option works fine minus one feature, that is scrolling the newly appended div element coming to u...
javascript jquery
[3, 5]
1,139,808
1,139,809
Is it possible to base 36 encode with JavaScript / jQuery?
<p>I'm thinking about using the encode/decode technique here (Encoding to base 36/decoding from base 36 is simple in Ruby)</p> <p><a href="http://stackoverflow.com/questions/6338870/how-to-implement-a-short-url-like-urls-in-twitter">how to implement a short url like urls in twitter?</a></p> <p>Idea being to track use...
javascript jquery
[3, 5]
1,396,486
1,396,487
How to hide the full url of a website and only display the domain name?
<p>How would I hide the pages that the user is surfing and just show him/her the domain name. E.G. www.google.com as opposed to www.google.com/index.aspx etc...</p> <p>Thanks</p>
c# asp.net
[0, 9]
3,961,440
3,961,441
Using C# we can develop application for Android and Iphone?
<p>Nowadays, every body speaking about Android and iPhone, I think popularity of those operation systems.</p>
c# iphone android
[0, 8, 4]
1,618,766
1,618,767
Android setOnClickListener(this) Error
<p>I have created a button in my Android application &amp; I tried to set onclick listner to run onClick method like follows </p> <pre><code>... Button btn_ok; btn_ok = (Button)findViewById(R.id.button1); btn_ok.setOnClickListener(this); } public void onClick() { EditText uN = (EditText) findViewById(R...
java android
[1, 4]
4,194,193
4,194,194
conditionally call JavaScript function
<p>I have a "Pay" button where we are starting to accept credit card. I need to call a Javascript function from the server side click event. I tried with Response.Write as below but that does not trigger my function that is defined in the separate .js file. What else can I do?</p> <pre><code> protected void btm...
c# javascript asp.net
[0, 3, 9]
3,793,872
3,793,873
Strange behaviour jquery
<p>Ok, I've seen this in some topics but haven't fixed my script.</p> <p>I have a piece of jquery that doesn't work because of I use it to manage (validate ) a piece of html (form ) that is loaded using a jquery fucntion load() after loading the page.</p> <p>But if I put for example an <code>alert("Something")</code>...
javascript jquery
[3, 5]
4,664,228
4,664,229
Dynamically adding control to master page
<p>I have a problem with dynamically loading control's into master page's ContentPlaceHolder.</p> <p>Name of the ContentPlaceHolder and path of the UserControl is loaded from db and send to this little code: </p> <blockquote> <p>Control c = this.Page.LoadControl(uc-path-from-db);<br> this.Page.Master.FindControl...
c# asp.net
[0, 9]
2,892,253
2,892,254
set watermark on an image with high quality
<p>I have a handler wich set watermark on images. The problem is the quality is not so good. Here is the code:</p> <pre><code> byte[] imageBytes = null; using (Graphics G = Graphics.FromImage(ImageToWatermark)) { using (ImageAttributes IA = new ImageAttributes()) { ColorMatrix C...
c# asp.net
[0, 9]
4,385,002
4,385,003
How to reset a list
<p>It might be a silly question but still i am facing problem with this.</p> <pre><code> var eformDetailIds = []; eformDetailIds=$("[name=eform_id]").map(function(){ return $(this).val() }).get(); </code></pre> <p>this is the code that i have written in js function and calling this function on button click.</p>...
javascript jquery
[3, 5]
968,305
968,306
What are the limits of Python?
<p>I spent a few days reading about C++ and Python and I found that Python is so much simpler and easy to learn. </p> <p>So I wonder does it really worth spending time learning it? Or should I invest that time learning C++ instead?</p> <p>What can C++ do and Python can't ?</p>
c++ python
[6, 7]
2,564,095
2,564,096
load more using jquery?
<p>I have a div having 100 results like.</p> <pre><code>&lt;div id="main"&gt; &lt;div class="sub"&gt;This is a test 1&lt;/div&gt;&lt;/br&gt; &lt;div class="sub"&gt;This is a test 2&lt;/div&gt;&lt;/br&gt; &lt;div class="sub"&gt;This is a test 3&lt;/div&gt;&lt;/br&gt; . . . &lt;div class="su...
javascript jquery
[3, 5]
1,013,173
1,013,174
asp.net master property string, how to check in content page if string is empty
<p>if i have a master property string for example:</p> <pre><code>public String SharedInfo { get { return (String)Session["SharedInfo"]; } set { Session["SharedInfo"] = value; } } </code></pre> <p>and a label in an content page, i check if the string is empty by doing: if(Master.SharedInfo == null)</p> <p>no...
c# asp.net
[0, 9]
1,577,989
1,577,990
Html returned as a response to a jQuery ajax call
<p>My jQuery function is making a ajax call (GET request) and it has to return HTML that I will then inject in the page in the success event.</p> <p>What do I have to escape in the HTML to ensure there aren't any issues?</p>
c# jquery asp.net
[0, 5, 9]