This file contains hidden or 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
mvn -DaltDeploymentRepository=release-repo::default::file:local-path/releases clean deploy | |
mvn -DaltDeploymentRepository=snapshot-repo::default::file:local-path/snapshots clean deploy |
This file contains hidden or 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
git svn clone -s -r 40000:HEAD https://svn.parrot.org/parrot |
This file contains hidden or 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 f-> | |
([s] (f-> s ())) | |
([s fs] (if (and (list? s) | |
(= 2 (count s))) | |
(let [[f x] s] | |
(recur x (conj fs f))) | |
(conj (conj fs s) '->)))) | |
(defmacro r-> [sexp] | |
(f-> sexp)) |
This file contains hidden or 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
sudo killall coreaudiod |
This file contains hidden or 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
;; f需要被调用很多次,假设g的运算非常耗时,而在循环中a的值是不变的,b每次不一样,是否有自动的方法把f转化成curry形式,从而提高性能? | |
(defn f [a b] | |
(let [gb (g b) | |
ga (g a) | |
gga (g ga)] | |
(+ gga gb))) | |
=> | |
(defn f [a] |
This file contains hidden or 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
CGPoint hitPoint = [sender convertPoint:CGPointZero toView:self.tableView]; | |
NSIndexPath *hitIndex = [self.tableView indexPathForRowAtPoint:hitPoint]; |
This file contains hidden or 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
;; http://blog.jayfields.com/2012/05/agile-development-with-clojure.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+jayfields%2FmjKQ+%28Jay+Fields%27+Thoughts%29 | |
(defonce ignored-namespaces (atom #{})) | |
(defn reload-all [] | |
(doseq [n (remove (comp @ignored-namespaces ns-name) (all-ns))] | |
(require (ns-name n) :reload ))) |
This file contains hidden or 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
[alias] | |
db = !git cherry-pick -n debug-only && git status | |
udb = !git revert -n debug-only && git status |
This file contains hidden or 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
clear Mod1 | |
clear Mod2 | |
keycode 66 = Meta_L | |
keycode 69 = Meta_R | |
keycode 63 = Alt_L | |
keycode 71 = Alt_R | |
add Mod1 = Alt_L Alt_R | |
add Mod2 = Meta_L Meta_R |
This file contains hidden or 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 Simplifier for all Expressions | |
;; Example: | |
;; (simplify '(* 1 (+ x (- y y)))) ;=> x | |
;; (simplify '(and a (and (and) b))) ;=> (and a b) | |
;; See section 4.4, "Syntactic Abstraction" of Norvig and Pitman's | |
;; "Tutorial on Good Lisp Programming Style": | |
;; http://norvig.com/luv-slides.ps |