Note: you must have Cider version 0.18.*
In deps.edn
{:paths ["src" "resources"]
:deps {org.clojure/clojure {:mvn/version "1.9.0"}}
(ns flatmap | |
(:require [clojure.string :as str])) | |
(def default-delimiter \$) | |
;; via https://stackoverflow.com/questions/31704704/depth-first-tree-traversal-accumulation-in-clojure/31709202#31709202 | |
(defn traverse [t] | |
(letfn [(traverse- [path t] | |
(when (seq t) |
Handling multiple results from SQL that includes temp tables.
NB! this is using clojure.java.jdbc v0.6.1, as we have performance issues w/ 0.7.x
Although this gist was very helpful when all statements return results, this is what is ultimately needed to properly traverse the intermediate reults that return nothing (e.g. temp tables).
I hereby claim:
To claim this, I am signing this object:
(ns nested-routing.core | |
(:require-macros [om.core :as om] | |
[secretary.core :refer [defroute]]) | |
(:require [om.dom :as dom] | |
[om.core :as om] | |
[secretary.core :as secretary] | |
[goog.events :as events] | |
[goog.history.EventType :as EventType]) | |
(:import goog.History)) |
I hereby claim:
To claim this, I am signing this object:
;; Clojure | |
(require 'clojure-mode) | |
(setq auto-mode-alist (cons '("\\.cljs$" . clojure-mode) auto-mode-alist)) | |
(setq inferior-lisp-program "lein repl") | |
;; clj-refactor | |
(require 'clj-refactor) | |
(add-hook 'clojure-mode-hook (lambda () | |
(clj-refactor-mode 1) | |
(cljr-add-keybindings-with-prefix "C-c C-o"))) |
function Retry-Command | |
{ | |
param ( | |
[Parameter(Mandatory=$true)][string]$command, | |
[Parameter(Mandatory=$true)][hashtable]$args, | |
[Parameter(Mandatory=$false)][int]$retries = 5, | |
[Parameter(Mandatory=$false)][int]$secondsDelay = 2 | |
) | |
# Setting ErrorAction to Stop is important. This ensures any errors that occur in the command are |
FIELDS = ['cmd', 'command', 'start', 'end', 'delta', 'msg', 'stdout', 'stderr'] | |
def human_log(res): | |
if type(res) == type(dict()): | |
for field in FIELDS: | |
if field in res.keys(): | |
encoded_field = res[field].encode('utf-8') | |
print '\n{0}:\n{1}'.format(field, encoded_field) |