- 博客(16)
- 收藏
- 关注
原创 pymysql.err.OperationalError: (1507, ‘Error in list of partitions to DROP‘)
pymysql.err.OperationalError: (1507, 'Error in list of partitions to DROP') 是因为分区不存在mysql查询分区表f"select PARTITION_NAME from information_schema.partitions where table_name = 'table_name' and table_schema='my_database';"需要指定table_name 和 table_schema
2022-03-23 18:01:28
2070
原创 图片转换为Ico格式
import refrom pathlib import Pathfrom typing import Union, Optionalfrom uuid import uuid4from PIL import Imageimport requestsdef convert_ico(source: Union[str, Path], dist: Optional[str] = None, size: int = 128): if size > 256: size.
2022-03-03 20:10:15
711
原创 Tkinter 顶级窗口 阻塞式窗口
class Top(tk.Toplevel): """用户输入窗口 """ def __init__(self, master, data): self.master = master super().__init__(master) self.geometry("600x300+300+30") self.attributes("-alpha", 0.9) self.grab_set() .
2021-12-25 23:53:56
799
原创 计算一个数字是否是水仙花数
水仙花数定义:水仙花数只是自幂数的一种,严格来说3位数的3次幂数才称为水仙花数。知识点: 计算一个整数的位数 count = 0while value > 0: count += 1 value //= 10 获取整数每个位上的数字值 numbers = [] while value > 0: numbers.append(value % 10) v...
2021-10-05 21:44:00
133
原创 请求被中止: 未能创建 SSL/TLS 安全通道。
windows 用powershell 的Invoke-WebRequest下载文件时报错了复制下面的代码运行(回车)就好了 再次尝试想要下载的东西吧[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
2021-09-12 00:34:06
1216
1
原创 Python爬虫-笔趣阁小说
# _*_coding: utf-8 _*_"""笔趣阁小说网爬虫指定一本小说requestsbs4"""from typing import Optional, Dict, List, Tupleimport requestsfrom bs4 import BeautifulSoupdef request_url(url: str, headers: Dict[str, str] = None, params: Dict[str, str] = None) -> requ.
2021-06-28 23:52:50
466
3
原创 git push -u origin master 报错
ssh: Could not resolve hostname git#github.com: Name or service not knownfatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.github 报错,根据查询解决步骤1、ping github.com 无法ping同通过...
2020-07-05 00:02:22
467
原创 更多高级对象创建模式
//作用域和闭包的概念创建静态成员var Book = (function(){ //private static attributes 私有静态属性 var numOfBooks = 0; //Private static method. 私有静态方法 function checkIsbn(isbn){ return true; }...
2019-05-15 08:52:06
141
原创 javascript 创建对象的各种方式
// 方法一传统方法var Book = function(isbn,title,author){ if(isbn == undefind) throw new Error("Book constructor requires an isbn."); this.isbn = isbn; this.title = title || "no title specified";...
2019-05-15 08:50:34
115
原创 npm很慢的原因 npm为什么很慢 解决npm很慢 npm 淘宝镜像设置
1 npmconfigsetregistryhttps://registry.npm.taobao.org2 npminstall
2019-03-07 09:04:32
1699
1
原创 pycrypto-2.6.1-cp35-none-win32.whl 安装失败的解决办法
pycrypto-2.6.1-CP35-NONE-win32.whl查看pip 支持那些文件格式 我是将 cp35 改成 cp36就成功了 记得文件名也要改。pip install pycrypto-2.6.1-cp36-none-win32.whl
2018-11-06 11:36:21
1390
2
原创 使用 pycrypto 来做RSA(数字签名)签名,pycrpto安装失败Microsoft Visual C++ 14.0 is required
安装pycrptopip install pycrypto 如果出现安装失败:warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath. building 'Crypto.Random.OSRNG.winrandom' extension error: ...
2018-11-06 11:16:30
707
原创 Python 使用PyQt5 完成选择文件或目录的对话框
import sysfrom PyQt5.QtWidgets import QMainWindow,QApplication,QTextEdit,QAction,QFileDialogfrom PyQt5.QtGui import QIconclass Example(QMainWindow): def __init__(self): super(Example,...
2018-11-02 21:56:34
25317
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人