上一页 1 2 3 4 5 6 ··· 40 下一页
摘要: 由于刚换电脑,以至于很多都得重新安装,今天使用Python3时,遇到 No module named 'mysql' 解决方法安装mysql-connector pip install mysql-connector 阅读全文
posted @ 2024-04-01 15:09 慕尘 阅读(100) 评论(0) 推荐(0) 编辑
摘要: uni.navigateTo 用于页面跳转 如: <navigator url="/pages/index/index" hover-class="navigator-hover"> <button type="default">跳转</button> </navigator> 但是跳转页面失败,没 阅读全文
posted @ 2023-06-19 15:14 慕尘 阅读(1137) 评论(0) 推荐(0) 编辑
摘要: 1.安装jsonwebtoken npm install jsonwebtoken 2.获取token,sign.js 先不加身份验证了,只是简单生成一个token const jwt = require('jsonwebtoken'); async function getToken(ctx) { 阅读全文
posted @ 2023-06-13 13:10 慕尘 阅读(159) 评论(0) 推荐(0) 编辑
摘要: package.json是用来识别项目并且处理项目的依赖关系的 { "name": "名",//包名字 "version": "1.0.0", //版本 "description": "描述", "main": "index.js",//入口文件 "scripts": {//指定运行脚本命令的 np 阅读全文
posted @ 2023-06-08 15:19 慕尘 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 需要使用python-docx (1)安装 python -m pip install python-docx (2)新建空白文档 from docx import Document document = Document() document.save('../data/123.docx') (3 阅读全文
posted @ 2022-10-20 13:28 慕尘 阅读(641) 评论(0) 推荐(0) 编辑
摘要: 1.读取docx 需要使用python-docx (1)安装python-docx python -m pip install python-docx (2)读取docx import docx document = docx.Document("D:/资料/me/AA.docx") #获取所有段落 阅读全文
posted @ 2022-10-20 11:52 慕尘 阅读(7386) 评论(0) 推荐(0) 编辑
摘要: 先安装 pillow 介绍 pip install pillow 将多张图片合成PDF from PIL import Image import os # 防止字符串乱码 os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8' def pic 阅读全文
posted @ 2022-09-20 14:16 慕尘 阅读(695) 评论(0) 推荐(0) 编辑
摘要: python中 os.listdir()方法用于返回指定的文件夹包含的文件或文件夹的名字的列表 import os path = "../data/materials/test/" path_list = os.listdir(path) print(path_list) 输出 ['1.jpg', 阅读全文
posted @ 2022-09-20 14:05 慕尘 阅读(500) 评论(0) 推荐(0) 编辑
摘要: 在使用mysql-connector进行数据插入时,出现 'MySQLConverter' object has no attribute '_navigablestring_to_mysql' 具体位置 ins_sql = "INSERT INTO {} (name,radical,stroke_ 阅读全文
posted @ 2022-09-17 01:09 慕尘 阅读(76) 评论(0) 推荐(0) 编辑
摘要: Tesseract-OCR已经安装 $ tesseract -v tesseract v5.2.0.20220708 leptonica-1.78.0 libgif 5.1.4 : libjpeg 8d (libjpeg-turbo 1.5.3) : libpng 1.6.34 : libtiff 阅读全文
posted @ 2022-09-16 12:25 慕尘 阅读(924) 评论(0) 推荐(0) 编辑
摘要: 分片下载文件 import os os.makedirs('../data/materials/mp3/', exist_ok=True) File_PATH = '../data/materials/' def chunkDownload(url,dType): import requests r 阅读全文
posted @ 2022-09-16 12:00 慕尘 阅读(249) 评论(0) 推荐(0) 编辑
摘要: mysql-connector是一个Python模块 1.安装 python -m pip install mysql-connector 测试是否安装成功 import mysql.connector test数据库结构 2.建立数据库连接 db.py import mysql.connector 阅读全文
posted @ 2022-09-16 11:49 慕尘 阅读(1415) 评论(0) 推荐(0) 编辑
摘要: fork:github网站的操作,将开源项目复制一份到自己的仓库中 那fork的项目在原仓库更新后,如何同步呢? 1.查看远程仓库 $ git remote -v origin https://code.xxx.com/beibei/yyy.git (fetch) origin https://co 阅读全文
posted @ 2022-08-06 23:21 慕尘 阅读(1087) 评论(0) 推荐(1) 编辑
摘要: 查找文本文件中重复的汉字,找到在所在行号 文本文件格式 大 小 多 少 前 后 左 …… text.py import os import re list = [] same=0 total=0 index = [] with open("1.txt", "r", encoding="utf-8") 阅读全文
posted @ 2022-04-15 16:44 慕尘 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 今天使用 idea 出现 Low Memory The IDE is running low on memory and this might affect performance. Please consider increasing available heap. 原因: IDE内存不足 解决方 阅读全文
posted @ 2021-11-30 21:22 慕尘 阅读(5097) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 40 下一页