text:
package liquibase.change;

import liquibase.exception.UnexpectedLiquibaseException;
import liquibase.parser.core.ParsedNode;
import liquibase.parser.core.ParsedNodeException;
import liquibase.resource.ResourceAccessor;
import liquibase.serializer.AbstractLiquibaseSerializable;
import liquibase.util.StringUtil;

/**
 * The standard configuration used by Change classes to represent a constraints on a column.
 */
public class ConstraintsConfig extends AbstractLiquibaseSerializable {

    private Boolean nullable;
    private String notNullConstraintName;
    private Boolean primaryKey;
    private String primaryKeyName;
    private String primaryKeyTablespace;
    private String references;
    private String referencedTableCatalogName;
    private String referencedTableSchemaName;
    private String referencedTableName;
    private String referencedColumnNames;
    private Boolean unique;
    private String uniqueConstraintName;
    private String checkConstraint;
    private Boolean deleteCascade;
    private String foreignKeyName;
    private Boolean initiallyDeferred;
    private Boolean deferrable;
    private Boolean validateNullable;
    private Boolean validateUnique;
    private Boolean validatePrimaryKey;
    private Boolean validateForeignKey ;

    /**
     * Returns if the column should be nullable. Returns null if unspecified.
     */
    public Boolean isNullable() {
        return nullable;
    }

    public ConstraintsConfig setNullable(Boolean nullable) {
        this.nullable = nullable;
        return this;
    }

    /**
     * Set the nullable parameter based on the passed string.
     * Sets true if the passed string is 1 or true or TRUE.
     * Sets false if the passed string is 0 or false or FALSE.
     * Sets null if the passed string is null or "null" or "NULL".
     * Throws an {@link UnexpectedLiquibaseException} if a different value is passed
     */
    public ConstraintsConfig setNullable(String nullable) {
        this.nullable = parseBoolean(nullable);

        return this;
    }

    /**
     * If {@link #isNullable()} is 'false' and database supports named not null constraints
     * @return not null constraint name
     * @see #getUniqueConstraintName()
     */
    public String getNotNullConstraintName() {
        return notNullConstraintName;
    }

    public ConstraintsConfig setNotNullConstraintName(String notNullConstraintName) {
        this.notNullConstraintName = notNullConstraintName;
        return this;
    }

    /**
     * Returns true if the column should be part of the primary key. Returns null if unspecified
     */
    public Boolean isPrimaryKey() {
        return primaryKey;
    }

    public ConstraintsConfig setPrimaryKey(Boolean primaryKey) {
        this.primaryKey = primaryKey;
        return this;
    }

    /**
     * Set the primaryKey parameter based on the passed string.
     * Sets true if the passed string is 1 or true or TRUE.
     * Sets false if the passed string is 0 or false or FALSE.
     * Sets null if the passed string is null or "null" or "NULL".
     * Throws an {@link UnexpectedLiquibaseException} if a different value is passed
     */
    public ConstraintsConfig setPrimaryKey(String primaryKey) {
        this.primaryKey = parseBoolean(primaryKey);

        return this;
    }

    /**
     * Returns the name to use for the primary key constraint. Returns null if not specified
     */
    public String getPrimaryKeyName() {
        return primaryKeyName;
    }

    public ConstraintsConfig setPrimaryKeyName(String primaryKeyName) {
        this.primaryKeyName = primaryKeyName;
        return this;
    }

    /**
     * Returns the "references" clause to use for the foreign key. Normally a string of the format TABLE(COLUMN_NAME).
     * Returns null if not specified
     */
    public String getReferences() {
        return references;
    }

    public ConstraintsConfig setReferences(String references) {
        this.references = references;
        return this;
    }

    /**
     * Returns if the column is part of a unique constraint. Returns null if not specified
     */
    public Boolean isUnique() {
        return unique;
    }

    public ConstraintsConfig setUnique(Boolean unique) {
        this.unique = unique;
        return this;
    }

    /**
     * Set the unique parameter based on the passed string.
     * Sets true if the passed string is 1 or true or TRUE.
     * Sets false if the passed string is 0 or false or FALSE.
     * Sets null if the passed string is null or "null" or "NULL".
     * Throws an {@link UnexpectedLiquibaseException} if a different value is passed
     */
    public ConstraintsConfig setUnique(String unique) {
        this.unique = parseBoolean(unique);

        return this;
    }

    /**
     * Returns the name to use for the unique constraint. Returns null if not specified
     */
    public String getUniqueConstraintName() {
        return uniqueConstraintName;
    }

    public ConstraintsConfig setUniqueConstraintName(String uniqueConstraintName) {
        this.uniqueConstraintName = uniqueConstraintName;
        return this;
    }

    /**
     * Returns the check constraint to use on this column. Returns null if not specified
     */
    public String getCheckConstraint() {
        return checkConstraint;
    }

    public ConstraintsConfig setCheckConstraint(String checkConstraint) {
        this.checkConstraint = checkConstraint;
        return this;
    }

    /**
     * Returns if a foreign key defined for this column should cascade deletes. Returns null if not specified.
     */
    public Boolean isDeleteCascade() {
        return deleteCascade;
    }

    public ConstraintsConfig setDeleteCascade(Boolean deleteCascade) {
        this.deleteCascade = deleteCascade;
        return this;
    }

    /**
     * Set the deleteCascade parameter based on the passed string.
     * Sets true if the passed string is 1 or true or TRUE.
     * Sets false if the passed string is 0 or false or FALSE.
     * Sets null if the passed string is null or "null" or "NULL".
     * Throws an {@link UnexpectedLiquibaseException} if a different value is passed
     */
    public ConstraintsConfig setDeleteCascade(String deleteCascade) {
        this.deleteCascade = parseBoolean(deleteCascade);

        return this;
    }

    /**
     * Returns the name to use for the columns foreign key constraint. Returns null if not specified.
     */
    public String getForeignKeyName() {
        return foreignKeyName;
    }

    public ConstraintsConfig setForeignKeyName(String foreignKeyName) {
        this.foreignKeyName = foreignKeyName;
        return this;
    }

    /**
     * Returns if a foreign key defined for this column should be "initially deferred". Returns null if not specified.
     */
    public Boolean isInitiallyDeferred() {
        return initiallyDeferred;
    }

    public ConstraintsConfig setInitiallyDeferred(Boolean initiallyDeferred) {
        this.initiallyDeferred = initiallyDeferred;
        return this;
    }

    /**
     * Set the initiallyDeferred parameter based on the passed string.
     * Sets true if the passed string is 1 or true or TRUE.
     * Sets false if the passed string is 0 or false or FALSE.
     * Sets null if the passed string is null or "null" or "NULL".
     * Throws an {@link UnexpectedLiquibaseException} if a different value is passed
     */
    public ConstraintsConfig setInitiallyDeferred(String initiallyDeferred) {
        this.initiallyDeferred = parseBoolean(initiallyDeferred);

        return this;
    }

    /**
     * Returns if a foreign key defined for this column should deferrable. Returns null if not specified.
     */
    public Boolean isDeferrable() {
        return deferrable;
    }

    public ConstraintsConfig setDeferrable(Boolean deferrable) {
        this.deferrable = deferrable;
        return this;
    }

    /**
     * Set the validateNullable field based on the passed string.
     * Sets true if the passed string is 1 or true or TRUE.
     * Sets false if the passed string is 0 or false or FALSE.
     * Sets null if the passed string is null or "null" or "NULL".
     * Throws an {@link UnexpectedLiquibaseException} if an invalid value is passed
     */
    public ConstraintsConfig setValidateNullable(String validateNullable) {
        this.validateNullable = parseBoolean(validateNullable);
        return this;
    }

    /**
     * Returns whether a NotNullConst defined for this column should validate.
     * Returns null if not setValidateNullable has not been called.
     */
    public Boolean getValidateNullable() {
        return validateNullable;
    }

    public ConstraintsConfig setValidateNullable(Boolean validateNullable) {
        this.validateNullable = validateNullable;
        return this;
    }

    /**
     * Set the validateUnique field based on the passed string.
     * Sets true if the passed string is 1 or true or TRUE.
     * Sets false if the passed string is 0 or false or FALSE.
     * Sets null if the passed string is null or "null" or "NULL".
     * Throws an {@link UnexpectedLiquibaseException} if an invalid value is passed
     */
    public ConstraintsConfig setValidateUnique(String validateUnique) {
        this.validateUnique = parseBoolean(validateUnique);
        return this;
    }

    /**
     * Returns whether a UniqueConst defined for this column should validate.
     * Returns null if not setValidateUnique has not been called.
     */
    public Boolean getValidateUnique() {
        return validateUnique;
    }

    public ConstraintsConfig setValidateUnique(Boolean validateUnique) {
        this.validateUnique = validateUnique;
        return this;
    }

    /**
     * Set the validatePrimaryKey field based on the passed string.
     * Sets true if the passed string is 1 or true or TRUE.
     * Sets false if the passed string is 0 or false or FALSE.
     * Sets null if the passed string is null or "null" or "NULL".
     * Throws an {@link UnexpectedLiquibaseException} if an invalid value is passed
     */
    public ConstraintsConfig setValidatePrimaryKey(String validatePrimaryKey) {
        this.validatePrimaryKey = parseBoolean(validatePrimaryKey);
        return this;
    }

    /**
     * Returns whether a PrimaryKeyConst defined for this column should validate.
     * Returns null if not setValidatePrimaryKey has not been called.
     */
    public Boolean getValidatePrimaryKey() {
        return validatePrimaryKey;
    }

    public ConstraintsConfig setValidatePrimaryKey(Boolean validatePrimaryKey) {
        this.validatePrimaryKey = validatePrimaryKey;
        return this;
    }

    /**
     * Set the validateForeignKey field based on the passed string.
     * Sets true if the passed string is 1 or true or TRUE.
     * Sets false if the passed string is 0 or false or FALSE.
     * Sets null if the passed string is null or "null" or "NULL".
     * Throws an {@link UnexpectedLiquibaseException} if an invalid value is passed
     */
    public ConstraintsConfig setValidateForeignKey(String validateForeignKey) {
        this.validateForeignKey= parseBoolean(validateForeignKey);
        return this;
    }

    /**
     * Returns whether a ForeignKeyConst defined for this column should validate.
     * Returns null if not setValidateForeignKey has not been called.
     */
    public Boolean getValidateForeignKey() {
        return validateForeignKey;
    }

    public ConstraintsConfig setValidateForeignKey(Boolean validateForeignKey) {
        this.validateForeignKey = validateForeignKey;
        return this;
    }

    /**
     * Set the deferrable parameter based on the passed string.
     * Sets true if the passed string is 1 or true or TRUE.
     * Sets false if the passed string is 0 or false or FALSE.
     * Sets null if the passed string is null or "null" or "NULL".
     * Throws an {@link UnexpectedLiquibaseException} if a different value is passed
     */
    public ConstraintsConfig setDeferrable(String deferrable) {
        this.deferrable = parseBoolean(deferrable);

        return this;
    }

    /**
     * Returns the tablespace to use for the defined primary key. Returns null if not specified.
     */
    public String getPrimaryKeyTablespace() {
        return primaryKeyTablespace;
    }

    public ConstraintsConfig setPrimaryKeyTablespace(String primaryKeyTablespace) {
        this.primaryKeyTablespace = primaryKeyTablespace;
        return this;
    }

    public String getReferencedTableCatalogName() {
        return referencedTableCatalogName;
    }

    public void setReferencedTableCatalogName(String referencedTableCatalogName) {
        this.referencedTableCatalogName = referencedTableCatalogName;
    }

    public String getReferencedTableSchemaName() {
        return referencedTableSchemaName;
    }

    public void setReferencedTableSchemaName(String referencedTableSchemaName) {
        this.referencedTableSchemaName = referencedTableSchemaName;
    }

    public String getReferencedTableName() {
        return referencedTableName;
    }

    public void setReferencedTableName(String referencedTableName) {
        this.referencedTableName = referencedTableName;
    }

    public String getReferencedColumnNames() {
        return referencedColumnNames;
    }

    public void setReferencedColumnNames(String referencedColumnNames) {
        this.referencedColumnNames = referencedColumnNames;
    }

    private Boolean parseBoolean(String value) {
        value = StringUtil.trimToNull(value);
        if ((value == null) || "null".equalsIgnoreCase(value)) {
            return null;
        } else {
            if ("true".equalsIgnoreCase(value) || "1".equals(value)) {
                return true;
            } else if ("false".equalsIgnoreCase(value) || "0".equals(value)) {
                return false;
            } else {
                throw new UnexpectedLiquibaseException("Unparsable boolean value: "+value);
            }

        }
    }

    @Override
    public String getSerializedObjectName() {
        return "constraints";
    }

    @Override
    public String getSerializedObjectNamespace() {
        return STANDARD_CHANGELOG_NAMESPACE;
    }

    @Override
    public void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException {
        throw new RuntimeException("TODO");
    }
}


text:
<!doctype html>

	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>"config/SaNGreeAConfig_adult" | Graphinius</title>
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">

						Search
						<input id="tsd-search-field" type="text" />

Preparing search index...

The search index is not available

					Graphinius

						Options

								All

Public

Public/Protected

All

							<input type="checkbox" id="tsd-filter-inherited" checked />
							Inherited
							<input type="checkbox" id="tsd-filter-externals" checked />
							Externals
							<input type="checkbox" id="tsd-filter-only-exported" />
							Only exported

					Menu

					Globals

					"config/SaNGreeAConfig_adult"

External module "config/SaNGreeAConfig_adult"

Index

Object literals

CONFIG

Object literals

CONFIG

CONFIG: object

Defined in config/SaNGreeAConfig_adult.ts:1

ALPHA

ALPHA: number

Defined in config/SaNGreeAConfig_adult.ts:29

AVERAGE_<wbr>OUTPUT_<wbr>RANGES

AVERAGE_<wbr>OUTPUT_<wbr>RANGES: boolean

Defined in config/SaNGreeAConfig_adult.ts:17

BETA

BETA: number

Defined in config/SaNGreeAConfig_adult.ts:31

EDGE_<wbr>MAX

EDGE_<wbr>MAX: number

Defined in config/SaNGreeAConfig_adult.ts:25

EDGE_<wbr>MIN

EDGE_<wbr>MIN: number

Defined in config/SaNGreeAConfig_adult.ts:23

INPUT_<wbr>FILE

INPUT_<wbr>FILE: string

Defined in config/SaNGreeAConfig_adult.ts:7

K_<wbr>FACTOR

K_<wbr>FACTOR: number

Defined in config/SaNGreeAConfig_adult.ts:27

NR_<wbr>DRAWS

NR_<wbr>DRAWS: number

Defined in config/SaNGreeAConfig_adult.ts:19

RANDOM_<wbr>DRAWS

RANDOM_<wbr>DRAWS: boolean

Defined in config/SaNGreeAConfig_adult.ts:21

REMOTE_<wbr>TARGET

REMOTE_<wbr>TARGET: string

Defined in config/SaNGreeAConfig_adult.ts:5

REMOTE_<wbr>URL

REMOTE_<wbr>URL: string

Defined in config/SaNGreeAConfig_adult.ts:3

SEPARATOR

SEPARATOR: string

Defined in config/SaNGreeAConfig_adult.ts:12

SEP_<wbr>MOD

SEP_<wbr>MOD: string

Defined in config/SaNGreeAConfig_adult.ts:13

TARGET_<wbr>COLUMN

TARGET_<wbr>COLUMN: string

Defined in config/SaNGreeAConfig_adult.ts:15

TRIM

TRIM: string

Defined in config/SaNGreeAConfig_adult.ts:9

TRIM_<wbr>MOD

TRIM_<wbr>MOD: string

Defined in config/SaNGreeAConfig_adult.ts:10

VECTOR

VECTOR: string

Defined in config/SaNGreeAConfig_adult.ts:96

GEN_<wbr>WEIGHT_<wbr>VECTORS

GEN_<wbr>WEIGHT_<wbr>VECTORS: object

Defined in config/SaNGreeAConfig_adult.ts:33

emph_<wbr>age

emph_<wbr>age: object

Defined in config/SaNGreeAConfig_adult.ts:74

categorical

categorical: object

Defined in config/SaNGreeAConfig_adult.ts:75

income

income: number

Defined in config/SaNGreeAConfig_adult.ts:83

native-<wbr>country

native-<wbr>country: number

Defined in config/SaNGreeAConfig_adult.ts:77

occupation

occupation: number

Defined in config/SaNGreeAConfig_adult.ts:82

race

race: number

Defined in config/SaNGreeAConfig_adult.ts:79

relationship

relationship: number

Defined in config/SaNGreeAConfig_adult.ts:81

sex

sex: number

Defined in config/SaNGreeAConfig_adult.ts:78

workclass

workclass: number

Defined in config/SaNGreeAConfig_adult.ts:76

range

range: object

Defined in config/SaNGreeAConfig_adult.ts:85

age

age: number

Defined in config/SaNGreeAConfig_adult.ts:86

capital-<wbr>gain

capital-<wbr>gain: number

Defined in config/SaNGreeAConfig_adult.ts:89

capital-<wbr>loss

capital-<wbr>loss: number

Defined in config/SaNGreeAConfig_adult.ts:90

education-<wbr>num

education-<wbr>num: number

Defined in config/SaNGreeAConfig_adult.ts:88

fnlwgt

fnlwgt: number

Defined in config/SaNGreeAConfig_adult.ts:87

hours-<wbr>per-<wbr>week

hours-<wbr>per-<wbr>week: number

Defined in config/SaNGreeAConfig_adult.ts:91

emph_<wbr>race

emph_<wbr>race: object

Defined in config/SaNGreeAConfig_adult.ts:54

categorical

categorical: object

Defined in config/SaNGreeAConfig_adult.ts:55

income

income: number

Defined in config/SaNGreeAConfig_adult.ts:63

native-<wbr>country

native-<wbr>country: number

Defined in config/SaNGreeAConfig_adult.ts:57

occupation

occupation: number

Defined in config/SaNGreeAConfig_adult.ts:62

race

race: number

Defined in config/SaNGreeAConfig_adult.ts:59

relationship

relationship: number

Defined in config/SaNGreeAConfig_adult.ts:61

sex

sex: number

Defined in config/SaNGreeAConfig_adult.ts:58

workclass

workclass: number

Defined in config/SaNGreeAConfig_adult.ts:56

range

range: object

Defined in config/SaNGreeAConfig_adult.ts:65

age

age: number

Defined in config/SaNGreeAConfig_adult.ts:66

capital-<wbr>gain

capital-<wbr>gain: number

Defined in config/SaNGreeAConfig_adult.ts:69

capital-<wbr>loss

capital-<wbr>loss: number

Defined in config/SaNGreeAConfig_adult.ts:70

education-<wbr>num

education-<wbr>num: number

Defined in config/SaNGreeAConfig_adult.ts:68

fnlwgt

fnlwgt: number

Defined in config/SaNGreeAConfig_adult.ts:67

hours-<wbr>per-<wbr>week

hours-<wbr>per-<wbr>week: number

Defined in config/SaNGreeAConfig_adult.ts:71

equal

equal: object

Defined in config/SaNGreeAConfig_adult.ts:34

categorical

categorical: object

Defined in config/SaNGreeAConfig_adult.ts:35

income

income: number

Defined in config/SaNGreeAConfig_adult.ts:43

native-<wbr>country

native-<wbr>country: number

Defined in config/SaNGreeAConfig_adult.ts:37

occupation

occupation: number

Defined in config/SaNGreeAConfig_adult.ts:42

race

race: number

Defined in config/SaNGreeAConfig_adult.ts:39

relationship

relationship: number

Defined in config/SaNGreeAConfig_adult.ts:41

sex

sex: number

Defined in config/SaNGreeAConfig_adult.ts:38

workclass

workclass: number

Defined in config/SaNGreeAConfig_adult.ts:36

range

range: object

Defined in config/SaNGreeAConfig_adult.ts:45

age

age: number

Defined in config/SaNGreeAConfig_adult.ts:46

capital-<wbr>gain

capital-<wbr>gain: number

Defined in config/SaNGreeAConfig_adult.ts:49

capital-<wbr>loss

capital-<wbr>loss: number

Defined in config/SaNGreeAConfig_adult.ts:50

education-<wbr>num

education-<wbr>num: number

Defined in config/SaNGreeAConfig_adult.ts:48

fnlwgt

fnlwgt: number

Defined in config/SaNGreeAConfig_adult.ts:47

hours-<wbr>per-<wbr>week

hours-<wbr>per-<wbr>week: number

Defined in config/SaNGreeAConfig_adult.ts:51

						Globals

						"<wbr>SaNGree<wbr>A/SNDistance<wbr>Funcs"

						"<wbr>SaNGree<wbr>A/SaNGree<wbr>A"

						"config/<wbr>SaNGreeAConfig_<wbr>adult"

						"config/<wbr>SaNGreeAConfig_<wbr>house"

						"core/<wbr>Equivalence<wbr>Class"

						"core/<wbr>Gen<wbr>Hierarchies"

						"io/CSVInput"

						"io/CSVOutput"

						CONFIG

Legend

Module

Object literal

Variable

Function

Function with type parameter

Index signature

Type alias

Enumeration

Enumeration member

Property

Method

Interface

Interface with type parameter

Constructor

Property

Method

Index signature

Class

Class with type parameter

Constructor

Property

Method

Accessor

Index signature

Inherited constructor

Inherited property

Inherited method

Inherited accessor

Protected property

Protected method

Protected accessor

Private property

Private method

Private accessor

Static property

Static method

Generated using TypeDoc

redpajama_set_name: RedPajamaGithub


text:
{% extends "splunkdj:base_with_app_bar.html" %}

{% load splunkmvc %}

{% block title %}Interactive Views - Web Framework Toolkit{% endblock title %}

{% block css %}
    <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}splunkjs/css/dashboard.css">
    <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}{{app_name}}/custom.css" />
{% endblock css %}

{% block content %}

Interactive views

                        In addition to form views, the Chart and Table views also support interactivity.
                        For example, an event is generated when a row or cell in a table is clicked.

                        In this example, when a table row is clicked, the second search on the page
                        is updated along with the single value view.

Table

                        {% table id="table" managerid="simplesearch1" %}

Events for the selected sourcetype

                        {% single id="single1" managerid="simplesearch2" beforeLabel="Event Count: " %}

{% endblock content%}

{% block managers %}
    {% searchmanager id="simplesearch1" search="| eventcount summarize=false index=* OR index=_* | table index count"
        preview=True cache=True autostart=True %}

    {% searchmanager id="simplesearch2"
        search="| eventcount summarize=false index=$index$ | table count"|token_safe
        preview=True cache=True autostart=False %}
{% endblock managers %}

{% block js %}

{% endblock js %}


text:
from typing import Any, Callable, Iterable, Iterator, Sequence, Tuple

from google.ads.googleads.v11.services.types import google_ads_service

class SearchPager:
    """A pager for iterating through ``search`` requests.

    This class thinly wraps an initial
    :class:`google.ads.googleads.v11.services.types.SearchGoogleAdsResponse` object, and
    provides an ``__iter__`` method to iterate through its
    ``results`` field.

    If there are more pages, the ``__iter__`` method will make additional
    ``Search`` requests and continue to iterate
    through the ``results`` field on the
    corresponding responses.

    All the usual :class:`google.ads.googleads.v11.services.types.SearchGoogleAdsResponse`
    attributes are available on the pager. If multiple requests are made, only
    the most recent response is retained, and thus used for attribute lookup.
    """

    def __init__(
        self,
        method: Callable[..., google_ads_service.SearchGoogleAdsResponse],
        request: google_ads_service.SearchGoogleAdsRequest,
        response: google_ads_service.SearchGoogleAdsResponse,
        metadata: Sequence[Tuple[str, str]] = (),
    ):
        """Instantiate the pager.

        Args:
            method (Callable): The method that was originally called, and
                which instantiated this pager.
            request (:class:`google.ads.googleads.v11.services.types.SearchGoogleAdsRequest`):
                The initial request object.
            response (:class:`google.ads.googleads.v11.services.types.SearchGoogleAdsResponse`):
                The initial response object.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.
        """
        self._method = method
        self._request = google_ads_service.SearchGoogleAdsRequest(request)
        self._response = response
        self._metadata = metadata

    def __getattr__(self, name: str) -> Any:
        return getattr(self._response, name)

    @property
    def pages(self) -> Iterable[google_ads_service.SearchGoogleAdsResponse]:
        yield self._response
        while self._response.next_page_token:
            self._request.page_token = self._response.next_page_token
            self._response = self._method(
                self._request, metadata=self._metadata
            )
            yield self._response

    def __iter__(self) -> Iterator[google_ads_service.GoogleAdsRow]:
        for page in self.pages:
            yield from page.results

    def __repr__(self) -> str:
        return "{0}<{1!r}>".format(self.__class__.__name__, self._response)


text:
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Microsoft.AspNetCore.Mvc.ViewFeatures;

namespace Microsoft.AspNetCore.Mvc.ViewEngines;

/// <summary>
/// Represents the result of an <see cref="IViewEngine" />.
/// </summary>
public class ViewEngineResult
{
    private ViewEngineResult(string viewName)
    {
        ViewName = viewName;
    }

    /// <summary>
    /// The list of locations searched.
    /// </summary>
    public IEnumerable<string> SearchedLocations { get; private init; } = Enumerable.Empty<string>();

    /// <summary>
    /// The <see cref="IView"/>.
    /// </summary>
    public IView? View { get; private init; }

    /// <summary>
    /// Gets or sets the name of the view.
    /// </summary>
    public string ViewName { get; private set; }

    /// <summary>
    /// Whether the result was successful
    /// </summary>
    [MemberNotNullWhen(true, nameof(View))]
    public bool Success => View != null;

    /// <summary>
    /// Returns a result that represents when a view is not found.
    /// </summary>
    /// <param name="viewName">The name of the view.</param>
    /// <param name="searchedLocations">The locations searched.</param>
    /// <returns>The not found result.</returns>
    public static ViewEngineResult NotFound(
        string viewName,
        IEnumerable<string> searchedLocations)
    {
        if (viewName == null)
        {
            throw new ArgumentNullException(nameof(viewName));
        }

        if (searchedLocations == null)
        {
            throw new ArgumentNullException(nameof(searchedLocations));
        }

        return new ViewEngineResult(viewName)
        {
            SearchedLocations = searchedLocations,
        };
    }

    /// <summary>
    /// Returns a result when a view is found.
    /// </summary>
    /// <param name="viewName">The name of the view.</param>
    /// <param name="view">The <see cref="IView"/>.</param>
    /// <returns>The found result.</returns>
    public static ViewEngineResult Found(string viewName, IView view)
    {
        if (viewName == null)
        {
            throw new ArgumentNullException(nameof(viewName));
        }

        if (view == null)
        {
            throw new ArgumentNullException(nameof(view));
        }

        return new ViewEngineResult(viewName)
        {
            View = view,
        };
    }

    /// <summary>
    /// Ensure this <see cref="ViewEngineResult"/> was successful.
    /// </summary>
    /// <param name="originalLocations">
    /// Additional <see cref="SearchedLocations"/> to include in the thrown <see cref="InvalidOperationException"/>
    /// if <see cref="Success"/> is <c>false</c>.
    /// </param>
    /// <exception cref="InvalidOperationException">
    /// Thrown if <see cref="Success"/> is <c>false</c>.
    /// </exception>
    /// <returns>This <see cref="ViewEngineResult"/> if <see cref="Success"/> is <c>true</c>.</returns>
    [MemberNotNull(nameof(View))]
    public ViewEngineResult EnsureSuccessful(IEnumerable<string>? originalLocations)
    {
        if (!Success)
        {
            var locations = string.Empty;
            if (originalLocations != null && originalLocations.Any())
            {
                locations = Environment.NewLine + string.Join(Environment.NewLine, originalLocations);
            }

            if (SearchedLocations.Any())
            {
                locations += Environment.NewLine + string.Join(Environment.NewLine, SearchedLocations);
            }

            throw new InvalidOperationException(Resources.FormatViewEngine_ViewNotFound(ViewName, locations));
        }

        return this;
    }
}


text:
import 'reflect-metadata';
import * as ts from 'typescript';

import {createLanguageService} from '../src/language_service';
import {Completions} from '../src/types';
import {TypeScriptServiceHost} from '../src/typescript_host';

import {toh} from './test_data';
import {MockTypescriptHost} from './test_utils';

describe('completions', () => {
  let documentRegistry = ts.createDocumentRegistry();
  let mockHost = new MockTypescriptHost(['/app/main.ts', '/app/parsing-cases.ts'], toh);
  let service = ts.createLanguageService(mockHost, documentRegistry);
  let ngHost = new TypeScriptServiceHost(mockHost, service);
  let ngService = createLanguageService(ngHost);
  ngHost.setSite(ngService);

  it('should be able to get entity completions',
     () => { contains('/app/test.ng', 'entity-amp', '&', '>', '<', 'ι'); });

  it('should be able to return html elements', () => {
    let htmlTags = ['h1', 'h2', 'div', 'span'];
    let locations = ['empty', 'start-tag-h1', 'h1-content', 'start-tag', 'start-tag-after-h'];
    for (let location of locations) {
      contains('/app/test.ng', location, ...htmlTags);
    }
  });

  it('should be able to return element diretives',
     () => { contains('/app/test.ng', 'empty', 'my-app'); });

  it('should be able to return h1 attributes',
     () => { contains('/app/test.ng', 'h1-after-space', 'id', 'dir', 'lang', 'onclick'); });

  it('should be able to find common angular attributes',
     () => { contains('/app/test.ng', 'div-attributes', '(click)', '[ngClass]'); });

  it('should be able to get completions in some random garbage', () => {
    const fileName = '/app/test.ng';
    mockHost.override(fileName, ' > {{tle<\n  {{retl  ><bel/beled}}di>\n   la</b  </d    &a  ');
    expect(() => ngService.getCompletionsAt(fileName, 31)).not.toThrow();
    mockHost.override(fileName, undefined !);
  });

  it('should be able to infer the type of a ngForOf', () => {
    addCode(
        `
      interface Person {
        name: string,
        street: string
      }

      @Component({template: '
{{person.~{name}name}}
 { contains('/app/app.component.ts', 'name', 'name', 'street'); });
  });

  it('should be able to infer the type of a ngForOf with an async pipe', () => {
    addCode(
        `
      interface Person {
        name: string,
        street: string
      }

      @Component({template: '
{{person.~{name}name}}</div'})
      export class MyComponent {
        people: Promise<Person[]>;
      }`,
        () => { contains('/app/app.component.ts', 'name', 'name', 'street'); });
  });

  it('should be able to complete every character in the file', () => {
    const fileName = '/app/test.ng';

    expect(() => {
      let chance = 0.05;
      let requests = 0;
      function tryCompletionsAt(position: number) {
        try {
          if (Math.random() < chance) {
            ngService.getCompletionsAt(fileName, position);
            requests++;
          }
        } catch (e) {
          // Emit enough diagnostic information to reproduce the error.
          console.error(
              `Position: ${position}\nContent: "${mockHost.getFileContent(fileName)}"\nStack:\n${e.stack}`);
          throw e;
        }
      }
      try {
        const originalContent = mockHost.getFileContent(fileName) !;

        // For each character in the file, add it to the file and request a completion after it.
        for (let index = 0, len = originalContent.length; index < len; index++) {
          const content = originalContent.substr(0, index);
          mockHost.override(fileName, content);
          tryCompletionsAt(index);
        }

        // For the complete file, try to get a completion at every character.
        mockHost.override(fileName, originalContent);
        for (let index = 0, len = originalContent.length; index < len; index++) {
          tryCompletionsAt(index);
        }

        // Delete random characters in the file until we get an empty file.
        let content = originalContent;
        while (content.length > 0) {
          const deleteIndex = Math.floor(Math.random() * content.length);
          content = content.slice(0, deleteIndex - 1) + content.slice(deleteIndex + 1);
          mockHost.override(fileName, content);

          const requestIndex = Math.floor(Math.random() * content.length);
          tryCompletionsAt(requestIndex);
        }

        // Build up the string from zero asking for a completion after every char
        buildUp(originalContent, (text, position) => {
          mockHost.override(fileName, text);
          tryCompletionsAt(position);
        });
      } finally {
        mockHost.override(fileName, undefined !);
      }
    }).not.toThrow();
  });

  describe('with regression tests', () => {
    it('should not crash with an incomplete component', () => {
      expect(() => {
        const code = `
@Component({
  template: '~{inside-template}'
})
export class MyComponent {

}`;
        addCode(code, fileName => { contains(fileName, 'inside-template', 'h1'); });
      }).not.toThrow();
    });

    it('should hot crash with an incomplete class', () => {
      expect(() => {
        addCode('\nexport class', fileName => { ngHost.updateAnalyzedModules(); });
      }).not.toThrow();
    });

  });

  it('should respect paths configuration', () => {
    mockHost.overrideOptions(options => {
      options.baseUrl = '/app';
      options.paths = {'bar/*': ['foo/bar/*']};
      return options;
    });
    mockHost.addScript('/app/foo/bar/shared.ts', `
      export interface Node {
        children: Node[];
      }
    `);
    mockHost.addScript('/app/my.component.ts', `
      import { Component } from '@angular/core';
      import { Node } from 'bar/shared';

      @Component({
        selector: 'my-component',
        template: '{{tree.~{tree} }}'
      })
      export class MyComponent {
        tree: Node;
      }
    `);
    ngHost.updateAnalyzedModules();
    contains('/app/my.component.ts', 'tree', 'children');
  });

  it('should work with input and output', () => {
    addCode(
        `
      @Component({
        selector: 'foo-component',
        template: \`

        \`,
      })
      export class FooComponent {
        text: string;
        value: number;
      }
    `,
        (fileName) => {
          contains(fileName, 'stringMarker', '[model]', '(model)');
          contains(fileName, 'numberMarker', '[inputAlias]', '(outputAlias)');
        });
  });

  function addCode(code: string, cb: (fileName: string, content?: string) => void) {
    const fileName = '/app/app.component.ts';
    const originalContent = mockHost.getFileContent(fileName);
    const newContent = originalContent + code;
    mockHost.override(fileName, originalContent + code);
    ngHost.updateAnalyzedModules();
    try {
      cb(fileName, newContent);
    } finally {
      mockHost.override(fileName, undefined !);
    }
  }

  function contains(fileName: string, locationMarker: string, ...names: string[]) {
    let location = mockHost.getMarkerLocations(fileName) ![locationMarker];
    if (location == null) {
      throw new Error(`No marker ${locationMarker} found.`);
    }
    expectEntries(locationMarker, ngService.getCompletionsAt(fileName, location), ...names);
  }
});

function expectEntries(locationMarker: string, completions: Completions, ...names: string[]) {
  let entries: {[name: string]: boolean} = {};
  if (!completions) {
    throw new Error(
        `Expected result from ${locationMarker} to include ${names.join(', ')} but no result provided`);
  }
  if (!completions.length) {
    throw new Error(
        `Expected result from ${locationMarker} to include ${names.join(', ')} an empty result provided`);
  } else {
    for (let entry of completions) {
      entries[entry.name] = true;
    }
    let missing = names.filter(name => !entries[name]);
    if (missing.length) {
      throw new Error(
          `Expected result from ${locationMarker} to include at least one of the following, ${missing.join(', ')}, in the list of entries ${completions.map(entry => entry.name).join(', ')}`);
    }
  }
}

function buildUp(originalText: string, cb: (text: string, position: number) => void) {
  let count = originalText.length;

  let inString: boolean[] = (new Array(count)).fill(false);
  let unused: number[] = (new Array(count)).fill(1).map((v, i) => i);

  function getText() {
    return new Array(count)
        .fill(1)
        .map((v, i) => i)
        .filter(i => inString[i])
        .map(i => originalText[i])
        .join('');
  }

  function randomUnusedIndex() { return Math.floor(Math.random() * unused.length); }

  while (unused.length > 0) {
    let unusedIndex = randomUnusedIndex();
    let index = unused[unusedIndex];
    if (index == null) throw new Error('Internal test buildup error');
    if (inString[index]) throw new Error('Internal test buildup error');
    inString[index] = true;
    unused.splice(unusedIndex, 1);
    let text = getText();
    let position =
        inString.filter((_, i) => i <= index).map(v => v ? 1 : 0).reduce((p, v) => p + v, 0);
    cb(text, position);
  }
}


text:
<?php
require_once('lib'.DIRECTORY_SEPARATOR.'bootstrap.php');

$req = new Request();
$req->process();


text:
<!doctype html>

    <meta charset="UTF-8">
    <title>Deutsch Woerterbuch - Eintrag bearbeitung</title>
    <meta name="description" content="Deutsch Woerterbuch - Eintrag bearbeitung">
    <link rel="stylesheet" href="style.css">

Eintrag bearbeitung

    <form>

            <fieldset>
                Stichwort
                <input id="word" name="word" type="text"/>
            </fieldset>
            <fieldset>
                Typ
                <select id="word_type" name="word_type">
                </select>
            </fieldset>
            <fieldset>
                Aussprache
                <input id="word_pronunciation" name="word_pronunciation" type="text"/>
            </fieldset>

            <fieldset>
                Geschlecht
                <select id="substantive_gender" name="substantive_gender">
                </select>
            </fieldset>
            <fieldset>
                Nur im Plural
                <input type="radio" id="substantive_onlyPluralYes" name="substantive_onlyPlural" value="true">Ja
                <input type="radio" id="substantive_onlyPluralNo" name="substantive_onlyPlural" value="false">Nein
            </fieldset>
            <fieldset>
                Nur Singular
                <input type="radio" id="substantive_onlySingularYes" name="substantive_onlySingular" value="true">Ja
                <input type="radio" id="substantive_onlySingularNo" name="substantive_onlySingular" value="false">Nein
            </fieldset>
            <fieldset>
                Mit Plural Ausnahme
                <input type="radio" id="substantive_pluralExceptionYes" name="substantive_pluralException" value="true">Ja
                <input type="radio" id="substantive_pluralExceptionNo" name="substantive_pluralException" value="false">Nein
            </fieldset>
            <fieldset>
                Pluralform(en)
                <input id="substantive_pluralforms" name="substantive_pluralforms" type="text"/>
            </fieldset>
            <fieldset>
                Genetivs Singular
                <input id="substantive_genetiveSingular" name="substantive_genetiveSingular" type="text"/>
            </fieldset>

            <fieldset>
                1. Person Singular des Imperfekts
                <input id="verb_firstSingPersonImperfect" name="verb_firstSingPersonImperfect" type="text"/>
            </fieldset>
            <fieldset>
                3. Person Singular des Imperfekts
                <input id="verb_thirdSingPersonImperfect" name="verb_thirdSingPersonImperfect" type="text"/>
            </fieldset>
            <fieldset>
                3. Person Singular des Perfekts
                <input id="verb_thirdSingPersonPerfect" name="verb_thirdSingPersonPerfect" type="text"/>
            </fieldset>
            <fieldset>
                Unregelmäßig
                <input type="radio" id="verb_irregularYes" name="verb_irregular" value="true">Ja
                <input type="radio" id="verb_irregularNo" name="verb_irregular" value="false">Nein
            </fieldset>
            <fieldset>
                Reflexiv
                <input type="radio" id="verb_reflexiveYes" name="verb_reflexive" value="true">Ja
                <input type="radio" id="verb_reflexiveNo" name="verb_reflexive" value="false">Nein
            </fieldset>
            <fieldset>
                Transitiv
                <input type="radio" id="verb_transitiveYes" name="verb_transitive" value="true">Ja
                <input type="radio" id="verb_transitiveNo" name="verb_transitive" value="false">Nein
            </fieldset>
            <fieldset>
                Intransitiv
                <input type="radio" id="verb_intransitiveYes" name="verb_intransitive" value="true">Ja
                <input type="radio" id="verb_intransitiveNo" name="verb_intransitive" value="false">Nein
            </fieldset>
            <fieldset>
                Präfixverben
                <input type="radio" id="verb_prefixVerbYes" name="verb_prefixVerb" value="true">Ja
                <input type="radio" id="verb_prefixVerbNo" name="verb_prefixVerb" value="false">Nein
            </fieldset>
            <fieldset>
                Untrennbar Präfixverb
                <input type="radio" id="verb_inseparablePrefixVerbYes" name="verb_inseparablePrefixVerb" value="true">Ja
                <input type="radio" id="verb_inseparablePrefixVerbNo" name="verb_inseparablePrefixVerb" value="false">Nein
            </fieldset>
            <fieldset>
                Hilfsverb
                <input type="radio" id="verb_auxiliaryVerbSein" name="verb_auxiliaryVerb" value="sein">Sein
                <input type="radio" id="verb_auxiliaryVerbHaben" name="verb_auxiliaryVerb" value="haben">Haben
            </fieldset>
            <fieldset>
                Formen
                <input id="verb_forms" name="verb_forms" type="text"/>
            </fieldset>
            <fieldset>
                Präposition
                <input id="verb_preposition" name="verb_preposition" type="text"/>
            </fieldset>

            <fieldset>
                Adjektiv nie ohne Endung
                <input type="radio" id="adjectiveOrAdverb_withoutEnding" name="adjectiveOrAdverb_withoutEnding" value="true">Ja
                <input type="radio" id="adjectiveOrAdverb_withEnding" name="adjectiveOrAdverb_withoutEnding" value="false">Nein
            </fieldset>
            <fieldset>
                Indeklinabel
                <input type="radio" id="adjectiveOrAdverb_indeclinableYes" name="adjectiveOrAdverb_indeclinable" value="true">Ja
                <input type="radio" id="adjectiveOrAdverb_indeclinableNo" name="adjectiveOrAdverb_indeclinable" value="false">Nein
            </fieldset>
            <fieldset>
                Komparativ
                <input id="adjectiveOrAdverb_comparative" name="adjectiveOrAdverb_comparative" type="text"/>
            </fieldset>
            <fieldset>
                Superlativ
                <input id="adjectiveOrAdverb_superlative" name="adjectiveOrAdverb_superlative" type="text"/>
            </fieldset>
            <fieldset>
                Nützung Hinweise
                <input id="adjectiveOrAdverb_usinginfo" name="adjectiveOrAdverb_usinginfo" type="text"/>
            </fieldset>

            <fieldset>
                Subtyp
                <select id="pronoun_type" name="pronoun_type">
                </select>
            </fieldset>

Stichwort Übersetzung

            <fieldset>
                Sprache
                <select id="word_translate_language_choice" name="word_translate_language_choice">
                </select>
                <button>Hinzufügen</button>
            </fieldset>
            <fieldset>
                Français
                <input id="word_translate_fr" name="word_translate_fr" type="text"/>
                <button>Löschen</button>
            </fieldset>

Beispiele

            <fieldset>
                Sprache
                <select id="example_translate_language_choice" name="example_translate_language_choice">
                </select>
                <button>Hinzufügen</button>
            </fieldset>

                    Deutsch
                    Français
                    English
                    Action

                    <input id="example_1_de" name="example_1_de" type="text"/>
                    <input id="example_1_fr" name="example_1_fr" type="text"/>
                    <input id="example_1_en" name="example_1_en" type="text"/>
                    <button>Löschen</button>

                    <input id="example_2_de" name="example_2_de" type="text"/>
                    <input id="example_2_fr" name="example_2_fr" type="text"/>
                    <input id="example_2_en" name="example_2_en" type="text"/>
                    <button>Löschen</button>

            <button>Neu Beispiel</button>

Tags

A1<button>Löschen</button>

Frucht<button>Löschen</button>

                    <input id="new_tag" name="new_tag" list="country_name" type="text"/>
                    <button>Hinzufügen</button>
                    <datalist id="country_name">
                        <option value="Afghanistan">
                        <option value="Albania">
                        <option value="Algeria">
                        <option value="Andorra">
                        <option value="Armenia">
                        <option value="Australia">
                        <option value="Austria">
                        <option value="Azerbaijan">

                    </datalist>

            <button>Speichern</button>
            <button>Abbrechen</button>

    </form>


text:
package gueei.binding;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class CollectionChangedEventArg {
	public enum Action {
		Add,		// one or more items
		Remove,		// one or more items
		Replace,	// one or more items
		Move,		// one or more items
		Reset		//
	};

	private Action mAction = Action.Reset;
	private List<?> mNewItems = null;
	private List<?> mOldItems = null;
	private int mNewStartingIndex = -1;
	private int mOldStartingIndex = -1;

	/**
	 * @param action must be Action.Reset
	 */
	public CollectionChangedEventArg(Action action) {
		if (action != Action.Reset)
			throw new IllegalArgumentException("ctor is for Action.Reset only");
		this.initAdd(action, null, -1);
	}

	/**
	 * single item changed
	 * @param action must be Action.Add, Action.Reset or Action.Remove
	 * @param item must be empty for Action.Reset
	 */
	public CollectionChangedEventArg(Action action, Object item) {
		if (action != Action.Add && action != Action.Remove && action != Action.Reset)
			throw new IllegalArgumentException("ctor is for Action.Add or Action.Remove or Action.Reset only");

		if (action != Action.Reset) {
			this.initAddOrRemove(action, Arrays.asList(new Object[]{item}), -1);
			return;
		}
		if (item != null)
			throw new IllegalArgumentException("Action.Reset item must be null");
		this.initAdd(action, null, -1);
	}

	/**
	 * multi item changed
	 * @param action must be Action.Add, Action.Reset or Action.Remove
	 * @param changes must be empty for Action.Reset
	 */
	public CollectionChangedEventArg(Action action, List<?> changes) {
		if (action != Action.Add && action != Action.Remove && action != Action.Reset)
			throw new IllegalArgumentException("ctor is for Action.Add or Action.Remove or Action.Reset only");

		if (action == Action.Reset) {
			if (changes != null)
				throw new IllegalArgumentException("Action.Reset changes must be null");
			this.initAdd(action, null, -1);
			return;
		} else {
			if (changes == null)
				throw new IllegalArgumentException("changes");
			this.initAddOrRemove(action, changes, -1);
			return;
		}
	}

	/**
	 * multi item changed
	 * @param action must be Action.Add, Action.Reset or Action.Remove
	 * @param changes must be empty for Action.Reset
	 * @param startingIndex
	 */
	public CollectionChangedEventArg(Action action, List<?> changes, int startingIndex) {
		if (action != Action.Add && action != Action.Remove && action != Action.Reset)
			throw new IllegalArgumentException("ctor is for Action.Add or Action.Remove or Action.Reset only");

		if (action == Action.Reset) {
			if (changes != null)
				throw new IllegalArgumentException("Action.Reset changes must be null");
			if (startingIndex != -1)
				throw new IllegalArgumentException("Action.Reset requires index = -1");
			this.initAdd(action, null, -1);
			return;
		} else {
			if (changes == null)
				throw new IllegalArgumentException("changes");
			if (startingIndex < -1)
				throw new IllegalArgumentException("startindex must be not negative");
			this.initAddOrRemove(action, changes, startingIndex);
			return;
		}
	}

	/**
	 * replace change
	 * @param action
	 * @param newItem
	 * @param oldItem
	 */
	public CollectionChangedEventArg(Action action, Object newItem, Object oldItem) {
		if (action != Action.Replace)
			throw new IllegalArgumentException("ctor is for Action.Replace only");
		this.initMoveOrReplace(action, Arrays.asList(new Object[]{newItem}), Arrays.asList(new Object[]{oldItem}), -1, -1);
	}

	/**
	 * replace change
	 * @param action
	 * @param newItem
	 * @param oldItem
	 * @param index
	 */
	public CollectionChangedEventArg(Action action, Object newItem, Object oldItem, int index) {
		if (action != Action.Replace)
			throw new IllegalArgumentException("ctor is for Action.Replace only");
		this.initMoveOrReplace(action, Arrays.asList(new Object[]{newItem}), Arrays.asList(new Object[]{oldItem}), index, index);
	}

	/**
	 * replace change
	 * @param action
	 * @param newItems
	 * @param oldItems
	 */
	public CollectionChangedEventArg(Action action, List<?> newItems, List<?> oldItems) {
		if (action != Action.Replace)
			throw new IllegalArgumentException("ctor is for Action.Replace only");
		if (newItems == null)
			throw new IllegalArgumentException("newItems");
		if (oldItems == null)
			throw new IllegalArgumentException("newItems");
		this.initMoveOrReplace(action, newItems, oldItems, -1, -1);
	}

	/**
	 * replace change
	 * @param action
	 * @param newItems
	 * @param oldItems
	 * @param startingIndex
	 */
	public CollectionChangedEventArg(Action action, List<?> newItems, List<?> oldItems, int startingIndex) {
		if (action != Action.Replace)
			throw new IllegalArgumentException("ctor is for Action.Replace only");
		if (newItems == null)
			throw new IllegalArgumentException("newItems");
		if (oldItems == null)
			throw new IllegalArgumentException("newItems");
		this.initMoveOrReplace(action, newItems, oldItems, startingIndex, startingIndex);
	}

	/**
	 * move single item
	 * @param action
	 * @param changedItem
	 * @param index
	 * @param oldIndex
	 */
	public CollectionChangedEventArg(Action action, Object changedItem, int index, int oldIndex) {
		if (action != Action.Move)
			throw new IllegalArgumentException("ctor is for Action.Move only");

		if (index < 0)
			throw new IllegalArgumentException("index can't be negative");

		List<?> items = Arrays.asList(new Object[]{changedItem});
		this.initMoveOrReplace(action, items, items, index, oldIndex);
	}

	/**
	 * move multi items
	 * @param action
	 * @param changedItems
	 * @param index
	 * @param oldIndex
	 */
	public CollectionChangedEventArg(Action action, List<?> changedItems, int index, int oldIndex) {
		if (action != Action.Move)
			throw new IllegalArgumentException("ctor is for Action.Move only");
		if (index < 0)
			throw new IllegalArgumentException("index can't be negative");
		this.initMoveOrReplace(action, changedItems, changedItems, index, oldIndex);
	}

	public Action getAction() {
		return this.mAction;
	}

	public List<?> getNewItems() {
		return this.mNewItems;
	}

	public List<?> getOldItems() {
		return this.mOldItems;
	}

	public int getNewStartingIndex() {
		return this.mNewStartingIndex;
	}

	public int getOldStartingIndex() {
		return this.mOldStartingIndex;
	}

	private void initAdd(Action action, List<?> newItems, int newStartingIndex) {
		this.mAction = action;

		this.mNewItems = null;
		if( newItems != null ) {
			// make this readonly
			ArrayList<Object> list = new ArrayList<Object>();
			list.addAll(newItems);
			Collections.unmodifiableList(list);
			this.mNewItems = list;
		}
		this.mNewStartingIndex = newStartingIndex;
	}

	private void initAddOrRemove(Action action, List<?> changedItems, int startingIndex) {
		if (action == Action.Add)
			this.initAdd(action, changedItems, startingIndex);
		else if (action == Action.Remove)
			this.initRemove(action, changedItems, startingIndex);
	}

	private void initRemove(Action action, List<?> oldItems, int oldStartingIndex) {
		this.mAction = action;
		this.mOldItems = null;
		if( oldItems != null ) {
			// make this readonly
			ArrayList<Object> list = new ArrayList<Object>();
			list.addAll(oldItems);
			Collections.unmodifiableList(list);
			this.mOldItems = list;
		}
		this.mOldStartingIndex = oldStartingIndex;
	}

	private void initMoveOrReplace(Action action, List<?> newItems, List<?> oldItems, int startingIndex, int oldStartingIndex) {
		this.initAdd(action, newItems, startingIndex);
		this.initRemove(action, oldItems, oldStartingIndex);
	}

}


text:
import readlineSync from 'readline-sync';
import { info, prefix } from './log';

/**
 * ask for install
 *
 * @desc    ask the user if he wants to install new packages
 * @param   {boolean} recursive - if it should recursively ask the user for an answer if it was invalid (optional)
 * @return  {boolean}
 */
export const askForInstall = (recursive = true) => {
  const response = readlineSync.question(`${prefix.gray} > (Y/n) `);

  if (response === '' || response.toLowerCase() === 'y' || response.toLowerCase() === 'yes') {
    return true;
  } else if (response.toLowerCase() === 'n' || response.toLowerCase() === 'no') {
    return false;
  }

  info('invalid input');

  if (recursive) {
    return askForInstall();
  } else {
    throw new Error('invalid answer');
  }
};


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>intelevator: Scheduler Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

intelevator
    0.1

Welcome to intelevator, the inteligent elevator!

Main Page

Namespaces

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Hierarchy

Class Members

Public Member Functions |
Protected Member Functions |
List of all members

Scheduler Class Referenceabstract

#include <Scheduler.h>

Inheritance diagram for Scheduler:

This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.

Collaboration diagram for Scheduler:

This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.

Public Member Functions

 	Scheduler ()

virtual int 	schedule (const std::shared_ptr< CostFunction > costFunction, const std::shared_ptr< const Building > building, const std::shared_ptr< const Client > client, const int elevatorToExclude=-1)=0

Protected Member Functions

std::shared_ptr< std::vector< std::shared_ptr< Elevator > > > 	getAvailableElevators (const std::shared_ptr< const Building > building, int elevatorToExclude)

Detailed Description

Definition at line 11 of file Scheduler.h.

Constructor & Destructor Documentation

          Scheduler::Scheduler
          (
          	)

Definition at line 5 of file Scheduler.cpp.

Member Function Documentation

          std::shared_ptr< std::vector< std::shared_ptr< Elevator > > > Scheduler::getAvailableElevators
          (
          const std::shared_ptr< const Building >
          building,

          int
          elevatorToExclude

          )

protected

Definition at line 8 of file Scheduler.cpp.

Here is the caller graph for this function:

This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.

          virtual int Scheduler::schedule
          (
          const std::shared_ptr< CostFunction >
          costFunction,

          const std::shared_ptr< const Building >
          building,

          const std::shared_ptr< const Client >
          client,

          const int
          elevatorToExclude = -1

          )

pure virtual

Implemented in PlanningScheduler, and SimpleScheduler.

The documentation for this class was generated from the following files:

include/Scheduler.h

src/Scheduler.cpp

Scheduler

Generated by

     1.8.9.1


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// Module: StageControl
/// Team: Client
/// Description: Pending
/// Author:
///	 Name: Dongwon(Shawn) Kim   Date: 2017-09-12
/// Modified by:
///	 Name: N/A   Change: N/A	Date: N/A
/// Based on:  N/A
public class StageControl : MonoBehaviour {

	// Use this for initialization
	void Start () {

	}

	// Update is called once per frame
	void Update () {

	}
}


text:
package com.gepardy.code4bulgaria;

public class SignalData {
    private String petitionType;
    private String citizenName;
    private String citizenMiddleName;
    private String citizenLastName;
    private String petitionDescription;
    private String petitionContent;
    private String petitionData;
    private String petitionDate;
    private int id;

    public SignalData(int id, String petitionType, String citizenName, String citizenMiddleName, String citizenLastName,
                      String petitionDescription, String petitionContent, String petitionData, String petitionDate) {
        this.petitionType = petitionType;
        this.citizenName = citizenName;
        this.citizenMiddleName = citizenMiddleName;
        this.citizenLastName = citizenLastName;
        this.petitionDescription = petitionDescription;
        this.petitionContent = petitionContent;
        this.petitionData = petitionData;
        this.petitionDate = petitionDate;
        this.id = id;
    }

    public int getId() {
        return id;
    }

    public String getPetitionType() {
        return petitionType;
    }

    public String getCitizenName() {
        return citizenName;
    }

    public String getCitizenMiddleName() {
        return citizenMiddleName;
    }

    public String getCitizenLastName() {
        return citizenLastName;
    }

    public String getPetitionDescription() {
        return petitionDescription;
    }

    public String getPetitionContent() {
        return petitionContent;
    }

    public String getPetitionData() {
        return petitionData;
    }

    public String getPetitionDate() {
        return petitionDate;
    }
}


text:
module ActiveForce
  class Query
    attr_reader :table

    def initialize table
      @table = table
      @conditions = []
      @table_id = 'Id'
      @query_fields = [@table_id]
    end

    def fields fields_collection = []
      @query_fields += fields_collection.to_a
    end

    def all
      self
    end

    def to_s
      <<-SOQL.gsub(/\s+/, " ").strip
        SELECT
          #{ build_select }
        FROM
          #{ @table }
        #{ build_where }
        #{ build_order }
        #{ build_limit }
        #{ build_offset }
      SOQL
    end

    def select *columns
      @query_fields = columns
      self
    end

    def where condition
      @conditions << condition if condition
      self
    end

    def order order
      @order = order if order
      self
    end

    def limit size
      @size = size if size
      self
    end

    def limit_value
      @size
    end

    def offset offset
      @offset = offset
      self
    end

    def offset_value
      @offset
    end

    def find id
      where "#{ @table_id } = '#{ id }'"
      limit 1
    end

    def first
      limit 1
    end

    def last
      order("Id DESC").limit(1)
    end

    def join object_query
      fields ["(#{ object_query.to_s })"]
      self
    end

    def count
      @query_fields = ["count(Id)"]
      self
    end

    protected
      def build_select
        @query_fields.compact.uniq.join(', ')
      end

      def build_where
        "WHERE (#{ @conditions.join(') AND (') })" unless @conditions.empty?
      end

      def build_limit
        "LIMIT #{ @size }" if @size
      end

      def build_order
        "ORDER BY #{ @order }" if @order
      end

      def build_offset
        "OFFSET #{ @offset }" if @offset
      end
  end
end


text:
<法規>
<法規性質>法律</法規性質>
<英文法規名稱>The Central Bank of the Republic of China (Taiwan) Act</英文法規名稱>
<中文法規名稱>中央銀行法</中文法規名稱>
<法規網址>https://law.moj.gov.tw/Eng/LawClass/LawAll.aspx?pcode=G0410001</法規網址>
<最新英文異動日期>20140108</最新英文異動日期>
<廢止註記>
</廢止註記>
<附件 />
<沿革內容><![CDATA[1.Promulgated on May 23, 1935
2.Amended on November 8, 1979
3.Articles 23 and 44 amended on May 21,1997
4.Articles 18-1, 18-2 and 18-3 added, Articles 32 and 35 amended on June 5, 2002
5.Article 11-1 added, Articles 3, 6, 9, 11 and 38 amended on April 27, 2011
6.Article 25 amended on January 8, 2014]]></沿革內容>
<前言><![CDATA[]]></前言>
<法規內容>
  <編章節>   Chapter I  General Provisions</編章節>
  <條文>
    <條號>Article 1</條號>
    <條文內容><![CDATA[The Central Bank of the Republic of China (Taiwan) (hereafter called the Bank) shall be a government bank and an agency under the Executive Yuan.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 2</條號>
    <條文內容><![CDATA[The primary objectives of the Bank's operations shall be:
1. To promote financial stability;
2. To guide sound banking operations;
3. To maintain the stability of the internal and external value of the currency;
4. To foster economic development within the scope of the above objectives.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 3</條號>
    <條文內容><![CDATA[The Bank shall have its Head Office at the seat of the Central Government and may establish domestic branch offices and representative offices; and, if necessary, may establish representative offices overseas. The establishment and dissolution of branch offices and representative offices shall be authorized by the Board of Directors and reported to the Executive Yuan for approval.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 4</條號>
    <條文內容><![CDATA[The capital of the Bank shall be appropriated from the National Treasury. It shall be fully owned by the Central Government and nontransferable.]]></條文內容>
  </條文>
  <編章節>   Chapter II  Organization</編章節>
  <條文>
    <條號>Article 5</條號>
    <條文內容><![CDATA[The Bank shall have a Board of Directors consisting of eleven to fifteen directors to be nominated by the Executive Yuan and appointed by the President. A Board of Executive Directors composed of five to seven executive directors shall be designated among the directors.
The Governor of the Bank, the Minister of Finance and the Minister of Economic Affairs shall be ex officio directors and executive directors. Among the directors, there shall be at least one each from the agricultural, the industrial and commercial, and the banking sectors.
Except for the ex officio directors, the directors shall be appointed for a term of five years, and may be reappointed upon the expiration of such term.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 6</條號>
    <條文內容><![CDATA[The powers and functions of the Board of Directors shall be as follows:
1. To examine and approve policies concerning money, credit and foreign exchange;
2. To examine the adjustment of the Bank's capital;
3. To approve the operation plans of the Bank;
4. To examine the budget estimate and financial statements of the Bank;
5. To examine and approve major by-laws and regulations of the Bank;
6. To examine or approve the establishment, adjustment and dissolution of the Bank's administrative units, branch offices, representative offices and subsidiary institutions;
7. To approve the appointment and the removal of the heads of the Bank's administrative units, branch offices, representative offices and subsidiary institutions;
8. To examine matters proposed by the Directors.
The Board of Directors may delegate all or part of the above powers and functions to the Board of Executive Directors. The resolution of the Board of Executive Directors shall be reported to the Board of Directors for record and approval.
The Board of Directors shall establish rules and regulations of board meetings. Such rules and regulations shall be reported to the Executive Yuan for record.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 7</條號>
    <條文內容><![CDATA[The Bank shall have a Board of Supervisors, composed of five to seven supervisors to be nominated by the Executive Yuan and appointed by the President. The Minister of Directorate-General of Budget, Accounting and Statistics of the Executive Yuan shall be an ex officio supervisor.
Except for the ex officio supervisor, the supervisors shall be appointed for a term of three years andmay be re-appointed upon the expirations of such term.
The Board of Supervisors shall have a chairman to be elected from among the supervisors.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 8</條號>
    <條文內容><![CDATA[The powers and functions of the Board of Supervisors shall be as follows:
1. To examine the Bank's assets and liabilities;
2. To audit the Bank's accounts;
3. To examine the reserves for the issuance of currency by the Bank;
4. To examine the amount of currency issued by the Bank;
5. To examine and approve the Bank's financial statements;
6. To investigate any case involving violation of this Act and the by-laws and regulations of the Bank. The result of such investigation shall be referred to the Board of Directors for corrective action.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 9</條號>
    <條文內容><![CDATA[The Bank shall have a Governor with the rank of special appointment and two Deputy Governors with the rank equivalent to Grade 14; all of whom shall be appointed for a term of five years and may be reappointed upon the expiration of such term.
The provision of the preceding paragraph that the rank of Deputy Governor is equivalent to Grade 14 shall apply to Deputy Governors appointed after the revision of this Act, amended on 8 April 2011, has come into force.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 10</條號>
    <條文內容><![CDATA[The Governor shall be the chief executive in directing and supervising the operations of the Bank, shall carry out resolutions of the Board of Directors, and shall represent the Bank on all occasions. The Deputy Governors shall assist the Governor in the execution of the above duties.
The Governor shall be the chairman of the Board of Directors and the Board of Executive Directors.Whenever the Governor is unable to attend in person, the Deputy Governor designated to act for the Governor shall be the chairman.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 11</條號>
    <條文內容><![CDATA[Administrative units established in the Head Office of the Bank shall be named as Department or Office.
The ranks and quotas of the Bank's personnel shall be tabulated separately.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 11-1</條號>
    <條文內容><![CDATA[Except for the appointment, removal, remuneration, retirement and indemnity of the Governor and Deputy Governors as specified in this Act and other laws, the regulations for the appointment, dismissal, remuneration, bonus, welfare, performance rating, incentives and discipline, retirement, indemnity, severance and other personnel management matters related to the Bank's personnel shall be proposed by the Bank, authorized by the Board of Directors and reported to the Executive Yuan for approval.]]></條文內容>
  </條文>
  <編章節>   Chapter III  Operations</編章節>
  <條文>
    <條號>Article 12</條號>
    <條文內容><![CDATA[Unless otherwise specified by law, the Bank's operations shall be circumscribed to business with the following organizations:
1. Government agencies.
2. Banks and other financial institutions.
3. International and foreign financial institutions.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 13</條號>
    <條文內容><![CDATA[The currency of the Republic of China (Taiwan) shall be issued by the Bank.
The currency issued by the Bank shall be the national currency, and shall be legal tender for all payments within the territory of the Republic of China (Taiwan).
The Bank shall establish plants under its management to carry out the printing and minting of the currency.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 14</條號>
    <條文內容><![CDATA[The Bank may, whenever necessary, delegate other government banks to issue currency in designated regions on its behalf, to be regarded as national currency. The assets and liabilities pertaining to the issuance of such currency shall be for the account of the Bank.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 15</條號>
    <條文內容><![CDATA[The basic monetary unit of the national currency is Yuan and the subsidiary currencies are Chiou and Fen. Ten Fens equal to one Chiou and ten Chious equal to one Yuan.
The denomination, composition, form, and pattern of the notes and coins issued by the Bank shall be proposed by the Bank, for approval by the Executive Yuan.
The Bank shall make public the specifications of notes and coins prior to issuance.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 16</條號>
    <條文內容><![CDATA[Against currency issued by the Bank and its delegated banks, reserves in full equivalent value shall be maintained in gold, silver, foreign exchange, and eligible bills and securities.
The issuance of coins shall be exempt from reserves.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 17</條號>
    <條文內容><![CDATA[The amount and reserve status of currency issued by the Bank and its delegated banks shall be made public in regular intervals.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 18</條號>
    <條文內容><![CDATA[The Bank shall exchange stained or damaged notes and coins deemed to be unfit for circulation in accordance with certain standards, and destroy them according to law.
The Bank may redeem currency issued. Currency redeemed shall no longer be legal tender. However, the redemption period shall not be less than one year, during which time holders may exchange redeemed currency with the Bank.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 18-1</條號>
    <條文內容><![CDATA[The maximum amount of national currency that may be carried or mailed into or out of the territory of the Republic of China (Taiwan) shall be prescribed by the Bank.
Currency in excess of the aforesaid maximum cannot be transported into or out of the territory.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 18-2</條號>
    <條文內容><![CDATA[When financial institutions or other enterprises which are authorized to engage in foreign exchange operations receive counterfeit or falsified national currency or foreign currency, they shall retain, void and destroy those currencies, save that suspicion of criminal involvement shall be reported to the judicial authority. Regulations on handling counterfeit or falsified currency shall be stipulated by the Bank.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 18-3</條號>
    <條文內容><![CDATA[The Bank may issue gold and silver coins and commemorative notes and coins. Regulations governing the issuance of gold and silver coins and commemorative notes and coins shall be stipulated by the Bank.
The sale or resale price of aforesaid notes and coins may be higher than their denomination.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 19</條號>
    <條文內容><![CDATA[The Bank may provide the following accommodations to banks:
1. Rediscounts of eligible bills, with maturity not exceeding 90 days for industrial and commercial bills, and 180 days for agricultural bills.
2. Temporary advances not exceeding 10 days.
3. Refinancing of secured loans not exceeding 360 days.
The Bank may impose limits on rediscounts or other accommodations to banks.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 20</條號>
    <條文內容><![CDATA[The Bank, in order to assist economic development, may establish various funds, using savings deposits re-deposited by financial institutions and other special funds to refinance medium and long-term loans disbursed by banks.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 21</條號>
    <條文內容><![CDATA[The interest rates of the Bank's rediscounts and other accommodations shall be determined by the Bank in the light of prevailing financial and economic conditions, and made public. However, a branch office of the Bank may establish its own interest rates on rediscounts and accommodations according to special local financial conditions, with prior approval by the Head Office, and make them public.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 22</條號>
    <條文內容><![CDATA[The Bank may, at its discretion and in the light of financial and economic conditions, prescribe an upper limit for the interest rates of bank deposits, and approve the range of interest rates on bank loans as proposed by the Bankers Association.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 23</條號>
    <條文內容><![CDATA[The Bank shall receive and keep reserves against deposits and other liabilities of financial institutions which are regulated by the Banking Act, and may, at its discretion, adjust various deposit and other liability reserve ratios under the following maximum limits in accordance with the regulation governing adjustment and audit thereof, which shall be stipulated by the Bank:
1. Checking deposits: 25%
2. Demand deposits: 25%
3. Savings deposits: 15%
4. Time deposits: 15%
5. Other liabilities: 25%
The scope of aforesaid other liabilities shall be prescribed by the Bank.
The Bank may, whenever necessary and from a specific date, impose on the increment of the checking deposits, demand deposits and other liabilities, a marginal reserve ratio which shall not be bound by the maximum limits on paragraph 1 of this Article.
The Bank may charge the financial institutions having insufficient reserves, on the portion of the shortfall, a penalty interest rate not higher than two times of that prescribed in Article 21 on unsecured temporary advances as stated in subparagraph 2, paragraph 1 of Article 19. ]]></條文內容>
  </條文>
  <條文>
    <條號>Article 24</條號>
    <條文內容><![CDATA[The Bank shall, in conformity with law, receive and keep reserves for indemnity deposited by investment and trust companies.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 25</條號>
    <條文內容><![CDATA[The Bank, after consulting with the Financial Supervisory Commission, may at its discretion, prescribe for banks a minimum ratio of their liquid assets to various liabilities.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 26</條號>
    <條文內容><![CDATA[The Bank may, in the light of financial conditions, purchase and sell in the open market the bonds issued or guaranteed by the government, financial bonds issued by banks and bills accepted or guaranteed by banks.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 27</條號>
    <條文內容><![CDATA[The Bank may, for the purpose of regulating monetary conditions, issue certificates of deposits, savings bonds and short-term bonds, and may purchase and sell them in the open market.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 28</條號>
    <條文內容><![CDATA[The Bank may, whenever necessary, prescribe maximum loanable ratios selectively on the items used as collateral or mortgage of secured loans extended by banks.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 29</條號>
    <條文內容><![CDATA[The Bank may, whenever necessary, prescribe and regulate the amount of down-payment and the term of credit extended by banks for the purchase or construction of buildings and the purchase of durable consumer goods.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 30</條號>
    <條文內容><![CDATA[The Bank shall prescribe and regulate the accommodations extended by banks to securities dealers or securities finance companies.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 31</條號>
    <條文內容><![CDATA[The Bank may, whenever it deems that the monetary and credit conditions so warrant, prescribe a limit on various kinds of credit extended by all, or any category of, financial institutions.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 32</條號>
    <條文內容><![CDATA[The Bank shall establish clearing houses for checks and settlement of accounts among banks at the sites of Head Office or branch offices. The Bank may delegate government banks to carry out this function in places where the Bank has no branch office. Regulations governing checks clearance and settlement of accounts among banks shall be stipulated by the Bank.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 33</條號>
    <條文內容><![CDATA[The Bank shall hold international monetary reserves, and undertake the overall management of foreign exchange.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 34</條號>
    <條文內容><![CDATA[The Bank may, in the light of the balance of payments situation, take measures to adjust the demand for and supply of foreign exchange with a view to maintaining an orderly foreign exchange market.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 35</條號>
    <條文內容><![CDATA[The Bank shall undertake the following foreign exchange operations:
1. To draw up plans for foreign exchange management and on anticipated receipts and payments;
2. To authorize and supervise banks and other enterprises engaged in foreign exchange operations;
3. To settle the purchase and sale of foreign exchange;
4. To examine and approve private outward and inward remittances;
5. To supervise private enterprises' foreign borrowings guaranteed by authorized banks, with reference to their management and their repayment schedule;
6. To purchase and sell foreign currencies, bills of exchange and securities;
7. To calculate, compile, analyse and report the receipts and payments of foreign exchange;
8. Other operations relating to foreign exchange.
Regulations governing requirements of application, the examination procedure, approval of authorization, the scope of operations, withdrawal of authorization, and other matters which banks and other enterprises applying to engage in foreign exchange operations must comply with, shall be stipulated by the Bank.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 36</條號>
    <條文內容><![CDATA[The Bank shall effect the operations of the National Treasury and manage the National Treasury's cash accounts. It shall also manage the Central Governmental agencies' cash accounts, bills, securities, including receipts and payments, safekeeping and transfers, and the safekeeping of their other asset documents.
The Bank may delegate, whenever necessary, the operations mentioned above to other financial institutions in places where the Bank has no branch office.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 37</條號>
    <條文內容><![CDATA[The Bank shall undertake the floatation and the redemption of government bonds, issued domestically or abroad, and treasury bills. The Bank may delegate, whenever necessary, the above to other financial institutions.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 38</條號>
    <條文內容><![CDATA[In conformity with the powers and functions authorized by this Act, the Bank, if necessary, may undertake the inspection of the operations of financial institutions and the targeted examination of such operations as outlined in Chapter 3 of this Act; and may direct financial institutions to prepare and submit, within a prescribed period of time, accurate financial reports, property inventories or other relevant documents and reports.
If the responsible person(s) or staff member(s) of a financial institution or its branch office commit(s) any of the following acts when the Bank dispatches officials to inspect or examine its operations, or directs the financial institution to prepare and submit accurate financial reports, property inventories or other relevant documents and reports in accordance with the preceding paragraph, the financial institution or its branch office shall be liable to an administrative fine of Two Million New Taiwan Dollars (NT$2,000,000) to Ten Million New Taiwan Dollars (NT$10,000,000), imposed by the Bank:
1. Refusing to be inspected or examined;
2. Concealing or destroying account books and documents related to business or financial conditions;
3. Refusing to reply or providing false information to inquiries made by the examiner without justifiable reasons;
4. Failure to provide accurate and complete financial reports, property inventories or other relevant documents or reports in a timely manner.
The financial institution or its branch office shall seek recourse from the responsible person(s) after paying such administrative fines.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 39</條號>
    <條文內容><![CDATA[The Bank shall, to coordinate the formulation of financial policies and the execution of its operations, regularly collect economic information, compile financial statistics and conduct financial and economic research.]]></條文內容>
  </條文>
  <編章節>   Chapter IV  Budget and Financial Statement</編章節>
  <條文>
    <條號>Article 40</條號>
    <條文內容><![CDATA[Before the beginning of each fiscal year, the Bank shall prepare a budget estimate. The budget estimate shall be examined by the Board of Directors and processed in accordance with the Budget Act.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 41</條號>
    <條文內容><![CDATA[After the close of each fiscal year, the Bank shall settle all accounts and prepare financial statements. The financial statements shall be examined by the Board of Directors, examined and approved by the Board of Supervisors, and processed in accordance with the Financial Statement Act.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 42</條號>
    <條文內容><![CDATA[At the close of each fiscal year, the Bank shall set aside fifty per cent of its net profit as legal reserve. In case the amount of the accumulated legal reserve equals or exceeds the Bank's current capital, the percentage herein prescribed may, subject to the resolution of the Board of Directors and the concurrence of the Board of Supervisors, be reduced to a level no lower than twenty per cent.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 43</條號>
    <條文內容><![CDATA[The gain or loss from the Bank's assets or liabilities denominated in gold, silver, foreign currencies and other forms of international reserve, resulted from changes in parity of the national currency, or changes in the value, parity or exchange rate of these assets and liabilities relative to the national currency, shall not be listed in the Bank's annual income stateatement.
Any gain from the above changes shall be posted in the Exchange Reserve Account, and any loss shall be offset in the balance of that Account.]]></條文內容>
  </條文>
  <編章節>   Chapter V  Appendix</編章節>
  <條文>
    <條號>Article 44</條號>
    <條文內容><![CDATA[This Act shall come into force on the date of promulgation.
The effective date of the Article 23 amendment shall be prescribed by the Executive Yuan.]]></條文內容>
  </條文>
</法規內容>
</法規>


text:
/* card marking write barrier. a card is a byte storing a mark flag,
and the offset (in cells) of the first object in the card.

the mark flag is set by the write barrier when an object in the
card has a slot written to.

the offset of the first object is set by the allocator. */

/* if CARD_POINTS_TO_NURSERY is set, CARD_POINTS_TO_AGING must also be set. */
#define CARD_POINTS_TO_NURSERY 0x80
#define CARD_POINTS_TO_AGING 0x40
#define CARD_MARK_MASK (CARD_POINTS_TO_NURSERY | CARD_POINTS_TO_AGING)
typedef u8 F_CARD;

#define CARD_BITS 8
#define CARD_SIZE (1<<CARD_BITS)
#define ADDR_CARD_MASK (CARD_SIZE-1)

DLLEXPORT CELL cards_offset;

#define ADDR_TO_CARD(a) (F_CARD*)(((CELL)(a) >> CARD_BITS) + cards_offset)
#define CARD_TO_ADDR(c) (CELL*)(((CELL)(c) - cards_offset)<<CARD_BITS)

typedef u8 F_DECK;

#define DECK_BITS (CARD_BITS + 10)
#define DECK_SIZE (1<<DECK_BITS)
#define ADDR_DECK_MASK (DECK_SIZE-1)

DLLEXPORT CELL decks_offset;

#define ADDR_TO_DECK(a) (F_DECK*)(((CELL)(a) >> DECK_BITS) + decks_offset)
#define DECK_TO_ADDR(c) (CELL*)(((CELL)(c) - decks_offset) << DECK_BITS)

#define DECK_TO_CARD(d) (F_CARD*)((((CELL)(d) - decks_offset) << (DECK_BITS - CARD_BITS)) + cards_offset)

#define ADDR_TO_ALLOT_MARKER(a) (F_CARD*)(((CELL)(a) >> CARD_BITS) + allot_markers_offset)
#define CARD_OFFSET(c) (*((c) - (CELL)data_heap->cards + (CELL)data_heap->allot_markers))

#define INVALID_ALLOT_MARKER 0xff

DLLEXPORT CELL allot_markers_offset;

/* the write barrier must be called any time we are potentially storing a
pointer from an older generation to a younger one */
INLINE void write_barrier(CELL address)
{
	*ADDR_TO_CARD(address) = CARD_MARK_MASK;
	*ADDR_TO_DECK(address) = CARD_MARK_MASK;
}

#define SLOT(obj,slot) (UNTAG(obj) + (slot) * CELLS)

INLINE void set_slot(CELL obj, CELL slot, CELL value)
{
	put(SLOT(obj,slot),value);
	write_barrier(obj);
}

/* we need to remember the first object allocated in the card */
INLINE void allot_barrier(CELL address)
{
	F_CARD *ptr = ADDR_TO_ALLOT_MARKER(address);
	if(*ptr == INVALID_ALLOT_MARKER)
		*ptr = (address & ADDR_CARD_MASK);
}


text:
class PNGWriter : public ImgWriter
{
	public:
		PNGWriter();
		~PNGWriter();

		bool init(FILE *f, int width, int height, int hDPI, int vDPI);

		bool writePointers(unsigned char **rowPointers, int rowCount);
		bool writeRow(unsigned char **row);

		bool close();

	private:
		png_structp png_ptr;
		png_infop info_ptr;
};

#endif

#endif


text:
<?xml version="1.0" encoding="utf-8"?>
<project>
  <buildWrappers>
    <com.cloudbees.jenkins.plugins.okidocki.DockerBuildWrapper plugin="docker-custom-build-environment">
      <selector class="com.cloudbees.jenkins.plugins.okidocki.PullDockerImageSelector">
        <image>centos:7</image>
      </selector>
      <dockerInstallation>Default</dockerInstallation>
      <dockerHost plugin="docker-commons"/>
      <dockerRegistryCredentials/>
      <volumes class="empty-list"/>
      <forcePull>true</forcePull>
      <privileged>true</privileged>
      <verbose>true</verbose>
      <group>jenkins</group>
      <command>/bin/cat</command>
      <net>bridge</net>
      <memory>memory=L<inf, memory-swap=inf</memory>
      <cpu>2</cpu>
    </com.cloudbees.jenkins.plugins.okidocki.DockerBuildWrapper>
  </buildWrappers>
</project>


text:
// $Id$
// $MpId: AliMpVRowSegment.h,v 1.9 2006/05/24 13:58:21 ivana Exp $

/// \ingroup sector
/// \class AliMpVRowSegment
/// \brief An interface for a row segment.
///
/// \author David Guez, Ivana Hrivnacova; IPN Orsay

#ifndef ALI_MP_V_ROW_SEGMENT_H
#define ALI_MP_V_ROW_SEGMENT_H

#include "AliMpVIndexed.h"

class AliMpRow;
class AliMpVMotif;

class AliMpVRowSegment : public AliMpVIndexed
{
  public:
    AliMpVRowSegment();
    virtual ~AliMpVRowSegment();

    //
    // methods
    //

    /// Return the x coordinate of the left border in the global coordinate system.
    virtual Double_t  LeftBorderX() const = 0;
    /// Return the x coordinate of the right border in the global coordinate system.
    virtual Double_t  RightBorderX() const = 0;
    /// Return the half size in y of this row segment.
    virtual Double_t  HalfSizeY() const = 0;
    virtual AliMpVPadIterator* CreateIterator() const;

    //
    // find methods
    //

    /// Find the motif in the given positions
    virtual AliMpVMotif*  FindMotif(Double_t x, Double_t y) const = 0;
    /// Find the motif position Id in the given positions
    virtual Int_t     FindMotifPositionId(Double_t x, Double_t y) const = 0;
    /// Has the motif position with the given Id ?
    virtual Bool_t    HasMotifPosition(Int_t motifPositionId) const = 0;

    /// Fill the coordinates of the motif specified with the given motif position Id
    virtual void  MotifCenter(Int_t motifPositionId,
                               Double_t& x, Double_t& y) const = 0;

    //
    // geometry
    //

    /// Return the x position of the row segment centre.
    virtual Double_t  GetPositionX() const = 0;
    /// Return the y position of the row segment centre.
    virtual Double_t  GetPositionY() const = 0;

    /// Return the x dimension of the row segment centre.
    virtual Double_t  GetDimensionX() const = 0;
    /// Return the y dimension of the row segment centre.
    virtual Double_t  GetDimensionY() const = 0;

    //
    // set methods
    //

    /// Calculate offset
    virtual void      SetOffset(Double_t x, Double_t y) = 0;
    /// Set global indices limits.
    virtual void      SetGlobalIndices(AliMpRow* rowBefore) = 0;
    /// Set global indices to i-th motif position and returns next index in x.
    virtual Int_t     SetIndicesToMotifPosition(Int_t i, MpPair_t indices) = 0;

    //
    // get methods
    //

    /// Return the row.which this row segment belongs to
    virtual AliMpRow*  GetRow() const = 0;
    /// Return the number of motifs in this this row segment.
    virtual Int_t      GetNofMotifs() const = 0;
    /// Return the i-th motif of this row segment.
    virtual AliMpVMotif*  GetMotif(Int_t i) const = 0;
    /// Return the i-th motif position Id of this row segment.
    virtual Int_t      GetMotifPositionId(Int_t i) const = 0;

  ClassDef(AliMpVRowSegment,1)  //Row segment
};

#endif //ALI_MP_V_ROW_SEGMENT_H


text:
include_recipe "../epel/default.rb"
include_recipe "../ssl/default.rb"

## install
package 'nginx' do
  action :install
end

## service stop
service 'nginx' do
  action [:stop]
end

remote_file "/etc/nginx/nginx.conf" do
  user "root"
  source :auto
  mode "644"
  owner "root"
  group "root"
end

template "/etc/nginx/conf.d/node.conf" do
  user "root"
  source :auto
  mode "644"
  owner "root"
  group "root"
end

remote_directory "/var/www/html" do
  source "files/var/www/html"
  mode "755"
  owner "root"
  group "root"
end

# execute "copy file" do
#   user "root"
#   command "cp -pr /usr/share/nginx/html/* #{node["nginx"]["doc_root"]}"
#   only_if "test -e /usr/share/nginx/html"
# end

## service start
service 'nginx' do
  action [:enable, :start]
end

# template "/etc/nginx/conf.d/site" do
#   source "nginx/site.erb"
#   notifies :reload, "service[nginx]"
# end

# service "nginx" do
#   action :restart
# end

# remote_file "/etc/nginx/conf.d/static.conf"
# template "/etc/nginx/conf.d/dynamic.conf"


text:
import StockStore from './stock_store.coffee';

const RevisionStore = new StockStore({
  sortKey: 'date',
  sortAsc: false,
  descKeys: {
    date: true,
    characters: true
  },
  modelKey: 'revision'
}
);

export default RevisionStore.store;


text:
Stripe.api_key = Rails.application.secrets.stripe_secret_key
STRIPE_PUBLIC_KEY = Rails.application.secrets.stripe_public_key


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>io.github.imsardine.learning.jacoco</groupId>
  <artifactId>learning-jacoco</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>learning-jacoco</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>


text:
import socket

from logging import handlers

class SysLogHandler(handlers.SysLogHandler):

    def __init__(self, *args, **kwargs):
        super(SysLogHandler, self).__init__(*args, **kwargs)
        self.socket.settimeout(1)

    def emit(self, record, retry=True):
        msg = self.format(record) + '\000'
        prio = '<%d>' % self.encodePriority(self.facility,
                                            self.mapPriority(record.levelname))
        if type(msg) is unicode:
            msg = msg.encode('utf-8')
        msg = prio + msg
        try:
            if self.unixsocket:
                try:
                    self.socket.send(msg)
                except socket.error:
                    self.socket.close()
                    self._connect_unixsocket(self.address)
                    self.socket.send(msg)
            elif self.socktype == socket.SOCK_DGRAM:
                self.socket.sendto(msg, self.address)
            else:
                try:
                    self.socket.sendall(msg)
                except socket.error:
                    if retry:
                        self.socket = socket.socket(socket.AF_INET, self.socktype)
                        self.socket.settimeout(1)
                        self.socket.connect(self.address)
                        self.emit(record, retry=False)
        except (KeyboardInterrupt, SystemExit):
            raise
        except:
            self.handleError(record)


text:
'use strict';

const processors = require('../processors.js');

module.exports = {
    help: 'Iterate over the JSON input, printing the result of the given format string for each object. Tokens are of the form %property or %{expression}.',
    usageString: '<format>',
    minPositionalArguments: 1,
    maxPositionalArguments: 1,
    options: [
        {
            names: ['header', 'H'],
            helpArg: 'FORMAT',
            help: 'A header to print before the main output; same token syntax as the format string and is evaluated against the data as a whole.',
            type: 'string'
        },
        {
            names: ['footer', 'F'],
            helpArg: 'FORMAT',
            help: 'A footer to print after the main output; same token syntax as the format string and is evaluated against the data as a whole.',
            type: 'string'
        },
        {
            names: ['no-newline', 'n'],
            type: 'bool',
            help: 'Do not print trailing newline characters after every line.'
        }
    ],
    outputsObject: false,
    hasSmartOutput: true,  // format doesn't spit out JSON, but we do want its output to be subject to autopaging
    needsSandbox: true,
    hasWithClauseOpt: true,
    handler: formatCommandHandler
};

function replacerFactory(runtimeSettings, data)
{
    return (match, unbracketed, bracketed) => {
        // Short-circuit this case; this can only be a property name
        // of the object
        if(unbracketed)
            return data[unbracketed];

        let evaluator = processors.sandboxEvaluatorFactory(bracketed, runtimeSettings);
        let res = evaluator(data);

        if(res === null) return 'null';
        if(res === undefined) return 'undefined';
        return res.toString();
    };
}

function prepareFormatString(format)
{
    // Thanks, JS, for not having lookbehinds in your regexes.
    return format.replace(/(\\)?\\n/gm, (match, escape) => escape ? '\\n' : '\n')
                 .replace(/(\\)?\\t/gm, (match, escape) => escape ? '\\t' : '\t')
                 .replace(/(\\)?\\r/gm, (match, escape) => escape ? '\\r' : '\r');
}

function formatCommandHandler(runtimeSettings, config, opts)
{
    /*
    bracketed: /%\{(?=[^}]*\})([^}]*)\}/
    unbracketed: /%([\w$]+)/
    */

    let format = opts._args[0],
        re = /%([\w%]+)|%\{(?=[^}]*\})([^}]*)\}/gm,
        data = runtimeSettings.sandbox.$$,
        preparedFormatString,
        newline = opts.no_newline ? '' : '\n',
        res = '';

    if(opts.header) {
        let replacer = replacerFactory(runtimeSettings, data);
        res += prepareFormatString(opts.header).replace(re, replacer) + newline;
    }

    preparedFormatString = prepareFormatString(format);

    if(Array.isArray(data)) {
        for(let i = 0; i < data.length; i++) {
            let replacer = replacerFactory(runtimeSettings, data[i]);
            res += preparedFormatString.replace(re, replacer) + newline;
        }
    }
    else {
        let replacer = replacerFactory(runtimeSettings, data);
        res += preparedFormatString.replace(re, replacer) + newline;
    }

    if(opts.footer) {
        let replacer = replacerFactory(runtimeSettings, data);
        res += prepareFormatString(opts.footer).replace(re, replacer) + newline;
    }

    return res;
}