├── Android ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── bottom.xml │ │ │ │ │ ├── circle.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── dialog_style.xml │ │ │ │ │ └── themes.xml │ │ │ │ ├── drawable-v24 │ │ │ │ │ ├── at.jpg │ │ │ │ │ ├── abjpg.jpg │ │ │ │ │ ├── test.jpeg │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ ├── drawable │ │ │ │ │ ├── c_acc.png │ │ │ │ │ ├── c_pend.png │ │ │ │ │ ├── c_optim.png │ │ │ │ │ ├── c_pend_rules.png │ │ │ │ │ ├── tab.xml │ │ │ │ │ ├── anim_fig.xml │ │ │ │ │ ├── rounded_rect.xml │ │ │ │ │ ├── pg.xml │ │ │ │ │ ├── edit.xml │ │ │ │ │ ├── pg_red.xml │ │ │ │ │ ├── pg_green.xml │ │ │ │ │ ├── toggle_selector.xml │ │ │ │ │ ├── bottom_bar_item_selected.xml │ │ │ │ │ ├── category_item_type.xml │ │ │ │ │ ├── banner.xml │ │ │ │ │ ├── add.xml │ │ │ │ │ ├── home.xml │ │ │ │ │ ├── stroke.xml │ │ │ │ │ ├── back.xml │ │ │ │ │ ├── back_select.xml │ │ │ │ │ ├── ic_baseline_info_24.xml │ │ │ │ │ ├── info.xml │ │ │ │ │ ├── chart.xml │ │ │ │ │ ├── seekbar.xml │ │ │ │ │ ├── logout.xml │ │ │ │ │ ├── person.xml │ │ │ │ │ ├── person2.xml │ │ │ │ │ ├── email_img.xml │ │ │ │ │ ├── fav2.xml │ │ │ │ │ ├── back_tabs.xml │ │ │ │ │ ├── theory.xml │ │ │ │ │ ├── rules.xml │ │ │ │ │ ├── lock_img.xml │ │ │ │ │ ├── camera.xml │ │ │ │ │ ├── fav1.xml │ │ │ │ │ ├── question.xml │ │ │ │ │ ├── settings_white.xml │ │ │ │ │ ├── settings.xml │ │ │ │ │ └── pic.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 │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── layout │ │ │ │ │ ├── fragment_my_rules.xml │ │ │ │ │ ├── fragment_maths.xml │ │ │ │ │ ├── fragment_accelerometer.xml │ │ │ │ │ ├── fragment_pendulum5.xml │ │ │ │ │ ├── fragment_theory.xml │ │ │ │ │ ├── activity_fuzzy1.xml │ │ │ │ │ ├── fragment_pendulum4.xml │ │ │ │ │ ├── fragment_saved_rules.xml │ │ │ │ │ ├── fragment_pendulum1.xml │ │ │ │ │ ├── fragment_different_rules.xml │ │ │ │ │ ├── activity_support.xml │ │ │ │ │ ├── alertdialog.xml │ │ │ │ │ ├── fragment_choose_bluetooth.xml │ │ │ │ │ ├── dialog_info.xml │ │ │ │ │ ├── activity_hamburger.xml │ │ │ │ │ ├── activity_recover_password.xml │ │ │ │ │ ├── theory_row.xml │ │ │ │ │ ├── activity_menu.xml │ │ │ │ │ ├── activity_main.xml │ │ │ │ │ ├── activity_physics_model.xml │ │ │ │ │ ├── contain.xml │ │ │ │ │ ├── contain_optim.xml │ │ │ │ │ ├── activity_change_password.xml │ │ │ │ │ ├── activity_optimization.xml │ │ │ │ │ ├── fragment_phys_controller.xml │ │ │ │ │ ├── dialog_support.xml │ │ │ │ │ ├── activity_home_page.xml │ │ │ │ │ ├── global_rule_row.xml │ │ │ │ │ ├── activity_sensor.xml │ │ │ │ │ ├── category_row.xml │ │ │ │ │ ├── fragment_basin_hopping.xml │ │ │ │ │ ├── recycler_view_row.xml │ │ │ │ │ ├── activity_show_charts.xml │ │ │ │ │ ├── activity_maths_model.xml │ │ │ │ │ ├── fragment_login.xml │ │ │ │ │ ├── fragment_genetic_algorithm.xml │ │ │ │ │ └── fragment_signup.xml │ │ │ │ ├── xml │ │ │ │ │ ├── backup_rules.xml │ │ │ │ │ └── data_extraction_rules.xml │ │ │ │ ├── menu │ │ │ │ │ ├── bottom_menu.xml │ │ │ │ │ └── hamburger.xml │ │ │ │ ├── values-night │ │ │ │ │ └── themes.xml │ │ │ │ └── layout-v26 │ │ │ │ │ └── dialog_info.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── fuzzycontapp │ │ │ │ │ ├── PageRuleInterface.java │ │ │ │ │ ├── TheoryInterface.java │ │ │ │ │ ├── PageCategoryInterface.java │ │ │ │ │ ├── Indiv │ │ │ │ │ ├── ChartArrays.java │ │ │ │ │ ├── Global.java │ │ │ │ │ ├── CategoryRow.java │ │ │ │ │ ├── TheoryRow.java │ │ │ │ │ ├── Rule_model.java │ │ │ │ │ └── Const.java │ │ │ │ │ ├── Activities │ │ │ │ │ ├── Support.java │ │ │ │ │ ├── Fuzzy1.java │ │ │ │ │ ├── PhysicsModel.java │ │ │ │ │ ├── PageRule.java │ │ │ │ │ ├── RecoverPassword.java │ │ │ │ │ └── ChangePassword.java │ │ │ │ │ ├── Adapters │ │ │ │ │ ├── MainAdapter.java │ │ │ │ │ ├── OptimAdapter.java │ │ │ │ │ ├── DifferentRulesAdapter.java │ │ │ │ │ ├── TheoryAdapter.java │ │ │ │ │ ├── CategoriesAdapter.java │ │ │ │ │ ├── Rules_Adapter.java │ │ │ │ │ └── SavedRulesAdapter.java │ │ │ │ │ ├── Fragments │ │ │ │ │ ├── MathsFragment.java │ │ │ │ │ ├── AccelerometerFragment.java │ │ │ │ │ ├── Pendulum5.java │ │ │ │ │ ├── Theory.java │ │ │ │ │ ├── DifferentRules.java │ │ │ │ │ ├── ChooseBluetooth.java │ │ │ │ │ ├── BasinHopping.java │ │ │ │ │ ├── PhysController.java │ │ │ │ │ └── GeneticAlgorithm.java │ │ │ │ │ └── FuzzyLogic │ │ │ │ │ ├── Trapezoid.java │ │ │ │ │ └── Rules.java │ │ │ └── assets │ │ │ │ ├── fuzzy2.html │ │ │ │ └── fuzzy3.html │ │ ├── debug │ │ │ ├── ic_launcher-playstore.png │ │ │ └── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── values │ │ │ │ └── ic_launcher_background.xml │ │ │ │ └── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── fuzzycontapp │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── fuzzycontapp │ │ │ └── ExampleInstrumentedTest.java │ ├── proguard-rules.pro │ └── build.gradle ├── .idea │ ├── .gitignore │ ├── compiler.xml │ ├── vcs.xml │ ├── misc.xml │ ├── deploymentTargetDropDown.xml │ └── gradle.xml ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── build.gradle ├── .gitignore ├── settings.gradle ├── gradle.properties └── gradlew.bat ├── assets ├── 1.jpg ├── 2.jpg ├── 3.jpg ├── acc2.png ├── c_acc.png ├── c_pend.png ├── main.jpg ├── optim2.png ├── pend.gif ├── pend2.png ├── phys.gif ├── rules.jpg ├── c_optim.png ├── download.png ├── pend_rules2.png └── c_pend_rules.png ├── Server ├── src │ ├── module-info.java │ └── Main │ │ ├── RulesGenerator.java │ │ ├── MailSender.java │ │ ├── Main.java │ │ ├── RulesBase.java │ │ └── BigDataSender.java ├── defaultPhoto.jpg ├── mail_sender.py └── cycle.py ├── LICENSE.txt └── Arduino └── sketch └── sketch.ino /Android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /Android/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /assets/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/1.jpg -------------------------------------------------------------------------------- /assets/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/2.jpg -------------------------------------------------------------------------------- /assets/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/3.jpg -------------------------------------------------------------------------------- /assets/acc2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/acc2.png -------------------------------------------------------------------------------- /assets/c_acc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/c_acc.png -------------------------------------------------------------------------------- /assets/c_pend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/c_pend.png -------------------------------------------------------------------------------- /assets/main.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/main.jpg -------------------------------------------------------------------------------- /assets/optim2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/optim2.png -------------------------------------------------------------------------------- /assets/pend.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/pend.gif -------------------------------------------------------------------------------- /assets/pend2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/pend2.png -------------------------------------------------------------------------------- /assets/phys.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/phys.gif -------------------------------------------------------------------------------- /assets/rules.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/rules.jpg -------------------------------------------------------------------------------- /assets/c_optim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/c_optim.png -------------------------------------------------------------------------------- /assets/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/download.png -------------------------------------------------------------------------------- /Server/src/module-info.java: -------------------------------------------------------------------------------- 1 | module Server { 2 | requires java.sql; 3 | requires java.logging; 4 | } -------------------------------------------------------------------------------- /assets/pend_rules2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/pend_rules2.png -------------------------------------------------------------------------------- /Android/app/src/main/res/values/bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Server/defaultPhoto.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Server/defaultPhoto.jpg -------------------------------------------------------------------------------- /assets/c_pend_rules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/assets/c_pend_rules.png -------------------------------------------------------------------------------- /Android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable-v24/at.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/drawable-v24/at.jpg -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/c_acc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/drawable/c_acc.png -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/c_pend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/drawable/c_pend.png -------------------------------------------------------------------------------- /Android/app/src/debug/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/ic_launcher-playstore.png -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable-v24/abjpg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/drawable-v24/abjpg.jpg -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable-v24/test.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/drawable-v24/test.jpeg -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/c_optim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/drawable/c_optim.png -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/c_pend_rules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/drawable/c_pend_rules.png -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Android/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /Android/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /Android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /Android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kristal1ik/FuzzyContApp/HEAD/Android/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Android/app/src/debug/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #C2C3F3 4 | -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/PageRuleInterface.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp; 2 | 3 | public interface PageRuleInterface { 4 | void onItemClick(int position); 5 | } 6 | -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/TheoryInterface.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp; 2 | 3 | public interface TheoryInterface { 4 | void onItemClick(int position); 5 | } 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/values/circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /Android/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/PageCategoryInterface.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp; 2 | 3 | public interface PageCategoryInterface { 4 | void onCategoryClick(int position); 5 | } 6 | -------------------------------------------------------------------------------- /Android/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/tab.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/anim_fig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Android/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 | } -------------------------------------------------------------------------------- /Android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Mar 22 22:41:10 MSK 2023 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/.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/app/src/main/res/drawable/rounded_rect.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/pg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/edit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/pg_red.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/pg_green.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/toggle_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/debug/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/bottom_bar_item_selected.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/category_item_type.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Android/app/src/main/res/layout/fragment_my_rules.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/add.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/home.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/stroke.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | -------------------------------------------------------------------------------- /Android/app/src/main/res/layout/fragment_maths.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/back.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Android/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/back_select.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/ic_baseline_info_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/info.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/layout/fragment_accelerometer.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/Indiv/ChartArrays.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp.Indiv; 2 | 3 | import java.util.ArrayList; 4 | 5 | public class ChartArrays { 6 | public static ArrayList XXX = new ArrayList<>(); 7 | public static ArrayList VVV = new ArrayList<>(); 8 | public static ArrayList WWW = new ArrayList<>(); 9 | public static ArrayList TIME = new ArrayList<>(); 10 | } 11 | -------------------------------------------------------------------------------- /Android/app/src/main/res/layout/fragment_pendulum5.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/chart.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/seekbar.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/logout.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/person.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/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 | maven { url "https://jitpack.io" } 14 | 15 | } 16 | } 17 | rootProject.name = "FuzzyContApp" 18 | include ':app' 19 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/person2.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/email_img.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/fav2.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/test/java/com/example/fuzzycontapp/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/back_tabs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/theory.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/layout/fragment_theory.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/layout/activity_fuzzy1.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /Android/app/src/main/res/xml/backup_rules.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /Android/app/src/main/res/layout/fragment_pendulum4.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/lock_img.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/layout/fragment_saved_rules.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/Indiv/Global.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp.Indiv; 2 | 3 | 4 | import android.graphics.Bitmap; 5 | import android.graphics.BitmapFactory; 6 | 7 | public class Global { 8 | public static String USERNAME = ""; 9 | public static String EMAIL = ""; 10 | public static Bitmap IMG = null; 11 | public static boolean TO_READ = false; 12 | public static int THEORY_NUMBER; 13 | public static String ADDRESS; 14 | public static int GLOBAL_RULES = 0; 15 | public static int SAVED_RULES = 0; 16 | public static int MY_RULES = 0; 17 | public static int INFO = 0; 18 | } 19 | -------------------------------------------------------------------------------- /Android/.idea/deploymentTargetDropDown.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/Indiv/CategoryRow.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp.Indiv; 2 | 3 | public class CategoryRow { 4 | public String name; 5 | public int img; 6 | 7 | public CategoryRow(String name, int img) { 8 | this.name = name; 9 | this.img = img; 10 | } 11 | 12 | public String getName() { 13 | return name; 14 | } 15 | 16 | public void setName(String name) { 17 | this.name = name; 18 | } 19 | 20 | public int getImg() { 21 | return img; 22 | } 23 | 24 | public void setImg(int img) { 25 | this.img = img; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/Indiv/TheoryRow.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp.Indiv; 2 | 3 | public class TheoryRow { 4 | public String name; 5 | public int img; 6 | 7 | public TheoryRow(String name, int img) { 8 | this.name = name; 9 | this.img = img; 10 | } 11 | 12 | public String getName() { 13 | return name; 14 | } 15 | 16 | public void setName(String name) { 17 | this.name = name; 18 | } 19 | 20 | public int getImg() { 21 | return img; 22 | } 23 | 24 | public void setImg(int img) { 25 | this.img = img; 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/camera.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #9B9BB6 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | #C2C3F3 11 | #DAEBF8 12 | #FF0000 13 | #00FF00 14 | #BBDBF1 15 | -------------------------------------------------------------------------------- /Android/app/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/fav1.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/question.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/layout/fragment_pendulum1.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/Activities/Support.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp.Activities; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | 5 | 6 | import android.os.Bundle; 7 | import android.view.View; 8 | 9 | import com.example.fuzzycontapp.databinding.ActivitySupportBinding; 10 | 11 | 12 | public class Support extends AppCompatActivity { 13 | ActivitySupportBinding binding; 14 | 15 | @Override 16 | protected void onCreate(Bundle savedInstanceState) { 17 | super.onCreate(savedInstanceState); 18 | binding = ActivitySupportBinding.inflate(getLayoutInflater()); 19 | View view = binding.getRoot(); 20 | setContentView(view); 21 | 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /Android/app/src/main/res/values/dialog_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /Server/src/Main/RulesGenerator.java: -------------------------------------------------------------------------------- 1 | package Main; 2 | 3 | import java.sql.*; 4 | 5 | public class RulesGenerator implements Runnable { 6 | private String input_data; 7 | private Connection db_connection; 8 | private String result; 9 | private String username; 10 | RulesGenerator(String in, String user, Connection db){ 11 | input_data = in; 12 | db_connection = db; 13 | username = user; 14 | } 15 | @Override 16 | public void run() { 17 | //do something with input_data 18 | try { 19 | Statement stmt = db_connection.createStatement(); 20 | stmt.execute(String.format("INSERT INTO `rules`(`username`, `rule`) VALUES (\"%s\",\"%s\")", username, result)); 21 | } catch (SQLException e) { 22 | e.printStackTrace(); 23 | } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /Android/app/src/main/res/layout/fragment_different_rules.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 18 | -------------------------------------------------------------------------------- /Android/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 19 | 20 | -------------------------------------------------------------------------------- /Android/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/app/src/main/res/layout/activity_support.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | -------------------------------------------------------------------------------- /Android/app/src/main/res/menu/bottom_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 15 | 16 | 18 | 19 | 23 | 27 | 28 | -------------------------------------------------------------------------------- /Android/app/src/main/res/layout/alertdialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Android/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /Android/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /Android/app/src/androidTest/java/com/example/fuzzycontapp/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | assertEquals("com.example.fuzzycontapp", appContext.getPackageName()); 25 | } 26 | } -------------------------------------------------------------------------------- /Server/src/Main/MailSender.java: -------------------------------------------------------------------------------- 1 | package Main; 2 | 3 | import java.io.IOException; 4 | import java.util.logging.Logger; 5 | import java.io.*; 6 | public class MailSender { 7 | private static Logger logger = Main.logger; 8 | public static void sendMail(String data, String subject, String email) { 9 | try { 10 | System.out.println("Mail"); 11 | Process sender = (new ProcessBuilder("python", "mail_sender.py")).start(); 12 | BufferedReader input = new BufferedReader(new InputStreamReader(sender.getInputStream())); 13 | PrintWriter output = new PrintWriter(new OutputStreamWriter(sender.getOutputStream())); 14 | output.write(data + "\n"); 15 | output.write(subject + "\n"); 16 | output.write(email + "\n"); 17 | output.flush(); 18 | logger.info("Sent email letter to " + email); 19 | 20 | } catch (IOException e) { 21 | logger.warning("Exception while sending email: \n" + e.toString()); 22 | e.printStackTrace(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Server/mail_sender.py: -------------------------------------------------------------------------------- 1 | import smtplib 2 | from email.mime.text import MIMEText 3 | from email.utils import make_msgid 4 | import requests 5 | data = input() 6 | subject = input() 7 | email = input() 8 | s = smtplib.SMTP('smtp.yandex.ru', 587) 9 | s.ehlo() 10 | s.starttls() 11 | text = MIMEText(f"{data}", 'plain', "utf-8") 12 | text['Message-ID'] = make_msgid() 13 | text['From'] = "fuzzymaxwell@yandex.ru" 14 | text['To'] = email 15 | text['Subject'] = subject 16 | s.login("fuzzymaxwell@yandex.ru", "lcegflpdfhwreftr") 17 | s.sendmail("fuzzymaxwell@yandex.ru", email, text.as_string()) 18 | s.quit() 19 | 20 | 21 | if subject == "Fuzzy question" 22 | TOKEN = "6226590723:AAFC0wcUlNL7-dO8MH6PoCEPWqWbXI7ZRfM" 23 | chat_id = "976354774" 24 | message = "Привет. Тут письмо пришло.... Это всё из-за user-friendly... Но почту проверить стоит." 25 | url = f"https://api.telegram.org/bot{TOKEN}/sendMessage?chat_id={chat_id}&text={message}" 26 | print(requests.get(url).json()) -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/Adapters/MainAdapter.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp.Adapters; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.fragment.app.Fragment; 5 | import androidx.fragment.app.FragmentManager; 6 | import androidx.lifecycle.Lifecycle; 7 | import androidx.viewpager2.adapter.FragmentStateAdapter; 8 | 9 | import com.example.fuzzycontapp.Fragments.Login; 10 | import com.example.fuzzycontapp.Fragments.SignUp; 11 | 12 | public class MainAdapter extends FragmentStateAdapter { 13 | 14 | public MainAdapter(@NonNull FragmentManager fragmentManager, @NonNull Lifecycle lifecycle) { 15 | super(fragmentManager, lifecycle); 16 | } 17 | 18 | @NonNull 19 | @Override 20 | public Fragment createFragment(int position) { 21 | if (position == 1){ 22 | return new SignUp(); 23 | } 24 | return new Login(); 25 | } 26 | 27 | @Override 28 | public int getItemCount() { 29 | return 2; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Android/app/src/main/res/layout/fragment_choose_bluetooth.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 16 | 17 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright © 2023 Korobovtseva Olga 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /Android/app/src/main/res/layout-v26/dialog_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 25 | -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/Adapters/OptimAdapter.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp.Adapters; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.fragment.app.Fragment; 5 | import androidx.fragment.app.FragmentManager; 6 | import androidx.lifecycle.Lifecycle; 7 | import androidx.viewpager2.adapter.FragmentStateAdapter; 8 | 9 | import com.example.fuzzycontapp.Fragments.BasinHopping; 10 | import com.example.fuzzycontapp.Fragments.GeneticAlgorithm; 11 | import com.example.fuzzycontapp.Fragments.Login; 12 | import com.example.fuzzycontapp.Fragments.SignUp; 13 | 14 | public class OptimAdapter extends FragmentStateAdapter { 15 | 16 | public OptimAdapter(@NonNull FragmentManager fragmentManager, @NonNull Lifecycle lifecycle) { 17 | super(fragmentManager, lifecycle); 18 | } 19 | 20 | @NonNull 21 | @Override 22 | public Fragment createFragment(int position) { 23 | if (position == 1){ 24 | return new BasinHopping(); 25 | } 26 | return new GeneticAlgorithm(); 27 | } 28 | 29 | @Override 30 | public int getItemCount() { 31 | return 2; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/Adapters/DifferentRulesAdapter.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp.Adapters; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.fragment.app.Fragment; 5 | import androidx.fragment.app.FragmentManager; 6 | import androidx.lifecycle.Lifecycle; 7 | import androidx.viewpager2.adapter.FragmentStateAdapter; 8 | 9 | import com.example.fuzzycontapp.Fragments.Login; 10 | import com.example.fuzzycontapp.Fragments.MyRules; 11 | import com.example.fuzzycontapp.Fragments.SavedRules; 12 | import com.example.fuzzycontapp.Fragments.SignUp; 13 | 14 | public class DifferentRulesAdapter extends FragmentStateAdapter { 15 | 16 | public DifferentRulesAdapter(@NonNull FragmentManager fragmentManager, @NonNull Lifecycle lifecycle) { 17 | super(fragmentManager, lifecycle); 18 | } 19 | 20 | @NonNull 21 | @Override 22 | public Fragment createFragment(int position) { 23 | if (position == 1){ 24 | return new MyRules(); 25 | } 26 | return new SavedRules(); 27 | } 28 | 29 | @Override 30 | public int getItemCount() { 31 | return 2; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/settings_white.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/res/drawable/settings.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/Fragments/MathsFragment.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp.Fragments; 2 | 3 | import android.os.Bundle; 4 | 5 | import androidx.core.content.ContextCompat; 6 | import androidx.fragment.app.Fragment; 7 | 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | import android.widget.FrameLayout; 12 | import android.widget.LinearLayout; 13 | 14 | import com.airbnb.lottie.L; 15 | import com.example.fuzzycontapp.Activities.MathsModelClass; 16 | import com.example.fuzzycontapp.R; 17 | 18 | public class MathsFragment extends Fragment { 19 | 20 | @Override 21 | public void onCreate(Bundle savedInstanceState) { 22 | super.onCreate(savedInstanceState); 23 | } 24 | 25 | 26 | @Override 27 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 28 | Bundle savedInstanceState) { 29 | View rootView = inflater.inflate(R.layout.fragment_maths, container, false); 30 | FrameLayout frameLayout = (FrameLayout) rootView.findViewById(R.id.maths_fragment); 31 | frameLayout.addView(new MathsModelClass(getActivity())); 32 | return rootView; 33 | } 34 | } -------------------------------------------------------------------------------- /Android/app/src/main/res/layout/dialog_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 27 | -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/Fragments/AccelerometerFragment.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp.Fragments; 2 | 3 | import android.content.res.Resources; 4 | import android.os.Build; 5 | import android.os.Bundle; 6 | 7 | import androidx.fragment.app.Fragment; 8 | 9 | import android.util.DisplayMetrics; 10 | import android.view.LayoutInflater; 11 | import android.view.View; 12 | import android.view.ViewGroup; 13 | import android.widget.FrameLayout; 14 | 15 | import com.example.fuzzycontapp.Activities.AccelerometerModelClass; 16 | import com.example.fuzzycontapp.R; 17 | 18 | public class AccelerometerFragment extends Fragment { 19 | 20 | @Override 21 | public void onCreate(Bundle savedInstanceState) { 22 | super.onCreate(savedInstanceState); 23 | } 24 | 25 | @Override 26 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 27 | Bundle savedInstanceState) { 28 | View rootView = inflater.inflate(R.layout.fragment_accelerometer, container, false); 29 | FrameLayout frameLayout = (FrameLayout) rootView.findViewById(R.id.accelerometer_fragment); 30 | frameLayout.addView(new AccelerometerModelClass((getActivity()))); 31 | return rootView; 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/Indiv/Rule_model.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp.Indiv; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | import java.util.ArrayList; 6 | 7 | public class Rule_model { 8 | String name; 9 | Bitmap image; 10 | ArrayList imgs; 11 | String rules; 12 | Integer id; 13 | 14 | 15 | public Integer getId() { 16 | return id; 17 | } 18 | 19 | public void setId(Integer id) { 20 | this.id = id; 21 | } 22 | 23 | 24 | 25 | public Rule_model(String name, ArrayList imgs, String rules, Integer id) { 26 | this.name = name; 27 | this.imgs = imgs; 28 | this.rules = rules; 29 | this.id = id; 30 | } 31 | 32 | 33 | public String getName() { 34 | return name; 35 | } 36 | 37 | public void setName(String name) { 38 | this.name = name; 39 | } 40 | 41 | public ArrayList getImgs() { 42 | return imgs; 43 | } 44 | 45 | public void setImgs(ArrayList imgs) { 46 | this.imgs = imgs; 47 | } 48 | 49 | public String getRules() { 50 | return rules; 51 | } 52 | 53 | public void setRules(String rules) { 54 | this.rules = rules; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/FuzzyLogic/Trapezoid.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp.FuzzyLogic; 2 | 3 | public class Trapezoid { 4 | double n, a, b, c, d, h; 5 | 6 | public Trapezoid(double[] params) { 7 | if (params.length == 5) { 8 | this.a = params[0]; 9 | this.b = params[1]; 10 | this.c = params[2]; 11 | this.d = params[3]; 12 | this.h = params[4]; 13 | } 14 | if (params.length == 6) { 15 | this.a = params[0] - params[1]; 16 | this.b = params[0] - params[2]; 17 | this.c = params[0] + params[3]; 18 | this.d = params[0] + params[4]; 19 | this.h = 1; 20 | } 21 | 22 | } 23 | 24 | private double mu(double x) { 25 | double y = 0; 26 | if ((x >= this.a) && (x <= this.b)) { 27 | y = 1 - ((this.b - x) / (this.b - this.a)); 28 | } else if ((x >= this.b) && (x <= this.c)) { 29 | y = 1; 30 | } else if ((x >= this.c) && (x <= this.d)) { 31 | y = 1 - ((x - this.c) / (this.d - this.c)); 32 | } 33 | return y; 34 | } 35 | 36 | public double muh(double x) { 37 | return Math.min(this.h, this.mu(x)); 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /Android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Enables namespacing of each library's R class so that its R class includes only the 19 | # resources declared in the library itself and none from the library's dependencies, 20 | # thereby reducing the size of the R class for that library 21 | android.nonTransitiveRClass=true -------------------------------------------------------------------------------- /Android/app/src/main/java/com/example/fuzzycontapp/Activities/Fuzzy1.java: -------------------------------------------------------------------------------- 1 | package com.example.fuzzycontapp.Activities; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | 5 | import android.os.Bundle; 6 | import android.view.View; 7 | import android.webkit.WebView; 8 | 9 | import com.example.fuzzycontapp.Indiv.Global; 10 | import com.example.fuzzycontapp.R; 11 | import com.example.fuzzycontapp.databinding.ActivityFuzzy1Binding; 12 | 13 | public class Fuzzy1 extends AppCompatActivity { 14 | ActivityFuzzy1Binding binding; 15 | WebView webView; 16 | @Override 17 | protected void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | binding = ActivityFuzzy1Binding.inflate(getLayoutInflater()); 20 | View view = binding.getRoot(); 21 | setContentView(view); 22 | 23 | webView = binding.fuzzy1; 24 | switch (Global.THEORY_NUMBER){ 25 | case 0:{ 26 | webView.loadUrl("file:///android_asset/fuzzy1.html"); 27 | break; 28 | } 29 | case 1:{ 30 | webView.loadUrl("file:///android_asset/fuzzy2.html"); 31 | break; 32 | } 33 | case 2:{ 34 | webView.loadUrl("file:///android_asset/fuzzy3.html"); 35 | break; 36 | } 37 | } 38 | 39 | } 40 | } -------------------------------------------------------------------------------- /Android/app/src/main/res/menu/hamburger.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | 31 | 33 | 34 | 35 | 39 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Android/app/src/main/res/layout/activity_hamburger.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 19 | 20 | 21 | 22 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Android/app/src/main/res/layout/activity_recover_password.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 20 | 21 |