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
package activemq.test; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.Map; | |
import org.apache.activemq.api.core.TransportConfiguration; | |
import org.apache.activemq.core.config.Configuration; | |
import org.apache.activemq.core.config.impl.ConfigurationImpl; | |
import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; |
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
java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory | |
# use the following property to configure the default connector | |
java.naming.provider.url = tcp://localhost:61616 | |
# register some topics in JNDI using the form | |
# topic.[jndiName] = [physicalName] | |
topic.MyTopic = example.MyTopic |
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 java.text.SimpleDateFormat; | |
import java.util.Date; | |
import org.apache.activemq.ActiveMQConnectionFactory; | |
import javax.jms.Connection; | |
import javax.jms.DeliveryMode; | |
import javax.jms.JMSException; | |
import javax.jms.Message; | |
import javax.jms.MessageListener; |
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
let diff = require('immutablediff'); | |
shouldComponentUpdate(nextProps, nextState) { | |
let propsDiff = diff(this.props.data, nextProps.data); | |
if (propsDiff.size === 1) { | |
let operation = propsDiff.get(0).get("op"); | |
let replacedObj = propsDiff.get(0).get("value"); | |
switch (operation) { | |
case "replace": | |
if (Immutable.Map.isMap(replacedObj)) { |
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 webpack = require('webpack'); | |
var merge = require('webpack-merge'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
var NpmInstallPlugin = require('npm-install-webpack-plugin'); | |
var autoprefixer = require('autoprefixer'); | |
const TARGET = process.env.npm_lifecycle_event; | |
console.log("target event is " + TARGET); | |
var common = { |
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
{ | |
"image": { | |
"color": "#BFBFBF", | |
"width": 36, | |
"height": 36 | |
}, | |
"paths": { | |
"svg_sprite": "./src/icons.svg" | |
} | |
} |
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 fs = require('fs'); | |
var DOMParser = require('xmldom').DOMParser; | |
var timestamp = require('console-timestamp'); | |
var config = require('./config.json'); | |
// open svg sprite file | |
fs.readFile(config.paths.svg_sprite, 'utf8', function (err, data) { | |
if (err) { | |
return console.log(timestamp('[hh:mm:ss] ') + "Read file " + config.paths.svg_sprite + " error: " + err); | |
} |
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 gulp = require('gulp'); | |
var config = require('./config.json'); | |
var del = require('del'); | |
var svg2png = require('gulp-svg2png'); | |
var graphicsmagick = require('gulp-gm'); | |
... | |
gulp.src("./build/svg_files_" + colorName + "/*.svg") | |
.pipe(svg2png()) | |
.pipe(gulp.dest("./build/png_files_" + colorName)) |
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
/** | |
* Flatten nested array | |
* @param {Array} array Nested array | |
* @return {Array} Flat array | |
*/ | |
function flatten(array) { | |
return array.reduce(function (flat, toFlatten) { | |
// if current item is array flatten it, otherwise concatenate value to processed flat array | |
return flat.concat(Array.isArray(toFlatten) ? flatten(toFlatten) : toFlatten); | |
}, []); |
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
{ | |
"env": { | |
"browser": true, | |
"node": true, | |
"es6": true | |
}, | |
"plugins": ["react"], | |
"ecmaFeatures": { |