#include <stdio.h>#include <stdlib.h>char* menu[] = {"a - add new record","d = delete record","q - quit",NULL,};// int func(int a[]) // a is a pointer to the first element of an array// int func(int* a) // is the same as the above one//
原文: http://www.pagerank.net/display-pagerank.phpDisplay PageRankDo you want to display your PageRank on your Web site?Simply follow the easy steps below:按照下面步驟 1. Highlight the code in the text box.選中下面文字框中的代碼 2. Copy the code (usually
How to nap - Boston.com http://www.boston.com/bostonglobe/ideas/naps/ 長久以來,白天小憩(打盹,午睡)等備受指責,被描述為懶惰、虛弱或衰老的標誌。我們被“逮住在打盹”。 但近年來,打盹又獲得了應有的尊敬,這要歸功於有可靠的科學證據證明白天瞌睡對我們的身心都有好處。大量研究表明打盹可增強警覺性、創造力,提升精神狀態和下午的生產力。
以下是我的讀書筆記,有很多的東西有可能是胡編亂造與事實相反。1,(Ω,Θ,O)。2,上述記號為標識符,為集合的標識符。3,T(n)=2n+3,表示對於一個演算法來說,當輸入規模為n的時候,演算法啟動並執行時間。4,T(n)=Θ(g(n)),表示T(n)作為一個函數屬於集合Θ(g(n))。5,Θ(g(n))定義了一個集合,這個集合的元素是一些滿足下列條件的函數。Θ(g(n)) ={f(n) : there exist positiveconstants c1, c2, and n0
以下為讀書筆記術語並發是一個通用的概念(concurrency),指同時具有多個活動的系統;而術語並行(parallelism)指的是用並發使一個系統啟動並執行更快。並行可以在電腦系統的多個抽象上運用。1.線程級並發2.指令級並行3.單指令多資料並行以下為轉載並行(Parallel),或曰並行代碼,或曰並行系統都是討論有關如何使用現有系統,通過任務分區(breaking into
這個是嚴格按照虛擬碼寫的,半成品:#include <iostream>// 數組為a[0],a[1].....a[p],a[p+1],a[p+2]....a[q]..a[r],a[r+1]......;// 一共進來七次// first a[0],a[1] then a[2],a[3],// then a[0]~a[3]// then a[4],a[5], then a[6],a[7]// then a[4]~a[7]// then a[0]~a[7].void
#include <iostream>void InsertSort(int* a, int n){ int key; // j賦值為1因為是從第二個元素開始插入排序 // j<n因為n代表著待排序的數組元素的個數,n-1為最後一個元素 for (int j=1; j<n; j++) { key=a[j]; // 等待插入的元素為a[j] int i=j-1; // a[0...j-1]為已經有序的部分,a[j+
// bTreeNode.h#include <iostream>template <class Type> class bTree;template <class Type> class bTreeNode {friend class bTree<Type>;// this template class is not a common used template class// it is used only in template class