[TOC]一元类介绍插图:恶搞图47什么是元类呢?一切源自于一句话:python中一切皆为对象。让我们先定义一个类,然后逐步分析classStanfordTeacher(object):school=‘Stanford‘def__init__(self,name,age):self.name=nameself.age=agedefsay(self):print(‘%ssayswelcometoth
分类:
其他好文 时间:
2020-01-18 16:22:12
阅读次数:
76
Cardiff School of Computer Science and InformaticsCoursework Assessment Pro-formaModule Code: CMT307Module Title: Applied Machine LearningAssessment T ...
分类:
其他好文 时间:
2020-01-10 20:02:15
阅读次数:
60
资料一、资料二: https://www.w3school.com.cn/js/js_date_formats.asp https://www.weizhixi.com/user/index/article/id/70.html 资料三: GMT和UTC GMT,即格林尼治标准时间,也就是世界时。G ...
分类:
其他好文 时间:
2020-01-10 12:27:41
阅读次数:
439
原文 Text 1Among the annoying challenges facing the middle class is one that will probably go unmentioned in the next presidential campaign: What happen ...
分类:
其他好文 时间:
2020-01-08 14:16:40
阅读次数:
435
打开xshell,提示评估已过期。对于这种问题,无需卸载当前版本 直接通过安装学生版就可以了,下载地址: https://www.netsarang.com/zh/free-for-home-school/ 填写信息,点击 “下载” 查看邮件收到的下载链接 Dear user, Thank you ...
分类:
系统相关 时间:
2020-01-06 19:28:59
阅读次数:
672
``` # 1添加数据二种方法 1.1 # school = School(name='吉利大学') # school.save() # 1.2 School.objects.create(name='吉利01') # 2 查询表里数据 2.1查询所有 # s = School.objects.al... ...
分类:
其他好文 时间:
2020-01-06 11:14:35
阅读次数:
97
CSS3(4) 动画(animation) 之前有写过过渡: "CSS3(2) 过渡(transition)" 个人理解两者不同点在于 只能指定属性的 开始值 与 结束值 ,然后在这两个属性值之间进行平滑过渡来实现动画效果,因此只能实现简单的动画效果。 除了定义 开始值 和 结束值 ,在这之间还可以 ...
分类:
Web程序 时间:
2020-01-05 00:33:05
阅读次数:
100
直接看代码: class Person: def __init__(self): self.name = "jack" class Student(Person): def __init__(self): self.school = "一中" stu = Student() print("学生的姓名 ...
分类:
编程语言 时间:
2020-01-03 09:16:37
阅读次数:
235
已经建立一个mysql数据库school,里面包含一个表userinfo,表里有3个字段,分别为user_id,username,passwd,即序号(自增字段),用户名,密码. 已经该数据库中存放了若干用户的帐户信息,现在要求用python编写一段小程序,实现由用户输入自己的用户名和密码,完成登陆 ...
分类:
微信 时间:
2019-12-28 13:15:08
阅读次数:
145
import pymysql conn = pymysql.connect(host='127.0.0.1',port=3306,user='root',passwd='990310',db = 'school',charset='utf8') cursor = conn.cursor() l = ...
分类:
数据库 时间:
2019-12-28 12:52:28
阅读次数:
81