Skip to content

Commit

Permalink
Merge pull request #17 from james-beans/main
Browse files Browse the repository at this point in the history
Added Hello, World! example to Python, Rust, Javascript and C++
  • Loading branch information
Mathys-Gasnier authored Dec 30, 2024
2 parents ea9630d + d4a54ee commit 0615529
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
19 changes: 19 additions & 0 deletions public/data/cpp.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
[
{
"categoryName": "Basics",
"snippets": [
{
"title": "Hello, World!",
"description": "Prints Hello, World! to the terminal.",
"code": [
"#include <iostream> // Includes the input/output stream library",
"",
"int main() { // Defines the main function",
" std::cout << \"Hello, World!\" << std::endl; // Outputs Hello, World! and a newline",
" return 0; // indicate the program executed successfully",
"}"
],
"tags": ["cpp", "printing", "hello-world", "utility"],
"author": "James-Beans"
}
]
},
{
"categoryName": "String Manipulation",
"snippets": [
Expand Down
14 changes: 14 additions & 0 deletions public/data/javascript.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
[
{
"categoryName": "Basics",
"snippets": [
{
"title": "Hello, World!",
"description": "Prints Hello, World! to the terminal.",
"code": [
"console.log(\"Hello, World!\"); // Prints Hello, World! to the console"
],
"tags": ["javascript", "printing", "hello-world", "utility"],
"author": "James-Beans"
}
]
},
{
"categoryName": "Array Manipulation",
"snippets": [
Expand Down
14 changes: 14 additions & 0 deletions public/data/python.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
[
{
"categoryName": "Basics",
"snippets": [
{
"title": "Hello, World!",
"description": "Prints Hello, World! to the terminal.",
"code": [
"print(\"Hello, World!\") # Prints Hello, World! to the terminal."
],
"tags": ["python", "printing", "hello-world", "utility"],
"author": "James-Beans"
}
]
},
{
"categoryName": "String Manipulation",
"snippets": [
Expand Down
16 changes: 16 additions & 0 deletions public/data/rust.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
[
{
"categoryName": "Basics",
"snippets": [
{
"title": "Hello, World!",
"description": "Prints Hello, World! to the terminal.",
"code": [
"fn main() { // Defines the main running function",
" println!(\"Hello, World!\"); // Prints Hello, World! to the terminal.",
"}"
],
"tags": ["rust", "printing", "hello-world", "utility"],
"author": "James-Beans"
}
]
},
{
"categoryName": "String Manipulation",
"snippets": [
Expand Down

0 comments on commit 0615529

Please sign in to comment.