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
package aggregate | |
import "go.mongodb.org/mongo-driver/bson" | |
type Operation bson.M | |
// The Pipe functions similar to the RxJS pipe function | |
// (https://rxjs-dev.firebaseapp.com/api/index/function/pipe) in that | |
// it accepts a set of functions as parameters. Each function receives | |
// as its input, the output of the previous function. The allows you |
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
package util | |
// Accepts a slice of strings and returns a slice of slices of strings where each child slices's length | |
// is the length of the batchSize | |
func StringBatch(size int, s []string) [][]string { | |
var b [][]string | |
for size < len(s) { | |
s, b = s[size:], append(b, s[0:size:size]) | |
} | |
b = append(b, s) |
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
public async getModuleVersions(modulePrefix: string): Promise<any> { | |
try { | |
let fileExtension: string; | |
let moduleLocation: string; | |
switch (modulePrefix) { | |
case 'module1': | |
fileExtension = 'exe'; | |
moduleLocation = ''; | |
break; |
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
const myMeterRead = new MeterRead({ | |
'reportDtTm' : null, | |
'pageCounts' : { | |
'equiv' : { | |
'total' : { | |
'displayName' : 'Total', | |
'value' : 6660 | |
}, | |
'totalBlack' : { | |
'displayName' : 'Total Black', |
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
/** | |
* Creates a new instance of the iot.device class that we can connect to and listen on | |
* @private | |
* @type {*} | |
* @memberof Device | |
*/ | |
private _device: any = iot.device({ | |
keyPath: __dirname + "device.private.key", | |
certPath: __dirname + "device.cert.pem", | |
caPath: __dirname + "root-CA.crt", // https://www.amazontrust.com/repository/AmazonRootCA1.pem |
NewerOlder