2014年11月4日

Linux_C dup()

摘要: 1 /* 2 * stdinredir2.c 3 * shows two more methods for redirecting standard input 4 * use #define to set one or the other 5 */ 6 #include 7 #incl... 阅读全文

posted @ 2014-11-04 21:58 Zachary_wiz 阅读(359) 评论(0) 推荐(0) 编辑

Linux_shell comm

摘要: 希望编写一个程序,当其他用户登录系统或者注销时通知你。需要用到的命令:who, sort, commshell code 1 who | sort > prev 2 while true ; do 3 sleep 60 4 who | sort > curr 5 echo "... 阅读全文

posted @ 2014-11-04 21:53 Zachary_wiz 阅读(194) 评论(0) 推荐(0) 编辑

2014年11月2日

Linux_C smsh2(if,then,else)

摘要: 在smsh1的基础上,只是增加了一层process(),以之来处理if,then,else。smsh.c 只是更变了一行rv=process(); 1 #include 2 #include 3 #include 4 #include 5 #include "smsh.h" 6 7 #de... 阅读全文

posted @ 2014-11-02 17:24 Zachary_wiz 阅读(461) 评论(0) 推荐(0) 编辑

2014年10月31日

Linux_C smsh1

摘要: 这是一个模拟shell端的程序。使用了execvp,fork,wait,malloc,realloc以及strtok()函数。smsh.h1 char* next_cmd();2 char** splitline(char* );3 void freelist(char **);4 int exec... 阅读全文

posted @ 2014-10-31 22:21 Zachary_wiz 阅读(324) 评论(0) 推荐(0) 编辑

2014年10月17日

ACM&排序问题,操作符重载

摘要: 题目描述: Excel可以对一组纪录按任意指定列排序。现请你编写程序实现类似功能。 对每个测试用例,首先输出1行“Case i:”,其中 i 是测试用例的编号(从1开始)。随后在 N 行中输出按要求排序后的结果,即:当 C=1 时,按学号递增排序;当 C=2时,按姓名的非递减字典序排序;当 C=3时... 阅读全文

posted @ 2014-10-17 21:56 Zachary_wiz 阅读(705) 评论(0) 推荐(0) 编辑

ACM&找双亲,并查集

摘要: 题目描述: 如果A,B是C的父母亲,则A,B是C的parent,C是A,B的child,如果A,B是C的(外)祖父,祖母,则A,B是C的grandparent,C是A,B的grandchild,如果A,B是C的(外)曾祖父,曾祖母,则A,B是C的great-grandparent,C是A,B的gre... 阅读全文

posted @ 2014-10-17 01:53 Zachary_wiz 阅读(246) 评论(0) 推荐(0) 编辑

2014年10月12日

struct dirent/DIR

摘要: #include struct dirent { long d_ino;//inode number索引节点号 off_t d_off;//offset to this dirent 在目录文件中的偏移 unsigned short d_reclen;//length of this d_na... 阅读全文

posted @ 2014-10-12 22:26 Zachary_wiz 阅读(587) 评论(0) 推荐(0) 编辑

2014年10月1日

关于win8如何查找出当前的密钥

摘要: 1、使用组合键Win+Q,或者将鼠标移至屏幕右下角,打开Charm超级菜单中搜索功能2、输入PowerShell,搜索PowerShell组件3、右击Windows PowerShell,以管理员身份运行4、在PowerShell窗口下输入以下命令:(注:英文字符)(Get-WmiObject -q... 阅读全文

posted @ 2014-10-01 00:30 Zachary_wiz 阅读(860) 评论(0) 推荐(0) 编辑

2014年8月7日

php之留言板

摘要: 留言板或者说一个小的博客系统有如下功能,编写标题内容并用mySQL保存,修改,删除。1 conn.php 1 添加内容 2 3 13 标题: |14 ">编辑 | 15 ">删除 |16 时间:17 18 19 index.php 1... 阅读全文

posted @ 2014-08-07 22:15 Zachary_wiz 阅读(182) 评论(0) 推荐(0) 编辑

php之include&require

摘要: 通过 include 或 require 语句,可以将 PHP 文件的内容插入另一个 PHP 文件(在服务器执行它之前)。include 和 require 语句是相同的,除了错误处理方面: require 会生成致命错误(E_COMPILE_ERROR)并停止脚本include 只生成警告(E_... 阅读全文

posted @ 2014-08-07 15:51 Zachary_wiz 阅读(112) 评论(0) 推荐(0) 编辑

导航