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
4,459,529
4,459,530
PHP - eval() problem
<p>I have two files like below</p> <p>SomeClass.php</p> <pre><code>class SomeClass { public function display() { $content = file_get_contents("helloworld.php"); eval($content); } public function helloWorld() { echo "hello World!"; } } </code></pre> <p>helloworld.php</p> <pre><code>&lt;?php $...
php
[2]
5,539,430
5,539,431
Run php file via command line on an ubuntu linux server
<p>I am trying to run a php file on a ubuntu linux server but get a 'command not found' error when i run "php file_name.php" </p> <p>Searching online, i found an article that suggested I run "sudo aptitude install php5-cli" which I did and restarted apache afterwards but I still get this error. </p> <p>How do I fix t...
php
[2]
2,201,678
2,201,679
Trouble with marking and selecting the list view
<p>In my application I am having a list view,Now the problem is I want to get the marked positions the code I am using is</p> <pre><code> @Override public void onClick(View v) { // TODO Auto-generated method stub System.out.println("Entered Delete Button"); ...
android
[4]
4,603,659
4,603,660
Android AlertDialog button click
<p>I got an AlertDialog that has one positive and negative button each. Within the onClick(DialogInterface dialog, int item) event handler, which is a member function of Activity, how do I tell which button has been clicked? Base on my observation, the "item" parameter has -1 as value if positive button is clicked, or ...
android
[4]
513,706
513,707
asp.net showdeletebutton
<p>gridview:</p> <pre><code> &lt;asp:CommandField ShowDeleteButton="false" /&gt; </code></pre> <p>How to change visibility programatically from Page_load method?</p>
asp.net
[9]
562,654
562,655
Javascript side scrolling
<p>How can you scroll through the viewport of a DIV? I need to build a horizontal scrolling feature on my site where the user has left and right arrows. I've never build anything like this and am wondering how this is done?</p>
jquery
[5]
4,693,897
4,693,898
How to layout text to flow around an image
<p>Can you please tell me if there is a way to layout text around an image? Like this:</p> <pre><code>------ text text text | | text text text ----- text text text text text text text text text text text </code></pre> <p>I have gotten a response from an android developer about this question. But I am not sure ...
android
[4]
471,131
471,132
How to slide a div out from the right?
<p>I'm not sure where to begin. Can someone point me in the right direction? Not looking for code, just guidance.</p> <p>When a link is clicked, I want a panel (the height of the screen) to slide out from the right to about 50% of the window. </p> <p>How can I accomplish something like this?</p> <p>If I just do s...
jquery
[5]
904,245
904,246
Read File Names From folder Only Keep Files with .iso extention
<p>I have a script that gets a string from a config file and based on that string grabs the file names of a folder.</p> <p>I now only need the iso files. Not sure if the best way is to check for the .iso string or is there another method?</p> <pre><code>&lt;?php // Grab the contents of the "current.conf" file, re...
php
[2]
3,891,847
3,891,848
queue simulation C++
<p>I have all the h files such as the server list, the server type, the wait time, and the customer type but i have no idea what exactly to type in the cpp file</p>
c++
[6]
1,770,546
1,770,547
When was Java's "System.out.println()" overloaded?
<p>Could it still take, for example, an int and print it successfully?</p>
java
[1]
4,908,941
4,908,942
getting paragraph value in jquery
<p>how to get the value of this paragraph in jquery </p> <pre><code> &lt;p class="editableText" id="$bid"&gt;$content&lt;/p&gt; $(document).ready(function(){ $('p.editableText').each(function(){ var content = $(this).val(); }); }); </code></pre> <p>is this a correct approach ?!</p>
jquery
[5]
2,434,797
2,434,798
Error when selecting nothing in listbox
<p>Hi I have a code that reads a text file and copies the content into a list box. Everything is working fine, but when I click inside the listbox in a place where there is no item, a new error message appears and it points out that I have somthing wrong with this line:</p> <pre><code>switch (listBox3.SelectedItem.ToS...
c#
[0]
2,110,909
2,110,910
How do i access web data via android?
<p>I am just digging into Android, and want to build a simple application that gets data from wifi/3g from a website, like a classic RSS feed, and/or a post-back to a remote database. A tutorial that does a good job explaining it to a "busy developer".</p> <p>Can anyone reference a good tutorial site, or a book that c...
android
[4]
4,151,404
4,151,405
Add a decimal after two first numbers
<p>I am generating some data of latitude and longitude with <code>rand(10000000, 3000000);</code> for example. But I need to calculate distance between two locations, so basically I need to convert my result, for example <code>22049256</code> to <code>22.049256</code> in order to pass to my function.</p> <p>How can I ...
php
[2]
1,177,766
1,177,767
mktime is not working for years greater than 2038
<p>I am using php version 5.3.8 And mktime is not working for me</p> <p>here is the code</p> <pre><code>$dated= mktime(0,0,0,11,5,2038); var_dump($dated); </code></pre> <p>Output is as bool(false) Please suggest me its fix</p>
php
[2]
2,171,345
2,171,346
Good rating/voting script using PHP?
<p>Is there a good rating/voting script that uses PHP?</p>
php
[2]
5,819,488
5,819,489
Get file contents into array and shuffle them. Don't output more than once.
<p>I have a text file with a list of sentences on each line. Currently, I just randomize the lines but have many duplicates show up. How can I get these lines into an array and then show them all randomly but don't show a sentence again until all sentences have been shown. Basically, I need to loop through the array on...
php
[2]
2,912,267
2,912,268
Avoid multiple login
<p>I wonder how to avoid multiple login in ASP.NET, I need to show a message when the user tries to login in other machine.</p>
asp.net
[9]
2,801,976
2,801,977
how can we upgrade our android device htc hero?
<p>How can i upgrade my android device htc hero??</p>
android
[4]
5,497,942
5,497,943
How to add multiple TextView s for a LinearLayout by Java Code ( in Android )
<p>Here is my code. In the resulting screen it shows only the first TextView. Not the second one. Im kind of new to Android and please give a help.</p> <pre><code>public class Details extends Activity { protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); TextVie...
android
[4]
4,464,503
4,464,504
How to Sync an Enterprise Application with a Mobile Application?
<p>I have a problem statement wherein a mobile(Android) app has to be written for Profile Management of the Employees of a company and each Employee would have a Device of his/her own wherein they can store all their personal, Professional, Contact details and training plans. Now this information would be stored locall...
android
[4]
1,525,229
1,525,230
sending the value from jsp to java or javascript to java
<p>I have a list of names in a table. When I click the name, it displays people under that particular name. Ex: aaa bbb ccc Now I want to do moveover on aaa which l show 2 (number of ppl under aaa) in a tooltip.</p> <pre><code>&lt;a id="tool" title="toolTip" onmouseover="toolTip(localArrGroupNames...
java
[1]
1,668,150
1,668,151
Why isn't the ‘format’ method more widely used in Python?
<p>I'm probably missing something here, after searching I couldn't find an answer.</p> <p>I've explored quite a few Python projects and one thing I keep noticing is the fact that the majority of them continue to use the <strong><code>%</code></strong> operator for formatting strings rather than the newer, recommended ...
python
[7]
4,324,004
4,324,005
Figure out which row in an HTML table was clicked
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1824206/how-to-detect-which-row-tr-is-clicked">How to detect which row [ tr ] is clicked?</a> </p> </blockquote> <p>I have a table like this:</p> <pre><code>&lt;table&gt; &lt;tr&gt; &lt;td&gt;1&lt;/td&...
javascript
[3]
5,974,744
5,974,745
How to create tab widget like this picture?
<p><img src="http://i.stack.imgur.com/VCU78.jpg" alt="enter image description here"></p> <p>I want to create a tab widget like this.Would you please tell me how to create a tab like this?If I use rounded image then how to keep space between tabs?</p>
android
[4]
28,774
28,775
Android support jinitiator
<p>I'm starting to work on a project for my Collage . The project is to take the collage website and make an android app that loads the website in the app . </p> <p>the website use jinitiator for registration and i should be able to register via mobile .</p> <p>does android support jinitiator </p>
android
[4]
9,538
9,539
How to use more than one condition in Python for loop?
<p>How to use more than one condition in Python for loop?</p> <pre><code>for example in java: int[] n={1,2,3,4,6,7}; for(int i=0;i&lt;n.length &amp;&amp; i&lt;5 ;i++){ //do sth } </code></pre> <p>How dose the python for loop do this?</p>
python
[7]
2,577,514
2,577,515
Is there a way to force an android device to stay awake?
<p>This app needs the device (and its display) to stay awake between onPreExecute() and onPostExecute().</p>
android
[4]
3,697,574
3,697,575
Programatically set HttpContext.Handler in classic ASP.NET application
<p>In my CMS application, I'm trying to intercept all ASP.NET requests, inspect them and then assign custom HttpHandler if necessary or leave default handling when appropriate. I tried setting HttpContext.Current.Handler in Application_BeginRequest but it doesn't seem to work. There is MapRequestHandler event in HttpAp...
asp.net
[9]
1,594,835
1,594,836
Java Intialize String array
<p>Can I initialize string array like this </p> <pre><code>String arr=new String[];/* initialize the array */ </code></pre>
java
[1]
1,099,491
1,099,492
PHP - How do I get a parameter value from $_SERVER['HTTP_REFERER']?
<p>In a PHP application, $_SERVER['HTTP_REFERER'] has the following value: </p> <pre> http://www.google.com/aclk?sa=l&ai=CPWNSJV30TK{snip}&num=2&sig=AGiWqtxY{snip} &adurl=http://www.jumpfly.com&rct=j&q=adwords&cad=rja </pre> <p>My question is what is the proper way to extract the value of q? </p> <p>Should I searc...
php
[2]
5,394,078
5,394,079
JavaScript array to number
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/7202157/can-you-explain-why-10">Can you explain why ++[[]][+[]]+[+[]] = 10</a> </p> </blockquote> <p>I'm wondering something for few days...I know that unary plus in JavaScript first converts it's operand to Num...
javascript
[3]
5,368,859
5,368,860
JQuery Multiples?
<p>Does anybody now how I would be able to select the multiples of html elements. For this example I am interested in selecting every 4th element through the 7th element, the 8th element through the 11th element, and so on. </p>
jquery
[5]
5,805,026
5,805,027
Keeping Up To Date With All Things C#
<p>How do developers keep up to date with new C# features?</p> <p>Are there famous / popular blogs that people subscribe to?</p> <p>What else can developers do to keep at the forefront of changes</p>
c#
[0]
2,497,977
2,497,978
Android 2.1 How to disconnect a connected bt device
<p>I have referenced the link: <a href="http://stackoverflow.com/questions/3031796/disconnect-a-bluetooth-socket-in-android">Disconnect a bluetooth socket in Android</a></p> <p>but still it doesn't work for me. always through an exception at BluetoothSocket::connect()</p> <p>My case is that if User has paired and con...
android
[4]
4,741,269
4,741,270
Is there a better/more efficient way to create and append this list item with jQuery?
<p>I am creating a jquery function which allows users to create rules and append these rules to a list. I am currently writing the list item html in long form inside the function and it works exactly how it is meant to, but I was wondering if there was a better/more efficient way to create this new list item than writi...
jquery
[5]
6,033,814
6,033,815
sub view are not adjusted while rotating from portrayed to land scape mode
<p>i did an application that supports for both portrayed and landscape modes.</p> <p>totally it contains 5 views.</p> <p>at 4 button click events i add 4 view as subview to the main view.</p> <p>when ever i rotate view from portrayed to land scape only main is adjusted but remaining 4 sub views are not adjusted,they...
iphone
[8]
4,523,600
4,523,601
Calling a Javascript function when Required field validator is true
<p>I would like to have a Javascript function to be called when ever my required field validator control is true (i.e when the validator control is fired / error message shown).</p> <p>Kindly let me know how this can be done.</p> <p>Thanks in advance.</p>
asp.net
[9]
3,262,055
3,262,056
Accessing members in one Activity from another
<p>I'm going for a tabbed layout for my application, and I'm having a little trouble. I have the main Activity, and then I have the sub activities (one for each tab). In one sub activity, I have a TextView set as a public member of the activity. Using the main activity, how could I call <code>.setText()</code> on th...
android
[4]
4,871,553
4,871,554
2 layouts 1 activity android
<p>I have a navigation bar in my app, the thing is that I want the navbar to be available in all activities. I suppose that I have to set contentView two times, but that doesn't work, of course. </p> <p>I've been looking at and but I dont get it to work. I have a super class, can I set this second layout from my s...
android
[4]
3,976,398
3,976,399
Update script var's with value from drop down?
<p>I have a script, which basically looks like this (the part I need help with):</p> <pre><code>&lt;script&gt; var languageFrom = " from "; var languageTo = " to "; &lt;/script&gt; </code></pre> <p>If I had a drop down menu that looked like this:</p> <pre><code>&lt;select&gt; &lt;option value="en"&gt;En&lt;/option&g...
javascript
[3]
3,983,345
3,983,346
Pass new object into function
<p>I have a function: <code>Vector::Vector integrate(Vector::Vector start, Vector::Vector end, long int elapsedtime);</code>, where a <code>Vector</code> is a class I've created:</p> <pre><code> class Vector { public: double x, y, z; Vector(); Vector::Vector addToSelf(Ve...
c++
[6]
93,169
93,170
Javascript convert "05/27 11:00pm" to date?
<p>How does one convert a string of a date without a year to a JS Date object? And how does one convert a date string with a year and a time into a JS Date object?</p>
javascript
[3]
926,023
926,024
Simple Date Format With TimeZone Issue
<p>Hi i have problem with simpledateformat+ timezone here is my code and i am expecting my output as 25/11/2011 but its returning as 24/11/2011. And my current time zone is Pacific and i am testing this on (25/11/2011). Please help.</p> <p>Hi Please find the complete program i am not just printing it i am comparing wi...
java
[1]
4,015,965
4,015,966
myClass.System cannot be resolved to a type
<p>I get the error: myClass.System cannot be resolved to be a type. - Syntax error on token ";", . expected - Line breakpoint:myClass [line: 19] - main (String[]). Can somebody help?</p> <pre><code>import java.util.*; import java.io.*; public class myClass { public char value[]; // char array called value pr...
java
[1]
5,148,145
5,148,146
Get pure value from an object
<p>Anyone know how could i get the pure value out of this kind of object:</p> <pre><code>SimpleXMLElement Object ( [0] =&gt; 13863 ) </code></pre> <p>Not matter what i did, i can not get the pure value from this object. Any advise would be helpful.</p>
php
[2]
232,719
232,720
What should I know about C++?
<p>I've recently started learning C++, and I enjoy it a lot.</p> <p>I've often read it's easier to write bad code in C++ than in most languages, and that it is a lot deeper than what it seems.</p> <p>As I'd like to avoid writing bad code, I was wondering what exactly I shouldn't do, and what I should do, to write goo...
c++
[6]
5,252,626
5,252,627
How to get a reference to the current window?
<p>Need a ref to the window in which a view is inside (no matter how deep inside). Usually there is only one window in an iPhone app. How would I access that the most easy way? Is there something cooler than getting the app delegate to access the window?</p>
iphone
[8]
1,190,081
1,190,082
How does Facebook keep track of viewed Posts?
<p>I am developing an app where users can post. I want to alert users when a new post is submitted that they have not seen. The whole process is basically the way facebook is set up. However, I was wondering how I keep track of posts users have seen already.</p> <p>How does facebook accomplish that?</p>
php
[2]
2,251,994
2,251,995
Is it safe for me to save resource id as user preference
<p>Currently, I define several theme in my app</p> <ul> <li><code>R.style.Theme_MyApp_Light</code></li> <li><code>R.style.Theme_MyApp_Dark</code></li> </ul> <p>User has the option to save his selected theme in preference. </p> <p>I was wondering, is it safe for me to save these generated Id into preference? Possible...
android
[4]
1,755,595
1,755,596
Reading and writing a file
<p>I downloaded a jpg from the net, I'd like to save it to disk then load it again. I'm trying something like this:</p> <pre><code>Bitmap bmp = ...; // loaded from net. File file = new File(Environment.getExternalStorageDirectory(), "tmp.jpg"); OutputStream out = getContentResolver().openOutputStream(Uri.parse(file.ge...
android
[4]
3,637,008
3,637,009
Check if object is empty or NULL
<p>I want to check is object is empty or is NULL.</p> <p>First I have a web method that take has input parameter XML document</p> <pre><code>[WebMethod(CacheDuration = 0, EnableSession=true, Description = "Učitaj dokument iz Aurore")] public System.Xml.XmlDocument Load_DOK(System.Xml.XmlDocument XmlDoc) //xml doc {...
c#
[0]
1,512,062
1,512,063
Download/Install Android App from Non-Market Web Server: How?
<p>I'm trying to do a test-download of my first app from a non-Market web server (mine). I placed a signed APK on the server, browsed to it from my Nexus-S browser and clicked. I get a brief message about downloading, but then zilcho, no install, no nothing. And yes, I enabled "Unknown Sources" in the settings. Eac...
android
[4]
1,969,643
1,969,644
Echo value based on what checkbox is checked
<p>yesHave a simple thing here, but not that handy in PHP. Basically I have a form that will use jquery .ajax submit based on return from PHP script. This is pseudocode for example only</p> <p>HTML</p> <pre><code>&lt;form id="makepost" name="makepost" action="PHP/wronglish_submit.php" method="post"&gt; &lt;input ...
php
[2]
6,005,644
6,005,645
get the object property in another class
<p>i have a Emp class which have one property empName.i am setting this property in empCreate class.i want to get this property in Main class.</p> <pre><code>public class Main { public static void main(String[] args) { // here i want to get empName which i set it in empCreate.java } } </code></pre> <...
java
[1]
5,618,287
5,618,288
how to take snapshot of google map?
<p>I need to take snapshot of google map and save in local database. Please help me to take the snapshot of google map.</p> <p>Thanks, Monali</p>
android
[4]
3,799,204
3,799,205
How to genereate a System( PC/Laptop) Hardware unique ID in C#?
<p>How to genereate a System( PC/Laptop) Hardware unique ID in C#?</p> <p><strong>Please Note:</strong> The configuration is same for all the systems.</p>
c#
[0]
379,571
379,572
How to get two android devices talking through an app on a lan using wifi
<p>I have a small project I am working on and one of the technical problems I am running into is finding a easy way to get one app on one android device to push data to another app on another android device via lan. </p> <p>I do not want to have to resort to the push API or other similar solutions in case there is no...
android
[4]
2,374,676
2,374,677
Image and Clipart and "Bad" Text
<p>For the newest Android SDK, when simply creating a new Android project, does anyone else encounter this simple but weird problem: When you come to the second page "Configure Launcher Icon", Choosing Image or Clipart are both going to create the project successfully, but choosing Text is going to only get all empty p...
android
[4]
5,980,313
5,980,314
Asp.net how to correct the error
<pre><code> using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml...
asp.net
[9]
2,031,358
2,031,359
I have applied a check for not allowing alphabets.But its not working
<pre><code>import java.util.Scanner; public class Main extends Hashmap{ public static void main(String[] args) { Hashmap hm = new Hashmap(); int x=0; Scanner input = new Scanner(System.in); do{ System.out.print("Enter any integer value between 1 to 12: "); x...
java
[1]
2,027,532
2,027,533
How to Update Item Quantity in Cart Tab
<p>I am making a Ordered System, in which i am providing <strong>Two Tabs</strong> to user, </p> <p><em>First Tab</em> to select Item(s) and then add to cart.</p> <p><em>Second Tab</em> to view added Item(s) by user to purchase</p> <p><strong>Problem:</strong></p> <p>Whenever user will go back to Menu Tab to Update...
android
[4]
3,717,993
3,717,994
accelerometer in Android emulator
<p>I am trying to develop an app in Android which implements accelerometer to detect the shaking of the real device. But i am having problems to test it in emulator. Is emulator supports accelerometer, so that developers can test such kind of application in emulator. I don't know is it possible or not.. though i have t...
android
[4]
5,921,905
5,921,906
Where should i use OnActivityResult here?
<p>When i do debug it didnt go to try block than catch block , this is my code please help me!</p> <pre><code>public void onClick(View v) { try { path = Environment.getExternalStorageDirectory()+"/audio_meena.AMR"; File newFile = new File(path); Uri ur...
android
[4]
2,621,430
2,621,431
Android:How to get value of dynamically generated (Checked)Radio Button with in List Activity and where to define RadioGroup (in Layout) for List?
<p>1)I used list for generating (dynamically) radio button list in list activity and list is filled from database. I want value of checked radio button.</p> <p>2)Another thing:In layout where should have i declare RadioGroup ?? before tag or in layout file where radio button is declared</p> <p>Thanks in advance </p>...
android
[4]
4,181,283
4,181,284
regular expression to match words with no space
<p>I am trying to do a preg_match to filter unwanted spam queries and I would like to match any word that is listed in the preg_match and filter it if it has no space after it.</p> <p>So for example if I have the word balloon in the preg_match then I want to filter anything like "balloon1" or "balloond" or "balloonedf...
php
[2]
2,221,176
2,221,177
Show dot in center of map
<p>I am trying to show a dot in center of map, and it should be in the center everytime whenever I move the map. I have added a point in map but when I move the map it is not in center anymore?</p>
android
[4]
3,083,470
3,083,471
session username match to
<p>So when a logged on user posts a comment on my webpage, it automatically posts their username next to their comment. using <code>&lt;? echo $rows['a_name']; ?&gt;</code></p> <p>I now want to create an edit link that will only appear on the posts that the logged in user has created. In other words I want to match t...
php
[2]
1,788,502
1,788,503
Where is the error in my email activation fucntion?
<p>I am beginner, I am having small error in my email cativation function. the error is in the line of the for loop.</p> <pre><code>&lt;?php function generateCode(){ $codelength = 20; // The length of the activation code. $characters = "abcdefghijklmnopqrstuvwxyz1234567890"; // All accepted characters. $activatecod...
php
[2]
944,255
944,256
createRange function is not working in other browsers except IE
<p>I have a text box. When I write first text , then java script function will fire to check whether it is a number.</p> <p>For IE , the following code is returning -1 value, But Other browsers it does not alert any value. Please help me</p> <pre><code>var selected = document.selection.createRange(); var decInSel = s...
javascript
[3]
5,419,208
5,419,209
Grabbing, Resizing, and Displaying Image from JSON
<p>Basically, what I'm trying to do is the following:</p> <ol> <li>A user enters an ID for an asset on our system</li> <li>The ID is submitted as part of an API call that returns JSON with a field called "videoStillURL", which contains the URL for a thumbnail image.</li> <li>Resize this thumbnail image from its existi...
jquery
[5]
5,427,789
5,427,790
Central/middle letter of a string.(methods)
<p>I need to solve the following question which i can't get to work by myself(newbie^^)..:</p> <p>Ok, the question: Create a method which will print the central letter of a string (given as a parameter). I need to use the property lenght to determine the lenght.</p> <p>So for example the string: Books. the middle/cen...
c#
[0]
797,223
797,224
Android Custom Scrollbar Icon
<p>I would like to know the exact steps to set the icon that appears when rapidly scrolling on a list view. This appears as a silver icon with three lines through it. Not certain what the name of this is. I think it might be called the thumb. Please post a detailed response that shows the exact steps to replace this...
android
[4]
4,930,257
4,930,258
Is java that secure?
<p>Will the fact that java class files can be decompiled and need of third party software for obfuscation in any way compromise security?</p>
java
[1]
1,901,334
1,901,335
Android application update - how to?
<p>What is the best way to let my users perform an application update?</p> <p>Is there any way to force device reboot after the update? I'm asking this because my application registers some behavior on boot.</p> <p>Please note, the application would not be published in the Market. </p> <p>Update:</p> <p>My app will...
android
[4]
5,414,634
5,414,635
Accessing non-static members through the main method in Java
<p>As a rule in object-oriented paradigm, a static method can have access only to static variables and static methods. If it is so, an obvious question arises as to how can the main() method in Java has access to non-static members (variables or methods) even though it is specifically public static void...!!!</p>
java
[1]
2,759,077
2,759,078
Supporting early versions of Android
<p>What policy do developers have when it comes to supporting earlier versions of Android? I still support , but this means that I am unable to use features such as the action bar. Over 40% of my users are still running versions below 3.0, so I feel somewhat constrained about this.</p> <p>The problem is that 3.x was n...
android
[4]
2,147,831
2,147,832
jQuery simple show/hide large image from thumbnail click
<p>I've got the latest version of jquery library installed and just want a simple lightbox effect (preferably without having to install any additional libraries).</p> <p>When a thumbnail image from my carousel widget (jcarousel lite) is clicked, I want to show a full size image of that same image in a closable window ...
jquery
[5]
3,978,653
3,978,654
Python 2.7 - Error at line 298 - What is wrong with my code?
<p>Here is the code from the last if: to the next if:</p> <pre><code>if msgtype == "\x00": utflength=struct.unpack("!h", data[:2])[0] name=str(data[2:int(utflength)+2]) data=data[utflength+2:] utflength=struct.unpack("!h", data[:2])[0] message=data[2:utflength+2] self.sendOutput("To " + name + ...
python
[7]
323,913
323,914
Detecting OutOfMemory for that unusual case
<p>I have a program that creates an object for each file in a directory (sub)tree. In these days of larger and larger disks, there is no way to know how many files that will be, esp. not a few years (months?) from now. </p> <p>My program is not enterprise-critical; it is a tool for a user to analyze that subtree. S...
java
[1]
3,103,336
3,103,337
load another html into div with jquery
<p>can aynyone tell me what i'm doing wrong? The demo page, only with: "hello" word, cant show inside <code>#container</code></p> <pre><code>&lt;div id="galeria_oculta"&gt; &lt;div id="container"&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="wrapper"&gt; &lt;a href="#" id="exibe_galeria"&gt;click here&lt;/a&...
jquery
[5]
534,485
534,486
Android: Alarm Manager
<p>this is the code</p> <pre><code>public void startAlarm(Context context) { Intent intent = new Intent(context, SyncService.class); PendingIntent sender = PendingIntent.getService(context, 0, intent, 0); AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE); am.setRepeating(AlarmManage...
android
[4]
3,400,759
3,400,760
MultiSelect ListView steal event from parent LinearLayout
<p>I have LinearLayout and inside ListView ( multi select list) with attr width and height match_parent. I need to register OnTouchListener in LinearLayout but it seems that ListView steal event. How to solve this ?</p>
android
[4]
5,077,449
5,077,450
Block Back Button in android
<p>I want to block hardware back button in android ,in order to prevent from going back to other activity.. Thanks in advance...</p>
android
[4]
1,596,448
1,596,449
Why doesn't this getElementById function work?
<pre><code>&lt;div id="t"&gt;gf&lt;/div&gt; &lt;div id="g"&gt;ds&lt;/div&gt; function $() { return document.getElementById(arguments); } $('t', 'g').style.color = "red"; </code></pre> <p>Is there something that I did wrong. It says cannot call style of null...</p>
javascript
[3]
5,005,249
5,005,250
Regarding Button Clicking in android
<p>I have an application in Android 2.3.3. There are few buttons in it. I want a functionality (for the buttons) similar to that of qwerty keyboard, where in when we press a key or a letter, that character will be shown for a fraction of a second, just above the place where that character is present in the keyboard.</p...
android
[4]
4,188,824
4,188,825
Trying to add a div to an append statement via a + and getting OBJECT OBJECT (jquery)
<pre><code>$('#columnList').append("&lt;li&gt;" + $(colInProcID) + "&lt;/li&gt;"); </code></pre> <p>Obviously, Im doing something wrong...not sure how to say the above so that I dont get [object object] in my list.</p> <p>**Sorry, let me clarify ... the $(colInProcID) is a DIV that I want inserted into the list. (so...
jquery
[5]
2,561,211
2,561,212
C++ getenv always returns null value
<p>I have just added the environment variable "DataDir", but the getenv function still returns null value. </p> <p>Here is my code: const char *ret = getenv("DataDir");</p> <p>I restarted my computer and it done.</p>
c++
[6]
3,023,008
3,023,009
Dynamic link button not firing in update panel
<p>I'm dynamically adding a link button in the footer of a grid view. The grid view is wrapped in an update panel. I can get an async post back (I can tell by seeing an update progress flash), but I can't get the debug point in my click function to fire.</p> <pre><code>Private Sub gvParts_RowDataBound(ByVal sender A...
asp.net
[9]
13,397
13,398
How to break apart a string value and re-arrange characters
<p>So from what I have found I would have to write a swap method? Only problem is from the codes I have been looking over it is a bit over my head. </p> <p>I am getting a value from a xml file, for example "20120411" What I would like it to be once passed to another string is April 11, 2012, or at least 04/11/12. I ...
java
[1]
5,813,759
5,813,760
sending message to pre configured numbers
<p>Hai I am developing a new application. In that send a message to pre configured numbers and the user selecting numbers. How it is possible? when then send button is pressed. Please help. Can any give me some Sample code or tutorial.</p> <p>Thank You</p>
iphone
[8]
4,056,141
4,056,142
C++ print out limit number of words
<p>I'm beginner to C++ and I wonder how to do this. I want to write a code which take in a text line. E.g. "Hello stackoverflow is a really good site"</p> <p>From the output I want only to print out the first three words and skip the rest. </p> <p>Output I want: "Hello stackoverflow is"</p> <p>If it was Java I would...
c++
[6]
4,914,155
4,914,156
How to get an array from another class from Score.java to Test.java
<p>hello I want to pass the an array of marks from another class called Score which is in Score.java. I am using JDK. and absolute beginner.</p> <pre><code>public class test { public static void main (String[] args) { System.out.print("Hello"); test(Score.testMarks); } public stat...
java
[1]
1,857,356
1,857,357
C#.NET Excel and OLEDB Connection String
<p>I am trying to read data from Excel file into my windows application. </p> <p>Connection String :</p> <pre><code>provider = Microsoft.Jet.OLEDB.4.0; Data Source = "Excel File"; Extended Properties = \"Excel 8.0; HDR = Yes; ImportMixedTypes = Text; Imex = 1;\" </code></pre> <p>With this connection string I am...
c#
[0]
3,526,668
3,526,669
Intent filter detection in several Activities
<p>I am developing an NFC application (although I think this doesn't really matter for my problem) where I currently have a MainActivity with a TabHost and some other activities (one per tab). I also have an Activity that I have done to read NFC tags. This activity contains intent filters in the manifest to catch the t...
android
[4]
1,648,259
1,648,260
php mysql fetch array
<p>i am trying to fetch data from database but i keep getting the following message Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\sss.php on line 6</p> <p>But when i check the code i can't see what is wrong... CODE :</p> <p> <pre><code>$conn = mysql_connect("local...
php
[2]
1,823,491
1,823,492
using the contacts manager in android
<p>i have an app which shows the received messages as a Toast through a BroadcastReceiver. I am presently using the SmsMessage.getOriginatingAddress() method which gives me the number of the sender, how can modify it to get the corresponding name of the sender if stored in the contacts?</p>
android
[4]
2,874,063
2,874,064
Is it possible to have variables visible "only to modules" and its extensions?
<p>Say I have the following modules, split across multiple files both capable of <em>extending</em> <code>skillet</code>:</p> <p><strong>File1.js:</strong></p> <pre><code>(function(){ var privateVar1 = 0; var privateFunction1 = function() { //function definiton }; skillet.fry() = function() { //fry it //m...
javascript
[3]
4,828,020
4,828,021
How do I use CORDIC in my own math functions?
<p>I am writing my own math functions for my game engine and I want to use CORDIC to calculate things such as sines, cosines, tangents and (square) roots. How can I implement CORDIC in my functions?</p>
c++
[6]