This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* concatMap : ('a -> 'b list) -> 'a list -> 'b list | |
* Forklaring: | |
* f x = [y1,...,yn] | |
* map f xs = [[a1,...,an], [b1,...,bn], ..., [z1,...,zn]] | |
* concat (map f xs) = [a1,...,an,b1,...,bn,z1,...zn] *) | |
fun concatMap f xs = List.concat (map f xs) | |
(* foranNte x xss n: sætter x som det første element i den n'te liste i xss. | |
* Eks.: foranNte 0 [[1,2],[3,4],[5,6],[7,8]] 2 = [[1,2],[3,4],[0,5,6],[7,8]] | |
*) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Config { font = "-*-Fixed-*-R-Normal-*-13-*-*-*-*-*-*-*" | |
, bgColor = "black" | |
, fgColor = "grey" | |
, position = Top | |
, commands = [ | |
Run Cpu ["-L","5","-H","50","--normal","green","--high","red"] 10 | |
, Run Memory ["-t","Mem: <usedratio>%"] 10 | |
, Run Date "%a %b %_d %H:%M" "date" 10 | |
, Run BatteryP ["BAT0"] ["-t","<acstatus><left>%","--", | |
"-O","<fc=green>+</fc>","-o","<fc=red>-</fc>", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[a4paper]{article} | |
\usepackage[utf8]{inputenc} | |
\usepackage[danish]{babel} | |
\usepackage{amsmath} | |
\usepackage{amsfonts} | |
\usepackage{amssymb} | |
\author{John Doe} | |
\title{... før nu og i fremtiden} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun select-next-window () | |
"Switch to the next window" | |
(interactive) | |
(select-window (next-window))) | |
(defun select-previous-window () | |
"Switch to the previous window" | |
(interactive) | |
(select-window (previous-window))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>~:9-v | |
^ ,_$84v | |
^,,:,:,:*< |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun afrund n = | |
let | |
val n' = Real.trunc (n * 125.0) | |
val kr = Real.fromInt (n' div 100) | |
val ore = Real.fromInt ((n' mod 100) div 25 * 25) / 100.0 | |
in kr + ore end | |
(* Mads og Christians *) | |
fun moms n = real(round(n * 4.0 * 1.25 ))/4.0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import math | |
import random | |
import sys | |
import os | |
import pygame | |
import time | |
class UnpreparedParticle(Exception): | |
pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (tabulate n f) | |
(define (helper m) | |
(if (= m n) | |
() | |
(cons (f m) (helper (+ m 1))))) | |
(helper 0)) | |
(define (make-table x y fill) | |
(define table (make-vector x)) | |
(tabulate x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$recursive_array = array( | |
0 => array( | |
'name' => 'pets', | |
'category' => array( | |
0 => array( | |
'name' => 'cats', | |
'category' => array( | |
0 => array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.String.Utils | |
cow :: String | |
cow = concatMap (++ "\n") [ | |
" \\ ^__^", | |
" \\ (oo)\\_______", | |
" (__)\\ )\\/\\", | |
" ||----w |", | |
" || ||" ] |