摘要: 消费者.py import celery import time from celery.schedules import crontab backend = 'redis://127.0.0.1:6379/0' broker = 'redis://127.0.0.1:6379/1' cel = c 阅读全文
posted @ 2024-06-20 17:55 嘚惹 阅读(1) 评论(1) 推荐(0) 编辑
摘要: 协程,也可以被称为微线程,是a56爆大奖在线娱乐用户态内的上下文切换技术。简而言之,其实就是通过一个线程实现代码块相互切换执行 协程一般应用在有IO操作的程序中,因为协程可以利用IO等待的时间去执行一些其他的代码,从而提升代码执行效率。 async 事件循环 事件循环,可以理解为while循环,在周期性的执行一些任 阅读全文
posted @ 2024-03-28 18:38 嘚惹 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 部署大致流程 settings修改 ALLOWED_HOSTS = ['*'] DEBUG = False 上传项目到服务器,安装python,项目环境。python manage.py runserver测试是否能运行 安装 wfastcgi 执行wfastcgi-enable 或者是 pytho 阅读全文
posted @ 2024-03-22 14:48 嘚惹 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 在 mssql+pymssql://user:pwd@127.0.0.1/db?charset=cp936 设置 charset=cp936候中文不会乱码,但使用orm时会报错无法解析如图: 最终方案: 数据库字段类型设置为nvarchar,charset=utf8 阅读全文
posted @ 2024-03-08 09:29 嘚惹 阅读(32) 评论(0) 推荐(0) 编辑
摘要: python 元类 class Car(object): def __init__(self,name): print('init') self.name=name def __new__(cls, *args, **kwargs): print('new') return super().__ne 阅读全文
posted @ 2024-03-05 10:18 嘚惹 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 如何理解 JS的异步? 参考答案: JS是一门单线程的语言,这是因为它运行在浏览器的渲染主线程中,而渲染主线程只有一个。而渲染主线程承担着诸多的工作,渲染页面、执行 JS 都在其中运行。如果使用同步的方式,就极有可能导致主线程产生阻塞,从而导致消息队列中的很多其他任务无法得到执行。这样一来,a56爆大奖在线娱乐面会 阅读全文
posted @ 2023-11-27 15:24 嘚惹 阅读(17) 评论(0) 推荐(0) 编辑
摘要: antdv Cannot read properties of undefined (reading 'value') TypeError: Cannot read properties of undefined (reading 'value') 使用 npm i --save ant-desig 阅读全文
posted @ 2023-11-24 10:45 嘚惹 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 数组扩展 Array.from Array.from方法用于将两类对象转为真正的数组: 类似数组的对象(array-like object)和可遍历(iterable)的对象(包括 ES6 新增的数据结构 Set 和 Map) function add(){ // [1, 2, 3] 获取参数转化为 阅读全文
posted @ 2023-10-11 10:58 嘚惹 阅读(8) 评论(0) 推荐(0) 编辑
摘要: let 和 const 命令 let 声明的变量在代码块内有效 let 不允许重复声明 let 不存在变量提升 console.log(a); var a = 1; // 输出undefined console.log(b); let b = 1; // 报错Uncaught ReferenceEr 阅读全文
posted @ 2023-10-10 10:28 嘚惹 阅读(9) 评论(1) 推荐(0) 编辑
摘要: 1.Property的使用 class Backend(QObject): def __init__(self) -> None: super().__init__() self._hello='hello_world' @Property(str) def hello(self): return 阅读全文
posted @ 2023-09-20 11:27 嘚惹 阅读(97) 评论(2) 推荐(0) 编辑