类的特殊成员__add__方法#两个对象相加时,会自动执行第一个对象的__add__方法,并且将第二个对象当做参数传递进入classfoo:def__init__(self,name,age):self.name=nameself.age=agedef__add__(self,other):#return123#returnself.age+other.agereturnfoo("oo",20)#
分类:
其他好文 时间:
2018-04-13 15:12:21
阅读次数:
155
好久没写博客了,依然是按照我喜欢的风格,写一篇自己实现解释型语言。看过我之前的博客应该知道,我写的东西大多只是起到一个抛砖引玉的功能,实际上自己要实现一个框架,语言啥的,都有太多需要考虑的东西,能力有限,精力有限,只能实现一个最基本的框框出来,有兴趣的朋友自己去扩展。 刚学开发语言的时候,那些大牛们 ...
分类:
编程语言 时间:
2018-04-13 11:33:09
阅读次数:
201
Angularjs: call other scope which in iframe To access and communicate in two directions (parent to iFrame, iFrame to parent), in case they are both in ...
分类:
Web程序 时间:
2018-04-13 11:29:48
阅读次数:
230
I see a lot of people filtering replication with binlog-do-db, binlog-ignore-db, replicate-do-db, and replicate-ignore-db. Although there are uses for ...
分类:
数据库 时间:
2018-04-12 20:53:39
阅读次数:
213
1.写文件 FileStream fsWrite = new FileStream(@"E:/新建文件夹/OriginalData.dat", FileMode.OpenOrCreate, FileAccess.Write); string msg = "字符串字符串字符串"; byte[] myB ...
Better later than never. 亡羊补牢,时犹未晚。 Time and again all of us are told to complete the tasks assigned to us on time and being lazy most of us would fai ...
分类:
其他好文 时间:
2018-04-12 15:22:23
阅读次数:
174
MyBatis 通过包含的jdbcType类型 BIT FLOAT CHAR TIMESTAMP OTHER UNDEFINEDTINYINT REAL VARCHAR BINARY BLOB NVARCHARSMALLINT DOUBLE LONGVARCHAR VARBINARY CLOB NC ...
分类:
数据库 时间:
2018-04-12 11:37:53
阅读次数:
221
1. Conception(Relative vs Absolute) Abosolute Path: “/etc/hosts”(in Linux), “C:\Windows\System32\Drivers\etc\hosts”(in Windows) Relative Path:”./hosts ...
分类:
其他好文 时间:
2018-04-11 22:15:24
阅读次数:
523
1,对象的交互 人和狗大战之交互 class Person: role = 'person' def __init__(self,name,sex,hp,ad): self.name= name self.sex = sex self.hp = hp self.ad = ad def attack( ...
分类:
其他好文 时间:
2018-04-11 21:44:02
阅读次数:
212
CSDN发布时间:2018年03月19日 13:12:14 3月19日晚21时,小组在西区图书馆205研讨室举行了第六次项目组会议。 本次会议的主要内容为确定一部分后端代码架构,隆晋威组长给我们带来了详细生动的解说。 以下是第一部分后端架构的内容。(其中package为包,object为实例,cla ...
分类:
其他好文 时间:
2018-04-11 16:01:32
阅读次数:
131