Unnamed: 0 int64 65 6.03M | Id int64 66 6.03M | Title stringlengths 10 191 | input stringlengths 23 4.18k | output stringclasses 10
values | Tag_Number stringclasses 10
values |
|---|---|---|---|---|---|
1,453,915 | 1,453,916 | To show message to user that download is completed in another activity | <p>I have six activities, in one of which i have to download a pdf. User can go in any of the activity after starting download, I want to show alert when the download is completed, if he is another activity then also.</p>
| android | [4] |
1,192,418 | 1,192,419 | Can I use pipedoutputstream for multi threads? | <p>Can i use one pipedoutputstream for multi threads and connect it to one pipedinputstream, then get all the output from the multi threads? </p>
<p>Following is the code snippet, what i want is the modify and delete thread's output can be used for sync thread, but delete thread's output is missed.
List P4Thread's run... | java | [1] |
59,081 | 59,082 | Overloaded constructor with default parametars | <p>I have two constructors overloaded like this, the problem is that the wrong constructor overload is entered :</p>
<pre><code>class Param
{
Param(
const std::string& name,
const MyVariant& variant = MyVariant()
const std::string& desc = std::string(""),
bool b1 = true,
bool ... | c++ | [6] |
2,039,395 | 2,039,396 | change attribute to element by Tag name | <p>I have an alement that I want to put a class to. But the loop keeps giving me</p>
<p><em>getElementsByTagName is not defined</em> </p>
<pre><code><script>
var textarea = getElementsByTagName("textarea");
for(i = 0; i<textarea.length; i++){
textarea .setAttribute("class" "textbox")
}
</script>
<... | javascript | [3] |
5,614,567 | 5,614,568 | jQuery or $, problem situations | <p>Could someone list some real life examples of conflicts using $ sign instead of jQuery.</p>
<p>As i have heard, it can create issues if another js library(ies) are used.</p>
<p>So better to use jQuery for jQuery plugins?</p>
<p>Some links to detailed explanations are welcome. :)</p>
<p>Thanks ;)</p>
| jquery | [5] |
16,653 | 16,654 | JQuery slideToggle() current show/hide state property? | <p>What is the easiest way to programmatically find the current toggle state of a DOM element when using the slideToggle() function in jquery 1.3.2? </p>
<p>I expected there to be a property for this, but I can't seem to find one. Directly checking the CSS display or height seems like a hack, but maybe that's what o... | jquery | [5] |
2,860,743 | 2,860,744 | DirectoryIterator::getBasename vs DirectoryIterator::getFilename | <p>Is there any difference between <a href="http://us2.php.net/manual/en/directoryiterator.getbasename.php" rel="nofollow"><code>getBaseName</code></a> and <a href="http://us2.php.net/manual/en/directoryiterator.getfilename.php" rel="nofollow"><code>getFilename</code></a> when called with no arguments?</p>
| php | [2] |
1,526,518 | 1,526,519 | Does die() end your session in PHP? | <p>If I execute:</p>
<pre><code>die();
</code></pre>
<p>Will it also effectively call </p>
<pre><code>session_write_close();
</code></pre>
<p>Because die stops the entire process?</p>
| php | [2] |
5,235,850 | 5,235,851 | how to make a javascript array be the choices in an <option> tag | <p>title is self explanatory i think..</p>
<p>is there anyway to make a list of about <strong>300</strong> items in an array be the choices in </p>
<p><code><option>ARRAY DATA</option></select></code></p>
| javascript | [3] |
2,499,949 | 2,499,950 | need a jquery plugin with zoom in and zoom out and tagging hotspots in images | <p>I need a jquery plugin with zoom in and zoom out and tagging hotspots in images. i found this script "http://flipbit.co.uk/jquery-image-annotation.html" with image annotation,but there is no zoom in and zoom out option and add annotations.</p>
<p>Please help me to add zoom in and zoom out option</p>
| jquery | [5] |
4,839,629 | 4,839,630 | Android Parcelable Deserializing | <p>I am trying to pass an Array of custom objects to the intent of a new activity. I am at the point where I am casting each of the Parcelable Objects into Objects of the correct type, but I am getting a:</p>
<p>Parcelable protocol requires a Parcelable.Creator object called CREATOR</p>
<p>I read somewhere that it ha... | android | [4] |
11,736 | 11,737 | How to make a Entity move towards a x and y? | <p>I am looking for a way to make my Entity(A bullet) move towards a x and y,which is where the player was when the bullet was fired. so In my entity class i have - </p>
<pre><code> float xSpeed = 1.0F;
float ySpeed = 0.0F;
</code></pre>
<p>if I wanted to move the entity in a diaganal line I would make xSpeed an... | java | [1] |
2,155,558 | 2,155,559 | Generating random data and passing information between activities | <p>Im currently working on Quiz-program. The program has several different question cathegories. Each category have several questions that should be randomized and also fill the criteria that it should not appear more than once.</p>
<p>Each category is implemented as an activity, and the data is passed between activie... | android | [4] |
4,324,784 | 4,324,785 | can I call an interface method explicitly in java? If not then is there a workaround for it? | <pre><code>public class a implements b,c {
public void g()
{
}
public static void main(String[] args){
a object =new a(); //this overrides for both the methods in
// the interfaces b and c
object.g();
}
}
interface b
{
vo... | java | [1] |
1,954,956 | 1,954,957 | killing calling activity from child activity android | <p>suppose app is started with activity A then from A call to B.then B to C then C to D.after starting D if user presses Home Key then again start app from launcheri want to start the app from activity A and if on B activity user presses back button app should close.Activity A should not b called..</p>
| android | [4] |
3,359,740 | 3,359,741 | Search android contacts by family name and first name and get raw_id | <p>I try to sync android contacts. I want to use first and family name to identify a contact and update it with the raw_id, but I don't know how to search for family name and surname. I looked at the sample files, but there's only a description to search (and sync) with the raw_id!</p>
| android | [4] |
3,957,905 | 3,957,906 | What's the correct way to implement key-value pair in Spinner in android | <p>Is this the correct way to implement key-value pair for a Spinner in Android?</p>
<pre><code>package com.mypackage
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Spinner;
import android.widget.ArrayAdapter;
import android.widget.AdapterView;
import android.wi... | android | [4] |
96,636 | 96,637 | Calling Base Class Contructors in C++ | <p>Is this a legal way of calling a base class constructor.</p>
<p>The Base Class is as follows</p>
<pre><code>class base_class
{
public:
base_class(int x, int y);
protected:
int a;
int b;
};
base_class::base_class(int x,int y)
{
a=x;
b=y;
}
</code></pre>
<p>The Derived class is a fo... | c++ | [6] |
896,749 | 896,750 | How to pass parameters to other tabs (Android) | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3300695/sharing-data-between-tabs">Sharing data between tabs</a> </p>
</blockquote>
<p>In the main Tab, I have a button. After clicking it, it calls tabHost.setCurrentTab(1)<br>
It then goes to another tab. But ... | android | [4] |
5,021,212 | 5,021,213 | Is it now safe to use PHP echo short tags? | <p>There are many questions in SO about this issue but most of them are pretty old.</p>
<p>From the point of view of a webmaster which is using a big, broadly known web hosting company, Is it now totally and completely safe to use <code><?=var ?></code> instead of <code><?php echo var; ?></code> ?</p>
| php | [2] |
2,636,450 | 2,636,451 | Linux CLI into Android | <p>I was wondering if it is possible to terminal into my Android (Razr) and navigate the file system and processes like you would on any other Linux distribution. As it is supposed to be built on top of the Linux Kernel.</p>
<p>I find it annoying that you simply can't shut down most apps, like Firefox for example, fr... | android | [4] |
3,637,011 | 3,637,012 | removing siblings from the DOM | <p>I have this working code:</p>
<pre><code> a.parentNode.removeChild(a);
</code></pre>
<p>however the structure has changed so that I need to also remove this child's previous sibling, i.e. the elelment that comes before it. How do I update this and is there some where on Mozilla Development Netowork I can go to s... | javascript | [3] |
2,129,381 | 2,129,382 | Generating FontMetrics from java | <p>am working on generating font metrics on server-side by giving ttf file as input.</p>
<p>Iam trying to Font , FontRenderContext , GlyphVector and GlyphMetrics classes.I have also tried Apache FOP but the metrics generated are not help me.</p>
<p>Would like to know if the following operations are possible?</p>
<ol... | java | [1] |
2,332,538 | 2,332,539 | Copying Images to the UIPasteboard | <p>How can one copy images to the UIPasteboard?</p>
<p>I have only seen examples for text.</p>
| iphone | [8] |
3,924,115 | 3,924,116 | Create 2D array with "new"? | <p>I want to create a 2D array like the following.</p>
<pre><code>char **dog = new char[480][640];
</code></pre>
<p>But it errors:</p>
<pre><code>error C2440: 'initializing' : cannot convert from 'char (*)[640]' to 'char ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast ... | c++ | [6] |
4,092,355 | 4,092,356 | java ( how the program find and print that sum and product. Ex.4) | <p>Exercise #3: Write a program that reads 3 integer values and then the user may input the sorting order preference in small or capital letters (i.e., a or A for ascending order, d or D for descending order).
Sample input/output:
Input 3 number: 7 8 3
Input sort order (a or A for ascending, d or D for descending... | java | [1] |
3,934,727 | 3,934,728 | Block the default animation for startActivity | <p><br>
Me started an activity like this </p>
<pre><code>Intent mainIntent = new Intent(v.getContext(), Second.class);
startActivity(mainIntent);
overridePendingTransition(android.R.anim.slide_out_right,
android.R.anim.slide_in_left);
</code></pre>
<p>I have set overridePendingTrasition for ... | android | [4] |
4,457,948 | 4,457,949 | jquery ajax return data for Internet Explorer error | <p>I use ajax get data but Internet Explorer always error. I tried many methods Can not be solved</p>
<pre><code>var ajaxDate={
acc:acc,
pass:pass,
};
var data=ajaxJsonFuc("api/api_login.php",ajaxDate);
if(data.status==1)
{
alert('login');
document.location.href="index.php";
}
else
{
alert(da... | jquery | [5] |
3,196,137 | 3,196,138 | load image in c# | <p>hi everyone
anyone can say me how to read bit bit of bmp image by information of heder of bmp then display it,without using any component of .net??? </p>
| c# | [0] |
3,519,332 | 3,519,333 | explicitly behave as an interface | <p>can we make any class to behave as interface and so that we can write "implements" in place of "extends" while creating any child class of that class .what is the actual difference between "implements" and "extends" internally . </p>
| java | [1] |
4,975,236 | 4,975,237 | jquery to find a span by title and add a class to it. In SharePoint | <p>I appologize I am not very versed in Javascript and jquery but what I need to do is find a span with a certain title "Title1" and add a class to that span. I tried several different methods just looking at examples I found by googling but nothing has worked. Anybody got a good example on how to do this. Below is ... | jquery | [5] |
1,417,959 | 1,417,960 | the jquery post method is not working? | <p>here is the code</p>
<pre><code><html>
<body>
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript">
$('document').ready(function(){
$('#submit').click(function(){
var username=$('#user').val();
$.post('http://localhost:8080/verify/comment.ph... | jquery | [5] |
2,730,749 | 2,730,750 | How to add Daemon services and where i get best tutorial or best practices in iphone? | <p>Thanks for helping me answering this question,
I want to update the user's location and a timer frequently in my application in background. I have heard that the iPhone SDK only provides support for push notification services. Is there a way using the iPhone SDK to add Daemon services? Where can I find a good tuto... | iphone | [8] |
1,956,820 | 1,956,821 | DOT Language Parser | <p>Does anyone know of a DOT Language (or other GraphViz-ish format) Parser for .NET?
I have been experimenting with QuickGraph, but it seems to only support serialization, and not parsing from a stream/string/file. </p>
| c# | [0] |
4,521,626 | 4,521,627 | Issue with PHP Base Path | <p>Lets take this URLs for example :</p>
<pre><code>* http://localhost/amdseo/panel/manage/blogs.php
* http://localhost/amdseo/panel/index.php
* http://localhost/amdseo/panel/features/new/post.php
</code></pre>
<p>I need them all to include the following file which is located in</p>
<pre><code>* http://localhost/amd... | php | [2] |
787,351 | 787,352 | Any better (shorter) way to generate random strings? | <p>Any random number between <code>0</code> to <code>100</code> can be generated like this:</p>
<pre><code><?php
$min = 0;
$max = 100;
$random = rand($min,$max);
?>
</code></pre>
<p>Now I can place this <code>$random</code> anywhere in my file to generate a random number. But the problem is when I ... | php | [2] |
196,449 | 196,450 | Parameter type not assignable when storing func in dictionary | <p>I have a func which takes one parameter of Type T and returns one value.</p>
<p>I want to store it in a dictionary, like so:</p>
<pre><code>Dictionary<CustomerMilestones, Func<string, string>> coll = new Dictionary<CustomerMilestones, Func<string, string>>();
string Indicator = coll[Custom... | c# | [0] |
1,583,178 | 1,583,179 | Second alert not working | <p>I have this function which calls values from document id's and some variables are defined.</p>
<p>It all seems to work fine besindes the variables already defined and the second alert box isnt appearing, any idea why?</p>
<pre><code>function Calculate() {
var ContentMinutes = document.getElementById ("ContentMinut... | javascript | [3] |
2,996,918 | 2,996,919 | Schedule an event using AlarmManager with ELAPSED_REALTIME | <p>I have a question on scheduling an event using AlarmManager with ELAPSED_REALTIME.
I want to schedule an intent after 30 minutes except sleeping time. Which of the following code I should use?</p>
<p>Code 1:</p>
<pre><code>AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
am.set(Ala... | android | [4] |
3,495,860 | 3,495,861 | Reading new, filled array gives segfault | <p>I've been banging my head hard over this...I create a pointer in main(), which I pass on to another function. Inside that function, the pointer is used to create a new array (using the new operator), the array is filled, and the function ends. </p>
<p>If I then try to access elements in the new array in the caller,... | c++ | [6] |
5,564,482 | 5,564,483 | Change the value of a dropdown if it is equal to something | <p>Sorry if this question has already been asked and answered, but I couldn't find anything specifically for my needs. I have a form that has placeholders and javascript to make sure the form isn't submitted with the placeholders still there. There is a dropdown box that has the value of 'Best time to call'. What I wan... | javascript | [3] |
1,031,740 | 1,031,741 | increasing names in C# with integers | <p>I need to get an object and check if it already exists. </p>
<p>In case it does, I want to add a number, or increase the number in its name.
For example if I have the object "a" and it exists, I need to add a 1 so it's called a1.
In case a1 exists, a2, etc.</p>
<p>How could I perform this?</p>
<p>My code:</p>
<p... | c# | [0] |
2,026,309 | 2,026,310 | Jquery search multidimensional ul list | <p>I have next HTML:</p>
<pre><code> <input type="text" id="search" name="searchword" value="" />
<ul id="search_list">
<li>first</li>
<li>second</li>
<li>third
<ul>
<li>aaa</li>
<li>bbbb
<... | jquery | [5] |
2,759,341 | 2,759,342 | Find String with regexp | <p>How can I find if a string starts with <code>[</code> and ends with <code>]</code> in JavaScript?</p>
<pre><code>var str = '[["a" , "b"]]';
</code></pre>
<p>And is there any way to identify if the above string is typeof array of array?</p>
| javascript | [3] |
4,924,160 | 4,924,161 | comparing files using python | <p>I have 29 text files as follows</p>
<p>File 1</p>
<pre><code>12313 : 23546
12313
23214
32465
</code></pre>
<p>File 2</p>
<pre><code>13132 : 23546
12323
32125
32125
32121
.
.
.
</code></pre>
<p>I would like to have python s... | python | [7] |
2,170,956 | 2,170,957 | Opening .A5E and other similar file extensions | <p>Do you have some advice as to how I might be able to open the following file extensions:</p>
<p>.A5E
.dir
.XMO
.U32
.A5R</p>
<p>The program these file extensions are in was created back in 1999...I don't have the original source code. Was hoping to find a free program or something similar online to be able to ... | java | [1] |
5,709,998 | 5,709,999 | Translating this Pseudo-code into PHP | <p>I am trying to code a function that basically gets a "property" from a sentence. These are the parameters.</p>
<pre><code>$q = "this apple is of red color"; OR $q = "this orange is of orange color";
$start = array('this apple', 'this orange');
$end = array('color', 'color');
</code></pre>
<p>and this is the functi... | php | [2] |
1,380,571 | 1,380,572 | Object creation. How to resolve "class-owner" | <p>I need some solution to trace class-owner of method, in which object is constructed. I mean to say, i want constructor to automatically resolve Type object of "creator" class. Is it possible in C#?</p>
| c# | [0] |
1,054,162 | 1,054,163 | Select & replace a random word in javascript | <p>I'd like to write a code in javascript that selects a random word from a text, and replaces it for another word.</p>
<p>Here's my code: </p>
<pre><code>var text = "dog cat apple stone";
var keyword = text[Math.floor(Math.random()*text.length)]; // select random word
var new_phrase = text.replace( keyword, "house")... | javascript | [3] |
1,258,310 | 1,258,311 | Preserving argument default values while method chaining | <p>If I have to wrap an existing method, let us say wrapee() from a new method, say wrapper(), and the wrapee() provides default values for some arguments, how do I preserve its semantics without introducing unnecessary dependencies and maintenance? Let us say, the goal is to be able to use wrapper() in place of wrapee... | python | [7] |
533,611 | 533,612 | Stupid C++ question about if-else | <p>I have this code:</p>
<pre><code>#include <iostream>
using namespace std;
int main()
{ char c='6';
if(c == '+' || '-' || '*' || '^' || '/' || '%')
{
cout<<"good";
}
else {cout<<"bad";}
return 0;
}
</code></pre>
<p>I want to write "good" if the char is '+' or '-' etc... | c++ | [6] |
5,166,421 | 5,166,422 | about string format wrong | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/5335486/about-string-format-wrong">about string format wrong</a> </p>
</blockquote>
<p>Multiple annotations found at this line:
- error: Multiple substitutions specified in non-positional format; did you mea... | android | [4] |
3,711,942 | 3,711,943 | How can I use python to read windows eventlog from a remote machine? | <p>I'm working on retrieving the Windows eventlog from a remote machine using Python.</p>
<p>I tried the following code:</p>
<pre><code>import win32evtlog
server = 'aRemoteMachineHostName'
logtype = 'System'
hand = win32evtlog.OpenEventLog(server,logtype)
total = win32evtlog.GetNumberOfEventLogRecords(hand)
</cod... | python | [7] |
192,224 | 192,225 | Draw a circle with fan blades inside, Java | <p>I have to display four "fans" or arcs that are outlined by a circle, i have the fanblades/arcs set and looking the way i would like but i cannot figure out how to get them outlined by a circle, any ideas? Thanks in advance.</p>
<pre><code>package chap15;
import java.awt.Graphics;
import javax.swing.JPanel;
publ... | java | [1] |
1,476,484 | 1,476,485 | Detecting which Activity is Running at the Moment? | <p>Is there a way to detect which activity is visible at the moment?</p>
<p>I have an activity that is launched whenever the server sends an asynchronous message, but if the user hasn't answered the previous message I don't want to take over the screen to display the new message. So I need to know if there is an Activ... | android | [4] |
3,608,007 | 3,608,008 | TO initiate Python shell | <p>You can use subprocess.call("/usr/bin/python") to open Python shell within a piece of Python code. Now my question is is it possible to predefine some variables/functions before initialization of this shell? In other words, inside Python code, I can define a bunch of useful variables and functions and I want them to... | python | [7] |
2,251,183 | 2,251,184 | iphone is it possible to register my application so the os notifies it every X seconds? | <p>Hello I would like to know if there is an equivalent to the android's alarmManager so I can register my app to be waken every X seconds?</p>
| iphone | [8] |
4,659,711 | 4,659,712 | value of button using javascript | <p>I have 3 buttons in my form. </p>
<p>All the button actions goes to a same page after clicking it depending upon what button is clicked.</p>
<p>My query is: The name of the buttons are 'add','edit' and 'remove'</p>
<p>When the 'add' button is clicked, using js I need to get the value of that button and similarly ... | javascript | [3] |
5,560,408 | 5,560,409 | How come the preferences activity is launched when selecting my app from the menu displayed when pressing the Home button? | <p>Steps:</p>
<ol>
<li>I start my Android app.</li>
<li>I press the Menu button and select Preferences => preferences screen appears.</li>
<li>I make a preference and then press the Back button => the application's main activity appears again.</li>
<li>I press the Back buttton => Home screen.</li>
<li>I press the Home... | android | [4] |
581,142 | 581,143 | Cannot apply indexing to an expression of type 'T' | <p>I've create a generic method like</p>
<p><code></p>
<pre><code>public void BindRecordSet<T>(IEnumerable<T> coll1, string propertyName)
where T : class
</code></pre>
<p></code></p>
<p>and in my class 'T' i've write indexer </p>
<pre><code>public object this[string propertyName]
{
... | c# | [0] |
330,953 | 330,954 | Java: Writing to the real STDOUT after System.setOut | <p>I'm trying to intercept System.out and System.err, but maintain the ability to write to the original streams directly when necessary.</p>
<pre><code>PrintStream ps = System.out;
System.setOut(new MyMagicPrintStream());
ps.println("foo");
</code></pre>
<p>Unfortunately, the details of the System class' implementati... | java | [1] |
1,911,942 | 1,911,943 | python: os.path.isdir return false for directory with dot on end | <p>Windows 7, python 2.6.6, 2.7</p>
<p>Create directory 'c:\1\test.'</p>
<p>Try check if it is dir or file, but it is neither:</p>
<pre><code>>>> os.listdir('c:/1')
['test.']
>>> os.path.isdir('c:/1')
True
>>> os.path.exists('c:/1/test.')
False
>>> os.path.isdir('c:/1/test.')
Fals... | python | [7] |
28,036 | 28,037 | How to display a file owned by another thread? | <p>I'm trying to build an application that displays in a GUI the contents of a log file, written by a separate program that I call through subprocess. The application runs in Windows, and is a binary that I have no control over. Also, this application (Actel Designer if anyone cares) will write its output to a log file... | python | [7] |
5,732,028 | 5,732,029 | Which Version of Python to learn? | <p>I'd like to learn Python, and I already have a bit of C experience.
Now, should I learn Python 2.6 or Python 3?
Which advantages and disadvantages do the versions have?</p>
<p>And: How can I learn Python (maybe a book you would recommend)? It should be German, but if it's english, it should at least be available fo... | python | [7] |
343,255 | 343,256 | Outputting a String into a file, without clearing the file | <p>I've been working on sort of "logging" to text file using BufferedWriter and I came across a problem:</p>
<p>I run the following code.. fairly basic..</p>
<pre><code>BufferedWriter out = new BufferedWriter(new FileWriter(path+fileName));
String str = "blabla";
out.write(str);
out.close();
</code></pre>
<p>and the... | java | [1] |
53,580 | 53,581 | Where to start in understanding a full piece of software? | <p>I've just started an internship with a company that develops one specific but quite complicated piece of software written in Java. It is cloud related and communicates with a relational database on one end, and has a web accessible gui on the other. </p>
<p>Yesterday was my first day and I was presented with the so... | java | [1] |
5,173,432 | 5,173,433 | How can I determine the correct encoding? | <p>I was trying to print some chinese characters as below but this won't work. I suppose there should be some sort of encoding to be done. Can you please help mo on this?</p>
<pre><code>public static void main(String[] args)
{
String myString = "奥妙洗衣粉";
System.out.println(myString);
// Output in eclipse: S... | java | [1] |
2,338,721 | 2,338,722 | jQuery animation order without callbacks | <p>I am trying to write a program to illustrate a programmatic solution of <a href="http://en.wikipedia.org/wiki/Towers_of_hanoi" rel="nofollow">"Towers of Hanoi"</a> puzzle, where the disks are represented by absolutely-positioned div-s of different size. To make a move I have a function like this:</p>
<pre><code>fun... | jquery | [5] |
1,036,734 | 1,036,735 | example how to do multiple inherit? | <p>Can somebody give me a example: How do i multiple inherit int, float from first class and char, string from second class into the third class ?</p>
| c++ | [6] |
400,218 | 400,219 | Apache ambari componets? | <p>I just started into hadooop. I am using apche ambari for managing my cluster. I want to know the programming languages and tools (Java) used for ambari ?</p>
| java | [1] |
715,838 | 715,839 | Issue to determine a currently downloading file size? | <p>I have an interesting problem. I need to do a progress bar from an asycronusly php file downloading. I thought the best way to do it is before the download starts the script is making a txt file which is including the file name and the original file size as well. </p>
<p>Now we have an ajax function which calling a... | php | [2] |
3,831,138 | 3,831,139 | URL connection test - compilation error | <p>I am new to Java, have searched on the net and this forum but unable to figure out why my code is not compiling? Any help will be highly appreciated.</p>
<pre><code>//filename is TestHTTPConnection.java
class TestHTTPConnection {
public static void main (String[] args){
String strUrl = "http://abc.com";
... | java | [1] |
4,199,625 | 4,199,626 | Faster / better way how to do multiple remote content fetching | <p>I need to write a lib, which does many remote HTTP calls to fetch a content. I could do it as described <a href="http://download.oracle.com/javase/tutorial/networking/urls/readingURL.html" rel="nofollow">here</a>, but is there a better way (in sense of performance) how to do it? If I do it as described in example I ... | java | [1] |
3,063,702 | 3,063,703 | Get current visible activity to user | <p>I want to get the foreground activity running. And I am able to get this information by using activity manager by using following code.</p>
<pre><code>activityManager = (ActivityManager) FWCommon.getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE);
runningTaskInfoList = activityManager.getRunningTask... | android | [4] |
5,722,981 | 5,722,982 | Delete x-line paragraphs from text file with Python | <p>I have a long text file with paragraph with 6 and 7 lines each. I need to take all seven line paragraphs and write them to a file and take six line paragraphs and write them to a file.
Or delete 6-line (7-line) paragraphs.
Each paragraph is separated with blank line (or two blank lines).
Text file example:</p>
<p... | python | [7] |
652,082 | 652,083 | How can I assign a list in a tuple in a dictionary? | <p>I'm new to python and experimenting a bit but having trouble making a list into a tuple to use as a dictionary key. Here's an example, which should make it more clear:</p>
<pre><code>dict_of_lists_values = {}
dict_of_lists_values[('dog', 'cat')] = 10
dict_of_lists_values[('dog1', 'cat1')] = 10
dict_of_lists_values... | python | [7] |
4,201,424 | 4,201,425 | php mysql update if else returns true always | <p>I have tried every example I could find to make this work correctly with no success. Seems easy enough, all i want is an error if the <code>$number</code> is not a value in the Tracking row.</p>
<pre><code><?php
mysql_connect("localhost", "user", "pass") or die("Connection Failed");
mysql_select_db("mydb") or di... | php | [2] |
3,827,990 | 3,827,991 | What is an Interface? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1321122/what-is-an-interface-in-java">What is an interface in Java?</a> </p>
</blockquote>
<p>Im confused by this term. I search google and this is what I found. <br><br>
An interface is the place where two diff... | java | [1] |
5,366,608 | 5,366,609 | loop array and some indices have other array | <p>How can I loop this type of array where only attribute name has another array? Thanks</p>
<pre><code>
array(
'0' => array(
'id' => 1,
'name' => array(
'firstname' => 'pat',
'last' => 'lozan'
)
),
'1' => array(
... | php | [2] |
2,385,309 | 2,385,310 | how to implement color picker in java swing | <p>i have used JColorChooser but look and feel is not that much great, any other way to implement color picker using java swing</p>
| java | [1] |
5,216,771 | 5,216,772 | PHP Multiply String Values from service | <p>I'm trying to multiply a value (sales tax) that is being returned from a service. I'm able to 'add' it without any problems, but I'm not able to get it to multiply using my string: </p>
<pre><code>floatval(($service->PRICE)+floatval($service->SALES_TAX)+floatval($service->TRAVEL))
</code></pre>
<p>I've tr... | php | [2] |
5,162,923 | 5,162,924 | How to emphasis a row in listview? | <p>I have a listview with many values. I want my first row to be highlighted always. i.e. It should have an orange color border. How can I implement it? Please reply.</p>
| android | [4] |
4,505,301 | 4,505,302 | C# - What's the difference between these two ways of instancing a class property? | <p>Basic C# question here.</p>
<p>What is the difference between creating an instance of a class property / field either as you declare it or in the constructor of the object in question. For example:</p>
<pre><code>public class MyClass
{
public MyObject = new MyObject();
}
</code></pre>
<p>vs</p>
<pre><code>pu... | c# | [0] |
1,421,357 | 1,421,358 | Create modal form dialog in function | <p>My app works with many modal form dialogs, i want to create modal form dialog by call a function, but i get error when i click OK button on dialog "i.apply is not a function". My code below</p>
<p>html: </p>
<pre><code><div id="dlg_srch_acnt">
<table cellpadding="0" cellspacing="0" border="0" clas... | jquery | [5] |
1,991,478 | 1,991,479 | Show text while loading images | <p>I'm making a website with a full background slider, so the images are kinda large. I want a script that shows some text with an animation effect while the background images are loading. I already searched for this, but no success. Can someone help me further?</p>
<p>Thanks!</p>
| jquery | [5] |
264,499 | 264,500 | can't compare datetime.datetime to int ; datetime to unix timestamp | <p>I am trying to write a basic program that iterates through files in a directory and checks for files modified in last xxxxxx. Unfortunatley datetime does not allow me to iterate to an int. </p>
<pre><code>file_list_attr = sftp.listdir_attr('/Path')
for f in file_list_attr:
print "name=%s, modified date=%s, si... | python | [7] |
1,867,149 | 1,867,150 | How to make RadGrid Lighter? | <p>My page contains a tabcontainer with 5 tabs. Each tab contains multiple RadGrids As RadGrid is heavier than ASP.NET gridview. My page lags i.e runs very slowly. My UI is very slow i.e switching between the tabs sometimes hangs the browser. I want to make the Telerik RadGrid lighter in order to make the browser handl... | asp.net | [9] |
1,850,528 | 1,850,529 | How to know a Bitmap size from InputStream before creating the Bitmap? | <p>I need to scale an image before creating it and I want to do it only if it exceeds 1024KB (for example).</p>
<p>By doing the following I can scale the image but I only need to scale the ones that are bigger than the given size.</p>
<pre><code>Bitmap bmImg = null;
InputStream is = url.openStream();
BitmapFactory.Op... | android | [4] |
5,882,215 | 5,882,216 | Cursor position, jquery | <p>From <a href="http://stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area">this post</a> I found and answer on how to position the cursor in a textarea. </p>
<p>I am creating a jquery chat and I wanted to create a simple html textarea, having a div infront of the textarea displying the html co... | jquery | [5] |
3,886,548 | 3,886,549 | Javascript packing problem | <p>I have a minified/packed javascript file which is causing problems. The issue is that the non-packed input file has some missing semicolons <em>somewhere</em> which aren't a problem when there's line breaks, but when the file is packed, the line breaks are removed and that causes a parser error. For example:</p>
<p... | javascript | [3] |
4,963,340 | 4,963,341 | add new member to copy c-tor/copy o-tor/serialization reminder | <p>Almost all c++ projects have classes with copy c-tor/copy operator/serialize method etc. Which usualy doing something with all members.</p>
<p>But sometimes developers forgets to add new member to this functions.<br />
Do you know any easy, not wrapp all members way which will remind developers to do something or w... | c++ | [6] |
1,520,897 | 1,520,898 | Rename wp8 project in vs2012 | <p>i have created a wp8 project using visual studio 2012 . Now i want to change my project name. I tried it using solution explorer but after renaming it the projects is deployed but does not run in the emulator.</p>
| c# | [0] |
12,752 | 12,753 | JS getElementsByTagName excep the one with a speciffic class | <p>I have this variable:</p>
<pre><code>var _inputs = document.getElementsByTagName('input');
</code></pre>
<p>But I want to make a new variable that will select all inputs, except the inputs that have a specific class like ".nothis".</p>
<pre><code>var _newinputs = document.getElementsByTagName('input') && ... | javascript | [3] |
511,379 | 511,380 | How can we make application which can run on both iphone and ipad | <p>i need your help i want to know that how can we make application which can run on both iphone and ipad.</p>
| iphone | [8] |
4,976,153 | 4,976,154 | insert item in javascript array and sort | <p>Let's say I have an array</p>
<pre><code>var test = new Array()
</code></pre>
<p>the values in test are 3,6,9,11,20</p>
<p>if I then have a variable</p>
<pre><code>var id = 5
</code></pre>
<p>how can I insert 5 between 3 and 6 in the array?
or do I just insert it wherever and then sort the array?</p>
<p>Thanks... | javascript | [3] |
340,926 | 340,927 | Updating two databases at the same time | <p>I have an SQL Server instance where I have two databases attached. One is a MS SQL database and the other is a linked server(ODBC) which is an indexed file system (Vision). Let's say the Customer table exists in both db's and should be kept identical. I will populate fields in my application from the linked server, ... | c# | [0] |
4,215,501 | 4,215,502 | How to create Singleton with async method? | <p>I want to have an singleton, say <code>Printer</code>, with one method, say <code>bool addToPrintQueue(Document document)</code>. <code>addToPrintQueue</code> should be async (should return immediately), return <code>true</code> if added to queue and <code>false</code> if document already in <code>queue</code>. How ... | c# | [0] |
4,747,643 | 4,747,644 | JS syntax to bind 2 objects to the same function calls | <p>*update: sorry for the vagueness. I have updated the question</p>
<p>I am using the pusher library, where i create channels and bind it to a function (http://pusherapp.com/docs/quickstart)</p>
<pre><code>var myChannel = pusher.subscribe('MY_CHANNEL');
myChannel.bind('thing-create', function(thing) {
//executes... | javascript | [3] |
1,692,963 | 1,692,964 | Problem in Listview Custom adapter class | <p>I am explaining my issue straightaway. Please refer the following code snippet.</p>
<pre><code>@Override
public View getView(int index, View convertView, ViewGroup parent) {
Comments comment = comments.get(index);
if (convertView == null) {
LayoutInflater inflator = (LayoutInflater) context
... | android | [4] |
3,021,863 | 3,021,864 | Get setInterval to perform an action a certain amount of times based on array | <p>I am trying to iterate through values in an array, via a setInterval(), every 10ms.</p>
<p>However because the computer cannot process the iterations that fast, my clearInterval() is in fact clearing the interval before the array has been fully iterated through.</p>
<p>The below is just an example of what I am doi... | javascript | [3] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.