07 2020 档案

摘要:1 """验证器""" 2 import sys 3 from PyQt5.QtWidgets import QApplication, QLineEdit, QWidget, QFormLayout 4 from PyQt5.QtGui import QIntValidator, QDoubleV 阅读全文
posted @ 2020-07-31 15:21 胸怀丶若谷 阅读(307) 评论(0) 推荐(0) 编辑
摘要:1 import sys 2 from PyQt5.QtWidgets import QApplication, QLineEdit, QWidget, QFormLayout 3 4 class lineEditDemo(QWidget): 5 def __init__(self): 6 supe 阅读全文
posted @ 2020-07-30 17:42 胸怀丶若谷 阅读(497) 评论(0) 推荐(0) 编辑
摘要:QLineEdit类是一个单行文本框控件,可以输入单行字符串,如果需要输入多行字符串,使用QTextEdit类。 QLineEdit类中的常用方法: setAkignment(): 按固定值方式对齐文本: Qt.AlignLeft,水平方向靠左对齐。 Qt.AlignRight,水平方向靠右对齐 Q 阅读全文
posted @ 2020-07-30 17:27 胸怀丶若谷 阅读(595) 评论(0) 推荐(0) 编辑
摘要:1 from PyQt5.QtWidgets import * 2 import sys 3 4 class QlabelDemo(QDialog): 5 def __init__(self): 6 super().__init__() 7 8 self.setWindowTitle('QLabel 阅读全文
posted @ 2020-07-30 16:57 胸怀丶若谷 阅读(674) 评论(0) 推荐(1) 编辑
摘要:1 from PyQt5.QtWidgets import QApplication, QLabel, QWidget, QVBoxLayout 2 from PyQt5.QtCore import Qt 3 from PyQt5.QtGui import QPixmap, QPalette 4 i 阅读全文
posted @ 2020-07-30 15:19 胸怀丶若谷 阅读(167) 评论(0) 推荐(0) 编辑
摘要:setAlignment: 按固定值方式对齐文本 Qt.AlignLeft:水平方向靠左对齐 Qt.AlignRight:水平方向靠右对齐 Qt.AlignCenter:水平方向居中对齐 Qt.AlignJustify:水平方向调整间距两端对齐 Qt.AlignTop:垂直方向靠上对齐 Qt.Ali 阅读全文
posted @ 2020-07-30 14:43 胸怀丶若谷 阅读(1315) 评论(0) 推荐(0) 编辑
摘要:1 """设置一个气泡提示""" 2 3 import sys 4 from PyQt5.QtWidgets import QWidget, QToolTip, QApplication 5 from PyQt5.QtGui import QFont 6 7 class Winform(QWidge 阅读全文
posted @ 2020-07-30 14:28 胸怀丶若谷 阅读(125) 评论(0) 推荐(0) 编辑
摘要:import sys from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QWidget, QApplication # 创建一个Icon类,继承Qwidget类 class Icon(QWidget): def __init__(se 阅读全文
posted @ 2020-07-30 14:16 胸怀丶若谷 阅读(201) 评论(0) 推荐(0) 编辑
摘要:1 """关闭主窗口""" 2 3 from PyQt5.QtWidgets import QMainWindow, QHBoxLayout, QPushButton, QApplication, QWidget 4 import sys 5 6 class WinForm(QMainWindow) 阅读全文
posted @ 2020-07-30 14:15 胸怀丶若谷 阅读(111) 评论(0) 推荐(0) 编辑
摘要:1 """主窗口居中""" 2 from PyQt5.QtWidgets import QDesktopWidget, QApplication, QMainWindow 3 import sys 4 5 class Winform(QMainWindow): 6 7 def __init__(se 阅读全文
posted @ 2020-07-30 14:06 胸怀丶若谷 阅读(160) 评论(0) 推荐(0) 编辑
摘要:1 """创建主窗口""" 2 import sys 3 from PyQt5.QtWidgets import QMainWindow, QApplication 4 from PyQt5.QtGui import QIcon 5 6 class MainWindow(QMainWindow): 阅读全文
posted @ 2020-07-30 14:02 胸怀丶若谷 阅读(179) 评论(0) 推荐(0) 编辑
摘要:1 import sys 2 from PyQt5.QtWidgets import QApplication,QWidget,QPushButton 3 4 app = QApplication(sys.argv) 5 widget = QWidget() 6 btn = QPushButton( 阅读全文
posted @ 2020-07-30 14:00 胸怀丶若谷 阅读(255) 评论(0) 推荐(0) 编辑
摘要:QWidget有两种常用的几何结构: 1.不包含外边各种边框的几何结构。 一般情况下,不包含边框的部分是客户区,这里面就i是我们正常操作的地方,可以添加子控件。这部分是一个长方形,会有大小和位置。大小是指宽度和高度;位置就是指这个长方形在屏幕上的位置。在Qt中保存的这个长方形使用的是QRect类,这 阅读全文
posted @ 2020-07-30 13:46 胸怀丶若谷 阅读(174) 评论(0) 推荐(0) 编辑
摘要:PyQt使用统一的坐标系统来定位窗口空间的位置和大小。左上角为原点(0,0). 阅读全文
posted @ 2020-07-30 13:24 胸怀丶若谷 阅读(127) 评论(0) 推荐(0) 编辑
摘要:方法和描述 addToolBar():添加工具栏 centralWidget():返回窗口中心的一个空间,未设置时返回NULL menuBar(): 返回主窗口的菜单栏 setCentralWidget():设置窗口中心的控件 setStausBar(): 设置状态栏 statusBar():获得状 阅读全文
posted @ 2020-07-30 10:56 胸怀丶若谷 阅读(123) 评论(0) 推荐(0) 编辑
摘要:QMainWindow、QWidgwt和QDialog三个类都是用来创建窗口的,可以直接使用,也可以继承后再使用。 QMainWindow窗口可以包含菜单栏、工具栏、状态栏、标题栏等。是最常见的窗口像是。 QDialog是对话窗口的基类。对话框主要用来执行短期任务,或者与用户进行互动。 如何使用: 阅读全文
posted @ 2020-07-30 10:39 胸怀丶若谷 阅读(535) 评论(0) 推荐(0) 编辑
摘要:# 设置单元格格式 # 日期所在的列 datelist = [16, 17, 18] for row in range(2, rows3 + 1): for column in datelist: datevalue = ws.cell(row=row, column=column).value # 阅读全文
posted @ 2020-07-28 10:57 胸怀丶若谷 阅读(267) 评论(0) 推荐(0) 编辑
摘要:把字符串转换成日期 import datetime #引入datetime模块 time= datetime.strptime('2018-4-19 11:19:59','%Y-%m-%d %H:%M:%S') #把字符串转换成时间 print time #输出时间信息 把日期转换成字符串 impo 阅读全文
posted @ 2020-07-28 09:09 胸怀丶若谷 阅读(86) 评论(0) 推荐(0) 编辑
摘要:objectName,控件对象名称。 ● geometry,相对坐标系。 ● sizePolicy,控件大小策略。 ● minimumSize,最小宽度、高度。 ● maximumSize,最大宽度、高度。如果想让窗口或控件的大小固定,则可以将minimumSize和maximumSize这两个属性 阅读全文
posted @ 2020-07-25 17:49 胸怀丶若谷 阅读(597) 评论(0) 推荐(0) 编辑
摘要:bool = ExcelDataStr.str.contains("Item No./Customer/Saler") # 初始位置:initial position, 终位置:end position initial_position = ExceclData[bool].index.tolist 阅读全文
posted @ 2020-07-23 15:22 胸怀丶若谷 阅读(1303) 评论(0) 推荐(0) 编辑
摘要:在access中like用法中的%号应改为* 阅读全文
posted @ 2020-07-23 15:20 胸怀丶若谷 阅读(1500) 评论(0) 推荐(0) 编辑
摘要:cmd下执行 你的路径\AccessDatabaseEngine.exe /quiet 转载于:https://www.cnblogs.com/64mb/p/10844676.html 阅读全文
posted @ 2020-07-22 16:57 胸怀丶若谷 阅读(4824) 评论(0) 推荐(0) 编辑
摘要:问题: 我们需要在字符串的开头或结尾处按照指定的文本模式做检查,例如检查文件的扩展名、URL协议类型等。 解决方案: 有一种简单的方法可用来检查字符串的开头或结尾,只要使用str.startswith()和str.endswith()方法就可以了 1 filename = 'spam.txt' 2 阅读全文
posted @ 2020-07-20 14:17 胸怀丶若谷 阅读(411) 评论(0) 推荐(0) 编辑
摘要:re.split()是很有用的,因为可以为分隔符指定多个模式。例如,在上面的解决方案中,分隔符可以是逗号、分号或者是空格符(后面可跟着任意数量的额外空格)。只要找到了对应的模式,无论匹配点的两端是什么字段,整个匹配的结果就成为那个分隔符。最终得到的结果是字段列表,同str.split()得到的结果一 阅读全文
posted @ 2020-07-20 11:29 胸怀丶若谷 阅读(247) 评论(0) 推荐(0) 编辑
摘要:print 非格式,打印变量的值,不换行 printf 支持格式化输出,不换行 println 非格式,打印变量的值 ,换行 阅读全文
posted @ 2020-07-17 16:21 胸怀丶若谷 阅读(239) 评论(0) 推荐(0) 编辑
摘要:1 package main 2 3 import "fmt" 4 5 func swap(x, y string) (string, string){ 6 return y,x 7 } 8 9 func main() { 10 a, b := swap("Google", "Runoob") 11 阅读全文
posted @ 2020-07-17 15:53 胸怀丶若谷 阅读(998) 评论(0) 推荐(0) 编辑
摘要:package main import "fmt" func main() { /* 定义局部变量 */ var a int = 100 var b int = 200 var ret int /* 调用函数并返回最大值 */ ret = max(a, b) fmt.Printf( "最大值是 : 阅读全文
posted @ 2020-07-17 15:45 胸怀丶若谷 阅读(129) 评论(0) 推荐(0) 编辑
摘要:格式: 1 func function_name( [parameter list] ) [return_types] { 2 函数体 3 } 注释: func:函数由 func 开始声明 function_name:函数名称,函数名和参数列表一起构成了函数签名。 parameter list:参数 阅读全文
posted @ 2020-07-17 15:42 胸怀丶若谷 阅读(429) 评论(0) 推荐(0) 编辑
摘要:运算符描述实例 & 按位与运算符"&"是双目运算符。 其功能是参与运算的两数各对应的二进位相与。 (A & B) 结果为 12, 二进制为 0000 1100 | 按位或运算符"|"是双目运算符。 其功能是参与运算的两数各对应的二进位相或 (A | B) 结果为 61, 二进制为 0011 1101 阅读全文
posted @ 2020-07-17 15:30 胸怀丶若谷 阅读(220) 评论(0) 推荐(0) 编辑
摘要:与:&& 或:|| 非:! 阅读全文
posted @ 2020-07-17 15:28 胸怀丶若谷 阅读(209) 评论(0) 推荐(0) 编辑
摘要:注释 注释不会被编译,每一个包应该有相关注释。 单行注释是最常见的注释形式,你可以在任何地方使用以 // 开头的单行注释。多行注释也叫块注释,均已以 /* 开头,并以 */ 结尾。 字符串连接 Go 语言的字符串可以通过 + 实现 阅读全文
posted @ 2020-07-17 09:50 胸怀丶若谷 阅读(102) 评论(0) 推荐(0) 编辑
摘要:1 package main 2 3 import ( 4 "fmt" 5 "os" 6 ) 7 8 //判断文件夹是否存在 9 func PathExists(path string) (bool, error){ 10 _, err := os.Stat(path) 11 if err == n 阅读全文
posted @ 2020-07-16 09:36 胸怀丶若谷 阅读(2636) 评论(0) 推荐(0) 编辑
摘要:go run:编译并运行程序,但不会产生exe文件,运行速度也相应较慢 go build : 会产生exe文件,运行速度快 阅读全文
posted @ 2020-07-15 14:58 胸怀丶若谷 阅读(1029) 评论(0) 推荐(0) 编辑
摘要:build: 编译包和依赖 clean: 移除对象文件 doc: 显示包或者符号的文档 env: 打印go的环境信息 bug: 启动错误报告 fix: 运行go tool fix fmt: 运行gofmt进行格式化 generate: 从processing source生成go文件 get: 下载 阅读全文
posted @ 2020-07-15 14:55 胸怀丶若谷 阅读(96) 评论(0) 推荐(0) 编辑
摘要:df = df[df['my_col'].notnull()] 阅读全文
posted @ 2020-07-10 16:24 胸怀丶若谷 阅读(4621) 评论(0) 推荐(0) 编辑
摘要:1 import tkinter as tk 2 root = tk.Tk() 3 root.withdraw() 阅读全文
posted @ 2020-07-10 09:59 胸怀丶若谷 阅读(176) 评论(0) 推荐(0) 编辑
摘要:# 统一表格样式 rows = ws.max_row columns = ws.max_column # print(rows) # print(columns) for row in range(1, rows+1): for column in range(1, columns+1): ws.c 阅读全文
posted @ 2020-07-10 09:49 胸怀丶若谷 阅读(654) 评论(0) 推荐(0) 编辑
摘要:文章参考: https://hant-kb.kutu66.com/others/post_13460379 在浏览器设置参数时加入如下两行代码 1 # 取消沙盒模式 2 options.add_argument("--no-sandbox") 3 # 这一行我也不清楚 4 options.add_a 阅读全文
posted @ 2020-07-10 09:11 胸怀丶若谷 阅读(668) 评论(0) 推荐(0) 编辑
摘要:1 # 边框线 2 border_set = Border(left=Side(border_style='thin', color='000000'), 3 right=Side(border_style='thin', color='000000'), 4 top=Side(border_sty 阅读全文
posted @ 2020-07-10 09:06 胸怀丶若谷 阅读(3590) 评论(0) 推荐(0) 编辑
摘要:df[df['列的字段名'].isnull()] 阅读全文
posted @ 2020-07-06 15:59 胸怀丶若谷 阅读(1840) 评论(0) 推荐(0) 编辑
摘要:Ctrl+p 查看参数 Ctrl+r 替换当前文件中的文本 阅读全文
posted @ 2020-07-01 08:31 胸怀丶若谷 阅读(143) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示