原创 "Dino Killer" Asteroid Was Half the Size Predicted

When large meteorites strike Earth, as pictured above in an artist's conception, they often vaporize and change the rat

原创 C++異常處理的一個通用的xcept頭文件

#ifndef Xcept_ #define Xcept_ #include <new.h> // bad initializers class BadInitializers { public: BadInit

原创 Black Holes

While most stars end up as white dwarfs or neutron stars, black holes are the last evolutionary stage in the lifetimes

原创 Matrix類的一種C++實現

  功能:構建一個Matrix,擁有轉置、矩陣加、矩陣減、矩陣乘 #ifndef Matrix_Wang #define Matrix_Wang #include "xcept.h" #include <iostream>

原创 Beetle遊戲改進版

        在執行這個遊戲時,最後屏幕上顯示的是如下圖所示。 甲蟲情況變成了Beetle@60aeb0。   原來在System.out.println(beetle)中實際上用到了toString方法,爲了清楚表達甲蟲的情況,要重寫

原创 Craps遊戲的java實現

遊戲人數:1人 手中握有骰子的人叫做擲骰子的人(Shooter)。如果他擲出7點或者11點,他就贏了。如果他擲出2點,3點,或者12點,他就輸了。如果他擲出4點,5點,6點,8點,9點,或者10點,莊家會在某個擲出的點數上放置一個大的“O

原创 Beetle遊戲java實現

遊戲規則:參與人數1人以上,誰的甲蟲最先完整誰就勝出。初始的甲蟲不具有任何器官,而完整的甲蟲具有軀幹、頭部、6條腿、兩隻眼、兩隻觸角、一條尾巴。 玩法:輪你擲骰子時,按如下規定採取動作: 1:如果甲蟲已有一處軀幹,傳骰子給下一位。否則,添

原创 "因禍得福" ---字符串交迭和邊界問題的繼續回顧

        昨天那個border算法我說好像在哪裏見過,原來就是KMP算法中的精髓部分。KMP算法我以前是看過的,現在足以表明我看的是多麼膚潛,或者說根本就沒弄懂他的意思。以前對KMP算法的next[]函數引入是佩服的五體投地,四腳朝

原创 Photo Gallery: Volcanoes

Perched above the lighted city of Catania, Italy, Mount Etna hurls a fountain of fire skyward as rivers of lava spill

原创 關於字符串的交迭與邊界問題算法的一些回顧

       又見字符串算法,看到那個交迭和邊界的算法,真是看到腦殼痛。由於原文資料還是英文的,上週就在那翻譯了,還沒仔細看過,也不知道翻譯的對不對,今晚拿着打印版的跑到教室坐了會,假日人少但很清靜!整個晚上光看交迭和邊界問題了。文章算法

原创 Lightning

Shocks of lightning split a cloud formation over Lake Tanganyika in Tanzania. Tanzania's neighbor, the Democratic Repu

原创 Milestones in Space Photography

This famous "Blue Marble" shot represents the first photograph in which Earth is in full view. The picture was taken o