├── .gitattributes ├── .gitignore ├── Knowledge_Graph ├── Paper │ ├── OWL2Vec.md │ └── image │ │ ├── image-20220819182137145.png │ │ ├── image-20220819194415334.png │ │ ├── v2-9a4499ed6bc4e4556214ed81d616a3d9_r.jpg │ │ └── 屏幕截图 2022-08-19 233054.png ├── README.md ├── SparQL语句 │ ├── SPARQL语法(上).md │ └── SparQL入门.md ├── Wikidata │ └── Wikidata datamodel.md └── 知识图谱学习笔记.md ├── LICENSE ├── README.md ├── compiler_Experiment ├── README.md ├── data │ ├── lexical.txt │ ├── lexical_out.txt │ ├── syntax.txt │ └── syntax_out.txt ├── image │ ├── DFA-Mini.png │ ├── DFA.png │ ├── NFA.png │ ├── image-20221226181802592.png │ ├── image-20221226181844710.png │ ├── image-20221226182328017.png │ ├── image-20221227151058864.png │ └── image-20221227151131934.png └── src │ ├── Main.java │ ├── lexical_Analyzer │ ├── AcceptState.java │ ├── ConstructionTable.java │ ├── LexicalAnalyzer.java │ ├── Token.java │ └── character │ │ ├── Digit.java │ │ ├── Division.java │ │ ├── Equal.java │ │ ├── InputCharacter.java │ │ ├── LeftBracket.java │ │ ├── Letter.java │ │ ├── Minus.java │ │ ├── Multiple.java │ │ ├── Plus.java │ │ ├── Point.java │ │ ├── RightBracket.java │ │ ├── Semicolon.java │ │ ├── Space.java │ │ └── Underline.java │ └── syntax_Parser │ ├── ForecastTable.java │ ├── SyntaxParser.java │ └── expression │ ├── AbstractExpression.java │ ├── NonterminalExpression.java │ ├── TerminalExpression.java │ ├── nonterminal │ ├── ExpressionE.java │ ├── ExpressionE1.java │ ├── ExpressionF.java │ ├── ExpressionT.java │ └── ExpressionT1.java │ └── terminal │ ├── EmptyString.java │ ├── Id.java │ ├── LeftBracket.java │ ├── Multiple.java │ ├── Plus.java │ ├── RightBracket.java │ └── Terminator.java ├── digital_Image_Process ├── README.md ├── imageProcess │ ├── .gitignore │ ├── graymappingdialog.cpp │ ├── graymappingdialog.h │ ├── graymappingdialog.ui │ ├── imageProcess.pro │ ├── imageinfo.cpp │ ├── imageinfo.h │ ├── imageprocess.cpp │ ├── imageprocess.h │ ├── main.cpp │ ├── mainwindow.cpp │ ├── mainwindow.h │ ├── mainwindow.ui │ ├── parametersetting.cpp │ ├── parametersetting.h │ ├── statelinked.cpp │ ├── statelinked.h │ ├── zoommanagedialog.cpp │ ├── zoommanagedialog.h │ └── zoommanagedialog.ui └── test │ ├── knee.raw │ ├── lung.raw │ └── test.bmp ├── food_Data_Python ├── ReadMe.md ├── foodData │ ├── Data │ │ └── food.csv │ ├── DataAnalysis.py │ └── GetData.py └── image │ ├── csv数据.png │ ├── 分类1.png │ ├── 分类2.png │ ├── 分类3.png │ ├── 查找1.png │ ├── 查找2.png │ ├── 查找3.png │ ├── 网页截图.png │ ├── 网页截图1.png │ ├── 网页截图2.png │ ├── 网页截图3.png │ └── 网页截图4.png ├── learning_Notes ├── image │ ├── NFA.jpg │ ├── image-20220918134843475.png │ ├── image-20220918142652345.png │ ├── image-20220918171723040.png │ ├── image-20221126151220527.png │ ├── image-20221126151537077.png │ ├── image-20221126152530572.png │ ├── image-20221126162936413.png │ ├── image-20221126170728887.png │ ├── image-20221126171020168.png │ ├── image-20221126171113883.png │ ├── image-20221126171158844.png │ ├── image-20221126171245168.png │ ├── image-20221127200007924.png │ ├── image-20221127202836448.png │ ├── image-20221127212325846.png │ ├── image-20221129000605755.png │ ├── image-20221129202322364.png │ ├── image-20221129215915435.png │ ├── image-20221129234129326.png │ ├── image-20221129234412117.png │ ├── image-20221130194025680.png │ ├── image-20221130195136387.png │ ├── image-20221130210258302.png │ ├── image-20221130213441781.png │ ├── image-20221130213604988.png │ ├── image-20221130215008113.png │ ├── image-20221130220042953.png │ ├── image-20221130220525004.png │ ├── image-20221130221401540.png │ ├── image-20221202214000908.png │ ├── image-20221202223744014.png │ ├── image-20221202223916108.png │ ├── image-20221202224040639.png │ ├── image-20221202232952674.png │ ├── image-20221204161900836.png │ ├── image-20221204162205160.png │ ├── image-20221204163905253.png │ ├── image-20221204164000012.png │ ├── image-20221204170343500.png │ ├── image-20221204195222101.png │ ├── image-20221204201432747.png │ ├── image-20221204204512426.png │ ├── image-20221204215502376.png │ ├── image-20221204221719301.png │ ├── image-20221204222524132.png │ ├── image-20221204223312581.png │ ├── image-20221204223823134.png │ ├── image-20221204224829594.png │ ├── image-20221204225225154.png │ ├── image-20221204231248750.png │ ├── image-20221204232804395.png │ ├── image-20221204233102987.png │ ├── image-20221204234824596.png │ ├── image-20221204235926836.png │ ├── image-20221208203604062.png │ ├── image-20221208204330596.png │ ├── image-20221208205802541.png │ ├── image-20221208210834463.png │ ├── image-20221208214321369.png │ ├── image-20221208223457565.png │ ├── image-20221208224233659.png │ ├── image-20221208230243339.png │ ├── image-20221208231952595.png │ ├── image-20221208232922917.png │ ├── image-20221209103204698.png │ ├── image-20221209113039531.png │ ├── image-20221209202515232.png │ ├── image-20221209210751824.png │ ├── image-20221209224058847.png │ ├── image-20221209230325479.png │ ├── image-20221214142533135.png │ ├── image-20221214143300421.png │ ├── image-20230129172628581.png │ ├── image-20230129191956938.png │ ├── image-20230129192142660.png │ ├── image-20230129192500273.png │ ├── image-20230129210758907.png │ ├── image-20230129213719617.png │ ├── image-20230130113737301.png │ ├── image-20230130171105741.png │ ├── image-20230130171259218.png │ ├── image-20230130171605078.png │ ├── image-20230130175756423.png │ ├── image-20230130194228688.png │ ├── image-20230130195825655.png │ ├── image-20230130205835623.png │ ├── image-20230130210714085.png │ ├── image-20230131115217226.png │ ├── image-20230131122531111.png │ ├── image-20230131134949085.png │ ├── image-20230201153611966.png │ ├── image-20230201153647259.png │ ├── image-20230201174018318.png │ ├── image-20230201175059639.png │ ├── image-20230201175229159.png │ ├── image-20230201175400474.png │ ├── image-20230201175530732.png │ ├── image-20230201175733445.png │ ├── image-20230201180451246.png │ ├── image-20230201184807197.png │ ├── image-20230201195948654.png │ ├── image-20230203200841260.png │ ├── image-20230206160128655.png │ ├── image-20230206160453845.png │ ├── image-20230206160612559.png │ ├── image-20230206162243812.png │ ├── image-20230206162527469.png │ ├── image-20230206170149419.png │ ├── image-20230206170711770.png │ ├── image-20230206193748505.png │ ├── image-20230206213205148.png │ ├── image-20230206213634173.png │ ├── image-20230206213723686.png │ ├── image-20230207180453857.png │ ├── image-20230207191811825.png │ ├── image-20230207195316382.png │ ├── image-20230207195813879.png │ ├── image-20230207200254765.png │ ├── image-20230208135204680.png │ ├── image-20230208135833107.png │ ├── image-20230208143928024.png │ ├── image-20230208194116823.png │ ├── image-20230208211608497.png │ ├── image-20230209132658120.png │ ├── image-20230209154021285.png │ ├── image-20230210155101388.png │ ├── image-20230210155131256.png │ ├── image-20230210155706335.png │ ├── image-20230210155805310.png │ ├── image-20230210161617949.png │ ├── image-20230210165655134.png │ ├── image-20230212213158363.png │ ├── image-20230212220220437.png │ ├── image-20230212224217547.png │ ├── image-20230212224419837.png │ ├── image-20230212230429927.png │ ├── image-20230212232753731.png │ ├── image-20230212233115187.png │ ├── image-20230213140246196.png │ ├── image-20230213141152970.png │ ├── image-20230213145744785.png │ ├── image-20230213224124025.png │ ├── image-20230214112628843.png │ ├── image-20230214113356520.png │ ├── image-20230214113550739.png │ ├── image-20230214114116272.png │ ├── image-20230214114437801.png │ ├── image-20230214150155279.png │ ├── image-20230214151326294.png │ ├── image-20230214221845963.png │ ├── image-20230214222430812.png │ ├── image-20230214225140416.png │ ├── image-20230214231914740.png │ ├── image-20230214232229492.png │ ├── image-20230214233525361.png │ ├── image-20230215000627933.png │ ├── image-20230215154559027.png │ ├── image-20230215155611584.png │ ├── image-20230215160614023.png │ ├── image-20230215160904675.png │ ├── image-20230215161146482.png │ ├── image-20230215164825113.png │ ├── image-20230215223524888.png │ ├── image-20230215224605590.png │ ├── image-20230215231652261.png │ ├── image-20230215231917425.png │ ├── image-20230215233757896.png │ ├── image-20230215234715846.png │ ├── image-20230215235546792.png │ ├── image-20230216150036525.png │ ├── image-20230216150303115.png │ ├── image-20230216161651349.png │ ├── image-20230216161927410.png │ ├── image-20230216161949640.png │ ├── image-20230216172437150.png │ ├── image-20230216172528939.png │ ├── image-20230216175843412.png │ ├── image-20230216180036528.png │ ├── image-20230216231327105.png │ ├── image-20230217103850062.png │ ├── image-20230218222118235.png │ ├── image-20230218222545315.png │ ├── image-20230218235117690.png │ ├── image-20230219000618602.png │ ├── image-20230220224109346.png │ ├── image-20230220225559590.png │ ├── image-20230221225810279.png │ ├── image-20230221230120447.png │ ├── image-20230221230512165.png │ ├── image-20230221230735437.png │ ├── image-20230221231303707.png │ ├── image-20230221231624651.png │ ├── image-20230222000508480.png │ └── 继承属性.png ├── 编译原理.md └── 计算机网络.md ├── markdown_catalogue ├── README.md └── create_catalogue.py └── vCampus ├── README.md ├── access_jdbc30.jar ├── src ├── data │ └── vCampusDataBase.mdb ├── socket │ ├── client │ │ ├── ClientListen.java │ │ ├── ClientMain.java │ │ └── ClientSend.java │ ├── server │ │ ├── ServerListen.java │ │ ├── ServerMain.java │ │ └── ServerProcess.java │ └── vo │ │ └── Message.java ├── vCampusModel │ ├── bank │ │ ├── BankManage.java │ │ └── BankRecords.java │ ├── course │ │ ├── Course.java │ │ └── CourseChoose.java │ ├── library │ │ ├── Book.java │ │ └── BookBorrow.java │ ├── shop │ │ ├── Product.java │ │ └── StoreConsumption.java │ ├── user │ │ ├── Student.java │ │ ├── Teacher.java │ │ └── User.java │ └── vo │ │ └── SelectManage.java └── vCampusServer │ ├── dao │ └── BaseDao.java │ ├── mlp │ ├── BankMlp.java │ ├── Login.java │ ├── StoreMlp.java │ └── StuMlp.java │ └── ui │ ├── ServerMain.java │ ├── ServerUI.form │ └── ServerUI.java └── vCampus.iml /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | *.class 10 | 11 | # Precompiled Headers 12 | *.gch 13 | *.pch 14 | 15 | # Compiled Dynamic libraries 16 | *.so 17 | *.dylib 18 | *.dll 19 | 20 | # Fortran module files 21 | *.mod 22 | *.smod 23 | 24 | # Compiled Static libraries 25 | *.lai 26 | *.la 27 | *.a 28 | *.lib 29 | 30 | # Executables 31 | *.exe 32 | *.out 33 | *.app 34 | 35 | # Digital Image Process 36 | 37 | digital_Image_Process/build-imageProcess-Desktop_Qt_5_15_2_MinGW_64_bit-Debug/ 38 | 39 | # compiler_Experiment 40 | compiler_Experiment/.idea/ 41 | compiler_Experiment/compiler_Experiment.iml 42 | -------------------------------------------------------------------------------- /Knowledge_Graph/Paper/image/image-20220819182137145.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/Knowledge_Graph/Paper/image/image-20220819182137145.png -------------------------------------------------------------------------------- /Knowledge_Graph/Paper/image/image-20220819194415334.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/Knowledge_Graph/Paper/image/image-20220819194415334.png -------------------------------------------------------------------------------- /Knowledge_Graph/Paper/image/v2-9a4499ed6bc4e4556214ed81d616a3d9_r.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/Knowledge_Graph/Paper/image/v2-9a4499ed6bc4e4556214ed81d616a3d9_r.jpg -------------------------------------------------------------------------------- /Knowledge_Graph/Paper/image/屏幕截图 2022-08-19 233054.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/Knowledge_Graph/Paper/image/屏幕截图 2022-08-19 233054.png -------------------------------------------------------------------------------- /Knowledge_Graph/README.md: -------------------------------------------------------------------------------- 1 | # Knowledge_Graph 2 | 知识图谱相关知识学习笔记 3 | 4 | - Wikidata 5 | - 维基百科数据模型.md 6 | - SparQL语句 7 | - SparQL入门.md 8 | - SPARQL(上).md 9 | - 知识图谱学习笔记.md 10 | 11 | 12 | 13 | 14 | > 正在学习,持续更新。。。 15 | -------------------------------------------------------------------------------- /Knowledge_Graph/知识图谱学习笔记.md: -------------------------------------------------------------------------------- 1 | # 知识图谱学习笔记 2 | 3 | 4 | 5 | **@ author: Shuxin_Wang** 6 | 7 | **@ time: 2022.08.08** 8 | 9 | 10 | 11 | ***目录*** 12 | 13 | - [知识图谱简介](#知识图谱简介) 14 | 15 | 16 | 17 | 18 | 19 | # 知识图谱简介 20 | 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # college_assignment 2 | 部分课程作业 3 | 4 | **🎉🎉🎉完整代码学习笔记见项目->[https://github.com/A-BigTree/tree-learning-notes](https://github.com/A-BigTree/tree-learning-notes)** 5 | 6 | - Python数据分析课程-食物数据分析(food_Data_Python) 7 | - 知识图谱研讨资料(Knowledge_Graph) 8 | - 暑期vCampus项目设计资料(vCampus) 9 | - 自动生成markdown目录(markdown_catalogue) 10 | - 基于Qt-数字图像处理实验(digital_Image_Process) 11 | - 日常课程笔记(learning_Notes) 12 | - 编译原理.md 13 | - 计算机网络.md 14 | - 。。。 15 | -------------------------------------------------------------------------------- /compiler_Experiment/data/lexical.txt: -------------------------------------------------------------------------------- 1 | aTemp =600; 2 | bTemp= 50.5 + 500; 3 | wsx_2022=aTemp*bTemp; 4 | chy_2023 =2-bTemp; 5 | z=x/2+y*30.5-20; -------------------------------------------------------------------------------- /compiler_Experiment/data/lexical_out.txt: -------------------------------------------------------------------------------- 1 | tempA :Id 2 | * :Operator 3 | ( :Operator 4 | tempB :Id 5 | * :Operator 6 | ( :Operator 7 | tempC :Id 8 | + :Operator 9 | tempD :Id 10 | ) :Operator 11 | ) :Operator 12 | -------------------------------------------------------------------------------- /compiler_Experiment/data/syntax.txt: -------------------------------------------------------------------------------- 1 | tempA *(tempB *(tempC+ tempD)) -------------------------------------------------------------------------------- /compiler_Experiment/data/syntax_out.txt: -------------------------------------------------------------------------------- 1 | Output:E → T E1 2 | Output:T → F T1 3 | Output:F → Id 4 | Match:tempA :Id 5 | Output:T1 → * F T1 6 | Match:* :Operator 7 | Output:F → ( E ) 8 | Match:( :Operator 9 | Output:E → T E1 10 | Output:T → F T1 11 | Output:F → Id 12 | Match:tempB :Id 13 | Output:T1 → * F T1 14 | Match:* :Operator 15 | Output:F → ( E ) 16 | Match:( :Operator 17 | Output:E → T E1 18 | Output:T → F T1 19 | Output:F → Id 20 | Match:tempC :Id 21 | Output:T1 → Empty string 22 | Output:E1 → + T E1 23 | Match:+ :Operator 24 | Output:T → F T1 25 | Output:F → Id 26 | Match:tempD :Id 27 | Output:T1 → Empty string 28 | Output:E1 → Empty string 29 | Match:) :Operator 30 | Output:T1 → Empty string 31 | Output:E1 → Empty string 32 | Match:) :Operator 33 | Output:T1 → Empty string 34 | Output:E1 → Empty string 35 | Match:$ :Separator 36 | -------------------------------------------------------------------------------- /compiler_Experiment/image/DFA-Mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/compiler_Experiment/image/DFA-Mini.png -------------------------------------------------------------------------------- /compiler_Experiment/image/DFA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/compiler_Experiment/image/DFA.png -------------------------------------------------------------------------------- /compiler_Experiment/image/NFA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/compiler_Experiment/image/NFA.png -------------------------------------------------------------------------------- /compiler_Experiment/image/image-20221226181802592.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/compiler_Experiment/image/image-20221226181802592.png -------------------------------------------------------------------------------- /compiler_Experiment/image/image-20221226181844710.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/compiler_Experiment/image/image-20221226181844710.png -------------------------------------------------------------------------------- /compiler_Experiment/image/image-20221226182328017.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/compiler_Experiment/image/image-20221226182328017.png -------------------------------------------------------------------------------- /compiler_Experiment/image/image-20221227151058864.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/compiler_Experiment/image/image-20221227151058864.png -------------------------------------------------------------------------------- /compiler_Experiment/image/image-20221227151131934.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/compiler_Experiment/image/image-20221227151131934.png -------------------------------------------------------------------------------- /compiler_Experiment/src/Main.java: -------------------------------------------------------------------------------- 1 | 2 | import lexical_Analyzer.LexicalAnalyzer; 3 | import lexical_Analyzer.Token; 4 | import syntax_Parser.SyntaxParser; 5 | 6 | import java.util.ArrayList; 7 | 8 | public class Main { 9 | public static void main(String[] args) { 10 | System.out.println("======================================================"); 11 | LexicalAnalyzer.init("data/syntax.txt", "data/lexical_out.txt"); 12 | LexicalAnalyzer.analysisLexical(); 13 | System.out.println("======================================================"); 14 | ArrayList tokens = LexicalAnalyzer.getTokens(); 15 | SyntaxParser.init("data/syntax_out.txt"); 16 | SyntaxParser.syntaxParser(tokens); 17 | } 18 | } -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/AcceptState.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer 5 | * ===================================================== 6 | * Title: AcceptState.java 7 | * Created: [2022/12/26 12:44] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/26, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | 17 | package lexical_Analyzer; 18 | 19 | public enum AcceptState { 20 | ID("Id"), 21 | INTEGER("Integer"), 22 | FLOAT("Float"), 23 | OPERATOR("Operator"), 24 | SEPARATOR("Separator"); 25 | private final String acceptName; 26 | 27 | AcceptState(String acceptName){ 28 | this.acceptName = acceptName; 29 | } 30 | 31 | public String getAcceptName() { 32 | return acceptName; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/LexicalAnalyzer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer 5 | * ===================================================== 6 | * Title: LexicalAnalyzer.java 7 | * Created: [2022/12/26 15:27] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/26, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer; 17 | 18 | 19 | import java.io.*; 20 | import java.util.ArrayList; 21 | 22 | public class LexicalAnalyzer { 23 | private static FileReader fileReader; 24 | private static FileWriter fileWriter; 25 | 26 | private static ArrayList tokens = new ArrayList<>(); 27 | 28 | public static void init(String inFile, String outFile) { 29 | ConstructionTable.init(); 30 | try { 31 | fileReader = new FileReader(inFile); 32 | } catch (FileNotFoundException e) { 33 | System.out.println(inFile + " Not Found."); 34 | return; 35 | } 36 | try { 37 | fileWriter = new FileWriter(outFile, false); 38 | fileWriter.write(""); 39 | } catch (IOException e) { 40 | e.printStackTrace(); 41 | return; 42 | } finally { 43 | if (fileWriter != null) { 44 | try { 45 | fileWriter.close(); 46 | } catch (IOException e) { 47 | e.printStackTrace(); 48 | } 49 | } 50 | } 51 | try { 52 | fileWriter = new FileWriter(outFile, true); 53 | } catch (IOException e) { 54 | e.printStackTrace(); 55 | } 56 | } 57 | 58 | public static void analysisLexical(String text) { 59 | System.out.println("\nLexical Analyzer:\n"); 60 | System.out.println(text + "\n"); 61 | //字符预处理 62 | String context = text + " "; 63 | //字符指针 64 | int forward = 0; 65 | //当前状态 66 | int state = 0; 67 | //当前目标串 68 | Token token = new Token(); 69 | while (forward < context.length()) { 70 | int temp; 71 | try { 72 | temp = ConstructionTable.move(state, context.charAt(forward)); 73 | } catch (Exception e) { 74 | e.printStackTrace(); 75 | System.out.println("Error:" + forward + ":\n" + context.substring(forward)); 76 | return; 77 | } 78 | if (temp == -1) { 79 | switch (state) { 80 | case 1: 81 | token.setState(AcceptState.ID); 82 | break; 83 | case 2: 84 | token.setState(AcceptState.INTEGER); 85 | break; 86 | case 3: 87 | case 4: 88 | case 5: 89 | case 6: 90 | case 7: 91 | case 10: 92 | case 11: 93 | token.setState(AcceptState.OPERATOR); 94 | break; 95 | case 8: 96 | token.setState(AcceptState.FLOAT); 97 | break; 98 | case 9: 99 | token.setState(AcceptState.SEPARATOR); 100 | break; 101 | } 102 | System.out.println(token); 103 | tokens.add(token); 104 | try { 105 | fileWriter.write(token + "\n"); 106 | } catch (IOException e) { 107 | e.printStackTrace(); 108 | } 109 | state = 0; 110 | token = new Token(); 111 | } else if (temp == -2) { 112 | forward++; 113 | } else if (temp == -3) { 114 | System.out.println("Error:" + forward + ":\n" + context.substring(forward)); 115 | return; 116 | } else { 117 | token.addChar(context.charAt(forward)); 118 | state = temp; 119 | forward++; 120 | } 121 | } 122 | if (fileWriter != null) { 123 | try { 124 | fileWriter.close(); 125 | } catch (IOException e) { 126 | e.printStackTrace(); 127 | } 128 | } 129 | } 130 | 131 | private static String readFile() { 132 | StringBuilder stringBuilder = new StringBuilder(); 133 | try { 134 | int data; 135 | while ((data = fileReader.read()) != -1) { 136 | //回车转为空格 137 | if (data == 10 || data == 13) { 138 | stringBuilder.append(' '); 139 | } else { 140 | stringBuilder.append((char) data); 141 | } 142 | } 143 | } catch (IOException e) { 144 | e.printStackTrace(); 145 | } finally { 146 | if (fileReader != null) { 147 | try { 148 | fileReader.close(); 149 | } catch (IOException e) { 150 | e.printStackTrace(); 151 | } 152 | } 153 | } 154 | return stringBuilder.toString(); 155 | } 156 | 157 | public static void analysisLexical() { 158 | analysisLexical(readFile()); 159 | } 160 | 161 | public static ArrayList getTokens() { 162 | return tokens; 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/Token.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer 5 | * ===================================================== 6 | * Title: Token.java 7 | * Created: [2022/12/26 12:55] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/26, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer; 17 | 18 | import java.io.FileWriter; 19 | import java.io.IOException; 20 | 21 | public class Token { 22 | private AcceptState state; 23 | private final StringBuilder token; 24 | 25 | public Token() { 26 | token = new StringBuilder(); 27 | } 28 | 29 | public void setState(AcceptState state) { 30 | this.state = state; 31 | } 32 | 33 | public AcceptState getState() { 34 | return state; 35 | } 36 | 37 | public void addChar(char c) { 38 | token.append(c); 39 | } 40 | 41 | public String getToken(){ 42 | return token.toString(); 43 | } 44 | 45 | @Override 46 | public String toString() { 47 | return token.toString() + "\t:" + state.getAcceptName(); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/character/Digit.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer.character 5 | * ===================================================== 6 | * Title: digit.java 7 | * Created: [2022/12/26 13:37] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/26, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer.character; 17 | 18 | public class Digit extends InputCharacter{ 19 | public Digit() { 20 | super("digit"); 21 | } 22 | 23 | @Override 24 | public boolean isCharacter(char c) { 25 | return (int)c >= 48 && (int)c <= 57; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/character/Division.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer.character 5 | * ===================================================== 6 | * Title: division.java 7 | * Created: [2022/12/26 13:48] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/26, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer.character; 17 | 18 | public class Division extends InputCharacter{ 19 | public Division() { 20 | super("division"); 21 | } 22 | 23 | @Override 24 | public boolean isCharacter(char c) { 25 | return c == '/'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/character/Equal.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer.character 5 | * ===================================================== 6 | * Title: Equal.java 7 | * Created: [2022/12/26 13:45] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/26, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer.character; 17 | 18 | public class Equal extends InputCharacter{ 19 | public Equal() { 20 | super("equal"); 21 | } 22 | 23 | @Override 24 | public boolean isCharacter(char c) { 25 | return c == '='; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/character/InputCharacter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer.character 5 | * ===================================================== 6 | * Title: InputCharacter.java 7 | * Created: [2022/12/26 13:22] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/26, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer.character; 17 | 18 | public abstract class InputCharacter { 19 | private final String characterName; 20 | 21 | public InputCharacter(String characterName){ 22 | this.characterName = characterName; 23 | } 24 | 25 | @Override 26 | public boolean equals(Object o){ 27 | if(this == o){ 28 | return true; 29 | } 30 | if(o==null ||getClass() != o.getClass()){ 31 | return false; 32 | } 33 | InputCharacter character = (InputCharacter) o; 34 | return characterName.equals(character.characterName); 35 | } 36 | 37 | @Override 38 | public int hashCode(){ 39 | return characterName.hashCode(); 40 | } 41 | 42 | public abstract boolean isCharacter(char c); 43 | } 44 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/character/LeftBracket.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer.character 5 | * ===================================================== 6 | * Title: LeftBracket.java 7 | * Created: [2022/12/27 11:35] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer.character; 17 | 18 | public class LeftBracket extends InputCharacter{ 19 | public LeftBracket() { 20 | super("Left bracket"); 21 | } 22 | 23 | @Override 24 | public boolean isCharacter(char c) { 25 | return c == '('; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/character/Letter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer.character 5 | * ===================================================== 6 | * Title: Letter.java 7 | * Created: [2022/12/26 13:33] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/26, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer.character; 17 | 18 | public class Letter extends InputCharacter{ 19 | public Letter() { 20 | super("letter"); 21 | } 22 | 23 | @Override 24 | public boolean isCharacter(char c) { 25 | return ((int)c >= 65 && (int)c <= 90) || ((int)c >= 97 && (int)c <= 122); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/character/Minus.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer.character 5 | * ===================================================== 6 | * Title: Minus.java 7 | * Created: [2022/12/26 13:46] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/26, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer.character; 17 | 18 | public class Minus extends InputCharacter{ 19 | public Minus() { 20 | super("minus"); 21 | } 22 | 23 | @Override 24 | public boolean isCharacter(char c) { 25 | return c == '-'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/character/Multiple.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer.character 5 | * ===================================================== 6 | * Title: Multiple.java 7 | * Created: [2022/12/26 13:47] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/26, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer.character; 17 | 18 | public class Multiple extends InputCharacter{ 19 | public Multiple() { 20 | super("multiple"); 21 | } 22 | 23 | @Override 24 | public boolean isCharacter(char c) { 25 | return c == '*'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/character/Plus.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer.character 5 | * ===================================================== 6 | * Title: Plus.java 7 | * Created: [2022/12/26 13:43] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/26, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer.character; 17 | 18 | public class Plus extends InputCharacter{ 19 | public Plus() { 20 | super("plus"); 21 | } 22 | 23 | @Override 24 | public boolean isCharacter(char c) { 25 | return c == '+'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/character/Point.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer.character 5 | * ===================================================== 6 | * Title: Point.java 7 | * Created: [2022/12/26 14:28] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/26, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer.character; 17 | 18 | public class Point extends InputCharacter{ 19 | public Point() { 20 | super("point"); 21 | } 22 | 23 | @Override 24 | public boolean isCharacter(char c) { 25 | return c == '.'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/character/RightBracket.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer.character 5 | * ===================================================== 6 | * Title: RightBracket.java 7 | * Created: [2022/12/27 11:36] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer.character; 17 | 18 | public class RightBracket extends InputCharacter{ 19 | public RightBracket() { 20 | super("Right bracket"); 21 | } 22 | 23 | @Override 24 | public boolean isCharacter(char c) { 25 | return c == ')'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/character/Semicolon.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer.character 5 | * ===================================================== 6 | * Title: Semicolon.java 7 | * Created: [2022/12/26 13:57] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/26, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer.character; 17 | 18 | public class Semicolon extends InputCharacter{ 19 | public Semicolon() { 20 | super("semicolon"); 21 | } 22 | 23 | @Override 24 | public boolean isCharacter(char c) { 25 | return c == ';'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/character/Space.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer.character 5 | * ===================================================== 6 | * Title: Space.java 7 | * Created: [2022/12/26 15:55] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/26, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer.character; 17 | 18 | public class Space extends InputCharacter{ 19 | public Space() { 20 | super("space"); 21 | } 22 | 23 | @Override 24 | public boolean isCharacter(char c) { 25 | return c == ' '; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /compiler_Experiment/src/lexical_Analyzer/character/Underline.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: lexical_Analyzer.character 5 | * ===================================================== 6 | * Title: Underline.java 7 | * Created: [2022/12/26 13:42] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/26, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package lexical_Analyzer.character; 17 | 18 | public class Underline extends InputCharacter{ 19 | public Underline() { 20 | super("underline"); 21 | } 22 | 23 | @Override 24 | public boolean isCharacter(char c) { 25 | return c == '_'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/SyntaxParser.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression 5 | * ===================================================== 6 | * Title: SyntaxParser.java 7 | * Created: [2022/12/27 10:55] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser; 17 | 18 | import lexical_Analyzer.AcceptState; 19 | import lexical_Analyzer.Token; 20 | import syntax_Parser.expression.AbstractExpression; 21 | import syntax_Parser.expression.NonterminalExpression; 22 | import syntax_Parser.expression.nonterminal.ExpressionE; 23 | import syntax_Parser.expression.terminal.Terminator; 24 | 25 | import java.io.FileWriter; 26 | import java.io.IOException; 27 | import java.util.ArrayList; 28 | import java.util.Stack; 29 | 30 | public class SyntaxParser { 31 | private static FileWriter fileWriter; 32 | 33 | public static void init(String outFile){ 34 | ForecastTable.init(); 35 | try { 36 | fileWriter = new FileWriter(outFile, false); 37 | fileWriter.write(""); 38 | } catch (IOException e) { 39 | e.printStackTrace(); 40 | return; 41 | } finally { 42 | if (fileWriter != null) { 43 | try { 44 | fileWriter.close(); 45 | } catch (IOException e) { 46 | e.printStackTrace(); 47 | } 48 | } 49 | } 50 | try { 51 | fileWriter = new FileWriter(outFile, true); 52 | } catch (IOException e) { 53 | e.printStackTrace(); 54 | } 55 | } 56 | 57 | public static void syntaxParser(ArrayList tokens){ 58 | System.out.println("\nSyntax Parser:\n"); 59 | //token预处理 60 | Token terminator = new Token(); 61 | terminator.addChar('$'); 62 | terminator.setState(AcceptState.SEPARATOR); 63 | tokens.add(terminator); 64 | System.out.println(tokens); 65 | //栈预处理 66 | Stack stack = new Stack<>(); 67 | stack.push(new Terminator()); 68 | stack.push(new ExpressionE()); 69 | //token串指针 70 | int forward = 0; 71 | //开始归约 72 | while(forward < tokens.size()){ 73 | AbstractExpression expression = stack.peek(); 74 | int temp; 75 | try{ 76 | temp = ForecastTable.forecastAnalysis(expression, tokens.get(forward)); 77 | } catch (Exception e) { 78 | System.out.println("Error: " + forward + ":"); 79 | for(int i = forward; i < tokens.size() - 1; i++){ 80 | System.out.print(tokens.get(i).getToken() + " "); 81 | } 82 | System.out.print('\n'); 83 | e.printStackTrace(); 84 | return; 85 | } 86 | if(temp == -1){//出现错误 87 | System.out.println("Error: " + forward + ":"); 88 | for(int i = forward; i < tokens.size() - 1; i++){ 89 | System.out.print(tokens.get(i).getToken() + " "); 90 | } 91 | System.out.print('\n'); 92 | return; 93 | }else if (temp == -2){//匹配动作 94 | try { 95 | fileWriter.write("Match:" + tokens.get(forward).toString() + "\n"); 96 | } catch (IOException e) { 97 | e.printStackTrace(); 98 | } 99 | System.out.println("Match:" + tokens.get(forward).toString()); 100 | stack.pop(); 101 | forward++; 102 | }else {//输出动作 103 | NonterminalExpression grammar = ForecastTable.grammars.get(temp); 104 | System.out.println("Output:" + grammar.toString()); 105 | try { 106 | fileWriter.write("Output:" + grammar + "\n"); 107 | } catch (IOException e) { 108 | e.printStackTrace(); 109 | } 110 | if(grammar.isEmptyString()){//空串输出 111 | stack.pop(); 112 | }else{ 113 | stack.pop(); 114 | for(int i = grammar.getGrammar().size() - 1; i >= 0; i--){ 115 | stack.push(grammar.getGrammar().get(i)); 116 | } 117 | } 118 | } 119 | } 120 | if (fileWriter != null) { 121 | try { 122 | fileWriter.close(); 123 | } catch (IOException e) { 124 | e.printStackTrace(); 125 | } 126 | } 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/expression/AbstractExpression.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression 5 | * ===================================================== 6 | * Title: AbstractExpression.java 7 | * Created: [2022/12/27 10:56] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser.expression; 17 | 18 | import lexical_Analyzer.Token; 19 | 20 | public abstract class AbstractExpression { 21 | private final String name; 22 | 23 | public AbstractExpression(String name){ 24 | this.name = name; 25 | } 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | public abstract boolean isToken(Token token); 32 | } 33 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/expression/NonterminalExpression.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression 5 | * ===================================================== 6 | * Title: NonterminalExpression.java 7 | * Created: [2022/12/27 11:02] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser.expression; 17 | 18 | import lexical_Analyzer.Token; 19 | 20 | import java.util.ArrayList; 21 | 22 | public abstract class NonterminalExpression extends AbstractExpression { 23 | private ArrayList grammar; 24 | private boolean isEmptyString = false; 25 | 26 | public NonterminalExpression(String name) { 27 | super(name); 28 | } 29 | 30 | public void setGrammar(ArrayList grammar) { 31 | this.grammar = grammar; 32 | } 33 | 34 | public ArrayList getGrammar() { 35 | return grammar; 36 | } 37 | 38 | public void setEmptyString(boolean emptyString) { 39 | isEmptyString = emptyString; 40 | } 41 | 42 | public boolean isEmptyString() { 43 | return isEmptyString; 44 | } 45 | 46 | @Override 47 | public String toString() { 48 | StringBuilder builder = new StringBuilder(); 49 | builder.append(getName()).append(" → "); 50 | for (AbstractExpression expression : grammar) { 51 | builder.append(expression.getName()).append(" "); 52 | } 53 | return builder.toString(); 54 | } 55 | 56 | @Override 57 | public boolean isToken(Token token) { 58 | return false; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/expression/TerminalExpression.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression 5 | * ===================================================== 6 | * Title: TerminalExpression.java 7 | * Created: [2022/12/27 11:01] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser.expression; 17 | 18 | 19 | public abstract class TerminalExpression extends AbstractExpression { 20 | 21 | public TerminalExpression(String name) { 22 | super(name); 23 | } 24 | 25 | @Override 26 | public boolean equals(Object o) { 27 | if (this == o) { 28 | return true; 29 | } 30 | if (o == null || getClass() != o.getClass()) { 31 | return false; 32 | } 33 | AbstractExpression expression = (AbstractExpression) o; 34 | return this.getName().equals(expression.getName()); 35 | } 36 | 37 | @Override 38 | public int hashCode() { 39 | return getName().hashCode(); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/expression/nonterminal/ExpressionE.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression.nonterminal 5 | * ===================================================== 6 | * Title: ExpressionE.java 7 | * Created: [2022/12/27 11:52] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser.expression.nonterminal; 17 | 18 | import syntax_Parser.expression.NonterminalExpression; 19 | 20 | public class ExpressionE extends NonterminalExpression { 21 | public ExpressionE() { 22 | super("E"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/expression/nonterminal/ExpressionE1.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression.nonterminal 5 | * ===================================================== 6 | * Title: ExpressionE1.java 7 | * Created: [2022/12/27 11:54] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser.expression.nonterminal; 17 | 18 | import syntax_Parser.expression.NonterminalExpression; 19 | 20 | public class ExpressionE1 extends NonterminalExpression { 21 | public ExpressionE1() { 22 | super("E1"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/expression/nonterminal/ExpressionF.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression.nonterminal 5 | * ===================================================== 6 | * Title: ExpressionF.java 7 | * Created: [2022/12/27 11:56] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser.expression.nonterminal; 17 | 18 | import syntax_Parser.expression.NonterminalExpression; 19 | 20 | public class ExpressionF extends NonterminalExpression { 21 | public ExpressionF() { 22 | super("F"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/expression/nonterminal/ExpressionT.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression.nonterminal 5 | * ===================================================== 6 | * Title: ExpressionT.java 7 | * Created: [2022/12/27 11:55] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser.expression.nonterminal; 17 | 18 | import syntax_Parser.expression.NonterminalExpression; 19 | 20 | public class ExpressionT extends NonterminalExpression { 21 | public ExpressionT() { 22 | super("T"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/expression/nonterminal/ExpressionT1.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression.nonterminal 5 | * ===================================================== 6 | * Title: ExpressionT1.java 7 | * Created: [2022/12/27 11:55] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser.expression.nonterminal; 17 | 18 | import syntax_Parser.expression.NonterminalExpression; 19 | 20 | public class ExpressionT1 extends NonterminalExpression { 21 | public ExpressionT1() { 22 | super("T1"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/expression/terminal/EmptyString.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression.terminal 5 | * ===================================================== 6 | * Title: EmptyString.java 7 | * Created: [2022/12/27 11:46] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser.expression.terminal; 17 | 18 | import lexical_Analyzer.Token; 19 | import syntax_Parser.expression.TerminalExpression; 20 | 21 | public class EmptyString extends TerminalExpression { 22 | public EmptyString() { 23 | super("Empty string"); 24 | } 25 | 26 | @Override 27 | public boolean isToken(Token token) { 28 | return false; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/expression/terminal/Id.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression.terminal 5 | * ===================================================== 6 | * Title: Id.java 7 | * Created: [2022/12/27 11:15] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser.expression.terminal; 17 | 18 | import lexical_Analyzer.Token; 19 | import syntax_Parser.expression.TerminalExpression; 20 | 21 | public class Id extends TerminalExpression { 22 | public Id() { 23 | super("Id"); 24 | } 25 | 26 | @Override 27 | public boolean isToken(Token token) { 28 | return token.getState().getAcceptName().equals(this.getName()) || 29 | token.getState().getAcceptName().equals("Integer") || 30 | token.getState().getAcceptName().equals("Float"); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/expression/terminal/LeftBracket.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression.terminal 5 | * ===================================================== 6 | * Title: LeftBracket.java 7 | * Created: [2022/12/27 11:27] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser.expression.terminal; 17 | 18 | import lexical_Analyzer.Token; 19 | import syntax_Parser.expression.TerminalExpression; 20 | 21 | public class LeftBracket extends TerminalExpression { 22 | public LeftBracket() { 23 | super("("); 24 | } 25 | 26 | @Override 27 | public boolean isToken(Token token) { 28 | return token.getState().getAcceptName().equals("Operator") && 29 | token.getToken().equals("("); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/expression/terminal/Multiple.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression.terminal 5 | * ===================================================== 6 | * Title: Multiple.java 7 | * Created: [2022/12/27 11:25] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser.expression.terminal; 17 | 18 | import lexical_Analyzer.Token; 19 | import syntax_Parser.expression.TerminalExpression; 20 | 21 | public class Multiple extends TerminalExpression { 22 | public Multiple() { 23 | super("*"); 24 | } 25 | 26 | @Override 27 | public boolean isToken(Token token) { 28 | return token.getState().getAcceptName().equals("Operator") && 29 | token.getToken().equals("*"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/expression/terminal/Plus.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression.terminal 5 | * ===================================================== 6 | * Title: Plus.java 7 | * Created: [2022/12/27 11:19] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser.expression.terminal; 17 | 18 | import lexical_Analyzer.Token; 19 | import syntax_Parser.expression.TerminalExpression; 20 | 21 | public class Plus extends TerminalExpression { 22 | public Plus() { 23 | super("+"); 24 | } 25 | 26 | @Override 27 | public boolean isToken(Token token) { 28 | return token.getState().getAcceptName().equals("Operator") && 29 | token.getToken().equals("+"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/expression/terminal/RightBracket.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression.terminal 5 | * ===================================================== 6 | * Title: RightBracket.java 7 | * Created: [2022/12/27 11:33] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser.expression.terminal; 17 | 18 | import lexical_Analyzer.Token; 19 | import syntax_Parser.expression.TerminalExpression; 20 | 21 | public class RightBracket extends TerminalExpression { 22 | public RightBracket() { 23 | super(")"); 24 | } 25 | 26 | @Override 27 | public boolean isToken(Token token) { 28 | return token.getState().getAcceptName().equals("Operator") && 29 | token.getToken().equals(")"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /compiler_Experiment/src/syntax_Parser/expression/terminal/Terminator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: compiler_Experiment 4 | * Package: syntax_Parser.expression.terminal 5 | * ===================================================== 6 | * Title: Terminator.java 7 | * Created: [2022/12/27 11:42] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/12/27, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package syntax_Parser.expression.terminal; 17 | 18 | import lexical_Analyzer.Token; 19 | import syntax_Parser.expression.TerminalExpression; 20 | 21 | public class Terminator extends TerminalExpression { 22 | public Terminator() { 23 | super("Terminator $"); 24 | } 25 | 26 | @Override 27 | public boolean isToken(Token token) { 28 | return token.getToken().equals("$"); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /digital_Image_Process/README.md: -------------------------------------------------------------------------------- 1 | - **author:Shuxin_Wang** 2 | - **email:shuxinwang662@gmail.com** 3 | - **time:2022.09.27** 4 | 5 | 6 | 7 | # 一、模块框架 8 | 9 | - 图片信息类`ImageInfo` 10 | - 文件名称 11 | - 图片信息备注 12 | - 图片对象 13 | - 全局参数设置类`ParameterSetting` 14 | - 调整图像处理相关方法的参数以观察不同结果 15 | - 图像处理相关方法类`ImageProcess` 16 | - 封装了图像相关方法 17 | 18 | ```mermaid 19 | classDiagram 20 | 21 | MainWindow<--ImageInfo 22 | MainWindow<--ParameterSetting 23 | MainWindow<--ImageProcess 24 | 25 | 26 | 27 | class ImageInfo{ 28 | <<图片信息>> 29 | -QString filename 30 | -QString remark 31 | -QImage* image 32 | } 33 | 34 | class ParameterSetting{ 35 | <<功能参数设置>> 36 | } 37 | 38 | class ImageProcess{ 39 | <<图像处理相关方法>> 40 | } 41 | 42 | class MainWindow{ 43 | <<窗口控件>> 44 | ImageInfo* originImage//原始图片 45 | ImageInfo* grayImage//灰度图片 46 | ImageInfo** resultImage//结果图片列表 47 | ImageProcess* process//图像处理类 48 | ParameterSetting* params//参数设置类 49 | } 50 | ``` 51 | 52 | 53 | 54 | # 二、模块详述 55 | 56 | 57 | 58 | ## 2.1 图片信息类`ImageInfo` 59 | 60 | 该类封装了图片的文件名称、图片的备注信息(比如图片来源与操作结果是否成功),并封装了相关操作函数; 61 | 62 | 63 | 64 | ## 2.2 图像处理相关方法类`ImageProcess` 65 | 66 | 封装了图像处理相关方法 67 | 68 | 69 | 70 | ## 2.3 UI窗口类`MainWindow` 71 | 72 | - 可以实现不同格式图片的读取,同时显示图像灰度图; 73 | - 对于后续运行不同参数的功能时,可以实现**动态数目的结果图片**显示; 74 | 75 | 具体框架如下: 76 | 77 | 78 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/.gitignore: -------------------------------------------------------------------------------- 1 | # This file is used to ignore files which are generated 2 | # ---------------------------------------------------------------------------- 3 | 4 | *~ 5 | *.autosave 6 | *.a 7 | *.core 8 | *.moc 9 | *.o 10 | *.obj 11 | *.orig 12 | *.rej 13 | *.so 14 | *.so.* 15 | *_pch.h.cpp 16 | *_resource.rc 17 | *.qm 18 | .#* 19 | *.*# 20 | core 21 | !core/ 22 | tags 23 | .DS_Store 24 | .directory 25 | *.debug 26 | Makefile* 27 | *.prl 28 | *.app 29 | moc_*.cpp 30 | ui_*.h 31 | qrc_*.cpp 32 | Thumbs.db 33 | *.res 34 | *.rc 35 | /.qmake.cache 36 | /.qmake.stash 37 | 38 | # qtcreator generated files 39 | *.pro.user* 40 | 41 | # xemacs temporary files 42 | *.flc 43 | 44 | # Vim temporary files 45 | .*.swp 46 | 47 | # Visual Studio generated files 48 | *.ib_pdb_index 49 | *.idb 50 | *.ilk 51 | *.pdb 52 | *.sln 53 | *.suo 54 | *.vcproj 55 | *vcproj.*.*.user 56 | *.ncb 57 | *.sdf 58 | *.opensdf 59 | *.vcxproj 60 | *vcxproj.* 61 | 62 | # MinGW generated files 63 | *.Debug 64 | *.Release 65 | 66 | # Python byte code 67 | *.pyc 68 | 69 | # Binaries 70 | # -------- 71 | *.dll 72 | *.exe 73 | 74 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/graymappingdialog.cpp: -------------------------------------------------------------------------------- 1 | #include "graymappingdialog.h" 2 | #include "ui_graymappingdialog.h" 3 | 4 | GrayMappingDialog::GrayMappingDialog(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::GrayMappingDialog) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | GrayMappingDialog::~GrayMappingDialog() 12 | { 13 | delete ui; 14 | } 15 | 16 | 17 | int GrayMappingDialog::getMaxGray(){ 18 | return ui->textEdit->toPlainText().toInt(); 19 | } 20 | 21 | int GrayMappingDialog::getWindowIndex(){ 22 | return ui->textEdit_2->toPlainText().toInt(); 23 | } 24 | 25 | int GrayMappingDialog::getWindowWidth(){ 26 | return ui->textEdit_3->toPlainText().toInt(); 27 | } 28 | 29 | void GrayMappingDialog::initParams(ParameterSetting *param){ 30 | ui->textEdit->setText(QString("%1").arg(param->GRAY_SCALE)); 31 | ui->textEdit_2->setText(QString("%1").arg(param->GRAY_WINDOW.x)); 32 | ui->textEdit_3->setText(QString("%1").arg(param->GRAY_WINDOW.y)); 33 | } 34 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/graymappingdialog.h: -------------------------------------------------------------------------------- 1 | #ifndef GRAYMAPPINGDIALOG_H 2 | #define GRAYMAPPINGDIALOG_H 3 | 4 | #include 5 | 6 | #include "parametersetting.h" 7 | 8 | namespace Ui { 9 | class GrayMappingDialog; 10 | } 11 | 12 | class GrayMappingDialog : public QDialog 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit GrayMappingDialog(QWidget *parent = nullptr); 18 | ~GrayMappingDialog(); 19 | 20 | int getMaxGray(); 21 | int getWindowIndex(); 22 | int getWindowWidth(); 23 | 24 | void initParams(ParameterSetting *param); 25 | 26 | private: 27 | Ui::GrayMappingDialog *ui; 28 | }; 29 | 30 | #endif // GRAYMAPPINGDIALOG_H 31 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/graymappingdialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | GrayMappingDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 473 10 | 355 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 20 | 最大灰度值 21 | 22 | 23 | Qt::AlignCenter 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 窗位 34 | 35 | 36 | Qt::AlignCenter 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 窗宽 47 | 48 | 49 | Qt::AlignCenter 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | Qt::Horizontal 60 | 61 | 62 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | buttonBox 72 | accepted() 73 | GrayMappingDialog 74 | accept() 75 | 76 | 77 | 248 78 | 254 79 | 80 | 81 | 157 82 | 274 83 | 84 | 85 | 86 | 87 | buttonBox 88 | rejected() 89 | GrayMappingDialog 90 | reject() 91 | 92 | 93 | 316 94 | 260 95 | 96 | 97 | 286 98 | 274 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/imageProcess.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | # You can make your code fail to compile if it uses deprecated APIs. 8 | # In order to do so, uncomment the following line. 9 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 10 | 11 | SOURCES += \ 12 | graymappingdialog.cpp \ 13 | imageinfo.cpp \ 14 | imageprocess.cpp \ 15 | main.cpp \ 16 | mainwindow.cpp \ 17 | parametersetting.cpp \ 18 | statelinked.cpp \ 19 | zoommanagedialog.cpp 20 | 21 | HEADERS += \ 22 | graymappingdialog.h \ 23 | imageinfo.h \ 24 | imageprocess.h \ 25 | mainwindow.h \ 26 | parametersetting.h \ 27 | statelinked.h \ 28 | zoommanagedialog.h 29 | 30 | FORMS += \ 31 | graymappingdialog.ui \ 32 | mainwindow.ui \ 33 | zoommanagedialog.ui 34 | 35 | # Default rules for deployment. 36 | qnx: target.path = /tmp/$${TARGET}/bin 37 | else: unix:!android: target.path = /opt/$${TARGET}/bin 38 | !isEmpty(target.path): INSTALLS += target 39 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/imageinfo.cpp: -------------------------------------------------------------------------------- 1 | #include "imageinfo.h" 2 | 3 | ImageInfo::ImageInfo(){ 4 | 5 | } 6 | 7 | ImageInfo::~ImageInfo(){ 8 | delete image; 9 | } 10 | 11 | ImageInfo::ImageInfo(QString fileName, QString remark, QImage* image){ 12 | this->fileName = fileName; 13 | this->remark = remark; 14 | this->image = image; 15 | } 16 | 17 | 18 | ImageInfo::ImageInfo(QString filePath){ 19 | QStringList list = filePath.split(QRegExp("[\\/]")); 20 | int index = list.length(); 21 | 22 | this->fileName = list[index - 1]; 23 | 24 | this->remark = "原始图片读取"; 25 | if(this->readImage(filePath)){ 26 | this->remark.append("成功!"); 27 | }else{ 28 | this->remark.append("失败!"); 29 | } 30 | } 31 | 32 | bool ImageInfo::readImage(QString filePath){ 33 | this->image = new QImage(); 34 | if(!(image->load(filePath))){ 35 | return false; 36 | } 37 | return true; 38 | } 39 | 40 | bool ImageInfo::saveImage(QString filePath){ 41 | return this->image->save(filePath); 42 | } 43 | 44 | bool ImageInfo::saveImage(){ 45 | return this->image->save(this->fileName); 46 | } 47 | 48 | void ImageInfo::setFileName(QString fileName){ 49 | this->fileName = fileName; 50 | } 51 | 52 | void ImageInfo::setRemark(QString reamrk){ 53 | this->remark = reamrk; 54 | } 55 | 56 | void ImageInfo::setImage(QImage* image){ 57 | this->image = image; 58 | } 59 | 60 | QString ImageInfo::getFileName(){ 61 | return this->fileName; 62 | } 63 | 64 | QString ImageInfo::getRemark(){ 65 | return this->remark; 66 | } 67 | 68 | QImage* ImageInfo::getImage(){ 69 | return this->image; 70 | } 71 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/imageinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef IMAGEINFO_H 2 | #define IMAGEINFO_H 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | class ImageInfo{ 10 | 11 | private: 12 | //文件名称 13 | QString fileName; 14 | //图片备注信息 15 | QString remark; 16 | //图片对象 17 | QImage* image; 18 | 19 | 20 | public: 21 | ImageInfo(); 22 | 23 | ~ImageInfo(); 24 | 25 | ImageInfo(QString fileName, QString remark, QImage* image); 26 | 27 | ImageInfo(QString filePath); 28 | //读取图片 29 | bool readImage(QString filePath); 30 | //保存图片 31 | bool saveImage(QString filePath); 32 | //默认图片保存 33 | bool saveImage(); 34 | /*------------Bean相关操作----------*/ 35 | void setFileName(QString fileName); 36 | 37 | void setRemark(QString reamrk); 38 | 39 | void setImage(QImage* image); 40 | 41 | QString getFileName(); 42 | 43 | QString getRemark(); 44 | 45 | QImage* getImage(); 46 | }; 47 | 48 | #endif // IMAGEINFO_H 49 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/imageprocess.h: -------------------------------------------------------------------------------- 1 | #ifndef IMAGEPROCESS_H 2 | #define IMAGEPROCESS_H 3 | #include 4 | #include 5 | 6 | #include "imageinfo.h" 7 | 8 | using namespace std; 9 | 10 | class ImageProcess{ 11 | public: 12 | 13 | ImageProcess(); 14 | //转为灰度图 15 | ImageInfo* toGray(ImageInfo *image); 16 | //调整大小 17 | ImageInfo* adjustSize(ImageInfo *image, int width, int height); 18 | //直方图均衡化 19 | ImageInfo* imageAverage(ImageInfo *image, bool isGray = true); 20 | //图片缩放 21 | ImageInfo* imageZoom(ImageInfo *image, int width, int height); 22 | //得到相对距离 23 | int relativeDis(int index, int newIndex){ 24 | return newIndex - index; 25 | } 26 | //旋转坐标变换 27 | int getRotationDis(int x, int y, double angle, bool isX = true){ 28 | if(isX){ 29 | return floor(x * cos(angle) - y * sin(angle)); 30 | }else{ 31 | return floor(x * sin(angle) + y * cos(angle)); 32 | } 33 | } 34 | //图片旋转 35 | ImageInfo* imageRotation(ImageInfo *image, int x, int y, double angle, bool isRight); 36 | //读取二进制文件 37 | ImageInfo* readBinaryImage(unsigned short *pixels, int width, int height, unsigned short min, unsigned short max); 38 | //灰度窗调整 39 | ImageInfo* grayMapping(unsigned short *pixels, int width, int height, int right, int left); 40 | //拉普拉斯锐化 41 | unsigned short* laplaceSharpening(unsigned short *pixels, int width, int height); 42 | //灰度反转 43 | ImageInfo* grayInversion(ImageInfo *image); 44 | //图片左右反转 45 | ImageInfo* hReverse(ImageInfo *image); 46 | 47 | }; 48 | 49 | #endif // IMAGEPROCESS_H 50 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | #include 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | QApplication a(argc, argv); 8 | MainWindow w; 9 | w.setWindowTitle("数字图像处理"); 10 | w.show(); 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include "imageinfo.h" 15 | #include "imageprocess.h" 16 | #include "parametersetting.h" 17 | #include "statelinked.h" 18 | #include "zoommanagedialog.h" 19 | #include "graymappingdialog.h" 20 | 21 | QT_BEGIN_NAMESPACE 22 | namespace Ui { class MainWindow; } 23 | QT_END_NAMESPACE 24 | 25 | class MainWindow : public QMainWindow 26 | { 27 | Q_OBJECT 28 | 29 | public: 30 | MainWindow(QWidget *parent = nullptr); 31 | ~MainWindow(); 32 | //指定label展示图片 33 | void showImage(QLabel *label, QImage *image); 34 | //显示结果图片(未完成 35 | void showResultImages(); 36 | //运行功能 37 | void runAction(int state); 38 | //滚轮控制图片缩放 39 | void wheelEvent(QWheelEvent *event); 40 | 41 | private slots: 42 | //读取图片 43 | void on_actionImport_triggered(); 44 | 45 | //功能运行 46 | void on_pushButton_clicked(); 47 | 48 | void on_actionParameters_triggered(); 49 | 50 | void on_actionread_binary_triggered(); 51 | 52 | void on_actionSave_triggered(); 53 | 54 | void on_actionundo_triggered(); 55 | 56 | void on_actiongoto_triggered(); 57 | 58 | private: 59 | Ui::MainWindow *ui; 60 | //原始图片 61 | ImageInfo *originImage = NULL; 62 | //灰度图片 63 | ImageInfo *grayImage = NULL; 64 | //结果图片列表 65 | ImageInfo **resultImages = NULL; 66 | //保存结果 67 | ImageInfo *imageR = NULL; 68 | 69 | //结果图片数量 70 | int resultNum; 71 | //图像处理 72 | ImageProcess *process; 73 | //参数设置 74 | ParameterSetting *params; 75 | //撤销前进操作 76 | StateLinked *state; 77 | 78 | }; 79 | #endif // MAINWINDOW_H 80 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/parametersetting.cpp: -------------------------------------------------------------------------------- 1 | #include "parametersetting.h" 2 | 3 | ParameterSetting::ParameterSetting(){ 4 | //命令 5 | int code = -1; 6 | 7 | //初始化直方图参数 8 | IS_HI = false; 9 | 10 | //初始化图像缩放 11 | WIDTH_AND_HEIGHT.x = 50; 12 | WIDTH_AND_HEIGHT.y = 50; 13 | 14 | //初始化图片旋转 15 | CENTER_POINT.x = 50; 16 | CENTER_POINT.y = 50; 17 | ROTATION_ANGLE = 0.; 18 | RIGHT_OR_LEFT = true; 19 | 20 | //初始化灰度窗 21 | IS_G_W = false; 22 | GRAY_SCALE = 4096; 23 | GRAY_WINDOW.x = 2048; 24 | GRAY_WINDOW.y = GRAY_SCALE; 25 | PIXEL = NULL; 26 | PIXEL_SUM = 0; 27 | 28 | //初始化反转与翻转 29 | IS_G_R = false; 30 | IS_H_R = false; 31 | } 32 | 33 | 34 | void ParameterSetting::initParameters(ImageInfo* image){ 35 | //初始化图片缩放 36 | WIDTH_AND_HEIGHT.x = image->getImage()->width() / 2; 37 | WIDTH_AND_HEIGHT.y = image->getImage()->height() / 2; 38 | 39 | //初始化图片旋转 40 | CENTER_POINT.x = image->getImage()->width() / 2; 41 | CENTER_POINT.y = image->getImage()->height() / 2; 42 | ROTATION_ANGLE =90; 43 | RIGHT_OR_LEFT = true; 44 | } 45 | 46 | void ParameterSetting::setScale(int width, int height){ 47 | WIDTH_AND_HEIGHT.x = width; 48 | WIDTH_AND_HEIGHT.y = height; 49 | } 50 | 51 | void ParameterSetting::setScale(double precentage){ 52 | WIDTH_AND_HEIGHT.x = WIDTH_AND_HEIGHT.x * (precentage / 100); 53 | WIDTH_AND_HEIGHT.y = WIDTH_AND_HEIGHT.y * (precentage / 100); 54 | } 55 | 56 | void ParameterSetting::setRotation(int indexX, int indexY, double angle, bool isRight){ 57 | CENTER_POINT.x = indexX; 58 | CENTER_POINT.y = indexY; 59 | ROTATION_ANGLE = angle; 60 | RIGHT_OR_LEFT = isRight; 61 | } 62 | 63 | void ParameterSetting::setGrayMapping(int maxGray, int windowIndex, int windowWidth){ 64 | GRAY_SCALE = maxGray; 65 | GRAY_WINDOW.x = windowIndex; 66 | GRAY_WINDOW.y = windowWidth; 67 | } 68 | 69 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/parametersetting.h: -------------------------------------------------------------------------------- 1 | #ifndef PARAMETERSETTING_H 2 | #define PARAMETERSETTING_H 3 | 4 | #include 5 | #include 6 | using namespace std; 7 | 8 | //表示数据对 9 | struct Index{ 10 | int x; 11 | int y; 12 | }; 13 | 14 | class ParameterSetting 15 | { 16 | public: 17 | //命令 18 | int code; 19 | //直方图 20 | bool IS_HI; 21 | //图片缩放 22 | Index WIDTH_AND_HEIGHT; //缩放图片宽高 23 | //图片旋转 24 | Index CENTER_POINT; //旋转中心点 25 | double ROTATION_ANGLE; //旋转角度 26 | bool RIGHT_OR_LEFT; //左旋或右旋 27 | //灰度窗设置 28 | bool IS_G_W; 29 | int GRAY_SCALE; //最大灰度范围 30 | Index GRAY_WINDOW; //灰度窗参数 31 | unsigned short *PIXEL; //灰度值 32 | int PIXEL_SUM; //灰度值数量 33 | //图像增强 34 | bool IS_LA; 35 | //灰度反转 36 | bool IS_G_R; 37 | //图像左右翻转 38 | bool IS_H_R; 39 | 40 | ParameterSetting(); 41 | 42 | ~ParameterSetting(){ 43 | delete[]PIXEL; 44 | } 45 | 46 | //初始化参数 47 | void initParameters(ImageInfo* image); 48 | //设置命令 49 | void setCode(int code){ 50 | this->code = code; 51 | } 52 | //设置图片缩放参数 53 | void setScale(int width, int height); 54 | //按比例图片缩放 55 | void setScale(double precentage); 56 | //设置图片旋转参数 57 | void setRotation(int indexX, int indexY, double angle, bool isRight); 58 | //设置灰度窗 59 | void setGrayMapping(int maxGray, int windowIndex, int windowWidth); 60 | }; 61 | 62 | #endif // PARAMETERSETTING_H 63 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/statelinked.cpp: -------------------------------------------------------------------------------- 1 | #include "statelinked.h" 2 | 3 | StateLinked::StateLinked() 4 | { 5 | 6 | } 7 | 8 | //加入一个操作 9 | void StateLinked::addParam(ParameterSetting* param){ 10 | params[eP].code = param->code; 11 | //复制布尔值 12 | params[eP].IS_HI = param->IS_HI; 13 | params[eP].IS_G_W = param->IS_G_W; 14 | params[eP].IS_LA = param->IS_LA; 15 | params[eP].IS_G_R = param->IS_G_R; 16 | params[eP].IS_H_R = param->IS_H_R; 17 | //复制图片缩放 18 | params[eP].WIDTH_AND_HEIGHT = param->WIDTH_AND_HEIGHT; 19 | //复制图像旋转 20 | params[eP].RIGHT_OR_LEFT = param->RIGHT_OR_LEFT; 21 | params[eP].ROTATION_ANGLE = param->ROTATION_ANGLE; 22 | params[eP].CENTER_POINT = param->CENTER_POINT; 23 | //复制灰度窗 24 | params[eP].WIDTH_AND_HEIGHT = param->WIDTH_AND_HEIGHT; 25 | params[eP].GRAY_SCALE = param->GRAY_SCALE; 26 | params[eP].PIXEL_SUM = param->PIXEL_SUM; 27 | 28 | if(params[eP].PIXEL != NULL) 29 | delete[]params[eP].PIXEL; 30 | params[eP].PIXEL = new unsigned short[params[eP].PIXEL_SUM]; 31 | copy(param->PIXEL, param->PIXEL + param->PIXEL_SUM, params[eP].PIXEL); 32 | //更新指针 33 | eP = (eP + 1) % MAX_STATE; 34 | if(eP == sP){ 35 | sP = (sP + 1) % MAX_STATE; 36 | } 37 | iP = (eP + 4) % MAX_STATE; 38 | } 39 | 40 | 41 | //是否可以撤回 42 | bool StateLinked::canUndo(){ 43 | return iP != sP; 44 | } 45 | 46 | 47 | //是否可以前进 48 | bool StateLinked::canGoto(){ 49 | return iP != (eP + 4) % MAX_STATE; 50 | } 51 | 52 | 53 | //获取一个撤回操作 54 | ParameterSetting* StateLinked::undoAction(){ 55 | if(!canUndo()){ 56 | return NULL; 57 | } 58 | iP = (iP + 4 ) % MAX_STATE; 59 | return new ParameterSetting(params[iP]); 60 | } 61 | 62 | 63 | //获取一个前进操作 64 | ParameterSetting* StateLinked::gotoAction(){ 65 | if(!canGoto()){ 66 | return NULL; 67 | } 68 | iP = (iP + 1) % MAX_STATE; 69 | return new ParameterSetting(params[iP]); 70 | } 71 | 72 | //获取参数队列 73 | ParameterSetting* StateLinked::getParams(){ 74 | return params; 75 | } 76 | 77 | 78 | //获取头指针 79 | int StateLinked::getHeader(){ 80 | return sP; 81 | } 82 | 83 | 84 | //获取尾指针 85 | int StateLinked::getEnd(){ 86 | return eP; 87 | } 88 | 89 | 90 | //获取活动指针 91 | int StateLinked::getIndex(){ 92 | return iP; 93 | } 94 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/statelinked.h: -------------------------------------------------------------------------------- 1 | #ifndef STATELINKED_H 2 | #define STATELINKED_H 3 | 4 | #include "parametersetting.h" 5 | 6 | //撤销最大步数 7 | #define MAX_STATE 5 8 | 9 | class StateLinked 10 | { 11 | private: 12 | //参数循环队列 13 | ParameterSetting *params = new ParameterSetting[MAX_STATE]; 14 | //头指针 15 | int sP = 0; 16 | //尾指针 17 | int eP = 0; 18 | //撤销前进运动指针 19 | int iP = 0; 20 | 21 | public: 22 | StateLinked(); 23 | ~StateLinked(){ 24 | delete params; 25 | } 26 | 27 | //加入一个操作 28 | void addParam(ParameterSetting* param); 29 | //是否可以撤回 30 | bool canUndo(); 31 | //是否可以前进 32 | bool canGoto(); 33 | //获取一个撤回操作 34 | ParameterSetting* undoAction(); 35 | //获取一个前进操作 36 | ParameterSetting* gotoAction(); 37 | //获取参数队列 38 | ParameterSetting* getParams(); 39 | //获取头指针 40 | int getHeader(); 41 | //获取尾指针 42 | int getEnd(); 43 | //获取活动指针 44 | int getIndex(); 45 | }; 46 | 47 | #endif // STATELINKED_H 48 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/zoommanagedialog.cpp: -------------------------------------------------------------------------------- 1 | #include "zoommanagedialog.h" 2 | #include "ui_zoommanagedialog.h" 3 | 4 | zoomManageDialog::zoomManageDialog(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::zoomManageDialog) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | zoomManageDialog::~zoomManageDialog() 12 | { 13 | delete ui; 14 | } 15 | 16 | int zoomManageDialog::getWidth(){ 17 | return ui->wTextEdit->toPlainText().toInt(); 18 | } 19 | 20 | int zoomManageDialog::getHeight(){ 21 | return ui->hTextEdit->toPlainText().toInt(); 22 | 23 | } 24 | 25 | int zoomManageDialog::getIndexX(){ 26 | return ui->xTtextEdit->toPlainText().toInt(); 27 | 28 | } 29 | 30 | int zoomManageDialog::getIndexY(){ 31 | return ui->yTextEdit_2->toPlainText().toInt(); 32 | } 33 | 34 | double zoomManageDialog::getAngle(){ 35 | return ui->aTextEdit_3->toPlainText().toDouble(); 36 | } 37 | 38 | bool zoomManageDialog::isLeft(){ 39 | return ui->checkBox->isChecked(); 40 | } 41 | 42 | void zoomManageDialog::initDialog(ParameterSetting *params){ 43 | ui->wTextEdit->setText(QString("%1").arg(params->WIDTH_AND_HEIGHT.x)); 44 | ui->hTextEdit->setText(QString("%1").arg(params->WIDTH_AND_HEIGHT.y)); 45 | ui->xTtextEdit->setText(QString("%1").arg(params->CENTER_POINT.x)); 46 | ui->yTextEdit_2->setText(QString("%1").arg(params->CENTER_POINT.y)); 47 | ui->aTextEdit_3->setText(QString("%1").arg(params->ROTATION_ANGLE)); 48 | if(!params->RIGHT_OR_LEFT){ 49 | ui->checkBox->setCheckState(Qt::Checked); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/zoommanagedialog.h: -------------------------------------------------------------------------------- 1 | #ifndef ZOOMMANAGEDIALOG_H 2 | #define ZOOMMANAGEDIALOG_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class zoomManageDialog; 9 | } 10 | 11 | class zoomManageDialog : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit zoomManageDialog(QWidget *parent = nullptr); 17 | ~zoomManageDialog(); 18 | 19 | int getWidth(); 20 | int getHeight(); 21 | 22 | int getIndexX(); 23 | int getIndexY(); 24 | double getAngle(); 25 | bool isLeft(); 26 | 27 | void initDialog(ParameterSetting *params); 28 | 29 | private: 30 | Ui::zoomManageDialog *ui; 31 | }; 32 | 33 | #endif // ZOOMMANAGEDIALOG_H 34 | -------------------------------------------------------------------------------- /digital_Image_Process/imageProcess/zoommanagedialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | zoomManageDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 548 10 | 486 11 | 12 | 13 | 14 | 15 | 548 16 | 486 17 | 18 | 19 | 20 | Dialog 21 | 22 | 23 | 24 | 25 | 26 | 旋转横坐标 27 | 28 | 29 | Qt::AlignCenter 30 | 31 | 32 | 33 | 34 | 35 | 36 | 旋转纵坐标 37 | 38 | 39 | Qt::AlignCenter 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 9 48 | 49 | 50 | 51 | 宽度 52 | 53 | 54 | Qt::AlignCenter 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 0 63 | 0 64 | 65 | 66 | 67 | 68 | 13 69 | 70 | 71 | 72 | 图片缩放参数设置 73 | 74 | 75 | Qt::AlignCenter 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 高度 89 | 90 | 91 | Qt::AlignCenter 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 13 103 | 104 | 105 | 106 | 图片旋转参数设置 107 | 108 | 109 | Qt::AlignCenter 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 旋转角度 123 | 124 | 125 | Qt::AlignCenter 126 | 127 | 128 | 129 | 130 | 131 | 132 | Qt::Horizontal 133 | 134 | 135 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 136 | 137 | 138 | 139 | 140 | 141 | 142 | 逆时针旋转 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | buttonBox 152 | accepted() 153 | zoomManageDialog 154 | accept() 155 | 156 | 157 | 248 158 | 254 159 | 160 | 161 | 157 162 | 274 163 | 164 | 165 | 166 | 167 | buttonBox 168 | rejected() 169 | zoomManageDialog 170 | reject() 171 | 172 | 173 | 316 174 | 260 175 | 176 | 177 | 286 178 | 274 179 | 180 | 181 | 182 | 183 | 184 | -------------------------------------------------------------------------------- /digital_Image_Process/test/knee.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/digital_Image_Process/test/knee.raw -------------------------------------------------------------------------------- /digital_Image_Process/test/lung.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/digital_Image_Process/test/lung.raw -------------------------------------------------------------------------------- /digital_Image_Process/test/test.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/digital_Image_Process/test/test.bmp -------------------------------------------------------------------------------- /food_Data_Python/foodData/GetData.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | import requests 3 | import csv 4 | import re 5 | import matplotlib.pyplot as plt 6 | import lxml.etree 7 | import numpy as np 8 | 9 | 10 | # 爬取数据 11 | def getData(url, xpathList): 12 | headers = { 13 | 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' 14 | 'Chrome/72.0.3626.109 Safari/537.36'} 15 | try: 16 | response = requests.get(url, headers=headers) 17 | response = lxml.etree.HTML(response.text) 18 | # print(response) 19 | except: 20 | print('打开网址失败!!!请检查!') 21 | return 22 | 23 | dataList = [] 24 | for i in range(len(xpathList)): 25 | data = response.xpath(xpathList[i]) 26 | if len(data) == 0: 27 | print(f"爬取数据为空!请检查xpath路径xpathList[{i}]!") 28 | # print(data) 29 | dataList.append(data) 30 | # 返回数据列表 31 | return dataList 32 | 33 | 34 | # 数据写入csv文件 35 | def dataWriteToCsv(filename, data, headers=None, isHeaders=False): 36 | if headers is None: 37 | headers = [] 38 | try: 39 | with open(filename, 'a', encoding='utf-8', newline='') as f: 40 | writer = csv.writer(f) 41 | # 是否写入标题头 42 | if isHeaders: 43 | writer.writerow(headers) 44 | for i in range(len(data)): 45 | writer.writerow(data[i]) 46 | print(f'数据写入成功{filename}中!') 47 | except: 48 | print('写入文件失败!!!') 49 | 50 | 51 | # 爬取食物种类类别 52 | def getFoodKind(): 53 | url3 = f'http://db.foodmate.net/yingyang/type_1.html' 54 | xpathList3 = ['//*[@id="top"]/a'] 55 | dataElem3 = getData(url3, xpathList3) 56 | kindfood_temp = ['鱼类', '婴儿食品类', '小吃类'] 57 | kindFood = [] 58 | i = 0 59 | sign = 0 60 | signList = [11, 12, 13] 61 | while i < len(dataElem3[0]): 62 | if sign in signList: 63 | kindFood.append(kindfood_temp[sign - 11]) 64 | sign += 1 65 | else: 66 | kindFood.append(dataElem3[0][i].text) 67 | i += 1 68 | sign += 1 69 | return kindFood 70 | 71 | 72 | # 爬取表头 73 | def getCsvHeaders(): 74 | headers = ['食物', '别名', '特征', '分类', 'Wiki百科'] 75 | ur = 'http://db.foodmate.net/yingyang/type_0%3A1%3A0_1.html' 76 | xp = ['//*[@id="rightlist"]/div[@class="list"]//text()'] 77 | da = getData(ur, xp) 78 | for i in range(len(da[0]) // 2): 79 | headers.append(da[0][2 * i]) 80 | headers.append('备注') 81 | return headers 82 | 83 | 84 | # 读取食物营养库一类食物数据并保存到csv文件中 85 | def getFoodDataToCsv(foodKindId, foodKind, headers): 86 | # 食物名称及详细页面 87 | url0 = f'http://db.foodmate.net/yingyang/type_{foodKindId}.html' 88 | xpathList1 = ['/html/body/div[@id="main2"]/div/div[@id="leftcontent"]/div[@id="dibu"]/li[@class="lie"]/a'] 89 | dataElem = getData(url0, xpathList1) 90 | # re正则匹配将食物名称中的别名与特征提取出来 91 | pattan1 = re.compile('\[.*?\]') 92 | pattan2 = re.compile('\(.*?\)') 93 | dataList = [] 94 | for i in range(len(dataElem[0])): 95 | string_temp = dataElem[0][i].text 96 | # 提取名称中‘【】’的别名 97 | other_name = pattan1.search(string_temp) 98 | # 提取名称中‘()’的特性 99 | features = pattan2.search(string_temp) 100 | if other_name is None: 101 | other_name = 'Empty' 102 | else: 103 | other_name = other_name.group() 104 | other_name = other_name.replace('[', '') 105 | other_name = other_name.replace(']', '') 106 | if features is None: 107 | features = 'Empty' 108 | else: 109 | features = features.group() 110 | features = features.replace('(', '') 111 | features = features.replace(')', '') 112 | # 将名称中的别名与特征去除 113 | f_Name = pattan1.sub('', string_temp) 114 | f_Name = pattan2.sub('', f_Name) 115 | # 写入data列表 116 | data = [f_Name, other_name, features, foodKind[foodKindId - 1]] 117 | # 一种食物的数据页面 118 | url1 = 'http://db.foodmate.net/yingyang/' + dataElem[0][i].attrib['href'] 119 | xpathList2 = ['//*[@id="rightlist"]/div[@class="list"]//text()', '//*[@id="rightlist"]/center/a'] 120 | data2Elem = getData(url1, xpathList2) 121 | try: 122 | data.append(data2Elem[1][0].attrib['href']) 123 | except: 124 | data.append('Empty') 125 | for j in range(len(headers) - 6): 126 | try: 127 | data.append(float(data2Elem[0][2 * j + 1])) 128 | # 数据为空设置为nan 129 | except: 130 | data.append(np.nan) 131 | data.append('Empty') 132 | dataList.append(data) 133 | # print(dataList) 134 | dataWriteToCsv('Data\\food.csv', dataList, headers=headers, isHeaders=(foodKindId == 1)) 135 | 136 | 137 | # 主函数 138 | if __name__ == '__main__': 139 | # 爬取食物种类 140 | fK = getFoodKind() 141 | # print(fK) 142 | # 爬取表头 143 | header = getCsvHeaders() 144 | # print(header) 145 | # 爬取食物数据 146 | for num in range(20): 147 | getFoodDataToCsv(num + 1, fK, header) 148 | # print(num + 1) 149 | -------------------------------------------------------------------------------- /food_Data_Python/image/csv数据.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/food_Data_Python/image/csv数据.png -------------------------------------------------------------------------------- /food_Data_Python/image/分类1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/food_Data_Python/image/分类1.png -------------------------------------------------------------------------------- /food_Data_Python/image/分类2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/food_Data_Python/image/分类2.png -------------------------------------------------------------------------------- /food_Data_Python/image/分类3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/food_Data_Python/image/分类3.png -------------------------------------------------------------------------------- /food_Data_Python/image/查找1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/food_Data_Python/image/查找1.png -------------------------------------------------------------------------------- /food_Data_Python/image/查找2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/food_Data_Python/image/查找2.png -------------------------------------------------------------------------------- /food_Data_Python/image/查找3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/food_Data_Python/image/查找3.png -------------------------------------------------------------------------------- /food_Data_Python/image/网页截图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/food_Data_Python/image/网页截图.png -------------------------------------------------------------------------------- /food_Data_Python/image/网页截图1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/food_Data_Python/image/网页截图1.png -------------------------------------------------------------------------------- /food_Data_Python/image/网页截图2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/food_Data_Python/image/网页截图2.png -------------------------------------------------------------------------------- /food_Data_Python/image/网页截图3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/food_Data_Python/image/网页截图3.png -------------------------------------------------------------------------------- /food_Data_Python/image/网页截图4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/food_Data_Python/image/网页截图4.png -------------------------------------------------------------------------------- /learning_Notes/image/NFA.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/NFA.jpg -------------------------------------------------------------------------------- /learning_Notes/image/image-20220918134843475.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20220918134843475.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20220918142652345.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20220918142652345.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20220918171723040.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20220918171723040.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221126151220527.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221126151220527.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221126151537077.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221126151537077.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221126152530572.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221126152530572.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221126162936413.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221126162936413.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221126170728887.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221126170728887.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221126171020168.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221126171020168.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221126171113883.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221126171113883.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221126171158844.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221126171158844.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221126171245168.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221126171245168.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221127200007924.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221127200007924.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221127202836448.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221127202836448.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221127212325846.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221127212325846.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221129000605755.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221129000605755.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221129202322364.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221129202322364.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221129215915435.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221129215915435.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221129234129326.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221129234129326.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221129234412117.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221129234412117.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221130194025680.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221130194025680.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221130195136387.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221130195136387.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221130210258302.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221130210258302.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221130213441781.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221130213441781.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221130213604988.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221130213604988.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221130215008113.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221130215008113.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221130220042953.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221130220042953.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221130220525004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221130220525004.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221130221401540.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221130221401540.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221202214000908.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221202214000908.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221202223744014.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221202223744014.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221202223916108.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221202223916108.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221202224040639.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221202224040639.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221202232952674.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221202232952674.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204161900836.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204161900836.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204162205160.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204162205160.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204163905253.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204163905253.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204164000012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204164000012.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204170343500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204170343500.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204195222101.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204195222101.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204201432747.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204201432747.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204204512426.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204204512426.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204215502376.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204215502376.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204221719301.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204221719301.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204222524132.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204222524132.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204223312581.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204223312581.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204223823134.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204223823134.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204224829594.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204224829594.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204225225154.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204225225154.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204231248750.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204231248750.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204232804395.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204232804395.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204233102987.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204233102987.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204234824596.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204234824596.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221204235926836.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221204235926836.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221208203604062.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221208203604062.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221208204330596.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221208204330596.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221208205802541.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221208205802541.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221208210834463.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221208210834463.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221208214321369.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221208214321369.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221208223457565.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221208223457565.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221208224233659.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221208224233659.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221208230243339.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221208230243339.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221208231952595.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221208231952595.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221208232922917.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221208232922917.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221209103204698.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221209103204698.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221209113039531.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221209113039531.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221209202515232.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221209202515232.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221209210751824.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221209210751824.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221209224058847.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221209224058847.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221209230325479.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221209230325479.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221214142533135.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221214142533135.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20221214143300421.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20221214143300421.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230129172628581.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230129172628581.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230129191956938.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230129191956938.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230129192142660.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230129192142660.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230129192500273.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230129192500273.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230129210758907.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230129210758907.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230129213719617.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230129213719617.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230130113737301.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230130113737301.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230130171105741.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230130171105741.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230130171259218.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230130171259218.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230130171605078.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230130171605078.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230130175756423.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230130175756423.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230130194228688.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230130194228688.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230130195825655.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230130195825655.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230130205835623.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230130205835623.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230130210714085.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230130210714085.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230131115217226.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230131115217226.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230131122531111.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230131122531111.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230131134949085.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230131134949085.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230201153611966.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230201153611966.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230201153647259.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230201153647259.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230201174018318.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230201174018318.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230201175059639.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230201175059639.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230201175229159.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230201175229159.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230201175400474.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230201175400474.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230201175530732.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230201175530732.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230201175733445.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230201175733445.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230201180451246.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230201180451246.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230201184807197.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230201184807197.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230201195948654.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230201195948654.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230203200841260.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230203200841260.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230206160128655.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230206160128655.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230206160453845.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230206160453845.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230206160612559.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230206160612559.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230206162243812.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230206162243812.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230206162527469.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230206162527469.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230206170149419.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230206170149419.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230206170711770.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230206170711770.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230206193748505.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230206193748505.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230206213205148.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230206213205148.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230206213634173.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230206213634173.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230206213723686.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230206213723686.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230207180453857.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230207180453857.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230207191811825.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230207191811825.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230207195316382.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230207195316382.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230207195813879.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230207195813879.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230207200254765.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230207200254765.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230208135204680.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230208135204680.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230208135833107.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230208135833107.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230208143928024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230208143928024.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230208194116823.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230208194116823.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230208211608497.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230208211608497.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230209132658120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230209132658120.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230209154021285.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230209154021285.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230210155101388.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230210155101388.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230210155131256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230210155131256.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230210155706335.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230210155706335.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230210155805310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230210155805310.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230210161617949.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230210161617949.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230210165655134.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230210165655134.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230212213158363.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230212213158363.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230212220220437.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230212220220437.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230212224217547.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230212224217547.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230212224419837.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230212224419837.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230212230429927.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230212230429927.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230212232753731.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230212232753731.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230212233115187.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230212233115187.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230213140246196.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230213140246196.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230213141152970.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230213141152970.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230213145744785.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230213145744785.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230213224124025.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230213224124025.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230214112628843.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230214112628843.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230214113356520.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230214113356520.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230214113550739.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230214113550739.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230214114116272.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230214114116272.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230214114437801.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230214114437801.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230214150155279.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230214150155279.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230214151326294.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230214151326294.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230214221845963.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230214221845963.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230214222430812.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230214222430812.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230214225140416.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230214225140416.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230214231914740.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230214231914740.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230214232229492.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230214232229492.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230214233525361.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230214233525361.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230215000627933.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230215000627933.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230215154559027.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230215154559027.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230215155611584.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230215155611584.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230215160614023.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230215160614023.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230215160904675.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230215160904675.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230215161146482.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230215161146482.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230215164825113.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230215164825113.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230215223524888.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230215223524888.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230215224605590.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230215224605590.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230215231652261.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230215231652261.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230215231917425.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230215231917425.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230215233757896.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230215233757896.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230215234715846.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230215234715846.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230215235546792.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230215235546792.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230216150036525.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230216150036525.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230216150303115.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230216150303115.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230216161651349.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230216161651349.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230216161927410.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230216161927410.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230216161949640.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230216161949640.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230216172437150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230216172437150.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230216172528939.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230216172528939.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230216175843412.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230216175843412.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230216180036528.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230216180036528.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230216231327105.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230216231327105.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230217103850062.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230217103850062.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230218222118235.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230218222118235.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230218222545315.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230218222545315.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230218235117690.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230218235117690.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230219000618602.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230219000618602.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230220224109346.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230220224109346.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230220225559590.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230220225559590.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230221225810279.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230221225810279.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230221230120447.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230221230120447.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230221230512165.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230221230512165.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230221230735437.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230221230735437.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230221231303707.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230221231303707.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230221231624651.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230221231624651.png -------------------------------------------------------------------------------- /learning_Notes/image/image-20230222000508480.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/image-20230222000508480.png -------------------------------------------------------------------------------- /learning_Notes/image/继承属性.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/learning_Notes/image/继承属性.png -------------------------------------------------------------------------------- /markdown_catalogue/README.md: -------------------------------------------------------------------------------- 1 | # markdown_catalogue 2 | 自动生成markdown目录 3 | 4 | **@ author: Shuxin_Wang** 5 | **@ time: 2022.08.09** 6 | 7 | - 输入文件 **_绝对路径_**,后得到目录文本 -------------------------------------------------------------------------------- /markdown_catalogue/create_catalogue.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | # @author : Shuxin_Wang 3 | # @email : 213202122@seu.edu.cn 4 | # @time : 2022/8/10 5 | # @function: create catalogue for a md file 6 | # @version : V1.0 7 | # 8 | import re 9 | 10 | import pyperclip 11 | 12 | REG_CODE1 = re.compile("^```") 13 | REG_CODE2 = re.compile("```$") 14 | 15 | 16 | def catalogue_get(line_: str, level: int) -> str: 17 | l3 = line_[level::].strip() 18 | res = "- [%s](#%s)\n" % (l3, l3.replace(" ", "-")) 19 | for i in range(level - 1): 20 | res = "\t" + res 21 | return res 22 | 23 | 24 | def create_catalogue(file_: str, max_level: int = None) -> str: 25 | try: 26 | f = open(file_, encoding='utf-8') 27 | except Exception as e: 28 | return e.__str__() 29 | res = "" 30 | if_code = False 31 | for line in f: 32 | l1 = line.strip() 33 | if REG_CODE1.findall(l1) and REG_CODE2.findall(l1): 34 | continue 35 | if if_code: 36 | if REG_CODE1.findall(l1) or REG_CODE2.findall(l1): 37 | if_code = False 38 | continue 39 | else: 40 | continue 41 | else: 42 | if REG_CODE1.findall(l1): 43 | if_code = True 44 | continue 45 | level = 0 46 | for l2 in l1: 47 | if l2 == '#': 48 | level += 1 49 | else: 50 | break 51 | if level == 0: 52 | continue 53 | if max_level is None: 54 | res += catalogue_get(l1, level) 55 | elif max_level >= level: 56 | res += catalogue_get(l1, level) 57 | pyperclip.copy(res) 58 | return res 59 | 60 | 61 | if __name__ == "__main__": 62 | file_name = str(input("Please input file path:")) 63 | print(create_catalogue(file_name)) 64 | -------------------------------------------------------------------------------- /vCampus/access_jdbc30.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/vCampus/access_jdbc30.jar -------------------------------------------------------------------------------- /vCampus/src/data/vCampusDataBase.mdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-BigTree/college_assignment/640de2ce61dc5793ec515016bd8a62603dcd57b9/vCampus/src/data/vCampusDataBase.mdb -------------------------------------------------------------------------------- /vCampus/src/socket/client/ClientListen.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: socket.client 5 | * ===================================================== 6 | * Title: ClientListen.java 7 | * Created: [2022/8/13 18:38] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/13, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package socket.client; 17 | 18 | import socket.vo.Message; 19 | import java.io.ObjectInputStream; 20 | import java.net.Socket; 21 | 22 | public class ClientListen implements Runnable{ 23 | 24 | private Socket socket; 25 | //客户端的socket对象 26 | public Object data; 27 | // 服务端传输回的数据 28 | ClientListen(Socket socket){ 29 | this.socket = socket; 30 | } 31 | 32 | public void setSocket(Socket socket) { 33 | this.socket = socket; 34 | } 35 | 36 | public void setData(Object data) { 37 | this.data = data; 38 | } 39 | 40 | public Socket getSocket() { 41 | return socket; 42 | } 43 | 44 | public Object getData() { 45 | return data; 46 | } 47 | 48 | @Override 49 | public void run(){ 50 | try{ 51 | ObjectInputStream ois = new ObjectInputStream(socket.getInputStream()); 52 | Message message = (Message)ois.readObject(); 53 | setData(message.getData()); 54 | }catch(Exception e){ 55 | e.printStackTrace(); 56 | } 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /vCampus/src/socket/client/ClientMain.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: socket.client 5 | * ===================================================== 6 | * Title: ClientMain.java 7 | * Created: [2022/8/13 18:39] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/13, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package socket.client; 17 | 18 | import socket.vo.Message; 19 | import java.net.Socket; 20 | 21 | /** 22 | *

ClientMain

23 | * 24 | * 客户端主程序接口, 通过调用`request()`函数向服务端发送命令. 25 | * 26 | */ 27 | public class ClientMain { 28 | 29 | private static volatile Socket socket; 30 | // 客户端Socket对象 31 | 32 | public static void main(String[]args){ 33 | Object res = request(1,true, Boolean.TRUE); 34 | System.out.println("客户端接受到数据:" + (String)res); 35 | Object res2 = request(2, true, 250.4); 36 | System.out.println("客户端接受到数据:" + (String)res2); 37 | disconnect(); 38 | } 39 | 40 | public static Socket getSocket() { 41 | return socket; 42 | } 43 | 44 | private static void connect() { 45 | try { 46 | socket = new Socket("127.0.0.1", 9999); 47 | } catch (Exception e) { 48 | e.printStackTrace(); 49 | } 50 | 51 | } 52 | 53 | /** 54 | *向服务端发送指定命令消息. 55 | * 56 | * @param type: 命令ID 57 | * @param state: 消息状态 58 | * @param data: 传输数据对象 59 | * @return 返回服务端返回结果类型 60 | */ 61 | public static Object request(int type, boolean state, Object data){ 62 | connect(); 63 | ClientSend cs = new ClientSend(socket,new Message(type,state,data)); 64 | Thread thread = new Thread(cs); 65 | thread.start(); 66 | try{ 67 | thread.join(); 68 | }catch (Exception e){ 69 | e.printStackTrace(); 70 | } 71 | return cs.getData(); 72 | } 73 | 74 | /** 75 | *关闭socket. 76 | */ 77 | public static void disconnect(){ 78 | try{ 79 | socket.close(); 80 | }catch(Exception e){ 81 | e.printStackTrace(); 82 | } 83 | } 84 | 85 | } 86 | 87 | -------------------------------------------------------------------------------- /vCampus/src/socket/client/ClientSend.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: socket.client 5 | * ===================================================== 6 | * Title: ClientSend.java 7 | * Created: [2022/8/13 18:39] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/13, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package socket.client; 17 | 18 | import socket.vo.Message; 19 | import java.io.ObjectOutputStream; 20 | import java.net.Socket; 21 | 22 | public class ClientSend implements Runnable{ 23 | 24 | private Socket socket; 25 | // 客户端发送的socket对象 26 | private Message message; 27 | // 客户端->服务端的Message对象 28 | 29 | public ClientSend(Socket socket, Message message){ 30 | this.socket = socket; 31 | this.message = message; 32 | } 33 | 34 | public void setSocket(Socket socket) { 35 | this.socket = socket; 36 | } 37 | 38 | public void setMessage(Message message) { 39 | this.message = message; 40 | } 41 | 42 | public void setData(Object data){ 43 | message.setData(data); 44 | } 45 | 46 | public Socket getSocket() { 47 | return socket; 48 | } 49 | 50 | public Message getMessage() { 51 | return message; 52 | } 53 | 54 | public Object getData(){ 55 | return message.getData(); 56 | } 57 | 58 | @Override 59 | public void run(){ 60 | //To do something 61 | try{ 62 | ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream()); 63 | if(message.get_State()){ 64 | oos.writeObject(message); 65 | oos.flush(); 66 | 67 | ClientListen cl = new ClientListen(socket); 68 | Thread thread = new Thread(cl); 69 | thread.start(); 70 | try{ 71 | thread.join(); 72 | }catch (Exception e){ 73 | e.printStackTrace(); 74 | } 75 | setData(cl.getData()); 76 | } 77 | }catch (Exception e){ 78 | e.printStackTrace(); 79 | } 80 | } 81 | } 82 | 83 | -------------------------------------------------------------------------------- /vCampus/src/socket/server/ServerListen.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: socket.server 5 | * ===================================================== 6 | * Title: ServerListen.java 7 | * Created: [2022/8/13 18:42] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/13, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package socket.server; 17 | 18 | import socket.vo.Message; 19 | import java.io.ObjectInputStream; 20 | import java.io.Serializable; 21 | import java.net.Socket; 22 | 23 | public class ServerListen implements Runnable, Serializable { 24 | private Socket socket; 25 | // 来自客户端socket对象 26 | 27 | public ServerListen(Socket socket) { 28 | this.socket = socket; 29 | } 30 | 31 | public void setSocket(Socket socket) { 32 | this.socket = socket; 33 | } 34 | 35 | /* 36 | *多线程运行接口 37 | */ 38 | @Override 39 | public void run() { 40 | try { 41 | /* ObjectInputStream反序列化流,将之前使用ObjectOutputStream 42 | 序列化的原始数据恢复为对象,以流的方式读取对象。*/ 43 | ObjectInputStream ois = new ObjectInputStream(socket.getInputStream()); 44 | Object ob = ois.readObject(); 45 | Message message = (Message) ob; 46 | //System.out.println(message.getData()); 47 | 48 | ServerProcess sp = new ServerProcess(socket, message); 49 | Thread thread = new Thread(sp); 50 | thread.start(); 51 | try{ 52 | thread.join(); 53 | }catch (Exception e){ 54 | e.printStackTrace(); 55 | } 56 | } catch (Exception e) { 57 | e.printStackTrace(); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /vCampus/src/socket/server/ServerMain.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: socket.server 5 | * ===================================================== 6 | * Title: ServerMain.java 7 | * Created: [2022/8/17 20:52] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/17, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package socket.server; 17 | 18 | import java.net.ServerSocket; 19 | import java.net.Socket; 20 | 21 | public class ServerMain { 22 | 23 | public static void main(String[]args){ 24 | try (ServerSocket serverSocket = new ServerSocket(9999);) { 25 | //处理多个Client端 26 | while (!serverSocket.isClosed()) { 27 | Socket socket = serverSocket.accept(); 28 | new Thread(new ServerListen(socket)).start(); 29 | } 30 | } catch (Exception e) { 31 | e.printStackTrace(); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vCampus/src/socket/server/ServerProcess.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: socket.server 5 | * ===================================================== 6 | * Title: ServerProcess.java 7 | * Created: [2022/8/13 18:42] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/13, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package socket.server; 17 | 18 | import socket.vo.Message; 19 | import vCampusServer.ui.ServerMain; 20 | 21 | import java.io.ObjectOutputStream; 22 | import java.net.Socket; 23 | 24 | public class ServerProcess implements Runnable { 25 | private Socket socket; 26 | //从客户端接受到的Socket对象 27 | private Message message; 28 | // 从客户端接受到的Message对象 29 | 30 | public ServerProcess() { 31 | 32 | } 33 | 34 | public ServerProcess(Socket socket, Message message) { 35 | this.socket = socket; 36 | this.message = message; 37 | } 38 | 39 | public void setSocket(Socket socket) { 40 | this.socket = socket; 41 | } 42 | 43 | public void setMessage(Message message) { 44 | this.message = message; 45 | } 46 | 47 | public Socket getSocket() { 48 | return socket; 49 | } 50 | 51 | public Message getMessage() { 52 | return message; 53 | } 54 | 55 | /* 56 | *多线程运行接口 57 | */ 58 | @Override 59 | public void run() { 60 | //创建发送到客户端的socket对象 61 | try { 62 | ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream()); 63 | System.out.println("服务端接受到命令:" + message.getData().toString() + message.getType()); 64 | 65 | //To do something 66 | 67 | 68 | //向客户端发送message 69 | Message ans = new Message(message.getType(), true, new String("您好,这里是服务端,操作" + message.getType())); 70 | oos.reset(); 71 | oos.writeObject(ans); 72 | oos.flush(); 73 | ServerMain.ui.setTextArea1("IP:" + socket.getInetAddress().toString() + ";\t指令ID:" + message.getType() + ";\t运行结果:" + ans.get_State() + ";\n"); 74 | 75 | } catch (Exception e) { 76 | e.printStackTrace(); 77 | } 78 | } 79 | 80 | 81 | } 82 | -------------------------------------------------------------------------------- /vCampus/src/socket/vo/Message.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: socket.vo 5 | * ===================================================== 6 | * Title: Message.java 7 | * Created: [2022/8/13 18:39] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/13, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package socket.vo; 17 | 18 | import java.io.Serializable; 19 | 20 | public class Message implements Serializable { 21 | 22 | private static final long serialVersionUID = 1L; 23 | private int type; 24 | private boolean state; 25 | private Object data; 26 | 27 | public Message(int type,boolean state,Object data){ 28 | this.type=type; 29 | this.state=state; 30 | this.data=data; 31 | } 32 | 33 | public int getType() { 34 | return type; 35 | } 36 | 37 | public boolean get_State(){ 38 | return state; 39 | } 40 | 41 | public Object getData() { 42 | return data; 43 | } 44 | 45 | public void setType(int type) { 46 | this.type = type; 47 | } 48 | 49 | public void setState(boolean state) { 50 | this.state = state; 51 | } 52 | 53 | public void setData(Object data) { 54 | this.data = data; 55 | } 56 | 57 | @Override 58 | public String toString(){ 59 | return "..."; 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /vCampus/src/vCampusModel/bank/BankManage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusModel.bank 5 | * ===================================================== 6 | * Title: BankManage.java 7 | * Created: [2022/8/18 16:46] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/18, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusModel.bank; 17 | 18 | import java.io.Serializable; 19 | 20 | public class BankManage implements Serializable { 21 | private String uid; 22 | private int operation; 23 | private double amount; 24 | private String remarks; 25 | 26 | public BankManage() { 27 | 28 | } 29 | 30 | public BankManage(String uid, int operation, double amount, String remarks) { 31 | this.uid = uid; 32 | this.operation = operation; 33 | this.amount = amount; 34 | this.remarks = remarks; 35 | } 36 | 37 | public void setUid(String uid) { 38 | this.uid = uid; 39 | } 40 | 41 | public void setAmount(double amount) { 42 | this.amount = amount; 43 | } 44 | 45 | public void setOperation(int operation) { 46 | this.operation = operation; 47 | } 48 | 49 | public void setRemarks(String remarks) { 50 | this.remarks = remarks; 51 | } 52 | 53 | public String getUid() { 54 | return uid; 55 | } 56 | 57 | public double getAmount() { 58 | return amount; 59 | } 60 | 61 | public int getOperation() { 62 | return operation; 63 | } 64 | 65 | public String getRemarks() { 66 | return remarks; 67 | } 68 | 69 | public String toString() { 70 | return "uid:" + uid + "\toperation:" + operation + "\tamount:" + amount + "\tremarks:" + remarks; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /vCampus/src/vCampusModel/bank/BankRecords.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusModel.bank 5 | * ===================================================== 6 | * Title: BankRecords.java 7 | * Created: [2022/8/18 16:47] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/18, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusModel.bank; 17 | 18 | import java.io.Serializable; 19 | import java.util.ArrayList; 20 | 21 | public class BankRecords implements Serializable { 22 | private String uid; 23 | private ArrayList bankManageList; 24 | 25 | public BankRecords() { 26 | 27 | } 28 | 29 | public BankRecords(String uid, ArrayList bankManageList) { 30 | this.uid = uid; 31 | this.bankManageList = bankManageList; 32 | } 33 | 34 | public void setUid(String uid) { 35 | this.uid = uid; 36 | } 37 | 38 | public void setBankManageList(ArrayList bankManageList) { 39 | this.bankManageList = bankManageList; 40 | } 41 | 42 | public String getUid() { 43 | return uid; 44 | } 45 | 46 | public ArrayList getBankManageList() { 47 | return bankManageList; 48 | } 49 | 50 | public String toString() { 51 | StringBuilder list = new StringBuilder(); 52 | for (BankManage bankManage : bankManageList) { 53 | list.append(bankManage.toString()).append("\n"); 54 | } 55 | 56 | return "uid:" + uid + "\n" + list.toString(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /vCampus/src/vCampusModel/course/Course.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusModel.course 5 | * ===================================================== 6 | * Title: Course.java 7 | * Created: [2022/8/18 16:23] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/18, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusModel.course; 17 | 18 | import java.io.Serializable; 19 | 20 | public class Course implements Serializable { 21 | private String cid; 22 | 23 | private String cname; 24 | 25 | private int classHours; 26 | 27 | private double credit; 28 | 29 | private String classTime; 30 | 31 | private String tname; 32 | 33 | private String tid; 34 | 35 | public Course() { 36 | 37 | } 38 | 39 | public Course(String cid, String cname, int classHours, 40 | double credit, String classTime, String tname, String tid) { 41 | this.cid = cid; 42 | this.cname = cname; 43 | this.classHours = classHours; 44 | this.credit = credit; 45 | this.classTime = classTime; 46 | this.tname = tname; 47 | this.tid = tid; 48 | } 49 | 50 | public void setCid(String cid) { 51 | this.cid = cid; 52 | } 53 | 54 | public void setClassHours(int classHours) { 55 | this.classHours = classHours; 56 | } 57 | 58 | public void setClassTime(String classTime) { 59 | this.classTime = classTime; 60 | } 61 | 62 | public void setCname(String cname) { 63 | this.cname = cname; 64 | } 65 | 66 | public void setCredit(double credit) { 67 | this.credit = credit; 68 | } 69 | 70 | public void setTname(String tname) { 71 | this.tname = tname; 72 | } 73 | 74 | public void setTid(String tid) { 75 | this.tid = tid; 76 | } 77 | 78 | public String getCid() { 79 | return cid; 80 | } 81 | 82 | public String getCname() { 83 | return cname; 84 | } 85 | 86 | public double getCredit() { 87 | return credit; 88 | } 89 | 90 | public int getClassHours() { 91 | return classHours; 92 | } 93 | 94 | public String getClassTime() { 95 | return classTime; 96 | } 97 | 98 | public String getTname() { 99 | return tname; 100 | } 101 | 102 | public String getTid() { 103 | return tid; 104 | } 105 | 106 | public String toString() { 107 | return "cid" + cid + "\tcname" + cname + "\tname" + tname + "\ttid" + tid; 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /vCampus/src/vCampusModel/course/CourseChoose.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusModel.course 5 | * ===================================================== 6 | * Title: CourseChoose.java 7 | * Created: [2022/8/18 16:23] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/18, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusModel.course; 17 | 18 | import java.io.Serializable; 19 | import java.util.ArrayList; 20 | 21 | public class CourseChoose implements Serializable { 22 | 23 | private String uid; 24 | 25 | private String uname; 26 | 27 | private ArrayList courseList; 28 | 29 | public CourseChoose() { 30 | 31 | } 32 | 33 | public CourseChoose(String uid, String uname, ArrayList courseList) { 34 | this.uid = uid; 35 | this.uname = uname; 36 | this.courseList = courseList; 37 | } 38 | 39 | public void setUid(String uid) { 40 | this.uid = uid; 41 | } 42 | 43 | public void setCourseList(ArrayList courseList) { 44 | this.courseList = courseList; 45 | } 46 | 47 | public void setUname(String uname) { 48 | this.uname = uname; 49 | } 50 | 51 | public String getUid() { 52 | return uid; 53 | } 54 | 55 | public String getUname() { 56 | return uname; 57 | } 58 | 59 | public ArrayList getCourseList() { 60 | return courseList; 61 | } 62 | 63 | public String toString() { 64 | StringBuilder list = new StringBuilder(); 65 | for (Course course : courseList) { 66 | list.append(course.toString()).append("\n"); 67 | } 68 | return "uid:" + uid + "\tuname" + uname + "\n" + list.toString(); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /vCampus/src/vCampusModel/library/Book.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusModel.library 5 | * ===================================================== 6 | * Title: Book.java 7 | * Created: [2022/8/18 16:34] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/18, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusModel.library; 17 | 18 | import java.io.Serializable; 19 | 20 | public class Book implements Serializable { 21 | private String bid; 22 | 23 | private String bname; 24 | 25 | private double price; 26 | 27 | private String time; 28 | 29 | private String author; 30 | 31 | public Book() { 32 | 33 | } 34 | 35 | public Book(String bid, String bname, double price, 36 | String time, String author) { 37 | this.bid = bid; 38 | this.bname = bname; 39 | this.price = price; 40 | this.time = time; 41 | this.author = author; 42 | } 43 | 44 | public void setAuthor(String author) { 45 | this.author = author; 46 | } 47 | 48 | public void setBid(String bid) { 49 | this.bid = bid; 50 | } 51 | 52 | public void setBname(String bname) { 53 | this.bname = bname; 54 | } 55 | 56 | public void setPrice(double price) { 57 | this.price = price; 58 | } 59 | 60 | public void setTime(String time) { 61 | this.time = time; 62 | } 63 | 64 | public double getPrice() { 65 | return price; 66 | } 67 | 68 | public String getAuthor() { 69 | return author; 70 | } 71 | 72 | public String getBid() { 73 | return bid; 74 | } 75 | 76 | public String getBname() { 77 | return bname; 78 | } 79 | 80 | public String getTime() { 81 | return time; 82 | } 83 | 84 | public String toString() { 85 | return "bid:" + bid + "\tbname:" + bname; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /vCampus/src/vCampusModel/library/BookBorrow.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusModel.library 5 | * ===================================================== 6 | * Title: BookBorrow.java 7 | * Created: [2022/8/18 16:34] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/18, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusModel.library; 17 | 18 | import java.io.Serializable; 19 | import java.util.ArrayList; 20 | 21 | public class BookBorrow implements Serializable { 22 | private String uid; 23 | 24 | private ArrayList bookList; 25 | 26 | public BookBorrow() { 27 | 28 | } 29 | 30 | public BookBorrow(String uid, ArrayList bookList) { 31 | this.uid = uid; 32 | this.bookList = bookList; 33 | } 34 | 35 | public void setUid(String uid) { 36 | this.uid = uid; 37 | } 38 | 39 | public void setBookList(ArrayList bookList) { 40 | this.bookList = bookList; 41 | } 42 | 43 | public String getUid() { 44 | return uid; 45 | } 46 | 47 | public ArrayList getBookList() { 48 | return bookList; 49 | } 50 | 51 | public String toString() { 52 | StringBuilder list = new StringBuilder(); 53 | for (Book book : bookList) { 54 | list.append(book.toString()).append("\n"); 55 | } 56 | 57 | return "uid:" + uid + "\n" + list.toString(); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /vCampus/src/vCampusModel/shop/Product.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusModel.shop 5 | * ===================================================== 6 | * Title: Product.java 7 | * Created: [2022/8/18 16:41] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/18, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusModel.shop; 17 | 18 | import java.io.Serializable; 19 | 20 | public class Product implements Serializable { 21 | private String pid; 22 | private String pname; 23 | private double price; 24 | private int num; 25 | 26 | public Product() { 27 | 28 | } 29 | 30 | public Product(String pid, String panme, double price, int num) { 31 | this.pid = pid; 32 | this.pname = panme; 33 | this.price = price; 34 | this.num = num; 35 | } 36 | 37 | public void setPrice(double price) { 38 | this.price = price; 39 | } 40 | 41 | public void setNum(int num) { 42 | this.num = num; 43 | } 44 | 45 | public void setPid(String pid) { 46 | this.pid = pid; 47 | } 48 | 49 | public void setPname(String pname) { 50 | this.pname = pname; 51 | } 52 | 53 | public double getPrice() { 54 | return price; 55 | } 56 | 57 | public int getNum() { 58 | return num; 59 | } 60 | 61 | public String getPid() { 62 | return pid; 63 | } 64 | 65 | public String getPname() { 66 | return pname; 67 | } 68 | 69 | public String toString() { 70 | return "pid:" + pid + "\tpname:" + pname + "\tprice:" + price + "\tnum:" + num; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /vCampus/src/vCampusModel/shop/StoreConsumption.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusModel.shop 5 | * ===================================================== 6 | * Title: StoreConsumption.java 7 | * Created: [2022/8/18 16:41] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/18, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusModel.shop; 17 | 18 | import java.io.Serializable; 19 | import java.util.ArrayList; 20 | 21 | public class StoreConsumption implements Serializable { 22 | private String uid; 23 | private ArrayList productList; 24 | 25 | public StoreConsumption() { 26 | 27 | } 28 | 29 | public StoreConsumption(String uid, ArrayList productList) { 30 | this.uid = uid; 31 | this.productList = productList; 32 | } 33 | 34 | public void setUid(String uid) { 35 | this.uid = uid; 36 | } 37 | 38 | public void setProductList(ArrayList productList) { 39 | this.productList = productList; 40 | } 41 | 42 | public String getUid() { 43 | return uid; 44 | } 45 | 46 | public ArrayList getProductList() { 47 | return productList; 48 | } 49 | 50 | public String toString() { 51 | StringBuilder list = new StringBuilder(); 52 | for (Product product : productList) { 53 | list.append(product.toString()).append("\n"); 54 | } 55 | 56 | return "uid:" + uid + "\n" + list.toString(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /vCampus/src/vCampusModel/user/Student.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusModel.user 5 | * ===================================================== 6 | * Title: Student.java 7 | * Created: [2022/8/13 18:37] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/13, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusModel.user; 17 | 18 | public class Student extends User { 19 | private String major; 20 | private String grade; 21 | private String sClass; 22 | 23 | public Student() { 24 | 25 | } 26 | 27 | public Student(String uid, String password, String userName, int age, boolean sex, String collage, 28 | String email, String phoneNumber, String address, String major, 29 | String grade, String sClass) { 30 | super(uid, password, userName, age, sex, collage, email, phoneNumber, address, 1); 31 | this.major = major; 32 | this.grade = grade; 33 | this.sClass = sClass; 34 | } 35 | 36 | public void setMajor(String major) { 37 | this.major = major; 38 | } 39 | 40 | public void setGrade(String grade) { 41 | this.grade = grade; 42 | } 43 | 44 | public void setsClass(String sClass) { 45 | this.sClass = sClass; 46 | } 47 | 48 | public String getMajor() { 49 | return major; 50 | } 51 | 52 | public String getGrade() { 53 | return grade; 54 | } 55 | 56 | public String getsClass() { 57 | return sClass; 58 | } 59 | 60 | public String toString() { 61 | return super.toString() + "\tmajor:" + major + "\tgrade:" + grade + "\tclass:" + grade; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /vCampus/src/vCampusModel/user/Teacher.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusModel.user 5 | * ===================================================== 6 | * Title: Teacher.java 7 | * Created: [2022/8/13 18:38] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/13, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusModel.user; 17 | 18 | public class Teacher extends User { 19 | private String position; 20 | 21 | public Teacher() { 22 | 23 | } 24 | 25 | public Teacher(String uid, String password, String userName, int age, String collage, boolean sex, 26 | String email, String phoneNumber, String address, String position) { 27 | super(uid, password, userName, age, sex, collage, email, phoneNumber, address, 2); 28 | this.position = position; 29 | } 30 | 31 | public void setPosition(String position) { 32 | this.position = position; 33 | } 34 | 35 | public String getPosition() { 36 | return position; 37 | } 38 | 39 | public String toString() { 40 | return super.toString() + "\tposition:" + position; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vCampus/src/vCampusModel/user/User.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusModel.user 5 | * ===================================================== 6 | * Title: User.java 7 | * Created: [2022/8/13 18:35] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/13, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusModel.user; 17 | 18 | import java.io.Serializable; 19 | import java.util.Arrays; 20 | import java.util.Objects; 21 | import java.util.regex.Matcher; 22 | import java.util.regex.Pattern; 23 | 24 | public class User implements Serializable { 25 | //登陆ID 26 | private String uid; 27 | //登陆密码 28 | private String password; 29 | //用户姓名 30 | private String userName; 31 | //年龄 32 | private int age; 33 | //性别,ture->男,false->女 34 | private boolean sex; 35 | 36 | private String collage; 37 | //邮箱 38 | private String email; 39 | //电话号码 40 | private String phoneNumber; 41 | //住址 42 | private String address; 43 | //用户身份 44 | private int identity; 45 | 46 | public User() { 47 | 48 | } 49 | 50 | public User(String uid, String password, int identity) { 51 | this.uid = uid; 52 | this.password = password; 53 | this.identity = identity; 54 | } 55 | 56 | public User(String uid, String password, String userName, int age, boolean sex, String collage, 57 | String email, String phoneNumber, String address, int identity) { 58 | this.uid = uid; 59 | this.password = password; 60 | this.userName = userName; 61 | this.age = age; 62 | this.sex = sex; 63 | this.collage = collage; 64 | this.email = email; 65 | this.phoneNumber = phoneNumber; 66 | this.address = address; 67 | this.identity = identity; 68 | } 69 | 70 | public void setUid(String uid) { 71 | this.uid = uid; 72 | } 73 | 74 | public void setPassword(String password) { 75 | this.password = password; 76 | } 77 | 78 | public void setUserName(String userName) { 79 | this.userName = userName; 80 | } 81 | 82 | public void setAge(int age) { 83 | this.age = age; 84 | } 85 | 86 | public void setSex(boolean sex) { 87 | this.sex = sex; 88 | } 89 | 90 | public void setEmail(String email) { 91 | this.email = email; 92 | } 93 | 94 | public void setPhoneNumber(String phoneNumber) { 95 | this.phoneNumber = phoneNumber; 96 | } 97 | 98 | public void setAddress(String address) { 99 | this.address = address; 100 | } 101 | 102 | public void setIdentity(int identity) { 103 | this.identity = identity; 104 | } 105 | 106 | public String getUid() { 107 | return uid; 108 | } 109 | 110 | public String getPassword() { 111 | return password; 112 | } 113 | 114 | public String getUserName() { 115 | return userName; 116 | } 117 | 118 | public int getAge() { 119 | return age; 120 | } 121 | 122 | public String getEmail() { 123 | return email; 124 | } 125 | 126 | public String getPhoneNumber() { 127 | return phoneNumber; 128 | } 129 | 130 | public String getAddress() { 131 | return address; 132 | } 133 | 134 | public boolean getSex() { 135 | return sex; 136 | } 137 | 138 | public int getIdentity() { 139 | return identity; 140 | } 141 | 142 | public void setCollage(String collage) { 143 | this.collage = collage; 144 | } 145 | 146 | public String getCollage() { 147 | return collage; 148 | } 149 | 150 | @Override 151 | public boolean equals(Object o) { 152 | if (this == o) return true; 153 | if (o == null || getClass() != o.getClass()) return false; 154 | User user = (User) o; 155 | return Objects.equals(uid, user.uid) && 156 | Objects.equals(password, user.password); 157 | } 158 | 159 | @Override 160 | public int hashCode() { 161 | return Objects.hash(uid, password); 162 | } 163 | 164 | @Override 165 | public String toString() { 166 | return "uid:" + uid + "\tuserName" + userName + "\tidentity:" + identity; 167 | } 168 | } 169 | 170 | -------------------------------------------------------------------------------- /vCampus/src/vCampusModel/vo/SelectManage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusModel.vo 5 | * ===================================================== 6 | * Title: SelectManage.java 7 | * Created: [2022/8/18 16:52] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/18, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusModel.vo; 17 | 18 | import java.io.Serializable; 19 | 20 | public class SelectManage implements Serializable { 21 | private String key; 22 | private String value; 23 | 24 | public SelectManage() { 25 | 26 | } 27 | 28 | public SelectManage(String key, String value) { 29 | this.key = key; 30 | this.value = value; 31 | } 32 | 33 | public void setKey(String key) { 34 | this.key = key; 35 | } 36 | 37 | public void setValue(String value) { 38 | this.value = value; 39 | } 40 | 41 | public String getKey() { 42 | return key; 43 | } 44 | 45 | public String getValue() { 46 | return value; 47 | } 48 | 49 | public String toString() { 50 | return "key:" + key + "\tvalue:" + value; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /vCampus/src/vCampusServer/dao/BaseDao.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusServer.dao 5 | * ===================================================== 6 | * Title: BaseDao.java 7 | * Created: [2022/8/17 15:00] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/17, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusServer.dao; 17 | 18 | import java.sql.*; 19 | 20 | public class BaseDao { 21 | public Connection connection; 22 | 23 | public PreparedStatement preparedStatement; 24 | 25 | public ResultSet resultSet; 26 | 27 | /** 28 | * 连接数据库. 29 | */ 30 | public void getConnect() { 31 | try { 32 | Class.forName("com.hxtt.sql.access.AccessDriver"); 33 | connection = DriverManager.getConnection("jdbc:Access:///src\\data\\vCampusDataBase.mdb"); 34 | } catch (SQLException | ClassNotFoundException e) { 35 | e.printStackTrace(); 36 | } 37 | } 38 | 39 | /** 40 | * 连接数据库. 41 | * 42 | * @param filePath 数据库路径 43 | */ 44 | public void getConnect(String filePath) { 45 | try { 46 | Class.forName("com.hxtt.sql.access.AccessDriver"); 47 | connection = DriverManager.getConnection("jdbc:Access:///" + filePath); 48 | } catch (SQLException | ClassNotFoundException e) { 49 | e.printStackTrace(); 50 | } 51 | } 52 | 53 | 54 | /** 55 | * 执行SQL查询语句 56 | * 57 | * @param sql SQL语句 58 | * @return ResultSet对象 59 | */ 60 | public ResultSet selectSQL(String sql) { 61 | try { 62 | preparedStatement = connection.prepareStatement(sql); 63 | resultSet = preparedStatement.executeQuery(); 64 | } catch (SQLException e) { 65 | e.printStackTrace(); 66 | } 67 | return resultSet; 68 | } 69 | 70 | /** 71 | * 执行SQL增删改语句 72 | * 73 | * @param sql SQL语句 74 | * @return 增删改行号,错误返回0 75 | */ 76 | public int upDataSQL(String sql) { 77 | int index = 0; 78 | try { 79 | preparedStatement = connection.prepareStatement(sql); 80 | index = preparedStatement.executeUpdate(); 81 | } catch (SQLException e) { 82 | e.printStackTrace(); 83 | } 84 | return index; 85 | } 86 | 87 | 88 | /** 89 | * 关闭相关数据库 90 | */ 91 | public void disconnect() { 92 | try { 93 | preparedStatement.close(); 94 | if (resultSet != null) { 95 | resultSet.close(); 96 | } 97 | connection.close(); 98 | } catch (SQLException e) { 99 | e.printStackTrace(); 100 | } 101 | } 102 | 103 | 104 | public static void main(String[] args) { 105 | BaseDao dao = new BaseDao(); 106 | 107 | dao.getConnect(); 108 | 109 | //查询SQL语句 110 | String sql = "SELECT* FROM users WHERE uid = '09020237'"; 111 | ResultSet res = dao.selectSQL(sql); 112 | try { 113 | while (res.next()) { 114 | System.out.print("uid:" + res.getString("uid")); 115 | System.out.println("\tpassword:" + res.getString("password")); 116 | } 117 | } catch (SQLException e) { 118 | e.printStackTrace(); 119 | } 120 | //增删改SQL语句 121 | String id = "09020345"; 122 | String sql2 = "INSERT INTO bank VALUES('" + id + "', '200.0')"; 123 | int i = dao.upDataSQL(sql2); 124 | if (i != 0) { 125 | System.out.println("插入成功!"); 126 | } 127 | dao.disconnect(); 128 | } 129 | } -------------------------------------------------------------------------------- /vCampus/src/vCampusServer/mlp/Login.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusServer.mlp 5 | * ===================================================== 6 | * Title: Login.java 7 | * Created: [2022/8/17 16:47] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/17, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusServer.mlp; 17 | 18 | import socket.vo.Message; 19 | import vCampusModel.user.User; 20 | 21 | public class Login { 22 | 23 | Message login(User user){ 24 | 25 | 26 | 27 | return null; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /vCampus/src/vCampusServer/mlp/StoreMlp.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: BaseDao.java 4 | * Package: vCampusServer.mlp 5 | * ===================================================== 6 | * Title: StoreMlp.java 7 | * Created: [2022/8/22 14:56] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/22, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusServer.mlp; 17 | 18 | import vCampusModel.shop.Product; 19 | import vCampusModel.shop.StoreConsumption; 20 | import vCampusModel.user.User; 21 | import vCampusModel.vo.SelectManage; 22 | import vCampusServer.dao.BaseDao; 23 | import java.sql.ResultSet; 24 | import java.util.ArrayList; 25 | 26 | public class StoreMlp { 27 | 28 | private StoreConsumption sql2store(String uid, BaseDao dao, String sql) { 29 | ArrayList products = new ArrayList(); 30 | 31 | ResultSet resultSet = dao.selectSQL(sql); 32 | 33 | try { 34 | while (resultSet.next()) { 35 | Product p = new Product(resultSet.getString("pid"), 36 | resultSet.getString("pname"), 37 | Double.parseDouble(resultSet.getString("price")), 38 | Integer.parseInt(resultSet.getString("num"))); 39 | products.add(p); 40 | } 41 | 42 | } catch (Exception e) { 43 | e.printStackTrace(); 44 | return null; 45 | } 46 | dao.disconnect(); 47 | 48 | return new StoreConsumption(uid, products); 49 | } 50 | 51 | public StoreConsumption visitAllProduct() { 52 | 53 | BaseDao dao = new BaseDao(); 54 | dao.getConnect(); 55 | String sql = "SELECT* FROM store"; 56 | 57 | return this.sql2store("1", dao, sql); 58 | 59 | } 60 | 61 | public StoreConsumption searchProduct(SelectManage selectManage) { 62 | 63 | BaseDao dao = new BaseDao(); 64 | dao.getConnect(); 65 | String sql = "SELECT* FROM store WHERE " + selectManage.getKey() + " LIKE '%" + selectManage.getValue() + "%'"; 66 | 67 | return this.sql2store("1", dao, sql); 68 | } 69 | 70 | public Boolean buyProduct(StoreConsumption buyList) { 71 | BaseDao dao = new BaseDao(); 72 | dao.getConnect(); 73 | 74 | for (Product product : buyList.getProductList()) { 75 | String sql = "SELECT* FROM store WHERE pid = '" + product.getPid() + "'"; 76 | ResultSet resultSet = dao.selectSQL(sql); 77 | try { 78 | int num = 0; 79 | if(resultSet.next()){ 80 | num = Integer.parseInt(resultSet.getString("num")); 81 | } 82 | 83 | if (product.getNum() < num) { 84 | String sql2 = "UPDATE store SET num = '" + (num - product.getNum()) + "' WHERE pid = '" + product.getPid() + "'"; 85 | dao.upDataSQL(sql2); 86 | String sql3 = "INSERT INTO storeConsumption VALUES('" + buyList.getUid() + "', '" + product.getPid() + "', '" + product.getPname() + " ×" + product.getNum() + "', '" + product.getPrice() * product.getNum() + "')"; 87 | dao.upDataSQL(sql3); 88 | } 89 | } catch (Exception e) { 90 | e.printStackTrace(); 91 | return false; 92 | } 93 | } 94 | 95 | return true; 96 | } 97 | 98 | public StoreConsumption seeConsumption(User user) { 99 | BaseDao dao = new BaseDao(); 100 | dao.getConnect(); 101 | String sql = "SELECT* FROM storeConsumption WHERE uid = '" + user.getUid() + "'"; 102 | ResultSet resultSet = dao.selectSQL(sql); 103 | 104 | ArrayList products = new ArrayList(); 105 | try { 106 | while (resultSet.next()) { 107 | products.add( 108 | new Product(resultSet.getString("pid"), 109 | resultSet.getString("pname"), 110 | Double.parseDouble(resultSet.getString("price")), 111 | 1)); 112 | } 113 | } catch (Exception e) { 114 | e.printStackTrace(); 115 | return null; 116 | } 117 | dao.disconnect(); 118 | 119 | return new StoreConsumption(user.getUid(), products); 120 | } 121 | 122 | public static void main(String[] args) { 123 | StoreMlp sm = new StoreMlp(); 124 | //System.out.println(sm.visitAllProduct()); 125 | //SelectManage s = new SelectManage("pname", "雪糕"); 126 | //System.out.println(sm.searchProduct(s)); 127 | /* 128 | Product p1 = new Product("00001", "雪糕1", 10.0, 1), 129 | p2 = new Product("00003", "薯片1", 4.0, 2), 130 | p3 = new Product("00004", "面包1", 2.0, 3); 131 | ArrayList l = new ArrayList(); 132 | l.add(p1); 133 | l.add(p2); 134 | System.out.println(sm.buyProduct(new StoreConsumption("09020237", l)));*/ 135 | System.out.println(sm.seeConsumption(new User("09020237", "1", 1))); 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /vCampus/src/vCampusServer/mlp/StuMlp.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: BaseDao.java 4 | * Package: vCampusServer.mlp 5 | * ===================================================== 6 | * Title: StuMlp.java 7 | * Created: [2022/8/23 11:02] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/23, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusServer.mlp; 17 | 18 | import vCampusModel.course.Course; 19 | import vCampusModel.course.CourseChoose; 20 | import vCampusModel.user.User; 21 | import vCampusServer.dao.BaseDao; 22 | import java.sql.ResultSet; 23 | import java.util.ArrayList; 24 | 25 | public class StuMlp { 26 | 27 | public Boolean stuAddCourse(CourseChoose courseChoose) { 28 | BaseDao dao = new BaseDao(); 29 | dao.getConnect(); 30 | 31 | for (Course course : courseChoose.getCourseList()) { 32 | String sql = "SELECT* FROM courseChoose WHERE uid = '" + courseChoose.getUid() + "' AND cid = '" + 33 | course.getCid() + "'"; 34 | ResultSet resultSet = dao.selectSQL(sql); 35 | try { 36 | if (!resultSet.next()) { 37 | String sql2 = "INSERT INTO courseChoose VALUES('" + courseChoose.getUid() + "', '" + 38 | courseChoose.getUname() + "', '" + course.getCid() + "', '" + 39 | course.getCname() + "', '" + course.getClassHours() + "', '" + 40 | course.getCredit() + "', '" + course.getClassTime() + "', '" + 41 | course.getTid() + "', '" + course.getTname() + "')"; 42 | dao.upDataSQL(sql2); 43 | } 44 | } catch (Exception e) { 45 | return false; 46 | } 47 | } 48 | return true; 49 | } 50 | 51 | public CourseChoose stuSeeCourse(User user) { 52 | BaseDao dao = new BaseDao(); 53 | dao.getConnect(); 54 | 55 | ArrayList courses = new ArrayList(); 56 | 57 | String sql = "SELECT* FROM courseChoose WHERE uid = '" + user.getUid() + "'"; 58 | ResultSet resultSet = dao.selectSQL(sql); 59 | 60 | try { 61 | while (resultSet.next()) { 62 | Course course = new Course( 63 | resultSet.getString("cid"), 64 | resultSet.getString("cname"), 65 | Integer.parseInt(resultSet.getString("classhours")), 66 | Double.parseDouble(resultSet.getString("credit")), 67 | resultSet.getString("classtime"), 68 | resultSet.getString("tid"), 69 | resultSet.getString("tname") 70 | ); 71 | courses.add(course); 72 | } 73 | } catch (Exception e) { 74 | e.printStackTrace(); 75 | } 76 | dao.disconnect(); 77 | 78 | return new CourseChoose(user.getUid(), user.getUserName(), courses); 79 | } 80 | 81 | public static void main(String[] args) { 82 | StuMlp sm = new StuMlp(); 83 | ArrayList courses = new ArrayList(); 84 | Course course = new Course("3", "上机", 16, 6, 85 | "15:50-17:30", "老李", "999"); 86 | courses.add(course); 87 | //System.out.println(sm.stuAddCourse(new CourseChoose("09020188", "老张", courses))); 88 | System.out.println(sm.stuSeeCourse(new User("09020237", "1", 1))); 89 | } 90 | 91 | } 92 | -------------------------------------------------------------------------------- /vCampus/src/vCampusServer/ui/ServerMain.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusServer.ui 5 | * ===================================================== 6 | * Title: ServerMain.java 7 | * Created: [2022/8/16 14:07] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/16, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusServer.ui; 17 | 18 | import socket.server.ServerListen; 19 | import javax.swing.JFrame; 20 | import java.net.ServerSocket; 21 | import java.net.Socket; 22 | 23 | public class ServerMain { 24 | private static int sum = 0; 25 | private static int port = 9999; 26 | public static final ServerUI ui = new ServerUI(); 27 | 28 | public static void main(String[] args) { 29 | JFrame frame = new JFrame("服务器终端"); 30 | frame.setContentPane(ui.getMain()); 31 | frame.setVisible(true); 32 | frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 33 | frame.setSize(600, 500); 34 | ServerMain.startServer(); 35 | } 36 | 37 | public static void startServer() { 38 | try (ServerSocket serverSocket = new ServerSocket(port);) { 39 | ui.setTable1("成功启动服务器:端口:" + port); 40 | ui.setLabel2("访问次数:" + 0); 41 | ui.setButton2(serverSocket); 42 | ui.setTextArea1("访问具体信息:\n"); 43 | //处理多个Client端 44 | while (!serverSocket.isClosed()) { 45 | Socket socket = serverSocket.accept(); 46 | sum++; 47 | ui.setLabel2("访问次数:" + sum); 48 | new Thread(new ServerListen(socket)).start(); 49 | } 50 | } catch (Exception e) { 51 | e.printStackTrace(); 52 | } 53 | } 54 | 55 | public static void setPort(int port) { 56 | ServerMain.port = port; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /vCampus/src/vCampusServer/ui/ServerUI.form: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 |
54 | -------------------------------------------------------------------------------- /vCampus/src/vCampusServer/ui/ServerUI.java: -------------------------------------------------------------------------------- 1 | /** 2 | * ================================================== 3 | * Project: vCampus 4 | * Package: vCampusServer.ui 5 | * ===================================================== 6 | * Title: ServerUI.java 7 | * Created: [2022/8/14 18:27] by Shuxin-Wang 8 | * ===================================================== 9 | * Description: description here 10 | * ===================================================== 11 | * Revised History: 12 | * 1. 2022/8/14, created by Shuxin-Wang. 13 | * 2. 14 | */ 15 | 16 | package vCampusServer.ui; 17 | 18 | import javax.swing.*; 19 | import java.awt.event.ActionEvent; 20 | import java.awt.event.ActionListener; 21 | import java.net.ServerSocket; 22 | 23 | public class ServerUI { 24 | private JPanel main; 25 | private JButton button2; 26 | private JLabel label1; 27 | private JLabel label2; 28 | private JScrollPane jSP; 29 | private JTextArea textArea1; 30 | 31 | public ServerUI() { 32 | } 33 | 34 | public void setTable1(String text){ 35 | label1.setText(text); 36 | } 37 | 38 | public void setLabel2(String text){ 39 | label2.setText(text); 40 | } 41 | 42 | public JPanel getMain() { 43 | return main; 44 | } 45 | 46 | public void setButton2(ServerSocket serverSocket){ 47 | button2.addActionListener(new ActionListener() { 48 | @Override 49 | public void actionPerformed(ActionEvent e) { 50 | if(serverSocket !=null){ 51 | try{ 52 | serverSocket.close(); 53 | setTable1("服务器已关闭 !"); 54 | }catch (Exception e1){ 55 | setTable1("关闭服务器失败!"); 56 | } 57 | }else{ 58 | setTable1("服务器未开启!"); 59 | } 60 | } 61 | }); 62 | } 63 | 64 | public void setTextArea1(String text){ 65 | textArea1.append(text); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /vCampus/vCampus.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | --------------------------------------------------------------------------------