├── .gitignore
├── Exp1
├── 0_实验准备 MySQL安装.pdf
├── 190110105_许峻玮_数据库实验一报告.docx
├── 190110105_许峻玮_数据库实验一报告.pdf
├── 1_实验一 MySQL关系数据库管理系统及SQL语言的使用.pdf
├── 2_实验一 MySQL关系数据库管理系统及SQL语言的使用(2021秋PPT).pdf
├── exp1.sql
└── sakila-db
│ ├── sakila-data.sql
│ ├── sakila-schema.sql
│ └── sakila.mwb
├── Exp2
├── 190110105_许峻玮_数据库实验二报告.docx
├── 190110105_许峻玮_数据库实验二报告.pdf
├── 1_实验二 高级SQL语言实验.pdf
├── 2_实验二 高级SQL语言的使用(2021秋PPT).pdf
└── exp2.sql
├── Exp3
├── 190110105_许峻玮_数据库实验四报告.docx
├── 3.实验三 数据库设计实验指导书.pdf
├── 3_实验三 数据库设计(2021秋PPT).pdf
├── 4-实验四 小型系统的设计与实现(2021秋PPT).pdf
└── 4.实验四 小型系统的设计与实现实验指导书.pdf
├── Exp4
├── 190110105_许峻玮_数据库实验四报告.pdf
├── Design
│ ├── db.xmind
│ ├── sql.sql
│ ├── 校园食堂点餐系统.png
│ ├── 食堂管理系统_cdm.cdm
│ ├── 食堂管理系统_ldm.ldm
│ └── 食堂管理系统_pdm.pdm
└── Exp3_4
│ ├── .idea
│ ├── .gitignore
│ ├── Exp3_4.iml
│ ├── dataSources.xml
│ ├── inspectionProfiles
│ │ ├── Project_Default.xml
│ │ └── profiles_settings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── sqldialects.xml
│ ├── Image
│ ├── canteen_1.png
│ ├── canteen_2.png
│ └── icon.ico
│ ├── UI
│ ├── AboutWidget.py
│ ├── AboutWidget.ui
│ ├── AdminHomeWidget.py
│ ├── AdminHomeWidget.ui
│ ├── AdminMainWindow.py
│ ├── AdminMainWindow.ui
│ ├── AdminOrderWidget.py
│ ├── AdminOrderWidget.ui
│ ├── Login.py
│ ├── Login.ui
│ ├── Register.py
│ ├── Register.ui
│ ├── UserAllOrderWidget.py
│ ├── UserAllOrderWidget.ui
│ ├── UserCanteenWidget.py
│ ├── UserCanteenWidget.ui
│ ├── UserHomePageWidget.py
│ ├── UserHomePageWidget.ui
│ ├── UserMainWindow.py
│ ├── UserMainWindow.ui
│ ├── UserOrderDetailWidget.py
│ ├── UserOrderDetailWidget.ui
│ ├── UserOrderWidget.py
│ ├── UserOrderWidget.ui
│ └── __init__.py
│ ├── Util
│ ├── Constants.py
│ ├── DbUtil.py
│ ├── FuncUtil.py
│ └── __init__.py
│ ├── Views
│ ├── AboutWindow.py
│ ├── AdminHomeWindow.py
│ ├── AdminMainWindow.py
│ ├── AdminOrderWindow.py
│ ├── CanteenWindow.py
│ ├── LoginWindow.py
│ ├── OrderDetailWindow.py
│ ├── RegisterWindow.py
│ ├── UserAllOrderWindow.py
│ ├── UserHomeWindow.py
│ ├── UserMainWindow.py
│ ├── UserOrderWindow.py
│ └── __init__.py
│ ├── main.py
│ ├── requirements.txt
│ └── test.py
└── Exp5
├── .idea
├── .gitignore
├── Exp5.iml
├── encodings.xml
├── inspectionProfiles
│ └── Project_Default.xml
├── misc.xml
└── modules.xml
├── CMakeLists.txt
├── cmake-build-debug
├── CMakeCache.txt
├── CMakeFiles
│ ├── 3.20.2
│ │ ├── CMakeCCompiler.cmake
│ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ ├── CMakeSystem.cmake
│ │ └── CompilerIdC
│ │ │ └── CMakeCCompilerId.c
│ ├── CMakeDirectoryInformation.cmake
│ ├── CMakeOutput.log
│ ├── Makefile.cmake
│ ├── Makefile2
│ ├── TargetDirectories.txt
│ ├── clion-environment.txt
│ ├── clion-log.txt
│ ├── cmake.check_cache
│ ├── exec.dir
│ │ ├── C.includecache
│ │ ├── DependInfo.cmake
│ │ ├── build.make
│ │ ├── cmake_clean.cmake
│ │ ├── depend.internal
│ │ ├── depend.make
│ │ ├── flags.make
│ │ ├── link.txt
│ │ ├── progress.make
│ │ └── solution.c.o
│ ├── extmem.dir
│ │ ├── C.includecache
│ │ ├── DependInfo.cmake
│ │ ├── build.make
│ │ ├── cmake_clean.cmake
│ │ ├── cmake_clean_target.cmake
│ │ ├── depend.internal
│ │ ├── depend.make
│ │ ├── extmem.c.o
│ │ ├── flags.make
│ │ ├── link.txt
│ │ └── progress.make
│ └── progress.marks
├── Exp5.cbp
├── Makefile
├── Testing
│ └── Temporary
│ │ └── LastTest.log
├── cmake_install.cmake
├── exec
└── libextmem.a
├── data
├── 1.blk
├── 10.blk
├── 100.blk
├── 101.blk
├── 11.blk
├── 12.blk
├── 13.blk
├── 14.blk
├── 15.blk
├── 16.blk
├── 17.blk
├── 18.blk
├── 19.blk
├── 2.blk
├── 20.blk
├── 200.blk
├── 201.blk
├── 202.blk
├── 203.blk
├── 204.blk
├── 205.blk
├── 206.blk
├── 207.blk
├── 208.blk
├── 209.blk
├── 21.blk
├── 210.blk
├── 211.blk
├── 212.blk
├── 213.blk
├── 214.blk
├── 215.blk
├── 216.blk
├── 217.blk
├── 218.blk
├── 219.blk
├── 22.blk
├── 220.blk
├── 221.blk
├── 222.blk
├── 223.blk
├── 224.blk
├── 225.blk
├── 226.blk
├── 227.blk
├── 228.blk
├── 229.blk
├── 23.blk
├── 230.blk
├── 231.blk
├── 232.blk
├── 233.blk
├── 234.blk
├── 235.blk
├── 236.blk
├── 237.blk
├── 238.blk
├── 239.blk
├── 24.blk
├── 240.blk
├── 241.blk
├── 242.blk
├── 243.blk
├── 244.blk
├── 245.blk
├── 246.blk
├── 247.blk
├── 248.blk
├── 249.blk
├── 25.blk
├── 250.blk
├── 251.blk
├── 252.blk
├── 253.blk
├── 254.blk
├── 255.blk
├── 256.blk
├── 257.blk
├── 258.blk
├── 259.blk
├── 26.blk
├── 260.blk
├── 261.blk
├── 262.blk
├── 263.blk
├── 264.blk
├── 265.blk
├── 266.blk
├── 267.blk
├── 268.blk
├── 269.blk
├── 27.blk
├── 270.blk
├── 271.blk
├── 272.blk
├── 273.blk
├── 274.blk
├── 275.blk
├── 276.blk
├── 277.blk
├── 278.blk
├── 279.blk
├── 28.blk
├── 280.blk
├── 281.blk
├── 282.blk
├── 283.blk
├── 284.blk
├── 285.blk
├── 286.blk
├── 287.blk
├── 288.blk
├── 289.blk
├── 29.blk
├── 290.blk
├── 291.blk
├── 292.blk
├── 293.blk
├── 294.blk
├── 295.blk
├── 296.blk
├── 297.blk
├── 298.blk
├── 299.blk
├── 3.blk
├── 30.blk
├── 301.blk
├── 302.blk
├── 303.blk
├── 304.blk
├── 305.blk
├── 306.blk
├── 307.blk
├── 308.blk
├── 309.blk
├── 31.blk
├── 310.blk
├── 311.blk
├── 312.blk
├── 313.blk
├── 314.blk
├── 315.blk
├── 316.blk
├── 317.blk
├── 318.blk
├── 319.blk
├── 32.blk
├── 320.blk
├── 321.blk
├── 322.blk
├── 323.blk
├── 324.blk
├── 325.blk
├── 326.blk
├── 327.blk
├── 328.blk
├── 329.blk
├── 33.blk
├── 330.blk
├── 331.blk
├── 332.blk
├── 333.blk
├── 334.blk
├── 335.blk
├── 336.blk
├── 337.blk
├── 338.blk
├── 339.blk
├── 34.blk
├── 340.blk
├── 341.blk
├── 342.blk
├── 343.blk
├── 344.blk
├── 345.blk
├── 346.blk
├── 347.blk
├── 348.blk
├── 35.blk
├── 350.blk
├── 351.blk
├── 352.blk
├── 353.blk
├── 354.blk
├── 36.blk
├── 37.blk
├── 38.blk
├── 39.blk
├── 4.blk
├── 40.blk
├── 400.blk
├── 401.blk
├── 41.blk
├── 42.blk
├── 43.blk
├── 44.blk
├── 45.blk
├── 46.blk
├── 47.blk
├── 48.blk
├── 5.blk
├── 500.blk
├── 501.blk
├── 502.blk
├── 503.blk
├── 504.blk
├── 505.blk
├── 506.blk
├── 507.blk
├── 508.blk
├── 509.blk
├── 510.blk
├── 511.blk
├── 512.blk
├── 513.blk
├── 514.blk
├── 515.blk
├── 516.blk
├── 517.blk
├── 518.blk
├── 519.blk
├── 520.blk
├── 521.blk
├── 522.blk
├── 523.blk
├── 524.blk
├── 525.blk
├── 526.blk
├── 527.blk
├── 528.blk
├── 529.blk
├── 530.blk
├── 531.blk
├── 532.blk
├── 533.blk
├── 534.blk
├── 535.blk
├── 536.blk
├── 537.blk
├── 538.blk
├── 539.blk
├── 540.blk
├── 541.blk
├── 542.blk
├── 543.blk
├── 544.blk
├── 545.blk
├── 546.blk
├── 6.blk
├── 600.blk
├── 601.blk
├── 602.blk
├── 603.blk
├── 604.blk
├── 605.blk
├── 606.blk
├── 607.blk
├── 608.blk
├── 609.blk
├── 610.blk
├── 611.blk
├── 612.blk
├── 613.blk
├── 614.blk
├── 615.blk
├── 616.blk
├── 617.blk
├── 618.blk
├── 619.blk
├── 620.blk
├── 621.blk
├── 622.blk
├── 623.blk
├── 624.blk
├── 625.blk
├── 626.blk
├── 627.blk
├── 628.blk
├── 629.blk
├── 630.blk
├── 7.blk
├── 8.blk
├── 8888.blk
└── 9.blk
├── data_bak
├── 1.blk
├── 10.blk
├── 11.blk
├── 12.blk
├── 13.blk
├── 14.blk
├── 15.blk
├── 16.blk
├── 17.blk
├── 18.blk
├── 19.blk
├── 2.blk
├── 20.blk
├── 21.blk
├── 22.blk
├── 23.blk
├── 24.blk
├── 25.blk
├── 26.blk
├── 27.blk
├── 28.blk
├── 29.blk
├── 3.blk
├── 30.blk
├── 31.blk
├── 32.blk
├── 33.blk
├── 34.blk
├── 35.blk
├── 36.blk
├── 37.blk
├── 38.blk
├── 39.blk
├── 4.blk
├── 40.blk
├── 41.blk
├── 42.blk
├── 43.blk
├── 44.blk
├── 45.blk
├── 46.blk
├── 47.blk
├── 48.blk
├── 5.blk
├── 6.blk
├── 7.blk
├── 8.blk
├── 8888.blk
└── 9.blk
├── db_exp5
├── 190110105_许峻玮_数据库实验四报告.pdf
├── 实验五 查询处理算法的模拟实现指导书.pdf
├── 实验五 查询处理算法的模拟实现(2021秋)PPT.pdf
└── 数据库-实验五报告模板.docx
├── extmem.c
├── extmem.h
├── solution.c
└── utils.h
/.gitignore:
--------------------------------------------------------------------------------
1 | # Folder view configuration files
2 | .DS_Store
3 | Desktop.ini
4 |
5 | # Thumbnail cache files
6 | ._*
7 | Thumbs.db
8 |
9 | # Files that might appear on external disks
10 | .Spotlight-V100
11 | .Trashes
12 |
13 | # Compiled Python files
14 | *.pyc
15 |
16 | # Compiled C++ files
17 | *.out
18 |
19 | # Application specific files
20 | venv
21 | node_modules
22 | .sass-cache
23 | .DS_Store
24 |
25 | ~$*
26 |
--------------------------------------------------------------------------------
/Exp1/0_实验准备 MySQL安装.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp1/0_实验准备 MySQL安装.pdf
--------------------------------------------------------------------------------
/Exp1/190110105_许峻玮_数据库实验一报告.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp1/190110105_许峻玮_数据库实验一报告.docx
--------------------------------------------------------------------------------
/Exp1/190110105_许峻玮_数据库实验一报告.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp1/190110105_许峻玮_数据库实验一报告.pdf
--------------------------------------------------------------------------------
/Exp1/1_实验一 MySQL关系数据库管理系统及SQL语言的使用.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp1/1_实验一 MySQL关系数据库管理系统及SQL语言的使用.pdf
--------------------------------------------------------------------------------
/Exp1/2_实验一 MySQL关系数据库管理系统及SQL语言的使用(2021秋PPT).pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp1/2_实验一 MySQL关系数据库管理系统及SQL语言的使用(2021秋PPT).pdf
--------------------------------------------------------------------------------
/Exp1/exp1.sql:
--------------------------------------------------------------------------------
1 | # Q1
2 | SELECT store_id, address, district, city, country
3 | FROM store, address, country, city
4 | WHERE store.address_id = address.address_id
5 | AND address.city_id = city.city_id
6 | AND city.country_id = country.country_id;
7 |
8 | # Q2
9 | SELECT CONCAT(first_name, ' ', last_name) as name
10 | FROM actor, film, film_actor
11 | WHERE film.title = 'WEST LION'
12 | AND actor.actor_id = film_actor.actor_id
13 | AND film.film_id = film_actor.film_id;
14 |
15 | # Q3
16 | SELECT first_name, last_name, SUM(amount) as summation
17 | FROM customer, payment
18 | WHERE payment.customer_id = customer.customer_id
19 | GROUP BY first_name, last_name
20 | ORDER BY summation DESC
21 | LIMIT 3;
22 |
23 | # Q4
24 | SELECT film.film_id, title, SUM(amount) as summation
25 | FROM rental, payment, inventory, film
26 | WHERE film.film_id = inventory.film_id
27 | AND payment.rental_id = rental.rental_id
28 | AND rental.inventory_id = inventory.inventory_id
29 | GROUP BY title, film.film_id
30 | ORDER BY summation DESC
31 | LIMIT 1;
32 |
33 | # Q5
34 | SELECT actor.actor_id, CONCAT(first_name, ' ', last_name) as name, COUNT(film_actor.film_id) as summation
35 | FROM actor, film_actor
36 | WHERE actor.actor_id = film_actor.actor_id
37 | GROUP BY actor.actor_id, name
38 | HAVING summation > 40;
39 |
40 | # Q6
41 | SELECT DISTINCT CONCAT(first_name, ' ', last_name) as name
42 | FROM rental, customer
43 | WHERE rental.customer_id = customer.customer_id
44 | AND rental.customer_id NOT IN (
45 | SELECT rental.customer_id
46 | FROM rental, inventory, film
47 | WHERE film.title = 'WEST LION'
48 | AND film.film_id = inventory.film_id
49 | AND inventory.inventory_id = rental.inventory_id
50 | );
51 |
52 | # Q7
53 | SELECT CONCAT(first_name, ' ', last_name) as name
54 | FROM actor
55 | WHERE actor_id = (
56 | SELECT FA1.actor_id
57 | FROM film_actor FA1, film_actor FA2
58 | WHERE FA1.actor_id = FA2.actor_id
59 | AND FA1.film_id = (
60 | SELECT film_id
61 | FROM film
62 | WHERE title = 'FIRE WOLVES'
63 | )
64 | AND FA2.film_id = (
65 | SELECT film_id
66 | FROM film
67 | WHERE title = 'JAWBREAKER BROOKLYN'
68 | )
69 | )
70 | ;
71 |
72 | # Q8
73 | SELECT category.category_id, category.name, COUNT(category.category_id) as amount
74 | FROM film_category, category
75 | WHERE category.category_id = film_category.category_id
76 | GROUP BY category.category_id, category.name;
77 |
78 | # Q9
79 | SELECT DISTINCT title
80 | FROM film, inventory I1, inventory I2
81 | WHERE I1.film_id = I2.film_id
82 | AND I1.store_id <> I2.store_id
83 | AND I1.film_id = film.film_id;
84 |
85 | # Q10
86 | SELECT first_name, last_name, TIMESTAMPDIFF(second , rental_date, return_date) as rental_length
87 | FROM customer, rental
88 | WHERE customer.customer_id = rental.customer_id
89 | ORDER BY rental_length DESC
90 | LIMIT 3;
91 |
92 | #Q11
93 | INSERT INTO sakila.customer (store_id, first_name, last_name, email, address_id, create_date)
94 | VALUES (1, 'PINSKY', 'ROBIN', 'xu568059888@gmail.com', 6, NOW());
95 |
96 | #Q12
97 | UPDATE customer
98 | SET active = 0
99 | WHERE customer_id = 609;
100 |
101 | #Q13
102 | DELETE FROM customer
103 | WHERE customer_id = 608;
104 |
105 |
--------------------------------------------------------------------------------
/Exp1/sakila-db/sakila.mwb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp1/sakila-db/sakila.mwb
--------------------------------------------------------------------------------
/Exp2/190110105_许峻玮_数据库实验二报告.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp2/190110105_许峻玮_数据库实验二报告.docx
--------------------------------------------------------------------------------
/Exp2/190110105_许峻玮_数据库实验二报告.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp2/190110105_许峻玮_数据库实验二报告.pdf
--------------------------------------------------------------------------------
/Exp2/1_实验二 高级SQL语言实验.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp2/1_实验二 高级SQL语言实验.pdf
--------------------------------------------------------------------------------
/Exp2/2_实验二 高级SQL语言的使用(2021秋PPT).pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp2/2_实验二 高级SQL语言的使用(2021秋PPT).pdf
--------------------------------------------------------------------------------
/Exp2/exp2.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp2/exp2.sql
--------------------------------------------------------------------------------
/Exp3/190110105_许峻玮_数据库实验四报告.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp3/190110105_许峻玮_数据库实验四报告.docx
--------------------------------------------------------------------------------
/Exp3/3.实验三 数据库设计实验指导书.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp3/3.实验三 数据库设计实验指导书.pdf
--------------------------------------------------------------------------------
/Exp3/3_实验三 数据库设计(2021秋PPT).pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp3/3_实验三 数据库设计(2021秋PPT).pdf
--------------------------------------------------------------------------------
/Exp3/4-实验四 小型系统的设计与实现(2021秋PPT).pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp3/4-实验四 小型系统的设计与实现(2021秋PPT).pdf
--------------------------------------------------------------------------------
/Exp3/4.实验四 小型系统的设计与实现实验指导书.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp3/4.实验四 小型系统的设计与实现实验指导书.pdf
--------------------------------------------------------------------------------
/Exp4/190110105_许峻玮_数据库实验四报告.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp4/190110105_许峻玮_数据库实验四报告.pdf
--------------------------------------------------------------------------------
/Exp4/Design/db.xmind:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp4/Design/db.xmind
--------------------------------------------------------------------------------
/Exp4/Design/校园食堂点餐系统.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp4/Design/校园食堂点餐系统.png
--------------------------------------------------------------------------------
/Exp4/Exp3_4/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Datasource local storage ignored files
5 | /dataSources/
6 | /dataSources.local.xml
7 | # Editor-based HTTP Client requests
8 | /httpRequests/
9 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/.idea/Exp3_4.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/.idea/dataSources.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | mysql.8
6 | true
7 | com.mysql.cj.jdbc.Driver
8 | jdbc:mysql://121.4.40.110:3301/db_exp
9 | $ProjectFileDir$
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/.idea/sqldialects.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Image/canteen_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp4/Exp3_4/Image/canteen_1.png
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Image/canteen_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp4/Exp3_4/Image/canteen_2.png
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Image/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp4/Exp3_4/Image/icon.ico
--------------------------------------------------------------------------------
/Exp4/Exp3_4/UI/AboutWidget.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Form implementation generated from reading ui file 'AboutWidget.ui'
4 | #
5 | # Created by: PyQt5 UI code generator 5.15.4
6 | #
7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is
8 | # run again. Do not edit this file unless you know what you are doing.
9 |
10 |
11 | from PyQt5 import QtCore, QtGui, QtWidgets
12 |
13 |
14 | class Ui_AboutWidget(object):
15 | def setupUi(self, AboutWidget):
16 | AboutWidget.setObjectName("AboutWidget")
17 | AboutWidget.resize(566, 494)
18 | self.gridLayout = QtWidgets.QGridLayout(AboutWidget)
19 | self.gridLayout.setContentsMargins(0, 0, 0, 0)
20 | self.gridLayout.setObjectName("gridLayout")
21 | self.verticalLayout = QtWidgets.QVBoxLayout()
22 | self.verticalLayout.setObjectName("verticalLayout")
23 | self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
24 | self.horizontalLayout_5.setObjectName("horizontalLayout_5")
25 | self.textBrowser = QtWidgets.QTextBrowser(AboutWidget)
26 | self.textBrowser.setObjectName("textBrowser")
27 | self.horizontalLayout_5.addWidget(self.textBrowser)
28 | self.verticalLayout.addLayout(self.horizontalLayout_5)
29 | self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
30 | self.horizontalLayout_3.setObjectName("horizontalLayout_3")
31 | spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
32 | self.horizontalLayout_3.addItem(spacerItem)
33 | self.btn_flower = QtWidgets.QPushButton(AboutWidget)
34 | self.btn_flower.setObjectName("btn_flower")
35 | self.horizontalLayout_3.addWidget(self.btn_flower)
36 | self.verticalLayout.addLayout(self.horizontalLayout_3)
37 | self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
38 |
39 | self.retranslateUi(AboutWidget)
40 | QtCore.QMetaObject.connectSlotsByName(AboutWidget)
41 |
42 | def retranslateUi(self, AboutWidget):
43 | _translate = QtCore.QCoreApplication.translate
44 | AboutWidget.setWindowTitle(_translate("AboutWidget", "Form"))
45 | self.textBrowser.setHtml(_translate("AboutWidget", "\n"
46 | "
\n"
49 | "本次实验总算是告一段落!
\n"
50 | "首先要向所有老师和助教说一句抱歉!🙇
\n"
51 | "高估能力的后果是这个学期选了太多的课,现在来看也是遭到了报应😭这次实验在正式提交后好久才做完,在感叹自己过于繁重的学业压力的同时,也深感愧疚。
\n"
52 | "但是但是!我也有很用心地完成这次实验!没有一点点的敷衍!😝
\n"
53 | "因为只是学过前端的框架,所以没有使用 Java;因为不是很熟悉 QSS 的用法,所以没有做最后的界面美化。
\n"
54 | "说起界面的美观,我发现 QT 在 macOS 和 Windows 下的显示效果真的天差地别😵大概就是卖家秀和买家秀的区别吧呜呜我也不知道为什么会这样!不知道老师/助教是用哪个系统看的呢,如果是 Windows 系统的话可以看一下我的演示视频和实验报告的截图,它其实也不是那么丑的!!!
\n"
55 | "面对有些简陋的 UI,我实在过意不去,于是尝试在里面加了些有趣的内容~希望可以缓解批改的心情,也是想让自己在众多作品中显得有一些不一样吧哈哈哈哈(叉腰)
\n"
56 | "与其说这次实验让我更加熟练地使用 SQL 语句,倒不如说是让我对产品和编码规则有了一定的启发吧。虽然时间仓促,虽然这个小小的软件还有太多的不完美,但是在权衡各门课程之后,我想,我是已经尽力了,至于分数,交给你们就好啦!😬
\n"
57 | "Hope everything goes well !
"))
58 | self.btn_flower.setText(_translate("AboutWidget", "送一朵小红花"))
59 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/UI/AboutWidget.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | AboutWidget
4 |
5 |
6 |
7 | 0
8 | 0
9 | 566
10 | 494
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 | 0
19 |
20 |
21 | 0
22 |
23 |
24 | 0
25 |
26 |
27 | 0
28 |
29 | -
30 |
31 |
-
32 |
33 |
-
34 |
35 |
36 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
37 | <html><head><meta name="qrichtext" content="1" /><style type="text/css">
38 | p, li { white-space: pre-wrap; }
39 | </style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;">
40 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt;">本次实验总算是告一段落!</span></p>
41 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt;">首先要向所有老师和助教说一句抱歉!🙇</span></p>
42 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt;">高估能力的后果是这个学期选了太多的课,现在来看也是遭到了报应😭这次实验在正式提交后好久才做完,在感叹自己过于繁重的学业压力的同时,也深感愧疚。</span></p>
43 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt;">但是但是!我也有很用心地完成这次实验!没有一点点的敷衍!😝</span></p>
44 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt;">因为只是学过前端的框架,所以没有使用 Java;因为不是很熟悉 QSS 的用法,所以没有做最后的界面美化。</span></p>
45 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt;">说起界面的美观,我发现 QT 在 macOS 和 Windows 下的显示效果真的天差地别😵大概就是卖家秀和买家秀的区别吧呜呜我也不知道为什么会这样!不知道老师/助教是用哪个系统看的呢,如果是 Windows 系统的话可以看一下我的演示视频和实验报告的截图,它其实也不是那么丑的!!!</span></p>
46 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt;">面对有些简陋的 UI,我实在过意不去,于是尝试在里面加了些有趣的内容~希望可以缓解批改的心情,也是想让自己在众多作品中显得有一些不一样吧哈哈哈哈(叉腰)</span></p>
47 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt;">与其说这次实验让我更加熟练地使用 SQL 语句,倒不如说是让我对产品和编码规则有了一定的启发吧。虽然时间仓促,虽然这个小小的软件还有太多的不完美,但是在权衡各门课程之后,我想,我是已经尽力了,至于分数,交给你们就好啦!😬</span></p>
48 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt;">Hope everything goes well !</span></p></body></html>
49 |
50 |
51 |
52 |
53 |
54 | -
55 |
56 |
-
57 |
58 |
59 | Qt::Horizontal
60 |
61 |
62 |
63 | 40
64 | 20
65 |
66 |
67 |
68 |
69 | -
70 |
71 |
72 | 送一朵小红花
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/UI/AdminMainWindow.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Form implementation generated from reading ui file 'AdminMainWindow.ui'
4 | #
5 | # Created by: PyQt5 UI code generator 5.15.4
6 | #
7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is
8 | # run again. Do not edit this file unless you know what you are doing.
9 |
10 |
11 | from PyQt5 import QtCore, QtGui, QtWidgets
12 |
13 |
14 | class Ui_MainWindow(object):
15 | def setupUi(self, MainWindow):
16 | MainWindow.setObjectName("MainWindow")
17 | MainWindow.resize(800, 600)
18 | self.centralwidget = QtWidgets.QWidget(MainWindow)
19 | self.centralwidget.setObjectName("centralwidget")
20 | self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
21 | self.gridLayout.setContentsMargins(5, 5, 5, 5)
22 | self.gridLayout.setSpacing(3)
23 | self.gridLayout.setObjectName("gridLayout")
24 | self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
25 | self.horizontalLayout_2.setObjectName("horizontalLayout_2")
26 | self.treeWidget = QtWidgets.QTreeWidget(self.centralwidget)
27 | self.treeWidget.setMaximumSize(QtCore.QSize(200, 16777215))
28 | self.treeWidget.setObjectName("treeWidget")
29 | item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget)
30 | item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget)
31 | item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget)
32 | self.horizontalLayout_2.addWidget(self.treeWidget)
33 | self.verticalLayout_2 = QtWidgets.QVBoxLayout()
34 | self.verticalLayout_2.setObjectName("verticalLayout_2")
35 | self.verticalLayout = QtWidgets.QVBoxLayout()
36 | self.verticalLayout.setObjectName("verticalLayout")
37 | self.label = QtWidgets.QLabel(self.centralwidget)
38 | self.label.setStyleSheet("font: 14pt \"宋体\";")
39 | self.label.setAlignment(QtCore.Qt.AlignCenter)
40 | self.label.setObjectName("label")
41 | self.verticalLayout.addWidget(self.label)
42 | self.horizontalLayout = QtWidgets.QHBoxLayout()
43 | self.horizontalLayout.setObjectName("horizontalLayout")
44 | self.label_2 = QtWidgets.QLabel(self.centralwidget)
45 | self.label_2.setStyleSheet("font: 12pt \"宋体\";")
46 | self.label_2.setObjectName("label_2")
47 | self.horizontalLayout.addWidget(self.label_2)
48 | self.current_username_label = QtWidgets.QLabel(self.centralwidget)
49 | self.current_username_label.setStyleSheet("font: 12pt \"宋体\";")
50 | self.current_username_label.setObjectName("current_username_label")
51 | self.horizontalLayout.addWidget(self.current_username_label)
52 | self.label_4 = QtWidgets.QLabel(self.centralwidget)
53 | self.label_4.setStyleSheet("font: 12pt \"宋体\";")
54 | self.label_4.setObjectName("label_4")
55 | self.horizontalLayout.addWidget(self.label_4)
56 | self.current_role_label = QtWidgets.QLabel(self.centralwidget)
57 | self.current_role_label.setStyleSheet("font: 12pt \"宋体\";")
58 | self.current_role_label.setObjectName("current_role_label")
59 | self.horizontalLayout.addWidget(self.current_role_label)
60 | spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
61 | self.horizontalLayout.addItem(spacerItem)
62 | self.pushButton = QtWidgets.QPushButton(self.centralwidget)
63 | self.pushButton.setStyleSheet("font: 12pt \"宋体\";")
64 | self.pushButton.setObjectName("pushButton")
65 | self.horizontalLayout.addWidget(self.pushButton)
66 | self.verticalLayout.addLayout(self.horizontalLayout)
67 | self.verticalLayout_2.addLayout(self.verticalLayout)
68 | self.line_2 = QtWidgets.QFrame(self.centralwidget)
69 | self.line_2.setMaximumSize(QtCore.QSize(16777215, 2))
70 | self.line_2.setStyleSheet("background-color: rgb(222, 222, 222);")
71 | self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
72 | self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
73 | self.line_2.setObjectName("line_2")
74 | self.verticalLayout_2.addWidget(self.line_2)
75 | self.stackedWidget = QtWidgets.QStackedWidget(self.centralwidget)
76 | self.stackedWidget.setObjectName("stackedWidget")
77 | self.page = QtWidgets.QWidget()
78 | self.page.setObjectName("page")
79 | self.stackedWidget.addWidget(self.page)
80 | self.page_2 = QtWidgets.QWidget()
81 | self.page_2.setObjectName("page_2")
82 | self.stackedWidget.addWidget(self.page_2)
83 | self.verticalLayout_2.addWidget(self.stackedWidget)
84 | self.horizontalLayout_2.addLayout(self.verticalLayout_2)
85 | self.horizontalLayout_2.setStretch(1, 5)
86 | self.gridLayout.addLayout(self.horizontalLayout_2, 0, 0, 1, 1)
87 | MainWindow.setCentralWidget(self.centralwidget)
88 |
89 | self.retranslateUi(MainWindow)
90 | QtCore.QMetaObject.connectSlotsByName(MainWindow)
91 |
92 | def retranslateUi(self, MainWindow):
93 | _translate = QtCore.QCoreApplication.translate
94 | MainWindow.setWindowTitle(_translate("MainWindow", "HITsz Canteen Admin"))
95 | self.treeWidget.headerItem().setText(0, _translate("MainWindow", "Menu"))
96 | __sortingEnabled = self.treeWidget.isSortingEnabled()
97 | self.treeWidget.setSortingEnabled(False)
98 | self.treeWidget.topLevelItem(0).setText(0, _translate("MainWindow", "🧐 主页"))
99 | self.treeWidget.topLevelItem(1).setText(0, _translate("MainWindow", "🔍 订单管理"))
100 | self.treeWidget.topLevelItem(2).setText(0, _translate("MainWindow", "💫 关于"))
101 | self.treeWidget.setSortingEnabled(__sortingEnabled)
102 | self.label.setText(_translate("MainWindow", "😎 Make HITsz Canteen Great Again!😎"))
103 | self.label_2.setText(_translate("MainWindow", "用户:"))
104 | self.current_username_label.setText(_translate("MainWindow", " root"))
105 | self.label_4.setText(_translate("MainWindow", "角色:"))
106 | self.current_role_label.setText(_translate("MainWindow", "管理员"))
107 | self.pushButton.setText(_translate("MainWindow", "返回"))
108 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/UI/AdminOrderWidget.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Form implementation generated from reading ui file 'AdminOrderWidget.ui'
4 | #
5 | # Created by: PyQt5 UI code generator 5.15.4
6 | #
7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is
8 | # run again. Do not edit this file unless you know what you are doing.
9 |
10 |
11 | from PyQt5 import QtCore, QtGui, QtWidgets
12 |
13 |
14 | class Ui_Form(object):
15 | def setupUi(self, Form):
16 | Form.setObjectName("Form")
17 | Form.resize(602, 507)
18 | self.gridLayout = QtWidgets.QGridLayout(Form)
19 | self.gridLayout.setContentsMargins(0, 0, 0, 0)
20 | self.gridLayout.setObjectName("gridLayout")
21 | self.verticalLayout = QtWidgets.QVBoxLayout()
22 | self.verticalLayout.setObjectName("verticalLayout")
23 | self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
24 | self.horizontalLayout_3.setObjectName("horizontalLayout_3")
25 | self.verticalLayout.addLayout(self.horizontalLayout_3)
26 | self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
27 | self.horizontalLayout_6.setObjectName("horizontalLayout_6")
28 | spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
29 | self.horizontalLayout_6.addItem(spacerItem)
30 | self.btn_refresh = QtWidgets.QPushButton(Form)
31 | self.btn_refresh.setStyleSheet("font: 12pt \"宋体\";")
32 | self.btn_refresh.setObjectName("btn_refresh")
33 | self.horizontalLayout_6.addWidget(self.btn_refresh)
34 | spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
35 | self.horizontalLayout_6.addItem(spacerItem1)
36 | self.verticalLayout.addLayout(self.horizontalLayout_6)
37 | self.tableWidget_order = QtWidgets.QTableWidget(Form)
38 | self.tableWidget_order.setStyleSheet("font: 12pt \"宋体\";")
39 | self.tableWidget_order.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
40 | self.tableWidget_order.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
41 | self.tableWidget_order.setAutoScroll(False)
42 | self.tableWidget_order.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
43 | self.tableWidget_order.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectColumns)
44 | self.tableWidget_order.setObjectName("tableWidget_order")
45 | self.tableWidget_order.setColumnCount(5)
46 | self.tableWidget_order.setRowCount(0)
47 | item = QtWidgets.QTableWidgetItem()
48 | self.tableWidget_order.setHorizontalHeaderItem(0, item)
49 | item = QtWidgets.QTableWidgetItem()
50 | self.tableWidget_order.setHorizontalHeaderItem(1, item)
51 | item = QtWidgets.QTableWidgetItem()
52 | self.tableWidget_order.setHorizontalHeaderItem(2, item)
53 | item = QtWidgets.QTableWidgetItem()
54 | self.tableWidget_order.setHorizontalHeaderItem(3, item)
55 | item = QtWidgets.QTableWidgetItem()
56 | self.tableWidget_order.setHorizontalHeaderItem(4, item)
57 | self.tableWidget_order.horizontalHeader().setMinimumSectionSize(100)
58 | self.tableWidget_order.verticalHeader().setCascadingSectionResizes(False)
59 | self.tableWidget_order.verticalHeader().setDefaultSectionSize(30)
60 | self.tableWidget_order.verticalHeader().setMinimumSectionSize(23)
61 | self.verticalLayout.addWidget(self.tableWidget_order)
62 | self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
63 |
64 | self.retranslateUi(Form)
65 | QtCore.QMetaObject.connectSlotsByName(Form)
66 |
67 | def retranslateUi(self, Form):
68 | _translate = QtCore.QCoreApplication.translate
69 | Form.setWindowTitle(_translate("Form", "Form"))
70 | self.btn_refresh.setText(_translate("Form", "这是一个硕大的刷新按钮,想刷新订单状态请用力点我靴靴"))
71 | self.tableWidget_order.setSortingEnabled(True)
72 | item = self.tableWidget_order.horizontalHeaderItem(0)
73 | item.setText(_translate("Form", "食堂名"))
74 | item = self.tableWidget_order.horizontalHeaderItem(1)
75 | item.setText(_translate("Form", "商铺名"))
76 | item = self.tableWidget_order.horizontalHeaderItem(2)
77 | item.setText(_translate("Form", "菜品名"))
78 | item = self.tableWidget_order.horizontalHeaderItem(3)
79 | item.setText(_translate("Form", "总价"))
80 | item = self.tableWidget_order.horizontalHeaderItem(4)
81 | item.setText(_translate("Form", "评价"))
82 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/UI/AdminOrderWidget.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | Form
4 |
5 |
6 |
7 | 0
8 | 0
9 | 602
10 | 507
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 | 0
19 |
20 |
21 | 0
22 |
23 |
24 | 0
25 |
26 |
27 | 0
28 |
29 | -
30 |
31 |
-
32 |
33 |
34 | -
35 |
36 |
-
37 |
38 |
39 | Qt::Horizontal
40 |
41 |
42 |
43 | 40
44 | 20
45 |
46 |
47 |
48 |
49 | -
50 |
51 |
52 | font: 12pt "宋体";
53 |
54 |
55 | 这是一个硕大的刷新按钮,想刷新订单状态请用力点我靴靴
56 |
57 |
58 |
59 | -
60 |
61 |
62 | Qt::Horizontal
63 |
64 |
65 |
66 | 40
67 | 20
68 |
69 |
70 |
71 |
72 |
73 |
74 | -
75 |
76 |
77 | font: 12pt "宋体";
78 |
79 |
80 | Qt::ScrollBarAsNeeded
81 |
82 |
83 | QAbstractScrollArea::AdjustToContents
84 |
85 |
86 | false
87 |
88 |
89 | QAbstractItemView::NoEditTriggers
90 |
91 |
92 | QAbstractItemView::SelectColumns
93 |
94 |
95 | true
96 |
97 |
98 | 100
99 |
100 |
101 | false
102 |
103 |
104 | 23
105 |
106 |
107 | 30
108 |
109 |
110 |
111 | 食堂名
112 |
113 |
114 |
115 |
116 | 商铺名
117 |
118 |
119 |
120 |
121 | 菜品名
122 |
123 |
124 |
125 |
126 | 总价
127 |
128 |
129 |
130 |
131 | 评价
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/UI/UserAllOrderWidget.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Form implementation generated from reading ui file 'UserAllOrderWidget.ui'
4 | #
5 | # Created by: PyQt5 UI code generator 5.15.4
6 | #
7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is
8 | # run again. Do not edit this file unless you know what you are doing.
9 |
10 |
11 | from PyQt5 import QtCore, QtGui, QtWidgets
12 |
13 |
14 | class Ui_Form(object):
15 | def setupUi(self, Form):
16 | Form.setObjectName("Form")
17 | Form.resize(571, 489)
18 | self.gridLayout = QtWidgets.QGridLayout(Form)
19 | self.gridLayout.setContentsMargins(0, 0, 0, 0)
20 | self.gridLayout.setObjectName("gridLayout")
21 | self.verticalLayout = QtWidgets.QVBoxLayout()
22 | self.verticalLayout.setObjectName("verticalLayout")
23 | self.horizontalLayout = QtWidgets.QHBoxLayout()
24 | self.horizontalLayout.setObjectName("horizontalLayout")
25 | self.verticalLayout.addLayout(self.horizontalLayout)
26 | self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
27 | self.horizontalLayout_6.setObjectName("horizontalLayout_6")
28 | spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
29 | self.horizontalLayout_6.addItem(spacerItem)
30 | self.btn_refresh = QtWidgets.QPushButton(Form)
31 | self.btn_refresh.setStyleSheet("font: 12pt \"宋体\";")
32 | self.btn_refresh.setObjectName("btn_refresh")
33 | self.horizontalLayout_6.addWidget(self.btn_refresh)
34 | spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
35 | self.horizontalLayout_6.addItem(spacerItem1)
36 | self.verticalLayout.addLayout(self.horizontalLayout_6)
37 | self.tableWidget_order = QtWidgets.QTableWidget(Form)
38 | self.tableWidget_order.setStyleSheet("font: 12pt \"宋体\";")
39 | self.tableWidget_order.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
40 | self.tableWidget_order.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
41 | self.tableWidget_order.setAutoScroll(False)
42 | self.tableWidget_order.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
43 | self.tableWidget_order.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
44 | self.tableWidget_order.setObjectName("tableWidget_order")
45 | self.tableWidget_order.setColumnCount(6)
46 | self.tableWidget_order.setRowCount(0)
47 | item = QtWidgets.QTableWidgetItem()
48 | self.tableWidget_order.setHorizontalHeaderItem(0, item)
49 | item = QtWidgets.QTableWidgetItem()
50 | self.tableWidget_order.setHorizontalHeaderItem(1, item)
51 | item = QtWidgets.QTableWidgetItem()
52 | self.tableWidget_order.setHorizontalHeaderItem(2, item)
53 | item = QtWidgets.QTableWidgetItem()
54 | self.tableWidget_order.setHorizontalHeaderItem(3, item)
55 | item = QtWidgets.QTableWidgetItem()
56 | self.tableWidget_order.setHorizontalHeaderItem(4, item)
57 | item = QtWidgets.QTableWidgetItem()
58 | self.tableWidget_order.setHorizontalHeaderItem(5, item)
59 | self.tableWidget_order.horizontalHeader().setMinimumSectionSize(20)
60 | self.tableWidget_order.verticalHeader().setCascadingSectionResizes(True)
61 | self.tableWidget_order.verticalHeader().setDefaultSectionSize(30)
62 | self.tableWidget_order.verticalHeader().setMinimumSectionSize(23)
63 | self.verticalLayout.addWidget(self.tableWidget_order)
64 | self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
65 | self.horizontalLayout_3.setObjectName("horizontalLayout_3")
66 | self.verticalLayout.addLayout(self.horizontalLayout_3)
67 | self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
68 |
69 | self.retranslateUi(Form)
70 | QtCore.QMetaObject.connectSlotsByName(Form)
71 |
72 | def retranslateUi(self, Form):
73 | _translate = QtCore.QCoreApplication.translate
74 | Form.setWindowTitle(_translate("Form", "Form"))
75 | self.btn_refresh.setText(_translate("Form", "这是一个硕大的刷新按钮,想刷新订单状态请用力点我靴靴"))
76 | self.tableWidget_order.setSortingEnabled(True)
77 | item = self.tableWidget_order.horizontalHeaderItem(0)
78 | item.setText(_translate("Form", "订单编号"))
79 | item = self.tableWidget_order.horizontalHeaderItem(1)
80 | item.setText(_translate("Form", "就餐地点"))
81 | item = self.tableWidget_order.horizontalHeaderItem(2)
82 | item.setText(_translate("Form", "订单菜品"))
83 | item = self.tableWidget_order.horizontalHeaderItem(3)
84 | item.setText(_translate("Form", "总金额"))
85 | item = self.tableWidget_order.horizontalHeaderItem(4)
86 | item.setText(_translate("Form", "订单状态"))
87 | item = self.tableWidget_order.horizontalHeaderItem(5)
88 | item.setText(_translate("Form", "评价"))
89 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/UI/UserAllOrderWidget.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | Form
4 |
5 |
6 |
7 | 0
8 | 0
9 | 571
10 | 489
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 | 0
19 |
20 |
21 | 0
22 |
23 |
24 | 0
25 |
26 |
27 | 0
28 |
29 | -
30 |
31 |
-
32 |
33 |
34 | -
35 |
36 |
-
37 |
38 |
39 | Qt::Horizontal
40 |
41 |
42 |
43 | 40
44 | 20
45 |
46 |
47 |
48 |
49 | -
50 |
51 |
52 | font: 12pt "宋体";
53 |
54 |
55 | 这是一个硕大的刷新按钮,想刷新订单状态请用力点我靴靴
56 |
57 |
58 |
59 | -
60 |
61 |
62 | Qt::Horizontal
63 |
64 |
65 |
66 | 40
67 | 20
68 |
69 |
70 |
71 |
72 |
73 |
74 | -
75 |
76 |
77 | font: 12pt "宋体";
78 |
79 |
80 | Qt::ScrollBarAsNeeded
81 |
82 |
83 | QAbstractScrollArea::AdjustToContents
84 |
85 |
86 | false
87 |
88 |
89 | QAbstractItemView::NoEditTriggers
90 |
91 |
92 | QAbstractItemView::SelectRows
93 |
94 |
95 | true
96 |
97 |
98 | 20
99 |
100 |
101 | true
102 |
103 |
104 | 23
105 |
106 |
107 | 30
108 |
109 |
110 |
111 | 订单编号
112 |
113 |
114 |
115 |
116 | 就餐地点
117 |
118 |
119 |
120 |
121 | 订单菜品
122 |
123 |
124 |
125 |
126 | 总金额
127 |
128 |
129 |
130 |
131 | 订单状态
132 |
133 |
134 |
135 |
136 | 评价
137 |
138 |
139 |
140 |
141 | -
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/UI/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp4/Exp3_4/UI/__init__.py
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Util/Constants.py:
--------------------------------------------------------------------------------
1 | ROLE_MAP = {'0': '管理员', '1': '普通用户'}
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Util/FuncUtil.py:
--------------------------------------------------------------------------------
1 | import hashlib
2 |
3 |
4 | def get_md5(data):
5 | m = hashlib.md5()
6 | b = data.encode(encoding='utf-8')
7 | m.update(b)
8 | return m.hexdigest()
9 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Util/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp4/Exp3_4/Util/__init__.py
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Views/AboutWindow.py:
--------------------------------------------------------------------------------
1 | from PyQt5.QtWidgets import QWidget, QMessageBox
2 | from UI.AboutWidget import Ui_AboutWidget
3 | from Util.DbUtil import DbUtil
4 |
5 |
6 | class AboutWindow(Ui_AboutWidget, QWidget):
7 | def __init__(self):
8 | super(AboutWindow, self).__init__()
9 | self.setupUi(self)
10 | self.btn_flower.clicked.connect(self.flower)
11 |
12 | def flower(self):
13 | db = DbUtil()
14 | db.send_flower()
15 | QMessageBox.information(self, '消息', '😆 送花成功!\n谢谢你!!!', QMessageBox.Yes)
16 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Views/AdminHomeWindow.py:
--------------------------------------------------------------------------------
1 | from threading import Thread
2 |
3 | from PyQt5.QtCore import Qt, pyqtSignal
4 | from PyQt5.QtWidgets import QWidget, QMessageBox, QTableWidgetItem, QHeaderView
5 | from UI.AdminHomeWidget import Ui_Form
6 | from Util.DbUtil import DbUtil
7 |
8 |
9 | class AdminHomeWindow(Ui_Form, QWidget):
10 | query_done_signal = pyqtSignal(list)
11 |
12 | def __init__(self, admin_name):
13 | super(AdminHomeWindow, self).__init__()
14 | db = DbUtil()
15 | self.admin_name = admin_name
16 | count, res = db.get_admin_info(self.admin_name)
17 | self.canteen_id = res[0][0]
18 | self.store_id = res[0][1]
19 | self.setupUi(self)
20 | self.init_slot()
21 | self.init_data()
22 | self.init_ui()
23 | self.init_data()
24 |
25 | def init_slot(self):
26 | self.btn_finish.clicked.connect(self.finish)
27 | self.btn_refresh.clicked.connect(self.refresh)
28 | self.query_done_signal.connect(self.show_data)
29 |
30 | def init_data(self):
31 | self.get_data('order')
32 | self.get_data('comment')
33 |
34 | def init_ui(self):
35 | self.tableWidget_order.setColumnCount(6)
36 | self.tableWidget_order.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
37 | self.tableWidget_order.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
38 | self.tableWidget_comment.setColumnCount(4)
39 | self.tableWidget_comment.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
40 | self.tableWidget_comment.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
41 |
42 | def finish(self):
43 | try:
44 | db = DbUtil()
45 | row = self.tableWidget_order.currentRow()
46 | order_id = self.tableWidget_order.item(row, 0).text()
47 | db.update_order_status(order_id)
48 | db.db_commit()
49 | db.instance = None
50 | del db
51 | self.tableWidget_order.removeRow(row)
52 | QMessageBox.information(self, 'Done!', '🥳 提交成功!', QMessageBox.Yes)
53 | except Exception:
54 | QMessageBox.warning(self, 'Do nothing!', '🤯 出错!', QMessageBox.Yes)
55 | return
56 |
57 | def show_data(self, raw_data):
58 | row = 0
59 | datas = raw_data[1]
60 | window = self.tableWidget_comment
61 | if raw_data[2] == 'order':
62 | window = self.tableWidget_order
63 | if len(datas) == 0:
64 | return
65 | col_num = len(datas[0])
66 | for data in datas:
67 | if window.rowCount() <= row:
68 | window.insertRow(row)
69 | for i in range(col_num):
70 | item_name = data[i]
71 | if raw_data[2] == 'order' and i == 4:
72 | item_name = str(item_name) + " 元"
73 | if raw_data[2] == 'comment' and i == 2:
74 | item_name = str(item_name) + " 分"
75 | item = QTableWidgetItem(str(item_name))
76 | window.setItem(row, i, item)
77 | row = row + 1
78 | for i in range(row):
79 | for j in range(col_num - 1):
80 | item = window.item(i, j)
81 | item.setTextAlignment(Qt.AlignVCenter | Qt.AlignHCenter)
82 |
83 | def get_data(self, tag):
84 | th = Thread(target=self.get_data_th(tag))
85 | th.start()
86 |
87 | def get_data_th(self, tag):
88 | db = DbUtil()
89 | if tag == 'order':
90 | count, res = db.get_not_finished_order(self.canteen_id, self.store_id)
91 | else:
92 | count, res = db.get_admin_comment(self.canteen_id, self.store_id)
93 | self.query_done_signal.emit([count, res, tag])
94 |
95 | def refresh(self):
96 | self.get_data('order')
97 | self.get_data('comment')
98 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Views/AdminMainWindow.py:
--------------------------------------------------------------------------------
1 | from PyQt5.QtWidgets import QMainWindow, QMessageBox
2 | from UI.AdminMainWindow import Ui_MainWindow
3 | from Views.AdminHomeWindow import AdminHomeWindow
4 | from Views.AdminOrderWindow import AdminOrderWindow
5 | from Views.AboutWindow import AboutWindow
6 | from Util.Constants import ROLE_MAP
7 |
8 |
9 | class AdminMainWindow(Ui_MainWindow, QMainWindow):
10 |
11 | def __init__(self, login=None, username=None, role=None):
12 | super(AdminMainWindow, self).__init__()
13 | self.setupUi(self)
14 | self.is_change_user = False
15 | self.username = username
16 | self.login_win = login
17 | self.role = ROLE_MAP.get(str(role))
18 | self.init_slot()
19 | self.init_ui()
20 |
21 | def init_ui(self):
22 | self.pushButton.setMinimumWidth(60)
23 | self.treeWidget.setCurrentIndex(self.treeWidget.model().index(0, 0))
24 | self.current_username_label.setText(self.username)
25 | self.current_role_label.setText(self.role)
26 | self.stackedWidget.removeWidget(self.page)
27 | self.stackedWidget.removeWidget(self.page_2)
28 | self.stackedWidget.addWidget(AdminHomeWindow(self.username))
29 | self.stackedWidget.addWidget(AdminOrderWindow(self.username))
30 | self.stackedWidget.addWidget(AboutWindow())
31 |
32 | def init_slot(self):
33 | self.treeWidget.currentItemChanged.connect(self.item_changed)
34 | self.pushButton.clicked.connect(self.log_out)
35 |
36 | def item_changed(self):
37 | if self.treeWidget.currentItem().text(0) == '🧐 主页':
38 | self.stackedWidget.setCurrentIndex(0)
39 | elif self.treeWidget.currentItem().text(0) == '🔍 订单管理':
40 | self.stackedWidget.setCurrentIndex(1)
41 | elif self.treeWidget.currentItem().text(0) == '💫 关于':
42 | self.stackedWidget.setCurrentIndex(2)
43 |
44 | def log_out(self):
45 | self.is_change_user = True
46 | self.close()
47 |
48 | def closeEvent(self, event):
49 | if self.is_change_user:
50 | reply = QMessageBox.question(self, '消息', '确定退出当前账号吗?',
51 | QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
52 | else:
53 | reply = QMessageBox.question(self, '消息', '确定退出系统吗?',
54 | QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
55 | if reply == QMessageBox.Yes:
56 | event.accept()
57 | if self.is_change_user:
58 | self.login_win.show()
59 | else:
60 | event.ignore()
61 | self.is_change_user = False
62 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Views/AdminOrderWindow.py:
--------------------------------------------------------------------------------
1 | from threading import Thread
2 |
3 | from PyQt5.QtCore import pyqtSignal, Qt
4 | from PyQt5.QtWidgets import QWidget, QTableWidgetItem, QHeaderView
5 | from UI.AdminOrderWidget import Ui_Form
6 | from Util.DbUtil import DbUtil
7 |
8 |
9 | class AdminOrderWindow(Ui_Form, QWidget):
10 | query_done_signal = pyqtSignal(list)
11 |
12 | def __init__(self, admin_name):
13 | super(AdminOrderWindow, self).__init__()
14 | db = DbUtil()
15 | self.admin_name = admin_name
16 | count, res = db.get_admin_info(self.admin_name)
17 | self.canteen_id = res[0][0]
18 | self.store_id = res[0][1]
19 | self.setupUi(self)
20 | self.init_ui()
21 | self.query_done_signal.connect(self.show_orders)
22 | self.btn_refresh.clicked.connect(self.refresh)
23 | self.get_orders()
24 |
25 | def init_ui(self):
26 | self.tableWidget_order.setColumnCount(5)
27 | self.tableWidget_order.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
28 | self.tableWidget_order.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
29 |
30 | def get_orders(self):
31 | th = Thread(target=self.get_orders_th())
32 | th.start()
33 |
34 | def get_orders_th(self):
35 | db = DbUtil()
36 | count, res = db.get_admin_order(self.canteen_id, self.store_id)
37 | self.query_done_signal.emit([count, res])
38 |
39 | def show_orders(self, res):
40 | orders = res[1]
41 | col_num = len(orders[0])
42 | row = 0
43 | for order in orders:
44 | if self.tableWidget_order.rowCount() <= row:
45 | self.tableWidget_order.insertRow(row)
46 | for i in range(col_num):
47 | item_name = order[i]
48 | if item_name is None:
49 | item_name = ''
50 | item = QTableWidgetItem(str(item_name))
51 | self.tableWidget_order.setItem(row, i, item)
52 | row = row + 1
53 | for i in range(row):
54 | for j in range(col_num - 1):
55 | item = self.tableWidget_order.item(i, j)
56 | item.setTextAlignment(Qt.AlignVCenter | Qt.AlignHCenter)
57 |
58 | def refresh(self):
59 | self.get_orders()
60 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Views/CanteenWindow.py:
--------------------------------------------------------------------------------
1 | import os
2 | from threading import Thread
3 |
4 | import cv2 as cv
5 | from PyQt5.QtCore import Qt, pyqtSignal
6 | from PyQt5.QtGui import QPixmap, QImage
7 | from PyQt5.QtWidgets import QWidget, QTableWidgetItem, QHeaderView, QGraphicsPixmapItem, QGraphicsScene
8 | from UI.UserCanteenWidget import Ui_Form
9 | from Util.DbUtil import DbUtil
10 |
11 |
12 | class CanteenWindow(Ui_Form, QWidget):
13 | query_done_signal = pyqtSignal(list)
14 |
15 | def __init__(self, canteen_id):
16 | super(CanteenWindow, self).__init__()
17 | self.canteen_id = canteen_id
18 | self.setupUi(self)
19 | self.init_slot()
20 | self.init_data()
21 | self.init_ui()
22 |
23 | def init_slot(self):
24 | self.query_done_signal.connect(self.show_data)
25 |
26 | def init_data(self):
27 | self.get_info()
28 | self.get_data('comment')
29 | self.get_data('top')
30 |
31 | def init_ui(self):
32 | self.tableWidget_comment.setColumnCount(3)
33 | self.tableWidget_comment.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
34 | self.tableWidget_comment.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
35 | self.tableWidget_top.setColumnCount(5)
36 | self.tableWidget_top.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
37 | self.tableWidget_top.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
38 |
39 | def get_info(self):
40 | db = DbUtil()
41 | count, res = db.get_canteen_info(self.canteen_id)
42 | self.label_name.setText(res[0][0])
43 | self.progressBar.setValue(int(res[0][1] * 20))
44 | self.label_level.setText(str(round(res[0][1], 1)) + " 分")
45 | paths = res[0][2].split("/")
46 | path = os.path.join(os.getcwd(), paths[-2], paths[-1])
47 | image = cv.imread(path)
48 | height = image.shape[0]
49 | width = image.shape[1]
50 | frame = QImage(image, width, height, QImage.Format_RGB888)
51 | pix = QPixmap.fromImage(frame)
52 | self.item = QGraphicsPixmapItem(pix)
53 | self.scene = QGraphicsScene() # 创建场景
54 | self.scene.addItem(self.item)
55 | self.graphicsView.setScene(self.scene)
56 |
57 | def show_data(self, raw_data):
58 | datas = raw_data[1]
59 | window = self.tableWidget_comment
60 | if raw_data[2] == 'top':
61 | window = self.tableWidget_top
62 | col_num = len(datas[0])
63 | row = 0
64 | for data in datas:
65 | if window.rowCount() <= row:
66 | window.insertRow(row)
67 | for i in range(col_num):
68 | item_name = data[i]
69 | if raw_data[2] == 'comment' and i == 1:
70 | item_name = str(item_name) + " 分"
71 | elif raw_data[2] == 'top' and i == 3:
72 | item_name = str(item_name) + " 元"
73 | item = QTableWidgetItem(str(item_name))
74 | window.setItem(row, i, item)
75 | row = row + 1
76 | for i in range(row):
77 | for j in range(col_num):
78 | item = window.item(i, j)
79 | item.setTextAlignment(Qt.AlignVCenter | Qt.AlignHCenter)
80 |
81 | def get_data(self, tag):
82 | th = Thread(target=self.get_data_th(tag))
83 | th.start()
84 |
85 | def get_data_th(self, tag):
86 | db = DbUtil()
87 | if tag == 'comment':
88 | count, res = db.get_canteen_comment(self.canteen_id)
89 | else:
90 | count, res = db.get_canteen_top(self.canteen_id)
91 | self.query_done_signal.emit([count, res, tag])
92 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Views/LoginWindow.py:
--------------------------------------------------------------------------------
1 | import os
2 | from threading import Thread
3 |
4 | from PyQt5.QtCore import Qt, pyqtSignal
5 | from PyQt5.QtGui import QIcon, QPixmap
6 | from PyQt5.QtWidgets import QMessageBox, QMainWindow
7 | from UI.Login import Ui_LoginWindow
8 | from Util.FuncUtil import *
9 | from Views.RegisterWindow import RegisterWindow
10 | from Util.DbUtil import DbUtil
11 | from Views.UserMainWindow import UserMainWindow
12 | from Views.AdminMainWindow import AdminMainWindow
13 |
14 | NOT_EXISTED = 1
15 | WRONG_PSW = 2
16 | PASS = 3
17 |
18 |
19 | class LoginWindow(Ui_LoginWindow, QMainWindow):
20 | login_done_signal = pyqtSignal(int)
21 |
22 | def __init__(self):
23 | super(LoginWindow, self).__init__()
24 | self.setupUi(self)
25 | self.role = None
26 | self.init_ui()
27 | self.main_window = None
28 | self.register_window = None
29 | self.init_slot()
30 |
31 | def init_ui(self):
32 | icon = QIcon()
33 | icon.addPixmap(QPixmap(os.path.join(os.getcwd(), "Image", "icon.ico")), QIcon.Normal, QIcon.Off)
34 | self.setWindowIcon(icon)
35 | self.setWindowFlags(Qt.WindowCloseButtonHint | Qt.WindowMinimizeButtonHint)
36 |
37 | def init_slot(self):
38 | self.btn_register.clicked.connect(lambda: self.btn_slot('register'))
39 | self.btn_login.clicked.connect(lambda: self.btn_slot('login'))
40 | self.login_done_signal.connect(self.login_handler)
41 |
42 | def btn_slot(self, tag):
43 |
44 | # 注册
45 | if tag == 'register':
46 | self.register_window = RegisterWindow()
47 | self.register_window.show()
48 | self.show()
49 |
50 | # 登录
51 | if tag == 'login':
52 | user_name = self.lineEdit_user_name.text()
53 | user_psw = self.lineEdit_password.text()
54 | if '' in [user_name, user_psw]:
55 | QMessageBox.warning(self, 'Warning', '请输入用户名或密码!', QMessageBox.Yes)
56 | return
57 | if self.radio_admin.isChecked():
58 | login_th = Thread(target=self.login, args=(user_name, user_psw, True))
59 | else:
60 | login_th = Thread(target=self.login, args=(user_name, user_psw))
61 | login_th.start()
62 |
63 | def login(self, username, password, admin=False):
64 | db = DbUtil()
65 | if self.radio_admin.isChecked():
66 | count, res = db.query(table_name='admin', column_name='admin_name', condition=username)
67 | else:
68 | count, res = db.query(table_name='users', column_name='user_name', condition=username)
69 | if count == 0:
70 | self.login_done_signal.emit(NOT_EXISTED)
71 | return
72 | if get_md5(password) != res[0][2]:
73 | self.login_done_signal.emit(WRONG_PSW)
74 | return
75 | if admin:
76 | self.role = 0
77 | else:
78 | self.role = 1
79 |
80 | self.login_done_signal.emit(PASS)
81 |
82 | def login_handler(self, login_result):
83 | if login_result == NOT_EXISTED:
84 | QMessageBox.warning(self, 'Warning', '用户名不存在,请重试!', QMessageBox.Yes)
85 | return
86 |
87 | if login_result == WRONG_PSW:
88 | QMessageBox.warning(self, 'Warning', '用户名或密码错误!', QMessageBox.Yes)
89 | return
90 |
91 | if login_result == PASS:
92 | username = self.lineEdit_user_name.text()
93 | if self.role:
94 | self.main_window = UserMainWindow(login=self, username=username, role=self.role)
95 | else:
96 | self.main_window = AdminMainWindow(login=self, username=username, role=self.role)
97 | self.main_window.show()
98 | self.close()
99 |
100 | def keyPressEvent(self, QKeyEvent):
101 | if QKeyEvent.key() == Qt.Key_Enter or QKeyEvent.key() == Qt.Key_Return:
102 | self.btn_login.click()
103 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Views/OrderDetailWindow.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | from PyQt5.QtCore import Qt
4 | from PyQt5.QtWidgets import QWidget, QApplication, QMessageBox
5 | from UI.UserOrderDetailWidget import Ui_Form
6 | from Util.DbUtil import DbUtil
7 |
8 |
9 | class OrderDetailWindow(Ui_Form, QWidget):
10 | def __init__(self, order_id, loc, total, comment, level, status):
11 | super(OrderDetailWindow, self).__init__()
12 | self.order_id = order_id
13 | self.loc = loc
14 | self.total = total
15 | self.comment = comment
16 | self.level = level
17 | self.status = status
18 | self.setupUi(self)
19 | self.init_ui()
20 | self.init_slot()
21 |
22 | def init_slot(self):
23 | self.btn_commit.clicked.connect(self.commit)
24 | self.btn_close.clicked.connect(self.close)
25 | self.horizontalSlider.valueChanged.connect(self.slider)
26 |
27 | def init_ui(self):
28 | if self.status == 0:
29 | self.btn_commit.hide()
30 | self.textEdit_comment.setEnabled(False)
31 | self.textEdit_comment.setPlaceholderText("您的订单正在制作中!")
32 | self.label_6.hide()
33 | self.horizontalSlider.hide()
34 | self.label_level.hide()
35 | elif self.status == 2:
36 | self.btn_commit.hide()
37 | self.horizontalSlider.setEnabled(False)
38 | self.textEdit_comment.setEnabled(False)
39 | self.textEdit_comment.setPlainText(self.comment)
40 | else:
41 | self.btn_commit.show()
42 | self.textEdit_comment.setEnabled(True)
43 | self.horizontalSlider.setValue(self.level)
44 | self.label_level.setText(str(self.level) + "分")
45 | self.lineEdit_order_id.setText(str(self.order_id))
46 | self.lineEdit_loc.setText(self.loc)
47 | self.lineEdit_total.setText(str(self.total))
48 | self.setWindowModality(Qt.ApplicationModal)
49 | self.setWindowFlags(Qt.WindowCloseButtonHint)
50 |
51 | def slider(self):
52 | self.level = self.horizontalSlider.value()
53 | self.label_level.setText(str(self.level) + "分")
54 |
55 | def commit(self):
56 | if self.textEdit_comment.toPlainText() == '':
57 | QMessageBox.warning(self, 'Warning', '🙅🏻 请填写评价!', QMessageBox.Yes)
58 | return
59 | db = DbUtil()
60 | commit_data = (self.order_id, self.textEdit_comment.toPlainText(), self.level)
61 | db.add_comment(commit_data)
62 | db.db_commit()
63 | db.instance = None
64 | del db
65 | QMessageBox.information(self, 'Congrats!', '🎉 评论成功!', QMessageBox.Yes)
66 | self.close()
67 |
68 |
69 | if __name__ == '__main__':
70 | app = QApplication(sys.argv)
71 | win = OrderDetailWindow(1, "loc", 12.5)
72 | win.show()
73 | sys.exit(app.exec())
74 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Views/RegisterWindow.py:
--------------------------------------------------------------------------------
1 | from PyQt5.QtCore import Qt
2 | from PyQt5.QtWidgets import QMessageBox, QMainWindow
3 | from UI.Register import Ui_RegisterWindow
4 | from Util.DbUtil import DbUtil
5 | from Util.FuncUtil import get_md5
6 |
7 |
8 | class RegisterWindow(Ui_RegisterWindow, QMainWindow):
9 | def __init__(self):
10 | super(RegisterWindow, self).__init__()
11 | self.setupUi(self)
12 | self.init_ui()
13 | self.btn_cancel.clicked.connect(self.cancel)
14 | self.btn_register.clicked.connect(self.register)
15 |
16 | def init_ui(self):
17 | self.btn_register.setMinimumWidth(60)
18 | self.setWindowModality(Qt.ApplicationModal)
19 | self.setWindowFlags(Qt.WindowCloseButtonHint)
20 |
21 | def cancel(self):
22 | self.close()
23 |
24 | def register(self):
25 | username = self.lineEdit_user_name.text()
26 | password = self.lineEdit_password.text()
27 | confirm = self.lineEdit_confirm.text()
28 | if '' in [username, password, confirm]:
29 | QMessageBox.warning(self, 'Warning', '🙅🏻 请填写完整!', QMessageBox.Yes)
30 | return
31 | if len(username) > 16:
32 | QMessageBox.warning(self, 'Warning', '🤯 用户名应小于 16 位!', QMessageBox.Yes)
33 | return
34 | if len(password) > 16:
35 | QMessageBox.warning(self, 'Warning', '🤯 密码应小于 16 位!', QMessageBox.Yes)
36 | return
37 | db = DbUtil()
38 | count, res = db.query(table_name='users', column_name='user_name', condition=username)
39 | if count != 0:
40 | QMessageBox.warning(self, 'Warning', '🤯 用户名已存在!', QMessageBox.Yes)
41 | return
42 | if password != confirm:
43 | QMessageBox.warning(self, 'Error', '🤔 两次输入密码不一致!', QMessageBox.Yes)
44 | return
45 | user_info = [username, get_md5(password)]
46 | db.add_user(user_info)
47 | db.db_commit()
48 | db.instance = None
49 | del db
50 | QMessageBox.warning(self, 'Congrats!', '🎉 注册成功!', QMessageBox.Yes)
51 | self.close()
52 |
53 | def keyPressEvent(self, QKeyEvent):
54 | if QKeyEvent.key() == Qt.Key_Enter or QKeyEvent.key() == Qt.Key_Return:
55 | self.btn_register.click()
56 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Views/UserAllOrderWindow.py:
--------------------------------------------------------------------------------
1 | from threading import Thread
2 |
3 | from PyQt5.QtCore import pyqtSignal, Qt
4 | from PyQt5.QtWidgets import QWidget, QTableWidgetItem, QHeaderView
5 | from UI.UserAllOrderWidget import Ui_Form
6 | from Views.OrderDetailWindow import OrderDetailWindow
7 | from Util.DbUtil import DbUtil
8 |
9 |
10 | class UserAllOrderWindow(Ui_Form, QWidget):
11 | query_done_signal = pyqtSignal(list)
12 |
13 | def __init__(self, user_name):
14 | super(UserAllOrderWindow, self).__init__()
15 | self.user_name = user_name
16 | self.setupUi(self)
17 | self.init_slot()
18 | self.init_ui()
19 | self.init_data()
20 | self.order_detail_window = None
21 |
22 | def init_ui(self):
23 | self.tableWidget_order.setColumnCount(6)
24 | self.tableWidget_order.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
25 | self.tableWidget_order.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
26 |
27 | def init_slot(self):
28 | self.btn_refresh.clicked.connect(self.get_orders)
29 | self.query_done_signal.connect(self.show_orders)
30 | self.tableWidget_order.doubleClicked.connect(self.commit)
31 |
32 | def init_data(self):
33 | self.get_orders()
34 |
35 | def get_orders(self):
36 | th = Thread(target=self.get_orders_th())
37 | th.start()
38 |
39 | def get_orders_th(self):
40 | db = DbUtil()
41 | count, res = db.get_user_orders(self.user_name)
42 | self.query_done_signal.emit([count, res])
43 |
44 | def show_orders(self, res):
45 | orders = res[1]
46 | col_num = len(orders[0])
47 | row = 0
48 | for order in orders:
49 | if self.tableWidget_order.rowCount() <= row:
50 | self.tableWidget_order.insertRow(row)
51 | for i in range(col_num):
52 | item_name = order[i]
53 | if item_name is None:
54 | item_name = ''
55 | if i == 3:
56 | item_name = str(item_name) + " 元"
57 | if i == 4:
58 | if order[4] == 0:
59 | item_name = "已下单"
60 | elif order[4] == 1:
61 | item_name = "已完成"
62 | item = QTableWidgetItem(str(item_name))
63 | self.tableWidget_order.setItem(row, i, item)
64 | row = row + 1
65 | for i in range(row):
66 | for j in range(col_num):
67 | item = self.tableWidget_order.item(i, j)
68 | item.setTextAlignment(Qt.AlignVCenter | Qt.AlignHCenter)
69 |
70 | def commit(self):
71 | row = self.tableWidget_order.currentRow()
72 | order_id = self.tableWidget_order.item(row, 0).text()
73 | loc = self.tableWidget_order.item(row, 1).text()
74 | total = self.tableWidget_order.item(row, 3).text()
75 | comment = self.tableWidget_order.item(row, 5).text()
76 | level = 5
77 | if comment != '':
78 | comment = comment.split(" ", 2)
79 | comment = comment[2]
80 | level = self.tableWidget_order.item(row, 5).text()
81 | level = int(level[0])
82 | status = 1
83 | if self.tableWidget_order.item(row, 4).text() == '已下单':
84 | status = 0
85 | if self.tableWidget_order.item(row, 5).text() != '':
86 | status = 2
87 |
88 | self.order_detail_window = OrderDetailWindow(order_id, loc, total, comment, level, status)
89 | self.order_detail_window.show()
90 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Views/UserHomeWindow.py:
--------------------------------------------------------------------------------
1 | import time
2 | from threading import Thread
3 |
4 | from PyQt5.QtCore import pyqtSignal, Qt
5 | from PyQt5.QtWidgets import QWidget, QTableWidgetItem, QMessageBox, QHeaderView
6 | from UI.UserHomePageWidget import Ui_HomePageWidget
7 | from Util.DbUtil import DbUtil
8 |
9 |
10 | class UserHomeWindow(Ui_HomePageWidget, QWidget):
11 | query_done_signal = pyqtSignal(list)
12 |
13 | def __init__(self):
14 | super(UserHomeWindow, self).__init__()
15 | self.setupUi(self)
16 | self.time_percent = (int(time.time()) + 28800) % 86400 // 864
17 | self.init_ui()
18 | self.init_slot()
19 | self.get_orders()
20 |
21 | def init_ui(self):
22 | self.progressBar_time.setValue(self.time_percent)
23 | self.time.setText(str(self.time_percent) + '%')
24 | self.tableWidget_prd.setColumnCount(4)
25 | self.tableWidget_prd.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
26 | self.tableWidget_prd.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
27 |
28 | def init_slot(self):
29 | self.btn_refresh.clicked.connect(self.refresh)
30 | self.time.setText(str(self.time_percent) + '%')
31 | self.query_done_signal.connect(self.show_orders)
32 | self.btn_random.clicked.connect(self.random)
33 |
34 | def refresh(self):
35 | self.time_percent = (int(time.time()) + 28800) % 86400 // 864
36 | self.get_orders()
37 |
38 | def get_orders(self):
39 | th = Thread(target=self.get_orders_th())
40 | th.start()
41 |
42 | def get_orders_th(self):
43 | db = DbUtil()
44 | count, res = db.get_recent_order()
45 | self.query_done_signal.emit([count, res])
46 |
47 | def show_orders(self, res):
48 | orders = res[1]
49 | col_num = len(orders[0])
50 | row = 0
51 | for order in orders:
52 | if self.tableWidget_prd.rowCount() <= row:
53 | self.tableWidget_prd.insertRow(row)
54 | for i in range(col_num):
55 | item = QTableWidgetItem(str(order[i]))
56 | self.tableWidget_prd.setItem(row, i, item)
57 | row = row + 1
58 | for i in range(row):
59 | for j in range(col_num):
60 | item = self.tableWidget_prd.item(i, j)
61 | item.setTextAlignment(Qt.AlignVCenter | Qt.AlignHCenter)
62 |
63 | def random(self):
64 | db = DbUtil()
65 | res = db.get_one_prd_randomly()
66 | msg = '🍲 今日菜单\n' \
67 | '菜品名:{}\n' \
68 | '介绍:{}\n' \
69 | '单价:{}\n' \
70 | '销量:{}\n' \
71 | 'Enjoy your meal!' \
72 | .format(res[0][0], res[0][1], res[0][2], res[0][3])
73 | QMessageBox.information(self, 'Congrats!', msg, QMessageBox.Yes)
74 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Views/UserMainWindow.py:
--------------------------------------------------------------------------------
1 | from PyQt5.QtWidgets import QMainWindow, QMessageBox
2 | from UI.UserMainWindow import Ui_MainWindow
3 | from Views.UserHomeWindow import UserHomeWindow
4 | from Views.UserAllOrderWindow import UserAllOrderWindow
5 | from Views.CanteenWindow import CanteenWindow
6 | from Views.UserOrderWindow import UserOrderWindow
7 | from Views.AboutWindow import AboutWindow
8 | from Util.Constants import ROLE_MAP
9 | from Util.DbUtil import DbUtil
10 |
11 |
12 | class UserMainWindow(Ui_MainWindow, QMainWindow):
13 |
14 | def __init__(self, login=None, username=None, role=None):
15 | super(UserMainWindow, self).__init__()
16 | self.setupUi(self)
17 | self.is_change_user = False
18 | self.username = username
19 | self.login_win = login
20 | self.role = ROLE_MAP.get(str(role))
21 | self.store_111 = UserOrderWindow("酸菜鱼")
22 | self.store_112 = UserOrderWindow("西北风味")
23 | self.store_211 = UserOrderWindow("豆花")
24 | self.store_212 = UserOrderWindow("经典小炒")
25 | self.store_221 = UserOrderWindow("东北特色菜")
26 | self.init_slot()
27 | self.init_ui()
28 |
29 | def init_ui(self):
30 | self.pushButton.setMinimumWidth(60)
31 | self.treeWidget.setCurrentIndex(self.treeWidget.model().index(0, 0))
32 | self.current_username_label.setText(self.username)
33 | self.current_role_label.setText(self.role)
34 | self.stackedWidget.removeWidget(self.page)
35 | self.stackedWidget.removeWidget(self.page_2)
36 |
37 | self.stackedWidget.addWidget(UserHomeWindow())
38 | self.stackedWidget.addWidget(CanteenWindow(1))
39 | self.stackedWidget.addWidget(self.store_111)
40 | self.stackedWidget.addWidget(self.store_112)
41 | self.stackedWidget.addWidget(CanteenWindow(2))
42 | self.stackedWidget.addWidget(self.store_211)
43 | self.stackedWidget.addWidget(self.store_212)
44 | self.stackedWidget.addWidget(self.store_221)
45 | self.stackedWidget.addWidget(UserAllOrderWindow(self.username))
46 | self.stackedWidget.addWidget(AboutWindow())
47 | # self.stackedWidget.addWidget(QWidget())
48 |
49 | def init_slot(self):
50 | self.treeWidget.currentItemChanged.connect(self.item_changed)
51 | self.pushButton.clicked.connect(self.log_out)
52 | self.store_111.btn_commit.clicked.connect(lambda: self.commit(111, self.store_111))
53 | self.store_112.btn_commit.clicked.connect(lambda: self.commit(112, self.store_112))
54 | self.store_211.btn_commit.clicked.connect(lambda: self.commit(211, self.store_211))
55 | self.store_212.btn_commit.clicked.connect(lambda: self.commit(212, self.store_212))
56 | self.store_221.btn_commit.clicked.connect(lambda: self.commit(221, self.store_221))
57 |
58 | def item_changed(self):
59 | if self.treeWidget.currentItem().text(0) == '👀 主页':
60 | self.stackedWidget.setCurrentIndex(0)
61 | elif self.treeWidget.currentItem().text(0) == '🏪 荔园一食堂':
62 | self.stackedWidget.setCurrentIndex(1)
63 | elif self.treeWidget.currentItem().text(0) == '🐠 酸菜鱼':
64 | self.stackedWidget.setCurrentIndex(2)
65 | elif self.treeWidget.currentItem().text(0) == '🥗 西北风味':
66 | self.stackedWidget.setCurrentIndex(3)
67 | elif self.treeWidget.currentItem().text(0) == '🏪 荔园二食堂':
68 | self.stackedWidget.setCurrentIndex(4)
69 | elif self.treeWidget.currentItem().text(0) == '🍮 豆花':
70 | self.stackedWidget.setCurrentIndex(5)
71 | elif self.treeWidget.currentItem().text(0) == '🥘 经典小炒':
72 | self.stackedWidget.setCurrentIndex(6)
73 | elif self.treeWidget.currentItem().text(0) == '👨🏻🍳 东北菜':
74 | self.stackedWidget.setCurrentIndex(7)
75 | elif self.treeWidget.currentItem().text(0) == '💰 订单管理':
76 | self.stackedWidget.setCurrentIndex(8)
77 | elif self.treeWidget.currentItem().text(0) == '🔍 关于':
78 | self.stackedWidget.setCurrentIndex(9)
79 |
80 | '''
81 | 步骤分析:
82 | ① 获取 user_id, store_id, total
83 | ② 构造购物车清单列表
84 | ③ 将 ① 和 ② 合成一个列表
85 | ④ 调用 sql, 提交订单
86 | '''
87 |
88 | def commit(self, store_id, store):
89 | prds = []
90 | for i in range(store.tableWidget_cart.rowCount()):
91 | prd_id = store.tableWidget_cart.item(i, 0).text()
92 | prds.append(int(prd_id))
93 | if not prds:
94 | QMessageBox.warning(self, '骚瑞', '🥲 亲亲还没有点餐哦', QMessageBox.Yes)
95 | return
96 | set_prds = set(prds)
97 | if len(set_prds) != len(prds):
98 | QMessageBox.warning(self, '骚瑞', '🥲 检测到重复菜品!\n亲亲我们目前还没有支持重复菜品的点单哦!\n感谢李姐!!!🙇🏼', QMessageBox.Yes)
99 | store.clear()
100 | return
101 |
102 | db = DbUtil()
103 | user_id = db.get_user_id(self.username)
104 | tot = store.lcdNumber_tot.value()
105 | data = [user_id, int(store_id), round(float(tot), 1), prds]
106 | db.add_order(data)
107 | del db
108 | QMessageBox.information(self, '成功辣', '😎 点单成功!\n请友友耐心等待哦!\n记得到\"订单管理\"随时查看状态~', QMessageBox.Yes)
109 | store.clear()
110 |
111 | def log_out(self):
112 | self.is_change_user = True
113 | self.close()
114 |
115 | def closeEvent(self, event):
116 | if self.is_change_user:
117 | reply = QMessageBox.question(self, '尝试确认', '🤔 确定退出当前账号吗?',
118 | QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
119 | else:
120 | reply = QMessageBox.question(self, '试图挽留', '🥺 确定退出系统吗?',
121 | QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
122 | if reply == QMessageBox.Yes:
123 | event.accept()
124 | if self.is_change_user:
125 | self.login_win.show()
126 | else:
127 | event.ignore()
128 | self.is_change_user = False
129 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Views/UserOrderWindow.py:
--------------------------------------------------------------------------------
1 | from threading import Thread
2 |
3 | from PyQt5.QtCore import pyqtSignal, Qt
4 | from PyQt5.QtWidgets import QWidget, QTableWidgetItem, QHeaderView
5 | from UI.UserOrderWidget import Ui_Form
6 | from Util.DbUtil import DbUtil
7 |
8 |
9 | class UserOrderWindow(Ui_Form, QWidget):
10 | query_done_signal = pyqtSignal(list)
11 |
12 | def __init__(self, store_name):
13 | super(UserOrderWindow, self).__init__()
14 | self.store_name = store_name
15 | self.row = 0
16 | self.tot = 0
17 | self.cart = []
18 | self.setupUi(self)
19 | self.init_slot()
20 | self.init_ui()
21 | self.init_data()
22 |
23 | def init_ui(self):
24 | self.lcdNumber_tot.display(self.tot)
25 | self.tableWidge_prd.setColumnCount(5)
26 | self.tableWidge_prd.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
27 | self.tableWidge_prd.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
28 | self.tableWidget_cart.setColumnCount(2)
29 | self.tableWidget_cart.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
30 | self.tableWidget_cart.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
31 |
32 | def init_slot(self):
33 | self.query_done_signal.connect(self.show_prd)
34 | self.tableWidge_prd.doubleClicked.connect(self.add_cart)
35 | self.btn_clear.clicked.connect(self.clear)
36 |
37 | def init_data(self):
38 | th = Thread(target=self.get_prd_th())
39 | th.start()
40 |
41 | def get_prd_th(self):
42 | db = DbUtil()
43 | count, res = db.get_store_prd(self.store_name)
44 | self.query_done_signal.emit([count, res])
45 |
46 | def show_prd(self, res):
47 | prds = res[1]
48 | col_num = len(prds[0])
49 | row = 0
50 | for prd in prds:
51 | if self.tableWidge_prd.rowCount() <= row:
52 | self.tableWidge_prd.insertRow(row)
53 | for i in range(col_num):
54 | item_name = prd[i]
55 | item = QTableWidgetItem(str(item_name))
56 | self.tableWidge_prd.setItem(row, i, item)
57 | row = row + 1
58 | for i in range(row):
59 | for j in range(col_num):
60 | item = self.tableWidge_prd.item(i, j)
61 | item.setTextAlignment(Qt.AlignVCenter | Qt.AlignHCenter)
62 |
63 | def add_cart(self):
64 | row = self.tableWidge_prd.currentRow()
65 | prd_id = self.tableWidge_prd.item(row, 0).text()
66 | prd_name = self.tableWidge_prd.item(row, 1).text()
67 | prd_price = self.tableWidge_prd.item(row, 3).text()
68 | self.cart.append([prd_id, prd_price])
69 | self.tot += round(float(prd_price), 1)
70 |
71 | if self.tableWidget_cart.rowCount() <= self.row:
72 | self.tableWidget_cart.insertRow(self.row)
73 | item = QTableWidgetItem(str(prd_id))
74 | self.tableWidget_cart.setItem(self.row, 0, item)
75 | item = QTableWidgetItem(str(prd_name))
76 | self.tableWidget_cart.setItem(self.row, 1, item)
77 | item = QTableWidgetItem(str(prd_price))
78 | self.tableWidget_cart.setItem(self.row, 2, item)
79 | self.lcdNumber_tot.display(self.tot)
80 |
81 | self.row += 1
82 |
83 | def clear(self):
84 | self.cart = []
85 | self.tot = 0
86 | self.row = 0
87 | self.tableWidget_cart.clearContents()
88 | self.tableWidget_cart.setRowCount(0)
89 | self.lcdNumber_tot.display(0)
90 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/Views/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp4/Exp3_4/Views/__init__.py
--------------------------------------------------------------------------------
/Exp4/Exp3_4/main.py:
--------------------------------------------------------------------------------
1 | import sys
2 | from Views.LoginWindow import LoginWindow
3 | from PyQt5.QtWidgets import QApplication
4 |
5 | if __name__ == '__main__':
6 | app = QApplication(sys.argv)
7 | ui = LoginWindow()
8 | ui.show()
9 | sys.exit(app.exec_())
10 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/requirements.txt:
--------------------------------------------------------------------------------
1 | altgraph==0.17.2
2 | macholib==1.15.2
3 | numpy==1.21.4
4 | opencv-python==4.5.4.58
5 | pyinstaller==4.7
6 | pyinstaller-hooks-contrib==2021.3
7 | PyMySQL==1.0.2
8 | PyQt5==5.15.6
9 | PyQt5-Qt5==5.15.2
10 | PyQt5-sip==12.9.0
11 | PyQt5-stubs==5.15.2.0
12 |
--------------------------------------------------------------------------------
/Exp4/Exp3_4/test.py:
--------------------------------------------------------------------------------
1 | from Util.FuncUtil import get_md5
2 |
3 | print(get_md5('admin1'))
4 | print(get_md5('admin2'))
5 | print(get_md5('admin3'))
6 | print(get_md5('admin4'))
7 | print(get_md5('admin5'))
8 | print(get_md5('admin6'))
9 | print(get_md5('admin7'))
--------------------------------------------------------------------------------
/Exp5/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 | # Datasource local storage ignored files
7 | /dataSources/
8 | /dataSources.local.xml
9 |
--------------------------------------------------------------------------------
/Exp5/.idea/Exp5.iml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Exp5/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Exp5/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Exp5/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Exp5/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Exp5/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.20)
2 | project(Exp5 C)
3 | set(CMAKE_C_STANDARD 99)
4 | include_directories("./")
5 | add_library(extmem extmem.c)
6 |
7 | add_executable(exec solution.c utils.h)
8 |
9 | target_link_libraries(exec extmem)
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/3.20.2/CMakeCCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_C_COMPILER "/Library/Developer/CommandLineTools/usr/bin/gcc")
2 | set(CMAKE_C_COMPILER_ARG1 "")
3 | set(CMAKE_C_COMPILER_ID "AppleClang")
4 | set(CMAKE_C_COMPILER_VERSION "13.0.0.13000029")
5 | set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
6 | set(CMAKE_C_COMPILER_WRAPPER "")
7 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11")
8 | set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert")
9 | set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
10 | set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
11 | set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
12 |
13 | set(CMAKE_C_PLATFORM_ID "Darwin")
14 | set(CMAKE_C_SIMULATE_ID "")
15 | set(CMAKE_C_COMPILER_FRONTEND_VARIANT "")
16 | set(CMAKE_C_SIMULATE_VERSION "")
17 |
18 |
19 |
20 |
21 | set(CMAKE_AR "/Library/Developer/CommandLineTools/usr/bin/ar")
22 | set(CMAKE_C_COMPILER_AR "")
23 | set(CMAKE_RANLIB "/Library/Developer/CommandLineTools/usr/bin/ranlib")
24 | set(CMAKE_C_COMPILER_RANLIB "")
25 | set(CMAKE_LINKER "/Library/Developer/CommandLineTools/usr/bin/ld")
26 | set(CMAKE_MT "")
27 | set(CMAKE_COMPILER_IS_GNUCC )
28 | set(CMAKE_C_COMPILER_LOADED 1)
29 | set(CMAKE_C_COMPILER_WORKS TRUE)
30 | set(CMAKE_C_ABI_COMPILED TRUE)
31 | set(CMAKE_COMPILER_IS_MINGW )
32 | set(CMAKE_COMPILER_IS_CYGWIN )
33 | if(CMAKE_COMPILER_IS_CYGWIN)
34 | set(CYGWIN 1)
35 | set(UNIX 1)
36 | endif()
37 |
38 | set(CMAKE_C_COMPILER_ENV_VAR "CC")
39 |
40 | if(CMAKE_COMPILER_IS_MINGW)
41 | set(MINGW 1)
42 | endif()
43 | set(CMAKE_C_COMPILER_ID_RUN 1)
44 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
45 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
46 | set(CMAKE_C_LINKER_PREFERENCE 10)
47 |
48 | # Save compiler ABI information.
49 | set(CMAKE_C_SIZEOF_DATA_PTR "8")
50 | set(CMAKE_C_COMPILER_ABI "")
51 | set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN")
52 | set(CMAKE_C_LIBRARY_ARCHITECTURE "")
53 |
54 | if(CMAKE_C_SIZEOF_DATA_PTR)
55 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
56 | endif()
57 |
58 | if(CMAKE_C_COMPILER_ABI)
59 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
60 | endif()
61 |
62 | if(CMAKE_C_LIBRARY_ARCHITECTURE)
63 | set(CMAKE_LIBRARY_ARCHITECTURE "")
64 | endif()
65 |
66 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
67 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
68 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
69 | endif()
70 |
71 |
72 |
73 |
74 |
75 | set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/Library/Developer/CommandLineTools/usr/lib/clang/13.0.0/include;/Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk/usr/include;/Library/Developer/CommandLineTools/usr/include")
76 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "")
77 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk/usr/lib")
78 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk/System/Library/Frameworks")
79 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/3.20.2/CMakeDetermineCompilerABI_C.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp5/cmake-build-debug/CMakeFiles/3.20.2/CMakeDetermineCompilerABI_C.bin
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/3.20.2/CMakeSystem.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_HOST_SYSTEM "Darwin-21.1.0")
2 | set(CMAKE_HOST_SYSTEM_NAME "Darwin")
3 | set(CMAKE_HOST_SYSTEM_VERSION "21.1.0")
4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "arm64")
5 |
6 |
7 |
8 | set(CMAKE_SYSTEM "Darwin-21.1.0")
9 | set(CMAKE_SYSTEM_NAME "Darwin")
10 | set(CMAKE_SYSTEM_VERSION "21.1.0")
11 | set(CMAKE_SYSTEM_PROCESSOR "arm64")
12 |
13 | set(CMAKE_CROSSCOMPILING "FALSE")
14 |
15 | set(CMAKE_SYSTEM_LOADED 1)
16 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/CMakeDirectoryInformation.cmake:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.20
3 |
4 | # Relative path conversion top directories.
5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5")
6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug")
7 |
8 | # Force unix paths in dependencies.
9 | set(CMAKE_FORCE_UNIX_PATHS 1)
10 |
11 |
12 | # The C and CXX include file regular expressions for this directory.
13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
17 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/Makefile2:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.20
3 |
4 | # Default target executed when no arguments are given to make.
5 | default_target: all
6 | .PHONY : default_target
7 |
8 | #=============================================================================
9 | # Special targets provided by cmake.
10 |
11 | # Disable implicit rules so canonical targets will work.
12 | .SUFFIXES:
13 |
14 | # Disable VCS-based implicit rules.
15 | % : %,v
16 |
17 | # Disable VCS-based implicit rules.
18 | % : RCS/%
19 |
20 | # Disable VCS-based implicit rules.
21 | % : RCS/%,v
22 |
23 | # Disable VCS-based implicit rules.
24 | % : SCCS/s.%
25 |
26 | # Disable VCS-based implicit rules.
27 | % : s.%
28 |
29 | .SUFFIXES: .hpux_make_needs_suffix_list
30 |
31 | # Command-line flag to silence nested $(MAKE).
32 | $(VERBOSE)MAKESILENT = -s
33 |
34 | #Suppress display of executed commands.
35 | $(VERBOSE).SILENT:
36 |
37 | # A target that is always out of date.
38 | cmake_force:
39 | .PHONY : cmake_force
40 |
41 | #=============================================================================
42 | # Set environment variables for the build.
43 |
44 | # The shell in which to execute make rules.
45 | SHELL = /bin/sh
46 |
47 | # The CMake executable.
48 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
49 |
50 | # The command to remove a file.
51 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E rm -f
52 |
53 | # Escaping for special characters.
54 | EQUALS = =
55 |
56 | # The top-level source directory on which CMake was run.
57 | CMAKE_SOURCE_DIR = /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5
58 |
59 | # The top-level build directory on which CMake was run.
60 | CMAKE_BINARY_DIR = /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug
61 |
62 | #=============================================================================
63 | # Directory level rules for the build root directory
64 |
65 | # The main recursive "all" target.
66 | all: CMakeFiles/exec.dir/all
67 | all: CMakeFiles/extmem.dir/all
68 | .PHONY : all
69 |
70 | # The main recursive "preinstall" target.
71 | preinstall:
72 | .PHONY : preinstall
73 |
74 | # The main recursive "clean" target.
75 | clean: CMakeFiles/exec.dir/clean
76 | clean: CMakeFiles/extmem.dir/clean
77 | .PHONY : clean
78 |
79 | #=============================================================================
80 | # Target rules for target CMakeFiles/exec.dir
81 |
82 | # All Build rule for target.
83 | CMakeFiles/exec.dir/all: CMakeFiles/extmem.dir/all
84 | $(MAKE) $(MAKESILENT) -f CMakeFiles/exec.dir/build.make CMakeFiles/exec.dir/depend
85 | $(MAKE) $(MAKESILENT) -f CMakeFiles/exec.dir/build.make CMakeFiles/exec.dir/build
86 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles --progress-num=1,2 "Built target exec"
87 | .PHONY : CMakeFiles/exec.dir/all
88 |
89 | # Build rule for subdir invocation for target.
90 | CMakeFiles/exec.dir/rule: cmake_check_build_system
91 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles 4
92 | $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/exec.dir/all
93 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles 0
94 | .PHONY : CMakeFiles/exec.dir/rule
95 |
96 | # Convenience name for target.
97 | exec: CMakeFiles/exec.dir/rule
98 | .PHONY : exec
99 |
100 | # clean rule for target.
101 | CMakeFiles/exec.dir/clean:
102 | $(MAKE) $(MAKESILENT) -f CMakeFiles/exec.dir/build.make CMakeFiles/exec.dir/clean
103 | .PHONY : CMakeFiles/exec.dir/clean
104 |
105 | #=============================================================================
106 | # Target rules for target CMakeFiles/extmem.dir
107 |
108 | # All Build rule for target.
109 | CMakeFiles/extmem.dir/all:
110 | $(MAKE) $(MAKESILENT) -f CMakeFiles/extmem.dir/build.make CMakeFiles/extmem.dir/depend
111 | $(MAKE) $(MAKESILENT) -f CMakeFiles/extmem.dir/build.make CMakeFiles/extmem.dir/build
112 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles --progress-num=3,4 "Built target extmem"
113 | .PHONY : CMakeFiles/extmem.dir/all
114 |
115 | # Build rule for subdir invocation for target.
116 | CMakeFiles/extmem.dir/rule: cmake_check_build_system
117 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles 2
118 | $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/extmem.dir/all
119 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles 0
120 | .PHONY : CMakeFiles/extmem.dir/rule
121 |
122 | # Convenience name for target.
123 | extmem: CMakeFiles/extmem.dir/rule
124 | .PHONY : extmem
125 |
126 | # clean rule for target.
127 | CMakeFiles/extmem.dir/clean:
128 | $(MAKE) $(MAKESILENT) -f CMakeFiles/extmem.dir/build.make CMakeFiles/extmem.dir/clean
129 | .PHONY : CMakeFiles/extmem.dir/clean
130 |
131 | #=============================================================================
132 | # Special targets to cleanup operation of make.
133 |
134 | # Special rule to run CMake to check the build system integrity.
135 | # No rule that depends on this can have commands that come from listfiles
136 | # because they might be regenerated.
137 | cmake_check_build_system:
138 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
139 | .PHONY : cmake_check_build_system
140 |
141 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/TargetDirectories.txt:
--------------------------------------------------------------------------------
1 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles/rebuild_cache.dir
2 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles/edit_cache.dir
3 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles/exec.dir
4 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles/extmem.dir
5 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/clion-environment.txt:
--------------------------------------------------------------------------------
1 | ToolSet: 1.0 (local)Options:
2 |
3 | Options:-DCMAKE_C_COMPILER=/Library/Developer/CommandLineTools/usr/bin/gcc
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/clion-log.txt:
--------------------------------------------------------------------------------
1 | /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/Library/Developer/CommandLineTools/usr/bin/gcc -DCMAKE_DEPENDS_USE_COMPILER=FALSE -G "CodeBlocks - Unix Makefiles" /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5
2 | -- The C compiler identification is AppleClang 13.0.0.13000029
3 | -- Detecting C compiler ABI info
4 | -- Detecting C compiler ABI info - done
5 | -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/gcc - skipped
6 | -- Detecting C compile features
7 | -- Detecting C compile features - done
8 | -- Configuring done
9 | -- Generating done
10 | -- Build files have been written to: /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug
11 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/cmake.check_cache:
--------------------------------------------------------------------------------
1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file
2 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/exec.dir/C.includecache:
--------------------------------------------------------------------------------
1 | #IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">])
2 |
3 | #IncludeRegexScan: ^.*$
4 |
5 | #IncludeRegexComplain: ^$
6 |
7 | #IncludeRegexTransform:
8 |
9 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/extmem.h
10 |
11 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/solution.c
12 | string.h
13 | -
14 | utils.h
15 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/utils.h
16 |
17 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/utils.h
18 | stdio.h
19 | -
20 | stdlib.h
21 | -
22 | extmem.h
23 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/extmem.h
24 | string.h
25 | -
26 |
27 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/exec.dir/DependInfo.cmake:
--------------------------------------------------------------------------------
1 |
2 | # Consider dependencies only in project.
3 | set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF)
4 |
5 | # The set of languages for which implicit dependencies are needed:
6 | set(CMAKE_DEPENDS_LANGUAGES
7 | "C"
8 | )
9 | # The set of files for implicit dependencies of each language:
10 | set(CMAKE_DEPENDS_CHECK_C
11 | "/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/solution.c" "/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles/exec.dir/solution.c.o"
12 | )
13 | set(CMAKE_C_COMPILER_ID "AppleClang")
14 |
15 | # The include file search paths:
16 | set(CMAKE_C_TARGET_INCLUDE_PATH
17 | "../."
18 | )
19 |
20 | # The set of dependency files which are needed:
21 | set(CMAKE_DEPENDS_DEPENDENCY_FILES
22 | )
23 |
24 | # Targets to which this target links.
25 | set(CMAKE_TARGET_LINKED_INFO_FILES
26 | "/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles/extmem.dir/DependInfo.cmake"
27 | )
28 |
29 | # Fortran module output directory.
30 | set(CMAKE_Fortran_TARGET_MODULE_DIR "")
31 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/exec.dir/build.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.20
3 |
4 | # Delete rule output on recipe failure.
5 | .DELETE_ON_ERROR:
6 |
7 | #=============================================================================
8 | # Special targets provided by cmake.
9 |
10 | # Disable implicit rules so canonical targets will work.
11 | .SUFFIXES:
12 |
13 | # Disable VCS-based implicit rules.
14 | % : %,v
15 |
16 | # Disable VCS-based implicit rules.
17 | % : RCS/%
18 |
19 | # Disable VCS-based implicit rules.
20 | % : RCS/%,v
21 |
22 | # Disable VCS-based implicit rules.
23 | % : SCCS/s.%
24 |
25 | # Disable VCS-based implicit rules.
26 | % : s.%
27 |
28 | .SUFFIXES: .hpux_make_needs_suffix_list
29 |
30 | # Command-line flag to silence nested $(MAKE).
31 | $(VERBOSE)MAKESILENT = -s
32 |
33 | #Suppress display of executed commands.
34 | $(VERBOSE).SILENT:
35 |
36 | # A target that is always out of date.
37 | cmake_force:
38 | .PHONY : cmake_force
39 |
40 | #=============================================================================
41 | # Set environment variables for the build.
42 |
43 | # The shell in which to execute make rules.
44 | SHELL = /bin/sh
45 |
46 | # The CMake executable.
47 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
48 |
49 | # The command to remove a file.
50 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E rm -f
51 |
52 | # Escaping for special characters.
53 | EQUALS = =
54 |
55 | # The top-level source directory on which CMake was run.
56 | CMAKE_SOURCE_DIR = /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5
57 |
58 | # The top-level build directory on which CMake was run.
59 | CMAKE_BINARY_DIR = /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug
60 |
61 | # Include any dependencies generated for this target.
62 | include CMakeFiles/exec.dir/depend.make
63 | # Include the progress variables for this target.
64 | include CMakeFiles/exec.dir/progress.make
65 |
66 | # Include the compile flags for this target's objects.
67 | include CMakeFiles/exec.dir/flags.make
68 |
69 | CMakeFiles/exec.dir/solution.c.o: CMakeFiles/exec.dir/flags.make
70 | CMakeFiles/exec.dir/solution.c.o: ../solution.c
71 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object CMakeFiles/exec.dir/solution.c.o"
72 | /Library/Developer/CommandLineTools/usr/bin/gcc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/exec.dir/solution.c.o -c /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/solution.c
73 |
74 | CMakeFiles/exec.dir/solution.c.i: cmake_force
75 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/exec.dir/solution.c.i"
76 | /Library/Developer/CommandLineTools/usr/bin/gcc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/solution.c > CMakeFiles/exec.dir/solution.c.i
77 |
78 | CMakeFiles/exec.dir/solution.c.s: cmake_force
79 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/exec.dir/solution.c.s"
80 | /Library/Developer/CommandLineTools/usr/bin/gcc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/solution.c -o CMakeFiles/exec.dir/solution.c.s
81 |
82 | # Object files for target exec
83 | exec_OBJECTS = \
84 | "CMakeFiles/exec.dir/solution.c.o"
85 |
86 | # External object files for target exec
87 | exec_EXTERNAL_OBJECTS =
88 |
89 | exec: CMakeFiles/exec.dir/solution.c.o
90 | exec: CMakeFiles/exec.dir/build.make
91 | exec: libextmem.a
92 | exec: CMakeFiles/exec.dir/link.txt
93 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking C executable exec"
94 | $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/exec.dir/link.txt --verbose=$(VERBOSE)
95 |
96 | # Rule to build all files generated by this target.
97 | CMakeFiles/exec.dir/build: exec
98 | .PHONY : CMakeFiles/exec.dir/build
99 |
100 | CMakeFiles/exec.dir/clean:
101 | $(CMAKE_COMMAND) -P CMakeFiles/exec.dir/cmake_clean.cmake
102 | .PHONY : CMakeFiles/exec.dir/clean
103 |
104 | CMakeFiles/exec.dir/depend:
105 | cd /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5 /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5 /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles/exec.dir/DependInfo.cmake --color=$(COLOR)
106 | .PHONY : CMakeFiles/exec.dir/depend
107 |
108 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/exec.dir/cmake_clean.cmake:
--------------------------------------------------------------------------------
1 | file(REMOVE_RECURSE
2 | "CMakeFiles/exec.dir/solution.c.o"
3 | "exec"
4 | "exec.pdb"
5 | )
6 |
7 | # Per-language clean rules from dependency scanning.
8 | foreach(lang C)
9 | include(CMakeFiles/exec.dir/cmake_clean_${lang}.cmake OPTIONAL)
10 | endforeach()
11 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/exec.dir/depend.internal:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.20
3 |
4 | CMakeFiles/exec.dir/solution.c.o
5 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/extmem.h
6 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/solution.c
7 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/utils.h
8 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/exec.dir/depend.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.20
3 |
4 | CMakeFiles/exec.dir/solution.c.o: \
5 | ../extmem.h \
6 | ../solution.c \
7 | ../utils.h
8 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/exec.dir/flags.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.20
3 |
4 | # compile C with /Library/Developer/CommandLineTools/usr/bin/gcc
5 | C_DEFINES =
6 |
7 | C_INCLUDES = -I/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/.
8 |
9 | C_FLAGSarm64 = -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk -std=gnu99
10 |
11 | C_FLAGS = -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk -std=gnu99
12 |
13 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/exec.dir/link.txt:
--------------------------------------------------------------------------------
1 | /Library/Developer/CommandLineTools/usr/bin/gcc -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/exec.dir/solution.c.o -o exec libextmem.a
2 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/exec.dir/progress.make:
--------------------------------------------------------------------------------
1 | CMAKE_PROGRESS_1 = 1
2 | CMAKE_PROGRESS_2 = 2
3 |
4 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/exec.dir/solution.c.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp5/cmake-build-debug/CMakeFiles/exec.dir/solution.c.o
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/extmem.dir/C.includecache:
--------------------------------------------------------------------------------
1 | #IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">])
2 |
3 | #IncludeRegexScan: ^.*$
4 |
5 | #IncludeRegexComplain: ^$
6 |
7 | #IncludeRegexTransform:
8 |
9 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/extmem.c
10 | stdlib.h
11 | -
12 | stdio.h
13 | -
14 | string.h
15 | -
16 | extmem.h
17 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/extmem.h
18 |
19 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/extmem.h
20 |
21 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/extmem.dir/DependInfo.cmake:
--------------------------------------------------------------------------------
1 |
2 | # Consider dependencies only in project.
3 | set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF)
4 |
5 | # The set of languages for which implicit dependencies are needed:
6 | set(CMAKE_DEPENDS_LANGUAGES
7 | "C"
8 | )
9 | # The set of files for implicit dependencies of each language:
10 | set(CMAKE_DEPENDS_CHECK_C
11 | "/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/extmem.c" "/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles/extmem.dir/extmem.c.o"
12 | )
13 | set(CMAKE_C_COMPILER_ID "AppleClang")
14 |
15 | # The include file search paths:
16 | set(CMAKE_C_TARGET_INCLUDE_PATH
17 | "../."
18 | )
19 |
20 | # The set of dependency files which are needed:
21 | set(CMAKE_DEPENDS_DEPENDENCY_FILES
22 | )
23 |
24 | # Targets to which this target links.
25 | set(CMAKE_TARGET_LINKED_INFO_FILES
26 | )
27 |
28 | # Fortran module output directory.
29 | set(CMAKE_Fortran_TARGET_MODULE_DIR "")
30 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/extmem.dir/build.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.20
3 |
4 | # Delete rule output on recipe failure.
5 | .DELETE_ON_ERROR:
6 |
7 | #=============================================================================
8 | # Special targets provided by cmake.
9 |
10 | # Disable implicit rules so canonical targets will work.
11 | .SUFFIXES:
12 |
13 | # Disable VCS-based implicit rules.
14 | % : %,v
15 |
16 | # Disable VCS-based implicit rules.
17 | % : RCS/%
18 |
19 | # Disable VCS-based implicit rules.
20 | % : RCS/%,v
21 |
22 | # Disable VCS-based implicit rules.
23 | % : SCCS/s.%
24 |
25 | # Disable VCS-based implicit rules.
26 | % : s.%
27 |
28 | .SUFFIXES: .hpux_make_needs_suffix_list
29 |
30 | # Command-line flag to silence nested $(MAKE).
31 | $(VERBOSE)MAKESILENT = -s
32 |
33 | #Suppress display of executed commands.
34 | $(VERBOSE).SILENT:
35 |
36 | # A target that is always out of date.
37 | cmake_force:
38 | .PHONY : cmake_force
39 |
40 | #=============================================================================
41 | # Set environment variables for the build.
42 |
43 | # The shell in which to execute make rules.
44 | SHELL = /bin/sh
45 |
46 | # The CMake executable.
47 | CMAKE_COMMAND = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake
48 |
49 | # The command to remove a file.
50 | RM = /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E rm -f
51 |
52 | # Escaping for special characters.
53 | EQUALS = =
54 |
55 | # The top-level source directory on which CMake was run.
56 | CMAKE_SOURCE_DIR = /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5
57 |
58 | # The top-level build directory on which CMake was run.
59 | CMAKE_BINARY_DIR = /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug
60 |
61 | # Include any dependencies generated for this target.
62 | include CMakeFiles/extmem.dir/depend.make
63 | # Include the progress variables for this target.
64 | include CMakeFiles/extmem.dir/progress.make
65 |
66 | # Include the compile flags for this target's objects.
67 | include CMakeFiles/extmem.dir/flags.make
68 |
69 | CMakeFiles/extmem.dir/extmem.c.o: CMakeFiles/extmem.dir/flags.make
70 | CMakeFiles/extmem.dir/extmem.c.o: ../extmem.c
71 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object CMakeFiles/extmem.dir/extmem.c.o"
72 | /Library/Developer/CommandLineTools/usr/bin/gcc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/extmem.dir/extmem.c.o -c /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/extmem.c
73 |
74 | CMakeFiles/extmem.dir/extmem.c.i: cmake_force
75 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/extmem.dir/extmem.c.i"
76 | /Library/Developer/CommandLineTools/usr/bin/gcc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/extmem.c > CMakeFiles/extmem.dir/extmem.c.i
77 |
78 | CMakeFiles/extmem.dir/extmem.c.s: cmake_force
79 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/extmem.dir/extmem.c.s"
80 | /Library/Developer/CommandLineTools/usr/bin/gcc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/extmem.c -o CMakeFiles/extmem.dir/extmem.c.s
81 |
82 | # Object files for target extmem
83 | extmem_OBJECTS = \
84 | "CMakeFiles/extmem.dir/extmem.c.o"
85 |
86 | # External object files for target extmem
87 | extmem_EXTERNAL_OBJECTS =
88 |
89 | libextmem.a: CMakeFiles/extmem.dir/extmem.c.o
90 | libextmem.a: CMakeFiles/extmem.dir/build.make
91 | libextmem.a: CMakeFiles/extmem.dir/link.txt
92 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking C static library libextmem.a"
93 | $(CMAKE_COMMAND) -P CMakeFiles/extmem.dir/cmake_clean_target.cmake
94 | $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/extmem.dir/link.txt --verbose=$(VERBOSE)
95 |
96 | # Rule to build all files generated by this target.
97 | CMakeFiles/extmem.dir/build: libextmem.a
98 | .PHONY : CMakeFiles/extmem.dir/build
99 |
100 | CMakeFiles/extmem.dir/clean:
101 | $(CMAKE_COMMAND) -P CMakeFiles/extmem.dir/cmake_clean.cmake
102 | .PHONY : CMakeFiles/extmem.dir/clean
103 |
104 | CMakeFiles/extmem.dir/depend:
105 | cd /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5 /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5 /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/CMakeFiles/extmem.dir/DependInfo.cmake --color=$(COLOR)
106 | .PHONY : CMakeFiles/extmem.dir/depend
107 |
108 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/extmem.dir/cmake_clean.cmake:
--------------------------------------------------------------------------------
1 | file(REMOVE_RECURSE
2 | "CMakeFiles/extmem.dir/extmem.c.o"
3 | "libextmem.a"
4 | "libextmem.pdb"
5 | )
6 |
7 | # Per-language clean rules from dependency scanning.
8 | foreach(lang C)
9 | include(CMakeFiles/extmem.dir/cmake_clean_${lang}.cmake OPTIONAL)
10 | endforeach()
11 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/extmem.dir/cmake_clean_target.cmake:
--------------------------------------------------------------------------------
1 | file(REMOVE_RECURSE
2 | "libextmem.a"
3 | )
4 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/extmem.dir/depend.internal:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.20
3 |
4 | CMakeFiles/extmem.dir/extmem.c.o
5 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/extmem.c
6 | /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/extmem.h
7 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/extmem.dir/depend.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.20
3 |
4 | CMakeFiles/extmem.dir/extmem.c.o: \
5 | ../extmem.c \
6 | ../extmem.h
7 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/extmem.dir/extmem.c.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp5/cmake-build-debug/CMakeFiles/extmem.dir/extmem.c.o
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/extmem.dir/flags.make:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.20
3 |
4 | # compile C with /Library/Developer/CommandLineTools/usr/bin/gcc
5 | C_DEFINES =
6 |
7 | C_INCLUDES = -I/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/.
8 |
9 | C_FLAGSarm64 = -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk -std=gnu99
10 |
11 | C_FLAGS = -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk -std=gnu99
12 |
13 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/extmem.dir/link.txt:
--------------------------------------------------------------------------------
1 | /Library/Developer/CommandLineTools/usr/bin/ar qc libextmem.a CMakeFiles/extmem.dir/extmem.c.o
2 | /Library/Developer/CommandLineTools/usr/bin/ranlib libextmem.a
3 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/extmem.dir/progress.make:
--------------------------------------------------------------------------------
1 | CMAKE_PROGRESS_1 = 3
2 | CMAKE_PROGRESS_2 = 4
3 |
4 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/CMakeFiles/progress.marks:
--------------------------------------------------------------------------------
1 | 4
2 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/Testing/Temporary/LastTest.log:
--------------------------------------------------------------------------------
1 | Start testing: Dec 09 19:23 CST
2 | ----------------------------------------------------------
3 | End testing: Dec 09 19:23 CST
4 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/cmake_install.cmake:
--------------------------------------------------------------------------------
1 | # Install script for directory: /Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5
2 |
3 | # Set the install prefix
4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX)
5 | set(CMAKE_INSTALL_PREFIX "/usr/local")
6 | endif()
7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
8 |
9 | # Set the install configuration name.
10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
11 | if(BUILD_TYPE)
12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
14 | else()
15 | set(CMAKE_INSTALL_CONFIG_NAME "Debug")
16 | endif()
17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
18 | endif()
19 |
20 | # Set the component getting installed.
21 | if(NOT CMAKE_INSTALL_COMPONENT)
22 | if(COMPONENT)
23 | message(STATUS "Install component: \"${COMPONENT}\"")
24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
25 | else()
26 | set(CMAKE_INSTALL_COMPONENT)
27 | endif()
28 | endif()
29 |
30 | # Is this installation the result of a crosscompile?
31 | if(NOT DEFINED CMAKE_CROSSCOMPILING)
32 | set(CMAKE_CROSSCOMPILING "FALSE")
33 | endif()
34 |
35 | # Set default install directory permissions.
36 | if(NOT DEFINED CMAKE_OBJDUMP)
37 | set(CMAKE_OBJDUMP "/Library/Developer/CommandLineTools/usr/bin/objdump")
38 | endif()
39 |
40 | if(CMAKE_INSTALL_COMPONENT)
41 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
42 | else()
43 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
44 | endif()
45 |
46 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
47 | "${CMAKE_INSTALL_MANIFEST_FILES}")
48 | file(WRITE "/Users/pinskyrobin/OneDrive/CourseMaterials/2021/DB_ex/Exp5/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}"
49 | "${CMAKE_INSTALL_MANIFEST_CONTENT}")
50 |
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/exec:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp5/cmake-build-debug/exec
--------------------------------------------------------------------------------
/Exp5/cmake-build-debug/libextmem.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp5/cmake-build-debug/libextmem.a
--------------------------------------------------------------------------------
/Exp5/data/1.blk:
--------------------------------------------------------------------------------
1 | 104 4062106 4123107 4258108 4993109 4609110 4463110 47262
--------------------------------------------------------------------------------
/Exp5/data/10.blk:
--------------------------------------------------------------------------------
1 | 122 4749123 4362125 4335125 4741126 4031126 4720128 424311
--------------------------------------------------------------------------------
/Exp5/data/100.blk:
--------------------------------------------------------------------------------
1 | 130 5202130 4208130 5083130 4371130 4983130 4180 101
--------------------------------------------------------------------------------
/Exp5/data/101.blk:
--------------------------------------------------------------------------------
1 | 130 5202130 4208130 5083130 4371130 4983130 4180134 330 102
--------------------------------------------------------------------------------
/Exp5/data/11.blk:
--------------------------------------------------------------------------------
1 | 128 4249128 4805130 4061132 4759133 4134133 4103133 485612
--------------------------------------------------------------------------------
/Exp5/data/12.blk:
--------------------------------------------------------------------------------
1 | 134 4169134 4864137 4020137 4986138 4848139 4241139 413013
--------------------------------------------------------------------------------
/Exp5/data/13.blk:
--------------------------------------------------------------------------------
1 | 100 4311100 4175100 4192102 4026102 4773102 4252105 472414
--------------------------------------------------------------------------------
/Exp5/data/14.blk:
--------------------------------------------------------------------------------
1 | 105 4152108 4275108 4036108 4505110 4992110 4221112 425015
--------------------------------------------------------------------------------
/Exp5/data/15.blk:
--------------------------------------------------------------------------------
1 | 115 4291118 4536119 4315120 4973121 4475123 4176124 424716
--------------------------------------------------------------------------------
/Exp5/data/16.blk:
--------------------------------------------------------------------------------
1 | 128 4090129 4199129 4601131 4917132 4639135 4520135 467217
--------------------------------------------------------------------------------
/Exp5/data/17.blk:
--------------------------------------------------------------------------------
1 | 120 5282120 4933120 4967121 4821122 4235124 5807124 472918
--------------------------------------------------------------------------------
/Exp5/data/18.blk:
--------------------------------------------------------------------------------
1 | 124 5115127 4166129 5900130 5202130 4208131 5977132 475919
--------------------------------------------------------------------------------
/Exp5/data/19.blk:
--------------------------------------------------------------------------------
1 | 134 5900135 5095136 4753137 4020141 5875141 4684142 446220
--------------------------------------------------------------------------------
/Exp5/data/2.blk:
--------------------------------------------------------------------------------
1 | 110 4836111 4915113 4142113 4681115 4455115 4395116 49803
--------------------------------------------------------------------------------
/Exp5/data/20.blk:
--------------------------------------------------------------------------------
1 | 142 4119143 5866143 4417143 5231144 5339144 5915146 445121
--------------------------------------------------------------------------------
/Exp5/data/200.blk:
--------------------------------------------------------------------------------
1 | 120 4373120 5282120 4347120 5282120 4973120 5282120 4373201
--------------------------------------------------------------------------------
/Exp5/data/201.blk:
--------------------------------------------------------------------------------
1 | 120 4933120 4347120 4933120 4973120 4933120 4373120 4967202
--------------------------------------------------------------------------------
/Exp5/data/202.blk:
--------------------------------------------------------------------------------
1 | 120 4347120 4967120 4973120 4967120 4373120 4257120 4347203
--------------------------------------------------------------------------------
/Exp5/data/203.blk:
--------------------------------------------------------------------------------
1 | 120 4257120 4973120 4257120 4373120 5880120 4347120 5880204
--------------------------------------------------------------------------------
/Exp5/data/204.blk:
--------------------------------------------------------------------------------
1 | 120 4973120 5880121 4087121 4821121 4184121 4821121 4697205
--------------------------------------------------------------------------------
/Exp5/data/205.blk:
--------------------------------------------------------------------------------
1 | 121 4821121 4756121 4821121 4475121 4821121 4087121 5245206
--------------------------------------------------------------------------------
/Exp5/data/206.blk:
--------------------------------------------------------------------------------
1 | 121 4184121 5245121 4697121 5245121 4756121 5245121 4475207
--------------------------------------------------------------------------------
/Exp5/data/207.blk:
--------------------------------------------------------------------------------
1 | 121 5245121 4087121 5071121 4184121 5071121 4697121 5071208
--------------------------------------------------------------------------------
/Exp5/data/208.blk:
--------------------------------------------------------------------------------
1 | 121 4756121 5071121 4475121 5071121 4087121 5098121 4184209
--------------------------------------------------------------------------------
/Exp5/data/209.blk:
--------------------------------------------------------------------------------
1 | 121 5098121 4697121 5098121 4756121 5098121 4475121 5098210
--------------------------------------------------------------------------------
/Exp5/data/21.blk:
--------------------------------------------------------------------------------
1 | 146 5709146 5607147 5596148 4161149 5843150 4533150 543822
--------------------------------------------------------------------------------
/Exp5/data/210.blk:
--------------------------------------------------------------------------------
1 | 121 4087121 4516121 4184121 4516121 4697121 4516121 4756211
--------------------------------------------------------------------------------
/Exp5/data/211.blk:
--------------------------------------------------------------------------------
1 | 121 4516121 4475121 4516122 4225122 4235122 4675122 4235212
--------------------------------------------------------------------------------
/Exp5/data/212.blk:
--------------------------------------------------------------------------------
1 | 122 4530122 4235122 4749122 4235122 4225122 4320122 4675213
--------------------------------------------------------------------------------
/Exp5/data/213.blk:
--------------------------------------------------------------------------------
1 | 122 4320122 4530122 4320122 4749122 4320122 4225122 4300214
--------------------------------------------------------------------------------
/Exp5/data/214.blk:
--------------------------------------------------------------------------------
1 | 122 4675122 4300122 4530122 4300122 4749122 4300122 4225215
--------------------------------------------------------------------------------
/Exp5/data/215.blk:
--------------------------------------------------------------------------------
1 | 122 4607122 4675122 4607122 4530122 4607122 4749122 4607216
--------------------------------------------------------------------------------
/Exp5/data/216.blk:
--------------------------------------------------------------------------------
1 | 122 4225122 4749122 4675122 4749122 4530122 4749122 4749217
--------------------------------------------------------------------------------
/Exp5/data/217.blk:
--------------------------------------------------------------------------------
1 | 122 4749123 4072123 4916123 4362123 4916123 4176123 4916218
--------------------------------------------------------------------------------
/Exp5/data/218.blk:
--------------------------------------------------------------------------------
1 | 123 4072123 5701123 4362123 5701123 4176123 5701123 4072219
--------------------------------------------------------------------------------
/Exp5/data/219.blk:
--------------------------------------------------------------------------------
1 | 123 5876123 4362123 5876123 4176123 5876123 4072123 4150220
--------------------------------------------------------------------------------
/Exp5/data/22.blk:
--------------------------------------------------------------------------------
1 | 152 5679153 5969156 4129158 4919158 4557159 4309159 500923
--------------------------------------------------------------------------------
/Exp5/data/220.blk:
--------------------------------------------------------------------------------
1 | 123 4362123 4150123 4176123 4150123 4072123 4596123 4362221
--------------------------------------------------------------------------------
/Exp5/data/221.blk:
--------------------------------------------------------------------------------
1 | 123 4596123 4176123 4596123 4072123 4362123 4362123 4362222
--------------------------------------------------------------------------------
/Exp5/data/222.blk:
--------------------------------------------------------------------------------
1 | 123 4176123 4362124 4286124 5807124 4247124 5807124 4286223
--------------------------------------------------------------------------------
/Exp5/data/223.blk:
--------------------------------------------------------------------------------
1 | 124 4729124 4247124 4729124 4286124 5115124 4247124 5115224
--------------------------------------------------------------------------------
/Exp5/data/224.blk:
--------------------------------------------------------------------------------
1 | 124 4286124 5803124 4247124 5803124 4286124 5719124 4247225
--------------------------------------------------------------------------------
/Exp5/data/225.blk:
--------------------------------------------------------------------------------
1 | 124 5719124 4286124 5154124 4247124 5154124 4286124 4937226
--------------------------------------------------------------------------------
/Exp5/data/226.blk:
--------------------------------------------------------------------------------
1 | 124 4247124 4937124 4286124 4071124 4247124 4071124 4286227
--------------------------------------------------------------------------------
/Exp5/data/227.blk:
--------------------------------------------------------------------------------
1 | 124 5826124 4247124 5826125 4764125 4450125 4533125 4450228
--------------------------------------------------------------------------------
/Exp5/data/228.blk:
--------------------------------------------------------------------------------
1 | 125 4335125 4450125 4741125 4450125 4764125 4969125 4533229
--------------------------------------------------------------------------------
/Exp5/data/229.blk:
--------------------------------------------------------------------------------
1 | 125 4969125 4335125 4969125 4741125 4969125 4764125 5257230
--------------------------------------------------------------------------------
/Exp5/data/23.blk:
--------------------------------------------------------------------------------
1 | 120 4257121 5245122 4320122 4300123 4916123 5701124 580324
--------------------------------------------------------------------------------
/Exp5/data/230.blk:
--------------------------------------------------------------------------------
1 | 125 4533125 5257125 4335125 5257125 4741125 5257125 4764231
--------------------------------------------------------------------------------
/Exp5/data/231.blk:
--------------------------------------------------------------------------------
1 | 125 5637125 4533125 5637125 4335125 5637125 4741125 5637232
--------------------------------------------------------------------------------
/Exp5/data/232.blk:
--------------------------------------------------------------------------------
1 | 125 4764125 4741125 4533125 4741125 4335125 4741125 4741233
--------------------------------------------------------------------------------
/Exp5/data/233.blk:
--------------------------------------------------------------------------------
1 | 125 4741126 4031126 4031126 4720126 4031126 4031126 4514234
--------------------------------------------------------------------------------
/Exp5/data/234.blk:
--------------------------------------------------------------------------------
1 | 126 4720126 4514126 4031126 5172126 4720126 5172126 4031235
--------------------------------------------------------------------------------
/Exp5/data/235.blk:
--------------------------------------------------------------------------------
1 | 126 4779126 4720126 4779126 4031126 4028126 4720126 4028236
--------------------------------------------------------------------------------
/Exp5/data/236.blk:
--------------------------------------------------------------------------------
1 | 126 4031126 4827126 4720126 4827126 4031126 4385126 4720237
--------------------------------------------------------------------------------
/Exp5/data/237.blk:
--------------------------------------------------------------------------------
1 | 126 4385126 4031126 4380126 4720126 4380126 4031126 4200238
--------------------------------------------------------------------------------
/Exp5/data/238.blk:
--------------------------------------------------------------------------------
1 | 126 4720126 4200126 4031126 5565126 4720126 5565126 4031239
--------------------------------------------------------------------------------
/Exp5/data/239.blk:
--------------------------------------------------------------------------------
1 | 126 5842126 4720126 5842126 4031126 5995126 4720126 5995240
--------------------------------------------------------------------------------
/Exp5/data/24.blk:
--------------------------------------------------------------------------------
1 | 125 4450126 4031126 4514126 5172126 4779127 4461128 583025
--------------------------------------------------------------------------------
/Exp5/data/240.blk:
--------------------------------------------------------------------------------
1 | 126 4031126 5650126 4720126 5650126 4031126 5320126 4720241
--------------------------------------------------------------------------------
/Exp5/data/241.blk:
--------------------------------------------------------------------------------
1 | 126 5320126 4031126 4728126 4720126 4728128 4243128 5830242
--------------------------------------------------------------------------------
/Exp5/data/242.blk:
--------------------------------------------------------------------------------
1 | 128 4249128 5830128 4805128 5830128 4090128 5830128 4243243
--------------------------------------------------------------------------------
/Exp5/data/243.blk:
--------------------------------------------------------------------------------
1 | 128 5355128 4249128 5355128 4805128 5355128 4090128 5355244
--------------------------------------------------------------------------------
/Exp5/data/244.blk:
--------------------------------------------------------------------------------
1 | 128 4243128 4249128 4249128 4249128 4805128 4249128 4090245
--------------------------------------------------------------------------------
/Exp5/data/245.blk:
--------------------------------------------------------------------------------
1 | 128 4249129 4732129 5900129 4242129 5900129 4199129 5900246
--------------------------------------------------------------------------------
/Exp5/data/246.blk:
--------------------------------------------------------------------------------
1 | 129 4601129 5900129 4732129 5078129 4242129 5078129 4199247
--------------------------------------------------------------------------------
/Exp5/data/247.blk:
--------------------------------------------------------------------------------
1 | 129 5078129 4601129 5078129 4732129 5377129 4242129 5377248
--------------------------------------------------------------------------------
/Exp5/data/248.blk:
--------------------------------------------------------------------------------
1 | 129 4199129 5377129 4601129 5377129 4732129 4130129 4242249
--------------------------------------------------------------------------------
/Exp5/data/249.blk:
--------------------------------------------------------------------------------
1 | 129 4130129 4199129 4130129 4601129 4130129 4732129 4673250
--------------------------------------------------------------------------------
/Exp5/data/25.blk:
--------------------------------------------------------------------------------
1 | 129 5078129 5377130 5083131 5735132 5345134 5710135 432726
--------------------------------------------------------------------------------
/Exp5/data/250.blk:
--------------------------------------------------------------------------------
1 | 129 4242129 4673129 4199129 4673129 4601129 4673129 4732251
--------------------------------------------------------------------------------
/Exp5/data/251.blk:
--------------------------------------------------------------------------------
1 | 129 4987129 4242129 4987129 4199129 4987129 4601129 4987252
--------------------------------------------------------------------------------
/Exp5/data/252.blk:
--------------------------------------------------------------------------------
1 | 129 4732129 5345129 4242129 5345129 4199129 5345129 4601253
--------------------------------------------------------------------------------
/Exp5/data/253.blk:
--------------------------------------------------------------------------------
1 | 129 5345130 4627130 5202130 4572130 5202130 4058130 5202254
--------------------------------------------------------------------------------
/Exp5/data/254.blk:
--------------------------------------------------------------------------------
1 | 130 4061130 5202130 4627130 4208130 4572130 4208130 4058255
--------------------------------------------------------------------------------
/Exp5/data/255.blk:
--------------------------------------------------------------------------------
1 | 130 4208130 4061130 4208130 4627130 5083130 4572130 5083256
--------------------------------------------------------------------------------
/Exp5/data/256.blk:
--------------------------------------------------------------------------------
1 | 130 4058130 5083130 4061130 5083130 4627130 4371130 4572257
--------------------------------------------------------------------------------
/Exp5/data/257.blk:
--------------------------------------------------------------------------------
1 | 130 4371130 4058130 4371130 4061130 4371130 4627130 4983258
--------------------------------------------------------------------------------
/Exp5/data/258.blk:
--------------------------------------------------------------------------------
1 | 130 4572130 4983130 4058130 4983130 4061130 4983130 4627259
--------------------------------------------------------------------------------
/Exp5/data/259.blk:
--------------------------------------------------------------------------------
1 | 130 4180130 4572130 4180130 4058130 4180130 4061130 4180260
--------------------------------------------------------------------------------
/Exp5/data/26.blk:
--------------------------------------------------------------------------------
1 | 135 5489137 4986139 4041141 4505143 4533145 5647147 566627
--------------------------------------------------------------------------------
/Exp5/data/260.blk:
--------------------------------------------------------------------------------
1 | 131 4797131 5977131 4917131 5977131 4797131 5735131 4917261
--------------------------------------------------------------------------------
/Exp5/data/261.blk:
--------------------------------------------------------------------------------
1 | 131 5735131 4797131 5516131 4917131 5516131 4797131 5934262
--------------------------------------------------------------------------------
/Exp5/data/262.blk:
--------------------------------------------------------------------------------
1 | 131 4917131 5934131 4797131 4802131 4917131 4802131 4797263
--------------------------------------------------------------------------------
/Exp5/data/263.blk:
--------------------------------------------------------------------------------
1 | 131 4444131 4917131 4444131 4797131 4567131 4917131 4567264
--------------------------------------------------------------------------------
/Exp5/data/264.blk:
--------------------------------------------------------------------------------
1 | 132 4539132 4759132 4759132 4759132 4639132 4759132 4539265
--------------------------------------------------------------------------------
/Exp5/data/265.blk:
--------------------------------------------------------------------------------
1 | 132 5345132 4759132 5345132 4639132 5345132 4539132 4193266
--------------------------------------------------------------------------------
/Exp5/data/266.blk:
--------------------------------------------------------------------------------
1 | 132 4759132 4193132 4639132 4193132 4539132 4037132 4759267
--------------------------------------------------------------------------------
/Exp5/data/267.blk:
--------------------------------------------------------------------------------
1 | 132 4037132 4639132 4037132 4539132 4383132 4759132 4383268
--------------------------------------------------------------------------------
/Exp5/data/268.blk:
--------------------------------------------------------------------------------
1 | 132 4639132 4383132 4539132 4206132 4759132 4206132 4639269
--------------------------------------------------------------------------------
/Exp5/data/269.blk:
--------------------------------------------------------------------------------
1 | 132 4206133 4925133 5711133 4134133 5711133 4103133 5711270
--------------------------------------------------------------------------------
/Exp5/data/27.blk:
--------------------------------------------------------------------------------
1 | 149 4650149 5727149 4925149 4165150 5708150 5112151 580928
--------------------------------------------------------------------------------
/Exp5/data/270.blk:
--------------------------------------------------------------------------------
1 | 133 4856133 5711133 4925133 4214133 4134133 4214133 4103271
--------------------------------------------------------------------------------
/Exp5/data/271.blk:
--------------------------------------------------------------------------------
1 | 133 4214133 4856133 4214134 4169134 5900134 4864134 5900272
--------------------------------------------------------------------------------
/Exp5/data/272.blk:
--------------------------------------------------------------------------------
1 | 134 4169134 5710134 4864134 5710134 4169134 4864134 4864273
--------------------------------------------------------------------------------
/Exp5/data/273.blk:
--------------------------------------------------------------------------------
1 | 134 4864134 4169134 4380134 4864134 4380134 4169134 5524274
--------------------------------------------------------------------------------
/Exp5/data/274.blk:
--------------------------------------------------------------------------------
1 | 134 4864134 5524134 4169134 4934134 4864134 4934134 4169275
--------------------------------------------------------------------------------
/Exp5/data/275.blk:
--------------------------------------------------------------------------------
1 | 134 5404134 4864134 5404135 4652135 5095135 4520135 5095276
--------------------------------------------------------------------------------
/Exp5/data/276.blk:
--------------------------------------------------------------------------------
1 | 135 4672135 5095135 4652135 4327135 4520135 4327135 4672277
--------------------------------------------------------------------------------
/Exp5/data/277.blk:
--------------------------------------------------------------------------------
1 | 135 4327135 4652135 5489135 4520135 5489135 4672135 5489278
--------------------------------------------------------------------------------
/Exp5/data/278.blk:
--------------------------------------------------------------------------------
1 | 135 4652135 5919135 4520135 5919135 4672135 5919135 4652279
--------------------------------------------------------------------------------
/Exp5/data/279.blk:
--------------------------------------------------------------------------------
1 | 135 4541135 4520135 4541135 4672135 4541135 4652135 5013280
--------------------------------------------------------------------------------
/Exp5/data/28.blk:
--------------------------------------------------------------------------------
1 | 154 4202154 4438154 4879154 5544155 4893155 4517156 530829
--------------------------------------------------------------------------------
/Exp5/data/280.blk:
--------------------------------------------------------------------------------
1 | 135 4520135 5013135 4672135 5013135 4652135 5557135 4520281
--------------------------------------------------------------------------------
/Exp5/data/281.blk:
--------------------------------------------------------------------------------
1 | 135 5557135 4672135 5557135 4652135 4782135 4520135 4782282
--------------------------------------------------------------------------------
/Exp5/data/282.blk:
--------------------------------------------------------------------------------
1 | 135 4672135 4782137 4020137 4020137 4986137 4020137 4020283
--------------------------------------------------------------------------------
/Exp5/data/283.blk:
--------------------------------------------------------------------------------
1 | 137 4986137 4986137 4986137 4020137 5623137 4986137 5623284
--------------------------------------------------------------------------------
/Exp5/data/284.blk:
--------------------------------------------------------------------------------
1 | 137 4020137 4364137 4986137 4364138 4848138 5706138 4848285
--------------------------------------------------------------------------------
/Exp5/data/285.blk:
--------------------------------------------------------------------------------
1 | 138 5328138 4848138 5731138 4848138 4371138 4848138 5573286
--------------------------------------------------------------------------------
/Exp5/data/286.blk:
--------------------------------------------------------------------------------
1 | 138 4848138 5699138 4848138 5978139 4730139 4041139 4355287
--------------------------------------------------------------------------------
/Exp5/data/287.blk:
--------------------------------------------------------------------------------
1 | 139 4041139 4241139 4041139 4130139 4041139 4730139 4448288
--------------------------------------------------------------------------------
/Exp5/data/288.blk:
--------------------------------------------------------------------------------
1 | 139 4355139 4448139 4241139 4448139 4130139 4448139 4730289
--------------------------------------------------------------------------------
/Exp5/data/289.blk:
--------------------------------------------------------------------------------
1 | 139 4071139 4355139 4071139 4241139 4071139 4130139 4071290
--------------------------------------------------------------------------------
/Exp5/data/29.blk:
--------------------------------------------------------------------------------
1 | 120 5880121 5071123 5876124 5719125 4969125 5257126 402830
--------------------------------------------------------------------------------
/Exp5/data/290.blk:
--------------------------------------------------------------------------------
1 | 139 4730139 5456139 4355139 5456139 4241139 5456139 4130291
--------------------------------------------------------------------------------
/Exp5/data/291.blk:
--------------------------------------------------------------------------------
1 | 139 5456139 4730139 5314139 4355139 5314139 4241139 5314292
--------------------------------------------------------------------------------
/Exp5/data/292.blk:
--------------------------------------------------------------------------------
1 | 139 4130139 5314139 4730139 5530139 4355139 5530139 4241293
--------------------------------------------------------------------------------
/Exp5/data/293.blk:
--------------------------------------------------------------------------------
1 | 139 5530139 4130139 5530139 4730139 5670139 4355139 5670294
--------------------------------------------------------------------------------
/Exp5/data/294.blk:
--------------------------------------------------------------------------------
1 | 139 4241139 5670139 4130139 5670139 4730139 5737139 4355295
--------------------------------------------------------------------------------
/Exp5/data/295.blk:
--------------------------------------------------------------------------------
1 | 139 5737139 4241139 5737139 4130139 5737139 4730139 4443296
--------------------------------------------------------------------------------
/Exp5/data/296.blk:
--------------------------------------------------------------------------------
1 | 139 4355139 4443139 4241139 4443139 4130139 4443139 4730297
--------------------------------------------------------------------------------
/Exp5/data/297.blk:
--------------------------------------------------------------------------------
1 | 139 5379139 4355139 5379139 4241139 5379139 4130139 5379298
--------------------------------------------------------------------------------
/Exp5/data/298.blk:
--------------------------------------------------------------------------------
1 | 139 4730139 5829139 4355139 5829139 4241139 5829139 4130299
--------------------------------------------------------------------------------
/Exp5/data/299.blk:
--------------------------------------------------------------------------------
1 | 139 5829 300
--------------------------------------------------------------------------------
/Exp5/data/3.blk:
--------------------------------------------------------------------------------
1 | 116 4069116 4813116 4953117 4477117 4156118 4688120 43734
--------------------------------------------------------------------------------
/Exp5/data/30.blk:
--------------------------------------------------------------------------------
1 | 126 4827126 4385127 5211129 4130129 4673131 5516131 593431
--------------------------------------------------------------------------------
/Exp5/data/301.blk:
--------------------------------------------------------------------------------
1 | 100 4588100 4311100 4175100 4192101 4305101 4478102 4026302
--------------------------------------------------------------------------------
/Exp5/data/302.blk:
--------------------------------------------------------------------------------
1 | 102 4773102 4252104 4062104 4008105 4269105 4000105 4724303
--------------------------------------------------------------------------------
/Exp5/data/303.blk:
--------------------------------------------------------------------------------
1 | 105 4152106 4123107 4258107 4472107 4540108 4993108 4680304
--------------------------------------------------------------------------------
/Exp5/data/304.blk:
--------------------------------------------------------------------------------
1 | 108 4275108 4036108 4505109 4609109 4189109 4533109 4206305
--------------------------------------------------------------------------------
/Exp5/data/305.blk:
--------------------------------------------------------------------------------
1 | 110 4463110 4726110 4836110 4992110 4221111 4915112 4250306
--------------------------------------------------------------------------------
/Exp5/data/306.blk:
--------------------------------------------------------------------------------
1 | 113 4142113 4681113 4725114 4279115 4455115 4395115 4365307
--------------------------------------------------------------------------------
/Exp5/data/307.blk:
--------------------------------------------------------------------------------
1 | 115 4291116 4980116 4069116 4813116 4953116 4910117 4477308
--------------------------------------------------------------------------------
/Exp5/data/308.blk:
--------------------------------------------------------------------------------
1 | 117 4156118 4688118 4736118 4536119 4392119 4290119 4315309
--------------------------------------------------------------------------------
/Exp5/data/309.blk:
--------------------------------------------------------------------------------
1 | 120 4373120 4347120 4973121 4087121 4184121 4697121 4756310
--------------------------------------------------------------------------------
/Exp5/data/31.blk:
--------------------------------------------------------------------------------
1 | 131 4802131 4444132 4193132 4037134 4864134 4380135 591932
--------------------------------------------------------------------------------
/Exp5/data/310.blk:
--------------------------------------------------------------------------------
1 | 121 4475122 4225122 4675122 4530122 4749123 4072123 4362311
--------------------------------------------------------------------------------
/Exp5/data/311.blk:
--------------------------------------------------------------------------------
1 | 123 4176124 4286124 4247125 4764125 4533125 4335125 4741312
--------------------------------------------------------------------------------
/Exp5/data/312.blk:
--------------------------------------------------------------------------------
1 | 126 4031126 4720128 4243128 4249128 4805128 4090129 4732313
--------------------------------------------------------------------------------
/Exp5/data/313.blk:
--------------------------------------------------------------------------------
1 | 129 4242129 4199129 4601130 4627130 4572130 4058130 4061314
--------------------------------------------------------------------------------
/Exp5/data/314.blk:
--------------------------------------------------------------------------------
1 | 131 4797131 4917132 4539132 4759132 4639133 4925133 4134315
--------------------------------------------------------------------------------
/Exp5/data/315.blk:
--------------------------------------------------------------------------------
1 | 133 4103133 4856134 4169134 4864135 4652135 4520135 4672316
--------------------------------------------------------------------------------
/Exp5/data/316.blk:
--------------------------------------------------------------------------------
1 | 137 4020137 4986138 4848139 4730139 4355139 4241139 4130317
--------------------------------------------------------------------------------
/Exp5/data/317.blk:
--------------------------------------------------------------------------------
1 | 120 5282120 4933120 4967120 4257120 5880121 4821121 5245318
--------------------------------------------------------------------------------
/Exp5/data/318.blk:
--------------------------------------------------------------------------------
1 | 121 5071121 5098121 4516122 4235122 4320122 4300122 4607319
--------------------------------------------------------------------------------
/Exp5/data/319.blk:
--------------------------------------------------------------------------------
1 | 122 4749123 4916123 5701123 5876123 4150123 4596123 4362320
--------------------------------------------------------------------------------
/Exp5/data/32.blk:
--------------------------------------------------------------------------------
1 | 135 4541135 5013137 5623138 5706138 5328138 5731139 444833
--------------------------------------------------------------------------------
/Exp5/data/320.blk:
--------------------------------------------------------------------------------
1 | 124 5807124 4729124 5115124 5803124 5719124 5154124 4937321
--------------------------------------------------------------------------------
/Exp5/data/321.blk:
--------------------------------------------------------------------------------
1 | 124 4071124 5826125 4450125 4969125 5257125 5637125 4741322
--------------------------------------------------------------------------------
/Exp5/data/322.blk:
--------------------------------------------------------------------------------
1 | 126 4031126 4514126 5172126 4779126 4028126 4827126 4385323
--------------------------------------------------------------------------------
/Exp5/data/323.blk:
--------------------------------------------------------------------------------
1 | 126 4380126 4200126 5565126 5842126 5995126 5650126 5320324
--------------------------------------------------------------------------------
/Exp5/data/324.blk:
--------------------------------------------------------------------------------
1 | 126 4728127 4166127 4461127 5211127 5920127 4071127 5163325
--------------------------------------------------------------------------------
/Exp5/data/325.blk:
--------------------------------------------------------------------------------
1 | 127 4144127 5462128 5830128 5355128 4249129 5900129 5078326
--------------------------------------------------------------------------------
/Exp5/data/326.blk:
--------------------------------------------------------------------------------
1 | 129 5377129 4130129 4673129 4987129 5345130 5202130 4208327
--------------------------------------------------------------------------------
/Exp5/data/327.blk:
--------------------------------------------------------------------------------
1 | 130 5083130 4371130 4983130 4180131 5977131 5735131 5516328
--------------------------------------------------------------------------------
/Exp5/data/328.blk:
--------------------------------------------------------------------------------
1 | 131 5934131 4802131 4444131 4567132 4759132 5345132 4193329
--------------------------------------------------------------------------------
/Exp5/data/329.blk:
--------------------------------------------------------------------------------
1 | 132 4037132 4383132 4206133 5711133 4214134 5900134 5710330
--------------------------------------------------------------------------------
/Exp5/data/33.blk:
--------------------------------------------------------------------------------
1 | 139 4071140 5437143 4317143 4430146 4703147 4027148 457134
--------------------------------------------------------------------------------
/Exp5/data/330.blk:
--------------------------------------------------------------------------------
1 | 134 4864134 4380134 5524134 4934134 5404135 5095135 4327331
--------------------------------------------------------------------------------
/Exp5/data/331.blk:
--------------------------------------------------------------------------------
1 | 135 5489135 5919135 4541135 5013135 5557135 4782136 4753332
--------------------------------------------------------------------------------
/Exp5/data/332.blk:
--------------------------------------------------------------------------------
1 | 137 4020137 4986137 5623137 4364138 5706138 5328138 5731333
--------------------------------------------------------------------------------
/Exp5/data/333.blk:
--------------------------------------------------------------------------------
1 | 138 4371138 5573138 5699138 5978139 4041139 4448139 4071334
--------------------------------------------------------------------------------
/Exp5/data/334.blk:
--------------------------------------------------------------------------------
1 | 139 5456139 5314139 5530139 5670139 5737139 4443139 5379335
--------------------------------------------------------------------------------
/Exp5/data/335.blk:
--------------------------------------------------------------------------------
1 | 139 5829140 5437141 5875141 4684141 4505141 4782141 5921336
--------------------------------------------------------------------------------
/Exp5/data/336.blk:
--------------------------------------------------------------------------------
1 | 141 4186141 5234142 4462142 4119142 5761142 5521143 5866337
--------------------------------------------------------------------------------
/Exp5/data/337.blk:
--------------------------------------------------------------------------------
1 | 143 4417143 5231143 4533143 4317143 4430143 4870143 5901338
--------------------------------------------------------------------------------
/Exp5/data/338.blk:
--------------------------------------------------------------------------------
1 | 144 5339144 5915144 4272144 4790144 5254145 5647145 5077339
--------------------------------------------------------------------------------
/Exp5/data/339.blk:
--------------------------------------------------------------------------------
1 | 145 5913145 4706145 5200145 4579146 4451146 5709146 5607340
--------------------------------------------------------------------------------
/Exp5/data/34.blk:
--------------------------------------------------------------------------------
1 | 149 4663151 4735152 4524153 4320157 4064157 5903158 416835
--------------------------------------------------------------------------------
/Exp5/data/340.blk:
--------------------------------------------------------------------------------
1 | 146 4703146 5338146 5827146 5786146 4574147 5596147 5666341
--------------------------------------------------------------------------------
/Exp5/data/341.blk:
--------------------------------------------------------------------------------
1 | 147 4027147 5516147 4960147 4180148 4161148 4571148 5066342
--------------------------------------------------------------------------------
/Exp5/data/342.blk:
--------------------------------------------------------------------------------
1 | 149 5843149 4650149 5727149 4925149 4165149 4663149 4287343
--------------------------------------------------------------------------------
/Exp5/data/343.blk:
--------------------------------------------------------------------------------
1 | 149 4301149 4784150 4533150 5438150 5708150 5112150 4482344
--------------------------------------------------------------------------------
/Exp5/data/344.blk:
--------------------------------------------------------------------------------
1 | 151 5809151 4735151 4060151 4488152 5679152 4524153 5969345
--------------------------------------------------------------------------------
/Exp5/data/345.blk:
--------------------------------------------------------------------------------
1 | 153 4320154 4202154 4438154 4879154 5544154 5457155 4893346
--------------------------------------------------------------------------------
/Exp5/data/346.blk:
--------------------------------------------------------------------------------
1 | 155 4517155 5605155 4837156 4129156 5308156 5410157 4064347
--------------------------------------------------------------------------------
/Exp5/data/347.blk:
--------------------------------------------------------------------------------
1 | 157 5903157 5515158 4919158 4557158 4168158 4663158 5650348
--------------------------------------------------------------------------------
/Exp5/data/348.blk:
--------------------------------------------------------------------------------
1 | 159 4309159 5009159 4682159 4983159 5501159 5140159 4904349
--------------------------------------------------------------------------------
/Exp5/data/35.blk:
--------------------------------------------------------------------------------
1 | 123 4150124 5154126 4380126 4200127 5920129 4987130 437136
--------------------------------------------------------------------------------
/Exp5/data/350.blk:
--------------------------------------------------------------------------------
1 | 120 317 121 318 122 319 124 320 124 321 126 322 126 323 351
--------------------------------------------------------------------------------
/Exp5/data/351.blk:
--------------------------------------------------------------------------------
1 | 126 324 127 325 129 326 130 327 131 328 132 329 134 330 352
--------------------------------------------------------------------------------
/Exp5/data/352.blk:
--------------------------------------------------------------------------------
1 | 135 331 137 332 138 333 139 334 139 335 141 336 143 337 353
--------------------------------------------------------------------------------
/Exp5/data/353.blk:
--------------------------------------------------------------------------------
1 | 144 338 145 339 146 340 147 341 149 342 149 343 151 344 354
--------------------------------------------------------------------------------
/Exp5/data/354.blk:
--------------------------------------------------------------------------------
1 | 153 345 155 346 157 347 159 348 355
--------------------------------------------------------------------------------
/Exp5/data/36.blk:
--------------------------------------------------------------------------------
1 | 130 4983131 4567132 4383133 5711134 5524138 4371138 557337
--------------------------------------------------------------------------------
/Exp5/data/37.blk:
--------------------------------------------------------------------------------
1 | 138 5699139 5456139 5314139 5530139 5670139 5737141 478238
--------------------------------------------------------------------------------
/Exp5/data/38.blk:
--------------------------------------------------------------------------------
1 | 141 5921141 4186142 5761143 4870144 4272145 5077146 533839
--------------------------------------------------------------------------------
/Exp5/data/39.blk:
--------------------------------------------------------------------------------
1 | 146 5827147 5516149 4287149 4301151 4060151 4488154 545740
--------------------------------------------------------------------------------
/Exp5/data/4.blk:
--------------------------------------------------------------------------------
1 | 121 4087121 4184121 4697122 4225122 4675122 4530123 40725
--------------------------------------------------------------------------------
/Exp5/data/40.blk:
--------------------------------------------------------------------------------
1 | 155 5605155 4837156 5410157 5515158 4663159 4682159 498341
--------------------------------------------------------------------------------
/Exp5/data/400.blk:
--------------------------------------------------------------------------------
1 | 122 4749123 4362125 4741126 4031128 4249132 4759134 4864401
--------------------------------------------------------------------------------
/Exp5/data/401.blk:
--------------------------------------------------------------------------------
1 | 137 4020137 4986 402
--------------------------------------------------------------------------------
/Exp5/data/41.blk:
--------------------------------------------------------------------------------
1 | 121 5098121 4516122 4607122 4749123 4596123 4362124 493742
--------------------------------------------------------------------------------
/Exp5/data/42.blk:
--------------------------------------------------------------------------------
1 | 125 5637126 5565126 5842126 5995126 5650126 5320127 407143
--------------------------------------------------------------------------------
/Exp5/data/43.blk:
--------------------------------------------------------------------------------
1 | 127 5163127 4144127 5462128 5355128 4249130 4180133 421444
--------------------------------------------------------------------------------
/Exp5/data/44.blk:
--------------------------------------------------------------------------------
1 | 135 5557135 4782137 4364138 5978139 4443141 5234142 552145
--------------------------------------------------------------------------------
/Exp5/data/45.blk:
--------------------------------------------------------------------------------
1 | 143 5901144 4790144 5254145 5913145 4706145 5200146 578646
--------------------------------------------------------------------------------
/Exp5/data/46.blk:
--------------------------------------------------------------------------------
1 | 147 4960147 4180150 4482158 5650159 5501159 5140159 490447
--------------------------------------------------------------------------------
/Exp5/data/47.blk:
--------------------------------------------------------------------------------
1 | 124 4071124 5826125 4741126 4728129 5345132 4206134 493448
--------------------------------------------------------------------------------
/Exp5/data/48.blk:
--------------------------------------------------------------------------------
1 | 134 5404139 5379139 5829145 4579146 4574148 5066149 478449
--------------------------------------------------------------------------------
/Exp5/data/5.blk:
--------------------------------------------------------------------------------
1 | 124 4286125 4764125 4533129 4732129 4242130 4627130 45726
--------------------------------------------------------------------------------
/Exp5/data/500.blk:
--------------------------------------------------------------------------------
1 | 100 4588100 4311100 4175100 4192101 4305101 4478102 4026501
--------------------------------------------------------------------------------
/Exp5/data/501.blk:
--------------------------------------------------------------------------------
1 | 102 4773102 4252104 4062104 4008105 4269105 4000105 4724502
--------------------------------------------------------------------------------
/Exp5/data/502.blk:
--------------------------------------------------------------------------------
1 | 105 4152106 4123107 4258107 4472107 4540108 4993108 4680503
--------------------------------------------------------------------------------
/Exp5/data/503.blk:
--------------------------------------------------------------------------------
1 | 108 4275108 4036108 4505109 4609109 4189109 4533109 4206504
--------------------------------------------------------------------------------
/Exp5/data/504.blk:
--------------------------------------------------------------------------------
1 | 110 4463110 4726110 4836110 4992110 4221111 4915112 4250505
--------------------------------------------------------------------------------
/Exp5/data/505.blk:
--------------------------------------------------------------------------------
1 | 113 4142113 4681113 4725114 4279115 4455115 4395115 4365506
--------------------------------------------------------------------------------
/Exp5/data/506.blk:
--------------------------------------------------------------------------------
1 | 115 4291116 4980116 4069116 4813116 4953116 4910117 4477507
--------------------------------------------------------------------------------
/Exp5/data/507.blk:
--------------------------------------------------------------------------------
1 | 117 4156118 4688118 4736118 4536119 4392119 4290119 4315508
--------------------------------------------------------------------------------
/Exp5/data/508.blk:
--------------------------------------------------------------------------------
1 | 120 4373120 4347120 4973120 5282120 4933120 4967120 4257509
--------------------------------------------------------------------------------
/Exp5/data/509.blk:
--------------------------------------------------------------------------------
1 | 120 5880121 4087121 4184121 4697121 4756121 4475121 4821510
--------------------------------------------------------------------------------
/Exp5/data/510.blk:
--------------------------------------------------------------------------------
1 | 121 5245121 5071121 5098121 4516122 4225122 4675122 4530511
--------------------------------------------------------------------------------
/Exp5/data/511.blk:
--------------------------------------------------------------------------------
1 | 122 4749122 4235122 4320122 4300122 4607123 4072123 4362512
--------------------------------------------------------------------------------
/Exp5/data/512.blk:
--------------------------------------------------------------------------------
1 | 123 4176123 4916123 5701123 5876123 4150123 4596124 4286513
--------------------------------------------------------------------------------
/Exp5/data/513.blk:
--------------------------------------------------------------------------------
1 | 124 4247124 5807124 4729124 5115124 5803124 5719124 5154514
--------------------------------------------------------------------------------
/Exp5/data/514.blk:
--------------------------------------------------------------------------------
1 | 124 4937124 4071124 5826125 4764125 4533125 4335125 4741515
--------------------------------------------------------------------------------
/Exp5/data/515.blk:
--------------------------------------------------------------------------------
1 | 125 4450125 4969125 5257125 5637126 4720126 4031126 4514516
--------------------------------------------------------------------------------
/Exp5/data/516.blk:
--------------------------------------------------------------------------------
1 | 126 5172126 4779126 4028126 4827126 4385126 4380126 4200517
--------------------------------------------------------------------------------
/Exp5/data/517.blk:
--------------------------------------------------------------------------------
1 | 126 5565126 5842126 5995126 5650126 5320126 4728127 4166518
--------------------------------------------------------------------------------
/Exp5/data/518.blk:
--------------------------------------------------------------------------------
1 | 127 4461127 5211127 5920127 4071127 5163127 4144127 5462519
--------------------------------------------------------------------------------
/Exp5/data/519.blk:
--------------------------------------------------------------------------------
1 | 128 4243128 4249128 4805128 4090128 5830128 5355129 4732520
--------------------------------------------------------------------------------
/Exp5/data/520.blk:
--------------------------------------------------------------------------------
1 | 129 4242129 4199129 4601129 5900129 5078129 5377129 4130521
--------------------------------------------------------------------------------
/Exp5/data/521.blk:
--------------------------------------------------------------------------------
1 | 129 4673129 4987129 5345130 4627130 4572130 4058130 4061522
--------------------------------------------------------------------------------
/Exp5/data/522.blk:
--------------------------------------------------------------------------------
1 | 130 5202130 4208130 5083130 4371130 4983130 4180131 4797523
--------------------------------------------------------------------------------
/Exp5/data/523.blk:
--------------------------------------------------------------------------------
1 | 131 4917131 5977131 5735131 5516131 5934131 4802131 4444524
--------------------------------------------------------------------------------
/Exp5/data/524.blk:
--------------------------------------------------------------------------------
1 | 131 4567132 4539132 4639132 4759132 5345132 4193132 4037525
--------------------------------------------------------------------------------
/Exp5/data/525.blk:
--------------------------------------------------------------------------------
1 | 132 4383132 4206133 4925133 4134133 4103133 4856133 5711526
--------------------------------------------------------------------------------
/Exp5/data/526.blk:
--------------------------------------------------------------------------------
1 | 133 4214134 4169134 4864134 5900134 5710134 4380134 5524527
--------------------------------------------------------------------------------
/Exp5/data/527.blk:
--------------------------------------------------------------------------------
1 | 134 4934134 5404135 4652135 4520135 4672135 5095135 4327528
--------------------------------------------------------------------------------
/Exp5/data/528.blk:
--------------------------------------------------------------------------------
1 | 135 5489135 5919135 4541135 5013135 5557135 4782136 4753529
--------------------------------------------------------------------------------
/Exp5/data/529.blk:
--------------------------------------------------------------------------------
1 | 137 4986137 4020137 5623137 4364138 4848138 5706138 5328530
--------------------------------------------------------------------------------
/Exp5/data/530.blk:
--------------------------------------------------------------------------------
1 | 138 5731138 4371138 5573138 5699138 5978139 4730139 4355531
--------------------------------------------------------------------------------
/Exp5/data/531.blk:
--------------------------------------------------------------------------------
1 | 139 4241139 4130139 4041139 4448139 4071139 5456139 5314532
--------------------------------------------------------------------------------
/Exp5/data/532.blk:
--------------------------------------------------------------------------------
1 | 139 5530139 5670139 5737139 4443139 5379139 5829140 5437533
--------------------------------------------------------------------------------
/Exp5/data/533.blk:
--------------------------------------------------------------------------------
1 | 141 5875141 4684141 4505141 4782141 5921141 4186141 5234534
--------------------------------------------------------------------------------
/Exp5/data/534.blk:
--------------------------------------------------------------------------------
1 | 142 4462142 4119142 5761142 5521143 5866143 4417143 5231535
--------------------------------------------------------------------------------
/Exp5/data/535.blk:
--------------------------------------------------------------------------------
1 | 143 4533143 4317143 4430143 4870143 5901144 5339144 5915536
--------------------------------------------------------------------------------
/Exp5/data/536.blk:
--------------------------------------------------------------------------------
1 | 144 4272144 4790144 5254145 5647145 5077145 5913145 4706537
--------------------------------------------------------------------------------
/Exp5/data/537.blk:
--------------------------------------------------------------------------------
1 | 145 5200145 4579146 4451146 5709146 5607146 4703146 5338538
--------------------------------------------------------------------------------
/Exp5/data/538.blk:
--------------------------------------------------------------------------------
1 | 146 5827146 5786146 4574147 5596147 5666147 4027147 5516539
--------------------------------------------------------------------------------
/Exp5/data/539.blk:
--------------------------------------------------------------------------------
1 | 147 4960147 4180148 4161148 4571148 5066149 5843149 4650540
--------------------------------------------------------------------------------
/Exp5/data/540.blk:
--------------------------------------------------------------------------------
1 | 149 5727149 4925149 4165149 4663149 4287149 4301149 4784541
--------------------------------------------------------------------------------
/Exp5/data/541.blk:
--------------------------------------------------------------------------------
1 | 150 4533150 5438150 5708150 5112150 4482151 5809151 4735542
--------------------------------------------------------------------------------
/Exp5/data/542.blk:
--------------------------------------------------------------------------------
1 | 151 4060151 4488152 5679152 4524153 5969153 4320154 4202543
--------------------------------------------------------------------------------
/Exp5/data/543.blk:
--------------------------------------------------------------------------------
1 | 154 4438154 4879154 5544154 5457155 4893155 4517155 5605544
--------------------------------------------------------------------------------
/Exp5/data/544.blk:
--------------------------------------------------------------------------------
1 | 155 4837156 4129156 5308156 5410157 4064157 5903157 5515545
--------------------------------------------------------------------------------
/Exp5/data/545.blk:
--------------------------------------------------------------------------------
1 | 158 4919158 4557158 4168158 4663158 5650159 4309159 5009546
--------------------------------------------------------------------------------
/Exp5/data/546.blk:
--------------------------------------------------------------------------------
1 | 159 4682159 4983159 5501159 5140159 4904 547
--------------------------------------------------------------------------------
/Exp5/data/6.blk:
--------------------------------------------------------------------------------
1 | 130 4058131 4797132 4539133 4925135 4652139 4730139 43557
--------------------------------------------------------------------------------
/Exp5/data/600.blk:
--------------------------------------------------------------------------------
1 | 120 5282120 4933120 4967120 4257120 5880121 4821121 5245601
--------------------------------------------------------------------------------
/Exp5/data/601.blk:
--------------------------------------------------------------------------------
1 | 121 5071121 5098121 4516122 4235122 4320122 4300122 4607602
--------------------------------------------------------------------------------
/Exp5/data/602.blk:
--------------------------------------------------------------------------------
1 | 123 4916123 5701123 5876123 4150123 4596124 5807124 4729603
--------------------------------------------------------------------------------
/Exp5/data/603.blk:
--------------------------------------------------------------------------------
1 | 124 5115124 5803124 5719124 5154124 4937124 4071124 5826604
--------------------------------------------------------------------------------
/Exp5/data/604.blk:
--------------------------------------------------------------------------------
1 | 125 4450125 4969125 5257125 5637126 4514126 5172126 4779605
--------------------------------------------------------------------------------
/Exp5/data/605.blk:
--------------------------------------------------------------------------------
1 | 126 4028126 4827126 4385126 4380126 4200126 5565126 5842606
--------------------------------------------------------------------------------
/Exp5/data/606.blk:
--------------------------------------------------------------------------------
1 | 126 5995126 5650126 5320126 4728127 4166127 4461127 5211607
--------------------------------------------------------------------------------
/Exp5/data/607.blk:
--------------------------------------------------------------------------------
1 | 127 5920127 4071127 5163127 4144127 5462128 5830128 5355608
--------------------------------------------------------------------------------
/Exp5/data/608.blk:
--------------------------------------------------------------------------------
1 | 129 5900129 5078129 5377129 4130129 4673129 4987129 5345609
--------------------------------------------------------------------------------
/Exp5/data/609.blk:
--------------------------------------------------------------------------------
1 | 130 5202130 4208130 5083130 4371130 4983130 4180131 5977610
--------------------------------------------------------------------------------
/Exp5/data/610.blk:
--------------------------------------------------------------------------------
1 | 131 5735131 5516131 5934131 4802131 4444131 4567132 5345611
--------------------------------------------------------------------------------
/Exp5/data/611.blk:
--------------------------------------------------------------------------------
1 | 132 4193132 4037132 4383132 4206133 5711133 4214134 5900612
--------------------------------------------------------------------------------
/Exp5/data/612.blk:
--------------------------------------------------------------------------------
1 | 134 5710134 4380134 5524134 4934134 5404135 5095135 4327613
--------------------------------------------------------------------------------
/Exp5/data/613.blk:
--------------------------------------------------------------------------------
1 | 135 5489135 5919135 4541135 5013135 5557135 4782136 4753614
--------------------------------------------------------------------------------
/Exp5/data/614.blk:
--------------------------------------------------------------------------------
1 | 137 5623137 4364138 5706138 5328138 5731138 4371138 5573615
--------------------------------------------------------------------------------
/Exp5/data/615.blk:
--------------------------------------------------------------------------------
1 | 138 5699138 5978139 4041139 4448139 4071139 5456139 5314616
--------------------------------------------------------------------------------
/Exp5/data/616.blk:
--------------------------------------------------------------------------------
1 | 139 5530139 5670139 5737139 4443139 5379139 5829140 5437617
--------------------------------------------------------------------------------
/Exp5/data/617.blk:
--------------------------------------------------------------------------------
1 | 141 5875141 4684141 4505141 4782141 5921141 4186141 5234618
--------------------------------------------------------------------------------
/Exp5/data/618.blk:
--------------------------------------------------------------------------------
1 | 142 4462142 4119142 5761142 5521143 5866143 4417143 5231619
--------------------------------------------------------------------------------
/Exp5/data/619.blk:
--------------------------------------------------------------------------------
1 | 143 4533143 4317143 4430143 4870143 5901144 5339144 5915620
--------------------------------------------------------------------------------
/Exp5/data/620.blk:
--------------------------------------------------------------------------------
1 | 144 4272144 4790144 5254145 5647145 5077145 5913145 4706621
--------------------------------------------------------------------------------
/Exp5/data/621.blk:
--------------------------------------------------------------------------------
1 | 145 5200145 4579146 4451146 5709146 5607146 4703146 5338622
--------------------------------------------------------------------------------
/Exp5/data/622.blk:
--------------------------------------------------------------------------------
1 | 146 5827146 5786146 4574147 5596147 5666147 4027147 5516623
--------------------------------------------------------------------------------
/Exp5/data/623.blk:
--------------------------------------------------------------------------------
1 | 147 4960147 4180148 4161148 4571148 5066149 5843149 4650624
--------------------------------------------------------------------------------
/Exp5/data/624.blk:
--------------------------------------------------------------------------------
1 | 149 5727149 4925149 4165149 4663149 4287149 4301149 4784625
--------------------------------------------------------------------------------
/Exp5/data/625.blk:
--------------------------------------------------------------------------------
1 | 150 4533150 5438150 5708150 5112150 4482151 5809151 4735626
--------------------------------------------------------------------------------
/Exp5/data/626.blk:
--------------------------------------------------------------------------------
1 | 151 4060151 4488152 5679152 4524153 5969153 4320154 4202627
--------------------------------------------------------------------------------
/Exp5/data/627.blk:
--------------------------------------------------------------------------------
1 | 154 4438154 4879154 5544154 5457155 4893155 4517155 5605628
--------------------------------------------------------------------------------
/Exp5/data/628.blk:
--------------------------------------------------------------------------------
1 | 155 4837156 4129156 5308156 5410157 4064157 5903157 5515629
--------------------------------------------------------------------------------
/Exp5/data/629.blk:
--------------------------------------------------------------------------------
1 | 158 4919158 4557158 4168158 4663158 5650159 4309159 5009630
--------------------------------------------------------------------------------
/Exp5/data/630.blk:
--------------------------------------------------------------------------------
1 | 159 4682159 4983159 5501159 5140159 4904 631
--------------------------------------------------------------------------------
/Exp5/data/7.blk:
--------------------------------------------------------------------------------
1 | 100 4588101 4305101 4478104 4008105 4269105 4000107 44728
--------------------------------------------------------------------------------
/Exp5/data/8.blk:
--------------------------------------------------------------------------------
1 | 107 4540108 4680109 4189109 4533109 4206113 4725114 42799
--------------------------------------------------------------------------------
/Exp5/data/8888.blk:
--------------------------------------------------------------------------------
1 | 12345678
--------------------------------------------------------------------------------
/Exp5/data/9.blk:
--------------------------------------------------------------------------------
1 | 115 4365116 4910118 4736119 4392119 4290120 4347121 475610
--------------------------------------------------------------------------------
/Exp5/data_bak/1.blk:
--------------------------------------------------------------------------------
1 | 139 4730131 4797118 4688121 4184117 4477139 4355104 40622
--------------------------------------------------------------------------------
/Exp5/data_bak/10.blk:
--------------------------------------------------------------------------------
1 | 138 4848130 4061116 4910109 4206128 4243133 4103105 426911
--------------------------------------------------------------------------------
/Exp5/data_bak/11.blk:
--------------------------------------------------------------------------------
1 | 132 4759109 4189109 4533101 4305134 4864100 4588115 436512
--------------------------------------------------------------------------------
/Exp5/data_bak/12.blk:
--------------------------------------------------------------------------------
1 | 121 4756105 4000118 4736139 4241108 4680120 4347133 485613
--------------------------------------------------------------------------------
/Exp5/data_bak/13.blk:
--------------------------------------------------------------------------------
1 | 135 4672123 4176108 4275121 4475115 4291105 4152131 491714
--------------------------------------------------------------------------------
/Exp5/data_bak/14.blk:
--------------------------------------------------------------------------------
1 | 110 4992135 4520124 4247129 4199132 4639112 4250108 450515
--------------------------------------------------------------------------------
/Exp5/data_bak/15.blk:
--------------------------------------------------------------------------------
1 | 100 4311102 4773118 4536120 4973102 4252108 4036128 409016
--------------------------------------------------------------------------------
/Exp5/data_bak/16.blk:
--------------------------------------------------------------------------------
1 | 105 4724102 4026129 4601100 4175100 4192119 4315110 422117
--------------------------------------------------------------------------------
/Exp5/data_bak/17.blk:
--------------------------------------------------------------------------------
1 | 156 4129144 5915148 4161129 5900152 5679146 4451150 453318
--------------------------------------------------------------------------------
/Exp5/data_bak/18.blk:
--------------------------------------------------------------------------------
1 | 130 4208120 5282120 4933130 5202146 5607159 5009135 509519
--------------------------------------------------------------------------------
/Exp5/data_bak/19.blk:
--------------------------------------------------------------------------------
1 | 144 5339143 4417159 4309137 4020153 5969141 5875146 570920
--------------------------------------------------------------------------------
/Exp5/data_bak/2.blk:
--------------------------------------------------------------------------------
1 | 123 4072106 4123130 4058129 4242111 4915108 4993132 45393
--------------------------------------------------------------------------------
/Exp5/data_bak/20.blk:
--------------------------------------------------------------------------------
1 | 147 5596142 4462132 4759141 4684136 4753158 4557143 586621
--------------------------------------------------------------------------------
/Exp5/data_bak/21.blk:
--------------------------------------------------------------------------------
1 | 127 4166124 5115124 5807134 5900158 4919121 4821142 411922
--------------------------------------------------------------------------------
/Exp5/data_bak/22.blk:
--------------------------------------------------------------------------------
1 | 149 5843122 4235150 5438143 5231124 4729120 4967131 597723
--------------------------------------------------------------------------------
/Exp5/data_bak/23.blk:
--------------------------------------------------------------------------------
1 | 126 4514141 4505145 5647127 4461126 4031129 5078121 524524
--------------------------------------------------------------------------------
/Exp5/data_bak/24.blk:
--------------------------------------------------------------------------------
1 | 154 4438156 5308123 4916120 4257147 5666132 5345155 489325
--------------------------------------------------------------------------------
/Exp5/data_bak/25.blk:
--------------------------------------------------------------------------------
1 | 124 5803155 4517139 4041149 4925125 4450143 4533126 517226
--------------------------------------------------------------------------------
/Exp5/data_bak/26.blk:
--------------------------------------------------------------------------------
1 | 135 4327151 5809154 4879154 5544134 5710123 5701122 432027
--------------------------------------------------------------------------------
/Exp5/data_bak/27.blk:
--------------------------------------------------------------------------------
1 | 130 5083122 4300135 5489150 5708149 4650149 5727154 420228
--------------------------------------------------------------------------------
/Exp5/data_bak/28.blk:
--------------------------------------------------------------------------------
1 | 126 4779149 4165128 5830137 4986131 5735129 5377150 511229
--------------------------------------------------------------------------------
/Exp5/data_bak/29.blk:
--------------------------------------------------------------------------------
1 | 132 4193138 5328132 4037143 4430153 4320158 4168131 593430
--------------------------------------------------------------------------------
/Exp5/data_bak/3.blk:
--------------------------------------------------------------------------------
1 | 124 4286122 4530109 4609115 4455135 4652113 4681121 46974
--------------------------------------------------------------------------------
/Exp5/data_bak/30.blk:
--------------------------------------------------------------------------------
1 | 135 5013152 4524139 4071147 4027140 5437126 4385124 571931
--------------------------------------------------------------------------------
/Exp5/data_bak/31.blk:
--------------------------------------------------------------------------------
1 | 129 4673131 4444131 5516125 4969120 5880148 4571139 444832
--------------------------------------------------------------------------------
/Exp5/data_bak/32.blk:
--------------------------------------------------------------------------------
1 | 146 4703126 4028137 5623129 4130134 4864143 4317131 480233
--------------------------------------------------------------------------------
/Exp5/data_bak/33.blk:
--------------------------------------------------------------------------------
1 | 135 4541149 4663121 5071157 4064135 5919123 5876126 482734
--------------------------------------------------------------------------------
/Exp5/data_bak/34.blk:
--------------------------------------------------------------------------------
1 | 127 5211125 5257138 5706134 4380157 5903138 5731151 473535
--------------------------------------------------------------------------------
/Exp5/data_bak/35.blk:
--------------------------------------------------------------------------------
1 | 138 4371141 4782123 4150149 4287146 5827149 4301144 427236
--------------------------------------------------------------------------------
/Exp5/data_bak/36.blk:
--------------------------------------------------------------------------------
1 | 146 5338143 4870138 5573134 5524141 5921130 4983138 569937
--------------------------------------------------------------------------------
/Exp5/data_bak/37.blk:
--------------------------------------------------------------------------------
1 | 126 4200126 4380155 5605139 5737155 4837158 4663139 567038
--------------------------------------------------------------------------------
/Exp5/data_bak/38.blk:
--------------------------------------------------------------------------------
1 | 129 4987159 4682139 5456139 5314124 5154151 4488157 551539
--------------------------------------------------------------------------------
/Exp5/data_bak/39.blk:
--------------------------------------------------------------------------------
1 | 130 4371151 4060131 4567132 4383147 5516139 5530127 592040
--------------------------------------------------------------------------------
/Exp5/data_bak/4.blk:
--------------------------------------------------------------------------------
1 | 110 4726133 4925115 4395122 4675117 4156125 4533116 49805
--------------------------------------------------------------------------------
/Exp5/data_bak/40.blk:
--------------------------------------------------------------------------------
1 | 159 4983133 5711154 5457156 5410142 5761145 5077141 418641
--------------------------------------------------------------------------------
/Exp5/data_bak/41.blk:
--------------------------------------------------------------------------------
1 | 135 4782145 4706127 5163126 5842121 5098127 4144122 460742
--------------------------------------------------------------------------------
/Exp5/data_bak/42.blk:
--------------------------------------------------------------------------------
1 | 126 5995158 5650144 4790127 4071128 4249126 5650123 459643
--------------------------------------------------------------------------------
/Exp5/data_bak/43.blk:
--------------------------------------------------------------------------------
1 | 146 5786125 5637159 5501137 4364121 4516126 5565145 591344
--------------------------------------------------------------------------------
/Exp5/data_bak/44.blk:
--------------------------------------------------------------------------------
1 | 144 5254127 5462141 5234145 5200122 4749130 4180124 493745
--------------------------------------------------------------------------------
/Exp5/data_bak/45.blk:
--------------------------------------------------------------------------------
1 | 142 5521147 4960133 4214139 4443143 5901150 4482159 490446
--------------------------------------------------------------------------------
/Exp5/data_bak/46.blk:
--------------------------------------------------------------------------------
1 | 135 5557123 4362128 5355138 5978126 5320159 5140147 418047
--------------------------------------------------------------------------------
/Exp5/data_bak/47.blk:
--------------------------------------------------------------------------------
1 | 149 4784148 5066124 4071132 4206139 5379145 4579134 493448
--------------------------------------------------------------------------------
/Exp5/data_bak/48.blk:
--------------------------------------------------------------------------------
1 | 134 5404146 4574129 5345126 4728125 4741124 5826139 582949
--------------------------------------------------------------------------------
/Exp5/data_bak/5.blk:
--------------------------------------------------------------------------------
1 | 121 4087110 4463129 4732116 4069116 4813107 4258113 41426
--------------------------------------------------------------------------------
/Exp5/data_bak/6.blk:
--------------------------------------------------------------------------------
1 | 110 4836130 4627130 4572125 4764122 4225120 4373116 49537
--------------------------------------------------------------------------------
/Exp5/data_bak/7.blk:
--------------------------------------------------------------------------------
1 | 134 4169139 4130104 4008126 4720101 4478114 4279133 41348
--------------------------------------------------------------------------------
/Exp5/data_bak/8.blk:
--------------------------------------------------------------------------------
1 | 122 4749137 4986123 4362137 4020125 4741128 4249126 40319
--------------------------------------------------------------------------------
/Exp5/data_bak/8888.blk:
--------------------------------------------------------------------------------
1 | 12345678
--------------------------------------------------------------------------------
/Exp5/data_bak/9.blk:
--------------------------------------------------------------------------------
1 | 119 4392119 4290107 4472107 4540113 4725125 4335128 480510
--------------------------------------------------------------------------------
/Exp5/db_exp5/190110105_许峻玮_数据库实验四报告.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp5/db_exp5/190110105_许峻玮_数据库实验四报告.pdf
--------------------------------------------------------------------------------
/Exp5/db_exp5/实验五 查询处理算法的模拟实现指导书.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp5/db_exp5/实验五 查询处理算法的模拟实现指导书.pdf
--------------------------------------------------------------------------------
/Exp5/db_exp5/实验五 查询处理算法的模拟实现(2021秋)PPT.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp5/db_exp5/实验五 查询处理算法的模拟实现(2021秋)PPT.pdf
--------------------------------------------------------------------------------
/Exp5/db_exp5/数据库-实验五报告模板.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pinskyrobin/hitsz_database_2021/e6f0663d23c0ef86a09d7fbffda90b3ef38a0e34/Exp5/db_exp5/数据库-实验五报告模板.docx
--------------------------------------------------------------------------------
/Exp5/extmem.c:
--------------------------------------------------------------------------------
1 | /*
2 | * extmem.c
3 | * Zhaonian Zou
4 | * Harbin Institute of Technology
5 | * Jun 22, 2011
6 | */
7 |
8 | #include
9 | #include
10 | #include
11 | #include "extmem.h"
12 |
13 | Buffer *initBuffer(size_t bufSize, size_t blkSize, Buffer *buf)
14 | {
15 | int i;
16 |
17 | buf->numIO = 0;
18 | buf->bufSize = bufSize;
19 | buf->blkSize = blkSize;
20 | buf->numAllBlk = bufSize / (blkSize + 1);
21 | buf->numFreeBlk = buf->numAllBlk;
22 | buf->data = (unsigned char*)malloc(bufSize * sizeof(unsigned char));
23 |
24 | if (!buf->data)
25 | {
26 | perror("Buffer Initialization Failed!\n");
27 | return NULL;
28 | }
29 |
30 | memset(buf->data, 0, bufSize * sizeof(unsigned char));
31 | return buf;
32 | }
33 |
34 | void freeBuffer(Buffer *buf)
35 | {
36 | free(buf->data);
37 | }
38 |
39 | unsigned char *getNewBlockInBuffer(Buffer *buf)
40 | {
41 | unsigned char *blkPtr;
42 |
43 | if (buf->numFreeBlk == 0)
44 | {
45 | perror("Buffer is full!\n");
46 | return NULL;
47 | }
48 |
49 | blkPtr = buf->data;
50 |
51 | while (blkPtr < buf->data + (buf->blkSize + 1) * buf->numAllBlk) //在缓冲区范围内找空闲块
52 | {
53 | if (*blkPtr == BLOCK_AVAILABLE) //找到空闲块
54 | break;
55 | else
56 | blkPtr += buf->blkSize + 1;
57 | }
58 |
59 | *blkPtr = BLOCK_UNAVAILABLE; //置状态位为不可用
60 | buf->numFreeBlk--; //置可用块数-1
61 | return blkPtr + 1; //直接返回块的数据区,跳过状态位
62 | }
63 |
64 | void freeBlockInBuffer(unsigned char *blk, Buffer *buf)
65 | {
66 | *(blk - 1) = BLOCK_AVAILABLE;
67 | buf->numFreeBlk++;
68 | }
69 |
70 | int dropBlockOnDisk(unsigned int addr)
71 | {
72 | char filename[40];
73 |
74 | sprintf(filename, "data/%d.blk", addr);
75 |
76 | if (remove(filename) == -1)
77 | {
78 | perror("Dropping Block Fails!\n");
79 | return -1;
80 | }
81 |
82 | return 0;
83 | }
84 |
85 | unsigned char *readBlockFromDisk(unsigned int addr, Buffer *buf)
86 | {
87 | char filename[40];
88 | unsigned char *blkPtr, *bytePtr;
89 | char ch;
90 |
91 | if (buf->numFreeBlk == 0)
92 | {
93 | perror("Buffer Overflows!\n");
94 | return NULL;
95 | }
96 |
97 | blkPtr = buf->data;
98 |
99 | while (blkPtr < buf->data + (buf->blkSize + 1) * buf->numAllBlk) //找到一个可用块
100 | {
101 | if (*blkPtr == BLOCK_AVAILABLE) //找到一个可用块
102 | break;
103 | else
104 | blkPtr += buf->blkSize + 1;
105 | }
106 |
107 | sprintf(filename, "data/%d.blk", addr);
108 | FILE *fp = fopen(filename, "r");
109 |
110 | if (!fp)
111 | {
112 | perror("Reading Block Failed!\n");
113 | return NULL;
114 | }
115 |
116 | *blkPtr = BLOCK_UNAVAILABLE;
117 | blkPtr++; //指向块的数据位
118 | bytePtr = blkPtr;
119 |
120 | while (bytePtr < blkPtr + buf->blkSize)
121 | {
122 | ch = fgetc(fp);
123 | *bytePtr = ch;
124 | bytePtr++;
125 | }
126 |
127 | fclose(fp);
128 | buf->numFreeBlk--;
129 | buf->numIO++;
130 | return blkPtr;
131 | }
132 |
133 | int writeBlockToDisk(unsigned char *blkPtr, unsigned int addr, Buffer *buf)
134 | {
135 | char filename[40];
136 | unsigned char *bytePtr;
137 |
138 | sprintf(filename, "data/%d.blk", addr);
139 | FILE *fp = fopen(filename, "w");
140 |
141 | if (!fp)
142 | {
143 | perror("Writing Block Failed!\n");
144 | return -1;
145 | }
146 |
147 | for (bytePtr = blkPtr; bytePtr < blkPtr + buf->blkSize; bytePtr++)
148 | fputc((int)(*bytePtr), fp);
149 |
150 | fclose(fp);
151 | *(blkPtr - 1) = BLOCK_AVAILABLE; //重新将块置为可用,特别要注意这里
152 | buf->numFreeBlk++;
153 | buf->numIO++;
154 | return 0;
155 | }
156 |
--------------------------------------------------------------------------------
/Exp5/extmem.h:
--------------------------------------------------------------------------------
1 | /*
2 | * extmem.h
3 | * Zhaonian Zou
4 | * Harbin Institute of Technology
5 | * Jun 22, 2011
6 | */
7 |
8 | #ifndef EXTMEM_H
9 | #define EXTMEM_H
10 |
11 | #define BLOCK_AVAILABLE 0
12 | #define BLOCK_UNAVAILABLE 1
13 |
14 | typedef struct tagBuffer {
15 | unsigned long numIO; /* Number of IO's*/
16 | size_t bufSize; /* Buffer size*/
17 | size_t blkSize; /* Block size */
18 | size_t numAllBlk; /* Number of blocks that can be kept in the buffer */
19 | size_t numFreeBlk; /* Number of available blocks in the buffer */
20 | unsigned char *data; /* Starting address of the buffer */
21 | } Buffer;
22 |
23 | /* Initialize a buffer with the specified buffer size and block size.
24 | * If the initialization fails, the return value is NULL;
25 | * otherwise the pointer to the buffer.
26 | */
27 | Buffer *initBuffer(size_t bufSize, size_t blkSize, Buffer *buf);
28 |
29 | /* Free the memory used by a buffer. */
30 | void freeBuffer(Buffer *buf);
31 |
32 | /* Apply for a new block from a buffer.
33 | * If no free blocks are available in the buffer,
34 | * then the return value is NULL; otherwise the pointer to the block.
35 | */
36 | unsigned char *getNewBlockInBuffer(Buffer *buf);
37 |
38 | /* Set a block in a buffer to be available. */
39 | void freeBlockInBuffer(unsigned char *blk, Buffer *buf);
40 |
41 | /* Drop a block on the disk */
42 | int dropBlockOnDisk(unsigned int addr);
43 |
44 | /* Read a block from the hard disk to the buffer by the address of the block. */
45 | unsigned char *readBlockFromDisk(unsigned int addr, Buffer *buf);
46 |
47 | /* Read a block in the buffer to the hard disk by the address of the block. */
48 | int writeBlockToDisk(unsigned char *blkPtr, unsigned int addr, Buffer *buf);
49 |
50 | #endif // EXTMEM_H
51 |
--------------------------------------------------------------------------------
/Exp5/utils.h:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include "extmem.h"
4 | #include
5 | typedef struct tuple {
6 | int a;
7 | int b;
8 | } tuple;
9 |
10 | void int2str(unsigned char *dst, int a) {
11 | int len;
12 | int base;
13 | if (a == 0) {
14 | len = 0;
15 | base = 0;
16 | } else if (a < 10) {
17 | len = 1;
18 | base = 1;
19 | } else if (a < 100){
20 | len = 2;
21 | base = 10;
22 | } else if (a < 1000){
23 | len = 3;
24 | base = 100;
25 | } else {
26 | len = 4;
27 | base = 1000;
28 | }
29 | for (int i = 0; i < len; i++) {
30 | dst[i] = a / base + '0';
31 | a %= base;
32 | base /= 10;
33 | }
34 | for (int i = len; i < 4; i++) {
35 | dst[i] = 0;
36 | }
37 | }
38 |
39 | int str2int(const unsigned char *src) {
40 | char str[5];
41 | str[4] = 0;
42 | for (int k = 0; k < 4; k++) {
43 | str[k] = *(src + k);
44 | }
45 | return atoi(str);
46 | }
47 |
48 | tuple get(const unsigned char *blk, int index) {
49 | int i;
50 | tuple t;
51 | t.a = 0;
52 | t.b = 0;
53 | char first[4], second[4];
54 | for (i = 0; i < 4; i++) {
55 | first[i] = *(blk + index * 8 + i);
56 | second[i] = *(blk + index * 8 + 4 + i);
57 | }
58 | t.a = str2int(first);
59 | t.b = str2int(second);
60 | return t;
61 | }
62 |
63 | void set_from_blk(const unsigned char *blk, unsigned char *res_blk, int blk_idx, int res_blk_idx) {
64 | int i;
65 | for (i = 0; i < 8; i++) {
66 | *(res_blk + res_blk_idx * 8 + i) = *(blk + blk_idx * 8 + i);
67 | }
68 | }
69 |
70 | void set_from_tuple(unsigned char *blk, int index, tuple t) {
71 | int i;
72 |
73 | int a = t.a;
74 | int b = t.b;
75 | unsigned char str_a[4], str_b[4];
76 | int2str(str_a, a);
77 | int2str(str_b, b);
78 |
79 | for (i = 0; i < 4; i++) {
80 | *(blk + index * 8 + i) = str_a[i];
81 | }
82 | for (i = 4; i < 8; i++) {
83 | *(blk + index * 8 + i) = str_b[i - 4];
84 | }
85 |
86 | }
87 |
88 | void write(unsigned char *res_blk, Buffer *buf, int *output) {
89 | tuple t = {*output + 1, 0};
90 | set_from_tuple(res_blk, 7, t);
91 | if (writeBlockToDisk(res_blk, *output, buf) != 0){
92 | perror("Writing Block Failed!\n");
93 | return ;
94 | }
95 | printf("结果写入磁盘:%d\n", *output);
96 | *output = *output + 1;
97 | memset(res_blk, 0, 64);
98 | }
99 |
100 | void write_tuple(unsigned char *res_blk, int *index, tuple t, Buffer *buf, int *res_blk_num) {
101 | set_from_tuple(res_blk, (*index)++, t);
102 | if (*index == 7) {
103 | write(res_blk, buf, res_blk_num);
104 | freeBlockInBuffer(res_blk, buf);
105 | res_blk = getNewBlockInBuffer(buf);
106 | memset(res_blk, 0, 64);
107 | *index = 0;
108 | }
109 | }
110 |
111 | void inner_sort(int start, int end, Buffer *buf) {
112 | // 每一组的磁盘块数(最后一组很可能不为6)
113 | int blk_cnt;
114 |
115 | unsigned char *blk;
116 | unsigned char *blks[6];
117 | // 组数
118 | int group_num = (end - start) / 6 + 1;
119 |
120 | // 当前处理的磁盘块号
121 | int curr_blk_num = start;
122 | // 写回时的磁盘块号
123 | int write_blk_num = start;
124 |
125 | // 待比较两元组的所属磁盘块号和块内索引
126 | // tuple_of_blk_num 取值范围 : [0, 6]
127 | // tuple_idx 取值范围 : [0, 6]
128 | int tuple_of_blk_num1, tuple_idx1;
129 | int tuple_of_blk_num2, tuple_idx2;
130 |
131 | // 分别存放冒泡排序中两个要比较的数
132 | tuple a, b;
133 |
134 | // 分组排序
135 | for (int i = 0; i < group_num; i++) {
136 | blk_cnt = 0;
137 | for (; blk_cnt < 6 && curr_blk_num <= end; curr_blk_num++, blk_cnt++) {
138 | blks[blk_cnt] = readBlockFromDisk(curr_blk_num, buf);
139 | }
140 | for (int j = 0; j < blk_cnt * 7 - 1; j++) {
141 | tuple_of_blk_num1 = j / 7;
142 | tuple_idx1 = j % 7;
143 | for (int k = j + 1; k < blk_cnt * 7; k++) {
144 | tuple_of_blk_num2 = k / 7;
145 | tuple_idx2 = k % 7;
146 | a = get(blks[tuple_of_blk_num1], tuple_idx1);
147 | b = get(blks[tuple_of_blk_num2], tuple_idx2);
148 | if (a.a > b.a) {
149 | set_from_tuple(blks[tuple_of_blk_num1], tuple_idx1, b);
150 | set_from_tuple(blks[tuple_of_blk_num2], tuple_idx2, a);
151 | }
152 | }
153 | }
154 |
155 | // 数据写回
156 | for (int l = 0; l < blk_cnt; l++) {
157 | blk = blks[l];
158 | write(blk, buf, &write_blk_num);
159 | }
160 | }
161 | }
162 |
163 |
--------------------------------------------------------------------------------