text:
.class Lcom/nxp/nfc/INfcVzw$Stub$Proxy;
.super Ljava/lang/Object;
.source "INfcVzw.java"

# interfaces
.implements Lcom/nxp/nfc/INfcVzw;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/nxp/nfc/INfcVzw$Stub;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0xa
    name = "Proxy"
.end annotation

# instance fields
.field private mRemote:Landroid/os/IBinder;

# direct methods
.method constructor <init>(Landroid/os/IBinder;)V
    .locals 0
    .param p1, "remote"    # Landroid/os/IBinder;

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

    .line 75
    iput-object p1, p0, Lcom/nxp/nfc/INfcVzw$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    .line 76
    return-void
.end method

# virtual methods
.method public asBinder()Landroid/os/IBinder;
    .locals 1

    .prologue
    .line 79
    iget-object v0, p0, Lcom/nxp/nfc/INfcVzw$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    return-object v0
.end method

.method public getInterfaceDescriptor()Ljava/lang/String;
    .locals 1

    .prologue
    .line 83
    const-string v0, "com.nxp.nfc.INfcVzw"

    return-object v0
.end method

.method public setScreenOffCondition(Z)V
    .locals 5
    .param p1, "enable"    # Z
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v2, 0x0

    .line 106
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 107
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 109
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string v3, "com.nxp.nfc.INfcVzw"

    invoke-virtual {v0, v3}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 110
    if-eqz p1, :cond_0

    const/4 v2, 0x1

    :cond_0
    invoke-virtual {v0, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 111
    iget-object v2, p0, Lcom/nxp/nfc/INfcVzw$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v3, 0x2

    const/4 v4, 0x0

    invoke-interface {v2, v3, v0, v1, v4}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 112
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 115
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 116
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 118
    return-void

    .line 115
    :catchall_0
    move-exception v2

    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 116
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    throw v2
.end method

.method public setVzwAidList([Lcom/vzw/nfc/RouteEntry;)Z
    .locals 7
    .param p1, "entries"    # [Lcom/vzw/nfc/RouteEntry;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v2, 0x1

    const/4 v3, 0x0

    .line 88
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 89
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 92
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string v4, "com.nxp.nfc.INfcVzw"

    invoke-virtual {v0, v4}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 93
    const/4 v4, 0x0

    invoke-virtual {v0, p1, v4}, Landroid/os/Parcel;->writeTypedArray([Landroid/os/Parcelable;I)V

    .line 94
    iget-object v4, p0, Lcom/nxp/nfc/INfcVzw$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v5, 0x1

    const/4 v6, 0x0

    invoke-interface {v4, v5, v0, v1, v6}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 95
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 96
    invoke-virtual {v1}, Landroid/os/Parcel;->readInt()I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v4

    if-eqz v4, :cond_0

    .line 99
    .local v2, "_result":Z
    :goto_0
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 100
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 102
    return v2

    .end local v2    # "_result":Z
    :cond_0
    move v2, v3

    .line 96
    goto :goto_0

    .line 99
    :catchall_0
    move-exception v3

    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 100
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    throw v3
.end method


text:
<?php

class Issues extends CI_Controller{

    public function __construct(){
        parent::__construct();
		$this->load->helper('url');
		include APPPATH . 'third_party/style.php';
    }

    public function index(){
         $data['issues'] = $this->Issues_models->get_issues();
        $this->load->view('templates/navbar');
        $this->load->view('issues/home', $data);

    }

     public function view($id = NULL)
        {
                $data['issue_item'] = $this->Issues_models->get_issues($id);
                if (empty($data['issue_item']))
        {

                show_404();
        }

                 $this->load->view('templates/navbar');
                $this->load->view('issues/view', $data);
        }

    public function create()
{
    $this->load->helper('form');
    $this->load->library('form_validation');

    $this->form_validation->set_rules('title', 'Title', 'required');
    $this->form_validation->set_rules('text', 'Text', 'required');
    $this->form_validation->set_rules('project','Project','required');

    if ($this->form_validation->run() === FALSE)
    {
        $data['issues'] = $this->Issues_models->get_issues();
        $data['type'] = $this->Issues_models->get_type();
        $data['project'] = $this->Projects_models->get_projects();
        $this->load->view('templates/header');
        $this->load->view('templates/navbar');
        $this->load->view('templates/footer');
        $this->load->view('issues/create',$data);
        // $this->load->view('templates/footer');

    }
    else
    {
        $this->Issues_models->set_issues();

        redirect('issues','refresh');
    }
}

    public function edit($id){
        $this->load->helper('form');
    $this->load->library('form_validation');
         $this->form_validation->set_rules('title', 'Title', 'required');
    $this->form_validation->set_rules('text', 'Text', 'required');
        if ($this->form_validation->run() === FALSE) {

                    $data['issue_item'] = $this->Issues_models->get_issues($id);
                    $data['type'] = $this->Issues_models->get_type();
        $this->load->view('issues/edit',$data);
        }
        else {
            $this->Issues_models->update_issues($id);
            redirect('issues','refresh');
        }

    }
}

redpajama_set_name: RedPajamaGithub


text:
#pragma once
#include <aws/ec2/EC2_EXPORTS.h>
#include <aws/ec2/EC2Request.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/ec2/model/VolumeType.h>

namespace Aws
{
namespace EC2
{
namespace Model
{

  /*
  */
  class AWS_EC2_API CreateVolumeRequest : public EC2Request
  {
  public:
    CreateVolumeRequest();
    Aws::String SerializePayload() const override;

    /*

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    */
    inline bool GetDryRun() const{ return m_dryRun; }

    /*

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    */
    inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }

    /*

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

    */
    inline CreateVolumeRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}

    /*

The size of the volume, in GiBs.

Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384 for io1 volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

    */
    inline long GetSize() const{ return m_size; }

    /*

The size of the volume, in GiBs.

Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384 for io1 volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

    */
    inline void SetSize(long value) { m_sizeHasBeenSet = true; m_size = value; }

    /*

The size of the volume, in GiBs.

Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384 for io1 volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

    */
    inline CreateVolumeRequest& WithSize(long value) { SetSize(value); return *this;}

    /*

The snapshot from which to create the volume.

    */
    inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; }

    /*

The snapshot from which to create the volume.

    */
    inline void SetSnapshotId(const Aws::String& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }

    /*

The snapshot from which to create the volume.

    */
    inline void SetSnapshotId(Aws::String&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }

    /*

The snapshot from which to create the volume.

    */
    inline void SetSnapshotId(const char* value) { m_snapshotIdHasBeenSet = true; m_snapshotId.assign(value); }

    /*

The snapshot from which to create the volume.

    */
    inline CreateVolumeRequest& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;}

    /*

The snapshot from which to create the volume.

    */
    inline CreateVolumeRequest& WithSnapshotId(Aws::String&& value) { SetSnapshotId(value); return *this;}

    /*

The snapshot from which to create the volume.

    */
    inline CreateVolumeRequest& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;}

    /*

The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.

    */
    inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }

    /*

The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.

    */
    inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }

    /*

The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.

    */
    inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }

    /*

The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.

    */
    inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }

    /*

The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.

    */
    inline CreateVolumeRequest& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;}

    /*

The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.

    */
    inline CreateVolumeRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(value); return *this;}

    /*

The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.

    */
    inline CreateVolumeRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}

    /*

The volume type. This can be gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, or standard for Magnetic volumes.

Default: standard

    */
    inline const VolumeType& GetVolumeType() const{ return m_volumeType; }

    /*

The volume type. This can be gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, or standard for Magnetic volumes.

Default: standard

    */
    inline void SetVolumeType(const VolumeType& value) { m_volumeTypeHasBeenSet = true; m_volumeType = value; }

    /*

The volume type. This can be gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, or standard for Magnetic volumes.

Default: standard

    */
    inline void SetVolumeType(VolumeType&& value) { m_volumeTypeHasBeenSet = true; m_volumeType = value; }

    /*

The volume type. This can be gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, or standard for Magnetic volumes.

Default: standard

    */
    inline CreateVolumeRequest& WithVolumeType(const VolumeType& value) { SetVolumeType(value); return *this;}

    /*

The volume type. This can be gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, or standard for Magnetic volumes.

Default: standard

    */
    inline CreateVolumeRequest& WithVolumeType(VolumeType&& value) { SetVolumeType(value); return *this;}

    /*

Only valid for Provisioned IOPS (SSD) volumes. The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 30 IOPS/GiB.

Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes

    */
    inline long GetIops() const{ return m_iops; }

    /*

Only valid for Provisioned IOPS (SSD) volumes. The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 30 IOPS/GiB.

Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes

    */
    inline void SetIops(long value) { m_iopsHasBeenSet = true; m_iops = value; }

    /*

Only valid for Provisioned IOPS (SSD) volumes. The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 30 IOPS/GiB.

Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes

    */
    inline CreateVolumeRequest& WithIops(long value) { SetIops(value); return *this;}

    /*

Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

    */
    inline bool GetEncrypted() const{ return m_encrypted; }

    /*

Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

    */
    inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; }

    /*

Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

    */
    inline CreateVolumeRequest& WithEncrypted(bool value) { SetEncrypted(value); return *this;}

    /*

The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. If a KmsKeyId is specified, the Encrypted flag must also be set.

    */
    inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; }

    /*

The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. If a KmsKeyId is specified, the Encrypted flag must also be set.

    */
    inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }

    /*

The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. If a KmsKeyId is specified, the Encrypted flag must also be set.

    */
    inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }

    /*

The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. If a KmsKeyId is specified, the Encrypted flag must also be set.

    */
    inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); }

    /*

The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. If a KmsKeyId is specified, the Encrypted flag must also be set.

    */
    inline CreateVolumeRequest& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;}

    /*

The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. If a KmsKeyId is specified, the Encrypted flag must also be set.

    */
    inline CreateVolumeRequest& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(value); return *this;}

    /*

The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. If a KmsKeyId is specified, the Encrypted flag must also be set.

    */
    inline CreateVolumeRequest& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;}

  private:
    bool m_dryRun;
    bool m_dryRunHasBeenSet;
    long m_size;
    bool m_sizeHasBeenSet;
    Aws::String m_snapshotId;
    bool m_snapshotIdHasBeenSet;
    Aws::String m_availabilityZone;
    bool m_availabilityZoneHasBeenSet;
    VolumeType m_volumeType;
    bool m_volumeTypeHasBeenSet;
    long m_iops;
    bool m_iopsHasBeenSet;
    bool m_encrypted;
    bool m_encryptedHasBeenSet;
    Aws::String m_kmsKeyId;
    bool m_kmsKeyIdHasBeenSet;
  };

} // namespace Model
} // namespace EC2
} // namespace Aws


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

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DeleteDiskRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     *

     * The unique name of the disk you want to delete (e.g., my-disk).
     *

     */
    private String diskName;
    /**
     *

     * A Boolean value to indicate whether to delete the enabled add-ons for the disk.
     *

     */
    private Boolean forceDeleteAddOns;

    /**
     *

     * The unique name of the disk you want to delete (e.g., my-disk).
     *

     *
     * @param diskName
     *        The unique name of the disk you want to delete (e.g., my-disk).
     */

    public void setDiskName(String diskName) {
        this.diskName = diskName;
    }

    /**
     *

     * The unique name of the disk you want to delete (e.g., my-disk).
     *

     *
     * @return The unique name of the disk you want to delete (e.g., my-disk).
     */

    public String getDiskName() {
        return this.diskName;
    }

    /**
     *

     * The unique name of the disk you want to delete (e.g., my-disk).
     *

     *
     * @param diskName
     *        The unique name of the disk you want to delete (e.g., my-disk).
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DeleteDiskRequest withDiskName(String diskName) {
        setDiskName(diskName);
        return this;
    }

    /**
     *

     * A Boolean value to indicate whether to delete the enabled add-ons for the disk.
     *

     *
     * @param forceDeleteAddOns
     *        A Boolean value to indicate whether to delete the enabled add-ons for the disk.
     */

    public void setForceDeleteAddOns(Boolean forceDeleteAddOns) {
        this.forceDeleteAddOns = forceDeleteAddOns;
    }

    /**
     *

     * A Boolean value to indicate whether to delete the enabled add-ons for the disk.
     *

     *
     * @return A Boolean value to indicate whether to delete the enabled add-ons for the disk.
     */

    public Boolean getForceDeleteAddOns() {
        return this.forceDeleteAddOns;
    }

    /**
     *

     * A Boolean value to indicate whether to delete the enabled add-ons for the disk.
     *

     *
     * @param forceDeleteAddOns
     *        A Boolean value to indicate whether to delete the enabled add-ons for the disk.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DeleteDiskRequest withForceDeleteAddOns(Boolean forceDeleteAddOns) {
        setForceDeleteAddOns(forceDeleteAddOns);
        return this;
    }

    /**
     *

     * A Boolean value to indicate whether to delete the enabled add-ons for the disk.
     *

     *
     * @return A Boolean value to indicate whether to delete the enabled add-ons for the disk.
     */

    public Boolean isForceDeleteAddOns() {
        return this.forceDeleteAddOns;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getDiskName() != null)
            sb.append("DiskName: ").append(getDiskName()).append(",");
        if (getForceDeleteAddOns() != null)
            sb.append("ForceDeleteAddOns: ").append(getForceDeleteAddOns());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof DeleteDiskRequest == false)
            return false;
        DeleteDiskRequest other = (DeleteDiskRequest) obj;
        if (other.getDiskName() == null ^ this.getDiskName() == null)
            return false;
        if (other.getDiskName() != null && other.getDiskName().equals(this.getDiskName()) == false)
            return false;
        if (other.getForceDeleteAddOns() == null ^ this.getForceDeleteAddOns() == null)
            return false;
        if (other.getForceDeleteAddOns() != null && other.getForceDeleteAddOns().equals(this.getForceDeleteAddOns()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getDiskName() == null) ? 0 : getDiskName().hashCode());
        hashCode = prime * hashCode + ((getForceDeleteAddOns() == null) ? 0 : getForceDeleteAddOns().hashCode());
        return hashCode;
    }

    @Override
    public DeleteDiskRequest clone() {
        return (DeleteDiskRequest) super.clone();
    }

}


text:
// Class for packing up a globe into a single file.

#ifndef GEO_EARTH_ENTERPRISE_SRC_FUSION_PORTABLEGLOBE_SERVERS_FILEUNPACKER_SHARED_FILE_UNPACKER_H_
#define GEO_EARTH_ENTERPRISE_SRC_FUSION_PORTABLEGLOBE_SERVERS_FILEUNPACKER_SHARED_FILE_UNPACKER_H_

#include <fstream>  // NOLINT(readability/streams)
#include <map>
#include <string>
#include <vector>
#include "./file_package.h"
#include "./glc_reader.h"
#include "./packetbundle_finder.h"

class GlcReader;

/**
 * Class for unpacking files from a single package file.
 */
class FileUnpacker {
 public:
  FileUnpacker(const GlcReader& glc_reader, uint64 offset, uint64 size);
  ~FileUnpacker();

  /**
   * Find data packet and set offset and size for the packet. Data packets can
   * be imagery, terrain or vectors.
   * @return whether data packet was found.
   */
  bool FindDataPacket(const char* qtpath,
                      int packet_type,
                      int channel,
                      PackageFileLoc* data_loc);

  /**
   * Find map data packet and set offset and size for the packet. Data packets
   * can be map imagery or vectors.
   * @return whether data packet was found.
   */
  bool FindMapDataPacket(const char* qtpath,
                         int packet_type,
                         int channel,
                         PackageFileLoc* data_loc);

  /**
   * Find qtp packet and set offset and size for the packet. Qtp packets can
   * be quadtree packets or a dbroot packet.
   * @return whether qtp packet was found.
   */
  bool FindQtpPacket(const char* qtpath,
                     int packet_type,
                     int channel,
                     PackageFileLoc* data_loc);

  /**
   * Returns whether there are any data at the given address.
   */
  bool HasData(const char* qtpath, bool is_2d);

  /**
   * Find dbroot and set offset and size for the content.
   * @param data_loc Returns location of dbroot data.
   * @return whether dbroot was found.
   */
  bool FindDbRoot(PackageFileLoc* data_loc);

  /**
   * Find file and set offset and size for the file content.
   * @return whether file was found.
   */
  bool FindFile(const char* file_name, PackageFileLoc* file_loc);

  /**
   * Get idx-th file in index.
   */
  const char* IndexFile(int idx);

  /**
   * Get path of file in index.
   */
  int IndexSize() { return index_.size(); }

  /**
   * Get the index for debugging tools.
   */
  const std::map<std::string, PackageFileLoc>& Index() { return index_; }

 private:
  /**
   * Helper for reading in consecutive fields from the glc file.
   */
  bool Read(void* data, uint64 size);

  const GlcReader& glc_reader_;
  uint64 base_offset_;  // Base offset to package within the composite.
  uint64 base_size_;    // Size of package within the composite.

  std::map<std::string, PackageFileLoc> index_;

  PackageFileLoc data_packet_index_loc_;
  std::vector<PackageFileLoc> data_packet_file_loc_;
  PackageFileLoc mapdata_packet_index_loc_;
  std::vector<PackageFileLoc> mapdata_packet_file_loc_;
  PackageFileLoc qtp_packet_index_loc_;
  PackageFileLoc qtp_packet_file_loc_;

  PacketBundleFinder* data_packet_finder_;
  PacketBundleFinder* mapdata_packet_finder_;
  PacketBundleFinder* qtp_packet_finder_;

  bool has_3d_data_;
  bool has_2d_data_;

  std::string dbroot_path_;

  // Offset for consecutive reads from the reader.
  uint64 reader_offset_;
};

#endif  // GEO_EARTH_ENTERPRISE_SRC_FUSION_PORTABLEGLOBE_SERVERS_FILEUNPACKER_SHARED_FILE_UNPACKER_H_


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

<TITLE>
URLHelper
</TITLE>

<META NAME="date" CONTENT="2012-05-10">

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

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.slc.sli.util

Class URLHelper

java.lang.Object
  org.slc.sli.util.URLHelper

public class URLHelper
extends java.lang.Object

Author:

svankina
TODO: Write javadoc

Constructor Summary

URLHelper()

Method Summary

static java.lang.String
getUrl(javax.servlet.http.HttpServletRequest req)

          Get the URL that generated this request

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

URLHelper

public URLHelper()

Method Detail

getUrl

public static java.lang.String getUrl(javax.servlet.http.HttpServletRequest req)

Get the URL that generated this request

Parameters:
req -

Returns:

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
namespace webkit_media {

PpapiDecryptor::PpapiDecryptor(
    media::DecryptorClient* client,
    const scoped_refptr<webkit::ppapi::PluginInstance>& plugin_instance)
    : client_(client),
      plugin_instance_(plugin_instance),
      plugin_cdm_delegate_(NULL),
      render_loop_proxy_(base::MessageLoopProxy::current()),
      weak_ptr_factory_(this),
      weak_this_(weak_ptr_factory_.GetWeakPtr()) {
  DCHECK(client_);
  DCHECK(plugin_instance_);
}

PpapiDecryptor::~PpapiDecryptor() {
  if (plugin_cdm_delegate_)
    plugin_cdm_delegate_->set_decrypt_client(NULL);
  plugin_cdm_delegate_ = NULL;
  plugin_instance_ = NULL;
}

bool PpapiDecryptor::GenerateKeyRequest(const std::string& key_system,
                                        const std::string& type,
                                        const uint8* init_data,
                                        int init_data_length) {
  DVLOG(2) << "GenerateKeyRequest()";
  DCHECK(render_loop_proxy_->BelongsToCurrentThread());

  if (!plugin_cdm_delegate_) {
    plugin_cdm_delegate_ = plugin_instance_->GetContentDecryptorDelegate();
    if (!plugin_cdm_delegate_) {
      DVLOG(1) << "PpapiDecryptor: plugin cdm delegate creation failed.";
      return false;
    }
    plugin_cdm_delegate_->set_decrypt_client(client_);
  }

  if (!plugin_cdm_delegate_->GenerateKeyRequest(
      key_system, type, init_data, init_data_length)) {
    ReportFailureToCallPlugin(key_system, "");
    return false;
  }

  return true;
}

void PpapiDecryptor::AddKey(const std::string& key_system,
                            const uint8* key,
                            int key_length,
                            const uint8* init_data,
                            int init_data_length,
                            const std::string& session_id) {
  DVLOG(2) << "AddKey()";
  DCHECK(render_loop_proxy_->BelongsToCurrentThread());

  if (!plugin_cdm_delegate_->AddKey(
      session_id, key, key_length, init_data, init_data_length)) {
    ReportFailureToCallPlugin(key_system, session_id);
  }

  if (!audio_key_added_cb_.is_null())
    audio_key_added_cb_.Run();

  if (!video_key_added_cb_.is_null())
    video_key_added_cb_.Run();
}

void PpapiDecryptor::CancelKeyRequest(const std::string& key_system,
                                      const std::string& session_id) {
  DVLOG(2) << "CancelKeyRequest()";
  DCHECK(render_loop_proxy_->BelongsToCurrentThread());

  if (!plugin_cdm_delegate_->CancelKeyRequest(session_id))
    ReportFailureToCallPlugin(key_system, session_id);
}

void PpapiDecryptor::RegisterKeyAddedCB(StreamType stream_type,
                                        const KeyAddedCB& key_added_cb) {
  switch (stream_type) {
    case kAudio:
      audio_key_added_cb_ = key_added_cb;
      break;
    case kVideo:
      video_key_added_cb_ = key_added_cb;
      break;
    default:
      NOTREACHED();
  }
}

void PpapiDecryptor::Decrypt(
    StreamType stream_type,
    const scoped_refptr<media::DecoderBuffer>& encrypted,
    const DecryptCB& decrypt_cb) {
  if (!render_loop_proxy_->BelongsToCurrentThread()) {
    render_loop_proxy_->PostTask(FROM_HERE, base::Bind(
        &PpapiDecryptor::Decrypt, weak_this_,
        stream_type, encrypted, decrypt_cb));
    return;
  }

  DVLOG(3) << "Decrypt() - stream_type: " << stream_type;
  if (!plugin_cdm_delegate_->Decrypt(stream_type, encrypted, decrypt_cb))
    decrypt_cb.Run(kError, NULL);
}

void PpapiDecryptor::CancelDecrypt(StreamType stream_type) {
  DVLOG(1) << "CancelDecrypt() - stream_type: " << stream_type;
  plugin_cdm_delegate_->CancelDecrypt(stream_type);
}

void PpapiDecryptor::InitializeAudioDecoder(
      scoped_ptr<media::AudioDecoderConfig> config,
      const DecoderInitCB& init_cb) {
  if (!render_loop_proxy_->BelongsToCurrentThread()) {
    render_loop_proxy_->PostTask(FROM_HERE, base::Bind(
        &PpapiDecryptor::InitializeAudioDecoder, weak_this_,
        base::Passed(&config), init_cb));
    return;
  }

  DVLOG(2) << "InitializeAudioDecoder()";
  DCHECK(config->is_encrypted());
  DCHECK(config->IsValidConfig());

  audio_decoder_init_cb_ = init_cb;
  if (!plugin_cdm_delegate_->InitializeAudioDecoder(*config, base::Bind(
      &PpapiDecryptor::OnDecoderInitialized, weak_this_, kAudio))) {
    base::ResetAndReturn(&audio_decoder_init_cb_).Run(false);
    return;
  }
}

void PpapiDecryptor::InitializeVideoDecoder(
    scoped_ptr<media::VideoDecoderConfig> config,
    const DecoderInitCB& init_cb) {
  if (!render_loop_proxy_->BelongsToCurrentThread()) {
    render_loop_proxy_->PostTask(FROM_HERE, base::Bind(
        &PpapiDecryptor::InitializeVideoDecoder, weak_this_,
        base::Passed(&config), init_cb));
    return;
  }

  DVLOG(2) << "InitializeVideoDecoder()";
  DCHECK(config->is_encrypted());
  DCHECK(config->IsValidConfig());

  video_decoder_init_cb_ = init_cb;
  if (!plugin_cdm_delegate_->InitializeVideoDecoder(*config, base::Bind(
      &PpapiDecryptor::OnDecoderInitialized, weak_this_, kVideo))) {
    base::ResetAndReturn(&video_decoder_init_cb_).Run(false);
    return;
  }
}

void PpapiDecryptor::DecryptAndDecodeAudio(
    const scoped_refptr<media::DecoderBuffer>& encrypted,
    const AudioDecodeCB& audio_decode_cb) {
  if (!render_loop_proxy_->BelongsToCurrentThread()) {
    render_loop_proxy_->PostTask(FROM_HERE, base::Bind(
        &PpapiDecryptor::DecryptAndDecodeAudio, weak_this_,
        encrypted, audio_decode_cb));
    return;
  }

  DVLOG(1) << "DecryptAndDecodeAudio()";
  if (!plugin_cdm_delegate_->DecryptAndDecodeAudio(encrypted, audio_decode_cb))
    audio_decode_cb.Run(kError, AudioBuffers());
}

void PpapiDecryptor::DecryptAndDecodeVideo(
    const scoped_refptr<media::DecoderBuffer>& encrypted,
    const VideoDecodeCB& video_decode_cb) {
  if (!render_loop_proxy_->BelongsToCurrentThread()) {
    render_loop_proxy_->PostTask(FROM_HERE, base::Bind(
        &PpapiDecryptor::DecryptAndDecodeVideo, weak_this_,
        encrypted, video_decode_cb));
    return;
  }

  DVLOG(3) << "DecryptAndDecodeVideo()";
  if (!plugin_cdm_delegate_->DecryptAndDecodeVideo(encrypted, video_decode_cb))
    video_decode_cb.Run(kError, NULL);
}

void PpapiDecryptor::ResetDecoder(StreamType stream_type) {
  if (!render_loop_proxy_->BelongsToCurrentThread()) {
    render_loop_proxy_->PostTask(FROM_HERE, base::Bind(
        &PpapiDecryptor::ResetDecoder, weak_this_, stream_type));
    return;
  }

  DVLOG(2) << "ResetDecoder() - stream_type: " << stream_type;
  plugin_cdm_delegate_->ResetDecoder(stream_type);
}

void PpapiDecryptor::DeinitializeDecoder(StreamType stream_type) {
  if (!render_loop_proxy_->BelongsToCurrentThread()) {
    render_loop_proxy_->PostTask(FROM_HERE, base::Bind(
        &PpapiDecryptor::DeinitializeDecoder, weak_this_, stream_type));
    return;
  }

  DVLOG(2) << "DeinitializeDecoder() - stream_type: " << stream_type;
  plugin_cdm_delegate_->DeinitializeDecoder(stream_type);
}

void PpapiDecryptor::ReportFailureToCallPlugin(const std::string& key_system,
                                               const std::string& session_id) {
  DVLOG(1) << "Failed to call plugin.";
  client_->KeyError(key_system, session_id, kUnknownError, 0);
}

void PpapiDecryptor::OnDecoderInitialized(StreamType stream_type,
                                          bool success) {
  switch (stream_type) {
    case kAudio:
      DCHECK(!audio_decoder_init_cb_.is_null());
      base::ResetAndReturn(&audio_decoder_init_cb_).Run(success);
      break;
    case kVideo:
      DCHECK(!video_decoder_init_cb_.is_null());
      base::ResetAndReturn(&video_decoder_init_cb_).Run(success);
      break;
    default:
      NOTREACHED();
  }
}

}  // namespace webkit_media


text:
<?php

namespace Umc\Base\Block\Adminhtml;

use Magento\Backend\Block\Template\Context;
use Magento\Backend\Block\Widget\Form\Generic as GenericForm;
use Magento\Framework\Data\FormFactory;
use Magento\Framework\Registry;
use Umc\Base\Block\Adminhtml\Help\Section;
use Umc\Base\Config\Help as HelpConfig;
use Umc\Base\Block\Adminhtml\Help\SectionFactory as SectionBlockFactory;

/**
 * @api
 */
class Help extends GenericForm
{
    /**
     * @var SectionBlockFactory
     */
    protected $sectionFactory;

    /**
     * @var \Umc\Base\Config\Help
     */
    protected $helpConfig;

    /**
     * @var \Umc\Base\Block\Adminhtml\Help\Section[]
     */
    protected $sectionBlocks;

    /**
     * @param Context $context
     * @param Registry $registry
     * @param FormFactory $formFactory
     * @param HelpConfig $helpConfig
     * @param SectionBlockFactory $sectionFactory
     * @param array $data
     */
    public function __construct(
        Context $context,
        Registry $registry,
        FormFactory $formFactory,
        HelpConfig $helpConfig,
        SectionBlockFactory $sectionFactory,
        array $data = []
    ) {
        $this->helpConfig     = $helpConfig;
        $this->sectionFactory = $sectionFactory;
        parent::__construct($context, $registry, $formFactory, $data);
    }

    /**
     * get help sections
     *
     * @return Section[]
     */
    public function getSections()
    {
        if ($this->sectionBlocks === null) {
            $this->sectionBlocks = [];
            foreach ($this->helpConfig->getConfig('section', true, []) as $sectionId => $sectionData) {
                $section = $this->sectionFactory->create([
                    'sectionData' => $sectionData
                ]);
                $this->sectionBlocks[] = $section;
            }
        }
        return $this->sectionBlocks;
    }

    /**
     * format value
     *
     * @param string $field
     * @param array $column
     * @return string
     * @deprecated
     */
    public function getFormatedValue($field, $column)
    {
        if (!isset($column['type'])) {
            $column['type'] = Section\Fieldset::DEFAULT_COLUMN_TYPE;
        }
        if (!isset($column['key'])) {
            return '';
        }
        $key = $column['key'];
        $rawValue = $field[$key];
        switch($column['type']){
            case 'bool':
                $value = (bool)(string)$rawValue;
                if ($value == 1) {
                    return __('Yes');
                }
                return __('No');
            case 'text':
                //intentional fall through
            default:
                return $rawValue;
        }
    }
}


text:
package org.eclipse.jdt.internal.ui.text;

import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;

import org.eclipse.core.runtime.Assert;

import org.eclipse.jface.resource.JFaceResources;

import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextViewerExtension;

import org.eclipse.jdt.ui.text.IJavaPartitions;

import org.eclipse.jdt.internal.ui.text.java.hover.SourceViewerInformationControl;

/**
 * Specialized source viewer information control used to display quick diff hovers.
 *
 * @since 3.0
 */
class ChangeHoverInformationControl extends SourceViewerInformationControl {

	/** The font name for the viewer font - the same as the java editor's. */
	private static final String SYMBOLIC_FONT_NAME= "org.eclipse.jdt.ui.editors.textfont"; //$NON-NLS-1$

	/** The maximum width of the control, set in setSizeConstraints(int, int). */
	int fMaxWidth= Integer.MAX_VALUE;
	/** The maximum height of the control, set in setSizeConstraints(int, int). */
	int fMaxHeight= Integer.MAX_VALUE;

	/** The partition type to be used as the starting partition type by the partition scanner. */
	private String fPartition;
	/** The horizontal scroll index. */
	private int fHorizontalScrollPixel;

	/*
	 * @see org.eclipse.jface.text.IInformationControl#setSizeConstraints(int, int)
	 */
	@Override
	public void setSizeConstraints(int maxWidth, int maxHeight) {
		fMaxWidth= maxWidth;
		fMaxHeight= maxHeight;
	}

	/**
	 * Creates a new information control.
	 *
	 * @param parent the shell that is the parent of this hover / control
	 * @param isResizable true if resizable
	 * @param orientation the orientation
	 * @param partition the initial partition type to be used for the underlying viewer
	 * @param statusFieldText the text to be used in the optional status field
	 *                         or null if the status field should be hidden
	 */
	public ChangeHoverInformationControl(Shell parent, boolean isResizable, int orientation, String partition, String statusFieldText) {
		super(parent, isResizable, orientation, statusFieldText);
		setViewerFont();
		setStartingPartitionType(partition);
	}

	/*
	 * @see org.eclipse.jface.text.IInformationControl#computeSizeHint()
	 */
	@Override
	public Point computeSizeHint() {
		Point size= super.computeSizeHint();
		size.x= Math.min(size.x, fMaxWidth);
		size.y= Math.min(size.y, fMaxHeight);
		return size;
	}

	/**
	 * Sets the font for this viewer sustaining selection and scroll position.
	 */
	private void setViewerFont() {
		Font font= JFaceResources.getFont(SYMBOLIC_FONT_NAME);

		if (getViewer().getDocument() != null) {

			Point selection= getViewer().getSelectedRange();
			int topIndex= getViewer().getTopIndex();

			StyledText styledText= getViewer().getTextWidget();
			Control parent= styledText;
			if (getViewer() instanceof ITextViewerExtension) {
				ITextViewerExtension extension= (ITextViewerExtension) getViewer();
				parent= extension.getControl();
			}

			parent.setRedraw(false);

			styledText.setFont(font);

			getViewer().setSelectedRange(selection.x , selection.y);
			getViewer().setTopIndex(topIndex);

			if (parent instanceof Composite) {
				Composite composite= (Composite) parent;
				composite.layout(true);
			}

			parent.setRedraw(true);

		} else {
			StyledText styledText= getViewer().getTextWidget();
			styledText.setFont(font);
		}
	}

	/**
	 * Sets the initial partition for the underlying source viewer.
	 *
	 * @param partition the partition type
	 */
	public void setStartingPartitionType(String partition) {
		if (partition == null)
			fPartition= IDocument.DEFAULT_CONTENT_TYPE;
		else
			fPartition= partition;
	}

	/*
	 * @see org.eclipse.jface.text.IInformationControl#setInformation(java.lang.String)
	 */
	@Override
	public void setInformation(String content) {
		super.setInformation(content);
		IDocument doc= getViewer().getDocument();
		if (doc == null)
			return;

		// ensure that we can scroll enough
		ensureScrollable();

		String start= null;
		if (IJavaPartitions.JAVA_DOC.equals(fPartition)) {
			start= "/**" + doc.getLegalLineDelimiters()[0]; //$NON-NLS-1$
		} else if (IJavaPartitions.JAVA_MULTI_LINE_COMMENT.equals(fPartition)) {
			start= "/*" + doc.getLegalLineDelimiters()[0]; //$NON-NLS-1$
		}
		if (start != null) {
			try {
				doc.replace(0, 0, start);
				int startLen= start.length();
				getViewer().setDocument(doc, startLen, doc.getLength() - startLen);
			} catch (BadLocationException e) {
				// impossible
				Assert.isTrue(false);
			}
		}

		getViewer().getTextWidget().setHorizontalPixel(fHorizontalScrollPixel);
	}

	/**
	 * Ensures that the control can be scrolled at least to
	 * fHorizontalScrollPixel and adjusts fMaxWidth
	 * accordingly.
	 */
	private void ensureScrollable() {
		IDocument doc= getViewer().getDocument();
		if (doc == null)
			return;

		StyledText widget= getViewer().getTextWidget();
		if (widget == null || widget.isDisposed())
			return;

		int last= doc.getNumberOfLines() - 1;
		GC gc= new GC(widget);
		gc.setFont(widget.getFont());
		int maxWidth= 0;
		String content= new String();

		try {
			for (int i= 0; i <= last; i++) {
				IRegion line;
				line= doc.getLineInformation(i);
				content= doc.get(line.getOffset(), line.getLength());
				int width= gc.textExtent(content).x;
				if (width > maxWidth) {
					maxWidth= width;
				}
			}
		} catch (BadLocationException e) {
			return;
		} finally {
			gc.dispose();
		}

		// limit the size of the window to the maximum width minus scrolling,
		// but never more than the configured max size (viewport size).
		fMaxWidth= Math.max(0, Math.min(fMaxWidth, maxWidth - fHorizontalScrollPixel + 8));
	}

	/*
	 * @see org.eclipse.jdt.internal.ui.text.java.hover.SourceViewerInformationControl#hasContents()
	 */
	@Override
	public boolean hasContents() {
		return super.hasContents() && fMaxWidth > 0;
	}

	/**
	 * Sets the horizontal scroll index in pixels.
	 *
	 * @param scrollIndex the new horizontal scroll index
	 */
	public void setHorizontalScrollPixel(int scrollIndex) {
		scrollIndex= Math.max(0, scrollIndex);
		fHorizontalScrollPixel= scrollIndex;
	}
}


text:
<?php
namespace Concrete\Controller\SinglePage\Dashboard\System\Seo;

use Concrete\Core\Page\Controller\DashboardSitePageController;

class Urls extends DashboardSitePageController
{
    /**
     * Dashboard page view.
     *
     * @param string|bool $strStatus - Result of attempting to update rewrite rules
     * @param bool $prettyUrlState - Flag denoting if the rewrite rule has been saved
     */
    public function view($strStatus = false, $prettyUrlState = '')
    {
        $globalConfig = $this->app->make('config');
        $siteConfig = $this->getSite()->getConfigRepository();

        $urlRewriting = (bool) $globalConfig->get('concrete.seo.url_rewriting');
        $this->set('fh', $this->app->make('helper/form'));
        $this->set('canonical_url', $siteConfig->get('seo.canonical_url'));
        $this->set('canonical_url_alternative', $siteConfig->get('seo.canonical_url_alternative'));
        $this->set('redirect_to_canonical_url', $globalConfig->get('concrete.seo.redirect_to_canonical_url'));
        $this->set('urlRewriting', $urlRewriting);
        $this->set('canonical_tag', $siteConfig->get('seo.canonical_tag.enabled'));

        $strStatus = (string) $strStatus;
        if ($strStatus === 'saved') {
            $message = t('Settings Saved.');
            $prettyUrlState = (string) $prettyUrlState;
            switch ($prettyUrlState) {
                case 'saved':
                case 'not-needed':
                    $manager = $this->app->make('Concrete\Core\Service\Manager\ServiceManager');
                    $services = $manager->getActiveServices();
                    $service = $services[0];
                    $rule = $service->getGenerator()->getRule('pretty_urls');
                    switch ($prettyUrlState) {
                        case 'saved':
                            if ($urlRewriting) {
                                $this->set('configuration_action', t('The following rule has been added to the server configuration'));
                            } else {
                                $this->set('configuration_action', t('The following rule has been removed from the server configuration'));
                            }
                            break;
                        case 'not-needed':
                            if ($urlRewriting) {
                                $this->set('configuration_action', t('The following rule was already in your server configuration'));
                            } else {
                                $this->set('configuration_action', t('The following rule was already missing in your server configuration'));
                            }
                            break;
                    }
                    $this->set('configuration_code', $rule->getCode());
                    break;
                case 'unrecognized':
                    $codes = array();
                    $manager = $this->app->make('Concrete\Core\Service\Manager\ServiceManager');
                    /* @var \Concrete\Core\Service\Manager\ServiceManager $manager */
                    foreach ($manager->getAllServices() as $service) {
                        $rule = $service->getGenerator()->getRule('pretty_urls');
                        if ($rule !== null) {
                            if (isset($codes[$rule->getCode()])) {
                                $codes[$rule->getCode()][] = $service->getName();
                            } else {
                                $codes[$rule->getCode()] = array($service->getName());
                            }
                        }
                    }
                    $actionMessage = t("It was not possible to detect your server kind.");
                    if ($urlRewriting) {
                        $actionMessage .= ' '.t("Here's the configuration sections for every supported server: please manually add the one relevant for you to your server configuration.");
                    } else {
                        $actionMessage .= ' '.t("Here's the configuration sections for every supported server: please manually remove the one relevant for you from your server configuration.");
                    }
                    $this->set('configuration_action', $actionMessage);
                    $joined = '';
                    foreach ($codes as $code => $serviceNames) {
                        if ($joined !== '') {
                            $joined .= "\n\n";
                        }
                        $joined .= '>>> ' . tc(/*i18n %s is one or more server names */'For server', 'For %s', implode(', ', $serviceNames)) . " <<<\n";
                        $joined .= $code;
                    }
                    $this->set('configuration_code', $joined);
                    break;
                case 'not-readable':
                case 'not-writable':
                    $manager = $this->app->make('Concrete\Core\Service\Manager\ServiceManager');
                    $services = $manager->getActiveServices();
                    $service = $services[0];
                    $rule = $service->getGenerator()->getRule('pretty_urls');
                    $actionMessage = '';
                    switch ($prettyUrlState) {
                        case 'not-readable':
                            $actionMessage .= t('It was not possible read your server configuration.');
                            break;
                        case 'not-writable':
                            $actionMessage .= t('It was not possible write your server configuration.');
                            break;
                    }
                    if ($urlRewriting) {
                        $actionMessage .= ' '.t('Please add this configuration section to your server configuration:');
                    } else {
                        $actionMessage .= ' '.t('Please remove this configuration section from your server configuration');
                    }
                    $this->set('configuration_action', $actionMessage);
                    $this->set('configuration_code', $rule->getCode());
                    break;
            }
            $this->set('message', $message);
        }
    }

    /**
     * Updates the .htaccess file (if writable).
     */
    public function save_urls()
    {
        if ($this->isPost()) {
            if (!$this->token->validate('save_urls')) {
                $this->error->add($this->token->getErrorMessage());
            }

            if ($this->post('canonical_url') &&
                !(
                    strpos(strtolower($this->post('canonical_url')), 'http://') === 0 ||
                    strpos(strtolower($this->post('canonical_url')), 'https://') === 0
                )) {
                $this->error->add(t('The canonical URL provided must start with "http://" or "https://".'));
            }
            if ($this->post('canonical_url_alternative') &&
                !(
                    strpos(strtolower($this->post('canonical_url_alternative')), 'http://') === 0 ||
                    strpos(strtolower($this->post('canonical_url_alternative')), 'https://') === 0
                )) {
                $this->error->add(t('The alternative canonical URL provided must start with "http://" or "https://".'));
            }
            if (!$this->error->has()) {
                $globalConfig = $this->app->make('config');
                $siteConfig = $this->getSite()->getConfigRepository();
                $siteConfig->save('seo.canonical_url', $this->post('canonical_url'));
                $siteConfig->save('seo.canonical_url_alternative', $this->post('canonical_url_alternative'));
                $globalConfig->save('concrete.seo.redirect_to_canonical_url', $this->post('redirect_to_canonical_url') ? 1 : 0);
                $siteConfig->save('seo.canonical_tag.enabled', (bool) $this->post('canonical_tag'));

                $urlRewriting = (bool) $this->post('URL_REWRITING');
                $globalConfig->save('concrete.seo.url_rewriting', $urlRewriting);
                $globalConfig->set('concrete.seo.url_rewriting', $urlRewriting);
                $manager = $this->app->make('Concrete\Core\Service\Manager\ServiceManager');
                /* @var \Concrete\Core\Service\Manager\ServiceManager $manager */
                $prettyUrlState = '';
                $services = $manager->getActiveServices();
                if (empty($services)) {
                    $prettyUrlState = 'unrecognized';
                } else {
                    $service = $services[0];
                    if (!$service->getStorage()->canRead()) {
                        $prettyUrlState = 'not-readable';
                    } else {
                        $rule = $service->getGenerator()->getRule('pretty_urls');
                        if ($rule === null) {
                            $prettyUrlState = 'not-needed';
                        } else {
                            $configuration = $service->getStorage()->read();
                            if ($service->getConfigurator()->hasRule($configuration, $rule) === $urlRewriting) {
                                $prettyUrlState = 'not-needed';
                            } else {
                                if ($service->getStorage()->canWrite() === false) {
                                    $prettyUrlState = 'not-writable';
                                } else {
                                    if ($urlRewriting) {
                                        $configuration = $service->getConfigurator()->addRule($configuration, $rule);
                                    } else {
                                        $configuration = $service->getConfigurator()->removeRule($configuration, $rule);
                                    }
                                    $service->getStorage()->write($configuration);
                                    $prettyUrlState = 'saved';
                                }
                            }
                        }
                    }
                }
                $this->redirect('/dashboard/system/seo/urls', 'saved', $prettyUrlState);
            }
        }
        $this->view();
    }
}


text:
<!DOCTYPE html>

	<title>Flex Box</title>
	<link rel="stylesheet" href="page-styles.css">
	<link rel="stylesheet" href="flexbox.css">

Item 1

Item 2

Item 3

Item 4

Item 5

Item 6

Column A

				Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Column B

				Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Column C

				Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

				Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?

Lorem ipsum dolor sit amet

				Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

				Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

				Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet,


text:
import java.util.LinkedList;
import java.util.Queue;
import java.util.concurrent.Semaphore;

public class Producer implements Runnable{

	// Set the semaphore initial ticket to 0 and to not fair
	public static Semaphore semaphore = new Semaphore(0, false);

	public static Queue<Problem> problems = new LinkedList<Problem>();

	// Give the consumers a fighting chance
	private static int PRODUCER_SLEEP_TIME = 500;

	public Producer() {
		Thread t = new Thread(this);
		t.start();
	}

	private Problem createProblem() {
		return new Problem();
	}

	@Override
	public void run() {

		while(true) {

			problems.add(createProblem());
			SemaphoreTester.problemsPosted.getAndIncrement();

			semaphore.release();

			try {
				Thread.sleep(PRODUCER_SLEEP_TIME);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}

}


text:
module ReputationSystem
  module Reputation
    def reputation_value_for(reputation_name, *args)
      scope = args.first
      if !self.class.has_reputation_for?(reputation_name)
        raise ArgumentError, "#{reputation_name} is not valid"
      else
        reputation_name = ReputationSystem::Network.get_scoped_reputation_name(self.class.name, reputation_name, scope)
        process = ReputationSystem::Network.get_reputation_def(self.class.name, reputation_name)[:aggregated_by]
        reputation = RSReputation.find_or_create_reputation(reputation_name, self, process)
        reputation.value
      end
    end

    def rank_for(reputation_name, *args)
      scope = args.first
      my_value = self.reputation_value_for(reputation_name, scope)
      self.class.count_with_reputation(reputation_name, scope, :all,
        :conditions => ["rs_reputations.value > ?", my_value]
      ) + 1
    end
  end
end


text:
#ifndef TEXTURES_TEXTURE_DATA_H
#define TEXTURES_TEXTURE_DATA_H

#include "../DragonBones.h"
#include "../geoms/Rectangle.h"

NAME_SPACE_DRAGON_BONES_BEGIN
class TextureData
{
public:
    bool rotated;

    String name;
    Rectangle region;

    Rectangle *frame;

public:
    TextureData()
    {
        rotated = false;
        frame = nullptr;
    }
    TextureData(const TextureData &copyData)
    {
        operator=(copyData);
    }
    TextureData &operator=(const TextureData &copyData)
    {
        dispose();
        rotated = copyData.rotated;
        name = copyData.name;
        region = copyData.region;

        if (copyData.frame)
        {
            frame = new Rectangle();
            *frame = *(copyData.frame);
        }

        return *this;
    }
    virtual ~TextureData()
    {
        dispose();
    }
    void dispose()
    {
        if (frame)
        {
            delete frame;
            frame = nullptr;
        }
    }
};
NAME_SPACE_DRAGON_BONES_END
#endif  // TEXTURES_TEXTURE_DATA_H


text:
package org.apache.dubbo.common.constants;

/**
 * Common configuration for configCenter, metadata, and registry modules
 */
public interface ConsulConstants {

    int DEFAULT_PORT = 8500;

    int DEFAULT_WATCH_TIMEOUT = 60 * 1000;

    String WATCH_TIMEOUT = "consul-watch-timeout";

    int INVALID_PORT = 0;

}


text:
int ecm_class_handler(struct usb_setup_packet *setup, s32_t *len, u8_t **data);

void ecm_int_in(u8_t ep, enum usb_dc_ep_cb_status_code ep_status);
void ecm_bulk_out(u8_t ep, enum usb_dc_ep_cb_status_code ep_status);
void ecm_bulk_in(u8_t ep, enum usb_dc_ep_cb_status_code ep_status);

int ecm_send(struct net_pkt *pkt);
struct netusb_function *ecm_register_function(struct net_if *iface, u8_t in);


text:
static std::atomic<qint64> counter {0};

struct Box
{
    int a {0};
    int b {0};

    Box() { counter++; }
    Box(const Box &box)
        : a(box.a), b(box.b) { counter++; }
    Box &operator=(const Box &box) {
        counter++;
        a = box.a;
        b = box.b;
        return *this;
    }
};
TStack<Box> stackBox;

class PopThread : public QThread
{
    Q_OBJECT
public:
    PopThread() { }
protected:
    void run() {
        for (;;) {
        //for (int i = 0; i < 500000; i++) {
            Box box;
            if (stackBox.pop(box)) {
                Q_ASSERT(box.a + box.b == 1000);
            }
        }
    }
};

class PushThread : public QThread
{
    Q_OBJECT
public:
    PushThread() { }
protected:
    void run() {
        for (;;) {
        //for (int i = 0; i < 500000; i++) {
            Box box;
            if (stackBox.top(box)) {
                Q_ASSERT(box.a + box.b == 1000);

                box.a++;
                QThread::yieldCurrentThread();
                box.b--;
            } else {
                box.a = 1000;
                QThread::yieldCurrentThread();
                box.b = 0;
            }

            if (stackBox.count() < 100) {
                stackBox.push(box);
            }
        }
    }
};

class TestStack : public QObject
{
    Q_OBJECT
public slots:
    void startPopThread();
    void startPushThread();

private slots:
    void push_pop();
};

void TestStack::push_pop()
{
#ifdef Q_OS_LINUX
    const int NUM = 128;
#else
    const int NUM = 32;
#endif

    // Starts threads
    for (int i = 0; i < NUM; i++) {
        startPopThread();
        startPopThread();
        startPushThread();
    }

    QElapsedTimer timer;
    timer.start();

    QEventLoop eventLoop;
    while (timer.elapsed() < 10000) {
        eventLoop.processEvents();
    }

    std::cout << "counter=" << counter.load() << std::endl;
    std::cout << "stack count=" << stackBox.count() << std::endl;
    _exit(0);
}

void TestStack::startPopThread()
{
    auto *threada = new PopThread();
    connect(threada, SIGNAL(finished()), this, SLOT(startPopThread()));
    connect(threada, SIGNAL(finished()), threada, SLOT(deleteLater()));
    threada->start();
}

void TestStack::startPushThread()
{
    auto *threadb = new PushThread();
    connect(threadb, SIGNAL(finished()), this, SLOT(startPushThread()));
    connect(threadb, SIGNAL(finished()), threadb, SLOT(deleteLater()));
    threadb->start();
}

TF_TEST_SQLLESS_MAIN(TestStack)
#include "main.moc"


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

<TITLE>
com.sgf.entities
</TITLE>

<META NAME="date" CONTENT="2012-09-17">

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

com.sgf.entities

Classes

Account

CategoryTotal

Movement


text:
<!DOCTYPE html>

  <meta charset='UTF-8'>
  <title>CSON API Documentation</title>
  <link rel='stylesheet' href='assets/biscotto.css' type='text/css'>

Mixin List

  Classes
  Methods
  Extras

        Search:
        <input type='text'>


text:
begin
  require "vagrant"
rescue LoadError
  raise "The Vagrant Saltdeps plugin must be run within Vagrant."
end

# This is a sanity check to make sure no one is attempting to install
# this into an early Vagrant version.
if Vagrant::VERSION < "1.2.0"
  raise "The Vagrant Saltdeps plugin is only compatible with Vagrant 1.2+"
end

module VagrantPlugins
  module Saltdeps
    class Plugin < Vagrant.plugin("2")
      name "saltdeps"
      description <<-DESC
      This plugin manages salt formula dependencies.
      DESC

      action_hook :basevagrant, :environment_load do |hook|
        require_relative './action.rb'
        hook.prepend(Vagrant::Saltdeps::Action)
      end

      config(:saltdeps, :provisioner) do
        require File.expand_path("../config/provisioner", __FILE__)
        Config::Provisioner
      end

      provisioner(:saltdeps) do
        # Return the provider
        require File.expand_path("../provisioner", __FILE__)
        Provisioner
      end

    end
  end
end


text:
<?php

namespace backend\models;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\models\PpaLaboratorium;

/**
 * PpaLaboratoriumSearch represents the model behind the search form about `backend\models\PpaLaboratorium`.
 */
class PpaLaboratoriumSearch extends PpaLaboratorium
{
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'ppa_technical_provision_id', 'created_by', 'created_at', 'updated_by', 'updated_at'], 'integer'],
            [['labor_name'], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function scenarios()
    {
        // bypass scenarios() implementation in the parent class
        return Model::scenarios();
    }

    /**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params)
    {
        $query = PpaLaboratorium::find();

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
            'ppa_technical_provision_id' => $this->ppa_technical_provision_id,
            'created_by' => $this->created_by,
            'created_at' => $this->created_at,
            'updated_by' => $this->updated_by,
            'updated_at' => $this->updated_at,
        ]);

        $query->andFilterWhere(['like', 'labor_name', $this->labor_name]);

        return $dataProvider;
    }
}


text:
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**preference** | [**V1NodeSelectorTerm**](V1NodeSelectorTerm.md) | A node selector term, associated with the corresponding weight. |
**weight** | **int** | Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


text:
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace MVVMexperiment
{
  public class MainPageModel : FrameworkElement
  {
    public static readonly DependencyProperty CurrentControlProperty =
        DependencyProperty.Register("CurrentControl", typeof(UserControl), typeof(MainPageModel),
        new PropertyMetadata(null));

    public UserControl CurrentControl
    {
      get { return (UserControl)GetValue(CurrentControlProperty); }
      set { SetValue(CurrentControlProperty, value); }
    }

    private static MainPageModel _main;

    public MainPageModel()
    {
      _main = this;
      CurrentControl = new ListPage();
    }

    public static void ShowForm(UserControl form)
    {
      _main.CurrentControl = form;
    }
  }
}


text:
define(['jimu/shared/BaseVersionManager'],
function(BaseVersionManager) {

  function VersionManager(){
    this.versions = [{
      version: '1.0',
      upgrader: function(oldConfig){
        return oldConfig;
      }
    },{
      version: '1.1',
      upgrader: function(oldConfig){
        var newConfig = oldConfig;

        var chart = null, types = null, colors = null, mode = null;
        var fixedMultiColors = ['#5d9cd3','#eb7b3a','#a5a5a5','#febf29','#4673c2','#72ad4c'];

        for(var i = 0; i < newConfig.charts.length; i++){
          chart = newConfig.charts[i];
          mode = chart.mode;
          types = chart.types;
          colors = chart.colors;
          delete chart.types;
          delete chart.colors;

          if(mode === 'feature' || mode === 'category'){
            if(chart.valueFields.length === 1){
              //if one field selected, should show single color section
              colors = [colors[0]];
            }
            else{
              //if none or more than two fields selected, should show multiple color section
              colors = fixedMultiColors;
            }
          }
          else{
            //chart only supports single color for count and field mode
            colors = [colors[0]];
          }

          if(types.indexOf('column') >= 0){
            chart.column = {
              horizontalAxis: true,
              verticalAxis: true,
              colors: colors
            };
          }
          if(types.indexOf('bar') >= 0){
            chart.bar = {
              horizontalAxis: true,
              verticalAxis: true,
              colors: colors
            };
          }
          if(types.indexOf('line') >= 0){
            chart.line = {
              horizontalAxis: true,
              verticalAxis: true,
              colors: colors
            };
          }
          if(types.indexOf('pie') >= 0){
            chart.pie = {
              label: true,
              colors: fixedMultiColors
            };
          }
        }

        return newConfig;
      }
    }];
  }

  VersionManager.prototype = new BaseVersionManager();
  VersionManager.prototype.constructor = VersionManager;
  return VersionManager;
});


text:
<ServerManagerConfiguration>
  <ProxyGroup name="writers">
    <WriterProxy name="GocadWriter" class="vtkGocadWriter" base_proxygroup="writers">

      <Documentation short_help="defines the interface for Gocad Polygonal Data writer.">This defines the interface for Gocad Polygonal Data writer.</Documentation>

      <InputProperty name="Input" command="SetInputConnection">
        <DataTypeDomain name="input_type" composite_data_supported="0">
          <DataType value="vtkPolyData" />
          <DataType value="vtkUnstructuredGrid" />
        </DataTypeDomain>
        <Documentation>This specifies the file type(s) supported by this writer.</Documentation>
      </InputProperty>
      <StringVectorProperty
        name="FileName"
        command="SetFileName"
        number_of_elements="1">
        <Documentation>
          The name of the file to be written.
        </Documentation>
      </StringVectorProperty>
      <IntVectorProperty
              name="X Axis"
              command="SetX_Axis"
              number_of_elements="1"
              default_values="1">
        <EnumerationDomain name="enum">
          <Entry value="1" text="Metres" />
          <Entry value="2" text="Feet" />
        </EnumerationDomain>
        <Documentation>
          Input X axis unit.
        </Documentation>
      </IntVectorProperty>
      <IntVectorProperty
              name="Y Axis"
              command="SetY_Axis"
              number_of_elements="1"
              default_values="1">
        <EnumerationDomain name="enum1">
          <Entry value="1" text="Metres" />
          <Entry value="2" text="Feet" />
        </EnumerationDomain>
        <Documentation>
          Input Y axis unit.
        </Documentation>
      </IntVectorProperty>
      <IntVectorProperty
              name="Z Axis"
              command="SetZ_Axis"
              number_of_elements="1"
              default_values="1">
        <EnumerationDomain name="enum2">
          <Entry value="1" text="Metres" />
          <Entry value="2" text="Feet" />
        </EnumerationDomain>
        <Documentation>
          Input Z axis unit.
        </Documentation>
      </IntVectorProperty>
      <Hints>
        <Property name="Input" show="0" />
        <Property name="FileName" show="0" />
      </Hints>

    </WriterProxy>

    <WriterProxy name="GocadCompositeWriter" class="vtkGocadCompositeWriter" base_proxygroup="writers">
      <Documentation short_help="defines the interface for Gocad Polygonal Data writer.">This defines the interface for Gocad Polygonal Data writer.</Documentation>
      <InputProperty name="Input" command="SetInputConnection">
        <DataTypeDomain name="input_type" composite_data_supported="1">
          <DataType value="vtkPolyData" />
          <DataType value="vtkImageData" />
          <DataType value="vtkUnstructuredGrid" />
          <DataType value="vtkMultiBlockDataSet" />
        </DataTypeDomain>
        <Documentation>This specifies the file type(s) supported by this writer.</Documentation>
      </InputProperty>
      <StringVectorProperty
        name="FileName"
        command="SetFileName"
        number_of_elements="1">
        <Documentation>
          The name of the file to be written.
        </Documentation>
      </StringVectorProperty>
      <IntVectorProperty
              name="X Axis"
              command="SetX_Axis"
              number_of_elements="1"
              default_values="1">
        <EnumerationDomain name="enum">
          <Entry value="1" text="Metres" />
          <Entry value="2" text="Feet" />
        </EnumerationDomain>
        <Documentation>
          Input X axis unit.
        </Documentation>
      </IntVectorProperty>
      <IntVectorProperty
              name="Y Axis"
              command="SetY_Axis"
              number_of_elements="1"
              default_values="1">
        <EnumerationDomain name="enum1">
          <Entry value="1" text="Metres" />
          <Entry value="2" text="Feet" />
        </EnumerationDomain>
        <Documentation>
          Input Y axis unit.
        </Documentation>
      </IntVectorProperty>
      <IntVectorProperty
              name="Z Axis"
              command="SetZ_Axis"
              number_of_elements="1"
              default_values="1">
        <EnumerationDomain name="enum2">
          <Entry value="1" text="Metres" />
          <Entry value="2" text="Feet" />
        </EnumerationDomain>
        <Documentation>
          Input Z axis unit.
        </Documentation>
      </IntVectorProperty>
      <Hints>
        <Property name="Input" show="0" />
        <Property name="FileName" show="0" />
      </Hints>

    </WriterProxy>

    <WriterProxy name="GocadVoxetWriter" class="vtkGocadVoxetWriter" base_proxygroup="writers">

      <Documentation short_help="defines the interface for Gocad Voxet writer.">This defines the interface for Gocad Voxet writer.</Documentation>

      <InputProperty name="Input" command="SetInputConnection">
        <DataTypeDomain name="input_type" composite_data_supported="0">
          <DataType value="vtkImageData" />
        </DataTypeDomain>
        <Documentation>This specifies the file type(s) supported by this writer.</Documentation>
      </InputProperty>
      <StringVectorProperty
        name="FileName"
        command="SetFileName"
        number_of_elements="1">
        <Documentation>
          The name of the file to be written.
        </Documentation>
      </StringVectorProperty>
      <IntVectorProperty
              name="X Axis"
              command="SetX_Axis"
              number_of_elements="1"
              default_values="1">
        <EnumerationDomain name="enum">
          <Entry value="1" text="Metres" />
          <Entry value="2" text="Feet" />
        </EnumerationDomain>
        <Documentation>
          Input X axis unit.
        </Documentation>
      </IntVectorProperty>
      <IntVectorProperty
              name="Y Axis"
              command="SetY_Axis"
              number_of_elements="1"
              default_values="1">
        <EnumerationDomain name="enum1">
          <Entry value="1" text="Metres" />
          <Entry value="2" text="Feet" />
        </EnumerationDomain>
        <Documentation>
          Input Y axis unit.
        </Documentation>
      </IntVectorProperty>
      <IntVectorProperty
              name="Z Axis"
              command="SetZ_Axis"
              number_of_elements="1"
              default_values="1">
        <EnumerationDomain name="enum2">
          <Entry value="1" text="Metres" />
          <Entry value="2" text="Feet" />
        </EnumerationDomain>
        <Documentation>
          Input Z axis unit.
        </Documentation>
      </IntVectorProperty>
      <Hints>
        <Property name="Input" show="0" />
        <Property name="FileName" show="0" />
      </Hints>

    </WriterProxy>

    <WriterProxy name="vtkSGeMSWriter" class="vtkSGeMSWriter" base_proxygroup="writers">

      <Documentation short_help="Writes data out in SGEMS format (initially, only pointsets)."></Documentation>

      <InputProperty name="Input" command="SetInputConnection">
        <DataTypeDomain name="input_type" composite_data_supported="1">
          <DataType value="vtkPolyData" />
          <DataType value="vtkImageData" />
        </DataTypeDomain>
        <Documentation>This specifies the file type(s) supported by this writer.</Documentation>
      </InputProperty>
      <StringVectorProperty
        name="FileName"
        command="SetFileName"
        number_of_elements="1">
        <Documentation>
          The name of the file to be written.
        </Documentation>
      </StringVectorProperty>
      <Hints>
        <Property name="Input" show="0" />
        <Property name="FileName" show="0" />
      </Hints>

    </WriterProxy>

    <WriterProxy name="vtkSOTWriter" class="vtkSOTWriter" base_proxygroup="writers">

      <Documentation short_help="Writes data out in SOT Queue format."></Documentation>

      <InputProperty name="Input" command="SetInputConnection">
       <DataTypeDomain name="input_type" composite_data_supported="1">
        <DataType value="vtkPolyData" />
        <DataType value="vtkImageData" />
        <DataType value="vtkDataSet" />
        </DataTypeDomain>
        <Documentation>This specifies the file type(s) supported by this writer.</Documentation>
        </InputProperty>
            <StringVectorProperty
              name="FileName"
              command="SetFileName"
              number_of_elements="1">
              <Documentation>
              The name of the file to be written.
              </Documentation>
            </StringVectorProperty>
       <Hints>
        <Property name="Input" show="0" />
        <Property name="FileName" show="0" />
        </Hints>
  </WriterProxy>

  <WriterProxy name="Map3dWriter" class="vtkMap3dWriter" base_proxygroup="writers">
  <!--Documentation short_help="defines the interface for Gocad Polygonal Data writer.">This defines the interface for Gocad Polygonal Data writer.</Documentation>-->
  <InputProperty
    name="Input"
    command="SetInputConnection">
    <ProxyGroupDomain name="groups">
      <Group name="sources"/>
      <Group name="filters"/>
    </ProxyGroupDomain>
    <DataTypeDomain name="input_type">
      <DataType value="vtkPolyData"/>
    </DataTypeDomain>
    <InputArrayDomain name="input_array_1">
    </InputArrayDomain>

    <InputArrayDomain name="input_array_2">
    </InputArrayDomain>
  </InputProperty>

  <StringVectorProperty
    name="SegmentID"
    command="SetSegmentID"
    number_of_elements="1"
    animateable="0"
    label="Segment ID">
    <ArrayListDomain name="array_list"
                     attribute_type="Scalars"
                    input_domain_name="input_array_1">
      <RequiredProperties>
        <Property name="Input" function="Input"/>
      </RequiredProperties>
    </ArrayListDomain>
    <Documentation>
      This property indicates the name of the block number array.
    </Documentation>
  </StringVectorProperty>

  <!--StringVectorProperty
  name="SegmentID"
  command="SetSegmentID"
  number_of_elements="1"
  label="Segment ID">
    <Documentation>
      This property indicates the name of the block number array.
    </Documentation>
  </StringVectorProperty-->

  <StringVectorProperty
        name="FileName"
        command="SetFileName"
        number_of_elements="1">
       <Documentation>
        The name of the file to be written.
        </Documentation>
      </StringVectorProperty>

  <IntVectorProperty name ="Type"
   command="SetType"
    number_of_elements="1"
    default_values="1">
    <IntRangeDomain name="range" min="0.0"/>
    <Documentation>
      Type specifies which type of boundary element to use:
      * Type=1 (Fictitious Force): For three-dimensional features such as excavations,
      alternate material zones, back-filled stopes etc...
      * Type=2 (Displacement Discontinuity) type elements should be used for tabular
      mining excavations, fractures and fault planes.
    </Documentation>
  </IntVectorProperty>

  <DoubleVectorProperty name="Thickness"
   command ="SetThickness"
   number_of_elements ="1"
   default_values ="0">
    <IntRangeDomain name="range" min="0.0"/>
    <Documentation>
      Thickness   This parameter is only used for type 2 (displacement discontinuity)
      elements, where it is used to specify the apparent thickness of the in-filling
      material (i.e. fault gouge, seam width, mining width or pillar height).
      Normal displacement (closure) of this feature when in-filled will be limited
      to this thickness. Also, the normal displacement (closure) and shear displacement (ride)
      are divided by the Thickness to determine the strain occurring in the in-filling material.
      This parameter should be specified in the same units that are used to specify the coordinate
      positions (i.e. metres or feet).
    </Documentation>
  </DoubleVectorProperty>

  <DoubleVectorProperty name="Width"
    command = "SetWidth"
    number_of_elements ="1"
    default_values="0">
    <IntRangeDomain name="range" min="0.0"/>
    <Documentation>
      Specifies the maximum width permitted.
    </Documentation>
  </DoubleVectorProperty>

  <IntVectorProperty name="WithActivities"
   command="SetWithActivities"
   number_of_elements="1"
   animateable="1"
   default_values="0">
    <BooleanDomain name="bool"/>
  </IntVectorProperty>

  <StringVectorProperty
    name="MiningBlk"
    command="SetMiningBlk"
    number_of_elements="1"
    animateable="0"
    label="Mining Block">
    <ArrayListDomain name="array_list"
                     attribute_type="Scalars"
                    input_domain_name="input_array_2">
      <RequiredProperties>
        <Property name="Input" function="Input"/>
      </RequiredProperties>
    </ArrayListDomain>
    <Documentation>
      This property indicates the name of the Mining Block array.
    </Documentation>
  </StringVectorProperty>

  <!--StringVectorProperty
    name="MiningBlk"
    command="SetMiningBlk"
    number_of_elements="1"
    label="Mining Block">
    <Documentation>
      This property indicates the name of the Mining Block array.
    </Documentation>
  </StringVectorProperty-->
  <Hints>
      <Property name="Input" show="0" />
      <Property name="FileName" show="0" />
      </Hints>
  </WriterProxy>

  </ProxyGroup>
</ServerManagerConfiguration>


text:
/**
 */
package gluemodel.CIM.IEC61970.Wires.impl;

import gluemodel.CIM.IEC61970.Core.impl.EquipmentImpl;

import gluemodel.CIM.IEC61970.Wires.HeatExchanger;
import gluemodel.CIM.IEC61970.Wires.PowerTransformer;
import gluemodel.CIM.IEC61970.Wires.WiresPackage;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 *
 * An implementation of the model object 'Heat Exchanger'.
 *
 *

 * The following features are implemented:
 *

 *

 *
{@link gluemodel.CIM.IEC61970.Wires.impl.HeatExchangerImpl#getPowerTransformer Power Transformer}

 *

 *
 * @generated
 */
public class HeatExchangerImpl extends EquipmentImpl implements HeatExchanger {
	/**
	 * The cached value of the '{@link #getPowerTransformer() Power Transformer}' reference.
	 *
	 *
	 * @see #getPowerTransformer()
	 * @generated
	 * @ordered
	 */
	protected PowerTransformer powerTransformer;

	/**
	 *
	 *
	 * @generated
	 */
	protected HeatExchangerImpl() {
		super();
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return WiresPackage.Literals.HEAT_EXCHANGER;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public PowerTransformer getPowerTransformer() {
		if (powerTransformer != null && powerTransformer.eIsProxy()) {
			InternalEObject oldPowerTransformer = (InternalEObject)powerTransformer;
			powerTransformer = (PowerTransformer)eResolveProxy(oldPowerTransformer);
			if (powerTransformer != oldPowerTransformer) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, WiresPackage.HEAT_EXCHANGER__POWER_TRANSFORMER, oldPowerTransformer, powerTransformer));
			}
		}
		return powerTransformer;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public PowerTransformer basicGetPowerTransformer() {
		return powerTransformer;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public NotificationChain basicSetPowerTransformer(PowerTransformer newPowerTransformer, NotificationChain msgs) {
		PowerTransformer oldPowerTransformer = powerTransformer;
		powerTransformer = newPowerTransformer;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WiresPackage.HEAT_EXCHANGER__POWER_TRANSFORMER, oldPowerTransformer, newPowerTransformer);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setPowerTransformer(PowerTransformer newPowerTransformer) {
		if (newPowerTransformer != powerTransformer) {
			NotificationChain msgs = null;
			if (powerTransformer != null)
				msgs = ((InternalEObject)powerTransformer).eInverseRemove(this, WiresPackage.POWER_TRANSFORMER__HEAT_EXCHANGER, PowerTransformer.class, msgs);
			if (newPowerTransformer != null)
				msgs = ((InternalEObject)newPowerTransformer).eInverseAdd(this, WiresPackage.POWER_TRANSFORMER__HEAT_EXCHANGER, PowerTransformer.class, msgs);
			msgs = basicSetPowerTransformer(newPowerTransformer, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, WiresPackage.HEAT_EXCHANGER__POWER_TRANSFORMER, newPowerTransformer, newPowerTransformer));
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case WiresPackage.HEAT_EXCHANGER__POWER_TRANSFORMER:
				if (powerTransformer != null)
					msgs = ((InternalEObject)powerTransformer).eInverseRemove(this, WiresPackage.POWER_TRANSFORMER__HEAT_EXCHANGER, PowerTransformer.class, msgs);
				return basicSetPowerTransformer((PowerTransformer)otherEnd, msgs);
		}
		return super.eInverseAdd(otherEnd, featureID, msgs);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case WiresPackage.HEAT_EXCHANGER__POWER_TRANSFORMER:
				return basicSetPowerTransformer(null, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case WiresPackage.HEAT_EXCHANGER__POWER_TRANSFORMER:
				if (resolve) return getPowerTransformer();
				return basicGetPowerTransformer();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case WiresPackage.HEAT_EXCHANGER__POWER_TRANSFORMER:
				setPowerTransformer((PowerTransformer)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case WiresPackage.HEAT_EXCHANGER__POWER_TRANSFORMER:
				setPowerTransformer((PowerTransformer)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case WiresPackage.HEAT_EXCHANGER__POWER_TRANSFORMER:
				return powerTransformer != null;
		}
		return super.eIsSet(featureID);
	}

} //HeatExchangerImpl


text:
```
	git clone https://github.com/gregodadone/spring-compraventa.git
	cd spring-compraventa
	mvn spring-boot:run
```

Despues ingresar a: http://localhost:8080/

## Como testear la REST API
Las entidades Vendedor y Especialidad soportan ABM por REST.
Es posible testear los servicios REST para especialidad-rest-controller y vendedor-rest-controller desde

http://localhost:8080/swagger-ui.html


text:
package org.apache.hadoop.hbase.quotas;

import static org.junit.Assert.assertEquals;

import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;

@Category({ SmallTests.class })
public class TestRegionSizeImpl {
  @ClassRule
  public static final HBaseClassTestRule CLASS_RULE =
    HBaseClassTestRule.forClass(TestRegionSizeImpl.class);

  @Test
  public void testReportingWithSizeChanges() {
    long currentSize = 1024L;
    RegionSizeImpl size = new RegionSizeImpl(currentSize);

    assertEquals(currentSize, size.getSize());

    currentSize *= 2L;
    size.setSize(currentSize);
    assertEquals(currentSize, size.getSize());

    long delta = 512L;
    currentSize += delta;
    size.incrementSize(delta);
    assertEquals(currentSize, size.getSize());
  }
}


text:
  <form class="login form-horizontal" action="/login" method="POST">

      Username

        <input id="username" type='user' name='user' value='admin'/>

      Password

        <input id="password" type='password', name='password', value='admin'/>

        <input class="btn btn-info" type='submit', value='Log in'/>

  </form>


text:
namespace ByTheCake
{
    using ByTheCakeApplication;
    using Server;
    using Server.Contracts;
    using Server.Routing;
    using Server.Routing.Contracts;

    public class Launcher : IRunnable
    {
        private WebServer webserver;

        public static void Main()
        {
            new Launcher().Run();
        }

        public void Run()
        {
            IApplication app = new ByTheCakeApp();
            IAppRouteConfig routeConfig = new AppRouteConfig();
            app.Configure(routeConfig);

            this.webserver = new WebServer(8230, routeConfig);
            this.webserver.Run();
        }
    }
}