Python 函数生成器
Python 中执行某些方法需要传入回调函数,可不是所有的方法都为回调函数提供参数位置。这时我们需要对传入的回调函数进行包装。def callback(): pass run(callback)方法一参考原生装饰器写法将参数传入函数内def callback_maker(text):...
bash 脚本获取路径
echo $(pwd) echo $(dirname $0) echo $(dirname $(readlink -f "$0"))
Python二进制镜像源
官方源https://www.python.org/ftp/python/华为云镜像地址https://mirrors.huaweicloud.com/python/淘宝镜像地址http://npm.taobao.org/mirrors/python/
树莓派设置指南
更换APT镜像源清华镜像源sudo cp -a /etc/apt/sources.list /etc/apt/sources.list.bak sudo cp -a /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi...
Rust 调用 Windows API
ExampleCargo.toml:[target.'cfg(windows)'.dependencies] winapi = { version = "0.3", features = ["winuser"] }main.rs:#[cfg(window...
最新回复