pyqt实战-软件通用界面设计模板样例

news/2024/11/28 7:25:06/

软件界面在这里插入图片描述

技术点

  • 无边框设计
  • 自定义右上角最大化,最小化,关闭按钮
  • 界面布局能够自适应界面的放大缩小
  • 按住鼠标左键能够拖动整个界面
  • treewidget整体风格设计
    在这里插入图片描述

代码

import sysfrom PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.Qt import *
import time
import os
import datetimeclass Window(QWidget):def __init__(self, *args, **kwargs):super().__init__(*args, **kwargs)"""界面基本设置"""self.setWindowFlags(Qt.FramelessWindowHint)  # 设置了无边框的Flagself.resize(1920, 1080)self.move(400, 240)# self.setWindowOpacity(0.85)  # 设置不透明度# self.setWindowTitle("windowtitle")"""主窗口水平布局,后面定义的控件才能显示"""self.horizontalLayout_window = QtWidgets.QHBoxLayout(self)self.horizontalLayout_window.setContentsMargins(1, 1, 1, 1)self.horizontalLayout_window.setSpacing(1)self.horizontalLayout_window.setObjectName("horizontalLayout_window")# self.setWindowIcon(QIcon("../Icons/snowflake_128px.ico"))"""右上角三个功能按钮的参数"""self.top_margin = 1  # 三个按钮距离顶部的距离self.btn_w = 32  # 按钮宽度self.btn_h = 32  # 按钮高度"""右上角三个功能按钮的图片路径"""self.BASE_DIR=os.path.dirname(sys.argv[0])self.close_path=self.BASE_DIR+'/resource/icon/close.png'self.max_path=self.BASE_DIR+'/resource/icon/max.png'self.min_path=self.BASE_DIR+'/resource/icon/min.png'self.restore_path=self.BASE_DIR+'/resource/icon/restore.png'self.setup_ui()def setup_ui(self):"""在窗口的右上角添加关闭、最大化、最小化 三个按钮"""self.close_btn = QPushButton(self)  self.close_btn.setIcon(QIcon(self.close_path))self.close_btn.setIconSize(self.close_btn.iconSize())self.close_btn.resize(self.btn_w, self.btn_h)self.max_btn = QPushButton(self)  self.max_btn.setIcon(QIcon(self.max_path))self.max_btn.setIconSize(self.max_btn.iconSize())self.max_btn.resize(self.btn_w, self.btn_h)self.mini_btn = QPushButton(self)  self.mini_btn.setIcon(QIcon(self.min_path))self.mini_btn.setIconSize(self.mini_btn.iconSize())self.mini_btn.resize(self.btn_w, self.btn_h)# 监听按钮,连接信号与槽def max_normal():if self.isMaximized():self.max_btn.setIcon(QIcon(self.max_path))self.showNormal()else:self.showMaximized()self.max_btn.setIcon(QIcon(self.restore_path))self.max_btn.pressed.connect(max_normal)self.close_btn.pressed.connect(lambda: self.close())self.mini_btn.pressed.connect(lambda: self.showMinimized())"""自定义treewidget滚动条样式"""def custom_scrollbar(widget):# 设置滚动条的样式# widget.setStyle(QStyleFactory.create('Fusion'))# 为滚动条设置样式scrollBar = widget.verticalScrollBar()# scrollBar = widget.horizontalScrollBar()scrollBar.setStyleSheet("""QScrollBar:vertical {border-width: 0px;border: none;background:rgba(64, 65, 79, 0);width:12px;margin: 0px 0px 0px 0px;}QScrollBar::handle:vertical {background: qlineargradient(x1:0, y1:0, x2:1, y2:0,stop: 0 #aaaaff, stop: 0.5 #aaaaff, stop:1 #aaaaff);min-height: 20px;max-height: 20px;margin: 0 0px 0 0px;border-radius: 6px;}QScrollBar::add-line:vertical {background: qlineargradient(x1:0, y1:0, x2:1, y2:0,stop: 0 rgba(64, 65, 79, 0), stop: 0.5 rgba(64, 65, 79, 0),  stop:1 rgba(64, 65, 79, 0));height: 0px;border: none;subcontrol-position: bottom;subcontrol-origin: margin;}QScrollBar::sub-line:vertical {background: qlineargradient(x1:0, y1:0, x2:1, y2:0,stop: 0  rgba(64, 65, 79, 0), stop: 0.5 rgba(64, 65, 79, 0),  stop:1 rgba(64, 65, 79, 0));height: 0 px;border: none;subcontrol-position: top;subcontrol-origin: margin;}QScrollBar::sub-page:vertical {background: rgba(64, 65, 79, 0);}QScrollBar::add-page:vertical {background: rgba(64, 65, 79, 0);}""")"""设定widget_main"""self.widget_main = QtWidgets.QWidget(self)self.widget_main.setObjectName("widget_main")"""widget_main定义水平布局"""self.horizontalLayout_widget_main = QtWidgets.QHBoxLayout(self.widget_main)self.horizontalLayout_widget_main.setContentsMargins(0, 0, 0, 0)self.horizontalLayout_widget_main.setSpacing(0)self.horizontalLayout_widget_main.setObjectName("horizontalLayout_widget_main")"""widget_main中设定widget_left"""self.widget_left = QtWidgets.QWidget(self.widget_main)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)sizePolicy.setHorizontalStretch(1)sizePolicy.setVerticalStretch(0)sizePolicy.setHeightForWidth(self.widget_left.sizePolicy().hasHeightForWidth())self.widget_left.setSizePolicy(sizePolicy)self.widget_left.setMaximumSize(QtCore.QSize(500, 16777215))self.widget_left.setStyleSheet("background-color: rgb(240, 243, 246);")self.widget_left.setObjectName("widget_left")"""widget_left定义垂直布局"""self.verticalLayout_widget_left = QtWidgets.QVBoxLayout(self.widget_left)self.verticalLayout_widget_left.setObjectName("verticalLayout_widget_left")"""widget_main中设定widget_right"""self.widget_right = QtWidgets.QWidget(self.widget_main)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)sizePolicy.setHorizontalStretch(2)sizePolicy.setVerticalStretch(0)sizePolicy.setHeightForWidth(self.widget_right.sizePolicy().hasHeightForWidth())self.widget_right.setSizePolicy(sizePolicy)# self.widget_right.setStyleSheet("background-color: rgb(240, 243, 246);border:2px solid red;")self.widget_right.setObjectName("widget_right")"""widget_right中定义垂直布局"""self.verticalLayout_widget_right = QtWidgets.QVBoxLayout(self.widget_right)self.verticalLayout_widget_right.setContentsMargins(0, 0, 0, 0)self.verticalLayout_widget_right.setSpacing(1)self.verticalLayout_widget_right.setObjectName("verticalLayout_widget_right")"""widget_left中设定widget_left_top"""   self.widget_left_top = QtWidgets.QWidget(self.widget_left)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(1)sizePolicy.setHeightForWidth(self.widget_left_top.sizePolicy().hasHeightForWidth())# self.widget_left_top.setStyleSheet("background-color: rgb(240, 243, 246);border:2px solid red;")self.widget_left_top.setSizePolicy(sizePolicy)self.widget_left_top.setMaximumSize(QtCore.QSize(16777215, 150))self.widget_left_top.setObjectName("widget_left_top")"""widget_right中设定软件标题"""   self.label_tool_name = QtWidgets.QLabel(self.widget_left_top)self.label_tool_name.setGeometry(QtCore.QRect(70, 10, 153, 19))self.label_tool_name.setStyleSheet("font: 75 13pt \"Arial\";")self.label_tool_name.setAlignment(QtCore.Qt.AlignCenter)self.label_tool_name.setObjectName("label_tool_name")self.label_tool_name.setText("音乐播放器")self.label_tool_name.adjustSize()self.label_tool_version = QtWidgets.QLabel(self.widget_left_top)self.label_tool_version.setGeometry(QtCore.QRect(130, 70, 24, 20))self.label_tool_version.setStyleSheet("font: 6pt \"Arial\";")self.label_tool_version.setAlignment(QtCore.Qt.AlignCenter)self.label_tool_version.setObjectName("label_tool_version")self.label_tool_version.setText("V1.0.1")self.label_tool_version.adjustSize()"""widget_left中设定widget_left_bottom"""   self.widget_left_bottom = QtWidgets.QWidget(self.widget_left)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(4)sizePolicy.setHeightForWidth(self.widget_left_bottom.sizePolicy().hasHeightForWidth())self.widget_left_bottom.setSizePolicy(sizePolicy)self.widget_left_bottom.setObjectName("widget_left_bottom")self.horizontalLayout_widget_left_bottom = QtWidgets.QHBoxLayout(self.widget_left_bottom)# self.widget_left_bottom.setStyleSheet("background-color: rgb(240, 243, 246);border:2px solid red;")self.horizontalLayout_widget_left_bottom.setContentsMargins(0, 0, 0, 0)self.horizontalLayout_widget_left_bottom.setSpacing(0)self.horizontalLayout_widget_left_bottom.setObjectName("horizontalLayout_widget_left_bottom")"""widget_left_bottom中设定treewidget"""  self.treeWidget_section = QtWidgets.QTreeWidget(self.widget_left_bottom)self.treeWidget_section.setStyleSheet("border:no;")self.treeWidget_section.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)self.treeWidget_section.setObjectName("treeWidget_section")self.treeWidget_section.setColumnCount(1)  # 设置列数self.treeWidget_section.headerItem().setHidden(True)  # 隐藏头部项font = QtGui.QFont()font.setPointSize(13)self.treewidget_music= QTreeWidgetItem(self.treeWidget_section)self.treewidget_music.setText(0,'音乐')self.treewidget_music.setCheckState(0, Qt.Checked)self.treewidget_music.setFont(0, font)self.treewidget_music.setExpanded(True)self.treewidget_music_1_ = QTreeWidgetItem(self.treewidget_music)self.treewidget_music_1_.setText(0,'民谣')self.treewidget_music_2 = QTreeWidgetItem(self.treewidget_music)self.treewidget_music_2.setText(0,'流行')self.treewidget_music_3 = QTreeWidgetItem(self.treewidget_music)self.treewidget_music_3.setText(0,'怀旧')self.treewidget_collection= QTreeWidgetItem(self.treeWidget_section)self.treewidget_collection.setText(0,'收藏')self.treewidget_collection.setCheckState(0, Qt.Checked)self.treewidget_collection.setFont(0, font)self.treewidget_collection.setExpanded(True)self.treewidget_collection_1 = QTreeWidgetItem(self.treewidget_collection)self.treewidget_collection_1.setText(0,'周伦')self.treewidget_collection_1.setExpanded(True)self.treewidget_collection_1_1 = QTreeWidgetItem(self.treewidget_collection_1)self.treewidget_collection_1_1.setText(0,'1. 八里香')self.treewidget_collection_1_2 = QTreeWidgetItem(self.treewidget_collection_1)self.treewidget_collection_1_2.setText(0,'2. 半岛铝盒')self.treewidget_collection_1_3 = QTreeWidgetItem(self.treewidget_collection_1)self.treewidget_collection_1_3.setText(0,'3. 麦香')self.treewidget_collection_2 = QTreeWidgetItem(self.treewidget_collection)self.treewidget_collection_2.setText(0,'六月天')self.treewidget_collection_2.setExpanded(True)self.treewidget_collection_2_1 = QTreeWidgetItem(self.treewidget_collection_2)self.treewidget_collection_2_1.setText(0,'1. 不倔强')self.treewidget_collection_2_2 = QTreeWidgetItem(self.treewidget_collection_2)self.treewidget_collection_2_2.setText(0,'2. 不温柔')self.treewidget_collection_2_3 = QTreeWidgetItem(self.treewidget_collection_2)self.treewidget_collection_2_3.setText(0,'3. 离开土星表面')self.treewidget_setting= QTreeWidgetItem(self.treeWidget_section)self.treewidget_setting.setText(0,'设置')self.treewidget_setting.setCheckState(0, Qt.Checked)self.treewidget_setting.setFont(0, font)self.treewidget_setting.setExpanded(True)self.treewidget_setting_1 = QTreeWidgetItem(self.treewidget_setting)self.treewidget_setting_1.setText(0,'用户信息')self.treewidget_setting_1.setForeground(0,QColor(100,150,50))self.treewidget_setting_1.setExpanded(True)self.treewidget_setting_1_1 = QTreeWidgetItem(self.treewidget_setting_1)self.treewidget_setting_1_1.setText(0,'1. 基本信息')self.treewidget_setting_1_2 = QTreeWidgetItem(self.treewidget_setting_1)self.treewidget_setting_1_2.setText(0,'2. 头像')self.treewidget_setting_2 = QTreeWidgetItem(self.treewidget_setting)self.treewidget_setting_2.setText(0,'软件设置')self.treewidget_setting_2.setExpanded(True)self.treewidget_setting_2_1 = QTreeWidgetItem(self.treewidget_setting_2)self.treewidget_setting_2_1.setText(0,'1. 常规')self.treewidget_setting_2_2 = QTreeWidgetItem(self.treewidget_setting_2)self.treewidget_setting_2_2.setText(0,'2. 系统')"""给treewidget设定自定义滚动条"""  custom_scrollbar(self.treeWidget_section)self.horizontalLayout_widget_left_bottom.addWidget(self.treeWidget_section)"""widget_right中设定widget_right_top"""     self.widget_right_top = QtWidgets.QWidget(self.widget_right)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(2)sizePolicy.setHeightForWidth(self.widget_right_top.sizePolicy().hasHeightForWidth())# self.widget_right_top.setStyleSheet("background-color: rgb(240, 243, 246);border:2px solid red;")self.widget_right_top.setSizePolicy(sizePolicy)self.widget_right_top.setStyleSheet("background-color: rgb(247, 249, 252);")self.widget_right_top.setObjectName("widget_right_top")"""widget_right_top中设定垂直布局"""    self.verticalLayout_widget_right_top = QtWidgets.QVBoxLayout(self.widget_right_top)self.verticalLayout_widget_right_top.setObjectName("verticalLayout_widget_right_top")self.label_latest = QtWidgets.QLabel(self.widget_right_top)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(1)sizePolicy.setHeightForWidth(self.label_latest.sizePolicy().hasHeightForWidth())self.label_latest.setSizePolicy(sizePolicy)self.label_latest.setStyleSheet("font: 75 13pt \"Arial\";")self.label_latest.setObjectName("label_latest")self.label_latest.setText(" 最新音乐")self.verticalLayout_widget_right_top.addWidget(self.label_latest)self.textEdit_latest = QtWidgets.QTextEdit(self.widget_right_top)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(10)sizePolicy.setHeightForWidth(self.textEdit_latest.sizePolicy().hasHeightForWidth())self.textEdit_latest.setSizePolicy(sizePolicy)self.textEdit_latest.setStyleSheet("font: 9pt \"Arial\";")self.textEdit_latest.setObjectName("textEdit_latest")self.verticalLayout_widget_right_top.addWidget(self.textEdit_latest)self.label_hot = QtWidgets.QLabel(self.widget_right_top)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(1)sizePolicy.setHeightForWidth(self.label_hot.sizePolicy().hasHeightForWidth())self.label_hot.setSizePolicy(sizePolicy)self.label_hot.setStyleSheet("font: 75 13pt \"Arial\";")self.label_hot.setObjectName("label_hot")self.label_hot.setText(" 热门推荐")self.verticalLayout_widget_right_top.addWidget(self.label_hot)self.textEdit_hot = QtWidgets.QTextEdit(self.widget_right_top)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(10)sizePolicy.setHeightForWidth(self.textEdit_hot.sizePolicy().hasHeightForWidth())self.textEdit_hot.setSizePolicy(sizePolicy)self.textEdit_hot.setStyleSheet("font: 9pt \"Arial\";")self.textEdit_hot.setObjectName("textEdit_hot")self.verticalLayout_widget_right_top.addWidget(self.textEdit_hot)"""widget_right中设定widget_right_bottom"""   self.widget_right_bottom = QtWidgets.QWidget(self.widget_right)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(1)# self.widget_right_bottom.setStyleSheet("background-color: rgb(240, 243, 246);border:2px solid red;")sizePolicy.setHeightForWidth(self.widget_right_bottom.sizePolicy().hasHeightForWidth())self.widget_right_bottom.setSizePolicy(sizePolicy)self.widget_right_bottom.setMaximumSize(QtCore.QSize(16777215, 300))self.widget_right_bottom.setStyleSheet("background-color: rgb(247, 249, 252);")self.widget_right_bottom.setObjectName("widget_right_bottom")self.label_operation = QtWidgets.QLabel(self.widget_right_bottom)self.label_operation.setGeometry(QtCore.QRect(18, 0, 151, 41))self.label_operation.setStyleSheet("font: 75 13pt \"Arial\";")self.label_operation.setObjectName("label_operation")self.label_operation.setText("Operation")self.label_operation.adjustSize()font_operation = QtGui.QFont()font_operation.setFamily("Arial")self.pushButton_play = QtWidgets.QPushButton(self.widget_right_bottom)self.pushButton_play.setGeometry(QtCore.QRect(80, 120, 200, 60))self.pushButton_play.setStyleSheet("QPushButton{color: #606266;background-color: #fff; border: 1px solid #dcdfe6;}\n""QPushButton:hover{color: #409eff;border-color: #c6e2ff;background-color: #ecf5ff}\n""QPushButton:checked{color: #409eff;border-color: #c6e2ff;background-color: #ecf5ff;}\n""QPushButton:pressed{color: #3a8ee6;border-color: #3a8ee6;background-color: #ecf5ff;}\n""")self.pushButton_play.setText('播放')self.pushButton_play.setObjectName("pushButton_play")self.pushButton_next = QtWidgets.QPushButton(self.widget_right_bottom)self.pushButton_next.setGeometry(QtCore.QRect(620, 120, 200, 60))self.pushButton_next.setStyleSheet("QPushButton{color: #606266;background-color: #fff; border: 1px solid #dcdfe6;}\n""QPushButton:hover{color: #409eff;border-color: #c6e2ff;background-color: #ecf5ff}\n""QPushButton:checked{color: #409eff;border-color: #c6e2ff;background-color: #ecf5ff;}\n""QPushButton:pressed{color: #3a8ee6;border-color: #3a8ee6;background-color: #ecf5ff;}\n""")self.pushButton_next.setText('下一首')self.pushButton_next.setObjectName("pushButton_next")self.pushButton_play.setFont(font_operation)self.pushButton_next.setFont(font_operation)self.pushButton_next.setEnabled(False)self.comboBox_list = QtWidgets.QComboBox(self.widget_right_bottom)self.comboBox_list.setGeometry(QtCore.QRect(350, 120, 200, 60))self.comboBox_list.setFont(font_operation)self.comboBox_list.setStyleSheet(" QComboBox {\n"
"                border: 1px solid #C2C7CB;\n"
"                border-radius: 4px;\n"
"                padding: 1px 18px 1px 3px;\n"
"                background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n"
"                                                 stop: 0 #F7F7F7, stop: 1 #E3E3E3);\n"
"            }\n"
"            QComboBox::drop-down {\n"
"                subcontrol-origin: padding;\n"
"                subcontrol-position: top right;\n"
"                width: 20px;\n"
"                border-left-width: 1px;\n"
"                border-left-color: darkgray;\n"
"                border-left-style: solid;\n"
"                background-color: #D2D7D3;\n"
"            }\n"
# "            QComboBox::down-arrow {\n"
# "                image: url(C:/Users/xt2/Downloads/down_arrow.png);\n"
# "            }\n"
"            QComboBox::editable {\n"
"                background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n"
"                                                 stop: 0 #F7F7F7, stop: 1 #E3E3E3);\n"
"            }")self.comboBox_list.setObjectName("comboBox_list")self.comboBox_list.addItem("播放列表")self.comboBox_list.addItem("播放列表1")self.comboBox_list.addItem("播放列表2")self.horizontalLayout_window.addWidget(self.widget_main)self.horizontalLayout_widget_main.addWidget(self.widget_left)self.horizontalLayout_widget_main.addWidget(self.widget_right)self.verticalLayout_widget_left.addWidget(self.widget_left_top)self.verticalLayout_widget_left.addWidget(self.widget_left_bottom)self.verticalLayout_widget_right.addWidget(self.widget_right_top)self.verticalLayout_widget_right.addWidget(self.widget_right_bottom)"""右上角最大,最小,还原三个按钮置顶"""self.close_btn.raise_()self.max_btn.raise_()self.mini_btn.raise_()def resizeEvent(self, a0: QtGui.QResizeEvent) -> None:"""当窗口大小改变时,重新移动三个按钮的位置"""self.close_btn.move(self.width() - self.btn_w, self.top_margin)self.max_btn.move(self.width() - self.btn_w * 2, self.top_margin)self.mini_btn.move(self.width() - self.btn_w * 3, self.top_margin)def mousePressEvent(self, evt):# print("鼠标按下")if evt.button() == Qt.LeftButton:  # 仅在鼠标左键按下时可以拖动self.move_flag = True  # 设置一个标记,确保只有在执行 mousePressEvent之后才会执行 mouseMoveEvent# 确定两个点(鼠标第一次按下的点,窗口当前所在的原始点)self.mouse_x = evt.globalX()self.mouse_y = evt.globalY()# print(self.mouse_x, self.mouse_y)self.origen_x = self.x()self.origen_y = self.y()def mouseMoveEvent(self, evt) -> None:if self.move_flag:# print(evt.globalX(), evt.globalY())# 计算的是移动向量move_x = evt.globalX() - self.mouse_xmove_y = evt.globalY() - self.mouse_ydest_x = self.origen_x + move_xdest_y = self.origen_y + move_yself.move(dest_x, dest_y)def mouseReleaseEvent(self, a0: QtGui.QMouseEvent) -> None:self.move_flag = False  # 鼠标释放后重置标记,避免无法释放拖动app = QApplication(sys.argv)window = Window()
window.show()sys.exit(app.exec_())

http://www.ppmy.cn/news/1418592.html

相关文章

第二届数据安全大赛暨首届“数信杯”数据安全大赛数据安全积分争夺赛-东区预赛wp

附件下载地址: 链接:https://pan.baidu.com/s/1tClZrup28n4fUe5Kpa7mgQ?pwdkbd6 文章目录 数据安全题re_ds001Homooo0 数据分析题数据分析1-1数据分析1-2数据分析1-3数据分析2-1数据分析2-2数据分析2-3数据分析3-1数据分析3-2数据分析3-3数据分析5-1数据…

Kali使用工具命令解读与方法

注意:网络安全法 ,本文仅供个人学习参考 中华人民共和国网络安全法_滚动新闻_中国政府网 1、不恶意破坏任何的系统,这样只会给你带来麻烦。恶意破坏他人的软件将导致法律责任,如果你只是使用电脑,那仅为非法使用!注意:千万不要破坏别人的软件或资料!2、不修改任何的系…

196算法之谜在 JSP 中使用内置对象 request 获取 form 表单的文本框 text 提交的数据。

(1)编写 inputNumber . jsp ,该页面提供一个 form 表单,该 form 表单提供一个文本框 text ,用于用户输入一个正整数,用户在 form 表单中输入的数字,单击 submit 提交键将正整数提交给 huiwenNumber . jsp 页…

HDFS Java客户端Daemon

HDFS Java客户端Daemon 1.简单介绍 1.1.pom依赖 比较老的版本 <dependencyManagement><dependencies><dependency><groupId>org.apache.hadoop</groupId><artifactId>hadoop-common</artifactId><version>2.8.4</versi…

为什么要部署IP SSL证书?怎么申请?

我们需要知道什么是IP SSL证书。SSL&#xff0c;全称为Secure Sockets Layer&#xff0c;即安全套接层&#xff0c;是为网络通信提供安全及数据完整性的一种安全协议。而IP SSL证书就是基于SSL协议的一种证书&#xff0c;它能够为网站和用户的数据传输提供加密处理&#xff0c;…

1.9 数据结构之 并查集

编程总结 在刷题之前需要反复练习的编程技巧&#xff0c;尤其是手写各类数据结构实现&#xff0c;它们好比就是全真教的上乘武功 本栏目为学习笔记参考&#xff1a;https://leetcode.cn/leetbook/read/disjoint-set/oviefi/ 1.0 概述 并查集&#xff08;Union Find&#xff09…

医院预约系统微信小程序APP前后端

医院预约系统具体功能介绍&#xff1a;展示信息、可以注册和登录&#xff0c; 预约&#xff08;包含各个科室的预约&#xff0c;可以预约每个各个医生&#xff09;&#xff0c;就诊引导包含预约的具体信息&#xff0c;包含就诊时间、就诊科室、就诊医生以及就诊人信息、和支付状…

Springboot实现链路追踪功能

前言 在日常开发中&#xff0c;一个业务的实现往往会调用很多个方法&#xff0c;当我们去看日志的时候&#xff0c;各种接口的日志打印出来&#xff0c;看着就头疼&#xff0c;压根没办法去定位&#xff0c;而链路追踪就能很好的帮助我们去查看接口从头至尾依次调用了哪些方法…