text:
import warnings
from collections import OrderedDict

import pandas as pd

from . import utils, dtypes
from .alignment import align
from .variable import IndexVariable, Variable, as_variable
from .variable import concat as concat_vars

def concat(objs, dim=None, data_vars='all', coords='different',
           compat='equals', positions=None, indexers=None, mode=None,
           concat_over=None, fill_value=dtypes.NA):
    """Concatenate xarray objects along a new or existing dimension.

    Parameters
    ----------
    objs : sequence of Dataset and DataArray objects
        xarray objects to concatenate together. Each object is expected to
        consist of variables and coordinates with matching shapes except for
        along the concatenated dimension.
    dim : str or DataArray or pandas.Index
        Name of the dimension to concatenate along. This can either be a new
        dimension name, in which case it is added along axis=0, or an existing
        dimension name, in which case the location of the dimension is
        unchanged. If dimension is provided as a DataArray or Index, its name
        is used as the dimension to concatenate along and the values are added
        as a coordinate.
    data_vars : {'minimal', 'different', 'all' or list of str}, optional
        These data variables will be concatenated together:
          * 'minimal': Only data variables in which the dimension already
            appears are included.
          * 'different': Data variables which are not equal (ignoring
            attributes) across all datasets are also concatenated (as well as
            all for which dimension already appears). Beware: this option may
            load the data payload of data variables into memory if they are not
            already loaded.
          * 'all': All data variables will be concatenated.
          * list of str: The listed data variables will be concatenated, in
            addition to the 'minimal' data variables.
        If objects are DataArrays, data_vars must be 'all'.
    coords : {'minimal', 'different', 'all' or list of str}, optional
        These coordinate variables will be concatenated together:
          * 'minimal': Only coordinates in which the dimension already appears
            are included.
          * 'different': Coordinates which are not equal (ignoring attributes)
            across all datasets are also concatenated (as well as all for which
            dimension already appears). Beware: this option may load the data
            payload of coordinate variables into memory if they are not already
            loaded.
          * 'all': All coordinate variables will be concatenated, except
            those corresponding to other dimensions.
          * list of str: The listed coordinate variables will be concatenated,
            in addition the 'minimal' coordinates.
    compat : {'equals', 'identical'}, optional
        String indicating how to compare non-concatenated variables and
        dataset global attributes for potential conflicts. 'equals' means
        that all variable values and dimensions must be the same;
        'identical' means that variable attributes and global attributes
        must also be equal.
    positions : None or list of integer arrays, optional
        List of integer arrays which specifies the integer positions to which
        to assign each dataset along the concatenated dimension. If not
        supplied, objects are concatenated in the provided order.
    fill_value : scalar, optional
        Value to use for newly missing values
    indexers, mode, concat_over : deprecated

    Returns
    -------
    concatenated : type of objs

    See also
    --------
    merge
    auto_combine
    """
    # TODO: add join and ignore_index arguments copied from pandas.concat
    # TODO: support concatenating scalar coordinates even if the concatenated
    # dimension already exists
    from .dataset import Dataset
    from .dataarray import DataArray

    try:
        first_obj, objs = utils.peek_at(objs)
    except StopIteration:
        raise ValueError('must supply at least one object to concatenate')

    if dim is None:
        warnings.warn('the `dim` argument to `concat` will be required '
                      'in a future version of xarray; for now, setting it to '
                      "the old default of 'concat_dim'",
                      FutureWarning, stacklevel=2)
        dim = 'concat_dims'

    if indexers is not None:  # pragma: nocover
        warnings.warn('indexers has been renamed to positions; the alias '
                      'will be removed in a future version of xarray',
                      FutureWarning, stacklevel=2)
        positions = indexers

    if mode is not None:
        raise ValueError('`mode` is no longer a valid argument to '
                         'xarray.concat; it has been split into the '
                         '`data_vars` and `coords` arguments')
    if concat_over is not None:
        raise ValueError('`concat_over` is no longer a valid argument to '
                         'xarray.concat; it has been split into the '
                         '`data_vars` and `coords` arguments')

    if isinstance(first_obj, DataArray):
        f = _dataarray_concat
    elif isinstance(first_obj, Dataset):
        f = _dataset_concat
    else:
        raise TypeError('can only concatenate xarray Dataset and DataArray '
                        'objects, got %s' % type(first_obj))
    return f(objs, dim, data_vars, coords, compat, positions, fill_value)

def _calc_concat_dim_coord(dim):
    """
    Infer the dimension name and 1d coordinate variable (if appropriate)
    for concatenating along the new dimension.
    """
    from .dataarray import DataArray

    if isinstance(dim, str):
        coord = None
    elif not isinstance(dim, (DataArray, Variable)):
        dim_name = getattr(dim, 'name', None)
        if dim_name is None:
            dim_name = 'concat_dim'
        coord = IndexVariable(dim_name, dim)
        dim = dim_name
    elif not isinstance(dim, DataArray):
        coord = as_variable(dim).to_index_variable()
        dim, = coord.dims
    else:
        coord = dim
        dim, = coord.dims
    return dim, coord

def _calc_concat_over(datasets, dim, data_vars, coords):
    """
    Determine which dataset variables need to be concatenated in the result,
    and which can simply be taken from the first dataset.
    """
    # Return values
    concat_over = set()
    equals = {}

    if dim in datasets[0]:
        concat_over.add(dim)
    for ds in datasets:
        concat_over.update(k for k, v in ds.variables.items()
                           if dim in v.dims)

    def process_subset_opt(opt, subset):
        if isinstance(opt, str):
            if opt == 'different':
                # all nonindexes that are not the same in each dataset
                for k in getattr(datasets[0], subset):
                    if k not in concat_over:
                        # Compare the variable of all datasets vs. the one
                        # of the first dataset. Perform the minimum amount of
                        # loads in order to avoid multiple loads from disk
                        # while keeping the RAM footprint low.
                        v_lhs = datasets[0].variables[k].load()
                        # We'll need to know later on if variables are equal.
                        computed = []
                        for ds_rhs in datasets[1:]:
                            v_rhs = ds_rhs.variables[k].compute()
                            computed.append(v_rhs)
                            if not v_lhs.equals(v_rhs):
                                concat_over.add(k)
                                equals[k] = False
                                # computed variables are not to be re-computed
                                # again in the future
                                for ds, v in zip(datasets[1:], computed):
                                    ds.variables[k].data = v.data
                                break
                        else:
                            equals[k] = True

            elif opt == 'all':
                concat_over.update(set(getattr(datasets[0], subset)) -
                                   set(datasets[0].dims))
            elif opt == 'minimal':
                pass
            else:
                raise ValueError("unexpected value for %s: %s" % (subset, opt))
        else:
            invalid_vars = [k for k in opt
                            if k not in getattr(datasets[0], subset)]
            if invalid_vars:
                if subset == 'coords':
                    raise ValueError(
                        'some variables in coords are not coordinates on '
                        'the first dataset: %s' % (invalid_vars,))
                else:
                    raise ValueError(
                        'some variables in data_vars are not data variables '
                        'on the first dataset: %s' % (invalid_vars,))
            concat_over.update(opt)

    process_subset_opt(data_vars, 'data_vars')
    process_subset_opt(coords, 'coords')
    return concat_over, equals

def _dataset_concat(datasets, dim, data_vars, coords, compat, positions,
                    fill_value=dtypes.NA):
    """
    Concatenate a sequence of datasets along a new or existing dimension
    """
    from .dataset import Dataset

    if compat not in ['equals', 'identical']:
        raise ValueError("compat=%r invalid: must be 'equals' "
                         "or 'identical'" % compat)

    dim, coord = _calc_concat_dim_coord(dim)
    # Make sure we're working on a copy (we'll be loading variables)
    datasets = [ds.copy() for ds in datasets]
    datasets = align(*datasets, join='outer', copy=False, exclude=[dim],
                     fill_value=fill_value)

    concat_over, equals = _calc_concat_over(datasets, dim, data_vars, coords)

    def insert_result_variable(k, v):
        assert isinstance(v, Variable)
        if k in datasets[0].coords:
            result_coord_names.add(k)
        result_vars[k] = v

    # create the new dataset and add constant variables
    result_vars = OrderedDict()
    result_coord_names = set(datasets[0].coords)
    result_attrs = datasets[0].attrs
    result_encoding = datasets[0].encoding

    for k, v in datasets[0].variables.items():
        if k not in concat_over:
            insert_result_variable(k, v)

    # check that global attributes and non-concatenated variables are fixed
    # across all datasets
    for ds in datasets[1:]:
        if (compat == 'identical' and
                not utils.dict_equiv(ds.attrs, result_attrs)):
            raise ValueError('dataset global attributes not equal')
        for k, v in ds.variables.items():
            if k not in result_vars and k not in concat_over:
                raise ValueError('encountered unexpected variable %r' % k)
            elif (k in result_coord_names) != (k in ds.coords):
                raise ValueError('%r is a coordinate in some datasets but not '
                                 'others' % k)
            elif k in result_vars and k != dim:
                # Don't use Variable.identical as it internally invokes
                # Variable.equals, and we may already know the answer
                if compat == 'identical' and not utils.dict_equiv(
                        v.attrs, result_vars[k].attrs):
                    raise ValueError(
                        'variable %s not identical across datasets' % k)

                # Proceed with equals()
                try:
                    # May be populated when using the "different" method
                    is_equal = equals[k]
                except KeyError:
                    result_vars[k].load()
                    is_equal = v.equals(result_vars[k])
                if not is_equal:
                    raise ValueError(
                        'variable %s not equal across datasets' % k)

    # we've already verified everything is consistent; now, calculate
    # shared dimension sizes so we can expand the necessary variables
    dim_lengths = [ds.dims.get(dim, 1) for ds in datasets]
    non_concat_dims = {}
    for ds in datasets:
        non_concat_dims.update(ds.dims)
    non_concat_dims.pop(dim, None)

    def ensure_common_dims(vars):
        # ensure each variable with the given name shares the same
        # dimensions and the same shape for all of them except along the
        # concat dimension
        common_dims = tuple(pd.unique([d for v in vars for d in v.dims]))
        if dim not in common_dims:
            common_dims = (dim,) + common_dims
        for var, dim_len in zip(vars, dim_lengths):
            if var.dims != common_dims:
                common_shape = tuple(non_concat_dims.get(d, dim_len)
                                     for d in common_dims)
                var = var.set_dims(common_dims, common_shape)
            yield var

    # stack up each variable to fill-out the dataset (in order)
    for k in datasets[0].variables:
        if k in concat_over:
            vars = ensure_common_dims([ds.variables[k] for ds in datasets])
            combined = concat_vars(vars, dim, positions)
            insert_result_variable(k, combined)

    result = Dataset(result_vars, attrs=result_attrs)
    result = result.set_coords(result_coord_names)
    result.encoding = result_encoding

    if coord is not None:
        # add concat dimension last to ensure that its in the final Dataset
        result[coord.name] = coord

    return result

def _dataarray_concat(arrays, dim, data_vars, coords, compat,
                      positions, fill_value=dtypes.NA):
    arrays = list(arrays)

    if data_vars != 'all':
        raise ValueError('data_vars is not a valid argument when '
                         'concatenating DataArray objects')

    datasets = []
    for n, arr in enumerate(arrays):
        if n == 0:
            name = arr.name
        elif name != arr.name:
            if compat == 'identical':
                raise ValueError('array names not identical')
            else:
                arr = arr.rename(name)
        datasets.append(arr._to_temp_dataset())

    ds = _dataset_concat(datasets, dim, data_vars, coords, compat,
                         positions, fill_value=fill_value)
    return arrays[0]._from_temp_dataset(ds, name)


text:
<?php
/**
 * WordPress Coding Standard.
 *
 * @package WPCS\WordPressCodingStandards
 * @link    https://github.com/WordPress/WordPress-Coding-Standards
 * @license https://opensource.org/licenses/MIT MIT
 */

namespace WordPressCS\WordPress\Sniffs\Utils;

use WordPressCS\WordPress\AbstractFunctionParameterSniff;
use PHP_CodeSniffer\Util\Tokens;

/**
 * Comprehensive I18n text domain fixer tool.
 *
 * This sniff can:
 * - Add missing text domains.
 * - Replace text domains based on an array of `old` values to a `new` value.
 *
 * Note: Without a user-defined configuration in a custom ruleset, this sniff will be ignored.
 *
 * @package WPCS\WordPressCodingStandards
 *
 * @since   1.2.0
 */
class I18nTextDomainFixerSniff extends AbstractFunctionParameterSniff {

	/**
	 * A list of tokenizers this sniff supports.
	 *
	 * @since 1.2.0
	 *
	 * @var array
	 */
	public $supportedTokenizers = array(
		'PHP',
		'CSS',
	);

	/**
	 * Old text domain(s) to replace.
	 *
	 * @since 1.2.0
	 *
	 * @var string[]|string
	 */
	public $old_text_domain;

	/**
	 * New text domain.
	 *
	 * @since 1.2.0
	 *
	 * @var string
	 */
	public $new_text_domain = '';

	/**
	 * The group name for this group of functions.
	 *
	 * @since 1.2.0
	 *
	 * @var string
	 */
	protected $group_name = 'i18nfixer';

	/**
	 * The WP Internationalization related functions to target for the replacements.
	 *
	 * @since 1.2.0
	 *
	 * @var array <string function name> => <int parameter position>
	 */
	protected $target_functions = array(
		'load_textdomain'                        => 1,
		'load_plugin_textdomain'                 => 1,
		'load_muplugin_textdomain'               => 1,
		'load_theme_textdomain'                  => 1,
		'load_child_theme_textdomain'            => 1,
		'unload_textdomain'                      => 1,

		'__'                                     => 2,
		'_e'                                     => 2,
		'_x'                                     => 3,
		'_ex'                                    => 3,
		'_n'                                     => 4,
		'_nx'                                    => 5,
		'_n_noop'                                => 3,
		'_nx_noop'                               => 4,
		'translate_nooped_plural'                => 3,
		'_c'                                     => 2, // Deprecated.
		'_nc'                                    => 4, // Deprecated.
		'__ngettext'                             => 4, // Deprecated.
		'__ngettext_noop'                        => 3, // Deprecated.
		'translate_with_context'                 => 2, // Deprecated.

		'esc_html__'                             => 2,
		'esc_html_e'                             => 2,
		'esc_html_x'                             => 3,
		'esc_attr__'                             => 2,
		'esc_attr_e'                             => 2,
		'esc_attr_x'                             => 3,

		'is_textdomain_loaded'                   => 1,
		'get_translations_for_domain'            => 1,

		// Shouldn't be used by plugins/themes.
		'translate'                              => 2,
		'translate_with_gettext_context'         => 3,

		// WP private functions. Shouldn't be used by plugins/themes.
		'_load_textdomain_just_in_time'          => 1,
		'_get_path_to_translation_from_lang_dir' => 1,
		'_get_path_to_translation'               => 1,
	);

	/**
	 * Whether a valid new text domain was found.
	 *
	 * @since 1.2.0
	 *
	 * @var bool
	 */
	private $is_valid = false;

	/**
	 * The new text domain as validated.
	 *
	 * @since 1.2.0
	 *
	 * @var string
	 */
	private $validated_textdomain = '';

	/**
	 * Whether the plugin/theme header has been seen and fixed yet.
	 *
	 * @since 1.2.0
	 *
	 * @var bool
	 */
	private $header_found = false;

	/**
	 * Possible headers for a theme.
	 *
	 * @link https://developer.wordpress.org/themes/basics/main-stylesheet-style-css/
	 *
	 * @since 1.2.0
	 *
	 * @var array Array key is the header name, the value indicated whether it is a
	 *            required (true) or optional (false) header.
	 */
	private $theme_headers = array(
		'Theme Name'  => true,
		'Theme URI'   => false,
		'Author'      => true,
		'Author URI'  => false,
		'Description' => true,
		'Version'     => true,
		'License'     => true,
		'License URI' => true,
		'Tags'        => false,
		'Text Domain' => true,
		'Domain Path' => false,
	);

	/**
	 * Possible headers for a plugin.
	 *
	 * @link https://developer.wordpress.org/plugins/the-basics/header-requirements/
	 *
	 * @since 1.2.0
	 *
	 * @var array Array key is the header name, the value indicated whether it is a
	 *            required (true) or optional (false) header.
	 */
	private $plugin_headers = array(
		'Plugin Name' => true,
		'Plugin URI'  => false,
		'Description' => false,
		'Version'     => false,
		'Author'      => false,
		'Author URI'  => false,
		'License'     => false,
		'License URI' => false,
		'Text Domain' => false,
		'Domain Path' => false,
		'Network'     => false,
	);

	/**
	 * Regex template to match theme/plugin headers.
	 *
	 * @since 1.2.0
	 *
	 * @var string
	 */
	private $header_regex_template = '`^(?:\s*(?:(?:\*|//)\s*)?)?(%s)\s*:\s*([^\r\n]+)`';

	/**
	 * Regex to match theme headers.
	 *
	 * Set from within the register() method.
	 *
	 * @since 1.2.0
	 *
	 * @var string
	 */
	private $theme_header_regex;

	/**
	 * Regex to match plugin headers.
	 *
	 * Set from within the register() method.
	 *
	 * @since 1.2.0
	 *
	 * @var string
	 */
	private $plugin_header_regex;

	/**
	 * The --tab-width CLI value that is being used.
	 *
	 * @since 1.2.0
	 *
	 * @var integer
	 */
	private $tab_width = null;

	/**
	 * Returns an array of tokens this test wants to listen for.
	 *
	 * @since 1.2.0
	 *
	 * @return array
	 */
	public function register() {
		$headers                  = array_map(
			'preg_quote',
			array_keys( $this->theme_headers ),
			array_fill( 0, \count( $this->theme_headers ), '`' )
		);
		$this->theme_header_regex = sprintf( $this->header_regex_template, implode( '|', $headers ) );

		$headers                   = array_map(
			'preg_quote',
			array_keys( $this->plugin_headers ),
			array_fill( 0, \count( $this->plugin_headers ), '`' )
		);
		$this->plugin_header_regex = sprintf( $this->header_regex_template, implode( '|', $headers ) );

		$targets = parent::register();

		$targets[] = \T_DOC_COMMENT_OPEN_TAG;
		$targets[] = \T_COMMENT;

		return $targets;
	}

	/**
	 * Processes this test, when one of its tokens is encountered.
	 *
	 * @since 1.2.0
	 *
	 * @param int $stackPtr The position of the current token in the stack.
	 *
	 * @return int|void Integer stack pointer to skip forward or void to continue
	 *                  normal file processing.
	 */
	public function process_token( $stackPtr ) {
		// Check if the old/new properties are correctly set. If not, bow out.
		if ( ! is_string( $this->new_text_domain )
			|| '' === $this->new_text_domain
		) {
			return ( $this->phpcsFile->numTokens + 1 );
		}

		if ( isset( $this->old_text_domain ) ) {
			$this->old_text_domain = $this->merge_custom_array( $this->old_text_domain, array(), false );

			if ( ! is_array( $this->old_text_domain )
				|| array() === $this->old_text_domain
			) {
				return ( $this->phpcsFile->numTokens + 1 );
			}
		}

		// Only validate and throw warning about the text domain once.
		if ( $this->new_text_domain !== $this->validated_textdomain ) {
			$this->is_valid             = false;
			$this->validated_textdomain = $this->new_text_domain;
			$this->header_found         = false;

			if ( 'default' === $this->new_text_domain ) {
				$this->phpcsFile->addWarning(
					'The "default" text domain is reserved for WordPress core use and should not be used by plugins or themes',
					0,
					'ReservedNewDomain',
					array( $this->new_text_domain )
				);

				return ( $this->phpcsFile->numTokens + 1 );
			}

			if ( preg_match( '`^[a-z0-9-]+$`', $this->new_text_domain ) !== 1 ) {
				$this->phpcsFile->addWarning(
					'The text domain should be a simple lowercase text string with words separated by dashes. "%s" appears invalid',
					0,
					'InvalidNewDomain',
					array( $this->new_text_domain )
				);

				return ( $this->phpcsFile->numTokens + 1 );
			}

			// If the text domain passed both validations, it should be considered valid.
			$this->is_valid = true;

		} elseif ( false === $this->is_valid ) {
			return ( $this->phpcsFile->numTokens + 1 );
		}

		if ( isset( $this->tab_width ) === false ) {
			if ( isset( $this->phpcsFile->config->tabWidth ) === false
				|| 0 === $this->phpcsFile->config->tabWidth
			) {
				// We have no idea how wide tabs are, so assume 4 spaces for fixing.
				$this->tab_width = 4;
			} else {
				$this->tab_width = $this->phpcsFile->config->tabWidth;
			}
		}

		if ( \T_DOC_COMMENT_OPEN_TAG === $this->tokens[ $stackPtr ]['code']
			|| \T_COMMENT === $this->tokens[ $stackPtr ]['code']
		) {
			// Examine for plugin/theme file header.
			return $this->process_comments( $stackPtr );

		} elseif ( 'CSS' !== $this->phpcsFile->tokenizerType ) {
			// Examine a T_STRING token in a PHP file as a function call.
			return parent::process_token( $stackPtr );
		}
	}

	/**
	 * Process the parameters of a matched function.
	 *
	 * @since 1.2.0
	 *
	 * @param int    $stackPtr        The position of the current token in the stack.
	 * @param string $group_name      The name of the group which was matched.
	 * @param string $matched_content The token content (function name) which was matched.
	 * @param array  $parameters      Array with information about the parameters.
	 *
	 * @return void
	 */
	public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) {
		$target_param = $this->target_functions[ $matched_content ];

		if ( isset( $parameters[ $target_param ] ) === false && 1 !== $target_param ) {
			$error_msg  = 'Missing $domain arg';
			$error_code = 'MissingArgDomain';

			if ( isset( $parameters[ ( $target_param - 1 ) ] ) ) {
				$fix = $this->phpcsFile->addFixableError( $error_msg, $stackPtr, $error_code );

				if ( true === $fix ) {
					$start_previous = $parameters[ ( $target_param - 1 ) ]['start'];
					$end_previous   = $parameters[ ( $target_param - 1 ) ]['end'];
					if ( \T_WHITESPACE === $this->tokens[ $start_previous ]['code']
						&& $this->tokens[ $start_previous ]['content'] === $this->phpcsFile->eolChar
					) {
						// Replicate the new line + indentation of the previous item.
						$replacement = ',';
						for ( $i = $start_previous; $i <= $end_previous; $i++ ) {
							if ( \T_WHITESPACE !== $this->tokens[ $i ]['code'] ) {
								break;
							}

							if ( isset( $this->tokens[ $i ]['orig_content'] ) ) {
								$replacement .= $this->tokens[ $i ]['orig_content'];
							} else {
								$replacement .= $this->tokens[ $i ]['content'];
							}
						}

						$replacement .= "'{$this->new_text_domain}'";
					} else {
						$replacement = ", '{$this->new_text_domain}'";
					}

					if ( \T_WHITESPACE === $this->tokens[ $end_previous ]['code'] ) {
						$this->phpcsFile->fixer->addContentBefore( $end_previous, $replacement );
					} else {
						$this->phpcsFile->fixer->addContent( $end_previous, $replacement );
					}
				}
			} else {
				$error_msg .= ' and preceding argument(s)';
				$error_code = 'MissingArgs';

				// Expected preceeding param also missing, just throw the warning.
				$this->phpcsFile->addWarning( $error_msg, $stackPtr, $error_code );
			}

			return;
		}

		// Target parameter found. Let's examine it.
		$domain_param_start = $parameters[ $target_param ]['start'];
		$domain_param_end   = $parameters[ $target_param ]['end'];
		$domain_token       = null;

		for ( $i = $domain_param_start; $i <= $domain_param_end; $i++ ) {
			if ( isset( Tokens::$emptyTokens[ $this->tokens[ $i ]['code'] ] ) ) {
				continue;
			}

			if ( \T_CONSTANT_ENCAPSED_STRING !== $this->tokens[ $i ]['code'] ) {
				// Unexpected token found, not our concern. This is handled by the I18n sniff.
				return;
			}

			if ( isset( $domain_token ) ) {
				// More than one T_CONSTANT_ENCAPSED_STRING found, not our concern. This is handled by the I18n sniff.
				return;
			}

			$domain_token = $i;
		}

		// If we're still here, this means only one T_CONSTANT_ENCAPSED_STRING was found.
		$old_domain = $this->strip_quotes( $this->tokens[ $domain_token ]['content'] );

		if ( ! \in_array( $old_domain, $this->old_text_domain, true ) ) {
			// Not a text domain targetted for replacement, ignore.
			return;
		}

		$fix = $this->phpcsFile->addFixableError(
			'Mismatched text domain. Expected \'%s\' but found \'%s\'',
			$domain_token,
			'TextDomainMismatch',
			array( $this->new_text_domain, $old_domain )
		);

		if ( true === $fix ) {
			$replacement = str_replace( $old_domain, $this->new_text_domain, $this->tokens[ $domain_token ]['content'] );
			$this->phpcsFile->fixer->replaceToken( $domain_token, $replacement );
		}
	}

	/**
	 * Process the function if no parameters were found.
	 *
	 * @since 1.2.0
	 *
	 * @param int    $stackPtr        The position of the current token in the stack.
	 * @param string $group_name      The name of the group which was matched.
	 * @param string $matched_content The token content (function name) which was matched.
	 *
	 * @return void
	 */
	public function process_no_parameters( $stackPtr, $group_name, $matched_content ) {

		$target_param = $this->target_functions[ $matched_content ];

		if ( 1 !== $target_param ) {
			// Only process the no param case as fixable if the text domain is expected to be the first parameter.
			$this->phpcsFile->addWarning( 'Missing $domain arg and preceding argument(s)', $stackPtr, 'MissingArgs' );
			return;
		}

		$opener = $this->phpcsFile->findNext( Tokens::$emptyTokens, ( $stackPtr + 1 ), null, true );
		if ( \T_OPEN_PARENTHESIS !== $this->tokens[ $opener ]['code']
			|| isset( $this->tokens[ $opener ]['parenthesis_closer'] ) === false
		) {
			// Parse error or live coding.
			return;
		}

		$fix = $this->phpcsFile->addFixableError( 'Missing $domain arg', $stackPtr, 'MissingArgDomain' );
		if ( true === $fix ) {
			$closer      = $this->tokens[ $opener ]['parenthesis_closer'];
			$replacement = " '{$this->new_text_domain}' ";

			if ( $this->tokens[ $opener ]['line'] !== $this->tokens[ $closer ]['line'] ) {
				$replacement = trim( $replacement );
				$addBefore   = ( $closer - 1 );
				if ( \T_WHITESPACE === $this->tokens[ ( $closer - 1 ) ]['code']
					&& $this->tokens[ $closer - 1 ]['line'] === $this->tokens[ $closer ]['line']
				) {
					if ( isset( $this->tokens[ ( $closer - 1 ) ]['orig_content'] ) ) {
						$replacement = $this->tokens[ ( $closer - 1 ) ]['orig_content']
							. "\t"
							. $replacement;
					} else {
						$replacement = $this->tokens[ ( $closer - 1 ) ]['content']
							. str_repeat( ' ', $this->tab_width )
							. $replacement;
					}

					--$addBefore;
				} else {
					// We don't know whether the code uses tabs or spaces, so presume WPCS, i.e. tabs.
					$replacement = "\t" . $replacement;
				}

				$replacement = $this->phpcsFile->eolChar . $replacement;

				$this->phpcsFile->fixer->addContentBefore( $addBefore, $replacement );

			} elseif ( \T_WHITESPACE === $this->tokens[ ( $closer - 1 ) ]['code'] ) {
				$this->phpcsFile->fixer->replaceToken( ( $closer - 1 ), $replacement );
			} else {
				$this->phpcsFile->fixer->addContentBefore( $closer, $replacement );
			}
		}
	}

	/**
	 * Process comments to find the plugin/theme headers.
	 *
	 * @since 1.2.0
	 *
	 * @param int $stackPtr The position of the current token in the stack.
	 *
	 * @return int|void Integer stack pointer to skip forward or void to continue
	 *                  normal file processing.
	 */
	public function process_comments( $stackPtr ) {
		if ( true === $this->header_found && ! defined( 'PHP_CODESNIFFER_IN_TESTS' ) ) {
			return;
		}

		$regex   = $this->plugin_header_regex;
		$headers = $this->plugin_headers;
		$type    = 'plugin';
		$skip_to = $stackPtr;

		$file = $this->strip_quotes( $this->phpcsFile->getFileName() );
		if ( 'STDIN' === $file ) {
			return;
		}

		$file_name = basename( $file );
		if ( 'CSS' === $this->phpcsFile->tokenizerType ) {
			if ( 'style.css' !== $file_name && ! defined( 'PHP_CODESNIFFER_IN_TESTS' ) ) {
				// CSS files only need to be examined for the file header.
				return ( $this->phpcsFile->numTokens + 1 );
			}

			$regex   = $this->theme_header_regex;
			$headers = $this->theme_headers;
			$type    = 'theme';
		}

		$comment_details = array(
			'required_header_found' => false,
			'headers_found'         => 0,
			'text_domain_ptr'       => false,
			'text_domain_found'     => '',
			'last_header_ptr'       => false,
			'last_header_matches'   => array(),
		);

		if ( \T_COMMENT === $this->tokens[ $stackPtr ]['code'] ) {
			$block_comment = false;
			if ( substr( $this->tokens[ $stackPtr ]['content'], 0, 2 ) === '/*' ) {
				$block_comment = true;
			}

			$current = $stackPtr;
			do {
				if ( false === $comment_details['text_domain_ptr']
					|| false === $comment_details['required_header_found']
					|| $comment_details['headers_found'] < 3
				) {
					$comment_details = $this->examine_comment_line( $current, $regex, $headers, $comment_details );
				}

				if ( true === $block_comment && substr( $this->tokens[ $current ]['content'], -2 ) === '*/' ) {
					++$current;
					break;
				}

				++$current;
			} while ( isset( $this->tokens[ $current ] ) && \T_COMMENT === $this->tokens[ $current ]['code'] );

			$skip_to = $current;

		} else {
			if ( ! isset( $this->tokens[ $stackPtr ]['comment_closer'] ) ) {
				return;
			}

			$closer  = $this->tokens[ $stackPtr ]['comment_closer'];
			$current = $stackPtr;

			while ( ( $current = $this->phpcsFile->findNext( \T_DOC_COMMENT_STRING, ( $current + 1 ), $closer ) ) !== false ) {
				$comment_details = $this->examine_comment_line( $current, $regex, $headers, $comment_details );

				if ( false !== $comment_details['text_domain_ptr']
					&& true === $comment_details['required_header_found']
					&& $comment_details['headers_found'] >= 3
				) {
					// No need to look at the rest of the docblock.
					break;
				}
			}

			$skip_to = $closer;
		}

		// So, was this the plugin/theme header ?
		if ( true === $comment_details['required_header_found']
			&& $comment_details['headers_found'] >= 3
		) {
			$this->header_found = true;

			$text_domain_ptr   = $comment_details['text_domain_ptr'];
			$text_domain_found = $comment_details['text_domain_found'];

			if ( false !== $text_domain_ptr ) {
				if ( $this->new_text_domain !== $text_domain_found
					&& ( \in_array( $text_domain_found, $this->old_text_domain, true ) )
				) {
					$fix = $this->phpcsFile->addFixableError(
						'Mismatched text domain in %s header. Expected \'%s\' but found \'%s\'',
						$text_domain_ptr,
						'TextDomainHeaderMismatch',
						array(
							$type,
							$this->new_text_domain,
							$text_domain_found,
						)
					);

					if ( true === $fix ) {
						if ( isset( $this->tokens[ $text_domain_ptr ]['orig_content'] ) ) {
							$replacement = $this->tokens[ $text_domain_ptr ]['orig_content'];
						} else {
							$replacement = $this->tokens[ $text_domain_ptr ]['content'];
						}

						$replacement = str_replace( $text_domain_found, $this->new_text_domain, $replacement );

						$this->phpcsFile->fixer->replaceToken( $text_domain_ptr, $replacement );
					}
				}
			} else {
				$last_header_ptr     = $comment_details['last_header_ptr'];
				$last_header_matches = $comment_details['last_header_matches'];

				$fix = $this->phpcsFile->addFixableError(
					'Missing "Text Domain" in %s header',
					$last_header_ptr,
					'MissingTextDomainHeader',
					array( $type )
				);

				if ( true === $fix ) {
					if ( isset( $this->tokens[ $last_header_ptr ]['orig_content'] ) ) {
						$replacement = $this->tokens[ $last_header_ptr ]['orig_content'];
					} else {
						$replacement = $this->tokens[ $last_header_ptr ]['content'];
					}

					$replacement = str_replace( $last_header_matches[1], 'Text Domain', $replacement );
					$replacement = str_replace( $last_header_matches[2], $this->new_text_domain, $replacement );

					if ( \T_DOC_COMMENT_OPEN_TAG === $this->tokens[ $stackPtr ]['code'] ) {
						for ( $i = ( $last_header_ptr - 1 ); ; $i-- ) {
							if ( $this->tokens[ $i ]['line'] !== $this->tokens[ $last_header_ptr ]['line'] ) {
								++$i;
								break;
							}
						}

						$replacement = $this->phpcsFile->eolChar
							. $this->phpcsFile->getTokensAsString( $i, ( $last_header_ptr - $i ), true )
							. $replacement;
					}

					$this->phpcsFile->fixer->addContent( $comment_details['last_header_ptr'], $replacement );
				}
			}
		}

		return $skip_to;
	}

	/**
	 * Examine an individual token in a larger comment for plugin/theme headers.
	 *
	 * @since 1.2.0
	 *
	 * @param int    $stackPtr        The position of the current token in the stack.
	 * @param string $regex           The regex to use to examine the comment line.
	 * @param array  $headers         Valid headers for a plugin or theme.
	 * @param array  $comment_details The information collected so far.
	 *
	 * @return array Adjusted $comment_details array
	 */
	protected function examine_comment_line( $stackPtr, $regex, $headers, $comment_details ) {
		if ( preg_match( $regex, $this->tokens[ $stackPtr ]['content'], $matches ) === 1 ) {
			++$comment_details['headers_found'];

			if ( true === $headers[ $matches[1] ] ) {
				$comment_details['required_header_found'] = true;
			}

			if ( 'Text Domain' === $matches[1] ) {
				$comment_details['text_domain_ptr']   = $stackPtr;
				$comment_details['text_domain_found'] = trim( $matches[2] );
			}

			$comment_details['last_header_ptr']     = $stackPtr;
			$comment_details['last_header_matches'] = $matches;
		}

		return $comment_details;
	}
}

redpajama_set_name: RedPajamaGithub


text: from .rinex import *


text:
package edu.utah.further.core.api.time;

/**
 * A time source to be used by {@link TimeService}. It is usually implemented by
 * anonymous classes.
 *

 * -----------------------------------------------------------------------------------

 * (c) 2008-2013 FURTHeR Project, AVP Health Sciences IT Office, University of Utah

 * Contact: {@code <further@utah.edu>}

 * Biomedical Informatics, 26 South 2000 East

 * Room 5775 HSEB, Salt Lake City, UT 84112

 * Day Phone: 1-801-581-4080

 * -----------------------------------------------------------------------------------
 *
 * @author Oren E. Livne {@code <oren.livne@utah.edu>}
 * @version Nov 5, 2008
 */
public interface TimeSource
{
	// ========================= METHODS ===================================

	/**
	 * Return the current time in milliseconds.
	 *
	 * @return the current time in milliseconds
	 */
	long getMillis();
}


text:
<?php

// Spanish Language Module for eXtplorer (translated by J. Pedro Flor P. y Actualizado por Udo Llorens)
global $_VERSION;

$GLOBALS["charset"] = "iso-8859-1";
$GLOBALS["text_dir"] = "ltr"; // ('ltr' for left to right, 'rtl' for right to left)
$GLOBALS["date_fmt"] = "Y/m/d H:i";
$GLOBALS["error_msg"] = array(
	// error
	"error"			=> "ERROR(ES)",
	"back"			=> "Ir Atrás",

	// root
	"home"			=> "El directorio home no existe, revise su configuración.",
	"abovehome"		=> "El directorio actual no puede estar arriba del directorio home.",
	"targetabovehome"	=> "El directorio objetivo no puede estar arriba del directorio home.",

	// exist
	"direxist"		=> "Este directorio no existe.",
	//"filedoesexist"	=>  "Este archivo ya existe.",
	"fileexist"		=> "Este archivo no existe.",
	"itemdoesexist"		=> "Este artículo ya existe.",
	"itemexist"		=> "Este artículo no existe.",
	"targetexist"		=> "El directorio objetivo no existe.",
	"targetdoesexist"	=> "El artículo objetivo ya existe.",

	// open
	"opendir"		=> "Incapaz de abrir directorio.",
	"readdir"		=> "Incapaz de leer directorio.",

	// access
	"accessdir"		=> "Ud. no está permitido accesar este directorio.",
	"accessfile"		=> "Ud. no está permitido accesar a este archivo.",
	"accessitem"		=> "Ud. no está permitido accesar a este artículo.",
	"accessfunc"		=> "Ud. no está permitido usar esta funcion.",
	"accesstarget"		=> "Ud. no está permitido accesar al directorio objetivo.",

	// actions
	"permread"		=> "Fracaso reuniendo permisos.",
	"permchange"		=> "Fracaso en Cambio de permisos.",
	"openfile"		=> "Fracaso abriendo archivo.",
	"savefile"		=> "Fracaso guardando archivo.",
	"createfile"		=> "Fracaso creando archivo.",
	"createdir"		=> "Fracaso creando Directorio.",
	"uploadfile"		=> "Fracaso subiendo archivo.",
	"copyitem"		=> "Fracaso Copiando.",
	"moveitem"		=> "Fracaso Moviendo.",
	"delitem"		=> "Fracaso Borrando.",
	"chpass"		=> "Fracaso Cambiando password.",
	"deluser"		=> "Fracaso Removiendo usuario.",
	"adduser"		=> "Fracaso Agragando usuario.",
	"saveuser"		=> "Fracaso Guardadno usuario.",
	"searchnothing"		=> "Ud. debe suministrar algo para la busqueda.",

	// misc
	"miscnofunc"		=> "Función no disponible.",
	"miscfilesize"		=> "Archivo excede maximo tamaño.",
	"miscfilepart"		=> "Archivo fue parcialmente subido.",
	"miscnoname"		=> "Ud. debe suministrar un nombre.",
	"miscselitems"		=> "Ud. no tiene seleccionado(s) ningun artículo.",
	"miscdelitems"		=> "Está seguro de querer borrar este(os) {0} artículo(s)?",
	"miscdeluser"		=> "Está seguro de querer borrar usuario '{0}'?",
	"miscnopassdiff"	=> "Nuevo password no difiere del actual.",
	"miscnopassmatch"	=> "No coinciden los Passwords.",
	"miscfieldmissed"	=> "Ud. falló en un importante campo.",
	"miscnouserpass"	=> "Usuario o password incorrecto.",
	"miscselfremove"	=> "Ud. no puede borrarse a si mismo.",
	"miscuserexist"		=> "Usuario ya existe.",
	"miscnofinduser"	=> "No se puede encontrar usuario.",
	"extract_noarchive" => "The File is no extractable Archive.",
	"extract_unknowntype" => "Archivo comprimido desconocido",

	'chmod_none_not_allowed' => 'El cambio de permisos a <ninguno> no se permite',
	'archive_dir_notexists' => 'El directorio que has elegido para guardar no existe.',
	'archive_dir_unwritable' => 'Por favor eliga un directorio con permisos de escritura para guardr el archivo comprimido.',
	'archive_creation_failed' => 'No se pudo guardar el archivo comprimido'
);
$GLOBALS["messages"] = array(
	// links
	"permlink"		=> "PERMISOS CAMBIADOS",
	"editlink"		=> "EDITAR",
	"downlink"		=> "DESCARGAR",
	"uplink"		=> "ARRIBA",
	"homelink"		=> "INICIO",
	"reloadlink"		=> "RECARGAR",
	"copylink"		=> "COPIAR",
	"movelink"		=> "MOVER",
	"dellink"		=> "BORRAR",
	"comprlink"		=> "ARCHIVAR",
	"adminlink"		=> "ADMINISTRAR",
	"logoutlink"		=> "SALIR",
	"uploadlink"		=> "SUBIR",
	"searchlink"		=> "BÚSQUEDA",
	"extractlink"	=> "Extraer Archivo Comprimido",
	'chmodlink'		=> 'Cambio (chmod) de permisos (Directorio/Archivos(s)))', // new mic
	'mossysinfolink'	=> 'Información de Sistema', // new mic
	'logolink'		=> 'Ir a la página de eXtplorer', // new mic

	// list
	"nameheader"		=> "Nombre",
	"sizeheader"		=> "Tamaño",
	"typeheader"		=> "Tipo",
	"modifheader"		=> "Modificado",
	"permheader"		=> "Permisos",
	"actionheader"		=> "Acciones",
	"pathheader"		=> "Ruta",

	// buttons
	"btncancel"		=> "Cancelar",
	"btnsave"		=> "Grabar",
	"btnchange"		=> "Cambiar",
	"btnreset"		=> "Restablecer",
	"btnclose"		=> "Cerrar",
	"btncreate"		=> "Crear",
	"btnsearch"		=> "Buscar",
	"btnupload"		=> "Subir",
	"btncopy"		=> "Copiar",
	"btnmove"		=> "Mover",
	"btnlogin"		=> "Login",
	"btnlogout"		=> "Salir",
	"btnadd"		=> "Añadir",
	"btnedit"		=> "Editar",
	"btnremove"		=> "Remover",

	// user messages, new in eXtplorer 1.3.0
	'renamelink'	=> 'RENAME',
	'confirm_delete_file' => 'Seguro que quieres borrar el archivo? \\n%s',
	'success_delete_file' => 'Archivos borrados correctamente.',
	'success_rename_file' => 'El archivo/directorio %s Se renombro correctamente a %s.',

	// actions
	"actdir"		=> "Directorio",
	"actperms"		=> "Cambiar permisos",
	"actedit"		=> "Editar archivo",
	"actsearchresults"	=> "Resultado de busqueda.",
	"actcopyitems"		=> "Copiar artículos(s)",
	"actcopyfrom"		=> "Copia de /%s a /%s ",
	"actmoveitems"		=> "Mover artículo(s)",
	"actmovefrom"		=> "Mover de /%s a /%s ",
	"actlogin"		=> "Login",
	"actloginheader"	=> "Login para usar QuiXplorer",
	"actadmin"		=> "Administración",
	"actchpwd"		=> "Cambiar password",
	"actusers"		=> "Usuarios",
	"actarchive"		=> "Archivar item(s)",
	"actupload"		=> "Subir Archivo(s)",

	// misc
	"miscitems"		=> "Artículo(s)",
	"miscfree"		=> "Libre",
	"miscusername"		=> "Nombre de usuario",
	"miscpassword"		=> "Password",
	"miscoldpass"		=> "Password Antiguo",
	"miscnewpass"		=> "Password Nuevo",
	"miscconfpass"		=> "Confirmar password",
	"miscconfnewpass"	=> "Confirmar nuevo password",
	"miscchpass"		=> "Cambiar password",
	"mischomedir"		=> "Directorio Home",
	"mischomeurl"		=> "URL Home",
	"miscshowhidden"	=> "Mostrar artículos ocultos",
	"mischidepattern"	=> "Ocultar patrón",
	"miscperms"		=> "Permisos",
	"miscuseritems"		=> "(nombre, directorio home, mostrar artículos ocultos, permisos, activar)",
	"miscadduser"		=> "añadir usuario",
	"miscedituser"		=> "editar usario '%s'",
	"miscactive"		=> "Activar",
	"misclang"		=> "Lenguaje",
	"miscnoresult"		=> "Resultado(s) no disponible(s).",
	"miscsubdirs"		=> "Búsqueda de subdirectorios",
	"miscpermnames"		=> array("Solo ver","Modificar","Cambiar password","Modificar & Cambiar password", "Administrador"),
	"miscyesno"		=> array("Si","No","S","N"),
	"miscchmod"		=> array("Propietario", "Grupo", "Público"),
	// from here all new by mic
	'miscowner'			=> 'Owner',
	'miscownerdesc'		=> 'Descripción:
Usuario (UID) /
Grupo (GID)
Permisos Actuales:
 %s ( %s ) /
 %s ( %s )',

	// sysinfo (new by mic)
	'simamsysinfo'		=> 'Información de sistema: eXplorer',
	'sisysteminfo'		=> 'Información de Sistema',
	'sibuilton'			=> 'Sistema Operativo',
	'sidbversion'		=> 'Versión de la Base de Datos (MySQL)',
	'siphpversion'		=> 'Versión del PHP',
	'siphpupdate'		=> 'INFORMACIÓN: La version de PHP que usas no es moderna!
Para garantizar toda la funcionalidad de eXtplorer,
debes usar al menos la Versión de PHP 4.3/strong>!',
	'siwebserver'		=> 'Servidor Web',
	'siwebsphpif'		=> 'Servidor Web - Interfaz de PHP',
	'simamboversion'	=> 'Versión de eXtplorer',
	'siuseragent'		=> 'Versión del navegador',
	'sirelevantsettings' => 'Opciones importantes de PHP',
	'sisafemode'		=> 'Modo Seguro',
	'sibasedir'			=> 'Open basedir',
	'sidisplayerrors'	=> 'Errores de PHP',
	'sishortopentags'	=> 'Short Open Tags',
	'sifileuploads'		=> 'Datei Uploads',
	'simagicquotes'		=> 'Magic Quotes',
	'siregglobals'		=> 'Register Globals',
	'sioutputbuf'		=> 'Bufer de Salida',
	'sisesssavepath'	=> 'Session Savepath',
	'sisessautostart'	=> 'Session auto start',
	'sixmlenabled'		=> 'XML enabled',
	'sizlibenabled'		=> 'ZLIB enabled',
	'sidisabledfuncs'	=> 'funciones No Activas',
	'sieditor'			=> ' Editor WYSIWYG',
	'siconfigfile'		=> 'Archivo de Configuración',
	'siphpinfo'			=> 'Información de PHP',
	'siphpinformation'	=> 'Información de PHP',
	'sipermissions'		=> 'Permisos',
	'sidirperms'		=> 'Permisos de directorios',
	'sidirpermsmess'	=> 'Para asegurar el correcto funcionamiento de eXtplorer, los siguientes directorios han de tener permisos de escritura [chmod 0777]',
	'sionoff'			=> array( 'Encendido', 'Apagado' ),

	'extract_warning' => "Seguro que quieres descomprimir este archivo aqui ?\\nEsto sobreescribirá archivos si no se usa con cuidado!",
	'extract_success' => "La descompresión salió bien",
	'extract_failure' => "La descompresión salió mal",

	'overwrite_files' => 'Sobreescribir el/los siguiente(s) archivo(s)?',
	"viewlink"		=> "VER",
	"actview"		=> "Se muestra el origen del archivo",

	// added by Paulino Michelazzo (paulino@michelazzo.com.br) to fun_chmod.php file
	'recurse_subdirs'	=> 'Recurse into subdirectories?',

	// added by Paulino Michelazzo (paulino@michelazzo.com.br) to footer.php file
	'check_version'	=> 'Check for latest version',

	// added by Paulino Michelazzo (paulino@michelazzo.com.br) to fun_rename.php file
	'rename_file'	=>	'Renombrar un directorio o archivo...',
	'newname'		=>	'Nuevo Nombre',

	// added by Paulino Michelazzo (paulino@michelazzo.com.br) to fun_edit.php file
	'returndir'	=>	'¿volver al directorio tras guardar?',
	'line'		=> 	'Linea',
	'column'	=>	'Columna',
	'wordwrap'	=>	': (IE only)',
	'copyfile'	=>	'¿Copiar el archivo sobre este nombre de archivo?',

	// Bookmarks
	'quick_jump' => 'Ir directamente a',
	'already_bookmarked' => 'Éste directorio ya se añadió a los favoritos',
	'bookmark_was_added' => 'Éste directorio se añadió a los favoritos',
	'not_a_bookmark' => 'Este directorio no es un favorito.',
	'bookmark_was_removed' => 'Se borró éste directorio de la lista de favoritos.',
	'bookmarkfile_not_writable' => "Fallo al %s el favorito.\n el archivo de favoritos '%s' \nno es escribible.",

	'lbl_add_bookmark' => 'Añadir este directorio como favorito',
	'lbl_remove_bookmark' => 'Borrar este directorio de la lista de favoritos',

	'enter_alias_name' => 'Por favor introduzca un sobrenombre para este favorito',

	'normal_compression' => 'compresión normal',
	'good_compression' => 'compresión buena',
	'best_compression' => 'la mejor compresión',
	'no_compression' => 'sin compresión',

	'creating_archive' => 'Creando archivo comprimido...',
	'processed_x_files' => 'Procesados %s de %s Archivos',

	'ftp_header' => 'Autenticación de FTP local',
	'ftp_login_lbl' => 'Por favor introduce las credenciales de acceso al FTP',
	'ftp_login_name' => 'Nombre de usuario del FTP',
	'ftp_login_pass' => 'Contraseña del FTP',
	'ftp_hostname_port' => 'Servidor y puerto del FTP
(El puerto es opcional)',
	'ftp_login_check' => 'Comprobando la conexión con el FTP...',
	'ftp_connection_failed' => "No se pudo contactar con el servidor FTP. \nPor favor, comprueba que tienes el FTP  funcionando en tu servidor.",
	'ftp_login_failed' => "Fallo de acceso al FTP. Por favor comprueba usuario y contraseña y vuelve a intentarlo.",

	'switch_file_mode' => 'Modo Actual: %s. Podría cambiar al modo %s',
	'symlink_target' => 'Destino del Link Simbólico',

	"permchange"		=> "Funcionó el CHMOD:",
	"savefile"		=> "Se guardó el archivo.",
	"moveitem"		=> "Funcionó el traslado.",
	"copyitem"		=> "Funcionó el copiado.",
	'archive_name' 	=> 'Nombre del archivo comprimido',
	'archive_saveToDir' 	=> 'Guardar el comprimido a este directorio',

	'editor_simple'	=> 'Modo de edición simple',
	'editor_syntaxhighlight'	=> 'Modo de sistaxis resaltada',

	'newlink'	=> 'Nuevo Archivo o Directorio',
	'show_directories' => 'Mostrar Directorios',
	'actlogin_success' => '¡Acceso Concedido!',
	'actlogin_failure' => 'Acceso denegado, inténtelo de nuevo.',
	'directory_tree' => 'Árbol de Directorios',
	'browsing_directory' => 'Directorio Actual',
	'filter_grid' => 'Filtro',
	'paging_page' => 'Página',
	'paging_of_X' => 'de {0}',
	'paging_firstpage' => 'Primera Página',
	'paging_lastpage' => 'Última Página',
	'paging_nextpage' => 'Página Siguiente',
	'paging_prevpage' => 'Página Anterior',

	'paging_info' => 'Mostrando Elementos {0} - {1} of {2}',
	'paging_noitems' => 'No hay nada que mostrar',
	'aboutlink' => 'Acerca de...',
	'password_warning_title' => '¡Importante - Cambie su contraseña!',
	'password_warning_text' => 'El usuario con el que se ha registrado (admin con contraseña admin) corresponde a las credenciales por defecto de eXtplorer. Esto es un riesgo alto de seguridad y debe arreglarlo inmediatamente',
	'change_password_success' => 'Se cambió su contraseña',
	'success' => 'Éxito',
	'failure' => 'Fallo',
	'dialog_title' => 'Website Dialog',
	'upload_processing' => 'Procesando la subida del archivo. Espere, por favor...',
	'upload_completed' => 'Archivo subido correctamente',
	'acttransfer' => 'Transferir desde otro servidor',
	'transfer_processing' => 'Procesando la transferencia entre servidores. Espere, por favor...',
	'transfer_completed' => 'Tranferencia completada!',
	'max_file_size' => 'Tamaño Máximo del archivo',
	'max_post_size' => 'Límite de subida',
	'done' => 'Hecho.',
	'permissions_processing' => 'Aplicando los permisos. Espere, por favor...',
	'archive_created' => 'Se creó el archivo comprimido!',
	'save_processing' => 'Guardando archivo...',
	'current_user' => 'Este Script funciona con los permisos del usuario:',
	'your_version' => 'Tu versión',
	'search_processing' => 'Buscando. Espere, por favor...',
	'url_to_file' => 'URL del archivo',
	'file' => 'Archivo'
);
?>


text:
package com.izforge.izpack.installer.base;

import com.izforge.izpack.installer.data.UninstallData;

import java.io.File;

/**
 * Interface that all installe types must adhere to.
 * This includes ConsoleInstaller, AutomatedInstaller and InstallerFrame.
 *
 * @author Jonathan Halliday
 * @author Julien Ponge
 */
public interface InstallerBase
{
    /**
     * Write the automatic installation
     *
     * @param file
     * @param uninstallData
     * @throws Exception
     */
    public void writeInstallationRecord(File file, UninstallData uninstallData) throws Exception;
}


text:
layout: page
title: Seattle Police Officer 6950 Shannon M. Waldorf
permalink: /information/agencies/city_of_seattle/seattle_police_department/copbook/6950/
---

**Age as of Feb. 24, 2016:** 33


text:
// ## Local Namespace
var wedding = wedding || {};

wedding.module = wedding.module || {}; // note the use of lower case for package names now

wedding.module.social = wedding.module.social || {};

/**
 * This extends() the RED.module.social.Facebook class in order to add custom tracking events
 *
 */
(function () {

	wedding.module.social.Twitter = (function () {

		var EVENTS = {
			LOGIN : "social/twitter/login",
			LOGOUT : "social/twitter/logout",
			GET_STATUS : "social/twitter/get-status",
			POST_STATUS : "social/twitter/post-status"
		};

		return wedding.module.social.Twitter.extend({

			init : function (vars) {
				this.sup.call(this, vars);
			},

			onTwitterInit : function () {
				this.sup.call(this);

				$.subscribe(EVENTS.LOGOUT, $.proxy(this.getLogout, this));

				if (window.twttr) {
					var that = this;

					window.twttr.anywhere((function (T) {

						$.subscribe(EVENTS.LOGIN, function (e) {
							T.signIn();
						});

						T.bind("authComplete", function (e, user) {
							that.onAuthComplete(e, user);
						});

						T.bind("signOut", function (e) {
							that.onSignOut(e);
						});

						$.subscribe(EVENTS.POST_STATUS, function (e, data) {
							if (T.isConnected()) {
								T.Status.update(data.text);
							} else {
								that.customTweet(e, data);
							}
						});

						$.subscribe(EVENTS.GET_STATUS, function (e) {
							if (T.isConnected()) {
								that.onAuthComplete(null, T.currentUser)
							} else {
								that.onSignOut();
							}
						});
					}));
				}
			},

			onAuthComplete : function (e, eData) {
				$.publish(wedding.module.Unity.SEND_MESSAGE, ["HandleTwitterLogin", eData]);
			},

			onSignOut : function (e) {
				$.publish(wedding.module.Unity.SEND_MESSAGE, ["HandleTwitterLogout"]);
			},

			getLogout : function (e) {
				if (window.twttr) {
					window.twttr.anywhere.signOut();
				}
			},

			destroy : function () {
				this.sup.call(this);
			}

		}, EVENTS);

	}.call(wedding.module.social));
}());


text:
<?php
namespace Hamcrest\Core;

use Hamcrest\BaseMatcher;
use Hamcrest\Description;

/**
 * Is the value the same object as another value?
 * In PHP terms, does $a === $b?
 */
class IsSame extends BaseMatcher
{

    private $_object;

    public function __construct($object)
    {
        $this->_object = $object;
    }

    public function matches($object)
    {
        return ($object === $this->_object) && ($this->_object === $object);
    }

    public function describeTo(Description $description)
    {
        $description->appendText('sameInstance(')
                                ->appendValue($this->_object)
                                ->appendText(')')
                                ;
    }

    /**
     * Creates a new instance of IsSame.
     *
     * @param mixed $object
     *   The predicate evaluates to true only when the argument is
     *   this object.
     *
     * @return \Hamcrest\Core\IsSame
     * @factory
     */
    public static function sameInstance($object)
    {
        return new self($object);
    }
}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>Delete Many Documents with model.remove()</title>

        Go to Delete Many Documents with model.remove() and complete
        all
        steps in this
        challenge.

Coding skills required.


text:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [CoreXR].[QueryPlanBatchStore](
	[PKQueryPlanBatchStoreID]	[bigint] IDENTITY(1,1) NOT NULL,
	[AWBatchPlanHash]			[varbinary](64) NOT NULL,
	[plan_handle]				[varbinary](64) NOT NULL,
	[dbid]						[smallint] NOT NULL,
	[objectid]					[int] NOT NULL,
	[fail_to_obtain]			[bit] NOT NULL,
	[query_plan]				[nvarchar](max) NOT NULL,
	[InsertedBy_UTCCaptureTime]	[datetime] NOT NULL,	--In AutoWho, these 2 fields map to UTCCaptureTime in AutoWho.CaptureTimes,
	[LastTouchedBy_UTCCaptureTime] [datetime] NOT NULL,
 CONSTRAINT [PKQueryPlanBatchStore] PRIMARY KEY CLUSTERED
(
	[PKQueryPlanBatchStoreID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
SET ANSI_PADDING ON

GO
CREATE NONCLUSTERED INDEX [NCL_AWBatchPlanHash] ON [CoreXR].[QueryPlanBatchStore]
(
	[AWBatchPlanHash] ASC
)
INCLUDE ( 	[plan_handle],
	[dbid],
	[objectid]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
SET ANSI_PADDING ON

GO
CREATE NONCLUSTERED INDEX [NCL_LastTouched] ON [CoreXR].[QueryPlanBatchStore]
(
	[LastTouchedBy_UTCCaptureTime] ASC
)
INCLUDE ( 	[AWBatchPlanHash],
	[plan_handle],
	[dbid],
	[objectid],
	[PKQueryPlanBatchStoreID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO


text:
<!DOCTYPE html>

	<meta charset="UTF-8">
	<title>Title</title>

	{{parentMsg}}

	<child message="hello!" my-message="props" :msg-from-parent="parentMsg"></child>


text:
<?php

namespace Omnipay\Paysafecard\Message;

class ValidatePayoutResponse extends PayoutResponse
{
    public function isSuccessful()
    {
        return $this->getErrorCode() === 0 && $this->getResultCode() === 0 && $this->getValidationOnly() === true;
    }
}


text:
namespace Myrtille.Services.Contracts
{
    public interface IMultifactorAuthenticationAdapter
    {
        /// <summary>
        /// Validate credentials using the adapter
        /// </summary>
        /// <param name="username">Username</param>
        /// <param name="password">Password</param>
        /// <returns></returns>
        bool Authenticate(string username, string password, string clientIP = null);

        /// <summary>
        /// This is the label to be displayed on the login screen
        /// </summary>
        string PromptLabel { get; }

        /// <summary>
        /// link to MFA provider page
        /// </summary>
        string ProviderURL { get; }
    }
}


text:
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.util.xml.impl;

import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiAnchor;
import com.intellij.psi.PsiElement;
import com.intellij.psi.xml.XmlAttribute;
import com.intellij.psi.xml.XmlElement;
import com.intellij.psi.xml.XmlFile;
import com.intellij.psi.xml.XmlTag;
import com.intellij.util.xml.*;
import com.intellij.util.xml.reflect.AbstractDomChildrenDescription;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * @author peter
 */
public abstract class DomAnchorImpl<T extends DomElement> implements DomAnchor<T> {
  private static final Logger LOG = Logger.getInstance(DomAnchorImpl.class);

  public static <T extends DomElement> DomAnchor<T> createAnchor(@NotNull T t) {
    return createAnchor(t, true);
  }

  public static <T extends DomElement> DomAnchor<T> createAnchor(@NotNull T t, boolean usePsi) {
    DomInvocationHandler handler = DomManagerImpl.getNotNullHandler(t);
    if (handler.getStub() != null) {
      return new StubAnchor<>(handler);
    }

    if (usePsi) {
      final XmlElement element = t.getXmlElement();
      if (element != null) {
        return new PsiBasedDomAnchor<>(PsiAnchor.create(element), element.getProject());
      }
    }

    final DomElement parent = t.getParent();
    if (parent == null) {
      LOG.error("Parent null: " + t);
    }

    if (parent instanceof DomFileElementImpl) {
      final DomFileElementImpl fileElement = (DomFileElementImpl)parent;
      //noinspection unchecked
      return new RootAnchor<>(fileElement.getFile(), fileElement.getRootElementClass());
    }

    final DomAnchor<DomElement> parentAnchor = createAnchor(parent);
    final String name = t.getGenericInfo().getElementName(t);
    final AbstractDomChildrenDescription description = t.getChildDescription();
    final List<? extends DomElement> values = description.getValues(parent);
    if (name != null) {
      int i = 0;
      for (DomElement value : values) {
        if (value.equals(t)) {
          return new NamedAnchor<>(parentAnchor, description, name, i);
        }
        if (name.equals(value.getGenericInfo().getElementName(value))) {
          i++;
        }
      }
    }

    final int index = values.indexOf(t);
    if (index < 0) {
      diagnoseNegativeIndex2(t, parent, description, values);
    }
    return new IndexedAnchor<>(parentAnchor, description, index);
  }

  private static <T extends DomElement> void diagnoseNegativeIndex2(T t,
                                                                    DomElement parent,
                                                                    AbstractDomChildrenDescription description,
                                                                    List<? extends DomElement> values) {
    final XmlTag parentTag = parent.getXmlTag();
    StringBuilder diag = new StringBuilder("Index<0: description=" + description + "\nparent=" + parent + "\nt=" + t + "\nvalues=" + values + "\n");
    for (int i = 0, size = values.size(); i < size; i++) {
      DomElement value = values.get(i);
      if (value.toString().equals(t.toString())) {
        final XmlElement tElement = t.getXmlElement();
        final XmlElement valElement = value.getXmlElement();
        diag.append(" hasSame, i=" + i +
                    "; same=" + (value == t) +
                    ", equal=" + value.equals(t) +
                    ", equal2=" + t.equals(value) +
                    ", t.physical=" + (tElement == null ? "null" : String.valueOf(tElement.isPhysical())) +
                    ", value.physical=" + (valElement == null ? "null" : String.valueOf(valElement.isPhysical())) +
                    ", sameElements=" + (tElement == value.getXmlElement()) +
                    "\n");
        if (tElement != null && valElement != null) {
          diag.append("  sameFile=" + (tElement.getContainingFile() == valElement.getContainingFile()) +
                      ", sameParent=" + (tElement.getParent() == valElement.getParent()) +
                      "\n");
        }
      }
    }

    if (parentTag != null) {
      diag.append("Parent tag: ").append(parentTag.getName()).append("\n");
      if (t instanceof GenericAttributeValue) {
        for (XmlAttribute attribute : parentTag.getAttributes()) {
          diag.append(", attr: ").append(attribute.getName());
        }
      } else {
        for (XmlTag tag : parentTag.getSubTags()) {
          diag.append("\n subtag: ").append(tag.getName());
        }
      }
      diag.append("\n");
    }
    diag.append("Child name: ").append(t.getXmlElementName()).append(";").append(t.getXmlElementNamespaceKey());
    LOG.error(diag);
  }

  @Override
  public PsiElement getPsiElement() {
    T t = retrieveDomElement();
    return t == null ? null : t.getXmlElement();
  }

  @Override
  @Nullable
  public abstract T retrieveDomElement();

  @Override
  @NotNull
  public abstract XmlFile getContainingFile();

  private static final class NamedAnchor<T extends DomElement> extends DomAnchorImpl<T> {
    private final DomAnchor myParent;
    private final AbstractDomChildrenDescription myDescr;
    private final String myName;
    private final int myIndex;

    private NamedAnchor(final DomAnchor parent, final AbstractDomChildrenDescription descr, final String id, int index) {
      myParent = parent;
      myDescr = descr;
      myName = id;
      myIndex = index;
    }

    @Override
    public boolean equals(final Object o) {
      if (this == o) return true;
      if (!(o instanceof NamedAnchor)) return false;

      final NamedAnchor that = (NamedAnchor)o;

      if (myDescr != null ? !myDescr.equals(that.myDescr) : that.myDescr != null) return false;
      if (myName != null ? !myName.equals(that.myName) : that.myName != null) return false;
      if (myParent != null ? !myParent.equals(that.myParent) : that.myParent != null) return false;
      if (myIndex != that.myIndex) return false;

      return true;
    }

    @Override
    public int hashCode() {
      int result;
      result = (myParent != null ? myParent.hashCode() : 0);
      result = 31 * result + (myDescr != null ? myDescr.hashCode() : 0);
      result = 31 * result + (myName != null ? myName.hashCode() : 0);
      result = 31 * result + myIndex;
      return result;
    }

    @Override
    public T retrieveDomElement() {
      final DomElement parent = myParent.retrieveDomElement();
      if (parent == null) return null;

      final List<? extends DomElement> list = myDescr.getValues(parent);
      int i = 0;
      for (final DomElement element : list) {
        final String s = element.getGenericInfo().getElementName(element);
        if (myName.equals(s)) {
          if (i == myIndex) {
            //noinspection unchecked
            return (T)element;
          }
          i++;
        }
      }
      return null;
    }

    @Override
    @NotNull
    public XmlFile getContainingFile() {
      return myParent.getContainingFile();
    }
  }

  private static final class IndexedAnchor<T extends DomElement> extends DomAnchorImpl<T> {
    private final DomAnchor myParent;
    private final AbstractDomChildrenDescription myDescr;
    private final int myIndex;

    private IndexedAnchor(final DomAnchor parent, final AbstractDomChildrenDescription descr, final int index) {
      myParent = parent;
      myDescr = descr;
      myIndex = index;
    }

    @Override
    public boolean equals(final Object o) {
      if (this == o) return true;
      if (!(o instanceof IndexedAnchor)) return false;

      final IndexedAnchor that = (IndexedAnchor)o;

      if (myIndex != that.myIndex) return false;
      if (myDescr != null ? !myDescr.equals(that.myDescr) : that.myDescr != null) return false;
      if (myParent != null ? !myParent.equals(that.myParent) : that.myParent != null) return false;

      return true;
    }

    @Override
    public int hashCode() {
      int result;
      result = (myParent != null ? myParent.hashCode() : 0);
      result = 31 * result + (myDescr != null ? myDescr.hashCode() : 0);
      result = 31 * result + myIndex;
      return result;
    }

    @Override
    public T retrieveDomElement() {
      final DomElement parent = myParent.retrieveDomElement();
      if (parent == null) return null;

      final List<? extends DomElement> list = myDescr.getValues(parent);
      if (myIndex < 0 || myIndex >= list.size()) return null;

      //noinspection unchecked
      return (T)list.get(myIndex);
    }

    @Override
    @NotNull
    public XmlFile getContainingFile() {
      return myParent.getContainingFile();
    }
  }

  private static final class RootAnchor<T extends DomElement> extends DomAnchorImpl<T> {
    private final XmlFile myFile;
    private final Class<T> myClass;

    private RootAnchor(final XmlFile file, final Class<T> aClass) {
      myFile = file;
      myClass = aClass;
    }

    @Override
    public boolean equals(final Object o) {
      if (this == o) return true;
      if (!(o instanceof RootAnchor)) return false;

      final RootAnchor that = (RootAnchor)o;

      if (myClass != null ? !myClass.equals(that.myClass) : that.myClass != null) return false;
      if (myFile != null ? !myFile.equals(that.myFile) : that.myFile != null) return false;

      return true;
    }

    @Override
    public int hashCode() {
      int result;
      result = (myFile != null ? myFile.hashCode() : 0);
      result = 31 * result + (myClass != null ? myClass.hashCode() : 0);
      return result;
    }

    @Override
    public T retrieveDomElement() {
      final DomFileElement<T> fileElement = DomManager.getDomManager(myFile.getProject()).getFileElement(myFile, myClass);
      return fileElement == null ? null : fileElement.getRootElement();
    }

    @Override
    @NotNull
    public XmlFile getContainingFile() {
      return myFile;
    }
  }

  private static class PsiBasedDomAnchor<T extends DomElement> extends DomAnchorImpl<T> {
    private final PsiAnchor myAnchor;
    private final Project myProject;

    PsiBasedDomAnchor(PsiAnchor anchor, Project project) {
      myAnchor = anchor;
      myProject = project;
    }

    @Override
    public T retrieveDomElement() {
      PsiElement psi = myAnchor.retrieve();
      if (psi == null) return null;

      if (psi instanceof XmlTag) {
        return (T)DomManager.getDomManager(myProject).getDomElement((XmlTag)psi);
      }
      if (psi instanceof XmlAttribute) {
        return (T)DomManager.getDomManager(myProject).getDomElement((XmlAttribute)psi);
      }
      return null;
    }

    @NotNull
    @Override
    public XmlFile getContainingFile() {
      return (XmlFile)myAnchor.getFile();
    }

    @Override
    public boolean equals(Object o) {
      if (this == o) return true;
      if (o == null || getClass() != o.getClass()) return false;

      PsiBasedDomAnchor anchor = (PsiBasedDomAnchor)o;

      if (myAnchor != null ? !myAnchor.equals(anchor.myAnchor) : anchor.myAnchor != null) return false;
      if (myProject != null ? !myProject.equals(anchor.myProject) : anchor.myProject != null) return false;

      return true;
    }

    @Override
    public int hashCode() {
      int result = myAnchor != null ? myAnchor.hashCode() : 0;
      result = 31 * result + (myProject != null ? myProject.hashCode() : 0);
      return result;
    }
  }

  private static final class StubAnchor<T extends DomElement> implements DomAnchor<T> {

    private final DomInvocationHandler myHandler;

    private StubAnchor(DomInvocationHandler handler) {
      myHandler = handler;
    }

    @Override
    public @NotNull T retrieveDomElement() {
      return (T)myHandler.getProxy();
    }

    @NotNull
    @Override
    public XmlFile getContainingFile() {
      return myHandler.getFile();
    }

    @Nullable
    @Override
    public PsiElement getPsiElement() {
      return myHandler.getXmlElement();
    }

    @Override
    public boolean equals(Object o) {
      if (this == o) return true;
      if (o == null || getClass() != o.getClass()) return false;

      StubAnchor anchor = (StubAnchor)o;

      if (myHandler != null ? !myHandler.equals(anchor.myHandler) : anchor.myHandler != null) return false;

      return true;
    }

    @Override
    public int hashCode() {
      return myHandler != null ? myHandler.hashCode() : 0;
    }
  }
}


text:
himanshua.com

### Copyright and license

It is under [the MIT license](/LICENSE).


text:
<!--
Copyright 2016, 2017 Institut National de la Recherche Agronomique

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

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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>fr.inra.maiage.bibliome.alvisnlp.core.annotation package description</title>
  </head>

  <body>
    This package contain the annotation processor factory class to handle @AlvisNLPModule, @Param, @Converter, @FunctionLibraryFactory and @Fun annotations.
  </body>
</html>


text:
function matchSyntaxRuleTest() {
	this.resultCallback_ = createMockFunction();
}
registerTestSuite(matchSyntaxRuleTest);

matchSyntaxRuleTest.prototype.ReturnCorrectmatchSyntaxRule = function() {
	var _ctx = new konoha.kcontext_t();
	var stmt = new konoha.kStmt();
	var rules = new konoho.kArray();
	var uline = null;
	var tls = new konoha.kArray();
	var s = null;
	var e = null;
	var optional = null;

	konoha.matchSyntaxRule(_ctx, stmt, rules, uline, tls, s, e, optinal);

//TODO	expectEq();
}


text:
package de.unifreiburg.cs.proglang.jgs.typing;

import de.unifreiburg.cs.proglang.jgs.Code;
import de.unifreiburg.cs.proglang.jgs.constraints.ConstraintSet;
import de.unifreiburg.cs.proglang.jgs.constraints.ConstraintSetFactory;
import de.unifreiburg.cs.proglang.jgs.constraints.NaiveConstraintsFactory;
import de.unifreiburg.cs.proglang.jgs.constraints.TypeVars;
import de.unifreiburg.cs.proglang.jgs.constraints.secdomains.LowHigh;
import de.unifreiburg.cs.proglang.jgs.instrumentation.Var;
import de.unifreiburg.cs.proglang.jgs.jimpleutils.Vars;
import de.unifreiburg.cs.proglang.jgs.signatures.Effects;
import org.junit.Before;
import org.junit.Test;
import soot.IntType;
import soot.jimple.Jimple;

import java.util.Collections;

import static org.hamcrest.CoreMatchers.*;
import static de.unifreiburg.cs.proglang.jgs.constraints.secdomains.LowHigh.*;
import static de.unifreiburg.cs.proglang.jgs.TestDomain.*;
import static de.unifreiburg.cs.proglang.jgs.constraints.TypeVars.*;
import static org.junit.Assert.assertThat;

public class BodyTypingResultTest {

    private Jimple j;
    private TypeVars tvars;
    private Code code;
    private ConstraintSetFactory<LowHigh.Level> csets;

    @Before
    public void setUp() {
        this.tvars = new TypeVars();
        this.j = Jimple.v();
        this.code = new Code(tvars);
        this.csets = new NaiveConstraintsFactory<>(types);
    }

    public static BodyTypingResult<LowHigh.Level> trivialResultForTesting(ConstraintSetFactory<LowHigh.Level> csets, Environment env) {
        return new BodyTypingResult<LowHigh.Level>(csets.empty(), Effects.emptyEffect(), env, TagMap.empty(), EnvMap.empty());
    }

    @Test
    public void joinTest() {
        Environment before = code.init;
        Var<?> v = Vars.fromLocal(j.newLocal("v", IntType.v()));
        TypeVars.TypeVar tv1 = tvars.testParam(v, "1");
        TypeVars.TypeVar tv2 = tvars.testParam(v, "2");
        Environment first = before.add(v, tv1);
        Environment second = before.add(v, tv2);
        ConstraintSet<Level> cs1 = csets.fromCollection(Collections.singletonList(leC(code.tvarX, tv1)));
        ConstraintSet<Level> cs2 = csets.fromCollection(Collections.singletonList(leC(code.tvarY, tv2)));
        BodyTypingResult<Level> r1 = BodyTypingResult.addConstraints(trivialResultForTesting(csets, first), cs1);
        BodyTypingResult<Level> result = BodyTypingResult.join(r1,
                                                               BodyTypingResult.addConstraints(trivialResultForTesting(csets, second), cs2), csets, tvars, "test"
        );

        TypeVar freshV = tvars.join(tv1, tv2);
        ConstraintSet<Level> cs = cs1.add(cs2).add(leC(tv1, freshV)).add(leC(tv2, freshV));
        ConstraintSet<Level> tmpcs = cs1.add(cs2).add(leC(tv1, freshV)).add(leC(tv2, freshV));
        BodyTypingResult<Level> expected = BodyTypingResult.addConstraints(trivialResultForTesting(csets, before.add(v, freshV)), cs);

        assertThat("Simple constraints problem: ", tmpcs.equals(cs), is(true));
        assertThat("Constraints problem: ", result.getConstraints(), is(expected.getConstraints()));
        assertThat("Effect problem: ", result.getEffects(), is(expected.getEffects()));
        assertThat("Other problem: (constraints)", result.constraints(), is(equalTo(expected.constraints())));
        assertThat("Other problem: (env)", result.getFinalEnv(), is(equalTo(expected.getFinalEnv())));

        assertThat(BodyTypingResult.join(BodyTypingResult.trivialCase(csets), r1, csets, tvars, "test"), is(r1));
        assertThat(BodyTypingResult.join(r1, BodyTypingResult.trivialCase(csets), csets, tvars, "test"), is(r1));
    }
}


text:
function MainWindow(navController) {

	var window = Ti.UI.createWindow({
		title: 'Bill Gates'
	});

	var tableview = new TableView(navController);

	window.add(tableview);

	navController.open(window);

	return window;

}

function TableView(navController) {

    var tableview = Ti.UI.createTableView();

    tableview.addEventListener('click', function(e) {

    });

    var httpClient = Ti.Network.createHTTPClient();

    httpClient.onload = function() {
    	var data = JSON.parse(this.responseText);
    	var rows = [];

    	for(var i=0; i<data.length; i++) {

    		var row = Ti.UI.createTableViewRow({
    			title: data[i].text
    		});

    		rows.push(row);

    	}

    	tableview.data = rows;
    }

    httpClient.open("GET", "http://api.twitter.com/1/statuses/user_timeline.json?screen_name=billgates");

    httpClient.send();

    return tableview;

}

exports.MainWindow = MainWindow;


text:
var defaultLocale = {
	1: 'one',
	2: 'two',
	3: 'three',
	4: 'four',
	5: 'five',
	6: 'six',
	7: 'seven',
	8: 'eight',
	9: 'nine',
	10: 'ten',
	11: 'eleven',
	12: 'twelve',
	13: 'thirteen',
	14: 'fourteen',
	15: 'fifteen',
	16: 'sixteen',
	17: 'seventeen',
	18: 'eighteen',
	19: 'ninteteen',
	20: 'twenty',
	30: 'thirty',
	40: 'forty',
	50: 'fifty',
	60: 'sixty',
	70: 'seventy',
	80: 'eighty',
	90: 'ninety',
	HUNDRED: 'hundred',
	THOUSAND: 'thousand',
	MILLION: 'million',
	BILLION: 'billion',
	TRILLION: 'trillion',
	DOLLARS: 'dollars',
	AND: 'and'
};
var grandsArray = ['','THOUSAND','MILLION','BILLION','TRILLION'];

var setupLocaleFn = function setupLocaleFn(localObj){
	return function(key){
    if (key === ''){return '';}
		if (localObj.hasOwnProperty(key)){
			return localObj[key];
		} else {
			throw new Error('textAmount.js: No Locale string provided for "' + key + '".');
		}
	};
};

var convertThousand = function convertThousand(amt, getLocaleText){
	var res = '';

	if (amt === 0){
		return '';
	}

	var hundred = Math.floor(amt / 100);
	res = (hundred > 0) ? getLocaleText(hundred) + ' ' + getLocaleText('HUNDRED') + ' ' : res;

	amt = amt % 100;
	if (amt === 0){
		return res;
	} else if (amt < 20){
		res += getLocaleText(amt) + ' ';
	} else {
		if (amt % 10 === 0){
			res += getLocaleText((Math.floor(amt / 10)) * 10) + ' ';
		} else {
			res += getLocaleText((Math.floor(amt / 10)) * 10) + '-' + getLocaleText(amt % 10) + ' ';
		}

	}

	return res;
}

/**
 * Convert a numeric value to a long-form written dollar amount
 *
 * @param {number || string} numeric value to convert to text
 * @param {object} (optional) object containing locale strings for overriding the defaultLocale object in its entirety
 * returns {string} text value of passed in number
 */
module.exports = function textAmount(amt, localeObj){
	var result = '',
	 grands = 0,
	 tmpStr,
   getLocaleText = setupLocaleFn(localeObj || defaultLocale);

	//first we verify the input value is valid and ensure it is a number
	var reg = /^\d+(\.\d+)?$/;
	if (!reg.test(amt)){
		throw new Error('textAmount.js: Invalid input. Please pass in a number value.');
	}
	amt = Number(amt);

  //check the range of acceptable values - limited by JavaScript's available precision
  if (amt < 0 || amt >= 1.0e13){
    throw new Error('textAmount.js: Invalid input. Please pass in a positive number less than 10 trillion.');
  }

	//get the cents part
	result = String(Math.round((amt % 1) * 100));
	result = (result.length > 1) ? result : '0' + result;
	result = result + '/100 ' + getLocaleText('DOLLARS');

	//get the dollars part
	if (amt >= 1.00){
		result = getLocaleText('AND') + ' ' + result;
		amt = Math.floor(amt);
		while (amt > 0){
			tmpStr = convertThousand(amt % 1000, getLocaleText);
			if (tmpStr.length > 0){
				result = tmpStr + getLocaleText(grandsArray[grands])
        + ((grandsArray[grands] === '') ? '' : ' ') + result;
			}
      amt = Math.floor(amt / 1000);
      grands++;
		}
	}

	//capitalize the first char of the result
  return String(result.substr(0,1).toUpperCase()) + String(result.substring(1));
};


text:
<DOCTYPE!>

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

	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

	<link rel="stylesheet" href="res/css/backendStyle.css" type="text/css" media="screen">

	<title>Billing | NCA</title>

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

		       </button>

News

Events

Donations

Gallery

						 Inbox

					Uahengo Jr.

My Profile

Subscriptions

Billing

Settings

Help

Privacy Policy

Log Out

These will be the announcment area for stuff that's coming up soon.

					    Personal settings

						Edit profile
						Account Settings
						Subscription
						Billing

Billing overview

									 Add payment method

Payment

								 No payment method on file.

									 Update information

Manage credit card

									 Contact board

								Billing support

Amounts shown in USD
Payment history

Order: UIGDVI-U317

   										 Generate Invoice

Dec 15, 2015 - Total price $10.00

Order: UIGDVI-U317

   										 Generate Invoice

Nov 15, 2015 - Total price $10.00

Order: UIGDVI-U317

   										 Generate Invoice

Oct 15, 2015 - Total price $10.00

Order: UIGDVI-U317

   										 Generate Invoice

Sept 15, 2015 - Total price $10.00

Order: UIGDVI-U317

   										 Generate Invoice

Aug 15, 2015 - Total price $10.00

Order: UIGDVI-U317

   										 Generate Invoice

Jul 15, 2015 - Total price $10.00

Help

Shop

About

© 2016 NCA ORG

Terms

Privacy

Security

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

Billing Support

Inovoice can be generated online

Inovoice can be generated online

Inovoice can be generated online

Inovoice can be generated online

Inovoice can be generated online

Inovoice can be generated online

Inovoice can be generated online

	        <button type="button" class="btn btn-default" data-dismiss="modal">
				Close
			</button>
	        <button type="button" class="btn btn-default">
				Done
			</button>


text:
var Inflector = require('../assets/js/inflector');
var assert = require('assert');

describe("inflector", function() {
  var inflector = new Inflector()

  it("should pluralize a unit", function() {
    var cups = inflector.plural('cup');
    assert.equal(cups, 'cups');
  });

  it("should singularize a unit", function() {
    var cup = inflector.singular('cups');
    assert.equal(cup, 'cup');
  });

  it("should pluralize a unit given a non-one number", function() {
    var string = inflector.pluralizeWithCount('cup', 2);
    assert.equal(string, 'cups');
  });

  it("shouldn't pluralize a unit given one", function() {
    var string = inflector.pluralizeWithCount('cup', 1);
    assert.equal(string, 'cup');
  });

  it("shouldn't pluralize an already pluralized number", function() {
    var string = inflector.pluralizeWithCount('cups', 2);
    assert.equal(string, 'cups');
  });

  it("shouldn't pluralize a number less than one", function() {
    var string = inflector.pluralizeWithCount('cup', 0.25);
    assert.equal(string, 'cup');
  });
});


text:
/*
 * Author : Mohsin Khan
 * LinkedIn : http://pk.linkedin.com/in/mohsinkhan26/
 * Github : https://github.com/mohsinkhan26/
 * BitBucket : https://bitbucket.org/mohsinkhan26/
*/
using UnityEngine;
using UnityEngine.UI;

namespace MK.UISprite
{
    public class Demo : MonoBehaviour
    {
        [SerializeField]
        Text message;
        [SerializeField]
        Text info;
        [SerializeField]
        GameObject[] spriteDemos;

        // Use this for initialization
        void Start()
        {
            message.text = "Press 0, 1, 2 or 3 to see UI Sprite Manager in action";
            info.text = "";
        }

        // Update is called once per frame
        void Update()
        {
            if (Input.GetKeyDown(KeyCode.Alpha0))
                ShowRespectiveSprites(0);
            else if (Input.GetKeyDown(KeyCode.Alpha1))
                ShowRespectiveSprites(1);
            else if (Input.GetKeyDown(KeyCode.Alpha2))
                ShowRespectiveSprites(2);
            else if (Input.GetKeyDown(KeyCode.Alpha3))
                ShowRespectiveSprites(3);
        }

        void ShowRespectiveSprites(int _keyPressed)
        {
            switch (_keyPressed)
            {
                case 0: // 0 is pressed
                    spriteDemos[0].SetActive(false);
                    spriteDemos[1].SetActive(false);
                    spriteDemos[2].SetActive(false);
                    info.text = "0 is pressed: Disable all sprites";
                    break;
                case 1: // 1 is pressed
                    spriteDemos[0].SetActive(true);
                    spriteDemos[1].SetActive(false);
                    spriteDemos[2].SetActive(false);
                    info.text = "1 is pressed: indivdual sprites";
                    break;
                case 2: // 2 is pressed
                    spriteDemos[0].SetActive(false);
                    spriteDemos[1].SetActive(true);
                    spriteDemos[2].SetActive(false);
                    info.text = "2 is pressed: sprites from spritesheet";
                    break;
                case 3: // 3 is pressed
                    spriteDemos[0].SetActive(false);
                    spriteDemos[1].SetActive(false);
                    spriteDemos[2].SetActive(true);
                    info.text = "3 is pressed: individual and spritesheet mixture";
                    break;
            }
        }
    }
}


text:
/* CellularModem.h */
/* Copyright (C) 2013 mbed.org, MIT License
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
 * and associated documentation files (the "Software"), to deal in the Software without restriction,
 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or
 * substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

#ifndef CELLULARMODEM_H_
#define CELLULARMODEM_H_

#include "core/fwk.h"
#include "at/ATCommandsInterface.h"

class CellularModem
{
public:
  //Internet-related functions

  /** Open a 3G internet connection
      @return 0 on success, error code on failure
  */
  virtual int connect(const char* apn = NULL, const char* user = NULL, const char* password = NULL) = 0;

  /** Close the internet connection
     @return 0 on success, error code on failure
  */
  virtual int disconnect() = 0;

  /** Send a SM
     @param number The receiver's phone number
     @param message The message to send
     @return 0 on success, error code on failure
   */
  virtual int sendSM(const char* number, const char* message) = 0;

  /** Receive a SM
     @param number Pointer to a buffer to store the sender's phone number (must be at least 17 characters-long, including the sapce for the null-terminating char)
     @param message Pointer to a buffer to store the the incoming message
     @param maxLength Maximum message length that can be stored in buffer (including null-terminating character)
     @return 0 on success, error code on failure
   */
  virtual int getSM(char* number, char* message, size_t maxLength) = 0;

  /** Get the number of SMs in the incoming box
     @param pCount pointer to store the number of unprocessed SMs on
     @return 0 on success, error code on failure
   */
  virtual int getSMCount(size_t* pCount) = 0;

  /** Get the ATCommandsInterface instance
    @return Pointer to the ATCommandsInterface instance
   */
  virtual ATCommandsInterface* getATCommandsInterface() = 0;

  /** Switch power on or off
    In order to use this function, a pin name must have been entered in the constructor
    @param enable true to switch the dongle on, false to switch it off
    @return 0 on success, error code on failure
  */
  virtual int power(bool enable) = 0;
};

#endif /* CELLULARMODEM_H_ */


text:
import React, { Dispatch, FC, FormEvent, SetStateAction } from 'react';
import { css } from 'emotion';
import { HorizontalGroup, RadioButtonGroup, stylesFactory, useTheme, Checkbox } from 'src/packages/datav-core/src/ui';
import { GrafanaTheme, SelectableValue } from 'src/packages/datav-core/src';
import { TagFilter } from 'src/views/components/TagFilter/TagFilter';
import { SearchSrv } from 'src/core/services/search';
import { DashboardQuery, SearchLayout } from '../types';
import { FormattedMessage } from 'react-intl';
import TeamPicker from 'src/views/components/Pickers/TeamPicker';

export const layoutOptions = [
  { value: SearchLayout.Folders, icon: 'folder' },
  { value: SearchLayout.List, icon: 'list-ul' },
];

const searchSrv = new SearchSrv();

type onSelectChange = (value: SelectableValue) => void;
interface Props {
  onLayoutChange: Dispatch<SetStateAction<string>>;
  onSortChange: onSelectChange;
  onStarredFilterChange?: (event: FormEvent<HTMLInputElement>) => void;
  onTagFilterChange: onSelectChange;
  onTeamChange: any
  query: DashboardQuery;
  showStarredFilter?: boolean;
  hideLayout?: boolean;
}

export const ActionRow: FC<Props> = ({
  onLayoutChange,
  onSortChange,
  onStarredFilterChange = () => {},
  onTagFilterChange,
  query,
  showStarredFilter,
  hideLayout,
  onTeamChange
}) => {
  const theme = useTheme();
  const styles = getStyles(theme);

  return (

        <HorizontalGroup spacing="md" width="auto">
          {!hideLayout ? (
            <RadioButtonGroup options={layoutOptions} onChange={onLayoutChange} value={query.layout} />
          ) : null}
          {/* <SortPicker onChange={onSortChange} value={query.sort} /> */}
        </HorizontalGroup>

      <HorizontalGroup spacing="md" width="auto">
        {showStarredFilter && (

            <Checkbox label={<FormattedMessage id="folder.filterStar"/> as any} onChange={onStarredFilterChange} />

        )}

        <TeamPicker value={query.teams} onChange={onTeamChange} mutiple allowClear/>
        <TagFilter isClearable tags={query.tag} tagOptions={searchSrv.getDashboardTags} onChange={onTagFilterChange} />

      </HorizontalGroup>

  );
};

ActionRow.displayName = 'ActionRow';

const getStyles = stylesFactory((theme: GrafanaTheme) => {
  return {
    actionRow: css`
      display: none;

      @media only screen and (min-width: ${theme.breakpoints.md}) {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: ${theme.spacing.lg} 0;
        width: 100%;
      }
    `,
    rowContainer: css`
      margin-right: ${theme.spacing.md};
    `,
    checkboxWrapper: css`
      label {
        line-height: 1.2;
      }
    `,
  };
});


text:
<!DOCTYPE html>

<meta charset="utf-8">
<meta name="HandheldFriendly" content="True">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer-when-downgrade">

<title>La vista cansada</title>
<meta name="description" content="">

<link rel="icon" type="image/x-icon" href="https://carlesbellver.github.io/favicon.ico">
<link rel="apple-touch-icon-precomposed" href="https://carlesbellver.github.io/favicon.png">

<link rel="stylesheet" href="https://carlesbellver.github.io/css/light.css?rnd=1602439751" />

<link rel="stylesheet" href="https://carlesbellver.github.io/css/style.css?rnd=1602439751" />

<meta property="og:title" content="" />
<meta property="og:description" content="📎 US spy lab hopes to geotag every outdoor photo on social media
Imagineu-vos que algú pogués escanejar totes les imatges de Facebook, Twitter i Instagram i, a continuació, determinar de manera instantània on es va fer cada una." />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://carlesbellver.github.io/2018/03/17/us-spy-lab.html" />
<meta property="article:published_time" content="2018-03-17T13:22:00+00:00" />
<meta property="article:modified_time" content="2018-03-17T13:22:00+00:00" />

<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content=""/>
<meta name="twitter:description" content="📎 US spy lab hopes to geotag every outdoor photo on social media
Imagineu-vos que algú pogués escanejar totes les imatges de Facebook, Twitter i Instagram i, a continuació, determinar de manera instantània on es va fer cada una."/>

    Anar al contingut principal

    La vista cansada

        Informació

        Etiquetes

📎 US spy lab hopes to geotag every outdoor photo on social media

Imagineu-vos que algú pogués escanejar totes les imatges de Facebook, Twitter i Instagram i, a continuació, determinar de manera instantània on es va fer cada una. La capacitat de combinar aquestes dades d'ubicació amb informació sobre qui apareix en aquestes fotos —i qualsevol contacte de xarxes socials que hi estigui vinculat—, permetria a les agències governamentals fer un seguiment ràpid dels grups terroristes que publiquen fotografies de propaganda. (I, en realitat, de qualsevol altra persona.)

2018-03-17

#retalls

Carles Bellver Torlà

    <button class="theme-switcher">
        Tema fosc
    </button>


text:
title: Observable.Latest<TSource>()
---
# Observable.Latest\<TSource\> Method

Samples the most recent value in an observable sequence.

**Namespace:**  [System.Reactive.Linq](System.Reactive.Linq/System.Reactive.Linq)
**Assembly:**  System.Reactive (in System.Reactive.dll)

## Syntax

```vb
'Declaration
<ExtensionAttribute> _
Public Shared Function Latest(Of TSource) ( _
    source As IObservable(Of TSource) _
) As IEnumerable(Of TSource)
```

```vb
'Usage
Dim source As IObservable(Of TSource)
Dim returnValue As IEnumerable(Of TSource)

returnValue = source.Latest()
```

```csharp
public static IEnumerable<TSource> Latest<TSource>(
    this IObservable<TSource> source
)
```

```c++
[ExtensionAttribute]
public:
generic<typename TSource>
static IEnumerable<TSource>^ Latest(
    IObservable<TSource>^ source
)
```

```fsharp
static member Latest :
        source:IObservable<'TSource> -> IEnumerable<'TSource>
```

```javascript
JScript does not support generic types and methods.
```

#### Type Parameters

- TSource
  The type of source.

#### Parameters

- source
  Type: [System.IObservable](https://msdn.microsoft.com/en-us/library/Dd990377)\<TSource\>
  The source observable sequence.

#### Return Value

Type: [System.Collections.Generic.IEnumerable](https://msdn.microsoft.com/en-us/library/9eekhta0)\<TSource\>
The enumerable sequence that returns the last sampled element upon each iteration and subsequently blocks until the next element in the observable source sequence becomes available.

#### Usage Note

In Visual Basic and C\#, you can call this method as an instance method on any object of type [IObservable](https://msdn.microsoft.com/en-us/library/Dd990377)\<TSource\>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [](https://msdn.microsoft.com/en-us/library/Bb384936) or [](https://msdn.microsoft.com/en-us/library/Bb383977).

## See Also

#### Reference

[Observable Class](Observable/Observable)

[System.Reactive.Linq Namespace](System.Reactive.Linq/System.Reactive.Linq)