054022eaeae0b00e0fc068c0c0a2102a 054022eaeae0b00e0fc068c0c0a2102a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface MyCompProps { | |
model: Model; | |
modParams: ModParams; | |
} | |
interface MyCompState { | |
derived1?: Derived1; | |
derived2?: Derived2; | |
initialized: boolean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Author: Ming Wen ([email protected]) | |
When resolving conflicts on a merge or rebase, this script | |
automates `git add/rm` and `git checkout` with --ours or --theirs | |
for a large batch of changes. | |
Usage: `python3 git_batch_resolver.py` in your git repository. |
/**
* 计算字符串所占的内存字节数,默认使用UTF-8的编码方式计算,也可制定为UTF-16
* UTF-8 是一种可变长度的 Unicode 编码格式,使用一至四个字节为每个字符编码
*
* 000000 - 00007F(128个代码) 0zzzzzzz(00-7F) 一个字节
* 000080 - 0007FF(1920个代码) 110yyyyy(C0-DF) 10zzzzzz(80-BF) 两个字节
* 000800 - 00D7FF
* 00E000 - 00FFFF(61440个代码) 1110xxxx(E0-EF) 10yyyyyy 10zzzzzz 三个字节
* 010000 - 10FFFF(1048576个代码) 11110www(F0-F7) 10xxxxxx 10yyyyyy 10zzzzzz 四个字节