CouchDB is a NoSQL database for storing JSON documents. It comes with a REST API out of the box so your client applications can persist data while requiring you to write little or no server-side code. CouchDB's killer feature is its ability to easily replicate, which allows for horizontal scaling, easy backup, and for client adapters to synchronize documents. This is perfect if you want to write an application that is offline-first. It's become my go-to database when creating new
The CitySDK is a JavaScript library, which combines and abstracts three underlying APIs into a single function. As little as possible was "created" to facilitate the simplest abstraction possible. However, some trade-offs where made in v2 to enable the greatest flexibility of the abstraction, without creating an unsustainable maintanance burden for the library custodians.
The biggest of these trade-offs we've made is that we are not aliasing Census variables here. It is the burden of the user to choose the correct variable for each vintage they seek (as the same variable ID can mean different things between vintages). The primary reason for this choice is that the underlying API is still in flux and we don't want to be blamed for any mis-assigned aliases.
That having been said, here we will give you the fastest path for discovering your variables of interest.
This guide is written for fellow newbies to the BBB as an aid to understanding how to talk to the onboard PRU's. As a newbie some of my terminology and understanding may not be quite correct, however it's hopefully enough to give you an idea what is going on. The whole subject is a bit of a minefield for the beginner; a lot of things have changed over the last few years and most of the guides you come across are only partially correct, you have to pick through the bones to find the nuggets!. If you're using a modern stock debian image then blindly following them will lead to nothing but frustration. This guide will surely become irrelevant with time too but hopefully as of Oct 2017 it will be of some use.
I'm using the stock debian 9.1 IOT image from Beagleboard.org on an old 2GB Beaglebone Black.
In the beginning there was the Linux Userspace I/O interface (UIO) for commu
Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:
- preserve all commits of both repositories, but replace everything from A with the contents of B, and use rA as your remote location
- actually combine the two repositories, as if they are two branches that you want to merge, using rA as the remote location
NB: Check out git subtree/git submodule and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.
Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.
| function worker() { | |
| setInterval(function() { | |
| postMessage({foo: "bar"}); | |
| }, 1000); | |
| } | |
| var code = worker.toString(); | |
| code = code.substring(code.indexOf("{")+1, code.lastIndexOf("}")); | |
| var blob = new Blob([code], {type: "application/javascript"}); |
| // See documentation: https://requirejs.org/docs/api.html#webworker | |
| // working example: https://jsfiddle.net/yojaar80/2/ | |
| // from SO: https://stackoverflow.com/questions/36840329/whats-the-right-way-to-use-require-js-with-web-workers | |
| importScripts("require.js"); | |
| requirejs.config({ | |
| //Lib path | |
| baseUrl: '.', |
| ; 1) For transducer: https://github.com/loganpowell/census-geojson/issues/12 | |
| (def test-array [["for" "geo1"] | |
| ["in" "geo2"] | |
| ["in" "geo3"] | |
| ["DATE" "6"]]) | |
| (let [rearranged (conj (vec (rest test-array)) | |
| (vec (first test-array)))] | |
| ;;=> [["in" "geo2"] ["in" "geo3"] ["DATE" "6"] ["for" "geo1"]] |
CitySDK v2.0 ships the census function, which takes two arguments:
- The first is an argument object with a set of key/value pairs parameters (See "Full Parameter Set" below)
- The second is a callback function, which will be called upon completion of the
censusfunction and applied to the response
| (ns react-components.core | |
| (:require [reagent.core :as reagent :refer [atom]])) | |
| (enable-console-print!) | |
| (defonce app-state | |
| (atom {:text "Hello world!" | |
| :plain {:comment "and I can take props from the atom"}})) | |
| (defn comment-box [] |
| (ns geojson.index) | |
| ;; / 888 / e e | |
| ;; e88~88e e88~~8e e88~-_ 888 / e88~~8e Y88b / d8b d8b /~~~8e 888-~88e | |
| ;; 888 888 d888 88b d888 i 888/\ d888 88b Y888/ d888bdY88b 88b 888 888b | |
| ;; "88_88" 8888__888 8888 | 888 \ 8888__888 Y8/ / Y88Y Y888b e88~-888 888 8888 | |
| ;; / Y888 , Y888 ' 888 \ Y888 , Y / YY Y888b C888 888 888 888P | |
| ;; Cb "88___/ "88_-~ 888 \ "88___/ / / Y888b "88_-888 888-_88" | |
| ;; Y8"'8D _/ 888 |