Facebook tutorials and resources:
- Introducing Relay and GraphQL, Data fetching for React applications @Facebook.
- GraphQL Introduction @Facebook
- Building the facebook news feed with relay
Why be interested:
Facebook tutorials and resources:
Why be interested:
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
querymutationReference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math| # -*- coding:utf-8 -*- | |
| from __future__ import absolute_import | |
| from __future__ import unicode_literals | |
| from __future__ import print_function | |
| import json | |
| import uuid | |
| import time | |
| import gevent |
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't
| #!/bin/bash | |
| # install-node.sh: download and install an official Node.js build from | |
| # nodejs.org, or an unofficial-builds.nodejs.org build for some platforms the | |
| # official project does not cover (musl/Alpine, ARMv6/Raspberry Pi, RISC-V, | |
| # LoongArch, old-glibc x64 systems). YMMV, caveat emptor, etc. | |
| # | |
| # The download is verified against the publisher's SHASUMS256.txt before | |
| # anything is written to the target directory. | |
| # |
This is a comparison of the different formatting styles including with clang-format.
Generated via:
styles=( LLVM Google Chromium Mozilla WebKit )
for style in $styles
do
clang-format -style=$style ChLcpIterativeAPGD.h > ChLcpIterativeAPGD.$style.h
done
| // Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
| $ git ls-files | xargs wc -l |