03 2019 档案

摘要:https://blog.csdn.net/alvine008/article/details/51283032 阅读全文
posted @ 2019-03-28 15:01 byfei 阅读(26) 评论(0) 推荐(0) 编辑
摘要:https://studygolang.com/articles/13997 //一致性哈希package hashimport ( "fmt" "hash/crc32" "sort" "sync")const VirtualNodesFactor = 256... 阅读全文
posted @ 2019-03-25 17:57 byfei 阅读(44) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/zihunqingxin/p/4755168.html https://blog.csdn.net/busai2/article/details/82503699 https://www.jb51.net/art... 阅读全文
posted @ 2019-03-25 17:42 byfei 阅读(68) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/5b0b36f398a2 https://studygolang.com/articles/10167 func (self *Observe) start() { if self == nil || sel... 阅读全文
posted @ 2019-03-25 17:20 byfei 阅读(46) 评论(0) 推荐(0) 编辑
摘要:http://www.runoob.com/go/go-select-statement.html https://studygolang.com/articles/11186 func (self *Observe) start() { if self ==... 阅读全文
posted @ 2019-03-25 17:11 byfei 阅读(50) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/butterfly5211314/article/details/81842519 func (self *Observe) Over() { if self == nil || self.roomid <= 0 {... 阅读全文
posted @ 2019-03-25 17:03 byfei 阅读(58) 评论(0) 推荐(0) 编辑
摘要:https://studygolang.com/articles/3557 func (self *Observe) Frame(frameIdx int, frames map[int]*PVPFrame) { if self == nil || self.... 阅读全文
posted @ 2019-03-25 16:52 byfei 阅读(56) 评论(0) 推荐(0) 编辑
摘要:http://c.biancheng.net/view/34.html 阅读全文
posted @ 2019-03-25 16:36 byfei 阅读(28) 评论(0) 推荐(0) 编辑
摘要:https://baijiahao.baidu.com/s?id=1595292420641966263&wfr=spider&for=pc 阅读全文
posted @ 2019-03-25 15:51 byfei 阅读(39) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/clever101/article/details/50349909 阅读全文
posted @ 2019-03-25 13:06 byfei 阅读(33) 评论(0) 推荐(0) 编辑
摘要:// 获取排行榜func GetRankData(lsid int32, num int32) []redis.Z { datas, err := GetServerRedis(lsid).ZRevRangeWithScores(RedisKeyServerK... 阅读全文
posted @ 2019-03-23 16:53 byfei 阅读(76) 评论(0) 推荐(0) 编辑
摘要:func removeDuplicates(nums []int) int { //如果是空切片,那就返回0 if len(nums) == 0 { return 0 } //用两个标记来比较相邻位置的值 //当一样... 阅读全文
posted @ 2019-03-23 16:40 byfei 阅读(52) 评论(0) 推荐(0) 编辑
摘要:// 示例:第一匹配和最长匹配func main() { b := []byte("abc1def1") pat := `abc1|abc1def1` reg1 := regexp.MustCompile(pat) // 第一匹配 reg2 := r... 阅读全文
posted @ 2019-03-23 15:19 byfei 阅读(116) 评论(0) 推荐(0) 编辑
摘要:游戏登录排队主要是考虑排名的性能问题,很多插入删除查询操作 go的map是无序的不好做排名而数组查询效率低 需要一个有序的map,有序的map可以保证先进先出,顺序不会被打乱 但是名次问题需要一个的算法 login_que.go 实现有序map package... 阅读全文
posted @ 2019-03-13 10:13 byfei 阅读(150) 评论(0) 推荐(0) 编辑
摘要:goland打开工程 file/open 打开工程的文件夹就好,不像vs要打开工程文件设置 file/setting/ 设置字体,设置背景色,快捷键等编译 silf+f10下载mod 命令窗口输入 go mod tidy如果下载失败,拿别人的覆盖自己的C:\U... 阅读全文
posted @ 2019-03-09 13:39 byfei 阅读(53) 评论(0) 推荐(0) 编辑