cs50 最後一個作業把 Python Flask, Database, JavaScript, jQuery, Ajax 都用上了,完成一個將地圖與新聞結合 (mashup) 的 web application,若對 pset 7 還有印象的話,第十週的課程內容特別提及了 JavaScript 讓瀏覽器不必刷新整個頁面而更新部分結果,也就是說 pset 7 作業實際只要一個 html 檔,其餘都可以用 JavaScript 讓使用者保持在同一頁面操作
pset 6 認識 python 及 flask 後, pset7 加入 CSS 及資料庫 (database) 操作,完成類似股票交易平台的網址,基本要求有以下功能:
2017 cs50 下半場專注於 web programming ,從透過 telnet 對網站送出 GET/POST 的 request ,解讀 response 重點欄位,http 協定,到 python flask 微框架…
第五週 cs50 介紹了幾種基本資料結構,像是 linked list, stack, queue, hash table, 跟 tries,想當然作業範圍就包括實作其中一個資料結構經歷過前四週 C 語言的 problem set…
resize當時寫 pset4 的 resize 時,看完作業需求其實沒有很清楚要寫出什麼樣的 resize,找了一個很厲害的 reference bmpresize, 就開始抱頭下去燒一整週結果沒什麼成果,再去 reddit 上的課程討論區發現以下這一段
迴圈 (loop) 與遞回 (recursion)
pset2 作業 crack 本質上就是實作暴力解長度最多為 4 個字元的密碼,直覺上最快是直寫四個迴圈不斷產生a, b … z, aa, ab … 的字串做完 hash 後用 strcmp 比對 crypt 出的 hash 值,peusdo code:
for (int i = 'A' ; i <= 'z' ; i++ ) { if (isalpha(i)) //…
起初看到 ptt 有人徵 cs50 讀書會起了好奇心,又逛到 Huli 的介紹文,就進 edX 報名了這堂課,大學時自學過兩週的 Matlab 跟一點 C++加上資料結構,對整體的認識實在不夠完整,趁這次再一次認識一下電腦科學 (Computer Science) 這門學問建立起連結零碎知識片段。
課程內容在 google 上己經有查不完的內容了,這次選擇寫2017的作業 (problem sets) 卡住的一些雷