会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
zwx901323
博客园
首页
新随笔
联系
订阅
管理
2025年6月29日
C++环境搭建
摘要: 1.安装mingw64 下载地址:https://sourceforge.net/projects/mingw-w64/files/ Toolchains targetting Win64 → Personal Builds → mingw-builds → 8.1.0 64位系统 → thre
阅读全文
posted @ 2025-06-29 16:26 zwx901323
阅读(57)
评论(0)
推荐(0)
2025年4月19日
在 Windows 11 系统下,Navicat 15 连接数据库报错 “ERROR: column "datlastsysoid" does not exist”
摘要: 在 Windows 11 系统下,Navicat 15 连接数据库报错 “ERROR: column "datlastsysoid" does not exist”, 是因为 PostgreSQL 15 及以上版本从pg_database表中删除了datlastsysoid字段,而 Navicat
阅读全文
posted @ 2025-04-19 16:47 zwx901323
阅读(1092)
评论(0)
推荐(1)
2024年12月11日
元类(Metaclass)和抽象类
摘要: 1.元类(Metaclass) 元类是用于创建类的类。它定义了类的创建行为,可以控制类的属性、方法的创建和修改。 1.日志记录:在创建类时自动添加日志记录相关的方法。 class LoggingMeta(type): def __new__(cls, name, bases, attrs): def
阅读全文
posted @ 2024-12-11 10:39 zwx901323
阅读(53)
评论(0)
推荐(0)
属性控制
摘要: 1.__slots__控制属性访问 class MyClass: __slots__ = ('attr1', 'attr2') def __init__(self): self.attr1 = 10 self.attr2 = 20 # 尝试添加不在 __slots__ 中的属性会报错 obj = M
阅读全文
posted @ 2024-12-11 10:05 zwx901323
阅读(15)
评论(0)
推荐(0)
抽象
摘要: 抽象定义
阅读全文
posted @ 2024-12-11 09:43 zwx901323
阅读(7)
评论(0)
推荐(0)
多态
摘要: 多态定义
阅读全文
posted @ 2024-12-11 09:43 zwx901323
阅读(6)
评论(0)
推荐(0)
继承
摘要: 继承定义
阅读全文
posted @ 2024-12-11 09:43 zwx901323
阅读(7)
评论(0)
推荐(0)
封装
摘要: 封装定义
阅读全文
posted @ 2024-12-11 09:43 zwx901323
阅读(6)
评论(0)
推荐(0)
2024年12月2日
itertools 模块学习
摘要: 1.创建无限循环迭代对象:count,cycle,repeat from itertools import count for i in count(1, 2): if i > 10: break print(i) # 以1开始,2为步长,无限range结果:1 3 5 7 9 from itert
阅读全文
posted @ 2024-12-02 17:09 zwx901323
阅读(10)
评论(0)
推荐(0)
2023年7月25日
动态导入模块
摘要: 1.创建一个简单的hello文件,里面只有一个类A,A属性为name 2.获取文件下面的未知类有哪些? 当只知道需要导入的类名称,但是不知道具体位置,如何动态导入? import importlib.util import inspect # 文件夹下面有个脚本,下面只有一个类: from test
阅读全文
posted @ 2023-07-25 21:54 zwx901323
阅读(9)
评论(0)
推荐(0)
下一页
公告