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,572,397 | 4,572,398 | Benefits and limitations of different implementation approaches | <p>I just started learning Android development and I read there was basically 3 main approaches to 'build a view' which are :</p>
<blockquote>
<ul>
<li>Java-based: Use Java to define Strings, lay out window, create GUI controls, and assign event handlers. Like Swing programming.</li>
<li>XML-based: Use XML files... | android | [4] |
4,677,309 | 4,677,310 | editing a string using BufferedReader in Java | <p>Exception handling aside, I'm using the following to input a line of text in Java:</p>
<pre><code>BufferedReader strin = new BufferedReader(new InputStreamReader(System.in));
String txt = null;
txt = strin.readLine();
</code></pre>
<p>However, I want to be able to edit an existing string, so that if txt were initi... | java | [1] |
5,351,550 | 5,351,551 | expression tree instead of using LINQ | <p>I have a <code>LIST<T> where T:IComparable<T></code></p>
<p>I want to write a <code>List<T> GetFirstNElements (IList<T> list, int n) where T :IComparable <T></code> which returns the first n distinct largest elements ( the list can have dupes) using expression trees. </p>
| c# | [0] |
5,878,700 | 5,878,701 | problem wile calling the class from another class | <p>hi i am new to iphone what i did is i am creating two classes named classA and classB. I am displaying 10 thumbs in classA ViewDidLoad and adding the images in classB by declaring the function.Along with images sound is also added.While click on thumb it will be displayed on imageview. it works fine. But After compl... | iphone | [8] |
646,160 | 646,161 | how to remove hazardous character in php | <p>I have to remove hazardous chracter from my query post string. Is there any function define in php to remove directly or another way ?</p>
| php | [2] |
5,747,570 | 5,747,571 | UITableViewCell highlighting issue - iPhone | <p>I have a UITableView and I am having an issue with whenever I try to click on the Cell. When the cell is highlighted it puts some test on top of the text that is already on the cell make the text on the cell hard to read. This only happens while I have the cell highlighted. </p>
<p>Please help me with this issue. <... | iphone | [8] |
376,876 | 376,877 | can anyone tell me if a class extends view than how can i can i call xml in it to show buttons at bottom of image | <p><strong>THis is My MainActivity which Activity</strong> </p>
<pre><code>public class MainActvity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new BitmapView(this));
}
</code></pre>
<p><strong>I have To show an Xml File hav... | android | [4] |
2,001,717 | 2,001,718 | Invalid operands - how to fix this short code? | <p>I should analyse some snippets and find the bugs and fix them. I got all of them, just a problem with this one:</p>
<pre><code>class B {
public:
int i;
B(int i):i(i) {
}
B operator+(B& other) {
B result(i+other.i);
return result;
}
};
int main(int argc, char *argv[]) {
... | c++ | [6] |
3,426,604 | 3,426,605 | Android layout with two edittexts? | <p>I would like to create a layout for an android application where I have two edittexts at the same height. If I put those edittexts one after the other in the xml code I will have the second below the first, even changing the gravity. I would like to put a textview on each edittext, and it they should be at the same ... | android | [4] |
2,878,487 | 2,878,488 | Difference between these two appraoch in calling equals method? | <p>Approach one.</p>
<pre><code>if (graphType.equals("All") || graphType.equals("ALL"))
</code></pre>
<p>Aprroach two.</p>
<pre><code>if ("All".equals(graphType) || "ALL".equals(graphType))
</code></pre>
<p>What is the difference between these two approaches?
Why the below one is better?</p>
| java | [1] |
1,506,616 | 1,506,617 | How to put the screen in sleep mode in android? | <p>I am developing one Application. Through that i want to put the screen in sleep mode for a time period. And my screen will be in dim mode. So when a call will come or sms will come, phone will not blink and notify the user. How it is possible??</p>
<p>Please share any sample code.</p>
<p>Thanks. </p>
| android | [4] |
5,664,558 | 5,664,559 | How to perform a " For " loop in jquery? | <p>How to perform a " For " loop in jquery?</p>
| jquery | [5] |
246,700 | 246,701 | php - smtp server | <p>I am working on a project. For that i have downloaded smtp server on ubuntu. Could any one please tell me the command to check whether the smtp server install properly or not. because email is not getting generated.</p>
<p><strong>Below is the code for your reference</strong></p>
<pre><code><?php
ini_set('disp... | php | [2] |
1,893,118 | 1,893,119 | C++: boost smart pointer | <p>Could you please help me to check this code following, I got some errors?</p>
<pre><code>class VideoInfo {
public:
VideoInfo();
virtual ~VideoInfo();
std::string filename; // name of the video file in the fileSystem
unsigned int frameSequenceID; // frame index of the video file
};
}
}
</code></pre>... | c++ | [6] |
4,833,186 | 4,833,187 | How to call event for command button in the grid | <p>Hi
I am having command buttons in my Grid like Insert,Update etc.. I customized the grid and add the buttons manually and place the ID's like btnInsert,btnUpdate and so on. The buttons are shown when i click Insert or Update image.</p>
<p>My issue is how can i call the event for the above buttons. I just w... | jquery | [5] |
3,339,492 | 3,339,493 | Android - Button not firing | <p>Need help trying to figure out why the button onCLick event isn't working. I set it in onCreate but it doesn't seem to be working: </p>
<pre><code>public class MainActivity extends Activity implements OnClickListener {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle ... | android | [4] |
2,273,208 | 2,273,209 | How to make sure a view is not clicked programmatically? | <p>I'm creating a custom view (subclassing View class) in android. It will be clickable, but I need it to can only be clicked by user, not programmatically. So there will be no fraud click. I'm not sure it's possible, but is there any workaround for this issue?</p>
<p>I also wonder how AdMob's adview handle this issue... | android | [4] |
1,863,182 | 1,863,183 | Listens for stopping and starting of process | <p>Is there any way for a Java application on Windows to be notified when a process stops and starts - for example listen to when MS Word starts and stops?</p>
| java | [1] |
4,763,847 | 4,763,848 | A div inside an inline element: bad or not? | <p>I am creating a JavaScript tooltip program and wonder if it's alright to add the tooltip box (that is, a div node) as a child of the target that may be a span node or some other inline element, so the dom is as follows:</p>
<p>out of this:</p>
<pre><code><span onmouseover="tooltip(this).display('A \"Hello World... | javascript | [3] |
1,735,683 | 1,735,684 | how to add Two TextView in Android's ViewPagerExtension Library | <p>I am using <a href="https://github.com/astuetz/ViewPagerExtensions" rel="nofollow">ViewPagerExtension</a>
in my android project.I am able to add one textview for each tab. I want to add two textviews in each tabs.How can i achieae that?</p>
| android | [4] |
4,019,469 | 4,019,470 | take the value from onitemselect in autocompletetextview | <p>amount is not being set to EditText, only stores in another external variable. </p>
<pre><code>productAtoComplete.setOnItemClickListener(new OnItemClickListener(){
public void onItemClick(AdapterView<?> parent, View view, int position, long id){
amount.setText(map.get((String) parent.getItemAtPosi... | android | [4] |
1,515,772 | 1,515,773 | once again giving the syntax error for insert into query | <pre><code>string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Samples\\login.mdb";
string uname, pass;
uname = textBox1.Text;
pass = textBox2.Text;
OleDbConnection myConnection = new OleDbConnection(connectionString);
myConnection.Open();
string query = "insert into LOGIN_TABLE (UserName, Pa... | c# | [0] |
3,776,224 | 3,776,225 | How does any app for taking photos in burst mode from camera work? | <p>I have seen apps like Fast Burst Camera Lite taking burst shots without any lag (with a compromise in quality of photo, of course). I was just curious how these apps work. I saw a few websites over the Internet but no satisfactory answer. So, I just thought of posting it here for the sake of getting a good discussio... | android | [4] |
4,371,839 | 4,371,840 | PHP include_once or require_once in a loop | <p>Quick question about include/requre_once . I have some code that is common to a few pages that I feel would be better to be in a file to call from each page rather than code repetition.</p>
<p>I call the include_once in a while loop and what I noticed is that I have to use include('file.php') or it will literally l... | php | [2] |
5,167,138 | 5,167,139 | Xpath like query for nested python dictionaries | <p>Is there a way to define a XPath type query for nested python dictionaries.</p>
<p>Something like this:</p>
<pre><code>foo = {
'spam':'eggs',
'morefoo': {
'bar':'soap',
'morebar': {'bacon' : 'foobar'}
}
}
print( foo.select("/morefoo/morebar") )
>> {'bacon'... | python | [7] |
2,428,868 | 2,428,869 | How to convert degree minutes second into decimal in java | <p>This is a basically gps application where i am getting the latitude information from the meta data of a picture in this format 28"41'44.13597 . </p>
<p>My need is to convert the same information into decimal and the out will show data in decimal format like 28.705450.</p>
<p>Please help through code or any referen... | java | [1] |
1,999,902 | 1,999,903 | how to check mobile in Mute And Offline mode in android? | <p>Hi all i need to check phone mode whether it is in Mute mode or Offline mode .</p>
<p>My task is if phone in mute state then i have to do task1</p>
<p>if phone in offline state then i have to do task2 </p>
<p>so how we can check how to check mute or offline mode?</p>
<p>thanks in advance</p>
| android | [4] |
5,774,537 | 5,774,538 | What third-party ASP.NET controls or libraries can you not live without? | <p>I am working on a project right now, and I have a few must-have controls that I include in most sites I build. Often times it strikes me that the best controls are not always that well publicized so I thought I would ask the Stack Overflow community about their favorite third-party ASP.NET controls - the ones you ju... | asp.net | [9] |
5,367,993 | 5,367,994 | How to use obfuscated Jquery script in Asp.NET MVC3? | <p>For Example If I want to obfuscate my code</p>
<pre><code> <script>
$(document).ready(function(){
$("a").click(function(event){
alert("Thanks for visiting!");
});
});
</script>
</code></pre>
<p>After obfuscating in jsobfuscate.com I get the Following code</p>
<pre><code>eval(function(p,a,... | jquery | [5] |
333,691 | 333,692 | error in java basic test program | <pre><code>$cat JarTest.java
package edu.testjava.simple;
public class JarTest
{
public static void main(String args[])
{
System.out.println("Hello World\n");
}
}
$javac JarTest.java
$java JarTest
</code></pre>
<p>I get error:</p>
<pre><code>Exception in thread "main" java.lang.NoClassDefFou... | java | [1] |
5,263,181 | 5,263,182 | files responce from one server to other domains | <p>Greeting all,</p>
<p>this is my first post here,,</p>
<p>Actually i have a complete website like(www.example.com) with admin interface, and i want to share same website to different domains like(www.example2.com, www.example3.com, www.example4.com),</p>
<p>with this example2.com, example3.com, example4.com can ch... | php | [2] |
391,746 | 391,747 | How to populate values in drop down from select query on other dropdown? | <p>How can i populate the values in the drop down(second drop down) from the select query on choosing
the option from the first drop down ?</p>
<p>Examples:
First Drop Down : Listing out all the "department name" using select query.
Second Drop Down : Now, i need the output to list out all the "professors name" in the... | javascript | [3] |
4,908,087 | 4,908,088 | SearchView always on top | <p>I wanted to know how you can keep a <code>SearchView</code> widget always on top of the screen instead of calling it every time we press the search button.</p>
<p>I've added the <code>onSearchRequested</code> to keep it visible by default in my activity but as I transition from one activity to another it returns to... | android | [4] |
2,784,329 | 2,784,330 | timer issue at getting previous view | <p>hi i am new to iPhone development. what i am doing is displaying 20 images as grid and each image treat as button,by selecting that image it will be displayed on image view "here what i needed is i using timer to get back to grid but there is [NSCFArray ObjectAtIndex]: index(4) beyond bounds(4) and application termi... | iphone | [8] |
4,015,112 | 4,015,113 | How to tab an output as per a counter? | <p>This is my first question here and would be a very simple one for you guys. I'm trying to print a sentence ten times or so (as per what count is given in <code>range()</code>), but I want the first sentence tabbed once, the second sentence tabbed twice etc.. </p>
<p>Here is my code :</p>
<pre><code>count = 0
for ... | python | [7] |
3,212,668 | 3,212,669 | what is PackageManager in Android | <p>Hi I am new to Android,
Can any one explain me with small example what is <code>PackageManager</code> in Android and where can I use it.</p>
<p>thanks</p>
| android | [4] |
3,920,857 | 3,920,858 | java ssl connection using truststore | <p>I have a web application that connects to a https site. For that I have to install the certificate in the cacerts in lib/security folder. I would like to create a truststore and place it within the application and while connecting to the other site make the app refer to this truststore so that when the application i... | java | [1] |
4,885,329 | 4,885,330 | viewWillAppear not getting invoked in an UITableViewController | <p>I have got one problem with the UITableViewController... The viewWillAppear method is not getting invoked when i try to push the The table view controller in to a navigationcontroller... </p>
<p>can anyone provide a solution for this ....</p>
| iphone | [8] |
4,642,319 | 4,642,320 | C++ - an exception-safe way to assure a global cleanup function gets called | <p>Context:</p>
<p>Suppose an external library requires that its <code>globalCleanup()</code> function gets called in order to assure all its resources are cleaned up (it might allocate some global resources during any of its calls.) A client function <code>client()</code> does this before each of its many <code>retur... | c++ | [6] |
2,094,145 | 2,094,146 | change date format in php | <p>i develop a webpage , in that i need to change the date format from 22/01/2010 to 2010-01-22
i use the following function but i am getting a warning as "Deprecated : Function ereg() is depreceted in c:\wamp\www\testpage.php on line 33" . Is there anyway to hide that error or is there any other way to change the dat... | php | [2] |
1,182,454 | 1,182,455 | Passing HashSet<string> by reference | <p>Is it possible to pass a HashSet by reference to a function? This is my code currently.</p>
<p><strong>Main</strong></p>
<pre><code>this.scrapeFriends(startUsers, userIDs, 100);
</code></pre>
<p><strong>Function</strong></p>
<pre><code>private void scrapeFriends(StringCollection startUsers, ref HashSet<string... | c# | [0] |
4,967,849 | 4,967,850 | String comparisions in java | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/8336856/a-better-way-to-compare-strings-which-could-be-null">A better way to compare Strings which could be null</a> </p>
</blockquote>
<p>I have an if condition which looks like this :</p>
<pre><code>if( !str1... | java | [1] |
529,692 | 529,693 | cin.get() in while loop not getting clear idea | <p>in loop there is a cout statement which prints the character which provide from keyboard but inside loop it is not showing it even keep on typing keys from keyboard but when we press enter it shows all of them all together
why there is cin.get() outside loop and how does the cin.get() inside the loop behave actuall... | c++ | [6] |
3,847,917 | 3,847,918 | meaning of &$variable and &function? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3737139/reference-what-does-this-symbol-mean-in-php">Reference - What does this symbol mean in PHP?</a> </p>
</blockquote>
<p>what is the meaning of <code>&$variable</code> <br/>
and meaning of functions lik... | php | [2] |
2,568,323 | 2,568,324 | Instantiate IDataAdapter from instance of IDbConnection | <p>I have an instance of IDbConnection, which can be any connection, Sql, OleDb, etc.
I want to make a generic wrapper so I can just send the wrapper a connection and get a nice set of methods for easy manipulation.
I have a Query method, I want it to return a DataTable, so I can do</p>
<pre><code>IDataAdapter adapter... | c# | [0] |
4,309,508 | 4,309,509 | Object oriented programming question | <p>In order to empty the contents of a table cell, I issue the following command:</p>
<pre><code>$('td').empty()
</code></pre>
<p>but to empty the contents of an input field, I say:</p>
<pre><code>$('input').val() -- Edit: .val('')
</code></pre>
<p>Q: Doesn't this go against the idea of object oriented programming?... | jquery | [5] |
493,700 | 493,701 | Removing specific text from every line | <p>I have a txt file with this format:</p>
<pre><code>something text1 pm,bla1,bla1
something text2 pm,bla2,bla2
something text3 am,bla3,bla3
something text4 pm,bla4,bla4
</code></pre>
<p>and in a new file I want to hold:</p>
<pre><code>bla1,bla1
bla2,bla2
bla3,bla3
bla4,bla4
</code></pre>
<p>I have this which holds... | python | [7] |
615,810 | 615,811 | The method getWindow().setBackgroundDrawableResource(int resid) doesn't work outside of onCreate() | <p>Here is a short sketch of my application</p>
<pre><code>...
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.start);
... //at this place, getWindow().setBackgroundDrawableResource(int resid)
//would work perfectly
mainV... | android | [4] |
5,701,828 | 5,701,829 | Get song title from sd card to display in android >2.3 or 4.0 | <p>I am able to display song tile fetched from local sd card.The issue is when i see the songs list of mine and default music player, i found that song name has trimed if there is some extra string(string could be third -party site or movie name.).how can i achieve it.?</p>
<pre><code> tempCursor = ((Activity)conte... | android | [4] |
2,525,157 | 2,525,158 | jquery 3 level menu | <p>i'm trying to make 3 level vertical menu</p>
<p>i have 2 level, but its hard to make it 3 level....</p>
<p>here is my 2 level vertical menu...</p>
<p><a href="http://fiddle.jshell.net/3Xvrc/1/" rel="nofollow">http://fiddle.jshell.net/3Xvrc/1/</a></p>
<p>plz anyone can help me ?</p>
| jquery | [5] |
4,479,026 | 4,479,027 | Why do I get an error 500 when I send a GET request? | <p>I am trying to send a simple GET request, as it is explained here : <a href="http://stackoverflow.com/questions/2793150/how-to-use-java-net-urlconnection-to-fire-and-handle-http-requests">How to use java.net.URLConnection to fire and handle HTTP requests?</a></p>
<p>The web page I'm pointing to is : <a href="https:... | java | [1] |
3,457,863 | 3,457,864 | operation time of method | <p>how to know, how much time take method in C#
for example, i have label1 and method </p>
<pre><code> public int MakeSome(int a, int b)
{
for (int i = 0; i < a; i++)
{
for (int j = 0; j < b; j++)
{
// some operation
}
}
... | c# | [0] |
1,202,032 | 1,202,033 | how to save Application Exceptions or crashes for posting to server-iphone | <p>Hii People :</p>
<p>i have to send the exceptions or crash logs to server when the application has any crash or issues,</p>
<p>The exception may be (blob of data / long string / human readable) </p>
<p>Any idea on how to get exception logs when application crashes or when encountering with errors?</p>
| iphone | [8] |
5,955,426 | 5,955,427 | C++ temporaries and constructors | <p>Why do some compilers complain about taking an address of a temporary from a constructor and some dont?</p>
<p>For example:</p>
<pre><code>WriteLine(&String8("Exception"));
</code></pre>
<p>I'm assuming the complaining compiler is not storing that address on the stack and it will blow up if I ignore the warni... | c++ | [6] |
1,361,999 | 1,362,000 | error while starting another activity | <p>i am starting new activity from current activity but some how before starting activity i am getting Null Pointer exception. and startActivity() from source activity calls sucessfully. I am getting Null Pointer exception. the following is code.</p>
<pre><code>Intent intent = new Intent(PdfFileSelectActivity.this, Pd... | android | [4] |
3,748,659 | 3,748,660 | Android: Pass complex data structures through activities or services | <p>Hi I want to pass complex data structures from my Service class to Activity class.</p>
<p>I create class Serializable :</p>
<pre><code> class SaveMe implements Serializable {
private static final long serialVersionUID = 1L;
static final int test = 1234;
private int user;
... | android | [4] |
1,742,245 | 1,742,246 | What do I need to install for java programming? | <p>I want to learn to programme in java and just wondering what I need to install on my laptop to get me started?</p>
<p>I was on this site - <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" rel="nofollow">http://www.oracle.com/technetwork/java/javase/downloads/index.html</a> and wasnt sure... | java | [1] |
5,515,753 | 5,515,754 | Syntax error in Prepared statement while inserting into db | <p>Hi I am trying insert data into the database using prepared statement but I am getting syntax error could u please help</p>
<pre><code>public boolean SignUp(String last_name, String first_name,String email, String password,String confirm_password,String phone){
Connect connect = new Connect();
Co... | java | [1] |
3,734,447 | 3,734,448 | C#: what does compile time 'const' mean? | <p>They say the difference between readonly and const is that const is compile-time (while readonly is run time). But what exactly does that mean, The fact that it's compile time? Everything gets compiled to byte code doesn't it? </p>
| c# | [0] |
1,783,461 | 1,783,462 | Resources that turns a javascript developer into a great javascript developer? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/11246/best-resources-to-learn-javascript">Best resources to learn JavaScript</a> </p>
</blockquote>
<p>I am more and more working with javascript, especially with JQuery for web site and node.js for server side ... | javascript | [3] |
92,380 | 92,381 | Printing results immediately (php) | <p>I have a php script that connects 10 different servers to get data. I want it to print the results of the 1st connection before the second one begins. </p>
| php | [2] |
3,539,396 | 3,539,397 | Find if anything but certain strings are in an array | <p>Let's start with an example.<br>
$array['0'] is equal to value1. $array['1'] is equal to value2. $array['3'] is equal to value1.<br>
I need to write a function that checks if anything but a certain set of strings exists in an array.
<br>
If I allowed "value1" and "value2" to exist in an array, and I gave the functio... | php | [2] |
4,811,724 | 4,811,725 | Which Python should I use? | <blockquote>
<p><strong>Possible Duplicates:</strong><br>
<a href="http://stackoverflow.com/questions/2218841/is-it-advisable-to-go-with-python-3-1-for-a-beginner">Is it advisable to go with Python 3.1 for a beginner?</a><br>
<a href="http://stackoverflow.com/questions/2090820/what-version-of-python-should-i-use-... | python | [7] |
5,787,884 | 5,787,885 | How do I grab and send a dropdown's display text instead of value using jquery | <p>I am using this bit of jquery to put the value selected from my dropdown into a hidden text field. This works beautifully - got it from one of the folks on this forum!!!, but I just ran into a twist further in my code and I need to do the same thing, but this time I neeed to send the <strong>Display Text</strong> t... | jquery | [5] |
5,420,071 | 5,420,072 | How to code which CheckBoxMenuItem is selected in Java? | <p>I am trying to add a method which takes the menu selection and passes it to a variable.
In this case I would like to take "7" and insert that into the year variable if
that is what is selected from teh checkboxmenu. So far have search the internet
and sun site with no clear example on how to differentiate the menu ... | java | [1] |
2,143,734 | 2,143,735 | jquery shake on mouse over? | <p>is it possible to shake a table row if mouse over? and if so how? =)</p>
<p>I have done it before when calling a div, but I havent as yet use the mouse over function, any help appreciated</p>
<p>Thanks =)</p>
| jquery | [5] |
3,881,210 | 3,881,211 | How to make recursive call (getTotalFiles) thread-safe? | <p>Im making a recursive file checking, the problem is i cant have counter inside the method itself, so that i declared it outside. But the problem is, this isnt thread safe.</p>
<pre><code>private int countFiles = 0;
private int getTotalFiles(String path) {
File file = new File(path);
File listFile[] = file.... | java | [1] |
3,821,938 | 3,821,939 | getCallingUid/getCallingPid return current uid and pid in Handler.handleMessage | <p>I have a class extending <code>android.os.Handler</code>. An instance of this handler is passed to the constructor of a <code>Messenger</code>. The <code>Messenger</code>'s <code>IBinder</code> from <code>getBinder</code> is passed as the result of <code>onBind</code> events in my service. Messages sent via the bind... | android | [4] |
3,350,024 | 3,350,025 | how to disable Screen unlock security options while reset password policy is enforced by device administrator | <p>I am trying to enforce reset password policy in my android 2.2 device.I set some password
remotely using device admin api. Now i want to disable screen unlock security option like
None,pattern,pin and password so that end user couldn't be able to reset password and the
policy could be be disabled by devic... | android | [4] |
6,004,979 | 6,004,980 | Variable is undefined in JavaScript | <p>I have a method which loops through an array, but it gives me error that the variable is undefined.</p>
<pre><code>split : function(ns) {
var splitNameSpace = ns.split('.');
var methodName = splitNameSpace.pop();
var context ;
//console.log(splitNameSpace);
for (var i=0;i<splitNameSpace.lengt... | javascript | [3] |
3,698,043 | 3,698,044 | PHP - How to get a list of class's member function? | <p>If I know class's name. Is there a way to know class's member function list ?</p>
| php | [2] |
1,631,932 | 1,631,933 | java DecimalFomat in C# | <p>I have these code which I have converted from Java. Now I need to change this DecimalFormat in C# Syntex.</p>
<pre><code>private string formatValue(double dVal)
{
DecimalFormat df = new DecimalFormat();
df.applyPattern("######.###");
DecimalFormatSymbols dfs = new Decimal... | c# | [0] |
4,526,543 | 4,526,544 | Android tutorials missing from web | <p>Seems like the tutorials at "developer.android.com/training/tutorials/index.html" are all missing. Hello world, note pad, views... maybe everything - I can't find any of them.</p>
<p>Dose anyone know what happened?
Is this a temporary situation
Are they gone for good? </p>
| android | [4] |
2,251,108 | 2,251,109 | Can we use net use for implementation of CIFS protocol in C# | <p>Can we use net use for implementation of CIFS protocol in C#</p>
<p>I am using Management class and after that i am using net use command for accessing Samba share and Mapping to some drive in my local system and after that I am assigning that mapped drive to Treenode and showing in a treeview .</p>
<p>Is this the... | c# | [0] |
528,385 | 528,386 | Android stay app active | <p>I would like to stay my android application active when it working, and I am using FLAG_KEEP_SCREEN_ON flag for this purpose, but I don't want always keep screen on, because it's not economic for battery. I want to use a standard behavior - when user touch screen - he's lighting up, and after some time of inactive t... | android | [4] |
1,800,995 | 1,800,996 | I want my SlideToggle() Slow or add the Time | <p>Hello I want my animate SlideToggle() it slide up and slow or I can put the time, when I click the link please help. please See Code Below. I try to put the .slideToggle("slow") but dont' work.</p>
<pre><code>$(function() {
$('#bottom_menu li a').click(function(e) {
e.preventDefault();
animateSl... | jquery | [5] |
1,679,051 | 1,679,052 | create static button at the end of footer in android | <p>i want to create button at the end of ListView means at the Footer that remain with the View but when listview scrolls down it must remain static at te end of view in android. look at my code
<a href="http://pastebin.com/Xufq0GTN" rel="nofollow"> Here </a></p>
| android | [4] |
5,661,056 | 5,661,057 | How to Convert DD to DMS in Python | <p>How Do you Convert Decimal Degrees to Degrees Minutes Secands In Python? Is there a Formula already written?</p>
| python | [7] |
1,708,324 | 1,708,325 | 404 Folder not Found | <p>I am having a site with the like URL EX : <a href="http://music.xxxxxxxxxx.com" rel="nofollow">http://music.xxxxxxxxxx.com</a></p>
<p>Here in this site i need to redirect user typing with his name to his bolg
--> <a href="http://music.xxxxxxxxxx.com/username" rel="nofollow">http://music.xxxxxxxxxx.com/username</a><... | asp.net | [9] |
804,497 | 804,498 | How to optimize the updating of values in an ArrayList<Integer> | <p>I want to store all values of a certain variable in a dataset and the frequency for each of these values. To do so, I use an <code>ArrayList<String></code> to store the values and an <code>ArrayList<Integer></code> to store the frequencies (since I can't use <code>int</code>). The number of different val... | java | [1] |
3,188,415 | 3,188,416 | Trouble with PowerManager.goToSleep() | <p>I'm trying to put a device into sleep mode for a certain amount of time, say x, by calling..</p>
<pre><code>powerManager.goToSleep(xNumberOfMilliseconds);
</code></pre>
<p>However, the api never seems to work consistently, and never for any amount of time greater than 1000 milliseconds. I'm stumped. I have the app... | android | [4] |
2,922,800 | 2,922,801 | Random banner change and not displaying the first image whenever it complete the cycle | <p>Actually i have 10 banner and i want to change it random when page refresh.
Banner change and complete its cycle of 10 banners before repeating it..</p>
<p>I am using this code</p>
<pre><code>$banners=$objCms->getbanners();
for($count=0;$count<count($banners);$count++)
{
$image[$count]['path']= $banner... | php | [2] |
355,387 | 355,388 | HTTrack for android! or something similar to that | <p>I would like to know if anything software, plugin or app is available similar to HTTrack! </p>
| android | [4] |
2,481,248 | 2,481,249 | What is the most efficient way to save game status in Android? | <p>I have a game app that save game status in the onPause() function of the game board activity.</p>
<p>That seems very wasteful, because the user might be briefly switching to another app and return to play later. But if they never return, my app could be garbage collected and the status gets lost, so I save it just... | android | [4] |
2,294,949 | 2,294,950 | android:hardwareAccelerated state of my application | <p>How to get the value of hardwareAccelerated of my application in code ? How to modify it through code ?</p>
| android | [4] |
4,006,670 | 4,006,671 | java + replace small letters to capital letters in args | <p>Please advice:</p>
<p>I write here part of JAVA language
in args[0] could be capital letters as "A" "B" "C" or small letter
as "a" "b" "d" "i"</p>
<p>my target is to replace all small letters in args[0] to capital letters
How to do that?</p>
<p>The second question – how to remove spaces in args[0] ?</p>
<p>exa... | java | [1] |
5,883,317 | 5,883,318 | need preg_replace help in php | <p>now i want make this
by the <strong>preg_replace</strong></p>
<pre><code>$web = 'site.com';
</code></pre>
<p>i want the preg_replace make it <code>http://www.site.com</code>
and if it
<code>http://site.com</code> no prblem
it whould add http:// in it found in the url
thanks</p>
<p><strong>please i want do that is... | php | [2] |
5,285,730 | 5,285,731 | How to find Foreign character in a content using PHP? | <p>I have column details in one table. that column stores email contents in <code>HTML</code> format. column data type is blob . my requirement to search and find any email content contains non English characters ie foreign languages. </p>
<p>The table with 51000 records. In 51000 records i need filter only email w... | php | [2] |
5,953,276 | 5,953,277 | Why my form isn't submitting ? using event in jQuery | <p>I'm looking for why my form isn't submitting with that code :</p>
<pre><code>$("#my_form").on('submit', function(e) {
if (!myCondition) {
if (anotherCondition === true) {
e.preventDefault();
$('#modal').modal('show');
$("#btn_valid").on('click', function(e) {
... | jquery | [5] |
5,438,374 | 5,438,375 | how to add more functions to window.onunload? | <p>suppose I have some javascript which says:</p>
<pre><code>window.onunload=some_jsfunction();
</code></pre>
<p>how can I add another function to this handler? something like this:</p>
<pre><code>window.onunload=some_jsfunction() + another_jsfunction();
</code></pre>
| javascript | [3] |
4,212,406 | 4,212,407 | PHP file upload - check file size of files larger than .ini max? | <p>My hosts server has an .ini upload_max_filesize of 4mb. I have written some PHP which checks the file size of the upload and throws an error if that size is exceeded. Problem is if the file they are trying to upload is larger than the .ini setting of 4mb my code doesnt get executed as the $_FILES variable shows file... | php | [2] |
5,612,717 | 5,612,718 | convert a line to a Node in C++ | <p>I'm trying to write a function that takes a line as a <code>string</code> and converts it into a <code>Node</code>.</p>
<pre><code>Node convertLineToNode(string line){
char lineC[] = line;
Node *n = new Node();
n->lastname=strtok(lineC," ");
n->name=strtok(lineC," ");
n->ID=strtok(lineC... | c++ | [6] |
4,331,341 | 4,331,342 | Appropriate alternative to PopupMenu for pre-Honeycomb | <p>I've implemented <a href="http://developer.android.com/guide/topics/ui/menus.html#PopupMenu" rel="nofollow">PopupMenu</a> for a menu that is displayed after pressing an item on the ActionBar. I am wondering what alternatives there are for SDK versions before 11?</p>
<p>Possibly use something resembling a context me... | android | [4] |
3,162,334 | 3,162,335 | Preserving argument default values while method chaining | <p>If I have to wrap an existing method, let us say wrapee() from a new method, say wrapper(), and the wrapee() provides default values for some arguments, how do I preserve its semantics without introducing unnecessary dependencies and maintenance? Let us say, the goal is to be able to use wrapper() in place of wrapee... | python | [7] |
4,146,763 | 4,146,764 | Draw on top of a "View"? | <p>I am developing an application in which each Activity has a View which shows a PNG Image, followed by a TextView, an EditText and other views... The Activity's Content View is inflated using an XML layout file.</p>
<p>Depending on which options the user chooses/how he interacts with the application, I want to dynam... | android | [4] |
65,009 | 65,010 | Set a variable variable on an object in javascript | <p>Doing some work with Omniture analytics and want to be able to set some properties via JSON.</p>
<p>Omniture calls look something like this:</p>
<pre><code>s.linkTrackVars = 'eVar37';
s.eVar37='foo';
s.tl(true, 'o');
</code></pre>
<p>I want to write a generic function to take a JSON object and convert it into tho... | javascript | [3] |
5,512,790 | 5,512,791 | padding the binary representation of a BigInteger | <p>Just wondering how / if it is possible to pad a string to the left. I saw to use format() but i didnt know what to put in the paramters for my case.</p>
<p>Im starting originally with a BigInteger <code>Message</code> then saying <code>message.toString(2)</code> to make the binary representation of the BigInteger a... | java | [1] |
4,708,305 | 4,708,306 | jquery count li elements inside ul -> length? | <p>hey guys,
if a "ul" has more than one "li"-element inside of it, somehting should happen, otherwise not!
what am I doing wrong?</p>
<pre><code>if ( $('#menu ul').length > 1 ) {
</code></pre>
<p>regards matt</p>
| jquery | [5] |
1,254,337 | 1,254,338 | Dynamic DOM elements not accessible? | <p>I can see a DOM element with an ID of Foo by using the debug inspector.</p>
<p>This DOM element is inserted dynamically by a script that I do not have access to.</p>
<p>Because of this you can not see it when you do View->Source.</p>
<p>When I try to access the element using</p>
<p><code>document.getElementById(... | javascript | [3] |
5,384,617 | 5,384,618 | Android database tables syntax errors | <p>I am trying to create a database with the name of a string stored in a local variable with the following syntax:</p>
<pre>
mDb.execSQL("CREATE TABLE " + FLASH_TABLE + " (" + KEY_CARD_ROWID
+ " INTEGER PRIMARY KEY AUTOINCREMENT, " + KEY_QUESTION
+ "TEXT NOT NULL," + KEY_ANSWER + "TEXT... | android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.