引言 上篇Android开发之旅:应用程序基础及组件介绍了应用程序的基础知识及Android的四个组件,本篇将介绍如何激活组关闭组件等。本文的主题如下: 1、激活组件:意图(Intents) 1.1、活动(Activity)组件的激活 1.2、服务(Service)组件的激活 1.3、广播接收者(B ...
分类:
移动开发 时间:
2017-10-19 10:32:27
阅读次数:
232
#!/usr/bin/python# Filename: method.pyclass Person: def sayHi(self): print 'Hello, how are you?'p = Person()p.sayHi()# This short example can also be ...
分类:
其他好文 时间:
2017-10-19 00:55:47
阅读次数:
185
#!/usr/bin/python# Filename: objvar.pyclass Person: '''Represents a person.''' population = 0 def __init__(self, name): '''Initializes the person's da ...
分类:
其他好文 时间:
2017-10-19 00:54:41
阅读次数:
152
C:\Python27\Lib\site-packages\Selenium2Library\keywords\_element.py 在def _element_find(self, locator, first_only, required, tag=None)中第一条语句为 browser = ...
分类:
其他好文 时间:
2017-10-19 00:54:33
阅读次数:
269
#!/usr/bin/python# Filename: class_init.pyclass Person: def __init__(self, name): self.name = name def sayHi(self): print 'Hello, my name is', self.na ...
分类:
其他好文 时间:
2017-10-19 00:52:46
阅读次数:
154
1. [self performSelector:@selector(fangfa) withObject:nil afterDelay:0.5]; // performSelector 2. [NSTimer scheduledTimerWithTimeInterval:1.5 target:se ...
分类:
移动开发 时间:
2017-10-18 20:00:39
阅读次数:
246
1.采用四个空格作为缩进 2.一行代码不要超多79个字符 3.使用空行分割类,函数,以及大块代码 4.注释独占一行 5.使用文档字符串 6.操作符的两侧,逗号后面都要加空格(但是括号的里侧是不加的) 7.统一的函数和类命名:类名采用驼峰 式,方法和函数的命名方式是小写字符加下划线,总是用self作为 ...
分类:
编程语言 时间:
2017-10-18 17:12:04
阅读次数:
207
hasattr(object, name) 判断一个对象里面是否有name属性或者name方法,返回BOOL值,有name特性返回True, 否则返回False。需要注意的是name要用括号括起来 class test(): name="xiaohua" def run(self): return ...
分类:
编程语言 时间:
2017-10-18 00:15:27
阅读次数:
202
1、window.location 对象所包含的属性 2、Js中的window.parent ,window.top,window.self 详解 parent是父窗口,top是最顶级父窗口,self是当前窗口, opener是用open方法打开当前窗口的那个窗口。 window.self:是对当前 ...
分类:
Web程序 时间:
2017-10-17 16:34:33
阅读次数:
195
1、登录功能完善 登录成功应该是重定向到首页,而不是转发,当前用户信息保存到session: 用户需要提供序列化方法: ...
分类:
其他好文 时间:
2017-10-17 15:24:03
阅读次数:
192