<?xml version="1.0" encoding="utf-8"?><rss version="2.0">
<channel>
<title><![CDATA[旮旯话儿道]]></title>
<link>http://blog.pfan.cn/xboy</link>
<description>编程爱好者博客</description>
<language>zh-cn</language>
			<item>
		<title><![CDATA[静态路由使用下一跳和出接口的区别]]></title>
		<link>http://blog.pfan.cn/xboy/50209.html</link>
		<description><![CDATA[&nbsp;






&nbsp; &nbsp; 在配置静态路由时，下一跳可以使用下一路由器的IP地址，也可以使用本路由器的出站接口。在点对点的网络中，两者可能没有什么差别，但在以太网中，两者有很大差别。

在以太网中，两个相邻接口之间的通信是依靠MAC地址。相邻接口通信时，需要知道对方的MAC地址，根据MAC地址，将通信数据转换成数据帧后交付给网络，进而到对方。而对方MAC地址的获得，是通过第二层数据帧广播，由ARP协议完成的。

当静态路由中使用出站接口做为下一跳时，路由器会认为目标网络和接口处在“直连网络”中。看下图的拓扑：





在路由器R1中的静态路由为 ip route 192.168.2.0 255.255.255.0 fastethernet0/1 时，R1就认为192.168.2.0/24网络和自己直连。可以在R1中使用 show ip route 命令看出，如下图示



在以太网中，直连网络中主机间的通信是通过ARP协议广播来获取到要交付的目标主机的MAC地址的。也就是说，当R1左侧网络中的PC1要和R2右侧网络的PC2和PC3通信时，数据传递到R1时，R1看到目标网络是自己的直连网络（由于静态路由中指定下一跳为自身接口所致），于是R1就要在F0/1所处网络发出ARP请求广播，来寻找192.168.2.11/12对应的MAC地址。

这时，如果R2启用了ARP代理，那么R2将代替PC2和PC3应答此ARP请求，也就是说返回给R1：192.168.2.11和12对应的MAC地址是R2的F0/1接口MAC。这样，R1中将产生两条ARP缓存记录，分别为：

&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;192.168.2.11 R2的F0/1的MAC

&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;192.168.2.12 R2的F0/1的MAC

在PC1上分别PING 192.168.11和12，然后在R1上使用show arp命令查看到的结果如下图示：



c803.0f8c.0001正是R2的F0/1接口的MAC。

&nbsp; &nbsp;&nbsp; &nbsp; 当R2中没有启用ARP代理时，]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2009-12-03 23:03:00</pubDate>
		</item>
				<item>
		<title><![CDATA[c&nbsp;宏技巧总结]]></title>
		<link>http://blog.pfan.cn/xboy/42043.html</link>
		<description><![CDATA[C语言宏定义技巧(zt)1，防止一个头文件被重复包含 #ifndef COMDEF_H #define COMDEF_H //头文件内容 #endif 2，重新定义一些类型，防止由于各种平台和编译器的不同，而产生的类型字节数差异，方便移植。 typedef unsigned char boolean; /* Boolean value type. */ typedef unsigned long int uint32; /* Unsigned 32 bit value */ typedef unsigned short uint16; /* Unsigned 16 bit value */ typedef unsigned char uint8; /* Unsigned 8 bit value */ typedef signed long int int32; /* Signed 32 bit value */ typedef signed short int16; /* Signed 16 bit value */ typedef signed char int8; /* Signed 8 bit value */ //下面的不建议使用 typedef unsigned char byte; /* Unsigned 8 bit value type. */ typedef unsigned short word; /* Unsinged 16 bit value type. */ typedef unsigned long dword; /* Unsigned 32 bit value type. */ typedef unsigned char uint1; /* Unsigned 8 bit value type. */ typedef unsigned short uint2; /* Unsigned 16 bit value type. */ typedef unsigned long uint4; /* Unsigned 32 bit value type. */ typedef signed char int1; /* Signed 8 bit value type. */ typedef signed short int2; /* Signed 16]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2009-04-08 16:07:00</pubDate>
		</item>
				<item>
		<title><![CDATA[linux下如何安装vmware&nbsp;tools]]></title>
		<link>http://blog.pfan.cn/xboy/40239.html</link>
		<description><![CDATA[如何安装vmware tools:

1安装vmtools for linux:

启动VM中的linux，
选择vmware workstation程序菜单中VM > install VMware tools...
执行：
mkdir /mnt/cdrom
mount -o ro /dev/cdrom /mnt/cdrom （vmtools的安装文件放在vmware虚拟的cdrom中，首先要mount上这个光驱才能找到安装文件）
cd /mnt/cdrom
tar -zxvf VMwareTools-5.0.0-12124.i386.tar.gz -C /tmp （把安装文件解压到/tmp）

cd /tmp/vmware-tools-distrib
./vmware-install.pl （执行vwware的安装脚本，这个脚本是用perl编写的）
在这里，安装程序会询问安装文件存放位置和设置分辨率等一系列问题，在大多数情况下，安装默认配置vmware tools就可以正常工作，因此，这里对每一个问题按回车键选择默认配置

安装完以后，vmware会添加一个vmhgfs的模块到内核中，可以使用lsmod查看]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2009-01-08 19:58:00</pubDate>
		</item>
				<item>
		<title><![CDATA[ls&nbsp;只显示目录]]></title>
		<link>http://blog.pfan.cn/xboy/40236.html</link>
		<description><![CDATA[I have wrote a post stated that there are no direct ways to list just directories, and wrote a bash scripts using find to list the directories. I had made a WRONG statement. We can list just directories with ls -d, thanks to Ntropia who leaves me a comment.

Before that I had tried hard to use ls -d to list just directories but failed, therefore I wrote a bash script uses find to do that. It seems Ntropia provided a better solution and it is straight to the point, so let just treat the previous post as examples of find command.

The simplest way of list just directories

ls -d */ 

You can list the directories start with letter b

ls -d b*/ 

Further more list the subdirectories of the directories start with letter b

ls -d b*/*/ 

The outcome will be look like this


backup/10-5-2007/  backup/lunatic/              bin/gdc/
backup/ccbe/       backup/wplbe/                bt/&#231;&#381;&#8249;&#229;&#352;&#8250;&#229;&#174;&#143; - &#230;”&#185;&#229;&#143;&#732;è&#]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2009-01-08 19:34:00</pubDate>
		</item>
				<item>
		<title><![CDATA[gotoxy]]></title>
		<link>http://blog.pfan.cn/xboy/39605.html</link>
		<description><![CDATA[vc下的conio.h中没有相应的gotoxy()；这只在tc,bc中才有
但可以自己构造一个如:
#include&lt;windows.h&gt;#include&lt;iostream&gt;
using namespace std;void gotoxy(int x, int y) {&nbsp; COORD c;&nbsp; c.X = x - 1;&nbsp; c.Y = y - 1;&nbsp; SetConsoleCursorPosition (GetStdHandle(STD_OUTPUT_HANDLE), c);} 
int main(){ gotoxy(20,12);std::cout&lt;&lt;"Hello world!"&lt;&lt;endl;return 0;}
其中的COORD和SetConsoleCursorPosition定义在wincon.h上
SetConsoleCursorPosition用于在相应的设备设置光标的位置，两个参数分别是设备句柄和光标位置结构
GetStdHandle定义在winbase.h上用于获得标准输入、输出、错误输出句柄
当参数标识为STD_OUTPUT_HANDLE时获得标准输出句柄]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2008-11-30 17:36:00</pubDate>
		</item>
				<item>
		<title><![CDATA[eclipse&nbsp;Doc]]></title>
		<link>http://blog.pfan.cn/xboy/39272.html</link>
		<description><![CDATA[http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.cdt.doc.user/concepts/cdt_c_makefile.htm]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2008-11-06 17:07:00</pubDate>
		</item>
				<item>
		<title><![CDATA[组合--非递归实现]]></title>
		<link>http://blog.pfan.cn/xboy/33815.html</link>
		<description><![CDATA[组合算法 （来源与互联网）&nbsp; &nbsp; 本程序的思路是开一个数组，其下标表示1到m个数，数组元素的值为1表示其下标代表的数被选中，为0则没选中。&nbsp; 首先初始化，将数组前n个元素置1，表示第一个组合为前n个数。&nbsp;&nbsp;&nbsp;&nbsp; 然后从左到右扫描数组元素值的“10”组合，找到第一个“10”组合后将其变为“01”组合，同时将其左边的所有“1”全部移动到数组的最左端。 &nbsp; &nbsp; &nbsp; 当第一个“1”移动到数组的m-n的位置，即n个“1”全部移动到最右端时，就得到了最后一个组合。&nbsp; 例如求5中选3的组合： &nbsp; &nbsp; &nbsp; 1 &nbsp; 1 &nbsp; 1 &nbsp; 0 &nbsp; 0 &nbsp; //1,2,3&nbsp; 1 &nbsp; 1 &nbsp; 0 &nbsp; 1 &nbsp; 0 &nbsp; //1,2,4&nbsp; 1 &nbsp; 0 &nbsp; 1 &nbsp; 1 &nbsp; 0 &nbsp; //1,3,4&nbsp; 0 &nbsp; 1 &nbsp; 1 &nbsp; 1 &nbsp; 0 &nbsp; //2,3,4&nbsp; 1 &nbsp; 1 &nbsp; 0 &nbsp; 0 &nbsp; 1 &nbsp; //1,2,5&nbsp; 1 &nbsp; 0 &nbsp; 1 &nbsp; 0 &nbsp; 1 &nbsp; //1,3,5&nbsp; 0 &nbsp; 1 &nbsp; 1 &nbsp; 0 &nbsp; 1 &nbsp; //2,3,5&nbsp; 1 &nbsp; 0 &nbsp; 0 &nbsp; 1 &nbsp; 1 &nbsp; //1,4,5&nbsp; 0 &nbsp; 1 &nbsp; 0 &nbsp; 1 &nbsp; 1 &nbsp; //2,4,5&nbsp; 0 &nbsp; 0 &nbsp; 1 &nbsp; 1 &nbsp; 1 &nbsp; //3,4,5
以下是实现：
#include&lt;stdio.h&gt;
#define MAXNUM 50
void init(int* pac, int n, int m);void conver]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2008-04-01 23:31:00</pubDate>
		</item>
				<item>
		<title><![CDATA[统计单词数小程序--C]]></title>
		<link>http://blog.pfan.cn/xboy/33808.html</link>
		<description><![CDATA[#include&lt;stdio.h&gt;int main(){&nbsp;&nbsp;&nbsp; char ch;&nbsp;&nbsp;&nbsp; int word = 0;&nbsp;&nbsp;&nbsp; int count = 0;
&nbsp;&nbsp;&nbsp; while((ch=getchar())!='\n'){&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(ch == ' ')&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; word = 0;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else if(0 == word){&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; count++;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; word = 1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; printf("the numbers of words is: %d", count);&nbsp;&nbsp;&nbsp; return 0;}]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2008-04-01 21:54:00</pubDate>
		</item>
				<item>
		<title><![CDATA[c/c++内存划分]]></title>
		<link>http://blog.pfan.cn/xboy/33805.html</link>
		<description><![CDATA[一、一个经过编译的C/C++的程序占用的内存分成以下几个部分：1、栈区（stack）：由编译器自动分配和释放 ，存放函数的参数值、局部变量的值等，甚至函数的调用过程都是用栈来完成。其操作方式类似于数据结构中的栈。2、堆区（heap） ：一般由程序员手动申请以及释放， 若程序员不释放，程序结束时可能由OS回收 。注意它与数据结构中的堆是两回事，分配方式类似于链表。3、全局区（静态区）（static）：全局变量和静态变量的存储是放在一块的，初始化的全局变量和静态变量在一块区域， 未初始化的全局变量和未初始化的静态变量在相邻的另一块区域。程序结束后由系统释放空间。 4、文字常量区：常量字符串就是放在这里的。 程序结束后由系统释放空间。5、程序代码区：存放函数体的二进制代码。
下面的例子可以完全展示不同的变量所占的内存区域：

//main.cppint a = 0; 全局初始化区char *p1; 全局未初始化区main(){&nbsp;&nbsp; int b; //栈中char s[] = "abc"; //栈中char *p2; //栈中char *p3 = "123456"; //123456\0在常量区，p3在栈上static int c =0； //全局（静态）初始化区//以下分配得到的10和20字节的区域就在堆区p1 = (char *)malloc(10);&nbsp;&nbsp; p2 = new char[20];//(char *)malloc(20);strcpy(p1, "123456"); //123456\0放在常量区，编译器可能会将它与p3所指向的"123456"优化成一个地方。}
二、栈（stack）和堆（heap）具体的区别。1、在申请方式上栈（stack）: 现在很多人都称之为堆栈，这个时候实际上还是指的栈。它由编译器自动管理，无需我们手工控制。 例如，声明函数中的一个局部变量 int b 系统自动在栈中为b开辟空间；在调用一个函数时，系统自动的给函数的形参变量在栈中开辟空间。堆（heap）: 申请和释放由程序员控制，并指明大小。容易产生memory leak。在C中使用malloc函数。如：p1 = (char *)malloc(10);在C++中用new运算符。如：p2 = new char[20];//(char *)m]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2008-04-01 21:20:00</pubDate>
		</item>
				<item>
		<title><![CDATA[论递归方法的实质和普遍意义(李志昌)]]></title>
		<link>http://blog.pfan.cn/xboy/32513.html</link>
		<description><![CDATA[作者：李志昌&nbsp;&nbsp;主题类号：B3/逻辑 



【 文献号 】1-87【原文出处】楚雄师专学报【原刊期号】200001【原刊页号】119～123【分 类 号】B3【分 类 名】逻辑【复印期号】200005【 标 题 】论递归方法的实质和普遍意义【 作 者 】李志昌【作者简介】李志昌，副教授，云南省楚雄州委党校文史科技教研室主任。楚雄州党校，云南楚雄 675000【内容提要】从方法论意义上说，递归方法是一种从简单到复杂、从低级到高级的可连续操作的解决问题的方法。它的每一步骤都是能行可操作的，各步骤之间是连续转换的。递归定义是用简单的、自明的要素描述、构造、说明复杂的整体。递归方法是通过解决简单的问题来解决复杂的问题。在人们的思维过程中，普遍存在着递归机制。递归方法是一种处理问题的精致技巧、解决问题的有效方法。从哲学方法论角度研究递归方法，具有重要的意义。【关 键 词】递归/递归操作/递归定义/递归证法/递归的实质【 正 文 】中图分类号：B812.3 文章标识码：A 文章编号：1008-5068(2000)01-0119-05递归定义和递归方法是逻辑学、数学、计算机科学（程序设计）中经常运用的定义和方法，它们具有精确的含义，特别在解决某些困难问题时很有效，它仿佛是一种有趣而精巧的加工器，能使问题得到完满解决。在人的思维活动中，也普遍存在递归现象和递归机制。对于某些问题，只能用递归方法来处理；对于某些问题，用递归方法处理比其他方法更有效。在计算机程序中，递归可以构成一种自动推理机制。人工智能的主要问题之一，就是让计算机具有自动推理的功能。建立了一种“递归机制”后，一旦输入初始值（前提）计算机就可以进行自动推理而得到结果（结论）。递归方法是一种处理问题的精致技巧、解决问题的有效方法。一、“递归”概念所谓递归（来自拉丁文recurso，原意指往回跑、召回等）是指借助于“回归”而把未知的归结为已知的。所谓递归函数是一种数论函数，就是说这种函数的定义域和值域都是自然数，并且对未知数值的计算往往是要回归到已知数值才能求出。递归是一种循环结构，它把“较复杂”情形的计算，递次地归结为“较简单”情形的计算，一直归结到“最简单”情形的计算，并得到计算结果为止。这就是递归的实质。对于定义是递归的，数据结构是递归的，问题的解法是递归的，都可以采用递归方法来处理。“递]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2008-02-01 23:40:00</pubDate>
		</item>
				<item>
		<title><![CDATA[转:我的嵌入式之路（新手起步）]]></title>
		<link>http://blog.pfan.cn/xboy/32450.html</link>
		<description><![CDATA[转:我的嵌入式之路（新手起步）前言
这个题目很大，给人一种感觉我好像很成功，其实不然。实际上自己水平不高，甚至很低，但是做过了一些曲折的学习道路，同时把自己真实的学习历程表达出来，希望对后来者有借鉴的意义，甚幸！
工作三年，几成废人
我2000年毕业于华中地区的一个理工科大学，专业是机械电子，我当时已经签了一家内陆某个省级机关工作，家里八辈是农民，并且很偏远，能够进入这样的地 方是祖坟有风水。但在毕业前夕有个进入it的机会，我本想进去的，家里人极力反对，阻力可想而知。同时要交4000元的违约金，对我来说是天文数字。大学 里的费用很多是借的，几乎将近一半的费用是在大学勤工俭学挣的，为了省钱，高中一个学期回家一次，大学一年回去一次。并且我个人也有特殊的人生背景（悲景 更确切），这里不多说了，写十篇也写不完，同时偏离主题。这样我就参加了工作。一张报纸一杯茶的日子，几乎下班后有种很空虚和恐慌的感觉。在工作中虽然是 与自己专业有点关系，但是很少。专业几乎荒废。我自己也思考，如果再不出去，自己将会成废人，只好让国家养了。两年后决定出去，但是几成废人，谁要呢，只 好到学校去镀金。这是中国教育和社会的悲哀！
至于专业就改为计算机方面，听说好找工作，我说实话不是很对计算机特别感兴趣，生存第一需要。不要笑我，哈哈！考研成绩出来，超过了国家线几十分。那个方向要两个，我第三，但是那年非碘，不面试就按分数来排，自然我落选了。其实给我面试机会也不一定要我，哈哈，自己几斤几两很清楚。最后调剂到另外一个学校，交钱，咬咬牙，交吧！现在仍然债台高筑！
进入学校前夕
为什么要把这段列出，看后就知道了。单位有网络，经常上网查些英语资料，在那里唯独英语没有丢很多。于是我就在网上查资料，学什么好呢，最后确定学嵌入式把，听说跟硬件相对比较紧密！而我在大学里多少学习了数字电路，单片机等，所以多少也有所利用，不会真的一无所知。当然在这之前也自学过数据结构，计算机组成原理等。C 语言在大学就学了。哈哈这就是我的家底。
我知道自己的基础差，于是我就拿操作系统，数据库、数据结构、c++来看，机关有这个好处，空余时间多，于是平常就看书，很痛苦，没有人请教。另外就上网到论坛上去，我就到各个专业的技术论坛，其实是电子论坛和嵌入式论坛。我几乎没有发帖，几乎把几个大型的出名的论坛的帖子翻遍了，虽然有很多重复的，我才知]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2008-01-27 15:47:00</pubDate>
		</item>
				<item>
		<title><![CDATA[java&nbsp;摘录]]></title>
		<link>http://blog.pfan.cn/xboy/32398.html</link>
		<description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 要编程从键盘上连续读取一大段数据时，应尽量将读取数据的过程放在函数中完成。使用-1来做为键盘输入的结束点。在编写函数的代码不应直接使用System.in来读取数据，而是用一个InputStream类型的形式参数对象来读取数据，然后将System.in作为实参传递给InputStream类型的形参来调用该函数。
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 初始化表单的限制
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.初始化程序可以执行用赋值语句表达的初始化。&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.初始化程序不能调用热河的包含异常错误的方法。&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.如果初始化程序调用一个包含异常错误的方法，不不能进行错误恢复。&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 为了初始化类成员，在static初始化块中放置初始化代码。为了初始化实例成员，就要在构造函数中放置初始化代码了。]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2008-01-24 21:45:00</pubDate>
		</item>
				<item>
		<title><![CDATA[不调用库函数，实现strcpy函数]]></title>
		<link>http://blog.pfan.cn/xboy/32367.html</link>
		<description><![CDATA[题目： &nbsp;&nbsp;&nbsp;&nbsp;已知strcpy函数的原型是： &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;char&nbsp;*&nbsp;strcpy(char&nbsp;*&nbsp;strDest,const&nbsp;char&nbsp;*&nbsp;strSrc); &nbsp;&nbsp;&nbsp;&nbsp;1.不调用库函数，实现strcpy函数。 &nbsp;&nbsp;&nbsp;&nbsp;2.解释为什么要返回char&nbsp;*。 &nbsp;&nbsp;&nbsp;&nbsp;解说： &nbsp;&nbsp;&nbsp;&nbsp;1.strcpy的实现代码 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;char&nbsp;*&nbsp;strcpy(char&nbsp;*&nbsp;strDest,const&nbsp;char&nbsp;*&nbsp;strSrc)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;((strDest==NULL)||(strsrc="/=NULL"))&nbsp;//[1]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;"Invalid&nbsp;argument(s)";&nbsp;//[2]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;char&nbsp;*&nbsp;strDestCopy=strDes]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2008-01-23 13:44:00</pubDate>
		</item>
				<item>
		<title><![CDATA[linux内核查找和源代码下载]]></title>
		<link>http://blog.pfan.cn/xboy/32361.html</link>
		<description><![CDATA[内核版本 要编译一个最新的内核，您需要首先下载它的源代码。在您下载内核的源代码前，您要知道到您要找什么。首先要问您自己的问题是 -- 您需要一份稳定的还是测试版的内核？ 稳定版内核通常版本号第二位用偶数数字 -- 例如, 2.0.38、2.2.15、2.2.18 和 2.4.1 是被认为是"稳定"的内核(分别由于其包含 0、2、2 和 4)。如果您想尝试测试版内核，您通常需要找那些版本号第二位是奇数的号码又最高的内核。例如，2.3.99 和 2.1.38 都是测试版内核(分别由于其包含 3 和 1)。 内核版本历史 2.2 系列的内核被认为是较新而且稳定的内核。如果"较新"和"稳定"是您想要的，查找一个版本号的第三位是最高的 2.2 内核(2.2.16 是目前最新的版本)。 当 2.2 系列的内核仍在开发中，2.3 系列已经开始了。这个系列是作为将被集成到 2.4 稳定版系列的新功能和高级功能的测试版。2.3 系列已经到了 2.3.99，其开发已经停止。开发人员已经开始着手 2.4.0。如果您喜欢冒险使用最最新的技术，您可能想使用可以找到的最新的 2.4 系列内核。 2.4 版内核警告信息 Once a real 2.4 series kernel comes out (like 2.4.0), don't assume that the kernel is ready for use on a mission-critical system like a server. Even though 2.4 is supposed to be a stable series, early 2.4 kernels are likely to be not quite up to snuff. As is often the case in the computer industry, the first version of anything can have fairly sizable bugs. While this may not be a problem if you're testing the kernel on your home workstation, it is a risk you may want to avoid when you machin]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2008-01-23 10:09:00</pubDate>
		</item>
				<item>
		<title><![CDATA[Linux&nbsp;内核源代码的阅读和工具介绍]]></title>
		<link>http://blog.pfan.cn/xboy/32332.html</link>
		<description><![CDATA[作 者： 王克强 　蓝森林 http://www.lslnet.com--------------------------------------------------------　　随着linux的逐步普及，现在有不少人对于Linux的安装及设置已经比较熟悉了。与Linux 的蓬勃发展相适应，想深入了解Linux的也越来越多。而要想深入了解Linux，就需要阅读和分析linux内核的源代码。　　Linux的内核源代码可以从很多途径得到。一般来讲，在安装的linux系统下，/usr/src/linux目录下的东西就是内核源代码。另外还可以从互连网上下载,解压缩后文件一般也都位于linux目录下。内核源代码有很多版本，目前最新的稳定版是2.2.14。 　　 　许多人对于阅读Linux内核有一种恐惧感，其实大可不必。当然，象Linux内核这样大而复杂的系统代码，阅读起来确实有很多困难，但是也不象想象的那么高不可攀。只要有恒心，困难都是可以克服的。也不用担心水平不够的问题，事实上，有很多事情我们不都是从不会到会，边干边学的吗？ 　　 　任何事情做起来都需要有方法和工具。正确的方法可以指导工作，良好的工具可以事半功倍。对于Linux 内核源代码的阅读也同样如此。下面我就把自己阅读内核源代码的一点经验介绍一下，最后介绍Window平台下的一种阅读工具。 　　　对于源代码的阅读，要想比较顺利，事先最好对源代码的知识背景有一定的了解。对于linux内核源代码来讲，我认为，基本要求是：1、操作系统的基本知识；2、对C语言比较熟悉，最好要有汇编语言的知识和GNU C对标准C的扩展的知识的了解。
另外在阅读之前，还应该知道Linux内核源代码的整体分布情况。我们知道现代的操作系统一般由进程管理、内存管理、文件系统、驱动程序、网络等组成。看一下Linux内　　 　核源代码就可看出，各个目录大致对应了这些方面。Linux内核源代码的组成如下（假设相对于linux目录）： 　
　arch 这个子目录包含了此核心源代码所支持的硬件体系结构相关的核心代码。如对于X86平台就是i386。 　　include 这个目录包括了核心的大多数include文件。另外对于每种支持的体系结构分别有一个子目录。　init 此目录包含核心启动代码。 　　mm 此目录包含了所有的内存管理代码。与具体硬件体系结]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2008-01-21 09:53:00</pubDate>
		</item>
				<item>
		<title><![CDATA[Meta标签详解--转载]]></title>
		<link>http://blog.pfan.cn/xboy/32250.html</link>
		<description><![CDATA[引言
&nbsp;
　　您的个人网站即使做得再精彩，在“浩瀚如海”的网络空间中，也如一叶扁舟不易为人发现，如何推广个人网站，人们首先想到的方法无外乎以下几种：
　　
　　●　在搜索引擎中登录自己的个人网站
　　●　在知名网站加入你个人网站的链接
　　●　在论坛中发帖子宣传你的个人网站
&nbsp;
　　很多人却忽视了HTML标签META的强大功效，一个好的META标签设计可以大大提高你的个人网站被搜索到的可能性，有兴趣吗，谁我来重新认识一下META标签吧！ 
&nbsp;
　　META标签是HTML语言HEAD区的一个辅助性标签，它位于HTML文档头部的&lt;HEAD&gt;标记和&lt;TITLE&gt;标记之间，它提供用户不可见的信息。meta标签通常用来为搜索引擎robots定义页面主题，或者是定义用户浏览器上的cookie；它可以用于鉴别作者，设定页面格式，标注内容提要和关键字；还可以设置页面使其可以根据你定义的时间间隔刷新自己,以及设置RASC内容等级，等等。
&nbsp;
详细介绍
&nbsp;
　　下面介绍一些有关 标记的例子及解释。 
　　META标签分两大部分：HTTP标题信息(HTTP-EQUIV)和页面描述信息(NAME)。 &nbsp;
&nbsp;
　　★HTTP-EQUIV
　　HTTP-EQUIV类似于HTTP的头部协议，它回应给浏览器一些有用的信息，以帮助正确和精确地显示网页内容。常用的HTTP-EQUIV类型有： 
&nbsp;
　　1、Content-Type和Content-Language (显示字符集的设定) 
　　说明：设定页面使用的字符集，用以说明主页制作所使用的文字已经语言，浏览器会根据此来调用相应的字符集显示page内容。 
　　用法：&lt;Meta http-equiv="Content-Type" Content="text/html; Charset=gb2312"&gt;
　　　　　　&lt;Meta http-equiv="Content-Language" Content="zh-CN"&gt; 
　　注意：　该META标签定义了HTML页面所使用的字符集为GB2132，就是国标汉字码。如果将其中的“charset=GB2312”替换成“BIG5”，]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2008-01-17 15:45:00</pubDate>
		</item>
				<item>
		<title><![CDATA[删除字符串中相同的字符并排序--c]]></title>
		<link>http://blog.pfan.cn/xboy/31294.html</link>
		<description><![CDATA[#include "stdio.h"#include "string.h"
int main(){&nbsp;char str[30] = "acegfddcbag";&nbsp;char *p, *q, *r, c;&nbsp;for(p=str; *p; p++){&nbsp;&nbsp;for(q=r=p; *q; q++)&nbsp;&nbsp;&nbsp;if(*r &gt; *q) r = q;&nbsp;&nbsp;if(r != q){&nbsp;&nbsp;&nbsp;c = *r; *r = *p; *p = c;&nbsp;&nbsp;}&nbsp;}&nbsp;for (p=str; *p; p++){&nbsp;&nbsp;for(q=p; *p==*q; q++)&nbsp;&nbsp;&nbsp;;&nbsp;&nbsp;strcpy(p+1, q);&nbsp;}&nbsp;printf("%s", str);
&nbsp;return 0;}]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2007-12-06 21:15:00</pubDate>
		</item>
				<item>
		<title><![CDATA[数字翻转成字符--c递归]]></title>
		<link>http://blog.pfan.cn/xboy/31293.html</link>
		<description><![CDATA[#include "stdio.h"void convert(char*, int);
int main(){&nbsp;int number;&nbsp;&nbsp;char str[10] = "";&nbsp;scanf("%d", &amp;number);&nbsp;convert(str, number);&nbsp;puts(str);
&nbsp;return 0;}
void convert(char*s, int n){&nbsp;int i;&nbsp;if((i=n/10) !=0 ) convert(s+1, i);&nbsp;*s = n%10 + '0';}]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2007-12-06 21:02:00</pubDate>
		</item>
				<item>
		<title><![CDATA[数字转换成字符--c递归]]></title>
		<link>http://blog.pfan.cn/xboy/31291.html</link>
		<description><![CDATA[#include "stdio.h"void convert(int);
int main(){&nbsp;int number;
&nbsp;scanf("%d", &amp;number);&nbsp;if(number &lt; 0){&nbsp;&nbsp;putchar('-');&nbsp;&nbsp;number = -number;&nbsp;}&nbsp;convert(number);
&nbsp;return 0;}
void convert(int n){&nbsp;int i;&nbsp;if((i=n/10) !=0 ) convert(i);&nbsp;putchar(n%10 + '0');&nbsp;}]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2007-12-06 20:55:00</pubDate>
		</item>
				<item>
		<title><![CDATA[字符串翻转--c递归]]></title>
		<link>http://blog.pfan.cn/xboy/31290.html</link>
		<description><![CDATA[#include "stdio.h"void intverp(char*);
int main(){&nbsp;char s[10] = "hello!";&nbsp;intverp(s);&nbsp;return 0;}
void intverp(char* s){&nbsp;if(!*s) return;&nbsp;intverp(s+1);&nbsp;printf("%c", *s);}]]></description>
		<author><![CDATA[baiyshu]]></author>
		<pubDate>2007-12-06 20:51:00</pubDate>
		</item>
		</channel>
</rss>