摘要: class Solution { public: int lengthOfLongestSubstring(string s) { // 哈希集合,记录每个字符是否出现过 unordered_set<char> occ; int n = s.size(); // 右指针,初始值为 -1,相当于我们在 阅读全文
posted @ 2024-01-15 15:59 dafengchui 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 给定一个字符串 s ,请你找出其中不含有重复字符的 最长子串 的长度。 示例 1: 输入: s = "abcabcbb" 输出: 3 解释: 因为无重复字符的最长子串是 "abc",所以其长度为 3。 示例 2: 输入: s = "bbbbb" 输出: 1 解释: 因为无重复字符的最长子串是 "b" 阅读全文
posted @ 2024-01-15 15:57 dafengchui 阅读(2) 评论(0) 推荐(0) 编辑
摘要: import os import shutil # 指定根文件夹路径 root_folder = "C:/Users/Administrator/Desktop/qrCode2" # 创建两个子文件夹 if not os.path.exists(os.path.join(root_folder, ' 阅读全文
posted @ 2023-10-11 09:44 dafengchui 阅读(5) 评论(0) 推荐(0) 编辑
摘要: import os from docx import Document import Pillow from docx.shared import Inches # 定义你想要遍历的文件夹路径 folder_path = 'C:/Users/Administrator/Desktop/新建文件夹 ( 阅读全文
posted @ 2023-09-26 08:52 dafengchui 阅读(4) 评论(0) 推荐(0) 编辑
摘要: import os from docx import Document from docx.shared import Inches # 定义你想要遍历的文件夹路径 folder_path = 'C:/Users/Administrator/Desktop/东3' # 遍历文件夹中的所有子文件夹 f 阅读全文
posted @ 2023-09-20 13:39 dafengchui 阅读(9) 评论(0) 推荐(0) 编辑
摘要: import os # 读取 txt 文件 with open('D:\\test\\new11.txt', 'r', encoding='utf-8') as f: lines = f.readlines() # 遍历每一行文字,生成对应的文件夹 for line in lines: folder 阅读全文
posted @ 2023-09-20 13:37 dafengchui 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 图片插入表格自动化媲美vba import os from PIL import Image from docx import Document from docx.shared import Inches # 创建空白的 Word 文档 doc = Document() # 获取所有图片文件路径 阅读全文
posted @ 2023-09-05 14:15 dafengchui 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 使用百度OCR技术识别图片的编号文字,并重命名图片可以通过以下步骤实现: 1. 安装依赖库:首先确保已经安装了Python和必要的依赖库,包括百度AI开放平台的Python SDK。可以使用`pip install baidu-aip`命令进行安装。 2. 导入依赖库:在Python代码中导入`ai 阅读全文
posted @ 2023-08-02 16:22 dafengchui 阅读(143) 评论(0) 推荐(0) 编辑
摘要: sql 是的,SQL 语句可以实现分页展示数据的功能。不同的数据库系统实现方式可能略有不同,以下是一些常见的 SQL 实现分页的方式: ### MySQL MySQL 可以使用 `LIMIT` 子句实现分页,语法如下: ```sql SELECT * FROM table_name LIMIT of 阅读全文
posted @ 2023-04-19 10:51 dafengchui 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 常见的排序算法中,效率高到低的排名如下: 1. 快速排序(Quick Sort):时间复杂度平均情况下为 O(nlogn),是最快的排序算法之一。2. 归并排序(Merge Sort):时间复杂度稳定为 O(nlogn),但需要消耗额外的内存空间。3. 堆排序(Heap Sort):时间复杂度为 O 阅读全文
posted @ 2023-04-15 10:53 dafengchui 阅读(45) 评论(0) 推荐(0) 编辑