spawnRiders: function spawnRiders(numberOfRiders) { var i = 0, parent = this; for (i; i < numberOfRiders; i++) { var point = { latitude: chance.latitude({ min: this.bounds._sw.lat, max: this.bounds._ne.lat, }), longitude: chance.longitude({ min: this.bounds._sw.lng, max: this.bounds._ne.lng, }) }; this.mapboxClient.getDirections([point, point], function (err, res) { parent.riders.push(rider( [res.origin.geometry.coordinates[0], res.origin.geometry.coordinates[1]], chance.guid(), names.getRandomName())); }); } },
event.message.ip_src_port, event.message.ip_dst_port, ].join('-') } }; } for (var i = 0; i < numEnrichedMachines; i++) { inventory.push({ ip: chance.ip(), geo: { country: 'US', dmaCode: chance.integer({min: 500, max: 700}), city: chance.city(), postalCode: chance.zip(), latitude: chance.latitude({fixed: 4}), longitude: chance.longitude({fixed: 4}), locID: chance.integer({min: 10000, max: 30000}) }, host: { known_info: { asset_value: choice(assetValues), type: choice(assetTypes), local: choice(['YES', 'NO']) } } }); } for (var i = 0; i < numOtherMachines; i++) { inventory.push({ip: chance.ip()});
"id" : "https://vozniuk.com/xapi/adl/verbs/mentioned", "display" : {"en-US" : "mentioned"} } }; var xAPIVerbsArray = _.keys(xAPIVerbsObj); // we need an array for predefined order // Build an array of realistic locations and IPs var locations = []; for (var i = 0; i < locationsCount; i++) { var newLocation = { ipAddress : chance.ip(), location : { lon: chance.longitude(), lat: chance.latitude() }, city : chance.city(), countryCode : chance.country(), countryName : chance.country({ full: true }) } locations.push(newLocation); } // Generate an array of objects (maybe using existing items as a basis) var objects = []; for (var i = 0; i < objectsCount; i++) { var newObj = {