02 2016 档案

只有注册用户登录后才能阅读该文。
posted @ 2016-02-24 12:05 高傲的monkey 编辑
摘要:int main(){ printf("abc\n"); pid_t r = fork();//子进程从fork()的下条语句开始运行,标准答案是从fork的后半部分开始运行 if(r==0) { printf("getpid = %d\n",getpid()); printf("getppid = 阅读全文
posted @ 2016-02-23 18:14 高傲的monkey 阅读(523) 评论(0) 推荐(0) 编辑
摘要:#include<stdlib.h>#include<stdio.h>#include<malloc.h>#include<kernel_list.h>typedef struct node{ int data; struct list_head list;}listnode,*linklist; 阅读全文
posted @ 2016-02-21 15:59 高傲的monkey 阅读(235) 评论(0) 推荐(0) 编辑
摘要:顺序表: 声明:struct seqlist { Int last; Int data[12]; }seq,*seqlist; 初始化 seqlist init_seqlist() { seqlist sl = malloc(sizeof(seq)); sl->last =-1;//标记位,用于判断 阅读全文
posted @ 2016-02-21 13:22 高傲的monkey 阅读(2243) 评论(0) 推荐(0) 编辑
摘要:双链表: 1 2 3 4 5 6 7 8 9 10 11 12 1 3 5 7 9 11 12 10 8 6 4 2 1。设计节点 typedef int datatyped typeddef struct node { typedata data; struct node * next; stru 阅读全文
posted @ 2016-02-20 15:08 高傲的monkey 阅读(273) 评论(0) 推荐(0) 编辑
摘要:单向循环链表 1。节点 typedef int datatype; typedef struct node { datatype data; struct node *next; }listnode,*linklist; 2.声明单向循环空链表,不带头结点的单向循环链表 linklist init_ 阅读全文
posted @ 2016-02-19 18:03 高傲的monkey 阅读(226) 评论(0) 推荐(0) 编辑
摘要:单链表: 1 2 3 4 5 6 1.设计节点 typedef int datatype; typedef struct node { datatype data; struct node *next; }listnode,*linklist; listnode a; === struct node 阅读全文
posted @ 2016-02-19 17:56 高傲的monkey 阅读(209) 评论(0) 推荐(0) 编辑
摘要:typedef struct stu { int age; char name[20]; }stu,*pstu; stu stu1;相当于struct stu stu1; pstu pstu1;相当于 struct stu *pstu1; 定义了一个结构体别名和一个结构体指针别名。 阅读全文
posted @ 2016-02-18 20:47 高傲的monkey 阅读(262) 评论(0) 推荐(0) 编辑
摘要:一. samba的安装: sudo apt-get insall samba 二. 创建共享目录: mkdir /home/phinecos/sharesodu chmod 777 /home/gec/share 三. 创建Samba配置文件: 1. 保存现有的配置文件 sudo cp /etc/s 阅读全文
posted @ 2016-02-18 20:08 高傲的monkey 阅读(222) 评论(0) 推荐(0) 编辑
摘要:/*练习:实现从键盘输入整数, 顺序表里面,按增长方式进行存储(输入正整数,插入数据,输入负整数,删除数据. 输入3 插入数据3 到顺序表里面;输入-3,把3数据从顺序顺删除)。 数据结构:指数据之间的相互关系包括: 1. 逻辑结构:表示数据运算之间的抽象关系 分:线性结构 和非线性结构 2. 存储 阅读全文
posted @ 2016-02-18 19:21 高傲的monkey 阅读(278) 评论(0) 推荐(0) 编辑
摘要:思路:打开一个空文件,不断向文件中写入一个字符,一个字符占一个字节,num++判断info.st_size中是否有数据,一旦有数据,立刻break。 然后输出num. #include<stdlib.h>#include<stdio.h>#include<string.h>#include<erro 阅读全文
posted @ 2016-02-16 11:29 高傲的monkey 阅读(215) 评论(0) 推荐(0) 编辑
摘要:#include<stdlib.h>#include<stdio.h>#include<string.h>#include<error.h>#include<errno.h>#include<unistd.h>#include<strings.h>#include<stdbool.h> #inclu 阅读全文
posted @ 2016-02-15 23:17 高傲的monkey 阅读(572) 评论(0) 推荐(0) 编辑
摘要:在使用这个结构体和方法时,需要引入: <sys/types.h> <sys/stat.h> struct stat这个结构体是用来描述一个linux系统文件系统中的文件属性的结构。 可以有两种方法来获取一个文件的属性: 1、通过路径: int stat(const char *path, struc 阅读全文
posted @ 2016-02-15 22:25 高傲的monkey 阅读(604) 评论(0) 推荐(0) 编辑
摘要:#include<stdlib.h>#include<stdio.h>#include<string.h>#include<error.h>#include<errno.h>#include<unistd.h>#include<strings.h>#include<stdbool.h> #inclu 阅读全文
posted @ 2016-02-15 18:47 高傲的monkey 阅读(332) 评论(0) 推荐(0) 编辑
摘要:#include<stdlib.h>#include<stdio.h>#include<string.h>#include<error.h>#include<errno.h>#include<unistd.h>#include<strings.h>#include<stdbool.h> #inclu 阅读全文
posted @ 2016-02-15 16:10 高傲的monkey 阅读(415) 评论(0) 推荐(0) 编辑
摘要:#include<stdlib.h>#include<stdio.h>#include<string.h>#include<error.h>#include<errno.h>#include<unistd.h>#include<strings.h>#include<stdbool.h> #inclu 阅读全文
posted @ 2016-02-15 12:25 高傲的monkey 阅读(483) 评论(0) 推荐(0) 编辑
摘要:1.非指针的操作 char buff[100]; bzero(buff,100);将buff中最开始的n个字节清空; struct stat fileinfo; bzero(&fileinfo, sizeof(fileinfo)); ----------------- struct stat fil 阅读全文
posted @ 2016-02-14 20:43 高傲的monkey 阅读(361) 评论(0) 推荐(0) 编辑
摘要:#include<stdlib.h>#include<stdio.h>#include<string.h>#include<error.h>#include<errno.h>#include<unistd.h>#include<strings.h>#include<stdbool.h> #inclu 阅读全文
posted @ 2016-02-14 20:12 高傲的monkey 阅读(339) 评论(0) 推荐(0) 编辑
摘要:#include<stdlib.h>#include<stdio.h>#include<string.h>#include<error.h>#include<errno.h>#include<unistd.h>#include<strings.h>#include<stdbool.h> #inclu 阅读全文
posted @ 2016-02-14 19:24 高傲的monkey 阅读(565) 评论(0) 推荐(0) 编辑
摘要:#include<stdlib.h>#include<stdio.h>#include<unistd.h>#include<errno.h>#include<error.h>#include<string.h>int main(int argc ,char **argv){ if(argc != 2 阅读全文
posted @ 2016-02-13 20:30 高傲的monkey 阅读(204) 评论(0) 推荐(0) 编辑
摘要:先.nfs服务配置1.设置开发板ip ,同一网段2.开发板上操作:ifconfig eth0 192.168.1.203.测试是否能够ping通:ping 192.168.1.194.测试开发板ip是否被占用: 在主机上:sudo ifconfig eth0 down,看开发板上的ip是否断开。重启 阅读全文
posted @ 2016-02-13 11:30 高傲的monkey 阅读(456) 评论(0) 推荐(0) 编辑
摘要:关于库================1,静态库和动态库 1.1 静态库:书店(卖出去) (优点:速度稍快,不依赖库 缺点:浪费存储空间) 1.2 动态库:图书馆(借用) (缺点:速度稍慢,依赖于库 优点:节省大量空间)(更常用) 2,制作静态库:(以example1.c、example2.c,假设 阅读全文
posted @ 2016-02-11 22:05 高傲的monkey 阅读(245) 评论(0) 推荐(0) 编辑
摘要:NFS服务的配置====================1,下载并安装NFS sudo apt-get install nfs-kernel-server 2,配置NFS sudo vi /etc/exports--------------确保该文件中有如下信息:/opt/target *(rw,s 阅读全文
posted @ 2016-02-11 21:44 高傲的monkey 阅读(221) 评论(0) 推荐(0) 编辑
摘要:1,检查网络是否通畅 ping www.baidu.com 2,检查网线是否插好 3,使用ifconfig查看当前活跃网络接口 ifconfig 4,配置IP地址、子网掩码、网关地址 sudo vi /etc/network/interfaces 确保此文件中有以下信息:(固定IP地址为192.16 阅读全文
posted @ 2016-02-11 21:41 高傲的monkey 阅读(426) 评论(0) 推荐(0) 编辑
摘要:diff diir_1.0/ dir_2.0/ -urNB > dir_2.0.patch u:union以合并的格式来输出文件的差异信息 r:递归的对比所有的子目录下的文件 U:将不存在的文件视为空文件 B:忽略空行引起的差异 ~/dir_1.0$ patch -p1< ../dir_2.0.pa 阅读全文
posted @ 2016-02-11 21:40 高傲的monkey 阅读(499) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示