上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 24 下一页
摘要: vi里怎样跳转到某一指定行输入:行号:$跳到最后一行gg跳到第一行。 阅读全文
posted @ 2013-07-05 10:02 l851654152 阅读(392) 评论(0) 推荐(0) 编辑
摘要: init进程首先通过initable查看运行级别,然后运行rc.d下面的sysinit,然后调用rc,然后运行rc###连接到init.d下面的服务。自启动。chkconfig命令只是查看和设置服务的自动启动情况,并不能反映当前服务的状态.service iptables status可以查看到iptables服务的当前状态但是即使服务运行了,防火墙也不一定起作用,还得看防火墙规则的设置iptables -L 阅读全文
posted @ 2013-07-04 20:04 l851654152 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 创建一个文件最主要的步骤就是:1.为文件创建一个文件目录项。2.为文件创建一个inode结构并分配inode号,将inode编号与文件名映射关系保存在1中分配的文件目录项中。3.将1中创建的文件目录项写入到父目录的数据区。而其中最主要和最复杂的过程是2。http://blog.csdn.net/kai_ding/article/details/9206057 阅读全文
posted @ 2013-06-30 22:49 l851654152 阅读(1610) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include unsigned short cal_chksum(unsigned short *addr,int len){ int nleft=len; int sum=0; unsigned short *w=addr; unsigned short 阅读全文
posted @ 2013-06-28 17:05 l851654152 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 下面用自启动apache为例;自启动脚本:/usr/local/apache2/bin;./apachectl start文件位于/etc/rc.d/init.d下,名为apached, 注意要可执行.#chmod +x /etc/rc.d/init.d/apached //设置文件的属性为可执行#ln -s /etc/rc.d/init.d/apached /etc/rc3.d/S90apache //建立软连接,快捷方式#ln -s /etc/rc.d/init.d/apached /etc/rc0.d/K20apache在Red Hat Linux中自动运行程序1.开机启动时自动运行程序 阅读全文
posted @ 2013-06-26 23:47 l851654152 阅读(979) 评论(0) 推荐(0) 编辑
摘要: 带头结点的链表和不带头结点的链表之间存在一定的区别1.phead是从第一个开始循环(第一个数据元素), 带头结点的phead从第二个结点开始循环(第一个数据元素)2.不带头结点的链表在插入和删除操作的时候需要把插入的第一个位置和其他位置分开讨论,带头结点的链表在插入和删除的时候操作一致主要原因是不带头结点的链表phead和phead->next赋值的时候不一致的情况造成的。所以带头结点的链表比不带头结点的链表方便所有的操作都是针对元素本身,所以需要找到或者给出元素所在的位置i,才能对其进行操作,插入和删除找到的是i-1若是对整个结构操作,则需要利用循环,同样利用到位置i或者指针p对数据元 阅读全文
posted @ 2013-06-21 22:46 l851654152 阅读(927) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 /*2013-06-19 liuwei*/ 3 typedef int elemtype ; 4 5 #define MAXSIZE 100 6 #define LISTSIZEINCREASE 10 7 #define OK 0 8 #define ERROR -1 9 10 //线性表顺序存储结构描述 11 12 13 typedef struct 14 { 15 elemtype *elem; 16 int length; 17 int listsize; 18 } SqList; 19 ... 阅读全文
posted @ 2013-06-19 16:17 l851654152 阅读(356) 评论(0) 推荐(0) 编辑
摘要: //strcmp(const char *src,const char *dst)int __cdecl strcmp (const char * src,const char * dst){int ret = 0 ;while( ! (ret = *(unsigned char *)src - *(unsigned char *)dst) && *dst && *src)++src, ++dst;if ( ret < 0 )ret = -1 ;else if ( ret > 0 )ret = 1 ;return( ret );} 阅读全文
posted @ 2013-06-04 09:55 l851654152 阅读(115) 评论(0) 推荐(0) 编辑
摘要: c++中extern这个关键字容易让人混淆的原因是可以省略。那么如何区分呢首先如果变量被初始化了 无论省略extern没有都是定义如 int a = 0;和extern int a = 0;extern int a;int a;定义未初始化extern有两层含义如果是声明则代表引用外部变量如果是定义表示可以被外部引用 阅读全文
posted @ 2013-04-18 22:44 l851654152 阅读(160) 评论(0) 推荐(0) 编辑
摘要: public static int find(int[] array) { int size = array.length; int result = 0;// 需要查找的结果 int times = 0;// 出现的次数 for (int i = 0; i < size; i++) { // 如果次数等于0,重新指定结果 if (times == 0) { result = arr... 阅读全文
posted @ 2013-04-08 22:52 l851654152 阅读(178) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 24 下一页