自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Dominic's Blog

学习笔记:防止时间长了,学过的东西又忘记

  • 博客(63)
  • 收藏
  • 关注

原创 Performing native commands in java code

有些时候我们必须利用操作系统的一些命令达到一定的结果,比如得到进程数、删除数据、修改文件权限等。    在java的API里的java.lang包,已经为我们的这种需求提供了方便。Runtime类的实例能开启一个新的进程去执行一些命令。闲话少叙,看代码:import java.io.BufferedReader;import java.io.IOException;import java.

2011-06-13 11:09:00 369

原创 Data Type convert

import java.text.DecimalFormat; import java.text.NumberFormat; public class DataTypeConvertion {     public static void main(String... arg) {         DataTypeConvertion dt=new DataTypeConvertion();         dt.doubleConvertion(" 4.35081195E9");

2011-05-11 22:30:00 451

原创 How to configure Log4j in Tomcat

Steps below explain how to configure Tomcat to use log4j system. 1. Download extra components including extras/tomcat-juli.jar, extras/tomcat-juli-adapters.jar in Apchee tomcat home page. 2. Replace $CATALINA_HOME/bin/tomcat-juli.jar with extras/tomcat-j

2011-04-25 14:35:00 621

原创 Integration Tomcat into Apache Httpd

Setting Up Apache httpd Suppose you want httpd to map all references to the /loch-ness directory over to Tomcat for serving. First, you must ensure that you can use mod_proxy in httpd; if you’re already using mod_proxy, you can skip the next paragra

2011-04-22 18:25:00 690

原创 Advanced SystemCare

Advanced SystemCare (内附激活码) 此帖对"联想IdeaPad"的评论 最近~~~ 小Y论坛比较冷清了。给大家分享个系统优化软件: 当电脑经过长时间的使用,系统会因为一些垃圾文件长期得不到清理而导致系统运转越来越慢,如何保持电脑的良好运转成了摆在网友们面前的一道难题。而网络中流传的各种系统优化技巧也是多如牛毛,有的确实可以达到优化系统,提升系统性能的目的,有的却是伪技巧,根本达不到目的。其实,最简单的方法是利用系统优化软件完成对系统的优化,这样既安全,又方便。

2011-04-10 20:24:00 2533

原创 Bit movement operation

package com.learning.numeric; public class Bits {     public static void main(String...strings ) {         //         for(int i=1; i

2011-04-01 14:09:00 370

原创 Java ThreadLocal - How to use and code sample

Source:http://veerasundar.com/blog/2010/11/java-thread-local-how-to-use-and-code-sample/ Thread Local is an interesting and useful concept, yet most of the Java developers are not aware of how to use that. In this post, I’ll explain what is Thread Local a

2011-04-01 05:55:00 968

原创 金山词霸使用牛津词典取词的笨方法

默认金山词霸不能使用牛津的几个词典取词,可以把1#510.dic(新牛津英汉双解大词典)更改名称为1#652.dic(七国语言大词典(中文部分)),这样,金山词霸会把“新牛津英汉双解大词典”的文件识别为“七国语言大词典(中文部分)”,然后在词典设置里面把“七国语言大词典(中文部分)” 添加到取词词典和查词词典里面,当然,也可以复制一个1#510.dic文件改名为1#652.dic专用于取词。 另附常用词典文件名对照表 1#510.dic 新牛津英汉双解大词典 1#618.dic 新牛津美语大词典

2011-03-22 23:57:00 2345

原创 Java书籍

什么叫“经典书籍”呢?      以往我们说,“一流的公司定标准,二流的公司搞技术, 三流的公司做服务,末流的公司卖产品”,其实这话并非全无道理。厌恶m$的人不少,但嘴上骂归骂,底下照样用windows, 赌咒发誓不用的也未必不想暗地里钻研一下其中的技术,再狠点,干脆只看linux的字符界面,连x都不用。 然而为啥不见哪位仁兄自己只玩自己弄的os呢?m$和unix家族在os上显然是具有语言霸权, os搞到这份上基本上就是“标准”了,你愿意白手起家?呵呵~~~      说了这些废话,我无非想说的是

2011-03-22 21:56:00 431

原创 java 书籍

本文对最为经典的十本Java书籍做了简要介绍了介绍,读者可以根据其侧重点的不同来选择阅读和学习。 1)Java Language Specification, Third Edition (by James Gosling) 本书由Java技术的发明者编写,是Java TM编程语言的权威性技术指南。如果你想知道语言之构造的精确含义,本书是最好的资源。       2) Effective Java , Second Edition (by Joshua Bloch) 本书介绍了

2011-03-22 14:35:00 635

原创 C, C++, Network编程经典书籍

四书五经:CSDN《程序员》四书五经专栏历年文章汇总 04年第1期:荣耀——C程序设计之四书五经 http://book.csdn.net 2006-7-21 19:28:00 C程序设计之四书五经 荣耀/文 引言 自从Dennis M.Ritchie于1973年设计并实现C语言以来,计算机程序设计领域已经发生了巨大的变化。以C语言为根基的C++、Java和C#等面向对象语言相继诞生,并在各自领域大获成功。今天,C及其后裔几乎统治了计算机程序设计世界。可以这么说,C语言的诞

2011-03-19 12:39:00 4451

原创 TCPIP之四书五经

    TCP/IP协议是当前广域网和局域网通用的网络协议,因此,基于TCP/IP的编程就格外重要。从应用上来说,现在直接利用C层次Socket API进行TCP/IP编程的人确实越来越少了,各种现成的框架(如ACE、Java、.NET FCL)和控件(如IP*Works)大大简化了TCP/IP编程的难度。但是,如果想要在这个领域达到融会贯通的地步,不打下坚实的基础是不可想象的。正如Richard Stevens在TCP/IP Illustrated中所说,在网络编程领域,开发者所遇到的实际问题中,大约有9

2011-03-19 12:05:00 529

原创 Configure SVN,SCP in Ant

1. Guaranteed That Ant home is in the Ant classpath. 2. Added the SVN-ANT libraries into Ant classpath. 3. Added JSCH lib into Ant classpath.

2011-03-17 13:27:00 418

原创 JAVA二进制文件读写

转自:http://zoodragon.javaeye.com/blog/509237 /**  * 二进制读写文件  */ import java.io.BufferedInputStream;     import java.io.BufferedOutputStream;     import java.io.DataInputStream;     import java.io.DataOutputStream;     import

2011-02-25 01:08:00 810

原创 how to talk so kids will listen and listen so Kids will talk

Acknowledgments                                                                                  To leslie Faber and Robert Mazlish, our consultants-in-residence, who were always there for us-wi To Carl, Joanna, and Abram Faber, to Kathy, Liz, and John

2011-01-17 00:13:00 1019

原创 VisualVM

Once a remote host is added under the Remote host node, VisualVM persists the address of the remote host and will make a connection to the host each time VisualVM is started. If you do not want VisualVM to connect to host on startup, you should right-click

2011-01-12 18:14:00 281

原创 Pointers and the const Qualifier

Pointers to const Objects const double *cptr;   //cptr may point to a double that is const Here cptr is a pointer to an object of type const double. The const qualifies the type of the object to which cptr points, not cptr itself. That is, cptr itsel

2011-01-04 21:04:00 345

原创 The books which are worth reading for me

How to talk so kids will listen & listen so kids will talk. 如何说孩子才会听,怎么听孩子才肯说. Authors: Adele Faber, Elaine Mazlish   人月神话 人间 从优秀到卓越 基业长青 think in java C primer plus C++ primer C++ Standard Library STL源码剖析 Agile.And.Iterative.Development.A.Man

2011-01-04 12:40:00 2993 1

原创 Pointer and Array--some code fragment

Dereference Yields an Lvalue *sp = "goodbye"; // contents of s now changed string s2 = "some value"; sp = &s2; // sp now points to s2 Subscripts and Pointers int ia[] = {0,2,4,6,8}; int i = ia[0]; // ia points to the first element in ia int *p

2010-12-31 15:45:00 298

原创 C ++

main The Operating system uses the value returned by main method to determine whether the program succeeded or failed. A return value of 0 indicates success. #include This line is a preprocessor directive. Tell compiler that we need to use the iostrea

2010-12-23 23:29:00 454

原创 Tomcat(8-3) The Context Application

None

2010-12-20 22:24:00 216

原创 Tomcat(8-2) The Wrapper Application

The wrapper application demonstrates how to write a minimal container module. The wrapper wraps the ModernServlet that you have used in the previous chapters. This application proves that you can have a servlet container consisting only of one wrapper.

2010-12-19 18:09:00 364

原创 Tomcat(8-1) Container Interface

Container interface source code who is excerpted from Tomcat V7. /* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  * See the NOTICE file distributed with this work for additional information regard

2010-12-18 13:30:00 290

原创 Tomcat(8) Container

A container is a module that processes the request for a servlet and populates the response object for web client. A container is represented by org.apache.catalina.Container interface and there are four types of containers: Engine, Host, Context, and Wrap

2010-12-17 21:39:00 388

原创 Google buffers

Please refer to http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/overview.html Overview Protocol buffers are flexible, efficient, automated mechanism as well as language-neutral, platform-neutral, extensible way of serializing structured data

2010-12-16 20:38:00 232

原创 Data type conversion

Convert byte array to hexadecimal // Read data from binary file into input stream, read byte from input stream, convert byte to hexadecimal public void readFile() {         // Specify a binary file         String fileName = "gpb_201012

2010-12-15 10:47:00 838

原创 Tomcat-6 HTTP 1.1

This topic, we will start with three new features in HTTP 1.1 understanding them is crucial to understanding the internal working of the default connector. Persistent Connections Prior to HTTP 1.1, whenever a browser connected to a web server, the connec

2010-12-12 23:05:00 898

原创 Tomcat-7 Tomcat Default Connector

A Tomcat connector is an independent module that can be plugged into a servlet container. There are already many connectors in existence. Examples include Coyote, mod_jk, mod_jk2, and mod_webapp, A Tomcat connector must meet the following requirements:

2010-12-12 20:05:00 1655

原创 Essentials of JMX API - Dynamic MBean

Standard MBeans are ideally suited for straightforward management structures, where the structure of managed data is well defined in advance and unlikely to change often. In such cases, standard MBeans provide the quickest and easiest way to instrument man

2010-12-04 23:51:00 360

原创 Essentials of JMX API - MXBeans

An MXBean is a new type of MBean that provides a simple way to code an MBean that only references a pre-defined set of types. In this way, you can be sure your MBean will be usable by any client, including remote clients, without any requirement that the c

2010-12-04 23:08:00 403

原创 Singleton Pattern

  Singleton Pattern 收藏 This is one of the most commonly used patterns. Make the class of the single instance object responsible for creation, initialization, access, and enforcement. Declare the instance as a private static data member. Provide a publ

2010-12-03 23:22:00 231

原创 Internationalization of Error Message

Excerpted from . A large application such as Tomcat needs to heandle error messages carefully. In Tomcat error messages are useful for both system administrators and servlet programmers. For example, Tomcat logs error messages in order for system administ

2010-12-03 23:21:00 418

原创 Tomcat-5 A simple Connector

There are two modules in Catalina: the connector and the container. In this topic you we will enhance the applications in the topic "A Simple Servlet Container" by writing a connector that create better request and response object. A connector compliant wi

2010-12-03 23:20:00 427

原创 Facade Pattern

Facades are all around us in the real world. Operating System are one such example - you don't see all the inner working of your computer, but the OS provides a simplified interface to use the machine. Buildings also have a facade - the exterior of the bui

2010-12-03 23:19:00 274

原创 Tomcat-4 A Simple Servlet Container

This chapter explains how you can develop your own servlet container by presenting two applications. The first application has been designed to be as simple as possible to make it easy for you to understand how a servlet container works. It then evolves in

2010-12-03 23:15:00 370

原创 Tomcat-3 A Simple Web Server

Excerpted from A web application server must stand by all time as it does not know when a client application will try to connection to it. in order for your application to be able to stan by all the time, you need to use the java.net.ServerSocket class.

2010-12-03 23:12:00 294

原创 The Hypertext Transfer Protocol(HTTP)

Excerpted from . HTTP Requests: A HTTP request consists of three components: Method-Uniform Resource Identifier(URI)-Protocol/Version Request headers Entity body An example of a HTTP request is the following: GET /index.html HTTP/1.1 Ac

2010-12-03 23:06:00 508

原创 How A Servlet container Works

A servlet container is a complex system. However, basically there are three things that a servlet container does to service a request for a servlet: Creating a requestion instance and populate it with information that may be used by the invoked servlet

2010-12-03 23:03:00 310

原创 Essentials of JMX API - Standard MBeans

This topic introduces the fundamental notion of the java management extensions (JMX) API, namely managed beans, or MBeans. A standard MBean is defined by writing a java interface called somethingMBean and a java class called something that implements that

2010-12-03 15:41:00 355

原创 Accessing Standard and Dynamic MBeans via the RMI Connector

The purpose of this examples is to demonstrate the implementation of a standard MBean and a dynamic MBean. It also shows how to perform operations on them, both locally, and remotely through an RMI connection between a server and a remote client. A standa

2010-12-03 14:01:00 487

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除