上一页 1 ··· 39 40 41 42 43 44 45 46 47 ··· 49 下一页
摘要: 创建plugin_1.go&编译 package main import "fmt" func Greet(name string) { fmt.Println("Hello", name) } go build -buildmode=plugin -o xxxx.so plugin_1.go 加载 阅读全文
posted @ 2023-12-02 09:41 朝阳1 阅读(50) 评论(0) 推荐(0)
摘要: 1. 服务器 listen 时,计算了全/半连接队列的长度,还申请了相关内存并初始化。 2. 客户端 connect 时,把本地 socket 状态设置成了 TCP_SYN_SENT,选则一个可用的端口,发出 SYN 握手请求并启动重传定时器。 3. 服务器响应 ack 时,会判断下接收队列是否满了 阅读全文
posted @ 2023-11-29 16:21 朝阳1 阅读(33) 评论(0) 推荐(0)
摘要: 参考连接 注意 hard nofile 一定要比 fs.nr_open 要小,否则可能导致用户无法登陆。 临时修改 + 永久修改 第一种:在终端直接运行 ulimit -HSn 102400 这只是在当前终端有效,退出之后,open files 又变为默认值。 第二种:在/etc/profile文件 阅读全文
posted @ 2023-11-24 14:00 朝阳1 阅读(43) 评论(0) 推荐(0)
摘要: 之前go写的,转成了python版本,日志是json格式的,按行读取 {"aid":"1111","cid":"2222","callback_url":"http:\/\/ad.toutiao.com\/track\/activate\/?callback=B.eDCQxxxxxGCB&os=0& 阅读全文
posted @ 2023-11-23 12:00 朝阳1 阅读(212) 评论(0) 推荐(0)
摘要: 安装 pip install pyinstaller 执行 pyinstaller --onefile xxxxx.py 会在当前文件的同级目录生成dist文件夹,可执行文件就在里面 阅读全文
posted @ 2023-11-23 11:37 朝阳1 阅读(32) 评论(0) 推荐(0)
摘要: iptables -A INPUT -s 192.168.1.2 -j DROP 阅读全文
posted @ 2023-11-22 16:20 朝阳1 阅读(129) 评论(0) 推荐(0)
摘要: go build -ldflags="-s -w" -o server main.go 阅读全文
posted @ 2023-11-22 15:04 朝阳1 阅读(53) 评论(0) 推荐(0)
摘要: 首先在app目录下创建Task.php <?php namespace app; use Workerman\Connection\TcpConnection; class Task { /** * 只会执行一次 * @return void */ public function onWorkerS 阅读全文
posted @ 2023-11-20 13:59 朝阳1 阅读(520) 评论(0) 推荐(0)
摘要: <?php // 定义扇形的圆心坐标和半径 $centerX = 0; // 扇形圆心X坐标 $centerY = 0; // 扇形圆心Y坐标 $radius = 10; // 扇形半径 // 定义子弹的起始坐标和速度 $startX = 5; // 子弹起始X坐标 $startY = 5; // 阅读全文
posted @ 2023-11-17 15:49 朝阳1 阅读(52) 评论(0) 推荐(0)
摘要: import os import subprocess def play_videos_in_folder(folder_path): # 获取所有视频文件 files = [os.path.join(folder_path, f) for f in os.listdir(folder_path) 阅读全文
posted @ 2023-11-16 14:58 朝阳1 阅读(334) 评论(0) 推荐(0)
上一页 1 ··· 39 40 41 42 43 44 45 46 47 ··· 49 下一页