mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-10 18:32:28 +00:00
port to gitlab.
This commit is contained in:
100
themes/custom/exampleSite/content/post/syntax-highlighting.md
Normal file
100
themes/custom/exampleSite/content/post/syntax-highlighting.md
Normal file
@@ -0,0 +1,100 @@
|
||||
---
|
||||
title: "Syntax Highlighting"
|
||||
date: 2011-08-30T16:01:23+08:00
|
||||
lastmod: 2017-08-30T16:01:23+08:00
|
||||
draft: false
|
||||
tags: ["preview", "Syntax Highlighting", "tag-5"]
|
||||
categories: ["Syntax Highlighting"]
|
||||
|
||||
toc: false
|
||||
|
||||
---
|
||||
|
||||
|
||||
```js
|
||||
function helloWorld () {
|
||||
alert("Hello, World!")
|
||||
}
|
||||
```
|
||||
|
||||
<!--more-->
|
||||
|
||||
```java
|
||||
public class HelloWorld {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello, World!");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```kotlin
|
||||
package hello
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
println("Hello World!")
|
||||
}
|
||||
```
|
||||
|
||||
```c
|
||||
#include <stdio.h>
|
||||
|
||||
/* Hello */
|
||||
int main(void){
|
||||
printf("Hello, World!");
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
```cpp
|
||||
// 'Hello World!' program
|
||||
|
||||
#include <iostream>
|
||||
|
||||
int main(){
|
||||
std::cout << "Hello World!" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
```cs
|
||||
using System;
|
||||
class HelloWorld{
|
||||
public static void Main(){
|
||||
System.Console.WriteLine("Hello, World!");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```html
|
||||
<html>
|
||||
<body>
|
||||
Hello, World!
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
```go
|
||||
package main
|
||||
import fmt "fmt"
|
||||
|
||||
func main()
|
||||
{
|
||||
fmt.Printf("Hello, World!\n");
|
||||
}
|
||||
```
|
||||
|
||||
```scala
|
||||
object HelloWorld with Application {
|
||||
Console.println("Hello, World!");
|
||||
}
|
||||
```
|
||||
|
||||
```php
|
||||
<?php
|
||||
echo 'Hello, World!';
|
||||
?>
|
||||
```
|
||||
|
||||
```python
|
||||
print("Hello, World!")
|
||||
```
|
Reference in New Issue
Block a user