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
1,860,307
1,860,308
C++ sscanf space delimited string
<p>Here is my practice code:</p> <pre><code>int integer_part; char* string_part = (char*)malloc(sizeof(1000)); char* input_string = (char*)malloc(sizeof(1000)+sizeof(int)); cin&gt;&gt;input_string; sscanf(input_string, "%s %d", string_part, &amp;integer_part); printf("scan: %s %d", string_part, integer_part); </c...
c++
[6]
2,370,364
2,370,365
Python: How to make interactive tools when our script fire and forget?
<p>I have a software in which support Python for scripting, but just fire and forget scripts, is there anyway to track memory (or something like that) to make more interactive tools?, OR is it possible to track memory by some external tools, something like key-logger but more advanced?</p> <p>for example...</p> <pre>...
python
[7]
5,104,719
5,104,720
after unchecking the checkbox and updating it they are still coming checked.This is the following code
<pre><code>$("#ulWizardTeamMembersList").find('#chk' + ContactInfo[0]).attr("checked", "checked"); countChecked('ulWizardTeamMembersList', 'TeamMembers'); $("#ulWizardContactsList").find('#chk' + ContactInfo[0]).attr("checked", "checked"); countChecked('ulWizardContactsList', 'Contacts'); </code></pre>
jquery
[5]
1,912,446
1,912,447
binary Converter using Get Set
<p>Am making a Binary converter in a windows form using Get and Set method</p> <p>Code to carry out the conversion</p> <pre><code>class SubnetConvert { private int numconvert; private string OctetToBinary; public int OctetConvert { get { return numconvert; } set { List&lt;int&gt; Subnet = new Li...
c#
[0]
2,148,366
2,148,367
Does $_POST have a size limit?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2364840/what-is-the-size-limit-of-a-post-request">What is the size limit of a post request?</a> </p> </blockquote> <p>Does $_POST when used in conjunction with forms in PHP have a size limit? Obviously there mus...
php
[2]
4,247,836
4,247,837
Load content inside pages
<p>How to use jquery to loading external url inside divtag using load() method?</p> <p>My tag like this</p> <pre><code>&lt;div id="preview"&gt; &lt;/div&gt; </code></pre> <p>and i want load www.stackoverflow.com inside this tag.</p>
jquery
[5]
5,069,082
5,069,083
Java RandomString Class
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/13818297/hangman-randomstring-class">HangMan RandomString Class</a> </p> </blockquote> <p>Here are the directions:</p> <p>Create a <code>RandomString</code> class and implement the following:</p> <ol> <li><p>C...
java
[1]
750,833
750,834
what is the advantage of using xml for layout?
<p>I've been through a few tutorials etc and have found that I can acheive the same results defining all of my UI components in code.</p> <p>for example</p> <pre><code>@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setTe...
android
[4]
4,051,866
4,051,867
Jeff Sharkey's SeparatedListAdapter Bugs
<p>I was using <a href="http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/" rel="nofollow">Jeff Sharkey's SeparatedListAdapter</a> to add headers.<BR> At first, everything was all right.<BR> However, when I added the exactly same String of the header, the problem showed up.<BR> The headers...
android
[4]
4,364,663
4,364,664
Cannot upload a file to ftp
<p>I want to upload a file using upload control. When I select any file and try to upload, an error message shows: <em>Could not find file 'C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\image.jpg'</em>. </p> <p>The code is below here:</p> <pre><code>string fileName = Path.GetFullPath(uploadfile.FileNa...
c#
[0]
3,093,137
3,093,138
Android Antena Data?
<p>How do I acces how strong my signal is for an android phone? I am new to android programming but have experience in java, and C#. I would like to be able to tell how strong my antena signal is with a numerical value if at all possible. </p>
android
[4]
3,672,962
3,672,963
convert local timezone to GMT in javascript
<p>I'm trying to convert a date object in HST format to a standard format. But the date object returns NaN. </p> <pre><code>completeByTimestamp="1/25/2013 5:15 PM HST"; var completByTmUTC= (new Date(completeByTimestamp)).toUTCString(); </code></pre>
javascript
[3]
2,870,037
2,870,038
why I am not able to define those objects?
<p>I am trying to declare object's (w and x). But I am not able to do that.Why is it so? Could somebody shed some light in this?</p> <pre><code>struct S { S(int); }; void foo( double d) { S w = S( int(d)); S x(( int(d))); } int main() { foo(5.0); } </code></pre>
c++
[6]
2,296,727
2,296,728
Help needed to shorten the code
<p>Below is the code i have written.<br> Can we shorten this code. </p> <pre><code> $(document).bind('click',function(){ $('#'+FinQid+' TABLE TBODY TR').each(function() { $(this).children('TD').find('input:radio').bind('change',function() { $(this).parents('TR').find('input:checkbox')....
jquery
[5]
2,022,134
2,022,135
javascript: new date, missing year
<p>I called new Date("Jan 4") and found the default year is 2001</p> <pre><code>a=new Date("Jan 4") Thu Jan 04 2001 00:00:00 GMT-0500 (EST) </code></pre> <p>Is there any way that I can set the default year to be 2011?</p> <hr> <p>update: I know that I can use + 2011 but since I have some "Jan 4", and some "Jan 4, 2...
javascript
[3]
4,320,285
4,320,286
Warning Regarding the UITableviewcell
<pre><code>cell.text = [tableoptions objectAtIndex:indexPath.row]; </code></pre> <p>when i write this statement,I get warning like 'setText:' is deprecated.</p> <p>how to remove this warning????? </p>
iphone
[8]
1,203,734
1,203,735
Sort html string in alphabetical order using PHP
<p>See code below. I want to sort the option tags by name, not by id.</p> <p>Here is my code:</p> <pre><code>&lt;?php $string = '&lt;option id=a1&gt;Sinead Shannon Roche&lt;option id=a2&gt;Emile Abossolo Mbo&lt;option id=a3&gt;Youssouf Djaoro&lt;option id=a4&gt;Dioucounda Koma'; $new_string = ''; $s = explode('&lt;...
php
[2]
2,074,601
2,074,602
self invoking function with setTimeout closure, variable access
<p>How would I get access to the <code>a_var</code> that is in <code>setTimeout</code>, from the outter <code>someFunction</code>?</p> <p>Thanks.</p> <pre><code>function someFunction(){ (function why(){ setTimeout(function(){ var a_var='help I wanna get ...
javascript
[3]
118,872
118,873
Programmatically access/add/change ringtones of contacts
<p>Using the iPhone SDK is there a way to programmatically access (read/write) the ring tone that is assigned to a contact in the Address Book?</p>
iphone
[8]
3,189,248
3,189,249
Getting the active window using Java
<p>I would like to capture the active window screenshot using Java and have used the Robot class to achieve it.</p> <p>However in case of a web browser, it returns the screenshot of only the part that is visible on the screen, whereas I want to actually take the screenshot of the entire web page like the Selenium Web ...
java
[1]
113,977
113,978
how to get stock price of NSE market per 10 sec for web application in stock portfolio in android?
<p>I am working on android project for stock portfolio and I want to get stock price of running stock market per 10 second so that I can make transaction directly through android mobile. so help me if you know anything.....</p>
android
[4]
1,674,460
1,674,461
Execute local application via PHP from server
<p>My company has an internal Linux server running PHP with an application that displays client specific information, such as SSH connection info, etc. Is there a way to have the server invoke a command on a local machine via PHP? For example, the server displays a link with SSH connection information, such as c:\putty...
php
[2]
1,755,766
1,755,767
To show the details of a file/folder like size,type,hidden or not,permissins etc all together
<p>i want to show the details of the file or folder after selecting that. eg.Long press on a file say "icon.jpg" and we have some info like size,type,dateTime Modified,last opened, hidden or not,permissions etc. please help me by some example.</p>
android
[4]
1,065,714
1,065,715
how to append a number to a function name to create many functions?
<p>i ve a function which is responsible for some validations, disabling and enabling of some text boxes and a group of radio buttons .... </p> <p>now i want to generate the function name to be called from another function using a for loop and then appending the for loop index to the function in question ....</p> <p>s...
javascript
[3]
4,863,339
4,863,340
PHP not accepting single quotes?
<p>All of a sudden, code that has worked for weeks will throw a syntax error on single quotes.</p> <p>For example </p> <pre><code>$dueshtml .= '&gt;'. $value .'&lt;/option&gt;' . "\n"; </code></pre> <p>now throws a parse error, and it executed perfectly before. Changing the single quotes to double quotes and escap...
php
[2]
3,994,846
3,994,847
How to check if a word entered in a textbox is spelled correctly?
<p>I have a textbox <code>input type="text" maxlength="30"</code>.</p> <p>A user is allowed to enter one word only in this textbox. How can I force the user to enter the right spelling? </p> <p>It should show a message stating "wrong spelling" when a user enters the wrong spelling... Otherwise, the user can go ahead ...
php
[2]
1,527,682
1,527,683
Why does `Array.length`, `Function.length`, `String.length`, etc return 1?
<p>While teaching my JavaScript class yesterday, my students and I came across some interesting functionality that I thought might be worth capturing in a question and the answer I've come to.</p> <p>Typing <code>Array.length</code> in the JS console in chrome returns <code>1</code>.</p> <p>Likewise, <code>Function.l...
javascript
[3]
2,478,435
2,478,436
connecting to database through network using java application
<p>hey guys can you please help me again, i want my restaurant system to connect to database through network i.e. when waiter place order using handheld computer(PDA) and sending it to chef, so i want all data to be saved in database via network. i'm using java for this system.</p>
java
[1]
488,014
488,015
passing a parameter to a JavaScript function
<pre><code>int i = Convert.ToInt32(Session["sayfaTuru"]); ClientScript.RegisterStartupScript(this.GetType(), "RefreshOpener", "f2(" + i + ")", true); </code></pre> <hr> <pre><code>function f2(i) { if (i == 1) {//CariKartHareketleri opener.document.getElementById("HiddenField1")...
javascript
[3]
901,227
901,228
combobox items from the database
<p>In C# I used a combo box in my form and I wish to obtain a specific column from a table in the database and contents of the column to be added as the items in the combo box. I have declared this way</p> <pre><code>string strCon, strQry; SqlConnection con; SqlDataAdapter da; DataSet ds; SqlCommand comm; den strc...
c#
[0]
4,379,277
4,379,278
trying to hide options from selectlist .. not working on chrome and ie
<p>I have a select lists, which has lots of option. Depending on some input I want to hide few options from select list. To hide options from select list I have written jquery like </p> <pre><code>$('#selectlist1 option').each(function(){ $(this).hide(); }) </code></pre> <p>But this code seems to work only for...
jquery
[5]
5,823,787
5,823,788
NotSerializableException problem
<p>the following code throws the exception:</p> <pre><code>public class TestObject implements Serializable{ private static final long serialVersionUID = 1L; public String value; } DbByteArrayOutputStream out = new DbByteArrayOutputStream(); ObjectOutputStream objOut = new ObjectOutputStream(out); objOut.w...
java
[1]
1,979,673
1,979,674
Android Bluetooth api capabilities
<p>I am working with sensor devices that transmit data via bluetooth. I am using HTC desire which runs on android 2.1 platform to pair it with the sensors. I want to find out a few things about the sensor device such as its bluetooth version, what bluetooth profile it supports and its bluetooth class. My question is, i...
android
[4]
1,983,316
1,983,317
Useragent in PHP scraper script
<p>I have a PHP scraper script which I use to scrape a page on my site. The script then parses the content into HTML and outputs it for the user. I came across using the useragent function in PHP to pretend that you are a crawler, for example GoogleBot. How can I combine my two scripts together so the page I am scrapin...
php
[2]
3,512,936
3,512,937
javascript: plus symbol before variable
<p>this really sounds like a simple question but I had no luck searching. what does the <code>+d</code> in </p> <pre><code>function addMonths(d, n, keepTime) { if (+d) { </code></pre> <p>means?</p>
javascript
[3]
4,339,986
4,339,987
callback function does not change var when using getJSON function in jQuery
<p>I am trying to change a variable for validation purposes, the changes takes place inside a <code>$.getJSON()</code> function after the return of certain data.</p> <p>The problem is after chaining the variable and outside the <code>$.getJSON()</code> the variable is returned to its original value. Here is the code f...
jquery
[5]
5,202,640
5,202,641
How to get similar records from database and show in popup using php
<p>I Have 3 html fields when entered the values and click on find similar records button we have to get the similar records which are present in database table.</p> <p>The 3 html fields were there in 3 different tables in database. How can i achieve this using php.</p> <p>HTML Code: User Form ...
php
[2]
2,062,811
2,062,812
C# Possible to have a generic return type?
<p>Here is a typical function that returns either true/false;</p> <pre><code>private static bool hasValue() { return true; } </code></pre> <p>Now on an error, I would like to return my own custom error object with definition:</p> <pre><code>public class Failure { public string FailureDateTime { get;...
c#
[0]
1,215,612
1,215,613
In C# how can I safely exit a lock with a try catch block inside?
<p>Here is an example of an exception happening inside a lock, with a try-catch block.</p> <pre><code>int zero = 0; int j = 10; lock (sharedResource.SyncRoot) { try { j = j / zero; } catch (DivideByZeroException e) { // exception caught but lock not released } } </code></pre> ...
c#
[0]
5,059,184
5,059,185
BroadcastReceiver.onReceive is called twice for user_present
<p>I am having a strange(?) issue, I have implemented <code>BroadcastReceiver</code> for <code>USER_PRESENT</code>, it works fine on my Tablet but on my Galaxy S, it is triggered twice can some one shed some light here?</p> <pre><code>&lt;receiver android:name="XYZBroadcastReceiver" &gt; &lt;intent-filter&gt; ...
android
[4]
4,200,672
4,200,673
How to compare single array to one part of multidimensional in PHP
<p>I want to fetch one column from database and i want to compare with a single array. If any value equal than doesn't print else print all values of single array.</p>
php
[2]
626,137
626,138
Looping through an array inside another array php
<p>I want to nest an array inside another array, my code will be similar to this</p> <pre><code>array( 'type' =&gt; 'FeatureCollection', 'features' =&gt; array( array( 'type' =&gt; 'Feature', 'geometry' =&gt; array( 'coordinates' =&gt; array(-94.34885, 39.35757), 'type' =&gt...
php
[2]
1,846,031
1,846,032
Performance difference between multiple pointer dereferences vs references
<p>This was an interview question asked from me a few months back:</p> <p><strong>Which of the following functions will execute faster, <code>Foo1</code> or <code>Foo2</code>?</strong></p> <pre><code>void Foo(SomeObjectArray** array, unsigned int size) { for (int i = 0; i &lt; size; i++) { if (((*arra...
c++
[6]
2,136,017
2,136,018
Curly Braces in the if condition in Java
<p>Why does this first <code>if</code> compile well and the second fail?</p> <pre><code>if(proceed) {int i;} // This compiles fine. if(proceed) int i;// This gives an error. (Syntax error on token ")", { expected after this token) </code></pre>
java
[1]
4,087,890
4,087,891
import error in python
<p>I get the following error </p> <blockquote> <p>Traceback (most recent call last): File "myemail.py", line 1, in import smtplib File "/usr/lib/python2.6/smtplib.py", line 46, in import email.utils File "/home/nikhil/Desktop/bujji/email.py", line 2, in ImportError: No module named MIMEM...
python
[7]
933,463
933,464
Method with variable number of objects and a list of other arguments
<p>I want to create a method that accepts a variable number of objects and perform some actions(like calling object methods) based on number of other arguments supplied to the method.</p> <p>e.g. I have an object X with a method updateTable() which accepts a,b as arguments.</p> <p>What I want to do is that the common...
python
[7]
2,565,242
2,565,243
Python File Meta Tag reading
<p>Anyone know of a Python module that can pull Tag data from multiple media formats? Trying to build an app that allows for manipulation of ASF (Windows Media Player files, ie WMA, WMV, etc), ID3, including both ID3v1 and ID3v2 (MPEG files, ie MP3), MPEG Audio Bit Stream (ie ABS, MP1, MP2, MP3), MPEG Program Stream (...
python
[7]
4,469,737
4,469,738
SIGSEGV in Android 2.1 WebView
<p>I am intermittently getting a SIGSEGV when using a WebView in Android 2.1. The SIGSEGV is inside /system/lib/libwebcore.so .</p> <p>Is there a known problem with this WebView implementation that I could work around with to avoid the SEGV?</p>
android
[4]
1,642,048
1,642,049
site_url and $current_user producing undesired results
<p>I am trying to make the link like this: <code>site.com/forums/user/userid</code> using the code below. I think I messed it up though because it keeps producing an error on this line.</p> <p><code>$buttons['Edit My Profile'] = site_url('/forums/user/')$current_user-&gt;user_login;</code></p> <p>Here is more of ...
php
[2]
447,001
447,002
Auto __repr__ method
<p>I want to have simple representation of any class, like <code>{ property = value }</code>, is there auto <code>__repr__</code>?</p>
python
[7]
2,581,042
2,581,043
problem loading .properties file in java
<p>I am having problem while loading .properties file. The following works:</p> <pre><code>private static Properties props = new Properties(); ................ ....................... configurationProps.load(Test.class.getResourceAsStream("test.properties")); </code></pre> <p>But this;</p> <pre><code>private stat...
java
[1]
4,839,651
4,839,652
jquery parent, parents, and closest can't select or step over a section tag
<p>I have a DOM structure below:</p> <pre><code>&lt;div class='box'&gt; &lt;section id="profile"&gt; &lt;h1&gt;testuser&lt;/h1&gt; &lt;div id="following"&gt; &lt;a class="btn unfollow" style="width: 180px;" rel="nofollow" data-remote="true" data-method="delete" href="/users/testuser/unf...
jquery
[5]
615,506
615,507
Why does '' apparently evaluate as True in Python
<p>I have:</p> <pre><code>raw_matrix.append([]) for as_string in ' '.split(line): if as_string: print('as_string: #' + as_string + '#') raw_matrix[-1].append(int(as_string)) </code></pre> <p>This produces the output:</p> <pre><code>as_string: # # Traceback (most recent call last): File "product...
python
[7]
2,757,488
2,757,489
JQuery .change() function within .each() function
<p>I'm using JQuery Sortable UI Where I need to track current position array of <code>&lt;li&gt;</code> Here is code</p> <pre><code>$(document).ready(function() { $('#sortable').sortable({ update: function(event, ui) { $('#sortable').children().each(function(i) { var id = $(thi...
jquery
[5]
5,557,697
5,557,698
IsFacing and IsBehind calculations
<p>I'm looking for better way to calculate if one object facing another or one is behind another. So far I've been able to create this but it seems to not working 100% correctly :(</p> <p>I also think it should be in radians rather then degrees.</p> <pre><code>public static float GetAngle(float x1, float y1, float x2...
c#
[0]
1,733,924
1,733,925
jquery getting a specific class from many for a specific element
<p>I have the following div element</p> <pre><code>&lt;div id="row_1" class="active_page workorders_edit"&gt;&lt;/div&gt; </code></pre> <p>And I want to be able to retrieve the class name workorders_edit. In my real case I only have access to the active_page class name</p> <p>Please check my <a href="http://jsfiddle...
jquery
[5]
476,206
476,207
Database in Android
<p>My application needs a database. The database contains only one table i.e. for password. Password will be inserted only one time, and there's no need for delete and upgrade. Can anybody help for code? For this password database, user will insert only one time, and database will be closed. And when the user inserts n...
android
[4]
768,007
768,008
Android sms intent filter
<p>I tried this code in my android application for the SMS message but it is not working , the application does not appear in the messaging list. Should I add something to make it work?</p> <p></p> <pre><code> &lt;action android:name="android.intent.action.SENDTO" /&gt; &lt;category android...
android
[4]
339,811
339,812
Time Duration problem
<p>I am not able to get the correct Time duration.So can anyone please help me in finding the solution</p> <p>//code</p> <pre><code> public static String getDateDifference(java.util.Date start, java.util.Date end) { logger.info("Enter getDateDifference "); Calendar startCal = Calendar.getInstance(); start...
java
[1]
291,680
291,681
How to write a const_iterator in VC++6?
<p>I have implemented my own container class and need to implement a const_iterator for it. What is the easiest way to go about implementing <code>const_iterator begin()</code> <code>const_iterator end()</code> and <code>const_iterator::operator++</code> for my own container class? </p> <p>Please provide examples. Tha...
c++
[6]
361,151
361,152
Site Map JQuery Style.. using attr. plus page urls
<p>So I have a looping example of site url string and trying to add pages to the links, but I don't want to have to deal with the domain as it's fixed. Right now it doesn't work.. but I'm trying to fix it.</p> <pre><code> &lt;script&gt; $(document).ready(function() { url = $(this).attr('href', $(this).at...
jquery
[5]
5,476,925
5,476,926
iPhone - UIButton to select tab in different view
<p>Fairly new to iPhone app development, so this might be really obvious (if so, apologies in advance!)</p> <p>I'm building an app which has a tab bar. However, when the app first runs and 'launch screen' is shown with 3 UIButtons - each of these buttons points at a view of one of the tabs. What I need to do is:</p> ...
iphone
[8]
3,625,001
3,625,002
flajaxian FileUpload triggered from the server side?
<p>In my asp.net webpage, it is required to view the progress of the uploading process. After some research, I found <a href="http://www.flajaxian.com/" rel="nofollow">http://www.flajaxian.com/</a> - a free asp.net with progress tool. </p> <p>However, If I have to specify different files to upload:</p> <pre><code>&lt...
asp.net
[9]
1,547,812
1,547,813
Use Enum or #define?
<p>I'm building a toy interpreter and I have implemented a token class which holds the token type and value.</p> <p>The token type is usually an integer, but how should I abstract the int's?</p> <p>What would be the better idea:</p> <pre><code>// #defines #define T_NEWLINE 1; #define T_STRING 2; #define T_BLAH 3; /...
c++
[6]
2,239,097
2,239,098
How to parse Industry Foundation Class (IFC) files using Java?
<p>I want to develop an application , which have to parse the Industry Foundation Class (IFC) generated by the Auto CAD software and render the 3D images in an applet window using Java. I have no idea about how to do it .If anybody knows the solution please help me out.</p> <p>Thanks and Regards,<br> Rajapandian.K</p>...
java
[1]
547,592
547,593
How can i get this kind of window?
<p>In eclipse you can detach tabs and they will displayed in a special kind of window.</p> <p>Win7 with aero displays it as follows</p> <p><img src="http://www.oliholz.de/data/1.jpg"/><br></p> <p>How can i produce this frame? i have tried many styles of JFrame,JWindow,JDialog, ...</p>
java
[1]
682,836
682,837
Sort 2-dimensional String array on Android
<p>I want to sort a 2-dimensional String array like this</p> <pre><code>"xx", "text 1" "aa", "text 2" "mm", "text 3" </code></pre> <p>to look like this</p> <pre><code>"aa", "text 2" "mm", "text 3" "xx", "text 1" </code></pre> <p>I have already found a <a href="http://techthinking.net/2010/02/sorting-two-dimensional...
android
[4]
433,940
433,941
Android: How to create a button like radio button in a group?
<p>Is it possible to create a button like radio button without using images? Would like to have a pressed state upon selection. Then back to normal state when I click other options.</p>
android
[4]
5,164,463
5,164,464
how to create static class List property inside static class
<p>I have created following class:</p> <pre><code> public static class Current { public static class User { public static int UserID { get; set; } public static string UserName { get; set; } public static List&lt;UserRole&gt; Role { ...
c#
[0]
703,983
703,984
session_start() is generating the same session id everytime
<p>I am trying to implement simple login and logout mechanism. When the user logs in I am creating the session by using <code>session_start()</code>. and upon the user logging out I am calling</p> <pre><code>session_unset(); session_destroy(); </code></pre> <p>but the problem is that after logging out next time if ag...
php
[2]
2,451,035
2,451,036
Using the new operator with an object's non-default constructor
<p>Would something like:</p> <pre><code>classname* p = new classname(parameter1, parameter2, ...); </code></pre> <p>create a pointer that points to an object initialized using a non-default constructor with signature: <code>classname(parameter1, parameter2, ...)</code>?</p> <p>Thanks!</p>
c++
[6]
3,150,340
3,150,341
Add a simple link to a website on a activity
<p>I´m looking for a easy tutorial to add a link to an activity. For example "password forgotten", after click on the link, the webbrowser should open the specified url. Thank you very much Regards, Marco</p>
android
[4]
1,627,381
1,627,382
Will this piece of code for binary tree cause any issue?
<p>I have written a piece of code and it runs fine on my system. I am not having any issue, but I have a few concerns, which I am listing below. I would like to know if there is a real issue.</p> <pre><code># include &lt;iostream&gt; # include &lt;stdio.h&gt; # include&lt;conio.h&gt; using namespace std; struct tree ...
c++
[6]
4,344,192
4,344,193
i am gettin error "Cannot make a static reference to the non-static method startActivity(Intent) from the type Activity"
<pre><code>private int pos = position; @Override public void onClick(View v) { Toast.makeText(context, "Click-" + String.valueOf(pos), Toast.LENGTH_SHORT).show(); iBean = (InboxBean)result.get(position); Con...
android
[4]
2,501,104
2,501,105
Add to hashmap takes a long time
<p>I've stuck by a few lines in my java program, which take too much time (about 20s), and it seems weird to me.</p> <p>Here are the lines</p> <pre><code> Map&lt;URL, Integer&gt; res2 = new HashMap&lt;&gt;(); for (URL url : res) { res2.put(url, null); } </code></pre> <p>Which res defined as following :</p> <...
java
[1]
1,359,605
1,359,606
android supporting app on 2.2 till 1.5
<p>i want to support our app for 2.2 and while being able to run on 1.5 that means minsdkversion = 3</p> <p>the problem is that to support all platform i have cut and paste all resorces from mdpi to drawable as 1.5 has different mechanism for choosing resources, now the problemn is that for some resources it says reso...
android
[4]
4,991,194
4,991,195
How to get correct encoding?
<p>I have utf-8 file which I want to read and display in my java program.</p> <p>In eclipse console(stdout) or in swing I'm getting question marks instead of correct characters.</p> <pre><code>BufferedReader fr = new BufferedReader( new InputStreamReader( new FileInputStrea...
java
[1]
3,597,498
3,597,499
How to check all checkboxes checked or not in a panel in asp.net?
<p>i added checkboxes dynamically to panel.</p> <pre><code>for (int intControlIndex = 0; intControlIndex &lt; dsTagsList.Tables[0].Rows.Count; intControlIndex++) { chkList1 = new CheckBox(); chkList1.Text = dsTagsList.Tables[0].Rows[intControlIndex][0].ToString(); chkList1.ID = "Chk" + intControlIndex; chk...
asp.net
[9]
5,940,947
5,940,948
Removing focus to MenuItem in android
<p>I just want to setFocusable false to one MenuItem in the Menu. That means I should not get default lighter blue color also to MenuItem.Can you please help?</p>
android
[4]
4,317,087
4,317,088
Can't execute system/exec command
<p>I am trying to exec/system an external script that should run independently of the script that called it. I am using xampp for windows at the moment as a development server, and I tried two methods, both don't seem to run the external script:</p> <pre><code>$run_cmd='c:\xampp\php\php.exe script.php'; exec($run_cmd...
php
[2]
3,012,340
3,012,341
Throwing an exeption in a catch section
<p>I've got a new project. Every time you dealing with somebody else code it's an adventure. </p> <p>Here is what I found:</p> <pre><code>try { ..... } catch (InvalidOperationException e) { throw e; } catch (Exception e) { throw; } </code></pre> <p>Anybody has an idea why?</p> <p>PS Thanks everybody. It...
c#
[0]
69,459
69,460
How about this programming style in javascript?
<pre><code> var RootComponent = { init: function(options){ options = jQuery.extend({name: 'Root'}, options); this.run('ContainerComponent.init')(options); } } </code></pre> <p>To this is then applied a new method, called "run". And this run the method found in the pat...
javascript
[3]
897,951
897,952
Create a android library with intents in it
<p>Where can I find a guide or a sample for creating a library that expose intents, and compiled as a jar?</p> <p>I find it very hard to achieve this simple capability and don't understand why.</p>
android
[4]
4,394,934
4,394,935
Cannot modify header information
<p>My problem is that I have a class with a function inside of it, and I get;</p> <pre><code>Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/inc/class.php:105) in /home/user/public_html/inc/facebook/login.php on line 21 </code></pre> <p>When the page I'm u...
php
[2]
489,826
489,827
what is the best way to verify if a website is working
<p>I'm thinking to add some code on the server side in asp.net, to verify if the website is working before redirect to it. </p> <p>thanks.</p>
asp.net
[9]
3,534,071
3,534,072
Weird, the jquery ajax call not working on localhost?
<p>I am using Ubuntu 11.10 + apache2. I have a simple ajax call in my html file, and it works fine when I view the page as a file, but when I copy this html file into my apache server under /var/www, the ajax call is not working anymore, the jquery library is loaded correctly, and I can see it via firebug, and the sele...
jquery
[5]
2,634,804
2,634,805
Learning jQuery, advice & opinions?
<p>I fancy learning jQuery bit by bit so i dont have to bug you good people on here for help and advice, which err i'm doing now lol.</p> <p>What would be the best way to go about this, books, online tutorials, any recommendations?</p> <p>I'm quite good with html and css can write all that fine, so i'm hoping that wi...
jquery
[5]
3,172,164
3,172,165
How do I resize Listview columns in a threadsafe manner - C#
<p>I have a query to a database on a seperate thread and on the return I invoke a threadsafe call. But an exception is created - what am I doing wrong?</p> <p>Note I also populate the list view but have left it out for clarity</p> <pre><code> private void ThreadSafeListView() { if (this.listView1.Invoke...
c#
[0]
4,869,159
4,869,160
App crashes with IB
<p>I would like to add a button to my custom cell. I add it programaticaly and its work fine, and when i add it in IB, the app crashes.</p> <p>what can be the problem ?</p> <p>Thanks four your answers.</p> <p>my code : ` </p> <pre><code>UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [but...
iphone
[8]
3,384,540
3,384,541
How to get "Log on as a batch" settings for user using c#
<p>Is there a programattic way to query local security policy settings in C#, i.e. the values in secpol.msc?</p> <p>I would like to read the "Log on as a batch" setting for some user. What should I do ?</p>
c#
[0]
3,626,037
3,626,038
KLogger Fatal error Class 'KLogger' not found in
<p>I am using KLogger for my php application but I am getting this Fatal error I am using AMPPS below is my code:</p> <pre><code>include_once(SITE_ABSPATH ."lib/KLogger.php"); </code></pre> <p>but it return fatal error.</p> <blockquote> <p>Fatal error: Class 'KLogger' not found</p> </blockquote>
php
[2]
2,362,414
2,362,415
image not change when pop-up window was closed
<p>Hi Can anyone help me regarding my problem. I have an application that upload a photo.There are two pages involves in this application a parent page and a pop-up window.On the parent page I have a "Upload" button.when I click the the button a pop-up will show. On the pop-up window the user can browse a photo then ...
asp.net
[9]
2,952,599
2,952,600
Get the roles associated with a asp.net page
<p>I'm developing a web site and on the web.sitemap i define which roles can access a certain page, is it possible to know on the page which are the role associated to then on the web.sitemap</p>
asp.net
[9]
3,012,027
3,012,028
Is it possible to make a factory in C++ that complies with the open/closed principle?
<p>In a project I'm working on in C++, I need to create objects for messages as they come in over the wire. I'm currently using the <a href="http://www.parashift.com/c%2B%2B-faq-lite/ctors.html#faq-10.12" rel="nofollow">factory method pattern</a> to hide the creation of objects:</p> <pre><code>// very psuedo-codey Me...
c++
[6]
1,452,846
1,452,847
How do I get the rendered web page page from a URL?
<p>I don't want just the source code. I want the rendered page. This is an important distinction that I apparently cannot make by simply searching Google.</p> <p>Does anyone know how I can get the <strong>rendered</strong> page from a URL?</p> <p>This needs to be done in Java, hopefully without an extra library.</p>
java
[1]
1,643,645
1,643,646
android screen supporting for different resolutions in same density
<p>I'm developing an application which supports xhdpi devices. so I created layout-xhdpi and drawable-xhdpi folders to place my drawables and layouts.but I'm having a problem when supporting different resolution in same density. as an example samsung galaxy nexus and sharp IS003 detects same layout-xhdpi folder becaus...
android
[4]
1,288,776
1,288,777
-Get the selected row item from Datalist-
<p>may I know how to get the selected item in datalist? For eg, I'm displaying a list of food items in a datalist with food name, price, type, a button(Click to order). Now I wanted to click on the selected button and get that specific food name, price &amp; etc from the datalist. Thanks!</p>
asp.net
[9]
3,665,617
3,665,618
Class constructed only on stack; not with new. C++
<p>Is there a way to create a class Foo</p> <p>so that I can do:</p> <pre><code>Foo foo; </code></pre> <p>but not</p> <pre><code>Foo* foo = new Foo(); </code></pre> <p>?</p> <p>I don't want people to be able to allocate copies of Foo on the heap.</p> <p>Thanks!</p> <p>EDIT: Sorry, I was wrong on the "stack onl...
c++
[6]
4,692,438
4,692,439
Combine two array in PHP, but not using PHP array_combine()
<p>I have two array like below having same length:</p> <pre><code>$arr1 = array(array(0), array(1), array(2), array(3), array(4), array(5)); $arr2 = array(array(6), array(7), array(8), array(9), array(10), array(11)); </code></pre> <p>I need the output like this:</p> <pre><code>array(array(0,6), array(1, 7), array(2...
php
[2]
5,179,511
5,179,512
returning variable from function
<p>This is probably not the wisest question, but is it possible to return a variable from a function without redeclaring it?</p> <pre><code>function test(){ $a = 1; return $a; } </code></pre> <p>Would it somehow be possible to access $a with just calling the function? test();</p> <p>not $a = test();</p> <p>Is that ...
php
[2]