The following code generates times-table
:
times-table := [x * y, x: 2 ~ 9, y: 1 ~ 9]
The code is equivalent to:
<?php | |
class XmlBuilder { | |
function __call($tag, array $contents) { | |
$content = ''; | |
foreach ($contents as $c) { | |
if ($c instanceof XmlBuilder_Element) { | |
$content .= $c; | |
} else if (is_array($c)) { | |
$attrs = array_merge($array, $c); |
*.pyc | |
.*.swp | |
MANIFEST |
questions.pyc | |
questions.sqlite3 |
application: me2pypi | |
version: 1 | |
runtime: python | |
api_version: 1 | |
handlers: | |
- url: /update | |
script: me2pypi.py | |
login: admin | |
- url: .* |
# 30 minutes Lisp in Ruby | |
# Hong Minhee <http://dahlia.kr/> | |
# | |
# This Lisp implementation does not provide a s-expression reader. | |
# Instead, it uses Ruby syntax like following code: | |
# | |
# [:def, :factorial, | |
# [:lambda, [:n], | |
# [:if, [:"=", :n, 1], | |
# 1, |
<?php | |
# Simple Image Resizing API | |
# | |
# A simple HTTP API for resizing an image (given by the URL). | |
# This small and dirty ad hoc web application is entirely written in | |
# PHP 5.3+ with GD. The source code is distributed under Public License. | |
function is_url($string, $scheme = null) { | |
$url = parse_url($string); | |
if (!isset($url['scheme'])) return false; |
#!/usr/bin/env python | |
""":mod:`magic_image_crawler` --- Magic Image Crawler! | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
This small program crawls the URL and download only most important images of | |
the page. Trivial images like buttons, banners are ignored. | |
""" | |
import re | |
import itertools |
Here I describe requirements of a weblog software I want to use.
.rst
, it should be rendered in HTML docutils (or it would be Pandoc, of course)import narusegawa | |
app := narusegawa Application() | |
app get("/", fun | |
return "Hello world!" | |
end) |