履带循线机器人

六月 25th, 2009 Posted in 未分类 | No Comments »

我的履带机器人,循线测试(Line fllow robot) 下载视频

自己做的一个Slim主题

十二月 26th, 2008 Posted in Linux | 2 Comments »

废话不讲先上图

主题文件:Thinkpad Slim Theme
安装方法,解压缩到 /usr/share/slim/themes 就可以了

# tar -xf thinkpad.tar.gz -C /usr/share/slim/themes

修改slim配置文件 /etc/slim.conf

# current theme, use comma separated list to specify a set to
# randomly choose from
current_theme       thinkpad

适用 Slim 的 xinitrc 启动脚本

十二月 25th, 2008 Posted in Linux | 1 Comment »

#!/bin/bash
#
# $id: .xinitrc.sh,v 1.0.0 2006/12/25 02:50:42 master Exp $
# Copyright (C) 2008 Yunlong Wen (wenyunlong@gmail.com)
#
# Last Modified: 2008/12/25 09:54:53
 
#Locale Setting
export LANG="en_US.UTF-8"
export LC_CTYPE="zh_CN.utf8"
 
#Chinese Input Engine
export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"
 
#Exec Session
DEFAULT_SESSION=startxfce4
 
case $1 in
xfce4)
exec startxfce4
;;
fluxbox)
exec fluxbox
;;
*)
exec $DEFAULT_SESSION
;;
esac

一个Vim脚本建立文件时添加头

十二月 25th, 2008 Posted in Linux | 1 Comment »

C/C++ 风格注释文件头

/*
* C source file
*
* $id: test.c,v 1.0.0 2008/12/25 05:03:57 master Exp $
* Copyright (C) 2008 Yunlong Wen (wenyunlong@gmail.com)
*
* Last Modified: 2008/12/25 05:03:57
*/

Bash 风格注释文件头

#!/bin/bash
#
# $id: test.sh,v 1.0.0 2008/12/25 05:04:30 master Exp $
# Copyright (C) 2008 Yunlong Wen (wenyunlong@gmail.com)
#
# Last Modified: 2008/12/25 05:04:30

Yunlong Wen (wenyunlong@gmail.com) 需要定义变量 AUTHOR
Bash 下修改 .bashrc 添加
AUTHOR=Yunlong Wen (wenyunlong@gmail.com)
下载代码:header.vim

Linux 下 Conky 监控各种硬件信息

十二月 22nd, 2008 Posted in Linux | No Comments »

看看截图先:

Conky 配置文件

background yes
font Bitstream Vera Sans:size=9
xftfont Bitstream Vera Sans:size=9
use_xft yes
xftalpha 0.1
update_interval 1.0
total_run_times 0
own_window yes
#own_window_type background
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
minimum_size 400
maximum_width 400
default_color white
default_shade_color 000000
default_outline_color 000000
alignment top_right
gap_x 12
gap_y 100
no_buffers yes
cpu_avg_samples 2
override_utf8_locale yes
uppercase no # set to yes if you want all text to be in uppercase
#use_spacer yes
 
TEXT
${font Monaco:size=9}Hostname: $nodename Kernel: $kernel
${font Monaco:Bold:size=9}${tztime} Uptime: $uptime
 
${font [...]

MySQL到ORACLE数据迁移

十二月 20th, 2008Tags: ,

Posted in Database | No Comments »

ibatis 缓存策略

十一月 14th, 2008 Posted in Java | No Comments »

sqlMapConfig 里面加入

<settings cacheModelsEnabled="true" enhancementEnabled="true" lazyLoadingEnabled="true" />

maps.xml在 sqlMap 里面加入

<cacheModel id="userCache" type="LRU" readonly="true" serialize="false">
<flushInterval hours="24"/>
<flushOnExecute statement="insertTest"/>
<property name="size" value="1000" />
</cacheModel>

Select 条目加入 cacheModel=”nodeListCache”
可以看到,Cache有如下几个比较重要的属性:readOnly,serialize,type
readOnly值的是缓存中的数据对象是否只读。这里的只读并不是意味着数据对象一旦放入缓存中就无法再对数据进行修改。
而是当数据对象发生变化的时候,如数据对象的某个属性发生了变化,则此数据对象就将被从缓存中废除,下次需要重新
从数据库读取数据,构造新的数据对象。如果需要全局的数据缓存,CacheModel的serialize属性必须被设为true。否则数据
缓存只对当前Session(可简单理解为当前线程)有效,局部缓存对系统的整体性能提升有限。与hibernate类似,ibatis通过
缓冲接口的插件式实现,提供了多种Cache的实现机制可供选择:
1. MEMORY
2. LRU
3. FIFO
4. OSCACHE
MEMORY类型Cache与WeakReference
MEMORY 类型的Cache 实现,实际上是通过Java 对象引用进行。ibatis 中,其实现类为
com.ibatis.db.sqlmap.cache.memory.MemoryCacheController,MemoryCacheController 内部,使用一个HashMap来保存
当前需要缓存的数据对象的引用。
LRU型Cache
当Cache达到预先设定的最大容量时,ibatis会按照“最少使用”原则将使用频率最少的对象从缓冲中清除。可配置
的参数有:flushInterval:指定了多长时间清除缓存,上例中指定每24小时强行清空缓存区的所有内容。
FIFO型Cache
先进先出型缓存,最先放入Cache中的数据将被最先废除。

WordPress 2.6.3 发布[升级包下载]

十月 28th, 2008 Posted in Develop | 1 Comment »

WordPress 2.6.3 只是一个小的安全更新,不需要更新语言包。
所以,如果是从2.6.2升级的话,只需要下载这个升级包覆盖就可以了。只有21KB不到。
http://wpcn.googlecode.com/files/wordpress-2.6.2to2.6.3.zip
如果你要全新安装WrodPress,还需要下载WordPress 2.6.2 简体中文版
http://wpcn.googlecode.com/files … Pack.v2.1-wpcng.zip
WordPress 2.6.2的更多详细内容参考http://wordpress.org.cn/thread-20002-1-1.html

微软打击盗版 反创Linux广阔市场前景

十月 28th, 2008 Posted in Linux | No Comments »

近日,微软展开了“黑屏”正版验证活动,主要是针对windowsxp和office,面对微软打击盗版的行动,用户的反应比我们想象的要柔和得多,一方面,据说微软每日的销售营业额提高了80%,但是另外一方面则是国产Linux的用户群正在以几何的速度增长。
原文地址

Linux 下 Eclipse tptp agent controller 启动失败

九月 4th, 2008Tags: , ,

Posted in Linux | No Comments »

检查原因,执行
/opt/eclipse/plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.1.v200806171132/agent_controller/bin/ACStart.sh
提示缺少 ibstdc++-libc6.2-2.so.3
下载 ibstdc++-libc6.2-2.so.3 解压缩 放置到 /usr/lib/ 问题解决

wget http://www.opzn.org/wp-content/uploads/2008/09/libstdc-libc62-2so3.gz
gunzip libstdc-libc62-2so3.gz
mv libstdc-libc62-2so3.gz /usr/lib/