This file contains 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
import java.util.Collections; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.stream.Stream; | |
import static java.util.Arrays.asList; | |
import static java.util.stream.Collectors.toList; | |
public class Tree { | |
private int value; |
This file contains 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
function createDir(name, parent) { | |
return new Promise((res, rej) => { | |
console.log(`Creating ${name} with parent ${parent}`); | |
res(name); | |
}); | |
} | |
const dirsToCreate = ['foo', 'bar', 'baz', 'boo']; | |
dirsToCreate.reduce(async (parentPromise, dir) => { |
This file contains 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 tutorial.app | |
(:require [tutorial.controllers :as ctrl])) | |
(defn ng-route [provider path route-spec] | |
(.when provider path (clj->js route-spec))) | |
(defn ng-route-otherwise [provider route-spec] | |
(.otherwise provider (clj->js route-spec))) | |
(doto (angular/module "phonecat" (array "phonecatFilters" "phonecatServices")) |
This file contains 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 hello_clojurescript = {AppViewModel:function(a, b, c) { | |
this.firstName = a; | |
this.lastName = b; | |
this.fullName = c | |
}}; | |
hello_clojurescript.AppViewModel.cljs$lang$type = !0; | |
hello_clojurescript.AppViewModel.cljs$lang$ctorPrSeq = function() { | |
return cljs.core.list.call(null, "hello-clojurescript/AppViewModel") | |
}; | |
hello_clojurescript.AppViewModel.cljs$lang$ctorPrWriter = function(a, b) { |
This file contains 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
(import [processing.core PApplet]) | |
(def angle-seq (iterate #(+ (Math/toRadians 10) %) 0)) | |
(defn calculate-scale [angle] (* (Math/cos angle) 6)) | |
(def scale-seq (atom (map calculate-scale angle-seq))) | |
(defn generate-scale [] | |
(do |
This file contains 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
; project.clj | |
(defproject enc-test "1.0.0-SNAPSHOT" | |
:description "FIXME: write" | |
:dependencies [[org.clojure/clojure "1.2.0"] | |
[org.clojure/clojure-contrib "1.2.0"] | |
[ring/ring-jetty-adapter "0.3.0"] | |
[compojure "0.4.1"]] | |
:repl-init-script "src/encoding_issue/repl.clj") |
This file contains 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- xhtml-template [head title body] | |
{:status 200 | |
:headers {"Content-Type" "text/html; charset=utf-8"} | |
:body | |
(html | |
(doctype :xhtml-strict) | |
(xhtml-tag "en" | |
[:head | |
[:meta {:http-equiv "Content-Type" :content "text/html; charset=utf-8"}] | |
[:title title] |