1.面向对象 __setitrm__ getitem__ 2.面向对象__setattr__,__getattr__ 二 进程 1.进程间不可以传递数据,同时也是有主进程的,默认deamon=flase 主进程完毕可以等待子进程 2.进程也可以分为两种写法 一个是引入模块 multiprocseei ...
分类:
系统相关 时间:
2018-09-12 19:57:59
阅读次数:
224
三者的异同 localStorage和sessionStorage操作 localStorage和sessionStorage都具有相同的操作方法,例如setItem、getItem和removeItem等 localStorage和sessionStorage的方法 setItem存储value ...
分类:
其他好文 时间:
2018-09-11 12:15:56
阅读次数:
100
class Foo(object): def __init__(self, name, age): self.name = name self.age = age def __getitem__(self, item): if hasattr(self, item): return self.__d... ...
分类:
其他好文 时间:
2018-09-06 02:35:38
阅读次数:
149
声明一个委托 public delegate T GetListDelegate<T>(Datarow row)//Datarow 为参数类型 使用委托 public List<T> GetDataSet<T>(string s ,GetListDelegate GetItem) { List<T> ...
分类:
其他好文 时间:
2018-09-03 13:49:56
阅读次数:
132
1.类的特殊成员之call 2.类的特殊成员之getitem,setitem,delitem 3.类的特殊成员之dict 获取类或对象中的所有成员 4.类的特殊成员之iter 5.类的特殊成员之add 6.真正的构造方法 ...
分类:
其他好文 时间:
2018-09-01 17:34:06
阅读次数:
212
1 TreeItem* TreeModel::GetItem(QStringList& list, TreeItem* parent ,int deep) 2 { 3 if( list.at(deep) == parent->data(0).toString()) 4 { 5 if( ++deep ... ...
分类:
其他好文 时间:
2018-08-30 14:27:27
阅读次数:
169
class Foo: def __init__(self,a,b): print('我是第二部,初始化数据') self.a=a self.b=b def __call__(self, *args, **kwargs): return args,kwargs def __getitem__(self... ...
分类:
其他好文 时间:
2018-08-30 10:58:52
阅读次数:
129
索引和切片运算符的重载 方法名 运算符和表达式 说明 __getitem__(self, i) x = self[i] 索引/切片取值 __setitem__(self, i, val) self[i] = val 索引/切片赋值 __delitem__(self, i) del self[i] 删 ...
分类:
其他好文 时间:
2018-08-30 00:19:47
阅读次数:
303
监听器在JavaWeb开发中用得比较多,下面说一下监听器(Listener)在开发中的常见应用 一、统计当前在线人数 在JavaWeb应用开发中,有时候我们需要统计当前在线的用户数,此时就可以使用监听器技术来实现这个功能了。 二、自定义Session扫描器 当一个Web应用创建的Session很多时 ...
分类:
其他好文 时间:
2018-08-21 17:44:30
阅读次数:
219
operator.concat(a, b) 对于 a、b序列,返回 a + b(列表合并) operator.countOf(a, b) 返回 b 在 a 中出现的次数 perator.delitem(a, b) 删除 a 中索引为 b 的值 operator.getitem(a, b) 返回 a ...
分类:
其他好文 时间:
2018-08-18 14:26:13
阅读次数:
160