Skip to content

Instantly share code, notes, and snippets.

View WesleyE's full-sized avatar

Wesley Elfring WesleyE

View GitHub Profile
@WesleyE
WesleyE / download.js
Created December 9, 2019 12:35
Download ArcGis Features from Server
var fs = require('fs');
const https = require('https');
var offset = 0;
var rowsPerFetch = 2000;
var totalRows = 459701;
var fetches = Math.ceil(totalRows / rowsPerFetch);
var offsetIterator = 0;
function getDownloadUrl(offset) {
@WesleyE
WesleyE / HysteresisController.js
Created January 22, 2020 15:59
HysteresisController
class HysteresisController {
/**
*
* @param {Object} options Options array
* @param {Function} onChange Function to call when the state should change
*/
constructor(options, onChange) {
this.targetTemperature = options.targetTemperature;
this.min = options.min;