WUT_Computer_Science/Programming/ERSMS-project
Krzysztof kuhy Rudnicki f7763bb1cd Add a run.sh to every course, and fix the code that would not build
All 44 directories now probe: 38 runnable, 5 no-code, 1 blocked (ENUME needs
MATLAB or Octave, neither of which is on this machine).

The runners are stubs over one shared scripts/course_lib.sh rather than 44
copies of the logic, for the same reason the gates live in ~/utils. A stub
passes its kind as ARGUMENTS -- course_main --kind python --entry ... -- "$@"
-- rather than setting globals, because globals a linter cannot see being read
mean SC2034 on every one of them, and the only cure would be 44 disables.

Fixed along the way:
  - Generating the stubs overwrote Programming/PSD/run.sh, the original
    coursework runner. Restored, and given a --probe early exit instead so it
    is otherwise untouched: it installs packages with sudo and starts Kafka,
    which is exactly what a probe must not trigger.
  - The probe guard only recognised runners containing the literal --probe, so
    the new stubs (which delegate to the library) all read unprobed. It now
    also accepts delegation to course_lib.sh.
  - Blocked probes reported "unknown" because _require_any prints the tool it
    found, so probes redirected its stdout -- swallowing the failure reason
    too. Split into _probe_any, and ENUME now says exactly what it needs.
  - shellcheck runs with -x so it follows the sourced library; without it every
    stub reports SC1091 and the only alternative is a per-file disable. The
    library itself carries `# shellcheck shell=bash` because it has no shebang
    on purpose -- it is sourced, never executed.

Then EADS was actually run, and three of its six C++ files did not compile:
  - lab3.cpp: copyDictionary was declared taking Dictionary* but its body used
    Node members, and the copy constructor called copyTree(), which does not
    exist. The copy also dropped key and balanceFactor. Now compiles AND runs,
    printing its AVL tests.
  - MidTerm/task2.cpp: a const mismatch between declaration and definition, a
    stray semicolon before a function body, findNode calling a Tree method on
    a treeNode*, and a while loop that never advanced. sumNodeSub also had no
    base case -- unreachable before, because the const mismatch meant its body
    was never compiled.
These compiled years ago because older GCC did not diagnose uninstantiated
template bodies. Fragments with no main() are now type-checked with -c rather
than linked, since two of these files are exam answers, not programs.

Binaries go to a gitignored build/ -- an extensionless executable dropped next
to its source is not something .gitignore catches by name.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172dj34FDpao6wsix8ZuCzE
2026-08-28 18:37:55 +02:00
..
analytics Add 'Programming/ERSMS-project/' from commit 'd060e8285ad6f3dddde51a842f2c8498138afb0b' 2026-02-06 22:14:41 +01:00
backend Add 'Programming/ERSMS-project/' from commit 'd060e8285ad6f3dddde51a842f2c8498138afb0b' 2026-02-06 22:14:41 +01:00
connector Add 'Programming/ERSMS-project/' from commit 'd060e8285ad6f3dddde51a842f2c8498138afb0b' 2026-02-06 22:14:41 +01:00
database Add 'Programming/ERSMS-project/' from commit 'd060e8285ad6f3dddde51a842f2c8498138afb0b' 2026-02-06 22:14:41 +01:00
docs Add 'Programming/ERSMS-project/' from commit 'd060e8285ad6f3dddde51a842f2c8498138afb0b' 2026-02-06 22:14:41 +01:00
frontend Add 'Programming/ERSMS-project/' from commit 'd060e8285ad6f3dddde51a842f2c8498138afb0b' 2026-02-06 22:14:41 +01:00
movie_recommendations Add 'Programming/ERSMS-project/' from commit 'd060e8285ad6f3dddde51a842f2c8498138afb0b' 2026-02-06 22:14:41 +01:00
nginx Add pre-commit and fix everything it found 2026-08-28 18:21:22 +02:00
test_scripts Add 'Programming/ERSMS-project/' from commit 'd060e8285ad6f3dddde51a842f2c8498138afb0b' 2026-02-06 22:14:41 +01:00
.gitignore Add 'Programming/ERSMS-project/' from commit 'd060e8285ad6f3dddde51a842f2c8498138afb0b' 2026-02-06 22:14:41 +01:00
docker-compose.yml Add 'Programming/ERSMS-project/' from commit 'd060e8285ad6f3dddde51a842f2c8498138afb0b' 2026-02-06 22:14:41 +01:00
Dockerfile Add 'Programming/ERSMS-project/' from commit 'd060e8285ad6f3dddde51a842f2c8498138afb0b' 2026-02-06 22:14:41 +01:00
README.md Add 'Programming/ERSMS-project/' from commit 'd060e8285ad6f3dddde51a842f2c8498138afb0b' 2026-02-06 22:14:41 +01:00
run.sh Add a run.sh to every course, and fix the code that would not build 2026-08-28 18:37:55 +02:00

Projekt z ERSMS

Backend

budowanie i uruchamianie obrazu z bazą danych oraz serwerem:

docker compose up

w przypadku zmian w bazie danych, usunąć kontener oraz dołączone do niego volumy

stronka administracyjna do bazy danych

Najpierw wpisujemy w przeglądarce http://localhost:8080/ Przy logowaniu wpisujemy:

Po zalogowaniu się poraz pierwszy od zbudowania obrazu, widzimy stronę główną. Klikamy na niej duży przycisk "Add New Server" i pojawia się okienko z menu dodawania serwera.

W nazwie można napisać cokolwiek, jednak w zakładce "Connection" piszemy następujące rzeczy:

  • host name - db
  • login - root
  • password - root

Reszta pozostaje jak była. Po zapisaniu ustawień, mamy już dostęp do narzędzi administratora dla naszej bazy danych.

gadanie z endpointami

GET http://localhost:8090/ - testowy domowy

GET http://localhost:8090//api/v3/get/string:username - info o userach

GET http://localhost:8090//api/v3/get_movie/int:movie_ID - info o filmie

POST http://localhost:8090/api/v3/add/string:oauth_ID/string:username - dodawanie usera

POST http://localhost:8090/api/v3/add/string:oauth_ID/string:movie_ID/int:rating - dodawanie oceny do filmu przez usera

GET http://localhost:8090/api/v3/ai/string:oauth_ID - wyciąganie rekomendacji od AI