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 notepad.core | |
(:require [dommy.utils :as utils] | |
[dommy.core :as dommy]) | |
(:use-macros [dommy.macros :only [node deftemplate]]) | |
(:import [goog.ui Zippy])) | |
(defn create-note [item el] | |
(let [data (js->clj item)] | |
{:title (data "title") :content (data "content") :parent el})) |
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 calc.core | |
(:require [dommy.core :as dom] | |
[cljs.core.async :refer [>! <! chan put!]]) | |
(:require-macros [cljs.core.async.macros :refer [alt! go-loop]]) | |
(:use-macros [dommy.macros :only [sel sel1]])) | |
(defn setup [id] | |
(let [el (sel1 id) | |
out (chan) |
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
defmodule Tcprpc.Server do | |
use GenServer.Behaviour | |
defrecord State, port: nil, lsock: nil, request_count: 0 | |
def start_link(port) do | |
:gen_server.start_link({ :local, :tcprcp }, __MODULE__, port, []) | |
end | |
def start_link() 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
--- a/do-package.mk Tue Apr 15 13:11:24 2014 +0100 | |
+++ b/do-package.mk Wed Apr 23 09:12:18 2014 +0100 | |
@@ -233,6 +233,7 @@ | |
# Work around weird github breakage (bug 25264) | |
cd $(CLONE_DIR) && git pull | |
$(if $(UPSTREAM_REVISION),cd $(CLONE_DIR) && git checkout $(UPSTREAM_REVISION)) | |
+ $(if $(UPSTREAM_TAG),cd $(CLONE_DIR) && git checkout tags/$(UPSTREAM_TAG)) | |
$(if $(WRAPPER_PATCHES),$(foreach F,$(WRAPPER_PATCHES),patch -d $(CLONE_DIR) -p1 <$(PACKAGE_DIR)/$(F) &&) :) | |
touch $$@ | |
endif # UPSTREAM_GIT |
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
--- a/package.mk | |
+++ b/package.mk | |
@@ -3,6 +3,7 @@ DO_NOT_GENERATE_APP_FILE:=true | |
UPSTREAM_GIT:=git://github.com/elixir-lang/elixir.git | |
UPSTREAM_REVISION:=master | |
+UPSTREAM_TAG:=v0.12.0 | |
RETAIN_ORIGINAL_VERSION:=true | |
ORIGINAL_APP_FILE=$(CLONE_DIR)/src/$(APP_NAME).app.src |
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
-- | |
-- PostgreSQL database dump | |
-- | |
SET statement_timeout = 0; | |
SET lock_timeout = 0; | |
SET client_encoding = 'UTF8'; | |
SET standard_conforming_strings = on; | |
SET check_function_bodies = false; | |
SET client_min_messages = warning; |
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
Unexpected exception in Clojure verticle | |
java.lang.RuntimeException: No such var: eb/on-message, compiling:(clojure/YYYY/XXXX.clj:62:1) | |
at clojure.lang.Compiler.analyze(Compiler.java:6464) | |
at clojure.lang.Compiler.analyze(Compiler.java:6406) | |
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3665) | |
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6646) | |
at clojure.lang.Compiler.analyze(Compiler.java:6445) | |
at clojure.lang.Compiler.analyze(Compiler.java:6406) | |
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5782) | |
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5217) |
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
defmodule Scheduler do | |
def get_best_pid(group) do | |
mems = :pg2.get_members(group) |> | |
Enum.map(fn(pid) -> | |
[message_queue_len: msgs, stack_size: ss] = :rpc.pinfo(pid, [:message_queue_len, :stack_size]) | |
{pid, msgs, ss} | |
end) |> | |
Enum.sort(fn ({_, q1, s1}, {_, q2, s2}) -> q1 < q2 or (q1 == q2 and s1 < s2) end) | |
case mems do | |
[{pid, _, _} | _] -> pid |
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
-module(czmq_const). | |
-compile(export_all). | |
-include_lib("czmq/include/czmq.hrl"). | |
zmq_pair() -> | |
?ZMQ_PAIR. | |
zmq_pub() -> | |
?ZMQ_PUB. |
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 { | |
JupyterFrontEnd, | |
JupyterFrontEndPlugin, | |
ILabShell | |
} from '@jupyterlab/application'; | |
import { Widget } from '@lumino/widgets'; | |
/** | |
* Initialization data for the jupyterlab-sidepanel extension. |
OlderNewer