class Foo(): def __init__(self,name): self.name=name def text(self): return 123 f=Foo(1) ''' hasattr(obj,name) 判断一个对象里面是否有name属性,或者name方法,返回bool值,有nam... ...
分类:
编程语言 时间:
2017-12-14 21:14:02
阅读次数:
134
Application.ProcessMessages;LockWindowUpdate(Self.Handle); //锁住当前窗口 LockWindowUpdate(0)//解除锁定窗口 LockWindowUpdate不但闪烁,而且有可能引起桌面闪烁。因为LockWindowUpdate并不忽 ...
1.contexts contexts(self): 2. current_contextcurrent_context(self): 3. contextcontext(self): 4. find_element_by_ios_uiautomationfind_element_by_ios_ui ...
分类:
移动开发 时间:
2017-12-14 15:50:51
阅读次数:
222
一、导航栏的背景和文字Color: 方法一: //设置NavigationBar 背景颜色&title 颜色 [self.navigationController.navigationBar setBarTintColor:[UIColor colorWithRed:20/255.0 green:1 ...
分类:
移动开发 时间:
2017-12-14 14:57:08
阅读次数:
187
# 匹配id,先指定一个html标签,然后加上“#”符号,再加上id的属性值 self.driver.find_element_by_css_selector('div#ID').click() # 匹配class,先指定一个html标签,然后加上“.”符号,再加上class的属性值 self.dr ...
分类:
编程语言 时间:
2017-12-14 11:58:25
阅读次数:
314
A self-dividing number is a number that is divisible by every digit it contains. For example, 128 is a self-dividing number because 128 % 1 == 0, 128 ...
分类:
其他好文 时间:
2017-12-14 11:56:59
阅读次数:
179
lldb的问题属于调试器: 下面命令用于在调试时设值 e self.apiModel.apiParams = [NSDictionary dictionaryWithObjectsAndKeys:@"一切", @"content", nil] @weakify(self) 属于便捷语法 #defin ...
分类:
数据库 时间:
2017-12-14 11:56:30
阅读次数:
150
1.创建拓扑(python脚本) from mininet.topo import Topo class MyTopo( Topo ): "Simple topology example." def __init__( self ): Initialize topology Topo.__init_ ...
分类:
其他好文 时间:
2017-12-14 04:26:44
阅读次数:
210
Lonely people will always remember his life occurred in each person. 寂寞的人总是会用心记住他生命中出现过的每个人。 If you don't love for yourself, you will always live for ...
分类:
其他好文 时间:
2017-12-14 04:14:58
阅读次数:
147
题目描述:在一个旋转数组中查找给定的值,其中旋转数组中不含重复值; 思路: 1. 第一遍二分遍历,找到数组中最小值的索引; 2. 第二遍分别对最小值左右两边的数组进行二分查找; python class Solution(object): def find_min(self, nums): if n ...
分类:
编程语言 时间:
2017-12-14 04:10:55
阅读次数:
173