From:
Subject: The Art of Computer Game Design
Date: Sat, 15 Jan 2005 13:04:06 +0800
MIME-Version: 1.0
Content-Type: multipart/related;
boundary="----=_NextP
发信人: longman (龙飘飘), 信区: Algorithm
标 题: [转载]编程之道(The Tao of Programming)(2)
发信站: 飘渺水云间 (Tue May 29 22:16:20 2001), 转信
Design
Book Three
Thus spake the master programmer:
编程大师如是说:
"When progra
发信人: longman (龙飘飘), 信区: Algorithm
标 题: [转载]编程之道(The Tao of Programming)(3)
发信站: 飘渺水云间 (Tue May 29 22:16:55 2001), 转信
Corporate Wisdom
Book Seven
Thus spake the master programmer:
编程大师如是说:
"Y
The day-of-week is an integer value where 1 is Sunday, 2 is Monday, ..., and 7 is Saturday
Calendar xmas = new GregorianCalendar(1998, Calendar.DECEMBER, 25);
int dayOfWeek = xmas.get(Calen
Note that (0, 0) of the Graphics object is at the top-left of the actual page, which is outside the printable area.
public int print(Graphics g, PageFormat pf, int pageIndex) {
// The a
The length of an array is the number of elements of the array. The dimensions of an array type of int[][][] is three.
Object o = new int[1][2][3];
// Get length
int len = Array.g
The component type of an array is the type of an array's elements. For example, the component type of int[] is int. The component type of int[][] is int[].
object.getClass().getComponentType()