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
Since upgrading to Cursive 0.1.30 I get errors like this at startup. Intellij 13.1.4. | |
Error while indexing /.../.gradle/caches/modules-2/files-2.1/... path to file ....js | |
To reindex this file IDEA has to be restarted: Cannot obtain text for binary file type : UNKNOWN | |
com.intellij.util.indexing.FileContentImpl$IllegalDataException: Cannot obtain text for binary file type : UNKNOWN | |
at com.intellij.util.indexing.FileContentImpl.getContentAsText(FileContentImpl.java:189) | |
at cursive.index.PsiDependentIndexExtension$1$1.valAt(PsiDependentIndexExtension.java:61) | |
at cursive.index.PsiDependentIndexExtension$1$1.valAt(PsiDependentIndexExtension.java:51) | |
at clojure.lang.KeywordLookupSite$1.get(KeywordLookupSite.java:45) | |
at plugin.index.js$index_javascript.invoke(js.clj:196) |
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
(def user-prefs | |
{:type :command | |
:group-key :Cassandra | |
:command-key :GetUserPreferences | |
:run-fn (fn [user-id] ... do request ...) | |
:fallback-fn (fn [user-id] { ... default prefs ...}) | |
:cache-key-fn (fn [user-id] (str user-id)) }) | |
(require '[com.netflix.hystrix.core :as hystrix]) |
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.awt.BorderLayout; | |
import java.awt.event.MouseAdapter; | |
import java.awt.event.MouseEvent; | |
import javax.swing.JButton; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
public class VisibleButton { |
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
(frame :resizable? true | |
:content (vertical-panel | |
:id :panel | |
:items | |
[(button :text "show button 2" | |
:listen [:action (fn [e] | |
(let [btn (select (to-frame e) [:#btn])] | |
(.setVisible btn true)))]) | |
(doto (button :id :btn :text "here I am") (.setVisible false))])) |
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
Namespaces | |
seesaw.test.event | |
#'seesaw.event/unappend-listener | |
can remove a listener | |
#'seesaw.event/listen | |
can install a mouse-clicked listener | |
returns a function that will remove the installed listener | |
can install two mouse-clicked listeners | |
can install a document listener | |
can register for a class of events |
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 heavy-scrollable [target] | |
(doto (java.awt.ScrollPanel.) | |
(.add target))) | |
(show! (frame :content (heavy-scrollable (... make a PApplet)))) |
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 pi.core | |
(:use seesaw.core)) | |
(native!) | |
(def gap [:fill-h 5]) | |
; Set up the structure of the ui, giving widgets classes and ids as needed. | |
(defn make-frame [] | |
(frame |
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 hugo.views.main-view | |
(:use hugo.db.sqlite) | |
(:use [seesaw core color])) | |
(defn create-home-view [data] | |
(show! | |
(frame | |
:title "@rippinrobr's Hugo Best Novel Database" | |
:on-close :exit | |
:size [500 :by 600] |
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
(defprotocol Async | |
(run-async* [this continue]) | |
(cancel-async* [this])) | |
(defn await-event | |
"Awaits the given event on the given target asynchronuously. Passes on the | |
event to the continuation." | |
[target event] | |
(let [remove-fn (promise)] | |
(reify Async |
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
# Emulating CSoar's cmd function in JSoar | |
# Install a fake "cmd" RHS function. | |
script javascript { | |
soar.rhsFunction({ | |
name: "cmd", | |
execute: function(context, args) { | |
var cmd = ""; | |
for(var i = 0; i < args.length; i++) { | |
cmd = cmd + args[i] + " "; |
OlderNewer