I am curious about the performance of log string concatenation vs interpolation, today I did some test.
codetest code:
1234567891011121314151617181920212223242526272829303132333435...
big endian, little endian and network byte orderBig-endian and little-endian are two byte order formats that define the order of bytes in a multi-byte data type, such as a word, do...
multiple solutions for a sql problemproblem descriptionproblem
sol 1, using variable and subquery to calculate123456789101112131415# Write your MySQL query statement belowSELECT g...
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask...
descriptionproblem description
analysisthis is a mono stack issue.check the pic below :
for each number, we try to expand both left and right until we hit numbers on both end whic...
I frequently saw connection has TIME_WAIT status, for ex:
12345????netstat -ant|awk '/^tcp/ {++S[$NF]} END {for(a in S) print (a,S[a])}'LISTEN 35CLOSE...
there are 3 pits when we use channel.
deadlock
panic
oom
deadlock12345678910// 只有生产者,没有消费者func f1() { ch := make(chan int) ch <- 1}func main() { f1()}
we w...
keyword iota is used on const enum, it defines the auto-incremental counter starting from 0for ex
123456789const ( Sunday = iota // starting from 0 Monday // 1 Tuesday...