package nsqdimport ( "bufio" "compress/flate" "crypto/tls" "fmt" "net" "sync" "sync/atomic" "time" "github.com/mreiferson/go-snappystream" "github.com... ...
分类:
其他好文 时间:
2017-08-31 12:58:58
阅读次数:
288
package nsqdimport ( "bufio" "bytes" "encoding/binary" "errors" "fmt" "io" "math/rand" "os" "path" "sync" "sync/atomic" "time")// diskQueue implements... ...
分类:
其他好文 时间:
2017-08-31 12:39:19
阅读次数:
122
package nsqdimport ( "bytes" "encoding/binary" "encoding/json" "errors" "fmt" "io" "math" "math/rand" "net" "sync/atomic" "time" "unsafe" "github.com/... ...
分类:
其他好文 时间:
2017-08-31 12:35:41
阅读次数:
164
package nsqlookupdimport ( "bufio" "encoding/binary" "encoding/json" "fmt" "io" "log" "net" "os" "strings" "sync/atomic" "time" "github.com/nsqio/nsq/... ...
分类:
数据库 时间:
2017-08-31 12:33:38
阅读次数:
222
package nsqdimport ( "sort" "sync/atomic" "github.com/nsqio/nsq/internal/quantile")type TopicStats struct { TopicName string `json:"topic_name"` Chann... ...
分类:
其他好文 时间:
2017-08-31 12:33:06
阅读次数:
307
考虑任意一个数字,任何一个都会有奇怪的。。性质,就是一个可以保证不重复的方案——直接简单粗暴的最高位加数字。。于是,如同上面的那个题:+1、-1、0 但是考虑到65536KB的标准内存限制,会得出一个奇怪的性质,那就是。。。这题可以先大表之后对内存做奇怪的优化——前十位开小一点,后十位开大一点。之前 ...
分类:
其他好文 时间:
2017-08-29 21:47:49
阅读次数:
193
// // ViewController.m // 01-加法计算器 // // 首先找main.m文件,然后找AppDelegate,然后找Main Inteferce主交互故事板,然后加载箭头指向的控制器,然后加载控制器内部的View。 // 连线:按住control拖过去然后配置。 // 类扩... ...
分类:
移动开发 时间:
2017-08-29 13:03:59
阅读次数:
163
// // main.m // NSArray和NSString之间转换 #import int main(int argc, const char * argv[]) { NSArray *arr = @[@"lnj", @"lmj", @"jjj"]; // 需求: 用-将所有的姓名连接起来生成... ...
分类:
其他好文 时间:
2017-08-27 17:14:36
阅读次数:
265
// WifeCondition.h #import @protocol WifeCondition // 会做饭 - (void)cooking; // 会洗衣服 - (void)washing; // 有一份好工作 - (void)job; @end // Person.h #import #i... ...
分类:
其他好文 时间:
2017-08-27 10:13:05
阅读次数:
284
// main.m // 循环retain #import #import "Person.h" #import "Dog.h" int main(int argc, const char * argv[]) { Person *p = [Person new]; Dog *d = [Dog new... ...
分类:
其他好文 时间:
2017-08-25 16:49:20
阅读次数:
236