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
user> (defrecord MyRec [x]) | |
user.MyRec | |
user> (def m (->MyRec 5)) | |
#'user/m | |
user> (instance? MyRec m) | |
true | |
user> (eval (defrecord MyRec [x])) | |
user.MyRec | |
user> (def m2 (->MyRec 5)) | |
#'user/m2 |
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
(setq mac-option-modifier 'control) | |
(setq mac-command-modifier 'meta) | |
;; fix the PATH variable | |
(defun set-exec-path-from-shell-PATH () | |
(let ((path-from-shell (shell-command-to-string "$SHELL -i -c 'echo $PATH'"))) | |
(setenv "PATH" path-from-shell) | |
(setq exec-path (split-string path-from-shell path-separator)))) | |
(when window-system (set-exec-path-from-shell-PATH)) |
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
(defrecord MyTest [a b c d e f g h i j]) | |
;= user.MyTest | |
(time (dotimes [_ 10000000] | |
(new MyTest 1 2 3 4 5 6 7 8 9 10))) | |
;= "Elapsed time: 11.227 msecs" | |
;= nil | |
(time (dotimes [_ 10000000] | |
(->MyTest 1 2 3 4 5 6 7 8 9 10))) |
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 example.drools; | |
public class Utils { | |
public static Boolean useless(final Object... os) { | |
System.out.println("here"); | |
return true; | |
} | |
public static Boolean useless1(final Object... os) { | |
System.out.println("here"); | |
return true; |
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 drools | |
import java.util.Collection; | |
import java.util.List; | |
import java.util.Set; | |
import java.util.HashSet; | |
import java.util.ArrayList; | |
import example.drools.*; |
NewerOlder