This is a command in the Docker Quickstart Terminal
$ This is a command run inside the docker host or inside a container (linux etc, eg after docker-machine ssh default or docker run -it ubuntu bash)
- start docker quick-start terminal
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| package cond | |
| import ( | |
| "context" | |
| "strconv" | |
| "sync" | |
| "sync/atomic" | |
| "testing" | |
| ) |
| class Dashboard extends Component { | |
| constructor(props) { | |
| super(props) | |
| // bind? slows down the initialization path, looks awful | |
| // when you have 20 of them (I have seen your code, I know) | |
| // and it increases bundle size | |
| this.handleStuff = this.handleStuff.bind(this) | |
| // _this is ugly. |
| ZIP,LAT,LNG | |
| 00601,18.180555, -66.749961 | |
| 00602,18.361945, -67.175597 | |
| 00603,18.455183, -67.119887 | |
| 00606,18.158345, -66.932911 | |
| 00610,18.295366, -67.125135 | |
| 00612,18.402253, -66.711397 | |
| 00616,18.420412, -66.671979 | |
| 00617,18.445147, -66.559696 |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "net" | |
| "os" | |
| "time" | |
| ) |
| import { mockServer, MockList } from 'graphql-tools'; | |
| import casual from 'casual-browserify'; | |
| // The GraphQL schema. Described in more detail here: | |
| // https://medium.com/apollo-stack/the-apollo-server-bc68762e93b | |
| const schema = ` | |
| type User { | |
| id: ID! | |
| name: String |
| package main | |
| import ( | |
| "net/http" | |
| "github.com/graphql-go/graphql" | |
| "github.com/graphql-go/handler" | |
| ) | |
| var queryType = graphql.NewObject(graphql.ObjectConfig{ |
| package main | |
| import ( | |
| "github.com/graphql-go/graphql" | |
| ) | |
| var queryType = graphql.NewObject(graphql.ObjectConfig{ | |
| Name: "Query", | |
| Fields: graphql.Fields{ | |
| "latestPost": &graphql.Field{ |