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
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-} | |
module Main where | |
import qualified Data.ByteString.Lazy.Char8 as L | |
import Control.Monad.IO.Class (liftIO) | |
import Control.Monad (msum, mzero) | |
import Data.Data (Data, Typeable) | |
import Data.Maybe (fromJust) | |
import Data.Aeson |
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
% Word passwords | |
w = @(x) 20000.^x; | |
% Letter passwords (big and small letters a-Z) | |
l = @(x) 54.^x; | |
% Alphanumeric passwords (0-9 a-Z and !"#€%&/()=?_-) | |
an = @(x) 77.^x; | |
X = 0:20; | |
semilogy(X,w(X),'b',X,l(X),'r',X,an(X),'k') |
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[12pt]{article} | |
\usepackage{amsmath} | |
\title{\LaTeX} | |
\date{} | |
\begin{document} | |
\maketitle | |
\LaTeX{} is a document preparation system for the \TeX{} | |
typesetting program. It offers programmable desktop publishing | |
features and extensive facilities for automating most aspects of | |
typesetting and desktop publishing, including numbering and |
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
(ns textemplate.core | |
(:use fleet)) | |
(spit "output/test.tex" ((fleet [number] (slurp "test.tex.fleet")) 25)) | |
(.. Runtime (getRuntime) (exec "pdflatex --output-directory=output output/test.tex")) |
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
def init_wordlist() | |
@wordlist = {} | |
file = File.new("sv_SE.dic", "r") | |
while content = file.gets | |
@wordlist[content.split("/")[0]] = 1 | |
end | |
file.close | |
end |
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
(ns svd.core | |
(:use | |
clojure.contrib.combinatorics) | |
(:require | |
[clojure.contrib.duck-streams :as ds] | |
[clojure.contrib.str-utils :as str])) | |
(defn wordlist [] | |
(set (map #(re-find #"[^/]*" %) (ds/read-lines "sv_se.dic")))) |
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
function [coords, dof, ndof, edof, nelm, ex, ey] = geometry(gridsize) | |
if nargin==0 | |
gridsize = 5; | |
end | |
b12 = @(y) .120 - y; | |
b16 = @(y) y - .020; | |
coords = []; | |
for y = 0:gridsize:.070; | |
for x = 0:gridsize:.100; | |
if(y < .010) |
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
<div class="year-archive"> | |
<h2>2006</h2> | |
<ul> | |
<?php wp_get_archives('year=2006&show_post_count=true'); ?> | |
</ul> | |
</div> | |
<div class="year-archive"> | |
<h2>2007</h2> | |
<ul> | |
<?php wp_get_archives('year=2007&show_post_count=true'); ?> |
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
function supportsBoxShadow() { | |
var s = document.body.style; | |
return s.WebkitBoxShadow !== undefined || s.MozBoxShadow !== undefined || s.boxShadow !== undefined; | |
} | |
function frame_pictures(){ | |
// Exit if we don't have boxshadow support at all and fall back on wp-caption | |
if(!supportsBoxShadow()) return; | |
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
function unew = burger(u,d,dt,bdry) | |
N = length(u); | |
dx = 1/(N); | |
sup = d*dt/dx^2; | |
main = 1*ones(N,1)-u*dt/dx-2*d*dt/dx^2*ones(N,1); |