会员
众包
新闻
博问
AI培训
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
chen8840
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
下一页
2020年5月19日
rust里的内存对齐
摘要: 内存对齐主要遵循下面三个原则: 结构体变量的起始地址能够被其最宽的成员大小整除 结构体每个成员相对于起始地址的偏移能够被其自身大小整除,如果不能则在前一个成员后面补充字节 结构体总体大小能够被最宽的成员的大小整除,如不能则在后面补充字 上代码 struct A { a: u8, b: u32, c:
阅读全文
posted @ 2020-05-19 10:26 chen8840
阅读(1453)
评论(0)
推荐(0)
编辑
2020年4月15日
impl和dyn用法
摘要: 先推荐一个链接 理解 Rust 2018 edition 的两个新关键字 —— impl 和 dyn 官方文档中,impl是限定泛型的语法糖,所以 trait Trait {} fn foo<T: Trait>(arg: T) { } fn foo(arg: impl Trait) { } 这2种情
阅读全文
posted @ 2020-04-15 10:10 chen8840
阅读(1229)
评论(0)
推荐(0)
编辑
2020年4月14日
rust中的ref
摘要: 理解Rust的引用与借用(好文链接) #![feature(core_intrinsics)] fn print_type_of<T>(_: T) { println!("{}", unsafe { std::intrinsics::type_name::<T>() }); } fn main()
阅读全文
posted @ 2020-04-14 17:09 chen8840
阅读(1859)
评论(0)
推荐(0)
编辑
如何在Rust中打印变量的类型?
摘要: #![feature(core_intrinsics)] fn print_type_of<T>(_: T) { println!("{}", unsafe { std::intrinsics::type_name::<T>() }); } fn main() { print_type_of(32.
阅读全文
posted @ 2020-04-14 15:54 chen8840
阅读(1799)
评论(0)
推荐(0)
编辑
2020年1月3日
typescript中的esModuleInterop选项
摘要: 当没有加esModuleInterop时 库的代码: 生成代码 使用库的代码: 生成代码 生成代码 生成代码 fs是没有default属性的,所以这种使用fs的方法是不对的。 所以,不加esModuleInterop时,正确引用fs的方法是下面这样: 加上esModuleInterop,代码 编译为
阅读全文
posted @ 2020-01-03 11:50 chen8840
阅读(5250)
评论(0)
推荐(0)
编辑
2019年9月26日
网络书签
摘要: 导航
阅读全文
posted @ 2019-09-26 14:55 chen8840
阅读(205)
评论(0)
推荐(0)
编辑
2019年9月23日
angular 变化检测和ngZone
摘要:
阅读全文
posted @ 2019-09-23 15:46 chen8840
阅读(622)
评论(0)
推荐(0)
编辑
2019年9月11日
display: table-cell里面文字打点的方法
摘要: fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff...
阅读全文
posted @ 2019-09-11 09:12 chen8840
阅读(202)
评论(0)
推荐(0)
编辑
2019年5月6日
Using XMLHttpRequest
摘要: https://developer.mozilla.org/zh-CN/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest
阅读全文
posted @ 2019-05-06 10:05 chen8840
阅读(67)
评论(0)
推荐(0)
编辑
2019年3月21日
What's the difference between markForCheck() and detectChanges()
摘要: https://stackoverflow.com/questions/41364386/whats-the-difference-between-markforcheck-and-detectchanges
阅读全文
posted @ 2019-03-21 17:49 chen8840
阅读(370)
评论(0)
推荐(0)
编辑
上一页
1
2
3
4
5
6
7
8
9
下一页