Jee jee toimiiks
public static void main(String[] args) {
System.out.println("jeppajee");
}
(defn count-to-kaprekar | |
([number] (count-to-kaprekar number 0)) | |
([number i] | |
(let [found (- (desc-digits number) (asc-digits number))] | |
(if (or (= 6174 number) (= 0 number)) | |
i | |
(count-to-kaprekar found (inc i))))) |
;; gorilla-repl.fileformat = 1 | |
;; ** | |
;;; # Melindan e-aineistokyselyn tuloksia | |
;;; | |
;;; Melindan e-aineistokyselyn purkua, lukuja ja kaavioita. Aloita valitsemalla oikean yläkulman valikosta ** Evaluate all segments ** (tai painamalla Alt-Shift-Enter). | |
;;; | |
;;; Ensimmäinen solu sisältää laskentaan ja kaavioiden piirtämiseen käytettävää koodia, kooste alkaa tämän jälkeen. | |
;; ** |
#if (Not Exists(@773)) | |
260I1 | 260I1 | S | |
260I2 | 260I2 | S | |
260$a | 260$a | S; RegReplace('\\[S.l.\\]', '[Kustannuspaikka tuntematon]'); RegReplace('\\[s.l.\\]', '[kustannuspaikka tuntematon]') | |
260$b | 260$b | S; RegReplace('\\[s.n.\\]', '[kustantaja tuntematon]') | |
260$c | 260$c | RegReplace('\\[s.a.\\]', '[julkaisuaika tuntematon]'); \ | |
If (RegFind(S, 'cop|©|℗|[Cc]|^p') >= 0) And (RegFind(S, '\\d{4}') >= 0) '[' + RegMatch(0) + ']' \ | |
Else S; | |
260$? | 260$? | S | |
#endif |
502I1 | <M02I1 | ' ' | |
502I2 | <M02I2 | ' ' | |
502$a | <M02$a | Upper(To(1)) + From(2) | |
502$b | <M02$c | S + ' : ' | |
502$c | <M02$c | + S | |
502$d | <M02$d | S | |
M02 | 502 | S; | |
MoveLast('9'); | |
Replace ('$c' By ' :$c', Strict); | |
Replace ('$d' By ',$d', Strict); |
(def vowels '("a" "e" "i" "o" "u" "y")) | |
(def consonants '("b" "c" "d" "f" "g" "h" "j" "l" "m" "n" "p" "q" "r" "s" "t" "v" "w" "x" "z")) | |
(defn- rand-chars [s amount] | |
(let [indices (take amount (repeatedly #(rand-int (dec (count s)))))] | |
(map (partial nth s) indices))) | |
(defn gen-name! [] | |
(-> (interleave (rand-chars consonants 3) (rand-chars vowels 3)) |
(defn- rec-fmt | |
"Define a record format for Aleph Sequential FMT field." | |
[record] | |
(let [leader (:leader record) | |
l6 (subs leader 6 7) | |
l7 (subs leader 7 8)] | |
(cond | |
(and (contains? #{"a" "t"} l6) | |
(not (contains? #{"b" "i" "s"} l7))) "BK" | |
(= "m" l6) "CF" |
// Info: Käsitellään 248 | |
248$g | <I48$G | S; RegReplaceTable('roomalaiset-arabialaisiksi.tbl') | |
248$h | <I48$H | S | |
248$b | <I48$B | S | |
248$r | <I48$R | S | |
248$c | <I48$C | S | |
248$d | <I48$D | S | |
248$e | <I48$E | If (Exists($d)) Then S | |
248$e | <I48$D | If (Not Exists($d)) Then S |
aijaStory=(()=>{const a=(a,i)=>Math.floor(Math.random()*i+a),i=i=>i[a(0,i.length)],t=i(["äijät","leidit","frendit","äijä","vaimo","kundi","jätkät","homiet","homot","pellet","dudet","jäbä","spede","dude"]),s=i(["siistii","hyvä","helmee","äijää","siistii","asiallist","kuulii"]),e=i(["thaikuis","briteis","jenkeis","indois","baaris","balil","japanis","malil","mäkis","pohjoisnaval","turkis","olympialaisis","ausseis","brasseis","meksikos","kanadas","gobin aavikol","kapkaupungis","lontoos","intias","asuntomessuil","pakistanis","etelä-naval","tiibetis","kiinas","siperias","x-gamesis","ymca:s","tongal","tulivuores","lontoos","muukalaislegioonas","vietnamis","etelä-koreas","luolas","vankilassa","fudiksen mm-finaalis","pohjois-koreas","viidakos","hervannas","superbowlissa","hesburgeris","lastentarhassa"]),n=i(["surffaa","skeittaa","reilaa","roadtripil","daivaa","suunnistaa","kiipeilee","ryyppää","parkouraa","seilaa","wakeboardaa","työharjottelus","kokkaa","metsästää","ampumas","juoksee","bodaamas","deejiinä","ratsastaa" |
Jee jee toimiiks
public static void main(String[] args) {
System.out.println("jeppajee");
}
(ns battleship.logic) | |
(defrecord Cell [x y clicked? ship?]) | |
(defn make-grid [] | |
"This initializes an empty grid. The grid is sized 10 x 10. Each cell stores | |
its coordinates, whether it has been clicked or not and if it contains a ship." | |
(vec (for [y (range 10)] | |
(vec (for [x (range 10)] | |
(->Cell x y false false)))))) |