上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页
摘要: 1.TypeError: ‘list’ object is not callable 不要用与系统内置同名的字段 2.operatorlist:<tornado.concurrent.Future object at 0x7f03a41d7190> 查mongo数据库返回Future对象需要用yie 阅读全文
posted @ 2020-08-04 10:13 LeeJuly 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Golang通过通信来实现共享内存,而不是通过共享内存而实现通信,通信实际就是借用channel来实现的 channel底层数据结构 type hchan struct { qcount uint dataqsiz uint buf unsafe.Pointer #是有缓冲的channel所特有的结 阅读全文
posted @ 2020-08-03 20:12 LeeJuly 阅读(1035) 评论(0) 推荐(0) 编辑
摘要: reflect包中的具体方法 reflect.TypeOf、reflect.ValueOf可以将一个普通的变量转换成『反射』包中提供的Type和Value type Person struct { Name string Sex string } func (p *Person) Add(a, b 阅读全文
posted @ 2020-07-30 20:21 LeeJuly 阅读(654) 评论(0) 推荐(0) 编辑
摘要: sync.Mutex 保证共享资源的互斥访问 mutex := &sync.Mutex{} mutex.Lock() // Update共享变量 (比如切片,结构体指针等) mutex.Unlock() sync.RWMutex 读写互斥锁,可以对读加锁 mutex := &sync.RWMutex 阅读全文
posted @ 2020-07-30 20:02 LeeJuly 阅读(194) 评论(0) 推荐(0) 编辑
摘要: sync.Pool 主要通过减少GC来提升性能,是Goroutine并发安全的 sync.Pool使用 初始化Pool实例,可以通过配置new方法来声明Pool元素创建的方法 bufferpool := &sync.Pool { New: func() interface {} { println( 阅读全文
posted @ 2020-07-30 19:27 LeeJuly 阅读(348) 评论(0) 推荐(0) 编辑
摘要: public class Bytecode { public static void main(String arg[]){ Bytecode bc= new Bytecode(); System.out.println(bc.fib(4)); } public int fib(int N) { i 阅读全文
posted @ 2020-05-12 20:22 LeeJuly 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 回调: 函数回调接口: 回调者以及测试 事件监听器 设计事件源,事件监听器(相当于回调接口),事件对象 当事件源对象上发生操作时,它将会调用事件监听器的一个方法,并在调用该方法时传递事件对象过去 事件监听器实现类,通常是由开发人员编写,开发人员通过事件对象拿到事件源,从而对事件源上的操作进行处理 简 阅读全文
posted @ 2019-05-11 10:36 LeeJuly 阅读(1008) 评论(0) 推荐(0) 编辑
摘要: 第一范式(1NF): 数据库表中的每一列都是不可分割的基本数据项,同一列中不能有多个值,即实体中的某个属性不能有多个值或者不能有重复的属性。 简而言之,第一范式就是无重复的列。例如,由“职工号”“姓名”“电话号码”组成的表(一个人可能有一部办公电话和一部移动电话),这时将其规范化为1NF可以将电话号 阅读全文
posted @ 2019-03-27 17:23 LeeJuly 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 这里重点介绍NIO 待定 http://www.apigo.cn/2018/11/09/javacore5/ https://juejin.im/entry/598da7d16fb9a03c42431ed3 https://mp.weixin.qq.com/s/c9tkrokcDQR375kiwCe 阅读全文
posted @ 2019-03-27 13:57 LeeJuly 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 集合类中线程安全的就只有,vector,hashtable,concurrentHashmap ArrayList: ArrayList 实现于 List、RandomAccess 接口。可以插入空数据,也支持随机访问。 ArrayList的初始容量为10,这里我们主要了解一下ArrayList的扩 阅读全文
posted @ 2019-03-14 15:35 LeeJuly 阅读(170) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页