Unnamed: 0
int64
65
6.03M
Id
int64
66
6.03M
Title
stringlengths
10
191
input
stringlengths
23
4.18k
output
stringclasses
10 values
Tag_Number
stringclasses
10 values
1,148,833
1,148,834
Using $_POST information only once
<p>I have some information which gets passed from a form and needs to be used once and only once. I can collect it nicely from $_POST but I'm not sure which is the "best" way to ensure that I can only use it once, i.e. I want to avoid the user pressing F5 repeatedly and accessing the function more than once. </p> <p...
php
[2]
4,354,512
4,354,513
How to log method calls on targets marked with an attribute?
<p>Is it possible to inject Loggin behaviour to the marked classes or/and methods like this:</p> <pre><code>Log("Method {0} started",GetMethodNameTroughReflection) Call method body Log("Method {0} Finished",GetMethodNameTroughReflection) </code></pre> <p>I want to create my own Attribute class, which will realize log...
c#
[0]
5,306,528
5,306,529
Foreach to change a key
<p>I retrieve a set of mysql row as an array of associative arrays (I'm using pdo fetch all). My associative arrays holds a key named "password". How do I loop throught the arrays to change all the password values? I need to set them to 0 if the password is equal to 0, 1 instead.</p> <pre><code>$result = $stmt-&gt;fet...
php
[2]
5,076,863
5,076,864
python: how to generate pairs of cards in a deck
<p>Suppose that I have the following variables:</p> <pre><code>suits = ["h","c", "d", "s"] cards = ["2","3", "4", "5", "6", "7", "8", "9", "t", "j", "q", "k", "a"] deck = [] for suit in suits: for card in cards: deck.append(str(card+suit)) </code></pre> <p>I'd like to write a function that, given a speci...
python
[7]
3,793,581
3,793,582
How to reference widget inside of a Service?
<p>How to i i set the TextView and ProgressBar to their findViewById views from inside a service?></p> <pre><code> ProgressBar dialog; TextView Titletext; @Override public IBinder onBind(Intent intent) { // TODO Auto-generated method stub return null; } @Override public void onCreate(){ super.onCreate()...
android
[4]
3,863,226
3,863,227
Strange issue using sem_t + pthread_create
<p>Strange behaviour when passing argument sem_t to constructor A. Expected output was <code>5555</code> but i got <code>5055</code>. Please point out if there are design problems too.</p> <pre><code> 1 #include &lt;iostream&gt; 2 #include &lt;pthread.h&gt; 3 #include &lt;semaphore.h&gt; 4 using namespace std; ...
c++
[6]
5,334,174
5,334,175
Hello please let me about learning iphone(i need best book for beginers)
<p>Hi I am new to Objective C and iphone developments, please specify me a way to learn about iphone developments please help...</p> <p>Regards</p> <p>GuruPrasad R Gujjar.</p>
iphone
[8]
3,216,800
3,216,801
Sending Periodically Email From Asp.Net
<p>I want to send an email to the admin from my asp.net web application daily at 8:00 am. How to send an email that I know. But how to send it periodically that I doubt. Not through SQL Server. I have written my logic in Application_Start in Global.asax Is this is right? Please guide me as soon as poosible as it is urg...
asp.net
[9]
5,395,323
5,395,324
Custom Notification
<p>I would like to know if there is a way of using the notication bar in order to do some operations (onClick), without having an activity being launched/resumed.</p> <p>for example.. let's say i raise a notifcation, and when the user press on it, then instead of take me to some activity, it invoke some regular method...
android
[4]
5,312,115
5,312,116
Passing parameter from android to .net web service
<p>Im using ksoap2 to call web .net services. The call works just fine except when I pass paramaters. The passed paramaters are always recieved as null values by the web service. I dont know what the problem is, I hope someone can help. Thanks,</p> <p>My code is below please help me</p> <pre><code>package com.android...
android
[4]
727,102
727,103
Capturing the hot keys from a thread using c#;
<p>I am using the below code to capture the ctrl + alt + Q hot keys, which works perfectly. But, i want to use this in a background application. Since my application does not have any forms, i want to use the same code inside a class file.</p> <p>i am confuse, because i cannot write a event handler [keypressed] in cla...
c#
[0]
2,160,175
2,160,176
Session time out in PHP
<p>HI, i have code for session time out but i dont know whats the issue its not working someone pls look at this and help me. Here is the code:</p> <pre><code> $inactive = 10; // check to see if $_SESSION['timeout'] is set if(isset($_SESSION['timeout']) ) { $session_life = time() - $_SESSION['timeout']; i...
php
[2]
1,256,052
1,256,053
Is it posible to get the current location in Android MapView without using Location Listener?
<p>I have a MapView application. When application launches it should show the current location. How to do this?</p>
android
[4]
3,786,080
3,786,081
Count the occurrence of any number of characters in a file?
<p>I have found several ways to count the occurrence of a single character in a file in Java. My question is simply this: is there any way to count the occurrence of any of the characters in a list in a file simultaneously, or am I going to have to loop through each character?</p> <p>To clarify, I'm wanting something...
java
[1]
6,014,896
6,014,897
android how to know a protocol can be handled?
<p>One app in my system can handle URI like "weibo://abc", I want to start the intent using this URI. But in other machine before starting this URI I need to check if this URI can be handled correctly(without big delay), what I should do?</p>
android
[4]
1,696,682
1,696,683
Android- Running my application on 2.1 and higher versions
<p>I want to make application that support 2.1 or higher platforms. Does anyone have solution for it? Can I use somekind of cross-platform for it or cross-platefroms are only for porting applications from differnt OS? Or there is any library i can use for this purpose?</p>
android
[4]
1,862,877
1,862,878
How to distinguish between a SHA1 string and a date-time string?
<p>Basically I have two options:</p> <pre><code>$one = "fdfeb16f096983ada02db49d46a8154475d700ae"; $two = "2011-12-28 05:20:01"; </code></pre> <p>I need some sort of regex, so that I can detect wether the string follows the pattern in <code>$one</code>, or the pattern in <code>$two</code></p> <p>Detect if the string...
php
[2]
2,380,317
2,380,318
How to add a hidden value to DataGridView TextBox? (C#)
<p>I am working with an existing GridView and I want to know if there is a way I can have a different value and display for the TextBoxColumn, similar to a ComboBoxColumn (displaymember, valuemember). </p> <pre><code>private System.Windows.Forms.DataGridViewTextBoxColumn PATH; this.PATH.DataPropertyName = "Path"; t...
c#
[0]
3,118,024
3,118,025
Put LI with "active" class first in UL
<p>i have an unordered list like this:</p> <pre><code>&lt;ul&gt; &lt;li class="first"&gt;&lt;a href="/nl"&gt;&lt;span&gt;Nederlands&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;li class="active"&gt;&lt;a href="/fr"&gt;&lt;span&gt;Français&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;li class="last"&gt;&lt;a href="/de"&gt;&l...
jquery
[5]
1,686,173
1,686,174
Finding a / symbol in string
<p>I'm trying to find a forward slash in a string...</p> <p>This doesn't seem to work:</p> <pre><code>if ("/test".indexOf("/") &gt; -1) { </code></pre> <p>What am I doing wrong?</p> <p>Funny thing is... I tried this:</p> <pre><code>if ("!test".indexOf("!") &gt; -1) { </code></pre> <p>and it works! I also tried \/...
java
[1]
1,472,149
1,472,150
Consuming encapsulated member event
<p>I'm trying to comsume an encapsulated member event. Let me explain. I have MyClassA, which has a private member of MyClassB _obj:</p> <pre><code>public class MyClassA { private MyClassB _obj; public MyClassA() { _obj = new MyClassB(); } } </code></pre> <p>MyClassB has SaveProgress event. </...
c#
[0]
488,134
488,135
How can i parse this array
<p>Lets say this was my retrieved object <code>$myObj</code></p> <pre><code>Array ( [0] =&gt; xl_oio_0_1_Mytitle Object ( [_unknown:protected] =&gt; [header_:protected] =&gt; Header Object ( ...
php
[2]
5,178,570
5,178,571
Program to tell what scripts are running in a browser?
<p>Is there a program that tells me the script that a browser executes for a particular event? for example, what script clicking on a button initiates? </p>
javascript
[3]
3,743,933
3,743,934
Dynamically Change TextView Background color in onclicklistener in android
<p>If we click any of the Textview within a Listview, background color should have to change and onclick release, it should have to change to transparent color in android.How to achieve this in onclicklistener of Textview in android.</p>
android
[4]
258,484
258,485
Animating a div while it fits to dynamically loaded content
<p>I have two Divs. 'contents' (outer) and 'info' (inner). 'info' will have dynamically loaded data from 4-5 external html files. 'contents' just contains just a black background. Now I have managed to load the html but i want smooth animation of the background ('contents') to wrap around the inner div according to con...
jquery
[5]
2,808,046
2,808,047
Error: Could not find or load main class Hello2
<p>I'm just learning java and following a book.</p> <p>I have a program written via text editor and run commands via cmd.</p> <p>I've complied 1 program thru javac and executed thru java no problem. (Hello) Then I modified that to add a comment to the class, named file Hello2.java. I compiled it with no problems, but...
java
[1]
4,987,098
4,987,099
difference between len() and .__len__()?
<p>Just curious,</p> <p>Is there any difference between calling <code>len([1,2,3])</code> or <code>[1,2,3].__len__()</code> ? If there is no apparent difference, what is done differently behind the scenes?</p> <p>Thanks</p>
python
[7]
131,897
131,898
constructor of the class containing another class as member variables
<p>I am try to make a class containing another class as member variable. And I encounter the follow problem:</p> <pre><code>class SubClass{ .... }; class MainClass{ public: MainClass(SubClass const &amp; subClass_); private: SubClass subClass }; </code></pre> <p>and in the .cpp files for the constr...
c++
[6]
180,502
180,503
Javascript - determining if value in array is positive, negative (use switch)
<p>Ok so I'm trying to write some code to determine whether or not values in a static array are positive, negative or equal to zero.</p> <p>So the array is populated and I'd use a switch statement to go through the values and output text depending on if it is above, below or equal to zero. </p> <p>Here's some of the ...
javascript
[3]
219,992
219,993
IntentFilter not working when created runtime
<p>I have a problem. I need to interupt link that are not static but the user will create list of all at runtime. So I am creating my intentfilter object at runtime. So when i use the code in manifest file it works.But using it in java class doesn't work for me. Here's the code </p> <p>This is not working</p> <pre><c...
android
[4]
3,786,057
3,786,058
What's the right way to disconnect a MediaController?
<p>What's the right way to shut down a MediaController with an attached MediaPlayer?</p> <p>You can't do mediaController.setMediaPlayer(null) - that immediately calls updatePausePlay, which dereferences the null.</p> <p>You can't call mediaPlayer.release(), since MediaController is going to call MediaPlayer#getCurren...
android
[4]
4,042,592
4,042,593
C# Enumerable Range
<p>What is the way to get Range "A"..."Z" like</p> <pre><code>Enumerable.Range(1,100) Enumerable.Range("A","Z"); </code></pre>
c#
[0]
6,019,068
6,019,069
smallest format for videos in an iphone app
<p>I have a lot of videos I would like to embed into an app, and am currently just streaming them using an UIWebView browser I set up.</p> <p>I know there are formats available to email videos, where videos can be like 6 mb or less.</p> <p>What is the best way to do this for an iphone app.</p> <p>Keeping the quality...
iphone
[8]
4,094,489
4,094,490
I am not getting the 'Profile' property in the code behind
<p>I have added some profile properties to my web.config:</p> <pre><code>&lt;profile automaticSaveEnabled ="true"&gt; &lt;properties&gt; &lt;add name="NumVisits" type="System.Int32"/&gt; &lt;add name="UserName" type="System.String"/&gt; &lt;add name="Gender" type="bool"/&gt; ...
asp.net
[9]
5,424,132
5,424,133
For items in a dictonary, split the name of one item, add and remove some info python
<p>I have a dictionary with this info: </p> <pre><code>x = {Country:{City:Population},.....} </code></pre> <p>but City name is now like: <code>Country_City_Neighbourhood_Population</code> (for some reason). I need to remove all the information and just keep the City and Neighbourhood like this: <code>CityNeighbourhoo...
python
[7]
4,177,614
4,177,615
not clear with stripslash() functionality
<p>I am new in PHP world. While going through couple of functions i came across stripslash() I am not clear about it's benefit. Gone through couple of google link but still it's benefit is not clear.</p> <pre><code>&lt;?php $array=array("a"=&gt;"0","b"=&gt;"1","c"=&gt;"2"); print_r ($array); print "\n"; ...
php
[2]
5,177,200
5,177,201
Store huge amount of data in assembly
<p>I'm trying to make an assembly which I can use in mutliple programs. The assembly contains a huge amount of countries and a huge amount of towns in that country. the data for countries is not much of a problem because I only count 249 countries but I also have huge amount of data for towns.</p> <p>For example franc...
c#
[0]
5,228,928
5,228,929
socket programming in windows to send data freezes for sometime and getting delayed for sometime?
<p>I am able to send data successfully with a static class through socket programming, it works fine for small amount of data but in production environment it is freezing for sometime and again it is starting to send data, i am unable to figure out what is the problem? can you please help. Code is as below.</p> <pre><...
c++
[6]
4,083,946
4,083,947
Send data from phone to phone over internet?
<p>Is there any way to actually communicate between two android devices over internet without having to have any service between the two devices? </p> <p>Like posting something to device2 from device1 without having to "middle-land" on any other server or whatever?</p> <p>Another question: I tried to ping my phone ov...
android
[4]
2,539,786
2,539,787
Exclude .cs from project through code? (Visual Studio)
<p>I need to exclude .cs files from project through code, for example with T4 template. I know that you can modify the .csproj file, but this doesn't work properly if the project is opened with Visual Studio, so is there any way to exclude/add .cs files through code(for example, with T4 templates)?</p> <p>Thanks</p>
c#
[0]
5,454,153
5,454,154
Select file to upload from source
<p>On a webpage the user can select a file to upload then if he submits the form he is directed to the next webpage with a similar, but bigger form. The form elements are filled with the data he entered on the last page</p> <p>firstpage.html</p> <pre><code>&lt;form name="MyForm" action="nextpage.php" enctype="multipa...
php
[2]
3,551,196
3,551,197
Why define constants in a class versus a namespace?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4977330/static-members-class-vs-normal-c-like-interface">Static members class vs. normal c-like interface</a> </p> </blockquote> <p>I am looking at somebodies code and there are several dozen constants defined i...
c++
[6]
403,014
403,015
Disable a link that has href="javascript:;" until option is selected
<p>I have a link I need to disable until a selection is made from a select box</p> <pre><code>&lt;select id="shippingSelect" onchange="simpleCart.update();"&gt; &lt;option value="nothing" selected="selected"&gt;Choose Shipping Location&lt;/option&gt; &lt;option value="uk"&gt;UK ...
jquery
[5]
1,969,356
1,969,357
Differece between Static and reinerpret cast
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/332030/when-should-static-cast-dynamic-cast-and-reinterpret-cast-be-used">When should static_cast, dynamic_cast and reinterpret_cast be used?</a> </p> </blockquote> <pre><code>class b { } class d :public b { } ...
c++
[6]
1,255,493
1,255,494
Advantages for using php compared to asp
<p>What are the advantages of using php over asp</p>
php
[2]
2,032,677
2,032,678
How to make return value 0 of a script
<p>I have a script that triggers another script:</p> <pre><code>exit_status = subprocess.call([RUN_SCRIPT)] if exit_status: # if successful output # do something else: # if script is not successful # send email to admins # RUN_SCRIPT if return_value &lt; error_threshold: # return exit status = 1 if return...
python
[7]
5,094,738
5,094,739
How to do it right : embedding a png directory to an android project and reffering to its items
<p>what i did was that i added a directory named Images, which is full of png files to src\ (so all the images are in src\Images and then reffered to it in code like this:</p> <pre><code>BitmapFactory.decodeFile("Images\\"+i+".png"); </code></pre> <p>it didnt work, how can it be done correctly?</p>
android
[4]
2,063,084
2,063,085
How to work on latest sdk and support older ones
<p>I need to suppoert api level 10, and working with latest sdk to provide new device features (only if sdk of device is new). on manifest I choose min version 10. </p> <p>The problem is that the application is not installed succesfully on the old sdk devices. Whne I debug on those devices it works, The installation ...
android
[4]
5,373,921
5,373,922
using event load with .on() on a text field is not working
<p>im trying to trigger a load event (for example set default value) on my textfield using this:</p> <pre><code> $("#textfield1").on("load" , function(){ $("#textfield1").val("WEEE"); }); </code></pre> <p>which won't work.</p> <p>If i do this:</p> <pre><code> $(document).ready(function() { $("#t...
jquery
[5]
3,238,419
3,238,420
Where to place jQuery.expr code?
<p>I'm looking for a solution to have a case-insensitive version of the <code>:contains</code> selector in jQuery. I found these two posts here on Stack Overflow:</p> <p><a href="http://stackoverflow.com/questions/187537/is-there-a-case-insensitive-jquery-contains-selector">Is there a case insensitive jQuery :contains...
jquery
[5]
474,321
474,322
android webview virtualkey board
<p>I have a URL where User can Input in a Field.</p> <p>When I open that URL with the Android Browser and click in the Field the Virtual Keyboard pops up. When I open the same URL with my WebView and click in the Field the Virtual Keyboard does NOT appear?!</p> <p>What Do I have to do? my code is below </p> <p>L...
android
[4]
3,778,448
3,778,449
JAVA + create HashMap in place of function
<p>I write the following two functions I want to implement the functions with HashMap ( in place of functions ) how to do that?</p> <pre><code>static void someFunction(int count, int[] anArray) { for ( int i=0;i&lt;anArray[count];i = i + 1) { System.out.print("#"); } System.out.println(""); } st...
java
[1]
2,699,705
2,699,706
I've been using dictionary keys as membership markers. Is this a good idea?
<p>For instance, I have a document that has a pile of control codes that I need to manually specify replacements for. I basically write a script that prints out the list of codes. Easy. </p> <p>Now I've been using a dictionary's key to store the membership. If the code exists, then I set the dictionary value to someth...
python
[7]
2,585,334
2,585,335
.Net Tracking Shipments
<p>I have a situtation where a user will enter in a tracking number and i need to be able to figure out which company it was shipped from (UPS, FedEX, USPS, DHL) and then pass back a url that they can click on and send them to the right website. Any suggestions?</p> <p>Thanks Erik</p>
c#
[0]
1,057,978
1,057,979
Key combination without modifier keys
<p>I need to get key combinations like "A" &amp; "B" , "S" &amp; "D" &amp; "F" like that in C#. I can implement key combinations using modifier keys,like Control, Alter. But here, I need the key combinations without using those modifier keys.</p>
c#
[0]
3,610,613
3,610,614
jquery pass parameter to custom validation function
<p>I wrote a custom method to validate whether price is valid. Eg. no alphabet etc. Hence I wrote a custom method. But I have no idea how to pass in value.</p> <p>Method:</p> <pre><code>function checkIsPriceValid(input) { alert(input); return false; } </code></pre> <p>The form validation</p> <pre><code>$(fu...
jquery
[5]
2,053,942
2,053,943
Run time the user control content not displaying to the page
<p>I have a few user controls, and on ASPX page on some drop down selection change i am adding user control this way, the user contorl not being displayed what i am unable to fix on it, please let me know where i am going wrong.</p> <p>partial code</p> <pre><code> switch (ContentTypeID) { case ...
asp.net
[9]
3,077,052
3,077,053
Get content from a url using php
<p>I want to get the dynamic contents from a particular url:</p> <p>I have used the code </p> <pre><code>echo $content=file_get_contents('http://www.punoftheday.com/cgi-bin/arandompun.pl'); </code></pre> <p>I am getting following results:</p> <pre><code>document.write('"Bakers have a great knead to make bread." ')...
php
[2]
1,393,033
1,393,034
How to call a method from a certain java thread
<p>currently I am working on java client/server chat app and got one question, I'll try to explain as clear as possible</p> <p>My server part keeps creating threads (new ServerThread) for each user who comes online</p> <pre><code>while (isRunning) { Socket socket = serverSocket.accept(); DataOutputStream dout...
java
[1]
1,688,044
1,688,045
c#: Check which project is calling class library
<p>I have two projects which is calling a Class Library. Can i in my Class Library check which project is calling the Library?</p>
c#
[0]
269,627
269,628
What is binary compatibility
<p>I was reading <a href="http://rads.stackoverflow.com/amzn/click/0321356683" rel="nofollow">Effective Java</a> by Joshua Bloch.</p> <p>In Item 17: Use interfaces only to define types, I came across the explanation where it is not advised to use Interfaces for storing constants. I am putting the explanation below.</...
java
[1]
5,844,970
5,844,971
how to Upload image before text
<p>Adding <code>Checkboxes</code> and <code>RadioButton</code>s and aslo i want add image before text </p> <p>please see in this <a href="http://developer.android.com/guide/topics/ui/dialogs.html" rel="nofollow">http://developer.android.com/guide/topics/ui/dialogs.html</a></p> <pre><code>final CharSequence[] gender...
android
[4]
2,720,973
2,720,974
How do I get an image to display on a page when the path for the image is in a MySql database?
<p>Here is the 'id' and (path) 'name' in the MySql table called "upload":</p> <pre><code> rec_id | name --------+------------------------------------------------------ 1 | C:\Apache Tomcat 5.0.28\htdocs\ajax\images\blob1.jpg 2 | C:\Apache Tomcat 5.0.28\htdocs\ajax\images\blob3.jpg 3 | C:\Apache Tomca...
php
[2]
4,607,793
4,607,794
How do I dynamically invoke a certain Activity based only on the parent?
<p>I have a class in my project that is used as a helper throughout all my Activities. On the <code>onCreate</code> method, I instanciate this class like this:</p> <pre><code>MyClass myClass = new MyClass(getApplicationContext()); </code></pre> <p>Now, the MyClass class holds the context of the one who instantiated i...
android
[4]
5,478,768
5,478,769
setting cookie.domain in asp.net
<p>Trying to set a domain in the cookie in asp.net and I am very novice in asp.net so wanted to know how this can be done.</p> <p>here is my code</p> <pre><code>// Create cookie var cookieData = new NameValueCollection(); cookieData["first_name"] = first_name; cookieData["last_name"] = last_name; var cookie = new Co...
asp.net
[9]
5,598,218
5,598,219
matching url to another url
<p>I am faced with rather unusual situation</p> <p>I will have url in any of the 3 formats:</p> <ol> <li><a href="http://example.com/?p=12" rel="nofollow">http://example.com/?p=12</a></li> <li><a href="http://example.com/a-b/" rel="nofollow">http://example.com/a-b/</a></li> <li><a href="http://example.com/a.html" rel...
php
[2]
4,464,291
4,464,292
long running php script issue on firefox/IE
<p>I am executing one php script, which is taking around 8 minutes to execute. this code is working fine on chrome, but on IE/Firefox it is not working. In the chrome, i am getting the output after 8 minutes, but in IE/Firefox i am not getting any response.</p> <p>What could be issue? Please help on that. any issue w...
php
[2]
1,069,063
1,069,064
checking for set gpr?
<p>What would be best practice in check for set get/post/request?</p> <p>right now i am doing</p> <pre><code>if(!isset($_GET['account']) || !isset($_GET['ssid']) || !isset($_GET['mssid']) || !isset($_GET['max'])) { die("missing info"); } if($_GET['account'] == "" || $_GET['ssid'] == "" || $_GET['mssid'] == "" || $_GE...
php
[2]
5,433,477
5,433,478
Why does Crockford say not to use the new keyword if he advises us to use it for prototypal inheritance?
<p>I saw a video in which Crockford told us not to use the <code>new</code> keyword. He said to use Object.create instead if I'm not mistaken. Why does he tell us not to use <code>new</code> if he has used it in achieving prototypal inheritance in this article that he wrote: <a href="http://javascript.crockford.com/pro...
javascript
[3]
291,242
291,243
Bluetooth-Android ICS Base build
<p>I build android ICS base software for emulator. This builds ok. Then, I have modified the c files in the path: “external\bluetooth\bluez\attrib\gattrip.c.” Also other c files in this location. I am not sure how do I build this file on ICS base.</p> <p>Before I build I build for Emulator successfully I have used th...
android
[4]
1,642,917
1,642,918
android : SQL Exception while querying
<p>Team,</p> <p>Can you please help me to understand why I m getting the following exception.</p> <p>05-07 10:57:20.652: ERROR/AndroidRuntime(470): android.database.sqlite.SQLiteException: near "1": syntax error: , while compiling: SELECT Id,Name FROM act WHERE Id 1-IJUS-1</p> <p>Thanks in advance,</p>
android
[4]
2,389,702
2,389,703
Specifiying keyword arguments with *args and **kws
<p>I've found a behavior in Python that has baffled and irritated me and I was wondering what I got wrong...</p> <p>I have a function which should take an arbitrary number of arguments and keywords, but in addition should have some default-valued keywords that comprise it's actual interface:</p> <pre><code>def foo(my...
python
[7]
4,855,207
4,855,208
Which JS Framework Can Store Datas Like DBs Does?
<p>I need to store datas like DBs does on client-side in JS, </p> <pre><code>db.insert(unique_key,{ a : 20, b : 30 }) ; db.select('a&gt;10') ; </code></pre> <p>This is just illustrative syntax to show,</p> <p>How can I procces datas more than key/value pair do.</p> <p>Any acknowledge would be great,</p> <...
javascript
[3]
3,873,167
3,873,168
Fragment over another fragment issue
<p>When I'm showing one fragment (which is full screen with <code>#77000000</code> background) over another fragment (let's call it main), my main fragment still reacts to clicks (we can click a button even if we don't see it).</p> <p><strong>Question</strong>: how to prevent clicks on first (main) fragment?</p> <p><...
android
[4]
4,274,837
4,274,838
Progress Bar + Main Thread UI Update Wait for Thread to complete (Android Java)
<p>I have been getting help to create a progress bar for my Android application. Lots of help here! I'm having an issue though that I am having a hard time fixing. I have a progress bar shown while the application attempts to download files from a networked computer. This works perfectly fine, however I need to update ...
android
[4]
720,496
720,497
Using volume buttons while in sleep mode ( music player style )
<p>I need to use volume buttons in my application while sleep mode is active( black screen, locked). I am using onDispachKeyEvent to capture volume buttons and it works perfectly while in normal state. In music player if you close the screen, you can still change volume. Any idea how is done ?</p> <p>Thanks</p>
android
[4]
1,803,735
1,803,736
show/hide the corresponding part content of li?
<p>the hmtl code: </p> <pre><code> &lt;div id="nav"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;test 1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;test 2&lt;/a&gt; &lt;div class="sub-nav"&gt; &lt;p&gt; &lt;a href="#"&gt;link &lt;/a&gt; &lt;a href="#"&gt;link &lt;/a&gt; &lt;a href="#"&gt;link &lt;/a&gt; ...
jquery
[5]
427,825
427,826
jquery mouseover events
<p>How could I keep this working constantly. The mouseover works only once, but I'd like it to work at all times.</p> <pre><code> if (!self.options.overlapEventsSeparate) { $(this).bind('mouseover.z-index', function() { var $elem = $(this); ...
jquery
[5]
4,207,149
4,207,150
manually adding users to roles in asp.net
<p>i have googled the heck out of this and i cannot find a solution. i would like to add users to a role manually using the administration tool or just manually doing this. i am a beginner with asp.net, how would i do this? i am using windows authentication</p>
asp.net
[9]
437,582
437,583
How can you round up a number and display it as a percentage?
<p>I'm a bit rusty on my mathematics so I hope someone can help me. Using the code below I would like to do the following: Depending on the amount of memory installed, I would like to display the percentage of available memory and not how much is left in megabytes.</p> <pre><code>private void timer1_Tick(object sende...
c#
[0]
5,335,230
5,335,231
Javascript clear content of selectbox
<p>As part of my populating selectbox function I am clearing the contents of the populated select box and then inserting options to a empty box. Although the select box is not being cleared correctly and a lot of options are not removed. I am using the following code to clear the contents of the select box:</p> <pre><...
javascript
[3]
614,996
614,997
how to fetch URL data
<p>i have created custom query which i am sending via POST ajax but problem with it is that how to retrieve that data</p> <p>i am sending this query = <code>rep_id=4&amp;filter=&amp;filter_val=&amp;rep_id=5&amp;filter=&amp;filter_val=&amp;rep_id=6&amp;filter=&amp;filter_val=&amp;from=p_employee_mst</code></p> <p>and ...
php
[2]
2,475,920
2,475,921
how do I get the name of a running python script?
<p>I tried <code>os.__file__</code> but that returns the name of the file where <code>os</code> resides.</p>
python
[7]
500,200
500,201
How to debug the android app from eclipse to samsung galaxy pop?
<p>I'm using Samsung galaxy pop. I want to debug the application from eclipse to device. This will be working fine to my HTC mobile. But whenever I was connected the samsung android device, it's not connected to my eclipse. </p> <p>How to resolve this issue?</p> <p>Thanks in advance..</p>
android
[4]
4,580,673
4,580,674
Passing with Accessors in C#
<p>I am having a bit of trouble passing variable between forms. I have created a button array and want to pass the button text to the next form. But this is just returning a Null value</p> <p>In the first form</p> <pre><code>private string staffmem; public string Staffmem { get { r...
c#
[0]
836,126
836,127
Is there thing like pass by value pass by reference in JavaScript?
<p>When i started learning function in C++ its all around pass by value and reference. Is there something similar we have in javascript ?</p> <p>If yes/not how it works in case of javascript?</p> <p>Thanks all.</p>
javascript
[3]
3,614,555
3,614,556
Members not available when implementing IList
<p>I've tried to create a simple class implementing IList. However the members are not available unless I first cast DiskBackedCollection to IList. How can I make it usable without casting?</p> <pre><code>public partial class DiskBackedCollection&lt;T&gt; : IList&lt;T&gt; { private List&lt;T&gt; _underlyingList ...
c#
[0]
1,690,432
1,690,433
Jquery document off mouseevent
<p>Start</p> <pre><code>$(document).on('mousemove', "#id", EVENT); </code></pre> <p>Disable</p> <pre><code>$(document).off('mousemove', "#id"); </code></pre> <p>I have tried...</p> <pre><code>$(document).off('mousemove', "#id", EVENT); $("#id").unbind('mousemove'); </code></pre> <p>Exact Functions</p> <pre><code...
jquery
[5]
3,662,087
3,662,088
Check html element's click event fired programmatically or by clicking with mouse
<p>I must check which is fired the click event, click with mouse or .click() function. Is it possible?</p>
jquery
[5]
509,348
509,349
Accessing the same service more than twice in the nick of time
<p>I have an application that will access interface service A which is to run from windows startup. This service is used by program B and my application functions on B's presence after getting a pointer to A. The scenario is translated as follows,</p> <pre><code>public interface A{} ///my program public class MyProgr...
c#
[0]
3,285,085
3,285,086
How do I know when a GLSurfaceView is fully initialized from the Activity?
<p>I have an Activity that contains several views. One of which is a GLSurfaceView. This GLSurfaceView displays pretty 3D effects based on what is selected in my Activity's other views (ListViews, EditTexts, etc). The issue I am having is that I don't know when my GLSurfaceView has been fully initialized from the Ac...
android
[4]
1,670,394
1,670,395
char printable program
<p>i have program which prints all char from char_min to char_max here is code</p> <pre><code>#include &lt;limits.h&gt; #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; int main(){ char c; c=CHAR_MIN; while(c!=CHAR_MAX){ printf("d\n",c); c=c+1; } return 0; } </code></pre...
c++
[6]
2,618,329
2,618,330
Python: Sort custom class without use of `key` argument?
<p>You can sort an array of <code>myclass</code> by using the <code>key</code> argument to the <code>sorted</code> function:</p> <pre><code>sortedlist = sorted(myclasses, key=lambda obj: obj.myproperty) </code></pre> <p>Is there a way to define a natural ordering for our class? Perhaps some magic method so that we do...
python
[7]
2,254,660
2,254,661
c++ makefile importance and cross platform
<p>I'm new to c++ and I wanted to know few questions regarding makefile.</p> <p>1) Is writing makefile really important ? I mean there are many IDE's which does this automatically. Also, do people in programming job write makefiles or do they use automation?</p> <p>2) Should I learn GNU make or something else like cm...
c++
[6]
997,456
997,457
java parsing string as properties
<p>I am reading a properties file from database. I checked java properties, there's no method to parse from string. Is there any other efficient way to parse this? Thank you very much.</p>
java
[1]
1,483,026
1,483,027
how to display the same value into another class's textfield?
<p>hi all i have implemented code as shown in the below here problem is when i clicked on click event textfield *settextvalue value is not appearing into the next view textfield for this give me the solution in iphone. </p> <p>ClassA.h</p> <pre><code>@classB { UITextField *settextvalue; ClassB *b; } @propert...
iphone
[8]
225,283
225,284
send email after validation
<p>hi i am new enough to JavaScript and am wonder how to send details in email after validation ,heres my code </p> <pre><code>&lt;script type="text/javascript"&gt; var compName=false; var compContry=false; var compsub=false; var compphone=false; var compemail=false; function validate_form(form) { if(comp...
javascript
[3]
3,866,117
3,866,118
Windows system time with millisecond precision, UP
<p>I want to reask <a href="http://stackoverflow.com/questions/3140826/windows-system-time-with-millisecond-precision">this</a> question as it was asked two years ago and I think probably now better solutions exist.</p> <p>So I just need to have DateTime.Now with millisecond precision. At the same time I do not want t...
c#
[0]
4,355,837
4,355,838
Is there a limit to the amount of elements in a Vector in Java?
<p>Does the Vector class of Java have a limit to the amount of elements it can store? I know it automatically grows and should be able to store an arbitrary amount of elements, however are there any limitations that limit the amount of elements you can actually store? Other than the most obvious limitation like running...
java
[1]
3,079,556
3,079,557
Is the way I have my admin panel set up good?
<p>So basically, <a href="http://github.com/a2h/Ze-Very-Flat-Pancaek-CMS/blob/1630d6337d93fd7cc7612020ac136fb3edef8b00/trunk/zvfpcms/admin/admin.php" rel="nofollow">this</a> is what I have.</p> <p>But is this a good practice? I started splitting up my admin.php file due to it growing in size.</p> <p>However, I have a...
php
[2]