Browse Source

Database

changed the database
pull/1/head
Yiğit Çolakoğlu 7 years ago
parent
commit
9d04932881
26 changed files with 1099 additions and 133 deletions
  1. +4
    -4
      .idea/workspace.xml
  2. +490
    -0
      Barcode_Reader_Python/.idea/workspace.xml
  3. +8
    -18
      Barcode_Reader_Python/database_append.py
  4. BIN
      FoodCloud/.idea/caches/build_file_checksums.ser
  5. +1
    -1
      FoodCloud/.idea/misc.xml
  6. +6
    -0
      FoodCloud/.idea/vcs.xml
  7. +3
    -0
      FoodCloud/app/build.gradle
  8. BIN
      FoodCloud/app/libs/GenAsync.jar
  9. +1
    -0
      FoodCloud/app/src/main/java/gq/yigit/foodcloud/LearnMore.java
  10. +8
    -2
      FoodCloud/app/src/main/java/gq/yigit/foodcloud/MainActivity.java
  11. +93
    -0
      FoodCloud/app/src/main/java/gq/yigit/foodcloud/PHPComm.java
  12. +31
    -35
      FoodCloud/app/src/main/java/gq/yigit/foodcloud/ProductInfo.java
  13. +3
    -2
      FoodCloud/app/src/main/res/layout/activity_main.xml
  14. +190
    -70
      FoodCloud/app/src/main/res/layout/activity_product_info.xml
  15. +1
    -1
      FoodCloud/build.gradle
  16. +8
    -0
      database/communication/.idea/communication.iml
  17. +6
    -0
      database/communication/.idea/misc.xml
  18. +8
    -0
      database/communication/.idea/modules.xml
  19. +189
    -0
      database/communication/.idea/workspace.xml
  20. +22
    -0
      database/communication/comm.php
  21. +13
    -0
      database/communication/conn.php
  22. +10
    -0
      database/communication/format.html
  23. +1
    -0
      database/content/Processes/1.json
  24. +1
    -0
      database/content/Processes/2.json
  25. +1
    -0
      database/content/Products/1.json
  26. +1
    -0
      database/content/Products/2.json

+ 4
- 4
.idea/workspace.xml View File

@ -27,7 +27,7 @@
<entry file="file://$APPLICATION_HOME_DIR$/helpers/pydev/pydevd.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="319">
<caret line="1077" column="30" lean-forward="true" selection-start-line="1077" selection-start-column="30" selection-end-line="1077" selection-end-column="30" />
<caret line="1077" column="30" selection-start-line="1077" selection-start-column="30" selection-end-line="1077" selection-end-column="30" />
</state>
</provider>
</entry>
@ -94,7 +94,7 @@
<component name="NodePackageJsonFileManager">
<packageJsonPaths />
</component>
<component name="ProjectFrameBounds" extendedState="7">
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="327" />
<option name="y" value="28" />
<option name="width" value="1356" />
@ -128,7 +128,7 @@
<component name="PropertiesComponent">
<property name="SearchEverywhereHistoryKey" value="keymap&#9;ACTION&#9;ChangeKeymap" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/Barcode_Reader_Python" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="settings.editor.selected.configurable" value="preferences.keymap" />
@ -458,7 +458,7 @@
<entry file="file://$APPLICATION_HOME_DIR$/helpers/pydev/pydevd.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="319">
<caret line="1077" column="30" lean-forward="true" selection-start-line="1077" selection-start-column="30" selection-end-line="1077" selection-end-column="30" />
<caret line="1077" column="30" selection-start-line="1077" selection-start-column="30" selection-end-line="1077" selection-end-column="30" />
</state>
</provider>
</entry>


+ 490
- 0
Barcode_Reader_Python/.idea/workspace.xml View File

@ -0,0 +1,490 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="7b5ef56c-2d3e-44d9-be69-b414f166f99b" name="Default" comment="">
<change afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../FoodCloud/.idea/vcs.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../FoodCloud/app/src/main/java/gq/yigit/foodcloud/PHPcomm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database_append.py" beforeDir="false" afterPath="$PROJECT_DIR$/database_append.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../FoodCloud/.idea/caches/build_file_checksums.ser" beforeDir="false" afterPath="$PROJECT_DIR$/../FoodCloud/.idea/caches/build_file_checksums.ser" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../FoodCloud/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../FoodCloud/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../FoodCloud/app/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/../FoodCloud/app/build.gradle" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../FoodCloud/app/src/main/java/gq/yigit/foodcloud/LearnMore.java" beforeDir="false" afterPath="$PROJECT_DIR$/../FoodCloud/app/src/main/java/gq/yigit/foodcloud/LearnMore.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../FoodCloud/app/src/main/java/gq/yigit/foodcloud/ProductInfo.java" beforeDir="false" afterPath="$PROJECT_DIR$/../FoodCloud/app/src/main/java/gq/yigit/foodcloud/ProductInfo.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../FoodCloud/app/src/main/res/layout/activity_main.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../FoodCloud/app/src/main/res/layout/activity_main.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../FoodCloud/app/src/main/res/layout/activity_product_info.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../FoodCloud/app/src/main/res/layout/activity_product_info.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../FoodCloud/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/../FoodCloud/build.gradle" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CoverageDataManager">
<SUITE FILE_PATH="coverage/Barcode_Reader_Python$move.coverage" NAME="move Coverage Results" MODIFIED="1529670744750" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/Barcode_Reader_Python$RUN.coverage" NAME="RUN Coverage Results" MODIFIED="1529584815747" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/WRO_QR$pydevd.coverage" NAME="pydevd Coverage Results" MODIFIED="1529693199893" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$APPLICATION_HOME_DIR$/helpers/pydev" />
<SUITE FILE_PATH="coverage/Barcode_Reader_Python$generate_moves.coverage" NAME="generate_moves Coverage Results" MODIFIED="1529665788763" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/Barcode_Reader_Python$raspberry_live.coverage" NAME="raspberry_live Coverage Results" MODIFIED="1529585357099" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/Barcode_Reader_Python$sort_date.coverage" NAME="sort_date Coverage Results" MODIFIED="1529590504238" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/Barcode_Reader_Python$main.coverage" NAME="main Coverage Results" MODIFIED="1529672838644" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/Barcode_Reader_Python$Unnamed.coverage" NAME="raspberry_live Coverage Results" MODIFIED="1529543452123" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/Barcode_Reader_Python$database_actions.coverage" NAME="database_actions Coverage Results" MODIFIED="1529692830827" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/Barcode_Reader_Python$database_append.coverage" NAME="database_append Coverage Results" MODIFIED="1529768832056" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="database_append.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/database_append.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="51" column="70" lean-forward="true" selection-start-line="51" selection-start-column="70" selection-end-line="51" selection-end-column="70" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Python Script" />
</list>
</option>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find />
<find>cam.read</find>
<find>dates_orig</find>
<find>dates</find>
<find>shelf_new</find>
<find>database_</find>
</findStrings>
</component>
<component name="Git.Settings">
<option name="PREVIOUS_COMMIT_AUTHORS">
<list>
<option value="Yiğit Çolakoğlu &lt;yigitcolakoglu@hotmail.com&gt;" />
</list>
</option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/run.py" />
<option value="$PROJECT_DIR$/zbar_live.py" />
<option value="$PROJECT_DIR$/raspberry_zbar.py" />
<option value="$PROJECT_DIR$/sort_date.py" />
<option value="$PROJECT_DIR$/generate_moves.py" />
<option value="$PROJECT_DIR$/move.py" />
<option value="$PROJECT_DIR$/database_actions.py" />
<option value="$PROJECT_DIR$/main.py" />
<option value="$PROJECT_DIR$/database_read.py" />
<option value="$PROJECT_DIR$/Barcode_Reader_Python/database_append.py" />
<option value="$PROJECT_DIR$/database_append.py" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="NodePackageJsonFileManager">
<packageJsonPaths />
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="301" />
<option name="y" value="28" />
<option name="width" value="1346" />
<option name="height" value="770" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="Barcode_Reader_Python" type="b2602c69:ProjectViewProjectNode" />
<item name="Barcode_Reader_Python" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="SearchEverywhereHistoryKey" value="keymap&#9;ACTION&#9;ChangeKeymap" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="settings.editor.selected.configurable" value="preferences.keymap" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="Python.database_append">
<configuration name="RUN" type="PythonConfigurationType" factoryName="Python">
<module name="Barcode_Reader_Python" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="/usr/bin/python2.7" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/run.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
</configuration>
<configuration name="database_actions" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="Barcode_Reader_Python" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/database_read.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
</configuration>
<configuration name="database_append" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="Barcode_Reader_Python" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/database_append.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
</configuration>
<configuration name="main" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="Barcode_Reader_Python" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/main.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
</configuration>
<configuration name="move" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="Barcode_Reader_Python" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/move.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
</configuration>
<configuration name="pydevd" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="Barcode_Reader_Python" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$APPLICATION_HOME_DIR$/helpers/pydev" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$APPLICATION_HOME_DIR$/helpers/pydev/pydevd.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
</configuration>
<configuration name="raspberry_live" type="PythonConfigurationType" factoryName="Python">
<module name="Barcode_Reader_Python" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="/usr/bin/python2.7" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/raspberry_zbar.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
</configuration>
<list>
<item itemvalue="Python.raspberry_live" />
<item itemvalue="Python.RUN" />
<item itemvalue="Python.main" />
<item itemvalue="Python.database_actions" />
<item itemvalue="Python.move" />
<item itemvalue="Python.database_append" />
<item itemvalue="Python.pydevd" />
</list>
<recent_temporary>
<list>
<item itemvalue="Python.database_append" />
<item itemvalue="Python.pydevd" />
<item itemvalue="Python.database_actions" />
<item itemvalue="Python.main" />
<item itemvalue="Python.move" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="7b5ef56c-2d3e-44d9-be69-b414f166f99b" name="Default" comment="" />
<created>1529543214918</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1529543214918</updated>
</task>
<task id="LOCAL-00001" summary="completed the algorithm">
<created>1529689633554</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1529689633554</updated>
</task>
<task id="LOCAL-00002" summary="refactored,improved design">
<created>1529690495712</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1529690495712</updated>
</task>
<option name="localTasksCounter" value="3" />
<servers />
</component>
<component name="ToolWindowManager">
<frame x="0" y="24" width="1920" height="1030" extended-state="6" />
<layout>
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Event Log" order="7" sideWeight="0.5007587" side_tool="true" weight="0.4638365" />
<window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" order="7" />
<window_info anchor="bottom" id="Python Console" order="7" />
<window_info anchor="bottom" id="Run" order="2" sideWeight="0.49924126" weight="0.28426966" />
<window_info anchor="bottom" id="Terminal" order="7" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.19925214" />
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
<window_info anchor="right" id="Database" order="3" />
<window_info anchor="right" id="SciView" order="3" weight="0.32928678" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4033708" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.24962063" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="bottom" id="Messages" order="7" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Find" order="1" weight="0.32911393" />
</layout>
<layout-to-restore>
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.24962063" />
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.26783004" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info active="true" anchor="bottom" id="Run" order="2" sideWeight="0.49924126" visible="true" weight="0.27056962" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.39873418" />
<window_info anchor="right" id="Database" order="4" />
<window_info anchor="bottom" id="Terminal" order="11" />
<window_info anchor="bottom" id="Event Log" order="12" sideWeight="0.5007587" side_tool="true" weight="0.4638365" />
<window_info anchor="bottom" id="Database Changes" order="9" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" order="8" />
<window_info anchor="right" id="SciView" order="3" weight="0.32928678" />
<window_info anchor="bottom" id="Find" order="1" weight="0.32911393" />
<window_info anchor="bottom" id="Python Console" order="10" />
</layout-to-restore>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="completed the algorithm" />
<MESSAGE value="refactored,improved design" />
<option name="LAST_COMMIT_MESSAGE" value="refactored,improved design" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<option name="time" value="4" />
</breakpoint-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$APPLICATION_HOME_DIR$/helpers/pydev/pydevd.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="16275">
<caret line="1085" column="21" lean-forward="true" selection-start-line="1085" selection-start-column="21" selection-end-line="1085" selection-end-column="21" />
</state>
</provider>
</entry>
<entry file="file://$APPLICATION_HOME_DIR$/helpers/pydev/pydevd.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="16155">
<caret line="1077" column="30" lean-forward="true" selection-start-line="1077" selection-start-column="30" selection-end-line="1077" selection-end-column="30" />
</state>
</provider>
</entry>
<entry file="file://$APPLICATION_HOME_DIR$/helpers/pydev/pydevd.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="16005">
<caret line="1067" selection-start-line="1067" selection-end-line="1067" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/main.py" />
<entry file="file://$PROJECT_DIR$/move.py" />
<entry file="file://$PROJECT_DIR$/generate_moves.py" />
<entry file="file://$PROJECT_DIR$/sort_date.py" />
<entry file="file://$PROJECT_DIR$/database_read.py" />
<entry file="file://$PROJECT_DIR$/raspberry_zbar.py" />
<entry file="file://$PROJECT_DIR$/run.py" />
<entry file="file://$PROJECT_DIR$/barcodes.csv" />
<entry file="file://$PROJECT_DIR$/run.py" />
<entry file="file://$PROJECT_DIR$/barcodes.csv" />
<entry file="file://$PROJECT_DIR$/raspberry_zbar.py" />
<entry file="file://$PROJECT_DIR$/zbar_live.py" />
<entry file="file://$PROJECT_DIR$/sort_date.py" />
<entry file="file:///usr/lib/python2.7/dist-packages/serial/serialposix.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="214">
<caret line="270" column="12" lean-forward="true" selection-start-line="270" selection-start-column="12" selection-end-line="270" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/move.py" />
<entry file="file://$PROJECT_DIR$/database_read.py" />
<entry file="file://$APPLICATION_HOME_DIR$/helpers/pydev/pydevd.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="169">
<caret line="1067" selection-start-line="1067" selection-end-line="1067" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/database_append.py" />
<entry file="file://$PROJECT_DIR$/generate_moves.py" />
<entry file="file://$PROJECT_DIR$/main.py" />
<entry file="file://$PROJECT_DIR$/main.py" />
<entry file="file://$PROJECT_DIR$/move.py" />
<entry file="file://$PROJECT_DIR$/generate_moves.py" />
<entry file="file://$PROJECT_DIR$/sort_date.py" />
<entry file="file://$PROJECT_DIR$/database_read.py" />
<entry file="file://$PROJECT_DIR$/raspberry_zbar.py" />
<entry file="file://$PROJECT_DIR$/run.py" />
<entry file="file://$PROJECT_DIR$/barcodes.csv" />
<entry file="file://$PROJECT_DIR$/run.py" />
<entry file="file://$PROJECT_DIR$/barcodes.csv" />
<entry file="file://$PROJECT_DIR$/raspberry_zbar.py" />
<entry file="file://$PROJECT_DIR$/zbar_live.py" />
<entry file="file://$PROJECT_DIR$/sort_date.py" />
<entry file="file:///usr/lib/python2.7/dist-packages/serial/serialposix.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="214">
<caret line="270" column="12" lean-forward="true" selection-start-line="270" selection-start-column="12" selection-end-line="270" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/move.py" />
<entry file="file://$APPLICATION_HOME_DIR$/helpers/pydev/pydevd.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="484">
<caret line="1085" column="21" selection-start-line="1085" selection-start-column="21" selection-end-line="1085" selection-end-column="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/generate_moves.py" />
<entry file="file://$PROJECT_DIR$/main.py" />
<entry file="file://$PROJECT_DIR$/database_read.py" />
<entry file="file://$PROJECT_DIR$/Barcode_Reader_Python/database_append.py" />
<entry file="file://$PROJECT_DIR$/database_append.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="51" column="70" lean-forward="true" selection-start-line="51" selection-start-column="70" selection-end-line="51" selection-end-column="70" />
</state>
</provider>
</entry>
</component>
</project>

+ 8
- 18
Barcode_Reader_Python/database_append.py View File

@ -1,19 +1,4 @@
import pyrebase
config = {
"apiKey": "AIzaSyD3bXRjLxEAVOKtj8hpjO4iI3Nn32F7agU",
"authDomain": "foodcloud-f6eb1.firebaseapp.com",
"databaseURL": "https://foodcloud-f6eb1.firebaseio.com/",
"storageBucket": "foodcloud-f6eb1.appspot.com"
}
firebase = pyrebase.initialize_app(config)
auth = firebase.auth()
user = auth.sign_in_with_email_and_password('yigitcolakohlu@gmail.com', 'FoodWro2018')
db = firebase.database()
import json
data_format_prod = {
'Prod_Name': None, 'BBD': None, 'Nutrients': [], 'Calories': 0, 'Allergens': [],
@ -76,7 +61,12 @@ Products = [data_1_prod, data_2_prod]
Processes = [data_1_proc, data_2_proc]
for i in range(len(Products)):
db.child("Products").child(str(i + 1)).set(Products[i])
with open('../database/content/Products/'+str(i+1) + '.json', 'w') as outfile:
json.dump(Products[i], outfile)
outfile.close()
for i in range(len(Processes)):
db.child("Processes").child(str(i + 1)).set(Processes[i])
with open('../database/content/Processes/'+str(i+1) + '.json', 'w') as outfile:
json.dump(Processes[i], outfile)
outfile.close()

BIN
FoodCloud/.idea/caches/build_file_checksums.ser View File


+ 1
- 1
FoodCloud/.idea/misc.xml View File

@ -25,7 +25,7 @@
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">


+ 6
- 0
FoodCloud/.idea/vcs.xml View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

+ 3
- 0
FoodCloud/app/build.gradle View File

@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "gq.yigit.foodcloud"
minSdkVersion 24
@ -19,6 +20,7 @@ android {
}
dependencies {
api 'com.google.http-client:google-http-client-android:1.22.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
@ -30,5 +32,6 @@ dependencies {
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
api 'com.google.firebase:firebase-core:16.0.0'
compileOnly 'com.google.android.wearable:wearable:2.3.0'
implementation files('libs/GenAsync.jar')
}
apply plugin: 'com.google.gms.google-services'

BIN
FoodCloud/app/libs/GenAsync.jar View File


+ 1
- 0
FoodCloud/app/src/main/java/gq/yigit/foodcloud/LearnMore.java View File

@ -42,6 +42,7 @@ public class LearnMore extends AppCompatActivity implements View.OnClickListener
@Override
protected void onCreate(Bundle savedInstanceState) {
Bundle extras = getIntent().getExtras();
if (extras != null) {
prod_loc_more = extras.getString("key");


+ 8
- 2
FoodCloud/app/src/main/java/gq/yigit/foodcloud/MainActivity.java View File

@ -2,17 +2,21 @@ package gq.yigit.foodcloud;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;
import android.content.Intent;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity implements OnClickListener {
import java.util.HashMap;
public class MainActivity extends AppCompatActivity implements OnClickListener{
private static final String TAG = "MainActivity";
int cnt = 0;
private Button scanBtn;
private Button infoBtn;
@ -28,6 +32,7 @@ public class MainActivity extends AppCompatActivity implements OnClickListener {
infoBtn = (Button)findViewById(R.id.info_button);
infoBtn.setOnClickListener(this);
}
public void onClick(View v){
@ -57,5 +62,6 @@ public class MainActivity extends AppCompatActivity implements OnClickListener {
"No scan data received!", Toast.LENGTH_SHORT);
toast.show();
}
}
}

+ 93
- 0
FoodCloud/app/src/main/java/gq/yigit/foodcloud/PHPComm.java View File

@ -0,0 +1,93 @@
package gq.yigit.foodcloud;
import android.app.AlertDialog;
import android.content.Context;
import android.os.AsyncTask;
import android.util.Log;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
/**
* Created by ProgrammingKnowledge on 1/5/2016.
*/
public class PHPComm extends AsyncTask<String,Void,String> {
private static final String TAG = "MainActivity";
Context context;
AlertDialog alertDialog;
PHPComm (Context ctx) {
context = ctx;
}
static public String return_json;
@Override
protected String doInBackground(String... params) {
String type = params[0];
String login_url = "http://192.168.1.21/database/communication/comm.php";
if(type.equals("get")) {
try {
String id = params[1];
String value = params[2];
URL url = new URL(login_url);
HttpURLConnection httpURLConnection = (HttpURLConnection)url.openConnection();
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setDoOutput(true);
httpURLConnection.setDoInput(true);
OutputStream outputStream = httpURLConnection.getOutputStream();
BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(outputStream, "UTF-8"));
String post_data = URLEncoder.encode("id","UTF-8")+"="+URLEncoder.encode(id,"UTF-8")+"&"
+URLEncoder.encode("value","UTF-8")+"="+URLEncoder.encode(value,"UTF-8");
bufferedWriter.write(post_data);
bufferedWriter.flush();
bufferedWriter.close();
outputStream.close();
InputStream inputStream = httpURLConnection.getInputStream();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream,"iso-8859-1"));
String result="";
String line="";
while((line = bufferedReader.readLine())!= null) {
result += line;
}
bufferedReader.close();
inputStream.close();
httpURLConnection.disconnect();
return result;
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
return null;
}
@Override
protected void onPreExecute() {
alertDialog = new AlertDialog.Builder(context).create();
alertDialog.setTitle("Login Status");
}
@Override
protected void onPostExecute(String result) {
alertDialog.setMessage(result);
Log.d(TAG, "AlertBoxSet" + result);
setJson(result);
}
@Override
protected void onProgressUpdate(Void... values) {
super.onProgressUpdate(values);
}
static private void setJson(String json){
return_json = json;
}
}

+ 31
- 35
FoodCloud/app/src/main/java/gq/yigit/foodcloud/ProductInfo.java View File

@ -1,17 +1,24 @@
package gq.yigit.foodcloud;
import android.content.Intent;
import android.nfc.Tag;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import android.widget.Button;
import com.google.api.client.json.JsonObjectParser;
import com.google.firebase.database.*;
import java.util.HashMap;
import java.util.Map;
import java.util.ArrayList;
import android.view.View.OnClickListener;
import android.widget.Toast;
import org.json.JSONException;
import org.json.JSONObject;
public class ProductInfo extends AppCompatActivity implements OnClickListener {
private static final String TAG = "MainActivity";
@ -26,14 +33,15 @@ public class ProductInfo extends AppCompatActivity implements OnClickListener {
private String name;
private String cal;
private String cooked;
private ArrayList nutrients;
private String nutrients;
private ArrayList nutrients_array;
private String bbd;
private String processed;
private String problematic;
private ArrayList allergens;
public ArrayList Prods;
public Map<String, Object> someMap;
public HashMap<String, Object> Prod;
private String allergens;
private ArrayList allergens_array;
public String json_str;
public JSONObject Prod;
private Button scanBtn;
private Button jrnyBtn;
public String prod_loc;
@ -71,9 +79,8 @@ public class ProductInfo extends AppCompatActivity implements OnClickListener {
scanBtn.setOnClickListener(this);
jrnyBtn = (Button)findViewById(R.id.journey);
jrnyBtn.setOnClickListener(this);
myRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
Bundle extras = getIntent().getExtras();
if (extras != null) {
prod_loc = extras.getString("key");
@ -81,26 +88,20 @@ public class ProductInfo extends AppCompatActivity implements OnClickListener {
}
// This method is called once with the initial value and again
// whenever data at this location is updated.
someMap = (Map<String, Object>) dataSnapshot.getValue();
ArrayList al1 = new ArrayList();
al1 = (ArrayList) someMap.get("Products");
al1.remove(0);
Prods = al1;
Prod = (HashMap<String, Object>)al1.get((Integer.parseInt(prod_loc))-1);
Log.d(TAG,"Value is : " + al1.get((Integer.parseInt(prod_loc))-1));
Log.d(TAG,Prod.get("Calories").getClass().toString());
name = Prod.get("Prod_Name").toString();
cal = Prod.get("Calories").toString();
cooked = Prod.get("Cooked").toString();
nutrients = (ArrayList)Prod.get("Nutrients");
bbd = Prod.get("BBD").toString();
processed = Prod.get("Process").toString();
allergens = (ArrayList)Prod.get("Allergens");
problematic = Prod.get("Problematic").toString();
PHPComm comm = new PHPComm(this);
comm.execute("get", "1", "Products");
try {
json_str = PHPComm.return_json;
Log.d(TAG,"get json str" + json_str);
JSONObject jsonObj = new JSONObject(json_str);
}catch (JSONException e) {
Log.d(TAG, "An error occured with the json!");
}
/*
Name = (TextView) findViewById(R.id.name);
Name.setText("Name : " + name);
Name.setText( name);
Cal = (TextView) findViewById(R.id.Calories);
Cal.setText("Calories : " + cal);
Cal.setText(cal);
Allergens = (TextView) findViewById(R.id.allergens);
allergens_print = "";
if(allergens.isEmpty()) {
@ -127,22 +128,18 @@ public class ProductInfo extends AppCompatActivity implements OnClickListener {
}
Nutrients.setText("Nutrients : " + nutrients_print);
}
Cooked = (TextView) findViewById(R.id.cooked);
Cooked.setText("Cooked : " + cooked);
BBD = (TextView) findViewById(R.id.BBD);
BBD.setText("BBD : " +bbd);
BBD.setText(bbd);
Processed = (TextView) findViewById(R.id.Process);
Processed.setText("Process : " + processed);
*/
}
@Override
public void onCancelled(DatabaseError error) {
// Failed to read value
Log.w(TAG, "Failed to read value.", error.toException());
}
});
@ -152,4 +149,3 @@ public class ProductInfo extends AppCompatActivity implements OnClickListener {
}
}

+ 3
- 2
FoodCloud/app/src/main/res/layout/activity_main.xml View File

@ -14,7 +14,7 @@
android:layout_width="231dp"
android:layout_height="89dp"
android:layout_marginBottom="24dp"
android:layout_marginBottom="60dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:background="@drawable/buttonshape"
@ -28,6 +28,7 @@
android:textSize="30sp"
app:layout_constraintBottom_toTopOf="@+id/imageView"
app:layout_constraintEnd_toEndOf="@+id/imageView"
app:layout_constraintHorizontal_bias="0.485"
app:layout_constraintStart_toStartOf="@+id/imageView" />
<Button
@ -38,7 +39,7 @@
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="24dp"
android:layout_marginTop="60dp"
android:background="@drawable/buttonshape"
android:shadowColor="#A8A8A8"
android:shadowDx="0"


+ 190
- 70
FoodCloud/app/src/main/res/layout/activity_product_info.xml View File

@ -6,14 +6,149 @@
android:layout_height="match_parent"
tools:context=".ProductInfo">
<TextView
android:id="@+id/BBD"
android:layout_width="260dp"
android:layout_height="31dp"
android:layout_marginBottom="21dp"
android:lineSpacingExtra="10sp"
android:text=""
android:textColor="@android:color/black"
android:textSize="18sp"
android:typeface="sans"
app:layout_constraintBottom_toTopOf="@+id/Process"
app:layout_constraintEnd_toEndOf="@+id/Process" />
<TextView
android:id="@+id/process_const"
android:layout_width="75dp"
android:layout_height="31dp"
android:layout_marginBottom="60dp"
android:fontFamily="sans-serif"
android:lineSpacingExtra="10sp"
android:text="Process:"
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold|italic"
android:typeface="sans"
app:layout_constraintBottom_toTopOf="@+id/button"
app:layout_constraintStart_toStartOf="@+id/bbd_const" />
<TextView
android:id="@+id/bbd_const"
android:layout_width="40dp"
android:layout_height="31dp"
android:layout_marginBottom="21dp"
android:layout_marginStart="8dp"
android:fontFamily="sans-serif"
android:lineSpacingExtra="10sp"
android:text="BBD:"
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold|italic"
android:typeface="sans"
app:layout_constraintBottom_toTopOf="@+id/process_const"
app:layout_constraintEnd_toStartOf="@+id/BBD"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/exp_const" />
<TextView
android:id="@+id/name_const"
android:layout_width="125dp"
android:layout_height="31dp"
android:layout_marginBottom="21dp"
android:layout_marginStart="8dp"
android:fontFamily="sans-serif"
android:lineSpacingExtra="10sp"
android:text="Product Name:"
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold|italic"
android:typeface="sans"
app:layout_constraintBottom_toTopOf="@+id/allergens_const"
app:layout_constraintEnd_toStartOf="@+id/name"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/allergens_const" />
<TextView
android:id="@+id/nutrients_const"
android:layout_width="80dp"
android:layout_height="31dp"
android:layout_marginBottom="21dp"
android:layout_marginStart="8dp"
android:fontFamily="sans-serif"
android:lineSpacingExtra="10sp"
android:text="Nutrients:"
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold|italic"
android:typeface="sans"
app:layout_constraintBottom_toTopOf="@+id/exp_const"
app:layout_constraintEnd_toStartOf="@+id/nutrients"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/cooked_const" />
<TextView
android:id="@+id/cooked_const"
android:layout_width="70dp"
android:layout_height="31dp"
android:layout_marginBottom="21dp"
android:layout_marginStart="8dp"
android:fontFamily="sans-serif"
android:lineSpacingExtra="10sp"
android:text="Cooked:"
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold|italic"
android:typeface="sans"
app:layout_constraintBottom_toTopOf="@+id/nutrients_const"
app:layout_constraintEnd_toStartOf="@+id/cooked"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/calories_const" />
<TextView
android:id="@+id/calories_const"
android:layout_width="75dp"
android:layout_height="31dp"
android:layout_marginBottom="21dp"
android:fontFamily="sans-serif"
android:lineSpacingExtra="10sp"
android:text="Calories:"
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold|italic"
android:typeface="sans"
app:layout_constraintBottom_toTopOf="@+id/cooked_const"
app:layout_constraintEnd_toStartOf="@+id/Calories" />
<TextView
android:id="@+id/allergens_const"
android:layout_width="85dp"
android:layout_height="31dp"
android:layout_marginBottom="21dp"
android:layout_marginStart="8dp"
android:fontFamily="sans-serif"
android:lineSpacingExtra="10sp"
android:text="Allergens:"
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold|italic"
android:typeface="sans"
app:layout_constraintBottom_toTopOf="@+id/calories_const"
app:layout_constraintEnd_toStartOf="@+id/allergens"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/calories_const" />
<Button
android:id="@+id/journey"
android:layout_width="179dp"
android:layout_height="90dp"
android:layout_marginBottom="24dp"
android:layout_marginStart="200dp"
android:layout_marginBottom="55dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="16dp"
android:background="@drawable/buttonshape"
android:shadowColor="#A8A8A8"
android:shadowDx="0"
@ -23,15 +158,16 @@
android:textColor="#000000"
android:textSize="30sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/button" />
<Button
android:id="@+id/button"
android:layout_width="179dp"
android:layout_height="90dp"
android:layout_marginBottom="24dp"
android:layout_marginStart="4dp"
android:layout_marginBottom="55dp"
android:layout_marginStart="8dp"
android:background="@drawable/buttonshape"
android:shadowColor="#A8A8A8"
android:shadowDx="0"
@ -45,130 +181,114 @@
<TextView
android:id="@+id/name"
android:layout_width="300dp"
android:layout_width="175dp"
android:layout_height="31dp"
android:layout_marginEnd="68dp"
android:layout_marginStart="68dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="21dp"
android:lineSpacingExtra="10sp"
android:text=""
android:textColor="@android:color/black"
android:textColor="#000000"
android:textSize="18sp"
android:typeface="sans"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toTopOf="@+id/allergens"
app:layout_constraintEnd_toEndOf="@+id/allergens" />
<TextView
android:id="@+id/allergens"
android:layout_width="300dp"
android:layout_width="215dp"
android:layout_height="31dp"
android:layout_marginEnd="68dp"
android:layout_marginStart="68dp"
android:layout_marginTop="64dp"
android:layout_marginBottom="21dp"
android:lineSpacingExtra="10sp"
android:text=""
android:textColor="@android:color/black"
android:textSize="18sp"
android:typeface="sans"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toTopOf="@+id/Calories"
app:layout_constraintEnd_toEndOf="@+id/Calories" />
<TextView
android:id="@+id/Calories"
android:layout_width="300dp"
android:layout_width="225dp"
android:layout_height="31dp"
android:layout_marginEnd="68dp"
android:layout_marginStart="68dp"
android:layout_marginTop="116dp"
android:layout_marginBottom="21dp"
android:lineSpacingExtra="10sp"
android:text=""
android:textColor="@android:color/black"
android:textSize="18sp"
android:typeface="sans"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toTopOf="@+id/cooked"
app:layout_constraintEnd_toEndOf="@+id/cooked" />
<TextView
android:id="@+id/cooked"
android:layout_width="300dp"
android:layout_width="230dp"
android:layout_height="31dp"
android:layout_marginEnd="68dp"
android:layout_marginStart="68dp"
android:layout_marginTop="168dp"
android:layout_marginBottom="21dp"
android:lineSpacingExtra="10sp"
android:text=""
android:textColor="@android:color/black"
android:textSize="18sp"
android:typeface="sans"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toTopOf="@+id/nutrients"
app:layout_constraintEnd_toEndOf="@+id/nutrients" />
<TextView
android:id="@+id/nutrients"
android:layout_width="300dp"
android:layout_width="220dp"
android:layout_height="31dp"
android:layout_marginEnd="68dp"
android:layout_marginStart="68dp"
android:layout_marginTop="228dp"
android:layout_marginBottom="21dp"
android:lineSpacingExtra="10sp"
android:text=""
android:textColor="@android:color/black"
android:textSize="18sp"
android:typeface="sans"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toTopOf="@+id/exp_date"
app:layout_constraintEnd_toEndOf="@+id/exp_date" />
<TextView
android:id="@+id/BBD"
android:layout_width="300dp"
android:id="@+id/exp_date"
android:layout_width="200dp"
android:layout_height="31dp"
android:layout_marginEnd="68dp"
android:layout_marginStart="68dp"
android:layout_marginTop="288dp"
android:layout_marginBottom="21dp"
android:lineSpacingExtra="10sp"
android:text=""
android:textColor="@android:color/black"
android:textSize="18sp"
android:typeface="sans"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toTopOf="@+id/BBD"
app:layout_constraintEnd_toEndOf="@+id/BBD" />
<TextView
android:id="@+id/Process"
android:layout_width="300dp"
android:layout_width="225dp"
android:layout_height="31dp"
android:layout_marginEnd="68dp"
android:layout_marginStart="68dp"
android:layout_marginTop="348dp"
android:layout_marginBottom="60dp"
android:layout_marginEnd="35dp"
android:lineSpacingExtra="10sp"
android:text=""
android:textColor="@android:color/black"
android:textSize="18sp"
android:typeface="sans"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@+id/journey"
app:layout_constraintEnd_toEndOf="@+id/journey" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="20dp" />
<android.support.constraint.Guideline
android:id="@+id/guideline2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="20dp" />
<TextView
android:id="@+id/exp_const"
android:layout_width="100dp"
android:layout_height="31dp"
android:layout_marginBottom="21dp"
android:layout_marginStart="8dp"
android:fontFamily="sans-serif"
android:lineSpacingExtra="10sp"
android:text="Expiry Date:"
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold|italic"
android:typeface="sans"
app:layout_constraintBottom_toTopOf="@+id/bbd_const"
app:layout_constraintEnd_toStartOf="@+id/exp_date"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/nutrients_const" />
</android.support.constraint.ConstraintLayout>

+ 1
- 1
FoodCloud/build.gradle View File

@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.0'
// NOTE: Do not place your application dependencies here; they belong


+ 8
- 0
database/communication/.idea/communication.iml View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

+ 6
- 0
database/communication/.idea/misc.xml View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>

+ 8
- 0
database/communication/.idea/modules.xml View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/communication.iml" filepath="$PROJECT_DIR$/.idea/communication.iml" />
</modules>
</component>
</project>

+ 189
- 0
database/communication/.idea/workspace.xml View File

@ -0,0 +1,189 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="a6381de7-5961-40ca-8dc1-2a70115a90e1" name="Default" comment="" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="conn.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/conn.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" column="2" selection-start-line="12" selection-start-column="2" selection-end-line="12" selection-end-column="2" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="comm.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/comm.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="162">
<caret line="14" column="13" selection-start-line="14" selection-start-column="13" selection-end-line="14" selection-end-column="13" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="format.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/format.html">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret selection-end-line="9" selection-end-column="7" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="HTML File" />
</list>
</option>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/format.html" />
<option value="$PROJECT_DIR$/conn.php" />
<option value="$PROJECT_DIR$/comm.php" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="NodePackageJsonFileManager">
<packageJsonPaths />
</component>
<component name="ProjectFrameBounds">
<option name="x" value="821" />
<option name="y" value="342" />
<option name="width" value="1390" />
<option name="height" value="988" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="communication" type="b2602c69:ProjectViewProjectNode" />
<item name="communication" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="DefaultHtmlFileTemplate" value="HTML File" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="settings.editor.selected.configurable" value="preferences.editor" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="a6381de7-5961-40ca-8dc1-2a70115a90e1" name="Default" comment="" />
<created>1529763756323</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1529763756323</updated>
<workItem from="1529763757470" duration="7051000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="7051000" />
</component>
<component name="ToolWindowManager">
<frame x="821" y="342" width="1390" height="988" extended-state="0" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25179857" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Docker" show_stripe_button="false" />
<window_info anchor="bottom" id="Event Log" side_tool="true" />
<window_info anchor="right" id="Database" />
<window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
<window_info anchor="bottom" id="Run" order="2" />
<window_info anchor="bottom" id="Version Control" show_stripe_button="false" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Terminal" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info id="Favorites" side_tool="true" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Message" order="0" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<option name="time" value="2" />
</breakpoint-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/conn.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" column="2" selection-start-line="12" selection-start-column="2" selection-end-line="12" selection-end-column="2" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/format.html">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret selection-end-line="9" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/comm.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="162">
<caret line="14" column="13" selection-start-line="14" selection-start-column="13" selection-end-line="14" selection-end-column="13" />
</state>
</provider>
</entry>
</component>
</project>

+ 22
- 0
database/communication/comm.php View File

@ -0,0 +1,22 @@
<?php
/**
* Created by PhpStorm.
* User: yigido
* Date: 6/23/18
* Time: 5:19 PM
*/
$id = $_POST["id"];
$value = $_POST["value"];
$file_loc = "../content/" . $value . "/" . $id . ".json";
$myfile = fopen($file_loc, "r") or die("Unable to open file!");
$content = fread($myfile,filesize($file_loc));
echo $content;
?>

+ 13
- 0
database/communication/conn.php View File

@ -0,0 +1,13 @@
<?php
/**
* Created by PhpStorm.
* User: yigido
* Date: 6/23/18
* Time: 5:20 PM
*/
$db_name = "Products";
$mysql_username = "root";
$mysql_password = "12345";
$server_name = "localhost";
$conn = mysqli_connect($server_name, $mysql_username, $mysql_password,$db_name);
?>

+ 10
- 0
database/communication/format.html View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

+ 1
- 0
database/content/Processes/1.json View File

@ -0,0 +1 @@
{"Process": {"Processes": "Reverse Osmosis,Nanofiltration,Ultrafiltration,Microfiltration", "Location": "McCarty Family Farms"}, "Harvested": {"Date": "18.08.2018", "Product": "Raw Milk", "Location": "Larson Family"}, "Packaging": {"Material": "Carton", "Location": "JJX Packaging", "Cancerogen": false}, "Transport2": {"Duration": 13, "Moved to,from": "McCarty Family Farms-JJX Packaging", "Stopped": true, "Condition": true}, "Transport1": {"Duration": 9, "Moved to,from": "Larson Family-McCarty Family Farms", "Stopped": true, "Condition": true}}

+ 1
- 0
database/content/Processes/2.json View File

@ -0,0 +1 @@
{"Process": {"Processes": "Roasting,Pulp,Conching,Moulding", "Location": "Nestle"}, "Harvested": {"Date": "27.01.2018", "Product": "Cocoa", "Location": "India"}, "Packaging": {"Material": "Foil", "Location": "Ulma Packaging", "Cancerogen": false}, "Transport2": {"Duration": 4, "Moved to,from": "Nestle-Ulma Packaging", "Stopped": false, "Condition": true}, "Transport1": {"Duration": 71, "Moved to,from": "India-Nestle ", "Stopped": true, "Condition": true}}

+ 1
- 0
database/content/Products/1.json View File

@ -0,0 +1 @@
"{\"Allergens\": [\"Lactose\"], \"Cooked\": false, \"Problematic\": false, \"Process\": \"Pastorized\", \"Nutrients\": [\"Protein\", \"Fat\", \"Lactose\", \"Glucose\"], \"BBD\": \"24.08.2018\", \"Calories\": 120, \"Prod_Name\": \"Milk\"}"

+ 1
- 0
database/content/Products/2.json View File

@ -0,0 +1 @@
{"Allergens": [""], "Cooked": false, "Problematic": false, "Process": "", "Nutrients": ["Lactose", "Glucose", "Cocoa"], "BBD": "28.01.2019", "Calories": 180, "Prod_Name": "Chocolate"}

Loading…
Cancel
Save