This file contains hidden or 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
// The problem looks like a race condition, because I'm doing the following. isLoading can change pretty quickly | |
{!isLoading && <AutoSizer disableWidth>{({ height }) => <div>{height}</div>}</AutoSizer>} |
This file contains hidden or 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
{ | |
"description": "fancy npm run", | |
"version": "1.0.0", | |
"scripts": { | |
"build": { | |
"title": "Build our js", | |
"cmd": "browserify index.js > foo.js" | |
}, | |
"start": { | |
"title": "Start dev server", |
This file contains hidden or 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
[WARNING] 351/144441 (27) : config : log format ignored for frontend 'http-in' since it has no log address. | |
[WARNING] 351/144441 (27) : Health check for server couchdbs/couchdb1 failed, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms, status: 0/2 DOWN. | |
[WARNING] 351/144441 (27) : Server couchdbs/couchdb1 is DOWN. 2 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue. | |
[WARNING] 351/144443 (27) : Health check for server couchdbs/couchdb2 failed, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms, status: 0/2 DOWN. | |
[WARNING] 351/144443 (27) : Server couchdbs/couchdb2 is DOWN. 1 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue. | |
[WARNING] 351/144444 (27) : Health check for server couchdbs/couchdb3 failed, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms, status: 0/2 DOWN. | |
[WARNING] 351/144444 (27) : Server couchdbs/couchdb3 is DOWN. 0 active and |
This file contains hidden or 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
var Starplot = require('./starplot.js') | |
var plot = new Starplot() | |
plot.draw(foo) |
This file contains hidden or 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
npm i -D chokidar-cli |
This file contains hidden or 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
function MyThing (name) { | |
this.name = name | |
} | |
MyThing.prototype.sayHello = function () { | |
return 'hello ' + this.name | |
} | |
var thing = new MyThing('Erik') | |
thing.sayHello() |
This file contains hidden or 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
AppView.renderSubview(starplot) | |
-> starplot.initialize() | |
-> starplot.render() (automatisch aufgerufen durch AppView.rendersubview) | |
-> starplot.renderWithTemplate() (aufgerufen in starplot.render()) | |
// jetzt exisitert das HTML element starplot.el inklusive svg | |
-> d3.select()... | |
This file contains hidden or 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
var context = canvas.getContext('2d') | |
var img = new Image() | |
img.onload = function() { | |
context.drawImage(img, 0, 0) | |
window.URL.revokeObjectURL(this.src) | |
} | |
img.src = window.URL.createObjectURL(new Blob([data], {'type': 'image\/jpeg'})) |
This file contains hidden or 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
/* | |
Products flow from one location to another. This is tracked with deliveries. | |
Delivery: | |
amount | |
sourceId | |
targetId | |
productId | |
*/ | |
Delivery.belongsTo(Location, { as: 'source' }) |
This file contains hidden or 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
var transitionend = require('transitionend-property') | |
module.exports = { | |
onTransitionEnd: function(el, fn) { | |
var self = this | |
function handler(event) { | |
fn.call(self, event) | |
el.removeEventListener(event.type, handler) | |
} | |
el.addEventListener(transitionend, handler, false) |
NewerOlder