|
Sander Rossel wrote: Kids are curious by nature, until they go to school. Curiousity isn't rewarded in school; obedience is.
That makes a degree a somewhat different story. Good dog. Sit. Stay.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
This looks an awful lot like "Daddy didn't want to pay taxes, so, because the idea was based on a question from his seven-year-old daughter (presumably after he refused to buy her a lollipop because they're bad for her teeth), he decided to do everything in her name."
Never ascribe to genius what can be explained by greed.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
How Should Schools Grade Unexpected-But-Correct Answers On Coding Tests? - Slashdot[^]
I solved this back in the early 80's using Turbo Pascal. Back then, the solution wasn't "unexpected", because we didn't have convenient framework methods available to us that actually did the math. Here's my approach, converted to C# from that ancient Pascal code (yes, I still have source code from the 80's on my box).
static int CountLeapYears2(int minYear, int maxYear)
{
int years = (maxYear - minYear);
int periods = (int)(years * 0.03);
int count = (int)((years - (years * 0.03)) * 0.25);
return count;
}
It should be noted that iterating from the minimum DateTime value to the maximum DateTime value with the C# DateTime.IsLeapYear() takes a measurable amount of time (for me, it was 0.0068359 seconds), while my almost 40-year old method did not produce a measurable duration at all. In the ineterst of completeness, here's my iterative method:
static int CountLeapYears1(int minYear, int maxYear)
{
int count = 0;
for (int i = minYear; i <= maxYear; i++)
{
if (DateTime.IsLeapYear(i))
{
count++;
}
}
return count;
}
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
wrong forum? It looks more a like a start point for a debate in the lounge
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Well, it was a tech article, and I simply commented that I'd done the "unexpected" almost 40 years ago...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
#realJSOP wrote: Well, it was a tech article, It looks more like a reddit thread
It doesn't matter... I just pointed it out, just in case you had a lapsus. But if it was on purpose... ok
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Are you sure you've got that conversion right? The methods return different values in quite a lot of cases.
const int MIN_YEAR = 1753;
const int MAX_YEAR = 2199;
for (int minYear = MIN_YEAR; minYear <= MAX_YEAR; minYear++)
for (int maxYear = minYear; maxYear <= MAX_YEAR; maxYear++)
{
int y1 = CountLeapYears1(minYear, maxYear);
int y2 = CountLeapYears2(minYear, maxYear);
if (y1 != y2) Console.WriteLine("({0}, {1}) :: {2} != {3}", minYear, maxYear, y1, y2);
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
"Tumblr and the End of the Eyeballs-Are-Everything Era" [^]Quote: The real scandal of Tumblr isn’t that it’s now worth a fraction of its former selling price. The scandal is that Tumblr was ever valued so highly at all. Having a very popular product and only the vaguest idea how to make money on it does not, it turns out, a world-changing business model make. fyi: I've never used Tumblr, or Twitter, or InstaGram, etc. I started using FaceBook a few months ago, for business reasons, and I find it obnoxious.
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
modified 18-Aug-19 7:43am.
|
|
|
|
|
Quote: I started using FaceBook a few months ago We forgive you, we all have our moments of weakness
|
|
|
|
|
Ditto on the Tumblr, Twitter and InstaGram, I have had FB longer but only because of family and Nam buddies. I find it annoying and even pushy at times like when you don't check it for a few days they hound you with "look what you missed" notifications.
I hope the $5 billion fine they got for privacy violations is just the tip of the iceberg.
Technician
1. A person that fixes stuff you can't.
2. One who does precision guesswork based on unreliable data provided by those of questionable knowledge.
JaxCoder.com
|
|
|
|
|
Mike Hankey wrote: I hope the $5 billion fine they got for privacy violations is just the tip of the iceberg.
Hopefully they (and others like them) get more of those, so it might make them re-think a bit on what and how they are doing
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
|
When Jupiter was still forming 4.5 billion years ago, something giant likely crashed into the planet and disrupted the process, according to a new study. “Two worlds collided, and they could never tear us apart”
|
|
|
|
|
If it comes from CNN, they probably made the story up, and are probably trying to find a way to blame Trump for the collision (because "collision" sounds a lot like "collusion").
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Given that this happened in the early days of the Solar system (over 4 billion years ago), I fail to see how even CNN can blame President Trump for this.
OTOH, your average low-information voter may not know that.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Daniel Pfeffer wrote: Given that this happened in the early days of the Solar system (over 4 billion years ago), I fail to see how even CNN can blame President Trump for this.
Well,they're blaming trump for stuff obama did a few years ago, so if it happened MILLIONS of years ago, it's not a big stretch to blame trump for that, too.
Daniel Pfeffer wrote: OTOH, your average low-information voter may not know that.
Werd.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Trump is just Satan in disguise (he still has some of that red-ish color), and Satan has been around for a very long time.
So yes, Trump's "Make Jupiter great again" campaign failed miserably and now he's giving the US of A the same treatment
|
|
|
|
|
Sander Rossel wrote: Trump is just Satan in disguise
That's not nearly nasty enough for a true Leftist. How about "Satan is Trump in disguise?"
</sarc>
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
I'll do you one nastier, Trump's mother was a hamster and his father smelled like elderberries!
Alright, that went to far and I'd like to apologize
|
|
|
|
|
You forgot this is the insider news and not the soapbox
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Sander Rossel wrote: that went to far and I'd like to apologize I'm sure that the hamsters and elderberries are willing to accept such a gracious apology.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
#realJSOP wrote: Well,they're blaming trump for stuff obama did a few years ago,
oddly, you don't seem upset at all the stuff Obama did that Trump takes credit for.
|
|
|
|
|
Guys, this is not the soapbox, keep it clean
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Well, that's one theory.
Another would be destructive weather (a several-times-the-size-of-the-Earth force 9,999,999 hurricane that's purportedly been going for over a million years could do that).
Yet another would be that the boundary between solids and fluids does not have to be a millimetre thick, at such pressures.
Another could be something to do with the viciously caustic, acidic substances that make up so much of the planet.
But no, let's go with the click-baitiest one.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Geeky license plate earns hacker $12,000 in parking tickets | Ars Technica[^]
Quote: Then, once a particular database of outstanding tickets had associated the license plate NULL with his address, it sent him every other ticket that lacked a real plate. The total came to $12,049 worth of tickets.
Quote: the private company that administers the database didn't fix the issue and new NULL tickets are still showing up.
|
|
|
|