Testing code tags.
Some description text. Default code below:
View after installing this chrome extension.
print "hello"
//ActionScript 3
import as3.classes.i.forgot.*;
public class Example extends Universe {
public function Example() {
super();
}
private function secret():void {
// ..blah
}
}
//javascript
var a, b;
var sum = function(a , b) {
return a + b;
};
/* css */
#something {
padding-left: 1em;
margin: .5em .5em .5em .5em;
}
.foo {
display: block;
margin: auto;
font-weight: normal;
}
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<header>Some Header</header>
<canvas id="myCanvas"/>
<video id="myVideo"/>
<footer>Some Footer</footer>
</body>
</html>
#!/usr/bin/python2.4
def fib():
'''
a generator that produces the elements of the fibonacci series
'''
a = 1
b = 1
while True:
a, b = a + b, a
yield a
def nth(series, n):
'''
returns the nth element of a series,
consuming the earlier elements of the series
'''
for x in series:
n = n - 1
if n <= 0: return x
print nth(fib(), 10)
/* SQL
* A multi-line
* comment */
'Another string /* Isn\'t a comment',
"A string */"
-- A line comment
SELECT * FROM users WHERE id IN (1, 2.0, +30e-1);
-- keywords are case-insensitive.
-- Note: user-table is a single identifier, not a pair of keywords
<!DOCTYPE series PUBLIC "fibonacci numbers">
<series.root base="1" step="s(n-2) + s(n-1)">
<element i="0">1</element>
<element i="1">1</element>
<element i="2">2</element>
<element i="3">3</element>
<element i="4">5</element>
<element i="5">8</element>
...
</series.root>
%YAML 1.1
---
!!map {
? !!str ""
: !!str "value",
? !!str "explicit key"
: !!str "value",
? !!str "simple key"
: !!str "value",
? !!seq [
!!str "collection",
!!str "simple",
!!str "key"
]
: !!str "value"
}
Phew !!!