学会思考
刻意练习
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 22 下一页
摘要: /* 从一个简单的实例开始:对考试结果进行统计分析(及格率) int main(int argc, char *argv[]) { float scores[STUDENT_COUNT]; int passed = 0; //initialize scores here... for (int i = 0; i != STUDENT_COUNT; i++) ... 阅读全文
posted @ 2017-07-29 08:28 Worty 阅读(379) 评论(0) 推荐(0)
摘要: 参考资料:http://blog.csdn.net/hk2291976/article/details/51280816 常用命令: k,w:上移; j,s:下移;h:向左;l:向右;u:上半页d:下半页gg:网页头G:网页尾0:网页最左$:网页最右 visual模式下复制粘贴 /:查找 n/N:向 阅读全文
posted @ 2017-07-29 00:16 Worty 阅读(252) 评论(0) 推荐(0)
摘要: //拷贝构造函数: //函数参数传递时调用一次拷贝构造函数,给对象赋值时调用一次拷贝构造函数,对象作为参数传递后会被及时销毁。 #include #include using namespace std; ofstream out("HowMany2.out"); class HowMany2 { string name;//object identifier static... 阅读全文
posted @ 2017-07-22 23:20 Worty 阅读(391) 评论(0) 推荐(0)
摘要: 1.重启ubuntu,按住shift(开机启动时) 2.选择recovery mode,enter 3.root选择root drop to root shell prompt 4.进入shell界面设置密码 (1)mount -rw -o remount / (2)passwd username( 阅读全文
posted @ 2017-07-01 16:01 Worty 阅读(1733) 评论(0) 推荐(0)
摘要: 准备: script -t 2> timing.log -a output.session type commands; ... . .. exit 回放: scriptreplay timing.log output.session 阅读全文
posted @ 2017-06-10 21:10 Worty 阅读(254) 评论(0) 推荐(0)
摘要: cat是单词concatenate缩写 echo 'text through stdin' | cat - file.txt 输出:text throgh stdin 和file.txt中的内容; cat -s file:压缩空白行 cat -T file:标记处文件中所有的制表符为^| cat - 阅读全文
posted @ 2017-06-10 17:46 Worty 阅读(753) 评论(0) 推荐(0)
摘要: for循环 for var in list; do commands;#使用变量$var done example: for i in {a..z}; do actions; done; 后者 for((i=0;i<10;i++)) { commands; } while condition do 阅读全文
posted @ 2017-06-10 15:40 Worty 阅读(523) 评论(0) 推荐(0)
摘要: 设置IFS为,号分隔符 注意:[ ]空格; 阅读全文
posted @ 2017-06-10 15:30 Worty 阅读(533) 评论(0) 推荐(0)
摘要: ls | cat -n > out.txt 给输出的信息加行号并导出到out.txt 利用shell生成一个独立的进程 pwd; (cd /bin; ls); pwd; 开启一个子shell,不会影响到当前shell的路径; 1.从输入读取n个字符存入变量variable_name read -n 阅读全文
posted @ 2017-06-10 14:53 Worty 阅读(1490) 评论(0) 推荐(0)
摘要: 定义函数 function fname() { statements; } 或者 fname() { statements; } 传递参数给函数: fname arg1 arg2; ex: 函数参数定义: fname() { echo $1, $2; echo "$@"; echo "$*"; re 阅读全文
posted @ 2017-06-10 14:15 Worty 阅读(224) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 22 下一页