自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

墨大爷

选项

  • 博客(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 1541

原创 使用 Pydantic 描述层次数据结构

使用pydantic演示层次数据结构

2022-03-18 18:07:05 361

原创 图片转换为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 578

原创 Python 获取当天零点时间戳

Python 获取当天零点时间戳

2022-02-17 16:42:29 2940

原创 Tkinter 第一步 创建一个Gui界面

学习到如何使用 Tkinter 创建一个GUI 界面

2022-01-30 13:45:40 603

原创 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 632

原创 计算一个数字是否是水仙花数

水仙花数定义:水仙花数只是自幂数的一种,严格来说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 90

原创 请求被中止: 未能创建 SSL/TLS 安全通道。

windows 用powershell 的Invoke-WebRequest下载文件时报错了复制下面的代码运行(回车)就好了 再次尝试想要下载的东西吧[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

2021-09-12 00:34:06 630 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 362 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 335

原创 更多高级对象创建模式

//作用域和闭包的概念创建静态成员var Book = (function(){ //private static attributes 私有静态属性 var numOfBooks = 0; //Private static method. 私有静态方法 function checkIsbn(isbn){ return true; }...

2019-05-15 08:52:06 97

原创 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 76

原创 npm很慢的原因 npm为什么很慢 解决npm很慢 npm 淘宝镜像设置

1 npmconfigsetregistryhttps://registry.npm.taobao.org2 npminstall

2019-03-07 09:04:32 1599 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 1269 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 635

原创 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 25159

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除