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
(->> ((->> [0 2 5 1 -4 1 -6] (map #(partial + %)) (apply juxt)) 109) byte-array (String.))` | |
morning | |
(loop [txt ""] (if (= 1803412773 (hash txt)) txt (recur (apply str (repeatedly 7 (fn [] (char (rand-nth [114 105 110 111 109 103])))))))) | |
(->> "bW9ybmluZw==" | |
.getBytes | |
(.decode (java.util.Base64/getDecoder)) | |
(new String)) |
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 twrule.core) | |
;; A is the B | |
;; fact: '(father a b ) | |
(def facts #{'(father andrew bob) '(father bob charlie)}) | |
;; Grandfather rule: if A is the father of B, and B is the father of C then A is the Grandfather C | |
(def rules [{:patterns ['(father ?a ?b) '(father ?b ?C)] | |
:assertions ['(grandfather ?a ?C)]}]) |
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
;; The problem is that the text in :element of over-lay gets interpreted as text, not really | |
;; surprising at the moment as it is text, but I don't know what to do with it so that it | |
;; works like in the example: http://artarmstrong.com/blog/2014/10/28/openlayers-3-custom-markers-by-latitude-longitude/ | |
(ns clojurescript-apis.core | |
(:require-macros [hiccups.core :as h] | |
[cljs.core.async.macros :as m :refer [go alt!]]) | |
(:require [clojure.browser.repl :as repl] | |
[domina :as dom] | |
[hiccups.runtime :as hiccupsrt] |
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 three (cycle [nil nil "fizz"])) | |
(def five (cycle [nil nil nil nil "buzz"])) | |
(map vector (range 1 16) three five ) | |
;([1 nil nil] [2 nil nil] [3 "fizz" nil] [4 nil nil] [5 nil "buzz"] [6 "fizz" nil] [7 nil nil] [8 nil nil] [9 "fizz" nil] [10 nil "buzz"] [11 nil nil] [12 "fizz" nil] [13 nil nil] [14 nil nil] [15 "fizz" "buzz"]) |
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 diversen.permutations) | |
(use 'clojure.math.combinatorics) | |
(def things '[:a :b :c]) | |
(map #(conj % (last %) ) (permutations things)) | |
;; ((:c :a :b :c) (:b :a :c :b) (:c :b :a :c) (:a :b :c :a) (:b :c :a :b) (:a :c :b :a)) |