DateDiff counts boundary crossings while DateAdd does straightforward arithmetic.
For example, the first query would count 12 boundaries between 00:59 and 12:01, and would thus exclude that difference, but the second query would count it as being within 12 hours. This makes the second query 'rig...
Now I understand my mistake.... which, FYI I copied from an SE Employee... so, I am trying to figure out whether there's a bug in the site-wide curator badges.
"There are known knowns" is a phrase from a response United States Secretary of Defense Donald Rumsfeld gave to a question at a U.S. Department of Defense (DoD) news briefing in February 2002 about the lack of evidence linking the government of Iraq with the supply of weapons of mass destruction to terrorist groups.
Rumsfeld stated:
Reports that say that something hasn't happened are always interesting to me, because as we know, there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there...
Braddock: "Winston, you are drunk, and what's more you are disgustingly drunk. " Churchill: "Bessie, my dear, you are ugly, and what's more, you are disgustingly ugly. But tomorrow I shall be sober and you will still be disgustingly ugly."
I'm never sure where the line between SO and code review (and programmers, and superuser...) is. If others agree I don't mind moving it. — Rick Teachey55 secs ago
The community challenge for this month says:
Everyone has played Battleship. Let's implement the logic that sinks one.
But that presumes that there's something to sink. We can't have the armada turn its guns on itself out of boredom.
So I figured I'd write something that could randomly pla...
Flambino is the Submarine CRitter (not a battleship) - he's a regular that answers regularly, with amazingly good answers, yet, noone sees him... he's always there, hiding under the surface... ready to torpedo any zombie
Not in chat, not in meta, yet he's there.... lurking, and sniping.
In preparation for the May 2015 Community Challenge, I decided to build a Battleship strategy tester.
Implementing an ocean
First, there is an underlying Ocean class that represents both the 10x10 grid that is the playing field. It has an internal representation for both the grid and for the...
BattleShip!
Resubmission from weekend-challenge #3; simple and fun :-)
Everyone has played Battleship. Let's implement the logic that sinks one.
Ship has multiple "hit points" located at contiguous (x,y) coordinates, horizontally or vertically.
Ship is sunken when all "hit points" ...
@SimonAndréForsberg There's kind of the incentive that I have to learn this language, so it's a good excuse for extra practice. Otherwise I'd have written it in Python
But there's no fun in writing stuff you already understand.
I've made a "heightmap" terrain generator similar to my previous one, except this one has some improvements, and some new features.
The way this one works is similar to my last one, but slightly different, so I'll run through it again.
First, a list of NoneTypes is generated with a set width a...
I just finished up a program which takes a byte[9][9] as input and recursively does a DFS to find any solutions (including multiple solutions). I'm pretty happy with it and it works pretty quickly as far as I can tell. I'm mainly looking for advice on the algorithm I used and its efficiency, as w...
Given the problem:
You are provided a list of N elements all initialized to 0, and a list of M operations. Where each m in M consists of 3 elements a, b, and k. For each m in M add k to all indices in the range [a, b]. At the end of all M operations add print out the max.
I have two impleme...