text:
var events = require("events"),
    Crawler = require('simplecrawler').Crawler,
    hash = require('node_hash'),
    _ = require('underscore'),
    fs = require("fs"),
    util = require("util"),
    urlUtil = require('url');

var crawler = new events.EventEmitter();

/**
 * crawler.crawl
 *
 * Crawls a website, starting at `url`, finding all linked pages within the same domain.
 * The `url` can also be a filesystem path containing a stringified JSON object of a past crawl. This
 * can be generated using the included CLI and the '--json' option.
 *
 * This function also supports several `options`:
 *   - headers {Boolean}: include the raw http headers from the response in the results
 *   - body {Boolean}: include the http response body in results
 *
 * This function is asyncronous and requires a `callback` with the following signature:
 *   - function(err, pages)
 * where `pages` is an array with the following object structure for each result:
 *   {
 *     url: URL Object provided from Node URL parser,
 *     status: HTTP status code,
 *     contentType: the MIME type for the resource,
 *     checksum: SHA 256 hash of the response body,
 *     links: Array of links found on this page,
 *     referrers: Array of URLs within the crawled site who referr to this page,
 *     body: The response body (optional),
 *     headers: The response headers (optional),
 *     date: Timestamp of the page crawl
 *   }
 *
 * @param {String} http(s) url of site to crawl, or filesystem path to JSON file to import
 * @param {Object} options (optional)
 * @param {Function} callback -- function(err, pages)
 * @api public
 */
crawler.crawl = function(url, options, callback) {
  if (typeof options === 'function') {
    callback = options;
    options = {};
  }
  options = options || {};

  // setup some default options for the node.io job
  options['crawler'] = crawler;

	var pages = {},
      potentialPages = {},
      urlParts = urlUtil.parse(url, true);

  // do a web crawl of url if it's an http protocol
	if (urlParts.protocol == "https:" || urlParts.protocol == "http:") {

    var port = urlParts.port ? urlParts.port : 80,
        siteCrawler = new Crawler(urlParts.hostname, urlParts.path, port);

    // configure crawler
    siteCrawler.interval = 10;
    siteCrawler.maxConcurrency = 10;
    siteCrawler.scanSubdomains = true;
    siteCrawler.downloadUnsupported = false;

    if (options.username && options.password) {
      siteCrawler.needsAuth = true;
      siteCrawler.authUser = options.username;
      siteCrawler.authPass = options.password;
    }

    function mimeTypeSupported(MIMEType) {
      var supported = false;
      siteCrawler.supportedMimeTypes.forEach(function(mimeCheck) {
        if (!!mimeCheck.exec(MIMEType)) {
          supported = true;
        }
      });
      return supported;
    }

    var pageHandler = function(queueItem, responseBuffer, response) {
      if (mimeTypeSupported(queueItem.stateData.contentType)) {
        crawler.emit("crawl", queueItem.url);

        var data = responseBuffer.toString(),
            parsedUrl = urlUtil.parse(queueItem.url, true),
            page = {};

        page.url = queueItem.url;
        page.status = queueItem.stateData.code;
        page.contentType = queueItem.stateData.contentType;
        page.checksum = hash.sha256(data);
        page.date = new Date().toJSON();

        if (options.headers) page.headers = queueItem.stateData.headers;
        if (options.body) page.body = data;

        if (potentialPages[parsedUrl.path]) {
          page = _.extend(page, potentialPages[parsedUrl.path]);
        }

        pages[parsedUrl.path] = page;
      }
    };

    siteCrawler.on("discoverycomplete", function(queueItem, resources) {
      var parsedUrl = urlUtil.parse(queueItem.url, true);

      // Save the outbound links for the item that just completed discovery
      pages[parsedUrl.path].links = resources;

      // Update each linked to page storing us as a referrer
      resources.forEach(function(link) {
        // A normalized, resolved URL, used for uniq identification purposes
        var resourceUrl = urlUtil.parse(urlUtil.resolve(parsedUrl, urlUtil.parse(link, true)), true);

        // Links found in the discovery of this resource may not have been crawled yet.
        // In the case of links that have not yet been crawled, we save them as potential
        // pages that may meet the crawling criteria (content-type,etc).
        if (!pages[resourceUrl.path]) {
          if (!potentialPages[resourceUrl.path]) potentialPages[resourceUrl.path] = { referrers: [] };
          potentialPages[resourceUrl.path].referrers.push(queueItem.url);

        // Otherwise the resourece has already been crawled so we can store ourselves as a referrer.
        } else {
          if (!pages[resourceUrl.path].referrers) pages[resourceUrl.path].referrers = [];
          pages[resourceUrl.path].referrers.push(queueItem.url);
        }
      });
    });

    // handle normal pages
    siteCrawler.on("fetchcomplete", pageHandler);

    // handle broken links
    siteCrawler.on("fetch404", pageHandler);

    // on completion, parse broken links and report
    siteCrawler.on("complete", function(queueItem, responseBuffer, response) {
      callback(null, _.map(pages, function (value, key) {
        // De-Dup referrers. Note: this could be done much more efficiently if performance
        // becomes a problem.
        if (value.referrers) value.referrers = _.uniq(value.referrers);
        return value;
      }));
    });

    siteCrawler.start(); // crawl the site

	}

  // otherwise we load a json file, assumed to be generated by the CLI using the '--json' option
  else if (urlParts.path) {
    var path = urlParts.path;
    try {
      if (fs.statSync(path).isFile()) {
        fs.readFile(path, function(err, data) {
          if (err) callback(err);

          var pages = JSON.parse(data);
          callback(null, pages);
        });
      }
    }
    catch (err) {
      callback(err);
    }
  }

  else {
    callback("Unable to interperate url as path or web address: %s", url);
  }

};

module.exports = crawler;


text:
package com.codemettle.jsactorexample.web.components

import japgolly.scalacss.Defaults._
import japgolly.scalacss.mutable

import com.codemettle.jsactorexample.web.components.Bootstrap.CommonStyle._

/**
 * @author steven
 *
 */
class BootstrapStyles(implicit r: mutable.Register) extends StyleSheet.Inline()(r) {
    import dsl._

    val csDomain = Domain.ofValues(default, primary, success, info, warning, danger)

    val contextDomain = Domain.ofValues(success, info, warning, danger)

    def commonStyle[A](domain: Domain[A], base: String) = styleF(domain)(opt ⇒ styleS(addClassNames(base, s"$base-$opt")))

    def styleWrap(classNames: String*) = style(addClassNames(classNames: _*))

    val buttonOpt = commonStyle(csDomain, "btn")

    val button = buttonOpt(default)

    val panelOpt = commonStyle(csDomain, "panel")

    val panel = panelOpt(default)

    val labelOpt = commonStyle(csDomain, "label")

    val label = labelOpt(default)

    val alert = commonStyle(contextDomain, "alert")

    val panelHeading = styleWrap("panel-heading")

    val panelBody = styleWrap("panel-body")

    object modal {
        val modal = styleWrap("modal")
        val fade = styleWrap("fade")
        val dialog = styleWrap("modal-dialog")
        val content = styleWrap("modal-content")
        val header = styleWrap("modal-header")
        val body = styleWrap("modal-body")
        val footer = styleWrap("modal-footer")
    }

    object listGroup {
        val listGroup = styleWrap("list-group")
        val item = styleWrap("list-group-item")
        val itemOpt = commonStyle(contextDomain, "list-group-item")
    }

    val pullRight = styleWrap("pull-right")
  val buttonS = styleWrap("btn-sm")
  val buttonXS = styleWrap("btn-xs")
    val close = styleWrap("close")

    val labelAsBadge = style(addClassName("label-as-badge"), borderRadius(1.em))

    val navbar = styleWrap("nav", "navbar-nav")
  val navbarRight = styleWrap("navbar-right")

    val formGroup = styleWrap("form-group")
    val formControl = styleWrap("form-control")
}

redpajama_set_name: RedPajamaGithub


text:
// based on https://github.com/pelias/leaflet-geocoder

/*
 * This adds a geocoder powered by pelias to a leaflet map
 * TODO: Better comments
 */
;(function (factory) { // eslint-disable-line no-extra-semi
	var L;
	if (typeof define === 'function' && define.amd) {
		// AMD
		define(['leaflet'], factory);
	} else if (typeof module !== 'undefined') {
		// Node/CommonJS
		L = require('leaflet');
		module.exports = factory(L);
	} else {
		// Browser globals
		if (typeof window.L === 'undefined') {
			throw new Error('Leaflet must be loaded first');
		}
		factory(window.L);
	}
}(function (L) {
	'use strict';

	var FULL_WIDTH_MARGIN = 20; // in pixels
	var FULL_WIDTH_TOUCH_ADJUSTED_MARGIN = 4; // in pixels
	var RESULTS_HEIGHT_MARGIN = 20; // in pixels
	var API_RATE_LIMIT = 250; // in ms, throttled time between subsequent requests to API

	var EmptyGeoCoder = function () {
		var me = this;
		me.search = function (parameters, cb) {
			cb('No valid geocoder given.');
		};

		me.autocomplete = function (parameters, cb) {
			cb('No valid geocoder given.');
		};

		me.near = function (parameters, cb) {
			cb('No valid geocoder given.');
		};

		me.select = function (feature, cb) {
			cb('No valid geocoder given.');
		};
		me.canSelect = function (feature) {
			return false;
		};
	};

	L.Control.Geocoder = L.Control.extend({
		options: {
			position: 'topleft',
			placeholder: 'Search',
			title: 'Search',
			bounds: false,
			latlng: null,
			layers: null,
			panToPoint: true,
			pointIcon: 'images/point_icon.png',
			polygonIcon: 'images/polygon_icon.png',
			fullWidth: 650,
			minimumAutoCompleteInput: 1,
			markers: true,
			expanded: false,
			autocomplete: true
		},

		initialize: function (options) {
			//merge user-specified options
			L.Util.setOptions(this, options);
			this.geocoder = options.geocoder || new EmptyGeoCoder();
			this.options.attribution = this.options.attribution || this.geocoder.attribution;
			this.marker;
			this.markers = [];
		},

		getParamLayers: function () {
			var layers = this.options.layers;
			if (!layers) {
				return null;
			}
			return layers;
		},

		getParamBoundingBox: function () {
			/*
			 * this.options.bounds can be one of the following
			 * true //Boolean - take the map bounds
			 * false //Boolean - no bounds
			 * L.latLngBounds(...) //Object
			 * [[10, 10], [40, 60]] //Array
			 */
			var bounds = this.options.bounds;
			// If falsy, bail
			if (!bounds) {
				return null;
			}
			// If set to true, use map bounds
			// If it is a valid L.LatLngBounds object, get its values
			// If it is an array, try running it through L.LatLngBounds
			if (bounds === true) {
				bounds = this._map.getBounds();
				return makeParamsFromLeaflet(bounds);
			} else if (typeof bounds === 'object' && bounds.isValid && bounds.isValid()) {
				return makeParamsFromLeaflet(bounds);
			} else if (typeof bounds === 'object' && bounds.length > 0) {
				var latLngBounds = L.latLngBounds(bounds);
				if (latLngBounds.isValid && latLngBounds.isValid()) {
					return makeParamsFromLeaflet(latLngBounds);
				}
			}

			function makeParamsFromLeaflet(latLngBounds) {
				return {
					min_lon: latLngBounds.getWest(),
					min_lat: latLngBounds.getSouth(),
					max_lon: latLngBounds.getEast(),
					max_lat: latLngBounds.getNorth()
				};
			}

			return null;
		},

		getParamLatlng: function () {
			/*
			 * this.options.latlng can be one of the following
			 * [50, 30] //Array
			 * {lon: 30, lat: 50} //Object
			 * {lat: 50, lng: 30} //Object
			 * L.latLng(50, 30) //Object
			 * true //Boolean - take the map center
			 * false //Boolean - No latlng to be considered
			 */
			var latlng = this.options.latlng;

			if (!latlng) {
				return null;
			}

			if (latlng.constructor === Array) {
				// TODO Check for array size, throw errors if invalid lat/lon
				return {lat: latlng[0], lng: latlng[1]};
			} else if (typeof latlng !== 'object') {
				// fallback to the map's center L.latLng()
				return this._map.getCenter();
			} else {
				// TODO Check for valid L.LatLng Object or Object thats in the form of {lat:..,lon:..}
				// TODO Check for valid lat/lon values, Error handling
				return {lat: latlng.lat, lng: latlng.lng ? latlng.lng : latlng.lon};
			}
		},

		_execute: function (request, input) {
			if (!input) return;
			var params = {
				query: input,
				latlng: this.getParamLatlng(),
				boundingbox: this.getParamBoundingBox(),
				layers: this.getParamLayers()
			};
			var caller = this;
			request(params, function (errmsg, results) {
				L.DomUtil.removeClass(caller._search, 'leaflet-geocoderui-loading');
				if (errmsg) {
					return caller.showMessage(errmsg);
				}
				if (results && results.features) {
					caller.showResults(results.features, results.geocoding);
				}
			});
			L.DomUtil.addClass(this._search, 'leaflet-geocoderui-loading');
		},

		search: function (input) {
			this._execute(this.geocoder.search, input);
		},

		autocomplete: throttle(function (input) {
			this._execute(this.geocoder.autocomplete, input);
		}, API_RATE_LIMIT),

		selectEntry: function (selected) {
			function setCaretPosition(elem, caretPos) {
				if (elem != null) {
					if (elem.createTextRange) {
						var range = elem.createTextRange();
						range.move('character', caretPos);
						range.select();
					}
					else {
						if (elem.selectionStart) {
							elem.focus();
							elem.setSelectionRange(caretPos, caretPos);
						}
						else
							elem.focus();
					}
				}
			}

			if (selected) {
				this.setSelectedResult();
				this.showMarker(selected.feature);
				this.clear();
				if (this.geocoder.select && this.geocoder.canSelect && this.geocoder.canSelect(selected.feature)) {
					setCaretPosition(this._input, selected.feature.properties.label.split(',')[0].length);
					this._execute(this.geocoder.select, selected.feature);
				}
			}
		},

		highlight: function (text, focus) {
			var r = new RegExp('(' + escapeRegExp(focus) + ')', 'gi');
			return text.replace(r, '<strong>$1</strong>');
		},

		getIconType: function (layer) {
			var pointIcon = this.options.pointIcon;
			var polygonIcon = this.options.polygonIcon;

			if (layer.match('venue') || layer.match('address')) {
				return pointIcon;
			} else {
				return polygonIcon;
			}
		},

		showResults: function (features, headers) {

			if (this.options.onResults) {
				if (this.options.onResults(features, headers)) return;
			}
			// Exit function if there are no features
			if (features.length === 0) {
				this.showMessage('No results were found.');
				return;
			}

			var list;
			var resultsContainer = this._results;

			// Reset and display results container
			resultsContainer.innerHTML = '';
			resultsContainer.style.display = 'block';
			// manage result box height
			resultsContainer.style.maxHeight = (this._map.getSize().y - resultsContainer.offsetTop - this._container.offsetTop - RESULTS_HEIGHT_MARGIN) + 'px';

			if (!list) {
				list = L.DomUtil.create('ul', 'leaflet-geocoderui-list', resultsContainer);
			}

			for (var i = 0, j = features.length; i < j; i++) {
				var feature = features[i];
				var resultItem = L.DomUtil.create('li', 'leaflet-geocoderui-result'+(feature.properties.distance > 0?' leaflet-geocoderui-result-with-distance':''), list);

				resultItem.layer = feature.properties.layer;
				resultItem.coords = feature.geometry.coordinates;
				resultItem.feature = feature;

				var iconSrc = this.getIconType(feature.properties.layer);
				if (iconSrc) {
					// Point or polygon icon
					var layerIconContainer = L.DomUtil.create('span', 'leaflet-geocoderui-layer-icon-container', resultItem);
					var layerIcon = L.DomUtil.create('img', 'leaflet-geocoderui-layer-icon', layerIconContainer);
					layerIcon.src = iconSrc;
					layerIcon.title = 'layer: ' + feature.properties.layer;
				}

				var contentContainer = L.DomUtil.create('span', 'leaflet-geocoderui-layer-content-container', resultItem);
				if (this._input.value.length > 0) {
					contentContainer.innerHTML = this.highlight(feature.properties.label, this._input.value);
				} else {
					contentContainer.innerHTML = feature.properties.label;
				}

				if (feature.properties.distance > 0) {
					var distanceItem = L.DomUtil.create('span', 'leaflet-geocoderui-result-distance', resultItem);
					distanceItem.innerHTML = '~' + parseInt(feature.properties.distance) + 'm';
				}
			}
		},

		showMessage: function (text) {
			var resultsContainer = this._results;

			// Reset and display results container
			resultsContainer.innerHTML = '';
			resultsContainer.style.display = 'block';

			var messageEl = L.DomUtil.create('div', 'leaflet-geocoderui-message', resultsContainer);
			messageEl.textContent = text;
		},

		removeMarkers: function () {
			if (this.options.markers) {
				for (var i = 0; i < this.markers.length; i++) {
					this._map.removeLayer(this.markers[i]);
				}
				this.markers = [];
			}
		},

		showMarker: function (feature) {

			if (this.options.onMarkResult) {
				if (this.options.onMarkResult(feature)) return true;
			}

			this.removeMarkers();

			var geo = [feature.geometry.coordinates[1], feature.geometry.coordinates[0]];
			this._map.setView(geo, this._map.getZoom() || 8);

			var markerOptions = (typeof this.options.markers === 'object') ? this.options.markers : {};

			if (this.options.markers) {
				this.marker = new L.marker(geo, markerOptions).bindPopup(feature.properties.label); // eslint-disable-line new-cap
				this._map.addLayer(this.marker);
				this.markers.push(this.marker);
				this.marker.openPopup();
			}
		},

		setSelectedResult: function () {
			var selected = this._results.querySelectorAll('.leaflet-geocoderui-selected')[0];
			if (selected) {
				this._input.value = selected.innerText || selected.textContent;
				if (this.options.onSelectResult)
					this.options.onSelectResult(selected.feature);
			}
		},

		resetInput: function () {
			this._input.value = '';
			L.DomUtil.addClass(this._close, 'leaflet-geocoderui-hidden');
			this.removeMarkers();
			this._input.focus();
		},

		// TODO: Rename?
		clear: function () {
			this.clearResults();
			this._input.blur();
			if (this._input.value === '' && this._results.style.display !== 'none') {
				L.DomUtil.addClass(this._close, 'leaflet-geocoderui-hidden');
				this.collapse();
			}
		},

		clearResults: function () {
			// Hide results from view
			this._results.style.display = 'none';

			// Destroy contents if input has also cleared
			if (this._input.value === '') {
				this._results.innerHTML = '';
			}
		},

		expand: function () {
			L.DomUtil.addClass(this._container, 'leaflet-geocoderui-expanded');
			this.setFullWidth();
		},

		collapse: function () {
			// Does not collapse if search bar is always expanded
			if (this.options.expanded) {
				return;
			}

			L.DomUtil.removeClass(this._container, 'leaflet-geocoderui-expanded');
			this.clearFullWidth();
			this.clearResults();
		},

		// Set full width of expanded input, if enabled
		setFullWidth: function () {
			if (this.options.fullWidth) {
				// If fullWidth setting is a number, only expand if map container
				// is smaller than that breakpoint. Otherwise, clear width
				// Always ask map to invalidate and recalculate size first
				this._map.invalidateSize();
				var mapWidth = this._map.getSize().x;
				var touchAdjustment = L.DomUtil.hasClass(this._map._container, 'leaflet-touch');
				var width = mapWidth - FULL_WIDTH_MARGIN - (touchAdjustment ? FULL_WIDTH_TOUCH_ADJUSTED_MARGIN : 0);
				if (typeof this.options.fullWidth === 'number' && mapWidth >= window.parseInt(this.options.fullWidth, 10)) {
					this.clearFullWidth();
					return;
				}
				this._container.style.width = width.toString() + 'px';
			}
		},

		clearFullWidth: function () {
			// Clear set width, if any
			if (this.options.fullWidth) {
				this._container.style.width = '';
			}
		},

		onAdd: function (map) {
			var container = L.DomUtil.create('div',
					'leaflet-geocoderui-control leaflet-bar leaflet-control');

			this._body = document.body || document.getElementsByTagName('body')[0];
			this._container = container;
			this._input = L.DomUtil.create('input', 'leaflet-geocoderui-input', this._container);
			this._input.spellcheck = false;

			// Only set if title option is not null or falsy
			if (this.options.title) {
				this._input.title = this.options.title;
			}

			// Only set if placeholder option is not null or falsy
			if (this.options.placeholder) {
				this._input.placeholder = this.options.placeholder;
			}

			this._locate = L.DomUtil.create('a', 'leaflet-geocoderui-locate-icon', this._container);
			this._search = L.DomUtil.create('a', 'leaflet-geocoderui-search-icon', this._container);
			this._close = L.DomUtil.create('div', 'leaflet-geocoderui-close leaflet-geocoderui-hidden', this._container);
			this._close.innerHTML = '×';
			this._close.title = 'Close';

			this._results = L.DomUtil.create('div', 'leaflet-geocoderui-results leaflet-bar', this._container);

			if (this.options.expanded) {
				this.expand();
			}

			if (this.options.locate) {
				L.DomUtil.addClass(container, 'with-locate');
			}

			L.DomEvent
					.on(this._container, 'click', function (e) {
						// Other listeners should call stopProgation() to
						// prevent this from firing too greedily
						this._input.focus();
					}, this)
					.on(this._input, 'focus', function (e) {
						if (this._input.value) {
							this._results.style.display = 'block';
						}
					}, this)
					.on(this._map, 'click', function (e) {
						// Does what you might expect a _input.blur() listener might do,
						// but since that would fire for any reason (e.g. clicking a result)
						// what you really want is to blur from the control by listening to clicks on the map
						this.clear();
					}, this)
					.on(this._map, 'locationfound', function (e) {
						this._execute(this.geocoder.near, {
							lat: e.latlng.lat,
							lon: e.latlng.lng,
							accuracy: e.accuracy
						});
					}, this)
					.on(this._map, 'locationerror', function (err) {
						// this event is called in case of any location error
						// that is not a time out error.
						alert(err.message);
					}, this)
					.on(this._locate, 'click', function (e) {
						this._map.locate({
							watch: false,
							setView: false,
							timeout: 10000,
							enableHighAccuracy: true
						});
					}, this)
					.on(this._search, 'click', function (e) {
						L.DomEvent.stopPropagation(e);

						// If expanded option is true, just focus the input
						if (this.options.expanded === true) {
							this._input.focus();
							return;
						}

						// Toggles expanded state of container on click of search icon
						if (L.DomUtil.hasClass(this._container, 'leaflet-geocoderui-expanded')) {
							L.DomUtil.addClass(this._close, 'leaflet-geocoderui-hidden');
							this.collapse();
							this._input.blur();
						} else {
							if (this._input.value.length > 0) {
								L.DomUtil.removeClass(this._close, 'leaflet-geocoderui-hidden');
							}
							this.expand();
							this._input.focus();
						}
					}, this)
					.on(this._close, 'click', function (e) {
						this.resetInput();
						this.clearResults();
						L.DomEvent.stopPropagation(e);
					}, this)
					.on(this._input, 'keydown', function (e) {
						var list = this._results.querySelectorAll('.leaflet-geocoderui-result');
						var selected = this._results.querySelectorAll('.leaflet-geocoderui-selected')[0];
						var selectedPosition;
						var self = this;
						var panToPoint = function (shouldPan) {
							var _selected = self._results.querySelectorAll('.leaflet-geocoderui-selected')[0];
							if (_selected && shouldPan) {
								self.showMarker(_selected.feature);
							}
						};

						var scrollSelectedResultIntoView = function () {
							var _selected = self._results.querySelectorAll('.leaflet-geocoderui-selected')[0];
							var _selectedRect = _selected.getBoundingClientRect();
							var _resultsRect = self._results.getBoundingClientRect();
							// Is the selected element not visible?
							if (_selectedRect.bottom > _resultsRect.bottom) {
								self._results.scrollTop = _selected.offsetTop + _selected.offsetHeight - self._results.offsetHeight;
							} else if (_selectedRect.top < _resultsRect.top) {
								self._results.scrollTop = _selected.offsetTop;
							}
						};

						for (var i = 0; i < list.length; i++) {
							if (list[i] === selected) {
								selectedPosition = i;
								break;
							}
						}

						// TODO cleanup
						switch (e.keyCode) {
							// 13 = enter
							case 13:
								if (selected) {
									this.selectEntry(selected);
								} else {
									// perform a full text search on enter
									var text = (e.target || e.srcElement).value;
									this.search(text);
								}
								L.DomEvent.preventDefault(e);
								break;
							// 38 = up arrow
							case 38:
								// Ignore key if there are no results or if list is not visible
								if (!list || this._results.style.display === 'none') {
									return;
								}

								if (selected) {
									L.DomUtil.removeClass(selected, 'leaflet-geocoderui-selected');
								}

								var previousItem = list[selectedPosition - 1];

								if (selected && previousItem) {
									L.DomUtil.addClass(previousItem, 'leaflet-geocoderui-selected');
								} else {
									L.DomUtil.addClass(list[list.length - 1], 'leaflet-geocoderui-selected');
								}

								scrollSelectedResultIntoView();
								panToPoint(this.options.panToPoint);

								L.DomEvent.preventDefault(e);
								break;
							// 40 = down arrow
							case 40:
								// Ignore key if there are no results or if list is not visible
								if (!list || this._results.style.display === 'none') {
									return;
								}

								if (selected) {
									L.DomUtil.removeClass(selected, 'leaflet-geocoderui-selected');
								}

								var nextItem = list[selectedPosition + 1];

								if (selected && nextItem) {
									L.DomUtil.addClass(nextItem, 'leaflet-geocoderui-selected');
								} else {
									L.DomUtil.addClass(list[0], 'leaflet-geocoderui-selected');
								}

								scrollSelectedResultIntoView();
								panToPoint(this.options.panToPoint);

								L.DomEvent.preventDefault(e);
								break;
							// all other keys
							default:
								break;
						}
					}, this)
					.on(this._input, 'keyup', function (e) {
						var key = e.which || e.keyCode;
						var text = (e.target || e.srcElement).value;

						if (this._input.value.length > 0) {
							L.DomUtil.removeClass(this._close, 'leaflet-geocoderui-hidden');
						} else {
							L.DomUtil.addClass(this._close, 'leaflet-geocoderui-hidden');
						}

						// Ignore all further action if the keycode matches an arrow
						// key (handled via keydown event)
						if (key === 13 || key === 38 || key === 40) {
							return;
						}

						// keyCode 27 = esc key (esc should clear results)
						if (key === 27) {
							// If input is blank or results have already been cleared
							// (perhaps due to a previous 'esc') then pressing esc at
							// this point will blur from input as well.
							if (text.length === 0 || this._results.style.display === 'none') {
								this._input.blur();

								if (L.DomUtil.hasClass(this._container, 'leaflet-geocoderui-expanded')) {
									this.collapse();
									this.clearResults();
								}
							}
							// Clears results
							this._results.innerHTML = '';
							this._results.style.display = 'none';
							L.DomUtil.removeClass(this._search, 'leaflet-geocoderui-loading');
							return;
						}

						if (this._input.value !== this._lastValue) {
							this._lastValue = this._input.value;

							if (text.length >= this.options.minimumAutoCompleteInput && this.options.autocomplete === true) {
								this.autocomplete(text);
							} else {
								this.clearResults();
							}
						}
					}, this)
					.on(this._results, 'click', function (e) {
						L.DomEvent.preventDefault(e);
						L.DomEvent.stopPropagation(e);

						var _selected = this._results.querySelectorAll('.leaflet-geocoderui-selected')[0];
						if (_selected) {
							L.DomUtil.removeClass(_selected, 'leaflet-geocoderui-selected');
						}

						var selected = e.target || e.srcElement;
						/* IE8 */
						var findParent = function () {
							if (!L.DomUtil.hasClass(selected, 'leaflet-geocoderui-result')) {
								selected = selected.parentElement;
								if (selected) {
									findParent();
								}
							}
							return selected;
						};

						// click event can be registered on the child nodes
						// that does not have the required coords prop
						// so its important to find the parent.
						findParent();

						// If nothing is selected, (e.g. it's a message, not a result),
						// do nothing.
						if (selected) {
							L.DomUtil.addClass(selected, 'leaflet-geocoderui-selected');
							this.selectEntry(selected);
						}
					}, this)
					.on(this._results, 'mouseover', function (e) {
						// Prevent scrolling over results list from zooming the map, if enabled
						this._scrollWheelZoomEnabled = map.scrollWheelZoom.enabled();
						if (this._scrollWheelZoomEnabled) {
							map.scrollWheelZoom.disable();
						}
					}, this)
					.on(this._results, 'mouseout', function (e) {
						// Re-enable scroll wheel zoom (if previously enabled) after
						// leaving the results box
						if (this._scrollWheelZoomEnabled) {
							map.scrollWheelZoom.enable();
						}
					}, this);

			// Recalculate width of the input bar when window resizes
			if (this.options.fullWidth) {
				L.DomEvent.on(window, 'resize', function (e) {
					if (L.DomUtil.hasClass(this._container, 'leaflet-geocoderui-expanded')) {
						this.setFullWidth();
					}
				}, this);
			}

			// Collapse an empty input bar when user interacts with the map
			// Disabled if expanded is set to true
			if (!this.options.expanded) {
				L.DomEvent.on(this._map, 'mousedown', this._onMapInteraction, this);
				L.DomEvent.on(this._map, 'touchstart', this._onMapInteraction, this);
			}

			L.DomEvent.disableClickPropagation(this._container);
			if (map.attributionControl) {
				map.attributionControl.addAttribution(this.options.attribution);
			}
			return container;
		},

		_onMapInteraction: function (event) {
			if (!this._input.value) {
				this.collapse();
			}
		},

		onRemove: function (map) {
			map.attributionControl.removeAttribution(this.options.attribution);
		}
	});

	L.control.geocoder = function (apiKey, options) {
		return new L.Control.Geocoder(apiKey, options);
	};

	/*
	 * throttle Utility function (borrowed from underscore)
	 */
	function throttle(func, wait, options) {
		var context, args, result;
		var timeout = null;
		var previous = 0;
		if (!options) options = {};
		var later = function () {
			previous = options.leading === false ? 0 : new Date().getTime();
			timeout = null;
			result = func.apply(context, args);
			if (!timeout) context = args = null;
		};
		return function () {
			var now = new Date().getTime();
			if (!previous && options.leading === false) previous = now;
			var remaining = wait - (now - previous);
			context = this;
			args = arguments;
			if (remaining <= 0 || remaining > wait) {
				if (timeout) {
					clearTimeout(timeout);
					timeout = null;
				}
				previous = now;
				result = func.apply(context, args);
				if (!timeout) context = args = null;
			} else if (!timeout && options.trailing !== false) {
				timeout = setTimeout(later, remaining);
			}
			return result;
		};
	}

	/*
	 * escaping a string for regex Utility function
	 * from https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
	 */
	function escapeRegExp(str) {
		return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
	}
}));


text:
package com.sofast.application.service;

import com.sofast.application.model.User;

public interface UserService extends BaseService<User, String> {

    int getCookieExpire();

    int getAuthExpire();

    int getAuthRefresh();

    User getUserByAuthCode(String authCode);

    User getUserByEmailPassword(String email, String password);

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EggFarmSystem.Client.Modules.MasterData
{
    public enum MasterDataTypes
    {
        Hen,
        HenHouse,
        Employee,
        Consumable,
        AdditionalCost
    }
}


text:
#include <tbb/tbb_config.h>
#if __TBB_WIN8UI_SUPPORT || __TBB_MIC_OFFLOAD
#include "harness.h"
int TestMain () {
    return Harness::Skipped;
}
#else
#include "rml_tbb.h"
#include "rml_omp.h"
#include "tbb/atomic.h"
#include "tbb/tick_count.h"

#define HARNESS_DEFAULT_MIN_THREADS 4
#include "harness.h"

// dynamic_link initializes its data structures in a static constructor. But
// the initialization order of static constructors in different modules is
// non-deterministic. Thus dynamic_link fails on some systems when the
// application changes its current directory after the library (TBB/OpenMP/...)
// is loaded but before the static constructors in the library are executed.
#define CHDIR_SUPPORT_BROKEN ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 && __GNUC_MINOR__ <= 9 )

const int OMP_ParallelRegionSize = 16;
int TBB_MaxThread = 4;           // Includes master
int OMP_MaxThread = int(~0u>>1); // Includes master

template<typename Client>
class ClientBase: public Client {
protected:
    typedef typename Client::version_type version_type;
    typedef typename Client::job job;
    typedef typename Client::policy_type policy_type;

private:
    /*override*/version_type version() const {
        return 0;
    }
    /*override*/size_t min_stack_size() const {
        return 1<<20;
    }
    /*override*/job* create_one_job() {
        return new rml::job;
    }
    /*override*/policy_type policy() const {
        return Client::turnaround;
    }
    /*override*/void acknowledge_close_connection() {
        delete this;
    }
    /*override*/void cleanup( job& j ) {delete &j;}

public:
    virtual ~ClientBase() {}
};

#if _WIN32
#include <direct.h>
#define PATH_LEN MAX_PATH+1
#define SLASH '\\'
#define ROOT_DIR "\\"
// ROOT_DIR_REST means how many symbols before first slash in the path
#define ROOT_DIR_REST 2
#else
#include <unistd.h>
#include <limits.h>
#define PATH_LEN PATH_MAX+1
#define SLASH '/'
#define ROOT_DIR "/"
// ROOT_DIR_REST means how many symbols before first slash in the path
#define ROOT_DIR_REST 0
#define _getcwd getcwd
#define _chdir  chdir
#endif

#if !CHDIR_SUPPORT_BROKEN
class ChangeCurrentDir {
    char dir[PATH_LEN+1];
    char *last_slash;
public:
    ChangeCurrentDir() {
        if ( !_getcwd( dir, PATH_LEN ) ) {
            REPORT_FATAL_ERROR("ERROR: Couldn't get current working directory\n");
        }

        last_slash = strrchr( dir, SLASH );
        ASSERT( last_slash, "The current directory doesn't contain slashes" );
        *last_slash = 0;

        if ( _chdir( last_slash-dir == ROOT_DIR_REST ? ROOT_DIR : dir ) ) {
            REPORT_FATAL_ERROR("ERROR: Couldn't change current working directory (%s)\n", dir );
        }
    }

    // Restore current dir
    ~ChangeCurrentDir() {
        *last_slash = SLASH;
        if ( _chdir(dir) ) {
            REPORT_FATAL_ERROR("ERROR: Couldn't change current working directory\n");
        }
    }
};
#endif

//! Represents a TBB or OpenMP run-time that uses RML.
template<typename Factory, typename Client>
class RunTime {
public:
    //! Factory that run-time uses to make servers.
    Factory factory;
    Client* client;
    typename Factory::server_type* server;
#if _WIN32||_WIN64
    ::rml::server::execution_resource_t me;
#endif
    RunTime() {
        factory.open();
    }
    ~RunTime() {
        factory.close();
    }
    //! Create server for this run-time
    void create_connection();

    //! Destroy server for this run-time
    void destroy_connection();
};

class ThreadLevelRecorder {
    tbb::atomic<int> level;
    struct record {
        tbb::tick_count time;
        int nthread;
    };
    tbb::atomic<unsigned> next;
    /** Must be power of two */
    static const unsigned max_record_count = 1<<20;
    record array[max_record_count];
public:
    void change_level( int delta );
    void dump();
};

void ThreadLevelRecorder::change_level( int delta ) {
    int x = level+=delta;
    tbb::tick_count t = tbb::tick_count::now();
    unsigned k = next++;
    if( k<max_record_count ) {
        record& r = array[k];
        r.time = t;
        r.nthread = x;
    }
}

void ThreadLevelRecorder::dump() {
    FILE* f = fopen("time.txt","w");
    if( !f ) {
        perror("fopen(time.txt)\n");
        exit(1);
    }
    unsigned limit = next;
    if( limit>max_record_count ) {
        // Clip
        limit = next;
    }
    for( unsigned i=0; i<limit; ++i ) {
        fprintf(f,"%f\t%d\n",(array[i].time-array[0].time).seconds(),array[i].nthread);
    }
    fclose(f);
}

ThreadLevelRecorder TotalThreadLevel;

class TBB_Client: public ClientBase<tbb::internal::rml::tbb_client> {
    /*override*/void process( job& j );
    /*override*/size_type max_job_count() const {
        return TBB_MaxThread-1;
    }
};

class OMP_Client: public ClientBase<__kmp::rml::omp_client> {
    /*override*/void process( job&, void* cookie, omp_client::size_type );
    /*override*/size_type max_job_count() const {
        return OMP_MaxThread-1;
    }
};

#if !CHDIR_SUPPORT_BROKEN
// A global instance of ChangeCurrentDir should be declared before TBB_RunTime and OMP_RunTime
// since we want to change current directory before opening factory
ChangeCurrentDir Changer;
#endif
RunTime<tbb::internal::rml::tbb_factory, TBB_Client> TBB_RunTime;
RunTime<__kmp::rml::omp_factory, OMP_Client> OMP_RunTime;

template<typename Factory, typename Client>
void RunTime<Factory,Client>::create_connection() {
    client = new Client;
    typename Factory::status_type status = factory.make_server( server, *client );
    ASSERT( status==Factory::st_success, NULL );
#if _WIN32||_WIN64
    server->register_master( me );
#endif /* _WIN32||_WIN64 */
}

template<typename Factory, typename Client>
void RunTime<Factory,Client>::destroy_connection() {
#if _WIN32||_WIN64
    server->unregister_master( me );
#endif /* _WIN32||_WIN64 */
    server->request_close_connection();
    server = NULL;
}

class OMP_Team {
public:
    OMP_Team( __kmp::rml::omp_server& ) {}
    tbb::atomic<unsigned> barrier;
};

tbb::atomic<int> AvailWork;
tbb::atomic<int> CompletionCount;

void OMPWork() {
    tbb::atomic<int> x;
    for( x=0; x<2000000; ++x ) {
        continue;
    }
}

void TBBWork() {
    if( AvailWork>=0 ) {
        int k = --AvailWork;
        if( k==-1 ) {
            TBB_RunTime.server->adjust_job_count_estimate(-(TBB_MaxThread-1));
            ++CompletionCount;
        } else if( k>=0 ) {
            for( int k=0; k<4; ++k ) {
                OMP_Team team( *OMP_RunTime.server );
                int n = OMP_RunTime.server->try_increase_load( OMP_ParallelRegionSize-1, /*strict=*/false );
                team.barrier = 0;
                ::rml::job* array[OMP_ParallelRegionSize-1];
                if( n>0)
                    OMP_RunTime.server->get_threads( n, &team, array );
                // Master does work inside parallel region too.
                OMPWork();
                // Master waits for workers to finish
                if( n>0 )
                    while( team.barrier!=unsigned(n) ) {
                        __TBB_Yield();
                    }
            }
            ++CompletionCount;
        }
    }
}

/*override*/void TBB_Client::process( job& ) {
    TotalThreadLevel.change_level(1);
    TBBWork();
    TotalThreadLevel.change_level(-1);
}

/*override*/void OMP_Client::process( job& /* j */, void* cookie, omp_client::size_type ) {
    TotalThreadLevel.change_level(1);
    ASSERT( OMP_RunTime.server, NULL );
    OMPWork();
    ASSERT( OMP_RunTime.server, NULL );
    static_cast<OMP_Team*>(cookie)->barrier+=1;
    TotalThreadLevel.change_level(-1);
}

void TBBOutSideOpenMPInside() {
    TotalThreadLevel.change_level(1);
    CompletionCount = 0;
    int tbbtasks = 32;
    AvailWork = tbbtasks;
    TBB_RunTime.server->adjust_job_count_estimate(TBB_MaxThread-1);
    while( CompletionCount!=tbbtasks+1 ) {
        TBBWork();
    }
    TotalThreadLevel.change_level(-1);
}

int TestMain () {
#if CHDIR_SUPPORT_BROKEN
    REPORT("Known issue: dynamic_link does not support current directory changing before its initialization.\n");
#endif
    for( int TBB_MaxThread=MinThread; TBB_MaxThread<=MaxThread; ++TBB_MaxThread ) {
        REMARK("Testing with TBB_MaxThread=%d\n", TBB_MaxThread);
        TBB_RunTime.create_connection();
        OMP_RunTime.create_connection();
        TBBOutSideOpenMPInside();
        OMP_RunTime.destroy_connection();
        TBB_RunTime.destroy_connection();
    }
    TotalThreadLevel.dump();
    return Harness::Done;
}
#endif /* __TBB_WIN8UI_SUPPORT || __TBB_MIC_OFFLOAD */


text:
// Generated on Fri Nov 17 19:09:30 MSK 2006
// DTD/Schema  :    hibernate-mapping-3.0.dtd

package com.intellij.hibernate.model.xml.mapping;

import com.intellij.hibernate.model.converters.AttributeMemberConverter;
import com.intellij.hibernate.model.converters.LazyTypeConverter;
import com.intellij.hibernate.model.converters.PropertyTypeResolvingConverter;
import com.intellij.hibernate.model.enums.AccessType;
import com.intellij.hibernate.model.enums.LazyType;
import com.intellij.hibernate.model.enums.PropertyGeneratedType;
import com.intellij.javaee.model.xml.CommonDomModelElement;
import com.intellij.psi.PsiMember;
import com.intellij.psi.PsiType;
import com.intellij.util.xml.*;
import javax.annotation.Nonnull;

import java.util.List;

/**
 * hibernate-mapping-3.0.dtd:property interface.
 * Type property documentation
 *

 *  Property of an entity class or component, component-element, composite-id, etc.
 * JavaBeans style properties are mapped to table columns.
 *

 */
public interface HbmProperty extends CommonDomModelElement, HbmPropertyBase {

	/**
	 * Returns the value of the formula child.
	 * Attribute formula
	 * @return the value of the formula child.
	 */
	@Nonnull
	GenericAttributeValue<String> getFormula();

	/**
	 * Returns the value of the insert child.
	 * Attribute insert
	 * @return the value of the insert child.
	 */
	@Nonnull
	GenericAttributeValue<Boolean> getInsert();

	/**
	 * Returns the value of the unique child.
	 * Attribute unique
	 * @return the value of the unique child.
	 */
	@Nonnull
	GenericAttributeValue<Boolean> getUnique();

	/**
	 * Returns the value of the column child.
	 * Attribute column
	 * @return the value of the column child.
	 */
	@Nonnull
        GenericAttributeValue<String> getColumn();

	/**
	 * Returns the value of the type child.
	 * Attribute type
	 * @return the value of the type child.
	 */
	@Nonnull
        @Convert(PropertyTypeResolvingConverter.class)
        @com.intellij.util.xml.Attribute ("type")
	GenericAttributeValue<PsiType> getTypeAttr();

	/**
	 * Returns the value of the length child.
	 * Attribute length
	 * @return the value of the length child.
	 */
	@Nonnull
	GenericAttributeValue<Integer> getLength();

	/**
	 * Returns the value of the access child.
	 * Attribute access
	 * @return the value of the access child.
	 */
	@Nonnull
	GenericAttributeValue<AccessType> getAccess();

	/**
	 * Returns the value of the unique-key child.
	 * Attribute unique-key
	 * @return the value of the unique-key child.
	 */
	@Nonnull
	GenericAttributeValue<String> getUniqueKey();

	/**
	 * Returns the value of the index child.
	 * Attribute index
	 * @return the value of the index child.
	 */
	@Nonnull
	GenericAttributeValue<String> getIndex();

	/**
	 * Returns the value of the update child.
	 * Attribute update
	 * @return the value of the update child.
	 */
	@Nonnull
	GenericAttributeValue<Boolean> getUpdate();

	/**
	 * Returns the value of the optimistic-lock child.
	 * Attribute optimistic-lock
	 * @return the value of the optimistic-lock child.
	 */
	@Nonnull
	GenericAttributeValue<Boolean> getOptimisticLock();

	/**
	 * Returns the value of the node child.
	 * Attribute node
	 * @return the value of the node child.
	 */
	@Nonnull
	GenericAttributeValue<String> getNode();

	/**
	 * Returns the value of the lazy child.
	 * Attribute lazy
	 * @return the value of the lazy child.
	 */
	@Nonnull
        @Convert(LazyTypeConverter.class)
        GenericAttributeValue<LazyType> getLazy();

	/**
	 * Returns the value of the precision child.
	 * Attribute precision
	 * @return the value of the precision child.
	 */
	@Nonnull
	GenericAttributeValue<Integer> getPrecision();

	/**
	 * Returns the value of the not-null child.
	 * Attribute not-null
	 * @return the value of the not-null child.
	 */
	@Nonnull
	GenericAttributeValue<Boolean> getNotNull();

	/**
	 * Returns the value of the generated child.
	 * Attribute generated
	 * @return the value of the generated child.
	 */
	@Nonnull
	GenericAttributeValue<PropertyGeneratedType> getGenerated();

	/**
	 * Returns the value of the scale child.
	 * Attribute scale
	 * @return the value of the scale child.
	 */
	@Nonnull
	GenericAttributeValue<Integer> getScale();

	/**
	 * Returns the value of the name child.
	 * Attribute name
	 * @return the value of the name child.
	 */
        @Required
        @Attribute("name")
        @Convert(AttributeMemberConverter.class)
        GenericAttributeValue<PsiMember> getTargetMember();

	/**
	 * Returns the list of meta children.
	 * Type meta documentation
	 *

	 * 	META element definition; used to assign meta-level attributes to a class
	 * 	or property.  Is currently used by codegenerator as a placeholder for
	 * 	values that is not directly related to OR mappings.
	 *

	 * @return the list of meta children.
	 */
	@Nonnull
	List<HbmMeta> getMetas();
	/**
	 * Adds new child to the list of meta children.
	 * @return created child
	 */
	HbmMeta addMeta();

	/**
	 * Returns the value of the type child.
	 * Type type documentation
	 *

	 *  Declares the type of the containing property (overrides an eventually existing type
	 * attribute of the property). May contain param elements to customize a ParametrizableType.
	 *

	 * @return the value of the type child.
	 */
	@Nonnull
	HbmType getType();

	/**
	 * Returns the list of column children.
	 * Type column documentation
	 *

	 *  The column element is an alternative to column attributes and required for
	 * mapping associations to classes with composite ids.
	 *

	 * @return the list of column children.
	 */
	@Nonnull
	List<HbmColumn> getColumns();
	/**
	 * Adds new child to the list of column children.
	 * @return created child
	 */
	HbmColumn addColumn();

	/**
	 * Returns the list of formula children.
	 * Type formula documentation
	 *

	 *  The formula and subselect elements allow us to map derived properties and
	 * entities.
	 *

	 * @return the list of formula children.
	 */
	@Nonnull
	List<GenericDomValue<String>> getFormulas();
	/**
	 * Adds new child to the list of formula children.
	 * @return created child
	 */
	GenericDomValue<String> addFormula();

}


text:
%--- help for splanar.differentiate ---
%
%  differentiate - differentiates vectors of splanar objects
%
%  ::
%
%
%    derivs=splanar.differentiate(eqtns,nwrt)
%    derivs=splanar.differentiate(eqtns,nwrt,order)
%    derivs=splanar.differentiate(eqtns,nwrt,order,verbose)
%
%  Args:
%
%     - **eqtns** [splanar|cell array]: vector or cell array of splanar objects
%
%     - **nwrt** [integer]: number of variables for which differentiation is
%       taken
%
%     - **order** [integer|{1}]: order of differentiation
%
%     - **alien_list** [empty|cellstr|char]: list of alien functions
%       (functions that RISE does not recognize and that are to be
%       differentiated by the user himself).
%
%     - **verbose** [true|{false}]: displays information about the process e.g.
%       the amount of time it takes to differentiate each order
%
%  Returns:
%     :
%
%     - **derivs** [structure]: each element in the structure contains:
%       - **size** [2-colum vector]: number of rows and number of columns of
%         the compacted derivatives i.e. unique columns
%       - **derivatives** [vector of splanar]: derivatives
%       - **nwrt** [integer]: number of variables for which differentiation is
%         taken
%       - **order** [integer]: order of differentiation of the current
%         structure
%       - **nnz_derivs** [integer]: number of non-zero derivatives
%       - **partitions** [vector]: vector that help reconstruct the
%         expanded/grand derivative matrix.
%       - **map** []: empty field that will be used in a later stage
%
%  Note:
%
%  Example:
%
%     See also:
%


text:
package com.tngtech.configbuilder.util;

import com.google.common.collect.Sets;
import com.tngtech.configbuilder.annotation.validation.Validation;
import com.tngtech.configbuilder.configuration.ErrorMessageSetup;
import com.tngtech.configbuilder.exception.ValidatorException;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import javax.validation.ConstraintViolation;
import javax.validation.ValidatorFactory;
import java.util.Set;

import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

@RunWith(MockitoJUnitRunner.class)
public class ConfigValidatorTest {

    private static class TestConfig {

        @Validation
        private void validate() {
            throw new RuntimeException();
        }
    }

    private ConfigValidator<TestConfig> configValidator;

    @Mock
    private ConfigBuilderFactory configBuilderFactory;
    @Mock
    private ValidatorFactory validatorFactory;
    @Mock
    private javax.validation.Validator validator;
    @Mock
    private TestConfig testConfig;
    @Mock
    private ConstraintViolation<TestConfig> constraintViolation1, constraintViolation2;
    @Mock
    private ErrorMessageSetup errorMessageSetup;
    @Mock
    private AnnotationHelper annotationHelper;

    @Rule
    public ExpectedException expectedException = ExpectedException.none();

    @Before
    public void setUp() throws Exception {

        when(configBuilderFactory.getInstance(AnnotationHelper.class)).thenReturn(annotationHelper);
        when(configBuilderFactory.getInstance(ErrorMessageSetup.class)).thenReturn(errorMessageSetup);
        when(configBuilderFactory.getInstance(ValidatorFactory.class)).thenReturn(validatorFactory);
        when(validatorFactory.getValidator()).thenReturn(validator);

        configValidator = new ConfigValidator<>(configBuilderFactory);
    }

    @Test
    public void testValidateWithConstraintViolations() throws Exception {

        Set<ConstraintViolation<TestConfig>> constraintViolations = Sets.newHashSet(constraintViolation1, constraintViolation2);

        when(validator.validate(testConfig)).thenReturn(constraintViolations);
        when(errorMessageSetup.getErrorMessage(Matchers.any(Class.class))).thenReturn("Validation found the following constraint violations:");

        expectedException.expect(ValidatorException.class);
        expectedException.expectMessage("Validation found the following constraint violations:");

        configValidator.validate(testConfig);
    }

    @Test
    public void testCallValidadionMethods() throws Exception {

        when(errorMessageSetup.getErrorMessage(Matchers.any(Throwable.class))).thenReturn("InvocationTargetException");
        expectedException.expect(ValidatorException.class);
        expectedException.expectMessage("InvocationTargetException");
        when(annotationHelper.getMethodsAnnotatedWith(TestConfig.class, Validation.class)).thenReturn(Sets.newHashSet(TestConfig.class.getDeclaredMethod("validate")));
        configValidator.validate(new TestConfig());
        verify(annotationHelper).getMethodsAnnotatedWith(TestConfig.class, Validation.class);
    }

    @Test
    public void testValidateWithoutConstraintViolations() throws Exception {

        Set<ConstraintViolation<TestConfig>> constraintViolations = Sets.newHashSet();
        when(validator.validate(testConfig)).thenReturn(constraintViolations);

        configValidator.validate(testConfig);
    }
}


text:
@interface PodsDummy_Pods_BRGOTests : NSObject
@end
@implementation PodsDummy_Pods_BRGOTests
@end


text:
<?php declare(strict_types=1);

namespace ApiClients\Client\Github\Resource\Sync\Git;

use ApiClients\Client\Github\Resource\Git\EmptyTree as BaseEmptyTree;

class EmptyTree extends BaseEmptyTree
{
}


text:
/**
 * generated by Xtext 2.10.0
 */
package org.refactor.modelEditor.impl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

import org.refactor.modelEditor.Call;
import org.refactor.modelEditor.Method;
import org.refactor.modelEditor.ModelEditorPackage;

/**
 *
 * An implementation of the model object 'Call'.
 *
 *

 * The following features are implemented:
 *

 *

 *
{@link org.refactor.modelEditor.impl.CallImpl#getCalls Calls}

 *
{@link org.refactor.modelEditor.impl.CallImpl#getMethod Method}

 *

 *
 * @generated
 */
public class CallImpl extends MinimalEObjectImpl.Container implements Call
{
  /**
   * The default value of the '{@link #getCalls() Calls}' attribute.
   *
   *
   * @see #getCalls()
   * @generated
   * @ordered
   */
  protected static final int CALLS_EDEFAULT = 0;

  /**
   * The cached value of the '{@link #getCalls() Calls}' attribute.
   *
   *
   * @see #getCalls()
   * @generated
   * @ordered
   */
  protected int calls = CALLS_EDEFAULT;

  /**
   * The cached value of the '{@link #getMethod() Method}' reference.
   *
   *
   * @see #getMethod()
   * @generated
   * @ordered
   */
  protected Method method;

  /**
   *
   *
   * @generated
   */
  protected CallImpl()
  {
    super();
  }

  /**
   *
   *
   * @generated
   */
  @Override
  protected EClass eStaticClass()
  {
    return ModelEditorPackage.Literals.CALL;
  }

  /**
   *
   *
   * @generated
   */
  public int getCalls()
  {
    return calls;
  }

  /**
   *
   *
   * @generated
   */
  public void setCalls(int newCalls)
  {
    int oldCalls = calls;
    calls = newCalls;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ModelEditorPackage.CALL__CALLS, oldCalls, calls));
  }

  /**
   *
   *
   * @generated
   */
  public Method getMethod()
  {
    if (method != null && method.eIsProxy())
    {
      InternalEObject oldMethod = (InternalEObject)method;
      method = (Method)eResolveProxy(oldMethod);
      if (method != oldMethod)
      {
        if (eNotificationRequired())
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModelEditorPackage.CALL__METHOD, oldMethod, method));
      }
    }
    return method;
  }

  /**
   *
   *
   * @generated
   */
  public Method basicGetMethod()
  {
    return method;
  }

  /**
   *
   *
   * @generated
   */
  public void setMethod(Method newMethod)
  {
    Method oldMethod = method;
    method = newMethod;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ModelEditorPackage.CALL__METHOD, oldMethod, method));
  }

  /**
   *
   *
   * @generated
   */
  @Override
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
      case ModelEditorPackage.CALL__CALLS:
        return getCalls();
      case ModelEditorPackage.CALL__METHOD:
        if (resolve) return getMethod();
        return basicGetMethod();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   *
   *
   * @generated
   */
  @Override
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
      case ModelEditorPackage.CALL__CALLS:
        setCalls((Integer)newValue);
        return;
      case ModelEditorPackage.CALL__METHOD:
        setMethod((Method)newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   *
   *
   * @generated
   */
  @Override
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
      case ModelEditorPackage.CALL__CALLS:
        setCalls(CALLS_EDEFAULT);
        return;
      case ModelEditorPackage.CALL__METHOD:
        setMethod((Method)null);
        return;
    }
    super.eUnset(featureID);
  }

  /**
   *
   *
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
      case ModelEditorPackage.CALL__CALLS:
        return calls != CALLS_EDEFAULT;
      case ModelEditorPackage.CALL__METHOD:
        return method != null;
    }
    return super.eIsSet(featureID);
  }

  /**
   *
   *
   * @generated
   */
  @Override
  public String toString()
  {
    if (eIsProxy()) return super.toString();

    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (calls: ");
    result.append(calls);
    result.append(')');
    return result.toString();
  }

} //CallImpl


text:
@interface CommentModel : NSObject
@property(nonatomic,strong)NSString*total_comment;
@property(nonatomic,strong)NSString*totay_comment;
@property(nonatomic,strong)NSString*totay_bad_comment;

@end


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

    <title>Assembler Compiler</title>

                    Assembler Compiler

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                     Toggle navigation

                </button>

  Compiler

  About

 Assembler Compiler

Developed by Artur Nista

            <button type="button" class="btn btn-default" onclick="fnSampleCode()">Sample code</button>
            <button type="button" class="btn btn-default" onclick="fnCleanCode()">Clean</button>

          <textarea class="form-control" rows="15" id="iTaxArea"></textarea>

        <button type="button" id="bCompile" class="btn btn-success btn-lg btn-block" onclick="fnCompile()">Compile</button>

           Errors:

          <button type="button" class="close" data-dismiss="alert" aria-label="Close">×</button>
           Warnings:

                 Assembly
                 Binário
                 Hexadecimal

Found an issue?


text:
'use strict';

module.exports = {
    set: function (v) {
        this.setProperty('-webkit-column-break-inside', v);
    },
    get: function () {
        return this.getPropertyValue('-webkit-column-break-inside');
    },
    enumerable: true
};


text:
class EdgeTest : public CppUnit::TestCase
{
	private:

	public:
		void testCreateEdge()
		{//Basic test of creating the edge.
			//Set up the Edge.
			Graph::Edge ed(1, 2, 3);

			//Verify the values.
			CPPUNIT_ASSERT( ed.getWeight() == 1 );
			CPPUNIT_ASSERT( ed.getStartVertex() == 2 );
			CPPUNIT_ASSERT( ed.getEndVertex() == 3 );
		}

		void testModifyEdge()
		{//Basic test of modifying the edge.
			//Set up the Edge.
			Graph::Edge ed(1, 2, 3);

			//Change the values up using the methods.
			ed.setWeight( 4 );
			ed.setStartVertex( 5 );
			ed.setEndVertex( 6 );

			//Verfiy the values.
			CPPUNIT_ASSERT( ed.getWeight() == 4 );
			CPPUNIT_ASSERT( ed.getStartVertex() == 5 );
			CPPUNIT_ASSERT( ed.getEndVertex() == 6 );
		}

		//Create the test suite using CPPUnit macros.
		CPPUNIT_TEST_SUITE( EdgeTest );
		CPPUNIT_TEST( testCreateEdge );
		CPPUNIT_TEST( testModifyEdge );
		CPPUNIT_TEST_SUITE_END( );
};

int main()
{
	CPPUNIT_TEST_SUITE_REGISTRATION( EdgeTest );
	CppUnit::TextUi::TestRunner runner;
	CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry( );
	runner.addTest( registry.makeTest( ) );
	if ( runner.run( ) )
	{//Runner had success.
		return 0;
	}
	else
	{//Runner failed.
		return 1;
	}
}


text:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>11. README.mips</title>
<link rel="stylesheet" type="text/css" href="vg_basic.css">
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Valgrind Documentation">
<link rel="up" href="dist.html" title="Valgrind Distribution Documents">
<link rel="prev" href="dist.readme-android_emulator.html" title="10. README.android_emulator">
<link rel="next" href="licenses.html" title="GNU Licenses">

Valgrind Distribution Documents

11. README.mips

Supported platforms

-------------------

- MIPS32 and MIPS64 platforms are currently supported.

- Both little-endian and big-endian cores are supported.

- MIPS DSP ASE on MIPS32 platforms is supported.

Building V for MIPS

-------------------

- Native build is available for all supported platforms. The build system

expects that native GCC is configured correctly and optimized for the platform.

Yet, this may not be the case with some Debian distributions which configure

GCC to compile to "mips1" by default. Depending on a target platform, using

CFLAGS="-mips32r2", CFLAGS="-mips32" or CFLAGS="-mips64" or

CFLAGS="-mips64 -mabi=64" will do the trick and compile Valgrind correctly.

- Use of cross-toolchain is supported as well.

- Example of configure line and additional configure options:

   $ ./configure --host=mipsel-linux-gnu --prefix=<path_to_install_directory>

        [--with-pagesize=<4|16|64>]

 * --host=mips-linux-gnu is necessary only if Valgrind is built on platform

   other then MIPS, tools for building MIPS application have to be in PATH.

 * --with-pagesize option is used to set default PAGE SIZE. If option is not

   used, PAGE SIZE is set to value default for platform on which Valgrind is

   built on. Possible values are 4, 16 of 64 and represent size in kilobytes.

 * --host=mips-linux-gnu is necessary if you compile it with cross toolchain

   compiler for big endian platform.

 * --host=mipsel-linux-gnu is necessary if you compile it with cross toolchain

   compiler for little endian platform.

 * --build=mips-linux is needed if you want to build it for MIPS32 on 64-bit

   MIPS system.

 * If you are compiling Valgrind for mips32 with gcc version older then

   gcc (GCC) 4.5.1, you must specify CFLAGS="-mips32r2 -mplt", e.g.

   ./configure --prefix=<path_to_install_directory>

   CFLAGS="-mips32r2 -mplt"

Limitations

-----------

- Some gdb tests will fail when gdb (GDB) older than 7.5 is used and gdb is

  not compiled with '--with-expat=yes'.

- You can not compile tests for DSP ASE if you are using gcc (GCC) older

  then 4.6.1 due to a bug in the toolchain.

- Older GCC may have issues with some inline assembly blocks. Get a toolchain

  based on newer GCC versions, if possible.

<< 10. README.android_emulator
Up
 GNU Licenses >>

Home


text:
package com.google.gcs.sdrs.service.manager;

import static org.junit.Assert.assertEquals;

import com.google.gcs.sdrs.service.worker.BaseWorker;
import com.google.gcs.sdrs.service.worker.WorkerResult;
import java.util.UUID;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/** Test class for JobManagerMonitor */
public class JobManagerMonitorTest {

  private JobManager instance;
  private JobManagerMonitor objectToTest;

  /** Set up steps before each test */
  @Before
  public void setUp() {
    instance = JobManager.getInstance();
    objectToTest = new JobManagerMonitor(instance);
  }

  /** Tear down steps after each test */
  @After
  public void tearDown() {
    instance.shutDownJobManagerNow();
  }

  /**
   * Tests the getWorkerResult method of the monitor thread. Should decrement the activeWorkerCount
   * in the jobManager.
   */
  @Test
  public void getWorkerResultTest() throws InterruptedException {
    int activeWorkers = instance.activeWorkerCount.get();
    BaseWorker worker =
        new BaseWorker(UUID.randomUUID().toString()) {
          @Override
          public void doWork() {
            workerResult.setStatus(WorkerResult.WorkerResultStatus.SUCCESS);
          }
        };
    instance.submitJob(worker);
    assertEquals(instance.activeWorkerCount.get(), activeWorkers + 1);
    objectToTest.getWorkerResults();
    assertEquals(instance.activeWorkerCount.get(), activeWorkers);
  }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd"
              version="1.0.0">
    <ows:ServiceIdentification>
        <ows:Title>tianditu maps</ows:Title>
        <ows:Abstract>
        </ows:Abstract>
        <ows:ServiceType>OGC WMTS</ows:ServiceType>
        <ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
        <ows:Fees>none</ows:Fees>
        <ows:AccessConstraints></ows:AccessConstraints>
    </ows:ServiceIdentification>
    <Contents>
        <Layer>
            <ows:Title>tianditu streets</ows:Title>
            <ows:Abstract></ows:Abstract>
            <ows:Identifier>tianditu-streets</ows:Identifier>
            <Style isDefault="true">
                <ows:Identifier>tianditu-streets</ows:Identifier>
            </Style>
            <Format>image/png</Format>
            <TileMatrixSetLink>
                <TileMatrixSet>google3857</TileMatrixSet>
            </TileMatrixSetLink>
            <ResourceURL format="image/png"
                         template="http://t0.tianditu.com/DataServer?T=vec_w&X={TileCol}&Y={TileRow}&L={TileMatrix}&tk=7786923a385369346d56b966bb6ad62f"
                         resourceType="tile"/>
        </Layer>
        <Layer>
            <ows:Title>tianditu streets annotation</ows:Title>
            <ows:Abstract></ows:Abstract>
            <ows:Identifier>tianditu-streets-annotation</ows:Identifier>
            <Style isDefault="true">
                <ows:Identifier>tianditu-streets-annotation</ows:Identifier>
            </Style>
            <Format>image/png</Format>
            <TileMatrixSetLink>
                <TileMatrixSet>google3857</TileMatrixSet>
            </TileMatrixSetLink>
            <ResourceURL format="image/png"
                         template="http://t0.tianditu.com/DataServer?T=cva_w&X={TileCol}&Y={TileRow}&L={TileMatrix}&tk=7786923a385369346d56b966bb6ad62f"
                         resourceType="tile"/>
        </Layer>
        <Layer>
            <ows:Title>tianditu satellite</ows:Title>
            <ows:Abstract></ows:Abstract>
            <ows:Identifier>tianditu-satellite</ows:Identifier>
            <Style isDefault="true">
                <ows:Identifier>tianditu-satellite</ows:Identifier>
            </Style>
            <Format>image/png</Format>
            <TileMatrixSetLink>
                <TileMatrixSet>google3857</TileMatrixSet>
            </TileMatrixSetLink>
            <ResourceURL format="image/png"
                         template="http://t0.tianditu.com/DataServer?T=img_w&X={TileCol}&Y={TileRow}&L={TileMatrix}&tk=7786923a385369346d56b966bb6ad62f"
                         resourceType="tile"/>
        </Layer>
        <Layer>
            <ows:Title>tianditu satellite annotation</ows:Title>
            <ows:Abstract></ows:Abstract>
            <ows:Identifier>tianditu-satellite-annotation</ows:Identifier>
            <Style isDefault="true">
                <ows:Identifier>tianditu-satellite-annotation</ows:Identifier>
            </Style>
            <Format>image/png</Format>
            <TileMatrixSetLink>
                <TileMatrixSet>google3857</TileMatrixSet>
            </TileMatrixSetLink>
            <ResourceURL format="image/png"
                         template="http://t0.tianditu.com/DataServer?T=cia_w&X={TileCol}&Y={TileRow}&L={TileMatrix}&tk=7786923a385369346d56b966bb6ad62f"
                         resourceType="tile"/>
        </Layer>
        <Layer>
            <ows:Title>tianditu terrain</ows:Title>
            <ows:Abstract></ows:Abstract>
            <ows:Identifier>tianditu-terrain</ows:Identifier>
            <Style isDefault="true">
                <ows:Identifier>tianditu-terrain</ows:Identifier>
            </Style>
            <Format>image/png</Format>
            <TileMatrixSetLink>
                <TileMatrixSet>google3857</TileMatrixSet>
            </TileMatrixSetLink>
            <ResourceURL format="image/png"
                         template="http://t0.tianditu.com/DataServer?T=ter_w&X={TileCol}&Y={TileRow}&L={TileMatrix}&tk=7786923a385369346d56b966bb6ad62f"
                         resourceType="tile"/>
        </Layer>
        <Layer>
            <ows:Title>tianditu terrain annotation</ows:Title>
            <ows:Abstract></ows:Abstract>
            <ows:Identifier>tianditu-terrain-annotation</ows:Identifier>
            <Style isDefault="true">
                <ows:Identifier>tianditu-terrain-annotation</ows:Identifier>
            </Style>
            <Format>image/png</Format>
            <TileMatrixSetLink>
                <TileMatrixSet>google3857</TileMatrixSet>
            </TileMatrixSetLink>
            <ResourceURL format="image/png"
                         template="http://t0.tianditu.com/DataServer?T=cta_w&X={TileCol}&Y={TileRow}&L={TileMatrix}&tk=7786923a385369346d56b966bb6ad62f"
                         resourceType="tile"/>
        </Layer>
        <TileMatrixSet>
            <ows:Identifier>google3857</ows:Identifier>
            <ows:BoundingBox crs="urn:ogc:def:crs:EPSG:6.18.3:4326">
                <ows:LowerCorner>-179 -89</ows:LowerCorner>
                <ows:UpperCorner>179 89</ows:UpperCorner>
           </ows:BoundingBox>
          <ows:SupportedCRS>urn:ogc:def:crs:EPSG:6.18.3:3857</ows:SupportedCRS>
            <WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible</WellKnownScaleSet>
            <TileMatrix>
                <ows:Identifier>0</ows:Identifier>
                <ScaleDenominator>559082264.029</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>1</MatrixWidth>
                <MatrixHeight>1</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>1</ows:Identifier>
                <ScaleDenominator>279541132.015</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>2</MatrixWidth>
                <MatrixHeight>2</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>2</ows:Identifier>
                <ScaleDenominator>139770566.007</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>4</MatrixWidth>
                <MatrixHeight>4</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>3</ows:Identifier>
                <ScaleDenominator>69885283.0036</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>8</MatrixWidth>
                <MatrixHeight>8</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>4</ows:Identifier>
                <ScaleDenominator>34942641.5018</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>16</MatrixWidth>
                <MatrixHeight>16</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>5</ows:Identifier>
                <ScaleDenominator>17471320.7509</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>32</MatrixWidth>
                <MatrixHeight>32</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>6</ows:Identifier>
                <ScaleDenominator>8735660.37545</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>64</MatrixWidth>
                <MatrixHeight>64</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>7</ows:Identifier>
                <ScaleDenominator>4367830.18773</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>128</MatrixWidth>
                <MatrixHeight>128</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>8</ows:Identifier>
                <ScaleDenominator>2183915.09386</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>256</MatrixWidth>
                <MatrixHeight>256</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>9</ows:Identifier>
                <ScaleDenominator>1091957.54693</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>512</MatrixWidth>
                <MatrixHeight>512</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>10</ows:Identifier>
                <ScaleDenominator>545978.773466</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>1024</MatrixWidth>
                <MatrixHeight>1024</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>11</ows:Identifier>
                <ScaleDenominator>272989.386733</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>2048</MatrixWidth>
                <MatrixHeight>2048</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>12</ows:Identifier>
                <ScaleDenominator>136494.693366</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>4096</MatrixWidth>
                <MatrixHeight>4096</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>13</ows:Identifier>
                <ScaleDenominator>68247.3466832</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>8192</MatrixWidth>
                <MatrixHeight>8192</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>14</ows:Identifier>
                <ScaleDenominator>34123.6733416</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>16384</MatrixWidth>
                <MatrixHeight>16384</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>15</ows:Identifier>
                <ScaleDenominator>17061.8366708</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>32768</MatrixWidth>
                <MatrixHeight>32768</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>16</ows:Identifier>
                <ScaleDenominator>8530.91833540</ScaleDenominator>
                <TopLeftCorner>-20037508.3428 20037508.3428</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>65536</MatrixWidth>
                <MatrixHeight>65536</MatrixHeight>
            </TileMatrix>
        </TileMatrixSet>
    </Contents>
</Capabilities>


text:
from rospy import init_node, Subscriber, spin, Publisher, Time
from geometry_msgs.msg import Twist, PoseStamped

init_node('go_up')
TWIST_PUB = Publisher('/cmd_vel', Twist, queue_size=1)

while True:
    message = Twist()
    message.linear.z = 5.0
    TWIST_PUB.publish(message)


text:
swoole_process: sysv msgqueue
--SKIPIF--
<?php require __DIR__ . '/../include/skipif.inc'; ?>
--FILE--
<?php
require __DIR__ . '/../include/bootstrap.php';

function callback_function(swoole_process $worker){}

$process = new swoole_process('callback_function', false, false);
$process->useQueue();

$bytes = 0;
foreach(range(1, 10) as $i)
{
    $data = "hello worker[$i]";
    $bytes += strlen($data);
    $process->push($data);
}

$queue = $process->statQueue();
($queue['queue_num'] == 10 && $queue['queue_bytes'] == $bytes)
    && $output = "Success\n";

echo $output;
$process->freeQueue();
?>
Done
--EXPECTREGEX--
Success
Done.*


text:
namespace Evel {

UdpConnection_WF::UdpConnection_WF( UdpConnectionFactory *ucf, const InetAddress &addr, TF_parse &&f_parse ) : UdpConnection( ucf, addr ), f_parse( std::move( f_parse ) ) {
}

UdpConnection_WF::~UdpConnection_WF() {
    if ( f_on_del ) f_on_del( this );
}

void UdpConnection_WF::parse( char **data, size_t size ) {
    if ( f_parse ) f_parse( this, data, size );
}

} // namespace Evel


text:
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Media.Animation;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Threading;
using System.Drawing;
using System.IO;
using System.Windows.Threading;
using System.Windows.Interop;
using System.Runtime.InteropServices;
using Microsoft.Protocols.TestManager.Kernel;

namespace Microsoft.Protocols.TestManager.UI
{
    /// <summary>
    /// Interaction logic for PrerequisitePage.xaml
    /// </summary>
    public partial class AutoDetectionPage
    {
        PrerequisitView prerequisits;
        public void SetPrerequisits(PrerequisitView prerequisits)
        {
            this.prerequisits = prerequisits;
            Title = prerequisits.Title;
            PrerequisitesGrid.DataContext = prerequisits;
        }

        List<Detector.DetectingItem> detectionSteps;
        public void SetDetectionSteps(List<Detector.DetectingItem> steps)
        {
            detectionSteps = steps;
            StepsListBox.ItemsSource = steps;
        }

        public void ResetSteps()
        {
            foreach (var item in detectionSteps)
                item.DetectingStatus = Detector.DetectingStatus.Pending;
        }

        public AutoDetectionPage()
        {
            InitializeComponent();
        }

        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
        }

        private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (ContentChanged != null) ContentChanged(this, new EventArgs());
        }

        private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (ContentChanged != null) ContentChanged(this, new EventArgs());
        }

        public event EventHandler ContentChanged;

        private void Hyperlink_Click(object sender, RoutedEventArgs e)
        {
            Pages.util.OpenDetectionLog();
        }
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Translating Anything from Anywhere">
    <meta name="author" content="TranslateMEthis.com">
    <meta name="keywords" content="Translation, Transcription, Ghost Writing, interpreter, Translate languages, translate from Russian to English, translate from Spanish to English, translate, transcribe, resume translation, resume adaptation, job search abroad, translate from German to English, Translate audio, Translate videos, Transcribe audio, Transcribe videos,">

    <title>TranslateMEthis</title

    <link href="css/bootstrap.min.css" rel="stylesheet">

    <link rel="shortcut icon"href="http://i.imgur.com/ATNSYj5.jpg" />

    <link href="css/modern-business.css" rel="stylesheet">

    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation

                </button>
                TranslateMEthis.com - Home

                        About

                        Services

                        Contact

                        Pricing Table

                        Blog

                                Why us?

                                Become a Team Member

                                Blog

                        Other Pages

                                Terms and Conditions

                                Sidebar Page

                                FAQ

                                404

Pricing Table
                    Cheap prices for excellent services.

Home

Pricing Table

Translation

                        $44.00 (++)
                        (Delivered within 24 hours!)

One page (300 words) Translation service

Quick Turnaround

Native Translator

Priceless Investment

Click below & Select your time frame

 Order Now!

Transcription Best Value

                        $499.00 (++)
                        (Delivered within 24 hours!)

One hour of audio Translation & Transcription

Quick Turnaround

Native Translator

Priceless Investment

Click below & Select your time frame

 Order Now!

Redaction

                        $48.00 (++)
                        (per month - for a weekly subscription!)

Multilingual Ghost & SEO Writing

Scheduled Delivery

Native Writers

Also Available Subscription free orders

Click below & Select your order type

 Order Now!

Resume Writing

                        $219.00 (++)
                        (Delivered within 24 hours!)

Resume Translation & Adaptation service

Quick Turnaround

Native Translator

Priceless Investment

Click below & Select your time frame

 Order Now!

Human Resources Best Value

                        $178.20 (++)
                        (Valid one month!)

HR Assistance Regular services

Job search Assistance

Local Help

Tips and Tricks from our collaborators

Click below & Select your product

 Order Now!

Interpreter

                        $119.00 (++)
                        (Including Pick-up at the Airport!)

interpreter Localisator

Friendly Service

Local Help

Priceless Investment

Click below & Select your contact

 Order Now!

We are privileged to have the best customer representatives in the industry. Contact us now to know more about our different products and services. You may email us to get a quote or to set up a live conversation with our customer representatives!

                    Click to talk to a real person!

Copyright © TranslateMEthis.com 2015


text:
require File.dirname(__FILE__) + "/../spec_helper"

describe FacturaePrint::Renderers::HTMLRenderer do

  it "should render the given template with the given invoice object as @invoice instance variable" do
    templ = "Example with <%= @invoice.name %>"
    fake_invoice = OpenStruct.new("name" => "My first invoice ever")
    html_renderer = FacturaePrint::Renderers::HTMLRenderer.new(templ, fake_invoice)
    html_renderer.render.should == "Example with My first invoice ever"
  end

  it "should make FacturaePrint::Renderers::HTMLRendererHelpers methods available" do
    templ = "Example with <%= @invoice.name %> for a value of 6000 <%= currency_code('USD') %>"
    fake_invoice = OpenStruct.new("name" => "My first invoice ever")
    html_renderer = FacturaePrint::Renderers::HTMLRenderer.new(templ, fake_invoice)
    "Example with My first invoice ever for a value of 6000 $"
  end

end


text:
sitemap
=======

Mark routes to put into the sitemap as they get registered.

This packages builds on github.com/gorilla/mux to make sitemap creation easy.

License
=======

polyglottis/sitemap is licensed under the [MIT License](https://github.com/polyglottis/sitemap/blob/master/LICENSE.md).

gorilla/mux is licensed under the [New BSD License](https://github.com/gorilla/mux/blob/master/LICENSE).


text:
<!doctype html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
    <base href="/">
    <title>My new Victor-Hugo site</title>
    <link rel="stylesheet" href="css/main.css"/>
    <link rel="icon" sizes="32x32" href="/img/favicon-32.png">

        Einleitung

        <input id="design" type="checkbox"   />

          Design

              Bildsprache

              Farben

              Icons

              Textsatz

              Wort-Bild-Marke

        <input id="kommunikation" type="checkbox"   />

          Kommunikation

              Grammatik Und Funktion

        <input id="werte" type="checkbox"  checked="checked" />

          Werte

              Mission

              Vision

Unsere Mission

Der größte und beliebteste Arbeitgeber für Studenten.

Unser Leistungsversprechen

Unsere Studenten finden durch verlässlichen und schnellen Service einen passenden Job, der zeitlich flexibel mit dem Studium einhergeht.

Das richtige Unternehmen erhält für ausgewählte Tätigkeiten bisher unbekannten Zugang zu qualifizierten und flexiblen Mitarbeitern für vorhersehbare und unvorhersehbare Personalengpässe.

Unser Ziel

Im Jahr 2019 beschäftigen wir monatlich 10.000 Studenten und führen ein zu gleichen Teilen aus full service und self-service bestehendes Geschäft.


text:
FactoryGirl.define do
  factory :city do
    name "MyString"
state nil
  end

end


text:
package org.apache.camel.model.dataformat;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;

/**
 * Supported YAML marshalers.
 */
@XmlType
@XmlEnum
public enum YAMLLibrary {
    SnakeYAML
}


text:
package ssa

// critical splits critical edges (those that go from a block with
// more than one outedge to a block with more than one inedge).
// Regalloc wants a critical-edge-free CFG so it can implement phi values.
func critical(f *Func) {
	for _, b := range f.Blocks {
		if len(b.Preds) <= 1 {
			continue
		}

		// split input edges coming from multi-output blocks.
		for i, c := range b.Preds {
			if c.Kind == BlockPlain {
				continue // only single output block
			}

			// allocate a new block to place on the edge
			d := f.NewBlock(BlockPlain)
			d.Line = c.Line
			if f.pass.debug > 0 {
				f.Config.Warnl(c.Line, "split critical edge")
			}

			// splice it in
			d.Preds = append(d.Preds, c)
			d.Succs = append(d.Succs, b)
			b.Preds[i] = d
			// replace b with d in c's successor list.
			for j, b2 := range c.Succs {
				if b2 == b {
					c.Succs[j] = d
					break
				}
			}
		}
	}
}


text:
#pragma once
#include "vktraceviewer_trace_file_utils.h"
#include "vktraceviewer_view.h"
#include "vktrace_settings.h"

#include <QObject>

class vktraceviewer_QController : public QObject
{
public:
    vktraceviewer_QController() {}
    virtual ~vktraceviewer_QController() {}

    virtual const char* GetPacketIdString(uint16_t packetId) = 0;
    virtual vktrace_SettingGroup* GetSettings() = 0;
    virtual void UpdateFromSettings(vktrace_SettingGroup* pSettingGroups, unsigned int numSettingGroups) = 0;
    virtual vktrace_trace_packet_header* InterpretTracePacket(vktrace_trace_packet_header* pHeader) = 0;
    virtual bool LoadTraceFile(vktraceviewer_trace_file_info* pTraceFileInfo, vktraceviewer_view* pView) = 0;
    virtual void UnloadTraceFile(void) = 0;

public slots:

signals:
    void OutputMessage(VktraceLogLevel level, const QString& message);
    void OutputMessage(VktraceLogLevel level, uint64_t packetIndex, const QString& message);
};

extern "C"
{
VKTRACER_EXPORT vktraceviewer_QController* VKTRACER_CDECL vtvCreateQController(void);
VKTRACER_EXPORT void VKTRACER_CDECL vtvDeleteQController(vktraceviewer_QController* pController);

// entrypoints that must be exposed by each controller library
typedef vktraceviewer_QController* (VKTRACER_CDECL *funcptr_vktraceviewer_CreateQController)(void);
typedef void (VKTRACER_CDECL *funcptr_vktraceviewer_DeleteQController)(vktraceviewer_QController* pController);
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Biatora terrula Hult.

### Remarks
null


text:
package io.pravega.controller.store.kvtable.records;

import com.google.common.collect.ImmutableList;
import io.pravega.common.ObjectBuilder;
import io.pravega.common.io.serialization.RevisionDataInput;
import io.pravega.common.io.serialization.RevisionDataOutput;
import io.pravega.common.io.serialization.VersionedSerializer;
import lombok.Data;
import lombok.Getter;
import lombok.Builder;
import lombok.AccessLevel;
import lombok.NonNull;
import lombok.SneakyThrows;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;

/**
 * Serializable class that captures an epoch record for a KeyValueTable.
 */
@Data
public class KVTEpochRecord {
    public static final EpochRecordSerializer SERIALIZER = new EpochRecordSerializer();

    private final int epoch;
    private final ImmutableList<KVTSegmentRecord> segments;
    private final long creationTime;
    @Getter(AccessLevel.PRIVATE)
    private final Map<Long, KVTSegmentRecord> segmentMap;

    @Builder
    public KVTEpochRecord(int epoch, @NonNull ImmutableList<KVTSegmentRecord> segments, long creationTime) {
        this.epoch = epoch;
        this.segments = segments;
        this.creationTime = creationTime;
        this.segmentMap = segments.stream().collect(Collectors.toMap(KVTSegmentRecord::segmentId, x -> x));
    }

    @SneakyThrows(IOException.class)
    public byte[] toBytes() {
        return SERIALIZER.serialize(this).getCopy();
    }

    @SneakyThrows(IOException.class)
    public static KVTEpochRecord fromBytes(final byte[] record) {
        InputStream inputStream = new ByteArrayInputStream(record, 0, record.length);
        return SERIALIZER.deserialize(inputStream);
    }

    public Set<Long> getSegmentIds() {
        return segmentMap.keySet();
    }

    public KVTSegmentRecord getSegment(long segmentId) {
        return segmentMap.get(segmentId);
    }

    public boolean containsSegment(long segmentId) {
        return segmentMap.containsKey(segmentId);
    }

    private static class KVTEpochRecordBuilder implements ObjectBuilder<KVTEpochRecord> {

    }

    private static class EpochRecordSerializer extends VersionedSerializer.WithBuilder<KVTEpochRecord, KVTEpochRecord.KVTEpochRecordBuilder> {
        @Override
        protected byte getWriteVersion() {
            return 0;
        }

        @Override
        protected void declareVersions() {
            version(0).revision(0, this::write00, this::read00);
        }

        private void read00(RevisionDataInput revisionDataInput, KVTEpochRecord.KVTEpochRecordBuilder builder) throws IOException {
            builder.epoch(revisionDataInput.readInt());
            ImmutableList.Builder<KVTSegmentRecord> segmentsBuilder = ImmutableList.builder();
            revisionDataInput.readCollection(KVTSegmentRecord.SERIALIZER::deserialize, segmentsBuilder);
            builder.segments(segmentsBuilder.build())
                   .creationTime(revisionDataInput.readLong());
        }

        private void write00(KVTEpochRecord history, RevisionDataOutput revisionDataOutput) throws IOException {
            revisionDataOutput.writeInt(history.getEpoch());
            revisionDataOutput.writeCollection(history.getSegments(), KVTSegmentRecord.SERIALIZER::serialize);
            revisionDataOutput.writeLong(history.getCreationTime());
        }

        @Override
        protected KVTEpochRecord.KVTEpochRecordBuilder newBuilder() {
            return KVTEpochRecord.builder();
        }
    }
}


text:
    <input #input class="mat-radio-input cdk-visually-hidden" type="radio"
        [id]="inputId"
        [checked]="checked"
        [disabled]="disabled"
        [tabIndex]="tabIndex"
        [attr.name]="name"
        [attr.value]="value"
        [required]="required"
        [attr.aria-label]="ariaLabel"
        [attr.aria-labelledby]="ariaLabelledby"
        [attr.aria-describedby]="ariaDescribedby"
        (change)="_onInputChange($event)"
        (click)="_onInputClick($event)">

    <ng-content></ng-content>


text:
TwitchTvClient
=======================

Tech demo for how to use a OkHttp, Retrofit, GSON stack to download and parse API data.