- 博客(24)
- 资源 (3)
- 收藏
- 关注
原创 Multi-Thread 4--- Lock & Conditions
1. Using reading and writing lockReading lock can make a data be read ea
2014-05-21 08:29:56 749
原创 Multi-Thread 2---ThreadLocal
1. what is ThreadLocalThread local is not a thread. It's more like
2014-05-17 03:58:28 874
原创 Multi-Thread 1: how to use synchronized
1. synchronizedIf two threads are using the same function( here we use output to print out string) of another instance, if we want to make sure that these two threads are not disturbing each other.
2014-05-14 05:23:32 902
转载 How to Use Iterator
JAVA Iterator 的用法以下是摘的一篇文章 很有收获java.util包中包含了一系列重要的集合类。本文将从分析源码入手,深入研究一个集合类的内部结构,以及遍历集合的迭代模式的源码实现内幕。 下面我们先简单讨论一个根接口Collection,然后分析一个抽象类AbstractList和它的对应Iterator接口,并仔细研究迭代子模式的实现原理。
2014-05-02 05:37:43 666
原创 Struts Notes(2)--------Action, redirect, OGNL
1. Action 的搜索顺序<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> /WEB-INF/page/hello.jsp
2013-03-15 12:33:22 1616
原创 集合类:Collection--List, Set, Map
1.JAVA集合类最常用的集合有List, Set 和 MapList ------------LinkedList ------------ArrayList ------------Vector |-------StackSet------------HashSet
2013-03-04 23:33:53 845
转载 算法一步一步
这是从往常摘抄来的一篇文章,觉得很不不错。无从考究原帖作者和出处,在此表示感谢,如果您是原帖作者,对转帖有异议,请来信第一阶段:练经典常用算法,下面的每个算法给我打上十到二十遍,同时自己精简代码,因为太常用,所以要练到写时不用想,10-15分钟内打完,甚至关掉显示器都可以把程序打出来.1.最短路(Floyd、Dijstra,BellmanFord) 12.最小生成树(先写个pr
2013-02-09 02:05:42 472
原创 PHP(3): Start using Smarty
1. About SmartyWhen we are doing web programming using PHP, one problem is that the php files can be mixed with php code as long as the html code. At some point, it is not very clean and also not sa
2013-01-11 02:40:47 796
原创 PHP(1): Variables and Operaters in PHP
1. How to define a VariableUse "$" to define a variable, different from JAVA, we don't need to use key word to define a variable, it's type is defined by the value we give. For example$ a = "a";
2012-12-26 01:57:47 565
转载 PHP Comparision Operater
5.4 运算符和其他的程序语言一样,PHP也有许多运算符。运算符可以用来处理数字、字符串及其他的比较运算和逻辑运算等。本节主要介绍常用的运算符,以及运算符的优先级。5.4.1 常用的运算符PHP有三种类型的运算符,它们是: ● 一元运算符,只运算一个值,例如:!(取反运算符)或++(加一运算符)。 ● 二元运算符,PHP 支持的大多数运算符都是这种,例如:$a + $b
2012-12-20 09:14:53 473
原创 Struts2 Notes(1)----set up the first sturts2 application
1. Overview of Struts2Struts2 is the next generation of Struts1, but the difference between Struts2 and Struts1 is not as small as their names. Struts2 is greatly different from Struts1, for it is b
2012-11-22 15:19:18 844
转载 Eclipse自动部署项目到Tomcat的webapps下的有效方法
开发JavaEE项目,常用的工具有MyEclipse,Eclipse,netBeans等,我比较喜欢用Eclipse,因为相比MyEclipse体积小很多,响应速度也快,且足以满足需求,我喜欢简洁的编程风格。MyEclipse加了很多插件,尤其是可以自动部署项目到Tomcat服务器,复制一个已有的项目,在项目上点右键,选择Properties,修改下Web Project Settings为新的项
2012-11-14 04:44:21 924
转载 String和StringBuffer的区别
JAVA平台提供了两个类:String和StringBuffer,它们可以储存和操作字符串,即包含多个字符的字符数据.这个String类提供了数值不可改变的字符串.而这个StringBuffer类提供的字符串进行修改.当你知道字符数据要改变的时候你就可以使用 StringBuffer.典型地,你可以使用 StringBuffers来动态构造字符数据. Java String的使用
2012-11-09 14:41:30 654
原创 java I/O
1 Node StreamThese streams are all connected to the file or memory directly. 1.2 use FileInputStream/ FileOutputStream to read and write from fileimport java.io.*;public class TestF
2012-10-23 04:51:34 1345
原创 TCP & UDP
1 TCP1.1 ServerSocket/** * author: huantaoliu * function: try to use tcp socket programming * time: 09.19.2012 */package com.socket;import java.io.*;import java.net.*;public class TCPS
2012-09-20 04:21:34 638
原创 How to use Thread
1. how to use threadTwo things need to know: Thread class and Runnable interface.We can instanciate a thread class to be a thread, we can also create a normal class and let this class implements R
2012-09-08 03:40:44 647
原创 Container Class and its equals(), hashCode() methods
1.Why we need ContainerFor example, if we need to manage the employees' names of an company, if we don't know Container, we can only use an Array to store all the names of the employees. But it's no
2012-08-28 05:21:04 814 1
原创 Dynamic Binding and Casting for the Extensibility of OOP
We all know that among the facts that make OOP so popular is its ability of Extensibility. So i want to see how does the JAVA program realize its exitensibility and the analysis between them.1.
2012-08-21 06:32:00 678
原创 Inherented Constructor
每个类都会有自己的构造方法,即使没有写,在实例化时系统也会自动增加无参的的构造方法。那么问题就来了,如果子类继承父类,而每个类中都有不止一个的构造方法,那么系统使用这些构造方法的规则又是什么呢?总体说来有四点:1 子类的构造过程中必须调用父类的构造方法什么是构造方法,首先它是一个方法(I am joking here), 它是一个将class实例化成为一个对象的方法。所以说,任
2012-08-17 23:44:18 792
原创 public,private and protected
1. when used to instance variables and mehodsFor example we have the java code below://code1package test;public class TestA { private int i = 0; int def = 0; protected int pr =
2012-08-17 14:12:54 629
原创 Building Hibernate Environment
1.why HibernateDuring our programming process, take the object oriented programming for example, we can divided our process into three layers:Presentation LayerBusiness LayerData Source Layer
2012-08-10 05:49:19 665
原创 Object Oriented Programming
1. Main memory analysisWhen Programs executes, the main memory is devided into 4 parts: Code section: store the programsData section: store dataHeap: store the object created by the "new" ke
2012-08-08 06:12:09 346
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人