Time of Update: 2017-05-06
標籤:article stream www param ati tde tar type har 本文轉載自:http://blog.csdn.net/hadas_wang/article/de
Time of Update: 2017-04-24
標籤:環境 get eclipse 需要 官網 技術分享 plugin 通過 工具列 官網查了下,解釋如下: 附上連結https://www.myeclipseide.com/PNph
Time of Update: 2017-04-13
標籤:std 標準 str write blog tar 緩衝 stdin 標準輸出 本文轉載自:http://blog.chinaunix.net/uid-30058258-id-502984
Time of Update: 2017-05-06
標籤:結構 blog efault case port name 寫法 switch inf package main;import
Time of Update: 2017-04-12
標籤:false interface ble err pen ast erro 入棧 pack // stack 棧package Algorithmimport ( "errors"
Time of Update: 2017-04-12
標籤:http decrypt question cipher log strip blog stack pad #!/usr/bin/env python# -*- coding:utf-8
Time of Update: 2017-03-23
標籤:可見 過程 lin arch 類型 val 組織 報告 網上 原文地址這裡講下C++檔案的編譯過程及其中模板的編譯過程;一:一般的C++應用程式的編譯過程。 &nbs
Time of Update: 2017-04-16
這是一個建立於
Time of Update: 2017-05-06
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。// errmsg.gopackage mainimport ("errors""fmt")type DivideError struct {dividee intdivider int}func (de *DivideError) Error() string {strFormat := `Cannot proceed, the divider is zero.dividee:
Time of Update: 2017-04-14
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。gRPC 是一個高效能、開源、通用的RPC架構,由Google推出,基於HTTP/2協議標準設計開發,預設採用Protocol Buffers資料序列化協議,支援多種開發語言。gRPC提供了一種簡單的方法來精確的定義服務,並且為用戶端和服務端自動產生可靠的功能庫。 主要特性 強大的IDL gRPC使用ProtoBuf來定義服務,ProtoBuf是由Google開發的一種資料序列化協議(類似於XML、JSON、hessian)
Time of Update: 2017-05-05
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。依賴之前文章的loggor模組(參見http://studygolang.com/articles/9791),可以將日誌分級記錄至檔案,debug、info、warn、error、fatal,結合以下代碼,可將項目中之前的log日誌輸出無縫列印至記錄檔如://import "log"import log "util/mlog".....log.Println(".........
Time of Update: 2017-05-02
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。In my previous post I showed that Go maps are not reference variables, and are not passed by reference. This leaves the question, if maps are not references variables, what are they?For the impatient, the answer is:A
Time of Update: 2017-03-15
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。在GO中處理的話,比較方便。 func main() { fmt.Println(md5Str("woGo")) fmt.Println(sha512Str("woGo")) fmt.Println(base64DecodeStr(base64EncodeStr("fd")))}//md5驗證func md5Str(src string) string { h :=
Time of Update: 2017-04-23
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。 // http.gopackage mainimport ("fmt""log""net/http")func main() {fmt.Println("Hello World!")http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request)
Time of Update: 2017-03-15
這是一個建立於
Time of Update: 2017-03-20
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。環境配置安裝 Go 1.5 以上版本,具體安裝步驟見官網 https://golang.org/doc/install安裝 gomobile https://godoc.org/golang.org/x/mobile/cmd/gomobile執行以下命令,安裝過程中可能需要翻牆go get -v golang.org/x/mobile/cmd/gomobilegomobile init -v在安裝過程中可能會發生以下問題提示
Time of Update: 2017-03-19
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。每天成長一小步,積累下來就是一大步。 在GO中,開啟15個線程,每個線程把全域變數遍曆增加100000次,因此預測結果是 15*100000=1500000. var sum intvar cccc intvar m *sync.Mutexfunc Count1(i int, ch chan int) { for j := 0; j < 100000; j++ { cccc = cccc + 1 }
Time of Update: 2017-03-05
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。Go的彙總類型(結構體和數組)可以直接操作它們的元素Go提供了基於CSP的並發特性支援。Go的動態棧使得輕量級線程goroutine的初始棧可以很小,因此創建一個goroutine的代價很小,創建百萬級的goroutine完全是可行的Go標準庫:構建模塊和公用介面,包含I/O操作、文本處理、圖像、密碼學、網絡和分布式應用程式等go
Time of Update: 2017-03-05
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。說明之前做的go項目,遇到一個關於數組的增刪效率問題:迴圈數組--判斷--刪除數組--得到需要的數組樣本:如果我需要在arr1中過濾掉arr2第一次寫的方法如下arr1:=[]int{1,2,3......,999,1000}arr2:=[]int{5,10,15......,995,1000}for k, v := range arr1{ for _, vv := range arr2{
Time of Update: 2017-03-05
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。介紹package bufio也是io的一部分,但在不同包中,因此獨立一節。其中包含bufio.go,scan.go兩部分。bufiobufio的作用是為一個已有的Reader或者Writer提供緩衝,我們知道作業系統的io是資源瓶頸,應該儘可能少的調用io操作,所以把大批量的資料一起讀取或寫入是更好的選擇。使用方法: w := bufio.NewWriter(os.Stdout) fmt.Fprint(w, "