http://www.verejava.com/?id=16994867037422 http://www.verejava.com/?id=16994867037422 ...
分类:
编程语言 时间:
2018-06-26 11:02:05
阅读次数:
151
在学习网络编程的时候用到反射,然后发现自己反射这部分的应用不是很熟练,决定返回来重新整理一下 对于类的反射,主要有四个用法,下面都说一下 1.hasattr 判断对象或者类是否存在指定的属性,看代码以及结果 hasattr判断完成后,会返回一个布尔值,有就返回True,无就返回False 2.get ...
分类:
编程语言 时间:
2018-06-18 21:49:35
阅读次数:
158
1.数据过滤: 使用filter()方法 >>> Publisher.objects.filter(name='Apress') [<Publisher: Apress>] >>> Publisher.objects.filter(country="U.S.A.", state_province=" ...
分类:
数据库 时间:
2018-06-16 01:03:54
阅读次数:
199
【1】类成员: 类的成员可以分为三大类:字段、方法和属性 1.字段: 字段包括:普通字段和静态字段,他们在定义和使用中有所区别,而最本质的区别是内存中保存的位置不同, 普通字段属于对象 静态字段属于类 class Province: # 静态字段 country = '中国' def __init_ ...
分类:
编程语言 时间:
2018-06-15 15:42:49
阅读次数:
184
1.浮动子div撑开父div的几种方法: (1)在父div中在添加一个清除浮动的子div<div style=" clear:both;"></div>,该div不设置任何样式,只用来清除浮动 (2)在父div的css样式中设置overflow:hidden;zoom:1; (3)设置父div也为浮 ...
分类:
其他好文 时间:
2018-06-13 15:17:13
阅读次数:
353
Description Windy has a country, and he wants to build an army to protect his country. He has picked up N girls and M boys and wants to collect them t ...
分类:
其他好文 时间:
2018-06-11 23:34:16
阅读次数:
225
新烧的Raspbian 系统,一开始需要设置wifi的一些配置,其中会选择一个国家(set country),一开始选择的是CN(中国),发现只能连接2.4G的网络,5G的网络连接不上,这很奇怪, 因为一开始没配置国家的时候,看见过扫到了5G网络名称,扫了几次也没成功,sudo vim /etc/w ...
分类:
其他好文 时间:
2018-06-10 15:18:47
阅读次数:
1159
题目描述: David the Great has just become the king of a desert country. To win the respect of his people, he decided to build channels all over his countr ...
分类:
其他好文 时间:
2018-06-09 10:17:39
阅读次数:
206
Object常用方法总结:1.Object.assign(target,source1,source2,...)该方法主要用于对象的合并,将源对象source的所有可枚举属性合并到目标对象target上,此方法只拷贝源对象的自身属性,不拷贝继承的属性。Object.assign方法实行的是浅拷贝,而 ...
分类:
其他好文 时间:
2018-06-08 11:59:37
阅读次数:
187
科学计算库Numpy 处理数据 Year,WHO region,Country,Beverage Types,Display Value 1986,Western Pacific,Viet Nam,Wine,0 1986,Americas,Uruguay,Other,0.5 1985,Africa, ...
分类:
编程语言 时间:
2018-06-07 23:09:38
阅读次数:
313