-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelloworld.json
More file actions
43 lines (43 loc) · 2.39 KB
/
helloworld.json
File metadata and controls
43 lines (43 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
[{
"language": "Java",
"code": "package demo;\n\npublic class HelloWorld {\n public static void main(String[] args) {\n System.out.println(\"Hello, World\");\n }\n}"
}, {
"language": "Kotlin",
"code": "package demo\n\nfun main(args : Array<String>) {\n println(\"Hello, world!\")\n}"
}, {
"language": "Scala",
"code": "object HelloWorld extends App {\n println(\"Hello, World!\")\n}"
}, {
"language": "Go",
"code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n fmt.Println(\"hello world\")\n}"
}, {
"language": "Objective-C",
"code": "#import <Foundation/Foundation.h>\n\nint main (int argc, const char * argv[]) {\n NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\n NSLog (@\"Hello, World!\");\n [pool drain];\n return 0;\n}"
}, {
"language": ".Net",
"code": "public class HelloWorldHandler : HttpMessageHandler {\n protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) {\n return Task.FromResult(new HttpResponseMessage() {\n Content = new ByteArrayContent(Encoding.UTF8.GetBytes(\"Hello World.\"))\n });\n }\n};\n\npublic static void Register(HttpConfiguration config) {\n var emptyDictionary = new HttpRouteValueDictionary();\n config.Routes.MapHttpRoute(\"index\", \"\", emptyDictionary, emptyDictionary, new HelloWorldHandler());\n}"
}, {
"language": "MATLAB",
"code": "classdef hello\n methods\n function greet(this)\n disp('Hello, World')\n end\n end\nend"
}, {
"language": "Assembly",
"code": " global _main\n extern _printf\n\n section .text\n_main:\n push message\n call _printf\n add esp, 4\n ret\nmessage:\n db 'Hello, World', 10, 0"
}, {
"language": "Bash",
"code": "#!/bin/bash\nSTR=\"Hello World!\"\necho $STR"
}, {
"language": "Delphi",
"code": "procedure TForm1.ShowAMessage;\nbegin\n ShowMessage('Hello World!');\nend;"
}, {
"language": "EIFFEL",
"code": "class\n HELLO_WORLD\ncreate\n make\nfeature\n make\n do\n print (\"Hello, world!%N\")\n end\nend"
}, {
"language": "ERLANG",
"code": "-module(hello).\n-export([hello_world/0]).\n\nhello_world() -> io:fwrite(\"hello, world\\n\")."
}, {
"language": "HASKELL",
"code": "module Main where\n\nmain :: IO ()\nmain = putStrLn \"Hello, World!\""
}, {
"language": "Rust",
"code": "fn main() {\n println!(\"Hello, world!\");\n}"
}]