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 |
|---|---|---|---|---|---|
3,302,027 | 3,302,028 | Exam sample: why is this variable in C++ producing such an output? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4176328/undefined-behavior-and-sequence-points">Undefined Behavior and Sequence Points</a> </p>
</blockquote>
<p>Working out the below code by hand:</p>
<pre><code>#include <stdio.h>
int func (int a, int... | c++ | [6] |
3,462,753 | 3,462,754 | Build a road network out of shapefile coordinates | <p>I want to build a road network from the ESRI shapefiles. I am able to read the data from the .shp files but unable to proceed any further with building the road network out of the shapefile coordinates and display it on the screen. I am not that expirienced in Java. I would appreciate any kind of suggestions on how ... | java | [1] |
5,442,878 | 5,442,879 | toggle using pure javascript | <pre><code><script>
function toggleMenu() {
var thisMenu = document.getElementById(id).getElementsByTagName('ul')[0];
if( thisMenu.style.display == 'block' ) {
thisMenu.style.display = 'none';
} else {
thisMenu.style.display = 'block';
}
return thisMenu;
}
<li class="NavLi... | javascript | [3] |
3,749,484 | 3,749,485 | Android wireless display | <p>I'm a fairly new android programmer and I've been having a rummage online about displaying an android screen over the network. I know it is possible to mirror the display using apps such as MirrorOp Sender. What I'm looking for is the android device to display one thing on the android device itself and something com... | android | [4] |
2,730,078 | 2,730,079 | Trying to integrate Javascript range slider into my website but not sure where to start | <p>I am trying to build a little test shell for my website using Javascript. What I have at the moment is a normal website. PHP/HTML with an SQL backend.</p>
<p>What I'd like is a simple Javascript feature whereby the user has a single slider object and can use this object to set the upper and lower limit on a number ... | javascript | [3] |
2,394,137 | 2,394,138 | Is it possible to pass an "unnamed" variable to a function? | <p>Let's say there is the following function:</p>
<pre><code>void SetTheSize(const SIZE *size) { ... }
</code></pre>
<p>Is there any way to call that function without specifying the SIZE variable? e.g.,</p>
<pre><code>SetTheSize((const SIZE*)&{10, 10});
</code></pre>
<p><strong>edit:</strong>
I should had menti... | c++ | [6] |
4,053,109 | 4,053,110 | How to set up Navigation Controller -> Root View in code (iPhone SDK) | <p>I need the ability to bypass the default RootViewController you get when you pick a navigation controller project type in XCode. I need this because I want to go down a different path depending on whether the app has been configured (sign up/login screens if not). Could someone point me to an example where in the ... | iphone | [8] |
5,647,333 | 5,647,334 | Unwanted carriage return when getting input from terminal | <p>I've just started learning Java and have come across a little quirk I'm not sure how to solve. It's the same as <a href="http://stackoverflow.com/questions/1123869/eliminating-the-new-line-when-using-bufferedreader-method-to-get-user-input-using">this</a> question but the solution there doesn't work here. The proble... | java | [1] |
4,765,403 | 4,765,404 | How to display only those columns in the gridview according to which dropdownlist the user selects | <p>For example i have three dropdownlists and the the user selects Say Name and PIN dropdownlist i want results that match the two to be displayed not any other what should I do?</p>
<p>Please help! :/</p>
<p><strong>EDIT:</strong></p>
<p>What i want to do is based on what dropdown list the user makes the selection ... | asp.net | [9] |
4,642,360 | 4,642,361 | How to save a state of a variable in android app and use it | <p>I have an android app which was built on eclipse. What i am currently doing is going through set of question in xml file randomly to ask. Xml file looks like this:</p>
<pre><code><item>
<ques></ques>
<option1></option1>
<option2></option2>
<option3><... | android | [4] |
321,752 | 321,753 | jquery or php detect external site length | <p>This might be pushing the limits here.</p>
<p>I iframe some external websites into one of my own websites. </p>
<pre><code><iframe style="margin-top:20px;width:99%;height:600px;" src="http://www.website.com/"></iframe>
</code></pre>
<p>This works just fine and dandy. However, sometimes the sites are... | jquery | [5] |
264,961 | 264,962 | display data in tree structure using php | <p>I want to display data in tree strucure using php. The data should be read from xml file.
The root direcory information will be in 1st file(ex level0.xml).the sub directories of root will be in level1.xml file and so on.I need to get the values from these file and display in tree structure. When i click the director... | php | [2] |
1,344,793 | 1,344,794 | String array to notepad | <p>I have a string array in C# and I intend to copy it in a notepad so that each row would be located in a line. What should I do?</p>
| c# | [0] |
5,326,274 | 5,326,275 | Use of google voice to translate voice to text | <p>is there any API or anything else that will help me out in translating voice to text using google voice for that in android phone.</p>
| android | [4] |
166,738 | 166,739 | Javascript - Masking a password on a JS alert box | <p>I have the following</p>
<pre><code>var validate=prompt("Enter your PIN","Enter your PIN");
</code></pre>
<p>This works fine except it shows the password when typing it.</p>
<p>Is there any way to mask the password being entered?</p>
<p>Cheers,</p>
| javascript | [3] |
4,715,997 | 4,715,998 | PHP 'global variable' | <p>I am creating a game in PHP, and am having a problem with global variables. Depending on which button is pressed in my HTML page, a corresponding PHP script is run and a function is called depening on the <code>isset</code> function.</p>
<p>My question is this: I want to keep a score variable, and I would like to h... | php | [2] |
4,466,544 | 4,466,545 | How to check if an array has an element at the specified index? | <p>I know there is array_key_exists() but after reading the documentation I'm not really sure if it fits for this case:</p>
<p>I have an $array and an $index. Now I want to access the $array, but don't know if it has an index matching $index. I'm not talking about an associative array, but an plain boring normal numer... | php | [2] |
1,454,046 | 1,454,047 | Color slider puzzle | <p>I was going through the iPhone samples available <a href="http://hoangtuanonline.com/mad/iPhone%20documents/books/object-c%20books%3B%20iphone%20books/Iphone%20Books/Iphone%20DevCenter%20&%20GL%20Specs/iPhone%20Sample%20apps.pdf" rel="nofollow">here</a>.</p>
<p>There is one sample code named <strong><em>Color S... | iphone | [8] |
4,197,047 | 4,197,048 | C++ XML-RPC Calling | <p>I haven't seen any documentation for calling XML-RPC by inputing certain strings and get respone of some strings in c++ by connecting to an XML API. This is a documentation provided by the server. I can't figure out how to do this</p>
<pre><code> A client can interact with a Pandorabot by POST'ing to:
http:... | c++ | [6] |
4,117,104 | 4,117,105 | Best star rating solution for PHP | <p>I'm wondering what the best and most efficient way to write up the following PHP code would be?</p>
<pre><code> if ($av == 1) echo '/images/1-star.png';
if ($av > 1 && < 2) echo '/images/1-half-star.png';
if ($av == 2) echo '/images/2-star.png';
if ($av > 2 && < 3) echo '/... | php | [2] |
1,867,866 | 1,867,867 | Generate a random string with a specific bit size in java | <p>How do i do that? Can't seems to find a way. Securerandom doesn't seems to allow me to specify bit size anywhere</p>
| java | [1] |
3,549,304 | 3,549,305 | Detect fieldset on mouse click JQUERY | <p>i'm trying to add a single condition to the following Javascript that will stop the IF statement below eveluating to TRUE when user clicks inside a fieldset on the page.</p>
<p>I have tried allsorts but i'm guessing, I just tried adding "
&& !(e.target.isFieldSet))" but no joy. I've tried searching the web,... | jquery | [5] |
4,054,964 | 4,054,965 | Uncheck Succeeding Radio Buttons upon clicking a radio button | <p>I'm building a conditional logic survey.</p>
<p>I want to uncheck all the radio buttons present after the radio button I just click - even those belonging to other radio groups. In short - empty the form the point at which I click but keep the rest of the earlier part of the form intact.</p>
<p>Is there any way to... | jquery | [5] |
1,631,653 | 1,631,654 | ListBox problem in ASP.NET | <p>May be it's the same question i have i asked before but the issue is the same and i didn't find any resolution so i have to write it again with the expectation that it would be solved this time.
My question is i am using two list boxes and one list box is populated by putting the list the list item tag in listBox1 o... | asp.net | [9] |
2,081,707 | 2,081,708 | Using Python to convert color formats? | <p>I'm working on a Python tool to convert image data into these color formats:</p>
<ul>
<li>RGB565</li>
<li>RGBA5551</li>
<li>RGBA4444.</li>
</ul>
<p>What's the simplest way to achieve this?</p>
<p>I've used the <a href="http://www.pythonware.com/products/pil/" rel="nofollow">Python Imaging Library (PIL)</a> freque... | python | [7] |
1,841,480 | 1,841,481 | can not load my image into a bitmap class in android | <p>hi i have a problem with a bitmap and a picture located here:</p>
<pre><code>file:///mnt/sdcard/Android/data/com.dev.app/files/Pictures/20120924-092226.jpg
</code></pre>
<p>so i have a string with this url (the the file exists!)</p>
<p>now i need to get a bitmap, so i do:</p>
<pre><code>String str = "file:///mnt... | android | [4] |
4,307,588 | 4,307,589 | Dynamically Remove Elements Jquery .click not Firing | <p>I am writing a script to dynamically create and remove elements, adding the elements works fine. But the #removeText function is not firing, I assume something because it was created after the page had finished loading or something. How can I get the #removeText click function to work if it has been dynamically crea... | jquery | [5] |
3,775,708 | 3,775,709 | Javascript : add string to iframe with window.opener form popup | <p>I use this code for add string to element of parent windows form popup :</p>
<pre><code>window.opener.document.getElementById('myid').innerHTML += 'string';
</code></pre>
<p>Now I want to add string to element of iframe form popup.Both of iframe and parent is in the same domain. I try this code but not work:</p>
... | javascript | [3] |
5,600,105 | 5,600,106 | How do I open a website in browser through JAVA without having the browser open a new tab | <p><strong>Introduction</strong></p>
<p>I am making a proxy server in java. Whenever the user enters an unknown host (URL) in the browser, the proxy server handles <code>UnknownHostException</code> by executing the code below:</p>
<pre><code>try {
Process p=Runtime.getRuntime().exec("cmd /c start http://www.m... | java | [1] |
3,342,600 | 3,342,601 | What is the difference between new Object and new Object() in JavaScript | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3034941/new-myobject-vs-new-myobject">new MyObject(); vs new MyObject;</a> </p>
</blockquote>
<p>In some articles I seen following statement to create new object in JavaScript:</p>
<pre><code>var myObject = new... | javascript | [3] |
4,278,983 | 4,278,984 | Replace method doesn't work | <p>I want to replace the smart quotes like <code>‘</code>, <code>’</code>, <code>“</code> and <code>”</code> to regular quotes. Also, I wanted to replace the <code>©</code>, <code>®</code> and <code>™</code>. I used the following code. But it doesn't help.
Kindly help me to resolve this issue.</p>
<pre><code>str.repla... | javascript | [3] |
4,184,432 | 4,184,433 | Populating ComboBox and CheckedListBox from Database, C# | <p>Ok, as the title says, I'm trying to populate a combobox from a database, then change the contents of the checkedlistbox based on the change in the combobox. The problem here is, I'm about as lost as I could be. I decided to go with an access database (db1.mdb, in the same dir as the exe). The primary data table Tab... | c# | [0] |
2,567,048 | 2,567,049 | Inner FutureTask in Java | <p>I try to implement an inner method in order to execute the following code in a new thread</p>
<pre><code>MyPojo result = null;
final MyPojo result2 = result;
FutureTask<MyPojo> runnableTask = new FutureTask<MyPojo>(
new Runnable() {
BindJSON<MyPojo> binding;
// Make the UR... | java | [1] |
5,858,878 | 5,858,879 | How come when I use htmlentities() on my wamp server it works well, but has weird characters on someone else's server? | <p>I'm pulling an XML feed that doesn't specify the encoding. I can't change this on the feed.
When I use htmlentities(), it gives me a proper output for certain characters on my WAMP server, but when I upload it to another server, it seems like the encoding is incorrect for certain characters, like open and close doub... | php | [2] |
5,633,173 | 5,633,174 | Most elegant way to modify Python list elements inplace | <p>I have a 2D list that looks like this:</p>
<pre><code>table = [['donkey', '2', '1', '0'], ['goat', '5', '3', '2']]
</code></pre>
<p>I want to change the last three elements to integers, but the code below feels very ugly:</p>
<pre><code>for row in table:
for i in range(len(row)-1):
row[i+1] = int(row[... | python | [7] |
2,296,961 | 2,296,962 | how to get respected person details saved in arrays from selected value in table view | <p>i am having 3 arrays with info regarding peoples.</p>
<p>one array is with name,second array with email,third array with phone number.</p>
<p>eg:{jon,Willems...},{jon@example.com,Willems@example.com...},{123456,123456,...} </p>
<p>I need to display agent names in table.</p>
<p>when ever i selects people name in ... | iphone | [8] |
2,099,199 | 2,099,200 | splitting one program into several smaller and their binding in python? | <p>i want to make from one big program 5 smaller programs:main and program1,program2,program3 and program4.programs1,2,3,4 should use variables from main program and return some new variables,and main program should use(or call) programs1,2,3,4...
can i bind these programs using functions,modules or something else and... | python | [7] |
4,667,317 | 4,667,318 | mvaayoo api issue for sending messages from a website | <p>i am using mvaayoo api for sending the messages from my website.</p>
<p>i have read the documentation and do the same even then i am not able to send the messages.</p>
<p>i am using this sample code</p>
<pre><code>string strUrl = "http://api.mVaayoo.com/mvaayooapi/MessageCompose?user=
Username:Password&sende... | asp.net | [9] |
5,565,086 | 5,565,087 | find all items in list object | <p>I would like to interrogate all new emails (one by one) and find the contents of them so that I can use the contents for another application. </p>
<p>My first step was interpreting the return values from a search done via the search attr of an IMAP4 object. I'm trying to figure out what data is in a list that I h... | python | [7] |
5,494,298 | 5,494,299 | Deleting Original Line from the output file | <p>I want to remove <code>tempstring</code> lines from the output.txt file </p>
<pre><code>File.Copy(words, Npath);
StreamReader temp = new StreamReader(Npath, Encoding.UTF8);
string tempstring = temp.ReadToEnd();
string[] temp3 = tempstring.Split(',');
temp.Close();
StreamWriter sW = File.AppendText(Npath);
stri... | c# | [0] |
127,891 | 127,892 | Difference between Array adapter and Cursor Adapter in Android | <p>What is the difference between Array adapter and Cursor Adapter in Android?</p>
| android | [4] |
612,721 | 612,722 | c# paint grid cells and return the certain grid painted | <p>I'm making a program to interface with my 128*64 LCD i bought for my atmega8.</p>
<p>The idea is thati want to make a grid( like the one on the lcd) and then paint certain cells of the grid( single colored) and retreive the cells painted. </p>
<p>In x;y system... Like 1;1 2;3 </p>
<p>So i could then later send... | c# | [0] |
3,372,439 | 3,372,440 | C# List all Folders on a SQL reporting server using ReportingServices | <p>I'm just trying to get a list of all the folders that resides on a sql server running reporting services. I'm using the web service ReportingServices</p>
| c# | [0] |
105,021 | 105,022 | What's the point of os.error? | <p>Why does Python's <code>os</code> module contain <a href="http://docs.python.org/library/os.html#os.error"><code>error</code>, an alias for <code>OSError</code></a>?</p>
<p>Is there a reason to ever spell it <code>os.error</code>? <code>OSError</code> certainly seems more consistent with all the other built-in exce... | python | [7] |
665,998 | 665,999 | Cannot save video to specific folder | <p>I am trying to save video to specific folder like </p>
<pre><code>Intent captureVideoIntent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE);
File videosFolder = new File(Environment.getExternalStorageDirectory(), "Videos");
if (!videosFolder.exists()) {
videosFolder.mkdirs(); // <----
}
Strin... | android | [4] |
841,151 | 841,152 | Is there any way I can find how many objects are instanciated from stack and how many objects from Heap. I dont wish to have the restrictions of scoping in objects from Stack | <p>Is there any way I can find how many objects are instanciated from stack and how many objects from Heap. I dont wish to have the restrictions of scoping in objects from Stack.</p>
<p>If i use a static counter in constructor and destructor, it will be called in both the cases(object from stack and heap). One way is ... | c++ | [6] |
5,210,954 | 5,210,955 | Embedding a Resource in C# | <p>I'm using the AxShockwaveFlash object to load an extern .SWF file into my C# application. The AxShockwaveFlash takes in a URL for the movie to load. To load a local file, I can use a file:/// url string, which works fine.</p>
<p>However, I'd really prefer that the SWF be embedded in the compiled executable, but th... | c# | [0] |
4,439,778 | 4,439,779 | Is there a browser plugin or method to find which php template an item is coming from? | <p>Is there a browser plugin or method to find which php template an item is coming from?</p>
| php | [2] |
5,724,941 | 5,724,942 | Fastest Way to Round to the Nearest 5/100ths | <p>I have numbers that I want to go from:</p>
<pre><code>1.215145156155 => 1.2
1.368161685161 => 1.35
1.578414616868 => 1.6
</code></pre>
<p>(*Note: the hundredths place should not be marked if it is zero.)</p>
<p>What's the <strong><em>fastest</em></strong> way to do this?</p>
<p>This is what I have right... | python | [7] |
225,126 | 225,127 | getting parent index with jquery | <p>I know there is another question with an answer to my question, however one solution that was said to be newer does not work for me.</p>
<p>so I have something like: </p>
<pre><code><ul>
<li><div class="thumb"></div></li>
<li><div class="thumb"></div></li>
&... | jquery | [5] |
5,336,595 | 5,336,596 | Programming language detection in PHP | <p>I need to detect which programming language is used in a code snippet, there is any library to do this?</p>
<p>I already read this <a href="http://stackoverflow.com/questions/475033/detecting-programming-language-from-a-snippe">http://stackoverflow.com/questions/475033/detecting-programming-language-from-a-snippe</... | php | [2] |
5,901,320 | 5,901,321 | Android device specific camera path in android | <p>I created a sample app, in my app i capture a photo and save it in a specific folder. The app runs successfully on the emulator with target 2.3.3, but when installing it on a mobile the image gets stored in the default folder in <code>/mnt/sdcard.DCIN/100ANDRO/sample.jpg</code>. Please tell me how can I overcome thi... | android | [4] |
4,689,287 | 4,689,288 | c++ how to deal with method returning either NULL or std::string? |
<p>I am a bit stuck with some code. I have to use the return type of the method <code>getToto()</code> which usually returns a <code>std::string</code>, but in one case it returns <code>false</code> (It is part of a library I have to use, I cannot modify it). I understand that is equivalent to a null pointer. But I c... | c++ | [6] |
221,405 | 221,406 | PHP Loop Over ONLY Different Arrays | <p>I have a single array with several of the same values. And I only want to loop over DIFFERENT values. How could I go about doing this?</p>
<p>Example</p>
<pre><code>166-01 001;09;UO;
166-01 001;09;UO;
166-01 001;09;UO;
166-01 001;09;UO;
166-01 001;09;UO;
166-01 001;09;UO;
166-01 001;09;UO;_86
166-01 001;09;UO;_86
... | php | [2] |
605,545 | 605,546 | Find out the new element in EditText View | <p>I want to execute one method wheneer i enter number in EditText view.But i did not change the focus of EditText.I am stay in the same EditText when i enter a new number automatically i eant to execute one function.Now my question is how we find that event that means enter a new number in EditText </p>
| android | [4] |
4,617,802 | 4,617,803 | Optimizing php conditionals | <p>I have something like this:</p>
<pre><code><?php
$fix1 = XXXXXXX //Integer. Problem isn't here. Extracted automatically
$iffix1 = range(9000000,8000000);
$iffix2 = range(7999999,7888888);
...
//There're more iffix[XX]s, up to $iffix60
if($fix1 = in_array($iffix1)) {
$var1 = 1;
} elseif($fix2 = in_array($... | php | [2] |
4,366,231 | 4,366,232 | Load gallery at with particuler image position | <p>I have a list of images in grid view.I want to display a gallery of all this on click event of any image in grid view.I wanted to display selected image in gallery first when its load.I have position of all this images.
Any help will be highly appreciated.</p>
| android | [4] |
5,581,918 | 5,581,919 | Horizontal line padding | <p>I'm trying to add a horizontal line between two EditText widgets, but strangely the line has no padding at the bottom, so it appears "glued" to the widget that is below it.</p>
<p>This is my code (in the layout.xml, inside a LinearLayout with vertical orientation):</p>
<pre><code> <EditText android:layout_wi... | android | [4] |
1,895,464 | 1,895,465 | Overriding a property | <p>I'm trying to override a property in my program.
Here is basically what I'm trying to do : </p>
<pre><code>class A { public int test = 7; }
class B : A { public int test = 8; }
class Program
{
static void Main(string[] args)
{
A test1 = new A();
A test2 = new B();
Console.WriteLin... | c# | [0] |
3,023,148 | 3,023,149 | iPhone app pricing model question? | <p>I have heard there has been some studies of the apple app store for the iphone. It was a comparison between having a free application supported by ad vs a .99 cent application. .99 cents seems to be the sweet spot for a lot of the smaller applications. Anyone know where those studies were done? Are people having be... | iphone | [8] |
5,972,365 | 5,972,366 | $_SERVER['PHP_SELF'] intermittently returning two leading forward slashes | <p>Why would $_SERVER['PHP_SELF'] return a filename in one instance as /test/foo.bar and another instance (executed from the same php script) as //test/foo.bar (with double leading forward slashes)?</p>
<p>form.php sends $_GET to login.php. login.php redirects to</p>
<pre><code>header ('Location: test/foo.bar')
</cod... | php | [2] |
5,954,309 | 5,954,310 | Is there any Android flickr open source application? | <p>I am looking for flickr open source android 3.2 application for my learing purpose. If it is there somewhere, please help me out.</p>
| android | [4] |
3,468,083 | 3,468,084 | remove <br> from specific div | <p>I need to remove break from a specific <code>div</code>, i know how to remove all breaks with</p>
<p><code>$('br').remove();</code></p>
<p>But I need to keep some breaks elsewhere on the page , </p>
<p>How would I remove the breaks from a <code>div</code> with the id "grape1" and "grape12" but leave all others ... | jquery | [5] |
5,930,306 | 5,930,307 | How to design good looking Web Application | <p>I am a java developer and I am on my way to create a professionally good looking web application, one which has jquery, and fancy menus, well organized css, html etc. I have little knowledge of CSS, html, javascript and other web <strong>designing</strong> languages. </p>
<p>Please let me know how developers create... | java | [1] |
75,819 | 75,820 | Message shown when adding a homescreen shortcut. | <p>When creating a homescreen shortcut through my application, I see a dialogue come up on the bottom of the screen that says something like "shortcut .... created", "shortcut .... already exist", or "shortcut ... deleted". Is there a way to disable this dialogue/message?</p>
| android | [4] |
1,789,036 | 1,789,037 | Cannot import google io source code 2011 | <p>I am new to android development . I'm trying to download and run the
iosched 2011 source code for HoneyComb. And, I looked in most of the forums, and not been able to understand what to do . So, if anyone of u guys could give a step by step process for downloading and running on eclipse locally , I would be very g... | android | [4] |
2,952,379 | 2,952,380 | HTC Chacha showing landscape although portrait is set in the manifest file | <p>I was developing an app today and I set the orientation for the all the activities to <code>portrait</code> in the manifest file.Now when I deployed the app on my <code>Xperia U</code> mobile it was working fine . But when I deployed it in my friends <code>htc Chacha</code> it was showing the layout not in portrait.... | android | [4] |
5,657,103 | 5,657,104 | Grouping an array of similar words | <p>I have an array with a bunch of words. E.g:</p>
<pre><code>array( developer,develop,development,design,designer,designing )
</code></pre>
<p>I want to be able to group these words together with their similar words so I'd get something like this:</p>
<pre><code>array(
array( develop, developer, development ),
... | php | [2] |
5,113,794 | 5,113,795 | Does the PHP mail function return true if email is incorrect | <p>I am making a system that will be used to collecting a larger of data from users. I know some will be spam! I just want to know if the mail function returns false if the email is not correct? </p>
<p>Say I have. </p>
<pre><code> <?php
$to = "fake@fake.com";
$header = "From: {$to}";
$subject = "Hi... | php | [2] |
4,823,514 | 4,823,515 | Paper View effect iPhone | <p>I would like to create a turn up page view with button under the view like the first image of this app:
<a href="http://itunes.apple.com/us/app/ihandy-translator-pro/id402422247?mt=8" rel="nofollow">http://itunes.apple.com/us/app/ihandy-translator-pro/id402422247?mt=8</a></p>
<p>How can I do this "page peek" view,... | iphone | [8] |
4,648,886 | 4,648,887 | Parse JSON string | <p>I have a hard-coded JSON string.</p>
<pre><code>var test = "JSON STRING HERE";
</code></pre>
<p>I am using jQuery. I know there is a function like getJSON, but that makes an AJAX call. I want it to parse the hardcoded string so that I can use <code>$.each(test, function(a,b){}))</code></p>
<p>Thank you for your t... | jquery | [5] |
2,683,819 | 2,683,820 | How to find duplicate elements in array using for loop in python like c/c++? | <p>i have a list with duplicate elements:</p>
<p>In python:</p>
<pre><code> list_a=[1,2,3,5,6,7,5,2]
tmp=[]
for i in list_a:
if tmp.__contains__(i):
print i
else:
tmp.append(i)
</code></pre>
<p>i have used the above code to found the duplicate elements in the list_a.
i dont want to re... | python | [7] |
4,217,093 | 4,217,094 | why does not eclips know cout and cin in my code? | <p>I am new in c++, I want to write my program with eclips but it does not know cout and cin however I add include
This is my code:</p>
<pre><code>class READY {
public:
READY();
virtual ~READY();
#include <iostream.h>
int main (){
cout<<"hello";
}
};
#endif /* READY_H_ */
</code></pre>
| c++ | [6] |
5,924,715 | 5,924,716 | Python 2.7: How to check if a deque is empty? | <p>Is try-catch the only method to do that?</p>
| python | [7] |
4,228,996 | 4,228,997 | Toggle not working in IE | <p>I am using this code on my site:</p>
<pre><code>var panel = $('.couch-hide');
var originalPos = panel.css("right");
panel.toggle(function() {$(this).animate({right:0},1000, 'easeOutBounce');},function(){$(this).animate({right:originalPos},1000);}
);
</code></pre>
<p>In FF it works flawlessly, but in IE, i... | jquery | [5] |
908,066 | 908,067 | Switching Tabs with previous tab | <p>I am created tabhost with 4 tabs named previous, solotalk, mytalk, edit. after pressing solotalk, mytalk,edit, then then i am press previous it should come back edit, mytalk, solotalk, here i am using intent for calling solotalk mytalk and edit</p>
| android | [4] |
976,309 | 976,310 | convert '1' to '0001' in JavaScript | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2686855/is-there-a-javascript-function-that-can-pad-a-string-to-get-to-a-determined-lengt">Is there a JavaScript function that can pad a string to get to a determined length?</a> </p>
</blockquote>
<p>How can I ... | javascript | [3] |
5,748,542 | 5,748,543 | List Slicing python | <p>I have a list like </p>
<pre><code>myl = ['A','B','C','D','E','F'] #length always even
</code></pre>
<p>Now my desired output is <code>'AB','CD','EF'</code></p>
<p>I tried</p>
<pre><code>>>> myl = ['A','B','C','D','E','F']
>>> even_pos = myl[::2]
>>> odd_pos = myl[::-2]
>>> od... | python | [7] |
3,756,808 | 3,756,809 | How to terminate a console mode app from a BackGroundWorker | <p>I am creating one BackgroundWorker and inside its DoWork function I have the following code: </p>
<pre><code> foreach (string newFilepath in newFilesPath)
{
if (!File.Exists(encryptedFilePath))
{
encryptedFiles.Add(encrypted... | c# | [0] |
3,724,286 | 3,724,287 | Reading from a URL and storing in an ArrayList in JAVA | <p>I'm trying to read from the URL below which appears to work but when I try to store it in the ArrayList it gives me an error. Any ideas on whats causing the error?</p>
<pre><code>public abstract class ItemList implements ItemListInterface{
private static String inputLine;
private static ArrayList<String> wor... | java | [1] |
255,440 | 255,441 | PHP not stripping slashes when echoing | <p>I'm hoping someone can clear this up for me. I have been reading a book on best practices when it comes to form validation and that if the user enter a wrong value return the form back to them with the data they entered with warning/error messages. </p>
<p>What I want to do is say a user enters the below into a tex... | php | [2] |
1,045,397 | 1,045,398 | type synonyms in c#? | <p>i hope i missed this in the docs. is there a way to declare a type synonym in c#?
thanks
konstantin</p>
| c# | [0] |
3,769,451 | 3,769,452 | jQuery accordion-like menu with text replace | <p>I want to indicate a menu's expandability/collapsibility with a 'plus' sign. I want to replace the plus sign with a minus when the item has been expanded.</p>
<p>The only issue at the moment is returning the minus back to a plus when I click on another item. </p>
<p>Any suggestions? </p>
<p>Fiddle: <a href="http:... | jquery | [5] |
1,570,309 | 1,570,310 | Conversion to Dalvik format failed with error 1 Solution? | <p>I was programming an application for android, after i added a tab layout to the program an error showed up to:</p>
<blockquote>
<p>Conversion to Dalvik format failed with error 1</p>
</blockquote>
<p>I have tried cleaning the project and looking at all the other solution to the problem on this website. Has someo... | android | [4] |
5,805,228 | 5,805,229 | What is default jvm error log location? | <p>If an error log location isn't specified when executing <code>java -cp ../blah someplace/somejar.jar</code> where would the jvm error log be written to?</p>
| java | [1] |
652,969 | 652,970 | Collect all method args in an Object[] array | <p>I'm looking at collecting all the method parameters of generic methods in an Object[] array for logging purposes. I'm aware that this is better achieved using aspects, but am disallowed from using it and am looking for a pure reflection based approach if possible</p>
<p>To clarify,
Assuming a method call</p>
<pre>... | java | [1] |
3,533,416 | 3,533,417 | PHP - Select a unique mysql line without while | <p>I want to select only unique values with php/mysql. </p>
<p>I can do it with many line, but I forget how to do it without while... :)</p>
<p>Thanks a lot.</p>
<p>Here is the code that I want to do without while.</p>
<pre><code>$request_1m = "SELECT date1, date2 from mytable";
$result_1m = mysql_query($request_1... | php | [2] |
5,501,132 | 5,501,133 | JAVA Multiple Operations when defining a variable | <p>In Java is it possible to have multiple operations on a variable definition?</p>
<p>For example</p>
<pre><code>double myLocalVariable = (myLocalVar2 + myLocalVar3 * myLocalVar4);
</code></pre>
<p>Thanks for the help!</p>
<p>CJ</p>
| java | [1] |
3,888,185 | 3,888,186 | Multiple BroadcastReceivers that handle the BOOT_COMPLETED action? | <p>Is it possible to have multiple BroadcastReceivers that run on BOOT_COMPLETED in a single app?</p>
| android | [4] |
920,869 | 920,870 | C++ Array Member of Constant Length (Initialisation of) | <p>I have a class that contains an array. I want this array to be set at the length of a constant:</p>
<pre><code>// Entities.h
class Entities
{
private:
const int maxLimit;
int objects[maxLimit];
int currentUsage;
public:
Entities();
bool addObjec... | c++ | [6] |
4,452,102 | 4,452,103 | Jquery changing .live to .on, | <p>I am trying to change all my <code>.live()</code> to <code>.on()</code> as the prior is now deprecated.</p>
<p>I am struggling to understand how it works though. Before I used this code and it worked fine...</p>
<pre><code>$('#lightBoxClose').live('click', function() {
$('#lightBox').fadeOut();
});
</code></pr... | jquery | [5] |
3,275,552 | 3,275,553 | Reading a pdf file using bufferedreader and writing to a bytearrayoutputstream | <p>How do I read a PDF file and write it in a <code>ByteArrayOutputStream</code>?</p>
<pre><code> /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplication1;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
i... | java | [1] |
3,824,468 | 3,824,469 | Expand/collapse group nodes in ExpandableListView based on passed Cursor values? | <p>I've got a ExpandableListView widget that is populated using an adapter based on the SimpleCursorTreeAdapter as shown below. I I query my SQL database for the ListView's group titles as well as a boolean value to whether the group should be expanded or collapsed (which is returned in a Cursor). I then feed this Curs... | android | [4] |
4,945,832 | 4,945,833 | file weight and how many lines in text file - how ? (C#) | <p>how to measure any file weight ?</p>
<p>and how to know how many rows in text file ?</p>
<p>thank's in advance</p>
| c# | [0] |
1,709,518 | 1,709,519 | Wiping data on an actual phone | <p>Ok, usually I use the emulator so I have just to check the "wipe-data" entry and that's it. If I'm using a phone how could I do that? Is there a way to have a "developer profile" on my phone so I don't lose my personal data?</p>
<p>I'm using my personal phone so....</p>
| android | [4] |
5,622,667 | 5,622,668 | View to hold three image and when scroll change the screen in android | <p>i am new to android and stuck and thinking how the task can be done.</p>
<p><strong>The task is...</strong></p>
<p>The view or horizontal scroll view will have three image so user can move them left to right and right to left vice versa.and on change of the image it will load some image to the screen.</p>
<p><str... | android | [4] |
3,600,603 | 3,600,604 | Restrict Postback on button client click event | <p>I am having an asp button in Update panel and a update progress attached with update panel.
I want restrict page postback on on button's client click event.</p>
| asp.net | [9] |
5,645,400 | 5,645,401 | C# loops through 24 hours every 30 minutes | <p>I am wondering how I would loop through a datetime or any type of variable to go from 12:00AM to 11:59PM every 30 Mins?</p>
<p>So I need a variable that shows times in 12HR format (01:00PM, 09:00AM) and everytime I loop through it, to add 30 mins to the time? I then need to use this value in a string.</p>
<p>The t... | c# | [0] |
5,851,009 | 5,851,010 | Reading request content from Java socket InputStream, always hangs after header | <p>I am trying to use core Java to read HTTP request data from an inputstream, using the following code:</p>
<pre><code>BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
Sys... | java | [1] |
3,926,113 | 3,926,114 | Possible to make a self contained web part that uses jQuery? | <p>Basically I would like to create a WebPart that uses jQuery but I don't want to have to add jQuery to my masterpages (or anywhere else) manually. I would like to have one WSP that I could email to someone, have them install only that, and having a working WebPart that uses jQuery.</p>
<p>Is this possible?</p>
| jquery | [5] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.