• python中的一个引用的坑?

    In [120]: l=[set()] * 10
    
    In [121]: l[0] is l[1]
    Out[121]: True
    
    In [122]: l[0].add(1)
    
    In [123]: l
    Out[123]: [{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}]
    
  • 来来

    来来来一起拍张情侣鞋照片~

  • 中秋

    觉得和父母同时看晚会就有种在一起的感觉, 很想吃个月饼, 就有种在一起吃的感觉.

  • 携程的技术人员最多是蠢一些. 但行政人员是坏.

  • 如果不是遇到你

    如果不是遇到你, 我将漂荡在哪里

  • 情侣衫

    嘻嘻, 这么说, 我也快有情侣衫了~? 虽然穿不出去…

  • 做饭

    嘿嘿, 做了第一顿饭, 希望能继续~~

  • golang里面map线程不安全

    RT. 多线程对map操作时, 会Panic.

  • 甜的, 不要酸的

    祝福每一对人都有铠甲, 没有软肋~

  • GOGC

    The GOGC variable sets the initial garbage collection target percentage. A collection is triggered when the ratio of freshly allocated data to live data remaining after the previous collection reaches this percentage. The default is GOGC=100. Setting GOGC=off disables the garbage collector entirely.

    默认100, 举例说, 上次GC之后还占用 100M 内存, 那么再次申请新内存到100M的时候, 会触发GC.

    设置成50的话, 就是说, 上次GC之后还占用 100M 内存, 那么再次申请新内存到50M的时候, 会触发GC.