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
500,801
500,802
set::find() doesn't find
<p>I have a problem with this code (cubeBoxData is a set of cubeBox):</p> <pre><code>cubeBox temp(bx,by,bz); cubeBoxData.insert(temp); set&lt;cubeBox&gt;::iterator i = cubeBoxData.find(temp); const_cast&lt;cubeBox&amp;&gt;(*i).addCube(x,y,z); </code></pre> <p>The problem is that cubeBoxData.find(temp); doesn't find t...
c++
[6]
4,419,140
4,419,141
Benefits of scoping blocks?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/690711/when-do-you-use-code-blocks">When do you use code blocks?</a> </p> </blockquote> <p>Ok, this might be a stupid question and I might be missing something obvious but as I slowly learn C# this has kept nagg...
c#
[0]
5,109,902
5,109,903
Need Solution to reduce object creation, used spring - but have a problem , method explained in detail
<p>I am using spring to reduce new objects creation, for the number of resultset available, I will create a row object inside and add the row object in a rowset object, which maintains a list of rows.</p> <p>My code goes like this.</p> <pre><code> while(rs.next()) { Row r = new Row(); //Logic rowset.addRow(r...
java
[1]
3,468,055
3,468,056
C# WinForms ListBox SelectedIndex Equivalent in ListView?
<p>What is ListBox SelectedIndex Equivalent in ListView ? How i can write the below code in ListView ?</p> <pre><code>if(listbox.SelectedIndex == -1) { } </code></pre>
c#
[0]
5,802,925
5,802,926
Is there any true point to the Java interface?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/504904/how-are-java-interfaces-actually-used">How are Java interfaces actually used?</a> </p> </blockquote> <p>I'm not talking from an accademic buzzword point of view but from a pratical developer point of view...
java
[1]
4,650,812
4,650,813
what's the relationship between function and Function in Javascript
<p>as known in javascript, a function defined as </p> <pre><code>function somefunc(){ } </code></pre> <p>is an instance of its constructor <code>Function</code>. But <code>Function</code> itself is a function either which implies the <code>Function</code> is an instance of <code>Function</code>. Is that what they ar...
javascript
[3]
4,717,451
4,717,452
Get random value without creating `Random` object
<p>I'm writing a class constructor with a decimal field, that is need to be initialized by a random value. Just one little field and I need to create new <code>Random</code> object. In the first place it looks cumbersome, and in the second there is can arise a lot of equal values, in case of creating a lot of objects i...
java
[1]
3,230,241
3,230,242
how to handle an exception when using timer
<p>I want to use timer to run a method in a period of time delayed, but the method may throw an exception which cannot be handled by run(), what should I do in this situation? the code may like below</p> <pre><code>Timer timer = new Timer(); timer.schedule(new TimerTask() { public void run() { met...
java
[1]
784,546
784,547
Python code won't run first line prompt
<p>Why won't the following python code immediately run the first line and prompt <code>how many years?</code> ? </p> <pre><code>years=input('how many years?') amount=input('how much money?') if amount &lt; 10000: interest = 1.1 total = amount * interest print total else amount &gt;= 10000: interest =...
python
[7]
3,343
3,344
Definition of friend inside class
<p>Can i put definition of friend function / class inside another class? I mean something like this:</p> <pre><code>class Foo { friend void foo() {} // 1 friend class Bar {}; // 2 }; </code></pre> <p>gcc compiles friend function, but can't compile friend class.</p>
c++
[6]
644,943
644,944
how to read .rtf file from the FTP server?
<p>I know how to read text file from the ftp server.I have used this logic for rtf file.But it gives wrong out put.Is it possible to read rtf file from the server?If possible then please help me.</p>
iphone
[8]
1,602,425
1,602,426
Android update an app in the background
<p>This app is not on the google play. I can update in manually from a server, but I d like to update it automatic, like in the google play, it is updating automatically in the bg, and show it in Notification bar.</p> <p>How can I do that?</p> <p>Thanks</p>
android
[4]
2,111,069
2,111,070
Making an easy way of getting the value I need in PHP?
<p>I am making a game in php as a personal project.</p> <p>I can make items out of items that I have, the items I have are stored in an array called <code>$user</code></p> <p>For now I am displaying how many of each item I can make by doing the following (let us say that to make a spade you need 1 wood and 1 metal an...
php
[2]
3,888,292
3,888,293
How can I call a static method from a class if all I have is a string of the class name?
<p>How would I get something like this to work?</p> <pre><code>$class_name = 'ClassPeer'; $class_name::doSomething(); </code></pre>
php
[2]
1,706,654
1,706,655
Closing a Activity on new Activity
<p>I have an activity that has a button with a intent as follows</p> <pre><code>Intent i = new Intent(getApplicationContext(), MyMainActivity.class); startActivity(i); finish(); </code></pre> <p>Once you move to the next activity <code>MyMainActivity.class</code> if you hit the b...
android
[4]
1,852,796
1,852,797
Publishing All Project Files in Visual Studio
<p>Is there a security risk associated with using the option that copies "All project files" when publishing a web application into a production environment? I normally use the option "Only files needed to run this application" which does not copy the source code to the server. </p> <p>I am the only person with access...
asp.net
[9]
3,608,145
3,608,146
What functions should I disable if I would allow users to type PHP?
<p>Let's say I want my users to allow to create PHP scripts on my page and I would save those pages in directory. What functions should I disable to not be hacked? Or what should I do? </p> <p>Firstly, I would not allow people to upload files through PHP file (not sure how to do it yet), what else?</p>
php
[2]
1,775,835
1,775,836
ASP.NET login control mysteriously stops working
<p>I'm using the ASP.NET Login control and have been doing so for a couple of years on a particular site with success. Out of the blue, in the dev environment, this control has stopped working and is now bouncing me back to the login page.</p> <p>Using source control I've reverted recent changes that might have been t...
asp.net
[9]
616,927
616,928
Creating jar file forcing the jvm to take the desired main method
<p>I have faced this question in the interview so that I am posting this here where I believe I can get answer.</p> <p>this is what is the question.</p> <ol> <li><p>I have four Java files, each one has got a main class. while creating jar file combining all these four classes how to make the jvm to invoke the main me...
java
[1]
3,076,276
3,076,277
How to "tail -f" file from a remote Unix system in Java?
<p>I want to be able to get buffered input from a remote system (using SSH and username password encrytion from Java) and then "tail -f" a file, buffering the input. Is this possible?</p>
java
[1]
3,215,158
3,215,159
how to use inbuild contact database?
<p>I am developing a contact application using android 2.2. I want to use the Contact Inbuild database. I have already access to the data in Listview. But when it inserts for adding a contact record which content uri should I use? Or how to insert record through my own UI?</p>
android
[4]
3,458,048
3,458,049
What is the order of destruction for variables initialized through constructor initilization set?
<p>suppose i have class A,B and C</p> <p>if i then have container as follows</p> <pre><code>Container::Container() :A(10),B(20),C(30) { //Do something specific } </code></pre> <p>Now if i call the destructor of Container, i.e ~Container() I notice that destructors are getting called in the reverse order i.e ~C(),...
c++
[6]
5,651,186
5,651,187
Request Help for reading a line of JS
<p>Can someone tell me what the ? means in the js below? I did not line wrap the JS code as I did not want to inadvertently change the meaning...</p> <pre><code>errMess = t.origStatus != undefined &amp;&amp; t.status != t.origStatus &amp;&amp; t.statuseffective == null ? errMess + t.systemname + ": Status effective d...
javascript
[3]
1,987,794
1,987,795
C# Get All file names without extension from directory
<p>Im looking for a way to read ALL txt files in a directory path without their extensions into an array. Ive looked through the path.getFileNameWithoutExtension but that only returns one file. I want all the *.txt file names from a path i specify</p> <p>THanks</p>
c#
[0]
3,689,478
3,689,479
Errors concerning depreciated eregi
<p>This is the error i am receiving </p> <pre><code>Deprecated: Function eregi() is deprecated in /home/socia125/public_html/profile.php on line231 </code></pre> <p>This is my code</p> <pre><code>// Loop through the array of user agents and matching operating systems foreach($OSList as $CurrOS=&...
php
[2]
3,559,884
3,559,885
How to convert from object to String?
<p>How to convert arraylist selectitem to string.I am getting as object.Please help me...</p> <pre><code>List&lt;SelectItem&gt; DtlLst = new ArrayList&lt;SelectItem&gt;(); DtlLst.add(new SelectItem(DtlVO.getTrnId(), DtlVO.getTrnId())); --- --- String number =new String(DtlLst.get(0).toString()); ...
java
[1]
708,385
708,386
How to display the images from server asynchronously in Android?
<p>I am displaying an image from a server in Android. For that I have gone through the tutorial <em><a href="http://www.androidpeople.com/android-load-image-url-example" rel="nofollow">Android Load Image From URL Example</a></em>. It is very helpful. But it is taking 5 minutes to display the image from the server. So I...
android
[4]
5,464,096
5,464,097
Putting a const in a header
<p>From everything I am reading and testing, there is no way (without a preprocessor macro) to define a constant in a shared header and ensure that each TU is not creating its own storage for that constant.</p> <p>I can do this:</p> <p><code>const int maxtt=888888;</code></p> <p>Which is the same exactly as:</p> <p...
c++
[6]
2,743,034
2,743,035
Finding objects in JS array and storing names to new array?
<p>So, I have an array that contains X objects, all named by dates and containing useless data beyond their name. I want to store these dates in an array for later use and objects are, apparently, not found in an array by array[i], so how do I iterate through the array and just save the names to a string in another arr...
javascript
[3]
5,535,226
5,535,227
String functions to show a substring
<p>I have a string. If the length of the string is more than 90 characters i have to display only the 90 characters &amp; concatenate it with a ".." can anyone tell me which string function i can use for this?</p>
c#
[0]
1,992,093
1,992,094
Set cookie and update cookie problem - Php
<p>In an attempt to get more familiar with cookies I've decided to set up a simple cookie management system to have more control of the information that I can store and retrieve from a user.</p> <p>The idea is to set a cookie if it does not exist, and update a cookie if it already exists on the user. </p> <p>Once the...
php
[2]
2,433,112
2,433,113
Javascript Arranging Images as Pile of Cards
<p>Im new to javascript so im sure there is a lot i am missing in its understanding. What i am trying to do it create a layer of images so that it looks like a pile of cards.</p> <p>have seen similar codes and have tried to follow their idea but i just cant get the images to position properly. All 10 or so images are ...
javascript
[3]
3,707,366
3,707,367
What's wrong with my sub-classed AVAudioPlayer?
<p>I sub-classed AVAudioPlayer like so:</p> <pre><code>#import &lt;AVFoundation/AVFoundation.h&gt; @interface AudioPlayer : AVAudioPlayer { // irrelevant objects... } -(void) myMethod; @end </code></pre> <p>I also placed myMethod in the implementation. In another class, I instantiate the sub-class (not AVAudioP...
iphone
[8]
4,169,167
4,169,168
How do you create multiple variables from raw input in python?
<p>Beginner with python here. I've been doing some online tutorials and can't seem to find the solution to this question. What I'd like to do is this:</p> <pre><code>hostname = raw_input("Type host name here: ") </code></pre> <p>Then the user inputs as many host names as they like, type done, then what they entered b...
python
[7]
3,125,883
3,125,884
Delegate handler for inner list?
<p>I have the following:</p> <pre><code>&lt;ul id='foo'&gt; &lt;li&gt; &lt;ul class='a'&gt; &lt;li class='animal'&gt;goat&lt;/li&gt; &lt;li class='animal'&gt;horse&lt;/li&gt; &lt;li class='animal'&gt;pig&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt; &lt;ul class='a'&gt; &lt;li...
jquery
[5]
4,111,340
4,111,341
php function to unset variables passed by reference
<p>currently i'm using this php function :</p> <pre><code>function if_exist(&amp;$argument, $default = '') { if (isset ($argument)) { echo $argument; } else { echo $default; } } </code></pre> <p>i want this function to unset the variables $argument(passed by reference) and $def...
php
[2]
727,357
727,358
Accessing a 2D array between two friend classes
<p>My question is how to access and modify a 2D array defined in one class that is friends with another class. Below are some details on my question:</p> <p>In <code>class A</code> I declare and allocate the appropriate space for my 2D array (pointer-to-pointer) u. </p> <pre><code>Class A { public: friend class...
c++
[6]
5,973,589
5,973,590
ASP.NET membership data storage issue
<p>I have created a sample web application in Visual Studio 2010. It stores Membership data(users, roles etc) in a .mdf file in App_data folder. But I don't wanna do this. I wanna store data in SQL server database. </p> <p>For that I Google a lot but could not find solution. Here is what I am doing so for. First I cre...
asp.net
[9]
517,951
517,952
Returning and instance of a Class given its .class (MyClass.class)
<p>I have an enum that will hold my algorithms. I cannot instantiate these classes because I need the application context which is only available once the application has started. I want to load the class at runtime when I choose by calling getAlgorithm(Context cnx). </p> <p><strong>How do I easily instantiate a cl...
java
[1]
2,664,547
2,664,548
Can you extrapolate the "email address" from a websites std. contact us form?
<p>Trying to obtain the "path" that a websites contact form has. Is there a way to "reverse engineer" the std. "contact us" form to find out the actualy email address that it goes to ?</p>
android
[4]
1,470,790
1,470,791
function to profile / performance test PHP functions?
<p>I'm not experiencing any performance issues, however I'd like to take a look at what takes how long and how much memory cpu it uses etc.</p> <p>I'd like to get a firsthand understanding of which things can be bottle necks etc and improve any code i might reuse or build upon... (perfectionist)</p> <p>I'm looking to...
php
[2]
5,102,914
5,102,915
What are the troubleshooting steps to troubleshoot if jquery events are not firing off?
<p>If a jquery event is not firing off, what are troubleshooting steps to figure out what causing why the event is not firing off?</p>
jquery
[5]
997,267
997,268
Save radio button status php
<p>Form table is introduced inside an echo and, for the texts fields, I use value=" ' .$_POST['name'] to set default value if form was already sent at least one time. It works properly. However, how could I save radio buttons status when form was already sent? Thanks.</p> <pre><code>&lt;tr&gt; &lt;td colspan="2" align...
php
[2]
2,437,032
2,437,033
I want to replace all instances of {0} on a page with an image or run a function when that is printed out. can i do this with php?
<p>I am making a widget that shows images in places where the user puts a {0} or {5}. can this be done with php? i dont know where to start and i have worn out my fingertips searching for it on google because i dont know good keywords.</p>
php
[2]
4,786,338
4,786,339
What does "!function () {}" mean/do in javascript?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3755606/what-does-the-exclamation-mark-do-before-the-function">What does the exclamation mark do before the function?</a><br> <a href="http://stackoverflow.com/questions/5422585/preceding-function-in-javascript">!...
javascript
[3]
645,008
645,009
How to implement a union query using the SqliteDatabase query method
<p>I am developing an application when i retrieve a data from an sqlite database using rawQuery method because the query is a UNION query and the data is displayed on a listview . I would like to use a query method because i would also like to implement a content provider to handle the data retrieved from the database...
android
[4]
5,420,688
5,420,689
What's low level Javascript?
<p>I've seen the term "Low level Javascript" come up a few times but I've no idea what it means. Google shows no results surprisingly. Can someone shed some light on it?</p>
javascript
[3]
593,506
593,507
Dropdown menu open on click close on click
<p>I have asked this question before but it was closed as I didnt ask it properly. My issue is that I have a wp photography site which is not live yet as I am customizing it..I am very new to jquery and css. It has a dropdown menu which when you click on an item eg Portfolio it will drop down a further sub menu which w...
jquery
[5]
5,397,444
5,397,445
Determine which element comes first
<p>I have an array with objects id's:</p> <pre><code>one two there etc.. </code></pre> <p>And i have quite a long object list:</p> <pre><code>&lt;div id="container"&gt; &lt;input type="text" id="one" /&gt; &lt;input type="text" id="two" /&gt; &lt;input type="text" id="three" /&gt; &lt;/div&gt; </code></pre> <...
jquery
[5]
3,212,671
3,212,672
Where to check the color android.R.color.holo_red_light
<p>I need to know what is the color exactly which is referred by <code>android.R.color.holo_red_light</code>. Where to check it? Please advice. Thank you.</p>
android
[4]
1,415,929
1,415,930
How do I find the number of objects that are alive in C++?
<p>I want to find the objects of a class that are currently alive in C++. Please tell me a solution for this. Also, please correct if my logic is wrong!</p> <ul> <li>Declare a global variable.</li> <li>Increment it during the constructor invocation.</li> <li>Decrement during destructor invocation. </li> </ul> <p>Than...
c++
[6]
4,251,061
4,251,062
language compatibility in asp.net
<p>I'm developing one web app and for that i need to use UNICODE connect in asp.net, my requirement is end user can enter text in any Indian language like Marathi,Hindi,Gujarati etc. for e.g like "orkut" has an option that user can write text in Hindi </p> <p>How can i do this in asp.net please suggest me the solution...
asp.net
[9]
3,754,084
3,754,085
Parser exception for /FadeInOut/AndroidManifest.xml: The markup in the document following the root element must be well-formed
<p>I hope this error is in manifest file ,here i am placing the manifest file.error is showing at last line. thanks in advance</p> <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sri.fadeinout" android:versionCode="1" android:versionName="1.0" &gt...
android
[4]
1,932,921
1,932,922
Instruments chart for iphone
<p>i have a doubt ..i clicked on leaks and then i can see graph now <strong>should i run application to check memory leak or it will do on its own</strong>?? and the moment my apps start after 3 secs i can see blur bar of height 0.5 that keep going?? so what should i do?? is that leak permanent (cause blue bar is stati...
iphone
[8]
4,841,057
4,841,058
Get values between DIV tags?
<p>How do I get the values in between a DIV tag?</p> <p><strong>Example</strong></p> <pre><code>&lt;div id="myOutput" class="wmd-output"&gt; &lt;pre&gt;&lt;code&gt;&lt;p&gt;hello world!&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt; &lt;/div&gt; </code></pre> <p>my output values I should get is </p> <pre><code>&lt;pre&gt;&...
javascript
[3]
5,773,523
5,773,524
Having error message (Sorry this video can't play) to play online video in VideoView
<p>Can anyone suggest me, Why this code is not working.....</p> <pre><code>public class VideoActivity extends Activity { /** Called when the activity is first created. */ String Link="http://www.veoh.com/watch/v18571861xWT9d7yF"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedIns...
android
[4]
1,949,667
1,949,668
c++ std::string to boolean
<p>I am currently reading from an ini file with a key/value pair. i.e.</p> <pre><code>isValid = true </code></pre> <p>When get the key/value pair I need to convert a string of 'true' to a bool. Without using boost what would be the best way to do this?</p> <p>I know I can so a string compare on the value (<code>"t...
c++
[6]
1,808,802
1,808,803
C#: Fast way to check how many UTF-8 encoded bytes thats in a StringBuffer?
<p>I'm building sitemaps and I need a way to quickly check how many UTF-8 encoded bbytes StringBuilder currently contains?</p> <p>The naive way to do this would be to:</p> <pre><code>Encoding.UTF8.GetBytes(builder.ToString()).Length </code></pre> <p>But isn't this a bit bloated?</p> <p>Using builder.Length doesn't ...
c#
[0]
5,130,596
5,130,597
Android - How to apply custom Logo/image with animation as circular progress dialog in Android application?
<p>I am using Progress Dialog to show progress/working. I want to replace default spinner dialog with my own image with animation. I created a layout that contains an image view.then i created a frame animation (i.e. frame_animation.xml) in res/anim (also tried with placing in drawable folder) directory. Finally applie...
android
[4]
2,483,707
2,483,708
Site that lists which cpus, used on mobile phones, have fpu
<p>I was wondering if there is a site that lists full cpu specifications for a wide variety of mobile phones, more specifically the ones that support android.</p> <p>I am in the process of writing an android application that requires definitely <strong>fpu</strong> and armv6 compatibility</p> <p>Thank you in advance<...
android
[4]
3,592,705
3,592,706
iPhone: receiving warning on clicking uialertview cancel or other button
<h2>warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.4 (8K2)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).</h2> <pre><code>- (void)showReminder:(NSString *)text { NSLog(@"alert text&gt;&gt;%@",text); UIAlertView *alertView = [[UIAlertView ...
iphone
[8]
748,628
748,629
Can we create temporary pass-in `std::vector<int>` parameter?
<pre><code>void PrintNow(const std::vector&lt;int&gt; &amp;v) { std::cout &lt;&lt; v[0] &lt;&lt; std::endl; } std::vector&lt;int&gt;().push_back(20); // this line generates no complains PrintNow(std::vector&lt;int&gt;().push_back(20)); // error </code></pre> <p>From VS2010 Sp1:</p> <blockquote> <p>eror C2664: ...
c++
[6]
1,889,309
1,889,310
how to get all information form aspnet_Membership table in membership . Asp.net
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/12716101/add-new-field-to-the-standard-aspnet-membership-table">add new field to the standard aspnet_Membership table</a> </p> </blockquote> <p>i have a id from aspnet_User table</p> <pre><code> Userid = 7360c...
asp.net
[9]
2,282,444
2,282,445
Removing line breaks in ordered lists using jquery
<p>Am getting data from a webservice which is being displayed in the format below</p> <p><code>&lt;ol&gt;\r\n&lt;li&gt;Combine garlic, mustard, chili powder, cayenne pepper, salt and thyme in a small bowl.&lt;/li&gt;\r\n&lt;/ol&gt;</code></p> <p>I've been tearing my hair out trying to remove the \r\n but i cant se...
jquery
[5]
5,255,819
5,255,820
PHP echo code not returning '0' if no results
<p>Here is the query:</p> <pre><code>$query = "SELECT name,deleted,COUNT(message) as message FROM guestbook_message WHERE name='".$name."' AND deleted=1 GROUP BY name"; $result = mysql_query($query) or die(mysql_error()); $deletedtotal_row = mysql_fetch_array($result); </code></pre> <p>Here when I use it:</p> <pre...
php
[2]
4,342,287
4,342,288
Access Android spell check lists
<p>I would like to access the word lists used on android phones for spell checking (not including the user-defined-dictionary).</p> <p>I am writing an app which i would like to be able to check if a word exists in the current phone users language. I imagine their is some API call or service i can use to access the bui...
android
[4]
3,301,809
3,301,810
Hidden JavaScript error
<p>When i navigate across the application, i get a javascript error in my taskbar but gets disapperard immediately before i can identify what is the error about</p> <p>The error appears in IE and i don't see anything in FireBug</p>
javascript
[3]
1,519,844
1,519,845
logging in python
<p>i want to create separate logging file in python like info.log, debug.log, error.log i have a setting file(logging.conf) for logging as given below</p> <pre><code>[loggers] keys=root,simpleExample [handlers] keys=consoleHandler [formatters] keys=simpleFormatter [logger_root] level=DEBUG handlers=consoleHandler ...
python
[7]
2,682,843
2,682,844
overload two methods with vararg and String[] parameter
<p>I want overload two method with one parameter, in a method <code>varargs</code> of String and another <code>String[]</code> but I achieve following compilation-time error:</p> <pre><code>Duplicate method registerByName(String...) </code></pre> <p>My snippet code is:</p> <pre><code>public void registerByName(Strin...
java
[1]
4,763,774
4,763,775
java.lang.arrayindexoutofboundsexception array index out of range: 0 In Android
<p>I have a method to get data from webservice</p> <pre><code>public String getCinema_Show(String mv){ final String SOAP_ACTION = "http://tempuri.org/getDataCinema_Show"; final String METHOD_NAME = "getDataCinema_Show"; final String NAMESPACE = "http://tempuri.org"; final String URL = "http://10.0.2.2:...
android
[4]
1,898,587
1,898,588
Is it possible to read/edit shared preferences in native code?
<p>I have an Android app that includes a C library using NDK to execute some some code. Within the C library I would like to update the applications shared preferences. My question... is it possible to read/edit shared preferences in native code?</p>
android
[4]
4,420,421
4,420,422
how to send text from textarea in to the HTML code while typing
<p>how to send text from textarea in to the HTML code while typing ?<br/> i would like send text from textarea in to the HTML code and then send it to some div, i using this to live prev</p> <pre><code>$("#par01par03text textarea").keyup(function(event) { var stt=$(this).val(); $("#par01Text").text(stt); }); ...
jquery
[5]
1,298,743
1,298,744
Problem separating .h and .cpp file
<p>I am writing a class and need to separate the declarations from the implementation, but I keep receiving "undefined reference" errors when compiling and linking my test program. It works fine when I include the implementation in the .h file, so I believe I am doing something wrong in there. I just can't figure out...
c++
[6]
3,863,339
3,863,340
Getting php data from admin panel, without inserting in database and sessions
<p>I have a website and an administrator panel. I need to take some data from the administrator panel fields and show it on the homepage.</p> <p>For example: on the homepage there is a <code>text block</code> and on the administrator panel there is a <code>input</code> form. I fill it in, press submit, it saves everyt...
php
[2]
1,303,541
1,303,542
insert/delete query design of website
<p>I wonder what would be the professional way to handle insert/delete requests of a website?</p> <p>Right now, what I have is I inserted two <code>&lt;input type = "hidden"/&gt;</code> on each form where one hidden's value correspond to a function it needs and the other is the parameter of this function. So when the ...
php
[2]
3,346,792
3,346,793
sending email to users contact list?
<p>i have an application to retrieve an users contact list in a gridview...how do i send email to all the users from the users contact list??</p> <p>Steps:-</p> <p>1.User enters hi/her email id and password. 2.Clicks on send invites. 3.The button click event should send invitation email to all the contacts in users c...
asp.net
[9]
2,800,104
2,800,105
How to get UIButton Target, Action and Control events?
<p>I am using UIImageView's with UIButtons a whole bunch. So, I created a custom class to permanently marry these two an make things a little simpler. It all works well until I decided to implement -(id)initWithObject:(AUIImageViewButton *) imageViewButton.</p> <p>Clearly I need to copy all relevant properties from ...
iphone
[8]
2,280,417
2,280,418
How to develop a PDF viewer without using third party libraries in android
<p>I want to develop a PDF viewer in android.I dont want to use any 3rd party libraries like PDFBox,iText...Is it possible in android?</p>
android
[4]
1,893,068
1,893,069
About Limiting Rss Feed
<p>I want only the latest 5 feeds to be shown on my website.<br> I am using the following code to fetch rss feed... Can any one help to limited feeds to be shown... Thank You In ADVANCE :)</p> <p>CODE THAT AM USING</p> <pre><code>&lt;?php require_once('rss_fetch.inc'); $url = 'http://news.google.com/news?ned=us&am...
php
[2]
527,627
527,628
Detecting horizontal swipe in ListView
<p>I need to detect a horizontal swipe within a list view. Should I use a gesture detector or onTouch event. I need to support Android 2.1+</p> <p>One post indicated the need to override onInterceptTouchEvent in the ListView like below:</p> <pre><code> @Override public boolean onInterceptTouchEvent(MotionEvent ev)...
android
[4]
4,692,950
4,692,951
Scrolling a ListView changes everything from White to Black
<p>I have a custom list view and I want the background of the list to be white, so I do something like this which works great.</p> <pre><code>listView = (ListView) this.findViewById(R.id.listview); listView.setBackgroundColor(Color.WHITE); </code></pre> <p>The problem is when you scroll the list the background of all...
android
[4]
3,910,116
3,910,117
How i can use a static field to keep track of how many objects have been created from a particular class
<p>iam using c# and have a question,how the static field is used to count the number of instances in a class,please calrify in terms of memory,thanks in advance.</p>
c#
[0]
412,620
412,621
How to add numbers in an editText
<p>I am new to java dev. I want to add numbers in an editText. i.e if user types in 15 in editText, it should add the numbers 1 + 5 giving the result 6. Is there a function for it in java. In C# it is ToCharArray() but I don't know what it's called in java. Thanks</p>
java
[1]
3,435,889
3,435,890
Intensive PHP script failing w/ "The timeout specified has expired" error / ap_content_length_filter
<p>Running a MySQL intensive PHP script that is failing. Apache log reports this:</p> <pre><code>[Wed Jan 13 00:20:10 2010] [error] [client xxx.xx.xxx.xxxx] (70007) The timeout specified has expired: ap_content_length_filter: apr_bucket_read() failed, referer: http://domain.com/script.php </code></pre> <p>Tried putti...
php
[2]
5,345,630
5,345,631
communication between javascript and C++ code through web sockets?
<p>I have javascript (client - executed through node.js) and C++ (server) code running on Ubuntu (Linux) and I want this client-server to communicate with each other. Can somebody tell me how I can make C++ code work like a server or client using web socket? Basically, I want javascript code to send some data to C++ co...
c++
[6]
5,285,174
5,285,175
how to convert timestamp string to java.util.Date
<p>I need to convert a timestamp string to <code>java.util.Date</code>. E.g.:</p> <p><code>MMDDYYHHMMSS</code> to <code>MM-DD-YY HH-MM-SS</code></p> <p>Where <code>MM</code> is month, <code>DD</code> is date, <code>YY</code> is year, <code>HH</code> is hours, <code>MM</code> is minutes and <code>SS</code> is seconds....
java
[1]
5,300,584
5,300,585
sjquery scroll+animation
<p>I have a problem with jQuery vertical scroll.</p> <p>I have to add some animation on this example : </p> <pre><code>$(document).ready(function() { var timeoutId = 0; function scrollIt(amount) { $('#scroller').scrollTop($('#scroller').scrollTop()+amount); } $('#down').mousedown(function ()...
jquery
[5]
989,305
989,306
whether meta tag will support phonegap using android
<p>I am new to phonegap .I am developing application using android using phone gap.I had given meta tag in html .In landscape mode its coming properly but potrait mode some spaces are coming can anybody help to solve problem? </p> <pre><code>&lt;meta name="viewport" content="width=device-width, initial-scale=1, maximu...
android
[4]
3,763,099
3,763,100
Check whether a path is valid in Python
<p>Is there any easy way to check whether a path is valid? The file doesn't have to exist now, I'm wondering if it could exist.</p> <p>my current version is this:</p> <pre><code>try: f = open(path) except: &lt;path invalid&gt; </code></pre> <p>I'm considering simply checking whether the path contains any of <a h...
python
[7]
2,988,333
2,988,334
javascript function
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1639180/how-does-the-function-construct-work-and-why-do-people-use-it">How does the (function() {})() construct work and why do people use it?</a> </p> </blockquote> <p>Hi, </p> <p>Learning javascript I came ac...
javascript
[3]
1,618,958
1,618,959
How to make this auto-sliding effect on iOS
<p>I'm new on iPhone. Could you please tell me how to make an auto-sliding effect like this? Thanks. Pic: <a href="http://i.stack.imgur.com/5rDBJ.png" rel="nofollow">http://i.stack.imgur.com/5rDBJ.png</a></p>
iphone
[8]
3,191,068
3,191,069
how to send an activation code to the user in create user wizard?
<p>I wanted to verify the user who is registering on My Website(using Create User Wizard ) by sending them a code on their E-Mail ID given at registration time...and they will have to use that code to activate his account. could u please help me with this Thanks</p>
asp.net
[9]
636,687
636,688
How to pass the value for one aspx to another aspx page
<pre><code>&lt;form id="form1" runat="server"&gt; &lt;div&gt; &lt;asp:TextBox ID="txtFirstName" runat="server"&gt; &lt;/asp:TextBox&gt; &lt;asp:TextBox ID="txtLastName" runat="server"&gt; &lt;/asp:TextBox&gt; &lt;asp:Button ID="Button1" runat="server" Text="RedirectPage" PostBackUrl="~/TestAjaxCon...
asp.net
[9]
3,842,636
3,842,637
Array contents equality in C++
<p>Is there a way to get the equality operators to work for comparing arrays of the same type?</p> <p>For example:</p> <pre><code>int x[4] = {1,2,3,4}; int y[4] = {1,2,3,4}; int z[4] = {1,2,3,5}; if (x == y) cout &lt;&lt; "It worked!" </code></pre> <p>I'm aware that as is, it's just comparing pointer values - but I ...
c++
[6]
216,481
216,482
Java: generics type
<p>Class B extends from class A, and G is generics class. Now -</p> <pre><code>G&lt;X&gt; g = new G&lt;B&gt;(); </code></pre> <p>If I'm not wrong, then X can be:</p> <pre><code>? extends A </code></pre> <p>or</p> <pre><code>? super B </code></pre> <p>My question: Why X can't be simply <code>A</code>. B extends fr...
java
[1]
5,610,235
5,610,236
How to use htmlspecialchars_decode in PHP
<p>I am a inserting a content in FCKEDITOR.</p> <p><strong>EXAMPLE Content</strong> : TEST ~!@#$%^&amp;*()_+| TEST</p> <p><strong>But i get the output like this</strong>: TEST ~!@')</p> <p>What should i do to get the exact output?</p> <p>I am using ajax to do this.</p> <p>Thanks.</p> <p>Fero</p>
php
[2]
2,179,380
2,179,381
How to compare two 24 hour time
<p>I have two 24-hour time values and want to compare them using PHP. </p> <p>I have tried the following:</p> <pre><code>$time="00:05:00"; //5 minutes if($time1&lt;='00:03:00') { //do some work } else { //do something } </code></pre> <p>Is this the correct way to compare 2 time values using PHP?</p>
php
[2]
2,557,302
2,557,303
jQuery: get inline style top position value into a variable
<p>The style attribute always stumps me, because there are many values in the style attribute. Anyway, please see below my markup I'm trying to adjust...</p> <pre><code>&lt;div class="fancybox-wrap fancybox-default fancybox-opened" tabindex="-1" style="width: 798px; height: 542px; position: fixed; top: 82px; left: 20p...
jquery
[5]
1,883,870
1,883,871
Java : Storing Data in Array Of Object from JOptionPane Dialog
<p>I need to know how I can insert data inside objects inside an array of objects using my already made Set methods.</p> <p>i need to know how should i do it through user , i mean JOptionPane input dialog</p> <pre><code>student[] s = new student[5]; for (int i=1 ; i &lt;= s.length ;i++) { s[i] = new student(i,"A...
java
[1]
5,502,983
5,502,984
Dynamically add checkBoxPreference to PreferenceFragment
<p>I need to display a directory listing of files and folders that I get of an API. Once a user clicks on one of the directories I look for its sub directories and list them under the parent one just to the right, and so it goes on. <strong>Not Sure what the best way is for this?</strong></p> <p>I made a settings view...
android
[4]