golang深入理解学习channel和goroutine

golang 深入理解学习 channel 和 goroutine 通道分为无缓冲通道和有缓冲通道,无缓冲通道上的发送操作将会阻塞,直到另一个 goroutine 在对应的通道上执行接受操作,这时值传送完成,

golang水平扩展interface wrapper function

golang水平扩展interface wrapper function 什么是 Golang 的正交组合 - 水平组合思维:Tony Bai 的博客 - Coding in GO way - Orthogonal Composition 这篇文章研究其中提到的 interface wrapper fun

使用golang快速排序

快速排序 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 func main() { // 测试代码 arr := []int{9, 8, 7, 6, 5, 1, 2, 3, 4, 0} fmt.Println(arr) quickSort(arr, 0, len(arr)) fmt.Println(arr) } func quickSortInt(arr []int, a, b int) { if b-a <= 1

js常用代码块

js 常用代码块 js倒计时代码 @import “../../snippet/js/count_down.js” {cmd=javascript} cookie操作 @import “../../snippet/js/cookie.js” {cmd=javascript} html encode&decode @import “../../snippet/js/html_encode_decode.js” {cmd=javascript} ip网卡mac地址校验 @import “../../snippet/js/net_utils.js” {cmd=javascript} 获取前端markdown表格数据 @import “../../snippet/js/html_table2json.js” {cmd=javascript} 导出高德地