#Javascript execution-context
####References Name_conflicts
Really nice documentation about the execution context in JavaScript
###Activation Object
package main | |
import ( | |
"fmt" | |
) | |
func GetStructField(f interface{},path []string) interface{} { | |
rangeOver := f.( map[string]interface{}) | |
counter := 0 | |
maxLen := len(path)-1 |
#Javascript execution-context
####References Name_conflicts
Really nice documentation about the execution context in JavaScript
###Activation Object
package main | |
import ( | |
"fmt" | |
"reflect" | |
"strconv" | |
) |
var c int = 1 | |
intSlice := []int{100, 1, 2, 3, 4} | |
newSlice := intSlice[c:] | |
fmt.Printf("Points to the Slice %p\n",&intSlice) //0xc20005d020 | |
fmt.Printf("Points to the first Element of the underlying Array: %d\n",&intSlice[0]) //833223995872 | |
/* ----------------------------Transaction Builder------------------------------- | |
Spec: https://github.com/orientechnologies/orientdb/wiki/SQL-batch | |
- Bluebird promise library | |
EXAMPLE: | |
var tx = new Transaction(); | |
var s0 = tx.add(query1); | |
var s1 = tx.add(query2); //In query2 you can use the result of query1 with $0 ($<index>) |
var nats = require('../lib/nats').connect(); | |
/////////////////////////////////////// | |
// Publish Performance | |
// | |
// Setup: | |
// NodeJs: 6.9.2, Windows 10 | |
/////////////////////////////////////// |
var nc1 = require('../lib/nats').connect(); | |
var nc2 = require('../lib/nats').connect(); | |
var os = require('os') | |
/////////////////////////////////////// | |
// Request Performance | |
/////////////////////////////////////// | |
var start; | |
var loop = 100000; | |
var hash = 1000; |
// ************************************ | |
// ***** bundle-writer-example.js ***** | |
//************************************* | |
var myWriter = require('./bundle-writer'); | |
module.exports = function (myLasso, pluginConfig) { | |
myLasso.config.writer = myWriter(pluginConfig, myLasso.config); | |
}; | |
// **************************** |
/** | |
* Created by s.neidig on 15/03/17. | |
*/ | |
const Hemera = require('nats-hemera'); | |
const nats = require('nats'); | |
const HemeraJoi = require('hemera-joi'); | |
const connection = nats.connect('nats://0.0.0.0:4222'); | |
const hemera = new Hemera(connection, { |
'use strict' | |
const Hapi = require('hapi') | |
const server = new Hapi.Server() | |
server.connection({ port: 80 }) | |
server.register({ | |
register: require('hapi-hemera'), | |
options: { |