2018-12-8 论文翻译+hdoj+git+python

今天干的事不多,明天得把实验写了。

  • 论文翻译了摘要。0.5h
  • hdoj 五道水题。注意while(cin>>char&&char != ' ')没用。可用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 是暂存区。
原文地址:https://www.cnblogs.com/jinjin-2018/p/10089882.html