原创 C++ 編程練習1

1. 編寫日曆打印程序,要求實現如下的main函數:     class Calendar;     int main() {         Calendar c0;         Calendar c1(2013);        

原创 c++編程練習2

1. 給定一個帶權(非負)有向圖,打印輸出從節點S到節點T的最短路徑(要求打印最短路徑長度和具體的路徑) int main() {  Graph<Node> G;   // Graph is a class with template  

原创 JVM-20130325

class a { public static int addmult(int x, int y, int z) { int temp = x + y; return z * temp; }

原创 Micro Java Programs for JVM

1. public class Main { public static void main(String[] args) { for(int i=0; i<100; i++) foo();

原创 正則表達式

1. 基本概念        在計算機科學中,是指一個用來描述或者匹配一系列符合某個句法規則的字符串的單個字符串。在很多文本編輯器或其他工具裏,正則表達式通常被用來檢索和/或替換那些符合某個模式的文本內容。許多程序設計語言都支持利用正則

原创 Ubuntu 下 apache服務器配置實驗

[實驗目的] 1. 瞭解互聯網應用層基本原理 2. 自己設計一個靜態網頁 [實驗原理] 網絡應用軟件的體系結構可分爲C/S模型和B/S模型。飛信是典型的C/S模型,而WebQQ則是典型的B/S模型。 本次實驗所將要搭建的靜態網頁採用的

原创 Mercurial -- An Excellent Version Control Tool

0. Install a mercurial on Ubuntu     sudo apt-get install mercurial 1.  Create a project and commit      >  hg  init  

原创 Function object

#ifndef _SHAPE_H_ #define _SHAPE_H_ #include <iostream> using namespace std; class Shape{ public: virtual double area

原创 inheritance and virtual

#ifndef _INHERIENCE_H_ #define _INHERIENCE_H_ #include <iostream> using namespace std; class vehicle{ private: char*

原创 The complex class

// File name : complex.h #ifndef _COMPLEX_H_ #define _COMPLEX_H_ #include <iostream> using namespace std; class comp

原创 [Linux] Touch--Change the time of files after changing your system time

Use command:   touch  Update the access and modification times of each FILE to the current time. Format:            1

原创 編程進階練習2

1. 給定一個圖G, 判斷是否存在一條從 S 到 T  的長爲 K 的路徑。 [Accepted 2013/03/27]  1) 鄰接矩陣版 //File name : is_path.hpp #ifndef _IS_PATH_H_ #

原创 編程進階練習1

1. 編程實現大數乘法(十進制128位以上,乘數與被乘數均不超過1024位) [Accepted 2013/03/21] #include <stdio.h> #include <string.h> #define MAX_LEN 10