ITeye博客

kfc_davy

kfc_davy · 共 87 篇文章

[置顶] vi 命令

显示行号 : set nu :set ff=unix

2013-02-27T11:58:10Z · linux · 评论(0)

[置顶] linux调试工具

vmstat iostat iostat -x pidstat top sar Sysstat是一个非常强大的工具,因此下载了试了下,效果不错。Sysstat是一个工具集,包括sar、pidstat、iostat、mpstat、sadf、sadc (sysstat安装了以后里面的sar和自带的sar冲突,我替换了 /usr/bin/sar 到 /usr/local/sar)

2012-09-20T14:15:50Z · linux · 评论(0)

'mvc:annotation-driven' must have no character or element information item [chil

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 39 in XML document from class path resource is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.1: Element 'mvc:annotation-driven' must have no character or element information item , because t…

2013-07-18T16:27:33Z · java · 评论(1)

Oracle坑不间断更新

jdbc date 不走索引 jdbc中 select * from tba t where t.createtime >? 实际上不走索引(如果createtime是date类型的话),传说会转换为timestamp,对于此类需要改成, select * from tba t where t.createtime>to_date(?,'yyyy-mm-dd') or 不走索引 select * from tba t where t.a in (select xxx from xxx) or t.a=b 实际上不走索引 对于此类需要改成, select * from tba t1 where…

2013-04-07T19:11:58Z · oracle · 评论(0)

遍历md5的小方法

public class Test{ private static final char[] x = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; static MessageDigest d; public static void main(String[] args) throws NoSuchAlgorithmException { d = MessageDigest.getInstance("MD5"); for(int i=0;i<10;i++){ loop(i…

2013-04-02T20:41:23Z · java · 评论(0)

双重检查的单例模式也有可能出问题

http://www.ibm.com/developerworks/cn/java/j-dcl.html

2013-04-01T22:19:22Z · 评论(0)

grep 使用

grep 中 增加正则表达式,例如tab cat request.log |grep -P '\t107\t'

2013-03-26T11:19:34Z · linux · 评论(0)

搭建环境

很容易 按照 logstash.net 上的learn进行操作 其中当File的input时候,出现了错误 Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (NotImplementedError) stat.st_dev unsupported or native support failed to load at org.jruby.RubyFileStat.dev_major(org/jruby/RubyFileStat.java:394) at RUBY._discover_fil…

2013-03-22T17:51:24Z · logstash · 评论(0)

jdbc Date类型慎用

jdbc Date类型慎用 血泪回退史表示,Date还是换为字符靠谱点

2013-03-12T12:00:53Z · java · 评论(0)

SpringMvc问题

所有的urlredirect都带上了jsessionid 参考 http://static.springsource.org/spring-security/site/docs/3.0.x/reference/appendix-namespace.html#nsa-http-attributes disable-url-rewriting 最后,追究到是p3p造成的iframe问题。 加上代码 response.setHeader("P3P","CP=CAO PSA OUR")

2013-02-28T14:15:03Z · 评论(0)

hs_err_pid*.log

jdk6bug http://www.oschina.net/question/1092_24066

2012-09-25T13:38:05Z · java · 评论(0)

线程卡住了,你敢信吗。

List<SpecialCoinInputInfo> list = specialCoinInputDao.findPendingData(); for(SpecialCoinInputInfo o: list ) { specialCoinInputDao.updateStatus(o,5); // 更新为5 o.setCnt(specialCoinSumDao.save(o)); } 这段代码把线程卡住了,死活不走下去。 悲催的不吃饭找bug,终于发现问题。 当初写 specialCoinSumDao.save(o) 方法时返回值是 void 后来因为需要返回 Long 结果运维上线的包…

2012-08-13T16:00:50Z · java · 评论(0)

领域模型 & 贫血模型 pojo

thinging

2012-07-18T14:15:03Z · java · 评论(0)

android assert 自定义格式被压缩

asset如果自定义一个格式 那么会被压缩掉 出现 04-05 16:35:32.121: E/E(13220): java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed static const char* kNoCompressExt[] = { ".jpg", ".jpeg", ".png", ".gif", ".wav", ".mp2", ".mp3", ".ogg", ".aac", ".mpg", ".mpeg", ".mi…

2012-04-05T16:42:09Z · android · 评论(0)

android 兼容包 混淆

http://blog.csdn.net/cmoaciopm/article/details/7207630

2012-02-20T18:19:44Z · 评论(0)