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,592,291
1,592,292
newsgroup client
<p>I hope to develop a newsgroup client reader for iPhone. But I can not find out any technology concern this.</p> <p>Welcome any commnents</p> <p>Thanks</p> <p>interdev</p>
iphone
[8]
2,276,557
2,276,558
How to drag-drop images from one listview to another listview in android
<p>I am preparing app which contains two listview one containing images from sd card ,another listview contains contacts with their default icon ,now i want to drag and drop images from first listview to this another listview of contacts.</p>
android
[4]
3,862,041
3,862,042
Loading gif until image is fully-loaded. Then fade in
<p>I have this set up right now: <a href="http://jsfiddle.net/FMqbP/1/" rel="nofollow">http://jsfiddle.net/FMqbP/1/</a></p> <p>I'd like <a href="http://i.stack.imgur.com/2kQ8m.gif" rel="nofollow">this animation</a> to load until the thumbnail is finished loading and then I'd like the thumbnail to fade in. What would b...
jquery
[5]
2,378,192
2,378,193
Get Cached page ONLY IF apache is down - PHP
<p>I have a requirement to make a page available if apache is down for any reason. The way I thought of it is to make the page "cached" so that it is available always.</p> <p>However I have 2 problems: - I want the page to be always available (may be I can set the cache limit to a very big number) - When I make the pa...
php
[2]
3,186,206
3,186,207
Why are my project's drawables blurry?
<p>For some reason, the drawables in my app are blurry. This is especially apparent in menus when I put built-in system icons side-by-side with icons from my project's res folder.</p> <p><img src="http://i.stack.imgur.com/Gezrp.png" alt="blurry project icon next to crisp system icon"></p> <p>Here's an example. The le...
android
[4]
3,701,446
3,701,447
JavaScript Object Literal notation vs plain functions and performance implications?
<p>Suppose I have functions like:</p> <pre><code>function foo() { } function bar() { } I can write above as Object Literal notation: var Baz = { foo: function() { }, bar: function() { } }; </code></pre> <p>As for as I understand in the later case, an instance of Baz will be created when the script loads re...
javascript
[3]
3,468,894
3,468,895
Problems with multidimension arrays in C++ again
<p>I passed a multidimension array to a function in a reverse call like this:</p> <pre><code>template&lt;int size&gt; void print_multidimension_array(int A[][size], int &amp;cnt){ if(cnt &lt;= 0){ return; } else{ int (*B)[size]; print_multidimension_array(B, cnt--); } } int main(int argc, c...
c++
[6]
4,536,677
4,536,678
Create list of object attributes in python
<p>I have a list of objects:</p> <pre><code>[Object_1, Object_2, Object_3] </code></pre> <p>Each object has an attribute: time:</p> <pre><code>Object_1.time = 20 Object_2.time = 30 Object_3.time = 40 </code></pre> <p>I want to create a list of the time attributes:</p> <pre><code>[20, 30, 40] </code></pre> <p>What...
python
[7]
536,325
536,326
map + parseInt - strange results
<pre><code>console.log("1,2,3".split(",").map(parseInt)) </code></pre> <p>prints</p> <pre><code>[1, NaN, NaN] </code></pre> <p>why?</p> <p>Adding some more unnecessary text here to make this question "meet SO quality standards", whatever that means.</p>
javascript
[3]
525,247
525,248
should i import data from csv directly to database or object
<p>learning the basics of Python, now ready for a bigger challange... it didn't take long to stumble :)</p> <p>I'm writing a basic allocation app that imports rows of "jobs" and then allocates each to a "contractor" based on contract conditions.</p> <p>My first hurdle is, do i import the data directly into the db (us...
python
[7]
4,609,358
4,609,359
Android - restrict access to a view using the pattern lock
<p>I want to restrict access to parts of my Android application using a pattern lock control (just like the builtin Android lock). What is the best way to do this?</p>
android
[4]
938,587
938,588
Unable to resolve target 'Google Inc.:Google APIs:16'
<p>I experience this problem when I added another project from internet. I think it asks me to use another version of target android. But I want that my app will work in android 2.2.</p> <p>But it doesn't require API-8, it requires API-16 and I m not sure what I should do.</p>
android
[4]
2,932,134
2,932,135
IE7 hangs on my site build in asp.net 3.5
<p>Whenever I open a new window with javascript like this:</p> <pre><code>function openwindow(){ window.open(blah blah) } </code></pre> <p>on my masterpage my IE7 browser hangs.The new window is a chatroom page built in ajax controltoolkit and a music playlist for a user to listen to his/her created playlist.The prob...
javascript
[3]
4,053,816
4,053,817
Check if string contains character not on list
<p>For example, I have an approved list of characters: "a", "b", and "c".</p> <p>So if I had the string:</p> <pre><code>var string = "aaabc8abccc"; </code></pre> <p>I would like the script to detect the fact that the "8" is not "a", "b", or "c" and output:</p> <pre><code>var output = "aaabc&lt;span style='color:red...
javascript
[3]
3,486,896
3,486,897
Create a 5 cent variance + - in bigdecimal comparison
<p>We are calculating totals from percentages that must match up to the original total. However do to floating points, the the totals never match. </p> <p>Example. </p> <p>Total percentage is calculated from 327.81</p> <p>Example of non rounded amounts</p> <pre><code>30% 98.343 20% 65.562 30% 98.343 20%...
java
[1]
3,504,901
3,504,902
Central Management of Javascript
<p>How do you manage Javascript content on a larger website? I'm especially struggling with various $(document).ready()'s and the fact that I need to juggle all those id ($('#id')) strings. I thought of combining the necessary $(document).ready() with each "module" that uses them but this results in visible speed degra...
javascript
[3]
2,025,337
2,025,338
Check if jquery library exist
<p>How to check if jQuery library exist in head tags?</p> <pre><code>&lt;head&gt; &lt;script type="javascript/text" src="http://code.jquery.com/jquery-1.6.2.js"&gt;&lt;/script&gt; &lt;/head&gt; </code></pre> <p>and if not exist how do I load in head tags the jquery library, I'm doing a plugins and I want to load my p...
jquery
[5]
750,054
750,055
How to check position with respect to lat and long
<p>If I have a lat and long of a particular place, how can I check that the place is in a particular state.</p> <p>For Example: If lat and long refer to Santa Clara, how can I check that it is in California?</p> <p>Thanks</p>
android
[4]
4,036,718
4,036,719
How to specify path relative to site root?
<p>i want to specify a path to a file relative to the root of the web-site. e.g.</p> <pre><code>&lt;script type="text/javascript" src="/Scripts/jquery-1.7.2.min.js"&gt;&lt;/script&gt; </code></pre> <p>In ASP.net that causes problems because the <em>"root"</em> of the <strong>site</strong> can be different from the ro...
asp.net
[9]
5,817,923
5,817,924
what is mean by this "$books = $this->model->getBookList();" $this with two -> -> means
<p>i am reading MVC. i found this "$books = $this->model->getBookList();" $this with two -> -> means what is mean by this</p>
php
[2]
4,639,925
4,639,926
how to highlight new record on listbox?
<p>I am a newbie i using asp.net, I have a problem on how to automatically highlight the new added record on the listbox can anyone help me to solve this matter thanks in advance:)</p> <pre><code> Dim cmd As New SqlCommand cmd.CommandText = "INSERT INTO CategoryTable (CategoryID, SupplierName,ProductCategory) ...
asp.net
[9]
4,658,150
4,658,151
What does {0} mean in String.Format?
<p>I.e. in the following example</p> <pre><code>string commandText = string.Format(“Select * from {0}”, filename); </code></pre> <p>How does the above work ?</p>
c#
[0]
2,567,722
2,567,723
Don’t Checked and Unchecked establish an overflow context only during runtime?
<pre><code>int int1; byte byte1; unchecked { int1 = 2147483647 + 10; //ok byte1 = 200+100; //error } </code></pre> <p>1)Only difference between <code>int1</code> and <code>byte1</code> overflows is that the latter happened during narrowing conversion attempt, but the end result ( overflowing ) is the same, so...
c#
[0]
847,626
847,627
How does Response.IsClientConnected work under the covers?
<p>How does Response.IsClientConnected work under the covers?</p>
asp.net
[9]
4,297,243
4,297,244
trouble getting python up and running
<p>I'm a newcomer to python. I just downloaded the 2.x version and am trying to write a simple 'Hello world' program in an editor, and run it in the interpreter. This is my code (what i have in IDLE):</p> <pre><code>#!C:\Python27\python.exe #Filename: helloworld.py print('Hello World') </code></pre> <p>This is what ...
python
[7]
4,084,106
4,084,107
Assistance required for scanning the .mp3 files in sdcard
<p>I have been trying to make a music player application,and as I have just started android, Could any one tell me how can I accces the music files in my sdcard, I have given the location of the sdcard as "\sdcard\" in my String variable MEDIA_PATH ,but what after that? How should the system access the music files put ...
android
[4]
2,066,767
2,066,768
Adding duplicate data with same primary key in datatable
<p>I have a datatable which consist of duplicate data. Now, I want to add those record then how should I do. </p> <p>Can anyone help me or provide me any sample program for that.</p> <p>Thanks.</p>
c#
[0]
99,890
99,891
How to detect iPhone OS version using macros
<p>I would like to detect iPhone OS version in my app. I have tried using detection code but was advised to use macros. Does someone experience, can you post sample code, and what library to use.</p>
iphone
[8]
1,059,692
1,059,693
Java is pure object oriented or not?
<p>I want to know that Java is pure object oriented or not. please explain it with example, i have goggled it but not find the exact solution.</p>
java
[1]
3,249,915
3,249,916
How to get the highlighted text on any windows applications (word, sharepoint portal, web browser)
<p>I am developing an c# application.</p> <p>Whenever my window gets activated, I want to get the highlighted/selected text on any windows applications (like word, excel, sharepoint portal, web browser, etc.,).</p> <p>How to do this with C#?</p> <p>I will really appreciate if someone comes up with a small sample ins...
c#
[0]
580,101
580,102
jquery mutually get value of exclusive checkbox
<p>Hi I need a sample code to get the value of selected checkbox. The checkboxes are mutually exclusive and I would like to get the selected checkbox value on the click of a button Thanks</p>
jquery
[5]
3,032,340
3,032,341
Why does the Soft Keyboard appear?
<p>I'm using the Android emulator to test my first Android application. While there is a functioning hard keyboard at the right side of the emulator window, the soft keyboard shows up when editing in an <code>EditText</code> control.</p> <p>I'm aware of the option to hide the soft keyboard by using an instance of <cod...
android
[4]
672,959
672,960
jQuery animations on a mobile device
<p>I'm running some jQuery animations on a mobile device. The animations are laggy and jerky. Is there anything that can be done to improve this? </p>
jquery
[5]
157,119
157,120
How can i get the list of available arguments for a php function
<p>is there a way to get the available arguments for a php function?</p> <p>Example: I want to call function1($arg1, $arg2=null)</p> <p>How can i find out a priori, before i call the function, the number of arguments this function takes, and if it's possible what arguments.</p> <p>As you can clearly see i am dynami...
php
[2]
3,840,237
3,840,238
c# avoiding variable declaration
<p>Suppose I have some code like this:</p> <pre><code>public string SomeMethod(int Parameter) { string TheString = ""; TheString = SomeOtherMethod(Parameter); return TheString; } </code></pre> <p>Of course, this code is equivalent to this:</p> <pre><code>public string SomeMethod(int Parameter) { return Som...
c#
[0]
2,682,070
2,682,071
Why does const imply internal linkage in C++, when it doesn't in C?
<p>See subject. What were they thinking?</p> <p>UPDATE: Changed from "static" to "internal linkage" to save confusion.</p> <p>To give an example... Putting the following in a file:</p> <pre><code>const int var_a = 1; int var_b = 1; </code></pre> <p>...and compiling with <code>g++ -c test.cpp</code> only exports <co...
c++
[6]
26,801
26,802
How to center an ImageView in a LinearLayout?
<p>The following XML code doesn't work to center an ImageView in a LinearLayout:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"&gt; &lt;ImageView...
android
[4]
3,593,215
3,593,216
how to find code for model no of iphone
<p>model no of iphone through code</p>
iphone
[8]
3,112,736
3,112,737
How to use basic_istream when you have a std::string
<p>I have a function that uses basic_istream as an argument, and I have a std::string with the data I need to pass it. How do I do that?</p>
c++
[6]
4,057,084
4,057,085
How to remove particular element from an array
<p>I have an array like <code>treeids = ['a','b','c','d'];</code> I want to remove the 'b' element. By Using index we can do, but i want this with out using index, because those values comes dynamically into this array. Just remove with the name only. It should support in IE7 browser. How to do this.</p> <p>Thanks</p>...
javascript
[3]
791,274
791,275
How to change the button in UIActionsheet
<p>I have a UIActionsheet. I need to change the colour of the buttons in it.</p> <pre><code>-(IBAction)showActionSheet:(id)sender { UIActionSheet *popupQuery = [[UIActionSheet alloc] initWithTitle:@"Title" delegate:self cancelButtonTitle:@"Cancel Button" destructiveButtonTitle:@"Destructive Button" otherButtonTit...
iphone
[8]
1,220,974
1,220,975
Function (callable) objects with inherited properties
<p>Is there any way to create a function/callable object that inherits properties from another object? This is possible with <code>__proto__</code> but that property is deprecated/non-standard. Is there a standards compliant way to do this?</p> <pre><code>/* A constructor for the object that will host the inheritable ...
javascript
[3]
316,126
316,127
Error using simple decorator in Python
<pre><code>def simple_decorator(f): def tmp(*args, **kwargs): res = f(*args, **kwargs) return res return tmp @simple_decorator class FirstClass(): pass @simple_decorator class SecondClass(FirstClass): pass </code></pre> <p>I have error:</p> <pre><code>File "1.py", line 16, in &lt;mo...
python
[7]
3,138,750
3,138,751
Defining as constants in Java
<pre><code>list.loadRequestParms(request, 'a', 20); </code></pre> <p>This method takes three parameters</p> <ol> <li>a request object.</li> <li>a char</li> <li>an integer</li> </ol> <p>Now how to define these as constants somewhere and use it in this method.</p>
java
[1]
534,185
534,186
How do I display PHP code instead of displaying output?
<p>I have a string variable which also has some PHP code in it. The code in the string var is getting run whenever I am displaying the string with echo. Is there anything (function) which can escape the meaning of PHP code while I use it with string?</p> <p>Please help?</p>
php
[2]
1,324,455
1,324,456
Android get running service machine/server datetime
<p>How to get the server date time.Android App is going access webservice.I want to know how to get the server time.Here I want to pass.Currently I did i got android time.....</p> <pre><code> // ksoap2 calling wcf public SoapPrimitive soapPrimitiveData(String tablename) throws IOException,XmlPullParserException { ...
android
[4]
2,650,937
2,650,938
How to determine if a number is odd in JavaScript
<p>Can anyone point me to some code to determine if a number in JavaScript is even or odd?</p>
javascript
[3]
3,072,019
3,072,020
Understanding GUI in Android
<p>I want to know that how to develop application that can run in all android devices . I have tried to do it but I am facing problem for various devices i.e. i found different GUI in various devices .. How can i do same GUI for all verion of android and for all screen resolution and density ??? Is there any help ??</p...
android
[4]
5,000,667
5,000,668
SELECT value in Javascript
<p>I have this SELECT element which i want to update the current url to URL&amp;number=VALUE of selected item.</p> <p>However, i can't figure how to catch the value.</p> <pre><code>&lt;select name="prside" onchange="document.location.href = document.location.href + '&amp;number=' + VALUE&gt; &lt;option&gt;Annonce...
javascript
[3]
5,699,875
5,699,876
Third Party Custom Components
<p>As I am new to Android development, I did find the section for custom components. What I am interested in is to create custom components and make them available to other developers. Is there an article or information that covers the creation &amp; deployment of third party components for Android?</p> <p>Example:<...
android
[4]
1,970,181
1,970,182
Protect user's information in the referral URL
<p>I decided to refresh my site today with a pair of upgrades. One of them is referring availability. So, as I method of referrer recognition, I am going to use special URL with referrer ID in it (if there is some other but better method, feel free to let me know about it). After I implemented the basics of that availa...
php
[2]
2,627,372
2,627,373
How to handle different screen resolutions on Android?
<p>Nexus 10 holds 2500*1600 resolution whereas the previous neighbor in the same density family holds 1024*800 - ** DOUBLE **</p> <p>My concern is completely on images, I already hold images of x*x px, If I use the same image in Nexus - it stretches ?</p> <p>How to handle these type of resolutions ?</p>
android
[4]
3,878,289
3,878,290
Is it OK to program a method body inside of an event?
<p>I recently saw some code from a college teacher where he had something like this:</p> <pre><code>public void Button1_Click(blabla) { //His code was here. } </code></pre> <p>Isn't it considered better programming practice to call a method to do the dirty work, that way if the method changes you only have to chan...
c#
[0]
3,281,406
3,281,407
Get class name using jQuery
<p>I want to get the class name using jQuery</p> <p>And if it has an id <code>&lt;div class="myclass"&gt;&lt;/div&gt;</code></p>
jquery
[5]
491,889
491,890
parse tab delimited file on Mac and PC
<p>I haven't done much scripting before. I took a Javascript class once, but that was mainly for form validation. I have a tab-delimited file that I want to parse, just taking certain columns I need, not all of them. I was wondering if there is a good common language to do this in that would work on both the PC or M...
javascript
[3]
1,787,412
1,787,413
Java Label Reset
<pre><code>for (int i = 0; i &lt; 5; i++) { for (int j = 0; j &lt; 5; j++) { theSquare = letterTiles[i][j]; if( (mouseX &gt;= theSquare.getX()) &amp;&amp; (mouseX &lt;= (theSquare.getX() + theSquare.getSize())) &amp;&amp; (mouseY &gt;= theSquare.getY()) &a...
java
[1]
3,461,078
3,461,079
tricky folder structure problem
<p>This is my current folder structure, and i need to get the absolute path to the root folder</p> <pre><code>- root/ ----- api.py ----- programexecutablefolder/ --------- mainentry.py </code></pre> <p>The program has to start at mainentry.py, however I need to get the path of the root folder from api.py (though the ...
python
[7]
4,803,871
4,803,872
How can I implement Push method in a C# desktop application?
<p>I have my software(.NET) running on clients. I need to push the updates to the clients whenever available.</p> <p>I thought to implement a web service which is running on the main server which broadcasts the update notifications to the client. For dat, CLient has to register their identity over the web to the serv...
c#
[0]
2,873,633
2,873,634
How Can I get the string that present the variable in function argument?
<p>How Can I get the string that present the variable in function argument?</p> <p>example </p> <pre><code>function dbg($param){ return "param"; } $var="Hello World"; echo dgb($var); </code></pre> <p>output: <code>var</code></p> <pre><code> $arr=array(); echo dgb($arr); </code></pre> <p>output: <code>a...
php
[2]
2,383,160
2,383,161
Check if a file is archive (zip or rar) using php
<p>How can i check if a file is archived (zip or rar) without knowing the extension. I need to find it using php.</p> <p>I cannot use Fileinfo because its not installed and installation of any other packages on the server its out of the question.</p> <p>UPDATE:</p> <p>Zip module its not installed and i cannot instal...
php
[2]
4,772,732
4,772,733
Java - Character replacement in a string
<p>I'm having some troubles the replacement of a character in a string. The code works perfectly fine for the removal of hyphens an periods, however for the letter 'e' it removes the 'e' in "test", and it also converts the three 'e's at the end of the string. Does anyone know why this is happening?</p> <pre><code> ...
java
[1]
3,230,567
3,230,568
jQuery child selector: only select top level child elements
<p>I have a multi level unordered list (<code>ul</code>, <code>li</code>):</p> <pre><code>&lt;ul class="onlyme"&gt; &lt;li&gt;one&lt;/li&gt; &lt;li&gt;two&lt;/li&gt; &lt;li&gt; &lt;ul&gt; &lt;li&gt;aaa&lt;/li&gt; &lt;li&gt;bbb&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &...
jquery
[5]
1,429,089
1,429,090
Please wait page on submit Click
<p>I want to redirect my page to wait page on click of submit button till transaction is getting processed.please help me with the code. I m using C# language.</p>
asp.net
[9]
5,647,980
5,647,981
Why can't I validate values with the $ symbol in it?
<p>I am using a CompareValidator to check user input on one of my forms but for some reason it will not allow me to enter a dollar sign.</p> <p><a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.comparevalidator.aspx" rel="nofollow">According to MSDN</a> the currency data type in the compare va...
asp.net
[9]
5,460,829
5,460,830
Android - Installing apk from SD cord
<p>I'm distributing my android application (apk) along with some encrypted audio files in SD card. After installing the apk on the android phone, i want the apk to be deleted automatically. Actually I dont want the apk to be copied by others. Is there any solution such that apk cant be installed or copied by others?</p...
android
[4]
4,151,503
4,151,504
Spinner control not showing the selected text
<p>i have an android application in which i have a couple of spinner controls. The default nature of the spinner control is such that the it displays the text that you select from the adapter you have connected it.</p> <p>In all the other phones the spinner controls are behaving the above mentioned way. But on the mo...
android
[4]
1,693,800
1,693,801
Interface to versioned dictionary
<p>I have an versioned document store which I want to access through an dict like interface. Common usage is to access the latest revision (get, set, del), but one should be able to access specific revisions too (keys are always str/unicode or int).</p> <pre><code>from UserDict import DictMixin class VDict(DictMixin):...
python
[7]
760,808
760,809
how to check if a window feature is set in Android 2.x
<p>I want to check if a feature is set. I can use <a href="http://developer.android.com/reference/android/view/Window.html#hasFeature%28int%29" rel="nofollow">hasFeature</a> , but it's for API 11 and above, and what's confusing me is <a href="http://developer.android.com/reference/android/view/Window.html#getFeatures%2...
android
[4]
4,287,433
4,287,434
How do I recieve byteArray sent from a Server and read 4 single bytes at a time
<p>I need to receive 320 bytes of data from a server which consist of 80 4 byte int fields. How do I receive them in bytes of 4 and display their respective int values? Thanks. Not sure if this is right for the receiving part:</p> <pre><code>//for reading the data from the socket BufferedInputStream bufferinput=new ...
java
[1]
5,380,279
5,380,280
Using a div for input validation with Jquery
<p>I am looking to display my input validation in a div instead of an alert. I currently have </p> <pre><code>//check for COGs to be a number if (isNaN($("#txtCOGs").val())) { alert("The Cost of Goods Sold must be a number"); $("#txtCOGs").focus(); return false; } </...
jquery
[5]
2,243,984
2,243,985
std::string gives compiler warning in Visual Studio 2010
<p>I am migrating my Visual Studio 2005 C++ code to Visual Studio 2010. Unfortunately I am getting error on std::string on VS2010 whereas in VS2005 I never had this error before.</p> <p>Here is the code sample</p> <pre><code>#include&lt;string&gt; typedef std::string String class __declspec(dllexport) SomeClass { p...
c++
[6]
5,564,553
5,564,554
Confusing change of scope - what's going on?
<pre><code>def Test(value): def innerFunc(): print value innerFunc() def TestWithAssignment(value): def innerFunc(): print value value = "Changed value" innerFunc() Test("Hello 1") # Prints "Hello 1" TestWithAssignment("Hello 2") # Throws UnboundLocalError: local variable 'val...
python
[7]
1,932,705
1,932,706
Low Battery Alert in Android?
<p>I want to generate a low battery alert programmatically, same as that will be generated when battery is low..can any one post a sample code how to do it..am aware of ACTION_BATTERY_LOW. but how to use it..? i want to generate a low battery alert even though battery is not low.</p>
android
[4]
2,664,726
2,664,727
Reading comma separated values from a .txt file
<p>I have a .txt file that looks a little something like this:</p> <pre><code>2013-05-15,07:34:07,2378,12,0 2013-05-15,07:32:07,2282,32,0 2013-05-15,07:31:07,3322,22,0 </code></pre> <p>and so on...</p> <p>I've been trying to read this file (PHP) display the data in a table. Each line is in a separate row. Each val...
php
[2]
209,870
209,871
playing piano tones using C#
<p>i'm trying to make a simple piano application in C# i't supposed to be a very simple piano 5 or 6 keys maximum i've found different alternatives the alternatives i've found till now is : </p> <ul> <li>consol.beep (); but i feel it's sound is not like the tone of the piano </li> <li>saving and playing WAV files ...
c#
[0]
3,902,415
3,902,416
Writing HTML Form values in pdf file using PHP
<pre><code>&lt;form&gt; Last Name &lt;input name="lastname" type="text"/&gt;&lt;br/&gt; First Name &lt;input name="firstname" type="text"/&gt;&lt;br/&gt; Middle Name &lt;input name="middlename" type="text"/&gt;&lt;br/&gt; &lt;/form&gt; </code></pre> <p><strong>How do I write all this html form values in following pdf...
php
[2]
2,309,054
2,309,055
Multiview in javascript
<p>I Have 3 views in my multiview control. I want to change the activeviewindex of the multiview on client side using javascript. I cant do it. Help will be appreciated. my code is:</p> <pre><code>&lt;asp:Panel runat="server" ID="multiviewContainer" CssClass="multiviewContainer"&gt; &lt;asp:MultiView ID="MultiView...
asp.net
[9]
2,600,257
2,600,258
return before finally in java
<p>In this case, does "myMethod()" get executed before or after "doSomething()"?</p> <pre><code>public class Foo { public void fooMethod() { Bar bar = new Bar(); bar.barMethod().myMethod(); } } public class Bar { public SomeClass barMethod() { try { return new SomeClass...
java
[1]
3,631,701
3,631,702
Why is my launcher icon smaller when placed on the Android desktop?
<p>I have an application built for 1.5 and I am adding higher resolution drawables to support hdpi devices in 1.6 and above.</p> <p>My original application icon is 48x48. I created a second launcher icon that is 72x72 and placed it in a res/drawable-hdpi/ directory. </p> <p>When I install the application on my Nexu...
android
[4]
2,187,899
2,187,900
Use same voice recognition that the keyboard
<p>I want to use the same voice recognition that use the microphone of the keyboard of android. If you call a intent of voice recognition when you stop to talk the intent finish.</p> <p>But the voice recognition of the keyboard still waiting your phrases until you click in the button.</p> <p>How can use this voice re...
android
[4]
2,866,983
2,866,984
How do I add transition effects to table rows with jQuery
<p>The following jQuery code swaps table rows when some buttons are clicked. I would like to know how to add a transition effect so that there's a fade-in or fade-out transition effect when a row is moved (instead of the change happening instantaneously). I'm not sure where or how to apply the transition!</p> <pre><co...
jquery
[5]
2,750,249
2,750,250
Including files using relative paths with PHP?
<p>When developing my website I called all the includes in my php files by calling one single file called includes.</p> <p>The code of this file looked somethig like this: (I adapted it from a Lynda tutorial)</p> <pre><code>defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR); defined('SITE_ROOT') ? null : d...
php
[2]
3,892,830
3,892,831
Present iPhone application to the Board
<p>We have a new app for the iPhone which is to be presented to the Board. I am asking if anyone has any ideas for the most effective way to present using the actual device.</p> <p>In reality the device is the most impractical platform to present with to a large room, but in this case it will be required. So if S.Jobs...
iphone
[8]
846,520
846,521
Is it possible to reuse a connection when accessing multiple tables in C#?
<p>I am new to C#. I have a program which reads multiple tables in single database. Suppose if i am reading table A so before reading this I have to connect to database in C#. after this I have to fetch some information from table B. Do I have to give the server info, userid and password again to connect to database?</...
c#
[0]
3,163,500
3,163,501
php constructor not getting called? or something?
<p>When TestPage.php is run in browser, 'trying to create new obj...' is echo'd, but nothing else. Is the constructor not getting called?</p> <p>This isn't the full code for either class, but hopefully it's enough for someone to tell me where I'm going wrong...</p> <p>TestPage.php</p> <pre><code>&lt;!DOCTYPE html&gt...
php
[2]
5,041,301
5,041,302
URLstring class for iPhone
<p>I am using the NSURL class in the iPhone framework foundation library to create a url request to a server. For some reason, I am getting back a nil for only this particular URL. I don't understand why. Any reason?</p> <p>The Objective C code is :</p> <p>NSURL *scriptURL= [NSURL URLWithString:scriptURLString];</p> ...
iphone
[8]
4,243,309
4,243,310
Incorrect work of the method StringBufferInputStream.read in DalvikVM
<pre><code>byte[] buf=new byte[5]; StringBufferInputStream sbis=new StringBufferInputStream("5"); int c=-2; c=sbis.read(buf, 0, 5); c=sbis.read(buf, 1, 4); </code></pre> <p>As a result, c == 0 but it should be c == -1</p> <p>I tried StringBufferInputStream of openjdk-6-src-b24-14_nov_2011 and the error disappeared.<...
android
[4]
103,939
103,940
Apple Push Notification Service
<p>For,Apple Push Notification Service </p> <p>Is it Possible register a device at run time if it is not registered????????</p>
iphone
[8]
4,123,193
4,123,194
pass 2 text box
<p>I'm new to javascript and I am trying to pass 2 textbox values into a function and update a third text box with the result. I have tried using this:</p> <pre><code> function setamount(input1,input2,input3) { alert(input1); var amnt1=parseInt(document.getElementById(input1).value); var amn...
javascript
[3]
5,574,198
5,574,199
Vertical swipe in ViewPager
<p>I use ViewPager with PagerAdapter. Is it possible to implement vertical swipe in Android, where you can scroll between views from top to down and from down to top? I need identical behavior that ViewPager does by default, but in vertical way. I found method canScrollVertically() but it's not what I am looking for I ...
android
[4]
3,249,464
3,249,465
Making Request to a Web API in c#
<p>I have an application to send sms. we have purchased a sms api and they have given links to request. Now my question is how to request this links in c# and get back the result.</p>
c#
[0]
1,779,777
1,779,778
C# string syntax error
<p>I'm reading in data from a file and trying to write only the word immediately before 'back' in red text. For some reason it is displaying the word and then the word again backwords. Please help. Thank you.</p> <pre><code>private void Form1_Load(object sender, EventArgs e) { Regex r = new Regex("...
c#
[0]
3,198,004
3,198,005
select odd with several tables on the site?
<p><strong>EDIT</strong><br /> Hi. I got 1 page(html) where I got a couple of tables. I want so within each table every odd row got a class. My problem is it only take the first table and go on with the odd on to the others to, when it just suppose to do that with in that one table, stop, start over with the next table...
jquery
[5]
4,485,575
4,485,576
c# Error 2 Argument 1: cannot convert from 'string[]' to 'string' 40 37 emailsearch
<p>How can I show the EmailsList</p> <p>Error 1 The best overloaded method match for 'System.Windows.Forms.MessageBox.Show(string)' has some invalid arguments C:\Users\วิน7\documents\visual studio 2010\Projects\emailsearch\emailsearch\Form1.cs 40 21 emailsearch</p> <pre><code> if (!string.IsNullO...
c#
[0]
3,493,248
3,493,249
jQuery, finding controls within HTML template
<p>I'm using an html template:</p> <pre><code>&lt;script id="locationTemplate" type="application/template" &gt; &lt;p&gt; &lt;input id="searchText" type="text" /&gt; &lt;input id="searchlocation" type="submit" value="Search" /&gt; &lt;/p&gt; &lt;p&gt; &lt;label&gt;Location Name&lt...
jquery
[5]
3,247,426
3,247,427
How do I check a DOM value is not empty and then copy it in another place in DOM tree
<p>I have a structure like this:</p> <pre><code>&lt;div class="destination"&gt;--here needs to copy the value of destination--&lt;/div&gt; &lt;div class="block-inner clearfix"&gt; &lt;div class="contextual-links-wrapper"&gt; &lt;div class="content"&gt; $ 300 &lt;/div&gt; &lt;/div&gt; </code></pre> <p>I just want to ...
jquery
[5]
711,933
711,934
Ubuntu:C++::Boost library upgrade
<p>After installing Boost library using Synaptic Package Manager, the version installed is <code>1.42</code>.</p> <p>If I check on boost official website, the current version is: <code>1.45</code>.</p> <p>How can I upgrade to 1.45 from Synaptic package manager?</p> <p>Thanks in advance.</p>
c++
[6]
4,890,309
4,890,310
Scalar value as an array?
<p>I am getting the following error:</p> <blockquote> <p>Cannot use a scalar value as an array</p> </blockquote> <p>And it's referring to this block of code</p> <pre><code>$q = $database-&gt;rankingPage($g, $f, $t); while($row=mysql_fetch_assoc($q)){ $u[]=$row['username']; $p[]=$row['points']; ...
php
[2]
2,348,048
2,348,049
java-construct Set from 2D Integer array and back Set to 2D Integer array
<p>I have converted 2D Integer array[n][3] into LinkedHashSet (for removing duplicates in row) using following code.</p> <pre><code> final Set&lt;Set&lt;Integer&gt;&gt; r = new LinkedHashSet&lt;Set&lt;Integer&gt;&gt;(); for(Integer[] row:orderedpair3k) r.add(new LinkedHashSet&lt;Integer&gt;(Arrays.asList(row)));...
java
[1]
508,617
508,618
Full Screen ImageButton
<p>I trying to create a full screen Imagebutton. But i kept getting grey border ard it.</p> <pre><code>&lt;ImageButton android:id="@+id/StartButton" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/startscreen" /&gt; </code></pre> <p...
android
[4]