w1100n
This site is best viewed in Google Chrome
wiloon, 6/14/2019 13:29

#go语言的模板,text/template包 ##定义 模板就是将一组文本嵌入另一组文本里 ##传入string–最简单的替换 package main import ( “os” “text/template” ) func main() { name := “waynehu” tmpl, err := template.New(“test”).Parse(“hello, {{.}}”) //建立一个模板,内容是”hello, {{.}}” if err != nil { panic(err) } err = tmpl.Execute(os.Stdout, name) //将string与模板合成,变量name的内容会替换掉{{.}} //合成结果放到os.Stdout里 if err != … Continue reading

wiloon, 6/11/2019 13:17

GOGC GOGC是Go运行时支持的最老的环境变量之一。它甚至比GOROOT还老 GOGC 用于控制GC的处发频率, 其值默认为100 意为直到自上次垃圾回收后heap size已经增长了100%时GC才触发运行。即是GOGC=100意味着live heap size 每增长一倍,GC触发运行一次。 如设定GOGC=200, 则live heap size 自上次垃圾回收后,增长2倍时,GC触发运行, 总之,其值越大则GC触发运行频率越低, 反之则越高, 如果GOGC=off 则关闭GC. 虽然go 1.5引入了低延迟的GC, 但是GOGC对GC运行频率的影响不变, 仍然是其值大于100,则越大GC运行频率越高, 反之则越低。 每次GC必须完成如下循环,旧的完成了再开启新的。 sweep termination, mark, mark termination, and sweep https://studygolang.com/articles/6346 https://ieevee.com/assets/2018-01-28-gogc.html http://legendtkl.com/2017/04/28/golang-gc/

wiloon, 6/11/2019 12:19

内存屏障 内存屏障(英语:Memory barrier),也称内存栅栏,内存栅障,屏障指令等,是一类同步屏障指令,是CPU或编译器在对内存随机访问的操作中的一个同步点,使得此点之前的所有读写操作都执行后才可以开始执行此点之后的操作。 https://ieevee.com/assets/2018-01-28-gogc.html

wiloon, 6/10/2019 15:52

一般文件比较小的话可以将文件全部读入内存中,然后转换成string再按行分割一下 func GetFileContentAsStringLines(filePath string) ([]string, error) { logger.Infof(“get file content as lines: %v”, filePath) result := []string{} b, err := ioutil.ReadFile(filePath) if err != nil { logger.Errorf(“read file: %v error: %v”, filePath, err) return result, err } s := string(b) … Continue reading

wiloon, 6/9/2019 23:35

ng new project0 ng add @angular/pwa –project project0 ng build –prod cd project0 && http-server -p 8080 -c-1 dist/project0/ curl http://127.0.0.1:8080/ngsw/state chrome://serviceworker-internals/ ng new my-app –routing

wiloon, 6/9/2019 17:57

鲤鱼 https://www.aidiao.com/baike/8567.html 大黄花鱼,黄鱼 https://www.xiantao.com/yu/1454.html

wiloon, 6/9/2019 11:42

豆角 – 自花传粉 黄瓜 黄瓜和甜瓜采用对花传粉方法,在雌雄花同时开放的上午,将雄花摘下,除去花瓣,然后用雄蕊均匀涂抹雌花雌蕊柱头就可以了!雌雄花非常容易看,带小瓜的是雌花,不带小瓜的是雄花。西红柿和辣椒其实在花期,轻摇植株就能传粉,它们都是两性花;辣椒还可以用手均匀涂抹花蕊部分来传粉,西红柿可以采用弹花蕊的方法进行。只是,西红柿花后能否结果,有温度条件,若温度过高,持续在30度以上,则花后很难结果!

wiloon, 6/8/2019 16:38

yarn add @angular/material @angular/cdk @angular/animations https://material.angular.io/ https://material.angular.cn/guides https://github.com/stbui/angular-material-app/tree/master/src/app https://material.io/ https://material.angular.io/components/categories

wiloon, 6/8/2019 11:18

server{ listen 80; server_name localhost; root /var/www; index index.htm; }

wiloon, 6/7/2019 12:00

查询》基本业务查询》电子发票 https://iservice.10010.com/e4/transact/einvoiceNew/einvoiceIndex.html

wiloon, 6/6/2019 16:06

chromium \ –user-data-dir=/path/to/cache/dir \ –incognito \ –no-first-run \ –process-per-site \ –app=’https://baidu.com’

wiloon, 6/6/2019 12:42

Intel® Compute Stick STCK1A32WFC Intel Atom® Processor Z3735F (2M Cache, up to 1.83 GHz) Intel® Compute Stick STK1A32SC Intel Atom® x5-Z8300 Processor (2M Cache, up to 1.84 GHz) Intel® Compute Stick STK1AW32SC Intel Atom® x5-Z8300 Processor (2M Cache, up to … Continue reading

wiloon, 6/2/2019 23:57

https://stackoverflow.com/questions/53482324/how-can-i-use-javascript-code-in-angular-7

wiloon, 6/2/2019 22:51

ng build –aot “` server { listen 8081; server_name localhost; location / { root C:/website/angular/ng-prime/dist; // 这是angular生成的dist文件夹存放的位置 index index.html; try_files $uri $uri/ /index.html; // 注意此句,一定要加上。否则配置的子路由等无法使用 } <pre><code> error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } … Continue reading

wiloon, 6/2/2019 22:19

chrome://flags/#enable-experimental-web-platform-features Note: Like most other powerful web APIs, the Wake Lock API is only available when served over HTTPS. let wakeLock; let wakeLockRequest; async function toggleWakeLock() { if (‘getWakeLock’ in navigator) { console.log(”, ‘navigator.getWakeLock is supported’); try { wakeLock = … Continue reading

辽ICP备14012896