start new:
tmux
start new with session name:
tmux new -s myname
| (use '[clojure.core.match :only [match]]) | |
| (defn evaluate [env [sym x y]] | |
| (match [sym] | |
| ['Number] x | |
| ['Add] (+ (evaluate env x) (evaluate env y)) | |
| ['Multiply] (* (evaluate env x) (evaluate env y)) | |
| ['Variable] (env x))) | |
| (def environment {"a" 3, "b" 4, "c" 5}) |
| (ns potato.core | |
| (:use [slingshot.slingshot :only [throw+ try+]]) | |
| (:use [clojure.string :only [trim split]])) | |
| ;; use this provide template values at write time (i.e. not compile time). | |
| ;; "name" will be the name of the template variable. "context", when not nil, | |
| ;; will be the value previously returned by *template-value* for the enclosing | |
| ;; section. | |
| (defn ^:dynamic *template-value* [name context]) |
| with(x, { | |
| f(z) | |
| }) | |
| # Which of the following statements is this equivalent to? | |
| # | |
| # a) x$f(x$z) | |
| # b) f(x$z) | |
| # c) x$f(z) | |
| # d) f(z) |
| use strict; | |
| use warnings; | |
| use DateTime; | |
| my $dt = DateTime->new( | |
| day => 13, | |
| year => 2012, | |
| ); | |
| my $count = 0; |
| digraph G { | |
| subgraph cluster_1 { | |
| Rscript -> localDir; | |
| localDir -> Rscript; | |
| Rscript -> Sweave; | |
| Sweave -> TeX; | |
| TeX -> PDF [ label = "laTeX"] | |
| Rscript -> Rmarkdown; | |
| RCurl -> Rscript; |
| my Int $i = 2 * 10 ** 20_002; | |
| my Int $sqrt = 10 ** 10_001; | |
| my Int $next_sqrt = ($i div $sqrt + $sqrt) div 2; | |
| loop { | |
| $sqrt = $next_sqrt; | |
| $next_sqrt = ($i div $sqrt + $sqrt) div 2; | |
| last if $sqrt == $next_sqrt; | |
| } |
| #!perl | |
| use 5.010; | |
| use strict; | |
| use warnings; | |
| use autodie; | |
| use Benchmark qw(timethis); | |
| use List::Util qw(min); | |
| use Regexp::Common qw /balanced/; |
| package object mail { | |
| implicit def stringToSeq(single: String): Seq[String] = Seq(single) | |
| implicit def liftToOption[T](t: T): Option[T] = Some(t) | |
| sealed abstract class MailType | |
| case object Plain extends MailType | |
| case object Rich extends MailType | |
| case object MultiPart extends MailType |