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,183,255
4,183,256
Android bluetooth service name
<p>Is there any way that I can get the service name of the BT discovered device. My bluetooth discovery logis is as follows</p> <pre><code> startdiscovery() { boolean status1 = mBluetoothAdapter.startDiscovery(); } BroadcastReceiver mReceiver = new BroadcastReceiver() { if (BluetoothDevice.ACTION_FOUND.eq...
android
[4]
4,006,936
4,006,937
Creating checkbox when a checkbox is selected in javascript
<pre><code> var container = document.getElementById('container'), template = '&lt;li&gt;\ &lt;input type="checkbox"&gt;\ &lt;/li&gt;\ &lt;li&gt;\ &lt;input type="checkbox"&gt;\ &lt;/li&gt;\ &lt;li&gt;\ &lt;input type="checkbox"&gt;\ &lt;/li&gt;'; container.onchange = ...
javascript
[3]
949,794
949,795
Measuring time between keystrokes in python
<p>Using the following code: </p> <pre><code> &gt;&gt;&gt; import time &gt;&gt;&gt; start = time.time() &gt;&gt;&gt; end = time.time() &gt;&gt;&gt; end - start </code></pre> <p>one can measure time between "start" and "end". What about measuring the time between specific keystrokes? Specifically, if a modu...
python
[7]
4,960,337
4,960,338
Input field filter solution for jQuery
<p>Anyone know a good solution for filtering input using jQuery?</p> <p>I'd like to do something like this:</p> <p>$("#fieldname").InputFilter("###-###-####")</p> <p>I would also like the visual interface to enforce and display placeholders for ###-###-####, #####, etc.</p> <p>Regards.</p>
jquery
[5]
450,355
450,356
Dynamically adding a control on ajax postback to the Page.Form?
<p>I have a simple web page test.aspx with the following code .</p> <pre><code>&lt;body&gt; &lt;form id="form1" runat="server"&gt; &lt;div&gt; &lt;asp:TextBox runat="server" ID="_txt1" /&gt; &lt;asp:Button Text="Bu" runat="server" ID="_btn" OnClick="_Click" /&gt; &lt;/div&gt; &lt;/form&...
asp.net
[9]
2,012,314
2,012,315
To know the logic behind it
<p>is there anybody who explain me this coding</p> <pre> public class FunctionCall { public static void funct1 () { System.out.println ("Inside funct1"); } public static void main (String[] args) { int val; System.out.println ("Inside main"); funct1(); System.out.println ("About to call fun...
java
[1]
4,219,188
4,219,189
It is possible to split insert statment & update stament from merge query using java
<p>I have a merge query like this</p> <pre><code>MERGE INTO dept a USING ( SELECT 50 deptno , 'ENGINEERING' dname , 'WEXFORD' loc FROM dual ) b ON (a.deptno = b.deptno) WHEN NOT MATCHED THEN INSERT VALUES (b.deptno, b.dname, b.loc) WHEN MATCHED THEN UPDATE SE...
java
[1]
1,444,996
1,444,997
killBackgroundProcesses does not work on SETTINGS?
<p>I want to kill the background process of SETTINGS by using killBackgroundProcesses. But it does not work without any errors? I use API(8) level 2.2 and having KILL_BACKGROUND_PROCESSES permission in manifest.</p> <pre><code> ActivityManager activityManager = (ActivityManager)getApplicationContext().getSystemServic...
android
[4]
3,414,492
3,414,493
How to make a relation between data table in data set
<p>I have one data set <code>DS1</code>. In this data set have two data tables: <code>DT1</code> and <code>DT2</code> The layout of the data ables looks like this:</p> <p>DT1 Data:</p> <pre><code>**ID Name** 1 Amit 2 Alok 3 Munish </code></pre> <p>DT2 Data:</p> <pre><code>**ID Name** 2 Alok 3 ...
c#
[0]
3,507,691
3,507,692
Providing Arabic language support to an application
<p>I have a chat application . I want to give Arabic language support to my application. Is there any way to change language when a user selects his language from a select box? The User requires to Write in Arabic in his text area.</p>
jquery
[5]
5,684,527
5,684,528
jQuery How to check of element exceed browser window size and reposition it
<p>I have this code:</p> <pre><code>var pos = $(this).offset(); var width = $(this).width(); userPreviewCon.css({ left: (pos.left + 30) + 'px', top: pos.top + 15 + 'px' }).fadeIn(); </code></pre> <p>And this is for position popup window relative to element, that mouse i...
jquery
[5]
5,494,619
5,494,620
Sync iCal in Iphone appilication
<p>Cam we sync iCal in Iphone application?</p>
iphone
[8]
689,773
689,774
How to do Image over like effect if google image search using jquery
<p>How to do Image over like effect like google image search using jquery.</p> <p>In google image search result, when user mouse over it, display the image information div</p> <p>how to achieve using jquery</p>
jquery
[5]
3,646,382
3,646,383
Jquery add CSS if input empty on .keyup
<p>Im trying to add CSS to a input on keyup. If the input is empty add CSS. I've tried this...</p> <pre><code> $(input).keyup(function() { var input = $(this).attr('id'); if( input == "" ) { $(input).css( "border", "1px solid #FB9E25" ); } ...
jquery
[5]
3,876,158
3,876,159
Regarding threads
<p>could you please provide me with a simple short program that shows the functionality of wait() notify()and notify all(), I am a new bie to Threads ,I want to clear my concepts ,I have googled but nothing to find simpler examples !!thanks in advance.</p>
java
[1]
5,047,021
5,047,022
What are the implications of VMDebug.startGC in a traceview file
<p>What are the implications of VMDebug.startGC in a traceview file</p> <p>The <a href="http://www.java2s.com/Open-Source/Android/android-core/platform-libcore/dalvik/system/VMDebug.java.htm" rel="nofollow">documentation</a> says:</p> <pre><code>/* * Fake method, inserted into dmtrace output when the garbage collect...
android
[4]
3,208,345
3,208,346
Will a variable in a php file accessable by other php files?
<p>At the beginning of a php file, I defined a variable <code>$id</code>, and use it in the rest of this file. I'm curious-- How long this <code>$id</code> will last? Will it be accessible by other php files that loaded after?</p>
php
[2]
589,533
589,534
how to create .json file and how to write json object into json file ...In android
<p>I am using this code for creating the new file and write the json object in test.json file but I am unable to create file.Please find mistake and give the best result One things I have also write the code for permission in manifest file..</p> <p>Thanks,</p> <pre><code>String fileName = "test"; File file...
android
[4]
5,601,147
5,601,148
when i run my code I get the following result []object object] [object object] but should be giving me an ordered array
<pre><code> var rangeArray= new Array(); rangeArray.push(parseRangeString(1, "&lt; -4 &amp; &lt; 10")); rangeArray.push(parseRangeString(2, "&lt; 15 &amp; &lt; 19")); rangeArray.push(parseRangeString(3, "&lt;= 50 &amp; &lt;= 123")); rangeArray.push(parseRangeString(4, "&lt; -99 &amp; &lt; -2...
javascript
[3]
2,318,011
2,318,012
How to animate stuff when using -drawRect:?
<p>I didn't use subviews but painted my things with -drawRect: inside an UIView subclass. Now I want to do some animations in there.</p> <p>I guess that I can't count on core animation now since I have no subviews. So how would I animate then? Would I set up a timer which fires like 30 times per second? How would I kn...
iphone
[8]
5,650,311
5,650,312
ANDROID: Possible to load an Activity into a SlidingDrawer view?
<p>I'm searching all over but cannot seem to find a answer to this.</p> <p>I have my main HomeActivity view which contains a SlidingDrawer in the main.xml layout. The sliding drawer works fine. What I'd like to do though is that when the SlidingDrawer is opened, I want to launch a new activity in the sliding drawer vi...
android
[4]
722,064
722,065
Optimal Activity Stack Order for a Main Menu button?
<p>I'm developing an app that starts with a main menu, and then continues through three different steps (activities) to a final activity where the task is marked complete. On this last activity, i have several additional options (add note, share, etc..) and i also have a return to main menu button.</p> <p>My question ...
android
[4]
3,963,000
3,963,001
Prevent DIV from appearing partially outside of the window
<p>I have a DIV popping up at the bottom right of the cursor whenever a user right-clicks on a row in my table. The problem is, if a user right-clicks near the bottom of their browser window, the DIV will pop up and get cut off where the window ends. </p> <p>Is there a way to detect if this will happen and if it will...
jquery
[5]
5,846,436
5,846,437
How to find cpu,io,memory utilization of a loading page in web application
<p>I've written a Java file, using Jsp,servlets, that I would like to perform run-time tests on. I've never done this before and was just curious on how to go about it. </p> <p>What I'm interested in knowing, besides the actual timings, is how to find cpu,memory and io utilization when running the application.Your tho...
java
[1]
2,255,579
2,255,580
stuck with javascript-html output
<p>I am kind of stuck in weird problem. i cant find the problem with the following code</p> <pre><code> &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; // Import GET Vars document.$_GET = []; var urlHalves = String(document.location).split('?'); if(urlHalves[1]){ var urlVars = ...
javascript
[3]
5,718,992
5,718,993
Making the root in Huffman coding
<p>I'm trying to build a Huffman tree, and while my code combines the letters and weights correctly, it isn't building the tree correctly. When I print the tree out in order, there is no root, and the children are leaf nodes instead of parents with children of their own. I understand I'm not setting the root/parents co...
java
[1]
2,220,729
2,220,730
Reading a file relative to an included file
<p>I need to load some text (shader code) from a file that is placed next to my library file. This way, I can <code>#include TextureBloomer.h</code> in several projects, and TextureBloomer will take care of loading its shader without needing to set paths through configuration or environment variables. The directory hie...
c++
[6]
678,920
678,921
Saving User Settings in a Database
<p>1) I use Visual Studio 2008 (C#)</p> <p>2) I want my desktop application to "remember" certain settings (preferences) for every user individually.</p> <p>3) The application would use its own database of users (logins + passwords), so they have nothing to do with Windows accounts.</p> <p>How can I accomplish that?...
c#
[0]
1,210,080
1,210,081
Guidelines about saving objects to file
<p>I'm working with a hand in task that is like a simple bank with customers and different accounts. Now I have to develop my task to store my customer objects and account object to file. I have read some about it and I'm going to use the ObjectOutputStream and the ObjectInputStream.</p> <p>Since I have all customer o...
java
[1]
2,606,051
2,606,052
Android: Load Image from server
<p>I was thinking, maybee the best way of loading pictures that I have on the server, using for my site would be to get the url for the picture.. </p> <p>How can I load picture from a url to ImageView?</p>
android
[4]
4,105,692
4,105,693
Get time usage for all applications in android
<ul> <li>Please note - I want the code/logic not any apps</li> </ul> <p>I was trying a lot for some days to get the usage time for all applications in android , but i was not able to get it .I was able to get the list of all application installed in android but was not able to track their individual timings .</p> <p>...
android
[4]
5,319,531
5,319,532
Decrease text size if too long
<p>I have a couple textviews, I would like to limit them to a certain visual length, say 50% width of screen. If the text reaches 50% of the screen, I would like to do something to stop it from continuing across the screen. I thought maybe if it hits that limit, to just decrease the textsize for every character so that...
android
[4]
4,912,171
4,912,172
Changing object name with input
<p>I'm a beginner in java and I was wondering if there was a way to change the name of an object in the main class with input? For example I got this code:</p> <pre><code>while(!answer.equals("stop")) { //Enters book's information and stores it in the object book1 System.out.println("Book-" + count); ...
java
[1]
677,545
677,546
Can't remove object from ArrayList
<p>I'm working on a card game. I can't figure out how to remove a Card from an ArrayList no matter what. This is the code I'm using:</p> <pre><code>private List&lt;Card&gt; cardDeck = new ArrayList&lt;Card&gt;(); public void removeCard(Card card) { for (Iterator&lt;Card&gt; it = cardDeck.iterator(); it.hasNext();...
java
[1]
2,527,858
2,527,859
ASP.NET 4.5 object AdminBAL & ThrowError exception not recognize?
<p>When I type coding like this,</p> <pre><code>void BindCurrentUsers() { AdminBAL admin = new AdminBAL(); try { GridViewServer.DataSource = admin.LoadAll(); GridViewServer.DataBind(); } catch (Exception ee) { lblError.Text = Thro...
asp.net
[9]
5,004,089
5,004,090
SessionParameter and Update Query with SqlDataSource
<p>I have an UpdateQuery within my SQLDataSource, where the parameter is being supplied from SessionParameter. The value for the SessionParameter is being set from my codebehind via a button click on a gridview. </p> <p>The objective is when the user clicks a button on the gridview it updates the database via the grid...
asp.net
[9]
3,014,266
3,014,267
How is R.drawable able to resolve R.drawable.sample_2, etc?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3276260/gridview-tutorial-problems">Gridview Tutorial problems</a> </p> </blockquote> <p>In the android grid view tutorial, they use <code>R.drawable.sample_0</code>, <code>R.drawable.sample_1</code>, <code>R.dr...
android
[4]
5,483,615
5,483,616
Jquery: Stop propagation?
<p>I have added stopPropagation, however, I still get two popups in a row. This is better than before, where there were 20 popups for one element that is clicked....is there a better approach or am I missing something ?</p> <pre><code>$(top.document).ready(function () { $("*").click(processAction); }); function...
jquery
[5]
475,599
475,600
How can i determine when my application is running?
<p>I have an application that uses a Service to fetch data in the background both while the application is running and when it's not. When it is not running i would like to show a notification when there is new data, but not when the app is running.</p> <p>How do i determine in my service whether the app is running or...
android
[4]
4,245,809
4,245,810
SharedPreferences: when created?
<p>I try to access SharedPreferences inside Service. But when it's started first time and I try to read preferences, I get only default values, as if preferences don't exist. But after I open my preference Activity at first time, Service gets values. Is that normal? </p> <pre><code>&lt;?xml version="1.0" encoding="utf...
android
[4]
4,781,694
4,781,695
How to render any file format(doc,ppt,xls) into printable format in android?
<p>I am developing a andoid application which need to print some documents.Documents may be in different format like docx,ppt,xls. Now how can i render that other format in printable format in android ?</p> <p>Thanks in advance !</p>
android
[4]
1,466,027
1,466,028
Getting SIM state in GsmServiceStateTracker.java
<p>How can I get to know whether SIM is present or not in GsmServiceStateTracker.java file?</p>
android
[4]
5,505,798
5,505,799
android data passing and database access
<p>I am experiencing a problem where when the android device wake up from sleep, the Activity would take forever to get redrawn(and have to terminate it most of the time). I am not sure why, but when I comment out the code below where it retrieves an object from the database based on id stored in the bundle, the probl...
android
[4]
4,750,168
4,750,169
Is there any way how to distribute constructor to two files?
<p>I'm working on data core of application. I need to construct a few collections in one namespace like this:</p> <pre><code>var Core = function(){ this.firstCollection = []; $.extend(true, this.firstCollection,{ method1: function(){ alert("working with firstCollection"); } }; var core = new...
javascript
[3]
595,913
595,914
Help Creating a ContactsUtils class
<p>Alright, I would like to make a class that can kinda make working with Content Providers a little easier, especially while working with contacts. I have something of a base layout, but its erroring out when I try to initiate cr. How would I be able to get something like this working?</p> <p>Also, how does it look ...
android
[4]
5,095,314
5,095,315
prime factorization
<p>I am trying to calculate the prime factors of a number using trial method. I am trying the following method:-</p> <pre><code>#include&lt;iostream&gt; #include&lt;conio&gt; #include&lt;math&gt; using namespace std; int main() { int i,j,count=0; for(i=1;i&lt;=126;i++) { if(126%i==0) { if(i==1) ...
c++
[6]
1,730,525
1,730,526
last screen to first screen in iphone
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5789436/iphone-get-back-tothe-main-screen">iphone get back tothe main screen</a> </p> </blockquote> <p>I have created one iPhone application. I'm using multiple screens in my app. I wrote the code for the moving...
iphone
[8]
1,165,411
1,165,412
Using preg_replace To Change index.php To test
<p>In my forum urls, there is "index.php" in it everywhere. I want to replace it with "test". In my PHP files, I have this line:</p> <pre><code>// Makes it easier to refer to things this way. $scripturl = $boardurl . '/index.php'; </code></pre> <p>I tried just changing it to:</p> <pre><code>// Makes it easier to...
php
[2]
5,790,451
5,790,452
autoresize and asp.net
<p>Why doesn't work my project.I want use jquery autoresizable for my asp.net textbox?</p> <p>Like this <a href="http://james.padolsey.com/javascript/jquery-plugin-autoresize/" rel="nofollow">http://james.padolsey.com/javascript/jquery-plugin-autoresize/</a></p> <p>This is code from master page..</p> <p><a href="h...
asp.net
[9]
3,727,410
3,727,411
Confused on which one to to use - Linq to SQL, Datasets or Ado.Net Data entity model?
<p>I'm a pretty descent old school ASPNET developer i.e I still use Visual studio 2005 &amp; webforms to build websites.</p> <p>But with all the recent MVC hype I decided to get a copy of VS 2010 express and get aquainted with 'New school' ASPNET development.</p> <p>I have always relied on datasets to build my n-tier...
asp.net
[9]
5,870,711
5,870,712
does python have a comma operator like C
<p>in C (and C family of languages) an expression <code>(4+7, 5+2)</code> returns <code>7</code>. But the same expression in Python would result in a tuple <code>(11, 7)</code></p> <p>So does python have a comma operator like C ?</p>
python
[7]
5,559,328
5,559,329
Autolink action tracking in texview onClickListner
<p>I have a listview ,each item is a textView with property autoLink="web|email".Link will work properly,but I want to start another activity when text other than web|email is clicked,that was not happening.So I used setOnClickListner for textView,that also worked smoothly.My problem is when I click the email or web l...
android
[4]
3,774,935
3,774,936
Can't access public classes in an other project but the same namespace
<p>I have two projects in my solution and in each of them I have a CS file containing a public class. Since both classes are in the same namespace, I was expecting them to be able to see each other. That is not the case. See the setup below.</p> <p>Project Woof1, file File.CS</p> <pre><code>namespace MyNameSpace { ...
c#
[0]
5,748,744
5,748,745
Can I select multiple variables in a single Javascript command?
<p>Does Javascript have a built-in syntax for selecting multiple variables?</p> <p>Say I'd like to set a group of variables to equal 0.</p> <p>Is there some way to combine</p> <blockquote> <pre><code>x = 0 y = 0 n = 0 a = 0 </code></pre> </blockquote> <p>and so on, into one command?</p> <p>Or am I getting spoiled...
javascript
[3]
3,828,610
3,828,611
option in select is not selected without alert() in jQuery
<p>I have the following code snippet in my jquery. <code>update_obj['events']</code> holds the values of the options that I want to get selected. I have a set of <code>select</code> elements and their id begins with <code>event_drop_down_</code>. This code works fine. But if I comment the <code>alert(v)</code> the opti...
jquery
[5]
1,601,585
1,601,586
jQuery fadeout image
<p>I have a code to change image for every fixed intervals but this image is just normally changing. How can I use fadeout option to my code so that it will slowly fadeout to open a new image. My code follows</p> <pre><code>$(document).ready(function() { (function() { var curImgId = 0; ...
jquery
[5]
1,671,728
1,671,729
How to read yahoo email with python
<p>tried to use the following code to read yahoo email. The error message says "NB: mailbox is locked by server from here to 'quit()'"</p> <p>Q> How to fix the issue?</p> <pre><code>import poplib from email import parser pop_conn = poplib.POP3_SSL('pop.mail.yahoo.com') pop_conn.user('xxxx@yahoo.com') pop_conn.pass_(...
python
[7]
1,533,251
1,533,252
How to get the Default orange Highlight Effect for EditText
<p>I've lost the Orange Highlight effect for EditText after implemented Round Corner effect using this code. Could someone tell me how to retrive the Highlight effect?</p> <p>Thank you </p> <p>round_corner_button_bg.xml</p> <pre><code>&lt;shape xmlns:android="http://schemas.android.com/apk/res/android" andro...
android
[4]
1,509,763
1,509,764
How to allow user to install apk file one once on android phone?
<p>Hi i have develop an android application in which i want to prevent user to create multiple account on our ftp server from one android device for which i create configuraton file and store boolean value which is by defult one but when user create account its value change to true. but there is an issue when user unin...
android
[4]
4,958,934
4,958,935
Creating an object based on the state of another object in Java
<p>Lets say you have a class called Explosion where it does not make sense to create an instance of it, without some information from another class instance. The constructor is not made public.</p> <p>Is it better to do it this way:</p> <pre><code>// both classes are in the same package Explosion e; Collision c =...
java
[1]
3,881,229
3,881,230
PHP combine arrays
<p>I have two arrays:</p> <pre><code>aid = [$aid]=&gt;1 amount = [$aid] = $70 </code></pre> <p>How can I rewrite these two separate arrays to be one array:</p> <pre><code>payout = [aid] =&gt; $aid, [amount] =&gt; $70 </code></pre>
php
[2]
925,412
925,413
PHP MediaInfo CLI Help
<pre><code>&lt;?php $source_video = 'demo.ts'; $mediaInfoDur_log = 'MEDIAINFO-DURATION-LOG.log'; $mediaInfoDur_cmd_log = 'MEDIAINFO-DURATION-CMD.log'; $mediaInfoDur_cmd = 'mediainfo "--Inform=Video;%Duration%" ' . $source_video; $mediaInfoDur_cmd = $mediaInfoDur_cmd . ' &gt; ' . $mediaInfoDur_log . ' 2&gt;&amp;1'; $du...
php
[2]
5,608,390
5,608,391
using this to call a instance variable?
<p>Should you use "this.variablename" or just "variablename" to reference a member variable in a method?</p>
java
[1]
4,075,766
4,075,767
javascript calling function inside another mystery
<pre><code>function Obj1(param) { this.test1 = param || 1; } function Obj2(param, par) { this.test2 = param; this.ob = Obj1; this.ob(par); } </code></pre> <p>now why if I do:</p> <pre><code>alert(new Obj2(44,55).test1); </code></pre> <p>the output is 55? how can 'view' test1 an Obj2 istance if I hav...
javascript
[3]
2,887,461
2,887,462
writing a csv file using KBcsv writer
<p>I am trying to write into csv file using Kent.Boogaart.KBCsv, cant figure out what could be the problem?</p> <p>Piece of code:</p> <pre><code>private static void SaveCSV(List&lt;AData&gt; items,string fName) { using (CsvWriter wr = new CsvWriter(fName)) { wr.ValueSeparator = ';'; foreach (AD...
c#
[0]
1,585,190
1,585,191
PHP -- using session variables / reloading the page (logging in/out)
<p>I am building a login system and have a mysql query that checks the name and password and puts out a page saying 'logged' if they match.</p> <p>what I want to know is how i can use session variables to see if the user is logged in and then redirect them to a different page if they are. </p> <p>do i have to set al...
php
[2]
219,311
219,312
Fill in the blanks in an array
<p>I have an array which I'd like to show all days of weeks or each month of the year, even if data is 0, is it possible to look inside the array and fill in what's not there?</p> <p>The data I'm returning from mysql table does not show 0 - details below</p> <p><a href="http://stackoverflow.com/questions/12659970/sho...
php
[2]
1,213,139
1,213,140
Why is this get parameter not equal to a string?
<p>given a url:</p> <p>scrape.php?u=http%3A%2F%2Fwww.coldwellbanker.com%2Fagent%3 ...etc</p> <pre><code>$url = $_GET['u']; $url2 = 'http://www.coldwellbanker.com/agent?action=detail&amp;agentId=121759&amp;mode=detail'; var_dump($url==$url2); //This prints out bool(false) </code></pre> <p>Why is the $_GET parameter ...
php
[2]
5,801,401
5,801,402
Can we add UIbuttons,uilabels on to webview and make them scrollable along with the web view in iphone?
<p>I was working on webview.I am facing an issue where i want to display html as well as UIbuttons. I made webview added Ui butons but whn i scroll webview the webview scrolls but the uibuttons remain at the same location.Can you anyone please help me out?</p>
iphone
[8]
3,359,568
3,359,569
python string substitution
<p>Is there a simple way of passing a list as the parameter to a string substitution in python ? Something like:</p> <p><code>w = ['a', 'b', 'c']</code></p> <p><code>s = '%s\t%s\t%s\n' % w</code></p> <p>Something similar to the way dictionaries work in this case.</p>
python
[7]
2,836,500
2,836,501
Creating an Invoice using PHP+MySQL
<p>I want to create a invoice as described in this post <a href="http://css-tricks.com/html-invoice/" rel="nofollow">here</a>.</p> <p>I am able to do the edits here and get even the print. But I need some suggestion to store the same into Database. I am Good with MySQL, just a beginner in PHP, So can any one suggest m...
php
[2]
2,085,691
2,085,692
Trying to convert from seconds to date
<p>Okay so I have an array of results from a table, we have a start and end time we are retrieving. the start/end time would look something like this: </p> <pre><code>1345497551 </code></pre> <p>Now I'm trying to convert this to a real time, for instance <code>1345497551</code> might become <code>2012/05/09 17:23:...
php
[2]
928,352
928,353
how to prevent popup window on right mouse click
<p>So as the title says how could i do it?</p> <p>After some googling i got this code together:</p> <pre><code>$('.lines').mousedown(function(event) { if(event.which == 1){ console.log("left"); }else{ event.preventDefault(); console.log("right"); } }); </code></pre> <p>So first i ...
jquery
[5]
3,572,342
3,572,343
What Android version to target?
<p>I'm about to write my first Android app. It's a fairly basic app that doesn't use any special features beyond being able to schedule notifications and read/write image files to the device's local storage. Reaching the broadest audience is my top priority. If I target Android 1.5, is the app guaranteed to run fine al...
android
[4]
4,164,719
4,164,720
How to add external API in corona SDk, but no need to require network connectivity?
<p>I am new to corona. I want to add dictionary for word meaning but I don't want to add network connectivity so that user can get the meaning without internet connectivity. SO can you please tell me how to add that external API or any other method so that I can add this feature?</p> <p>Thanks,</p>
iphone
[8]
3,023,836
3,023,837
Include Javascript / CSS min version on production and full on dev in ASP .NET Web Forms
<p>Is it possible to achieve a goal specified in the question topic in ASP .NET for instance with existing controls like ScriptManager or any other controls? I'm using ASP .NET Web Forms 3.5.</p>
asp.net
[9]
1,226,868
1,226,869
jQuery: IE8 bug with animated show()?
<p>I was trying out the animated .show(100) of jQuery. The animation works fine in both Firefox and IE8. However, in IE8, the rendered fonts (when animation is used) are thinner than the original font. I retried using .show(), now without the animation, and the rendered text was normal.</p> <p>here's the jQuery code t...
jquery
[5]
5,613,042
5,613,043
Customizing text on Spinner control
<p>I've seen some answers to questions about how to specify a custom layout for a spinner's pop-up list, but what I want to do is to customize the text on the Spinner control itself, such the "setText..." methods that you can call for a Button (TextView subclass).</p> <p>Is there any way to do this? What I'm trying to...
android
[4]
1,615,384
1,615,385
javascript re-define a variable
<p>I'm getting stuck somewhere (as newbies do). Is it ok to re-define a variable once it has been trimmed and tested for content?</p> <pre><code> function setarea() { var dbasedata = document.forms[0]._dbase_name.value; dbasedata = dbasedata.toUpperCase(); dbasedata = dbasedata.repl...
javascript
[3]
3,277,101
3,277,102
"Use of undefined constant" notice, but the constant should be defined
<p>there are three files: common.php, controller.php and user.php. </p> <p>File common.php looks like:</p> <pre><code>&lt;?php define("MAXIMUM_NAME_LENGTH", 50); ?&gt; </code></pre> <p>File controller.php looks like:</p> <pre><code>&lt;?php include("common.php"); include("user.php"); $user = new user(); ?&gt; </cod...
php
[2]
3,992,980
3,992,981
Could not load assembly 64bit machine
<p>I am getting the following error if I try to run the ASP.NET 4.0 website in a 64 bit machine with Enable 32 bit Applications flag set to false. (I have to set that to False, If I set it to true its working fine). <strong>> "Could not load file or assembly 'Common.BL' or one of its dependencies. An attempt was made t...
asp.net
[9]
1,590,074
1,590,075
Get the total of complete column of gridview in asp.net
<p>I am Using asp.net grid view and i have one column in that namely Calories and i want to show whole caloreis total at the top. i used the following code:</p> <pre><code> int count = grdViewSample.Rows.Count; double totCalories = 0; Label lblCalories = new Label(); fo...
asp.net
[9]
2,234,346
2,234,347
C++ From the Compiler's Point of View
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/8833524/what-are-the-stages-of-compilation-of-a-c-program">What are the stages of compilation of a C++ program?</a> </p> </blockquote> <p>I find that understanding how a given software language is compiled can b...
c++
[6]
3,114,445
3,114,446
Looking for values in nested tuple
<p>Say I have:</p> <pre><code>t = ( ('dog', 'Dog'), ('cat', 'Cat'), ('fish', 'Fish'), ) </code></pre> <p>And I need to check if a value is in the first bit of the nested tuple (ie. the lowercase bits). How can I do this? The capitalised values do not matter really, I want to search for a string in only th...
python
[7]
1,331,799
1,331,800
Shape Border In Android
<p>How can I draw a rectangle that have a black border and white background? I don't understand shape tags in xml! Both solid and stroke do same thing? please let me understand.</p>
android
[4]
3,196,263
3,196,264
question about classes
<p>here is code example for add two vectors using classes</p> <pre><code>#include &lt;iostream&gt; using namespace std; class CVector { public: int x,y; CVector () {}; CVector (int,int); CVector operator + (CVector); }; CVector::CVector (int a, int b) { x = a; y = b; } CVector CVector::opera...
c++
[6]
1,185,761
1,185,762
jquery pass text and variable inside .html()
<p>this is probably very easy but I can't figure it out :)</p> <pre><code> $('#myDiv').html('&lt;a onclick="remove_item(variantId);"&gt;Remove&lt;/a&gt;'); </code></pre> <p>variantId is a JS variable so I need to pass it's value in the code above.</p>
jquery
[5]
4,553,528
4,553,529
Cannot find class in same package
<p>I am trying to compile Board.java, which is in the same package (and directory) as Hexagon.java, but I get this error:</p> <pre><code>Board.java:12: cannot find symbol symbol : class Hexagon location: class oadams_atroche.Board private Hexagon[][] tiles; </code></pre> <p>The first few lines of Board.java:</p>...
java
[1]
2,031,533
2,031,534
After screen is off in 5 minutes wifi is disabled.
<p>I have found good tutorial to for Handling Screen OFF and Screen ON Intents: <a href="http://thinkandroid.wordpress.com/2010/01/24/handling-screen-off-and-screen-on-intents/" rel="nofollow">http://thinkandroid.wordpress.com/2010/01/24/handling-screen-off-and-screen-on-intents/</a></p> <p>but i want that after scree...
android
[4]
4,666,439
4,666,440
Jquery input complicated incrimenting mess
<p>I have this input text field that will initially say Answer 1 then if you <code>focus()</code> the text will disappear. If you <code>blur()</code> the text will come back. </p> <pre><code>&lt;input type="button" id="btnAdd" value="Add Answer" /&gt; &lt;div id="formanswer1" style="margin-bottom:4px;" class="cl...
jquery
[5]
5,811,715
5,811,716
How to get data back from webserver with NSMutableURLRequest
<p>I try to build an app for user that enter his data and this data will be post to a webserver for save in a Database. This web server returns some data back like Id or something else. How I can receive the data the webserver returns back? The transfer works already with NSMutableURLRequest. But I search for a solluti...
iphone
[8]
3,243,343
3,243,344
PHP uploading images in the correct dimensions
<p>I know this question is very common but the main point in my question is that i want to know how facebook or some other websites upload their pictures in the correct size. for example. if we upload a picture of the dimension : width : 1000px , height : 20px. then facebook updates the status updates with that pic but...
php
[2]
4,165,139
4,165,140
Working on a project for visually disabled, NEED HELP with android coding!
<p>i'm making an app on android smart phones for the visually impaired and i have inquiries. Now, my app's main menu is already created, and i've used text-to-speech program to read out the menu for the visually impaired. QN: what do i have to do to make it so that when visually impaird personnal press the buttons on t...
android
[4]
1,720,284
1,720,285
How to print a cheque through the receipt printer in Java?
<p>I have <strong>pos58 receipt printer</strong>(printer made in China), this printer supports <strong>ESC-POS Commands</strong>. I want to print out a cheque in Java without JavaPos api. Just I don't know how do this.</p> <p>Is there some way to implement it? Or what the library is? Or are there any examples of that...
java
[1]
5,029,655
5,029,656
Copy Constructor
<p>Im trying to do the copy part of a "deep copy" with my copy constructor:</p> <pre><code>class myClass { public: myClass ( const char *cPtr, const float fValue ) myClass ( const myClass&amp; myClassT ); private: const char* &amp;myAddress; float MyFloater; }; //myClass.cpp myClass::myClass( con...
c++
[6]
730,653
730,654
Having trouble if else statement
<p>For some reason its not getting to the part of line 174 and I don't know why. Any suggestions what the solution could or might be.</p> <p><a href="http://pastebin.com/vFZwmJuc" rel="nofollow">http://pastebin.com/vFZwmJuc</a></p>
php
[2]
5,824,018
5,824,019
Add dynamic Radiobutton into RadioGroup
<pre><code>public class MCQSample extends Activity implements OnClickListener{ TextView title; String gotBread; RadioGroup AnswerRG; int value ; int value1; protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceSta...
android
[4]
3,989,774
3,989,775
Need help with basic function - Python
<p>want to count the number of times a letter appears in a string, having issues here. any help</p> <pre><code>def countLetters(string, character): count = 0 for character in string: if character == character: count = count + 1 print count </code></pre>
python
[7]
4,634,590
4,634,591
Dynamic Linking C++ DLL ... What am I doing wrong?
<p>I've been trying to create a DLL and link the DLL to my program but every time I try my program can't find the function. The DLL loads fine but the function cant be found.</p> <p>Program:</p> <pre><code>#include &lt;iostream&gt; #include &lt;windows.h&gt; using namespace std; typedef void (*HelloPtr)(); int main...
c++
[6]
290,013
290,014
Android - Remove top banner in new application?
<p>Is there a way to remove the banner that appears at the top of my new Android application that has the application name in it? I think I need to do something in the AndroidManifest.xml file, but I'm not sure what to do. </p>
android
[4]