会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
☞@_@
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
···
21
下一页
2022年9月15日
二叉树的最近公共祖先
摘要: 一般的二叉树: func lowestCommonAncestor(root, p, q *TreeNode) *TreeNode { if root==p||root==q||root==nil{ return root } left:=lowestCommonAncestor(root.Left
阅读全文
posted @ 2022-09-15 14:38 ☞@_@
阅读(20)
评论(0)
推荐(0)
2022年8月29日
http1.0、http1.1和http2.0的区别
摘要: 1、影响http传输的两个因素 带宽和延迟(延迟包括:浏览器阻塞、DNS查询和建立连接)。 2、HTTP1.0和HTTP1.1的区别 1)长链接:HTTP1.1支持长连接和请求的流水线处理,在一个TCP连接上可以传送多个HTTP请求和响应,减少了建立和关闭连接的消耗和延迟。 2)节约带宽:HTTP1
阅读全文
posted @ 2022-08-29 12:03 ☞@_@
阅读(315)
评论(0)
推荐(0)
2022年8月25日
处理并发错误
摘要: 参考:处理并发错误 | 李文周的博客 (liwenzhou.com)
阅读全文
posted @ 2022-08-25 16:21 ☞@_@
阅读(21)
评论(0)
推荐(0)
2022年8月21日
python文件上传
摘要: 前端代码: html <input id="fileUpload" type="file" name="upload"> <input type="button" @click="submitfile" value="Upload"> js submitfile() { var formData =
阅读全文
posted @ 2022-08-21 11:05 ☞@_@
阅读(136)
评论(1)
推荐(0)
2022年8月18日
日志库Zap
摘要: 1、介绍 Zap提供了两种类型的日志记录器—Sugared Logger和Logger。 在性能很好但不是很关键的上下文中,使用SugaredLogger。它比其他结构化日志记录包快4-10倍,并且支持结构化和printf风格的日志记录。 在每一微秒和每一次内存分配都很重要的上下文中,使用Logge
阅读全文
posted @ 2022-08-18 12:31 ☞@_@
阅读(100)
评论(2)
推荐(0)
2022年8月5日
遍历结构体的属性和对应值
摘要: //遍历结构体的属性和对应值,返回字符串 func GetStringOfStruct(obj interface{})string{ t := reflect.TypeOf(obj) v := reflect.ValueOf(obj) res := "" for k := 0; k < t.Num
阅读全文
posted @ 2022-08-05 16:07 ☞@_@
阅读(56)
评论(0)
推荐(0)
go语言之文件处理
摘要: 1、获取指定路径下的文件夹 //参数:文件路径;是否递归;返回列表func GetFiles(pathName string, recursive bool, f *[]string) error { rd, err := ioutil.ReadDir(pathName) if err != nil
阅读全文
posted @ 2022-08-05 16:04 ☞@_@
阅读(56)
评论(0)
推荐(0)
2022年8月3日
gin实现文件下载
摘要: func FileDownload(c *gin.Context){ //c.Writer.Header().Add("Content-Disposition", fmt.Sprintf("attachment; filename=%s", "test"))//fmt.Sprintf("attach
阅读全文
posted @ 2022-08-03 18:04 ☞@_@
阅读(1063)
评论(0)
推荐(0)
2022年7月31日
vue+gin上传文件
摘要: 前端 html <form action="" method="post" enctype="multipart/form-data"> <input id="fileUpload" type="file" name="upload"> <input type="button" @click="su
阅读全文
posted @ 2022-07-31 11:18 ☞@_@
阅读(127)
评论(0)
推荐(0)
2022年7月28日
shell学习笔记(11)文件包含
摘要: . filename # 注意点号(.)和文件名中间有一空格 或 source filename 参考:Shell 文件包含 | 菜鸟教程 (runoob.com)
阅读全文
posted @ 2022-07-28 11:36 ☞@_@
阅读(20)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
21
下一页
公告