原创 Java中實現C++中的enum

以下是我開通的JAVA論壇,歡迎光臨^_^http://groups.google.com/group/roofalison/browse_threa

原创 Note of 《thinking in java》2

(2). Everything is an object String can be initialized with quoted text. There are six different places to store data:

原创 Note of 《thinking in java》6

6.類的重用 1.       所有的類都有一個toString方法。 2.       後期的初始化:在載入一個類時,將所有成員都初始化爲完整的對象可能會導致載入負擔過大,在這種情況下應使用後期初始化:即當一個對象第一次被使用時纔將它初

原创 Note of 《thinking in java》1

Introduction Thinking about designed, not simply coding. (1). Introduction to object Thinking of an object as a service

原创 C++類模板:模板內的typename名字將屏蔽模板外部的名字

  // 類模板中的類型名字可以屏蔽定義外部的名字 #include <iostream>#include <string>using namespace std;// 模板外部對double起了個類型別名T typedef doubl

原创 Java中final的用法總結

  1.         修飾基礎數據成員的final 這是final的主要用途,其含義相當於C/C++的const,即該成員被修飾爲常量,意味着不可修改。如java.lang.Math類中的PI和E是final成員,其值爲3.14159

原创 Note of 《thinking in java》4

4. Initialization & Cleanup If Tree(int) is your only constructor, then the compilor won't let you create a Tree object

原创 Note of 《thinking in java》5

5. Hiding the Implementation A primary consideration in object-oriented design is "separating the things that change fr

原创 KMP算法學習

/*    字符串匹配算法    第二個算法:KMP匹配法    函數名:str_match*/#include<stdio.h>#include<s

原创 Note of 《thinking in java》3

3. Controlling Program Flow An rvalue is any constant, variable, or expression that can produce a value, but an lvalue

原创 你的選擇:學習的不同境界--轉自《開復學生網》

我把學習的境界由低到高分爲五個層次。 http://www.5xue.com/modules/wordpress/?p=637 2007/10/29 — 小寧 (閱讀: 1521) 1. 學會答案。2, 學會方法 。3. 學會學習。4.

原创 去年寫的代碼大全筆記(其實是摘記)

Reader: Roof 前言:     雖然近年來前衛的開發實踐迅速發展,但普通的實踐手段並沒有太大變化。很多程序的開發依然漏洞百出、遲於交付並且超出預算。    軟件業的現狀是,很多程序員並未接受正規的軟件開發教育。    軟件

原创 [轉]一些計算幾何的基礎

轉載地址:http://blog.sina.com.cn/s/blog_4d0d397d01009w5f.html 計算幾何基本概念和常用算法_廖永峯_新浪博客 本文整理的計算幾何基本概念和常用算法包括如下內容: 矢量的概念

原创 [轉]馬化騰:如何從“較好”到“最好”

馬化騰:如何從“較好”到“最好” 本文發表於 2009-06-15 08:31 | 246次閱讀 | 來源:21世紀經濟報道 | 共有評論()條 發表評論 關鍵詞:騰訊  | 感謝ydj9931 的提供 | 收藏

原创 C++的=運算符重載並非簡單內存拷貝

    當我們定義一個C++類,如果沒有爲其定義=運算符重載,那麼編譯器就爲其定義默認的=運算符重載。即默認拷貝。前陣子一個朋友問我:默認的=運算符重載是否就是直接的內存拷