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
4,219,860
4,219,861
Remove JavaScript comments from string with C#
<p>I am trying to remove javascript comments (<code>//</code> and <code>/**/</code>) from sting with C#. Does anyone have RegEx for it. I am reading list of javascript files then append them to string and trying to clean javascript code and make light to load. Bellow you will find one of the RegEx that works fine with ...
c# javascript
[0, 3]
5,449,643
5,449,644
jQuery hint plugin and problem with $_POST
<p>I'm using <a href="http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/" rel="nofollow">remy sharp's hint plugin</a>. </p> <pre><code>&lt;input type="text" title="hint" name="names" class="input" /&gt; </code></pre> <p>But when I post the form without filling the fields, input still has </p> <pre><code...
php jquery
[2, 5]
5,347,286
5,347,287
Pause a running setInterval function?
<p>I have 4 functions running on setInterval (tscrolls) which just animate a div's top location every couple of seconds as soon as the document is loaded.</p> <pre><code>var intervalFunctions = [ tScroll1, tScroll2, tScroll3, tScroll4 ]; var intervalTimer = 3000; window.setInterval(function(){ intervalFunctions[inte...
javascript jquery
[3, 5]
3,747,999
3,748,000
Connecting to URL from iPhone and persisting php session
<p>I have an iphone app that sends and retrieves data from a php script.</p> <p>I would like to connect to that script once, save some data into a $_SESSION variable. Then on subsequent calls be able to retrieve the content of that $_SESSION vars.</p> <p>Is this possible?</p> <p>Thanks</p>
php iphone
[2, 8]
3,033,664
3,033,665
C# display pdf document in iframe in asp.net page
<p>how can i display pdf document in iframe in c# web page:i have a drowpdownlist linked with pdf files,what i need is when i select one item from this list ,iframe will populated with the corresponding pdf document</p>
c# asp.net
[0, 9]
1,281,472
1,281,473
Javascript - How to get number of characters in textbox and use substring to delete
<p>I want to get the number of characters in a textbox and use substring to remove characters if the number of characters is >= 255</p> <p>I have the following javascript:</p> <pre><code>&lt;script language="javascript" type="text/javascript"&gt; function CheckMaxLength(Object, MaxLen) { if (Object.v...
javascript asp.net
[3, 9]
1,693,641
1,693,642
get current user Asp. Net C#
<p>Is there is a way to get the current user in the <code>aspx</code> page,the page with the <code>html</code> definitions? (i know how to get it in the <code>aspx.cs</code> page)</p>
c# asp.net
[0, 9]
3,569,421
3,569,422
switch over tab previous data is coming
<p>I have added tab bar in my application with four tab like home stock etc .In that tab bar i have used nested activity using activity group for all tabs .The home page will default show to the user.If I swith stock tab I am calling stock activity group class from stock activity class .In stock activity I have edittex...
java android
[1, 4]
758,802
758,803
Passing Arraylist between activities? Using Parcelable
<p><strong>EDIT:</strong> I've updated my question considerably and am now going with Parcelable as my method.</p> <p>I'm attempting to a pass an ArrayList from one activity to another. I've been reading around and can't seem to find any answers to my problem.</p> <p>I've got an <code>ArrayList&lt;SearchList&gt;</cod...
java android
[1, 4]
3,772,140
3,772,141
Change Font color of tr with jQuery after click on image
<p>I search for a way to change the font color of a tr with jQuery. There is an icon in the last cell of every tr. I want if I click it that the font color of the tr is changed. I used this:</p> <pre><code>$('#documentsTable tr').live('click', function(){ </code></pre> <p>but it is for clicking on the whole row. What...
javascript jquery
[3, 5]
3,681,692
3,681,693
Do I need to tell jslint about functions that have not yet been defined inside another function?
<p>I have code like this:</p> <pre><code>function dialog($link) { "use strict"; function doDialogAjax() { $.ajax({ cache: false, url: url, dataType: 'html' }) .done(onDialogDone) .fail(onDialogFail); } function onDialogDone(data...
javascript jquery
[3, 5]
4,853,516
4,853,517
I want to refer to a non-final variable inside an inner class defined in a different method
<p>I'm writing an Android app, in which I have several buttons laid out in a grid. I want to set the onClick method of each button, so I wrote this:</p> <pre><code>for (int i = 0; i &lt; button.length; i++) { for (int j = 0; j &lt; button[0].length; j++) { button[i][j].setOnClickListener(new View.OnClickL...
java android
[1, 4]
278,195
278,196
How to hide browser's menu?
<p>I am developing an ASP.NET application for an online quiz test. The set of questions would be randomly selected from a pool of questions. The application works fine, but I want to hide the browser menu option (so that user cannot save or print the test) when the quiz page is shown. I do not want to open a new popup ...
asp.net javascript
[9, 3]
1,367,688
1,367,689
Android: keep alert in front, so that the user must respond
<p>My application shows an alert that the user must respond to before continuing to do other things. I'm trying to figure out the best way to implement this. Using an Activity for the alert isn't quite working.</p> <p>In my current implementation, the alert is activity (A). When another activity from the same package ...
java android
[1, 4]
4,709,255
4,709,256
Example code in both android and iphone?
<p>I'm working on an app that I'm trying to convert from iphone to android using phonegap. Most of it is thankfully done in js, but there are still some classes written in objective-C (appDelegate, myTapgestureRecognizer) that I'm uncertain how to transfer over to android SDK correctly. I was hoping someone might know ...
android iphone
[4, 8]
507,773
507,774
microsoft chart control (VS 2008) - how to show the value when cursor is moved in the chart area - just like yahoo finance shows on any ticker symbol
<p>I have a simple chart control on my form. it displays data fine in X and Y axis. On X axis, i have time period (1 day,1 week, to 30 Years- total of 27 points on x axis) and Y axis has interest rate.</p> <p>when the cursor is moved in the chart area, I want to show the exact value of Y axis. Just like yahoo finance ...
c# asp.net
[0, 9]
4,580,506
4,580,507
Why is this POST variable sent via AJAX Null? (jquery/php)
<p>This javascript is for a "load more" functionality. That grabs a fixed number of elements from load.php when a button #moreg is clicked. </p> <pre><code>$(function(){ $("#moreg").click(load); var countg = -1; load(); function load() { var num = 1; countg += num; $.post( "l...
php javascript jquery
[2, 3, 5]
3,739,256
3,739,257
Focus on element triggers browser menu
<p>I'm use jQuery 1.9. When I programmatically set focus on input element (textbox) in Firefox or any other browser and press T it activates Tool menu in menu browser (similiar is for B(Bookmark) and so on). When I try to write K... text starts inside focused input element. Element has a focus, I see cursor. When I cli...
javascript jquery
[3, 5]
4,858,985
4,858,986
jQuery in console not working properly
<p>I'm using the jQueryify bookmarklet on a page so that I can call jQuery functions from the console. But everytime I invoke a jQuery function on a selected object, I get the error: </p> <pre><code>"TypeError: jQuery("li")[0].children[0].html is not a function [Break On This Error] jQuery('li')[0].children[0].html();...
javascript jquery
[3, 5]
3,740,689
3,740,690
clearInterval() Undefined Error After Using setInterval()
<p>I know this isn't supposed to be inline, but YUI library's dialogs force me to. My issue is that whenever I hover over this div, the margin-left scroll activated but it does not stop when I move the mouse out of the div. The JS console reports that:</p> <blockquote> <p>Uncaught ReferenceError: timerID is not defi...
javascript jquery
[3, 5]
3,165,894
3,165,895
What is the best way to accumulate items' IDs before sending them to the server?
<p>I have a ListView its item is selectable. I want after select some items (Client side using JQuery) to send their IDs the selected elements to the server for saving them.</p> <p>What is the best way to accumulate them in the client side?</p> <p>Is it using a Hidden field with a seperator between IDs ?</p> <p>Or i...
javascript jquery
[3, 5]
1,701,220
1,701,221
How I can forefully fire the rowcommand event when grid data is changing on every postback?
<p>My requirement is to refresh the data on every postback but if I do so my rowcommand event doesnot get fired on link button click in gridview? How I can achieve it?</p> <p>I am changing the row order using jquery and saving the new order in hidden variable. on page postback I get the new order from hidden variable ...
jquery asp.net
[5, 9]
3,687,458
3,687,459
How to distinquish concurrent progress bar requests on server side in asp.net
<p>I implemented progress bar to show completing status to users when video processes in background. it works well on single instance. but mixed it up when two concurrent video process started.</p> <p>When two video processes initiated by two different users at same time, both users will see mixed progress status some...
c# asp.net
[0, 9]
4,319,803
4,319,804
Tab to beginning of text input
<p>I have a login form:</p> <pre><code>&lt;form&gt; &lt;div class="username"&gt; &lt;label for="username"&gt;Email&lt;/label&gt;&lt;br /&gt; &lt;input type="text" class="field" value="Enter your email" name="email" id="id_email"&gt; &lt;/div&gt; &lt;div class="password"&gt; &lt;labe...
javascript jquery
[3, 5]
986,409
986,410
Why does the click function not work after I change the class of a button?
<p>I have a set of buttons(previous &amp; next) that the user clicks.</p> <pre><code>&lt;a id="prev_btn" class="prev_1" href="#"&gt;Previous&lt;/a&gt; &lt;a id="next_btn" class="next_1" href="#"&gt;Next&lt;/a&gt; </code></pre> <p>When the user clicks on the next button(.next_1), it changes the class name of the butto...
javascript jquery
[3, 5]
660,767
660,768
jQuery function not working with another function
<p>I have two functions that loads on document ready. They work fine when they are ran individually. But when both functions are called on the same document ready js. One of them(second one) doesn't work. Please help. The files are set up at: <a href="http://jsfiddle.net/rexonms/FXPhu/15/" rel="nofollow">http://jsfiddl...
javascript jquery
[3, 5]
5,850,339
5,850,340
Converting binary data to image in C#
<p>I was stuck with how to retrieve an image from MySQL database and convert it from Binary format to Bitmap Image to display it in <code>ASP:Image</code> or <code>HTML Image</code>. I am able to upload image but its being converted to Binary data and I couldn't understand how to convert it back to Bitmap format :(</p>...
c# asp.net
[0, 9]
3,531,226
3,531,227
Display Fees details from database In Table Format
<p>I am using a website(C#) for inserting fees details for I std to V std into a database... next i want to display in that details in next page as a table format which is mentioned below..... </p> <p>ClassName Class I ClassII ClassIII ClassIV ClassV</p> <p>TutionFees 1000 1000 1100 110...
c# asp.net
[0, 9]
4,856,669
4,856,670
Customer Validation ASP.Net C#
<p>I am having the same problem as someone else in this forum. My validation control is not firing...and not sure where I have gone wrong. Could someone please take a look and let me know what obvious error I have here...thanks</p> <p>I have set up a customer validator in my aspx page using the following:</p> <pre>...
c# asp.net
[0, 9]
5,782,562
5,782,563
How can I scale my font with different types of screen?
<p>I have made an Android application, but it must work on different types of screen, and I have done that too. But it is 1 thing - for creating scaling screen I use layout_weight and dp instead px. But how can I scale my fonts in .xml files? Thank you. </p>
java android
[1, 4]
2,691,819
2,691,820
JQuery: $.get is not a function
<p>I'm having a problem doing something very basic in jQuery. Can someone tell me what I'm doing wrong exactly?</p> <p>If I run the code below, the function $.get seems to be missing (getJSON and others missing too). But $ itself and other functions do exist, so I know JQuery is loading.</p> <pre><code>google.load(...
javascript jquery
[3, 5]
5,554,466
5,554,467
Single mechanism for reversible encryption in PHP and JS
<p>The problem arose to encrypt data transmitted between client and server using a key without using https (the key is transmitted separately, that's another story.) So. Are interested in the mechanism. I know that there is no built-in JS encryption functions, and PHP are many, but not all normal decode UTF8.</p> <p>Q...
php javascript jquery
[2, 3, 5]
944,020
944,021
Refactoring and DRYing up jQuery code
<p>What I'm doing is adding a class to all elements who have the same class name as the id I'm hovering over. For example when I hover some list item with the id of vowel, then all the span elements with the class of the name vowel get acted upon (adding a class).</p> <p>I can do that with no problems. But I want to d...
javascript jquery
[3, 5]
5,300,182
5,300,183
Exception class java.util.concurrent.RejectedExecutionException only on galaxy s3
<p>I am having problems with my live wallpapers but only on galaxy s3. I get the following error</p> <pre><code>java.util.concurrent.RejectedExecutionException: Task com.ls.fs.Wallpaper$MyEngine$1@418f2030 rejected from java.util.concurrent.ThreadPoolExecutor@418f1978[Shutting down, pool size = 1, active threads = 1, ...
java android
[1, 4]
1,642,116
1,642,117
Timer with multiple things to do
<p>I am making an android app which reminds people via notifications of events they have to do over the course of a day. The way I currently do this is have each event on a seperate timer using the Timer class. However, I don't think this is great way of doing things. Is there any way maybe to have just one timer which...
java android
[1, 4]
1,334,396
1,334,397
jquery display + delay strategy
<p>The following javascript displays the final result (instead of updating every second). How can I iterate through the result of the getJSON call, display that result, and delay until I display the next element?</p> <pre><code>function display(state) { for (var i=0; i &lt; state.length; i++) { $('#someDiv' + i...
javascript jquery
[3, 5]
3,569,606
3,569,607
get dimensions of an image on the web - avoid memory hog?
<p>Im getting some images from a webpage at a specified url, i want to get their heights and widths. I'm using something like this:</p> <pre><code> Stream str = null; HttpWebRequest wReq = (HttpWebRequest)WebRequest.Create(ImageUrl); HttpWebResponse wRes = (HttpWebResponse)(wReq).GetResponse(); str = wRes.GetRespon...
c# asp.net
[0, 9]
3,216,110
3,216,111
Get url without querystring
<p>I have a url like this :</p> <p><a href="http://www.somesite.com/mypage.aspx?myvalue1=hello&amp;myvalue2=goodbye">http://www.somesite.com/mypage.aspx?myvalue1=hello&amp;myvalue2=goodbye</a>.</p> <p>I want to get <a href="http://www.somesite.com/mypage.aspx">http://www.somesite.com/mypage.aspx</a> from it . Can you...
c# asp.net
[0, 9]
5,430,491
5,430,492
total up json data?
<p>[UPDATE]</p> <p>Thanks guys,final code:</p> <pre><code> var EUR_share_cost = 0; var USD_share_cost = 0; var GBP_share_cost = 0; var EUR_total_cost = 0; var USD_total_cost = 0; var GBP_total_cost = 0; $.ajax({ url: '/producer/json/index/period/mont...
javascript jquery
[3, 5]
2,764,577
2,764,578
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,419,094
3,419,095
How to hide the button
<p>I write the some code in button event I used the javascript and call the button event it is working fine here my problem is i want hide the button i do this ways visible=false this time the button event is not firing enable =false this time also button event is not firing how can isolve this problemA</p>
c# asp.net
[0, 9]
5,425,843
5,425,844
how to wait until page redirect finishes
<p>I'm trying to do a redirect, then perform additional operations on the markup of the new page. How can I make sure that the additional stuff I want wait until the redirect is <strong>finished</strong>?</p> <pre><code>window.location.replace(url); //call additional stuff here </code></pre> <p>I'm hoping for somethi...
javascript jquery
[3, 5]
3,535,323
3,535,324
Fancybox image gallery with ratings and comments
<p>I have a photo website which gathers images from a folder with PHP, displays their thumbnails on a page and, when clicked, opens a fancybox (fancybox.net) to display the full image. I am pretty satisfied with the result but as users start posting, they start asking for new features, and problems come out since I'm n...
php jquery
[2, 5]
4,423,072
4,423,073
Using SimpleDateFormat in a for loop on a list of objects
<p>My app crashes whenever I try to do this:</p> <pre><code>for (CalendarEvent event : this.ListofEvents){ String myDate = new String(event.getDate()); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); try { theDat...
java android
[1, 4]
1,673,344
1,673,345
How to use boolean value returned by a method
<p>I just want to know how to use a boolean value returned from a method.This is the method which is returning the value:</p> <pre><code> public boolean hasConnection() { ConnectivityManager cm = (ConnectivityManager) MCQ.this.getBaseContext().getSystemService( Context.CONNECTIVITY_SERVICE...
java android
[1, 4]
958,512
958,513
Triggering Click Event on File Input with jQuery
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/793014/jquery-trigger-file-input">Jquery trigger file input</a> </p> </blockquote> <p>I'm developing an app that needs the user to specify a file from the very beginning. I would like to have the file input box ...
javascript jquery
[3, 5]
4,022,542
4,022,543
Can't append HTML code into one div by using jQuery
<p>I have one div id=userinfo</p> <pre><code>&lt;html&gt; &lt;head&gt;&lt;/head&gt; &lt;body&gt; &lt;div id=userinfo&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>And now I want to append something into this div, depending on the localStorage.</p> <pre><code>if (localStorage==0){$("#userinfo").append(...
javascript jquery
[3, 5]
2,213,786
2,213,787
Need some help on jQuery sliding box script to set the height equal to text
<p>I have updated the code I am working on here <a href="http://jsfiddle.net/dFfJm/" rel="nofollow">http://jsfiddle.net/dFfJm/</a></p> <p>At the first sliding box where there is only 1 line of text. On the second box there are 3 lines of texts.</p> <p>As you can see it does not look right, there is a large empty slid...
javascript jquery
[3, 5]
4,919,970
4,919,971
Calling C++ exe functions from C#
<p>I'm trying to monitor a running application written in C++ using a different C# application.</p> <p>In my C++ code I have defined an API:</p> <pre><code>_declspec(dllexport) //is this even possible when compiling an .exe? int getSomething(); </code></pre> <p>Is there a way to call this function from the C# code?...
c# c++
[0, 6]
4,887,189
4,887,190
Leonardo connectivity with Android
<p>I want to connect the Leonardo Arduino board to an Android device. Is there a library like the MAX3421 for use with the MEGA that is usable and provides AndroidAccessory connectivity for the Leonardo? </p> <p>Cheers, Doug</p>
android c++
[4, 6]
2,911,171
2,911,172
What is the correct string format of the datetime with milliseconds from JavaScript to C# code
<p>This will result to an error because C# variable testDate is different in format from the JavaScript variable testDate:</p> <p>jquery:</p> <pre><code>$.getJson url= "/Home/GetJasonData" testDate = '1/1/2009 10:01:01:123' </code></pre> <p>controller:</p> <pre><code>void GetJasonData(DateTime testDate) { } </code...
c# javascript
[0, 3]
1,944,141
1,944,142
Using string format for Url.Content doesn't work
<p>I have this little foreach statement in an ASPX page: </p> <pre><code>&lt;% foreach(string path in pathList) { %&gt; &lt;img src="&lt;%=Url.Content(string.Format("~/Content/Images/{0}", path))%&gt;" /&gt; &lt;% } %&gt; </code></pre> <p>I want that to display all images using <code>Url.Content</code> from the li...
c# asp.net
[0, 9]
3,399,166
3,399,167
MediaPlayer array causing null pointer in Android
<p>Can anyone see why I would be getting a NullPointerException with this code? The code is basically to create a MediaPlayer array so that I can loop through it and stop/start all of the mediaplayers at once. They are also linked to seekbars to control volume.</p> <pre><code>private MediaPlayer[] media; /** Called ...
java android
[1, 4]
4,795,097
4,795,098
Not allow more than 5 digits after decimal. in on javascript "OnKeyUp"?
<p>I have a javascript code for textbox that will put commas on in digits like (11,23,233)</p> <pre><code> mTextbox.Attributes.Add("OnKeyUp", "javascript:this.value=Comma(this.value);") function Comma(Num) { Num += ''; Num = Num.replace(',', ''); Num = Num.replace(',', ''); Num = Num.replace(',', '')...
asp.net javascript
[9, 3]
1,608,749
1,608,750
asp.net c# better way to Parse numbers and datetimes from query string then try/catch
<p>is there a better way then a try/catch to parse numbers and datetimes without crashing the page?</p> <p>if they are not valid numbers/datetimes they should be null.</p> <p>here is what I've got so far:</p> <p><code></p> <pre><code>long id = null; try{ id = Int64.Parse(Request.QueryString["id"]); }catch(Excep...
c# asp.net
[0, 9]
2,705,598
2,705,599
How to open rad window popup on click of link button
<p>I want to open popup on click of link button to edit the record. This my code.</p> <pre><code> protected void btnEdit_Click(object sender, EventArgs e) { LinkButton linkButton = sender as LinkButton; if (linkButton != null) { string buyerId = linkButton.CommandArgument.ToS...
c# asp.net
[0, 9]
2,929,695
2,929,696
JavaScript: Cut URL after nth slash
<p>I have URLs like</p> <pre><code>http://www.domain.com/dir/dir2/dir3/dir4/#tag </code></pre> <p>or</p> <pre><code>http://www.domain.com/dir/dir2/dir3/dir4 </code></pre> <p>Now I need to get only the url till dir3 and nothing after that… (or «everything till the sixth slash in the string»)</p> <pre><code>http://w...
javascript jquery
[3, 5]
2,470,426
2,470,427
Make Notification Div Fade Out When User Click Anywhere Outside The Notification Div
<p>I'm making website that have notification 'button'. When user click this button, notification div will appear at the bottom of the button.</p> <p>I want to make its behaviour like notifacation in facebook. the notification will disappear when user click anywhere outside the notification div element.</p> <p>So far,...
javascript jquery
[3, 5]
2,068,077
2,068,078
How to get attributes of container in jquery?
<p>How can I get attributes values from an container using jquery ?</p> <p>For example:</p> <p>I have container div as:</p> <pre><code>&lt;div id = "zone-2fPromotion-2f" class = "promotion"&gt; </code></pre> <p>here how can I get attribute id value using jquery and than how can I trim the value to get component inf...
javascript jquery
[3, 5]
3,715,527
3,715,528
what is the difference between CharSequence[] and a String[]?
<p>What is the difference between <code>CharSequence[]</code> and <code>String[]</code>?</p>
java android
[1, 4]
195,893
195,894
Access Javascript from Java
<p>I m trying to access JavaScript function from Servlet code. But I'm getting the error shown below. Here is the code:</p> <pre><code>out.println("&lt;FRAME src=\"javascript:parent.newWindow('" + URL+ "') \" scrolling=No noresize /&gt;"); </code></pre> <p>And this is the error that occurs in JavaScript:</p> <blockq...
java javascript
[1, 3]
3,419,191
3,419,192
Check if content in DIV has changed
<p>I'm loading some content inside a div with <code>setInterval</code>, and I don't want it to run everytime so I need to check if the content has changed from the last time it ran.</p> <p><strong>Here's what I'm currently using that's not working</strong></p> <pre><code>var auto_refresh = setInterval( function() { ...
javascript jquery
[3, 5]
5,543,549
5,543,550
Problem with jquery :not selector
<p>I'm having an issue trying to NOT select a tablerow with the function:</p> <pre><code>$("tr").click(function(e) { var row = jQuery(this) //rest of code left off }); </code></pre> <p>Basically it finds all tablerows and adds click functionality that will open a edit modal that has a row with textboxes that are po...
javascript jquery
[3, 5]
3,243,610
3,243,611
How to call Asp.Net Button click event when Browser Close or(ALT+F4)
<p>I need to call Asp.net button click event When browser is manually closed or(ALt+F4). I have tried the below,</p> <p>First of all, create a new ASP.NET page in your favorite IDE and add an instance of the ScriptManager to it. Make sure you configure the ScriptManager to enable Page Methods. Listing 1</p> <pre><c...
c# asp.net
[0, 9]
4,717,398
4,717,399
JQuery Element Display / Hiding and Control Flow
<p>I am working on displaying a progress bar using JQuery during a long running function. My plan is to simply show the div containing the progress bar before calling the function, and then hiding the div after the function is finished. The following code example demonstrates what I am trying to accomplish.</p> <pre><...
javascript jquery
[3, 5]
2,229,990
2,229,991
Override all requests from javascript
<p>I have an asp.net application. I need to implement that every request to the server for a page will contain an additional parameter in query string. My idea was to capture all reqests in javascript and add this parameter.</p> <p>I might use jQuery selector for every link and change it href and override jquery ajax ...
javascript jquery asp.net
[3, 5, 9]
4,466,329
4,466,330
Given a start and end date, create an array of the dates between the two
<p>Right now, I have this on my page:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function () { var days = [ { Date: new Date($('#hfEventStartDate').val()) }, { Date: new Date($('#hfEventEndDate').val()) } ]; }); &lt;/script&gt; &lt;asp:Hidden...
javascript jquery
[3, 5]
4,049,978
4,049,979
What's the Java equivalent to C++'s for_each template?
<p>In the following code you're able to apply any Function f (e.g., add, subtract, etc.). How do I do that through Java?</p> <pre><code>template&lt;class InputIterator, class Function&gt; Function for_each(InputIterator first, InputIterator last, Function f) { for ( ; first!=last; ++first ) f(*first); retu...
java c++
[1, 6]
3,659,145
3,659,146
how to detect blocked address from within php
<p>so here is my problem; we are trying to setup the facebook like and twitter tweet button on our website but it is causing browsers to become unresponsive when facebook and twitter are blocked on their computers. so what i would like to do is detect if facebook or twitter are blocked and then remove the buttons for t...
php javascript
[2, 3]
3,827,871
3,827,872
bridge language between PHP and Objective-C
<p>i want to show php page in iphone application. I have also used webview to display page but not able to know how to apply slide effect on page please help me...</p> <p>i am working with one application in which i m working with php listing page and then i want to show detail page but how to show slide transition e...
php iphone
[2, 8]
3,032,507
3,032,508
How do you programmically execute javascript as if from the browser bar?
<p>For example if you type in the browser bar <code>javascript:alert('hai');</code> it shows a pop up. Is that possible to do in a programming language?</p> <p>For example in java would I be able to connect to a website, and execute it's javascript somehow in my program?</p> <p>Example:</p> <p>Javascript in website...
java javascript
[1, 3]
1,334,192
1,334,193
Selecting text in div on mouseover
<p>How can I select text when I mouse over a div?</p>
javascript jquery
[3, 5]
3,633,340
3,633,341
How to implement this keyboard hooking function in javascript/jquery?
<p>I need to implement a keyboard for my language. For example, I want that if you type <code>"a"</code> then in the textbox or input box will show: <img src="http://cl.cooltext.com/rendered/cooltext530153213.png" alt="ka">.....If i press "m" it will show: <img src="http://i.stack.imgur.com/5hL2n.png" alt="enter image ...
javascript jquery
[3, 5]
883,334
883,335
Get images width on .load() doesn't work on all browsers except firefox
<p>I post my question here because I haven't find an answer to my issue. I load some image in JavaScript. Each of them are in its own div. And I want to get the width of the div.</p> <pre><code>this.biggerElmts.find('img').each(function(){ var div = $('&lt;div/&gt;', {'class': this.divMinPic}).appendTo(divMinPics); va...
javascript jquery
[3, 5]
5,433,399
5,433,400
How to increment a numeric string by +1 with Javascript/jQuery
<p>I have the following variable:</p> <pre><code>pageID = 7 </code></pre> <p>I'd like to increment this number on a link:</p> <pre><code>$('#arrowRight').attr('href', 'page.html?='+pageID); </code></pre> <p>So this outputs 7, I'd like to append the link to say 8. But if I add +1:</p> <blockquote> <p>$('#arrowRig...
javascript jquery
[3, 5]
4,030,178
4,030,179
Server Side vs. Client Side Processing?
<p>I have some structured data...in this case mysql data.</p> <p>I need to display it to the user. I can convert it to HTML on the server (PHP) or the client (Javascript).</p> <p>Which one should I use?</p> <p>Pros for Server : ?</p> <p>Pros for Client : 1. Bandwidth is reduced because I send only data over the n...
php javascript
[2, 3]
1,483,805
1,483,806
how to make Dynamic Scrolling list in asp.net
<p>how to make Dynamic Scrolling list in asp.net ?</p> <p>i have a text file that contain sentences, and i want</p> <p>to show those sentences in dynamic scrolling list in my webform (like news)</p> <p>how to do it ?</p> <p>can i get any sample code ?</p>
c# asp.net
[0, 9]
1,009,013
1,009,014
JQuery Dialog auto focuses input field
<p>I created a dialog and when I open it by clicking a button the first input field in the dialog's container gets focused. How can I avoid it?</p>
javascript jquery
[3, 5]
5,916,853
5,916,854
Javascript running improperly?
<p>I have a Javascript function that is called from the onchange method in a DropDownList. However I'm getting the error "Cannot have multiple items selected in a DropDownList." on line 14. This happens when the page is reloaded for other purposes. Why is it getting hung here when the method shouldn't even be getting c...
asp.net javascript
[9, 3]
5,348,313
5,348,314
How do you configure SWFUpload to work with an ASP.NET C# WebService?
<p>I'm trying to use SWFUpload with an ASP.NET Web Forms project. I need to get at Request.Files[0] But I can't do that in my WebService! </p> <p>Anyone know a way around this?</p> <p>Thanks in advance.</p>
c# asp.net
[0, 9]
1,575,823
1,575,824
How can I put JavaScript code at the bottom of an ASP.NET page?
<p>In my ASP.NET page, I am referring to an external JavaScript file.</p> <p>As per my learning in the web, it's recommended always to put inline JavaScript code at the bottom of the page. There is no information about how to do it for an external JavaScript reference.</p> <p>I want to know, if I am referring to an e...
javascript asp.net
[3, 9]
121,910
121,911
Detecting Data changes in Forms using JQuery
<p>I'm using ASP.NET 2.0 with a Master Page and I was wondering if anyone knew of a way to detect when the fields within a certain <code>&lt;div&gt;</code> or <code>fieldset</code> have been changed (e.g., marked '<code>IsDirty</code>')?</p>
javascript jquery
[3, 5]
4,845,997
4,845,998
How can i add double quotes to a string?
<p>I want to add double quotes for a sting . I know by using /" we can add double quotes . My string is</p> <pre><code>string scrip = "$(function () {$(\"[src='" + names[i, 0] + "']\"" + ").pinit();});"; </code></pre> <p>When i do this on the browser i am getting &amp;quot instead of " quotes . How can i overcome wit...
c# asp.net
[0, 9]
5,453,038
5,453,039
Maxlength check using JQuery For multiline text box
<pre><code>&lt;asp:TextBox ID="txtPurpose" CssClass="dd" runat="server" MaxLength="500" OnKeyUp="return maxlength();" OnPaste="return maxlength();" TextMode="MultiLine" Width="70%" Rows="4" ValidationGroup="tool"&gt;&lt;/asp:TextBox&gt; </code></pre> <p>in javascript</p> <pre><code>fun...
javascript asp.net
[3, 9]
3,232,796
3,232,797
Trying to pass in a callback function fails
<p>I am trying to create some functionality when a user clicks on an element on the webpage. The callback function executes as soon as the page is executed. It is only supposed to execute when the user clicks on an element. Here is the code:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;titl...
javascript jquery
[3, 5]
215,961
215,962
javascript async woes
<p>This is a newbie JavaScript question, but something I'm not quite sure how to google for help because I'm not sure how to describe the problem in an easy way.</p> <p>I have a large, somewhat complex JSON that I need to manipulate so that I could reshape the JSON in a way that I get a list of only countries, cities,...
javascript jquery
[3, 5]
4,643,052
4,643,053
how to set login control to compare the credentials stored in web.config?
<p>I have set my credential in web.config as :</p> <pre><code>&lt;authentication mode="Forms"&gt; &lt;forms loginUrl="Login.aspx" name=".ASPNETAUTH" protection="None" path="/" timeout="20"&gt; &lt;credentials passwordFormat="MD5"&gt; &lt;user name="Nayeem" password="pwd"&gt;&lt;/user&gt; ...
c# asp.net
[0, 9]
1,455,928
1,455,929
How make jquery loop over with number
<p>I am trying to assign a number to my variable i.e. colorswap1, colorswap 2, colorswap 3</p> <p>I have the following</p> <pre><code>var i = 1-36; // Get current image src var curSrc = $('#colorswap'[i]).attr('src'); </code></pre> <p>It doesn't seem to be putting the desired: colorswap1, colorswap2</p>
javascript jquery
[3, 5]
3,777,578
3,777,579
check to see if the Chapter Title has been referenced two or more times before a different Chapter Title is referenced? then apply a different class
<p>I have a bunch of divs sprinkled throughout a long article. Each one, when clicked, shows a <code>span</code> of hidden text within the div. They're made up of </p> <p>1) chapter title<br> 2) section number<br> 3) point number</p> <p>eg: government 3:15 OR whitehouse 15:27 OR legislation 1:38 (there are over 90 ch...
javascript jquery
[3, 5]
2,301,404
2,301,405
Count instances of string in an array
<p>I have an array in jQuery, and I need to count the number of "true" strings in that array, and then make the "numOfTrue" variable equal the number of true strings. So in the below array, there are 2 "true" strings, so numOfTrue would be equal to 2.</p> <pre><code>var numOfTrue; var Answers = [ "true", "false", "fal...
javascript jquery
[3, 5]
2,964,638
2,964,639
Which is faster when reading large amounts of data: XML or SQLite
<p>I will be developing a dictionary app for both Android and iPhone. The data will be embedded within the app, and it consists out of approximately 100000 words, with genus and plural form. Is it better to use a SQLite database or can I just stick to XML? Somehow SQLite sounds more efficient, but I thought let's just ...
iphone android
[8, 4]
3,266,841
3,266,842
javascript: how do I make one element visible relative to an element I hover over?
<p><a href="http://jsfiddle.net/awfex/4/" rel="nofollow">http://jsfiddle.net/awfex/4/</a></p> <p>HTML:</p> <pre><code>&lt;div class="section-header section-header-on" id="section_header_289" style="left: 50px;"&gt; &lt;span class="collapse"&gt;&lt;/span&gt; &lt;div class="section-name"&gt; &lt;span cl...
javascript jquery
[3, 5]
2,166,213
2,166,214
jQuery CSS animation for background image
<p>I have this javascript code :</p> <pre><code>$(".linksColl a li").hover(function () { $(this).css({ "background-image" : "url(images/links/linkHover1.png)", "background-position" : "center center", "background-repeat" : "no-repeat"}); ...
javascript jquery
[3, 5]
5,398,827
5,398,828
jquery fading border not working
<p>I just want some simple links where if it's hovered over, instead of having a line appear under it suddenly, it should fade. I'm trying this, but to no avail:</p> <pre><code>$(document).ready(function(){ $('#footer a').mouseover(function(){ $(this).animate({ border-bottom: 'border-bottom: 1px solid ...
javascript jquery
[3, 5]
4,217,527
4,217,528
Can't change innerHtml neither with plain JavaScript not with jQuery
<p>Here is source code of the simple page:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;Test&lt;/title&gt; &lt;script src="jquery-1.4.2.js" type=text/javascript&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="divText"&gt;Original&lt;/div&gt; &lt;script type="text/javascript"&gt; ...
javascript jquery
[3, 5]
5,978,948
5,978,949
Access Controls from UserControls in ASPX page
<p>How to Access Controls from UserControls in ASPX page? For example: I want to access gridview which is in usercontrol on ASPX page.</p> <p>Please help me.</p>
c# asp.net
[0, 9]
305,460
305,461
Jquery get parent of li href
<p>Hi I want to get the parent of this li </p> <pre><code> &lt;li&gt;&lt;a href="/panasonic/index.php/en/site/wheretobuy" class="WTB"&gt;&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="/panasonic/index.php/en/showroom/index" id="myid" &gt; testing&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; ...
javascript jquery
[3, 5]
541,099
541,100
Check datatable columns against list
<p>Let's say I have a list of values. (Currently on a piece of paper, but this could be List or whatever you suggest).</p> <p>As follows:</p> <pre><code>Name, Type, Phone, Contract, Remark </code></pre> <p>Now I have a datatable which is imported from a file. I need to check if datatable contains the same columns f...
c# asp.net
[0, 9]
292,831
292,832
how to change the value in the html tag using jquery
<p>I want to change the param value of the applet tag based on the value from the dropdown. I am new to jquery .can someone tell me how can i do it using jquery . </p> <p>My applet code :</p> <pre><code>&lt;applet id="decisiontree" code="com.vaannila.utility.dynamicTreeApplet.class" archive="./appletjars/dynamictree....
javascript jquery
[3, 5]
4,102,560
4,102,561
Swapping gems in bejeweled android clone game?
<p>I want to swap two jewels in a bejeweled clone game. My logic for the game works, but I am having a hard time getting the touch events to work. I want to be able to touch a jewel and touch another one around it to "swap" them in a grid. I have an onTouch method that will get the x and y coordinates of the jewel when...
java android
[1, 4]