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,734,942
5,734,943
Stop Android Notification Bar From Appearing on Touch Events
<p>I need help removing or modifying the correct motion or touch events from the services.jar that call the notification bar to appear. I have a full screen application that keeps getting interrupted by the appearance of the notification bar. I understand I won't be able to do this at the application level but need to ...
java android
[1, 4]
3,623,984
3,623,985
Error Help::Multiple controls with the same ID 'ctl00' were found. FindControl requires that controls have unique IDs
<p>Getting the above Error. I want the IDs of the Accordian to be unique everytime it is bound. I added Accordian pane dynamically in my code..Its not working:-</p> <p>like this :-</p> <pre><code>for(int i=0;i&lt; dt.Rows.Count;i++) { AccordionPane accp = new AccordionPane(); accp.ID = "accp" + i.ToString(); A...
c# asp.net
[0, 9]
4,823,311
4,823,312
OnAuthenticate Login Control
<p>Could someone help me authenticate a user on OnAuthenticate Im have problems logging in. For some reason FormsAuthentication.Authenticate isn't working but membership.ValidateUser is . Also if someone can expand on this please do I don't know if i've got everthing sorted I've never done this part before. Leave a com...
c# asp.net
[0, 9]
831,629
831,630
jQuery: Javascript throws Error "The operation is insecure" when setting value
<p>I am trying to find a fallback solution for browsers who do not interpret the placeholder attribute for input elements. I have this simple jQuery Script but it throws an Error </p> <pre><code>SecurityError: "The operation is insecure. this.value = val;" </code></pre> <p>Here's my script:</p> <pre><code>$('documen...
javascript jquery
[3, 5]
1,792,119
1,792,120
Javascript if condition fails
<pre><code>name = u'pycon' name_list = u'acxack', u'pycon', u'A_ForA', u'retweetstats', u'Bsdsad', u'dcxcxzc', u'ss' </code></pre> <p>I have to write if <code>name in name_list</code> return <code>true else false</code>. I have written:</p> <pre><code>var x; function is_following(name_list, name) { ...
javascript jquery
[3, 5]
2,062,491
2,062,492
add listener vs set listener
<p>What is the difference between adding a listener and setting a listener.</p> <p>e.g.</p> <pre><code>addTextChangedListener(textWatcher); setOnClickListener(clickListener); </code></pre> <p><strong>Answer:</strong></p> <p>After aioobe's answer i have tested this in my project. So we can do this.</p> <pre><code>...
java android
[1, 4]
218,884
218,885
Javascript string variable that contains PHP code
<p>I basically just want to append a javascript variable to an HTML div with JQuery. However I need to append some PHP code as a string, it doesn't need to execute it just needs to show up as a plain old string string.</p> <p>The following code doesn't seem to append because I think it is still recognized as PHP synta...
php javascript jquery
[2, 3, 5]
2,264,764
2,264,765
What is the cleanest way to disable postback controls until the page has fully loaded?
<p>I have a website that has some intense graphics, and people with slow connections might require download time. While their browser is downloading, they have form options. And a lot of times they will fill the form out and hit submit.</p> <p>This causes an event validation issue, because the page wasn't fully loade...
javascript asp.net
[3, 9]
871,005
871,006
how do I tell if an event is fired by .click() or by the user?
<p>I want to differentiate actual mouse clicks from script generated clicks.How can i do it with jquery?</p>
javascript jquery
[3, 5]
4,112,417
4,112,418
In Javascript, how do I determine if my current browser is Firefox on a computer vs everything else?
<pre><code>if(firefox and is on a computer){ alert('using firefox on a computer') }else{ alert("using something else!"); } </code></pre> <p>How can I do this?</p>
javascript jquery
[3, 5]
5,499,375
5,499,376
How to scroll an element inside parent when a fixed element passes?
<p>This is a bit too tricky for my jQuery / javascript knowledge so i'm sorry to say i haven't really tried anything yet. I need some hints to get pointed in the right direction!</p> <p>The problem is that i have a fixed element on my page, and when scrolling down this element will enter different wrappers, and while ...
javascript jquery
[3, 5]
1,594,412
1,594,413
Java [android] Activity, extern classes
<p>Java newbie is here.</p> <pre><code>AlertDialog.Builder builder = new AlertDialog.Builder(this); AlertDialog dlg = builder.setMessage(messageText).create(); dlg.setOwnerActivity(this); dlg.show(); </code></pre> <p>^ this code works well in the main class, but when I try to make an extern one like this:</p> <pre><...
java android
[1, 4]
3,309,882
3,309,883
Set value of a dropdown in ANOTHER webpage
<p>I have two web pages open. How can I change the value of a dropdown in PAGE 2 from within PAGE 1? </p> <p>I have searched and searched. Any help will be much appreciated.</p>
javascript jquery
[3, 5]
4,861,588
4,861,589
Disable PrettyPhoto in code
<p>How can I disable <a href="http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/" rel="nofollow">PrettyPhoto</a> after it has been enabled?</p> <pre><code>$(document).ready(function () { $("a[rel^='prettyPhoto']").prettyPhoto(); } $("#disablePrettyphoto").click(function (e) { $("a...
javascript jquery
[3, 5]
5,651,564
5,651,565
Pass variable via Javascript
<p>How can I pass a variable (<code>$member_id</code>) to the target php page(Member Profile details Query)?</p> <pre><code>///----- echo '&lt;div id="show_profile_box"&gt;Show Member Profile details //MySQL Query to display member profile details&lt;/div&gt; &lt;div id="display_member_id"&gt;&lt;a h...
php javascript jquery
[2, 3, 5]
1,611,487
1,611,488
HttpContext.Current.Request.ApplicationPath is empty on production
<p>On my development server <code>HttpContext.Current.Request.ApplicationPath</code> correctly returns the path, but on production it returns empty.</p> <p>Why woudld this be?</p> <p>I am using this to build URL's, and now in production a link doesn't work as it looks like:</p> <pre><code>http://section/page1.aspx <...
c# asp.net
[0, 9]
3,953,312
3,953,313
stop the jquery function after one execution
<p>I have the function <code>Nextthing</code> that hides first iframe and shows the next one, but as you will see in the code of the function I did just for only one next iframe, so if he makes the action for the second iframe to hides it and shows the next iframes it will display but in the wrong place.</p> <p>How ca...
javascript jquery
[3, 5]
2,332,617
2,332,618
how to encrypt file download path
<p>I want to allow users to download pdf file from one of my folder. Is there any way i can hide the download path from the user when user "mouseover" to the file download icon ?</p> <p>Suggest any method using PHP or javascript.</p>
php javascript
[2, 3]
1,934,490
1,934,491
How to read files in a concurrency safe manner in an asp.net webpage?
<p>I need an asp.net webpage to read some text from a file stored on the same server as the webpage, will the following code result in a concurrency error if several people visit the webpage at once and thus several requests to read the file are generated:</p> <pre><code>string fileText = System.IO.File.ReadAllText(Re...
asp.net c#
[9, 0]
41,892
41,893
Passing two json results to a function
<p>i need to make two different ajax calls and pass both the json data to another function. how can i do it using below ajax call format?</p> <pre><code>$.ajax({ url:'', type:'GET', dataType: 'json', success: callme }); $.ajax({ url:'', type:'GET', dataType: 'json', success: callme ...
javascript jquery
[3, 5]
5,634,883
5,634,884
JavaScript not loading after output of PHP file_get_contents() string
<p>I have the following structure:</p> <pre> -uploadpage.html -index.php -resources -jquery-1.4.2.min.js </pre> <p>On my index.php, I get the contents then output uploadpage.html through this code:</p> <pre> $output = file_get_contents("uploadpage.html"); echo $output; </pre> <p>My upload.html has the javascrip...
php javascript
[2, 3]
1,016,367
1,016,368
Close Facebox inside iframe
<p>I am using this mod:</p> <p><a href="http://lnx.shortcutto701.com/2010/05/21/using-iframe-with-facebox-jquery-plugin/" rel="nofollow">http://lnx.shortcutto701.com/2010/05/21/using-iframe-with-facebox-jquery-plugin/</a></p> <p>My question is, how do I make a button which is inside the iframe to close the facebox. I...
javascript jquery
[3, 5]
1,675,379
1,675,380
When a asp.net button is clicked, add #button to the url
<p>Using jquery, when a button is clicked (server side), I want to append #button to the url.</p> <p>This will only be used when there is validation errors, I want the browser to scroll to the bottom where the button is.</p> <p>I already tried MaintainScrollPositionOnPostback but it doesn't work here since the valida...
c# asp.net jquery
[0, 9, 5]
2,134,992
2,134,993
how remove or replace string tag with blank in JSON
<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;string xmlns="http://www.taxmanntechnologies.com/"&gt;[{"INT_ID":"102010000000000015","INT_Section_ID":"102120000000000069", "Section_No":"Section - 16 ","Heading":" Functions of Central Board"}]&lt;/string&gt; </code></pre> <p>i have This data i want to rem...
java android
[1, 4]
2,456,484
2,456,485
jquery wrap elements with div
<p>Gurus,</p> <p>I have this.</p> <pre><code>&lt;td style="width:100px"&gt; Queued:465 Rejects:3897 Offers:31 &lt;/td&gt; </code></pre> <p>and need to make it as </p> <pre><code>&lt;td style="width:100px"&gt; &lt;span class="label"&gt;Queued:&lt;/span&gt;&lt;span class="data"&gt;465&lt;/span&gt; &lt;br&gt; &lt;span...
javascript jquery
[3, 5]
881,147
881,148
Custom Database Connection class problem
<p>In our web project, we have a custom Database Connection class that creates the SqlConnection object and get the DB connection string for us from the web.config.</p> <p>While this is nice, there's one problem. All projects inside our web project depend on that web.config being there so that this class can work.</p...
c# asp.net
[0, 9]
3,352,974
3,352,975
how to Put add in our android application
<p>I have created an application for admob, but I am getting an error. I found an example from Google and I have tried it, but there is a problem when I'm launching the application .</p> <p>I'm using Android 2.2 API 8. I am able to launch the application, but this block is causing an error.</p> <pre><code>android:con...
java android
[1, 4]
2,475,733
2,475,734
Intent From Class Not Launching
<p>I'm trying to launch an intent from an activity class:</p> <pre><code>Intent i = new Intent(this, (Obscured)MapActivity.class); i.putExtra("stop", stop); this.startActivity(i); </code></pre> <p>And here is my intent receiver in (Obscured)MapActivity:</p> <pre><code>Intent i = this.getIntent(); if (i != nu...
java android
[1, 4]
2,138,054
2,138,055
PHP not able to grab url variable after loading content through ajax
<p>so here is my scenario. I have a page, lets use "http://www.pearlsquirrel.com/listen.php?u=161" On the page load it loads a file, ajaxlinklisten.php into a div on my listen.php page through ajax and jquery. Inside of my ajaxlinklisten.php page I have the following code:</p> <pre><code>if (isset($_GET['u'])); { ...
php jquery
[2, 5]
3,919,357
3,919,358
Android: java.lang.IllegalMonitorStateException: object not locked by thread before wait()
<p>I have this this code for Android which is stuck at the synchronized statement. Even if i remove the process1.wait() i catch the exception.any help is appreciated?</p> <pre><code> private class LongOperation extends AsyncTask&lt;String, Void, String&gt; { @Override protected String doInBackground(St...
java android
[1, 4]
5,831,850
5,831,851
Retrieving a table cell's text once clicked in jQuery
<p>I've been having some trouble retrieving text of a table cell that is clicked, the only way I can get the event to fire is substituting "tbody td" with </p> <pre><code>$("body").click(function(e) { </code></pre> <p>but this does not return correct data value for cell clicked. Anyone know what I might be doing wron...
javascript jquery
[3, 5]
274,038
274,039
Extracting search queries from URL in jQuery
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/901115/get-query-string-values-in-javascript">Get query string values in JavaScript</a><br> <a href="http://stackoverflow.com/questions/2090551/parse-query-string-in-javascript">Parse query string in JavaScript</a...
javascript jquery
[3, 5]
3,813,642
3,813,643
Better method of retrieving values of checked input boxes via jQuery?
<p>I have several checkboxes and a fake submit button to make an AJAX request:</p> <pre><code>&lt;form&gt; &lt;input type="checkbox" value="1"/&gt; &lt;input type="checkbox" value="2" checked="checked"/&gt; &lt;input type="checkbox" value="3"/&gt; &lt;input type="checkbox" value="4" checked="checked"/&...
javascript jquery
[3, 5]
5,688,835
5,688,836
javascript/jquery: get info for a remote image
<p>I have an image that has "src" pointing to an external server, like this:</p> <pre><code> &lt;img src="http://somewhere.com/script.php?id=1234"&gt; </code></pre> <p>The image returned is .png and it can be returned as a "X" image or "O" image.</p> <p>How can I determinate if the image is X or O with javascript/...
php javascript jquery
[2, 3, 5]
3,922,683
3,922,684
need help understanding why this line in the code
<p>this code in book <a href="http://rads.stackoverflow.com/amzn/click/1935182323" rel="nofollow">jQuery in action</a> page 99</p> <p>Why he wrote this line</p> <p><em><strong>var current = this;</em></strong></p> <pre><code> &lt;!DOCTYPE html&gt; &lt;html id="greatgreatgrandpa"&gt; &lt;head&gt; &lt;t...
javascript jquery
[3, 5]
5,694,378
5,694,379
How to store SharedPreferences into file?
<p>I have been developing Android application which should have following function: it should store some data between Application executings; also if I delete application and re-install it app should restore values of data. I knew that I can store data into SharedPreferences (for working with data in my program) and se...
java android
[1, 4]
5,337,422
5,337,423
Equivalent of goto of c++ in Java in a specific scenario
<p>I am replacing a old C++ code with Java:I know there is no equivalent of goto in java as it causes many surprising errors and unintended loop terminations.</p> <p>C++ code: //I have skipped the actual code</p> <pre><code>for(//some condition){ if (excl(grds[i],0)) { //do something goto breako...
java c++
[1, 6]
1,562,441
1,562,442
javascript locals()?
<p>In python one can get a dictionary of all local and global variables in the current scope with the built-in functions locals() and globals(). Is there some equivalent way of doing this in javascript? For instance, I would like to do something like the following:</p> <pre><code>var foo = function(){ alert('foo'); ...
javascript python
[3, 7]
1,577,149
1,577,150
Re-Building Each Tier
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4518692/asp-net-project-dependency-issue-building-each-tier-seperately">Asp.net project dependency issue (Building each tier seperately)</a> </p> </blockquote> <p>Project1 = Asp.net pages project (presentation L...
c# asp.net
[0, 9]
2,890,733
2,890,734
Odd Problem With window.close()
<p>I have an odd problem with window.close() or self.close() (Both create the same issue). I have a window that pops up when a link is clicked, a simple form is submitted then a button is shown that when clicked closes the window using the aforementioned method. This works fine, the problem I'm having is when this is p...
c# asp.net javascript
[0, 9, 3]
4,350,977
4,350,978
Javascript : Best way to declare functions to be used globally?
<p><strong>My javascript file is getting pretty big (3000+ lines) and I'm getting confused as to how to layout my file and delare functions so that they can called anywhere in the file.</strong></p> <p>To summarise my JS file looks a little like this at the moment:</p> <pre><code>//ALL GLOBAL VARIABLES FIRST DECLARED...
javascript jquery
[3, 5]
4,897,892
4,897,893
Override doesn't work the way it is supposed to
<p>I have a class that extends <code>SherlockFragmentActivity</code> that is supposed to provide <code>actionBar</code> to other classes. Somehow when I override some methods, they aren't working the way they should. This is the original <code>overriden</code> method</p> <pre><code>@Override public boolean onOptionsIt...
java android
[1, 4]
4,788,948
4,788,949
jQuery Search for Text in a Variable?
<p>I have a variable that contains some text, some html, basically can be a string. I need to search the variable for a specific string to process that variable differently if it is contained. Here is a snippet of what I am trying to do, does not work obviously :)</p> <p><code> $.each(data.results, function(i, res...
javascript jquery
[3, 5]
974,746
974,747
Is it OK to write a programming language in Jython?
<p>I've been looking at the tools for writing a programming language and I had a bizarre idea. What If I wrote a full blown programming language in Jython? Is that a practical solution? Will distribution and bundling be a problem? Can that make or break the language's success? In other words, I'm asking if writing a pr...
java python
[1, 7]
3,288,136
3,288,137
javascript load in mobile browser
<p>I have applied this javascript in my website to hide a certain element when the browser width decreases in size. </p> <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(func...
javascript jquery
[3, 5]
749,389
749,390
set select option back to default selected
<p>I'm trying to set the select option back to the "choices" every time I finish adding a new row. How can I do it here? Please help. Btw, adding new row(s) works just fine. Here is what I've got so far:</p> <pre><code>$(document).ready(function() { $('#Add-btn').live('click',function() { $("#tabName tr:last"...
javascript jquery
[3, 5]
4,234,340
4,234,341
How to pass the date and time from one layout to another
<p>First layout has a button to pick date,another button to pick time. After picking date &amp; time from popups, a next button is clicked. On this click , the second layout that contains date and time picker. In this we have to set the previously fetched date and time...</p>
java android
[1, 4]
537,680
537,681
find whether first letter of a string is capital or not
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/8334606/check-if-first-letter-of-word-is-a-capital-letter">Check if first letter of word is a capital letter</a> </p> </blockquote> <p>I want to write a function in which I pass string as argument. Then I want t...
javascript jquery
[3, 5]
15,940
15,941
jQuery to fadeIn and fadeOut based upon scroll
<p>I'm using the following to change an element's opacity from 0 to 1 based upon the number of pixels they have scrolled and it works perfectly.</p> <pre><code>$(window).scroll(function() { if ($(this).scrollTop() &gt; 200) { $("#hook").stop().animate({ opacity: 1 }, 300); } else { $("#...
javascript jquery
[3, 5]
3,616,322
3,616,323
Return either local variable or GET results
<p>I would like to return x || $.get.</p> <p>Or in other words, if x is true, then return x, else perform a GET call and return the value provided by the server.</p> <p>My attempt is listed below (ideally, it would follow the return x || y format maybe with an anonymous function? instead of the if/then).</p> <p>Prob...
javascript jquery
[3, 5]
3,924,158
3,924,159
how convert date(02/07/2012) to Tuesday, Febraury 7, 2012
<p>Can any one please help me how to convert date(02/07/2012) to Tuesday, Febraury 7, 2012. And how can i relate it to datepicker.</p> <p>OR</p> <p>is there any date picker which provides date like Tuesday, Febraury 7, 2012 ,when user selects date from datepicker.And how can i add next and previous buttons to the dat...
php javascript jquery
[2, 3, 5]
4,766,389
4,766,390
can i store datatable for the further refinement
<p>i have a datatable with the results i just want to refine the results using this datatable... i am trying to do it but this datatable is distroyed each time page is refreshed......</p>
c# asp.net
[0, 9]
5,128,711
5,128,712
link for popup window
<p>i have a user control that i want to build on. right now it just displays a dynamic number. i want to include functionality that will convert the number into a hyperlink that opens a popup window. </p> <p>label in ascx page:</p> <pre><code>&lt;asp:Label ID="lbl_num" runat="server" Text="0"&gt;&lt;/asp:Label&gt; <...
c# asp.net
[0, 9]
3,272,859
3,272,860
Get image width and height
<p>I need to get an image's dimensions in javascript (jQuery) when no styles are specified for it (jQuery's css() returns 0).</p> <p>Maybe it is because I'm loading the image with jQuery just before asking for its dimensions. If this is the case, is there any event to listen that tells when the image has been loaded?<...
javascript jquery
[3, 5]
3,384,741
3,384,742
Suppressing a Browsers Default Right Click Menu - refinement?
<p>Ok so as far as I understand it so far we have 2 approaches</p> <p>Firstly some javascript which I can employ within a given script. But this switches right click off for everything.</p> <pre><code>window.oncontextmenu = function() { return false; }; </code></pre> <p>or in the html can code</p> <pre><cod...
javascript jquery
[3, 5]
4,591,779
4,591,780
Text box value issue
<p>I insert a text box into my page with jQuery <code>.html("&lt;input type="text&gt;")</code></p> <p>Once I click a button, I loop through <code>($("input[type=text]).each)</code> and then need to get the value of each text box. When I try to get that <code>val()</code> of that text box it returns empty string, alth...
javascript jquery
[3, 5]
2,288,824
2,288,825
on selecting an item in listbox disable a button
<p>On selecting the firstitem in the list box my Up button should be disabled. similarly on selecting the Lastitem in the listbox Down button should be disabled. I can able to find which item is selected by using selected index</p> <pre><code>if (lstview.SelectedIndex &gt;= 0) { var selectedItems = lstview.Sele...
c# asp.net
[0, 9]
1,885,463
1,885,464
Why does change() called only for receiving radio?
<p>I have the following handler setup</p> <pre><code>form.find("input[name=url_source]").change(function() { updateUrlSource(jQuery(this)) }); </code></pre> <p>I was thinking it will be attached to all radio buttons with the name. But actually I see in debugger, that only one call occurs and o...
javascript jquery
[3, 5]
3,134,114
3,134,115
how do i use a class without instantiating it?
<p>I have class:</p> <pre><code>static class GetRole { public static string OfUser(string username) { string result="None"; foreach (string key in WebConfigurationManager.AppSettings) { if (WebConfigurationManager.AppSettings[key].Contains(usernam...
c# asp.net
[0, 9]
4,897,777
4,897,778
how to find client info in asp.net
<p>I have a webpage, and people come to vote there. but I want everyone to send just one vote! please help me with c# code.</p>
c# asp.net
[0, 9]
1,675,965
1,675,966
javascript, php, cookies
<p>the application returns a value "1" in the database instead of the mac address... </p> <p>I'm able to document.write the output of the mac address, but not able to have it store in the database.</p> <p>Is the program using the previous cookie? (but Ive deleted all the cookies from the pc)</p> <p>but if i change t...
php javascript
[2, 3]
1,036,333
1,036,334
How to automatically reload page after a certain time based on a php variable
<p>I currently have a php file that automatically plays the song at the top of a playlist. I have a <code>$duration</code> value that I pull from a mysql database and I want the page to automatically refresh after the song is finished playing.</p> <p>The song is currently played within an iframe so this is the only wa...
php javascript
[2, 3]
1,152,953
1,152,954
jquery create a unique id
<pre><code>$(document).ready(function() { $('a.menuitem').click(function() { var arr = 0; var link = $( this ), url = link.attr( "href" ); var newDiv = $( document.createElement( 'div' ) ) $( "#content_pane" ).append( newDiv ); newDiv.load( url ); return false; }); }); </code></p...
javascript jquery
[3, 5]
17,400
17,401
PHP rendering JS useless
<p>Ok, so, I'm not at all familiar with PHP dev, however, here I find myself. I have a page I created in HTML/CSS and JS that works great with several JS plugins. However, when I turn it into a php page, the JS is conflicting and rendered useless.</p> <p>It is because the PHP is aggregating it into one large js file. ...
php javascript
[2, 3]
5,355,818
5,355,819
Replacing a substring in href-attribute using jQuery
<p>I have some "a" tags in div. I have to change part of the href. For example: <a href="http://jsfiddle.net/A6z88/" rel="nofollow">http://jsfiddle.net/A6z88/</a>, I have to change only 'foo' in the href with 'asd'. Thanks a lot and sorry for my english :D</p>
javascript jquery
[3, 5]
662,648
662,649
how can i change the output of JavaScript to go to directly to another page instead of an alert window?
<pre><code> &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;title&gt;Validate Zip Code&lt;/title&gt; &lt;script type="text/javascript"&gt; function IsValidZipCode(zip) { var isValid = /20132/.test(zip); if (isV...
php javascript
[2, 3]
2,719,489
2,719,490
Accessing a Class that is NOT declared in App_Code in ASP.NET
<p>I sometimes define Business Logic classes to "help" my ASPX code-behind classes. It makes the most sense to me to include them both in the code-behind file since they work together. However, I'd occasionally like to access the Business Logic classes from higher level classes defined in App_Code but they aren't aut...
c# asp.net
[0, 9]
550,280
550,281
Dynamically counting frequency of element in a array in PHP
<p>I have an array say:</p> <pre><code>$array = array(1, 5, 2, 3, 3, 4, 5, 1) </code></pre> <p>I want to convert this array and having the value as the key and its frequency as the value output should be like:</p> <pre><code>$array = array ( "1" =&gt; 2, "2" =&gt; 1, "3" =&gt; 2, ...
php python
[2, 7]
3,771,459
3,771,460
jQuery. Select all the elements that classname starts with
<p>If I have elements with classnames like this:</p> <pre><code> .ses_0 .ses_1 .ses_2 .ses_3 </code></pre> <p>How can I select all the elements and prepend those with some snippet? Something like this:</p> <pre><code> var sessions = $('*[class*=ses_]'); for (var i = 0; i &lt; sessions.length; i++) { ...
javascript jquery
[3, 5]
2,274,259
2,274,260
movenext and moveprevious navigation
<p>A dropdownlist with numerous items, movenext and moveprevious navigation buttons to display an image for each selected item. Each image is displayed in the same image control. The image data in the database is simply a path to the image file.</p> <p>Using the DataReader and stored procedure for data, how do I move ...
c# asp.net
[0, 9]
4,504,682
4,504,683
Android login authentication to remote MySQL database
<p>Here's my java code:</p> <pre><code>btnLogin.setOnClickListener(new View.OnClickListener() { @Override $public void onClick(View v) { ArrayList&lt;NameValuePair&gt; postParameters = new ArrayList&lt;NameValuePair&gt;(); postParameters.add(new BasicNameValuePair("username", txtUsername.getText().to...
java android
[1, 4]
5,931,976
5,931,977
Cancel Php script
<p>From an Android application, the app will query a php script and look for new messages in MySQL DataBase.<br/> In order to prevent pointless use of the data, I implemented an 'if' statement, to check if the message in database is empty. If the message is empty, it should not answer to the Android application.</p> <...
php android
[2, 4]
3,375,561
3,375,562
Why does this work for IE but not for Firefox or Chrome?
<p>I have created a signfield in javascript and php. The User can write in the field with the mouse. Javascript reads out the coordinates and sends them to a php script wich generates an image. a new image is created every time the mouse is moved and it is moved into a div via javascript. The problem is, that this work...
php javascript jquery
[2, 3, 5]
3,483,466
3,483,467
how to insert variable into jquery select attribute $("[myAttribute='+myAttribute+']").html('is working');
<p>I want to select and change a div with my own attribute let say myAttribute="1235"</p> <p>I try this </p> <pre><code>&lt;font myAttribute="1235"&gt;Change me !&lt;/font&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; ...
javascript jquery
[3, 5]
4,089,562
4,089,563
javascript or jquery to add input fields
<p>I have a form with 6 input fields that collects departmental sales data ready for adding to SQL2008 database.</p> <p>I am looking for a script that will total all the fields as they are entered so that the grand total can be checked before the data is submitted.</p>
javascript jquery
[3, 5]
3,337,062
3,337,063
How do I prevent adding same event in Asp.net page?
<p>I have been write code in Page_Load function like this</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) { UserControl1.Button_Clicked += new EventHandler(UserControl1_Button_Clicked); } } </code></pre> <p>But the same function will be added again when the pa...
c# asp.net
[0, 9]
1,971,690
1,971,691
check which event handler handles alt+a combination on input field
<p>Is it possible to determine event handler from all javascript code connected with the site that handles a specific key combination?</p> <p>In my input, I'm unable to type in a letter like ą which is Polish. It can be done typing <kbd>alt</kbd> + <kbd>a</kbd>.</p> <p>I'm using <a href="http://jqueryui.com/" rel="no...
javascript jquery
[3, 5]
2,937,545
2,937,546
onListItemClick won't start
<p>I'm trying to put onListItemClick, but when I start my app nothing happens with onListItemClick. Can anyone help me with this? </p> <p>Here is my code:</p> <pre><code> @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); db = ...
java android
[1, 4]
4,104,874
4,104,875
How to write a web application that can remotely log in to Yahoo?
<p>I have a project where I need to write a desktop or web application that takes your Yahoo user and ID somehow sends it to the Yahoo server and so you can log in. I don't have a clue what to do or where to begin. I've heard I have to use SSL and HTTPS but I don't know how. Any help is appreciated. PS. I use dot Net ...
c# asp.net
[0, 9]
799,348
799,349
Disable some/all radio buttons in Android preference
<p>I have searched and searched Google, Stack Overflow, etc. for an answer to this and failed!</p> <p>I wish to programatically disable/enable selected radio buttons in a single Android preference.</p> <p>For example, there is a radio button preference with 6 choices, but depending on some condtions (not related to t...
java android
[1, 4]
5,897,002
5,897,003
jQuery: Set click from array loop
<p>I have a series of divs in a pattern of header/body, where a click on the header will show the body in question.</p> <p>This all happens with .click initialized on page ready...</p> <p>Rather than doing this (which works fine, but is a pain):</p> <pre><code>$('#show_fold_ping').click(function(){ ShowArea('#fold_p...
javascript jquery
[3, 5]
2,875,955
2,875,956
Which language is most suitable for an efficient web-crawler?
<p>i need to write an web crawler and i need need which is best language for performance like memory and performance ..</p> <p><strong>Edit:</strong> Original title was "which language is optimized for speed and perfomance c++ or C#"</p>
c# c++
[0, 6]
1,400,200
1,400,201
Default TextBox values
<p>Problem: There are 4 text boxes. If the user does not wish to fill all of them out, then it should display "0" and get saved.</p> <p>For example: I only fill out two textboxes out of the four. I hit Save. It should automatically save the default values ("0") for those two empty textboxes.</p> <p>Here is the code (...
javascript asp.net
[3, 9]
5,335,578
5,335,579
How can I insert javascript in php?
<p>I'm trying to insert javascript into a div. All of this is within a php document.</p> <p>I am trying to get a div to fade into view when it's child div is loaded. Parent div had id of 'subemail' (this is hidden) Child div with id 'error' is shown then it should fade in the above div.</p> <p>Following is the scri...
php javascript
[2, 3]
3,753,355
3,753,356
Reply to comment youtube style
<p>I'm trying to create a similar comments system to YouTube. What would be the easiest way of making a reply <code>textarea</code> appear under a comment when the button is clicked? I assume duplicating the <code>textarea</code> and making it <code>display:none</code> for each comment is not necessary.</p> <p><strong...
javascript jquery
[3, 5]
5,070,794
5,070,795
How to truncate links to certain length using any of the javascript or jquery
<p>I have checked the web thoroughly but haven't found anything that tell how to truncate links to certain length</p>
javascript jquery
[3, 5]
5,265,442
5,265,443
Sum variable and keep showing and updating it
<p>I have this function, that it's part of my game, and which sends the data to the getScore.php. And in that php I have some code that sends me back the score for every tag that the player enter, like this "100" "50" or "10. Now I want to grab those scores and sum them and keep showing the player his score (updating),...
php javascript
[2, 3]
3,934,164
3,934,165
jQuery remove all elements until id='whatever' found
<p>Need to remove all the code from the start tag to the next </p> <p>I've tried this</p> <pre><code>$('#page1').remove(); </code></pre> <p>But that only removes what's between the tag.</p> <p>And I don't know what else could be between the page1 and page2 tags as the code is dynamically added based on the types ...
javascript jquery
[3, 5]
2,284,748
2,284,749
jQuery iPhone Style Checkbox Events
<p>I'm using the jQuery package located at <a href="http://awardwinningfjords.com/2009/06/16/iphone-style-checkboxes.html" rel="nofollow">http://awardwinningfjords.com/2009/06/16/iphone-style-checkboxes.html</a> to convert my existing checkboxes to iPhone style checkboxes. The problem I'm having is that,after applying ...
javascript jquery iphone
[3, 5, 8]
5,732,401
5,732,402
Unable to retrieve classes ttd
<p>I have a asp website solution where i wish to add some unit tests.</p> <p>In the solution i have added a new test project.</p> <p>All my C# classes are located in the folder called 'App_Code'.</p> <p>But when i try to write <code>Person p = new Person();</code> in my test class it cannot find the class Person.</p...
c# asp.net
[0, 9]
929,467
929,468
How pass variables from activity to service without restart service
<p>I need send data (ArrayList, Array, String, etc) from my <code>Activity</code> to my <code>Service</code>. If use <code>Intent</code> and <code>Bundle</code> nesessary Service restart. I need send data without restart Service (if Service is running use him, if not running start him and send new data).</p> <p>Also I...
java android
[1, 4]
4,811,954
4,811,955
String to Bitmap java/android
<p>I am developing an application in which I converted a bitmap to string for some purprose. How can I convert that String into a Bitmap again? </p>
java android
[1, 4]
3,458,210
3,458,211
What does $('<div>').parent() return?
<p>I'm working on a jQuery widget that attaches events to the widget's parent, but I'm unable to tell if it has a parent.</p> <p>For example;</p> <pre><code>var x = $('&lt;div&gt;'); x.mywidget(); ........... in mywidget _create : function () { var y = this.element.parent() === undefined ? this.element : this.el...
javascript jquery
[3, 5]
842,919
842,920
variable height list view
<p>i need to write a variable height listview. also i need it for display purpose. column numbers are constant. also i need backgrouund of some cells in different color. so, how to achive this ? should i go listview way or do some custom drawing on a scrollview ? some snippets would help me. </p>
java android
[1, 4]
5,210,211
5,210,212
javascript, jQuery: how to save values instead of the references
<p>I'm using the following lines to store the location of an object.</p> <pre><code>var lightboxTop = $('#lightbox').css('top'); var lightboxLeft = $('#lightbox').css('left'); </code></pre> <p>I'm successively moving this object in my element, and I want to restore it previous position with the stored variables.</p> ...
javascript jquery
[3, 5]
5,920,144
5,920,145
Update select multiple
<p>I'm trying to write a function to update the "multiple" select (the second one below) such that when I select Method1 (from the first select), only the options 1A, 1B and 1C appears in the second select, and likewise for 2A, 2B... only when I select Method2. Is there a way to do this. Please help. Many thanks in ad...
javascript jquery
[3, 5]
3,220,501
3,220,502
difference between two strings in python/php
<p>I'm looking for an easy way to compare two similar strings and output the difference for instance if I have</p> <p>"abcdefghijklmnop" and "abcdefghi"</p> <p>the function would output </p> <p>"jklmnop"</p> <p>I need to know how to do this in both php and python</p>
php python
[2, 7]
775,566
775,567
Find fallback element in jQuery
<p>Javascript has very nice syntax for fallbacks and defaults, as long as unsuccessful calls return a falsy value:</p> <pre><code>var element = findElement() || findSomeOtherElement() || makeALastAttempt(); </code></pre> <p>jQuery selectors are, however, truthy even when they are empty. Is there an elegant way if say...
javascript jquery
[3, 5]
2,921,105
2,921,106
Javascript code to alter the href of an anchor link to what the user is typing into an input box?
<p>I need to dynamically change the href of an achor link on the screen to what the user is typing into an input box. I have jquery loaded if necessary or can use raw javascript.</p> <p>Extra note that may or may not be important: The div that contains the input box and the anchor link is itself dynamic (may or may no...
javascript jquery
[3, 5]
5,870,572
5,870,573
SmtpMail.Send(_MailMessage); doesn't work
<p>I am using default smpt virtula server to send mail using c# but it doesn't send any mails and also it doesn't throw any exceptions public static void SendEmail(string _FromEmail, string _ToEmail, string _Subject, string _EmailBody) {</p> <pre><code> // setup email header . SmtpMail.SmtpServer = "local...
asp.net c#
[9, 0]