Performs exponential calculation on operands. Same algorithm as Math.pow(x, y)
- Commonly used in albegra, geometry, physics and robotics.
- Nice to have "inline" operator
- Python
var AnimationRegion = Backbone.Marionette.Region.extend({ | |
innerRegionSelector: '.inner-page-region', | |
setLayout: function(layout, animationClass) { | |
this.regionAnimationClass = animationClass; | |
if (this.currentLayout) { | |
this.swap(layout); | |
} else { |
var App2 = React.createClass({ | |
getInitialState: function() { | |
return { | |
x: 0, | |
y: 0 | |
}; | |
}, | |
componentDidMount: function() { | |
var rect = this.refs.rect.getDOMNode(); |
var React = require('react'); | |
var Immutable = require('immutable-with-cursors'); | |
var mainComponent = React.createClass({ | |
getInitialState: function() { | |
return this.props; | |
}, | |
render: function() { | |
return React.DOM.ul( | |
null, |
var React = require('react'); | |
var History = require('immutable-history'); | |
// call `render` whenever the cursor changes | |
var state = new History({posts: [], username: 'Jamitron The Terrible'}, render); | |
var App = React.createClass({ | |
render: function() { | |
var postsCursor = this.props.data.cursor(['posts']); | |
return <div> |
The approach and the client side code you can find here: https://github.com/yahoo/flux-examples/blob/master/routing/app.js
'use strict'; | |
var AppDispatcher = require('../dispatcher/AppDispatcher'), | |
ActionTypes = require('../constants/ActionTypes'), | |
ScreenSizes = require('../constants/ScreenSizes'), | |
{ createStore } = require('../utils/StoreUtils'); | |
function getScreenSize() { | |
if (window.matchMedia('(min-width: 100em)').matches) { | |
return ScreenSizes.EXTRA_LARGE; |
'use strict'; | |
var ScreenSizeStore = require('../stores/ScreenSizeStore'); | |
var ScreenSizeMixin = { | |
getInitialState() { | |
return this.getScreenSizeState(); | |
}, | |
getScreenSize() { |
'use strict'; | |
var TRANSFORM_VARIANTS = { | |
'WebkitTransform': '-webkit-transform', | |
'Transform': 'transform' | |
}; | |
function test() { | |
var testEl = document.createElement('div'), | |
style = testEl.style; |
var csv = require('csv-parser') | |
var through = require('through2') | |
var ndjson = require('ndjson') | |
var fs = require('fs') | |
fs.createReadStream(process.argv[2]) | |
.pipe(csv()) | |
.pipe(through.obj(map)) | |
.pipe(ndjson.serialize()) | |
.pipe(process.stdout) |