|
How many distinct numbers are from 1.5 x 10 -45 to 3.4 x 10 38 (IEE754 single precision floats)?
Answer Snippets (Read the full thread at stackoverflow):
And also you mean between 3.4*10^38 and 1.5*10^45 because 1.5*10^45....
Bc says (for whole integers):
1.5*10^45 15 .0 3.4*10^38 34 .0 15 .0-34 .0 14 66 .0
I think you mean integer numbers.
This isn't really programming.
|
|
May i know are(a += 10 and a = a + 10) these both the same or is there any difference or purpose is there. i got this doubt while studying about assignments in java.
Answer Snippets (Read the full thread at stackoverflow):
) { int a = 0; a = a + 10; a += 20; } } dan$ javap -c Test Compiled from "Test.java" public class Test: istore_1 2: iload_1 3: bipush 10 5: iadd 6: istore_1 7: iinc 1, 20 10: return }
So the short answer if we have
a += a ?
Then the....
|
|
Is there a clean way to format a DateTime value as "Oct. 10, 2008 10:43am CST".
I need it with the proper abbreviations and the "am" (or "pm") in lower case etc etc.
I've done it myself but it's ugly so I'm looking for a different take on it.
Thanks.
Answer Snippets (Read the full thread at stackoverflow):
If you want more combinations....
Dd, yyyy hh:mmtt");
not sure about CST.
Dd, YYYY HH:MM tt ") .Replace(" AM ", "am") .Replace(" PM ", "pm") + " CST";
DateTimeObject.ToString("MMM .
Assuming your server is configured to CST:
string format = dateTime.ToString("mmm .
|
Ask your Facebook Friends
|
Java 6 API primitive type wrappers have pairs of static methods decode(String s) and valueOf(String s) . Both of them return a new object of wrapper class type and none of them are annotated as deprecated. Does someone know the difference between them...
Started by Nulldevice on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Your example valueOf("0x10") will fail.
Decode("0x10") is equivalent to valueOf("10", 16).
|
|
If i have an array say -
int[] a = new int[10];
does the Java GC when doing its collection see that as 10 objects or a single object?
Update:
so according to the given answers, looking at it from a GC perspective isnt it more efficient that instead of...
Answer Snippets (Read the full thread at stackoverflow):
The array itself....
// 1 object int[] intArray = new int[10];
If you had an array of 10 Object s then there'd be 11 objects: the 10 objects plus the array.
Not an object type, so there are no objects created for the 10 int s.
|
|
In the spirit of the latest podcast where Joel mentioned he'd like some simple questions with possibly interesting answers ...
In the environments we have to programme in today we can't rely on the order of execution of our langauage statements. Is that...
Started by Bedwyr Humphreys on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
GOTO 10 may decide to jump to some other know (especially after your hint) that it depends on what's on lines 10 and 20, and anyone who's been rely on the code doing exactly what....
Is going to behave as if you'd followed the language rules .
|
|
What is the difference between nchar and varchar in MSSQL? What does nvarchar mean?
Cheers!
Started by MrDatabase on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
Typically, you would use the former if all data values are... .
Nvarchar(10) is a variable-length Unicode string with a maximum length of 10.
Nchar(10) is a fixed-length Unicode string of length 10.
Is a duplicate of this one.
|
|
Here's the scenario.
I have one hundred car objects. Each car has a property for speed, and a property for price. I want to arrange images of the cars in a grid so that the fastest and most expensive car is at the top right, and the slowest and cheapest...
Started by CentralScrutinizer on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
Example: c1(20,1000) c2(30,5000) c3(20, 500) c4(10 and repeat the above process
c4(10, 3000)
c3(20, 500)
c1(20, 1000)
c2(30, 5000)
c5(35, 1000)
If you post outputting items, and when you get ....
In the ascending/descending order as needed.
|
|
(10^6)(10^0)/(10^2) equals? read details to see how problem really looks.? (10^6)(10^0)
Started by i love kaylee on
, 2 posts
by 2 people.
Answer Snippets (Read the full thread at yahoo):
10 ^ 0 = 1
so now,
10 ^ 6 /10 ^ 2 =(10^4) because two powers get cancelled and 4 powers remain.
|
|
Quick question: for the 10/$10 sales, do we have to buy 10 for that price if it doesn't say "must buy 10?" thanks!
Started by bitter_melon on
, 4 posts
by 3 people.
Answer Snippets (Read the full thread at afullcup):
If it states "must buy 10", you have to buy all 10 to get the sale.
When it does not specifically state "must buy 10", you can typically buy 1 for $1 or 10 for $10 or any number in between at $1 each.
|