text:
- [name](#name)

- [defaults](#defaults)
  - [protocol](#defaultsprotocol)
  - [source](#defaultssource)
  - [remote](#defaultsremote)
  - [branch](#defaultsbranch)
  - [tag](#defaultstag)
  - [commit](#defaultscommit)
  - [git](#defaultsgit)
    - [lfs](#defaultsgitlfs)
    - [recursive](#defaultsgitrecursive)
    - [depth](#defaultsgitdepth)
    - [config](#defaultsgitconfig)

- [sources](#sources)
  - [<source_name>](#sourcesname)
    - [url](#sourcesurl)
    - [protocol](#sourcesprotocol)

- [projects](#projects)
  - [name](#projectsname)
  - [source](#projectssource)
  - [branch](#projectsbranch)
  - [tag](#projectstag)
  - [commit](#projectscommit)
  - [path](#projectspath)
  - [remote](#projectsremote)
  - [groups](#projectsgroups)
  - [git](#git)

- [git](#git)
  - [lfs](#gitlfs)
  - [recursive](#gitrecursive)
  - [depth](#gitdepth)
  - [config](#gitconfig)
    - [<config_name>](#gitconfig_name)

- [upstream](#projectsupstream)
  - [name](#projectsupstreamname)
  - [source](#projectsupstreamsource)
  - [remote](#projectsupstreamremote)
  - [branch](#projectsupstreambranch)
  - [tag](#projectsupstreamtag)
  - [commit](#projectsupstreamcommit)

- [clowder](#clowder)
  - [<group_name>](#clowdergroup_name)
    - [path](#clowdergrouppath)
    - [groups](#clowdergroupgroups)
    - [defaults](#defaults)
  - [projects](#clowderprojects)

## `name`

Name to be displayed when running commands.

## `defaults`

Default settings that will apply to all projects or sources. If not specified, clowder assumes the following defaults:

- `remote`: `origin`
- `branch`: `master`
- `protocol`: `ssh`
- `source`: `github`

## `defaults.protocol`

The git protocol to use when cloning repositories. Options are `ssh` and `https`. If not specified, defaults to `ssh`.

See also: [sources.protocol](#sourcesprotocol)

## `defaults.source`

The name of the default source to use when cloning project repositories. If not specified, defaults to `github` (see [sources](#sources)).

See also: [projects.source](#projectssource), [projects.fork.source](#projectsforksource)

## `defaults.remote`

The default name of the git remote.

See also: [projects.remote](#projectsremote), [projects.fork.remote](#projectsforkremote)

## `defaults.branch`

The default name of the branch projects should track. Only one of `branch`, `tag`, or `commit` can be present.

See also: [projects.branch](#projectsbranch), [projects.fork.branch](#projectsforkbranch)

## `defaults.tag`

The default name of the tag projects should track. Only one of `branch`, `tag`, or `commit` can be present.

See also: [projects.tag](#projectstag), [projects.fork.tag](#projectsforktag)

## `defaults.commit`

The default commit projects should track. Must be the full 40-character sha-1. Only one of `branch`, `tag`, or `commit` can be present.

See also: [projects.commit](#projectscommit), [projects.fork.commit](#projectsforkcommit)

## `defaults.git`

Default git configuration.

See also: [projects.git](#projectsgit)

## `defaults.git.lfs`

Setting this value to `true` will install git lfs hooks and pull lfs files when `clowder herd` is run.

See also: [projects.git.lfs](#projectsgitlfs)

## `defaults.git.recursive`

Setting this value to `true` will recursively init and update submodules when `clowder herd` is run.

See also: [projects.git.recursive](#projectsgitrecursive)

## `defaults.git.depth`

The default depth git will clone repositories. Must be a positive integer. If set to `0` the full repository history will be cloned.

See also: [projects.git.depth](#projectsgitdepth)

## `defaults.git.config`

A map of git config values to install in projects. During an initial clone, they will be installed at the end. Later invocations of `clowder herd` will install the config values before running other commands. Git config values from defaults will be combined with those in [projects.git.confg](#projectsgitconfig). If the same keys are present, the project value will take priority. To prevent a default git config value from being inherited by a project, it must be set to `null` in [projects.git.config](#projectsgitconfig).

See also: [projects.git.config](#projectsgitconfig)

## `sources`

List of git hosting services. The following sources are defined by default:

- `github`: `github.com`
- `gitlab`: `gitlab.com`
- `bitbucket`: `bitbucket.org`

## `sources.name`

The name used to identify the source.

See also: [defaults.source](#defaultssource), [projects.source](#projectssource), [projects.fork.source](#projectsforkremote)

## `sources.url`

The Git URL prefix for all projects that use this source. This is combined with the protocol (see: [defaults.protocol](#defaultsprotocol) [sources.protocol](#sourcesprotocol)) and [projects.name](#projectsname) to form the full url for cloning the repository:

- `git@${sources.url}:${projects.name}.git`
- `https://${sources.url}/${projects.name}.git`

## `sources.protocol`

The Git URL protocol prefix for all projects which use this source. Accepted values are `ssh` and `https`. This is combined with with [sources.url](#sourcesurl) and [projects.name](#projectsname) to form the full url for cloning the repository:

- `git@${sources.url}:${projects.name}.git`
- `https://${sources.url}/${projects.name}.git`

See also: [defaults.protocol](#defaultsprotocol)

## `projects`

List of projects.

## `projects.name`

The project's name is appended onto its source's URL to generate the actual URL to configure the Git remote with. This is combined with the protocol (see: [defaults.protocol](#defaultsprotocol) [sources.protocol](#sourcesprotocol)) and [sources.url](#sourcesurl) to form the full url for cloning the repository:

- `git@${sources.url}:${projects.name}.git`
- `https://${sources.url}/${projects.name}.git`

## `projects.source`

Source to use for forming git clone url.

See also: [defaults.source](#defaultssource), [sources.name](#sourcesname)

## `projects.branch`

Name of the Git branch to track for this project. Only one of `branch`, `tag`, or `commit` can be present.

See also: [defaults.branch](#defaultsbranch)

## `projects.tag`

Name of the Git tag to track for this project. Only one of `tag`, `tag`, or `commit` can be present.

See also: [defaults.tag](#defaultstag)

## `projects.commit`

Commit the project should track. Must be full 40 character SHA-1. Only one of `commit`, `tag`, or `commit` can be present.

See also: [defaults.commit](#defaultscommit)

## `projects.path`

Relative path to clone git repository. If not present, then the last path component of [projects.name](#projectsname) will be used as the git clone path.

## `projects.remote`

The git remote name.

See also: [defaults.remote](#defaultsremote)

## `projects.groups`

Projects can specify custom groups in order to run commands for certain sets of projects. By default, all projects are added to the `all` group, and a group of their `name` and `path`. If `notdefault` is present, then the project will not be included in commands unless another group argument is given that it belongs to. The values of `all` and `default` are reserved and not allowed to be specified in this list.

## `projects.git`

Project git configuration.

See also: [defaults.git](#defaultsgit)

## `projects.git.lfs`

Setting this value to `true` will install git lfs hooks and pull lfs files when `clowder herd` is run.

See also: [defaults.git.lfs](#defaultsgitlfs)

## `projects.git.recursive`

Setting this value to `true` will recursively init and update submodules when `clowder herd` is run.

See also: [defaults.git.recursive](#defaultsgitrecursive)

## `projects.git.depth`

The default depth git will clone to. Must be a positive integer. If set to `0` the full repository history will be cloned.

See also: [defaults.git.depth](#defaultsgitdepth)

## `projects.git.config`

A map of git config values to install in the project. During an initial clone, they will be installed at the end. Later invocations of `clowder herd` will install the config values before running other commands. Git config values from [defaults.git.confg](#defaultsgitconfig) will be combined with those in the project. If the same keys are present, the project value will take priority. To prevent a value from [defaults.git.config](#defaultsgitconfig) from being inherited by the project, it must be set to `null`.

See also: [defaults.git.config](#defaultsgitconfig)

## `projects.fork`

A map of values defining a git fork.

## `projects.fork.name`

This is combined with the protocol (see: [defaults.protocol](#defaultsprotocol) [sources.protocol](#sourcesprotocol)) and [sources.url](#sourcesurl) to form the full url for cloning the repository:

- `git@${sources.url}:${projects.fork.name}.git`
- `https://${sources.url}/${projects.fork.name}.git`

## `projects.fork.source`

Source to use for forming git clone url.

See also: [defaults.source](#defaultssource), [sources.name](#sourcesname)

## `projects.fork.remote`

Git remote name.

See also: [defaults.remote](#defaultsremote)

## `projects.fork.branch`

Name of the branch to track for this project fork. Only one of `branch`, `tag`, or `commit` can be present. If not supplied and `tag` or `commit` are not specified in [projects.fork](#projectsfork) or [defaults](#defaults), the default branch `master` is used.

See also: [defaults.branch](#defaultsbranch)

## `projects.fork.tag`

Name of the Git tag to track for this project fork. Only one of `tag`, `tag`, or `commit` can be present. If not supplied and `branch` or `commit` are not specified in [projects.fork](#projectsfork) or [defaults](#defaults), the default branch `master` is used.

See also: [defaults.tag](#defaultstag)

## `projects.fork.commit`

A git commit SHA-1 to track for this project fork. Must be full 40 character SHA-1. Only one of `commit`, `tag`, or `commit` can be present. If not supplied and `branch` and `tag` are not specified in [projects.fork](#projectsfork) or [defaults](#defaults), the default branch `master` is used.

See also: [defaults.commit](#defaultscommit)


text:
package org.onosproject.drivers.bmv2.mirror;

import org.onosproject.drivers.bmv2.api.runtime.Bmv2Entity;
import org.onosproject.drivers.bmv2.api.runtime.Bmv2Handle;
import org.onosproject.net.DeviceId;

import java.util.Collection;

/**
 * Mirror of entities installed on a BMv2 device.
 *
 * @param <H> Handle class
 * @param <E> Entity class
 */
public interface Bmv2Mirror<H extends Bmv2Handle, E extends Bmv2Entity> {

    /**
     * Returns all entries for the given device ID.
     *
     * @param deviceId device ID
     * @return collection of BMv2 entries
     */
    Collection<E> getAll(DeviceId deviceId);

    /**
     * Returns entry associated to the given handle, if present, otherwise
     * null.
     *
     * @param handle handle
     * @return BMv2 entry
     */
    E get(H handle);

    /**
     * Stores the given entry associating it to the given handle.
     *
     * @param handle handle
     * @param entry  entry
     */
    void put(H handle, E entry);

    /**
     * Removes the entry associated to the given handle.
     *
     * @param handle handle
     */
    void remove(H handle);
}

redpajama_set_name: RedPajamaGithub


text:
package org.magcruise.gaming.manager.process;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.magcruise.gaming.executor.GameExecutor;
import org.magcruise.gaming.executor.api.message.RequestToGameExecutorTransferObject;
import org.magcruise.gaming.manager.GameExecutorManager;
import org.magcruise.gaming.model.def.GameBuilder;
import org.magcruise.gaming.model.game.ActorName;
import org.magcruise.gaming.model.game.Context;
import org.magcruise.gaming.model.game.Player;
import org.magcruise.gaming.model.game.Players;
import org.magcruise.gaming.util.SystemEnvironmentUtils;

public class InternalGameProcess implements GameProcess {

	protected static Logger log = LogManager.getLogger();

	protected GameExecutor executor;

	protected GameBuilder gameBuilder;

	public InternalGameProcess(GameBuilder gameBuilder) {
		this.gameBuilder = gameBuilder;
	}

	@Override
	public Object call() throws Exception {
		try {
			start();
		} catch (Exception e) {
			executor.context.setFinished(true);
			executor.shutdown();
		}
		return null;
	}

	@Override
	public void start() {
		executor = GameExecutorManager.getInstance().createAndRegisterGameExecutor(gameBuilder);
		executor.kickStartGame();
	}

	public Player getPlayer(ActorName playerName) {
		return executor.getContext().getPlayer(playerName);
	}

	public Context getContext() {
		return executor.getContext();
	}

	public void request(RequestToGameExecutorTransferObject request) {
		executor.getMessenger().sendMessage(request);
	}

	public GameExecutor getExecutor() {
		return executor;

	}

	private boolean isFinished() {
		return executor.getContext().isFinished();
	}

	public Players<? extends Player> getPlayers() {
		return getContext().getPlayers();
	}

	@Override
	public int waitFor() {
		while (!isFinished()) {
			try {
				Thread.sleep(100);
			} catch (InterruptedException e) {
				log.warn(e, e);
				return 1;
			}
		}
		return 0;
	}

	@Override
	public ProcessId getProcessId() {
		return executor.getProcessId();
	}

	@Override
	public String getLatestRecord(ProcessId processId) {
		return SystemEnvironmentUtils.getLatestRecord(processId);
	}

}


text:
/* global Tether */

const {
  extend,
  addClass,
  removeClass,
  hasClass,
  getBounds,
  Evented
} = Tether.Utils;

const ENTER = 13;
const ESCAPE = 27;
const SPACE = 32;
const UP = 38;
const DOWN = 40;

const touchDevice = 'ontouchstart' in document.documentElement;
const clickEvent = touchDevice ? 'touchstart' : 'click';

function useNative() {
  const {innerWidth, innerHeight} = window;
  return touchDevice && (innerWidth <= 640 || innerHeight <= 640);
}

function isRepeatedChar (str) {
  return Array.prototype.reduce.call(str, (a, b) => {
    return a === b ? b : false;
  });
}

function getFocusedSelect () {
  const focusedTarget = document.querySelector('.select-target-focused');
  return focusedTarget ? focusedTarget.selectInstance : null;
}

let searchText = '';
let searchTextTimeout;

document.addEventListener('keypress', (e) => {
  const select = getFocusedSelect();
  if (!select || e.charCode === 0) {
    return;
  }

  if (e.keyCode === SPACE) {
    e.preventDefault();
  }

  clearTimeout(searchTextTimeout);
  searchTextTimeout = setTimeout(() => {
    searchText = '';
  }, 500);

  searchText += String.fromCharCode(e.charCode);

  const options = select.findOptionsByPrefix(searchText);

  if (options.length === 1) {
    // We have an exact match, choose it
    select.selectOption(options[0]);
  }

  if (searchText.length > 1 && isRepeatedChar(searchText)) {
    // They hit the same char over and over, maybe they want to cycle through
    // the options that start with that char
    const repeatedOptions = select.findOptionsByPrefix(searchText[0]);

    if (repeatedOptions.length) {
      let selected = repeatedOptions.indexOf(select.getChosen());

      // Pick the next thing (if something with this prefix wasen't selected
      // we'll end up with the first option)
      selected += 1;
      selected = selected % repeatedOptions.length;

      select.selectOption(repeatedOptions[selected]);
      return;
    }
  }

  if (options.length) {
    // We have multiple things that start with this prefix.  Based on the
    // behavior of native select, this is considered after the repeated case.
    select.selectOption(options[0]);
    return;
  }

  // No match at all, do nothing
})

document.addEventListener('keydown', (e) => {
  // We consider this independently of the keypress handler so we can intercept
  // keys that have built-in functions.
  const select = getFocusedSelect();
  if (!select) {
    return;
  }

  if ([UP, DOWN, ESCAPE].indexOf(e.keyCode) >= 0) {
    e.preventDefault();
  }

  if (select.isOpen()) {
    switch(e.keyCode) {
      case UP:
      case DOWN:
        select.moveHighlight(e.keyCode);
        break;
      case ENTER:
        select.selectHighlightedOption();
        break;
      case ESCAPE:
        select.close();
        select.target.focus();
    }
  } else {
    if ([UP, DOWN, SPACE].indexOf(e.keyCode) >= 0) {
      select.open();
    }
  }
});

class Select extends Evented {
  constructor(options) {
    super(options);
    this.options = extend({}, Select.defaults, options);
    this.select = this.options.el;

    if (typeof this.select.selectInstance !== 'undefined') {
      throw new Error('This element has already been turned into a Select');
    }

    this.update = this.update.bind(this);

    this.setupTarget();
    this.renderTarget();

    this.setupDrop();
    this.renderDrop();

    this.setupSelect();

    this.setupTether();
    this.bindClick();

    this.bindMutationEvents();

    this.value = this.select.value;
  }

  useNative() {
    const native = this.options.useNative;
    return native === true || (useNative() && native !== false);
  }

  setupTarget() {
    this.target = document.createElement('a');
    this.target.href = 'javascript:;';

    addClass(this.target, 'select-target');

    const tabIndex = this.select.getAttribute('tabindex') || 0;
    this.target.setAttribute('tabindex', tabIndex);

    if (this.options.className) {
      addClass(this.target, this.options.className);
    }

    this.target.selectInstance = this;

    this.target.addEventListener('click', () => {
      if (!this.isOpen()) {
        this.target.focus();
      } else {
        this.target.blur();
      }
    });

    this.target.addEventListener('focus', () => {
      addClass(this.target, 'select-target-focused');
    });

    this.target.addEventListener('blur', ({relatedTarget}) => {
      if (this.isOpen()) {
        if (relatedTarget && !this.drop.contains(relatedTarget)) {
          this.close();
        }
      }

      removeClass(this.target, 'select-target-focused');
    });

    this.select.parentNode.insertBefore(this.target, this.select.nextSibling);
  }

  setupDrop() {
    this.drop = document.createElement('div');
    addClass(this.drop, 'select');

    if (this.options.className) {
      addClass(this.drop, this.options.className);
    }

    document.body.appendChild(this.drop);

    this.drop.addEventListener('click', (e) => {
      if (hasClass(e.target, 'select-option')) {
        this.pickOption(e.target);
      }

      // Built-in selects don't propagate click events in their drop directly
      // to the body, so we don't want to either.
      e.stopPropagation();
    });

    this.drop.addEventListener('mousemove', (e) => {
      if (hasClass(e.target, 'select-option')) {
        this.highlightOption(e.target);
      }
    });

    this.content = document.createElement('div');
    addClass(this.content, 'select-content');
    this.drop.appendChild(this.content);
  }

  open() {
    addClass(this.target, 'select-open');

    if (this.useNative()) {
      this.select.style.display = 'block';

      setTimeout(() => {
        let event = document.createEvent("MouseEvents");
        event.initEvent("mousedown", true, true);
        this.select.dispatchEvent(event);
      });

      return;
    }

    addClass(this.drop, 'select-open');

    setTimeout(() => {
      this.tether.enable();
    });

    const selectedOption = this.drop.querySelector('.select-option-selected');

    if (!selectedOption) {
      return;
    }

    this.highlightOption(selectedOption);
    this.scrollDropContentToOption(selectedOption);

    const positionSelectStyle = () => {
      if (hasClass(this.drop, 'tether-abutted-left') ||
          hasClass(this.drop, 'tether-abutted-bottom')) {
        const dropBounds = getBounds(this.drop);
        const optionBounds = getBounds(selectedOption);

        const offset = dropBounds.top - (optionBounds.top + optionBounds.height);

        this.drop.style.top = `${(parseFloat(this.drop.style.top) || 0) + offset}px`;
      }
    };

    const alignToHighlighted = this.options.alignToHighlighted;
    const {scrollHeight, clientHeight} = this.content;
    if (alignToHighlighted === 'always' || (alignToHighlighted === 'auto' && scrollHeight <= clientHeight)) {
      setTimeout(() => {
        positionSelectStyle();
      });
    }

    this.trigger('open');
  }

  close() {
    removeClass(this.target, 'select-open');

    if (this.useNative()) {
      this.select.style.display = 'none';
      return;
    }

    this.tether.disable();

    removeClass(this.drop, 'select-open');

    this.trigger('close');
  }

  toggle() {
    if (this.isOpen()) {
      this.close();
    } else {
      this.open();
    }
  }

  isOpen() {
    return hasClass(this.drop, 'select-open');
  }

  bindClick() {
    this.target.addEventListener(clickEvent, (e) => {
      e.preventDefault();
      this.toggle();
    });

    document.addEventListener(clickEvent, (event) => {
      if (!this.isOpen()) {
        return;
      }

      // Clicking inside dropdown
      if (event.target === this.drop ||
          this.drop.contains(event.target)) {
        return;
      }

      // Clicking target
      if (event.target === this.target ||
          this.target.contains(event.target)) {
        return;
      }

      this.close();
    });
  }

  setupTether() {
    this.tether = new Tether(extend({
      element: this.drop,
      target: this.target,
      attachment: 'top left',
      targetAttachment: 'bottom left',
      classPrefix: 'select',
      constraints: [{
        to: 'window',
        attachment: 'together'
      }]
    }, this.options.tetherOptions));
  }

  renderTarget() {
    this.target.innerHTML = '';

    const options = this.select.querySelectorAll('option');
    for (let i = 0; i < options.length; ++i) {
      const option = options[i];
      if (option.selected) {
        this.target.innerHTML = option.innerHTML;
        break;
      }
    }

    this.target.appendChild(document.createElement('b'));
  }

  renderDrop() {
    let optionList = document.createElement('ul');
    addClass(optionList, 'select-options');

    const options = this.select.querySelectorAll('option');
    for (let i = 0; i < options.length; ++i) {
      let el = options[i];
      let option = document.createElement('li');
      addClass(option, 'select-option');

      option.setAttribute('data-value', el.value);
      option.innerHTML = el.innerHTML;

      if (el.selected) {
        addClass(option, 'select-option-selected');
      }

      optionList.appendChild(option);
    }

    this.content.innerHTML = '';
    this.content.appendChild(optionList);
  }

  update() {
    this.renderDrop();
    this.renderTarget();
  }

  setupSelect() {
    this.select.selectInstance = this;

    addClass(this.select, 'select-select');

    this.select.addEventListener('change', this.update);
  }

  bindMutationEvents() {
    if (typeof window.MutationObserver !== 'undefined') {
      this.observer = new MutationObserver(this.update);
      this.observer.observe(this.select, {
        childList: true,
        attributes: true,
        characterData: true,
        subtree: true
      });
    } else {
      this.select.addEventListener('DOMSubtreeModified', this.update);
    }
  }

  findOptionsByPrefix(text) {
    let options = this.drop.querySelectorAll('.select-option');

    text = text.toLowerCase();

    return Array.prototype.filter.call(options, (option) => {
      return option.innerHTML.toLowerCase().substr(0, text.length) === text;
    });
  }

  findOptionsByValue(val) {
    let options = this.drop.querySelectorAll('.select-option');

    return Array.prototype.filter.call(options, (option) => {
      return option.getAttribute('data-value') === val;
    });
  }

  getChosen() {
    if (this.isOpen()) {
      return this.drop.querySelector('.select-option-highlight');
    }
    return this.drop.querySelector('.select-option-selected');
  }

  selectOption(option) {
    if (this.isOpen()) {
      this.highlightOption(option);
      this.scrollDropContentToOption(option);
    } else {
      this.pickOption(option, false);
    }
  }

  resetSelection() {
    this.selectOption(this.drop.querySelector('.select-option'));
  }

  highlightOption(option) {
    let highlighted = this.drop.querySelector('.select-option-highlight');
    if (highlighted) {
      removeClass(highlighted, 'select-option-highlight');
    }

    addClass(option, 'select-option-highlight');

    this.trigger('highlight', {option});
  }

  moveHighlight(directionKeyCode) {
    const highlighted = this.drop.querySelector('.select-option-highlight');
    if (!highlighted) {
      this.highlightOption(this.drop.querySelector('.select-option'));
      return;
    }

    const options = this.drop.querySelectorAll('.select-option');

    let highlightedIndex = Array.prototype.indexOf.call(options, highlighted);
    if (!(highlightedIndex >= 0)) {
      return;
    }

    if (directionKeyCode === UP) {
      highlightedIndex -= 1;
    } else {
      highlightedIndex += 1;
    }

    if (highlightedIndex < 0 || highlightedIndex >= options.length) {
      return;
    }

    const newHighlight = options[highlightedIndex];

    this.highlightOption(newHighlight);
    this.scrollDropContentToOption(newHighlight);
  }

  scrollDropContentToOption(option) {
    const {scrollHeight, clientHeight, scrollTop} = this.content;
    if (scrollHeight > clientHeight) {
      const contentBounds = getBounds(this.content);
      const optionBounds = getBounds(option);

      this.content.scrollTop = optionBounds.top - (contentBounds.top - scrollTop);
    }
  }

  selectHighlightedOption() {
    this.pickOption(this.drop.querySelector('.select-option-highlight'));
  }

  pickOption(option, close=true) {
    this.value = this.select.value = option.getAttribute('data-value');
    this.triggerChange();

    if (close) {
      setTimeout(() => {
        this.close();
        this.target.focus();
      });
    }
  }

  triggerChange() {
    let event = document.createEvent("HTMLEvents");
    event.initEvent("change", true, false);
    this.select.dispatchEvent(event);

    this.trigger('change', {value: this.select.value});
  }

  change(val) {
    const options = this.findOptionsByValue(val);

    if (!options.length) {
      throw new Error(`Select Error: An option with the value "${ val }" doesn't exist`);
    }

    this.pickOption(options[0], false);
  }
}

Select.defaults = {
  alignToHighlighed: 'auto',
  className: 'select-theme-default'
};

Select.init = (options={}) => {
  if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', () => Select.init(options));
    return;
  }

  if (typeof options.selector === 'undefined') {
    options.selector = 'select';
  }

  const selectors = document.querySelectorAll(options.selector);
  for (let i = 0; i < selectors.length; ++i) {
    const el = selectors[i];
    if (!el.selectInstance) {
      new Select(extend({el}, options));
    }
  }
};


text:
package com.wistron.StereoUI;

import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.animation.Animation;
import android.widget.AbsoluteLayout;
import android.widget.ImageView;

@SuppressWarnings("deprecation")
public class CSImageView extends CSView{
	protected ImageView[] m_imageviews = null;

	public CSImageView(Context context) {
		super(context);
		m_context = context;
		m_imageviews = new ImageView[2];
		for (int i = 0; i < m_imageviews.length; i++) {
			m_imageviews[i] = new ImageView(context);
		}
	}

	@Override
	public void setVisibility(int visibility) {
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return;
		}

		m_imageviews[0].setVisibility(visibility);
		m_imageviews[1].setVisibility(visibility);
	}

	@Override
	public void setEnable(boolean enabled) {
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return;
		}

		m_imageviews[0].setEnabled(enabled);
		m_imageviews[1].setEnabled(enabled);
	}

	@Override
	public void setDimension(boolean is3d) {
		super.setDimension(is3d);
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return;
		}

		if(m_imageviews[0].getLayoutParams() != null && m_imageviews[1].getLayoutParams() != null){
			if(m_cur_width == WRAP_CONTENT || m_cur_height == WRAP_CONTENT){
				m_imageviews[0].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_lx, m_cur_ly));
				m_imageviews[1].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_rx, m_cur_ry));
			}else{
				m_imageviews[0].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_lx, m_cur_ly));
				m_imageviews[1].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_rx, m_cur_ry));
			}
			m_imageviews[0].requestLayout();
			m_imageviews[1].requestLayout();
		}
	}

	@Override
	public void setLocation(int x, int y) {
		super.setLocation(x, y);
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return;
		}
		if(m_imageviews[0].getLayoutParams() != null && m_imageviews[1].getLayoutParams() != null){
			if(m_cur_width == WRAP_CONTENT || m_cur_height == WRAP_CONTENT){
				m_imageviews[0].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_lx, m_cur_ly));
				m_imageviews[1].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_rx, m_cur_ry));
			}else{
				m_imageviews[0].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_lx, m_cur_ly));
				m_imageviews[1].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_rx, m_cur_ry));
			}
			m_imageviews[0].requestLayout();
			m_imageviews[1].requestLayout();
		}
	}

	public void setClickable(Boolean clickable){
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return;
		}

		m_imageviews[0].setClickable(clickable);
		m_imageviews[1].setClickable(clickable);

	}

	public void setAnimation(Animation animation){
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return;
		}

		m_imageviews[0].startAnimation(animation);
		m_imageviews[1].startAnimation(animation);

	}
	@Override
	public boolean touchEvent(MotionEvent event) {
		boolean state = false;

		int [] location0 = new int[2];
		int [] location1 = new int[2];

		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return state;
		}

		m_imageviews[0].getLocationOnScreen(location0);
		m_imageviews[1].getLocationOnScreen(location1);

		//若控件隐藏,则不响应点击事件
		if(getVisibility()==View.INVISIBLE || getVisibility()==View.GONE){
			return false;
		}

		if(m_is_3D){
			//Under 3D mode
			if(
					(location0[0] <= event.getRawX()/2 - m_offset
					&& location0[0] + m_imageviews[0].getWidth() >= event.getRawX()/2 - m_offset
					&& location0[1] <= event.getRawY()
					&& location0[1] + m_imageviews[0].getHeight() >= event.getRawY())
					||
					(location1[0] <= event.getRawX()/2 + m_offset
					&& location1[0] + m_imageviews[1].getWidth() >= event.getRawX()/2 + m_offset
					&& location1[1] <= event.getRawY()
					&& location1[1] + m_imageviews[1].getHeight() >= event.getRawY()))
			{
				if(event.getAction() != MotionEvent.ACTION_MOVE)
				{
					state |= m_imageviews[0].onTouchEvent(event);
					state |= m_imageviews[1].onTouchEvent(event);
				}
			}
		}else{
			//Under 2D mode
//			if(
//					location0[0] <= event.getRawX()
//					&& location0[0] + m_imageviews[0].getWidth() >= event.getRawX()
//					&& location0[1] <= event.getRawY()
//					&& location0[1] + m_imageviews[0].getHeight() >= event.getRawY()
//					)
//			{
//				if(event.getAction() != MotionEvent.ACTION_MOVE)
//				{
//					state |= m_imageviews[0].onTouchEvent(event);
//					state |= m_imageviews[1].onTouchEvent(event);
//				}
//			}
		}

		return state;
	}

	@Override
	public void addToLayout(ViewGroup alayout) {
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return;
		}

		if(alayout == null){
			return;
		}

		if(m_cur_width == WRAP_CONTENT || m_cur_height == WRAP_CONTENT){
			m_imageviews[0].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_lx, m_cur_ly));
			m_imageviews[1].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_rx, m_cur_ry));
		}else{
			m_imageviews[0].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_lx, m_cur_ly));
			m_imageviews[1].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_rx, m_cur_ry));
		}

		alayout.addView(m_imageviews[0]);
		alayout.addView(m_imageviews[1]);
	}

	/**
	 * 获取控件的可见性
	 * @return
	 */
	public int getVisibility(){
		int visile = View.NO_ID;
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			visile = View.NO_ID;
		}

		visile = m_imageviews[0].getVisibility();

		return visile;
	}

	/**
	 * Set this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable.
	 * @param isAdjust
	 */
	public void setAdjustViewBounds(boolean isAdjust){
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return;
		}

		m_imageviews[0].setAdjustViewBounds(isAdjust);
		m_imageviews[1].setAdjustViewBounds(isAdjust);
	}

	public void setOnClickListener(OnClickListener l){
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return;
		}
		m_imageviews[0].setOnClickListener(l);
		m_imageviews[1].setOnClickListener(l);
	}
	/**
	 * 设置透明度
	 * @param alpha
	 */
	public void setAlpha(int alpha) {
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return;
		}

		m_imageviews[0].setAlpha(alpha);
		m_imageviews[1].setAlpha(alpha);
	}

	/**
	 * Set the background to a given resource. The resource should refer to a Drawable object or 0 to remove the background.
	 * @param resid
	 */
	public void setBackgroundResource(int resid) {
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return;
		}

		m_imageviews[0].setBackgroundResource(resid);
		m_imageviews[1].setBackgroundResource(resid);
	}

	/**
	 * Sets a drawable as the content of this ImageView.
	 * This does Bitmap reading and decoding on the UI thread, which can cause a latency hiccup. If that's a concern, consider using setImageDrawable(Drawable) or setImageBitmap(Bitmap) and BitmapFactory instead.
	 * @param resid the resource identifier of the the drawable
	 */
	public void setImageResource(int resid) {
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return;
		}

		m_imageviews[0].setImageResource(resid);
		m_imageviews[1].setImageResource(resid);
	}

	public void setBackgroundColor(int color){
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return;
		}

		m_imageviews[0].setBackgroundColor(color);
		m_imageviews[1].setBackgroundColor(color);
	}

	public void setLayoutParams(LayoutParams lParams, LayoutParams rParams){
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return;
		}

		m_imageviews[0].setLayoutParams(lParams);
		m_imageviews[1].setLayoutParams(rParams);
	}

	/**
	 * Call this view's OnClickListener, if it is defined.
	 * @return True there was an assigned OnClickListener that was called, false otherwise is returned.
	 */
	public boolean performClick(){
		boolean state = false;
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return false;
		}

		state |= m_imageviews[0].performClick();

		return state;
	}

	/**
	 * 设置控件内部的内容与控件的边距
	 */
	@Override
	public void setPadding(int left, int top, int right, int bottom) {
		if(m_imageviews[0] == null || m_imageviews[1] == null){
			return;
		}

		m_imageviews[0].setPadding(left, top, right, bottom);
		m_imageviews[1].setPadding(left, top, right, bottom);
	}

	@Override
	public Object save() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void restore(Object object) {
		// TODO Auto-generated method stub

	}
}


text:
using UnityEditor.Rendering;
using UnityEngine.Experimental.Rendering.HDPipeline;

namespace UnityEditor.Experimental.Rendering.HDPipeline
{
    internal class SerializedHDReflectionProbe : SerializedHDProbe
    {
        internal SerializedObject serializedLegacyObject;

        SerializedProperty legacyBlendDistance;
        SerializedProperty legacySize;
        SerializedProperty legacyOffset;
        SerializedProperty legacyMode;

        SerializedProperty bakedRenderData;
        SerializedProperty customRenderData;

        public SerializedHDReflectionProbe(SerializedObject legacyProbe, SerializedObject additionalData)
            : base(additionalData)
        {
            serializedLegacyObject = legacyProbe;

            legacySize = legacyProbe.FindProperty("m_BoxSize");
            legacyOffset = legacyProbe.FindProperty("m_BoxOffset");
            legacyBlendDistance = legacyProbe.FindProperty("m_BlendDistance");
            legacyMode = legacyProbe.FindProperty("m_Mode");

            bakedRenderData = additionalData.Find((HDAdditionalReflectionData d) => d.bakedRenderData);
            customRenderData = additionalData.Find((HDAdditionalReflectionData d) => d.customRenderData);
        }

        internal override void Update()
        {
            serializedLegacyObject.Update();
            base.Update();

            // Set the legacy blend distance to 0 so the legacy culling system use the probe extent
            legacyBlendDistance.floatValue = 0;
        }

        internal override void Apply()
        {
            // Force the mode to real time so its influence is properly culled by the camera.
            legacyMode.intValue = 1;

            serializedLegacyObject.ApplyModifiedProperties();
            base.Apply();
        }
    }
}


text:
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using ForumDEG.ViewModels;
using System.Diagnostics;

namespace ForumDEG.Views {
    [XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class ForumsPage : ContentPage {
        public ForumsPage() {
            BindingContext = ForumsViewModel.GetInstance();
            // calling simulation method
            ViewModel.UpdateForumsList();
            InitializeComponent();
        }

        override protected void OnAppearing() {}

        private void ItemSelected(object sender, SelectedItemChangedEventArgs e) {
            Debug.WriteLine("Clicked item");

            if (e.SelectedItem != null && ViewModel.SelectForumCommand != null && ViewModel.SelectForumCommand.CanExecute(e)) {
                ViewModel.SelectForumCommand.Execute(e.SelectedItem);
                ViewModel.SelectedForum = null;
            }

        }

    private ForumsViewModel ViewModel {
            get { return (BindingContext as ForumsViewModel); }
            set { BindingContext = value; }
        }
    }
}


text:
/*
    This file is part of the WebKit open source project.
    This file has been generated by generate-bindings.pl. DO NOT MODIFY!

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public License
    along with this library; see the file COPYING.LIB.  If not, write to
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

#include "config.h"
#include "V8StyleSheetList.h"

#include "ExceptionCode.h"
#include "RuntimeEnabledFeatures.h"
#include "V8Binding.h"
#include "V8BindingMacros.h"
#include "V8BindingState.h"
#include "V8Collection.h"
#include "V8DOMWrapper.h"
#include "V8IsolatedContext.h"
#include "V8Proxy.h"
#include "V8StyleSheet.h"
#include <wtf/GetPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>

namespace WebCore {

WrapperTypeInfo V8StyleSheetList::info = { V8StyleSheetList::GetTemplate, V8StyleSheetList::derefObject, 0, 0 };

namespace StyleSheetListInternal {

template <typename T> void V8_USE(T) { }

static v8::Handle<v8::Value> lengthAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.StyleSheetList.length._get");
    StyleSheetList* imp = V8StyleSheetList::toNative(info.Holder());
    return v8::Integer::NewFromUnsigned(imp->length());
}

static v8::Handle<v8::Value> itemCallback(const v8::Arguments& args)
{
    INC_STATS("DOM.StyleSheetList.item");
    StyleSheetList* imp = V8StyleSheetList::toNative(args.Holder());
    EXCEPTION_BLOCK(unsigned, index, toUInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)));
    return toV8(imp->item(index));
}

} // namespace StyleSheetListInternal

static const BatchedAttribute StyleSheetListAttrs[] = {
    // Attribute 'length' (Type: 'readonly attribute' ExtAttr: '')
    {"length", StyleSheetListInternal::lengthAttrGetter, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
};

static const BatchedCallback StyleSheetListCallbacks[] = {
    {"item", StyleSheetListInternal::itemCallback},
};

static v8::Persistent<v8::FunctionTemplate> ConfigureV8StyleSheetListTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
    desc->ReadOnlyPrototype();

    v8::Local<v8::Signature> defaultSignature = configureTemplate(desc, "StyleSheetList", v8::Persistent<v8::FunctionTemplate>(), V8StyleSheetList::internalFieldCount,
        StyleSheetListAttrs, WTF_ARRAY_LENGTH(StyleSheetListAttrs),
        StyleSheetListCallbacks, WTF_ARRAY_LENGTH(StyleSheetListCallbacks));
    v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
    v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();

    setCollectionIndexedGetter<StyleSheetList, StyleSheet>(desc);
    desc->InstanceTemplate()->SetNamedPropertyHandler(V8StyleSheetList::namedPropertyGetter, 0, 0, 0, 0);

    // Custom toString template
    desc->Set(getToStringName(), getToStringTemplate());
    return desc;
}

v8::Persistent<v8::FunctionTemplate> V8StyleSheetList::GetRawTemplate()
{
    V8BindingPerIsolateData* data = V8BindingPerIsolateData::current();
    V8BindingPerIsolateData::TemplateMap::iterator result = data->rawTemplateMap().find(&info);
    if (result != data->rawTemplateMap().end())
        return result->second;

    v8::HandleScope handleScope;
    v8::Persistent<v8::FunctionTemplate> templ = createRawTemplate();
    data->rawTemplateMap().add(&info, templ);
    return templ;
}

v8::Persistent<v8::FunctionTemplate> V8StyleSheetList::GetTemplate()
{
    V8BindingPerIsolateData* data = V8BindingPerIsolateData::current();
    V8BindingPerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info);
    if (result != data->templateMap().end())
        return result->second;

    v8::HandleScope handleScope;
    v8::Persistent<v8::FunctionTemplate> templ =
        ConfigureV8StyleSheetListTemplate(GetRawTemplate());
    data->templateMap().add(&info, templ);
    return templ;
}

bool V8StyleSheetList::HasInstance(v8::Handle<v8::Value> value)
{
    return GetRawTemplate()->HasInstance(value);
}

v8::Handle<v8::Object> V8StyleSheetList::wrapSlow(StyleSheetList* impl)
{
    v8::Handle<v8::Object> wrapper;
    V8Proxy* proxy = 0;
    wrapper = V8DOMWrapper::instantiateV8Object(proxy, &info, impl);
    if (wrapper.IsEmpty())
        return wrapper;

    impl->ref();
    v8::Persistent<v8::Object> wrapperHandle = v8::Persistent<v8::Object>::New(wrapper);

    if (!hasDependentLifetime)
        wrapperHandle.MarkIndependent();
    getDOMObjectMap().set(impl, wrapperHandle);
    return wrapper;
}

void V8StyleSheetList::derefObject(void* object)
{
    static_cast<StyleSheetList*>(object)->deref();
}

} // namespace WebCore


text:
import React from 'react'
import ReactDOM from 'react-dom'
import AppContainer from './components/app-container'
import { injectGlobal } from 'styled-components'

injectGlobal`
  body {
    margin: 0;
    height: 100vh;
    box-sizing: border-box;
    background-color: #eee;
  }

  *, :after, :before {
    box-sizing: inherit;
  }
`

ReactDOM.render(<AppContainer />, document.querySelector('#app'))


text:
Our docs have moved! Please visit the below link:

http://docs.php-opencloud.com/en/latest/debugging.html


text:
/*
 * Generated by the Jasper component of Apache Tomcat
 * Version: Apache Tomcat/8.5.11
 * Generated at: 2017-05-04 09:09:43 UTC
 * Note: The last modified time of this file was set to
 *       the last modified time of the source file after
 *       generation to assist with modification tracking.
 */
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.List;
import com.object.TuVung;

public final class homqua_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent,
                 org.apache.jasper.runtime.JspSourceImports {

  private static final javax.servlet.jsp.JspFactory _jspxFactory =
          javax.servlet.jsp.JspFactory.getDefaultFactory();

  private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;

  static {
    _jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(5);
    _jspx_dependants.put("/WEB-INF/lib/taglibs-standard-impl-1.2.5.jar", Long.valueOf(1493259754000L));
    _jspx_dependants.put("jar:file:/root/tomcat/tomcat-8.5.11/webapps/engreview/WEB-INF/lib/taglibs-standard-impl-1.2.5.jar!/META-INF/c.tld", Long.valueOf(1425978670000L));
    _jspx_dependants.put("/footer.jsp", Long.valueOf(1493259754000L));
    _jspx_dependants.put("/import.jsp", Long.valueOf(1493259754000L));
    _jspx_dependants.put("/header.jsp", Long.valueOf(1493857769000L));
  }

  private static final java.util.Set<java.lang.String> _jspx_imports_packages;

  private static final java.util.Set<java.lang.String> _jspx_imports_classes;

  static {
    _jspx_imports_packages = new java.util.HashSet<>();
    _jspx_imports_packages.add("javax.servlet");
    _jspx_imports_packages.add("javax.servlet.http");
    _jspx_imports_packages.add("javax.servlet.jsp");
    _jspx_imports_classes = new java.util.HashSet<>();
    _jspx_imports_classes.add("java.util.List");
    _jspx_imports_classes.add("com.object.TuVung");
  }

  private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fscope_005fnobody;
  private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems;

  private volatile javax.el.ExpressionFactory _el_expressionfactory;
  private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;

  public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
    return _jspx_dependants;
  }

  public java.util.Set<java.lang.String> getPackageImports() {
    return _jspx_imports_packages;
  }

  public java.util.Set<java.lang.String> getClassImports() {
    return _jspx_imports_classes;
  }

  public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
    if (_el_expressionfactory == null) {
      synchronized (this) {
        if (_el_expressionfactory == null) {
          _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
        }
      }
    }
    return _el_expressionfactory;
  }

  public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
    if (_jsp_instancemanager == null) {
      synchronized (this) {
        if (_jsp_instancemanager == null) {
          _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
        }
      }
    }
    return _jsp_instancemanager;
  }

  public void _jspInit() {
    _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fscope_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
    _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
  }

  public void _jspDestroy() {
    _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fscope_005fnobody.release();
    _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.release();
  }

  public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
      throws java.io.IOException, javax.servlet.ServletException {

    final java.lang.String _jspx_method = request.getMethod();
    if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
      response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET POST or HEAD");
      return;
    }

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html; charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
      out.write("<link rel=\"shortcut icon\" type=\"image/ico\" href=\"favicon.ico\" /> \n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("<link  rel=\"stylesheet\" href=\"");
      out.print(request.getContextPath());
      out.write("/css/all.css\" >\n");
      out.write("\n");
      out.write(" ");
      out.write(" \n");
      out.write("\n");
      out.write("<title>Hôm qua</title>\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\t");
      out.write("\n");
      out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
      out.write("\n");
      out.write(" \n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\t
\n");
      out.write("
Home
 \n");
      out.write("
Anh-Việt
\n");
      out.write("
Việt-Anh
\n");
      out.write("
Chi tiết
\n");
      out.write("
Toeic 600
\n");
      out.write("
Cài đặt
\n");
      out.write("
Hôm nay
\n");
      out.write("
Hôm qua
\n");
      out.write("
Hôm kia
 \n");
      out.write("
Fibonaci
\n");
      out.write("
Ôn tập
\n");
      out.write("
Chao Filter
\n");
      out.write("  \n");
      out.write("
Theo dõi
\n");
      out.write("
\n");
      out.write("\n");
      out.write("");
      out.write(" \n");
      out.write("\t
\n");
      out.write("\t\t");
List<TuVung> listTuVung = (List<TuVung>)request.getAttribute("listTuVung");

      out.write("\n");
      out.write("\t\tSố từ vựng hôm qua học: ");
      out.print(listTuVung.size() );
      out.write("
\n");
      out.write("\t");
      if (_jspx_meth_c_005fset_005f0(_jspx_page_context))
        return;
      out.write("\n");
      out.write("\t<button id=\"hienthixoa\" >Hiển thị xóa</button>\n");
      out.write("\t<button id=\"hienthinghia\" >Hiển thị nghĩa</button>\n");
      out.write("\t
\n");
      out.write("\t");
      //  c:forEach
      org.apache.taglibs.standard.tag.rt.core.ForEachTag _jspx_th_c_005fforEach_005f0 = (org.apache.taglibs.standard.tag.rt.core.ForEachTag) _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.get(org.apache.taglibs.standard.tag.rt.core.ForEachTag.class);
      boolean _jspx_th_c_005fforEach_005f0_reused = false;
      try {
        _jspx_th_c_005fforEach_005f0.setPageContext(_jspx_page_context);
        _jspx_th_c_005fforEach_005f0.setParent(null);
        // /homqua.jsp(58,1) name = items type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null
        _jspx_th_c_005fforEach_005f0.setItems(new org.apache.jasper.el.JspValueExpression("/homqua.jsp(58,1) '${listTuVung}'",_jsp_getExpressionFactory().createValueExpression(_jspx_page_context.getELContext(),"${listTuVung}",java.lang.Object.class)).getValue(_jspx_page_context.getELContext()));
        // /homqua.jsp(58,1) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_c_005fforEach_005f0.setVar("tuvung");
        int[] _jspx_push_body_count_c_005fforEach_005f0 = new int[] { 0 };
        try {
          int _jspx_eval_c_005fforEach_005f0 = _jspx_th_c_005fforEach_005f0.doStartTag();
          if (_jspx_eval_c_005fforEach_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            do {
              out.write("\n");
              out.write("\t\t
\n");
              out.write("\t\t\t');
              out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${i}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
              out.write('.');
              out.write(' ');
              out.write(' ');
              out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${tuvung.tuvung }", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
              out.write("	\n");
              out.write("\t\t\tXóa	\n");
              out.write("\t\t\t");
              out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${tuvung.nghia }", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
              out.write(' ');
              out.write('.');
              out.write(' ');
              out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${i}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
              out.write("	\n");
              out.write("\t\t
\n");
              out.write("\t\t");
              if (_jspx_meth_c_005fset_005f1(_jspx_th_c_005fforEach_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0))
                return;
              out.write('\n');
              out.write('	');
              int evalDoAfterBody = _jspx_th_c_005fforEach_005f0.doAfterBody();
              if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                break;
            } while (true);
          }
          if (_jspx_th_c_005fforEach_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            return;
          }
        } catch (java.lang.Throwable _jspx_exception) {
          while (_jspx_push_body_count_c_005fforEach_005f0[0]-- > 0)
            out = _jspx_page_context.popBody();
          _jspx_th_c_005fforEach_005f0.doCatch(_jspx_exception);
        } finally {
          _jspx_th_c_005fforEach_005f0.doFinally();
        }
        _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.reuse(_jspx_th_c_005fforEach_005f0);
        _jspx_th_c_005fforEach_005f0_reused = true;
      } finally {
        if (!_jspx_th_c_005fforEach_005f0_reused) {
          _jspx_th_c_005fforEach_005f0.release();
          _jsp_getInstanceManager().destroyInstance(_jspx_th_c_005fforEach_005f0);
        }
      }
      out.write("\n");
      out.write("\t
\n");
      out.write("\t
\n");
      out.write("\t ");
      out.write("\n");
      out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
      out.write("\n");
      out.write("\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
      out.write("\n");
      out.write("\n");
      out.write("\tfoooter\n");
      out.write("\n");
      out.write("");
      out.write('\n');
      out.write('\n');
 request.removeAttribute("listTuVung") ;
      out.write("\n");
      out.write("\t\n");
      out.write("\t\n");
      out.write("\t\n");
      out.write("\n");
      out.write("");
    } catch (java.lang.Throwable t) {
      if (!(t instanceof javax.servlet.jsp.SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            if (response.isCommitted()) {
              out.flush();
            } else {
              out.clearBuffer();
            }
          } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }

  private boolean _jspx_meth_c_005fset_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  c:set
    org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_005fset_005f0 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fscope_005fnobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class);
    boolean _jspx_th_c_005fset_005f0_reused = false;
    try {
      _jspx_th_c_005fset_005f0.setPageContext(_jspx_page_context);
      _jspx_th_c_005fset_005f0.setParent(null);
      // /homqua.jsp(54,1) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
      _jspx_th_c_005fset_005f0.setVar("i");
      // /homqua.jsp(54,1) name = value type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null
      _jspx_th_c_005fset_005f0.setValue(new org.apache.jasper.el.JspValueExpression("/homqua.jsp(54,1) '1'",_jsp_getExpressionFactory().createValueExpression("1",java.lang.Object.class)).getValue(_jspx_page_context.getELContext()));
      // /homqua.jsp(54,1) name = scope type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
      _jspx_th_c_005fset_005f0.setScope("page");
      int _jspx_eval_c_005fset_005f0 = _jspx_th_c_005fset_005f0.doStartTag();
      if (_jspx_th_c_005fset_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        return true;
      }
      _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fscope_005fnobody.reuse(_jspx_th_c_005fset_005f0);
      _jspx_th_c_005fset_005f0_reused = true;
    } finally {
      if (!_jspx_th_c_005fset_005f0_reused) {
        _jspx_th_c_005fset_005f0.release();
        _jsp_getInstanceManager().destroyInstance(_jspx_th_c_005fset_005f0);
      }
    }
    return false;
  }

  private boolean _jspx_meth_c_005fset_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f0, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  c:set
    org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_005fset_005f1 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fscope_005fnobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class);
    boolean _jspx_th_c_005fset_005f1_reused = false;
    try {
      _jspx_th_c_005fset_005f1.setPageContext(_jspx_page_context);
      _jspx_th_c_005fset_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f0);
      // /homqua.jsp(64,2) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
      _jspx_th_c_005fset_005f1.setVar("i");
      // /homqua.jsp(64,2) name = value type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null
      _jspx_th_c_005fset_005f1.setValue(new org.apache.jasper.el.JspValueExpression("/homqua.jsp(64,2) '${i + 1}'",_jsp_getExpressionFactory().createValueExpression(_jspx_page_context.getELContext(),"${i + 1}",java.lang.Object.class)).getValue(_jspx_page_context.getELContext()));
      // /homqua.jsp(64,2) name = scope type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
      _jspx_th_c_005fset_005f1.setScope("page");
      int _jspx_eval_c_005fset_005f1 = _jspx_th_c_005fset_005f1.doStartTag();
      if (_jspx_th_c_005fset_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        return true;
      }
      _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fscope_005fnobody.reuse(_jspx_th_c_005fset_005f1);
      _jspx_th_c_005fset_005f1_reused = true;
    } finally {
      if (!_jspx_th_c_005fset_005f1_reused) {
        _jspx_th_c_005fset_005f1.release();
        _jsp_getInstanceManager().destroyInstance(_jspx_th_c_005fset_005f1);
      }
    }
    return false;
  }
}


text:
import routes from "./index.route";
import reducer from "./personalnotes-reducer-all";
import personalnotesListComponent from './personalnotes-list.component';
import personalnotesCreateComponent from './personalnotes-create.component';
import personalnotesDetailComponent from './personalnotes-detail.component';
import personalnotesActions from './personalnotes-actions';

export default {
  "name": 'personalnotes',
  "routes": routes,
  "reducer": reducer,
  "components": {
    personalnotesListComponent,
    personalnotesCreateComponent,
    personalnotesDetailComponent
  },
  "actions": {
    personalnotesActions
  },
  "sidebarInfo": {
    name: 'personalNotes',
    link: 'personalNotes',
    title: 'Personal Notes'
  }
}


text:
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Runtime.InteropServices;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Editor;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem;
using Microsoft.VisualStudio.LanguageServices.Implementation.RQName;
using Microsoft.VisualStudio.Shell.Interop;
using Roslyn.Utilities;

namespace Microsoft.VisualStudio.LanguageServices.Implementation
{
    [Export(typeof(IRefactorNotifyService))]
    internal sealed class VsRefactorNotifyService : IRefactorNotifyService
    {
        public bool TryOnBeforeGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, ISymbol symbol, string newName, bool throwOnFailure)
        {
            Dictionary<IVsHierarchy, List<uint>> hierarchyToItemIDsMap;
            string[] rqnames;

            if (TryGetRenameAPIRequiredArguments(workspace, changedDocumentIDs, symbol, out hierarchyToItemIDsMap, out rqnames))
            {
                foreach (var hierarchy in hierarchyToItemIDsMap.Keys)
                {
                    var itemIDs = hierarchyToItemIDsMap[hierarchy];
                    var refactorNotify = hierarchy as IVsHierarchyRefactorNotify;

                    if (refactorNotify != null)
                    {
                        var hresult = refactorNotify.OnBeforeGlobalSymbolRenamed(
                            (uint)itemIDs.Count,
                            itemIDs.ToArray(),
                            (uint)rqnames.Length,
                            rqnames,
                            newName,
                            promptContinueOnFail: 1);

                        if (hresult < 0)
                        {
                            if (throwOnFailure)
                            {
                                Marshal.ThrowExceptionForHR(hresult);
                            }
                            else
                            {
                                return false;
                            }
                        }
                    }
                }
            }

            return true;
        }

        public bool TryOnAfterGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, ISymbol symbol, string newName, bool throwOnFailure)
        {
            Dictionary<IVsHierarchy, List<uint>> hierarchyToItemIDsMap;
            string[] rqnames;

            if (TryGetRenameAPIRequiredArguments(workspace, changedDocumentIDs, symbol, out hierarchyToItemIDsMap, out rqnames))
            {
                foreach (var hierarchy in hierarchyToItemIDsMap.Keys)
                {
                    var itemIDs = hierarchyToItemIDsMap[hierarchy];
                    var refactorNotify = hierarchy as IVsHierarchyRefactorNotify;

                    if (refactorNotify != null)
                    {
                        var hresult = refactorNotify.OnGlobalSymbolRenamed(
                            (uint)itemIDs.Count,
                            itemIDs.ToArray(),
                            (uint)rqnames.Length,
                            rqnames,
                            newName);

                        if (hresult < 0)
                        {
                            if (throwOnFailure)
                            {
                                Marshal.ThrowExceptionForHR(hresult);
                            }
                            else
                            {
                                return false;
                            }
                        }
                    }
                }
            }

            return true;
        }

        private bool TryGetRenameAPIRequiredArguments(
            Workspace workspace,
            IEnumerable<DocumentId> changedDocumentIDs,
            ISymbol symbol,
            out Dictionary<IVsHierarchy, List<uint>> hierarchyToItemIDsMap,
            out string[] rqnames)
        {
            hierarchyToItemIDsMap = null;
            rqnames = null;

            string rqname;
            VisualStudioWorkspaceImpl visualStudioWorkspace;

            if (!TryGetItemIDsAndRQName(workspace, changedDocumentIDs, symbol, out visualStudioWorkspace, out hierarchyToItemIDsMap, out rqname))
            {
                return false;
            }

            rqnames = new string[1] { rqname };
            return true;
        }

        private bool TryGetItemIDsAndRQName(
            Workspace workspace,
            IEnumerable<DocumentId> changedDocumentIDs,
            ISymbol symbol,
            out VisualStudioWorkspaceImpl visualStudioWorkspace,
            out Dictionary<IVsHierarchy, List<uint>> hierarchyToItemIDsMap,
            out string rqname)
        {
            visualStudioWorkspace = null;
            hierarchyToItemIDsMap = null;
            rqname = null;

            if (!changedDocumentIDs.Any())
            {
                return false;
            }

            visualStudioWorkspace = workspace as VisualStudioWorkspaceImpl;
            if (visualStudioWorkspace == null)
            {
                return false;
            }

            if (!TryGetRenamingRQNameForSymbol(symbol, out rqname))
            {
                return false;
            }

            hierarchyToItemIDsMap = GetHierarchiesAndItemIDsFromDocumentIDs(visualStudioWorkspace, changedDocumentIDs);
            return true;
        }

        private bool TryGetRenamingRQNameForSymbol(ISymbol symbol, out string rqname)
        {
            if (symbol.Kind == SymbolKind.Method)
            {
                var methodSymbol = symbol as IMethodSymbol;

                if (methodSymbol.MethodKind == MethodKind.Constructor ||
                    methodSymbol.MethodKind == MethodKind.Destructor)
                {
                    symbol = symbol.ContainingType;
                }
            }

            rqname = LanguageServices.RQName.From(symbol);
            return rqname != null;
        }

        private Dictionary<IVsHierarchy, List<uint>> GetHierarchiesAndItemIDsFromDocumentIDs(VisualStudioWorkspaceImpl visualStudioWorkspace, IEnumerable<DocumentId> changedDocumentIDs)
        {
            var hierarchyToItemIDsMap = new Dictionary<IVsHierarchy, List<uint>>();

            foreach (var docID in changedDocumentIDs)
            {
                var project = visualStudioWorkspace.GetHostProject(docID.ProjectId);
                var itemID = project.GetDocumentOrAdditionalDocument(docID).GetItemId();

                if (itemID == (uint)VSConstants.VSITEMID.Nil)
                {
                    continue;
                }

                List<uint> itemIDsForCurrentHierarchy;
                if (!hierarchyToItemIDsMap.TryGetValue(project.Hierarchy, out itemIDsForCurrentHierarchy))
                {
                    itemIDsForCurrentHierarchy = new List<uint>();
                    hierarchyToItemIDsMap.Add(project.Hierarchy, itemIDsForCurrentHierarchy);
                }

                if (!itemIDsForCurrentHierarchy.Contains(itemID))
                {
                    itemIDsForCurrentHierarchy.Add(itemID);
                }
            }

            return hierarchyToItemIDsMap;
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright 2012 GitHub Inc.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android" >

    <ImageView
        android:id="@+id/iv_avatar"
        style="@style/AvatarMedium"
        android:contentDescription="@string/avatar" />

    <TextView
        android:id="@+id/tv_issue_creation"
        style="@style/ListSubtitleText"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:paddingLeft="10dp"
        android:paddingStart="10dp"
        android:paddingRight="2dp"
        android:paddingEnd="2dp"
        android:singleLine="true" />

    <TextView
        android:id="@+id/tv_pull_request_icon"
        style="@style/ListIcon"
        android:paddingRight="5dp"
        android:paddingEnd="5dp"
        android:text="@string/icon_pull_request" />

    <TextView
        android:id="@+id/tv_comment_icon"
        style="@style/ListIcon"
        android:text="@string/icon_comment" />

    <TextView
        android:id="@+id/tv_issue_comments"
        style="@style/ListNumericSubtitleText"
        android:paddingStart="5dp"
        android:paddingLeft="5dp" />

</merge>


text:
*Hack Night*

_August 20th, 2015_

# Before we get started...

# Brew Week App Numbers!

# XXX App Downloads

# 8,692 Tasted Beers

# 1,079 Favorited Beers

# 34 Establishments

# 408 Beers

# By age

| Age Range | User Count |
|:---------:|:----------:|
| 20-29     | 268        |
| 30-39     | 124        |
| 40-49     | 80         |
| 50-59     | 40         |
| 60-69     | 12         |
| 70+       | 0 :(       |

# Most Tasted Beer

*Peanut Better Cup Coffee Porter*

_Willoughby Brewing Co._

_176 Tastes_

# Most Favorited Beer
*Peanut Better Cup Coffee Porter*

_Willoughby Brewing Co._

_56 Favorites_

# Full DB Dump

<https://www.dropbox.com/s/m4txgmwwt7xi50l/brew_week_db_dump.mysql?dl=0>

# Success!
![Success](images/SuccessKid.jpg)

_Thank you for all your work!_

# Why a Civic Hack Night?

#Side Walk Repair

![FB1](images/FB1.png)

![FB2](images/FB2.png)

![FB3](images/FB3.png)

# Road Repair

![Letter](images/Letter.jpg)

# Apathy in Government

_Let's watch a talk_

[The Antitode to Apathy - Dave Meslin ](http://www.ted.com/talks/dave_meslin_the_antidote_to_apathy?language=en)

# Let's Be Un-apathetic

* What problems do you see in Athens?
* How can we solve them?
* How do we know if we've solved the problem?

# Let's Document our Plans

* Edit the repo <https://github.com/AthensWorks/AthensCivicHack>
* Add your ideas to the `ideas/` folder
  * State the problem
  * State the solution
  * State the way to measure the effectiveness

# Regroup in 45 Mins

*We will pick some project(s) and go from there*

# Go!


text:
package fr.imie.formation.poo.tp4;

/**
 * Created by Sebastien on 30/12/2014.
 */
public interface IVehiculeRoulant extends IVehicule
{
    public abstract void avancer();
}


text:
using System;
using System.Text;
using System.Data;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTcms.Common;

namespace DTcms.Web.admin.users
{
    public partial class user_audit : Web.UI.ManagePage
    {
        protected int totalCount;
        protected int page;
        protected int pageSize;

        protected string keywords = string.Empty;

        protected void Page_Load(object sender, EventArgs e)
        {
            this.keywords = DTRequest.GetQueryString("keywords");

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("user_audit", DTEnums.ActionEnum.View.ToString()); //检查权限
                RptBind("status>0 and status<3" + CombSqlTxt(this.keywords), "reg_time desc,id desc");
            }
        }

        #region 数据绑定=================================
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            this.txtKeywords.Text = this.keywords;
            BLL.users bll = new BLL.users();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("user_audit.aspx", "keywords={0}&page={1}",
                this.keywords, "__id__");
            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
        #endregion

        #region 组合SQL查询语句==========================
        protected string CombSqlTxt(string _keywords)
        {
            StringBuilder strTemp = new StringBuilder();
            _keywords = _keywords.Replace("'", "");
            if (!string.IsNullOrEmpty(_keywords))
            {
                strTemp.Append(" and (user_name like '%" + _keywords + "%' or mobile like '%" + _keywords + "%' or email like '%" + _keywords + "%' or nick_name like '%" + _keywords + "%')");
            }
            return strTemp.ToString();
        }
        #endregion

        #region 返回用户每页数量=========================
        private int GetPageSize(int _default_size)
        {
            int _pagesize;
            if (int.TryParse(Utils.GetCookie("user_audit_page_size"), out _pagesize))
            {
                if (_pagesize > 0)
                {
                    return _pagesize;
                }
            }
            return _default_size;
        }
        #endregion

        #region 返回用户状态=============================
        protected string GetUserStatus(int status)
        {
            string result = string.Empty;
            switch (status)
            {
                case 0:
                    result = "正常";
                    break;
                case 1:
                    result = "待验证";
                    break;
                case 2:
                    result = "待审核";
                    break;
                case 3:
                    result = "已禁用";
                    break;
            }
            return result;
        }
        #endregion

        //关健字查询
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            Response.Redirect(Utils.CombUrlTxt("user_audit.aspx", "keywords={0}", txtKeywords.Text));
        }

        //设置分页数量
        protected void txtPageNum_TextChanged(object sender, EventArgs e)
        {
            int _pagesize;
            if (int.TryParse(txtPageNum.Text.Trim(), out _pagesize))
            {
                if (_pagesize > 0)
                {
                    Utils.WriteCookie("user_audit_page_size", _pagesize.ToString(), 14400);
                }
            }
            Response.Redirect(Utils.CombUrlTxt("user_audit.aspx", "keywords={0}", this.keywords));
        }

        //审核通过
        protected void btnAudit_Click(object sender, EventArgs e)
        {
            ChkAdminLevel("user_audit", DTEnums.ActionEnum.Audit.ToString()); //检查权限
            int sucCount = 0;
            int errorCount = 0;
            BLL.users bll = new BLL.users();
            for (int i = 0; i < rptList.Items.Count; i++)
            {
                int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    if (bll.UpdateField(id, "status=0") > 0)
                    {
                        sucCount += 1;
                    }
                    else
                    {
                        errorCount += 1;
                    }
                }
            }
            AddAdminLog(DTEnums.ActionEnum.Audit.ToString(), "审核用户成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
            JscriptMsg("审核通过" + sucCount + "条,失败" + errorCount + "条!",
                Utils.CombUrlTxt("user_audit.aspx", "keywords={0}", this.keywords), "Success");
        }

    }
}


text:
from plotspikes import plotspikes
from matplotlib import pyplot as plt
import numpy as np

def main():
    """Example how to use plotspikes"""

    # create a figure and plot some random signal
    plt.figure(0, figsize=(15,3))
    np.random.seed(22)
    xsignal = 20 * np.arange(100)
    ysignal = 6. + np.cumsum(np.random.randn(100))
    plt.plot(xsignal, ysignal, 'm', hold=True)

    # create random spikes and plot them using plotspikes
    spiketimes = 40 * np.arange(0, 50) + 40 * np.random.randn(50)
    plotspikes(spiketimes, 'c-', -2.5, -1.5)

    # add labels
    plt.xlabel("time in ms")

    # save the plot without axes
    plt.axis('off')
    plt.savefig("images/example.png", bbox_inches='tight')
    plt.axis('on')

    # show the complete plot
    plt.show()

if __name__ == "__main__":
    main()


text:
import os
import logging
import testfixtures

from pyvivado import interface, signal, builder

from rfgnocchi import config, ettus

logger = logging.getLogger(__name__)

class ControllerInnerBuilder(builder.Builder):

    def __init__(self, params={}):
        super().__init__(params)
        self.builders = [
            ettus.get_builder('mult'),
        ]
        self.simple_filenames = [
            os.path.join(config.basedir, 'blocks', 'controller_inner.vhd'),
        ]

def get_controller_inner_interface(params):
    module_name = 'controller_inner'
    builder = ControllerInnerBuilder()
    wires_in = (
        ('reset', signal.std_logic_type),
        ('clear', signal.std_logic_type),
        ('i_error_tdata', signal.StdLogicVector(width=16)),
        ('i_error_tvalid', signal.std_logic_type),
        ('i_config_tdata', signal.StdLogicVector(width=32)),
        ('i_config_tvalid', signal.std_logic_type),
        ('o_phase_tready', signal.std_logic_type),
    )
    wires_out = (
        ('o_phase_tdata', signal.StdLogicVector(width=16)),
        ('o_phase_tvalid', signal.std_logic_type),
        ('i_config_tready', signal.std_logic_type),
    )
    iface = interface.Interface(
        wires_in, wires_out, module_name=module_name,
        parameters=params, builder=builder, clock_names=['clk'],
    )
    return iface

assert('controller_inner' not in interface.module_register)
interface.module_register['controller_inner'] = get_controller_inner_interface


text:
import { Observable } from '../Observable';
import { Subscription } from '../Subscription';
import { observable as Symbol_observable } from '../symbol/observable';
import { subscribeToObservable } from '../util/subscribeToObservable';
export function fromObservable(input, scheduler) {
    if (!scheduler) {
        return new Observable(subscribeToObservable(input));
    }
    else {
        return new Observable(subscriber => {
            const sub = new Subscription();
            sub.add(scheduler.schedule(() => {
                const observable = input[Symbol_observable]();
                sub.add(observable.subscribe({
                    next(value) { sub.add(scheduler.schedule(() => subscriber.next(value))); },
                    error(err) { sub.add(scheduler.schedule(() => subscriber.error(err))); },
                    complete() { sub.add(scheduler.schedule(() => subscriber.complete())); },
                }));
            }));
            return sub;
        });
    }
}
//# sourceMappingURL=fromObservable.js.map


text:
using System.ComponentModel.DataAnnotations.Schema;

using Stove.Domain.Entities;

namespace Stove.Demo.ConsoleApp.Entities
{
    [Table("Persons")]
    public class Person : Entity, ISoftDelete
    {
        private Person()
        {
        }

        public Person(string name) : this()
        {
            Name = name;
        }

        public virtual string Name { get; set; }

        public bool IsDeleted { get; set; }
    }
}