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
{ | |
"$schema": "http://json-schema.org/draft-07/schema", | |
"type": "object", | |
"$id": "#root", | |
"properties": { | |
"type": { | |
"type": "string", | |
"enum": [ | |
"HorizontalLayout", | |
"VerticalLayout", |
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
package controllers; | |
import play.cache.SyncCacheApi; | |
import play.mvc.*; | |
import views.html.*; | |
import javax.inject.Inject; | |
/** |
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
public class LDAPUserVerifierTest extends ESTestWithMockServer { | |
@BeforeClass | |
public static void beforeClass() { | |
startEMFStore(); | |
} | |
@AfterClass | |
public static void afterClass() { | |
stopEMFStore(); |
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
{ | |
"definitions": { | |
"writer": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"books": { | |
"type": "array", |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"title": "Product", | |
"type": "object", | |
"properties": { | |
"id": { | |
"description": "The unique identifier for a product", | |
"type": "number" | |
}, | |
"name": { |
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
#!/bin/zsh | |
emulate -L zsh | |
b=(1 2 2 4 5 10 10 20 25 50 50 100 100 200 200 400 400 800 800 1600 1600 3200 3200 6400 6400 12800) | |
c=1 | |
rt=5 | |
while [ "$c" -le "${#b}" ]; do | |
for i in {$rt..0}; do | |
sleep 1 | |
print -n "Time: ${(l:2::0:)$((i/60))}:${(l:2::0:)$((i%60))} Blinds: $b[$c], $b[$c+1]\r" |
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 store-credit | |
(use [clojure.contrib.str-utils]) | |
(:import (java.io BufferedReader FileReader))) | |
(defn sum-items [v i] | |
(let [h (first v) | |
r (rest v) | |
j (atom i)] | |
(if (empty? v) | |
[] |
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 reverse-words | |
(use [clojure.contrib.str-utils]) | |
(:import (java.io BufferedReader FileReader))) | |
(defn reverse-words [file-name] | |
(with-open [reader (BufferedReader. (FileReader. file-name))] | |
(let [lines (line-seq reader) | |
n (Integer/parseInt (first lines))] | |
(doseq [[xs i] (map vector (rest lines) (range 1 (inc n)))] | |
(println (str "Case #" i ":") |
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
package com.example | |
import akka.actor.Actor | |
import reactivemongo.api.MongoDriver | |
import reactivemongo.bson.{BSONDocument, BSONDocumentReader, BSONObjectID, Macros} | |
import spray.httpx.SprayJsonSupport._ | |
import spray.json._ | |
import spray.routing._ | |
import scala.concurrent.Future | |
import scala.util.{Failure, Success} |
NewerOlder