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,236,994
3,236,995
GridView - sometimes rows are top-aligned, sometimes they're bottom-aligned!
<p>I am using a GridView. Four items in a column. Each element is composed of the following layout:</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"&gt; &lt;Image...
android
[4]
714,689
714,690
STOP UIWebView bounces vertically in device
<p>I am using this code to stop uiwebview bounces vertically and its work fine in simulator 4.0.But when i installed my app in my first generation ipod it wont work.</p> <pre><code>for (id subview in webView.subviews) if ([[subview class] isSubclassOfClass: [UIScrollView class]]) ((UIScrollView *)subview).bounce...
iphone
[8]
3,826,251
3,826,252
Java different Calculator basic functions problem?
<p>The code below is a chunk from actual code of Calculator.What it does is that user presses a number on the calculator then as he presses "+" the number on the text field gets stored and then he presses the next number and it gets stored when he presses "=".Then in "=" if condition the addition function is performed....
java
[1]
1,229,225
1,229,226
working on how to display a map view in Iphone
<p>I can display the map view for specific location. However, I dont know how to zoom in or out in simulator. Please any one how to do it, advice me. Thanks</p>
iphone
[8]
706,168
706,169
in C++ what does this code means?
<p>I was working on linked lists and found a sample. In that sample it says </p> <p><code>while (currNode &amp;&amp; index &gt; currIndex)</code></p> <p>so here, whats the boolean value of currNode?</p>
c++
[6]
3,182,482
3,182,483
check for valid date issue
<p>I would like to check for a valid date in 'mm/dd/yyyy' format. When I call the function below with <code>isValidDateTime('12/10/2012')</code>, it returns false. Could you please let me know what could be wrong?</p> <pre><code>function isValidDateTime($dateTime) { if (preg_match("/^(\d{2})/(\d{2})/(\d{4}) ([0-5]...
php
[2]
4,699,482
4,699,483
Strict Standard erro in file upload
<p>I have written a PHP script to upload files. But when I press the submit button it gives an error message:</p> <pre><code>Strict Standards: Only variables should be passed by reference in H:\xampp\htdocs\phpTest\upload_file.php on line 4. </code></pre> <p>line 4 is $extension = end(explode(".", $_FILES["file"]["n...
php
[2]
3,492,119
3,492,120
I discovered a bug in javascript function parseInt(). Report this?
<p>I have some zeros prior to a positive integer. I want to remove the zeros so only the positive integer remains. Like '001' will only be '1'. I thought the easiest way was to use parseInt('001'). But what I discovered is that it don't works for the number 8 and 9. Example parseInt('008') will result in '0' instead of...
javascript
[3]
465,606
465,607
delete image from folder PHP
<p>hello i have a folder where i keep my images! <code>"img/filename.jpg"</code> </p> <p>And i have a table with all of my images:</p> <pre><code>&lt;table border="3"&gt; &lt;tr &gt; &lt;td&gt; &lt;?php $files ...
php
[2]
3,679,387
3,679,388
how to disable the browser to give warning in php?
<p>When some thing is divided by 0, the webpage will appear a line of waring like this" Warning: Division by zero in C:\xampp\htdocs\XXXX.php on line 109". How can I solve this problem.</p> <p>Thanks</p>
php
[2]
568,661
568,662
C++ strtok return error
<pre><code>string result="CCY 1.2597 Down 0.0021(0.16%) 14:32 SGT [44]"; char* token; char* buffer[result.length() + 1]; //Space for '\0' strcpy(buffer, result.c_str()); buffer[result.length()] = '\0'; //insert '\0' token = strtok(buffer, " "); while (token != NULL) { /* work with token */ token = strtok(NULL...
c++
[6]
5,524,120
5,524,121
Writing JavaScript from a Custom Control
<p>I'm new to writing custom controls. I have MyCustomControl.cs and in my Render method I want to render out about 50 lines of JavaScript. What's the best way to do this, use the writer?</p> <pre><code>protected override void Render(HtmlTextWriter writer) { writer.write(@"&lt;script type....rest...
asp.net
[9]
5,937,341
5,937,342
Why should avoid using Runtime.exec() in java?
<pre><code> Process p = Runtime.getRuntime().exec(command); is = p.getInputStream(); byte[] userbytes = new byte[1024]; is.read(userbytes); </code></pre> <p>I want to execute a shell command in linux os from java . But pmd reports says don't use java Runtime.exec(). Why? What is the reason ? Is there any al...
java
[1]
5,407,132
5,407,133
Detecting an arbittrary button press on a USB joystick WITHOUT pygame
<p>Is there anyway I could register button pushes on a joystick without using any function from pygame? </p>
python
[7]
220,787
220,788
How to choose current theme on android
<p>I'm quite new to android dev and would like to know, how can I choose the current theme of the phone. I'm developing on the Galaxy Tab and the current theme is a nice white one (if I go into the settings menu for example). But the default theme in the sdk seems to be Android.Black.</p> <p>I would prefer not to hard...
android
[4]
1,434,106
1,434,107
Are elements of Javascript arrays processed in a defined order?
<p>For example:</p> <pre><code>var a = []; function p(x) { a.push(x); } [[p(1),p(2)],p(3),[p(4),[p(5)]],p(6)] a == [1,2,3,4,5,6] // Always true? </code></pre> <p>Is 'a == [1,2,3,4,5,6]' defined behavior? Can it be relied upon?</p>
javascript
[3]
1,128,247
1,128,248
how to copy array to array
<pre><code>var ce_info=[ {location:"inchannel",name:"Jae Jung",volume:"50",url:"img/jae.jpeg",group:1}, {location:"inchannel",name:"Houston",volume:"50",url:"img/houston.jpeg",group:1}, {location:"inchannel",name:"Jun kuriha..",volume:"50",url:"img/jun.jpeg",group:1}, {location:"inchannel",name:"Andrea Melle",volume:"5...
javascript
[3]
1,269,611
1,269,612
How to place the selected Li in h4 using jquery
<p><a href="http://jsfiddle.net/soul/EamPb/" rel="nofollow">complete code JSFIDDLE</a></p> <p>as shown in the code the selected state comes below the h4 , how to display the selected state in h4 and after selecting a state it just shows that particular state and not able to select other states</p>
jquery
[5]
3,631,341
3,631,342
append data to url in android
<p>Hello In my android application i am trying to append data to url.But the data is not getting appended.Below is my code.Please correct me.</p> <p>URL url=new URL("http://220.226.22.57:8780/WEB-3/client/requests/sgduTimeStampRequest.action");</p> <pre><code> HttpURLConnection conn = (HttpURLConnection) url.o...
android
[4]
1,512,066
1,512,067
Autofill feature with Listbox in asp.net
<p>i have a Listbox with items being 'first name' loaded from a table of a database, </p> <ol> <li>now i want an autofill feature where if a user types like 'a' all the names starting with 'a' first name should be show in the listbox</li> <li>and after some button click the original data should be repopulated in the l...
asp.net
[9]
4,124,540
4,124,541
Enable/disable button based on condition shows alert two times
<p>I have two input fields and two buttons in a row. Like that having 3 or more rows in a page. For each row i need to enable the two buttons only when the two input fields have any value. I gave id for two buttons like this.</p> <pre><code>&lt;a href="#" style="margin: auto;" id="first_link"&gt;&lt;/a&gt; &lt;a href=...
jquery
[5]
978,215
978,216
Adding video files in iPhone
<p>I am new to iPhone. I need sample code for how to add video files in iPhone.</p>
iphone
[8]
3,921,563
3,921,564
Using getGeneratedKeys() Java
<p>Can anyone see how I'm missuing this ResultSet? I'm getting the below errors from "customerID = rs.getInt(1)"</p> <p><a href="http://pastebin.com/YJvQjy3L" rel="nofollow">http://pastebin.com/YJvQjy3L</a></p>
java
[1]
2,700,307
2,700,308
how to solve this type of compilation error?
<pre><code>import java.net.*; import java.io.*; public class DjPageDownloader { public URL url; public InputStream is = null; public DataInputStream dis; public String line; public static void main(String []args){ try { url = new URL("http://stackoverflow.com/"); ...
java
[1]
4,254,123
4,254,124
How to include my application as a dialing option when calling from the addressbook?
<p>I need to include additional dialing options in the menu appearing after pressing "Call" over a contact (<a href="http://i.stack.imgur.com/JpOis.png" rel="nofollow">Screenshot</a>). </p> <p>I'm trying to do it with action-filters for the DIAL and CALL intents without any success.</p> <p>I know this is possible ...
android
[4]
3,438,919
3,438,920
On Nexus ONE, getting RESULT_ERROR_GENERIC_FAILURE when trying to use SmsManager.sendTextMessage()
<p>I've been successfully testing my app which sends a text message to another phone number. The problem came when I sent this to a buddy that has the Nexus One. I added a pending intent to sendTextMessage() and saw I'm hitting: <code>RESULT_ERROR_GENERIC_FAILURE</code>.</p>
android
[4]
427,409
427,410
Change color of hover element?
<p>I want to change the background color on an element when I hover on it, but i won't work!?</p> <pre><code>$(document).ready(function(){ $(".walkingRoute-container").hover(function(){ $("walkingRoute-container").css("background","#02baff"); }); }); </code></pre> <p>Preciate som help. Thanks!</p>
jquery
[5]
5,555,439
5,555,440
Obtain the first id from a sorted Array through Comparator
<p>I use the following method to sort an array from an sqlite database:</p> <pre><code>public void sortNearby(final double lat, final double lng) { Arrays.sort(videoLocationsDB, new Comparator&lt;VideoLocationDB&gt;() { @Override public int compare(VideoLocationDB lhs, VideoLocationDB ...
android
[4]
1,161,551
1,161,552
Check boxes in a listView
<p>I have a listView each item of which consists of a chechbox, an imageView and a textView. The android application gets some data from the server(which takes the data from a database) and puts these data as items in the list and the user can also add some new data in this list. I have set the visibility of the checkb...
android
[4]
300,035
300,036
C++ creating object based on condition
<p>I create an object based on a command line option.</p> <p>In C++</p> <pre><code>Capture *cc = NULL; if ( argv[2] == "capture" ) cc = new Capture(&lt;some args&gt;); </code></pre> <p>Now to use this at different parts of the code, should i create a CaptureStub that contains dummy functions so that null pointer i...
c++
[6]
3,604,496
3,604,497
Dynamic database record in iphone
<p>I am making an iphone application in which there is use of database. But this database records must be dynamic means record get stored in database when user make entry in iphone application. It need dynamic record.</p> <p>Anyone know about it? Please help me.</p> <p>Thanks alot. </p>
iphone
[8]
2,999,608
2,999,609
Can i change the value of local variable sitting inside the function in PHP?
<p>I was reading an article about Data Encapsulation in PHP, and the author explained in such a way that it made me to wonder if this is really possible? here is what he said. </p> <blockquote> <p>The primary purpose of encapsulation (scope) is to ensure that you write code that can't be broken. This applies t...
php
[2]
4,066,705
4,066,706
Android VM heap - heapsize. Is this normal?
<pre><code>ID Heap Size Allocated Free % Used #Objects 1 7.383 MB 3.551 MB 3.832 MB 48.10% 65,709 </code></pre> <p>That's what I see in DDMS. I have no sense of what's reasonable, but seems like a lot to me. I guess % used refers to percentage of heap size that allocated is u...
android
[4]
4,535,291
4,535,292
SQLite Android Project and Android Library
<p>I have the following ones:</p> <ul> <li>One main Android application.</li> <li>One Android library project.</li> </ul> <p>The main project adds the library project. The problem is, I need same Database and same data model for both apps. I need access same tables of the database and I also need the same data model ...
android
[4]
391,695
391,696
How big data can we transfer between iPhone applications
<p>Hello guys I want to use "Custom URL Scheme" to transfer data from application to other application in iPhone. Can I ask: How big data can we transfer from app to app?</p> <p>Thank you!</p>
iphone
[8]
4,300,734
4,300,735
Getting music artist(bands) from allmusic.com api
<p>Is there any api for allmusic.com means to getting all music artist in a Json file or Xml file like getting cover art from api <a href="http://infolife.mobi/api/cover_hunt.php?keyword=Janis" rel="nofollow">http://infolife.mobi/api/cover_hunt.php?keyword=Janis</a> Joplin please any one provide api url to get all the...
android
[4]
27,636
27,637
set DateTime to start of month
<p>How to get the DateTime to start of month in c#?</p>
c#
[0]
2,991,559
2,991,560
resolveUri failed on bad bitmap
<p>i want to display image on button click ..i have url for image in an array and my code is allright but problem is when i click on button it gives information on log cat that: resolveUri failed on bad bitmap what to do now ???pls help me....thanks in advanse</p> <pre><code>private String[] imageList = {"http://www....
android
[4]
1,443,282
1,443,283
Android notification on web site content updation
<p>I am creating a website application. The website is actually coded in php. In the website there is an option to post comments by users who are logged in to the site. Actually I wanted to show notification on the android device even when the application is not running . Can anyone please suggest an idea for doing th...
android
[4]
1,108,217
1,108,218
Querying a database from a remote service
<p>I have been working on this little music player for a while and I have been stuck for quite a couple of days in creating a now-playing list. I was thinking about storing it inside the database back end. Well, I have a remote interface and what I would like to do is that I would like to query and retrieve data from t...
android
[4]
4,987,626
4,987,627
how do I center a label i android?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5347341/how-to-align-center-the-title-or-label-in-activity">How to align center the title or label in activity?</a> </p> </blockquote> <p>Simple question, I have made a dialogbox with a label at the top. The lab...
android
[4]
3,896,002
3,896,003
brackets in php templates
<p>I have a script, and now it's the perfect time to have an option to change <code>theme</code> templates. </p> <p>I was looking forward to store these files in <code>php</code> files, or html files. with <code>CSS</code> file. I looked over some codes and I found that they use brackets to refer to the variable.</p> ...
php
[2]
4,396,822
4,396,823
Unexpected Indent error in Python
<p>I have a simple piece of code that I'm not understanding where my error is coming from. The parser is barking at me with an Unexpected Indent on line 5 (the if statement). Does anyone see the problem here? I don't.</p> <pre> def gen_fibs(): a, b = 0, 1 while True: a, b = b, a + b if len(str(...
python
[7]
2,025,114
2,025,115
Implementing Undo Redo on CALayer
<p>How to Implement Undo and Redo Functionality on CALayer. Please help.</p> <p>Thank you.</p>
iphone
[8]
1,114,944
1,114,945
How to build a last login script using PHP?
<p>I was wondering how can I create a last login script using php.</p>
php
[2]
3,907,309
3,907,310
Android Menu alignment
<p>Hi in my application i have menu that contain 4 option , i need to align the menu in the following format, 2X2 </p>
android
[4]
2,091,524
2,091,525
Streaming music to android with .pls files
<p>I've read several places that I cannot stream .pls files with the <code>MediaPlayer</code> class in the android SDK. When I open the the .pls files, which contains several URLS like this one:</p> <pre><code>[playlist] numberofentries=7 File1=http://88.190.24.47:80 Title1=(#1 - 174/900) French Kiss FM Length1=-1 Fil...
android
[4]
5,490,772
5,490,773
Exclamation mark doesn't work in trigger() when using event namespace in jQuery 1.9
<p>Here is the code:</p> <pre><code>$("div").on("click",function(){ console.log("click"); }); $("div").on("click.plugin", function(){ console.log("click.plugin"); }); $("button").click(function() { $("div").trigger("click!"); }); </code></pre> <p>and the HTML: </p> <pre><code>&lt;div&gt;test...
jquery
[5]
1,054,986
1,054,987
How to pass a c structure from native c library to java and access its elements
<p>I have a structure defined in my native c library and i want to pass it to the java. In java then i want to access this structure elements. How to do this. Can anybody explain me with one example showing both c and java code. I will definitely appreciate for the help. Please help me as soon as possible.</p>
android
[4]
3,359,247
3,359,248
Circular SIngly LInked LIst , ADDing a new node and displaing it
<p>Neither of the compilers I've used are able to debug it. I am trying to add a new node at the end of the list and then displaying it,,, they are not showing any sort of errors , both give a send dont send error by windows , I think this may be a memory leak..Please help me</p> <pre><code>#include &lt;iostream&gt; #...
c++
[6]
5,514,551
5,514,552
Pulling class elements into an array and then summing them up
<p>I'm extremely new to Javascript and I need some help to do this. The classes will be pulling from different tables (like below). I just need a way to pull all the cell values out of each class and sum them up. So classone = 1234 + 1234. I'm confused as to whether document.getElementByClassName works? Any help would ...
javascript
[3]
5,325,568
5,325,569
What am I gonna do with that AppID?
<p>I had to make a new AppID in order to get my provisioning profiles working. But I completely forgot: If I make an AppID with no wildcard, I can only run those apps on my test device that have this AppID?</p>
iphone
[8]
4,220,394
4,220,395
Android: Edittext with hint
<p>Hi i have a edittext with hint ..what iam trying to implement is whenever i am getting the info into the Edittext or when the user types into the edittext..the hint should stay and text user types should start below or beside hint...<strong>can we make the hint permanent?</strong>.or is there any way we can implemen...
android
[4]
65,829
65,830
Empty input field before deleting w/jQuery
<p>I have a page where I append a delete icon to certain form text fields:</p> <pre><code>$(this).parent().append(\'&lt;span class="remove" onclick="$(this).parent().remove(); return false"&gt;&lt;span class="delete"&gt;&lt;/span&gt;&lt;/span&gt;\'); </code></pre> <p>and I get</p> <pre><code>&lt;div&gt; &lt;inpu...
jquery
[5]
3,697,090
3,697,091
PHP rating system
<p>I have a table (review) which stores the values (1-5) for ratings. I will use the sum of these ratings for the overall score.</p> <p>I have 5 stars on the page which will show on or off depending on the overall value.</p> <p>I have the overall score by counting the total value of all the ratings divided by the num...
php
[2]
3,551,480
3,551,481
ASP.Net rebuilds on each request
<p>I have an asp.net application, installed on a 2003 server.</p> <p>I have a main installation on a dir called X, and a test installation installed on a dir called X_test.</p> <p>When I installed a new version of my code to X_TEST - that web site (the one on the test) rebuilds the dlls on each request, resulting in ...
asp.net
[9]
44,572
44,573
Accessing Global Vars & Functions in custom php page
<p>I have created a php page called "test.php" and uploaded this file to the root folder of my wordpress installation.</p> <p>This file contains only this:</p> <pre><code>&lt;?php if ( is_user_logged_in() ) { blah..... } ?&gt; </code></pre> <p>I need to check if user is logged in and if so, get some details.</p> <...
php
[2]
4,422,121
4,422,122
Nested IF's with jQuery's help
<p>I'm brand new to JQuery - thought it might be good to pick it up for a project I'm taking part on. Basically I want to create a form of sorts, and each time a question on the form is answered, a new question appears depending on the answer. I've got a bit of pseudo code written for it and could probably write it in ...
jquery
[5]
760,631
760,632
ASP.NET File uplading:Show Progress to User
<p>I have an ASP.NET page where i want to use a file uploading facility for the user.in ASP.NET ,we have an ASP.NET File upload control.I want the site to show some upload progress back to the user when he uploads the file to the site.IF i use ASP.NET file upload control,It will use the post back and it will not give t...
asp.net
[9]
5,691,842
5,691,843
How do I remove part of a filename using listIndexOf()?
<p>I have these files :</p> <pre><code> Hingga Akhir Nanti - Allycats_part001 , Hingga Akhir Nanti - Allycats_part002 , Hingga Akhir Nanti - Allycats_part003 </code></pre> <p>I would like to remove the <code>"_part001"</code> onwards and replace it with extension <code>.mp3</code> for all files in the folder ..</p> ...
java
[1]
1,498,799
1,498,800
Preview aspect ratio is different on different devices
<p>in my app I have a preview screen. On one device (LG, with Android 2.2, 320x480 screen) and another one (HTC, with Android 2.3, 480x800 screen) everything is OK. In both cases the list of supported preview sizes include one that fits the screen size exactly, I choose it and the image is perfect. The problem comes wi...
android
[4]
4,427,054
4,427,055
constructor error , cannot find
<p>it says cannot find Constructor Person() in class person, but i have class person. heres my code</p> <pre><code>public class Person{ private String name; private int age; public String details; public Person(final String name, final int age){ this.name = name; this.age = age; }...
java
[1]
1,344,010
1,344,011
How to navigate the user from floor to floor using android application
<p>I have the requirment to navigate the user from floor to floor using wifi and gps. If user have have android tablet with wifi connection and walking to get lattitude and longitude .I have to draw or voice recognition to go left or right to tell to the user.Is it possible? if it is can anybody tell how to dO?</p> <p...
android
[4]
1,373,144
1,373,145
Is there a way to change multiple items? [Hard to describe, example inside]
<p>I'm struggling a bit in how to put this into words coherently, so I'll just use an example and hope it gets the message across.</p> <p>Take the game Othello (Reversi) for example. I can program the logic behind the game, that is to say I can determine which pieces are to have their colors changed after each turn.</...
java
[1]
4,549,968
4,549,969
How to read and send resource?
<p>I need to generate and send log data to the mail in <code>csv</code> format. Here is my code:</p> <pre><code>public function sendMail(){ $csv = $this-&gt;createCSV(); $subject = $this-&gt;getMessage('subject'); $message = $this-&gt;getMessage('message'); $headers = $this-&gt;generateHeaders($csv, $m...
php
[2]
1,009,811
1,009,812
Is this a dialog or activity?
<p>When you long press on an email in Gmail application the dialog box is shown. I'm wondering is it just a dialog or an activity represented as dialog? Thank you. <img src="http://i.stack.imgur.com/dWg6E.png" alt="enter image description here"></p>
android
[4]
5,985,435
5,985,436
Scoring in Android
<p>I have a quick android mini game and I was wondering, when a monster exits the screen (I already have that function ready) I need it to somehow -1 from the current lives alue.</p> <p>I want to make it the player has 5 lives.</p> <p>I understand how to declare variables and minus from it but i also have a label, th...
android
[4]
3,629,079
3,629,080
Passing List<T> as query string
<p>I have a List having country names in the list. And this list needs to be sent as one of the parameters in Response.Redirect(page). </p> <p>Is there a straight forward way to do this, so that in the recieving page, I can type cast the query string to List and use it.</p> <p>Thanks, Sriram</p>
asp.net
[9]
5,645,175
5,645,176
Convert Window desktop application into Window service
<p>I have a window desktop application, developed in C#.NET (.NET framework 4.0), but now I want to convert it into window services. There is one Window Form in desktop application. How is it possible? Any code or helping link is welcomed.</p> <p>Thanks</p>
c#
[0]
1,487,794
1,487,795
How to display current date and time as toast message in Android
<p>How to display current date and time as toast message</p>
android
[4]
3,518,495
3,518,496
how to identify whether X and y coordinates of touch lie with in range of bitmap image or not
<p>here is the code snippet to get bitmap and i am using Touch Event to get the coordinates</p> <pre><code>`BitmapDrawable drawable = (BitmapDrawable) view.getDrawable(); Bitmap bitmap = drawable.getBitmap(); float x=event.getX(); float y=event.getY();` </cod...
android
[4]
4,945,135
4,945,136
Launching a modal UINavigationController
<p>I'd like to launch a modal view controller the way one does with 'ABPeoplePickerNavigationController' and that is without having to creating a navigation controller containing the view controller.</p> <p>Doing something similar yields a blank screen with no title for the navigation bar and there's no associated nib...
iphone
[8]
3,992,242
3,992,243
Whitespace name of variables
<p>I want to set variables in javascript with a blank name (to obfuscate). It will render something like this :</p> <pre><code>var ='hi'; </code></pre> <p>Here is a link that could help : <a href="http://mathiasbynens.be/notes/javascript-identifiers" rel="nofollow">http://mathiasbynens.be/notes/javascript-identif...
javascript
[3]
5,790,036
5,790,037
In java can an abstract method be anything other than public?
<p>In java can an abstract method be anything other than public? Are abstract methods implicitly public or are they package if you don't specify? (regular methods are implicitly package right?) are there any visibility modifiers that an abstract method can't have? (private strikes me as problematic)</p>
java
[1]
4,562,229
4,562,230
How can I erase a printed output line?
<p>What code would I have to add, replacing the comment, to print 1 &amp; 3 only?</p> <pre><code>main() { cout&lt;&lt;" 1 "&lt;&lt;endl; cout&lt;&lt;" 2 "&lt;&lt;endl; /* Code here to remove above " 2" line on output screen */ cout&lt;&lt;" 3 "&lt;&lt;endl; } expected output: 1 3 </code></pre> <p>...
c++
[6]
5,242,928
5,242,929
What is platform useragent of the windows platfom?
<p>I am posting the requesting request uisng "POST" method, In mac platform uaser agent is 10.6.2. But the in windows waht is platform user agent.</p>
c++
[6]
2,778,072
2,778,073
Memory leakage check of C++ program report in malloc/free?
<p>I suspect my C++ program has a memory leakage problem. If I run it with some high load configuration, it finally get killed by the system (linux). I used top command to monitor the program, it consumes high percentage of memory. Then I get valgrind to help.</p> <p>It reports that </p> <pre><code>malloc/free: 18,55...
c++
[6]
5,710,362
5,710,363
logged in function for both logged in and logged out
<p>okay this is tricky, i need this to work or be shown for both of those logged in and logged out. But with this code, if set to "true" and "false" either only those logged in or only those logged out can see the corresponding information. How can i get it to work for both situations? here is the code:</p> <pre><code...
php
[2]
5,364,117
5,364,118
Downloading a variable
<p>Is it possible, in Javascript, to prompt user for downloading a file that isn't actually on the server, but has contents of a script variable, instead?</p> <p>Something in spirit with:</p> <pre><code>var contents = "Foo bar"; invoke_download_dialog(contents, "text/plain"); </code></pre> <p>Cheers,</p> <p>MH</p>
javascript
[3]
240,616
240,617
preg_replace() help
<p>i need to replace combobox like this. eg:- </p> <pre><code>&lt;select sistem="" name="answer5" &gt; &lt;option&gt;math&lt;/option&gt; &lt;option&gt;science&lt;/option&gt; &lt;option selected="selected"&gt;engineering&lt;/option&gt; &lt;option&gt;English&lt;/option&gt;&lt;/select&gt; </code></pre> <p>result shul...
php
[2]
2,078,373
2,078,374
problem with import qt in python
<p>I want to use qt with python. "import qt" return me :"ImportError: No module named qt". I already instaled pyqt.</p> <p>what I hve to install in order to activate "import qt"</p> <p>Thank You </p>
python
[7]
4,159,262
4,159,263
Problem with implementing iAd into iPhone application
<p>okay so i have completely followed multiple tutorials step by step including this one <a href="http://bees4honey.com/blog/tutorial/how-to-add-iad-banner-in-iphoneipad-app/" rel="nofollow">iAd Tutorial</a></p> <p>and using apples official sample code.. everytime i get the errors: "_CGRectOffset" Referenced from: and...
iphone
[8]
3,797,260
3,797,261
How to call an activity inside a fragment
<p>I have created a fragment inside an Activity, and now I want to open another application/Activity inside this fragment, Result that I want is, both the activities should be seen on the display (it should not open in another window). Please let me know how can I achieve this.?</p>
android
[4]
2,605,810
2,605,811
UITableView on scroll doesn't call didSelectRowAtIndexPath
<p>I have a UITableView with one section. If I click on a cell, the didSelectRowAtIndexPath is triggered as expected. but if the tableview has more rows than that can be shown in a single screen, and if I vertically scroll the tableview and click on a row, the didSelectRowAtIndexPath is not called. It is only triggered...
iphone
[8]
4,086,323
4,086,324
Is it possible to place a viewflipper and sliding drawer in the same screen
<p>Is it possible to place a viewflipper and sliding drawer in the same screen</p>
android
[4]
5,752,735
5,752,736
Images are not fitting in the Motorola Razr 4.7 screen
<p>I am testing my app on different devices and on the Motorola Razr the images are smaller and the layout is not fitting correctly.</p> <ol> <li>This device's screen size is categorized as normal. Just like the different devices I am testing on.</li> <li>I put all my images in 5 different drawable folders(drawable-hd...
android
[4]
925,944
925,945
How to use blender on Android
<p>I want to develop a small game in Android. But for this I need to get animation into my Android project. Can I use blender to create animations and then port it into Android. If not then what other software can I use to create animation on Android. Are there any tutorials for this on the net.</p>
android
[4]
5,543,927
5,543,928
Unexpected mathematical output
<p>I am trying to count my eggs in an exercise in Learning Python the Hard Way. The formula for counting the eggs is:</p> <pre><code>print (3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6) </code></pre> <p>and the suggested answer is <code>7</code>. I am getting <code>6.75</code> and have no idea why, I think I am putting it in c...
python
[7]
2,882,268
2,882,269
Java milli second precision
<p>Is there a Java API/suggestion to use instead of System.currentTimeMillis() to get current time in milli second precision on windows - requirement is two subsequent calls with a sleep time of 1ms in between should give two different time - currently i need to explicitly sleep for 15 ms to get different times</p>
java
[1]
1,335,054
1,335,055
why can't write the number to it?
<pre><code>&lt;ul class="newsct"&gt; &lt;li&gt;&lt;span class="listnum"&gt;&lt;/span&gt;&lt;a href="#"&gt;test&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="listnum"&gt;&lt;/span&gt;&lt;a href="#"&gt;test&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="listnum"&gt;&lt;/span&gt;&lt;a href="#"&gt;test&lt;/a&gt;&lt;/li&...
jquery
[5]
2,088,071
2,088,072
which is simple way to create layout android
<p>I want to display For each and every tab different layout so what a easy way to display </p> <ol> <li>Create different layout and add or merge in.</li> <li>Create only one layout for different tab and set visiblity to gone and visible.</li> </ol> <p>Which one is easy way or other way please tell me.<br> Here attac...
android
[4]
3,793,167
3,793,168
conditional based on month
<p>I'm looking to create an if/else statement that first checks to see if the current month is >= January and &lt;= July (basically any month from Jan-July. If it is, display code snippet a. If not, than show code snippet b. I'm just learning PHP, and I haven't had any luck on google. Thanks!</p>
php
[2]
1,302,129
1,302,130
Chained Python class invocations
<p>I am trying to build a set of classes to define hierarchical properties for protocols in the OSI stack... in an abstract sense, I just need to inherit properties from parent python classes, but I need to be able to invoke the entire class chain at once... so, I'm looking for something like this...</p> <pre><code>#!...
python
[7]
5,793,819
5,793,820
Display information in Java GUI
<p>The code below is my attempt at creating a simple GUI to ask a user to input information relating to a book and display it. the problem is i'd like to display the questions i.e. enter title, enter author etc. in one go rather than each one displaying one at a time as in the code i've written so far, also i want to...
java
[1]
2,445,119
2,445,120
How handler classes work in Android
<p>I am new to android and was reading the demo applications on official android website. And I came across a method of Handler class named as <code>postDelayed(Runnable r, long milliseconds)</code>.</p> <p>Can anybody please explain what this method does ?</p> <p>Thanks.</p>
android
[4]
268,270
268,271
How to access the content of a map and process it in java?
<p>I’m reading access logs files and grouping by IP and storing it in a map. At the end I get each IP as the key and the values are the date and urls. I’m storing the values as a list.</p> <pre><code>HashMap&lt;String,List&lt;String&gt;&gt; map = new HashMap&lt;String,List&lt;String&gt;&gt;(); </code></pre> <p>The re...
java
[1]
4,356,747
4,356,748
using aspx controls in base class
<p>I've got two aspx pages which are very similar and have various identical functions in the code behind. I'd like to create a base class which both the code behind classes derive from. Is it possible for the base class to access the controls on the aspx page. For instance:</p> <pre><code>class base inherits Syst...
asp.net
[9]
5,335,866
5,335,867
Changing time into timestrings in PHP
<p>On my website we store all time &amp; date in the following format:</p> <p>Table Column: Date - 16.01.2012 Table Column: Time - 06:36:50pm</p> <p>This has been causing problems with those who live in different timezones, therefore we are looking at changing this to simple time() strings, however because theres a l...
php
[2]
2,584,863
2,584,864
how to get only the displayed part of text from richtext box
<p>I want only displayed text from richtext box in string form</p> <p>I have found the initial linenumber and last linenumber through</p> <pre><code>Point pos = new Point(0, 0); int firstIndex = this.GetCharIndexFromPosition(pos); int firstLine = this.GetLineFromCharIndex(firstIndex); //now we get index of last visi...
c#
[0]
401,390
401,391
How can i display swf file in asp.net flash control?
<p>I have used asp.net flash control to display flash file in asp.net, but it doesnt work for me.</p> <p>Here is the code I used:</p> <pre><code>&lt;ASPNetFlash:Flash ID="Flash1" runat="server" PlayerVersionAutoDetect="true" MovieURL="flash/cube.swf"&gt; &lt;...
asp.net
[9]