When I do the following in Java:
System.out.println(2.2-2.0);
It unexpectedly prints the following:
0.20000000000000018
What is this and how can I avoid this?
Hello. I am a korean student, and I'm trying to develop a iphone application.
I want to make the application which will shows contents of Web board, which is belong to some website. I will use 'UITableViewController", and the names of contents have to be displayed on table view.
I heard that if I want to scrap the text on webpage, I have to use…
We're using URL routing based on Phil Haack's example, with config modifications based on MSDN Library article #CC668202, to provide "shareable" links for a ASP.NET forms site, and have run into a strange issue: For users attempting to open links from PowerPoint presentations, and who have IE set as their default browser, using one of these links…
I have a TabHost and several tabs added to it.
Problem: The activities on these tabs are not created until the tab is pressed.
My tabhost is broadcasting intents but my broadcast receivers are not registered until onCreate in my tab activities is called. Is there any way to force activity creation?
Maybe my tabhost can call setCurrentTab…
Hi all,
I have a sql server 2005 database that I want to setup replication for. The problem is that the database has two schemas both of which have a table with the same name in it.
For some reason even though the tables are in different schemas the replication creation fails when done through management studio due to conflicting article…
I'm building a system where the progress of calling threads is dependent on the state of two variables. One variable is updated sporadically by an external source (separate from the client threads) and multiple client threads block on a condition of both variables. The system is something like this
TypeB waitForB() { // Can be called by…
I have a C function with the following signature:
int my_function(int n, struct player **players)
players is a pointer to an array of pointers to struct player objects. n is the number of pointers in the array. The function does not modify the array nor the contents of the structures, and it does not retain any pointers after…
Hey Everyone,
I've been trying to code this page for a while, but my biggest problem is that I can't seem to get the photos perfectly positioned. For some reason, there is a small bottom padding in each <td>which is messing things up.
Here is the table code:
<table>
<tr>
<td rowspan="2"…
It's hard to see how StringTemplate integrates easily (or not) with popular Java web MVC frameworks.
Which Java MVC frameworks integrate easily with StringTemplate?
A good answer:
mentions one solution to integrate with a framework,
includes a link to something useful and applicable, like:
a tutorial,
or documentation,…
The following is a part of an upload class in a c# script. I'm a php programmer, I've never messed with c# much but I'm trying to learn. This upload script will not handle anything except images, I need to adapt this class to handle other types of media also, or rewrite it all together. If I'm correct, I realize that
…
Is there a technical reason why IOS requires the device's domain-name to be set (via ip domain-name) before an SSH key can be generated? Is the domain-name used in any way in the generation of the key?
Is there any way to force the generation of a key before the domain name is set?
UPDATE: Myself (before I posted…
When doing a search in active record I'm looking for record's that do not have an archived bit set to true.
Some of the archived bits are null (which are not archived) others have archived set to false.
Obviously,
Project.all(:conditions => {:archived => false})
misses the projects with…
I've been looking around for this for a long time but can never seem to find it in the Android documentation. There's all sorts of advanced things I see, but I can never find any solid documentation - there's the shapes package, but it provides no insight on how to use them in xml. The best I can do so far is…
I've got a common task that I do with some Activities - downloading data then displaying it. I've got the downloading part down pat; it is, of course, a little tricky due to the possibility of the user changing the orientation or cancelling the Activity before the download is complete, but the code is there. …
I'll try to be more descriptive here.
A Few Q's:
using:
var foo = new Foo() { Bar = new Bar() { Value = "Value" } };
var value = DataBinder.Eval(foo, "Bar.Value");
Or: This one
It is possible to retrieve an internal nested property using property path syntax. Is there a way to set/trigger a nested…
I have one workbook with several sheets. I populate the listboxes (pulling static data from cells) on the 2nd sheet, click a button and it runs fine.
When I populate the listboxes with a named range, the listbox populates the way I want, but I get an error because the code thinks that I didn't select…
How do you calculate the number of input boxes with no value in a table row using jquery?
example:
<table id="table1">
<tr class="data" id="row5">
<td><input type="text" value="20%" /></td>
<td><input type="text" value="10%" /></td>
<td><input…
I have a file descriptor that is open for reading which may be non-blocking. What I need to do is simply read all data until reaching EOF and write that data to a writable file descriptor. As the process that performs this copying is not "aware" of anything that is going on around it, I don't think…
I have created some JavaScript files and they run well from my Mac OS X Server. Now I have put the same JavaScript files on my MS Server 2003. But they don't work.
Do I have to install something on the server in order to get them work?
EDIT: (Sorry, I'm new and English is not my native language,…
Hi,
I'v created a C header file (It's compiled), now when i compile my program it comes up with tons of errors like:
warning: null character(s) ignored
error: stray ‘\23’ in program
TheFunctions.h:1722: error: stray ‘\200’ in program
Inside the header file is simply two functions, which work in…
I need to pull 3 values from a table and assign each one to a variable
each value is based on to columns, a type and an id
$ht_live_query = mysql_query("SELECT htcode FROM coupon WHERE pid='$pid' AND type='L'");
$ht_live_result = mysql_fetch_array($ht_live_query);…
I'm in this project:
A web page that's gonna be used by the front-end company people to query and update data from a SQL DB.
I'm working with visual studio and the code behind (C#) is almost done, so the interactions between SQL and C# and ok.
My original idea was…