摘要: 先通过命令行进入mysql的root账户: 更改加密方式 ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; 更改密码 ALTER USER 'root'@'localhost' IDENTIFI 阅读全文
posted @ 2023-11-16 09:46 朝阳1 阅读(128) 评论(0) 推荐(0)
摘要: package main import ( "crypto/rand" "crypto/rsa" "crypto/x509" "crypto/x509/pkix" "encoding/pem" "math/big" "net" "os" "time" ) func main() { max := n 阅读全文
posted @ 2023-11-16 09:39 朝阳1 阅读(59) 评论(0) 推荐(0)
摘要: 1:有账号的情况下 use mysql; update user set Host = '%' where User='root'; flush privileges; 2:无账号的情况下,grant 命令重新创建一个用户 grant all privileges on *.* to root @" 阅读全文
posted @ 2023-11-16 09:30 朝阳1 阅读(11) 评论(0) 推荐(0)
摘要: XA的性能很低,但是没得选的时候,也是个方案 <?PHP $dbtest1 = new mysqli("127.0.0.1","public","public","dbtest1")or die("dbtest1 连接失败"); $dbtest2 = new mysqli("127.0.0.1pub 阅读全文
posted @ 2023-11-15 10:38 朝阳1 阅读(33) 评论(0) 推荐(0)
摘要: 编辑 以下命令在命令模式执行 i,a,r:在光标的前,后,上方插入字符命令(i=insert,a=append,r=replace) O,o:在当前行前面,后面插入一空行 cw,dw:改变(置换)/删除光标所在处的单词的命令 (c=change,d=delete) x,d$,dd:删除光标处,光标之 阅读全文
posted @ 2023-11-15 09:23 朝阳1 阅读(42) 评论(0) 推荐(0)
摘要: 创建 myworkspace 主项目 mkdir myworkspace cd myworkspace 创建 common 子项目 mkdir common && cd common go mod init common vim common.go myworkspace/common/common 阅读全文
posted @ 2023-11-14 16:57 朝阳1 阅读(54) 评论(0) 推荐(0)
摘要: 反射的结构体 //reflect/type.go type Type interface { // 该类型内存分配大小(内存对齐单位子节) Align() int // 该类型作为结构体字段时内存分配大小(内存对齐单位子节) FieldAlign() int // 根据index in [0, Nu 阅读全文
posted @ 2023-11-14 16:24 朝阳1 阅读(23) 评论(0) 推荐(0)
摘要: 写锁需要阻塞写锁:一个协程拥有写锁时,其他协程写锁定需要阻塞 写锁需要阻塞读锁:一个协程拥有写锁时,其他协程读锁定需要阻塞 读锁需要阻塞写锁:一个协程拥有读锁时,其他协程写锁定需要阻塞 读锁不能阻塞读锁:一个协程拥有读锁时,其他协程也可以拥有读锁 阅读全文
posted @ 2023-11-14 09:27 朝阳1 阅读(4) 评论(0) 推荐(0)
摘要: 需要下载graphviz package main import ( "math/rand" "os" "runtime/pprof" "time" ) func generate(n int) []int { rand.Seed(time.Now().UnixNano()) nums := mak 阅读全文
posted @ 2023-11-13 15:28 朝阳1 阅读(48) 评论(0) 推荐(0)
摘要: 需要下载graphviz package main import ( "log" "os" "runtime/trace" ) func main() { file, err := os.Create("trace.out") if err != nil { log.Fatal(err) } def 阅读全文
posted @ 2023-11-13 15:26 朝阳1 阅读(93) 评论(0) 推荐(0)