Yes, that's the philosophy around the declaration syntax.
The declaration of the pointer ip,
int *ip;
is intended as a mnemonic; it says that the expression *ip is an int. The syntax of the declaration for a variable mimics the syntax of expressions in which the variable might appear. This reasoning applies to function declarations as well.
An error condition. I decided to do away with it and take a small hit on the error by assuming the chances of the trimmed set being equal to the threshold are very small and that the error condition is effectively doing nothing.
I also changed the logic from == to >= to trigger unfailingly, and pass in the "window"/threshold to allow my code to work without internal awareness of the length of the iterable:
from random import random
def estimate_uniques(iterable, window_size=100):
p = 1
seen = set()
for i in iterable:
if i not in seen:
seen.add(i)
if random() > p:
seen.remove(i)
if len(seen) >= window_size:
seen = {s for s in seen if random() < 0.5}
p /= 2
return int(len(seen) / p)
I also didn't like the possible "set thrashing" when an item is removed and re-added for high values of p, so I inverted the logic. This should work fine for any iterable.
My point is that there is a difference between a Python function's returning false and the function's raising an error, and sometimes the difference really matters, so it would be regrettable if logic teachers actually did use ⊥ to mean false because programming-language theorists use it to mean something whose only reasonable translation in the domain of practical programming is to raise an error.
Sewer are properly buried, Rogers cables are just thrown around with maybe a bit of dirt on top of it was a good day.
I redid a wall in my backyard last year that is close to a Rogers box, I removed ~15 old cut cables from the ground.
Man if there's one thing I can credit bell for, is that they really pushed for fiber. Before we had bell fibe here (for a shockingly reasonable price) in Montreal, we were stuck with absolute trash DOCSIS for so long. Every time the revisions increased ,the speeds would be nominally faster but in reality came with trash stability and peak time performance.
I'm sure DOCSIS is great for what it is, and in fact it's extremely impressive what it can do with existing cable lines, but the second biggest player here (Videotron) basically milked it dry. Again it's weird to praise them but Bell invested in wiring up the entire city and suburbs and I can get 3gbps symmetrical GPON FTTH for the price that 150mbps used to go for not even 3 years ago. I blame DOCSIS in a way because it made players with existing lines extremely complacent
Well, camera placement matters in the obvious way: it has to be on the finish "line". Where "line" is really a plane extending vertically from the line drawn on the surface.
I vaguely remember an article about a bike race photo finish that showed that this is not a given and reverse engineered where the camera was pointing (based on background) and who the likely winner was.
But in the end, if I am not mistaken the UCI rules state that the photo finish line is the final arbiter, not the paint on the ground. I don't think this is a great injustice - it's a sport and the rules are arbitrary to a great extent (e.g. male riders 180 cm to 189.9 cm tall must use a smaller bike than those 190 cm and taller in time trials - which sucks for those 189.9 cm tall).
MicroG has a LineageOS distribution, they build for all the supported devices by upstream Lineage: https://lineage.microg.org/
That should cover at least the notification side. If I can't bank on a mostly open-source mobile OS than I would rather just not bank on mobile at all. Banking on stock ROM is not an option for me.
> BTW. Use the AddressSanitizer. Please! The toolchain improved the usage and safety of the language so much.
In general I agree with the sentiment, use AddressSanitizer in testing/debugging. However it's not meant to be a hardening option, AFAIK, so I advise against using it in production (along with other sanitizers), even if you can live with the performance hit.
Theoretically it is possible but libasan is not intended for linking or shipping in production. Also stuff like LeakSanitizer[1] actually cannot [1] be used with GDB.
While shipping debug symbols is something I recommend and has no side-effects aside from mere file-size (debug symbols are only loaded when used).
Sure. So my argument is that everything should use TAI, and local time zones should be an offset from TAI, not UTC (because local times are primarily for humans, and humans don't care about extremely slow time zone drift that leap seconds are designed to prevent). Then we can abolish UTC entirely since it serves no purpose.
The problem isn't really about handling local time. UTC is an offset from TAI and time zones are offsets from UTC, it's overall really just an offset from TAI. Coordinating the TAI-UTC offset is not any worse than coordinating time zone offsets.
The complications are around clocks, UNIX timestamp and NTP, where a steadily and monotonously increasing number would make the most sense, and that's not UTC.
The declaration of the pointer ip,
is intended as a mnemonic; it says that the expression *ip is an int. The syntax of the declaration for a variable mimics the syntax of expressions in which the variable might appear. This reasoning applies to function declarations as well.K&R C