This the Nested Code Test Page.
In this example, all the programming languages whose syntax is supported for highlighting are shown with a 'Hello World' code example.
This document requires the SyntaxHighlighter library for proper visualization on the HTML target, so make sure on the document properties that 'syntaxhighlighter' is included in the libraries of this document (by default it is).
The SyntaxHighlighter is a Javascript library developed by Alex Gorbatchev, for more information visit:
http://alexgorbatchev.com/SyntaxHighlighter/
Almost all the 'Hello World' examples were taken from the great Wikipedia:
http://en.wikipedia.org/wiki/Hello_world_program_examples
The Nested is a specialized editor for creating structured documents of many kinds and formats. For more information visit:
http://nestededitor.sourceforge.net/
package com.example
{
import flash.text.TextField;
import flash.display.Sprite;
public class Greeter extends Sprite
{
public function Greeter()
{
var txtHello:TextField = new TextField();
txtHello.text = "Hello World";
addChild(txtHello);
}
}
}
echo Hello World
<cfscript>
variables.greeting = "Hello, world!";
WriteOutput( variables.greeting );
</cfscript>
using System;
class ExampleClass
{
static void Main(string[] args)
{
Console.WriteLine("Hello, world!");
}
}
C
#include <stdio.h>
int main(void)
{
printf("Hello world\n");
return 0;
}
C++
#include <iostream>
int main()
{
std::cout << "Hello World!" << std::endl;
return 0;
}
#id {
font-size : 2em;
color : red;
}
.class1 {
color : blue;
}
body {
padding: 10px;
}
{$APPTYPE CONSOLE}
begin
Writeln('Hello, world!');
end.
-778,13 +791,17
def safe_string(self, string): """Transform any string to a safer representation: e.g: 'Quién sabe caño' -> 'quien_sabe_cano'""" + string = string.strip() nkfd_form = unicodedata.normalize('NFKD', unicode(string)) normalized = u''.join([c for c in nkfd_form if not unicodedata.combining(c)]) normalized = normalized.lower() normalized = normalized.replace(' ', '_') - normalized = normalized.replace('\'', '') - return normalized + clean = [] + for c in normalized: + if c.isalnum() or c == '_': + clean.append(c) + return ''.join(clean)
-module(hello).
-export([hello_world/0]).
hello_world() -> io:fwrite("hello, world\n").
println "Hello World!"
alert('Hello world!');
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
import javafx.scene.Scene;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.stage.Stage;
Stage {
title: "Die, Ajax! - Hello World"
width: 250
height: 50
scene: Scene {
content: [
Text {
content: "Hello World!"
x:0
y:12
font: Font {
name: "Sans Serif"
size: 12
}
}
]
}
}
use v5.10; say 'Hello World.';
<?php echo "Hello, world"; ?>
He... 'hello world'? :P
Write-Host "Hello world!"
print 'Hello World'
puts "Hello world!"
object HelloWorld extends Application {
println("Hello world!")
}
SELECT 'Hello world!'
Visual Basic
MsgBox "Hello, world!"
Visual Basic .NET
Module Module1
Sub Main()
Console.WriteLine("Hello, world!")
End Sub
End Module
'non-console example:
Class Form1
Public Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load()
MsgBox("Hello, world!")
End Sub
End Class
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>HTML4 Strict Hellow World</TITLE>
</HEAD>
<BODY>
<P>Hello World!
</BODY>
</HTML>
HTML5
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML5 Hello World</title>
</head>
<body>
<p>Hello World!</p>
</body>
</html>
XML
<?xml version="1.0" encoding="UTF-8"?>
<root>
<title>
XML Document Hello World
</title>
<para>
Hello World!
</para>
<note>
Whatever.
</note>
</root>