学习笔记
dokyer
这个作者很懒,什么都没留下…
展开
-
golang dlv linux下安装
golang linux dlv 安装问题:-bash: dlv: command not found原创 2022-11-02 23:57:29 · 1231 阅读 · 1 评论 -
【encoding/gob: non-nil empty slices encoded/decoded as nil】
golang gob 编/解码空切片为nil的问题When a slice is decoded, if the existing slice has capacity the slice will be extended in place; if not, a new array is allocated.原创 2022-04-27 15:46:02 · 101 阅读 · 0 评论 -
fyne 自定义宽度和高度
Fyne 实现对widget自定义宽度和高度1、 由于fyne默认实现layout中,widget的宽度和高度为最小化大小,所以当即使Resize() widget 更然不能在container中实现自定义大小;2、通过修改layout中实现方法,去除最小化widget的行为,可以实现widget的自定义大小3、仅仅对MultiEntry进行了自定义大小测试func (g *boxLayout) Layout(objects []fyne.CanvasObject, size fyne.Size原创 2022-01-29 13:57:13 · 4894 阅读 · 1 评论 -
Golang RAS 验签
通过加载pem公钥证书对签名进行验签package mainimport ( "crypto" "crypto/rsa" "crypto/sha1" "crypto/x509" "encoding/base64" "encoding/hex" "encoding/pem" "fmt" "strings")/* 验签*/func verfiy() { cer := `-----BEGIN CERTIFICATE-----MIIENDCCAxygAwIBAgIFE.原创 2021-09-10 09:18:38 · 496 阅读 · 0 评论 -
golang 读取Response Body 超时问题
golang reading response body timeout问题描述问题原因解决办法context deadline exceeded(Client.Timeout or context cancellation while reading body)问题描述当使用io.copy进行对网络请求的文件进行保存到本地时,在文件未完全保存时抛出此错误问题原因由于在构建http client 时指定了超时时间,即return &http.Client{ Timeout: 60原创 2021-06-22 16:14:59 · 3119 阅读 · 0 评论 -
无证书发送Https请求
java发送Https的POST请求HttpsURLConnectionHttpClientRestTemplateunable to find valid certification path to requested target当对https服务发起请求时,如果不提供证书则会出现以上错误,在测试情况下没有证书时如何发起请求获取数据问题;HttpsURLConnection public static String getHttpClient(String method,String url原创 2021-02-26 15:33:21 · 1739 阅读 · 0 评论 -
PageHelper使用中PageNum 总是为1
PageHelper 分页时,PageNum = 1问题描述 : 在使用Page Helper插件进行分页使,不论前台提供pageNum,PageSize 是多少,或者不论查询的List的size是多大,返回前端的时候总是PageNum=1,PageSize = list.size()if (list instanceof Page) { Page page = (Page)list; this.pageNum = page.getPageNum();原创 2020-07-27 23:02:22 · 3431 阅读 · 0 评论 -
POI导出实体类到Excel
POI 导出实体类到Excel基础API介绍:https://blog.csdn.net/w893932747/article/details/89354979public class ExcelWriterUtil<T> { public void write(String title, List<T> dataset, OutputStream out) { if (dataset.size() <= 0) { return; }原创 2020-07-18 21:30:57 · 511 阅读 · 0 评论 -
Spring Boot 使用jasypt 加密数据源配置信息
Spring Boot 使用jasypt 加密数据源配置信息jasypt( Java simplified encryption)项目中简单应用jasypt( Java simplified encryption)项目中简单应用https://github.com/ulisesbocchio/jasypt-spring-bootpom.xml <dependenc...原创 2020-01-08 23:00:01 · 366 阅读 · 1 评论 -
层序+中序 创建二叉树
原文:https://www.geeksforgeeks.org/construct-tree-inorder-level-order-traversals/Given inorder and level-order traversals of a Binary Tree, construct the Binary Tree. Following is an example to illustr...转载 2019-05-20 10:22:50 · 1530 阅读 · 0 评论