Unnamed: 0
int64
65
6.03M
Id
int64
66
6.03M
Title
stringlengths
10
191
input
stringlengths
23
4.18k
output
stringclasses
10 values
Tag_Number
stringclasses
10 values
2,507,281
2,507,282
How to set focus on a TextView when an Activity starts?
<p>There are an EditText and a TextView in my Activity. I want to set focus on the TextView when the Activity starts. I used the following code:</p> <pre><code> TextView myTextView = (TextView) findViewById(R.id.my_text_vew); myTextView.setFocusable(true); myTextView.setOnClickListener(this); myTextView...
android
[4]
3,921,622
3,921,623
creating an array whose key and value is defined
<p>This code below basically will count the number of occurrences of a word inside an array.</p> <p>What I would like to happen now though, is to get <code>$word</code>, assign it as a key to an array, and assign <code>$WordCount[$word]</code> to be its value. So for example, if I get, a word "jump", it will be automa...
php
[2]
3,951,515
3,951,516
How do I make a simple calculator using switch-statements?
<p>I'm new to PHP and need some assistance.</p> <p>I am learning switch statements and this is where I am stuck. How do I use a switch statement to code a simply calculator that adds, subtracts, multiplies and divides two numbers entered? The switch statement should echo the result back to the user.</p>
php
[2]
2,714,495
2,714,496
Thread handling problem in Android Junit Test Case
<p>I am implementing a testcase in Android Juint. I am facing problem in handling threads. After the successful running of a test case, it will not wait for child thread to be finished. e.g. If one testcase call some services in server. testcase will successfully send request to a server, but it will not wait for a res...
android
[4]
3,991,664
3,991,665
How to test localized string on simulator?
<p>I am using NSLocalizedString(); function for my localized strings. Even though i change my preferred language in simulator settings my string still get shown up in English.</p> <p>Can we test the NSLocalizedString(); from simulator? if so how?</p> <p>Can any one guide me through this please?</p> <p>-- Regards,</p...
iphone
[8]
4,178,292
4,178,293
Dynamically changing onscreen keyboard layout in android
<p>I would like to build a custom keyboard layout for a messenger app I am working on which is localized within the app. I currently noticed that keyboard settings could be selected from the settings to displayed preferred layout choice e.g english,chinese, french. My goal is to (1) Dynamically assign keyboard layout ...
android
[4]
487,190
487,191
iPhone: Is it possible to put a link in Push-Notifications?
<p>Is it possible to put a link in Push-Notifications message? I wish to send video link as notification. </p>
iphone
[8]
4,914,331
4,914,332
ASP.Net: Get page url from inside a frame
<p>How can I get the top page URL from inside a frame?</p> <p>(in javascript it's implemented using : window.top.location)</p>
asp.net
[9]
2,061,981
2,061,982
java update properties file run time
<p>i am writing standalone java app for production monitoring. once it starts running the api is configured for default values which is set in .properties file. in running state the api's configuration can be changed and the .properties file should be updated accordingly. is there a way to achieve this ? or are there a...
java
[1]
5,342,174
5,342,175
android: How to insert a bottom aligned view without layout.xml?
<p>I want to insert views dynamically by using addView method, like this.</p> <pre><code>TextView view = new TextView(this); view.setText("foo"); ViewGroup parentView = (ViewGroup) findViewById(R.id.main_layout); parentView.addView(view); </code></pre> <p>How can I align bottom the inserted view?</p>
android
[4]
3,985,410
3,985,411
How to reuse Activities? Not to create activity each time
<p>This topic is continue of this: <a href="http://stackoverflow.com/questions/7674477/">Android. How to start activity without creating new one?</a></p> <p>I have read that activities are destroyed when to click BACK button. They can be not destroyed when to move deeper to stack and then call activities back. using <...
android
[4]
739,885
739,886
email queueing with c#
<p>not sure it is possible but I am looking for a solution that will queue email messages. </p> <p>Is there any way to write some sort of web app that will run and send certain amounts of emails to email server for delivery even after I submit my message and close webpage. May be some sort of daemon?</p>
c#
[0]
46,837
46,838
in ios how to create geo location based alarm?
<p>I want to create an alarm that will remind me based on any particular place. whenever I reached that place the alarm should start beeping.</p> <p>Please help someone I tried to search over internet but still not get</p>
iphone
[8]
5,036,829
5,036,830
hide show div (but display first 200px)
<p>I am using some code from a fiddle made by a member of StackOverflow. To hide show divs on click.</p> <p>My issue is I wish to extend this , I will explain.</p> <p>I have content loading from database, which lets say is approx 500px in height. But On page load, I only want to show the first 200px height of this co...
jquery
[5]
2,461,568
2,461,569
loading pictures from folder
<p>hi how I can load a picture from spaciefied folder tnx in advanced</p>
c#
[0]
1,940,102
1,940,103
showing images moving using java script
<p>i want to Create new page named “MySlidShow.htm”, and put link to in PhotoGallary page. The slide show page has four links (previous, Start SlideShow, End Slide Show, Next). When user put the mouse over an image show this image description and date taken below it and pause the slide show if it is running, and when t...
javascript
[3]
2,313,732
2,313,733
How do I add code automatically to a derived function in C++
<p>I have code that's meant to manage operations on both a networked client and a server, since there is significant overlap between the two. However, there are a few functions here and there that are meant to be exclusively called by the client or server, and accidentally calling a client function on the server (or vi...
c++
[6]
4,130,287
4,130,288
Android Single Process Level Service
<p>Here's the scenario:</p> <p>I have a service that I want to start at device boot time. </p> <p>The service will listen for multicast packets and send notifications to the user.</p> <p>In order for the service to start running on system boot, I need to define a receiver listening for an intent contaning the follo...
android
[4]
2,576,855
2,576,856
Did button actually click?
<p>I have some javascript that ends up programatically clicking on a button:</p> <pre><code> document.getElementById("myButton").click(); </code></pre> <p>This in turn results in the form being submitted using a function call:</p> <pre><code> &lt;form onsubmit="submit_this_form(this);return false;" action="" metho...
javascript
[3]
2,536,744
2,536,745
Passing an empty array as default value of an optional parameter
<p>How does one define a function that takes an optional array with an empty array as default?</p> <pre><code>public void DoSomething(int index, ushort[] array = new ushort[] {}, bool thirdParam = true) </code></pre> <p>results in:</p> <p>Default parameter value for 'array' must be a compile-time constant.</p>
c#
[0]
5,398,799
5,398,800
Remove item in a Python kiwi objectlist
<p>I have an generic example from kiwi framework, my question is: How can I remove only a item from kiwi objectlist.</p> <p>Thanks for the time!</p> <pre><code>import gtk from kiwi.ui.objectlist import Column, ObjectList class Fruit: def __init__(self, name, cost): self.name = name self.cost = c...
python
[7]
5,053,057
5,053,058
Python Relative import does not work from command line gives ValueError
<p>My Directory structure is as follows</p> <pre><code>microblog/__init__.py urls.py views.py wsgi.py settings/__init__.py testing.py base.py local.py </code></pre> <p>In testing.py I have a relative import </p> <pre><code>from .b...
python
[7]
3,214,947
3,214,948
Reading data using tn.read_all() in python
<p>read_all()" to read data from a cisco device. some time it reads the data and sometime it won't read and gives empty string. I tried below 2 commands but still it's not consitently reading data.</p> <pre><code>data=tn.read_until("exit") data= tn.read_all() </code></pre> <p>please give some inputs i am new to pytho...
python
[7]
4,460,114
4,460,115
Accesing variable declared without a name (just new keyword)
<p>I have a DataSet named dS in which i want to load XML.</p> <p>So i would use the function <code>dS.ReadXml();</code></p> <p>The paramter for <code>ReadXml</code> function is <code>XmlTextReader</code> Object.</p> <p>If i pass object as </p> <pre><code>ds.ReadXml(new XmlTextReader(Application.StartupPath + "\\My...
c#
[0]
5,827,413
5,827,414
Javascript Simple Calculation giving NAN or 0
<p>Can anyone work out why this does not work. Produces NAN and if reset for a Number(document on var inputs produces 0. The script is supposed to add up an indefinite number of fields starting with an ID of product_total_price_PRI_ ... .</p> <p>Obviously I've missed something and have got a headache from trying to se...
javascript
[3]
3,878,329
3,878,330
error in exporting textbox text to excel sheet
<p>I'm trying to export some values in textboxes to several columns (Date, Temperature) in an excel sheet (.xlsx file). But it generates an error called "the INSERT INTO statement contains the following unknown field name: 'Temperature'". And when i remove the Temperature column from INSERT INTO statement, it works. Pl...
c#
[0]
2,515,818
2,515,819
Call to undefined method My_email::from()
<p>I have a problem creating a test library to send email. This is my code:</p> <pre><code>class My_email { public function my_send_mail() { $CI =&amp; get_instance(); $CI-&gt;load-&gt;library('email'); $CI-&gt;email-&gt;from('xxx@xxx.com', 'Sender name'); $CI-&gt;email-&gt;to('y...
php
[2]
3,827,819
3,827,820
I am using addClass/removeClass and "data-" attribute to show/hide divs. How can I add next/previous?
<p>I am trying to work out the template for an ebook. This is what I have at present: <a href="http://jsbin.com/otakab/2/edit" rel="nofollow">http://jsbin.com/otakab/2/edit</a> But the next/previous doesn't work. Can you supply working code?</p> <pre><code>// Following function works $(function() { $(".pageNumbe...
jquery
[5]
3,610,549
3,610,550
tooltip which brings external page in it
<p>m looking for a tooltip which can dispaly external php page in to it and which can adjust itself up and down with respext to screen size,can some one suggest me jquery or javascript code.It should work on ajax page also.if i delete something by using ajax then tooltip should appear on ajax</p>
javascript
[3]
5,384,174
5,384,175
can I use ul li instead of select dropdown and with jquery make it part of a form?
<p>I went really long way trying to rewrite select to ul li and style it accordingly. But I'm getting really annoyed with the weight of code and minor annoyances on the way.</p> <p>So I'm thinking to ditch the idea completely, and just use normal ul li menu and some kind of javascript to make it function like select (...
jquery
[5]
3,424,316
3,424,317
How to "return" values in Shortcut for if-else
<p>How to return a value from a shortcut If-Else conditional statements ?</p> <p>It works just fine when I used the following Block of Code ,</p> <pre><code>var val =0; function slide() { if(val != 0 ) { val++ ; }else { return ; } //rest of my code } </code></pre> <p>The Problem is, I want to...
javascript
[3]
3,752,167
3,752,168
using eval in Java
<p>I am new to Java. I have a string like the following:</p> <pre><code> str="4*5"; </code></pre> <p>Now I have to get the result of 20 by using the string. I know in some other languages the eval function will do this. How do I do this in Java?</p>
java
[1]
3,951,639
3,951,640
Routing audio bluetooth headset
<p>I use this code for routing audio to headset - Galaxy 5 device 2.2. But this same code doesn't work in Android 2.3.3 Galaxy Y device!!! When I power on headset, the media sound stop working... </p> <pre><code>@Override public void onReceive(Context context, Intent intent) { Log.i(TAG,"onReceive - BluetoothBroa...
android
[4]
2,077,723
2,077,724
class instance member initialisation
<p>If a class has an instance member that is itself a class, does the constructor ALWAYS have to provide an initialisation for it in the constructor initialiser list?</p> <p>In some cases in my code this leads to very long initialiser lists, is this the way to do things? I only ask because it looks inelegant, but if ...
c++
[6]
3,674,324
3,674,325
What's actually going on in this AnonymousClass(variable) declaration?
<p>Trying to compile:</p> <pre><code>class AnonymousClass { public: AnonymousClass(int x) { } }; int main() { int x; AnonymousClass(x); return 0; } </code></pre> <p>generates errors from MSVC:</p> <pre><code>foo.cpp(13) : error C2371: 'x' : redefinition; different basic types foo.cpp(1...
c++
[6]
3,045,262
3,045,263
print difference between 2 strings in php
<p>I have an output stream that is saved in a string called $output1, this is displayed to the user. now if I have another stream called $output2 that is identical to $output1 plus a few lines, how can I output only the part of $output 2 that is not in $output1.</p> <p>For example:</p> <pre><code>$output1="this cat i...
php
[2]
5,677,791
5,677,792
Why isn't 0-padding allowed in Python?
<p>I've just noticed 0-padding is not allowed in Python and I was wondering why this choice was made?</p> <p>For example:</p> <pre><code>a = 09 </code></pre> <p>doesn't work while</p> <pre><code>a = 9 </code></pre> <p>does</p> <p>How's that?!</p> <p>Thank you very much for your answers!</p>
python
[7]
2,850,288
2,850,289
How to remove a property from a File-API object in JavaScript?
<p>I'm using the JavaScript "file" api to read information about images that will be uploaded, in order to generate a preview thumbnail before the actual upload occurs, based on a demo found here (<a href="http://www.html5rocks.com/en/tutorials/file/dndfiles/" rel="nofollow">JavaScript file api</a>).</p> <p>Using an f...
javascript
[3]
971,043
971,044
Tracing may slow the web site?
<p>I have ASP.NET web site in production and I enabled tracing in web.config file as debugging purpose in case there is any error. Is it possible that tracing may slow down the web site?</p> <p>The web site response (ex. in buttton event) is extremely slow. And, I am wondering if this has anything to do with the trac...
asp.net
[9]
2,701,450
2,701,451
jquery get selected word
<p>i have a div with class='divclass' and some text inside it... now i want to display a popup when the user mouseover any word inside div... the popup will also display the word on which user has mousedover the mouse... how can we achieve this?..</p>
jquery
[5]
2,867,916
2,867,917
Unable to install apk file in my android mobile
<p>This is py struggling about installation of apk file in my android phone.</p> <p>I am using htc android phone in that i am trying to install my application.</p> <p>I developed application using eclipse ADT plugin and taken apk file and copied in my phone SD card -> Android folder.</p> <p>After that i installed As...
android
[4]
5,509,186
5,509,187
PHP: problems searching text in a file
<p>I think i was doing halfway good to get this to halfway work. Anyways the following code works to find it on the first line, but i have a script that creates each on an individual line. Please revise or create a completely new version of the following to make it to search for the form data on every line.</p> <pre><...
php
[2]
4,982,953
4,982,954
Is it possible to start a service with a shortcut?
<p>I'm trying to create a shortcut on the home screen that, when pressed, will start a service instead of an activity.</p> <p>Is it possible? How?</p> <p>Thanks!</p>
android
[4]
4,624,951
4,624,952
Python | How to append elements to a list randomly
<p>Is there a way to append elements to a list randomly, built in function</p> <p>ex:</p> <pre><code>def random_append(): lst = ['a'] lst.append('b') lst.append('c') lst.append('d') lst.append('e') return print lst </code></pre> <p>this will out put <code>['a', 'b', 'c', 'd', 'e']</code...
python
[7]
5,735,263
5,735,264
How to replace the image of the back button entirely with different image?
<p>Below is my coding </p> <pre><code>// Navigation logic may go here -- for example, create and push another view controller. NextViewController *nextViewController = [[NextViewController alloc] initWithNibName:@"NextViewController" bundle:nil]; [self.navigationController pushViewController:nextViewController animat...
iphone
[8]
3,444,585
3,444,586
Why does my ProgressDialog exit when I click on Activity?
<p>I am showing a ProgressDialog using the following code:</p> <pre><code>void showProccess() { p = new ProgressDialog(this); p.setTitle("PleaseWait"); p.setMessage("data loading"); p.show(); } </code></pre> <p>In Android 2.3.1 when a <code>ProgressDialog</code> is shown, I can'...
android
[4]
3,656,386
3,656,387
PHP - Errors with DOmdocument
<p>Why I am getting the following error </p> <pre><code> Call to a member function getElementsByTagName() on a non-object </code></pre> <p>Error happens on following line:</p> <pre><code> $title = $htm-&gt;getElementsByTagName('title'); </code></pre> <p>when I run the following code:</p> <pre><code> $dom = new D...
php
[2]
2,281,866
2,281,867
Intranet web sites via VPN
<p>I have created an App that gets data from Web Services on an In*<em>TRA</em>*net web site. In order for my App to see these sites I have to turn on the VPN that is setup for our company intranet. So when I turn on the VPN it asked for authentication. That has to be turned on before my App launches because I know of ...
iphone
[8]
5,102,872
5,102,873
how to display the checked elements from a listview - android
<p>I have the following listview : <a href="http://www.vogella.de/articles/AndroidListView/article.html" rel="nofollow">http://www.vogella.de/articles/AndroidListView/article.html</a> the chaper: <code>8. Tutorial: Domain Model and Rows interaction</code> </p> <p>In MyList class, in the <code>OnCreate()</code> method ...
android
[4]
349,507
349,508
EditView in ListView row: focus lost when soft keyboard shows
<p>I have some EditViews in the rows of a ListView. This works just fine except when the soft keyboard raises and lowers.</p> <p>When I touch the EditView within the ListView with the soft keyboard down, focus jumps to the EditView, then the keyboard comes up, removes focus from the EditView and sets focus to the Lis...
android
[4]
3,669,190
3,669,191
The difference between getch() and system("pause")
<p>What is the difference between getch() and system("pause") in the end of a c++ code</p>
c++
[6]
4,686,452
4,686,453
snippet: jQuery syntax highlighter
<p>I am using Snippet, a jQuery plugin for highlighting code. </p> <p><a href="http://www.steamdev.com/snippet/" rel="nofollow">http://www.steamdev.com/snippet/</a></p> <p>I got it working correctly for highlighting css, js, php etc. But it does not highlight my HTML. Here is my test page. </p> <p><a href="https://d...
jquery
[5]
1,105,697
1,105,698
Javascript Absolute vs. Relative URI using .execCommand('insertHTML', false, html);
<p>I've been using a rteEditor very sucefully until now.</p> <p>The problem is in this line of code:</p> <pre><code>document.getElementById(rteName).contentWindow.document.execCommand('insertHTML', false, html); </code></pre> <p>I'm passing an ABSOLUTE path to the html var such as ("http://www.url.com/file.html").</...
javascript
[3]
899,132
899,133
Script to Show/Hide Content Requires Two Clicks to Execute First Time
<p>We're using the following code to show/hide content when an image is clicked:</p> <pre><code> function toggle(image,list) { var listElementStyle=document.getElementById(list).style; if (listElementStyle.display=="none") { listElementStyle.display="block"; document.getElementById(image).sr...
javascript
[3]
1,196,307
1,196,308
How to increase webview height dynamically in android
<p>Hi can anyody tell how to increase the webview height dynamically in android .my webview content will come some time less and some time .I have to show webview full layout .</p> <p>Thanks</p>
android
[4]
3,967,447
3,967,448
getting data from database table using cursor in android
<p>I have one employee table which has column values ("store_loc_id","name","password","address_id","role_id", "retailer_id"). I want to get the name and password from this table using cursor. how can i do??</p>
android
[4]
4,954,022
4,954,023
Passing an array to a Java function
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/7521891/java-array-brackets-after-variable-name">java - Array brackets after variable name</a> </p> </blockquote> <p>When writing a Java function that accepts an array as a parameter, should the function defini...
java
[1]
2,368,505
2,368,506
How to Mimic Yahoo mail's tabs using jQuery
<p>Attempting to Mimic the Yahoo Mail Tabs. Been able to set up the add-tab functionality. But can't get round to; i)ensuring that the user doesn't add duplicate Tabs ii)ensure that all tabs are closable apart from the first</p> <p>Anyone know how I can go about this?</p>
jquery
[5]
2,310,251
2,310,252
How do I find the last executed line of code in python?
<p>What is the best tool out there to find the VERY last line of code executed in a python program? Thanks!</p>
python
[7]
4,622,373
4,622,374
Why is my C# class telling me there's no constructor with zero arguments?
<p>I have the following:</p> <pre><code>public class TestService : BaseService, IDisposable { public TestService(IRepositoryProvider repositoryProvider) { } public IRepository&lt;Exam&gt; Exams { get { return GetStandardRepo&lt;Exam&gt;(); } } } </code></pre> <p>and</p> <pre><code>public class BaseS...
c#
[0]
1,541,107
1,541,108
Dispose C# DLL marked for COM interop
<p>I created a vanilla C# dll and marked it for COM inter op. The dll is a plain user form with no functionality as this is an experiment. </p> <p>I registered the DLL and opened active x test container and instantiated my COM object. It shows up in the test container and i can view the exposed methods of the control ...
c#
[0]
1,456,563
1,456,564
Android Email(exchage server) takes more time on SSL while account configuration
<p>I observed that Android Email application takes more time while configuring the account <strong>on SSL</strong>. On SSL it takes 10 seconds to get the response back of OPTIONS command. Once the account is configured everything works fine. Anyone have any idea??? Thanks in advance...</p>
android
[4]
4,366,203
4,366,204
Remember Apps last screen in iPhone app
<p>I want to remember the last screen of my app, means if I reopen my app, app should navigate me to the last screen where I were just before exiting app. </p> <p>Thanks Saurabh</p>
iphone
[8]
5,498,483
5,498,484
ListView with rows containing a LinearLayout
<p>I'm trying to implement a list using the ListView, which contains rows built with a LinearLayout. This LinearLayout is composed of a checkbox and a textview. The layout of the row is named tasks_list_row.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas....
android
[4]
799,962
799,963
JavaScript for # collated copies from a PDF print button
<p>Trying to find a JavaScript that will allow me to print 2 collated copies of a pdf document from a Adobe Acrobat PDF Print Button that I have created. Can you assist with a script that would do that?</p>
javascript
[3]
2,700,207
2,700,208
Drawing Images to fit circle
<p>I'm making an inventory screen for a game I'm working on, and I'd like to be able to draw a series of panels representing each item in the inventory. I want to be able to fit those panels on a circular path. Here's a mock up I made of what I mean</p> <p><a href="http://fc02.deviantart.net/fs70/f/2010/280/7/2/khmp_...
c#
[0]
3,870,510
3,870,511
Retrieve phone number from call log android
<p>I want to retrieve the number available in the call log in android application.</p> <p>I do not want to get all the call log and populate in my app activity. Instead I want to use existing android Intent to view and once selected the number from the list, I want the number back in my activity.</p> <p>I guess I wi...
android
[4]
5,722,178
5,722,179
How to make a shape with left-top round rounded corner and left-bottom rounded corner?
<p>I want to make a shape with with left-top rounded corner and left-bottom rounded corner:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;solid android:color="#555555"/&gt; &lt;stroke android:width="3dp" ...
android
[4]
4,279,355
4,279,356
How to put a csv data string in an array using PHP?
<p>We have split up a CSV file into individual lines and those lines have been stored into a database. Normally I would use fgetcsv to import each line of a file into an array when it is imported. However, since the CSV data is now stored in the database, I cannot use that function anymore. Is there an equivalent fu...
php
[2]
1,765,662
1,765,663
runtime.exec() taking infinite time to execute code
<p>I want to execute a command which takes 2 arguments. 1.input file name 2.output file name.</p> <p>The command is sixV1.1 outputFile.txt The code is:</p> <pre><code> String cmd= "sixV1.1 &lt;inputFile.txt &gt;outputFile.txt"; Process p=Runtime.getRuntime().exec(cmd); int retValue=p.waitFor(); </code></pre> ...
java
[1]
3,548,437
3,548,438
SSL Loading external images
<p>I have a web application that is using SSL. Is there anyway to load external images without the SSL warning dialog? Perhaps suppress this warning or can anyone suggest a better way to load external?</p> <p>Thanks</p> <p>Jeff</p>
asp.net
[9]
4,629,213
4,629,214
In Python, None evaluates to less than zero?
<p><strong>In Python, <code>None</code> evaluates to less than zero?</strong></p> <pre><code>ActivePython 2.7.2.5 (ActiveState Software Inc.) based on Python 2.7.2 (default, Jun 24 2011, 12:21:10) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; ...
python
[7]
626,197
626,198
NSDate from string...?
<p>I am working on calendar application. In this i have some issues with date format..</p> <p>I am conflicting with two types of date formats..</p> <p>one is -- 02-10-2010</p> <p>second is - 02 Oct, 2010</p> <p>but i want these formats be same..</p> <p>any methods to convert from one format to second or second to...
iphone
[8]
1,209,268
1,209,269
Substituting in arraylists
<p>I have an hash map, which maps integers to array of ArrayLists. For example, my data structure is the following:</p> <pre><code>7-&gt;((7,5,**4,3,1**),(7,6,4,3,1)) 4-&gt;((4,2,1),(4,3,1)) </code></pre> <p>Here, 7 is key, and arraylist e.g is (7,5,4,3,1), the array of arraylist in turn is ((7,5,4,3,1),(7,6,4,3,1))<...
java
[1]
2,540,854
2,540,855
How can i convert sqlDatareader to List<>
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1464883/how-can-i-easily-convert-datareader-to-listt">How can I easily convert DataReader to List&lt;T&gt;?</a> </p> </blockquote> <p>I want to return list which will store the <code>sqldatareader</code> value. ...
c#
[0]
5,657,490
5,657,491
Posting a request from one servlet to another
<p>I am writing a small module where in i need to post an xml string as a parmeter from one servlet to another servlet . The receiving servlet parses the xml and then sends the appropriate response.</p> <pre><code> mimetype = request.getParameter("uploadFile"); mimetype = mimetype.substring(mimetype.indexOf("."...
java
[1]
3,286,853
3,286,854
Catch Commandline error
<p>I am trying to catch an error with an incorrect commandline parameter for the application of form </p> <pre><code>Myapp.exe myFile.txt </code></pre> <p>The application however throws an "Unhandled exception - The path is not of legal form". </p> <p>Below is my code and I am wondering why it does not show the mess...
c#
[0]
4,531,293
4,531,294
If an object is passed as an argument in a function, does it create a new instance?
<p>In this code:</p> <pre><code>function myFunction(obj) { console.log(obj); } var obj = { key : 'value', funct : function(){}, elem : document.getElementById('navigation').getElementsByTagName('a') } myFunction(obj); </code></pre> <p>Is the object "obj" printed in the console inside myFunction the same ...
javascript
[3]
3,924,805
3,924,806
delete parent and itself in jquery
<p>JQuery:</p> <pre><code>$('#imgDelete').live('click', function() { $(this).parent('td').remove(); }); </code></pre> <p>All <code>&lt;td&gt;</code> are generate pro-grammatically and bind.<code>imgDelete</code> is also bind inside for each <code>&lt;td&gt;</code>.But above code shouldn't able to remove parent. D...
jquery
[5]
5,620,388
5,620,389
pinch and expand UIView
<p>I'm planning to create a UIView with UIButtons and I want that UIView to add in a UIViewScroll. But my problem is that UIView is larger than the actual screen size of the phone, so I want a pinch or expand gesture to zoom in or zoom out the view. My question is how can I implement the resizing of the view including ...
iphone
[8]
1,893,984
1,893,985
PHP: How to add variables and quotes to a variable
<p>How can I add variables and quotes to a variable? </p> <p>in the output it just prints the variables This is the code I have tried</p> <pre><code> $pl2 = '{"comment":"' . $nmp3 . '","file":"' . $pmp3 . '"},'; </code></pre>
php
[2]
14,796
14,797
How to check that two integer typedefs are equivalent?
<p>I am using some libraries which have their own definitions for integer types. How can I check that two typedefs are for equivalent types? I asked in another question how to check that two typedefs are the same. However, suppose int and long int are both 32-bit on my compiler, and two libraries might use each. I want...
c++
[6]
1,851,882
1,851,883
C++: Reading Binary Files
<p>I have a Binary file that has several names followed by some details (50 bytes fixed). Each name is followed by 0X00 followed by the 50 byte details. I need to extract just the names from the file. i.e read all characters till 0x00, skip 50 bytes and continue till end of file.What is the best way to do it in C++. </...
c++
[6]
5,272,157
5,272,158
Playing video using UIWebview
<p>detailVideo.h</p> <p><code><pre> @interface detailVideo : UIViewController { IBOutlet UIWebView *webview; NSString *urlAddress; } @property(nonatomic,retain)NSString *urlAddress;</p> <p>@end </pre></code></p> <p>detailVideo.m <code><pre>- (void)viewDidLoad {</p> <pre><code>NSString *reqUrl = urlAddress; ...
iphone
[8]
5,719,004
5,719,005
Issue with jQuery and IE
<p>I just can't seem to figure out why my code is not working at all in IE. It works just fine in every other browser. Can anybody spot an issue?</p> <pre><code>$(document).ready(function (){ var timerId = 0; $("#timerwrap").ready(function(){ $("#timerwrap").html("Please wait &lt;span style='font-weigh...
jquery
[5]
1,377,706
1,377,707
How to create an Email Id using c#..?
<p>Hi I want to create a program that helps me to create an email id.I mean it fills the other details and I will only enter the captcha.. Is there any way to do it using c#..?</p>
c#
[0]
5,675,689
5,675,690
Turning a List<Class> object ToString()
<p>I created a List using a class</p> <pre><code>public static List&lt;Holding_Class&gt; Holding { get; set; } </code></pre> <p>Here is my class</p> <pre><code> class Holding_Class { public string Key { get; set; } public string RealID { get; set; } public string URL { get; set; } } </code></pre> <p>Whe...
c#
[0]
5,323,965
5,323,966
how to react to an intent of the browser?
<p>Yo guys.</p> <p>You know when u do options/more/share page from the browser? Well I'd like an activity of mine to show up in the menu of all the apps capable of responding to that browser's intent. Thing is I dunno how to write the intent filter in the manifest. Also how do I access data like URL and title of the p...
android
[4]
3,721,313
3,721,314
how locale aware is preg_replace in php?
<p>If I do, preg_replace('/[^a-zA-Z0-9\s-_]/','',$val) in a multi-lingual application, will it handle things like accented characters or russian characters? If not, how can I filter user input to only allow the above characters but with locale awareness?</p> <p>thanks!</p> <p>codecowboy.</p>
php
[2]
4,137,087
4,137,088
Javascript substring with escape characters
<p>i have a string like the following</p> <pre><code>var string1 = " folder\\subfolder1\\subfolder2 " </code></pre> <p>and i want to replace the "\" with "/" with string1.replace in order to be</p> <pre><code>var string2 = "folder/subfolder1/subfolder2" </code></pre> <p>I tried </p> <pre><code> var rep ...
javascript
[3]
4,222,453
4,222,454
Structure error: Not recognized even though it is included
<p>More quetions: i get an unrecognized 'eld' from mai structure.</p> <p>header contains:</p> <pre><code>const int c=10; struct Array { int n; int els[c]; }; </code></pre> <p>The error i get is:</p> <blockquote> <p>error: request for member 'els' in 'A', which is of non-class type 'Array [(((unsigned int)(((int)...
c++
[6]
2,445,030
2,445,031
Passing data from one php page to another is not working - why?
<p>Frustrated php novice here...</p> <p>I'm trying to pass a "type" value of either billto or shipto from ab.php to abp.php.</p> <p>ab.php snippet: </p> <pre><code>&lt;?php echo '&lt;a href="' . tep_href_link(FILENAME_ABP, 'edit=' . $bill_address['address_book_id'] . '&amp;type=billto', 'SSL') . '"&gt;' . tep_im...
php
[2]
763,645
763,646
Iphone cocoa-touch animation suggestions
<p>I need a documents or blogs and so on.. I'm realy interesting the animating views, user interface elements on the cocoa-touch king of crash course and how to design them in the photoshop or like that.</p> <p>I found a few books about describing this subject. As i described the subject i realy need to crash informat...
iphone
[8]
1,143,604
1,143,605
First 6 ListView elements are continuously being invoked with getView()
<p>When I check my logs, when using ListView, I see, that getView() method of a custom adapter is continuously invoked on first 6 elements, even if I scroll to the very end of the list. Has anyone seen behaviour like this?</p>
android
[4]
2,845,733
2,845,734
iPhone: Application submission in AppStore
<p>I want to submit my application in AppStore. After i have gone through the docs there, i see i should go to iTunes Connect and fill the form to submit my application in AppStore. If someone already did it, can you guys please share your suggestion? I did build 'Distribution' in my Xcode project and compressed my ap...
iphone
[8]
5,924,748
5,924,749
using sleep(), I cannot get my values to echo
<p>I'm using a sleep function inside of a foreach loop and I'd like to echo the value inside the loop. Why isn't this working? The $test var inside the loop never changes from 0.</p> <pre><code>foreach($test as $val){ ob_start(); echo $test++; sleep(1); ob_end_flush(); } </code></pre>
php
[2]
1,835,686
1,835,687
What is the best way to start learning how to program?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/335063/whats-the-easiest-way-to-learn-programming">What&rsquo;s the Easiest Way to Learn Programming?</a> </p> </blockquote> <p>I'm very new to programming, but it has always interested me. I've tried to learn a...
python
[7]
2,711,695
2,711,696
jQuery deferreds
<p>I'm new to jquery deferreds. Here I have a simple <a href="http://jsfiddle.net/wadam1972/gEw2F/5/" rel="nofollow">example</a>. </p> <p>Can anybody tell me why the done function ("now it's my time") is fired before the other functions is done? </p> <p>The guys in this <a href="http://msdn.microsoft.com/en-us/scri...
jquery
[5]
2,011,898
2,011,899
How to get the value of file upload in textbox?
<p>I am working on a website and stuck in the following code. Here I have to get the value of file upload in textbox. I am using jquery code as follows,</p> <pre><code>$(document).ready(function() { $('input[name="product_picture"]').change(function() { var selectedValue = $(this).val(); $('input[n...
jquery
[5]
4,742,712
4,742,713
jQuery animte position left top with hover
<p>basically when I hover normally over the box it moves and goes back to the position but when you hover fast several times box goes backwards and loses position, any idea why? Thanks!</p> <p>Also I need to grab current div position so im using <code>$(this)</code> when hover.</p> <p>here is the code: <a href="http:...
jquery
[5]