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 |
|---|---|---|---|---|---|
376,327 | 376,328 | PHP Warning: Module 'json' already loaded | <p>While executing my PHP code in editor (Eclipse), I am getting this error: </p>
<blockquote>
<p>PHP Warning: Module 'json' already loaded in Unknown on line 0.</p>
</blockquote>
<p>What's the problem here, and how do I fix it?</p>
| php | [2] |
1,909,357 | 1,909,358 | How to trim document.getElementbyId value in JavaScript? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/196925/what-is-the-best-way-to-trim-in-javascript">What is the best way to trim() in javascript</a> </p>
</blockquote>
<p>How to trim document.getElementbyId value in JavaScript?</p>
| javascript | [3] |
6,015,095 | 6,015,096 | Help learning C++ on unix. OS, machine, books, IDE .. the whole caboodle! | <p>I’m a C# and Java serverside windows programmer by day and want to learn C++ on Unix in my spare time. </p>
<p>I have very limited knowledge of C++ (from my university days).</p>
<p>I currently own a dell laptop running Vista. Should I create a dual boot system or buy a new machine? </p>
<p>Which Unix OS should I... | c++ | [6] |
3,097,574 | 3,097,575 | Creating blogs in ASP.Net | <p>How can we create blogs in ASP.Net? Please give some idea or code for implementing this functionality.</p>
| asp.net | [9] |
3,296,017 | 3,296,018 | Getting java.lang.ClassCastException: javax.swing.KeyStroke when creating a JSplitPane | <p>I'm getting a random unreproducible Error when initializing a JSplitPane in with JDK 1.5.0_08. Note that this does not occur every time, but about 80% of the time:</p>
<pre><code>Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.KeyStroke
at java.util.TreeMap.compare(TreeMap.java:1093... | java | [1] |
3,919,780 | 3,919,781 | jQuery form not being submitted. Firebug no errors | <p>This jQuery isn't working. When i click Vote nothing happens. The div ratecontainer should disappear and nothing is inserted into MySQL when i check. In Firebug i get no errors. What did i do wrong?</p>
<pre><code>echo "<div class='ratecontainer'>
<form id='rateform' action=''>
<input type='... | jquery | [5] |
5,610,945 | 5,610,946 | Android app doesn't close | <p>There is a point in my app where I need to kill the app completely. I use this to do so:</p>
<pre><code>protected void exitApp()
{
Dialogs.DismissAll();
finish();
int pid = android.os.Process.myPid();
android.os.Process.killProcess(pid);
}
</code></pre>
<p>My problem is that this only works some... | android | [4] |
791,769 | 791,770 | Get the window height | <p>This is frustrating me. It should be something really simple but I can't get it to work in IE. I want to get the height of the current window: Not the scroll height, not the document height, but the actual window height. I've tried <code>window.innerHeight</code> which returns <code>undefined</code> and <code>docume... | javascript | [3] |
4,176,114 | 4,176,115 | Android, Trying to embed YouTube video in webpage | <p>I’m trying to display a page of embed YouTube videos. I got the code from YouTube website. The page gets displayed correctly when I load it up in the browser but on my embedded web page the YouTube videos do not show the first frame. Its just a black box with the YouTube logo on the bottom. If you click on it, i... | android | [4] |
38,042 | 38,043 | Internet connection | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/596589/iphone-sdk-internet-connection-detection">iPhone SDK Internet connection detection</a> </p>
</blockquote>
<p>What is the best way to determine whether there is an available Internet connection for a iphon... | iphone | [8] |
2,813,398 | 2,813,399 | What is the space efficiency of a directed acyclic word graph (dawg)? and is there a javascript implementation? | <p>I have a dictionary of keywords that I want to make available for autocomplete/suggestion on the client side of a web application. The ajax turnaround introduces too much latency, so it would nice to store the entire word list on the client.</p>
<p>The list could be hundreds of thousands of words, maybe a couple o... | javascript | [3] |
1,598,154 | 1,598,155 | How the right associative of null coalescing operator behaves? | <blockquote>
<p>null coalescing operator is right associative, which means an expression of the form </p>
<p><strong>first ?? second ??third</strong> </p>
<p>is evaluated as </p>
<p><strong>first ?? (second ?? third)</strong></p>
</blockquote>
<p>Based on the above rule, I think the following translat... | c# | [0] |
5,510,346 | 5,510,347 | Window.location Working But Not everywhere | <pre><code>var where_to = confirm("You have locked this record. You can only leave by clicking cancel.");
if (where_to== true) {
alert(window.location);
window.location.href = window.location;
} else {
window.location.href = window.location;
}
</code></pre>
<p>This function works in IE 7 and firefox and opera 10... | javascript | [3] |
193,359 | 193,360 | How to know if the android device supports multi users? | <p>Android 4.2 supports multiple user spaces "on shareable devices such as tablets"(<a href="http://developer.android.com/about/versions/android-4.2.html#MultipleUsers" rel="nofollow">http://developer.android.com/about/versions/android-4.2.html#MultipleUsers</a>). How do I know if a specific device is a "shareable devi... | android | [4] |
1,101,947 | 1,101,948 | My users are reporting my app is crashing - I never see this in the emulator | <p>I have a very vague questions to ask about a crashing android application.</p>
<p>Users are reporting to me that my application is crashing when they get something correct.</p>
<p>Basically it words like this: user answers the question correctly --> Display Toast--> send message to my service --> update screen fro... | android | [4] |
3,598,621 | 3,598,622 | test android app on lg p-690 | <p>can I test the app on this device if I don't have a data cable? I don't know how to do it or even if it is possible.</p>
<p>Do you need some specific phones in order to test the application?</p>
<p>Thank you,
Ryan</p>
| android | [4] |
481,979 | 481,980 | How to fetch all contacts of facebook and Gmail in PHP | <p>Which is the greatest, cheapest way in PHP that I can use to import Gmail, Yahoo, MSN, Facebook, Twitter contacts from my user's accounts if they wish to invite their friends?</p>
| php | [2] |
4,844,894 | 4,844,895 | What is wrong with this simple jQuery code? | <p>What is wrong with this jquery code, the error received on IE is </p>
<blockquote>
<p>Message: Expected ';'<br/>
Line: 10<br/>
Char: 10</p>
</blockquote>
<p>All I want is to move the mouse over and have an alter pop-up</p>
<pre><code><script language="javascript" type="text/javascript">
$(document).re... | jquery | [5] |
930,263 | 930,264 | Hiding/Showing column of a table with thead and tbody, thead shown in wrong place | <p>I have got a table with many columns (50+).</p>
<p>First of all, my examplecode: <a href="http://jsbin.com/irudo/2/" rel="nofollow">http://jsbin.com/irudo/2/</a></p>
<p>On clicking one of the th's it is said, to hide and add a new span to the page, to be shown again. The hiding works great, and the span is added t... | jquery | [5] |
3,302,648 | 3,302,649 | touch effect for Button in iphone | <p>how can i just change the color,of a button when i set the focus on the button in iphone.
I mean to say , for example we have 5 buttons, and i am just setting the focus on each of the button. i want those buttons to be higlighted with different color.
but when press or touch up inside the utton, the navigation is... | iphone | [8] |
3,654,840 | 3,654,841 | Parsing String and put this in array | <p>Can I get a method to parse a string eg: {"apple","fruit"} and put the elements in a two D array.</p>
| java | [1] |
4,604,899 | 4,604,900 | Android listview out of memory when scrolling | <p>Out of memory: Heap Size=31239KB, Allocated=28727KB, Bitmap Size=1542KB, Limit=32768KB</p>
<p>I have many items listview (1000-5000). Aftef 5-10 second fast scrolling i am getting Out of memory. </p>
<p>Method System.gc does not help.... </p>
| android | [4] |
3,601,947 | 3,601,948 | Where is the default parameter in Python function | <p>I think many people have seen the python's function which receives default parameters. For example:</p>
<pre><code>def foo(a=[]):
a.append(3)
return a
</code></pre>
<p>If we call this function using foo(), the output will append integer '3' each time after the call.</p>
<p>When this function is defined, a... | python | [7] |
2,177,930 | 2,177,931 | Why "throw ex;" hides original stack trace | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/178456/what-is-the-proper-way-to-re-throw-an-exception-in-c">What is the proper way to re-throw an exception in C#?</a> </p>
</blockquote>
<p>I want to understand why the "throw ex" usage hides the original stac... | c# | [0] |
2,560,881 | 2,560,882 | Failed to install *.apk on device timeout Launch canceled | <p>I read all threads about this problem but the mentioned answers in the threads don't work for me. Can I find out which is the timeoutproblem with the help of a logfile? Is it possible that on my pc are drivers which have problems with the adb? How the adb works in detail if i start the debug process? Can anybody hel... | android | [4] |
529,795 | 529,796 | Order of iterating Javascript object properties? | <p>If I have this code : </p>
<pre><code>o["a"]=1;
o["b"]=1;
o["c"]=1;
o["d"]=1;
for (var k in o)
{
alert(k)
}
</code></pre>
<ul>
<li><p>Would it <em>always</em>(cross browser) be alerted in the same order as the attribute were added ? </p></li>
<li><p>And what about this ? (same question)</p>
<p><code>var o={a... | javascript | [3] |
5,428,997 | 5,428,998 | How to add two possible keys in one keyboard button | <p>I've been trying to create my own android keyboard following <a href="http://android-developers.blogspot.com/2009/04/creating-input-method.html" rel="nofollow">this guide</a> and looking at the <a href="http://android.git.kernel.org/?p=platform/packages/inputmethods/LatinIME.git;a=blob;f=res/xml/kbd%5Fqwerty.xml;h=0... | android | [4] |
268,642 | 268,643 | PHP: moving form $_FILES to $_GET | <p>I have one old function that i need to edit</p>
<pre><code>doSome($_FILES['image']);
</code></pre>
<p>my quesiton is how can i use the same function in order to get a file form GET instead of uploading it?</p>
<p>if i change to</p>
<pre><code>doSome($_GET['image']);
</code></pre>
<p>it doesn't sound to work...<... | php | [2] |
1,184,020 | 1,184,021 | how to read a php array from php file in python | <p>lets say we want to make a python config reader from php.</p>
<p>config.php</p>
<pre><code>$arr = array(
'a config',
'b config',
'c config => 'with values'
)
$arr2 = array(
'a config',
'b config',
'c config => 'with values'
)
</code></pre>
<p>readconfig.py</p>
<pre><code>f = open('... | python | [7] |
4,095,718 | 4,095,719 | Jquery; correctly selecting contents of a script tag | <p>I have a single page web application using jquery and a set of embedded templates. A template may contain tag like below:</p>
<pre><code><script type="html/template" id="sample">
<script type="text/javascript" charset="utf-8">alert('x');</script>
</script>
</code></pre>
<p>and a jquery ... | jquery | [5] |
220,824 | 220,825 | Connection through ip address | <p>I am trying to obtain the ip address from a text file so when I use the following code it does noy work..</p>
<pre><code> System.out.println("get = "+get); //get is where the ip address is stored after reading from file and it is successfully received as well
Socket client=new Socket(get,5000);
</code></pre>... | java | [1] |
1,834,916 | 1,834,917 | Kill a Thread On Dialog Close | <p>I have a thread that runs in a loop, and would like to kill a thread once a dialog that started the thread closes. What is the best way to do that?</p>
| java | [1] |
4,119,300 | 4,119,301 | Reading from a plain text file | <p>Say I have the following in a text file:</p>
<blockquote>
<p>car<br>
apple<br>
bike<br>
book</p>
</blockquote>
<p>How can I read it and put them into a dictionary or a list?</p>
| python | [7] |
3,448,543 | 3,448,544 | how to get value from expandable list view child value | <p>I want to create custome expandable list view in android but when I click on child, no value found and my click event is given below:</p>
<pre><code>mExpandableListView.setOnChildClickListener(new OnChildClickListener() {
@Override
public boolean onChildClick(ExpandableListView parent, View v,
... | android | [4] |
2,188,749 | 2,188,750 | Javascript multiple values in variable | <p>Is there any way to have one variable with multiple values like this:</p>
<pre><code>var variable = 1, 2, 3;
var enteredVal = 1;
if (enteredVal == variable){
alert('You chose the right number');
}
</code></pre>
<p>So if the variable enteredVal is equal to 1, 2 or 3, it will alert the message.
I can't seem to ... | javascript | [3] |
3,892,624 | 3,892,625 | How can i Assign a id to view Programmatically? | <p>I know it is basic but i am curios about that.</p>
<p>in xml file, we are assigning id to view like that "android:id="@+id/
something" and we are calling findviewbyid() but when i want to
create a layout programmatically in a class and when i add a view, how
do i assign default id "android:id="@+id/something" l... | android | [4] |
1,284,036 | 1,284,037 | page has expired IE 8 while using php codeignitor | <p>I have a login screen once user enters username and password i get a page has expired, it happens only in IE 8 and all other browsers it works fine, I have got some links where they suggest to edit the session.cache_limiter to private refer <a href="http://shiflett.org/articles/how-to-avoid-page-has-expired-warnings... | php | [2] |
4,049,178 | 4,049,179 | Python: How expensive is to create a small list many times? | <p>I encounter the following small annoying dilemma over and over again in Python:</p>
<p>Option 1:</p>
<p>cleaner but slower(?) if called many times since a_list get re-created for each call of do_something()</p>
<pre><code>def do_something():
a_list = ["any", "think", "whatever"]
# read something from ... | python | [7] |
5,130,477 | 5,130,478 | showing error message in php | <p>want to show a error message as a result of a form action. For example </p>
<pre><code><form action=a.php
input .....
</form>
<span.....>
<?php
$variable(Initially the value of this variable null according to the result of form value will change)
?>
</span>
</code></pre>
<p>Fo... | php | [2] |
3,081,366 | 3,081,367 | Auto position textblock | <p>i'm currently trying to position my textblock in a way where it would automatically load below the next textblock after eg i click a button. (Its like a messenger , just that the text are set by me depending on events)</p>
<p>Other than scrollviewer to contain more textblock if it overshoot the screen, what do i ne... | c# | [0] |
5,699,330 | 5,699,331 | Checking if assertions are enabled | <p>You can enable/disable <code>assert</code> on the <a href="http://docs.oracle.com/cd/E19683-01/806-7930/assert-5/index.html" rel="nofollow"><code>ClassLoader</code></a>.</p>
<p>But how can you determine if they are already enabled?</p>
<p>(I want to take some code paths that perform expensive checks only if the JV... | java | [1] |
4,674,282 | 4,674,283 | Add row to a table with Jquery,but don't need its value | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3576565/how-can-i-clone-a-row-in-a-table-without-cloning-the-values-of-the-input-elements">How can I clone a row in a table without cloning the values of the input elements inside it?</a> </p>
</blockquote>
<p>i... | jquery | [5] |
1,405,104 | 1,405,105 | Line 6 of this Javascript program is confusing me | <p>In the function <code>takeNormal()</code> below, there is a line that I don't understand at all. It is: </p>
<pre><code>var end = reduce(Math.min, text.length, map(indexOrEnd, ["*", "{"]));
</code></pre>
<p>Specifically, in this function reduce, it has all these different arguments (are they arguments?). How are t... | javascript | [3] |
1,149,691 | 1,149,692 | Should I schedule an operation performed in an Android custom Application class onCreate() method? | <p>I have an Android application which depends on the value returned by a webservice. This value changes only once a week. Clients should detect this changed value, but the exact time they detect this change is not really important, 12 to 24 hours later should be no problem.</p>
<p>My current implementation starts an ... | android | [4] |
2,798,767 | 2,798,768 | jquery attr use variable? | <p>Are you able to place a variable into attr of src?</p>
<p>Example:</p>
<pre><code>$("#member-image2").attr({src : image});
</code></pre>
<p>I am using facebook connect and the "image" is their variable and "member-image2" is my img ID ..</p>
<p>Is this even possible? Because as is, it is not doing it. </p>
| jquery | [5] |
3,362,058 | 3,362,059 | SDcard only RO even after set permissions | <p>I have added <code><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /></code> to Manifest but I still get "SDcard mounted RO" when executing the below code. What am I doing wrong here?</p>
<pre><code> if(!extState.equals(Environment.MEDIA_MOUNTED)) {
Log.d(Tag.getTag(this),... | android | [4] |
3,247,206 | 3,247,207 | What is static_case operator in C++? | <p>I've heard of <a href="http://msdn.microsoft.com/en-us/library/c36yw7x9(VS.80).aspx" rel="nofollow"><strong>static_cast operator</strong></a></p>
<p>Recently I've come across <strong>static_case</strong>, for instance:</p>
<pre><code>*ppv = static_case<IUnknown>
</code></pre>
<p>What does this mean?</p>
| c++ | [6] |
3,858,378 | 3,858,379 | How to use iPhone Camera as Bar Code Scanner? | <p>How can I use the iPhone camera to scan bar codes? I have gone through many of the links but I'm not able to figure out a proper way to implement this.</p>
| iphone | [8] |
2,123,413 | 2,123,414 | NSLocale is mostly empty - where are the attributes? | <p>I really just want to know whether the user has set the iPhone to 12 hour mode for time display.</p>
<p>The NSLocale class seemed to be describing (in vague unspecific terms without any examples or apparently useful methods) what I was after.</p>
<p>So I have created some NSLocale objects like so:</p>
<p>NSLocale... | iphone | [8] |
2,800,290 | 2,800,291 | How to add <div> in <form> using javascript | <p>Is there a way I can add <code><div></code> element to form.</p>
<p>Tx</p>
| javascript | [3] |
453,656 | 453,657 | AudioTrack class with enqueue, play, stop, pause, resume | <p>I need to create a class to handle audio AudioTrack.</p>
<p>In this class must have methods that enqueue audiotracks and play them in sequence synchronously.</p>
<p>Could anyone help me?</p>
<p>I do not know dequeue synchronously and play each part of the audio.</p>
<p>I need to use it because the data is passed... | android | [4] |
5,351,591 | 5,351,592 | Class in c# which gives the information about the machine | <p>I want to get the information about the the machine configuration i.e like ip address of the machine</p>
| c# | [0] |
4,334,227 | 4,334,228 | Using Script manager causes the page to load slowly | <p>I use script manager in website to use ajax, but when I host my page it loads very slowly.
When I remove the script manger it loads quickly.
So what I have to do to solve this problem</p>
| asp.net | [9] |
5,846,263 | 5,846,264 | Im having trouble writing a console application to create a simple program to solve a math equation for superannuation | <p>could some one help me with this?
ive racked my head over an hour and i cant seem to get it to work
this is in C++ and ive been learning for a little bit but im still new...</p>
<pre><code>int main()
{
double rate, amount,time, S;
cout << "Insert the time of the super: ";
cin >> time;
cou... | c++ | [6] |
5,447,932 | 5,447,933 | Calendar extender is not working | <p>I have a requirement to show edit panel as second row of a datagrid upon addnew link click. for this I have taken a div which has set display:none. I am able to show as second row upon addnew link click. now the actual problem starts.</p>
<p>this div got a text box which is tied to calendar extender to behave as a... | asp.net | [9] |
2,932,686 | 2,932,687 | Check if a date range is within a date range | <p>i have the following class:</p>
<pre><code>public class Membership
{
public DateTime StartDate { get; set; }
public DateTime? EndDate { get; set; } // If null then it lasts forever
}
</code></pre>
<p>I need to make sure when adding to the following list that the new item doesn't overlap the dates from exis... | c# | [0] |
2,641,397 | 2,641,398 | How do I check if istream is at the end of the file | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/6283632/how-to-know-if-the-next-character-is-eof-in-c">How to know if the next character is EOF in C++</a> </p>
</blockquote>
<p>I want to find out whether or not some istream has reached to the end of file.</p>... | c++ | [6] |
3,406,317 | 3,406,318 | Java's installed, but getting "Could not create the Java virtual machine" | <p>Trying to install: <a href="http://syedrezaali.com/code/SuperShape2D.zip" rel="nofollow">http://syedrezaali.com/code/SuperShape2D.zip</a></p>
<p>from... <a href="http://www.syedrezaali.com/blog/?p=1119" rel="nofollow">http://www.syedrezaali.com/blog/?p=1119</a></p>
<p>...on WindowsXP and Windows7 machine and keep ... | java | [1] |
4,525,992 | 4,525,993 | How to select center image in gallery in android | <p>can anybody tell how to select center image in gallery in android.Is there any property to alway select center image in galllery in android while scrolling gallery in android</p>
<p>Thanks</p>
| android | [4] |
3,066,317 | 3,066,318 | Java IO Performance Issue | <p>I am using:</p>
<pre><code>PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("test.txt"),1024*1024*500))
</code></pre>
<p>to write a large file (approx. 2GB). It takes 26 seconds to write. But, when I replace 500 with 10/20, it takes 19 seconds.</p>
<p>From <a href="http://java.sun.com/developer... | java | [1] |
3,013,878 | 3,013,879 | PHP Parse error: syntax error, unexpected T_VARIABLE in C:\Inetpub\wwwroot\hotel\edres.php on line 272 | <p>I Have been facing problem as shown in title for under evinced code please help me</p>
<pre><code><?php
$sql=mysql_query("UPDATE tariff SET avroom="$norm" WHERE type="$type"");
$upd="UPDATE reservation SET r_chkindt="$cid",r_chkoutdt="$cod",r_rooms="$norm",r_name="$name",r_email="$email",r_compan... | php | [2] |
294,942 | 294,943 | GridView paging while iframe is there inside the gridview | <p>I am having an ASP.Net(ASP.Net 4.0) GridView control which is having an Iframe inside it and this iFrame is showing pdf pages with it. Everything is working as expected, but when I am enabling the Paging with the gridview, then it is showing the following error:-</p>
<hr>
<h2>The GridView 'GridView1' fired event P... | asp.net | [9] |
3,649,649 | 3,649,650 | How to detect if my android application is minimized or not programmatically? | <p>I am creating chat application.So whenever my application is minimized and new message arrives at my application , notification message will be display on the screen .I am having the code for notification ,but I am not able to check my application is minimized or not???</p>
<p>Any help will be greatly appreciated<... | android | [4] |
5,826,853 | 5,826,854 | Problem with time zone conversion iPhone | <p>I have a date in milli seconds(EST) and a user specific time zone. I want to convert it to the user specified time zone. Following is the code I tried. Need help:</p>
<pre><code> float val = ([managedObject.lmt_ms floatValue])/(1000.0);
NSDate * dt = [NSDate dateWithTimeIntervalSince1970:val];
NSTimeZone* sourceT... | iphone | [8] |
4,512,551 | 4,512,552 | Handling Android application pause on incoming call and resume after call end | <p>I want to pause my android application when the phone receives an incoming call. After the call ends, I want my applications to resume automatically.</p>
<p>How would this be implemented in an Android application?</p>
| android | [4] |
2,148,483 | 2,148,484 | Parsing inline javascript variable to script src as parameter | <p>I'm new to JS, so please bear with me if this question might not make sense.</p>
<p>Is it possible to parse an inline js value to a js src value?</p>
<p>Suppose I have this inline js.</p>
<pre><code><script>
window.foo = window.foo || {};
window.foo.cam = { 'status';'logged-out'};
</script>
</... | javascript | [3] |
5,869,207 | 5,869,208 | Trying to regain access to a wordpress based website | <p>My Dad has a website based on wordpress, he went into the wordpress dashboard and modified the home page incorrectly appending an extra level to it, then when he exited it made changes resulting in website being messed up and more importantly the login to wordpress has disappeared not allowing him to change it back.... | php | [2] |
170,084 | 170,085 | Can't I filter first 5 elements? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1865552/selecting-the-first-n-items-with-jquery">Selecting the first “n” items with jQuery</a> </p>
</blockquote>
<p><a href="http://jsfiddle.net/MUyJ7/" rel="nofollow">Code</a> :</p>
<pre><code><... | jquery | [5] |
3,017,157 | 3,017,158 | javascript inheritance and instance variables | <p>I'm trying to understand how inheritance works in JS. Suppose we have a class:</p>
<pre><code>Class = function () {
this.A = 'A';
this.B = 'B';
};
</code></pre>
<p>and we are trying to extend it</p>
<pre><code>SubClass = function () {};
SubClass.prototype = new Class();
</code></pre>
<p>Do I understance ... | javascript | [3] |
2,594,623 | 2,594,624 | Single Page Application and $(window).bind('load', function() {....} | <p>I use this code to load an image gallery by binding it when window has completely loaded within a Single Page Application:</p>
<pre><code>$(window).bind("load", function() {
console.log("window loaded");
$("div#gallery").slideViewerPro({
autoslide: true,
thumbsVis: false,
galBorderWi... | jquery | [5] |
5,234,330 | 5,234,331 | Overriding a Javascript property with a function | <p>I would like to override an object property with a function, so that whenever the object's property is called, it will invoke the function and return the result.</p>
<p>Surely this should be possible in a dynamic language such as JS?</p>
<p><em>Context:</em></p>
<p>I'm trying to port some IE-only code to other br... | javascript | [3] |
2,638,309 | 2,638,310 | I cannot find my app by its name on Google Play but I can find it by package name? | <p>I developed an app and uploaded it onto Google Play. When I search for it by name it does not show my app, but if I search by my package name like "com.percentage" it shows my app. Can anyone please help me. How can I make my app searchable by its name and not by package name?</p>
| android | [4] |
2,207,587 | 2,207,588 | How to stop code execution while waiting for Wifi and Bluetooth adapters to enable in Android? | <p>I had to manually turn on the network adapters in my program, and on Android this takes a while for the hardware to power up, up to a second.</p>
<pre><code>//turn on network adapters
wifiManager.setWifiEnabled(true);
bluetoothAdapter.enable();
while(wifiManager.getWifiState()!=WifiManager.WIFI_STATE_ENABLED | blu... | android | [4] |
5,888,296 | 5,888,297 | how to implement file filter in java | <p>How do I implement a file filter in Java so I can limit the possible files that are shown to a user in a "select file" dialog, or limit the list of files that I see when listing the files in a directory?</p>
| java | [1] |
5,065,221 | 5,065,222 | Wrong filename by image | <p>I have in my directory six images. He shows 2 images and 1 filename. The filename is wrong but he is in the directory but he shows not that image. Can you help me? I want that he show 2 images + 2 correct filename's. </p>
<pre><code><!DOCTYPE html>
<?php
//path to directory to scan
$directory = "images... | php | [2] |
3,674,044 | 3,674,045 | Using Delay on a textbox | <p>I am trying to build a functionality where a user types text in the textbox and after a delay of 1 second, each character typed is converted to its upper case. This should happen as the user types.</p>
<p>Can i do using jquery?</p>
| jquery | [5] |
3,622,539 | 3,622,540 | Editing a Photo | From ( X by Y ) to ( A by A ) | <p>When I upload my Facebook photo there are no requirements on the x and y dimensions of the photo. However Facebook finds a way to insert a 50px by 50px photo that is not distorted into the news feed. </p>
<p>The only way you could do this, unless I am mistaken, is by cropping the image so that x and y are equal a... | php | [2] |
3,439,581 | 3,439,582 | Android Webview video play | <p>I'm working on a app which uses a webview to display webpages, i want to play the videos if the url is a video link(youtube) or a video contains as a part of the webpage. I've tried to add the url directly to the webview but it doesnot play even youtube links, i've already enabled plugins and javascript in webview..... | android | [4] |
1,696,306 | 1,696,307 | Generating Fibonacci sequence | <pre><code>var x=0,
var y=1;
var z;
fib[0] = 0;
fib[1] = 1;
for(i=2; i<=10; i++)
{
alert(x+y);
fib[i]=x+y;
x=y;
z=y;
}
</code></pre>
<p>I'm trying to get to generate a simple Fibonacci sequence but there no output. Can anybody let me know what's wrong?</p>
| javascript | [3] |
3,157,957 | 3,157,958 | jquery get all form elements, input, textarea, select | <p>Is there an easy way (without listing them all separately) in jquery to select all form elements and only form elements.</p>
<p>I can't use children() etc because the form contains other HTML. </p>
<p>E.g:</p>
<pre><code>$("form").each(function(){
$(this, "input,textarea,select")
</code></pre>
| jquery | [5] |
2,868,650 | 2,868,651 | crreation of folders 4 diff users and open files present on server through web page | <p>1.how to open files present on server when opened from web page using <code>java</code></p>
<p>2.how the attachments are stored on the server and how their path is extracted and then<br>
stored in database--(creation of a folder , how every user is assigned a different folder
etc) using <code>java</code>.</... | java | [1] |
5,055,688 | 5,055,689 | side effects of using ereg_replace and its replacement | <p>I'm new to php. I have the following code:</p>
<pre><code>$this->image["format"] = ereg_replace(".*\.(.*)$", "\\1", $imgfile);
$this->image["outputformat"] = ereg_replace(".*\.(.*)$", "\\1", $save);
</code></pre>
<p>which is working fine but I'm receiving an error Deprecated: Function ereg_replace().
I want ... | php | [2] |
1,105,327 | 1,105,328 | For this Method is an object reference necessary | <p>I'm new to C#. I wonder why I get errors for this:</p>
<p>Error: For this method a Object-Reference is necessary (translated from the German Message). Any Ideas. Seems to be correct for me.</p>
<pre><code>namespace DNS
{
public class Core
{
Dig dig;
public Core()
{
di... | c# | [0] |
1,150,174 | 1,150,175 | Meaning of class containing Main method | <p>Is there any difference if <code>Main</code> method is defined in static or non-static class or is that class is public or not and if <code>Main</code> method is public or not?</p>
| c# | [0] |
430,030 | 430,031 | How to make Apache run ASP.NET / ASP.NET 2.0 | <p>Don’t ask me why… but i’ve been asked to make Apache run ASP.NET.</p>
<p>IT Worked ! </p>
<p>Even worked with ASP.NET 2.0 Site
help me i want to learn that</p>
| asp.net | [9] |
5,450,545 | 5,450,546 | Putting a code behind a button in C# | <p>I am trying to add a code behind the add button my code is this:</p>
<pre><code>class CalculateValues
{
private int _num1;
private int _num2;
public int Num1
{
get
{
return _num1;
}
set
{
... | c# | [0] |
4,095,609 | 4,095,610 | Help applying Classes as fields | <p>What I am trying to do is to implement a constructor of an Object which is a class.
I have defined the class in the fields of the class; but because it is a class I dont know how to initialize it.</p>
<p>here is my class, and the fields.</p>
<pre><code>public class Player
{
// Instance variables.
//Weapon is a cla... | java | [1] |
5,044,711 | 5,044,712 | How to serialize / deserialize correct a BST(generic type) - implementation(separate class or subclass) | <p>What would be the right way of serialize/deserialze a BST(generic type) I mean I'm thinking i should write a <code>class Serialize</code> which contains all the methods over a my generic container, but what if I make a subclass in my container which contains the serialize class? which would be the proper way of doi... | java | [1] |
3,501,414 | 3,501,415 | Should I save ints in SQLite Database? | <p>I have optional data that can be downloaded from the app.. of course I need to check in every app start which optional data has been downloaded.. The optional data is numbered from 1 to 114.. I was wondering where to store this info?<br>
Should I save it in SharedSettings? or in my sqlite database? Is database acc... | android | [4] |
2,743,391 | 2,743,392 | produce a matrix of strings on the basis of a list | <p>I want to produce a matrix on the basis of this data I have:</p>
<p>[[0, 1], [1, 0], [0, 2], [1, 1], [2, 0], [0, 3], [1, 2], [2, 1], [3, 0]]</p>
<p>What I want to do, is if the sum inside the square brackets is equal to 1, produce a string variable y_n where n is the counter of lists meeting that condition,
and yx... | python | [7] |
3,730,151 | 3,730,152 | How I can create a complex string in Java efficiently? | <p>I want to create a string which will look like the following:</p>
<pre><code> "[{"product_id":"123","name":"stack"},{"product_id":"456","name":"overflow"}]"
</code></pre>
<p>I have the <code>product_id</code> and <code>name</code> in two arrays. How can I create the above type of string most efficiently?</p>
| java | [1] |
3,292,581 | 3,292,582 | Should I be using Malloc? Errors with large array of objects | <p>I'm using a bit of legacy type code that runs on a framework, so I can't really explain whats going on at a lower level as I don't know.</p>
<p>However my code creates an array of objectives. </p>
<pre><code>int maxSize = 20;
myObjects = new Object*[maxSize+1];
myObjects[0] = new item1(this);
myObject... | c++ | [6] |
5,968,502 | 5,968,503 | stdout and stderr anomalies | <p>from the interactive prompt:</p>
<pre><code>>>> import sys
>>> sys.stdout.write('is the')
is the6
</code></pre>
<p>what is '6' doing there?</p>
<p>another example:</p>
<pre><code>>>> for i in range(3):
... sys.stderr.write('new black')
...
9
9
9
new blacknew blacknew black
</code>... | python | [7] |
514,419 | 514,420 | RegisterClientScriptInclude | <p>i use ScriptManager.RegisterClientScriptInclude to include js file after partial postback it works fine
here :
**</p>
<blockquote>
<p>ScriptManager.RegisterClientScriptInclude(this, typeof(test4), "1", Page.ResolveClientUrl("~/slideshow/js/slideshow.js"));</p>
</blockquote>
<p>**
but i want to load more than on... | c# | [0] |
5,323,268 | 5,323,269 | How to force std::cin not to do any implicit conversion? | <p>I was wondering if we can force std::cin so it doesn't performs any implicit conversion between data types, for e.g:</p>
<pre><code>unsigned int number;
cout<<"Please input a number :";
if(std::cin>>number)cout<<std::endl<<"Good number";
else cout<<"Bad number";
</code></pre>
<p>So if... | c++ | [6] |
4,324,847 | 4,324,848 | blocking sessions and graph display in asp.net | <p>I am creating application in asp.net framework 4.0.i want to block the sessions between tabs and graph should display in the same application.both senarios should work. Please hepl me on this.</p>
<p>Thanks in Advance,
Venkat</p>
| asp.net | [9] |
69,218 | 69,219 | Show/Hide Multiple Divs with Jquery | <p>I want to use some buttons to show/hide multiple divs using jquery.</p>
<p>The page will initially show all divs. The idea then is that there will be a button to reset (show all) and then separate buttons to show a particular div while hiding the rest.</p>
<p>Any help would be much appreciated.</p>
<pre><code><... | jquery | [5] |
3,032,446 | 3,032,447 | Where is the backup project | <p>I have in error that look like this</p>
<blockquote>
<p>Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.</p>
<pre><code>ASP.NET to id... | asp.net | [9] |
1,523,840 | 1,523,841 | Error:ISO C++ forbids comparison between pointer and integer | <p>I have got following:</p>
<pre><code> wxIntPtr* value;
CreateRegKey();
if (regkeyexist) {
if (regKey->HasValue("LoggingStatus")) {
regKey->QueryValue("LoggingStatus", value);
if (value == 1)
</code></pre>
<p>however i get the error as the c++ forbids comparison betw... | c++ | [6] |
5,376,719 | 5,376,720 | C++ implicit conversions | <p>Several comments on a recent answer of mine, <a href="http://stackoverflow.com/questions/862858/what-other-useful-casts-can-be-used-in-c/862896#862896">http://stackoverflow.com/questions/862858/what-other-useful-casts-can-be-used-in-c/862896#862896</a>, suggest that my understanding of C++ conversions is faulty. Jus... | c++ | [6] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.