I found two tools to beautiful the code
A. using javascript SyntaxHighlighter
B. online web change source beautiful
2015年3月20日 星期五
java 8 lambda
1. What is lambda ?
* lambda is like a mathematics function f(x) = x +2, but it doesn't the name.
* lambda in java is called function interface
* lambda is anonymous interface and only one function
2. Lambda style
(input) -> {body}
3. example
Runnable runnbale = new Runnable() { public void run() { System.out.println("run me!"); } };
Runnable runnbale = () -> System.out.println("run me!");
REF
Chinese: http://magiclen.org/java-8-lambda/
English more detail: more detail
Explanation visual: visual
oracle function interface
oracle comsumer face
2015年3月9日 星期一
Authentication vs. Authorization
Authentication mean
- Who is user ?
- And his password is hser?
Authorization mean
- Is the user can get the file?
- Is the user have write power?
2015年2月24日 星期二
LOG4j Simple start and slf4j start
Log4j
1. Log4j setting explaination Good Explaination, Overview22. Example code Simple Example
For Setting in tomcat discussion
Stackup
apache office
Discussion2
Non-web
Slf4j Start
1. Overview , overview 22. It need the dependence of
- slf4j-api-1.7.2.jar
- slf4j-simple
- logback-classic
- logback-core
3.If you using log4j in the after you should setting in run command
-Dlog4j.configuration="/home/Andy/workspace/ShiroSource/WebContent/WEB-INF/log4j.properties"
Complete the slf4j and log4j in apache shiro
Summary File
From here
a. Library using
b. log4j.properties file and put in the WEB-INF/
c. Setting the web.xml
d. Create web context listen at web start to load property files
2015年2月23日 星期一
Eclipse Add javax library
Using Eclipse:
- Right click your project folder, select Properties at the bottom of the context menu.
- Select "Java Build Path"
- Click Libraries" tab
- Click "Add Library..." button on right (about halfway down)
- Select "Server Runtime" click "Next"
- Select your Tomcat version from the list
- Click Finish
Reference from forumla
2014年11月2日 星期日
Jetty First
Description
* Jetty is a pure Java-based HTTP (Web) server and Java Servlet container.
* Developed as an independent open source project, in 2009 Jetty moved to Eclipse
* It supports AJP, JASPI, JMX, JNDI, OSGi, WebSocket and other Java technologies
Jetty Notice
* jetty default port is 9080, http://localhost:9080/
Study
Chinese Explaination
Office for First Hello World
Jetty On eclipse Judo install
Jetty on eclispe first
* Jetty is a pure Java-based HTTP (Web) server and Java Servlet container.
* Developed as an independent open source project, in 2009 Jetty moved to Eclipse
* It supports AJP, JASPI, JMX, JNDI, OSGi, WebSocket and other Java technologies
Jetty Notice
* jetty default port is 9080, http://localhost:9080/
Study
Chinese Explaination
Office for First Hello World
Jetty On eclipse Judo install
Jetty on eclispe first
2014年10月29日 星期三
訂閱:
文章 (Atom)




