2017-08-31 14:50:37 +00:00
|
|
|
---
|
|
|
|
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"]
|
|
|
|
|
2017-12-06 12:34:22 +00:00
|
|
|
# You can also close(false) or open(true) something for this content.
|
|
|
|
# P.S. comment can only be closed
|
|
|
|
# comment: false
|
2017-08-31 14:50:37 +00:00
|
|
|
toc: false
|
2017-12-06 12:34:22 +00:00
|
|
|
# autoCollapseToc: false
|
|
|
|
# You can also define another contentCopyright. e.g. contentCopyright: "This is another copyright."
|
2017-08-31 14:50:37 +00:00
|
|
|
# contentCopyright: false
|
2017-12-06 12:34:22 +00:00
|
|
|
# reward: false
|
|
|
|
# mathjax: false
|
2017-08-31 14:50:37 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
function helloWorld () {
|
|
|
|
alert("Hello, World!")
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
<!--more-->
|
|
|
|
|
|
|
|
```java
|
|
|
|
public class HelloWorld {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
System.out.println("Hello, World!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2017-12-05 12:09:12 +00:00
|
|
|
```kotlin
|
|
|
|
package hello
|
|
|
|
|
|
|
|
fun main(args: Array<String>) {
|
|
|
|
println("Hello World!")
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2017-08-31 14:50:37 +00:00
|
|
|
```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!")
|
|
|
|
```
|