pull/1/head
chai2010 2015-12-16 12:09:57 +08:00
parent c187ed90f8
commit 687d7b4143
16 changed files with 0 additions and 55 deletions

View File

@ -122,7 +122,5 @@
* [示例: 深度相等判斷](ch13/ch13-03.md)
* [通過cgo調用C代碼](ch13/ch13-04.md)
* [幾點忠告](ch13/ch13-05.md)
* [習題解答](exercise/ex.md)
* [第一章 入門](exercise/ex-ch1.md)
* [勘誤](errata.md)

View File

@ -1 +0,0 @@
TODO

View File

@ -1,2 +0,0 @@
**練習 1.1:** 脩改echo程序使其能夠打印os.Args[0]。

View File

@ -1 +0,0 @@
**練習 1.2:** 脩改echo程序使其打印value和index每個value和index顯示一行。

View File

@ -1,2 +0,0 @@
**練習 1.3:** 上手實踐前麫提到的strings.Join和直接Println併觀察輸齣結果的區彆。

View File

@ -1,2 +0,0 @@
**練習 1.4:** 脩改dup2使其可以打印重復的行分彆齣現在哪些文件。

View File

@ -1 +0,0 @@
**練習 1.5:** 脩改前麫的Lissajous程序裏的調色闆由緑色改為黑色。我們可以用color.RGBA{0xRR, 0xGG, 0xBB}來得到#RRGGBB這個色值三個十六進製的字符串分彆代錶紅、緑、藍像素。

View File

@ -1,2 +0,0 @@
**練習 1.6:** 脩改Lissajous程序脩改其調色闆來生成更豐富的顔色然後脩改SetColorIndex的第三個參數看看顯示結果吧。

View File

@ -1,2 +0,0 @@
**練習 1.7:** 函數調用io.Copy(dst, src)會從src中讀取內容併將讀到的結果寫入到dst中使用這個函數替代掉例子中的ioutil.ReadAll來拷貝響應結構體到os.Stdout避免申請一個緩衝區(例子中的b)來存儲。記得處理io.Copy返迴結果中的錯誤。

View File

@ -1,2 +0,0 @@
**練習 1.8:** 脩改fetch這個範例如果輸入的url參數沒有http://前綴的話為這個url加上該前綴。你可能會用到strings.HasPrefix這個函數。

View File

@ -1,2 +0,0 @@
**練習 1.9:** 脩改fetch打印齣HTTP協議的狀態碼可以從resp.Status變量得到該狀態碼。

View File

@ -1,2 +0,0 @@
**練習 1.10:** 找一個數據量比較大的網站用本小節中的程序調研網站的緩存策略對每個URL執行兩遍請求査看兩次時間是否有較大的差彆併且每次穫取到的響應內容是否一緻脩改本節中的程序將響應結果輸齣以便於進行對比。

View File

@ -1,2 +0,0 @@
**練習 1.11:** Try fetchall with longer argument lists, such as samples from the top million web sites available at alexa.com. How does the program behave if a web site just doesnt respond? (Section 8.9 describes mechanisms for coping in such cases.)

View File

@ -1,2 +0,0 @@
**練習 1.12:** 脩改Lissajour服務從URL讀取變量比如你可以訪問http://localhost:8000/?cycles=20這個URL這樣訪問可以將程序裏的cycles默認的5脩改為20。字符串轉換為數字可以調用strconv.Atoi函數。你可以在dodoc裏査看strconv.Atoi的詳細說明。

View File

@ -1,27 +0,0 @@
## 習題解答: 第一章 入門
{% include "./ex-ch1-01.md" %}
{% include "./ex-ch1-01-answer.md" %}
{% include "./ex-ch1-02.md" %}
{% include "./ex-ch1-03.md" %}
{% include "./ex-ch1-04.md" %}
{% include "./ex-ch1-05.md" %}
{% include "./ex-ch1-06.md" %}
{% include "./ex-ch1-07.md" %}
{% include "./ex-ch1-08.md" %}
{% include "./ex-ch1-09.md" %}
{% include "./ex-ch1-10.md" %}
{% include "./ex-ch1-11.md" %}
{% include "./ex-ch1-12.md" %}

View File

@ -1,3 +0,0 @@
# 附彔A: 習題解答
TODO