text:
package org.apache.lucene.sandbox.queries.regex;

import org.apache.lucene.util.BytesRef;

/**
 * Defines basic operations needed by {@link RegexQuery} for a regular
 * expression implementation.
 * @deprecated Use core's regex query.
 */
@Deprecated
public interface RegexCapabilities {
  /**
   * Called by the constructor of {@link RegexTermsEnum} allowing
   * implementations to cache a compiled version of the regular
   * expression pattern.
   *
   * @param pattern regular expression pattern
   */
  public RegexMatcher compile(String pattern);

  /**
   * Interface for basic regex matching.
   *

   * Implementations return true for {@link #match} if the term
   * matches the regex.
   *

   * Implementing {@link #prefix()} can restrict the TermsEnum to only
   * a subset of terms when the regular expression matches a constant
   * prefix.
   *

   * NOTE: implementations cannot seek.
   * @deprecated Use core's regex query.
   */
  @Deprecated
  public interface RegexMatcher {
    /**
     *
     * @param term The term in bytes.
     * @return true if string matches the pattern last passed to {@link #compile}.
     */
    public boolean match(BytesRef term);

    /**
     * A wise prefix implementation can reduce the term enumeration (and thus increase performance)
     * of RegexQuery dramatically!
     *
     * @return static non-regex prefix of the pattern last passed to {@link #compile}.  May return null.
     */
    public String prefix();
  }
}


text:
package io.agrest;

import io.agrest.constraints.Constraint;
import io.agrest.encoder.Encoder;
import io.agrest.meta.AgEntityOverlay;
import io.agrest.processor.Processor;
import io.agrest.processor.ProcessorOutcome;
import io.agrest.runtime.AgBuilder;
import io.agrest.runtime.processor.select.SelectContext;
import org.apache.cayenne.exp.Property;

import javax.ws.rs.core.UriInfo;
import java.util.Collection;
import java.util.Map;
import java.util.function.Consumer;

/**
 * An object that allows to customize/extend Agrest request processing.
 * SelectBuilder instance is bootstrapped by the framework based on a user query
 * or a root entity and then configured by the user server-side code to achieve
 * the desired behavior. Finally {@link #get()} is called to get the results.
 */
public interface SelectBuilder<T> {

    /**
     * Sets request {@link UriInfo} that is a source of various request
     * parameters.
     *
     * @since 1.14
     */
    SelectBuilder<T> uri(UriInfo uriInfo);

    /**
     * Sets the encoder for the entities under the "data" key in the response
     * collection.
     *
     * @since 1.14
     */
    SelectBuilder<T> dataEncoder(Encoder encoder);

    /**
     * Forces the builder to select a single object by ID.
     */
    SelectBuilder<T> byId(Object id);

    /**
     * Forces the builder to select a single object by compound ID.
     *
     * @since 1.20
     */
    SelectBuilder<T> byId(Map<String, Object> ids);

    /**
     * Adds a custom property that is appended to the root {@link ResourceEntity}.
     *
     * @see AgBuilder#entityOverlay(AgEntityOverlay)
     * @since 1.14
     */
    SelectBuilder<T> property(String name, EntityProperty clientProperty);

    /**
     * Adds a custom property that is appended to the root
     * {@link ResourceEntity}. Property is read as a regular JavaBean
     * "property", and default encoder is used. For more control over property
     * access and encoding use {@link #property(String, EntityProperty)}.
     *
     * @see AgBuilder#entityOverlay(AgEntityOverlay)
     * @since 1.14
     */
    SelectBuilder<T> property(String name);

    /**
     * Installs an optional constraint function defining how much of the request entity attributes / relationships
     * the client can see.
     *
     * @param constraint an instance of Constraint function.
     * @return this builder instance.
     * @since 2.4
     */
    SelectBuilder<T> constraint(Constraint<T> constraint);

    /**
     * @since 1.4
     */
    SelectBuilder<T> parent(Class<?> parentType, Object parentId, String relationshipFromParent);

    /**
     * @since 1.20
     */
    SelectBuilder<T> parent(Class<?> parentType, Map<String, Object> parentIds, String relationshipFromParent);

    /**
     * @since 1.4
     */
    SelectBuilder<T> parent(Class<?> parentType, Object parentId, Property<T> relationshipFromParent);

    /**
     * @since 1.20
     */
    SelectBuilder<T> parent(Class<?> parentType, Map<String, Object> parentIds, Property<T> relationshipFromParent);

    /**
     * @since 1.7
     */
    SelectBuilder<T> parent(EntityParent<?> parent);

    /**
     * @since 1.7
     */
    SelectBuilder<T> toManyParent(Class<?> parentType, Object parentId,
                                  Property<? extends Collection<T>> relationshipFromParent);

    /**
     * @since 1.20
     */
    SelectBuilder<T> toManyParent(Class<?> parentType, Map<String, Object> parentIds,
                                  Property<? extends Collection<T>> relationshipFromParent);

    /**
     * @since 1.2
     */
    SelectBuilder<T> fetchOffset(int offset);

    /**
     * @since 1.2
     */
    SelectBuilder<T> fetchLimit(int limit);

    /**
     * Registers a consumer to be executed after a specified standard execution stage. The consumer can inspect and
     * modify provided {@link SelectContext}.
     *
This operation is composable. For each stage all custom processors will be invoked in the order they were
     * registered.

     *
     * @param afterStage  A name of the standard stage after which the inserted stage needs to be run.
     * @param customStage a callback to invoke at a specific point during select execution.
     * @return this builder instance.
     * @since 2.7
     */
    default  SelectBuilder<T> stage(SelectStage afterStage, Consumer<SelectContext> customStage) {
        return routingStage(afterStage, (SelectContext c) -> {
            customStage.accept(c);
            return ProcessorOutcome.CONTINUE;
        });
    }

    /**
     * Registers a consumer to be executed after the specified standard execution stage. The rest of the standard pipeline
     * following the named stage will be skipped. This is useful for quick assembly of custom backends that reuse the
     * initial stages of Agrest processing, but query the data store on their own. The consumer can inspect and modify
     * provided {@link SelectContext}.
     *
This operation is composable. For each stage all custom processors will be invoked in the order they were
     * registered.

     *
     * @param afterStage          A name of the standard stage after which the inserted stage needs to be run.
     * @param customTerminalStage a consumer that will be invoked after 'afterStage', and will be the last piece of
     *                            code executed in the select pipeline.
     * @return this builder instance.
     * @since 2.7
     */
    default  SelectBuilder<T> terminalStage(SelectStage afterStage, Consumer<SelectContext> customTerminalStage) {
        return routingStage(afterStage, (SelectContext c) -> {
            customTerminalStage.accept(c);
            return ProcessorOutcome.STOP;
        });
    }

    /**
     * Registers a processor to be executed after the specified standard execution stage. The processor can inspect and
     * modify provided {@link SelectContext}. When finished, processor can either pass control to the next stage by returning
     * {@link ProcessorOutcome#CONTINUE}, or terminate the pipeline by returning
     * {@link ProcessorOutcome#STOP}.
     *
This operation is composable. For each stage all custom processors will be invoked in the order they were
     * registered.

     *
     * @param afterStage  A name of the standard stage after which the inserted stage needs to be run.
     * @param customStage a processor to invoke at a specific point during select execution.
     * @return this builder instance.
     * @since 2.7
     */
     SelectBuilder<T> routingStage(SelectStage afterStage, Processor<SelectContext> customStage);

    /**
     * Runs the query corresponding to the state of this builder, returning
     * a response that can be serialized by the framework.
     *
     * @since 2.4
     */
    DataResponse<T> get();

    /**
     * Runs the query corresponding to the state of this builder, returning
     * response that can be serialized by the framework. The difference with
     * {@link #get()} is that the framework ensures that one and only one
     * record is returned in response. Zero records result in 404 response, 2 or
     * more records - in 500 response.
     *

     * Note that "by id" selects are routing to "selectOne" internally even if
     * query is invoked as "select". This is for backwards compatibility with
     * 1.1. Should change that eventually.
     *
     * @since 1.2
     */
    DataResponse<T> getOne();

    /**
     * Forces the builder to make selection using explicit query parameters encapsulated in AgRequest.
     * These explicit parameters overwrite query parameters from UriInfo object.
     *
     *
{@code
     *
     * 		public DataResponse<E2> getE2(@Context UriInfo uriInfo, @QueryParam CayenneExp cayenneExp) {
     * 			// Explicit query parameter
     * 			AgRequest agRequest = AgRequest.builder().cayenneExp(cayenneExp).build();
     *
     * 			return Ag.service(config).select(E2.class)
     * 							.uri(uriInfo)
     * 							.request(agRequest) // overrides parameters from uriInfo
     * 							.get();
     * 		}
     *
     * }

     *
     * @param agRequest an instance of AgRequest that holds all explicit query parameters.
     * @return this builder instance.
     * @since 2.13
     */
    SelectBuilder<T> request(AgRequest agRequest);
}

redpajama_set_name: RedPajamaGithub


text:
<?php

Route::get('/', function()
{
	//$tweets = Twitter::getUserTimeline(array('screen_name' => 'thujohn', 'count' => 20, 'format' => 'json'));
	if(Cache::has('hello')){
		$hello = Cache::get('hello');
	}else{
		$hello = View::make('hello', compact($tweets))->render();
		Cache::put('hello', $hello, 60);
	}
	echo $hello;
	//echo Form::captcha();
});

Route::get('/utils/env', function()
{
	echo View::make('utils.env');
});

Route::get('/utils/apc', function()
{
	echo View::make('utils.apc');
});

Route::get('/utils/memcache', function()
{
	echo View::make('utils.memcache');
});

Route::get('elfinder', 'Barryvdh\Elfinder\ElfinderController@showIndex');
Route::any('elfinder/connector', 'Barryvdh\Elfinder\ElfinderController@showConnector');
Route::get('elfinder/tinymce', 'Barryvdh\Elfinder\ElfinderController@showTinyMCE4');


text:
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

/* global AFRAME */

if (typeof AFRAME === 'undefined') {
  throw new Error('Component attempted to register before AFRAME was available.');
}

__webpack_require__(1);
__webpack_require__(6);

AFRAME.currentInputMapping = null;
AFRAME.inputMappings = {};
AFRAME.inputActions = {};

var behaviour = {
  trackpad: 'dpad'
};

AFRAME.registerSystem('input-mapping', {
  mappings: {},
  mappingsPerControllers: {},
  loadedControllers: [],

  init: function init() {
    var self = this;

    this.keyboardHandler = this.keyboardHandler.bind(this);

    this.sceneEl.addEventListener('inputmappingregistered', function () {
      self.removeControllersListeners();
      for (var i = 0; i < self.loadedControllers.length; i++) {
        var controllerObj = self.loadedControllers[i];
        self.updateControllersListeners(controllerObj);
      }
    });

    // Controllers
    this.sceneEl.addEventListener('controllerconnected', function (event) {
      var matchedController = self.findMatchingController(event.target);

      if (matchedController) {
        self.updateControllersListeners(matchedController);
        return;
      }

      var controllerObj = {
        name: event.detail.name,
        hand: event.detail.component.data.hand,
        element: event.target,
        handlers: {},
        activators: {}
      };
      self.loadedControllers.push(controllerObj);

      self.updateControllersListeners(controllerObj);
    });

    this.sceneEl.addEventListener('controllerdisconnected', function (event) {
      var controller = self.findMatchingController(event.target);
      if (controller) {
        self.removeControllerListeners(controller);
      }
    });

    // Keyboard
    this.addKeyboardListeners();
  },

  findMatchingController: function findMatchingController(matchElement) {
    var controller;
    var i;
    for (i = 0; i < this.loadedControllers.length; i++) {
      controller = this.loadedControllers[i];
      if (controller.element === matchElement) {
        return controller;
      }
    }
    return undefined;
  },

  addKeyboardListeners: function addKeyboardListeners() {
    document.addEventListener('keyup', this.keyboardHandler);
    document.addEventListener('keydown', this.keyboardHandler);
    document.addEventListener('keypress', this.keyboardHandler);
  },

  removeKeyboardListeners: function removeKeyboardListeners() {
    document.removeEventListener('keyup', this.keyboardHandler);
    document.removeEventListener('keydown', this.keyboardHandler);
    document.removeEventListener('keypress', this.keyboardHandler);
  },

  removeControllerListeners: function removeControllerListeners(controller) {
    // Remove events handlers
    for (var eventName in controller.handlers) {
      var handler = controller.handlers[eventName];
      controller.element.removeEventListener(eventName, handler);
    }
    controller.handlers = {};

    // Remove activators
    for (var activatorName in controller.activators) {
      var activator = controller.activators[activatorName];
      activator.removeListeners();
    }

    controller.activators = {};
  },

  updateBehaviours: function updateBehaviours(controllerObj) {
    var controllerBehaviour = AFRAME.inputBehaviours[controllerObj.name];
    var behavioursPerController = this.mappingsPerControllers[controllerObj.name].behaviours;
    if (!behavioursPerController) {
      return;
    }
    for (var button in behavioursPerController) {
      var behaviourName = behavioursPerController[button];
      var behaviourDefinition = AFRAME.inputBehaviours[behaviourName];
      if (behaviourDefinition) {
        var behaviour = new behaviourDefinition(controllerObj.element, button);
      }
    }
  },

  updateControllersListeners: function updateControllersListeners(controllerObj) {
    this.removeControllerListeners(controllerObj);

    if (!AFRAME.inputMappings) {
      console.warn('input-mapping: No mappings defined');
      return;
    }

    var mappingsPerController = this.mappingsPerControllers[controllerObj.name] = {
      mappings: {},
      behaviours: {}
    };

    // Create the listener for each event
    for (var mappingName in AFRAME.inputMappings.mappings) {
      var mapping = AFRAME.inputMappings.mappings[mappingName];

      var commonMappings = mapping.common;
      if (commonMappings) {
        this.updateMappingsPerController(commonMappings, mappingsPerController, mappingName);
      }

      var controllerMappings = mapping[controllerObj.name];
      if (controllerMappings) {
        this.updateMappingsPerController(controllerMappings, mappingsPerController, mappingName);
      } else {
        console.warn('input-mapping: No mappings defined for controller type: ', controllerObj.name);
      }
    }

    // Mapping the behaviours
    for (var mappingName in AFRAME.inputMappings.behaviours) {
      var behaviour = AFRAME.inputMappings.behaviours[mappingName];

      var controllerBehaviours = behaviour[controllerObj.name];
      if (controllerBehaviours) {
        this.updateBehavioursPerController(controllerBehaviours, mappingsPerController, mappingName);
      }
    }

    var self = this;

    var OnActivate = function OnActivate(eventName) {
      return function (event) {
        var mapping = mappingsPerController.mappings[eventName];
        var mappedEvent = mapping[AFRAME.currentInputMapping];
        if ((typeof mappedEvent === 'undefined' ? 'undefined' : _typeof(mappedEvent)) === 'object') {
          // Handedness
          var controller = self.findMatchingController(event.target);
          mappedEvent = mappedEvent[controller.hand];
          if (!mappedEvent) {
            return;
          }
        }
        event.target.emit(mappedEvent, event.detail);
      };
    };

    for (var eventName in mappingsPerController.mappings) {
      // Check for activators
      if (eventName.indexOf('.') !== -1) {
        var aux = eventName.split('.');
        var button = aux[0]; // eg: trackpad
        var activatorName = aux[1]; // eg: doublepress
        var onActivate = OnActivate(eventName);
        var Activator = AFRAME.inputActivators[activatorName];
        controllerObj.activators[eventName] = new Activator(controllerObj.element, button, onActivate);
      }

      var onActivate = OnActivate(eventName);
      controllerObj.element.addEventListener(eventName, onActivate);
      controllerObj.handlers[eventName] = onActivate;
    }

    this.updateBehaviours(controllerObj);
  },

  checkValidInputMapping: function checkValidInputMapping() {
    if (AFRAME.currentInputMapping === null) {
      console.warn('input-mapping: No current input mapping defined.');
    }
  },

  keyboardHandler: function keyboardHandler(event) {
    this.checkValidInputMapping();
    if (AFRAME.inputMappings && AFRAME.inputMappings.mappings[AFRAME.currentInputMapping] && AFRAME.inputMappings.mappings[AFRAME.currentInputMapping].keyboard) {
      var currentKeyboardMapping = AFRAME.inputMappings.mappings[AFRAME.currentInputMapping].keyboard;
      var key = event.keyCode === 32 ? "Space" : event.key;
      var keyEvent = (key + "_" + event.type.substr(3)).toLowerCase();
      var mapEvent = currentKeyboardMapping[keyEvent];
      if (mapEvent) {
        this.sceneEl.emit(mapEvent);
      }
    }
  },

  updateBehavioursPerController: function updateBehavioursPerController(behaviours, mappingsPerController, mappingName) {
    for (var button in behaviours) {
      var behaviour = behaviours[button];

      if (!mappingsPerController.behaviours[button]) {
        mappingsPerController.behaviours[button] = behaviour;
      }
    }
  },

  updateMappingsPerController: function updateMappingsPerController(mappings, mappingsPerController, mappingName) {
    // Generate a mapping for each controller: (Eg: vive-controls.triggerdown.default.paint)
    for (var eventName in mappings) {
      var mapping = mappings[eventName];
      if (!mappingsPerController.mappings[eventName]) {
        mappingsPerController.mappings[eventName] = {};
      }
      mappingsPerController.mappings[eventName][mappingName] = mapping;
    }
  },

  removeControllersListeners: function removeControllersListeners() {
    for (var i = 0; i < this.loadedControllers.length; i++) {
      var controller = this.loadedControllers[i];
      this.removeControllerListeners(controller);
    }
    this.mappingsPerControllers = {
      mappings: {},
      behaviours: {}
    };
  }
});

AFRAME.registerInputActions = function (inputActions, defaultActionSet) {
  AFRAME.inputActions = inputActions;
  if (typeof defaultActionSet !== 'undefined') {
    if (AFRAME.inputActions[defaultActionSet]) {
      AFRAME.currentInputMapping = defaultActionSet;
    } else {
      console.error('input-mapping: trying to set a non registered action set \'' + defaultActionSet + '\'');
    }
  }
};

AFRAME.registerInputMappings = function (data, override) {
  if (override || Object.keys(AFRAME.inputMappings).length === 0) {
    AFRAME.inputMappings = data;
  } else {
    // @todo Merge behaviours too
    AFRAME.inputMappings.behaviours = data.behaviours;

    // Merge mappings
    for (var mappingName in data.mappings) {
      var mapping = data.mappings[mappingName];
      if (!AFRAME.inputMappings[mappingName]) {
        AFRAME.inputMappings[mappingName] = mapping;
        continue;
      }

      for (var controllerName in mapping) {
        var controllerMapping = mapping[controllerName];
        if (!AFRAME.inputMappings[mappingName][controllerName]) {
          AFRAME.inputMappings[mappingName][controllerName] = controllerMapping;
          continue;
        }

        for (var eventName in controllerMapping) {
          AFRAME.inputMappings[mappingName][controllerName][eventName] = controllerMapping[eventName];
        }
      }
    }
  }

  if (!AFRAME.scenes) {
    return;
  }

  for (var i = 0; i < AFRAME.scenes.length; i++) {
    AFRAME.scenes[i].emit('inputmappingregistered');
  }
};

/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

AFRAME.inputActivators = {};

AFRAME.registerInputActivator = function (name, definition) {
  AFRAME.inputActivators[name] = definition;
};

__webpack_require__(2);
__webpack_require__(3);
__webpack_require__(4);
__webpack_require__(5);

/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

function LongPress(el, button, onActivate) {
  this.lastTime = 0;
  this.timeOut = 250;
  this.eventNameDown = button + 'down';
  this.eventNameUp = button + 'up';

  this.el = el;
  this.onActivate = onActivate;

  this.onButtonDown = this.onButtonDown.bind(this);
  this.onButtonUp = this.onButtonUp.bind(this);

  el.addEventListener(this.eventNameDown, this.onButtonDown);
  el.addEventListener(this.eventNameUp, this.onButtonUp);
}

LongPress.prototype = {
  onButtonDown: function onButtonDown(event) {
    var self = this;
    this.pressTimer = window.setTimeout(function () {
      self.onActivate(event);
    }, 1000);
  },
  onButtonUp: function onButtonUp(event) {
    clearTimeout(this.pressTimer);
  },
  removeListeners: function removeListeners() {
    this.el.removeEventListener(this.eventNameDown, this.onButtonDown);
    this.el.removeEventListener(this.eventNameUp, this.onButtonUp);
  }
};

AFRAME.registerInputActivator('longpress', LongPress);

/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

function DoubleTouch(el, button, onActivate) {
  this.lastTime = 0;
  this.timeOut = 250;
  this.eventName = button + 'touchstart';
  this.el = el;
  this.onActivate = onActivate;

  this.onButtonDown = this.onButtonDown.bind(this);

  el.addEventListener(this.eventName, this.onButtonDown);
}

DoubleTouch.prototype = {
  onButtonDown: function onButtonDown(event) {
    var time = performance.now();
    if (time - this.lastTime < this.timeOut) {
      this.onActivate(event);
    } else {
      this.lastTime = time;
    }
  },
  removeListeners: function removeListeners() {
    this.el.removeEventListener(this.eventName, this.onButtonDown);
  }
};

AFRAME.registerInputActivator('doubletouch', DoubleTouch);

/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

function DoublePress(el, button, onActivate) {
  this.lastTime = 0;
  this.timeOut = 250;
  this.eventName = button + 'down';
  this.el = el;
  this.onActivate = onActivate;

  this.onButtonDown = this.onButtonDown.bind(this);

  el.addEventListener(this.eventName, this.onButtonDown);
}

DoublePress.prototype = {
  onButtonDown: function onButtonDown(event) {
    var time = performance.now();
    if (time - this.lastTime < this.timeOut) {
      this.onActivate(event);
    } else {
      this.lastTime = time;
    }
  },
  removeListeners: function removeListeners() {
    this.el.removeEventListener(this.eventName, this.onButtonDown);
  }
};

AFRAME.registerInputActivator('doublepress', DoublePress);

/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

function createSimpleActivator(suffix) {
  return function (el, button, onActivate) {
    el.addEventListener(button + suffix, onActivate);
  };
}

AFRAME.registerInputActivator('down', createSimpleActivator('down'));
AFRAME.registerInputActivator('up', createSimpleActivator('up'));
AFRAME.registerInputActivator('touchstart', createSimpleActivator('touchstart'));
AFRAME.registerInputActivator('touchend', createSimpleActivator('touchend'));

/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

AFRAME.inputBehaviours = {};

AFRAME.registerInputBehaviour = function (name, definition) {
  AFRAME.inputBehaviours[name] = definition;
};

__webpack_require__(7);

/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();

function DPad(el, buttonName) {
  this.buttonName = buttonName;
  this.onButtonPresed = this.onButtonPresed.bind(this);
  this.onAxisMove = this.onAxisMove.bind(this);
  el.addEventListener('trackpaddown', this.onButtonPresed);
  el.addEventListener('trackpadup', this.onButtonPresed);
  el.addEventListener('axismove', this.onAxisMove);
  this.lastPos = [0, 0];
  this.el = el;
};

DPad.prototype = {
  onAxisMove: function onAxisMove(event) {
    this.lastPos = event.detail.axis;
  },

  onButtonPresed: function onButtonPresed(event) {
    var _lastPos = _slicedToArray(this.lastPos, 2),
        x = _lastPos[0],
        y = _lastPos[1];

    var state = 'trackpadup'.includes(event.type) ? "up" : "down";
    var centerZone = 0.5;
    var direction = state === "up" && this.lastDirection // Always trigger the up event for the last down event
    ? this.lastDirection : x * x + y * y < centerZone * centerZone // If within center zone angle does not matter
    ? "center" : angleToDirection(Math.atan2(x, y));

    this.el.emit(this.buttonName + 'dpad' + direction + state);

    if (state === "down") {
      this.lastDirection = direction;
    } else {
      delete this.lastDirection;
    }
  },

  removeListeners: function removeListeners() {
    el.removeEventListener('trackpaddown', this.onButtonPresed);
    el.removeEventListener('trackpadup', this.onButtonPresed);
    el.removeEventListener('axismove', this.onAxisMove);
  }
};

var angleToDirection = function angleToDirection(angle) {
  angle = (angle * THREE.Math.RAD2DEG + 180 + 45) % 360;
  if (angle > 0 && angle < 90) {
    return "down";
  } else if (angle >= 90 && angle < 180) {
    return "left";
  } else if (angle >= 180 && angle < 270) {
    return "up";
  } else {
    return "right";
  }
};

AFRAME.registerInputBehaviour('dpad', DPad);

/***/ })
/******/ ]);


text:
namespace Ab::Edn::Test {

TEST(edn_symbol_table, not_interned) {
	SymbolTable table;
	EXPECT_FALSE(table.interned("test"));
}

TEST(edn_symbol_table, intern) {
	SymbolTable table;
	auto id = table.intern("test");
	EXPECT_TRUE(table.interned("test"));
	EXPECT_EQ(table.intern("test"), id);
	EXPECT_EQ(table.intern("test"), id);
	EXPECT_EQ(table.string(id), "test");
}

TEST(edn_nil, comparison) {
	auto nil = node_nil();
	EXPECT_EQ(*nil, *nil);
	EXPECT_FALSE(*nil != *nil);
	EXPECT_TRUE(node_eq(*nil, *nil));
}

TEST(edn_nil, reproducible_hash) {
	auto nil0 = node_nil();
	auto nil1 = node_nil();
	EXPECT_EQ(nil0->hash(), nil1->hash());
}

TEST(edn_integer, compare_with_self) {
	for (auto x : std::vector<std::intptr_t>{0, 1, 2, -1, 100}) {
		auto node = node_integer(x);
		EXPECT_EQ(node->value(), x);
		EXPECT_EQ(*node, *node);
		EXPECT_TRUE(node_eq(*node, *node));
	}
}

TEST(edn_real, hash) {
	Ptr<Real> real1 = node_real(1234);
	Ptr<Real> real2 = node_real(1234);
	EXPECT_EQ(node_hash(*real1), node_hash(*real2));
}

TEST(edn_vector, empty_compare_with_self) {
	auto v = node_vector();
	EXPECT_EQ(*v, *v);
}

TEST(edn_vector, insert_one) {
	auto v = node_vector();
	v->elements().push_back(node_integer(1));
	EXPECT_EQ(static_cast<Integer&>(*v->at(0)), Integer(1));
}

TEST(edn_vector, reproduce_hash) {
	auto v0 = node_vector();
	v0->elements().push_back(node_integer(42));
	v0->elements().push_back(node_integer(42));

	auto v1 = node_vector();
	v1->elements().push_back(node_integer(42));
	v1->elements().push_back(node_integer(42));

	EXPECT_EQ(v0->hash(), v1->hash());
}

TEST(edn_vector, compare_with_self) {
	auto v = node_vector();
	v->elements().push_back(node_integer(1));
	EXPECT_EQ(*v, *v);
}

TEST(edn_map, insert_1234_test) {
	auto m = construct<Map>();
	m->elements().insert({node_integer(1234), node_string("test")});
	EXPECT_EQ(as_string(*m->at(node_integer(1234))), String("test"));
}

TEST(edn_map, reproduce) {
	auto m1 = construct<Map>();
	m1->elements().insert({node_string("heyoo"), node_vector()});

	auto m2 = construct<Map>();
	m2->elements().insert({node_string("heyoo"), node_vector()});

	EXPECT_EQ(*m1, *m2);
	EXPECT_EQ(node_hash(*m1), node_hash(*m2));
}

TEST(edn_map, map_as_a_key) {
	auto m = construct<Map>();

	// using a map as a key
	auto key = construct<Map>();
	key->elements().insert({node_integer(1324), node_integer(5678)});

	// and a map as a val
	auto val = construct<Map>();
	val->elements().insert({node_integer(8765), node_integer(4321)});

	m->elements().insert({key, val});

	Ptr<Node> lookup = m->at(key);
	EXPECT_TRUE(node_eq(*lookup, *val));
}

// KNOWN BUG
TEST(edn_map, mutate_key_after_insertion) {
	auto m   = construct<Map>();
	auto key = node_integer(1234);
	auto val = node_integer(42);

	m->elements().insert({key, val});

	// modify the key object after insertion
	key->set_value(5678);

	// try to look up the integer(42) object via the new key-value, should fail.
	try {
		Ptr<Node> lookup = m->at(node_integer(5678));
		FAIL();
	} catch (...) {
		SUCCEED();
	}

	// try to look up the object via the original key, should also fail.
	try {
		Ptr<Node> lookup = m->at(node_integer(1234));
		FAIL();
	} catch (...) {
		SUCCEED();
	}
}

TEST(edn_symbol, intern) {
	std::vector<std::string> strings = {
		"", "test", "test2", "\1\2\3", "forty_five"
	};
	for (const auto& str : strings) {
		EXPECT_FALSE(globals.symbol_table.interned(str));
		Ptr<Symbol> sym1 = node_symbol(str);
		Ptr<Symbol> sym2 = node_symbol(str);
		EXPECT_EQ(*sym1, *sym2);
		EXPECT_EQ(sym1->id(), sym2->id());
		EXPECT_TRUE(node_eq(*sym1, *sym2));
		EXPECT_EQ(str, globals.symbol_table.string(sym1->id()));
		EXPECT_EQ(str, globals.symbol_table.string(sym2->id()));
	}
}

}  // namespace Ab::Edn::Test


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Gloeosporium divergens Peck

### Remarks
null


text:
module Data.Iteratee.IO.Interact (
  ioIter
)
where

import Control.Monad.IO.Class
import Data.Iteratee

-- | Use an IO function to choose what iteratee to run.
-- -- Typically this function handles user interaction and
-- -- returns with a simple iteratee such as 'head' or 'seek'.
-- --
-- -- The IO function takes a value of type 'a' as input, and
-- -- should return 'Right a' to continue, or 'Left b'
-- -- to terminate. Upon termination, ioIter will return 'Done b'.
-- --
-- -- The second argument to 'ioIter' is used as the initial input
-- -- to the IO function, and on each successive iteration the
-- -- previously returned value is used as input. Put another way,
-- -- the value of type 'a' is used like a fold accumulator.
-- -- The value of type 'b' is typically some form of control code
-- -- that the application uses to signal the reason for termination.
ioIter :: (MonadIO m, Nullable s)
       => (a -> IO (Either b (Iteratee s m a)))
       -> a
       -> Iteratee s m b
ioIter f a = either return (>>= ioIter f) =<< liftIO (f a)
{-# INLINE ioIter #-}


text:
'use strict';

let sinon = require('sinon');
let chai = require('chai');
let expect = chai.expect;
let chaiAsPromised = require("chai-as-promised");
chai.use(chaiAsPromised);
let sinonChai = require('sinon-chai');
chai.use(sinonChai);
let proxyquire = require('proxyquire');

describe('STSSchemaValidator module', function() {
    //noinspection JSUnresolvedVariable
    let sandbox = sinon.sandbox.create();
    let swaggerToolsStub,
        specStub,
        STSSchemaValidator,
        schemaValidator;

    beforeEach(function () {
        swaggerToolsStub = sandbox.stub();
        specStub = sandbox.stub();

        STSSchemaValidator = proxyquire('../../lib/STSSchemaValidator', {
            'swagger-tools': swaggerToolsStub
        });
        schemaValidator = new STSSchemaValidator(specStub);
    });

    afterEach(function () {
        sandbox.restore();
    });

    it('should construct STSSchemaValidator', function () {
        expect(schemaValidator.spec).to.equals(specStub);
    });

    it('should validate response', function () {
        let specResponseMock = {};
        schemaValidator.spec = {
            paths: {
                '/foo': {
                    'bar': {
                        responses: {
                            'baz': specResponseMock
                        }
                    }
                }
            }
        };
        let operationMock = {
            path: '/foo',
            method: 'bar'
        };
        let responseMock = null;
        let promiseStub = sandbox.stub();
        let getValidatorStub = sandbox.stub(schemaValidator, 'getValidator').returns(promiseStub);

        schemaValidator.validate(operationMock, 'baz', responseMock);

        specResponseMock.schema = {};
        schemaValidator.validate(operationMock, 'baz', responseMock);

        specResponseMock.schema['$ref'] = sandbox.stub();
        schemaValidator.validate(operationMock, 'baz', responseMock);

        responseMock = {};
        schemaValidator.validate(operationMock, 'baz', responseMock);

        responseMock.obj = sandbox.stub();
        let promise = schemaValidator.validate(operationMock, 'baz', responseMock);
        expect(getValidatorStub).to.calledOnce;
        expect(getValidatorStub).to.calledWithExactly(specResponseMock.schema['$ref'], responseMock.obj);
        expect(promise).to.equals(promiseStub);
    });

    describe('validator', function () {
        let refStub,
            bodyStub;

        beforeEach(function () {
            swaggerToolsStub.specs = swaggerToolsStub;
            swaggerToolsStub.v2 = swaggerToolsStub;
            swaggerToolsStub.validateModel = sandbox.stub();

            refStub = sandbox.stub();
            bodyStub = sandbox.stub();
        });

        let commonTest = function (promise) {
            expect(promise).to.be.a('promise');
            //noinspection JSUnresolvedVariable
            expect(swaggerToolsStub.validateModel).to.calledWithExactly(
                schemaValidator.spec, refStub, bodyStub, sinon.match.func);
        };

        it('should validate', function () {
            swaggerToolsStub.validateModel.callsArg(3);

            let promise = schemaValidator.getValidator(refStub, bodyStub);

            commonTest(promise);

            return expect(promise).to.be.fulfilled;
        });

        it('should fail', function () {
            let errorMock = new Error('test error');
            swaggerToolsStub.validateModel.callsArgWith(3, errorMock);

            let promise = schemaValidator.getValidator(refStub, bodyStub);

            commonTest(promise);

            return expect(promise).to.be.rejectedWith(errorMock);
        });

        it('should fail validating body against schema', function () {
            let resultMock = {
                errors: [
                    {
                        path: ['1', '2'],
                        message: '3'
                    },
                    {
                        path: ['4', '5'],
                        message: '6'
                    }
                ]
            };
            swaggerToolsStub.validateModel.callsArgWith(3, null, resultMock);

            let promise = schemaValidator.getValidator(refStub, bodyStub);

            commonTest(promise);

            return expect(promise).to.be.rejectedWith(Error, 'Validation failed:\n' +
                '#/1/2: 3\n' +
                '#/4/5: 6');
        });
    });
});


text:
package com.thoughtworks.go.apiv10.admin.shared.representers;

import com.thoughtworks.go.api.base.OutputListWriter;
import com.thoughtworks.go.api.base.OutputWriter;
import com.thoughtworks.go.api.representers.ErrorGetter;
import com.thoughtworks.go.api.representers.JsonReader;
import com.thoughtworks.go.config.ParamConfig;
import com.thoughtworks.go.config.ParamsConfig;

import java.util.HashMap;

public class ParamRepresenter {

    public static void toJSONArray(OutputListWriter jsonWriter, ParamsConfig paramConfigs) {
        paramConfigs.forEach(param -> {
            jsonWriter.addChild(paramWriter -> toJSON(paramWriter, param));
        });
    }

    public static void toJSON(OutputWriter jsonWriter, ParamConfig paramConfig) {
        if (!paramConfig.errors().isEmpty()) {
            jsonWriter.addChild("errors", errorWriter -> {
                new ErrorGetter(new HashMap<>()).toJSON(errorWriter, paramConfig);
            });
        }
        jsonWriter.add("name", paramConfig.getName());
        jsonWriter.add("value", paramConfig.getValue());
    }

    public static ParamsConfig fromJSONArray(JsonReader jsonReader) {
        ParamsConfig paramConfigs = new ParamsConfig();
        jsonReader.readArrayIfPresent("parameters", params -> {
            params.forEach(param -> {
                paramConfigs.add(ParamRepresenter.fromJSON(new JsonReader(param.getAsJsonObject())));
            });
        });
        return paramConfigs;
    }

    private static ParamConfig fromJSON(JsonReader jsonReader) {
        ParamConfig paramConfig = new ParamConfig();
        jsonReader.readStringIfPresent("name", paramConfig::setName);
        jsonReader.readStringIfPresent("value", paramConfig::setValue);
        return paramConfig;
    }

}


text:
layout: page
title: "MGMT 4210: Systems Thinking Statistics"
comments: true
description: "blanks"
keywords: "MGMT,4210,CU,Boulder"
---

#### GRADE AND WORKLOAD STATISTICS

**Percent withdrawn**: 1.51%

**Percent incomplete**: 0.56%

**Average grade** (4.0 scale): 3.27

**Standard deviation in grades** (4.0 scale): 0.19

**Average workload** (raw): 2.23

**Standard deviation in workload** (raw): 0.38

#### COURSE AND INSTRUCTOR RATINGS/INFORMATION

**Average course rating** (6 point scale): 4.82

**Standard deviation in course rating** (6 point scale): 0.49

**Average instructor rating** (6 point scale): 5.25

**Standard deviation in instructor rating** (6 point scale): 0.51

**Instructors**: Heather Adams, Eric Wiseman

#### GENERAL CLASS INFORMATION

**Years provided**: Fall 2011, Spring 2012, Fall 2012, Spring 2013, Fall 2013, Spring 2014, Fall 2014, Spring 2015, Fall 2015, Fall 2016

**Credits**: 3

**RAP/Honors class?** Neither

**Number of Sections**: 10

**Department**: BADM

**College**: Leeds School of Business

**Level**: Upper

**Activity**: LEC - Lecture


text:
PHP Inflector [![Build Status](https://travis-ci.org/koenpunt/php-inflector.svg?branch=master)](https://travis-ci.org/koenpunt/php-inflector)
=============

PHP Inflector Library, ported from [Rails](https://github,com/rails/rails)

## Minimum Requirements

* PHP 5.4+ (support for PHP 5.3 in [php-5.3](https://github.com/koenpunt/php-inflector/tree/php-5.3) branch)
* PHP [Internationalization extension](http://www.php.net/manual/en/book.intl.php) (`php5-intl`)

## Installation

The easiest way to use PHP Inflector is by installing it with [Composer](https://getcomposer.org/)

Create or update `composer.json`:
```json
{
  "require": {
    "koenpunt/php-inflector": "1.0.*"
  }
}
```

And run `composer install`

## Features

* Basics:
    * singularize
    * pluralize
    * singularize
    * camelize
    * underscore
    * humanize
    * titleize
    * tableize
    * classify
    * dasherize
    * denamespace
    * foreign_key
    * ordinalize

* Internationalization
    * transliterate
    * parameterize

## Usage

PHP Inflector is implemented as class with static functions

```php
Inflector::underscore("PhpInflector\Inflector"); # => php_inflector/inflector

PhpInflector\Inflector::parameterize("Ærøskøbing on Water"); # => aeroskobing-on-water

PhpInflector\Inflector::foreign_key("Admin\Post"); # => post_id

PhpInflector\Inflector::denamespace("PhpInflector\Inflector\Inflections"); # => Inflections

PhpInflector\Inflector::dasherize("puni_puni"); # => puni-puni
```

It is also possible to add custom inflections, like acronyms:

```php
PhpInflector\Inflector::inflections(function($inflect){
  $inflect->acronym('RESTful');
});

PhpInflector\Inflector::titleize('RESTfulController'); # => RESTful Controller
```

More examples and documentation can be found in the source.

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
function openLoad(evt, cityName) {
    var i, tabcontent, tablinks;
    tabcontent = document.getElementsByClassName("tabcontent");
    for (i = 0; i < tabcontent.length; i++) {
        tabcontent[i].style.display = "none";
    }
    tablinks = document.getElementsByClassName("tablinks");
    for (i = 0; i < tablinks.length; i++) {
        tablinks[i].className = tablinks[i].className.replace(" active", "");
    }
    document.getElementById(cityName).style.display = "block";
    evt.currentTarget.className += " active";
}

// Get the element with id="defaultOpen" and click on it
document.getElementById("defaultOpen").click();


text:
{% extends "base.html" %}

{% block first_column %}
	{% if articles %}

			all articles found searching for
			{{ search_term }}

		{% for article in articles %}
			{% include '../article_excerpt.html' %}
		{% endfor %}
		{% include 'pager.html' %}
	{% else %}

				No Matches

No articles found for '{{ search_term }}'

{{ search_error_message }}

Please try your search again.

If you feel that you should be staring at something a little more concrete,
					try one of the tags or browse the archives.

	{% endif %}
{% endblock %}


text:
package net.runelite.injector;

import java.util.List;
import net.runelite.asm.ClassFile;
import net.runelite.asm.Field;
import net.runelite.asm.Method;
import net.runelite.asm.Type;
import net.runelite.asm.attributes.Code;
import net.runelite.asm.attributes.code.Instruction;
import net.runelite.asm.attributes.code.Instructions;
import net.runelite.asm.attributes.code.instructions.ALoad;
import net.runelite.asm.attributes.code.instructions.CheckCast;
import net.runelite.asm.attributes.code.instructions.IMul;
import net.runelite.asm.attributes.code.instructions.LDC;
import net.runelite.asm.attributes.code.instructions.LMul;
import net.runelite.asm.attributes.code.instructions.PutField;
import net.runelite.asm.attributes.code.instructions.PutStatic;
import net.runelite.asm.attributes.code.instructions.VReturn;
import net.runelite.asm.signature.Signature;
import static org.objectweb.asm.Opcodes.ACC_PUBLIC;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class InjectSetter
{
	private static final Logger logger = LoggerFactory.getLogger(InjectSetter.class);

	private final Inject inject;

	private int injectedSetters;

	public InjectSetter(Inject inject)
	{
		this.inject = inject;
	}

	/**
	 * inject a setter into the vanilla classgroup
	 *
	 * @param targetClass Class where to inject the setter (field's class,
	 * or client)
	 * @param targetApiClass API targetClass implements, which may have the
	 * setter declared
	 * @param field Field of vanilla that will be set
	 * @param exportedName exported name of field
	 * @param setter
	 */
	public void injectSetter(ClassFile targetClass, Class<?> targetApiClass, Field field, String exportedName, Number setter)
	{
		java.lang.reflect.Method method = inject.findImportMethodOnApi(targetApiClass, exportedName, true);
		if (method == null)
		{
			logger.warn("Setter injection for field {} but an API method was not found on {}", exportedName, targetApiClass);
			return;
		}

		if (method.getParameterCount() != 1)
		{
			logger.warn("Setter {} with not parameter count != 1?", exportedName);
			return;
		}

		logger.info("Injecting setter for {} on {}", exportedName, targetApiClass);

		assert targetClass.findMethod(method.getName()) == null;
		assert field.isStatic() || field.getClassFile() == targetClass;

		Signature sig = new Signature.Builder()
			.setReturnType(Type.VOID)
			.addArgument(Inject.classToType(method.getParameterTypes()[0]))
			.build();

		Method setterMethod = new Method(targetClass, method.getName(), sig);
		setterMethod.setAccessFlags(ACC_PUBLIC);
		targetClass.addMethod(setterMethod);
		++injectedSetters;

		Code code = new Code(setterMethod);
		setterMethod.setCode(code);

		Instructions instructions = code.getInstructions();
		List<Instruction> ins = instructions.getInstructions();

		// load this
		if (!field.isStatic())
		{
			ins.add(new ALoad(instructions, 0));
		}

		// load argument
		Type argumentType = sig.getTypeOfArg(0);
		ins.add(inject.createLoadForTypeIndex(instructions, argumentType, 1));

		// cast argument to field type
		Type fieldType = field.getType();
		if (!argumentType.equals(fieldType))
		{
			CheckCast checkCast = new CheckCast(instructions);
			checkCast.setType(fieldType);
			ins.add(checkCast);
		}

		if (setter != null)
		{
			assert setter instanceof Integer || setter instanceof Long;

			if (setter instanceof Integer)
			{
				ins.add(new LDC(instructions, (int) setter));
				ins.add(new IMul(instructions));
			}
			else
			{
				ins.add(new LDC(instructions, (long) setter));
				ins.add(new LMul(instructions));
			}
		}

		if (field.isStatic())
		{
			ins.add(new PutStatic(instructions, field));
		}
		else
		{
			ins.add(new PutField(instructions, field));
		}

		ins.add(new VReturn(instructions));
	}

	public int getInjectedSetters()
	{
		return injectedSetters;
	}
}


text:
There are instructions for other platforms linked from the
[get the code](get_the_code.md) page.

## Instructions for Google Employees

Are you a Google employee? See
[go/building-android-chrome](https://goto.google.com/building-android-chrome)
instead.

[TOC]

## System requirements

* A 64-bit Intel machine running Linux with at least 8GB of RAM. More
  than 16GB is highly recommended.
* At least 100GB of free disk space.
* You must have Git and Python installed already.

Most development is done on Ubuntu. Other distros may or may not work;
see the [Linux instructions](linux/build_instructions.md) for some suggestions.

Building the Android client on Windows or Mac is not supported and doesn't work.

## Install depot\_tools

Clone the `depot_tools` repository:

```shell
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
```

Add `depot_tools` to the end of your PATH (you will probably want to put this
in your `~/.bashrc` or `~/.zshrc`). Assuming you cloned `depot_tools`
to `/path/to/depot_tools`:

```shell
export PATH="$PATH:/path/to/depot_tools"
```

## Get the code

Create a `chromium` directory for the checkout and change to it (you can call
this whatever you like and put it wherever you like, as
long as the full path has no spaces):

```shell
mkdir ~/chromium && cd ~/chromium
fetch --nohooks android
```

If you don't want the full repo history, you can save a lot of time by
adding the `--no-history` flag to `fetch`.

Expect the command to take 30 minutes on even a fast connection, and many
hours on slower ones.

If you've already installed the build dependencies on the machine (from another
checkout, for example), you can omit the `--nohooks` flag and `fetch`
will automatically execute `gclient runhooks` at the end.

When `fetch` completes, it will have created a hidden `.gclient` file and a
directory called `src` in the working directory. The remaining instructions
assume you have switched to the `src` directory:

```shell
cd src
```

### Converting an existing Linux checkout

If you have an existing Linux checkout, you can add Android support by
appending `target_os = ['linux', 'android']` to your `.gclient` file (in the
directory above `src`):

```shell
echo "target_os = [ 'android' ]" >> ../.gclient
```

Then run `gclient sync` to pull the new Android dependencies:

```shell
gclient sync
```

(This is the only difference between `fetch android` and `fetch chromium`.)

### Install additional build dependencies

Once you have checked out the code, run

```shell
build/install-build-deps-android.sh
```

to get all of the dependencies you need to build on Linux, *plus* all of the
Android-specific dependencies (you need some of the regular Linux dependencies
because an Android build includes a bunch of the Linux tools and utilities).

### Run the hooks

Once you've run `install-build-deps` at least once, you can now run the
Chromium-specific hooks, which will download additional binaries and other
things you might need:

```shell
gclient runhooks
```

*Optional*: You can also [install API
keys](https://www.chromium.org/developers/how-tos/api-keys) if you want your
build to talk to some Google services, but this is not necessary for most
development and testing purposes.

## Setting up the build

Chromium uses [Ninja](https://ninja-build.org) as its main build tool along with
a tool called [GN](https://gn.googlesource.com/gn/+/main/docs/quick_start.md)
to generate `.ninja` files. You can create any number of *build directories*
with different configurations. To create a build directory which builds Chrome
for Android, run `gn args out/Default` and edit the file to contain the
following arguments:

```gn
target_os = "android"
target_cpu = "arm64"  # See "Figuring out target_cpu" below
```

* You only have to run this once for each new build directory, Ninja will
  update the build files as needed.
* You can replace `Default` with another name, but
  it should be a subdirectory of `out`.
* For other build arguments, including release settings, see [GN build
  configuration](https://www.chromium.org/developers/gn-build-configuration).
  The default will be a debug component build.
* For more info on GN, run `gn help` on the command line or read the
  [quick start guide](https://gn.googlesource.com/gn/+/main/docs/quick_start.md).

Also be aware that some scripts (e.g. `tombstones.py`, `adb_gdb.py`)
require you to set `CHROMIUM_OUTPUT_DIR=out/Default`.

### Figuring out target\_cpu

The value of
[`target_cpu`](https://gn.googlesource.com/gn/+/main/docs/reference.md#var_target_cpu)
determines what instruction set to use for native code. Given a device (or
emulator), you can determine the correct instruction set with `adb shell getprop
ro.product.cpu.abi`:

| `getprop ro.product.cpu.abi` output | `target_cpu` value |
|-------------------------------------|--------------------|
| `arm64-v8a`                         | `arm64`            |
| `armeabi-v7a`                       | `arm`              |
| `x86`                               | `x86`              |
| `x86_64`                            | `x64`              |

*** promo
`arm` and `x86` may optionally be used instead of `arm64` and `x64` for
non-WebView targets. This is also allowed for Monochrome, but only when not set
as the WebView provider.
***

## Build Chromium

Build Chromium with Ninja using the command:

```shell
autoninja -C out/Default chrome_public_apk
```

(`autoninja` is a wrapper that automatically provides optimal values for the
arguments passed to `ninja`.)

You can get a list of all of the other build targets from GN by running `gn ls
out/Default` from the command line. To compile one, pass the GN label to Ninja
with no preceding "//" (so, for `//chrome/test:unit_tests` use `autoninja -C
out/Default chrome/test:unit_tests`).

### Multiple Chrome Targets

The Google Play Store allows apps to send customized `.apk` or `.aab` files
depending on the version of Android running on a device. Chrome uses this
feature to package optimized versions for different OS versions.

1. `chrome_modern_public_bundle` (ChromeModernPublic.aab)
   * `minSdkVersion=21` (Lollipop).
   * Uses [Crazy Linker](https://cs.chromium.org/chromium/src/base/android/linker/BUILD.gn?rcl=6bb29391a86f2be58c626170156cbfaa2cbc5c91&l=9).
   * Stores native library with "crazy." prefix to prevent extraction.
   * WebView packaged independently (`system_webview_bundle`).
2. `monochrome_public_bundle` (MonochromePublic.aab)
   * `minSdkVersion=24` (Nougat).
   * Contains both Chrome and WebView (to save disk space).
   * Does not use Crazy Linker (WebView requires system linker).
3. `trichrome_chrome_bundle` (TrichromeChrome.aab)
   * `minSdkVersion=29` (Android 10).
   * Native code shared with WebView through a "Static Shared Library APK": `trichrome_library_apk`
   * Corresponding WebView target: `trichrome_webview_bundle`
4. `chrome_public_apk` (ChromePublic.apk)
   * Used for only local development and tests (simpler than using bundle
     targets).
   * Same configuration as chrome_modern_public_bundle, except without
     separating things into modules.

*** note
**Notes:**
* These instructions use `chrome_public_apk`, but any of the other targets can
  be substituted.
* For more about bundles, see [android_dynamic feature modules.md](android_dynamic_feature_modules.md).
* For more about native library packaging & loading, see [android_native_libraries.md](android_native_libraries.md).
* There are closed-source equivalents to these targets (for Googlers), which
  are identical but link in some extra code.
***

## Updating your checkout

To update an existing checkout, you can run

```shell
$ git rebase-update
$ gclient sync
```

The first command updates the primary Chromium source repository and rebases
any of your local branches on top of tip-of-tree (aka the Git branch
`origin/main`). If you don't want to use this script, you can also just use
`git pull` or other common Git commands to update the repo.

The second command syncs dependencies to the appropriate versions and re-runs
hooks as needed.

## Installing and Running Chromium on a device

### Plug in your Android device

Make sure your Android device is plugged in via USB, and USB Debugging
is enabled.

To enable USB Debugging:

*   Navigate to Settings \> About Phone \> Build number
*   Click 'Build number' 7 times
*   Now navigate back to Settings \> Developer Options
*   Enable 'USB Debugging' and follow the prompts

You may also be prompted to allow access to your PC once your device is
plugged in.

You can check if the device is connected by running:

```shell
third_party/android_sdk/public/platform-tools/adb devices
```

Which prints a list of connected devices. If not connected, try
unplugging and reattaching your device.

### Enable apps from unknown sources

Allow Android to run APKs that haven't been signed through the Play Store:

*   Enable 'Unknown sources' under Settings \> Security

In case that setting isn't present, it may be possible to configure it via
`adb shell` instead:

```shell
third_party/android_sdk/public/platform-tools/adb shell settings put global verifier_verify_adb_installs 0
```

### Build the full browser

```shell
autoninja -C out/Default chrome_public_apk
```

And deploy it to your Android device:

```shell
out/Default/bin/chrome_public_apk install
```

The app will appear on the device as "Chromium".

### Build Content shell

Wraps the content module (but not the /chrome embedder). See
[https://www.chromium.org/developers/content-module](https://www.chromium.org/developers/content-module)
for details on the content module and content shell.

```shell
autoninja -C out/Default content_shell_apk
out/Default/bin/content_shell_apk install
```

this will build and install an Android apk under
`out/Default/apks/ContentShell.apk`.

### Build WebView

[Android WebView](https://developer.android.com/reference/android/webkit/WebView.html)
is a system framework component. Since Android KitKat, it is implemented using
Chromium code (based off the [content module](https://dev.chromium.org/developers/content-module)).

If you want to build the complete Android WebView framework component and test
the effect of your chromium changes in Android apps using WebView, you should
follow the [Android AOSP + chromium WebView
instructions](https://www.chromium.org/developers/how-tos/build-instructions-android-webview)

### Running

For Content shell:

```shell
out/Default/bin/content_shell_apk launch [--args='--foo --bar'] http://example.com
```

For Chrome public:

```shell
out/Default/bin/chrome_public_apk launch [--args='--foo --bar'] http://example.com
```

### Logging and debugging

Logging is often the easiest way to understand code flow. In C++ you can print
log statements using the LOG macro. In Java, refer to
[android_logging.md](android_logging.md).

You can see these log via `adb logcat`, or:

```shell
out/Default/bin/chrome_public_apk logcat
```

Logcat supports an additional feature of filtering and highlighting user-defined patterns. To use
this mechanism, define a shell variable: `CHROMIUM_LOGCAT_HIGHLIGHT` and assign your desired
pattern. The pattern will be used to search for any substring (ie. no need to prefix or suffix it
with `.*`), eg:

```shell
export CHROMIUM_LOGCAT_HIGHLIGHT='(WARNING|cr_Child)'
out/Default.bin/chrome_public_apk logcat
# Highlights messages/tags containing WARNING and cr_Child strings.
```

Note: both _Message_ and _Tag_ portion of logcat are matched against the pattern.

To debug C++ code, use one of the following commands:

```shell
out/Default/bin/content_shell_apk gdb
out/Default/bin/chrome_public_apk gdb
```

See [Android Debugging Instructions](android_debugging_instructions.md)
for more on debugging, including how to debug Java code.

### Testing

For information on running tests, see
[Android Test Instructions](testing/android_test_instructions.md).

### Faster Edit/Deploy

#### GN Args
Args that affect build speed:
 * `is_component_build = true` *(default=`is_debug`)*
   * What it does: Uses multiple `.so` files instead of just one (faster links)
 * `is_java_debug = true` *(default=`is_debug`)*
   * What it does: Disables ProGuard (slow build step)
 * `treat_warnings_as_errors = false` *(default=`true`)*
   * Causes any compiler warnings or lint checks to not fail the build.
   * Allows you to iterate without needing to satisfy static analysis checks.
 * `android_static_analysis = "build_server"` *(default=`"on"`)*
   * Offloads static analysis steps to the build server. Explained below.
   * Set this to `"off"` if you want to turn off static analysis altogether.
 * `incremental_install = true` *(default=`false`)*
   * Makes build and install quite a bit faster. Explained in a later section.

#### Running static analysis with the build server
Normally analysis build steps like lint and errorprone will run in parallel with
the rest of the build. The build will then wait for all analysis steps to
complete successfully. By offloading analysis build steps to a separate build
server to be run lazily at a low priority when the machine is idle, the actual
build can complete up to 50-80% faster.

There are **two** steps to using the build server.
1. Add the gn arg `android_static_analysis = "build_server"`
2. Run the script at
[//build/android/fast_local_dev_server.py][fast_local_dev]

All your local builds will now forward analysis steps to this server, including
android lint, errorprone, bytecode processor.

If you run (2) in a terminal, the output of the checks will be displayed there.
Alternatively, you can set up the server as a Linux service, so it runs on the
background and starts on boot. If you're using systemd:

Save the following as /etc/systemd/system/fast-local-dev-server.service.
```
[Unit]
Description=Chrome server for android build static analysis

[Service]
Type=simple
ExecStart=<path to fast_local_dev_server.py>
Restart=always

[Install]
WantedBy=multi-user.target
```

Then
```bash
sudo systemctl daemon-reload
sudo systemctl enable fast-local-dev-server
sudo systemctl start fast-local-dev-server
```

The output can be inspected with
```
journalctl -e -u fast-local-dev-server
```

**Note**: Since the build completes before the analysis checks finish, the build
will not fail if an analysis check fails. Make sure to check the terminal that
the server is running in at regular intervals to fix outstanding issues caught
by these analysis checks.

[fast_local_dev]: https://source.chromium.org/chromium/chromium/src/+/main:build/android/fast_local_dev_server.py

#### Incremental Install
[Incremental Install](/build/android/incremental_install/README.md) uses
reflection and sideloading to speed up the edit & deploy cycle (normally < 10
seconds). The initial launch of the apk will be a lot slower on older Android
versions (pre-N) where the OS needs to pre-optimize the side-loaded files, but
then be only marginally slower after the first launch.

To enable Incremental Install, add the gn args:

```gn
incremental_install = true
```

Some APKs (e.g. WebView) do not work with `incremental install = true` and are
always built as normal APKs. This behavior is controlled via
`never_incremental = true`.

## Installing and Running Chromium on an Emulator

Running on an emulator is the same as on a device. Refer to
[android_emulator.md](android_emulator.md) for setting up emulators.

## Tips, tricks, and troubleshooting

### Rebuilding libchrome.so for a particular release

These instructions are only necessary for Chrome 51 and earlier.

In the case where you want to modify the native code for an existing
release of Chrome for Android (v25+) you can do the following steps.
Note that in order to get your changes into the official release, you'll
need to send your change for a codereview using the regular process for
committing code to chromium.

1.  Open Chrome on your Android device and visit chrome://version
2.  Copy down the id listed next to "Build ID:"
3.  Go to
    [http://storage.googleapis.com/chrome-browser-components/BUILD\_ID\_FROM\_STEP\_2/index.html](http://storage.googleapis.com/chrome-browser-components/BUILD_ID_FROM_STEP_2/index.html)
4.  Download the listed files and follow the steps in the README.


text:
import pyexcel
import csv
from collections import defaultdict, OrderedDict

'''
Helper functions for dealing with xlsx and tsv files. The operations below are supported:
1. Conversion of xlsx to tsv file
2. Creation of new tsv file that contains only normalized rows
3. Finding of differences between two tsv files and occurrences of non-normalized rows in those files

IMPORTANT:
For xlsx conversion, you need to install the following:
pip install pyexcel
pip install pyexcel-xlsx

'''

# -------------- Convert a xlsx file to a tsv file -----------------------------------------------------

xlsx_file = "file_name.xlsx"
tsv_file = 'new_file_name.tsv'

def convert_file(xlsx_file, tsv_file):
    data = pyexcel.get_array(file_name=xlsx_file)
    pyexcel.save_as(array=data,
                    dest_file_name=tsv_file,
                    dest_delimiter='\t')

convert_file(xlsx_file, tsv_file)

# --------------- Create a new file that contains only normalized rows ----------------------------------

# create a list of not-normalized rows
def not_normalized_rows(input_file):
    a_list = []
    with open(input_file) as tsv_file:
        data = dict(enumerate(csv.reader(tsv_file, delimiter='\t')))
        for row in data:
            if data[row][3] != 'Protein' and data[row][2] == 'Protein':
                a_list.append(row)
    return a_list  # len(a_list)) if number of not-normalized rows is needed

file = 'interFile_modified_by_Tanya.tsv'
new_file = 'new_file.tsv'

first_row = 1
rows_to_delete = not_normalized_rows(file)

# create the new file
def create_normalized_file(in_file, out_file):
    with open(in_file, 'rt') as infile, open(out_file, 'wt') as out:
        out.writelines(row for row_num, row in enumerate(infile, first_row)
                       if row_num not in rows_to_delete)

create_normalized_file(file, new_file)

# -------------- Find differences between two tsv files and occurrences of non-normalized rows in those files ----------
def find_occurrences(input_file):
    a_set = set()

    with open(input_file) as tsv_file:
        data = dict(enumerate(csv.reader(tsv_file, delimiter='\t')))
        for row in data:
            a_set.add(data[row][0])  # get all PubmedIDs

    pubmed_ID = list(a_set)
    count_ID = list()

    with open(input_file) as tsv_file:
        data = dict(enumerate(csv.reader(tsv_file, delimiter='\t')))
        for i in range(101):
            for row in data:
                if data[row][0] == pubmed_ID[i] and data[row][3] == 'Protein':
                    count_ID.append(data[row][0])  # get number of rows for non-normalized pubmedIDs

    not_normalized = defaultdict(int)
    for curr in count_ID:
        not_normalized[curr] += 1

    return not_normalized

# files
file1 = 'interFile_modified.tsv'
file2 = 'interFile_modified_by_Tanya.tsv'

# check the differences
print(OrderedDict(find_occurrences(file1)))
print(OrderedDict(find_occurrences(file2)))

# FILE1 = './interFile_modified_by_Tanya.tsv'
# FILE2 ='./interFile_modified.tsv'
#
# # create a list of not-normalized rows
# def not_normalized_rows(input_file):
#     a_list = []
#     with open(input_file) as tsv_file:
#         data = dict(enumerate(csv.reader(tsv_file, delimiter='\t')))
#         for row in data:
#             if data[row][2] == 'Location':
#             # if data[row][3] == 'Protein' and data[row][2] == 'Protein':
#                 a_list.append(row)
#     return a_list  # len(a_list)) if number of not-normalized rows is needed
#
# print(len(not_normalized_rows(FILE1)))
# print(len(not_normalized_rows(FILE2)))


text:
esprima-perf
============

Helpers for a jsfiddle that tests performance of various esprima versions. Check it out:


text:
All notable changes to this project will be documented in this file
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
This project adheres to [Semantic Versioning](http://semver.org/).

## 11.0.0 - 2021-10-13

* Avoid creating multiple preload containers [Kyle Harding]
* major: Remove balena-preload script in favor of use with CLI [Lorenzo Alberto Maria Ambrosi]
* Fix missing 'await' for getEdisonPartitions() [Paulo Castro]
* Add extra type information (refactor bind mount array) [Paulo Castro]
* Run linter [Paulo Castro]
* major: Convert to typescript [Lorenzo Alberto Maria Ambrosi]
* patch: Fix incorrect python List index check [Lorenzo Alberto Maria Ambrosi]

## 10.5.0 - 2021-08-04

* Remove mutually exclusive args from sfdisk [Kyle Harding]
* Explicitly disable tls to avoid startup delays [Kyle Harding]
* Use custom dind image based on alpine [Kyle Harding]

## 10.4.20 - 2021-07-26

* Avoid TypeError if build output array is empty [Kyle Harding]

## 10.4.19 - 2021-07-23

* Start fetching image info sooner and run in parallel with api calls [Pagan Gazzard]

## 10.4.18 - 2021-07-23

* Fix missing await [Pagan Gazzard]

## 10.4.17 - 2021-07-23

* Use class syntax for declaring instance variables [Pagan Gazzard]

## 10.4.16 - 2021-07-22

* Catch errors during build of preload image [Kyle Harding]

## 10.4.15 - 2021-07-22

* Make use of async/await to simplify the code [Pagan Gazzard]

## 10.4.14 - 2021-07-22

* Remove unnecessary fetching of balena settings and token [Pagan Gazzard]

## 10.4.13 - 2021-07-22

* Switch to tmp-promise instead of tmp [Pagan Gazzard]

## 10.4.12 - 2021-07-22

* Prefer `this.appId` to `this.application.id` [Pagan Gazzard]

## 10.4.11 - 2021-07-22

* Update balena-lint to 6.x, typescript to 4.x [Pagan Gazzard]

## 10.4.10 - 2021-07-22

* Support new storage-driver location in balena.service [Kyle Harding]

## 10.4.9 - 2021-06-28

* Fix supervisor repository regex [Alex Gonzalez]

## 10.4.8 - 2021-06-23

* Delay populating global partitions cache until methods call [Kyle Harding]

## 10.4.7 - 2021-05-17

* CI: limit tests to one platform since we are only linting [Kyle Harding]
* Fixup linting by disabling editorconfig for .js files [Kyle Harding]
* Avoid hardcoded registry2 url [Kyle Harding]

## 10.4.6 - 2021-05-06

* Update dependencies (dockerode, docker-progress) [Paulo Castro]
* Don't assume that 'docker' argument uses Bluebird promises [Paulo Castro]

## 10.4.5 - 2021-05-05

* Enhance comms between CLI process and Python process in container [Paulo Castro]

## 10.4.4 - 2021-05-05

* Fix unhandled exception on container.wait() [Paulo Castro]
* Emit error on container status code '137' too (OOM SIGKILL) [Paulo Castro]
* Add flake8 npm script [Paulo Castro]

## 10.4.3 - 2021-05-04

* Don't truncate error logs (add _truncate_exc option to python sh commands) [Paulo Castro]
* Add keyword args to RetryCounter key computation. Remove unused args. [Paulo Castro]

## 10.4.2 - 2021-04-26

* Bump Docker version to 20.10.6 [Kyle Harding]

## 10.4.1 - 2020-12-28

* Store temporary docker pull files in a separate volume [Alexis Svinartchouk]
* Round the additional required bytes [Alexis Svinartchouk]

## 10.4.0 - 2020-09-24

* Add additionalSpace option to override additional space calculation [Alexis Svinartchouk]
* Sum unique layers sizes instead of image sizes for size estimation [Alexis Svinartchouk]

## 10.3.1 - 2020-08-26

* Fix splash image file name for balenaOS >= 2.53.0 (resin -> balena) [Paulo Castro]
* Don't produce (and ignore) a package-lock.json file [Paulo Castro]

## 10.3.0 - 2020-08-17

<details>
<summary> Update docker-progress to 4.x [Pagan Gazzard] </summary>

> ### docker-progress-4.0.3 - 2020-08-17
>
> * Update to balena-lint 5.x [Pagan Gazzard]
>
> ### docker-progress-4.0.2 - 2020-08-17
>
> * Add .versionbot/CHANGELOG.yml for nested changelogs [Pagan Gazzard]
>
> ### docker-progress-4.0.1 - 2020-03-04
>
> * Update dependencies [Pagan Gazzard]
>
> ### docker-progress-4.0.0 - 2019-03-26
>
> * Detect error events in push/pull progress streams [Paulo Castro]
>
</details>

## 10.2.4 - 2020-08-10

* Add .versionbot/CHANGELOG.yml for nested changelogs [Pagan Gazzard]

## 10.2.3 - 2020-08-04

* Fix build dir paths [Pagan Gazzard]

## 10.2.2 - 2020-08-04

<details>
<summary> Update balena-sdk to 15.x [Pagan Gazzard] </summary>

> ### balena-sdk-15.2.1 - 2020-08-03
>
> * Convert majority to async/await [Pagan Gazzard]
>
> ### balena-sdk-15.2.0 - 2020-07-31
>
> * device: add method to update target supervisor release [Matthew McGinn]
>
> ### balena-sdk-15.1.1 - 2020-07-27
>
> * Deduplicate device update methods [Pagan Gazzard]
>
> ### balena-sdk-15.1.0 - 2020-07-27
>
>
> <details>
> <summary> Update balena-pine to add support for and make use of named keys [Pagan Gazzard] </summary>
>
>> #### balena-pine-12.2.0 - 2020-07-22
>>
>>
>> <details>
>> <summary> Update pinejs-client-core [Pagan Gazzard] </summary>
>>
>>> ##### pinejs-client-js-6.1.0 - 2020-07-21
>>>
>>> * Add support for using named ids [Pagan Gazzard]
>>>
>> </details>
>>
>>
>> #### balena-request-11.1.0 - 2020-07-16
>>
>> * Add lazy loading for most modules [Pagan Gazzard]
>>
> </details>
>
>
> ### balena-sdk-15.0.3 - 2020-07-27
>
> * typings: Fix the PineWithSelect & related type helpers [Thodoris Greasidis]
> * typings: Use the native TypeScript Omit type helper [Thodoris Greasidis]
>
> ### balena-sdk-15.0.2 - 2020-07-22
>
> * Fix code snippet for initializing balena-sdk [Vipul Gupta (@vipulgupta2048)]
>
> ### balena-sdk-15.0.1 - 2020-07-15
>
> * Fix SupportTier/includes__SLA typing [Pagan Gazzard]
>
> ### balena-sdk-15.0.0 - 2020-07-15
>
> * **BREAKING** Export setSharedOptions & fromSharedOptions separately [Thodoris Greasidis]
> * **BREAKING** Export as an ES6 module [Thodoris Greasidis]
>
> <details>
> <summary> Update dependencies and switch all returned promises to native promises [Pagan Gazzard] </summary>
>
>> #### balena-auth-4.0.2 - 2020-07-13
>>
>> * Add .versionbot/CHANGELOG.yml for nested changelogs [Pagan Gazzard]
>>
>> #### balena-auth-4.0.1 - 2020-07-03
>>
>> * Explicitly add tslib dependency [Pagan Gazzard]
>>
>> #### balena-auth-4.0.0 - 2020-07-02
>>
>> * Update to balena-settings-storage 6.x [Pagan Gazzard]
>> * Update target to es2015 [Pagan Gazzard]
>> * Switch to native promises [Pagan Gazzard]
>> * Enable strict type checking [Pagan Gazzard]
>> * Specify node 10+ [Pagan Gazzard]
>>
>> #### balena-auth-3.1.1 - 2020-07-02
>>
>> * Switch to @balena/lint for linting [Pagan Gazzard]
>>
>> #### balena-pine-12.1.1 - 2020-07-13
>>
>> * Add .versionbot/CHANGELOG.yml for nested changelogs [Pagan Gazzard]
>>
>> #### balena-pine-12.1.0 - 2020-07-06
>>
>> * Update balena-auth to 4.x and balena-request to 11.x [Pagan Gazzard]
>>
>> #### balena-pine-12.0.1 - 2020-07-03
>>
>> * Use typescript import helpers [Pagan Gazzard]
>>
>> #### balena-pine-12.0.0 - 2020-06-26
>>
>> * Stop actively supporting node 8 [Thodoris Greasidis]
>> * Convert to async await [Thodoris Greasidis]
>> * Add balenaCI repo.yml [Thodoris Greasidis]
>> * karma.conf.js: Combine declaration & assignment of karmaConfig [Thodoris Greasidis]
>> * Bump @balena/lint to v5 [Thodoris Greasidis]
>> * Drop getPine() in favor of an es6 export of the BalenaPine class [Thodoris Greasidis]
>> * Drop the API_PREFIX property in favor of the apiPrefix [Thodoris Greasidis]
>> * Bump to pinejs-client v6 which requires es2015 & drops Bluebird promises [Thodoris Greasidis]
>>
>> #### balena-pine-11.2.1 - 2020-06-15
>>
>> * Convert karma.conf to js [Thodoris Greasidis]
>> * Bump balena-config-karma to v3 [Thodoris Greasidis]
>>
>> #### balena-register-device-7.1.0 - 2020-07-13
>>
>> * Switch from randomstring to uuid for generating device uuids [Pagan Gazzard]
>>
>> #### balena-register-device-7.0.1 - 2020-07-13
>>
>> * Add .versionbot/CHANGELOG.yml for nested changelogs [Pagan Gazzard]
>>
>> #### balena-register-device-7.0.0 - 2020-07-06
>>
>> * Convert to type checked javascript [Pagan Gazzard]
>> * Drop callback interface in favor of promise interface [Pagan Gazzard]
>> * Switch to a named export [Pagan Gazzard]
>> * Convert to typescript [Pagan Gazzard]
>> * Update to typed-error 3.x [Pagan Gazzard]
>> * Switch to returning native promises [Pagan Gazzard]
>> * Update to balena-request 11.x [Pagan Gazzard]
>> * Use typescript import helpers [Pagan Gazzard]
>>
>> #### balena-register-device-6.1.6 - 2020-05-26
>>
>> * Export ApiError [Cameron Diver]
>>
>> #### balena-register-device-6.1.5 - 2020-05-21
>>
>> * Convert tests to js [Thodoris Greasidis]
>>
>> #### balena-register-device-6.1.4 - 2020-05-21
>>
>> * Install typed-error v2 [Cameron Diver]
>>
>> #### balena-register-device-6.1.3 - 2020-05-20
>>
>> * Extend API exception to include full response object [Miguel Casqueira]
>>
>> #### balena-register-device-6.1.2 - 2020-05-20
>>
>> * Update mocha to fix node v12 deprecation warning [Thodoris Greasidis]
>>
>> #### balena-request-11.0.4 - 2020-07-14
>>
>> * Fix body overwriting on nodejs [Pagan Gazzard]
>>
>> #### balena-request-11.0.3 - 2020-07-13
>>
>> * Add .versionbot/CHANGELOG.yml for nested changelogs [Pagan Gazzard]
>>
>> #### balena-request-11.0.2 - 2020-07-06
>>
>> * Fix tslib dependency [Pagan Gazzard]
>>
>> #### balena-request-11.0.1 - 2020-07-03
>>
>> * Fix passing baseUrl to refreshToken if the request uses an absolute url [Pagan Gazzard]
>>
>> #### balena-request-11.0.0 - 2020-07-03
>>
>> * Convert to type checked javascript [Pagan Gazzard]
>> * Switch to returning native promises [Pagan Gazzard]
>> * Drop support for nodejs < 10 [Pagan Gazzard]
>> * Update balena-auth to 4.x [Pagan Gazzard]
>> * Remove rindle dependency [Pagan Gazzard]
>> * Update fetch-ponyfill to 6.x [Pagan Gazzard]
>> * Remove proxy tests as global-tunnel-ng only supports nodejs < 10.16.0 [Pagan Gazzard]
>> * Switch to a named export [Pagan Gazzard]
>> * Use typescript import helpers [Pagan Gazzard]
>> * Bump balena-config-karma & convert karma.conf.coffee to js [Thodoris Greasidis]
>> * Change the browser request timeout error to be consistent with node [Thodoris Greasidis]
>>
> </details>
>
> * **BREAKING** billing: Make the organization parameter fist & required [Thodoris Greasidis]
>
> ### balena-sdk-14.8.0 - 2020-07-15
>
> * DeviceWithServiceDetails: preserve the image_install & gateway_downloads [Thodoris Greasidis]
> * typings: Deprecate DeviceWithImageInstalls in favor of the Device type [Thodoris Greasidis]
>
> ### balena-sdk-14.7.1 - 2020-07-14
>
> * Fix is_private typings for device type [Stevche Radevski]
>
> ### balena-sdk-14.7.0 - 2020-07-14
>
> * Add an organization parameter to all billing methods [Thodoris Greasidis]
>
> ### balena-sdk-14.6.0 - 2020-07-13
>
> * typings: Add ApplicationHostedOnApplication [Thodoris Greasidis]
> * typings Add RecoveryTwoFactor [Thodoris Greasidis]
>
> ### balena-sdk-14.5.1 - 2020-07-10
>
> * Tests: remove bluebird usage [Pagan Gazzard]
>
> ### balena-sdk-14.5.0 - 2020-07-09
>
> * tests/integration/setup: Convert to TypeScript [Thodoris Greasidis]
> * typings/ImageInstall: Deprecate the image field [Thodoris Greasidis]
> * typings/ImageInstall: Add the `installs__image` field [Thodoris Greasidis]
> * typings: Add typings for the ReleaseImage [Thodoris Greasidis]
> * typings/ImageInstall: Add the missing device property [Thodoris Greasidis]
> * Convert all remaining tests away from coffeescript [Pagan Gazzard]
>
> ### balena-sdk-14.4.2 - 2020-07-09
>
> * Tests: improve typing for access to private SDK os methods [Pagan Gazzard]
> * Tests: improve typing of tag helpers [Pagan Gazzard]
> * Tests: import BalenaSDK types directly [Pagan Gazzard]
>
> ### balena-sdk-14.4.1 - 2020-07-08
>
> * Tests: merge multiple application deletions into a single call [Pagan Gazzard]
>
> ### balena-sdk-14.4.0 - 2020-07-08
>
> * Improve typings for `sdk.pine.post` [Pagan Gazzard]
> * Improve typings for `sdk.request` [Pagan Gazzard]
> * Improve typings for `models.device.getOsVersion` [Pagan Gazzard]
> * Improve typings for `models.device.lastOnline` [Pagan Gazzard]
> * Fix typings for `models.device.getMACAddresses` [Pagan Gazzard]
> * Fix typings for `models.device.getLocalIPAddresses` [Pagan Gazzard]
> * Add typings for `models.application.getDashboardUrl` [Pagan Gazzard]
> * Device model: last_connectivity_event and os_version can be null [Pagan Gazzard]
> * Improve typings for `models.device.getLocalModeSupport` [Pagan Gazzard]
>
> ### balena-sdk-14.3.3 - 2020-07-07
>
> * Minimize bluebird sugar usage [Pagan Gazzard]
>
> ### balena-sdk-14.3.2 - 2020-07-07
>
> * Add type checking for tests [Pagan Gazzard]
>
> ### balena-sdk-14.3.1 - 2020-07-07
>
> * Tests: cache device type lookup [Pagan Gazzard]
>
> ### balena-sdk-14.3.0 - 2020-07-07
>
> * typings: Export pine variant w/ a mandatory $select on get requests [Thodoris Greasidis]
>
> ### balena-sdk-14.2.9 - 2020-07-07
>
> * Remove `this.skip` usage as a faster workaround to afterEach skipping [Pagan Gazzard]
>
> ### balena-sdk-14.2.8 - 2020-07-06
>
> * Improve internal typings by avoiding some `any` cases [Pagan Gazzard]
>
> ### balena-sdk-14.2.7 - 2020-07-06
>
> * Include typings for all lazy loaded requires [Pagan Gazzard]
>
> ### balena-sdk-14.2.6 - 2020-07-06
>
> * Simplify balena-request custom typings [Pagan Gazzard]
> * Use import type for declaration imports [Pagan Gazzard]
> * Simplify balena-pine custom typings [Pagan Gazzard]
> * Import balena-sdk type declarations via import type and not direct path [Pagan Gazzard]
>
> ### balena-sdk-14.2.5 - 2020-07-06
>
> * Use typescript import helpers [Pagan Gazzard]
>
> ### balena-sdk-14.2.4 - 2020-07-03
>
> * Drop dtslint in favor of plain @ts-expect-error [Thodoris Greasidis]
> * Enable strict checks for the typing tests [Thodoris Greasidis]
>
> ### balena-sdk-14.2.3 - 2020-07-03
>
> * Standardize bluebird naming as `Bluebird` [Pagan Gazzard]
>
> ### balena-sdk-14.2.2 - 2020-07-03
>
> * Avoid $ExpectType b/c of issues with TS 3.9.6 [Thodoris Greasidis]
>
> ### balena-sdk-14.2.1 - 2020-07-01
>
> * model: Add build_environment_variable [Rich Bayliss]
>
> ### balena-sdk-14.2.0 - 2020-07-01
>
> * Add typings for plans & subscriptions [Thodoris Greasidis]
>
> ### balena-sdk-14.1.0 - 2020-06-29
>
> * Generate optional build for es2018 as well as the default es2015 [Pagan Gazzard]
>
> ### balena-sdk-14.0.2 - 2020-06-28
>
> * typings: Split the DeviceState namespace types to a different file [Thodoris Greasidis]
> * typings: Split the DeviceTypeJson namespace types to a different file [Thodoris Greasidis]
> * typings: Split the SBVR model types to a different file [Thodoris Greasidis]
>
> ### balena-sdk-14.0.1 - 2020-06-15
>
> * appveyor: Increase the node space size [Thodoris Greasidis]
> * Bump balena-config-karma to v3 [Thodoris Greasidis]
>
</details>

# v10.2.1
## (2020-08-04)

* Use @balena/lint for linting [Pagan Gazzard]
* Add type checking [Pagan Gazzard]

# v10.2.0
## (2020-07-15)

* Add 'setAppIdAndCommit()' method to help decouple balena-cli and balena-preload [Paulo Castro]
* Increase losetup retry delay and count and print hint message on error [Paulo Castro]
* Print full stderr in the event of failure executing dockerd [Paulo Castro]

# v10.1.1
## (2020-07-10)

* Flake8 on src/preload.py [Alexis Svinartchouk]

# v10.1.0
## (2020-07-08)

* Add balena-sdk as a peer dependency since DI is also supported [Thodoris Greasidis]
* Make the balena-sdk instance an optional parameter [Thodoris Greasidis]

# v10.0.0
## (2020-07-01)

* Update to balena-sdk 14.x [Thodoris Greasidis]

# v9.0.0
## (2020-06-30)

* Update to balena-sdk 13.x [Pagan Gazzard]

## 8.4.0 - 2020-03-04

* Update dependencies [Pagan Gazzard]

## 8.3.1 - 2020-02-05

* Check os/app architecture compatibility rather than equvalence. [Scott Lowe]
* Update .gitignore [Scott Lowe]

## 8.3.0 - 2020-01-24

* Update dependencies [Pagan Gazzard]

## 8.2.2 - 2019-12-17

* Upgrade docker version to 17.12.0-ce [Theodor Gherzan]

## 8.2.1 - 2019-07-18

* Fix certificates path in the preloader container [Alexis Svinartchouk]

## 8.2.0 - 2019-05-29

* Add --add-certificate option [Alexis Svinartchouk]
* Stop mounting host's /etc/ssl/certs on Linux [Alexis Svinartchouk]
* Replace tar-stream with tar-fs [Alexis Svinartchouk]

## 8.1.4 - 2019-05-21

* Fetch the app commit if 'latest' is passed [Alexis Svinartchouk]

## 8.1.3 - 2019-05-15

* Use more robust regex to extract supervisor semver [Gergely Imreh]

## 8.1.2 - 2019-05-09

* Filter by commit as part of the query if it's specified [Pagan Gazzard]

## 8.1.1 - 2019-02-18

* Don't write device name in apps.json [Alexis Svinartchouk]

## 8.1.0 - 2019-01-07

* Bind mount host's /etc/ssl/certs folder on Linux [Alexis Svinartchouk]

## 8.0.4 - 2018-11-15

* Don't try to get the device type arch with --dontCheckArch [Alexis Svinartchouk]

## 8.0.3 - 2018-11-13

* The splash image is named resin-logo.png [Alexis Svinartchouk]

## 8.0.2 - 2018-11-13

* Don't try to pin releases when supervisor is < 7.0.0 [Alexis Svinartchouk]

## 8.0.1 - 2018-11-08

* Bind mount host's /dev to container's /dev [Alexis Svinartchouk]

## v8.0.0 - 2018-10-29

* Rename to balena-preload [Alexis Svinartchouk]

## v7.0.6 - 2018-10-29

* Don't build the Dockerfile on CI [Alexis Svinartchouk]

## v7.0.5 - 2018-09-06

* Filter out serviceId for supervisors < 7 [Alexis Svinartchouk]

## v7.0.4 - 2018-08-31

* Get the release ID not the application ID [Theodor Gherzan]

## v7.0.3 - 2018-08-29

* Use localhost instead of 0.0.0.0 to connect to Docker on win32 [Alexis Svinartchouk]

## v7.0.2 - 2018-08-28

* Preload.py: Flush output buffer when data's ready #183 [Gergely Imreh]
* Dockerfile: Do not rely on script being executable #183 [Gergely Imreh]

## v7.0.1 - 2018-08-21

* Pinning information should also be available for the resin-image-flasher #182 [Theodor Gherzan]

## v7.0.0 - 2018-08-20

* Check device architecture instead of device type #181 [Alexis Svinartchouk]

## v6.3.2 - 2018-08-09

* In the case of a flasher OS copy splash image to its boot partition #178 [Theodor Gherzan]

## v6.3.1 - 2018-05-30

* Increase size multiplier from 1.1 to 1.4 #177 [Alexis Svinartchouk]

## v6.3.0 - 2018-05-30

* Add circleci auto-deploy to npm #175 [Cameron Diver]
* Allow devices to be pinned following a preload provision #175 [Cameron Diver]

## v6.2.0 - 2018-03-23

* Update resin-sdk to 9.0.0-beta16, use $ before expand #171 [Alexis Svinartchouk]

## v6.1.2 - 2018-03-20

* Add appId to each app in apps.json for supertvisors < 7 (apps.json is from state v1) #169 [Alexis Svinartchouk]

## v6.1.1 - 2018-03-19

* Fix preloading images with supervisor version < 7 #167 [Alexis Svinartchouk]

## v6.1.0 - 2018-03-19

* Preload the release with the highest id if an app has no commit specified. #165 [Alexis Svinartchouk]
* Use state v1 endpoint when the supervisor version is < 7 #165 [Alexis Svinartchouk]
* Fix specifying commit #165 [Alexis Svinartchouk]

## v6.0.0 - 2018-03-09

* Multicontainer preload #155 [Alexis Svinartchouk]

## v5.2.2 - 2018-02-28

* Get_inner_image_path falls back to the first file in /opt if no deviceType.json file is found. #163 [Alexis Svinartchouk]

## v5.2.1 - 2018-02-22

* Get the inner image name from device_type.json #161 [Alexis Svinartchouk]

## v5.2.0 - 2018-02-06

* Preserve bootstrap code in MBR when resizing #158 [Alexis Svinartchouk]

## v5.1.2 - 2018-01-12

* Bind mount /dev on linux hosts #153 [Alexis Svinartchouk]

## v5.1.1 - 2017-12-12

* Remove all references to --dont-detect-flasher-type-images #151 [Alexis Svinartchouk]
* Minor fixes in preload.py #151 [Alexis Svinartchouk]

## v5.1.0 - 2017-12-12

* Preload images that use Balena instead of Docker #149 [Alexis Svinartchouk]

## v5.0.4 - 2017-11-17

* Wait for loop device to be detached before killing the container #147 [Alexis Svinartchouk]

## v5.0.3 - 2017-11-16

* Fix confusion between bytes and sectors on partition resize #145 [Alexis Svinartchouk]

## v5.0.2 - 2017-11-16

* Fix filesystem expansion after resize #143 [Alexis Svinartchouk]

## v5.0.1 - 2017-11-08

* Update README: docker-toolbox is not supported, aufs module is required. #141 [Alexis Svinartchouk]

## v5.0.0 - 2017-10-26

* Preload GPT disk images, remove --dont-detect-flasher-type-images option #138 [Alexis Svinartchouk]

## v4.0.9 - 2017-10-25

* Don't set Preloader.imageRepo in setApplication. #137 [Alexis Svinartchouk]

## v4.0.8 - 2017-10-24

* Fix incompatibility with Docker 1.12.6 (api version 1.24) #135 [Alexis Svinartchouk]

## v4.0.7 - 2017-10-24

* Fix the --dont-detect-flasher-type-images option. #133 [Alexis Svinartchouk]

## v4.0.6 - 2017-10-20

* Copy data between the MBR and the first partition when resizing a preloader image. #128 [Alexis Svinartchouk]

## v4.0.5 - 2017-10-20

* Don't crash if data/docker/network/files/local-kv.db doesn't exist #130 [Alexis Svinartchouk]

## v4.0.4 - 2017-10-18

* Fix preloading edison images 2.6+ (root partition filename changed) #126 [Alexis Svinartchouk]
* Support preloading 2.6+ resinOS images when hostapps use aufs or overlay2 #126 [Alexis Svinartchouk]
* Print a newline after each spinner #126 [Alexis Svinartchouk]

## v4.0.3 - 2017-10-18

* Fix the logic that defines where we get R_OK and W_OK constants for node 4 support #125 [Pablo Carranza Velez]

## v4.0.2 - 2017-10-16

* Get R_OK and W_OK constants from wherever they're available, to keep supporting node v4 for the time being #124 [Pablo Carranza Velez]

## v4.0.1 - 2017-10-13

* Handle cases where we are not redirected when making a request to the registry. #122 [Alexis Svinartchouk]

## v4.0.0 - 2017-10-13

* Allow preloading of Edison zip archives. #117 [Alexis Svinartchouk]

## v3.1.9 - 2017-10-06

* Don't use Array.includes, it is not supported in node4. #119 [Alexis Svinartchouk]

## v3.1.8 - 2017-09-28

* Use Docker bridged networking on platforms other than Linux. #111 [Alexis Svinartchouk]

## v3.1.7 - 2017-09-05

* Don't use docker's PortBindings as we run it with `--net=host` #108 [Alexis Svinartchouk]

## v3.1.6 - 2017-08-31

* Detect when the overlay module is not loaded and show an appropriate error. #105 [Alexis Svinartchouk]

## v3.1.5 - 2017-08-30

* The python script no longer pulls the build, instead it exposes dockerd to the js script. This allows us to have a progress bar for the docker pull. #102 [Alexis Svinartchouk]

## v3.1.4 - 2017-08-25

* Use the docker storage driver from /<rootfs>/lib/systemd/system/docker.service ExecStart key. #96 [Alexis Svinartchouk]

## v3.1.3 - 2017-08-25

* Fix js style (standard js) #100 [Alexis Svinartchouk]

## v3.1.2 - 2017-08-25

* Add flag for ignoring mismatching device types [Sven Schwermer]

## v3.1.1 - 2017-08-24

* Add a files section to package.json. #99 [Alexis Svinartchouk]

## v3.1.0 - 2017-08-22

* Add progress bars and spinners. #95 [Alexis Svinartchouk]

## v3.0.0 - 2017-08-21

* Don't preload the same build twice. #87 [Alexis Svinartchouk]

## v2.0.3 - 2017-08-21

* Don't call stdin.setRawMode if it doesn't exist. #93 [Alexis Svinartchouk]

## v2.0.2 - 2017-08-18

* Use only lower case for the preloaded image repository. #91 [Alexis Svinartchouk]

## v2.0.1 - 2017-08-16

* Correctly set the resin api token. #85 [Alexis Svinartchouk]

## v2.0.0 - 2017-08-11

* Integrate with resin-cli #81 [Alexis Svinartchouk]

## v1.4.1 - 2017-08-09

* Use --net=host for host's Docker. #83 [Alexis Svinartchouk]

## v1.4.0 - 2017-08-04

* Allow relative paths for the --image parameter. [Alexis Svinartchouk]

## v1.3.1 - 2017-08-04

* Update the README about --dont-detect-flasher-type-images [Alexis Svinartchouk]

## v1.3.0 - 2017-08-04

* Add a --dont-detect-flasher-type-images flag. [Alexis Svinartchouk]

## v1.2.2 - 2017-08-04

* Use standardJS [Alexis Svinartchouk]

## v1.2.1 - 2017-07-27

* Add CHANGELOG to allow VersionBot commits. [Alexis Svinartchouk]

## v1.2.0 - 2017-07-25

* Allow specifying an app commit to preload. [Alexis Svinartchouk]


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Biol. Gallo-Hellen. 4:12. 1972

#### Original name
null

### Remarks
null