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,803,751
2,803,752
Can I remove list items using a regex?
<p>I'm constructing a selection list like so:</p> <pre><code>var releases = data.suites.split(':'); $.each(releases, function(i, val){ if (val) { var info = val.split('-'); $('#testList').append('&lt;option value="'+info[0]+'"&gt;'+info[1]+'&lt;/option&gt;'); } }); </code></pre> <p>Both the va...
javascript jquery
[3, 5]
3,906,289
3,906,290
Obtain Decimal values after Division
<p>How can i obtain the decimal value after division ? after doing this </p> <p><code>days = miliseconds/(24 * 60 * 60 * 1000)</code></p> <p>suppose the value(i.e days) is 27.8351 how do i get 8351 ? Tried </p> <p><code>hours = days % (int) days</code> thought it s doing 27.8351 / 27 but still it returned a big Zer...
java android
[1, 4]
30,803
30,804
Create and modify files inside ASP.NET 3.5 web application without killing session
<p>An ASPX page has an embedded SWF Object pulling settings from a config file. The web application needs to create and modify the setting files "on the fly". </p> <p>From past experience I'm aware that creating or modifying files inside a web application will kill the session\application objects as I assume it would ...
c# asp.net
[0, 9]
3,446,273
3,446,274
moving more web presentation logic to javascript via jQuery
<p>I am building a new web based application in asp.net. Our backend has existing WCF/REST services that are returning JSON. I also have a JavaScript library that wraps up calling/consuming these JSON services for me client-side. This enables the app to make client-side AJAX calls and do things like a client-side re...
asp.net javascript jquery
[9, 3, 5]
2,755,803
2,755,804
Change theme dynamically without page refresh in ASP.NET
<p>You must have noticed one link in yahoo.com, msn.com or other popular websites named "Page Options". When you click this link you get a popup displaying different small several color icons. After clicking one of these icons your page theme changes without entire page refresh. Now you are able to see the same page wi...
asp.net jquery
[9, 5]
1,153,620
1,153,621
What is the purpose of (win) in javascript?
<p>I have the following code:</p> <pre><code> $.modal({ content: '&lt;p&gt;Are you sure you want to delete?&lt;/p&gt;', title: 'Delete confimation', maxWidth: 500, buttons: { 'Yes': function(win) { win.closeModal(); }, ...
javascript jquery
[3, 5]
3,833,292
3,833,293
In the following code is it possible to convert long datatype into string datatype?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5071040/java-convert-number-to-string">Java - Convert number to string</a> </p> </blockquote> <pre><code>private String getHome() { String defaultHome = Environment.getExternalStorageDirectory().getAbsoluteP...
java android
[1, 4]
1,321,471
1,321,472
My Service is not working on Android, why?
<p>It's code here:</p> <pre><code>public class MyServeice extends Service { private Timer pushTimer; private final int NOTEF_ID = 1234; NotificationManager manager; @Override public IBinder onBind(Intent arg0) { return null; } @Override public void onCreate() { Log.i("MyActivity", "1"); //...
java android
[1, 4]
4,436,643
4,436,644
loading and replacing the image in jquery
<p>I have low resolution image which is loaded first,once it is loaded i need to replace it with a high resolution image.</p> <p>I try to do so in html img tag but in throws error saying </p> <pre><code>Uncaught TypeError: Cannot read property 'width' of undefined </code></pre>
javascript jquery
[3, 5]
1,796,028
1,796,029
How can i access server controls from my external JavaScript file?
<p>When i use this <code>"#&lt;%= txtNumberOfDrugsInKit.ClientID %&gt;"</code>, i can access the server control from my JQuery script; but when i put this in an external script file, it does not work.</p> <p>How can i access an asp textbox from my external JavaScript file? I cant believe this is not working.</p>
asp.net javascript jquery
[9, 3, 5]
5,494,431
5,494,432
How to capture the user's browser info and submit in a form field?
<p>my app has a submit feedback form. Is there a way to can capture the user's browser &amp; version with jQuery and post that along with the form?</p> <p>Thanks</p>
javascript jquery
[3, 5]
1,118,594
1,118,595
Use javascript to change second select list based on first select list option
<p>I have two drop-down lists populated from an array of same dates stored in a database. I want to use javascript or jquery to change the second drop-down list based on the selection from the first list. So an example would be if the user selects 03/03/2012 in the first, start date list, then I'd like the second list ...
javascript jquery
[3, 5]
5,424,094
5,424,095
This end tag has no matching start tag. I messed up somewhere. Please look at it for me?
<pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server"&gt; &lt;title&gt;&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;form id="StudentList" runat="server"&gt; &lt;div&gt; &lt;asp:ListBox ID="lstStudents" runat="server" onselectedindexchanged="lstStudents_Se...
c# asp.net
[0, 9]
426,625
426,626
jQuery: Search text in string
<p>I try this:</p> <pre><code>form['comment'] = '&lt;blockquote&gt;test&lt;/blockquote&gt;&lt;a href="#"&gt;test&lt;/a&gt; &lt;Your reply here&gt;'; if($(form['comment']).search('&lt;Your reply here&gt;')) alert(1) else alert(0) </code></pre> <p>But have this error:</p> <blockquote> <p>TypeError: $(form.c...
javascript jquery
[3, 5]
2,754,962
2,754,963
Add image smilies in textbox
<p>Hello i want to add smilies in form of images to the text box in php or javascript. I want it like whats app or facebook. I dont have much idea of javascript or php. So somebody please help me with the code . I want it in a manner as i click on the image it shoulg get inserted in the text field or text area . Thanks...
php javascript
[2, 3]
661,096
661,097
Piggybacking JS on a plugin's original
<p>I have a plugin that uses the .live method (now deprecated) to execute code on a particular link. What's the best way to piggyback more javascript onto this method without modifying the plugin's original JS file?</p> <p>I'd like to keep my changes as separated as possible so that updated the plugin is less of a he...
javascript jquery
[3, 5]
4,875,563
4,875,564
Why isn't my text saving when i leave the activity?
<p>I have a notes app and basically i want it to save the text input and restore it when i return to the activity. But why isn't my code doing that? I tried onRestoreInstancestate and onRestore but it's not working. Any one know how i can save the text input after i exit the app? </p> <p>notes.java:</p> <pre><code>p...
java android
[1, 4]
5,133,348
5,133,349
How to deslect highlighted text in textbox if already highlighted?
<p>So I have this very simple JS function that selects all the text in the ASP.NET texbox (input):</p> <pre><code>function selectAllText(textbox) { textbox.focus(); textbox.select(); } </code></pre> <p>..and it gets called like this on the click event:</p> <pre><code>$("#&lt;%=Textbox1.ClientID %&gt;").click...
javascript jquery asp.net
[3, 5, 9]
3,480,793
3,480,794
Out of order execution - no Ajax involved
<p>I'm experiencing some out-of-order execution in javascript, and it's not related to any ajax calls or such. The main bulk of code is a possibly slow DOM manipulation, followed by a method call. In every single case, the function call is being fired before the DOM manipulation finishes.</p> <p>Here is my code:</p> ...
javascript jquery
[3, 5]
2,574,334
2,574,335
Script to insert data on different domain
<p>I am thinking about writing a script that will perform a sort of checkout procedure automatically similar to a program like Ebay snipe.</p> <p>I will know what the page exactly looks like. All I really want to do is load the page from a different domain than the one that is running my script into an iframe, have jq...
php javascript jquery
[2, 3, 5]
654,239
654,240
Finding div height after jQuery replaceWith
<p>I need to find and replace a div with the id <code>left_s</code> with a div with id=<code>newdiv</code>. Also, I need to get the <code>height</code> and <code>width</code> of the previous div <code>left_s</code> and apply it to the new div with id=<code>newdiv</code>.</p> <p>I've got this code, but it's not working...
javascript jquery
[3, 5]
2,821,100
2,821,101
My jquery code is working in google chrome console not after saving it?
<p>i have to select and deselect images and Jquery my code is working fine in Google developer console but not after i save it in my file.</p> <p>This work in chrome developer console not when i have it in my code</p> <p><a href="http://i.stack.imgur.com/vhtet.png" rel="nofollow">image</a></p> <p>This was the last q...
javascript jquery
[3, 5]
2,844,309
2,844,310
Modify the server side functions using jquery
<p>I am developing one website using cakephp and jquery technologies. Server-side there are some functions which handles sql queris. </p> <p>As per requirement I want to modify server side functions on client side using jquery AJAX call.</p> <p><strong>E.g.</strong> : Below is the function on server side to modify us...
php javascript jquery
[2, 3, 5]
3,212,875
3,212,876
Replace String while enter into textfield in android
<p>While entering String in EditText for example "Love Is Life" , after entering word "Love" enter space , then after if click the letter 'i' it automatically need to change it as Uppercase letter 'I' .</p> <p>Which means the character after every Space of String need be in Uppercase and make the change dynamically wh...
java android
[1, 4]
530,114
530,115
Similar to Jad file in J2ME & BlackBerry, exist in Android?
<p>Similar to jad entries in J2ME, is there any such provision in android?</p>
java android
[1, 4]
5,565,530
5,565,531
a question on unit conversion
<p>I am devloping an unit converter.Is thr any in-built java classes or anything in android which can convert from one unit to other like celsius to farheinheit or KM to meter like that ?</p>
java android
[1, 4]
5,753,513
5,753,514
javascript: how can I increment a date string (YYYY-MM-DD) by 1 day
<p>I know how to do this in php with date() and mktime() functions, but have no idea how to accomplish the same thing in javascript...</p> <pre><code>function incr_date(date_str){ //...magic here return next_date_str; } var date_str = '2011-02-28'; console.log( incr_date(date_str) ); //want to output "2011-03...
javascript jquery
[3, 5]
5,822,190
5,822,191
Problem debugging script $(this).find is not a function
<p>I'm having a problem debugging this script, the initial problem was “$().ready is not a function” so I wrapped this part of the script:</p> <pre><code>$(document).ready(function() { $('#jsddm &gt; li').bind('mouseover', jsddm_open); $('#jsddm &gt; li').bind('mouseout', jsddm_timer);}); document.onclick = js...
javascript jquery
[3, 5]
5,906,445
5,906,446
Stop method execution until another activity finished
<p>Good day to everyone!</p> <p>I need to stop method execution until another activity will end. At the moment I'm trying to do it in this way:</p> <pre><code> private boolean isPausedWhileSplash; public void showSplashWorldChangeAd(String oldWorldName, String newWorldName) { overridePendingTransition(R.anim....
java android
[1, 4]
1,373,066
1,373,067
How to ignore class in jQuery?
<p>Here is simple example I did: <a href="http://jsfiddle.net/J3rBX/" rel="nofollow">http://jsfiddle.net/J3rBX/</a></p> <p>My purpose: when I mouseover that input, it would give me an alert. Everything seems fine, but when I mouseover that text which has class 'txt', it doesn't give me an alert. What should I do?</p>
javascript jquery
[3, 5]
936,654
936,655
Why am I getting a null pointer exception when assigning names to my players?
<p>I have an android activity where the user specifies the number of players in a game, and the points needed to win the game. Once the user clicks "Start", a new Game object is supposed to be created with however many Player objects. I have already validated that the numbers are being pulled from the EditText Views pr...
java android
[1, 4]
2,409,629
2,409,630
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]
5,132,170
5,132,171
Rewriting URL based on who is logged in
<p>Im looking for the best way to change the URL to pages based on who is logged on, the limitation is all the pages are PRE generated so the actual html will already be generated and cannot be generated again on a pr user basis.</p> <p><strong>Posible solutions</strong> A posible solution might be to use javascript t...
c# asp.net
[0, 9]
971,684
971,685
android : what's the procedure to write functions for alertdialog item?
<p>I'm going to write some function in AlertDialog's item : - Code is : - </p> <pre><code>final CharSequence[] items = {"Now", "Later", "Cancel"}; AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("When you need to Take BackUp?"); builder.setSingleChoiceItems(items,...
java android
[1, 4]
2,557,923
2,557,924
Why can't I get e.RowIndex on row edit command of grid view
<p>I have a grid in asp, with data keys say 'job_no' , I provided a onrowedit event and stored the event pararameter in 'e' as usual,like this</p> <pre><code> protected void gvDetails_RowUpdating(object sender, GridViewUpdateEventArgs e) </code></pre> <p>but when I try to access the relevant data key value of the ro...
c# asp.net
[0, 9]
3,727,267
3,727,268
Event listener on view in tabs when not extending TabActivity
<p>I have an android app that extends a MapActivity, so I can't extend TabActivity. I am inflating the content of the tabs dynamically, and everything <em>looks</em> good. </p> <p>The problem that I'm running in to is that I get a NullPointerException when trying to bind event listeners to the views that were inflate...
java android
[1, 4]
10,063
10,064
Get the value of a twitter bootstrap radio button. JQuery
<p>I'm using the Radio-button from twitter bootstrap: <a href="http://twitter.github.com/bootstrap/javascript.html#buttons" rel="nofollow">http://twitter.github.com/bootstrap/javascript.html#buttons</a>.</p> <p>In my html in looks like this:</p> <pre><code> &lt;div class="btn-group" data-toggle="buttons-checkbox"&gt...
javascript jquery
[3, 5]
4,719,367
4,719,368
is there corresponding class in C++ as TreeMap in Java?
<p>is there corresponding class in C++ as TreeMap in Java? thanks</p>
java c++
[1, 6]
4,888,107
4,888,108
What is the best way to learn Java and start following the latest and greatest for a C#/ASP.NET developer?
<p>I would like to build some sites using Java stacks but would like to follow some blogs/books/articles coming from a ASP.NET background. Would need to know about tools, productivity tools, that are used to developer Java apps.</p>
c# java asp.net
[0, 1, 9]
3,271,396
3,271,397
Use JQuery to set css file body background url
<p>I'm trying to change my body's background dynamically in a jQuery window resize event. The below is a simplified example that attempts to set the body background url property when the page loads, but its not the right syntax. Any ideas?</p> <p>test.css:</p> <pre><code>body { margin: 0px auto; font-family:...
javascript jquery
[3, 5]
1,492,558
1,492,559
how to call getResouces() in a class that is not extended Activity?
<p>I would like to call getResouces in some classes, however, these classes are not extended to Activity. How to do it in a right way?</p> <p>regards penny</p>
java android
[1, 4]
2,029,631
2,029,632
C# failed to write cookie file
<p>I have tried to write a cookies file to store userID and userPw by the following code, but there is something wrong with my code, the output returned to me always is "cookies file not exist".</p> <pre><code>protected void writeCookie(object sender, EventArgs e) { if (Request.Cookies["save"] == null) { ...
c# asp.net
[0, 9]
247,119
247,120
Can someone find an error with this code?
<p>When I run this code in the browser, it says that there is no 'fadeIn' method. Is there a reason to it?</p> <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; function showDiv1() { $(...
javascript jquery
[3, 5]
5,782,479
5,782,480
Edit output of a pre-compiled generic handler .ashx
<p>I've inherited a pre-compiled website that uses javascript created in a generic handler (ashx). I need to modify the js, but I dont have the source, only the pre-compiled libraries. Currently, we're simply doing an http request on the ashx, modifying the result and then outputting it directly on the site:</p> <pr...
c# asp.net
[0, 9]
3,006,000
3,006,001
On clicking the anchor tag the outermost div must hide along with its child elements
<p>I have a div tag, which contains a div tag, which contains a ul tag which then contains many li tags. On of these li tags contains an anchor element, which when clicked causes the outermost div to hide.</p> <p>for example</p> <pre><code>&lt;div class="object" id="123"&gt; &lt;div&gt; &lt;ul&gt; &lt;li&...
javascript jquery
[3, 5]
1,943,937
1,943,938
how to run a java class on android project?
<p>i have writing an app with an android client and a server java. All the classes are in one package, but when i run my project i have this mistake:</p> <pre><code>guarantee(_name_index != 0 &amp;&amp; _signature_index != 0) failed: bad constant pool index for fieldDescriptor </code></pre> <p>i read that it is becau...
java android
[1, 4]
5,495,171
5,495,172
How to customize asp.net DropDownList to support custom data bound field
<p>Is there any way to customized asp.net dropdown list to support custom data bound filed. it shouldn't be a custom property for the control. it should be able to bind data through <code>DataBind();</code> method with the same datasource. in this custom server control i'm trying to access new custom field and based on...
c# asp.net
[0, 9]
261,466
261,467
Moving element with arrow keys jquery
<p>Can anybody tell me why this is not working <a href="http://jsfiddle.net/kuEA7/3/" rel="nofollow">jsfiddle Code</a>?</p> <p>JavaScript:</p> <pre><code>$(document).ready(function() { $(document).live("keydown", KeyOperation); }); function KeyOperation(e) { alert("in"); var top = $(".move").offset()...
javascript jquery
[3, 5]
126,772
126,773
How do I create new directory asp.net in c++ for window form button click
<p>I would like to know how to create folder in c++ for asp.net</p> <pre><code>System::IO::IsolatedStorage::IsolatedStorageFile isoFile = IsolatedStorageFile::GetStore( static_cast&lt;IsolatedStorageScope&gt;(IsolatedStorageScope::User); </code></pre> <p>isoFile->CreateDirectory()</p> <p>I have created windows form ...
asp.net c++
[9, 6]
4,637,419
4,637,420
can we use static string in web application?
<p>can we use static string in web application?</p> <p>Is there any data switching between users who are all logged in same session?</p>
c# asp.net
[0, 9]
3,079,506
3,079,507
Un-JSON a String
<p>Is there a function to un-JSON a String? I guessing it wouldn't be built in to JQuery, but could it be pulled off by writing a script that manipulates the String? I'm encountering this in the following.</p> <p>I'm using the NYTimes API, but it doesn't support JSONP, so I'm trying to find alternatives to access it. ...
javascript jquery
[3, 5]
2,666,223
2,666,224
Can I access objects (button or hyperlink) within a templatefield in a Gridview?
<p>I want to access an object (hyperlink or button) within a templatefield in a gridview. How do I do this?</p>
c# asp.net
[0, 9]
5,332,132
5,332,133
jquery: when does $("???") scan the whole DOM?
<p>When using <code>$("#xxx")</code> I guess under the hoods jQuery uses <code>getElementById</code>.</p> <p>What about <code>$(".xxx")</code> does it scan the whole DOM every time?</p>
javascript jquery
[3, 5]
5,036,033
5,036,034
jQuery API-compatible micro framework (other than Zepto)?
<p>I would swear on my cat's grave that I just read about such a thing in the last couple weeks, but I can't for the life of me find it now. I am looking for a minimal framework covering basic DOM selecting (e.g., including Sizzle, so it works with IE6 -- so Zepto doesn't qualify), manipulation &amp; event binding, but...
javascript jquery
[3, 5]
4,900,181
4,900,182
How to use Javascript math on a version number
<p>I use jQuery to get the browser version like this:</p> <pre><code>var x = $.browser.version; </code></pre> <p>I get a string like this: <strong>1.9.1.1</strong></p> <p>Now, I want to do an evaluation so if x is >= 1.9.1 then do some stuff. Unfortunately, with multiple decimal points, I cannot do a parseFloat() be...
javascript jquery
[3, 5]
3,747,406
3,747,407
get root node value null
<p>I have a problem with a <code>TreeView</code>. My <code>TreeView</code> structure is something like this:</p> <pre><code> Root !-&gt;child !-&gt;subchild </code></pre> <p>Now my requirement is that when I click on subchild node I get the information I want but when I click on root node the page and the ch...
c# asp.net
[0, 9]
711,323
711,324
Help with JQuery Callback
<p>As per <a href="http://stackoverflow.com/questions/3648056/help-with-debugging-jquery-fade-script">my previous question</a>, I have a working animation which fades in and out each element within the div <code>slideshow</code>. The problem is that I want this animation to continue from the beginning once it has reac...
javascript jquery
[3, 5]
827,799
827,800
file handling via post request in asp & c#
<p>I want to process a file coming from a post request. The file looks like this: first line: text1 second line: empty line third line: text2 an example:</p> <p>" asdasdasd1</p> <p>asdasdasd2 "</p> <p>so far i processed the file like this:</p> <p>byte[] data = Request.BinaryRead(Request.TotalBytes);</p> <p>String ...
c# asp.net
[0, 9]
2,997,167
2,997,168
Http Response Header Info
<p>I m new in dot net development .I want HTTP header response which contains all header info containing Users info also So please help me for that.</p>
c# asp.net
[0, 9]
1,374,033
1,374,034
Using Modernizer.js to redirect if page doesn't support drag and drop
<p>I have successfully configured modernizer.js to tell if a page can support drag and drop or not. Originally I configured it so that if it was supported to show one div and if not to show the other which worked well until I discovered that two of the js scripts running on this page didn't play nicely with each other...
javascript jquery
[3, 5]
3,482,351
3,482,352
Remove text from Image attr('src');
<p>Im using the src of an image, however im fetching the thumbnail image src and need to manipulate the src to get the fullsize image:</p> <p>Jquery:</p> <pre><code>$(this).attr('src'); </code></pre> <p>That gets me: <code>http://local/images/_w/image_jpg.jpg</code></p> <p>I need to replace: <code>_w/</code> to get...
javascript jquery
[3, 5]
550,575
550,576
How to check browser's JavaScript is enabled or not
<p>My application depends on JavaScript, I want to check the client browser's JavaScript is enabled or not and raise an alert message if its turned off.</p>
javascript asp.net
[3, 9]
5,294,699
5,294,700
How do you make images load only when they are in the viewport?
<p>I am seeing a lot of sites these days, mainly tutorial sites that have a lot of images and they only load images further down the page once they come into the view port?</p> <p>How would I go about doing this?</p> <p>An example:</p> <p><a href="http://www.chopeh.com/blog/logo-design-start-to-finish/" rel="nofollo...
javascript jquery
[3, 5]
455,507
455,508
JavaScript <%= MyProperty %>
<p>What are the restrictions in using such a construction in JavaScript. In my codeBehind I have property and on the get it has got quite complex logic. It invokes other methods and so on and I get as a result empty string despite that while debugging it is shown to return good value. I wonder what can I do as this typ...
javascript asp.net
[3, 9]
836,828
836,829
Problem with loading CSS while invoking page by Server.Transfer()
<p>While I'm using <em>Response.Redirect("~/Pages/Page.aspx")</em>, style is loaded on the page, but unfortunately it is not loaded while I'm using <em>Server.Transfer("~/Pages/Page.aspx")</em> method.</p> <p>The page looks following:</p> <pre><code>&lt;html&gt; &lt;head runat="server"&gt; &lt;link href="../Css/La...
c# asp.net
[0, 9]
688,131
688,132
How to call C++ functions/methods via JavaScript
<p>does anybody know how to call C++ functions or methods via JavaScript. Need scripting like Lua/Python-C++ but with JavaScript.</p> <p>Thanks in advance.</p>
javascript c++
[3, 6]
4,223,582
4,223,583
How do I retrieve two field values received from an HTTP POST to PHP?
<p>Here is what I am trying to do.</p> <p>From my Android App code I do an HTTP POST which is as below</p> <pre><code>HttpPost httppost = new HttpPost("http://xyz.com/Retrieve.php"); </code></pre> <p>The PHP code is supposed to send back an image and an URL.</p> <pre><code>$q=mysql_query("SELECT image, url FROM tes...
java php android
[1, 2, 4]
465,862
465,863
Special characters triggering jQuery events
<p>I'm having an issue with special characters triggering events in jQuery. I've got a div containing some text, when it's hovered I call a hover function, when it's "unhovered" I call another function. This works fine if I don't have any quotations: ' or " in the div contents, but causes the unhover event to trigger p...
javascript jquery
[3, 5]
1,386,119
1,386,120
jquery.AutoComplete.js adaptive width
<p>If <code>row[0]</code> is too long, the width of the yellow part does not adapt.</p> <p>How can I solve this?</p> <p><img src="http://i.stack.imgur.com/fGzuh.jpg" alt="enter image description here"></p> <pre><code> $(document).ready(function () { var b = $("#&lt;%=TextBox1.ClientID %&gt;").val(); ...
javascript jquery
[3, 5]
4,942,401
4,942,402
consuming REST API on client side using JQuery for phonegap project
<p>My code is like</p> <pre><code>$.ajax({ cache: false, url: 'http://khara37793punl.bentley.com/LearnService/LearnService.svc/REST/GetBrowseLPDetails/1/0/0/en', data: "{}", type: 'GET', crossDomain: true, dataType: 'json', success: function() { alert("Success"); }, error: function() { ...
javascript jquery
[3, 5]
4,234,564
4,234,565
XmlTextWriter path error?
<p>What is wrong with the following statement?</p> <pre><code>XmlTextWriter writer = new XmlTextWriter(@"D:\project\data\" + System.DateTime.Today + @"\" + System.DateTime.Now + ".xml", null); </code></pre> <p>When I try the above statement it gives the following error</p> <blockquote> <p>The given path's format i...
c# asp.net
[0, 9]
5,370,604
5,370,605
Escape quotes in a variable with PHP
<p>I use this code to genefate html</p> <pre><code>echo "&lt;input type='button' onclick=\"myFunc('$param');\" /&gt;"; </code></pre> <p>Everything would be OK unless $param contains <code>'</code> or <code>"</code> character. How should it be implemented to handle these situations?</p> <p>ps. mysql_real_escape_strin...
php javascript
[2, 3]
1,887,083
1,887,084
Processing Dynamic forms on the Server Side
<p>I've seen a lot of questions around here about implementing dynamic forms in jQuery or other javascript libraries, and I think I managed to get up and running in setting up a dynamic form for my test purposes.</p> <p>My question is whats the best practice in naming my form fields and processing them on the server s...
java javascript jquery
[1, 3, 5]
5,695,177
5,695,178
Get url parts without host
<p>I have a url like this :</p> <p><a href="http://www.somesite.com/mypage.aspx?myvalue1=hello&amp;myvalue2=goodbye" rel="nofollow">http://www.somesite.com/mypage.aspx?myvalue1=hello&amp;myvalue2=goodbye</a>.</p> <p>I want to get mypage.aspx?myvalue1=hello&amp;myvalue2=goodbye from it . Can you tell me how can I get ...
c# asp.net
[0, 9]
2,604,300
2,604,301
How to add up values of checkboxes in real time using JQuery?
<p>Should be easy, but this code isn't working for me:</p> <pre><code>$("#checkboxdiv input:checkbox").change(function() { var total = 0; $('#checkboxdiv input:checkbox:checked').each(function() { total += parseInt(this.value, 10); }); $('#totalsdiv').tex...
javascript jquery
[3, 5]
1,400,890
1,400,891
Possible to use Jquery in a Js widget to be inserted on other sites
<p>If I want to provide a widget on my website that other people can insert on their webpages, via : </p> <p>Can I import and use Jquery in that file so that the user doesn't need to add it manually to his page. </p> <p>How would I do this? (I'm new to Javascript too)</p> <p>Thanks</p>
javascript jquery
[3, 5]
895,214
895,215
Why doesn't the % operator work the same in Python and Java?
<h3>Python 2.7.1:</h3> <pre><code>print -34 % 4 # outputs 2 </code></pre> <h3>Java 1.5.0:</h3> <pre><code>System.out.println(-34 % 4); // outputs -2 </code></pre> <p>Which is correct? Why the difference?</p> <p>The <a href="http://en.wikipedia.org/wiki/Modulo_operator" rel="nofollow">wikipedia article on modulo</a...
java python
[1, 7]
3,864,457
3,864,458
split values in arraylist and store in different array list
<p>I am doing a project in android ,and i have a problem My array list values like this</p> <p>[name1, addr1, place1, name2, addr2, place2]</p> <p>How can i split this values and want to store name, address, places in different array list?</p>
java android
[1, 4]
429,586
429,587
how to change the double value as four decimal point value
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2808535/round-a-double-to-2-significant-figures-after-decimal-point">Round a double to 2 significant figures after decimal point</a> </p> </blockquote> <p>i've got lat and long point like this, </p> <pre><code>...
java android
[1, 4]
805,187
805,188
PHP echo in Javascript
<p>I have this code:</p> <pre><code> document.getElementById('root').style.left = '&lt;?php echo $page_position[$info["os"]][$info["browser"]][0]; ?&gt;'; document.getElementById('root').style.top = '&lt;?php echo $page_position[$info["os"]][$info["browser"]][1]; ?&gt;'; </code></pre> <p>Why won't this work like thi...
php javascript
[2, 3]
120,053
120,054
Picture animation with javascript, jquery
<p>I have several words that I would like to create an animation for, basically several of the letters of each word will separate from the original words and generate a new words with those letters. So for example lets say I have Home general services, the animation would take the ho from home gen from general and ser...
javascript jquery
[3, 5]
5,039,740
5,039,741
download html source android?
<p>I'm trying to download a website source code and display it in a textbox but I seem to get an error and can't figure it out :s</p> <pre><code> public void getHtml() throws ClientProtocolException, IOException { HttpClient httpClient = new DefaultHttpClient(); HttpContext localContext = new BasicHttpContext(...
java android
[1, 4]
3,170,995
3,170,996
C# - Are there any advantages or benefits to using ternary operators?
<p>Are there any advantages or benefits to using tertiary operators for if statements?</p> <p>For example, is the following more efficient? Or considered better programming practice?</p> <pre><code>variable1 = string.IsNullOrEmpty(variable2) ? "string value" : ""; </code></pre> <p>Compared to the following format:</...
c# asp.net
[0, 9]
4,436,838
4,436,839
jquery.click(callmethod)
<p>$('').click(function(event) { ChangeXYZ(event); });</p> <p>Problem with above is i do not want event but i someother var.</p> <pre><code>$('&lt;a/&gt;').click(function() { ChangeXYZ(var123); }); </code></pre> <p>But problem with line is, it is getting value of var123 at runtime and as i am adding this in loop so...
javascript jquery
[3, 5]
4,843,741
4,843,742
jquery table select and data retrieval
<p>I am using a html table that contains available times for scheduling. I want the user to be able to click on a time and from that be able to get the column header, which is the staff persons name, and the value of the cell - the time. I than want to change the contents of the cell to 'NA' and set the cell backgrou...
javascript jquery
[3, 5]
240,764
240,765
jQuery to find previous elements
<p>I have the following table </p> <pre><code>&lt;table&gt; &lt;tr class="ligneI"&gt; &lt;td class="col2b"&gt;&lt;input type="text" id="desc" class="calcule"&gt;&lt;/td&gt; &lt;td class="col2b"&gt;&lt;input type="text" id="price" class="calcule"&gt;&lt;/td&gt; &lt;td class="calculated_price"&gt;220.00&lt;/td&gt; &lt;t...
javascript jquery
[3, 5]
4,237,949
4,237,950
How to created auto naming concept
<p>Thanks for previous replies,</p> <p>How to compare String with ListArray, and whenever the string match the array list it automatically includes any integer value and this integer value should incremented whenever the search will begins. is this possible to do. </p>
java android
[1, 4]
747,330
747,331
Bread crumb not working properly
<p>I have created a sitemap file inorder to build a bread crumb navigation. Everything is working fine, but for some reason some of the titles and descriptions I have done in the site map file are being displayed at the very top of the website. </p> <p>Any suggestions how I can remove them?</p> <p>This is my sitemap ...
c# asp.net
[0, 9]
1,213,828
1,213,829
How can I append a new div to the last div with the same class name?
<p>All my div blocks use the same class name and I need to append a new div block after a file upload has completed. The way I'm doing it now appends a new block to every existing block. Here is my test code:</p> <p>HTML:</p> <pre><code>&lt;div class="img_container" id="img1"&gt;EXISTING BLOCK&lt;/div&gt;' &lt;div c...
php jquery
[2, 5]
3,641,646
3,641,647
.val() is not working in jquery?
<p>Can we also pass string values to some variable and call through below code</p> <pre><code>$(document).ready(function() { var i = "1, 2, 3"; $('#textvalue').val(i); }); </code></pre> <p>does it work?</p> <p>Its not working don't know how :(</p> <p>There is one more post related to this</p> <p>Link: <a h...
javascript jquery
[3, 5]
4,499,672
4,499,673
Android Custom Listview
<p>I went through tutorials and searched, but still I can't understand how the,</p> <pre><code>getView(int position, View convertView, ViewGroup arg2) </code></pre> <p>method works when extends <code>BaseAdapter</code> to create a custom listView in my android application. Therefore I cant Edit the Custom list view e...
java android
[1, 4]
703,205
703,206
Android - Show Dialog from static class
<p>I have a simple class that I want to use to show a Dialog message:</p> <pre><code>public class Utils { static void ShowMessage(Context c, String DialogTitle, String MessageToDisplay, int LayoutResourceID, int ImageResourceID ){ //Create new dialog. Dialog dialog = new Dialog(c); //Set...
java android
[1, 4]
2,937,986
2,937,987
How do you pass a Container.DataItem as a parameter?
<p>I'm using a repeater control and I'm trying to pass a parameter as such:</p> <pre><code>&lt;%# SomeFunction( DataBinder.Eval(Container.DataItem, "Id") ) %&gt; </code></pre> <p>It's basically calling:</p> <pre><code>public string SomeFunction(long id) { return "Hello"; } </code></pre> <p>I'm not abl...
c# asp.net
[0, 9]
5,575,283
5,575,284
dynamic image source?
<p>I'm entirely new to jQuery and am trying to use a plugin carousel, however it is a bit confusing. I have it installed now, and I am trying to get rid of it's bottom scroll bar and automate it. The code to make enable auto according to the manual is: </p> <pre><code>&lt;script type="text/javascript"&gt; jQuery(...
javascript jquery
[3, 5]
844,627
844,628
How do I dynamically get the value of a property of a JavaScript object?
<p>I might not know what to call this, but essentially I want to pass the name of the property dynamically and then get the value of that property within my objects data property. Something like this:</p> <pre><code>function myFunc(e, myProperty) { alert( e.data[myProperty] ); } var myValue = myFunc(myObject, "s...
javascript jquery
[3, 5]
1,914,763
1,914,764
Pass PHP Array to Javascript
<p>Am trying to pass an array of values from PHP function to Javascript. Not sure if I am doing it correctly.</p> <p>PHP:</p> <pre><code>function toggleLayers(){ for($i=0;$i&lt;$group_layer_row;$i++){ $toggleArray=mb_convert_encoding(mssql_result ($rs_group_layer, $i, 0),"UTF-8","SJIS")."_".mb_convert_enc...
php javascript
[2, 3]
5,827,512
5,827,513
Using doPostBack Function in asp.net
<p>i want to use doPostBack function in my link.When user clicks it,it wont redirect to another page and page will be postback.I am using this code but it doesnt function.Where do i miss?</p> <pre><code>&lt; a id="Sample" href="javascript:__doPostBack('__PAGE','');"&gt; function __doPostBack(eventTarget, eventArgu...
javascript asp.net
[3, 9]
4,871,157
4,871,158
Jquery and SQL data table
<p>Learning Jquery here and I would like to show my SQL table on my webpage. I have the "shell" of my jquery that matches the SQL table and my web.config is setup correctly but my jquery doesnt load data. Where it says <code>url: 'ConnectionString',</code> I would like for it to point to my table or the web.config file...
jquery asp.net
[5, 9]
3,940,559
3,940,560
ASP.NET not injecting javascript function
<p>Any idea why my function isn't getting injected into the web page? I'm pretty sure I've done this before and it worked, but when I launch from VS and look at the page I don't see it anywhere.</p> <pre><code>using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; usi...
javascript asp.net
[3, 9]
1,799,188
1,799,189
Creating FTP client for asp with C#
<p>I have a little problem because on my website I can't really set permissions for the directories, it just doesn't work. I use filezilla and when I try to set them to some subdirectories of a default directory of the server that is publicly readable and writable it doesn't send me an error but when I want to save a f...
c# asp.net
[0, 9]