{"id":22884644,"url":"https://github.com/pechinkin/computer-club-event-processing","last_synced_at":"2025-03-31T17:43:43.814Z","repository":{"id":239811851,"uuid":"800651295","full_name":"pechinkin/computer-club-event-processing","owner":"pechinkin","description":"Programm to parse a file about events in computer club","archived":false,"fork":false,"pushed_at":"2024-06-08T15:08:47.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T22:31:40.287Z","etag":null,"topics":["cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pechinkin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-14T18:27:40.000Z","updated_at":"2024-06-08T15:08:49.000Z","dependencies_parsed_at":"2024-06-08T16:28:39.794Z","dependency_job_id":null,"html_url":"https://github.com/pechinkin/computer-club-event-processing","commit_stats":null,"previous_names":["pechinkin/computer-club-event-processing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pechinkin%2Fcomputer-club-event-processing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pechinkin%2Fcomputer-club-event-processing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pechinkin%2Fcomputer-club-event-processing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pechinkin%2Fcomputer-club-event-processing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pechinkin","download_url":"https://codeload.github.com/pechinkin/computer-club-event-processing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246510731,"owners_count":20789404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp"],"created_at":"2024-12-13T19:19:53.744Z","updated_at":"2025-03-31T17:43:43.793Z","avatar_url":"https://github.com/pechinkin.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Computer club event processing\n\n### Intro\n\nThis is a programm on `C++` to process events happening in the computer center. Here i use STL-containers and only standard library. You can count money you earned during the day and time when PC/table was taken (precised to minutes, but money is counted for table as every period of being taken rounds high to amout of hours. Examples:\n3 minutes = 1 hour paid for;\n01:01 = 2 hours paid for;\nthat is how market economy works, mate)\n\n### How to create a file to process\n\nInfo for processing is stored in .txt file. Open it and write in appropriate way:\n```\nN //N - number of working tables, N \u003e= 0\nTime_opening Time_ending //format - HH:MM, like 17:03, 09:14\nP //P - price for an hour\n[events]\n```\n`events` are lines, format: `HH:MM ID username [table number]`, where\n`ID` is a code for event:\n- `1` - user comes, \n- `2` - user sits at the table `table number`, \n- `3` - user goes to queue (waiting for free PC/table),\n- `4` - user goes away.\n  \n`[table number]` - is a field only for `2` action.\n\nExample (like in `input.txt`):\n```\n3\n09:00 19:00\n10\n08:48 1 client1\n09:41 1 client1\n09:48 1 client2\n09:52 3 client1\n09:54 2 client1 1\n10:25 2 client2 2\n10:58 1 client3\n10:59 2 client3 3\n11:30 1 client4\n11:35 2 client4 2\n11:45 3 client4\n12:33 4 client1\n12:43 4 client2\n15:52 4 client4\n```\n### When programm stops and generate its own events\n1. When some typo found, programm stops immediately\n2. Events, generated by programm:\n    - 2.1 `ID = 11` Client went away (in the end of the day in alphabetic order or in case when queue is full already)\n    - 2.2  `ID = 12` Some of the tables became free and first user in the queue sat there\n    - 2.3 `ID = 13` Any mistake found, which doesn't have an impact on processing events:\n    - - `ClientUnknown` - when client hasn't come yet but wants to sit / wait / go away\n    - - `YouShallNotPass` - when client is already inside and tries to come once more. strange one, this guy\n    - - `ICanWaiNoLonger` - when client wants to wait when some of tables are free. strange one, too\n    - - `PlaceIsBusy` - when client wants to take a sit, but it is already taken\n\n### Usage\nYou can build a programm with CMake:\n```\nmkdir build\ncp input.txt  build\ncd build\ncmake ..\nmake\n./test input.txt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpechinkin%2Fcomputer-club-event-processing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpechinkin%2Fcomputer-club-event-processing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpechinkin%2Fcomputer-club-event-processing/lists"}