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
865,452
865,453
storage allocated on class definiton
<p>Given the following definition:</p> <pre><code> class C{}; </code></pre> <p>How much space gets allocated? What are the methods created at this stage? Now I thought space is not allocated until instantiation but I guess this is only partly true. Edit: I checked in my compiler sizeof(C) but it is 1 byte though ...
c++
[6]
4,480,764
4,480,765
application supporting multiple language
<p>how to make my application support multiple language and automatically use the language defined for IOS user</p>
iphone
[8]
5,889,095
5,889,096
Do you think that storing a variable length encoding in std::string or std::wstring is OK and do you do it?
<p>I'm kind of horrified that people actually suggest using UTF-8 inside a <code>std::string</code> and are OK with UTF-16 <code>std::wstring</code>.</p> <p>Do you actually do this? Do you think that it is OK?</p>
c++
[6]
422,807
422,808
editing values stored in each subarray of an array
<p>I am using the following code which lets me navigate to a particular array line, and subarray line and change its value.</p> <p>What i need to do however, is change the first column of all rows to BLANK or NULL, or clear them out.</p> <p>How can i change the code below to accomplish this?</p> <pre><code>&lt;?php ...
php
[2]
3,740,546
3,740,547
Android SOAP problem
<p><strong>I m making an application using SOAP in android. Actually i want to do login functionality by calling web service on click of login button.</strong> In this i want the user to log in into application by checking that the user is registered or not(Webservice is sending successfull or failed respose). can anyb...
android
[4]
4,376,318
4,376,319
How to give runtime name to Dictionary in c#?
<p>I am making application in c#. In that application i want to create the dictionary run time.Here i am getting data from different ports like 1000,2000,3000 etc. Here i want to create the dictionary run time with name as Dictionary1000, Dictionary2000, Dictionary3000 etc. But i am not able to do it. Please help me. ...
c#
[0]
3,040,393
3,040,394
Cannot use a leading .. to exit above the top directory error
<p>"Cannot use a leading .. to exit above the top directory" I am Using windows authentication in my project,when i set a form as a startpage i get th above error.please suggest</p> <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/TravelsMaster.master" AutoEventWireup="true" CodeBehind="AgentMaster....
asp.net
[9]
3,498,147
3,498,148
option selector based on text
<p>Everywhere on SO there is only selector via <code>value</code>, but I want to select <code>option</code> based on it text.</p> <p>For example, I have this:</p> <pre><code>&lt;select id="some-id"&gt; &lt;option&gt;1&lt;/option&gt; &lt;option&gt;2&lt;/option&gt; &lt;/select&gt; </code></pre> <p>How get opti...
jquery
[5]
4,825,963
4,825,964
default border color for .net textbox
<p>I change the border style and border color on a .net textbox to solid red respectively. After a postback I am attempting to return the textbox to its default values, but I cannot seem to get the color right. I have googled this, and tried to get the default values in the debugger, but the values in the debugger al...
asp.net
[9]
621,910
621,911
Android scrollable TableLayout with a dynamic fixed header
<p>I have a <code>TableLayout</code> inside a <code>ScrollView</code>, that is I have a scrollable <code>TableLayout</code>! It is populated dynamically when I create <code>Dialog</code>'s in different places of an <code>Activity</code>. </p> <p>Actually everything works fine, but the fact that for every case there's ...
android
[4]
5,520,879
5,520,880
Notifications for WIFI, Bluetooth, Camera, SMS, CAll
<p>I like to implement a application which runs in the background and should check wheather the wifi, camera, bluetooth settings are changed (i.e. wheather it is turned on or off), and incoming calls, outgoing calls, outgoing sms, mms etc. Is there any way to get notifications for the above change in settings such that...
iphone
[8]
5,467,132
5,467,133
NSArray Memory Management
<p>For some reason when I release the NSArray I get the EXC_BAD_ACCESS exception. Here is the implementation: </p> <pre><code>-(void) loadAllAlphabets { NSBundle *bundle = [NSBundle mainBundle]; NSArray *imagesPath = [[NSArray alloc] init]; imagesPath = [bundle pathsForResourcesOfType:@"png" inDirectory...
iphone
[8]
5,853,846
5,853,847
Submit Button randomly Vanished. Any ideas?
<p>I have a very simple image upload web app. There's only upload and image crop. Everything worked fine. I have not made any changes to the code or anything. Today I visit my site and the submit button has vanished. I thought maybe I was hacked. I tried the version of my site that I have on my own machine running in I...
asp.net
[9]
126,800
126,801
javascript where to put the var statement
<p>I have a function that looks like this:</p> <pre><code>function SomeFunction() { var SomeVar; if (SomeCondition) { SomeVar = 4; } } </code></pre> <p>This is equivalent to:</p> <pre><code>function SomeFunction() { if (SomeCondition) { var SomeVar = 4; } } </code></pre> <p>Does using the var...
javascript
[3]
1,726,430
1,726,431
python global variable __name__ (a newbie question)
<p>What are the following names when I first start my python shell? They do not look like functions from <code>__builtins__</code>:</p> <pre><code>&gt;&gt;&gt; dir(__name__) ['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getn...
python
[7]
2,595,239
2,595,240
Using a pow(2) var for error, convert to readable codes
<p>I know it's possible, but it is doing my head in.</p> <p>Imagine having an array of codes with their description.</p> <pre><code>array( 0 =&gt; "Success", 1 =&gt; "File Not Found", 2 =&gt; "Could not create file", 4 =&gt; "Directory not found", 8 =&gt; "Directory could not be created", 16 =&gt; "Disk damaged" ) </...
php
[2]
4,798,379
4,798,380
Using Current Location from Location Manager in a Google Maps openURL?
<p>Been looking into this for a while today however I can't seem to get my head around how to get the users current location into a Google Maps URL to open the Google Maps app with directions populated.</p> <p>I've taken this code from another tutorial and added it into my app. I need to get the "start" lat/lng from t...
iphone
[8]
4,490,608
4,490,609
Is Passing a Parameter to a method the same as creating an object?
<p>I am learning Servlets and JSP. I am wondering about the "doGet" and other methods that may be overidden. The "doGet" takes 2 params - HTTPServletRequest request, and HTTPServletResponse response. This is my question: The request and response objects are used within the method body but I do not see any object creati...
java
[1]
2,909,265
2,909,266
Printing capabilities in android
<p>I have made research on printing capabilities in android and came to the solution that there is no official sdk available and printing via Bluetooth is not possible.</p> <p>There is a third party api provided by send2printer app.when i supposed to run the project i got the "Beta Expired" message.</p> <p>non offici...
android
[4]
2,918,072
2,918,073
Connecting QC using JAWIN
<p>How to connect QC(OTAClient.dll) through <a href="http://jawinproject.sourceforge.net/" rel="nofollow">Jawin</a>. Confused over </p> <pre><code>Dispatchptr("TDApiOle80.TDConnection") </code></pre> <p>I cannot use Jawin Type Browser. </p>
java
[1]
2,452,494
2,452,495
use javascript to split this string "text[99][text]"
<p>I have some input text field in a form that have name with this format: <strong>sometext[234][sometext]</strong></p> <p>Something like <code>&lt;input type="text" name="user[2][city]" /&gt;</code></p> <p>I need obtain 'user','2' and 'city' with split function.</p> <p>Thank you </p>
javascript
[3]
4,354,743
4,354,744
Change content of my page which is already live
<p>I am creating an .aspx page at run time , when admin opens it, admin can change its content, the data on this page is not binding from database or this page does not contains an gridview. it is created by using literalControl. my page is live on net can i change content permanently. </p>
asp.net
[9]
5,945,510
5,945,511
Without creating activity open new screen in android
<p>I just want to know it is possible to open new screem without creating activity. (Means I don't want to create activity and open screen). I don't want to use dialog.</p> <p>EX. I have Two class. 1st is my main activity with one button, from where I want to open new screen. And 2nd is my custom class which extends l...
android
[4]
3,032,719
3,032,720
Pulling or Auto Populate A Form Input Field
<p>Ok i am trying to find if this is possible, i have a single page that has two login forms. But uses the same username and password. Is it possible whereas once i log into one form my username is pulled from the from that already has my username and the password is pulled from the database? </p> <pre><code>&lt;form ...
php
[2]
1,474,378
1,474,379
When i kill the application in multitasking bar,and run the program it's goes to same state where i was closing the app
<p>Today i updated my 3GS i-phone to install my application to see it's functioning well in OS4,when i'm running the application and tap the home button it's goes to multitasking bar,then again i get the application from there it's goes to previous state where i was.i think the behavior is OK. but problem comes when i ...
iphone
[8]
1,168,517
1,168,518
Shoul I use destructor or IDisposable in Console application
<p>Basically I open a database connection when the application starts and it should remain open till the lifetime of the application.</p> <p>I am using console application for this background job:</p> <pre><code>class Program { #region '----- Method(s) -----' static void Main(string[] args) ...
c#
[0]
2,785,113
2,785,114
Can I test Android smartphones applications on Samsung Galaxy Tab?
<p>Can I test Android smartphones applications on Samsung Galaxy Tab ?</p> <p>Let's say I want to develop Android applications for HTC,and I only have Galaxy.</p> <p>Can I simulate smaller resolutions on Galaxy to see how it would work on HTC ? </p> <p>thanks</p>
android
[4]
4,830,475
4,830,476
How to Calculate Percentage for Profile Compltance
<p>I have Create Many tables For User Registration Like Naukri... When i finished registration i have to show user the profile completance ,exactly like naukri way .how can i do it in asp.net?</p>
asp.net
[9]
6,020,661
6,020,662
Parsing a Date given in unknown format to standard format in java?
<p>hi im parsing a csv file with date(custom format), i have to parse the date given in anyformat(mm-dd-yyyy, yyyy/mm/dd , mmm dd yyyy) to a standard format dd/mm/yyyy.</p> <p><strong>The question is how can we find the format in which the date is given?</strong></p> <p>is there anyway to do it?</p> <p>ps: i thinkin...
java
[1]
1,984,870
1,984,871
jQuery Post Success
<p>Hey everbody, im getting some trouble here.</p> <p>When span gets clicked, it sends to a php some data, deleteing from my MySQL something. OK! This is fine. Working.</p> <p>But, when i try to set to jquery hide or fade out a element for me, inside the post action, he doesnt hides it.</p> <p>But when i set it out ...
jquery
[5]
1,116,160
1,116,161
Removing paths/points from MapView
<p>I have drawn something like this:</p> <p><a href="http://i43.tinypic.com/b7ayit.jpg" rel="nofollow">http://i43.tinypic.com/b7ayit.jpg</a></p> <p>How to remove the paths and points?</p>
android
[4]
4,492,837
4,492,838
PHP object invocation syntax
<p>Given a piece of code such as: </p> <pre><code>{$globalScript-&gt;qtip(active_page::getCurrentPageName()=='factsheet','../')} </code></pre> <p>What's the difference in usage in PHP 5 between "->" and "::"? </p>
php
[2]
3,655,751
3,655,752
how to get the source code as register user
<p>i downloaded a sourcecode of a site,but i downloaded it i saw it identify my program as a guest,i search at google and figure out that i can send a cookie when i "ask" the source code. that what i have managed to do and it still dont identify me as register user:</p> <pre><code>CookieContainer cj = new CookieContai...
c#
[0]
1,596,412
1,596,413
jQuery function working Internet Explorer not in Chrome or FF
<p>I have function which gets the table ID and copies the content to clipboard. The function is working properly in IE but not in Chrome or FF. </p> <p>Please could any one help. Thanks! </p> <pre><code>function clipBoard(tbID) { var div = document.getElementById(tbID); div.contentEditable = 'true'; var c...
jquery
[5]
412,059
412,060
when to use destructor in php?
<p>what is the main purpose of a destructor?</p> <p>could you give any examples of what i might want to run when a object is deleted?</p>
php
[2]
2,267,411
2,267,412
Force GridView to only a single row?
<p>Is there a way to force GridView to only be a single row? Right now by default it will extend its height to accommodate all views supplied by its adapter</p>
android
[4]
259,248
259,249
android TabActivity - get Tab Icon from database
<p>I'm new to android app development. I'm developing a TabActivity in which the images for each tab icon comes from the database. any help on how to do this is much appreciated. thanks..</p>
android
[4]
5,407,885
5,407,886
How ASP.NET Web Pages Threading / Multi Tasking Works for Single user?
<p>This Might be a very basic Questing. (URGENT)</p> <p>I have a Web application with multiple pages.</p> <p>When a user is Logged in using Visual Studio(Development) / IIS (Production )</p> <p>If the user have opened a Page 1 from home page which is long running process (Lets say few minutes)</p> <p>Can the same u...
asp.net
[9]
3,217,519
3,217,520
Android: Setting preferences programmatically
<p>I have a small ap with preferences. In this class I've set the onPreferenceClick to get coordinates from the GPS. When the listener returns, my hope was to set the lat / long textedits automatically. I've tried every source sample out there, no luck:</p> <pre><code>public void onLocationChanged(Location l) { Log....
android
[4]
5,485,738
5,485,739
How to create multiple alarm using SQLITE?
<p>i create a one time alarm it works perfectly it showing me alert how to create multiple alarms and stored that in database and according to that it should be ring and display the list on the listview i searched but not getting proper solution here is the link which i refer <a href="http://stackoverflow.com/questions...
android
[4]
3,811,221
3,811,222
Can't convert Celsius to Fahrenheit
<p>Here's my code:</p> <pre><code># Note: Return a string of 2 decimal places. def Cel2Fah(temp): fah = float((temp*9/5)+32) fah_two = (%.2f) % fah fah_string = str(fah_two) return fah_string </code></pre> <p>Here's what I should get:</p> <pre><code>&gt;&gt;&gt; Cel2Fah(28.0) '82.40' &gt;&gt;&gt...
python
[7]
2,614,301
2,614,302
Javascript: Using External Scripts
<p>I am trying to import a simple script into an HTML doc. It won't work and I have no idea what I am doing wrong.</p> <p>Name of external script--> (function.js)</p> <pre><code>window.onload = myFunction; function myFunction() { document.getElementById("HERE").innerHTML = "message"; ...
javascript
[3]
373,819
373,820
param and params usages in c++
<p>I am studying classes in c++ and i came across this snippet of code and i wondering what param was used for.</p> <pre><code>// vectors: overloading operators example #include &lt;iostream&gt; using namespace std; class CVector { public: int x,y; CVector () {}; CVector (int,int); CVector operator ...
c++
[6]
1,333,415
1,333,416
Android USB Automatically Grant Permission
<p>Is there anyway to access the IUsbManager Interface class to call the service.grantDevicePermission() method to automatically set the permission for the USB device without always having the ConfirmationActivity show up asking the user?</p> <p>Thanks</p>
android
[4]
5,000,754
5,000,755
PHP register clicks to callto: link
<p>Is there any way of registering clicks to a callto: link with the use of PHP? I've set up a site for a friend of mine and what I would like to do is to create a log of some sort to show who called who eg. if the current user clicks the callto: link I'd like to add a row to the database like "userX called numberY at ...
php
[2]
5,909,701
5,909,702
how to retrieve the name of checkbox if using dynamic name like this<input type="checkbox" name="<%=i%>" /> in servlet?
<p>if provide the dynamic name to the check box and i want to retrieve name of it in servlet for using its value.. </p>
java
[1]
1,892,198
1,892,199
How do i get the file name on the second time?
<pre><code>public void Save(string path , bool Locked , PictureBox pb) { if (File.Exists(path + "\\" + "DATABASE" + "\\" + wo_name)) { string fnexist = path + "\\" + "DATABASE" + "\\" + wo_name; } string fn = path + "\\" +"DATABASE" +"\\" + wo_name...
c#
[0]
3,394,718
3,394,719
Searching for words in a string
<p>What's the best way to search a string in php and find a case insensitive match?</p> <p>For example:</p> <pre><code>$SearchString = "This is a test"; </code></pre> <p>From this string, I want to find the word test, or TEST or Test.</p> <p>Thanks!</p> <p>EDIT</p> <p>I should also mention that I want to search t...
php
[2]
1,241,067
1,241,068
Javascript - set date 10 days in the future in this format dd/mm/yyyy (e.g. 21/08/2010)
<p>i would really appreciate some help creating some java script that will eventually be used in Selenium that automatically sets a date 10 days ahead from the current date and displays in the following format dd/mm/yyyy.</p> <p>i currently have the script below but i'm not getting anywhere with it. The parts in <stro...
javascript
[3]
3,807,026
3,807,027
Looping over strings in JSON
<p>My JSON looks like this: </p> <pre><code>{"RoomNoList":[{"RoomNo":"ML100"},{"RoomNo":"ML100"},{"RoomNo":"ML100"},{"RoomNo":"ML100"}]} </code></pre> <p>I want to loop over the strings and get <code>RoomNo</code> values.</p>
jquery
[5]
4,140,606
4,140,607
When does a space for a variable get allocated on the stack?
<p>Is space allocated during declaration or initialization:</p> <pre><code>int c; // here c = 5; // or here </code></pre>
c#
[0]
634,178
634,179
How to return an array literal in C#
<p>I'm trying the following code. The line with the error is pointed out.</p> <pre><code>int[] myfunction() { { //regular code } catch (Exception ex) { return {0,0,0}; //gives error } } </code></pre> <p>How can I return an array literal like string literals?<...
c#
[0]
3,128,588
3,128,589
Input string incorrect format
<p>I need help, I'm getting error: Input string had an incorrect format. Thanks in advance.</p> <pre><code>FORM2.CS: public void loadClient(object source, System.Timers.ElapsedEventArgs e) { Form1 f1 = new Form1(); client = Client.GetClients()[0]; short port = short.Parse(f1.returnTBOX...
c#
[0]
1,328,744
1,328,745
Does javascript still execute if I navigate to a different page?
<p>Say I have a set-up like this:</p> <pre><code>$('#mylink').click(function(event){ savePost(); }); &lt;a id="mylink" href="http://google.com"&gt;my link&lt;/a&gt; </code></pre> <p>If I click the link will I be gone to a different page without giving the function a chance to execute?</p> <p>What if savePost() h...
javascript
[3]
1,953,565
1,953,566
Colossal Caves Adventure - access data source using javascript
<p>I've been playing around with the idea of creating a javascript version of the original Colossal Caves Adventure, as a way to teach myself the language. The original data file for the adventure can be found here - </p> <p><a href="http://jerz.setonhill.edu/if/crowther/" rel="nofollow">http://jerz.setonhill.edu/if/c...
javascript
[3]
1,239,334
1,239,335
How can I convert from DWORD RGBA to ints?
<p>I have to convert a DWORD (unsigned long) RGBA to four int vars (R, G, B, and A) So far, I have this function to convert the 4 ints to a DWORD:</p> <pre><code>unsigned long RGBA2DWORD(int iR, int iG, int iB, int iA) { return ((iA &lt;&lt; 24) | (iR &lt;&lt; 16) | (iG &lt;&lt; 8) | iB); } </code></pre> <p>How can ...
c++
[6]
827,688
827,689
Facebook chat using X-Facebook platform
<p>I'd like to implement a jabber client to connect to facebook but taking advantage of facebook connect using C# I tried to do it like the code on facebook which is written in python (<a href="http://wiki.developers.facebook.com/index.php/Integrating_with_Facebook_Chat" rel="nofollow">http://wiki.developers.facebook.c...
c#
[0]
5,147,287
5,147,288
can I hide the perticular column in jquery like this?
<p>I am hiding the entire column in the grid like this?</p> <pre><code>// $('#Grid tr th').each(function(column) { // if ($(this).is('#div.id')) { // hide(); // } // }); </code></pre> <p>can I do like this?</p> <p>thanks</p>
jquery
[5]
728,720
728,721
Is it possible to disjunct two require_once statements with OR operator to use the latter as fallback?
<p>Is there a way to perform double <code>require_once</code> statement where the second one as a fallback if the first one fails?</p> <p>For example: I can do this</p> <pre><code>mysql_query() or die("Boo"); </code></pre> <p>Could I do:</p> <pre><code>require_once('filename') or require_once('../filename'); </code...
php
[2]
3,836,937
3,836,938
problem with angles
<p>Hi this a part of my code : I have a list which its size is three and I consider that 2 last items are in one line (p and q) I need to get the angle between the first item of this list and these two points (p,q)</p> <pre><code> private Point partition(List&lt;Point&gt; list, Point p, Point q) { double x1 ...
java
[1]
2,833,455
2,833,456
A random()-like function without random()
<p>Can I write a JavaScript function from scratch that behaves like <code>Math.random</code>?</p> <p>(By that I mean without using <code>Math.random</code>.)</p>
javascript
[3]
1,445,518
1,445,519
PHP Getting apart of Name in to <a href="
<p>So I have this code: More explanation below</p> <pre><code>&lt;?php include_once 'imdb.class.php'; $oIMDB = new IMDB('Green Lantern'); if ($oIMDB-&gt;isReady) { echo '&lt;li class="withimage"&gt;&lt;span class="name"&gt;' . $oIMDB-&gt;getTitle() . '&lt;/span&gt;&lt;span class="comment"&gt;' . $oI...
php
[2]
3,039,036
3,039,037
URL Decoder not working
<p>I am trying to decode a name string which contains apostrophe. This name string is being parsed in an XML parser, so what I want to do is that the apostrophe should be displayed normally, rather than being displayed as <code>&amp;#039;</code>. I tried using the <code>URLDecoder.decode(myString, "UTF-*");</code> to d...
android
[4]
1,372,731
1,372,732
How can i used "DevExpress v10.2" in VS2010?
<p>How can i used "DevExpress v10.2" in VS2010? and what the reference need to add in webconfig file.</p>
asp.net
[9]
5,122,404
5,122,405
Multiple inheritance and using a method of one of the base classes
<p>I have the following code:</p> <pre><code>class A(object): def __init__(self): self.name = "A" super(A, self).__init__() def Update(self): print "Update A" self.PickTarget() def PickTarget(self): print "PickTarget A" class B(object): def __init__(self): ...
python
[7]
2,033,144
2,033,145
How to check the type name of an object in derived classes?
<p>This is my code:</p> <pre><code>class Base { /* something */ }; class Derived : public Base { /* something */ }; vector&lt;Base*&gt; v; // somebody else initializes it, somewhere int counter = 0; for (vector&lt;Base*&gt;::iterator i=v.begin(); i!=v.end(); ++i) { if (typeof(*i) == "Derived") { // this line is NOT...
c++
[6]
2,966,560
2,966,561
Did anybody use the constream (constrea.h) lib?
<p>Two years ago, I used the conio.h (actually conio2.h for Dev-C++) to create a console form interface. Now I want to make the same thing, but C++ std lib does not provide the needed functions and I don't want to use the old C conio lib. </p> <p>I found some websites which highlights the constream lib, but I have no ...
c++
[6]
165,299
165,300
global variables and mulidimensional arrays outside of main in c++
<p><strong>EDIT #1</strong> So I think my solution is to pass the class around through the functions, si then I have to get the size values in main and pass them into the class. So how would I create a multidimensional array within the class based on 2 int values? This is what I have, but I get the error "`ii' cannot a...
c++
[6]
1,106,262
1,106,263
Php tumblr api situation
<pre><code>&lt;? $jsonString = '{"meta":{"status":200,"msg":"OK"},"response":{"blog": {"title":"happiness.","posts":12215,"name":"random","url":"http:\/\/www.demo.com\/","updated":1354380368,"description":"","ask":true,"ask_anon":true,"share_likes":true,"likes":166 1}}}'; $jsonObject = json_decode($jsonString); ...
php
[2]
1,739,677
1,739,678
adb shell comand: mkdir (for creating a directory)
<p>I am trying to create a directory through adb shell</p> <p>i switched to super user using "su"</p> <p>i have to create a directory in etc folder which was unsuccessful, i could make out that it is linked to the /system/etc and tried to create in /system/etc; both the cases i was getting "Read only File System" how...
android
[4]
2,218,084
2,218,085
what is the most lightweight solution to repeatedly access html element with jquery?
<p>regarding html elements that are being referenced frequently in code, such as a menu that is being shown/hidden often, what is the most lightweight jquery solution to re-access the element multiple times?</p> <p>my current approach is to save the result in a variable (non global of course).</p> <p>example:</p> <p...
jquery
[5]
467,026
467,027
Handle windows calls with in .net program?
<p>I have an application which runs on click of tray icon in windows( developed in C#). I want to minimise the application on click of escape button. how do i accomplish this ? </p> <p>Thanks in advance, Ravi Naik.</p>
c#
[0]
2,181,156
2,181,157
Accessing the private data inside main function
<p>Inside main.cpp</p> <pre><code>class vivek { int i; float d; public: vivek() { i = 4; d = 4.44; } ~vivek() { cout &lt;&lt; "destructor" &lt;&lt; i; } int get() { return i; } }; int main() { vivek *viku = new vivek; vivek *p; p...
c++
[6]
2,687,129
2,687,130
Iterate and process child elements with jquery - proper use of $(this)
<p>I'm trying to get jquery to find pairs of elements, take the value of one, process it and make it the value of the next one, rinse and repeat.</p> <pre><code> $(function() { $("div").each(function() { var longURL = $(this).attr("href"); $(this).html("processed...
jquery
[5]
3,674,173
3,674,174
help with jquery dropdown
<p>I am using simple jquery code to make drop down navigation, but its not giving expected results...</p> <p><strong>jquery code</strong></p> <pre><code>$(function() { $('.nav li').hover(function () { $('ul', this).slideDown(100); }, function () { $('ul', this).slideUp(100); ...
jquery
[5]
4,183,917
4,183,918
how to use Admob in iphone application for Advertisement
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3299598/admob-for-iphone-ipad">Admob for iPhone/iPad</a> </p> </blockquote> <p>i am here for how to make use of Admob in iphone application.</p>
iphone
[8]
5,190,007
5,190,008
What is the effect of "list=list" in Python modules?
<p>I've seen following code in the python standard library <code>/usr/lib/python2.7/multiprocessing/dummy/__init__.py</code>:</p> <pre><code>list = list dict = dict </code></pre> <p>What does this idiom mean? My best guess is: "let's check if <code>dict</code> and <code>list</code> exist". Is it just legacy code from...
python
[7]
3,260,354
3,260,355
android facebook like
<p>I want to integrate a like button in my android app. I used the code </p> <pre><code>likeWebView = (WebView) findViewById( R.id.webView1 ); likeWebView.getSettings().setJavaScriptEnabled(true); String url = "http://www.facebook.com/plugins/like.php?" + "href=" + URLEncoder.encode("likeurl" ) + "&amp;" ...
android
[4]
3,946,465
3,946,466
Correct EventHandler to tell me when notepad closed
<p>I have the following:</p> <pre><code>class Program { static void Main(string[] args) { Process pr; pr = new Process(); pr.StartInfo = new ProcessStartInfo(@"notepad.exe"); pr.Disposed += new EventHandler(YouClosedNotePad); pr.Start(); Console.WriteLine("press [...
c#
[0]
5,228
5,229
Parsing all possible YouTube urls
<p>I am looking for all the features that a YouTube url can have? </p> <pre><code>http://www.youtube.com/watch?v=6FWUjJF1ai0&amp;feature=related </code></pre> <p>So far I have seen feature=relmfu, related, fvst, fvwrel. Is there a list for this somewhere. Also, my ultimate aim is to extract the video id (6FWUjJF1ai) ...
python
[7]
4,994,584
4,994,585
tabbar controller in landscape mode
<p>I am working on a project in which I need to have the application in landscape mode. I made the changes in .plist file by setting interface orientation to landscape. I changed the orientation to landscape in the .xib files also but still when the application starts the in the simulator the tabbar controller appears ...
iphone
[8]
586,101
586,102
Get the right external storage from Android devices
<p>I tried to figure out the the right external storage (additional sdcard with more space ) location of an Android device. I know from different user, that the location is not always the same. The method <code>Environment.getExternalStorageDirectory</code> returns me always <code>mnt/sdcard</code>.</p> <p>I have the...
android
[4]
753,318
753,319
View and display the pdf file in application without saving it in the mobile as file
<p>I have this url <a href="http://c618227.r27.cf3.rackcdn.com/2142.pdf" rel="nofollow">pdf book</a></p> <p>I want to download or display it in my application but without store or download the file in the mobile, the idea is to let the user display the pdf book and browser it from my application but without saving th...
android
[4]
2,092,661
2,092,662
onOptionsItemSelected not called when using actionLayout (SherlockActionBar)
<p>The method onOptionsItemSelected isn't being called when using actionLayout in a menu item. Am I missing something, or is it a known problem with SherlockActionBar?</p> <p>Activity</p> <pre><code>@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getSupportMenuInflater(); inf...
android
[4]
391,807
391,808
Can an android application be loaded from the SD card?
<p>Is there something like a an Android file explorer so that the application could be installed from an SD card on versions older than 2.2 if the signed .apk file was manually copied onto the SD card? (Kind of like installing from a web page.)</p>
android
[4]
1,316,246
1,316,247
What does an extra 0 in front of an int value mean?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/44569/octal-number-literals-when-why-ever">Octal number literals: when? why? ever?</a> </p> </blockquote> <p>Hello everyone,</p> <p>Inspiring from a obfuscated piece of code, I have a small question regarding t...
c++
[6]
4,791,442
4,791,443
Jquery on hover show additional information
<p>I need a jquery that on hover show additional information about an employee these information must be retrieved from a database.Im using this one :</p> <p><a href="http://rndnext.blogspot.com/2009/02/jquery-ajax-tooltip.html" rel="nofollow">http://rndnext.blogspot.com/2009/02/jquery-ajax-tooltip.html</a></p> <p>bu...
jquery
[5]
304,775
304,776
How to clone js object?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/122102/what-is-the-most-efficient-way-to-clone-a-javascript-object">What is the most efficient way to clone a JavaScript object?</a> </p> </blockquote> <p>How to clone js object with out reference like these:</p...
javascript
[3]
113,853
113,854
Convert date string to datetime object
<p>Take the following date inputs:</p> <pre><code>01/01/2012, 1-1-2012, 2012-01-20, 01012012, 20120101, 1.1.2012, 01.01.2012 </code></pre> <p>How would I create one function that converts any typical date string into a datetime.date object. I would imagine you'd first strip any non-numeric character and then do some ...
python
[7]
3,842,957
3,842,958
PHP Screen-scraping methods
<p>I have a site <a href="http://www.coldwellbankerpbr.com/listings.aspx" rel="nofollow">http://www.coldwellbankerpbr.com/listings.aspx</a> that I am trying to grab the listings from, now I need the address and bedroom details, etc however there is no unique identifier besides the text Address (which is repeated severa...
php
[2]
1,386,915
1,386,916
inheriting the .aspx pages?
<p>Can we inherit the aspx page into another aspx page. If yes how can we do that, Thank you.</p>
asp.net
[9]
5,531,719
5,531,720
javascript: Behavior of variables in base object with inheritance
<pre><code>function Resource(){ var id = ''; this.getId = function(){ return id; } this.setId = function(value){ id = value; } } function Model(){ } Model.prototype = new Resource(); </code></pre> <p>To test the above code, I have the following:</p> <pre><code>var m1 = new Mod...
javascript
[3]
1,777,136
1,777,137
format string email to email-link
<p>I have a nullable-string email, and I would like to format the string as a mailto-link if it seems valid.</p> <p>like this:</p> <pre><code>&lt;a href="mailto:foo@foo.com"&gt;foo@foo.com&lt;/a&gt; </code></pre> <p>How is that done?</p> <p>/M</p>
c#
[0]
4,364,470
4,364,471
How can I ensure my c# string ends in a period?
<p>I have c# strings looking like this:</p> <pre><code>"abc"; "def."; </code></pre> <p>When I read these into another variable I need some simple way to check the last character of the string and if it's not a period then append a period to that string. </p> <p>Does anyone have any ideas of a simple way I could do t...
c#
[0]
3,987,491
3,987,492
Running task in the background in case application closes
<p>I am creating an application where i am downloading a large file from dropbox using the drop box sdk. The way the download function works is i make a call to the downloadFile method and pass it a delegate where it will call back as the file starts downloading and after the file fully downloads.</p> <p>However, righ...
iphone
[8]
2,839,221
2,839,222
Detect Network SSID change
<p>using sdk 4.2. The reachability sample tells you if you've changed from WiFI to 3G or someother interface but i need to know if i've changed SSID ( WiFi network). i don't need to know the SSID itself just whether it has changed. i don't believe reachability lets you know this, it just informs if you are connected to...
iphone
[8]
5,022,028
5,022,029
Show PHP errors as a string for display
<p>I'm trying to find out how I would put a PHP error into a variable to display.</p> <p>Similar to the <code>mysql_error();</code> I'd like to be able to have displayed the error that PHP gives?</p> <p>I'm using <code>json_encode</code> to send the testing user back a value from the requested PHP page but if an erro...
php
[2]
5,255,211
5,255,212
can no methods be declared in the main method?
<p>I wrote this class (to print the array list) and in it I made a method in the <code>main</code> function..</p> <p>Well it didn't work: I made the function <code>static</code> and declared it in the <code>main</code> method, still it didn't work. In the main method I made the function without an access specifier: st...
java
[1]
3,597,443
3,597,444
jQuery: Color fade-rotate
<p>I need a function that I can call when somthing is done, for example a fadeOut, fadeIn and so on...</p> <p>The function I need is a bg-color/font-color rotate with jQuery. I want it to fade betwen two colors for X seconds. Have used google with no result.</p>
jquery
[5]
3,902,038
3,902,039
How do I install GCC 4.5.2 in Ubuntu 10.10?
<p>I have Ubuntu 10.10. The command: <code>g++ -v</code> evokes the response <code>gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)</code></p> <p>And the command <code>sudo apt-get install g++</code> evokes the response <code>g++ is already the newest version</code>.</p> <p>However, the following site tells me that ...
c++
[6]