Unnamed: 0
int64
65
6.03M
Id
int64
66
6.03M
Title
stringlengths
10
191
input
stringlengths
23
4.18k
output
stringclasses
10 values
Tag_Number
stringclasses
10 values
72,017
72,018
How to pass data from DOMDocument to regexp?
<p>Using the following code I get "img" tags from some html and check them if they are covered with "a" tags. Later if current "img" tag is not part of the "a" ( hyperlink ) I want to do cover this img tag into "a" tag adding hyperlinks start ending tag plus setting to target. For this I want the whole "img" tags html ...
php
[2]
4,682,552
4,682,553
User cannot install to device with android 4.0.4 even though app supports APIs 3 - 16
<p>I have a user with Motorola XT910 with android 4.0.4 reported he is unable to download my application from the Google Play Store. The error states the device is not compatible with the current version; however, my application supports APIs 3 - 16 which should include android 4.0.4.</p> <p>I currently have API 16 a...
android
[4]
99,408
99,409
Getting offset from index in binary file
<p>Well, the question says it all. I'm looking for the value in a binary file, and it's location is in the index of the binary file. I'm using the following code, and its not getting me the right bytes back out of the binary file. I'm getting the correct value from the first read, at 0xC, but I'm not converting the off...
c#
[0]
1,254,471
1,254,472
Check string for words starting with the character @
<p>Hi there and thank you for taking the time to look into this.</p> <p>I'm working on a comment system and instead of using nested comments, I just want to add the @user method for replies.</p> <p>So let's say for example I enter this comment:</p> <pre><code>@moonwalker: Thanks again for your reply. </code></pre> ...
php
[2]
1,274,424
1,274,425
Dynamically adding a button in touch area when touching screen (Android)
<p>I want to dynamically add a button to my LinearLayout when touching the screen. My willing is that this button will be added just behind the place I touched the screen. So, for example, if I touched the screen at (x,y) point then a button will be added around this point. Is it possible? if so - how? </p> <p>Thanks!...
android
[4]
3,072,739
3,072,740
HtmlEncode in C#
<p>Is there any way to html encode some text without using System.Web.HttpUtility.HtmlEncode method? I want to deploy my desktop application using .NET 3.5 Client Profile and the problem is that System.Web.dll it's not part of the .NET 3.5 Client Profile so I have to find an workaround.</p>
c#
[0]
1,160,447
1,160,448
how to get content from a Div that has a span which also has some content?
<p>How to get content from a Div that has a span which also has some content?</p> <pre><code>&lt;div id="test"&gt; this is a DIV &lt;span&gt; This is a span &lt;/span&gt; &lt;/div&gt; alert(document.getElementById('test').innerText); </code></pre> <p>The code alerts me with This is a DIV This is a span.Im looki...
javascript
[3]
3,428,793
3,428,794
Bookmarklet not working as it should (i think)
<p>Can someone tell me what I am doing wrong here...</p> <p>This returns "Button Not Found"</p> <pre><code>javascript:var nam="http://apps.facebook.com/onthefarm/giftaccept.php?senderId=547766125&amp;amp;gift=haitibackpack_item_single&amp;amp;timestamp=1285776944&amp;amp;ref=gift_accept_tab&amp;amp;key=6870697de39960...
javascript
[3]
4,841,180
4,841,181
How to show progress image after the page load?
<p>I want to perform some operation after the page load, This operation takes some time. I want to show a progress image while the operation is being performed. But the problem is if i call the function in page_load event, my page hangs till the operation is not over. Is there any way i can achieve this?</p>
asp.net
[9]
1,987,901
1,987,902
LINQ concatenating elements in two string arrays
<p>I have two string arrays</p> <pre><code>Array1 = {"Paul","John","Mary"} Array2 = {"12","13","15"} </code></pre> <p>I would like to know whether it is possible to join these arrays so that the resultant arrays have something like </p> <pre><code>{"Paul12","John13","Mary15"} </code></pre>
c#
[0]
5,460,406
5,460,407
jQuery NOT selector
<p>I have the following:</p> <pre><code>$('input[name=myCheck]').change(function() { $('input:checkbox').removeAttr('checked'); }); </code></pre> <p>How do I say: removeAttr('checked') for everybody except this?</p>
jquery
[5]
5,510,295
5,510,296
When invoking .NET CLR from within C++, an error is returned
<p>I am calling a .NET assembly from C++. </p> <p>This works perfectly for any test .NET 4.0 projects that I call. </p> <p>However, when calling a large project with 20 sub-assemblies, it fails with the error below:</p> <pre><code>Failed to execute assembly: 0x80004003. GetLastError=126. dwReturn=1. </code></pre> <...
c++
[6]
5,884,416
5,884,417
How should i deal with a Large database (17mb)?
<p>I have a big database file in my project that is locate in my Assets folder, now i can not devise it to small pieces, it is another option to use a large database file in the app ??</p> <p>Thanks for helping!!</p>
android
[4]
3,847,687
3,847,688
How to set a deep array in PHP
<p>Assume I have the following function</p> <pre><code>function setArray(&amp;$array, $key, $value) { $array[$key] = $value; } </code></pre> <p>In the above function, key is only at the first level, what if I want to set the key at the 2nd or 3rd levels, how to rewrite the function?</p> <p>e.g.</p> <pre><c...
php
[2]
3,791,128
3,791,129
Quitting application in Android
<p>I want to quit application in Android. Just put a "quit" button, which kills my app.</p> <p>I know I shouldn't do this. I know that this is not the philosophy of the OS.</p> <p>If you know how it can be done, pls share. </p> <p>In the app, I have many opened activities, so "finish()" will not do the job.</p> <p>...
android
[4]
4,944,116
4,944,117
How to play media files automatically one after another?
<p>If I have a list of songs in an array list and I want to play the songs automatically one by one sequentially. How can I do that ? </p> <p>Currently my player plays a song and plays the next one only after I press next button. I want to remove this requirement of pressing the next button. </p>
android
[4]
2,729,419
2,729,420
Last loop in for()?
<p>I have been struggling with this for a while:</p> <pre><code>for( var key in obj ){ blah.blah() if(choice){ doThis(); } } </code></pre> <p>How can I call <code>doThis()</code> only at the last item? Since I don't have a counter, <code>i</code>, I can't determine which is the last item.</p>
javascript
[3]
963,054
963,055
vista can not allow me to insert or select record msaccess from database when i login from user not admin
<p>i have little problem in using my application application having msaccess database if i install it on xp i can easily insert or select record from database but if i install it on vista. i can't access my msaccess database. if i login as admin it works fine but if i login as user i cant insert or select any record fr...
c#
[0]
5,483,603
5,483,604
How to get Hyperlink from whole string
<ol> <li><p>I create an application in which i get the response from web service .</p></li> <li><p>The response is "I might be in danger. I have triggered my panic alarm which is connected to you. Call me now. If i'm not answering, contact the police. My position is:http://maps.google.com/maps?q=21.183783,72.823548" </...
android
[4]
901,868
901,869
How to convert an array to a different format?
<p>Hi i want to convert this array where id as key and name value pair </p> <pre><code>Array( [4882] =&gt; treatment [4876] =&gt; Advance [4854] =&gt; Applied Clinical ) </code></pre> <p>to </p> <pre><code>Array( [0] =&gt; Array([id] =&gt; 4882, [name] =&gt; treatment) [1] =&gt; Array([id] =&gt...
php
[2]
5,061,559
5,061,560
Disable the touch events for all the views
<p>What's the best way to disable the touch events for all the views?</p> <p>Thanks a lot,</p> <p>Gratzi</p>
android
[4]
1,288,490
1,288,491
Android2.2 emulator Warning: No DNS server found
<p>How can I resolve this in android emulator?</p> <p>Starting emulator for AVD 'Android2.2_api8' Failed to create Context 0x3005 emulator: WARNING: Could not initialize OpenglES emulation, using software renderer. Warning: No DNS servers found</p>
android
[4]
2,797,464
2,797,465
how can i change text of TextView in ListView when we click the Button?
<p><strong>I have a ListView with a Button and a TextView and i want to change text of TextView when i click in Button. I handle the click and when i click the Button <code>android:onClick="myClickHandler"</code> i change the text value of TextView but the problem is when i scroll the ListView i found the same text in ...
android
[4]
3,249,255
3,249,256
Carry forward the querystring with sitemap link issue
<p>i am working with sitemap and i was looking for solution to attach query string with sitemap url. i search google and found that it can be done through sitemap SiteMapResolve event. so i worked with it. but my objection was not fulfil fully. here is my code</p> <pre><code> protected void Page_Load(object sender, Ev...
asp.net
[9]
40,152
40,153
php----url redirection
<p>now, i have an input textfield in a form, which used to filled in the url's name. eg:(google). i want to get when i put the mouse key hover on the google. the url display on the tool bar is my site's internal address. eg:(http://example.com/... ) then click the google. it will go to the google site.</p> <p>the inpu...
php
[2]
741,336
741,337
what is wrong with my if statement in php?
<p>what is wrong with my if statement? i have tried all i can?</p> <pre><code>if($admin == "Yes") { echo "&lt;a href='Home.php'&gt; Admin &lt;/a&gt;|&lt;a href='Home.php'&gt; Home &lt;/a&gt;|&lt;a href='profile.php?id=".$userid."'&gt; Profile &lt;/a&gt;|&lt;a href='games.php'&gt; Games &lt;/a&gt;|&lt;a href='Dev.ph...
php
[2]
6,002,894
6,002,895
Subscribe delegates to all methods of a class
<p>I have just familiarized myself a little bit with C# delegates. One can subscribe multiple delegate instances to a delegate by the "+=" operator. But is it also possible to have a controller class that has delegates for all the methods in second class, and have the methods being added automatically, i.e. without hav...
c#
[0]
4,368,202
4,368,203
Javascript beginner: how to replace a href text if it matches a specified string?
<p>When someone posts a link to another page on my website, I'd like to shorten the a href text from something like: <code>http://mywebsite.com/posts/8</code> to <code>/posts/8</code> or <code>http://mywebsite.com/tags/8</code> to <code>/tags/8</code>. Since I'm learning javascript I don't want to depend on a library l...
javascript
[3]
5,830,676
5,830,677
std::string vs. char*
<p>does std::string store data differently than a char* on either stack or heap or is it just derived from char* into a class?</p>
c++
[6]
1,344,304
1,344,305
Pagination Standards
<p>Does anyone know of a defined standard for Pagination? We have a consultant company that buildt a website for us and part of the site has a list of items that uses pagination. They have a pretty standard pagination layout consisting of two buttons on either side of a list of numbers (links). </p> <pre><code>[&lt...
asp.net
[9]
409,159
409,160
Android Basic Authentication 2.2+
<p>HI,</p> <p>I am struggeling with Basic HTTP Authentication like I have seen many others..</p> <pre><code>public String getJSONObject() { try { String strURL = "deleted_manually_here"; StringBuilder result = new StringBuilder(); String base64EncodedCredentials = Base64....
android
[4]
2,508,969
2,508,970
can i hide our address bar url in asp.net
<p>help me, i want to hide my address bar url in my asp.net website.</p>
asp.net
[9]
1,046,714
1,046,715
Difference Between StreamWriter/Reader and StringWriter/Readerll
<p>Im very confused with the exact difference between them and different usage approach of these two TextWriter/Reader derived types StringWriter/Reader and StreamReader/Reader. I know that using them we can deal easily with character based data in stream avoiding byte fuss as working direclty using Filestream...</p>
c#
[0]
3,142,219
3,142,220
Best practices for creating an exception log file in PHP on a public website
<p>I am currently running on a homegrown PHP framework that outputs a nicely formatted HTML document with lots of great information when an exception is encountered and it is running in debug mode. </p> <p>When it is running in production on the public site, debug mode is off and it simply returns a proper message to...
php
[2]
3,357,289
3,357,290
is there a way NicEditor be on a subfolder and not outside the demo page folder?
<p>Hello I just want to know if I can put it on a subfolder instead ? When I tried to put it on subfolder or within the same folder of my page, it displays normal textare. But whenever I put it outside the folder it works fine. </p> <p>Just asking for convenience. </p> <p>Or if there is already an answer please tell ...
php
[2]
3,205,260
3,205,261
Convert number to Italian and Italian to number in python
<p>I need Python code to convert numbers to and from Italian. </p> <p>Looking at previous questions I learned that pynum2word does one way (num -> words) in several languages but alas, not in Italian.</p> <p>If no such code exist in Python, I wouldn't mind translating such code from Perl/Ruby/Java.</p> <p>Thanks.</p...
python
[7]
533,475
533,476
How to replace number data within a string to a different number?
<p>There is a string variable containing number data , say <code>$x = "OP/99/DIR";</code> . The position of the number data may change at any circumstance by user desire by modifying it inside the application , and the slash bar may be changed by any other character ; but the number data is mandatory. How to replace th...
php
[2]
2,951,892
2,951,893
ClassFormatError: Unknown constant tag in class XY
<p>I have a piece of code in which I try to load a class during runtime. The code is not all selfwritten so I have some problems understanding the error which always appers after compiling.</p> <p>Here the code:</p> <pre><code>private Class findClass(String s) throws ClassNotFoundException { URL u...
java
[1]
4,893,455
4,893,456
check if an input with specific type is selected
<p>I'm using the folowing code to check if an input field is selected but I don't no where the problems is, because it is not working!</p> <pre><code> &lt;html&gt; &lt;head&gt; &lt;title&gt;Test &lt;/title&gt; &lt;head&gt; &lt;body&gt; &lt;form &gt; &lt;input type="text" id="select" value="select"/&gt; &lt;/form&gt...
javascript
[3]
1,800,533
1,800,534
Automatically INotifyPropertyChanged
<p>Is there any way to automatically get notified of property changes in a class without having to write OnPropertyChanged in every setter? (I have hundreds of properties that I want to know if they have changed).</p> <p><hr /></p> <p>Anton suggests <a href="http://www.nablasoft.com/alkampfer/index.php/2008/08/04/im...
c#
[0]
1,840,058
1,840,059
Breakpoint problem in MS Visual C# 2008 Express Edition
<p>Whenever I place a breakpoint somewhere in my C# code file and then debug the program, the application stops responding. Everything's fine without the breakpoint. What gives?</p> <p>I am talking about VS. </p>
c#
[0]
173,847
173,848
Using variables in an array
<p>I have borrowed beautiful <em><a href="http://www.php.net/manual/en/function.time.php#105257" rel="nofollow">Cokidoo DateTime</a></em> class, that converts regular DateTime to "ago format".</p> <p>I'm developing multilingual web-site and wanted to replace <code>year ago</code>, <code>years ago</code>, <code>month a...
php
[2]
771,817
771,818
image rotator + zoomin jquery plugins
<p>Guys can you suggest me a jquery plugins that has both the image rotator and zoomin feature. I want a plugin that that both this feature..</p> <p>Thanks in advance</p>
jquery
[5]
257,282
257,283
Add remove class?
<p>Okay I have two classes for two links and two divs with different information. What I am trying to do is have it so when you click on one link it adds a 2 to both of the classes and makes the second div visable. When you click on the other link it takes off a 2 and makes the first div visable.</p> <p>Here is what I...
jquery
[5]
2,768,242
2,768,243
With C# Why would you use an accessor instead of just setting the varialbe equal to the property?
<p>For example</p> <pre><code>Public int Width { get { return Something.Width; } } </code></pre> <p>instead of </p> <pre><code>Public int Width; //later in the code Width = Something.Width; </code></pre> <p>or</p> <pre><code>Public int Width = Something.Width; </code></pre>
c#
[0]
4,323,782
4,323,783
Print File without print dialog box
<p>I need your help to print my locally saved file without using print dialog box , i tried out many cases but failed to do so. one case is like;</p> <pre><code>var pr = new PrintDocument(); pr.PrintController = new System.Drawing.Printing.StandardPrintController(); pr.PrinterSettings = new PrinterSettings(); pr.Print...
c#
[0]
812,356
812,357
BestWay to save small data incase of shutting down
<p>Every mintute I want to save some data incase of shutting down. the data is very small (words).</p> <p><strong>Notes:</strong></p> <ol> <li><strong>The file I save on, is writen concurrently, and Alot. Each thread will write something and then wont stop change it. Every new thread will add more text and change it'...
c#
[0]
2,506,455
2,506,456
How to scroll to a particular record in gridview which is in div
<p>I have a TextBox and a Button, and I have a quite long GridView (I don't want to page it), so I put it in a Div with vertical scroll bar enabled.</p> <p>I just want to enter search string in text box and if I click on button it should find the row where string matched and set its back color, and should scroll to th...
javascript
[3]
1,156,326
1,156,327
How to get whether jquery response is a file or not?
<pre><code>$(document).ajaxComplete(function(event, request, settings) { alert(request.responseText); }); </code></pre> <p>Here in this code, it is alerting both js,css file and the plain response. Is there anyway to get only the plain responses.</p>
jquery
[5]
4,641,429
4,641,430
Searching through a string trying to find &#39; in PHP
<p>I am using tinyMCE and, rather annoyingly, it replaces all of my apostrophes with their HTML numeric equivalent. Now most of the time this isn't a problem but for some reason I am having a problem storing the apostrophe replacement. So i have to search through the string and replace them all. Any help would be much ...
php
[2]
4,801,755
4,801,756
Run python from python without Popen or os.system
<p>I have a wrapper python script which repeatedly calls another python script via <code>os.system</code>. This works well enough, but there is quite a performance hit invoking the sub-shell and importing the modules again and again. How might I transform this to something more elegant and performant?</p> <pre><code>c...
python
[7]
5,212,468
5,212,469
How does the php snippet work?
<pre><code> $this-&gt;_config = parse_ini_file($configIniFile); </code></pre> <p>And this is the content of <code>$configIniFile</code>:</p> <pre><code>; &lt;?php exit; ?&gt; DO NOT REMOVE THIS LINE [database] host = localhost username = root password = dbname = ...
php
[2]
3,069,476
3,069,477
Is it possible to set a background png on a view and anchor it to the top and not scale in Android?
<p>I have an image, say 16px from our designer. I want to Set it as the background image on a view, but the view is larger than the image. So I want to anchor the image at the top of the view, and then have the view fill in the bottom with a solid color.</p> <p>Is this possible in the current version of android, 1.5...
android
[4]
4,404,102
4,404,103
Why would a language let programmer to handle divison by zero
<p>This happens in Javascript, for example, that division by zero is not handled by the language itself. Is there's a valid reason for this?</p> <p>I see this as a very basic exception that a language should be able to handle (they even handle 0/0 as NaN NaN).</p> <blockquote> <p>or take the square root of a negat...
javascript
[3]
1,842,389
1,842,390
ASP.NET Resource Reference Best Practices
<p>I'm relatively new to ASP.NET and was wondering if anyone could shed some light on when I should use relative references (e.g. ../images/banner_tinga.jpg) versus the tilde (e.g. ~/images/banner_tinga.jpg). Depending on the situation you can accomplish the same goal using either. What are the pros and cons of each me...
asp.net
[9]
198,268
198,269
Reading data from a various terminals using PHP
<p>I would like to know if there's by any chance a way to communicate with a POS device, a cash register and a magnetic card reader with PHP. By communications I mean reading the output of that device.</p> <p>Thank you.</p>
php
[2]
4,894,041
4,894,042
Converting an array of 0 and 1 to integer
<p>I have an array of integers which store only 1 or 0. Is there a direct function in python which would do it? Suppose the array is [0,1,0,1] then it should return 5.</p>
python
[7]
1,436,982
1,436,983
Android: How to solve slow response after clicking TabWidget
<p>I have four Tab at the top of my apps<br> The content of the fourth tab is that it will get data from sql server and then display in listview<br> since the amount of data retrieved is quite big, it takes 2-3 sec<br> The problem is that:<br> After I click the fourth tab, it has no response, then after 2-3sec, it disp...
android
[4]
2,040,270
2,040,271
Class Not Recognised as Return/Parameter Type
<p>I'm calling a simple method that receives an instance of one of my classes and returns another class instance. For some reason it doesn't recognise them in the method declaration but is fine with them within the method and before the method is called. Can't figure out a reason for this. Here is my code;</p> <pre><c...
c#
[0]
1,492,292
1,492,293
php path issue to transmit session info
<p>I have a pretty simple question but I am really new to php. I have just downloaded an interesting chat plugin called comechat. Precisely, there is a cometchat direvtoru that contains php files. The latter only need the $_SESSION['user'] to process. But it didn t and I think I have a path problem for my code to trans...
php
[2]
1,138,524
1,138,525
Chrome error: Uncaught SyntaxError: <unknown message reserved_word>
<p>Okay heres my problem:</p> <p>Im trying to extend the dom but for one of my prototype functions, it throws an error. The error is for the function hasClass. I used the reserved word Element earlier in that script so i dont understand why he is throwing the error only there?</p> <pre><code>Element.prototype.hasClas...
javascript
[3]
2,736,928
2,736,929
how to study C++
<p>i wangt to study C++,but i don't know how to begin.</p>
c++
[6]
5,732,509
5,732,510
iPhone SDK - Changing Xib files (partial curl)
<p>I am creating an iPhone app for iOS 4 using the newest SDK.</p> <p>On one of my pages I would like the user to click a thumbnail of a photo and then a partial curl transition style take affect to show a full sized version of the image. </p> <p>On the page with the full sized image I have a toolbar with a "Back" bu...
iphone
[8]
2,115,284
2,115,285
Lowercase and Uppercase with jQuery
<p>How can I lowercase a string with jquery, I tried this (chkIsHasKids is a checkbox):</p> <pre><code>var jIsHasKids = $('#chkIsHasKids').attr('checked').toLowerCase(); </code></pre> <p>not work</p> <p>any idea ?</p>
jquery
[5]
2,410,213
2,410,214
Android Image name change
<p>I am storing the captured image from camera into the DCIM/Camera folder.. I wanna to change the name of the image stored.. Here is my code...</p> <p>ContentValues values = new ContentValues();</p> <pre><code> Uri uri = getContentResolver().insert(Media.EXTERNAL_CONTENT_URI,values); Log.v("uri", uri+...
android
[4]
5,456,547
5,456,548
Define a lambda expression that raises an Exception
<p>How can I write a lambda expression that's equivalent to:</p> <pre><code>def x(): raise Exception() </code></pre> <p>The following is not allowed:</p> <pre><code>y = lambda : raise Exception() </code></pre>
python
[7]
3,251,284
3,251,285
Accessing regedit without admin rights
<p>I was wondering if i could run a program without administrator rights? I am trying to run the program regedit from System32. I have also tried copying it onto a USB and running it from there, and both have not worked. Can someone help me run regedit using C# script?</p>
c#
[0]
1,134,748
1,134,749
Do i need to delete objects that i set in class member when i replace them?
<p>I have the following:</p> <pre><code>class Manager{ public: void update(list&lt;Employe&gt; employees){ employees_ = employees; } private: list&lt;Employe&gt; employees_; }; </code></pre> <p>do i need to delete old employees in the end of update method?</p>
c++
[6]
3,737,498
3,737,499
static variable allocation time in .net
<p>When static variable is allocated i.e. when you declare class or at the time of object creation?</p>
c#
[0]
365,095
365,096
hide some form information without changing from GET to POST
<p>I have an array of ids and an array of corresponding values on a form. The user chooses the value on the screen but I am using GET on my form to get the ids. The problem is I need to convert the key back into the value on the second php page, except that the GET function did not send the value along with the id. ...
php
[2]
3,610,351
3,610,352
Activity isn't picking up new intent
<p>For various reasons, my app creates entries in the notification bar. When the user clicks on the notification, I want to display a custom activity that presents the entry in a certain format.</p> <pre><code>Intent intent = new Intent(applicationContext, TextMessageViewerActivity.class); intent.putExtra("text_messag...
android
[4]
4,652,838
4,652,839
how to show my current location with marker on google map in android
<p>please help. i have tried a code which should give my current location with marker on google map. but it is not working. i have give my location via DDMS and TELNET but still in dark. what should i do?? the code is:</p> <pre><code>package com.chupamobile.android.googlemaps; import android.location.Location; publi...
android
[4]
2,193,364
2,193,365
how to execute html tag in javascript
<p>my database calls certain functions by inserting commands inside angle brackets. i.e.&lt;#SUBMIT title="Request Report"> will create a button that submits form (criteria) data to the engine for reporting. </p> <p>Before that button gets clicked I want to check some date criteria so I have inserted an image link in...
javascript
[3]
3,290,503
3,290,504
Splitting a string in javascript
<p>In javascript, how can I get three different substrings for the date, month, and year from the following string: "12/15/2009" ? </p>
javascript
[3]
1,940,704
1,940,705
C# UseVisualStyleBackColor
<p>Is there a way in which I can change the button color and preserve the Windows VisualStyle? I want to create a button that looks like checkBox2 (color and style)<br/> <br/> <img src="http://i.stack.imgur.com/nNzKF.png" alt="alt text"></p> <pre><code>this.button2.BackColor = System.Drawing.SystemColors.GradientActiv...
c#
[0]
4,460,373
4,460,374
jQuery - applying .animate() to a row added using .after()
<p>So I currently use the following:</p> <pre><code>$.ajax({ type: "GET", url: "file.php", success: function(html) { $("#tableRow").after(html); } }); </code></pre> <p>which neatly adds a new row (or rows) to an existing table. file.php returns:</p> <pre><code>&lt;tr&gt;&lt;td&gt;stuff&lt;/td...
jquery
[5]
218,560
218,561
Syntax error on 'onBackPressed()'
<p>I am displaying a dialog box. When the back key pressed, I am writing a code and using back key default functionality, but every time I get following error, here is my code: </p> <pre><code>public void myfunc { new AlertDialog.Builder(TaxiPlexer.this).setIcon(android.R.drawable.ic_dialog_alert).setTitle("En...
android
[4]
1,774,864
1,774,865
Javascript Resize Image not working
<p>I have JS which resize the <code>width</code> and <code>height</code> of Image which is working fine if I used Alert before assigning the actual image src to the image object and if I omit the alertbox, it is not working. Please suggest me how to fix it. </p> <p>` </p> <pre><code>&lt;html&gt; &lt;hea...
javascript
[3]
219,904
219,905
Is there any wordpress plugin to upload images and captions to multiple pages once
<p>Hi I have a couple of pages that need the same images and captions, is there a wordpress plugin that would allow this on 1 upload?</p>
php
[2]
4,079,849
4,079,850
Communicate with android RIL
<p>I'm looking to get access to get low level network information on an android device that isn't available through the api. Is there a way to talk to the RIL to get more information?</p>
android
[4]
3,915,716
3,915,717
main function stack size
<p>Max function stack size is limited and can be quickly exhausted if we use big stack variables or get careless with recursive functions.</p> <p>But main's stack isn't really a stack. main is always called exactly once and never recursively. By all means main's stack is static storage allocated at the very beginning ...
c++
[6]
3,609,281
3,609,282
Change Window State to Fullscreen
<p>How can I change the web browser window state to Fullscreen in javascript(Like when user press F11)? I know how can I specify Window State of new Window that has been opened by Window.Open Method but I want to change the sate of current Window.</p>
javascript
[3]
4,644,191
4,644,192
getElementID dont work on chrome
<p>I have a code like this: </p> <pre><code>parent.document.getElementById("test").value ="1"; </code></pre> <p>but it doesnt work on chrome. The error is:</p> <blockquote> <p>"Uncaught TypeError: Cannot call method 'getElementById' of undefined"</p> </blockquote> <p>any help is apreciated thanks in advance! :...
javascript
[3]
4,295,403
4,295,404
how to display complete Bitmap in android using Canvas?
<p>friends,</p> <p>i am using following onDraw method to display bitmap on screen.</p> <pre><code> @Override public void onDraw(Canvas canvas) { Bitmap _scratch = BitmapFactory.decodeResource(getResources(), R.drawable.icon2); //ImageView img= new ImageView(Tutor...
android
[4]
554,632
554,633
built-in Java classes/methods to convert between binary, decimal, and octal?
<p>i know of several general formulas for converting between binary, decimal, and octal, but i was wondering if java has any built-in methods or classes that convert between the three. for instance, in the Integer class, there are static methods such as toBinaryString, toOctalString, etc which allow for decimal convers...
java
[1]
4,507,593
4,507,594
Google admob errod on return ad
<p>I keep getting this error in my debug when ads are about to be displayed.</p> <pre><code>07-16 14:35:29.630: INFO/Ads(12137): onFailedToReceiveAd(Ad request successful, but no ad returned due to lack of ad inventory.) </code></pre> <p>What does this mean and how do i fix it?</p>
android
[4]
2,266,582
2,266,583
Retrieve data from dynamically generated form
<p>I'm trying to use a dynamically created form to edit content on a page. I retrieve information from a DB table (in this case image captions) and display them in text areas ready to be edited and saved back into the DB.</p> <p>This seems to do the job of organizing and displaying the form:</p> <pre><code>echo"&lt;f...
php
[2]
629,203
629,204
Start Function if input length > 3 characters
<p><strong>Part 1:</strong> I want the .highlight() fonction to be active only when the input length is larger than 3. After 3 characters, I want every keystroke to look in the body for this value and apply the .highlight() function (which works fine when using a static value). I am using it as a find in page function....
jquery
[5]
408,042
408,043
Are there any alternatives to COM+ transaction based data-access layer?
<p>We are using our data-access layer with COM+. It's suboptimal. But the reasons to keep it are that it's transaction-secure. Are there any other alternatives to transcation-secure data-access handling? </p>
asp.net
[9]
4,831,367
4,831,368
Find an element by class name, from a known parent element
<p>I want to find an element by class name. I know it will appear in a particular parent div, so rather than search the entire dom, I'd like to search only the particular div. I am trying this, but does not seem to be the correct syntax:</p> <pre><code>var element = $("#parentDiv").(".myClassNameOfInterest"); </code><...
jquery
[5]
798,710
798,711
How to print the strings in an array?
<p>At the moment I have an array of </p> <pre><code>public Module[]moduleArray = new Module[4]; </code></pre> <p>and to output it i'm using </p> <pre><code>public void displayModules() { for (int i = 0; i &lt; moduleArray.length; i++) { System.out.println(moduleArray[i]); } } </code...
java
[1]
5,737,906
5,737,907
How can I verify that a user enters an integer or alphabetic character in Java?
<p>I am accepting an input from user as an integer using <code>Scanner.nextInt()</code>. How do I verify that he enters an integer, and not an alphabetic character?</p>
java
[1]
4,530,107
4,530,108
Jquery first table, last row selection
<p>I'm having issues with the <code>tr:last</code> selector.</p> <p>I have a basic table:</p> <pre><code>&lt;table id="myTable"&gt; &lt;tr&gt; &lt;td&gt;1&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>When the user clicks on a link, It adds an addtional row to my table using:<...
jquery
[5]
4,514,917
4,514,918
how can I use biginteger in java
<p>i have this code and i want to change it to BigInteger</p> <pre><code>import java.util.*; public class Euclid { long TIME; long start = System.currentTimeMillis(); private static final String EXCEPTION_MSG = "Invalid value (%d); only positive integers are allowed. "; public static int getG...
java
[1]
647,245
647,246
Multiple 'endings' to a function - return an object, return a string, raise an exception?
<p>This one's a structure design problem, I guess. Back for some advice.</p> <p>To start: I'm writing a module. Hence the effort of making it as usable to potential developers as possible.</p> <p>Inside an object (let's call it <code>Swoosh</code>) I have a method which, when called, may result in either success (a n...
python
[7]
3,743,161
3,743,162
Determine whether an number is one greater or one less than another in a circular set
<p>I am kicking myself for having to ask this ...I can solve this with a couple of simple 'if' statements, but I am sure there is a simpler way!</p> <p>I have a paging control which allows the user to move one page left or one page right. Each page has an index. The pages cycle, therefore if you have three pages and y...
c#
[0]
452,230
452,231
python logging.info does not print, logging.warn and logging.error does
<pre><code>import logging if __name__ == "__main__: logging.info('info') logging.warn('warning') logging.error('error') </code></pre> <p>Result: </p> <pre><code>warning error </code></pre> <p>Why does <code>logging.info</code> doesn't report? </p> <p>Thank you</p>
python
[7]
321,830
321,831
c# beginner: compiling from command line
<p>i am following this tutorial:</p> <p><a href="http://www.csharp-station.com/Tutorials/Lesson01.aspx">http://www.csharp-station.com/Tutorials/Lesson01.aspx</a></p> <p>i pasted this into a text file, named it Welcome.cs:</p> <pre><code>// Namespace Declaration using System; // Program start class class WelcomeCSS ...
c#
[0]
88,415
88,416
Passing variables between modules
<p>I'm wonder why this simple code doesn't work.</p> <p>In main.py I have</p> <pre><code>def foo(): HTTPHelper.setHost("foo") host = HTTPHelper.host() </code></pre> <p>and in HTTPHelper.py:</p> <pre><code>_host = None def setHost(host): _host = host def host(): return _host </code></pre> <p>But whe...
python
[7]
4,799,803
4,799,804
jQuery validation: .each with form
<p>If I have a form of about 40 questions, how do I apply the same rules to questions 1-20, and 21-40?</p> <p>For example:</p> <pre><code>$("#form_survey").validate({ rules: { a_ +i: {max:12, maxlength:2}, }, messages: { a_ +i:{ max: "That's too much!" } } </cod...
jquery
[5]