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 |
|---|---|---|---|---|---|
839,373 | 839,374 | What's the main difference between Java SE and Java EE? | <p>I'm new to Java, so any comment is welcome.</p>
| java | [1] |
5,364,442 | 5,364,443 | jQuery error: object doesn't support this property | <p>i am working on the following page:
<a href="http://www.skuuzi.com/products/skuuzi-4pack-brown" rel="nofollow">http://www.skuuzi.com/products/skuuzi-4pack-brown</a></p>
<p>On the above page there are options like 4brown, 4 grey. the options can be selected in firefox and IE8. But in IE7 and IE9 i get error the opti... | jquery | [5] |
5,505,983 | 5,505,984 | Android Book Pages | <p>What's the best way to implement functionality in Android where I have a large amount of text (let's say a book), and I display one page at a time. However, instead of displaying it all at once, and having the user scroll through it, I would want to create it like iBooks where each page is separate, and the user "fl... | android | [4] |
3,797,866 | 3,797,867 | Java Synchronization inside Another Thread | <p>I have a quick question about Java synchronization.</p>
<p>Please assume the following code:</p>
<pre><code>public class Test {
private String address;
private int age;
public synchronized setAddress(String a) {
address = a;
}
public synchronized setAge(int a) {
age = a;
}... | java | [1] |
3,449,863 | 3,449,864 | how to read text file in android | <pre><code> try
{
InputStream instream = openFileInput("E:\\test\\src\\com\\test\\mani.txt");
if (instream != null)
{
InputStreamReader inputreader = new InputStreamReader(instream);
BufferedReader buffreader = new BufferedReader(inputreader);
String... | android | [4] |
3,480,052 | 3,480,053 | Is there something faster than -drawInRect:withFont:lineBreakMode:alignment:? | <p>Shark shows me that this method takes a HUGE performance hit. Like 80% in my table view. All I do is draw two labels per cell (about 8 in total per page). During scrolling. I drawInRect: with that.</p>
<p>Are there some better methods? Like drawing directly to some layer?</p>
| iphone | [8] |
5,000,083 | 5,000,084 | jQuery loading screen on form submit with file response | <p>I have an HTML form. When submitted it creates an Excel file and returns it.
On all other forms I have a loading screen shown in the <code>onSubmit</code> function and hidden in the <code>document.ready</code> function, but when a file is returned, there is no <code>document.ready</code> and so my loading screen doe... | jquery | [5] |
3,229,419 | 3,229,420 | Error al conectar con localhost | <p>Could you help me with my problem?</p>
<p>I am trying to access localhost to obtain the data from a table but I get an error <strong>HttpHostConnectException</strong> when i run it </p>
<p>COMPLETE ERROR: org.apache.http.conn.HttpHostConnectException: Connection to <a href="http://localhost" rel="nofollow">http://... | android | [4] |
19,637 | 19,638 | Using the datafilter parameter in an .ajax query using javascript | <p>I'm performing a search using the jQuery .ajax function but I need to filter the results to get rid of some code that's generated from the search. The CMS I'm using wraps all content in a body tag, etc. I need to grab just the contents of a specific div and load it into my target div. Here's what I have so far:</p>
... | jquery | [5] |
3,993,592 | 3,993,593 | converting binary string into float | <p>I have an object that I am storing bits in. </p>
<pre><code>class Bitset:
def __init__(self, bitstring):
self.bitlist = []
for char in bitstring:
self.bitlist.append(int(char))
def flipBit(self, index):
val = self.bitlist[index]
val = (val + 1) % 2
self.b... | python | [7] |
3,526,689 | 3,526,690 | Need help parsing HTML with a regex in python | <pre><code>mystring = "<tr><td><span class='para'><b>Total Amount : </b>INR (Indian Rupees)
100.00</span></td></tr>"
</code></pre>
<p>My problem here is I have to search and get the total amount </p>
<pre><code>test = re.search("(Indian Rupees)(\d{2})(?:\D|$)", mystrin... | python | [7] |
287,749 | 287,750 | Convert .pdf to xml in php | <p>after googling a lot of time I still can not find a suitable answer how to convert .pdf to xml in php. Can some one help me to do this with some code or library?</p>
| php | [2] |
1,097,206 | 1,097,207 | sharing image for android | <p>Hi I want to share the image to mail, facebook, etc.. I can able to share the text to social media, but im unable to share the image. How shall i do share my image? my code is below: </p>
<pre><code>Intent sharingIntent = new Intent(Intent.ACTION_SEND);
Uri screenshotUri = Uri.parse("http://www.golfcourseranking.co... | android | [4] |
3,003,893 | 3,003,894 | dialogs and database | <p>When i click on a image button i want a dialog to appear which i need to populate with questions and answers from a database. I dunno were to start can anybody point me in the right direction?</p>
| android | [4] |
2,140,812 | 2,140,813 | Why my code not giving compile error? | <p>In the below code i am assigning data to final object .But not getting the compile error .</p>
<pre><code>class Name {
private String name;
public Name (String s) {
this.name = s;
}
public void setName(String s) {
this.name = s;
}
}
private void test (final Name n) {
n.set... | java | [1] |
2,331,119 | 2,331,120 | Declare array of Object, within the Object's constructor? | <p>If I have a class, MyClass, can I declare an array of MyClass on the heap, within the constructor of MyClass?</p>
<p>I can do this in C# but it doesnt seem to like it in C++?</p>
<p>I also get an error about no appropriate constructor for type MyClass??</p>
<pre><code>class MyClass
{
public:
MyClass(i... | c++ | [6] |
3,600,754 | 3,600,755 | Get class object from object.toString in java | <p>I want to get the class object from the <code>object.toString</code> (without overriding the toString method in the class).</p>
<p>I know the reflection will give the object but it creates a new instance of the class which I don't want.</p>
| java | [1] |
4,181,178 | 4,181,179 | Trouble with implementing abstract super class Java | <p>I'm working on an assignment where I'm trying to implement a class that extends an abstract super class, but by using</p>
<pre><code> public class B extends A{}
</code></pre>
<p>However, that gives me the error that type B must implement the abstract method A.act, is there another way in which I can do this wit... | java | [1] |
4,015,615 | 4,015,616 | onTouch return an InvalidCastException | <p>Im getting an InvalidCastException with this piece of code:</p>
<pre><code>public boolean onTouch(View view, MotionEvent event) {
if (!(view instanceof Card)) return false;
int eventaction = event.getAction();
Card card = (Card)view;
int X = (int)event.getRawX();
int Y = (int)event.getRawY();
... | android | [4] |
4,687,270 | 4,687,271 | Using ASIHTTPRequest and json-framework on the iPhone | <p>I'm planning on using both these libraries (or wrappers?) in my upcoming iPhone app. I see one of the top reason applications get refused, is due to using private frameworks/API calls. Is ASIHTTPRequest and json-framework considered such, or can I safely use these? </p>
| iphone | [8] |
2,349,041 | 2,349,042 | HorizontalScrollView keep track of current selection | <p>I have a HorizontalScrollView that shows three dates at once and snaps to the date in the middle when you lift your finger. Currently the dates are saved in an LinkedList.</p>
<p>The list has to be dynamic, means that when I scroll to the right, it has to reload the next dates on the right and delete some of the da... | android | [4] |
5,200,343 | 5,200,344 | C++ Object Class | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/6779645/use-of-this-keyword-in-c">Use of “this” keyword in C++</a> </p>
</blockquote>
<p>If I write these two C++ classes:</p>
<pre><code>class A
{
public:
const std::string getParam1()
{
... | c++ | [6] |
4,339,819 | 4,339,820 | Automatically Restart PHP Script on Exit | <p>Is there a way I can automatically restart a PHP script whenever it exits, regardless of whether it has been exited properly, or has terminated due to an error, or maxed memory usage, etc.?</p>
| php | [2] |
3,171,255 | 3,171,256 | Converting video using php | <p>We can convert video file to .flv format by ffmpeg-php extension but how can we convert .flv to other format, i searched but no solution find...</p>
<pre><code>//ececute ffmpeg generate flv
exec('ffmpeg -i '.$uploadfile.' -f flv -s 320x240 '.$new_flv.'');
// But can we this, convert it to mpeg..
exec('ffmpeg -... | php | [2] |
2,597,995 | 2,597,996 | How do I use that "<<<HTML" thing in PHP? | <p>I know I shouldn't be outputting things directly in PHP, but using a template instead, but whatever.</p>
<p>I remember perl being able to do this, and as I reached for my perl book, I realized: I already packed it, as I'm moving. It's incredibly difficult to search for "<<<", as well. </p>
<p>So, I know I... | php | [2] |
957,469 | 957,470 | adding a property to an EventArgs | <p>I have extended the standard FileSystemWatcher class by adding a string property (fileToTest), now i need to extend also the FileSystemEventArgs to add this property how can i do this ?</p>
<p>my extend FileSystemWatcher : </p>
<pre><code> class AleFileSystemWatcher : FileSystemWatcher
{
public string fileT... | c# | [0] |
1,101,570 | 1,101,571 | Can functools.partial be used to bind arbitrary positional arguments? | <p>Suppose you want to define a <em>partial</em> setting the positional arguments in an arbitrary order, i.e. you want to apply <em>partial</em> to <em>str.split</em> fixing the 2nd and 3th arguments. The desired result is the same as:</p>
<pre><code>lambda s: str.rsplit(s, SEP, 1) # SEP given.
</code></pre>
<p>(I us... | python | [7] |
19,787 | 19,788 | Python Random Number Generator Errors | <p>Hello I just started programming in Python and I was just trying to make a RNG but there are some errors that I don't understand.</p>
<p>Here's the code</p>
<pre><code>import random
import time
numbersGenerated = 0
print('Hello! How many numbers do you want?')
numbersNeeded = input()
print('What would you like t... | python | [7] |
4,032,857 | 4,032,858 | java code to list mp3 files in the current directory matching with the letters typed then and there in a JTextField | <p>java code to list mp3 files in the current directory matching with the letters typed then and there in a JTextField....</p>
<pre><code> I am developing a small music player app in java...
For that i want code to list the files which are all matches with letters typed then and there in a textfield...
Example:If ... | java | [1] |
485,924 | 485,925 | PrettyPrint python into a string, and not stdout | <p>I'd like to use prettyprint to print out a dictionary, but into a string and not to console.
This string is to be passed on to other functions.</p>
<p>I know I can use the "stream" parameter to specify a file instead of sys.out but I want a string.</p>
<p>How do I do that?</p>
| python | [7] |
5,269,544 | 5,269,545 | Title bar coming for some time in android | <p>When i use Alert Dialog along with this</p>
<pre><code>dialog.requestWindowFeature(Windows.FEATURE_NO_TITLE);
</code></pre>
<p>After using this ,the title bar comes for a few second and then vanishes.</p>
<p>How to handle this?</p>
| android | [4] |
2,145,773 | 2,145,774 | How to use strongly-typed like dictionary <string,Type> to associate a string to a class | <p>I want to create a dictionary to associate a string to a class for example:</p>
<pre><code>"dog" -> Dog class
"cat" -> Cat class
</code></pre>
<p>so I tried this</p>
<pre><code>public Dictionary<String, Type> dic = new Dictionary<String, Type>();
dic.Add("dog", Dog);
</code></pre>
<p>but Add do... | c# | [0] |
5,388,053 | 5,388,054 | Who calls the main function in java? | <pre><code>public static void main(String[] args)
{
boolean t=true;
System.out.println("Before return");
if(t) return;
System.out.println("not execute");
}
</code></pre>
<p>In the above code when the <code>return</code> is used then it should return to the function which calls the main function. Who e... | java | [1] |
963,547 | 963,548 | Jquery onmouseover and onmouseout not appearing in IE and Chrome | <p>I'm trying to add a new div and input within JQuery, when i use the following code in Firefox it works</p>
<p>jQuery("bracket div closebracket", { "class": "wrapper", id: "product" + i, "onmouseover": "javascript:Highlight('product" + i + "');", "onmouseout": "javascript:Lowlight('product" + i + "');" })
... | jquery | [5] |
2,518,918 | 2,518,919 | Retain form values after reloading the page by hyperlink click | <p>I'm trying to add paging functionality to a serch items page. so I have added a pager with <code>UL</code> as</p>
<pre><code>echo '<ul>';
for($i=1; $i<=$pageCount; $i++)
{
echo '<li><a href="' . $_SERVER['PHP_SELF'] . '?page=' . $i . '">' . $i . '</a>';
}
echo '</ul>';
</code><... | php | [2] |
3,937,074 | 3,937,075 | how to set value for <select> tag | <p>Using Php I have wrote the drop down list box code.
for Edit employee details I have used the same code and I tried to set the value on list box but the value is not set. how to do this.</p>
<pre><code>Employee Name: <select name=emp_name *$value='$name'*>
<option> -- EMPLOYEE NAME -- </option>
&... | php | [2] |
1,317,773 | 1,317,774 | Checking if $_POST variable is populated | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3496971/check-if-post-exists">Check if $_POST exists</a> </p>
</blockquote>
<p>I'm trying to run something if and only if a $_POST var is populated.</p>
<p>Can I do <code>if(empty($_POST[...])) { ... }</code>? ... | php | [2] |
2,296,823 | 2,296,824 | Mapping Entire Drive Into A Tree View | <p>I need help on how to map my drives into a tree view. I can get my drives to show but I can not get all the sub directories. I would like to get my entire drive mapped out into a tree view. Any help would be appreciated. This is what I got so far.</p>
<pre><code> string[] drives = Environment.GetLogicalDrive... | c# | [0] |
3,889,629 | 3,889,630 | Undefined function | <p>Just a simple problem for most of you i'm sure.
I have a function addTeamFixtures and it calls on a function flip.</p>
<p>That function is defined later in the script.
But I don't think it is happy with that.</p>
<p>The code where it calls the function:</p>
<pre><code> $rounds[$round][0] = flip($ro... | php | [2] |
2,515,330 | 2,515,331 | ASP.NET Encryption HEX Characters | <p>What can be done to this code to make the Encryption in HEX rather than ASCII?</p>
<p>Encryption:</p>
<pre><code>Public Function EncryptAES(ByVal sIn As String, ByVal sKey As String) As String
Dim AES As New RijndaelManaged
Dim ahashMD5 As New MD5CryptoServiceProvider()
AES.Key = ahashMD5.ComputeHash(S... | asp.net | [9] |
474,630 | 474,631 | server sends file to clients java | <p>I have a server and multiple clients and i am trying to make the server-thread send a file to the all connected clients at the same time.The weird thing is,sometimes the files are written correctly and sometimes the laptop makes noise and the files are written in the console and no files are created.I don`t do any c... | java | [1] |
3,249,183 | 3,249,184 | customer strange exception from google play | <p>i have received that exception:</p>
<pre><code>java.lang.NullPointerException
at com.callsfreecalls.android.SmsSend$4.onClick(SmsSend.java:179)
at android.view.View.performClick(View.java:3538)
at android.view.View$PerformClick.run(View.java:14330)
at android.os.Handler.handleCallback(Handler.java:608)
at andr... | android | [4] |
4,731,197 | 4,731,198 | NSBundle pathForResource method | <pre><code>NSURL *modelURL1 = [[NSBundle mainBundle] URLForResource:@"MyTest" withExtension:@"momd"];
NSLog(@"%@", [modelURL1 absoluteURL]);
NSString *path = [[NSBundle mainBundle] pathForResource:@"MyTest" ofType:@"momd"];
NSURL *modelURL = [NSURL URLWithString:path];
NSLog(@"%@", [modelURL absoluteURL]);
</code></pr... | iphone | [8] |
2,788,363 | 2,788,364 | jquery-plugin datepicker does not work when cloned | <p>I have a following codes (markup and javascript) in which each block of 2 text boxes are cloned. Each block contains 2 text box; one with normal text box; the other is text box (id of "textboxDueDate") with datepicker plug in associating with. Only the first/original works with popup calendar when user clicks inside... | jquery | [5] |
2,763,794 | 2,763,795 | Checking if you can log into an email account using php? | <p>I am writing a bit more at the top in an effort to get it to post. Skip this and read on: </p>
<p>I am writing a script that tests user's e-mail accouns. For example, the user might provide an e-mail address such as: johnny@bla.com. For the purpose of this exercise, I know that the domain name will be: mail.domain.... | php | [2] |
1,151,197 | 1,151,198 | Change LayoutParams of LinearLayout that is inside of RelativeLayout | <p>I have LinearLayout inside of RelativeLayout. I would like to change height of LinearLayout programmatically. I have tried do this with LinearLayout.LayoutParams but I've got an exception. How to solve this problem? Thanks.</p>
| android | [4] |
1,958,511 | 1,958,512 | Keypress event on jquery datatables paginate buttons | <p>I am using jquery datatables in my application.I have pagination type as "full_numbers".Now i want to add kepress event on these buttons i.e when an user press 'enter key' upon focusing on the button , should open respective page.</p>
<pre><code>$('.paginate_button, .paginate_active').live('keydown', function(e) { ... | jquery | [5] |
3,070,298 | 3,070,299 | how to check if all elements on subvalue of array is equal to a value | <pre><code>Array
(
[0] => Array
(
[id] => 10
[on] => 2
)
[1] => Array
(
[id] => 15
[on] => 2
)
[2] => Array
(
[id] => 20
[on] => 2
)
)
</code></pre>
<p>I wou... | php | [2] |
1,696,924 | 1,696,925 | getting error like ur view controller and nib file | <p>i have observed 1 warning when i am opening my nib file ,but that doesnt effected my out put ..
i want to to know what causes this error
its showing ' View Controller' has both its 'View' and 'NIB Name' properties set. This configuration is not supported.</p>
| iphone | [8] |
1,365,782 | 1,365,783 | jquery array confusion | <p>Here's the code that I want to modify:</p>
<pre><code>a[href*="google"]
</code></pre>
<p>Now what I want to do is to add multiple keywords such as google, yahoo, etc.
I tried doing like this and this worked fine:</p>
<pre><code>a[href*="google"],[href*="yahoo"]
</code></pre>
<p>But now I'm trying to get data fro... | jquery | [5] |
2,710,272 | 2,710,273 | Cannot modify header information - headers already sent by in php code | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/8028957/warning-headers-already-sent-in-php">“Warning: Headers already sent” in PHP</a> </p>
</blockquote>
<p>i creat web service for iphone app so that i write some code that fetch data from database and give o... | php | [2] |
3,897,515 | 3,897,516 | Filling selection boxes from INI file | <p>The code:</p>
<pre><code>$INIFile = parse_ini_file('config.ini');
echo '<center><form method="POST" action=""><br /><table class="specialtable">';
echo '<tr><td><font face="Verdana" color="white">Status:&nbsp;</font></td><td><select name="Status">... | php | [2] |
2,341,199 | 2,341,200 | How do I tell the index of my subdomain to call the entire contents of the root directory in the index.php file of my sub-directory? | <p>I am fairly new to php but I have an index file in my root directory where I define some php variables and call the "header.php" file which contains my site content. </p>
<p>Here is the structure. </p>
<p>I have two domains</p>
<p><strong>mysite.com</strong> -> references the root folder, the index file (which co... | php | [2] |
4,096,291 | 4,096,292 | using AND/OR in if else PHP statement | <p>how do you use 'AND/OR' in an if else PHP statement? would it be:</p>
<p>1) AND</p>
<pre><code>if ($status = 'clear' AND $pRent == 0) {
mysql_query("UPDATE rent
SET dNo = '$id',
status = 'clear',
colour = '#3C0'
WHERE ren... | php | [2] |
4,920,665 | 4,920,666 | PHP Links/Resources | <p>I am building a PHP competency for the company I work for and I wanted to get everyone's opinion on the best resources for PHP (articles, tutorials, etc.).</p>
| php | [2] |
5,911,847 | 5,911,848 | How to add Payment functionality in Shopping Cart | <p>I have got E commerce web site in asp.net. I have added shopping cart using Datalist, shopping cart functionality running fine now I want to add payment functionality. </p>
| asp.net | [9] |
1,035,698 | 1,035,699 | Python check if list of keys exist in dictionary | <p>I have a dictionary that looks like that:</p>
<pre><code>grades = {
'alex' : 11,
'bob' : 10,
'john' : 14,
'peter': 7
}
</code></pre>
<p>and a list of names <code>students = ('alex', 'john')</code></p>
<p>I need to check that all the names in <code>students</code> exist as k... | python | [7] |
856,093 | 856,094 | Is there a virtual machine for javascript? | <p>Is there a virtual machine for javascript?</p>
| javascript | [3] |
4,045,821 | 4,045,822 | Jquery to test if $(this) does not have a specific class | <pre><code>if ($(this).hasClass('white')) {console.log('white');};
</code></pre>
<p>equates to true and prints to the console. How do I test if it does not have the class <code>white</code> on the $(this) selector? I have </p>
<pre><code>if ($('this:not(.white)')) {console.log('not white');};
and
if ($(this).not('.... | jquery | [5] |
2,510,234 | 2,510,235 | Strings split in javascript? | <p>i am using my_colors.split(" ") method, but i want to split or divide string in fixed number of words e.g each split occurs after 10 words or so ...how to do this in javascript?</p>
| javascript | [3] |
1,087,524 | 1,087,525 | Php Textarea Can't Include textarea value, please help me :) | <p>please help, some days I searched and did not find ?</p>
<p>i have " test.php "</p>
<pre><code><html>
<body>
<form>
<input type="text" Name="">
<textarea name=""></textarea>
<input type="submit" value="help me">
</form>
</body>
<html>
</code></pre>
<p>an... | php | [2] |
3,526,017 | 3,526,018 | How to compare date and year? | <p>i am implementing one graph related app.</p>
<p>In that when application start i am getting present month,present year from calende and display on the screen with graph. like April 2012 and graph</p>
<p>ok that is fine.</p>
<p>In my screen i have two buttons like preview,next.</p>
<p>when user clicks preview ,i ... | android | [4] |
3,421,817 | 3,421,818 | store a transaction from apache php server into greentree system | <p>A client wants me to store user transactions in their greentree accounting package from a separate Apache server using PHP. Has anyone done this and can someone please point me in the right direction?</p>
| php | [2] |
2,250,310 | 2,250,311 | Android Linearlayout rotate? | <p>I need to rotate the linearlayout with it's child view's. Now I am using android 2.2 but in Android 3.0 has a rotate option.If we set the rotation degree we can get the rotated view. </p>
<blockquote>
<p>setRotation(float rotation)</p>
</blockquote>
<p>I need to rotate my view by using android 2.2. How to do thi... | android | [4] |
5,399,284 | 5,399,285 | Find a Location on the map Via latitude and longitude in ASP.NET | <p>I have many latitude and longitude data in my database, I want to use these data to find locations on the map in street view in my website that has developed by ASP.NET. I want to find component for ASP.NET that when I extract these data from database, these component have ability to use them and show the locations.... | asp.net | [9] |
2,994,184 | 2,994,185 | What are the different ways of consuming A WEB SERVICE | <p>Can you please explain what are the different ways of consuming aws?
eg:we can consume a web service through http query
also using API 's.
is there any other ways to consume a web service other than this?</p>
| java | [1] |
1,964,044 | 1,964,045 | Access php function from different pages | <p>I wrote a php function earlier today, and the funtion is being used by several pages on my website. It would be pretty good if I only had to have the function in one place, so that i don´t have to edit the function on every page if i want to make an adjustment.</p>
<p>I tried puting the function on an own page, and... | php | [2] |
1,362,238 | 1,362,239 | Efficient swap method for a derived class | <p>Here is a code fragment that speaks for itself. Thank you!</p>
<pre><code>class Foo : private std::vector<int>
{
public:
void swap(Foo& x)
{
std::swap(bar, x.bar);
// what goes here?
}
private:
int bar;
};
</code></pre>
| c++ | [6] |
3,284,431 | 3,284,432 | How to find the path of Database file in Android Emulator? | <p>I am executing some sqlite query in the Android emulator. I want to know which path that database files are storing. Pls give me some idea how to find it. If u can provide me some code snippet.</p>
<p>urs,
s.kumaran.</p>
| android | [4] |
3,943,787 | 3,943,788 | Output using innerHTML | <p>I need to output the contents of a Javascript variable which has html code in it:</p>
<pre><code>var jsVar = '<div>
<p> Sample text </p>
<img src="some image.jpg" alt="" />
<div>';
</code></pre>
<p>I want to add it to an object on the page using innerHTML. How do I do it ?</p>
| javascript | [3] |
4,307,186 | 4,307,187 | Can't get winsound.Beep to work | <p>I am trying to make some <code>Beep</code> noises with the <code>winsound.Beep</code> command. However when I am using <code>winsound.Beep(500, 500)</code> I do not hear anything. With <code>winsound.MessageBeep</code> and <code>winsound.PlaySound</code> however, I DO get to play sounds. Any ideas what I should do?<... | python | [7] |
1,152,897 | 1,152,898 | Javascript difference between functions within an object | <p>What is the difference between functions within an object. I have 2 examples which basically do the same thing.</p>
<pre><code>function a(param) {
function b(input) {
return input%10;
};
return 'The result is ' + b(param);
};
</code></pre>
<p>and</p>
<pre><code>function a(param) {
this.b=function(i... | javascript | [3] |
4,675,587 | 4,675,588 | Python approach to dataset manipulation | <p>Folks, we have the following problem: we've got several objects containing table data that look something like this:</p>
<p><code>{'field1':'value1','field2':'value2', ...}</code></p>
<p>At some point during runtime we need to "select" data from these objects (tables) in the same way one were to query a DB (i.e. g... | python | [7] |
3,340,080 | 3,340,081 | Access to key/values pairs of HashMaps within an Object[] | <p>I have an Object[] which entails lots of Objects of the type HashMap. The HashMap looks like this:</p>
<pre><code>Object[]
{id=15, name=Hello}
{id=27, name=Hello}
{id=15, name=Hello}
</code></pre>
<p>I have tried to cast it to HashMap[], however no luck.</p>
<p>I would like to iterate and retrieve a list of names... | java | [1] |
689,196 | 689,197 | Is this code calling a constructor that doesn't exist? | <p>Perhaps this is a basic misunderstanding, but the following line is confusing to me: </p>
<pre><code>return *static_cast<MockBehavior*>(COMPOSITE::m_Children[index]);
</code></pre>
<p>What exactly is this line doing?</p>
| c++ | [6] |
66,420 | 66,421 | iphone dev getting video thumbnail (frame) from MPMoviePlayerController | <p>every one i am trying to get the video frame or thumbnail from a video url but not succeeding in it, here is my code</p>
<pre><code>- (void)viewDidLoad {
thumbnailimg = [[UIImageView alloc]init];
movie = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:@"http://www.youtube.com/watch?... | iphone | [8] |
4,192,642 | 4,192,643 | when does getclassloader return null when using digest.getClassloader | <p>I am having a this problem while using commons digester.</p>
<p>I have the jar in classpath set in my eclise.</p>
<p>Here is the code snippet.</p>
<pre><code>Digester digester = new Digester();
System.out.println(digester.getClassLoader());
</code></pre>
<p>The above path returns me null in my machine whereas th... | java | [1] |
5,614,597 | 5,614,598 | How to make Quick news bar reading char by char | <p>Hey,
I see in almost news websites bar called quick news and its appear and reading character by character like this site <a href="http://www.filgoal.com/English/DefaultDynamic.aspx" rel="nofollow">http://www.filgoal.com/English/DefaultDynamic.aspx</a> in the latest news section under menus.
i hope if any one can he... | javascript | [3] |
5,168,228 | 5,168,229 | Reusing a TableRow | <p>In order to save time when a TableLayout is populated (with repetitive data), I want to reuse TableRows. However when I try to reuse them, I get the following error:</p>
<pre><code>java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
</co... | android | [4] |
5,356,029 | 5,356,030 | Store complete php object in mysql, mongo, or other database | <p>I need to be able to temporarily store a complete PHP object (containing some data and methods) somewhere... we use MySQL already but I'm open to other solutions if they work better.</p>
<p>Essentially, I can't use serialize because we lose the methods and I'd rather not save the data, and then create a new instanc... | php | [2] |
5,716,151 | 5,716,152 | Problem in String camparisson ...! | <p>here is my code :</p>
<pre><code>NSUInteger f;
for (f = 0; f < [appDelegate.books count]; f++) {
check = [appDelegate.books objectAtIndex:f];
checkthis = check.LotteryNumber;
mystring = check.LotteryNumber;
NSLog(@"Dynamic Value: %@",mystring);
NSLog(@"Static Value: %@",checkthis);
if (chec... | iphone | [8] |
1,121,382 | 1,121,383 | jquery: unbind mouseenter and leave won't work | <p>i have a tabbed view and when i hover above unselected tabs i give it the same style as a selected tab. the problem is that when i click it i can't seem to unbind the enter and leave events.</p>
<pre><code>function DocReady() {
$("." + TAB_OFF_CLASS).click(changeCategory);
$("." + TAB_OFF_CLASS).mouseenter(... | jquery | [5] |
1,057,070 | 1,057,071 | Taking item from string array that *might* be there | <p>I have a string array, and it may contain an element with the text "mytext" within the string. eg:</p>
<pre><code>mystringarray
{
[0] => "hello world";
[1] => "some of mytext";
}
</code></pre>
<p>I also have an array that doesn't have the mytext text in it.</p>
<pre><code>mystringarray
{
[0] =&g... | c# | [0] |
4,041,417 | 4,041,418 | Facing problem while importing project into the workspace | <p>I had the same issue before and tried many ways to slove it. Now it is working fine with importing project. Now am facing some related issue that is, there are some apiDemos in the plugin with my friend. I have copied it and tried to import it into the workspace but here is the same problem again showing that it h... | android | [4] |
1,314,616 | 1,314,617 | Remember form value when return back to submit due to some error | <p>After filling the form when submit, accidentally due to some filling error ,the form is not submit and return to back,in this condition the value of all text box is blank. i want to stable value of all fields in this condition . I'm using php with smarty framework. Please reply with solution as soon as possible.</p... | php | [2] |
5,800,965 | 5,800,966 | check if primary key exist | <p>I have tried posting this earlier and had to delete it because the code editor did not post it correctly and incompletely. plus I had a member ask me about SQL injection. </p>
<p>Here's the story:</p>
<p>I have a page where the user can check his information before it is submitted to the database. All I want to do... | c# | [0] |
1,352,349 | 1,352,350 | Gedit / External tools - IDLE | <p>I am trying to edit a file using GEDIT and have it open with IDLE. It works with these two lines in the external tools option -</p>
<pre><code>#!/bin/sh
idle -r $GEDIT_CURRENT_DOCUMENT_NAME
</code></pre>
<p>The problem is that a new instance of IDLE opens up every time I run it. Is there a way to just update the... | python | [7] |
653,099 | 653,100 | Beginner's Mistake | <p>I know this is probably a dumb question but I am a beginner and I just started learning today. I am using Dev C++ and I wrote my first code:</p>
<pre><code>#include <iostream>
using namespace std;
int main()
{
cout << "Hello World" ;
return 0;
}
</code></pre>
<p>I click to compile and run. Noth... | c++ | [6] |
3,034,535 | 3,034,536 | Strange force close on acore when adding a home screen shortcut | <p>I want to add home screen shortcuts to individual chat rooms, in my app. Here's my code to do so:</p>
<pre><code>Intent roomIntent = roomIntent(room).putExtra("shortcut", true);
Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, roomIntent);
intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, roo... | android | [4] |
772,561 | 772,562 | ExpandableListView using SimpleCursorTreeAdapter | <p>I am creating ExpandableListView using SimpleCursorTreeAdapter. I am facing lot of problems. </p>
<p>Can anyone tell me how I can I do this?</p>
| android | [4] |
3,672,229 | 3,672,230 | label text not persisting on a published website | <p>I have a label on my master page with a default text</p>
<pre><code><dxe:ASPxLabel ID="m_Label" runat="server" Font-Bold="True"
ForeColor="White" RightToLeft="True" Text="LabelText">
</dxe:ASPxLabel>
</code></pre>
<p>And then I set the text on the Master page</p>
<pre><code>if... | asp.net | [9] |
4,051,719 | 4,051,720 | onbeforeunload support detection | <p>I'd like to check if the current browser supports the onbeforeunload event.
The common javascript way to do this does not seem to work:</p>
<pre><code>if (window.onbeforeunload) {
alert('yes');
}
else {
alert('no');
}
</code></pre>
<p>Actually, it only checks whether some handler has been attached to the e... | javascript | [3] |
2,330,702 | 2,330,703 | Javascript: Out of scope? | <p>Re-Edited:
I went over to W3schools and played around in there javascript editor window to see what was going on. Here is a shorter script.</p>
<pre><code><html>
<body>
<script type="text/javascript">
var eType = document.getElementById("Type")
</script>
<select class="field select addr" ... | javascript | [3] |
3,015,533 | 3,015,534 | Update text with submitted data w/jQuery | <p>I have a form on a page. I have a link acting as submit button. The value is sent to a php page via ajax where the value is set into a session.</p>
<p>After submit I swap the form with text field where the text is displayed. How do I use the text from the submitted form to display withing <code><pre></pre&... | jquery | [5] |
2,310,412 | 2,310,413 | is there any difference between 'a.b.a' and 'b.b.a' | <pre><code>class a(object):
class b:
a='aaa'
print a.b.a#print 'aaa'
b=a()
print b.b.a#print 'aaa'
</code></pre>
<p>thanks</p>
| python | [7] |
857,597 | 857,598 | How to use UIEdgeInsets property in Button in iphone | <p>I an new iphone application Developer and want to know how to use UIEdgeInsets property in button so please guide me.</p>
| iphone | [8] |
4,794,940 | 4,794,941 | Incorrecr height of div returned by JS fuctions. Why? | <p>I try to get size of main div on page, to make iframe change its height to content, but document.getElementById("divId").offsetHeight (also try innerHeight) return wrong value. It always returns 247, but in fact page looks like it cut on 75%. I have an idea that page didn`t load fully, so I put resize code in the fo... | javascript | [3] |
4,690,167 | 4,690,168 | Alternative to base64_encode | <p>Are there any other encoding functions other than base64_encode for encoding text in PHP? </p>
<p>Edit: The purpose of the encoding functions:</p>
<p>To generate a string that can be used in a URL that can be used as an identifier.</p>
<p>For example, instead of <a href="http://www.something.com/?id=4&categor... | php | [2] |
2,306,107 | 2,306,108 | python subbing variables into string | <pre><code>sample_string = """
<div>
<h1>
%s
<h1>
Image:
%s
<br>
<p>
text text text text text text
</p>
%s
<p>
text text text text text text text text text more text this is just more text
in a paragraph tag
</p>
</div>"""
>>> print sample... | python | [7] |
806,287 | 806,288 | Refreshing listview automatically when a new process enters | <pre><code>public void processloader(object temp)
{
Process[] processes = null;
try
{
processes = Process.GetProcesses();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
Application.Exit();
return;
}
listView1.BeginUpdate();
listView1.Clear();... | c# | [0] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.