摘要: 1 git 2 3 git config –global user.name 4 5 git config –global user.email 6 7 mkdir repository.name 8 9 cd repo.name10 11 pwd // show the current ... 阅读全文
posted @ 2015-05-22 01:14 niceforbear 阅读(176) 评论(0) 推荐(0) 编辑
摘要: from:https://www.shiyanlou.com/courses/running/102输入一组整数,求出这组数字子序列和中的最大值,只要求出最大子序列的和,不必求出最大值对应的那个序列。序列:-2 11 -4 13 -5 2 -5 -3 12 -9 最大子序列和为21序列:0 -3 6... 阅读全文
posted @ 2015-05-22 01:11 niceforbear 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 学习自:实验楼Vim具有6种基本模式和5种派生模式普通模式:vim启动后的默认模式,常用的编辑器命令诸如移动光标,删除文本。普通模式中,有很多方法进入插入模式,常用 a 或 i 键。插入模式:该模式大多数按键都会向文本缓冲区插入文本。通过按ESC回到普通模式可视模式:与普通模式相似,但是移动命令会扩... 阅读全文
posted @ 2015-05-16 00:41 niceforbear 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 最小公倍数=两个整数的乘积 / 最大公约数求最大公约数的方法:(1)辗转相除法 1 #include 2 using namespace std; 3 int main() 4 { 5 int a,b,tmp,m; 6 cin>>a>>b; 7 m=a*b; 8 i... 阅读全文
posted @ 2015-05-15 00:48 niceforbear 阅读(3947) 评论(0) 推荐(0) 编辑
摘要: $ ls -l /*查看文件权限*/每一行格式意思: 文件类型和权限如下图:解释:软连接:类似于windows下的快捷方式读权限: cat file_name写权限:gedit file_name执行权限:二进制程序文件 or 脚本文件NOTICE:ls命令的其他常用用法:略 #with... 阅读全文
posted @ 2015-05-14 16:11 niceforbear 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 获得自己用户名$ who am i$ whoamipts/0 : 伪终端/序号root操作:sudoFirstly,知道当前登录用户的密码;Secondly,当前用户在sudo用户组添加新用户: sudo adduser user_name /*回车输入默认值*/默认为新用户创建home目录 ... 阅读全文
posted @ 2015-05-14 15:42 niceforbear 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 终端:本质上对应着Linux上的/dev/tty设备shell:打开终端,shell则自动打开可以在终端直接输入: echo "hello world" /*shell程序自动运行*/重要的快捷键:(1)TAB : 补全(包括参数)(2)CTRL+C : 强行终止CTRL+D键盘输入结束或退出... 阅读全文
posted @ 2015-05-14 15:12 niceforbear 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 初识实验楼,决定在上面好好的练练手。Course 1 : print "Hello world"在虚拟机桌面,打开终端Xfce,通过运行linux指令,新建c文件,进行编辑,编译,最后在终端输出c文件按运行结果。首先打开Xfce输入:cd Desktop通过touch指令创建文件,输入:touch ... 阅读全文
posted @ 2015-05-14 14:35 niceforbear 阅读(166) 评论(0) 推荐(0) 编辑
摘要: GOOD! 阅读全文
posted @ 2015-04-28 20:21 niceforbear 阅读(108) 评论(0) 推荐(0) 编辑