摘要: 原文:http://www.vogella.com/articles/JavaPersistenceAPI/article.htmlLarsVogelVersion 2.2Copyright © 2008, 2009, 2010, 2011, 2012 Lars Vogel16.03.2012Revision HistoryRevision 0.103.02.2008LarsVogelCreatedRevision 0.2 - 2.229.09.2008 - 16.03.2012LarsVogelbug fixes and enhancementsJPA with Eclipseli 阅读全文
posted @ 2013-11-17 21:19 Monn 阅读(4047) 评论(0) 推荐(0) 编辑
摘要: ... org.apache.maven.plugins maven-shade-plugin 2.1 hello.HelloWorld package shade .... 阅读全文
posted @ 2013-11-16 18:51 Monn 阅读(357) 评论(0) 推荐(0) 编辑
摘要: Installing GCCThis page is intended to offer guidance to avoid some common problems when installing GCC, the official installation docs are in theInstalling GCCsection of the main GCC documentation. N.B. those installation docs refer to the development trunk, the installation instructions for releas 阅读全文
posted @ 2013-09-05 22:49 Monn 阅读(832) 评论(0) 推荐(0) 编辑
摘要: http://www.nubaria.com/en/blog/?p=289#pragma execution_character_set("utf-8") 阅读全文
posted @ 2013-08-23 05:39 Monn 阅读(1109) 评论(0) 推荐(0) 编辑
摘要: 与C++,C#不同,java的写入字节顺序是从高到低(左低到右高)例如 内存数据:{ 0x67,0x45,0x23,0x01} ,java int值是:0x6745231 而C++是:0x1234567这种差异会导致 非java客户端 解释 mina TCP header 时, 出现长度错误 ,所以要把java int长度转换成c++的int cppInt=0x04000000;byte[] targets = new byte[4];targets[0] = (byte) (res & 0xff);// 最低位targets[1] = (byte) ((res >> 8) 阅读全文
posted @ 2013-08-19 12:54 Monn 阅读(825) 评论(0) 推荐(0) 编辑
摘要: URL_MODEL=2下。官方的:app.conf不能用,害人呀。。留意以下红色部分,正则要分开来写,坑爹的正确的配置:handlers:handlers: - expire : .jpg modify 10 years - expire : .swf modify 10 years - expire : .png modify 10 years - expire : .gif modify 10 years - expire : .JPG modify 10 years - expire : .ico modify 10 years - url : (.*\.(ico|css|htm|js| 阅读全文
posted @ 2013-08-19 00:23 Monn 阅读(439) 评论(0) 推荐(0) 编辑
摘要: 在Linux(以Redhat Linux Enterprise Edition 5.3为例)下,有时需要编写Service。Service也是程序,一般随系统启动用户不干预就不退出的程序,可以称为Service。Linux下的Service一般称为Daemon。以上是广义的Service的定义。Linux下的服务一般放在/etc/init.d文件夹下。浏览一下这个文件夹下的文件,可以发现在Linux下编写Service一般遵循的原则。Linux下编写Service一般遵循的原则1)真正运行的Service一般放在某个bin目录下(/bin,/usr/bin,etc)。2)/etc/init.d 阅读全文
posted @ 2013-08-16 22:12 Monn 阅读(520) 评论(0) 推荐(0) 编辑
摘要: 配置log4j注意事项:Log4J 1.2users:slf4j-api.jar,slf4j-log4j12.jar, andLog4J1.2.xslf4j-log4j*.jar 要对应Log4J的版本 阅读全文
posted @ 2013-08-14 21:51 Monn 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Mysql 5.1 遇到的信息包过大问题 用客户端导入数据的时候,遇到错误代码: 1153 - Got a packet bigger than 'max_allowed_packet' bytes 终止了数据导入。当MySQL客户端或mysqld服务器收到大于max_allowed_packet字节的信息包时,将发出“信息包过大”错误,并关闭连接。对于某些客户端,如果通信信息包过大,在执行查询期间,可能会遇到“丢失与MySQL服务器的连接”错误。客户端和服务器均有自己的max_allowed_packet变量,因此,如你打算处理大的信息包,必须增加客户端和服务器上的该变量。一 阅读全文
posted @ 2013-08-12 18:31 Monn 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 如果直接这样写:std::vector> intvec;gcc编译器会把">>"当成operator,报错:boost vector error: ‘>>’ should be ‘> >’ within a nested template argument list正确做法是加上空格:std::vector > intvec;不过VS2010测试下不加空格也可以的。 阅读全文
posted @ 2013-08-11 16:16 Monn 阅读(3538) 评论(0) 推荐(0) 编辑