angular basic

angular basic install angular install nodejs @see nodejs basic install yarn http://blog.wiloon.com/?p=11228 install angular cli yarn global add @angular/cli yarn add angular-in-memory-web-api –dev ng config -g cli.packageManager yarn add yarn global bin to $PATH angular command 创建工作区 ng new project0 创建组件 ng generate component heroes 创建组件 简写 ng g c heroes ng generate component hero -it 创建s

linux history

linux history 1 2 cat ~/.bash_history 缓存 history -r 读取历史文件并将其内容添加到历史记录中,即重置文件里的内容到内存中.

golang struct/结构体

golang struct/结构体 1 2 3 4 5 6 7 //定义一个struct type Student struct { id int name string address string age int } 匿名结构体 1 2 3 4 5 6 7 8 //匿名结构 person := struct { Name string Age int

五线谱, 钢琴

五线谱, 钢琴 拍号 4/4: 4分音符为一拍,每一小节有4拍, 可以用C表示 6/8: 8分音符为一拍,每一小节有6拍 连音线 延音线 https://zhidao.baidu.com/question/1769827496564950660.html 连音线是圆滑线和延音线的总称,即

golang list

golang list 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 package main import ( "container/list" "fmt" ) func main() { l := list.New() //创建一

rename

rename 重命名 rename 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #files copy-sys-log-01 copy-sys-log-02 rename copy-sys-log-0 copy-app-log-0 copy-sys-log-0* 7000 7001 7002 rename 700 node-700 700* node-7000 node-7001 node-7002 rename + 正则 1 rename 's/\d{4}-\d{2}-\d{2}-//' *.md 批量重命名 1 find . -name '*.md' -exec rename 's/\d{4}-\d{2}-\d{2}-//' {} \; http://www.cnblogs.com/longdouhzt/archive/2012/04/30/2477282.html http://blog.51cto.com/jiemian/1846951

斜率

斜率 斜率亦称"角系数”,表示平面直角坐标系中表示一条直线对横坐标轴的倾斜程度的量。 直线对X 轴的倾斜角α的正切值tgα称

Java 7 Phaser

‘Java 7 Phaser’ http://www.oschina.net/question/12_35433 Java 7 引入了一个全新灵活的线程同步机制,名为 Phaser 。 如果你需要等待线程结束然后继续执行其他任务,那么 Phaser 是一个好的选择,接下来我们一步步来介

TCP_NODELAY, TCP_CORK, Nagle

TCP_NODELAY, TCP_CORK, Nagle TCP/IP之 Nagle 算法与40ms延迟提到了Nagle 算法。这样虽然提高了网络吞吐量, 但是实时性却降低了, 在一些交互性很强的应用程序来说是

golang 枚举, enum

golang 枚举, enum 枚举 go 语言并没有提供 enum 的定义,我们可以使用 const 来模拟枚举类型。 1 2 3 4 5 6 7 8 type PolicyType int32 const ( Policy_MIN PolicyType = 0 Policy_MAX PolicyType = 1 Policy_MID PolicyType = 2 Policy_AVG PolicyType = 3 ) 1 2 3 4 5

Golang runtime

Golang runtime golang 判断操作系统是 windows 还是 linux 1 http://www.jianshu.com/p/e45cea3e1723 runtime 调度器是个非常有用的东西,关于 runtime 包几个方法: Gosched: 让当前线程让出 cpu 以让其它线程运行,它不会挂起当前线程,因此当

contract, 合同

contract, 合同 合同的基本结构和主要条款 《合同法》第十二条、《民法典》第四百七十条规定了“合同应当具备如下内容: 当事人的姓名或者名称和住所; 标的; 数量

golang 定时器, timer, ticker

golang 定时器, timer, ticker Go 可以借助 time.After/time.Ticker 来实现延迟/定时触发器, 主要原理是借助无缓冲 channel 无数据时读取操作会阻塞当前协程, Go 会在给定的时间后向 channel 中写入一些数据

kvm GPU VFIO OVMF

‘kvm GPU VFIO OVMF’ https://www.linuxserver.io/2017/04/28/how-to-setup-vfio-gpu-passthrough-using-ovmf-and-kvm-on-arch-linux/ https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF https://github.com/IronicBadger/arch-vfio-ovmf https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Plain_QEMU_without_libvirt

java grpc

java grpc maven依赖 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-netty-shaded</artifactId> <version>1.31.0</version> </dependency> <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-protobuf</artifactId> <version>1.31.0</version> </dependency> <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-stub</artifactId> <version>1.31.0</version> </dependency> <dependency> <!-- necessary for Java 9+ --> <groupId>org.apache.tomcat</groupId> <artifactId>annotations-api</artifactId> <version>6.0.53</version> <scope>provided</scope> </dependency> create proto file in src/main/proto/foo.proto option java_package = “com.wiloon.foo”; maven 执行 mvn

容器编排

容器编排 众所周知,Kubernetes 是一个容器编排平台,它有非常丰富的原始的 API 来支持容器编排,但是对于用户来说更加关心的是一个应用的编排,

grpc

python grpc grpcio==1.48.2 grpc 会忽略 linux 环境变量 里配置的 no_proxy, 导致请求失败, 在启动客户端之前 临时删除环境变量 unset HTTP_PROXY golang grpc gRPC 通过 HTTP2 协议传输 定义协议 protobuf 1 2 3 4 5 6 7 syntax = "proto3"; message SearchRequest {

OAuth,SSO,REST

OAuth,SSO,REST http://favccxx.blog.51cto.com/2890523/1635938 OAuth与SSO、REST有哪些区别与联系 2015-04-20 10:31:10 标签: SSO REST OAuth OAuth2.0 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本

cron, anacron

cron, anacron anacron 用于以天为单位的频率运行命令。它的工作与 cron 稍有不同,它假设机器不会一直开机。 anacron 如何在 Linux 工作 anacron 任务被列在 /etc/anacrontab 中,任务可以使用下面的格式 (anacron 文