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
509,834
509,835
setting in one class and getting from another class
<p>this is really basic I know, but I just can't see what the problem is... all I want to do is set the value of a variable from one class into an "intermediary" class and retrieve it in a third class (because filterArray will get called from other classes as well, and I want them all to read the same data). But if I d...
java android
[1, 4]
1,609,867
1,609,868
Generate questions randomly and non repaeted from the xml file in android
<p>I have a xml file having 50 different questions and i need only 15 out of them randomly and non-repeated.I used the code below</p> <pre><code>int n = ((int)(Math.random()*100))%50; if(temp&lt;15) { for(int i=0;i&lt;temp;i++) { System.out.println("hello naresh"); if(n==check[i]) { ...
java android
[1, 4]
5,045,970
5,045,971
In Java, what happens when you have a method with an unspecified visibility keyword?
<p>I have been working with android for a few years now, not once have I had a teacher or anyone to tell me what to do. This whole time I have wondered to myself this.</p> <p>When you have a method I generally see...</p> <pre><code>public void method(){ //Stuff } </code></pre> <p>or</p> <pre><code>private void met...
java android
[1, 4]
5,508,367
5,508,368
How do you dynamically change intent.category.LAUNCHER to intent.category.DEFAULT?
<p>I need to create an application which will be hidden from the user. But before it gets hidden, I need to set some configuration on the GUI and after that I must hide the icon from the applications list. If I remove the</p> <pre><code>&lt;category android:name="android.intent.category.LAUNCHER" /&gt; </code></pre> ...
java android
[1, 4]
4,301,998
4,301,999
Neater way of checking adding/removing a CSS class using 'hasClass' in jQuery?
<h2>Overview</h2> <p>From time to time in jQuery I want to check a condition of some kind, and then based on the result add/remove a cssClass to an element.</p> <p>Before calling add(remove)Class, I always check to see if that class isn't (or is) applied already.</p> <h2>In code, this translates to</h2> <pre><code>...
javascript jquery
[3, 5]
5,433,018
5,433,019
Color Dodge Blend Bitmap
<p>I have two bitmaps topBitmap and bottomBitmap and I need to blend the two bitmaps using color dodge in android. I could not find color dodge in PorterDuffXfermode. Is there any way to do it with ot without the use of a Canvas? </p> <p>Kindly let me know how to blend two bitmaps using color dodge mode in android.Tha...
java android
[1, 4]
3,861,422
3,861,423
Raw javascript instead of jquery (example follows)
<p>this is my first question here. I have the following jquery code:</p> <pre><code>$(document).ready(function(){ $("a").click(function(){ $(this).parent("li").css({textDecoration: "line-through"}); return false; }); }); </code></pre> <p>that works just fine. It strikes through the parent l...
javascript jquery
[3, 5]
2,706,179
2,706,180
My ellipsis function is taking the wrong string
<p>I have an ellipsis function in php to truncate my string.</p> <pre><code>$HashTagText = "#apple, #ball #cat , #dog"; </code></pre> <p>the ellipsis function gives results like - <code>#apple, #ball #c...</code><br/></p> <p>It shows OK but when I click on <code>#c...</code> then the link passes <code>#c...</code> v...
php javascript
[2, 3]
1,021,172
1,021,173
Calculate date difference in integer value
<p>I have two date fields with IDs gp_vdate_from and gp_vdate_to. And I have a hidden div which is populated by a dynamic table. The div gets visible on click of a button after entering date fields. I did something like this to calculate the date difference </p> <pre><code>function parseDate(str) { var mdy = str.split...
javascript jquery
[3, 5]
3,573,513
3,573,514
jQuery event handler not working
<pre><code>&lt;form id='new_key' action='/foo/bar' method='post'&gt; &lt;input type="text" id="u"&gt; &lt;input type="submit" value="submit"&gt; &lt;/form&gt; </code></pre> <p>I can bind a jquery event to this element like:</p> <pre><code>&lt;script type="text/javascript"&gt; $('#new_key').ready(function() { alert...
javascript jquery
[3, 5]
4,831,483
4,831,484
calling Jquery from PHP
<p>having trouble calling a Jquery function from within PHP. I'm getting a syntax error when I'm using the below code:</p> <pre><code>if(!empty($_POST['selectAGE'])){ $username = $_POST['selectAGE']; } if(empty($_POST['selectAGE'])){ echo '&lt;script type="text/javascript"&gt;' , '$("#selectAGE").prepend(...
php jquery
[2, 5]
1,119,397
1,119,398
Javascript: Clicking a wrapper element but not a child element
<p>I am writing some javascript (jQuery) that enables a div wrapped around a checkbox, when clicked, will toggle the checkbox element. However, the problem I'm running into is that when you click on the checkbox, it doesn't work because it's being toggled twice (at least I think that's what's happening). </p> <p><a hr...
javascript jquery
[3, 5]
5,590,808
5,590,809
accessing ASP.NET controls in Javascript
<p>I have following Javascript line in my ASP.NET web app:</p> <pre><code>document.getElementById('&lt;%=myTextBox[0].ClientID %&gt;').value = "test"; </code></pre> <p>how can I access myTextBox elements? for instance I want to change 5th element of this server side array, I want to pass a server side parameter to my...
javascript asp.net
[3, 9]
3,481,191
3,481,192
Javascript in ASP.NET: Conditionally making href/http request?
<p>I'm really new to ASP.NET and javascript so I'm rather lost on how to do a lot of things. But what I really need to do right now is this:</p> <p>The website I'm working on has a link that makes makes an http request, and is located inside a grid, as such:</p> <pre><code>&lt;a target="_blank" href='&lt;%# Eval ( "...
javascript asp.net
[3, 9]
5,330,845
5,330,846
How can I create subdomains on my main domain?
<p>As you all know few sites offer feature which let you specify what type of url you would like to have. Mostly they are of type:</p> <pre><code>ABC.somedomain.com DEF.somedomain.com </code></pre> <p>(Mostly these sites are blog/genealogy site.)</p> <p>I do not quiet understand how does it all work. Can you explain...
c# asp.net
[0, 9]
4,398,475
4,398,476
smtp web.config configuration and usage
<p>I have the following problem:</p> <p>Using asp.net C# and calling several places in code to send email to the user.</p> <p>However the from address in different sections of the code is different, and I have only one email address configured in web.config. This causes email sent from non-configured email addresses ...
c# asp.net
[0, 9]
6,018,945
6,018,946
Javascript/jQuery to resize randomly the pictures on load?
<p>Instead of creating thumbnails for my images, I would like to show the original images in my page. For viewing purposes, I still need to resize these images but instead of adding a <code>width:200px</code> on them, I want to display each image in a div container but with size randomly chosen from three choices.</p> ...
javascript jquery
[3, 5]
1,172,371
1,172,372
Java game: temporarily draw image based on int field
<p>I'm new to <code>Java</code> and am making a game for <code>Android</code>.</p> <p>I have a score counter in my game, and when the counter reaches a certain number I want a message to flash on the screen letting the player know they've reached level 2, etc. </p> <p>All the other elements of <code>nextLevel</code> ...
java android
[1, 4]
5,657,590
5,657,591
Android LinearLayout get views/rows that are on the screen
<p>Let's say I have a <code>LinearLayout</code> set to vertical and i've added 100 views to it each view is 50dp high. A user is going to scroll and fling up and down on that <code>LinearLayout</code>.</p> <p>I need to know the index numbers of the views that are on the screen. i.e if they fling down to the middle an...
java android
[1, 4]
4,327,330
4,327,331
Getting attr value and
<p>Here's what I'm trying to do:</p> <p>I make a GET request with jquery, and need the response.</p> <p>In the response there is a dynamic variable that contains an array of values where I need to get a single value </p> <pre><code>$.ajax({ type: "GET", url: "http://site.com", suc...
javascript jquery
[3, 5]
3,914,997
3,914,998
Execute HTML5 data- string as JavaScript (without eval)?
<p>I have the following div:</p> <p><code>&lt;div id="foo" data-callback="function(){console.log(1)}"&gt;&lt;/div&gt;</code></p> <p>I want to be able to execute the div's callback string as a JavaScipt function like this:</p> <p><code>($('#foo').data('callback'))()</code></p> <p>But this obviously won't work. Is th...
javascript jquery
[3, 5]
2,308,517
2,308,518
Events with and without delegates in ASP.NET
<p>In some ASP.NET examples i see that events are used with delegates <a href="http://www.dotnetjohn.com/articles.aspx?articleid=62" rel="nofollow">like this</a> and sometimes without them <a href="http://asp.net-tutorials.com/user-controls/events/" rel="nofollow">like this</a>.</p> <p>Please explain!</p>
c# asp.net
[0, 9]
474,358
474,359
Show/hide views with checkbox
<p>I want to show or hide some elements (textviews and edittexts) with checkbox. I set their visibility to gone in layout file. Showing them when user checks the box works, but the when user unchecks it, they don't hide. (android 1.5 and 1.6)</p> <p>My code:</p> <pre><code>cb=(CheckBox)findViewById(R.id.cek); cb.set...
java android
[1, 4]
855,258
855,259
Dynamically changing the jQuery sortable placeholder value
<p>How do I use an if statement in the jQuery sortable plugin to dynamically determine the placeholder class?<br/><br/> If the item is being dragged around in <code>#listA</code> then I want the placeholder class to be <code>.ImInListA</code><br/> If the item is being dragged around in <code>#listB</code> then I want t...
javascript jquery
[3, 5]
1,696,174
1,696,175
Android RelativeLayout change color onClick
<p>How do i change the color of a Relative Layout i use as a clickable on Click like the normal Button? Like i want a visual feedback the layout was pressed.</p> <p>I tried it with a selector bound to the background property like this:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;selector xmlns:and...
java android
[1, 4]
1,794,668
1,794,669
How to open .xlt file in .net?
<p>I have an .XLT file which i want to read/write in .net. Can it be opened using .net framework ? As far as i know XLT is Excel Template I have an .XLT file which is like a registration form wherein i want to fill the cells from .net .Is it possible? ...
c# asp.net
[0, 9]
1,506,253
1,506,254
How can i check if imageview is empty or not
<p>i have an application that has form and there is some fields the user should fill it ,i want to put the button "Next" disable until the user fill this fields. </p> <p>the fields is:(iamgeView, EditText,Spinner..)</p> <p>i know how to check the text Edit but how can i check if the user fill the image and spinner or...
java android
[1, 4]
1,383,415
1,383,416
WebView.getContentHeight() always returns 0
<p>I'm attempting to display an HTML string in a WebView named webDescription. Because this HTML can sometimes be lengthy, I want to limit the height of the WebView to a maximum dimension and allow the content to scroll within the view.</p> <p>I am using the following code to wait until the page finishes loading, chec...
java android
[1, 4]
3,343,112
3,343,113
Problem with at sign in div name
<p>I have a page which has some divs. Each div id starts with the word divfor and have a suffix after that. Like divforjohn, divforjim ... etc. These suffixes come from database.</p> <p>My problem is when i try to load something in that div it creates problem if it have the @ sign in it. So, if I do something like bel...
javascript jquery
[3, 5]
5,545,763
5,545,764
How can I change time format of TimePickerDialog dynamically?
<p>I have a button, on click on the which the time format of a TimePickerDialog should change from 12 hours to 24 hours and vice versa.</p> <p>I know I have to use onPrepareDialog(), but how can I change the time format inside onPrepareDialog ? Any help is appreciated!</p> <p>Thank you.</p>
java android
[1, 4]
4,124,768
4,124,769
Bug error: trying to set asp.net radiobuttonlist selected item from codebehind return an error
<p>When using the following code, this error is returned: <em>'rblPermisSejourA' has a SelectedValue which is invalid because it does not exist in the list of items.</em></p> <pre><code>&lt;asp:RadioButtonList ID="rblPermisSejour" runat="server" DataSourceID="EntityDataSourcePermisSejour" DataTextField="Libelle" DataV...
c# asp.net
[0, 9]
5,296,732
5,296,733
Programmatic RelativeLayout
<p>I'm attempting to programmatically add several Tiles which extend from TextViews into a RelativeLayout.</p> <p>My code is as follows.</p> <pre><code> RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); for (int i = 0; i &lt; characters...
java android
[1, 4]
621,238
621,239
Calling dynamic jQuery plugin with dynamic parameters in Javascript
<p>Suppose we need to dynamically construct plugin calls such as </p> <pre><code>$('#myDiv').myPlugin({a:'a',b:'b'}); </code></pre> <p>will be something like:</p> <pre><code>function funcCallBuilder(selector, func, opts){ //dynamically construct plugin call here } </code></pre> <p>using:</p> <pre><code>funcCallB...
javascript jquery
[3, 5]
4,041,992
4,041,993
Android java Finding a location and tapping there
<p>So, I used this code</p> <pre><code> public void loadLevel(float x, float y) { if(PopUpsGone == true) { if(x &gt; 106 &amp;&amp; x &lt; 243 &amp;&amp; y &gt; 375 &amp;&amp; y &lt; 465) { Toast.makeText(getApplicationContext(), "1", Toast.L...
java android
[1, 4]
1,783,055
1,783,056
Memory leack caused by executing "su"
<pre><code>Process process = Runtime.getRuntime().exec("su"); </code></pre> <p>When running above command on <strong>rooted</strong> phone everything works fine</p> <p>But when i try same code on <strong>non-rooted</strong> device its causing memory leak, i can see multiple instances of my app in task manager and the...
java android
[1, 4]
2,095,098
2,095,099
delete record in jqgrid in asp.net
<p>i want to delete a record in jqgrid. for this i have the image and when the user clicks on this the record is getting deleted.but i want to show the confirm box and when true then only the record should get deleted. so any one can tell how to call javascript in jqgrid. my jqgrid is jQuery(document).ready(function(...
asp.net jquery
[9, 5]
4,892,404
4,892,405
javascript string remove a character at position X and add to start
<p>If I have a string and a number:</p> <pre><code>var str='Thisisabigstring'; var numb=7; </code></pre> <p>I'm trying to remove the character at position <code>'numb'</code> from the string and then put it at the beginning of the string. </p> <p>Trying for output like:</p> <pre><code>'aThisisbigstring'; </code></...
javascript jquery
[3, 5]
369,556
369,557
Getting window height with jquery
<p>So basically, I want a div called #content to have a css top value of 200px if the browser height is less than 440px. However, this seems to not be working. What am I doing wrong?</p> <pre><code>var boh = $(window).height(); var bohi = parseInt(boh); if(bohi &lt; 440) { $("#content").css("top","200px"); } else ...
javascript jquery
[3, 5]
3,371,613
3,371,614
Problem with jQuery mouseleave firing when container has select box
<p>I have a two containers -- one is nested inside of another. When I hover over the parent, I want the child container to appear. When I mouseout, I want the child container to fadeout. The problem I'm having is the child container has a form that contains a "select box". When the user selects the select box -- the m...
javascript jquery
[3, 5]
5,016,766
5,016,767
Dropdownlist data binding inside detailsview in asp.net
<p>I have detailsview that will be used to edit customer records. Inside this detailsview, I have a dropdownlist that shows list of countries.</p> <p>I have a table called CountryList that will populate list of countries to the above dropdownlist.</p> <p>User can edit and save data without any issue.</p> <p>But, ass...
c# asp.net
[0, 9]
575,929
575,930
dynamically create a row of text box and label while click on add button using asp.net
<p>In my Table in Every row I had label and text box.in page load I show 3 text boxes and 3 labels.But When I click Add more button Every click we need create one label and One text box Dynamically...By Using Asp.net ,C#.net please help me I am stuck here.</p>
c# asp.net
[0, 9]
537,945
537,946
how to access parent window object using jquery?
<p>How to acess parent window object using jquery?</p> <p>This is my Parent window variable , I want to set its value after closing child window .</p> <pre><code>$('#serverMsg').html('some text here'); </code></pre>
javascript jquery
[3, 5]
5,971,922
5,971,923
Retrieve size of background image after scaling with jQuery?
<p>I have the following simple code to get me the background-image dimensions, but it grabs the size of the original image, not the scaled one I have in my div. I want to get pixel dimensions after scaling, is there any way to do that?</p> <pre><code>var actualImage = new Image(); actualImage.src = $("#chBox").css('ba...
javascript jquery
[3, 5]
3,158,161
3,158,162
change src image onload
<p>script:</p> <pre><code> function SetProductImageLeft (img,idProduct){ var address="Image/ProductImage/"+id+".png"; $(img).attr('src', address); } </code></pre> <p>html:</p> <pre><code>&lt;img onclick="alert();SetProductImageLeft(th...
php javascript jquery asp.net
[2, 3, 5, 9]
2,901,673
2,901,674
JQuery not removing added element
<p>What I want to do is add and remove list items. I have got it to add new items to the list and I can remove existing ones but not the ones that have been added. It seem like it would work but it doesn't. Any help would be appreciated! Here the code: </p> <p><strong>JQuery:</strong></p> <pre><code>&lt;script type=...
javascript jquery
[3, 5]
1,632,545
1,632,546
Automatically check checbox when submitting a form
<p>I have a form with a check box and a submit button. I would like the checkbox to be checked automatically when I submit the form.</p> <p>How can I do that with jquery or javascript?</p>
javascript jquery
[3, 5]
4,058,266
4,058,267
ProgressDialog not responding
<p>Hello guys why when i add ProgressDialog it become not responding</p> <pre><code> ProgressDialog dialog = ProgressDialog.show(AppsInspectorActivity.this, "", "Scanning package " + pkgInfo.packageName, true); dialog.setCancelable(true); dialog.show(); </code></...
java android
[1, 4]
4,668,957
4,668,958
jquery delay only works on one element
<p>Im trying to fade in 3 divs all at the same time. They all have same class .box but only the first on fades in?</p> <p>CSS:</p> <pre><code>.box{display:none} </code></pre> <p>JS:</p> <pre><code>$(".box").delay(1800).fadeIn(1000); </code></pre> <p>HTML:</p> <pre><code>&lt;div class="box"&gt;ONE&lt;/div&gt; &lt;...
javascript jquery
[3, 5]
2,606,883
2,606,884
Accessing child elements in jquery
<pre><code>&lt;div id="main"&gt; &lt;div id="1"&gt; &lt;div&gt;contents..&lt;/div&gt; &lt;div&gt;contents..&lt;/div&gt; &lt;/div&gt; &lt;div id="2"&gt; &lt;div&gt;contents..&lt;/div&gt; &lt;div&gt;contents..&lt;/div&gt; &lt;/div&gt; &lt;div id="3"&gt; &lt;div&gt;contents..&lt;/div&gt; &lt;div&gt;...
javascript jquery
[3, 5]
1,886,182
1,886,183
Response is not available in this context?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/8586201/response-is-not-available-in-context-how-to-solve-it">Response is not available in context? How to solve it?</a> </p> </blockquote> <p>I want to sent a pdf file to client as attachement. I try to use Res...
c# asp.net
[0, 9]
5,957,297
5,957,298
code of website which can create user page after sign up in asp.net 4.0
<p>I am making a website which can have members page. That is when a new member sign up a new page get generated where he can update his information just like Facebook.</p> <p>I want the code just like facebook where user gets registered and a new profile page is generated and when that same member log in other time h...
c# php asp.net
[0, 2, 9]
433,055
433,056
How to pass javascript object from one page to other
<p>I want to pass javascript object from one page to other page so anyone can tell me how to do it?</p> <p>Is that possible to do so using jQuery?</p>
javascript jquery
[3, 5]
2,062,982
2,062,983
fadeOut -> fadeIn doesn't work properly
<p>JS code:</p> <pre><code>var forma = $('form#mali_oglas'), pomoc = $('div[role=pomoc]'), div = $('.mali_oglas_pomoc'), input = forma.find('input, textarea'); input.on('click', function(){ var name = $(':input:focus').attr("name") pomoc.fadeOut('fast', function(){ ...
javascript jquery
[3, 5]
138,040
138,041
Adjusting jQuery script to add height to parent element
<p>I'm using Soh Tanaka's script to toggle open and closed div content in the accordion style.</p> <pre><code>&lt;script language="javascript" type="text/javascript"&gt; $(document).ready(function(){ //Hide (Collapse) the toggle containers on load $(".toggle_container").hid...
javascript jquery
[3, 5]
2,806,630
2,806,631
Save Canvas image (Post the data string to PHP)
<p>I'm looking to learn Javascript and have been wanting to for a while, I got a little tutorial on how to create a HTML5 Canvas drawing application, I'm trying to modify it so I can save the image to my MySQL database. So far, the code below simply redirects to my PHP file and does have the code I'd like, but it's a l...
php javascript
[2, 3]
6,016,482
6,016,483
jQuery document.ready vs pageLoad
<p>I've picked up an existing project from another developer and ive noticed in the code that they are executing js code within three different event handlers...</p> <pre><code>function pageLoad() { //execute code } $(document).ready(function() { //execute code }); $(function() { //execute code }); </code></pre> <p...
javascript jquery
[3, 5]
5,798,695
5,798,696
How to Add File Upload Control in TableCell using C#
<p>I am creating the grid view in code behind using TableCell and GridViewRow</p> <p>The data is fetched from the database table.</p> <p>My code is : </p> <pre><code>using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Syste...
c# asp.net
[0, 9]
3,320,373
3,320,374
ASP.NET relative path
<p>I have an ASP.NET project I'm currently working on. There is a C# file (dbedit.cs) that is used to directly access and edit 2 XML database files. How can I create a relative path of the XML files (both in the same directory) to dbedit.cs? It needs to be portable so it can't be hard-coded in. dbedit.cs is also access...
c# asp.net
[0, 9]
1,085,423
1,085,424
JQuery DIalog and ASP.NET Repeater
<p>I have an ASP.NET repeater that shows a list of items with a delete LinkButton.</p> <p>I want to setup the Delete LinkButtons to show a JQuery Dialog for a confirmation. If the "OK" button is clicked, I want to do the postback.</p> <p>The obvious problem is that each LinkButton in the repeater will have it's own ...
asp.net javascript jquery
[9, 3, 5]
730,086
730,087
List view row pressed
<p>I have a list view with couple of items and i set this function get call when a row in the list view is clicked.</p> <p>I want to open new activity and send him an object from an array of objects. I have a problem with this line :</p> <pre><code>Intent i = new Intent(this, Item_Activity.class); </code></pre> <p>b...
java android
[1, 4]
761,424
761,425
JavaScript rollover image gallery not working in Chrome or IE
<p>I set up a small image gallery that functions with JavaScript Rollovers. I have also added a bit of jquery to augment the images. My problem is that everything works perfectly in Firefox, but not in IE or Chrome. Everything will display in IE and Chrome, but when you click on a thumbnail, the large image won't po...
javascript jquery
[3, 5]
2,865,677
2,865,678
how do listeners in java work
<p>I would like to know if it is possible to create a listener to a listener. For example if I have a listener for a button, can I create a listener to that listener such that once the button is pressed the listener of the button listener would be notified.</p> <p>My other concern is if I have a function call which ha...
java android
[1, 4]
2,664,844
2,664,845
how to get value of a #t=querystring in asp.net?
<p>I use Request.QueryString["var"] to pull the value of <a href="http://test.com/test.aspx?var=test" rel="nofollow">http://test.com/test.aspx?var=test</a> into a string</p> <p>the same thing doesn't work for test.aspx#var=test</p> <p>how can I get it from that version of a querystring?</p>
c# asp.net
[0, 9]
5,699,818
5,699,819
How can I detect when the user is leaving my site, not just going to a different page?
<p>I have a handler for onbeforeunload</p> <pre><code>window.onbeforeunload = unloadMess; function unloadMess(){ var conf = confirm("Wait! Before you go, please share your stories or experiences on the message forum."); if(conf){ window.location.href = "http://www.domain.com/message-forum"; } } </code></...
javascript jquery
[3, 5]
4,589,288
4,589,289
Random colored Text jquery
<p>I want to type a block of text into a div and have every word separated by a space, and/or comma be a different color of the rainbow, except for black or white. How would I do this?</p>
javascript jquery
[3, 5]
4,132,841
4,132,842
Android Add 7.5 hours to a specific date
<p>In my Android application, I have 3 spinners for Hour/Minute/ and PM or AM. I'd like to add 7.5 hours in that to get the needed time for the user to sleep. This android application of mine is a calculator of a user's sleep. For example, I'd like to wake up at 7:00 AM. BY 11:15 PM you should now be sleeping. Please g...
java android
[1, 4]
381,476
381,477
Writing in files ASP.NET C# and NOT locking them afterwards
<p>I am getting this error: The process cannot access the file (...) because it is being used by another process. I have tried to use <code>File.WriteAllText</code>; </p> <pre><code>StreamWriter sw = new StreamWriter(myfilepath); sw.Write(mystring); sw.Close(); sw.Dispo...
c# asp.net
[0, 9]
2,132,795
2,132,796
How do i get domain url without using httpcontext.current
<p>How do i get domain url without using httpcontext.current because i am using global.asax directly there is no way to have an access current context</p>
c# asp.net
[0, 9]
3,028,499
3,028,500
Gridview template Javascript databinding
<p>I have a gridview. I want to bind something like:</p> <pre><code>&lt;asp:TemplateField //stuff&gt; &lt;ItemTemplate&gt; &lt;asp:Label ID="lblEx" runat="server" text='&lt;%# SomeJavascriptFunction( Eval("BOUND_FIELD_FROM_DB") ) %&gt;' &gt;&lt;/asp:Label&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; </...
javascript asp.net
[3, 9]
4,182,819
4,182,820
How to show popup window when cookie expires using forms authentication in asp.net
<p>I have to redirect to another page in another application. How to show popup window when cookie expires using forms authentication in asp.net so that before redirect to another page. i.e. In which http: module should I inject logic as cookie is expired and redirect to another application page.</p> <p>Thanks in adva...
c# asp.net
[0, 9]
407,737
407,738
foreach statement (get string values)
<p>Can someone please help me out? My code for splitting the strings is working however, i still need to use the splitted string my page. How can i achieve this? Here's my current code</p> <pre><code> private void SplitStrings() { List&lt;string&gt; listvalues = new List&lt;string&gt;(); listva...
c# asp.net
[0, 9]
1,874,314
1,874,315
HttpHandler not rewriting
<p>I am writing a simple HttpHandler for URL rewriting, but I'm hitting a brick wall.</p> <p>I have created a HttpHandler class that's really simple just to test things:</p> <pre><code>public class HttpHandler : IHttpHandler { public void ProcessRequest(HttpContext context) { context.RewritePath("defa...
c# asp.net
[0, 9]
2,207,299
2,207,300
Validation with specfic input types generated from an XML
<p>I am in the midst of trying to come up with the best way for some validation within a generic MVC based XML which outputs the following.</p> <pre><code>&lt;input name="xxxx" value="xxxx" ValidationType="Email" IsRequired="True" /&gt; </code></pre> <p>Basically if things contain certain elements, we validate it, i...
javascript jquery
[3, 5]
2,778,448
2,778,449
Program for printing
<p>I want to write a program for printing stuff on a paper, roughly what commands or classes do i need to use in c++ or php to get me started ?</p>
php c++
[2, 6]
433,879
433,880
detecting a user-modified vs a js-modified input value
<p>I have 1 input that requires two different type of methods to be called when the input value is changed 1st by javascript and 2nd by the user. </p> <p>Any clues on how I could differentiate these types of changes to the input?</p>
javascript jquery
[3, 5]
3,696,189
3,696,190
when do you need to use $(document).ready()?
<p>I'm curious what situations exactly require the use of jquery's $(document).ready() or prototype's dom:loaded or any other variant of a handler for this event.</p> <p>In all the browsers i've tested, it's entirely acceptable to begin interacting with html elements and the DOM immediately after the closing tag. (e.g...
javascript jquery
[3, 5]
4,722,882
4,722,883
Where to keep a querystring parameter in session?
<p>Users will get to my site using a specific parameter, e.g. : <a href="http://www.mysite.com/whatever/?keepTrackOfThisValue=foo" rel="nofollow">http://www.mysite.com/whatever/?keepTrackOfThisValue=foo</a> or <a href="http://www.mysite.com/who/cares/?keepTrackOfThisValue=bar" rel="nofollow">http://www.mysite.com/who/c...
c# asp.net
[0, 9]
3,902,979
3,902,980
if statement in gridview template filed
<p>I have a gridview. its data source is a datatable that is loaded from the database. In this gridview, i have a template column. The content of this column is not directly pulled from the database but instead, i use the id of the current item to make a name and look for that name in a directory of images. The templat...
c# asp.net
[0, 9]
3,646,986
3,646,987
How to load parsed aspx into string variable
<p>I am attempting to load a parsed aspx file into a string. The reason for this is because I have a page with a fair amount of html on it which also has sections that need to be processed in order to insert the correct information. This page then needs to be displayed as a confirmation page as well sent in a confirmat...
c# asp.net
[0, 9]
4,877,123
4,877,124
Get link if user selected text is contained within a link
<p>Okay, so I am trying to figure out how to get a link href if the user has highlightened text is contained within a text...</p> <p>So for example if the following is a link</p> <pre><code>&lt;a href="http://www.google.com"&gt;Find us on Google&lt;/a&gt; </code></pre> <p>and the user hightlights the text "Google"</...
javascript jquery
[3, 5]
23,094
23,095
How to get document height and width without using jquery
<p>How to get document height and width in pure javascript i.e without using jquery. I know about $(document).height() and $(document).width(), but i want to do this in javascript.</p> <p>I meant page's height and width.</p>
javascript jquery
[3, 5]
5,601,376
5,601,377
HtmlEncode List<string> values
<p>I have cell values saved in List like this</p> <pre><code>public List&lt;string&gt; Cell { get; set; } </code></pre> <p>I want do htmlEncode to each value of this list. can anyone help me with this??</p>
c# asp.net
[0, 9]
5,085,496
5,085,497
How do I find out the first digit of a textbox value in asp.net/javascript?
<p>I would like to find the first digit of the value in a textbox in order to execute some conditional code. I can get the textbox by using getElementById, and would like to execute my code if the first digit contained within the textbox is 7, 8, or 9.</p> <p>How can I test to see if the first digit of my textbox is b...
asp.net javascript
[9, 3]
2,903,732
2,903,733
jQuery to Select elements that does not contain a certain value
<p>I am using the following jQuery code to count the number of text fields that have a value that is the same as its title attribute.</p> <pre><code>$(".textfield").val( $(".textfield").attr('title') ).size(); </code></pre> <p><strong>Problem:</strong> How do I count the number of text fields that <strong>do not</str...
javascript jquery
[3, 5]
1,737,561
1,737,562
Create audio tag in html4 issue
<p>I am trying to create audio tag in html4.</p> <p>I have</p> <pre><code>var audioPlayer=document.createElement('audio'); var audioSource=document.createElement('source'); audioSource.src=audioFileName; audioSource.type="type='audio/mp3'"; audioPlayer.appendChild(audioSource); audioPlayer.width=32...
javascript jquery
[3, 5]
824,032
824,033
remove classes added by Jquery
<p>I am working on an accordion and Jquery is adding classes, I want to stop jquery to add some classes. how can I do that? Below is the code but Jquery keeps on adding .ui-state-default to some visited elements.</p> <pre><code>if($check.hasClass('.ui-state-default')){ $(this)('.columns &gt; span').removeC...
javascript jquery
[3, 5]
2,982,072
2,982,073
Android: Two ScaleAnimations performed sequentially
<p>I want to animate a scale an ImageView vertically, wait, then perform another scale on the same ImageView. I've simplified the code below but it's essentially what I want to do:</p> <pre><code>ScaleAnimation animate = new ScaleAnimation(1,1,1,2); animate.setDuration(1000); animate.fillAfter(true); ScaleAnimation a...
java android
[1, 4]
3,204,724
3,204,725
Scroll images over and over again without having to click the next or previous button
<pre><code>&lt;script&gt; $(document).ready(function () { var speed = 600; $('#navPrev').click(function () { $('#carouselul').animate({ marginLeft: '-280px' }, speed); }); $('#navNext').click(function () { $('#carousel ul').animate({...
javascript jquery
[3, 5]
3,859,819
3,859,820
Why is $ undefined when jQuery is loaded?
<p>I have this in the head of a page:</p> <pre><code>&lt;script type="text/javascript" src="scripts/jquery-1.9.1.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(function () { $("#ListBoxSegment").change(function () { GetAccountOpportunityTypes($(this).val()); }); ...
javascript jquery
[3, 5]
932,129
932,130
Using unbind, I receive a Javascript TypeError: Object function has no method 'split'
<p>I've written this code for a friend. The idea is he can add a "default" class to his textboxes, so that the default value will be grayed out, and then when he clicks it, it'll disappear, the text will return to its normal color, and then clicking a second time won't clear it:</p> <pre><code>$(document).ready(functi...
javascript jquery
[3, 5]
2,500,381
2,500,382
Deserialize javascript objects to generic list in c# handler
<p>Im creating some javascript items in a loop</p> <pre><code>var licenseList = {}; $($licenses).each(function (index) { var license = {}; var editedValues = {}; license.PRODUCT_KEY = $(this).parent('div.licensewrapper').data('productkey'); $(this).fi...
c# javascript jquery asp.net
[0, 3, 5, 9]
3,388,020
3,388,021
Repeter With multiple data source of type class
<p>Hi I have 5 different classes. And using single repeater I want to populate the each class data without writing any data binding code except assigning DataSource and DataBinding. the header values should be populated based upon the class members. I think I can use reflection. But I need clear idea. And if i use refl...
c# asp.net
[0, 9]
3,639,081
3,639,082
Is there a way where I can hold all potential arguments in an array?
<p>Hey again (on a roll today).</p> <p>In jQuery/Javascript is there a way of effectively having this:</p> <pre><code>var myArray = [ 'zero', 'one', 'two', 'three', 'four', 'five' ]; //get input from user if (inputFromUser == anythingInArray) { alert("it's possible!); } </code></pre>
javascript jquery
[3, 5]
5,097,233
5,097,234
How to check if value from a cell in a column is !=NULL?
<p>I'm trying on gridview updated to check if a cell from a certain column is != NULL ( to check if the user wrote something into the cell)</p> <p>My problem is I don't know how to get the "x column" value from cell.</p>
c# asp.net
[0, 9]
5,724,513
5,724,514
Issue comparing string with datetime in javascript
<p>script is ---</p> <pre><code> function TimeSpentForFutureDate() { var toDate = new Date(); toDate.setMinutes(0); toDate.setSeconds(0); toDate.setHours(0); toDate.setMilliseconds(0); //Here after selecting future date also, this condition is failing.The textbox // containing a f...
javascript asp.net
[3, 9]
123,880
123,881
Load the document into the iframe jquery
<p>I want to access the currently loaded document of an iframe and link that document to another iframe, for this I tried:</p> <pre><code> $("#if1").attr("src", $("#if2").attr("src")); </code></pre> <p>But this loads the document again. I want to access the document already loaded in <code>#if1</code>. How can I do...
javascript jquery
[3, 5]
2,984,089
2,984,090
Doctype issue using jquery plugin
<p>i am using jquery chart it works fine when i remove DocType on the page but it shows give error if i add doc type in the page Any help please Doctype is as follow</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; </code></p...
jquery asp.net
[5, 9]
2,911,337
2,911,338
Replace numeric value with another
<p>I have a span in my HTML as follows, which I am assigning the text from code behind:</p> <pre><code>&lt;span id="NewL1" visible="false" runat="server"&gt;&lt;span runat="server" id="NewL"&gt;&lt;/span&gt;&lt;/span&gt; </code></pre> <p>The text would be something like : "you have 3 notifications."</p> <p>I wan...
javascript jquery
[3, 5]
703,333
703,334
jquery swap images on click and hide then
<p>I'm trying to build a menu. OVer a canvas I load different images and position them using CSS. Currently I operate with SHOW / HIDE with a lots of code duplication. My questions are: - instead of just hidding an image, how can I change it on click with another one? and then again hide it, if I should click another b...
javascript jquery
[3, 5]
2,879,486
2,879,487
If less than double digits add 0, javascript
<p>Hopefully this makes sense,</p> <p>I have a javascript countdown on my page, when it drops down to single digits, such as '9 days' I need to append a 0 to the beginning. </p> <p>I'm not sure if this is possible with Javascript so thought I'd ask here, My current code im using is</p> <pre><code>&lt;!-- countdown -...
javascript jquery
[3, 5]