码迷,mamicode.com
首页 >  
搜索关键字:self    ( 14215个结果
python 写csv文件
一、只有一列内容: def create_file(self, a, b): # 上传csv 文件 # os.remove('openfile.csv') open_file = open('50000file.csv', 'w+') open_file.write('商户ID'+','+'类目'+ ...
分类:编程语言   时间:2017-07-07 18:21:14    阅读次数:231
【Thinkphp5】结合layer弹窗 定制操作结果页面
1 打开应用公共文件页面 appliction/common.php,编写以下代码 注意: 成功消息的绿色背景部分是iframe 框架写法,如果是普通页面。就吧parent去除,改为: self.location.href="'.$url.'" 2 使用实例: 3 效果: ...
分类:Web程序   时间:2017-07-07 15:33:35    阅读次数:415
iOS load和initialize的区别
可能有些还不清楚load和initialize的区别,下面简单说一下: 首先说一下 + initialize 方法:苹果官方对这个方法有这样的一段描述:这个方法会在 第一次初始化这个类之前 被调用,我们用它来初始化静态变量. initialize方法的调用时机,当向该类发送第一个消息(一般是类消息首 ...
分类:移动开发   时间:2017-07-07 13:22:53    阅读次数:136
IMP self _cmd
The only way to circumvent dynamic binding is to get the address of a method and call it directly as if it were a function. This might be appropriate ...
分类:其他好文   时间:2017-07-07 13:14:39    阅读次数:170
【九】面向对象
一:使用class定义类 假设你要定义一下对象用于记录联系人,每个对象对应一个人,首先需要定义person类作为生产对象的模具。 首先创建一个没有任何内容的空类: 二:对类进行初始化 init()是python中一个特殊的函数名,用户根据类的定义创建实例对象,self参数指向了这个正在被创建对象本身 ...
分类:其他好文   时间:2017-07-06 20:51:24    阅读次数:189
Pythonclassmethodstaticmethod
class MySQL: def __init__(self,ip,port): self.ip=ip self.port=port @classmethod def from_conf(cls): import settings obj=cls(settings.ip,settings.port)... ...
分类:编程语言   时间:2017-07-06 18:34:20    阅读次数:140
[LeetCode] 3Sum
题目内容 Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the su ...
分类:其他好文   时间:2017-07-06 13:26:17    阅读次数:168
window.open()页面之间函数传值
项目中遇到的问题,使用window.open()开一个页面之后,cookie会消失,所以无法一键切肤不管作用,解决方案如下: window.open()总结: window.open("sUrl","sName","sFeature","bReplace"); sUrl:可选项。字符串(String ...
分类:Windows程序   时间:2017-07-05 21:22:24    阅读次数:294
类的继承和重用
类的继承和重用 一般继承 类和类之间可以互相调用和重用以及继承的,关键点在于如何弄请父类和子类的关系以及调用是self,对象以及类之间的关系,调用其他类作为其属性其实就是直接调用其他类里面的函数属性,看准参数中的self super继承 我们在处理类的继承问题时一般都是通过调用父类的函数属性来打到调 ...
分类:其他好文   时间:2017-07-05 21:05:48    阅读次数:179
angular中的ng.function
网址:http://www.angularjsapi.cn/#/copy angular.bind 描述:函数以及参数的动态绑定,返回值为动态绑定之后的函数。其中args是可选的动态参数,self在fn中使用this调用。 使用方法是:angular.bind(self,fn,args) 其中sel ...
分类:其他好文   时间:2017-07-05 20:04:02    阅读次数:161
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!