• Python Lambda

    方法一:使用默认参数

    functions = []
    for i in range(10):
        functions.append(lambda x=i: print(x))
    
    for f in functions:
        f()
    

    方法二:使用闭包

    def create_printer(i):
        def inner():
            print(i)
        return inner
    
    functions = [create_printer(i) for i in range(10)]
    
    for f in functions:
        f()
    
  • weekend

    周六上午,带赛赛去上英语课,又交了下个学期的学费,有点贵,感觉需要换一个。。

    中午和赛赛一起玩了塞尔达,找了城堡里面的神庙。

    西瓜问我要不要打麻将,我说不打。然后她自己去约别人了。

    下午4点左右,我去滑板。滑了一会,西瓜电话说一起吃饭,德州。我就滑板去地铁店一起吃饭。德州最后一把才运气回本。有一把没打好,翻牌满池有人跟,转盘顶对博花All,对方跟。

    周日起来,带赛赛去陆家嘴中心和钱吃饭。赛赛在星巴克挑了一套杯子,他本来是洗了一个保温杯,快买单的时候,他又看到一套四件套杯子,要换这个,就换了。下次路过星巴克,再给他买一个保温杯吧。

    下午带他学了一会英语,RAZ A。

    晚上妈妈要带他做英语作业,叫了他几次,他都不理。妈妈发火,把他拽过去,问他为啥不回答。我把妈妈挡开,赛赛趴我这里哭了一会。然后我带他做了作业,很快就做完了,作业本身不难,应该说作业本身太简单了。还是需要额外的学习内容才行。赛赛现在还基本上只会单词。

  • Golang Time Parse

    case ‘.’, ‘,’: // ,000, or .000, or ,999, or .999 - repeated digits for fractional seconds.

    看 golang time lib 代码,000 前面需要有, 或者是. , 才是合法的

    2006-01-02 150405000 像这种是解析不出来的,不管你的 format 怎么配置。

  • 嗓子不疼了

    嗓子突然不疼了,开心。这几天的感冒算是好一个段落了。

  • Make Lazy Expand Var

    = is Recursively Expanded

    := is Immediately Expanded

    下面是 copolit 自动生成的。

    ?= is Conditionally Expanded

    += is Appending Variable

    != is not equal

    ^= is Finding and Removing the First Match

    %= is Finding and Removing the Last Match

    *= is Finding and Removing All Matches

    := is Simply Expanded

    ?= is Conditionally Expanded

    += is Appending Variable

    != is not equal

    ^= is Finding and Removing the First Match

    %= is Finding and Removing the Last Match

    *= is Finding and Removing All Matches

    := is Simply Expanded

    ?= is Conditionally Expanded

    += is Appending Variable

    != is not equal

    ^= is Finding and Removing the First Match

    %= is Finding and Removing the Last Match

    *= is Finding and Removing All Matches

    := is Simply Expanded

    ?= is Conditionally Expanded

    += is Appending Variable

    != is not equal

    ^= is Finding and Removing the First Match

    %= is Finding and Removing the Last Match

    *= is Finding and Removing All Matches

    := is Simply Expanded

    ?= is Conditionally Expanded

    += is Appending Variable

    != is not equal

    ^= is Finding and Removing the First Match

    %= is Finding and Removing the Last Match

    *= is Finding and Removing All Matches

    := is Simply Expanded

    ?= is Conditionally Expanded

    += is Appending Variable

    != is not equal

    ^= is Finding and Removing the First Match

    %= is Finding and Removing the Last Match

    *= is Finding and Removing All Matches

    := is Simply Expanded

    ?= is Conditionally Expanded

    += is Appending Variable

    != is not equal

    ^= is Finding and Removing the First Match

    %= is Finding and Removing the Last Match

    *= is Finding and Removing All Matches

    := is Simply Expanded

    ?= is Conditionally Expanded

    += is Appending Variable

    != is not equal

    ^= is Finding and Removing the First Match

    %= is Finding and Removing the Last Match

    *= is Finding and Removing All Matches

  • 平等

    我:赛赛,今天(塞尔达)玩了一天了,别玩了,先关机吧。

    赛赛:为啥你练风弹的时候,没人管你。但有人管我?

    我:。。。你也可以管我。以后我玩时间长了,你就给我说。

  • tenacity

    tenacity 看起来挺好用的。

  • 是非观

    觉得现在自己没能力分辨是非了,而且还不知道从何做起才能恢复一些辨别是非的能力。

  • Wait Pid

    $! is a special variable in bash that holds the process ID of the last background command.

    wait $! waits for the last background command to finish.

    sleep 5 &
    wait $!
    echo "Done"
    
  • 对话

    对方微信视频。

    赛赛要做一下作业了,明天要上学了。

    那你带他做一下吧。

    你为啥不带他做?

    你为啥不带他做?

    我没时间啊。

    我也没时间。

  • 1
  • 2