摘要: 锁用来控制多线程访问共享资源的工具。 互斥锁:线程之间互斥,一个线程获取到锁,另一个线程要获取锁时,发现锁已经被其他线程获取,则不可获取锁。 读写锁:将读写操作进行拆分,针对读写单独加锁,读锁与读锁不互斥,写锁与任何锁互斥。也就是说一旦加了写锁,其他线程加读锁也会进行阻塞直到写锁释放。 类似于数据库 阅读全文
posted @ 2023-02-10 23:52 花泪哲 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 'default' => [ 'tcp://11.11.11.11:26379', 'tcp://11.11.11.11:26381', 'tcp://11.11.11.11:26382', //这3个都是sentinel节点的地址 'options' => [ 'replication' => ' 阅读全文
posted @ 2023-01-09 17:00 花泪哲 阅读(28) 评论(0) 推荐(0) 编辑
摘要: const dp = new DPlayer({ container: document.getElementById('dplayer'), video: { url: 'video/filename.m3u8', }, danmaku:{ id:1, api:"https://****.com/ 阅读全文
posted @ 2022-11-10 15:39 花泪哲 阅读(89) 评论(0) 推荐(0) 编辑
摘要: # nginx config location /hls { types { application/vnd.apple.mpegurl m3u8; video/mp2t ts; } root "/var/www/m3u8/"; add_header Cache-Control no-cache; 阅读全文
posted @ 2022-11-10 12:56 花泪哲 阅读(149) 评论(0) 推荐(0) 编辑
摘要: app.domain.com { # 设置请求头 request_header x-request-id "{http.request.uuid}" # 设置响应头 header * x-request-id "{http.request.uuid}" # 压缩文件 encode zstd gzip 阅读全文
posted @ 2022-09-11 19:06 花泪哲 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 下载地址:https://pecl.php.net/package/redis phpize ./configure --with-php-config=/usr/local/opt/php/bin/php-config make && make install php -i | grep 'php 阅读全文
posted @ 2022-08-26 17:36 花泪哲 阅读(397) 评论(0) 推荐(0) 编辑
摘要: Widget Search() { const List<String> kOptions = ["清华"]; searchOptions(TextEditingValue textEditingValue) { if (textEditingValue.text == '') { return c 阅读全文
posted @ 2022-08-24 10:36 花泪哲 阅读(144) 评论(0) 推荐(0) 编辑
摘要: ### install the plugins( Material Icon Theme | Flutter | Awesome Flutter Snippets | Flutter Widget Snippets | Flutter GetX Generator | Svg Preview | P 阅读全文
posted @ 2022-08-08 14:11 花泪哲 阅读(189) 评论(0) 推荐(0) 编辑
摘要: curl https://get.acme.sh | shalias acme.sh=~/.acme.sh/acme.shacme.sh --register-account -m ****@qq.com acme.sh --issue -d ****.com --webroot /var/www/ 阅读全文
posted @ 2022-06-29 11:25 花泪哲 阅读(30) 评论(0) 推荐(0) 编辑
摘要: PHP 脚本输出设置颜色:http://www.weicot.com/php-%E6%88%96%E5%85%B6%E4%BB%96%E8%84%9A%E6%9C%AC-%E5%9C%A8%E7%BB%88%E7%AB%AF%E8%BE%93%E5%87%BA%E5%B8%A6%E9%A2%9C%E 阅读全文
posted @ 2021-12-30 14:10 花泪哲 阅读(27) 评论(0) 推荐(0) 编辑