一、ArrayList分析 1.类和构造方法 2.add()方法 二、Vector分析(线程安全的) 1.类和构造方法 2.add()方法 三、LinkedList 1.类和构造方法 2.add()方法 3.get()方法 ...
分类:
其他好文 时间:
2018-12-22 13:54:10
阅读次数:
137
背景 最近在群里,有人问如何深度比较2个对象相等,感觉很有意思,就自己研究了一下,并写了一个开源的小类库,地址如下https://github.com/lamondlu/ObjectEquality。 如果想直接使用这个类库,可以使用Nuget进行安装 对象比较有几种情况 1. 对象是值类型或者St ...
分类:
Web程序 时间:
2018-12-22 13:04:36
阅读次数:
189
实现互斥锁 package com.zookeeper.lock; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.concurrent.CountD ...
分类:
其他好文 时间:
2018-12-19 17:01:02
阅读次数:
129
A simple greedy construction procedure: - Fill out the seq of 'I' with 0, 1, 2, 3... - Similarly, for the seq of 'D', fill it out with n, n - 1, n - 2 ...
分类:
其他好文 时间:
2018-12-18 13:59:44
阅读次数:
156
转自:https://zhuanlan.zhihu.com/p/27896239 1 SPS和PPS从何处而来? 2 SPS和PPS中的每个参数起什么作用? 3 如何解析SDP中包含的H.264的SPS和PPS串? 1 客户端抓包 在做客户端视频解码时,一般都会使用Wireshark抓包工具对接收的 ...
分类:
其他好文 时间:
2018-12-18 02:36:36
阅读次数:
280
reference:https://www.cnblogs.com/awkflf11/p/9191708.html 目录: 31.Tcp握手的一些问题? 21.Tcp三次握手及SYN攻击; 四次握手? 为什么建立连接是三次握手,而关闭连接却是四次挥手? 13.TCP释放连接四次握手 12.TCP建立 ...
分类:
其他好文 时间:
2018-12-17 18:04:03
阅读次数:
185
1.staticmethod 静态方法 2.__import__ 动态模块导入 3.all() 判断给定的所有迭代对象为True时返回True 4.enumerate(seq,index)遍历对象加索引,模式是0开始,可以设定index值1,从1开始 5.int(x,base=10) base 默认 ...
分类:
编程语言 时间:
2018-12-17 18:03:03
阅读次数:
249
enumerate()函数用于将一个可遍历的数据对象(如列表、元组或字符串)组合为一个索引序列,同时列出数据和数据下标,一般用在for循环当中。>>>seq=[‘one‘,‘two‘,‘three‘]>>>fori,elementinenumerate(seq):...print(i,seq[i])...0one1two2three>>>
分类:
编程语言 时间:
2018-12-17 11:44:18
阅读次数:
152
Knockoutjs https://knockoutjs.com/index.html https://knockoutjs.com/documentation/introduction.html Knockout is a JavaScript library that helps you to ...
分类:
Web程序 时间:
2018-12-17 02:35:32
阅读次数:
192