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
621,545
621,546
C# join 2 or more classes together?
<p>So this might sounds like a n00b question, but I want to take 2 classes and merge them together. </p> <p>Like so :</p> <pre><code>Ball oneBall = new Ball("red", 20); Ball anotherBall = new Ball("blue",40); Ball BigBall = new Ball(oneBall + anotherBall); BigBall.size() //should say 60 right? </code></pre> <p>I...
c#
[0]
3,107,493
3,107,494
Can we make custom progressdialog in android?
<p>I need to make custom ProgressDialog for my project.. The default one is very simple.. Can we do it?</p>
android
[4]
4,271,450
4,271,451
Have you Guys Heard of C++ Server Pages?
<p>I have been looking for a ways to maximize speed in my web application. Came across an interesting application called CSP. Have you guys ever heard of them? They claim that you can program web application in c++. Is it worth it?</p> <p><a href="http://www.micronovae.com/CSP.html" rel="nofollow">http://www.micronova...
c++
[6]
1,552,967
1,552,968
Question related to array
<p>I'm trying to print array. All code working fine.But at last I'm getting `ArrayArray'. Can any one solve this problem. many many thanks</p> <p>here is my array</p> <pre><code>Array ( [Post1] =&gt; Array ( [id] =&gt; 1 [title] =&gt; hi ) [Post2] =&gt; Array ( [0] =&gt; Array ...
php
[2]
3,508,218
3,508,219
I get T_CONSTANT_ENCAPSED_STRING error
<p>Somebody kindly posted this code for me:</p> <pre><code> $output = '&lt;select name="module" class="modulesDrop"&gt;'.PHP_EOL; foreach ($courseData['Modules'] as $moduleId =&gt; $moduleData) { $output .= "&lt;option value=".$moduleId."&gt;".$moduleData."&lt;/option&gt;".PHP_EOL; ...
php
[2]
3,683,271
3,683,272
Is it OK to lock on System.Collections.Generic.List<t>?
<p>I have been reading about the syncroot element but I can't find it in the List type. So how should the multithreading synchronization be done with the System.Collections.Generic.List&lt;> type?</p>
c#
[0]
5,847,604
5,847,605
Android : Make image opaque / transparent
<p>Greetings, </p> <p>I would like to place an image over a surfaceview. However I would like the image to be transparent so you can see the image and also the undlying surfaceview. Can anyone suggest how I could do this?</p>
android
[4]
646,701
646,702
Created folder shows on device but not on PC
<p>I am trying to create a folder that users can put stuff in and use in the app so I do this</p> <pre><code>File exportDir = new File(Environment.getExternalStorageDirectory()+"/BCAData"); if (!exportDir.exists()) { exportDir.mkdirs(); } File file = new File(exportDir, d...
android
[4]
3,161,740
3,161,741
how to pass the javascript variable to textbox?
<p>i would like to ask a question.</p> <p>how can i pass the javascript generated code to the textbox "code" ?</p> <p>I surf the internet but I cannot find the answer</p> <p>I hope all of you can help me.</p> <p>thanks!!</p> <pre><code> &lt;form&gt;&lt;input name="code" type="text" value="" &gt; &...
javascript
[3]
5,683,867
5,683,868
What is the use of getDrawingCache() method
<p>I dont know how to use <code>getDrawingCache()</code> method.please give me any example.Please explain me the method,its use and advantages.</p>
android
[4]
4,813,231
4,813,232
Is it fine to customize C++?
<p>For my projects, I usually define a lot of aliases for types like unsigned int, char and double as well as std::string and others.</p> <p>I also aliased and to &amp;&amp;, or to ||, not to !, etc.</p> <ul> <li>Is this considered bad practice or okay to do?</li> </ul>
c++
[6]
2,842,468
2,842,469
Quick guru interpretation of beginner android tutorial instructions!
<p>I am following this tutorial:</p> <p><a href="http://knol.google.com/k/suk-woo-heo/creating-user-interfaces/1oqzmo14sfklf/20#" rel="nofollow">http://knol.google.com/k/suk-woo-heo/creating-user-interfaces/1oqzmo14sfklf/20#</a></p> <p>Have got to step 4 where it says: 4. With the resources defined, you’re ready to c...
android
[4]
1,782,820
1,782,821
PHP: word check for 30 chars
<p>I would like to check that if $_POST[msg] contains a word that are longer than 30 chars(without no spaces) so you wouldnt be able to write:</p> <p>example1 :</p> <p>asdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsdsddsasdsdsdsdsd</p> <p>example2: hello my name is asdoksdosdkokosdko...
php
[2]
4,903,734
4,903,735
Webservice call not working after switching between Wifi to 3G or 3G to Wifi
<p>I written a service in my app that will send lat longs to the server for every 15 seconds . the problem is:</p> <p>When service started i am using wifi and making calls to server with latest lat longs for every 15 seconds it is working fine.after some time I switch off the wifi and switch on the 3g (mobile network)...
android
[4]
1,475,760
1,475,761
Stop PHP STRPOS function from ignoring zeros
<p>I am creating a script that will find files from an input file (right now I am working on a jpg).</p> <p>I use common file headers/trailers/structure to find the data that needs to be extracted. I use STRPOS to find these commonalities and find the parts of the file that need to be copied from the rest of the data ...
php
[2]
1,294,472
1,294,473
JavaScript object method name for setTimeout
<p>my object has a function that i want to call recurseively. my problem is how do i use setTimeout to point to the method of that instance of the object?</p> <pre><code>MyObject.prototype.Play = function() { // do some stuff setTimeout(thecurrentmethodnameHERE, 1000); } var test = new MyObject(); test.Play(); ...
javascript
[3]
2,963,992
2,963,993
Correlating parallel arrays in C#
<p>How can I associate two unidentical( arrays of different types) string arrays using C#? </p>
c#
[0]
4,173,352
4,173,353
How to build only the selected class library project in Visual Studio, not any dependencies
<p>We have a <em>very</em> large solution. I'd like to find a way to select a C# class library project in Visual Studio and build only that project.</p> <p>The solution is composed of non-managed C++, managed C++, and C# projects.</p> <p>Turning on "Only build startup projects and dependencies on Run" results in ver...
c#
[0]
2,436,714
2,436,715
Elegant solution to retrieve custom date and time?
<p>I am currently using a date and time picker to retrieve a user-submitted date and time, and then I set a control's text to the date and time selected. </p> <p>I am using the following code:</p> <pre><code>new DatePickerDialog(newlog3.this, d, calDT.get(Calendar.YEAR), calDT.get(Calendar.MONTH), calDT.get(Calendar....
android
[4]
4,930,789
4,930,790
How do you check if a website is online in C#?
<p>I want my program in C# to check if a website is online prior to executing, how would I make my program ping the website and check for a response in C#?</p>
c#
[0]
1,436,862
1,436,863
How to integrate GoogleMaps in android
<p>How to integrate GoogleMaps in android,the problem is that i am unable to get the MD5 fingerprint. Unable to get MD5 fingerprint using this path.</p> <pre><code>$ keytool -list -alias alias_name -keystore my-release-key.keystore </code></pre>
android
[4]
3,147,554
3,147,555
jquery convert serialized form inputs to xml string
<p>I'm trying to get all my form inputs and then create with them an xml string containing there values in order to send them via ajax.</p> <p>i want this :</p> <pre><code>&lt;form id="formtest"&gt; &lt;input type="text" name="test1" id="test1"/&gt; &lt;input type="text" name="test2" id="test2"/&gt; &lt;input type...
jquery
[5]
1,869,871
1,869,872
Why does Response.Write("<someting>") not work in ASP.NET code-behind?
<p>I have this code in my ASP.NET code-behind file:</p> <pre><code>Response.Write("&lt;someting&gt;") </code></pre> <p>But it doesn't work. If I remove the <code>&lt;</code> tag delimiter, then it writes the content to the page. </p> <p>My question is: how can I write an XML string to the page from a code-behind?</p...
asp.net
[9]
933,827
933,828
Can't access $_POST variables when using multipart/form-data
<p><strong>What is the problem?</strong></p> <p>When I add a file using my form the $_POST variables are undefined. When I don't add a file the $_POST variables are defined.</p> <p><strong>What errors do you receive?</strong></p> <pre><code>Notice: Undefined index: bbmpin in C:\...\addpin.php on line 6 Notice: Undef...
php
[2]
4,418,801
4,418,802
What's the difference in this condition : STRING.equals("myValue") vs STRING == "myValue"?
<p>What's the difference in <code>STRING.equals("myValue")</code> vs <code>STRING == "myValue"</code>?</p> <p>I first used <code>STRING == "myValue"</code> but my IDE recommends to switch to using <code>.equals()</code>. Is there a specific benefit to doing this?</p>
java
[1]
3,039,286
3,039,287
Make image link with the same href using jQuery
<p>Im trying to make my img link to this same image. Unfortunately it is not working.</p> <pre><code>&lt;img src="someimage.jpg" width="120" height="120" /&gt; </code></pre> <p>and this is what im trying to acheave:</p> <pre><code>&lt;a href="someimage.jpg"&gt; &lt;img src="images/6208606.jpg" width="120" height...
jquery
[5]
4,816,595
4,816,596
A curious occurrence in Python
<p>For some reason in Python 2.7 expressions of the form <code>tuple &gt; list</code> return <code>True</code>, but <code>tuple &lt; list</code> and <code>tuple == list</code> return <code>False</code>. Why is that?</p> <p>This observation is not original to me by any means.</p>
python
[7]
4,540,627
4,540,628
calendar view android
<p>I want to use calendar in my android application in grid view format and it will show events and images on a specific date.</p> <p>Is there any calendar jar that I could use?</p>
android
[4]
1,756,903
1,756,904
is there a "double" type in PHP
<p>if not, then how to declare a double type of number?</p> <pre><code>function testFloat(float $f) { return $f; } echo testFloat(1.2); </code></pre> <blockquote> <p>Catchable fatal error: Argument 1 passed to testFloat() must be an instance of float, double given</p> </blockquote>
php
[2]
4,768,326
4,768,327
java "boolean" not woking with integer
<p>Why doesn't this work. (I'm really sorry, I just learned java.)</p> <p>public class Test {</p> <pre><code>public static void main(String[] args){ int b; b = 250; b = 250; boolean trueFalse = true;{ b = true (b + 5); } boolean False;{ False = ( b +5 ); b = Fal...
java
[1]
6,011,336
6,011,337
How to remove unwanted character in php using preg_replace?
<p>im using this code</p> <pre><code>$output = preg_replace('/[^(\x20-\x7F)]*/','', $output); </code></pre> <p>my goal is to remove this character but the code removed all unwanted characters.</p> <p>Please help me to remove that character.</p> <p>Thanks.</p>
php
[2]
3,351,825
3,351,826
Convert Console.WriteLine into text box
<p>I checked on the net and I didn't find concrete examples for my situation... </p> <p>What I want, is to have these Console.WriteLine displayed in a text box . </p> <pre><code> // Show data before change Console.WriteLine("name before change: {0}", thisDataSet.Tables["Customers"].Rows[9]["CompanyName"]); /...
c#
[0]
450,559
450,560
Suspend the application
<p>How can I suspend my application or send a suspend message to my applicatio? </p> <p>I want simulate pressing the home button.</p> <p>Thanks</p>
iphone
[8]
1,352,244
1,352,245
Raise an exception at import if conditions not met
<p>I have a module that depends on some system settings. For example, to work properly it needs to have an environment variable FOO set. I would like the module to raise an Exception if this condition is not met at import time.</p> <pre><code># mymodule.py if 'FOO' not in sys.environ: raise SomeException('ensure t...
python
[7]
5,081,005
5,081,006
Passing CalendarContract.Events.CONTENT_URI as a param to getContentResolver().query does not retrieve Calendar events from all calendars
<p>I am trying to retrieve calendar events and event instances from all the calendars that are on the device (not just 1 of the calendars). To do this, I created a cursor as follows - </p> <pre><code>mCursor = getContentResolver().query(CalendarContract.Events.CONTENT_URI, COLS, null, null, null); </code></pre> <p>Th...
android
[4]
3,190,712
3,190,713
Python stops reading file using read
<p>I'm trying to read a binary file and am getting confusing results.</p> <pre><code>f = open('foo.dat','r') data = f.read() print len(data), f.tell() </code></pre> <p>The output is:</p> <pre><code>61, 600 </code></pre> <p>What is going on here? Only the first 61 bytes are read, but the file object is telling me...
python
[7]
5,146,576
5,146,577
JavaScript : Check if variable exists and if equal to value
<p>I have three pages utilizing the same code and on one of the pages this variable doesn't exist, on the other two the variable ticketType has a value of 1 or 2. I need to first check if ticketType exists and isn't undefined and secondly, need to determine if it's one or 2.</p> <p>This if statement generates an erro...
javascript
[3]
4,918,043
4,918,044
about import FBReader project
<p>After i import the FBReader, The project got problems.</p> <p>All the aidl file got problem,</p> <p>Like ApiInterface , This aidl interface in class ApiClientImplementation got problem is:</p> <p>ApiInterface cannot be resolved to a type.</p> <p>what's wrong with aidl file? how to fix it?</p> <p>Pls help</p> <...
android
[4]
2,368,367
2,368,368
How can I reset a sequence's value to 1 for every new year in C#
<p>I'm using the sequence to generate an identifier in the format YYYY-"sequence value" and the sequence value has to be reset to 1 for every new year. for example: for this year's value will be like 2011-3456. when new year comes, it should be set to like: 2012-0001. Thanks in advance!</p>
c#
[0]
4,289,918
4,289,919
upload fail when finding a special characters
<p>When uploading a csv file in php, the upload fail when the file contain letters like french letters (letters with accents), can someone help me please with this issue? thank you</p>
php
[2]
711,446
711,447
Android app accesses web service
<p>I need to create an Android application, I'm not sure which is a better way of doing this by better I mean should I use the <code>WebView</code> or create an application .</p> <p>I need to implement the existing application which is a ASP.NET application which mainly consists of a login screen, once the user logs i...
android
[4]
373,889
373,890
sending data from a dataset to a email body having problems populating the body
<p>hello I'm working on a project for school any help would be great I'm trying to email data from a dataset, but I'm having a hard time customizing the body of the email. Thank you!!!</p> <p>what i have so far.</p> <p>it works however i can't customize the body. For example i would like the body to populate with dat...
c#
[0]
2,066,163
2,066,164
TreeSet is not working properly
<p>The output does not sort in ascending order. Here is the code and the output I am getting.</p> <p>The actual output is:</p> <pre> Amy Jose Jeremy Alice Patrick Alan Amy Jeremy Helen Alexi </pre> <p>While the expected output is:</p> <pre> Amy, Alice, Jeremy, jose, Patrick Alan, Amy, Alexi, Helen, Jeremy </pre> ...
java
[1]
237,632
237,633
jQuery - My slideToggle is laggy
<p>Im creating this jquery action, but it is laggy at the slideDown, not on the slideUp of the SLideToggle action. How come this is happening? I am having other slideToggle's which is perfectly smooth.</p> <pre><code>$('.getGoingBtn').click(function(){ $(this).next('.getGoingDesc').slideToggle(); }); </code></pre>...
jquery
[5]
2,761,609
2,761,610
C# resolving DNS aliases for a host
<p>I'm trying to query the DNS server for DNS aliases (CNAME records) and gethostentry always returns no aliases. Which I believe is explained by MSDN ("The Aliases property of the IPHostEntry instance returned is not populated by this method and will always be empty.")</p> <p>So the question is, how do I get the ali...
c#
[0]
4,997,919
4,997,920
Why is determining the cost of a java operation so unclear?
<p>I have tried several times to search the answer to what java operation is more demanding form my CPU time or RAM usage, because i do not always have a lot of RAM to spare of CPU time to give. So when i ask anyone or try to find what operations are more heavy i get a real vague answer like that is undecidable. </p> ...
java
[1]
1,536,637
1,536,638
jQuery - can't get dialog popups to pop up, they appear on the page instead
<p>I have a couple small divs that I am trying to pop up when something happens, but they are not popping up, but instead appearing within the content of the page.</p> <p>Would anyone know why that happens? Also, the jQuery is supposed to show a spinner gif to indicate you should wait, but it doesn't render that eith...
jquery
[5]
896,605
896,606
How to make compareTo sort a list alphabetically?
<p>How do I change my code so that it lists the elements in alphabetical order from a to z. Right now it's ordering from z to a. I can't figure it out and am stuck :-/</p> <pre><code> String sName1 = ((Address)o).getSurname().toLowerCase(); String sName2 = (this.surname).toLowerCase(); int result = (sName...
java
[1]
1,464,979
1,464,980
Call function from another function
<p>I'm writing a calendar in Javascript, and I want to know how to get the calendar to call itself depending on which link the user clicks. At the moment the function has the name foo()</p> <p>At the bottom, there are three different div links which are displayed depending on given circumstances. The (working) calenda...
javascript
[3]
1,055,758
1,055,759
What is context in android?
<p>Why we really need to pass context in some elements and what is the difference between <code>getApplicationContext()</code>, <code>getBaseContext()</code>, <code>MainActivity.this</code> ?</p>
android
[4]
4,309,989
4,309,990
Warning: file_exists(): open_basedir restriction in effect
<p>I am using cPanel to edit a PHP file. When I replace the existing <code>index.php</code> file, I get the following error as I login through administration.</p> <blockquote> <p>Warning: file_exists(): open_basedir restriction in effect. File(/home/myagdico/public_html/uitsAdmin/lib/plugins/createThisDir.txt/plug...
php
[2]
3,502,758
3,502,759
How do I bind an event to any clickwith jQuery
<p>When the user clicks on a <code>.popup_link</code>, a little popup window is displayed and any other popup windows are removed:</p> <pre><code>$("a.popup_link").click(function(){ hide_all_popups() make_popup($(this).id) }); </code></pre> <p>But I want it to also <code>hide_all_popups()</code> when the us...
jquery
[5]
4,827,246
4,827,247
VPN protocol Android
<p>Is it possible to create a VPN connection but also setting the VPN protocol such as PPTP or L2TP programatically for Android 4+? I searche a lot but didn't find a real solution to this.</p>
android
[4]
436,559
436,560
Jquery find all images on a website link
<p>I'm trying to create an jquery "inside" bookmarklet to my website like facebook share. </p> <p>I need to get all images on a link. I mean if I give www.domain.com in my form, ajax request is needed to get all image links in that webpage and images should be shown in the form to select by user. </p> <p>I'm sure the...
jquery
[5]
1,496,423
1,496,424
android different versions compatability
<p>I have developed an application for android 2.3. Now I want to test it under android 2.1. Do I have to create a new project with target set to android 2.1 and copy all the code across or is there any other method? Also how to make this application compatible with different android versions as a single program?</p>
android
[4]
1,357,714
1,357,715
printdialog.showdialog(); not showing the print dialog in windows 7 with 64 bit
<p>I have custom control with print toolbar item.when print the control the dialog is not coming in windows 7 with 64 bit os in other system os working fine. problem only in windows 7 with 64 bit.</p> <p>my problem printdialog is not coming in windows 7 os with 64 bit.</p> <p>i have checked and anlyaed -->PrintDial...
c#
[0]
1,603,411
1,603,412
Cookies in asp.net [inmemory cookie, persistent cookie]
<p>How can I delete the cookie in persistent cookie not abandon()?</p>
asp.net
[9]
3,558,616
3,558,617
How to store data into an xml file on my website and extract the data out of it in my iphone app
<p>In my application i need to create and save data into an xml file on my webspace and then i want to parse that xml into my iphone app. The question here is this is being done by two different parties a sender and a receiver. But i don;t know how to parse that xml file into my app when i don't have the excat url of ...
iphone
[8]
5,672,268
5,672,269
Jribbble Jquery Paging
<p>I'm working on a (web)App for the famous community Dribbble. (3rd party, not their app.) but using Jquery to get the posts right now. The plugin I use: Jribbble works but hasn't good paging. The Code I'm using right now:</p> <pre><code> $(document).ready(function () { $.jribbble.getShotsByList('popular'...
jquery
[5]
4,034,434
4,034,435
PHP, get web-page content words
<p>I am building a website that recommend other good website. </p> <p>Therefore, I collected a lot websites by using crawling system.</p> <p>Now, I am trying to distinguish whether the website has good words or not by using PHP.</p> <pre><code>$page_content = file_get_contents($url); $bad_word = 'damn'; if(strstr($...
php
[2]
432,754
432,755
Android TabActivity Back key Event
<p>I tried to go back when pressing back button in tabActivity. previously i did </p> <pre><code> public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) showDialog(DIALOG_REALLY_EXIT_ID); return true; } private void showlist() { // TODO Auto-...
android
[4]
5,415,423
5,415,424
PHP Try Catch Exceptions how does it work
<p>I'm new to try catch in php, and I was playing around with it.</p> <p>when I try this one, it works fine</p> <pre><code>try { if (!$connect) { throw new Exception("it's not working"); } } catch (Exception $e) { $e-&gt;getMessage(); } </code></pre> <p>When I try this one, it doe...
php
[2]
3,275,960
3,275,961
How to hide div onclick in unordered List
<p>In an onclick event, I would like to hide the "closed" <code>li</code> and show the "open" and vice versa. can I do this in Javascript?</p> <p>I have the following html:</p> <pre><code>&lt;ul&gt; &lt;li&gt; link&lt;/li&gt; &lt;li&gt; Liink&lt;/li&gt; &lt;/ul&gt; </code></pre>
javascript
[3]
1,958,847
1,958,848
Can you help me with this python exercise?
<p>I want to write a function that takes a list of numbers and returns the cumulative sum; that is, a new list where the ith element is the sum of the first i+1 elements from the original list. For example, the cumulative sum of [1, 2, 3] is [1, 3, 6].</p> <p>Here is my code so far:</p> <pre><code> def count(list1): ...
python
[7]
4,272,126
4,272,127
if i define something in a class, how do i call in within the class?
<p>i have something like</p> <pre><code> define("__ROOT_PATH__", "http://{$_SERVER['HTTP_HOST']}/admin"); </code></pre> <p>within a class. how do i call it from within functions is it with a cologn? i tried looking it up on google but nothing. </p> <p>thanks</p>
php
[2]
5,857,880
5,857,881
Multiple Base64 encoded parameters that appear as 1 in a URL query string
<p>I need to pass 2 parameters in a query string but would like them to appear as a single parameter to the user. At a low level, how can I concatinate these two values and then later separate them? Both values are Base64 encoded.</p> <pre><code>?Name=abcyxz </code></pre> <p>where both abc and xyz are separate Base64...
asp.net
[9]
5,390,451
5,390,452
Buttons inside an Android custom listview
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5846385/how-to-update-android-listview-with-dynamic-data-in-real-time">How to update Android ListView with dynamic data in real time?</a> </p> </blockquote> <p>I have a custom <code>listview</code> working with ...
android
[4]
5,401,570
5,401,571
How to find checked radiobuttons in jQuery from a list of radiobuttons
<p>In the below example I wish to select all the ":checked" radio buttons of the "radios" list. How to?</p> <pre><code>var radios = someDiv.find("input[type=radio]"); if (radios.length &gt; 0) { // I wish to find all the checked radio buttons in the // "radios" list - this doesn't work: var checkedRadios =...
jquery
[5]
5,092,213
5,092,214
Application trust level issue with XmlRpcClientProtocol object Invoke function
<p>We have a web application that uses the XML-RPC.NET library. When I call the Invoke function of the XmlRpcClientProtocol object, I get a permission error. </p> <p>This only happens on our shared hosting server because we have to run the site in medium trust environment. If I run it on my local machine with full tru...
asp.net
[9]
5,233,941
5,233,942
Client-Server architechture
<p>I have to create an application that based on repository of something, and when there is new update n the repository do something to the registred user. something like inverse client-server (as the server open contant the users). i hope it's clear enought. the code is written in C# 4.0. What is the best architecture...
c#
[0]
3,954,393
3,954,394
detecting Android WebView from Javascript/HTML
<p>I'm working on a web application which will normally be accessed from the Android browser, but I need it to display alternate content if it is loaded in a WebView from an Android app. I've been looking for any telltale differences in the UA string or the DOM, but I haven't been able to find any. (Note: I do not cont...
android
[4]
4,766,825
4,766,826
How to display tabbar in whole app in android?
<p>Hi I am creating an application. In this I need to display a TabBar in all Activities. I set the TabBar bottom using 4 tabs; <code>home, contact, about and call us</code>.<br> Inside home tab I have some buttons. When I click inside home any button that time I need to move some other Activity. Using intent I moved t...
android
[4]
1,377,019
1,377,020
What if data: is not used when submitting a form?
<p>When submitting a form using post, what if I dont want it serialized (or going as a string, which i feel is not safe) and want it to be submitted the same way as it would be if I wasn't using jquery? How could I do that?</p> <pre><code>$.ajax({ type: "POST", data: $("#sform").serialize(), //don't wa...
jquery
[5]
2,747,800
2,747,801
Making a browser and node compatible Javascript library
<p>I am attempting to make a javascript library which I would prefer to be compatible with both browsers and node. However, there is some functionality offered in the node API that isn't offered in browsers (such as compression). I know it would be possible to code this functionality in javascript so it would be cross-...
javascript
[3]
3,942,432
3,942,433
javascript google maps remove icon
<p>I am attempting to remove the custom icons from the google map and reset the map to the default zoom and lat lng. </p> <p>here is my function:</p> <pre><code>function clearLocations() { infoWindow.close(); for (var i = 0; i &lt; markers.length; i++) { markers[i].setMap(null); } markers.length = 0; sidebar...
javascript
[3]
2,904,544
2,904,545
Array sort keys numerically help
<pre><code>$test1[2] = "one"; $test2[1] = "two"; $test2[3] = "three"; $test = $test1 + $test2; print_r($test); </code></pre> <p>I've used the array union operator but when i print the array it is in the wrong order.</p> <pre><code>Array ( [2] =&gt; one [1] =&gt; two [3] =&gt; three ) </code></pre> <p>How do i so...
php
[2]
2,139,093
2,139,094
formatting a string in java
<p>I would like to know how to provide a formatting capabilities that enable the user to specify the number of digits of precision to the right of a decimal number. so instead of using the classical formatting .2f or .3f etc.. I want the user to be able to enter the precision of the decimal number.</p> <p>i have a co...
java
[1]
4,138,896
4,138,897
parsing primitive types using java.util.Scanner
<p>I'm new to java so forgive the noob question.</p> <p>I have created a swing application that basically has three input strings in JTextFields: loanAmount, interestRate and loanYears and a single submit button with the EventAction.</p> <p>I'm trying to use the java.util.Scanner to parse the input to primitive types...
java
[1]
5,799,791
5,799,792
How can I work with a database in Android?
<p>How can I connect to and insert and select data from a database in Android?</p>
android
[4]
4,778,829
4,778,830
Read Data from text file on server using $.ajax to call a php script
<p>This is my first time posting on this site. I have looked over several of the previous postings related to this topic, but did not find anything that works for me. I am trying to use javascript and jquery $.ajax to call a php script on the server and return the contents of the file. Thus far I am not getting any dat...
jquery
[5]
1,586,872
1,586,873
Get error messages when I have a syntax error?
<p>I have a class and the commented line is failing (clearly because I don't need the <code>$</code> before <code>displayname</code>), however I ended up having to put a bunch of <code>echo</code> statements in to figure that out because an error isn't being thrown.</p> <p>I'm hoping there is a way.</p> <pre><code>cl...
php
[2]
4,350,826
4,350,827
Reload View only when application is opened Again
<p>My application has tab bar with one of the tabs having a segmented control on navigation bar. Based on segment clicked different view is displayed using a url. I am calling the url in viewdidload method.I do not want to use viewwillAppear to call the url as it will be called each time the view is displayed. I only...
iphone
[8]
2,255,521
2,255,522
Create 7zip file in parts using sevenzip Library c#
<p>I want to 7zip the directory and creates parts of lets say 100mb each with names test001.7zip , test002.7zip , ... and so on.</p> <pre><code>string sevenzip = System.Configuration.ConfigurationManager.AppSettings["7zippath"].ToString(); SevenZip.SevenZipCompressor.SetLibraryPath(sevenzip); SevenZip.SevenZipCompress...
c#
[0]
2,466,583
2,466,584
How do I Install .apk files in the android emulator?
<p>I want to install my .apk file in android emulator.But I have multiple emulators opened(5554,5556) and i don't want to close any one of the emulator how to install a .apk file in an emulator when there is multiple emulators are opened?</p>
android
[4]
4,333,527
4,333,528
Expression is a value and therefore cannot be the target of an assignment - asp.net
<p>I'm getting the above error. It is working in Dev mode but not on live, any ideas?</p> <p>There are proper values in the reader as I've written them to a text file....</p> <pre><code> Do While reader.Read() personList.Add(New Person() With {.ID = reader("user_id"), .Name = reader("person")}) ...
asp.net
[9]
5,197,510
5,197,511
How to extend this jQuery function
<p>I want to extend this function and make my own, this new function should have same functions as the old one but additionalOkClicked should be overwritten with my own function.</p> <p>How do I do this?</p> <pre><code> (function ($) { $.LocationDialog = { mainInit: function() { //so...
jquery
[5]
1,416,484
1,416,485
Convert from Bool to boolean
<p>I calling to method with get.bool and getting bool value and I need to update other method which needs to get type of boolean( Value.setValue( )) ,</p> <pre><code>Bool aa = Entry.getBool(); Value.setValue(aa ); </code></pre> <p>since I using aa i getting message The method setValue(Boolean) in the type Boolea...
java
[1]
338,384
338,385
How to set focus to a web control in ASP.NET
<p>Question: What is the best way to set focus to a web control in ASP .NET.</p> <p>I can do it, but it's ugly. I have a web control wrapped in a web control hosted on a web page. So, if you do a view | source on the page the id is something like WrapperControl_Control_TextBox.</p> <p>I've tried the "tried and tru...
asp.net
[9]
3,188,326
3,188,327
DataKey names in Form view
<p>How to access dataKey values</p> <pre><code> &lt;asp:FormView ID="FormView1" runat="server" Style="margin-right: 65px" DataKeyNames="MMBProfileID" &lt;ItemTemplate&gt; &lt;table id="FormViewTable" style="width: 100%;"&gt; &lt;tr&gt; &lt;td&gt; Name: ...
asp.net
[9]
5,011,570
5,011,571
How do I access the contents of a variable from a file imported in a console?
<p>I have a file, light.py that I'm trying to debug. In the python console, I type "import light" and it runs the program. But I want to check the contents of some variables by typing the variables. How do I do that? </p>
python
[7]
5,558,541
5,558,542
on slideup can I clear out the input text field in jQuery?
<p>I have this little snippet in jQuery </p> <pre><code> $('.cake_checkboxes').click(function(){ $(this).nextAll('.quantity').first().slideToggle(); }); </code></pre> <p>here is my html</p> <pre><code>&lt;input id="option-value-24" class="cake_checkboxes" type="checkbox" value="24" name="option[232][]...
jquery
[5]
3,088,272
3,088,273
Could someone with Python expertise check this code please?
<p>When I run <a href="http://gunslingerc0de.wordpress.com/2010/06/04/381/" rel="nofollow">this</a> prog it doesn't run for some reason. The author's notes at the top of the code on the link provided show example output, like for example "encode/decode" doesn't appear in place of <code>%sencode%s</code> / <code>%sdecod...
python
[7]
1,461,306
1,461,307
ToogleButton align text label on the right
<p>I want to align the text in a <code>ToogleButton</code> on the right of that bar that became green/white when pressing it.</p> <p>To be more explicit I will post the code and also the result I have now.</p> <pre><code> &lt;ToggleButton android:id="@+id/ToggleButton01" android:layout_width="wrap_c...
android
[4]
532,474
532,475
How to create an in-memory zip file with directories without touching the disk?
<p>In a python web application, I'm packaging up some stuff in a zip-file. I want to do this completely on the fly, in memory, without touching the disk. This goes fine using ZipFile.writestr as long as I'm creating a flat directory structure, but how do I create directories inside the zip?</p> <p>I'm using python2.4....
python
[7]
3,118,561
3,118,562
How can I flatten lists without splitting strings?
<p>I'd like to flatten lists that may contain other lists <em>without</em> breaking strings apart. For example:</p> <pre><code>In [39]: list( itertools.chain(*["cat", ["dog","bird"]]) ) Out[39]: ['c', 'a', 't', 'dog', 'bird'] </code></pre> <p>and I would like</p> <pre><code>['cat', 'dog', 'bird'] </code></pre>
python
[7]
2,083,216
2,083,217
How to call void function in other class?
<p>I want to call one void function into many view controllers so how can i do it? please suggest me some idea. </p>
iphone
[8]
4,685,460
4,685,461
Failure delivering result ResultInfo{who=null, request=0, result=-1, data=null} to activity
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3275749/im-getting-a-nullpointerexception-when-i-use-action-image-capture-to-take-a-pict">I&#39;m getting a NullPointerException when I use ACTION_IMAGE_CAPTURE to take a picture</a> </p> </blockquote> <p>I have...
android
[4]
4,372,445
4,372,446
What does this JS do?
<pre><code>var passwordArray = pwd.replace(/\s+/g, '').split(/\s*/); </code></pre> <p>I found the above line of code is a rather poorly documented JavaScript file, and I don't know exactly what it does. I think it splits a string into an array of characters, similar to PHP's str_split. Am I correct, and if so, is ther...
javascript
[3]
3,214,061
3,214,062
Need to set a variable based on the value of the selected item in a dropdown
<p>I'm trying to set a variable to the value of the selected item in a dropdown but can't get it to work properly. Here is the html:</p> <pre><code>&lt;select id="locationChoice" name="WorkflowList"&gt; &lt;option value=" "&gt;-- Please Select --&lt;/option&gt; &lt;option value="14643"&gt;Item A&lt;/option&gt; &lt;opt...
jquery
[5]
37,669
37,670
android google map view
<p>i am using android Google map, the map is displayed in emulator but not in the device.. can any one help me to solve the problem.</p>
android
[4]