tips 在遍历时就max,min比较结果 返回的结果不计入空间花费 python str.isdigit() 正面不好解决时,从反面……
用途: First():用于检索第一条记录 Find():用于检索多条记录 查询结果没有记……
用wsl2快3年了,最近磁盘不足,一看wsl2占用 好家伙,占用这么多 谷歌一下,试了几……
源码基于go1.13.15 上一篇分析了golang的defer & panic & recover机……
源码基于go1.13.15 defer 注册defer函数 1type _defer struct { 2 siz int32 // 参数占用空间 3 started bool // 是……
我们都知道slice是引用类型,而golang的赋值和方法传参都是以传值的方式操作的……
通过结构体查询map 指针类型结构体 1type chunkType struct { 2 isUseOrderBy bool 3 isRoomBreak bool 4 a int 5} 6 7func pointerKey() { 8 m := make(map[*chunkType]int) 9 key :=……
字段升序,同时null值在非null值后面 如果只是根据字段升序 1select id,null_field from activity order by null_field; 2 3+----+------------+ 4| id……
无向图 bfs 1from collections import deque 2 3def isCycle(n, d): 4 def bfs(start, visited): 5 q = deque([(start, None)]) 6 while len(q) > 0: 7 cur, parent = q.popleft() 8 if cur in visited: 9 return True 10 visited.add(cur) 11……
sequenceDiagram participant kafka participant delayService participant timewheel participant mysql kafka->>delayService: consume from delay topic(30min) delayService->>mysql: record delay msg(sendTime,delay,isSend) delayService-->>kafka: ack delayService-)timewheel: add to timewheel alt sendTime+delay>=now timewheel->>kafka: send to real topic timewheel->>mysql: update msg status else timewheel->>timewheel: next time cell end 根……