Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0615529

Browse files
Merge pull request #17 from james-beans/main
Added Hello, World! example to Python, Rust, Javascript and C++
2 parents ea9630d + d4a54ee commit 0615529

File tree

4 files changed

+63
-0
lines changed

4 files changed

+63
-0
lines changed

‎public/data/cpp.json‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
[
2+
{
3+
"categoryName": "Basics",
4+
"snippets": [
5+
{
6+
"title": "Hello, World!",
7+
"description": "Prints Hello, World! to the terminal.",
8+
"code": [
9+
"#include <iostream> // Includes the input/output stream library",
10+
"",
11+
"int main() { // Defines the main function",
12+
" std::cout << \"Hello, World!\" << std::endl; // Outputs Hello, World! and a newline",
13+
" return 0; // indicate the program executed successfully",
14+
"}"
15+
],
16+
"tags": ["cpp", "printing", "hello-world", "utility"],
17+
"author": "James-Beans"
18+
}
19+
]
20+
},
221
{
322
"categoryName": "String Manipulation",
423
"snippets": [

‎public/data/javascript.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
[
2+
{
3+
"categoryName": "Basics",
4+
"snippets": [
5+
{
6+
"title": "Hello, World!",
7+
"description": "Prints Hello, World! to the terminal.",
8+
"code": [
9+
"console.log(\"Hello, World!\"); // Prints Hello, World! to the console"
10+
],
11+
"tags": ["javascript", "printing", "hello-world", "utility"],
12+
"author": "James-Beans"
13+
}
14+
]
15+
},
216
{
317
"categoryName": "Array Manipulation",
418
"snippets": [

‎public/data/python.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
[
2+
{
3+
"categoryName": "Basics",
4+
"snippets": [
5+
{
6+
"title": "Hello, World!",
7+
"description": "Prints Hello, World! to the terminal.",
8+
"code": [
9+
"print(\"Hello, World!\") # Prints Hello, World! to the terminal."
10+
],
11+
"tags": ["python", "printing", "hello-world", "utility"],
12+
"author": "James-Beans"
13+
}
14+
]
15+
},
216
{
317
"categoryName": "String Manipulation",
418
"snippets": [

‎public/data/rust.json‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
[
2+
{
3+
"categoryName": "Basics",
4+
"snippets": [
5+
{
6+
"title": "Hello, World!",
7+
"description": "Prints Hello, World! to the terminal.",
8+
"code": [
9+
"fn main() { // Defines the main running function",
10+
" println!(\"Hello, World!\"); // Prints Hello, World! to the terminal.",
11+
"}"
12+
],
13+
"tags": ["rust", "printing", "hello-world", "utility"],
14+
"author": "James-Beans"
15+
}
16+
]
17+
},
218
{
319
"categoryName": "String Manipulation",
420
"snippets": [

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /