ITeye博客

marlgl

marlgl · 共 59 篇文章

shiro session listener

[code="java"]package com.xyz.service.shiro; import org.apache.shiro.session.Session; import org.apache.shiro.session.SessionListener; import lombok.extern.slf4j.Slf4j; @Slf4j public class ShiroSessionListener implements SessionListener { @Override public void onStart(Session session) {//会话创建时触发 log…

2016-08-17 17:54 · J · 评论(0)

Https - TLSv1.2

大于8k左右的数据请求(PUT/POST)无法与server通信 [b]Chrome: Error (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error.[/b] public class ShortBufferException extends GeneralSecurityException This exception is thrown when an output buffer provided by the user is too short to hold the operation result. Tomcat 8.0 disab…

2016-05-25 15:39 · ShortBufferException SSL HTTPS TLS Tomcat Solaris · 评论(0)

grep and sed

grep -n x.log sed -n '1000,2000p' x.log > target.log

2014-09-24 18:14 · Linux · grep sed · 评论(0)

What do the arrow icons in Subclipse mean?

http://stackoverflow.com/questions/3917925/what-do-the-arrow-icons-in-subclipse-mean

2013-02-07 09:43 · J · Job · svn subversion subclipse · 评论(0)

Java call R - windows

install.packages("rJava") (1/3) 新增 R_HOME D:\opt\R\R-2.15.2 (2/3) CLASSPATH 加入: ;%R_HOME%\library\rJava\jri\JRI.jar (3/3) Path 加入: ;%R_HOME%\bin\i386;%R_HOME%\library\rJava\jri

2012-12-10 10:29 · J · R · 评论(0)

flash camera

flash拍照改进版 - 参照的原版地址不详。 camera.zip - flash source flashcamera.zip - web-app source

2012-06-19 10:24 · J · 评论(0) · flash camera jsp java

UNIX / Linux Convert DOS Newlines CR-LF to Unix/Linux Format

patch remove Bomb(^M) $ cat ~/bin/rmBom #! /bin/sh¬ ¬ #echo "uconv --remove-signature the $1 files"¬ ¬ ### uconv not availble¬ # find . -name "*.$1" \¬ # -exec uconv --remove-signature {} -o {}.nobom \; \¬ # -exec mv {}.nobom {} \;¬ ¬ ### ¬ # Convert DOS newlines (CR/LF) to Unix format using sed co…

2011-09-22 18:48 · Linux bomb ^M sed CRLF LF Dos · 评论(0)

Objective-C NSDateFormater

NSDateFormatter *dateFormat = [[nsdateformatter alloc] init]; [dateformat setdateformat:@"yyyy-mm-dd hh:mm z"]; NSDate *selected = [datepicker date]; NSString *message = [[nsstring alloc] initWithFormat: @"The date and time you selected is: %@", [dateformat stringfromdate:selected]]; // output: 201…

2011-08-26 10:50 · L · Objective-C · 评论(0)

M:The road of learn TCP/IP

1.Richard Stevens,TCP/IP Illustrated, Vol.1 / Vol.2 / Vol.3 《TCP/IP详解(第一卷)协议》 《TCP/IP详解 卷2:实现》 《TCP/IP详解卷3:TCP事务协议、HTTP、NNTP和UNIX域协议》 《TCP/IP详解卷1:协议(英文版)》 《TCP/IP详解卷2:实现(英文版》 《TCP/IP详解卷3:TCP事务协议、HTTP、NNTP和UNIX域协议(英文版)》 2.Richard Stevens, UNIX Network Programming, 2/e, Vol.1 / Vol.2 《UNIX网络编程卷2:进程间通…

2011-08-15 11:42 · L · 评论(0)

Thu Rules of Cocoa Memory Management

When you create an object using [b]new, alloc, or copy[/b], the object has a retain count of 1. You are responsible for sending the object a release or autorelease message when you're done with it. That way, it gets cleaned up when its useful life is over. When you get hold of an object [b]via any …

2011-08-11 09:05 · L · Objective-C · 评论(0) · objective-c memory management rule

oracle help manual

cd ORACLE_HOEM/sqlplus/admin/help sqlplus system/pwd system@ORCL> @helpdrop.sql system@ORCL> @helpbld.sql system@ORCL> @helpus.sql first input: path name() second input: helpus.sql system@ORCL> help grant GRANT (Object Privileges) ------------------------- Use this command to grant privileges for a…

2011-01-24 13:41 · DB · 评论(0) · SQL Server · SQL · Oracle

让MyEclipse7.1更精简

去除MyEclipse 的一些相关的jsf的支持jar包 查找MyEclipse加载的jar包: $ pmap `pidof java` | grep jsf 6abfc000 368K r-xs- Genuitec/Common/plugins/org.jboss.tools.jsf.ui_2.0.1.zmyeclipse7102009030516/jsfui.jar 6d90c000 16K r-xs- Genuitec/Common/plugins/org.jboss.tools.jsf.verification_2.0.1.zmyeclipse7102009030516/jsf-ve…

2010-04-30 14:47 · J · 评论(1) · Myeclipse · Eclipse · UI · JSF · JBoss

在Linux平台下使用JNI

参考:http://www.ibm.com/developerworks/cn/java/l-linux-jni/ 但参考中的版本过于古老,不利于初学者参照。 环境: gentoo, jdk-1.6, gcc version 4.3.4 (Gentoo 4.3.4 p1.0, pie-10.1.5) 1. $ vi HelloJni.java $ cat HelloJni.java class HelloJni { public native void SayHello(String name); static { try { System.loadLibrary("HelloJni"); …

2010-04-07 14:49 · J · 评论(0) · vim · Java · JNI · Linux · JDK

'for' and 'sed' command

sed -e '/^sshd/!d' hosts.deny | cut -d' ' -f2 -e '/^sshd/!d' 删除非‘sshd’开头的行 -d' ' 空格分隔 -f2 分隔后所得数组的第二个值 $ cat hosts.deny sshd: 117.21.249.75 sshd: 58.252.146.187 sshd: 217.111.0.6 sshd: 92.243.65.138 for i in $(sed -e '/^sshd/!d' hosts.deny | cut -d' ' -f2); do echo $i;done for i in $(sed -e '/^sshd…

2009-09-10 23:11 · Linux · 评论(0)

如何应对不确定

原文链接: How to Live With Uncertainty 原文作者:Ellesse Chow 翻 译:Paula 审 校:Ellesse Chow 如果你下周开始新工作,要结婚,或者移居异国,你是不是感到心慌意乱? 两个月前,我的一位好朋友就经历了这样的恐慌。她接受了公司的安排到一个遥远的国家任职,但又无法对自己的决定安心。她不停地担心会远离家人朋友,也不知道能否适应当地的天气,文化和食物等等。你能想到的,她都能担心到了。 依我看,我并不觉得她真正担心即将发生的一切。因为如果她知道未来发生什么,按她的性格,她肯定会充分准备来消除恐惧。矛盾的是,她担心的是不在计划之列的事情。为不知…

2009-08-19 13:16 · L · 评论(0) · 工作 · 项目管理 · 生活