【QT】day6

在这里插入图片描述

#include "home.h"
#include "ui_home.h"

Home::Home(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Home)
{
    ui->setupUi(this);

    // 从配置文件读取用户名
    QSettings settings("kim", "ad");
    username = settings.value("username").toString();
    usertype = settings.value("usertype").toString();
    ui->usertypelabel->setText(usertype);
    if(usertype=="学生")
    {
        ui->listframe->hide();
        ui->setframe->hide();
        ui->mainframe->hide();
        QFrame *stuframe = new QFrame();
        stuframe->setParent(this);
        stuframe->setStyleSheet("width:100px;height:100px;background-color: rgb(250, 250, 250);");
        stuframe->move(100,0);

        teachEdit = new QLineEdit(this);
        teachEdit->move(200,50);
        teachEdit->setStyleSheet("background-color:#ffffff;color:#000000;width:200px;height:30px;border-radius:7px;color:#000000;padding-left:10px;");
        teachEdit->setPlaceholderText("请输入教师账号");

        adkeyEdit = new QLineEdit(this);
        adkeyEdit->move(200,90);
        adkeyEdit->setStyleSheet("background-color:#ffffff;color:#000000;width:200px;height:30px;border-radius:7px;color:#000000;padding-left:10px;");
        adkeyEdit->setPlaceholderText("请输入签到验证码");

        adkeybtn = new QPushButton(this);
        adkeybtn->move(200,170);
        adkeybtn->setText("签到");
        adkeybtn->setStyleSheet("background-color:#000000;color:#ffffff;width:200px;height:40px;border-radius:7px;");
        connect(adkeybtn, &QPushButton::clicked, this, &Home::onAdKeyBtnClicked);

        stuHintLable = new QLabel(this);
        stuHintLable->move(210,140);
        stuHintLable->setFixedWidth(200);
        stuHintLable->setStyleSheet("color:rgb(222, 60, 51);height:40px;");
    }
    ui->usernamelabel->setText(username);
    ui->usertypelabel->setAlignment(Qt::AlignCenter);
    closeAllpage();
    openAdPage();
}

Home::~Home()
{
    delete ui;
}

void Home::onAdKeyBtnClicked() {
    if(teachEdit->text()=="")
    {
        stuHintLable->setText("教师账号不能为空");
        stuHintLable->setStyleSheet("color:rgb(222, 60, 51);height:40px;");
    }else if(adkeyEdit->text()=="")
    {
        stuHintLable->setText("签到激活码不能为空");
        stuHintLable->setStyleSheet("color:rgb(222, 60, 51);height:40px;");
    }else{
        socket = new QTcpSocket(this);
        socket->connectToHost(ip,port);
        connect(socket,&QTcpSocket::connected,this,&Home::stuad_connected_slot);
        connect(socket,&QTcpSocket::readyRead,this,&Home::stuad_readyRead_slot);
    }

}


void Home::startad_connected_slot()
{
    struct data user;
    user.type=STARTAD;
    user.username=username;
    user.value=generateRandomString(6);
    ui->hintlable_3->setText("签到码:"+user.value);
    ui->startattendancebtn->setStyleSheet("background-color:#ffffff;border-radius:7px;border:1px solid #000000;color:#000000;");
    socket->write(user.toByteArray());
}

void Home::startad_readyRead_slot()
{
    QByteArray rawData = socket->readAll();
    const char* rawCharArray = rawData.constData();
    socketinfo receivedInfo;
    memcpy(&receivedInfo, rawCharArray, sizeof(socketinfo));
    outputlog(receivedInfo.data);
    socket->disconnectFromHost();
}

void Home::endad_connected_slot()
{
    struct data user;
    user.type=ENDAD;
    user.username=username;
    user.value="123";
    ui->hintlable_3->setText("");
    ui->startattendancebtn->setStyleSheet("background-color:#000000;border-radius:7px;color:#ffffff;");
    socket->write(user.toByteArray());
}

void Home::endad_readyRead_slot()
{
    QByteArray rawData = socket->readAll();
    const char* rawCharArray = rawData.constData();
    socketinfo receivedInfo;
    memcpy(&receivedInfo, rawCharArray, sizeof(socketinfo));
    outputlog(receivedInfo.data);
    socket->disconnectFromHost();
}

void Home::addname_connected_slot()
{
    struct data user;
    user.type=NAMEADD;
    user.username=username;
    user.value=ui->funcinput->text();
    socket->write(user.toByteArray());
}

void Home::addname_readyRead_slot()
{
    QByteArray rawData = socket->readAll();
    const char* rawCharArray = rawData.constData();
    socketinfo receivedInfo;
    memcpy(&receivedInfo, rawCharArray, sizeof(socketinfo));
    outputlog("【"+ui->funcinput->text()+"】"+receivedInfo.data);
    ui->funcinput->clear();
    socket->disconnectFromHost();
}

void Home::getAllName_connected_slot()
{
    struct data user;
    user.type=NAMEGETALL;
    user.username=username;
    user.value="123";
    socket->write(user.toByteArray());
}

void Home::getAllName_readyRead_slot()
{
    QByteArray rawData = socket->readAll();
    const char* rawCharArray = rawData.constData();
    socketinfo receivedInfo;
    memcpy(&receivedInfo, rawCharArray, sizeof(socketinfo));
    QString receivedData(receivedInfo.data);
    QStringList records = receivedData.split("|", Qt::SkipEmptyParts);

    // 遍历每个记录

    ui->settable->setRowCount(records.size());
    for (int row = 0; row < records.size(); ++row) {
        // 以 '\n' 分割记录中的行
        QStringList lines = records[row].split("\n", Qt::SkipEmptyParts);

        // 遍历每行并添加到QTableWidget中
        for (int col = 0; col < lines.size(); ++col) {
            // 以 ':' 分割键和值
            QStringList keyValue = lines[col].split("&", Qt::SkipEmptyParts);

            QString key = keyValue[0].trimmed();
            QString value = keyValue[1].trimmed();
            QTableWidgetItem *item = new QTableWidgetItem(value);
            ui->settable->setItem(row, col, item);
            item->setTextAlignment(Qt::AlignCenter);
        }
    }
    ui->settable->setColumnWidth(0, 50);
    ui->settable->setColumnWidth(1, 100);
    ui->settable->setColumnWidth(2, 180);
    socket->disconnectFromHost();
}

void Home::deletename_connected_slot()
{


    QList<QTableWidgetItem *> selectedItems = ui->settable->selectedItems();
    if (!selectedItems.isEmpty()) {
        int selectedRow = selectedItems.first()->row();
        QTableWidgetItem *item1 = ui->settable->item(selectedRow, 0);
        QString content1 = item1->text();
        struct data user;
        user.type=NAMEDELETE;
        user.username=username;
        user.value=content1;
        socket->write(user.toByteArray());
    } else {
        qDebug() << "No row selected.";
    }
}

void Home::deletename_readyRead_slot()
{
    QByteArray rawData = socket->readAll();
    const char* rawCharArray = rawData.constData();
    socketinfo receivedInfo;
    memcpy(&receivedInfo, rawCharArray, sizeof(socketinfo));
    outputlog(receivedInfo.data);
    socket->disconnectFromHost();
}

void Home::searchname_connected_slot()
{
    struct data user;
    user.type=NAMESEARCH;
    user.username=username;
    user.value=ui->funcinput->text();
    socket->write(user.toByteArray());
}

void Home::searchname_readyRead_slot()
{
    QByteArray rawData = socket->readAll();
    const char* rawCharArray = rawData.constData();
    socketinfo receivedInfo;
    memcpy(&receivedInfo, rawCharArray, sizeof(socketinfo));
    QString receivedData(receivedInfo.data);
    QStringList records = receivedData.split("|", Qt::SkipEmptyParts);

    // 遍历每个记录

    ui->settable->setRowCount(records.size());
    for (int row = 0; row < records.size(); ++row) {
        // 以 '\n' 分割记录中的行
        QStringList lines = records[row].split("\n", Qt::SkipEmptyParts);

        // 遍历每行并添加到QTableWidget中
        for (int col = 0; col < lines.size(); ++col) {
            // 以 ':' 分割键和值
            QStringList keyValue = lines[col].split("&", Qt::SkipEmptyParts);

            QString key = keyValue[0].trimmed();
            QString value = keyValue[1].trimmed();
            QTableWidgetItem *item = new QTableWidgetItem(value);
            ui->settable->setItem(row, col, item);
            item->setTextAlignment(Qt::AlignCenter);
        }
    }
    ui->settable->setColumnWidth(0, 50);
    ui->settable->setColumnWidth(1, 100);
    ui->settable->setColumnWidth(2, 180);
    socket->disconnectFromHost();
}

void Home::getadList_connected_slot()
{
    struct data user;
    user.type=NAMEHISTORY;
    user.username=username;
    user.value="123";
    socket->write(user.toByteArray());
}

void Home::getadList_readyRead_slot()
{
    QByteArray rawData = socket->readAll();
    const char* rawCharArray = rawData.constData();
    socketinfo receivedInfo;
    memcpy(&receivedInfo, rawCharArray, sizeof(socketinfo));
    QString receivedData(receivedInfo.data);
    QStringList records = receivedData.split("|", Qt::SkipEmptyParts);

    // 遍历每个记录

    ui->settable->setRowCount(records.size());
    for (int row = 0; row < records.size(); ++row) {
        // 以 '\n' 分割记录中的行
        QStringList lines = records[row].split("\n", Qt::SkipEmptyParts);

        // 遍历每行并添加到QTableWidget中
        for (int col = 0; col < lines.size(); ++col) {
            // 以 ':' 分割键和值
            QStringList keyValue = lines[col].split("&", Qt::SkipEmptyParts);

            QString key = keyValue[0].trimmed();
            QString value = keyValue[1].trimmed();
            QTableWidgetItem *item = new QTableWidgetItem(value);
            ui->settable->setItem(row, col, item);
            item->setTextAlignment(Qt::AlignCenter);
        }
    }
    ui->settable->setColumnWidth(0, 50);
    ui->settable->setColumnWidth(1, 80);
    ui->settable->setColumnWidth(2, 80);
    ui->settable->setColumnWidth(3, 160);
    socket->disconnectFromHost();
}

void Home::stuad_connected_slot()
{
    struct data user;
    user.type=STUAD;
    user.username=username;
    user.value=teachEdit->text();
    user.value1=adkeyEdit->text();
    socket->write(user.toByteArray());
}

void Home::callname_connected_slot()
{
    struct data user;
    user.type=NAMECALL;
    user.username=username;
    user.value="123";
    user.value1="123";
    socket->write(user.toByteArray());
}

void Home::callname_readyRead_slot()
{
    QByteArray rawData = socket->readAll();
    const char* rawCharArray = rawData.constData();
    socketinfo receivedInfo;
    memcpy(&receivedInfo, rawCharArray, sizeof(socketinfo));
    outputlog(receivedInfo.data);
    socket->disconnectFromHost();
}

void Home::stuad_readyRead_slot()
{
    QByteArray rawData = socket->readAll();
    const char* rawCharArray = rawData.constData();
    socketinfo receivedInfo;
    memcpy(&receivedInfo, rawCharArray, sizeof(socketinfo));
    stuHintLable->setText(receivedInfo.data);
    stuHintLable->setStyleSheet("color:rgb(26, 136, 35);height:40px;");
    socket->disconnectFromHost();
}

void Home::on_startattendancebtn_clicked()
{
    if(ui->startattendancebtn->text()=="发起签到")
    {
        socket = new QTcpSocket(this);
        socket->connectToHost(ip,port);
        connect(socket,&QTcpSocket::connected,this,&Home::startad_connected_slot);
        connect(socket,&QTcpSocket::readyRead,this,&Home::startad_readyRead_slot);
        ui->startattendancebtn->setText("关闭签到");
    }else{
        socket = new QTcpSocket(this);
        socket->connectToHost(ip,port);
        connect(socket,&QTcpSocket::connected,this,&Home::endad_connected_slot);
        connect(socket,&QTcpSocket::readyRead,this,&Home::endad_readyRead_slot);
        ui->startattendancebtn->setText("发起签到");
        ui->startattendancebtn->setStyleSheet("background-color:#000000;border-radius:7px;color:#ffffff;");
    }

}

void Home::outputlog(QString msg)
{
    ui->adEdit->setText("【"+getCurretTime()+"】"+msg+"\n"+ui->adEdit->toPlainText());
}

QString Home::getCurretTime()
{
    QTime systime = QTime::currentTime();
    QString s = systime.toString("hh:mm:ss");
    return s;
}

QString Home::generateRandomString(int length) {
    const QString charset = "123456789abcdefghijklmnpqrstuvwxyz";
    QString randomString;

    for (int i = 0; i < length; ++i) {
        int randomIndex = QRandomGenerator::global()->bounded(charset.length());
        randomString.append(charset.at(randomIndex));
    }

    return randomString;
}

void Home::closeAllpage()
{
    ui->hintframe->hide();
    ui->hintframe_2->hide();
    ui->startattendancebtn->hide();
    ui->setmainframe->hide();
    ui->callnamebtn->hide();
}

void Home::openAdPage()
{
    ui->hintframe->show();
    ui->hintframe_2->show();
    ui->startattendancebtn->show();
    ui->callnamebtn->show();
    this->setWindowTitle("签到管理系统v1.0-签到");
}

void Home::openListPage()
{
    this->setWindowTitle("签到管理系统v1.0-记录");
    ui->setmainframe->show();
    ui->funcinput->hide();
    ui->addbtn->hide();
    ui->searchbtn->hide();
    ui->deletebtn->hide();
    ui->backbtn->hide();
    QStringList headerLabels;
    headerLabels << "ID" << "姓名" << "签到码" << "签到时间";
    ui->settable->setHorizontalHeaderLabels(headerLabels);
    ui->settable->verticalHeader()->setVisible(false);
    ui->settable->setColumnCount(4);
    ui->settable->setStyleSheet("QScrollBar:vertical {"
                                "    background: #ffffff;"
                                "    width: 10px;"
                                "    margin: 16px 0px 16px 0px;"
                                "}"
                                "QScrollBar::handle:vertical {"
                                "    background: rgb(78, 79, 79);"
                                "    min-height: 10px;"
                                "}"
                                "QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {"
                                "    border: none;"
                                "    background: none;"
                                "}"
                                "QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {"
                                "    background: none;"
                                "}"
                                "#settable{background-color:#ffffff;color:#000000;}"
                                "QTableWidget::item:selected {"
                                "    background-color: #eeeeee;"
                                "color:#000000;"
                                "}");
    socket = new QTcpSocket(this);
    socket->connectToHost(ip,port);
    connect(socket,&QTcpSocket::connected,this,&Home::getadList_connected_slot);
    connect(socket,&QTcpSocket::readyRead,this,&Home::getadList_readyRead_slot);

    for (int row = 0; row < ui->settable->rowCount(); ++row) {
        for (int col = 0; col < ui->settable->columnCount(); ++col) {
            QTableWidgetItem *item = new QTableWidgetItem(QString("Row %1, Col %2").arg(row + 1).arg(col + 1));

            // 设置文本居中
            item->setTextAlignment(Qt::AlignCenter);
        }
    }
}

void Home::openSetPage()
{
    this->setWindowTitle("签到管理系统v1.0-设置");
    ui->setmainframe->show();
    ui->funcinput->show();
    ui->addbtn->show();
    ui->searchbtn->show();
    ui->deletebtn->show();
    ui->backbtn->show();
    QStringList headerLabels;
    headerLabels << "ID" << "姓名" << "添加时间";
    ui->settable->setHorizontalHeaderLabels(headerLabels);
    ui->settable->verticalHeader()->setVisible(false);
    ui->settable->setColumnCount(3);
    ui->settable->setColumnWidth(2, 500);
    ui->settable->setStyleSheet("QScrollBar:vertical {"
                              "    background: #ffffff;"
                              "    width: 10px;"
                              "    margin: 16px 0px 16px 0px;"
                              "}"
                              "QScrollBar::handle:vertical {"
                              "    background: rgb(78, 79, 79);"
                              "    min-height: 10px;"
                              "}"
                              "QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {"
                              "    border: none;"
                              "    background: none;"
                              "}"
                              "QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {"
                              "    background: none;"
                              "}"
                                "#settable{background-color:#ffffff;color:#000000;}"
                               "QTableWidget::item:selected {"
                                "    background-color: #eeeeee;"
                                "color:#000000;"
                                "}");
    socket = new QTcpSocket(this);
    socket->connectToHost(ip,port);
    connect(socket,&QTcpSocket::connected,this,&Home::getAllName_connected_slot);
    connect(socket,&QTcpSocket::readyRead,this,&Home::getAllName_readyRead_slot);

    for (int row = 0; row < ui->settable->rowCount(); ++row) {
        for (int col = 0; col < ui->settable->columnCount(); ++col) {
            QTableWidgetItem *item = new QTableWidgetItem(QString("Row %1, Col %2").arg(row + 1).arg(col + 1));

            // 设置文本居中
            item->setTextAlignment(Qt::AlignCenter);
        }
    }

}



void Home::on_callbtn_2_clicked()
{
    closeAllpage();
    openListPage();
}


void Home::on_callbtn_clicked()
{
    closeAllpage();
    openAdPage();
}


void Home::on_callbtn_3_clicked()
{
    closeAllpage();
    openSetPage();
}


void Home::on_callnamebtn_clicked()
{
    socket = new QTcpSocket(this);
    socket->connectToHost(ip,port);
    connect(socket,&QTcpSocket::connected,this,&Home::callname_connected_slot);
    connect(socket,&QTcpSocket::readyRead,this,&Home::callname_readyRead_slot);
}


void Home::on_addbtn_clicked()
{
    socket = new QTcpSocket(this);
    socket->connectToHost(ip,port);
    connect(socket,&QTcpSocket::connected,this,&Home::addname_connected_slot);
    connect(socket,&QTcpSocket::readyRead,this,&Home::addname_readyRead_slot);
}


void Home::on_deletebtn_clicked()
{
    socket = new QTcpSocket(this);
    socket->connectToHost(ip,port);
    connect(socket,&QTcpSocket::connected,this,&Home::deletename_connected_slot);
    connect(socket,&QTcpSocket::readyRead,this,&Home::deletename_readyRead_slot);


}


void Home::on_backbtn_clicked()
{
    // 创建 Widget 窗口
    Widget *w = new Widget();
    // 显示 Widget 窗口
    w->show();
    // 关闭当前 Home 窗口
    this->close();
}


void Home::on_searchbtn_clicked()
{
    socket = new QTcpSocket(this);
    socket->connectToHost(ip,port);
    connect(socket,&QTcpSocket::connected,this,&Home::searchname_connected_slot);
    connect(socket,&QTcpSocket::readyRead,this,&Home::searchname_readyRead_slot);
}


本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/379346.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

PlateUML绘制UML图教程

UML&#xff08;Unified Modeling Language&#xff09;是一种通用的建模语言&#xff0c;广泛用于软件开发中对系统进行可视化建模。PlantUML是一款强大的工具&#xff0c;通过简单的文本描述&#xff0c;能够生成UML图&#xff0c;包括类图、时序图、用例图等。PlantUML是一款…

彩虹系统7.0免授权+精美WAP端模板源码

最低配置环境 PHP7.2 1、上传源码到网站根目录&#xff0c;导入数据库文件 2、修改数据库配置文件&#xff1a;/config.php 3、后台&#xff1a;/admin 账号&#xff1a; 4、前台用户&#xff1a;123456 密码&#xff1a;1234561

请手写几种js排序算法

什么是排序算法 冒泡排序选择排序插入排序快速排序归并排序&#xff08;Merge Sort&#xff09; 思想实现测试分析动画 快速排序 &#xff08;Quick Sort&#xff09; 思想实现测试分析动画 思考&#xff1a;快排和归并用的都是分治思想&#xff0c;递推公式和递归代码也非常相…

【数据分享】1929-2023年全球站点的逐月平均风速(Shp\Excel\免费获取)

气象数据是在各项研究中都经常使用的数据&#xff0c;气象指标包括气温、风速、降水、能见度等指标&#xff0c;说到气象数据&#xff0c;最详细的气象数据是具体到气象监测站点的数据&#xff01; 有关气象指标的监测站点数据&#xff0c;之前我们分享过1929-2023年全球气象站…

[算法前沿]--058- LangChain 构建 LLM 应用详细教程

什么是LLMs? LLM,即大型语言模型,是指经过大量文本数据训练的最先进的语言模型。它利用深度学习技术来理解和生成类似人类的文本,使其成为各种应用程序的强大工具,例如文本完成、语言翻译、情感分析等。LLMs最著名的例子之一是 OpenAI 的 GPT-3,它因其语言生成能力而受到…

《MySQL 简易速速上手小册》第5章:高可用性和灾难恢复(2024 最新版)

文章目录 5.1 构建高可用性 MySQL 解决方案5.1.1 基础知识5.1.2 重点案例&#xff1a;使用 Python 构建高可用性的电子商务平台数据库5.1.3 拓展案例 5.2 数据备份策略和工具5.2.1 基础知识5.2.2 重点案例&#xff1a;使用 Python 实现 MySQL 定期备份5.2.3 拓展案例 5.3 灾难恢…

【网工】华为设备命令学习(服务器发布)

本次实验主要是内网静态nat配置没&#xff0c;对外地址可以理解为一台内网的服务器&#xff0c;外网设备可以ping通内网的服务器设备&#xff0c;但是ping不通内网的IP。 除了AR1设备配置有区别&#xff0c;其他设备都是基础IP的配置。 [Huawei]int g0/0/0 [Huawei-GigabitEt…

排序算法---快速排序

原创不易&#xff0c;转载请注明出处。欢迎点赞收藏~ 快速排序是一种常用的排序算法&#xff0c;采用分治的策略来进行排序。它的基本思想是选取一个元素作为基准&#xff08;通常是数组中的第一个元素&#xff09;&#xff0c;然后将数组分割成两部分&#xff0c;其中一部分的…

在Visual Studio中引用和链接OpenSceneGraph (OSG) 库

在Visual Studio中引用和链接OpenSceneGraph (OSG) 库&#xff0c;按照以下步骤操作&#xff1a; 构建或安装OSG库 下载OpenSceneGraph源代码&#xff08;如3.0版本&#xff09;并解压。使用CMake配置项目&#xff0c;为Visual Studio生成解决方案文件。通常您需要设置CMake中的…

PHPExcel导出excel

PHPExcel下载地址 https://gitee.com/mirrors/phpexcelhttps://github.com/PHPOffice/PHPExcel 下载后目录结构 需要的文件如下图所示 将上面的PHPExcel文件夹和PHPExcel.php复制到你需要的地方 这是一个简单的示例代码 <?php$dir dirname(__FILE__); //require_once …

电脑通电自启动设置

首先要进入BIOS&#xff0c;以华硕为例&#xff0c;按下电源键&#xff0c;在开机之前按下delete键&#xff0c;其他电脑可能是esc或者某个f键&#xff0c;请自行查找。 进入BIOS后要找到电源管理&#xff0c;可以在高级选项中找一找&#xff0c;如上图右下角选择高级模式。 …

【DDD】学习笔记-理解领域模型

Eric Evans 的领域驱动设计是对软件设计领域的一次重新审视&#xff0c;是在面向对象语言大行其道时对数据建模的“拨乱反正”。Eric 强调了模型的重要性&#xff0c;例如他在书中总结了模型在领域驱动设计中的作用包括&#xff1a; 模型和设计的核心互相影响模型是团队所有成…

基于微信小程序的校园二手交易平台

博主介绍&#xff1a;✌程序员徐师兄、7年大厂程序员经历。全网粉丝12w、csdn博客专家、掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java技术领域和毕业项目实战✌ &#x1f345;文末获取源码联系&#x1f345; &#x1f447;&#x1f3fb; 精彩专栏推荐订阅&#x1f447;…

Linux下代码的运行

在Windows环境下&#xff0c;我们代码都是在集成开发环境下运行&#xff0c;也就是说代码的编辑、编译、调试、运行都在一个软件上&#xff0c;而在Linux环境下这些都是分开执行的。 Linux编辑器-vim vim是一款多模式编辑器&#xff0c;vim有很多模式&#xff0c;最常用的三个…

idea: 无法创建Java Class文件(SpringBoot)已解决

第一&#xff1a;点击file-->project Sructure... 第二步&#xff1a;点击Moudules 选择自己需要创建java的文件夹&#xff08;我这里选择的是main&#xff09;右键点击Sources&#xff0c;然后点击OK即可 然后就可以创建java类了

【漏洞复现】EasyCVR智能边缘网关用户信息泄漏漏洞

Nx01 产品简介 EasyCVR智能边缘网关是一种基于边缘计算和人工智能技术的设备&#xff0c;旨在提供高效的视频监控和智能分析解决方案。它结合了视频监控摄像头、计算能力和网络连接&#xff0c;能够在现场进行视频数据处理和分析&#xff0c;减轻对中心服务器的依赖。 Nx02 漏…

【深度学习】pytorch 与 PyG 安装(pip安装)

【深度学习】pytorch 与 PyG 安装&#xff08;pip安装&#xff09; 一、PyTorch安装和配置&#xff08;一&#xff09;、安装 CUDA&#xff08;二&#xff09;、安装torch、torchvision、torchaudio三个组件&#xff08;1&#xff09;下载镜像文件&#xff08;2&#xff09;创建…

智慧自助餐饮系统(SpringBoot+MP+Vue+微信小程序+JNI+ncnn+YOLOX-Nano)

一、项目简介 本项目是配合智慧自助餐厅下的一套综合系统&#xff0c;该系统分为安卓端、微信小程序用户端以及后台管理系统。安卓端利用图像识别技术进行识别多种不同菜品&#xff0c;识别成功后安卓端显示该订单菜品以及价格并且生成进入小程序的二维码&#xff0c;用户扫描…

【芯片设计- RTL 数字逻辑设计入门 7 -- 同步复位与异步复位详细介绍】

文章目录 复位的类型和划分同步复位综合后电路优缺点 异步复位优缺点 异步复位的时序分析&#xff08;recovery time/removal time&#xff09;异步复位&#xff0c;同步释放综合后电路优缺点 转自&#xff1a;https://blog.csdn.net/qq_40281783/article/details/128969188 复…

使用Python语言生成区块链地址

# 单次运行 import binascii import sha3 from ecdsa import SigningKey, SECP256k1priv SigningKey.generate(curveSECP256k1) # 生成私钥 pub priv.get_verifying_key() # 生成公钥keccak sha3.keccak_256() keccak.update(pub.to_string()) # keccak_256哈希运算 addr…