上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 49 下一页
摘要: 没用singleflight之前 package main import ( "fmt" "sync" "time" ) var ( mx sync.Mutex wg sync.WaitGroup cacheData = make(map[string]string, 0) ) func main( 阅读全文
posted @ 2024-09-03 15:09 朝阳1 阅读(39) 评论(0) 推荐(0)
摘要: package main import "fmt" const RED = 0 const BLACK = 1 type Type int type RBNode struct { color uint8 key Type left, right, parent *RBNode } type RBR 阅读全文
posted @ 2024-09-02 10:18 朝阳1 阅读(24) 评论(0) 推荐(0)
摘要: package main import ( "fmt" ) type AVLNode struct{ data int height int left, right *AVLNode } func max(a, b int) int { if a > b { return a } return b 阅读全文
posted @ 2024-09-02 10:17 朝阳1 阅读(16) 评论(0) 推荐(0)
摘要: nats-streaming目前已经淘汰了,最新版本安装可以看我的其他文章 https://www.cnblogs.com/qcy-blog/p/18409663 Support Docker-Compose Deploy nats + nats-streaming 集群方案 1 通过nats + 阅读全文
posted @ 2024-08-31 17:33 朝阳1 阅读(252) 评论(0) 推荐(0)
摘要: 以下是redis-7版本以下适用 string int编码:当字符串长度小于等于12字节并且字符串可以表示为整数时,Redis会使用int编码。 这样可以节省内存,并且在执行一些命令时可以直接进行数值计算。 embstr编码:当字符串长度小于等于39字节时,Redis会使用embstr编码。这种编码 阅读全文
posted @ 2024-08-28 16:00 朝阳1 阅读(26) 评论(0) 推荐(0)
摘要: 生产者 package main import ( "context" "fmt" "github.com/apache/rocketmq-client-go/v2" "github.com/apache/rocketmq-client-go/v2/primitive" "github.com/ap 阅读全文
posted @ 2024-08-28 10:11 朝阳1 阅读(122) 评论(0) 推荐(0)
摘要: 注意,当前使用的不是grpc协议 生产者 package main import ( "context" "fmt" "github.com/apache/rocketmq-client-go/v2" "github.com/apache/rocketmq-client-go/v2/primitiv 阅读全文
posted @ 2024-08-28 10:09 朝阳1 阅读(80) 评论(0) 推荐(0)
摘要: index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>upload file</title> </head> <body id="app"> <h1 style="text-align: ce 阅读全文
posted @ 2024-08-28 09:59 朝阳1 阅读(196) 评论(0) 推荐(0)
摘要: upload.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>upload file</title> </head> <body> <form method="post" enctype="mult 阅读全文
posted @ 2024-08-28 09:42 朝阳1 阅读(106) 评论(0) 推荐(0)
摘要: package main import ( "fmt" "net/http" "time" "github.com/gin-gonic/gin" ) func main() { r := gin.Default() r.GET("/", func(c *gin.Context) { w := c.W 阅读全文
posted @ 2024-08-26 17:36 朝阳1 阅读(27) 评论(0) 推荐(0)
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 49 下一页