Unnamed: 0 int64 65 6.03M | Id int64 66 6.03M | Title stringlengths 10 191 | input stringlengths 23 4.18k | output stringclasses 10
values | Tag_Number stringclasses 10
values |
|---|---|---|---|---|---|
2,367,687 | 2,367,688 | Jquery .toggle() with first element open | <p>So I am using .toggle() to open and close a bunch of divs, but I made the first div open on page load. The problem lies where, if a user click on that div to toggle it closed, it takes two clicks, the first click seems to try to toggle it open again. How should I handle this?</p>
<pre><code>$(document).ready(functi... | jquery | [5] |
5,663,361 | 5,663,362 | How to bring Virtual Keyboard manually in android?While we clicking the edit text box,the keyboard want to display? | <p>While we clicking the edit text box,the keyboard want to display?
wat to do any suggestions</p>
<p>in customized view</p>
| android | [4] |
3,352,414 | 3,352,415 | UIScrollView always bounce upwards and does not show scroll bar in iphone | <p>This is probably simple but I do not seem to get it to work. I have a view and inside it I have a scroll view and inside it I have a view with some labels and a button. the height of the text inside the labels changes according to some condition so I need to scroll down to see it. But whenever I try to scroll down i... | iphone | [8] |
1,863,188 | 1,863,189 | application of C++ | <p>everybody, I've just finished my course <code>Introduction to Systems Programming</code>, the last part of it was C++, I learned a lot of stuff, but all I used to write was some <code>console programs</code>, I want to begin to write something new on c++ (something with <code>graphic windows</code> or maybe <code>s... | c++ | [6] |
5,390,885 | 5,390,886 | android delete specific contact programmatically | <p>Right now, this code is working
<code>ops.add(ContentProviderOperation .newDelete(ContactsContract.Data.CONTENT_URI) .withSelection(ContactsContract.Data.RAW_CONTACT_ID+"=?",new String[] {sid}).build());</code></p>
<p>However it creates unknown record and seems that its the d... | android | [4] |
5,879,125 | 5,879,126 | storing input from a seperate class | <p>I posted a question earlier for a homework assignment but I have a new question. I am new at this so I appreciate any help I can get and I'm not looking for code but more of an explanation of the steps I need to take to get to my answer.</p>
<p>I'm working on an address book. The user picks a menu 1, 2, or 3. I ha... | java | [1] |
519,448 | 519,449 | Unable to switch on String in JRE7 | <p>I'm on jre7 and I still can't switch on Strings. I installed jdk7 update 1 and pointed Eclipse to it but still no luck. Any idea what I'm doing wrong? Thank you.</p>
<p>Here is a the code:</p>
<pre><code>String code = "something";
switch(code) {
case "xxx": dosomehting(); break;
default: dosomethingelse(); break;
... | java | [1] |
4,651,060 | 4,651,061 | How do I get the current volume/amplitude in an Android MediaPlayer? | <p>I'm working on an app that will both record an audio file, and then have the option to play back that file once it's been recorded. The UI has an EQ component that animates relative to the current amplitude of the recording. I've got the animation working via the MediaRecorder.getMaxAmplitude() method, but can't f... | android | [4] |
2,205,862 | 2,205,863 | Lex/Yacc for C#? | <p>Actually, maybe not full-blown Lex/Yacc. I'm implementing a command-interpreter front-end to administer a webapp. I'm looking for something that'll take a grammar definition and turn it into a parser that directly invokes methods on my object. Similar to how ASP.NET MVC can figure out which controller method to invo... | c# | [0] |
5,278,606 | 5,278,607 | How can I include a button in a Toast notification? | <p>First of all, I know this has been asked before: <a href="http://stackoverflow.com/questions/3308975/android-button-in-custom-toast">Android : Button in custom Toast</a>.
This is nearly an exact duplicate, but I think that it warrants a new question based on the fact that it's been used in apps, namely Gmail for ICS... | android | [4] |
4,106,622 | 4,106,623 | name 'newList' is not defined | <p>So I am making a python game and I am trying to implement a save/load system. I have the save part down however the load function that I made isn't working. When I assign cPickle.load to a new list it isn't registering.</p>
<pre><code>def save():
file = open('save.txt', 'wb')
cPickle.dump(GameState, file)
... | python | [7] |
5,485,435 | 5,485,436 | What does this mean? (function (x,y)){...}){a,b); in JavaScript | <p>I saw a this function </p>
<pre><code>(function (x, y, data, lbl, dot) {
var timer, i = 0;
rect.hover(function () {
clearTimeout(leave_timer);
var side = "right";
if (x + frame.getBBox().width > width) {
side = "left";
... | javascript | [3] |
831,381 | 831,382 | event.keycode v event.which | <p>Good Morning All,</p>
<p>I fell foul of a Fire Fox Keydown behaviour in that pressing the enter key (indeed any key) without having focus on a specific field will NOT trigger a keydown event it will only trigger a Keypress event. </p>
<p>This could be very confusing as the keydown and keyup event use javascripts k... | jquery | [5] |
1,126,082 | 1,126,083 | Uploading video on server through POST | <p>I would like to know that how can I upload a video file on server using POST in android. Please, let me know the answer, if anyone knows about it?</p>
<p>Thanks</p>
| android | [4] |
5,636,823 | 5,636,824 | Suggest a library to get selector(s) of given element | <p>There are a lot of libraries that return elements by css/xpath selectors, but how can I get such selector by element? Maybe you know some library that does it? I know it is implemented in Selenium IDE, but the codebase is rather huge and I was unable to find where do they do it (and I think that I can not just use p... | javascript | [3] |
1,527,854 | 1,527,855 | Method argument extends class implements interface | <p>I have the following Class and Interface :</p>
<pre><code>public class BasicObject{...}
public interface CodeObject{...}
</code></pre>
<p>I want to create a method in which the argument need to be of type BasicObject and implements CodeObject. I tried this code but it doesn't guarantee clazz to be a class that imp... | java | [1] |
4,552,761 | 4,552,762 | 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] |
4,334,391 | 4,334,392 | abstracting this jQuery function | <p>Gotten a lot of great help here! The code here has been helped along by a few folks. Hopefully someone can help me take it to the next level.</p>
<p>Basically, I have code which will add a checkmark after a given period of time to a clicked item in the left navigation. There are going to be other links on the page... | jquery | [5] |
2,377,204 | 2,377,205 | WAMPSERVER GD2 - doesn't support jpeg images? | <p>I have WAMPSERVER 2.0 installed on my localhost with php_gd2 extension enabled, however when I'm trying to save a jpeg image I get this exception:</p>
<pre><code>Your GD installation does not support JPG image types
</code></pre>
<p>How to enable JPG images?</p>
| php | [2] |
1,025,525 | 1,025,526 | Anyone tried to bulk upload device UDIDs to the iPhone dev portal? | <p>I'm trying to add 50 beta testers to my app through ad hoc. In the portal, it gives you an option to upload a file for UDIDS. What format should it be? Also, it mentioned that you are only limited to 100 devices per year and they cannot be changed. Does this mean once I added my beta testers, they cannot be changed ... | iphone | [8] |
179,641 | 179,642 | What should the following code do and with explanations | <pre><code>class A {
public:
A() { }
~A() { cout << "A Destructor \n" ; }
};
class B :public A{
public:
B() { }
virtual ~B() { cout << "B Destructor \n" ; }
};
class C : public B {
public:
C() { }
~C() { cout << "C Destructor \n"; }
};
int main()
{
A *pointA = new A... | c++ | [6] |
5,879,898 | 5,879,899 | How to use self.method() in class creation time? | <p>In some cases, I want to use instance method in class creation time.</p>
<p><strong>I just want to use self in permissions list..This is my question</strong></p>
<p>But it does not work. Is it some ways to solve the problem?</p>
<pre><code>class PermissionChecker(object):
# how to use self in class create tim... | python | [7] |
5,845,392 | 5,845,393 | Access to path is denied when trying to moving a folder | <p>Trying to move a folder in C Drive to another location in C Drive.</p>
<p>However, it gives an error that "Access to the destination is denied".</p>
<p>I have created a "Temp" folder in C Drive. I am moving a folder into there.</p>
<p>It was working before and had just suddenly stopped working for some reason...<... | c# | [0] |
1,922,643 | 1,922,644 | JSon Parsing error with double quotes | <p>I'm trying to parse the string "quotes":""living d life till i breathe my last"",
using json parser but its not parsing.I come to know the problem,its due to these double quotes "quotes":""living… in the string.</p>
<p>I have tried these things :</p>
<p>str_response = [str_response stringByReplacingOccurrencesOfSt... | android | [4] |
3,065,912 | 3,065,913 | can i make auto complete to android's default searchbar? | <p>I'm trying to do an autocomplete for android's default search dialog but it doesn't seem to work. Is this impossible to do?</p>
| android | [4] |
707,202 | 707,203 | What changes would have to be made to JavaScript to make it compilable to binary? | <p>What changes would have to be made to JavaScript to make it compilable. I don't mean to make into executable that still relies on interpreter - I mean so that it compiles into binary in the way that C compiles.</p>
<p>I expect the prototypal inheritance might be an issue - but I don't know.</p>
<p>Also, I am prett... | javascript | [3] |
4,429,054 | 4,429,055 | Php Syntax help for a noobie | <p>Im working on a noobie app to pull some dates from the database and then a year later send me an alert (with cron). So far im struggling a bit and am trying to make a page which does my maths which I can work on building up.</p>
<p>So far ive been debugging all day and reading tutorial after tutorial but am still g... | php | [2] |
3,807,272 | 3,807,273 | css stylesheets | <p>i need to implement two different stylesheets in a single master page. one style sheet is designed specifically for the project, and works fine. but when i add the second style sheet to it, which is used for some other project, all the web content forms look weird.
what is the best way of implementing those two styl... | asp.net | [9] |
4,543,006 | 4,543,007 | Does System.currentTimeInMillis represent UTC time? | <p>Does System.currentTimeInMillis represent UTC time or local system time ?</p>
| java | [1] |
1,987,629 | 1,987,630 | Why can === have some odd behavior in Javascript? | <p>I'm raising the question as seen from <a href="http://www.codecademy.com/courses/programming-intro/5#!/exercises/4" rel="nofollow">this Code Academy lesson</a>. Thanks in advance for your explanations.</p>
<p>Hope this is not repeated too often.</p>
<p>-------- Explanation from the lesson is added below ----------... | javascript | [3] |
5,014,515 | 5,014,516 | jQuery character replacement call activated on click | <p>I have this jquery function to automatically replace sertain characters with others:</p>
<pre><code>jQuery(function() {
jQuery('.textarea').keyup(function() {
jQuery(this).val(jQuery(this).val().replace(/A/g, "5"));
jQuery(this).val(jQuery(this).val().replace(/Q/g, "3"));
});
});
</code></pre>
<p... | jquery | [5] |
4,641,785 | 4,641,786 | Javascript error - SXBB[id].resize is not a function | <p><a href="http://digital-diy.com/forum/" rel="nofollow">My forum</a> (based on phpbb3) has a Javascript error that I'd like to resolve. In FF and IE the following error occurs:</p>
<pre><code>Error: SXBB[id].resize is not a function
Source File: http://digital-diy.com/forum/classes/scripts/select_expand_bbcodes.js
L... | javascript | [3] |
1,989,134 | 1,989,135 | How can I write my code to attempt a database action but continue executing code on failure? | <p>Simple question I guess, I want to use PHP to write an update to an existing row in my database, if it doesn't happen I want to log the failure but continue executing the code. While it would be nice to have records of failures to track down issues, that the update failed isn't that important to my user, nor will it... | php | [2] |
3,411,586 | 3,411,587 | server side validation in asp.net? | <p>hi all as i know that asp.net provide server side validation control which has there own built-in logic, so i want to ask here can we extend built-in logic, i means suppose we use <strong>compare validator</strong> for comparing two file at this point it will validate according to there built-in logic, but i want t... | asp.net | [9] |
3,831,464 | 3,831,465 | Get list of dictionary elements ordered by dictionary key | <p>I have a dictionary <code>d</code> for which the keys are all strings. Now when I do:</p>
<pre><code>for key in d:
print(d[key])
</code></pre>
<p>I get the elements of <code>d</code> is some "random" order. How can I force the element of <code>d</code> to come out sorted by the lexicographical order?</p>
| python | [7] |
3,209,460 | 3,209,461 | Frame Calculator issue in C# | <p>Hello I am working a frame calculator in C# and right now it works just fine however when I use a of 100 or above it does not do it right, it gives the same answer 23.333. I need help getting it to work above 100, I am kinda new to C# as well. All it is suppose to do is take a number subtract 30 and then divide it b... | c# | [0] |
1,773,956 | 1,773,957 | Basic Javascript validation | <p>This is a really simple problem. I had this working and then i must of changed something and now it doesn't work. Its just a peice of JS code checking for an empty string. Here is the code below. It's been driving me mad for 20 minutes trying to figure out what is wrong with this ridicliously simple code.</p>
<pre>... | javascript | [3] |
4,879,368 | 4,879,369 | Get text bounds of space | <p>How to measure bounds of space in android?</p>
<p>I mean, the following:</p>
<pre><code>Rect bounds = new Rect();
paint.getTextBounds(String.valueOf(' '), 0, 1, bounds);
return bounds.width();
</code></pre>
<p>returns 0.</p>
| android | [4] |
1,411,365 | 1,411,366 | in c++ , how to use array as function input and output | <p>i want to create a function in c++ which contains two arrays as input and returns one array as output,</p>
<p>array function_name(array A, array B)</p>
| c++ | [6] |
4,072,406 | 4,072,407 | Whats the best way to parse a file in Java | <p>I have a text file with Tag - Value format data. I want to parse this file to form a Trie. What will be the best approach? </p>
<p>Sample of File: (String inside "" is a tag and '#' is used to comment the line.)</p>
<pre><code> #Hi, this is a sample file.
"abcd" = 12;
"abcde" = 16;
"http" = 32;
"sip" = 21;
</code... | java | [1] |
2,875,422 | 2,875,423 | Click count possible with javascript? | <p>Let's say, in website, I want to display the notice message block whenever people click any of the link at my website more than x number of times. Is that possible to count with javascript and display the notice message block ? And can we count the refresh times also ? Or can it be only done with server side languag... | javascript | [3] |
796,743 | 796,744 | Deprecated: Function eregi() is deprecated contact form | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/6270004/how-can-i-convert-ereg-expressions-to-preg-in-php">How can I convert ereg expressions to preg in PHP?</a> </p>
</blockquote>
<p>I have a php contact form that I have used on a few different websites. I a... | php | [2] |
5,389,235 | 5,389,236 | C# set inherited class equal to base class | <p>if I have a parent class:</p>
<pre><code>public class ParentClass
{
public string ParentStr = string.empty;
}
</code></pre>
<p>and a child class:</p>
<pre><code>public class ChildClass : ParentClass
{
public string ChildStr = string.empty;
}
</code></pre>
<p>Say later in my code I have an instance of ParentC... | c# | [0] |
5,523,756 | 5,523,757 | Don't understand how variable I is getting assigned a value in a struct | <p>I have the following code:</p>
<pre><code>#include <iostream>
using namespace std;
struct S {
S(int i): I(i) { }
int & v () { return I; }
private :
int I;
};
S s1 (1);
int main() {
cout << s1.v() << "\n";
return 0;
}
</code></pre>
<p>And I get the output:</p>
<pre... | c++ | [6] |
846,795 | 846,796 | Can outdated programming software be harmful? | <p>I recently bought a book called "Killer Game Programming in Java" It's about 5 years old now and the programs run best with Java2SE and Java 2SE 1.4. Since these versions are old and not updated, could using these software versions be harmful. The link below says yes but I wanted a second opinion before I try to ins... | java | [1] |
3,068,803 | 3,068,804 | Which assert to use? | <p>AFAIK, there are three common types of Asserts people use in Java viz.,</p>
<ul>
<li><a href="http://docs.oracle.com/javase/1.4.2/docs/guide/lang/assert.html" rel="nofollow">http://docs.oracle.com/javase/1.4.2/docs/guide/lang/assert.html</a></li>
<li><a href="http://static.springsource.org/spring/docs/1.2.x/api/org... | java | [1] |
4,669,764 | 4,669,765 | How to use BCEL in java programming? | <p>Is BCEL(Byte code Engineering Library) directly usable in normal java 1.6 or we need to download something for using it?
Or is this an in built library in java1.6? </p>
| java | [1] |
3,710,942 | 3,710,943 | Highlight row with jQuery | <p>I'd like to have a function that will highlight row of the table when a mouse rolls over it. I currently have a function that creates an alternate row color every other row and I would like to modify it rather than creating a separate function. Here's what I have:</p>
<pre><code>$(".tblRows tr:even").addClass("altC... | jquery | [5] |
1,242,831 | 1,242,832 | Function returns undesired value | <p>This is my first time posting to this site, therefore I would appreciate all criticisms in a constructive manner. I am learning to write Object Oriented programming with C++ and decided to make a trivial simulation of an ATM machine that takes in user input and processes it (i.e makeDeposit, checkBalance, etc.).</p>... | c++ | [6] |
2,791,308 | 2,791,309 | Where to define functors used by many derived classes? | <p>A common scenario in my code is that I got a <strong>functor</strong> that is used by many classes in a hierachy.</p>
<p>To make it accessible by all classes and stay DRY, I usually define it as a protected inner struct of my base class like that:</p>
<pre><code>class Base
{
protected:
struct CommonFunctor
... | c++ | [6] |
5,510,256 | 5,510,257 | Updating data from GridView | <p>I have a Gridview where I join two tables, bringing in the data to be displayed</p>
<p>table 1 sid, schedule, stime, splace, stourid</p>
<p>table 2 tourid, tourname</p>
<p>Basically they are joined stourid to tourid. That is so I can show the tourname in the grid.</p>
<p>Now I want to edit this GridView, what do... | asp.net | [9] |
5,975,834 | 5,975,835 | jQuery replaceAll() function | <p>I want to replace every link by an input box whose value is the URL of the link. I would like to use the jQuery replaceAll() function. The standard format is</p>
<pre><code>$(content).replaceAll(target);
</code></pre>
<p>My question is: how do you refer to the target object? In other words, in the following code, ... | jquery | [5] |
5,911,945 | 5,911,946 | content observer only invoked once then never again | <p>I am trying to observe sms messages with the following content observer. Unfortunately, it only picks up some occurrences. At first I thought it was a lifecycle issue, so I placed methods in the stop, start, resume, etc methods to make sure I always have an observer observing while my activity is in the forefront.... | android | [4] |
2,671,603 | 2,671,604 | Why's PHP complaining about my register_shutdown_function()? | <p>I try to register a shutdown function to log an fatal error. Nice stuff, if it would work for my class...</p>
<p>Inside a method I do this:</p>
<pre><code>register_shutdown_function(array($this, 'handleFatalError'));
</code></pre>
<p>handleFatalError is not static, and it's public:</p>
<pre><code>public function... | php | [2] |
2,558,481 | 2,558,482 | Creating an array of other objects in javascript? | <p>Is something like this possible:</p>
<pre><code>function FooClass()
{
var barsArray=new Array();
var index=0;
function addBar()
{
barsArray[index]=new BarClass(index);
}
}
function BarClass()
{
var myIndex;
function BarClass(index)
{
myIndex=index;
}
}
</code></pre>
| javascript | [3] |
1,262,079 | 1,262,080 | convert number of seconds since 1970 to DateTime for a specific time zone? | <p>I want to convert seconds since 1970 to datetime for a specific time zone.</p>
<p>I have the time in milisecond and the timezone for a server.
I am getting these values by calling an API. I want to know the year,month, day of that time zone.</p>
<p>int milisecond = 12347586484;
zone = "GMT +8.00";</p>
<p>How can... | c++ | [6] |
1,601,478 | 1,601,479 | why we use code-behind approch in asp.net? | <p>i want to know that why we use code behid approch. if there is some advantage then plese share to me ? as we know that there is two methode for writing server side code for
aspx.file </p>
<ul>
<li>code-behind approch in which we usually we seprate our server code aspx.cs file from aspx file </li>
<li>we can direct... | asp.net | [9] |
5,758,612 | 5,758,613 | How can I get the MCC and MNC on an iPhone | <p>As per the subject - is there an API to get the MCC/MNC on iPhone OS 2.1 or above?</p>
| iphone | [8] |
4,829,924 | 4,829,925 | Pixel dimension | <pre><code>class Program
{
static void Main(string[] args)
{
Bitmap aBitmap = new Bitmap(@"c:\bitmap.bmp");
Image aImage = (Image)aBitmap;
Bitmap newBitmap = new Bitmap(aImage, new Size(100, 100));
newBitmap.Save(@"C:\newbitmap.bmp");
}
}
</code></pre>
<p>what will be the pi... | c# | [0] |
5,380,350 | 5,380,351 | Better way of printing a mm:ss.ms stop watch string? | <p>I want to show a formatted string with minutes, seconds, and only one character of milliseconds. This is what I put together (mostly from other posts around here):</p>
<pre><code>public static final String getTimeDurationAsString(long milliseconds) {
int millis = (int) (milliseconds % 1000);
int seconds = ... | java | [1] |
3,769,760 | 3,769,761 | Time difference between unix timestamps | <p>I have to try and work out if a unix timestamp is between 21 days and 49 days from the current date. Can anyone help me to work this out? Thanks!</p>
| php | [2] |
4,352,178 | 4,352,179 | [python]: Where to find some great python code to study? | <p>I want study some real project code to improve my python coding.
Is there any great source ?</p>
| python | [7] |
3,059,046 | 3,059,047 | iphone target might include its own product | <p>After adding image resource into app (and may be some step I do not remember about) xcode reports with message: this target might contain its own product</p>
<p>Do you have any ideas how to solve this?</p>
<p>thank you</p>
| iphone | [8] |
113,188 | 113,189 | How to get value from the UIDatePicker? | <p>When i change the value in uIDatePicker at time no event is call.I want to gate change value from the UIDatePicker/</p>
| iphone | [8] |
5,952,456 | 5,952,457 | Should I use prepared statements for static values? | <p>Say on each pageload I want to grab the score of one particular use, <code>SELECT score FROM users WHERE id = 6</code>. None of those variables will ever change, and I'm not including POST/GET data into it.</p>
<p>Should I still use prepared statements? Or can I just use the <code>query</code> function?</p>
| php | [2] |
210,557 | 210,558 | Is stackoverflow using jQuery? | <p>I am a web developer, quite impressed with stackoverflow UI. there are lot of transitions, fade- ins and outs when buttons are clicked.. Is it using jQuery ? could you give me a sample jQuery code ?</p>
| jquery | [5] |
5,890,336 | 5,890,337 | Automatic page refresh even we navigate to another page | <p>i have a problem in page navigating. please help me to solve out.</p>
<p>in one asp.net page forexample Page1.aspx i have dropdown when we select an item in dropdown that would display in a label. Then we navigate to another page from page1.aspx to page2.aspx by clicking linkbutton in page1.aspx. Again if i come to... | asp.net | [9] |
2,826,656 | 2,826,657 | How to color table rows on the basis of column 'value' or 'text' in javascript? | <p>I am having column name as 'Status'. If status is 'Pass' i need to show that row in green color. If 'fail' then red. How to do it in javascript? </p>
<pre><code>for (i=0; i < rows.length; i++) {
var value = rows[i].getElementsByTagName("td")[0].firstChild.nodeValue;
if (value == 'Pass') {
rows[i... | javascript | [3] |
3,887,477 | 3,887,478 | Creating a table in a canvas on Android | <p>Would anyone know how to create a table in android on a custom view. Code</p>
<pre><code>public void draw(Canvas canvas)
{
// TODO Auto-generated method stub
Rect rect = new Rect(4,4,canvas.getWidth(),canvas.getHeight()/5);
RectF rectF = new RectF(rect);
Paint t=new P... | android | [4] |
2,993,166 | 2,993,167 | jQuery: execute method from string | <p>Is there a way to call methods by their name in jQuery? For example:</p>
<pre><code>var condition = true;
$('div').execute(condition ? 'show':'hide');
</code></pre>
| jquery | [5] |
5,630,151 | 5,630,152 | jQuery within "Load" problem | <p>I'm having trouble getting jQuery to load inside a file that has been imported using jQuery <strong>load</strong>.</p>
<p>Here is the code I'm using to get the external page:</p>
<pre><code><script type="text/javascript">
$(document).ready(function() {
$("#changeLinks a").click(function() {
... | jquery | [5] |
4,144,068 | 4,144,069 | How to pass value from Page 1 to Page 2? [php] | <p>I'm kinda new to PHP and I want to pass the value from the <em>select</em> from a form in Page 1 to Page 2. Mind helping me? Thank you!</p>
| php | [2] |
3,469,681 | 3,469,682 | Adding a line break as separator | <p>I have a function that uses comma as separator in breaking name/email pairs from a long string. I would like to modify this function to be able to detect if instead of a comma a line break is used. Here's the function that needs to be modified:</p>
<pre><code>$str = '"Fname Lname" <abc@email.com>, abc@gmail.c... | php | [2] |
809,070 | 809,071 | Android basic question | <p>I am new to Android.
can anyone tell me about Android that how can we run sample application on eclipse in android.while i run emulator opens but nothing is displayed on the screen.
Even HelloWorld Application is also not runnning. </p>
<p>My setup appears to be correct, I verified again.</p>
| android | [4] |
4,318,514 | 4,318,515 | question about filtering a dictionary using a list in python | <p>with the following dictionary and array:</p>
<pre>
a = { 'a':[1,2,3,4,5], 'b':[1,2,3], 'c':[1,2,3,4,5] }
b = ['a','c']
</pre>
<p>I would like to filter a into a new dictionary to only have the key-values in the array b so i end up with:</p>
<pre>
c = {'a': [1, 2, 3, 4, 5], 'c': [1, 2, 3, 4, 5]}
</pre>
<p>So.. th... | python | [7] |
4,296,832 | 4,296,833 | How can i generate random DNS names of Hosts in java | <p>this could be of the form:</p>
<p>aaa1.bbb2.ccc3.ddd4</p>
<p>Maybe taking a cue from <a href="http://www.dnsjava.org/download/" rel="nofollow">http://www.dnsjava.org/download/</a>
and first generating individual strings aaaa1 , bbb2 etc and then using join()</p>
<p>or</p>
<pre><code>String validCharacters = $('a... | java | [1] |
323,735 | 323,736 | Declaring Anonymous Inner class | <pre><code>rb.addActionListener(new ActionEvent(ae) {
public void actionPerformed(ActionEvent ae) {
nowCall(ae);
}
});
</code></pre>
<p><strong>Another way</strong></p>
<pre><code>Thread th=new Thread(Runnable r) {
public void run() {
// do something
}
};
// notice the ending of above 2 snippets
... | java | [1] |
1,889,514 | 1,889,515 | PHP - User registration | <p>I'ld like to create a very basic PHP based web app. The question is how to create the whole user registration, login, validation, profile stuff that every basic app needs?</p>
<p>Are there any good frameworks or is stuff like that usually build from scratch?</p>
<p>Thanks for your tips.
Michael</p>
| php | [2] |
2,831,176 | 2,831,177 | Android: random images changed when device is rotated to landscape mode | <p>I build an app which shows 3 random images from an SQLite database. But when I rotate my device to landscape mode, the random images are changed.
I dont want that acruallyy, what I want is the 3 random images stay still either on potrait or landscape mode.</p>
<p>Can anybody provide me a solution?</p>
<p>Thank you... | android | [4] |
490,746 | 490,747 | Final attribute initialized AFTER the object instantiation | <p>Well, I've a final property but I don't want to initialize it when I create my object because I can't. So I tried to not initialize it in my constructor but using a setter, I guessed it would have been something like a only-one-time usable setter, but I've this error :</p>
<blockquote>
<p>Test.java:27: error: can... | java | [1] |
2,611,406 | 2,611,407 | No compilation error on Runtime Exceptions. why? | <p>In the Below example if RuntimeException is replaced with some other exception then compiler throws the compilation error. But for Runtime Exception's it is not throwing anything. Why? Please explain.</p>
<pre><code>class A {
public void process() {
System.out.print("A,");
}
}
class B extends A {
... | java | [1] |
5,219,221 | 5,219,222 | android action bar | <p>I have just started working with action bar.Can anyone give me the example of tabbed action bar with menus.
That will be more helpful to me while starting working with action bar.Thanks a lot in advance.</p>
| android | [4] |
2,240,414 | 2,240,415 | Animation doesn't stop when handler is called | <p>I have a system which works like this:
- I start a spinner animation in my view when a network request is fired.
- When the request finishes (within a AsyncTask) the Animation is stopped.</p>
<p>This works fine except when the display turns off because of lack of user action. This code won't work in this situation:... | android | [4] |
2,043,101 | 2,043,102 | Which is faster: $("li").last() or $("li:last-child")? | <p>In jQuery, which is faster to execute: <code>$("li").last()</code> or <code>$("li:last-child")</code> ?</p>
| jquery | [5] |
3,109,495 | 3,109,496 | C# Javascript iframe resize | <p>How do you auto resise an iframe after you've added content to a div in the code behind. I'm called </p>
<pre><code>function resizeIframe() {
parent.document.getElementById('iframe2').style.height = document.getElementById('events_calendar').offsetHeight;
}
</code></pre>
<p>but i'm about 20 px short. BAsically i... | javascript | [3] |
2,475,934 | 2,475,935 | Why won't my timer increment the number? | <p>I recently learned javascript. I was experimenting with it. Now, I tried to make a simple timer. Here is the code:</p>
<pre><code><html>
<head>
<script type="text/javascript">
function start(obj)
{
var t = setTimeout("increment(obj)", 1000);
}
function increment(obj)
{... | javascript | [3] |
870,664 | 870,665 | Play Google (Android store) Statistics | <p>I'm guessing that these stats I can see in my Developer Console are not in realtime. Does anybody know what time they update them at?</p>
<p>My statistics are low, at the moment its only showing 11th of march to the 12th. Does this mean that I haven't had any downloads on the 13th or 14th or that it has not updated... | android | [4] |
573,076 | 573,077 | is it a php bug? (about extends) | <pre><code>class A extends B {}
class B extends C{}
class C {}
</code></pre>
<p>result</p>
<pre><code>PHP Fatal error: class 'B' not found ...
</code></pre>
<p>if the order is like this</p>
<pre><code>class A extends B {}
class C {}
class B extends C{}
</code></pre>
<p>everything is ok.</p>
<hr>
<p>PS: if I remo... | php | [2] |
3,831,458 | 3,831,459 | A question related to UITextfield | <ol>
<li>I have code that dynamically load 10 different textfields in viewdidload method</li>
<li>now if i click on any UITextfield and then autorotate device then my cursor should directly
come to that UITextfield when device rotates from portrait to landscape mode</li>
<li>second case is that if i click on any UITex... | iphone | [8] |
3,427,478 | 3,427,479 | Asp.net Variable is not working on the page | <p>I have the following code:</p>
<pre><code><tr id="test" runat="server">
<td align="<%=myalignment%>">
</code></pre>
<p>I set myalignment = "center", however, when the page is rendered, it doesn't grab the variable. It just shows exactly how it is above. I wanted to programatically change cert... | asp.net | [9] |
5,848,568 | 5,848,569 | iPhone: Is it possible to put a link in Push-Notifications? | <p>Is it possible to put a link in Push-Notifications message? I wish to send video link as notification. </p>
| iphone | [8] |
4,060,328 | 4,060,329 | Removing elements from an object with changing indexes | <p>I am having trouble deleting rules from the stylesheet object due to ever changing indexes.</p>
<p>I have this function:</p>
<pre><code>function delete_styles(delete_array){
console.log(delete_array); // ["0,0", "0,1", "0,2", "0,6", "0,7", "0,8", "0,9", "0,10", "0,14", "0,15", "0,16"]
for(var i in delete... | javascript | [3] |
3,180,624 | 3,180,625 | javascript string assignment by index number quirk | <pre><code>a="12345"
a[2]=3
a[2]='9'
console.log(a) //=> "12345"
</code></pre>
<p>What is going on?? This quirk caused me 1 hour painful debugging. How to avoid this in a sensible way?</p>
| javascript | [3] |
4,301,574 | 4,301,575 | submit inside submit | <p>I admit its not very clear title. But I did not know how else to name what I am trying to do.</p>
<p>I have index.htm. this page pulls data from index.asp?Process=ViewRequests with the following code.</p>
<pre><code> $(function Requests() {
$.ajax({
type: 'GET',
url: 'content/requests/index.cs.asp?Process=... | jquery | [5] |
2,382,722 | 2,382,723 | Tuple conversion to a string | <p>I have the following list:</p>
<pre><code>[('Steve Buscemi', 'Mr. Pink'), ('Chris Penn', 'Nice Guy Eddie'), ...]
</code></pre>
<p>I need to convert it to a string in the following format:</p>
<pre><code>"(Steve Buscemi, Mr. Pink), (Chris Penn, Nice Guy Eddit), ..."
</code></pre>
<p>I tried doing </p>
<pre><code... | python | [7] |
2,296,388 | 2,296,389 | Android - How to get TimeZone Value from milliseconds | <p>In Android how to get TimeZone value(GMT+8.00) from milliseconds long value.</p>
<p>Thanks</p>
| android | [4] |
4,561,888 | 4,561,889 | adding links into javascript | <p>I was trying to add links into javascript but could not do it. Loober is checking an input box. According to the focus, i wanted to change the links that appear on the page. changeME is default.</p>
<pre><code> <script type = "text/javascript">
var check = document.getElementById("loober");
var... | javascript | [3] |
4,041,892 | 4,041,893 | setting delegate of a custom class | <p>i am working in creating a custom class which is subclass of UIWebview. But its delegate functions are not being called. How should i set delegate for this class. I know this is a basic question but it will be really good if some one could answer it. Thanks in advance.</p>
<p>My Code:</p>
<p>.h file</p>
<pre><cod... | iphone | [8] |
5,840,569 | 5,840,570 | What does the C++ compiler error "looks like a function definition, but there is no parameter list;" mean? | <pre><code>#include <iostream>
#include <fstream>
using namespace std;
int main
{
int num1, num2;
ifstream infile;
ostream outfile;
infile.open("input.dat");
outfile.open("output.dat");
infile >> num 1 >> num 2;
outfile << "Sum = " << num1 + num2 <... | c++ | [6] |
158,589 | 158,590 | Series of views or series of activity? | <p>I've made my first android app :-) There's only one activity, and, on events, I modify the root view of the unique activity. My GUI is a series of views inside an unique activity.</p>
<p>Perhaps it's best to do one activity with only one root view, and, when I want to show another view, create and launch another ac... | android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.