11 2021 档案

linux 查看虚拟机网卡命令
摘要:1.命令 ip addr 2.下图红线处就是网卡 阅读全文

posted @ 2021-11-17 09:32 running-fly 阅读(1269) 评论(0) 推荐(0) 编辑

go 格式化秒
摘要:package main import ( "fmt" ) func SecondFormat(diffSec int) (timeStr string) { if diffSec <= 60 { //多少秒 timeStr = fmt.Sprintf("%d秒", diffSec) } else 阅读全文

posted @ 2021-11-16 09:57 running-fly 阅读(39) 评论(0) 推荐(0) 编辑

es 修改 mapping 字段类型
摘要:一、原索引 PUT my_index { "mappings": { "_doc": { "properties": { "create_date": { "type": "date", "format": "yyyy-MM-dd ||yyyy/MM/dd" } } } } } 二、创建新索引 PU 阅读全文

posted @ 2021-11-15 09:40 running-fly 阅读(389) 评论(0) 推荐(0) 编辑

go context上下文取消
摘要:package main import ( "context" "fmt" "sync" "errors" "time" ) func Rpc(ctx context.Context, url string, isSuccess bool) error { result := make(chan i 阅读全文

posted @ 2021-11-12 18:20 running-fly 阅读(86) 评论(0) 推荐(0) 编辑

go reflect
摘要:1.reflect.ValueOf package main import ( "fmt" "reflect" ) type user struct { name string `昵称` sex byte `性别` } func main() { u := user{"Tom", 1} v := r 阅读全文

posted @ 2021-11-11 18:27 running-fly 阅读(33) 评论(0) 推荐(0) 编辑

time.ticker
摘要:1.Ticker是一个周期触发定时的计时器,它会按照一个时间间隔往channel发送系统当前时间,而channel的接收者可以以固定的时间间隔从channel中读取时间 package main import ( "fmt" "time" ) func main() { //创建一个周期性的定时器, 阅读全文

posted @ 2021-11-11 11:44 running-fly 阅读(121) 评论(0) 推荐(0) 编辑

mysql 聚簇索引和非聚簇索引
摘要:https://blog.csdn.net/jh993627471/article/details/79375734 阅读全文

posted @ 2021-11-11 11:09 running-fly 阅读(29) 评论(0) 推荐(0) 编辑

mysql 联合索引最左前缀匹配原则
摘要:https://zhuanlan.zhihu.com/p/142852474?utm_source=wechat_session&utm_medium=social&s_r=0 阅读全文

posted @ 2021-11-11 11:07 running-fly 阅读(34) 评论(0) 推荐(0) 编辑

go runtime包
摘要:Gosched:让当前协程让出cpu以让其他协程运行,它不会挂起当前协程,因此当前协程未来会继续执行 NumCPU:返回当前系统的CPU核数量 GOMAXPROCS:设置最大的可同时使用的CPU核数 Goexit:退出当前goroutine(但是defer语句会照常执行) NumGoroutine: 阅读全文

posted @ 2021-11-10 20:56 running-fly 阅读(72) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示