??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲天堂a在线,天堂a中文在线,欧美日韩一区在线播放http://www.aygfsteel.com/jarod/A Developer's Notebookzh-cnSat, 17 May 2025 01:55:48 GMTSat, 17 May 2025 01:55:48 GMT60squid?File size limit exceeded (core dumped)"http://www.aygfsteel.com/jarod/archive/2008/05/02/197782.htmlJarodJarodFri, 02 May 2008 12:25:00 GMThttp://www.aygfsteel.com/jarod/archive/2008/05/02/197782.htmlhttp://www.aygfsteel.com/jarod/comments/197782.htmlhttp://www.aygfsteel.com/jarod/archive/2008/05/02/197782.html#Feedback0http://www.aygfsteel.com/jarod/comments/commentRss/197782.htmlhttp://www.aygfsteel.com/jarod/services/trackbacks/197782.html
squid --9
-N: 用非守护q程方式q行
-d 9: 9U输Z息(最详细Q?br />
最后看到错误信息ƈ且squid马上crashQ?br />
"File size limit exceeded (core dumped)"

同事说可能是log文g太大Q后来googleC邮g列表的信息确认了的确是,是log文g中的store.log过2G时就会报q个错误?br />
解决ҎQ?br /> 在squid.conf中查?TAG: cache_store_log"Q在其下插入一?br />
cache_store_log none
卛_把store logx





Jarod 2008-05-02 20:25 发表评论
]]>
linux下挂raid1阵列http://www.aygfsteel.com/jarod/archive/2008/03/25/188426.htmlJarodJarodTue, 25 Mar 2008 02:24:00 GMThttp://www.aygfsteel.com/jarod/archive/2008/03/25/188426.htmlhttp://www.aygfsteel.com/jarod/comments/188426.htmlhttp://www.aygfsteel.com/jarod/archive/2008/03/25/188426.html#Feedback1http://www.aygfsteel.com/jarod/comments/commentRss/188426.htmlhttp://www.aygfsteel.com/jarod/services/trackbacks/188426.html 机器上有一块硬盘通过ideq接Q两块通过sataq接Qhda是用来安装系l的Qsda和sdblraid1?br /> hda: 160G
sda:160G
sdb:160G

软gQ?br /> linux下用mdadm理软阵列设备,详见http://www.linuxmanpages.com/man8/mdadm.8.php

l过以下操作Q既可搭建完成:

创徏md讑֤
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda /dev/sdb

查看讑֤状?br />
cat /proc/mdstat
正常的话输出cMQ?br />
Personalities : [raid1] 
md0 
: active raid1 sdb[1] sda[0]
      
156290816 blocks [2/2] [UU]
      [
=>.]  resync =  9.9% (15526336/156290816) finish=74.9min speed=31293K/sec

格式化阵?ext3)Q?br />
mkfs.ext3 /dev/md0

创徏挂蝲点:
mkdir /data

?etc/fstab中加入:
/dev/md0 /data ext3 defaults 0 0

使挂载马上生效:
mount /data




Jarod 2008-03-25 10:24 发表评论
]]>
json-lib序列化java.sql.Datehttp://www.aygfsteel.com/jarod/archive/2008/02/15/180021.htmlJarodJarodFri, 15 Feb 2008 02:11:00 GMThttp://www.aygfsteel.com/jarod/archive/2008/02/15/180021.htmlhttp://www.aygfsteel.com/jarod/comments/180021.htmlhttp://www.aygfsteel.com/jarod/archive/2008/02/15/180021.html#Feedback4http://www.aygfsteel.com/jarod/comments/commentRss/180021.htmlhttp://www.aygfsteel.com/jarod/services/trackbacks/180021.htmlimport java.util.HashMap;

import net.sf.json.JSONObject;
import net.sf.json.JsonConfig;
import net.sf.json.processors.JsDateJsonBeanProcessor;

/**
 * 
@author jarod
 *
 
*/
public class JsonDate {

    
public static void main(String[] args) {
        
// json-lib默认不支持java.sql.Date的序列化Q要序列化自qc,实现一个BeanProcessor处理卛_
        JsDateJsonBeanProcessor beanProcessor = new JsDateJsonBeanProcessor();
        java.sql.Date d 
= new java.sql.Date(System.currentTimeMillis());

        
// 直接序列?/span>
        JsonConfig config = new JsonConfig();
        JSONObject json 
= beanProcessor.processBean(d, config);
        System.out.println(json.toString());

        
// 序列化含java.sql.Date作ؓ属性值的bean
        HashMap m = new HashMap();
        m.put(
"date", d);
        config.registerJsonBeanProcessor(java.sql.Date.
class, beanProcessor);
        json 
= JSONObject.fromObject(m, config);
        System.out.println(json.toString());
    }
}


Jarod 2008-02-15 10:11 发表评论
]]>
[输入法]在scim中用万能五W词?/title><link>http://www.aygfsteel.com/jarod/archive/2008/01/14/175216.html</link><dc:creator>Jarod</dc:creator><author>Jarod</author><pubDate>Mon, 14 Jan 2008 07:14:00 GMT</pubDate><guid>http://www.aygfsteel.com/jarod/archive/2008/01/14/175216.html</guid><wfw:comment>http://www.aygfsteel.com/jarod/comments/175216.html</wfw:comment><comments>http://www.aygfsteel.com/jarod/archive/2008/01/14/175216.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/jarod/comments/commentRss/175216.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/jarod/services/trackbacks/175216.html</trackback:ping><description><![CDATA[词库用v来比SCIM自带的五W爽好多Q而且有调频功能?br /> 使用Ҏ见:<br /> <a >http://forum.ubuntu.org.cn/viewtopic.php?t=99877</a><br /> <br /> <br /> <br /> <img src ="http://www.aygfsteel.com/jarod/aggbug/175216.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/jarod/" target="_blank">Jarod</a> 2008-01-14 15:14 <a href="http://www.aygfsteel.com/jarod/archive/2008/01/14/175216.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[Emacs]打开文ghttp://www.aygfsteel.com/jarod/archive/2008/01/14/175110.htmlJarodJarodMon, 14 Jan 2008 03:34:00 GMThttp://www.aygfsteel.com/jarod/archive/2008/01/14/175110.htmlhttp://www.aygfsteel.com/jarod/comments/175110.htmlhttp://www.aygfsteel.com/jarod/archive/2008/01/14/175110.html#Feedback0http://www.aygfsteel.com/jarod/comments/commentRss/175110.htmlhttp://www.aygfsteel.com/jarod/services/trackbacks/175110.html 如我的C-x C-f默认是指向~/的,此时x开/etc/apt/fstab文gQ输入~//etc/apt/fstab卛_
如果当前路径?var/Q打开自己home目录下的aa.txt文gQ输?var/~/aa.txt





Jarod 2008-01-14 11:34 发表评论
]]>
TMD-????/title><link>http://www.aygfsteel.com/jarod/archive/2008/01/13/174938.html</link><dc:creator>Jarod</dc:creator><author>Jarod</author><pubDate>Sun, 13 Jan 2008 02:16:00 GMT</pubDate><guid>http://www.aygfsteel.com/jarod/archive/2008/01/13/174938.html</guid><wfw:comment>http://www.aygfsteel.com/jarod/comments/174938.html</wfw:comment><comments>http://www.aygfsteel.com/jarod/archive/2008/01/13/174938.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/jarod/comments/commentRss/174938.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/jarod/services/trackbacks/174938.html</trackback:ping><description><![CDATA[最q在家上|经常打开|页白屏Q一开始也不在意,后来觉得实在太烦了,查了查是怎么回事Q在firefox中的error console中看到错误信?br /> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #000000;">Error: window.frames[0] is undefined<br /> Source File: http://讉K的网址/<br /> Line: XX</span></div> 双击打开Q显CZ面代码Q?br /> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #0000ff;"><</span><span style="color: #800000;">html</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"><</span><span style="color: #800000;">head</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"></</span><span style="color: #800000;">head</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"><</span><span style="color: #800000;">iframe </span><span style="color: #ff0000;">src</span><span style="color: #0000ff;">="about:blank"</span><span style="color: #ff0000;"> width</span><span style="color: #0000ff;">="0"</span><span style="color: #ff0000;"> height</span><span style="color: #0000ff;">="0"</span><span style="color: #ff0000;"> frameborder</span><span style="color: #0000ff;">="0"</span><span style="color: #ff0000;"> style</span><span style="color: #0000ff;">="display:none"</span><span style="color: #0000ff;">></</span><span style="color: #800000;">iframe</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"><</span><span style="color: #800000;">script </span><span style="color: #ff0000;">language</span><span style="color: #0000ff;">="javascript"</span><span style="color: #0000ff;">></span><span style="background-color: #f5f5f5; color: #000000;"><br /> window.frames[</span><span style="background-color: #f5f5f5; color: #000000;">0</span><span style="background-color: #f5f5f5; color: #000000;">].location </span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;"> </span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">http://121.32.136.231/update/step1.aspx?p=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;"> </span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;"><br /> </span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">gzDSLXXXXXXXX|</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;"> </span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;"><br /> Math.floor((</span><span style="background-color: #f5f5f5; color: #0000ff;">new</span><span style="background-color: #f5f5f5; color: #000000;"> Date()).getTime()</span><span style="background-color: #f5f5f5; color: #000000;">/</span><span style="background-color: #f5f5f5; color: #000000;">1000</span><span style="background-color: #f5f5f5; color: #000000;">) </span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;"> </span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">|</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;"> </span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;"> <br /> navigator.appMinorVersion </span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;"> </span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">|</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;"> </span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;"><br /> screen.availHeight </span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;"> </span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">|</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;"> </span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;"><br /> screen.availWidth </span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;"> </span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">|</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;"> </span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;"><br /> screen.colorDepth </span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;"> </span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">|</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;"> </span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;"><br /> screen.height </span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;"> </span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">|</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;"> </span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;"><br /> screen.width;<br /> </span><span style="color: #0000ff;"></</span><span style="color: #800000;">script</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"></</span><span style="color: #800000;">body</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"></</span><span style="color: #800000;">html</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span></div> <br /> 刚看到时心理一惊,该不会是在ubuntu+firefox也中病毒了吧。。?br /> google了一?span style="background-color: #f5f5f5; color: #000000;">121.32.136.231Q有以下发现<br /> <br /> </span>http://121.32.136.231/notice/notice.htm<br /> http://www.gomain.net/articles/about_121_32_136_231.html<br /> http://bbs.qianlong.com/redirect.php?tid=1281281<br /> <br /> l于知道了真?br /> <br /> UPDATE:<br /> 反馈到电信,回复如下Q?br /> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #000000;">您好Q这有可能电脑中了病毒的Q徏议您使用杀毒Y件查杀一?/span></div> 唉,客服l的都是忽悠功啊<br /> <br /> <img src ="http://www.aygfsteel.com/jarod/aggbug/174938.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/jarod/" target="_blank">Jarod</a> 2008-01-13 10:16 <a href="http://www.aygfsteel.com/jarod/archive/2008/01/13/174938.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>PSP-2000入手http://www.aygfsteel.com/jarod/archive/2008/01/10/174308.htmlJarodJarodThu, 10 Jan 2008 07:30:00 GMThttp://www.aygfsteel.com/jarod/archive/2008/01/10/174308.htmlhttp://www.aygfsteel.com/jarod/comments/174308.htmlhttp://www.aygfsteel.com/jarod/archive/2008/01/10/174308.html#Feedback0http://www.aygfsteel.com/jarod/comments/commentRss/174308.htmlhttp://www.aygfsteel.com/jarod/services/trackbacks/174308.html
入手几天了,无聊的时候可以玩玩小游戏。本来想着也可以看看电子书Q但试了看PDF和CHM的书效果特不好。。?br />


Jarod 2008-01-10 15:30 发表评论
]]>
一不错的wine配置教程http://www.aygfsteel.com/jarod/archive/2008/01/07/173378.htmlJarodJarodMon, 07 Jan 2008 08:29:00 GMThttp://www.aygfsteel.com/jarod/archive/2008/01/07/173378.htmlhttp://www.aygfsteel.com/jarod/comments/173378.htmlhttp://www.aygfsteel.com/jarod/archive/2008/01/07/173378.html#Feedback0http://www.aygfsteel.com/jarod/comments/commentRss/173378.htmlhttp://www.aygfsteel.com/jarod/services/trackbacks/173378.html

Jarod 2008-01-07 16:29 发表评论
]]>
Firefox tuninghttp://www.aygfsteel.com/jarod/archive/2007/12/28/171330.htmlJarodJarodFri, 28 Dec 2007 14:03:00 GMThttp://www.aygfsteel.com/jarod/archive/2007/12/28/171330.htmlhttp://www.aygfsteel.com/jarod/comments/171330.htmlhttp://www.aygfsteel.com/jarod/archive/2007/12/28/171330.html#Feedback0http://www.aygfsteel.com/jarod/comments/commentRss/171330.htmlhttp://www.aygfsteel.com/jarod/services/trackbacks/171330.html
内存~存Q?br /> browser.cache.memory.enable=true
内存~存开?br /> browser.cache.memory.capacity=51200
内存~存大小Q单位KBQ?1: (默认)Ҏpȝ可用内存动态调_

TIPS: 如果内存大可以关闭磁盘缓存,把此D大;如果不关闭磁盘缓存,保留默认?br />

盘~存Q?br /> browser.cache.disk.enable=false
盘~存大小
browser.cache.disk.capacity=50000
盘~存大小
browser.cache.disk.parent_directory=用户目录

TIPS: 提升性能W二法是把内存缓存关闭,把browser.cache.disk.parent_directory指向ramdisk


DNSQ?br /> network.dns.disableIPv6=false
TIPS: 设成trueQ关闭ipv6的dns解释Q对打开|页的速度有比较明昄提高


HTTPq接敎ͼ
network.http.max-connections=64
最大连接数
network.http.max-connections-per-server=16
Ҏ个服务器的最大请求数
network.http.max-persistent-connections-per-server=4
Ҏ个服务器长连接的最大数
network.http.max-persistent-connections-per-proxy=4
Ҏ个代理的最大长q接?br />
上面几个值可Ҏ自己的机器情况配|?br />

开启Pipelining:(http://www.mozilla.org/projects/netlib/http/pipelining-faq.html)
对多内容的页面比较有?br /> network.http.pipelining=true
开关pipelining
network.http.proxy.pipelining=true
开关代理pipelining
network.http.pipelining.maxrequests=8
单个|页的最大请求数有效?-8


加快面渲染速度
nglayout.initialpaint.delay=0
q个gؓfirefox{待多少毫秒后开始渲染页面。默认?50。网速快时设?可以加速网|染。网速慢的最好就不要改了。对|速物慢的Q如56kbit/s拨号上网的,q应适当增大此|不然firefox的CPU使用׃上升很快

不检查插件兼Ҏ?
extensions.checkCompatibility=false
对于惌3.0的朋友此特有用。因为firefox插g的兼Ҏ检查是Z版本LQ所以某?#8220;不兼?#8221;的插件不一定就是不兼容

不用页面指定的字体
browser.display.use_document_fonts=false
对于像我的linuxpȝQ用的中文字体是雅黑,但有些页面是指定使用宋体Q显C的字体很难看,设这个值就可以忽视面字体?br />


Jarod 2007-12-28 22:03 发表评论
]]>
Embedded tomcat 6.0http://www.aygfsteel.com/jarod/archive/2007/12/20/169030.htmlJarodJarodThu, 20 Dec 2007 06:49:00 GMThttp://www.aygfsteel.com/jarod/archive/2007/12/20/169030.htmlhttp://www.aygfsteel.com/jarod/comments/169030.htmlhttp://www.aygfsteel.com/jarod/archive/2007/12/20/169030.html#Feedback0http://www.aygfsteel.com/jarod/comments/commentRss/169030.htmlhttp://www.aygfsteel.com/jarod/services/trackbacks/169030.html tomcat-6.0.14
ubuntu gusty
sun-jdk-1.6

多个人合作的目里只要修改tomcat-conf.properties文g后即可用。我q里用了slf4j做LOGQ不用LOG的把相关cd掉即可。还有我是把tomcat/lib下的jar都加qclasspath的?br />
目录l构
/-|projectHome
  |
  |--src
  |   |--TomcatServer.java
  |   |--tomcat-conf.properties
  |
  |--webapp
  |   |--WEB-INF
  |   |   |-web.xml

TomcatServer.java:
 1 import java.io.File;
 2 import java.io.IOException;
 3 import java.util.Properties;
 4 
 5 import org.apache.catalina.Context;
 6 import org.apache.catalina.Engine;
 7 import org.apache.catalina.Host;
 8 import org.apache.catalina.LifecycleException;
 9 import org.apache.catalina.startup.Embedded;
10 import org.slf4j.Logger;
11 import org.slf4j.LoggerFactory;
12 
13 /**
14  * http://www.aygfsteel.com/jarod
15  * @author jarod
16  */
17 public class TomcatServer {
18 
19     private static final Logger logger = LoggerFactory
20             .getLogger(TomcatServer.class);
21 
22     public static void main(String[] args) {
23         try {
24             new TomcatServer();
25         } catch (Throwable t) {
26             logger.error("", t);
27         }
28     }
29 
30     private Embedded tomcat;
31 
32     // tomcatȝ?/span>
33     private String catalinaHome;
34 
35     private String projectHome;
36 
37     public TomcatServer() {
38         initConf();
39 
40         tomcat = new Embedded();
41         tomcat.setCatalinaHome(catalinaHome);
42         Engine engine = tomcat.createEngine();
43         Host host = tomcat.createHost("localhost", projectHome);
44         host.addChild(tomcat.createContext(""""));
45         Context context = tomcat.createContext("/webapp1""webapp");
46         // 当以debug模式启动Ӟ修改可立即生?/span>
47         context.setReloadable(true);
48         host.addChild(context);
49         engine.addChild(host);
50         engine.setDefaultHost("localhost");
51         tomcat.addEngine(engine);
52         tomcat.addConnector(tomcat.createConnector("0"8081false));
53         registerShutdownHook();
54         try {
55             tomcat.start();
                
Thread.sleep(Long.MAX_VALUE);
56         } catch (Exception e) {
57             throw new RuntimeException(e);
58         }
59     }
60 
61     private void initConf() {
62         Properties properties = new Properties();
63         try {
64             properties.load(TomcatServer.class
65                     .getResourceAsStream("/tomcat-conf.properties"));
66             catalinaHome = properties.getProperty("catalina.home");
67 
68             File f = new File(".");
69             projectHome = f.getAbsolutePath();
70         } catch (IOException e) {
71             throw new RuntimeException(e);
72         }
73     }
74 
75     private void registerShutdownHook() {
76         Runtime.getRuntime().addShutdownHook(new Thread() {
77             @Override
78             public void run() {
79                 try {
80                     tomcat.stop();
81                 } catch (LifecycleException e) {
82                     throw new RuntimeException(e);
83                 }
84             }
85         });
86     }
87 }


tomcat-conf.properties:
catalina.home=/home/jarod/server/tomcat/apache-tomcat-6.0.14


Z么要setCatalinaHome?
设了该|tomcat启动时会在该目录加蝲默认的一些配|,如MIME mapping{,如果要自己手动添加配|太ȝ了,而如果不要这些配|,q个embedded tomcat用处也不?br />


Jarod 2007-12-20 14:49 发表评论
]]>
[Emacs]linux下编译安装emacs23 cvshttp://www.aygfsteel.com/jarod/archive/2007/12/19/168662.htmlJarodJarodWed, 19 Dec 2007 02:29:00 GMThttp://www.aygfsteel.com/jarod/archive/2007/12/19/168662.htmlhttp://www.aygfsteel.com/jarod/comments/168662.htmlhttp://www.aygfsteel.com/jarod/archive/2007/12/19/168662.html#Feedback0http://www.aygfsteel.com/jarod/comments/commentRss/168662.htmlhttp://www.aygfsteel.com/jarod/services/trackbacks/168662.html pȝ: ubuntu 7.10
我现?台机上在用这个版本,一台机是gnome, 另一台机是KDEQKDE上的emacs-gtk可以直接用scim输入了,但gnome据说是某session-daemonE序的问题导致不能激zd部输入法Q我现在的解x法是开一个terminal, 在terminal下用emacs -nw启动Q这样就能用外部输入法输入中文了


Checkout源代?/h2>
sudo apt-get install ssh cvs
export CVS_RSH
="ssh"
cvs 
-z3 -d:pserver:anonymous@cvs.sv.gnu.org:/cvsroot/emacs co -r emacs-unicode-2 emacs


安装依赖?/h2>
sudo apt-get install texinfo libgpmg1-dev libungif4-dev libpng12-dev libgd2-xpm-dev libtiff4-dev libjpeg62-dev librsvg2-dev libgtk2.0-dev
注意Q上面有几个囑Ş库不是必ȝQ我的机器本来就装了很多开发库Q所以上面的库估计也是不全的

~译安装


./configure --prefix=/usr --enable-font-backend --with-gtk --with-xft --with-freetype && make bootstrap && make info && sudo make install



配置


~辑~/.Xresources

Xft.antialias: 1
# 可以试把hinting关了Ҏ效果Q有些显C器上不开反而更好看
Xft
.hinting: 1
Xft
.hintstyle: hintfull 
Xft
.rgba: rgb

Emacs
.FontBackend: xft
Emacs.Geometry: 100x32+4+4
执行xrdb ~/.Xresources例配|生?/span>

~辑~/.emacs文gQ最新版在我?a target="_blank" >wikiQ?br />
;;讄个h信息
;;
(setq user
-full-name "Jarod Liu")
(setq user
-mail-address "liuyuanzhi(at)gmail.com")

;;d自定义loadpath
;;
(
if (fboundp 'normal-top-level-add-subdirs-to-load-path)
    (let* ((my-lisp-dir "/home/jarod/.myemacs/")
           (default-directory my-lisp-dir))
      (setq load-path (cons my-lisp-dir load-path))
      (normal-top-level-add-subdirs-to-load-path)))


;;讄字体 
;;
(set-default-font "Monospace-14")
(set-fontset-font (frame-parameter nil 
'font)
          
'unicode '("Microsoft YaHei" . "unicode-bmp")) 
(set
-fontset-font (frame-parameter nil 'font)
          
'han '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font (frame-parameter nil 
'font)
          
'symbol '("Microsoft YaHei"  . "unicode-bmp"))
(set
-fontset-font (frame-parameter nil 'font)
          
'cjk-misc '("Microsoft YaHei"  . "unicode-bmp"))
(set-fontset-font (frame-parameter nil 
'font)
          
'bopomofo '("Microsoft YaHei"  . "unicode-bmp")) 


;; 
For my language code setting (UTF-8)
;;
(setq current
-language-environment "UTF-8")
(setq default
-input-method "chinese-py")
(setq locale
-coding-system 'utf-8)
(set-terminal-coding-system 
'utf-8)
(set
-keyboard-coding-system 'utf-8)
(set-selection-coding-system 
'utf-8)
(prefer
-coding-system 'utf-8)


;;启动服务?for emacsclient)
;;
(server-start)


;;自定义按?br /> ;;
(global-set-key [f1] 
'shell);F1q入Shell 
;(global
-set-key (kbd "C-SPC"'nil);用win+space为set-mark键,留出ctrl+space热键作ؓ输入?br /> ;(global-set-key (kbd "S-SPC") 'set-mark-command)


;;使用习惯配制
;;
(setq default
-major-mode 'text-mode);一打开pv?nbsp;text 模式?br /> (global-font-lock-mode t);语法高亮
(auto-image-file-mode t);打开囄昄功能
(fset 
'yes-or-no-'y-or-n-p);?nbsp;y/n代表 yes/no
(setq default-fill-column 80);默认昄 xx列就换行
(column-number-mode t);昄列号
(show-paren-mode t);昄括号匚w
(setq show-paren-style 
'parentheses);括号匚w时显C另外一边的括号Q而不是蟩到另一个括?br /> ;(display-time-mode 1);昄旉Q格式如?br /> ;(setq display-time-24hr-format t)
;(setq display
-time-day-and-date t)
(tool
-bar-mode nil);L工具?br /> (scroll-bar-mode nil);L滚动条,可以使用鼠标滚轮
(setq scroll
-margin 3 scroll-conservatively 10000);防止面滚动时蟩动, scroll-margin 3 可以在靠q屏q边?行时开始滚?br /> (mouse-avoidance-mode 'animate);光标靠近鼠标指针Ӟ让鼠标指针自动让开
(setq mouse-yank-at-point t);支持中键_脓
(transient-mark-mode t);高亮昄要拷贝的区域
(setq x-select-enable-clipboard t);支持emacs和外部程序的_脓
(setq interprogram-paste-function 
'x-cut-buffer-or-selection-value) ;
(setq frame
-title-format "%b");在标题栏提示buffer?br /> (setq-default make-backup-files nil);不要生成临时文g
(setq visible
-bell t);关闭烦h的出错时的提C声
(setq inhibit
-startup-message t);关闭起动时的那个“开机画?#8221;
(setq 
kill-ring-max 64);undo number
;; ~进
(setq default
-tab-width 4);;    讄tab?个空格的宽度
(setq tab
-width 4)
(global
-set-key "\C-m" 'newline-and-indent)
(global-set-key "\C-j" 
'newline);; 交换q两个按键。因为大多数情况下,回R后是要羃q的?br />
;; mode alist
(mapcar
 (function (lambda (setting)
         (setq auto
-mode-alist
           (cons setting auto
-mode-alist))))
 
'(("\\.xml$".  sgml-mode)
   ("\\\.bash" . sh-mode)
   ("\\.rdf$".  sgml-mode)
   ("\\.session" . emacs-lisp-mode)
   ("\\.l$" . c-mode)
   ("\\.css$" . css-mode)
   ("\\.cfm$" . html-mode)
   ("gnus" . emacs-lisp-mode)
   ("\\.idl$" . idl-mode)
   ("\\.rb$" . ruby-mode)
   ("\\.rhtml$" . html-mode)))




;; tabbar
;;
(require 
'tabbar) ; http://liuyuanzhi.googlepages.com/tabbar.el
(tabbar
-mode)
;(global
-set-key (kbd ""'tabbar-backward-group)
;(global-set-key (kbd "") 
'tabbar-forward-group)
(global
-set-key (kbd "C-`"'tabbar-backward) ;切换TAB的快捷键
(global-set-key (kbd "C-<tab>") 
'tabbar-forward)
;(set
-face-attribute 'tabbar-default-face nil :family "Tahoma") ;讄tabbar字体


;; color-theme 
;;
(require 
'color-theme) ;http://liuyuanzhi.googlepages.com/color-theme.el
(color
-theme-gnome2)


;; ruby                                                                         
;; based on http
://www.rubygarden.org/Ruby/page/show/InstallingEmacsExtensions  
;;                                                                              
(
require 'ruby-mode) ;安装ubuntu中的ruby-elisp?br /> (autoload 'ruby-mode "ruby-mode" "Ruby editing mode." t)
(modify
-coding-system-alist 'file "\\.rb$" 'utf-8)
(modify
-coding-system-alist 'file "\\.rhtml$" 'utf-8)


(autoload 
'run-ruby "inf-ruby"
  "Run an inferior Ruby process")
(autoload 
'inf-ruby-keys "inf-ruby"
  
"Set local key defs for inf-ruby in ruby-mode")
(add
-hook 'ruby-mode-hook
          
'(lambda ()
             (inf
-ruby-keys)))
;; 
If you have Emacs 19.2x or older, use rubydb2x                              
(autoload 
'rubydb "rubydb3x" "Ruby debugger" t)

配置文g都是从网上直接copy来的Q把一些不用的注释?br />

Jarod 2007-12-19 10:29 发表评论
]]>
诅RiBATIS in Action?/title><link>http://www.aygfsteel.com/jarod/archive/2007/10/28/156464.html</link><dc:creator>Jarod</dc:creator><author>Jarod</author><pubDate>Sun, 28 Oct 2007 04:34:00 GMT</pubDate><guid>http://www.aygfsteel.com/jarod/archive/2007/10/28/156464.html</guid><wfw:comment>http://www.aygfsteel.com/jarod/comments/156464.html</wfw:comment><comments>http://www.aygfsteel.com/jarod/archive/2007/10/28/156464.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/jarod/comments/commentRss/156464.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/jarod/services/trackbacks/156464.html</trackback:ping><description><![CDATA[<img alt="" src="http://www.manning.com/begin/begin_cover150.jpg" height="188" width="150" /><br /> ׃iBATIS斚w的书本来׃多(q是我除了官Ҏ档外扑ֈ的唯一一本)Qɘq本书无疑是学习iBATIS不二的选择。而这本书本n也是不错的,囊括了几乎所有的iBATIS的知识点。很适合作ؓiBATIS的入门和参考书c?br /> 我读q本书的时候ƈ没接触过iBATIS相关的知识,但凭借本w的~程l验Q看q本书也不必l看Q也是匆匆看完,然后在实际用中遇到问题再参考此书,比官方的文档好多了? <img src ="http://www.aygfsteel.com/jarod/aggbug/156464.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/jarod/" target="_blank">Jarod</a> 2007-10-28 12:34 <a href="http://www.aygfsteel.com/jarod/archive/2007/10/28/156464.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>M《MySQL Phrasebook?/title><link>http://www.aygfsteel.com/jarod/archive/2007/10/28/156462.html</link><dc:creator>Jarod</dc:creator><author>Jarod</author><pubDate>Sun, 28 Oct 2007 04:25:00 GMT</pubDate><guid>http://www.aygfsteel.com/jarod/archive/2007/10/28/156462.html</guid><wfw:comment>http://www.aygfsteel.com/jarod/comments/156462.html</wfw:comment><comments>http://www.aygfsteel.com/jarod/archive/2007/10/28/156462.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/jarod/comments/commentRss/156462.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/jarod/services/trackbacks/156462.html</trackback:ping><description><![CDATA[<img alt="" src="http://ec1.images-amazon.com/images/I/51E92-oqyML._AA240_.jpg" height="240" width="240" />昨天׃有点旉Q就x本书看看。在手头上找了本最薄的书-《MySQL Phrasebook - Essential Code and Commands》。最q因工作需要,刚从Hibernate转到iBatis。这个{变感觉自qOOq了一点,而离DO(DB-oriented)却近了一点,现在要对数据库的细节要更加了解了?br /> 看标?Phrasebook"感觉像时下不少?#8220;XXX高手言”之类的书Q没M前还q希望是一些经验ȝ的精华集。当看完整本书,发现大部分篇q都是讲SQL语法和MySQL的一些基指o。也有一点cookbook的味道,讲述解决某一c问题时的方案。还有一些安全小tips是不错的。还有一章讲MYSQL对各语言的接口的Q我是直接蟩q了?br /> 刚翻完的时候其实我想骂Q?#8220;什么烂phrasebookQ要学这些基语法指o我不如去看MYSQL的官ҎE?#8221;Q但惛_它的副标?#8220;Essential Code and Commands”。。。算?br /> ȝ来说Q这本书对于MYSQL的新手还是有点用的,可以让你了解有些什么要注意的,有些什么小技巧之cȝ。但对大部分用过MySQL一D|间的人来_q本书是不值得买的?br /> <br /> 书虽然是不怎么好,但在其中学到了一些新东西Q?br /> DELAY_KEY_WRITE<br /> 作用Q减MyISAM表更新烦引的ơ数<br /> 用法QALTER TABLE table_name DELAY_KEY_WRITE = 1;<br /> <br /> LIKE中的'_'<br /> 作用Q匹配一个字W(我以前只知道%Q?br /> <br /> <=><br /> 作用Q?NULL安全”的不{,正常?=遇到NULL时不会返?Qfalse),1(true)Q而是q回NULLQ用<=>׃得到你想要的l果?br /> <br /> 启动选项--safe-updates<br /> 作用Q不执行无WHERE子句的DELETE和UPDATE语句 <img src ="http://www.aygfsteel.com/jarod/aggbug/156462.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/jarod/" target="_blank">Jarod</a> 2007-10-28 12:25 <a href="http://www.aygfsteel.com/jarod/archive/2007/10/28/156462.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>汇编的笔?/title><link>http://www.aygfsteel.com/jarod/archive/2007/10/27/156373.html</link><dc:creator>Jarod</dc:creator><author>Jarod</author><pubDate>Sat, 27 Oct 2007 09:36:00 GMT</pubDate><guid>http://www.aygfsteel.com/jarod/archive/2007/10/27/156373.html</guid><wfw:comment>http://www.aygfsteel.com/jarod/comments/156373.html</wfw:comment><comments>http://www.aygfsteel.com/jarod/archive/2007/10/27/156373.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/jarod/comments/commentRss/156373.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/jarod/services/trackbacks/156373.html</trackback:ping><description><![CDATA[<h1>Registers</h1> <br /> <div><br /> <h2>General-purpose registers</h2> <br /> Register Description<br /> EAX Accumulator for operands and results data<br /> EBX Pointer to data in the data memory segment<br /> ECX Counter for string and loop operations<br /> EDX I/O pointer<br /> EDI Data pointer for destination of string operations<br /> ESI Data pointer for source of string operations<br /> ESP Stack pointer<br /> EBP Stack data pointer<br /> </div> <br /> <div><br /> <h2>Segment registers</h2> <br /> Segment Register Description<br /> CS Code segment<br /> DS Data segment<br /> SS Stack segment<br /> ES Extra segment pointer<br /> FS Extra segment pointer<br /> GS Extra segment pointer<br /> </div> <br /> <div><br /> <h2>Instruction pointer register</h2> <br /> EIP keeps track of the next instruction code to execute<br /> </div> <br /> <div><br /> <h2>Control registers</h2> <br /> Control Register Description<br /> CR0 System flags that control the operating mode and states of the processor<br /> CR1 Not currently used<br /> CR2 Memory page fault information<br /> CR3 Memory page directory information<br /> CR4 Flags that enable processor features and indicate feature capabilities of the processor<br /> </div> <br /> <br /> <br /> <br /> <h1>Sections</h1> <br /> <div><br /> <h2>.section .data</h2> <br /> section for variables declaration<br /> <br /> Directive Data Type<br /> .ascii Text string<br /> .asciz Null-terminated text string<br /> .byte Byte value<br /> .double Double-precision floating-point number<br /> .float Single-precision floating-point number<br /> .int 32-bit integer number<br /> .long 32-bit integer number (same as .int)<br /> .octa 16-byte integer number<br /> .quad 8-byte integer number<br /> .short 16-bit integer number<br /> .single Single-precision floating-point number (same as .float)<br /> <br /> .equ static variables<br /> </div> <br /> <div><br /> <h2>.section .rodata</h2> <br /> section for constants declaration<br /> </div> <br /> <div><br /> <h2>.section .bss</h2> <br /> buffers<br /> <br /> Directive Description<br /> .comm Declares a common memory area for data that is not initialized<br /> .lcomm Declares a local common memory area for data that is not initialized<br /> </div> <br /> <br /> <h2>.section .text</h2> <br /> assembly codes<br /> <br /> Directive Description<br /> .global _start entry point <img src ="http://www.aygfsteel.com/jarod/aggbug/156373.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/jarod/" target="_blank">Jarod</a> 2007-10-27 17:36 <a href="http://www.aygfsteel.com/jarod/archive/2007/10/27/156373.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>linux下Subversion服务架设http://www.aygfsteel.com/jarod/archive/2007/10/27/156372.htmlJarodJarodSat, 27 Oct 2007 09:32:00 GMThttp://www.aygfsteel.com/jarod/archive/2007/10/27/156372.htmlhttp://www.aygfsteel.com/jarod/comments/156372.htmlhttp://www.aygfsteel.com/jarod/archive/2007/10/27/156372.html#Feedback1http://www.aygfsteel.com/jarod/comments/commentRss/156372.htmlhttp://www.aygfsteel.com/jarod/services/trackbacks/156372.html一、工具准?/h3>
Apache Web服务器:httpd-2.2.4.tar.bz2
Subversion源码包及依赖包:subversion-1.4.3.tar.bz2,subversion-deps-1.4.3.tar.bz2
(下面假设apache和svn源码都解压到?home/tmp?

二、安装Apache


Apache的安装就根^时安装Apache没什么两P都记得要打开dav模块和动态模块选项。安装安装命令如下:
tar xfj httpd-2.2.4.tar.bz2
cd httpd-2.2.4
./buildconf
./configure --enable-dav --enable-so
make
make install


三、安装Subversion


SVN的安装一定要注意Q?br />

  • SVN 依赖的APR版本要正。如果Apache?.0.xQ对应的APR版本应ؓ0.9.xQApache?.2.xQ对应的APR版本应ؓ1.2.x? ׃subversion-deps包里的APR?.9.x的,因此~译svn时要删除从deps里解压出来的apr, apr-utilQ改而用apache 2.2里提供的?/li>
  • 如果apache不是安装在默认\径,configure必須加上--with-apxs选项,如:./configure --with-apxs=/home/apache2/bin/apxs


安装命o如下Q?br />

tar xfj subversion-1.4.3.tar.bz2
tar xfj subversion-deps-1.4.3.tar.bz2
# subversion-deps的文件也会解压到subversion-1.4.3目录?br /> cd subversion-1.4.3
rm -rf apr
rm -rf apr-util
ln -s /home/tmp/httpd-2.2.4/srclib/apr apr
ln -s /home/tmp/httpd-2.2.4/srclib/apr-util apr-util
./configure &&amp;amp; make && make install

? 装完成后Q查看是否存在文?APACHE_HOME/modules/mod_dav_svn.soQ默? /usr/local/apache2/modules/mod_dav_svn.so)。另外,如果该机器上以前是装q旧版本的SVNQ要? "/usr/local/lib/libsvn*"文g都删除?br />

四、在apache中配|svn


创徏SVN库:
cd /home/svn
svnadmin create repo1


在Apache 的配|文件httpd.conf中加入以下代码,Apache中就可以配置好一个虚拟主机svn.mydomain.netQƈ把该域名下的根\径配|给 Subversion。通过AuthzSVNAccessFile和AuthUserFile指o分别配置SVN用户的用户名和密码文件?br />
<virtualhost *:80>
DocumentRoot /home/svn/htdocs
<directory>
Options Includes
AllowOverride All
Order allow,deny
Allow from all
</directory>

<location />
DAV svn
SVNParentPath /home/svn/svnroot
AuthzSVNAccessFile /home/svn/svnroot/conf/accessfile
Require valid-user
AuthType Basic
AuthName "Subversion System"
AuthUserFile /home/svn/svnroot/conf/passwdfile
</location>

ServerName svn.mydomain.net
DirectoryIndex index.html
</virtualhost>



创徏文g/home/svn/svnroot/conf/accessfileQ?br />

[groups]
user = jarod
anonymous = guest
[/]
* = r
@user = rw
@anonymous = r


再用htpasswd命o创徏/home/svn/svnroot/conf/passwdfile文gQ?br />

htpasswd -c /home/svn/svnroot/conf/passwdfile jarod
# q时会提C入密?br />


最后把/home/svn目录的拥有者设为启动apache服务的用Papache-2.2默认会由daemon用户启动Q?br />
chown daemon.daemon -R /home/svn
chmod 777 /home/svn -R


大功告成Q通过览器或SVN客户端测试http://svn.mydomain.net/repo1

Jarod 2007-10-27 17:32 发表评论
]]>
վ֩ģ壺 | ɳ| °Ͷ| | ʡ| | ͼƬ| | | | | | | ̨| ϰ| | Ӵ| ̫| | | ƽ| | ɽ| Դ| | ƽ| | | пǰ| ع| | ï| ˮ| | | ̨| Ӳ| | | | |