├── .gitmodules
├── LICENSE
├── README.md
├── android
├── MyApplication
│ ├── .gitignore
│ ├── .idea
│ │ ├── .gitignore
│ │ ├── .name
│ │ ├── compiler.xml
│ │ ├── gradle.xml
│ │ └── misc.xml
│ ├── app
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── cn
│ │ │ │ └── magicalsheep
│ │ │ │ └── myapplication
│ │ │ │ └── ExampleInstrumentedTest.kt
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── cn
│ │ │ │ │ └── magicalsheep
│ │ │ │ │ └── myapplication
│ │ │ │ │ ├── ActivityA.kt
│ │ │ │ │ ├── ActivityB.kt
│ │ │ │ │ ├── ActivityC.kt
│ │ │ │ │ ├── Observer.kt
│ │ │ │ │ ├── Repository.kt
│ │ │ │ │ └── SimpleDialog.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── layout
│ │ │ │ ├── activity_a.xml
│ │ │ │ ├── activity_b.xml
│ │ │ │ └── activity_c.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── values-night
│ │ │ │ └── themes.xml
│ │ │ │ ├── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── themes.xml
│ │ │ │ └── xml
│ │ │ │ ├── backup_rules.xml
│ │ │ │ └── data_extraction_rules.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── cn
│ │ │ └── magicalsheep
│ │ │ └── myapplication
│ │ │ └── ExampleUnitTest.kt
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── MyApplication2
│ ├── .gitignore
│ ├── .idea
│ │ ├── .gitignore
│ │ ├── .name
│ │ ├── compiler.xml
│ │ ├── deploymentTargetDropDown.xml
│ │ ├── gradle.xml
│ │ └── misc.xml
│ ├── app
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ ├── release
│ │ │ ├── app-release.apk
│ │ │ └── output-metadata.json
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── cn
│ │ │ │ └── magicalsheep
│ │ │ │ └── myapplication
│ │ │ │ └── ExampleInstrumentedTest.kt
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── cn
│ │ │ │ │ └── magicalsheep
│ │ │ │ │ └── myapplication
│ │ │ │ │ ├── MainActivity.kt
│ │ │ │ │ ├── MainHandler.kt
│ │ │ │ │ ├── RecyclerViewAdapter.kt
│ │ │ │ │ └── data
│ │ │ │ │ ├── PhotoDbHelper.kt
│ │ │ │ │ ├── PhotoService.kt
│ │ │ │ │ └── model
│ │ │ │ │ ├── Camera.kt
│ │ │ │ │ ├── Photo.kt
│ │ │ │ │ ├── PhotoEntry.kt
│ │ │ │ │ ├── Photos.kt
│ │ │ │ │ └── Rover.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── layout
│ │ │ │ ├── activity_main.xml
│ │ │ │ └── image_item.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── values-night
│ │ │ │ └── themes.xml
│ │ │ │ ├── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── themes.xml
│ │ │ │ └── xml
│ │ │ │ ├── backup_rules.xml
│ │ │ │ └── data_extraction_rules.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── cn
│ │ │ └── magicalsheep
│ │ │ └── myapplication
│ │ │ └── ExampleUnitTest.kt
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── MyApplication3
│ ├── .gitignore
│ ├── .idea
│ │ ├── .gitignore
│ │ ├── .name
│ │ ├── compiler.xml
│ │ ├── gradle.xml
│ │ └── misc.xml
│ ├── app
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ ├── release
│ │ │ ├── app-release.apk
│ │ │ └── output-metadata.json
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── cn
│ │ │ │ └── magicalsheep
│ │ │ │ └── myapplication
│ │ │ │ └── ExampleInstrumentedTest.kt
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── cn
│ │ │ │ │ └── magicalsheep
│ │ │ │ │ └── myapplication
│ │ │ │ │ ├── AlaramBroadcastReceiver.kt
│ │ │ │ │ ├── MainActivity.kt
│ │ │ │ │ ├── data
│ │ │ │ │ ├── WeatherDbHelper.kt
│ │ │ │ │ ├── entity
│ │ │ │ │ │ ├── City.kt
│ │ │ │ │ │ ├── CityEntry.kt
│ │ │ │ │ │ ├── Report.kt
│ │ │ │ │ │ ├── Weather.kt
│ │ │ │ │ │ └── WeatherEntry.kt
│ │ │ │ │ └── repository
│ │ │ │ │ │ └── WeatherRepository.kt
│ │ │ │ │ └── ui
│ │ │ │ │ ├── SettingsFragment.kt
│ │ │ │ │ ├── WeatherDetailFragment.kt
│ │ │ │ │ ├── WeatherListFragment.kt
│ │ │ │ │ ├── adapter
│ │ │ │ │ └── WeatherListAdapter.kt
│ │ │ │ │ └── model
│ │ │ │ │ └── WeatherViewModel.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ ├── cloud_white_24dp.xml
│ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ ├── icon100.xml
│ │ │ │ ├── icon1001.xml
│ │ │ │ ├── icon1002.xml
│ │ │ │ ├── icon1003.xml
│ │ │ │ ├── icon1004.xml
│ │ │ │ ├── icon1005.xml
│ │ │ │ ├── icon1006.xml
│ │ │ │ ├── icon1007.xml
│ │ │ │ ├── icon1008.xml
│ │ │ │ ├── icon1009.xml
│ │ │ │ ├── icon100_fill.xml
│ │ │ │ ├── icon101.xml
│ │ │ │ ├── icon1010.xml
│ │ │ │ ├── icon1011.xml
│ │ │ │ ├── icon1012.xml
│ │ │ │ ├── icon1013.xml
│ │ │ │ ├── icon1014.xml
│ │ │ │ ├── icon1015.xml
│ │ │ │ ├── icon1016.xml
│ │ │ │ ├── icon1017.xml
│ │ │ │ ├── icon1018.xml
│ │ │ │ ├── icon1019.xml
│ │ │ │ ├── icon101_fill.xml
│ │ │ │ ├── icon102.xml
│ │ │ │ ├── icon1020.xml
│ │ │ │ ├── icon1021.xml
│ │ │ │ ├── icon1022.xml
│ │ │ │ ├── icon1023.xml
│ │ │ │ ├── icon1024.xml
│ │ │ │ ├── icon1025.xml
│ │ │ │ ├── icon1026.xml
│ │ │ │ ├── icon1027.xml
│ │ │ │ ├── icon1028.xml
│ │ │ │ ├── icon1029.xml
│ │ │ │ ├── icon102_fill.xml
│ │ │ │ ├── icon103.xml
│ │ │ │ ├── icon1030.xml
│ │ │ │ ├── icon1031.xml
│ │ │ │ ├── icon1032.xml
│ │ │ │ ├── icon1033.xml
│ │ │ │ ├── icon1034.xml
│ │ │ │ ├── icon1035.xml
│ │ │ │ ├── icon1036.xml
│ │ │ │ ├── icon1037.xml
│ │ │ │ ├── icon1038.xml
│ │ │ │ ├── icon1039.xml
│ │ │ │ ├── icon103_fill.xml
│ │ │ │ ├── icon104.xml
│ │ │ │ ├── icon1040.xml
│ │ │ │ ├── icon1041.xml
│ │ │ │ ├── icon1042.xml
│ │ │ │ ├── icon1043.xml
│ │ │ │ ├── icon1044.xml
│ │ │ │ ├── icon1045.xml
│ │ │ │ ├── icon1046.xml
│ │ │ │ ├── icon1047.xml
│ │ │ │ ├── icon1048.xml
│ │ │ │ ├── icon1049.xml
│ │ │ │ ├── icon104_fill.xml
│ │ │ │ ├── icon1050.xml
│ │ │ │ ├── icon1051.xml
│ │ │ │ ├── icon1052.xml
│ │ │ │ ├── icon1053.xml
│ │ │ │ ├── icon1054.xml
│ │ │ │ ├── icon1055.xml
│ │ │ │ ├── icon1056.xml
│ │ │ │ ├── icon1057.xml
│ │ │ │ ├── icon1058.xml
│ │ │ │ ├── icon1059.xml
│ │ │ │ ├── icon1061.xml
│ │ │ │ ├── icon1064.xml
│ │ │ │ ├── icon1101.xml
│ │ │ │ ├── icon1302.xml
│ │ │ │ ├── icon1402.xml
│ │ │ │ ├── icon150.xml
│ │ │ │ ├── icon150_fill.xml
│ │ │ │ ├── icon151.xml
│ │ │ │ ├── icon151_fill.xml
│ │ │ │ ├── icon152.xml
│ │ │ │ ├── icon152_fill.xml
│ │ │ │ ├── icon153.xml
│ │ │ │ ├── icon153_fill.xml
│ │ │ │ ├── icon1601.xml
│ │ │ │ ├── icon1602.xml
│ │ │ │ ├── icon1603.xml
│ │ │ │ ├── icon1604.xml
│ │ │ │ ├── icon1605.xml
│ │ │ │ ├── icon1606.xml
│ │ │ │ ├── icon1607.xml
│ │ │ │ ├── icon2001.xml
│ │ │ │ ├── icon2002.xml
│ │ │ │ ├── icon2003.xml
│ │ │ │ ├── icon2004.xml
│ │ │ │ ├── icon2005.xml
│ │ │ │ ├── icon2006.xml
│ │ │ │ ├── icon2007.xml
│ │ │ │ ├── icon2008.xml
│ │ │ │ ├── icon2009.xml
│ │ │ │ ├── icon2010.xml
│ │ │ │ ├── icon2011.xml
│ │ │ │ ├── icon2012.xml
│ │ │ │ ├── icon2013.xml
│ │ │ │ ├── icon2014.xml
│ │ │ │ ├── icon2015.xml
│ │ │ │ ├── icon2016.xml
│ │ │ │ ├── icon2017.xml
│ │ │ │ ├── icon2018.xml
│ │ │ │ ├── icon2019.xml
│ │ │ │ ├── icon2020.xml
│ │ │ │ ├── icon2021.xml
│ │ │ │ ├── icon2022.xml
│ │ │ │ ├── icon2023.xml
│ │ │ │ ├── icon2024.xml
│ │ │ │ ├── icon2025.xml
│ │ │ │ ├── icon2026.xml
│ │ │ │ ├── icon2027.xml
│ │ │ │ ├── icon2028.xml
│ │ │ │ ├── icon300.xml
│ │ │ │ ├── icon300_fill.xml
│ │ │ │ ├── icon301.xml
│ │ │ │ ├── icon301_fill.xml
│ │ │ │ ├── icon302.xml
│ │ │ │ ├── icon302_fill.xml
│ │ │ │ ├── icon303.xml
│ │ │ │ ├── icon303_fill.xml
│ │ │ │ ├── icon304.xml
│ │ │ │ ├── icon304_fill.xml
│ │ │ │ ├── icon305.xml
│ │ │ │ ├── icon305_fill.xml
│ │ │ │ ├── icon306.xml
│ │ │ │ ├── icon306_fill.xml
│ │ │ │ ├── icon307.xml
│ │ │ │ ├── icon307_fill.xml
│ │ │ │ ├── icon308.xml
│ │ │ │ ├── icon308_fill.xml
│ │ │ │ ├── icon309.xml
│ │ │ │ ├── icon309_fill.xml
│ │ │ │ ├── icon310.xml
│ │ │ │ ├── icon310_fill.xml
│ │ │ │ ├── icon311.xml
│ │ │ │ ├── icon311_fill.xml
│ │ │ │ ├── icon312.xml
│ │ │ │ ├── icon312_fill.xml
│ │ │ │ ├── icon313.xml
│ │ │ │ ├── icon313_fill.xml
│ │ │ │ ├── icon314.xml
│ │ │ │ ├── icon314_fill.xml
│ │ │ │ ├── icon315.xml
│ │ │ │ ├── icon315_fill.xml
│ │ │ │ ├── icon316.xml
│ │ │ │ ├── icon316_fill.xml
│ │ │ │ ├── icon317.xml
│ │ │ │ ├── icon317_fill.xml
│ │ │ │ ├── icon318.xml
│ │ │ │ ├── icon318_fill.xml
│ │ │ │ ├── icon350.xml
│ │ │ │ ├── icon350_fill.xml
│ │ │ │ ├── icon351.xml
│ │ │ │ ├── icon351_fill.xml
│ │ │ │ ├── icon399.xml
│ │ │ │ ├── icon399_fill.xml
│ │ │ │ ├── icon400.xml
│ │ │ │ ├── icon400_fill.xml
│ │ │ │ ├── icon401.xml
│ │ │ │ ├── icon401_fill.xml
│ │ │ │ ├── icon402.xml
│ │ │ │ ├── icon402_fill.xml
│ │ │ │ ├── icon403.xml
│ │ │ │ ├── icon403_fill.xml
│ │ │ │ ├── icon404.xml
│ │ │ │ ├── icon404_fill.xml
│ │ │ │ ├── icon405.xml
│ │ │ │ ├── icon405_fill.xml
│ │ │ │ ├── icon406.xml
│ │ │ │ ├── icon406_fill.xml
│ │ │ │ ├── icon407.xml
│ │ │ │ ├── icon407_fill.xml
│ │ │ │ ├── icon408.xml
│ │ │ │ ├── icon408_fill.xml
│ │ │ │ ├── icon409.xml
│ │ │ │ ├── icon409_fill.xml
│ │ │ │ ├── icon410.xml
│ │ │ │ ├── icon410_fill.xml
│ │ │ │ ├── icon456.xml
│ │ │ │ ├── icon456_fill.xml
│ │ │ │ ├── icon457.xml
│ │ │ │ ├── icon457_fill.xml
│ │ │ │ ├── icon499.xml
│ │ │ │ ├── icon499_fill.xml
│ │ │ │ ├── icon500.xml
│ │ │ │ ├── icon500_fill.xml
│ │ │ │ ├── icon501.xml
│ │ │ │ ├── icon501_fill.xml
│ │ │ │ ├── icon502.xml
│ │ │ │ ├── icon502_fill.xml
│ │ │ │ ├── icon503.xml
│ │ │ │ ├── icon503_fill.xml
│ │ │ │ ├── icon504.xml
│ │ │ │ ├── icon504_fill.xml
│ │ │ │ ├── icon507.xml
│ │ │ │ ├── icon507_fill.xml
│ │ │ │ ├── icon508.xml
│ │ │ │ ├── icon508_fill.xml
│ │ │ │ ├── icon509.xml
│ │ │ │ ├── icon509_fill.xml
│ │ │ │ ├── icon510.xml
│ │ │ │ ├── icon510_fill.xml
│ │ │ │ ├── icon511.xml
│ │ │ │ ├── icon511_fill.xml
│ │ │ │ ├── icon512.xml
│ │ │ │ ├── icon512_fill.xml
│ │ │ │ ├── icon513.xml
│ │ │ │ ├── icon513_fill.xml
│ │ │ │ ├── icon514.xml
│ │ │ │ ├── icon514_fill.xml
│ │ │ │ ├── icon515.xml
│ │ │ │ ├── icon515_fill.xml
│ │ │ │ ├── icon800.xml
│ │ │ │ ├── icon801.xml
│ │ │ │ ├── icon802.xml
│ │ │ │ ├── icon803.xml
│ │ │ │ ├── icon804.xml
│ │ │ │ ├── icon805.xml
│ │ │ │ ├── icon806.xml
│ │ │ │ ├── icon807.xml
│ │ │ │ ├── icon900.xml
│ │ │ │ ├── icon900_fill.xml
│ │ │ │ ├── icon901.xml
│ │ │ │ ├── icon901_fill.xml
│ │ │ │ ├── icon999.xml
│ │ │ │ ├── icon9998.xml
│ │ │ │ ├── icon9999.xml
│ │ │ │ ├── icon999_fill.xml
│ │ │ │ └── share_white_24dp.xml
│ │ │ │ ├── layout-sw600dp
│ │ │ │ ├── fragment_item_detail.xml
│ │ │ │ └── fragment_item_list.xml
│ │ │ │ ├── layout
│ │ │ │ ├── activity_item_detail.xml
│ │ │ │ ├── fragment_item_detail.xml
│ │ │ │ ├── fragment_item_list.xml
│ │ │ │ └── item_list_content.xml
│ │ │ │ ├── menu
│ │ │ │ └── toolbar_menu.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── navigation
│ │ │ │ ├── primary_details_nav_graph.xml
│ │ │ │ └── primary_details_sub_nav_graph.xml
│ │ │ │ ├── raw
│ │ │ │ └── city.json
│ │ │ │ ├── values-land
│ │ │ │ └── dimens.xml
│ │ │ │ ├── values-night
│ │ │ │ └── themes.xml
│ │ │ │ ├── values-w600dp
│ │ │ │ └── dimens.xml
│ │ │ │ ├── values
│ │ │ │ ├── arrays.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── themes.xml
│ │ │ │ └── xml
│ │ │ │ ├── backup_rules.xml
│ │ │ │ ├── data_extraction_rules.xml
│ │ │ │ └── root_preferences.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── cn
│ │ │ └── magicalsheep
│ │ │ └── myapplication
│ │ │ └── ExampleUnitTest.kt
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
└── README.md
├── express
├── Expressui
│ ├── .gitignore
│ ├── .idea
│ │ ├── .gitignore
│ │ ├── .name
│ │ ├── compiler.xml
│ │ ├── gradle.xml
│ │ ├── inspectionProfiles
│ │ │ └── Project_Default.xml
│ │ └── misc.xml
│ ├── app
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ ├── release
│ │ │ ├── app-release.apk
│ │ │ └── output-metadata.json
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── cn
│ │ │ │ └── magicalsheep
│ │ │ │ └── expressui
│ │ │ │ └── ExampleInstrumentedTest.kt
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── cn
│ │ │ │ │ └── magicalsheep
│ │ │ │ │ └── expressui
│ │ │ │ │ ├── MainActivity.kt
│ │ │ │ │ ├── data
│ │ │ │ │ ├── QrCodeAnalyser.kt
│ │ │ │ │ ├── UnauthorizedException.kt
│ │ │ │ │ ├── entity
│ │ │ │ │ │ ├── EncodedPackage.kt
│ │ │ │ │ │ ├── Package.kt
│ │ │ │ │ │ ├── Result.kt
│ │ │ │ │ │ ├── User.kt
│ │ │ │ │ │ └── UserDto.kt
│ │ │ │ │ └── repository
│ │ │ │ │ │ ├── PackageRepository.kt
│ │ │ │ │ │ └── UserRepository.kt
│ │ │ │ │ └── ui
│ │ │ │ │ ├── EditPackageActivity.kt
│ │ │ │ │ ├── LoginActivity.kt
│ │ │ │ │ ├── QrCodeActivity.kt
│ │ │ │ │ ├── components
│ │ │ │ │ ├── AppBar.kt
│ │ │ │ │ ├── BottomBar.kt
│ │ │ │ │ ├── EditPackageInfo.kt
│ │ │ │ │ ├── EmptyContent.kt
│ │ │ │ │ ├── PackageInfo.kt
│ │ │ │ │ ├── PropItem.kt
│ │ │ │ │ ├── SwipeRefreshList.kt
│ │ │ │ │ └── UserInfo.kt
│ │ │ │ │ ├── page
│ │ │ │ │ ├── AppContent.kt
│ │ │ │ │ ├── HomePage.kt
│ │ │ │ │ ├── PackagesPage.kt
│ │ │ │ │ └── UsersPage.kt
│ │ │ │ │ ├── paging
│ │ │ │ │ ├── PackageSource.kt
│ │ │ │ │ └── UserSource.kt
│ │ │ │ │ └── theme
│ │ │ │ │ ├── Color.kt
│ │ │ │ │ ├── Theme.kt
│ │ │ │ │ └── Type.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ ├── baseline_login_24.xml
│ │ │ │ ├── baseline_logout_24.xml
│ │ │ │ ├── baseline_qr_code_scanner_24.xml
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ │ ├── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── themes.xml
│ │ │ │ └── xml
│ │ │ │ ├── backup_rules.xml
│ │ │ │ └── data_extraction_rules.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── cn
│ │ │ └── magicalsheep
│ │ │ └── expressui
│ │ │ └── ExampleUnitTest.kt
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
└── express-server
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── settings.gradle.kts
│ └── src
│ ├── main
│ ├── kotlin
│ │ └── cn
│ │ │ └── magicalsheep
│ │ │ └── expressserver
│ │ │ ├── ExpressServerApplication.kt
│ │ │ ├── controller
│ │ │ ├── PackageController.kt
│ │ │ └── UserController.kt
│ │ │ ├── entity
│ │ │ ├── DefaultException.kt
│ │ │ ├── EncodedPackage.kt
│ │ │ ├── Result.kt
│ │ │ ├── UnauthorizedException.kt
│ │ │ ├── dto
│ │ │ │ ├── PackageDto.kt
│ │ │ │ └── UserDto.kt
│ │ │ ├── pojo
│ │ │ │ ├── Package.kt
│ │ │ │ └── User.kt
│ │ │ └── vo
│ │ │ │ ├── PackageVo.kt
│ │ │ │ └── UserVo.kt
│ │ │ └── repository
│ │ │ ├── PackageRepository.kt
│ │ │ └── UserRepository.kt
│ └── resources
│ │ ├── application.properties.example
│ │ └── psw4j.properties
│ └── test
│ └── kotlin
│ └── cn
│ └── magicalsheep
│ └── expressserver
│ └── ExpressServerApplicationTests.kt
├── flight-ui
├── .gitignore
├── pom.xml
└── src
│ ├── META-INF
│ └── MANIFEST.MF
│ └── main
│ ├── java
│ └── cn
│ │ └── magicalsheep
│ │ ├── CallBackInterface.java
│ │ ├── Main.java
│ │ ├── backend
│ │ ├── FlightFactory.java
│ │ ├── TicketFactory.java
│ │ └── UserFactory.java
│ │ ├── frontend
│ │ ├── FlightHandler.java
│ │ ├── TicketHandler.java
│ │ └── UserHandler.java
│ │ ├── model
│ │ ├── Plane.java
│ │ ├── Ticket.java
│ │ └── User.java
│ │ ├── ui
│ │ ├── MainFrame.form
│ │ └── MainFrame.java
│ │ └── utils
│ │ └── DateUtils.java
│ └── resources
│ ├── data.json
│ └── log4j2.xml
├── java
├── CET6-Game
│ ├── .gitignore
│ ├── .idea
│ │ ├── gradle.xml
│ │ ├── jpa-buddy.xml
│ │ ├── misc.xml
│ │ ├── vcs.xml
│ │ └── workspace.xml
│ ├── build.gradle.kts
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── settings.gradle.kts
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── cn
│ │ │ └── magicalsheep
│ │ │ ├── client
│ │ │ ├── ClientMain.java
│ │ │ ├── Utils.java
│ │ │ ├── core
│ │ │ │ ├── Mode1Worker.java
│ │ │ │ ├── Mode2Worker.java
│ │ │ │ └── Timer.java
│ │ │ └── ui
│ │ │ │ ├── MainFrame.form
│ │ │ │ ├── MainFrame.java
│ │ │ │ ├── Mode1Frame.form
│ │ │ │ ├── Mode1Frame.java
│ │ │ │ ├── Mode2Frame.form
│ │ │ │ └── Mode2Frame.java
│ │ │ ├── common
│ │ │ ├── Utils.java
│ │ │ ├── Validate.java
│ │ │ ├── request
│ │ │ │ ├── Mode1AnswerRequest.java
│ │ │ │ ├── Mode2AnswerRequest.java
│ │ │ │ └── ModeRequest.java
│ │ │ └── response
│ │ │ │ ├── Mode1Question.java
│ │ │ │ ├── Mode2Question.java
│ │ │ │ └── ModeResult.java
│ │ │ └── server
│ │ │ ├── ServerMain.java
│ │ │ ├── Utils.java
│ │ │ ├── Worker.java
│ │ │ ├── core
│ │ │ ├── ModeCore.java
│ │ │ └── impl
│ │ │ │ ├── Mode1Impl.java
│ │ │ │ └── Mode2Impl.java
│ │ │ └── model
│ │ │ ├── ChTrans.java
│ │ │ └── DictEntry.java
│ │ └── resources
│ │ ├── CET6-Words.json
│ │ └── log4j2.xml
├── README.md
└── hjw-lab
│ ├── 1
│ ├── build
│ │ ├── Five.class
│ │ ├── Four.class
│ │ ├── One.class
│ │ ├── Three.class
│ │ └── Two.class
│ ├── code
│ │ ├── Five.java
│ │ ├── Four.java
│ │ ├── One.java
│ │ ├── Three.java
│ │ └── Two.java
│ ├── compile.bat
│ └── run.bat
│ ├── 2
│ ├── build
│ │ ├── Main.class
│ │ └── Student.class
│ ├── code
│ │ ├── Main.java
│ │ └── Student.java
│ ├── compile.bat
│ └── run.bat
│ ├── 3
│ ├── build
│ │ ├── Circle.class
│ │ ├── Cylinder.class
│ │ ├── Main.class
│ │ └── Sphere.class
│ ├── code
│ │ ├── Circle.java
│ │ ├── Cylinder.java
│ │ ├── Main.java
│ │ └── Sphere.java
│ ├── compile.bat
│ └── run.bat
│ ├── 4
│ ├── build
│ │ ├── Circle.class
│ │ ├── Graduate.class
│ │ ├── Main.class
│ │ ├── Rectangle.class
│ │ ├── Shape.class
│ │ ├── StudentInterface.class
│ │ └── TeacherInterface.class
│ ├── code
│ │ ├── Circle.java
│ │ ├── Graduate.java
│ │ ├── Main.java
│ │ ├── Rectangle.java
│ │ ├── Shape.java
│ │ ├── StudentInterface.java
│ │ └── TeacherInterface.java
│ ├── compile.bat
│ └── run.bat
│ ├── 5
│ ├── build
│ │ ├── IllegalAgeException.class
│ │ ├── Main.class
│ │ └── Person.class
│ ├── code
│ │ ├── IllegalAgeException.java
│ │ ├── Main.java
│ │ └── Person.java
│ ├── compile.bat
│ └── run.bat
│ ├── 6
│ ├── build
│ │ ├── One.class
│ │ ├── Task.class
│ │ ├── TaskOne.class
│ │ ├── TaskTwo.class
│ │ └── Two.class
│ ├── code
│ │ ├── One.java
│ │ └── Two.java
│ ├── compile.bat
│ └── run.bat
│ ├── 7
│ ├── build
│ │ ├── Five.class
│ │ ├── Four.class
│ │ ├── One.class
│ │ ├── Six.class
│ │ ├── Three.class
│ │ └── Two.class
│ ├── code
│ │ ├── Five.java
│ │ ├── Four.java
│ │ ├── One.java
│ │ ├── Six.java
│ │ ├── Three.java
│ │ └── Two.java
│ ├── compile.bat
│ └── run.bat
│ └── 8
│ ├── build
│ ├── Four.class
│ ├── One.class
│ ├── PRIME.DAT
│ ├── STUDENT.DAT
│ ├── Student.class
│ ├── Three.class
│ └── Two.class
│ ├── code
│ ├── Four.java
│ ├── One.java
│ ├── Student.java
│ ├── Three.java
│ └── Two.java
│ ├── compile.bat
│ └── run.bat
├── network
├── README.md
├── httpserver
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── README.md
│ ├── img
│ │ ├── 1.png
│ │ ├── 2.png
│ │ └── 3.png
│ ├── include
│ │ ├── picohttpparser.h
│ │ └── worker.h
│ ├── main.c
│ ├── public
│ │ ├── index.html
│ │ └── theme
│ │ │ ├── css
│ │ │ ├── main.css
│ │ │ └── normalize.css
│ │ │ ├── fonts
│ │ │ ├── oswald-regular-webfont.woff2
│ │ │ ├── oxygen-regular-webfont.woff
│ │ │ └── oxygen-regular-webfont.woff2
│ │ │ └── images
│ │ │ ├── icons
│ │ │ └── downloadarrow_small.png
│ │ │ └── logos
│ │ │ ├── constellix-green-logo.png
│ │ │ ├── equinix-metal.png
│ │ │ ├── fastly-logo.png
│ │ │ ├── favicon.png
│ │ │ ├── google.png
│ │ │ ├── purestorage.png
│ │ │ ├── redhat-community.png
│ │ │ ├── thelinuxfoundation.png
│ │ │ └── tux.png
│ └── src
│ │ ├── picohttpparser.c
│ │ └── worker.c
└── proxy
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── README.md
│ ├── img
│ ├── 1.png
│ └── 2.png
│ ├── include
│ ├── picohttpparser.h
│ ├── request.h
│ └── worker.h
│ ├── main.c
│ └── src
│ ├── picohttpparser.c
│ ├── request.c
│ └── worker.c
└── weibo
├── Wbclient
├── .gitignore
├── .idea
│ ├── .gitignore
│ ├── compiler.xml
│ ├── gradle.xml
│ ├── inspectionProfiles
│ │ └── Project_Default.xml
│ └── misc.xml
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── cn
│ │ │ └── magicalsheep
│ │ │ └── wbclient
│ │ │ └── ExampleInstrumentedTest.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── cn
│ │ │ │ └── magicalsheep
│ │ │ │ └── wbclient
│ │ │ │ ├── MainActivity.kt
│ │ │ │ ├── data
│ │ │ │ ├── AjaxResult.kt
│ │ │ │ ├── Blog.kt
│ │ │ │ ├── Comment.kt
│ │ │ │ ├── User.kt
│ │ │ │ ├── local
│ │ │ │ │ ├── LocalBlogDataProvider.kt
│ │ │ │ │ └── LocalCommentDataProvider.kt
│ │ │ │ ├── remote
│ │ │ │ │ ├── BlogInterface.kt
│ │ │ │ │ ├── CommentInterface.kt
│ │ │ │ │ ├── RetrofitBuilder.kt
│ │ │ │ │ ├── Token.kt
│ │ │ │ │ ├── UserInterface.kt
│ │ │ │ │ └── model
│ │ │ │ │ │ ├── BlogRequestBody.kt
│ │ │ │ │ │ ├── CommentRequestBody.kt
│ │ │ │ │ │ ├── GoodRequestBody.kt
│ │ │ │ │ │ └── LoginBody.kt
│ │ │ │ └── repository
│ │ │ │ │ ├── BlogRepository.kt
│ │ │ │ │ ├── CommentRepository.kt
│ │ │ │ │ ├── UserRepository.kt
│ │ │ │ │ └── impl
│ │ │ │ │ ├── BlogRepositoryImpl.kt
│ │ │ │ │ ├── CommentRepositoryImpl.kt
│ │ │ │ │ └── UserRepositoryImpl.kt
│ │ │ │ └── ui
│ │ │ │ ├── App.kt
│ │ │ │ ├── components
│ │ │ │ ├── Avatar.kt
│ │ │ │ ├── BlogItem.kt
│ │ │ │ ├── CommentItem.kt
│ │ │ │ ├── EmptyPage.kt
│ │ │ │ ├── ListLoadingIndicator.kt
│ │ │ │ ├── ProfileCard.kt
│ │ │ │ ├── ReplyCard.kt
│ │ │ │ └── SwipeRefreshList.kt
│ │ │ │ ├── model
│ │ │ │ ├── HomeViewModel.kt
│ │ │ │ └── ProfileViewModel.kt
│ │ │ │ ├── navigation
│ │ │ │ ├── NavigationActions.kt
│ │ │ │ └── NavigationComponents.kt
│ │ │ │ ├── paging
│ │ │ │ ├── BlogSource.kt
│ │ │ │ ├── CommentSource.kt
│ │ │ │ └── MyBlogSource.kt
│ │ │ │ ├── theme
│ │ │ │ ├── Color.kt
│ │ │ │ ├── Theme.kt
│ │ │ │ └── Type.kt
│ │ │ │ └── views
│ │ │ │ ├── AboutPage.kt
│ │ │ │ ├── BlogDetailPage.kt
│ │ │ │ ├── EditBlogPage.kt
│ │ │ │ ├── HomePage.kt
│ │ │ │ ├── LoginPage.kt
│ │ │ │ ├── ProfilePage.kt
│ │ │ │ ├── SettingsPage.kt
│ │ │ │ └── SheepBlogPage.kt
│ │ └── res
│ │ │ ├── drawable-v24
│ │ │ ├── baseline_account_circle_24.xml
│ │ │ ├── baseline_emoji_emotions_24.xml
│ │ │ ├── baseline_image_24.xml
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── drawable
│ │ │ ├── baseline_comment_24.xml
│ │ │ ├── baseline_open_in_new_24.xml
│ │ │ ├── baseline_thumb_up_off_alt_24.xml
│ │ │ ├── ic_launcher_background.xml
│ │ │ └── sheep_avatar.jpg
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── themes.xml
│ │ │ └── xml
│ │ │ ├── backup_rules.xml
│ │ │ └── data_extraction_rules.xml
│ │ └── test
│ │ └── java
│ │ └── cn
│ │ └── magicalsheep
│ │ └── wbclient
│ │ └── ExampleUnitTest.kt
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
└── wb-server
├── .gitignore
├── Cargo.lock
├── Cargo.toml
├── config.yaml
├── resources
└── wb_server.sql
└── src
├── entity
├── blog.rs
├── comment.rs
├── goods.rs
├── mod.rs
├── prelude.rs
└── user.rs
├── errors.rs
├── filters.rs
├── handlers
├── blog.rs
├── comment.rs
├── goods.rs
├── mod.rs
└── user.rs
├── main.rs
├── packets.rs
├── repository
├── blog.rs
├── comment.rs
├── goods.rs
├── mod.rs
└── user.rs
└── util.rs
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "scheduler"]
2 | path = scheduler
3 | url = https://github.com/MagicalSheep/scheduler.git
4 | [submodule "notepad"]
5 | path = notepad
6 | url = https://github.com/MagicalSheep/notepad.git
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 课程实验合集
2 |
3 | 中南大学计算机学院部分专业课程及大作业的实验合集。因经历过硬盘损坏,部分实验代码已丢失。
4 |
5 | ## 目录
6 |
7 | - [android](/android/):阳旺老师的《移动应用开发》课程实验代码。
8 | - [flight-ui](/flight-ui/):大二上《高级程序设计实践》的航空机票订票系统。
9 | - [network](/network/):桂劲松老师的《计算机网络》课程实验代码,含简单 Web 服务器端程序实现与简单 HTTP 代理实现。
10 | - [notepad](https://github.com/MagicalSheep/notepad):大一上《计算机程序设计实践》的文本编辑器代码。
11 | - [scheduler](https://github.com/MagicalSheep/scheduler):李玺老师的《操作系统原理》课程实验代码。
12 | - [weibo](/weibo/):大三上《应用基础实践二》的微博应用程序代码。
13 | - [express](/express/):大三上《应用基础实践二》的基于二维码的快递信息保护系统程序代码。
14 | - [java](/java/):郭克华、黄家玮老师的《Java语言与系统设计》课程大作业代码。
15 |
16 | ## 说明
17 |
18 | 1. 部分目录中还含有多个子文件夹,用以区分“实验一”、“实验二”等或区分前端、后端代码。具体见各文件夹中的 `README.md`。另外部分实验c代码由于先前已上传至 GitHub 仓库上,故此处作为子模块引入,将此仓库代码 clone 至本地时注意添加相关参数以拉取子模块。
19 | 2. 大三上《应用基础实践一》摆烂开抄了[学长的代码](https://github.com/leo6033/Java_Project),因此该仓库中不含此实验。
20 | 3. 一部分实验代码可能暂未找到,或需要脱敏检查,会较晚上传。
21 | 4. 不为使用该仓库代码而引起的各种问题负责,仅供学习参考。
--------------------------------------------------------------------------------
/android/MyApplication/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/android/MyApplication/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/android/MyApplication/.idea/.name:
--------------------------------------------------------------------------------
1 | My Application
--------------------------------------------------------------------------------
/android/MyApplication/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/MyApplication/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
20 |
21 |
--------------------------------------------------------------------------------
/android/MyApplication/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/android/MyApplication/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/android/MyApplication/app/src/androidTest/java/cn/magicalsheep/myapplication/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.myapplication
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("cn.magicalsheep.myapplication", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/java/cn/magicalsheep/myapplication/Repository.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.myapplication
2 |
3 | object Repository {
4 | val methodList = StringBuilder()
5 | val status = HashMap()
6 | }
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/java/cn/magicalsheep/myapplication/SimpleDialog.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.myapplication
2 |
3 | import android.app.AlertDialog
4 | import android.app.Dialog
5 | import android.os.Bundle
6 | import androidx.fragment.app.DialogFragment
7 |
8 | class SimpleDialog : DialogFragment() {
9 |
10 | override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
11 | return activity?.let {
12 | val builder = AlertDialog.Builder(it)
13 | builder.setMessage(R.string.simple_dialog)
14 | .setNeutralButton(R.string.close) { _, _ -> }
15 | builder.create()
16 | } ?: throw IllegalStateException("Activity cannot be null")
17 | }
18 | }
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Activity Lifecycle
3 | Start A
4 | Start B
5 | Start C
6 | Finish A
7 | Finish B
8 | Finish C
9 | Dialog
10 | Activity A
11 | Activity B
12 | Activity C
13 | Lifecycle Method List
14 | Activity Status
15 | Simple Dialog
16 | Close
17 |
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/android/MyApplication/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/android/MyApplication/app/src/test/java/cn/magicalsheep/myapplication/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.myapplication
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/android/MyApplication/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | plugins {
3 | id 'com.android.application' version '7.3.0' apply false
4 | id 'com.android.library' version '7.3.0' apply false
5 | id 'org.jetbrains.kotlin.android' version '1.7.10' apply false
6 | }
--------------------------------------------------------------------------------
/android/MyApplication/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/MyApplication/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Oct 25 10:11:13 CST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/android/MyApplication/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | google()
5 | mavenCentral()
6 | }
7 | }
8 | dependencyResolutionManagement {
9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10 | repositories {
11 | google()
12 | mavenCentral()
13 | }
14 | }
15 | rootProject.name = "My Application"
16 | include ':app'
17 |
--------------------------------------------------------------------------------
/android/MyApplication2/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/android/MyApplication2/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/android/MyApplication2/.idea/.name:
--------------------------------------------------------------------------------
1 | My Application
--------------------------------------------------------------------------------
/android/MyApplication2/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/MyApplication2/.idea/deploymentTargetDropDown.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/android/MyApplication2/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/android/MyApplication2/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication2/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/android/MyApplication2/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/android/MyApplication2/app/release/app-release.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication2/app/release/app-release.apk
--------------------------------------------------------------------------------
/android/MyApplication2/app/release/output-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "artifactType": {
4 | "type": "APK",
5 | "kind": "Directory"
6 | },
7 | "applicationId": "cn.magicalsheep.myapplication",
8 | "variantName": "release",
9 | "elements": [
10 | {
11 | "type": "SINGLE",
12 | "filters": [],
13 | "attributes": [],
14 | "versionCode": 1,
15 | "versionName": "1.0",
16 | "outputFile": "app-release.apk"
17 | }
18 | ],
19 | "elementType": "File"
20 | }
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/androidTest/java/cn/magicalsheep/myapplication/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.myapplication
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("cn.magicalsheep.myapplication", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/java/cn/magicalsheep/myapplication/data/PhotoService.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.myapplication.data
2 |
3 | import cn.magicalsheep.myapplication.data.model.Photos
4 | import okhttp3.ResponseBody
5 | import retrofit2.Call
6 | import retrofit2.Retrofit
7 | import retrofit2.converter.gson.GsonConverterFactory
8 | import retrofit2.http.GET
9 | import retrofit2.http.Query
10 | import retrofit2.http.Url
11 |
12 | const val baseUrl = "https://api.nasa.gov/"
13 | val photoService: PhotoService = Retrofit.Builder()
14 | .baseUrl(baseUrl)
15 | .addConverterFactory(GsonConverterFactory.create())
16 | .build()
17 | .create(PhotoService::class.java);
18 |
19 | interface PhotoService {
20 | @GET("mars-photos/api/v1/rovers/curiosity/photos")
21 | fun allPhotos(@Query("sol") sol: Int, @Query("api_key") apiKey: String): Call
22 |
23 | @GET
24 | fun downloadPhoto(@Url url: String): Call
25 | }
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/java/cn/magicalsheep/myapplication/data/model/Camera.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.myapplication.data.model
2 |
3 | import com.google.gson.annotations.SerializedName
4 |
5 | data class Camera(
6 | val id: Int,
7 | val name: String,
8 | @SerializedName("rover_id")
9 | val roverId: Int,
10 | @SerializedName("full_name")
11 | val fullName: String,
12 | )
13 |
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/java/cn/magicalsheep/myapplication/data/model/Photo.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.myapplication.data.model
2 |
3 | import com.google.gson.annotations.SerializedName
4 |
5 | data class Photo(
6 | val id: Int,
7 | val sol: Int,
8 | val camera: Camera,
9 | @SerializedName("img_src")
10 | val imgSrc: String,
11 | @SerializedName("earth_date")
12 | val earthDate: String,
13 | val rover: Rover,
14 | )
15 |
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/java/cn/magicalsheep/myapplication/data/model/PhotoEntry.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.myapplication.data.model
2 |
3 | import android.provider.BaseColumns
4 |
5 | object PhotoEntry : BaseColumns {
6 | const val TABLE_NAME = "photo_cache"
7 | const val COLUMN_NAME_URL = "url"
8 | const val COLUMN_NAME_IMAGE = "image"
9 | }
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/java/cn/magicalsheep/myapplication/data/model/Photos.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.myapplication.data.model
2 |
3 | data class Photos(
4 | val photos: List
5 | )
6 |
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/java/cn/magicalsheep/myapplication/data/model/Rover.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.myapplication.data.model
2 |
3 | import com.google.gson.annotations.SerializedName
4 |
5 | data class Rover(
6 | val id: Int,
7 | val name: String,
8 | @SerializedName("landing_date")
9 | val landingDate: String,
10 | @SerializedName("launch_date")
11 | val launchDate: String,
12 | val status: String,
13 | )
14 |
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/layout/image_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication2/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication2/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication2/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication2/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication2/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication2/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication2/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication2/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication2/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication2/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | NASA Curiosity
3 | Failed to get meta information from API
4 |
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/android/MyApplication2/app/src/test/java/cn/magicalsheep/myapplication/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.myapplication
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/android/MyApplication2/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | plugins {
3 | id 'com.android.application' version '7.3.0' apply false
4 | id 'com.android.library' version '7.3.0' apply false
5 | id 'org.jetbrains.kotlin.android' version '1.7.10' apply false
6 | }
--------------------------------------------------------------------------------
/android/MyApplication2/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication2/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/MyApplication2/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Nov 16 10:49:49 CST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/android/MyApplication2/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | google()
5 | mavenCentral()
6 | }
7 | }
8 | dependencyResolutionManagement {
9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10 | repositories {
11 | google()
12 | mavenCentral()
13 | }
14 | }
15 | rootProject.name = "My Application"
16 | include ':app'
17 |
--------------------------------------------------------------------------------
/android/MyApplication3/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/android/MyApplication3/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/android/MyApplication3/.idea/.name:
--------------------------------------------------------------------------------
1 | My Application
--------------------------------------------------------------------------------
/android/MyApplication3/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/MyApplication3/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/android/MyApplication3/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/android/MyApplication3/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/android/MyApplication3/app/release/app-release.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication3/app/release/app-release.apk
--------------------------------------------------------------------------------
/android/MyApplication3/app/release/output-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "artifactType": {
4 | "type": "APK",
5 | "kind": "Directory"
6 | },
7 | "applicationId": "cn.magicalsheep.myapplication",
8 | "variantName": "release",
9 | "elements": [
10 | {
11 | "type": "SINGLE",
12 | "filters": [],
13 | "attributes": [],
14 | "versionCode": 1,
15 | "versionName": "1.0",
16 | "outputFile": "app-release.apk"
17 | }
18 | ],
19 | "elementType": "File"
20 | }
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/androidTest/java/cn/magicalsheep/myapplication/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.myapplication
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("cn.magicalsheep.myapplication", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/java/cn/magicalsheep/myapplication/data/entity/Report.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.myapplication.data.entity
2 |
3 | import java.util.Date
4 |
5 | data class Refer(
6 | val sources: List,
7 | val license: List
8 | )
9 |
10 | data class Report(
11 | val code: String,
12 | val updateTime: Date,
13 | val fxLink: String,
14 | val daily: List,
15 | val refer: Refer
16 | )
17 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/cloud_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon1001.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon1006.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon1014.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon1017.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon1019.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon1021.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon1037.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon1041.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon1042.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon1302.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon1402.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon150.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon150_fill.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon1605.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon2001.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon2003.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon2006.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
11 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon2011.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon2016.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon2023.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon305_fill.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
11 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon306_fill.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
11 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon313_fill.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon314_fill.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon399.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon399_fill.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon404_fill.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon500_fill.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon501_fill.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon502.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon502_fill.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon509_fill.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon510_fill.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon514_fill.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon800.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon801.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon802.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon803.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon804.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon805.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon806.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon807.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon900.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon900_fill.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon901.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon901_fill.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon999.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon9998.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/drawable/icon9999.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/menu/toolbar_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication3/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication3/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication3/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication3/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication3/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication3/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication3/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication3/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication3/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication3/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/navigation/primary_details_sub_nav_graph.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/values-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 48dp
4 | 48dp
5 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/values-w600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 48dp
4 | 48dp
5 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - Celsius
4 | - Fahrenheit
5 |
6 |
7 |
8 | - celsius
9 | - fahrenheit
10 |
11 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 200dp
5 | 200dp
6 | 16dp
7 | 8dp
8 | 16dp
9 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Sunshine
3 | Detail
4 | Weather icon
5 | Settings
6 | Map Location
7 | Weather Notifications
8 | Temperature Units
9 | Celsius
10 | Fahrenheit
11 | Location
12 | 长沙
13 | Share
14 | Default Channel
15 | Default Channel Description
16 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/main/res/xml/root_preferences.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
16 |
17 |
20 |
21 |
--------------------------------------------------------------------------------
/android/MyApplication3/app/src/test/java/cn/magicalsheep/myapplication/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.myapplication
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/android/MyApplication3/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | plugins {
3 | id 'com.android.application' version '7.3.1' apply false
4 | id 'com.android.library' version '7.3.1' apply false
5 | id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
6 | }
--------------------------------------------------------------------------------
/android/MyApplication3/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/android/MyApplication3/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/MyApplication3/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Nov 28 16:13:31 CST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/android/MyApplication3/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | google()
5 | mavenCentral()
6 | }
7 | }
8 | dependencyResolutionManagement {
9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10 | repositories {
11 | google()
12 | mavenCentral()
13 | }
14 | }
15 | rootProject.name = "My Application"
16 | include ':app'
17 |
--------------------------------------------------------------------------------
/android/README.md:
--------------------------------------------------------------------------------
1 | - [MyApplication](/android/MyApplication/):实验一 Activity的生命周期及Intent
2 | - [MyApplication2](/android/MyApplication2/):实验二 火星探测车拍摄照片展示应用实现
3 | - [MyApplication3](/android/MyApplication3/):实验三 天气预报应用实现
--------------------------------------------------------------------------------
/express/Expressui/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/express/Expressui/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/express/Expressui/.idea/.name:
--------------------------------------------------------------------------------
1 | Express-ui
--------------------------------------------------------------------------------
/express/Expressui/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/express/Expressui/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/express/Expressui/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/express/Expressui/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/express/Expressui/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/express/Expressui/app/release/app-release.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/express/Expressui/app/release/app-release.apk
--------------------------------------------------------------------------------
/express/Expressui/app/release/output-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "artifactType": {
4 | "type": "APK",
5 | "kind": "Directory"
6 | },
7 | "applicationId": "cn.magicalsheep.expressui",
8 | "variantName": "release",
9 | "elements": [
10 | {
11 | "type": "SINGLE",
12 | "filters": [],
13 | "attributes": [],
14 | "versionCode": 1,
15 | "versionName": "1.0",
16 | "outputFile": "app-release.apk"
17 | }
18 | ],
19 | "elementType": "File"
20 | }
--------------------------------------------------------------------------------
/express/Expressui/app/src/androidTest/java/cn/magicalsheep/expressui/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressui
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("cn.magicalsheep.expressui", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/java/cn/magicalsheep/expressui/data/UnauthorizedException.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressui.data
2 |
3 | class UnauthorizedException : Exception()
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/java/cn/magicalsheep/expressui/data/entity/Package.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressui.data.entity
2 |
3 | import java.io.Serializable
4 | import java.util.*
5 |
6 | data class Package(
7 | val id: Long,
8 | var senderName: String,
9 | var senderAddress: String,
10 | var senderPhone: String,
11 | var receiverName: String,
12 | var receiverAddress: String,
13 | var receiverPhone: String,
14 | var description: String,
15 | var weight: Double,
16 | var freight: Double,
17 | var position: String,
18 | var sendTime: Date,
19 | var isRecv: Boolean,
20 | var recvTime: Date? = null
21 | ) : Serializable
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/java/cn/magicalsheep/expressui/data/entity/Result.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressui.data.entity
2 |
3 | import java.io.Serializable
4 |
5 | data class Result (
6 | val status: Int,
7 | val message: String,
8 | val data: T? = null
9 | ) : Serializable
10 |
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/java/cn/magicalsheep/expressui/data/entity/User.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressui.data.entity
2 |
3 | import java.io.Serializable
4 |
5 | data class User(
6 | val account: String,
7 | val role: String,
8 | val name: String? = null,
9 | val address: String? = null,
10 | val phone: String? = null,
11 | val gender: String? = null
12 | ) : Serializable
13 |
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/java/cn/magicalsheep/expressui/data/entity/UserDto.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressui.data.entity
2 |
3 | import java.io.Serializable
4 |
5 | data class UserDto(
6 | val account: String,
7 | val pwd: String ?= null,
8 | val name: String? = null,
9 | val address: String? = null,
10 | val phone: String? = null,
11 | val gender: String? = null
12 | ) : Serializable
13 |
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/java/cn/magicalsheep/expressui/ui/theme/Color.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressui.ui.theme
2 |
3 | import androidx.compose.ui.graphics.Color
4 |
5 | val Purple80 = Color(0xFFD0BCFF)
6 | val PurpleGrey80 = Color(0xFFCCC2DC)
7 | val Pink80 = Color(0xFFEFB8C8)
8 |
9 | val Purple40 = Color(0xFF6650a4)
10 | val PurpleGrey40 = Color(0xFF625b71)
11 | val Pink40 = Color(0xFF7D5260)
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/drawable-v24/baseline_login_24.xml:
--------------------------------------------------------------------------------
1 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/drawable-v24/baseline_logout_24.xml:
--------------------------------------------------------------------------------
1 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/drawable-v24/baseline_qr_code_scanner_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/express/Expressui/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/express/Expressui/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/express/Expressui/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/express/Expressui/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/express/Expressui/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/express/Expressui/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/express/Expressui/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/express/Expressui/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/express/Expressui/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/express/Expressui/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/express/Expressui/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/express/Expressui/app/src/test/java/cn/magicalsheep/expressui/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressui
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/express/Expressui/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext {
3 | compose_version = '1.1.1'
4 | }
5 | }// Top-level build file where you can add configuration options common to all sub-projects/modules.
6 | plugins {
7 | id 'com.android.application' version '7.3.0' apply false
8 | id 'com.android.library' version '7.3.0' apply false
9 | id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
10 | }
--------------------------------------------------------------------------------
/express/Expressui/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/express/Expressui/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/express/Expressui/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Nov 25 11:05:27 CST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/express/Expressui/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | google()
5 | mavenCentral()
6 | }
7 | }
8 | dependencyResolutionManagement {
9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10 | repositories {
11 | google()
12 | mavenCentral()
13 | }
14 | }
15 | rootProject.name = "Express-ui"
16 | include ':app'
17 |
--------------------------------------------------------------------------------
/express/express-server/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | .gradle
3 | build/
4 | !gradle/wrapper/gradle-wrapper.jar
5 | !**/src/main/**/build/
6 | !**/src/test/**/build/
7 |
8 | ### STS ###
9 | .apt_generated
10 | .classpath
11 | .factorypath
12 | .project
13 | .settings
14 | .springBeans
15 | .sts4-cache
16 | bin/
17 | !**/src/main/**/bin/
18 | !**/src/test/**/bin/
19 |
20 | ### IntelliJ IDEA ###
21 | .idea
22 | *.iws
23 | *.iml
24 | *.ipr
25 | out/
26 | !**/src/main/**/out/
27 | !**/src/test/**/out/
28 |
29 | ### NetBeans ###
30 | /nbproject/private/
31 | /nbbuild/
32 | /dist/
33 | /nbdist/
34 | /.nb-gradle/
35 |
36 | ### VS Code ###
37 | .vscode/
38 |
39 | .jpb/
40 | application.properties
41 |
--------------------------------------------------------------------------------
/express/express-server/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/express/express-server/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/express/express-server/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/express/express-server/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | maven { url = uri("https://repo.spring.io/milestone") }
4 | maven { url = uri("https://repo.spring.io/snapshot") }
5 | gradlePluginPortal()
6 | }
7 | }
8 | rootProject.name = "express-server"
9 |
--------------------------------------------------------------------------------
/express/express-server/src/main/kotlin/cn/magicalsheep/expressserver/entity/DefaultException.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressserver.entity
2 |
3 | class DefaultException(msg: String) : Exception(msg)
--------------------------------------------------------------------------------
/express/express-server/src/main/kotlin/cn/magicalsheep/expressserver/entity/Result.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressserver.entity
2 |
3 | import java.io.Serializable
4 |
5 | data class Result (
6 | val status: Int,
7 | val message: String,
8 | val data: Any? = null
9 | ) : Serializable
10 |
--------------------------------------------------------------------------------
/express/express-server/src/main/kotlin/cn/magicalsheep/expressserver/entity/UnauthorizedException.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressserver.entity
2 |
3 | class UnauthorizedException(msg: String) : Exception(msg)
--------------------------------------------------------------------------------
/express/express-server/src/main/kotlin/cn/magicalsheep/expressserver/entity/dto/PackageDto.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressserver.entity.dto
2 |
3 | import java.io.Serializable
4 | import java.util.*
5 |
6 | data class PackageDto(
7 | val id: Long? = null,
8 | val senderName: String? = null,
9 | val senderAddress: String? = null,
10 | val senderPhone: String? = null,
11 | val receiverName: String? = null,
12 | val receiverAddress: String? = null,
13 | val receiverPhone: String? = null,
14 | val description: String? = null,
15 | val weight: Double? = null,
16 | val freight: Double? = null,
17 | val position: String? = null,
18 | val sendTime: Date? = null,
19 | val isRecv: Boolean? = null,
20 | val recvTime: Date? = null
21 | ) : Serializable
--------------------------------------------------------------------------------
/express/express-server/src/main/kotlin/cn/magicalsheep/expressserver/entity/dto/UserDto.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressserver.entity.dto
2 |
3 | import java.io.Serializable
4 |
5 | data class UserDto(
6 | val account: String,
7 | val pwd: String ?= null,
8 | val name: String? = null,
9 | val address: String? = null,
10 | val phone: String? = null,
11 | val gender: String? = null
12 | ) : Serializable
--------------------------------------------------------------------------------
/express/express-server/src/main/kotlin/cn/magicalsheep/expressserver/entity/vo/UserVo.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressserver.entity.vo
2 |
3 | import cn.magicalsheep.expressserver.entity.pojo.User
4 | import java.io.Serializable
5 |
6 | data class UserVo(
7 | val account: String,
8 | val role: String,
9 | val name: String? = null,
10 | val address: String? = null,
11 | val phone: String? = null,
12 | val gender: String? = null
13 | ) : Serializable {
14 | constructor(user: User) : this(
15 | user.account,
16 | user.role,
17 | user.name,
18 | user.address,
19 | user.phone,
20 | user.gender
21 | )
22 | }
23 |
--------------------------------------------------------------------------------
/express/express-server/src/main/kotlin/cn/magicalsheep/expressserver/repository/PackageRepository.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressserver.repository
2 |
3 | import cn.magicalsheep.expressserver.entity.pojo.Package
4 | import org.springframework.data.jpa.repository.JpaRepository
5 |
6 | interface PackageRepository : JpaRepository
--------------------------------------------------------------------------------
/express/express-server/src/main/kotlin/cn/magicalsheep/expressserver/repository/UserRepository.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressserver.repository
2 |
3 | import cn.magicalsheep.expressserver.entity.pojo.User
4 | import org.springframework.data.jpa.repository.JpaRepository
5 |
6 | interface UserRepository : JpaRepository {
7 |
8 | fun findUserByAccount(account: String): User?
9 | }
--------------------------------------------------------------------------------
/express/express-server/src/main/resources/application.properties.example:
--------------------------------------------------------------------------------
1 | server.port=8080
2 | server.address=0.0.0.0
3 | server.shutdown=graceful
4 | spring.datasource.url=jdbc:mysql://localhost:3306/express
5 | spring.datasource.username=root
6 | spring.datasource.password=password
7 | spring.jpa.hibernate.ddl-auto=update
8 | spring.jackson.default-property-inclusion=non_null
9 | spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
10 | spring.devtools.add-properties=false
11 | logging.level.web=info
12 | spring.jpa.open-in-view=true
--------------------------------------------------------------------------------
/express/express-server/src/main/resources/psw4j.properties:
--------------------------------------------------------------------------------
1 | ### bcrypt
2 | hash.bcrypt.minor=b
3 | # logarithmic cost (cost = 2^12)
4 | hash.bcrypt.rounds=12
--------------------------------------------------------------------------------
/express/express-server/src/test/kotlin/cn/magicalsheep/expressserver/ExpressServerApplicationTests.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.expressserver
2 |
3 | import org.junit.jupiter.api.Test
4 | import org.springframework.boot.test.context.SpringBootTest
5 |
6 | @SpringBootTest
7 | class ExpressServerApplicationTests {
8 |
9 | @Test
10 | fun contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/flight-ui/.gitignore:
--------------------------------------------------------------------------------
1 | target
--------------------------------------------------------------------------------
/flight-ui/src/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Main-Class: cn.magicalsheep.Main
3 |
4 |
--------------------------------------------------------------------------------
/flight-ui/src/main/java/cn/magicalsheep/CallBackInterface.java:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep;
2 |
3 | import java.util.Map;
4 |
5 | /**
6 | * For UI
7 | */
8 | public interface CallBackInterface {
9 |
10 | void success(Map params);
11 |
12 | void failed(Map params);
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/flight-ui/src/main/java/cn/magicalsheep/model/Plane.java:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.model;
2 |
3 | import lombok.*;
4 |
5 | import java.util.Date;
6 |
7 | @Getter
8 | @Setter
9 | @NoArgsConstructor
10 | @AllArgsConstructor
11 | @Builder
12 | public class Plane {
13 |
14 | private String company;
15 | private String name;
16 | private String from;
17 | private String to;
18 | private Date startTime;
19 | private Date endTime;
20 | private String startPlace;
21 | private String endPlace;
22 | private int level1TicketNumber;
23 | private int remainLevel1TicketNumber;
24 | private int level1Price;
25 | private int level2TicketNumber;
26 | private int remainLevel2TicketNumber;
27 | private int level2Price;
28 | private int level3TicketNumber;
29 | private int remainLevel3TicketNumber;
30 | private int level3Price;
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/flight-ui/src/main/resources/log4j2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/java/CET6-Game/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | build/
3 | !gradle/wrapper/gradle-wrapper.jar
4 | !**/src/main/**/build/
5 | !**/src/test/**/build/
6 |
7 | ### IntelliJ IDEA ###
8 | .idea/modules.xml
9 | .idea/jarRepositories.xml
10 | .idea/compiler.xml
11 | .idea/libraries/
12 | *.iws
13 | *.iml
14 | *.ipr
15 | out/
16 | !**/src/main/**/out/
17 | !**/src/test/**/out/
18 |
19 | ### Eclipse ###
20 | .apt_generated
21 | .classpath
22 | .factorypath
23 | .project
24 | .settings
25 | .springBeans
26 | .sts4-cache
27 | bin/
28 | !**/src/main/**/bin/
29 | !**/src/test/**/bin/
30 |
31 | ### NetBeans ###
32 | /nbproject/private/
33 | /nbbuild/
34 | /dist/
35 | /nbdist/
36 | /.nb-gradle/
37 |
38 | ### VS Code ###
39 | .vscode/
40 |
41 | ### Mac OS ###
42 | .DS_Store
--------------------------------------------------------------------------------
/java/CET6-Game/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/java/CET6-Game/.idea/jpa-buddy.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/java/CET6-Game/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/java/CET6-Game/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/java/CET6-Game/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("java")
3 | }
4 |
5 | group = "cn.magicalsheep"
6 | version = "1.0-SNAPSHOT"
7 |
8 | repositories {
9 | mavenCentral()
10 | }
11 |
12 | dependencies {
13 | implementation("org.projectlombok:lombok:1.18.24")
14 | implementation("com.fasterxml.jackson.core:jackson-core:2.14.1")
15 | implementation("com.fasterxml.jackson.core:jackson-databind:2.14.1")
16 | implementation("org.apache.logging.log4j:log4j-api:2.19.0")
17 | implementation("org.apache.logging.log4j:log4j-core:2.19.0")
18 | implementation("com.jgoodies:jgoodies-forms:1.9.0")
19 | implementation("com.formdev:flatlaf:2.6")
20 | annotationProcessor("org.projectlombok:lombok:1.18.24")
21 | }
22 |
23 | tasks.getByName("test") {
24 | useJUnitPlatform()
25 | }
--------------------------------------------------------------------------------
/java/CET6-Game/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/CET6-Game/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/java/CET6-Game/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/java/CET6-Game/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | rootProject.name = "CET6-Game"
2 |
3 |
--------------------------------------------------------------------------------
/java/CET6-Game/src/main/java/cn/magicalsheep/common/Utils.java:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.common;
2 |
3 | public class Utils {
4 | public static final long INTERVAL = 10000L;
5 |
6 | public static final long INTERVAL_CLIENT = 11000L;
7 |
8 | public static final int ROUND_NUM = 10;
9 |
10 | public static final String WORKING_DIR = System.getProperty("user.dir");
11 |
12 | public static final String FILE_SEPARATOR = System.getProperty("file.separator");
13 | }
14 |
--------------------------------------------------------------------------------
/java/CET6-Game/src/main/java/cn/magicalsheep/common/Validate.java:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.common;
2 |
3 | public interface Validate {
4 |
5 | boolean validate();
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/java/CET6-Game/src/main/java/cn/magicalsheep/common/request/Mode1AnswerRequest.java:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.common.request;
2 |
3 | import cn.magicalsheep.common.Validate;
4 |
5 | import java.io.Serializable;
6 |
7 | public record Mode1AnswerRequest(
8 | String word
9 | ) implements Serializable, Validate {
10 | @Override
11 | public boolean validate() {
12 | return true;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/java/CET6-Game/src/main/java/cn/magicalsheep/common/request/Mode2AnswerRequest.java:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.common.request;
2 |
3 | import cn.magicalsheep.common.Validate;
4 |
5 | import java.io.Serializable;
6 |
7 | public record Mode2AnswerRequest(
8 | int answer
9 | ) implements Serializable, Validate {
10 |
11 | public boolean validate() {
12 | return answer >= 1 && answer <= 4;
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/java/CET6-Game/src/main/java/cn/magicalsheep/common/request/ModeRequest.java:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.common.request;
2 |
3 | import cn.magicalsheep.common.Validate;
4 |
5 | import java.io.Serializable;
6 |
7 | public record ModeRequest(
8 | int mode
9 | ) implements Serializable, Validate {
10 |
11 | @Override
12 | public boolean validate() {
13 | return mode >= 1 && mode <= 2;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/java/CET6-Game/src/main/java/cn/magicalsheep/common/response/Mode1Question.java:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.common.response;
2 |
3 | import java.io.Serializable;
4 |
5 | public record Mode1Question(
6 | String mean,
7 | String tips,
8 | int remain
9 | ) implements Serializable {
10 | }
11 |
--------------------------------------------------------------------------------
/java/CET6-Game/src/main/java/cn/magicalsheep/common/response/Mode2Question.java:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.common.response;
2 |
3 | import java.io.Serializable;
4 | import java.util.List;
5 |
6 | public record Mode2Question(
7 | String word,
8 | List options
9 | ) implements Serializable {
10 | }
11 |
--------------------------------------------------------------------------------
/java/CET6-Game/src/main/java/cn/magicalsheep/common/response/ModeResult.java:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.common.response;
2 |
3 | import java.io.Serializable;
4 |
5 | public record ModeResult(
6 | boolean isTrue,
7 | String msg,
8 | int currentScore,
9 | String answer
10 | ) implements Serializable {
11 | }
12 |
--------------------------------------------------------------------------------
/java/CET6-Game/src/main/java/cn/magicalsheep/server/model/ChTrans.java:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.server.model;
2 |
3 | import lombok.*;
4 |
5 | import java.util.ArrayList;
6 | import java.util.List;
7 |
8 | @Getter
9 | @Setter
10 | @Builder(toBuilder = true)
11 | public class ChTrans {
12 | private int id;
13 | private String pos;
14 | private final List mean = new ArrayList<>();
15 | }
16 |
--------------------------------------------------------------------------------
/java/CET6-Game/src/main/java/cn/magicalsheep/server/model/DictEntry.java:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.server.model;
2 |
3 | import lombok.Getter;
4 | import lombok.Setter;
5 |
6 | import java.util.ArrayList;
7 | import java.util.List;
8 |
9 | @Getter
10 | @Setter
11 | public class DictEntry {
12 | private String enS;
13 | private final List chS = new ArrayList<>();
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/java/CET6-Game/src/main/resources/log4j2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/java/README.md:
--------------------------------------------------------------------------------
1 | - [CET6-Game](/java/CET6-Game/):郭克华老师的课程实验——“六级单词强化记忆”游戏。
2 | - [hjw-lab](/java/hjw-lab/):黄家玮老师的课程实验,因硬盘损坏,附加实验(四则运算计算器)的代码暂未找到。
--------------------------------------------------------------------------------
/java/hjw-lab/1/build/Five.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/1/build/Five.class
--------------------------------------------------------------------------------
/java/hjw-lab/1/build/Four.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/1/build/Four.class
--------------------------------------------------------------------------------
/java/hjw-lab/1/build/One.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/1/build/One.class
--------------------------------------------------------------------------------
/java/hjw-lab/1/build/Three.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/1/build/Three.class
--------------------------------------------------------------------------------
/java/hjw-lab/1/build/Two.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/1/build/Two.class
--------------------------------------------------------------------------------
/java/hjw-lab/1/code/Five.java:
--------------------------------------------------------------------------------
1 | public class Five {
2 |
3 | private static int func(int x) {
4 | int ret = 1;
5 | for (int i = 2; i <= x; i++)
6 | ret *= i;
7 | return ret;
8 | }
9 |
10 | public static void main(String[] args) {
11 | int sum = 0;
12 | for (int i = 1; i <= 10; i++)
13 | sum += func(i);
14 | System.out.println(sum);
15 | }
16 | }
--------------------------------------------------------------------------------
/java/hjw-lab/1/code/Four.java:
--------------------------------------------------------------------------------
1 | public class Four {
2 | public static void main(String[] args) {
3 | int sum = 0;
4 | for (int i = 2; i <= 1000; i += 2)
5 | sum += i;
6 | // int i = 2;
7 | // while (i <= 1000) {
8 | // sum += i;
9 | // i += 2;
10 | // }
11 | System.out.println(sum);
12 | }
13 | }
--------------------------------------------------------------------------------
/java/hjw-lab/1/code/One.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class One {
4 | public static void main(String[] args) {
5 | int x, y, z;
6 | Scanner scanner = new Scanner(System.in);
7 | x = scanner.nextInt();
8 | y = scanner.nextInt();
9 | z = scanner.nextInt();
10 | x *= x;
11 | y *= y;
12 | z *= z;
13 | if ((x + y == z) || (x + z == y) || (y + z == x))
14 | System.out.println("是直角三角形");
15 | else
16 | System.out.println("不是直角三角形");
17 | }
18 | }
--------------------------------------------------------------------------------
/java/hjw-lab/1/code/Three.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Three {
4 |
5 | private static double func(double weight, double val) {
6 | if (val < 100)
7 | return 1.0 * weight * val;
8 | else if (val >= 100 && val < 300)
9 | return 0.9 * weight * val;
10 | else if (val >= 300 && val < 500)
11 | return 0.8 * weight * val;
12 | else if (val >= 500 && val < 1000)
13 | return 0.7 * weight * val;
14 | else
15 | return 0.6 * weight * val;
16 | }
17 |
18 | public static void main(String[] args) {
19 | double weight, val;
20 | Scanner scanner = new Scanner(System.in);
21 | weight = scanner.nextDouble();
22 | val = scanner.nextDouble();
23 | System.out.println(func(weight, val));
24 | }
25 | }
--------------------------------------------------------------------------------
/java/hjw-lab/1/code/Two.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Two {
4 | public static void main(String[] args) {
5 | int x;
6 | Scanner scanner = new Scanner(System.in);
7 | x = scanner.nextInt();
8 | if (x < 0 || x > 9999) {
9 | System.out.println("输入的数字范围应为[0, 9999]");
10 | return;
11 | }
12 | if (x < 10)
13 | System.out.println("这个数是一位数");
14 | else if (x < 100)
15 | System.out.println("这个数是两位数");
16 | else if (x < 1000)
17 | System.out.println("这个数是三位数");
18 | else
19 | System.out.println("这个数是四位数");
20 | }
21 | }
--------------------------------------------------------------------------------
/java/hjw-lab/1/compile.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/1/compile.bat
--------------------------------------------------------------------------------
/java/hjw-lab/1/run.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/1/run.bat
--------------------------------------------------------------------------------
/java/hjw-lab/2/build/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/2/build/Main.class
--------------------------------------------------------------------------------
/java/hjw-lab/2/build/Student.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/2/build/Student.class
--------------------------------------------------------------------------------
/java/hjw-lab/2/compile.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/2/compile.bat
--------------------------------------------------------------------------------
/java/hjw-lab/2/run.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/2/run.bat
--------------------------------------------------------------------------------
/java/hjw-lab/3/build/Circle.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/3/build/Circle.class
--------------------------------------------------------------------------------
/java/hjw-lab/3/build/Cylinder.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/3/build/Cylinder.class
--------------------------------------------------------------------------------
/java/hjw-lab/3/build/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/3/build/Main.class
--------------------------------------------------------------------------------
/java/hjw-lab/3/build/Sphere.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/3/build/Sphere.class
--------------------------------------------------------------------------------
/java/hjw-lab/3/code/Circle.java:
--------------------------------------------------------------------------------
1 | public class Circle {
2 |
3 | private final double radius;
4 |
5 | public Circle() {
6 | radius = 0;
7 | }
8 |
9 | public Circle(double r) {
10 | radius = r;
11 | }
12 |
13 | public double getRadius() {
14 | return radius;
15 | }
16 |
17 | public double getPerimeter() {
18 | return 2 * Math.PI * radius;
19 | }
20 |
21 | public double area() {
22 | return Math.PI * radius * radius;
23 | }
24 |
25 | public void disp() {
26 | System.out.println(this);
27 | }
28 |
29 | @Override
30 | public String toString() {
31 | return "{半径 = " + radius +
32 | ", 周长 = " + getPerimeter() +
33 | ", 面积 = " + area() + "}";
34 | }
35 |
36 | }
--------------------------------------------------------------------------------
/java/hjw-lab/3/code/Cylinder.java:
--------------------------------------------------------------------------------
1 | public class Cylinder extends Circle {
2 | private final double height;
3 |
4 | public Cylinder(double r, double h) {
5 | super(r);
6 | this.height = h;
7 | }
8 |
9 | public double getHeight() {
10 | return height;
11 | }
12 |
13 | public double getVol() {
14 | return area() * height;
15 | }
16 |
17 | public double getArea() {
18 | return 2 * area() + getPerimeter() * height;
19 | }
20 |
21 | @Override
22 | public void disp() {
23 | System.out.println(this);
24 | }
25 |
26 | @Override
27 | public String toString() {
28 | return "{半径 = " + getRadius() +
29 | ", 高 = " + height +
30 | ", 体积 = " + getVol() +
31 | ", 面积 = " + getArea() + "}";
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/java/hjw-lab/3/code/Sphere.java:
--------------------------------------------------------------------------------
1 | public class Sphere extends Circle {
2 | public Sphere() {
3 | super();
4 | }
5 |
6 | public Sphere(double r) {
7 | super(r);
8 | }
9 |
10 | public double getVol() {
11 | return 4 * Math.PI * Math.pow(getRadius(), 3) / 3;
12 | }
13 |
14 | public double getArea() {
15 | return 4 * Math.PI * Math.pow(getRadius(), 2);
16 | }
17 |
18 | @Override
19 | public void disp() {
20 | System.out.println(this);
21 | }
22 |
23 | @Override
24 | public String toString() {
25 | return "{半径 = " + getRadius() +
26 | ", 体积 = " + getVol() +
27 | ", 面积 = " + getArea() + "}";
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/java/hjw-lab/3/compile.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/3/compile.bat
--------------------------------------------------------------------------------
/java/hjw-lab/3/run.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/3/run.bat
--------------------------------------------------------------------------------
/java/hjw-lab/4/build/Circle.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/4/build/Circle.class
--------------------------------------------------------------------------------
/java/hjw-lab/4/build/Graduate.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/4/build/Graduate.class
--------------------------------------------------------------------------------
/java/hjw-lab/4/build/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/4/build/Main.class
--------------------------------------------------------------------------------
/java/hjw-lab/4/build/Rectangle.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/4/build/Rectangle.class
--------------------------------------------------------------------------------
/java/hjw-lab/4/build/Shape.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/4/build/Shape.class
--------------------------------------------------------------------------------
/java/hjw-lab/4/build/StudentInterface.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/4/build/StudentInterface.class
--------------------------------------------------------------------------------
/java/hjw-lab/4/build/TeacherInterface.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/4/build/TeacherInterface.class
--------------------------------------------------------------------------------
/java/hjw-lab/4/code/Circle.java:
--------------------------------------------------------------------------------
1 | public class Circle extends Shape {
2 |
3 | private final double radius;
4 |
5 | public Circle() {
6 | this.radius = 0;
7 | }
8 |
9 | public Circle(double r) {
10 | this.radius = r;
11 | }
12 |
13 | @Override
14 | public double getArea() {
15 | return Math.PI * radius * radius;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/java/hjw-lab/4/code/Rectangle.java:
--------------------------------------------------------------------------------
1 | public class Rectangle extends Shape {
2 |
3 | private final double weight;
4 | private final double height;
5 |
6 | public Rectangle() {
7 | this.weight = 0;
8 | this.height = 0;
9 | }
10 |
11 | public Rectangle(double weight, double height) {
12 | this.weight = weight;
13 | this.height = height;
14 | }
15 |
16 | @Override
17 | public double getArea() {
18 | return weight * height;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/java/hjw-lab/4/code/Shape.java:
--------------------------------------------------------------------------------
1 | public abstract class Shape {
2 | public abstract double getArea();
3 | }
4 |
--------------------------------------------------------------------------------
/java/hjw-lab/4/code/StudentInterface.java:
--------------------------------------------------------------------------------
1 | public interface StudentInterface {
2 |
3 | void setFee(double fee);
4 |
5 | double getFee();
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/java/hjw-lab/4/code/TeacherInterface.java:
--------------------------------------------------------------------------------
1 | public interface TeacherInterface {
2 |
3 | void setPay(double pay);
4 |
5 | double getPay();
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/java/hjw-lab/4/compile.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/4/compile.bat
--------------------------------------------------------------------------------
/java/hjw-lab/4/run.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/4/run.bat
--------------------------------------------------------------------------------
/java/hjw-lab/5/build/IllegalAgeException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/5/build/IllegalAgeException.class
--------------------------------------------------------------------------------
/java/hjw-lab/5/build/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/5/build/Main.class
--------------------------------------------------------------------------------
/java/hjw-lab/5/build/Person.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/5/build/Person.class
--------------------------------------------------------------------------------
/java/hjw-lab/5/code/IllegalAgeException.java:
--------------------------------------------------------------------------------
1 | public class IllegalAgeException extends Exception {
2 |
3 | public IllegalAgeException(int age) {
4 | super("年龄" + age + "不符合要求,年龄范围应为[1, 150]");
5 | }
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/java/hjw-lab/5/code/Main.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Main {
4 | public static void main(String[] args) {
5 | Scanner scanner = new Scanner(System.in);
6 | Person person = new Person();
7 | System.out.println("请输入Person姓名:");
8 | String name = scanner.nextLine();
9 | person.setName(name);
10 | System.out.println("请输入Person性别(男/女):");
11 | String sex = scanner.nextLine();
12 | person.setSex(sex);
13 | System.out.println("请输入Person年龄:");
14 | int age = scanner.nextInt();
15 | try {
16 | person.setAge(age);
17 | System.out.println(person);
18 | } catch (IllegalAgeException e) {
19 | System.out.println(e.getMessage());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/java/hjw-lab/5/code/Person.java:
--------------------------------------------------------------------------------
1 | public class Person {
2 |
3 | private String name;
4 | private int age;
5 | private String sex;
6 |
7 | public String getSex() {
8 | return sex;
9 | }
10 |
11 | public String getName() {
12 | return name;
13 | }
14 |
15 | public int getAge() {
16 | return age;
17 | }
18 |
19 | public void setSex(String sex) {
20 | this.sex = sex;
21 | }
22 |
23 | public void setAge(int age) throws IllegalAgeException {
24 | if (age < 1 || age > 150)
25 | throw new IllegalAgeException(age);
26 | this.age = age;
27 | }
28 |
29 | public void setName(String name) {
30 | this.name = name;
31 | }
32 |
33 | @Override
34 | public String toString() {
35 | return "{姓名:" + name + ", 性别:" + sex + ", 年龄:" + age + "}";
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/java/hjw-lab/5/compile.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/5/compile.bat
--------------------------------------------------------------------------------
/java/hjw-lab/5/run.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/5/run.bat
--------------------------------------------------------------------------------
/java/hjw-lab/6/build/One.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/6/build/One.class
--------------------------------------------------------------------------------
/java/hjw-lab/6/build/Task.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/6/build/Task.class
--------------------------------------------------------------------------------
/java/hjw-lab/6/build/TaskOne.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/6/build/TaskOne.class
--------------------------------------------------------------------------------
/java/hjw-lab/6/build/TaskTwo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/6/build/TaskTwo.class
--------------------------------------------------------------------------------
/java/hjw-lab/6/build/Two.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/6/build/Two.class
--------------------------------------------------------------------------------
/java/hjw-lab/6/code/One.java:
--------------------------------------------------------------------------------
1 | import java.util.Random;
2 |
3 | public class One {
4 | public static void main(String[] args) {
5 | for (int i = 1; i <= 3; i++)
6 | new Task("线程" + i).start();
7 | }
8 | }
9 |
10 | class Task extends Thread {
11 |
12 | private final Random random = new Random();
13 | private static final int bound = 1000;
14 |
15 | public Task(String name) {
16 | this.setName(name);
17 | }
18 |
19 | @Override
20 | public void run() {
21 | System.out.println(this.getName() + "已创建");
22 | try {
23 | sleep(random.nextInt(bound) + 1);
24 | } catch (InterruptedException e) {
25 | e.printStackTrace();
26 | }
27 | System.out.println(this.getName() + "已退出");
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/java/hjw-lab/6/compile.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/6/compile.bat
--------------------------------------------------------------------------------
/java/hjw-lab/6/run.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/6/run.bat
--------------------------------------------------------------------------------
/java/hjw-lab/7/build/Five.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/7/build/Five.class
--------------------------------------------------------------------------------
/java/hjw-lab/7/build/Four.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/7/build/Four.class
--------------------------------------------------------------------------------
/java/hjw-lab/7/build/One.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/7/build/One.class
--------------------------------------------------------------------------------
/java/hjw-lab/7/build/Six.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/7/build/Six.class
--------------------------------------------------------------------------------
/java/hjw-lab/7/build/Three.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/7/build/Three.class
--------------------------------------------------------------------------------
/java/hjw-lab/7/build/Two.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/7/build/Two.class
--------------------------------------------------------------------------------
/java/hjw-lab/7/code/Five.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Five {
4 | public static void main(String[] args) {
5 | Scanner scanner = new Scanner(System.in);
6 | String str = scanner.nextLine();
7 | String dest = scanner.nextLine();
8 | int ans = 0, st = 0;
9 | while (true) {
10 | st = str.indexOf(dest, st);
11 | if (st == -1)
12 | break;
13 | st += dest.length();
14 | ++ans;
15 | }
16 | System.out.println(ans);
17 | }
18 | }
--------------------------------------------------------------------------------
/java/hjw-lab/7/code/Four.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Four {
4 | public static void main(String[] args) {
5 | boolean[] vis = new boolean[256];
6 | Scanner scanner = new Scanner(System.in);
7 | char[] str = scanner.nextLine().toCharArray();
8 | StringBuilder ret = new StringBuilder();
9 | for (char c : str) {
10 | if (!vis[c])
11 | ret.append(c);
12 | vis[c] = true;
13 | }
14 | System.out.println(ret);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/java/hjw-lab/7/code/One.java:
--------------------------------------------------------------------------------
1 | import java.util.Locale;
2 | import java.util.Scanner;
3 |
4 | public class One {
5 | public static void main(String[] args) {
6 | Scanner scanner = new Scanner(System.in);
7 | String str = scanner.nextLine();
8 | String low = str.toLowerCase(Locale.ROOT);
9 | StringBuilder ret = new StringBuilder();
10 | for (int i = 0; i < str.length(); i++) {
11 | if (str.charAt(i) == low.charAt(i) &&
12 | (low.charAt(i) >= 'a' && low.charAt(i) <= 'z'))
13 | ret.append((char) (low.charAt(i) - 32));
14 | else ret.append(low.charAt(i));
15 | }
16 | System.out.println(ret);
17 | }
18 | }
--------------------------------------------------------------------------------
/java/hjw-lab/7/code/Six.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Six {
4 | public static void main(String[] args) {
5 | Scanner scanner = new Scanner(System.in);
6 | String str = scanner.nextLine();
7 | str = new StringBuilder(str).reverse().toString()
8 | .replaceAll("\\d{3}(?!$)", "$0,");
9 | str = new StringBuilder(str).reverse().toString();
10 | System.out.println(str);
11 | }
12 | }
--------------------------------------------------------------------------------
/java/hjw-lab/7/code/Three.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Three {
4 | public static void main(String[] args) {
5 | Scanner scanner = new Scanner(System.in);
6 | String str1 = scanner.nextLine();
7 | String str2 = scanner.nextLine();
8 | str1 = str1.replaceAll(str2, "");
9 | System.out.println(str1);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/java/hjw-lab/7/code/Two.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Two {
4 | public static void main(String[] args) {
5 | Scanner scanner = new Scanner(System.in);
6 | char[] str = scanner.nextLine().toCharArray();
7 | int l = 0, r = str.length - 1;
8 | while (l < r) {
9 | if (str[l] != str[r]) {
10 | System.out.println("不是回文串");
11 | return;
12 | }
13 | ++l;
14 | --r;
15 | }
16 | System.out.println("是回文串");
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/java/hjw-lab/7/compile.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/7/compile.bat
--------------------------------------------------------------------------------
/java/hjw-lab/7/run.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/7/run.bat
--------------------------------------------------------------------------------
/java/hjw-lab/8/build/Four.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/8/build/Four.class
--------------------------------------------------------------------------------
/java/hjw-lab/8/build/One.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/8/build/One.class
--------------------------------------------------------------------------------
/java/hjw-lab/8/build/PRIME.DAT:
--------------------------------------------------------------------------------
1 | 2
2 | 3
3 | 5
4 | 7
5 | 11
6 | 13
7 | 17
8 | 19
9 | 23
10 | 29
11 | 31
12 | 37
13 | 41
14 | 43
15 | 47
16 | 53
17 | 59
18 | 61
19 | 67
20 | 71
21 | 73
22 | 79
23 | 83
24 | 89
25 | 97
26 | 101
27 | 103
28 | 107
29 | 109
30 | 113
31 | 127
32 | 131
33 | 137
34 | 139
35 | 149
36 | 151
37 | 157
38 | 163
39 | 167
40 | 173
41 | 179
42 | 181
43 | 191
44 | 193
45 | 197
46 | 199
47 |
--------------------------------------------------------------------------------
/java/hjw-lab/8/build/STUDENT.DAT:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/8/build/STUDENT.DAT
--------------------------------------------------------------------------------
/java/hjw-lab/8/build/Student.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/8/build/Student.class
--------------------------------------------------------------------------------
/java/hjw-lab/8/build/Three.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/8/build/Three.class
--------------------------------------------------------------------------------
/java/hjw-lab/8/build/Two.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/8/build/Two.class
--------------------------------------------------------------------------------
/java/hjw-lab/8/compile.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/8/compile.bat
--------------------------------------------------------------------------------
/java/hjw-lab/8/run.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/java/hjw-lab/8/run.bat
--------------------------------------------------------------------------------
/network/README.md:
--------------------------------------------------------------------------------
1 | - [httpserver](/network/httpserver/):简单 HTTP 服务器实现
2 | - [proxy](/network/proxy/):简单 HTTP 代理程序实现
--------------------------------------------------------------------------------
/network/httpserver/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode/
2 | build/
--------------------------------------------------------------------------------
/network/httpserver/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.0.0)
2 | project(httpserver VERSION 0.1.0)
3 |
4 | include(CTest)
5 | enable_testing()
6 |
7 | # set directories of .h files
8 | include_directories(./include)
9 |
10 | aux_source_directory(./src DIR_SRCS)
11 |
12 | add_executable(httpserver main.c ${DIR_SRCS})
13 | target_link_libraries(httpserver pthread)
14 |
15 | set(CPACK_PROJECT_NAME ${PROJECT_NAME})
16 | set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
17 | include(CPack)
18 |
--------------------------------------------------------------------------------
/network/httpserver/img/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/img/1.png
--------------------------------------------------------------------------------
/network/httpserver/img/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/img/2.png
--------------------------------------------------------------------------------
/network/httpserver/img/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/img/3.png
--------------------------------------------------------------------------------
/network/httpserver/include/worker.h:
--------------------------------------------------------------------------------
1 | #ifndef _WORKER_H_
2 | #define _WORKER_H_
3 | #include
4 | #include
5 | #define MAX_BUF 655650
6 |
7 | void *work(void *args);
8 |
9 | #endif
--------------------------------------------------------------------------------
/network/httpserver/public/theme/fonts/oswald-regular-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/public/theme/fonts/oswald-regular-webfont.woff2
--------------------------------------------------------------------------------
/network/httpserver/public/theme/fonts/oxygen-regular-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/public/theme/fonts/oxygen-regular-webfont.woff
--------------------------------------------------------------------------------
/network/httpserver/public/theme/fonts/oxygen-regular-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/public/theme/fonts/oxygen-regular-webfont.woff2
--------------------------------------------------------------------------------
/network/httpserver/public/theme/images/icons/downloadarrow_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/public/theme/images/icons/downloadarrow_small.png
--------------------------------------------------------------------------------
/network/httpserver/public/theme/images/logos/constellix-green-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/public/theme/images/logos/constellix-green-logo.png
--------------------------------------------------------------------------------
/network/httpserver/public/theme/images/logos/equinix-metal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/public/theme/images/logos/equinix-metal.png
--------------------------------------------------------------------------------
/network/httpserver/public/theme/images/logos/fastly-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/public/theme/images/logos/fastly-logo.png
--------------------------------------------------------------------------------
/network/httpserver/public/theme/images/logos/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/public/theme/images/logos/favicon.png
--------------------------------------------------------------------------------
/network/httpserver/public/theme/images/logos/google.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/public/theme/images/logos/google.png
--------------------------------------------------------------------------------
/network/httpserver/public/theme/images/logos/purestorage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/public/theme/images/logos/purestorage.png
--------------------------------------------------------------------------------
/network/httpserver/public/theme/images/logos/redhat-community.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/public/theme/images/logos/redhat-community.png
--------------------------------------------------------------------------------
/network/httpserver/public/theme/images/logos/thelinuxfoundation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/public/theme/images/logos/thelinuxfoundation.png
--------------------------------------------------------------------------------
/network/httpserver/public/theme/images/logos/tux.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/httpserver/public/theme/images/logos/tux.png
--------------------------------------------------------------------------------
/network/proxy/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode/
2 | build/
--------------------------------------------------------------------------------
/network/proxy/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.0.0)
2 | project(proxy VERSION 0.1.0)
3 |
4 | include(CTest)
5 | enable_testing()
6 |
7 | # set directories of .h files
8 | include_directories(./include)
9 |
10 | aux_source_directory(./src DIR_SRCS)
11 |
12 | add_executable(proxy main.c ${DIR_SRCS})
13 | target_link_libraries(proxy pthread)
14 |
15 | set(CPACK_PROJECT_NAME ${PROJECT_NAME})
16 | set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
17 | include(CPack)
18 |
--------------------------------------------------------------------------------
/network/proxy/img/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/proxy/img/1.png
--------------------------------------------------------------------------------
/network/proxy/img/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/network/proxy/img/2.png
--------------------------------------------------------------------------------
/network/proxy/include/request.h:
--------------------------------------------------------------------------------
1 | #ifndef _REQUEST_H_
2 | #define _REQUEST_H_
3 | #include "picohttpparser.h"
4 | #include
5 | #include
6 | #define GET_METHOD 1
7 | #define POST_METHOD 2
8 | #define CONNECT_METHOD 3
9 |
10 | struct header
11 | {
12 | char *name, *value;
13 | };
14 |
15 | struct request
16 | {
17 | struct sockaddr_in dest;
18 | struct header headers[30];
19 | int method, headers_len;
20 | double http_ver; // only support 1.0 and 1.1
21 | char *path, *body, *host;
22 | };
23 |
24 | void req_to_str(struct request *req, char *str);
25 |
26 | int resolve_dns(struct request *dest);
27 |
28 | int resolve_path(struct request *req, char *raw_path);
29 |
30 | #endif
--------------------------------------------------------------------------------
/weibo/Wbclient/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/weibo/Wbclient/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/weibo/Wbclient/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/weibo/Wbclient/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/weibo/Wbclient/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/weibo/Wbclient/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/weibo/Wbclient/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/androidTest/java/cn/magicalsheep/wbclient/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("cn.magicalsheep.wbclient", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/data/AjaxResult.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.data
2 |
3 | const val OK: Int = 200
4 | const val ERROR: Int = 500
5 |
6 | data class AjaxResult(
7 | val code: Int,
8 | val msg: String,
9 | val data: T
10 | )
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/data/Blog.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.data
2 |
3 | import com.google.gson.annotations.SerializedName
4 |
5 | data class Blog(
6 | val id: Int,
7 | val author: String,
8 | val content: String,
9 | val goods: Int,
10 | val reference: Int?,
11 | @SerializedName("create_time")
12 | val createTime: String
13 | )
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/data/Comment.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.data
2 |
3 | import com.google.gson.annotations.SerializedName
4 |
5 | data class Comment(
6 | val id: Int,
7 | val author: String,
8 | val content: String,
9 | val goods: Int,
10 | @SerializedName("create_time")
11 | val createTime: String
12 | )
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/data/User.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.data
2 |
3 | data class User(
4 | val id: Int,
5 | val name: String,
6 | val avatar: String? = null,
7 | val moto: String? = null,
8 | val sex: String? = null,
9 | val city: String? = null
10 | )
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/data/remote/RetrofitBuilder.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.data.remote
2 |
3 | import retrofit2.Retrofit
4 | import retrofit2.converter.gson.GsonConverterFactory
5 |
6 | object RetrofitBuilder {
7 |
8 | // private const val BASE_URL = "https://mock.apifox.cn/m1/1580031-0-default/"
9 | private const val BASE_URL = "http://192.168.3.6:8080/"
10 |
11 | private fun getRetrofit(): Retrofit {
12 | return Retrofit.Builder()
13 | .baseUrl(BASE_URL)
14 | .addConverterFactory(GsonConverterFactory.create())
15 | .build()
16 | }
17 | val blogApi: BlogInterface = getRetrofit().create(BlogInterface::class.java)
18 | val commentApi: CommentInterface = getRetrofit().create(CommentInterface::class.java)
19 | val userApi: UserInterface = getRetrofit().create(UserInterface::class.java)
20 |
21 | }
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/data/remote/Token.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.data.remote
2 |
3 | object Token {
4 | var token: String = ""
5 | }
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/data/remote/UserInterface.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.data.remote
2 |
3 | import cn.magicalsheep.wbclient.data.AjaxResult
4 | import cn.magicalsheep.wbclient.data.User
5 | import cn.magicalsheep.wbclient.data.remote.model.LoginBody
6 | import retrofit2.http.Body
7 | import retrofit2.http.GET
8 | import retrofit2.http.Header
9 | import retrofit2.http.POST
10 |
11 | interface UserInterface {
12 |
13 | @POST("login")
14 | suspend fun login(@Body body: LoginBody): AjaxResult
15 |
16 | @POST("register")
17 | suspend fun register(@Body body: LoginBody): AjaxResult
18 |
19 | @GET("profile")
20 | suspend fun profile(@Header("Authorization") token: String): AjaxResult
21 |
22 | }
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/data/remote/model/BlogRequestBody.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.data.remote.model
2 |
3 | data class BlogRequestBody(
4 | val content: String
5 | )
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/data/remote/model/CommentRequestBody.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.data.remote.model
2 |
3 | import com.google.gson.annotations.SerializedName
4 |
5 | data class CommentRequestBody(
6 | @SerializedName("blog_id")
7 | val blogId: Int,
8 | @SerializedName("comment_id")
9 | val commentId: Int? = null,
10 | val content: String
11 | )
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/data/remote/model/GoodRequestBody.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.data.remote.model
2 |
3 | import com.google.gson.annotations.SerializedName
4 |
5 | data class GoodRequestBody(
6 | @SerializedName("blog_id")
7 | val blogId: Int,
8 | @SerializedName("comment_id")
9 | val commentId: Int? = null
10 | )
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/data/remote/model/LoginBody.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.data.remote.model
2 |
3 | data class LoginBody(
4 | val name: String,
5 | val pwd: String,
6 | val sex: String? = null,
7 | val city: String? = null,
8 | val moto: String? = null
9 | )
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/data/repository/BlogRepository.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.data.repository
2 |
3 | import cn.magicalsheep.wbclient.data.Blog
4 | import kotlinx.coroutines.flow.Flow
5 |
6 | interface BlogRepository {
7 |
8 | suspend fun getBlogs(page: Int, pageNum: Int): Flow>
9 | suspend fun getBlog(blogId: Int): Flow
10 | suspend fun getBlogsByAuthor(author: String, page: Int, pageNum: Int): Flow>
11 | suspend fun addBlog(content: String, reference: Int?)
12 | suspend fun addGood(blogId: Int, commentId: Int?)
13 |
14 | }
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/data/repository/CommentRepository.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.data.repository
2 |
3 | import cn.magicalsheep.wbclient.data.Comment
4 | import kotlinx.coroutines.flow.Flow
5 |
6 | interface CommentRepository {
7 |
8 | suspend fun getComments(blogId: Int, page: Int, pageNum: Int): Flow>
9 | suspend fun addComment(content: String, blogId: Int)
10 |
11 | }
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/data/repository/UserRepository.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.data.repository
2 |
3 | import cn.magicalsheep.wbclient.data.User
4 |
5 | interface UserRepository {
6 |
7 | suspend fun getUserByToken(token: String): User
8 | suspend fun login(userName: String, pwd: String): String
9 | suspend fun register(userName: String, pwd: String)
10 | fun logout()
11 |
12 | }
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/ui/theme/Color.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.ui.theme
2 |
3 | import androidx.compose.ui.graphics.Color
4 |
5 | val Purple80 = Color(0xFFD0BCFF)
6 | val PurpleGrey80 = Color(0xFFCCC2DC)
7 | val Pink80 = Color(0xFFEFB8C8)
8 |
9 | val Purple40 = Color(0xFF6650a4)
10 | val PurpleGrey40 = Color(0xFF625b71)
11 | val Pink40 = Color(0xFF7D5260)
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/ui/views/AboutPage.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.ui.views
2 |
3 | import androidx.compose.runtime.Composable
4 | import androidx.compose.ui.Modifier
5 | import androidx.compose.ui.res.stringResource
6 | import cn.magicalsheep.wbclient.R
7 | import cn.magicalsheep.wbclient.ui.components.EmptyPage
8 |
9 | @Composable
10 | fun AboutPage(
11 | modifier: Modifier = Modifier
12 | ) {
13 | EmptyPage(
14 | modifier = modifier,
15 | title = stringResource(id = R.string.about_title),
16 | subtitle = stringResource(id = R.string.about_content)
17 | )
18 | }
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/ui/views/SettingsPage.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.ui.views
2 |
3 | import androidx.compose.runtime.Composable
4 | import androidx.compose.ui.Modifier
5 | import androidx.compose.ui.res.stringResource
6 | import cn.magicalsheep.wbclient.R
7 | import cn.magicalsheep.wbclient.ui.components.EmptyPage
8 |
9 | @Composable
10 | fun SettingsPage(
11 | modifier: Modifier = Modifier
12 | ) {
13 | EmptyPage(
14 | modifier = modifier,
15 | title = stringResource(id = R.string.develop_title),
16 | subtitle = stringResource(id = R.string.develop_subtitle)
17 | )
18 | }
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/java/cn/magicalsheep/wbclient/ui/views/SheepBlogPage.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient.ui.views
2 |
3 | import android.annotation.SuppressLint
4 | import androidx.compose.foundation.layout.fillMaxSize
5 | import androidx.compose.material3.Surface
6 | import androidx.compose.runtime.Composable
7 | import androidx.compose.ui.Modifier
8 | import androidx.compose.ui.res.stringResource
9 | import cn.magicalsheep.wbclient.R
10 | import com.google.accompanist.web.WebView
11 | import com.google.accompanist.web.rememberWebViewState
12 |
13 | @SuppressLint("SetJavaScriptEnabled")
14 | @Composable
15 | fun SheepBlogPage() {
16 |
17 | val state = rememberWebViewState(stringResource(id = R.string.sheep_blog_url))
18 |
19 | Surface(modifier = Modifier.fillMaxSize()) {
20 | WebView(state, onCreated = { it.settings.javaScriptEnabled = true })
21 | }
22 | }
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/drawable-v24/baseline_account_circle_24.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/drawable-v24/baseline_emoji_emotions_24.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/drawable-v24/baseline_image_24.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/drawable/baseline_comment_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/drawable/baseline_open_in_new_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/drawable/baseline_thumb_up_off_alt_24.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/drawable/sheep_avatar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/weibo/Wbclient/app/src/main/res/drawable/sheep_avatar.jpg
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/weibo/Wbclient/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/weibo/Wbclient/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/weibo/Wbclient/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/weibo/Wbclient/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/weibo/Wbclient/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/weibo/Wbclient/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/weibo/Wbclient/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/weibo/Wbclient/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/weibo/Wbclient/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/weibo/Wbclient/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/weibo/Wbclient/app/src/test/java/cn/magicalsheep/wbclient/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package cn.magicalsheep.wbclient
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/weibo/Wbclient/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext {
3 | compose_version = '1.1.1'
4 | }
5 | }// Top-level build file where you can add configuration options common to all sub-projects/modules.
6 | plugins {
7 | id 'com.android.application' version '7.3.0' apply false
8 | id 'com.android.library' version '7.3.0' apply false
9 | id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
10 | }
--------------------------------------------------------------------------------
/weibo/Wbclient/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MagicalSheep/lab/e36800d386c4805ea20f4256e86ed4bb85f95738/weibo/Wbclient/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/weibo/Wbclient/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Sep 20 14:23:37 CST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/weibo/Wbclient/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | google()
5 | mavenCentral()
6 | }
7 | }
8 | dependencyResolutionManagement {
9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10 | repositories {
11 | google()
12 | mavenCentral()
13 | }
14 | }
15 | rootProject.name = "Wbclient"
16 | include ':app'
17 |
--------------------------------------------------------------------------------
/weibo/wb-server/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | .idea
--------------------------------------------------------------------------------
/weibo/wb-server/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "wb-server"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7 |
8 | [dependencies]
9 | lazy_static = "1.4.0"
10 | bcrypt = "0.13.0"
11 | jsonwebtoken = "8.1.1"
12 | once_cell = "1.14.0"
13 | sea-orm = { version = "0.9.2", features = [ "sqlx-mysql", "runtime-tokio-rustls", "macros" ] }
14 | chrono = "0.4.22"
15 | validator = { version = "0.16", features = ["derive"] }
16 | log = "0.4.17"
17 | pretty_env_logger = "0.4.0"
18 | warp = "0.3.2"
19 | serde = "1.0.144"
20 | serde_yaml = "0.9.11"
21 | serde_derive = "1.0.144"
22 | tokio = { version = "1.21.0", features = ["full"] }
--------------------------------------------------------------------------------
/weibo/wb-server/config.yaml:
--------------------------------------------------------------------------------
1 | data_source: "mysql://root:password@localhost/wb_server"
2 | address: "0.0.0.0"
3 | port: 8080
--------------------------------------------------------------------------------
/weibo/wb-server/src/entity/mod.rs:
--------------------------------------------------------------------------------
1 | //! SeaORM Entity. Generated by sea-orm-codegen 0.9.2
2 |
3 | pub mod prelude;
4 |
5 | pub mod blog;
6 | pub mod comment;
7 | pub mod goods;
8 | pub mod user;
9 |
--------------------------------------------------------------------------------
/weibo/wb-server/src/entity/prelude.rs:
--------------------------------------------------------------------------------
1 | //! SeaORM Entity. Generated by sea-orm-codegen 0.9.2
2 |
3 | pub use super::blog::Entity as Blog;
4 | pub use super::comment::Entity as Comment;
5 | pub use super::goods::Entity as Goods;
6 | pub use super::user::Entity as User;
7 |
--------------------------------------------------------------------------------
/weibo/wb-server/src/repository/user.rs:
--------------------------------------------------------------------------------
1 | use crate::entity::prelude::User;
2 | use crate::entity::user;
3 | use crate::repository::DB;
4 | use sea_orm::*;
5 |
6 | pub async fn find_by_id(id: i32) -> Result, DbErr> {
7 | let db = DB.get().unwrap();
8 | User::find().filter(user::Column::Id.eq(id)).one(db).await
9 | }
10 |
11 | pub async fn find_by_name(name: &str) -> Result, DbErr> {
12 | let db = DB.get().unwrap();
13 | User::find()
14 | .filter(user::Column::Name.eq(name))
15 | .one(db)
16 | .await
17 | }
18 |
19 | pub async fn save_user(user: user::ActiveModel) -> Result {
20 | let db = DB.get().unwrap();
21 | let res: user::ActiveModel = user.save(db).await?;
22 | Ok(res)
23 | }
24 |
--------------------------------------------------------------------------------
/weibo/wb-server/src/util.rs:
--------------------------------------------------------------------------------
1 | use crate::JWT_SECRET;
2 | use jsonwebtoken::{
3 | decode, encode, Algorithm, DecodingKey, EncodingKey, Header, TokenData, Validation,
4 | };
5 | use serde_derive::{Deserialize, Serialize};
6 |
7 | #[derive(Debug, Serialize, Deserialize)]
8 | pub struct Claims {
9 | pub sub: String,
10 | pub exp: i64,
11 | pub id: i32,
12 | }
13 |
14 | pub fn create_token(claims: Claims) -> String {
15 | return encode(
16 | &Header::default(),
17 | &claims,
18 | &EncodingKey::from_secret(JWT_SECRET.as_ref()),
19 | )
20 | .unwrap();
21 | }
22 |
23 | pub fn check_token(token: String) -> jsonwebtoken::errors::Result> {
24 | decode::(
25 | &token,
26 | &DecodingKey::from_secret(JWT_SECRET.as_ref()),
27 | &Validation::new(Algorithm::HS256),
28 | )
29 | }
30 |
--------------------------------------------------------------------------------