自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(57)
  • 资源 (2)
  • 收藏
  • 关注

原创 Mac OS/Linux命令集合

ps 进程查看 ps -ef|grep java   netstat命令   netstat -an | grep 3306 lsof命令 通过list open file命令可以查看到当前打开文件,在linux中所有事物都是以文件形式存在,包括网络连接及硬件设备。   lsof -i:80     -i参数表示网络链接,:80指明端口号,该命令会同时列出PID,方...

2015-02-11 10:32:22 251

原创 HttpClient 4 必须设超时时间,否则线程一直等在那.

         // Note: must set timeout,otherwise alway wait here.         // set time out         // conntction timeout 20s         httpclient.getParams().setParameter(CoreConnectionPNames.CONNECTION...

2014-06-08 11:20:02 382

原创 Maven-Maven 常用命令

  下载依赖包源码 mvn dependency:sources 使用参数: -DdownloadSources=true 下载源代码jar。 -DdownloadJavadocs=true 下载javadoc包。

2012-06-04 11:28:09 164

原创 GWT-解决ui.xml代码提示假死

1、在gwt-user-xxx.jar 找到com.google.gwt.uibinder.resources. 解压这三个文件: com.google.gwt.user.client.ui.xsd uibinder.xsd  xhtml.ent   2、配置eclipse Window -> Preferences -> Xml -> XmlCatalog -&g...

2012-04-09 11:33:46 201

原创 Maven-Maven Dependency Scope

  compile默认的scope,表示 dependency 都可以在生命周期中使用。而且,这些dependencies 会传递到依赖的项目中。 provided跟compile相似,但是表明了dependency 由JDK或者容器提供,例如Servlet AP和一些Java EE APIs。这个scope 只能作用在编译和测试时,同时没有传递性。         r...

2012-04-05 14:34:09 177

原创 iText-带formPDF复制,乱码解决方式

方法1:使用iText中文支持包(见附件iTextAsian-for-5.x-1.0)然后重新设置表单字体即可   if (fields.getFields() != null || !fields.getFields().isEmpty()) {// change field ByteArrayOutputStream exchangeByteOut = new ByteA...

2011-12-30 21:38:27 667

Maven-maven项目 could not find the main class

非标准Maven项目运行java类时会报 could not find the main class,由于Maven的输出路径和Eclipse的不一样,所以导致该问题,设置一下Maven的输出路径即可   <build> <sourceDirectory>src</sourceDirectory> <outputDirector...

2011-08-31 20:16:33 686

原创 iText-为PDF添加水印

  private static void addWatermark(PdfStamper stamper, Rectangle pageRectangle, int waterMarkCount, String waterMarkName) { PdfContentByte content; BaseFont base = null; try { ...

2011-08-17 09:36:36 325

iText-对PDF进行数字签名和文档加密

  try { PdfReader reader = null; reader = new PdfReader(domainDoc.getDoc()); ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); com.itextpdf.text.Document docume...

2011-08-17 09:32:14 920

原创 jQuery-提示插件

Poshy Tip - jQuery Plugin for Stylish Tooltips http://vadikom.com/tools/poshy-tip-jquery-plugin-for-stylish-tooltips/

2011-08-17 09:24:51 137

Maven-批量上传Jar 到私服 Bat

利用Bat脚本,批量上传当前目录的jar 到私服   @echo off :: init params set version=1.0.0 set groupId=XX set artifactIdPrefix=portal set url=http://XX:8082/content/repositories/portal/ set repositoryId=bglserv...

2011-08-05 17:15:47 670

Manve-把包安装到本地库和私服

  安装到本地库mvn install:install-file -DgroupId=au.com.bglcorp -DartifactId=portal-xmlschemas -Dversion=1.0 -Dfile=xmlschemas.jar -Dpackaging=jar -DgeneratePom=true 安装到私服(Nexue) jar包: mvn deploy:dep...

2011-08-04 21:41:58 249

原创 Java 使用keeytool生成密钥库和数字证书

详细说明 http://download.oracle.com/javase/1.4.2/docs/tooldocs/windows/keytool.html   常用操作:1、Create a keystorekeytool.exe -genkey -alias dennyStcert -keystore denny.keystore -storepass "store_password"...

2011-06-07 11:19:08 532

原创 Spring 中注入HttpServletRequest

 @Autowired(required=true)    private HttpServletRequest request; 

2011-05-31 09:48:17 263

原创 Maven 3的10大新特性详解

参考 http://tech.it168.com/a2010/1108/1123/000001123274_all.shtml http://www.developer.com/java/article.php/3908561/article.htm     6年了,我们终于等来了Maven 3,Maven 2虽然达到了一定的高度达,但它有两个死穴,一是难以扩展,二是它的代码难以理解,在...

2011-05-11 17:01:55 227

原创 记录一下需要跟进的技术

Erlang http://www.erlang.org/ http://erlang-china.org/

2011-05-05 17:14:56 161

原创 Gwt 在FireFox 中 不能记住密码

参考:http://raibledesigns.com/rd/entry/browser_based_username_password_autocomplete   1、页面设置一个隐藏表单,action 设置为 javascript:void(0);"  <form method="post" action="javascript:void(0);" style="display...

2011-04-08 09:43:41 117

原创 eclipse运行ant时,自动中断的问题

但是用eclipse运行ant,运行到[javac]的时候,自动中断了,也没有任何错误提示。问题就在于eclipse对于ant的日志的管理上没配置好,导致因为日志输出失败而中断。解决方法:如图,添加 -logger org.apache.tools.ant.NoBannerLogger 参考 http://hi.baidu.com/zh_m_zhou/blog/item/2772d017...

2011-04-06 16:21:25 286

原创 com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:

在网上下载的例子,跑起来很都会抛这个异常 com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: This application is out of date, please click the refresh button on your browser. ( Expecting version 5 from cl...

2011-04-02 12:20:09 422

原创 Delphi 无边框全屏不遮挡任务栏

   {声明 拦截最大化,最小化命令,从新设置屏幕高度}   procedure   WMGetMinMaxInfo(var   mes:   TWMGetMinMaxInfo);message   WM_GetMinMaxInfo;   {截获系统消息,然后改写窗体最大化高度。Screen.WorkAreaHeight就是屏幕高度减去任务栏的高度}procedure   TForm1.WMG...

2011-01-25 15:01:19 282

原创 Delphi 无边框WebBrowser右键属性程序挂起问题解决

Form启动时候,从新设置窗体的Style:  procedure TForm1.onFormCreate(Sender: TObject);var nbStyleFix:Integer;      {修复无边框窗体WebBrowser右键/属性程序挂起}begin  nbStyleFix := GetwindowLong(Form1.Handle, GWL_STYLE);  nbStyl...

2011-01-25 14:56:37 158

原创 修改Eclipse格式化代默认长度

1、preferences->Java->Code Style->Code Formatter->Show... ,打开之后,选择“Line Wrapping”选项卡,在“Maximun line width”指定大于多少列时换行。 2、还是在“Line Wrapping”选项卡中,能过选择"Line Wrapping policy"可以指定构造函数、方法体等的换行情况。 ...

2011-01-21 10:37:45 117

原创 常用软件记录

1、MagicDraw UML 建模工具 2、EMS SQL Manager 2005 for MySQL Mysql数据库客户端

2010-08-22 19:48:30 124

原创 Tomcat 中文参数乱码问题解决

conf/server.xml 加入  URIEncoding="GBK" <Connector URIEncoding="GBK" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /&a

2010-08-21 12:00:31 307

原创 VB操作Excel

Private Sub Excel_Exchange() '#先拷贝Excel Set xlapp = CreateObject("Excel.Application") '创建EXCEL对象 file = txtDirectory.Text Set xlbook = xlapp.Workbooks.Open(file) '打开已经存在的EXCEL工件簿文件 xlapp.Visibl...

2010-08-17 11:22:57 219

Tomcat 目录部署和热部署

在 apache-tomcat-6.0.20\conf\Catalina\localhost中新建应用描述文件, <Context path="/" docBase="E:/syncSpace/eclipseWorkspace/www.abc.com/root" reloadable="true" debug="0" privileged="true" ></Co

2009-11-03 13:18:24 138

Rails 2.3 安装

1、先安装ruby 2、更新gem 版本,不更新会导致安装失败   >>gem update --system 更新完成后,清除备份的旧版本gem包 >>gem cleanup 3、安装rails >>gem install rails   安装完成后的gem list actionmailer (2.3.4) actionpack (2.3...

2009-10-15 09:07:17 134

原创 RoR处理回车换行符问题

<%= simple_format @content %>

2009-07-06 10:18:29 153

netbeans 输出窗口中文乱码解决方法

找到 etc\netbeans.conf 添加-J-Dfile.encoding=UTF-8参数 netbeans_default_options="-J-Dfile.encoding=UTF-8

2009-01-13 21:16:20 1543

no such file to load -- sqlite3 问题解决

使用 gem install sqlite3-ruby 安装的版本为1.2.4有问题 改用指定版本安装低版本 gem install sqlite3-ruby -v 1.2.3

2008-12-24 22:02:58 246

原创 JRuby的性能优化(update)

 越来越觉的JRuby是个很有前途的项目,结合Ruby的性感语法和java极其丰富的类库,况且有团队持续不断地修正bug、改进性能,这样的玩意完全有成为“少男杀手”的潜质。JRuby wiki上列出了性能优化的四条建议:1、调优编译器,JRuby早就弃暗投明跟随XRuby走上了编译这条牛B的道路,将Ruby Script编译成字节码,因此这个环节是断断不能忽略的。两种编译方式:AOT模式:直接生成...

2008-12-14 12:22:09 149

Linux 下 Glassfish 回复404

Linux 使用localhost访问glassfish ,回复404   修改config/domain.xml <virtual-server hosts="${com.sun.aas.hostName}"..... 添加localhost <virtual-server hosts="${com.sun.aas.hostName},localhost"  ...

2008-12-02 21:47:06 254

readOnly背景灰

<style type="text/css"> <!-- .readonly { background-color:expression(readOnly?'#ccc':'#fff'); } --> </style> <script>     设定表单的calss 为readonly

2008-11-25 16:32:05 763

PersistJS

PersistJS: Cross Browser Client-Side Persistent Storage Without Cookies http://pablotron.org/?cid=1557  

2008-11-11 10:27:33 180

原创 Linux 添加组播

Looks to me like multicast isn't enabled properly. First, check using "ifconfig -a" that multicast is enabled on your network interfaces. eth0 Link encap:Ethernet HWaddr 00:E0:81:51:41:39 inet addr:...

2008-10-06 11:27:27 2479

压缩图片分辨率

public class CompressImage { private static final Log log = LogFactory.getLog(CompressImage.class); private int destWidth;// 压缩后的长 private int destHeight;// 压缩后的高 /** * 指定压缩后的长度,按比例计算出压缩后的高度 ...

2008-09-06 11:51:15 624

Jboss使用数据源

1、配置数据源文件 数据源必需以 **-ds.xml作为文件名,并放在server\default\deploy下,不同数据库配置不同,可参考\docs\examples\jca下的数据源配置 下面配置多个数据源例子: <?xml version="1.0" encoding="GBK"?> <!-- ======================================...

2008-06-24 14:49:38 176

随机选择数据库某几行

SQL to Select a random row from a database table 来源: http://www.petefreitag.com/item/466.cfm There are lots of ways to select a random record or row from a database table. Here are some example S...

2008-05-22 09:49:15 250

Spring 配置数据源JNDI引用

Spring 配置数据源JNDI引用 [code="XML"] java:comp/env/jdbc/aurora_contact_web [/code] 或者 [code="XML"] [/code]

2008-05-20 12:42:12 556

Client如何访问Glassfish 提供的远程EJB

[b]EJB所有返回值必须实现 Serializable接口,否则会报些莫名其妙的错误. 并把 Glassfish 的 appserv-rt.jar 和 javaee.jar 包 客户程序的类路径[/b] [code="java"] @Stateless(mappedName="ejb/MainActionJNDI")//远程JNDI @Name("MainAction") @Int...

2008-05-07 16:22:19 355

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除