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 |
|---|---|---|---|---|---|
1,624,397 | 1,624,398 | Detecting user typing in a text box | <p>I am using listeners to detect when a user finishes with textbox; when the text is value is changed, I am pasting their text on to the page using innerHTML.</p>
<pre><code>document.getElementById("dateinput").addEventListener("change", function() {
myDate(document.getElementById("dateinput").value);
}, fa... | javascript | [3] |
339,212 | 339,213 | How can I define my return type | <p>I have the following code:</p>
<pre><code> public IList<Content.Grid> GetContentGrid(string pk)
{
// How can I define result to hold the return
// data? I tried the following but it does not
// work:
var result = new IList<Content.Grid>();
var data = _cont... | c# | [0] |
2,830,839 | 2,830,840 | Jquery plugin to collapse ul/li | <p>I have created a jquery plugin to expand/collapse ul,li something like a accordion menu
My fiddle is here <a href="http://jsfiddle.net/8CyrA/" rel="nofollow">http://jsfiddle.net/8CyrA/</a> although it runs fine in pc , it
doesn't recognize the plugin code in fiddle..my question is there are 2 folders
Folder 1 , Fold... | jquery | [5] |
2,455,625 | 2,455,626 | Iphone getting url from push notification | <p>I have implemented ray's awesome tutorials on apns, every thing is working fine, now i have a requirement that the message of push notification will contain a web url, and i have to get that url, the format will be that first there will be a text message in the notification and at the end the url will come, for exam... | iphone | [8] |
3,068,102 | 3,068,103 | Is it important to explicitly declare properties in PHP? | <p>I have followed a tutorial to create a simple blog writing application in PHP and have modified the classes in this tutorial so that they have additional capabilities. Modifying this very bare bones app has given me a better understanding of how PHP works, however I have run across an interesting situation. </p>
<... | php | [2] |
5,535,408 | 5,535,409 | jQuery: "show all comments" click & hide at success? | <p>I have this right now:</p>
<pre><code><a href='javascript:showComments($displayWall[id]);' style='cursor: pointer;'>Show all $isThereAnyComments comments</a>
</code></pre>
<p>On success in showComments, i want it to show this div:</p>
<pre><code>#showWallCommentsFor + wallID
</code></pre>
<p>And then... | jquery | [5] |
5,313,801 | 5,313,802 | PHP - Name of first day in actual month | <p>How can i get name (~Monday) of the first day in the current month? or just value (monaday=0, tuesday=1 ...)
in PHP?</p>
<p>I have $date = getdate(), i try make a calendar, but i need to know first day
offset in calendar.</p>
<p>EDIT:
fixed question: I'm asking of 1-st day only.</p>
| php | [2] |
5,561,244 | 5,561,245 | Connecting to a database in visual studio 2010 using c# credentials | <p>I'm pretty new to c# asp.net etc so bear with me :)
I've been looking on the internet for the right syntax so I can connect to my database which is on my computer.</p>
<p>I've tried this:</p>
<pre><code> SqlConnection myConnection = new SqlConnection("server=localhost;" +
... | asp.net | [9] |
4,957,634 | 4,957,635 | Does the Java constructor return an object or an object's ID when called? | <p>I want to know if a constructor in Java returns something. I know there is no return value like '5' or "Hello World." But if we are assigning a variable to it:</p>
<pre><code>People person = new People();
</code></pre>
<p>Then wouldn't it logically make sense for the object or ID to be returned? Is the reference i... | java | [1] |
5,603,941 | 5,603,942 | how to call getExtra() without getIntent() in android? | <p>I am new to android and I want to <code>getExtra()</code> without the use of <code>getIntent()</code>.
Is this possible?
If yes, then how? </p>
| android | [4] |
5,905,142 | 5,905,143 | Dateformat with nullable variable | <p>I have this code:</p>
<pre><code> startWeekDate = startWeekDate == null ? DateTimeHelpers.calcMondayDate(DateTime.Now) : DateTimeHelpers.calcMondayDate(startWeekDate.Value);
DateTime endWeekDate = startWeekDate.Value.AddDays(6);
</code></pre>
<p>startWeekDate is a parameter that is nullable. This works good, but ... | c# | [0] |
3,978,596 | 3,978,597 | Does Webconfig in asp.net is same for Multiple Users or diffrent? | <p>Does Webconfig in asp.net is same for Multiple Users or diffrent?</p>
| asp.net | [9] |
1,477,344 | 1,477,345 | How to zero-initialize an union? | <p>Consider the following code:</p>
<pre><code>struct T {
int a;
union {
struct {
int a;
} s1;
struct {
char b[1024];
} s2;
};
};
int main() {
T x = T();
}
</code></pre>
<p>Since an explicit constructor is called, the above code ends-up zero-ini... | c++ | [6] |
3,548,112 | 3,548,113 | How to sort OrderedDict in OrderedDict - Python | <p>about 3h ago I have started to sort OrderedDict in OrderedDict by <strong>'depth'</strong> key, to this time results are 000%... so i ask u for help...
Is there any solution to sort that Dictionary ? </p>
<pre><code>OrderedDict([
(2, OrderedDict([
('depth', 0),
('height', 51),
('width', 51),
... | python | [7] |
5,679,661 | 5,679,662 | Image overlay problem | <p>I have a problem with two image overlay. One big(from camera) and one small sign which need to be stick over the big image in the corner. This overlay image have to be shown in the gallery. My sign image is located in drawable-hdpi. </p>
<pre><code>bMap = BitmapFactory.decodeFile(bigImage);
bmSign = BitmapFactory.... | android | [4] |
2,809,202 | 2,809,203 | How can I change this code to make it work? | <p>I'm starting with Flask, and I'm having some problems with jQuery and (I think) Flask's templating system. What I wanted to do is very simple: I've included a <em>behavior.js</em> script in the layout master template <em>layout.html</em>, after the jQuery library. Its contents are:</p>
<pre><code>jQuery(document).r... | jquery | [5] |
2,910,359 | 2,910,360 | Application.EnableVisualStyles() not working | <p>I cann't make my application to apply Windows visual styles.
Application.EnableVisualStyles() in program.cs not changing RenderWithVisualStyle property to true.</p>
<pre><code> [STAThread]
public static void Main(string[] startArgument)
{
Application.EnableVisualStyles();
App... | c# | [0] |
1,237,961 | 1,237,962 | Python odict: reordering keys | <p>I'd like to reorder keys in Python odict (not 2.7 OrderedDict).</p>
<p><a href="https://github.com/bluedynamics/odict" rel="nofollow">https://github.com/bluedynamics/odict</a></p>
<p>How I could implement moveAfter() and moveBefore() functions, so I could shuffle the keys around? Do any similar helper functions al... | python | [7] |
10,894 | 10,895 | Jquery's fadein 'slow' is too fast | <p>i'm using the jquery fadein fadeout with the slow option, but it's still a little too fast for me.
now i've read that you can only choose between fast and slow, but is there a way to make it slower?</p>
| jquery | [5] |
3,537,638 | 3,537,639 | Cleaning up MicroSD/Storage | <p>Are there any tools for cleaning up the storage on Android phones? Apps seem to be making folders everywhere and even when they are removed the folders still stay... </p>
<p>Can't tell which app uses or needs what directory, and manual removal feels like such a pain...</p>
| android | [4] |
1,997,203 | 1,997,204 | Array or Linked List | <p>I want to make a backup to my database, but before writing to a CSV file some data manipulation is needed.<br>
My idea is first create an array or linked list format the data (mainly insertion and calculations for specific items, including insertion in the middle of the array, the order is important), and then just ... | php | [2] |
576,104 | 576,105 | Android ListView sorted by checked items | <p>I use a ListView with android.R.layout.simple_list_item_multiple_choice as list items. I want to sort the list (and maybe group the list) that checked items are on top of the list. I looked at the Comparator but it only lets me sort the list by the entries name of the list.
How could that be done in a nice way? </p>... | android | [4] |
80,008 | 80,009 | How to use Split with TryParse? | <p>I'd rather not throw an exception if the user enters one or more invalid doubles in a textbox.
This is kind of what I'd like to do but it is wrong of course.</p>
<pre><code>double myDouble[];
double.TryParse(textBox1.Text.Split(' '), out myDouble);
</code></pre>
| c# | [0] |
4,779,750 | 4,779,751 | Android show "new" image only the first time | <p>I have deployed my app and it's in use. Every month or so I update it and add new features. I would like to show "new" image only the first time when the updated app is used by the user. How can I show it just once ? Where should I start ? </p>
| android | [4] |
4,797,702 | 4,797,703 | How to avoid if/elif/else when one value corresponds with another? | <p>What's a concise way to express a direct correlation between (apple, banana) and (red, yellow). Although it gets the result I need, I'm just not happy with this...</p>
<pre><code>if value == apple:
result = red
elif value == banana:
result = yellow
else:
result = None
</code></pre>
<p>Tough to search for... | python | [7] |
3,643,053 | 3,643,054 | how to make array while looping another array in javascript | <pre><code>for (var i = 0; i < input.files.length; ++i) {
name = name.push(input.files[i].name)
}
</code></pre>
<p>I want to get the name of the files and put them in a array so I can post them to a php file to upload. Please help.</p>
<p>The variable name is the array I want to post.</p>
<p>is there a loop ... | javascript | [3] |
727,022 | 727,023 | How to handle Querystring in JavaScript? | <p>I have a js code:</p>
<pre><code> window.onload = function() {
document.getElementById("Button1").onclick = function() {
var t1 = document.getElementById("Text1").value;
var t2 = document.getElementById("Text2").value;
document.URL = 'myurl?t1=' + t1 + '&t2' + t2;... | javascript | [3] |
1,145,286 | 1,145,287 | Android: Detect when another Activity is launched (or your activity loses focus) | <p>Like the title says, I need to detect when my app loses focus because another app is launched (Phone call comes in, or user hits Home etc).</p>
<p>Overriding Activity.OnStop does not work because that is called even when switching activities within my app.</p>
| android | [4] |
774,881 | 774,882 | php what happens if 2 people append at the same time? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1209688/php-simultaneous-file-writes">PHP Simultaneous File Writes</a> </p>
</blockquote>
<p>Hello,</p>
<p>If I have a php script and a text file and 2 users append a long text string to the text file at the sa... | php | [2] |
2,428,514 | 2,428,515 | convert language of a div | <p>I am recently working in a project. There I need to convert language from English to Japanese by button click event. The text is in a div. Like this:</p>
<pre><code>"<div id="sampletext"> here is the text </div>"
"<div id="normaltext"> here is the text </div>"
</code></pre>
<p>The text is c... | php | [2] |
2,487,135 | 2,487,136 | Getting invocation target exception | <p>'import android . os . Bundle;'</p>
<p>import android.app.Activity;</p>
<p>import android.view.Menu;</p>
<p>import android.widget.TextView;</p>
<p>public class MainActivity extends Activity {
public native String stringJNI();</p>
<pre><code>static {
System . loadLibrary ("Androidqw");... | android | [4] |
5,280,266 | 5,280,267 | iPhone Developer License | <p>I wanted to know if we have a iPhone Developer Enterprise License, then is it possible to distribute our apps to a limited number of users (of our choice) through App Store? In other words, we would like our iPhone apps to be visible to a limited number of users (whom we have selected to preview our apps)</p>
<p>Al... | iphone | [8] |
3,626,136 | 3,626,137 | Checkboxes and Lists | <p>I'm trying to make a list of items, where all these items can be either checked or unchecked. I want this UI window to pop up on top of my current window, kind of like <a href="http://developer.android.com/images/radio_buttons.png" rel="nofollow">this</a> but with a "Submit" dialog instead.</p>
<p>Can someone point... | android | [4] |
3,934,849 | 3,934,850 | Emptying a file with php | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2563691/php-is-there-a-command-that-can-delete-the-contents-of-a-file-without-opening-it">PHP: Is there a command that can delete the contents of a file without opening it?</a> </p>
</blockquote>
<p>How do you e... | php | [2] |
3,620,940 | 3,620,941 | In-place editing of text in UITableViewCell? | <p>I know this has to be a really simple question, but I am having trouble finding it in a simple place where there aren't so many other things going on that I can isolate the specific behavior.</p>
<p>I know I need to add a UITextField as a subview to the UITableViewCell to make it editable. What is the best way to ... | iphone | [8] |
5,523,157 | 5,523,158 | Multiple RegisterClientScriptBlock's | <p>I want to call 3 javascript functions on my .cs file, I tried this:</p>
<pre><code>protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
ClientScriptManager script = Page.ClientScript;
ClientScriptManager script2 = Page.ClientScript;... | asp.net | [9] |
1,273,537 | 1,273,538 | Android First App unable to create | <p>"problem in creating first android application without any error"</p>
<p>I am new to android application... I have already installed eclipse Juno and used it to run simple java programs. Then I downloaded Android SDK bundled with ADT, which has eclipse attached with it. Therefore, when I opened newly installed Ecl... | android | [4] |
4,083,037 | 4,083,038 | Split text typed into a text box into labels on another form | <p>I have already been able to split a first name and a last name. But the problem I am having is if someone decides to type in a middle initial or a middle name? Anyone know how I can go about doing this?</p>
<p>Here is the code I have so far:</p>
<pre><code>//Name Split
var fullname = strTextBox;
var names = fullna... | c# | [0] |
4,416,522 | 4,416,523 | php file_get_contents and & | <p>I'm trying to use php's file_get_content('a url');</p>
<p>The thing is if the url has '&' in it, for example</p>
<p><code>file_get_contents('http://www.google.com/?var1=1&var2=2')</code> </p>
<p>it automatically make a requests to <code>www.google.com/?var1=1&amp<no space here>;var2=2</code> </p... | php | [2] |
1,105,312 | 1,105,313 | 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] |
5,024,029 | 5,024,030 | Create new xml using python | <pre><code>import xml.etree.ElementTree as ET
doc = ET.parse("users.xml")
root = doc.getroot() #Returns the root element for this tree.
root.keys() #Returns the elements attribute names as a list. The names are returned in an arbitrary order
for child in root:
username = child.attrib['usern... | python | [7] |
5,617,284 | 5,617,285 | Using Jquery to open loading.gif | <p>What is the easiest way to implement a page load / loading.gif using jquery, just like any other sites.. It needs white out the page and show loading.gif in the middle of it, until the page loads..
I do not want to write it halfway down the page so it doesn't even have a purpose, i would like for this to load first ... | jquery | [5] |
5,224,088 | 5,224,089 | Android ksoap2 with https | <p>i want to implement ksoap2 webservice using https. i didnt found any tutorial for the same. i found the tutorial for http(i implemented it nd working fine) but not for https...</p>
<p>pls help me in this case..any code will be very helpfull.</p>
<p>thanks in advance..</p>
| android | [4] |
5,859,893 | 5,859,894 | TextView setText options | <p>Trying to set a TextView, to a certain message containing a variable.</p>
<p>for Example</p>
<pre><code>tvOddEven.setText("You have entered:", odd, "% of numbers");
</code></pre>
<p>odd is an int variable</p>
<p>it's giving me an error, that I can't use those parameters.</p>
<p>ideas?</p>
| android | [4] |
1,802,542 | 1,802,543 | how do i validate a textbox in asp for unbalanced parentheses | <p>I want to validate an ASP textbox for unbalanced parenthesis. Like i want to display an error if the user starts a curly bracket but does not end it in a textbox.</p>
<p>Thanks</p>
| asp.net | [9] |
3,772,019 | 3,772,020 | jquery check if it is clicked or not | <pre><code>$(element).click(function(){
});
</code></pre>
<p>How can i check if the element is clicked or not ? I'm doing like that </p>
<pre><code>function element(){
$("#element").click(function(){
return 0;
});
}
if(element()==0){
alert("yes");
}else{
alert("no");
}
</code></pre>
<p>But it's not returning any... | jquery | [5] |
5,512,521 | 5,512,522 | Where to publish java articles? | <p>I have some themes I would like to talk/write about Java that would be useful for others, and I would like to know sites where I can publish those articles / monographs.</p>
<p>Any advice , suggestion ?</p>
| java | [1] |
4,195,964 | 4,195,965 | App works on real phones but no longer on emulator | <p>My app works on two different phones, but it no longer works on the emulator. I immediately get the stopped unexpectedly error on the emulator. I have rebooted my computer, and it did not change things. I am at wits end!</p>
<p>The debugger shows this:</p>
<pre><code>Thread [<1> main] (Suspended (exception R... | android | [4] |
3,490,656 | 3,490,657 | Android WebView: Tel: Geo: Mailto: Proper Handling | <p>Can someone please help explain how to handle Tel: Geo: and Mailto: links correctly using WebView. </p>
<p>Currently all links result in a "page cannot be displayed" error.</p>
<p>Below is the code I'm using which was put together from other suggested solutions:</p>
<pre><code>mWebView = (WebView) findViewById(R... | android | [4] |
516,354 | 516,355 | Retrieve functions from a global variable | <p>Is it possible to retrieve all the functions included in a global variable?</p>
<p>I'm using a very complex plugin (not written by me) that call the functions in this way:</p>
<pre><code>$GLOBALS['myplugin']->member->isActive()
</code></pre>
<p>Is there a way to retreive all the functions of <code>$GLOBALS[... | php | [2] |
445,833 | 445,834 | 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'm getting a NullPointerException when I use ACTION_IMAGE_CAPTURE to take a picture</a> </p>
</blockquote>
<p>I have... | android | [4] |
5,038,276 | 5,038,277 | how can i auto align a div to <a> tag on document | <p>i have a div i.e</p>
<pre><code><div id="data_sprite">Jquery ajax data here</div>
</code></pre>
<p>and it is invisible....</p>
<p>now suppose i have my first <code><a></code> tag on top of document and 2nd <code><a></code> tag on bottom of document...
now what i want is that if i click on ... | jquery | [5] |
83,021 | 83,022 | How to make this in fewer keystrokes? | <p>My program is written in python and I use pythontidy and reindent to clean it. However I'd like a more efficient method than renaming the file, should I just look at the doc to know how to now get forced to rename files and make pythontidy behave more like reindent i.e. enable it to run on all files in a directory j... | python | [7] |
3,676,911 | 3,676,912 | Make a client download a file from a path that is not publicly accessible? | <p>I'm looking to implement a way to keep files private so they cant be publicly re-downloaded and only allow the server side code (like a button) to pull them from a private directory for the client on a one time basis. </p>
<p>Is that even possible?</p>
<p>Even if the folder is publicly available, What is a good wa... | c# | [0] |
157,294 | 157,295 | Read .bmp image and subtract 10 from 10th byte of the image and re-create the image in Java | <p>I am creating an application which will read image byte/pixel/data from an .bmp image and store it in an byte/char/int/etc array.</p>
<p>Now, from this array, I want to subtract 10 (in decimal) from the data stored in the 10th index of an array.</p>
<p>I am able to successfully store the image information in the a... | java | [1] |
5,483,275 | 5,483,276 | SQLCE Subquery for smart device application | <p>I crate two tables name abc1 and xyz.
abc1 having column id, name and add. where xyz table having id, mob.</p>
<p>select name from abc1 where id =(select id from xyz)</p>
<p>getting an error There was an error parsing the query. [ Token line number = 1,Token line offset = 34,Token in error = select ]</p>
<p>pleas... | c# | [0] |
5,093,895 | 5,093,896 | What datatype supports this kind of operation? | <p>I am currently writing a machine simulator, and this machine has 256 registers, each have their unique name, index and data. What kind of datatype would support this operation?</p>
<p>Below are some example operations:</p>
<pre><code>String output = Registers.RegA.data.toString(); //Returns the value of RegA
Syste... | java | [1] |
5,555,739 | 5,555,740 | Assigning a function (which is assigned dynamically) along with specific parameters, to a variable. | <p>Ok, so here's the deal, say I have a function( take_action ), that calls another function. But we don't know which function take_action is going to call.</p>
<p>I had that part figured out thanks to <a href="http://stackoverflow.com/questions/4246000/python-calling-functions-dynamically">this question</a>, the thin... | python | [7] |
608,600 | 608,601 | Dynamically add and remove component on button click? | <p>How can i add and remove dynamically component through jquery?</p>
<p>I want on click Add on my page add one row and then in that row there will be new text box
and same in delete on click Delete button on my page selected checkbox rows must ve deleted with its components like text box</p>
<p>how would i do with ... | jquery | [5] |
5,845,979 | 5,845,980 | ANDROID: call many Activity from another Activity | <p>I try to call 2 Activities from the main Activity. however, the first Activity didn't work, just the second worked correctly. But when I just called one Activity, it run well. So i think the problem is that I can't call 2 Activities at the same time:</p>
<p>this is my code
the main Activity:</p>
<p>[CODE]</p>
<pr... | android | [4] |
2,820,883 | 2,820,884 | Open word document from ASP.NET application | <p>I use the following code snippet to open a local docx file and it runs fine when I press Ctrl+F5 in Visual Studio. I just click the button and the Word2007 on my machine is opened and the docx is displayed there. But after I publish the application to the production server, it didn't work. After I click the same but... | asp.net | [9] |
4,283,704 | 4,283,705 | Is it not necessary to define a class member function? | <p>The following code compiles and runs perfectly,</p>
<pre><code>#include <iostream>
class sam {
public:
void func1();
int func2();
};
int main() {
sam s;
}
</code></pre>
<p>Should it not produce a error for the lack of class member definition?</p>
| c++ | [6] |
5,361,466 | 5,361,467 | Asp.Net wizard Storing State | <p>I'm confuse about which method is best for storing data when we use wizard.
Is it best to use Session or Database?</p>
| asp.net | [9] |
4,472,726 | 4,472,727 | Opening a specific Android home screen page | <p>I am trying to create an Android service that causes a specific home screen page to open when the Droid is placed in the Car Dock instead of having it open the Car Home application. I cannot find any reference to how to specify a home screen page other than the center page that always gets displayed when pressing th... | android | [4] |
3,537,415 | 3,537,416 | How to check a geopoint is within some geographical area | <p>I want to make an android application in which,i want to know my current location is within which specific police station.First tell me is it possible or not ,if possible give some idea</p>
<p>Thanks in advance.</p>
| android | [4] |
725,931 | 725,932 | Array of pairs, gibberish output (unallocated memory?) | <p>Coming from Java I was trying to implement a simple Battleships game in C++ but already got stuck at this Array:</p>
<pre><code>#include <iostream>
#include <utility>
using namespace std;
class Ship{
private:
int length;
bool direction; //false = left, true = down
pair <... | c++ | [6] |
2,794,158 | 2,794,159 | Get filtered row in a gridview | <p>Is there any way to get the filtered rows from a gridview control?</p>
<p>Best regards,</p>
| asp.net | [9] |
4,389,667 | 4,389,668 | Extract values of innerHTML using JQUERY | <p>FF doesn't support InnerText Property. So if i use innerHTML i get <code>"<NOBR>0057</NOBR>"</code>. I want to extract 0057 value. How can i get value of innerHTML without html tags using JQuery</p>
| jquery | [5] |
992,762 | 992,763 | Jquery: animate invalid | <p>Here is my code:</p>
<pre><code> elem.animate({ background-image: "url(" + imagedir + backgrounds[i] + ")" }, 1500 );
});
</code></pre>
<p>But apparently this is invalid, can anyone see why?</p>
| jquery | [5] |
575,934 | 575,935 | Android OpenCV on Motorola devices... | <p>I've been reading that there is a problem using the OpenCV for Android library on Motorola devices. Here is the link to the OpenCV library: <a href="http://code.opencv.org/projects/opencv/wiki/OpenCV4Android" rel="nofollow">http://code.opencv.org/projects/opencv/wiki/OpenCV4Android</a> And here is a link to the issu... | android | [4] |
1,532,653 | 1,532,654 | Can a user modify a PHP session? | <p>Page1.php:</p>
<pre><code><?php
session_start();
if ($_POST['password'] == "testpass")
$_SESSION['authenticated'] = true;
?></code></pre>
<p>Page2.php</p>
<pre><code><?php
session_start();
if (isset($_SESSION['authenticated']) && $_SESSION['authenticated'] == true) {
echo "Super secret stuff!";
}
?></... | php | [2] |
4,675,519 | 4,675,520 | Help in fpdf imade display | <p>Hello every one i m using fpdf libray to creat pdf files from html form.</p>
<p>i m using</p>
<pre><code>$pdf->Image('C:/DOCUME%7E1/mypic.PNG',60,140,120,0,'','');
</code></pre>
<p>to display image on pdf.</p>
<p>in its first parameter it asks for exact path.it doesn't accept anyaddress variable here.
but i w... | php | [2] |
506,055 | 506,056 | Performance issue with DictionaryEntry looping | <p>Currently I have 231556 of words collection and do below loop to check every words for duplication.</p>
<p>I am using this function :-</p>
<pre><code>public bool IsContainStringCIAI(string wordIn, HybridDictionary hd, out string wordOut)
{
int iValue = 1;
foreach (DictionaryEntry de2 in hd)
... | c# | [0] |
4,006,379 | 4,006,380 | how can I hide a popup box when the user clicks elsewhere? | <p>My popup box appears when I click on the button, and it only disappears when I click again on the button. This is my code:</p>
<pre><code> $(document).ready(function() {
$('a.signUp, a.signIn').click(function() {
//Getting the variable's value from a link
var popupBox = $(this).attr('h... | jquery | [5] |
4,741,014 | 4,741,015 | How to create a uncloseable process in java | <p>Iam working on small silent program now days , But I have a small proplem I want to make my program uncloseable .</p>
<p>My Program Dosen't have a GUI ( It's Silent App ) , So I want to make my program uncloseable when the user try to close it using Ctrl + Alt + Delete [ The Task Manager in Windows ] .</p>
<p>I se... | java | [1] |
2,130,210 | 2,130,211 | What is the difference between base-, array- and cursor-adapter | <p>Should I use array adapter or base adapter or cursor adapter?
What do you use most? I found some code that uses base adapter for fragments. Can I use array adapter or cursoradapter for listfragments? </p>
<p>I know how to use listview in a simple way like using the android.r.simple. I want to know what I should us... | android | [4] |
2,428,481 | 2,428,482 | jQuery .offset from the bottom position not working in a scroll function? | <p>I'm having trouble setting 2 positions on a scroll function using offset.</p>
<p>I have created a fiddle so you can see... <a href="http://jsfiddle.net/motocomdigital/SGCHt/12/" rel="nofollow">http://jsfiddle.net/motocomdigital/SGCHt/12/</a></p>
<p>When you open this fiddle, reduce the fiddle preview viewport down... | jquery | [5] |
5,703,829 | 5,703,830 | How to store the different timers in a dict or array in a plist to load each view | <p>I want to store the times to switch for each view in a dict or array in a plist. How i can do this. Thanks for answers</p>
| iphone | [8] |
5,531,456 | 5,531,457 | How to play video from remote URL in android? | <p>I am New to android my intention is to play video using Http.</p>
<p>But i am getting "Http Request Failed 404" Exception when iam trying to run my application in emulator.
can any one know this error?</p>
<p>plz help me Thanks in advance.</p>
| android | [4] |
2,184,117 | 2,184,118 | C# Getting an object's actual TypeDescriptionProvider or TypeDescriptor | <p>I realise that this is an unusual issue, but:</p>
<p>I have created a custom TypeDescriptionProvider that can store and return different <code>TypeDescriptors</code> based on the requested object Type. What I have noticed however is that regardless of the <code>TypeDescriptionProvider</code> associated with a Type ... | c# | [0] |
526,402 | 526,403 | in constructor, no matching function call to | <p>My error</p>
<pre><code>gridlist.h: In constructor ‘GridList::GridList(WINDOW*, int, int, int, int, int)’:
gridlist.h:11:47: error: no matching function for call to ‘Window::Window()’
gridlist.h:11:47: note: candidates are:
window.h:13:3: note: Window::Window(WINDOW*, int, int, int, int, int)
</code></pre>
<p>My c... | c++ | [6] |
1,272,139 | 1,272,140 | Javascript - Change Alert Icon | <p>Is it possible change javascript alert icons? By default it is showing the warning icon.</p>
| javascript | [3] |
2,895,270 | 2,895,271 | how long will it take to overflow a long by mere increment (starting from zero)? | <p>If I have code like this</p>
<pre><code> for (long i = 0; i < Long.MAX_VALUE; i++)
{
//do something trivial
}
</code></pre>
<p>How long will it take theoretically for the loop to finish?</p>
| java | [1] |
266,509 | 266,510 | ajax slide show get images from database | <p>i had sideshow ajax and i want it get images form database
i used sql server 2000 and i had binary images</p>
<p>this is my code to select images from database</p>
<pre><code>public class SlidShow : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
using (SqlConnection con = Conne... | c# | [0] |
1,783,195 | 1,783,196 | Zoom Entire Screen Android | <p>Recently, I have been working on an app that requires that the entire screen be zoomed in and out by pinch zoom. In the past I have worked with zoomed singular ImageViews but I am a bit stumped on how to zoom everything on a screen.</p>
<p>For example, if a user where to pinch zoom in the center of the screen every... | android | [4] |
1,737,540 | 1,737,541 | App icon not showing up on emulator | <p>I created a simple splash screen application, and it works just fine only when i click the "Run" button in eclipse indigo, and I am not able to find the icon at all in the emulator.
Where is icon?! I ran it as android 4.0.3.</p>
| android | [4] |
5,423,226 | 5,423,227 | How do I paint Pictureboxes to Panel? | <p>I have 2 pictureboxes on a panel at two separate locations which will become Hidden after a certain time. I would like to paint the pictureboxes background image to the panel at the exact points in which the picturebox controls lay. I have looked at the MSDN library but I cannot seem to find out how to do this.</p>
... | c# | [0] |
5,976,105 | 5,976,106 | Position of a character | <p>How can i get the position of a character in a string in python.</p>
<p>regards</p>
<p>Arun</p>
| python | [7] |
4,967,835 | 4,967,836 | How can I get the classname at runtime, but only the classname? | <p>How can I get the classname at runtime, but only the actual classname and not the whole "com.xyz.etc." ?</p>
<p>I mean only the part of the name after the last period</p>
| java | [1] |
605,421 | 605,422 | Factual questions about java | <p>My teacher gave out a practice exam on java recently and I'm curious to see how I did on the true/false part. I'm least confident about number one, so any explanation there would help a lot. </p>
<ol>
<li><p>In Java, a class can extend any number of abstract classes.<br/></p>
<blockquote>
<p>false. I don't qu... | java | [1] |
5,548,902 | 5,548,903 | publish error in asp.net | <p>I have designed my web page successfully. I have to publish a web application.
I used this publish method; copy the file in <em>c:inetpub\wwwroot</em> all files copy
and then go to open run command inetmgr and open my web application.
The page errors are displayed.</p>
<blockquote>
<p>HTTP Error 500.19 ... | asp.net | [9] |
4,263,917 | 4,263,918 | Vector of Vector of (member) function pointers | <p>I'm constructing an simple listener / callback mechanism, for my current experimental project. And i'm stuck with implementing a container structure what seems should be vector of vector of pointers. I choose this way because i want the root vector to simple have KEY of event type let's say is an enum (int), then a... | c++ | [6] |
283,741 | 283,742 | iphone- is it true that an app with push notification service needs to be on the app store? | <p>If i wanted to test an app with push notification service, does it have to be approved in the app store? </p>
| iphone | [8] |
1,099,080 | 1,099,081 | how to embed the whole <body> to a created new div with jQuery? | <p>I want to perform the sticky footer to a stand-for-a-long web project.
I'm required to create two top-level div and wrap up all the content inside of <code><body></code> into 'div-container', then to add 'div-footer' to the end of <code><body></code> or <code><html></code>
like</p>
<pre><code><... | jquery | [5] |
5,400,909 | 5,400,910 | Out of memory on long ListActivity | <p>I have a problem with a ListActivity, it loads a search result, 5 items at a time, and when it reach about 45 items, it throws an out of memory exception.</p>
<p>I load images from web server asyncronically. If I comment this, i can scroll to the bottom of the list (aprox 58 items) without problem. I Know i should ... | android | [4] |
1,758,272 | 1,758,273 | Custom Back Button Animation | <p>The default animation when the <code>Back</code> button is pressed is a slide from left to right. I'd like to replace that with a custom animation. I'm currently thinking that some combination of <code>onBackPressed()</code> and <code>overridePendingTransition</code> will do the trick, but I haven't been able to get... | android | [4] |
5,146,690 | 5,146,691 | How to use smileys in our text? | <p>I am creating a chat application wherein I want to use smileys in the chat text. I went through <a href="http://stackoverflow.com/questions/5659935/implement-emoticons-in-xcode"><strong>this</strong></a> link but was wondering if there is some other way to use smileys. Should this be done through code or is there s... | iphone | [8] |
5,706,313 | 5,706,314 | How to draw Views on Canvas | <p>I want to load e.g. LinearLayout with some Buttons from xml and draw it on Canvas in a way that the Views behave normally (I can set onClick actions for the Buttons <em>and when I press a Button, it changes it's background drawable</em>). Can I do this?</p>
| android | [4] |
86,675 | 86,676 | Android HEX Colors | <p>I many places Android requires HEX colors, like 0X31515724. How can i convert colors like #3399ff to this ? Is there any website or tool that would allow be to convert color codes to the required values. </p>
<p>Kind Regards</p>
| android | [4] |
2,220,988 | 2,220,989 | How to use DNS hosts resolver myself when using CFReadStreamOpen | <p>I use NSInputStream to send a http request . Now I need to make the request use my customized dns server . I have read part of the source code of CFNetwork without no answer. </p>
<pre><code>CFHTTPMessageRef myRequest = CFHTTPMessageCreateRequest(kCFAllocatorDefault,
requestMethod, myUrl, kCFHTTPVersion1_1)... | iphone | [8] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.