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
package com.github.igrishaev; | |
import clojure.lang.PersistentVector; | |
import clojure.lang.PersistentVector$TransientVector; | |
public class VectorReducer implements IReducer<PersistentVector$TransientVector, PersistentVector> { | |
PersistentVector$TransientVector initiate() { | |
return PersistentVector.EMPTY().asTransient(); | |
} |
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
var Circle = { | |
PI: 3.1415, | |
init: | |
function (x) { | |
var obj = Object.create(Circle); | |
obj.x = x; | |
return obj; |
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
(as-manager ... | |
) | |
(with-context [foo1 {} | |
bar2 {}] | |
) | |
(do |
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
(letfn [(->iter [coll] | |
(clojure.lang.RT/iter coll)) | |
(has-next? [iter] | |
(.hasNext ^java.util.Iterator iter)) | |
(next! [iter] | |
(.next ^java.util.Iterator iter))] | |
(defn map! | |
([f coll] | |
(mapv f coll)) | |
([f coll & colls] |
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 repl | |
(:require | |
[pg.client :as pg])) | |
(def config | |
{:host "127.0.0.1" | |
:port 10150 | |
:user "test" | |
:password "test" | |
:database "test"}) |
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
(defn gipz-encode ^bytes [^bytes input] | |
(let [in | |
(new ByteArrayInputStream input) | |
out-bytes | |
(new ByteArrayOutputStream) | |
out-gzip | |
(new GZIPOutputStream out-bytes true) |
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 any-refs | |
(some-fn :venue | |
:tour | |
:media | |
:ticket-classes | |
:orders | |
:tickets | |
:purchaser | |
:attendee)) |
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 -m (doto (new java.util.HashMap) | |
(.put "a" 1) | |
(.put "b" 2))) | |
(defmacro for-each [[bind ^Iterable coll] & body] | |
`(.forEach conn | |
(reify java.util.function.BiConsumer | |
(accept [_# a b] | |
(println a b)))) |
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
// Decompiling class: pg/client2/sql$fn__9962 | |
package pg.client2; | |
import clojure.lang.*; | |
public final class sql$fn__9962 extends AFunction | |
{ | |
public static final Keyword const__0; | |
public static final Keyword const__1; | |
public static final String const__2; |
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
\documentclass[11pt]{book} | |
\usepackage[OT1, T2A]{fontenc} | |
\usepackage[utf8]{inputenc} | |
\usepackage[english, russian]{babel} | |
\usepackage[newfloat=true]{minted} | |
\usemintedstyle{bw} |