ITeye博客

*月光♂男人*

bianqioujin · 共 55 篇文章

primefaces 时间控件中文显示

http://code.google.com/p/primefaces/wiki/PrimeFacesLocales

2014-04-17T13:05:34Z · primefaces · 评论(0)

按钮连接hover上去后改变样式抖动的问题

在mark项目找人代购的环节,点击找人代购按钮,鼠标hover上去时改变图片(及honver前后图片不一样),代码如下: .buyAgency{float: left;width: 75px;height: 28px;display: block;overflow: hidden;background-position: 0 -137px; cursor: pointer; margin-bottom: 10px; margin-left: 593px; margin-top: 1px;} .buyAgency:hover{background-position: -75px -137px;…

2013-10-10T09:34:49Z · css · 评论(0)

IE下不能用 trim函数解决方法

问题: 在开发中用js判断输入框不能为空的时候采用了 xx.trim() 方法,该方法在firfox 和chrome下没有问题,在IE下出现问题。 解决方案: 可以使用jquery的函数解决。$.trim(xxxx) , 该方法firfox,chrome, IE下都支持。

2013-09-26T09:34:30Z · js · 评论(0)

IE7下overflow:hidden失效的问题

#container { position: relative; / 设置为relative即可 / border: 1px solid red; overflow: hidden; } IE7下, 设置overflow:hidden失效时,只需把position设置为relative即可。

2013-09-24T13:46:15Z · css · 评论(0)

jsoup cookie 保持

http://www.iteye.com/topic/811723

2013-06-05T14:09:11Z · jsoup · 评论(0)

httpclient cookie 保持

HttpClient httpClient = new DefaultHttpClient(); CookieStore cookieStore = new BasicCookieStore(); HttpContext httpContext = new BasicHttpContext(); httpContext.setAttribute(ClientContext.COOKIE_STORE, cookieStore); // ... HttpResponse response1 = httpClient.execute(method1, httpContext); // ... Ht…

2013-06-05T14:07:01Z · httpclient · 评论(0)

spring中的event listener模式和解耦

http://my.oschina.net/jilujia/blog/40329

2013-05-15T09:13:20Z · spring · 评论(0)

获取远程IP地址

String getIpAddr(HttpServletRequest request) { String ip = request.getHeader("x-forwarded-for"); if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { ip = request.getHeader("Proxy-Client-IP"); } if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { ip = request.ge…

2013-02-07T16:22:28Z · java · 评论(0)

httpPost NameValuePair

try { DefaultHttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(getSaveReplyBBSPostsUrl(bbsPostsUrl)); String authStr = replyBBSName + ":" + replyBBSPassword; Base64 base64 = new Base64(0,null); String encoding = base64.encodeToString(authStr.getBytes()); httpPost.set…

2013-01-23T09:59:56Z · httpclient · 评论(0)

HttpPost 请求写入Cookie

DefaultHttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(getSaveReplyBBSPostsUrl(bbsPostsUrl)); CookieStore cookieStore = new BasicCookieStore(); BasicClientCookie cookie = new BasicClientCookie("sessionhash", sessionHash); cookie.setPath("/"); cookie.setDomain("liba…

2013-01-23T09:59:22Z · httpclient · 评论(0)

spring @Async使用

在application.xml中添加namespace: task:annotation-driven/ 这个一定不能少 然后再需要异步执行的代码上打上 @Async就可以了

2013-01-15T10:12:35Z · spring · spring @Async使用 · 评论(0)

java

openssl 生成 rsa 密钥对 下载安装 openssl cmd命令进入openssl目录,输入一下命令,就能生成rsa密钥对 (1) 生成RSA私钥(传统格式的) openssl genrsa -outrsa_private_key.pem 1024 (2) 将传统格式的私钥转换成PKCS#8格式的(java使用的是PKCS#8格式的私钥,支付宝使用的也是PKCS#8格式的私钥) openssl pkcs8 -topk8 -inform PEM -inrsa_private_key.pem -outform PEM -nocrypt (3) 生成RSA公钥 openssl rsa -…

2012-09-21T10:03:26Z · rsa · 评论(0)

get请求 指定字符集

http get的时候,指定url字符集 tomcat 在service.xml 8080端口中指定URIEncoding="UTF-8" 就可以了 jboss类似

2012-06-12T15:05:51Z · java · 评论(0)

groovy 数据库插入数据方式/查询

def ownerOneSql = sql.dataSet("owner_category") ownerOneSql.add(level:1, name:oneName) ownerOneSql.each { println it.id + " " + it.name } dataSet中为表的名称,add中为要插入的数据 当有些字符串中包括了特殊字符 比如 ' ,你采用拼字符串的方式插入就报错了,可以采用上面的方式。 查询特殊字符也是,可以按照下面的方式做 def ownerOneSql = "select id from owner_category where level = 1 a…

2012-05-10T15:47:38Z · groovy · 评论(0)

tomcat debug启动

winodows 下 tomcat debug 模式启动 catalina.bat jpda run

2012-04-16T16:22:30Z · tomcat · 评论(0)