brew install mpd
~/.mpdconf
port "6600"
var poi = [ | |
{ | |
name: 'name', | |
address: 'address', | |
phone: 'phone', | |
lat: 0.000, | |
lng: -0.000, | |
category: 'category', | |
icon: 'path/to/icon' | |
} |
//before running make sure you setup a GOPATH env variable and ran: "go get code.google.com/p/go.net/html" | |
//to run: go run ioCrawler.go -url="http://developers.google.com/" | |
//also try http://developer.android.com/index.html | |
//output goo.gl links to try and redeem will be sent to foundLinks.txt | |
//by the way there's an artificial "rate limit" in func crawler, you can lower that or raise it as you wish | |
//You can also comment out the onlyGoogleRegex code if you don't want to limit to google.com/youtube | |
//if you're getting I/O timeout errors, then you might need to increase the timeouts on line 231 |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var jshint = require('gulp-jshint'); | |
// Command line option: | |
// --fatal=[warning|error|off] | |
var fatalLevel = require('yargs').argv.fatal; | |
var ERROR_LEVELS = ['error', 'warning']; |
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).
// Usage: | |
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread | |
// then use as follows: | |
// | |
// query(term | [term, term, ...], term | [term, term, ...], ...) | |
// | |
// When arguments are in an array then that means an "or" and when they are seperate that means "and" | |
// | |
// Term is of the format: | |
// ((-)text/RegExp) ( '-' means negation ) |
updated list moved to https://grin.io/coding-maxims
A Tree is just a restricted form of a Graph. | |
Trees have direction (parent / child relationships) and don't contain cycles. | |
It has only one path between any two vertices | |
They fit with in the category of Directed Acyclic Graphs (or a DAG). | |
So Trees are DAGs with the restriction that a child can only have one parent. | |
Directed Acyclic Graphs is a kind of directed graph that have no cycles. |
I can't find exact specifications on this, but it seems that iOS restricts bringing up the keyboard via programmatically focusing on <input>
. It only brings up the keyboard in response to explicit user interaction.
This presents a curious problem when you want to autofocus an input inside a modal or lightbox, since what you generally do is click on a button to bring up the lightbox, and then focus on the input after the lightbox has been opened. Without anything fancy, it actually works ok. The problem shows up when you try to add something fancy like a setTimeout
or a promise.then()
. I don't know why people would want to use a setTimeout here, but waiting for a promise is actually a pretty common use case. E.g. we try to batch dom manipulations like getting a lightbox to show up inside `requestAnimati
If you use server rendering, keep in mind that neither useLayoutEffect
nor useEffect
can run until the JavaScript is downloaded.
You might see a warning if you try to useLayoutEffect
on the server. Here's two common ways to fix it.
If this effect isn't important for first render (i.e. if the UI still looks valid before it runs), then useEffect
instead.
function MyComponent() {