Last Updated: 2018-01-23
Status: Draft
// `Array#sort` implementation using the merge sort | |
// Notes: | |
// 1) calls comparator for undefined values, holes, values from the prototype chain; | |
// 2*) replaces holes with undefined values or values from the prototype chain; | |
// 3*) does not use `ToObject(this)`, `ToLength(this.length)`; | |
// 4*) does not throw errors for non-undefined non-function `comparefn`. | |
// 5*) uses `Math`, `Math.floor`, `String`, `Array`. | |
// 6*) calls setters of `Array.prototype` during internal buffer initialization. | |
// * This behaviour is inconsistent across browsers even for built-in `Array#sort`. |
(function(window){ | |
var EVENT_EXISTS = 'GlobalEvents: Event already exists.'; | |
var eventIsRunning, | |
_eventStack, | |
_findByName, | |
stackEvent, | |
removeEvent, | |
eventListener, |
(function(context) { | |
'use strict'; | |
var Timer = Java.type('java.util.Timer'); | |
var Phaser = Java.type('java.util.concurrent.Phaser'); | |
var TimeUnit = Java.type('java.util.concurrent.TimeUnit'); | |
var AsyncHttpClient = Java.type('com.ning.http.client.AsyncHttpClient'); | |
var timer = new Timer('jsEventLoop', false); | |
var phaser = new Phaser(); |
Last Updated: 2018-01-23
Status: Draft
So basically FlowType doesn't know about CSS Modules, a really handy way of dealing with the plagues of CSS in codebases (global variables and dependency wackiness mainly).
What WebPack allows us to do is "require" CSS files and use their class names:
import styles from "my_styles.css";
import React from "react";
A maintainable application architecture requires that the UI only contain the rendering logic and execute queries and mutations against the underlying data model on the server. A maintainable architecture must not contain any logic for composing "app state" on the client as that would necessarily embed business logic in the client. App state should be persisted to the database and the client projection of it should be composed in the mid tier, and refreshed as mutations occur on the server (and after network interruption) for a highly interactive, realtime UX.
With GraphQL we are able to define an easy-to-change application-level data schema on the server that captures the types and relationships in our data, and wiring it to data sources via resolvers that leverage our db's own query language (or data-oriented, uniform service APIs) to resolve client-specified "queries" and "mutations" against the schema.
We use GraphQL to dyn
var http = require('http'); | |
var router = require('routes')(); | |
var Busboy = require('busboy'); | |
var AWS = require('aws-sdk'); | |
var inspect = require('util').inspect; | |
var port = 5000; | |
// Define s3-upload-stream with S3 credentials. | |
var s3Stream = require('s3-upload-stream')(new AWS.S3({ | |
accessKeyId: '', |
/* Skip Lists: A Probabilistic Alternative to Balanced Trees */ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <limits.h> | |
#define SKIPLIST_MAX_LEVEL 6 | |
typedef struct snode { | |
int key; |
var Bar1 = base => class extends base { | |
componentWillMount(){ | |
super.componentWillMount(); | |
console.log('Bar1'); | |
} | |
}; | |
var Bar2 = base => class extends base { | |
componentWillMount(){ | |
super.componentWillMount(); |