Skip to content

Instantly share code, notes, and snippets.

@adityam
adityam / test-xii.xhtml
Created May 30, 2011 03:42
Output of xii.tex
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<!-- input filename : test-xii -->
<!-- processing date : Sun May 29 23:40:03 2011 -->
<!-- context version : 2011.05.18 22:26 -->
<!-- exporter version : 0.20 -->
<?xml-stylesheet type="text/css" href="mkiv-export.css"?>
<document xmlns:m="http://www.w3.org/1998/Math/MathML" version="0.20" language="en" date="Sun May 29 23:40:03 2011" file="test-xii" context="2011.05.18 22:26" xmlns:xhtml="http://www.w3.org/1999/xhtml">
@adityam
adityam / mkiv-export.css
Created May 30, 2011 03:19
CSS file for ConTeXt XHTML export
/*
author : Hans Hagen, PRAGMA-ADE, Hasselt NL
copyright : PRAGMA ADE / ConTeXt Development Team
license : see context related readme files
comment : companion to cld-mkiv-export.xml
*/
document:before {
@adityam
adityam / gist:856072
Created March 5, 2011 03:26
Josephus problem
import Data.Sequence as Seq
import System.Environment
survivor :: Int -> [a] -> a
survivor k soldiers = viewnext k (Seq.fromList soldiers)
where
viewnext l list = killnext l (Seq.viewl list)
killnext l (x:<xs) | Seq.null xs = x
| l == 1 = viewnext k xs
| otherwise = viewnext (l-1) (xs|>x)
import Data.Teams.Structure
x = mkNonReward "x"
x' = mkNonReward "x'"
y = mkNonReward "y"
m = mkNonReward "m"
r = mkReward "r"
f = mkDynamics "f"
c = mkControl "c"
\startmessages english library: floatblocks
12: To be drawn
\stopmessages
% This file is a solution template for:
% - Giving a talk on some subject.
% - The talk is between 15min and 45min long.
% This is adapted from the example by Till Tantau <tantau@users.sourceforge.net>
% included as part of the beamer package in LaTeX
%
% In principle, this file can be redistributed and/or modified under
% the terms of the GNU Public License, version 2.
\usemodule[simpleslides]
\setupTitle
[title={Title of the presentation},
author={Author of the presentation},
date={date of the presentation}]
\starttext
\placeTitle