splay tree
- Counting Binary Tree
ref: 卡特兰数(Catalan number)(二) - 知乎 (zhihu.com) , https://cs.stackexchange.com/questions/368/counting-binary-trees
ref: 卡特兰数(Catalan number)(二) - 知乎 (zhihu.com) , https://cs.stackexchange.com/questions/368/counting-binary-trees
一次使用python脚本跑cpp测试的犯蠢记录
这件事的起因是这样的,笔者在写一个实现mini editor的cpp lab作业。这个lab要实现一个命令行交互的Editor(类似vim),然后会读取一行或多行输入(读取多行的情况类似vim输入i
然后切换到input mode,以一个.
单行作为结束input的标志)
鉴于TA给了一个最基础的测试用例,笔者依然延续一贯的思路使用subprocess
库的Popen
API,让编译好的cpp程序读取python产生的字节流作为输入,输出重定向到某个log文件之中,以此来实现自动化测试。
最开始的代码大概这样
pure function
计算机的函数支持一切的“复合数字”
一些细节和思考:
Q: wait for reading the source code and thinking
A: after reading the source code and thinking
bookstore: express + js + pug + …
Node: 一个运行时环境
Express: 一个Node web框架,“中间件”
观前提示:
- 默认读者有基础的js, ts, html基础, 其中html和js在MDN Web Docs 上看入门教程即可,ts可以看mosh的视频 或者google 一下 typescript tutorial即可;
- 本人水平有限,错漏和不足之处敬请谅解
- 本笔记对应的视频: CodeWithMosh - React 18 for Beginners 对应初级部分;code with mosh - React: Intermediate Topics 对应进阶部分;相关代码可以在github找到。
10.27 技术随笔
Section 6 Bash 字符串
1 | ${#stringName} #返回字符串长度</code> |