基于Java(SpringBoot)+MySQL+Vue實現的平行志愿錄取系統

基于spring boot+vue實現的平行志愿錄取系統

1.項目簡介

這兩天干上高考出成績,有不少親戚家的孩子今年高考,和我詢問關于報志愿的問題。老家河北今年是采用所謂的平行志愿。我看了很多的資料才明白什么叫所謂的“平行志愿”。

整個流程好像很是復雜。我突發奇想,心想何不自己編寫一個程序來模擬一下這個所謂的錄取過程呢。

考生成績和志愿是機密類的數據,向我們這樣的平頭百姓向那倒是不太可能的事情,那么就只能自己寫個程序生成一份模擬的成績和志愿數據。

成績比較好辦,因為有個參考,那就是省教育考試院放出的“一分一段成績統計表”。這個東西提供了我們模擬成績數據的很多信息:一是考生的人數,每個分數下的人數都寫得很清楚;二是成績的分布情況,即在不同成績段的考生人數都十分詳細的列出。

2.思路分析

高考填報志愿非常重要,關于志愿填報及院校錄取規則,我們看完院校投檔原理就明白了。

假如甲同學610分乙同學609分。甲報考的志愿,第一個是北郵,第二個是北林;乙同學,第一個報北林,第二個報了北京工業大學。那么問題來了,如果考生甲沒有被他的第一志愿北京郵電大學提檔,那么對于北京林業大學來說,會優先檢索誰的志愿呢?當然是甲同學的,因為平行志愿的錄取規則是分數優先,遵循志愿。那什么叫分數優先,甲乙高考分數,誰的分數高,甲同學高。那么,甲同學的就會優先被他所在省份的教育考試院的電腦檢索系統檢索。那在檢索的時候,考生乙的檔案是屬于停滯狀態的。先看甲同學報的所有志愿,然后再看乙同學報的志愿。所以通過這個案例,我們就知道分數優先,遵循志愿。按照每個考生他所報的志愿從第一個到第二個都是按照這種平行的順序依次進行提檔。那么被提檔之后,這名考生等同于他的提檔機會就沒有了。

那再看第二個問題,如果說考生甲被第一志愿提檔了,但是報專業的時候因為一些因素被退檔了。那么考生甲被退檔之后,它還能再向北京林業大學繼續投檔嗎?答案是否定的。因為一輪投檔就一次機會,如果北京郵電大學被退了,那么我們就會去一批征集志愿,或者是二批次。如果是整個本科批次合并的,就會一退到底,直接到專科或者復讀。很多省份在2019年是最后一屆文理分科。那么對于2020年之后,我們都是新高考選科,那么您想復讀的話可能不符合復讀,或者再報考的要求。所以今年對于2019年高三的家長來說,今年壓力比往年都要大,我們必須要保證我們孩子報考的志愿一次性成功,不能復讀。

3.項目開發

3.1技術棧

  • JDK8
  • MySQL5.7
  • springboot2.3
  • maven3.6.3(需要安裝,否則沒有依賴)
  • vue2.0(前端開發環境,并不必需)
  • vue-cli3(前端開發環境,并不必需)

3.2環境配置

  • 打開Mysql,創建數據庫
CREATE DATABASE `<你的數據庫名>` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci';
-- 例如:CREATE DATABASE `db_enroll` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci';
  • 進入數據庫,運行sql文件,在sql文件夾下,可以把sql放在一個沒有中文路徑的地方,否則有可能出錯
-- 進入剛剛創建的數據庫
use db_enroll;
-- 運行路徑下的sql文件
source /path/to/sql/db_enroll.sql
  • 修改springboot配置文件application.yml,找到下面配置
enroll:login:# 登錄用戶名adminName: admin# 登錄密碼adminPass: 123456# 改為自己的數據庫名database: DATABASE_NAME# 改為自己的數據庫密碼(賬號默認root)dbpass: MYSQL_PASSWORD

3.3項目配置

spring:datasource:username: rootpassword: ${enroll.dbpass}url: jdbc:mysql://localhost:3306/${enroll.database}?serverTimezone=GMT%2B8&allowMultiQueries=truedriver-class-name: com.mysql.cj.jdbc.Drivertype: com.alibaba.druid.pool.DruidDataSourcedruid:# 連接池的配置信息# 初始化大小,最小,最大initial-size: 5min-idle: 5maxActive: 20# 配置獲取連接等待超時的時間maxWait: 60000# 配置間隔多久才進行一次檢測,檢測需要關閉的空閑連接,單位是毫秒timeBetweenEvictionRunsMillis: 60000# 配置一個連接在池中最小生存的時間,單位是毫秒minEvictableIdleTimeMillis: 300000validationQuery: SELECT 1testWhileIdle: truetestOnBorrow: falsetestOnReturn: false# 打開PSCache,并且指定每個連接上PSCache的大小poolPreparedStatements: truemaxPoolPreparedStatementPerConnectionSize: 20# 配置監控統計攔截的filters,去掉后監控界面sql無法統計,'wall'用于防火墻filters: stat,slf4j# 通過connectProperties屬性來打開mergeSql功能;慢SQL記錄connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000# 配置DruidStatFilterweb-stat-filter:enabled: trueurl-pattern: "/*"exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*"# 配置DruidStatViewServletstat-view-servlet:url-pattern: "/druid/*"# IP白名單(沒有配置或者為空,則允許所有訪問)allow: 127.0.0.1,192.168.163.1# IP黑名單 (存在共同時,deny優先于allow)reset-enable: false# 登錄名login-username: admin# 登錄密碼login-password: 123456filter:wall:config:multi-statement-allow: trueinitialization-mode: ALWAYSschema:- classpath:sql/schema.sqlinitialize: truedevtools:restart:enabled: truejackson:time-zone: GMT+8date-format: yyyy-MM-dd HH:mm:ss
mybatis:configuration:map-underscore-to-camel-case: truemapper-locations:- classpath:mybatis/mapper/*.xmltype-aliases-package: org.enroll.pojoenroll:login:adminName: adminadminPass: 123456database: db_enrolldbpass: 15975867048

3.4配置類

全局異常捕捉

package org.enroll.configuration;import org.enroll.interceptor.LoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.Resource;
import org.springframework.jdbc.datasource.init.DataSourceInitializer;
import org.springframework.jdbc.datasource.init.DatabasePopulator;
import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;import javax.sql.DataSource;
import java.util.HashMap;@Configuration
public class EnrollConfig implements WebMvcConfigurer {@AutowiredLoginInterceptor interceptor;@Value("classpath:sql/schema.sql")private Resource dataScript;@Overridepublic void addInterceptors(InterceptorRegistry registry) {InterceptorRegistration registration = registry.addInterceptor(interceptor);registration.addPathPatterns("/**");registration.excludePathPatterns("/login/doLogin");}@Overridepublic void addCorsMappings(CorsRegistry registry) {registry.addMapping("/**").allowedOrigins("http://localhost:8000").allowedMethods("GET","HEAD","POST","PUT","DELETE","OPTIONS").allowedHeaders("*").allowCredentials(true).maxAge(3600).allowedHeaders("*");}@Beanpublic HashMap<String, Object> globalStorage(){return new HashMap<>();}@Beanpublic DataSourceInitializer dataSourceInitializer(final DataSource dataSource) {final DataSourceInitializer initializer = new DataSourceInitializer();initializer.setDataSource(dataSource);initializer.setDatabasePopulator(databasePopulator());initializer.afterPropertiesSet();return initializer;}private DatabasePopulator databasePopulator() {final ResourceDatabasePopulator populator = new ResourceDatabasePopulator();populator.addScript(dataScript);return populator;}
}

登陸信息類

package org.enroll.configuration;import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;@Data
@Component
@ConfigurationProperties(prefix = "enroll.login")
public class LoginProperties {private String adminName;private String adminPass;
}

攔截器


@Component
public class LoginInterceptor implements HandlerInterceptor {@Resource(name = "globalStorage")Map<String, Object> storage;public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
//        if(request.getSession().equals(storage.get("authSession")))
//            return true;
//        response.setCharacterEncoding("UTF-8");
//        response.setContentType("application/json");
//        response.getWriter().println("{\"code\":\"010\",\"data\":null,\"message\":\"未登錄\"}");
//        return false;return true;}
}

3.5常用工具類

查詢結果集

@Data
public class QueryResultOption {private Integer rank;private Integer departmentId;private String majorId;}

json常量

@Getter
@Setter
@AllArgsConstructor
public class JsonResponse {public static final String OK = "000";public static final String SYSTEM_ERROR = "100";public static final String INVALID_REQUEST = "001";public static final String AUTH_ERR = "010";private String code;private Object data;private String message;}

3.6業務代碼

@RestController
@RequestMapping("/student")
public class StudentController {@AutowiredIStudentService studentService;@RequestMapping("/getStudentRaw")public JsonResponse getStudentRaw(@RequestParam(required = false, defaultValue = "1") Integer currentPage){if(currentPage == null || currentPage<=0)return new JsonResponse(JsonResponse.INVALID_REQUEST,null, null);return new JsonResponse(JsonResponse.OK, studentService.getStudentRaw(currentPage), null);}@RequestMapping("/getAdjustStudentRaw")public JsonResponse getAdjustStudentRaw(@RequestParam(required = false, defaultValue = "1") int currentPage){return new JsonResponse(JsonResponse.OK, studentService.getAdjustStudentRaw(currentPage), null);}@RequestMapping("/getExitStudentRaw")public JsonResponse getExitStudentRaw(@RequestParam(required = false, defaultValue = "1") int currentPage){return new JsonResponse(JsonResponse.OK, studentService.getExitStudentRaw(currentPage), null);}@RequestMapping("/doEnroll")public JsonResponse doEnroll(){studentService.doEnroll();return new JsonResponse(JsonResponse.OK, null, null);}@RequestMapping("/doAdjust")public JsonResponse doAdjust(){studentService.doAdjust();return new JsonResponse(JsonResponse.OK, null, null);}//    StatisticsResult getResult(int currentPage, boolean desc);@RequestMapping("/getResult")public JsonResponse getResult(@RequestParam(required = false, defaultValue = "1") int currentPage,@RequestParam(required = false, defaultValue = "false") boolean desc,QueryResultOption option){return new JsonResponse(JsonResponse.OK, studentService.getResult(currentPage, desc, option), null);}
//    StatisticsResult getResultByDepartment( int departmentId, int currentPage, boolean desc);/*** @description t通過學院、專業、排名查詢已棄用,請使用上面的getResult* @author 李宏鑫* @param null* @return* @updateTime 2021/1/7 20:53* @throws*/@RequestMapping("/getResultByDepartment")@Deprecatedpublic JsonResponse getResultByDepartment(int departmentId, @RequestParam(required = false, defaultValue = "1") int currentPage, @RequestParam(required = false, defaultValue = "false") boolean desc){return new JsonResponse(JsonResponse.OK, studentService.getResultByDepartment(departmentId, currentPage, desc), null);}
//    StatisticsResult getResultByMajor( String majorId, int currentPage, boolean desc);@RequestMapping("/getResultByMajor")@Deprecatedpublic JsonResponse getResultByMajor(String majorId, @RequestParam(required = false, defaultValue = "1") int currentPage, @RequestParam(required = false, defaultValue = "false") boolean desc){return new JsonResponse(JsonResponse.OK, studentService.getResultByMajor(majorId, currentPage, desc), null);}@RequestMapping("/searchStudent")@Deprecatedpublic JsonResponse searchStudent(@RequestParam(required = false, defaultValue = "1") int currentPage,String keyword){return new JsonResponse(JsonResponse.OK, studentService.searchStudent(currentPage,keyword), null);}@RequestMapping("/searchStudentByCandidate")public JsonResponse searchStudentByCandidate(@RequestParam(required = false, defaultValue = "1") int currentPage,String keyword){return new JsonResponse(JsonResponse.OK, studentService.searchStudentByCandidate(currentPage,keyword), null);}@RequestMapping("/getStudentBeforeRank")public JsonResponse getStudentBeforeRank(@RequestParam(required = false, defaultValue = "1") int currentPage, int rank){return new JsonResponse(JsonResponse.OK, studentService.getStudentBeforeRank(currentPage, rank), null);}@RequestMapping("/getStatisticsResult")public JsonResponse getStatisticsResult(){return new JsonResponse(JsonResponse.OK, studentService.getStatisticsResult(), null);}
//    List<Map<String, Object>> getResultInDepartment(int departmentId);@RequestMapping("/getStatisticsResultInDepartment")public JsonResponse getStatisticsResultInDepartment(){return new JsonResponse(JsonResponse.OK, studentService.getStatisticsResultInDepartment(), null);}
//    List<Map<String, Object>> getResultInMajor(String majorId);@RequestMapping("/getStatisticsResultInMajor")public JsonResponse getStatisticsResultInMajor(){return new JsonResponse(JsonResponse.OK, studentService.getStatisticsResultInMajor(), null);}//    Map<String, Integer> getDistribute();@RequestMapping("/getDistribute")public JsonResponse getDistribute(){return new JsonResponse(JsonResponse.OK, studentService.getDistribute(), null);}//    Map<String, Integer> getDistributeInProvince(String province);@RequestMapping("/getDistributeInProvince")public JsonResponse getDistributeInProvince(String province){return new JsonResponse(JsonResponse.OK, studentService.getDistributeInProvince(province), null);}//    Map<String, Integer> getGradeDistribute();@RequestMapping("/getGradeDistribute")public JsonResponse getGradeDistribute(){return new JsonResponse(JsonResponse.OK, studentService.getGradeDistribute(), null);}//    Map<String, Integer> getGradeDistributeByDepartment( int departmentId);@RequestMapping("/getGradeDistributeByDepartment")public JsonResponse getGradeDistributeByDepartment(int departmentId){return new JsonResponse(JsonResponse.OK, studentService.getGradeDistributeByDepartment(departmentId), null);}//    Map<String, Integer> getGradeDistributeByMajor(String majorId);@RequestMapping("/getGradeDistributeByMajor")public JsonResponse getGradeDistributeByMajor(String majorId){return new JsonResponse(JsonResponse.OK, studentService.getGradeDistributeByMajor(majorId), null);}//    Map<String, Integer> getCountDistributeInDepartment();@RequestMapping("/getCountDistributeInDepartment")public JsonResponse getCountDistributeInDepartment(){return new JsonResponse(JsonResponse.OK, studentService.getCountDistributeInDepartment(), null);}//    Map<String, Integer> getCountDistributeInMajor();@RequestMapping("/getCountDistributeInMajor")public JsonResponse getCountDistributeInMajor(){return new JsonResponse(JsonResponse.OK, studentService.getCountDistributeInMajor(), null);}//    Map<String, Integer> getCountDistributeInMajorByDepartment(int departmentId);@RequestMapping("/getCountDistributeInMajorByDepartment")public JsonResponse getCountDistributeInMajorByDepartment(int departmentId){return new JsonResponse(JsonResponse.OK, studentService.getCountDistributeInMajorByDepartment(departmentId), null);}@RequestMapping("/reset")@Deprecatedpublic JsonResponse reset(){studentService.reset();return new JsonResponse(JsonResponse.OK, null, null);}@RequestMapping("/formalReady")@Deprecatedpublic JsonResponse formalReady(){studentService.formallyReady();return new JsonResponse(JsonResponse.OK, null, null);}
}

3.7前端代碼

<template><div id="back-stage-student-info"><empty-data v-if="studentInfo == null || studentInfo.length === 0"/><div id="student-plan-info" v-else><table-row-count :count="total"></table-row-count><el-table:data="studentInfo"stripestyle="width: 100%"><el-table-columnprop="candidate"label="準考證號"width="110"></el-table-column><el-table-columnprop="studentName"label="姓名"></el-table-column><el-table-columnprop="totalGrade"label="總分"></el-table-column><el-table-columnprop="rank"label="排名"></el-table-column><el-table-columnprop="will1"label="志愿1"></el-table-column><el-table-columnprop="will2"label="志愿2"></el-table-column><el-table-columnprop="will3"label="志愿3"></el-table-column><el-table-columnprop="will4"label="志愿4"></el-table-column><el-table-columnprop="will5"label="志愿5"></el-table-column><el-table-columnprop="will6"label="志愿6"></el-table-column><el-table-columnprop="province"label="省份"></el-table-column><el-table-columnprop="city"label="城市"></el-table-column><el-table-columnprop="subjectType"label="科類"></el-table-column></el-table><div class="page-bar" ><el-paginationlayout="prev, pager, next, jumper"@current-change="changePage":page-size="50":current-page.sync="currentPage"hide-on-single-page:total="total"></el-pagination></div></div></div>
</template><script>import {request} from "../../network/request";import EmptyData from "./EmptyData"import TableRowCount from './TableRowCount'export default {name: "StudentInfo",data() {return {studentInfo: null,currentPage: 1,total: 0,loading: null}},methods: {changePage(){this.loadStudentInfo();},loadStudentInfo(){this.setLoading();request({url: 'student/getStudentRaw',params: {currentPage: this.currentPage}}) .then( res => {if (res.code === '000'){this.studentInfo = res.data.list;this.total = res.data.total;} else {this.$message.error(res.message)}}).catch( err => {this.$message.error('系統錯誤')}).finally( () => {this.setUnloading();})},setLoading(){this.loading = this.$loading({lock: true,text: 'Loading',spinner: 'el-icon-loading',background: 'rgba(0, 0, 0, 0.7)'});},setUnloading(){this.loading.close();}},created(){this.loadStudentInfo();},components: {EmptyData,TableRowCount}}
</script><style scoped lang="less">.page-bar{width: 500px;margin: 30px auto;}
</style>

4.項目演示

4.1登錄

4.2導入(測試文件在excel文件夾下,數據為隨機模擬)

表格信息

4.3統計信息

4.4生源地分布

4.5導出結果

5.總結

廣東工業大學課程設計 數據庫課程設計 平行志愿錄取系統(后端代碼,廣東工業大學數據庫大作業) 基于java、spring、MySQL數據庫、vue.js的課程設計

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/894779.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/894779.shtml
英文地址,請注明出處:http://en.pswp.cn/news/894779.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

chrome瀏覽器chromedriver下載

chromedriver 下載地址 https://googlechromelabs.github.io/chrome-for-testing/ 上面的鏈接有和當前發布的chrome瀏覽器版本相近的chromedriver 實際使用感受 chrome瀏覽器會自動更新&#xff0c;可以去下載最新的chromedriver使用&#xff0c;自動化中使用新的chromedr…

Redis常見數據類型與編碼方式

??前言?? 本小節圍繞Redis中常見的數據類型與編碼方式展開。 &#x1f349;歡迎點贊 &#x1f44d; 收藏 ?留言評論 &#x1f349;博主將持續更新學習記錄收獲&#xff0c;友友們有任何問題可以在評論區留言 &#x1f349;博客中涉及源碼及博主日常練習代碼均已上傳GitHu…

win編譯openssl

一、perl執行腳本 1、安裝perl腳本 perl安裝 2、配置perl腳本 perl Configure VC-WIN32 no-asm no-shared --prefixE:\openssl-x.x.x\install二、編譯openssl 1、使用vs工具編譯nmake 如果使用命令行nmake編譯會提示“無法打開包括文件: “limits.h”“ 等錯誤信息 所以…

【Kubernetes Pod間通信-第2篇】使用BGP實現Pod到Pod的通信

Kubernetes中Pod間的通信 本系列文章共3篇: 【Kubernetes Pod間通信-第1篇】在單個子網中使用underlay網絡實現Pod到Pod的通信【Kubernetes Pod間通信-第2篇】使用BGP實現Pod到Pod的通信(本文介紹)【Kubernetes Pod間通信-第3篇】Kubernetes中Pod與ClusterIP服務之間的通信…

< 自用文兒 > 下載 MaxMind GeoIP Databases 對攻擊的 IP 做 地理分析

起因 兩個 VPM/VPS&#xff0c;安裝了 fail2ban 去攔截密碼窮舉攻擊。每天的記錄都在增長&#xff0c;以前復制屏幕輸出就行&#xff0c;一屏的內容還容易粘貼出來的。昨天已經過 500 條&#xff0c;好奇 fail2ban 是如何存儲這些內容的&#xff1f;就發現它在使用 SQLite3 數…

SpringCloudGateWay和Sentinel結合做黑白名單來源控制

假設我們的分布式項目&#xff0c;admin是8087&#xff0c;gateway是8088&#xff0c;consumer是8086 我們一般的思路是我們的請求必須經過我們的網關8088然后網關轉發到我們的分布式項目&#xff0c;那我要是沒有處理我們繞過網關直接訪問項目8087和8086不也是可以&#xff1…

C#面試常考隨筆12:游戲開發中常用的設計模式【C#面試題(中級篇)補充】

C#面試題&#xff08;中級篇&#xff09;&#xff0c;詳細講解&#xff0c;幫助你深刻理解&#xff0c;拒絕背話術&#xff01;-CSDN博客 簡單工廠模式 優點&#xff1a; 根據條件有工廠類直接創建具體的產品 客戶端無需知道具體的對象名字&#xff0c;可以通過配置文件創建…

數字人|通過語音和圖片來創建高質量的視頻

簡介 arXiv上的計算機視覺領域論文&#xff1a; AniPortrait: Audio-Driven Synthesis of Photorealistic Portrait Animation AniPortrait&#xff1a;照片級真實感肖像動畫的音頻驅動合成 核心內容圍繞一種新的人像動畫合成框架展開。 研究內容 提出 AniPortrait 框架&a…

數據結構實戰之線性表(三)

目錄 1.順序表釋放 2.順序表增加空間 3.合并順序表 4.線性表之鏈表實現 1.項目結構以及初始代碼 2.初始化鏈表(不帶頭結點) 3.鏈表尾部插入數據并顯示 4.鏈表頭部插入數據 5.初始化鏈表&#xff08;帶頭結點&#xff09; 6.帶頭結點的鏈表頭部插入數據并顯示 7.帶頭結…

Docker使用指南(一)——鏡像相關操作詳解(實戰案例教學,適合小白跟學)

目錄 1.鏡像名的組成 2.鏡像操作相關命令 鏡像常用命令總結&#xff1a; 1. docker images 2. docker rmi 3. docker pull 4. docker push 5. docker save 6. docker load 7. docker tag 8. docker build 9. docker history 10. docker inspect 11. docker prune…

C++基礎day1

前言&#xff1a;謝謝阿秀&#xff0c;指路阿秀的學習筆記 一、基礎語法 1.構造和析構: 類的構造函數是一種特殊的函數&#xff0c;在創建一個新的對象時調用。類的析構函數也是一種特殊的函數&#xff0c;在刪除所創建的對象時調用。 構造順序&#xff1a;父類->子類 析…

嘗試ai生成figma設計

當聽到用ai 自動生成figma設計時&#xff0c;不免好奇這個是如何實現的。在查閱了不少資料后&#xff0c;有了一些想法。參考了&#xff1a;在figma上使用腳本自動生成色譜 這篇文章提供的主要思路是&#xff1a;可以通過腳本的方式構建figma設計。如果我們使用ai 生成figma腳本…

iOS 老項目適配 #Preview 預覽功能

前言 iOS 開發者 最憋屈的就是UI 布局慢,一直以來沒有實時預覽功能,雖然swiftUI 早就支持了,但是目前主流還是使用UIKit在布局,iOS 17 蘋果推出了 #Preview 可以支持UIKit 實時預覽,但是僅僅是 iOS 17,老項目怎么辦呢?于是就有了這篇 老項目適配 #Preview 預覽 的文章,…

【分布式架構理論2】分布式架構要處理的問題及解決方案

文章目錄 1. 應用服務拆分2. 分布式調用3. 分布式協同4. 分布式計算5. 分布式存儲6. 分布式資源管理與調度7. 高性能與可用性優化8. 指標與監控 將分布式架構需要解決的問題按照順序列舉為如下幾步 問題分類具體內容應用服務拆分分布式是用分散的服務和資源代替集中的服務和資…

【PyQt】pyqt小案例實現簡易文本編輯器

pyqt小案例實現簡易文本編輯器 分析 實現了一個簡單的文本編輯器&#xff0c;使用PyQt5框架構建。以下是代碼的主要功能和特點&#xff1a; 主窗口類 (MyWindow): 繼承自 QWidget 類。使用 .ui 文件加載用戶界面布局。設置窗口標題、狀態欄消息等。創建菜單欄及其子菜單項&…

Unity中的虛擬相機(Cinemachine)

Unity Cinemachine詳解 什么是Cinemachine Cinemachine是Unity官方推出的智能相機系統&#xff0c;它提供了一套完整的工具來創建復雜的相機運動和行為&#xff0c;而無需編寫大量代碼。它能夠大大簡化相機管理&#xff0c;提高游戲開發效率。 Cinemachine的主要組件 1. Vi…

【PyQt】getattr動態訪問對象的屬性

問題 使用qtdesigner設計好大體的軟件結構&#xff0c;需要使用代碼進行批量修改控件樣式,self.ui.x 會被解釋為訪問 self.ui 中名為 x 的屬性&#xff0c;而不是將 x 作為變量名來解析&#xff0c;此時需要通過字符串動態訪問 self.ui 中的按鈕對象 for i in range(20):x f…

【電腦系統】電腦突然(藍屏)卡死發出刺耳聲音

文章目錄 前言問題描述軟件解決方案嘗試硬件解決方案嘗試參考文獻 前言 在 更換硬盤 時遇到的問題&#xff0c;有時候只有卡死沒有藍屏 問題描述 更換硬盤后&#xff0c;電腦用一會就卡死&#xff0c;藍屏&#xff0c;顯示藍屏代碼 UNEXPECTED_STORE_EXCEPTION 軟件解決方案…

DEEPSEKK GPT等AI體的出現如何重構工廠數字化架構:從設備控制到ERP MES系統的全面優化

隨著深度學習&#xff08;DeepSeek&#xff09;、GPT等先進AI技術的出現&#xff0c;工廠的數字化架構正在經歷前所未有的變革。AI的強大處理能力、預測能力和自動化決策支持&#xff0c;將大幅度提升生產效率、設備管理、資源調度以及產品質量管理。本文將探討AI體&#xff08…

【大模型LLM面試合集】大語言模型架構_Transformer架構細節

Transformer架構細節 1.Transformer各個模塊的作用 &#xff08;1&#xff09;Encoder模塊 經典的Transformer架構中的Encoder模塊包含6個Encoder Block. 每個Encoder Block包含兩個?模塊, 分別是多頭?注意?層, 和前饋全連接層. 多頭?注意?層采?的是?種Scaled Dot-Pr…