<?xml version="1.0" encoding="gb2312"?>
<rss version="2.0">
<channel>
<title><![CDATA[aQuei&#39;s blog]]></title>
        <image>
        <title>http://hi.baidu.com</title>
        <link>http://hi.baidu.com</link>
        <url>http://img.baidu.com/img/logo-hi.gif</url>
        </image>
<description><![CDATA[3EA8951AF8962CB625DE25977E5CFE82]]></description>
<link>http://hi.baidu.com/aquei</link>
<language>zh-cn</language>
<generator>www.baidu.com</generator>
<ttl>5</ttl>


<item>
        <title><![CDATA[最简单的makefile文件]]></title>
        <link><![CDATA[http://hi.baidu.com/aquei/blog/item/f5893fc79e66b9d5d10060ce.html]]></link>
        <description><![CDATA[
		
		<font face="monospace"> <br>
<table border="1" bgcolor="#000000" width="100%">
    <tbody>
        <tr>
            <td><font color="#ffffff">  <font color="#808080">##Makefile#############################3</font><br>
            <font color="#808080">#this is a standard Makefile file</font><br>
            <font color="#808080">#thx sunhp</font><br>
            <font color="#00c0c0">CC</font>=gcc<br>
            <font color="#00c0c0">CFLAGS</font>=-Wall -ggdb -I. <br>
            <font color="#00c0c0">HEADFILE</font>=def.h<br>
            <font color="#00c0c0">OBJ</font>=main.o<font color="#0000ff">\</font><br>
            <font color="#0000ff">&nbsp;&nbsp;&nbsp;&nbsp;</font>fun.o<br>
            <br>
            <font color="#c0c000"><strong>.PHONY:</strong></font>all clean<br>
            <font color="#00c0c0">all:</font>main<br>
            <font color="#00c0c0">main:</font>main.o fun.o<br>
            <font color="#00ffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#00c0c0">$(CC)</font><font color="#00ffff"> </font><font color="#00c0c0">$(OBJ)</font><font color="#00ffff"> -o main</font><br>
            <br>
            <font color="#00c0c0">main.o:</font>main.c <font color="#00c0c0">$(HEADFILE)</font><br>
            <font color="#00ffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#00c0c0">$(CC)</font><font color="#00ffff"> -c </font><font color="#00c0c0">$(CFLAGS)</font><font color="#00ffff"> </font><font color="#00c0c0">$(HEADFILE)</font><font color="#00ffff"> main.c</font><br>
            <br>
            <font color="#00c0c0">fun.o:</font>fun.c <font color="#00c0c0">$(HEADFILE)</font><br>
            <font color="#00ffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#00c0c0">$(CC)</font><font color="#00ffff"> -c </font><font color="#00c0c0">$(CFLAGS)</font><font color="#00ffff"> fun.c</font><br>
            <br>
            <font color="#00c0c0">clean:</font><br>
            <font color="#0000ff">&nbsp;&nbsp;&nbsp;&nbsp; -</font><font color="#00ffff">rm *.o</font><br>
            <font color="#0000ff">&nbsp;&nbsp;&nbsp;&nbsp; -</font><font color="#00ffff">rm main</font><br>
            <font color="#808080">#################################</font><br>
            <br>
            </font></td>
        </tr>
    </tbody>
</table>
</font> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/aquei/blog/category/%C0%DB%C1%A2%BF%CC%CB%C0%5Flinux">累立刻死_linux</a>&nbsp;<a href="http://hi.baidu.com/aquei/blog/item/f5893fc79e66b9d5d10060ce.html#comment">查看评论</a>]]></description>
        <pubDate>2009年07月07日 星期二  11:46</pubDate>
        <category><![CDATA[累立刻死_linux]]></category>
        <author><![CDATA[aQuei]]></author>
		<guid>http://hi.baidu.com/aquei/blog/item/f5893fc79e66b9d5d10060ce.html</guid>
</item>

<item>
        <title><![CDATA[《RH033学习笔记》]]></title>
        <link><![CDATA[http://hi.baidu.com/aquei/blog/item/0202eff8babd7c06d8f9fd25.html]]></link>
        <description><![CDATA[
		
		<font size="3">《RH033学习笔记》<br>
一、Unix哲学<br>
&nbsp;&nbsp;&nbsp;  avoid captive user interfaces<br>
&nbsp;&nbsp;&nbsp;  避免俘虏型用户接口(避免强制性用户界面)<br>
&nbsp;&nbsp;&nbsp;  例如，那种只点&quot;确定&quot;的对话框就属于&ldquo;captive user interfaces&rdquo;<br>
二、获取帮助文档<br>
&nbsp;&nbsp;&nbsp;  （1）whatis command<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  e.g whatis find<br>
&nbsp;&nbsp;&nbsp;  （2）&lt;command&gt; --help<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  e.g whatis --help<br>
&nbsp;&nbsp;&nbsp;  （3）man and info<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  man中Usage的一些符号：[]参数、&lt;&gt; 不定项、|或、- 参数<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  info的使用<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &lt;Tab&gt; 移动到下个链接<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &lt;Enter&gt; 转到鼠标所在的链接<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  n 浏览下一个主题<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  p 浏览上一个主题<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  u 浏览上一层主题<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  s 搜索<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  q 退出<br>
&nbsp;&nbsp;&nbsp;  （4）/usr/share/doc<br>
&nbsp;&nbsp;&nbsp;  （5）read hat documentatition<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  https://www.redhat.com/search<br>
三、file命令：查看文件类型<br>
<br>
四、cat命令：<br>
&nbsp;&nbsp;&nbsp;  -A 显示所有<br>
&nbsp;&nbsp;&nbsp;  -s 合并空行<br>
&nbsp;&nbsp;&nbsp;  -b 显示行号<br>
<br>
五、命令参数 -abc = -a -b -c<br>
六、通配符（wildcard）<br>
&nbsp;&nbsp;&nbsp;  1 *任意<br>
&nbsp;&nbsp;&nbsp;  2 ?任意一个<br>
&nbsp;&nbsp;&nbsp;  3 []只在其中<br>
&nbsp;&nbsp;&nbsp;  4 [^]不再其中<br>
<br>
七、history命令<br>
八、命令的一些技巧<br>
&nbsp;&nbsp;&nbsp;  !cmdindex 执行第cmdindex个历史命令<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  e.g. $&gt;!1<br>
&nbsp;&nbsp;&nbsp;  ^old^new 把最后一个命令中的old替换成new后执行<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  e.g. $&gt;ping 192.168.1.100<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;   $&gt;^100^1<br>
&nbsp;&nbsp;&nbsp;  {a,b}{1,2}对a、b和1、2进行排列组合即为a1 a2 b1 b2<br>
&nbsp;&nbsp;&nbsp;  &lt;ctrl-r&gt;查找命令<br>
&nbsp;&nbsp;&nbsp;  e.g. (reverse-i-search)`': <br>
七、cd ~usrname切换到usrname的home目录<br>
&nbsp;&nbsp;&nbsp;  e.g. $&gt;cd~root<br>
<br>
<br>
八、``等价于$()<br>
<br>
九、$[]四则运算<br>
&nbsp;&nbsp;&nbsp;  e.g. $&gt; echo $[ 1 + 2 ]<br>
<br>
九、&quot;&quot; 禁止符号，除了 &ldquo;$ \ ` !&rdquo;， ''禁止所有特殊符号。<br>
十、得到最后一个命令的参数<br>
&nbsp;&nbsp;&nbsp;  &lt;ALT-.&gt;<br>
&nbsp;&nbsp;&nbsp;  &lt;ESC&gt; .<br>
&nbsp;&nbsp;&nbsp;  e.g. $&gt;ping 192.168.1.1<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;&nbsp;  $&gt;telnet &lt;ESC&gt;.<br>
十一、设置环境变量<br>
&nbsp;&nbsp;&nbsp;  set -o<br>
&nbsp;&nbsp;&nbsp;  set +o<br>
十二、terminal快捷键<br>
&nbsp;&nbsp;&nbsp;  打开新标签&lt;ctrl-shift-t&gt;<br>
&nbsp;&nbsp;&nbsp;  切换标签&lt;ctrl-PgUp/PgDn&gt;<br>
&nbsp;&nbsp;&nbsp;  切换标签至N&lt;alt+num&gt;<br>
&nbsp;&nbsp;&nbsp;  关闭标签&lt;ctrl-shift-w&gt;<br>
&nbsp;&nbsp;&nbsp;  复制&lt;ctrl-shift-c&gt;<br>
&nbsp;&nbsp;&nbsp;  粘帖&lt;ctrl-shift-v&gt;<br>
<br>
十三、cut命令:显示每行的某列<br>
&nbsp;&nbsp;&nbsp;  e.g. 文件/etc/passwd，列分割符为:，显示第1列。<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;   $&gt;cut -f1 -d: /etc/passwd<br>
<br>
十四、sort命令：排序<br>
&nbsp;&nbsp;&nbsp;  -n 按数字排序<br>
&nbsp;&nbsp;&nbsp;  -r 倒序<br>
十五、RHEL的mail<br>
&nbsp;&nbsp;&nbsp;  见《RHEL中mail的使用》<br>
十六、xargs<br>
&nbsp;&nbsp;&nbsp;  command1 | xargs command2<br>
十七、tee命令<br>
&nbsp;&nbsp;&nbsp;  $&gt;find /etc/ -name &quot;passwd&quot; |tee info.txt<br>
十八、chmod 更改文件类型<br>
&nbsp;&nbsp;&nbsp;  -R recursize递归更改该路径下所有文件<br>
十九、vi的移动<br>
&nbsp;&nbsp;&nbsp;  向前移动一个单词b<br>
&nbsp;&nbsp;&nbsp;  段落移动{}<br>
&nbsp;&nbsp;&nbsp;  整句移动()<br>
二十、撤销<br>
&nbsp;&nbsp;&nbsp;  撤销u<br>
&nbsp;&nbsp;&nbsp;  取消上一次撤销&lt;ctrl-r&gt;<br>
&nbsp;&nbsp;&nbsp;  恢复当行的所有变动U<br>
二十一、命令模式的一些技巧<br>
&nbsp;&nbsp;&nbsp;  dtc 删除光标到c之间的所有内容<br>
&nbsp;&nbsp;&nbsp;  rc 替换光标所在字符为c<br>
&nbsp;&nbsp;&nbsp;  2dd 删除2行<br>
&nbsp;&nbsp;&nbsp;  2yy 复制2行<br>
&nbsp;&nbsp;&nbsp;  2x 删除2个字符<br>
&nbsp;&nbsp;&nbsp;  R输入文字取代掉光标上的字&lt;ESC&gt;<br>
<br>
二十二、<br>
显示硬盘空间：df -h<br>
显示目录下文件大小： du -s -h<br>
<br>
&nbsp;&nbsp;&nbsp;  低级格式化<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  fdformat<br>
&nbsp;&nbsp;&nbsp;  格式化<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  mkfs <br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  mke2fs<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  mkfs -t vfat<br>
二十三、打包、压缩<br>
&nbsp;&nbsp;&nbsp;  1、tar 命令<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  tar cvf archive_name.tar direcotry/<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  tar tf archive+name.tar<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  tar tvf archive_name.tar<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  tar xvf archive_name.tar<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  tar&nbsp;&nbsp;&nbsp;  cvzf archive_name.tar.gz direcotry/<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  tar xvzf <br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  tar cvjf archive_name.tar.gz2<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  *备份到磁盘 tar cvfM 恢复从磁盘tar xvfM<br>
&nbsp;&nbsp;&nbsp;  2、gzip命令<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  gzip file<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  -v 显示百分比<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  -c 显示信息<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  gunzip file.gz<br>
<br>
二十四、变量<br>
&nbsp;&nbsp;&nbsp;  variables<br>
&nbsp;&nbsp;&nbsp;  local variables<br>
&nbsp;&nbsp;&nbsp;  environment variables<br>
&nbsp;&nbsp;&nbsp;  PS1<br>
&nbsp;&nbsp;&nbsp;  set -o <br>
&nbsp;&nbsp;&nbsp;  unset <br>
<br>
&nbsp;&nbsp;&nbsp;  alias<br>
二十五 登录登出脚本<br>
&nbsp;&nbsp;&nbsp;  1、Login shells<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  /etc/profile<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  /etc/profile.d/*<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  ~/.bashrc_profile传回值输出到屏幕放入~/.bashrc_profile<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  ~/.bashrc<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  /etc/.bashrc<br>
&nbsp;&nbsp;&nbsp;  2、Non-login shells<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  ~/.bashrc<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  /etc/.bashrc<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  /etc/profile.d<br>
&nbsp;&nbsp;&nbsp;  3、Logout<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  ~/.bash_logout<br>
<br>
二十六、w：显示当前用户状态命令<br>
二十七、last：显示登录信息<br>
<br>
<br>
二十八、特殊权限<br>
&nbsp;&nbsp;&nbsp;  目录的执行权限(x):锁<br>
&nbsp;&nbsp;&nbsp;  SUID(o+s)对二进制可执行文件：以档案拥有者执行<br>
&nbsp;&nbsp;&nbsp;  Sticky对目录：目录的文件和目录只有拥有者和root才有权删除<br>
&nbsp;&nbsp;&nbsp;  s S t T<br>
&nbsp;&nbsp;&nbsp;  chmod <br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  u+s<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  g+s<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  o+t<br>
<br>
二十九、vi使用技巧<br>
&nbsp;&nbsp;&nbsp;  &lt;ctrl-d&gt; &lt;ctrl-u&gt;翻半页 <br>
&nbsp;&nbsp;&nbsp;  z&lt;Enter&gt;<br>
&nbsp;&nbsp;&nbsp;  z-<br>
&nbsp;&nbsp;&nbsp;  !!插入指令输出<br>
&nbsp;&nbsp;&nbsp;  !}读入当前行以下的内容当作指令输入<br>
&nbsp;&nbsp;&nbsp;  !}fmt -w60<br>
&nbsp;&nbsp;&nbsp;  r filename读入文件filename<br>
&nbsp;&nbsp;&nbsp;  n,m w&gt; file 把n到m行写入到文件file<br>
&nbsp;&nbsp;&nbsp;  n,m w&gt;&gt;file 把n到m行追加到文件file<br>
三十、文件处理命令<br>
&nbsp;&nbsp;&nbsp;  显示文件开头几行head<br>
&nbsp;&nbsp;&nbsp;  显示结尾几行tail<br>
&nbsp;&nbsp;&nbsp;  tail -f<br>
&nbsp;&nbsp;&nbsp;  统计：wc <br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  -l<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  -w<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  wc显示信息的意思line word charactor<br>
&nbsp;&nbsp;&nbsp;  替换相同：uniq<br>
&nbsp;&nbsp;&nbsp;  sort file|uniq等价于sort -u<br>
&nbsp;&nbsp;&nbsp;  纵向合并：paste<br>
&nbsp;&nbsp;&nbsp;  横向合并文件：cat file1 file2 file3 &gt; file123<br>
<br>
&nbsp;&nbsp;&nbsp;  替换字符：tr<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  unix2doc:tr '$' '\r' filename<br>
&nbsp;&nbsp;&nbsp;  文件比较：sdiff<br>
<br>
&nbsp;&nbsp;&nbsp;  替换tab：expand unexpand<br>
&nbsp;&nbsp;&nbsp;  检查拼写：aspell<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  $ aspell --mode=ccpp -c test.cpp<br>
&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  /usr/share/dict/words<br>
<br>
参考：<br>
[1]视频地址：http://www.youku.com/playlist_show/id_1528851.html<br>
[2]Unix哲学：http://phparch.cn/index.php/linux/44-applications/156-unix-philosophy<br>
[3]http://blog.solrex.cn/articles/aspell-the-ideal-spell-checker-for-programmers.html<br>
vim:filetype=changelog<br>
</font> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/aquei/blog/category/%C0%DB%C1%A2%BF%CC%CB%C0%5Flinux">累立刻死_linux</a>&nbsp;<a href="http://hi.baidu.com/aquei/blog/item/0202eff8babd7c06d8f9fd25.html#comment">查看评论</a>]]></description>
        <pubDate>2009年06月30日 星期二  11:45</pubDate>
        <category><![CDATA[累立刻死_linux]]></category>
        <author><![CDATA[aQuei]]></author>
		<guid>http://hi.baidu.com/aquei/blog/item/0202eff8babd7c06d8f9fd25.html</guid>
</item>

<item>
        <title><![CDATA[FC圣斗士《黄金传说》通关了]]></title>
        <link><![CDATA[http://hi.baidu.com/aquei/blog/item/3ddfad0138c4450f1c958378.html]]></link>
        <description><![CDATA[
		
		<div forimg="1"><img border="0" src="http://hiphotos.baidu.com/aquei/pic/item/07445eaf08ab8dddfaed5075.jpg" small="0" class="blogimg"><br>
<font size="3">攻略：http://www.ffsky.com/article/a14085<br>
秘籍：http://tinypic.com/909i74.jpg</font></div> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/aquei/blog/category/%BE%AB%C9%F1%D1%BB%C6%AC%5F%D3%CE%CF%B7">精神鸦片_游戏</a>&nbsp;<a href="http://hi.baidu.com/aquei/blog/item/3ddfad0138c4450f1c958378.html#comment">查看评论</a>]]></description>
        <pubDate>2009年06月29日 星期一  15:23</pubDate>
        <category><![CDATA[精神鸦片_游戏]]></category>
        <author><![CDATA[aQuei]]></author>
		<guid>http://hi.baidu.com/aquei/blog/item/3ddfad0138c4450f1c958378.html</guid>
</item>

<item>
        <title><![CDATA[ubuntu下不再撞墙]]></title>
        <link><![CDATA[http://hi.baidu.com/aquei/blog/item/3757971365abd8896438db41.html]]></link>
        <description><![CDATA[
		
		<font size="3">因为：<br>
1 驴吧事件<br>
2 ooole事件<br>
所以，开始翻墙<br>
安装：<br>
$ sudo apt-get install tor<br>
$sudo apt-get install privoxy<br>
firefox插件autoproxy：https://addons.mozilla.org/zh-CN/firefox/addon/11009<br>
配置：<br>
http://www.torproject.org/docs/tor-doc-unix.html.zh-cn<br>
autoproxy:选项-&gt;代理服务器-&gt;选择代理服务器-&gt;默认:tor<br>
测试:<br>
www.playboy.com<br>
</font> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/aquei/blog/category/%C0%DB%C1%A2%BF%CC%CB%C0%5Flinux">累立刻死_linux</a>&nbsp;<a href="http://hi.baidu.com/aquei/blog/item/3757971365abd8896438db41.html#comment">查看评论</a>]]></description>
        <pubDate>2009年06月20日 星期六  02:45</pubDate>
        <category><![CDATA[累立刻死_linux]]></category>
        <author><![CDATA[aQuei]]></author>
		<guid>http://hi.baidu.com/aquei/blog/item/3757971365abd8896438db41.html</guid>
</item>

<item>
        <title><![CDATA[终于知道了]]></title>
        <link><![CDATA[http://hi.baidu.com/aquei/blog/item/6c16312a3a7af5305343c112.html]]></link>
        <description><![CDATA[
		
		<pre>圣女天团合唱团的《Stop Stop Stop》MTV中，最后墙上那个照片是佛洛伊德<div forimg="1"><a href="http://hiphotos.baidu.com/aquei/pic/item/79459645c289ef1a87947308.jpg" target="_blank"><img border="0" src="http://hiphotos.baidu.com/aquei/abpic/item/79459645c289ef1a87947308.jpg" small="1" class="blogimg"></a><div forimg="1"><a href="http://hiphotos.baidu.com/aquei/pic/item/e796f303e5869bc908fa9311.jpg" target="_blank"><img border="0" src="http://hiphotos.baidu.com/aquei/abpic/item/e796f303e5869bc908fa9311.jpg" small="1" class="blogimg"></a></div></div></pre> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/aquei/blog/category/%D4%D3%CB%E9%5F%D7%D4%D4%B9%D7%D4%B0%AC%B5%C4%D0%C4%C7%E9">杂碎_自怨自艾的心情</a>&nbsp;<a href="http://hi.baidu.com/aquei/blog/item/6c16312a3a7af5305343c112.html#comment">查看评论</a>]]></description>
        <pubDate>2009年06月02日 星期二  20:10</pubDate>
        <category><![CDATA[杂碎_自怨自艾的心情]]></category>
        <author><![CDATA[aQuei]]></author>
		<guid>http://hi.baidu.com/aquei/blog/item/6c16312a3a7af5305343c112.html</guid>
</item>

<item>
        <title><![CDATA[网游，又玩网游]]></title>
        <link><![CDATA[http://hi.baidu.com/aquei/blog/item/2caa8e1341e0e8d8f6039e72.html]]></link>
        <description><![CDATA[
		
		<font size="3">大学，<br>
是一个一包烟、一瓶水一个通宵的年代。<br>
有一种人，已能接近痴的境界。因为他已疯狂。 <br>
有一种活法，是没有人能够看得到的。因为默默的沉静在虚拟的世界里。 <br>
有一种回忆，无法描述，因为它是没有痕迹的。<br>
<br>
永恒之塔已经将近一个月了，差点忘记日志空间和QQ的密码。</font><br>
<div forimg="1"><img border="0" src="http://hiphotos.baidu.com/aquei/pic/item/9499adecc46c3e0462d09f8d.jpg" small="0" class="blogimg"></div>
<div forimg="1"><img border="0" src="http://hiphotos.baidu.com/aquei/pic/item/d720d4160ba4f63b972b438d.jpg" small="0" class="blogimg"></div>
<div forimg="1"><img border="0" src="http://hiphotos.baidu.com/aquei/pic/item/e79ff6d31cac4cfca9ec9a8e.jpg" small="0" class="blogimg"></div>
<div forimg="1"><img border="0" src="http://hiphotos.baidu.com/aquei/pic/item/2a857d3114d7ee3aebc4af88.jpg" small="0" class="blogimg"></div>
<div forimg="1"><img border="0" src="http://hiphotos.baidu.com/aquei/pic/item/e79ff6d31cae4cfca9ec9a88.jpg" small="0" class="blogimg"></div>
<div forimg="1"><img border="0" src="http://hiphotos.baidu.com/aquei/pic/item/d720d4160ba7f63b972b4388.jpg" small="0" class="blogimg"></div>
<div forimg="1"><img border="0" src="http://hiphotos.baidu.com/aquei/pic/item/b82b51fbe8661e356c22eb63.jpg" small="0" class="blogimg"></div>
<br> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/aquei/blog/category/%D4%D3%CB%E9%5F%D7%D4%D4%B9%D7%D4%B0%AC%B5%C4%D0%C4%C7%E9">杂碎_自怨自艾的心情</a>&nbsp;<a href="http://hi.baidu.com/aquei/blog/item/2caa8e1341e0e8d8f6039e72.html#comment">查看评论</a>]]></description>
        <pubDate>2009年04月27日 星期一  08:30</pubDate>
        <category><![CDATA[杂碎_自怨自艾的心情]]></category>
        <author><![CDATA[aQuei]]></author>
		<guid>http://hi.baidu.com/aquei/blog/item/2caa8e1341e0e8d8f6039e72.html</guid>
</item>

<item>
        <title><![CDATA[Qt标准对话框的使用]]></title>
        <link><![CDATA[http://hi.baidu.com/aquei/blog/item/e796f303f4dceae408fa93c6.html]]></link>
        <description><![CDATA[
		
		<br>
<br>
<table border="1" bgcolor="#000000" width="100%">
    <tbody>
        <tr>
            <td><font color="#ffffff">  <font color="#808080">/*</font><br>
            <font color="#808080"> * Name:&nbsp;&nbsp;&nbsp;&nbsp; stddlgmain.cpp</font><br>
            <font color="#808080"> * Desc:&nbsp;&nbsp;&nbsp;&nbsp; main() in stddlg.pro</font><br>
            <font color="#808080"> * Usage:</font><br>
            <font color="#808080"> * Date:&nbsp;&nbsp;&nbsp;&nbsp; 2009-03-23</font><br>
            <font color="#808080"> * Author:&nbsp;&nbsp; zuohaitao </font><br>
            <font color="#808080"> </font><font color="#808080">*/</font><br>
            <br>
            <font color="#00ff00">#include </font><font color="#00ffff">&quot;stddlg.h&quot;</font><br>
            <font color="#00ff00">#include </font><font color="#00ffff">&lt;QApplication&gt;</font><br>
            <font color="#00c000"><strong>int</strong></font> main(<font color="#00c000"><strong>int</strong></font> argc, <font color="#00c000"><strong>char</strong></font>* argv[])<br>
            {<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QApplication app(argc, argv);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; CStddlg dlg;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; dlg.show();<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>return</strong></font> app.exec();<br>
            }</font></td>
        </tr>
    </tbody>
</table>
<br>
<br>
<table border="1" bgcolor="#000000" width="100%">
    <tbody>
        <tr>
            <td><font color="#ffffff">  <font color="#808080">/*</font><font color="#808080"> </font><br>
            <font color="#808080"> * Name:&nbsp;&nbsp;&nbsp;&nbsp; stddlg.h</font><br>
            <font color="#808080"> * Desc:&nbsp;&nbsp;&nbsp;&nbsp; belog stddlg.pro</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this is a dialog class header file.</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; There are many buttons in the dialog.</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; these buttons is for testing qt standard dialog</font><br>
            <font color="#808080"> * Usage:&nbsp;&nbsp;  </font><br>
            <font color="#808080"> * Author:&nbsp;&nbsp; zuohaitao</font><br>
            <font color="#808080"> * Date:&nbsp;&nbsp;&nbsp;&nbsp; 2009-03-23</font><br>
            <font color="#808080"> </font><font color="#808080">*/</font><br>
            <font color="#00ff00">#ifndef STDDLG_H</font><br>
            <font color="#00ff00">#define STDDLG_H</font><br>
            <font color="#00ff00">#include </font><font color="#00ffff">&lt;QtGui&gt;</font><br>
            <font color="#00c000"><strong>class</strong></font> CStddlg:<font color="#c0c000"><strong>public</strong></font> QDialog<br>
            {<br>
            &nbsp;&nbsp;&nbsp;&nbsp; Q_OBJECT<br>
            <font color="#c0c000"><strong>public</strong></font>:<br>
            &nbsp;&nbsp;&nbsp;&nbsp; CStddlg(QWidget* parent = <font color="#00ffff">0</font>, Qt::WindowFlags f = <font color="#00ffff">0</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; ~CStddlg();<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QGridLayout* m_layout;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QLineEdit* m_file;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QLineEdit* m_font;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QFrame* m_color;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QLabel* m_msgbox;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QLabel* m_custom;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QLineEdit* m_progress;<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QComboBox* m_inputdlgType;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QLineEdit* m_inputdlgValue;<br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp; QTextEdit* m_print;<br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp;<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>enum</strong></font> TYPE<br>
            &nbsp;&nbsp;&nbsp;&nbsp; {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FILETYPE = <font color="#00ffff">0</font>,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLORTYPE,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FONTTYPE,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSGBOXTYPE,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CUSTOMTYPE,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PRINTDLGTYPE,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PROGRESSDLGTYPE,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPENUM,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INPUTDLGTYPE<br>
            &nbsp;&nbsp;&nbsp;&nbsp; };<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QPushButton* m_btn[TYPENUM];<br>
            <font color="#c0c000"><strong>private</strong></font>:<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>char</strong></font> m_selpath[<font color="#00ffff">512</font>];<br>
            <font color="#c0c000"><strong>private</strong></font> slots:<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>void</strong></font> OpenFile();<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>void</strong></font> SetColor();<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>void</strong></font> SetFont();<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>void</strong></font> ShowInputDlg();<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>void</strong></font> ShowMessageBoxes();<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>void</strong></font> ShowCustomMsgBox();<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>void</strong></font> ShowProgressDlg();<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>void</strong></font> ShowPrintDlg();<br>
            };<br>
            <br>
            <font color="#00ff00">#endif</font>&nbsp;&nbsp;<font color="#808080">//STDDLG_H</font></font></td>
        </tr>
    </tbody>
</table>
<br>
<font face="monospace"> <br>
<table border="1" bgcolor="#000000" width="100%">
    <tbody>
        <tr>
            <td><font color="#ffffff">  <font color="#808080">/*</font><font color="#808080"> </font><br>
            <font color="#808080"> * Name:&nbsp;&nbsp;&nbsp;&nbsp; stddlg.h</font><br>
            <font color="#808080"> * Desc:&nbsp;&nbsp;&nbsp;&nbsp; belog stddlg.pro</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this is a dialog class cpp file.</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; There are many buttons in the dialog.</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; these buttons is for testing qt standard dialog</font><br>
            <font color="#808080"> * Usage:&nbsp;&nbsp;  add &quot;QT += testlib&quot; to stddlg.pro(project file)</font><br>
            <font color="#808080"> *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $&gt;qmake -project -o stddlg.pro</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $&gt;qmake</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $&gt;make</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $&gt;./stddlg</font><br>
            <font color="#808080"> * Author:&nbsp;&nbsp; zuohaitao</font><br>
            <font color="#808080"> * Date:&nbsp;&nbsp;&nbsp;&nbsp; 2009-03-23</font><br>
            <font color="#808080"> </font><font color="#808080">*/</font><br>
            <font color="#00ff00">#include </font><font color="#00ffff">&quot;stddlg.h&quot;</font><br>
            <font color="#00ff00">#include </font><font color="#00ffff">&lt;QtGui&gt;</font><br>
            <font color="#00ff00">#include </font><font color="#00ffff">&lt;libgen.h&gt;</font><br>
            <font color="#00ff00">#include </font><font color="#00ffff">&lt;QtTest&gt;</font><br>
            CStddlg::CStddlg(QWidget* parent, Qt::WindowFlags)<br>
            {<br>
            &nbsp;&nbsp;&nbsp;&nbsp; strcpy(m_selpath, <font color="#00ffff">&quot;/&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; setWindowTitle(<font color="#00ffff">&quot;QT standard dialogs&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QString array[TYPENUM] = {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00ffff">&quot;File&quot;</font>,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00ffff">&quot;Color&quot;</font>,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00ffff">&quot;Font&quot;</font>,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00ffff">&quot;Msg Boxes&quot;</font>,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00ffff">&quot;Custom&quot;</font>,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00ffff">&quot;Print Dialog&quot;</font>,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00ffff">&quot;Progress Dialog&quot;</font><br>
            &nbsp;&nbsp;&nbsp;&nbsp; };<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_layout = <font color="#c0c000"><strong>new</strong></font> QGridLayout(<font color="#c0c000"><strong>this</strong></font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>for</strong></font> (<font color="#00c000"><strong>int</strong></font> i = <font color="#00ffff">0</font>; i &lt;TYPENUM; i++)<br>
            &nbsp;&nbsp;&nbsp;&nbsp; {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_btn[i] = <font color="#c0c000"><strong>new</strong></font> QPushButton;<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_btn[i]-&gt;setText(array[i]);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_layout-&gt;addWidget(m_btn[i], i, <font color="#00ffff">1</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; }<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_file = <font color="#c0c000"><strong>new</strong></font> QLineEdit;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_layout-&gt;addWidget(m_file,&nbsp;&nbsp; FILETYPE, <font color="#00ffff">0</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_color = <font color="#c0c000"><strong>new</strong></font> QFrame;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_color-&gt;setFrameShape(QFrame::Box);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_color-&gt;setAutoFillBackground(<font color="#00ffff">true</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_layout-&gt;addWidget(m_color, COLORTYPE, <font color="#00ffff">0</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_font = <font color="#c0c000"><strong>new</strong></font> QLineEdit;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_font-&gt;setText(<font color="#00ffff">&quot;font color&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_layout-&gt;addWidget(m_font,&nbsp;&nbsp; FONTTYPE, <font color="#00ffff">0</font>);<br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_msgbox = <font color="#c0c000"><strong>new</strong></font> QLabel;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_msgbox-&gt;setText(<font color="#00ffff">&quot;Message Box&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_layout-&gt;addWidget(m_msgbox, MSGBOXTYPE, <font color="#00ffff">0</font>);<br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_custom = <font color="#c0c000"><strong>new</strong></font> QLabel;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_custom-&gt;setText(<font color="#00ffff">&quot;linuxredhat&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_layout-&gt;addWidget(m_custom, CUSTOMTYPE, <font color="#00ffff">0</font>);<br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_inputdlgValue = <font color="#c0c000"><strong>new</strong></font> QLineEdit;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_layout-&gt;addWidget(m_inputdlgValue, INPUTDLGTYPE, <font color="#00ffff">0</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_inputdlgType = <font color="#c0c000"><strong>new</strong></font> QComboBox;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_inputdlgType-&gt;addItem(<font color="#00ffff">&quot;Input&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_inputdlgType-&gt;addItem(<font color="#00ffff">&quot;List&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_inputdlgType-&gt;addItem(<font color="#00ffff">&quot;Int&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_inputdlgType-&gt;addItem(<font color="#00ffff">&quot;Double&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_layout-&gt;addWidget(m_inputdlgType, INPUTDLGTYPE, <font color="#00ffff">1</font>);<br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_progress = <font color="#c0c000"><strong>new</strong></font> QLineEdit;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_progress-&gt;setReadOnly(<font color="#00ffff">true</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_progress-&gt;setText(<font color="#00ffff">&quot;Progress&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_layout-&gt;addWidget(m_progress, PROGRESSDLGTYPE, <font color="#00ffff">0</font>);<br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_print = <font color="#c0c000"><strong>new</strong></font> QTextEdit;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_layout-&gt;addWidget(m_print, PRINTDLGTYPE, <font color="#00ffff">0</font>); <br>
            &nbsp;&nbsp;&nbsp;&nbsp; connect(m_btn[FILETYPE], SIGNAL(clicked()), <font color="#c0c000"><strong>this</strong></font>, SLOT(OpenFile()));<br>
            &nbsp;&nbsp;&nbsp;&nbsp; connect(m_btn[COLORTYPE], SIGNAL(clicked()), <font color="#c0c000"><strong>this</strong></font>, SLOT(SetColor()));<br>
            &nbsp;&nbsp;&nbsp;&nbsp; connect(m_btn[FONTTYPE], SIGNAL(clicked()), <font color="#c0c000"><strong>this</strong></font>, SLOT(SetFont()));<br>
            &nbsp;&nbsp;&nbsp;&nbsp; connect(m_btn[MSGBOXTYPE], SIGNAL(clicked()), <font color="#c0c000"><strong>this</strong></font>, SLOT(ShowMessageBoxes()));<br>
            &nbsp;&nbsp;&nbsp;&nbsp; connect(m_btn[CUSTOMTYPE], SIGNAL(clicked()), <font color="#c0c000"><strong>this</strong></font>, SLOT(ShowCustomMsgBox()));<br>
            &nbsp;&nbsp;&nbsp;&nbsp; connect(m_inputdlgType, SIGNAL(activated(<font color="#00c000"><strong>int</strong></font>)), <font color="#c0c000"><strong>this</strong></font>, SLOT(ShowInputDlg()));<br>
            &nbsp;&nbsp;&nbsp;&nbsp; connect(m_btn[PROGRESSDLGTYPE], SIGNAL(clicked()), <font color="#c0c000"><strong>this</strong></font>, SLOT(ShowProgressDlg()));<br>
            &nbsp;&nbsp;&nbsp;&nbsp; connect(m_btn[PRINTDLGTYPE], SIGNAL(clicked()), <font color="#c0c000"><strong>this</strong></font>, SLOT(ShowPrintDlg()));<br>
            }<br>
            <br>
            CStddlg::~CStddlg()<br>
            {<br>
            }<br>
            <br>
            <font color="#00c000"><strong>void</strong></font> CStddlg::SetFont()<br>
            {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>bool</strong></font> ret;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QFont font = QFontDialog::getFont(&amp;ret);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>if</strong></font> (ret)<br>
            &nbsp;&nbsp;&nbsp;&nbsp; {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_font-&gt;setFont(font);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; }<br>
            }<br>
            <br>
            <font color="#00c000"><strong>void</strong></font> CStddlg::SetColor()<br>
            {<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QColor color = QColorDialog::getColor(Qt::blue);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>if</strong></font> (color.isValid())<br>
            &nbsp;&nbsp;&nbsp;&nbsp; {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_color-&gt;setPalette(QPalette(color));<br>
            &nbsp;&nbsp;&nbsp;&nbsp; }<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>char</strong></font> buf[<font color="#00ffff">100</font>];<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">//QColor class</font><br>
            &nbsp;&nbsp;&nbsp;&nbsp; sprintf(buf, <font color="#00ffff">&quot;Color </font><font color="#0000ff">%02x</font><font color="#00ffff"> </font><font color="#0000ff">%02x</font><font color="#00ffff"> </font><font color="#0000ff">%02x</font><font color="#00ffff">&quot;</font>,color.red(), color.green(), color.blue());<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_btn[COLORTYPE]-&gt;setText(QString(buf));<br>
            }<br>
            <br>
            <font color="#00c000"><strong>void</strong></font> CStddlg::OpenFile()<br>
            {<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QString s = QFileDialog::getOpenFileName(<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>this</strong></font>,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00ffff">&quot;Open file dialog&quot;</font>,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_selpath,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00ffff">&quot;All files(*);;C++ files(*.cpp);;C files(*.c);;Head files(*.h)&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">//glib and system call is using</font><br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">//QString is a important class.so, study it.</font><br>
            &nbsp;&nbsp;&nbsp;&nbsp; strcpy(m_selpath, dirname(s.toAscii().data()));<br>
            &nbsp;&nbsp;&nbsp;&nbsp; m_file-&gt;setText(s.toAscii());<br>
            }<br>
            <br>
            <font color="#00c000"><strong>void</strong></font> CStddlg::ShowInputDlg()<br>
            {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">//QMessageBox::information(this, QString(&quot;&quot;), QString(&quot;%1&quot;).arg(m_inputdlgType-&gt;currentIndex()));</font><br>
            &nbsp;&nbsp;&nbsp;&nbsp; QStringList list;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; list&lt;&lt;<font color="#00ffff">&quot;One&quot;</font>&lt;&lt;<font color="#00ffff">&quot;Two&quot;</font>;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; list.append(<font color="#00ffff">&quot;Three&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QString strValue;<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>int</strong></font> nValue;<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>double</strong></font> dValue;<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>bool</strong></font> bRet;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; bRet = <font color="#00ffff">true</font>;<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>switch</strong></font>(m_inputdlgType-&gt;currentIndex())<br>
            &nbsp;&nbsp;&nbsp;&nbsp; {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>case</strong></font> <font color="#00ffff">0</font>:<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">//? the 5th argument is NOT valid</font><br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">//Ubuntu Linux 8.04 kernelv2.6.24.22 Gnome 2.22.3</font><br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strValue = QInputDialog::getText(<font color="#c0c000"><strong>this</strong></font>, <font color="#00ffff">&quot;title&quot;</font>, <font color="#00ffff">&quot;label&quot;</font>, QLineEdit::Normal, m_inputdlgValue-&gt;text(), &amp;bRet);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>break</strong></font>;<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>case</strong></font> <font color="#00ffff">1</font>:<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strValue = QInputDialog::getItem(<font color="#c0c000"><strong>this</strong></font>, <font color="#00ffff">&quot;title&quot;</font>, <font color="#00ffff">&quot;label&quot;</font>, list, <font color="#00ffff">0</font>, <font color="#00ffff">true</font>, &amp;bRet);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>break</strong></font>;<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>case</strong></font> <font color="#00ffff">2</font>:<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nValue = QInputDialog::getInteger(<font color="#c0c000"><strong>this</strong></font>, <font color="#00ffff">&quot;title&quot;</font>, <font color="#00ffff">&quot;label&quot;</font>, <font color="#00ffff">12</font>, -<font color="#00ffff">1212</font>, <font color="#00ffff">1202</font>, <font color="#00ffff">1</font>, &amp;bRet);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strValue = QString(<font color="#00ffff">&quot;%1&quot;</font>).arg(nValue);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>break</strong></font>;<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>case</strong></font> <font color="#00ffff">3</font>:<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dValue = QInputDialog::getDouble(<font color="#c0c000"><strong>this</strong></font>, <font color="#00ffff">&quot;title&quot;</font>, <font color="#00ffff">&quot;label&quot;</font>, <font color="#00ffff">12.02</font>, <font color="#00ffff">0.00</font>, <font color="#00ffff">100.00</font>, <font color="#00ffff">2</font>, &amp;bRet);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strValue = QString(<font color="#00ffff">&quot;%1&quot;</font>).arg(dValue);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>default</strong></font>:<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>break</strong></font>;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; }<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>if</strong></font> (bRet)<br>
            &nbsp;&nbsp;&nbsp;&nbsp; {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">//OK</font><br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_inputdlgValue-&gt;setText(strValue);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; }<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>else</strong></font><br>
            &nbsp;&nbsp;&nbsp;&nbsp; {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">//Cancel</font><br>
            &nbsp;&nbsp;&nbsp;&nbsp; }<br>
            <br>
            }<br>
            <br>
            <font color="#00c000"><strong>void</strong></font> CStddlg::ShowMessageBoxes()<br>
            {<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QMessageBox::information(<font color="#c0c000"><strong>this</strong></font>, <font color="#00ffff">&quot;title&quot;</font>, <font color="#00ffff">&quot;context-information&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QMessageBox::question(<font color="#c0c000"><strong>this</strong></font>, <font color="#00ffff">&quot;title&quot;</font>, <font color="#00ffff">&quot;context-question&quot;</font>, QMessageBox::Yes|QMessageBox::No);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QMessageBox::warning(<font color="#c0c000"><strong>this</strong></font>, <font color="#00ffff">&quot;title&quot;</font>, <font color="#00ffff">&quot;context-warnig&quot;</font>, QMessageBox::Ok|QMessageBox::Cancel);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QMessageBox::critical(<font color="#c0c000"><strong>this</strong></font>, <font color="#00ffff">&quot;title&quot;</font>, <font color="#00ffff">&quot;context-critical&quot;</font>, QMessageBox::Apply|QMessageBox::Reset|QMessageBox::Cancel);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QMessageBox::about(<font color="#c0c000"><strong>this</strong></font>, <font color="#00ffff">&quot;title&quot;</font>, <font color="#00ffff">&quot;context-about&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QMessageBox::aboutQt(<font color="#c0c000"><strong>this</strong></font>, <font color="#00ffff">&quot;title-aboutQt&quot;</font>);<br>
            }<br>
            <br>
            <font color="#00c000"><strong>void</strong></font> CStddlg::ShowCustomMsgBox()<br>
            {<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QMessageBox custom;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QPushButton* red = custom.addButton(<font color="#00ffff">&quot;RedHat&quot;</font>,&nbsp;&nbsp; QMessageBox::ActionRole);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QPushButton* white = custom.addButton(<font color="#00ffff">&quot;WhiteHat&quot;</font>,&nbsp;&nbsp; QMessageBox::ActionRole);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QPushButton* gray = custom.addButton(<font color="#00ffff">&quot;GrayHat&quot;</font>,&nbsp;&nbsp; QMessageBox::ActionRole);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QPushButton* exit = custom.addButton(<font color="#00ffff">&quot;Exit&quot;</font>, QMessageBox::ActionRole);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QString iconPath;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; iconPath = <font color="#00ffff">&quot;./images/&quot;</font>;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; iconPath += m_custom-&gt;text() + <font color="#00ffff">&quot;.png&quot;</font>;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; custom.setIconPixmap(QPixmap(iconPath));<br>
            &nbsp;&nbsp;&nbsp;&nbsp; custom.setText(<font color="#00ffff">&quot;Hats Magic&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; custom.exec();<br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>if</strong></font> (custom.clickedButton() == red)<br>
            &nbsp;&nbsp;&nbsp;&nbsp; {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_custom-&gt;setText(<font color="#00ffff">&quot;linuxredhat&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; }<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>else</strong></font> <font color="#c0c000"><strong>if</strong></font> (custom.clickedButton() == white)<br>
            &nbsp;&nbsp;&nbsp;&nbsp; {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_custom-&gt;setText(<font color="#00ffff">&quot;linuxwhitehat&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; }<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>else</strong></font> <font color="#c0c000"><strong>if</strong></font> (custom.clickedButton() == gray)<br>
            &nbsp;&nbsp;&nbsp;&nbsp; {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_custom-&gt;setText(<font color="#00ffff">&quot;linuxgrayhat&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; }<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>else</strong></font> <font color="#c0c000"><strong>if</strong></font> (custom.clickedButton() == exit)<br>
            &nbsp;&nbsp;&nbsp;&nbsp; {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QMessageBox::information(<font color="#c0c000"><strong>this</strong></font>, <font color="#00ffff">&quot;standard dialog&quot;</font>, <font color="#00ffff">&quot;Quit&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; }<br>
            }<br>
            <br>
            <font color="#00c000"><strong>void</strong></font> CStddlg::ShowProgressDlg()<br>
            {<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QProgressDialog progressDlg(<font color="#00ffff">&quot;label&quot;</font>, <font color="#00ffff">&quot;cancel&quot;</font>, <font color="#00ffff">0</font>, <font color="#00ffff">100</font>, <font color="#c0c000"><strong>this</strong></font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; progressDlg.setWindowModality(Qt::WindowModal);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>for</strong></font> (<font color="#00c000"><strong>int</strong></font> i = <font color="#00ffff">0</font>; i &lt; <font color="#00ffff">100</font>; i++)<br>
            &nbsp;&nbsp;&nbsp;&nbsp; {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>if</strong></font> (progressDlg.wasCanceled())<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>break</strong></font>;<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; progressDlg.setValue(i);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">//NEED: modify project file;add &quot;QT += testlib&quot; to stddlg.pro;</font><br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QTest::qWait(<font color="#00ffff">1000</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; }<br>
            }<br>
            <br>
            <font color="#00c000"><strong>void</strong></font> CStddlg::ShowPrintDlg()<br>
            {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">//NO PRINT MACHINE,SO NO TEST!</font><br>
            &nbsp;&nbsp;&nbsp;&nbsp; QPrinter printer;<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QPrintDialog printDlg(&amp;printer, <font color="#c0c000"><strong>this</strong></font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; printDlg.exec();<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QTextDocument* doc = m_print-&gt;document();<br>
            &nbsp;&nbsp;&nbsp;&nbsp; doc-&gt;print(&amp;printer);<br>
            }<br>
            </font></td>
        </tr>
    </tbody>
</table>
</font> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/aquei/blog/category/qt%5Fo%2B">qt_o+</a>&nbsp;<a href="http://hi.baidu.com/aquei/blog/item/e796f303f4dceae408fa93c6.html#comment">查看评论</a>]]></description>
        <pubDate>2009年03月31日 星期二  00:55</pubDate>
        <category><![CDATA[qt_o+]]></category>
        <author><![CDATA[aQuei]]></author>
		<guid>http://hi.baidu.com/aquei/blog/item/e796f303f4dceae408fa93c6.html</guid>
</item>

<item>
        <title><![CDATA[hello qt!]]></title>
        <link><![CDATA[http://hi.baidu.com/aquei/blog/item/375797131c7df1886538db36.html]]></link>
        <description><![CDATA[
		
		<font face="monospace"> <br>
<table border="1" bgcolor="#000000" width="100%">
    <tbody>
        <tr>
            <td><font color="#ffffff">  <font color="#808080">/*</font><br>
            <font color="#808080"> * Name:&nbsp;&nbsp;&nbsp;&nbsp; helloqt.cpp</font><br>
            <font color="#808080"> * Desc:&nbsp;&nbsp;&nbsp;&nbsp; a simple Qt program</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to study compile Qt src</font><br>
            <font color="#808080"> * Usage:&nbsp;&nbsp;  $&gt;qmake -project -o helloqt.pro</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $&gt;qmake</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $&gt;make</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $&gt;./helloqt</font><br>
            <font color="#808080"> * Author:&nbsp;&nbsp; zuohaitao</font><br>
            <font color="#808080"> * Date:&nbsp;&nbsp;&nbsp;&nbsp; 2009-03-24</font><br>
            <font color="#808080"> </font><font color="#808080">*/</font><br>
            <font color="#00ff00">#include </font><font color="#00ffff">&lt;QApplication&gt;</font><br>
            <font color="#00ff00">#include </font><font color="#00ffff">&lt;QPushButton&gt;</font><br>
            <font color="#00ff00">#include </font><font color="#00ffff">&lt;QtGui&gt;</font><br>
            <font color="#00c000"><strong>int</strong></font> main(<font color="#00c000"><strong>int</strong></font> argc, <font color="#00c000"><strong>char</strong></font>* argv[])<br>
            {<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QApplication app(argc, argv);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; QLabel helloqt(<font color="#00ffff">&quot;hello,QT!&quot;</font>);<br>
            &nbsp;&nbsp;&nbsp;&nbsp; helloqt.show();<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>return</strong></font> app.exec();<br>
            }<br>
            </font></td>
        </tr>
    </tbody>
</table>
</font> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/aquei/blog/category/qt%5Fo%2B">qt_o+</a>&nbsp;<a href="http://hi.baidu.com/aquei/blog/item/375797131c7df1886538db36.html#comment">查看评论</a>]]></description>
        <pubDate>2009年03月24日 星期二  19:08</pubDate>
        <category><![CDATA[qt_o+]]></category>
        <author><![CDATA[aQuei]]></author>
		<guid>http://hi.baidu.com/aquei/blog/item/375797131c7df1886538db36.html</guid>
</item>

<item>
        <title><![CDATA[qt开发环境]]></title>
        <link><![CDATA[http://hi.baidu.com/aquei/blog/item/d47b22972312076554fb962f.html]]></link>
        <description><![CDATA[
		
		<font size="3">QT学习笔记(0)<br>
Ubuntu Linux下<br>
qmake<br>
qmake - cross-platform makefile generator for Qt<br>
$&gt;sudo apt-get install libqt4-dev qt4-doc qt4-dev-tools qt4-qtconfig qt4-demos qt4-designer<br>
libqt4-dev中貌似已经包含了qt4-dev-tools qt4-qtconfig qt4-demos，没测试，反正配置环境不是重点。<br>
qdevelop<br>
QDevelop - A development environment entirely dedicated to Qt4<br>
$&gt;sudo apt-get install qdevelop</font> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/aquei/blog/category/qt%5Fo%2B">qt_o+</a>&nbsp;<a href="http://hi.baidu.com/aquei/blog/item/d47b22972312076554fb962f.html#comment">查看评论</a>]]></description>
        <pubDate>2009年03月24日 星期二  18:55</pubDate>
        <category><![CDATA[qt_o+]]></category>
        <author><![CDATA[aQuei]]></author>
		<guid>http://hi.baidu.com/aquei/blog/item/d47b22972312076554fb962f.html</guid>
</item>

<item>
        <title><![CDATA[春天]]></title>
        <link><![CDATA[http://hi.baidu.com/aquei/blog/item/d1a132d1f6b193309b50278a.html]]></link>
        <description><![CDATA[
		
		<div forimg="1"><img border="0" class="blogimg" small="0" src="http://hiphotos.baidu.com/aquei/pic/item/fc770e55a1c181e5b645ae24.jpg"></div> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/aquei/blog/category/%C5%FC%B0%A7%CB%BC%2D%CD%BF%D1%BB">劈哀思-涂鸦</a>&nbsp;<a href="http://hi.baidu.com/aquei/blog/item/d1a132d1f6b193309b50278a.html#comment">查看评论</a>]]></description>
        <pubDate>2009年03月17日 星期二  21:08</pubDate>
        <category><![CDATA[劈哀思-涂鸦]]></category>
        <author><![CDATA[aQuei]]></author>
		<guid>http://hi.baidu.com/aquei/blog/item/d1a132d1f6b193309b50278a.html</guid>
</item>

<item>
        <title><![CDATA[macro.sh]]></title>
        <link><![CDATA[http://hi.baidu.com/aquei/blog/item/1a7bfcdcce269fa9cd116610.html]]></link>
        <description><![CDATA[
		
		根据宏名，在系统头文件目录查找相关的宏定义<br>
<table border="1" bgcolor="#000000" width="100%">
    <tbody>
        <tr>
            <td><font color="#ffffff">  <font color="#808080">#!/bin/sh</font><br>
            <font color="#808080">##################################</font><br>
            <font color="#808080">#Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; macro.sh</font><br>
            <font color="#808080">#Desc:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print the macro about using in linux c</font><br>
            <font color="#808080">#Usage:&nbsp;&nbsp;&nbsp;&nbsp;  $macro.sh O_CREAT</font><br>
            <font color="#808080">#Date:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2009/01/06</font><br>
            <font color="#808080">#Author:&nbsp;&nbsp;&nbsp;&nbsp; zuohaitao</font><br>
            <font color="#808080">###################################</font><br>
            <font color="#00c0c0">MACRO_NAME</font>=<font color="#00ff00">$1</font><br>
            <font color="#c0c000"><strong>if</strong></font> <font color="#c0c000"><strong>[</strong></font> <font color="#c0c000"><strong>-z</strong></font> <font color="#00ff00">${</font><font color="#00ff00">MACRO_NAME</font><font color="#00ff00">}</font> <font color="#c0c000"><strong>]</strong></font><font color="#c0c000"><strong>;</strong></font> <font color="#c0c000"><strong>then</strong></font><br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>echo</strong></font><font color="#00ffff"> </font><font color="#c0c000"><strong>&quot;</strong></font><font color="#00ffff">usage: macro.sh [MACRO]</font><font color="#c0c000"><strong>&quot;</strong></font><br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>exit</strong></font><br>
            <font color="#c0c000"><strong>fi</strong></font><br>
            <font color="#00c0c0">PATTERN</font>=<font color="#c0c000"><strong>&quot;</strong></font><font color="#00ffff">#define </font><font color="#c0c000"><strong>&quot;</strong></font><font color="#00ff00">${</font><font color="#00ff00">MACRO_NAME</font><font color="#00ff00">}</font><br>
            <font color="#808080">#echo ${PATTERN}</font><br>
            grep <font color="#0000ff">-r</font> <font color="#c0c000"><strong>&quot;</strong></font><font color="#00ff00">$PATTERN</font><font color="#c0c000"><strong>&quot;</strong></font> /usr/include <font color="#00ffff">2</font><font color="#c0c000"><strong>&gt;</strong></font>/dev/null</font></td>
        </tr>
    </tbody>
</table> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/aquei/blog/category/%C0%DB%C1%A2%BF%CC%CB%C0%5Flinux">累立刻死_linux</a>&nbsp;<a href="http://hi.baidu.com/aquei/blog/item/1a7bfcdcce269fa9cd116610.html#comment">查看评论</a>]]></description>
        <pubDate>2009年03月15日 星期日  14:01</pubDate>
        <category><![CDATA[累立刻死_linux]]></category>
        <author><![CDATA[aQuei]]></author>
		<guid>http://hi.baidu.com/aquei/blog/item/1a7bfcdcce269fa9cd116610.html</guid>
</item>

<item>
        <title><![CDATA[errlist.c]]></title>
        <link><![CDATA[http://hi.baidu.com/aquei/blog/item/5405a94b983756f882025c16.html]]></link>
        <description><![CDATA[
		
		类似于windows中的lookup.exe 输入错误代码返回错误信息<br>
<table border="1" bgcolor="#000000" width="100%">
    <tbody>
        <tr>
            <td><font color="#ffffff">  <font color="#808080">/*</font><br>
            <font color="#808080"> * Name:&nbsp;&nbsp;&nbsp;&nbsp;  errlist.c</font><br>
            <font color="#808080"> * Desc:&nbsp;&nbsp;&nbsp;&nbsp;  input errno print error infomation like lookup in win32</font><br>
            <font color="#808080"> * Usage:&nbsp;&nbsp;   </font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  input errno and print error info</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  $&gt;./errlist errno</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  print all error information</font><br>
            <font color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  $&gt;./errlist</font><br>
            <font color="#808080"> * Author:&nbsp;&nbsp;  zuohaitao</font><br>
            <font color="#808080"> * Date:&nbsp;&nbsp;&nbsp;&nbsp;  2009-03-15</font><br>
            <font color="#808080"> </font><font color="#808080">*/</font><br>
            <font color="#00ff00">#include</font><font color="#00ffff">&lt;stdio.h&gt;</font><br>
            <font color="#00ff00">#include</font><font color="#00ffff">&lt;errno.h&gt;</font><br>
            <font color="#00ff00">#include</font><font color="#00ffff">&lt;string.h&gt;</font><br>
            <font color="#00c000"><strong>int</strong></font> main(<font color="#00c000"><strong>int</strong></font> argc, <font color="#00c000"><strong>char</strong></font>* argv[])<br>
            {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#00c000"><strong>int</strong></font> i;<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>if</strong></font> (<font color="#00ffff">2</font> == argc)<br>
            &nbsp;&nbsp;&nbsp;&nbsp;  {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  i = atoi(argv[<font color="#00ffff">1</font>]);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  printf(<font color="#00ffff">&quot;#</font><font color="#0000ff">%d</font><font color="#00ffff">: </font><font color="#0000ff">%s</font><font color="#0000ff">\n</font><font color="#00ffff">&quot;</font>, i, strerror(i));<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>return</strong></font> <font color="#00ffff">0</font>;<br>
            &nbsp;&nbsp;&nbsp;&nbsp;  }<br>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#c0c000"><strong>for</strong></font> (i=<font color="#00ffff">0</font>; i&lt;<font color="#00ffff">257</font>; i++)<br>
            &nbsp;&nbsp;&nbsp;&nbsp;  {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  printf(<font color="#00ffff">&quot;#</font><font color="#0000ff">%d</font><font color="#00ffff">: </font><font color="#0000ff">%s</font><font color="#0000ff">\n</font><font color="#00ffff">&quot;</font>, i, strerror(i));<br>
            &nbsp;&nbsp;&nbsp;&nbsp;  }<br>
            }</font></td>
        </tr>
    </tbody>
</table> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/aquei/blog/category/%C0%DB%C1%A2%BF%CC%CB%C0%5Flinux">累立刻死_linux</a>&nbsp;<a href="http://hi.baidu.com/aquei/blog/item/5405a94b983756f882025c16.html#comment">查看评论</a>]]></description>
        <pubDate>2009年03月15日 星期日  13:58</pubDate>
        <category><![CDATA[累立刻死_linux]]></category>
        <author><![CDATA[aQuei]]></author>
		<guid>http://hi.baidu.com/aquei/blog/item/5405a94b983756f882025c16.html</guid>
</item>

<item>
        <title><![CDATA[DEMOEX的起始页]]></title>
        <link><![CDATA[http://hi.baidu.com/aquei/blog/item/365a8301d3eea4de277fb5d0.html]]></link>
        <description><![CDATA[
		
		<div forimg="1"><br>
<a href="http://hiphotos.baidu.com/aquei/pic/item/fdb6f3369d8e3e100a55a9d1.jpg" target="_blank">
<div forimg="1"><img border="0" src="http://hiphotos.baidu.com/aquei/pic/item/fdb6f3369d8e3e100a55a9d1.jpg" small="0" class="blogimg"></div>
<br>
</a></div> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/aquei/blog/category/%C5%FC%B0%A7%CB%BC%2D%CD%BF%D1%BB">劈哀思-涂鸦</a>&nbsp;<a href="http://hi.baidu.com/aquei/blog/item/365a8301d3eea4de277fb5d0.html#comment">查看评论</a>]]></description>
        <pubDate>2009年03月14日 星期六  19:40</pubDate>
        <category><![CDATA[劈哀思-涂鸦]]></category>
        <author><![CDATA[aQuei]]></author>
		<guid>http://hi.baidu.com/aquei/blog/item/365a8301d3eea4de277fb5d0.html</guid>
</item>

<item>
        <title><![CDATA[RH033学习笔记]]></title>
        <link><![CDATA[http://hi.baidu.com/aquei/blog/item/609be31166f263cea7ef3f08.html]]></link>
        <description><![CDATA[
		
		<font size="3">《RH033学习笔记》<br>
一、Unix哲学<br>
&nbsp;&nbsp;&nbsp;    avoid captive user interfaces<br>
&nbsp;&nbsp;&nbsp;    避免俘虏型用户接口(避免强制性用户界面)<br>
&nbsp;&nbsp;&nbsp;    例如，那种只点&quot;确定&quot;的对话框就属于&ldquo;captive user interfaces&rdquo;<br>
二、获取帮助文档<br>
&nbsp;&nbsp;&nbsp;    （1）whatis command<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    e.g whatis find<br>
&nbsp;&nbsp;&nbsp;    （2）&lt;command&gt; --help<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    e.g whatis --help<br>
&nbsp;&nbsp;&nbsp;    （3）man and info<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    man中Usage的一些符号：[]参数、&lt;&gt; 不定项、|或、- 参数<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    info的使用<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    &lt;Tab&gt; 移动到下个链接<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    &lt;Enter&gt; 转到鼠标所在的链接<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    n 浏览下一个主题<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    p 浏览上一个主题<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    u 浏览上一层主题<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    s 搜索<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    q 退出<br>
&nbsp;&nbsp;&nbsp;    （4）/usr/share/doc<br>
&nbsp;&nbsp;&nbsp;    （5）read hat documentatition<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    https://www.redhat.com/search<br>
三、file命令：查看文件类型<br>
<br>
四、cat命令：<br>
&nbsp;&nbsp;&nbsp;    -A 显示所有<br>
&nbsp;&nbsp;&nbsp;    -s 合并空行<br>
&nbsp;&nbsp;&nbsp;    -b 显示行号<br>
<br>
五、命令参数 -abc = -a -b -c<br>
六、通配符（wildcard）<br>
&nbsp;&nbsp;&nbsp;    1 *任意<br>
&nbsp;&nbsp;&nbsp;    2 ?任意一个<br>
&nbsp;&nbsp;&nbsp;    3 []只在其中<br>
&nbsp;&nbsp;&nbsp;    4 [^]不再其中<br>
<br>
七、history命令<br>
八、命令的一些技巧<br>
&nbsp;&nbsp;&nbsp;    !cmdindex 执行第cmdindex个历史命令<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    e.g. $&gt;!1<br>
&nbsp;&nbsp;&nbsp;    ^old^new 把最后一个命令中的old替换成new后执行<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    e.g. $&gt;ping 192.168.1.100<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;     $&gt;^100^1<br>
&nbsp;&nbsp;&nbsp;    {a,b}{1,2}对a、b和1、2进行排列组合即为a1 a2 b1 b2<br>
&nbsp;&nbsp;&nbsp;    &lt;ctrl-r&gt;查找命令<br>
&nbsp;&nbsp;&nbsp;    e.g. (reverse-i-search)`': <br>
七、cd ~usrname切换到usrname的home目录<br>
&nbsp;&nbsp;&nbsp;    e.g. $&gt;cd~root<br>
<br>
<br>
八、``等价于$()<br>
<br>
九、$[]四则运算<br>
&nbsp;&nbsp;&nbsp;    e.g. $&gt; echo $[ 1 + 2 ]<br>
<br>
九、&quot;&quot; 禁止符号，除了 &ldquo;$ \ ` !&rdquo;， ''禁止所有特殊符号。<br>
十、得到最后一个命令的参数<br>
&nbsp;&nbsp;&nbsp;    &lt;ALT-.&gt;<br>
&nbsp;&nbsp;&nbsp;    &lt;ESC&gt; .<br>
&nbsp;&nbsp;&nbsp;    e.g. $&gt;ping 192.168.1.1<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;&nbsp;    $&gt;telnet &lt;ESC&gt;.<br>
十一、设置环境变量<br>
&nbsp;&nbsp;&nbsp;    set -o<br>
&nbsp;&nbsp;&nbsp;    set +o<br>
十二、terminal快捷键<br>
&nbsp;&nbsp;&nbsp;    打开新标签&lt;ctrl-shift-t&gt;<br>
&nbsp;&nbsp;&nbsp;    切换标签&lt;ctrl-PgUp/PgDn&gt;<br>
&nbsp;&nbsp;&nbsp;    切换标签至N&lt;alt+num&gt;<br>
&nbsp;&nbsp;&nbsp;    关闭标签&lt;ctrl-shift-w&gt;<br>
&nbsp;&nbsp;&nbsp;    复制&lt;ctrl-shift-c&gt;<br>
&nbsp;&nbsp;&nbsp;    粘帖&lt;ctrl-shift-v&gt;<br>
<br>
十三、cut命令:显示每行的某列<br>
&nbsp;&nbsp;&nbsp;    e.g. 文件/etc/passwd，列分割符为:，显示第1列。<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;     $&gt;cut -f1 -d: /etc/passwd<br>
<br>
十四、sort命令：排序<br>
&nbsp;&nbsp;&nbsp;    -n 按数字排序<br>
&nbsp;&nbsp;&nbsp;    -r 倒序<br>
十五、RHEL的mail<br>
&nbsp;&nbsp;&nbsp;    见《RHEL中mail的使用》<br>
十六、xargs<br>
&nbsp;&nbsp;&nbsp;    command1 | xargs command2<br>
十七、tee命令<br>
&nbsp;&nbsp;&nbsp;    $&gt;find /etc/ -name &quot;passwd&quot; |tee info.txt<br>
十八、chmod 更改文件类型<br>
&nbsp;&nbsp;&nbsp;    -R recursize递归更改该路径下所有文件<br>
十九、vi的移动<br>
&nbsp;&nbsp;&nbsp;    向前移动一个单词b<br>
&nbsp;&nbsp;&nbsp;    段落移动{}<br>
&nbsp;&nbsp;&nbsp;    整句移动()<br>
二十、撤销<br>
&nbsp;&nbsp;&nbsp;    撤销u<br>
&nbsp;&nbsp;&nbsp;    取消上一次撤销&lt;ctrl-r&gt;<br>
&nbsp;&nbsp;&nbsp;    恢复当行的所有变动U<br>
二十一、命令模式的一些技巧<br>
&nbsp;&nbsp;&nbsp;    dtc 删除光标到c之间的所有内容<br>
&nbsp;&nbsp;&nbsp;    rc 替换光标所在字符为c<br>
&nbsp;&nbsp;&nbsp;    2dd 删除2行<br>
&nbsp;&nbsp;&nbsp;    2yy 复制2行<br>
&nbsp;&nbsp;&nbsp;    2x 删除2个字符<br>
&nbsp;&nbsp;&nbsp;    R输入文字取代掉光标上的字&lt;ESC&gt;<br>
<br>
二十二、<br>
显示硬盘空间：df -h<br>
显示目录下文件大小： du -s -h<br>
<br>
&nbsp;&nbsp;&nbsp;    低级格式化<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    fdformat<br>
&nbsp;&nbsp;&nbsp;    格式化<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    mkfs <br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    mke2fs<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    mkfs -t vfat<br>
二十三、打包、压缩<br>
&nbsp;&nbsp;&nbsp;    1、tar 命令<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    tar cvf archive_name.tar direcotry/<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    tar tf archive+name.tar<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    tar tvf archive_name.tar<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    tar xvf archive_name.tar<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    tar&nbsp;&nbsp;&nbsp;    cvzf archive_name.tar.gz direcotry/<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    tar xvzf <br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    tar cvjf archive_name.tar.gz2<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    *备份到磁盘 tar cvfM 恢复从磁盘tar xvfM<br>
&nbsp;&nbsp;&nbsp;    2、gzip命令<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    gzip file<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    -v 显示百分比<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    -c 显示信息<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    gunzip file.gz<br>
<br>
二十四、变量<br>
&nbsp;&nbsp;&nbsp;    variables<br>
&nbsp;&nbsp;&nbsp;    local variables<br>
&nbsp;&nbsp;&nbsp;    environment variables<br>
&nbsp;&nbsp;&nbsp;    PS1<br>
&nbsp;&nbsp;&nbsp;    set -o <br>
&nbsp;&nbsp;&nbsp;    unset <br>
<br>
&nbsp;&nbsp;&nbsp;    alias<br>
二十五 登录登出脚本<br>
&nbsp;&nbsp;&nbsp;    1、Login shells<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    /etc/profile<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    /etc/profile.d/*<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    ~/.bashrc_profile传回值输出到屏幕放入~/.bashrc_profile<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    ~/.bashrc<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    /etc/.bashrc<br>
&nbsp;&nbsp;&nbsp;    2、Non-login shells<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    ~/.bashrc<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    /etc/.bashrc<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    /etc/profile.d<br>
&nbsp;&nbsp;&nbsp;    3、Logout<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    ~/.bash_logout<br>
<br>
二十六、w：显示当前用户状态命令<br>
二十七、last：显示登录信息<br>
<br>
<br>
二十八、特殊权限<br>
&nbsp;&nbsp;&nbsp;    目录的执行权限(x):锁<br>
&nbsp;&nbsp;&nbsp;    SUID(o+s)对二进制可执行文件：以档案拥有者执行<br>
&nbsp;&nbsp;&nbsp;    Sticky对目录：当目录的文件和目录只有拥有者和root才有权删除<br>
&nbsp;&nbsp;&nbsp;    s S<br>
&nbsp;&nbsp;&nbsp;    chmod <br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    u+s<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    g+s<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    o+t<br>
<br>
二十九、vi使用技巧<br>
&nbsp;&nbsp;&nbsp;    &lt;ctrl-d&gt;向上翻半页<br>
&nbsp;&nbsp;&nbsp;    &lt;ctrl-u&gt;向下翻半页<br>
&nbsp;&nbsp;&nbsp;    z&lt;Enter&gt;<br>
&nbsp;&nbsp;&nbsp;    z-<br>
&nbsp;&nbsp;&nbsp;    !!插入指令输出<br>
&nbsp;&nbsp;&nbsp;    !}读入当前行以下的内容当作指令输入<br>
&nbsp;&nbsp;&nbsp;    !}fmt -w60<br>
&nbsp;&nbsp;&nbsp;    r filename读入文件filename<br>
&nbsp;&nbsp;&nbsp;    n,m w&gt; file 把n到m行写入到文件file<br>
&nbsp;&nbsp;&nbsp;    n,m w&gt;&gt;file 把n到m行追加到文件file<br>
三十、文件处理命令<br>
&nbsp;&nbsp;&nbsp;    显示文件开头几行head<br>
&nbsp;&nbsp;&nbsp;    显示结尾几行tail<br>
&nbsp;&nbsp;&nbsp;    tail -f<br>
&nbsp;&nbsp;&nbsp;    统计：wc <br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    -l<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    -w<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    wc显示信息的意思line word charactor<br>
&nbsp;&nbsp;&nbsp;    替换相同：uniq<br>
&nbsp;&nbsp;&nbsp;    sort file|uniq等价于sort -u<br>
&nbsp;&nbsp;&nbsp;    纵向合并：paste<br>
&nbsp;&nbsp;&nbsp;    横向合并文件：cat file1 file2 file3 &gt; file123<br>
<br>
&nbsp;&nbsp;&nbsp;    替换字符：tr<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    unix2doc:tr '$' '\r' filename<br>
&nbsp;&nbsp;&nbsp;    文件比较：sdiff<br>
<br>
&nbsp;&nbsp;&nbsp;    替换tab：expand unexpand<br>
&nbsp;&nbsp;&nbsp;    检查拼写：aspell<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    $ aspell --mode=ccpp -c test.cpp<br>
&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;    /usr/share/dict/words<br>
<br>
参考：<br>
[1]视频地址：http://www.youku.com/playlist_show/id_1528851.html<br>
[2]Unix哲学：http://phparch.cn/index.php/linux/44-applications/156-unix-philosophy<br>
[3]</font><font size="3">aspell：</font><font size="3">http://blog.solrex.cn/articles/aspell-the-ideal-spell-checker-for-programmers.html<br>
vim:filetype=changelog<br>
</font> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/aquei/blog/category/%C0%DB%C1%A2%BF%CC%CB%C0%5Flinux">累立刻死_linux</a>&nbsp;<a href="http://hi.baidu.com/aquei/blog/item/609be31166f263cea7ef3f08.html#comment">查看评论</a>]]></description>
        <pubDate>2009年03月08日 星期日  17:21</pubDate>
        <category><![CDATA[累立刻死_linux]]></category>
        <author><![CDATA[aQuei]]></author>
		<guid>http://hi.baidu.com/aquei/blog/item/609be31166f263cea7ef3f08.html</guid>
</item>

<item>
        <title><![CDATA[RHEL中mail的使用]]></title>
        <link><![CDATA[http://hi.baidu.com/aquei/blog/item/268a78d96b0914e139012f0c.html]]></link>
        <description><![CDATA[
		
		<font size="3">RHEL中mail的使用<br>
1、SendMail<br>
&nbsp;&nbsp;&nbsp;   $&gt;mail -s &quot;title&quot; usrname<br>
&nbsp;&nbsp;&nbsp;   text<br>
&nbsp;&nbsp;&nbsp;   .&lt;退出编译&gt;<br>
&nbsp;&nbsp;&nbsp;   Cc:<br>
<br>
&nbsp;&nbsp;&nbsp;   $&gt;mail -s &quot;title&quot; usrname &lt; text.mail<br>
<br>
<br>
2、RecvMail<br>
<br>
&nbsp;&nbsp;&nbsp;   $&gt;mail<br>
&nbsp;&nbsp;&nbsp;   &quot;/var/spool/mail/root&quot;: 1 message 1 unread<br>
&nbsp;&nbsp;&nbsp;   &gt;N 1 xxxxxxxx@localho ......<br>
&nbsp;&nbsp;&nbsp;   &amp;1<br>
&nbsp;&nbsp;&nbsp;   q &quot;quit and move to ~/mbox&quot;<br>
&nbsp;&nbsp;&nbsp;   x &quot;quit&quot;<br>
<br>
参考：<br>
[1]http://www.mqney.com/archives/001859.html<br>
[2]rh033－unit5：http://v.youku.com/v_playlist/f1528851o1p5.html</font> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/aquei/blog/category/%C0%DB%C1%A2%BF%CC%CB%C0%5Flinux">累立刻死_linux</a>&nbsp;<a href="http://hi.baidu.com/aquei/blog/item/268a78d96b0914e139012f0c.html#comment">查看评论</a>]]></description>
        <pubDate>2009年03月08日 星期日  17:15</pubDate>
        <category><![CDATA[累立刻死_linux]]></category>
        <author><![CDATA[aQuei]]></author>
		<guid>http://hi.baidu.com/aquei/blog/item/268a78d96b0914e139012f0c.html</guid>
</item>


</channel>
</rss>