1:解析xml 文件 from xml.dom.minidom import parse import xml.dom.minidom # 使用minidom解析器打开XML文档 DOMTree = xml.dom.minidom.parse("./test.xml") print(DOMTree) Read More
posted @ 2019-12-31 11:40 PythonNew_Mr.Wang Views(10103) Comments(2) Diggs(1) Edit
PS:如果你想在2窗口调用1窗口的内部方法,或者在2窗口传递数据给1窗口数据,本片博客可以放心食用 主窗口: class MainWindow(QWidget,Ui_MainFrom): insertSignal = pyqtSignal() # 创建一个信号 pyqtSigal(str,int) Read More
posted @ 2019-12-25 09:17 PythonNew_Mr.Wang Views(1449) Comments(0) Diggs(0) Edit
1:动态渲染数据+动态添加控件(按钮,进度条) class MainWindow(QWidget, Ui_MainFrom): def __init__(self): super(MainWindow, self).__init__() self.setupUi(self) # #去掉标题头 # s Read More
posted @ 2019-12-23 13:18 PythonNew_Mr.Wang Views(3099) Comments(0) Diggs(0) Edit
1:用户,角色,权限,菜单表设计 from django.db import models # 用户菜单 class UserMenu(models.Model): title = models.CharField(max_length=32, verbose_name='菜单') icon = m Read More
posted @ 2019-12-13 15:58 PythonNew_Mr.Wang Views(703) Comments(0) Diggs(1) Edit
### 登录 ```python # login.py import redis import traceback from logging_files import logging_main from django.contrib.auth.hashers import check_passwor Read More
posted @ 2019-12-06 10:50 PythonNew_Mr.Wang Views(1090) Comments(1) Diggs(0) Edit
1:设置mysql原生分页 # 监控系统首页显示分页 def MyPagination(limitid,offsetid): limitid =str(limitid) offsetid =str(offsetid) # 这里是mysql原生代码 show_goods = "select dal_k Read More
posted @ 2019-12-03 15:04 PythonNew_Mr.Wang Views(3484) Comments(0) Diggs(0) Edit
少于150字的随笔不允许发布到网站首页少于150字的随笔不允许发布到网站首页少于150字的随笔不允许发布到网站首页少于150字的随笔不允许发布到网站首页少于150字的随笔不允许发布到网站首页少于150字的随笔不允许发布到网站首页少于150字的随笔不允许发布到网站首页少于150字的随笔不允许发布到网站 Read More
posted @ 2019-11-01 15:47 PythonNew_Mr.Wang Views(542) Comments(0) Diggs(0) Edit
凑字数: MD5信息摘要算法(英语:MD5 Message-Digest Algorithm),一种被广泛使用的密码散列函数,可以产生出一个128位(16字节)的散列值(hash value),用于确保信息传输完整一致。MD5由美国密码学家罗纳德·李维斯特(Ronald Linn Rivest)设计 Read More
posted @ 2019-10-16 22:20 PythonNew_Mr.Wang Views(476) Comments(0) Diggs(0) Edit
字典也是 Python 提供的一种常用的数据结构,它用于存放具有映射关系的数据。 比如有份成绩表数据,语文:79,数学:80,英语:92,这组数据看上去像两个列表,但这两个列表的元素之间有一定的关联关系。如果单纯使用两个列表来保存这组数据,则无法记录两组数据之间的关联关系。由于字典中的 key 是非 Read More
posted @ 2019-10-10 17:11 PythonNew_Mr.Wang Views(191) Comments(0) Diggs(0) Edit
1:单例模式原理 大道理:希望在系统中某个对象只能存在一个,单例模式是最好的解决方案,单例模式是一种常见的软件设置模式,在它的核心结构中只包含一个被称为单例类的特殊类,通过单例模式可以保证系统中的一个类只有一个实例而且该实例易于外界访问,从而方便对实例个数的控制并节约系统资源 单例模式的要点有三类 Read More
posted @ 2019-10-10 16:46 PythonNew_Mr.Wang Views(132) Comments(0) Diggs(0) Edit