- 浏览: 257481 次
- 性别:
- 来自: 南京
-
最新评论
-
mabusyao:
漠北空城 写道请问下,你这个是JDK版本是多少呢?!忘记了,应 ...
HashMap 源码解读 -
漠北空城:
请问下,你这个是JDK版本是多少呢?!
HashMap 源码解读 -
schumee:
完美团队~
项目沉思录 - 1.1 -
winie:
整理下 搞成引擎嘛 国产需要这样的engine
简单工作流引擎 -
mabusyao:
某位同学给我提供的堪称完美的解决方案:1. 将三个int数组放 ...
CraneWork
文章列表
我们最早提到,Log4j的初始代码在LogManager的静态块中。里面包含了许多初始化工作的代码,我们来看一下:
static {
Hierarchy h = new Hierarchy(new RootLogger(Level.DEBUG));
repositorySelector = new DefaultRepositorySelector(h);
...
OptionConverter.selectAndConfigure(url, configuratorClassName,
LogManager.getLoggerR ...
在上一篇文章里,我们故意遗漏了一个重要的接口,AppenderAttachable:
public interface AppenderAttachable {
public void addAppender(Appender newAppender);
public Enumeration getAllAppenders();
public Appender getAppender(String name);
public boolean isAtta ...
最近闲来无事,正好手头上有Log4j的代码,于是就拿来学习了下。 想来这个小工具也用了很多年了,但是从来没有真正的去了解过内部机制,经过一番学习后,发现结构还是蛮不错的,里面有很多东西值得学习。
总的来说,Log4j的代码我认为可以分为这几大部分:
1. 产品Logger
2. 附件Appender
3. 仓储Repository
4. 生产工厂Factory
5. 配置管理Configuration
产品Logger
Log4j里面最重要的当然就是Logger类了,在代码中,我们通常采用LogManager.getLogger(clazz);或者Logger. ...
存储中间计算结果的动态规划算法
- 博客分类:
- 算法
public class RodCutting {
public static void main(String[] args) {
int n = 5;
int[] prices = new int[]{1, 4, 5, 6, 8};
long start = System.currentTimeMillis();
System.out.println(cut(n, prices));
long end = System.currentTimeMillis() - start;
System.out.println(end);
}
...
The process framework
- 博客分类:
- PMP
1. Process groups
Initiating, Planning, Executing, Monitoring&Controlling, Closing
2. The relationships between phases
Sequential relationship means when your project has phases that happen one after another and don't overlap.
Overlaping relationship means you need teams to work on differe ...
1. What is a project expediter and project coordinator.
A project expediter just record the status and not managing the project.
A project coordinator is like a expediter, except that coordinator typically report to a high-level managers and have some decision-making ability. expediter has no autho ...
Introduction to PMP
- 博客分类:
- PMP
1. What you need to be a good project manager?
a. Knowledge
All the tools and techniques in the PMBOK.
b. Performance
Keeping your nose to
the grindstone and doing good work to make a delivery.
c. Personal Skills(Skills to work with people)
Make
personal connections with your team
a ...
今天早上看到一个关于java7中的ThreadLocalRandom的用法的帖子,说是比Math.Random()速度要快一倍,转过来学习一下 :
When I first wrote this blog my intention was to introduce you to a class ThreadLocalRandom which is new in Java 7 to generate random numbers. I have analyzed the performance of ThreadLocalRandom in a series of micro-benchm ...
The China Premium. Fake Prestige Sells Tickets.
Posted by Dan on December 09, 2011
Spoke with a client the other day, who for reasons that will soon become apparent, I am not going to name. This company makes a mid-line consumer product that sells for approximately ¥954.09 ($150) in both the Un ...
1、FACTORY—追MM少不了请吃饭了,麦当劳的鸡翅和肯德基的鸡翅都是MM爱吃的东西,虽然口味有所不同,但不管你带MM去麦当劳或肯德基,只管向服务员说“来四个鸡翅”就行了。麦当劳和肯德基就是生产鸡翅的Factory 工厂模式:客户类和工厂类分开。消费者任何时候需要某种产品,只需向工厂请求即可。消费者无须修改就可以接纳新产品。缺点是当产品修改时,工厂类也要做相应的修改。如:如何创建及如何向客户端提供。 2、BUILDER—MM最爱听的就是“我爱你”这句话了,见到不同地方的MM,要能够用她们的方言跟她说这句话哦,我有一个多种语言翻译机,上面每种语言都有一个按键,见到MM我只要按对应的 ...
下面的讨论以Windows平台的Sun MicroSystem实现的java5虚拟机为蓝本,其他操作系统或其他公司实现的虚拟机参数会有部分不同,但大部分含义都和Windows上的类似。Java5与以前版本相比,虚拟机参数大部分保持了向前兼容,同时也 ...
TOMCAT源码分析(启动框架)前言: 本文是我阅读了TOMCAT源码后的一些心得。 主要是讲解TOMCAT的系统框架, 以及启动流程。若有错漏之处,敬请批评指教!建议: 毕竟TOMCAT的框架还是比较复杂的, 单是从文字上理解, 是不那 ...
本打算做一个从RE到NFA的转换器,思路已经理清了,但是在动手做的时候,遇到了很多问题,有些技术难点都遗忘了,包括如何定义闭包,如何利用递归来实现。
于是回头重新拾起这些技术,边学边思考,做了个四则运算器练练手,为着那个大目标做准备。
基本的思路是这样的:
根据输入的四则运算表达式,生成一棵二叉树,树的根节点是操作符,而子树可能是叶子节点,即数字。也可能是另一个运算表达式。生成树的规则是,对每一个节点产生一个相应的type值,type值越大,就在树的越靠上节点。基本原则是: 数字(10) < 乘除运算(20) < 加减运算(30)。
括号被当做是 ...
Class Name
org.apache.coyote.http11.Http11ConnectionHandler
Inheritance
Handler
Related Classes
Http11Protocol
RequestGroupInfo
Http11Processor
Functionality
Maitainance processor list,assign cooresponding processor to input requests.