text:
package com.amazonaws.services.s3.model;

import java.io.File;
import java.io.InputStream;
import java.io.Serializable;

/**
 *

 * Uploads a new object to the specified Amazon S3 bucket. The PutObjectRequest
 * optionally uploads object metadata and applies a canned access control policy
 * to the new object.
 *

 *

 * Amazon S3 never stores partial objects; if during this call an exception
 * wasn't thrown, the entire object was stored.
 *

 *

 * Depending on whether a file or input stream is being uploaded, this request
 * has slightly different behavior.
 *

 *

 * When uploading a file:
 *

 *

 *

 * The client automatically computes a checksum of the file. Amazon S3 uses
 * checksums to validate the data in each file.

 *

 * Using the file extension, Amazon S3 attempts to determine the correct content
 * type and content disposition to use for the object.

 *

 *

 * When uploading directly from an input stream, content length must be
 * specified before data can be uploaded to Amazon S3. If not provided, the
 * library will have to buffer the contents of the input stream in order
 * to calculate it. Amazon S3 explicitly requires that the content length be
 * sent in the request headers before any of the data is sent.

 *

 * Amazon S3 is a distributed system. If Amazon S3 receives multiple write
 * requests for the same object nearly simultaneously, all of the objects might
 * be stored. However, only one object will obtain the key.
 *

 *

 * Note: Amazon S3 does not provide object locking; if this is needed, make sure
 * to build it into the application layer.
 *

 *

 * If the caller specifies a location constraint when creating a bucket, all
 * objects added to the bucket are stored in the same region as the bucket. For
 * example, if specifying a Europe (EU) region constraint for a bucket, all of
 * that bucket's objects are stored in the EU region.
 *

 *

 * The specified bucket must already exist and the caller must have
 * {@link Permission#Write} permission to the bucket to upload an object.
 *

 *

 * If you are uploading or accessing KMS-encrypted objects, you need to
 * specify the correct region of the bucket on your client and configure Amazon Web Services
 * Signature Version 4 for added security. For more information on how to do
 * this, see
 * http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify
 * -signature-version
 *

 *
 * @see PutObjectRequest#PutObjectRequest(String, String, File)
 * @see PutObjectRequest#PutObjectRequest(String, String, InputStream,
 *      ObjectMetadata)
 */
public class PutObjectRequest extends AbstractPutObjectRequest implements Serializable, ExpectedBucketOwnerRequest {

    /**
     * If enabled, the requester is charged for conducting this operation from
     * Requester Pays Buckets.
     */
    private boolean isRequesterPays;

    private String expectedBucketOwner;

    /**
     * Constructs a new
     * {@link PutObjectRequest} object to upload a file to the
     * specified bucket and key. After constructing the request,
     * users may optionally specify object metadata or a canned ACL as well.
     *
     *

     * When using this API with an access point, you must direct requests
     * to the access point hostname. The access point hostname takes the form
     * AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
     *

     *

     * When using this operation using an access point through the Amazon Web Services SDKs, you provide
     * the access point ARN in place of the bucket name. For more information about access point
     * ARNs, see
     * Using access points in the Amazon Simple Storage Service Developer Guide.
     *

     *
     * @param bucketName
     *            The name of an existing bucket, or access point ARN, to which the new object will be
     *            uploaded.
     * @param key
     *            The key under which to store the new object.
     * @param file
     *            The path of the file to upload to Amazon S3.
     */
    public PutObjectRequest(String bucketName, String key, File file) {
        super(bucketName, key, file);
    }

    /**
     * Constructs a new
     * {@link PutObjectRequest} object to perform a redirect for the
     * specified bucket and key. After constructing the request,
     * users may optionally specify object metadata or a canned ACL as well.
     *

     * The redirect is performed using the
     * {@link com.amazonaws.services.s3.Headers#REDIRECT_LOCATION} header.
     *

     *
     *

     * When using this API with an access point, you must direct requests
     * to the access point hostname. The access point hostname takes the form
     * AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
     *

     *

     * When using this operation using an access point through the Amazon Web Services SDKs, you provide
     * the access point ARN in place of the bucket name. For more information about access point
     * ARNs, see
     * Using access points in the Amazon Simple Storage Service Developer Guide.
     *

     *
     * @param bucketName
     *            The name of an existing bucket, or access point ARN, to which the new object will be
     *            uploaded.
     * @param key
     *            The key under which to store the new object.
     * @param redirectLocation
     *            Sets the {@link com.amazonaws.services.s3.Headers#REDIRECT_LOCATION}
     *            header for the new object.
     */
    public PutObjectRequest(String bucketName, String key, String redirectLocation) {
        super(bucketName, key, redirectLocation);
    }

    /**
     * Constructs a new
     * {@link PutObjectRequest} object to upload a stream of data to
     * the specified bucket and key. After constructing the request,
     * users may optionally specify object metadata or a canned ACL as well.
     *

     * Content length for the data stream must be
     * specified in the object metadata parameter; Amazon S3 requires it
     * be passed in before the data is uploaded. Failure to specify a content
     * length will cause the entire contents of the input stream to be buffered
     * locally in memory so that the content length can be calculated, which can
     * result in negative performance problems.
     *

     *
     *

     * When using this API with an access point, you must direct requests
     * to the access point hostname. The access point hostname takes the form
     * AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
     *

     *

     * When using this operation using an access point through the Amazon Web Services SDKs, you provide
     * the access point ARN in place of the bucket name. For more information about access point
     * ARNs, see
     * Using access points in the Amazon Simple Storage Service Developer Guide.
     *

     *
     * @param bucketName
     *            The name of an existing bucket, or access point ARN, to which the new object will be
     *            uploaded.
     * @param key
     *            The key under which to store the new object.
     * @param input
     *            The stream of data to upload to Amazon S3.
     * @param metadata
     *            The object metadata. At minimum this specifies the
     *            content length for the stream of data being uploaded.
     */
    public PutObjectRequest(String bucketName, String key, InputStream input,
            ObjectMetadata metadata) {
        super(bucketName, key, input, metadata);
    }

    public String getExpectedBucketOwner() {
        return expectedBucketOwner;
    }

    public PutObjectRequest withExpectedBucketOwner(String expectedBucketOwner) {
        this.expectedBucketOwner = expectedBucketOwner;
        return this;
    }

    public void setExpectedBucketOwner(String expectedBucketOwner) {
        withExpectedBucketOwner(expectedBucketOwner);
    }

    /**
     * Returns a clone (as deep as possible) of this request object.
     */
    @Override
    public PutObjectRequest clone() {
        PutObjectRequest request = (PutObjectRequest) super.clone();
        return this.copyPutObjectBaseTo(request);
    }

    @Override
    @SuppressWarnings("unchecked")
    public PutObjectRequest withBucketName(String bucketName) {
        return super.withBucketName(bucketName);
    }

    @Override
    @SuppressWarnings("unchecked")
    public PutObjectRequest withKey(String key) {
        return super.withKey(key);
    }

    @Override
    @SuppressWarnings("unchecked")
    public PutObjectRequest withStorageClass(String storageClass) {
        return super.withStorageClass(storageClass);
    }

    @Override
    @SuppressWarnings("unchecked")
    public PutObjectRequest withStorageClass(StorageClass storageClass) {
        return super.withStorageClass(storageClass);
    }

    @Override
    @SuppressWarnings("unchecked")
    public PutObjectRequest  withFile(File file) {
        return super.withFile(file);
    }

    @Override
    @SuppressWarnings("unchecked")
    public PutObjectRequest withMetadata(ObjectMetadata metadata) {
        return super.withMetadata(metadata);
    }

    @Override
    @SuppressWarnings("unchecked")
    public PutObjectRequest  withCannedAcl(CannedAccessControlList cannedAcl) {
        return super.withCannedAcl(cannedAcl);
    }

    @Override
    @SuppressWarnings("unchecked")
    public PutObjectRequest withAccessControlList(
            AccessControlList accessControlList) {
        return super.withAccessControlList(accessControlList);
    }

    @Override
    @SuppressWarnings("unchecked")
    public PutObjectRequest  withInputStream(InputStream inputStream) {
        return super.withInputStream(inputStream);
    }

    @Override
    @SuppressWarnings("unchecked")
    public PutObjectRequest withRedirectLocation(String redirectLocation) {
        return super.withRedirectLocation(redirectLocation);
    }

    @Override
    @SuppressWarnings("unchecked")
    public PutObjectRequest withSSECustomerKey(SSECustomerKey sseKey) {
        return super.withSSECustomerKey(sseKey);
    }

    public PutObjectRequest withTagging(ObjectTagging tagSet) {
        super.setTagging(tagSet);
        return this;
    }

    @Deprecated
    @Override
    @SuppressWarnings("unchecked")
    public PutObjectRequest withProgressListener(
            com.amazonaws.services.s3.model.ProgressListener progressListener) {
        return super.withProgressListener(progressListener);
    }

    @Override
    @SuppressWarnings("unchecked")
    public PutObjectRequest withSSEAwsKeyManagementParams(
            SSEAwsKeyManagementParams sseAwsKeyManagementParams) {
        return super.withSSEAwsKeyManagementParams(sseAwsKeyManagementParams);
    }

    /**
     * Returns true if the user has enabled Requester Pays option when
     * conducting this operation from Requester Pays Bucket; else false.
     *
     *

     * If a bucket is enabled for Requester Pays, then any attempt to upload or
     * download an object from it without Requester Pays enabled will result in
     * a 403 error and the bucket owner will be charged for the request.
     *
     *

     * Enabling Requester Pays disables the ability to have anonymous access to
     * this bucket
     *
     * @return true if the user has enabled Requester Pays option for
     *         conducting this operation from Requester Pays Bucket.
     */
    public boolean isRequesterPays() {
        return isRequesterPays;
    }

    /**
     * Used for conducting this operation from a Requester Pays Bucket. If
     * set the requester is charged for requests from the bucket.
     *
     *

     * If a bucket is enabled for Requester Pays, then any attempt to upload or
     * download an object from it without Requester Pays enabled will result in
     * a 403 error and the bucket owner will be charged for the request.
     *
     *

     * Enabling Requester Pays disables the ability to have anonymous access to
     * this bucket.
     *
     * @param isRequesterPays
     *            Enable Requester Pays option for the operation.
     */
    public void setRequesterPays(boolean isRequesterPays) {
        this.isRequesterPays = isRequesterPays;
    }

    /**
     * Used for conducting this operation from a Requester Pays Bucket. If
     * set the requester is charged for requests from the bucket. It returns this
     * updated PutObjectRequest object so that additional method calls can be
     * chained together.
     *
     *

     * If a bucket is enabled for Requester Pays, then any attempt to upload or
     * download an object from it without Requester Pays enabled will result in
     * a 403 error and the bucket owner will be charged for the request.
     *
     *

     * Enabling Requester Pays disables the ability to have anonymous access to
     * this bucket.
     *
     * @param isRequesterPays
     *            Enable Requester Pays option for the operation.
     *
     * @return The updated PutObjectRequest object.
     */
    public PutObjectRequest withRequesterPays(boolean isRequesterPays) {
        setRequesterPays(isRequesterPays);
        return this;
    }
}


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/compute/v1/compute.proto

namespace Google\Cloud\Compute\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 *
 * Generated from protobuf message google.cloud.compute.v1.InstanceManagedByIgmError
 */
class InstanceManagedByIgmError extends \Google\Protobuf\Internal\Message
{
    /**
     * [Output Only] Contents of the error.
     *
     * Generated from protobuf field optional .google.cloud.compute.v1.InstanceManagedByIgmErrorManagedInstanceError error = 96784904;
     */
    private $error = null;
    /**
     * [Output Only] Details of the instance action that triggered this error. May be null, if the error was not caused by an action on an instance. This field is optional.
     *
     * Generated from protobuf field optional .google.cloud.compute.v1.InstanceManagedByIgmErrorInstanceActionDetails instance_action_details = 292224547;
     */
    private $instance_action_details = null;
    /**
     * [Output Only] The time that this error occurred. This value is in RFC3339 text format.
     *
     * Generated from protobuf field optional string timestamp = 55126294;
     */
    private $timestamp = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Compute\V1\InstanceManagedByIgmErrorManagedInstanceError $error
     *           [Output Only] Contents of the error.
     *     @type \Google\Cloud\Compute\V1\InstanceManagedByIgmErrorInstanceActionDetails $instance_action_details
     *           [Output Only] Details of the instance action that triggered this error. May be null, if the error was not caused by an action on an instance. This field is optional.
     *     @type string $timestamp
     *           [Output Only] The time that this error occurred. This value is in RFC3339 text format.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * [Output Only] Contents of the error.
     *
     * Generated from protobuf field optional .google.cloud.compute.v1.InstanceManagedByIgmErrorManagedInstanceError error = 96784904;
     * @return \Google\Cloud\Compute\V1\InstanceManagedByIgmErrorManagedInstanceError|null
     */
    public function getError()
    {
        return $this->error;
    }

    public function hasError()
    {
        return isset($this->error);
    }

    public function clearError()
    {
        unset($this->error);
    }

    /**
     * [Output Only] Contents of the error.
     *
     * Generated from protobuf field optional .google.cloud.compute.v1.InstanceManagedByIgmErrorManagedInstanceError error = 96784904;
     * @param \Google\Cloud\Compute\V1\InstanceManagedByIgmErrorManagedInstanceError $var
     * @return $this
     */
    public function setError($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\InstanceManagedByIgmErrorManagedInstanceError::class);
        $this->error = $var;

        return $this;
    }

    /**
     * [Output Only] Details of the instance action that triggered this error. May be null, if the error was not caused by an action on an instance. This field is optional.
     *
     * Generated from protobuf field optional .google.cloud.compute.v1.InstanceManagedByIgmErrorInstanceActionDetails instance_action_details = 292224547;
     * @return \Google\Cloud\Compute\V1\InstanceManagedByIgmErrorInstanceActionDetails|null
     */
    public function getInstanceActionDetails()
    {
        return $this->instance_action_details;
    }

    public function hasInstanceActionDetails()
    {
        return isset($this->instance_action_details);
    }

    public function clearInstanceActionDetails()
    {
        unset($this->instance_action_details);
    }

    /**
     * [Output Only] Details of the instance action that triggered this error. May be null, if the error was not caused by an action on an instance. This field is optional.
     *
     * Generated from protobuf field optional .google.cloud.compute.v1.InstanceManagedByIgmErrorInstanceActionDetails instance_action_details = 292224547;
     * @param \Google\Cloud\Compute\V1\InstanceManagedByIgmErrorInstanceActionDetails $var
     * @return $this
     */
    public function setInstanceActionDetails($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\InstanceManagedByIgmErrorInstanceActionDetails::class);
        $this->instance_action_details = $var;

        return $this;
    }

    /**
     * [Output Only] The time that this error occurred. This value is in RFC3339 text format.
     *
     * Generated from protobuf field optional string timestamp = 55126294;
     * @return string
     */
    public function getTimestamp()
    {
        return isset($this->timestamp) ? $this->timestamp : '';
    }

    public function hasTimestamp()
    {
        return isset($this->timestamp);
    }

    public function clearTimestamp()
    {
        unset($this->timestamp);
    }

    /**
     * [Output Only] The time that this error occurred. This value is in RFC3339 text format.
     *
     * Generated from protobuf field optional string timestamp = 55126294;
     * @param string $var
     * @return $this
     */
    public function setTimestamp($var)
    {
        GPBUtil::checkString($var, True);
        $this->timestamp = $var;

        return $this;
    }

}

redpajama_set_name: RedPajamaGithub


text:
/* main.js */
import Vue from 'vue'
import Vuex from 'vuex'
import { Plugin as VuexPlugin } from 'vuex/types/index'
interface Option {
	storage?: Storage
	stringify?(obj: any): string
	parse?(str: String): any
	merge?(...obj: object[]): object
	namespace: string
	keys?: string[]
}

/* entry.js */
export = vuejsStorage

declare function vuejsStorage(option: Option): VuexPlugin<any>
declare namespace vuejsStorage {
	function install(Vue: Vue): void
}

/* override vue option */
declare module 'vue/types/options' {
	interface ComponentOptions<V extends Vue> {
		storage?: Option | Option[]
	}
}


text:
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using dexih.functions;
using dexih.functions.Query;
using Dexih.Utils.DataType;
using static Dexih.Utils.DataType.DataType;

namespace dexih.transforms.Poco
{
    public class PocoTable<T>
    {
        public Table Table { get; set; }
        public List<PocoTableMapping> TableMappings { get; set; }
        public PropertyInfo AutoIncrementProperty {get;set;}

        public PocoTable()
        {
            var table = new Table(typeof(T).Name);

            var tableAttr = typeof(T).GetTypeInfo().GetCustomAttribute<PocoTableAttribute>(false);
            if (tableAttr != null)
            {
                table.OutputSortFields = tableAttr.SortFields;
                if (!string.IsNullOrEmpty(tableAttr.Name))
                {
                    table.Name = tableAttr.Name;
                }
            }

            var mappings = new List<PocoTableMapping>();

            var position = 0;
            foreach (var propertyInfo in typeof(T).GetProperties())
            {
                var field = propertyInfo.GetCustomAttribute<PocoColumnAttribute>(false) ?? new PocoColumnAttribute(propertyInfo.Name);

                if (field.DeltaType != EDeltaType.IgnoreField && !field.Skip)
                {
                    var column = new TableColumn()
                    {
                        Name = string.IsNullOrEmpty(field.Name) ? propertyInfo.Name : field.Name,
                        DeltaType = field.DeltaType,
                        DataType = field.DataType == ETypeCode.Unknown ? GetTypeCode(propertyInfo.PropertyType, out _) : field.DataType,
                        AllowDbNull = propertyInfo.PropertyType == typeof(string) || Nullable.GetUnderlyingType(propertyInfo.PropertyType) != null || field.AllowDbNull,
                        MaxLength = field.MaxLength >= 0 ? (int?)field.MaxLength : null,
                        Precision = field.Precision >= 0 ? (int?)field.Precision : null,
                        Scale = field.Scale >= 0 ? (int?)field.Scale : null,
                    };

                    table.Columns.Add(column);
                    mappings.Add(new PocoTableMapping(propertyInfo, position,field.IsKey));

                    if(field.DeltaType == EDeltaType.DbAutoIncrement)
                    {
                        AutoIncrementProperty = propertyInfo;
                    }

                    position++;
                }
            }

            Table = table;
            TableMappings = mappings;
        }

        public PocoTable(Table table)
        {
            var mappings = new List<PocoTableMapping>();

            foreach (var propertyInfo in typeof(T).GetProperties())
            {
                var field = propertyInfo.GetCustomAttribute<PocoColumnAttribute>(false) ?? new PocoColumnAttribute(propertyInfo.Name);
                var fieldName = string.IsNullOrEmpty(field.Name) ? propertyInfo.Name : field.Name;
                var isKey = field.IsKey;

                var position = table.Columns.GetOrdinal(fieldName);
                if(position >= 0)
                {
                    mappings.Add(new PocoTableMapping(propertyInfo, position, isKey));
                }
            }
            Table = table;
            TableMappings = mappings;
        }

        /// <summary>
        /// Creates a table in the underlying connection
        /// </summary>
        /// <returns>The insert.</returns>
        /// <param name="connection">Connection.</param>
        /// <param name="dropTable"></param>
        /// <param name="cancellationToken">Cancellation token.</param>
        public Task CreateTable(Connection connection, bool dropTable, CancellationToken cancellationToken = default)
        {
            return connection.CreateTable(Table, dropTable, cancellationToken);
        }

        /// <summary>
        /// Checks if the table exists in the target database
        /// </summary>
        /// <returns>True = table exists.</returns>
        /// <param name="connection">Connection.</param>
        /// <param name="cancellationToken">Cancellation token.</param>
        public Task<bool> TableExists(Connection connection, CancellationToken cancellationToken = default)
        {
            return connection.TableExists(Table, cancellationToken);
        }

        public InsertQuery PrepareInsert(T item)
        {
            var columns = new List<QueryColumn>();

            foreach (var mapping in TableMappings)
            {
                var column = Table.Columns[mapping.Position];
                if (column.DeltaType != EDeltaType.DbAutoIncrement)
                {
                    var value = Operations.Parse(column.DataType, mapping.PropertyInfo.GetValue(item));
                    var queryColumn = new QueryColumn(column, value);
                    columns.Add(queryColumn);
                }
            }

            var insertQuery = new InsertQuery(columns);

            return insertQuery;
        }

        /// <summary>
        /// Inserts the item into the connection.
        /// </summary>
        /// <returns>The insert.</returns>
        /// <param name="connection">Connection.</param>
        /// <param name="item">Item.</param>
        /// <param name="cancellationToken">Cancellation token.</param>
        public Task ExecuteInsert(Connection connection, T item, CancellationToken cancellationToken = default)
        {

            var insertQuery = PrepareInsert(item);
            return ExecuteInsert(connection, insertQuery, item, cancellationToken);
        }

        public async Task ExecuteInsert(Connection connection, InsertQuery insertQuery, T item, CancellationToken cancellationToken = default)
        {
            var insertResult = await connection.ExecuteInsert(Table, new List<InsertQuery>() { insertQuery }, cancellationToken);

            if(AutoIncrementProperty != null)
            {
                AutoIncrementProperty.SetValue(item, insertResult);
            }
        }

        public DeleteQuery PrepareDelete(T item)
        {
            var filters = new Filters();

            foreach (var mapping in TableMappings)
            {
                var column = Table.Columns[mapping.Position];
                if (mapping.IsKey)
                {
                    var filter = new Filter(column, ECompare.IsEqual, mapping.PropertyInfo.GetValue(item));
                    filters.Add(filter);
                }
            }

            var deleteQuery = new DeleteQuery(Table.Name, filters);

            return deleteQuery;
        }

        /// <summary>
        /// Deletes the item, based on the item values that contain a deltaType = NaturalKey
        /// </summary>
        /// <returns>The delete.</returns>
        /// <param name="connection">Connection.</param>
        /// <param name="item">Item to delete</param>
        /// <param name="cancellationToken">Cancellation token.</param>
        public Task ExecuteDelete(Connection connection, T item, CancellationToken cancellationToken = default)
        {
            var deleteQuery = PrepareDelete(item);
            return ExecuteDelete(connection, deleteQuery, cancellationToken);
        }

        public Task ExecuteDelete(Connection connection, DeleteQuery deleteQuery, CancellationToken cancellationToken = default)
        {
            return connection.ExecuteDelete(Table, new List<DeleteQuery>() { deleteQuery }, cancellationToken);

        }

        public UpdateQuery PrepareUpdate(T item)
        {
            var filters = new Filters();
            var updateColumns = new List<QueryColumn>();

            foreach (var mapping in TableMappings)
            {
                var column = Table.Columns[mapping.Position];
                var value = Operations.Parse(column.DataType, mapping.PropertyInfo.GetValue(item));

                if (mapping.IsKey)
                {
                    var filter = new Filter(column, ECompare.IsEqual, value);
                    filters.Add(filter);
                }
                else
                {
                    var updateColumn = new QueryColumn(column, value);
                    updateColumns.Add(updateColumn);
                }
            }

            var updateQuery = new UpdateQuery(updateColumns, filters);

            return updateQuery;
        }

        /// <summary>
        /// Deletes the item, based on the item values that contain a deltaType = NaturalKey
        /// </summary>
        /// <returns>The delete.</returns>
        /// <param name="connection">Connection.</param>
        /// <param name="item">Item to delete</param>
        /// <param name="cancellationToken">Cancellation token.</param>
        public Task ExecuteUpdate(Connection connection, T item, CancellationToken cancellationToken = default)
        {
            var updateQuery = PrepareUpdate(item);
            return ExecuteUpdate(connection, updateQuery, cancellationToken);
        }

        public Task ExecuteUpdate(Connection connection, UpdateQuery updateQuery, CancellationToken cancellationToken = default)
        {
            return connection.ExecuteUpdate(Table, new List<UpdateQuery>() { updateQuery }, cancellationToken);
        }

        /// <summary>
        /// Inserts the items into the connection.
        /// </summary>
        /// <returns>The insert.</returns>
        /// <param name="connection">Connection.</param>
        /// <param name="items">Item.</param>
        /// <param name="cancellationToken">Cancellation token.</param>
        public Task ExecuteInsertBulk(Connection connection, IEnumerable<T> items, CancellationToken cancellationToken = default)
        {
            var pocoTable = new PocoTable<T>(Table.Copy());

            var pocoReader = new PocoReader<T>(pocoTable, items);
            pocoReader.Open(cancellationToken);
            return connection.ExecuteInsertBulk(Table, pocoReader, cancellationToken);
        }
    }

}


text:
package main

import (
	_ "github.com/docker/infrakit/pkg/run/v0/oneview"
)


text:
import os
import re
from datetime import datetime, timedelta

from django.conf import settings
from django.contrib.admin.models import CHANGE, LogEntry
from django.contrib.admin.options import get_content_type_for_model
from django.db import transaction
from django.utils.encoding import force_str

from django_statsd.clients import statsd

import olympia.core.logger
from olympia.amo.celery import task
from olympia.amo.decorators import use_primary_db
from olympia.amo.utils import SafeStorage
from olympia.constants.blocklist import (
    MLBF_TIME_CONFIG_KEY,
    MLBF_BASE_ID_CONFIG_KEY,
    REMOTE_SETTINGS_COLLECTION_MLBF,
)
from olympia.lib.remote_settings import RemoteSettings
from olympia.zadmin.models import set_config

from .mlbf import MLBF
from .models import BlocklistSubmission
from .utils import (
    datetime_to_ts,
)

log = olympia.core.logger.getLogger('z.amo.blocklist')

bracket_open_regex = re.compile(r'(?<!\\){')
bracket_close_regex = re.compile(r'(?<!\\)}')

BLOCKLIST_RECORD_MLBF_BASE = 'bloomfilter-base'

@task
@use_primary_db
def process_blocklistsubmission(multi_block_submit_id, **kw):
    obj = BlocklistSubmission.objects.get(pk=multi_block_submit_id)
    try:
        with transaction.atomic():
            if obj.action == BlocklistSubmission.ACTION_ADDCHANGE:
                # create the blocks from the guids in the multi_block
                obj.save_to_block_objects()
            elif obj.action == BlocklistSubmission.ACTION_DELETE:
                # delete the blocks
                obj.delete_block_objects()
    except Exception as exc:
        # If something failed reset the submission back to Pending.
        obj.update(signoff_state=BlocklistSubmission.SIGNOFF_PENDING)
        message = f'Exception in task: {exc}'
        LogEntry.objects.log_action(
            user_id=settings.TASK_USER_ID,
            content_type_id=get_content_type_for_model(obj).pk,
            object_id=obj.pk,
            object_repr=str(obj),
            action_flag=CHANGE,
            change_message=message,
        )
        raise exc

@task
def upload_filter(generation_time, is_base=True):
    bucket = settings.REMOTE_SETTINGS_WRITER_BUCKET
    server = RemoteSettings(
        bucket, REMOTE_SETTINGS_COLLECTION_MLBF, sign_off_needed=False
    )
    mlbf = MLBF.load_from_storage(generation_time)
    if is_base:
        # clear the collection for the base - we want to be the only filter
        server.delete_all_records()
        statsd.incr('blocklist.tasks.upload_filter.reset_collection')
        # Then the bloomfilter
        data = {
            'key_format': MLBF.KEY_FORMAT,
            'generation_time': generation_time,
            'attachment_type': BLOCKLIST_RECORD_MLBF_BASE,
        }
        storage = SafeStorage(user_media='mlbf_storage')
        with storage.open(mlbf.filter_path, 'rb') as filter_file:
            attachment = ('filter.bin', filter_file, 'application/octet-stream')
            server.publish_attachment(data, attachment)
            statsd.incr('blocklist.tasks.upload_filter.upload_mlbf')
        statsd.incr('blocklist.tasks.upload_filter.upload_mlbf.base')
    else:
        # If we have a stash, write that
        stash_data = {
            'key_format': MLBF.KEY_FORMAT,
            'stash_time': generation_time,
            'stash': mlbf.stash_json,
        }
        server.publish_record(stash_data)
        statsd.incr('blocklist.tasks.upload_filter.upload_stash')

    server.complete_session()
    set_config(MLBF_TIME_CONFIG_KEY, generation_time, json_value=True)
    if is_base:
        set_config(MLBF_BASE_ID_CONFIG_KEY, generation_time, json_value=True)

@task
def cleanup_old_files(*, base_filter_id):
    log.info('Starting clean up of old MLBF folders...')
    six_months_ago = datetime_to_ts(datetime.now() - timedelta(weeks=26))
    base_filter_ts = int(base_filter_id)
    storage = SafeStorage(user_media='mlbf_storage')
    for dir in storage.listdir(settings.MLBF_STORAGE_PATH)[0]:
        dir = force_str(dir)
        # skip non-numeric folder names
        if not dir.isdigit():
            log.info('Skipping %s because not a timestamp', dir)
            continue
        dir_ts = int(dir)
        dir_as_date = datetime.fromtimestamp(dir_ts / 1000)
        # delete if >6 months old and <base_filter_id
        if dir_ts > six_months_ago:
            log.info('Skipping %s because < 6 months old (%s)', dir, dir_as_date)
        elif dir_ts > base_filter_ts:
            log.info(
                'Skipping %s because more recent (%s) than base mlbf (%s)',
                dir,
                dir_as_date,
                datetime.fromtimestamp(base_filter_ts / 1000),
            )
        else:
            log.info('Deleting %s because > 6 months old (%s)', dir, dir_as_date)
            storage.rm_stored_dir(os.path.join(settings.MLBF_STORAGE_PATH, dir))


text:
package com.carrotgarden.nexus.aws.s3.publish.metrics;

import com.yammer.metrics.core.Meter;
import com.yammer.metrics.core.Timer;
import com.yammer.metrics.util.RatioGauge;

/**
 * rate to time
 */
public class RateTimeRatio extends RatioGauge {

	private final Meter rate;
	private final Timer time;

	public RateTimeRatio(final Meter rate, final Timer time) {
		this.rate = rate;
		this.time = time;
	}

	@Override
	public double getNumerator() {
		return rate.oneMinuteRate();
	}

	@Override
	public double getDenominator() {
		return time.oneMinuteRate();
	}

}


text:
// This file is automatically generated.

package adila.db;

/*
 * LG Optimus Black
 *
 * DEVICE: black
 * MODEL: LG-KU5900
 */
final class black {
    public static final String DATA = "LG|Optimus Black|";
}


text:
import sys
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from config import config

def send_mail(message,receivers=config['smtp_receivers']):
    """
        Module that sends emails.
        Message should be a dictionary containing the following keys:
            subject -> Subject of the email
            text -> The plain text part of the email
        uses options from config.py
    """
    sender = config['smtp_sender']
    print sender
    print receivers
    print message
    try:
        smtpObj = smtplib.SMTP_SSL(config['smtp_server'],config['smtp_port'])
        smtpObj.login(config['smtp_login'],config['smtp_password'])
        if not receivers:
            return True
        smtpObj.sendmail(sender, receivers, message)
        smtpObj.quit()
        return True
    except Exception, exc:
         print >> sys.stderr, "Exception From email_base"
         print >> sys.stderr, exc
         return False
if __name__ == '__main__':
    send_mail('Test message')


text:
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>NewWechat.Application</name>
    </assembly>
    <members>
        <member name="F:NewWechat.AppConsts.DefaultPassPhrase">

            Default pass phrase for SimpleStringCipher decrypt/encrypt operations

        </member>
        <member name="T:NewWechat.Net.MimeTypes.MimeTypeNames">

            Common mime types.

        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXJavascript">
            Used to denote the encoding necessary for files containing JavaScript source code. The alternative MIME type for this file type is text/javascript.
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.AudioL24">
            24bit Linear PCM audio at 8-48kHz, 1-N channels; Defined in RFC 3190
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXShockwaveFlash">
            Adobe Flash files for example with the extension .swf
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationOctetStream">
            Arbitrary binary data.[5] Generally speaking this type identifies files that are not associated with a specific application. Contrary to past assumptions by software packages such as Apache this is not a type that should be applied to unknown files. In such a case, a server or application should not indicate a content type, as it may be incorrect, but rather, should omit the type in order to allow the recipient to guess the type.[6]
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationAtomXml">
            Atom feeds
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.TextCss">
            Cascading Style Sheets; Defined in RFC 2318
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.TextCmd">
            commands; subtype resident in Gecko browsers like Firefox 3.5
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.TextCsv">
            Comma-separated values; Defined in RFC 4180
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXDeb">
            deb (file format), a software package format used by the Debian project
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.MultipartEncrypted">
            Defined in RFC 1847
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.MultipartSigned">
            Defined in RFC 1847
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.MessageHttp">
            Defined in RFC 2616
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ModelExample">
            Defined in RFC 4735
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXDvi">
            device-independent document in DVI format
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXmlDtd">
            DTD files; Defined by RFC 3023
        </member>

        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationEcmascript">
            ECMAScript/JavaScript; Defined in RFC 4329 (equivalent to application/javascript but with stricter processing rules)
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationEdifact">
            EDI EDIFACT data; Defined in RFC 1767
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationEdiX12">
            EDI X12 data; Defined in RFC 1767
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.MessagePartial">
            Email; Defined in RFC 2045 and RFC 2046
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.MessageRfc822">
            Email; EML files, MIME files, MHT files, MHTML files; Defined in RFC 2045 and RFC 2046
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.TextXml">
            Extensible Markup Language; Defined in RFC 3023
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.VideoXFlv">
            Flash video (FLV files)
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ImageGif">
            GIF image; Defined in RFC 2045 and RFC 2046
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.TextXGwtRpc">
            GoogleWebToolkit data
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXGzip">
            Gzip
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.TextHtml">
            HTML; Defined in RFC 2854
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ImageVndMicrosoftIcon">
            ICO image; Registered[9]
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ModelIges">
            IGS files, IGES files; Defined in RFC 2077
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.MessageImdnXml">
            IMDN Instant Message Disposition Notification; Defined in RFC 5438
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationJson">
            JavaScript Object Notation JSON; Defined in RFC 4627
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationJsonPatch">
            JavaScript Object Notation (JSON) Patch; Defined in RFC 6902
        </member>

        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ImagePjpeg">
            JPEG JFIF image; Associated with Internet Explorer; Listed in ms775147(v=vs.85) - Progressive JPEG, initiated before global browser support for progressive JPEGs (Microsoft and Firefox).
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ImageJpeg">
            JPEG JFIF image; Defined in RFC 2045 and RFC 2046
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.TextXJqueryTmpl">
            jQuery template data
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationVndGoogleEarthKmlXml">
            KML files (e.g. for Google Earth)
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXLatex">
            LaTeX files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.VideoXMatroska">
            Matroska open media format
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet">
            Microsoft Excel 2007 files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationVndMsExcel">
            Microsoft Excel files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationVndOpenxmlformatsOfficedocumentPresentationmlPresentation">
            Microsoft Powerpoint 2007 files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationVndMsPowerpoint">
            Microsoft Powerpoint files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationVndOpenxmlformatsOfficedocumentWordprocessingmlDocument">
            Microsoft Word 2007 files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationMsword">
            Microsoft Word files[15]
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.MultipartAlternative">
            MIME Email; Defined in RFC 2045 and RFC 2046
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.MultipartMixed">
            MIME Email; Defined in RFC 2045 and RFC 2046
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.MultipartRelated">
            MIME Email; Defined in RFC 2387 and used by MHTML (HTML mail)
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.MultipartFormData">
            MIME Webform; Defined in RFC 2388
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationVndMozillaXulXml">
            Mozilla XUL files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.AudioMpeg">
            MP3 or other MPEG audio; Defined in RFC 3003
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.AudioMp4">
            MP4 audio
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.VideoMp4">
            MP4 video; Defined in RFC 4337
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.VideoMpeg">
            MPEG-1 video with multiplexed audio; Defined in RFC 2045 and RFC 2046
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ModelMesh">
            MSH files, MESH files; Defined in RFC 2077, SILO files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.AudioBasic">
            mulaw audio at 8 kHz, 1 channel; Defined in RFC 2046
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.VideoOgg">
            Ogg Theora or other video (with audio); Defined in RFC 5334
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.AudioOgg">
            Ogg Vorbis, Speex, Flac and other audio; Defined in RFC 5334
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationOgg">
            Ogg, a multimedia bitstream container format; Defined in RFC 5334
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXopXml">
            OP
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationVndOasisOpendocumentGraphics">
            OpenDocument Graphics; Registered[14]
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationVndOasisOpendocumentPresentation">
            OpenDocument Presentation; Registered[13]
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationVndOasisOpendocumentSpreadsheet">
            OpenDocument Spreadsheet; Registered[12]
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationVndOasisOpendocumentText">
            OpenDocument Text; Registered[11]
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXPkcs12">
            p12 files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXPkcs7Certificates">
            p7b and spc files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXPkcs7Mime">
            p7c files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXPkcs7Certreqresp">
            p7r files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXPkcs7Signature">
            p7s files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationPdf">
            Portable Document Format, PDF has been in use for document exchange on the Internet since 1993; Defined in RFC 3778
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ImagePng">
            Portable Network Graphics; Registered,[8] Defined in RFC 2083
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationPostscript">
            PostScript; Defined in RFC 2046
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.VideoQuicktime">
            QuickTime video; Registered[10]
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXRarCompressed">
            RAR archive files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.AudioVndRnRealaudio">
            RealAudio; Documented in RealPlayer Customer Support Answer 2559
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationRdfXml">
            Resource Description Framework; Defined by RFC 3870
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationRssXml">
            RSS feeds
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationSoapXml">
            SOAP; Defined by RFC 3902
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXStuffit">
            StuffIt archive files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ImageSvgXml">
            SVG vector image; Defined in SVG Tiny 1.2 Specification Appendix M
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ImageTiff">
            Tag Image File Format (only for Baseline TIFF); Defined in RFC 3302
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXTar">
            Tarball files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.TextPlain">
            Textual data; Defined in RFC 2046 and RFC 3676
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXFontTtf">
            TrueType Font No registered MIME type, but this is the most commonly used
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.TextVcard">
            vCard (contact information); Defined in RFC 6350
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.AudioVorbis">
            Vorbis encoded audio; Defined in RFC 5215
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.AudioVndWave">
            WAV audio; Defined in RFC 2361
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationFontWoff">
            Web Open Font Format; (candidate recommendation; use application/x-font-woff until standard is official)
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.VideoWebm">
            WebM Matroska-based open media format
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.AudioWebm">
            WebM open media format
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.AudioXMsWax">
            Windows Media Audio Redirector; Documented in Microsoft help page
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.AudioXMsWma">
            Windows Media Audio; Documented in Microsoft KB 288102
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.VideoXMsWmv">
            Windows Media Video; Documented in Microsoft KB 288102
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ModelVrml">
            WRL files, VRML files; Defined in RFC 2077
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ModelX3DXml">
            X3D ISO standard for representing 3D computer graphics, X3D XML files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ModelX3DBinary">
            X3D ISO standard for representing 3D computer graphics, X3DB binary files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ModelX3DVrml">
            X3D ISO standard for representing 3D computer graphics, X3DV VRML files
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationXhtmlXml">
            XHTML; Defined by RFC 3236
        </member>
        <member name="F:NewWechat.Net.MimeTypes.MimeTypeNames.ApplicationZip">
            ZIP archive files; Registered[7]
        </member>
        <member name="T:NewWechat.NewWechatAppServiceBase">

            Derive your application services from this class.

        </member>
        <member name="M:NewWechat.Region.RegionService.GetProvincesAsync(System.Nullable{System.Boolean})">

            Get Provinces

            <param name="isActive"></param>
            <returns></returns>
        </member>
    </members>
</doc>


text:
title: Jacob Sacks - RLL
name: Jacob Sacks
bio: I am a PhD student in the Electrical and Computer Engineering department, and my primary interests are in machine learning, artificial intelligence, and robotics. In particular, I am interested in the integration of perception, planning, and control and connections between reinforcement and imitation learning, optimal control, and deep learning. Prior to joining Georgia Tech, I received my BS in Biomedical Engineering from UT Austin.
picture: /assets/people/jacobsacks.png
email: jsacks6@gatech.edu
layout: person
type: PhD Student
---


text:
<?php

class JSView extends AbstractTemplateViewImpl
{
	// STATIC ATTRIBUTES

	// ATTRIBUTES

	// CONSTRUCTEUR
	public function __construct($arg_unique_name, $arg_parent_view, $arg_options, $arg_js_class_name)
	{
		// PARENT CONSTRUCTOR
		parent::__construct($arg_unique_name, $arg_parent_view, $arg_options);

		$this->js_view_class = $arg_js_class_name;

		JSWRAPPER::addViewToLoad($this);
	}

	// RENDER HTML
	public function declareHtmlHeaders()
	{
		HTML::useStandardHeaders();
	}

	public function htmlSelf()
	{
		// CREATE INIT TAG
		$view_name	= $this->getName();
		$div_id		= $view_name."_container_id";
		HTML::addBufferLine("

");
	}
}
?>


text:
import React from 'react';
import styled from 'styled-components';

const VideoContainer = styled.div`
  margin: 25px -20px;
  position: relative;
  padding-bottom: 56.25%; /*16:9*/
  padding-top: 30px;
  height: 0;
  overflow: hidden;

  @media (min-width: 894px) {
    margin-right: -18px;
    margin-left: -18px;
    border-radius: 10px;
  }
`;

const VideoIFrame = styled.iframe`
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
`;

const YouTubeVideo = ({ src }) => (
  <VideoContainer>
    <VideoIFrame
      width="560"
      height="315"
      src={src}
      frameBorder="0"
      allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
      allowfullscreen
    />
  </VideoContainer>
);

export default YouTubeVideo;


text:
using System;
using System.Globalization;

namespace GraphQL.Types
{
    public class DateGraphType : ScalarGraphType
    {
        public DateGraphType()
        {
            Name = "Date";
            Description =
                "The `Date` scalar type represents a timestamp provided in UTC. `Date` expects timestamps " +
                "to be formatted in accordance with the [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) standard.";
        }

        public override object Coerce(object value)
        {
            string inputValue;
            DateTime dateTime;

            if (value is DateTime)
            {
                inputValue = ((DateTime)value).ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFF'Z'");
            }
            else
            {
                inputValue = value != null ? value.ToString().Trim('"') : string.Empty;
            }

            if (DateTime.TryParse(inputValue, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal,
                out dateTime))
            {
                return dateTime;
            }
            return null;
        }
    }
}


text:
namespace Microsoft.Azure.Management.Peering
{
    using Microsoft.Rest;
    using Microsoft.Rest.Azure;
    using Models;
    using System.Collections;
    using System.Collections.Generic;
    using System.Threading;
    using System.Threading.Tasks;

    /// <summary>
    /// PeeringLocationsOperations operations.
    /// </summary>
    public partial interface IPeeringLocationsOperations
    {
        /// <summary>
        /// Lists all of the available peering locations for the specified kind
        /// of peering.
        /// </summary>
        /// <param name='kind'>
        /// The kind of the peering. Possible values include: 'Direct',
        /// 'Exchange'
        /// </param>
        /// <param name='customHeaders'>
        /// The headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="ErrorResponseException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="Microsoft.Rest.SerializationException">
        /// Thrown when unable to deserialize the response
        /// </exception>
        /// <exception cref="Microsoft.Rest.ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        Task<AzureOperationResponse<IPage<PeeringLocation>>> ListWithHttpMessagesAsync(string kind, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
        /// <summary>
        /// Lists all of the available peering locations for the specified kind
        /// of peering.
        /// </summary>
        /// <param name='nextPageLink'>
        /// The NextLink from the previous successful call to List operation.
        /// </param>
        /// <param name='customHeaders'>
        /// The headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="ErrorResponseException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="Microsoft.Rest.SerializationException">
        /// Thrown when unable to deserialize the response
        /// </exception>
        /// <exception cref="Microsoft.Rest.ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        Task<AzureOperationResponse<IPage<PeeringLocation>>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
    }
}


text:
"""
Solve day 8 of Advent of Code.

http://adventofcode.com/day/8
"""

import ast  # because security
import re

def get_lengths(string):
    return (
        len(string),
        len(ast.literal_eval(string)),
        len(encode(string)),
    )

def encode(string):
    return '"%s"' % re.escape(string)

if __name__ == '__main__':
    len_strings = 0
    len_literals = 0
    len_encodeds = 0

    with open('input.txt') as f:
        for string in f:
            len_literal, len_string, len_encoded = get_lengths(string.strip())
            len_literals += len_literal
            len_strings += len_string
            len_encodeds += len_encoded

    print("Part 1:", len_literals - len_strings)
    print("Part 2:", len_encodeds - len_literals)


text:
.class public final Landroid/view/VelocityTracker$Estimator;
.super Ljava/lang/Object;
.source "VelocityTracker.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/view/VelocityTracker;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x19
    name = "Estimator"
.end annotation

# static fields
.field private static final MAX_DEGREE:I = 0x2

# instance fields
.field public confidence:F

.field public degree:I

.field public final xCoeff:[F

.field public final yCoeff:[F

# direct methods
.method public constructor <init>()V
    .locals 2

    .prologue
    const/4 v1, 0x3

    .line 291
    invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V

    .line 298
    new-array v0, v1, [F

    iput-object v0, p0, Landroid/view/VelocityTracker$Estimator;->xCoeff:[F

    .line 303
    new-array v0, v1, [F

    iput-object v0, p0, Landroid/view/VelocityTracker$Estimator;->yCoeff:[F

    return-void
.end method

.method private estimate(F[F)F
    .locals 4
    .parameter "time"
    .parameter "c"

    .prologue
    .line 334
    const/4 v0, 0x0

    .line 335
    .local v0, a:F
    const/high16 v2, 0x3f80

    .line 336
    .local v2, scale:F
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    iget v3, p0, Landroid/view/VelocityTracker$Estimator;->degree:I

    if-gt v1, v3, :cond_0

    .line 337
    aget v3, p2, v1

    mul-float/2addr v3, v2

    add-float/2addr v0, v3

    .line 338
    mul-float/2addr v2, p1

    .line 336
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 340
    :cond_0
    return v0
.end method

# virtual methods
.method public estimateX(F)F
    .locals 1
    .parameter "time"

    .prologue
    .line 321
    iget-object v0, p0, Landroid/view/VelocityTracker$Estimator;->xCoeff:[F

    invoke-direct {p0, p1, v0}, Landroid/view/VelocityTracker$Estimator;->estimate(F[F)F

    move-result v0

    return v0
.end method

.method public estimateY(F)F
    .locals 1
    .parameter "time"

    .prologue
    .line 330
    iget-object v0, p0, Landroid/view/VelocityTracker$Estimator;->yCoeff:[F

    invoke-direct {p0, p1, v0}, Landroid/view/VelocityTracker$Estimator;->estimate(F[F)F

    move-result v0

    return v0
.end method


text:
package com.mobisir.pool;

import android.app.Activity;
import android.os.Bundle;
import android.content.Intent;

public class PoolCreation extends Activity
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.pool_search);
    }
}


text:
<!DOCTYPE html>

  <meta charset="UTF-8">
  <meta http-equiv="x-ua-compatible" content="IE=edge">
  <title>{{ title }}</title>
  <link rel="icon" type="image/png" href="{{url_for('flasgger.static', filename='')}}images/favicon-32x32.png" sizes="32x32" />
  <link rel="icon" type="image/png" href="{{url_for('flasgger.static', filename='')}}images/favicon-16x16.png" sizes="16x16" />
  <link href='{{url_for('flasgger.static', filename='')}}css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
  <link href='{{url_for('flasgger.static', filename='')}}css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
  <link href='{{url_for('flasgger.static', filename='')}}css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
  <link href='{{url_for('flasgger.static', filename='')}}css/reset.css' media='print' rel='stylesheet' type='text/css'/>
  <link href='{{url_for('flasgger.static', filename='')}}css/print.css' media='print' rel='stylesheet' type='text/css'/>

    {{title}}
    <form id='api_selector'>
      {% if specs|length > 1 %}

            <select id="input_baseUrl" name="baseUrl">
              {% for spec in specs %}
              <option value="{{spec['url']}}">{{spec['title']}}</option>
              {% endfor %}
            </select>

      {% else %}

<input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/>

      {% endif %}

Explore

    </form>

[Powered by Flasgger]


text:
<!-- dx-header -->
# Accession  analysis (DNAnexus Platform App)

accession_analysis

This is the source code for an app that runs on the DNAnexus Platform.
For more information about how to run or modify it, see
https://wiki.dnanexus.com/.
<!-- /dx-header -->

<!--
TODO: This app directory was automatically generated by dx-app-wizard;
please edit this Readme.md file to include essential documentation about
your app that would be helpful to users. (Also see the
Readme.developer.md.) Once you're done, you can remove these TODO
comments.

For more info, see https://wiki.dnanexus.com/Developer-Portal.
-->


text:
A button to minimize something, for example a window.

**Namespace**: Metrolib.Controls
**Assembly**: Metrolib (in Metrolib.dll)

```C#
public class MinimizeButton : Metrolib.Controls.FlatButton
```

Inheritance Object -> DispatcherObject -> DependencyObject -> Visual -> UIElement -> FrameworkElement -> Control -> ContentControl -> ButtonBase -> Button -> FlatButton -> MinimizeButton
### Unfocused

```xaml
<Metrolib:MinimizeButton />

```
![Image of MinimizeButton, Unfocused](Unfocused.png)

### Hovered

```xaml
<Metrolib:MinimizeButton />

```
![Image of MinimizeButton, Hovered](Hovered.png)

### Pressed

```xaml
<Metrolib:MinimizeButton />

```
![Image of MinimizeButton, Pressed](Pressed.png)

### Disabled

```xaml
<Metrolib:MinimizeButton IsEnabled="False" />

```
![Image of MinimizeButton, Disabled](Disabled.png)

# Properties


text: tests to learn github


text:
use account_utils::ZeroizeString;
use eth2_keystore::Keystore;
use serde::{Deserialize, Serialize};
use slashing_protection::interchange::Interchange;
use types::{Address, PublicKeyBytes};

#[derive(Debug, Deserialize, Serialize, PartialEq)]
pub struct GetFeeRecipientResponse {
    pub pubkey: PublicKeyBytes,
    pub ethaddress: Address,
}

#[derive(Debug, Deserialize, Serialize, PartialEq)]
pub struct GetGasLimitResponse {
    pub pubkey: PublicKeyBytes,
    #[serde(with = "eth2_serde_utils::quoted_u64")]
    pub gas_limit: u64,
}

#[derive(Debug, Deserialize, Serialize, PartialEq)]
pub struct AuthResponse {
    pub token_path: String,
}

#[derive(Debug, Deserialize, Serialize, PartialEq)]
pub struct ListKeystoresResponse {
    pub data: Vec<SingleKeystoreResponse>,
}

#[derive(Debug, Deserialize, Serialize, PartialEq)]
pub struct SingleKeystoreResponse {
    pub validating_pubkey: PublicKeyBytes,
    pub derivation_path: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub readonly: Option<bool>,
}

#[derive(Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct ImportKeystoresRequest {
    pub keystores: Vec<KeystoreJsonStr>,
    pub passwords: Vec<ZeroizeString>,
    pub slashing_protection: Option<InterchangeJsonStr>,
}

#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
#[serde(transparent)]
pub struct KeystoreJsonStr(#[serde(with = "eth2_serde_utils::json_str")] pub Keystore);

impl std::ops::Deref for KeystoreJsonStr {
    type Target = Keystore;
    fn deref(&self) -> &Keystore {
        &self.0
    }
}

#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
#[serde(transparent)]
pub struct InterchangeJsonStr(#[serde(with = "eth2_serde_utils::json_str")] pub Interchange);

#[derive(Debug, Deserialize, Serialize)]
pub struct ImportKeystoresResponse {
    pub data: Vec<Status<ImportKeystoreStatus>>,
}

#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct Status<T> {
    pub status: T,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
}

impl<T> Status<T> {
    pub fn ok(status: T) -> Self {
        Self {
            status,
            message: None,
        }
    }

    pub fn error(status: T, message: String) -> Self {
        Self {
            status,
            message: Some(message),
        }
    }
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize)]
#[serde(rename_all = "lowercase")]
pub enum ImportKeystoreStatus {
    Imported,
    Duplicate,
    Error,
}

#[derive(Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct DeleteKeystoresRequest {
    pub pubkeys: Vec<PublicKeyBytes>,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct DeleteKeystoresResponse {
    pub data: Vec<Status<DeleteKeystoreStatus>>,
    #[serde(with = "eth2_serde_utils::json_str")]
    pub slashing_protection: Interchange,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum DeleteKeystoreStatus {
    Deleted,
    NotActive,
    NotFound,
    Error,
}

#[derive(Debug, Deserialize, Serialize, PartialEq)]
pub struct ListRemotekeysResponse {
    pub data: Vec<SingleListRemotekeysResponse>,
}

#[derive(Debug, Deserialize, Serialize, PartialEq)]
pub struct SingleListRemotekeysResponse {
    pub pubkey: PublicKeyBytes,
    pub url: String,
    pub readonly: bool,
}

#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct ImportRemotekeysRequest {
    pub remote_keys: Vec<SingleImportRemotekeysRequest>,
}

#[derive(Debug, Clone, Deserialize, Serialize, PartialEq)]
pub struct SingleImportRemotekeysRequest {
    pub pubkey: PublicKeyBytes,
    pub url: String,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize)]
#[serde(rename_all = "lowercase")]
pub enum ImportRemotekeyStatus {
    Imported,
    Duplicate,
    Error,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct ImportRemotekeysResponse {
    pub data: Vec<Status<ImportRemotekeyStatus>>,
}

#[derive(Debug, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct DeleteRemotekeysRequest {
    pub pubkeys: Vec<PublicKeyBytes>,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum DeleteRemotekeyStatus {
    Deleted,
    NotFound,
    Error,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct DeleteRemotekeysResponse {
    pub data: Vec<Status<DeleteRemotekeyStatus>>,
}


text:
#ifndef DART_COMMON_DETAIL_COMPOSITEDATA_HPP_
#define DART_COMMON_DETAIL_COMPOSITEDATA_HPP_

#include <map>
#include <typeindex>
#include <typeinfo>
#include <unordered_set>

#include <Eigen/Core>

#include "dart/common/Aspect.hpp"

namespace dart {
namespace common {
namespace detail {

//==============================================================================
// This default template definition will be called when AspectOrComposite is
// an Aspect.
template <class AspectOrComposite, bool isAspect>
struct GetAspectImpl
{
  using Type = AspectOrComposite;
};

//==============================================================================
// This template specialization will be called when AspectOrComposite is not
// an Aspect (and is presumably a composite that defines a nested Aspect type).
template <class AspectOrComposite>
struct GetAspectImpl<AspectOrComposite, false>
{
  // If you get a compiler error that leads you here, then you are trying to
  // ask for the Aspect of an object that is not associated with any Aspect.
  // That means it does not define a nested Aspect type (such as how
  // RevoluteJoint defines the RevoluteJoint::Aspect).
  //
  // Whatever function is leading to the error must be given a template type
  // that either defines a nested type with the name Aspect, or else inherits
  // from the type dart::common::Aspect.
  using Type = typename AspectOrComposite::Aspect;
};

//==============================================================================
template <class AspectT>
struct GetAspect
{
  using Type =
      typename GetAspectImpl<AspectT, std::is_base_of<Aspect, AspectT>::value>::
          Type;
};

//==============================================================================
template <class AspectT>
struct GetState
{
  using Type = typename GetAspect<AspectT>::Type::State;
};

//==============================================================================
template <class AspectT>
struct GetProperties
{
  using Type = typename GetAspect<AspectT>::Type::Properties;
};

//==============================================================================
using CompositeStateMap
    = std::map<std::type_index, std::unique_ptr<Aspect::State>>;
using CompositePropertiesMap
    = std::map<std::type_index, std::unique_ptr<Aspect::Properties>>;

//==============================================================================
template <typename MapType, template <class> class GetData>
class CompositeData : public CloneableMap<MapType>
{
public:
  /// Forwarding constructor
  template <typename... Args>
  CompositeData(Args&&... args)
    : CloneableMap<MapType>(std::forward<Args>(args)...)
  {
    // Do nothing
  }

  virtual ~CompositeData() = default;

  /// Create (or replace) a piece of data in this
  template <class AspectT, typename... Args>
  typename GetData<AspectT>::Type& create(Args&&... args)
  {
    using Data = typename GetData<AspectT>::Type;
    using AspectType = typename GetAspect<AspectT>::Type;
    using DataType = typename GetData<Aspect>::Type;

    std::unique_ptr<DataType>& data = this->mMap[typeid(AspectType)]
        = std::make_unique<Data>(std::forward<Args>(args)...);
    return static_cast<Data&>(*data);
  }

  template <class AspectT>
  typename GetData<AspectT>::Type* get()
  {
    using Data = typename GetData<AspectT>::Type;
    using AspectType = typename GetAspect<AspectT>::Type;

    typename MapType::iterator it = this->mMap.find(typeid(AspectType));
    if (this->mMap.end() == it)
      return nullptr;

    return static_cast<Data*>(it->second.get());
  }

  template <class AspectT>
  const typename GetData<AspectT>::Type* get() const
  {
    return const_cast<CompositeData<MapType, GetData>*>(this)->get<AspectT>();
  }

  template <class AspectT, typename... Args>
  typename GetData<AspectT>::Type& getOrCreate(Args&&... args)
  {
    using Data = typename GetData<AspectT>::Type;
    using AspectType = typename GetAspect<AspectT>::Type;

    auto& it = this->mMap.insert(
        std::make_pair<std::type_index, std::unique_ptr<Data>>(
            typeid(AspectType), nullptr));

    const bool exists = !it.second;
    if (!exists)
      it.first = std::make_unique<Data>(std::forward<Args>(args)...);

    return static_cast<Data&>(*it.first);
  }

  template <class AspectT>
  bool has() const
  {
    return (get<AspectT>() != nullptr);
  }
};

//==============================================================================
using CompositeState = CompositeData<CompositeStateMap, GetState>;
using CompositeProperties
    = CompositeData<CompositePropertiesMap, GetProperties>;

//==============================================================================
template <
    class CompositeType,
    template <class>
    class GetData,
    typename... Aspects>
class ComposeData
{
public:
  ComposeData() = default;

  ComposeData(const CompositeType&)
  {
    // Do nothing
  }

  virtual ~ComposeData() = default;

  void setFrom(const CompositeType&)
  {
    // Do nothing
  }

protected:
  void _addData(CompositeType&) const
  {
    // Do nothing
  }
};

//==============================================================================
template <
    class CompositeType,
    template <class>
    class GetData,
    class AspectT,
    typename... Remainder>
struct ComposeData<CompositeType, GetData, AspectT, Remainder...>
  : public GetData<AspectT>::Type,
    public ComposeData<CompositeType, GetData, Remainder...>
{
public:
  enum DelegateTag
  {
    Delegate
  };

  using ThisClass = ComposeData<CompositeType, GetData, AspectT, Remainder...>;
  using Base = typename GetData<AspectT>::Type;
  using Data = typename Base::Data;
  using AspectType = typename GetAspect<AspectT>::Type;

  template <typename Arg>
  struct ConvertIfData
  {
    using Type = typename std::conditional<
        std::is_base_of<typename Base::Data, Arg>::value,
        typename Base::Data,
        Arg>::type;
  };

  template <typename Arg>
  struct ConvertIfComposite
  {
    using Type = typename std::conditional<
        std::is_base_of<CompositeType, Arg>::value,
        CompositeType,
        Arg>::type;
  };

  // To get byte-aligned Eigen vectors
  EIGEN_MAKE_ALIGNED_OPERATOR_NEW

  DART_DEFINE_ALIGNED_SHARED_OBJECT_CREATOR(ThisClass)

  ComposeData() = default;

  virtual ~ComposeData() = default;

  template <typename Arg1, typename... Args>
  ComposeData(const Arg1& arg1, const Args&... args)
    : ComposeData(
        Delegate,
        static_cast<const typename ConvertIfData<Arg1>::Type&>(arg1),
        args...)
  {
    // This constructor delegates
  }

  /// Grab relevant data out of a composite object
  ComposeData(const CompositeType& composite)
    : ComposeData<CompositeType, GetData, Remainder...>(composite)
  {
    _setBaseFrom(composite);
  }

  template <typename... Aspects>
  ComposeData(const ComposeData<CompositeType, GetData, Aspects...>& composite)
    : ComposeData(static_cast<const CompositeType&>(composite))
  {
    // This is a delegating constructor. If we get passed another ComposeData
    // object, then we convert it into a composite to ensure that we grab all
    // of its aspects.
  }

  // Dev Note: We must not use the argument 'composite' as a temporary, or else
  // it will get deleted when it reaches the last base constructor, preventing
  // any higher level constructors from calling _setBaseFrom(~) on it.
  ComposeData(CompositeType&& composite)
    : ComposeData(static_cast<const CompositeType&>(composite))
  {
    // This is a delegating constructor
  }

  operator CompositeType() const
  {
    CompositeType composite;
    _addData(composite);

    return composite;
  }

  void setFrom(const CompositeType& composite)
  {
    _setBaseFrom(composite);
    ComposeData<CompositeType, GetData, Remainder...>::setFrom(composite);
  }

  ComposeData& operator=(const CompositeType& composite)
  {
    setFrom(composite);
    return *this;
  }

  /// Grab any relevant data and copy it into this composite. Note that there
  /// will be NO compilation error, even if there is no relevant data in any of
  /// the arguments that get passed in. It will simply ignore all the arguments
  /// silently.
  template <typename... Args>
  void copy(const Args&... args)
  {
    _findData(args...);
  }

protected:
  template <typename... Args>
  ComposeData(DelegateTag, const Args&... args)
    : ComposeData<CompositeType, GetData, Remainder...>(args...)
  {
    // Pass all the arguments along to the next base class
  }

  template <typename... Args>
  ComposeData(DelegateTag, const Data& arg1, const Args&... args)
    : Base(arg1), ComposeData<CompositeType, GetData, Remainder...>(args...)
  {
    // Peel off the first argument and then pass along the rest
  }

  void _setBaseFrom(const CompositeType& composite)
  {
    const Base* data = composite.template get<AspectType>();
    if (data)
      static_cast<Base&>(*this) = *data;
  }

  void _addData(CompositeType& composite) const
  {
    composite.template create<AspectType>(static_cast<const Base&>(*this));
    ComposeData<CompositeType, GetData, Remainder...>::_addData(composite);
  }

  void _findData()
  {
    // Do nothing
  }

  template <typename Arg1, typename... Args>
  void _findData(const Arg1& arg1, const Args&... args)
  {
    _attemptToUse(static_cast<const typename ConvertIfData<Arg1>::Type&>(arg1));
    _findData(args...);
  }

  template <typename Arg>
  void _attemptToUse(const Arg&)
  {
    // Do nothing
  }

  void _attemptToUse(const typename Base::Data& data)
  {
    static_cast<Base&>(*this) = data;
  }

  void _attemptToUse(const CompositeType& composite)
  {
    _setBaseFrom(composite);
  }
};

//==============================================================================
template <typename... Aspects>
using MakeCompositeState = ComposeData<CompositeState, GetState, Aspects...>;

template <typename... Data>
using MakeCompositeProperties
    = ComposeData<CompositeProperties, GetProperties, Data...>;

} // namespace detail
} // namespace common
} // namespace dart

#endif // DART_COMMON_DETAIL_COMPOSITEDATA_HPP_


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System;
using System.Diagnostics;
using AutoRest.Core.Model;
using AutoRest.Core.Extensibility;
using AutoRest.Core.Logging;
using AutoRest.Core.Properties;
using AutoRest.Core.Validation;
using System.Collections.Generic;
using System.Linq;

namespace AutoRest.Core
{
    /// <summary>
    /// Entry point for invoking code generation.
    /// </summary>
    public static class AutoRestController
    {
        /// <summary>
        /// Returns the version of this instance of AutoRest.
        /// </summary>
        public static string Version
        {
            get
            {
                FileVersionInfo fvi = FileVersionInfo.GetVersionInfo((typeof(Settings)).Assembly.Location);
                return fvi.FileVersion;
            }
        }

        /// <summary>
        /// Generates client using provided settings.
        /// </summary>
        public static void Generate()
        {
            if (Settings.Instance == null)
            {
                throw new ArgumentNullException("settings");
            }
            Logger.Entries.Clear();
            Logger.LogInfo(Resources.AutoRestCore, Version);

            CodeModel codeModel = null;

            var modeler = ExtensionsLoader.GetModeler();

            try
            {
                IEnumerable<ValidationMessage> messages = new List<ValidationMessage>();

                // generate model from swagger
                codeModel = modeler.Build(out messages);

                // After swagger Parser
                codeModel = RunExtensions(Trigger.AfterModelCreation, codeModel);

                // After swagger Parser
                codeModel = RunExtensions(Trigger.BeforeLoadingLanguageSpecificModel, codeModel);

                foreach (var message in messages)
                {
                    Logger.Entries.Add(new LogEntry(message.Severity, message.ToString()));
                }

                if (messages.Any(entry => entry.Severity >= Settings.Instance.ValidationLevel))
                {
                    throw ErrorManager.CreateError(null, Resources.ErrorGeneratingClientModel, "Errors found during Swagger validation");
                }
            }
            catch (Exception exception)
            {
                throw ErrorManager.CreateError(exception, Resources.ErrorGeneratingClientModel, exception.Message);
            }

            var plugin = ExtensionsLoader.GetPlugin();

            Logger.WriteOutput(plugin.CodeGenerator.UsageInstructions);

            Settings.Instance.Validate();
            try
            {
                var genericSerializer = new ModelSerializer<CodeModel>();
                var modelAsJson = genericSerializer.ToJson(codeModel);

                // ensure once we're doing language-specific work, that we're working
                // in context provided by the language-specific transformer.
                using (plugin.Activate())
                {
                    // load model into language-specific code model
                    codeModel = plugin.Serializer.Load(modelAsJson);

                    // we've loaded the model, run the extensions for after it's loaded
                    codeModel = RunExtensions(Trigger.AfterLoadingLanguageSpecificModel, codeModel);

                    // apply language-specific tranformation (more than just language-specific types)
                    // used to be called "NormalizeClientModel" .
                    codeModel = plugin.Transformer.TransformCodeModel(codeModel);

                    // next set of extensions
                    codeModel = RunExtensions(Trigger.AfterLanguageSpecificTransform, codeModel);

                    // next set of extensions
                    codeModel = RunExtensions(Trigger.BeforeGeneratingCode, codeModel);

                    // Generate code from CodeModel.
                    plugin.CodeGenerator.Generate(codeModel).GetAwaiter().GetResult();
                }
            }
            catch (Exception exception)
            {
                throw ErrorManager.CreateError(exception, Resources.ErrorSavingGeneratedCode, exception.Message);
            }
        }

        public static CodeModel RunExtensions(Trigger trigger, CodeModel codeModel)
        {
            /*
             foreach (var extension in extensions.Where(each => each.trigger == trugger).SortBy(each => each.Priority))
                 codeModel = extension.Transform(codeModel);
            */

            return codeModel;
        }

        /// <summary>
        /// Compares two specifications.
        /// </summary>
        public static void Compare()
        {
            if (Settings.Instance == null)
            {
                throw new ArgumentNullException("settings");
            }
            Logger.Entries.Clear();
            Logger.LogInfo(Resources.AutoRestCore, Version);
            Modeler modeler = ExtensionsLoader.GetModeler();

            try
            {
                IEnumerable<ComparisonMessage> messages = modeler.Compare();

                foreach (var message in messages)
                {
                    Logger.Entries.Add(new LogEntry(message.Severity, message.ToString()));
                }

            }
            catch (Exception exception)
            {
                throw ErrorManager.CreateError(exception, Resources.ErrorGeneratingClientModel, exception.Message);
            }

        }
    }
}


text:
/**
 *
 * @author Romain Guy
 */
public class ApplicationFrame extends javax.swing.JFrame {
    public ApplicationFrame() {
        initComponents();
        setGlassPane(new WatermarkGlassPane());
        getGlassPane().setVisible(true);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        javax.swing.JLabel jLabel1;
        javax.swing.JLabel jLabel2;
        javax.swing.JLabel jLabel3;
        javax.swing.JLabel jLabel4;
        javax.swing.JLabel jLabel5;
        javax.swing.JList jList1;
        javax.swing.JScrollPane jScrollPane1;
        javax.swing.JScrollPane jScrollPane2;
        javax.swing.JTextArea jTextArea1;
        javax.swing.JTextField jTextField1;
        javax.swing.JTextField jTextField2;
        javax.swing.JTextField jTextField3;
        javax.swing.JTextField jTextField4;

        jScrollPane1 = new javax.swing.JScrollPane();
        jList1 = new javax.swing.JList();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jTextField2 = new javax.swing.JTextField();
        jTextField3 = new javax.swing.JTextField();
        jTextField4 = new javax.swing.JTextField();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Glass Pane and Mouse Cursor");
        jList1.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Jean-Baptiste Freymann", "Nicolas Igot", "Matthieu Grandvallet", "Fr\u00e9d\u00e9ric Hofmann" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jList1.setSelectedIndex(0);
        jScrollPane1.setViewportView(jList1);

        jLabel1.setText("First Name");

        jLabel2.setText("Last Name");

        jLabel3.setText("Phone");

        jLabel4.setText("Email");

        jLabel5.setText("Address");

        jTextField1.setText("Jean-Baptiste");

        jTextField2.setText("Freymann");

        jTextField3.setText("(555) 462-1492");

        jTextField4.setText("roukin@acme.com");

        jTextArea1.setColumns(15);
        jTextArea1.setRows(5);
        jTextArea1.setText("462 Park View Drive\n54999 Santa Clara, CA\nUSA");
        jScrollPane2.setViewportView(jTextArea1);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 152, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel5)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel4)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel3)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel2)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel1))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jTextField4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 209, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        layout.linkSize(new java.awt.Component[] {jScrollPane2, jTextField1, jTextField2, jTextField3, jTextField4}, org.jdesktop.layout.GroupLayout.HORIZONTAL);

        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabel1)
                            .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabel2)
                            .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabel3)
                            .add(jTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabel4)
                            .add(jTextField4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabel5)
                            .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE))
                .addContainerGap())
        );
        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-489)/2, (screenSize.height-266)/2, 489, 266);
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ApplicationFrame().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables

}


text:
IPAddressInput::IPAddressInput(QWidget *parent) : QLineEdit(parent) {
	m_sIpRange = "(?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])";
	m_IpRegex = QRegExp("^" + m_sIpRange + "\\." + m_sIpRange + "\\." + m_sIpRange + "\\." +
										m_sIpRange + "$");
	connect(this, SIGNAL(textChanged(QString)), this, SLOT(validate(QString)));
}

bool IPAddressInput::getValid() const { return m_bValid; }

void IPAddressInput::validate(QString text) {
	m_bValid = m_IpRegex.exactMatch(text);
	if (m_bValid)
		setStyleSheet("border: 1px solid green; border-radius: 2px; padding: 1px;");
	else
		setStyleSheet("border: 1px solid red; border-radius: 2px; padding: 1px;");
}


text:
#ifndef COMMON_TIMING_PARAMS_H
#define COMMON_TIMING_PARAMS_H

typedef struct {
	/* parameters to constrict */

	unsigned int tckmin_x_ps;
	unsigned int tckmax_ps;
	unsigned int tckmax_max_ps;
	unsigned int trcd_ps;
	unsigned int trp_ps;
	unsigned int tras_ps;

	unsigned int twr_ps;	/* maximum = 63750 ps */
	unsigned int twtr_ps;	/* maximum = 63750 ps */
	unsigned int trfc_ps;	/* maximum = 255 ns + 256 ns + .75 ns
					   = 511750 ps */

	unsigned int trrd_ps;	/* maximum = 63750 ps */
	unsigned int trc_ps;	/* maximum = 254 ns + .75 ns = 254750 ps */

	unsigned int refresh_rate_ps;
	unsigned int extended_op_srt;

	unsigned int tis_ps;	/* byte 32, spd->ca_setup */
	unsigned int tih_ps;	/* byte 33, spd->ca_hold */
	unsigned int tds_ps;	/* byte 34, spd->data_setup */
	unsigned int tdh_ps;	/* byte 35, spd->data_hold */
	unsigned int trtp_ps;	/* byte 38, spd->trtp */
	unsigned int tdqsq_max_ps;	/* byte 44, spd->tdqsq */
	unsigned int tqhs_ps;	/* byte 45, spd->tqhs */

	unsigned int ndimms_present;
	unsigned int lowest_common_SPD_caslat;
	unsigned int highest_common_derated_caslat;
	unsigned int additive_latency;
	unsigned int all_dimms_burst_lengths_bitmask;
	unsigned int all_dimms_registered;
	unsigned int all_dimms_unbuffered;
	unsigned int all_dimms_ecc_capable;

	unsigned long long total_mem;
	unsigned long long base_address;

	/* DDR3 RDIMM */
	unsigned char rcw[16];	/* Register Control Word 0-15 */
} common_timing_params_t;

#endif


text:
namespace app {
namespace Uno {
namespace Collections {

::uInterfaceType* IDictionary__char__float__typeof();

struct IDictionary__char__float
{
};

}}}

#endif


text:
<?php

namespace umi\orm\metadata\field\relation;

use umi\orm\collection\ICollectionManagerAware;
use umi\orm\collection\TCollectionManagerAware;
use umi\orm\exception\InvalidArgumentException;
use umi\orm\manager\IObjectManagerAware;
use umi\orm\manager\TObjectManagerAware;
use umi\orm\metadata\field\BaseField;
use umi\orm\metadata\field\IRelationField;
use umi\orm\metadata\field\TRelationField;
use umi\orm\object\IObject;
use umi\orm\persister\IObjectPersisterAware;
use umi\orm\persister\TObjectPersisterAware;

/**
 * Класс поля хранителя связи.
 */
class BelongsToRelationField extends BaseField
    implements IRelationField, ICollectionManagerAware, IObjectManagerAware, IObjectPersisterAware
{

    use TRelationField;
    use TCollectionManagerAware;
    use TObjectManagerAware;
    use TObjectPersisterAware;

    /**
     * {@inheritdoc}
     */
    public function getTargetCollectionName()
    {
        return $this->targetCollectionName;
    }

    /**
     * {@inheritdoc}
     */
    public function getTargetCollection()
    {
        return $this->getCollectionManager()
            ->getCollection($this->targetCollectionName);
    }

    /**
     * {@inheritdoc}
     */
    public function getDataType()
    {
        return 'integer';
    }

    /**
     * {@inheritdoc}
     */
    public function validateInputPropertyValue($propertyValue)
    {
        if (!$propertyValue instanceof IObject) {
            throw new InvalidArgumentException($this->translate(
                'Value must be instance of IObject.'
            ));
        }

        if (!$this->getTargetCollection()->contains($propertyValue)) {
            throw new InvalidArgumentException($this->translate(
                'Object from wrong collection is given.'
            ));
        }

        return true;
    }

    /**
     * {@inheritdoc}
     */
    public function preparePropertyValue(IObject $object, $internalDbValue)
    {
        if (is_null($internalDbValue)) {
            return null;
        }

        return $this->getTargetCollection()->getById($internalDbValue);
    }

    /**
     * {@inheritdoc}
     */
    public function prepareDbValue(IObject $object, $propertyValue)
    {
        if (!$propertyValue instanceof IObject) {
            return null;
        }

        if (!$propertyValue->getId()) {
            $this->getObjectPersister()
                ->storeNewBelongsToRelation($this, $object, $propertyValue);
        }

        return $propertyValue->getId();
    }

    /**
     * {@inheritdoc}
     */
    protected function applyConfiguration(array $config)
    {
        $this->applyTargetCollectionConfig($config);
    }
}