This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <thread> | |
| #include <string> | |
| #include <cstring> | |
| #include <ctime> | |
| #include <unistd.h> | |
| #include <arpa/inet.h> | |
| #include <sys/socket.h> | |
| using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <unistd.h> | |
| int main() { | |
| int server_fd = socket(AF_INET, SOCK_STREAM, 0); | |
| sockaddr_in address{}; | |
| address.sin_family = AF_INET; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| #include <algorithm> | |
| #include <winsock2.h> | |
| #pragma comment(lib, "ws2_32.lib") | |
| class StringServer { | |
| private: | |
| int port; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| int a, b; | |
| cout << "Enter numbers: "; | |
| cin >> a >> b; | |
| cout << "Sum = " << a + b << endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| /* | |
| Интерфейс Контроллер | |
| */ | |
| class Controller | |
| { | |
| public: | |
| virtual void start() = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <vector> | |
| #include <string> | |
| #include <cstdlib> | |
| using namespace std; | |
| // Функція для отримання погоди | |
| void showWeather(const string& city) { | |
| string command = "curl -s \"wttr.in/" + city + "?format=3\""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @startuml | |
| left to right direction | |
| actor "Клиент" as Client | |
| rectangle "Банкомат" { | |
| usecase "Получить деньги" as UC_Main | |
| usecase "Ввести PIN-код" as UC_Pin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <vector> | |
| #include <string> | |
| using namespace std; | |
| class Obstacle; | |
| class Participant { | |
| protected: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <vector> | |
| #include <string> | |
| #include <algorithm> | |
| #include <numeric> | |
| #include <unordered_map> | |
| int main() { | |
| std::vector<std::vector<int>> matrix = {{1,2,3},{4,5,6},{7,8,9}}; | |
| int evenCount2D = std::accumulate(matrix.begin(), matrix.end(), 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <fstream> | |
| #include <stack> | |
| #include <string> | |
| int main() { | |
| std::string path; | |
| std::cin >> path; | |
| std::ifstream file(path); |
NewerOlder