#include<bits/stdc++.h>#define ll long long#define speed_up ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);using namespace std;const ll nl=1e5+5;/ ...
分类:
其他好文 时间:
2020-07-27 09:31:11
阅读次数:
66
#include<bits/stdc++.h>#define ll long long#define speed_up ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);using namespace std;const ll nl=1e5+5;/ ...
分类:
其他好文 时间:
2020-07-26 23:23:20
阅读次数:
105
我们继续接上篇,本篇是对unlock方法的跟踪解析。 调用lock.unlock(); 进入后发现,还是使用了sync对象的方法,上篇中以及说明了,sync实际上是对于AQS的一种实现,实现一部分AQS提供的抽象方法。 我们进入release方法看看 我们能看到,进入后,传递的参数是一,这个是加锁的 ...
分类:
其他好文 时间:
2020-07-26 16:04:56
阅读次数:
80
[root@centos7 nginx]# cat nginx.conf worker_processes 2; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type applic ...
分类:
其他好文 时间:
2020-07-26 01:19:27
阅读次数:
70
linux 命令可以联合使用 sync -- 同步备份数据 shutdown -- 关机 shutdown -h 10 -- 10分钟后关机 shutdown -r now -- 马上重启 shutdown -r 10 -- 10分钟后重启 reboot -- 重启 halt -- 关闭系统 == ...
分类:
系统相关 时间:
2020-07-25 23:37:42
阅读次数:
94
在Django中如何使用Redis 通用方式 在utils下建立redis_pool.py文件 # 单例模式 import redis POOL = redis.ConnectionPool(host="127.0.0.1",port=6379,max_connections=1000) 在视图函数 ...
分类:
其他好文 时间:
2020-07-25 11:45:38
阅读次数:
91
1. 在ffplay中音画同步的实现方式其实有三种,分别是: 以音频为主时间轴作为同步源;(ffplay的默认方式),ubuntu16下测试偶有卡顿,效果比下面两种的好 ffplay 32037.mp4 -sync audio 以视频为主时间轴作为同步源;(音频播放会有重复渲染,拖长音) ffpla ...
分类:
其他好文 时间:
2020-07-24 22:16:05
阅读次数:
94
Escape HDU - 3533 题意: 小A要从$(0,0)\(逃到\)(n,m)$,他的精力值为$d$,每秒可以向东南西北四个方向走一格,或保持原地不动。但无论他是否移动,精力值每秒都会损失1点。路上他会遇到炮塔射击。给定$k$座炮塔的射击方向、射击间隔、子弹速度、坐标。第0秒小A开始逃跑,且 ...
分类:
其他好文 时间:
2020-07-24 21:45:27
阅读次数:
63
1、添加 try_files $uri $uri/ /index.html; worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/oct ...
分类:
其他好文 时间:
2020-07-24 16:14:03
阅读次数:
176
导入模块后,可以使用模块提供的通用变量获取与系统有关的信息 >>> import os >>> len(dir(os)) 152 >>> for i in dir(os):print(i) DirEntry F_OK MutableMapping O_APPEND O_BINARY O_CREAT ... ...
分类:
编程语言 时间:
2020-07-24 09:47:07
阅读次数:
86