rust cfg
Rust中的cfg是条件编译(Configuration)的缩写,用于根据不同编译条件选择性地包含或排除代码。 基本用法使用#[cfg(name)]属性标记代码块,其中name为条件编译表达式。例如: #[cfg(target_os = “linux”)]:仅在Linux系统编译时包含该代码块 #[cfg(not(target_os = “windows”))]:在非Windows系统编译时包含该代码块 常用预定义属性 操作系统:target_os(如”linux”、”windows”) 架构:target_arch(如”x86_64”) 环境:target_env(如”gnu”(Linux)或”msvc”(Windows)) 特性:feature(需在Cargo.toml中定义并启用) 查看所有内置cfg 通过命令rustc –print cfg查看当前平台支持的配置选项,指定目标平台可用–target参数(如rustc –print cfg –target...
centos
CentOs设置国内源1、切用户、切到原文件件su root cd /etc/yum.repos.d/ 2、下载源文件wget http://mirrors.aliyun.com/repo/Centos-7.repo 3、重命名mv CentOS-Base.repo CentOS-Base.repo.bak mv Centos-7.repo CentOS-Base.repo 4、更新缓存yum clean all yum makecache yum update yum install net-tools yum install -y yum-utils yum provides ‘*/applydeltarpm’yum install deltarpm -y 123456789101112131415161718192021222324252627$ sudo yum-config-manager \ --add-repo \ ...
SWMM参数
2.1 可视化对象2.1.1 雨量计 定义的标准文件格式都被支持。雨量计属性输入参数包括: 降水数据类型(如降水强度,降水量和降水累积量) 时间步长(如小时,15分钟等等) 降水数据的来源 (输入的时间序列或外部文档) 降水数据来源的名称 2.1.2 子流域为了模拟降雪所产生的堆积量,(雪量的)重新分配和融化过程,必须指定一个积雪对象;为了模拟地下水在含水层和排水系统节点之间的水流交换过程,必须指定流域地下水相关参数;模拟污染物的堆积和冲刷必须指定土地利用类型;模拟使降水和径流量减小或延缓的各种微影响(LID)过程(如生物影响,沟渠渗透,多孔透水人行道,植被良好的洼地和储水水桶),必须事先设定各种微影响(LID)参数。其它输入参数包括: 指定雨量计 出口节点或子流域 指定土地利用类型 地表支流(附属物) 不透水率 坡度 坡面汇流宽度 透水面和不透水面坡面汇流的曼宁系数n 透水面和不透水面的洼地滞水量 具有蓄水功能的不透水面在不透水面中所占比例 2.1.3 节点2.1.3.1 交叉点 (汇合处)节点输入参数包括: 接点海拔高程 离地面的高度 泛洪区域...
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment