call by value call by reference object array push

Problem: array A A.push(item) item is object from for or map or foreach….etc show A all add item is same……. Solve: var txxxxx = [] // xxxx is any word =====loop start===== txxxx[index] = item //index is from for or map or foreach…etc ot = { xxxx: txxxx[index] } A.push(ot) =====loop end=====

2018-05-23 · 1 min · 52 words · Me

vue watch v-for

Very easy things, but need some way to pass this difficult. Problme is async await if your problem is this, now see how to do 1. template or web html .any input v-model=“filter_keywork” . {{r.aaa}} {{r.bbb}} 2. var app data:{ filer_keywork: ‘’, resuls: [], } 3. methods:{ getrows(){ this.axios or any http get }, async filteredRows(){ this.results = await this.getrows() } } 4.watch: { filter_keywork: function(){ this.filteredRows() } } Watch filter_keywork changed to call method this.fileredRows(). ...

2018-05-23 · 1 min · 97 words · Me

[轉]區塊鍊 blockshain bitcoin ethereum

非常好的說明 Block https://www.youtube.com/watch?v=_160oMzblY8 https://anders.com/blockchain/ https://www.inside.com.tw/2018/05/16/monero-hard-fork-success

2018-05-19 · 1 min · 5 words · Me

[轉]Golang 交叉编译跨平台的可执行程序 (Mac、Linux、Windows )

https://www.jisec.com/application-development/753.html OS ARCH OS version linux 386 / amd64 / arm >= Linux 2.6 darwin 386 / amd64 OS X (Snow Leopard + Lion) freebsd 386 / amd64 >= FreeBSD 7 windows 386 / amd64 >= Windows 2000 go env Mac 下编译 Linux 和 Windows 64位可执行程序 CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build main.go CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build main.go Linux 下编译 Mac 和 Windows 64位可执行程序 CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build main.go CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build main.go ...

2018-05-18 · 1 min · 100 words · Me

golang []map[string]interface{} sqlx BUT

Golang often us []interface{} or map[string]interface{} sqlx.Queryx Alternate Scan Types rows, err := db.Queryx(“SELECT * FROM place”) for rows.Next() { // cols is an []interface{} of all of the column results cols, err := rows.SliceScan() } rows, err := db.Queryx(“SELECT * FROM place”) for rows.Next() { results := make(map[string]interface{}) err = rows.MapScan(results) } So func Sqlselectall(db1 *sqlx.DB, table string) []map[string]interface{} { rows, err := db1.Queryx(“SELECT * FROM " + table) if err != nil { } ...

2018-05-15 · 1 min · 107 words · Me