HackerTrans
TopNewTrendsCommentsPastAskShowJobs

darkfirefly

no profile record

comments

darkfirefly
·il y a 4 ans·discuss
I often experience very slow time to fix with cell service off (& having location off beforehand) - I believe this is due to Assisted GNSS/GPS which significantly improves the time for GPS to start working (the associated Wikipedia article states that ~1 minute often without it, and worst case ~12.5 minutes)
darkfirefly
·il y a 4 ans·discuss
Python's default arguments are evaluated and stored once. This can cause issues, for example the naive "default to []" program:

    >>> def function(b, a=[]):
    ...     a.append(b)
    ...     print(a)
    ... 
    ...     
    >>> function(1)
    [1]
    >>> function(2)
    [1, 2]
    >>> function(3, [4])
    [4, 3]
    >>> function(5)
    [1, 2, 5]
A correct implementation would be:

    >>> def function2(b, a=None):
    ...     if a is None: a = []
    ...     a.append(b)
    ...     print(a)
darkfirefly
·il y a 4 ans·discuss
Maybe uh... not like Wikipedia does https://en.wikipedia.org/wiki/WP:CANCER
darkfirefly
·il y a 5 ans·discuss
Would helmets in cars make them safer though? It's a different risk profile; I don't think you tend to fall out of your cars and hit your head?

I can't find any stats of prevalence of various types of injuries in cars, although it does seem to be a thing to get brain injuries in cars (whether that is due to impact or neck/head stopping I don't know)
darkfirefly
·il y a 5 ans·discuss
Yeah, I'm not quite sure how other countries do it, but for the 2000 Olympics (Sydney) they basically renewed this giant landfill site. There's been a bunch of apartments, etc, built around there since then because it basically became a suburb where you could live.