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 |
|---|---|---|---|---|---|
2,998,353 | 2,998,354 | Is there any way to make a date object in 12 hour mode in javascript | <p>Hii,</p>
<p>I have to make date time in 12hr mode i.e. 23 January 2010 1:30 PM in java script</p>
| javascript | [3] |
1,292,736 | 1,292,737 | Can't delete virtual device from Eclipse, android | <p>I have multiple virtual devices, some of them can't be deleted. Error message is "The android virtual device XXX is currently running in an emulator and cannot be deleted", when I just have restarted Ubuntu and only started Eclipse.</p>
| android | [4] |
4,316,723 | 4,316,724 | HighScore list gui problem | <p>I implemented a highscore list with a table, however this is cumbersome since all TextViews have their own id etc. Is there a widget/control which is more suitable for this purpose? I wanna show two columns. Both columns should have their column header.</p>
<p>Can you give me some recommendations on how to make thi... | android | [4] |
2,838,089 | 2,838,090 | Best way to parse user input using getline? | <p>So I need a little help with understanding the best way of getting input from the user and storing it in 2 separate data types. What I want to do is take the input example:</p>
<pre><code>remove 44
</code></pre>
<p>I want to take the the first part "remove" and save it as a string to know which function I need to ... | c++ | [6] |
5,533,468 | 5,533,469 | Paragraph separator as line terminator | <p>The Javascript specification specifies four kinds of line terminators. </p>
<p><code>LF</code>, <code>CR</code>, <code>line separator</code> and <code>paragraph separator</code>. </p>
<p><a href="http://es5.github.com/#x7.3" rel="nofollow">http://es5.github.com/#x7.3</a></p>
<p>Which of the above best describes t... | javascript | [3] |
397,328 | 397,329 | Why does Javascript have privileged functions | <p>After an discussion at work, I still do not have an satisfying answer about the following, in no other programming language we speak of privileged functions.</p>
<pre><code>var kid = function(name)
{
// Private
var idol = "Paris Hilton";
// Privileged
this.get_idol = function()
{
return... | javascript | [3] |
1,192,196 | 1,192,197 | Is there a platform agnostic implementation of time.gmtime? | <p>on google appengine (http://shell.appspot.com/):</p>
<pre><code>>>> time.gmtime(1000*365*24*60*60)
(2969, 5, 3, 0, 0, 0, 2, 123, 0)
</code></pre>
<p>on macosx:</p>
<pre><code>>>> time.gmtime(1000*365*24*60*60)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
V... | python | [7] |
386,075 | 386,076 | while loop android | <p>This is part of my code which vibrate for the random amount of time. </p>
<pre><code>public boolean dispatchTouchEvent(MotionEvent ev) {
SharedPreferences appSettings = PreferenceManager.getDefaultSharedPreferences(this);
boolean doVibration = appSettings.getBoolean("vibrationCue", t... | android | [4] |
346,358 | 346,359 | Is there a way to determine if Android app is running full screen? | <p>i was just wondering if there was a simple way to see if an application running on android is currently in full screen. is there a way to query android to see if you're currently in full screen mode or something like that?</p>
| android | [4] |
3,263,107 | 3,263,108 | Jquery .show() to display div tag | <p>I am using this code to display a grid</p>
<pre><code>$('#table1 tr').bind('click', shows);
function shows() {
$('#table').show();
}
</code></pre>
<p>Where <code>#table</code> is the following HTML fragment:</p>
<pre><code><div id="table">
<p>shiva</p>
</div>
</code></pre>
<p>I am ... | jquery | [5] |
3,965,120 | 3,965,121 | Do I still need CodeDOM just in order to check the syntax of some code? | <p>I don't actually need to RUN or even Compile a C# source code, To my knowledge that is done with CodeDOM. I just want a simple syntax checker that given a C# source code, be able to say Hey this ";" is missing at this line, that "(" is missing in that line, etc...
What do you suggest? </p>
| c# | [0] |
5,945,594 | 5,945,595 | implementing prefix operator++ | <p>From <a href="http://www.learncpp.com/cpp-tutorial/97-overloading-the-increment-and-decrement-operators/" rel="nofollow">http://www.learncpp.com/cpp-tutorial/97-overloading-the-increment-and-decrement-operators/</a></p>
<p>Class declaration</p>
<pre><code>class Digit
{
private:
int m_nDigit;
public:
Digit(... | c++ | [6] |
1,693,511 | 1,693,512 | code for drag and drop in iphone | <p>I need to implement drag n drop functionality in iphone.can anybody tell me the example code for this in iphone .
Thanks in advance.</p>
| iphone | [8] |
126,826 | 126,827 | Implicit cast operator from object | <p>I was wondering if someone could think of a nice workaround for not being able to add an implicit cast operator, for object, on your own class. The following example illustrates the kind of code I would like</p>
<pre><code>public class Response
{
public string Contents { get; set; }
public static implicit ... | c# | [0] |
887,520 | 887,521 | How to cause a .csv file to be downloaded using PHP after sending the .csv via email? | <pre><code>$mailflg = $SiteObj->Sendsmtpmail($FromMail,$Email,"Check",$trackerCode,$smtpDetails);
if(!$mailflg)
{
$myFile = "../csv/".$my_file_name;
$smtpDetails['Test'] = "FAIL";
$file = @fopen($myFile, "a");
if($file)
{
fwrite($file,$smtpDetails['HOST']. ",".$smtpDetails['USER'].",... | php | [2] |
2,063,559 | 2,063,560 | Order of execution of the document.getReady() | <p>We are rendering our html based on various components on a page.</p>
<p>If all the compoents have document.ready() function in them, here are my questions</p>
<ol>
<li>Will all the components be rendered parallel or one after
another?</li>
<li>What is the best approach to render all these components with a
good us... | jquery | [5] |
137,548 | 137,549 | Python: Locate 3 adjacent list items and determine list index of first of them | <p>I need to process weather station data which is in a format like this (SYNOP), where each line represents one measurement and I have thousands of measurements:</p>
<pre><code>line = 'AAXX 01004 60265 32970 03404 10048 20010 38997 48605 51014='
</code></pre>
<p>Starting with the 6th block, the blocks are numbered (... | python | [7] |
258,757 | 258,758 | Pointer cursor of buttons in confirm box | <p>When I am using a javascript confirm like below:</p>
<pre><code> function showConfirm(){
var confirmMsg=confirm("Make sure that your details are correct, once you proceed after this stage you would not be able to go back and change any details towards your Session." + "\n" + "\n" + "Are you sure you w... | javascript | [3] |
1,750,341 | 1,750,342 | How Do Replace Phone.apk | <p>I'm trying to mod Phone.apk. I can build it using mm/mmm but re-install on phone fails. I tried killing process com.android.phone first but that doesn't work either. (I think the Phone is automatically restarted by some entity). Any ideas on how to replace Phone.apk on a running device?<br>
Thanks in advance.<br>... | android | [4] |
385,452 | 385,453 | using static method | <p>I'm unsure how to use the static method in this program. I am coding a program that will calculate a factorial of a number between 0 and 10. The user can enter the number and the program should calculate the factorial.
I had originally written a functional program with all of the code coming from the main and then w... | java | [1] |
2,295,177 | 2,295,178 | Can you run the PHP Phrozn static generator from the web? | <p><a href="http://www.phrozn.info/" rel="nofollow">Phrozn</a> is a PHP project that will read Twig, Textile, Markdown, and LESS format files and output them as a static site generator just like the Ruby version of
<a href="http://jekyllrb.com/" rel="nofollow">Jekyll</a></p>
<p>Phrozn is ran from the command line, ... | php | [2] |
5,368,362 | 5,368,363 | Can upload file with fileupload control but cannot access file | <p>I can upload file (source below The file is uploaded I checked with rdp.) but I cannot access it in browser (.docx): file or directory not found. what should I do </p>
<pre><code>protected void Button1_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{
try
{
string fi... | asp.net | [9] |
1,015,315 | 1,015,316 | Methods that return ArrayIntList | <p>I'm working on the following question:</p>
<blockquote>
<p>Write a method runningTotal that returns a new ArrayIntList that contains a running total of the original list. In other words, the i th value in the new list should store the sum of elements 0 through i of the original list.</p>
</blockquote>
<p>I'm stu... | java | [1] |
1,490,360 | 1,490,361 | converting string to list | <p>How to convert string to list </p>
<pre><code>str = '[(testing1@testing.com, amit, laspal,1,100,50),
(testing2@testing.com,None,None,None,None,None),
(testing3@testing.com,laspal, amit,None,None,None)]'
</code></pre>
<p>I want to get tuple inside the list.
so my new list will be:</p>
<pre><code>... | python | [7] |
3,497,024 | 3,497,025 | How do I make a button that, when pressed, stops an internal program from running? | <p>(individual question from <a href="http://stackoverflow.com/questions/4002976/ide-style-program-running">http://stackoverflow.com/questions/4002976/ide-style-program-running</a> )</p>
| java | [1] |
1,937,080 | 1,937,081 | Conditional operator in member-initialization list | <p>Suppose I have this class:</p>
<pre><code>class foo
{
public:
foo() { }
foo(const std::string& s) : _s(s) { }
private:
std::string _s;
};
</code></pre>
<p>Which is a member of another class:</p>
<pre><code>class bar
{
public:
bar(bool condition) :
_f(condition ? "go to string construc... | c++ | [6] |
5,545,224 | 5,545,225 | Fire Textbox.TextChange event without a button click | <p>I want to call Textbox.OnTextChange event without having to click a submit button or any button. How can I do this? As I enter text in the textbox, I want the ontextchange event to fire.</p>
<p>I would elaborate this further.I've a function for validating my entry in textbox which I'm calling ontextchange propert... | asp.net | [9] |
3,425,030 | 3,425,031 | java: run process by crontab | <p>My search system has two main parts: index and search. I want to make the index as a java process which can be called by crontab. But I have no idea how to implement this. Could someone tell my how to do it?</p>
| java | [1] |
1,455,985 | 1,455,986 | Android Asynchronous calls | <p>Im making an asynchronous call from a class to another.</p>
<p>Here is my actual code:</p>
<pre><code>public class HttpRequestHelper extends AsyncTask
{
@Override
protected Object doInBackground(Object... params)
{
try
{
// Create a URL for the desired page
URL url = new URL("http://www.... | android | [4] |
4,804,392 | 4,804,393 | Android - How to compile a class which has others activities inside | <p>I have an ExpandableListView which has a lot of children and for every child I would start an activity. Someone told me to create an unique class with all the activities of every children. Is it possible? How? In my project I have a Child.class, a Group.class, a MyExpandableListView.class, a XmlHandler.class and the... | android | [4] |
1,124,563 | 1,124,564 | How to Filter .txt file from the sdcard | <p>I want to list of the Text file in Listview and Select .txt file path get from the sdcard.</p>
| android | [4] |
528,693 | 528,694 | Android Honeycomb - how to show suggestions for a SearchView when query text is empty? | <p>I've added a SearchView to ActionBar of my application, and setup a SuggestionsProvider using SearchableInfo. Suggestions actually work well, except that no suggestions are shown when search query text is empty. I've found that my suggestion provider is not queried for suggestions even when searchSuggestThreshold is... | android | [4] |
4,956,695 | 4,956,696 | Functions defined in header / cpp file behaves different | <p>File: A.h</p>
<pre><code>class A
{
public:
struct x X;
int show()
{
x.member_variable ? 0: -1;
}
};
</code></pre>
<p>Now if A.cpp is complied which includes A.h (which is actually in a huge project space) we see that x.member_variable value is not as expected. But if remove the show() metho... | c++ | [6] |
4,294,580 | 4,294,581 | JQuery - Browse each input field children of a div | <p>I have for example this code :</p>
<pre><code><div id="arraydiffid">
<input type="hidden" name="array_diff[]" value="0" />
<input type="hidden" name="array_diff[]" value="1" />
<input type="hidden" name="array_diff[]" value="2" />
<input type="hidden" name="array_diff[]" v... | jquery | [5] |
1,659,376 | 1,659,377 | in C# how to publish an application with another application | <p>I am working in VS2010 C# Windows application</p>
<p>I have Created application1 and application2 </p>
<p>in the application1 i have added a form and a button and in application2 i have some 10 video to play on to a player </p>
<p>but the problem is how can i publish(means generate a setup file) application2 from... | c# | [0] |
5,908,159 | 5,908,160 | What is wrong with my AndroidManifest.xml? | <p>I am trying to develop a basic app to display information in 2 tabs, and from my understanding the info in each tab needs to have its own activity, in addition to the one for the tabs. I have done this, all of the java code looks right, and I have declared all 3 activities in my AndroidManifest.xml. When I launch th... | android | [4] |
5,784,874 | 5,784,875 | Example of inherited subclass from Python struct | <p>In reading the documentation for Python's <code>struct</code> module, the explanation for how to use a <a href="http://docs.python.org/2/library/struct.html#classes" rel="nofollow">struct Class</a> left a bit to be desired. That is, until I realized that it isn't meant as a class to be inherited from to create subcl... | python | [7] |
3,838,834 | 3,838,835 | How to change ArrayList value | <p>I want to remove all '\0' characters from the items of an ArrayList in c#. Here is my code:</p>
<pre><code>ArrayList users = um.getAllUsers(server,Instance); //user count=3
</code></pre>
<p>So now I want to add a code in order to replase all '\0' with empty string in all the items of the list.</p>
<p>Is this poss... | c# | [0] |
4,195,748 | 4,195,749 | Java - Braces after variable definition? | <p>I was going through some Java tutorials in a book and ran across code like this:</p>
<pre><code>private void theMethod( MyObject table )
{
SomeObject item1 = table.add(0,0,0,"Item 1");
{
item1.setWhatever = false;
item1.setSomething = 15;
}
// More code here...
}
</code></pre>
<p>What is the purpo... | java | [1] |
2,918,335 | 2,918,336 | Android Icons, how to specify? | <p>Where do I put my icons in my android file structure, and how do I reference them in the manifest xml?</p>
<p>Thanks</p>
| android | [4] |
1,970,375 | 1,970,376 | implementing operator * in C++ | <pre><code>class Rational {
const Rational operator*(const Rational& rhs) const
...
};
Rational oneHalf(1,2);
Rational result = oneHalf * 2; // fine (with non-explicit ctor)
result = 2 * oneHalf; // error! (even with non-explicit ctor)
</code></pre>
<p>It was mentioned by scott meyers in Effe... | c++ | [6] |
2,823,875 | 2,823,876 | C# - How can i inject my own response stream in to browser Internet Explorer | <p>Problem : </p>
<p>How to inject my own response stream to currently running iexplore.exe window..</p>
<p>Explation :</p>
<p>While user typing "www.google.com" in address bar of Ie.., Instead of showing response from
Google Webserver...I want to show my own stream which contains text like "</p>
<p>"The site blo... | c# | [0] |
4,025,147 | 4,025,148 | referencing external javascript file | <p>I want to store array value in an external javascript file and then use an internal script to write a loope that lists the values of the array stored in the external file.
my javascript file is:</p>
<pre><code>var Arr = new Array("one", "two", "three")
</code></pre>
<p>My internal script</p>
<pre><code><scrip... | javascript | [3] |
4,925,281 | 4,925,282 | String formatting: string specifier in a string constant | <p>Is there a way to insert a string in a string constant/variable that contains a string specifier?</p>
<p>Example:</p>
<pre><code>temp_body = 'Hello %s, please visit %s to confirm your registration.'
body = temp_body % (name, url)
</code></pre>
<p>But this raises a TypeError. </p>
| python | [7] |
2,859,787 | 2,859,788 | PHP - Data after "?" in URL displays different information | <p>I know the title isn't very clear. I'm new to PHP, so there might be name for this kind of thing, I'll try to explain as best as I can. Sometimes in a URL, when using PHP, there will be a question mark, followed by data. I'm sorry, I know this is very noobish, but I'm not sure what it's called to look for a tutor... | php | [2] |
733,928 | 733,929 | Grid view using arraylist in android | <p>How to show the gridview data's using array list</p>
| android | [4] |
186,177 | 186,178 | mina:about sequence of code line | <pre><code> connFuture.awaitUninterruptibly();//1
connFuture.addListener(new IoFutureListener<ConnectFuture>(){//2
@Override
public void operationComplete(ConnectFuture future) {
if(future.isConnected()){
session = future.getSession();
sendData()... | java | [1] |
4,269,248 | 4,269,249 | Can we use ignore_user_abort() on any line of code? | <p>Can we use ignore_user_abort on any line of PHP like:</p>
<pre><code><?php
// Process Codes
if($_GET['nonstop']) {
ignore_user_abort(1);
// Background process
}else{
// Nonbackground process
}
// Other Codes
?>
</code></pre>
<p>Or we need to use on only after <code><?php</code> (first line)?<... | php | [2] |
6,026,889 | 6,026,890 | PHP: =0D, =A20 symbols | <p>After obtaining info from an email body, I have a lot of symbols such as =0D, =A20, etc... How can I remove them? I do not want to use </p>
<pre><code>$body = str_replace('=A20', '', $body);
</code></pre>
<p>because if the email body actually contains that it will be replaced.</p>
<p>Any ideas? Thanks!</p>
| php | [2] |
3,551,399 | 3,551,400 | How to get files ( Through Directory.GetFile() ) on the basis of DateTime | <p>I am getting a issue in my application i want to get all the files from folder on the basis of DateTime .is it possible with Directory.GetFile() or any other inbuilt function through C#</p>
<p>Thanks
Shashank </p>
<p><img src="http://i.stack.imgur.com/R6C77.png" alt="enter image description here"></p>
| c# | [0] |
3,127,401 | 3,127,402 | Best practices for error handling in jQuery plugin | <p>What are some of the best practices for handling errors from within a custom jQuery plugin?</p>
<p>So far I am checking for the error conditions, using console.log and returning from my plugin. The idea is that I dont want to stop any other js on the page from working but still provide an error message to the user.... | jquery | [5] |
5,954,026 | 5,954,027 | How to write simple TCP listener that will be able to send packages ? | <p>I need to write simple TCP listener that will be able to listen TCP ( receive packages ) on one thread and in case i need to send some package i will be able to do it on some other thread</p>
<p>How can i do it ? </p>
| c# | [0] |
557,489 | 557,490 | how to run a .sh file from php? | <p>I am trying to run a shell script using php </p>
<p>shell script ( /home/scripts/fix-perm.sh ) is in the same server </p>
<p>this is the code that i am trying </p>
<pre><code><?php
echo shell_exec('/home/scripts/fix-perm.sh');
?>
</code></pre>
<p>the above code is not working</p>
<p>am using linux server ... | php | [2] |
3,851,393 | 3,851,394 | show/hide divs on click | <p>I have some html form.</p>
<pre><code><div class="disease">
<li id="show1">name1</li>
<li id="show2">name2</li>
<li id="show3">name3</li>
<li id="show4">name4</li>
</div>
<div class="disease2" style="display:none;">
<li i... | jquery | [5] |
2,687,836 | 2,687,837 | How can I configure how the header of an alert dialog | <p>Is there a way to configure how the header of an alert dialog looks?
It nows has an icon (on the left) with text as title. Is there a way to add view on the same line?</p>
<p>Thank you.</p>
| android | [4] |
5,885,565 | 5,885,566 | Is there an Jquery dropdown menu that drops down on top of other frames in a framset? | <p>I've tried some dropdown menus, but they drop behind other frames.</p>
| jquery | [5] |
3,964,385 | 3,964,386 | jQuery Button fade loop until another button is pressed | <p>This is what I want to accomplish.
I have two buttons, when I press the first one it fades out to 50% and when the fade out is complete it fades back up to 100% and then it loops the animation for ever until another button is pressed, and den the next button does exactly the same. So every time a button is clicked... | jquery | [5] |
3,074,628 | 3,074,629 | INSTALL_FAILED_MISSING_SHARED_LIBRARY on installing apk (No Google APIs) | <p>I have a problem installing my android app with a custom library: hessian-3.1.5.jar. My IDE is: intellij idea 11</p>
<p>This library is in the project structure's library and in AndroidManifest.xml I have the line: <code><uses-library android:name="com.caucho.hessian.client" /></code></p>
<p>But it says: <co... | android | [4] |
5,556,460 | 5,556,461 | Closing android application in command line | <p>Is there any command i can use to close an application in adb shell, i can start my application using "am start" command in shell, But After searching exhaustively in google, i could not find an answer, for closing my application in the same way.</p>
<p>I want it to also work in non-rooted devices.</p>
| android | [4] |
2,961,193 | 2,961,194 | Redirecting a php submit form | <p>In the following php script Dreamweaver is giving me a syntax error every time I add the redirect header:</p>
<pre><code>header('Location: thankyou.htm');
</code></pre>
<p>The info is sent to my email address with no problem but the client is not redirected to the thankyou.htm page. Does not matter whether or not ... | php | [2] |
2,416,617 | 2,416,618 | RecursiveDirectoryIterator() not showing empty directories | <p>I am trying to use PHP's RecursiveDirectoryIterator to list a set of directories. The issue I am having is that it seems to be skipping any empty directory it hits. Any ideas how to make it list empty directories? </p>
<p>Here is a clip of the code I am using:</p>
<pre><code> $iterator = new RecursiveIteratorIter... | php | [2] |
2,401,917 | 2,401,918 | How to launch a background process in Python with a delayed invocation? | <p>Ok, this is a bit of a thorny problem. I need to launch a backgrounded process that will (1) wait N secs, and then (2) execute some command. Additionally, I need to capture the pid of the background process itself, because when the parent process finishes it will kill the backgrounded process if necessary. It looks ... | python | [7] |
5,444,169 | 5,444,170 | Update List element at specified list item position | <p>I am trying to do this:</p>
<pre><code>foreach (Settings sets in MySets)
{
if (sets.pName == item.SubItems[2].Text)
{
var ss = new SettingsForm(sets);
if (ss.ShowDialog() == DialogResult.OK)
{
... | c# | [0] |
2,384,965 | 2,384,966 | SocketPermission - Client Port? | <p>I've been developing a web application that gets deployed in Apache Tomcat 6, running Java 6 Update 31. There is a requirement to include a module that will simply listen to incoming TCP traffic on port X for future processing. Everything was working great until we went to enable the Java Security Manager (an IA req... | java | [1] |
4,240,501 | 4,240,502 | can we render pdf on web view in android | <p>can we render pdf and show it on web view in android. kindly help me out</p>
| android | [4] |
5,717,838 | 5,717,839 | don't know how to use variables in jquery | <pre><code>$("#write").click(function(){
$("#msg").$('#quote').html();
});
</code></pre>
<p>I am learning jquery (new to js as well). This function writes to a textbox id=msg. However I am having problems pulling the content.</p>
<p>How do I pull the content of a div and use in my function (#quote)? Right now it... | jquery | [5] |
5,028,006 | 5,028,007 | Multiple parameters in List | <p>I want to do something like this</p>
<pre><code>List<Integer, String, String>
</code></pre>
<p>I want to be able to iteratively retrieve either of these three parameters.
How can I go about it?
Thanks</p>
| java | [1] |
5,826,196 | 5,826,197 | Socket.getRemoteSocketAddress() not returning private IP address of client | <p>I have a client server program where the client is running on a pc with two ip address (public ip address visible via internet and private ip address). My server is running on a different network. When i connect both client and server using socket and use socket.getRemoteSocketAddress method of java at the server en... | java | [1] |
2,649,844 | 2,649,845 | how to detect if browser is firefox with php? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2142030/any-php-code-to-detect-the-browser-with-version-and-operating-system">Any php code to detect the browser with version and operating system?</a><br>
<a href="http://stackoverflow.com/questions/4702667/how-t... | php | [2] |
4,024,917 | 4,024,918 | Android saving current activity | <p>I am developing the Application for cricket. I get problem when I am using back button. My aim is to save the data when user click back button. when user click <code>back button</code> or going to another activity the current activity data is not displaying. I used Shared preference to save data. But still I am faci... | android | [4] |
4,122,875 | 4,122,876 | Generate string of zeros of random length | <p>I'm trying to generate a random string of zeros </p>
<p>like this: 00 or 00000000 or 0000 between a certain length</p>
<p>how do I generate zeros and output it as a variable</p>
| php | [2] |
3,095,766 | 3,095,767 | Intent.setClass error | <p>I have the following ClickListener code. It will do different stuff depending on what button was pressed. If the Vehicle button is pressed I want it to start another activity by loading the Vehicles.class but it is erroring during the setClass() statement.I believe it is erroring when trying to instantiate the Vehic... | android | [4] |
4,590,194 | 4,590,195 | find if the date containd a valid format using a preg_match | <p>I have 1 text input box so user can enter a date in the following format (i don’t want to use 3 separate input boxes for the month, date and year) :</p>
<pre><code>mm/dd/yyyy (could be a single digit m/d/yyyy)
</code></pre>
<p>or</p>
<pre><code>mm-dd-yyyy (single digit m-d-yyyy)
</code></pre>
<p>I then want to u... | php | [2] |
4,923,346 | 4,923,347 | Can I get the instance of the service class that I created | <p>If I create a Service like this:</p>
<pre><code> Intent intent = new Intent(context, MyService.class);
context.startService(intent);
</code></pre>
<p>Can you please tell me how can my code else where get the instance of that service class that I start?
And if i start Service, does that class runs in its own... | android | [4] |
4,820,247 | 4,820,248 | Clarification on C++ name lookup | <p>I have a question about a situation I just came upon at work.</p>
<p>setup:
in stringStuff.h</p>
<pre><code>namespace n1
{
namespace n2
{
typedef std::string myString;
}
}
namespace n1
{
namespace n2
{
void LTrim(myString& io_string);
void RTrim(myString& io_string);
inline void Trim(mySt... | c++ | [6] |
5,464,841 | 5,464,842 | Using using with nested namespaces | <p>Is there any reason, why</p>
<pre><code>new N1.N2.N3.C();
</code></pre>
<p>would compile, but</p>
<pre><code>using N1.N2;
...
new N3.C();
</code></pre>
<p>would not?</p>
<p><strong>EDIT</strong></p>
<p>Class C is defined in another referenced assembly like this:</p>
<pre><code>namespace N1.N2.N3
{
class C
... | c# | [0] |
3,418,006 | 3,418,007 | How do I declare a dynamic array with std::auto_ptr? | <p>I am trying to declare a dynamic int array like below.</p>
<pre><code>int n;
int *pInt = new int[n];
</code></pre>
<p>Can I do this with std::auto_ptr?</p>
<pre><code>I tried something like:
std::auto_ptr<int> pInt(new int[n]);
</code></pre>
<p>But it doesn't compile. </p>
<p>I'm wondering if I could dec... | c++ | [6] |
1,330,885 | 1,330,886 | Does finally always get called? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/65035/in-java-does-return-trump-finally">In Java, does return trump finally?</a> </p>
</blockquote>
<p>What does this function return?</p>
<pre><code>public int wasExceptionThrown() {
try {
if(1==1)
... | java | [1] |
3,236,503 | 3,236,504 | What are some good pure JavaScript tutorial and references? | <p>I'm looking to brush up my JavaScript with a view to tackling Node.js. What are some good references that deal purely with the language and bypass DOM, CSS and HTML?</p>
| javascript | [3] |
2,709,368 | 2,709,369 | Problem in File Downloading from server in android application | <p>I am using this code of snippet to download mp4 files from server. Normally file get download properly,
but sometime my downloading process stops downloading automatically. Progress bar stop incrementing. Is there any kernel process that stop download. </p>
<pre><code>//+++++++++= FUnction Call ++++++++++++++++
... | android | [4] |
3,302,233 | 3,302,234 | Prevent Double Quotes from being stripped | <p>What's the best way to display a person's height with feet and inches as a string and also prevent sql injection as well as ensure proper input format? Ideally, I'd like to display it like 5'11" as an example.</p>
<pre><code>$height = $_POST['height'];
$height = stripslashes($height);
</code></pre>
<p>The problem ... | php | [2] |
4,239,601 | 4,239,602 | How to know if your computer has a GD install | <p>I am working on file upload and I am reading some notes on it. And it is talking about GD. Now I am running windows 7. Where do I go check to see if there is anything called GD so I can do my upload. I know i need to make sure it is activated in my php. I know when you use wamp server you can find it. Well this sems... | php | [2] |
1,670,637 | 1,670,638 | Longest common substring from more than two strings - Python | <p>I'm looking for a python library for finding the longest common substring from a set of python strings.</p>
<p>I'have read that it exist to way to solve this problem :
- one using suffix trees
- the other using dynamic programming.</p>
<p>The method implemented is not important. Otherwise, it is important to have ... | python | [7] |
4,325,665 | 4,325,666 | Android installLocation and BOOT_COMPLETED | <p>I have an Android app that uses the AlarmService. According to the docs, I should not allow installing/moving this app to external storage. Users, however, do not understand this (probably due to very little internal storage on some devices) - and demand the option to install on external storage (via low-star rating... | android | [4] |
4,486,061 | 4,486,062 | Share a private file using intent | <p>I'm trying to share a file using the something like <code>intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));</code> the file is located in the path <code>data/data/my.package.name/folder/fileName</code> and whenever I try to send the file using the Gmail app I get an error.</p>
<p>I think this is due to the ... | android | [4] |
4,915,634 | 4,915,635 | How to disable the links before the jquery load is performed | <p>I have below Jquery with me.</p>
<pre><code> $(".load-fragment").each(function()
{
var $objThis = $(this);
var fname = $objThis.attr("href"); //Getting the href of the element
var dynDivID = "divContent"+ $objThis.attr("id"); //Name of the dynamic div ... | jquery | [5] |
3,287,592 | 3,287,593 | How can I create an application with resizeable frames | <p>How can I create an app in one window with multiple frames.</p>
<p>For example if i want the lower portion of the screen to be taken up by a webbrowser object, and the top split into two halves with different items in.</p>
| c# | [0] |
5,413,447 | 5,413,448 | Can I throw my own strict mode violation [on Android]? | <p>I have a helper class that should only ever run in a background thread. Is there a way I can leverage the StrictMode component and throw my own StrictMode violation if it's run on the main thread?</p>
| android | [4] |
558,206 | 558,207 | DropDownList do not run the code behind | <p>hy,
i configured <code>dropdownlist</code>:</p>
<pre><code><asp:DropDownList ID="ddl_filter1" runat="server" Width="120px" DataSourceID="ObjectDataSource1"
DataTextField="PLC" DataValueField="PLC" OnSelectedIndexChanged="ddl_filter1_SelectedIndexChanged" />
</code></pre... | asp.net | [9] |
5,382,638 | 5,382,639 | Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE -- on the device | <p>I have a situation here with a problem of not sufficient place in device. I have been looking for answer to this question here and found quiet a lot of answers, which is not acceptable, because:<br>
1. They are all talking about emulator, in my case its real test device<br>
2. Community suggested to increase storage... | android | [4] |
115,373 | 115,374 | PHP5 mysql examples | <p>where will I find PHP5, mysql OOP examples? Whta I mean is common class library with examples. </p>
| php | [2] |
1,918,308 | 1,918,309 | CFile equivalent in C#.net | <p>I want to create a binary file in C#.net - the file should contain some header information
and binary data.</p>
<p>The CFile provides the provision to create a same file in the text mode as well as binary mode.</p>
<p>In C# .net a TextWriter and BinaryFormatter to do this. Is it possible to use a single stream cla... | c# | [0] |
4,983,061 | 4,983,062 | PHP - How to check if a string contain specific words | <pre><code><?php
$a = 'how are you';
if($a contain 'are')
echo 'true';
?>
</code></pre>
<p>Suppose I have the code above, how to write the statement "if($a contain 'are')"?<br /></p>
| php | [2] |
393,485 | 393,486 | How would I convert a number in a certain format to an integer? | <p>I have a funciton which returns the hours of a timestamp using 24 hour time</p>
<p>e.g.</p>
<p>03, 04, 12, 15</p>
<p>I want to be able to remove the 0 from the integer so instead of 03 I get 3..</p>
<p>Is there a quick function to do this or do I have to use a switch statement?</p>
| php | [2] |
1,677,496 | 1,677,497 | ASP.NET - Dynamically created button | <p>I have added a dynamically created button in my Webform. But its click event is not working. Can anyone please explain why?</p>
<p>This is my code:</p>
<pre><code> Button save = new Button();
save.ID = "btnSave";
save.Text = "Save";
save.Click += new System.EventHandler(this.Save_Click);
Webform... | asp.net | [9] |
5,490,829 | 5,490,830 | python converter libraries for DOC, DOCX and PDF | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/6854665/solution-to-convert-pdfs-docs-docxs-into-a-textual-format-with-python">solution to convert PDFs, DOCs, DOCXs into a textual format with python</a> </p>
</blockquote>
<p>I am making a document search engi... | python | [7] |
3,357,767 | 3,357,768 | Connecting to MySQL through PHP, JSON error | <p>I wrote a simpe PHP script that prints an jsonencode($output). It outputs the JSON with a leading and ending []. When I run my Android program through the emulaotor, it states: A JSONObject text must begin with '{' at character 1 of [..... then lists my JSON, so I know its getting the data, there is a problem with t... | android | [4] |
2,315,776 | 2,315,777 | how to handle php function error | <p>How do i form an if/else statement for a php function failing? I want it to define $results one way if it works, and another if it doesnt. I simply dont want to show an error, or kill the error message if it fails though.</p>
<p>currently, i have;</p>
<pre><code>if(file_get_contents("http://www.address.com")){
... | php | [2] |
5,458,470 | 5,458,471 | How to stop a jQuery function being run on keydown when Tab key is pressed | <p>I am new to jQuery and haven't been able to find a solution to this.</p>
<p>I have this HTML:</p>
<pre><code><input type="text" id="Box1" /><br />
<input type="text" id="Box2" />
</code></pre>
<p>And jQuery:</p>
<pre><code>$("#Box1").keydown(function () {
$("#Box2").val("");
});
$("#Box2").... | jquery | [5] |
5,065,181 | 5,065,182 | how to keep free version data when user buy pro version of android apps | <p>I am planning to make an android apps with free version and paid version. How do I maintain the data in sharedpreferences and in SQLite database so that the data can be reuse when the user buy the pro version?</p>
<p>Thanks</p>
| android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.