`
文章列表
http://code.google.com/p/primefaces/wiki/PrimeFacesLocales
在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;} ...
问题:     在开发中用js判断输入框不能为空的时候采用了 xx.trim() 方法,该方法在firfox 和chrome下没有问题,在IE下出现问题。 解决方案:     可以使用jquery的函数解决。$.trim(xxxx) , 该方法firfox,chrome, IE下都支持。
#container {     position: relative; /*设置为relative即可*/     border: 1px solid red;     overflow: hidden; } IE7下, 设置overflow:hidden失效时,只需把position设置为relative即可。

jsoup cookie 保持

http://www.iteye.com/topic/811723
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 ...
http://my.oschina.net/jilujia/blog/40329

获取远程IP地址

    博客分类:
  • java
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 ...
try {             DefaultHttpClient httpClient = new DefaultHttpClient();             HttpPost httpPost = new HttpPost(getSaveReplyBBSPostsUrl(bbsPostsUrl));             String authStr = replyBBSName + ":" + replyBBSPassword;             Base64 base64 = new Base64(0,null);             Stri ...
DefaultHttpClient httpClient = new DefaultHttpClient();             HttpPost httpPost = new HttpPost(getSaveReplyBBSPostsUrl(bbsPostsUrl));             CookieStore cookieStore = new BasicCookieStore();             BasicClientCookie cookie = new BasicClientCookie("sessionhash", sessionHash) ...
在application.xml中添加namespace: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans"        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"        xmlns:context="http://www.springframework.org/sche ...

java

    博客分类:
  • rsa
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 ...
http get的时候,指定url字符集 tomcat  在service.xml 8080端口中指定URIEncoding="UTF-8" 就可以了 jboss类似
def ownerOneSql = sql.dataSet("owner_category")     ownerOneSql.add(level:1, name:oneName)     ownerOneSql.each {         println it.id + "  " + it.name } dataSet中为表的名称,add中为要插入的数据 当有些字符串中包括了特殊字符 比如 ' ,你采用拼字符串的方式插入就报错了,可以采用上面的方式。 查询特殊字符也是,可以按照下面的方式做 def ownerOneSql = "sele ...

tomcat debug启动

winodows 下 tomcat debug 模式启动 catalina.bat jpda run
Global site tag (gtag.js) - Google Analytics