Created by Christopher Manning
Nodes are linked to nodes in neighboring cells. The cell's color is a function of its area.
The white lines are the Delaunay triangulation and the purple cells are the Voronoi diagram.
Created by Christopher Manning
Nodes are linked to nodes in neighboring cells. The cell's color is a function of its area.
The white lines are the Delaunay triangulation and the purple cells are the Voronoi diagram.
| import React, { Component, PropTypes } from 'react' | |
| import elliptic, { eddsa as EdDSA } from 'elliptic' | |
| function toHex(arr) { | |
| return elliptic.utils.toHex(arr).toUpperCase() | |
| } | |
| function fromHex(hex) { | |
| return elliptic.utils.toArray(hex, 'hex') |
| #!/bin/bash | |
| DEFAULT_BASE="develop" | |
| if [ -z "$*" ]; then echo "Usage: code-review.sh [review branch] [case compare branch]"; exit 0; fi | |
| REVIEW_BRANCH=$1 | |
| BASE_BRANCH=${2-$DEFAULT_BASE} | |
| echo "Checking out $REVIEW_BRANCH" |
| (function () { | |
| function handleLoaded() { | |
| var butan = document.querySelector('.merge-message .btn[disabled]') | |
| var checkTimer; | |
| if (butan) { | |
| butan.parentElement.addEventListener('click', function handleClick(event) { | |
| if (checkTimer) { |
| // source: https://ctrlq.org/code/19702-twitter-image-upload | |
| function autoTweet() { | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
| var sheet = ss.getSheetByName("schedule"); // This must match the sheet name! | |
| var rows = sheet.getRange("A:D").getValues(); | |
| var titleList = [], newValues = [], | |
| response, doc, title; | |
| var twitterCallback = function(rowIndex, err, result) { |
| #!/usr/bin/env sh | |
| sudo ssh -L 0.0.0.0:80:127.0.0.1:9000 -N tom@localhost |
| 'use strict'; | |
| /* | |
| # FetchData | |
| If property callback `if(storeState)` return true, calls property callback | |
| `fetchData(dispatch, storeState)` so it may dispatch FETCH actions. | |
| ## Usage: |
We have a rapidly growing React application which renders on both the server- and client-sides. Some sections of the app are on separate subdomains. The same app uses the same assets across many subdomains, so we control it all through the one runtime. This mean react-router needs to be able to distinguish which host or subdomain it's on.
HostRoute which subclasses Route and is aware of the host via a static method HostRoute.setHost(url.parse(res.url).hostname)HostRoute.setHost(url.parse(req.url).hostname) and/or HostRoute.setHost(window.location.hostname)modules/Match to ask the Route itself if it might be a match (if host matcA starting point for awesome CSS (and Sass, and Less) resources, inspired by Awesome Awesomeness everywhere. Still fleshing this out as I go, feel free to fork/contribute.
| if (typeof window.console === "undefined") { | |
| var methods = ['log', 'info', 'error', 'debug', 'warn', 'assert', 'clear', 'dir', 'trace', 'time', 'timeEnd']; | |
| console = {}; | |
| for (var key in methods) | |
| console[methods[key]] = function () {}; | |
| } |