Droplr will auto-copy the sharing link when you take a screenshot. You'll use this on GitHub.
That copied link will look like this: http://d.pr/i/13PDt
To paste that into a GitHub issue:
![](http://d.pr/i/13PDt+)
/** @jsx React.DOM */ | |
var Graphic = React.createClass({ | |
componentDidMount: function() { | |
var context = this.getDOMNode().getContext('2d'); | |
this.paint(context); | |
}, | |
componentDidUpdate: function() { |
#!/bin/bash | |
files=$(git diff --cached --name-only | grep '\.js$') | |
# Prevent ESLint help message if no files matched | |
if [[ $files = "" ]] ; then | |
exit 0 | |
fi | |
echo $files | xargs eslint |
Droplr will auto-copy the sharing link when you take a screenshot. You'll use this on GitHub.
That copied link will look like this: http://d.pr/i/13PDt
To paste that into a GitHub issue:
![](http://d.pr/i/13PDt+)
import Data.Functor | |
readInt = read <$> getLine :: IO Int | |
readIntArray = map read . words <$> getLine :: IO [Int] | |
m = 10^9 + 7 | |
mm a b = (a * b) `mod` m | |
extractCD2 :: (Int, [Int]) -> Int -> (Int, [Int]) |
tl;dr I built a demo illustrating what it might look like to add async rendering to Facebook's commenting interface, while ensuring it appears on the screen simultaneous to the server-rendered story.
A key benefit of async rendering is that large updates don't block the main thread; instead, the work is spread out and performed during idle periods using cooperative scheduling.
But once you make something async, you introduce the possibility that things may appear on the screen at separate times. Especially when you're dealing with multiple UI frameworks, as is often the case at Facebook.
How do we solve this with React?
module Bar () where | |
import Data.Maybe | |
import Control.Monad.State | |
import qualified Data.Map as M | |
data Item = Item { | |
sId :: String, | |
pId :: String, | |
value :: [Char], | |
children :: [String] |
const Cont = require("@masaeedu/fp/dist/instances/cont"); | |
const S = require("sanctuary"); | |
// > It is often said that callbacks do not compose. While this may | |
// > be true, functions that *accept* callbacks compose extraordin- | |
// > arily well. In fact, such functions, which I'll hereafter refer | |
// > to as "continuations", form a monad, and a rather powerful and | |
// > versatile monad at that. | |
// > | |
// > In this snippet, I'll try to demonstrate how the continuation |
exports.setHTML = function(el) { | |
return function (htmlElement) { | |
return function() { | |
el.innerHTML = ''; | |
el.appendChild(htmlElement); | |
}; | |
}; | |
}; |