摘要:
使用显式刷新输出 关键代码 yield " " * 1024 + "\n\n" 完整代码 from flask import Flask, Response, stream_with_context import time app = Flask(__name__) def generate_dat 阅读全文
摘要:
引入 今天由于项目需要,要将logging库二次封装成一个类,以实现一些自定义的功能。 我将二次封装了一个logService类,然后在其中同样也实现info, warn, error等日志函数。额外加了一个将日志存入数据库的功能。 大概是像下面这样子: 但是在封装的过程中,出现了一个问题:log中 阅读全文
摘要:
docker源配置,国内加速地址 更改配置文件 vi /etc/docker/daemon.json { "registry-mirrors": [ "https://mirror.baidubce.com", "https://mirror.ccs.tencentyun.com", "https: 阅读全文
摘要:
设置为outline:unset;或者outline:none;即可 :deep(.el-tooltip__trigger:focus-visible) { outline: unset; } 阅读全文
摘要:
# 1. 卸载旧版本 yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ doc 阅读全文
摘要:
解决目前无法访问,超时连接方法 解决方案1:配置加速地址 配置加速地址:适用于Ubuntu 16.04+、Debian 8+、CentOS 7+ 方式一:使用以下命令设置registry mirror:但是需要重启docker服务 sudo mkdir -p /etc/docker sudo tee 阅读全文
摘要:
vue配置别名 vite.config.ts export default defineConfig( ... resolve:{ alias:{ "@":path.resolve(__dirname,"src"), "com":path.resolve(__dirname,"src/compone 阅读全文
摘要:
vuex4.0.2 webstorm报如下错误 Vue: Could not find a declaration file for module vuex. 解决办法 在src目录下新建一个vuex.d.ts 文件内容如下 declare module "vuex" { export * from 阅读全文
摘要:
意思是说找不到对应的模块“@/views/xxx.vue”或其相应的类型声明 因为ts只能解析 .ts 文件,无法解析 .vue文件 解决方法很简单,一开始的时候env.d.ts是空文件(如vite-env.d.ts),我们可以在项目的env.d.ts中引入如下代码: declare module 阅读全文
摘要:
通过扫包的方式获取app.api.v1(这个是你的红图所在的包)下的所有module 通过判断这个module下有api的属性并且是Redprint if hasattr(module, "api") and isinstance(module.api,Redprint): 满足这两个条件就可以调用 阅读全文