text:
We welcome contributions of any kind including pull requests, ideas, bug reports,
testing, writing documentation, tutorials and blog posts. If you help with development,
you have the opportunity to learn Symfony, PHPUnit, Vue.js and much more.

Since we are already pretty much feature-complete for our own needs, it is well possible that you won't find any open issues.
Issues labeled [help wanted](https://github.com/symlex/symlex/labels/help%20wanted) /
[easy](https://github.com/symlex/symlex/labels/easy) can be good (first) contributions otherwise.

## Questions? ##

Feel free to send an e-mail to [hello@symlex.org](mailto:hello@symlex.org) if you have any questions,
need [commercial support](https://blog.liquidbytes.net/contact/) or just want to say hello.

## Pull Requests ##

Our [step-by-step guide](https://github.com/symlex/symlex/wiki/Pull-Requests) explains how to submit new features, bugfixes and documentation.

## Feature Requests ##

You are welcome to add specific feature requests directly to our main [GitHub issue tracker](https://github.com/symlex/symlex/issues)
or the corresponding sub-project if no similar [idea](https://github.com/symlex/symlex/labels/idea)
or [todo](https://github.com/symlex/symlex/labels/todo) already exists.
Please don't use the issue tracker to ask general questions.

## Reporting Bugs ##

Please use the GitHub issue tracker for [symlex/symlex](https://github.com/symlex/symlex/issues) (complete framework stack),
[symlex/symlex-core](https://github.com/symlex/symlex-core/issues) (kernel and router)
or the corresponding sub-project to report clearly identified bugs and impediments to us.
If you're not sure, start by asking [via email](mailto:hello@symlex.org).
When reporting an issue, please provide the version in use and information about your environment like browser, operating system, installed memory, and processor type.

## Donations ##

Symlex is a non-profit project run entirely by volunteers. You're most welcome to support us via
[GitHub Sponsors](https://github.com/sponsors/lastzero), especially if you need help with using our software.
They will match every donation in the first year.

Please leave a star if you like this project, it provides additional motivation to keep going. Thank you very much! <3


text:
import {combineReducers} from 'redux'

import user from './user'
import channel from './channel'
import song from './song'
import player from './player'
import search from './search'
import misc from './misc'

export default combineReducers({
  user,
  channel,
  song,
  player,
  search,
  misc
})

redpajama_set_name: RedPajamaGithub


text:
.. _rb-gateway-index:

==================================
Review Board Gateway Documentation
==================================

The Review Board Gateway is a small service to interface your repositories with
Review Board. Git and Mercurial repository remote protocols do not always
provide the necessary APIs for Review Board For self-hosted repositories, this
has traditionally required the use of GitWeb, cgit, or HgWeb. ``rb-gateway`` is
a service with a smaller footprint that can provide the same functionality.

.. toctree::
   :maxdepth: 2

   installation/index
   configuration/index


text:
module CFoundry # :nodoc:
  # CFoundry library version number.
  VERSION = "0.5.2".freeze
end


text:
[![Build Status](https://travis-ci.org/kartotherian/input-validator.svg?branch=master)](https://travis-ci.org/kartotherian/input-validator)

# @kartotherian/input-validator
Kartotherian input validation functions


text:
function setFile (input, state, next) {

  state.set(['files', input.index], {url: input.file.preview});

};

export default setFile;


text:
<?php
/* SVN FILE: $Id$ */
/**
 * Framework debugging and PHP error-handling class
 *
 * Provides enhanced logging, stack traces, and rendering debug views
 *
 * PHP versions 4 and 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       cake
 * @subpackage    cake.cake.libs
 * @since         CakePHP(tm) v 1.2.4560
 * @version       $Revision$
 * @modifiedby    $LastChangedBy$
 * @lastmodified  $Date$
 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
 */
/**
 * Included libraries.
 *
 */
	if (!class_exists('Object')) {
		uses('object');
	}
	if (!class_exists('CakeLog')) {
		uses('cake_log');
	}
/**
 * Provide custom logging and error handling.
 *
 * Debugger overrides PHP's default error handling to provide stack traces and enhanced logging
 *
 * @package       cake
 * @subpackage    cake.cake.libs
 * @link          http://book.cakephp.org/view/460/Using-the-Debugger-Class
 */
class Debugger extends Object {
/**
 * A list of errors generated by the application.
 *
 * @var array
 * @access public
 */
	var $errors = array();
/**
 * Contains the base URL for error code documentation.
 *
 * @var string
 * @access public
 */
	var $helpPath = null;
/**
 * The current output format.
 *
 * @var string
 * @access protected
 */
	var $_outputFormat = 'js';
/**
 * Holds current output data when outputFormat is false.
 *
 * @var string
 * @access private
 */
	var $__data = array();
/**
 * Constructor.
 *
 */
	function __construct() {
		$docRef = ini_get('docref_root');
		if (empty($docRef)) {
			ini_set('docref_root', 'http://php.net/');
		}
		if (!defined('E_RECOVERABLE_ERROR')) {
			define('E_RECOVERABLE_ERROR', 4096);
		}
	}
/**
 * Returns a reference to the Debugger singleton object instance.
 *
 * @return object
 * @access public
 * @static
 */
	function &getInstance($class = null) {
		static $instance = array();
		if (!empty($class)) {
			if (!$instance || strtolower($class) != strtolower(get_class($instance[0]))) {
				$instance[0] = & new $class();
				if (Configure::read() > 0) {
					Configure::version(); // Make sure the core config is loaded
					$instance[0]->helpPath = Configure::read('Cake.Debugger.HelpPath');
				}
			}
		}

		if (!$instance) {
			$instance[0] =& new Debugger();
			if (Configure::read() > 0) {
				Configure::version(); // Make sure the core config is loaded
				$instance[0]->helpPath = Configure::read('Cake.Debugger.HelpPath');
			}
		}
		return $instance[0];
	}
/**
 * Formats and outputs the contents of the supplied variable.
 *
 * @param $var mixed the variable to dump
 * @return void
 * @see exportVar
 * @access public
 * @static
 * @link http://book.cakephp.org/view/460/Using-the-Debugger-Class
*/
	function dump($var) {
		$_this = Debugger::getInstance();
		pr($_this->exportVar($var));
	}
/**
 * Creates a detailed stack trace log at the time of invocation, much like dump()
 * but to debug.log.
 *
 * @param $var mixed Variable or content to log
 * @param $level int type of log to use. Defaults to LOG_DEBUG
 * @return void
 * @static
 * @link http://book.cakephp.org/view/460/Using-the-Debugger-Class
 */
	function log($var, $level = LOG_DEBUG) {
		$_this = Debugger::getInstance();
		$source = $_this->trace(array('start' => 1)) . "\n";
		CakeLog::write($level, "\n" . $source . $_this->exportVar($var));
	}

/**
 * Overrides PHP's default error handling.
 *
 * @param integer $code Code of error
 * @param string $description Error description
 * @param string $file File on which error occurred
 * @param integer $line Line that triggered the error
 * @param array $context Context
 * @return boolean true if error was handled
 * @access public
 */
	function handleError($code, $description, $file = null, $line = null, $context = null) {
		if (error_reporting() == 0 || $code === 2048 || $code === 8192) {
			return;
		}

		$_this = Debugger::getInstance();

		if (empty($file)) {
			$file = '[internal]';
		}
		if (empty($line)) {
			$line = '??';
		}
		$file = $_this->trimPath($file);

		$info = compact('code', 'description', 'file', 'line');
		if (!in_array($info, $_this->errors)) {
			$_this->errors[] = $info;
		} else {
			return;
		}

		$level = LOG_DEBUG;
		switch ($code) {
			case E_PARSE:
			case E_ERROR:
			case E_CORE_ERROR:
			case E_COMPILE_ERROR:
			case E_USER_ERROR:
				$error = 'Fatal Error';
				$level = LOG_ERROR;
			break;
			case E_WARNING:
			case E_USER_WARNING:
			case E_COMPILE_WARNING:
			case E_RECOVERABLE_ERROR:
				$error = 'Warning';
				$level = LOG_WARNING;
			break;
			case E_NOTICE:
			case E_USER_NOTICE:
				$error = 'Notice';
				$level = LOG_NOTICE;
			break;
			default:
				return false;
			break;
		}

		$helpCode = null;
		if (!empty($_this->helpPath) && preg_match('/.*\[([0-9]+)\]$/', $description, $codes)) {
			if (isset($codes[1])) {
				$helpCode = $codes[1];
				$description = trim(preg_replace('/\[[0-9]+\]$/', '', $description));
			}
		}

		echo $_this->_output($level, $error, $code, $helpCode, $description, $file, $line, $context);

		if (Configure::read('log')) {
			CakeLog::write($level, "{$error} ({$code}): {$description} in [{$file}, line {$line}]");
		}

		if ($error == 'Fatal Error') {
			exit();
		}
		return true;
	}
/**
 * Outputs a stack trace based on the supplied options.
 *
 * @param array $options Format for outputting stack trace
 * @return string Formatted stack trace
 * @access public
 * @static
 * @link http://book.cakephp.org/view/460/Using-the-Debugger-Class
 */
	function trace($options = array()) {
		$options = array_merge(array(
				'depth'		=> 999,
				'format'	=> '',
				'args'		=> false,
				'start'		=> 0,
				'scope'		=> null,
				'exclude'	=> null
			),
			$options
		);

		$backtrace = debug_backtrace();
		$back = array();
		$count = count($backtrace);

		for ($i = $options['start']; $i < $count && $i < $options['depth']; $i++) {
			$trace = array_merge(
				array(
					'file' => '[internal]',
					'line' => '??'
				),
				$backtrace[$i]
			);

			if (isset($backtrace[$i + 1])) {
				$next = array_merge(
					array(
						'line'		=> '??',
						'file'		=> '[internal]',
						'class'		=> null,
						'function'	=> '[main]'
					),
					$backtrace[$i + 1]
				);
				$function = $next['function'];

				if (!empty($next['class'])) {
					$function = $next['class'] . '::' . $function . '(';
					if ($options['args'] && isset($next['args'])) {
						$args = array();
						foreach ($next['args'] as $arg) {
							$args[] = Debugger::exportVar($arg);
						}
						$function .= implode(', ', $args);
					}
					$function .= ')';
				}
			} else {
				$function = '[main]';
			}
			if (in_array($function, array('call_user_func_array', 'trigger_error'))) {
				continue;
			}
			if ($options['format'] == 'points' && $trace['file'] != '[internal]') {
				$back[] = array('file' => $trace['file'], 'line' => $trace['line']);
			} elseif (empty($options['format'])) {
				$back[] = $function . ' - ' . Debugger::trimPath($trace['file']) . ', line ' . $trace['line'];
			} else {
				$back[] = $trace;
			}
		}

		if ($options['format'] == 'array' || $options['format'] == 'points') {
			return $back;
		}
		return implode("\n", $back);
	}
/**
 * Shortens file paths by replacing the application base path with 'APP', and the CakePHP core
 * path with 'CORE'.
 *
 * @param string $path Path to shorten
 * @return string Normalized path
 * @access public
 * @static
 */
	function trimPath($path) {
		if (!defined('CAKE_CORE_INCLUDE_PATH') || !defined('APP')) {
			return $path;
		}

		if (strpos($path, APP) === 0) {
			return str_replace(APP, 'APP' . DS, $path);
		} elseif (strpos($path, CAKE_CORE_INCLUDE_PATH) === 0) {
			return str_replace(CAKE_CORE_INCLUDE_PATH, 'CORE', $path);
		} elseif (strpos($path, ROOT) === 0) {
			return str_replace(ROOT, 'ROOT', $path);
		}
		$corePaths = Configure::corePaths('cake');
		foreach ($corePaths as $corePath) {
			if (strpos($path, $corePath) === 0) {
				return str_replace($corePath, 'CORE' .DS . 'cake' .DS, $path);
			}
		}
		return $path;
	}
/**
 * Grabs an excerpt from a file and highlights a given line of code
 *
 * @param string $file Absolute path to a PHP file
 * @param integer $line Line number to highlight
 * @param integer $context Number of lines of context to extract above and below $line
 * @return array Set of lines highlighted
 * @access public
 * @static
 * @link http://book.cakephp.org/view/460/Using-the-Debugger-Class
 */
	function excerpt($file, $line, $context = 2) {
		$data = $lines = array();
		if (!file_exists($file)) {
			return array();
		}
		$data = @explode("\n", file_get_contents($file));

		if (empty($data) || !isset($data[$line])) {
			return;
		}
		for ($i = $line - ($context + 1); $i < $line + $context; $i++) {
			if (!isset($data[$i])) {
				continue;
			}
			$string = str_replace(array("\r\n", "\n"), "", highlight_string($data[$i], true));
			if ($i == $line) {
				$lines[] = '' . $string . '';
			} else {
				$lines[] = $string;
			}
		}
		return $lines;
	}
/**
 * Converts a variable to a string for debug output.
 *
 * @param string $var Variable to convert
 * @return string Variable as a formatted string
 * @access public
 * @static
 * @link http://book.cakephp.org/view/460/Using-the-Debugger-Class
 */
	function exportVar($var, $recursion = 0) {
		$_this =  Debugger::getInstance();
		switch (strtolower(gettype($var))) {
			case 'boolean':
				return ($var) ? 'true' : 'false';
			break;
			case 'integer':
			case 'double':
				return $var;
			break;
			case 'string':
				if (trim($var) == "") {
					return '""';
				}
				return '"' . h($var) . '"';
			break;
			case 'object':
				return get_class($var) . "\n" . $_this->__object($var);
			case 'array':
				$out = "array(";
				$vars = array();
				foreach ($var as $key => $val) {
					if ($recursion >= 0) {
						if (is_numeric($key)) {
							$vars[] = "\n\t" . $_this->exportVar($val, $recursion - 1);
						} else {
							$vars[] = "\n\t" .$_this->exportVar($key, $recursion - 1)
										. ' => ' . $_this->exportVar($val, $recursion - 1);
						}
					}
				}
				$n = null;
				if (!empty($vars)) {
					$n = "\n";
				}
				return $out . implode(",", $vars) . "{$n})";
			break;
			case 'resource':
				return strtolower(gettype($var));
			break;
			case 'null':
				return 'null';
			break;
		}
	}
/**
 * Handles object to string conversion.
 *
 * @param string $var Object to convert
 * @return string
 * @access private
 * @see Debugger:exportVar()
 */
	function __object($var) {
		$out = array();

		if (is_object($var)) {
			$className = get_class($var);
			$objectVars = get_object_vars($var);

			foreach ($objectVars as $key => $value) {
				if (is_object($value)) {
					$value = get_class($value) . ' object';
				} elseif (is_array($value)) {
					$value = 'array';
				} elseif ($value === null) {
					$value = 'NULL';
				} elseif (in_array(gettype($value), array('boolean', 'integer', 'double', 'string', 'array', 'resource'))) {
					$value = Debugger::exportVar($value);
				}
				$out[] = "$className::$$key = " . $value;
			}
		}
		return implode("\n", $out);
	}
/**
 * Handles object conversion to debug string.
 *
 * @param string $var Object to convert
 * @access protected
 */
	function output($format = 'js') {
		$_this = Debugger::getInstance();
		$data = null;

		if ($format === true && !empty($_this->__data)) {
			$data = $_this->__data;
			$_this->__data = array();
			$format = false;
		}
		$_this->_outputFormat = $format;

		return $data;
	}
/**
 * Handles object conversion to debug string.
 *
 * @param string $var Object to convert
 * @access private
 */
	function _output($level, $error, $code, $helpCode, $description, $file, $line, $kontext) {
		$files = $this->trace(array('start' => 2, 'format' => 'points'));
		$listing = $this->excerpt($files[0]['file'], $files[0]['line'] - 1, 1);
		$trace = $this->trace(array('start' => 2, 'depth' => '20'));
		$context = array();

		foreach ((array)$kontext as $var => $value) {
			$context[] = "\${$var}\t=\t" . $this->exportVar($value, 1);
		}

		switch ($this->_outputFormat) {
			default:
			case 'js':
				$link = "document.getElementById(\"CakeStackTrace" . count($this->errors) . "\").style.display = (document.getElementById(\"CakeStackTrace" . count($this->errors) . "\").style.display == \"none\" ? \"\" : \"none\")";
				$out = "{$error} ({$code}): {$description} [{$file}, line {$line}]";
				if (Configure::read() > 0) {
					debug($out, false, false);
					echo '
errors) . '" class="cake-stack-trace" style="display: none;">';
						$link = "document.getElementById(\"CakeErrorCode" . count($this->errors) . "\").style.display = (document.getElementById(\"CakeErrorCode" . count($this->errors) . "\").style.display == \"none\" ? \"\" : \"none\")";
						echo "Code";

						if (!empty($context)) {
							$link = "document.getElementById(\"CakeErrorContext" . count($this->errors) . "\").style.display = (document.getElementById(\"CakeErrorContext" . count($this->errors) . "\").style.display == \"none\" ? \"\" : \"none\")";
							echo " | Context";

							if (!empty($helpCode)) {
								echo " | helpPath}{$helpCode}' target='_blank'>Help";
							}

							echo "
errors) . "\" class=\"cake-context\" style=\"display: none;\">";
							echo implode("\n", $context);
							echo "
";
						}

						if (!empty($listing)) {
							echo "
errors) . "\" class=\"cake-code-dump\" style=\"display: none;\">";
								pr(implode("\n", $listing) . "\n", false);
							echo '
';
						}
						pr($trace, false);
					echo '
';
				}
			break;
			case 'html':
				echo "
{$error} ({$code}) : {$description} [{$file}, line {$line}]
";
				if (!empty($context)) {
					echo "Context:\n" .implode("\n", $context) . "\n";
				}
				echo "
Context
" . implode("\n", $context) . "

";
				echo "
Trace
" . $trace. "

";
			break;
			case 'text':
			case 'txt':
				echo "{$error}: {$code} :: {$description} on line {$line} of {$file}\n";
				if (!empty($context)) {
					echo "Context:\n" .implode("\n", $context) . "\n";
				}
				echo "Trace:\n" . $trace;
			break;
			case 'log':
				$this->log(compact('error', 'code', 'description', 'line', 'file', 'context', 'trace'));
			break;
			case false:
				$this->__data[] = compact('error', 'code', 'description', 'line', 'file', 'context', 'trace');
			break;
		}
	}
/**
 * Verifies that the application's salt value has been changed from the default value.
 *
 * @access public
 * @static
 */
	function checkSessionKey() {
		if (Configure::read('Security.salt') == 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi') {
			trigger_error(__('Please change the value of \'Security.salt\' in app/config/core.php to a salt value specific to your application', true), E_USER_NOTICE);
		}
	}
/**
 * Invokes the given debugger object as the current error handler, taking over control from the previous handler
 * in a stack-like hierarchy.
 *
 * @param object $debugger A reference to the Debugger object
 * @access public
 * @static
 * @link http://book.cakephp.org/view/460/Using-the-Debugger-Class
 */
	function invoke(&$debugger) {
		set_error_handler(array(&$debugger, 'handleError'));
	}
}

if (!defined('DISABLE_DEFAULT_ERROR_HANDLING')) {
	Debugger::invoke(Debugger::getInstance());
}
?>


text:
from kfp.components import InputPath, OutputPath

def SchemaGen(
    statistics_path: InputPath('ExampleStatistics'),
    schema_path: OutputPath('Schema'),
    infer_feature_shape: bool = None, # ? False
):
    """Constructs a SchemaGen component.

    Args:
      statistics: A Channel of `ExampleStatistics` type (required if spec is not
        passed). This should contain at least a `train` split. Other splits are
        currently ignored. _required_
      infer_feature_shape: Boolean value indicating
        whether or not to infer the shape of features. If the feature shape is
        not inferred, downstream Tensorflow Transform component using the schema
        will parse input as tf.SparseTensor.
    Returns:
      output: Output `Schema` channel for schema result.
    """
    from tfx.components.schema_gen.component import SchemaGen as component_class

    #Generated code
    import json
    import os
    import tensorflow
    from google.protobuf import json_format, message
    from tfx.types import Artifact, channel_utils, artifact_utils

    arguments = locals().copy()

    component_class_args = {}

    for name, execution_parameter in component_class.SPEC_CLASS.PARAMETERS.items():
        argument_value_obj = argument_value = arguments.get(name, None)
        if argument_value is None:
            continue
        parameter_type = execution_parameter.type
        if isinstance(parameter_type, type) and issubclass(parameter_type, message.Message): # Maybe FIX: execution_parameter.type can also be a tuple
            argument_value_obj = parameter_type()
            json_format.Parse(argument_value, argument_value_obj)
        component_class_args[name] = argument_value_obj

    for name, channel_parameter in component_class.SPEC_CLASS.INPUTS.items():
        artifact_path = arguments[name + '_path']
        if artifact_path:
            artifact = channel_parameter.type()
            artifact.uri = artifact_path + '/' # ?
            if channel_parameter.type.PROPERTIES and 'split_names' in channel_parameter.type.PROPERTIES:
                # Recovering splits
                subdirs = tensorflow.io.gfile.listdir(artifact_path)
                artifact.split_names = artifact_utils.encode_split_names(sorted(subdirs))
            component_class_args[name] = channel_utils.as_channel([artifact])

    component_class_instance = component_class(**component_class_args)

    input_dict = {name: channel.get() for name, channel in component_class_instance.inputs.get_all().items()}
    output_dict = {name: channel.get() for name, channel in component_class_instance.outputs.get_all().items()}
    exec_properties = component_class_instance.exec_properties

    # Generating paths for output artifacts
    for name, artifacts in output_dict.items():
        base_artifact_path = arguments[name + '_path']
        # Are there still cases where output channel has multiple artifacts?
        for idx, artifact in enumerate(artifacts):
            subdir = str(idx + 1) if idx > 0 else ''
            artifact.uri = os.path.join(base_artifact_path, subdir)  # Ends with '/'

    print('component instance: ' + str(component_class_instance))

    #executor = component_class.EXECUTOR_SPEC.executor_class() # Same
    executor = component_class_instance.executor_spec.executor_class()
    executor.Do(
        input_dict=input_dict,
        output_dict=output_dict,
        exec_properties=exec_properties,
    )
    #return (output_path,)

if __name__ == '__main__':
    import kfp
    kfp.components.func_to_container_op(
        SchemaGen,
        base_image='tensorflow/tfx:0.21.4',
        output_component_file='component.yaml'
    )


text:
//
//  UIButton+Extension.m
//  v2ex
//
//  Created by 无头骑士 GJ on 16/3/8.
//  Copyright © 2016年 无头骑士 GJ. All rights reserved.
//

#import "UIButton+Extension.h"

@implementation UIButton (Extension)

/**
 *  创建一个按钮
 *
 *  @param color  背景颜色
 *  @param target 调用者
 *  @param action 调用方法
 *  @param title  标题
 *
 *  @return 按钮
 */
+ (instancetype)buttonWithBackgroundColor:(UIColor *)color addTarget:(id)target action:(SEL)action title:(NSString *)title
{
    UIButton *btn = [UIButton buttonWithType: UIButtonTypeCustom];

    btn.backgroundColor = color;

    [btn addTarget: target action: action forControlEvents: UIControlEventTouchUpInside];

    [btn setTitle: title forState: UIControlStateNormal];

    return btn;
}

@end


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});
exports.default = _filter;

var _arrayMap = require('lodash/_arrayMap');

var _arrayMap2 = _interopRequireDefault(_arrayMap);

var _baseProperty = require('lodash/_baseProperty');

var _baseProperty2 = _interopRequireDefault(_baseProperty);

var _noop = require('lodash/noop');

var _noop2 = _interopRequireDefault(_noop);

var _once = require('./once');

var _once2 = _interopRequireDefault(_once);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _filter(eachfn, arr, iteratee, callback) {
    callback = (0, _once2.default)(callback || _noop2.default);
    var results = [];
    eachfn(arr, function (x, index, callback) {
        iteratee(x, function (err, v) {
            if (err) {
                callback(err);
            } else {
                if (v) {
                    results.push({ index: index, value: x });
                }
                callback();
            }
        });
    }, function (err) {
        if (err) {
            callback(err);
        } else {
            callback(null, (0, _arrayMap2.default)(results.sort(function (a, b) {
                return a.index - b.index;
            }), (0, _baseProperty2.default)('value')));
        }
    });
}
module.exports = exports['default'];


text:
"""
    Kubernetes

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

    OpenAPI spec version: v1.8.2

    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from __future__ import absolute_import

import os
import sys
import unittest

import kubernetes.client
from kubernetes.client.rest import ApiException
from kubernetes.client.models.v1_endpoint_subset import V1EndpointSubset

class TestV1EndpointSubset(unittest.TestCase):
    """ V1EndpointSubset unit test stubs """

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def testV1EndpointSubset(self):
        """
        Test V1EndpointSubset
        """
        # FIXME: construct object with mandatory attributes with example values
        #model = kubernetes.client.models.v1_endpoint_subset.V1EndpointSubset()
        pass

if __name__ == '__main__':
    unittest.main()


text:
var $ = require("jquery")
var _ = require("lodash")

$(document).ready(function() {
  require("./app/menu")
  var user = require("./app/user") // initialize logged-in state
  var entry = require("./blog/entry").populate()

  entry.combineLatest(user.auths, function(a, b) { return [a,b] } ).subscribe(function(params) {
    var entry = params[0]
    var user = params[1].user
    if (entry.user == user) {
      $("#edit-menu").show()
      $("#edit-button").onAsObservable('click').subscribe(function() { document.location = "/edit/" + entry.id })
    }
  })
})


text:
package com.alibaba.json.bvt.parser.deser;

import java.util.concurrent.TimeUnit;

import org.junit.Assert;
import junit.framework.TestCase;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException;

public class EnumTest extends TestCase {

    public void test_enum() throws Exception {
        Assert.assertNull(JSON.parseObject("''", TimeUnit.class));
    }

    public void test_enum_1() throws Exception {
        Assert.assertEquals(E.A, JSON.parseObject("0", E.class));
    }

    public void test_enum_3() throws Exception {
        Assert.assertEquals(E.A, JSON.parseObject("{value:0}", Entity.class).getValue());
    }

    public void test_enum_2() throws Exception {
        Assert.assertEquals(E.A, JSON.parseObject("'A'", E.class));
    }

    public void test_enum_error() throws Exception {
        assertNull(JSON.parseObject("'123'", TimeUnit.class));
    }

    public void test_enum_error_2() throws Exception {
        Exception error = null;
        try {
            JSON.parseObject("12.3", TimeUnit.class);
        } catch (JSONException ex) {
            error = ex;
        }
        Assert.assertNotNull(error);
    }

    public static enum E {
        A, B, C
    }

    public static class Entity {

        private E value;

        public Entity(){

        }

        public Entity(E value){
            super();
            this.value = value;
        }

        public E getValue() {
            return value;
        }

        public void setValue(E value) {
            this.value = value;
        }

    }
}


text:
"""
IndicoService User Route
Creating and Maintaining Users
"""
import indico.db.user_db as UserDB
from indico.utils import unpack, mongo_callback, type_check
from indico.routes.handler import IndicoHandler
from indico.utils.auth.auth_utils import auth

class UserHandler(IndicoHandler):
    @auth
    @unpack("update_user")
    @type_check(dict)
    def update(self, update_user):
        @mongo_callback(self)
        def update_callback(result):
            self.respond(result)

        UserDB.update({ "$set": update_user }, self.user_id, update_callback)

UserRoute = (r"/user/(?P<action>[a-zA-Z]+)?", UserHandler)


text:
using System.Text.Json;
using Azure.Core;

namespace Azure.Management.Network.Models
{
    public partial class VpnPacketCaptureStopParameters : IUtf8JsonSerializable
    {
        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
        {
            writer.WriteStartObject();
            if (SasUrl != null)
            {
                writer.WritePropertyName("sasUrl");
                writer.WriteStringValue(SasUrl);
            }
            writer.WriteEndObject();
        }
    }
}


text:
package org.inbloom.gateway.rest;

import org.inbloom.gateway.Gateway;
import org.inbloom.gateway.common.domain.Verification;
import org.inbloom.gateway.common.status.GatewayStatus;
import org.inbloom.gateway.common.status.Status;
import org.inbloom.gateway.core.event.GatewayAction;
import org.inbloom.gateway.core.event.GatewayRequest;
import org.inbloom.gateway.core.event.GatewayResponse;
import org.inbloom.gateway.core.service.VerificationService;
import org.inbloom.gateway.fixture.VerificationFixture;
import org.inbloom.gateway.rest.util.TestUtil;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.http.MediaType;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;

import java.util.Date;

import static org.inbloom.gateway.fixture.VerificationFixture.*;

import static org.mockito.Matchers.any;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;

/**
 * Created By: paullawler
 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Gateway.class)
@WebAppConfiguration
public class VerificationControllerTest {

    private MockMvc mockMvc;

    @Mock
    private VerificationService verificationService;

    @InjectMocks
    private VerificationController controller;

    @Before
    public void setup() {
        MockitoAnnotations.initMocks(this);
        this.mockMvc = MockMvcBuilders.standaloneSetup(controller)
                .setMessageConverters(new MappingJackson2HttpMessageConverter())
                .setHandlerExceptionResolvers(TestUtil.createExceptionResolver())
                .build();
    }

    @Test
    public void shouldValidateAnAccount() throws Exception {
        Mockito.when(verificationService.validateAccountSetup(any(GatewayRequest.class)))
                .thenReturn(new GatewayResponse<Verification>(GatewayAction.MODIFY, VerificationFixture.validVerification(new Date()), Status.SUCCESS));

        this.mockMvc.perform(post("/verifications/validate")
                .content(TestUtil.stringify(accountValidation()))
                .contentType(MediaType.APPLICATION_JSON)
                .accept(MediaType.APPLICATION_JSON))
                .andDo(print())
                .andExpect(status().isOk());
    }

    @Test
    public void shouldRetrieveAVerificationForAToken() throws Exception {
        Mockito.when(verificationService.retrieveVerification(any(GatewayRequest.class)))
                .thenReturn(new GatewayResponse<Verification>(GatewayAction.RETRIEVE, VerificationFixture.validVerification(new Date()), Status.SUCCESS));

        this.mockMvc.perform(get("/verifications/{token}", "3908092jfojief2309j029")
                .contentType(MediaType.APPLICATION_JSON)
                .accept(MediaType.APPLICATION_JSON))
                .andDo(print())
                .andExpect(status().isOk());
    }

    @Test
    public void shouldFailValidationIfTheVerificationIsNotValid() throws Exception {
        Mockito.when(verificationService.validateAccountSetup(any(GatewayRequest.class)))
                .thenReturn(new GatewayResponse<Verification>(GatewayAction.MODIFY, VerificationFixture.validVerification(new Date()), Status.EXPIRED,"The verification expired"));

        this.mockMvc.perform(post("/verifications/validate")
                .content(TestUtil.stringify(accountValidation()))
                .contentType(MediaType.APPLICATION_JSON)
                .accept(MediaType.APPLICATION_JSON))
                .andDo(print())
                .andExpect(status().isForbidden());
    }

}


text:
/**
 *
 */
package org.siyuyan.utils;

import org.springframework.context.ApplicationContext;
/**
 * 保存ApplicationContext的静态变量
 * @author shenbaise(shenbaise1001@126.com)
 * @date 2012-2-29
 * TODO
 */
public class ApplicationContextHolder {

	private static ApplicationContext applicationContext;

	/**
	 * 实现ApplicationContextAware接口的context注入函数, 将其存入静态变量.
	 */
	public void setApplicationContext(ApplicationContext applicationContext) {
		ApplicationContextHolder.applicationContext = applicationContext;
	}

	/**
	 * 取得存储在静态变量中的ApplicationContext.
	 */
	public static ApplicationContext getApplicationContext() {
		return applicationContext;
	}

	/**
	 * 从静态变量ApplicationContext中取得Bean, 自动转型为所赋值对象的类型.
	 */
	@SuppressWarnings("unchecked")
	public static <T> T getBean(String name) {
		return (T) applicationContext.getBean(name);
	}

	/**
	 * 从静态变量ApplicationContext中取得Bean, 自动转型为所赋值对象的类型.
	 */
	@SuppressWarnings("unchecked")
	public static <T> T getBean(Class<T> clazz) {
		return (T) applicationContext.getBeansOfType(clazz);
	}

}


text:
create 'archive', {NAME => 'd', IS_MOB => true, MOB_THRESHOLD => 1024000}, {NAME => 'm', REPLICATION_SCOPE => 1, COMPRESSION => 'SNAPPY', DATA_BLOCK_ENCODING => 'FAST_DIFF'}
describe 'archive'
exit


text:
'use strict';

var angular = require('angular');

require('./directives');
require('./services');

angular.module('googleAnalytics', [
  'googleAnalyticsDirectives',
  'googleAnalyticsServices'
]);


text:
package wellknownusers

// We define some user ids that we use for non-root containers.
// We base at 10000 because some distros (COS) have pre-defined users around 1000

const (
	// Generic is the user id we use for non-privileged containers, where we don't need extra permissions
	// Used by e.g. dns-controller, kops-controller
	Generic = 10001

	// AWSAuthenticator is the user-id for the aws-iam-authenticator (built externally)
	AWSAuthenticator = 10000
)


text:
package org.sakaiproject.evaluation.logic.entity;

import org.sakaiproject.entitybroker.entityprovider.CoreEntityProvider;
import org.sakaiproject.entitybroker.entityprovider.capabilities.AutoRegisterEntityProvider;
import org.sakaiproject.evaluation.logic.EvalAuthoringService;
import org.sakaiproject.evaluation.logic.entity.ItemEntityProvider;

/**
 * Implementation for the entity provider for evaluation items (questions)
 *
 * @author Aaron Zeckoski (aaron@caret.cam.ac.uk)
 */
public class ItemEntityProviderImpl implements ItemEntityProvider, CoreEntityProvider, AutoRegisterEntityProvider {

   private EvalAuthoringService authoringService;
   public void setAuthoringService(EvalAuthoringService authoringService) {
      this.authoringService = authoringService;
   }

   public String getEntityPrefix() {
      return ENTITY_PREFIX;
   }

   public boolean entityExists(String id) {
      boolean exists = false;
      Long itemId;
      try {
         itemId = new Long(id);
         if (authoringService.getItemById(itemId) != null) {
            exists = true;
         }
      } catch (NumberFormatException e) {
         // invalid number so roll through to the false
         exists = false;
      }
      return exists;
   }

}


text:
class ThreadMemory :
    public lldb_private::Thread
{
public:

    ThreadMemory (lldb_private::Process &process,
                  lldb::tid_t tid,
                  const lldb::ValueObjectSP &thread_info_valobj_sp);

    ThreadMemory (lldb_private::Process &process,
                  lldb::tid_t tid,
                  const char *name,
                  const char *queue,
                  lldb::addr_t register_data_addr);

    virtual
    ~ThreadMemory();

    //------------------------------------------------------------------
    // lldb_private::Thread methods
    //------------------------------------------------------------------
    virtual lldb::RegisterContextSP
    GetRegisterContext ();

    virtual lldb::RegisterContextSP
    CreateRegisterContextForFrame (lldb_private::StackFrame *frame);

    virtual bool
    CalculateStopInfo ();

    virtual const char *
    GetInfo ()
    {
        if (m_backing_thread_sp)
            m_backing_thread_sp->GetInfo();
        return NULL;
    }

    virtual const char *
    GetName ()
    {
        if (!m_name.empty())
            return m_name.c_str();
        if (m_backing_thread_sp)
            m_backing_thread_sp->GetName();
        return NULL;
    }

    virtual const char *
    GetQueueName ()
    {
        if (!m_queue.empty())
            return m_queue.c_str();
        if (m_backing_thread_sp)
            m_backing_thread_sp->GetQueueName();
        return NULL;
    }

    virtual void
    WillResume (lldb::StateType resume_state);

    virtual void
    DidResume ()
    {
        if (m_backing_thread_sp)
            m_backing_thread_sp->DidResume();
    }

    virtual lldb::user_id_t
    GetProtocolID () const
    {
        if (m_backing_thread_sp)
            return m_backing_thread_sp->GetProtocolID();
        return Thread::GetProtocolID();
    }

    virtual void
    RefreshStateAfterStop();

    lldb::ValueObjectSP &
    GetValueObject ()
    {
        return m_thread_info_valobj_sp;
    }

    virtual void
    ClearStackFrames ();

    virtual void
    ClearBackingThread ()
    {
        m_backing_thread_sp.reset();
    }

    virtual bool
    SetBackingThread (const lldb::ThreadSP &thread_sp)
    {
        //printf ("Thread 0x%llx is being backed by thread 0x%llx\n", GetID(), thread_sp->GetID());
        m_backing_thread_sp = thread_sp;
        return (bool)thread_sp;
    }

    virtual lldb::ThreadSP
    GetBackingThread () const
    {
        return m_backing_thread_sp;
    }

protected:

    virtual bool
    IsOperatingSystemPluginThread () const
    {
        return true;
    }

    //------------------------------------------------------------------
    // For ThreadMemory and subclasses
    //------------------------------------------------------------------
    // If this memory thread is actually represented by a thread from the
    // lldb_private::Process subclass, then fill in the thread here and
    // all APIs will be routed through this thread object. If m_backing_thread_sp
    // is empty, then this thread is simply in memory with no representation
    // through the process plug-in.
    lldb::ThreadSP m_backing_thread_sp;
    lldb::ValueObjectSP m_thread_info_valobj_sp;
    std::string m_name;
    std::string m_queue;
    lldb::addr_t m_register_data_addr;
private:
    //------------------------------------------------------------------
    // For ThreadMemory only
    //------------------------------------------------------------------
    DISALLOW_COPY_AND_ASSIGN (ThreadMemory);
};

#endif  // liblldb_ThreadMemory_h_


text:
<!doctype html>

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

    <link rel="icon" type="image/png" href="assets/icon/favicon-32x32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="assets/icon/android-chrome-192x192.png" sizes="192x192">
    <link rel="icon" type="image/png" href="assets/icon/favicon-96x96.png" sizes="96x96">
    <link rel="icon" type="image/png" href="assets/icon/favicon-16x16.png" sizes="16x16">

    <link rel="apple-touch-icon" sizes="57x57" href="assets/icon/apple-touch-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="assets/icon/apple-touch-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="assets/icon/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="assets/icon/apple-touch-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="assets/icon/apple-touch-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="assets/icon/apple-touch-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="assets/icon/apple-touch-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="assets/icon/apple-touch-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="assets/icon/apple-touch-icon-180x180.png">

    <link rel="manifest" href="assets/icon/manifest.json">

    <meta name="msapplication-TileImage" content="assets/icon/mstile-144x144.png">
    <meta name="msapplication-TileColor" content="#2d2d2d">

    <meta name="theme-color" content="#2d2d2d">

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

                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                Toggle navigation

                </button>
                Project name

                <form class="navbar-form navbar-right">

                        <input type="text" placeholder="Email" class="form-control">

                        <input type="password" placeholder="Password" class="form-control">

                    <button type="submit" class="btn btn-success">Sign in</button>
                </form>

Hello, world!

This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.

Learn more »

Heading

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

View details »

Heading

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

View details »

Heading

Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

View details »

© Company 2014


text:
package org.notapache.writeful.forms;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.lang3.EnumUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.hateoas.EntityLinks;
import org.springframework.stereotype.Component;

import java.beans.PropertyDescriptor;
import java.util.Map;

@Component
public class FormAdapter {
    private static final String PATH_ROOT = "/";

    @Autowired
    private EntityLinks entityLinks;

    public Forms createDefault(Object object) throws Exception {
        if (object == null) {
            throw new IllegalArgumentException("Bean cannot be null.");
        }
        Map<String, Object> props = PropertyUtils.describe(object);

        Forms forms = new Forms();
        Form defaultForm = new Form();
        defaultForm.add(entityLinks.linkToCollectionResource(object.getClass()).withRel(Form.REL_TARGET));
        Class<?> clazz = object.getClass();

        for (Map.Entry<String, Object> e : props.entrySet()) {
            if (!"class".equals(e.getKey())) {
                PropertyDescriptor propertyDescriptor = PropertyUtils.getPropertyDescriptor(object, e.getKey());
                if(!propertyDescriptor.getReadMethod().isAnnotationPresent(JsonIgnore.class)) {
                    defaultForm.getFields().add(createField(e.getKey(), propertyDescriptor));
                }
            }
        }

        forms.getForms().put(Forms.DEFAULT, defaultForm);
        return forms;
    }

    private Field createField(String key, PropertyDescriptor descriptor) {
        Field f = new Field();
        f.setName(key);
        f.setPath(PATH_ROOT + key);

        String display = String.join(" ", StringUtils.splitByCharacterTypeCamelCase(key));
        f.setDisplayText(StringUtils.capitalize(display));

        if (descriptor.getReadMethod().isAnnotationPresent(Writeful.class)) {
            Writeful annotation = descriptor.getReadMethod().getAnnotation(Writeful.class);

            if (StringUtils.isNotEmpty(annotation.display())) {
                f.setDisplayText(annotation.display());
            }
            f.setType(annotation.type());
        }

        return f;
    }

}


text:
EC-WebSphere
============

The CloudBees CD WebSphere integration

## Compile ##

Run gradlew to compile the plugin

`./gradlew`

## Tests ##

#### Creating ecplugin.properties ####
Create an ecplugin.properties at the root of this repository with the following content

    COMMANDER_USER=<COMMANDER_USER>
    COMMANDER_PASSWORD=<COMMANDER_PASSWORD>

These represent secrets that **should not** be checked in.

#### Running tests ####
Run the `test` task to run the system tests. You may want to specify the CloudBees CD Server to test against by way of the COMMANDER_SERVER environment variable.

`COMMANDER_SERVER=<CloudBees CD Server FQDN or IP> ./gradlew test`


text:
package org.optaplanner.core.impl.heuristic.selector.common.nearby;

import java.util.Random;

import org.junit.Test;

import static org.junit.Assert.*;
import static org.mockito.Mockito.*;

public class BetaDistributionNearbyRandomTest {

    @Test(expected = IllegalArgumentException.class)
    public void betaDistributionAlphaTooLow() {
        NearbyRandom nearbyRandom = new BetaDistributionNearbyRandom(-0.2, 0.3);
    }

    @Test(expected = IllegalArgumentException.class)
    public void betaDistributionBetaTooLow() {
        NearbyRandom nearbyRandom = new BetaDistributionNearbyRandom(0.2, -0.3);
    }

    @Test
    public void nextIntUniform() {
        Random random = mock(Random.class);
        NearbyRandom nearbyRandom = new BetaDistributionNearbyRandom(1.0, 1.0);

        when(random.nextDouble()).thenReturn(0.0);
        assertEquals(0, nearbyRandom.nextInt(random, 500));
        when(random.nextDouble()).thenReturn(1.0 / 500.0);
        assertEquals(1, nearbyRandom.nextInt(random, 500));
        when(random.nextDouble()).thenReturn(2.0 / 500.0);
        assertEquals(2, nearbyRandom.nextInt(random, 500));
        when(random.nextDouble()).thenReturn(3.0 / 500.0);
        assertEquals(3, nearbyRandom.nextInt(random, 500));
    }

}


text:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

   <com.immortal.colzfeed.layouts.HeightMatchesWidthImageView
        android:id="@+id/galleryImage"
        android:layout_width="match_parent"

         android:layout_height="match_parent"
  android:scaleType="fitCenter"
  android:adjustViewBounds="true"
        android:background="@layout/image_border"
        android:padding="4dip"

        />

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom">

         <ProgressBar
        android:id="@+id/photoProgress"
        style="?android:attr/progressBarStyleLarge"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center" />

    <Gallery
        android:id="@+id/gallery1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="bottom"/>
    </RelativeLayout>

</FrameLayout>


text: <script src="api_tests_audio.js"></script>


text:
This is the 5th project of the Web Development Nanodegree.

Here's a brief description of the code and organization.

Runnig the application
=
First clone this repository. Once cloned, type:
```sh
npm install
```

Make sure you have webpack installed globally
```sh
npm install -g webpack
```

Once that done, type:
```sh
webpack --watch
```

And then open `index.html` in your browser.

Code organization
=

The sturcture is as follows:
```
  |
  |
  |--- dist -> This folder contains the minified javascript plus sourcemaps
  |--- js
       |--- api.js -> A helper to make API calls
       |--- index.js -> Entry point of the application
       |--- landmark.js -> This object represents a Landmark on the map
       |--- map.js -> This is a wrapper for the Google Map
       |--- viewmodel.js -> This is the main viewmodel that handles the application
  |--- node_modules -> All dependencies for the project
  |--- scss
       |--- _variables.scss -> Partial with style variables
       |--- style.scss -> Styling rules for the application
  |--- templates
       |--- foursquare.url -> A URL template to call the Foursquare API
       |--- info-window.html -> An HTML template for the info window displayed
       |--- place.html -> An HTML template to display a link to a place around a Landmark
       |--- templates.js A component that exposes templates used by api.js
       |--- wikipedia.url A URL template to call the Wikipedia API
  |--- .editorconfig -> A file that specified editor preferences for the project. See www.editorconfig.org
  |--- index.html -> The main page of the application
  |--- package.json -> Defined the application dependencies
  |--- README.md -> This file
  |--- webpack.config.js -> Webpack's configuration file
```

Webpack
==
Webpack is being used to use CommonJS dependencies on the application. This way the code can be modularized easily.

Also, webpack will process sass to create css, and read template files in order to use them inside the application.


text:
class Rectangle {
public:
int w,h; //w and h for width and height respectively
void Input(){
cin>>w>>h;
}

void Display(){
cout<< w<<" "<< h<< endl;
}
};
class RectangleArea: public Rectangle{
public:
int a;
void Display(){
int a;
a=w*h;
cout<< a<< endl;
} };

int main(){
  RectangleArea r_area;
  r_area.Input();
  Rectangle *r;
  r=&r_area;
  r->Display();
  r_area.Display();

  return 0;
}


text:
/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @license
 * Copyright Google Inc. All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 * @param {?} obj
 * @param {?} debug
 * @return {?}
 */
export function attachDebugObject(obj, debug) {
    Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVidWdfdXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb3JlL3NyYy9yZW5kZXIzL3V0aWwvZGVidWdfdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7QUFPQSxNQUFNLFVBQVUsaUJBQWlCLENBQUMsR0FBUSxFQUFFLEtBQVU7SUFDcEQsTUFBTSxDQUFDLGNBQWMsQ0FBQyxHQUFHLEVBQUUsT0FBTyxFQUFFLEVBQUMsS0FBSyxFQUFFLEtBQUssRUFBRSxVQUFVLEVBQUUsS0FBSyxFQUFDLENBQUMsQ0FBQztBQUN6RSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBJbmMuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2VcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGF0dGFjaERlYnVnT2JqZWN0KG9iajogYW55LCBkZWJ1ZzogYW55KSB7XG4gIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShvYmosICdkZWJ1ZycsIHt2YWx1ZTogZGVidWcsIGVudW1lcmFibGU6IGZhbHNlfSk7XG59XG4iXX0=


text:
package org.openmrs.module.shrclient.service;

import org.openmrs.Concept;
import org.springframework.transaction.annotation.Transactional;

@Transactional
public interface EMRPatientDeathService {
    public Concept getCauseOfDeath(org.openmrs.Patient emrPatient);
}


text:
module Azure::DataMigration::Mgmt::V2018_04_19
  module Models
    #
    # Input for the task that collects user tables for the given list of
    # databases
    #
    class GetUserTablesSqlTaskInput

      include MsRestAzure

      # @return [SqlConnectionInfo] Connection information for SQL Server
      attr_accessor :connection_info

      # @return [Array<String>] List of database names to collect tables for
      attr_accessor :selected_databases

      #
      # Mapper for GetUserTablesSqlTaskInput class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'GetUserTablesSqlTaskInput',
          type: {
            name: 'Composite',
            class_name: 'GetUserTablesSqlTaskInput',
            model_properties: {
              connection_info: {
                client_side_validation: true,
                required: true,
                serialized_name: 'connectionInfo',
                type: {
                  name: 'Composite',
                  class_name: 'SqlConnectionInfo'
                }
              },
              selected_databases: {
                client_side_validation: true,
                required: true,
                serialized_name: 'selectedDatabases',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end


text:
package net.sansa_stack.inference.flink.conformance

import net.sansa_stack.inference.flink.forwardchaining.ForwardRuleReasoner
import net.sansa_stack.kryo.jena.{DefaultNodeSerializer, TripleSerializer}
import org.apache.flink.api.scala.ExecutionEnvironment
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration
import org.apache.flink.test.util.MiniClusterWithClientResource
import org.apache.jena.graph.{Node, Triple}
import org.scalatest.{BeforeAndAfterAll, Suite}

/**
  * A shared reasoner and Flink environment used for multiple test cases using the same resources.
  *
  * @author Lorenz Buehmann
  */
trait SharedReasonerContext[R <: ForwardRuleReasoner]
  extends BeforeAndAfterAll
    with ReasonerContextProvider {
  self: Suite =>

  @transient protected var _reasoner: R = _
  def reasoner: R = _reasoner

  @transient private var _env: ExecutionEnvironment = _
  def env: ExecutionEnvironment = _env

  override def beforeAll(): Unit = {
    super.beforeAll()

    val miniClusterResource = new MiniClusterWithClientResource(
      new MiniClusterResourceConfiguration.Builder()
        .setNumberTaskManagers(1)
        .setNumberSlotsPerTaskManager(DEFAULT_PARALLELISM)
        .build)

    _env = ExecutionEnvironment.getExecutionEnvironment
    _env.setParallelism(4)
    _env.getConfig.disableSysoutLogging()
    _env.getConfig.addDefaultKryoSerializer(classOf[Triple], classOf[TripleSerializer])
    _env.getConfig.addDefaultKryoSerializer(classOf[Node], classOf[DefaultNodeSerializer])
  }

  import org.apache.flink.test.util.MiniClusterWithClientResource
  import org.junit.ClassRule

  private val DEFAULT_PARALLELISM = 4

  @ClassRule val miniClusterResource = new MiniClusterWithClientResource(
    new MiniClusterResourceConfiguration.Builder()
      .setNumberTaskManagers(1)
      .setNumberSlotsPerTaskManager(DEFAULT_PARALLELISM)
      .build
  )

}


text:
package org.piccolo2d.extras.pswing;

import org.piccolo2d.extras.pswing.PSwingCanvas;
import org.piccolo2d.extras.pswing.PSwingEventHandler;

import junit.framework.TestCase;

public class PSwingEventHandlerTest extends TestCase {

    public void testConstructorAcceptsNullTargetNode() {
        PSwingCanvas canvas = new PSwingCanvas();
        PSwingEventHandler handler = new PSwingEventHandler(canvas, null);
    }
}


text:
"""Installation script

"""

import os
import sys

from setuptools import setup

# ensure the current directory is on sys.path so versioneer can be imported
# when pip uses PEP 517/518 build rules.
# https://github.com/python-versioneer/python-versioneer/issues/193
sys.path.append(os.path.dirname(__file__))

import versioneer  # noqa: E402

LONG_DESCRIPTION = """GeoPandas is a project to add support for geographic data to
`pandas`_ objects.

The goal of GeoPandas is to make working with geospatial data in
python easier. It combines the capabilities of `pandas`_ and `shapely`_,
providing geospatial operations in pandas and a high-level interface
to multiple geometries to shapely. GeoPandas enables you to easily do
operations in python that would otherwise require a spatial database
such as PostGIS.

.. _pandas: http://pandas.pydata.org
.. _shapely: http://shapely.readthedocs.io/en/latest/
"""

if os.environ.get("READTHEDOCS", False) == "True":
    INSTALL_REQUIRES = []
else:
    INSTALL_REQUIRES = [
        "pandas >= 1.0.0",
        "shapely >= 1.7, < 2",
        "fiona >= 1.8",
        "pyproj >= 2.6.1.post1",
        "packaging",
    ]

# get all data dirs in the datasets module
data_files = []

for item in os.listdir("geopandas/datasets"):
    if not item.startswith("__"):
        if os.path.isdir(os.path.join("geopandas/datasets/", item)):
            data_files.append(os.path.join("datasets", item, "*"))
        elif item.endswith(".zip"):
            data_files.append(os.path.join("datasets", item))

data_files.append("tests/data/*")

setup(
    name="geopandas",
    version=versioneer.get_version(),
    description="Geographic pandas extensions",
    license="BSD",
    author="GeoPandas contributors",
    author_email="kjordahl@alum.mit.edu",
    url="http://geopandas.org",
    project_urls={
        "Source": "https://github.com/geopandas/geopandas",
    },
    long_description=LONG_DESCRIPTION,
    long_description_content_type="text/x-rst",
    packages=[
        "geopandas",
        "geopandas.io",
        "geopandas.tools",
        "geopandas.datasets",
        "geopandas.tests",
        "geopandas.tools.tests",
    ],
    package_data={"geopandas": data_files},
    python_requires=">=3.8",
    install_requires=INSTALL_REQUIRES,
    cmdclass=versioneer.get_cmdclass(),
)


text:
package com.github.dstaflund.geomemorial.ui.activity.preferences;

import android.os.Bundle;
import android.support.annotation.Nullable;

public interface PreferencesActivityPresenter {
    void onCreate(@Nullable Bundle savedState);
}


text:
var path = require('path');
var webpack = require('webpack');

// const ExtractTextPlugin = require('extract-text-webpack-plugin');

// const extractLess = new ExtractTextPlugin('[name].[contenthash].css');

module.exports = {
	devtool: 'cheap-module-eval-source-map',
	entry: [
		'webpack-hot-middleware/client',
		'./src/index'
	],
	output: {
		path: path.join(__dirname, 'public'),
		filename: 'bundle.js',
		publicPath: '/assets/'
	},
	plugins: [
		new webpack.optimize.OccurrenceOrderPlugin(),
		new webpack.NoEmitOnErrorsPlugin(),
		new webpack.HotModuleReplacementPlugin()
	],
	module: {
		rules: [{
			test: /\.(js|jsx)$/,
			exclude: /(node_modules|bower_components)/,
			use: {
				loader: 'babel-loader',
				options: {
					presets: ['env', 'stage-2', 'react']
				}
			}
		},
		{
			test: /\.less$/,
			exclude: /node_modules/,
			use: [{
				loader: 'style-loader' // creates style nodes from JS strings
			}]
		}]
	},
	resolve: {
		extensions: ['.js', '.jsx', '.css', '.less']
	},
	mode: 'development'
};


text:
// Project Dependencies
#include <jni.h>
#include <jnipp.h>

// Standard Dependencies
#include <cmath>

// Local Dependencies
#include "testing.h"

/*
    jni::Vm Tests
 */
TEST(Vm_externalDetach) {
    jni::Vm vm;

    jni::Class cls("java/lang/String");

    JNIEnv *env = (JNIEnv *)jni::env();
    JavaVM *localVmPointer{};

    auto ret = env->GetJavaVM(&localVmPointer);
    ASSERT(ret == 0);
    ret = localVmPointer->DetachCurrentThread();
    ASSERT(ret == 0);

    ASSERT(1);
}

int main() {
    // jni::Vm Tests
    RUN_TEST(Vm_externalDetach);
    return 0;
}


text:
java -jar dokka-fatjar.jar "src/linq/" -output "Docs"
pause


text: Base development docker container


text:
body,
#root,
html {
  width: 100%;
  height: 100%;
  font-size: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root,
.btd-settings-sidebar {
  --settings-modal-background: #151f2a;
  --settings-modal-menu-item-selected: white;
  --settings-modal-menu-item-hover: white;
  --settings-modal-menu-item-hover-fg: white;
  --settings-modal-menu-item: rgba(255, 255, 255, 0.7);
  --settings-modal-text: white;
  --settings-modal-muted-text: #8899a6;
  --settings-modal-separator: rgb(0, 0, 0);
  --twitter-input-bg: #0d1118;
  --twitter-input-placeholder: #8899a6;
  --twitter-input-border-color: #14171a;
}

:root {
  --twitter-blue: #1da1f2;
  --twitter-darkblue: #005fd1;
}

@media screen and (prefers-color-scheme: light) {
  :root {
    --settings-modal-background: #ffffff;
    --settings-modal-menu-item-selected: #1da1f2;
    --settings-modal-menu-item-hover: #1170aa;
    --settings-modal-menu-item: #14171a;
    --settings-modal-text: #14171a;
    --settings-modal-separator: #ccd6dd;
    --twitter-input-bg: white;
    --twitter-input-placeholder: #8899a6;
    --twitter-input-border-color: #e1e8ed;
  }
}
.btd-settings-modal {
  overflow: hidden;
  color: var(--settings-modal-text);
  width: 100%;
  background-color: var(--settings-modal-background);
  display: grid;
  height: 100%;
  grid-template-areas:
    'sidebar   header'
    'sidebar  content'
    'sidebar   footer';
  grid-template-rows: auto 1fr auto;
  grid-template-columns: auto 1fr;
  border-radius: 0;
  position: absolute;

  font-family: system-ui;

  box-shadow: 0 1px 0 black, 0 4px 16px rgba(0, 0, 0, 0.6);
}

.btd-settings-button {
  border-radius: 100px;
  font-size: 14px;
  line-height: 21px;
  font-weight: bold;
  outline: none;
  border: 1px solid;
  padding: 3px 12px;
  cursor: pointer;
  text-decoration: none;
}

.btd-settings-button.primary {
  color: white;
  background-color: var(--twitter-blue);
  border-color: var(--twitter-blue);

  &:hover {
    background-color: var(--twitter-darkblue);
    border-color: var(--twitter-darkblue);
  }

  &[disabled],
  &.disabled {
    opacity: 0.7;
    pointer-events: none;
  }
}

.btd-settings-button.secondary {
  color: var(--twitter-blue);
  background-color: transparent;
  border-color: var(--twitter-blue);

  &:hover {
    background-color: rgba(0, 0, 0, 0.1);
  }
}

.btd-settings-content {
  grid-area: content;
  overflow: auto;
}

.btd-settings-content > div:last-child {
  margin-bottom: 40px;
}

.btd-settings-footer {
  grid-area: footer;
  padding: 10px;
  border-top: 1px solid var(--settings-modal-separator);

  display: flex;
  justify-content: flex-start;
  align-items: center;
  column-gap: 10px;

  transition: transform 300ms ease;
  transform: translateY(100%);

  &.visible {
    transform: translateY(0%);
  }
}

.btd-settings-footer > div {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
}

.btd-settings-footer-label {
  font-size: 14px;
  margin: 0 10px;
  color: var(--twitter-blue);
  opacity: 0.8;
}

.btd-settings-header {
  grid-area: header;
  padding: 15px;
  font-size: 20px;
  text-align: left;
  border-bottom: 1px solid var(--settings-modal-separator);

  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: auto;
  grid-column-gap: 10px;
  justify-content: flex-start;
  align-items: center;
}

.btd-settings-header .icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: -6px;
}

.btd-settings-header img {
  height: 32px;
  width: 32px;
}

.btd-settings-header .version {
  color: var(--settings-modal-muted-text);
  font-size: 14px;
}

/**
 * Sidebar
 */

.btd-settings-sidebar {
  grid-area: sidebar;
  width: 200px;
  border-right: 1px solid var(--settings-modal-separator);
  background-color: var(--settings-modal-background);
  color: var(--settings-modal-text);
  overflow: auto;
  padding-bottom: 20px;
}

.btd-settings-sidebar .section-title {
  color: var(--settings-modal-muted-text);
  font-size: 20px;
  padding: 16px;
}

.btd-settings-sidebar ul {
  list-style: none;
}

.btd-settings-sidebar ul li,
.btd-settings-sidebar ul li .text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btd-settings-sidebar ul li a {
  text-decoration: none;
  display: inline-block;
  width: 100%;
}

.btd-settings-sidebar ul li a:any-link {
  color: currentColor;
}

.btd-settings-sidebar ul li {
  user-select: none;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: bold;
  color: var(--settings-modal-menu-item);

  &.active {
    color: var(--settings-modal-menu-item-selected);
    box-shadow: inset 4px 0 0 currentColor;
  }

  &:hover {
    color: var(--settings-modal-menu-item-hover);
    box-shadow: inset 4px 0 0 currentColor;
  }
}

/* .btd-settings-sidebar ul li .icon {
  grid-area: icon;
  width: 20px;
  height: 20px;
  color: currentColor;
  background: grey;
}

.btd-settings-sidebar ul li .icon svg {
  max-width: 20px;
  max-height: 20px;
}

.btd-settings-sidebar ul li .text {
  grid-area: text;
} */


text:
using Entitas.CodeGeneration.Attributes;

public abstract class AbstractEntityIndexComponent {

    [EntityIndex]
    public string value;
}


text:
/*++

 Module Name:

   Guid.c

 Abstract:

   GUIDs auto-generated for EFI test assertion.

--*/

#include "Efi.h"
#include "Guid.h"

// ****************************************************************************
//   Function
// ****************************************************************************

EFI_GUID gFirmwareManagementBBTestFunctionAssertionGuid001=EFI_TEST_FIRMWAREMANAGEMENTBBTESTFUNCTION_ASSERTION_001_GUID;

EFI_GUID gFirmwareManagementBBTestFunctionAssertionGuid002=EFI_TEST_FIRMWAREMANAGEMENTBBTESTFUNCTION_ASSERTION_002_GUID;

EFI_GUID gFirmwareManagementBBTestFunctionAssertionGuid003=EFI_TEST_FIRMWAREMANAGEMENTBBTESTFUNCTION_ASSERTION_003_GUID;

// ****************************************************************************
//   Conformance
// ****************************************************************************

EFI_GUID gFirmwareManagementBBTestConformanceSupportGuid001=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_SUPPORT_001_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceSupportGuid002=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_SUPPORT_002_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceSupportGuid003=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_SUPPORT_003_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceSupportGuid004=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_SUPPORT_004_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid001=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_001_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid002=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_002_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid003=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_003_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid004=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_004_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid005=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_005_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid006=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_006_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid007=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_007_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid008=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_008_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid009=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_009_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid010=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_010_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid011=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_011_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid012=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_012_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid013=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_013_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid014=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_014_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid015=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_015_GUID;

EFI_GUID gFirmwareManagementBBTestConformanceAssertionGuid016=EFI_TEST_FIRMWAREMANAGEMENTBBTESTCONFORMANCE_ASSERTION_016_GUID;


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:padding="@dimen/general_padding" >

    <TextView
        android:id="@+id/txtRatingMeal"
        style="@style/text_view"
        android:layout_width="match_parent" />

    <RatingBar
        android:id="@+id/ratRating"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:numStars="5"
        android:stepSize="1" />

    <TextView
        android:id="@+id/txtRatingDisclaimer"
        style="@style/text_view_small"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:drawableLeft="@drawable/ic_action_about"
        android:drawableStart="@drawable/ic_action_about"
        android:gravity="center_vertical"
        android:text="@string/disclaimer"
        android:textStyle="bold" />

</LinearLayout>


text:
using IronVelocity.Compilation;
using IronVelocity.Reflection;
using System;
using System.Collections.Immutable;
using System.Dynamic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;

namespace IronVelocity.Binders
{
    public class VelocityInvokeMemberBinder : InvokeMemberBinder
    {
        private readonly IMethodResolver _methodResolver;

        public VelocityInvokeMemberBinder(string name, CallInfo callInfo, IMethodResolver methodResolver)
            : base(name, true, callInfo)
        {
            _methodResolver = methodResolver;
        }

        public override DynamicMetaObject FallbackInvoke(DynamicMetaObject target, DynamicMetaObject[] args, DynamicMetaObject errorSuggestion)
		{
			if (!target.HasValue)
				return Defer(target, args);

			return errorSuggestion;
		}

        public override DynamicMetaObject FallbackInvokeMember(DynamicMetaObject target, DynamicMetaObject[] args, DynamicMetaObject errorSuggestion)
        {
            if (target == null)
                throw new ArgumentNullException(nameof(target));
            if (args == null)
                throw new ArgumentNullException(nameof(args));

            if (!target.HasValue || args.Any(x => !x.HasValue))
                return Defer(target, args);

            if (target == null)
                return BinderHelper.NullTargetResult(target, errorSuggestion);

			// If an argument has a null value, use a null type so that the resolution algorithm can do implicit null conversions
			var argTypes = args.Select(x => x.Value == null ? null : x.RuntimeType).ToImmutableList();

            OverloadResolutionData<MethodInfo> method = _methodResolver.ResolveMethod(target.LimitType.GetTypeInfo(), Name, argTypes);

            var restrictions = BinderHelper.CreateCommonRestrictions(target, args);
            if (method == null)
            {
                var log = BindingEventSource.Log;
                if (log.IsEnabled())
                {
                    var argTypeString = string.Join(",", argTypes.Select(x => x.FullName).ToArray());
                    log.InvokeMemberResolutionFailure(Name, target.LimitType.FullName, argTypeString);
                }

                return BinderHelper.UnresolveableResult(restrictions, errorSuggestion);
            }

            var methodExpression = _methodResolver.ConvertMethodParameters(method, target.Expression, args);
            return new DynamicMetaObject(
                VelocityExpressions.ConvertIfNeeded(methodExpression, ReturnType),
                restrictions
            );
        }

    }
}


text:
' Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

Imports System.Collections.Generic
Imports System.Threading
Imports Microsoft.CodeAnalysis
Imports Microsoft.CodeAnalysis.Formatting
Imports Microsoft.CodeAnalysis.Shared.Collections
Imports Microsoft.CodeAnalysis.Shared.Utilities
Imports Microsoft.CodeAnalysis.Text
Imports Microsoft.CodeAnalysis.VisualBasic
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax

Namespace Microsoft.CodeAnalysis.VisualBasic.Formatting
    ''' <summary>
    ''' this holds onto changes made by formatting engine.
    '''
    ''' currently it only has an ability to apply those changes to buffer. but it could be expanded to
    ''' support other cases as well such as tree or etc.
    ''' </summary>
    Friend Class FormattingResult
        Inherits AbstractFormattingResult
        Implements IFormattingResult

        Friend Sub New(treeInfo As TreeData, tokenStream As TokenStream, spanToFormat As TextSpan, taskExecutor As TaskExecutor)
            MyBase.New(treeInfo, tokenStream, spanToFormat, taskExecutor)
        End Sub

        Protected Overrides Function Rewriter(changeMap As Dictionary(Of ValueTuple(Of SyntaxToken, SyntaxToken), TriviaData), cancellationToken As CancellationToken) As SyntaxNode
            Dim triviaRewriter = New TriviaDataFactory.TriviaRewriter(Me.TreeInfo.Root, SimpleIntervalTree.Create(TextSpanIntervalIntrospector.Instance, Me.FormattedSpan), changeMap, cancellationToken)
            Return triviaRewriter.Transform()
        End Function
    End Class
End Namespace


text:
package DDG::Goodie::IsAwesome::DeanT765;
# ABSTRACT: DeanT765's first Goodie

use DDG::Goodie;
use strict;

zci answer_type => "is_awesome_dean_t765";
zci is_cached   => 1;

name "IsAwesome DeanT765";
description "My first Goodie, it let's the world know that DeanT765 is awesome";
primary_example_queries "duckduckhack DeanT765";
category "special";
topics "special_interest", "geek";
code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/DeanT765.pm";
attribution github => ["https://github.com/DeanT765", "DeanT765"],
            twitter => "deanthomasson";

triggers start => "duckduckhack deant765";

handle remainder => sub {
    return if $_;
    return "DeanT765 is awesome and has successfully completed the DuckDuckHack Goodie tutorial!";
};

1;


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

namespace Acumatica.WorkspaceManager
{
    public static class Messages
    {
        // Dialog titles
        public const string selectInstancePathTitle = "Select Instance Path";
        public const string loadBackupFileTitle = "Load Backup File";
        public const string saveBackupTitle = "Save Backup File";

        // Progress
        public const string startingSQLBrowserProgress = "Starting SQL Server Browser...";
        public const string discoveringDatabaseProgress = "Discovering database servers...";
        public const string connectingBuildServerProgress = "Connecting to build server...";
        public const string loadingBuildPackageProgress = "Loading build package: {0}";
        public const string scanningInstancesProgress = "Scanning instances: {0}/{1}";
        public const string creatingTempDirectoryProgress = "Creating temporary directories...";
        public const string startDatabaseBackupProgress = "Creating database backup...";
        public const string creatingDatabaseBackupProgress = "Creating database backup: {0}%";
        public const string packagingDatabaseBackupProgress = "Packaging database backup...";
        public const string packagingWebsiteProgress = "Packaging website files...";
        public const string compressingArchiveProgress = "Compressing archive...";
        public const string deletingWebsiteProgress = "Deleting website...";
        public const string deletingDatabaseProgress = "Deleting database...";
        public const string extractingArchiveProgress = "Extracting archive...";
        public const string extractingDatabaseProgress = "Extracting database backup...";
        public const string extractingWebsiteProgress = "Extracting website files...";
        public const string restoringDatabaseProgress = "Restoring database backup: {0}%";
        public const string droppingDatabaseProgress = "Dropping existing database...";
        public const string creatingWebsiteProgress = "Creating new website...";
        public const string restoringWebsiteProgress = "Restoring website files...";
        public const string setAccessRightsProgress = "Setting access rights...";

        // Error
        public const string instanceAlreadyExistsError = "Instance {0} already exists. Delete this instance before initiating restore operation.";
        public const string missingBackupFileError = "Missing backup file.";
        public const string missingDatabaseNameError = "Missing database name.";
        public const string missingInstanceNameError = "Missing instance name.";
        public const string missingVirtualDirectoryError = "Missing virtual directory.";
        public const string missingWebsiteNameError = "Missing website name.";
        public const string missingApplicationPoolError = "Missing application pool.";
        public const string missingInstancePathError = "Missing instance path.";
        public const string versionFetchError = "Can't get version.";
        public const string sitePathError = "Can't find site directory.";
        public const string webConfigError = "Can't read web.config file.";
        public const string serverTypeError = "Can't backup/restore {0} databases.";
        public const string versionMismatchError = "Database version doesn't coincide with the site's version.";
        public const string missingDatabaseError = "Database backup is missing from the archive.";
        public const string databaseExtractingError = "Can't extract database backup from the archive.";
        public const string missingWebsiteError = "Website files not found in backup archive.";
        public const string missingInstallDirectoryError = "Install directory not found: {0}{1}";
        public const string fileTransferError = "Failed to download remote file to local directory.";
        public const string installError = "Failed to install Acumatica ERP.";
        public const string removeFileError = "Failed to remove local file.";
        public const string downloadError = "Cannot download package that is not available online.";
        public const string deletePackageError = "Only local packages can be deleted.";
        public const string connectionError = "Database connection error.";
    }
}


text:
[![Build Status](https://jenkins.hydrosphere.io/buildStatus/icon?job=hydrosphere/mist/master)](https://jenkins.hydrosphere.io/job/hydrosphere/job/mist/job/master/)
[![Build Status](https://travis-ci.org/Hydrospheredata/mist.svg)](https://travis-ci.org/Hydrospheredata)
[![GitHub version](https://badge.fury.io/gh/hydrospheredata%2Fmist.svg)](https://badge.fury.io/gh/hydrospheredata%2Fmist) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.hydrosphere/mist-lib-spark2_2.11/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.hydrosphere/mist-lib-spark2_2.11/)
[![Docker Hub Pulls](https://img.shields.io/docker/pulls/hydrosphere/mist.svg)](https://img.shields.io/docker/pulls/hydrosphere/mist.svg)
# Hydrosphere Mist

[Hydrosphere](http://hydrosphere.io) Mist is a service for exposing analytical jobs and machine learning models as web services.

Mist provides an API for Scala & Python Apache Spark jobs and for machine learning models trained in Apache Spark.

It implements Spark as a Service and creates a unified API layer for building enterprise solutions and services on top of a big data stack.

![Mist use cases](http://hydrosphere.io/wp-content/uploads/2016/06/Mist-scheme-1050x576.png)

Discover more [Hydrosphere Mist use cases](/docs/use-cases/README.md).

**Table of Contents**
- [Features](#features)
- [Getting Started with Mist](#getting-started-with-mist)
- [Development mode](#development-mode)
- [Version Information](#version-information)
- [Roadmap](#roadmap)
- [Contact](#contact)
- [More docs](#more-docs)

## Features

- Realtime low latency models serving/scoring
![Mist Local Serving](http://dv9c7babquml0.cloudfront.net/docs-images/mist-model-serving.jpg)
- Spark Contexts orchestration - Cluster of Sark Clusters: manages multiple Spark contexts in separate JVMs or Dockers
![Cluster of Spark Clusters](http://dv9c7babquml0.cloudfront.net/docs-images/mist-cluster-of-spark-clusters.gif)
- Exposing Apache Spark jobs through REST API
- Spark **2.1.0** support!
- HTTP & Messaging (MQTT, Kafka) API
- Scala and **Python** Spark jobs support
- Support for Spark SQL and Hive
- High Availability and Fault Tolerance
- Self Healing after driver program failure
- Powerful logging
- Clear end-user API

## Getting Started with Mist

##### Download locally

Dependencies:

- jdk = 8
- [spark](http://spark.apache.org/downloads.html) >= 1.5.2 (earlier versions were not tested)

- Download mist from <http://repo.hydrosphere.io/static/>
   ```sh
   wget http://repo.hydrosphere.io/static/mist-0.12.0-2.1.1.tar.gz
   tar xvfz mist-0.12.1-2.1.1.tar.gz
   cd mist-0.12.1-2.1.1
   SPARK_HOME=${path to spark distributive} bin/mist-master start --debug true
   ```
- Check how it works on http://localhost:2004/ui

##### Run from docker

- Run Docker:
    ```sh
    docker run -p 2004:2004\
        -v /var/run/docker.sock:/var/run/docker.sock
        -d hydrosphere/mist:0.12.0-2.1.1 mist
    ```
- Check how it works on http://localhost:2004/ui

[More about docker image](https://hub.docker.com/r/hydrosphere/mist/)

#### From sources

```sh
git clone git@github.com:Hydrospheredata/mist.git
cd mist
# for spark 2.1.0
sbt -DsparkVersion=2.1.0 mist/mistRun
# or use default
sbt mist/mistRun
```

##### Run example

```
curl --header "Content-Type: application/json" \
     -X POST http://localhost:2004/api/simple-context \
     --data '{"numbers": [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]}'
```

Check out [Complete Getting Started Guide](/docs/getting-started/README.md)

## What's next

* [Complete Getting Started Guide](/docs/getting-started/README.md)
* [Learn from Use Cases and Tutorials](/docs/use-cases/README.md)
    * [Enterprise Analytics Applications](/docs/use-cases/enterprise-analytics.md)
    * [Reactive Applications](/docs/use-cases/reactive.md)
    * [Realtime Machine Learning Applications](/docs/use-cases/ml-realtime.md)
* [Learn about Mist Routers](/docs/routes.md)
* [Configure mist to make it fast and reliable](/docs/configuration.md)

## Version Information

| Mist Version   | Scala Version  | Python Version | Spark Version    |
|----------------|----------------|----------------|------------------|
| 0.1.4          | 2.10.6         | 2.7.6          | >=1.5.2          |
| 0.2.0          | 2.10.6         | 2.7.6          | >=1.5.2          |
| 0.3.0          | 2.10.6         | 2.7.6          | >=1.5.2          |
| 0.4.0          | 2.10.6, 2.11.8 | 2.7.6          | >=1.5.2          |
| 0.5.0          | 2.10.6, 2.11.8 | 2.7.6          | >=1.5.2          |
| 0.6.5          | 2.10.6, 2.11.8 | 2.7.6          | >=1.5.2          |
| 0.7.0          | 2.10.6, 2.11.8 | 2.7.6          | >=1.5.2          |
| 0.8.0          | 2.10.6, 2.11.8 | 2.7.6          | >=1.5.2          |
| 0.9.1          | 2.10.6, 2.11.8 | 2.7.6          | >=1.5.2          |
| 0.10.0         | 2.10.6, 2.11.8 | 2.7.6          | >=1.5.2          |
| master         | 2.10.6, 2.11.8 | 2.7.6          | >=1.5.2          |

## Roadmap

-----------------
- [x] Persist job state for self healing
- [x] Super parallel mode: run Spark contexts in separate JVMs
- [x] Powerful logging
- [x] RESTification
- [x] Support streaming contexts/jobs
- [x] Reactive API
- [x] Realtime ML models serving/scoring
- [x] CLI
- [x] Web Interface
- [x] Apache Kafka support
- [ ] Bi-directional streaming API
- [ ] AMQP support

## Docs Index

- [Getting Started](/docs/getting-started/README.md)
- [Use Cases & Tutorials](/docs/use-cases/README.md)
    - [Enterprise Analytics Applications](/docs/use-cases/enterprise-analytics.md)
    - [Reactive Applications](/docs/use-cases/reactive.md)
    - [Realtime Machine Learning Applications](/docs/use-cases/ml-realtime.md)
- [CLI](/docs/cli.md)
- [Scala & Python Mist DSL](/docs/spark-job-at-mist.md)
- [REST API](/docs/routes.md)
- [Streaming API](/docs/reactive.md)
- [Code Examples](/docs/code-examples.md)
- [Configuration](/docs/configuration.md)
- [License](/LICENSE)
- [Logging](/docs/logger.md)
- [Low level API Reference](/docs/api-reference.md)
- [Namespaces](/docs/context-namespaces.md)
- [Changelog](/CHANGELOG)
- [Tests](/docs/tests.md)

## Contact

Please report bugs/problems to:
<https://github.com/Hydrospheredata/mist/issues>.

<http://hydrosphere.io/>

[LinkedIn](https://www.linkedin.com/company/hydrospherebigdata)

[Facebook](https://www.facebook.com/hydrosphere.io/)

[Twitter](https://twitter.com/hydrospheredata)


text:
FOUNDATION_EXPORT double CSSColorsVersionNumber;
FOUNDATION_EXPORT const unsigned char CSSColorsVersionString[];


text:
package com.box.l10n.mojito.service.asset;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.slf4j.LoggerFactory.getLogger;

import com.box.l10n.mojito.entity.Asset;
import com.box.l10n.mojito.entity.AssetContent;
import com.box.l10n.mojito.entity.AssetExtraction;
import com.box.l10n.mojito.entity.BaseEntity;
import com.box.l10n.mojito.entity.Branch;
import com.box.l10n.mojito.entity.Repository;
import com.box.l10n.mojito.entity.TMTextUnit;
import com.box.l10n.mojito.okapi.asset.UnsupportedAssetFilterTypeException;
import com.box.l10n.mojito.service.assetExtraction.AssetExtractionRepository;
import com.box.l10n.mojito.service.assetExtraction.ServiceTestBase;
import com.box.l10n.mojito.service.assetcontent.AssetContentRepository;
import com.box.l10n.mojito.service.branch.BranchRepository;
import com.box.l10n.mojito.service.pollableTask.PollableFuture;
import com.box.l10n.mojito.service.pollableTask.PollableTaskException;
import com.box.l10n.mojito.service.pollableTask.PollableTaskService;
import com.box.l10n.mojito.service.repository.RepositoryNameAlreadyUsedException;
import com.box.l10n.mojito.service.repository.RepositoryService;
import com.box.l10n.mojito.service.tm.TMTextUnitRepository;
import com.box.l10n.mojito.test.TestIdWatcher;
import com.google.common.collect.ImmutableList;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.junit.Rule;
import org.junit.Test;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;

/** @author aloison, jyi */
public class AssetServiceConcurrentTest extends ServiceTestBase {

  /** logger */
  static Logger logger = getLogger(AssetServiceConcurrentTest.class);

  @Autowired AssetService assetService;

  @Autowired BranchRepository branchRepository;

  @Autowired RepositoryService repositoryService;

  @Autowired AssetRepository assetRepository;

  @Autowired AssetContentRepository assetContentRepository;

  @Autowired AssetExtractionRepository assetExtractionRepository;

  @Autowired PollableTaskService pollableTaskService;

  @Autowired TMTextUnitRepository tmTextUnitRepository;

  @Rule public TestIdWatcher testIdWatcher = new TestIdWatcher();

  /**
   * Test for processing same or updated asset with single text unit in parallel.
   *
   * @throws ExecutionException
   * @throws InterruptedException
   */
  @Test
  public void testConcurrencyForAssetExtraction()
      throws ExecutionException, InterruptedException, RepositoryNameAlreadyUsedException,
          AssetUpdateException, UnsupportedAssetFilterTypeException {
    logger.debug(
        "Testing for concurrency when processing same asset with same/updated contents in parallel");

    Repository repository =
        repositoryService.createRepository(testIdWatcher.getEntityName("repository"));
    String assetPath = "path/to/existing/asset.xliff";

    int numThreads = 15;
    List<PollableFuture<Asset>> assetResults = new ArrayList<>();
    List<String> assetContents = new ArrayList<>();

    for (int i = 1; i <= numThreads; i++) {
      String source = (i % 2 == 0) ? ("source" + i) : ("source" + (i - 1));
      String assetContent =
          xliffDataFactory.generateSourceXliff(
              Arrays.asList(xliffDataFactory.createTextUnit(1L, "name", source, null)));
      assetContents.add(assetContent);

      logger.debug("addOrUpdateAssetAndProcessIfNeeded: {}, source: {}", i, source);
      PollableFuture<Asset> assetResult =
          assetService.addOrUpdateAssetAndProcessIfNeeded(
              repository.getId(), assetPath, assetContent, false, null, null, null, null, null);
      assetResults.add(assetResult);
    }

    List<Exception> exceptions = waitForResult(assetResults);

    Branch branch = branchRepository.findByNameAndRepository(null, repository);

    Set<String> assetContentsFromDB = new HashSet<>();

    for (AssetContent assetContent :
        assetContentRepository.findByAssetRepositoryIdAndBranchName(repository.getId(), null)) {
      assetContentsFromDB.add(assetContent.getContent());
    }

    assertEquals(new HashSet<>(assetContents), assetContentsFromDB);

    if (!exceptions.isEmpty()) {
      exceptions.stream().forEach(e -> logger.error("No exception should have been thrown", e));
    }
    assertTrue("No exceptions should have been thrown", exceptions.isEmpty());

    Asset asset = assetRepository.findByPathAndRepositoryId(assetPath, repository.getId());
    assertNotNull("There should be one asset", asset);

    List<AssetExtraction> assetExtractions = assetExtractionRepository.findByAsset(asset);

    assertEquals("There should be 2 asset extractions", 2, assetExtractions.size());
  }

  /**
   * Test for adding 10 new assets simultaneously to a repository.
   *
   * @throws ExecutionException
   * @throws InterruptedException
   */
  @Test
  public void testConcurrentMultipleAssetExtractions()
      throws ExecutionException, InterruptedException, RepositoryNameAlreadyUsedException,
          AssetUpdateException, UnsupportedAssetFilterTypeException {
    logger.debug("Testing for concurrency when processing 10 different assets in parallel");

    Repository repository =
        repositoryService.createRepository(testIdWatcher.getEntityName("repository"));
    StringBuilder assetContent = new StringBuilder();
    for (int i = 0; i < 100; i++) {
      assetContent.append("# Test [" + i + "]\n" + "test." + i + " = Test " + i + "\n");
    }

    int numThreads = 10;
    List<PollableFuture<Asset>> assetResults = new ArrayList<>();

    for (int i = 0; i < numThreads; i++) {
      String assetPath = "test_" + i + "/en.properties";
      PollableFuture<Asset> assetResult =
          assetService.addOrUpdateAssetAndProcessIfNeeded(
              repository.getId(),
              assetPath,
              assetContent.toString(),
              false,
              null,
              null,
              null,
              null,
              null);
      assetResults.add(assetResult);
    }

    List<Exception> exceptions = waitForResult(assetResults);
    logger.debug("{} exceptions found", exceptions.size());
    assertTrue("No exceptions should have been thrown", exceptions.isEmpty());

    Set<Long> assetIds = assetRepository.findIdByRepositoryId(repository.getId());
    assertEquals("There should be " + numThreads + " asset ids", numThreads, assetIds.size());

    List<TMTextUnit> tmTextUnits = tmTextUnitRepository.findByTm_id(repository.getTm().getId());
    assertEquals(
        "There should be " + 100 * numThreads + " tmTextUnits",
        100 * numThreads,
        tmTextUnits.size());
  }

  public List<Exception> waitForResult(List<PollableFuture<Asset>> assetResults) {
    ImmutableList<Long> pollableTaskIds =
        assetResults.stream()
            .map(PollableFuture::getPollableTask)
            .map(BaseEntity::getId)
            .collect(ImmutableList.toImmutableList());

    List<Exception> exceptions = new ArrayList<>();

    try {
      pollableTaskService.waitForPollableTasks(pollableTaskIds, 60000, 50);
    } catch (InterruptedException e) {
      logger.error(ExceptionUtils.getStackTrace(e));
      exceptions.add(e);
    }

    for (int i = 0; i < assetResults.size(); i++) {
      try {
        logger.debug(
            "Get asset result: {} (i={})", assetResults.get(i).getPollableTask().getId(), i);
        PollableFuture<Asset> assetResult = assetResults.get(i);
        Asset asset = assetRepository.findById(assetResult.get().getId()).orElse(null);
      } catch (PollableTaskException | InterruptedException | ExecutionException e) {
        exceptions.add(e);
      }
    }

    return exceptions;
  }

  /**
   * Test for adding a new asset with 100 text units in parallel to a repository.
   *
   * @throws ExecutionException
   * @throws InterruptedException
   */
  @Test
  public void testConcurrentAssetExtractions()
      throws ExecutionException, InterruptedException, RepositoryNameAlreadyUsedException,
          AssetUpdateException, UnsupportedAssetFilterTypeException {
    logger.debug("Testing for concurrency when processing single new asset in parallel");

    Repository repository =
        repositoryService.createRepository(testIdWatcher.getEntityName("repository"));
    StringBuilder assetContent = new StringBuilder();
    for (int i = 0; i < 100; i++) {
      assetContent.append("# Test [" + i + "]\n" + "test." + i + " = Test " + i + "\n");
    }

    int numThreads = 5;
    List<PollableFuture<Asset>> assetResults = new ArrayList<>();

    for (int i = 0; i < numThreads; i++) {
      String assetPath = "en.properties";
      PollableFuture<Asset> assetResult =
          assetService.addOrUpdateAssetAndProcessIfNeeded(
              repository.getId(),
              assetPath,
              assetContent.toString(),
              false,
              null,
              null,
              null,
              null,
              null);
      assetResults.add(assetResult);
    }

    List<Exception> exceptions = waitForResult(assetResults);
    logger.debug("{} exceptions found", exceptions.size());
    assertTrue("No exceptions should have been thrown", exceptions.isEmpty());

    Set<Long> assetIds = assetRepository.findIdByRepositoryId(repository.getId());
    assertEquals("There should be 1 asset ids", 1, assetIds.size());

    List<TMTextUnit> tmTextUnits = tmTextUnitRepository.findByTm_id(repository.getTm().getId());
    assertEquals("There should be 100 tmTextUnits", 100, tmTextUnits.size());
  }
}