long time; // no see long time; // no see $ PONG=1.1.1.1; ping $PONG
$ more cowbell
$ cat dog | tee hee
And my favourite choice of empty file: $ touch me
Also I was fairly please years ago when I briefly re-aliased cd to something that could do "the right thing" (TM): $ cd ...
$ cd ..../src/
etc..`echo "Mongo only pawn in game of life"`
I am SO gonna steal that.
:-D
catch (Exception up)
{
throw up;
}
Truly genius code try
ToastTheGenius;
except
On Glass: Exception do
raise(Glass);
end; except Exception as the_roof:
raise the_roof int ofTheJedi;
I was a bit confused until I got at the bottom of that function and saw this: return ofTheJedi;
That's when I recognized a coworker's style, haha // http://photos3.meetupstatic.com/photos/event/4/b/c/2/600_436939394.jpeg
I don't know if anyone ever noticed this comment and followed the URL, but I hope they did and were amused. (The code was eventually refactored/rewritten, so the comment no longer exists in the codebase.) struct timecube {
uint16_t millisecond_of_minute;
uint16_t minute_of_month;
uint16_t month_and_year;
};For people that don't play with bits often: Unsigned 16-bit integers have their max as 65,536. Storing data often wastes most of the bits, since a field that goes from 0-1000 doesn't fit in an 8-bit integer, and C doesn't have native integers between 8 and 16 bits long. (You can mask out relevant fields, but that's annoying.)
So there are 1000 * 60 = 60,000 milliseconds in a minute, which is an impressively good use of the space available. There are also a max of 60 * 24 * 31 = 44,640 minutes in a month, which is pretty good usage of the second value as well. The final 16 bits are probably 4 bits for month and 12 bits for the year, going up to 4096. Alternatively it could be using it as something like month_of_common_era to get it out to year 65536/12 = 5461.
IIRC, month and year was a 4-bit and 12-bit bitfield just as you describe.
stop(); // hammer time return when.all(promises).yield(true);The main difference would be error handling: if you have a catch block that returns a different value, returning the promise directly would actually throw in the calling function, whereas if you "return await", it's going to get caught in your catch block, resolving the promise to your own custom value.
Found a detailed explanation here: https://jakearchibald.com/2017/await-vs-return-vs-return-awa...
class Action(Lawsuit): ...Mine:
const makeEmptyPromise = () => Promise.resolve([]);