GDSC NYUST
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- title: [基礎工具與程式語言入門-JSON & API 基礎] date: [2023-10-31] type: slide --- ### GDSC NYUST x 資訊創客社 <br> ### Topic 1:基礎工具與程式語言入門 #### Class 4:JSON & API 基礎 <br> #### 2023/10/31 (Tue) 19:30 - 20:30 #### 講師:GDSC課程組 <img src="https://hackmd.io/_uploads/ryyGo9pka.png" height="200px">![]() --- JSON基礎(一) 什麼是JSON? ---- ![](https://hackmd.io/_uploads/ByxD3CQMT.png) <!-- Json這種資料格式是用來做什麼 譬如現在有兩個系統A系統和B系統 如果兩個系統想交換資料的時候 我們就可以使用Json這種通用的格式--> ---- | XML | JSON | | -------- | -------- | | ![](https://hackmd.io/_uploads/S1uoY0XMa.png)| ![](https://hackmd.io/_uploads/Bkb6tAXzT.png)| JSON 特點: 易讀性 輕量級 相容性高 支援多程式語言 <!-- 比起早年最火的資料格式XML,從上圖的比較當中,你會看到表達同樣的資料,一看起來使用JSON來表達會明顯清楚得多,他沒有XML那麼多開tag關tag或者開括號關括號,也更容易明白。 --> --- JSON基礎(二) JSON 的結構 ---- ![](https://hackmd.io/_uploads/H1-KR07zp.png) <!-- 這裡就有一個最簡單的Json資料 就是想傳達名字,就是耗言這個資料 Json格式就會以一個叫key value pair組成 Name,這個就是key EASON是value,就是值 還有Json格式裡面所有的字都要是double code 即是藍色這裡要用雙人號去括住 這個就是一個合法的Json格式 --> ---- ![](https://hackmd.io/_uploads/BJ0vbkEzT.png) <!-- 左邊這一幅圖就是一個比較典型的Json資料的例子 如果你寫過程式的話,就比較好理解 這個Json資料的最外層就是黃色 有兩個框,代表這個是array 裡面有兩個object,即是物件 這個物件裡面裝了兩個人的資料 第一個人就是這裡 第二個人就是下面這個john 我給這個Json例子出來 Json支援的資料裡面有以下這些 包括string文字,number數字 object物件,array,陣列,boolean,布林值和null 在這個Json資料裡面都用完了 照樣所有文字都要以雙括號去括住 包括那些key都是 數字,布林值,null,這些就不需要雙括號 這個都是一個合法的Json資料格式 --> --- JSON基礎(三) JSON範例 ---- 1. 一個簡單的人物資訊 (資料:姓名、年齡、性別) ![](https://hackmd.io/_uploads/Hkl-6AxBGa.png) ---- ```json= { "姓名": "Peter", "年齡": 30, "性別": "男性" } ``` ---- 2. 一個包含學生成績的 JSON 物件 (資料:姓名、成績、學號、系所) ![](https://hackmd.io/_uploads/r1SoAlSGp.png) ---- ```json= { "姓名": "Alice", "成績": { "數學": 95, "英語": 88, "歷史": 76 } } ``` ---- 3. 一個包含不同動物資訊的 JSON 物件 (資料:名稱、種類、身高、體重) ![](https://hackmd.io/_uploads/S1sY0gBGT.png) ---- ```json= { "動物": [ { "名稱": "狗", "種類": "拉布拉多" }, { "名稱": "貓", "種類": "波斯貓" }, { "名稱": "兔子", "種類": "荷蘭兔" } ] } ``` ---- 嵌套JSON Object & Array ---- 將大頭菜單json化 ![](https://hackmd.io/_uploads/ryAUck4Ga.png) <!-- 嵌套json 舉例來說,你想設計一個存菜單的網頁,你想把這張菜單透過json的方式存起來, 供未來整理美食地圖使用 這時候你就可以寫一個嵌套json 來存放 請各位同學 依這張菜單設計JSON --> ---- ```json= { "餐廳名稱": "大頭小吃部", "菜單": [ { "分類": "肉羹類", "菜品": [ { "名稱": "肉羹麵", "價格": 40 }, { "名稱": "肉羹米粉", "價格": 40 } ]}, { "分類": "飯類", "菜品": [ { "名稱": "排骨飯", "價格": 50 }, { "名稱": "控肉飯", "價格": 50 } ] }, { "分類": "麵類", "菜品": [ { "名稱": "米粉", "價格": 35 }, { "名稱": "油麵", "價格": 35 } ] } ] } ``` --- # Part 2 ## 甚麼是API? ---- ![](https://hackmd.io/_uploads/HkhebeEGT.png) ---- ![](https://hackmd.io/_uploads/ryN3j1VGp.jpg) <!-- API代表應用程序編程接口(Application Programming Interface)。它是一組規則和協議,允許不同軟體應用程序之間進行傳輸通訊和互動。API允許不同的軟體及系統之間共享數據和功能,從而實現更高級別的集成和互操作性。 --> <!-- API可以在不同的軟件應用程序之間傳輸數據,允許開發者訪問其他軟件應用程序的功能,從而擴展或定制其自己的應用程序。API可以用於許多不同的情境,包括網絡應用程序、移動應用程序、操作系統、數據庫、硬件設備等。 --> ---- 簡單來說 ---- API是一種咒語 我對神念咒語 神 聽到我的請求 賜給我們力量 於是我變身了 ![](https://hackmd.io/_uploads/BkWhfgrfa.png) ---- <!-- 比如說YouTube 我對YT搜尋一個東西 YT便會跑出搜尋結果 這就是一種搜尋API 麥當勞的服務器住著一個神仙 妳對他唸咒語 他就會賜予你一盤食物 Uber eat 外賣平台 也住著神仙 對他唸咒語點餐 他就會派一個人 把餐點送到你家 這就是一個下訂單的咒語API --> ![](https://hackmd.io/_uploads/B1566lSz6.gif) ---- API -> 咒語 APP -> 念咒語 Server -> 實現咒語 ---- 為什麼Sever裡的神都聽得懂 App念的咒語 <!-- 當然是因為他們手上有一本咒語本 紀載了那些咒語是有效的 比如說 哈利波特在霍格華茲學了很多咒語 每個咒語都有不同的念法或儀式還有材料 最後得到不同的結果 至於這個咒語本叫做API文檔 --> ![](https://hackmd.io/_uploads/r1bBXgHz6.png) ---- ### web API ![](https://hackmd.io/_uploads/Bkh7eJ4zp.jpg) <!-- 是指一種通過網路協議提供數據和服務的接口,允許不同軟件應用程序之間進行通信和互動。 --> ---- Http & Https ![](https://hackmd.io/_uploads/rJsTVlSz6.png) <!-- 通常使用基於HTTP(Hypertext Transfer Protocol)或HTTPS(HTTP Secure)的通信協議。 --> ---- HTTP請求方法 ![](https://hackmd.io/_uploads/rkUrSeSGp.png) <!-- 這允許客戶端應用程序通過HTTP請求和響應來訪問API中提供的數據和服務。HTTP請求方法如GET、POST、PUT和DELETE等常用於對API端點執行操作。--> ---- 舉例: ![](https://hackmd.io/_uploads/rkBufyEfa.png) [click me 新聞、影音、社群、儲存類...等](https://github.com/hsiangfeng/APIList) ---- ### RESTful API設計原則 ![](https://hackmd.io/_uploads/r1p9HlSMp.png) <!-- (Representational State Transfer) 是一種REST設計風格的Web API, --> 遵循特定設計原則 實現簡單、易於理解和可擴展的API ---- ### HTTP狀態碼 (Status Codes) ---- HTTP 狀態碼 資訊回應類 (Informational responses, 100–199) ![](https://hackmd.io/_uploads/H1NCIlrGp.png) <!-- 資訊回應 100 Continue 此臨時回應表明,目前為止的一切完好,而用戶端應當繼續完成請求、或是在已完成請求的情況下,忽略此資訊。 101 Switching Protocol 此狀態碼乃為用戶端 Upgrade (en-US) 請求標頭發送之回應、且表明伺服器亦切換中。 102 Processing (en-US) (WebDAV (en-US )) 此狀態碼表明伺服器收到並處理請求中,但目前未有回應。 103早期提示(英文) 此狀態碼主要與 Link (en-US) 標頭有關:它能讓用戶代理(user agent)能在伺服器準備回應前能 preload (en-US) 資源。 --> ---- HTTP 狀態碼 成功回應 (Successful responses, 200–299) ![](https://hackmd.io/_uploads/Hkmh8erMT.png) <!-- 成功回應 200 OK 請求成功。成功的意義依照 HTTP 方法而定: GET:資源成功獲取並於訊息主體中發送。 HEAD:entity 標頭已於訊息主體中。 POST:已傳送訊息主體中的 TRACE:伺服器已接收到訊息主體內含的請求訊息。 201 Created 請求成功且新的資源成功被創建,通常用於 POST 或一些 PUT 請求後的回應。 202 Accepted 此請求已經被接受但尚未處理。此狀態為非承諾性,代表 HTTP 無法在之後傳送一個非同步的回應告知請求的處理結果。最初目的為外部程序或其他伺服器處理請求的情況,或用於批次處理中。 203 Non-Authoritative Information 此回應碼表示回傳的中介資料集與並非與原始伺服器上的有效確定集合完全相同,而是來自本地或第三方的副本。除此情況外,200 OK 回應碼應該被優先使用。 204 No Content 此請求沒有要發送的內容,但標頭可能很有用。使用者代理可能會使用新標頭更新此資源的緩存標頭。 205 Reset Content 此回應代碼在完成請求后發送,以告知使用者代理重置發送此請求的文檔檢視。 206 Partial Content 使用此回應代碼是因為客戶端發送的範圍標頭將下載分成多個流。 207 Multi-Status (en-US) (WebDAV (en-US)) 多狀態回應在可能適合多個狀態代碼的情況下傳達有關多個資源的資訊。 208 已報告 (en-US) (WebDAV (en-US)) 在響應元素內部使用,以避免重複枚舉同一集合的多個綁定的內部成員。<dav:propstat> 226 IM 使用 (en-US) (HTTP 增量編碼)) 伺服器已滿足對資源的 GET 請求,並且回應是應用於當前實例的一個或多個實例操作的結果的表示形式。 --> ---- HTTP 狀態碼 重定向 (Redirects, 300–399) ![](https://hackmd.io/_uploads/rk2kwxrMa.png) <!-- 重定向訊息 300 Multiple Choice 請求擁有一個以上的回應。用戶代理或使用者應該從中選一。不過,並沒有標準的選擇方案。 301 Moved Permanently 此回應碼的意思是,請求資源的 URI 已被改變。有時候,會在回應內給予新的 URI。 302 找到 (英文) 此回應代碼表示請求資源的 URI 已臨時更改。將來可能會對 URI 進行新的更改。因此,用戶端應在將來的請求中使用相同的 URI。 303 參見其他(英文) 伺服器將此回應發送到指示用戶端將請求的資源獲取到具有 GET 請求的另一個 URI。 304 未修改 (英文) 這用於緩存目的。它告訴客戶回應尚未修改。因此,用戶端可以繼續使用相同的緩存版本的回應。 305 Use Proxy 已棄用 在舊版本的 HTTP 規範中,表示請求資源必須透過代理存取。基於對代理的頻內設置 (in-band configuration) 相關的安全考量,該狀態碼已棄用。 306 unused 該狀態碼已不再被使用,僅被保留。該狀態碼曾在先前得的 HTTP 1.1 規範中被使用。 307 臨時重定向 (en-US) 伺服器發送此回應來使客戶端保持請求方法不變向新的地址發出請求。與 相同,差別在於客戶端不許變更請求方法。例如,應使用另一個 請求來重複發送 請求。302 FoundPOSTPOST 308 永久重定向 (英文-美國) 這意味著資源現在永久位於另一個 URI,由 HTTP 回應標頭指定。這與 HTTP 回應代碼具有相同的語義,但使用者代理不得更改使用的 HTTP 方法:如果在第一個請求中使用了 a,則必須在第二個請求中使用 a。Location:301 Moved PermanentlyPOSTPOST --> ---- HTTP 狀態碼 用戶端錯誤 (Client errors, 400–499) ![](https://hackmd.io/_uploads/SJzbvgSMT.png) <!-- 用戶端錯誤回應 400 錯誤請求(英文) 此回應意味伺服器因為收到無效語法,而無法理解請求。 401 未授權(英文) 需要授權以回應請求。它有點像 403,但這裡的授權,是有可能辦到的。 402 需要付款(英文) 實驗性質 此回應碼留作未來使用。一開始此碼旨在用於數位交易系統,然而,目前極少被使用,且不存在標準或慣例。 403 Forbidden 用戶端並無訪問權限,例如未被授權,所以伺服器拒絕給予應有的回應。不同於 401,伺服端知道用戶端的身份。 404 Not Found 伺服器找不到請求的資源。因為在網路上它很常出現,這回應碼也許最為人所悉。 405 方法不允許 (英文-美國) 伺服器理解此請求方法,但它被禁用或不可用。有兩個強制性方法: 與 ,永遠不該被禁止、也不該回傳此錯誤碼。GETHEAD 406 不可接受(英文) 當 Web 伺服器在執行伺服器驅動的內容協商 (en-US) 後找不到任何遵循使用者代理給出的條件的內容時,將發送此回應。 407 需要代理身份驗證 (en-US) 類似於 401,但需要被代理伺服器驗證。. 408 請求超時 (英文) 此回應由某些伺服器在空閒連接上發送,即使用戶端之前沒有任何請求也是如此。這意味著伺服器想要關閉此未使用的連接。由於某些瀏覽器(如Chrome,Firefox 27+或IE9)使用HTTP預連接機制來加速衝浪,因此此回應的使用更多。另請注意,某些伺服器只是關閉連接而不發送此消息。 409 Conflict 表示請求與伺服器目前狀態衝突 410 消失了 (英文) 當伺服器已刪除請求的內容時會送出此回應。 411 Length Required 伺服器拒絕該請求,因為 頭沒有被定義,然而伺服器要求。Content-Length 412 前提條件失敗 (英文) 用戶端在其標頭中指示了伺服器不滿足的前提條件。 413 有效載荷太大 (英文-英文) 請求的實體資料大小超過了伺服器定義的上限,伺服器會關閉連接或返回一個 回應頭。Retry-After 414 URI 太長 (en-US) 客戶端的 URI 請求超過伺服器願意解析的長度。 415 Unsupported Media Type 被請求資源的多媒體類型不被伺服器支援,因此該請求被拒絕。 416 請求的範圍無法滿足(英文) 無法滿足請求中標頭欄位指定的範圍;範圍可能超出目標 URI 數據的大小。Range 417 期望失敗(英文) 此回應代表伺服器未能滿足請求標頭的欄位所提出的期望回應。Expect 418 I'm a teapot 伺服器拒絕嘗試用茶壺沖泡咖啡。 421 錯誤的請求(英文) 請求定向到無法生成回應的伺服器。這可以由未配置為為請求 URI 中包含的方案和許可權組合生成回應的伺服器發送。 422 Unprocessable Entity (en-US) (WebDAV (en-US)) 請求格式正確,但有部分語意上的錯誤而無法執行請求。 423 Lock (en-US) (WebDAV (en-US )) 被訪問的資源被鎖定。 424 Failed Dependency (en-US) (WebDAV (en-US)) 由於先前的請求失敗導致此請求失敗。 426 需要升級(英文) 伺服器拒絕使用當前協定執行請求,但在用戶端升級到其他協定後可能願意這樣做。伺服器在 426 回應中發送升級 (en-US) 標頭,以指示所需的協定。 428 需要前提條件(英文) 源伺服器要求請求是有條件的。旨在防止“丟失更新”問題,即用戶端對資源的狀態進行 GET 處理,對其進行修改,然後將其 PAT 回伺服器,同時第三方修改了伺服器上的狀態,從而導致衝突。 429 請求過多(英文) 用戶在給定的時間內 (“rate limiting”) 發送了過多的請求。 431 請求標頭字段太大 (en-US) 伺服器不願意處理該請求,因為標頭欄位過大。該請求可能可以在減少請求標頭欄位大小後重新提交。 451 Unavailable For Legal Reasons 用戶端請求違法的資源,例如受政府審查的網頁。 --> ---- HTTP 狀態碼 伺服器端錯誤 (Server errors, 500–599) ![](https://hackmd.io/_uploads/HJOMDerfp.png) <!-- 伺服器端錯誤回應 500 Internal Server Error 伺服器端發生未知或無法處理的錯誤。 501 未實現 (英文) 伺服器不支援請求的方法,僅有與是伺服器必須支援的方法。GETHEAD 502 Bad Gateway 作為閘道的伺服器,在獲取處理請求所需的回應時,得到無效回應。 503 Service Unavailable 伺服器尚未準備好處理請求。常見原因是伺服器因維護而停機或過載。請注意,應與此回應一起發送一個使用者友好的頁面來解釋問題。此回應應用於臨時情況,如果可能,HTTP 標頭應包含恢復服務之前的估計時間。網站站長還必須注意與此回應一起發送的與緩存相關的標頭,因為這些臨時條件回應通常不應緩存。Retry-After: 504 Gateway Timeout 伺服器作為閘道器時無法及時得到回應。 不支援 505 HTTP 版本 (en-US) 請求使用的 HTTP 版本不被伺服器支援。 506 變體也協商 (en-US) 伺服器存在內部配置錯誤:請求的透明內容協商會導致迴圈引用。 507 儲存空間不足(英文) 伺服器存在內部配置錯誤:所選變體資源配置為本身參與透明內容協商,因此不是協商過程中的適當端點。 508 檢測到迴圈 (en-US) (WebDAV (en-US)) 伺服器處理請求時偵測到無限迴圈。 510 未擴展 (英文) 伺服器需要對請求做進一步的擴充才能完成請求。 511 需要網路身份驗證 (en-US) 用戶需要經過認證才能取得網路存取權。 --> ---- 常見狀態碼 ---- HTTP 狀態碼 404 ![](https://hackmd.io/_uploads/HJlVgxEz6.png) ---- HTTP 狀態碼 201 ![](https://hackmd.io/_uploads/ryLwegVfT.png) ---- ### HTTP請求方法 (GET、POST、PUT、DELETE) ![](https://hackmd.io/_uploads/HyFKxeEMp.png) ---- ### CRUD操作對應HTTP 創建(Create) -> POST 讀取(Read) -> GET 更新(Update) -> PUT、PATCH 刪除(Delete) -> DELETE <!-- 這些操作不僅適用於資料庫系統,還適用於設計APP的API,使客戶端能夠對數據執行對應的操作。CRUD是設計開發軟體應用程APP的基本原則之一。 --> --- 實際應用 (以Python為例) ---- 解析Json Data ![](https://hackmd.io/_uploads/B166uJxG6.png) ---- Python to JSON | Python | JSON | | -------- | -------- | | dict | object | | list,tuple | array | | str | string | | int, float | number | | True | true | | False | false | | None | null | ---- json.dumps 將 Python 物件編碼成 JSON 字串 ---- json.loads 將已編碼的 JSON 字串解碼為 Python 物件 ---- json.dumps 與 json.loads為例 python to json ![](https://hackmd.io/_uploads/B1P4RylG6.png) --- Q & A 時間 --- 課後回饋表單 ![](https://hackmd.io/_uploads/rJwX-mHfa.png)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully