golang 單元測試、效能測試、效能監控技術 go語言提供了強大的測試載入器,下面舉例簡單介紹一下 go test 單元測試 go test -bench=. 效能測試 go tool pprof 效能監控 go test 單元測試 例如對包helper下的util.go 進行單元測試,util.go 裡主要包含兩個功能,一個是對字串進行sha1加密,一個是驗證手機號碼 編寫測試檔案
定義局部變數 只賦值一次的(唯讀)局部變數: val a: Int = 1val b = 1 // `Int` type is inferredval c: Int // Type required when no initializer is providedc = 1 // definite assignment 可變的變數 var x = 5 // `Int` type is inferredx += 1 屬性和欄位 定義屬性
最近由於畢設的原因,需要對疏鬆陣列進行LM迭代;然後在網上轉啊轉,就看到SpareLM這個玩意,看到他的官方網站上說的各種牛逼;所以興緻勃勃的想要去玩一下這個庫,沒想到一進去就是一大坑, ̄へ ̄;下邊大概說一下我的心路曆程,話說在網上查了半天,跟這個相關的文章還真不多。 參考連結: 利用cygwin編譯cholmod以獲得在windows上可用的庫lib 32bit win7,vs2010下配置使用sparseLM Eigen+suitesparse for windows 安裝
Unlike Ethernet, a WiFi application needs to initiate a connection to an access point or an ad hoc network) before data communications can commence. In order to initiate an connection there is a sequence of steps that should be followed.
今天因為某些原因打算安裝R程式包devtools,我用的是XP平台,R3.2.1。開始時,download了devtools的包壓縮檔,然後在R程式menu: packages -> installpackages from local zip files中安裝,然後發現其需要一大堆前置包才能運行,於是改用命令install.packages("devtools")。這裡建議選鏡像China.beijing(即china中的第一個),速度快。
In distant future on Earth day lasts for n hours and that's why there are n timezones. Local times in adjacent timezones differ by one hour. For describing local time, hours numbers from 1 to n are used, i.e. there is no time "0 hours",