Code Syntax Highlighting

Verify the following code blocks render as code blocks and highlight properly.

Diff

Diff
1 2 3 4 5 6 7 8 9 10
*** /path/to/original ''timestamp'' --- /path/to/new ''timestamp'' *************** *** 1 **** ! This is a line. --- 1 --- ! This is a replacement line. It is important to spell -removed line +new line

Makefile

Makefile
1 2 3 4 5
CC=gcc CFLAGS=-I. hellomake: hellomake.o hellofunc.o $(CC) -o hellomake hellomake.o hellofunc.o -I.

JSON

JSON
1 2 3
{"employees":[ {"firstName":"John", "lastName":"Doe"}, ]}

Markdown

Markdown
1 2 3
**bold** *italics* [link](www.example.com)

JavaScript

JavaScript
1
document.write('Hello, world!');

CSS

CSS
1 2 3
body { background-color: red; }

Objective C

Objective C
1 2 3 4 5 6
#import <stdio.h> int main (void) { printf ("Hello world!\n"); }

Python

Python
1
print "Hello, world!"

XML

HTML, XML
1 2 3 4 5
<employees> <employee> <firstName>John</firstName> <lastName>Doe</lastName> </employee> </employees>

Perl

Perl
1
print "Hello, World!\n";

Bash

Bash
1
echo "Hello World"

PHP

PHP
1
<?php echo '<p>Hello World</p>'; ?>

CoffeeScript

CoffeeScript
1
console.log(“Hello world!”);

C

C#
1 2 3 4 5 6 7 8
using System; class Program { public static void Main(string[] args) { Console.WriteLine("Hello, world!"); } }

C++

C/C++
1 2 3 4 5 6 7
#include <iostream.h> main() { cout << "Hello World!"; return 0; }

SQL

SQL
1 2
SELECT column_name,column_name FROM table_name;

Go

Go
1 2 3 4 5
package main import "fmt" func main() { fmt.Println("Hello, 世界") }

Ruby

Ruby
1
puts "Hello, world!"

Java

Java
1 2 3 4 5 6 7 8 9 10 11 12
import javax.swing.JFrame; //Importing class JFrame import javax.swing.JLabel; //Importing class JLabel public class HelloWorld { public static void main(String[] args) { JFrame frame = new JFrame(); //Creating frame frame.setTitle("Hi!"); //Setting title frame frame.add(new JLabel("Hello, world!"));//Adding text to frame frame.pack(); //Setting size to smallest frame.setLocationRelativeTo(null); //Centering frame frame.setVisible(true); //Showing frame } }

Latex Equation

ddx(0xf(u)du)=f(x).\frac{d}{dx}\left( \int_{0}^{x} f(u)\,du\right)=f(x).