{"id":19075059,"url":"https://github.com/aleko-khomasuridze/vector","last_synced_at":"2026-04-21T16:06:37.215Z","repository":{"id":245694363,"uuid":"818993977","full_name":"aleko-khomasuridze/Vector","owner":"aleko-khomasuridze","description":"Simple implementation of STL for Arduino","archived":false,"fork":false,"pushed_at":"2024-06-23T14:19:18.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-03T02:04:11.069Z","etag":null,"topics":["arduino","cpp","stl","vector"],"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/aleko-khomasuridze.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-06-23T13:23:22.000Z","updated_at":"2024-09-02T14:07:41.000Z","dependencies_parsed_at":"2025-01-03T20:46:17.757Z","dependency_job_id":null,"html_url":"https://github.com/aleko-khomasuridze/Vector","commit_stats":null,"previous_names":["aleko-khomasuridze/vector"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aleko-khomasuridze/Vector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleko-khomasuridze%2FVector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleko-khomasuridze%2FVector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleko-khomasuridze%2FVector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleko-khomasuridze%2FVector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aleko-khomasuridze","download_url":"https://codeload.github.com/aleko-khomasuridze/Vector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleko-khomasuridze%2FVector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32099232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["arduino","cpp","stl","vector"],"created_at":"2024-11-09T01:53:14.537Z","updated_at":"2026-04-21T16:06:37.185Z","avatar_url":"https://github.com/aleko-khomasuridze.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Vector Class Template for Arduino\n\n## Overview\n\nThis `vector` class template provides a simple implementation of a dynamic array for Arduino. It supports basic functionalities such as adding, removing, editing elements, and iterating over the elements. The class also includes debugging features that can be enabled with the `DEBUG_MODE` macro.\n\n## Features\n\n- Dynamic resizing of the array\n- Add elements to the end of the array\n- Remove elements by value or index\n- Edit elements by value or index\n- Access elements using the subscript operator\n- Iterate over the elements using iterators\n- Debugging support to print all elements to a specified stream\n\n## Installation\n\n1. Download the `vector` repo as zip file.\n2. Place the zip files in your Arduino through library manager.\n3. Include the `vector.h` file in your Arduino sketch.\n\n## Usage\n\n### Initialization\n\nInclude the `vector` class in your sketch:\n\n```cpp\n#include \"vector.h\"\n```\n\n### Basic Operations\n\n#### Adding Elements\n\n```cpp\nvector\u003cint\u003e myVector;\nmyVector.PushBack(10);\nmyVector.PushBack(20);\nmyVector.PushBack(30);\n```\n\n#### Removing Elements\n\n```cpp\nmyVector.Remove(20); // Remove by value\nmyVector.Remove(1);  // Remove by index\n```\n\n#### Editing Elements\n\n```cpp\nmyVector.Edit(0, 100);     // Edit element at index 0\nmyVector.Edit(30, 200);    // Edit element with value 30\n```\n\n#### Accessing Elements\n\n```cpp\nint value = myVector[0];   // Access element at index 0\n```\n\n### Iterating Over Elements\n\n#### Using Iterators\n\n```cpp\nfor (vector\u003cint\u003e::iterator it = myVector.begin(); it != myVector.end(); ++it) {\n    Serial.println(*it);\n}\n```\n\n#### Using Const Iterators\n\n```cpp\nfor (vector\u003cint\u003e::const_iterator it = myVector.begin(); it != myVector.end(); ++it) {\n    Serial.println(*it);\n}\n```\n\n#### Using ForEach Itirator\n```cpp\nvector\u003cString\u003e items;\n// assume that vector had Strings pushed in it \n\nfor (const String\u0026 item : items) {\n    Serial.println(item);\n}\n```\n\n### Debugging\n\nEnable the `DEBUG_MODE` macro to use debugging features:\n\n```cpp\n#define DEBUG_MODE\n```\n\nPrint all elements to the serial console:\n\n```cpp\nmyVector.PrintAll(Serial);\n```\n\n## Example Sketch\n\n```cpp\n#include \u003cArduino.h\u003e\n#include \"vector.h\"\n\nvector\u003cint\u003e myVector;\n\nvoid setup() {\n    Serial.begin(115200);\n\n    // Adding elements to the vector\n    myVector.PushBack(10);\n    myVector.PushBack(20);\n    myVector.PushBack(30);\n\n    // Print all elements\n    Serial.println(\"Initial vector:\");\n    #if defined(DEBUG_MODE)\n    myVector.PrintAll(Serial);\n    #endif\n\n    // Edit an element\n    myVector.Edit(1, 25); // Change element at index 1 from 20 to 25\n\n    // Print all elements after editing\n    Serial.println(\"After editing:\");\n    #if defined(DEBUG_MODE)\n    myVector.PrintAll(Serial);\n    #endif\n\n    // Remove an element by value\n    myVector.Remove(25); // Remove the element with value 25\n\n    // Print all elements after removing by value\n    Serial.println(\"After removing by value:\");\n    #if defined(DEBUG_MODE)\n    myVector.PrintAll(Serial);\n    #endif\n\n    // Remove an element by index\n    myVector.Remove(1); // Remove the element at index 1\n\n    // Print all elements after removing by index\n    Serial.println(\"After removing by index:\");\n    #if defined(DEBUG_MODE)\n    myVector.PrintAll(Serial);\n    #endif\n}\n\nvoid loop() {\n    // Put your main code here, to run repeatedly:\n}\n```\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Author\n\n - Aleko khomasuridze - 2024-06-23\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleko-khomasuridze%2Fvector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faleko-khomasuridze%2Fvector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleko-khomasuridze%2Fvector/lists"}