原创 Mysql必知必會關於樣例表的導入方法

首先到本書配套網站下載壓縮包:http://forta.com/books/0672327120/ 在網頁的底部,點擊紅線處開始下載。下載後解壓出來兩個腳本文件,一個是create.sql。另一個是populate.sql。 按照書

原创 算法(第四版)中關於Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException錯誤的解決方法

最近在學習算法(第四版),用的Eclipse,結果發現編譯代碼有時會出現如下圖的錯誤。 代碼如下: package abc; import edu.princeton.cs.introcs.In; import edu.princ

原创 Set容器排序規定

Set容器默認情況下以operator<進行比較,將小的排在前面,所以如果要自定義Set容器的排序規則,必須對operator<進行重載。例子如下: struct node { int value, cnt; //cnt

原创 PAT A1110

#include <iostream> #include <string> #include <cstdio> #include <queue> #include <cstring> using namespace std; struct