1 typedef int semaphore; 2 semaphore count_mutex = 1; 3 semaphore data_mutex = 1; 4 int count = 0; 5 6 void reader(){ 7 while(TRUE){ 8 down(&count_mut ...
分类:
其他好文 时间:
2021-04-20 15:08:36
阅读次数:
0
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.10.0.tar.bz2 tar -xf freetype-2.10.0.tar.bz2 cd freetype-2.10.0 ./configure --prefi ...
分类:
系统相关 时间:
2021-04-20 14:36:46
阅读次数:
0
写一个符合 Promise A+ 规范的 Promise 类型定义 // MyPromise.ts type resType = (value?: any) => void; type rejType = (reason?: any) => void; type executorType = (re ...
分类:
其他好文 时间:
2021-04-20 14:26:37
阅读次数:
0
golang easyjson使用 1.先安装easyjson go get -u github.com/mailru/easyjson/ 2.在结构体上加//easyjson:json的注解 //easyjson:json type School struct { Name string `jso ...
分类:
Web程序 时间:
2021-04-20 14:21:08
阅读次数:
0
IP、MASK、GW、DNS相关的配置文件: /etc/sysconfig/network-scripts/ifcfg-IFACE 说明参考 /usr/share/doc/initcripts-*/sysconfig.txt 常用配置 设置 说明 TYPE 接口类型;常见有的Ethernet, Br ...
分类:
其他好文 时间:
2021-04-20 14:18:37
阅读次数:
0
<!DOCTYPE html> <html> <head> <script type="text/javascript"> window.onload=function(){ document.getElementById("too").playbackRate=10; } </script> </ ...
分类:
Web程序 时间:
2021-04-19 15:53:42
阅读次数:
0
原题链接 题意:在一个环中,给每个数涂色,要求不同的相邻的数字颜色不同。 题解:很显然的是,偶数只要是 \(121212\) 就可以保证都不相同,如果是奇数环,那么要小心头尾会相遇,那么如果还是 \(1212\) 那么如果 \(a_{n-1}\) 和 \(a_{1}\) 都 \(\neq a_{n} ...
分类:
其他好文 时间:
2021-04-19 15:33:58
阅读次数:
0
这个问题出现在在使用VS编码当中,电脑意外关机,导致的文件的缺失或者损坏。 使用反编译软件(如:ILSpy)对编译后的 .EXE文件进行反编译,在翻遍的结果中将相关代码拷贝至目标路径下,替换所需文件。 按照目标文件的格式,选择性粘贴(例如winform 中*.cs 和 *.Design.cs文件,存 ...
分类:
移动开发 时间:
2021-04-19 15:26:49
阅读次数:
0
问题一:Consider defining a bean of type 'org.springframework.http.codec.ServerCodecConfigurer' in your configuration. 原因: gatweway使用的是webflux,webflux属于响应 ...
分类:
其他好文 时间:
2021-04-19 15:26:06
阅读次数:
0
mysql开启命令行日志(可以记录source等的日志) mysql> tee hello.log mysql>select now() ; mysql>exit; //退出mysql 客户端 查看 hello.log 文件内容如下: mysql> select now(); 用法如下: Step ...
分类:
数据库 时间:
2021-04-19 15:24:58
阅读次数:
0