测试 ![]()
complie mysql 5.1 with gcc 4.2.3
Feb 15th, 2008 by freeman
在gcc4.2.3下编译mysql5.1的时侯会有类似下面的错误,原因是新版的gcc中有了max/min的宏定义
mysql.cc:2361: error: 'max' was not declared in this scope
mysql.cc:2363: error: 'max' was not declared in this scope
mysql.cc:2384: error: 'min' was not declared in this scope
解决方法:
#if !defined(max)
#define max(a, b)>--((a) > (b) ? (a) : (b))
#define min(a, b)>--((a) < (b) ? (a) : (b))
#endif
移到
#ifdef __cplusplus
#include
#endif
的后面即可.
用javascript获取flash的版本
Feb 15th, 2008 by freeman
javascript:alert(navigator.plugins["Shockwave Flash"].description);
在linux下同步音乐到iphone
Sep 27th, 2007 by freeman
步骤如下:
- 在iphone中安装openssh
- 在linux中安装 sshfs
- sudo sshfs root@192.168.1.102:Media /media/iphone/
- cd /media/iphone
- ln -s iTunes_Control iPod_Control
- 安装 gtkpod
- 用gtkpod挂上/media/iphone
- 在gtkpod中操作播放列表
- 保存更改
- 重启iphone
在debian下给iphone充电
Sep 27th, 2007 by freeman
需要安装 iphone-module
http://www.mattcolyer.com/projects/iphone-module/
但下载到的包中的Makefile有问题 需要改改
obj-m := iphone.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
安装过程:
make
cp iphone.ko /lib/modules/$(uname -r)/misc
depmod -a
modproe iphone
现在再连接iphone 就可以充电了 ![]()
define usage
Sep 12th, 2007 by freeman
#define xx( y ) printf( “%s\n”, #y );
Google Analytics
Sep 12th, 2007 by freeman
Chinaz Stats
Sep 12th, 2007 by freeman
Google Ad test
Aug 30th, 2007 by freeman
TIP Fast Copy
Aug 27th, 2007 by freeman
:
TIP Fast Copy - Gentoo Linux Wiki:
The normal way To copy files recursively from src1/, src2/, to dest/ you do cp -Rv src1/ src2/ dest/ [edit] The piped and pax way cp uses character by character copy. Using the kernel pipes support, we could copy files block by block. tar converts the directories recursively into a single stream. At one end we create a single stream out of source directories and at other end we extract this stream and put it in the destination directory. The transfer between the two ends is by means of pipes. tar -c src1/ src2/ | tar -C dest/ -xv This is not necessarily faster, but is much more flexible.
