GUI编程之路内计费工具

2023-05-16

import os
import sys
from PyQt5.QtCore import QObject, pyqtSignal
from PyQt5.QtGui import QTextCursor
from jifei3 import Ui_Form
from PyQt5 import  QtWidgets
from PyQt5.QtWidgets import *
import requests
import pandas as pd
import csv


class Signal(QObject):

    text_update = pyqtSignal(str)

    def write(self, text):
        self.text_update.emit(str(text))
        QApplication.processEvents()

class MyClass(QWidget, Ui_Form):
    def __init__(self):
        super().__init__()
        self.InitUi()

    def InitUi(self):
        self.setupUi(self)
        self.setWindowTitle("路内计费测试工具")
        self.show()
        self.txt = QtWidgets.QTextEdit()
        self.pushButton.clicked.connect(self.path)
        self.pushButton_2.clicked.connect(self.jifei)
        # 实时显示输出, 将控制台的输出重定向到界面中
        sys.stdout = Signal()
        sys.stdout.text_update.connect(self.updatetext)

    def updatetext(self, text):
        """
            更新textBrowser
        """
        cursor = self.textBrowser.textCursor()
        cursor.movePosition(QTextCursor.End)
        self.textBrowser.append(text)
        self.textBrowser.setTextCursor(cursor)
        self.textBrowser.ensureCursorVisible()

    def environment(self):
        if self.comboBox.currentText()=="测试环境":
            url="https://apitest.xtingcloud.com/zk_xm_test/charge/test?orderId="
            return url
        else:
            url = "https://api.xtingcloud.com/zk_zk/charge/test?orderId="
            return url

    def path(self):
        self.dir_name = QFileDialog.getOpenFileName(None, '选择文件', os.getcwd())
        dir_path=self.dir_name
        dir_path2=dir_path[0]
        self.lineEdit_4.setText(dir_path2)

    def get_exceldata(self):
        try:
            if self.comboBox_2.currentText()=="大沥" and self.comboBox_3.currentText()=="一类区域" and self.comboBox_4.currentText()=="小型车" and self.comboBox_5.currentText() == "全部":
                raw_data = pd.read_excel(self.lineEdit_4.text(), header=0,sheet_name="大沥一类区域小型车计费规则(燃油&新能源车)")  # header=0表示第一行是表头,就自动去除了
                data = raw_data.values  # 只提取表中信息
                return data

            elif self.comboBox_2.currentText()=="永安" and self.comboBox_3.currentText()=="繁华路段" and self.comboBox_4.currentText()=="全部" and self.comboBox_5.currentText() == "全部":
                raw_data = pd.read_excel(self.lineEdit_4.text(), header=0,sheet_name="永安繁华路段小中大型车计费规则(燃油&新能源车)")
                data = raw_data.values  # 只提取表中信息
                return data

            elif self.comboBox_2.currentText()=="全部" and self.comboBox_3.currentText()=="全部" and self.comboBox_4.currentText()=="全部" and self.comboBox_5.currentText() == "全部":
                #大沥一类区域小型车计费规则(燃油&新能源车)
                raw_data = pd.read_excel(self.lineEdit_4.text(), header=0,
                                         sheet_name="大沥一类区域小型车计费规则(燃油&新能源车)")  # header=0表示第一行是表头,就自动去除了
                data1 = raw_data.values  # 只提取表中信息
                list1 = data1.tolist()
                #数据条数
                self.output_dali=len(list1)
                #永安繁华路段小中大型车计费规则(燃油&新能源车)
                raw_data2 = pd.read_excel(self.lineEdit_4.text(), header=0,
                                          sheet_name="永安繁华路段小中大型车计费规则(燃油&新能源车)")  # header=0表示第一行是表头,就自动去除了
                data2 = raw_data2.values  # 只提取表中信息
                list2 = data2.tolist()
                # 数据条数
                self.output_yonan=len(list2)
                list3=list1+list2
                self.output_all = len(list3)
                self.output_all=self.output_all+1
                return list3

        except Exception as e:
            print(8888888)

    #获取计费接口返回的数据(如果选项不都是全部用这个函数)
    def postdata(self,starttime,endtime) -> object:
        try:
            url1=self.environment()
            #大沥一类区域小型车计费规则(燃油&新能源车),订单号已写死
            self.url2_dali1 = url1 + f"671035385089884170&startTime={starttime}&endTime={endtime}"
            #永安繁华路段小中大型车计费规则(燃油&新能源车),订单号已写死
            self.url2_yonan1 = url1 + f"676746866603327498&startTime={starttime}&endTime={endtime}"

            #大沥一类区域小型车计费规则(燃油&新能源车)计费请求
            if self.comboBox_2.currentText() == "大沥" and self.comboBox_3.currentText() == "一类区域" and self.comboBox_4.currentText() == "小型车" and self.comboBox_5.currentText() == "全部":
                payload = {}
                headers = {

                    'Content-Type': 'application/json',
                    'User-Agent': 'Mozilla / 5.0(Windows NT 6.1;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 98.0.4758.102Safari / 537.36'
                }
                response = requests.request("GET", self.url2_dali1, headers=headers, data=payload)
                rez = response.json()["res"]["data"]["payment"]
                return rez
            # 永安繁华路段小中大型车计费规则(燃油&新能源车)计费请求
            elif self.comboBox_2.currentText() == "永安" and self.comboBox_3.currentText() == "繁华路段" and self.comboBox_4.currentText() == "全部" and self.comboBox_5.currentText() == "全部":
                payload = {}
                headers = {

                    'Content-Type': 'application/json',
                    'User-Agent': 'Mozilla / 5.0(Windows NT 6.1;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 98.0.4758.102Safari / 537.36'
                }

                response = requests.request("GET", self.url2_yonan1, headers=headers, data=payload)
                rez = response.json()["res"]["data"]["payment"]
                return rez

        except Exception as e:
            print(444444444)

    # 获取计费接口返回的数据(如果选项都是全部用这个函数)
    def postdata2(self, starttime, endtime):
        url1 = self.environment()
        self.url2_dali1 = url1 + f"671035385089884170&startTime={starttime}&endTime={endtime}"
        self.url2_yonan1 = url1 + f"676746866603327498&startTime={starttime}&endTime={endtime}"
        if self.wudi <= self.output_dali:
            payload = {}
            headers = {

                'Content-Type': 'application/json',
                'User-Agent': 'Mozilla / 5.0(Windows NT 6.1;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 98.0.4758.102Safari / 537.36'
            }
            response = requests.request("GET", self.url2_dali1, headers=headers, data=payload)
            rez = response.json()["res"]["data"]["payment"]
            self.wudi =self.wudi+1
            return rez

        elif self.wudi <= self.output_all:
            payload = {}
            headers = {

                'Content-Type': 'application/json',
                'User-Agent': 'Mozilla / 5.0(Windows NT 6.1;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 98.0.4758.102Safari / 537.36'

            }
            response = requests.request("GET", self.url2_yonan1, headers=headers, data=payload)
            rez = response.json()["res"]["data"]["payment"]
            self.wudi = self.wudi + 1
            return rez

    def jifei(self):
        if self.lineEdit_4.text()=="":
            QMessageBox.about(self, '提示','文件地址好像还没填哦!')
            return

        if self.comboBox_2.currentText() == "大沥" and self.comboBox_3.currentText() == "一类区域" and self.comboBox_4.currentText() == "小型车" and self.comboBox_5.currentText() == "全部":
            print("地区:大沥")
            print("路段类型:一类区域")
            print("车辆类型:小型车")
            print("车辆属性:燃油车&新能源车")

        elif self.comboBox_2.currentText() == "永安" and self.comboBox_3.currentText() == "繁华路段" and self.comboBox_4.currentText() == "全部" and self.comboBox_5.currentText() == "全部":
            print("地区:永安")
            print("路段类型:繁华路段")
            print("车辆类型:小型车")
            print("车辆属性:燃油车&新能源车")

        elif self.comboBox_2.currentText() == "全部" and self.comboBox_3.currentText() == "全部" and self.comboBox_4.currentText() == "全部" and self.comboBox_5.currentText() == "全部":
            print("地区:全部")
            print("路段类型:全部")
            print("车辆类型:全部")
            print("车辆属性:全部")

        else:
            print("还没有这个类型的计费规则哦!")

        self.m=0
        self.n=0
        self.b=0
        if os.path.exists("测试明细.csv"):
            os.remove("测试明细.csv")
        try:
            if self.comboBox_2.currentText() == "大沥" and self.comboBox_3.currentText() == "一类区域" and self.comboBox_4.currentText() == "小型车" and self.comboBox_5.currentText() == "全部":
                for i in self.get_exceldata():
                    self.pay = i[7]
                    starttime = i[5]
                    endtime = i[6]
                    sumpay = self.postdata(starttime, endtime)
                    sumpay = sumpay / 100
                    print("案例编号:" + f"{i[0]}")
                    print("入场时间:" + f"{i[5]}")
                    print("离场时间:" + f"{i[6]}")
                    print("理论值:" + f"{self.pay}", "实际计算值:" + f"{sumpay}")
                    if sumpay == self.pay:
                        print("测试结果:通过!")
                        self.m=self.m+1
                        self.testresult="通过"

                    else:
                        print("测试结果:失败!")
                        self.n = self.n + 1
                        print(self.n)
                        self.testresult = "失败"

                    Area = "测试地区"
                    RoadType = "路段类型"
                    CaseNo = "案例编号"
                    EntryTimes = "入场时间"
                    leaveTimes = "离场时间"
                    ExcepetValue = "理论值"
                    ActualValue = "实际计算值"
                    Testresult = "测试结果"
                    CarAttribute="车辆属性"
                    CarType="车辆类型"
                    # csv header
                    fieldnames = [Area, RoadType,CarAttribute,CarType,CaseNo, EntryTimes, leaveTimes, ExcepetValue, ActualValue, Testresult]
                    # csv data
                    mydict = [
                        {CaseNo: i[0],Area:i[1], RoadType:i[2] ,CarAttribute:i[3],CarType:i[4] ,EntryTimes: i[5], leaveTimes: i[6], ExcepetValue: i[7], ActualValue: sumpay,
                         Testresult: self.testresult}]
                    with open('测试明细.csv', 'a+', encoding='UTF8', newline='') as f:
                        writer = csv.DictWriter(f, fieldnames=fieldnames)
                        if self.b==0:
                            writer.writeheader()
                            self.b=self.b+1
                        writer.writerows(mydict)

            elif self.comboBox_2.currentText() == "永安" and self.comboBox_3.currentText() == "繁华路段" and self.comboBox_4.currentText() == "全部" and self.comboBox_5.currentText() == "全部":
                for i in self.get_exceldata():
                    self.pay = i[7]
                    starttime = i[5]
                    endtime = i[6]
                    sumpay = self.postdata(starttime, endtime)
                    sumpay = sumpay / 100
                    print("案例编号:" + f"{i[0]}")
                    print("入场时间:" + f"{i[5]}")
                    print("离场时间:" + f"{i[6]}")
                    print("理论值:" + f"{self.pay}", "实际计算值:" + f"{sumpay}")
                    if sumpay == self.pay:
                        print("测试结果:通过!")
                        self.m=self.m+1
                        self.testresult="通过"

                    else:
                        print("测试结果:失败!")
                        self.n = self.n + 1
                        print(self.n)
                        self.testresult = "失败"

                    Area = "测试地区"
                    RoadType = "路段类型"
                    CaseNo = "案例编号"
                    EntryTimes = "入场时间"
                    leaveTimes = "离场时间"
                    ExcepetValue = "理论值"
                    ActualValue = "实际计算值"
                    Testresult = "测试结果"
                    CarAttribute = "车辆属性"
                    CarType = "车辆类型"
                    # csv header
                    fieldnames = [Area, RoadType, CarAttribute, CarType, CaseNo, EntryTimes, leaveTimes, ExcepetValue,
                                  ActualValue, Testresult]
                    # csv data
                    mydict = [
                        {CaseNo: i[0], Area: i[1], RoadType: i[2], CarAttribute: i[3], CarType: i[4] ,EntryTimes: i[5],
                         leaveTimes: i[6], ExcepetValue: i[7], ActualValue: sumpay,
                         Testresult: self.testresult}]
                    with open('测试明细.csv', 'a+', encoding='UTF8', newline='') as f:
                        writer = csv.DictWriter(f, fieldnames=fieldnames)
                        if self.b == 0:
                            writer.writeheader()
                            self.b = self.b + 1
                        writer.writerows(mydict)
            #按钮都选择全部时要特殊处理
            elif self.comboBox_2.currentText() == "全部" and self.comboBox_3.currentText() == "全部" and self.comboBox_4.currentText() == "全部" and self.comboBox_5.currentText() == "全部":
                self.wudi = 1
                for i in self.get_exceldata():
                    self.pay = i[7]
                    starttime = i[5]
                    endtime = i[6]
                    sumpay = self.postdata2(starttime, endtime)
                    sumpay = sumpay / 100
                    print("案例编号:" + f"{i[0]}")
                    print("入场时间:" + f"{i[5]}")
                    print("离场时间:" + f"{i[6]}")
                    print("理论值:" + f"{self.pay}", "实际计算值:" + f"{sumpay}")
                    if sumpay == self.pay:
                        print("测试结果:通过!")
                        self.m=self.m+1
                        self.testresult="通过"

                    else:
                        print("测试结果:失败!")
                        self.n = self.n + 1
                        print(self.n)
                        self.testresult = "失败"

                    Area = "测试地区"
                    RoadType = "路段类型"
                    CaseNo = "案例编号"
                    EntryTimes = "入场时间"
                    leaveTimes = "离场时间"
                    ExcepetValue = "理论值"
                    ActualValue = "实际计算值"
                    Testresult = "测试结果"
                    CarAttribute = "车辆属性"
                    CarType = "车辆类型"
                    # csv header
                    fieldnames = [Area, RoadType, CarAttribute, CarType, CaseNo, EntryTimes, leaveTimes, ExcepetValue,
                                  ActualValue, Testresult]
                    # csv data
                    mydict = [
                        {CaseNo: i[0], Area: i[1], RoadType: i[2], CarAttribute: i[3], CarType: i[4], EntryTimes: i[5],
                         leaveTimes: i[6], ExcepetValue: i[7], ActualValue: sumpay,
                         Testresult: self.testresult}]
                    with open('测试明细.csv', 'a+', encoding='UTF8', newline='') as f:
                        writer = csv.DictWriter(f, fieldnames=fieldnames)
                        if self.b == 0:
                            writer.writeheader()
                            self.b = self.b + 1
                        writer.writerows(mydict)

            print("测试结果汇总报告:"+"测试通过:"f"{self.m}"+"条案例"+","+"测试失败:"f"{self.n}"+"条案例")
            Area="测试地区"
            RoadType="路段类型"
            CarType="车辆类型"
            CarAttributes="车辆属性"
            TestPasses="测试通过数"
            Testfails="测试失败数"
            # csv header
            fieldnames = [Area, RoadType, CarType, CarAttributes,TestPasses,Testfails]
            # csv data
            mydict = [{Area:self.comboBox_2.currentText(), RoadType:self.comboBox_3.currentText() , CarType:self.comboBox_4.currentText(),CarAttributes:self.comboBox_5.currentText(),TestPasses:self.m,Testfails:self.n}]
            with open('测试报告.csv', 'w', encoding='UTF8', newline='') as f:
                writer = csv.DictWriter(f, fieldnames=fieldnames)
                writer.writeheader()
                writer.writerows(mydict)
        except Exception as e:
            print(e)

if __name__ == '__main__':
    app = QApplication(sys.argv)
    mc = MyClass()
    sys.exit(app.exec_())

jifei3.py

# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'jifei3.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again.  Do not edit this file unless you know what you are doing.


from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(781, 409)
        self.widget = QtWidgets.QWidget(Form)
        self.widget.setGeometry(QtCore.QRect(66, 50, 675, 270))
        self.widget.setObjectName("widget")
        self.gridLayout = QtWidgets.QGridLayout(self.widget)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.label_5 = QtWidgets.QLabel(self.widget)
        self.label_5.setObjectName("label_5")
        self.gridLayout.addWidget(self.label_5, 0, 0, 1, 1)
        self.comboBox_2 = QtWidgets.QComboBox(self.widget)
        self.comboBox_2.setEditable(True)
        self.comboBox_2.setDuplicatesEnabled(False)
        self.comboBox_2.setObjectName("comboBox_2")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.gridLayout.addWidget(self.comboBox_2, 0, 1, 1, 1)
        self.label_6 = QtWidgets.QLabel(self.widget)
        self.label_6.setObjectName("label_6")
        self.gridLayout.addWidget(self.label_6, 0, 2, 1, 1)
        self.comboBox_3 = QtWidgets.QComboBox(self.widget)
        self.comboBox_3.setEditable(True)
        self.comboBox_3.setDuplicatesEnabled(False)
        self.comboBox_3.setObjectName("comboBox_3")
        self.comboBox_3.addItem("")
        self.comboBox_3.addItem("")
        self.comboBox_3.addItem("")
        self.comboBox_3.addItem("")
        self.comboBox_3.addItem("")
        self.comboBox_3.addItem("")
        self.gridLayout.addWidget(self.comboBox_3, 0, 3, 1, 1)
        self.label_7 = QtWidgets.QLabel(self.widget)
        self.label_7.setObjectName("label_7")
        self.gridLayout.addWidget(self.label_7, 0, 4, 1, 1)
        self.comboBox_4 = QtWidgets.QComboBox(self.widget)
        self.comboBox_4.setEditable(True)
        self.comboBox_4.setDuplicatesEnabled(False)
        self.comboBox_4.setObjectName("comboBox_4")
        self.comboBox_4.addItem("")
        self.comboBox_4.addItem("")
        self.comboBox_4.addItem("")
        self.comboBox_4.addItem("")
        self.gridLayout.addWidget(self.comboBox_4, 0, 5, 1, 1)
        self.label_9 = QtWidgets.QLabel(self.widget)
        self.label_9.setObjectName("label_9")
        self.gridLayout.addWidget(self.label_9, 0, 6, 1, 1)
        self.comboBox_5 = QtWidgets.QComboBox(self.widget)
        self.comboBox_5.setEditable(True)
        self.comboBox_5.setDuplicatesEnabled(False)
        self.comboBox_5.setObjectName("comboBox_5")
        self.comboBox_5.addItem("")
        self.comboBox_5.addItem("")
        self.comboBox_5.addItem("")
        self.gridLayout.addWidget(self.comboBox_5, 0, 7, 1, 1)
        self.label = QtWidgets.QLabel(self.widget)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 8, 1, 1)
        self.comboBox = QtWidgets.QComboBox(self.widget)
        self.comboBox.setEditable(True)
        self.comboBox.setDuplicatesEnabled(False)
        self.comboBox.setObjectName("comboBox")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.gridLayout.addWidget(self.comboBox, 0, 9, 1, 1)
        self.pushButton_2 = QtWidgets.QPushButton(self.widget)
        self.pushButton_2.setObjectName("pushButton_2")
        self.gridLayout.addWidget(self.pushButton_2, 0, 10, 1, 1)
        self.pushButton = QtWidgets.QPushButton(self.widget)
        self.pushButton.setObjectName("pushButton")
        self.gridLayout.addWidget(self.pushButton, 1, 0, 1, 2)
        self.lineEdit_4 = QtWidgets.QLineEdit(self.widget)
        self.lineEdit_4.setObjectName("lineEdit_4")
        self.gridLayout.addWidget(self.lineEdit_4, 1, 2, 1, 5)
        self.label_8 = QtWidgets.QLabel(self.widget)
        self.label_8.setObjectName("label_8")
        self.gridLayout.addWidget(self.label_8, 2, 0, 1, 2)
        self.textBrowser = QtWidgets.QTextBrowser(self.widget)
        self.textBrowser.setObjectName("textBrowser")
        self.gridLayout.addWidget(self.textBrowser, 3, 0, 1, 11)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "Form"))
        self.label_5.setText(_translate("Form", "地区"))
        self.comboBox_2.setCurrentText(_translate("Form", "全部"))
        self.comboBox_2.setItemText(0, _translate("Form", "全部"))
        self.comboBox_2.setItemText(1, _translate("Form", "大沥"))
        self.comboBox_2.setItemText(2, _translate("Form", "永安"))
        self.label_6.setText(_translate("Form", "区域类型"))
        self.comboBox_3.setCurrentText(_translate("Form", "全部"))
        self.comboBox_3.setItemText(0, _translate("Form", "全部"))
        self.comboBox_3.setItemText(1, _translate("Form", "一类区域"))
        self.comboBox_3.setItemText(2, _translate("Form", "二类区域"))
        self.comboBox_3.setItemText(3, _translate("Form", "三类区域"))
        self.comboBox_3.setItemText(4, _translate("Form", "一般路段"))
        self.comboBox_3.setItemText(5, _translate("Form", "繁华路段"))
        self.label_7.setText(_translate("Form", "车辆类型"))
        self.comboBox_4.setCurrentText(_translate("Form", "全部"))
        self.comboBox_4.setItemText(0, _translate("Form", "全部"))
        self.comboBox_4.setItemText(1, _translate("Form", "小型车"))
        self.comboBox_4.setItemText(2, _translate("Form", "中型车"))
        self.comboBox_4.setItemText(3, _translate("Form", "大型车"))
        self.label_9.setText(_translate("Form", "车辆属性"))
        self.comboBox_5.setCurrentText(_translate("Form", "全部"))
        self.comboBox_5.setItemText(0, _translate("Form", "全部"))
        self.comboBox_5.setItemText(1, _translate("Form", "燃油车"))
        self.comboBox_5.setItemText(2, _translate("Form", "新能源"))
        self.label.setText(_translate("Form", "运行环境"))
        self.comboBox.setCurrentText(_translate("Form", "测试环境"))
        self.comboBox.setItemText(0, _translate("Form", "测试环境"))
        self.comboBox.setItemText(1, _translate("Form", "正式环境"))
        self.pushButton_2.setText(_translate("Form", "开始测试"))
        self.pushButton.setText(_translate("Form", "导入excel"))
        self.lineEdit_4.setText(_translate("Form", "C:/Users/Administrator/Desktop/jifei.xls"))
        self.label_8.setText(_translate("Form", "测试结果"))

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

GUI编程之路内计费工具 的相关文章

  • SpringBoot应用接口无法访问,但应用看起来正常

    背景 xff1a 应用中有多个实现了CommandLineRunner接口的类 xff0c 其中一个类A单独起了一个线程去执行逻辑 xff0c 另一个类B也实现了CommandLineRunner接口但是没有new新线程的操作 现象 xff
  • ubuntu PATH 出错修复

    我的 ubuntu10 10设置交叉编译环境时 xff0c PATH 设置错误了 xff0c 导致无法正常启动 xff0c 错误情况如下 xff1a PATH xff1a 找不到命令 ubuntu201 span class hljs nu
  • mybatis-plus中使用pagehelper避坑

    1 你的传参对象的分页字段是pageNum和pageSize 今天测试一个接口 xff0c 没有传递分页字段 xff0c 但是后台还是进行了分页查询 这个是因为虽然没有传递分页查询 xff0c 但是后台的参数对象中有pageNum和page
  • 结构体和二进制文件操作

    老师给我们分布里一个作业 xff0c 让我们定义一个怪物的结构体 xff0c 输入你想创建的数字就可以创建出相应个数的怪物 然后再输入每个怪物的信息并保存到一个文本文件里面 xff0c 以供以后读取 这里我定义了 一个结构体 xff0c 还
  • 如何解决苹果账号续费时支付失败的问题

    事件 苹果开发者账号 xff08 公司 xff09 准备到期了 用双币信用卡续费的时候 xff0c 一直提示 你的支付授权失败 请核对你的信息并重试 xff0c 或尝试其他支付方式 请联系你的银行了解更多信息 xff0c 如下图所示 xff
  • java-读取javabean中所有属性和属性的类型

    java读取文件中的属性类型 64 param model 64 return 64 throws Exception public static Map lt String String gt getModelAttriButeType
  • java项目linux jar包部署问题

    1 当我们项目打包成jar包后 xff0c 上传到linux服务器上 xff0c 用 java jar xxxxx jar 启动项目后 xff0c 会发现我们代码中的日志输出会变乱码 xff0c 这时只需要在命令加上如下参数即可 xff1a
  • pip安装到指定路径

    在pycharm的Terminal窗口输入 xff1a pip install numpy target 61 F py Analysis vv Lib site packages numpy xff1a python库的名称 后面 tar
  • PostgreSQL标准建表语句

    建表 CREATE TABLE if not exists public user id character varying 32 NOT NULL DEFAULT sys guid name character varying 100 N
  • table-cell布局

    display table cell属性简介 display xff1a table cell xff1b 会使元素表现的类似一个表格中的单元格td xff0c 利用这个特性可以实现文字的垂直居中效果 同时它也会破坏一些CSS属性 xff0
  • 使用Visual Studio 2019时遇到的两个问题

    由于近期要做计算机网络第一次上机作业 xff0c 我暂时抛弃了已经用习惯的Devcpp xff0c 下载并安装了VS2019 xff0c 在编译样例代码 用VS2017平台编写 时成功地解决了遇到的两个问题 MSB803 xff1a 找不到
  • 树莓派3B+(04):xrdp远程桌面连接

    xrdp远程桌面连接 一 xrdp和vnc区别 通过可视化界面远程访问 xff0c 像Windows下的自带的远程工具一样 xff0c 能够以图形化的界面远程操作 xff0c 最常见的是通过xrdp和vnc这两种远程桌面协议来进行可视化远程
  • Docker安装教程(看这篇就够了)

    Docker安装教程 一 CentOS安装Docker1 卸载 xff08 可选 xff09 2 安装docker3 启动docker4 配置镜像加速 二 CentOS7安装DockerCompose1 下载2 修改文件权限3 Base自动
  • cmd找不到conda以及通过cmd启用Anaconda中的Python环境(base)

    cmd找不到conda以及通过cmd启用Anaconda中的Python环境 xff08 base xff09 1 在系统环境中添加Anaconda路径2 通过cmd启用Anaconda中的Python环境 xff08 base xff09
  • 在使用flex布局方式让最后一个元素居右(最右边)显示,一层 HTML 结构实现左“右”布局,使用flex实现居中对齐

    我们在布局的时候通常会在导航栏上有居左和居右显示 xff0c 中间留白 xff0c 这样页面伸缩的时候不会影响效果 形如下图 以往我们可能更多会使用float浮动布局来实现这种效果 xff0c 但是flex得到广泛支持以后就可以更方便和快捷
  • Linux网络服务管理&防火墙详解&端口问题

    每次配置访问服务器都会一团迷雾 xff0c 今天来尝试弄清楚同时借鉴一下大佬的博文当做笔记 文章目录 防火墙简介一 防火墙基础二 iptables防火墙策略iptables 命令格式 xff1a iptables案例1 查看开放的端口2 开
  • Linux环境下Jenkins安装

    目录 1 部署 JDK 1 1 安装 JDK 2 部署 Jenkins 2 1 上传压缩包 2 2 创建相关文件夹 2 3 安装 Jenkins 2 3 1 拷贝 Jenkins 主体文件 2 3 2 离线安装 Jenkins 插件 2 3
  • frp穿透你的远程桌面

    缘起 作为一个程序员 xff0c 经常会遇到需要使用远程桌面的述求 xff08 居家办公 加班 xff0c 你懂的 xff09 所以 xff0c 在网上找一圈远程桌面解决方案之后 xff0c 最终还是使用frp来穿透远程桌面 xff08 推
  • 浅析内网穿透可行方案

    缘起 最近在做一个微信网站 xff0c 需要和微信对接 发现开发的时候需要将自己电脑上的服务映射到公网上 xff0c 才能接收到微信公众平台的回调 因此 xff0c 百度搜寻整理各种可行的内网穿透方案 内网穿透原理 以下纯属个人理解 xff
  • 解决Mac OS Catalina下Visual Studio Code对于C/C++语言不能断点调试的问题

    文章目录 背景环境解决办法新的插件配置步骤 配置文件文件分享c cpp properties jsonlaunch jsontasks json 参考资料 背景 最近刚考完试 xff0c 有空来回复一下博客上的评论 在回复一条关于克鲁斯卡尔

随机推荐