This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| function mergeDeep (o1, o2) { | |
| var tempNewObj = o1; | |
| //if o1 is an object - {} | |
| if (o1.length === undefined && typeof o1 !== "number") { | |
| $.each(o2, function(key, value) { | |
| if (o1[key] === undefined) { | |
| tempNewObj[key] = value; | |
| } else { | |
| tempNewObj[key] = mergeDeep(o1[key], o2[key]); |
| ; A REPL-based, annotated Seesaw tutorial | |
| ; Please visit https://github.com/daveray/seesaw for more info | |
| ; | |
| ; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers | |
| ; Seesaw's basic features and philosophy, but only scratches the surface | |
| ; of what's available. It only assumes knowledge of Clojure. No Swing or | |
| ; Java experience is needed. | |
| ; | |
| ; This material was first presented in a talk at @CraftsmanGuild in | |
| ; Ann Arbor, MI. |
| (defn lazy-seq-prime | |
| ([] | |
| (concat [2] (lazy-seq-prime 2 (iterate inc 2)))) | |
| ([p nums] | |
| (let [nnums (filter (fn [x] (pos? (rem x p))) nums) n (first nnums)] | |
| (lazy-seq | |
| (cons n (lazy-seq-prime n nnums)))))) |
| ; From: http://stackoverflow.com/a/2352280/1183294 | |
| ; Debugger Code: | |
| (defmacro dbg[x] `(let [x# ~x] (println "*** dbg:" '~x "=" x#) x#)) |
| function doHash(str, seed) { | |
| var m = 0x5bd1e995; | |
| var r = 24; | |
| var h = seed ^ str.length; | |
| var length = str.length; | |
| var currentIndex = 0; | |
| while (length >= 4) { | |
| var k = UInt32(str, currentIndex); | |
| http://opinionator.blogs.nytimes.com/2013/07/13/nothing-to-do-but-embrace-the-dread/ | |
| http://opinionator.blogs.nytimes.com/2012/06/30/the-busy-trap/?_r=0 | |
| http://www.whyilovethisbook.co.uk/2011/09/stephen-fry-on-ulysses-james-joyce/ |
| " Vim color file -- candycode | |
| " Maintainer: Justin Constantino <goflyapig-at-gmail-com> | |
| " Last Change: 2006 Aug 12 | |
| set background=dark | |
| highlight clear | |
| let g:colors_name="candycode" | |
| let save_cpo = &cpo | |
| set cpo&vim |
| ### | |
| ### Barry Rowlingson, Lancaster University | |
| ### | |
| ## needed for shapefiles: | |
| require(rgdal) | |
| ## needed for colour mapping - not on CRAN: | |
| ## http://r-forge.r-project.org/projects/colourscheme/ | |
| ## try: |
Built with:
blockbuilder.org
R htmlwidgets
In response to this StackOverflow question, I show a quick way of adding leaflet-timeline to a R leaflet map. See here for a live example.
# http://stackoverflow.com/questions/36554605/cant-loop-with-rs-leaflet-package-to-produce-multiple-maps
# need newest htmlwidgets from github