01 2021 档案

摘要:from pathlib import Path p = Path(r'D:\project\pachong\test1\a.txt') # 基本用法 ''' # 判断 p.is_dir() # 判断是否是目录 p.is_file() # 判断是否是文件 p.exists() # 判断路径是否存在 阅读全文
posted @ 2021-01-30 00:17 十一的杂文录 阅读(124) 评论(0) 推荐(0)
摘要:''' title:批量修改文件名称 author:huyang createtime:2021-01-29 14:50:00 ''' from tkinter import * from tkinter import filedialog from tkinter import messagebo 阅读全文
posted @ 2021-01-29 23:44 十一的杂文录 阅读(191) 评论(0) 推荐(0)
摘要:在使用 Python-docx 库操作Word文档时,需要插入图片,在设置宽高时,报错“NameError: name 'Inches' is not defined” 原因是:没有 导入 Inches 模块 解决方法: from docx.shared import Inches 阅读全文
posted @ 2021-01-26 22:25 十一的杂文录 阅读(1321) 评论(0) 推荐(0)
摘要:1、保留小数点后两位 >>> print("{:.2f}".format(3.1415)) 3.14 2、带符号保留小数点后两位 >>> print("{:+.2f}".format(-3.1415)) -3.14 3、不带小数点 >>> print('{:.0f}'.format(2.7)) 3 阅读全文
posted @ 2021-01-22 15:57 十一的杂文录 阅读(991) 评论(0) 推荐(0)
摘要:'''python 操作 ini 文件 ini文件的特点,多个节(section),每个节下可以存储多个 k-v 值 ''' from configparser import ConfigParser config = ConfigParser() # 写ini文件 def wIni(): conf 阅读全文
posted @ 2021-01-18 16:31 十一的杂文录 阅读(293) 评论(0) 推荐(0)
摘要:<select name="" id="test"> <option value="a1">yi</option> <option value="a2">er</option> <option value="a3">san</option> </select> <button onclick="aa 阅读全文
posted @ 2021-01-15 16:41 十一的杂文录 阅读(452) 评论(0) 推荐(0)
摘要:此方法仅适用于 IE demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> 阅读全文
posted @ 2021-01-15 16:25 十一的杂文录 阅读(113) 评论(0) 推荐(0)
摘要:需求: 电脑上有两个屏幕,想在主屏上的网页中点击一个按钮,副屏就可以显示需要推送过去的网页 实现方法: 本方法使用的是js来实现的,亲测可行,支持火狐,但是不支持谷歌 demo: 主屏网页:1.html <!DOCTYPE html> <html lang="en"> <head> <meta ch 阅读全文
posted @ 2021-01-15 16:03 十一的杂文录 阅读(845) 评论(0) 推荐(0)
摘要:记一个数据库方面的面试题:数据库自增ID用完了会怎么样? MySQL中 int 类型是4个字节,如果是有符号,那就是 [ -2^31 , 2^31-1 ], 如果是无符号,那就是 [ -2^31 , 2^32-1 ],那就是 4294967295 如果该表是需要频繁插入数据,那么是可能达到这么多数据 阅读全文
posted @ 2021-01-07 00:19 十一的杂文录 阅读(155) 评论(0) 推荐(0)