karma

karma JavaScript 作为 web 端使用最广泛的编程语言,它是动态语言,缺乏静态类型检查,所以在代码编译期间,很难发现像变量名写错,调用不存在的方法等错误,除非在运

MySQL 索引 失效

‘MySQL 索引 失效’ http://www.jianshu.com/p/932bcdf2c89f 索引并不会时时发生,有时就算是where查询字段中添加了索引,索引也会失效,下面我们来讲讲五种索引失效的场景。 1.

go, time.Tick, tick immediately

‘go, time.Tick, tick immediately’ How to get time.Tick to tick immediately 1 2 3 4 ticker := time.NewTicker(period) for ; true; <-ticker.C { ... } https://stackoverflow.com/questions/32705582/how-to-get-time-tick-to-tick-immediately/47448177#47448177 https://github.com/golang/go/issues/17601

慢查询优化

慢查询优化 https://tech.meituan.com/MySQL-index.html 慢查询优化基本步骤 0.先运行看看是否真的很慢,注意设置SQL_NO_CACHE 1.where条件单表查,锁定最小返回记录表。这句

MySQL using having

MySQL using having http://wuzhangshu927.blog.163.com/blog/static/1142246872010113093426574/ USING() using 可用在 join 语句相同字段连接, 起到和 ON 相同作用, inner join 和 left join 中都可以使用 LEFT JOIN 正常写法: 1 SELECT t1.id,t2.name FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE .... 其实也可以这么写: 1 SELECT t1.id,t2.name

go xml

go xml https://github.com/astaxie/build-web-application-with-golang/blob/master/zh/07.1.md

Linux磁盘分区UUID, blkid

Linux 磁盘分区 UUID, blkid http://tiger2020.blog.51cto.com/723949/1535774 查看设备的 uuid 的三种方法, 总结如下: 1 命令查看: blkid 2 文件查看: ls -l /dev/disk/by-uuid 3 命令查看: vol_id /dev/sda1 UUID的作用及意义 1: 它是真正的唯一标志符

golang select

golang select 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 package main import ( "fmt" "time" ) func main() { fmt.Println("selectx") ch0 := make(chan struct{}) ch1 := make(chan struct{}) go func() { for { select

PAM(Pluggable Authentication Modules)

PAM(Pluggable Authentication Modules) auth: 表示鉴别类接口模块类型用于检查用户和密码,并分配权限; account: 表示账户类接口,主要负责账户合法性检查,确认帐号是否过期,是否有权限登录系统

partx

partx http://gulingzi.blog.51cto.com/2208376/1561403 /proc/partitions 记录了系统中所有硬盘及其上面的分区,包括已挂载和未挂载的。 有些硬盘没有记录分区信息,可能是没有分区,或者未记录 对于分区完成,但是尚未挂

prototype

prototype 基于原型编程是面向对象编程的一种方式, 原型编程里没有 class 的概念, 直接使用对象, 又叫基于实例的编程. 基于类的编程中, 类定义了对象的基本布局和函

city

city Amsterdam, Netherlands, 荷兰 Bangalore, India london ottawa 加拿大.渥太华 Richardson,Texas,US RTP,US 北卡 sanjose,California,US 圣荷西 shanghai sigapore sydney telaviv 特拉维夫 tokyo

Round Robin 轮询调度算法

Round Robin 轮询调度算法 Round Robin Scheduling 轮询调度算法 轮询调度 (Round Robin Scheduling) 算法就是以轮询的方式依次将请求调度不同的服务器,即每次调度执行i = (i + 1) mod n,并选出第i台服

go channel

go channel channel 是 Go 中的一个核心类型, 可以把它看成一个管道, 通过它并发核心单元就可以发送或者接收数据进行通讯。goroutine 是 Go 语言的基本调度单位

nginx模块

nginx模块 http://wiki.jikexueyuan.com/project/nginx/model-architecture.html event module: 搭建了独立于操作系统的事件处理机制的框架,及提供了各具体事件的处理。包括 ngx_events_module, ngx_event_core_module和n

事件驱动服务器, event-driven server

事件驱动服务器, event-driven server https://gist.github.com/jcouyang/9914091 OPPC模型瓶颈 传统服务器模型如Apache为每一个请求生成一个子进程。当用户连接到服务器的一个子进程就产生,并处理连

TPS、QPS、RPS

TPS、QPS、RPS PPS PPS (Packet Per Second) PCT (percentile) PCT99: 99%的响应时间 “90th pct/95th pct/99th pct”分别表示测试实例按响应时间从小到大排序后,第90/95/99个测