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
var path_group = d3.select(selector + ' .path_group'); | |
var paths = path_group.selectAll("path") | |
.data(pie(Object.keys(data.status))) | |
.enter().append("path") | |
.style("fill", function(d, i) { | |
console.log(data.status[d.data]); | |
switch (data.status[d.data]) { | |
case 'enabled': | |
return '#98df8a'; | |
case 'disabled': |
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
var Sequelize = require('sequelize'), | |
DataTypes = Sequelize, | |
sequelize = new Sequelize('groups_test', 'root', 'password'); | |
var Device = sequelize.define('Device', { | |
name: DataTypes.STRING | |
}, { | |
underscored: true, | |
timestamps: false | |
}); |
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
var Sequelize = require('sequelize'), | |
DataTypes = Sequelize, | |
sequelize = new Sequelize('groups_test', 'root', 'password'); | |
var Device = sequelize.define('Device', { | |
name: DataTypes.STRING | |
}, { | |
underscored: true, | |
timestamps: false | |
}); |
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
var Sequelize = require('sequelize'), | |
DataTypes = Sequelize, | |
sequelize = new Sequelize('groups_test', 'root', 'password'); | |
var Device = sequelize.define('Device', { | |
name: DataTypes.STRING | |
}, { | |
underscored: true, | |
timestamps: false | |
}); |
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
var label_group = d3.select(selector + ' .label_group'); | |
label_group.selectAll("text").remove(); | |
label_group.selectAll("text") | |
.data(pie(Object.keys(data.status))) | |
.enter().append("svg:text") | |
.attr("dy", "1em") | |
.attr("dx", "0.5em") | |
.style("fill", "white") | |
.style("font", "bold 1.10em Arial") | |
.style("kerning", "1") |
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
var Benchmark = require('benchmark'); | |
// this outputs nothing | |
new Benchmark.Suite() | |
.add("TestBuffer", { | |
'setup': function() { | |
this.buffer = new Buffer(); | |
}, | |
'fn': function() { | |
console.log(this.buffer); |
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
#include <qpid/messaging/Connection.h> | |
#include <qpid/messaging/Message.h> | |
#include <qpid/messaging/Receiver.h> | |
#include <qpid/messaging/Session.h> | |
#include <vector> | |
#include <string> | |
#include <iostream> | |
#include <sstream> |
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
<template> | |
<div class="field">Test: ${myattr}</div> | |
</template> |
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
<template> | |
<div id="details" class="ui small modal"> | |
<div class="header"> | |
<h4>${heading}</h4> | |
</div> | |
<div class="content"> | |
<div class="description"> | |
<compose view-model.bind="content" model.bind="record"></compose> | |
</div> | |
</div> |
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
function doSomething(options) { | |
var someThinkyModel; | |
if (!!options.someOption) someThinkyModel.orderBy('blah'); | |
if (!!options.someOtherOption) someThinkyModel.slice(3, 5); | |
return someThinkyModel.run(); | |
} |