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
{ | |
"@context": "/api/contexts/Assessment", | |
"@id": "/api/assessments/1161937", | |
"@type": "Assessment", | |
"id": "1161937", | |
"createdAt": "2017-10-04T19:08:36+00:00", | |
"updatedAt": "2017-10-04T19:08:36+00:00", | |
"completedAt": null, | |
"productConfiguration": { | |
"@id": "/api/product_configurations/101", |
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
{ | |
modules: { | |
account: ["canChangePassword", "canUpdateProfile", "canDeleteUser", "..."], | |
projects: ["canCreate", "...."], | |
teams: [...], | |
messages: [...], | |
Analytics: [...], | |
Other: [..], | |
} | |
teams: { |
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
export const SitiosTaxi = [ | |
{ | |
name: 'Teatro de los Jaguares', | |
latlong: {latitude: 19.28992168, longitude: -99.04402069}, | |
}, | |
{ | |
name: 'Mariano Matamóros', | |
latlong: {latitude: 19.290299, longitude: -99.056436}, | |
}, | |
{ |
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
export const Rutas = [ | |
{ | |
id: 1, | |
name: 'Ruta 1', | |
options: [ | |
{ | |
bicycle: [ | |
{ | |
latitude: 19.289856, | |
longitude: -99.046576, |
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
itemcontextmenu: function(tree, record, item, index, e, eOpts) { | |
// Optimize : create menu once | |
var position = e.getXY(); | |
var menu_grid = new Ext.menu.Menu({ | |
items: [{ | |
text: 'More details', | |
handler: function() { | |
console.log("Moreils"); | |
} | |
}] |
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
/** | |
* Flattens an array of integers like [[1,2,[3]],4] -> [1,2,3,4]. | |
* @param {array} inputArray The array of integers and/or array of integers. | |
* @returns {array} Flatten array. | |
*/ | |
function arrayFlatten(inputArray) { | |
const arrayOfStrings = inputArray.join(',').split(','); | |
return arrayOfStrings.map(x => parseInt(x, 10)); | |
} | |
// test arrayFlatten |
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
TemperatureModule.prototype.when = function(event, callback, value) { // 'medir', callback | |
temp.on('Measurement',(_value)=>{ | |
if(value === _value) { | |
callback(); | |
//lcd.home(); | |
//lcd.message("Temp [C]: " + _value.toFixed(2)); | |
} | |
}); | |
} |
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
temperature.on('medir', function () { | |
led.turnOn(); | |
}, 23); | |
light.on('medir', function () { | |
ledRGB1.turnOn('#FF0000'); | |
}, 12); | |
humidity.on('medir', function () { | |
ledRGB2.blink('#00FF00'); | |
}, 12); | |
distance.on('medir', function () { |
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
{ | |
xtype : 'component', | |
cls : 'data', | |
itemId: 'observationSummary', | |
tpl :[ | |
'<span class="prop">TopBox ID:</span><span class="value">{version}</span>', | |
'<tpl if="false">', | |
'<span class="prop js-pkey-label pkey">{pkeyLabel}:</span><span class="value js-pkey-value">{pkey}</span>', | |
'</tpl>', | |
'<span class="prop">Agent:</span><span class="value">{agent}</span>' |