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 |
|---|---|---|---|---|---|
5,349,434 | 5,349,435 | How to copy a canvas into a bitmap | <p>Is there any way to copy the contents of a canvas I have just drawn onto, into a bitmap?</p>
<p><strong>EDIT:</strong> just to clarify, my current drawing procedure works as follows:</p>
<pre><code>Canvas canvas = holder.lockCanvas();
if (canvas != null)
{
onDraw(canvas); // this does all the drawing
// at t... | java android | [1, 4] |
1,276,798 | 1,276,799 | jQuery position().top returns 0 rather than real value | <p>According to the jQuery official documentation, this function should:</p>
<p><strong>"Get the current coordinates of the first element in the set of matched elements, relative to the offset parent."</strong></p>
<p>The following code is expected to return value 51, but it returns value 0. Could anyone provide insi... | javascript jquery | [3, 5] |
3,064,996 | 3,064,997 | Trying to create a select option | <p>Im not sure if this site is only with asp, but I am trying to create a form in which the child fields are disabled or enabled based on whether you chose one or the other. I was able to do it with a checkbox, but i want it to work with the drop down select value. here is the link and the script below:</p>
<p><a hr... | javascript jquery | [3, 5] |
5,074,365 | 5,074,366 | Weird IE problem using this jquery / javascript | <p>I am using the following code: </p>
<pre><code>ieLessThan8OptionDisable = function() {
if ($.browser.msie && parseFloat($.browser.version) < 8) {
$("select").find("[disabled]").addClass("disabledforie").removeAttr("disabled");
$("select").change(function(){
var selected = $(this).val();
... | javascript jquery | [3, 5] |
5,894,192 | 5,894,193 | Load jQuery using javascript | <p>I am having issues with loading jQuery with Javascript. I need to load it with Javascript because there are conditions that I only can know client-side. The commented out code is supposed to initialize the scripts, but I am having no luck with them.</p>
<pre><code>var script_tag = document.createElement('script')... | javascript jquery | [3, 5] |
3,936,081 | 3,936,082 | Ajax calls to HTTPS. Android PhoneGap XHR status=0 | <p>I want to make AJAX calls to HTTPS from HTTP, but have <code>XHR.status=0</code>.</p>
<p>I use following code to make the call:</p>
<pre><code> $j.ajax({
type: method || "GET",
async: this.asyncAjax,
url: url,
contentType: 'application/json',
cache: false,
processD... | javascript android | [3, 4] |
3,539,538 | 3,539,539 | checking input for morse code converter | <p>I want to check the input from the user to make sure that they only enter dots and dashes and any other letters or numbers will give back and error message. Also i wanted to allow the user to enter a space yet when i am converting how can i remove or ignore the white space?</p>
<pre><code>string permutations;
... | c# asp.net | [0, 9] |
2,450,269 | 2,450,270 | How do I automatically update hundreds of images in an HTML page using jquery? | <p>I have an HTML page where I want to refresh a lot of images every 30 seconds after the HTML page has been downloaded. I understand how to do this with Jquery and a single image, but I want to use about 200 custom urls to determine the current image to display for over 200 images. I need to find an efficient way to h... | javascript jquery | [3, 5] |
2,024,954 | 2,024,955 | Why is my attribute value not changing using jQuery's .attr(x,y) | <p>I am trying to change the value of the<code>onclick</code>attribute:</p>
<pre><code><span onclick="addPropertyToQuery(this)" tagId="${property.id}" class="half-padding half-margin tag">
</code></pre>
<p>The addPropertyToQuery() method looks something like this</p>
<pre><code>function addPropertyToQuery(clic... | javascript jquery | [3, 5] |
2,660,078 | 2,660,079 | Drag and Drop Folder in Uploadify File Upload | <p>I am using UPLOADIFY file upload for uploading multiple files and binding it in data list.</p>
<p>In this process i have to click on uploadify btn, then select all the image..</p>
<p>what i want is.. I have to drag the folder so all images which is in that folder and in sub folder get uploaded automatically..</p>
... | c# jquery asp.net | [0, 5, 9] |
3,919,768 | 3,919,769 | How parseInt get its value | <pre><code>parseInt('bcedfg',16)
</code></pre>
<p>Base on this code I am getting <em>773855</em> in a JavaScript,</p>
<p>I go through the conversion table , and not sure how to get this "773855" value</p>
<p>my question is how parseint come out with this "773855" value , because I wanted to translate this tiny code ... | c# javascript | [0, 3] |
31,281 | 31,282 | Combine canvas and layout? | <p>Presumably it must be quite common to desire a screen in which
there are graphical elements (for which you may like to use a canvas) and widgets/buttons on the same screen. But everything I've looked at so far gives examples of either screens full of widgets <em>OR</em> whole screen canvases. Can someone point me t... | java android | [1, 4] |
5,018,025 | 5,018,026 | Restrict usage of webmethods outside the domain | <p>I'm writing a webmethod that will be used on reg form and will check if email address exist in the system. </p>
<p>The method will be called using jquery ajax.</p>
<p>Question is how can I restrict the usage of the webmethod only within my website, so it won't be abused in any other place like local machine runnin... | c# asp.net | [0, 9] |
3,109,991 | 3,109,992 | Jquery, adding input element | <p>i have successfully added input element into div, which looks like this :</p>
<pre><code>$(document).ready(function() {
$('#jumlah').change(function() {
var jum = $('#jumlah').val();
for(i=1;i<=jum; i++){
$('#jawaban').append('<label>Jawaban Soal ' + i + ' : </label><input type="text" na... | php jquery | [2, 5] |
5,448,925 | 5,448,926 | wordpress wp_enqueue_script() not working | <p>I'm trying to add this social-network button:</p>
<pre><code><a href="http://svejo.net/submit/?url=[your url]"
data-url="[your url]"
data-type="compact"
id="svejo-button">Add in Svejo</a>
<script type="text/javascript" src="http://svejo.net/javascripts/svejo-button.js"></script&g... | php javascript | [2, 3] |
2,098,119 | 2,098,120 | Check if website is in client's trusted sites | <p>I want to check if users are following our instructions and adding our site to their list of trusted sites in internet explorer. The list of trusted sites is stored in the registry of the client and checking the registry problematically in asp.net is as far as I know not possible </p>
<p>Is there anyway to check if... | c# javascript asp.net | [0, 3, 9] |
1,063,637 | 1,063,638 | What are some ways to sort and load posts into a dynamic php template | <p>I currently have two projects I'm working on, a small flash game site to practice things and get a grasp on some concepts and a blog/game dev advertisement hybrid. My question to you guys is what would be the most efficient way to load posts so I could do things like generate pages with a specified number of entries... | php javascript jquery | [2, 3, 5] |
5,003,327 | 5,003,328 | IE8 stops the loading GIF image | <p>I'm calling an animated loading gif image on an <code><asp:Button></code> on client click.
But when the server-side code is running, the image stops animating in IE8.
It's working fine in Mozilla and other browsers.</p>
<p>This works when using a normal HTML button, but I need to use an ASP.NET Button.</p>
<... | javascript asp.net | [3, 9] |
2,173,668 | 2,173,669 | how to get the checked box input value by jquery or javascript? | <p>the input check box code:</p>
<pre><code><li class="odd"><input type="checkbox" class="forminput" name="VD10" checked="checked" value="http://test1.com">
<a href="#">example 1</a></li>
<li class="even><input type="checkbox" class="forminput" name="VD11" checked="checked" v... | javascript jquery | [3, 5] |
2,146,094 | 2,146,095 | Radio button to populate text fields | <p><br>
I'd the foll. requirement for one of my web applications: </p>
<p>In my HTML table, some of the columns require user input as textfields.
Next to the text field, I wanted to have a radio button on each row which populates rows meeting certain criteria in my table. </p>
<p>Here's my code </p>
<pre><code> ... | javascript jquery | [3, 5] |
2,871,810 | 2,871,811 | Scrollable menu in a web page | <p>I have to create a menu whihc keeps moving based on the click on Next and previous buttons. What is the best method to achieve this.
a sample will help me alot.</p>
| jquery asp.net | [5, 9] |
778,791 | 778,792 | Java: Equivalent of Python's range(int, int)? | <p>Does Java have an equivalent to Python's <code>range(int, int)</code> method?</p>
| java python | [1, 7] |
1,477,709 | 1,477,710 | Multiple toggle-events with jquery on php-generated html | <p>I know the title isn't the best, I didn't know how to put this in one sentence.
Anyway, I've got some php code creating pairs of links and corresponding boxes which should toggle, when I hit the link. Now I was wondering how you do this in jQuery "the right way".</p>
<p>Until now I gave every link the class <code>t... | php jquery | [2, 5] |
571,043 | 571,044 | How do i get Client Id of usercontrol which is inside a tabconatiner? | <p>I have a tabcontainer which contains tabpanel which in turn contains a usercontrol. If i try to get usercontrols id using </p>
<pre><code><cc1:TabContainer ID="tabContainer" runat="server" ActiveTabIndex="0" Width="100%"
OnClientActiveTabChanged="tabChanged" onChan... | jquery asp.net | [5, 9] |
5,632,468 | 5,632,469 | PHP Communicating w/ Java program | <p>We're come across a problem here at my company and I'm trying to find the best solution. </p>
<p>Software was recently purchased that utilizes a Java program to get the tax for a certain shipment. The site that needs this was written in PHP4. How can I communicate between the two?</p>
<p>It was suggested to use... | java php | [1, 2] |
774,974 | 774,975 | jQuery if condition text contains | <p>I wrote a simple if condition, but not quite working.
if text is 123 change to hi, if text is 456 change it to hi2
Could someone please give me a hand.</p>
<pre><code> <h1>123</h1>
<h1>456</h1>
<h1>789</h1>
$(document).ready(function() {
var changeText1 = '123'... | javascript jquery | [3, 5] |
5,646,825 | 5,646,826 | drop down list in a text box | <p>i want to show the details of a student who entered into the library in a text box like drop down when the mouse is placed over it</p>
| java javascript | [1, 3] |
3,846,699 | 3,846,700 | Initializing jQuery.load'ed elements | <p>I'm loading part of my webpage using AJAX, in particular <code>jQuery.load()</code>. With this the usual jQuery pattern</p>
<pre><code>$('.classname').click(...) // Handler
// or, working with bootstrap
$("a[rel=tooltip]").tooltip() // Function
</code></pre>
<p>or similar obviously don't work any more, because the... | javascript jquery | [3, 5] |
3,154,515 | 3,154,516 | Android:html and javascript | <p>I am making an app in which i have to use javascript in android .Can anyone tell me how to use javascript in android , i mean to say will it be used in java class or any other means.Any help will be appreciated.
Thanks..</p>
| javascript android | [3, 4] |
6,018,176 | 6,018,177 | appointment scheduling with jquery | <p>I'm going to create a simple appointment scheduling to set appointment for doctor,some thing like this : <a href="http://arshaw.com/fullcalendar/" rel="nofollow">http://arshaw.com/fullcalendar/</a></p>
<p>I almost know anything about jquery and javascript but I hope this be a commence to learn more and of course my... | javascript jquery | [3, 5] |
3,846,054 | 3,846,055 | Pre-select option by fetching data from DB via PHP with ajax | <p>I have a select tag, which option values come from a database via PHP using ajax. The previously selected value is saved in the DB.</p>
<p>I want to display a select showing the previously selected value (which is saved in the DB).</p>
<p>This is the HTML code</p>
<pre><code><select id='country'></select... | php javascript jquery | [2, 3, 5] |
5,900,842 | 5,900,843 | Get the div id of a style = block | <p>I am breaking my head on how to get a specific childs div id which style is block;
I have been googling and stackoverflow browsing the hole day.</p>
<p>I am able to get all children by using:</p>
<pre><code>var active = $('#myDiv').children().get();
</code></pre>
<p>But I don't know how to filter for the style. .... | javascript jquery | [3, 5] |
190,252 | 190,253 | JSON Parsing with GSON | <p>I have the following Json string.How to parse this kind of Json using Gson in Java?Any help would be appreciated.</p>
<pre><code>{
"acclst":[{
"accountInfoData":[{
"userId":9,
"rid":"1-Z5S3",
"acnme":"acc_1234.",
"actpe":"Fabricator / Distribut... | java android | [1, 4] |
4,119,359 | 4,119,360 | JQuery replace one class with another | <p>I have this jquery and I'm changing styles in it but I've heard that the correct way to do it is to create a separate style and just replace classes with jquery. Can you explain me how to do it correctly:</p>
<pre><code>$('.corpo_buttons_asia').click(function(){
$('.info').css('visibility', 'hidd... | javascript jquery | [3, 5] |
5,567,169 | 5,567,170 | How to display a (pdf,doc,docx,txt) documents inside a web form? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4627393/how-to-display-a-pdf-doc-docx-txt-documents-inside-a-web-form">How to display a (pdf,doc,docx,txt) documents inside a web form ?</a> </p>
</blockquote>
<p>Hi, I need to display a (pdf,doc,docx,txt) docum... | c# asp.net | [0, 9] |
4,592,141 | 4,592,142 | photogallery in ASP.NET window application/forms | <p>I have no experience in ASP.NET apps. I want to build photogallery in my ASP.NET windows app such that in one pane I can view thumbnails of images and when I click on any image i can view larger priview of that image on right hand side.</p>
<p>I am using ASP.NET c# to build this windows application.</p>
<p>I know ... | c# asp.net | [0, 9] |
1,788,322 | 1,788,323 | System.Drawing.Image.FromFile not finding file that is there | <p>I have a program that populates an asp:repeater. The images show up with the following code</p>
<pre><code>image.ImageUrl = "~/upload/max/" + product.Image1.ToString();
</code></pre>
<p>But when i try using</p>
<pre><code>System.Drawing.Image FullsizeImage =
System.Drawing.Image.FromFile(image.ImageUrl);
</co... | c# asp.net | [0, 9] |
2,878,360 | 2,878,361 | How to save video/MP4 from POST body in C# | <p>I have set up motion detection on an IP camera (Sercomm RC8021) using an HTTP POST. Upon detecting motion, the camera initiates an HTTP POST, attaching an MP$ video in the post body. I have an ASP.NET page with C# code-behind attempting to save the file:</p>
<pre><code> protected void Page_Load(object sender, Ev... | c# asp.net | [0, 9] |
1,465,927 | 1,465,928 | If else minifier | <p>I have many lines of code like this.. this is just a 1 thing i am trying right now.</p>
<pre><code>if (RI2.Text.Contains("SOS") || RI2.Text.Contains("WAR"))
{
Response.Redirect("http://mydomain.com/rabat");
}
if (RI2.Text.Contains("sos") || RI2.Text.Contains("war"))
{
Response.Redirect("http://mydomain.co... | c# asp.net | [0, 9] |
73,842 | 73,843 | Overwrite object methods / functions | <p>I have the <code>original.js</code> file, but I want to change some things in it. I can't modify <code>original.js</code>, but I can add another <code>better.js</code> file so that I could overwrite some functions of <code>original.js</code></p>
<p><code>original.js</code> contains:</p>
<pre><code>MyHandler = {
... | javascript jquery | [3, 5] |
3,689,917 | 3,689,918 | javascript parameters cut down in IE | <p>Hello I have passed value of div lang attribute in my jquery function.this is working perfect in all browse except IE.</p>
<pre><code> While inspects in FIREFOX div look like below code.
<div lang="1760@239.0000@349.0000@449.0000@plain make it@Plain make@Plain@Georgia Gray@8x16@10x20@12x24@No@45@10x20@check2@my... | php jquery | [2, 5] |
2,626,535 | 2,626,536 | disable button not working after download file asp.net | <p>I have the following code to download a file from the server to the client, that occurs when the button <code>btnSavetoDB_ExportToExcel</code> is clicked, after that I want to have the button disable, how can I achieve that?</p>
<pre><code>string fileName = newFN + ".xlsx";
Response.ContentType = "a... | c# asp.net | [0, 9] |
1,693,118 | 1,693,119 | Jquery - Grab multiple selections' data in Jquery | <p>This originates from <a href="http://stackoverflow.com/questions/10904829/jquery-how-to-grab-specific-data-type-of-option-after-that-option-is-selected">my original question</a>. I'm expanding on it.</p>
<p>Html select options</p>
<pre><code> <select id="1d" name="camp" multiple="multiple">
<option... | javascript jquery | [3, 5] |
2,601,345 | 2,601,346 | get value from external webpage (php or java) | <p>I need to get a number from a external webpage</p>
<pre><code><span>
<b>Maximum price:</b>
7 //value i need
</span>
</code></pre>
<p>Then display said number</p>
| java php | [1, 2] |
5,038,634 | 5,038,635 | Closing Thickbox and opening old one | <p>Hi I am trying to make a dialog box with thicbox ajax. </p>
<pre><code>I have already made it but there is a problem. For example user didn't enter his/her mail adress I alert with tb_show but it closes real dialog box.
</code></pre>
<p>I want to alert but after closing alert box(tb_show) then I want old dialog b... | javascript jquery | [3, 5] |
874,247 | 874,248 | force close when music stops - Android | <p>another new problem described below:</p>
<p>When I press home button when music STILL plays, it closes correctly, but when the sound (that is five seconds long) has finished and I press home button, it gives me a force close. I have tried an else-statement; with no luck.</p>
<pre><code>protected void onStop() {
... | java android | [1, 4] |
2,020,538 | 2,020,539 | jQuery not working after executing once | <p>As <a href="http://jsfiddle.net/DdS7H/" rel="nofollow">you can see here</a>, my little jQuery script isn't working after running twice, and I'm getting a weird error. Do any of you happen to know what's going on/how to fix it? That would be fantastic if you did!</p>
<p>Thank you!</p>
<p>Connor</p>
| javascript jquery | [3, 5] |
1,512,768 | 1,512,769 | jQuery $.inArray() always return -1 with an array of object | <p>I have an array of object, that contain key value pair of columnNames.</p>
<p>when i check if a particular columnName exists it alwayz returns -1</p>
<p>Here is an sample <a href="http://jsfiddle.net/trLkt/6/" rel="nofollow">http://jsfiddle.net/trLkt/6/</a>, Help will b appriciated</p>
| javascript jquery | [3, 5] |
378,755 | 378,756 | What scope when using $.when in jquery | <p>I'm pretty new at this web stuff and I have some calls to the server that look like this</p>
<pre><code>$.when.apply($, serverRequests).then(function () {
// update the UI on the page
// remove overlay
});
</code></pre>
<p>So my update the UI on the page part works. But what I want to do is add an overlay... | javascript jquery | [3, 5] |
4,166,044 | 4,166,045 | Is there a way to include PHP value inside a javascript function? | <p>I want to dynamically tell a javascript which <code><div></code> to hide, but I dont know how to send the request to the javascript as it is a client side script.</p>
<p>for eg:</p>
<pre><code><?
$divtohide = "adiv";
?>
<script language="javascript">
function hidediv($divtohide) {
... | php javascript | [2, 3] |
811,241 | 811,242 | Maintaining a Session throughout the day | <p>I need to maintaing the Session throughout the day? On or before session expires, how do I enforce session throughout the day without giving any session timeout either in IIS or web.config?</p>
<p>Note: Default Session Timeout in IIS – 20 minutes.</p>
<p>Thanks in Advance</p>
| c# asp.net | [0, 9] |
643,816 | 643,817 | jQuery .size() question | <p>When you click the "Add Div" button, why doesn't the number increment?</p>
<p><a href="http://jsfiddle.net/cN2zR/" rel="nofollow">http://jsfiddle.net/cN2zR/</a></p>
| javascript jquery | [3, 5] |
3,077,251 | 3,077,252 | Can I override jQuery .val() for only some input elements? | <p>Suppose I'm using a "placeholder" jQuery plugin that reads the "placeholder" attribute from input elements and simulates it for browsers that don't yet support placeholders.</p>
<p>But I would still like $("input").val() to work properly -- that is, to return "" if the text in the textbox is the placeholder text. ... | javascript jquery | [3, 5] |
2,722,997 | 2,722,998 | Why when printing empty string, zeros pop up? | <p>I'm printing an empty string because I want my display to be nothing when the user clicks clear. But for some reason, it's coming up with zeros instead, any reason why?</p>
<pre><code>display= (EditText) findViewById(R.id.editText1);}
//When button is clicked, display the text. How do I do this for the rest of my ... | java android | [1, 4] |
1,968,599 | 1,968,600 | Split() function isn't giving output | <p>Whats wrong in the code..? It isn't working!!</p>
<p>Actually I want to split the entries from one of the field of database.. The items in it are separated by commas..</p>
<p>Here is what I am doing.</p>
<pre><code>string str = dataSet.Tables[0].Rows[0]["Ingredients"].ToString();
string[] split = str.Split(',');... | c# asp.net | [0, 9] |
3,507,159 | 3,507,160 | ItemCommand of Repeater is not fire with LinkButton | <p>I have a Linkbutton inside a repeater and I want to delete the Item when the user clicks on the Linkbutton; in this case the LinkButton's ItemCommand event is not fired, my code is below:</p>
<pre><code><asp:Repeater ID="rptSubject" runat="server" OnItemCommand="rptSubject_OnItemCommand">
<ItemTemp... | c# asp.net | [0, 9] |
4,015,822 | 4,015,823 | What is the difference between the int used by View.VISIBLE and normal ints? | <p>If I want to toggle the visibility of a TextView, I can use <strong><em>View.VISIBLE</em></strong> or <strong><em>View.INVISIBLE</em></strong></p>
<p>According to the <a href="http://developer.android.com/reference/android/view/View.html#attr_android%3avisibility" rel="nofollow">Android Documentation</a>, VISIBLE i... | java android | [1, 4] |
1,425,826 | 1,425,827 | What is the difference between Debug Mode and Release Mode in Visual Studio 2010? | <blockquote>
<p><strong>Possible Duplicates:</strong><br>
<a href="http://stackoverflow.com/questions/367884/debug-release-difference">Debug/Release difference</a><br>
<a href="http://stackoverflow.com/questions/4043821/performance-differences-between-debug-and-release-builds">Performance differences between debu... | c# asp.net | [0, 9] |
4,881,778 | 4,881,779 | input:empty detects empty fields when there are none | <p>Using the below I am checking every input field is not empty</p>
<pre><code> if ( $("input:empty").length > 0 )
{
$(":text[value=]").css('background', 'rgb(255,220,200)');
$(":text[value!=]").css('background', 'rgb(255,255,255)');
alert('One or more fields are not completed')
e.preventDefault();
... | javascript jquery | [3, 5] |
1,175,906 | 1,175,907 | php Values Java Byte Array | <p>I am a bit confiused about the "pack" / "unpack" php Function, so i need the php Equivalent to the following Java Code</p>
<pre><code>....
byte[] TempByte = {1, (byte)0x01};
...
</code></pre>
<p>php:</p>
<pre><code>?
</code></pre>
<p>thx</p>
| java php | [1, 2] |
566,947 | 566,948 | Best Practices - set jQuery property from Code-Behind | <p>I need to set a single property in a jQuery command using a value that is calculated in the code-behind. My initial thought was to just use <code><%= %></code> to access it like this:</p>
<p>.aspx</p>
<pre><code><script type="text/javascript" language="javascript">
$('.sparklines').sparkline('html', {
... | asp.net jquery | [9, 5] |
4,894,069 | 4,894,070 | how to conver date like 01 mar 2011 to only mar 2011 | <p>how to conver date like 01 mar 2011 to only mar 2011 in javascript or jquery</p>
| javascript jquery | [3, 5] |
1,151,878 | 1,151,879 | How to append the HTML results of a URL call to the DOM? | <p>I have a URL that resides on another domain, like this:</p>
<pre><code>http://ads.adserver.com/ad?site=1233&zone=45435
</code></pre>
<p>When you type this URL in the browser, the result is HTML like this:</p>
<pre><code><a href="http://www.google.com" target=""><img src="htt://ads.adserver.com/i/imag... | javascript jquery iphone | [3, 5, 8] |
4,586,103 | 4,586,104 | .Net Classified Advertisement Application with Source | <p>Before I roll my own, can anyone recommend a good .Net C# classified ad system w/payment option(s) + source code? I can't find anything out there worth anything.</p>
| c# asp.net | [0, 9] |
2,840,315 | 2,840,316 | Get all the events bound by .on() in jQuery | <p>I've a page load some contents by Ajax, and also bind events via <code>.on()</code> method to the new comming elements.</p>
<p>Is there anyway to get all the binding events on <code><div class="inner"></code>?
I've try <code>$("div.inner").data('events')</code> in the console <strong>after all contents loaded... | javascript jquery | [3, 5] |
1,109,325 | 1,109,326 | Ternary to return undefined? | <p>I want to include a property on an object only in the event that a variable is defined. I don't want the property at all otherwise. I don't even want it to equal a blank string. I'm thinking something like this:</p>
<pre><code>someFunc({
bing: "bing",
bang: (myVar) ? myVar : undefined,
boom: "boom"
... | javascript jquery | [3, 5] |
2,215,732 | 2,215,733 | literal object and jquery selectors DRY | <p>I have a case where I want to do this:</p>
<pre><code>var els = {
div: $('div'),
p: els.div.find('p'),
span: els.p.find('span')
};
</code></pre>
<p>But this happens:</p>
<pre><code>console.log(els.div); // Works
console.log(els.p); // undefined
</code></pre>
<p>So I'm currently doing this:</p>
<pre>... | javascript jquery | [3, 5] |
834,353 | 834,354 | popup on gridview link button | <p><strong>this is aspx page code</strong></p>
' OnClick="lnkCustomer">
... | c# asp.net | [0, 9] |
1,760,039 | 1,760,040 | login to site and download a file? | <p>I have implanted a login code to a site , after that I want to download a file from a server . </p>
<pre><code> HttpWebRequest http = WebRequest.Create(@"http://www.website.com") as HttpWebRequest;
// http.Connection = "Keep-alive"; //uncertain
http.Method = "POST";
http.ContentType = "applicatio... | c# asp.net | [0, 9] |
2,104,098 | 2,104,099 | Provide link to lightbox image | <p>I'm using a light box(jquery.lightbox-0.5.js) for my gallery page. And my code for display the image is</p>
<pre><code><ul>
<div class="gallery" id="gallery1">
<li> <a style="display: inline;" href="sample.jpg" target="_blank"> <img src="sample_thumb.jpg" alt="" /> </a> &l... | php jquery | [2, 5] |
2,546,820 | 2,546,821 | Prevent data loss from sqlite database onUpgrade | <p>Right now my onUpgrade method looks like this:</p>
<pre><code>@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS questions");
onCreate(db);
}
</code></pre>
<p>This currently makes a new table everytime my app is updated from the market. </p... | java android | [1, 4] |
1,016,975 | 1,016,976 | jQuery not doing what i tell it to do and slideDown | <p>I have 2 functions that im running on a unordered list, the first one is wrapping a div around all li elements that are after the 6th one, and displaying none so that i can use the slidedown and slideup function to show and hide them, the slidedown and slideup works perfect on other elements on the page, just not on... | javascript jquery | [3, 5] |
4,194,693 | 4,194,694 | jquery load specific page / query strings | <p>I have the following working code:</p>
<pre><code><script>
$(document).ready(function(){
$('#target').click(function() {
$("#success").load("/contacts/person/view/1", function(response, status, xhr) {
if (status == "error") {
var msg = "Sorry but there was an error: ";
$("#error").html(msg + xhr.status + " " ... | javascript jquery | [3, 5] |
2,042,178 | 2,042,179 | How do you use context in classes? | <pre><code>package com.lala.image;
import com.lala.ContextStore;
import android.R;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.view.View;
public class Stationary implements Image{
View v;
Context ... | java android | [1, 4] |
764,522 | 764,523 | Hide asp.net Wizard next button in javascript | <p>I want to hide the Next button on my ASP.NET Wizard control using JavaScript. Can anybody tell me if this is possible and post a javascript snippet on how to do this? Thanks!</p>
| asp.net javascript | [9, 3] |
2,745,820 | 2,745,821 | Creating a sticky note with JavaScript and jQuery | <p>I'm trying to build a sticky note with Javascript and jQuery. The problem I am having is, that the functions <code>draggable()</code> and <code>deleteNote()</code> can not be called on the <strong>newly appended elements</strong>. How can I fix this?</p>
<p>EDIT: The ID actually should get an added number, which I'... | javascript jquery | [3, 5] |
2,741,959 | 2,741,960 | Java and C++ pass by value and pass by reference | <p>It is said that in Java method arguments are passed by value which is true for primitives and for objects, object's reference is passed by value. To illustrate consider the code:</p>
<pre><code>class Test {
private static void dateReplace (Date arg) {
arg = new Date (arg.getYear(), arg.getMonth(), arg.getD... | java c++ | [1, 6] |
4,977,905 | 4,977,906 | Jquery IF condition to check multiple value | <pre><code>if(($('#test1').val() == 'first_value')||($('#test2').val() == 'second_value') && ($('#test3').val()!='third_value')|| ($('#test4').val()!='fourth_value'))
</code></pre>
<p>is there any better way to check above condition using jquery? </p>
| javascript jquery | [3, 5] |
1,813,283 | 1,813,284 | How to sort the date column in gridview? | <p>I am using ASP.NET and C#.This is my code.</p>
<pre><code> private const string ASCENDING = "ASC";
private const string DESCENDING = "DESC";
public SortDirection GridViewSortDirection
{
get
{
if (ViewState["sortDirection"] == null)
... | c# asp.net | [0, 9] |
1,262,257 | 1,262,258 | How to do a Proper Escape of this Function? | <p>I have a <code>DIV</code> tag generated from jQuery that goes like this:</p>
<pre><code>$('#results')
.append('<DIV id='
+ A.pid
+ ' onmouseover=function(){google.maps.event.trigger(marker, 'mouseover');};><H3>'
+ A.name
+ '</H3></DIV>');
</code></pre>
<p>Firebug is giving me an error ... | javascript jquery | [3, 5] |
2,610,528 | 2,610,529 | Are there way start activity over lock screen? | <p>I need start activity over lock screen. It can be small activity on lock screen or fully new lock screen. It must start with lock button click</p>
<p>How to do this? I already have activity, broadcast reciver and service to do all job, but don't know how to put activity over lock screen.</p>
| java android | [1, 4] |
3,813,193 | 3,813,194 | How can I know from a web application whether another web application is authenticated or not without using redirects? | <p>I have two asp.net web applications AppClient and AppServer. How can I know from AppClient whether AppServer is Authenticated or not?</p>
<p>I do not want to redirect to the server then redirect to the client. I hope if I can do that in background.</p>
<hr>
<p><strong>What I've tried so far</strong>:</p>
<p>In ... | c# asp.net | [0, 9] |
998,680 | 998,681 | get word click in paragraphs | <p>I have an HTML document with about 30,000 words in it. </p>
<p>I'd like to be able to do something when a user clicks any word. For simplicity/concept right now, I'd just like to <code>alert()</code> that word.</p>
<p>For example, in the paragraph about, if I were to click on "have" it should run <code>alert("have... | javascript jquery | [3, 5] |
4,483,481 | 4,483,482 | How to call window.alert("message"); from C#? | <p>I have my own exception based on some condition and want to raise an alert when control comes in this catch block </p>
<pre><code>catch (ApplicationException ex)
{
//want to call window.alert function here
}
</code></pre>
| c# asp.net | [0, 9] |
1,026,646 | 1,026,647 | Dynamic table in Asp.Net | <p>Hi guys here I've created d dynamic table and how can i set d properties of the table like height, width and etc? Pls help me.. Thanks...</p>
<p>code</p>
<pre><code>private void GenerateTable(int rowsCount)
{
Table table = new Table();
for (int i = 0; i < rowsCount; i++)
{
TableRow row = new Tab... | c# asp.net | [0, 9] |
3,825,583 | 3,825,584 | Clearing a text input (if it's empty) when another text box is clicked - jQuery | <p>I have an email text box that contains the text '(Not Required)' until a user clicks on it, at which point it turns blank. I'm trying to make it to where if the user clicks another text box without entering an email address (or entering anything), the text box will revert to containing (Not Required).</p>
<p>Here's... | javascript jquery | [3, 5] |
508,098 | 508,099 | How can we simulate calls and SMS in Android? | <p>Can we simulate calls and SMS in android programmtically? Like in Windows mobile we can simulate calls and SMS.</p>
| java android | [1, 4] |
5,080,462 | 5,080,463 | Why would the jQuery selector return null? | <p>I'm writing javascript for a page that was built using a WYSIWYG. No, I cannot at present go in and change the IDs or really tweak the DOM.</p>
<p>This is the DOM element I'm trying to select (this was created by the WYSIWYG).</p>
<pre><code><td nowrap="true" align="left" id="vW2070;" name="vW2070;" style="padd... | javascript jquery | [3, 5] |
1,363,099 | 1,363,100 | How to get full URL on the address bar using PHP | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/967649/get-entire-url-including-query-string-and-anchor">Get entire URL, including query string and anchor</a> </p>
</blockquote>
<p>I have my url like <em>www.domain.com/#!/username</em> (just like in twitter).... | php javascript | [2, 3] |
2,748,376 | 2,748,377 | Android application : how to manage handwriting input? | <p>I just want to know if there is some existing libraries to manage handwriting input/recognition?
I want to develop an application in which the user could write his text with a srylus, and not with a keyboard. I did research on Google and didn't find anything efficient for that.</p>
<p>Thank you, </p>
| java android | [1, 4] |
5,576,841 | 5,576,842 | clear interval if criteria not met | <p>In a nut shell, I need to clear an interval for a function called <code>newsCheck</code> if the users not on the home page. Seems simple enough, i thought so too. This is causing me huge problems. I use a history api which is why the interval would not clear on page reloads and changes.</p>
<p>Here's what I have wi... | javascript jquery | [3, 5] |
3,971,108 | 3,971,109 | How to clip text in android canvas? | <p>I'm creating kids learning application in android.
I created Imageview on which text is displayed and i applied canvas for Imageview so i can able to
paint on whole canvas. Upto this working fine.</p>
<p>Now my problem is i have to clip the text present in canvas imageview.
I know to clip the region with shapes li... | java android | [1, 4] |
4,573,294 | 4,573,295 | A dropdown validation error occurs if no value is selected on the associated radio button | <p>I have a form with two radio buttons: "Yes" and "No". If "Yes" is selected, the user selects what they want from two drop-down menus. If the user selects "No", the form's JavaScript will grey out both drop-down menus.</p>
<p>My jQuery code is shown below. I added:</p>
<pre><code>if(!$("#discount").prop("disabled")... | javascript jquery | [3, 5] |
2,794,597 | 2,794,598 | JQuery Detecting Hover on Flash Object | <p>I am having problem with the following JQuery code:</p>
<pre><code>$("object").hover(function(e){
alert('Flash Here');
});
</code></pre>
<p>I just want jquery to detect if I hover on top of the flash object.</p>
<p>Here is the flash embed code:</p>
<pre><code><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-... | javascript jquery | [3, 5] |
2,647,735 | 2,647,736 | Is the android dalvik vm a copy or a separate vm from the java vm | <p>With the recent row between oracle and google I am curious to know if the dalvik vm really is a copy of the java vm....google says its a clean room technology and doesn't involve java vm..
then why does it uses java to generate the bytecode ???</p>
| java android | [1, 4] |
1,531,348 | 1,531,349 | jQuery localtime, getting a non-supported date/time string error | <p>I'm using the following plugin: <a href="http://code.google.com/p/jquery-localtime/wiki/Usage" rel="nofollow">http://code.google.com/p/jquery-localtime/wiki/Usage</a></p>
<p>My elements are rendered on the page with JS so I apply the plugin to the element as follows:</p>
<pre><code> var format = "dd/MM/yy HH:mm... | javascript jquery | [3, 5] |
4,558,813 | 4,558,814 | How to generate c# class file from c# code behind? | <p>Is it possible to create a class (classname.cs) file at runtime and use the class runtime.
If it is then how to implement.
please help.</p>
| c# asp.net | [0, 9] |
4,289,613 | 4,289,614 | Errors when EditText left blank | <p>Can anyone take a look at the below code and point out the obvious on what's wrong? The program gives an error when <code>editText</code> is left blank and only does the calculation once all the information is present. Currently the program crashes when there is text missing, why is this?</p>
<pre><code>EditText ed... | java android | [1, 4] |
5,459,173 | 5,459,174 | asp.net jquery token input not working while running in debugger mode | <p>I am using Jquery tokenizer as like facebook using the following plugin</p>
<p><a href="http://loopj.com/jquery-tokeninput/" rel="nofollow">http://loopj.com/jquery-tokeninput/</a></p>
<p>which works great.
Only the issue is, when I run it from the Visual Studio, the default URL looks like <a href="http://localhost... | jquery asp.net | [5, 9] |
1,374,834 | 1,374,835 | How can I check if an element (h2) is really the first element inside a div? | <p>I want to "manage" the first h2 element inside a div, only if it's really the "first element"</p>
<pre><code><div id="test">
<h2>Try 1</h2>
Test Test Test
<h2>Try 2</h2>
</div>
</code></pre>
<p>here only h2 with text "Try 1" must be managed</p>
<pre><code><div ... | javascript jquery | [3, 5] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.