Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.
How to use:
(def ■ '■) | |
(def ▲ '▲) | |
(def ● '●) | |
(first [● ■ ▲]) ; ● | |
(second [● ■ ▲]) ; ■ | |
(nth [● ■ ▲] 2) ; ▲ | |
(rest [● ■ ▲]) ; (■ ▲) | |
(last [● ■ ▲]) ; ▲ | |
(butlast [● ■ ▲]) ; (● ■) |
I looked into the state of GraalVM and Clojure and wrote some small work-related scripts.
(ns views.infinite-scroll | |
(:require | |
[reagent.core :as r])) | |
(defn- get-scroll-top [] | |
(if (exists? (.-pageYOffset js/window)) | |
(.-pageYOffset js/window) | |
(.-scrollTop (or (.-documentElement js/document) | |
(.-parentNode (.-body js/document)) | |
(.-body js/document))))) |
(ns typehint.core) | |
;; A little type hint hint... | |
(set! *warn-on-reflection* true) | |
;; There are two ways to type hint the return value of a function, but one is | |
;; (technically) wrong: | |
(defn ^String as-string0 |
#!/bin/bash | |
JAVA_HOME=${1-text} | |
[ $# -eq 0 ] && { echo "Usage: sudo $0 \$(/usr/libexec/java_home -v '1.8*')" ; exit 1; } | |
KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts | |
wget https://letsencrypt.org/certs/isrgrootx1.pem | |
wget https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.der | |
wget https://letsencrypt.org/certs/lets-encrypt-x4-cross-signed.der |
diff --git a/lib/Unserialize/Parser.php b/lib/Unserialize/Parser.php | |
index 20a6a3c..88c6555 100644 | |
--- a/lib/Unserialize/Parser.php | |
+++ b/lib/Unserialize/Parser.php | |
@@ -34,6 +34,7 @@ class Unserialize_Parser | |
const TYPE_DOUBLE = 'd'; | |
const TYPE_ARRAY = 'a'; | |
const TYPE_BOOL = 'b'; | |
+ const TYPE_NULL = 'N'; | |
(set! *warn-on-reflection* true) | |
(defn apply-fn1 [x f arg] | |
;; apply f | |
x) | |
(defmacro apply-fn2 [x f arg type] | |
(vary-meta (do | |
;; apply f | |
x) |
#!/usr/bin/env python2 | |
import networkx as nx | |
import os | |
# decorator==4.0.10 | |
# networkx==1.11 | |
# pydotplus==2.0.2 | |
# pyparsing==2.1.10 | |
# | |
# http://networkx.github.io/documentation/development/examples/drawing/weighted_graph.html |