- 博客(34)
- 收藏
- 关注
原创 APR installation
Build tc-native requires three components to be installed:APR librraryOpenSSL librariesJava SE Development Kit (JDK) Step 1: In
2011-09-23 14:10:00 750
转载 C, C++, Network编程经典书籍
自从Dennis M.Ritchie于1973年设计并实现C语言以来,计算机程序设计领域已经发生了巨大的变化。以C语言为根基的C++、Java和C#等面向对象语言相继诞生,并在各自领域大获成功。今天,C及其后裔几乎统治了计算机程序设计世界。可以这么说,C语言的诞生是现代程序语言革
2011-09-15 10:28:47 1354
转载 Read and write bytes data
// Write 100000 random numbers without bufferingimport java.io.*;public class WriteUnbufferedTest{ public static void main(Stri
2011-09-08 07:50:25 509
原创 Set up remote profiling with JProfiler
Background:Remote machine: (Byte the way, checking some hardware and software information:#cat /proc/cpuinfo | grep name | cut -f2
2011-09-07 16:23:26 462
转载 投资投机经典著作55本
金融机构类 《华尔街巨人》 【美】华尔街日报编辑部 海南出版社 《沃尔特·瑞斯顿与花旗银行》 【美】费利普·L·茨威格 海南出版社 《摩根财团》 【美】罗恩·彻诺 中国财政经济出版社 《高盛文化》 【美】里莎·埃迪里奇 华夏出版社 《投资商资本主
2011-08-27 16:44:27 3582
转载 tomcat中的session管理
当一个sesson开始时,Servlet容器会创建一个HttpSession对象,在某些情况下把这些Httpsession对象从内存中转移到文件系统中或数据库中,需要访问的时候在把它们载入到内存中来。这样做的好处有两点:节约了内存的消耗,当web服务器产生故障时,还可以从文件系统
2011-08-25 15:03:33 291
原创 start automatically your application after the OS restarted
cd /etc/rc.dvim rc.localadd some commandsExamples:# Start Apache http server with root permission/usr/sbin/apachectl -k star
2011-08-24 16:34:14 305
原创 Rewrite example of Apache HTTP
DocumentRoot /data/www/pull ServerName qsp.morningstar.com# Alias / /pullservice/pull# RewriteEngine On# #Rewri
2011-08-02 15:30:13 342
转载 java ClassLoader(转)
Java ClassLoader当JVM(Java虚拟机)启动时,会形成由三个类加载器组成的初始类加载器层次结构: bootstrap classloader | extension classloader
2011-07-20 11:00:37 1216
转载 axis2 soap整合hibernate遇到的classloader问题(转)
问题:aar无法提供classpath的环境尽管aar环境非常象WEB-INF/class, 但aar不提供classpath的环境服务代码:package com.machome.test;import com.machome.model.Student
2011-07-20 10:47:47 576
转载 流行酷语
每天早上起床都要看一遍福布斯富翁排行榜,如果上面没有我的名字,我就去上班。 帅有个屁用,到头来还不是被卒吃掉! 停息是一种痛苦,所以我们忙碌远离痛苦。 还能冲动,表示你还对生活有激情;总是冲动,表示你还不懂生活。 新式morning call——生前何必久睡,死后自会长眠。 问世
2011-07-14 08:23:50 5338 1
原创 笑林(1)
1. “老板,来盘寂寞。” “对不起,先生,本店只剩空虚了。” “开心、快乐也没有吗?” “有,是水货。” “真心有吗?” “昨天有买虚情假意的搭给他了。” “情人有吗?” “有。” “来一个,给我加点诺言。” “现在诺言都是假的。” “那知己怎么卖?” “这个可贵,一缘一份。” “来一份。” “那你得邂逅。”
2011-06-30 07:53:00 356
原创 Reading config file in aar archive on Tomcat with Axis2(aar中读配置文件)
1. Put your config file inside lib directory populated on aar file.2. Using: InputStream in=getClass().getClassLoader().getResourceAsStream("Test.properties");which will load the property fi
2011-06-29 14:41:00 789
原创 Escape Rout
public class EscapeRout { public static void main(String...strings){ System.out.println("a/u0022.length() + /u0022b".length()); } }这一行会打印什么呢?2实质上第三行编译的结果是: System.out
2011-06-27 10:45:00 356
原创 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 f
2011-06-23 11:04:00 338
原创 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 dist
2011-06-23 11:03:00 423
原创 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
2011-06-23 11:02:00 344
原创 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
2011-06-23 11:01:00 226
原创 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
2011-06-23 11:01:00 307
原创 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 Visual
2011-06-23 11:00:00 253
原创 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
2011-06-23 11:00:00 343
原创 JAVA二进制文件读写
转自:http://zoodragon.javaeye.com/blog/509237 /** * 二进制读写文件 */ import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.DataInputStream;
2011-06-23 10:59:00 1064
原创 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
2011-06-23 10:58:00 314
原创 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-06-23 10:55:00 280
原创 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
2011-06-23 10:54:00 385
原创 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’
2011-06-23 10:53:00 875
原创 Apache的安装和配置相关信息收集
修改主配置文件 httpd.conf vim /etc/httpd/conf/httpd.conf 配置Apache的根目录为ServerRoot "/etc/httpd", 设置客户端访问超时时间为Timeout 120秒,这两个设置为系统默认 设置httpd监听端口 Listen 80 设置管理员E-mail地址 ServerAdmin qqcyg@1
2011-06-23 10:51:00 473
原创 Linux下安装JDK并配置环境变量
1. Download the JDK underlying the Linux Platform(建议下载RPM自解压格式的文件)。 我下载的文件是:jdk-6u19-linux-x64.bin 2. 上传到服务器后执行下面的命令:(我文件上传到/data目录中) chmod 755 jdk-6u19-linux-x64.bin ./jdk-6u19-linux-
2011-06-23 10:48:00 360
原创 Data Type convert
import java.text.DecimalFormat; import java.text.NumberFormat; public class DataTypeConvertion { public static void main(String... arg) { DataTypeConvertion dt=new DataTypeConve
2011-06-17 08:49:00 250
原创 Performing native commands in java code
有些时候我们必须利用操作系统的一些命令达到一定的结果,比如得到进程数、删除数据、修改文件权限等。 在java的API里的java.lang包,已经为我们的这种需求提供了方便。Runtime类的实例能开启一个新的进程去执行一些命令。闲话少叙,看代码: import java.io.BufferedReader; import java.io.IOException; imp
2011-06-17 08:48:00 242
原创 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
2011-06-17 08:47:00 385
原创 Chapter 1 helping Children Deal With Their Feelings
Part 1 I was a wonderful parent before I had children. I was an expert on why everyone else was having problems with theirs. Then I had three of my own. Living with real children can be humbling. Ev
2011-06-17 08:16:00 243
原创 Bit Operations
public static void main(String[] arg) { System.out.println(); System.out.println(" for(int i=1; i System.out.println(i+":"+(1 } System.o
2011-06-14 13:59:00 303
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人