摘要: 下面图使用NFA表示的状态转换图,使用子集构造法,有如下过程,ε-closure(0) = {0, 1, 2, 3, 4, 6, 7}初始值,令为AA = {0, 1, 2, 3, 4, 6, 7}标记Amove(A, a) = {3, 8}Dtran[A, a] = {1, 2, 3, 4, 6,... 阅读全文
posted @ 2014-04-25 00:43 WendellYih 阅读(1194) 评论(1) 推荐(0) 编辑
摘要: sdp会话描述符有多行用如下格式组成的文本: =等号旁边不允许留白。sdp会话描述符有一个session-level的段,后面会接零个或者多个media-level段。session-level部分使用”v=“开始,直到第一个media-level段。每个media-level段由”m=“开始,直... 阅读全文
posted @ 2014-03-11 10:19 WendellYih 阅读(1292) 评论(0) 推荐(0) 编辑
摘要: 小端字节序的含义如下:高低址(指内存或寄存器)存放高位(指数值);地地址(指内存或寄存器)存放低位(指数值);简而言之就是:高高低低。 阅读全文
posted @ 2014-02-22 15:22 WendellYih 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 一、平台操作系统:windows 7wireshark:1.10.3lua:5.1二、准备lua 语言基本语法,特别是关于表操作和循环wireshark 文档,包括用户使用文档和开发者文档,这些在 wireshark 官方网站都能找到三、开始我们首先定义一个简单的协议,我们使用 C 语言的语法描述,... 阅读全文
posted @ 2013-12-15 16:51 WendellYih 阅读(18675) 评论(2) 推荐(1) 编辑
摘要: elisp中的 if 特殊表与其他语言中的 if 语句逻辑上并无二致,关键在于如何使用。1 (if (> 4 3)2 (message "4 is greater than 3"))同样也可以使用 if-else 结构1 (if ( 4 3)2 (progn (message "4 is greater than 3") (message "that's true")))下面是一个有用的例子,用于开启或关闭ecb的功能。 1 (setq ecb-switch-flag 'off) 2 (defun ecb-swi 阅读全文
posted @ 2013-12-08 15:17 WendellYih 阅读(744) 评论(0) 推荐(0) 编辑
摘要: 1 #ifndef ABSTRACTFACTORY_H 2 #define ABSTRACTFACTORY_H 3 4 #include 5 6 class AbstractDisk 7 { 8 public: 9 virtual void play(void) = 0;10 };11 12 class AbstractFactory13 {14 public:15 virtual AbstractDisk* create(void) = 0;16 };17 18 class DiskDVD: public AbstractDisk19 {20 public:21 ... 阅读全文
posted @ 2013-11-04 22:08 WendellYih 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 1 #ifndef SIMPLE_FACTORY_H 2 #define SIMPLE_FACTORY_H 3 4 #include 5 6 class Product 7 { 8 public: 9 virtual void play(void) = 0; // 没有定义的函数记得声明为纯虚函数10 };11 12 class DVD: public Product13 {14 public:15 void play(void)16 {17 std::cout play();10 cd->play();11 12 retu... 阅读全文
posted @ 2013-11-04 17:45 WendellYih 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 在Emacs的手册16.1节中有这样一句话,Any command other than an undo command breaks the sequence of undo commands. Starting from that moment, the entire sequence of undo commands that you have just performed are themselves placed into the undo record, as a single set of changes. Therefore, to re-apply changes you h 阅读全文
posted @ 2013-08-29 21:29 WendellYih 阅读(2731) 评论(0) 推荐(0) 编辑
摘要: #include #include typedef void* element_t;struct stack_node_t { element_t data; struct stack_node_t* prev; // 指向前一个元素,方向是向栈底};struct stack_t { struct stack_node_t* base; struct stack_node_t* top; int size;};int stack_init(struct stack_t* s) { assert(NUL... 阅读全文
posted @ 2013-08-25 23:07 WendellYih 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 1.定义 指针:在K&R C上的原文为“A pointer is a group of cell (often two or four) that can hold an address.” 从概念上看,指针是包含地址的变量。 数组:能存储连续固定数量的相同类型元素的数据结构。2.指针数组和数组指针int *arr_for_p[5]; // 指针数组int (*p_for_arr)[5]; // 数组指针由于[]的优先级高于*,所以第一条语句可以写成这样int* (arr_for_p[5]);而第二条语句的解释可以理解为(*p_for_arr)代表了一个5个整数的数组,而p... 阅读全文
posted @ 2013-08-08 15:20 WendellYih 阅读(242) 评论(0) 推荐(0) 编辑