上一页 1 2 3 4 5 6 7 8 ··· 35 下一页
摘要: const imgStrPrefix = "data:image/png;base64," func imgToStr(imgContent bytes.Buffer) string { return imgStrPrefix + base64.StdEncoding.EncodeToString( 阅读全文
posted @ 2020-10-28 15:53 zipon 阅读(348) 评论(0) 推荐(0) 编辑
摘要: curl localhost:8888/debug/pprof/heap >heap.base sleep 60s curl localhost:8888/debug/pprof/heap >heap.current go tool pprof -http localhost:8889 -base 阅读全文
posted @ 2020-10-26 16:14 zipon 阅读(2846) 评论(0) 推荐(0) 编辑
摘要: type JsonTime time.Time func (j JsonTime) MarshalJSON() ([]byte, error) { //时间为空默认格式 if time.Time(j).IsZero() { return []byte(`""`), nil } return []by 阅读全文
posted @ 2020-10-20 10:54 zipon 阅读(563) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-10-13 09:59 zipon 阅读(2) 评论(0) 推荐(0) 编辑
摘要: func show_strlen(s string) int { sl := 0 rs := []rune(s) for _, r := range rs { rint := int(r) if rint < 128 { sl++ } else { sl += 2 } } return sl } # 阅读全文
posted @ 2020-09-15 19:06 zipon 阅读(326) 评论(0) 推荐(0) 编辑
摘要: pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple 2.修改配置文件~/.pip/pip.conf 3.pip install locustio -i https://pypi.tuna.tsinghua. 阅读全文
posted @ 2020-08-11 16:34 zipon 阅读(581) 评论(0) 推荐(0) 编辑
摘要: 【转】https://www.cnblogs.com/swordfall/p/10841418.html 本文是基于windows 下 MongoDB 4.0编写,据了解MongoDB在3.0以后的版本中权限设置有变化。 1. 创建超级用户 安装完之后,打开命令行,进入mongodb安装目录,在bi 阅读全文
posted @ 2020-08-06 15:46 zipon 阅读(2257) 评论(0) 推荐(0) 编辑
摘要: 大概率跨系统导致的问题。是因为windows和linux默认编码不一致,当出现中文时,又没声明编码格式,会出现这种情况。 解决方案: 例如python # -*- coding: utf-8 -*- 阅读全文
posted @ 2020-07-27 18:07 zipon 阅读(2354) 评论(0) 推荐(0) 编辑
摘要: func HandleResp (ctx *gin.Context, apiInfo models.ApiInfo) error{ var buf bytes.Buffer reqbody,err := ioutil.ReadAll(ctx.Request.Body) //fmt.Println(" 阅读全文
posted @ 2020-07-23 15:57 zipon 阅读(588) 评论(0) 推荐(0) 编辑
摘要: 或者阿里云镜像代理 export GOPROXY=https://mirrors.aliyun.com/goproxy/ 阅读全文
posted @ 2020-07-17 11:30 zipon 阅读(2683) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 35 下一页