text:
export {ALL} from './all';
export {NONE} from './none';
export {NormalisedPattern} from './normalised-pattern';
export {Pattern} from './pattern';
export {toIdentifierParts} from './to-identifier-parts';
export {toMatchFunction} from './to-match-function';
export {hasNamedCaptures} from './has-named-captures';
export {isSubsetOf} from './is-subset-of';
export {intersect} from './intersect';
export {Unreachable} from './unreachable';

redpajama_set_name: RedPajamaGithub


text:
//----------------------------------------------------------------------------
//  Copyright (C) 2008-2011  The IPython Development Team
//
//  Distributed under the terms of the BSD License.  The full license is in
//  the file COPYING, distributed as part of this software.
//----------------------------------------------------------------------------

//============================================================================
// CodeCell
//============================================================================
/**
 * An extendable module that provide base functionnality to create cell for notebook.
 * @module IPython
 * @namespace IPython
 * @submodule CodeCell
 */

/* local util for codemirror */
var posEq = function(a, b) {return a.line == b.line && a.ch == b.ch;}

/**
 *
 * function to delete until previous non blanking space character
 * or first multiple of 4 tabstop.
 * @private
 */
CodeMirror.commands.delSpaceToPrevTabStop = function(cm){
    var from = cm.getCursor(true), to = cm.getCursor(false), sel = !posEq(from, to);
    if (!posEq(from, to)) {cm.replaceRange("", from, to); return}
    var cur = cm.getCursor(), line = cm.getLine(cur.line);
    var tabsize = cm.getOption('tabSize');
    var chToPrevTabStop = cur.ch-(Math.ceil(cur.ch/tabsize)-1)*tabsize;
    var from = {ch:cur.ch-chToPrevTabStop,line:cur.line}
    var select = cm.getRange(from,cur)
    if( select.match(/^\ +$/) != null){
        cm.replaceRange("",from,cur)
    } else {
        cm.deleteH(-1,"char")
    }
};

var IPython = (function (IPython) {
    "use strict";

    var utils = IPython.utils;
    var key   = IPython.utils.keycodes;

    /**
     * A Cell conceived to write code.
     *
     * The kernel doesn't have to be set at creation time, in that case
     * it will be null and set_kernel has to be called later.
     * @class CodeCell
     * @extends IPython.Cell
     *
     * @constructor
     * @param {Object|null} kernel
     * @param {object|undefined} [options]
     *      @param [options.cm_config] {object} config to pass to CodeMirror
     */
    var CodeCell = function (kernel, options) {
        this.kernel = kernel || null;
        this.code_mirror = null;
        this.input_prompt_number = null;
        this.collapsed = false;
        this.cell_type = "code";

        var cm_overwrite_options  = {
            onKeyEvent: $.proxy(this.handle_codemirror_keyevent,this)
        };

        options = this.mergeopt(CodeCell, options, {cm_config:cm_overwrite_options});

        IPython.Cell.apply(this,[options]);

        var that = this;
        this.element.focusout(
            function() { that.auto_highlight(); }
        );
    };

    CodeCell.options_default = {
        cm_config : {
            extraKeys: {
                "Tab" :  "indentMore",
                "Shift-Tab" : "indentLess",
                "Backspace" : "delSpaceToPrevTabStop",
                "Cmd-/" : "toggleComment",
                "Ctrl-/" : "toggleComment"
            },
            mode: 'ipython',
            theme: 'ipython',
            matchBrackets: true
        }
    };

    CodeCell.prototype = new IPython.Cell();

    /**
     * @method auto_highlight
     */
    CodeCell.prototype.auto_highlight = function () {
        this._auto_highlight(IPython.config.cell_magic_highlight)
    };

    /** @method create_element */
    CodeCell.prototype.create_element = function () {
        IPython.Cell.prototype.create_element.apply(this, arguments);

        var cell =  $('

').addClass('cell border-box-sizing code_cell');
        cell.attr('tabindex','2');

        this.celltoolbar = new IPython.CellToolbar(this);

        var input = $('

').addClass('input');
        var vbox = $('
').addClass('vbox box-flex1')
        input.append($('
').addClass('prompt input_prompt'));
        vbox.append(this.celltoolbar.element);
        var input_area = $('
').addClass('input_area');
        this.code_mirror = CodeMirror(input_area.get(0), this.cm_config);
        $(this.code_mirror.getInputField()).attr("spellcheck", "false");
        vbox.append(input_area);
        input.append(vbox);
        var output = $('

');
        cell.append(input).append(output);
        this.element = cell;
        this.output_area = new IPython.OutputArea(output, true);

        // construct a completer only if class exist
        // otherwise no print view
        if (IPython.Completer !== undefined)
        {
            this.completer = new IPython.Completer(this);
        }
    };

    /**
     *  This method gets called in CodeMirror's onKeyDown/onKeyPress
     *  handlers and is used to provide custom key handling. Its return
     *  value is used to determine if CodeMirror should ignore the event:
     *  true = ignore, false = don't ignore.
     *  @method handle_codemirror_keyevent
     */
    CodeCell.prototype.handle_codemirror_keyevent = function (editor, event) {

        var that = this;
        // whatever key is pressed, first, cancel the tooltip request before
        // they are sent, and remove tooltip if any, except for tab again
        if (event.type === 'keydown' && event.which != key.TAB ) {
            IPython.tooltip.remove_and_cancel_tooltip();
        };

        var cur = editor.getCursor();
        if (event.keyCode === key.ENTER){
            this.auto_highlight();
        }

        if (event.keyCode === key.ENTER && (event.shiftKey || event.ctrlKey)) {
            // Always ignore shift-enter in CodeMirror as we handle it.
            return true;
        } else if (event.which === 40 && event.type === 'keypress' && IPython.tooltip.time_before_tooltip >= 0) {
            // triger on keypress (!) otherwise inconsistent event.which depending on plateform
            // browser and keyboard layout !
            // Pressing '(' , request tooltip, don't forget to reappend it
            // The second argument says to hide the tooltip if the docstring
            // is actually empty
            IPython.tooltip.pending(that, true);
        } else if (event.which === key.UPARROW && event.type === 'keydown') {
            // If we are not at the top, let CM handle the up arrow and
            // prevent the global keydown handler from handling it.
            if (!that.at_top()) {
                event.stop();
                return false;
            } else {
                return true;
            };
        } else if (event.which === key.ESC) {
            IPython.tooltip.remove_and_cancel_tooltip(true);
            return true;
        } else if (event.which === key.DOWNARROW && event.type === 'keydown') {
            // If we are not at the bottom, let CM handle the down arrow and
            // prevent the global keydown handler from handling it.
            if (!that.at_bottom()) {
                event.stop();
                return false;
            } else {
                return true;
            };
        } else if (event.keyCode === key.TAB && event.type == 'keydown' && event.shiftKey) {
                if (editor.somethingSelected()){
                    var anchor = editor.getCursor("anchor");
                    var head = editor.getCursor("head");
                    if( anchor.line != head.line){
                        return false;
                    }
                }
                IPython.tooltip.request(that);
                event.stop();
                return true;
        } else if (event.keyCode === key.TAB && event.type == 'keydown') {
            // Tab completion.
            //Do not trim here because of tooltip
            if (editor.somethingSelected()){return false}
            var pre_cursor = editor.getRange({line:cur.line,ch:0},cur);
            if (pre_cursor.trim() === "") {
                // Don't autocomplete if the part of the line before the cursor
                // is empty.  In this case, let CodeMirror handle indentation.
                return false;
            } else if ((pre_cursor.substr(-1) === "("|| pre_cursor.substr(-1) === " ") && IPython.config.tooltip_on_tab ) {
                IPython.tooltip.request(that);
                // Prevent the event from bubbling up.
                event.stop();
                // Prevent CodeMirror from handling the tab.
                return true;
            } else {
                event.stop();
                this.completer.startCompletion();
                return true;
            };
        } else {
            // keypress/keyup also trigger on TAB press, and we don't want to
            // use those to disable tab completion.
            return false;
        };
        return false;
    };

    // Kernel related calls.

    CodeCell.prototype.set_kernel = function (kernel) {
        this.kernel = kernel;
    }

    /**
     * Execute current code cell to the kernel
     * @method execute
     */
    CodeCell.prototype.execute = function () {
        this.output_area.clear_output(true, true, true);
        this.set_input_prompt('*');
        this.element.addClass("running");
        var callbacks = {
            'execute_reply': $.proxy(this._handle_execute_reply, this),
            'output': $.proxy(this.output_area.handle_output, this.output_area),
            'clear_output': $.proxy(this.output_area.handle_clear_output, this.output_area),
            'set_next_input': $.proxy(this._handle_set_next_input, this),
            'input_request': $.proxy(this._handle_input_request, this)
        };
        var msg_id = this.kernel.execute(this.get_text(), callbacks, {silent: false, store_history: true});
    };

    /**
     * @method _handle_execute_reply
     * @private
     */
    CodeCell.prototype._handle_execute_reply = function (content) {
        this.set_input_prompt(content.execution_count);
        this.element.removeClass("running");
        $([IPython.events]).trigger('set_dirty.Notebook', {value: true});
    }

    /**
     * @method _handle_set_next_input
     * @private
     */
    CodeCell.prototype._handle_set_next_input = function (text) {
        var data = {'cell': this, 'text': text}
        $([IPython.events]).trigger('set_next_input.Notebook', data);
    }

    /**
     * @method _handle_input_request
     * @private
     */
    CodeCell.prototype._handle_input_request = function (content) {
        this.output_area.append_raw_input(content);
    }

    // Basic cell manipulation.

    CodeCell.prototype.select = function () {
        IPython.Cell.prototype.select.apply(this);
        this.code_mirror.refresh();
        this.code_mirror.focus();
        this.auto_highlight();
        // We used to need an additional refresh() after the focus, but
        // it appears that this has been fixed in CM. This bug would show
        // up on FF when a newly loaded markdown cell was edited.
    };

    CodeCell.prototype.select_all = function () {
        var start = {line: 0, ch: 0};
        var nlines = this.code_mirror.lineCount();
        var last_line = this.code_mirror.getLine(nlines-1);
        var end = {line: nlines-1, ch: last_line.length};
        this.code_mirror.setSelection(start, end);
    };

    CodeCell.prototype.collapse = function () {
        this.collapsed = true;
        this.output_area.collapse();
    };

    CodeCell.prototype.expand = function () {
        this.collapsed = false;
        this.output_area.expand();
    };

    CodeCell.prototype.toggle_output = function () {
        this.collapsed = Boolean(1 - this.collapsed);
        this.output_area.toggle_output();
    };

    CodeCell.prototype.toggle_output_scroll = function () {
    this.output_area.toggle_scroll();
    };

    CodeCell.input_prompt_classical = function (prompt_value, lines_number) {
        var ns = prompt_value || " ";
        return 'In [' + ns + ']:'
    };

    CodeCell.input_prompt_continuation = function (prompt_value, lines_number) {
        var html = [CodeCell.input_prompt_classical(prompt_value, lines_number)];
        for(var i=1; i < lines_number; i++){html.push(['...:'])};
        return html.join('
')
    };

    CodeCell.input_prompt_function = CodeCell.input_prompt_classical;

    CodeCell.prototype.set_input_prompt = function (number) {
        var nline = 1
        if( this.code_mirror != undefined) {
           nline = this.code_mirror.lineCount();
        }
        this.input_prompt_number = number;
        var prompt_html = CodeCell.input_prompt_function(this.input_prompt_number, nline);
        this.element.find('div.input_prompt').html(prompt_html);
    };

    CodeCell.prototype.clear_input = function () {
        this.code_mirror.setValue('');
    };

    CodeCell.prototype.get_text = function () {
        return this.code_mirror.getValue();
    };

    CodeCell.prototype.set_text = function (code) {
        return this.code_mirror.setValue(code);
    };

    CodeCell.prototype.at_top = function () {
        var cursor = this.code_mirror.getCursor();
        if (cursor.line === 0 && cursor.ch === 0) {
            return true;
        } else {
            return false;
        }
    };

    CodeCell.prototype.at_bottom = function () {
        var cursor = this.code_mirror.getCursor();
        if (cursor.line === (this.code_mirror.lineCount()-1) && cursor.ch === this.code_mirror.getLine(cursor.line).length) {
            return true;
        } else {
            return false;
        }
    };

    CodeCell.prototype.clear_output = function (stdout, stderr, other) {
        this.output_area.clear_output(stdout, stderr, other);
    };

    // JSON serialization

    CodeCell.prototype.fromJSON = function (data) {
        IPython.Cell.prototype.fromJSON.apply(this, arguments);
        if (data.cell_type === 'code') {
            if (data.input !== undefined) {
                this.set_text(data.input);
                // make this value the starting point, so that we can only undo
                // to this state, instead of a blank cell
                this.code_mirror.clearHistory();
                this.auto_highlight();
            }
            if (data.prompt_number !== undefined) {
                this.set_input_prompt(data.prompt_number);
            } else {
                this.set_input_prompt();
            };
            this.output_area.fromJSON(data.outputs);
            if (data.collapsed !== undefined) {
                if (data.collapsed) {
                    this.collapse();
                } else {
                    this.expand();
                };
            };
        };
    };

    CodeCell.prototype.toJSON = function () {
        var data = IPython.Cell.prototype.toJSON.apply(this);
        data.input = this.get_text();
        data.cell_type = 'code';
        if (this.input_prompt_number) {
            data.prompt_number = this.input_prompt_number;
        };
        var outputs = this.output_area.toJSON();
        data.outputs = outputs;
        data.language = 'python';
        data.collapsed = this.collapsed;
        return data;
    };

    IPython.CodeCell = CodeCell;

    return IPython;
}(IPython));


text:
from __future__ import annotations

import numpy as np

from pandas.core.dtypes.base import register_extension_dtype
from pandas.core.dtypes.common import is_integer_dtype

from pandas.core.arrays.numeric import (
    NumericArray,
    NumericDtype,
)

class IntegerDtype(NumericDtype):
    """
    An ExtensionDtype to hold a single size & kind of integer dtype.

    These specific implementations are subclasses of the non-public
    IntegerDtype. For example we have Int8Dtype to represent signed int 8s.

    The attributes name & type are set when these subclasses are created.
    """

    _default_np_dtype = np.dtype(np.int64)
    _checker = is_integer_dtype

    @classmethod
    def construct_array_type(cls) -> type[IntegerArray]:
        """
        Return the array type associated with this dtype.

        Returns
        -------
        type
        """
        return IntegerArray

    @classmethod
    def _str_to_dtype_mapping(cls):
        return INT_STR_TO_DTYPE

    @classmethod
    def _safe_cast(cls, values: np.ndarray, dtype: np.dtype, copy: bool) -> np.ndarray:
        """
        Safely cast the values to the given dtype.

        "safe" in this context means the casting is lossless. e.g. if 'values'
        has a floating dtype, each value must be an integer.
        """
        try:
            return values.astype(dtype, casting="safe", copy=copy)
        except TypeError as err:
            casted = values.astype(dtype, copy=copy)
            if (casted == values).all():
                return casted

            raise TypeError(
                f"cannot safely cast non-equivalent {values.dtype} to {np.dtype(dtype)}"
            ) from err

class IntegerArray(NumericArray):
    """
    Array of integer (optional missing) values.

    .. versionchanged:: 1.0.0

       Now uses :attr:`pandas.NA` as the missing value rather
       than :attr:`numpy.nan`.

    .. warning::

       IntegerArray is currently experimental, and its API or internal
       implementation may change without warning.

    We represent an IntegerArray with 2 numpy arrays:

    - data: contains a numpy integer array of the appropriate dtype
    - mask: a boolean array holding a mask on the data, True is missing

    To construct an IntegerArray from generic array-like input, use
    :func:`pandas.array` with one of the integer dtypes (see examples).

    See :ref:`integer_na` for more.

    Parameters
    ----------
    values : numpy.ndarray
        A 1-d integer-dtype array.
    mask : numpy.ndarray
        A 1-d boolean-dtype array indicating missing values.
    copy : bool, default False
        Whether to copy the `values` and `mask`.

    Attributes
    ----------
    None

    Methods
    -------
    None

    Returns
    -------
    IntegerArray

    Examples
    --------
    Create an IntegerArray with :func:`pandas.array`.

    >>> int_array = pd.array([1, None, 3], dtype=pd.Int32Dtype())
    >>> int_array
    <IntegerArray>
    [1, <NA>, 3]
    Length: 3, dtype: Int32

    String aliases for the dtypes are also available. They are capitalized.

    >>> pd.array([1, None, 3], dtype='Int32')
    <IntegerArray>
    [1, <NA>, 3]
    Length: 3, dtype: Int32

    >>> pd.array([1, None, 3], dtype='UInt16')
    <IntegerArray>
    [1, <NA>, 3]
    Length: 3, dtype: UInt16
    """

    _dtype_cls = IntegerDtype

    # The value used to fill '_data' to avoid upcasting
    _internal_fill_value = 1
    # Fill values used for any/all
    _truthy_value = 1
    _falsey_value = 0

_dtype_docstring = """
An ExtensionDtype for {dtype} integer data.

.. versionchanged:: 1.0.0

   Now uses :attr:`pandas.NA` as its missing value,
   rather than :attr:`numpy.nan`.

Attributes
----------
None

Methods
-------
None
"""

# create the Dtype

@register_extension_dtype
class Int8Dtype(IntegerDtype):
    type = np.int8
    name = "Int8"
    __doc__ = _dtype_docstring.format(dtype="int8")

@register_extension_dtype
class Int16Dtype(IntegerDtype):
    type = np.int16
    name = "Int16"
    __doc__ = _dtype_docstring.format(dtype="int16")

@register_extension_dtype
class Int32Dtype(IntegerDtype):
    type = np.int32
    name = "Int32"
    __doc__ = _dtype_docstring.format(dtype="int32")

@register_extension_dtype
class Int64Dtype(IntegerDtype):
    type = np.int64
    name = "Int64"
    __doc__ = _dtype_docstring.format(dtype="int64")

@register_extension_dtype
class UInt8Dtype(IntegerDtype):
    type = np.uint8
    name = "UInt8"
    __doc__ = _dtype_docstring.format(dtype="uint8")

@register_extension_dtype
class UInt16Dtype(IntegerDtype):
    type = np.uint16
    name = "UInt16"
    __doc__ = _dtype_docstring.format(dtype="uint16")

@register_extension_dtype
class UInt32Dtype(IntegerDtype):
    type = np.uint32
    name = "UInt32"
    __doc__ = _dtype_docstring.format(dtype="uint32")

@register_extension_dtype
class UInt64Dtype(IntegerDtype):
    type = np.uint64
    name = "UInt64"
    __doc__ = _dtype_docstring.format(dtype="uint64")

INT_STR_TO_DTYPE: dict[str, IntegerDtype] = {
    "int8": Int8Dtype(),
    "int16": Int16Dtype(),
    "int32": Int32Dtype(),
    "int64": Int64Dtype(),
    "uint8": UInt8Dtype(),
    "uint16": UInt16Dtype(),
    "uint32": UInt32Dtype(),
    "uint64": UInt64Dtype(),
}


text:
package com.opengamma.strata.engine.marketdata;

import java.time.LocalDate;

import com.opengamma.strata.basics.market.MarketDataKey;
import com.opengamma.strata.basics.market.ObservableKey;
import com.opengamma.strata.collect.timeseries.LocalDateDoubleTimeSeries;
import com.opengamma.strata.engine.config.MarketDataRules;

/**
 * A source of market data provided to an engine function and used for a calculation across a single scenario.
 *

 * The set of data provided by this interface is a subset of the set provided by {@link ScenarioCalculationEnvironment}.
 * For example a function might request a USD discounting curve, but the scenario market data can contain
 * multiple curve groups, each with a USD discounting curve.
 *

 * Typically a set of {@link MarketDataRules} are used to choose the item of market data from the global set.
 */
public interface SingleCalculationMarketData {

  /**
   * Gets the valuation date of the market data.
   *

   * All values accessible through this interface have the same valuation date.
   *
   * @return the valuation dates of the calculation
   */
  public abstract LocalDate getValuationDate();

  /**
   * Returns the market data value identified by the specified key.
   *

   * The result will be a single piece of market data valid for the valuation date.
   * The value will be for the scenario that this object represents.
   *
   * @param key  key identifying the market data
   * @param <T>  type of the market data
   * @return the market data value
   * @throws RuntimeException if the value cannot be returned
   */
  public abstract <T> T getValue(MarketDataKey<T> key);

  /**
   * Returns the time series identified by the specified key.
   *
   * @param key  key identifying the market data
   * @return the time series
   * @throws RuntimeException if the time-series cannot be returned
   */
  public abstract LocalDateDoubleTimeSeries getTimeSeries(ObservableKey key);
}


text:
package com.salesmanager.core.business.repositories.tax;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.salesmanager.core.model.tax.taxrate.TaxRate;

public interface TaxRateRepository extends JpaRepository<TaxRate, Long> {

	@Query("select t from TaxRate t join fetch t.taxClass join fetch t.merchantStore tm join fetch t.country left join fetch t.zone left join fetch t.descriptions left join t.parent where tm.id=?1 order by t.taxPriority asc")
	List<TaxRate> findByStore(Integer id);

	@Query("select t from TaxRate t join fetch t.taxClass join fetch t.merchantStore tm join fetch t.country left join fetch t.zone left join fetch t.descriptions td left join t.parent where tm.id=?1 and td.language.id=?2 order by t.taxPriority asc")
	List<TaxRate> findByStoreAndLanguage(Integer id, Integer languageId);

	@Query("select t from TaxRate t join fetch t.taxClass join fetch t.merchantStore tm join fetch t.country left join fetch t.zone left join fetch t.descriptions td left join t.parent where tm.id=?1 and t.code=?2")
	TaxRate findByStoreAndCode(Integer id, String code);

	@Query("select t from TaxRate t join fetch t.taxClass join fetch t.merchantStore tm join fetch t.country left join fetch t.zone left join fetch t.descriptions td left join t.parent where tm.id=?1 and t.id=?2")
	TaxRate findByStoreAndId(Integer store, Long id);

	@Query("select t from TaxRate t join fetch t.taxClass join fetch t.merchantStore tm join fetch t.country left join fetch t.zone left join fetch t.descriptions td left join t.parent where t.id=?1")
	TaxRate findOne(Long id);

	@Query("select t from TaxRate t join fetch t.taxClass join fetch t.merchantStore tm join fetch t.country tc left join fetch t.zone tz left join fetch t.descriptions td left join t.parent where tm.id=?1 AND (tz.id=?2 OR tz IS NULL) and tc.id=?3 and td.language.id=?4 order by t.taxPriority asc")
	List<TaxRate> findByMerchantAndZoneAndCountryAndLanguage(Integer id, Long zoneId, Integer countryId, Integer languageId);

	@Query("select t from TaxRate t join fetch t.taxClass join fetch t.merchantStore tm join fetch t.country tc left join fetch t.zone tz left join fetch t.descriptions td left join t.parent where tm.id=?1 AND t.stateProvince=?2 and tc.id=?3 and td.language.id=?4 order by t.taxPriority asc")
	List<TaxRate> findByMerchantAndProvinceAndCountryAndLanguage(Integer id, String province, Integer countryId, Integer languageId);

}


text:
package de.thbingen.hiwi.lukas.a4gewinnt;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.LinearLayout;

public class MainActivity extends AppCompatActivity {

    LinearLayout[] linearLayouts = new LinearLayout[7];

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        linearLayouts[0] = (LinearLayout) findViewById(R.id.linearLayout1);
        linearLayouts[1] = (LinearLayout) findViewById(R.id.linearLayout2);
        linearLayouts[2] = (LinearLayout) findViewById(R.id.linearLayout3);
        linearLayouts[3] = (LinearLayout) findViewById(R.id.linearLayout4);
        linearLayouts[4] = (LinearLayout) findViewById(R.id.linearLayout5);
        linearLayouts[5] = (LinearLayout) findViewById(R.id.linearLayout6);
        linearLayouts[6] = (LinearLayout) findViewById(R.id.linearLayout7);

        for (int j = 0; j < linearLayouts.length; j++) {
            for (int i = 0; i<6;i++) {
                ImageView image = new ImageView(this);
                image.setImageDrawable(getResources().getDrawable(R.drawable.field));
                LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, 0, 1);
                linearLayouts[j].addView(image, params);
            }
        }
    }
}


text:
package org.ihtsdo.otf.ts.services.helpers;

/**
 * Generically something that will report progress to a listener.
 */
public interface ProgressReporter {

  /**
   * Adds a {@link ProgressListener}.
   * @param l the {@link ProgressListener}
   */
  public void addProgressListener(ProgressListener l);

  /**
   * Removes a {@link ProgressListener}.
   * @param l the {@link ProgressListener}
   */
  public void removeProgressListener(ProgressListener l);
}


text:
import React, { Component } from "react";
import UserDetails from "./UserDetails";

export default class UsersPage extends Component {
  constructor(props) {
    super(props);
  }
  render() {
    const { users, updateUser } = this.props;
    return (

Users Page

        <UserDetails id={this.props.id} users={users} updateUser={updateUser} />

    );
  }
}


text:
#ifndef _RDKAFKA_SASL_OAUTHBEARER_H_
#define _RDKAFKA_SASL_OAUTHBEARER_H_

void rd_kafka_oauthbearer_unsecured_token (rd_kafka_t *rk,
                                           const char *oauthbearer_config,
                                           void *opaque);

rd_kafka_resp_err_t
rd_kafka_oauthbearer_set_token0 (rd_kafka_t *rk,
                                 const char *token_value,
                                 int64_t md_lifetime_ms,
                                 const char *md_principal_name,
                                 const char **extensions,
                                 size_t extension_size,
                                 char *errstr, size_t errstr_size);

rd_kafka_resp_err_t
rd_kafka_oauthbearer_set_token_failure0 (rd_kafka_t *rk, const char *errstr);

int unittest_sasl_oauthbearer (void);

#endif /* _RDKAFKA_SASL_OAUTHBEARER_H_ */


text:
layout: base
title:  'Statistics of expl:poss in UD_Romanian-SiMoNERo'
udver: '2'
---

## Treebank Statistics: UD_Romanian-SiMoNERo: Relations: `expl:poss`

This relation is a language-specific subtype of <tt>expl</tt>.
There are also 3 other language-specific subtypes of `expl`: <tt>expl:impers</tt>, <tt>expl:pass</tt>, <tt>expl:pv</tt>.

38 nodes (0%) are attached to their parents as `expl:poss`.

38 instances of `expl:poss` (100%) are right-to-left (child precedes parent).
Average distance between parent and child is 1.44736842105263.

The following 1 pairs of parts of speech are connected with `expl:poss`: <tt>VERB</tt>-<tt>PRON</tt> (38; 100% instances).

~~~ conllu
# visual-style 4	bgColor:blue
# visual-style 4	fgColor:white
# visual-style 5	bgColor:blue
# visual-style 5	fgColor:white
# visual-style 5 4 expl:poss	color:blue
1	Unii	un	DET	Di3mpr---e	Case=Nom|Gender=Masc|Number=Plur|Person=3|Position=Prenom|PronType=Ind	3	det	_	_
2	nanici	nanic	NOUN	Ncmp-n	Definite=Ind|Gender=Masc|Number=Plur	3	amod	_	_
3	hipofizari	hipofizar	ADJ	Afpmp-n	Definite=Ind|Degree=Pos|Gender=Masc|Number=Plur	5	nsubj	_	_
4	își	sine	PRON	Px3--d--------w	Case=Dat|Person=3|PronType=Prs|Reflex=Yes|Strength=Weak	5	expl:poss	_	_
5	arată	arăta	VERB	Vmip3	Mood=Ind|Person=3|Tense=Pres|VerbForm=Fin	0	root	_	_
6	vârsta	vârstă	NOUN	Ncfsry	Case=Nom|Definite=Def|Gender=Fem|Number=Sing	5	obj	_	_
7	staturală	statural	ADJ	Afpfsrn	Case=Nom|Definite=Ind|Degree=Pos|Gender=Fem|Number=Sing	6	amod	_	SpaceAfter=No
8	,	,	PUNCT	COMMA	_	5	punct	_	_
9	și	și	CCONJ	Crssp	Polarity=Pos	12	cc	_	_
10	nu	nu	PART	Qz	Polarity=Neg	12	advmod	_	_
11	pe	pe	ADP	Spsa	AdpType=Prep|Case=Acc	12	case	_	_
12	cea	acela	PRON	Pd3fsr	Case=Nom|Gender=Fem|Number=Sing|Person=3|PronType=Dem	5	conj	_	_
13	cronologică	cronologic	ADJ	Afpfsrn	Case=Nom|Definite=Ind|Degree=Pos|Gender=Fem|Number=Sing	12	amod	_	SpaceAfter=No
14	.	.	PUNCT	PERIOD	_	5	punct	_	_

~~~


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

namespace Lib.Lib.Const
{
    public partial class StorageID
    {
        public sealed class Path
        {
            #region 常量

            /// <summary>
            /// 备份资源库
            /// </summary>
            public static readonly int BAK_RESOURCE_BUCKET_101 = 101;

            /// <summary>
            /// 主资源库
            /// </summary>
            public static readonly int MAIN_RESOURCE_BUCKET_201 = 201;
            #endregion
        }
    }

}


text:
layout: post
microblog: true
date: 2009-10-14 03:00 +0300
guid: http://desparoz.micro.blog/2009/10/14/t4859457714.html
---
Congrats to Jason Heller (@JasonDPG) for Photo in Todays Sydney Daily 	Telegraph [post.ly/8Vfl](http://post.ly/8Vfl)


text:
package ly.stealth.mesos.kafka

import org.apache.mesos.Protos.TaskState
import org.junit.{After, Before, Test}
import org.junit.Assert._
import java.util
import scala.collection.JavaConversions._
import java.io.{ByteArrayOutputStream, PrintStream}
import net.elodina.mesos.util.{Strings, Period}

class CliTest extends KafkaMesosTestCase {
  val out: ByteArrayOutputStream = new ByteArrayOutputStream()

  @Before
  override def before {
    super.before

    startHttpServer()
    Cli.api = Config.api
    Cli.out = new PrintStream(out, true)

    startZkServer()
  }

  @After
  override def after {
    Cli.out = System.out
    stopHttpServer()
    super.after
    stopZkServer()
  }

  @Test
  def help {
    exec("help")
    assertOutContains("Usage:")
    assertOutContains("scheduler")
    assertOutContains("broker")
    assertOutContains("topic")

    // command help
    for (command <- "help scheduler broker topic".split(" ")) {
      exec("help " + command)
      assertOutContains("Usage: " + command)
    }
  }

  @Test
  def broker_list{
    Scheduler.cluster.addBroker(new Broker("0"))
    Scheduler.cluster.addBroker(new Broker("1"))
    Scheduler.cluster.addBroker(new Broker("2"))

    exec("broker list")
    assertOutContains("brokers:")
    assertOutContains("id: 0")
    assertOutContains("id: 1")
    assertOutContains("id: 2")

    // when broker needs restart
    val broker = Scheduler.cluster.getBroker("0")
    broker.needsRestart = true
    exec("broker list")
    assertOutContains("(modified, needs restart)")
  }

  @Test
  def broker_add {
    exec("broker add 0 --cpus=0.1 --mem=128")
    assertOutContains("broker added:")
    assertOutContains("id: 0")
    assertOutContains("cpus:0.10, mem:128")

    assertEquals(1, Scheduler.cluster.getBrokers.size())
    val broker = Scheduler.cluster.getBroker("0")
    assertEquals(0.1, broker.cpus, 0.001)
    assertEquals(128, broker.mem)
  }

  @Test
  def broker_update {
    val broker = Scheduler.cluster.addBroker(new Broker("0"))

    exec("broker update 0 --failover-delay=10s --failover-max-delay=20s --options=log.dirs=/tmp/kafka-logs")
    assertOutContains("broker updated:")
    assertOutContains("delay:10s, max-delay:20s")
    assertOutContains("options: log.dirs=/tmp/kafka-logs")

    assertEquals(new Period("10s"), broker.failover.delay)
    assertEquals(new Period("20s"), broker.failover.maxDelay)
    assertEquals(Strings.parseMap("log.dirs=/tmp/kafka-logs"), broker.options)
  }

  @Test
  def broker_remove {
    Scheduler.cluster.addBroker(new Broker("0"))
    exec("broker remove 0")

    assertOutContains("broker 0 removed")
    assertNull(Scheduler.cluster.getBroker("0"))
  }

  @Test
  def broker_start_stop {
    val broker0 = Scheduler.cluster.addBroker(new Broker("0"))
    val broker1 = Scheduler.cluster.addBroker(new Broker("1"))

    exec("broker start * --timeout=0")
    assertOutContains("brokers scheduled to start:")
    assertOutContains("id: 0")
    assertOutContains("id: 1")
    assertTrue(broker0.active)
    assertTrue(broker1.active)

    exec("broker stop 0 --timeout=0")
    assertOutContains("broker scheduled to stop:")
    assertOutContains("id: 0")
    assertFalse(broker0.active)
    assertTrue(broker1.active)

    exec("broker stop 1 --timeout=0")
    assertOutContains("broker scheduled to stop:")
    assertOutContains("id: 1")
    assertFalse(broker0.active)
    assertFalse(broker1.active)
  }

  @Test
  def broker_start_stop_timeout {
    val broker = Scheduler.cluster.addBroker(new Broker("0"))
    try { exec("broker start 0 --timeout=1ms"); fail() }
    catch { case e: Cli.Error => assertTrue(e.getMessage, e.getMessage.contains("broker start timeout")) }
    assertTrue(broker.active)

    broker.task = new Broker.Task("id", "slave", "executor", "host", _state = Broker.State.RUNNING)
    try { exec("broker stop 0 --timeout=1ms"); fail() }
    catch { case e: Cli.Error => assertTrue(e.getMessage, e.getMessage.contains("broker stop timeout")) }
    assertFalse(broker.active)
  }

  @Test
  def broker_clone: Unit = {
    val broker = new Broker("0")
    broker.cpus = 5
    broker.options = Map("test" -> "abc")
    Scheduler.cluster.addBroker(broker)
    exec("broker clone 1 --source 0")

    val newBroker = Scheduler.cluster.getBroker("1")
    assertNotNull(newBroker)
    assertEquals(newBroker.id, "1")
    assertEquals(newBroker.cpus, 5, 0)
  }

  @Test(timeout = 60000)
  def broker_log: Unit = {
    // no broker
    assertCliErrorContains("broker log 0", "broker 0 not found")

    // broker isn't active or running
    val broker = Scheduler.cluster.addBroker(new Broker("0"))
    assertCliErrorContains("broker log 0", "broker 0 is not active")

    broker.active = true
    assertCliErrorContains("broker log 0", "broker 0 is not running")

    // not running when task is null
    assertCliErrorContains("broker log 0", "broker 0 is not running")

    import Broker.State._

    broker.task = new Broker.Task("id", "slave", "executor", "host")
    for(state <- Seq(STOPPED, STARTING, RUNNING, RECONCILING, STOPPING) if state != RUNNING) {
      broker.task.state = state
      assertCliErrorContains("broker log 0", "broker 0 is not running")
    }

    def setLogContent(content: String, delay: Period = new Period("100ms")) =
      new Thread {
        override def run(): Unit = {
          Thread.sleep(delay.ms)
          Scheduler.logs.keys().take(1).foreach { rid => Scheduler.logs.put(rid, Some(content)) }
        }
      }.start()

    setLogContent("something")
    // retrieve log only for active and running broker
    broker.task.state = RUNNING
    try { exec("broker log 0 --timeout 1s") }
    catch { case e: Cli.Error => fail("") }

    assertOutContains("something")

    // with name
    setLogContent("something with name")
    exec("broker log 0 --name server.log --timeout 1s")
    assertOutContains("something with name")

    // with lines
    setLogContent("something with lines")
    exec("broker log 0 --lines 200 --timeout 1s")
    assertOutContains("something with lines")

    // with name, lines
    setLogContent("something with name with lines with timeout")
    exec("broker log 0 --name controller.log --lines 300 --timeout 1s")
    assertOutContains("something with name with lines with timeout")

    // timed out
    assertCliErrorContains("broker log 0 --timeout 1s", "broker 0 log retrieve timeout")

    // disconnected
    Scheduler.disconnected(schedulerDriver)
    assertCliErrorContains("broker log 0 --timeout 1s", "disconnected from the master")
  }

  @Test
  def broker_restart: Unit = {
    exec("help broker")
    assertOutContains("restart    - restart broker")

    exec("help broker restart")
    assertOutContains("Restart broker")
    assertOutContains("Usage: broker restart <broker-expr> [options]")
    assertOutContains("--timeout")

    val broker0 = Scheduler.cluster.addBroker(new Broker("0"))
    val broker1 = Scheduler.cluster.addBroker(new Broker("1"))

    def started(broker: Broker) {
      Scheduler.resourceOffers(schedulerDriver, Seq(offer("slave" + broker.id, "cpus:2.0;mem:2048;ports:9042..65000")))
      Scheduler.statusUpdate(schedulerDriver, taskStatus(broker.task.id, TaskState.TASK_RUNNING, "slave" + broker.id + ":9042"))
      assertEquals(Broker.State.RUNNING, broker.task.state)
    }

    def stopped(broker: Broker): Unit = {
      Scheduler.resourceOffers(schedulerDriver, Seq(offer("cpus:0.01;mem:128;ports:0..1")))
      Scheduler.statusUpdate(schedulerDriver, taskStatus(Broker.nextTaskId(broker), TaskState.TASK_FINISHED))
      assertFalse(broker.active)
      assertNull(broker.task)
    }

    for(broker <- Scheduler.cluster.getBrokers) {
      exec("broker start " + broker.id + " --timeout 0s")
      started(broker)
    }

    // timeout
    assertCliErrorContains("broker restart * --timeout 200ms", "broker 0 timeout on stop")

    // restarted
    exec("broker start " + broker0.id + " --timeout 0s")
    started(broker0)

    delay("150ms") { stopped(broker0) }
    delay("250ms") { started(broker0) }
    delay("450ms") { stopped(broker1) }
    delay("650ms") { started(broker1) }
    exec("broker restart 0..1 --timeout 1s")
    assertOutContains("brokers restarted:")
    assertOutContains("id: 0")
    assertOutContains("id: 1")
  }

  @Test
  def topic_list {
    exec("topic list")
    assertOutContains("no topics")

    Scheduler.cluster.topics.addTopic("t0")
    Scheduler.cluster.topics.addTopic("t1")
    Scheduler.cluster.topics.addTopic("x")

    // list all
    exec("topic list")
    assertOutContains("topics:")
    assertOutContains("t0")
    assertOutContains("t1")
    assertOutContains("x")

    // name filtering
    exec("topic list t*")
    assertOutContains("t0")
    assertOutContains("t1")
    assertOutNotContains("x")
  }

  @Test
  def topic_add {
    exec("topic add t0")
    assertOutContains("topic added:")
    assertOutContains("name: t0")

    exec("topic list")
    assertOutContains("topic:")
    assertOutContains("name: t0")
    assertOutContains("partitions: 0:[0]")

    exec("topic add t1 --partition 2")
    exec("topic list t1")
    assertOutContains("topic:")
    assertOutContains("name: t1")
    assertOutContains("partitions: 0:[0], 1:[0]")
  }

  @Test
  def topic_update {
    Scheduler.cluster.topics.addTopic("t0")
    exec("topic update t0 --options=flush.ms=5000")
    assertOutContains("topic updated:")
    assertOutContains("name: t0")

    exec("topic list")
    assertOutContains("topic:")
    assertOutContains("t0")
    assertOutContains("flush.ms=5000")
  }

  @Test
  def topic_rebalance {
    val cluster: Cluster = Scheduler.cluster
    val rebalancer: Rebalancer = cluster.rebalancer

    cluster.addBroker(new Broker("0"))
    cluster.addBroker(new Broker("1"))
    assertFalse(rebalancer.running)

    cluster.topics.addTopic("t")
    exec("topic rebalance *")
    assertTrue(rebalancer.running)
    assertOutContains("Rebalance started")
  }

  @Test
  def usage_errors {
    // no command
    try { exec(""); fail() }
    catch { case e: Cli.Error => assertTrue(e.getMessage, e.getMessage.contains("command required")) }

    // no id
    try { exec("broker add"); fail()  }
    catch { case e: Cli.Error => assertTrue(e.getMessage, e.getMessage.contains("argument required")) }

    // invalid command
    try { exec("unsupported 0"); fail()  }
    catch { case e: Cli.Error => assertTrue(e.getMessage, e.getMessage.contains("unsupported command")) }
  }

  @Test
  def connection_refused {
    HttpServer.stop()
    try {
      try { exec("broker add 0"); fail()  }
      catch { case e: Cli.Error => assertTrue(e.getMessage, e.getMessage.contains("Connection refused")) }
    } finally {
      HttpServer.start()
    }
  }

  private def assertOutContains(s: String): Unit = assertTrue("" + out, out.toString.contains(s))
  private def assertOutNotContains(s: String): Unit = assertFalse("" + out, out.toString.contains(s))

  private def exec(cmd: String): Unit = {
    out.reset()

    val args = new util.ArrayList[String]()
    for (arg <- cmd.split(" "))
      if (!cmd.isEmpty) args.add(arg)
    Cli.exec(args.toArray(new Array[String](args.length)))
  }

  private def assertCliErrorContains(cmd: String, str: String) =
    try { exec(cmd); fail() }
    catch { case e: Cli.Error => assertTrue(e.getMessage, e.getMessage.contains(str)) }
}


text:
const $ = require('dekko');

$('lib')
  .isDirectory()
  .hasFile('index.js')
  .hasFile('index.d.ts');

$('lib/*')
  .filter((filename) => {
    return !filename.endsWith('index.js') && !filename.endsWith('index.d.ts');
  })
  .isDirectory()
  .filter((filename) => {
    return !filename.endsWith('style') && !filename.endsWith('_util');
  })
  .hasFile('index.js')
  .hasFile('index.d.ts')
  .hasDirectory('style');

$('lib/*/style')
  .hasFile('css.js')
  .hasFile('index.js');

$('lib/style')
  .hasFile('v2-compatible-reset.css');

// eslint-disable-next-line
console.log('`lib` directory is valid.');


text:
package org.apache.hadoop.hive.serde2.dynamic_type;

import java.io.Serializable;
import java.util.List;

import org.apache.hadoop.hive.serde2.SerDeException;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
import org.apache.thrift.TException;
import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.protocol.TStruct;

/**
 * DynamicSerDeStructBase.
 *
 */
public abstract class DynamicSerDeStructBase extends DynamicSerDeTypeBase
    implements Serializable {

  DynamicSerDeFieldList fieldList;

  public DynamicSerDeStructBase(int i) {
    super(i);
  }

  public DynamicSerDeStructBase(thrift_grammar p, int i) {
    super(p, i);
  }

  public abstract DynamicSerDeFieldList getFieldList();

  @Override
  public void initialize() {
    fieldList = getFieldList();
    fieldList.initialize();
  }

  @Override
  public boolean isPrimitive() {
    return false;
  }

  @Override
  public Class getRealType() {
    return List.class;
  }

  @Override
  public Object deserialize(Object reuse, TProtocol iprot)
      throws SerDeException, TException, IllegalAccessException {
    if (thrift_mode) {
      iprot.readStructBegin();
    }

    Object o = fieldList.deserialize(reuse, iprot);

    if (thrift_mode) {
      iprot.readStructEnd();
    }
    return o;
  }

  /**
   * serialize
   *
   * The way to serialize a Thrift "table" which in thrift land is really a
   * function and thus this class's name.
   *
   * @param o
   *          - this list should be in the order of the function's params for
   *          now. If we wanted to remove this requirement, we'd need to make it
   *          a List<Pair<String, Object>> with the String being the field name.
   *
   */
  @Override
  public void serialize(Object o, ObjectInspector oi, TProtocol oprot)
      throws TException, SerDeException, NoSuchFieldException, IllegalAccessException {
    if (thrift_mode) {
      oprot.writeStructBegin(new TStruct(name));
    }

    fieldList.serialize(o, oi, oprot);

    if (thrift_mode) {
      oprot.writeStructEnd();
    }
  }

}


text:
<!DOCTYPE html>

<meta charset="utf-8">
<title>Midwest Copier Exchange | Buy</title>
<link rel="stylesheet" media="all" href="../assets/css/plugins.min.css" type="text/css" />
<link rel="stylesheet" media="all" href="../assets/css/style.css" type="text/css" />

Skip to content

        <button class="menu-toggle secondary-menu-toggle">Menu</button>

OUR BUSINESSES

Midwest Copier Exchange

ARCOA eScrap

ARCOA ITAD

ARCOA Logistics

                    ABOUT ARCOA GROUP

                    CONTACT US

Exchange

                                Login

                                Sell

                                Buy

                                Services

Request Pickup

Please fill out the following information in as much detail as possible to give us an idea of your request. We will contact you for further details.

                                <form id="request-pickup" action="" method="GET">

                                            Company Name*
                                            <input type="text" name="company-name" class="company-name grid-100" required />

                                            Make*
                                            <select class="grid-100 materials" name="materials" required>
                                                <option></option>
                                            </select>

                                            Quantity*
                                            <input type="text" name="quantity" class="quantity grid-100" required />

                                            Anticipated Value*
                                            <select class="grid-100 value" name="value" required>
                                                <option></option>
                                            </select>

                                            Condition*
                                            <select class="grid-100 condition" name="condition" required>
                                                <option></option>
                                            </select>

                                            Desired Collection Date*
                                            <input type="date" name="date" class="date grid-100" required />

                                            Contact Name*
                                            <input type="text" name="company-name" class="company-name grid-100" required />

                                            Email Address*
                                            <input type="email" name="email" class="email grid-100" required />

                                            Phone Number*
                                            <input type="phone" name="phone" class="phone grid-100" required />

                                            Address*
                                            <input type="address" name="address" class="address grid-100" required />

                                            City: *
                                            <input type="text" name="city" class="city grid-100" required />

                                            State:*
                                            <input type="text" name="state" class="state grid-100" required />

                                            Zip Code:*
                                            <input type="text" name="zip-code" class="zip-code grid-100" required />

                                    Send
                                </form>

            Contact Us

MIDWEST COPIER EXCHANGE

3300 Washington St.

                            Waukegan, IL 60085

847-599-9001

                            Toll Free 800-487-6798

                            info@thinkarcoa.com

                                    <svg aria-labelledby="social-facebook" class="social-facebook" role="img">
                                        <title id="social-facebook">Facebook</title>
                                        <use xlink:href="../assets/images/symbol-defs.svg#social-facebook" xmlns:xlink="http://www.w3.org/1999/xlink">
                                        </use>
                                    </svg>

                                    <svg aria-labelledby="social-linkedin" class="social-linkedin" role="img">
                                        <title id="social-linkedin">Linkedin</title>
                                        <use xlink:href="../assets/images/symbol-defs.svg#social-linkedin" xmlns:xlink="http://www.w3.org/1999/xlink">
                                        </use>
                                    </svg>

                                    <svg aria-labelledby="social-twitter" class="social-twitter" role="img">
                                        <title id="social-twitter">Twitter</title>
                                        <use xlink:href="../assets/images/symbol-defs.svg#social-twitter" xmlns:xlink="http://www.w3.org/1999/xlink">
                                        </use>
                                    </svg>

                                    Buy

                                    Sell

                                    Login

©2017 ARCOA Group. All Rights Reserved.

                                    Privacy Policy

                ©2017 ARCOA Group. All Rights Reserved.

                Privacy Policy


text:
export class Entry {
  constructor() {}

  static decode(data) {

    return new Entry();
  }

  encode() {
    const data = {};

    return data;
  }
}


text:
<beans xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://docs.jboss.org/cdi/beans_1_0.xsd">

  <alternatives>
    <class>org.jbpm.services.cdi.producer.JAASUserGroupInfoProducer</class>
  </alternatives>

</beans>


text:
package org.gradle.test.performance.mediummonolithicjavaproject.p458;

import org.gradle.test.performance.mediummonolithicjavaproject.p457.Production9158;
import org.gradle.test.performance.mediummonolithicjavaproject.p457.Production9159;

import org.junit.Test;
import static org.junit.Assert.*;

public class Test9161 {
    Production9161 objectUnderTest = new Production9161();

    @Test
    public void testProperty0() {
        Production9158 value = new Production9158();
        objectUnderTest.setProperty0(value);
        assertEquals(value, objectUnderTest.getProperty0());
    }

    @Test
    public void testProperty1() {
        Production9159 value = new Production9159();
        objectUnderTest.setProperty1(value);
        assertEquals(value, objectUnderTest.getProperty1());
    }

    @Test
    public void testProperty2() {
        Production9160 value = new Production9160();
        objectUnderTest.setProperty2(value);
        assertEquals(value, objectUnderTest.getProperty2());
    }

    @Test
    public void testProperty3() {
        String value = "value";
        objectUnderTest.setProperty3(value);
        assertEquals(value, objectUnderTest.getProperty3());
    }

    @Test
    public void testProperty4() {
        String value = "value";
        objectUnderTest.setProperty4(value);
        assertEquals(value, objectUnderTest.getProperty4());
    }

    @Test
    public void testProperty5() {
        String value = "value";
        objectUnderTest.setProperty5(value);
        assertEquals(value, objectUnderTest.getProperty5());
    }

    @Test
    public void testProperty6() {
        String value = "value";
        objectUnderTest.setProperty6(value);
        assertEquals(value, objectUnderTest.getProperty6());
    }

    @Test
    public void testProperty7() {
        String value = "value";
        objectUnderTest.setProperty7(value);
        assertEquals(value, objectUnderTest.getProperty7());
    }

    @Test
    public void testProperty8() {
        String value = "value";
        objectUnderTest.setProperty8(value);
        assertEquals(value, objectUnderTest.getProperty8());
    }

    @Test
    public void testProperty9() {
        String value = "value";
        objectUnderTest.setProperty9(value);
        assertEquals(value, objectUnderTest.getProperty9());
    }

}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.Framework.Validators;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Net.Http;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using System.Web;

namespace Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.Framework
{
    /// The base class for all typed event requests.
    public abstract class AuthenticationEventRequestBase
    {
        private readonly Dictionary<string, string> queryParameters;
        /// Initializes a new instance of the <see cref="AuthenticationEventRequestBase" /> class.
        /// <param name="request">The HTTP request message.</param>
        internal AuthenticationEventRequestBase(HttpRequestMessage request)
        {
            HttpRequestMessage = request;
            queryParameters = HttpUtility.ParseQueryString(request.RequestUri.Query).ToDictionary();
        }

        internal HttpRequestMessage HttpRequestMessage { get; set; }

        /// Gets or sets the type.
        /// <value>The type.</value>
        [JsonPropertyName("type")]
        [Required]
        [AuthEventIdentifier]
        public string Type { get; set; } = string.Empty;

        /// Gets or sets the request status.
        /// <value>The request status.</value>
        [JsonPropertyName("requestStatus")]
        [JsonConverter(typeof(JsonStringEnumConverter))]
        [Required]
        public RequestStatusType RequestStatus { get; set; }

        /// Gets or sets the status message.
        /// <value>The status message.</value>
        [JsonPropertyName("statusMessage")]
        [Required]
        public string StatusMessage { get; set; } = string.Empty;

        /// Gets the query parameters passed from the http request message.
        /// <value>The query parameters.</value>
        [JsonPropertyName("queryParameters")]
        public Dictionary<string, string> QueryParameters { get { return queryParameters; } }

        /// Once an instance is created the framework will pass addition arguments to the created sub class for use.
        /// <param name="args">The arguments.</param>
        internal abstract void InstanceCreated(params object[] args);

        internal virtual void ParseInbound(AuthenticationEventJsonElement payload) { }

        /// Converts to string.
        /// <returns>A <see cref="string" /> that represents this instance.</returns>
        public override string ToString()
        {
            JsonSerializerOptions options = new JsonSerializerOptions();
            options.Converters.Add(new AuthenticationEventResponseConverterFactory());
            return JsonSerializer.Serialize((object)this, options);
        }

        internal virtual JsonSerializerOptions JsonSerializerOptions => new JsonSerializerOptions() { WriteIndented = true, PropertyNameCaseInsensitive = true };

        internal abstract AuthenticationEventResponse GetResponseObject();

        /// Set the response to Failed mode.
        /// <param name="exception">The exception to return in the response.</param>
        /// <param name="internalError">Throw 500 internal server error.</param>
        /// <returns>The Underlying AuthEventResponse.</returns>
        internal abstract Task<AuthenticationEventResponse> Failed(Exception exception, bool internalError);

        /// Set the response to Failed mode.
        /// <param name="exception">The exception to return in the response.</param>
        /// <returns>The Underlying AuthEventResponse.</returns>
        public Task<AuthenticationEventResponse> Failed(Exception exception)
        {
            return Failed(exception, false);
        }

        /// Validates the response and creates the IActionResult with the json payload based on the status of the request.
        /// <returns>IActionResult based on the EventStatus (UnauthorizedResult, BadRequestObjectResult or JsonResult).</returns>
        public abstract Task<AuthenticationEventResponse> Completed();
    }
}


text:
#include <sys/cdefs.h>
/*
 * client.c
 *
 *  \date       Sep 29, 2011
 *  \author    	Apache Celix Project Team
 *  \copyright	Apache License, Version 2.0
 */
#include <stdlib.h>
#include <stdio.h>

#include "bundle_activator.h"
#include "greeting_service.h"

celix_status_t bundleActivator_create(bundle_context_pt  __attribute__((unused)) context, void **userData) {
	*userData = NULL;
	return CELIX_SUCCESS;
}

celix_status_t bundleActivator_start(void __attribute__((unused)) * userData, bundle_context_pt ctx) {
	service_reference_pt ref = NULL;
	celix_status_t status = bundleContext_getServiceReference(ctx, (char *) GREETING_SERVICE_NAME, &ref);
	if (status == CELIX_SUCCESS) {
		if (ref == NULL) {
			printf("Greeting service reference not available\n");
		} else {
			greeting_service_pt greeting = NULL;
			bundleContext_getService(ctx, ref, (void *) &greeting);
			if (greeting == NULL){
				printf("Greeting service not available\n");
			} else {
				bool result;
				(*greeting->greeting_sayHello)(greeting->instance);
				bundleContext_ungetService(ctx, ref, &result);
			}
		}
	}
	return status;
}

celix_status_t bundleActivator_stop(void __attribute__((unused)) * userData, bundle_context_pt  __attribute__((unused)) context) {
	return CELIX_SUCCESS;
}

celix_status_t bundleActivator_destroy(void __attribute__((unused)) * userData, bundle_context_pt  __attribute__((unused)) context) {
	return CELIX_SUCCESS;
}


text:
include(AtomicCommon)

include_directories(${CMAKE_SOURCE_DIR}/Source/ThirdParty/Poco/Foundation/include)

add_definitions( -DATOMIC_NAVIGATION -DATOMIC_TBUI -DATOMIC_FILEWATCHER -DPOCO_NO_AUTOMATIC_LIBS -DPOCO_STATIC )

set (ATOMIC_LINK_LIBRARIES ${ATOMIC_LINK_LIBRARIES} LibCpuId SQLite)

# Check whether the CEF submodule is available
if (EXISTS ${CMAKE_SOURCE_DIR}/Submodules/CEF)
    set(ATOMIC_WEBVIEW TRUE)
    add_definitions( -DATOMIC_WEBVIEW )
    include("AtomicWebView")
endif()

include(AtomicNET)


text:
<!DOCTYPE html>

<title>How do I change participant roles within a site?</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="sakai.siteinfo" name="description">
<meta content="permissions, roles" name="search">
<link href="/library/skin/tool_base.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">
<link href="/library/skin/neo-default/tool.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">
<link href="/library/skin/neo-default/help.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">
<link href="/library/js/jquery/featherlight/0.4.0/featherlight.min.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">

How do I change participant roles within a site?

Note: To complete these steps, you must be assigned a role having the necessary permissions within the site.

Click Site Info in the Tool Menu of the relevant site.

Change the role from the drop-down menu in the list of enrolled participants.

              Zoom

Below your site's information, you will see its participant list.

Next to the participant(s) whose role(s) you want to change, select the appropriate role(s) from the drop-down menu(s) under "Role".

Click Update Participants to save your change.


text:
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <time.h>

#include <erl_nif.h>
#include "socket_dbg.h"

#define TSELF()            enif_thread_self()
#define TNAME(__T__)       enif_thread_name( __T__ )
#define TSNAME()           TNAME(TSELF())

static FILE* dbgout = NULL;

#if defined(CLOCK_REALTIME)
static int realtime(struct timespec* tsP);
static int timespec2str(char *buf, unsigned int len, struct timespec *ts);
#endif

extern
void esock_dbg_init(char* filename)
{
  if (filename != NULL) {
    if (strcmp(filename, ESOCK_DBGOUT_DEFAULT) == 0) {
      dbgout = stdout;
    } else if (strcmp(filename, ESOCK_DBGOUT_UNIQUE) == 0) {
      char template[] = "/tmp/esock-dbg-XXXXXX";
      dbgout = fdopen(mkstemp(template), "w+");
    } else {
      dbgout = fopen(filename, "w+");
    }
  } else {
    char template[] = "/tmp/esock-dbg-XXXXXX";
    dbgout = fdopen(mkstemp(template), "w+");
  }
}

/*
 * Print a debug format string *with* both a timestamp and the
 * the name of the *current* thread.
 */
extern
void esock_dbg_printf( const char* prefix, const char* format, ... )
{
  va_list         args;
  char            f[512 + sizeof(format)]; // This has to suffice...
#if defined(CLOCK_REALTIME)
  char            stamp[30];
  struct timespec ts;
#endif
  int             res;

  /*
   * We should really include self in the printout,
   * so we can se which process are executing the code.
   * But then I must change the API....something for later.
   */

#if defined(CLOCK_REALTIME)
  if (!realtime(&ts) &&
      (timespec2str(stamp, sizeof(stamp), &ts) == 0)) {
      res = enif_snprintf(f, sizeof(f), "%s [%s] [%s] %s",
                          prefix, stamp, TSNAME(), format);
  } else {
      res = enif_snprintf(f, sizeof(f), "%s [%s] %s",
                          prefix, TSNAME(), format);
  }
#else
  res = enif_snprintf(f, sizeof(f), "%s [%s] %s",
                      prefix, TSNAME(), format);
#endif

  if (res > 0) {
      va_start (args, format);
      enif_vfprintf (dbgout, f, args);
      va_end (args);
      fflush(stdout);
  }

  return;
}

#if defined(CLOCK_REALTIME)
static
int realtime(struct timespec* tsP)
{
    return clock_gettime(CLOCK_REALTIME, tsP);
}

/*
 * Convert a timespec struct into a readable/printable string
 */
static
int timespec2str(char *buf, unsigned int len, struct timespec *ts)
{
  int       ret, buflen;
  struct tm t;

  tzset();
  if (localtime_r(&(ts->tv_sec), &t) == NULL)
    return 1;

  ret = strftime(buf, len, "%F %T", &t);
  if (ret == 0)
    return 2;
  len -= ret - 1;
  buflen = strlen(buf);

  ret = snprintf(&buf[buflen], len, ".%06ld", ts->tv_nsec/1000);
  if (ret >= len)
    return 3;

  return 0;
}
#endif


text:
<?php
namespace Payum\Adyen\Tests\Action;

use Payum\Adyen\Action\NotifyAction;
use Payum\Adyen\Api;
use Payum\Core\Action\GatewayAwareAction;
use Payum\Core\ApiAwareInterface;
use Payum\Core\GatewayInterface;
use Payum\Core\Reply\HttpResponse;
use Payum\Core\Request\GetHttpRequest;
use Payum\Core\Request\Notify;
use Payum\Core\Tests\GenericActionTest;

class NotifyActionTest extends GenericActionTest
{
    protected $actionClass = NotifyAction::class;

    protected $requestClass = Notify::class;

    /**
     * @test
     */
    public function shouldBeSubClassOfGatewayAwareAction()
    {
        $rc = new \ReflectionClass(NotifyAction::class);

        $this->assertTrue($rc->isSubclassOf(GatewayAwareAction::class));
    }

    /**
     * @test
     */
    public function shouldImplementApiAwareInterface()
    {
        $rc = new \ReflectionClass(NotifyAction::class);

        $this->assertTrue($rc->implementsInterface(ApiAwareInterface::class));
    }

    /**
     * @test
     */
    public function shouldAllowSetApi()
    {
        $expectedApi = $this->createApiMock();

        $action = new NotifyAction();
        $action->setApi($expectedApi);

        $this->assertAttributeSame($expectedApi, 'api', $action);
    }

    /**
     * @test
     *
     * @expectedException \Payum\Core\Exception\UnsupportedApiException
     */
    public function throwIfUnsupportedApiGiven()
    {
        $action = new NotifyAction();

        $action->setApi(new \stdClass());
    }

    /**
     * @test
     */
    public function shouldSetErrorIfQueryDoesNotHaveMerchantReference()
    {
        $gatewayMock = $this->createGatewayMock();
        $gatewayMock
            ->expects($this->once())
            ->method('execute')
            ->with($this->isInstanceOf(GetHttpRequest::class))
            ->will($this->returnCallback(function(GetHttpRequest $request) {
                $request->request = [];
            }));

        $apiMock = $this->createApiMock();

        $action = new NotifyAction();
        $action->setGateway($gatewayMock);
        $action->setApi($apiMock);

        $action->execute($notify = new Notify([]));
        $model = $notify->getModel();
        $this->assertSame(401, $model['response_status']);
    }

    /**
     * @test
     */
    public function shouldSetErrorIfDetailsMerchantReferenceDoesNotExist()
    {
        $gatewayMock = $this->createGatewayMock();
        $gatewayMock
            ->expects($this->once())
            ->method('execute')
            ->with($this->isInstanceOf(GetHttpRequest::class))
            ->will($this->returnCallback(function(GetHttpRequest $request) {
                $request->request = [
                    'merchantReference' => 'SomeReference',
                ];
            }));

        $apiMock = $this->createApiMock();

        $action = new NotifyAction();
        $action->setGateway($gatewayMock);
        $action->setApi($apiMock);

        $details = new \ArrayObject([]);

        $action->execute($notify = new Notify($details));
        $model = $notify->getModel();
        $this->assertSame(402, $model['response_status']);
    }

    /**
     * @test
     */
    public function shouldSetErrorIfMerchantReferenceDoesNotMatchExpected()
    {
        $gatewayMock = $this->createGatewayMock();
        $gatewayMock
            ->expects($this->once())
            ->method('execute')
            ->with($this->isInstanceOf(GetHttpRequest::class))
            ->will($this->returnCallback(function(GetHttpRequest $request) {
                $request->request = [
                    'merchantReference' => 'SomeReference',
                ];
            }));

        $apiMock = $this->createApiMock();

        $action = new NotifyAction();
        $action->setGateway($gatewayMock);
        $action->setApi($apiMock);

        $details = new \ArrayObject([
            'merchantReference' => 'SomeReference2',
        ]);

        $action->execute($notify = new Notify($details));
        $model = $notify->getModel();
        $this->assertSame(402, $model['response_status']);
    }

    /**
     * @test
     */
    public function shouldSetErrorIfQuerySignDoesNotMatchExpected()
    {
        $gatewayMock = $this->createGatewayMock();
        $gatewayMock
            ->expects($this->once())
            ->method('execute')
            ->with($this->isInstanceOf(GetHttpRequest::class))
            ->will($this->returnCallback(function(GetHttpRequest $request) {
                $request->request = ['merchantReference' => 'SomeReference'];
            }));

        $apiMock = $this->createApiMock();
        $apiMock
            ->expects($this->once())
            ->method('verifyNotification')
            ->willReturn(false);

        $action = new NotifyAction();
        $action->setGateway($gatewayMock);
        $action->setApi($apiMock);

        $details = new \ArrayObject([
            'merchantReference' => 'SomeReference'
        ]);

        $action->execute($notify = new Notify($details));
        $model = $notify->getModel();
        $this->assertSame(403, $model['response_status']);
    }

    /**
     * @test
     */
    public function shouldSetRefusedIfNotificationCodeIsAuthorizedAndNotSuccess()
    {
        $gatewayMock = $this->createGatewayMock();
        $gatewayMock
            ->expects($this->once())
            ->method('execute')
            ->with($this->isInstanceOf(GetHttpRequest::class))
            ->will($this->returnCallback(function(GetHttpRequest $request) {
                $request->request = [
                    'merchantReference' => 'SomeReference',
                    'eventCode' => 'AUTHORISATION',
                    'success' => 'false',
                    'reason' => 'Reason',
                ];
            }));

        $apiMock = $this->createApiMock();
        $apiMock
            ->expects($this->once())
            ->method('verifyNotification')
            ->willReturn(true);

        $action = new NotifyAction();
        $action->setGateway($gatewayMock);
        $action->setApi($apiMock);

        $details = new \ArrayObject([
            'merchantReference' => 'SomeReference',
        ]);

        $action->execute($notify = new Notify($details));
        $model = $notify->getModel();
        $this->assertSame(200, $model['response_status']);
        $this->assertSame('REFUSED', $model['authResult']);
    }

    /**
     * @test
     */
    public function shouldSetAuthorisedIfNotificationCodeIsAuthorizedAndSuccess()
    {
        $gatewayMock = $this->createGatewayMock();
        $gatewayMock
            ->expects($this->once())
            ->method('execute')
            ->with($this->isInstanceOf(GetHttpRequest::class))
            ->will($this->returnCallback(function(GetHttpRequest $request) {
                $request->request = [
                    'merchantReference' => 'SomeReference',
                    'eventCode' => 'AUTHORISATION',
                    'success' => 'true',
                    'reason' => '',
                ];
            }));

        $apiMock = $this->createApiMock();
        $apiMock
            ->expects($this->once())
            ->method('verifyNotification')
            ->willReturn(true);

        $action = new NotifyAction();
        $action->setGateway($gatewayMock);
        $action->setApi($apiMock);

        $details = new \ArrayObject([
            'merchantReference' => 'SomeReference',
        ]);

        $action->execute($notify = new Notify($details));
        $model = $notify->getModel();
        $this->assertSame(200, $model['response_status']);
        $this->assertSame('AUTHORISED', $model['authResult']);
    }

    /**
     * @test
     */
    public function shouldSetOkIfVerifyRequestIsOk()
    {
        $gatewayMock = $this->createGatewayMock();
        $gatewayMock
            ->expects($this->once())
            ->method('execute')
            ->with($this->isInstanceOf(GetHttpRequest::class))
            ->will($this->returnCallback(function(GetHttpRequest $request) {
                $request->request = [
                    'merchantReference' => 'SomeReference',
                    'authResult' => 'result',
                ];
            }));

        $apiMock = $this->createApiMock();
        $apiMock
            ->expects($this->once())
            ->method('verifyNotification')
            ->willReturn(true);

        $action = new NotifyAction();
        $action->setGateway($gatewayMock);
        $action->setApi($apiMock);

        $details = new \ArrayObject([
            'merchantReference' => 'SomeReference',
        ]);

        $action->execute($notify = new Notify($details));
        $model = $notify->getModel();
        $this->assertSame(200, $model['response_status']);
        $this->assertSame('result', $model['authResult']);
    }

    /**
     * @return \PHPUnit_Framework_MockObject_MockObject|Api
     */
    protected function createApiMock()
    {
        return $this->getMock(Api::class, ['merchantSig', 'verifyNotification'], [], '', false);
    }

    /**
     * @return \PHPUnit_Framework_MockObject_MockObject|GatewayInterface
     */
    protected function createGatewayMock()
    {
        return $this->getMock(GatewayInterface::class);
    }
}


text:
<?xml version="1.0"?>

<!--
	This build file creates a minimal package of propel-generator files,
	builds a package.xml for installation using PEAR and creates the necessary TGZ file.

	It's pretty easy to build the PEAR package:

	$> cd /path/to/propel-generator
	$> phing -Dversion=1.0.0RC1 -f pear\build-pear-package.xml

-->

<project name="propel_generator" default="main">

	<property name="propelgen.home" value=".."/>
	<property name="build.base.dir" value="build"/>
	<property name="pkgname" value="${phing.project.name}-${version}"/>
	<property name="build.src.dir" value="${build.base.dir}/${pkgname}"/>

	<!-- some default properties -->
	<property name="notes"><![CDATA[
		This is a release of the 1.5 branch of the Propel Generator.
		See http://bit.ly/dskpCk for CHANGELOG.
	]]></property>
	<property name="state" value="stable"/>

	<taskdef
    name="pear-package"
    classname="BuildPropelGenPEARPackageTask" classpath="."/>

	<fileset dir="${propelgen.home}/lib" id="lib">
		<include name="**"/>
	</fileset>

	<fileset dir="${propelgen.home}/resources" id="resources">
		<include name="**"/>
	</fileset>

	<fileset dir="${propelgen.home}" id="root">
		<include name="build-propel.xml"/>
		<include name="default.properties"/>
	</fileset>

	<fileset dir="${propelgen.home}" id="pear">
		<include name="pear/pear-build.xml"/>
		<include name="pear/pear-propel*"/>
		<include name="pear/build.properties"/>
	</fileset>

	<!--
		==============================================
		Main entry point
		==============================================
	-->
	<target name="main" if="version" depends="versioncheck">
		<phingcall target="build"/>
		<phingcall target="pear-package"/>
		<phingcall target="tar"/>
	</target>

	<!--
	 ===================================================================
	 Target: checks if language was given, otherwise fail
	 ===================================================================
	-->
	<target name="versioncheck" unless="version">
		<echo message="====================================================="/>
		<echo message="Version not specified. You must enter a version. In"/>
		<echo message="the future you can add this to build.properties or"/>
		<echo message="enter it on the command line: "/>
		<echo message=" "/>
		<echo message="-Dversion=1.0.0"/>
		<echo message="====================================================="/>
		<input propertyname="version" promptChar=":">Propel version for package</input>

		<property name="pkgname" value="${phing.project.name}-${version}" override="true"/>
		<property name="build.src.dir" value="${build.base.dir}/${pkgname}" override="true"/>

	</target>

	<!--
		==============================================
		Copy the desired files into the build/ dir
		making sure to put them in the directory
		structure that will be needed for PEAR install
		==============================================
	-->
	<target name="build">
		<echo>-----------------------------</echo>
		<echo>| Creating directory layout |</echo>
		<echo>-----------------------------</echo>

		<delete dir="${build.base.dir}"/>
		<mkdir dir="${build.base.dir}"/>

		<copy todir="${build.src.dir}">
			<fileset refid="root"/>
			<fileset refid="pear"/>
		</copy>

		<copy todir="${build.src.dir}/lib">
			<fileset refid="lib"/>
		</copy>

		<copy todir="${build.src.dir}/resources">
			<fileset refid="resources"/>
		</copy>

		<!-- some files need to be manually moved here to save headache when
		doing the pear package.xml creation -->
		<move file="${build.src.dir}/pear/build.properties" todir="${build.src.dir}"/>
		<move file="${build.src.dir}/pear/pear-build.xml" todir="${build.src.dir}"/>
		<move file="${build.src.dir}/pear/pear-propel-gen" todir="${build.src.dir}"/>
		<move file="${build.src.dir}/pear/pear-propel-gen.bat" todir="${build.src.dir}"/>
    <delete dir="${build.src.dir}/pear/"/>

		<chmod file="${build.src.dir}/pear-propel-gen" mode="755"/>

	</target>

	<!--
		==============================================
		Create a PEAR package.xml which will guide the
		installation.
		==============================================
	-->
	<target name="pear-package">

		<echo>-----------------------------</echo>
		<echo>| Creating PEAR package.xml |</echo>
		<echo>-----------------------------</echo>
		<echo></echo>

		<pear-package dir="${build.src.dir}" destFile="${build.base.dir}/package.xml" version="${version}" state="${state}" notes="${notes}">

			<fileset dir="${build.src.dir}">
				<include name="**"/>
			</fileset>

		</pear-package>

	</target>

	<!--
		==============================================
		Create a tar.gz of the files, which will be
		installed by pear package manager.
		==============================================
	-->
	<target name="tar">
		<echo>-----------------------------</echo>
		<echo>| Creating tar.gz package   |</echo>
		<echo>-----------------------------</echo>
		<property name="tarfile" value="${build.base.dir}/${pkgname}.tgz"/>
		<delete	file="${tarfile}"/>
		<tar destFile="${tarfile}" basedir="${build.base.dir}" />
	</target>

</project>


text:
HVAC implements a switch interface, ie:

```
get() : number
set(value: number|boolean) : void
```

### Commands

```
turnOn(): void
turnOff(): void
```


text:
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { TranslateModule } from '@ngx-translate/core';
import { CoreCoursesCoursePreviewPage } from './course-preview';
import { CoreComponentsModule } from '@components/components.module';
import { CoreDirectivesModule } from '@directives/directives.module';
import { CorePipesModule } from '@pipes/pipes.module';

@NgModule({
    declarations: [
        CoreCoursesCoursePreviewPage,
    ],
    imports: [
        CoreComponentsModule,
        CoreDirectivesModule,
        CorePipesModule,
        IonicPageModule.forChild(CoreCoursesCoursePreviewPage),
        TranslateModule.forChild()
    ],
})
export class CoreCoursesCoursePreviewPageModule {}


text:
import java.util.Scanner;

public class p08_OddEvenSum {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);

		int firstNum = Integer.parseInt(scanner.nextLine());
		int evenSum = 0;
		int oddSum = 0;

		for (int i = 0; i < firstNum; i++) {
			int num = Integer.parseInt(scanner.nextLine());
			if (i % 2 == 0){
				evenSum += num;
			}else{
				oddSum += num;
			}
		}
		if (evenSum == oddSum){
			System.out.println("Yes");
			System.out.println("Sum = " + evenSum);

		}else{
			System.out.println("No");
			System.out.println("Diff = " + Math.abs(evenSum - oddSum));
		}

	}
}


text:
import * as React from 'react';
import { Button, Modal } from 'react-bootstrap';
import BaseModal from './BaseModal';

export type ConfirmationModalStateProps = {
    abortText: string
    , confirmText: string
    , title: string
    , children: any
    , destructive: boolean
    , warning: boolean
    , show: boolean
    , onConfirm: (isConfirmed: boolean) => void
}
export type ConfirmationModalDispatchProps = {
    onHide: () => void
}

type OwnProps = ConfirmationModalDispatchProps & ConfirmationModalStateProps;

class ConfirmationModal extends React.Component<OwnProps, null> {
    constructor(props: OwnProps) {
        super(props);

        this.handleConfirm = this.handleConfirm.bind(this);
    }

    handleConfirm(isConfirmed: boolean) {
        this.props.onHide();
        this.props.onConfirm(isConfirmed);
    }

    render() {
        const buttons = [
            <Button key="cancelButton" onClick={() => this.handleConfirm(false)}>{this.props.abortText || "Cancel"}</Button>
            , <Button key="confirmButton" bsStyle={this.props.destructive ? "danger" : this.props.warning ? "warning" : "primary"} onClick={() => this.handleConfirm(true)}>{this.props.confirmText || "OK"}</Button>
        ]

        const modalProps = {
            buttons
            , onHide: () => this.handleConfirm(false)
            , show: this.props.show
            , title: this.props.title
            , className: 'alert'
            , children: <span dangerouslySetInnerHTML={{ __html: this.props.children }} />
        }

        return <BaseModal
            {...modalProps}
        />;
    }
}

export default ConfirmationModal;


text:
'use strict';

var Logger = require('./logger.js');
var File = require('./backends/file.js');
var Disk = require('./backends/disk.js');
var Kafka = require('./backends/kafka.js');
var Sentry = require('./backends/sentry.js');
var Console = require('./backends/console.js');

createLogger.defaultBackends = defaultBackends;
createLogger.File = File;
createLogger.Disk = Disk;
createLogger.Kafka = Kafka;
createLogger.Sentry = Sentry;
createLogger.Console = Console;
createLogger.Access = Disk;

module.exports = createLogger;

function createLogger(opts) {
    var backends = opts && opts.backends;
    var logger;

    var _isDefaultBackends = backends &&
        backends._isDefaultBackends;

    if (_isDefaultBackends) {
        delete backends._isDefaultBackends;
    }

    logger = Logger(opts);

    if (_isDefaultBackends) {
        Object.keys(backends).forEach(function hookEvents(key) {
            var backend = backends[key];

            if (!backend || typeof backend.on !== 'function') {
                return;
            }

            backend.on('info', logger.info.bind(logger));
            backend.on('warn', logger.warn.bind(logger));
        });
    }

    return logger;
}

function defaultBackends(config, clients) {
    config = config || {};
    clients = clients || {};

    return {
        _isDefaultBackends: true,
        file: config.logFile ? File({
            fileName: config.logFile
        }) : null,
        disk: config.logFolder ? Disk({
            folder: config.logFolder,
            json: config.json || false
        }) : null,
        kafka: config.kafka ? Kafka({
            leafHost: config.kafka.leafHost,
            leafPort: config.kafka.leafPort,
            batching: config.kafka.batching,
            proxyHost: config.kafka.proxyHost,
            proxyPort: config.kafka.proxyPort,
            blacklistMigrator: config.kafka.blacklistMigrator,
            blacklistMigratorUrl: config.kafka.blacklistMigratorUrl,
            isDisabled: clients.isKafkaDisabled,
            statsd: config.kafka.statsd,
            kafkaClient: clients.kafkaClient
        }) : null,
        console: config.console ? Console({
            raw: config.raw || false
        }) : null,
        sentry: config.sentry ? Sentry({
            dsn: config.sentry.id,
            statsd: clients.statsd
        }) : null,
        access: config.access ? Disk({
            folder: config.access.logFolder,
            json: config.json || false
        }) : null
    };
}


text:
package org.wso2.carbon.identity.application.authentication.framework;

public interface LocalApplicationAuthenticator extends ApplicationAuthenticator {

}


text:
'use strict';

var util = require( './util' );
var define = require( './define' );
var Collection = require( './collection' );
var Core = require( './core' );
var incExts = require( './extensions' );
var is = require( './is' );

// registered extensions to cytoscape, indexed by name
var extensions = {};

// registered modules for extensions, indexed by name
var modules = {};

function setExtension( type, name, registrant ){

  var ext = registrant;

  var overrideErr = function( field ){
    util.error( 'Can not register `' + name + '` for `' + type + '` since `' + field + '` already exists in the prototype and can not be overridden' );
  };

  if( type === 'core' ){
    if( Core.prototype[ name ] ){
      return overrideErr( name );
    } else {
      Core.prototype[ name ] = registrant;
    }

  } else if( type === 'collection' ){
    if( Collection.prototype[ name ] ){
      return overrideErr( name );
    } else {
      Collection.prototype[ name ] = registrant;
    }

  } else if( type === 'layout' ){
    // fill in missing layout functions in the prototype

    var Layout = function( options ){
      this.options = options;

      registrant.call( this, options );

      // make sure layout has _private for use w/ std apis like .on()
      if( !is.plainObject( this._private ) ){
        this._private = {};
      }

      this._private.cy = options.cy;
      this._private.listeners = [];
    };

    var layoutProto = Layout.prototype = Object.create( registrant.prototype );

    var optLayoutFns = [];

    for( var i = 0; i < optLayoutFns.length; i++ ){
      var fnName = optLayoutFns[ i ];

      layoutProto[ fnName ] = layoutProto[ fnName ] || function(){ return this; };
    }

    // either .start() or .run() is defined, so autogen the other
    if( layoutProto.start && !layoutProto.run ){
      layoutProto.run = function(){ this.start(); return this; };
    } else if( !layoutProto.start && layoutProto.run ){
      layoutProto.start = function(){ this.run(); return this; };
    }

    if( !layoutProto.stop ){
      layoutProto.stop = function(){
        var opts = this.options;

        if( opts && opts.animate ){
          var anis = this.animations;
          for( var i = 0; i < anis.length; i++ ){
            anis[ i ].stop();
          }
        }

        this.trigger( 'layoutstop' );

        return this;
      };
    }

    if( !layoutProto.destroy ){
      layoutProto.destroy = function(){
        return this;
      };
    }

    layoutProto.on = define.on( { layout: true } );
    layoutProto.one = define.on( { layout: true, unbindSelfOnTrigger: true } );
    layoutProto.once = define.on( { layout: true, unbindAllBindersOnTrigger: true } );
    layoutProto.off = define.off( { layout: true } );
    layoutProto.trigger = define.trigger( { layout: true } );

    define.eventAliasesOn( layoutProto );

    ext = Layout; // replace with our wrapped layout

  } else if( type === 'renderer' && name !== 'null' && name !== 'base' ){
    // user registered renderers inherit from base

    var BaseRenderer = getExtension( 'renderer', 'base' );
    var bProto = BaseRenderer.prototype;
    var RegistrantRenderer = registrant;
    var rProto = registrant.prototype;

    var Renderer = function(){
      BaseRenderer.apply( this, arguments );
      RegistrantRenderer.apply( this, arguments );
    };

    var proto = Renderer.prototype;

    for( var pName in bProto ){
      var pVal = bProto[ pName ];
      var existsInR = rProto[ pName ] != null;

      if( existsInR ){
        return overrideErr( pName );
      }

      proto[ pName ] = pVal; // take impl from base
    }

    for( var pName in rProto ){
      proto[ pName ] = rProto[ pName ]; // take impl from registrant
    }

    bProto.clientFunctions.forEach( function( name ){
      proto[ name ] = proto[ name ] || function(){
        util.error( 'Renderer does not implement `renderer.' + name + '()` on its prototype' );
      };
    } );

    ext = Renderer;

  }

  return util.setMap( {
    map: extensions,
    keys: [ type, name ],
    value: ext
  } );
}

function getExtension( type, name ){
  return util.getMap( {
    map: extensions,
    keys: [ type, name ]
  } );
}

function setModule( type, name, moduleType, moduleName, registrant ){
  return util.setMap( {
    map: modules,
    keys: [ type, name, moduleType, moduleName ],
    value: registrant
  } );
}

function getModule( type, name, moduleType, moduleName ){
  return util.getMap( {
    map: modules,
    keys: [ type, name, moduleType, moduleName ]
  } );
}

var extension = function(){
  // e.g. extension('renderer', 'svg')
  if( arguments.length === 2 ){
    return getExtension.apply( null, arguments );
  }

  // e.g. extension('renderer', 'svg', { ... })
  else if( arguments.length === 3 ){
    return setExtension.apply( null, arguments );
  }

  // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse')
  else if( arguments.length === 4 ){
    return getModule.apply( null, arguments );
  }

  // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse', { ... })
  else if( arguments.length === 5 ){
    return setModule.apply( null, arguments );
  }

  else {
    util.error( 'Invalid extension access syntax' );
  }

};

// allows a core instance to access extensions internally
Core.prototype.extension = extension;

// included extensions
incExts.forEach( function( group ){
  group.extensions.forEach( function( ext ){
    setExtension( group.type, ext.name, ext.impl );
  } );
} );

module.exports = extension;


text:
/**
 * Created by at15 on 15-12-25.
 */
package io.dongyue.at15.tree.indexer.backend.standalone;


text:
        Gigaband

Home

Signup

Login