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
// before | |
mainWindow.menu("File", function(err, file) { | |
if(err) throw err; | |
file.openMenu(function(err, menu) { | |
if(err) throw err; | |
menu.item("Open", function(err, item) { | |
if(err) throw err; | |
item.click(function(err) { | |
if(err) throw err; | |
mainWindow.getChild(type('Window'), function(err, dialog) { |
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 test | |
(:import [java.util.concurrent | |
BlockingQueue | |
LinkedBlockingQueue | |
SynchronousQueue | |
PriorityBlockingQueue | |
CyclicBarrier]) | |
(:use clojure.test) | |
(:refer-clojure :exclude [seque])) |
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 pallet.aether | |
"Wrapper for aether resolution | |
See: | |
https://docs.sonatype.org/display/AETHER/Home" | |
(:require | |
[clojure.java.io :as io] | |
[clojure.contrib.logging :as logging]) | |
(import | |
org.apache.maven.repository.internal.MavenRepositorySystemSession |
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
;;; XML parsing and clojure.zip | |
;;; There's got to be a cleaner way to do this. | |
;;; I have code like this: | |
(defn jdks-loc [xml-zipper] | |
(zip/down | |
(first | |
(filter #(let [n (zip/node %)] |
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 trace | |
(:use clojure.pprint)) | |
(declare trace-form) | |
(def *ignore* | |
'#{def quote var try monitor-enter monitor-exit}) | |
(defmulti trace-special-form (fn [form] (first form))) |
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
(use 'backtype.storm.clojure) | |
(use 'backtype.storm.config) | |
(require '[backtype.storm [thrift :as thrift]]) | |
(import 'storm.starter.spout.RandomSentenceSpout) | |
(import 'backtype.storm.LocalCluster) | |
(defboltfull suffix-bolt ["word"] | |
:params [suffix] | |
:let [conf-state (atom nil)] | |
:prepare ([conf context collector] |
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: User; Syntax: Common-Lisp; Mode: Lisp; Base: 10 -*- | |
;;; unify.lisp | |
(in-package "USER") | |
;;; **************************************************************** | |
;;; Unification Algorithm ****************************************** | |
;;; **************************************************************** | |
;;; | |
;;; Random implementations of unification. |
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
;; | |
;; SELECT-MATCH macro (and IN macro) | |
;; | |
;; Copyright 1990 Stephen Adams | |
;; | |
;; You are free to copy, distribute and make derivative works of this | |
;; source provided that this copyright notice is displayed near the | |
;; beginning of the file. No liability is accepted for the | |
;; correctness or performance of the code. If you modify the code | |
;; please indicate this fact both at the place of modification and in |
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
;; requires [com.cemerick/pomegranate "0.0.2"] | |
;; i.e. https://github.com/cemerick/pomegranate | |
(use '[cemerick.pomegranate.aether :only (dependency-hierarchy resolve-dependencies)]) | |
=> (pprint | |
(dependency-hierarchy | |
'[[incanter "1.2.3"]] | |
(resolve-dependencies {:coordinates '[[incanter "1.2.3"]] | |
:repositories (merge cemerick.pomegranate.aether/maven-central {"clojars" "http://clojars.org/repo"})}))) |
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
{-# LANGUAGE TypeFamilies, QuasiQuotes, MultiParamTypeClasses, TemplateHaskell, OverloadedStrings #-} | |
import Yesod | |
-- Versions installed: 0.9.3.4 | |
data HelloWorld = HelloWorld | |
mkYesod "HelloWorld" [parseRoutes| | |
/ HomeR GET | |
|] |