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;

/**
 * An instance-attached disk resource.
 *
 * Generated from protobuf message google.cloud.compute.v1.AttachedDisk
 */
class AttachedDisk extends \Google\Protobuf\Internal\Message
{
    /**
     * [Output Only] The architecture of the attached disk. Valid values are ARM64 or X86_64.
     * Check the Architecture enum for the list of possible values.
     *
     * Generated from protobuf field optional string architecture = 302803283;
     */
    private $architecture = null;
    /**
     * Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
     *
     * Generated from protobuf field optional bool auto_delete = 464761403;
     */
    private $auto_delete = null;
    /**
     * Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
     *
     * Generated from protobuf field optional bool boot = 3029746;
     */
    private $boot = null;
    /**
     * Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
     *
     * Generated from protobuf field optional string device_name = 67541716;
     */
    private $device_name = null;
    /**
     * Encrypts or decrypts a disk using a customer-supplied encryption key. If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key. If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance. If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
     *
     * Generated from protobuf field optional .google.cloud.compute.v1.CustomerEncryptionKey disk_encryption_key = 271660677;
     */
    private $disk_encryption_key = null;
    /**
     * The size of the disk in GB.
     *
     * Generated from protobuf field optional int64 disk_size_gb = 316263735;
     */
    private $disk_size_gb = null;
    /**
     * [Input Only] Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error.
     *
     * Generated from protobuf field optional bool force_attach = 142758425;
     */
    private $force_attach = null;
    /**
     * A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
     *
     * Generated from protobuf field repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;
     */
    private $guest_os_features;
    /**
     * [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
     *
     * Generated from protobuf field optional int32 index = 100346066;
     */
    private $index = null;
    /**
     * [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. This property is mutually exclusive with the source property; you can only define one or the other, but not both.
     *
     * Generated from protobuf field optional .google.cloud.compute.v1.AttachedDiskInitializeParams initialize_params = 17697045;
     */
    private $initialize_params = null;
    /**
     * Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. For most machine types, the default is SCSI. Local SSDs can use either NVME or SCSI. In certain configurations, persistent disks can use NVMe. For more information, see About persistent disks.
     * Check the Interface enum for the list of possible values.
     *
     * Generated from protobuf field optional string interface = 502623545;
     */
    private $interface = null;
    /**
     * [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
     *
     * Generated from protobuf field optional string kind = 3292052;
     */
    private $kind = null;
    /**
     * [Output Only] Any valid publicly visible licenses.
     *
     * Generated from protobuf field repeated string licenses = 337642578;
     */
    private $licenses;
    /**
     * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
     * Check the Mode enum for the list of possible values.
     *
     * Generated from protobuf field optional string mode = 3357091;
     */
    private $mode = null;
    /**
     * [Output Only] shielded vm initial state stored on disk
     *
     * Generated from protobuf field optional .google.cloud.compute.v1.InitialStateConfig shielded_instance_initial_state = 192356867;
     */
    private $shielded_instance_initial_state = null;
    /**
     * Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. Note that for InstanceTemplate, specify the disk name for zonal disk, and the URL for regional disk.
     *
     * Generated from protobuf field optional string source = 177235995;
     */
    private $source = null;
    /**
     * Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
     * Check the Type enum for the list of possible values.
     *
     * Generated from protobuf field optional string type = 3575610;
     */
    private $type = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $architecture
     *           [Output Only] The architecture of the attached disk. Valid values are ARM64 or X86_64.
     *           Check the Architecture enum for the list of possible values.
     *     @type bool $auto_delete
     *           Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
     *     @type bool $boot
     *           Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
     *     @type string $device_name
     *           Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
     *     @type \Google\Cloud\Compute\V1\CustomerEncryptionKey $disk_encryption_key
     *           Encrypts or decrypts a disk using a customer-supplied encryption key. If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key. If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance. If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
     *     @type int|string $disk_size_gb
     *           The size of the disk in GB.
     *     @type bool $force_attach
     *           [Input Only] Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error.
     *     @type array<\Google\Cloud\Compute\V1\GuestOsFeature>|\Google\Protobuf\Internal\RepeatedField $guest_os_features
     *           A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
     *     @type int $index
     *           [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
     *     @type \Google\Cloud\Compute\V1\AttachedDiskInitializeParams $initialize_params
     *           [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. This property is mutually exclusive with the source property; you can only define one or the other, but not both.
     *     @type string $interface
     *           Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. For most machine types, the default is SCSI. Local SSDs can use either NVME or SCSI. In certain configurations, persistent disks can use NVMe. For more information, see About persistent disks.
     *           Check the Interface enum for the list of possible values.
     *     @type string $kind
     *           [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $licenses
     *           [Output Only] Any valid publicly visible licenses.
     *     @type string $mode
     *           The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
     *           Check the Mode enum for the list of possible values.
     *     @type \Google\Cloud\Compute\V1\InitialStateConfig $shielded_instance_initial_state
     *           [Output Only] shielded vm initial state stored on disk
     *     @type string $source
     *           Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. Note that for InstanceTemplate, specify the disk name for zonal disk, and the URL for regional disk.
     *     @type string $type
     *           Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
     *           Check the Type enum for the list of possible values.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * [Output Only] The architecture of the attached disk. Valid values are ARM64 or X86_64.
     * Check the Architecture enum for the list of possible values.
     *
     * Generated from protobuf field optional string architecture = 302803283;
     * @return string
     */
    public function getArchitecture()
    {
        return isset($this->architecture) ? $this->architecture : '';
    }

    public function hasArchitecture()
    {
        return isset($this->architecture);
    }

    public function clearArchitecture()
    {
        unset($this->architecture);
    }

    /**
     * [Output Only] The architecture of the attached disk. Valid values are ARM64 or X86_64.
     * Check the Architecture enum for the list of possible values.
     *
     * Generated from protobuf field optional string architecture = 302803283;
     * @param string $var
     * @return $this
     */
    public function setArchitecture($var)
    {
        GPBUtil::checkString($var, True);
        $this->architecture = $var;

        return $this;
    }

    /**
     * Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
     *
     * Generated from protobuf field optional bool auto_delete = 464761403;
     * @return bool
     */
    public function getAutoDelete()
    {
        return isset($this->auto_delete) ? $this->auto_delete : false;
    }

    public function hasAutoDelete()
    {
        return isset($this->auto_delete);
    }

    public function clearAutoDelete()
    {
        unset($this->auto_delete);
    }

    /**
     * Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
     *
     * Generated from protobuf field optional bool auto_delete = 464761403;
     * @param bool $var
     * @return $this
     */
    public function setAutoDelete($var)
    {
        GPBUtil::checkBool($var);
        $this->auto_delete = $var;

        return $this;
    }

    /**
     * Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
     *
     * Generated from protobuf field optional bool boot = 3029746;
     * @return bool
     */
    public function getBoot()
    {
        return isset($this->boot) ? $this->boot : false;
    }

    public function hasBoot()
    {
        return isset($this->boot);
    }

    public function clearBoot()
    {
        unset($this->boot);
    }

    /**
     * Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
     *
     * Generated from protobuf field optional bool boot = 3029746;
     * @param bool $var
     * @return $this
     */
    public function setBoot($var)
    {
        GPBUtil::checkBool($var);
        $this->boot = $var;

        return $this;
    }

    /**
     * Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
     *
     * Generated from protobuf field optional string device_name = 67541716;
     * @return string
     */
    public function getDeviceName()
    {
        return isset($this->device_name) ? $this->device_name : '';
    }

    public function hasDeviceName()
    {
        return isset($this->device_name);
    }

    public function clearDeviceName()
    {
        unset($this->device_name);
    }

    /**
     * Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
     *
     * Generated from protobuf field optional string device_name = 67541716;
     * @param string $var
     * @return $this
     */
    public function setDeviceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->device_name = $var;

        return $this;
    }

    /**
     * Encrypts or decrypts a disk using a customer-supplied encryption key. If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key. If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance. If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
     *
     * Generated from protobuf field optional .google.cloud.compute.v1.CustomerEncryptionKey disk_encryption_key = 271660677;
     * @return \Google\Cloud\Compute\V1\CustomerEncryptionKey|null
     */
    public function getDiskEncryptionKey()
    {
        return $this->disk_encryption_key;
    }

    public function hasDiskEncryptionKey()
    {
        return isset($this->disk_encryption_key);
    }

    public function clearDiskEncryptionKey()
    {
        unset($this->disk_encryption_key);
    }

    /**
     * Encrypts or decrypts a disk using a customer-supplied encryption key. If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key. If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance. If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
     *
     * Generated from protobuf field optional .google.cloud.compute.v1.CustomerEncryptionKey disk_encryption_key = 271660677;
     * @param \Google\Cloud\Compute\V1\CustomerEncryptionKey $var
     * @return $this
     */
    public function setDiskEncryptionKey($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\CustomerEncryptionKey::class);
        $this->disk_encryption_key = $var;

        return $this;
    }

    /**
     * The size of the disk in GB.
     *
     * Generated from protobuf field optional int64 disk_size_gb = 316263735;
     * @return int|string
     */
    public function getDiskSizeGb()
    {
        return isset($this->disk_size_gb) ? $this->disk_size_gb : 0;
    }

    public function hasDiskSizeGb()
    {
        return isset($this->disk_size_gb);
    }

    public function clearDiskSizeGb()
    {
        unset($this->disk_size_gb);
    }

    /**
     * The size of the disk in GB.
     *
     * Generated from protobuf field optional int64 disk_size_gb = 316263735;
     * @param int|string $var
     * @return $this
     */
    public function setDiskSizeGb($var)
    {
        GPBUtil::checkInt64($var);
        $this->disk_size_gb = $var;

        return $this;
    }

    /**
     * [Input Only] Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error.
     *
     * Generated from protobuf field optional bool force_attach = 142758425;
     * @return bool
     */
    public function getForceAttach()
    {
        return isset($this->force_attach) ? $this->force_attach : false;
    }

    public function hasForceAttach()
    {
        return isset($this->force_attach);
    }

    public function clearForceAttach()
    {
        unset($this->force_attach);
    }

    /**
     * [Input Only] Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error.
     *
     * Generated from protobuf field optional bool force_attach = 142758425;
     * @param bool $var
     * @return $this
     */
    public function setForceAttach($var)
    {
        GPBUtil::checkBool($var);
        $this->force_attach = $var;

        return $this;
    }

    /**
     * A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
     *
     * Generated from protobuf field repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getGuestOsFeatures()
    {
        return $this->guest_os_features;
    }

    /**
     * A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
     *
     * Generated from protobuf field repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;
     * @param array<\Google\Cloud\Compute\V1\GuestOsFeature>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setGuestOsFeatures($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\GuestOsFeature::class);
        $this->guest_os_features = $arr;

        return $this;
    }

    /**
     * [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
     *
     * Generated from protobuf field optional int32 index = 100346066;
     * @return int
     */
    public function getIndex()
    {
        return isset($this->index) ? $this->index : 0;
    }

    public function hasIndex()
    {
        return isset($this->index);
    }

    public function clearIndex()
    {
        unset($this->index);
    }

    /**
     * [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
     *
     * Generated from protobuf field optional int32 index = 100346066;
     * @param int $var
     * @return $this
     */
    public function setIndex($var)
    {
        GPBUtil::checkInt32($var);
        $this->index = $var;

        return $this;
    }

    /**
     * [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. This property is mutually exclusive with the source property; you can only define one or the other, but not both.
     *
     * Generated from protobuf field optional .google.cloud.compute.v1.AttachedDiskInitializeParams initialize_params = 17697045;
     * @return \Google\Cloud\Compute\V1\AttachedDiskInitializeParams|null
     */
    public function getInitializeParams()
    {
        return $this->initialize_params;
    }

    public function hasInitializeParams()
    {
        return isset($this->initialize_params);
    }

    public function clearInitializeParams()
    {
        unset($this->initialize_params);
    }

    /**
     * [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. This property is mutually exclusive with the source property; you can only define one or the other, but not both.
     *
     * Generated from protobuf field optional .google.cloud.compute.v1.AttachedDiskInitializeParams initialize_params = 17697045;
     * @param \Google\Cloud\Compute\V1\AttachedDiskInitializeParams $var
     * @return $this
     */
    public function setInitializeParams($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\AttachedDiskInitializeParams::class);
        $this->initialize_params = $var;

        return $this;
    }

    /**
     * Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. For most machine types, the default is SCSI. Local SSDs can use either NVME or SCSI. In certain configurations, persistent disks can use NVMe. For more information, see About persistent disks.
     * Check the Interface enum for the list of possible values.
     *
     * Generated from protobuf field optional string interface = 502623545;
     * @return string
     */
    public function getInterface()
    {
        return isset($this->interface) ? $this->interface : '';
    }

    public function hasInterface()
    {
        return isset($this->interface);
    }

    public function clearInterface()
    {
        unset($this->interface);
    }

    /**
     * Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. For most machine types, the default is SCSI. Local SSDs can use either NVME or SCSI. In certain configurations, persistent disks can use NVMe. For more information, see About persistent disks.
     * Check the Interface enum for the list of possible values.
     *
     * Generated from protobuf field optional string interface = 502623545;
     * @param string $var
     * @return $this
     */
    public function setInterface($var)
    {
        GPBUtil::checkString($var, True);
        $this->interface = $var;

        return $this;
    }

    /**
     * [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
     *
     * Generated from protobuf field optional string kind = 3292052;
     * @return string
     */
    public function getKind()
    {
        return isset($this->kind) ? $this->kind : '';
    }

    public function hasKind()
    {
        return isset($this->kind);
    }

    public function clearKind()
    {
        unset($this->kind);
    }

    /**
     * [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
     *
     * Generated from protobuf field optional string kind = 3292052;
     * @param string $var
     * @return $this
     */
    public function setKind($var)
    {
        GPBUtil::checkString($var, True);
        $this->kind = $var;

        return $this;
    }

    /**
     * [Output Only] Any valid publicly visible licenses.
     *
     * Generated from protobuf field repeated string licenses = 337642578;
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLicenses()
    {
        return $this->licenses;
    }

    /**
     * [Output Only] Any valid publicly visible licenses.
     *
     * Generated from protobuf field repeated string licenses = 337642578;
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLicenses($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->licenses = $arr;

        return $this;
    }

    /**
     * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
     * Check the Mode enum for the list of possible values.
     *
     * Generated from protobuf field optional string mode = 3357091;
     * @return string
     */
    public function getMode()
    {
        return isset($this->mode) ? $this->mode : '';
    }

    public function hasMode()
    {
        return isset($this->mode);
    }

    public function clearMode()
    {
        unset($this->mode);
    }

    /**
     * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
     * Check the Mode enum for the list of possible values.
     *
     * Generated from protobuf field optional string mode = 3357091;
     * @param string $var
     * @return $this
     */
    public function setMode($var)
    {
        GPBUtil::checkString($var, True);
        $this->mode = $var;

        return $this;
    }

    /**
     * [Output Only] shielded vm initial state stored on disk
     *
     * Generated from protobuf field optional .google.cloud.compute.v1.InitialStateConfig shielded_instance_initial_state = 192356867;
     * @return \Google\Cloud\Compute\V1\InitialStateConfig|null
     */
    public function getShieldedInstanceInitialState()
    {
        return $this->shielded_instance_initial_state;
    }

    public function hasShieldedInstanceInitialState()
    {
        return isset($this->shielded_instance_initial_state);
    }

    public function clearShieldedInstanceInitialState()
    {
        unset($this->shielded_instance_initial_state);
    }

    /**
     * [Output Only] shielded vm initial state stored on disk
     *
     * Generated from protobuf field optional .google.cloud.compute.v1.InitialStateConfig shielded_instance_initial_state = 192356867;
     * @param \Google\Cloud\Compute\V1\InitialStateConfig $var
     * @return $this
     */
    public function setShieldedInstanceInitialState($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\InitialStateConfig::class);
        $this->shielded_instance_initial_state = $var;

        return $this;
    }

    /**
     * Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. Note that for InstanceTemplate, specify the disk name for zonal disk, and the URL for regional disk.
     *
     * Generated from protobuf field optional string source = 177235995;
     * @return string
     */
    public function getSource()
    {
        return isset($this->source) ? $this->source : '';
    }

    public function hasSource()
    {
        return isset($this->source);
    }

    public function clearSource()
    {
        unset($this->source);
    }

    /**
     * Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. Note that for InstanceTemplate, specify the disk name for zonal disk, and the URL for regional disk.
     *
     * Generated from protobuf field optional string source = 177235995;
     * @param string $var
     * @return $this
     */
    public function setSource($var)
    {
        GPBUtil::checkString($var, True);
        $this->source = $var;

        return $this;
    }

    /**
     * Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
     * Check the Type enum for the list of possible values.
     *
     * Generated from protobuf field optional string type = 3575610;
     * @return string
     */
    public function getType()
    {
        return isset($this->type) ? $this->type : '';
    }

    public function hasType()
    {
        return isset($this->type);
    }

    public function clearType()
    {
        unset($this->type);
    }

    /**
     * Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
     * Check the Type enum for the list of possible values.
     *
     * Generated from protobuf field optional string type = 3575610;
     * @param string $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkString($var, True);
        $this->type = $var;

        return $this;
    }

}


text:
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <unordered_map>
#include <map>
#include <sstream>
#include <numeric>
#include <cmath>
#include <set>
#include <stdio.h>
#include <iomanip>
#include <ctype.h>
#include <cassert>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include "Library.h"
#include "Stopword.h"
#include "Document.h"
#include "SentenceSplitter.h"

using namespace std;

// Implementation of Library.h

const bool Library::DEBUG = false;

/***********************************************************
* PUBLIC FUNCTIONS
***********************************************************/

Library::Library(bool useSentences) : useSentences(useSentences){
	if(DEBUG){
		string s = useSentences ? "We are using sentences for this library." : "Not using sentences for this library.";
		cout << s << endl;
	}
}

Library::Library(bool useSentences, string stopwordsFile) : useSentences(useSentences){
	stopword.setStopwords(stopwordsFile);
	if(DEBUG){
		string s = useSentences ? "We are using sentences for this library." : "Not using sentences for this library.";
		cout << s << endl;
	}
}

/**
* Populates the Library with the files contained as a list within the input file.
*/
void Library::populate(string filenameOfList){
	resetVariables();
	set<string> setWords;
	// Save all file names to a the map, and create a document for each.
	// Open the file that was input.
	ifstream fin(filenameOfList.c_str());

	string filename;
	while(fin >> filename){
		Document d(filename);
		map.insert(pair<string, Document>(filename, d));
	}

	// Close the file input
	fin.close();

	// Print out the file names if in DEBUG mode.
	if(DEBUG){
		cout << "Map contains:" << endl;
		for ( unordered_map<string,Document>::const_iterator it = map.begin(); it != map.end(); ++it )
			cout << setw(15) << it->first << endl;
		cout << endl;
	}

	// Go through each file, building up the words vector.
	for ( unordered_map<string,Document>::iterator it = map.begin(); it != map.end(); ++it ){
		filename = it->first;
		// Open the current file
		ifstream fin2(filename);
		string word;
		vector<string> fileWords;
		while(fin2 >> word){
			// Make the word lower case
			toLowerCase(word);
			// Remove punctuation
			removePunctuation(word);

			if(word.size() != 1 || hasAlphaNumChar(word)){
				set<string>::size_type orgSize = setWords.size();
				setWords.insert(word);
				if(DEBUG && !setWords.size() == orgSize)
					cout << "Words vector already contained '" << word << "'" << ". Not added" << endl;
			}
			fileWords.push_back(word);
		}
		// Print out the words in a file.
		if(DEBUG){
			cout << "Words in " << filename << endl;
			for(vector<string>::const_iterator it = fileWords.begin(); it != fileWords.end(); ++it)
				cout << "   '" << *it << "'" << endl;
		}
		// Close the file input
		fin2.close();
	}

	// Move the words from a SET to a VECTOR
	//cout << "WORDS SET:";
	for(set<string>::iterator it = setWords.begin(); it != setWords.end(); ++it){
		//cout << " '" << *it << "'";
		words.push_back(*it);
	}
	cout << endl;

	// Use the Stopword obj on Words vector
	if(stopword.isSet()){
		if(DEBUG)
			cout << "Using stopword on Words vector." << endl;
		stopword.filterWords(words);
	}
	else{
		if(DEBUG)
			cout << "Not using stopword on Words vector." << endl;
	}

	// Prints out the WORDS vector
	if(DEBUG)
	{
		cout << "Words vector:" << endl;
		for(vector<string>::const_iterator it = words.begin(); it != words.end(); ++it){
			cout << (it - words.begin()) << " : '" << *it << "'" << endl;
		}
	}

	// Set numOfDocsWithWord to #WORDS of zeros
	for(vector<string>::size_type i = 0; i != words.size(); ++i)
		numDocsWithWord.push_back(0);

	// Go through each file, building up the count vectors (contained in the sentences, in the Document).
	// If useSentences option is used for the Library, the Document will contain multiple sentences,
	// otherwise it will only contain one.
	for ( unordered_map<string,Document>::iterator it = map.begin(); it != map.end(); ++it ){
		filename = it->first;
		Document document = it->second;

		vector<string> wordsFromFile;

		// Open the current file
		ifstream fin2(filename);
		string word;

		while(fin2 >> word){
			wordsFromFile.push_back(word);
		} // end while file input

		// Close the file input
		fin2.close();

		if(useSentences){
			// Multiple Sentence objs will be needed, inside one Document obj.
			string sentence = "";
			for(vector<string>::iterator wIt = wordsFromFile.begin(); wIt != wordsFromFile.end(); ++wIt)
				sentence += *wIt + " ";
			// Use SentenceSplitter class to seperate all the sentences.
			SentenceSplitter sentenceSplitter;
			vector<string> allSentences = sentenceSplitter.sentenceSplit(sentence);

			for(vector<string>::iterator sIt = allSentences.begin(); sIt != allSentences.end(); ++sIt){
				vector<string> sentenceWords;
				// Splits by spaces (i.e words).
				stringstream s(*sIt);
				while(!s.eof()) {
					string tmp;
					s >> tmp;

					sentenceWords.push_back(tmp);
				}
				processSentence(document, sentenceWords);
			}
		}
		else{
			// We are not using sentences, therefore only one Sentence obj.
			processSentence(document, wordsFromFile);
		}

		// Make this Document increment the counts of numDocsWithWord if needed
		document.addCountsToTotal(numDocsWithWord);
		it->second = document;

		if(DEBUG){
			cout << "Calculated counts for: " << document.getFilename() << endl;
			cout << "Number of sentences: " << document.size() << endl;
		}
	}
	// Print out the counts, including numDocsWithWord
	/* // FOR BIG INPUT THIS TAKES TOO LONG
	if(DEBUG){
		cout << "*COUNTS*" << endl;
		for ( auto it = map.begin(); it != map.end(); ++it ){
			cout << "For file: " << it->first << endl;
			it->second.printCounts();
		}
		cout << endl;

		cout << "COUNTS: NUM OF DOCUMENTS WITH WORDS:" << endl;
		for ( vector<int>::const_iterator cit = numDocsWithWord.begin(); cit != numDocsWithWord.end(); ++cit )
			cout << "   " << *cit << endl;
	}
	*/

	// Needed when using WEIGHT formula that uses Sentence counts instead of Document counts
	int totalNumSentences = 0;
	// Calculate total number of sentences
	for(unordered_map<string, Document>::iterator it = map.begin(); it != map.end(); ++it){
		totalNumSentences += it->second.size();
	}

	// Compute the weight vectors of each sentence in each document.
	for(unordered_map<string, Document>::iterator it = map.begin(); it != map.end(); ++it){
		//it->second.computeWeights(numDocsWithWord, map.size());
		it->second.computeWeights(numDocsWithWord, totalNumSentences);
	}

}

multimap<double, Sentence> Library::processQuery(string query){
	// Query for key words.
	vector<string> keywords;
	string input = query;
	toLowerCase(input);

	// Splits the input by words.
	stringstream s(input);
	while(!s.eof()) {
		string tmp;
		s >> tmp;
		removePunctuation(tmp);
		keywords.push_back(tmp);
	}

	/* // TAKES LONG FOR BIG INPUT
	if(DEBUG){
		for(vector<string>::const_iterator it = keywords.begin(); it != keywords.end(); ++it)
			cout << *it << "*";
		cout << endl;
	}
	*/
	// Go through key words and create count vector for query.
	vector<int> keywordsCounts;
	int count = 0;
	for(vector<string>::const_iterator it = words.begin(); it != words.end(); ++it, ++count)
	{
		bool found = false;
		for(vector<string>::const_iterator key = keywords.begin(); key != keywords.end(); ++key){
			if(*key == *it)
			{
				found = true;
				// If found for the first time
				if(count >= keywordsCounts.size())
					keywordsCounts.push_back(1);
				else // Found before
					keywordsCounts[count] += 1;
			}
		}
		// If not found then we add a 0 to the counts for keywords.
		if(!found)
			keywordsCounts.push_back(0);
	}

	/* // TAKES TOO LONG FOR BIG INPUT
	if(DEBUG){
		for(vector<int>::const_iterator it = keywordsCounts.begin(); it != keywordsCounts.end(); ++it)
			cout << *it << endl;
	}
	*/

	multimap<double, Sentence> scoreMap;

	// Go through each file count vector and find score with query.
	for ( unordered_map<string,Document>::iterator mapit = map.begin(); mapit != map.end(); ++mapit ){
		// Calculates the score for each Sentence in a Document
		for(int sentenceInd = 0; sentenceInd != mapit->second.size(); ++sentenceInd){
			double score;
			double topEquation = 0.0;
			Sentence sentence = (mapit->second)[sentenceInd];
			double bottomEquation;
				// We use weights here
				vector<double> sentenceCounts = sentence.getWeights();
				topEquation = inner_product(sentenceCounts.begin(), sentenceCounts.end(),keywordsCounts.begin(), 0.0);
				bottomEquation = findMagnitude(sentenceCounts) * findMagnitude(keywordsCounts);
			if(bottomEquation == 0)
				bottomEquation = 1;
			score = topEquation / bottomEquation;

			scoreMap.insert(scoreMap.end(), pair<double, Sentence>(score, sentence));
		}
	}

	return scoreMap;
}

/***********************************************************
* PRIVATE FUNCTIONS
***********************************************************/

/*
* Private function to reset global vars.
*/
void Library::resetVariables(){
	map.clear();
	words.clear();
	numDocsWithWord.clear();
}

/*
* Returns the number of documents (i.e size of map)
*/
int Library::getNumOfDocuments(){
	return (int)map.size();
}

/*
* Processes one sentence and adds it to the document
*/
void Library::processSentence(Document & document, vector<string> & sentenceWords){
	vector<int> counts;
	string sentence = "";
	string word;
	// Add extra ZEROs for all words.
	for(vector<int>::size_type i = 0; i < words.size(); ++i)
		counts.insert(counts.end(),0);
	for(vector<string>::iterator wIt = sentenceWords.begin(); wIt != sentenceWords.end(); ++wIt){
		word = *wIt;
		sentence += word + " ";
		toLowerCase(word);
		removePunctuation(word);
		int index = binarySearch(words, word);
		// index could be -1 when stopwords was used.
		if(index != -1)
			counts[index] += 1;
	}

	// EMPTY Weights (calculated later)
	vector<double> weights;

	/*
	if(DEBUG)
		cout << "Processing sent: " << sentence << endl;
	*/

	// Add the SINGLE sentence to Document
	document.addSentence(sentence, counts, weights);
}
/***********************************************************
* FREE FUNCTIONS
***********************************************************/

/**
* Changes a string's characters to lower case letters.
*/
void toLowerCase(string &str){
	const int length = str.length();
	for(int i=0; i < length; ++i)
	{
		str[i] = tolower(str[i]);
	}
}

/**
* Finds the magnitude of a vector of integers.
*
* param: vector<int>
* return: double
*/
double findMagnitude(const vector<int> &values){
	double mag = 0;
	for(vector<int>::const_iterator it = values.begin(); it != values.end(); ++it){
		mag += ((*it) * (*it));
	}
	return sqrt(mag);
}
/**
* Finds the magnitude of a vector of doubles.
*
* param: vector<int>
* return: double
*/
double findMagnitude(const vector<double> &values){
	double mag = 0;
	for(vector<double>::const_iterator it = values.begin(); it != values.end(); ++it){
		mag += ((*it) * (*it));
	}
	return sqrt(mag);
}

/**
* Binary search through a vector<string>
* param: vector<string>
* param: string value
* return int
*/
int binarySearch(const vector<string> &v, const string value){
	int low = 0;
	int high = v.size();
	while( low <= high ){
		int mid = (low + high)/2;
		if(v[mid] > value)
			high = mid - 1;
		else if(v[mid] < value)
			low = mid + 1;
		else
			return mid;
	}
	return -1;
}

/**
* Removes commas, periods, exclamation marks, and question marks from the end of the string.
*/
void removePunctuation(std::string &str){
	if(str.size() > 1){
		char c = str[str.size()-1];
		if(c == '.' || c == ',' || c == '!' || c == '?')
			str = str.substr(0, str.size() - 1);
		c = str[0];
		if(c == '-' || c == '\'')
			str = str.substr(0, str.size() - 1);
	}
}

/**
* Checks whether a string contains at least one alpha numeric character.
*/

bool hasAlphaNumChar(const string &str){
	for(int i = 0; i < str.size(); ++i)
		if(isalnum(str[i]))
			return true;
	return false;
}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections;
using System.Data;
using System.Data.SqlClient;
using System.Xml;
using Rainbow.Framework.Data;
using Rainbow.Framework.Settings;
using Rainbow.Framework.Site.Configuration;
using System.Collections.Generic;

namespace Rainbow.Framework.Site.Data
{
    ///
    /// Class that encapsulates all data logic necessary to add/query/delete
    /// Portals within the Portal database.
    ///
    [History("jminond", "2005/03/10", "Tab to page conversion")]
    public class PagesDB
    {
        #region Declerations

        private const string strAllUsers = "All Users;";
        private const string strPortalID = "@PortalID";
        private const string strPageID = "@PageID";

        // New const for new method AddPage defaults
        // Mike Stone 30/12/2004
        private const int intParentPageID = 0; //SP will convert to NULL if 0
        private const bool boolShowMobile = false;
        private const string strMobilePageName = ""; // NULL NOT ALLOWED IN TABLE.

        #endregion

        #region Add Page

        ///
        /// The AddPage method adds a new tab to the portal.

        /// AddPage Stored Procedure
        ///
        /// <param name="portalID">The portal ID.</param>
        /// <param name="pageName">Name of the page.</param>
        /// <param name="pageOrder">The page order.</param>
        /// <returns></returns>
        public int AddPage(int portalID, string pageName, int pageOrder)
        {
            return AddPage(portalID, pageName, strAllUsers, pageOrder);
        }

        ///
        /// The AddPage method adds a new tab to the portal.

        /// AddPage Stored Procedure
        ///
        /// <param name="portalID">The portal ID.</param>
        /// <param name="pageName">Name of the page.</param>
        /// <param name="Roles">The roles.</param>
        /// <param name="pageOrder">The page order.</param>
        /// <returns></returns>
        public int AddPage(int portalID, string pageName, string Roles, int pageOrder)
        {
            // Change Method to use new all parms method below
            // SP call moved to new method AddPage below.
            // Mike Stone - 30/12/2004
            return
                AddPage(portalID, intParentPageID, pageName, pageOrder, strAllUsers, boolShowMobile, strMobilePageName);
        }

        ///
        /// The AddPage method adds a new tab to the portal.

        /// AddPage Stored Procedure
        ///
        /// <param name="portalID">The portal ID.</param>
        /// <param name="parentPageID">The parent page ID.</param>
        /// <param name="pageName">Name of the page.</param>
        /// <param name="pageOrder">The page order.</param>
        /// <param name="authorizedRoles">The authorized roles.</param>
        /// <param name="showMobile">if set to <c>true</c> [show mobile].</param>
        /// <param name="mobilePageName">Name of the mobile page.</param>
        /// <returns></returns>
        public int AddPage(int portalID, int parentPageID, string pageName, int pageOrder, string authorizedRoles,
                           bool showMobile, string mobilePageName)
        {
            // Create Instance of Connection and Command Object
            using (SqlConnection myConnection = Config.SqlConnectionString)
            {
                using (SqlCommand myCommand = new SqlCommand("rb_AddTab", myConnection))
                {
                    // Mark the Command as a SPROC
                    myCommand.CommandType = CommandType.StoredProcedure;

                    // Add Parameters to SPROC
                    SqlParameter parameterPortalID = new SqlParameter(strPortalID, SqlDbType.Int, 4);
                    parameterPortalID.Value = portalID;
                    myCommand.Parameters.Add(parameterPortalID);

                    SqlParameter parameterParentPageID = new SqlParameter("@ParentPageID", SqlDbType.Int, 4);
                    parameterParentPageID.Value = parentPageID;
                    myCommand.Parameters.Add(parameterParentPageID);

                    //Fixes a missing tab name
                    if (pageName == null || pageName.Length == 0) pageName = "New Page";
                    SqlParameter parameterTabName = new SqlParameter("@PageName", SqlDbType.NVarChar, 50);

                    //Fixes tab name to long
                    if (pageName.Length > 50) parameterTabName.Value = pageName.Substring(0, 49);
                    else parameterTabName.Value = pageName.ToString();
                    myCommand.Parameters.Add(parameterTabName);

                    SqlParameter parameterTabOrder = new SqlParameter("@PageOrder", SqlDbType.Int, 4);
                    parameterTabOrder.Value = pageOrder;
                    myCommand.Parameters.Add(parameterTabOrder);

                    SqlParameter parameterAuthRoles = new SqlParameter("@AuthorizedRoles", SqlDbType.NVarChar, 256);
                    parameterAuthRoles.Value = authorizedRoles;
                    myCommand.Parameters.Add(parameterAuthRoles);

                    SqlParameter parameterShowMobile = new SqlParameter("@ShowMobile", SqlDbType.Bit, 1);
                    parameterShowMobile.Value = showMobile;
                    myCommand.Parameters.Add(parameterShowMobile);

                    SqlParameter parameterMobileTabName = new SqlParameter("@MobilePageName", SqlDbType.NVarChar, 50);
                    parameterMobileTabName.Value = mobilePageName;
                    myCommand.Parameters.Add(parameterMobileTabName);

                    SqlParameter parameterPageID = new SqlParameter(strPageID, SqlDbType.Int, 4);
                    parameterPageID.Direction = ParameterDirection.Output;
                    myCommand.Parameters.Add(parameterPageID);

                    myConnection.Open();

                    try
                    {
                        myCommand.ExecuteNonQuery();
                    }

                    finally
                    {
                        myConnection.Close();
                    }
                    return (int) parameterPageID.Value;
                }
            }
        }

        #endregion

        #region Delete Page

        ///
        /// The DeletePage method deletes the selected tab from the portal.

        /// DeletePage Stored Procedure
        ///
        /// <param name="pageID">The page ID.</param>
        public void DeletePage(int pageID)
        {
            // Create Instance of Connection and Command Object
            using (SqlConnection myConnection = Config.SqlConnectionString)
            {
                using (SqlCommand myCommand = new SqlCommand("rb_DeleteTab", myConnection))
                {
                    // Mark the Command as a SPROC
                    myCommand.CommandType = CommandType.StoredProcedure;
                    // Add Parameters to SPROC
                    SqlParameter parameterPageID = new SqlParameter(strPageID, SqlDbType.Int, 4);
                    parameterPageID.Value = pageID;
                    myCommand.Parameters.Add(parameterPageID);
                    // Open the database connection and execute the command
                    myConnection.Open();

                    try
                    {
                        myCommand.ExecuteNonQuery();
                    }

                    finally
                    {
                        myConnection.Close();
                    }
                }
            }
        }

        #endregion

        #region Update Pages

        ///
        /// UpdatePage Method

        /// UpdatePage Stored Procedure
        ///
        /// <param name="portalID">The portal ID.</param>
        /// <param name="pageID">The page ID.</param>
        /// <param name="parentPageID">The parent page ID.</param>
        /// <param name="pageName">Name of the page.</param>
        /// <param name="pageOrder">The page order.</param>
        /// <param name="authorizedRoles">The authorized roles.</param>
        /// <param name="mobilePageName">Name of the mobile page.</param>
        /// <param name="showMobile">if set to <c>true</c> [show mobile].</param>
        public void UpdatePage(int portalID, int pageID, int parentPageID, string pageName, int pageOrder,
                               string authorizedRoles, string mobilePageName, bool showMobile)
        {
            // Create Instance of Connection and Command Object
            using (SqlConnection myConnection = Config.SqlConnectionString)
            {
                using (SqlCommand myCommand = new SqlCommand("rb_UpdateTab", myConnection))
                {
                    // Mark the Command as a SPROC
                    myCommand.CommandType = CommandType.StoredProcedure;
                    // Add Parameters to SPROC
                    SqlParameter parameterPortalID = new SqlParameter(strPortalID, SqlDbType.Int, 4);
                    parameterPortalID.Value = portalID;
                    myCommand.Parameters.Add(parameterPortalID);
                    SqlParameter parameterPageID = new SqlParameter(strPageID, SqlDbType.Int, 4);
                    parameterPageID.Value = pageID;
                    myCommand.Parameters.Add(parameterPageID);
                    SqlParameter parameterParentPageID = new SqlParameter("@ParentPageID", SqlDbType.Int, 4);
                    parameterParentPageID.Value = parentPageID;
                    myCommand.Parameters.Add(parameterParentPageID);

                    //Fixes a missing tab name
                    if (pageName == null || pageName.Length == 0) pageName = " ";
                    SqlParameter parameterTabName = new SqlParameter("@PageName", SqlDbType.NVarChar, 50);

                    if (pageName.Length > 50) parameterTabName.Value = pageName.Substring(0, 49);

                    else parameterTabName.Value = pageName.ToString();
                    myCommand.Parameters.Add(parameterTabName);
                    SqlParameter parameterTabOrder = new SqlParameter("@PageOrder", SqlDbType.Int, 4);
                    parameterTabOrder.Value = pageOrder;
                    myCommand.Parameters.Add(parameterTabOrder);
                    SqlParameter parameterAuthRoles = new SqlParameter("@AuthorizedRoles", SqlDbType.NVarChar, 256);
                    parameterAuthRoles.Value = authorizedRoles;
                    myCommand.Parameters.Add(parameterAuthRoles);
                    SqlParameter parameterMobileTabName = new SqlParameter("@MobilePageName", SqlDbType.NVarChar, 50);
                    parameterMobileTabName.Value = mobilePageName;
                    myCommand.Parameters.Add(parameterMobileTabName);
                    SqlParameter parameterShowMobile = new SqlParameter("@ShowMobile", SqlDbType.Bit, 1);
                    parameterShowMobile.Value = showMobile;
                    myCommand.Parameters.Add(parameterShowMobile);
                    myConnection.Open();

                    try
                    {
                        myCommand.ExecuteNonQuery();
                    }

                    finally
                    {
                        myConnection.Close();
                    }
                }
            }
        }

        ///
        /// Update Page Custom Settings
        ///
        /// <param name="pageID">The page ID.</param>
        /// <param name="key">The key.</param>
        /// <param name="value">The value.</param>
        [Obsolete("UpdatePageCustomSettings was moved in PageSettings.UpdatePageSetting", false)]
        public void UpdatePageCustomSettings(int pageID, string key, string value)
        {
            PageSettings.UpdatePageSettings(pageID, key, value);
        }

        ///
        /// The UpdatePageOrder method changes the position of the tab with respect
        /// to other tabs in the portal.

        /// UpdatePageOrder Stored Procedure
        ///
        /// <param name="pageID">The page ID.</param>
        /// <param name="pageOrder">The page order.</param>
        public void UpdatePageOrder(int pageID, int pageOrder)
        {
            // Create Instance of Connection and Command Object
            using (SqlConnection myConnection = Config.SqlConnectionString)
            {
                using (SqlCommand myCommand = new SqlCommand("rb_UpdateTabOrder", myConnection))
                {
                    // Mark the Command as a SPROC
                    myCommand.CommandType = CommandType.StoredProcedure;
                    // Add Parameters to SPROC
                    SqlParameter parameterPageID = new SqlParameter(strPageID, SqlDbType.Int, 4);
                    parameterPageID.Value = pageID;
                    myCommand.Parameters.Add(parameterPageID);
                    SqlParameter parameterTabOrder = new SqlParameter("@PageOrder", SqlDbType.Int, 4);
                    parameterTabOrder.Value = pageOrder;
                    myCommand.Parameters.Add(parameterTabOrder);
                    myConnection.Open();

                    try
                    {
                        myCommand.ExecuteNonQuery();
                    }

                    finally
                    {
                        myConnection.Close();
                    }
                }
            }
        }

        ///
        /// The UpdatePageOrder method changes the position of the tab with respect
        /// to other tabs in the portal.

        /// UpdatePageOrder Stored Procedure
        ///
        /// <param name="pageID">The page ID.</param>
        /// <param name="parentPageID">The parent page ID.</param>
        /// <param name="portalID">The portal ID.</param>
        public void UpdatePageParent(int pageID, int parentPageID, int portalID)
        {
            // Create Instance of Connection and Command Object
            using (SqlConnection myConnection = Config.SqlConnectionString)
            {
                using (SqlCommand myCommand = new SqlCommand("rb_UpdateTabParent", myConnection))
                {
                    // Mark the Command as a SPROC
                    myCommand.CommandType = CommandType.StoredProcedure;
                    // Add Parameters to SPROC
                    SqlParameter parameterPortalID = new SqlParameter(strPortalID, SqlDbType.Int, 4);
                    parameterPortalID.Value = portalID;
                    myCommand.Parameters.Add(parameterPortalID);
                    SqlParameter parameterPageID = new SqlParameter(strPageID, SqlDbType.Int, 4);
                    parameterPageID.Value = pageID;
                    myCommand.Parameters.Add(parameterPageID);
                    SqlParameter parameterParentPageID = new SqlParameter("@ParentPageID", SqlDbType.Int, 4);
                    parameterParentPageID.Value = parentPageID;
                    myCommand.Parameters.Add(parameterParentPageID);

                    myConnection.Open();

                    try
                    {
                        myCommand.ExecuteNonQuery();
                    }

                    finally
                    {
                        myConnection.Close();
                    }
                }
            }
        }

        #endregion

        ///
        /// Return the portal home page in case you are on pageid = 0
        ///
        /// <param name="portalID"></param>
        /// <returns></returns>
        public static int PortalHomePageID(int portalID)
        {
            // TODO: COnvert to stored procedure?
            // TODO: Rainbow.Framwork.Application.Site.Pages Api
            int ret = 0;

            string sql = "Select PageID  From rb_Pages  Where " +
                         "(PortalID = " + portalID.ToString() + ") and " +
                         "(ParentPageID is null) and  " +
                         "(PageID > 0) and ( " +
                         "PageOrder < 2)";

            ret = Convert.ToInt32(DBHelper.ExecuteSQLScalar(sql));

            return ret;
        }

        ///
        /// This user control will render the breadcrumb navigation for the current tab.
        /// Ver. 1.0 - 24. dec 2002 - First realase by Cory Isakson
        ///
        /// <param name="pageID">ID of the page</param>
        /// <returns></returns>
        public ArrayList GetPageCrumbs(int pageID)
        {
            // Create Instance of Connection and Command Object
            using (SqlConnection myConnection = Config.SqlConnectionString)
            {
                using (SqlCommand myCommand = new SqlCommand("rb_GetTabCrumbs", myConnection))
                {
                    // Mark the Command as a SPROC
                    myCommand.CommandType = CommandType.StoredProcedure;
                    // Add Parameters to SPROC
                    SqlParameter parameterPageID = new SqlParameter(strPageID, SqlDbType.Int, 4);
                    parameterPageID.Value = pageID;
                    myCommand.Parameters.Add(parameterPageID);
                    SqlParameter parameterCrumbs = new SqlParameter("@CrumbsXML", SqlDbType.NVarChar, 4000);
                    parameterCrumbs.Direction = ParameterDirection.Output;
                    myCommand.Parameters.Add(parameterCrumbs);
                    // Execute the command
                    myConnection.Open();

                    try
                    {
                        myCommand.ExecuteNonQuery();
                    }

                    finally
                    {
                        myConnection.Close();
                    }
                    // Build a Hashtable from the XML string returned
                    ArrayList Crumbs = new ArrayList();
                    XmlDocument CrumbXML = new XmlDocument();
                    CrumbXML.LoadXml(parameterCrumbs.Value.ToString().Replace("&", "&"));

                    //Iterate through the Crumbs XML
                    foreach (XmlNode node in CrumbXML.FirstChild.ChildNodes)
                    {
                        PageItem tab = new PageItem();
                        tab.ID = Int16.Parse(node.Attributes.GetNamedItem("tabID").Value);
                        tab.Name = node.InnerText;
                        tab.Order = Int16.Parse(node.Attributes.GetNamedItem("level").Value);
                        Crumbs.Add(tab);
                    }
                    //Return the Crumb Page Items as an arraylist
                    return Crumbs;
                }
            }
        }

        ///
        /// Gets the pages by portal.
        ///
        /// <param name="portalID">The portal ID.</param>
        /// <returns>
        /// A System.Data.SqlClient.SqlDataReader value...
        /// </returns>
        // TODO --> [Obsolete("Replace me")]
        public SqlDataReader GetPagesByPortal(int portalID)
        {
            // Create Instance of Connection and Command Object
            SqlConnection myConnection = Config.SqlConnectionString;
            SqlCommand myCommand = new SqlCommand("rb_GetTabsByPortal", myConnection);
            // Mark the Command as a SPROC
            myCommand.CommandType = CommandType.StoredProcedure;
            // Add Parameters to SPROC
            SqlParameter parameterPortalID = new SqlParameter(strPortalID, SqlDbType.Int, 4);
            parameterPortalID.Value = portalID;
            myCommand.Parameters.Add(parameterPortalID);
            // Execute the command
            myConnection.Open();
            SqlDataReader result = myCommand.ExecuteReader(CommandBehavior.CloseConnection);
            // Return the datareader
            return result;
        }

        ///
        /// Gets the pages flat table.
        ///
        /// <param name="portalID">The portal ID.</param>
        /// <returns></returns>
        public DataTable GetPagesFlatTable(int portalID)
        {
            // Create Instance of Connection and Command Object
            using (SqlConnection myConnection = Config.SqlConnectionString)
            {
                string strSQL = "rb_GetPageTree " + portalID.ToString();
                SqlDataAdapter da = new SqlDataAdapter(strSQL, myConnection);

                DataTable dt_tbl = new DataTable("Pages");
                // Read the resultset
                try
                {
                    da.Fill(dt_tbl);
                }

                finally
                {
                    da.Dispose();
                }

                return dt_tbl;
            }
        }

        ///
        /// Get a pages parentID
        ///
        /// <param name="portalID">The portal ID.</param>
        /// <param name="pageID">The page ID.</param>
        /// <returns></returns>
        public int GetPageParentID(int portalID, int pageID)
        {
            string strSQL = "rb_GetPagesParentTabID " + portalID.ToString() + ", " + pageID.ToString();
            int parentID = 0;
            // Read the resultset
            parentID = Convert.ToInt32(DBHelper.ExecuteSQLScalar(strSQL));
            return parentID;
        }

        ///
        /// Get a pages tab order
        ///
        /// <param name="portalID">The portal ID.</param>
        /// <param name="pageID">The page ID.</param>
        /// <returns></returns>
        public int GetPageTabOrder(int portalID, int pageID)
        {
            string strSQL = "select PageOrder from rb_Pages Where (PortalID = " + portalID.ToString() + ") AND (PageID = " +
                            pageID.ToString() + ")";
            int t_order = 99990;
            // Read the resultset
            t_order = Convert.ToInt32(DBHelper.ExecuteSQLScalar(strSQL));
            return t_order;
        }

        ///
        /// Gets the pages flat.
        ///
        /// <param name="portalID">The portal ID.</param>
        /// <returns></returns>
        public ArrayList GetPagesFlat(int portalID)
        {
            // Create Instance of Connection and Command Object
            using (SqlConnection myConnection = Config.SqlConnectionString)
            {
                using (SqlCommand myCommand = new SqlCommand("rb_GetTabsFlat", myConnection))
                {
                    // Mark the Command as a SPROC
                    myCommand.CommandType = CommandType.StoredProcedure;
                    // Add Parameters to SPROC
                    SqlParameter parameterPortalID = new SqlParameter("@PortalID", SqlDbType.Int, 4);
                    parameterPortalID.Value = portalID;
                    myCommand.Parameters.Add(parameterPortalID);
                    // Execute the command
                    myConnection.Open();
                    SqlDataReader result = myCommand.ExecuteReader(CommandBehavior.CloseConnection);
                    ArrayList DesktopPages = new ArrayList();

                    // Read the resultset
                    try
                    {
                        while (result.Read())
                        {
                            PageItem tabItem = new PageItem();
                            tabItem.ID = (int) result["PageID"];
                            tabItem.Name = (string) result["PageName"];
                            tabItem.Order = (int) result["PageOrder"];
                            tabItem.NestLevel = (int) result["NestLevel"];
                            DesktopPages.Add(tabItem);
                        }
                    }

                    finally
                    {
                        result.Close(); //by Manu, fixed bug 807858
                    }
                    return DesktopPages;
                }
            }
        }

        ///
        /// Gets the pagesin page.
        ///
        /// <param name="portalID">The portal ID.</param>
        /// <param name="pageID">The page ID.</param>
        /// <returns>A System.Collections.ArrayList value...</returns>
        public ArrayList GetPagesinPage(int portalID, int pageID)
        {
            ArrayList DesktopPages = new ArrayList();

            // Create Instance of Connection and Command Object
            using (SqlConnection myConnection = Config.SqlConnectionString)
            {
                using (SqlCommand myCommand = new SqlCommand("rb_GetTabsinTab", myConnection))
                {
                    // Mark the Command as a SPROC
                    myCommand.CommandType = CommandType.StoredProcedure;
                    // Add Parameters to SPROC
                    SqlParameter parameterPortalID = new SqlParameter(strPortalID, SqlDbType.Int, 4);
                    parameterPortalID.Value = portalID;
                    myCommand.Parameters.Add(parameterPortalID);
                    SqlParameter parameterPageID = new SqlParameter(strPageID, SqlDbType.Int, 4);
                    parameterPageID.Value = pageID;
                    myCommand.Parameters.Add(parameterPageID);
                    // Execute the command
                    myConnection.Open();
                    SqlDataReader result = myCommand.ExecuteReader(CommandBehavior.CloseConnection);

                    // Read the resultset
                    try
                    {
                        while (result.Read())
                        {
                            PageStripDetails tabDetails = new PageStripDetails();
                            tabDetails.PageID = (int) result["PageID"];
                            tabDetails.ParentPageID = Int32.Parse("0" + result["ParentPageID"]);
                            tabDetails.PageName = (string) result["PageName"];
                            tabDetails.PageOrder = (int) result["PageOrder"];
                            tabDetails.AuthorizedRoles = (string) result["AuthorizedRoles"];
                            // Update the AuthorizedRoles Variable
                            DesktopPages.Add(tabDetails);
                        }
                    }

                    finally
                    {
                        result.Close(); //by Manu, fixed bug 807858
                    }
                }
            }
            return DesktopPages;
        }

        ///
        /// Gets the pages parent.
        ///
        /// <param name="portalID">The portal ID.</param>
        /// <param name="pageID">The page ID.</param>
        /// <returns>
        /// A System.Data.SqlClient.SqlDataReader value...
        /// </returns>
        public IList<PageItem> GetPagesParent(int portalID, int pageID)
        {
            // Create Instance of Connection and Command Object
            SqlConnection myConnection = Config.SqlConnectionString;
            SqlCommand myCommand = new SqlCommand("rb_GetTabsParent", myConnection);
            // Mark the Command as a SPROC
            myCommand.CommandType = CommandType.StoredProcedure;
            // Add Parameters to SPROC
            SqlParameter parameterPortalID = new SqlParameter(strPortalID, SqlDbType.Int, 4);
            parameterPortalID.Value = portalID;
            myCommand.Parameters.Add(parameterPortalID);
            SqlParameter parameterPageID = new SqlParameter(strPageID, SqlDbType.Int, 4);
            parameterPageID.Value = pageID;
            myCommand.Parameters.Add(parameterPageID);
            // Execute the command
            myConnection.Open();
            SqlDataReader dr = myCommand.ExecuteReader(CommandBehavior.CloseConnection);

            IList<PageItem> result = new List<PageItem>();

            while ( dr.Read() ) {
                PageItem item = new PageItem();
                item.ID = Convert.ToInt32( dr[ "PageID" ] );
                item.Name = ( string )dr[ "PageName" ];
                result.Add( item );
            }

            return result;
        }
    }
}


text:
using System;
using Microsoft.SPOT;

namespace Microsoft.Xna.Framework
{
    public interface IGraphicsDeviceManager
    {
        bool BeginDraw();
        void CreateDevice();
        void EndDraw();
    }
}


text:
package com.ing.pomodoro.rest.client.model.wrapper;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.ing.pomodoro.rest.client.PRestException;

import java.io.File;
import java.io.IOException;

/**
 * Describes abstract class to parse json from pomodoro restapi server.
 * @author amazingguni
 */

public class AbstractResponseWrapper {
  /**
   * Response code from pomodoro rest api server.
   */
  private int responseCode;

  /**
   * Converts raw string to pomodoro instance given as parameter.
   *
   * @param jsonString json string
   * @param cls        target class
   * @param <T>        class to convert
   * @return converted instance.
   * @throws PRestException throws if fail to parse json string.
   */
  public static <T> T convert(final String jsonString, final Class<T> cls) throws PRestException {
    ObjectMapper mapper = new ObjectMapper();
    T parsedObj = null;
    try {
      parsedObj = mapper.readValue(jsonString, cls);
    } catch (IOException e) {
      throw new PRestException(e.getMessage(), e);
    }
    return parsedObj;
  }

  /**
   * Converts raw string to pomodoro instance given as parameter.
   *
   * @param file json file
   * @param cls  target class
   * @param <T>  class to convert
   * @return converted instance.
   * @throws PRestException throws if fail to parse json string.
   */
  public static <T> T convert(final File file, final Class<T> cls) throws PRestException {
    ObjectMapper mapper = new ObjectMapper();
    T parsedObj = null;
    try {
      parsedObj = mapper.readValue(file, cls);
    } catch (IOException e) {
      throw new PRestException(e.getMessage(), e);
    }
    return parsedObj;
  }
}


text:
To handle data migrations we use a Postgrator migration tool. You can find out more infos about it at: https://github.com/rickbergfalk/postgrator

Each cp-*-service which uses postgresql has a directory `migrations` in `scripts/database/pg` directory, which will always contain a `001.do.init-db.sql` file
where lies the initial version of the schema.

The 001.do.init-db.sql will run at system setup and will create your database initial schema.

If you need to do make any database schema changes, you do so by creating a migration sql file as follows:

* Create another *.sql file under the `migrations` directory.

* The file name need to follow this convention: [version].[action].[optional-description].sql See the details bellow:

	* Version must be a number, but you may start and increment the numbers in any way you'd like.

	* Action must be "do" (we won't support rollbacks, so "undo" is not an option for action)

	* Optional-description can be a label or tag to help keep track of what happens inside the script. Descriptions should not contain periods.

Here is an example:

* create `002.do.add-test-column.sql` file in `scripts/database/pg/migrations` directory;

* the script contains the following:

```sql
DO $$
	BEGIN
		BEGIN
			ALTER TABLE cd_dojos ADD COLUMN test_column1 character varying;
		EXCEPTION
			WHEN duplicate_column THEN RAISE NOTICE 'column test_column1 already exists in cd_dojos.';
		END;
		BEGIN
			ALTER TABLE cd_dojos ADD COLUMN test_column2 character varying;
		EXCEPTION
			WHEN duplicate_column THEN RAISE NOTICE 'column test_column2 already exists in cd_dojos.';
		END;
	END;
$$
```

* this script adds two new columns, only if they don't already exists, otherwise it will just display an error saying the columns are already in there.

* to apply this changes to the DB schema you have to run the migration script in that service, like this:

`./start.sh development scripts/migrate-psql-db.js`

* this applies only the changes that haven't been applied yet to the schema (see the Postgrator documentation for more informations).


text:
import os
import os.path as path
import sys
from const.constants import Constants

def has_preprocess_basic_cache(const):
    ok = path.isfile(const.preprocessed_data_cache_file)
    ok = ok and path.isfile(const.preprocessed_data_meta)
    return ok

def has_window_cache(const):
    ok = path.isfile(const.window_data_meta)
    ok = ok and path.isfile(const.window_data_cache_file)
    ok = ok and path.isfile(const.window_label_cache_file)
    return ok

def clear_all_cache(const):
    chaches = ["step1","step2","step3"]
    clear_cache(chaches,const)

def clear_cache(cache_steps_to_clear, const):
    for step in cache_steps_to_clear:
        if step == "step1":
            if path.isfile(const.init_data_cache_file):
                os.remove(const.init_data_cache_file)
                os.remove(const.init_data_meta)
        elif step == "step2":
            if path.isfile(const.preprocessed_data_cache_file):
                os.remove(const.preprocessed_data_cache_file)
            if path.isfile(const.preprocessed_data_meta):
                os.remove(const.preprocessed_data_meta)
        elif step == "step3":
            if path.isfile(const.window_data_meta):
                os.remove(const.window_data_meta)
            if path.isfile(const.window_label_cache_file):
                os.remove(const.window_label_cache_file)
            if path.isfile(const.window_data_cache_file):
                os.remove(const.window_data_cache_file)

if __name__ == '__main__':
    const = Constants()
    if sys.argv[1] == 'clear':
        if sys.argv[2] == 'all':
            clear_all_cache(const)
        else:
            clear_cache(sys.argv[2:],const)


text:
var cssutil = require('../index');

// Force current directory
process.chdir(__dirname);

var opts = { minify: false };
cssutil.build([
    'file4.css'
], opts, function(e, css) {
    console.log(e);
    console.log(css);
});


text:
package extension_base // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base"

import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package

type BaseMessage struct {
	Height                       *int32   `protobuf:"varint,1,opt,name=height" json:"height,omitempty"`
	XXX_NoUnkeyedLiteral         struct{} `json:"-"`
	proto.XXX_InternalExtensions `json:"-"`
	XXX_unrecognized             []byte `json:"-"`
	XXX_sizecache                int32  `json:"-"`
}

func (m *BaseMessage) Reset()         { *m = BaseMessage{} }
func (m *BaseMessage) String() string { return proto.CompactTextString(m) }
func (*BaseMessage) ProtoMessage()    {}
func (*BaseMessage) Descriptor() ([]byte, []int) {
	return fileDescriptor_extension_base_b5c437cd79d90e00, []int{0}
}

var extRange_BaseMessage = []proto.ExtensionRange{
	{Start: 4, End: 9},
	{Start: 16, End: 536870911},
}

func (*BaseMessage) ExtensionRangeArray() []proto.ExtensionRange {
	return extRange_BaseMessage
}
func (m *BaseMessage) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_BaseMessage.Unmarshal(m, b)
}
func (m *BaseMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_BaseMessage.Marshal(b, m, deterministic)
}
func (dst *BaseMessage) XXX_Merge(src proto.Message) {
	xxx_messageInfo_BaseMessage.Merge(dst, src)
}
func (m *BaseMessage) XXX_Size() int {
	return xxx_messageInfo_BaseMessage.Size(m)
}
func (m *BaseMessage) XXX_DiscardUnknown() {
	xxx_messageInfo_BaseMessage.DiscardUnknown(m)
}

var xxx_messageInfo_BaseMessage proto.InternalMessageInfo

func (m *BaseMessage) GetHeight() int32 {
	if m != nil && m.Height != nil {
		return *m.Height
	}
	return 0
}

// Another message that may be extended, using message_set_wire_format.
type OldStyleMessage struct {
	XXX_NoUnkeyedLiteral         struct{} `json:"-"`
	proto.XXX_InternalExtensions `protobuf_messageset:"1" json:"-"`
	XXX_unrecognized             []byte `json:"-"`
	XXX_sizecache                int32  `json:"-"`
}

func (m *OldStyleMessage) Reset()         { *m = OldStyleMessage{} }
func (m *OldStyleMessage) String() string { return proto.CompactTextString(m) }
func (*OldStyleMessage) ProtoMessage()    {}
func (*OldStyleMessage) Descriptor() ([]byte, []int) {
	return fileDescriptor_extension_base_b5c437cd79d90e00, []int{1}
}

func (m *OldStyleMessage) MarshalJSON() ([]byte, error) {
	return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions)
}
func (m *OldStyleMessage) UnmarshalJSON(buf []byte) error {
	return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)
}

var extRange_OldStyleMessage = []proto.ExtensionRange{
	{Start: 100, End: 2147483646},
}

func (*OldStyleMessage) ExtensionRangeArray() []proto.ExtensionRange {
	return extRange_OldStyleMessage
}
func (m *OldStyleMessage) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_OldStyleMessage.Unmarshal(m, b)
}
func (m *OldStyleMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_OldStyleMessage.Marshal(b, m, deterministic)
}
func (dst *OldStyleMessage) XXX_Merge(src proto.Message) {
	xxx_messageInfo_OldStyleMessage.Merge(dst, src)
}
func (m *OldStyleMessage) XXX_Size() int {
	return xxx_messageInfo_OldStyleMessage.Size(m)
}
func (m *OldStyleMessage) XXX_DiscardUnknown() {
	xxx_messageInfo_OldStyleMessage.DiscardUnknown(m)
}

var xxx_messageInfo_OldStyleMessage proto.InternalMessageInfo

func init() {
	proto.RegisterType((*BaseMessage)(nil), "extension_base.BaseMessage")
	proto.RegisterType((*OldStyleMessage)(nil), "extension_base.OldStyleMessage")
}

func init() {
	proto.RegisterFile("extension_base/extension_base.proto", fileDescriptor_extension_base_b5c437cd79d90e00)
}

var fileDescriptor_extension_base_b5c437cd79d90e00 = []byte{
	// 175 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0xad, 0x28, 0x49,
	0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0x8b, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x47, 0xe5, 0xea, 0x15, 0x14,
	0xe5, 0x97, 0xe4, 0x0b, 0xf1, 0xa1, 0x8a, 0x2a, 0x99, 0x72, 0x71, 0x3b, 0x25, 0x16, 0xa7, 0xfa,
	0xa6, 0x16, 0x17, 0x27, 0xa6, 0xa7, 0x0a, 0x89, 0x71, 0xb1, 0x65, 0xa4, 0x66, 0xa6, 0x67, 0x94,
	0x48, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x06, 0x41, 0x79, 0x5a, 0x2c, 0x1c, 0x2c, 0x02, 0x5c, 0x5a,
	0x1c, 0x1c, 0x02, 0x02, 0x0d, 0x0d, 0x0d, 0x0d, 0x4c, 0x4a, 0xf2, 0x5c, 0xfc, 0xfe, 0x39, 0x29,
	0xc1, 0x25, 0x95, 0x39, 0x30, 0xad, 0x5a, 0x1c, 0x1c, 0x29, 0x02, 0xff, 0xff, 0xff, 0xff, 0xcf,
	0x6e, 0xc5, 0xc4, 0xc1, 0xe8, 0xe4, 0x14, 0xe5, 0x90, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97,
	0x9c, 0x9f, 0xab, 0x9f, 0x9e, 0x9f, 0x9e, 0xaf, 0x0f, 0x76, 0x40, 0x52, 0x69, 0x1a, 0x84, 0x91,
	0xac, 0x9b, 0x9e, 0x9a, 0xa7, 0x0b, 0x96, 0x28, 0x49, 0x2d, 0x2e, 0x49, 0x49, 0x2c, 0x49, 0x44,
	0x73, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x60, 0xef, 0xa3, 0xb7, 0xd1, 0x00, 0x00, 0x00,
}


text:
@echo off
pushd %~dp0
"%VS120COMNTOOLS%..\IDE\mstest" /test:Microsoft.Protocols.TestSuites.MS_ASEMAIL.S04_MeetingRequest.MSASEMAIL_S04_TC14_GlobalObjIdFormat_OutlookID /testcontainer:..\..\MS-ASEMAIL\TestSuite\bin\Debug\MS-ASEMAIL_TestSuite.dll /runconfig:..\..\MS-ASEMAIL\MS-ASEMAIL.testsettings /unique
pause


text:
<?php

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Debug\Debug;
use Stermedia\AppDevSecurity\AppDevSecurityHandler;

// If you don't want to setup permissions the proper way, just uncomment the following PHP line
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
//umask(0000);

$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
Debug::enable();

$securityHandler = new AppDevSecurityHandler();

if (!$securityHandler->isAccessible()) {
    header($securityHandler->getForbiddenHeader());
    exit($securityHandler->getForbiddenMessage());
} else {
    unset($securityHandler);
}

require_once __DIR__.'/../app/AppKernel.php';

$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);


text:
'''OpenGL extension ATI.vertex_streams

This module customises the behaviour of the
OpenGL.raw.GL.ATI.vertex_streams to provide a more
Python-friendly API

Overview (from the spec)

	This extension adds the ability to handle sets of auxilliary
	vertex and normal coordinates. These sets of auxilliary
	coordinates are termed streams, and can be routed selectively
	into the blend stages provided by the vertex blending extension.
	This functionality enables software animation techniques such
	as keyframe vertex morphing.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/ATI/vertex_streams.txt
'''
from OpenGL import platform, constants, constant, arrays
from OpenGL import extensions, wrapper
from OpenGL.GL import glget
import ctypes
from OpenGL.raw.GL.ATI.vertex_streams import *
### END AUTOGENERATED SECTION


text:
<?xml version="1.0"?>
<!--
  ~ Copyright (c) 2010-2015 Evolveum
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<accessCertificationDefinition
        xmlns='http://midpoint.evolveum.com/xml/ns/public/common/common-3'
        xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        oid="33333333-0000-0000-0000-000000000001">
    <name>Basic User Assignment Certification (ERoot only)</name>
    <description>Basic certification of all user assignments.</description>
    <handlerUri>http://midpoint.evolveum.com/xml/ns/public/certification/handlers-3#direct-assignment</handlerUri>
    <scopeDefinition xsi:type="AccessCertificationAssignmentReviewScopeType">
        <objectType>UserType</objectType>
        <searchFilter>
            <q:org>
                <q:path>parentOrgRef</q:path>
                <q:orgRef oid="00000000-8888-6666-0000-300000000000">
                    <q:scope>SUBTREE</q:scope>
                </q:orgRef>
            </q:org>
        </searchFilter>
    </scopeDefinition>
    <remediationDefinition>
        <style>automated</style>
    </remediationDefinition>
    <stageDefinition>
        <number>1</number>
        <days>14</days>
        <reviewerSpecification>
            <defaultReviewerRef oid="00000000-0000-0000-0000-000000000002" type="UserType" />   <!-- administrator -->
        </reviewerSpecification>
    </stageDefinition>
</accessCertificationDefinition>


text:
Options for which version and build of kubernetes to use. Any version of kubernetes that is built and shipped in the "hyperkube" format can be used.

## Options
### Root Options
| Key Name          | Required     | Type | Description|
| ----------------- | ------------ | --- | --- |
| name              | __Required__ | String | Configuration name |
| kind              | __Required__ | String | kubernetes |
| version           | __Required__ | String | Kubernetes version |
| hyperkubeLocation | __Required__ | String | URL to hyperkube |

## Example
```yaml
kubeConfigs:
  - &defaultKube
    name: defaultKube
    kind: kubernetes
    version: v1.5.6
    hyperkubeLocation: gcr.io/google_containers/hyperkube
```


text:
#include <QDesktopWidget>

// потом тут всякая фигня, потом создаётся главное окно, например:

MainWindow w;

// и вот дальше настраивается

QRect screenGeometry = QApplication::desktop()->screenGeometry();
int x = (screenGeometry.width()-w.width()) / 2;
int y = (screenGeometry.height()-w.height()) / 2;
w.move(x, y);

// теперь можно уже показать окно

w.show();


text:
from setuptools import setup, find_packages
from codecs import open
from os import path
from paystack.version import VERSION

here = path.abspath(path.dirname(__file__))
print(here)
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='paystack',
    version=VERSION,
    description='A Paystack API wrapper in Python',
    long_description=long_description,
    url='https://github.com/ojengwa/paystack',
    download_url='https://github.com/ojengwa/paystack/tarball/' + VERSION,
    license='BSD',
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Libraries',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',

    ],
    keywords='',
    packages=find_packages(exclude=['docs', 'tests', 'site']),
    package_data={
        'paystack': [
            'data/paystack.crt',
            'data/paystack.key'
        ]
    },
    include_package_data=True,
    author='Bernard Ojengwa',
    install_requires=[
        'requests',
        'simplejson'
    ],
    author_email='bernardojengwa@gmail.com'
)


text:
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
  set(CMAKE_INSTALL_PREFIX "/opt/android/ndk/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/user")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")

# Set the install configuration name.
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
  if(BUILD_TYPE)
    string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
  else()
    set(CMAKE_INSTALL_CONFIG_NAME "Release")
  endif()
  message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
endif()

# Set the component getting installed.
if(NOT CMAKE_INSTALL_COMPONENT)
  if(COMPONENT)
    message(STATUS "Install component: \"${COMPONENT}\"")
    set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
  else()
    set(CMAKE_INSTALL_COMPONENT)
  endif()
endif()

# Install shared libraries without execute permission?
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
  set(CMAKE_INSTALL_SO_NO_EXE "1")
endif()

if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "/home/sarthak/Desktop/ORB-SLAM-Android/slam_ext/build.android/suitesparse/build/lib/libmetis.a")
endif()

if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib64" TYPE STATIC_LIBRARY FILES "/home/sarthak/Desktop/ORB-SLAM-Android/slam_ext/build.android/suitesparse/build/lib/libmetis.a")
endif()

if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include" TYPE FILE FILES "/home/sarthak/Desktop/ORB-SLAM-Android/slam_ext/build.android/suitesparse/metis/libmetis/../include/metis.h")
endif()


text:
SYNONYM

#### According to
GRIN Taxonomy for Plants

#### Published in
null

#### Original name
null

### Remarks
null


text:
package jp.co.ctc_g.jfw.xlsbeans.bean.setter;

import java.io.Serializable;

import jp.co.ctc_g.jse.core.excel.JxVerticalRecords;
import net.java.amateras.xlsbeans.annotation.Sheet;

@Sheet(name = "mapping")
public class BadTypeTestBean implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    public Integer getId() {
        return id;
    }

    @JxVerticalRecords(recordClass = Integer.class)
    public void setId(Integer id) {
        this.id = id;
    }

}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    {% if pagename == 'error_pages/404' %}

    <base href="/en/latest/error_pages/404.html">
    {% endif %}
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{ title|striptags|e }}{{ titlesuffix }}</title>

    <link href="{{ pathto('_static/css/bootstrap.min.css', 1) }}" rel="stylesheet">
    <link href="{{ pathto('_static/css/' + style, 1) }}" rel="stylesheet">
    <link href="{{ pathto('_static/css/pygments.css', 1) }}" rel="stylesheet">

    <link href='https://fonts.googleapis.com/css?family=Lato&subset=latin,latin-ext' rel='stylesheet' type='text/css'>

    <link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}"/>

    {% if theme_analytics_code %}

    {% endif %}

About Flocker

Getting Started

Use cases

Docs

Support

Blog

Try Flocker

                    Contents

                        ul').slideToggle();">+

                {{ toctree(collapse=true, maxdepth=3) }}

                {%- if pagename != "search" %}
                <form class="search" action="{{ pathto('search') }}" method="get" _lpchecked="1">
                    <input type="text" name="q" placeholder="Type here to search docs..." id="search">
                    <input type="hidden" name="check_keywords" value="yes">
                    <input type="hidden" name="area" value="default">
                </form>
                {%- endif %}

                {%- block document %}

                        {% block body %} {% endblock %}
                {%- endblock %}

                        {%- if prev %}
                            Previous
                        {%- endif %}

                        {%- if next %}
                            Next
                        {%- endif %}

                {% if theme_disqus_shortname %}

                    Please enable JavaScript to view the comments powered by Disqus.
                {% endif %}

                © Copyright 2015, ClusterHQ. Created using Sphinx {{ sphinx_version }}.

    {%- for scriptfile in script_files %}

    {%- endfor %}
    {%- if pagename == "search" %}

    {%- endif %}

    {% if theme_disqus_shortname %}

    {% endif %}