摘要: package main import ( "context" "fmt" "time" ) func teeChannel(ctx context.Context, value <-chan int) (<-chan int, <-chan int) { ch1 := make(chan int) 阅读全文
posted @ 2024-07-10 13:13 saneim 阅读(2) 评论(0) 推荐(0) 编辑
摘要: package main import ( "context" "fmt" ) // orDone func orDone(ctx context.Context, value <-chan int) <-chan int { ordoneStream := make(chan int) go fu 阅读全文
posted @ 2024-07-10 13:11 saneim 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 扇入扇出寻找素数: package main import ( "fmt" "math/rand" "runtime" "sync" "time" ) var repeatFn = func(done <-chan interface{}, fn func() interface{}) <-chan 阅读全文
posted @ 2024-07-10 13:09 saneim 阅读(5) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "net/http" ) type Results struct { Error error Response *http.Response } func main() { checkStatus := func(done <-chan int 阅读全文
posted @ 2024-07-10 13:06 saneim 阅读(1) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "math/rand" ) func main() { pFn := func(done <-chan interface{}, fn func() int) <-chan int { valueStream := make(chan int) 阅读全文
posted @ 2024-07-10 13:04 saneim 阅读(1) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "time" ) func main() { var or func(channels ...<-chan interface{}) <-chan interface{} or = func(channels ...<-chan interfa 阅读全文
posted @ 2024-07-10 13:01 saneim 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 使用使用LocalDate打印日历java代码: import java.time.*; public class getDate { public static void main(String[] args) { System.out.println("Mon Tue Wed Thu Fir S 阅读全文
posted @ 2023-10-25 22:10 saneim 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 在与三方公司对接时,三方公司调用我们的接口发生频繁的连接超时问题,并发量不大。服务器系统版本为centos7.9,网上查了一些资料,找到解决办法: 1.查看tcp_tw_reuse值,默认为0:cat /proc/sys/net/ipv4/tcp_tw_reuse 2.修改tcp_tw_reuse值 阅读全文
posted @ 2023-03-22 11:43 saneim 阅读(76) 评论(0) 推荐(0) 编辑
摘要: docker容器启动不起来,并报错:Error response from daemon: OCI runtime create failed: container with id exists: 211aaa83e999f76993e48d7fa1bc6c3c9cbb2f54c396a248545 阅读全文
posted @ 2023-03-20 14:39 saneim 阅读(796) 评论(0) 推荐(0) 编辑
摘要: 1.拉取redis镜像: docker pull redis 2.查看本地镜像: docker images 3.从github下载对应版本的redis.conf配置文件:打开链接 https://github.com/redis/redis/,找到redis.conf,下载文件。将redis.co 阅读全文
posted @ 2022-11-22 22:03 saneim 阅读(2876) 评论(0) 推荐(0) 编辑