视频中说“把不同的角色组合成了角色”是什么意思?这个"角色"是那些对象权限中的对象吗?
import time class Decorater(): __cache = {} def __init__(self,func): self.func = func def __call__(self, *args, **kwargs): if self.func.__name__ in Decorater.__cache: return Decorater.__cache[self.func.__name__] else: result = self.func(*args,**kwargs) Decorater.__cache[self.func.__name__] = result return result def costtime(func): def infunc(*args,**kwargs): start = time.time() result = func(*args,**kwargs) end = time.time() print(f"{end-start}") return end-start return infunc @costtime @Decorater def long_time(): print("start") time.sleep(4) print("end") return 999 if __name__ == "__main__": r1 = long_time() r2 = long_time() print(r1) print(r2)
请问老师,这里我输出的结果没有返回值999是什么原因啊
.direction == : .rect.left = tank.rect.left - .rect.width .rect.top = tank.rect.top + tank.rect.height/- .rect.height/.direction == : .rect.left = tank.rect.left + tank.rect.width .rect.top = tank.rect.top + tank.rect.height/- .rect.height/.direction == : .rect.left = tank.rect.left + tank.rect.width/- .rect.width/.rect.top = tank.rect.top - .rect.height .direction == : .rect.left = tank.rect.left + tank.rect.width/- .rect.width/.rect.top = tank.rect.top + tank.rect.height
这一部分中的self.rect.left, self.rect.top, tank. rect.top, tank.rect.left,
self.rect.width, self.rect.height是怎么来的呀,上面好像没有定义呀
QQ截图20200202145927.png
老师这是什么原因
不可能三角
你好老师,通过这几天的学习,发现自己学习效率有点低,因为每节课都会认真做笔记,导致自己两个小时的课程可能要学三个多小时甚至四个小时,我想请问一下老师对初学者来说有没有好的学习方法,提高学习效率?
这些练习,不会能提供一个答案,和解题思路
朴素贝叶斯算法.zip
老师,自己写的朴素贝叶斯算法,得到的结果都是空是怎么回事。具体代码在压缩包中
老师,oracle的资料没找到,在哪里???
老师,用 python manager.py db migrate没用怎么回事
这是用python manager.py db init打印的
Creating directory E:\PyCharm\test\migrations ... done Creating directory E:\PyCharm\test\migrations\versions ... done Generating E:\PyCharm\test\migrations\alembic.ini ... done Generating E:\PyCharm\test\migrations\README ... done Generating E:\PyCharm\test\migrations\script.py.mako ... done Please edit configuration/connection/logging settings in 'E:\\PyCharm\\test\\migrations\\alembic.i ni' before proceeding.
这是用python manager.py db migrate打印的
INFO [alembic.runtime.migration] Context impl MySQLImpl. INFO [alembic.runtime.migration] Will assume non-transactional DDL. INFO [alembic.env] No changes in schema detected.
提问:maven部分的文档资料和视频中的差别有点大,而这部分(1)讲解的比较快 (2)全部都是些固定配置的东西,没必要自己再整理文档 麻烦更新下资料,谢谢。
SyntaxError: Non-UTF-8 code starting with '\xb2' in file D:/PycharmProjects/SXT_文件操作/03_指定文件编码解决中文乱码.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Process finished with exit code 1
我去百度了说的是在首行添加#coding=gbk
为什么???
老师这个打包插件是导入了吗 ,为什么还是红色的呢?
老师我不是很懂这句话是什么意思,详细讲解一下
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637