text:
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * Set of functions used for cleaning up phpMyAdmin tables
 *
 * @package PhpMyAdmin
 */

/**
 * Cleanup column related relation stuff
 *
 * @param string $db     database name
 * @param string $table  table name
 * @param string $column column name
 *
 * @return void
 */
function PMA_relationsCleanupColumn($db, $table, $column)
{
    $cfgRelation = PMA_getRelationsParam();

    if ($cfgRelation['commwork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['column_info'])
            . ' WHERE db_name  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\''
            . ' AND table_name = \'' . PMA\libraries\Util::sqlAddSlashes($table)
            . '\''
            . ' AND column_name = \'' . PMA\libraries\Util::sqlAddSlashes($column)
            . '\'';
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['displaywork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['table_info'])
            . ' WHERE db_name  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\''
            . ' AND table_name = \'' . PMA\libraries\Util::sqlAddSlashes($table)
            . '\''
            . ' AND display_field = \'' . PMA\libraries\Util::sqlAddSlashes($column)
            . '\'';
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['relwork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['relation'])
            . ' WHERE master_db  = \'' . PMA\libraries\Util::sqlAddSlashes($db)
            . '\''
            . ' AND master_table = \'' . PMA\libraries\Util::sqlAddSlashes($table)
            . '\''
            . ' AND master_field = \'' . PMA\libraries\Util::sqlAddSlashes($column)
            . '\'';
        PMA_queryAsControlUser($remove_query);

        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['relation'])
            . ' WHERE foreign_db  = \'' . PMA\libraries\Util::sqlAddSlashes($db)
            . '\''
            . ' AND foreign_table = \'' . PMA\libraries\Util::sqlAddSlashes($table)
            . '\''
            . ' AND foreign_field = \'' . PMA\libraries\Util::sqlAddSlashes($column)
            . '\'';
        PMA_queryAsControlUser($remove_query);
    }
}

/**
 * Cleanup table related relation stuff
 *
 * @param string $db    database name
 * @param string $table table name
 *
 * @return void
 */
function PMA_relationsCleanupTable($db, $table)
{
    $cfgRelation = PMA_getRelationsParam();

    if ($cfgRelation['commwork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['column_info'])
            . ' WHERE db_name  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\''
            . ' AND table_name = \'' . PMA\libraries\Util::sqlAddSlashes($table)
            . '\'';
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['displaywork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['table_info'])
            . ' WHERE db_name  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\''
            . ' AND table_name = \'' . PMA\libraries\Util::sqlAddSlashes($table)
            . '\'';
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['pdfwork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['table_coords'])
            . ' WHERE db_name  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\''
            . ' AND table_name = \'' . PMA\libraries\Util::sqlAddSlashes($table)
            . '\'';
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['relwork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['relation'])
            . ' WHERE master_db  = \'' . PMA\libraries\Util::sqlAddSlashes($db)
            . '\''
            . ' AND master_table = \'' . PMA\libraries\Util::sqlAddSlashes($table)
            . '\'';
        PMA_queryAsControlUser($remove_query);

        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['relation'])
            . ' WHERE foreign_db  = \'' . PMA\libraries\Util::sqlAddSlashes($db)
            . '\''
            . ' AND foreign_table = \'' . PMA\libraries\Util::sqlAddSlashes($table)
            . '\'';
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['uiprefswork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['table_uiprefs'])
            . ' WHERE db_name  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\''
            . ' AND table_name = \'' . PMA\libraries\Util::sqlAddSlashes($table)
            . '\'';
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['navwork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['navigationhiding'])
            . ' WHERE db_name  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\''
            . ' AND (table_name = \'' . PMA\libraries\Util::sqlAddSlashes($table)
            . '\''
            . ' OR (item_name = \'' . PMA\libraries\Util::sqlAddSlashes($table)
            . '\''
            . ' AND item_type = \'table\'))';
        PMA_queryAsControlUser($remove_query);
    }
}

/**
 * Cleanup database related relation stuff
 *
 * @param string $db database name
 *
 * @return void
 */
function PMA_relationsCleanupDatabase($db)
{
    $cfgRelation = PMA_getRelationsParam();

    if ($cfgRelation['commwork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['column_info'])
            . ' WHERE db_name  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\'';
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['bookmarkwork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['bookmark'])
            . ' WHERE dbase  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\'';
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['displaywork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['table_info'])
            . ' WHERE db_name  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\'';
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['pdfwork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['pdf_pages'])
            . ' WHERE db_name  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\'';
        PMA_queryAsControlUser($remove_query);

        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['table_coords'])
            . ' WHERE db_name  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\'';
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['relwork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['relation'])
            . ' WHERE master_db  = \''
            . PMA\libraries\Util::sqlAddSlashes($db) . '\'';
        PMA_queryAsControlUser($remove_query);

        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['relation'])
            . ' WHERE foreign_db  = \'' . PMA\libraries\Util::sqlAddSlashes($db)
            . '\'';
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['uiprefswork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['table_uiprefs'])
            . ' WHERE db_name  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\'';
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['navwork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['navigationhiding'])
            . ' WHERE db_name  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\'';
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['savedsearcheswork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['savedsearches'])
            . ' WHERE db_name  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\'';
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['centralcolumnswork']) {
        $remove_query = 'DELETE FROM '
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . '.' . PMA\libraries\Util::backquote($cfgRelation['central_columns'])
            . ' WHERE db_name  = \'' . PMA\libraries\Util::sqlAddSlashes($db) . '\'';
        PMA_queryAsControlUser($remove_query);
    }
}

/**
 * Cleanup user related relation stuff
 *
 * @param string $username username
 *
 * @return void
 */
function PMA_relationsCleanupUser($username)
{
    $cfgRelation = PMA_getRelationsParam();

    if ($cfgRelation['bookmarkwork']) {
        $remove_query = "DELETE FROM "
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . "." . PMA\libraries\Util::backquote($cfgRelation['bookmark'])
            . " WHERE `user`  = '" . PMA\libraries\Util::sqlAddSlashes($username)
            . "'";
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['historywork']) {
        $remove_query = "DELETE FROM "
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . "." . PMA\libraries\Util::backquote($cfgRelation['history'])
            . " WHERE `username`  = '" . PMA\libraries\Util::sqlAddSlashes($username)
            . "'";
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['recentwork']) {
        $remove_query = "DELETE FROM "
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . "." . PMA\libraries\Util::backquote($cfgRelation['recent'])
            . " WHERE `username`  = '" . PMA\libraries\Util::sqlAddSlashes($username)
            . "'";
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['favoritework']) {
        $remove_query = "DELETE FROM "
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . "." . PMA\libraries\Util::backquote($cfgRelation['favorite'])
            . " WHERE `username`  = '" . PMA\libraries\Util::sqlAddSlashes($username)
            . "'";
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['uiprefswork']) {
        $remove_query = "DELETE FROM "
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . "." . PMA\libraries\Util::backquote($cfgRelation['table_uiprefs'])
            . " WHERE `username`  = '" . PMA\libraries\Util::sqlAddSlashes($username)
            . "'";
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['userconfigwork']) {
        $remove_query = "DELETE FROM "
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . "." . PMA\libraries\Util::backquote($cfgRelation['userconfig'])
            . " WHERE `username`  = '" . PMA\libraries\Util::sqlAddSlashes($username)
            . "'";
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['menuswork']) {
        $remove_query = "DELETE FROM "
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . "." . PMA\libraries\Util::backquote($cfgRelation['users'])
            . " WHERE `username`  = '" . PMA\libraries\Util::sqlAddSlashes($username)
            . "'";
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['navwork']) {
        $remove_query = "DELETE FROM "
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . "." . PMA\libraries\Util::backquote($cfgRelation['navigationhiding'])
            . " WHERE `username`  = '" . PMA\libraries\Util::sqlAddSlashes($username)
            . "'";
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['savedsearcheswork']) {
        $remove_query = "DELETE FROM "
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . "." . PMA\libraries\Util::backquote($cfgRelation['savedsearches'])
            . " WHERE `username`  = '" . PMA\libraries\Util::sqlAddSlashes($username)
            . "'";
        PMA_queryAsControlUser($remove_query);
    }

    if ($cfgRelation['designersettingswork']) {
        $remove_query = "DELETE FROM "
            . PMA\libraries\Util::backquote($cfgRelation['db'])
            . "." . PMA\libraries\Util::backquote($cfgRelation['designer_settings'])
            . " WHERE `username`  = '" . PMA\libraries\Util::sqlAddSlashes($username)
            . "'";
        PMA_queryAsControlUser($remove_query);
    }
}


text:
package org.apache.camel.component.file.remote;

import org.apache.camel.component.file.GenericFileOperationFailedException;
import org.apache.camel.component.file.GenericFileOperations;

/**
 * Remote file operations based on some backing framework
 */
public interface RemoteFileOperations<T> extends GenericFileOperations<T> {

    /**
     * Connects to the remote server
     *
     * @param configuration configuration
     * @return <tt>true</tt> if connected
     * @throws GenericFileOperationFailedException can be thrown
     */
    boolean connect(RemoteFileConfiguration configuration) throws GenericFileOperationFailedException;

    /**
     * Returns whether we are connected to the remote server or not
     *
     * @return <tt>true</tt> if connected, <tt>false</tt> if not
     * @throws GenericFileOperationFailedException can be thrown
     */
    boolean isConnected() throws GenericFileOperationFailedException;

    /**
     * Disconnects from the remote server
     *
     * @throws GenericFileOperationFailedException can be thrown
     */
    void disconnect() throws GenericFileOperationFailedException;

    /**
     * Sends a noop command to the remote server
     *
     * @return <tt>true</tt> if the noop was a success, <tt>false</tt> otherwise
     * @throws GenericFileOperationFailedException can be thrown
     */
    boolean sendNoop() throws GenericFileOperationFailedException;

    /**
     * Sends a site command to the remote server
     *
     * @param command  the command
     * @return <tt>true</tt> if the command was a success, <tt>false</tt> otherwise
     * @throws GenericFileOperationFailedException can be thrown
     */
    boolean sendSiteCommand(String command) throws GenericFileOperationFailedException;

}

redpajama_set_name: RedPajamaGithub


text:
insert into T_ACCOUNT (NUMBER, NAME, PRODUCT) values ('123456789', 'Keri Lee','Yogurt');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456001', 'Dollie R. Schnidt');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456002', 'Cornelia J. LeClerc');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456003', 'Cynthia Rau');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456004', 'Douglas R. Cobbs');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456005', 'Michael Patel');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456006', 'Suzanne Wong');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456007', 'Ivan C. Jaya');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456008', 'Ida Ketterer');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456009', 'Laina Ochoa Lucero');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456010', 'Wesley M. Montana');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456011', 'Leslie F. McCleary');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456012', 'Sayeed D. Mudra');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456013', 'Pietronella J. Domingo');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456014', 'John S. O''Leary');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456015', 'Gladys D. Smith');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456016', 'Sally O. Thygesen');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456017', 'Rachel Vogt');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456018', 'Julia DeLong');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456019', 'Mark T. Rizzoli');
insert into T_ACCOUNT (NUMBER, NAME) values ('123456020', 'Maria J. Angelo');

insert into T_PRODUCT (NUMBER, NAME, PRICE) values ('123456', 'Beer',6);
insert into T_PRODUCT (NUMBER, NAME) values ('000001', 'Milk');
insert into T_PRODUCT (NUMBER, NAME) values ('000002', 'Ice Cream');
insert into T_PRODUCT (NUMBER, NAME) values ('000003', 'Yogurt');
insert into T_PRODUCT (NUMBER, NAME) values ('000004', 'Apple');
insert into T_PRODUCT (NUMBER, NAME) values ('000005', 'Sweet Potato');
insert into T_PRODUCT (NUMBER, NAME) values ('000006', 'Mocha Coffee');
insert into T_PRODUCT (NUMBER, NAME) values ('000007', 'Greek Yogurt');
insert into T_PRODUCT (NUMBER, NAME) values ('000008', 'Sweet Popcorn');
insert into T_PRODUCT (NUMBER, NAME) values ('000009', 'Wine');
insert into T_PRODUCT (NUMBER, NAME) values ('000010', 'Balley');
insert into T_PRODUCT (NUMBER, NAME) values ('000011', 'Fried Rice');
insert into T_PRODUCT (NUMBER, NAME) values ('000012', 'Pizza');
insert into T_PRODUCT (NUMBER, NAME) values ('000013', 'Cappuccino Coffee');


text:
<?php

namespace Google\Service\Compute\Resource;

use Google\Service\Compute\ExchangedPeeringRoutesList;
use Google\Service\Compute\Network;
use Google\Service\Compute\NetworkList;
use Google\Service\Compute\NetworksAddPeeringRequest;
use Google\Service\Compute\NetworksGetEffectiveFirewallsResponse;
use Google\Service\Compute\NetworksRemovePeeringRequest;
use Google\Service\Compute\NetworksUpdatePeeringRequest;
use Google\Service\Compute\Operation;

/**
 * The "networks" collection of methods.
 * Typical usage is:
 *  <code>
 *   $computeService = new Google\Service\Compute(...);
 *   $networks = $computeService->networks;
 *  </code>
 */
class Networks extends \Google\Service\Resource
{
  /**
   * Adds a peering to the specified network. (networks.addPeering)
   *
   * @param string $project Project ID for this request.
   * @param string $network Name of the network resource to add peering to.
   * @param NetworksAddPeeringRequest $postBody
   * @param array $optParams Optional parameters.
   *
   * @opt_param string requestId An optional request ID to identify requests.
   * Specify a unique request ID so that if you must retry your request, the
   * server will know to ignore the request if it has already been completed. For
   * example, consider a situation where you make an initial request and the
   * request times out. If you make the request again with the same request ID,
   * the server can check if original operation with the same request ID was
   * received, and if so, will ignore the second request. This prevents clients
   * from accidentally creating duplicate commitments. The request ID must be a
   * valid UUID with the exception that zero UUID is not supported (
   * 00000000-0000-0000-0000-000000000000).
   * @return Operation
   */
  public function addPeering($project, $network, NetworksAddPeeringRequest $postBody, $optParams = [])
  {
    $params = ['project' => $project, 'network' => $network, 'postBody' => $postBody];
    $params = array_merge($params, $optParams);
    return $this->call('addPeering', [$params], Operation::class);
  }
  /**
   * Deletes the specified network. (networks.delete)
   *
   * @param string $project Project ID for this request.
   * @param string $network Name of the network to delete.
   * @param array $optParams Optional parameters.
   *
   * @opt_param string requestId An optional request ID to identify requests.
   * Specify a unique request ID so that if you must retry your request, the
   * server will know to ignore the request if it has already been completed. For
   * example, consider a situation where you make an initial request and the
   * request times out. If you make the request again with the same request ID,
   * the server can check if original operation with the same request ID was
   * received, and if so, will ignore the second request. This prevents clients
   * from accidentally creating duplicate commitments. The request ID must be a
   * valid UUID with the exception that zero UUID is not supported (
   * 00000000-0000-0000-0000-000000000000).
   * @return Operation
   */
  public function delete($project, $network, $optParams = [])
  {
    $params = ['project' => $project, 'network' => $network];
    $params = array_merge($params, $optParams);
    return $this->call('delete', [$params], Operation::class);
  }
  /**
   * Returns the specified network. Gets a list of available networks by making a
   * list() request. (networks.get)
   *
   * @param string $project Project ID for this request.
   * @param string $network Name of the network to return.
   * @param array $optParams Optional parameters.
   * @return Network
   */
  public function get($project, $network, $optParams = [])
  {
    $params = ['project' => $project, 'network' => $network];
    $params = array_merge($params, $optParams);
    return $this->call('get', [$params], Network::class);
  }
  /**
   * Returns the effective firewalls on a given network.
   * (networks.getEffectiveFirewalls)
   *
   * @param string $project Project ID for this request.
   * @param string $network Name of the network for this request.
   * @param array $optParams Optional parameters.
   * @return NetworksGetEffectiveFirewallsResponse
   */
  public function getEffectiveFirewalls($project, $network, $optParams = [])
  {
    $params = ['project' => $project, 'network' => $network];
    $params = array_merge($params, $optParams);
    return $this->call('getEffectiveFirewalls', [$params], NetworksGetEffectiveFirewallsResponse::class);
  }
  /**
   * Creates a network in the specified project using the data included in the
   * request. (networks.insert)
   *
   * @param string $project Project ID for this request.
   * @param Network $postBody
   * @param array $optParams Optional parameters.
   *
   * @opt_param string requestId An optional request ID to identify requests.
   * Specify a unique request ID so that if you must retry your request, the
   * server will know to ignore the request if it has already been completed. For
   * example, consider a situation where you make an initial request and the
   * request times out. If you make the request again with the same request ID,
   * the server can check if original operation with the same request ID was
   * received, and if so, will ignore the second request. This prevents clients
   * from accidentally creating duplicate commitments. The request ID must be a
   * valid UUID with the exception that zero UUID is not supported (
   * 00000000-0000-0000-0000-000000000000).
   * @return Operation
   */
  public function insert($project, Network $postBody, $optParams = [])
  {
    $params = ['project' => $project, 'postBody' => $postBody];
    $params = array_merge($params, $optParams);
    return $this->call('insert', [$params], Operation::class);
  }
  /**
   * Retrieves the list of networks available to the specified project.
   * (networks.listNetworks)
   *
   * @param string $project Project ID for this request.
   * @param array $optParams Optional parameters.
   *
   * @opt_param string filter A filter expression that filters resources listed in
   * the response. Most Compute resources support two types of filter expressions:
   * expressions that support regular expressions and expressions that follow API
   * improvement proposal AIP-160. If you want to use AIP-160, your expression
   * must specify the field name, an operator, and the value that you want to use
   * for filtering. The value must be a string, a number, or a boolean. The
   * operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example,
   * if you are filtering Compute Engine instances, you can exclude instances
   * named `example-instance` by specifying `name != example-instance`. The `:`
   * operator can be used with string fields to match substrings. For non-string
   * fields it is equivalent to the `=` operator. The `:*` comparison can be used
   * to test whether a key has been defined. For example, to find all objects with
   * `owner` label use: ``` labels.owner:* ``` You can also filter nested fields.
   * For example, you could specify `scheduling.automaticRestart = false` to
   * include instances only if they are not scheduled for automatic restarts. You
   * can use filtering on nested fields to filter based on resource labels. To
   * filter on multiple expressions, provide each separate expression within
   * parentheses. For example: ``` (scheduling.automaticRestart = true)
   * (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND`
   * expression. However, you can include `AND` and `OR` expressions explicitly.
   * For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel
   * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a
   * regular expression, use the `eq` (equal) or `ne` (not equal) operator against
   * a single un-parenthesized expression with or without quotes or against
   * multiple parenthesized expressions. Examples: `fieldname eq unquoted literal`
   * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
   * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
   * interpreted as a regular expression using Google RE2 library syntax. The
   * literal value must match the entire field. For example, to filter for
   * instances that do not end with name "instance", you would use `name ne
   * .*instance`.
   * @opt_param string maxResults The maximum number of results per page that
   * should be returned. If the number of available results is larger than
   * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
   * get the next page of results in subsequent list requests. Acceptable values
   * are `0` to `500`, inclusive. (Default: `500`)
   * @opt_param string orderBy Sorts list results by a certain order. By default,
   * results are returned in alphanumerical order based on the resource name. You
   * can also sort results in descending order based on the creation timestamp
   * using `orderBy="creationTimestamp desc"`. This sorts results based on the
   * `creationTimestamp` field in reverse chronological order (newest result
   * first). Use this to sort resources like operations so that the newest
   * operation is returned first. Currently, only sorting by `name` or
   * `creationTimestamp desc` is supported.
   * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
   * the `nextPageToken` returned by a previous list request to get the next page
   * of results.
   * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
   * which provides partial results in case of failure. The default value is
   * false.
   * @return NetworkList
   */
  public function listNetworks($project, $optParams = [])
  {
    $params = ['project' => $project];
    $params = array_merge($params, $optParams);
    return $this->call('list', [$params], NetworkList::class);
  }
  /**
   * Lists the peering routes exchanged over peering connection.
   * (networks.listPeeringRoutes)
   *
   * @param string $project Project ID for this request.
   * @param string $network Name of the network for this request.
   * @param array $optParams Optional parameters.
   *
   * @opt_param string direction The direction of the exchanged routes.
   * @opt_param string filter A filter expression that filters resources listed in
   * the response. Most Compute resources support two types of filter expressions:
   * expressions that support regular expressions and expressions that follow API
   * improvement proposal AIP-160. If you want to use AIP-160, your expression
   * must specify the field name, an operator, and the value that you want to use
   * for filtering. The value must be a string, a number, or a boolean. The
   * operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example,
   * if you are filtering Compute Engine instances, you can exclude instances
   * named `example-instance` by specifying `name != example-instance`. The `:`
   * operator can be used with string fields to match substrings. For non-string
   * fields it is equivalent to the `=` operator. The `:*` comparison can be used
   * to test whether a key has been defined. For example, to find all objects with
   * `owner` label use: ``` labels.owner:* ``` You can also filter nested fields.
   * For example, you could specify `scheduling.automaticRestart = false` to
   * include instances only if they are not scheduled for automatic restarts. You
   * can use filtering on nested fields to filter based on resource labels. To
   * filter on multiple expressions, provide each separate expression within
   * parentheses. For example: ``` (scheduling.automaticRestart = true)
   * (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND`
   * expression. However, you can include `AND` and `OR` expressions explicitly.
   * For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel
   * Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a
   * regular expression, use the `eq` (equal) or `ne` (not equal) operator against
   * a single un-parenthesized expression with or without quotes or against
   * multiple parenthesized expressions. Examples: `fieldname eq unquoted literal`
   * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
   * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
   * interpreted as a regular expression using Google RE2 library syntax. The
   * literal value must match the entire field. For example, to filter for
   * instances that do not end with name "instance", you would use `name ne
   * .*instance`.
   * @opt_param string maxResults The maximum number of results per page that
   * should be returned. If the number of available results is larger than
   * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
   * get the next page of results in subsequent list requests. Acceptable values
   * are `0` to `500`, inclusive. (Default: `500`)
   * @opt_param string orderBy Sorts list results by a certain order. By default,
   * results are returned in alphanumerical order based on the resource name. You
   * can also sort results in descending order based on the creation timestamp
   * using `orderBy="creationTimestamp desc"`. This sorts results based on the
   * `creationTimestamp` field in reverse chronological order (newest result
   * first). Use this to sort resources like operations so that the newest
   * operation is returned first. Currently, only sorting by `name` or
   * `creationTimestamp desc` is supported.
   * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
   * the `nextPageToken` returned by a previous list request to get the next page
   * of results.
   * @opt_param string peeringName The response will show routes exchanged over
   * the given peering connection.
   * @opt_param string region The region of the request. The response will include
   * all subnet routes, static routes and dynamic routes in the region.
   * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
   * which provides partial results in case of failure. The default value is
   * false.
   * @return ExchangedPeeringRoutesList
   */
  public function listPeeringRoutes($project, $network, $optParams = [])
  {
    $params = ['project' => $project, 'network' => $network];
    $params = array_merge($params, $optParams);
    return $this->call('listPeeringRoutes', [$params], ExchangedPeeringRoutesList::class);
  }
  /**
   * Patches the specified network with the data included in the request. Only the
   * following fields can be modified: routingConfig.routingMode. (networks.patch)
   *
   * @param string $project Project ID for this request.
   * @param string $network Name of the network to update.
   * @param Network $postBody
   * @param array $optParams Optional parameters.
   *
   * @opt_param string requestId An optional request ID to identify requests.
   * Specify a unique request ID so that if you must retry your request, the
   * server will know to ignore the request if it has already been completed. For
   * example, consider a situation where you make an initial request and the
   * request times out. If you make the request again with the same request ID,
   * the server can check if original operation with the same request ID was
   * received, and if so, will ignore the second request. This prevents clients
   * from accidentally creating duplicate commitments. The request ID must be a
   * valid UUID with the exception that zero UUID is not supported (
   * 00000000-0000-0000-0000-000000000000).
   * @return Operation
   */
  public function patch($project, $network, Network $postBody, $optParams = [])
  {
    $params = ['project' => $project, 'network' => $network, 'postBody' => $postBody];
    $params = array_merge($params, $optParams);
    return $this->call('patch', [$params], Operation::class);
  }
  /**
   * Removes a peering from the specified network. (networks.removePeering)
   *
   * @param string $project Project ID for this request.
   * @param string $network Name of the network resource to remove peering from.
   * @param NetworksRemovePeeringRequest $postBody
   * @param array $optParams Optional parameters.
   *
   * @opt_param string requestId An optional request ID to identify requests.
   * Specify a unique request ID so that if you must retry your request, the
   * server will know to ignore the request if it has already been completed. For
   * example, consider a situation where you make an initial request and the
   * request times out. If you make the request again with the same request ID,
   * the server can check if original operation with the same request ID was
   * received, and if so, will ignore the second request. This prevents clients
   * from accidentally creating duplicate commitments. The request ID must be a
   * valid UUID with the exception that zero UUID is not supported (
   * 00000000-0000-0000-0000-000000000000).
   * @return Operation
   */
  public function removePeering($project, $network, NetworksRemovePeeringRequest $postBody, $optParams = [])
  {
    $params = ['project' => $project, 'network' => $network, 'postBody' => $postBody];
    $params = array_merge($params, $optParams);
    return $this->call('removePeering', [$params], Operation::class);
  }
  /**
   * Switches the network mode from auto subnet mode to custom subnet mode.
   * (networks.switchToCustomMode)
   *
   * @param string $project Project ID for this request.
   * @param string $network Name of the network to be updated.
   * @param array $optParams Optional parameters.
   *
   * @opt_param string requestId An optional request ID to identify requests.
   * Specify a unique request ID so that if you must retry your request, the
   * server will know to ignore the request if it has already been completed. For
   * example, consider a situation where you make an initial request and the
   * request times out. If you make the request again with the same request ID,
   * the server can check if original operation with the same request ID was
   * received, and if so, will ignore the second request. This prevents clients
   * from accidentally creating duplicate commitments. The request ID must be a
   * valid UUID with the exception that zero UUID is not supported (
   * 00000000-0000-0000-0000-000000000000).
   * @return Operation
   */
  public function switchToCustomMode($project, $network, $optParams = [])
  {
    $params = ['project' => $project, 'network' => $network];
    $params = array_merge($params, $optParams);
    return $this->call('switchToCustomMode', [$params], Operation::class);
  }
  /**
   * Updates the specified network peering with the data included in the request.
   * You can only modify the NetworkPeering.export_custom_routes field and the
   * NetworkPeering.import_custom_routes field. (networks.updatePeering)
   *
   * @param string $project Project ID for this request.
   * @param string $network Name of the network resource which the updated peering
   * is belonging to.
   * @param NetworksUpdatePeeringRequest $postBody
   * @param array $optParams Optional parameters.
   *
   * @opt_param string requestId An optional request ID to identify requests.
   * Specify a unique request ID so that if you must retry your request, the
   * server will know to ignore the request if it has already been completed. For
   * example, consider a situation where you make an initial request and the
   * request times out. If you make the request again with the same request ID,
   * the server can check if original operation with the same request ID was
   * received, and if so, will ignore the second request. This prevents clients
   * from accidentally creating duplicate commitments. The request ID must be a
   * valid UUID with the exception that zero UUID is not supported (
   * 00000000-0000-0000-0000-000000000000).
   * @return Operation
   */
  public function updatePeering($project, $network, NetworksUpdatePeeringRequest $postBody, $optParams = [])
  {
    $params = ['project' => $project, 'network' => $network, 'postBody' => $postBody];
    $params = array_merge($params, $optParams);
    return $this->call('updatePeering', [$params], Operation::class);
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Networks::class, 'Google_Service_Compute_Resource_Networks');


text:
using Xamarin.Forms;

namespace DotNetRu.Clients.UI.Controls
{
    public class AlwaysScrollView : ScrollView
    {
        public AlwaysScrollView()
        {
        }
    }
}


text:
@interface PodsDummy_Pods_MightyIO_iOS_Pod : NSObject
@end
@implementation PodsDummy_Pods_MightyIO_iOS_Pod
@end


text:
#ifdef TESTING_WG21_EXPERIMENTAL_RESULT
#include <boost/outcome/experimental/result.hpp>
#define BOOST_OUTCOME_AUTO_TEST_CASE(...) BOOST_AUTO_TEST_CASE(__VA_ARGS__)
#else
#include <boost/outcome/result.hpp>
#endif
#include <boost/test/unit_test.hpp>
#include <boost/test/unit_test_monitor.hpp>

#include <iostream>

#ifndef BOOST_NO_EXCEPTIONS
// Custom error type with payload
struct payload
{
  boost::system::error_code ec;
  const char *str{nullptr};
  payload() = default;
  payload(boost::system::errc::errc_t _ec, const char *_str)
      : ec(make_error_code(_ec))
      , str(_str)
  {
  }
};
struct payload_exception : std::runtime_error
{
  explicit payload_exception(const char *what)
      : std::runtime_error(what)
  {
  }
};
inline const boost::system::error_code &make_error_code(const payload &p)
{
  return p.ec;
}
inline void outcome_throw_as_system_error_with_payload(const payload &p)
{
  throw payload_exception(p.str);
}
#endif

BOOST_OUTCOME_AUTO_TEST_CASE(works_result, "Tests that the result works as intended")
{
#ifdef TESTING_WG21_EXPERIMENTAL_RESULT
  using namespace std::experimental;
  using std::in_place_type;
#else
  using namespace BOOST_OUTCOME_V2_NAMESPACE;
#endif

  static_assert(std::is_constructible<result<long>, int>::value, "Sanity check that monad can be constructed from a value_type");
  static_assert(!std::is_constructible<result<result<long>>, int>::value, "Sanity check that outer monad can be constructed from an inner monad's value_type");
#if defined(__clang__) || !defined(__GNUC__) || __GNUC__ >= 9  // GCCs before 9 barf on this
  static_assert(!std::is_constructible<result<result<result<long>>>, int>::value, "Sanity check that outer monad can be constructed from an inner inner monad's value_type");
  static_assert(!std::is_constructible<result<result<result<result<long>>>>, int>::value, "Sanity check that outer monad can be constructed from an inner inner monad's value_type");
#endif

  static_assert(std::is_constructible<result<int>, result<long>>::value, "Sanity check that compatible monads can be constructed from one another");
  static_assert(std::is_constructible<result<result<int>>, result<long>>::value, "Sanity check that outer monad can be constructed from a compatible monad");
#if defined(__clang__) || !defined(__GNUC__) || __GNUC__ >= 9  // GCCs before 9 barf on this
  static_assert(!std::is_constructible<result<result<result<int>>>, result<long>>::value, "Sanity check that outer monad can be constructed from a compatible monad up to two nestings deep");
  static_assert(!std::is_constructible<result<result<result<result<int>>>>, result<long>>::value, "Sanity check that outer monad can be constructed from a compatible monad three or more nestings deep");
#endif
  static_assert(!std::is_constructible<result<std::string>, result<int>>::value, "Sanity check that incompatible monads cannot be constructed from one another");

#ifndef TESTING_WG21_EXPERIMENTAL_RESULT
  static_assert(std::is_constructible<result<int>, result<void>>::value, "Sanity check that all monads can be constructed from a void monad");
  static_assert(std::is_constructible<result<result<int>>, result<void>>::value, "Sanity check that outer monad can be constructed from a compatible monad");
#if defined(__clang__) || !defined(__GNUC__) || __GNUC__ >= 9  // GCCs before 9 barf on this
  static_assert(std::is_constructible<result<result<result<int>>>, result<void>>::value, "Sanity check that outer monad can be constructed from a compatible monad up to two nestings deep");
#endif
  static_assert(!std::is_constructible<result<void>, result<int>>::value, "Sanity check that incompatible monads cannot be constructed from one another");
#endif
  static_assert(std::is_void<result<void>::value_type>::value, "Sanity check that result<void> has a void value_type");
#ifndef TESTING_WG21_EXPERIMENTAL_RESULT
  static_assert(std::is_void<result<void, void>::error_type>::value, "Sanity check that result<void, void> has a void error_type");
#endif

  static_assert(std::is_same<result<int>::value_type, int>::value, "Sanity check that result<int> has a int value_type");
  static_assert(std::is_same<result<int>::error_type, boost::system::error_code>::value, "Sanity check that result<int> has a error_code error_type");

  {  // errored int
    result<int> m(boost::system::errc::bad_address);
    BOOST_CHECK(!m);
    BOOST_CHECK(!m.has_value());
    BOOST_CHECK(m.has_error());
    // BOOST_CHECK(!m.has_exception());
    BOOST_CHECK_THROW(m.value(), boost::system::system_error);
    BOOST_CHECK_NO_THROW(m.error());
  }
  {  // errored void
    result<void> m(boost::system::errc::bad_address);
    BOOST_CHECK(!m);
    BOOST_CHECK(!m.has_value());
    BOOST_CHECK(m.has_error());
// BOOST_CHECK(!m.has_exception());
#ifndef TESTING_WG21_EXPERIMENTAL_RESULT
    BOOST_CHECK_THROW(([&m]() -> void { return m.value(); }()), boost::system::system_error);
#endif
    BOOST_CHECK_NO_THROW(m.error());
  }
  {  // valued int
    result<int> m(5);
    BOOST_CHECK(m);
    BOOST_CHECK(m.has_value());
    BOOST_CHECK(!m.has_error());
    // BOOST_CHECK(!m.has_exception());
    BOOST_CHECK(m.value() == 5);
    m.value() = 6;
    BOOST_CHECK(m.value() == 6);
    BOOST_CHECK_THROW(m.error(), bad_result_access);
  }
  {  // valued bool
    result<bool> m(false);
    BOOST_CHECK(m);
    BOOST_CHECK(m.has_value());
    BOOST_CHECK(!m.has_error());
    // BOOST_CHECK(!m.has_exception());
    BOOST_CHECK(m.value() == false);
    m.value() = true;
    BOOST_CHECK(m.value() == true);
    BOOST_CHECK_THROW(m.error(), bad_result_access);
  }
  {  // moves do not clear state
    result<std::string> m("niall");
    BOOST_CHECK(m);
    BOOST_CHECK(m.has_value());
    BOOST_CHECK(!m.has_error());
    // BOOST_CHECK(!m.has_exception());
    BOOST_CHECK(m.value() == "niall");
    m.value() = "NIALL";
    BOOST_CHECK(m.value() == "NIALL");
    auto temp(std::move(m).value());
    BOOST_CHECK(temp == "NIALL");
    BOOST_CHECK(m.value().empty());  // NOLINT
  }
  {  // valued void
    result<void> m(in_place_type<void>);
    BOOST_CHECK(m);
    BOOST_CHECK(m.has_value());
    BOOST_CHECK(!m.has_error());
    // BOOST_CHECK(!m.has_exception());
    BOOST_CHECK_NO_THROW(m.value());  // works, but type returned is unusable
    BOOST_CHECK_THROW(m.error(), bad_result_access);
  }
  {  // errored
    boost::system::error_code ec(5, boost::system::system_category());
    result<int> m(ec);
    BOOST_CHECK(!m);
    BOOST_CHECK(!m.has_value());
    BOOST_CHECK(m.has_error());
    // BOOST_CHECK(!m.has_exception());
    BOOST_CHECK_THROW(m.value(), boost::system::system_error);
    BOOST_CHECK(m.error() == ec);
  }
#if !defined(__APPLE__) || defined(__cpp_exceptions)
  {  // errored, custom
    boost::system::error_code ec(5, boost::system::system_category());
    auto e = boost::copy_exception(boost::system::system_error(ec));  // NOLINT
    result<int, boost::exception_ptr> m(e);
    BOOST_CHECK(!m);
    BOOST_CHECK(!m.has_value());
    BOOST_CHECK(m.has_error());
    // BOOST_CHECK(!m.has_exception());
    BOOST_CHECK_THROW(m.value(), boost::system::system_error);
    BOOST_CHECK(m.error() == e);
  }
#endif
#ifndef TESTING_WG21_EXPERIMENTAL_RESULT
  {  // custom error type
    struct Foo
    {
    };
    result<int, Foo> m(in_place_type<Foo>);
    BOOST_CHECK(!m);
    BOOST_CHECK(!m.has_value());
    BOOST_CHECK(m.has_error());
    // BOOST_CHECK(!m.has_exception());
    // BOOST_CHECK_NO_THROW(m.value());
    // BOOST_CHECK_NO_THROW(m.error());
  }
  if(false)  // NOLINT
  {          // void, void is permitted, but is not constructible
    result<void, void> *m = nullptr;
    m->value();
    m->error();
  }
#endif

  {
    // Deliberately define non-trivial operations
    struct udt
    {
      int _v{0};
      udt() = default;
      udt(udt &&o) noexcept : _v(o._v) {}
      udt(const udt &o)  // NOLINT
      : _v(o._v)
      {
      }
      udt &operator=(udt &&o) noexcept
      {
        _v = o._v;
        return *this;
      }
      udt &operator=(const udt &o)  // NOLINT
      {
        _v = o._v;
        return *this;
      }
      ~udt() { _v = 0; }
    };
    // No default construction, no copy nor move
    struct udt2
    {
      udt2() = delete;
      udt2(udt2 &&) = delete;
      udt2(const udt2 &) = delete;
      udt2 &operator=(udt2 &&) = delete;
      udt2 &operator=(const udt2 &) = delete;
      explicit udt2(int /*unused*/) {}
      ~udt2() = default;
    };
    // Can only be constructed via multiple args
    struct udt3
    {
      udt3() = delete;
      udt3(udt3 &&) = delete;
      udt3(const udt3 &) = delete;
      udt3 &operator=(udt3 &&) = delete;
      udt3 &operator=(const udt3 &) = delete;
      explicit udt3(int /*unused*/, const char * /*unused*/, std::nullptr_t /*unused*/) {}
      ~udt3() = default;
    };

    result<int> a(5);
    result<int> b(make_error_code(boost::system::errc::invalid_argument));
    std::cout << sizeof(a) << std::endl;  // 32 bytes
    if(false)                             // NOLINT
    {
      b.assume_value();
      a.assume_error();
    }
#ifndef BOOST_NO_EXCEPTIONS
    try
    {
      b.value();
      std::cerr << "fail" << std::endl;
      std::terminate();
    }
    catch(const boost::system::system_error & /*unused*/)
    {
    }
#endif
    static_assert(!std::is_default_constructible<decltype(a)>::value, "");
    static_assert(!std::is_nothrow_default_constructible<decltype(a)>::value, "");
    static_assert(std::is_copy_constructible<decltype(a)>::value, "");
// Quality of implementation of std::optional is poor :(
#ifndef TESTING_WG21_EXPERIMENTAL_RESULT
    static_assert(std::is_trivially_copy_constructible<decltype(a)>::value, "");
    static_assert(std::is_nothrow_copy_constructible<decltype(a)>::value, "");
    static_assert(std::is_copy_assignable<decltype(a)>::value, "");
    static_assert(std::is_trivially_copy_assignable<decltype(a)>::value, "");
    static_assert(std::is_nothrow_copy_assignable<decltype(a)>::value, "");
#endif
    static_assert(std::is_trivially_destructible<decltype(a)>::value, "");
    static_assert(std::is_nothrow_destructible<decltype(a)>::value, "");

    // Test void compiles
    result<void> c(in_place_type<void>);
    result<void> c2(c);
    (void) c2;

    // Test a standard udt compiles
    result<udt> d(in_place_type<udt>);
    result<udt> d2(d);
    static_assert(!std::is_default_constructible<decltype(d)>::value, "");
    static_assert(!std::is_nothrow_default_constructible<decltype(d)>::value, "");
    static_assert(std::is_copy_constructible<decltype(d)>::value, "");
    static_assert(!std::is_trivially_copy_constructible<decltype(d)>::value, "");
    static_assert(!std::is_nothrow_copy_constructible<decltype(d)>::value, "");
    static_assert(std::is_copy_assignable<decltype(d)>::value, "");
    static_assert(!std::is_trivially_copy_assignable<decltype(d)>::value, "");
    static_assert(!std::is_nothrow_copy_assignable<decltype(d)>::value, "");
    static_assert(std::is_move_assignable<decltype(d)>::value, "");
    static_assert(!std::is_trivially_move_assignable<decltype(d)>::value, "");
    static_assert(std::is_nothrow_move_assignable<decltype(d)>::value, "");
    static_assert(!std::is_trivially_destructible<decltype(d)>::value, "");
    static_assert(std::is_nothrow_destructible<decltype(d)>::value, "");

    // Test a highly pathological udt compiles
    result<udt2> e(in_place_type<udt2>, 5);
    // result<udt2> e2(e);
    static_assert(!std::is_default_constructible<decltype(e)>::value, "");
    static_assert(!std::is_nothrow_default_constructible<decltype(e)>::value, "");
    static_assert(!std::is_copy_constructible<decltype(e)>::value, "");
    static_assert(!std::is_trivially_copy_constructible<decltype(e)>::value, "");
    static_assert(!std::is_nothrow_copy_constructible<decltype(e)>::value, "");
    static_assert(!std::is_copy_assignable<decltype(e)>::value, "");
    static_assert(!std::is_trivially_copy_assignable<decltype(e)>::value, "");
    static_assert(!std::is_nothrow_copy_assignable<decltype(e)>::value, "");
    static_assert(!std::is_move_assignable<decltype(e)>::value, "");
    static_assert(!std::is_trivially_move_assignable<decltype(e)>::value, "");
    static_assert(!std::is_nothrow_move_assignable<decltype(e)>::value, "");

    // Test a udt which can only be constructed in place compiles
    result<udt3> g(in_place_type<udt3>, 5, static_cast<const char *>("niall"), nullptr);
    // Does converting inplace construction also work?
    result<udt3> h(5, static_cast<const char *>("niall"), nullptr);
    result<udt3> i(ENOMEM, boost::system::generic_category());
    BOOST_CHECK(h.has_value());
    BOOST_CHECK(i.has_error());
  }

  // Test direct use of error code enum works
  {
    constexpr result<int, boost::system::errc::errc_t> a(5), b(boost::system::errc::invalid_argument);
    static_assert(a.value() == 5, "a is not 5");
    static_assert(b.error() == boost::system::errc::invalid_argument, "b is not errored");
    BOOST_CHECK_THROW(b.value(), boost::system::system_error);
  }

#ifndef TESTING_WG21_EXPERIMENTAL_RESULT
#ifndef BOOST_NO_EXCEPTIONS
  // Test payload facility
  {
    const char *niall = "niall";
    result<int, payload> b{boost::system::errc::invalid_argument, niall};
    try
    {
      b.value();
      BOOST_CHECK(false);
    }
    catch(const payload_exception &e)
    {
      BOOST_CHECK(!strcmp(e.what(), niall));
    }
    catch(...)
    {
      BOOST_CHECK(false);
    }
  }
#endif
#endif
}


text:
module.exports = {
	makeAuth: function makeAuth(req, res, next) {
		if(req.host === 'localhost') {
			req.user = {
				displayName: 'John Doe',
				isAdmin: true
			};
			next();
		} else {
			if(req.isAuthenticated() ) {
				if( req.user.isAdmin === true)
					return next();
				else
					return res.redirect('/notadmin');
			}
			res.redirect('/login');
		}
	}
}


text:
lang        : it
title       : "Know the signs"
permalink   : heineken-know-the-signs
id          : heineken-know-the-signs
date        : 2008-12-24 14:50
author      : Daniele Pelagatti <daniele.pelagatti@unit9.com>
template    : default.it.jade
tags        : heineken,campagna digitale,ubriaco,flash,as3
banner      : img/siteoftheday.png
description : "Know The Signs ti permette di individuare in quale, tra cinque imbarazzanti personaggi, tu e i tuoi amici vi trasformate quando bevete un bicchiere di troppo."
twittertags :
    - heineken knowthesigns
---

# [Heineken: Know the signs](http://www.unit9.com/project/know-the-signs) #
## Front End Developer ##

[![](#{base}img/know_the_signs_1.jpg "Heineken: Know the signs")](http://www.unit9.com/project/know-the-signs)

[Know The Signs](http://www.knowthesigns.com) ti permette di individuare in quale, tra cinque imbarazzanti personaggi, tu e i tuoi amici vi trasformate quando bevete un bicchiere di troppo.

Un'esperienza interattiva con video di alta qualità, tempi di caricamento veloci, localizzata in molte lingue. C'è un bell'articolo su [viralblog](http://www.viralblog.com/widgets-apps/heineken-launches-responsibility-campaign/#more-893) a proposito del resto della campagna integrata.

## Premi ##

  * FWA[ Site of the day](http://www.thefwa.com/site/know-the-signs/) 24 Dicembre 2008
  * _MEGA_ award nella categoria _Brand reputation_ del [Media Guardian Innovation Awards 09.](http://megas.guardianprofessional.co.uk/) Il progetto è stato anche raccomandato per la categoria _Best Website_ dei _Revolution Awards_.
  * In lizza per la categoria "_Advertising - Microsite_" dei [BIMA Awards 2009](http://www.bimaawards.com/shortlist/#advertising5)
  * Vincitore del _Media Guardian_ nella categoria _Brand reputation_

## Riconoscimenti ##

 * **Agency**: Red Brick Road / Ruby
 * **Brand**: Heineken
 * **Interactive Director**: Robert Bader
 * **TV Director**: Henry Littlechild (Outsider)
 * **Exec Producer**: Valentina Culatti Alisi
 * **Tech lead**: Yates Buckley
 * **Sound FX**: Steve Nolan
 * **Producer**: Dani Michelon, Ben Roberts (Outsider)
 * **Developer:** David Hartono, Sérgio Garcez, Dofl Yun
 * **Interactive Production Company**: unit9


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

namespace Duality
{
	/// <summary>
	/// Represents a range of values between a specific minimum and maximum value.
	/// </summary>
	public struct Range : IEquatable<Range>
	{
		/// <summary>
		/// The minimum value of this Range.
		/// </summary>
		public float MinValue;
		/// <summary>
		/// The maximum value of this Range.
		/// </summary>
		public float MaxValue;

		/// <summary>
		/// [GET] The total width of this Range. This value may be negative for irregular ranges,
		/// i.e. ranges with a higher minimum value than their maximum value.
		/// </summary>
		public float Width
		{
			get { return this.MaxValue - this.MinValue; }
		}
		/// <summary>
		/// [GET] The center value of this Range.
		/// </summary>
		public float Center
		{
			get { return (this.MaxValue + this.MinValue) * 0.5f; }
		}
		/// <summary>
		/// [GET] Returns a normalized version of this Range where the minimum is guaranteed to be smaller than the maximum value.
		/// </summary>
		public Range Normalized
		{
			get
			{
				Range result = this;
				result.Normalize();
				return result;
			}
		}

		/// <summary>
		/// Creates a new Range from mininmum and maximum values.
		/// </summary>
		/// <param name="min"></param>
		/// <param name="max"></param>
		public Range(float min, float max)
		{
			this.MinValue = min;
			this.MaxValue = max;
		}
		/// <summary>
		/// Creates a new Range with zero-width from a single value.
		/// </summary>
		/// <param name="value"></param>
		public Range(float value)
		{
			this.MinValue = value;
			this.MaxValue = value;
		}

		/// <summary>
		/// Performs a linear interpolation between the Ranges minimum and maximum value using the specified blend factor.
		/// </summary>
		/// <param name="ratio"></param>
		/// <returns></returns>
		public float Lerp(float ratio)
		{
			return MathF.Lerp(this.MinValue, this.MaxValue, ratio);
		}
		/// <summary>
		/// Normalizes this Range, i.e. flips minimum and maximum value, if irregular.
		/// </summary>
		public void Normalize()
		{
			if (this.MaxValue < this.MinValue)
			{
				MathF.Swap(ref this.MinValue, ref this.MaxValue);
			}
		}
		/// <summary>
		/// Returns whether this Range contains a certain value.
		/// </summary>
		/// <param name="value"></param>
		/// <returns></returns>
		public bool Contains(float value)
		{
			return this.MinValue <= value && this.MaxValue >= value;
		}
		/// <summary>
		/// Returns whether this Range contains a certain other range.
		/// </summary>
		/// <param name="value"></param>
		/// <returns></returns>
		public bool Contains(Range value)
		{
			return this.Contains(value.MinValue) && this.Contains(value.MaxValue);
		}

		public bool Equals(Range other)
		{
			return
				this.MinValue.Equals(other.MinValue) &&
				this.MaxValue.Equals(other.MaxValue);
		}
		public override bool Equals(object obj)
		{
			if (obj is Range)
				return this.Equals((Range)obj);
			else
				return false;
		}
		public override string ToString()
		{
			return string.Format("[{0} to {1}]", this.MinValue, this.MaxValue);
		}
		public override int GetHashCode()
		{
			return MathF.CombineHashCode(this.MinValue.GetHashCode(), this.MaxValue.GetHashCode());
		}

		/// <summary>
		/// Returns whether two Ranges are equal.
		/// </summary>
		/// <param name="left"></param>
		/// <param name="right"></param>
		/// <returns></returns>
		public static bool operator ==(Range left, Range right)
		{
			return left.Equals(right);
		}
		/// <summary>
		/// Returns whether two Ranges are inequal.
		/// </summary>
		/// <param name="left"></param>
		/// <param name="right"></param>
		/// <returns></returns>
		public static bool operator !=(Range left, Range right)
		{
			return !left.Equals(right);
		}

		/// <summary>
		/// Adds two Ranges by adding each of their components individually.
		/// </summary>
		/// <param name="left"></param>
		/// <param name="right"></param>
		/// <returns></returns>
		public static Range operator +(Range left, Range right)
		{
			return new Range(
				left.MinValue + right.MinValue,
				left.MaxValue + right.MaxValue);
		}
		/// <summary>
		/// Subtracts two Ranges by subtracting each of their components individually.
		/// </summary>
		/// <param name="left"></param>
		/// <param name="right"></param>
		/// <returns></returns>
		public static Range operator -(Range left, Range right)
		{
			return new Range(
				left.MinValue - right.MinValue,
				left.MaxValue - right.MaxValue);
		}
		/// <summary>
		/// Multiplies two Ranges by multiplying each of their components individually.
		/// </summary>
		/// <param name="left"></param>
		/// <param name="right"></param>
		/// <returns></returns>
		public static Range operator *(Range left, Range right)
		{
			return new Range(
				left.MinValue * right.MinValue,
				left.MaxValue * right.MaxValue);
		}
		/// <summary>
		/// Divides two Ranges by dividing each of their components individually.
		/// </summary>
		/// <param name="left"></param>
		/// <param name="right"></param>
		/// <returns></returns>
		public static Range operator /(Range left, Range right)
		{
			return new Range(
				left.MinValue / right.MinValue,
				left.MaxValue / right.MaxValue);
		}

		/// <summary>
		/// Performs an implicit conversion from a single value to a ranged value.
		/// </summary>
		/// <param name="value"></param>
		/// <returns></returns>
		public static implicit operator Range(float value)
		{
			return new Range(value);
		}
	}
}


text:
<?php

namespace LCQD\AppBundle\EventListener;

use Doctrine\ORM\EntityManager;
use Knp\DoctrineBehaviors\Reflection\ClassAnalyzer;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;

/**
 * DoctrineBeforeRequestListener
 *
 * @author lechatquidanse
 */
class DoctrineBeforeRequestListener
{
    /**
     * $em
     *
     * @var EntityManager
     */
    protected $em;

    /**
     * $classAnalyzer
     *
     * @var ClassAnalyzer
     */
    protected $classAnalyzer;

    public function __construct(EntityManager $em, ClassAnalyzer $classAnalyzer)
    {
        $this->em = $em;
        $this->classAnalyzer = $classAnalyzer;
    }

    /**
     * [onKernelRequest description]
     * @param  GetResponseEvent $event [description]
     * @return [type]                  [description]
     */
    public function onKernelRequest(GetResponseEvent $event)
    {
        $filter = $this->em->getFilters()
            ->enable('entity_enabled');

        $filter->setClassAnalyzer($this->classAnalyzer);
        $filter->setParameter('enabled', true);
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
W-Index
</TITLE>

<META NAME="date" CONTENT="2014-08-27">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
      Use
      Tree
      Deprecated
    Index
      Help

 PREV LETTER
 NEXT LETTER

  FRAMES
 NO FRAMES

  All Classes

A B C D E F G H I J L M P R S T U V W

W

WAIT_TIMEOUT -
Static variable in class com.gsma.android.oneapi.utilsLogo.HttpUtils

      Overview
      Package
      Class
      Use
      Tree
      Deprecated
    Index
      Help

 PREV LETTER
 NEXT LETTER

  FRAMES
 NO FRAMES

  All Classes

A B C D E F G H I J L M P R S T U V W


text:
[HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation
table of contents](README.md)

# .htaccess

In Apache HTTP server, `.htaccess` (hypertext access) is the configuration file
that allows for web server configuration. HTML5 Boilerplate includes a number
of best practice server rules for making web pages fast and secure, these rules
can be applied by configuring `.htaccess` file.

**You'll want to have these modules enabled for optimum performance:**

* `mod_setenvif.c` (setenvif_module)
* `mod_headers.c` (headers_module)
* `mod_deflate.c` (deflate_module)
* `mod_filter.c` (filter_module)
* `mod_expires.c` (expires_module)
* `mod_rewrite.c` (rewrite_module)

## On Windows

You've got a couple of options that depend on how you installed Apache.

1. **WampServer**. This is by far the simplest option. If you have installed
   WampServer just click on the icon in the task bar, hover over the Apache
   section in the menu that comes up and then hover over the modules section.
   You will be presented with a list of modules. Simply click on a module name
   to enable it (or disable it if it is already enabled). A check mark next to
   a module indicates that it is enabled. WampServer will automatically restart
   the Apache service after you enable a module.
2. **Manually editing `httpd.conf`**. This assumes that you have manually
   installed Apache. You will need to locate the `httpd.conf` file which is
   normally in the `conf` folder in the folder where you installed Apache (for
   example `C:\apache\conf\httpd.conf`). Open up this file in a text editor. Near
   the top (after a bunch of comments) you will see a long list of modules. Check
   to make sure that the modules listed above are not commented out. If they
   are, go ahead and uncomment them and restart Apache.

That's it, you're done!

## On Linux

These instructions should work on any distribution where `apt-get` has been
used to install Apache.

1. Open up a terminal and type the following command. Enter your password when
   prompted.

    `sudo a2enmod setenvif headers deflate filter expires rewrite include`

1. Restart apache by using the following command so the new configuration takes
   effect.

    `sudo /etc/init.d/apache2 restart`

That's it, you're done!

## On Mac

Coming soon...

## Security

Do not turn off your ServerSignature (i.e., the `Server:` HTTP header). Serious
attackers can use other kinds of fingerprinting methods to figure out the
actual server and components running behind a port. Instead, as a site owner,
you should keep track of what's listening on ports on hosts that you control.
Run a periodic scanner to make sure nothing suspicious is running on a host you
control, and use the ServerSignature to determine if this is the web server and
version that you expect.

## Performance

### Configure ETags

```apache
FileETag None
```

Entity tags (ETags) is a mechanism that web servers and browsers use to
determine whether the component in the browser's cache matches the one on the
origin server. (An "entity" is another word a "component": images, scripts,
stylesheets, etc.) ETags were added to provide a mechanism for validating
entities that is more flexible than the last-modified date. An `ETag` is a
string that uniquely identifies a specific version of a component. The only
format constraints are that the string be quoted. The origin server specifies
the component's `ETag` using the `ETag` response header.

```http
HTTP/1.1 200 OK
Last-Modified: Tue, 12 Dec 2006 03:03:59 GMT
ETag: "10c24bc-4ab-457e1c1f"
Content-Length: 12195
```

Later, if the browser has to validate a component, it uses the `If-None-Match`
header to pass the `ETag` back to the origin server. If the ETags match, a 304
status code is returned reducing the response by 12195 bytes for this
example.

```http
GET /i/yahoo.gif HTTP/1.1
Host: us.yimg.com
If-Modified-Since: Tue, 12 Dec 2006 03:03:59 GMT
If-None-Match: "10c24bc-4ab-457e1c1f"
HTTP/1.1 304 Not Modified
```

The problem with ETags is that they typically are constructed using attributes
that make them unique to a specific server hosting a site. ETags won't match
when a browser gets the original component from one server and later tries to
validate that component on a different server, a situation that is all too
common on web sites that use a cluster of servers to handle requests. By
default, both Apache and IIS embed data in the ETag that dramatically reduces
the odds of the validity test succeeding on web sites with multiple servers.

The ETag format for Apache 1.3 and 2.x is inode-size-timestamp. Although a
given file may reside in the same directory across multiple servers, and have
the same file size, permissions, timestamp, etc., its inode is different from
one server to the next.

IIS 5.0 and 6.0 have a similar issue with ETags. The format for ETags on IIS is
Filetimestamp:ChangeNumber. A ChangeNumber is a counter used to track
configuration changes to IIS. It's unlikely that the ChangeNumber is the same
across all IIS servers behind a web site.

The end result is ETags generated by Apache and IIS for the exact same
component won't match from one server to another. If the ETags don't match, the
user doesn't receive the small, fast 304 response that ETags were designed for;
instead, they'll get a normal 200 response along with all the data for the
component. If you host your web site on just one server, this isn't a problem.
But if you have multiple servers hosting your web site, and you're using Apache
or IIS with the default ETag configuration, your users are getting slower
pages, your servers have a higher load, you're consuming greater bandwidth, and
proxies aren't caching your content efficiently. Even if your components have a
far future Expires header, a conditional GET request is still made whenever the
user hits Reload or Refresh.

If you're not taking advantage of the flexible validation model that ETags
provide, it's better to just remove the ETag altogether. The Last-Modified
header validates based on the component's timestamp. And removing the ETag
reduces the size of the HTTP headers in both the response and subsequent
requests. This Microsoft Support article describes how to remove ETags. In
Apache, this is done by simply adding the above line to your Apache
configuration file.

### Gzip Components

Compression reduces response times by reducing the size of the HTTP response.

Starting with HTTP/1.1, web clients indicate support for compression with the
Accept-Encoding header in the HTTP request.

```
Accept-Encoding: gzip, deflate
```

If the web server sees this header in the request, it may compress the response
using one of the methods listed by the client. The web server notifies the web
client of this via the Content-Encoding header in the response.

```
Content-Encoding: gzip
```

Gzip is the most popular and effective compression method at this time. It was
developed by the GNU project and standardized by RFC 1952. The only other
compression format you're likely to see is deflate, but it's less effective and
less popular.

Gzipping generally reduces the response size by about 70%. Approximately 90% of
today's Internet traffic travels through browsers that claim to support gzip.
If you use Apache, the module configuring gzip depends on your version: Apache
1.3 uses `mod_gzip` while Apache 2.x uses `mod_deflate`.

There are known issues with browsers and proxies that may cause a mismatch in
what the browser expects and what it receives with regard to compressed
content. Fortunately, these edge cases are dwindling as the use of older
browsers drops off. The Apache modules help out by adding appropriate Vary
response headers automatically.

Servers choose what to gzip based on file type, but are typically too limited
in what they decide to compress. Most web sites gzip their HTML documents. It's
also worthwhile to gzip your scripts and stylesheets, but many web sites miss
this opportunity. In fact, it's worthwhile to compress any text response
including XML and JSON. Image and PDF files should not be gzipped because they
are already compressed. Trying to gzip them not only wastes CPU but can
potentially increase file sizes.

Gzipping as many appropriate file types as possible is an easy way to reduce
page weight and accelerate the user experience.

### Cache busting

A first-time visitor to your page may have to make several HTTP requests, but
by using the Expires header you make those components cacheable. This avoids
unnecessary HTTP requests on subsequent page views. Expires headers are most
often used with images, but they should be used on all components including
scripts, stylesheets, etc.

Traditionally, if you use a far future Expires header you have to change the
component's filename whenever the component changes.

The H5BP `.htaccess` has built-in filename cache busting. To use it, uncomment
the relevant lines in the `.htaccess` file.

Doing so will route all requests for `/path/filename.20120101.ext` to
`/path/filename.ext`. To use this, just add a time-stamp number (or your own
numbered versioning system) into your resource filenames in your HTML source
whenever you update those resources.

#### Example:

```html
<script src="/js/myscript.20120305.js"></script>
<script src="/js/jqueryplugin.45.js"></script>
<link rel="stylesheet" href="css/somestyle.49559939932.css">
<link rel="stylesheet" href="css/anotherstyle.2.css">
```

**N.B. You do not have to rename the resource on the filesystem.** All you have
to do is add the timestamp number to the filename in your HTML source. The
`.htaccess` directive will serve up the proper file.

Traditional cache busting involved adding a query string to the end of your
JavaScript or CSS filename whenever you updated it.

```html
<script src="/js/all.js?v=12"></script>
```

However, as [Steve Souders](http://stevesouders.com/) explains in [*Revving
Filenames: don't use
querystring*](http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/),
the query string approach is not always reliable for clients behind a Squid
Proxy Server.

## Trailing slash redirects

Trailing slash redirects can be done by adding one of the options below in `.htaccess`.

### Option 1
Rewrite `domain.com/foo` -> `domain.com/foo/`.

```apache
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
RewriteRule ^(.*)$ $1/ [R=301,L]
```

### Option 2
Rewrite `domain.com/foo/` -> `domain.com/foo`

```apache
RewriteRule ^(.*)/$ $1 [R=301,L]
```

Here are some tips to show you how to integrate the rewrite rules with
different CMS tools. There are four areas you need to look out for:

### 1. Keep a backup

If you use trailing slash redirects on an existing site, always keep a backup
of your `.htaccess` and test thoroughly on your staging server before using it on
a production server.

### 2. Don't replace existing rules, merge

For example, if you use CodeIgniter you may have existing URL rewrite rules like:

```apache
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1
```

Merge the above with H5BP rules below:

```apache
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
RewriteRule ^(.*)$ $1/ [R=301,L]
```

### 3. Be careful of the order

Make sure you test thoroughly in your staging environment. For the above
example, the order is add trailing slash first, and add your existing rule
after:

```apache
# this adds trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
RewriteRule ^(.*)$ $1/ [R=301,L]

# this gets rid of index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1
```

### 4. Double-check `RewriteBase` path is correct

Make sure your `RewriteBase` path points to the correct location and sits above
any rewrite rules. This usually happens to those have WordPress and ran the
auto install. For instance, if you have a site at `example.com/blog`, your
RewriteBase may look like:

```apache
RewriteBase /blog/
```

If you already have a working RewriteBase, keep that and don't remove it.


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--

    JBoss, Home of Professional Open Source
    Copyright Red Hat, Inc., and individual contributors.

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

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

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

-->
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
                 version="2.0">
    <description>My First JPA XML Application</description>
    <package>org.jboss.aerogear.unifiedpush.api</package>

    <mapped-superclass class="BaseModel">
        <attributes>
            <id name="id"/>
        </attributes>
    </mapped-superclass>
    <entity class="Variant" access="PROPERTY">
        <inheritance strategy="JOINED"/>
        <discriminator-column name="VARIANT_TYPE" discriminator-type="STRING"/>
    </entity>
    <entity class="AndroidVariant" access="FIELD">
        <discriminator-value>android</discriminator-value>
    </entity>
    <entity class="Installation" access="FIELD">
        <attributes>
            <basic name="deviceToken">
                <!-- "The max size for a registration_id is bounded by the max size for a cookie, which is 4K (4096 bytes)." -->
                <column length="4096" />
            </basic>
            <many-to-one name="variant" fetch="LAZY">
                <join-column name="variantID" referenced-column-name="variantID"/>
            </many-to-one>
            <element-collection name="categories" fetch="EAGER"/>
        </attributes>
    </entity>
    <entity class="iOSVariant" access="FIELD">
        <discriminator-value>ios</discriminator-value>
        <attributes>
            <basic name="certificate">
                <lob/>
            </basic>
        </attributes>
    </entity>
    <entity class="PushApplication" access="FIELD">
        <attributes>
            <one-to-many name="variants" fetch="EAGER">
                <order-by>type asc</order-by>
                <join-column/>
                <cascade>
                    <cascade-remove/>
                </cascade>
            </one-to-many>
        </attributes>
    </entity>
    <entity class="SimplePushVariant" access="FIELD">
        <discriminator-value>simplePush</discriminator-value>
    </entity>
    <entity class="ChromePackagedAppVariant" access="FIELD">
        <discriminator-value>chromePackagedApp</discriminator-value>
    </entity>
    <entity class="WindowsVariant" access="FIELD">
        <discriminator-value>windows</discriminator-value>
    </entity>

    <entity class="PushMessageInformation" access="FIELD">
        <attributes>
            <basic name="submitDate">
                <temporal>TIMESTAMP</temporal>
            </basic>
            <basic name="rawJsonMessage">
                <column length="4500" />
            </basic>
            <one-to-many name="variantInformations" fetch="EAGER">
                <join-column />
                <cascade>
                    <cascade-all/>
                </cascade>
            </one-to-many>
        </attributes>
    </entity>

    <entity class="VariantMetricInformation" access="FIELD" />

</entity-mappings>