|
He also started a band called Subluminal. The members of the band were known as Tardyons.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
|
Water is heavier than butane because butane is a lighter fluid.
The less you need, the more you have.
Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?
JaxCoder.com
modified 14-Jul-21 10:29am.
|
|
|
|
|
Mike Hankey wrote: Water is heavier than water ...
Which means water is also lighter than water. It simultaneously weighs nothing and accounts for all mass in the universe.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Obviously a lack of coffee. Good eye.
The less you need, the more you have.
Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?
JaxCoder.com
|
|
|
|
|
Reminds me of this one: What is the difference between a hippo and a Zippo? The one is heavy and the other is a little lighter.
|
|
|
|
|
Which in turn, reminds me of this one:
What is a hippo? The hippopotamus, also called the hippo, common hippopotamus or river hippopotamus, is a large, mostly herbivorous, semiaquatic mammal and ungulate native to sub-Saharan Africa.
|
|
|
|
|
It's always a good time to use ungulate in a sentence.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Time for a holiday in Bhutan
|
|
|
|
|
... too quiet
10 hours without a "do my homework" request (or any other request) in QA?
Where is the real Codeproject, and what have you done with it?
[edit]
Question posting isn't working - I tried and failed.
Reported in S&B
[/edit]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Possibly because of this[^].
|
|
|
|
|
Maybe all the "do my homework" questions will now be posted elsewhere (look out SO, etc.).
|
|
|
|
|
Summer break?
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
|
|
|
|
|
OriginalGriff wrote: Question posting isn't working - I tried and failed.
Remember we cannot see your screen. Where did it fail and what were you doing? We are happy to help if you tell us what you have tried, and what error you are getting.
Sorry ... couldn't resist
|
|
|
|
|
I tried to tell you but it failed when I tried.
Can't you just fix it for me? plzzzzzzzzz ... I gotta hand it in tomorrow ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
("1".ToDec() * 100M).ToString() == "100"
("1.10".ToDec() * 100M).ToString() = "110.00"
And because PayPal wants integer amounts (hence the multiplier by 100), it bombs when it sees a string amount containing ".00".
Fix:
("1.10".ToDec() * 100M).ToString().LeftOf(".00");
Yes, copious use of extension methods, but really???
public static decimal ToDec(this string value, decimal defaultValue = 0)
{
decimal ret;
if (!decimal.TryParse(value, out ret))
{
ret = defaultValue;
}
return ret;
}
Why, after multiplying by 100M, would ToString() behave differently when the original value had "cents". It makes no "cents" to me!
I guess it's because the decimal type originally had a fractional component to it, and that somehow gets preserved when multiplying by 100, so the ToString() behavior changes.
|
|
|
|
|
You can remove decimal part if you divide the number by 1.000000000000000000000000000000000m
|
|
|
|
|
Mladen Janković wrote: You can remove decimal part if you divide the number by 1
Well, that's a different solution!
|
|
|
|
|
Marc Clifton wrote: Fix:
("1.10".ToDec() * 100M).ToString().LeftOf(".00"); Or preferably:
("1.10".ToDec() * 100M).ToString("###0");
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Ha! You beat me to it! "###0" is the best answer.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Richard Deeming wrote: Or preferably:
Yah yah. Good point.
|
|
|
|
|
I think it's because decimals are denormalized EVIL.
People keep telling me I need to embrace these emoticon things. There we go, its a happy post now.
Regards,
Rob Philpott.
|
|
|
|
|
For my Rational class, I used decimal.GetBits to access the exponent portion of the value -- and (I think) ensure that it is positive to force an "integer" value.
|
|
|
|
|
If Paypal wants integer you're surely skipping the step that would render the result consistent.
("1.10".ToDec() * 100M).ToInt();
Or is that just me?
|
|
|
|
|
I don't much care for waking up in the morning, but its made worse when you've spent the night on a mattress which dips in the middle and has given you backache overnight. I'm on my 3rd mattress in ten years now, and because I'm a superking kind of guy, these things aren't cheap. It goes the same way each time, a new mattress is wonderful and flat but after a few months it starts to dip in the middle. I am genetically quite a big bloke to start off with, and I like to supplement that with a copious helping of lard around the waist so I can't entirely blame the mattress, material science just can't keep up with me.
So I'm faced with yet another purchase. Perhaps it is time to splash the cash and go into multiple thousands on one of these things, but that will annoy me intensely if it goes the same way in six months. Mattress guarantees don't cover against the things getting flattened by large men it seems.
I can't be alone in this, does it sound familiar? And I know its a divisive topic, but springs or foam?
[Suspected this might be a repost, yes I asked a similar question in 2009, page 38,123]
Regards,
Rob Philpott.
|
|
|
|