Unnamed: 0 int64 65 6.03M | Id int64 66 6.03M | Title stringlengths 10 191 | input stringlengths 23 4.18k | output stringclasses 10
values | Tag_Number stringclasses 10
values |
|---|---|---|---|---|---|
3,740,912 | 3,740,913 | php check open through iframe | <p>I want to check using php if the current page is called by an iframe and not directly in the browser.</p>
<p>It's a page that gets some $_POST parameters while the sending form's target is an iframe, so the page will display in an iframe.</p>
<p>I want to check that using PHP, How?</p>
<p>Thanks.</p>
| php | [2] |
2,557,002 | 2,557,003 | Include $_POST, $_GET, $_SERVER values in PHP Error Log | <p>I have code like this</p>
<pre><code>try {
header("Location: http://www.google.com\n-abc");
}
catch (Exception $e) {
error_log(print_r($_POST, true));
error_log(print_r($_GET, true));
error_log(print_r($_SERVER, true));
}
</code></pre>
<p>Without the try {} catch {} block, I can see the POST, GET a... | php | [2] |
2,196,175 | 2,196,176 | How to read an array and animate the results | <p>I read through several examples of loading an array manually with graphical image file names. The array is then referenced with a few lines of code and the graphical images are animated which looks great.</p>
<p>I have a method that I call that reads data from a SQLITE table and loads an array that contains the fi... | iphone | [8] |
5,020,818 | 5,020,819 | expandable list not looking properly in 2.1 QVGA | <p>i have developed an application for 1.5 and above which uses expandable list ,but when i test it on 2.1 QVGA emulator expandable list dosent look proper .
Also i have tried running sample Expandablelist1 ,but it also has same issue.
so can anyone tell me is this issue with emulator only?
if yes how to resolve it?</p... | android | [4] |
4,875,847 | 4,875,848 | Get entire BODY content using PHP DOM DOCUMENT | <p>I want to get entire body tag content using DOM Document. </p>
<p>I used following code:</p>
<pre><code>$dom = new domDocument;
/*** load the html into the object ***/
$dom->loadHTML($html);
/*** the table by its tag name ***/
$tables = $dom->getElementsByTagName('body')->list(0)->nodeValue;
</code><... | php | [2] |
4,953,341 | 4,953,342 | Javascript Incrementer | <pre><code><script type="text/javascript">
function Incrementer()
{
debugger;
var txtBox = document.getElementById('MainContent_TextBox1').value;
int i = parseInt(txtBox);
i = i + 1;
var v = i + "";
document.getElementById('MainContent_TextBox1').value = v;
alert(v);
}
</script>
... | javascript | [3] |
5,580,115 | 5,580,116 | too see if checkboxes have been checked javascript | <p>Hallo </p>
<p>How would I go about in checking whether checkBox has been checked in javascript?
I C# it is simple enough</p>
<pre><code>int selected = 0;
for (int loop = 0; loop < chkMeal.CheckedItems.Count; loop++)
{
selected++;
}
if (selected > 1)
{
... | javascript | [3] |
3,029,014 | 3,029,015 | Why does the command, alert($(this).attr("id")); return "undefined"? | <p>Why does the command</p>
<pre><code>alert($(this).attr("id"));
</code></pre>
<p>return "undefined"? I'm using it in ASP NET and Internet Explorer 8.</p>
| jquery | [5] |
1,379,917 | 1,379,918 | Stop a fadeOut within a callback of another fadeOut | <p>I am trying to stop an animation from propagating on a call back of another animation, i have tried to stop the animation directly by adding <code>.stop(true, true)</code> onto the element that i wish to stop from fading but it doesn't seem to stop the animation.</p>
<p>I have created a fiddle -> follow the link <a... | jquery | [5] |
218,749 | 218,750 | From Java SE to web development | <p>I am about to start a new job as a junior web developer with a small company. I do have a degree in Software Engineering and have done some work with building web sites, but very basic, html, and VB.net. My experience with Java is very strong and thus that is why I think this company is taking me on, the fact I can ... | java | [1] |
2,762,893 | 2,762,894 | How to get id of previous element by using mouseovered element's id which was taken from its class | <p>I did this but it didn't work. Can anyone help me? Thanks.</p>
<pre><code>$('.current_element').mouseover(function() {
var currentElementId = $(this).attr('id');
var previousElementId = $('#' + currentElementId).prev('.previous_element').attr('id');
});
</code></pre>
| jquery | [5] |
2,964,749 | 2,964,750 | PHP secure downloader with PayDotCom or Paypal | <p>The script below is a quick and dirty attempt to provide a means of protecting my files that I'm selling on PayDotCom and Paypal.</p>
<p>If anyone has experience with these services, I have a few questions...</p>
<p>1) Is there a token that I can set at either of these pay sites that I can then check for in the sc... | php | [2] |
2,776,861 | 2,776,862 | Heritage, dynamic binding, counstructor in superclass. Java. | <p>How come the first System.out.println does not print a value of 10? It prints a 0. First a new Child-object is created which calls the constructor in Parent. The constructor in Parent calls lookup in Child because of dynamic binding. So why does lookup in Child return a zero and not a ten?</p>
<pre><code>public cla... | java | [1] |
1,228,813 | 1,228,814 | How to know if another application set the largeHeap or not programatically? | <p>I found some game apps use larger memory than the default limit (64MB in Nexus 7). </p>
<p>To achieve that, I assume they set the <code>android:largeHeap="true"</code> </p>
<p>In my codes, I want to check if an app set this flag or not. Any clue?</p>
| android | [4] |
3,512,286 | 3,512,287 | Referencing the current jQuery object in a chain? | <p>At DevDays in SF last year (before jQuery 1.4 was released), I thought they mentioned an upcoming feature in 1.4 that would allow you to reference the current jQuery object while in a chain. I've read through all of the 1.4 improvements and wasn't able to find it. Does anyone know how this can be done?</p>
<p><stro... | jquery | [5] |
5,021,143 | 5,021,144 | Simple application development | <p>i want to know how to develope a simple application for nokia mobile phone ?</p>
| c++ | [6] |
1,478,130 | 1,478,131 | Call an external function from inside function in jQuery | <p>I try to extend jQuery, but when I call myTest this will return this.myTest.test() is undefined...</p>
<p>can someone tell me why...</p>
<pre><code>(function($) {
$.fn.myTest=function() {
var x=function() {
this.myTest.test();
var b = function() {
this.myTest.c... | jquery | [5] |
3,803,178 | 3,803,179 | Reload a table view on close of add subview | <p>I have three objects in the applicaion. There is a UItableviewcontroller(with nib file) that shows a list of the items. One UIviewcontroller to add item (with nib file) and a model class that contains item object.</p>
<p>I show the list of item firstly (on application start). I have a navigation button on navigatio... | iphone | [8] |
385,503 | 385,504 | timeoffset in whole minutes in c# | <p>I have a method that calculates the number of minutes between two times. Something like this:</p>
<pre><code>DateTime UserLocalTime = DateTime.UtcNow.ConvertToUserTime(UserTimezoneID);
double TheOffset = (UserLocalTime - DateTime.UtcNow).TotalMinutes;
return TheOffset.ToString();
</code></pre>
<p>The problem is ... | c# | [0] |
5,836,227 | 5,836,228 | Good framework for logins in PHP | <p>I have a MySQL database full of members of an organization with their passwords and other accompanying data. Is there a good PHP framework for a log-in system? I'd like something like what they do on yahoo, where you can browse the pages without logging in but you need to log in to access certain content.</p>
| php | [2] |
5,980,125 | 5,980,126 | Is there a encryption api's available to encrypt log file while using Microsoft Enterprise Library 3.1 | <p>How to encrypt a string message while it is being logged into the log file using Logger.Write(...) in Microsoft Enterprise Library 3.1. Are there any inbuilt API's in Microsoft Enterprise Library which does encryption? </p>
| c# | [0] |
4,688,618 | 4,688,619 | there is no alert prompt when run this simple javascript code? | <pre><code>var foo = function(){};
foo.prototype.value = 5;
foo.prototype.addValue = function(){ foo.value = 6; }
function bar(func)
{
func(); // I'm running the function!
}
bar(foo.addValue); // pass in the function
alert(foo.value); // it's now 6!
</code></pre>
<p>Why is the no alert prompt when running this JavaSc... | javascript | [3] |
3,683,598 | 3,683,599 | Assign variable in Java while-loop conditional? | <p>I have a method that does a lot of checking and computation and returns a custom class, returnMessage. returnMessage has 2 booleans and a String. What I want to do is run this method in a while loop from my main class and have access to the returnMessage object after the while loop terminates for the last time. </p>... | java | [1] |
2,619,859 | 2,619,860 | std compliant stringstream using stack allocated storage? | <p>Can't seem to find anything currently available in the wild, which seems odd.</p>
<p>So before I roll my own, does anyone know of a std compliant stringstream which allocates storage on the stack?</p>
<p>I'm thinking of 2 ways to achieve this:</p>
<p>Initially use a statically sized buffer on the stack (probably ... | c++ | [6] |
874,486 | 874,487 | Please help flicker implement on android | <p>Anybody idea how to integrate flicker to my application on android?. i got API key secrete key for my application from flicker.com site. i am confused how to use it. Api key separate for every user? how to get token number for flickr by code ? i have refer photostream and Flicker free code . but both code give the e... | android | [4] |
2,260,411 | 2,260,412 | Populating ComboBox | <p>i have this questions... my scenario is to populate combobox from the database and display customer name and hold a value of the id...my id i use identity increment...tnx</p>
<pre><code>SqlConnection conn = new SqlConnection(connectionString);
conn.Open();
//SelectCustomerById(int x);
comboBoxEx1.Items.Clear();
S... | c# | [0] |
4,619,883 | 4,619,884 | adding multiple Views to multiple layouts | <p>I want to add ovals to each view that I have but it seems like it only adds it to the first layout. Any ideas</p>
<p>Here is my xml code</p>
<pre><code><RelativeLayout
android:id="@+id/first_plane"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</RelativeLayout>... | android | [4] |
4,440,380 | 4,440,381 | Getting objects from an Array | <p>I may be doing this very badly but I'm new to this!
if I have an array that contains objects like this</p>
<pre><code>var company = [H7 = {companyName:"company1"},F4 = {companyName:"company2"}]
</code></pre>
<p>If I get a reference as a string say "F4" is there any way I can go</p>
<pre><code>myCompName = company... | jquery | [5] |
4,820,140 | 4,820,141 | Java API that can analyze HTTP requests for malicious inputs? | <p>my idea is to create a proxy application firewall that will analyze and filter out HTTP requests from the client accessing a web application, here's a scenario let say a web application that will ask a user for log in details, the proxy application firewall should then be able to analyze the HTTP request from the us... | java | [1] |
4,366,046 | 4,366,047 | a generic error occurred in gdi+. while saving an image | <p>Dear Expert i am getting an error while saving an image the code is as follows </p>
<pre><code> ClsImageManager objImgManager = new ClsImageManager();
Bitmap ImageBitmap = objImgManager.GetBitmapFromBytes(ImageData);
Response.ContentType = "image/tiff";
ImageBitmap.Save(Response.OutputStream, ImageFormat.Tif... | asp.net | [9] |
881,419 | 881,420 | Android: Proper Way to use onBackPressed() | <p>I wrote a piece of code that will give the user a prompt asking them to press back again if they would like to exit. I currently have my code working to an extent but I know it is written poorly and I assume there is a better way to do it. Any suggestions would be helpful!</p>
<p>Code:</p>
<pre><code>public void o... | android | [4] |
2,424,609 | 2,424,610 | python logging.info does not print, logging.warn and logging.error does | <pre><code>import logging
if __name__ == "__main__:
logging.info('info')
logging.warn('warning')
logging.error('error')
</code></pre>
<p>Result: </p>
<pre><code>warning
error
</code></pre>
<p>Why does <code>logging.info</code> doesn't report? </p>
<p>Thank you</p>
| python | [7] |
5,144,971 | 5,144,972 | What's the value of characters in execution character set? | <p>Quote from C++03 2.2 Character sets:</p>
<blockquote>
<p>"The basic execution character set and the basic execution
wide-character set shall each contain all the members of the basic
source character set..The values of the members of the execution
character sets are implementation-defined, and any additiona... | c++ | [6] |
1,173,042 | 1,173,043 | I need to primitive root of prime number? | <p>I need to primitive root of prime number.I wrote this code but it has heap size error and it doesn't work for big number like 101.I don't have any other idea for calculating primitive root .If you have please help me .I need to it so much.Do you have any other algorithm for calculating primitive root of prime number... | java | [1] |
1,281,575 | 1,281,576 | Does Android support 'Receiver' mode for playing audio files? | <p>I have a requirement where I need to play an audio file in receiver mode(earpiece).I am not sure whether higher versions of Android SDK supports this receiver mode.I went through some links which said about 1.5/1.6 having changes in these Audio APIs and hence not sure. :(</p>
<p>Can someone please help?</p>
<p>Tha... | android | [4] |
374,133 | 374,134 | How i campare two dates in Iphone? | <p>I want to set date and time two days after my current date and time.How i set it using NSDate and dateformatter. I want compare date after two days, it was perviously set or not.</p>
<p>I write code now for it,
NSCalendar *calendar = [NSCalendar autoupdatingCurrentCalendar];</p>
<pre><code>NSDate *pickerDate =... | iphone | [8] |
3,194,385 | 3,194,386 | Benefits of JavaScript anonymous function with namespaces | <p>Is there any benefit when writing JavaScript classes and namespaces of this...</p>
<pre><code>if(typeof MyNamespace === 'undefined'){
var MyNamespace = {};
}
(function(){
MyNamespace.MyClass = function(){
this.property = 'foo'
return this;
}
}());
</code></pre>
<p>Versus just this...</p>
<pre><code>... | javascript | [3] |
2,451,514 | 2,451,515 | Javascript 'this' not returning object clicked on | <p>i have an anchor tag generated in my code behind that calls a function with </p>
<pre><code>href="javascript:blah('string',this);"
</code></pre>
<p>I need to interact with the object but it doesn't seem to be returning the correctly. When I alert this it returns "object Window" and calls to this.id return undefin... | javascript | [3] |
941,203 | 941,204 | null pointer to object inside object method | <p>I have a class A</p>
<pre><code>class A
{
A();
~A();
DoSomething();
}
</code></pre>
<p>I then declare an object and a pointer to the allocated object</p>
<pre><code>A Obj;
A* pObj = &Obj;
</code></pre>
<p>I've found out that inside DoSomething() I am setting pObj to NULL</p>
<pre><code>A::DoSomething... | c++ | [6] |
5,642,430 | 5,642,431 | quick javascript function help | <p>I have this function, and I want to pass a variable (z) to the OnClick event of an image.</p>
<p>I have this:</p>
<pre><code>for (z=1; z<img_src.length; z++){
path_th_img= 'ad_images/'+category+'/'+'thumbs/'+img_src[z];
document.getElementById("thumb_pic_div").innerHTML += "<img src='"+path_th_img+"'... | javascript | [3] |
1,387,685 | 1,387,686 | Why is assigning to $bool1 or $bool2 different from assigining to the same statement wrapped in parenthesis? | <p>I'm completely confused. Why, on a grammatical level, would the two statements below be any different?</p>
<pre><code>$bool1=false;
$bool2=true;
//Statement1
$result=$bool1 or $bool2; // Returns false
//Statement2
$result=($bool1 or $bool2); // Returns true
</code></pre>
<p>As far as I'm aware, those two stat... | php | [2] |
3,071,230 | 3,071,231 | Cannot make reference to Facebook sdk project | <p>I am tryin to integrate facebook in my android app.
In some tutorials, I see that i must make a reference to base facebook project.
I try this and all looks like must be:<a href="http://i53.tinypic.com/vkehl.png" rel="nofollow">here</a>
After that i open properties again and here is result : <a href="http://i51.tiny... | android | [4] |
214,346 | 214,347 | How to read all splitcontainers and i | <p>Hi
I have 50 splitcontainers.. i want to read all the splitcontainers & its panels programmatically...Is it possible...?</p>
<p>Because the below code only reads Splitcontainer4 & Panel1, But Iam looking to read all the splitcontainers and its panels programmatically...</p>
<pre>
foreach (Control Ctrl in ... | c# | [0] |
1,203,667 | 1,203,668 | Have I got the syntax incorrect for this jquery else if statement? | <p>Edit: <strong>Question resolved. Syntax error.</strong></p>
<p>Here it is (the if part omitted as I know it is correct)</p>
<pre><code>else if($('.now [name="stuff"]').val() !==''){...}
</code></pre>
<p>I want to check the value of the input field withhin the class 'now' and with the name 'stuff' and if the value... | jquery | [5] |
4,561,491 | 4,561,492 | Query about scope of variables in java | <pre><code>public class Knowing {
static final long tooth = 343L;
static long doIT(long tooth) {
System.out.print(++tooth + " ");
return ++tooth;
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.ou... | java | [1] |
5,856,485 | 5,856,486 | PHP Wordpress add class="last" to last item in menu list | <p>I'm drawing out a listing of menu items inside a wordpress template (header.php) and need to assign a special className to the last menu item in the list. I'm building the list with this code...</p>
<pre><code>$myposts = get_posts();
foreach($myposts as $post) :?>
<li><a href="<?php the_permalink();... | php | [2] |
4,707,042 | 4,707,043 | Context in a PreferenceFragment | <p>taken from <a href="http://developer.android.com/guide/topics/ui/settings.html" rel="nofollow">http://developer.android.com/guide/topics/ui/settings.html</a>:</p>
<blockquote>
<p>Note: A PreferenceFragment doesn't have a its own Context object. If
you need a Context object, you can call getActivity(). However, ... | android | [4] |
4,212,313 | 4,212,314 | How can i know app information from appstore programamtically | <p>I am developing one application. In that I want to know some X application is available in AppStore or not programmatically. So please tell me how can I access and get the information from app store programmatically.</p>
| iphone | [8] |
49,497 | 49,498 | Bulk Rename Files in a Folder - PHP | <p>I have 1000 images in a Folder, which has SKU# word in all the images. For examples</p>
<pre><code>WV1716BNSKU#.zoom.1.jpg
WV1716BLSKU#.zoom.3.jpg
</code></pre>
<p>what i need to do is read all the filenames and rename it to the following</p>
<pre><code>WV1716BN.zoom.1.jpg
WV1716BL.zoom.3.jpg
</code></pre>
<p>So... | php | [2] |
1,160,280 | 1,160,281 | How do I remove ' ' from a string in PHP? | <p>This character is coming from the database. I have a description which contains the image tag and text, but <code></code> is appearing in the beginning of that description.</p>
| php | [2] |
4,478,434 | 4,478,435 | What are some good resources for Javascript Error handling | <p>I recently ran into some issues this week on a web app that I built and I realized that I didn't have a good process in place for handling errors. What are some good resources on the subject? I'm talking links, books, videos, slides, whatever. </p>
| javascript | [3] |
1,687,460 | 1,687,461 | Two conditions in a for loop | <p>Why does this for loop work with each condition on their own, but together the first condition doesn't matter?</p>
<pre><code>for ($j = 0; $j < 5 or $j < $synCount; $j++)
</code></pre>
<p>I only want the loop run five times</p>
<p>or</p>
<p>if synCount is less than this.</p>
| php | [2] |
4,043,307 | 4,043,308 | To continue in Android career? | <p>Ive been learning android for two months now,Its pretty long,a little bit interesting,I have java knowledge but the question is,I want to venture into writing apps for companies like stores e.t.c,how this can metamorphosize into a career. Some say its too early to make it a career line..Is it?</p>
| android | [4] |
969,127 | 969,128 | Create video in iPhone | <p>I need to convert image sequences(ie,png) to video file in iPhone. How i can convert the images to video. </p>
<p>Regards,</p>
| iphone | [8] |
5,452,060 | 5,452,061 | Round DateTime to closest quarter hour | <p>How can I round a DateTime object to the closest quarter hour?</p>
<p>So: 2011-05-30 09:11:00 will be rounded to 2011-05-30 09:15:00, 2011-05-30 09:47:00 will be rounded to 2011-05-30 09:45:00 and so on.</p>
| php | [2] |
4,135,332 | 4,135,333 | Get website source | <p>So I have this source which gets the source from a website:</p>
<pre><code>WSADATA wsaData;
if (WSAStartup(MAKEWORD(2,2), &wsaData) != 0) {
cout << "WSAStartup failed.\n";
system("pause");
return 1;
}
SOCKET Socket=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
struct host... | c++ | [6] |
2,413,048 | 2,413,049 | code not working when checking table row count | <p>I'm trying to count the number of rows in a table of search results when the user presses the search button. I am doing this, so that the table is cleared of previous search results if any are present.</p>
<p>However, the code doesn't work. Nothing happens when the user presses search. If I remove or comment out... | jquery | [5] |
3,853,275 | 3,853,276 | jQuery rounded corners IE problem | <p>I've tried <a href="http://www.malsup.com/jquery/corner/" rel="nofollow">http://www.malsup.com/jquery/corner/</a> and "curvyconvers", both with the same result. In ie7 & 8, my div is visible for about a second, without rounded corners, and then it dissapears. The div is 100x100px with a 1px black border. </p>
| jquery | [5] |
3,717,971 | 3,717,972 | Why does float('3') apparently return a TypeError in Python 2.6.8? | <p>I have (anonymized) a hash constructed from values in Python 2.6.8:</p>
<pre><code>sys.stderr.write('#' + str(dictionary['Field 4']) + '#\n')
kpis_found.append(float(int(dictionary['Field 1']), 1) *
max(float(dictionary['Field 2']), 1) *
max(float(dictionary['Field 3']), 1) *
max(float(dictionary['Field... | python | [7] |
5,565,500 | 5,565,501 | var myFunction = function() {}; vs fuction myFunction() {}; | <p>What do you think, which one is the better, faster, nicer solution to declare a function?</p>
<p>First:</p>
<pre><code>(var) myFunction = function(){
//Stuff to do
};
</code></pre>
<p>or Second:</p>
<pre><code>function myFunction() {
//Stuff to do
};
</code></pre>
<p>Both will work in JavaScript and JQuery. But... | javascript | [3] |
2,814,506 | 2,814,507 | How to make a simple command-line chat in Python? | <p>I study network programming and would like to write a simple command-line chat in Python.</p>
<p>I'm wondering how make receving constant along with inputing available for sending at any time. </p>
<p>As you see, this client can do only one job at a time:</p>
<pre><code>from socket import *
HOST = 'localhost'
PO... | python | [7] |
4,862,118 | 4,862,119 | Can we convert a string variable to long or viceversa in android? | <p>Is it possible to convert a string variable to long or a long variable to string type in android?
If so how can I achieve that? Please help me regarding this....</p>
<p>thanks in advance</p>
| android | [4] |
562,190 | 562,191 | How to adjust UINavigationBar's text and buttons when you change tintColor? | <p>I was able to change the tintColor of the UINavigationBar by doing:</p>
<pre><code> self.navigationController.navigationBar.tintColor = [UIColor redColor];
</code></pre>
<p>However the problem is when the color gets too light, the button, backButton and the title text is not visible. Why is it that it doesn't auto... | iphone | [8] |
3,828,244 | 3,828,245 | Adding Content-type to Pear Mail | <p>i'm assuming setting a content type of text/html format income emails to the default font style and size of the clients/users machine. User Pear Mail how would I add in a content type. All the examples I've send only show adding content-type with mime attachments.</p>
<p>Also if there is another way to make and inc... | php | [2] |
1,693,617 | 1,693,618 | Set a global timer in a php web environment | <p>I'm trying to make a function in PHP that counts how many times a function is used by all the users.</p>
<p>If this function has been used, let's say, 30 times, then it should block access for some minutes and then reset the counter to 0. </p>
<p>Is this possible in PHP?</p>
| php | [2] |
5,177,077 | 5,177,078 | How to make Local Notification in android? | <pre><code>public class ChildLock extends Activity implements OnClickListener
{
ProgressDialog dialog;
int increment;
int maximum ;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
... | android | [4] |
1,607,359 | 1,607,360 | Does jQuery continue filtering if it finds 0 matches? | <p>I have a question regarding efficiency of jQuery filtering. I've just written quite a lengthy expression and I was wondering if jQuery stops filtering if the current number of matches is 0.</p>
<pre><code>passengers.filter('input.FromDate[value="01/09/2011"]')
.closest('tr')
.filter('input.ToDat... | jquery | [5] |
412,417 | 412,418 | Is it the best practice to catch thowrable? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/6083248/is-it-a-bad-practice-to-catch-the-throwable">Is it a bad practice to catch the Throwable?</a> </p>
</blockquote>
<p>Is it best practice to catch throwable? If catching throwable, will it catch out of me... | java | [1] |
5,836,557 | 5,836,558 | Service, activity and notifications | <p>I have program that starts Service. </p>
<p>Service periodically checks server for updates. If there are new updates on server service creates notification. It creates notificatins even if my application is foreground. But I want it to create notification only if my application is background or stopped.</p>
<p>Can... | android | [4] |
217,091 | 217,092 | Querying the status of a bit flag? | <p>I am trying to parse some files that have a bitwise flag column. There are 11 bits in this flag and I need to find out, for each row in the files, what is the value of the 5th bit (1-based).</p>
| c++ | [6] |
5,834,224 | 5,834,225 | How can I make a clock tick? | <p>I'm making a clock right now and currently my second hand, minute hand, and hour hand are all drawn graphically using a <code>Line</code> object with an <code>(x0, y0)</code> beginning coordinate and <code>(x1, y1)</code> end coordinate. </p>
<p>What's confusing me right now is how to make the second hand "tick" e... | java | [1] |
5,915,125 | 5,915,126 | my jquery code not working IE6,IE7 | <p>code below working fine but not in IE6, IE7, below is the code is there any error please help</p>
<pre><code>$(document).ready(function(){
$(".backgroundElement").bind( "keyup change", function () {
var color=$("#colorpickerField1").attr('value');
var brnbackgroundurl=$("#brnbackgroundurl").at... | jquery | [5] |
5,404,619 | 5,404,620 | Show Multiline View in GridView | <p>I have Stored a Data in database by multiline Textbox..
When i link it with the gridview.. It shows that data in a Single line.. I cant get the multiline view.. please give ur valuable suggestions for that.. Thanks in advance..</p>
| asp.net | [9] |
255,553 | 255,554 | C# Convert String to Size | <p>Hey is there a way to convert a string variable to the datatype Size?</p>
<p>for example, if I had this variable</p>
<p>string tempSize;</p>
<p>how could I convert that to a dataType Size for reading purposes??</p>
| c# | [0] |
962,335 | 962,336 | make jquery procedure run better | <p>I have the following code:</p>
<pre><code>$('#MyDiv .TheClass').eq(TheIndex).removeClass('ClassA');
$('#MyDiv .TheClass').eq(TheIndex).removeClass('ClassB');
$('#MyDiv .TheClass').eq(TheIndex).addClass('ClassC');
$('#MyDiv .TheClass').eq(TheIndex).children().each(function () {
//do something here
});
</code></pre... | jquery | [5] |
4,345,319 | 4,345,320 | Debug which Javascript is causing a redirect | <p>We have mountains of Javascript. Somewhere in there, a redirect is happening that we don't want. How can you generically debug which code caused a redirect? A stack trace would be perfect.</p>
| javascript | [3] |
3,652,886 | 3,652,887 | Non Static/Constant values in case statements within a Switch | <p>I'd like to do something like this in c sharp:</p>
<pre><code>int i = 0;
foreach ( Item item in _Items )
{
foreach (Field theField in doc.Form.Fields)
{
switch (theField.Name)
{
case "Num" + i++.ToString(): // Number of Packages
theField.Value = string.Empty;
... | c# | [0] |
1,345,590 | 1,345,591 | Add Some Links to some words issue | <p>I have some words Such as</p>
<p>"Hello this article about games. Our choice is train games. Name of game is My Little Train"</p>
<p>I want to add automatic links as below</p>
<p><strong>"games" » "<a href="http://www.mywebsite.com" rel="nofollow">http://www.mywebsite.com</a>"</strong></p>
<p><strong>"train game... | php | [2] |
2,669,488 | 2,669,489 | Losing focus at buttons in android application | <p>I made one simple android application and I notice next problem:
I have several controls with attached click (or i say touch) event (buttons, imageviews). Some of them are loaded from android xml file, and some I make "in fly". </p>
<p>Now when I scroll screen, I must 2 time click on button to make effect (click ev... | android | [4] |
4,294,080 | 4,294,081 | How to --enable-xmlreader in PHP | <p>I am running Fedora 10 and have php 5.2.9, Unfortunately I saw that '--disable-xmlreader' (from phpinfo() ) was passed to the RPM file when PHP was intalled. How can I enable xmlreader for a pre-existing php install?</p>
| php | [2] |
1,701,664 | 1,701,665 | Where is the oposite of imagecreatefromstring | <p>I have an image in a string <code>$data</code>. I need to resize that image, so I convert it to a <code>image</code> with <code>imagecreatefromstring</code>. How to I get that resized image back to <code>$data</code> variable? All I've found is <code>imagepng</code> in its ilk.</p>
| php | [2] |
452,523 | 452,524 | Android HTTP request always returns code 404 | <p>I'm trying to implement a simple HTTP request. The request will verify a username and password from a server. The server is configured such that it will only return two error codes, 200 for verified and 404 for everything else. I've done extensive debugging with eclipse and found that I always receive code 404. I've... | android | [4] |
4,035,752 | 4,035,753 | Find the second highest variable in array | <p>I would like to find the second highest variable in an array.</p>
<p><strong>For example if I have:</strong></p>
<pre><code>$cookies = array(
"chocolate" => "20",
"vanilla" => "14",
"strawberry" => "18",
"raspberry" => "19",
... | php | [2] |
289,245 | 289,246 | Java - Runtime.freeMemory() | <p>I was trying to see usage of Runtime.freeMemory().</p>
<p>Documentation says it 'Returns the amount of free memory in the Java Virtual Machine'</p>
<p>I executed a simple program test this. Program below:</p>
<pre><code>public class Test {
public static void main(String a[]) throws Exception {
System.out.p... | java | [1] |
2,759,219 | 2,759,220 | PHP white screen on error | <p>I'm getting a white screen every time a PHP application drops an error.
I checked php.ini and error_reporting = E_ALL and display_errors = On
Also I checked with the php_info() function and error_reporting is set to 6135 which is correct.</p>
<p>I already tried adding:
error_reporting(E_ALL);
ini_set('display_err... | php | [2] |
3,829,751 | 3,829,752 | The structure of reference type in detail | <p>I know a reference type object is comprised of two parts: a reference to the object, which is essentially a pointer holds the address of the real object, and the object itself that resides on the heap, which might be moved by the GC. The object itself, in turn, consists of two parts: the instance data part (fields) ... | c# | [0] |
5,680,888 | 5,680,889 | PHP add an item from an array | <p>Let's say i have this array:</p>
<pre><code>$array = (1,2,4,5);
</code></pre>
<p>Now how do i add missing 3 in above array in the correct position <strong>index/key</strong>-wise?</p>
| php | [2] |
1,389,596 | 1,389,597 | javascript deleting the array of elements | <p>i am having 10 check boxes.if i click the value of the check box has to push to the array,if i unchecked the check box then the corresponding check box value has to be deleted from the array?
pls...anyone give reply for this</p>
| javascript | [3] |
2,317,973 | 2,317,974 | Trying to add Imageview to canvas via FrameLayout.addView(); | <p>I can add this logo to the canavas if I do this:</p>
<pre><code>FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(200,200);
ImageView boo = new ImageView(ExampletouchActivity.this);
boo.setImageResource(R.drawable.ic_launcher);
boo.setLayoutParams(lp);
fr.addView(boo); //this works fine
</code></pre>
<p>... | android | [4] |
1,137,812 | 1,137,813 | Nested class display member value | <pre><code>class A
{
public:
class B
{
private:
int ii;
};
void print(){cout<<B::ii<<endl;}
};
</code></pre>
<p>My compiler says I can't access the interger inside ii;
I search through this site and come up with friend key
I change it into </p>
<pre><code>class A
{
publi... | c++ | [6] |
5,498,803 | 5,498,804 | Android: Creating file uisng createNewFile() method | <p>As described in android documentation, to create a new file which will be situated in the application's directory there is the method in <code>Context</code> class: <code>openFileOutput()</code>. </p>
<p>But where will be the file situated if I use simple <code>createNewFile()</code> method from <code>File</code> c... | android | [4] |
1,093,041 | 1,093,042 | fast way to find find min/max/avg value in file | <p>I have a file in the format</p>
<pre><code>1 52
2 456
3 4516
5 4545
6 41
</code></pre>
<p>what would be the fastest way to read in the file and get the min/max/avg value in the second column in PHP?</p>
| php | [2] |
949,481 | 949,482 | Rotating A Dial in Android | <p>I need to rotate my image in my on touch listener when the user touches it. I am rotating a dial graphic, so it needs to rotate around its center point. Does anyone have an example?</p>
| android | [4] |
5,563,242 | 5,563,243 | Executing a line after finishing of previous line in jquery | <p>I am new to jQuery and I am trying a simple program. In this program what I am trying to achieve is that when I will click the div text then first line will fadeout then it will change background colour and then it will fade in so overall it will give effect of changing colour slowly, but what happening here is wh... | jquery | [5] |
1,517,657 | 1,517,658 | Check Query for DateTime being X seconds ago | <p>I am using PHP and MySQL to create a flood-filter for my forums I've recently created and I did research this, but little results came and only one of them potentially brought me further to my resolution.</p>
<p>This is the code</p>
<pre><code>$overview_threads = mysql_query("SELECT * FROM `forum_posts` WHERE `aut... | php | [2] |
2,188,635 | 2,188,636 | Permutation of string without recursion | <p>Here is the recursive code.<br />
Can you guys give inputs on how I can implement this using iterative method?</p>
<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PermAndComb
{
class Program
{
static void Main(string[] args)
{
... | c# | [0] |
2,879,789 | 2,879,790 | C++ string value as another strings name | <p>How can i convert a vartiables value int anothers name in C++? like in this php snippet.</p>
<pre><code>$string = 'testVar';
${$string} = 'test';
echo $testVar; // test
</code></pre>
| c++ | [6] |
4,598,536 | 4,598,537 | How do I set the width of a child views to be divided amongst eachother? | <p>I'm trying to create a LinearLayout with the left view width being 80% of its parents width and the second view taking up the remaining space. How do I accomplish this?</p>
<p><img src="http://i.stack.imgur.com/fKeOA.png" alt="enter image description here"></p>
| android | [4] |
2,662,653 | 2,662,654 | Adding message before shutting down the program | <p>Before i close my program (press X on the frame) i wish to have a Conformation message that says something alike: "Are you sure you want to close this window" Followed by a yes and no button.</p>
<p>How exactly can i achieve such a thing?
Ive tried looking up a window listener but not much luck so far.</p>
<p>Wher... | java | [1] |
5,350,357 | 5,350,358 | Getting all possible value combinations | <p>For an automatic test thing, I have a class with ~15 parameters. I want to automatically generate instances of the class for every possible value combination. For instance, if the class was defined like so:</p>
<pre><code>class meep():
def __init__(self):
self.par1 = 0 # can be in range {0-3}
se... | python | [7] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.