unistd 提供的 read 怎么才能 timeout 退出。

最近在调试 android,使用 串口半双工模式接收数据,碰到的问题是 unistd 中的 read 是block的,怎样才能超时退出。 刚开始找到的资料说是 c_cc[VMIN] = 0, c_cc[VTIME] = 10; 这样就能配置为 1s 超时了。但是实际上并不能够达到超时退出的功能...

android studio 类和方法注释

在 android studio 中对类和方法进行注释,快捷功能。

emacs org export pdf

1. 生成 tex 在 org 文件中按键 C-c C-e l l 这样能够生成 tex 文件 参考: http://tieba.baidu.com/p/3522363035 https://www.dazhuanlan.com/2019/10/16/5da60df92dd09/ https:...

emacs 中文

系统: win7en 在 emacs 文件的开头输入: -*- coding: utf-8 -*- 这样就可以以 utf-8 的编码进行保存。 还可以在配置文件中加入: (setq default-buffer-file-coding-system 'utf-8-unix) 。 具体参考: h...