2018-12-8 论文翻译+hdoj+git+python
今天干的事很少,明天得把实验写了。python
- 论文翻译了摘要。0.5h
- hdoj 五道水题。注意while(cin>>char&&char != '\n')没用。可用ch = cin.get()或cin.get(ch)。0.5h
- python
高阶函数:函数名也可做为右值或别的函数的参数和返回值
map: map(f,a) 讲f函数的效果做用在每个a的元素上。
reduce:reduce(f, [x1, x2, x3, x4]) = f(f(f(x1, x2), x3), x4)。
filter: filter(f,a)返回a经f做用后不为0的元素。
sorted: sorted(['bob', 'about', 'Zoo', 'Credit'], key=str.lower, reverse=True) #key可本身定义。
- git 建立版本库:git init 提交到stage: git add 提交到仓库:git commit -m "it is a comment" 查看状态: git status 查看变化: git diff 查看日志: git log 回退到上一个版本: git reset --hard HEAD^ 转到任意版本: git reset --hard xxxxx(版本号) 查看命令日志: git relog stage 是暂存区。
欢迎关注本站公众号,获取更多信息