码迷,mamicode.com
首页 >  
搜索关键字:self    ( 14215个结果
IOS修改Navigation Bar上的返回按钮文本颜色,箭头颜色以及导航栏按钮的颜色
自从IOS7后UINavigationBar的一些属性的行为发生了变化.你可以在下图看到: 现在,如果你要修改它们的颜色,用下面的代码: 1 2 3 4 self.navigationController.navigationBar.barTintColor = [UIColor blackColo ...
分类:移动开发   时间:2017-10-22 22:06:55    阅读次数:343
解读python中SocketServer源码
在看SocketServer源码之前,先看一个例子: class Base(object): def __init__(self, name): self.name = name self.Testfunc() def Testfunc(self): print('do Base Testfunc' ...
分类:编程语言   时间:2017-10-22 20:55:41    阅读次数:173
重构之路第三篇——重新组织数据
本篇目录: 1 Self Encapsulate Field(自封装字段) 2 Replace Data Value with Object(以对象取代数据值) 3 Change Value to Reference(将值对象改为引用对象) 4 Change Reference to Value(将 ...
分类:其他好文   时间:2017-10-22 14:40:45    阅读次数:151
235. Lowest Common Ancestor of a Binary Search Tree
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia ...
分类:其他好文   时间:2017-10-22 00:32:00    阅读次数:143
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai ...
分类:其他好文   时间:2017-10-22 00:31:37    阅读次数:133
Python的动态添加属性与方法
class Person(object): pass Person.num = 888给类添加属性 默认的实例方法,默认参数self,获得对象信息 @classmethod 给类添加方法 默认参数cls,可以获得类中的信息 @staticmethod 添加静态方法,默认没有参数,独立的方法。 以下是 ...
分类:编程语言   时间:2017-10-22 00:15:59    阅读次数:271
JavaScript观察者模式
(2)扩展一个发布者的发布消息的方法(推模式) (3)扩展公共订阅的函数,和取消订阅的函数 订阅的函数: (5)发布部分 (5.1)使用门面模式--针对各浏览器的事件绑定兼容问题 (5.2)创建主应用函数 最后,订阅者界面 效果为: (1)cctv模块的 (2)gfb的效果为: 总结: 1.支持简单 ...
分类:编程语言   时间:2017-10-21 00:14:29    阅读次数:266
bxSlider滚动窗的使用 | Django开发
Title {% for item in queryset_dict %} {% endfor %} from django.db import models # 幻... ...
分类:其他好文   时间:2017-10-20 21:29:58    阅读次数:157
【Python】【控制流程】【迭代对象、迭代器、生成器】
#14.1 Sentence类第一版,单词序列#栗子14-1 吧句子划分为单词序列import reimport reprlibRE_WORD = re.compile('\w+')class Sentence: def __init__(self,text): self.text = text s ...
分类:编程语言   时间:2017-10-20 20:20:47    阅读次数:257
【Python】【继承】
#栗子12-1 内置类型dict 的__init__和__update__方法会忽略我们覆盖的__setitem__class DoppelDict(dict): def __setitem__(self, key, value): super().__setitem__(key,[value]*2 ...
分类:编程语言   时间:2017-10-20 20:15:20    阅读次数:241
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!