is和as运算符:所有类型的基类object类型 - 基类 is是判断某个对象是否是某个类型 对象 is 类型 返回 bool类型 as是将某个对象转换成某个类型 对象 as 类型 如果转换成功返回对象类型 如果转换失败,也不会报错,而是返回null值 实例如下: ArrayList arr = n ...
分类:
其他好文 时间:
2017-07-04 09:45:27
阅读次数:
91
Foundation`_NSSetObjectValueAndNotify: ... 0x116156dfb <+27>: callq 0x116340498 ; symbol stub for: object_getClass 0x116156e00 <+32>: movq %rax, %rdi ...
分类:
移动开发 时间:
2017-07-04 01:04:35
阅读次数:
312
https://leetcode.com/problems/3sum/#/description Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all uni ...
分类:
其他好文 时间:
2017-07-04 00:59:27
阅读次数:
193
Python读写文件1.open使用open打开文件后一定要记得调用文件对象的close()方法。比如可以用try/finally语句来确保最后能关闭文件。file_object = open('thefile.txt')try: all_the_text = file_object.read( )... ...
分类:
编程语言 时间:
2017-07-03 23:58:13
阅读次数:
394
1. 每个对象都有_proto_,且_proto_指向创建类型的prototype; 2. function都有prototype,prototype有两个属性,constructor/_proto_(_proto_总指向Object的prototype); 3. Object的prototype的 ...
分类:
其他好文 时间:
2017-07-03 22:43:20
阅读次数:
123
单例集合 | Collection 单例集合 的根接口 | List 如果是实现了List接口的集合类,具备的特点: 有序,可重复。 | ArrayList ArrayList底层是使用了Object数组实现 的。 特点: 查询速度快,增删慢。 | LinkedList LinkedList底层是使 ...
分类:
其他好文 时间:
2017-07-03 22:41:18
阅读次数:
170
ps:写这篇文章的目的是尝试下新的markdown编辑器哈哈 简单介绍 ORMLite provides a lightweight Object Relational Mapping between Java classes and SQL databases. There are certain ...
分类:
移动开发 时间:
2017-07-03 22:33:12
阅读次数:
349
List和ArrayList的性能比较 在使用ArrayList这样的非泛型集合的过程中,要进行装箱和拆箱操作,会有比较大的性能损失,而使用泛型集合就没有这样的问题。List是泛型,而ArrayList是非泛型。存数据岛ArrayList都需要专程object,读取又要转换成相应的数据类型,List ...
分类:
其他好文 时间:
2017-07-03 22:27:33
阅读次数:
198
继承: 在Python3中默认继承object类。但凡是继承了object类以及子类的类称为新式类(Python3中全是这个)。没有继承的称为经典类(在Python2中没有继承object以及他的子类都是经典类。) 继承是类与类的关系,解决了代码重用的问题,减少冗余代码。在Python中是先定义父类 ...
分类:
编程语言 时间:
2017-07-03 21:13:35
阅读次数:
305
function Person(name) { this.name = name; this.flag = 0; Object.defineProperty(this, 'name', { get: function() { return name;}, set: function(newName)... ...
分类:
其他好文 时间:
2017-07-03 21:06:21
阅读次数:
109