Unnamed: 0
int64
65
6.03M
Id
int64
66
6.03M
Title
stringlengths
10
191
input
stringlengths
23
4.18k
output
stringclasses
10 values
Tag_Number
stringclasses
10 values
2,902,571
2,902,572
C# - display information about custom objects in VS during debugging
<p>I have a set of C# classes, extending an abstract class. There is an abstract method <code>void Show()</code> on the parent. The extending classes are part of a graph with cycles. The implementations of Show invoke many times <code>Console.Write()</code>. Between the console writes there are recursive and other call...
c#
[0]
5,109,177
5,109,178
code to view current online users is not giving proper output
<p>i have written a code to view online users in asp.net(vb) but when page gets run it doesn't show proper output,it only shows 3 users online,if more pages are open then also it shows same.i have pasted the code below.please help me.</p> <pre><code>Public Class Global_asax Inherits System.Web.HttpApplication ...
asp.net
[9]
4,965,651
4,965,652
Linking an existing folder to a solution in Visual C# Express
<p>Note that these are my first steps to the world of C# so I may be asking something really basic here, however neither Google nor Visual C# Express' help helped me so I'm forced to ask this here.</p> <p>I have a set of .cs files in a folder (and its subfolders) I have checked out from SVN repository using TortoiseSV...
c#
[0]
1,226,856
1,226,857
Rounded Inner corners with transparent inside frame
<p>I am trying to make a frame from code so that I can apply it to make rounded inner corners with a solid fill outside and transparent inside. <strong><em>Just like a solid rectangle with transparent oval inside.</em></strong> picture attached. I have tried few shape combinations all that available online displays the...
android
[4]
2,629,235
2,629,236
Mixed ListActivity
<p>I want to create a ListActivity that has both checkboxs and single selection groups. Like in the Sound Settins in the "Settings" application of android.</p> <p>Anyone has link to a sample ?</p> <p><img src="http://i.stack.imgur.com/tHVwa.png" alt="enter image description here"></p>
android
[4]
1,109,625
1,109,626
How can I change this 24h clock to a 12h clock?
<p>I currently have a 24 hour clock. it displays hours, then minutes. I am trying to change it so that it it displays a 12h version but displays either AM, or PM. For example if you input 17:34. It would display 5:34AM. Here is my code. (I have two classes 'clockDisplay' and 'numberdisplay').</p> <pre><code>public cla...
java
[1]
1,590,215
1,590,216
error for Display MapView into Android
<p>this video showing the error for this Displaying map </p> <p><a href="http://www.youtube.com/watch?v=OMzOB-OLtF0" rel="nofollow">http://www.youtube.com/watch?v=OMzOB-OLtF0</a> ![enter image description here][1]</p> <p>now I'm generate Map API Key but it long ,now I'm using windows Xp and when you entered is sai...
android
[4]
4,328,192
4,328,193
JavaScript: Image doesn't scale in IE when dynamically added
<p>when I dynamically add an image to a div the image doesn't scale when you resize the window in Internet Explorer.</p> <p>I think it's more clear if I show two really simple examples:</p> <p>The following example doesn't use JavaScript it's just plain html and it does what I want.<br> <a href="http://www.friendly-s...
javascript
[3]
1,015,995
1,015,996
What is the better Way to Store fixed no of data in Java? (Array vs ArrayList)
<p>I believe Array and ArrayList both are non-Synchronised;behave same in multiThreaded env. And both are Index based. Only Adavantage is ArrayList has utility methods and flexible. <BR> Apart from those Utility methods only to get and set fixed no of Objects which is best in java? Is there any overhead in using Arra...
java
[1]
1,611,495
1,611,496
Can we have a static class in C++?
<p>I was just wondering whether we can have static classes in C++. What I mean is can we declare a class as static in C++ like <code>static class foo</code>? I know we can have static member variables and static member functions in C++ but I am not sure about static classes.</p> <p>Edit:</p> <p>I intended to ask what...
c++
[6]
3,515,570
3,515,571
logout and redirecting session in php
<p>the below one is the link in my php site.. after clicking this button the user's session should be terminated and he should be redirected again to the home page.. i have written the coding for this concept as follows but it shows me only a blank page(it is not redirected to the home page).. please correct my coding...
php
[2]
4,484,268
4,484,269
Showing loading animation in center of page while making a call to Action method in ASP .NET MVC
<p>My application makes several calls to an Action method (ASP .NET MVC) which returns a Json object. When the application is waiting for this method to return its data I want to display a loading animation in the center of the page. How would I accomplish this? I know that I should use JQuery but that's all I know.</p...
jquery
[5]
5,531,683
5,531,684
Access a local file with file:// in Android
<p>I want to link to a local file in my Android device from my app. It can be by just opening it with file:// from the browser. Is this possible in Android, if so what is the path I need to put, just trying file:// does not show anything in the chrome browser.</p>
android
[4]
1,772,213
1,772,214
Count total month
<p>I have to find total months between two dates in Unix timestamp formats. I want to create a PHP function for that. I've tried this:</p> <pre><code>get_total_month($startunixdate, $endunixdate) { $monthdiff = $endunixdate-$startunixdate; $monthdiff = $monthdiff / 60*60*24*31; return $monthdiff; } </code...
php
[2]
1,775,940
1,775,941
Converting a string to byte[] such that the contents remain same
<p>I have a String say <code>String a = "abc";</code>. Now I want to convert it into a byte array say <code>byte b[];</code>, so that when I print <code>b</code> it should show "abc".</p> <p>How can I do that? <code>getBytes()</code> method is giving different result.</p> <p>My program looks like that so far:</p> <p...
java
[1]
5,676,197
5,676,198
How can i make image process on video stream in android ?
<p>I want to take ( in real time ) video stream and make some simple image process on the images. For example - i want to make histogram on all the images that make the video stream ( that mean that i need to make histogram for all the images that make the video ) </p> <p>The question: How can i take the real Time vid...
android
[4]
922,986
922,987
How do I remove the last n characters from a string?
<p>If I have a string and want to remove the last 4 characters of it, how do I do that?</p> <p>So if I want to remove <code>.bmp</code> from <code>Forest.bmp</code> to make it just <code>Forest</code> How do I do that? Thanks.</p>
python
[7]
3,997,054
3,997,055
OpenFileDialog.ShowDialog() freezing application c#
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2201227/c-wpf-openfiledialog-does-not-appear">C#, WPF - OpenFileDialog does not appear</a> </p> </blockquote> <p>I'm trying to make the "JDEdit" application from John Hunt's Guide to C# and Object Orientation. ...
c#
[0]
1,871,072
1,871,073
Reading File in C++
<p>I am unable to figure out why my code is not able to open and read a file. What am i missing?</p> <pre><code>#include &lt;iostream&gt; #include &lt;fstream&gt; #include &lt;string&gt; using namespace std; int main (int argc, char * const argv[]) { string line; ifstream myfile ("input_file_1.txt"); if ...
c++
[6]
3,589,683
3,589,684
Android: launch new activity when it not exist
<p>I have a service that work in foreground, and when the Main activity launch it the notification is launched with the following code:</p> <pre><code>private void showNotification() { Log.i(TAG, LocalService.class.getName() + "showNotification()"); Intent notificationIntent = new Intent(getApplicationContext(...
android
[4]
2,378,951
2,378,952
iPhone volume changed event for volume already max
<p>I'm using </p> <p>AudioSessionAddPropertyListener(kAudioSessionProperty_CurrentHardwareOutputVolume, audioVolumeChangeListenerCallback, self);</p> <p>to detect volume changes so i can take a picture with the volume rockers but if the phone is already at 100% i don't get an event...
iphone
[8]
5,111,886
5,111,887
gcm notifcation are not getting on android mobile, type mismatch error on server
<p>Guys i am having issues in implementation of GCM in my android application, in my application when first time implemented gcm i got notification from server but when i changed the debug key store which caused a new SHA1 and i deleted and recreated a new gcm api from that time i am unable to receive notifications fro...
android
[4]
4,695,711
4,695,712
Can a java Map return a size of -1?
<p>I have some code that creates a List, initialized with the size of a Map:</p> <pre><code>private Set&lt;String&gt; mKeys = new HashSet&lt;String&gt;(64); .... List&lt;String&gt; keyList = new ArrayList&lt;String&gt;(mKeys.size()); </code></pre> <p>I am seeing an exception: java.lang.IllegalArgumentException: Illeg...
java
[1]
3,349,785
3,349,786
Android alert dialog query
<p>I have been working on android application and I have got stuck at a point.</p> <p>I have a method which shows a progress dialog to the user. Then after the code has run I am showing an alert dialog.</p> <p>Here I have got stuck. The progress dialog is not showing when method calls.</p> <p>Code:</p> <pre><code>p...
android
[4]
814,808
814,809
Specific types in implementing class when using an interface
<p>Consider the following code sample:</p> <pre><code>interface IData { int Count(); } interface IOperations { IData Foo(); double Bar(IData a); } class Data1 : IData { public int Count() { return 37; } public double SomethingElse { get; set; } } class Ops1 : IOperations { public Data1 Foo() { return n...
c#
[0]
1,035,090
1,035,091
PHP Class error
<p>I am getting the following error:</p> <p>Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}'</p> <p>The referenced lines are:</p> <pre><code>class Food { private $q = array(); private $nutrients = array(); ... </code></pre> <p>How can I fix this error?</p>
php
[2]
3,801,966
3,801,967
Getting time out error while installing application
<p>Hello everyone I have prepared my project using target <code>android 4.0.3</code>( api level 15). But in case of running the project sum times I get time out error I have also increased the time form DDMS to 60000 ms but still getting error</p> <pre><code>myProject.apk not installed :'timeout' </code></pre>
android
[4]
4,193,395
4,193,396
Understanding this line of jQuery
<p>Line 3906 of jQuery 1.7rc1 is</p> <p><code>expando = "sizcache" + (Math.random() + '').replace('.', ''),</code></p> <p>I don't understand the point of using <code>+ ''</code>. Isn't the above equivalent to</p> <p><code>expando = ("sizcache" + Math.random()).replace('.', ''),</code></p>
jquery
[5]
4,681,998
4,681,999
Is there a tool to monitor sqlite request in android?
<p>Is there a tool, a jar or something that can be plugged to the emulator in android to monitor all sqlite requests passed to the databases of the emulator ? </p> <p>Maybe an equivalent of P6Spy from java-hibernate ?</p>
android
[4]
642,624
642,625
Splitting tags using jquery
<p>I have html output and json output on the same page.</p> <p>What is the way to split the json output from the page?</p> <p>Examples are appreciated</p> <p>Dave</p>
jquery
[5]
4,521,553
4,521,554
javascript: sort an array a certain way with integers and characters
<p>I am trying to sort an array in a specific way and I'm trying to do it efficiently, preferably with the .sort() function. Here is as example of the kind of array I need to work with:</p> <pre><code>["10", "11", "12", "13", "2", "3", "4", "5", "6", "7", "8", "9", "2a", "2s", "3a"] </code></pre> <p>Here is what i am...
javascript
[3]
266,468
266,469
Is there any API to get Flight details of US Airways and Indian Airways using PHP
<p>Is there any API to get Flight details of US Airways and Indian Airways. Including Flight timings and everything which are all necessary. </p> <p>Any help will be appreciated...</p> <p>Thanks in Advance</p> <p>Fero</p>
php
[2]
5,154,271
5,154,272
filtering in c# using sql server as database
<p>filtering in c# using sql server as database</p> <p>for example choosing first what to filter in the combobox by choosing student number and in the textfield entering 1001 ...den only 1001 will appear in the datagrid...</p> <p>we are using ssql server</p>
c#
[0]
3,595,313
3,595,314
Creating multiple files dynamically and storing different message in each file
<pre><code>public static void record(Message message)//Message is a class { try { BufferedOutputStream buf=new BufferedOutputStream(new FileOutputStream("E:/kruthika/proj/a.bin")); byte[] b =serializer.serialize(message); buf.write(b); buf.flush(); } ...
java
[1]
3,575,042
3,575,043
How to get images size fixed in php?
<p><strong>How do I get images in certain fixed size, example I've attached the image and codes for your review</strong></p> <p><a href="http://i.imgur.com/6MZBi.png" rel="nofollow">Please click on this link (image) to understand my question</a></p> <pre><code> &lt;img src="&lt;?php echo $picfile; ?&gt;" border="0" w...
php
[2]
1,287,923
1,287,924
C# Creating a text file contains the error logs
<p>I have created a text file to save the error in that created file. I have a button which, once pressed, generates an error which should be saved to the file. But if I press the button twice, it will overwrite the first error generated, because the contents of the file are overwritten. I want to generate a another se...
c#
[0]
4,196,345
4,196,346
Is this an array or an object in Javascript?
<p>Could someone explain this block of code to me and what the type of 'arr' is. I know that an array is an object but</p> <ol> <li>Why does the <strong>[[Class]]</strong> show up as Array if it behaves like an Object</li> <li><p>arr.length returns 3. How?</p> <pre><code>var arr = [0, 1, 3]; arr.name = "asdf"; conso...
javascript
[3]
2,346,836
2,346,837
subprocess.Popen: how to terminate subprocess and receive its output?
<p>I want to run a shell command from python and receive its output with subprocess.Popen. The problem is, when I close the process, sending Ctrl-C, I don't get any output. What am I doing wrong? Code:</p> <pre><code>&gt;&gt;&gt; import subprocess &gt;&gt;&gt; sub = subprocess.Popen(["xinput", "test", "8"], stdout=sub...
python
[7]
3,893,316
3,893,317
C++ overloaded method pointer
<p>How do I get a method pointer to a particular overload of a method:</p> <pre><code>struct A { void f(); void f(int); void g(); }; </code></pre> <p>I know that</p> <pre><code>&amp;A::g </code></pre> <p>is a pointer to <code>g</code>. But how do I get a pointer to <code>f</code> or <code>f(int)</code>...
c++
[6]
1,190,548
1,190,549
iphone app submitting fails
<p>I'm attempting to submit my app, and I'm getting no record found for the app on itunesconnect... I have added the app on itunesconnect, and have set up all the app ID, CRS, etc.</p> <p>Why could it be? </p> <p>Please help me out...</p>
iphone
[8]
3,479,227
3,479,228
cannot write to the registry key
<p>I am getting error cannot write to the registry key when i am trying to save my keys in the registry .</p> <p>//Here is my code . </p> <p>Note : I tried to run as an Administartor assuming some permission problems still getting the same error ....</p> <pre><code>private const string RegistryKeyName = "Skms"; priv...
c#
[0]
4,203,031
4,203,032
Large data insertion
<p>I have a csv file uploaded and data read into an array .The valid data is stored in the array as associative array indexed from 0-4000 records</p> <pre><code>Array ( [0] =&gt; Array ( [uname] =&gt; uname1 [name] =&gt; fullname1 [email] =&gt; uname1@email.com )...
php
[2]
5,242,899
5,242,900
When to release row after reloading table data?
<p>This method below works, but I don't know when rowdata should be released.</p> <pre><code>-(void)refreshTable:(NSMutableArray *) tbdata{ rowdata=[tbdata retain]; [tabledata reloadData]; } </code></pre> <p>This version below causes an error:</p> <pre><code>-(void)refreshTable:(NSMutableArray *) tbdata{ ...
iphone
[8]
3,711,946
3,711,947
Script for identifying a country
<p>I'm in a bit of a trouble. I have developed a script, which finds a users country. The script returns the native version of the country; eg. Denmark (English) is Danmark (Danish) on the server. Is there a fast way to convert it to English?</p>
php
[2]
5,075,036
5,075,037
Visual C++ 6.0 Link Error
<p>Does anybody know about this linker error in Visual C++?</p> <blockquote> <p>PGPkeys.obj : error LNK2001: unresolved external symbol _<em>imp</em>_PGPclCloseClientPrefs</p> </blockquote>
c++
[6]
3,069,813
3,069,814
blur(); on middle mouse click
<p>I've searched google, this and other forums, but to no avail… sooooo, is it possible to have something like onMiddleClick="blur();" to hide the focus border of a link on middle mouse click?</p>
javascript
[3]
2,734,628
2,734,629
python for loop tuple index out of range
<p>I'm still trying to get the hang of python, so bear with me. please. I have this bit of code that I'm using from a book. The book does not properly show the white space in the code, so the spacing is my best guess. This code is supposed to break the results of a MySQL query into a more readable format. </p> <pre><c...
python
[7]
5,107,040
5,107,041
Triggering click with jQuery to hit code-behind function not working in 1.4 - Worked fine in 1.3.2
<p>I have a gridview in an update panel and am using a jQuery dialog for adding entries. </p> <p>The dialog calls an AJAX/JSON function that adds the entry. On success of that function I have jQuery trigger a button click on a hidden button </p> <pre><code> ... success: function(msg) { $("[id...
jquery
[5]
2,788,177
2,788,178
installing php 5.4 on mac, change version?? (returns older version?)
<p>Im trying to update php to 5.4, and I think ive installed it with <a href="http://php-osx.liip.ch/" rel="nofollow">http://php-osx.liip.ch/</a>. But when i do <code>php -v</code> it says that i have 5.3.15. But if i do <code>/usr/local/php5/bin/php -v</code> it says 5.4.9. Is there something i should change to get 5....
php
[2]
1,985,704
1,985,705
Remove the Selection of text in textBox in C#
<p>I have a textbox.In that I have to allow the user to type some thing in that textbox and i also restrict the user not to select the typed text in that textbox.I have need not to allow the white space at the start of the text box and also i have need not allow the user to type more that 32 characters.Thsi is my co...
c#
[0]
5,383,312
5,383,313
Do I need to compile my php files?
<p>Hi i'm used to programming with ASP.Net but i got just landed a project doing PHP development.. My question is this, in ASP.Net if you make changes in the code behind you have to recompile the app before uploading. Is it the same with PHP? I know it's not a compiled language but I want to know if I can make changes ...
php
[2]
1,148,563
1,148,564
PHP Scrape Mp3 File
<p>I am embedding some mp3 files on my website. The problem is some of the names are different and my website does not know how to embed - unless I define all the files with the correct names.</p> <p>For example,</p> <p><code>http://example.com/chapter1/book-[some random name].001.mp3</code></p> <p>I have set up my ...
php
[2]
3,868,952
3,868,953
Need help developing an animated iPhone game
<p>I am developing a game in which several objects are moving. Here is an example of what I have so far: </p> <pre><code>NSArray * imageArray = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"1.png"], [UIImage imageNamed:@"2.png"], [UIImage imageNamed:@"3.png"], [UIImage imageNamed:@"4.png"], [UIIm...
iphone
[8]
1,387,121
1,387,122
Is there a difference between $().ready() and $(document).ready()
<p>I've seen some code where they just do this:</p> <pre><code>$().ready(function() { ... }); </code></pre> <p>This is shorter than doing a document selector but is it the same thing?</p>
jquery
[5]
4,921,606
4,921,607
How to determine which web service should be used alongside php to call the pastebin api?
<p>I want to develop an app using the api provided by pastebin.com , using php . What I am not able to figure out is which web service like SOAP , etc , should be used to do this work ?</p>
php
[2]
101,095
101,096
How to go back from google play to my app
<p>I want to call one app from another and if the app is not installed on device mean i get the control to google play store to install the app(these things are going well).But once download finished,i want to remove the googleplay activity and get back the control to my app.how will i do this one?thanks in advance.......
android
[4]
4,980,058
4,980,059
Parent.FrameName.FunctionName is not working in Mozilla
<p>This is what I am having in the page </p> <pre><code>&lt;frameset border="0" frameborder="0" frameSpacing="0"&gt; &lt;frame name="banner" src="one.aspx?tab=" marginwidth="0" marginheight="0"&gt; &lt;frame name="filter" src="two.aspx" marginwidth="0" marginheight="0"&gt; &lt;/frameset&gt; </code></pr...
javascript
[3]
1,881,009
1,881,010
C# loop statements, help needed for a newbie
<p>I’m quite a newbie at c# and need some help with some loop statements.</p> <p>I’m practising by designing a program that calculates cost per mile (which is 50p) and adds £30.00 every 1000 as a wear $ tear charge.</p> <p>I’m having problems getting my head around the logic, if anyone could give me a few tips that w...
c#
[0]
132,561
132,562
PHP Cookie Set expiry time to none
<p>i am setting a cookie but having some issue , currently the cookie format is this</p> <pre><code>setcookie("company_id", $company_id, 0, '/'); </code></pre> <p>So expiry time is set to 0 means cookie will never expire , but when i tried to not to set any expiry time so i passes an empty argument in the third param...
php
[2]
4,030,189
4,030,190
Php not handling logic of true and false correctly
<p>I'm trying to register a new username in an empty table in my database. So I pass in the username and UID and check to see if the user has that name registered already and accept the request or if nobody has the name I can accept it. If there name is registered to another user i reject the request.</p> <p>It always...
php
[2]
2,282,421
2,282,422
android mediaplayer bacgroung loading
<p>how can i load a file into mediaplayer while showing a splash screen in the foregroung ,i mean after splash sceen i want to display video on the screen directly without wait </p>
android
[4]
5,059,116
5,059,117
How to check if string is in column value of returned DataRow array in C#?
<p>I know this is very basic, but I can't seem to get it right. I have this datatable that I will fill with processed information from my database. </p> <p>After searching if the EmpRequestID has already been added in the Datatable, I want to be able to get the value of the column named "RequestedEmp" of the returned...
c#
[0]
1,868,893
1,868,894
Why is this C# code kicking up an error?
<p>real newbie question but why doesn't this work? I am getting </p> <blockquote> <p>use of unassigned variable 'comparison'</p> </blockquote> <p>as the error</p> <pre><code> string comparison; Console.WriteLine("Enter the first number"); int firstNum = Convert.ToInt32(Console.ReadLine());...
c#
[0]
2,342,218
2,342,219
C++ throw dereferenced pointer
<p>What is the type of the exception object in the following thrown:</p> <p>Question1> <code>range_error r("error"); throw r;</code></p> <p>Answer1> an object of range_error</p> <p>Question2> <code>exception *p = &amp;r; throw *p;</code></p> <p>Answer2> a sliced object of exception</p> <p>Question3> <code>exce...
c++
[6]
770,400
770,401
change querystring value with jquery
<p>i am using a jquery Script to create a Tab Panel. Now, what i need is to change the querystring value on click on each tab. can we do this without page refresh.</p> <p>I am using below script for tab panel.</p> <pre><code>function tabPanel() { var tabContent = $('div.tabsBG &gt; div.tabsWrapper'); tabConte...
jquery
[5]
2,946,959
2,946,960
Modify URL in php
<p>I want to modify following url <a href="http://www.gonzaga.edu/../../../../Files/About/Images/300x200/baseball_panorama_hz.jpg" rel="nofollow">http://www.gonzaga.edu/../../../../Files/About/Images/300x200/baseball_panorama_hz.jpg</a> into <a href="http://www.gonzaga.edu/Files/About/Images/300x200/baseball_panorama_h...
php
[2]
6,001,981
6,001,982
jQuery: How do i trigger event / do something when select option is selected?
<p>Can anyone let me know the best way to trigger an event once a select option has been clicked on and chosen?</p> <p>I want to run some additional JavaScript once the user has selected their option.</p>
jquery
[5]
1,375,685
1,375,686
Corner radius for a navigation bar
<p>i have developed an iPad app. In that app i have 4 separate views embedded inside a single view controller and there is a navigation bar for each view.I want to set the corner radius of each navigation bar.</p> <p>i tried</p> <pre><code> customNavigationBar.layer.cornerRadius = 25; </code></pre> <p>but this...
iphone
[8]
2,474,373
2,474,374
Which is the best way to send email using PHP
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5994732/what-is-the-best-practice-to-send-emails-from-php-script">What is the best practice to send emails from PHP script?</a> </p> </blockquote> <p>I would like to setup an email application, which is the best...
php
[2]
3,108,478
3,108,479
Iphone tableview time show in seconds
<p>In iphone application I have a table view having 5 rows. first row is for showing the decreasing digit like time in second. i.e 30,29,28.......0. this is for user to choose a action from table view within 30 seconds. how this will implement?</p> <p>Thanks, Aaryan</p>
iphone
[8]
3,655,116
3,655,117
What is the difference between AVAudioPlayer and MPMusicPlayerController?
<p>It looks like both of them can play audio file. What is the difference between AVAudioPlayer and MPMusicPlayerController?</p> <p>Welcome any comment</p> <p>Thanks interdev</p>
iphone
[8]
1,434,832
1,434,833
parse JSON function
<p>Can someone explain to me how this parse function actually works?</p> <pre><code>function parseFlickrJson(jsonstring){ var data=null; var jsonFlickrApi=function(d){ data = d; } eval(jsonstring); return data; } </code></pre>
javascript
[3]
2,428,294
2,428,295
How does getExternalCacheDir() work on Android?
<p>From what I understand, we cache the frequently accessed objects in a memory segment that is more easily accessible than normal disk reads.</p> <p>getExternalCacheDir(), as opposed to getCacheDir() points to the external filesystem - which seems to me as a normal getExternalFilesDir(). How does Android optimize acc...
android
[4]
6,008,051
6,008,052
How to control the orientation of the device in iphone / ipod?
<p>i have to do something on rotation the device on the portrait mode but when i use the </p> <pre><code>(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations //[[[UIApplication sharedApplication]keyWindow]subviews removeFromSupervi...
iphone
[8]
2,782,410
2,782,411
How to make onmouseover events always on
<p>I have an image map that uses a third party script(mapper.netzgesta.de) to highlight the different areas of the image map. Basically the script adds onmouseover events to the areas via javascript. How can i have the areas already on when the page is loaded as opposed to any user based event?</p> <p>I already have...
javascript
[3]
1,271,253
1,271,254
if(objValue instanceof Date) objValue store string its work or not?
<pre><code>Object objValue = null; objValue = mapAcctProfParam.get(strKey).toString(); if(objValue instanceof Date){ objValue = DateUtilities.stringFromDate(new Date(((Date)objValue).getTime()), "dd/MM/yyyy HH:mm:ss"); debugLog(MODULE_NAME," going to DateUtilities"...
java
[1]
4,613,969
4,613,970
Device SERIAL ID in android 1.6
<p>how can i get serial number in API level 3?</p>
android
[4]
5,270,792
5,270,793
how to get cascading listboxes
<p>I have two listboxes on my page Say ListBox A and ListBox B. I am populating data into ListBox A using generic lists.</p> <p>I want to populate ListBox B based on ListBox A selection </p> <p>Could someone please guide me how to do that</p>
asp.net
[9]
2,735,218
2,735,219
Spliting to 2D array
<p>How I can split a string into 2D array. String is like</p> <pre><code>1c2c3r4c5c6r6c8c9 </code></pre> <p>array shld be like</p> <pre><code>[[1,2,3], [4,5,6], [7,8,9]] </code></pre>
javascript
[3]
2,988,661
2,988,662
How to distinguish Windows 7 and Windows 2008 R2
<p>I need to distinguish Windows 7 and Windows 2008 R2 but I don't know how to. The OS Version property return the same number "6.1.7600.0"</p> <p>Regards,</p> <p>Florian</p>
c#
[0]
1,628,919
1,628,920
Get returned by __enter__ in __exit__
<p>For example, i have this code:</p> <pre><code>with MyClass() as x: print 'I have only {0}'.format(x) with MyClass() as y: print 'I have {0} and {1}'.format(x, y) print 'Again only {0}'.format(x) </code></pre> <p><code>x</code> and <code>y</code> both should be de-initialized after exit of corre...
python
[7]
2,107,942
2,107,943
Method must have a return type
<pre><code> public writer (string name,string lastname,string number) { StreamWriter Wrt = new StreamWriter("D:\\Sample.txt",true); Wrt.WriteLine(name); Wrt.WriteLine(lastname); Wrt.WriteLine(number); Wrt.WriteLine("#"); Wrt.Close(); } </code></pre> <p>there ...
c#
[0]
84,950
84,951
Javascript help, writing html elements
<p>How do I write this HTML using javascript.</p> <pre><code>&lt;div id="resizeControl"&gt; &lt;input type="image" src="resuce.png" /&gt; &lt;input type="image" src="enlarge.png" /&gt; &lt;/div&gt; </code></pre> <p>and append it to a slidegallery object..</p> <p>.net</p>
javascript
[3]
5,560,298
5,560,299
jQuery selector for the child of a parent's previous sibling
<p>For each stat block like the following:</p> <pre><code>&lt;div class="stats"&gt; &lt;div class="label"&gt; &lt;span class="goal"&gt;10 YEARS OF SOMETHING GOOD&lt;/span&gt; &lt;/div&gt; &lt;div class="stat"&gt; &lt;div class="tri"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>I want to ...
jquery
[5]
3,387,217
3,387,218
Bringing my Alarm to the front
<p>I had a few problems with my alarm that are in a another thread <a href="http://stackoverflow.com/questions/9933732/alarm-manager-not-working-how-i-want">here</a> if anyone could help but anyway here is a new question. If I set an alarm using my app, say for 5 minutes from now, and then close the app, how would I co...
android
[4]
3,249,111
3,249,112
get size of string pointed to by a position memory pointer
<p>I want to get characters of a string pointed by a position memory pointer in native C++:</p> <p>for an equivalent implementation in C#, it will be:</p> <pre><code>int positionMemory = getPosition(); long size = 10; string result = Marshal.PtrToStringAnsi(new IntPtr(positionMemory), size); </code></pre> <p>How c...
c++
[6]
477,259
477,260
how do i get the attribute value with comparing another attribute?
<pre><code>&lt;tbody&gt; &lt;tr class="taskEditRow" rowid="1" level="0" taskid="-1" __template="TASKROW"&gt; &lt;tr class="taskEditRow" rowid="2" level="1" taskid="-2" __template="TASKROW"&gt; &lt;tr class="taskEditRow" rowid="3" level="2" taskid="-3" __template="TASKROW"&gt; &lt;tr class="taskEditRow" rowid="4" level=...
jquery
[5]
2,664,262
2,664,263
Is the constructor of a class called if you declare a object of that class as an instance variable of another class?
<p>For example, if i have a class like this;</p> <pre><code>#import "B.h" class A { B object; }; </code></pre> <p>would B's constructor get called when I created a A object?</p>
c++
[6]
1,302,879
1,302,880
How a value will be rounded in Linux environment?
<p>I have a small program collect data from Oracle Database and show on GUI in Linux. At database: value = 4.25 But after I get value and show data on GUI with type double. I have value = 4.2</p> <p>In Linux machine, How a value will be rounded? (value greater than 0.005 will be rounded to 0.01 or value greater and e...
java
[1]
4,211,611
4,211,612
doubt in for loop
<p>i have the following code</p> <pre><code>public static void main(String[] args) { int x=0; int y=0; for(int z=0;z&lt;5;z++) if((++x&gt;2)||(++y&gt;2)) x++; System.out.println(x+" "+y); } </code></pre> <p>For this the output is 8 2</p> <pre><code>public static void main(String[] args) { // TO...
java
[1]
4,451,621
4,451,622
logic of Garbage collector in java
<p>As we know Garbage collector is Thread in java. And every thread will have its logic to execute. So i wanted to know what logic does this Garbage collector use which maintains the memory so well.</p> <p>thanks</p>
java
[1]
872,968
872,969
Read/writing to a file which is definitely going to be in use at random times
<p>I need to read a text based log file to check for certain contents (the completion of a backup job). Obviously, the file is written to when the job completes. </p> <p>My question is, how can I (or how SHOULD I write the code to) read the file, taking into account the file may be locked, or locked by my process when...
c#
[0]
3,776,898
3,776,899
Python: get list indexes using regular expression?
<p>In Python, how do you get the position of an item in a list (using <code>list.index</code>) using fuzzy matching?</p> <p>For example, how do I get the indexes of all fruit of the form <code>*berry</code> in the following list?</p> <pre><code>fruit_list = ['raspberry', 'apple', 'strawberry'] # Is it possible to do ...
python
[7]
3,895,116
3,895,117
How can I set dialog style in my custom theme?
<p>I tried in many ways but I can't change the AlertDialog style from xml.</p> <p>The result I would is to define an XML style for dialogs extending and overriding the default and then bind it in my theme, so all the alertDialogs will looks the same.</p> <p>I tried:</p> <pre><code>&lt;style name="AppTheme" parent="A...
android
[4]
5,370,786
5,370,787
jquery dropdown only when current button is hovered
<p>I am new to jQuery and am not sure how to solve this jQuery dropdown problem I am having. </p> <p>When you hover over one of the links, the dropdown menu works fine, however I have added a second dropdown to the navigation, and now when you hover one of the links, both the dropdowns are revealed. I only want the cu...
jquery
[5]
4,725,491
4,725,492
Calculating difference between dates in arraylist, based on a condition
<p>My ArrayList() is populated with VO, which contains startDate(010112),endDate(310112),month(1,2,3 ...12) and criteria(A,B,C)</p> <p>I need to calculate the difference between startDate and endDate in my arralist for criteria A and B.</p> <p>Ex: ArraList1 - <strong>startDate(010112)</strong>,endDate(310112),month(1...
java
[1]
5,339,632
5,339,633
Search box disappears when clicked
<p>I have a sliding image panel that uses </p> <pre><code>$('input').click(function() { $(this).parent().slideUp(); </code></pre> <p>Unfortunately the input part on the sliding panel causes the search box at the top of the page to disappear when clicked on because the search form uses "input type="text" etc. is the...
jquery
[5]
903,167
903,168
maximum number of simultaneous users for xampp in windows
<p>i am working on creating a web application with php and mysql in a xampp server in windows. I want to know the maximum number of users it can handle at a time. If i am using the wrong technology , please suggest a good one</p>
php
[2]
3,353,528
3,353,529
PHP How to pass variables through a link to the next php file
<pre><code>echo "&lt;td&gt;" . "&lt;a href='approve_mem.php?id=$row['member_id']'&gt;Approve&lt;/a&gt;" . " " . '&lt;a href="disapprove_mem.php?id=$row[member_id]"&gt;Disapprove&lt;/a&gt;' . "&lt;/td&gt;"; </code></pre> <p>This is my code but the value of id does not get passed instead it gets passed like id...
php
[2]
3,124,608
3,124,609
TOGGLE for JQUERY
<p>here in this code. i have a file from xml that loads on jqgrid. </p> <p>in my xml i have a parTable (which is the parent table) and chTable (for the sub items) now here is my problem. If i click on the parTable(item) i want to expand all the details in the chTable(subitems). </p> <hr> <pre><code>$(function() { ...
jquery
[5]