This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
const MyComponent = React.createClass({ | |
componentDidMount() { | |
// To go from React to non-React code, use the lifecycle hooks. In | |
// this example, we use componentDidMount to call some external function | |
// once our component is mounted. We pass the DOM node as convenience in | |
// case the external code needs to do something with it. | |
this.props.onSomething(this.node) | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$zoom = htmlspecialchars($_GET["zoom"]); | |
$x = htmlspecialchars($_GET["x"]); | |
$y = htmlspecialchars($_GET["y"]); | |
//explanation: https://gist.github.com/tmcw/4954720 | |
$y = pow(2, $zoom)-$y-1; | |
//source: https://github.com/timwaters/whoots/blob/master/whoots.rb |