2014年7月24日
摘要: 对于C标准库中的字符串处理函数应该平常用的比较多;简单实现strcat和strcmp_strcpy:1 char *_strcpy(char *dest, char *src)2 {3 char *buf = dest;4 while((*dest++ = *src++))5 ... 阅读全文
posted @ 2014-07-24 01:44 huaixiaoz 阅读(398) 评论(0) 推荐(0) 编辑
摘要: Arch linuxArch Linux WikiArch linux Wiki Markdown Arch Wiki pythoncontinuing ... 阅读全文
posted @ 2014-07-24 01:19 huaixiaoz 阅读(199) 评论(0) 推荐(0) 编辑
2014年6月21日
摘要: 关于hanoi塔的原理以及概念,请Google,访问不了去百度。主要设计到C中程序设计中递归的实现;主代码实现如下:void hanoi(int src, int dest, int tmp, int n){ if(n == 1) { move(src, dest); ... 阅读全文
posted @ 2014-06-21 17:38 huaixiaoz 阅读(743) 评论(0) 推荐(0) 编辑
2014年6月3日
摘要: 系统版本: Linux (Ubuntu) 其他桌面发行版应该也行。相关命令: lspci, cvt, xrandr在桌面分辨率不正常显示桌面或者没有最佳的分辨率时,需要修改添加适合的桌面分辨率模式。首先,先查看显卡:$:lspic | grep VGA通过上面的命令查看显卡信息。确认是否正确安装了显... 阅读全文
posted @ 2014-06-03 08:05 huaixiaoz 阅读(439) 评论(0) 推荐(0) 编辑
2013年1月10日
摘要: virt-manager 的具体网络配置可参考 libvirt的官方wiki 由于基本默认default virbr0的就能工作,但是是以nat的方式,与主机网络不再同一个网段。所以尝试使用 路由dhcp是虚拟机与主机在同一个网段。由此需要使用桥接bridge的方式来联网。详细不重述,参照官方WIKI。使用的是ipv4,但是虚拟机每次都使用ipv6来dhcpcd来得到ip地址,每次都失败。解决方法: # cat >> /etc/sysctl.conf <<EOF net.bridge.bridge-nf-call-ip6tables = 0 net.bridge.bri 阅读全文
posted @ 2013-01-10 10:00 huaixiaoz 阅读(2120) 评论(0) 推荐(0) 编辑
2012年9月11日
摘要: linux 32位汇编(hello world;)#hello.s.data #data msg : .string "Hello ,As Compliner!! Linux\n" len = . - msg.text.global _start _start : movl $len, %edx movl $msg, %ecx movl $1, %ebx movl $4, %eax int $0x80 movl $0, %ebx movl $1, %eax int $0x80 linux 64 位汇编:#hello... 阅读全文
posted @ 2012-09-11 21:42 huaixiaoz 阅读(424) 评论(0) 推荐(0) 编辑
2012年8月2日
摘要: 底行模式: :%!xxd to switch into hex mode:%!xxd -rto exit from hex mode. 阅读全文
posted @ 2012-08-02 19:03 huaixiaoz 阅读(182) 评论(0) 推荐(0) 编辑
2012年5月18日
摘要: In file included from external/gtest/src/gtest-all.cc:38:0:external/gtest/src/../src/gtest-filepath.cc: In member function ‘bool testing::internal::FilePath::FileOrDirectoryExists() const’:external/gtest/src/../src/gtest-filepath.cc:180:28: warning: missing initializer for member ‘stat::st_dev’ [-Wm 阅读全文
posted @ 2012-05-18 16:59 huaixiaoz 阅读(2544) 评论(0) 推荐(0) 编辑
2012年5月16日
摘要: external/mesa4d/src/glsl/linker.cpp:1394:50: error: ‘varyings’ was not declaredin this scopeexternal/mesa3d/src/glsl/linker.cpp:1394:58: error: ‘offsetof’ was not declaredin this scopeexternal/mesa3d/src/glsl/linker.cpp:1395:48: error: expectedprimary-expression before ‘,’ tokenexternal/mesa3d/src/g 阅读全文
posted @ 2012-05-16 14:15 huaixiaoz 阅读(369) 评论(0) 推荐(0) 编辑
2012年5月9日
摘要: 对于这个日新月异的世界,每天都有大量的事物出现,也同时有大量的事物消亡。对于linux来说,更是如此,不过对于像笔者这些没银子的大众来说,更酷、更眩真的是伤不起。自己2年 前的电脑跑winxp基本是极速,而win8却没有传说中的那么流畅。这还好一点,不过相对于linux发行版的更新速度,真是追不上了之前装ubuntu 11.04,电脑跑起来还可以,用起来也得心应手,但是到如今的ubuntu 12.04的话,更酷,也更玄了,但是基本上看着就好了 ,在加上unity的摧残,电脑运行还真名不是 之前的那么快。后来 换了gnome3,电脑就 更无语了,虽然还行,但是再也回不到了之前gnome2的那份快 阅读全文
posted @ 2012-05-09 13:25 huaixiaoz 阅读(254) 评论(0) 推荐(0) 编辑