text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.dataprotection.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** Item Level target info for restore operation. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType")
@JsonTypeName("RangeBasedItemLevelRestoreCriteria")
@Fluent
public final class RangeBasedItemLevelRestoreCriteria extends ItemLevelRestoreCriteria {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(RangeBasedItemLevelRestoreCriteria.class);

    /*
     * minimum value for range prefix match
     */
    @JsonProperty(value = "minMatchingValue")
    private String minMatchingValue;

    /*
     * maximum value for range prefix match
     */
    @JsonProperty(value = "maxMatchingValue")
    private String maxMatchingValue;

    /**
     * Get the minMatchingValue property: minimum value for range prefix match.
     *
     * @return the minMatchingValue value.
     */
    public String minMatchingValue() {
        return this.minMatchingValue;
    }

    /**
     * Set the minMatchingValue property: minimum value for range prefix match.
     *
     * @param minMatchingValue the minMatchingValue value to set.
     * @return the RangeBasedItemLevelRestoreCriteria object itself.
     */
    public RangeBasedItemLevelRestoreCriteria withMinMatchingValue(String minMatchingValue) {
        this.minMatchingValue = minMatchingValue;
        return this;
    }

    /**
     * Get the maxMatchingValue property: maximum value for range prefix match.
     *
     * @return the maxMatchingValue value.
     */
    public String maxMatchingValue() {
        return this.maxMatchingValue;
    }

    /**
     * Set the maxMatchingValue property: maximum value for range prefix match.
     *
     * @param maxMatchingValue the maxMatchingValue value to set.
     * @return the RangeBasedItemLevelRestoreCriteria object itself.
     */
    public RangeBasedItemLevelRestoreCriteria withMaxMatchingValue(String maxMatchingValue) {
        this.maxMatchingValue = maxMatchingValue;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
    }
}


text:
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { useBeforeunload, Beforeunload } from 'react-beforeunload';

function AppWithNoopHook() {
    useBeforeunload();

    return
AppWithDialogBoxHook
;
}

function AppWithDialogBoxHook() {
    useBeforeunload(event => event.preventDefault());

    return
AppWithDialogBoxHook
;
}

function AppWithCustomMessageHook() {
    useBeforeunload(() => "You'll lose your data!");

    return
AppWithCustomMessageHook
;
}

function AppWithDialogBoxComponent() {
    return <Beforeunload onBeforeunload={event => event.preventDefault()} />;
}

function AppWithCustomMessageComponent() {
    return <Beforeunload onBeforeunload={() => "You'll lose your data!"} />;
}

function AppWithDialogBoxWithChildrenComponent() {
    return (
        <Beforeunload onBeforeunload={event => event.preventDefault()}>

AppWithCustomMessageHook

        </Beforeunload>
    );
}

function AppWithCustomMessageWithChildrenComponent() {
    return (
        <Beforeunload onBeforeunload={() => "You'll lose your data!"}>

AppWithCustomMessageHook

        </Beforeunload>
    );
}

function App() {
    return (
        <>
            <AppWithDialogBoxHook />
            <AppWithCustomMessageHook />
            <AppWithDialogBoxComponent />
            <AppWithCustomMessageComponent />
            <AppWithDialogBoxWithChildrenComponent />
            <AppWithCustomMessageWithChildrenComponent />
        </>
    );
}
ReactDOM.render(<App />, document.getElementById('app'));

redpajama_set_name: RedPajamaGithub


text:
<?php

/**
 * Base class that represents a query for the 'whatsnew' table.
 *
 *
 *
 * @method WhatsnewQuery orderByFeaturecode($order = Criteria::ASC) Order by the FeatureCode column
 * @method WhatsnewQuery orderByMonth($order = Criteria::ASC) Order by the Month column
 * @method WhatsnewQuery orderByYear($order = Criteria::ASC) Order by the Year column
 * @method WhatsnewQuery orderByFeature($order = Criteria::ASC) Order by the Feature column
 * @method WhatsnewQuery orderByExample1($order = Criteria::ASC) Order by the Example1 column
 * @method WhatsnewQuery orderByExample2($order = Criteria::ASC) Order by the Example2 column
 * @method WhatsnewQuery orderByEntered($order = Criteria::ASC) Order by the Entered column
 * @method WhatsnewQuery orderByDateentered($order = Criteria::ASC) Order by the DateEntered column
 * @method WhatsnewQuery orderByModified($order = Criteria::ASC) Order by the Modified column
 * @method WhatsnewQuery orderByDatemodified($order = Criteria::ASC) Order by the DateModified column
 * @method WhatsnewQuery orderByChecked($order = Criteria::ASC) Order by the Checked column
 * @method WhatsnewQuery orderByDatechecked($order = Criteria::ASC) Order by the DateChecked column
 * @method WhatsnewQuery orderByTs($order = Criteria::ASC) Order by the TS column
 *
 * @method WhatsnewQuery groupByFeaturecode() Group by the FeatureCode column
 * @method WhatsnewQuery groupByMonth() Group by the Month column
 * @method WhatsnewQuery groupByYear() Group by the Year column
 * @method WhatsnewQuery groupByFeature() Group by the Feature column
 * @method WhatsnewQuery groupByExample1() Group by the Example1 column
 * @method WhatsnewQuery groupByExample2() Group by the Example2 column
 * @method WhatsnewQuery groupByEntered() Group by the Entered column
 * @method WhatsnewQuery groupByDateentered() Group by the DateEntered column
 * @method WhatsnewQuery groupByModified() Group by the Modified column
 * @method WhatsnewQuery groupByDatemodified() Group by the DateModified column
 * @method WhatsnewQuery groupByChecked() Group by the Checked column
 * @method WhatsnewQuery groupByDatechecked() Group by the DateChecked column
 * @method WhatsnewQuery groupByTs() Group by the TS column
 *
 * @method WhatsnewQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
 * @method WhatsnewQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
 * @method WhatsnewQuery innerJoin($relation) Adds a INNER JOIN clause to the query
 *
 * @method Whatsnew findOne(PropelPDO $con = null) Return the first Whatsnew matching the query
 * @method Whatsnew findOneOrCreate(PropelPDO $con = null) Return the first Whatsnew matching the query, or a new Whatsnew object populated from the query conditions when no match is found
 *
 * @method Whatsnew findOneByMonth(string $Month) Return the first Whatsnew filtered by the Month column
 * @method Whatsnew findOneByYear(string $Year) Return the first Whatsnew filtered by the Year column
 * @method Whatsnew findOneByFeature(string $Feature) Return the first Whatsnew filtered by the Feature column
 * @method Whatsnew findOneByExample1(string $Example1) Return the first Whatsnew filtered by the Example1 column
 * @method Whatsnew findOneByExample2(string $Example2) Return the first Whatsnew filtered by the Example2 column
 * @method Whatsnew findOneByEntered(int $Entered) Return the first Whatsnew filtered by the Entered column
 * @method Whatsnew findOneByDateentered(string $DateEntered) Return the first Whatsnew filtered by the DateEntered column
 * @method Whatsnew findOneByModified(int $Modified) Return the first Whatsnew filtered by the Modified column
 * @method Whatsnew findOneByDatemodified(string $DateModified) Return the first Whatsnew filtered by the DateModified column
 * @method Whatsnew findOneByChecked(int $Checked) Return the first Whatsnew filtered by the Checked column
 * @method Whatsnew findOneByDatechecked(string $DateChecked) Return the first Whatsnew filtered by the DateChecked column
 * @method Whatsnew findOneByTs(string $TS) Return the first Whatsnew filtered by the TS column
 *
 * @method array findByFeaturecode(int $FeatureCode) Return Whatsnew objects filtered by the FeatureCode column
 * @method array findByMonth(string $Month) Return Whatsnew objects filtered by the Month column
 * @method array findByYear(string $Year) Return Whatsnew objects filtered by the Year column
 * @method array findByFeature(string $Feature) Return Whatsnew objects filtered by the Feature column
 * @method array findByExample1(string $Example1) Return Whatsnew objects filtered by the Example1 column
 * @method array findByExample2(string $Example2) Return Whatsnew objects filtered by the Example2 column
 * @method array findByEntered(int $Entered) Return Whatsnew objects filtered by the Entered column
 * @method array findByDateentered(string $DateEntered) Return Whatsnew objects filtered by the DateEntered column
 * @method array findByModified(int $Modified) Return Whatsnew objects filtered by the Modified column
 * @method array findByDatemodified(string $DateModified) Return Whatsnew objects filtered by the DateModified column
 * @method array findByChecked(int $Checked) Return Whatsnew objects filtered by the Checked column
 * @method array findByDatechecked(string $DateChecked) Return Whatsnew objects filtered by the DateChecked column
 * @method array findByTs(string $TS) Return Whatsnew objects filtered by the TS column
 *
 * @package    propel.generator.fbapp.om
 */
abstract class BaseWhatsnewQuery extends ModelCriteria
{
    /**
     * Initializes internal state of BaseWhatsnewQuery object.
     *
     * @param     string $dbName The dabase name
     * @param     string $modelName The phpName of a model, e.g. 'Book'
     * @param     string $modelAlias The alias for the model in this query, e.g. 'b'
     */
    public function __construct($dbName = null, $modelName = null, $modelAlias = null)
    {
        if (null === $dbName) {
            $dbName = 'fbapp';
        }
        if (null === $modelName) {
            $modelName = 'Whatsnew';
        }
        parent::__construct($dbName, $modelName, $modelAlias);
    }

    /**
     * Returns a new WhatsnewQuery object.
     *
     * @param     string $modelAlias The alias of a model in the query
     * @param   WhatsnewQuery|Criteria $criteria Optional Criteria to build the query from
     *
     * @return WhatsnewQuery
     */
    public static function create($modelAlias = null, $criteria = null)
    {
        if ($criteria instanceof WhatsnewQuery) {
            return $criteria;
        }
        $query = new WhatsnewQuery(null, null, $modelAlias);

        if ($criteria instanceof Criteria) {
            $query->mergeWith($criteria);
        }

        return $query;
    }

    /**
     * Find object by primary key.
     * Propel uses the instance pool to skip the database if the object exists.
     * Go fast if the query is untouched.
     *
     *
     * $obj  = $c->findPk(12, $con);
     *
     *
     * @param mixed $key Primary key to use for the query
     * @param     PropelPDO $con an optional connection object
     *
     * @return   Whatsnew|Whatsnew[]|mixed the result, formatted by the current formatter
     */
    public function findPk($key, $con = null)
    {
        if ($key === null) {
            return null;
        }
        if ((null !== ($obj = WhatsnewPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
            // the object is already in the instance pool
            return $obj;
        }
        if ($con === null) {
            $con = Propel::getConnection(WhatsnewPeer::DATABASE_NAME, Propel::CONNECTION_READ);
        }
        $this->basePreSelect($con);
        if ($this->formatter || $this->modelAlias || $this->with || $this->select
         || $this->selectColumns || $this->asColumns || $this->selectModifiers
         || $this->map || $this->having || $this->joins) {
            return $this->findPkComplex($key, $con);
        } else {
            return $this->findPkSimple($key, $con);
        }
    }

    /**
     * Alias of findPk to use instance pooling
     *
     * @param     mixed $key Primary key to use for the query
     * @param     PropelPDO $con A connection object
     *
     * @return                 Whatsnew A model object, or null if the key is not found
     * @throws PropelException
     */
     public function findOneByFeaturecode($key, $con = null)
     {
        return $this->findPk($key, $con);
     }

    /**
     * Find object by primary key using raw SQL to go fast.
     * Bypass doSelect() and the object formatter by using generated code.
     *
     * @param     mixed $key Primary key to use for the query
     * @param     PropelPDO $con A connection object
     *
     * @return                 Whatsnew A model object, or null if the key is not found
     * @throws PropelException
     */
    protected function findPkSimple($key, $con)
    {
        $sql = 'SELECT `FeatureCode`, `Month`, `Year`, `Feature`, `Example1`, `Example2`, `Entered`, `DateEntered`, `Modified`, `DateModified`, `Checked`, `DateChecked`, `TS` FROM `whatsnew` WHERE `FeatureCode` = :p0';
        try {
            $stmt = $con->prepare($sql);
            $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
        }
        $obj = null;
        if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
            $obj = new Whatsnew();
            $obj->hydrate($row);
            WhatsnewPeer::addInstanceToPool($obj, (string) $key);
        }
        $stmt->closeCursor();

        return $obj;
    }

    /**
     * Find object by primary key.
     *
     * @param     mixed $key Primary key to use for the query
     * @param     PropelPDO $con A connection object
     *
     * @return Whatsnew|Whatsnew[]|mixed the result, formatted by the current formatter
     */
    protected function findPkComplex($key, $con)
    {
        // As the query uses a PK condition, no limit(1) is necessary.
        $criteria = $this->isKeepQuery() ? clone $this : $this;
        $stmt = $criteria
            ->filterByPrimaryKey($key)
            ->doSelect($con);

        return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
    }

    /**
     * Find objects by primary key
     *
     * $objs = $c->findPks(array(12, 56, 832), $con);
     *
     * @param     array $keys Primary keys to use for the query
     * @param     PropelPDO $con an optional connection object
     *
     * @return PropelObjectCollection|Whatsnew[]|mixed the list of results, formatted by the current formatter
     */
    public function findPks($keys, $con = null)
    {
        if ($con === null) {
            $con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
        }
        $this->basePreSelect($con);
        $criteria = $this->isKeepQuery() ? clone $this : $this;
        $stmt = $criteria
            ->filterByPrimaryKeys($keys)
            ->doSelect($con);

        return $criteria->getFormatter()->init($criteria)->format($stmt);
    }

    /**
     * Filter the query by primary key
     *
     * @param     mixed $key Primary key to use for the query
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function filterByPrimaryKey($key)
    {

        return $this->addUsingAlias(WhatsnewPeer::FEATURECODE, $key, Criteria::EQUAL);
    }

    /**
     * Filter the query by a list of primary keys
     *
     * @param     array $keys The list of primary key to use for the query
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function filterByPrimaryKeys($keys)
    {

        return $this->addUsingAlias(WhatsnewPeer::FEATURECODE, $keys, Criteria::IN);
    }

    /**
     * Filter the query on the FeatureCode column
     *
     * Example usage:
     *
     * $query->filterByFeaturecode(1234); // WHERE FeatureCode = 1234
     * $query->filterByFeaturecode(array(12, 34)); // WHERE FeatureCode IN (12, 34)
     * $query->filterByFeaturecode(array('min' => 12)); // WHERE FeatureCode >= 12
     * $query->filterByFeaturecode(array('max' => 12)); // WHERE FeatureCode <= 12
     *
     *
     * @param     mixed $featurecode The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function filterByFeaturecode($featurecode = null, $comparison = null)
    {
        if (is_array($featurecode)) {
            $useMinMax = false;
            if (isset($featurecode['min'])) {
                $this->addUsingAlias(WhatsnewPeer::FEATURECODE, $featurecode['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($featurecode['max'])) {
                $this->addUsingAlias(WhatsnewPeer::FEATURECODE, $featurecode['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(WhatsnewPeer::FEATURECODE, $featurecode, $comparison);
    }

    /**
     * Filter the query on the Month column
     *
     * Example usage:
     *
     * $query->filterByMonth('fooValue');   // WHERE Month = 'fooValue'
     * $query->filterByMonth('%fooValue%'); // WHERE Month LIKE '%fooValue%'
     *
     *
     * @param     string $month The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function filterByMonth($month = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($month)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $month)) {
                $month = str_replace('*', '%', $month);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(WhatsnewPeer::MONTH, $month, $comparison);
    }

    /**
     * Filter the query on the Year column
     *
     * Example usage:
     *
     * $query->filterByYear('fooValue');   // WHERE Year = 'fooValue'
     * $query->filterByYear('%fooValue%'); // WHERE Year LIKE '%fooValue%'
     *
     *
     * @param     string $year The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function filterByYear($year = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($year)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $year)) {
                $year = str_replace('*', '%', $year);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(WhatsnewPeer::YEAR, $year, $comparison);
    }

    /**
     * Filter the query on the Feature column
     *
     * Example usage:
     *
     * $query->filterByFeature('fooValue');   // WHERE Feature = 'fooValue'
     * $query->filterByFeature('%fooValue%'); // WHERE Feature LIKE '%fooValue%'
     *
     *
     * @param     string $feature The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function filterByFeature($feature = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($feature)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $feature)) {
                $feature = str_replace('*', '%', $feature);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(WhatsnewPeer::FEATURE, $feature, $comparison);
    }

    /**
     * Filter the query on the Example1 column
     *
     * Example usage:
     *
     * $query->filterByExample1('fooValue');   // WHERE Example1 = 'fooValue'
     * $query->filterByExample1('%fooValue%'); // WHERE Example1 LIKE '%fooValue%'
     *
     *
     * @param     string $example1 The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function filterByExample1($example1 = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($example1)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $example1)) {
                $example1 = str_replace('*', '%', $example1);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(WhatsnewPeer::EXAMPLE1, $example1, $comparison);
    }

    /**
     * Filter the query on the Example2 column
     *
     * Example usage:
     *
     * $query->filterByExample2('fooValue');   // WHERE Example2 = 'fooValue'
     * $query->filterByExample2('%fooValue%'); // WHERE Example2 LIKE '%fooValue%'
     *
     *
     * @param     string $example2 The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function filterByExample2($example2 = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($example2)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $example2)) {
                $example2 = str_replace('*', '%', $example2);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(WhatsnewPeer::EXAMPLE2, $example2, $comparison);
    }

    /**
     * Filter the query on the Entered column
     *
     * Example usage:
     *
     * $query->filterByEntered(1234); // WHERE Entered = 1234
     * $query->filterByEntered(array(12, 34)); // WHERE Entered IN (12, 34)
     * $query->filterByEntered(array('min' => 12)); // WHERE Entered >= 12
     * $query->filterByEntered(array('max' => 12)); // WHERE Entered <= 12
     *
     *
     * @param     mixed $entered The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function filterByEntered($entered = null, $comparison = null)
    {
        if (is_array($entered)) {
            $useMinMax = false;
            if (isset($entered['min'])) {
                $this->addUsingAlias(WhatsnewPeer::ENTERED, $entered['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($entered['max'])) {
                $this->addUsingAlias(WhatsnewPeer::ENTERED, $entered['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(WhatsnewPeer::ENTERED, $entered, $comparison);
    }

    /**
     * Filter the query on the DateEntered column
     *
     * Example usage:
     *
     * $query->filterByDateentered('2011-03-14'); // WHERE DateEntered = '2011-03-14'
     * $query->filterByDateentered('now'); // WHERE DateEntered = '2011-03-14'
     * $query->filterByDateentered(array('max' => 'yesterday')); // WHERE DateEntered < '2011-03-13'
     *
     *
     * @param     mixed $dateentered The value to use as filter.
     *              Values can be integers (unix timestamps), DateTime objects, or strings.
     *              Empty strings are treated as NULL.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function filterByDateentered($dateentered = null, $comparison = null)
    {
        if (is_array($dateentered)) {
            $useMinMax = false;
            if (isset($dateentered['min'])) {
                $this->addUsingAlias(WhatsnewPeer::DATEENTERED, $dateentered['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($dateentered['max'])) {
                $this->addUsingAlias(WhatsnewPeer::DATEENTERED, $dateentered['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(WhatsnewPeer::DATEENTERED, $dateentered, $comparison);
    }

    /**
     * Filter the query on the Modified column
     *
     * Example usage:
     *
     * $query->filterByModified(1234); // WHERE Modified = 1234
     * $query->filterByModified(array(12, 34)); // WHERE Modified IN (12, 34)
     * $query->filterByModified(array('min' => 12)); // WHERE Modified >= 12
     * $query->filterByModified(array('max' => 12)); // WHERE Modified <= 12
     *
     *
     * @param     mixed $modified The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function filterByModified($modified = null, $comparison = null)
    {
        if (is_array($modified)) {
            $useMinMax = false;
            if (isset($modified['min'])) {
                $this->addUsingAlias(WhatsnewPeer::MODIFIED, $modified['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($modified['max'])) {
                $this->addUsingAlias(WhatsnewPeer::MODIFIED, $modified['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(WhatsnewPeer::MODIFIED, $modified, $comparison);
    }

    /**
     * Filter the query on the DateModified column
     *
     * Example usage:
     *
     * $query->filterByDatemodified('2011-03-14'); // WHERE DateModified = '2011-03-14'
     * $query->filterByDatemodified('now'); // WHERE DateModified = '2011-03-14'
     * $query->filterByDatemodified(array('max' => 'yesterday')); // WHERE DateModified < '2011-03-13'
     *
     *
     * @param     mixed $datemodified The value to use as filter.
     *              Values can be integers (unix timestamps), DateTime objects, or strings.
     *              Empty strings are treated as NULL.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function filterByDatemodified($datemodified = null, $comparison = null)
    {
        if (is_array($datemodified)) {
            $useMinMax = false;
            if (isset($datemodified['min'])) {
                $this->addUsingAlias(WhatsnewPeer::DATEMODIFIED, $datemodified['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($datemodified['max'])) {
                $this->addUsingAlias(WhatsnewPeer::DATEMODIFIED, $datemodified['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(WhatsnewPeer::DATEMODIFIED, $datemodified, $comparison);
    }

    /**
     * Filter the query on the Checked column
     *
     * Example usage:
     *
     * $query->filterByChecked(1234); // WHERE Checked = 1234
     * $query->filterByChecked(array(12, 34)); // WHERE Checked IN (12, 34)
     * $query->filterByChecked(array('min' => 12)); // WHERE Checked >= 12
     * $query->filterByChecked(array('max' => 12)); // WHERE Checked <= 12
     *
     *
     * @param     mixed $checked The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function filterByChecked($checked = null, $comparison = null)
    {
        if (is_array($checked)) {
            $useMinMax = false;
            if (isset($checked['min'])) {
                $this->addUsingAlias(WhatsnewPeer::CHECKED, $checked['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($checked['max'])) {
                $this->addUsingAlias(WhatsnewPeer::CHECKED, $checked['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(WhatsnewPeer::CHECKED, $checked, $comparison);
    }

    /**
     * Filter the query on the DateChecked column
     *
     * Example usage:
     *
     * $query->filterByDatechecked('2011-03-14'); // WHERE DateChecked = '2011-03-14'
     * $query->filterByDatechecked('now'); // WHERE DateChecked = '2011-03-14'
     * $query->filterByDatechecked(array('max' => 'yesterday')); // WHERE DateChecked < '2011-03-13'
     *
     *
     * @param     mixed $datechecked The value to use as filter.
     *              Values can be integers (unix timestamps), DateTime objects, or strings.
     *              Empty strings are treated as NULL.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function filterByDatechecked($datechecked = null, $comparison = null)
    {
        if (is_array($datechecked)) {
            $useMinMax = false;
            if (isset($datechecked['min'])) {
                $this->addUsingAlias(WhatsnewPeer::DATECHECKED, $datechecked['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($datechecked['max'])) {
                $this->addUsingAlias(WhatsnewPeer::DATECHECKED, $datechecked['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(WhatsnewPeer::DATECHECKED, $datechecked, $comparison);
    }

    /**
     * Filter the query on the TS column
     *
     * Example usage:
     *
     * $query->filterByTs('2011-03-14'); // WHERE TS = '2011-03-14'
     * $query->filterByTs('now'); // WHERE TS = '2011-03-14'
     * $query->filterByTs(array('max' => 'yesterday')); // WHERE TS < '2011-03-13'
     *
     *
     * @param     mixed $ts The value to use as filter.
     *              Values can be integers (unix timestamps), DateTime objects, or strings.
     *              Empty strings are treated as NULL.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function filterByTs($ts = null, $comparison = null)
    {
        if (is_array($ts)) {
            $useMinMax = false;
            if (isset($ts['min'])) {
                $this->addUsingAlias(WhatsnewPeer::TS, $ts['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($ts['max'])) {
                $this->addUsingAlias(WhatsnewPeer::TS, $ts['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(WhatsnewPeer::TS, $ts, $comparison);
    }

    /**
     * Exclude object from result
     *
     * @param   Whatsnew $whatsnew Object to remove from the list of results
     *
     * @return WhatsnewQuery The current query, for fluid interface
     */
    public function prune($whatsnew = null)
    {
        if ($whatsnew) {
            $this->addUsingAlias(WhatsnewPeer::FEATURECODE, $whatsnew->getFeaturecode(), Criteria::NOT_EQUAL);
        }

        return $this;
    }

}


text:
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames'
import TodoTextInput from './TodoTextInput'
import { inject } from 'alfa'

class TodoItem extends Component {
  static propTypes = {
    todo: PropTypes.object.isRequired,
    editTodo: PropTypes.func.isRequired,
    deleteTodo: PropTypes.func.isRequired,
    completeTodo: PropTypes.func.isRequired
  }

  state = {
    editing: false
  }

  handleDoubleClick = () => {
    this.setState({
      editing: true
    })
  }

  handleSave = (todoID, todoText) => {
    if (0 === todoText.length) {
      this.props.deleteTodo({ todoID })
    } else {
      this.props.editTodo({ todoID, todoText })
    }
    this.setState({
      editing: false
    })
  }

  render() {
    const { todo, completeTodo, deleteTodo } = this.props

    let element
    if (this.state.editing) {
      element = (
        <TodoTextInput
          text={todo.text}
          editing={this.state.editing}
          onSave={text => this.handleSave(todo.id, text)}
        />
      )
    } else {
      element = (

          <input
            className="toggle"
            type="checkbox"
            checked={todo.completed}
            onChange={() => completeTodo({ todoID: todo.id })}
          />
          {todo.text}
          <button
            className="destroy"
            onClick={() => deleteTodo({ todoID: todo.id })}
          />

      )
    }

    const css = classnames({
      completed: todo.completed,
      editing: this.state.editing
    })
    return
{element}

  }
}

export default inject(
  TodoItem,
  ['editTodo', 'deleteTodo', 'completeTodo'],
  ['todos']
)


text:
<?xml version="1.0" encoding="UTF-8"?>
<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>com.yammer.collections</groupId>
    <artifactId>yammer-collections</artifactId>
    <version>0.0.7-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>Yammer Collections</name>
    <description>Collections utilities which build on top of Guava and the standard collections library.</description>
    <url>https://github.com/yammer/yammer-collections</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <guava.version>16.0.1</guava.version>
        <junit.version>4.11</junit.version>
        <mockito.version>1.8.4</mockito.version>
        <hamcrest.version>1.3</hamcrest.version>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <type>jar</type>
            <scope>test</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <scm>
        <connection>scm:git:git://github.com/yammer/yammer-collections.git</connection>
        <developerConnection>scm:git:git@github.com:yammer/yammer-collections.git</developerConnection>
        <url>https://github.com/yammer/yammer-collections/</url>
        <tag>HEAD</tag>
    </scm>

    <developers>
        <developer>
            <name>Michal Rutkowski</name>
            <email>mrutkowski@yammer-inc.com</email>
            <timezone>0</timezone>
        </developer>
    </developers>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <keyname>28D77313</keyname>
                            <useAgent>true</useAgent>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.4.2</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.0.1</version>
                <configuration>
                    <rules>
                        <DependencyConvergence />
                    </rules>
                </configuration>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ JBoss, Home of Professional Open Source.
  ~ Copyright 2015, Red Hat, Inc., and individual contributors
  ~ as indicated by the @author tags. See the copyright.txt file in the
  ~ distribution for a full listing of individual contributors.
  ~
  ~ This is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This software is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this software; if not, write to the Free
  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  -->
<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>

    <parent>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>15</version>
    </parent>

    <groupId>org.openshift.ping</groupId>
    <artifactId>openshift-ping-parent</artifactId>
    <version>1.2.6.Final</version>
    <packaging>pom</packaging>

    <name>OpenShift PING - Parent</name>
    <description>Openshift PING - Parent</description>

    <licenses>
        <license>
            <name>Apache License Version 2.0</name>
            <url>https://repository.jboss.org/licenses/apache-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <!-- Impl -->
        <version.oauth>20100527</version.oauth>
        <version.httpserver>1.0.4.Final</version.httpserver>
        <version.undertow>2.2.0.Final</version.undertow>
        <version.junit>4.13.1</version.junit>
        <!-- Build -->
        <version.org.apache.ant>1.8.2</version.org.apache.ant>
        <version.org.apache.activemq>5.15.9</version.org.apache.activemq>
        <version.org.jboss.jandex>1.2.1.Final</version.org.jboss.jandex>
        <version.rhino.js>1.7R2</version.rhino.js>
    </properties>

    <modules>
        <module>common</module>
        <module>dns</module>
        <module>kube</module>
        <module>activemq</module>
        <module>examples/apps</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.openshift.ping</groupId>
                <artifactId>openshift-ping-common</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>org.openshift.ping</groupId>
                <artifactId>openshift-ping-dns</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>org.openshift.ping</groupId>
                <artifactId>openshift-ping-kube</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>org.jgroups</groupId>
                <artifactId>jgroups</artifactId>
                <version>${version.jgroups}</version>
            </dependency>

            <dependency>
                <groupId>org.jboss</groupId>
                <artifactId>jboss-dmr</artifactId>
                <version>${version.dmr}</version>
            </dependency>

            <dependency>
                <groupId>net.oauth.core</groupId>
                <artifactId>oauth</artifactId>
                <version>${version.oauth}</version>
            </dependency>

            <dependency>
                <groupId>org.jboss.com.sun.httpserver</groupId>
                <artifactId>httpserver</artifactId>
                <version>${version.httpserver}</version>
            </dependency>

            <dependency>
                <groupId>io.undertow</groupId>
                <artifactId>undertow-core</artifactId>
                <version>${version.undertow}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.activemq</groupId>
                <artifactId>activemq-client</artifactId>
                <version>${version.org.apache.activemq}</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${version.junit}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <!-- Create eap/wildfly distributions -->
            <id>dist</id>
            <modules>
                <module>dist</module>
            </modules>
        </profile>
        <profile>
            <id>wildfly</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <!-- Impl -->
                <version.jgroups>3.6.13.Final</version.jgroups>
                <version.dmr>1.2.0.Final</version.dmr>
                <!-- Build -->
                <version.org.wildfly>8.2.1.Final</version.org.wildfly>
            </properties>
            <dependencyManagement>
                <dependencies>
                    <dependency>
                        <groupId>org.wildfly</groupId>
                        <artifactId>wildfly-dist</artifactId>
                        <version>${version.org.wildfly}</version>
                        <type>zip</type>
                    </dependency>
                    <dependency>
                        <groupId>org.wildfly</groupId>
                        <artifactId>wildfly-clustering-common</artifactId>
                        <version>${version.org.wildfly}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.wildfly</groupId>
                        <artifactId>wildfly-clustering-jgroups</artifactId>
                        <version>${version.org.wildfly}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.wildfly</groupId>
                        <artifactId>wildfly-ee</artifactId>
                        <version>${version.org.wildfly}</version>
                    </dependency>
                </dependencies>
            </dependencyManagement>
        </profile>
        <profile>
            <id>eap</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <!-- Impl -->
                <version.jgroups>3.2.14.Final-redhat-1</version.jgroups>
                <version.dmr>1.2.2.Final-redhat-1</version.dmr>
                <!-- Build -->
                <version.org.jboss.as>7.5.3.Final-redhat-2</version.org.jboss.as>
                <version.org.jboss.eap>6.4.3</version.org.jboss.eap>
                <version.org.jboss.eap.urlpath>JBEAP-6/6.4.3</version.org.jboss.eap.urlpath>
            </properties>
            <dependencyManagement>
                <dependencies>
                    <dependency>
                        <groupId>org.jboss.as</groupId>
                        <artifactId>jboss-as-clustering-common</artifactId>
                        <version>${version.org.jboss.as}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.jboss.as</groupId>
                        <artifactId>jboss-as-clustering-jgroups</artifactId>
                        <version>${version.org.jboss.as}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.jboss.as</groupId>
                        <artifactId>jboss-as-ee</artifactId>
                        <version>${version.org.jboss.as}</version>
                    </dependency>
                </dependencies>
            </dependencyManagement>
        </profile>
        <profile>
            <id>jdg7</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <!-- Impl -->
                <version.jgroups>4.0.1.Final</version.jgroups>
                <version.dmr>1.2.0.Final</version.dmr>
                <!-- Build -->
                <version.org.wildfly>8.2.1.Final</version.org.wildfly>
            </properties>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Repository Group</name>
            <url>https://repository.jboss.org/nexus/content/groups/public/</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </repository>
        <repository>
            <id>jboss-enterprise-repository-group</id>
            <name>JBoss Enterprise Technology Preview Repository Group</name>
            <url>https://maven.repository.redhat.com/techpreview/all/</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Repository Group</name>
            <url>https://repository.jboss.org/nexus/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

</project>


text:
package cz.mendelu.xmarik.train_manager.events;

public class FoundServersReloadEvent {
    public FoundServersReloadEvent() {}
}


text:
# Partial Import [![Build Status][ci-img]][ci]

<img align="right" width="135" height="95" src="http://postcss.github.io/postcss/logo-leftp.png" title="Philosopher's stone, logo of PostCSS">

[Partial Import] is a [PostCSS] plugin that inlines standard and Sass-like `@import` statements.

```css
/* before file.css */

@import "foo/bar";

/* before foo/_bar.css */

html {
    background-color: #fafafa;
}

/* after */

html {
    background-color: #fafafa;
}

```

## Usage

Follow these steps to use [Partial Import].

Add [Partial Import] to your build tool:

```bash
npm install postcss-partial-import --save-dev
```

#### Node

```js
require('postcss-partial-import')({ /* options */ }).process(YOUR_CSS);
```

#### PostCSS

Add [PostCSS] to your build tool:

```bash
npm install postcss --save-dev
```

Load [Partial Import] as a PostCSS plugin:

```js
postcss([
    require('postcss-partial-import')({ /* options */ })
]);
```

#### Gulp

Add [Gulp PostCSS] to your build tool:

```bash
npm install gulp-postcss --save-dev
```

Enable [Partial Import] within your Gulpfile:

```js
var postcss = require('gulp-postcss');

gulp.task('css', function () {
    return gulp.src('./css/src/*.css').pipe(
        postcss([
            require('postcss-partial-import')({ /* options */ })
        ])
    ).pipe(
        gulp.dest('./css')
    );
});
```

#### Grunt

Add [Grunt PostCSS] to your build tool:

```bash
npm install grunt-postcss --save-dev
```

Enable [Partial Import] within your Gruntfile:

```js
grunt.loadNpmTasks('grunt-postcss');

grunt.initConfig({
    postcss: {
        options: {
            processors: [
                require('postcss-partial-import')({ /* options */ })
            ]
        },
        dist: {
            src: 'css/*.css'
        }
    }
});
```

## Options

#### `encoding`

Type: `String`
Default: `utf8`

The character encoding of files being imported.

#### `extension`

Type: `String`
Default: `css`

The file extension appended to partials being imported.

#### `prefix`

Type: `String`
Default: `_`

The file extension sometimes prepended to partials being imported.

#### `cachedir`

Type: `String`
Default: `null`

The directory to store cached includes in. Can reduce compilation time when there are a lot of `@include`s. Setting this property enables the cache.

[ci]: https://travis-ci.org/jonathantneal/postcss-partial-import
[ci-img]: https://travis-ci.org/jonathantneal/postcss-partial-import.svg
[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
[PostCSS]: https://github.com/postcss/postcss
[Partial Import]: https://github.com/jonathantneal/postcss-partial-import


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

Session Overview

This lecture discusses how indirection is used to provide an efficient implementation of Python lists and other data structures. It also presents and analyzes the efficiency of selection and merge sort.

Session Activities

Lecture Videos

Lecture 9: Memory and Search Methods (00:48:08)

Flash and JavaScript are required for this feature.

Lecture 9: Memory and Search Methods

> Download from iTunes U (MP4)

> Download from Internet Archive (MP4)

Check Yourself

What is indirection (in computing)?

› View/hide answer

Indirection is the ability to access something using a name or reference instead of the value itself.

We know that a linear search works on all lists and is O(len(L)).  Can we sort a list in sub-linear time?

› View/hide answer

No, because we can't sort a list without looking at each element at least once.

Can we even do it in linear time?

› View/hide answer

The answer is probably, no. But we can do it in O(n log n), where n is the length of the list.

Further Study

These optional resources are provided for students that wish to explore this topic more fully.

Readings

8.7. Sets—Unordered collections of unique elements. Python Standard Library.

Related Lectures

6.01SC Introduction to Electrical Engineering and Computer Science I.

Search Algorithms

Optimizing a search

6.006 Introduction to Algorithms. 6.006 lectures assume a greater level of mathematical sophistication than does 6.00SC. Read the lecture notes on:

Binary search trees

Sorting

Searching


text:
package org.apache.lucene.analysis.icu;

import java.io.IOException;
import java.io.Reader;

import org.apache.lucene.analysis.*;
import org.apache.lucene.analysis.core.KeywordTokenizer;

/**
 * Tests ICUFoldingFilter
 */
public class TestICUFoldingFilter extends BaseTokenStreamTestCase {
  Analyzer a = new Analyzer() {
    @Override
    public TokenStreamComponents createComponents(String fieldName) {
      Tokenizer tokenizer = new MockTokenizer(MockTokenizer.WHITESPACE, false);
      return new TokenStreamComponents(tokenizer, new ICUFoldingFilter(tokenizer));
    }
  };
  public void testDefaults() throws IOException {
    // case folding
    assertAnalyzesTo(a, "This is a test", new String[] { "this", "is", "a", "test" });

    // case folding
    assertAnalyzesTo(a, "Ruß", new String[] { "russ" });

    // case folding with accent removal
    assertAnalyzesTo(a, "ΜΆΪΟΣ", new String[] { "μαιοσ" });
    assertAnalyzesTo(a, "Μάϊος", new String[] { "μαιοσ" });

    // supplementary case folding
    assertAnalyzesTo(a, "𐐖", new String[] { "𐐾" });

    // normalization
    assertAnalyzesTo(a, "ﴳﴺﰧ", new String[] { "طمطمطم" });

    // removal of default ignorables
    assertAnalyzesTo(a, "क्‍ष", new String[] { "कष" });

    // removal of latin accents (composed)
    assertAnalyzesTo(a, "résumé", new String[] { "resume" });

    // removal of latin accents (decomposed)
    assertAnalyzesTo(a, "re\u0301sume\u0301", new String[] { "resume" });

    // fold native digits
    assertAnalyzesTo(a, "৭০৬", new String[] { "706" });

    // ascii-folding-filter type stuff
    assertAnalyzesTo(a, "đis is cræzy", new String[] { "dis", "is", "craezy" });

    // proper downcasing of Turkish dotted-capital I
    // (according to default case folding rules)
    assertAnalyzesTo(a, "ELİF", new String[] { "elif" });

    // handling of decomposed combining-dot-above
    assertAnalyzesTo(a, "eli\u0307f", new String[] { "elif" });
  }

  /** blast some random strings through the analyzer */
  public void testRandomStrings() throws Exception {
    checkRandomData(random(), a, 1000*RANDOM_MULTIPLIER);
  }

  public void testEmptyTerm() throws IOException {
    Analyzer a = new Analyzer() {
      @Override
      protected TokenStreamComponents createComponents(String fieldName) {
        Tokenizer tokenizer = new KeywordTokenizer();
        return new TokenStreamComponents(tokenizer, new ICUFoldingFilter(tokenizer));
      }
    };
    checkOneTerm(a, "", "");
  }
}


text:
WordServer
==========
Web service which utilizes Princeton's WordNet databases for looking up words (dictionary, thesaurus, etc)


text:
import requests
import uuid
import json
from connect.data import get_email_text

# The base URL for the Microsoft Graph API.
graph_api_endpoint = 'https://graph.microsoft.com/beta{0}'

def call_sendMail_endpoint(access_token, alias, emailAddress):
	# The resource URL for the sendMail action.
  send_mail_url = graph_api_endpoint.format('/me/sendMail')

	# Set request headers.
  headers = {
		'User-Agent' : 'python_tutorial/1.0',
		'Authorization' : 'Bearer {0}'.format(access_token),
		'Accept' : 'application/json',
		'Content-Type' : 'application/json'
	}

	# Use these headers to instrument calls. Makes it easier
	# to correlate requests and responses in case of problems
	# and is a recommended best practice.
  request_id = str(uuid.uuid4())
  instrumentation = {
		'client-request-id' : request_id,
		'return-client-request-id' : 'true'
	}
  headers.update(instrumentation)

	# Create the email that is to be sent with API.
  email = {
		'Message': {
			'Subject': 'Welcome to Office 365 development with Python and the Office 365 Connect sample',
			'Body': {
				'ContentType': 'HTML',
				'Content': get_email_text(alias)
			},
			'ToRecipients': [
				{
					'EmailAddress': {
						'Address': emailAddress
					}
				}
			]
		},
		'SaveToSentItems': 'true'
	}

  response = requests.post(url = send_mail_url, headers = headers, data = json.dumps(email), params = None)

	# Check if the response is 202 (success) or not (failure).
  if (response.status_code == requests.codes.accepted):
    return response.status_code
  else:
    return "{0}: {1}".format(response.status_code, response.text)

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


text:
/*------------------------------------------------------------------
Bootstrap Admin Template by EGrappler.com
------------------------------------------------------------------*/

/* [1. Global] */

@font-face {
    font-family: 'euphemiaregular';
    src: url('euphemia-webfont.eot');
    src: url('euphemia-webfont.eot?#iefix') format('embedded-opentype'),
        url('euphemia-webfont.woff') format('woff'),
        url('euphemia-webfont.ttf') format('truetype'),
        url('euphemia-webfont.svg#euphemiaregular') format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    src: local('Open Sans'), local('OpenSans'), url(http://themes.googleusercontent.com/static/fonts/opensans/v8/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff');
}
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 600;
    src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://themes.googleusercontent.com/static/fonts/opensans/v8/MTP_ySUJH_bn48VBG8sNSnhCUOGz7vYGh680lGh-uXM.woff) format('woff');
}
@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: 400;
    src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v8/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff');
}
@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: 600;
    src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v8/PRmiXeptR36kaC0GEAetxn5HxGBcBvicCpTp6spHfNo.woff) format('woff');
}

body {
    background: #f9f6f1;
}

.dropdown .dropdown-menu {
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    border-radius: 6px;
}

.btn-icon-only {
    padding-right: 3px;
    padding-left: 3px;
}

/*------------------------------------------------------------------
[3. Subnavbar / .subnavbar]
*/

.subnavbar {
    font: 13px/1.7em 'euphemiaregular';
    margin-bottom: 2.5em;
    margin-top: -20px;
}

.subnavbar-inner {
    height: 60px;
    background: #066; /* #2383C4; */
    border-bottom: 1px solid #d6d6d6;
}

.subnavbar .container > ul {
    display: inline-block;

    height: 80px;
    padding: 0;
    margin: 0;
}

.subnavbar .container > ul > li {
    float: left;
    min-width: 124px;
    height: 60px;
    padding: 0;
    margin: 0;
    text-align: center;
    list-style: none;
    /* to remove if needed */
    background-color: #ff5500;
    border-left: 1px solid #d9d9d9;
    border-right: 1px solid #d9d9d9;
}

.subnavbar .container > ul > li > a {
    display: block;

    height: 100%;
    padding: 0 15px;

    font-size: 12px;
    font-weight: bold;
    color: #fff;
}

.subnavbar .container > ul > li > a:hover {
    color: #ddd;
    text-decoration: none;
}

.subnavbar .container > ul > li > a > i {
    display: inline-block;

    width: 24px;
    height: 24px;
    margin-top: 11px;
    margin-bottom: -3px;
    font-size: 20px;
}

.subnavbar .container > ul > li > a > span {
    display: block;

}

.subnavbar .container > ul > li.active > a {
    border-bottom:4px solid #006666;
    border-bottom: 4px solid #006666;
    color: #fff;
}

.subnavbar .dropdown .dropdown-menu a {
    font-size: 12px;
}

.subnavbar .dropdown .dropdown-menu {
    text-align: left;

    -webkit-border-top-left-radius: 0;
    -webkit-border-top-right-radius: 0;
    -moz-border-radius-topleft: 0;
    -moz-border-radius-topright: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.subnavbar .dropdown-menu::before {
    content: '';
    display: inline-block;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid #CCC;
    border-bottom-color: rgba(0, 0, 0, 0.2);
    position: absolute;
    top: -7px;
    left: 9px;
}

.subnavbar .dropdown-menu::after {
    content: '';
    display: inline-block;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid white;
    position: absolute;
    top: -6px;
    left: 10px;
}

/*------------------------------------------------------------------
[1. Max Width: 767px]
*/

@media (max-width: 767px) {

    #main {
        padding: 0 10px;
        margin-right: -20px;
        margin-left: -20px;
    }

    .subnavbar {
        margin-left: -20px;
        margin-right: -20px;
    }

    .subnavbar-inner {
        height: auto;
    }

    .subnavbar .container > ul {
        width: 100%;
        height: auto;

        border: none;
    }

    .subnavbar .container > ul > li {
        width: 33%;
        height: 70px;
        margin-bottom: 0;

        border-left: 1px solid #d9d9d9;
        border-right: 1px solid #d9d9d9;
        border-bottom: 1px solid #d9d9d9;
    }

    .subnavbar .container > ul > li.active > a {
        font-size: 11px;
        background: transparent;
    }

    .subnavbar .container > ul > li > a > i {
        display: inline-block;
        margin-bottom: 0;

        font-size: 20px;
    }

    .subnavbar-open-right .dropdown-menu {
        left: auto;
        right: 0;
    }

    .subnavbar-open-right .dropdown-menu:before {
        left: auto;
        right: 12px;
    }
    .subnavbar-open-right .dropdown-menu:after {
        left: auto;
        right: 13px;
    }
}

/*------------------------------------------------------------------
[3. Max Width: 979px]
*/

@media (max-width: 979px) {

    .navbar-fixed-top {
        position: static;

        margin-bottom: 0;
    }

    .subnavbar {
    }

    .subnavbar .container {
        width: auto;
    }
}


text:
package alert

import (
	"fmt"
	"io"
	"log"
	"os"
	"os/user"
	"path/filepath"
	"sync"
	"time"

	"github.com/enova/tokyo/src/cfg"
)

// Globals
var (
	cerrLock      sync.Mutex
	sendLock      sync.Mutex
	logFile       *os.File
	consoleStream io.Writer
	panicOnExit   bool
	handlers      []Handler
	meta          Meta
)

// PanicOnExit will cause the alert package to call panic() instead of os.exit()
func PanicOnExit() {
	panicOnExit = true
}

// SetErr sets the writer for console output. The default writer is os.Stderr.
func SetErr(w io.Writer) {
	consoleStream = w
}

// Set configures the alert settings
func Set(cfg *cfg.Config) {

	// Configure: Sentry-Client
	if alertCfg, ok := getCfg("Sentry", cfg); ok {
		setSentry(alertCfg)
	}

	// Configure: Multicast-Client
	if alertCfg, ok := getCfg("Multicast", cfg); ok {
		setMulticast(alertCfg)
	}

	// Configure: Log-File
	if alertCfg, ok := getCfg("LogFile", cfg); ok {
		setLogFile(alertCfg)
	}
}

// SetLogDir ...
func SetLogDir(dir string) {

	// Construct Log-File Path
	_, app := filepath.Split(os.Args[0])
	now := time.Now().Format("20060102_150405_000")
	pid := os.Getpid()
	filename := fmt.Sprintf("%s/%s_%s_%d.log", dir, app, now, pid)

	// Create Directory
	err := os.MkdirAll(dir, 0755)
	if err != nil {
		Cerr("Alert: Can't create log directory: " + dir)
		log.Fatal(err)
	}

	// Append Log-File
	logFile, err = os.OpenFile(filename, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0666)
	if err != nil {
		Cerr("Alert: Can't append file: " + filename + ", " + err.Error())
		log.Fatal(err)
	}

	Cerr("LogFile: " + filename)
}

// AddHandler adds the supplied handler to the list of handlers
func AddHandler(h Handler) {
	handlers = append(handlers, h)
}

func console() io.Writer {
	if consoleStream != nil {
		return consoleStream
	}
	return os.Stderr
}

func username() string {
	user, err := user.Current()
	if err != nil {
		return "unknown_user"
	}
	return user.Username
}

// AddPrefix prepends the supplied prefix to msgs slice
func addPrefix(prefix string, msgs ...interface{}) []interface{} {
	fields := make([]interface{}, 1, len(msgs)+1)
	fields[0] = prefix + ":"
	fields = append(fields, msgs...)
	return fields
}

// Returns the config for the given path, else nil and then also returns true if found
func getCfg(cfgPath string, cfg *cfg.Config) (*cfg.Config, bool) {

	// If path has a '.Use', ...
	if cfg.Has("Alert." + cfgPath + ".Use") {

		// ...and Use is True...
		use := cfg.Get("Alert." + cfgPath + ".Use")
		if use == "true" || use == "True" {

			// ...Get Alert configuration for path
			return cfg.Descend("Alert." + cfgPath), true
		}
	}
	return nil, false
}

// TagsToS ...
func tagsToS(tags map[string]string) string {
	result := "("
	first := true

	for _, v := range tags {
		if !first {
			result += ","
		}
		result += v
		first = false
	}
	result += ")"
	return result
}

// Configure Log-File
func setLogFile(cfg *cfg.Config) {

	// Get Log-Directory
	dir := cfg.Get("Dir")
	SetLogDir(dir)
}

// Send a message
func send(level Level, fields ...interface{}) {

	// Create New Message
	msg := buildMessage(level, fields...)

	// Sending Is Reentrant
	sendLock.Lock()
	defer sendLock.Unlock()

	// Write to Console
	Cerr(msg.Pretty())

	// Write to Log-File
	if logFile != nil {
		fmt.Fprintf(logFile, "%s\n", msg.Pretty())
	}

	// Send To External Services
	if !msg.Whisper() {

		// Write to Sentry
		sendToSentry(msg)

		// Write to multicast
		sendToMulticast(msg)
	}

	// Send To Custom-Handlers
	for _, h := range handlers {
		h.Handle(*msg)
	}
}

// Timestamp
func timestamp() string {
	return time.Now().Format("20060102-15:04:05")
}

// Cerr ...
func Cerr(msg string) {
	cerrLock.Lock()
	defer cerrLock.Unlock()
	fmt.Fprintf(console(), "%s\n", msg)
}

// Info ...
func Info(msgs ...interface{}) {
	send(LevelInfo, msgs...)
}

// Warn ...
func Warn(msgs ...interface{}) {
	send(LevelWarn, msgs...)
}

// WarnIf invokes a warning if there was a failure
func WarnIf(failure bool, msgs ...interface{}) {
	if failure {
		Warn(msgs)
	}
}

// WarnOn invokes a warning containing both the error message
// and the supplied message if there was an error
func WarnOn(err error, msgs ...interface{}) {
	if err != nil {
		fields := addPrefix("("+err.Error()+")", msgs...)
		Warn(fields)
	}
}

// Exit ...
func Exit(msgs ...interface{}) {
	send(LevelExit, msgs...)
	if panicOnExit {
		err := fmt.Errorf("%+v", msgs)
		panic(err)
	}
	os.Exit(1)
}

// ExitIf ...
func ExitIf(failure bool, msgs ...interface{}) {
	if failure {
		Exit(msgs)
	}
}

// ExitOn ...
func ExitOn(err error, msgs ...interface{}) {
	if err != nil {
		fields := addPrefix(err.Error(), msgs...)
		Exit(fields)
	}
}


text:
/**
 * Created by daniel on 2015-07-24.
 */
(function () {
    'use strict';

    angular
        .module('app.tables')
        .directive('spTableInfo', spTableInfo);

    spTableInfo.$inject = [];
    /* @ngInject */
    function spTableInfo() {

        var directive = {
            restrict: 'E',
            require: '^stTable',
            template:   '
Showing ' +
                        '{{numberOfFirstEntryOnPage()}} to ' +
                        '{{numberOfLastEntryOnPage()}} of ' +
                        '{{totalNoOfEntries()}} entries
',
            link: link
        };
        return directive;

        function link(scope, element, attrs, ctrl) {

            scope.numberOfFirstEntryOnPage = numberOfFirstEntryOnPage;
            scope.numberOfLastEntryOnPage = numberOfLastEntryOnPage;
            scope.totalNoOfEntries = totalNoOfEntries;

            function totalNoOfEntries() {
                return ctrl.tableState().pagination.totalItemCount;
            }

            function numberOfFirstEntryOnPage() {
                return ctrl.tableState().pagination.start + 1;
            }

            function numberOfLastEntryOnPage() {
                var total = totalNoOfEntries();
                var last = numberOfFirstEntryOnPage() + ctrl.tableState().pagination.number - 1;
                if (last > total) {
                    return total;
                } else {
                    return last;
                }
            }
        }
    }
})();


text:
define("dojox/mobile/_ListTouchMixin",["dojo/_base/declare","dijit/form/_ListBase"],function(_1,_2){
return _1("dojox.mobile._ListTouchMixin",_2,{postCreate:function(){
this.inherited(arguments);
this._listConnect("click","_onClick");
},_onClick:function(_3,_4){
this._setSelectedAttr(_4);
this.onClick(_4);
}});
});


text:
layout: post
title: Journey - a photo by dad
categories:
- Musing
---

I just had to post this beautiful photo taken ages ago in film camera and developed by himself in his dark room... by dad. It was probably taken on the [beaches of Digha](http://www.dighabeach.com/) because the waves seem so much gentler than the seas that directly overlook the Bay of Bengal. I love the way the graceful horse makes its way to the seeming horizon...

![](/img/sol78345693.jpg)

Ever since we brought back one of dad's black and white photo albums, i have been looking at them and restoring the torn edges and the discoloured parts. Wheee... he's simply excited to look at them like new ones!!


text:
<!--This file provides configuration values to the setup configuration script in case the script runs in unattended mode.
    Run the setup configuration script with one argument with the same path of the current XML file when the script runs in unattended mode. -->
<!-- Note: Property values are case-insensitive unless otherwise specified. -->
<Properties>
    <!-- The isSutConfigured property specifies whether the SUT is configured before running the client setup script.
    The supported values are:
    "Y", the SUT is configured;
    "N", the SUT is not configured. -->
    <Property name="isSutConfigured" value="Y" />
    <!-- The runOnNonRecommendedOS property specifies whether to run the client setup script when the operating system is not the recommended version.
    The supported values are:
    "1", run the client setup script;
    "2", exit the client setup script. -->
    <Property name="runOnNonRecommendedOS" value="1" />
    <!-- The runWithoutRequiredAppInstalled property defines whether to continue running the client setup script without installing the required application(s).
    The possible values are:
    "1", continue running the client setup script;
    "2", exit and install the required application(s). -->
    <Property name="runWithoutRequiredAppInstalled" value="1" />
    <!-- The sutComputerName property specifies the name of the SUT (system under test). -->
    <Property name="sutComputerName" value="SUT01" />
    <!-- The useCurrentUser property specifies whether to use the current logon domain user. This user is used to call protocol methods and remotely configure the SUT if the SUT control adapter is set to PowerShell mode.
		The user should be able to create users in Active Directory directory service, be a part of the local admin group on the server, and also be the SUT administrator.
		The supported values are:
        "Y", use the current logon domain user;
        "N", not use the current logon domain user. -->
    <Property name="useCurrentUser" value="N" />
    <!-- The dnsDomain property specifies the domain name. This property will be ignored if the value of the useCurrentUser property is set to "Y". -->
    <Property name="dnsDomain" value="contoso.com" />
    <!-- The userName property specifies a user name which can be used by a client to access the SUT. The user corresponding to the username should be an administrator of the SharePoint server. This property will be ignored if the value of the useCurrentUser property is set to "Y". -->
    <Property name="userName" value="administrator" />
    <!-- The password property specifies the password for the user specified in the userName property. The property value is case-sensitive. -->
    <Property name="password" value="Password01!" />
    <!-- The transportType property specifies the transport type which is used to transfer the messages between the client and the SUT.
        The supported values are:
        "1", the transport type is HTTP;
        "2", the transport type is HTTPS. -->
    <Property name="transportType" value="1"/>

    <!-- The following properties are only used if they are not retrieved automatically by the setup configuration script. -->
    <!-- The sutVersion property specifies the version of the first or the second SUT. If the product version that you want is not listed, enter the value corresponding to the closest version of the product.
		The supported values are:
        "1", (Microsoft SharePoint Foundation 2010 SP2);
        "2", (Microsoft SharePoint Server 2010 SP2);
        "3", (Microsoft SharePoint Foundation 2013 SP1);
        "4", (Microsoft SharePoint Server 2013 SP1). -->
    <Property Name="sutVersion" Value="3" />
    <!-- The SharePointUserName property is a form that enables users to manually enter a property name if the setup script cannot automatically retrieve the information of a SharePoint user. Enter the user name in the "SharePointUserName" property, and in "SharePointUserDisplayName", enter the same value as the user's DisplayName attribute. -->
    <Property name="SharePointUserName" value="SharePointUserDisplayName" />
</Properties>


text:
package domain.budpacks;

import application.bootstrap.BudPackDescriptor;
import application.bootstrap.RoleDescriptor;
import domain.buds.Bud;
import domain.roles.Role;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.qi4j.api.entity.EntityBuilder;
import org.qi4j.api.injection.scope.Structure;
import org.qi4j.api.injection.scope.Uses;
import org.qi4j.api.mixin.Mixins;
import org.qi4j.api.service.ServiceActivation;
import org.qi4j.api.service.ServiceComposite;
import org.qi4j.api.service.ServiceDescriptor;
import org.qi4j.api.structure.Module;
import play.libs.Json;

@Mixins( BudPacksService.Mixin.class )
public interface BudPacksService
    extends ServiceComposite, ServiceActivation
{

    Collection<BudPackDescriptor> budPacks();

    BudPackDescriptor budPack( String name );

    Collection<RoleDescriptor> roles();

    Collection<RoleDescriptor> unusedRoles( Bud bud );

    Role newRoleInstance( Bud bud, String budPackName, String roleName );

    abstract class Mixin
        implements BudPacksService
    {

        @Structure
        private Module module;
        @Uses
        private ServiceDescriptor descriptor;
        private Map<String, BudPackDescriptor> budPacks;
        private Map<String, RoleDescriptor> roles;

        @Override
        public void activateService()
            throws Exception
        {
            budPacks = descriptor.metaInfo( Map.class );
            roles = new HashMap<String, RoleDescriptor>();
            for( BudPackDescriptor budPack : budPacks.values() )
            {
                roles.putAll( budPack.roles() );
            }
        }

        @Override
        public void passivateService()
            throws Exception
        {
            budPacks = null;
            roles = null;
        }

        @Override
        public Collection<BudPackDescriptor> budPacks()
        {
            return budPacks.values();
        }

        @Override
        public Collection<RoleDescriptor> roles()
        {
            return roles.values();
        }

        @Override
        public BudPackDescriptor budPack( String name )
        {
            return budPacks.get( name );
        }

        @Override
        public Collection<RoleDescriptor> unusedRoles( Bud bud )
        {
            List<RoleDescriptor> unused = new ArrayList<RoleDescriptor>( roles.values() );
            for( Role budRole : bud.roles() )
            {
                Iterator<RoleDescriptor> it = unused.iterator();
                while( it.hasNext() )
                {
                    RoleDescriptor availableRole = it.next();
                    if( availableRole.budPackName().equals( budRole.budPackName().get() )
                        && availableRole.name().equals( budRole.roleName().get() ) )
                    {
                        it.remove();
                    }
                }
            }
            return unused;
        }

        @Override
        public Role newRoleInstance( Bud bud, String budPackName, String roleName )
        {
            RoleDescriptor roleDescriptor = budPacks.get( budPackName ).roles().get( roleName );
            EntityBuilder<? extends Role> roleBuilder = module.currentUnitOfWork().newEntityBuilder( roleDescriptor.roleType() );
            Role role = roleBuilder.instance();
            role.budPackName().set( roleDescriptor.budPackName() );
            role.roleName().set( roleDescriptor.name() );
            role.roleState().set( Json.stringify( Json.newObject() ) );
            role = roleBuilder.newInstance();
            role.onCreate( bud );
            return role;
        }

    }

}


text:
layout: post
title:  SNAP/Food Stamps in different counties in Washington
date:   2017-10-2 10:59:00-0400
description: We look at the percentage of SNAP/Food Stamp recipients in different counties in WA
---

The Supplemental Nutritional Assistance Program (SNAP) offers assistance to millions of low-income people by providing benefits to buy food. More on the program can be learned from the [US Department of Agriculture's website](https://www.fns.usda.gov/snap/supplemental-nutrition-assistance-program-snap) and for the State of Washington, from its [Department of Social and Health Services' website](https://www.dshs.wa.gov/esa/community-services-offices/basic-food).

 (**Please note that all of the visualizations are interactive in nature. Hovering over/clicking individual observations may provide more information.**)

**According to 5-year estimates of the data collected during the the 2011-2015 American Community Survey, approximately 14.3% of Washington households received food stamps/SNAP.**

**Question 1:** How do the different counties in Washington stack up against each other with respect to the percentage of households that have received food stamps/SNAP? (Margin of error in measurement is also displayed.)

**Question 2:** Where are different counties geographically located?


text:
package shared_test

import (
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"

	"testing"
)

func TestShared(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "V3 Command's Shared Suite")
}


text:
/*jslint nomen:true*/
/*global define*/
define([
    'underscore',
    'backgrid',
    './footer-cell'
], function (_, Backgrid, FooterCell) {
    "use strict";

    var FooterRow;

    /**
     * FooterRow is a controller for a row of footer cells.
     *
     * @exports orodatagrid/js/datagrid/footer/footer-row
     * @class orodatagrid.datagrid.footer.FooterRow
     * @extends Backgrid.Row
     */
    FooterRow = Backgrid.Row.extend({
        /** @property */
        footerCell: FooterCell,

        requiredOptions: ["columns", "collection", "footerCell"],

        initialize: function (options) {
            this.options = options || {};
            FooterRow.__super__.initialize.apply(this, arguments);
        },

        /**
         * @inheritDoc
         */
        dispose: function () {
            if (this.disposed) {
                return;
            }
            _.each(this.cells, function (cell) {
                cell.dispose();
            });
            delete this.cells;
            delete this.columns;
            FooterRow.__super__.dispose.call(this);
        },

        makeCell: function (column, options) {
            var FooterCell = column.get("footerCell") || options.footerCell || this.footerCell;
            return new FooterCell({
                column: column,
                collection: this.collection,
                rowName: this.options.rowName
            });
        }
    });

    return FooterRow;
});