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
4,992,872
4,992,873
Read the last N lines from logcat?
<p>I'd like to read the last n lines from logcat. Should this be working?:</p> <pre><code>Process process = Runtime.getRuntime().exec("logcat -t -500"); BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream())); ... </code></pre> <blockquote> <p>-t number</p> </blockquote> ...
android
[4]
215,039
215,040
Utility Class - What is the correct approach?
<p>what is the correct approach for a utility class having all methods with public static. Should i use final class or abstract class? Please give suggestion. As for example:</p> <pre><code>public final class A{ public static void method(){ } } </code></pre> <p>OR</p> <pre><code>public abtstract class A{ ...
java
[1]
1,814,630
1,814,631
why switch will expect statement before loading nib
<p>In Switch statement </p> <p>Example </p> <pre><code>switch (indexPath.row) case 0: Loading my nib file; break; case 1: Loading another nib file; break default: break ........ </code></pre> <p>Before loading my nib file. It expects any one statement.</p> <p>example </p> <pre><code>case 0: NSLog(@""); Loading Nib...
iphone
[8]
2,314,744
2,314,745
How to show the confirmation alert with one button using javascript?
<p>In my application, i need to show the message in alert with OK button.</p> <p>In that button click event, i want to do some functionalities using the javascript.</p> <p>So, how can i do this in my app?</p> <p>Please let me know?</p>
javascript
[3]
5,060,332
5,060,333
how to open .ics file in Android 2.1 version?
<p>I just create a application that will download the ics files from the mail attachment.I use the Android 1.5 Emulator.It downloads the ics file and i can able to open that by using my application.But in the 2.1 simulator when i try to download the ics file The browser displays the ics file contents .I need to open th...
android
[4]
3,973,498
3,973,499
How to report an error if an element is missing in the list of lists
<p>suppose </p> <pre><code>list1 = [['a', (1, 1)], ['a', (1, 3)], ['a', (1, 4)], ['b', (2,1)], ['b', (2,2)], ['b',(2, 4)]] list2 = [[(1, 1), (1, 3), (2, 1), (2, 2), (2, 4)]] </code></pre> <p>Now how could I report an error for list1 that ['b', (1, 2)] is missing or ['b', (2, 3)] is missing </p> <p>Similarly for li...
python
[7]
2,631,709
2,631,710
UIViewController trying to present modally
<p>Trying to present UIViewController modally but it is working with only pushviewconttoller statement only.</p> <pre><code> [navigationController pushViewController:_viewController animated:YES]; </code></pre> <p>With presentModalViewController statement it shows only navigationbar that is it not done button not eve...
iphone
[8]
1,910,996
1,910,997
Customize widgets in android?
<p>I need to create a widget(ImageButton) with an amazing functionality where widget will have two-way behavior. If button is not configured and if button is configured.</p> <p>case 1: This case will come in existence when the widget is not configured to any email add and app will ask user to first configure the widge...
android
[4]
172,112
172,113
Hyperlink colour fade registering too many mouse overs
<p>I have a jQuery srcipt to make a nice colour fade animation when you mouseover a hyperlink. The colour fades to red and fades back to the original state. </p> <pre><code>/* Hyperlink colour fade animation */ jQuery.fn.dwFadingLinks = function(settings) { settings = jQuery.extend({ color: '#67C', ...
jquery
[5]
4,972,643
4,972,644
Shifting or moving tab positions on Tab control in C#
<p>I am using tabcontrol in c# widows form app. My requirement is as shown in the image.</p> <p><img src="http://i.stack.imgur.com/iYYu0.png" alt="enter image description here"></p>
c#
[0]
2,395,334
2,395,335
How to check for " " using explode
<p>How do use explode to check for " ".</p> <p>Thanks Jean</p>
php
[2]
5,707,061
5,707,062
how to integrate Youtube in my Android App
<p>I have a problem that I want to integrate youtube in our Android App. But I don't know how to do that? I have searched enough on web but failed to get the actual result. I want that user will enter his account details on youtube server then he will get all uploaded videos and also he can upload video from the same.<...
android
[4]
5,560,236
5,560,237
C++ can I reuse fstream to open and write multiple files?
<p>I have 10 files need to be open for write in sequence. Can I have one fstream to do this? Do I need to do anything special (except flush()) in between each file or just call <code>open(file1, fstream::out | std::ofstream::app)</code> for a each file and close the stream at the end of all 10 files are written. </p>
c++
[6]
4,222,813
4,222,814
HTTP proxy in Android Emulator works for browser, not for WebView
<p>My development environment is behind and HTTP proxy. In the Android emulator, I am able to set my proxy address and credentials in the wifi preferences. Then when I view the page in the browser, I get prompted to reenter my credentials for the host I specified. Not sure why I have to enter them again, but it work...
android
[4]
214,526
214,527
Concern on performance overhead for image scale
<p>My android app will work for both normal and hdpi device. I don't want to create two sets of images assets for normal and hdpi screen. </p> <p>So, could I just create image assets for hdpi only, and use them for both normal and hdpi device. Of course, the hdpi images will be auto scaled to fit normal screen devices...
android
[4]
1,161,707
1,161,708
Reply to a message
<p>I have the following code:</p> <pre><code>&lt;select name="to" class="combo" value=' &lt;?php if(isset($_POST['reply'])) { echo "&lt;option value='$reply'&gt;$reply&lt;/option&gt;"; } ?&gt; ' /&gt; &lt;?php ...
php
[2]
1,186,601
1,186,602
How to enable XP Visual Style to winForm controls
<p>Is there anyway possible to enable my winForm to display itself with xp visual style even the OS has visual style disable?</p>
c#
[0]
4,462,036
4,462,037
Transmitting the Correct Session Data when Multiple Tabs are Opened on a Web Browser
<p>I have a PHP script (<strong>script A</strong>) that makes a query to the database, stores the result in a session variable and produces a HTML page containing a form that allows the user to post a submission (<em>optionally</em>). Upon submission, the result stored in the session variable is used for processing in ...
php
[2]
4,988,436
4,988,437
Regarding overriding Principles
<p>I was developing a program keeping the concept of overriding in my mind..</p> <pre><code>class Parent { private void method1 () { System.out.println ("Parent's method1 ()"); } public void method2 () { System.out.println ("Parent's method2 ()"); method1 (); } } class Chil...
java
[1]
2,649,186
2,649,187
Regular expression to remove jsessionid from the URL using java
<p>I need to remove the jsessionid from the given URL .The jessionid is not in the query part for example i have URL like</p> <pre><code>http://example.com/index.do;jsessionid=XXXXXXXXXXXXXXX?username=example </code></pre>
java
[1]
180,317
180,318
Android : composer screen with text edit feature like Bold change font size
<p>can any body tell me how to create composer screen with some specific requirement, like in my composer screen I want to add feature like Bold, underline and italic for text typed.</p> <p>Also font change(color and size) for the text in composer screen in android. I want to save composer in HTML format.</p> <p>pl...
android
[4]
2,555,891
2,555,892
Javascript Memoization Explanation?
<p>Reading an example from a book, can someone explain how the function call to fibonacci takes in the argument 'i' when the function itself doesn't declare any parameters?</p> <pre><code>var fibonacci = (function () { var memo = [0, 1]; var fib = function (n) { var result = memo[n]; if (typeof...
javascript
[3]
3,895,139
3,895,140
change background color of the layout in Android
<p>I have a simple Android application, with 3 buttons. When i click on the 1st button, i wanna change the background color of the layout (which is now white... i wanna change in other color, when i press the button). How can i do this?</p> <p>On that button, i have a myClickHndler event</p> <pre><code> public voi...
android
[4]
5,756,789
5,756,790
Which Android device to get for app testing?
<p>I am beginning Android app development and I would like to know which device would give me the most comprehensive testing environment. I would like my app to be compatible with the most number of devices without breaking the bank by buying a dozen devices. Just testing on the emulator is not an option because it run...
android
[4]
1,355,353
1,355,354
PHP split string into 2 variables from containing brackets
<p>I am using a regular expression <a href="http://stackoverflow.com/a/196645/560287">from</a> although this only extracts the text inside of the brackets, I want to completely remove it: </p> <pre><code>if( preg_match( '!\(([^\)]+)\)!', $text, $match ) ) $text = $match[1]; </code></pre> <p>E.g I have: <code>my l...
php
[2]
3,887,074
3,887,075
Java program execution
<p>Please explain me how this program is behaving?</p> <pre><code>class A { //public static String name = "asdf"; public static final String name = "asdf"; static { System.out.println("static block inside A"); } { System.out.println("regular code block"); } } public class tt...
java
[1]
1,824,153
1,824,154
checking al checkboxes in pagination
<p>I have a page that contains user list and checkboxes before each of them and there is a SELECT ALL button.The code works fine. But the problem is that due to pagination, only the checkboxes in the current page gets selected, when i navigate to other pages via the pagination NEXT and PREVIOUS links, the checkboxes r...
jquery
[5]
2,001,340
2,001,341
How can I separate two separated words in a variable?
<p>I have a variable that contains two words separated by a space, and I want to split it into two variables, one for each word. How would I do this?</p> <p>As an example, my string would be <code>hello there</code> and I want to split it into the variables <code>word1</code> and <code>word2</code>.</p>
python
[7]
3,902,125
3,902,126
Row Editing in the grid doesn't work in first click
<p>I have a user control which contains a grid and three buttons for add,edit and delete. I have placed this user control on an asp.net page. I have OnClick events for these buttons. When i click on add and delete buttons it's working fine but when i click on edit button,the onclick event of edit button is fired but th...
asp.net
[9]
3,767,459
3,767,460
Python's join() won't join the string representation (__str__) of my object
<p>I'm not sure what I'm doing wrong here:</p> <pre><code>&gt;&gt;&gt; class Stringy(object): ... def __str__(self): ... return "taco" ... def __repr__(self): ... return "taco" ... &gt;&gt;&gt; lunch = Stringy() &gt;&gt;&gt; lunch taco &gt;&gt;&gt; str(lunch) 'taco' &gt;&gt;&gt; '-'.jo...
python
[7]
436,040
436,041
Creating the instance of abstract class or anonymous class
<p>what about this code here it's creating the object of abstract class or anonymous class? please tell me i am little bit confuse here.</p> <pre><code>public abstract class AbstractDemo { abstract void showMessage(); abstract int add(int x,int y); public int mul(int x,int y){ return x+y; } ...
java
[1]
817,787
817,788
Is there a certain depth before python see's a number a zero?
<p>Long story short, I'm creating a graph using networkx and the lower the weights between nodes(edges) the better.</p> <p>My problem is pagerank doesn't like getting a weight of zero and gives me an error. So I was thinking is there a number that is essentially zero in python but not exactly zero. Something like 0.0...
python
[7]
4,502,186
4,502,187
Operator (*) Cannot be applied to operands of type 'object' and 'double'
<p>This is my code. I can not understand what is the problem, but Visual Studio 2008 says that </p> <blockquote> <p>Operator (*) Cannot be applied to operands of type 'object' and 'double'</p> </blockquote> <p>Thanks ...</p> <pre><code>#region Using directives using System; using System.Collections.Generic; usi...
c#
[0]
4,773,416
4,773,417
Why tuple assignment failed?
<p>I have tried to assign new data to existing tuple, and it does not work.and actually I want to add the a and b to get a sum, however only string can be iterated..</p> <pre><code>A=[('3', '4'), ('3', '11'), ('8', '10')] print A for a,b in A: a,b = int(a), int(b)+int(a) print A </code></pre> <p>results:</p> ...
python
[7]
4,578,587
4,578,588
how to remember the selected value of selected box
<p>How can I 'remember' the selected value of drop down box on submit (using php), For example, once the form is posted on the same page, i want to show the selected value as selected in the selectbox. How can I do that?</p> <pre><code>&lt;form name="date" method="post" action="&lt;?=$PHP_SELF?&gt;"&gt; &lt;select n...
php
[2]
2,364,747
2,364,748
jquery and .attri doesn't work?
<p>Here is my code:</p> <pre><code>function init(){ $.get(URL, function(data) { DATA = data; var srcWithHead = URL + "/" + $(DATA).find("img").attr("src"); $(DATA).find("img").attr("src", srcWithHead); console.log("src = " + $(DATA).find("img").attr("src")); }); } </code></pre> <p>And I wo...
jquery
[5]
997,248
997,249
c++ insertion node in single linked list
<p>Can someone help me understand what I'm doing wrong. I need to insert a character into a linked list.</p> <p>It takes an input like a name of person, than it reverses it. then it tells user to choose a position to add a character.</p> <pre><code>void insert_char(Node* plist, char x, int p){ Node* d=plist; for ...
c++
[6]
1,112,183
1,112,184
How can I print a string to the console without a newline at the end?
<p>My question is.</p> <p>what is it you type when you want your answer next to your question in c# </p> <p>I mean like this but you type the answer next to the question.</p> <pre><code>string product; Console.WriteLine("What is the product you want?"); product = Console.ReadLine(); </code></pre>
c#
[0]
5,796,238
5,796,239
Check if an array is inside an array
<p>The title should explain my question.</p> <p>I have an array:</p> <pre><code>a = [[1,2],[1,3],[1,4]]; </code></pre> <p>How can I check if the array <code>[1,2]</code> is inside the array <code>a</code>?</p>
javascript
[3]
1,631,419
1,631,420
How do I test if an object is inside another one using Jquery?
<p>Without using plug-ins, how would I check if an element is inside another? I tried using<br> <code>element.hover();</code><br> but to no avail. Is this possible with pure JQuery, or should I look for a workaround?</p> <p>The code currently looks like</p> <pre><code>$(document).ready(function(){ $(".element_t...
jquery
[5]
5,802,537
5,802,538
write a code for BFS Traversal
<p>I'm trying to write a code for BFS Traversal. Unable to cast the <code>IDictionary</code> to <code>Hashtable();</code> also unable to use Set adjacent = map[node1]; If any one can help me with this.</p> <pre><code>class Graph { private Dictionary&lt;string, HashSet&lt;string&gt;&gt; map = new Hashtable(); ...
c#
[0]
5,182,558
5,182,559
is it possible to toggle notifications?
<p>I have a galaxy tab and in the settings you can turn notifications on or off. But is this something that samsung made rather than google? I ask because I am making app for napping and this would really come in handy.</p> <p>Thanks :)</p>
android
[4]
1,214,895
1,214,896
Problem with putting in the right parameters
<p>I have problem with putting in the right parameters from an eventListener into a function.</p> <pre><code> &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;script type="text/javascript"&g...
javascript
[3]
115,225
115,226
Free jQuery plugin for image manipulation
<p>Anyone has any idea about free jQuery plugin for image manipulation.</p> <p>jQuery plugin should support at least below functionality.</p> <ol> <li>Image Rotation(clock &amp; anticlock wise)</li> <li>Zoom In &amp; Out</li> <li>Drag &amp; pan</li> </ol>
jquery
[5]
4,507,273
4,507,274
How to document the "non-nullableness" of reference types in C#?
<p>In C#, instances of reference types are passed to functions as a nullable pointer. Consider for example:</p> <pre><code>public void f(Class classInstanceRef) </code></pre> <p>In most cases, the function will expect a non-null pointer (in 95% of all cases in my experience). What is the best way to document the fact...
c#
[0]
4,380,154
4,380,155
jQuery: How do i trigger event / do something when select option is selected?
<p>Can anyone let me know the best way to trigger an event once a select option has been clicked on and chosen?</p> <p>I want to run some additional JavaScript once the user has selected their option.</p>
jquery
[5]
2,152,556
2,152,557
Finding the corresponding column number to the maximum value
<p>I want to find the column number that corresponds to the highest value in a row.</p> <p>I need to write it as a function that takes the following dictionary as a argument:</p> <pre><code> {'1': {'3': 0, '2': 1, '5': 1, '4': 0, '6': 29}, '3': {'1': 0, '2': 0, '5': 0, '4': 1, '6': 1}, '2': {'1': 13, '3': ...
python
[7]
5,591,624
5,591,625
how to access web in android browser in android emulator
<p>Hi friends I have set proxy in android emulator. still I am not able access google in android browser in android emulator can anybody tell how to access google in android emulator?</p> <p>I have setted proxy like this setting ->wireless and network setting->mobilenetworks->accesspointnames->tekila</p>
android
[4]
14,975
14,976
APK Installation
<p>I'm trying to figure out how to install an APK programmatically without it showing up in the all/manage apps - the listing of apps/icons.. etc</p> <p>I've put together a game with Corona, but unfortunately Corona does not have any integration with c2dm yet and the devs never answer forum questions regarding it.. so...
android
[4]
2,049,668
2,049,669
So confused about why vars work sometimes with or without var?
<p>I am really confused as to why sometimes vars will not work when "var" is declared in front of them when used in a namespaced object. Isn't adding "var" in front of every variable the correct thing to do to keep it outside the global namespace?</p> <p>Or would creating any var without declaring "var" first in my na...
javascript
[3]
4,899,457
4,899,458
how to send an e-mail automatically when a row is inserted in the database?
<p>I have to develop a application with the following scenario:</p> <p>1--User create a profil (name,lastname,address....)</p> <p>2--The information are inserted in the database</p> <p>3--The administrator should receive an e-mail to be notified by the new profil ,if the administrator dont approve the profil he wi...
java
[1]
2,449,523
2,449,524
C# List<> Add lists to dictionary
<pre><code> Dictionary&lt;string, List&lt;Piese&gt;&gt; SetPiese = new Dictionary&lt;string, List&lt;Piese&gt;&gt;(); char[] litere = "ABCDEFGHIJLMNOPRSTUVXZ".ToCharArray(); for (int i = 1; i &lt;= litere.Length; i++) { SetPiese.Add(litere[i], Set + litere[i]); } Li...
c#
[0]
494,505
494,506
split timestamp by hour
<p>I have a list of timestamps in ISO format</p> <p><code>[u"2000-01-01T00:00:00+00:00", u"2000-01-01T00:00:00+00:00", ... ]</code></p> <p>I'm trying to split each string by the hour. However, using <code>"string".strp(":")</code> obviously won't work, because of a <code>too many values to unpack</code> error (due...
python
[7]
4,135,128
4,135,129
how java.util.ServiceLoader works?
<pre><code>ServiceLoader&lt;A&gt; xyz = ServiceLoader.load(A.class); xyz.iterator().hasNext() ------&gt; returning false ; </code></pre> <p>I have a text file in "META-INF/services/" named A containing the name of the class which extends A.</p> <p>Now why it is returning false .</p> <p>can anyone please explain me...
java
[1]
2,918,465
2,918,466
.Trim() when string is empty or null
<p>I'm receiving some data from the client in the form of json. I'm writing this:</p> <pre><code>string TheText; // or whould it be better string TheText = ""; ? TheText = ((serializer.ConvertToType&lt;string&gt;(dictionary["TheText"])).Trim()); </code></pre> <p>If the variable that's being parsed from json comes bac...
c#
[0]
5,189,944
5,189,945
php and asp problem in uploading
<p>i have an ASP web services to change byte array that given from the client and change it to a file and save it in the web server</p>
php
[2]
2,984,803
2,984,804
PHP mark output finished
<p>I'm participating in a development of a php program and we are trying to improve its performance in stuff like:</p> <p>Execute, finish output to the user, do scheduled stuff.</p> <p>The objective here is to send information to apache, IIS, etc... Stating that the information about all is done can be sent to the br...
php
[2]
4,513,571
4,513,572
Is there a more efficient one liner to initialize a variable based on a condition?
<p>Can the <code>atype</code> variable be initialized via a one liner ?</p> <pre><code>def detect(dt,result): """ prints the type of date """ atype = 'unknown' if 'greg' in result: atype = 'Gregorian' elif 'eth' in result: atype = 'Ethiopian' print '%s is in %s format.' % (dt,atype...
python
[7]
3,391,741
3,391,742
Get the Integer from the end of a string (variable length)
<p>I have a string of a variable length and at the end of the string are some digits. What would be the best / efficient way, to parse the string and get the number from the end as an Integer?</p> <p>The String and the digits at the end can can be of any length. For example:</p> <pre> abcd123 --> 123 abc12345 --> 123...
java
[1]
2,406,865
2,406,866
Java printing problem
<p>I was having a text file as given below,</p> <pre><code>(DA1A11,Inflation accelerates, Thursday rate hike seen ) (DA1A12, In India's grain bowl, farms face threat from MNREGS ) (DA1A13, World off course on climate; renewables vital ) (DA1A14, Sri Lanka, India resume ferry service after 30 years ...
java
[1]
2,827,369
2,827,370
Digit limitation from decimal point in C++
<p>I'm new in C++.I have double variable <code>double a=0.1239857</code> I want to limit variable <code>a</code> from decimal point two digits.So <code>a</code> will be <code>0.12</code>. I know C++ have functions that return largest or smallest integer that is greater or lower than <code>a</code> like ceil or flo...
c++
[6]
3,947,143
3,947,144
Getting Error "Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY"
<p>I'm getting an error when trying to use an external jar file to access Forward facing camera in Android. But when we try to load, i get error <code>Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY</code> on my console window of myeclipse. " when i saw a log file, the error was "unavailable shared library <...
android
[4]
4,224,649
4,224,650
PHP isset only working with print_r, echo... but not on its own
<p>I'm about to punch PHP in the nads. I've got an incredibly simple operation that is basically acting with a mind of it's own.</p> <pre><code>$this-&gt;user = $this-&gt;processToken($token); if(!isset($this-&gt;user)) { $this-&gt;sendError(401); } </code></pre> <p>w/ a valid $token this sends a 401, which it s...
php
[2]
5,869,860
5,869,861
Issues with JavaScript Form Validation
<p>I am trying to do Form validation to validate the information request form by checking that the following fields in the form have been filled out:</p> <p>▪ Name field<br> ▪ Email field<br> ▪ Comments</p> <p>My function validateName() does not work at all it causes the other functions not to work either (adding def...
javascript
[3]
5,155,582
5,155,583
2 lines of JQuery not working in IE but work fine in FF
<p>I have a site that has 4 drop downs. I have added JQuery code so that if a user changes one of the drop down selections the remaining drop downs that are below the changed one resets to default. Everything works if FF but not IE. Any help with be great!</p> <p>The last 2 lines of code is the only part not working. ...
jquery
[5]
78,467
78,468
How to change content depending on a <select>?
<p>I need help on 2 things since I'm not savy in PHP: Content that changes depending on the:</p> <pre><code>&lt;select&gt; &lt;option&gt;Option 1&lt;/option&gt; &lt;option&gt;Option 2&lt;/option&gt; &lt;/select&gt; </code></pre> <p>I think this can be done using PHP, by giving names to the options, having PHP...
php
[2]
581,645
581,646
Multiple jQuery plugins in one file
<p>Is it possible to have multiple jquery plugins in one file under (function( $ )</p> <p>If it is possible then I have a really wierd issue. There are two plugins in my single file both sitting in the following structure:</p> <pre><code>jQuery(document).ready(function() { (function( $ ){ </code></pre> <p>//PLUGIN...
jquery
[5]
4,156,961
4,156,962
How to execute the loop for specific time
<p>How can i execute the a particluar loop for specified time</p> <pre><code>Timeinsecond = 600 int time = 0; while (Timeinsecond &gt; time) { // do something here } </code></pre> <p>How can i set the time varaible here, if i can use the Timer object start and stop method it doesnot return me time in seconds</p> ...
c#
[0]
2,206,199
2,206,200
Creating dynamic arrays as class properties
<p>I need to display data "weekly" in JSON formatted output,for that i have to create 52 properties as DataMemebers in the class,because, Json outputs the class property name(here Week1 and week10) followed by the value. </p> <pre><code>Week1,Week2,Week3....Week52, </code></pre> <p>my JSON formatted output looks lik...
c#
[0]
3,102,775
3,102,776
How to keep layout and its data
<p>I need your help, I have 2 activities A and B where A is the main activity. Now B starts the activities from A using <code>startActivityForResult()</code> and from B when I finish it will go back to activity A. </p> <p>This works fine but the actual purpose was like the Gmail application when you go back from B to...
android
[4]
4,388,214
4,388,215
Android - user preferences synching across devices
<p>I'm working on an app and requirement is that all preferences to be shared across user devices (connected to the user's google account). Is there any service for Android, like iCloud in iOS, which automatically synchronizes all the user data put in one folder on a phone, or kay-value pairs using API? So each time us...
android
[4]
4,587,538
4,587,539
Problem with binary ==
<p>I've run into strange problem with binary <code>operator==</code>.<br> I have a function which returns: <code>Type&lt; Colors &gt;* get();</code>, <code>T</code> is of type <code>enum Colors {Red,Black}</code> and I have an <code>operator==</code> defined as: </p> <pre><code>bool operator==(Type&lt;Colors&gt;* lef...
c++
[6]
908,563
908,564
error: invalid conversion from ‘const char*’ to ‘char*’
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/289347/using-strtok-with-a-stdstring">Using strtok with a std::string</a> </p> </blockquote> <pre><code>#include&lt;iostream&gt; #include &lt;string&gt; #include &lt;string.h&gt; using namespace std; int main(...
c++
[6]
3,262,036
3,262,037
A hierarchy in CheckBoxList
<p>I have 2 tables, Categories and Sub Categories. Is it prossible to present all sub categories in a checkbox list arraged by their cagetories? </p> <p>Something like this:</p> <p>Category 1</p> <ul> <li>sub category checkbox1</li> <li>sub category checkbox2</li> </ul> <p>Category 2</p> <ul> <li>sub category chec...
asp.net
[9]
3,743,414
3,743,415
How to perfom action only after animate is finished?
<p>I have my code:</p> <pre><code>$(this).attr("disabled","disabled"); $(this).animate({'opacity':'0.6'}, 200); $(this).animate({'opacity':'1'}, 200); $(this).attr("disabled",""); </code></pre> <p>I want that the input would be disabled when the <code>keypress</code>'ed and it would be enabled only then, when the ani...
jquery
[5]
916,878
916,879
Use of Javascript for Validation in each Wizard step of an Wizard Control in ASP.NET
<p>Hi Can anyone suggest how to implement Javascript for validation in an each wizard steps of Wizard Control of ASP.NET.</p> <p>Thank in Advance!!</p>
asp.net
[9]
4,248,219
4,248,220
Set Value of EdiTextPreference in android
<p>in Android i want to set EditTextprefernce value i tried </p> <pre><code>EditTextPreference etp = (EditTextPreference)getPreferenceScreen().findPreference("mykey"); etp.setText("123"); </code></pre> <p>tell me how can i set EditTextpreference value in program dont suffest me in xml/preference.xml to write android...
android
[4]
4,773,786
4,773,787
find nearest date from a list
<p>i have a list of dates and a current date how can i find the date which is nearest to the current date.</p>
java
[1]
3,855,173
3,855,174
C# design dump/overview? Class stats
<p>Is there a way i can see stats on my class design? This project grew pretty big and i am sure it is messy but so far <em>for me</em> its easy to maintain. Is there a way i can see the count of methods on each class, how many classes i have and how many static members i have etc? (hopefully i only have static methods...
c#
[0]
5,219,352
5,219,353
Decrease the brightness of the screen on button click
<p>I have a problem that I want to decrease the brightness of the screen on the button click but failed to do that. I don't know why? I have written the code of few lines but it doesn't work for me. Please suggest me the right solution regarding the same.</p> <p><strong>Code:</strong></p> <pre><code>private void setB...
android
[4]
1,269,393
1,269,394
jQuery Air Passenger Seat Layout Example
<p>I showed an extreme sample before 6 months. it is related to "Air routes". there is a plane map. you can select a seat.you are separated. Can you give me this link if you know where is?</p>
jquery
[5]
3,713,547
3,713,548
Virtual base destructor
<p>I have a problem as below:</p> <pre><code>#include &lt;iostream&gt; using namespace std; class B { public: B() { cout &lt;&lt; "Base Constructor \n" ; } virtual ~B() { cout &lt;&lt; "Base Destructor \n" ; } }; class D : public B { public: D(string s)...
c++
[6]
3,837,383
3,837,384
Display the items in DropDownList
<p>In my project i have used four number of dropdownlists in a single form.</p> <p>when im selecting an item from the 1st dropdownlist,the dropdownlist2 has to display the items that matches the selected item from dropdowmlist1. Please clear my doubt.,</p>
c#
[0]
4,330,270
4,330,271
python datetime localization
<p>What do I need to do (modules to load, locale methods to invoke, etc.) so that when I call:</p> <pre><code>datetime.date(2009,1,16).strftime("%A %Y-%b-%d") </code></pre> <p>instead of getting:</p> <pre><code>Out[20]: 'Friday 2009-Jan-16' </code></pre> <p>i get spanish/french/german/... output</p> <pre><code>Out...
python
[7]
4,325,445
4,325,446
syntax error in this code
<pre><code>&lt;?php $hel=array("hello","gello","lello","hallo","hollo","henlo,"hellv","HELLO","helLo","sello","helo","helloo"); for($i=0;$i&lt;count($hel);$i++) echo strcmp("hello",$hel[i])."&lt;br/&gt;"; echo "\n"; ?&gt; </code></pre>
php
[2]
3,460,905
3,460,906
Procedural--enough?
<p><em>I posted a similar question on the PHP section of stackoverflow and was told that this might be a better forum in which to submit my question.</em></p> <p>Without any programming experience whatsoever, I started studying PHP beginning in the second quarter of this year with the goal of slowly building my dream ...
php
[2]
2,893,707
2,893,708
jquery content rotator various widths
<p>i have a content rotator of various width images</p> <pre><code>var move = setInterval(function(){ var item_width = $('.slide-img:last').outerWidth(); $('.slide-img:last').css({width: 0}); $('.slide-img:last').insertBefore('.slide-img:first'); $('.slide-img:first').animate({width: item_width},5000)...
jquery
[5]
4,011,766
4,011,767
Object doesn't support this property or method - jquery modal
<p>I have this little snippet, which works on FF, C, O, etc..but i got this error in IE.</p> <p>What should i do wrong? Thnak you.</p> <pre><code>&lt;script src="js/pop.js"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function() { $( "#dialog" ).dialog({ height: 140, modal: true })...
jquery
[5]
3,826,991
3,826,992
validation expression for all over world mobile no
<p>I need one validation expression for all over world mobile no as weel pincode...</p>
asp.net
[9]
5,158,106
5,158,107
how to measure the page time load?
<p>I want to know how much time a specific code in my App takes ?!!! Thank you </p>
c#
[0]
2,234,171
2,234,172
Getting an index outside bound of an array in C#
<p>This program is supposed to show the path of a directory and the directory if its exists then it should also show the files inside with the following extensions (i.e .doc, .pdf, .jpg, .jpeg) but I'm getting an error </p> <blockquote> <p>*Index was outside the bounds of the array.</p> </blockquote> <p>on this lin...
c#
[0]
2,456,268
2,456,269
Android getting unexpected response from remote server call
<p>I am trying to send a call to a remote server with user credentials, and get back a true/false for whether the persons credentials match. But my code is returning the credentials right back to me in JSON lol</p> <pre><code> try { String query = String.format("login=%s&amp;...
android
[4]
2,756,172
2,756,173
Header guard / translation unit problem
<p>I was under the impression that header guards solve the problem of redefinition. I'm getting linker errors that say there are redefinitions in the .obj files. This is the header I'm including, the problems are with the redefinition of all the global declarations.</p> <pre><code>#ifndef DIRECT3D_H #define DIRECT3D_H...
c++
[6]
352,450
352,451
android facebook page like
<p>i want to like a facebook page in my android app..is there any API for this?i tried a code.it was working intially.but now it is not working</p> <pre><code>likeWebView = (WebView) findViewById( R.id.webView1 ); likeWebView.getSettings().setJavaScriptEnabled(true); String url = "http://www.facebook.com/plugins/like....
android
[4]
5,743,823
5,743,824
Usages of private static object in java?
<p>Could someone let me know the places where we need to use private static object in java?</p> <p>the places i mean is about the reasons behind in using them or the use cases where we need to use them.</p> <p>Thanks, Kathir</p>
java
[1]
1,214,767
1,214,768
Calculating total from SQLite data in android
<p>I am coding a simple android application that accepts input of numeric data and stores it in an SQLite database, how do I calculate the total and display it to the user. </p> <p>Here is the code for the input</p> <pre><code>String title = expenseTitle.getText().toString(); String amount = expenseAmount.get...
android
[4]
2,231,764
2,231,765
Get Network properties of machine
<p>i am looking for class that can show me all the Network properties of machine: Ip's, Default Gateway, Mac Address, Default Gateway, Adapter Speed, etc..</p> <p>thanks</p>
c#
[0]
2,687,958
2,687,959
Jquery: Draggable bug
<p>My drag element is positioned relative to its parent that is also positioned relative (such positions are a must). I set containment to 'parent'. When I drag the element and scroll at the same time, the drag element goes out of its parent. Is that jQuery's bug? How to fix it? Setting 'scroll' to 'false' does change ...
jquery
[5]
134,724
134,725
how do you use your own ico files for win32 program
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/320677/how-do-i-set-the-icon-for-my-application-in-visual-studio-2008">How do I set the icon for my application in visual studio 2008?</a> </p> </blockquote> <p>I use Microsoft Visual C++ 2008 express edition, A...
c++
[6]
5,262,487
5,262,488
How could I parallelize the following loop USING C++ AMP?
<p>I have the following loop in c++</p> <pre><code>dword result = 0; for ( int i = 0; i &lt; 16; i++ ) { result |= ( value[i] &lt;&lt; (unsigned int)( i &lt;&lt; 1 ) ); } </code></pre> <p>And I would like to parallelize it in amp. I know it might go slower then the actual non-parallelized version above, but I wan...
c++
[6]