• package main import "fmt" func main() { a := 2 b := 2 fmt.Println(add(a, b)) fmt.Println(sub(a, b)) fmt.Println(mul(a, b)) fmt.Println(div(a, b)) } func add(a, b int) int { if b == 0 { return a } tmp := 0 for b != 0 { tmp = (a & b) << 1 a = a ^ b b = tmp } return a } func addr(a, b int) int { if b == 0 { return a } tmp := (a
    mathematics Created Thu, 02 Aug 2018 00:26:55 +0800
  • 面试的时候,面试官问程序panic了该怎么办;那就recover呀;后来想了下是不是守护进程呀。 那panic之后一般log会随着后台log一起打印,这样就不方便
    panic Created Mon, 30 Jul 2018 22:11:59 +0800
Previous