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 |
|---|---|---|---|---|---|
3,735,445 | 3,735,446 | Problems with MessageBox | <p>I have some code for a MessageBox, but I get a red line below the code and also in the beginning of the class at using System.Windows.Forms!?</p>
<p>Isn't it enough to add the using System.Windows.Forms to show MessageBoxes? Or could I have missed something else? Hints are preciated! Thanks! </p>
<p>EDIT:</p>
<p>... | c# | [0] |
5,208,895 | 5,208,896 | How to display a certain portion of a site depending on a javascript variable? | <p>Suppose I have a javascript variable "is_valid"</p>
<p>If the variable is 1, I'd like to display:</p>
<pre><code><div>It's valid!</div> ...and a big chunk of other code
</code></pre>
<p>Otherwise...</p>
<pre><code><div>NOT valid</div>...and a big chunk of other code
</code></pre>
<p>I do... | javascript | [3] |
5,036,761 | 5,036,762 | Deleting nullptr - performance overhead? | <p>Operator delete checks itself if the pointer is nullptr. Is there any performance overhead when calling delete on a nullptr without checking it yourself?</p>
<pre><code>delete ptr;
</code></pre>
<p>or</p>
<pre><code>if (ptr != nullptr) delete ptr;
</code></pre>
<p>Which of the above executes faster if ptr is nu... | c++ | [6] |
1,357,267 | 1,357,268 | No resource found that matches the given name '@android:style/AlertDialog' error after the latest android 3.2 sdk update | <p>I ran into the following error after upgrading my <code>android sdk</code> to 3.2:</p>
<pre><code>-resource-src:
[echo] Generating R.java / Manifest.java from the resources...
[aapt.exe] c:\jenkins\workspace\AndroidAppBranch2.0_conversion\res\values\themes.xml:11: error: Error retrieving parent for item: No resou... | android | [4] |
760,859 | 760,860 | Android development | <p>I plan to work with android. Please point me some good books and blogs/discussion/tutorials/ forums for getting vast and in depth knowledge quickly about this android technology.</p>
| android | [4] |
1,191,063 | 1,191,064 | I cannot get ADB to see my Nexus One device | <p>Mac OSX 10.6.4
Nexus One Android 2.2
The command adb devices will list my emulators and also my Droid Eris (Android 2.2) but nothing shows for the Nexus One</p>
<p>I have searched extensively and failed to find any answer or suggestions, any help most welcome</p>
| android | [4] |
3,202,385 | 3,202,386 | PHP magic_quotes_gpc = off but slashes are still added | <p>magic_quotes_gpc has been set to off and confirmed by phpinfo(), but content is still inserted into the database with slashes</p>
<p>Note: I'm using mysql_real_escape_string() to insert each value, I have tested this function to see if it's causing any issues but it made no changes to the value inserted into the da... | php | [2] |
5,898,210 | 5,898,211 | java file writing within shared folder | <p>How to write excel sheets in the shared network folder using Java API.I think before writing the files ,first program should authenticate it.</p>
<p>Please provide any hints.</p>
| java | [1] |
4,312,381 | 4,312,382 | Android modal application? | <p>I'm looking at making an application which doesn't yield to the home button when the button is pressed. Logically speaking I doubt this behavior is possible for security reasons (to prevent phones being hijacked). It is however an important feature for my app which is being written to help my mentally handicapped un... | android | [4] |
4,214,290 | 4,214,291 | Multiple statements inside a conditional operator | <p>HI,
I need to write multiple statements inside a conditional operator.</p>
<p>What will be the equivalent of this if condition with conditional operator</p>
<pre><code>var name;
var age;
var passed;
if ( arg == "first" )
{
name = "John";
age = "25";
passed = false;
}
else
{
name = "Peter";
... | javascript | [3] |
1,029,299 | 1,029,300 | onBackPressed to hide Not destroy activity | <p>i know how to cancel back keypress, so that the activity / main window stays visible:</p>
<pre><code>public void onBackPressed() {
return;
}
</code></pre>
<p>my aim is to hide the activity, however, without finishing it, how do you do that in the onBackPressed event? </p>
<p>i.e. I would like to ... | android | [4] |
4,855,766 | 4,855,767 | How do I "translate" characters typed via JQuery? | <p>I need to somehow change the character typed into a different utf8 character and was wondering how it can be achieved with jquery? Basically when some inputs are focused, I want to have English letters typed translated into other predefined character. Any ideas?</p>
| jquery | [5] |
4,609,092 | 4,609,093 | UTRAN Cell Identity returned by getCid() | <p>In UMTS I get a large number returned by <code>getCid()</code> (larger than the allowed value). Is this the UTRAN Cell Identity (UC-ID)?</p>
<pre><code>UC-Id = RNC-Id + C-Id
</code></pre>
<p>Does someone knows that? How to get the <code>C-Id</code> from the <code>UC-Id</code>?</p>
<p>Thanks and Best,
Benny</p>
| android | [4] |
1,588,462 | 1,588,463 | Debug fails but works in other cases | <p>WHy do I always get |Access is denied| exception during debug ?</p>
<pre><code>foreach(Process p in Process.GetProcesses())
{
string module=p.MainModule.Filename;
}
</code></pre>
<p>Whatever process it is, the exeption's always called.
But it works if I just start without debugging.
I'd like to get the full pa... | c# | [0] |
5,335,757 | 5,335,758 | does javascript require ';' at the end of a line of code? | <p>I have seen and used javascript code that both has and omits the ';' from the end of statements. Are they required in some cases and not in others? If so can you give some examples, and if not what is the general standard, to use the ';' or to not...that..is the question??</p>
| javascript | [3] |
5,631,403 | 5,631,404 | setInterval Variable Scope | <p>I have a variable declared at the top of my function as <code>this.current_test = null;</code> and then down the line I have a setInterval function and I need to set the variable to a new parameter...</p>
<p><code>this.current_test.failed = true;</code></p>
<p>Code:</p>
<pre><code>timer = this.window.setInterval(... | javascript | [3] |
4,201,938 | 4,201,939 | Create Buttons for activity in code | <p>I dont't see last button (bx), when first button array too big, for example size is 12, when size is 2 I see it. Why button doesn't transition to second row.</p>
<pre><code>protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
LinearLayout linLayout = new ... | android | [4] |
560,758 | 560,759 | how to access the instance variables of one class to be used in another class? | <p>Suppose we declare and define the variable in one class let say FirstClass and we want to use that variable in another class let say SecondClass which is outside of FirstClass .how to do this? </p>
| asp.net | [9] |
691,787 | 691,788 | How to get width of the container in which my view is added in Android | <p>I have a ImageView object inside a LinearLayout. I'm setting an animation to the ImageView which will move image view from point x to y. Now, starting point should be right corner of parent container. My question is , how do i get the dimension of the container in which the view is present. I don't see view.getParen... | android | [4] |
5,868,108 | 5,868,109 | jQuery method to click on image/caption or <li> to go to URL | <p>I'd like to use an image slider plugin (Elastislide) as a menu. The problem is that it uses <code><a href="#"></code> as a function and can't be used as a link. I've tried. So, I'm looking for a jQuery solution to use the images/captions or a <code><li></code> as a pseudo-link.</p>
<p>The pages are all ... | jquery | [5] |
2,014,230 | 2,014,231 | Unexpected result when checking network reachability | <p>In my app I implemented the code for network reachability.
This is my code.</p>
<pre><code>-(void)viewDidLoad {
// Test for internet.
gotInternet = [self checkInternet];
if (gotInternet == NO) {
// No Internet.
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Connection Error" message:@"The interne... | iphone | [8] |
5,703,210 | 5,703,211 | Java: enough free heap to create an object? | <p>I recently came across this in some code - basically someone trying to create a large object, coping when there's not enough heap to create it:</p>
<pre><code>try {
// try to perform an operation using a huge in-memory array
byte[] massiveArray = new byte[BIG_NUMBER];
}
catch (OutOfMemoryError oome) {
/... | java | [1] |
3,240,358 | 3,240,359 | About session expire if user don't do any action for sumtime | <p>Can anyone give be the code of session expire if user dont do any activity for 15mins, if no activity[like mouse move,scroll,click] is done then the session should expire </p>
<p>I have tried the following:</p>
<pre><code>$_SESSION['start'] = time();
$_SESSION['expire'] = $_SESSION['start'] + (45 * 60);
if(isset($... | php | [2] |
3,161,316 | 3,161,317 | how to create an callback method in my own application whenspecific situation arises(based on my own requirement) in ANDROID | <p>I am developping one android application.where some third party provides button to My view.My view actually displays the camerapreview.So when that button is clicked I want to give some call back method giving back the information of the picture.</p>
<p>So how to create a callback in my application and provide it t... | android | [4] |
4,524,389 | 4,524,390 | pythonic way to write this code | <p>I have this ugly piece of code..</p>
<pre><code> orders = got_something_from_db()
if orders:
for order in orders:
#print order
event_id = order["event_id"]
if event_id in event_id_dict: # something i grabbed earlier
product_id = order["product_id"] # products in an event
... | python | [7] |
4,325,456 | 4,325,457 | Condition to test if a word exists in window.location.href | <p>I want to test if a word ["sublanguageid-all" to be specific] is present in the current address of the page using an 'if' condition.
I've tried /sublanguageid-all/g, but I'm not able to put it in an if-statement</p>
| javascript | [3] |
4,630,622 | 4,630,623 | how to handle single click and double on same button in mfc? | <p>In my VC++ project I am using a button in dialog. I already add single click event of a button. Now I want to handle double click event of the same button. So I add
ON_BN_DOUBLECLICKED( IDC_BUTTON1, OnDBClick ) for the same button.
But it is not working. Can anyone explain it?</p>
| c++ | [6] |
3,877,909 | 3,877,910 | extra space being added in array output | <p>I'm trying to create a custom function to take a array and add comma. Like for a location or list of items.</p>
<pre><code>function arraylist($params)
{
$paramlist = reset($params);
while($item = next($params))
{
$paramlist = $item . ', ' . $paramlist;
}
return $paramlist;
}
$location =... | php | [2] |
5,475,865 | 5,475,866 | How to get corresponding value of key in JavaScript | <p>I have this code:</p>
<pre><code>var getValuesArray = [];
var setValuesArray = [];
function SetValueJson(key, value, scormVersion, methodCalled)
{
if (key1 != null) {
var obj = {
key: key1,
value: value1
}
setValuesArray.push(obj);
alert("pushing the key as: " + setValuesArray[key] + "... | javascript | [3] |
4,085,330 | 4,085,331 | Printing a word every X seconds | <p>I just started learning how to use interfaces and I was trying to figure out how to print a particular word (in this case "Howdy") every 10 seconds. I used the <code>TimerTask</code> and <code>Timer</code> classes in order to schedule my task to run every 10 seconds, but am I doing it the right way?</p>
<pre><code>... | java | [1] |
3,500,760 | 3,500,761 | call back function inside onButton click | <p>I have a gui application that passes a "Connect" callback function to an API function inside of a class library, I need to access that callback function inside of an event handler. Here is what I got so far:</p>
<p>Gui:</p>
<pre><code> public bool ConnectI2CFn(int selected_index)
{
return true;
... | c# | [0] |
4,088,305 | 4,088,306 | problem while using extern variable | <pre><code>//FILE 1
char *ptr="Sample";
void SomeFunction() {
cout<<ptr<<endl;
}
//FILE 2
void SomeFunction();
int main()
{
extern char ptr[];
SomeFunction();
cout<<ptr<<endl;
}
</code></pre>
<p><code>ptr</code> in the main function is printing some garbage value. please let me know... | c++ | [6] |
2,762,080 | 2,762,081 | Canvas: clear rect but keep the rest of the content | <p>I want to draw some text onto my canvas and want to clear everything which was drawn out of a specific area (area defined by a Rect). </p>
<p><img src="http://i.stack.imgur.com/47X6p.png" alt="enter image description here"></p>
<p>I draw the magenta-Text and want to clear everything in the grey and keep everything... | android | [4] |
3,499,375 | 3,499,376 | how to read value from UITextFiled | <p>i am making a temperature converter as iphone application can someone help me that how can i read a value entered in textfield of iphone through keyboard for conversion</p>
| iphone | [8] |
4,905,263 | 4,905,264 | JQUery validation plugin for checking data availability | <p>I am learning how to use JQuery validation plugin,
I got a simple input text field like this:</p>
<pre><code><input type="text" name="username">
</code></pre>
<p>But I don't know how to use this plugin to do some data availability tasks.</p>
<p>Could you help me please?</p>
| jquery | [5] |
3,358,263 | 3,358,264 | Clickable panel problem | <p>How to implement something like this in android ?</p>
<p><img src="http://i.stack.imgur.com/AWsim.png" alt="enter image description here"></p>
<p>There are three different panels ( I need one to implement), I will have matrix of this stuffs, so I need first to figure out how to draw one . I need to implement pane... | android | [4] |
1,788,765 | 1,788,766 | How to Access Database on Android Emulator Device | <p>I'm developing an Android application and using SQLite. </p>
<p>I would like to access the database and run some SQL queries on the emulator handset for debugging purpose. How to do this?</p>
| android | [4] |
2,949,284 | 2,949,285 | Parsing all files(doc/docx) from a directory one by one to a program C++ | <p>I'm new to C++ and programming; and lately have to work with C++ and my knowledge is quite limited. Any help would be appreciated </p>
<p>I'm trying write a code in C++ to Parse (doc/docx) files from a directory (1 by 1 ) ; let say "Desktop" to a program that takes file as an input </p>
<p>1) search the selected ... | c++ | [6] |
5,559,715 | 5,559,716 | how can i find my .net frame work version | <p>how can i find the version of my .net frame work</p>
| asp.net | [9] |
2,537,282 | 2,537,283 | storing value Turbo C++ | <p>I am currently trying to get my program to store a value so that it can display that value whenever there is an error. Here is my program :</p>
<pre><code>void function()
{
float abc[2];
int i = 0;
if ( i/2 != 0 )
{
i++;
abc[0] = 1;
}
abc[1] = abc[0];
cout << abc[1]... | c++ | [6] |
4,837,816 | 4,837,817 | JQuery Update text in a select dropdown list | <p>I am trying to update the text of one of the options on a select dropdown after an action on my page. Does anyone know how to do this in jquery? I have tried this:</p>
<pre><code>$("#selectid").text("newtext");
</code></pre>
<p>But that will remove all of the other options in the select list and it makes it blank... | jquery | [5] |
4,869,756 | 4,869,757 | PHP array function that matches this foreach loop | <p>PHP have all sort of built in array functions.
So I'm wondering if there is a function that is equivalent to the foreach loop in this code.</p>
<pre><code>$args = array('var1', 'var2');
$args2 = array('var3', 'var4', 'var5', 'var6');
foreach ($args2 as $arg) {
$args[] = $arg;
}
</code></pre>
| php | [2] |
3,906,542 | 3,906,543 | Checking if CheckBoxList has any selected values | <p>I would like to know the fastest/easiest way to check if a CheckBoxList control has any checked items or not, I'm talking about an entire checkbox list as a whole, not a single checkbox.</p>
| asp.net | [9] |
2,092,953 | 2,092,954 | Android URL fetch and parse from sample - error | <p>I'm trying a simple example : <a href="http://www.vogella.com/articles/AndroidJSON/article.html" rel="nofollow">http://www.vogella.com/articles/AndroidJSON/article.html</a></p>
<p>But got an error .. Can anyone tell me why I get this error : <a href="http://puu.sh/1mGz1" rel="nofollow">http://puu.sh/1mGz1</a></p>
| android | [4] |
4,296,327 | 4,296,328 | How to set style(small and large) to Button programmable way? | <p>How to set style(small and large) to Button programmable way ?</p>
<p>Is it possible ? </p>
<p>I can set the style to the Button from xml resource (like styte= ?android:attr/buttonStyleSmall).
But I don't know how set it programmable way.</p>
<p>Thanks in advance. </p>
| android | [4] |
5,184,368 | 5,184,369 | Why does C style cast allow you to convert to a private base class? | <p>Say we have this code</p>
<pre><code>class A {
public:
A() : x(1) {}
virtual ~A() {}
int x;
};
class B {
public:
B() : y(2) {}
virtual ~B() {}
void g()
{
cout << "B::" << y << endl;
}
int y;
};
class C : private A, private B {
public:
void f()
... | c++ | [6] |
5,038,325 | 5,038,326 | android video playback | <p>I'm new to android.
Can anyone help me how to display images from the Sd Card or play videos from Sd Card..
I tried it many ways but none of it is working..</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="f... | android | [4] |
3,511,795 | 3,511,796 | splitting of xml file using c# | <p>I am using c# and am creating xml from an external data source and saving the xml as a single xml file. How can I split the xml up and save it as multiple xml files? For example, say there are 263 records in my xdocument xml. I need to split that into multiple xml files containing exactly 25 records. (That's the... | c# | [0] |
819,604 | 819,605 | Is using strings this way inefficient? | <p>I am a newbee to c++ and am running into problems with my teacher using strings in my code. Though it is clear to me that I have to stop doing that in her class, I am curious as to why it is wrong. In this program the five strings I assigned were going to be reused no less than 4 to 5 times, therefore I put the text... | c++ | [6] |
461,393 | 461,394 | jQuery objects, getting element value from a parent attr? | <p>This code:</p>
<pre><code>$el.parent().html()
</code></pre>
<p>Writes out as: </p>
<pre><code><input type="checkbox"> <span>Finish This</span>
</code></pre>
<p>If I want to get the value of the span in the parent attribute how do I do this?</p>
<p>I've tried this:</p>
<pre><code> $el.parent()... | jquery | [5] |
4,682,233 | 4,682,234 | PHP - why doesn't count() work like strlen() on a string? | <p>A string is an array of characters, correct? If so, then why does <code>count()</code> not produce the same result as <code>strlen()</code> on a string?</p>
| php | [2] |
2,044,102 | 2,044,103 | Login page first before being able to download a file | <p>I am new to ASP.NET and web application developing. What I'm trying to implement is, I am storing a file on the web server and is supposed to give the link of the file to the user for them to download the file. The link and the "downloading" process is easy but I wanted to make it more secure like having the link ... | asp.net | [9] |
644,816 | 644,817 | getResources().getIdentifier problem | <p>In one activity, there are 1 text view and 1 image view. I have to display number of data for different images. I have stored the data in string-array in strings.xml. My code is working fine for them. Problem is with images. I have stored images in R.raw folder. How can I get the images in image view so that for eve... | android | [4] |
4,005,536 | 4,005,537 | How to return to main activity after being three activities down? | <p>My app has four activities; MainActivity, ListActivity1 (L1) , ListActivity2 (L2), ListActivity3 (L3). From Main, the user goes down to L1 by clicking a button. After selecting an item in L1, user comes to L2 and then L3 after selecting an item in L2. In L3, when selecting an item a Yes/No-toast is launched. If user... | android | [4] |
1,304,280 | 1,304,281 | how to change default orange color when press button any one tell me | <p>how to change the default color orange when tyoping text in edittext field or press button how that color will change? any help?? this is my xml below when i run this code default orange color is appear on border of edittext and when pressing button</p>
<pre><code> <LinearLayout xmlns:android="http://schem... | android | [4] |
5,937,275 | 5,937,276 | jquery change() alert fires 6 times for one click? | <pre><code>jQuery(document).ready(function($)
{
$('.c5sliderSelect').change(function()
{
alert('change clicked');
});
});
</code></pre>
<p>When I change the select list item, I get 6 alerts. Not sure why. I only have one element in the markup with this classname and the select list has 10 option i... | jquery | [5] |
4,124,677 | 4,124,678 | Dispatch events to child | <p>I have a ListView containing items with one button each and I want to handle user events in this order:</p>
<ol>
<li>TouchEvent on <em>ListView</em>.</li>
<li>TouchEvent on <em>ListItem</em>.</li>
<li>Click on Button inside <em>ListItem</em>.</li>
</ol>
<p>How can I do this?</p>
| android | [4] |
1,222,917 | 1,222,918 | Pop-Up Window on Parent Window from iFrame Button | <p>If I have a button within a iframe, how can I create a pop-up window that will appear as part of the parent window and not within the iframe window, when I press on this button, within the iframe?</p>
<p>Thanks.
Tony.</p>
| javascript | [3] |
4,960,336 | 4,960,337 | Split a string only the at the first n occurrences of a delimiter | <p>I'd like to split a string only the at the first n occurrences of a delimiter. I know, I could add them together using a loop, but isn't there a more straight forward approach?</p>
<pre><code>var string = 'Split this, but not this';
var result = new Array('Split', 'this,', 'but not this');
</code></pre>
| javascript | [3] |
4,851,453 | 4,851,454 | using Threadpool.QueueWorkItem in Asnychronous Handler | <p>This MSDN <a href="http://msdn.microsoft.com/en-us/library/ms227433.aspx" rel="nofollow">example</a> for an Asynchronous Handler starts the new thread using ThreadPool.QueueUserWorkItem.</p>
<p>I thought that you should not use ThreadPool.QueueUserWorkItem to start the new thread as the thread is taken from the ASP... | asp.net | [9] |
4,559,578 | 4,559,579 | jQuery - detect mouse out of new element | <p>I've built a menu using jQuery which shows a new element fading in when the user hovers the mouse over the element and fades it out when they move the mouse away. Now, I've moved the element up so it covers the original element which is causing the problem that the second hover event is triggered when the new elemen... | jquery | [5] |
1,976,994 | 1,976,995 | code help for stored procedure dll class | <p>i m making dll class for stored procedure as...help me to correct it...my boss said that i m missing parameter values to return but i m not getting anything to correct it...</p>
<pre><code>public class transactionService
{
SqlConnection cs;
private void OpenConnection()
{
cs = new SqlConnection();
cs.Connect... | c# | [0] |
587,358 | 587,359 | Show TextView when pulling down a ListView | <p>I'm not sure if this is possible but I want to show a TextView that would be on top of a ListView but not shown, when I pull down the ListView the TextView reveals itself, if I let go the TextView hides again. Any help is appreciated.</p>
| android | [4] |
4,402,636 | 4,402,637 | Location based messaging | <p>Im doing a project on location based services, in which i have the following conditions
Set Location manually ( With a radius )</p>
<p>On reaching that location i need to trigger SMS activity</p>
<p>please tell how to go about doing this.</p>
| android | [4] |
1,701,932 | 1,701,933 | jQuery, do something while form is posting or in action | <p>I got the following form:</p>
<pre><code><form name="x" method="post" action="/message.jsp" onsubmit="validate(this)">
<input type="button" name="Export" value="Export" onclick="this.form.action='ReportExecute.jsp';this.form.submit();">
</form>
</code></pre>
<p>What I want to do is, I am trying... | jquery | [5] |
3,778,904 | 3,778,905 | Can I check if e-mail address is valid? | <p>How can I implement following logic?</p>
<ul>
<li><p>User registers with an e-mail address</p></li>
<li><p>If provided e-mail address is a valid
email address Then user account get's
activated</p></li>
<li><p>or if it is a fake email then user
account is not activated</p></li>
</ul>
<p>I doubt that I can catch ... | php | [2] |
1,823,720 | 1,823,721 | error: missing } in xml expression for exeternal javascript? | <p>I write external js and write JSON string in js file want to parse main html file's js tag but it gives like</p>
<p><code>**error: missing } in xml expression**</code></p>
| javascript | [3] |
213,114 | 213,115 | NSString to NSArray | <p>i get the following value as a string format.</p>
<pre><code> getcommands=(
{
"created_time" = "2011-01-18T10:44:14+0000";
from = {
id = 100001511725982;
name = "ABC Welcomes U";
};
id = "100001511725982_158433587542247_1658635";
message = Nice;
},
{
"creat... | iphone | [8] |
3,888,096 | 3,888,097 | subdomain with rewriteModule | <p>hi
i'm using this rule for rewriting subdomain</p>
<p>
</p>
<p>and i'm corrected host file to</p>
<p>127.0.0.1 domain.net</p>
<p>when user typed news.domain.net/default.aspx it must return domain.net/news/default.aspx but browser showed Address not found.</p>
<p>how do i?</p>
<p... | asp.net | [9] |
3,400,098 | 3,400,099 | Android third party GUI widget vendors | <p>In my MFC user interface programming days you could purchase all kinds of cool screen widgets from 3rd party vendors to integrate into your Visual Studio and use in creating your screens. Fancy buttons, meters, control knobs, etc... I can't seem to find anyone doing that for Android. Does anyone know of any vendo... | android | [4] |
3,142,545 | 3,142,546 | How to change this code? | <pre><code>#include <iostream>
#include <string.h> // for strlen
#include <stdlib.h> // for atoi
#include <sstream>
void expand_combinations(const char *remaining_string, std::ostringstream& i, int remain_depth)
{
if(remain_depth==0)
{
std::cout << i.str() << std:... | c++ | [6] |
1,179,880 | 1,179,881 | Add HTML element after text | <p>I am looking for a way to add an HTML element using JavaScript. But the problem is that the new element might be in between some text. In all other cases I'm using the insertBefore() method.</p>
<p>I am using the following function to get the cursor position.
My initial approach was to split the target innerHTML a... | javascript | [3] |
134,648 | 134,649 | Simple condition that returns true if document.activeElement = "" | <p>I need to know if the selected element has an ID. </p>
<p>What am I doing wrong?</p>
<pre><code> var selected = document.activeElement;
if (selected.id = "") {
document.getElementById('test3').innerHTML= "is blank";
}
</code></pre>
<p>Thanks</p>
| javascript | [3] |
4,903,644 | 4,903,645 | Parse html from loadHTML, how to loop through cols? | <p>I'm trying to parse HTML from loadHTML but I'm having trouble, I managed to loop through all <code><tr></code>s in the document but I don't know how to loop through the <code><td></code> s on each row.</p>
<p>This is what I did so far:</p>
<pre><code>$DOM->loadHTML($url);
$rows= $DOM->getElements... | php | [2] |
4,688,496 | 4,688,497 | Want java code for calculating time between various logs | <pre><code>[Tue Jun 21 16:09:27.530 2011] request_suspend_state: sleep (0->3) at 263958221465 (2000-01-01 00:04:22.124816866 UTC)
[Tue Jun 21 16:09:27.530 2011] WARNING omaplfb (OMAPLFBPresentSync 235): Unable to sync with display 1!
[Tue Jun 21 16:09:27.530 2011] stop_drawing_early_suspend: timeout waiting for user... | java | [1] |
1,357,701 | 1,357,702 | Am I failing to follow the standard? | <p>If I have something like this:</p>
<pre><code>MyStruct clip;
clip = {16, 16, 16, 16};
</code></pre>
<p>I get the following warning from the compiler:
warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x</p>
<p>If I active -std=c++0x in the compiler, it does not give any warning. But... | c++ | [6] |
470,517 | 470,518 | Why does iterating over jQuery objects with .each() not give me jQuery objects? | <p>The following works as expected:</p>
<pre><code>$(".foo").first().text("hi!")
</code></pre>
<p>...because <a href="http://api.jquery.com/first/" rel="nofollow"><code>first()</code></a> returns a jQuery object.</p>
<p>However, if I want to work with the <a href="http://api.jquery.com/text/" rel="nofollow"><code>te... | jquery | [5] |
1,917,655 | 1,917,656 | Android Background Service with Task Queue | <p>My app needs a background service, where I can submit tasks to. The tasks can be quite generic, it might involve downloading feeds, fetching location one time, or fetching resources.This service needs minimal interaction from the activities and it should be started when the app launches and should quit if there is n... | android | [4] |
1,238,043 | 1,238,044 | How can mute the audio recorder sound and donot affect the visualizer in android | <p>I developing audio recorder application.I want to display visualizer for audio recorder.In android ginger bread audio recorder have no <strong>Sessionid()</strong> method.So pulling audio recorder buffer data into audio tracker to play and show visualizer.how can mute the audio tracker sound without affecting visu... | android | [4] |
5,849,661 | 5,849,662 | string replace vowels in python? | <p>Expected:</p>
<pre><code>>>> removeVowels('apple')
"ppl"
>>> removeVowels('Apple')
"ppl"
>>> removeVowels('Banana')
'Bnn'
</code></pre>
<p>CODE (Beginner):</p>
<pre><code>def removeVowels(word):
vowels = ('a', 'e', 'i', 'o', 'u')
for c in word:
if c in vowels:
... | python | [7] |
685,268 | 685,269 | How to handle multiple checkboxes in a PHP form? | <p>I have multiple checkboxes on my form:</p>
<pre><code><input type="checkbox" name="animal" value="Cat" />
<input type="checkbox" name="animal" value="Dog" />
<input type="checkbox" name="animal" value="Bear" />
</code></pre>
<p>If I check all three and hit submit, with the following code in the P... | php | [2] |
2,661,561 | 2,661,562 | get specific value from file_get_content | <p>hi i need to get specific content from the file get content but the problem is if i made a function which determine the content of a page and when i call this function in a loop (means more than 200 times) than memory limit problem occur . i have resolve this problem by increase the memory limit by ini_set .
... | php | [2] |
2,512,420 | 2,512,421 | miminum height and width of a div | <p>I have a re-sizable and drag able div in my page
I want to restrict users to re size the DIV to a fixed minimum width or height and cannot resiz more than that.</p>
<p>i did try it using the following code but it did not help.
please guide me to solve this.</p>
<pre><code>$("#dv_move").resizable({
resi... | jquery | [5] |
1,553,646 | 1,553,647 | Convert tree data structure from Database into JSON in Java | <p>We have a database that has the child_id, parent_id and the other details for each row of a tree in the database. I am looking for a best method to read the data from the database recursively and create the JSON not knowing how deep the child items run under each root node. Also is there something that helps create ... | java | [1] |
2,767,883 | 2,767,884 | Download audio file from non direct link | <p>i want to implement a download manager</p>
<p>lets say there is a form with post method on a site,after clicking the submit button the site will send the post data to its server and a download should start with the content of the response of the form
so what i want is how do i download the data after the user click... | iphone | [8] |
3,408,607 | 3,408,608 | How can I do something like this - loop thru an indefinite set of numbers | <p>I'm trying to loop tru a set of numbers based on the initial number. Tried, but cant see a good way to achieve this. The thing goes inside a while loop.</p>
<pre><code><?php
$this = 1;
//If 1 then 1,4,7
//If 2 then 3
//If 3 then 10
while ( //mySql while loop ) {
if ( $this == 1 ) {
call example() ... | php | [2] |
2,896,836 | 2,896,837 | Dispose C# DLL marked for COM interop | <p>I created a vanilla C# dll and marked it for COM inter op. The dll is a plain user form with no functionality as this is an experiment. </p>
<p>I registered the DLL and opened active x test container and instantiated my COM object. It shows up in the test container and i can view the exposed methods of the control ... | c# | [0] |
5,833,187 | 5,833,188 | NameValueCollection for editing query strings | <p>If I call </p>
<pre><code>var nvc = HttpUtility.ParseQueryString("?foo=bar&baz=robots")
</code></pre>
<p>I get back a NameValueCollection where if I call ToString on it, I get back a query string.</p>
<pre><code>var str = nvc.ToString(); //foo=bar&baz=robots....
</code></pre>
<p>If I create a new NameVal... | asp.net | [9] |
2,919,768 | 2,919,769 | JavaScript dynamically getting the names | <pre><code><TD class="small" width="13%">
<input type="text" id="gardes"
name="Names$Dynamic${$Index}$tract$" maxlength="14"
style="width:98%" value="{./@tract}">
</input>
</TD>
<TD class="small" width="12%">
<input type="text" id="gradesfar"
... | javascript | [3] |
2,234,289 | 2,234,290 | when does JS/jQuery statement gets executed which is not part of jquery doc/window handlers | <p>I have following jquery code in client side JS</p>
<pre><code>// Following gets executed at document.ready() time
$(function() {
prepareCurList();
});
// When does the following code gets executed as its just a plain JS statement???
prepareNextList();
</code></pre>
<p>Please provide pointers.<... | jquery | [5] |
6,023,143 | 6,023,144 | CountDownTimer runs in old Activity when switching Activities | <p>I have a CountDownTimer, which needs to run all the time. There are 2 Activities (A and B). Activity A has the CountDownTimer, which updates a TextView inside it. When I switch to B, the CountDownTimer still runs (it is the desired behavoir), but when I switch back to A, there seems to be an old and a new A. The tim... | android | [4] |
2,025,687 | 2,025,688 | How to avoid data lose when UIImagePickerController unloads my controller? | <p>I am using UIImagePickerController to take a photo from the camera. However, the I find that randomly my calling controller (the one that is shown before the UIImagePickercontroller is shown) gets unloaded. I logged the viewDidUnload, and indeed it does get called. When the camera is done and dismissed, my controlle... | iphone | [8] |
4,190,980 | 4,190,981 | Animation 2D Graphics and Drawing on Canvas | <p>In first, sorry for my language.</p>
<p>I have two questions which I can't resolve.</p>
<p>The first questions is about Animation 2D Graphics. I have an Activity that call a <code>SurfaceView</code> in which I draw on <code>Canvas</code> my background and my player (this player it's moved by accelerometers). I wan... | android | [4] |
184,652 | 184,653 | Javascript timing events | <p>I want to display the message "Hi how are you?" for 1 minute using <a href="http://en.wikipedia.org/wiki/JavaScript" rel="nofollow">JavaScript</a>. After 1 minute, I'd like it to disappear. Can you help me write the code to produce this?</p>
<p>Thank you.</p>
| javascript | [3] |
3,150,512 | 3,150,513 | question regarding the keyword super | <p>In the book "Java in a Nutshell", chapter 3, section 3.5 Subclasses and Inheritance, there is such as paragraph about the usage of super to access overriden method:</p>
<blockquote>
<p>Note that the super keyword invokes the most immediately overridden version of a method. Suppose class A has a subclass B that ha... | java | [1] |
4,845,075 | 4,845,076 | L shaped custom gallery view | <p>I want to implement a gallery view in which the gallery is L-shaped and the thumbnails move from vertical to horizontal. And also: the image size will be max at the center and will decrease from center to last.</p>
| android | [4] |
5,070,701 | 5,070,702 | Android XML parsing | <p>I have to parse the url
<a href="http://local.yahooapis.com/LocalSearchService/V3/localSearch?appid=YahooDemo&query=pizza&zip=94306&results=2" rel="nofollow">http://local.yahooapis.com/LocalSearchService/V3/localSearch?appid=YahooDemo&query=pizza&zip=94306&results=2</a> and show the result i... | android | [4] |
1,018,138 | 1,018,139 | jquery creating events when mouseenter and mouseleave | <p>I am trying to rock a simple image back and forth on a mouseover using jquery.
The image id is "img".</p>
<pre><code> $(document).ready(function () {
$("#img").bind('mouseenter', function () {
$('#img').rotate(43);
});
$("img").bind('mouseleave', function () {
$('... | jquery | [5] |
5,095,914 | 5,095,915 | About android mobile application development? | <p>Android mobile application development is the J2ME Application.I need to know about it? Can anyone help me?</p>
| android | [4] |
2,120,646 | 2,120,647 | android loading message | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3028306/download-a-file-with-android-and-showing-the-progress-in-a-progressdialog">Download a file with Android, and showing the progress in a ProgressDialog</a><br>
<a href="http://stackoverflow.com/questions/502... | android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.