自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

niko's blog

------------------------------------------------------------Determination

  • 博客(18)
  • 收藏
  • 关注

转载 理解C语言位域

有些信息在存储时,并不需要占用一个完整的字节, 而只需占几个或一个二进制位。例如在存放一个开关量时,只有0和1 两种状态,用一位二进位即可。为了节省存储空间,并使处理简便,C语言又提供了一种数据结构,称为“位域”或“位段”。所谓“位域”是把一个字节中的二进位划分为几个不同的区域,并说明每个区域的位数。每个域有一个域名,允许在程序中按域名进行操作。 这样就可以把几个不同的对象用一个字节的二进制位域来

2008-08-04 15:45:00 658

原创 Usage of get_fs and set_fs

 最近在看 drbd的源代码,内核模块 socket通信中有下面一段程序: mm_segment_t oldfs;    struct kvec iov = {        .iov_base = buf,        .iov_len = size,    };    struct msghdr msg = {        .msg_iovlen = 1

2008-08-04 09:19:00 737

转载 内核中的 likely() 与 unlikely()

 在 2.6 内核中,随处可以见到 likely() 和 unlikely() 的身影,那么为什么要用它们?它们之间有什么区别? 首先要明确:            if(likely(value)) 等价于 if(value)            if(unlikely(value)) 也等价于 if(value)也就是说 likely() 和 unlikely() 从阅读和理

2008-07-25 10:09:00 674 1

转载 Linux kernel makefile 文档

 Linux Kernel MakefilesThis document describes the Linux kernel Makefiles.1. OverviewThe Makefiles have five parts:Makefile the top Makefile. .config the kernel

2008-07-23 13:59:00 3041 1

原创 kernel netlink connector 学习笔记

参考文章: 连接器(Netlink Connector)及其应用    Linux 系统内核空间与用户空间通信的实现与分析  内核文档 Documentation/connector/connector.txt测试用例:     内核模块 Documentation/connector/cn_test.c                         用户态程序 Document

2008-07-20 20:03:00 1835

原创 Kzalloc与Kmalloc差异

 先看看kernel里的定义:/** * kzalloc - allocate memory. The memory is set to zero. * @size: how many bytes of memory are required. * @flags: the type of memory to allocate (see kmalloc). */static in

2008-07-20 19:48:00 14395 3

原创 程序员专用字体-Monospace/Fixed Width Programmer's Fonts

Good Programming Font CriteriaCrisp clear characters.Extended characterset.Good use of whitespace.l, 1 and i are easily distinguished0, o and O are easily distinguishedforward quot

2008-07-19 13:07:00 2761

原创 VIM插件之NERD_comments.vim

下载地址: http://www.vim.org/scripts/script.php?script_id=1218 install details ***NOTE***: In version 2.0.0 the script file and help file were renamed to NERD_commenter.vim and NERD_commenter.txt. If yo

2008-07-09 16:31:00 2433

原创 Adding a New System Call into the Linux Kernel 2.6

==========================================Stage 1: To modify the kernel to add our own system call==========================================1. Edit file /usr/src/linux/arch/i386/kernel/syscall_t

2008-06-28 21:27:00 797

原创 判断字符串是否符合时间格式

时间格式为:HH:mm(12:39)Parse(),ParseExact发现格式不匹配不会返回null,会产生FormatException异常。try   {        DateTime TaskRunTime = DateTime.ParseExact(this.textBox_Time.Text.ToString(), "HH:mm", null);    }ca

2008-06-28 21:26:00 3122

原创 C# ArrayList 操作

C# :Convert ArrayList to string[] :string[] strArray = arrList.ToArray(typeof(string)) as string[];Arraylist遍历删除元素 :正向:for (int i=0;i<FileDirtyList.Count;i++)                 if (((Fil

2008-06-28 21:25:00 777

原创 Sco unix openserver 5.0.7 mount iso image howto

marry -a /tmp/image mount /dev/marry/tmp/image /mnt

2008-06-28 21:21:00 1019

原创 Sco unix openserver 5.0.7 安装8139网卡

1、下载 8139.VOL 驱动程序 fromhttp://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=3&PNid=14&PFid=6&Level=5&Conn=4&DownTypeID=3&GetDown=false2、刻录SCO UNIX openserver 5.0.7时用ultraISO把驱动塞到光盘里安装好o

2008-06-28 21:19:00 2324 1

原创 The source of image UBB codes creator

编程采用C plus plus language,VI text editor and GDB.单文件代码(未在代码安全性方面做过多考虑)#include        iostream>#include        string>#include        exception>using namespace std;int main()...{        const strin

2007-10-18 17:00:00 632

原创 About startdict

Download link: http://stardict.sourceforge.net/Install Dictionaries in Linux:To install these tarball dictionaries, do this:tar -C /usr/share/startdic/dic/ -xjvf a.tar.bz2Install Dictionaries in W

2007-09-23 10:24:00 852

原创 安装农历时钟 lunar applet

OS:Fedora7 下载地址:http://ftp.inlsd.org/lunar-applet/     tar.gz :lunar-applet-1.6.tar.gz 解压: $ tar -zxf lunar-applet-1.x.tar.gz  安装: $cd lunar-applet-1.x/$./configure$make$make install 

2007-09-22 19:35:00 1086

原创 Schedule of the following week(9.24~9.30)

9.24~9.30 Just master the linux Makefile.    Reference: Managing Projects with GNU Make Download:http://www.oreilly.com/catalog/make3/book/index.csp    Can read very complicated Makefile files .

2007-09-22 19:31:00 672

原创 Go to hell !!!

今天心情很不好。Shit.fuck.go to hellThe damn Mid-autumn,也不让人清净清净。一年多以来,我都选择了逃避,到了该正视的时候了,不能再由别人牵着鼻子走了。应该下定决心制定份长远计划了,要不只能一败再败了。以此Blog的建立来见证我的决心,每天都上来写下自己一天的所做所为,不为别的,只想以此坚定自己的决心,决不能让自己放任自流。allen,rid

2007-09-22 19:25:00 669

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除