Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
There are two JSON API styles:
The ID style is the easiest to get started with, but requires that your clients be able to guess the URLs for related documents. It also locks your API into a particular URL structure, which may become a problem as your API grows.
The URL style requires less guessing on the client side, and makes clients more resilient to API changes, but is trickier to use with relationships and compound documents.
`/** @jsx React.DOM */` | |
classSet = React.addons.classSet | |
ReactCSSTransitionGroup = React.addons.CSSTransitionGroup | |
ReactTransitionGroup = React.addons.TransitionGroup | |
CarouselStateMixin = | |
propTypes: | |
items: React.PropTypes.array |
. | |
├── actions | |
├── stores | |
├── views | |
│ ├── Anonymous | |
│ │ ├── __tests__ | |
│ │ ├── views | |
│ │ │ ├── Home | |
│ │ │ │ ├── __tests__ | |
│ │ │ │ └── Handler.js |
import { combineReducers } from 'redux'; | |
import users from './reducers/users'; | |
import posts from './reducers/posts'; | |
export default function createReducer(asyncReducers) { | |
return combineReducers({ | |
users, | |
posts, | |
...asyncReducers | |
}); |
pico-8 cartridge // http://www.pico-8.com | |
version 8 | |
__lua__ | |
-- mondrian art v.1 | |
-- by hypirlink | |
r1 = {} | |
r1.clr = 8 | |
r2 = {} |
// Pragmatic typed immutable.js records using typescript 2.1+ | |
// Comment with any suggestions/improvements! | |
import * as fs from 'fs' | |
import { Record, Map } from 'immutable' | |
type Stats = fs.Stats; | |
// Define the basic shape. All properties should be readonly. This model | |
// defines a folder because it seemed easy C: |
Nothing here, just a Gist hack to display the title correctly on Gist. | |
(Prefix the title of this file with a dot on Gist.) |
import Foundation | |
import Mapbox | |
import SQLite | |
// MARK: MbtilesSource | |
enum MBTilesSourceError: Error { | |
case CouldNotReadFileError | |
case UnknownFormatError | |
case UnsupportedFormatError |