一、概述

学习git 的第一步,肯定是要知道如何创建版本库,但是在这之前,还要搞清楚的一组概念是git 中的工作区寄存区版本库

  • 工作区:工作区是我们的项目工作目录,也是git初始化时的目录,将来所有的代码文件都保存在这个目录中。
  • 寄存区:在工作区完成代码编辑后,首先要使用add命令把代码提交到寄存区中,寄存区的数据存放在<span style="text-indent: 2em;">.git/index目录下,所以有时候也把寄存区叫索引区。
  • 版本库:代码提交到寄存区后,需要通过commit命令把代码提交到版本库,只有经历了这一步之后代码才算是真正存放到了git仓库中。

阅读剩余部分

把CentOS6.5默认的python2.6升级到了python2.7,然后运行yum命令的时候就出现了错误:

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
   No module named yum
Please install a package which provides this module, or
verify that the module is installed correctly.
It"s possible that the above module doesn"t match the
current version of Python, which is:
2.7.13 (default, Aug 18 2017, 21:52:09) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)]
If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq

阅读剩余部分

C++中类的构造函数调用顺序为:

  1. 如果类中有静态成员变量,先实例化静态变量。
  2. 如果类是继承类,先调用基类的构造函数再初始化当前对象。
  3. 执行构造函数初始化列表对初始化列表中的变量进行初始化。
  4. 初始化各个成员变量,使用默认初始化或者默认值初始化。
  5. 执行构造函数内的初始化,初始化完毕。

阅读剩余部分