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

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 *

 * Changes to a DB instance that are currently pending.
 *

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

    /**
     *

     * The new DB instance class for the DB instance.
     *

     */
    private String dbInstanceClass;
    /**
     *

     * The new value of the allocated storage for the DB instance.
     *

     */
    private Integer allocatedStorage;
    /**
     *

     * The new master user password for the DB instance.
     *

     */
    private String masterUserPassword;
    /**
     *

     * The new port for the DB instance.
     *

     */
    private Integer port;
    /**
     *

     * The new backup retention period for the DB instance.
     *

     */
    private Integer backupRetentionPeriod;
    /**
     *

     * Indicates that a single Availability Zone DB instance is changing to a multiple Availability Zone deployment.
     *

     */
    private Boolean multiAZ;
    /**
     *

     * The new engine version for the DB instance.
     *

     */
    private String engineVersion;
    /**
     *

     * The new license model value for the DB instance.
     *

     */
    private String licenseModel;
    /**
     *

     * The new provisioned IOPS value for the DB instance.
     *

     */
    private Integer iops;
    /**
     *

     * The new DB instance identifier for the DB instance.
     *

     */
    private String dbInstanceIdentifier;
    /**
     *

     * The new storage type for the DB instance.
     *

     */
    private String storageType;
    /**
     *

     * The new CA certificate identifier for the DB instance.
     *

     */
    private String caCertificateIdentifier;
    /**
     *

     * The name of the new subnet group for the DB instance.
     *

     */
    private String dbSubnetGroupName;
    /**
     *

     * A list of log types that are being enabled or disabled.
     *

     */
    private AwsRdsPendingCloudWatchLogsExports pendingCloudWatchLogsExports;
    /**
     *

     * Processor features that are being updated.
     *

     */
    private java.util.List<AwsRdsDbProcessorFeature> processorFeatures;

    /**
     *

     * The new DB instance class for the DB instance.
     *

     *
     * @param dbInstanceClass
     *        The new DB instance class for the DB instance.
     */

    public void setDbInstanceClass(String dbInstanceClass) {
        this.dbInstanceClass = dbInstanceClass;
    }

    /**
     *

     * The new DB instance class for the DB instance.
     *

     *
     * @return The new DB instance class for the DB instance.
     */

    public String getDbInstanceClass() {
        return this.dbInstanceClass;
    }

    /**
     *

     * The new DB instance class for the DB instance.
     *

     *
     * @param dbInstanceClass
     *        The new DB instance class for the DB instance.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withDbInstanceClass(String dbInstanceClass) {
        setDbInstanceClass(dbInstanceClass);
        return this;
    }

    /**
     *

     * The new value of the allocated storage for the DB instance.
     *

     *
     * @param allocatedStorage
     *        The new value of the allocated storage for the DB instance.
     */

    public void setAllocatedStorage(Integer allocatedStorage) {
        this.allocatedStorage = allocatedStorage;
    }

    /**
     *

     * The new value of the allocated storage for the DB instance.
     *

     *
     * @return The new value of the allocated storage for the DB instance.
     */

    public Integer getAllocatedStorage() {
        return this.allocatedStorage;
    }

    /**
     *

     * The new value of the allocated storage for the DB instance.
     *

     *
     * @param allocatedStorage
     *        The new value of the allocated storage for the DB instance.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withAllocatedStorage(Integer allocatedStorage) {
        setAllocatedStorage(allocatedStorage);
        return this;
    }

    /**
     *

     * The new master user password for the DB instance.
     *

     *
     * @param masterUserPassword
     *        The new master user password for the DB instance.
     */

    public void setMasterUserPassword(String masterUserPassword) {
        this.masterUserPassword = masterUserPassword;
    }

    /**
     *

     * The new master user password for the DB instance.
     *

     *
     * @return The new master user password for the DB instance.
     */

    public String getMasterUserPassword() {
        return this.masterUserPassword;
    }

    /**
     *

     * The new master user password for the DB instance.
     *

     *
     * @param masterUserPassword
     *        The new master user password for the DB instance.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withMasterUserPassword(String masterUserPassword) {
        setMasterUserPassword(masterUserPassword);
        return this;
    }

    /**
     *

     * The new port for the DB instance.
     *

     *
     * @param port
     *        The new port for the DB instance.
     */

    public void setPort(Integer port) {
        this.port = port;
    }

    /**
     *

     * The new port for the DB instance.
     *

     *
     * @return The new port for the DB instance.
     */

    public Integer getPort() {
        return this.port;
    }

    /**
     *

     * The new port for the DB instance.
     *

     *
     * @param port
     *        The new port for the DB instance.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withPort(Integer port) {
        setPort(port);
        return this;
    }

    /**
     *

     * The new backup retention period for the DB instance.
     *

     *
     * @param backupRetentionPeriod
     *        The new backup retention period for the DB instance.
     */

    public void setBackupRetentionPeriod(Integer backupRetentionPeriod) {
        this.backupRetentionPeriod = backupRetentionPeriod;
    }

    /**
     *

     * The new backup retention period for the DB instance.
     *

     *
     * @return The new backup retention period for the DB instance.
     */

    public Integer getBackupRetentionPeriod() {
        return this.backupRetentionPeriod;
    }

    /**
     *

     * The new backup retention period for the DB instance.
     *

     *
     * @param backupRetentionPeriod
     *        The new backup retention period for the DB instance.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withBackupRetentionPeriod(Integer backupRetentionPeriod) {
        setBackupRetentionPeriod(backupRetentionPeriod);
        return this;
    }

    /**
     *

     * Indicates that a single Availability Zone DB instance is changing to a multiple Availability Zone deployment.
     *

     *
     * @param multiAZ
     *        Indicates that a single Availability Zone DB instance is changing to a multiple Availability Zone
     *        deployment.
     */

    public void setMultiAZ(Boolean multiAZ) {
        this.multiAZ = multiAZ;
    }

    /**
     *

     * Indicates that a single Availability Zone DB instance is changing to a multiple Availability Zone deployment.
     *

     *
     * @return Indicates that a single Availability Zone DB instance is changing to a multiple Availability Zone
     *         deployment.
     */

    public Boolean getMultiAZ() {
        return this.multiAZ;
    }

    /**
     *

     * Indicates that a single Availability Zone DB instance is changing to a multiple Availability Zone deployment.
     *

     *
     * @param multiAZ
     *        Indicates that a single Availability Zone DB instance is changing to a multiple Availability Zone
     *        deployment.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withMultiAZ(Boolean multiAZ) {
        setMultiAZ(multiAZ);
        return this;
    }

    /**
     *

     * Indicates that a single Availability Zone DB instance is changing to a multiple Availability Zone deployment.
     *

     *
     * @return Indicates that a single Availability Zone DB instance is changing to a multiple Availability Zone
     *         deployment.
     */

    public Boolean isMultiAZ() {
        return this.multiAZ;
    }

    /**
     *

     * The new engine version for the DB instance.
     *

     *
     * @param engineVersion
     *        The new engine version for the DB instance.
     */

    public void setEngineVersion(String engineVersion) {
        this.engineVersion = engineVersion;
    }

    /**
     *

     * The new engine version for the DB instance.
     *

     *
     * @return The new engine version for the DB instance.
     */

    public String getEngineVersion() {
        return this.engineVersion;
    }

    /**
     *

     * The new engine version for the DB instance.
     *

     *
     * @param engineVersion
     *        The new engine version for the DB instance.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withEngineVersion(String engineVersion) {
        setEngineVersion(engineVersion);
        return this;
    }

    /**
     *

     * The new license model value for the DB instance.
     *

     *
     * @param licenseModel
     *        The new license model value for the DB instance.
     */

    public void setLicenseModel(String licenseModel) {
        this.licenseModel = licenseModel;
    }

    /**
     *

     * The new license model value for the DB instance.
     *

     *
     * @return The new license model value for the DB instance.
     */

    public String getLicenseModel() {
        return this.licenseModel;
    }

    /**
     *

     * The new license model value for the DB instance.
     *

     *
     * @param licenseModel
     *        The new license model value for the DB instance.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withLicenseModel(String licenseModel) {
        setLicenseModel(licenseModel);
        return this;
    }

    /**
     *

     * The new provisioned IOPS value for the DB instance.
     *

     *
     * @param iops
     *        The new provisioned IOPS value for the DB instance.
     */

    public void setIops(Integer iops) {
        this.iops = iops;
    }

    /**
     *

     * The new provisioned IOPS value for the DB instance.
     *

     *
     * @return The new provisioned IOPS value for the DB instance.
     */

    public Integer getIops() {
        return this.iops;
    }

    /**
     *

     * The new provisioned IOPS value for the DB instance.
     *

     *
     * @param iops
     *        The new provisioned IOPS value for the DB instance.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withIops(Integer iops) {
        setIops(iops);
        return this;
    }

    /**
     *

     * The new DB instance identifier for the DB instance.
     *

     *
     * @param dbInstanceIdentifier
     *        The new DB instance identifier for the DB instance.
     */

    public void setDbInstanceIdentifier(String dbInstanceIdentifier) {
        this.dbInstanceIdentifier = dbInstanceIdentifier;
    }

    /**
     *

     * The new DB instance identifier for the DB instance.
     *

     *
     * @return The new DB instance identifier for the DB instance.
     */

    public String getDbInstanceIdentifier() {
        return this.dbInstanceIdentifier;
    }

    /**
     *

     * The new DB instance identifier for the DB instance.
     *

     *
     * @param dbInstanceIdentifier
     *        The new DB instance identifier for the DB instance.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withDbInstanceIdentifier(String dbInstanceIdentifier) {
        setDbInstanceIdentifier(dbInstanceIdentifier);
        return this;
    }

    /**
     *

     * The new storage type for the DB instance.
     *

     *
     * @param storageType
     *        The new storage type for the DB instance.
     */

    public void setStorageType(String storageType) {
        this.storageType = storageType;
    }

    /**
     *

     * The new storage type for the DB instance.
     *

     *
     * @return The new storage type for the DB instance.
     */

    public String getStorageType() {
        return this.storageType;
    }

    /**
     *

     * The new storage type for the DB instance.
     *

     *
     * @param storageType
     *        The new storage type for the DB instance.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withStorageType(String storageType) {
        setStorageType(storageType);
        return this;
    }

    /**
     *

     * The new CA certificate identifier for the DB instance.
     *

     *
     * @param caCertificateIdentifier
     *        The new CA certificate identifier for the DB instance.
     */

    public void setCaCertificateIdentifier(String caCertificateIdentifier) {
        this.caCertificateIdentifier = caCertificateIdentifier;
    }

    /**
     *

     * The new CA certificate identifier for the DB instance.
     *

     *
     * @return The new CA certificate identifier for the DB instance.
     */

    public String getCaCertificateIdentifier() {
        return this.caCertificateIdentifier;
    }

    /**
     *

     * The new CA certificate identifier for the DB instance.
     *

     *
     * @param caCertificateIdentifier
     *        The new CA certificate identifier for the DB instance.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withCaCertificateIdentifier(String caCertificateIdentifier) {
        setCaCertificateIdentifier(caCertificateIdentifier);
        return this;
    }

    /**
     *

     * The name of the new subnet group for the DB instance.
     *

     *
     * @param dbSubnetGroupName
     *        The name of the new subnet group for the DB instance.
     */

    public void setDbSubnetGroupName(String dbSubnetGroupName) {
        this.dbSubnetGroupName = dbSubnetGroupName;
    }

    /**
     *

     * The name of the new subnet group for the DB instance.
     *

     *
     * @return The name of the new subnet group for the DB instance.
     */

    public String getDbSubnetGroupName() {
        return this.dbSubnetGroupName;
    }

    /**
     *

     * The name of the new subnet group for the DB instance.
     *

     *
     * @param dbSubnetGroupName
     *        The name of the new subnet group for the DB instance.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withDbSubnetGroupName(String dbSubnetGroupName) {
        setDbSubnetGroupName(dbSubnetGroupName);
        return this;
    }

    /**
     *

     * A list of log types that are being enabled or disabled.
     *

     *
     * @param pendingCloudWatchLogsExports
     *        A list of log types that are being enabled or disabled.
     */

    public void setPendingCloudWatchLogsExports(AwsRdsPendingCloudWatchLogsExports pendingCloudWatchLogsExports) {
        this.pendingCloudWatchLogsExports = pendingCloudWatchLogsExports;
    }

    /**
     *

     * A list of log types that are being enabled or disabled.
     *

     *
     * @return A list of log types that are being enabled or disabled.
     */

    public AwsRdsPendingCloudWatchLogsExports getPendingCloudWatchLogsExports() {
        return this.pendingCloudWatchLogsExports;
    }

    /**
     *

     * A list of log types that are being enabled or disabled.
     *

     *
     * @param pendingCloudWatchLogsExports
     *        A list of log types that are being enabled or disabled.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withPendingCloudWatchLogsExports(AwsRdsPendingCloudWatchLogsExports pendingCloudWatchLogsExports) {
        setPendingCloudWatchLogsExports(pendingCloudWatchLogsExports);
        return this;
    }

    /**
     *

     * Processor features that are being updated.
     *

     *
     * @return Processor features that are being updated.
     */

    public java.util.List<AwsRdsDbProcessorFeature> getProcessorFeatures() {
        return processorFeatures;
    }

    /**
     *

     * Processor features that are being updated.
     *

     *
     * @param processorFeatures
     *        Processor features that are being updated.
     */

    public void setProcessorFeatures(java.util.Collection<AwsRdsDbProcessorFeature> processorFeatures) {
        if (processorFeatures == null) {
            this.processorFeatures = null;
            return;
        }

        this.processorFeatures = new java.util.ArrayList<AwsRdsDbProcessorFeature>(processorFeatures);
    }

    /**
     *

     * Processor features that are being updated.
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setProcessorFeatures(java.util.Collection)} or {@link #withProcessorFeatures(java.util.Collection)} if
     * you want to override the existing values.
     *

     *
     * @param processorFeatures
     *        Processor features that are being updated.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withProcessorFeatures(AwsRdsDbProcessorFeature... processorFeatures) {
        if (this.processorFeatures == null) {
            setProcessorFeatures(new java.util.ArrayList<AwsRdsDbProcessorFeature>(processorFeatures.length));
        }
        for (AwsRdsDbProcessorFeature ele : processorFeatures) {
            this.processorFeatures.add(ele);
        }
        return this;
    }

    /**
     *

     * Processor features that are being updated.
     *

     *
     * @param processorFeatures
     *        Processor features that are being updated.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AwsRdsDbPendingModifiedValues withProcessorFeatures(java.util.Collection<AwsRdsDbProcessorFeature> processorFeatures) {
        setProcessorFeatures(processorFeatures);
        return this;
    }

    /**
     * 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 (getDbInstanceClass() != null)
            sb.append("DbInstanceClass: ").append(getDbInstanceClass()).append(",");
        if (getAllocatedStorage() != null)
            sb.append("AllocatedStorage: ").append(getAllocatedStorage()).append(",");
        if (getMasterUserPassword() != null)
            sb.append("MasterUserPassword: ").append(getMasterUserPassword()).append(",");
        if (getPort() != null)
            sb.append("Port: ").append(getPort()).append(",");
        if (getBackupRetentionPeriod() != null)
            sb.append("BackupRetentionPeriod: ").append(getBackupRetentionPeriod()).append(",");
        if (getMultiAZ() != null)
            sb.append("MultiAZ: ").append(getMultiAZ()).append(",");
        if (getEngineVersion() != null)
            sb.append("EngineVersion: ").append(getEngineVersion()).append(",");
        if (getLicenseModel() != null)
            sb.append("LicenseModel: ").append(getLicenseModel()).append(",");
        if (getIops() != null)
            sb.append("Iops: ").append(getIops()).append(",");
        if (getDbInstanceIdentifier() != null)
            sb.append("DbInstanceIdentifier: ").append(getDbInstanceIdentifier()).append(",");
        if (getStorageType() != null)
            sb.append("StorageType: ").append(getStorageType()).append(",");
        if (getCaCertificateIdentifier() != null)
            sb.append("CaCertificateIdentifier: ").append(getCaCertificateIdentifier()).append(",");
        if (getDbSubnetGroupName() != null)
            sb.append("DbSubnetGroupName: ").append(getDbSubnetGroupName()).append(",");
        if (getPendingCloudWatchLogsExports() != null)
            sb.append("PendingCloudWatchLogsExports: ").append(getPendingCloudWatchLogsExports()).append(",");
        if (getProcessorFeatures() != null)
            sb.append("ProcessorFeatures: ").append(getProcessorFeatures());
        sb.append("}");
        return sb.toString();
    }

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

        if (obj instanceof AwsRdsDbPendingModifiedValues == false)
            return false;
        AwsRdsDbPendingModifiedValues other = (AwsRdsDbPendingModifiedValues) obj;
        if (other.getDbInstanceClass() == null ^ this.getDbInstanceClass() == null)
            return false;
        if (other.getDbInstanceClass() != null && other.getDbInstanceClass().equals(this.getDbInstanceClass()) == false)
            return false;
        if (other.getAllocatedStorage() == null ^ this.getAllocatedStorage() == null)
            return false;
        if (other.getAllocatedStorage() != null && other.getAllocatedStorage().equals(this.getAllocatedStorage()) == false)
            return false;
        if (other.getMasterUserPassword() == null ^ this.getMasterUserPassword() == null)
            return false;
        if (other.getMasterUserPassword() != null && other.getMasterUserPassword().equals(this.getMasterUserPassword()) == false)
            return false;
        if (other.getPort() == null ^ this.getPort() == null)
            return false;
        if (other.getPort() != null && other.getPort().equals(this.getPort()) == false)
            return false;
        if (other.getBackupRetentionPeriod() == null ^ this.getBackupRetentionPeriod() == null)
            return false;
        if (other.getBackupRetentionPeriod() != null && other.getBackupRetentionPeriod().equals(this.getBackupRetentionPeriod()) == false)
            return false;
        if (other.getMultiAZ() == null ^ this.getMultiAZ() == null)
            return false;
        if (other.getMultiAZ() != null && other.getMultiAZ().equals(this.getMultiAZ()) == false)
            return false;
        if (other.getEngineVersion() == null ^ this.getEngineVersion() == null)
            return false;
        if (other.getEngineVersion() != null && other.getEngineVersion().equals(this.getEngineVersion()) == false)
            return false;
        if (other.getLicenseModel() == null ^ this.getLicenseModel() == null)
            return false;
        if (other.getLicenseModel() != null && other.getLicenseModel().equals(this.getLicenseModel()) == false)
            return false;
        if (other.getIops() == null ^ this.getIops() == null)
            return false;
        if (other.getIops() != null && other.getIops().equals(this.getIops()) == false)
            return false;
        if (other.getDbInstanceIdentifier() == null ^ this.getDbInstanceIdentifier() == null)
            return false;
        if (other.getDbInstanceIdentifier() != null && other.getDbInstanceIdentifier().equals(this.getDbInstanceIdentifier()) == false)
            return false;
        if (other.getStorageType() == null ^ this.getStorageType() == null)
            return false;
        if (other.getStorageType() != null && other.getStorageType().equals(this.getStorageType()) == false)
            return false;
        if (other.getCaCertificateIdentifier() == null ^ this.getCaCertificateIdentifier() == null)
            return false;
        if (other.getCaCertificateIdentifier() != null && other.getCaCertificateIdentifier().equals(this.getCaCertificateIdentifier()) == false)
            return false;
        if (other.getDbSubnetGroupName() == null ^ this.getDbSubnetGroupName() == null)
            return false;
        if (other.getDbSubnetGroupName() != null && other.getDbSubnetGroupName().equals(this.getDbSubnetGroupName()) == false)
            return false;
        if (other.getPendingCloudWatchLogsExports() == null ^ this.getPendingCloudWatchLogsExports() == null)
            return false;
        if (other.getPendingCloudWatchLogsExports() != null && other.getPendingCloudWatchLogsExports().equals(this.getPendingCloudWatchLogsExports()) == false)
            return false;
        if (other.getProcessorFeatures() == null ^ this.getProcessorFeatures() == null)
            return false;
        if (other.getProcessorFeatures() != null && other.getProcessorFeatures().equals(this.getProcessorFeatures()) == false)
            return false;
        return true;
    }

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

        hashCode = prime * hashCode + ((getDbInstanceClass() == null) ? 0 : getDbInstanceClass().hashCode());
        hashCode = prime * hashCode + ((getAllocatedStorage() == null) ? 0 : getAllocatedStorage().hashCode());
        hashCode = prime * hashCode + ((getMasterUserPassword() == null) ? 0 : getMasterUserPassword().hashCode());
        hashCode = prime * hashCode + ((getPort() == null) ? 0 : getPort().hashCode());
        hashCode = prime * hashCode + ((getBackupRetentionPeriod() == null) ? 0 : getBackupRetentionPeriod().hashCode());
        hashCode = prime * hashCode + ((getMultiAZ() == null) ? 0 : getMultiAZ().hashCode());
        hashCode = prime * hashCode + ((getEngineVersion() == null) ? 0 : getEngineVersion().hashCode());
        hashCode = prime * hashCode + ((getLicenseModel() == null) ? 0 : getLicenseModel().hashCode());
        hashCode = prime * hashCode + ((getIops() == null) ? 0 : getIops().hashCode());
        hashCode = prime * hashCode + ((getDbInstanceIdentifier() == null) ? 0 : getDbInstanceIdentifier().hashCode());
        hashCode = prime * hashCode + ((getStorageType() == null) ? 0 : getStorageType().hashCode());
        hashCode = prime * hashCode + ((getCaCertificateIdentifier() == null) ? 0 : getCaCertificateIdentifier().hashCode());
        hashCode = prime * hashCode + ((getDbSubnetGroupName() == null) ? 0 : getDbSubnetGroupName().hashCode());
        hashCode = prime * hashCode + ((getPendingCloudWatchLogsExports() == null) ? 0 : getPendingCloudWatchLogsExports().hashCode());
        hashCode = prime * hashCode + ((getProcessorFeatures() == null) ? 0 : getProcessorFeatures().hashCode());
        return hashCode;
    }

    @Override
    public AwsRdsDbPendingModifiedValues clone() {
        try {
            return (AwsRdsDbPendingModifiedValues) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

    @com.amazonaws.annotation.SdkInternalApi
    @Override
    public void marshall(ProtocolMarshaller protocolMarshaller) {
        com.amazonaws.services.securityhub.model.transform.AwsRdsDbPendingModifiedValuesMarshaller.getInstance().marshall(this, protocolMarshaller);
    }
}


text:
package com.stubbornjava.common;

import java.util.concurrent.TimeUnit;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.codahale.metrics.MetricFilter;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.graphite.GraphiteReporter;

import okhttp3.OkHttpClient;

// {{start:reporters}}
class MetricsReporters {
    private static final Logger log = LoggerFactory.getLogger(MetricsReporters.class);

    public static void startReporters(MetricRegistry registry) {
        // Graphite reporter to Grafana Cloud
        OkHttpClient client = new OkHttpClient.Builder()
            //.addNetworkInterceptor(HttpClient.getLoggingInterceptor())
            .build();

        if (!Configs.properties().hasPath("metrics.graphite.host")
            || !Configs.properties().hasPath("metrics.grafana.api_key")) {
            log.info("Missing metrics reporter key or host skipping");
            return;
        }

        String graphiteHost = Configs.properties().getString("metrics.graphite.host");
        String grafanaApiKey = Configs.properties().getString("metrics.grafana.api_key");
        final GraphiteHttpSender graphite = new GraphiteHttpSender(client, graphiteHost, grafanaApiKey);
        final GraphiteReporter reporter = GraphiteReporter.forRegistry(registry)
                                                          .prefixedWith(Metrics.metricPrefix("stubbornjava"))
                                                          .convertRatesTo(TimeUnit.MINUTES)
                                                          .convertDurationsTo(TimeUnit.MILLISECONDS)
                                                          .filter(MetricFilter.ALL)
                                                          .build(graphite);
        reporter.start(10, TimeUnit.SECONDS);
    }
}
// {{end:reporters}}

redpajama_set_name: RedPajamaGithub


text:
package opennlp.uima.util;

import java.util.Collection;
import java.util.LinkedList;

import org.apache.uima.cas.FSMatchConstraint;
import org.apache.uima.cas.FeatureStructure;
import org.apache.uima.cas.text.AnnotationFS;

/**
 * Checks if an AnnotationFS is contained by the given AnnotationFS.
 */
public final class ContainingConstraint implements FSMatchConstraint {
  private static final long serialVersionUID = 1;

  private Collection<AnnotationFS> mContainingAnnotations = new LinkedList<>();

  /**
   * Initializes a new instance.
   */
  public ContainingConstraint() {
    // does currently nothing
  }

  /**
   * Initializes a new instance.
   *
   * @param containingAnnotation
   */
  public ContainingConstraint(AnnotationFS containingAnnotation) {
    mContainingAnnotations.add(containingAnnotation);
  }

  /**
   * Checks if the given FeatureStructure match the constraint.
   */
  public boolean match(FeatureStructure featureStructure) {
    if (!(featureStructure instanceof AnnotationFS)) {
      return false;
    }

    AnnotationFS annotation = (AnnotationFS) featureStructure;

    for (AnnotationFS containingAnnotation : mContainingAnnotations) {
      if (isContaining(annotation, containingAnnotation)) {
        return true;
      }
    }

    return false;
  }

  private boolean isContaining(AnnotationFS annotation, AnnotationFS containing) {
    return (containing.getBegin() <= annotation.getBegin())
      && (containing.getEnd() >= annotation.getEnd());
  }

}


text:
#ifndef __DEBUGGER_IFACE_H__
#define __DEBUGGER_IFACE_H__

namespace debugger {

class IFace {
public:
    IFace(const char *name) : ifname_(name) {}
    virtual ~IFace() {}

    /** Get brief information. */
    virtual const char *getBrief() { return "Brief info not defined"; }

    /** Get detailed description. */
    virtual const char *getDetail() { return "Detail info not defined"; }

    /** Get interface name. */
    const char *getFaceName() { return ifname_; }

protected:
    const char *ifname_;
};

}  // namespace debugger

#endif  // __DEBUGGER_IFACE_H__


text:
package promotion

import (
	"github.com/chanxuehong/wechat.v2/mch/core"
)

// 查询代金券信息.
func QueryCoupon(clt *core.Client, req map[string]string) (resp map[string]string, err error) {
	return clt.PostXML("https://api.mch.weixin.qq.com/promotion/query_coupon", req)
}


text:
from django.conf.urls import url, include
from django.http import HttpResponse

from wagtailsystemtext.utils import systemtext_lazy as _st

def headline_view(request):
    return HttpResponse(_st('title'))

urlpatterns = [
    url('^test-title$', headline_view, name='headline_view'),
]


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description"
          content="Een jaarlijks totaalspektakel georganiseerd door studenten Ingenieurswetenschappen van de KU Leuven.">
    <meta name="author" content="VTK Revue">

    <title>VTK Revue - Welcome</title>
    <link rel="icon" href="favicon.ico" type="image/x-icon"/>
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>

    <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">

    <link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800'
          rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic,900,900italic'
          rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css" type="text/css">

    <link rel="stylesheet" href="css/animate.min.css" type="text/css">

    <link rel="stylesheet" href="css/creative.css" type="text/css">
    <link rel="stylesheet" href="css/timeline.css" type="text/css">

            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1">
                Toggle navigation

            </button>
            VTK Revue

                    About Us

                    Revue Presents

                    Portfolio

                    Contact

Revue

Iedereen Decaan: 12-13-14 maart 2018 om 20 uur in OPEK, Leuven.

            Over ons
            Revue 2018

U zegt? Revue?

Wie kent Revue van VTK nog niet? Al meer dan 50 jaar staat er
                    een grote ploeg
                    VTK-leden klaar om dit totaalspektakel te organiseren. Vorig academiejaar waren
                    er meer dan 60 (!)
                    mensen in de weer om Revue 2017 in goede banen te leiden. Niet verwonderlijk
                    natuurlijk als je weet
                    dat deze show elk jaar terug vanaf nul opgebouwd moet worden. De teksten worden
                    zelf gesgreven
                    (sic), het decor wordt ineengeknutseld, de kostuums worden bijeengestikt, de
                    dansjes worden
                    verzonnen en zelfs de muziek wordt zelf opnieuw geschreven. Op en top hand-made
                    studentenwerk dus.
                    Ook dit jaar kijken we er weer naar uit jullie een fantastische Revue 2018 voor
                    te mogen
                    schotelen!

                Waar kan ik tickets
                    kopen?

Voorstellingen Revue 2018

                                Revue 2018 presenteert:

                                Iedereen Decaan

Tickets?

Tickets worden vanaf 26 februari 2018 elke weekdag 's middags tussen 12.45 en
                    13.45 uur verkocht in het Theokot en onder Alma 3 zo lang de voorraad
                    strekt!

Wanneer?

Op 12, 13 en 14 maart 2018. Deuren openen telkens om 20 uur.

Waar?

OPEK, Vaartkom 4, 3000 Leuven

Portfolio

Revue bracht ons al:

Maart 2017

Alice in Burgieland

Februari/Maart 2016

The Backstreet Burgies

Maart 2015

The Pest Is Yet To Come

Maart 2014

In Creemers' Fields

December 2013

Dierckx Never Dies

Stay

Tuned

For More!

Vind ons op...

Wil jij ook op de planken staan? Heb je een creatieve pen? Altijd al eens met
                    knopjes willen werken
                    voor klank en licht? Of toch liever gewoon ondersteuning met IT of promo?
                    Iedereen is welkom. En
                    mischien wil jij ons ook wel komen helpen! Laat van je horen:

                        Facebook

                        revue@vtk.be

                        YouTube


text:
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <errno.h>

#include "py/nlr.h"
#include "py/objtuple.h"
#include "py/objstr.h"
#include "py/runtime.h"
#include "py/stream.h"
#include "py/builtin.h"

/*
  The idea of this module is to implement reasonable minimum of
  socket-related functions to write typical clients and servers.
  The module named "usocket" on purpose, to allow to make
  Python-level module more (or fully) compatible with CPython
  "socket", e.g.:
  ---- socket.py ----
  from usocket import *
  from socket_more_funcs import *
  from socket_more_funcs2 import *
  -------------------
  I.e. this module should stay lean, and more functions (if needed)
  should be add to seperate modules (C or Python level).
 */

#define MICROPY_SOCKET_EXTRA (0)

typedef struct _mp_obj_socket_t {
    mp_obj_base_t base;
    int fd;
} mp_obj_socket_t;

STATIC const mp_obj_type_t usocket_type;

// Helper functions
#define RAISE_ERRNO(err_flag, error_val) \
    { if (err_flag == -1) \
        { nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(error_val))); } }

static inline mp_obj_t mp_obj_from_sockaddr(const struct sockaddr *addr, socklen_t len) {
    return mp_obj_new_bytes((const byte *)addr, len);
}

STATIC mp_obj_socket_t *socket_new(int fd) {
    mp_obj_socket_t *o = m_new_obj(mp_obj_socket_t);
    o->base.type = &usocket_type;
    o->fd = fd;
    return o;
}

STATIC void socket_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
    (void)kind;
    mp_obj_socket_t *self = self_in;
    mp_printf(print, "<_socket %d>", self->fd);
}

STATIC mp_uint_t socket_read(mp_obj_t o_in, void *buf, mp_uint_t size, int *errcode) {
    mp_obj_socket_t *o = o_in;
    mp_int_t r = read(o->fd, buf, size);
    if (r == -1) {
        *errcode = errno;
        return MP_STREAM_ERROR;
    }
    return r;
}

STATIC mp_uint_t socket_write(mp_obj_t o_in, const void *buf, mp_uint_t size, int *errcode) {
    mp_obj_socket_t *o = o_in;
    mp_int_t r = write(o->fd, buf, size);
    if (r == -1) {
        *errcode = errno;
        return MP_STREAM_ERROR;
    }
    return r;
}

STATIC mp_obj_t socket_close(mp_obj_t self_in) {
    mp_obj_socket_t *self = self_in;
    close(self->fd);
    return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(socket_close_obj, socket_close);

STATIC mp_obj_t socket_fileno(mp_obj_t self_in) {
    mp_obj_socket_t *self = self_in;
    return MP_OBJ_NEW_SMALL_INT(self->fd);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(socket_fileno_obj, socket_fileno);

STATIC mp_obj_t socket_connect(mp_obj_t self_in, mp_obj_t addr_in) {
    mp_obj_socket_t *self = self_in;
    mp_buffer_info_t bufinfo;
    mp_get_buffer_raise(addr_in, &bufinfo, MP_BUFFER_READ);
    int r = connect(self->fd, (const struct sockaddr *)bufinfo.buf, bufinfo.len);
    RAISE_ERRNO(r, errno);
    return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_connect_obj, socket_connect);

STATIC mp_obj_t socket_bind(mp_obj_t self_in, mp_obj_t addr_in) {
    mp_obj_socket_t *self = self_in;
    mp_buffer_info_t bufinfo;
    mp_get_buffer_raise(addr_in, &bufinfo, MP_BUFFER_READ);
    int r = bind(self->fd, (const struct sockaddr *)bufinfo.buf, bufinfo.len);
    RAISE_ERRNO(r, errno);
    return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_bind_obj, socket_bind);

STATIC mp_obj_t socket_listen(mp_obj_t self_in, mp_obj_t backlog_in) {
    mp_obj_socket_t *self = self_in;
    int r = listen(self->fd, MP_OBJ_SMALL_INT_VALUE(backlog_in));
    RAISE_ERRNO(r, errno);
    return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_listen_obj, socket_listen);

STATIC mp_obj_t socket_accept(mp_obj_t self_in) {
    mp_obj_socket_t *self = self_in;
    struct sockaddr addr;
    socklen_t addr_len = sizeof(addr);
    int fd = accept(self->fd, &addr, &addr_len);
    RAISE_ERRNO(fd, errno);

    mp_obj_tuple_t *t = mp_obj_new_tuple(2, NULL);
    t->items[0] = socket_new(fd);
    t->items[1] = mp_obj_new_bytearray(addr_len, &addr);

    return t;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(socket_accept_obj, socket_accept);

// Note: besides flag param, this differs from read() in that
// this does not swallow blocking errors (EAGAIN, EWOULDBLOCK) -
// these would be thrown as exceptions.
STATIC mp_obj_t socket_recv(mp_uint_t n_args, const mp_obj_t *args) {
    mp_obj_socket_t *self = args[0];
    int sz = MP_OBJ_SMALL_INT_VALUE(args[1]);
    int flags = 0;

    if (n_args > 2) {
        flags = MP_OBJ_SMALL_INT_VALUE(args[2]);
    }

    byte *buf = m_new(byte, sz);
    int out_sz = recv(self->fd, buf, sz, flags);
    RAISE_ERRNO(out_sz, errno);

    mp_obj_t ret = mp_obj_new_str_of_type(&mp_type_bytes, buf, out_sz);
    m_del(char, buf, sz);
    return ret;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_recv_obj, 2, 3, socket_recv);

STATIC mp_obj_t socket_recvfrom(mp_uint_t n_args, const mp_obj_t *args) {
    mp_obj_socket_t *self = args[0];
    int sz = MP_OBJ_SMALL_INT_VALUE(args[1]);
    int flags = 0;

    if (n_args > 2) {
        flags = MP_OBJ_SMALL_INT_VALUE(args[2]);
    }

    struct sockaddr_storage addr;
    socklen_t addr_len = sizeof(addr);

    byte *buf = m_new(byte, sz);
    int out_sz = recvfrom(self->fd, buf, sz, flags, (struct sockaddr*)&addr, &addr_len);
    RAISE_ERRNO(out_sz, errno);

    mp_obj_t buf_o = mp_obj_new_str_of_type(&mp_type_bytes, buf, out_sz);
    m_del(char, buf, sz);

    mp_obj_tuple_t *t = mp_obj_new_tuple(2, NULL);
    t->items[0] = buf_o;
    t->items[1] = mp_obj_from_sockaddr((struct sockaddr*)&addr, addr_len);

    return t;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_recvfrom_obj, 2, 3, socket_recvfrom);

// Note: besides flag param, this differs from write() in that
// this does not swallow blocking errors (EAGAIN, EWOULDBLOCK) -
// these would be thrown as exceptions.
STATIC mp_obj_t socket_send(mp_uint_t n_args, const mp_obj_t *args) {
    mp_obj_socket_t *self = args[0];
    int flags = 0;

    if (n_args > 2) {
        flags = MP_OBJ_SMALL_INT_VALUE(args[2]);
    }

    mp_buffer_info_t bufinfo;
    mp_get_buffer_raise(args[1], &bufinfo, MP_BUFFER_READ);
    int out_sz = send(self->fd, bufinfo.buf, bufinfo.len, flags);
    RAISE_ERRNO(out_sz, errno);

    return MP_OBJ_NEW_SMALL_INT(out_sz);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_send_obj, 2, 3, socket_send);

STATIC mp_obj_t socket_sendto(mp_uint_t n_args, const mp_obj_t *args) {
    mp_obj_socket_t *self = args[0];
    int flags = 0;

    mp_obj_t dst_addr = args[2];
    if (n_args > 3) {
        flags = MP_OBJ_SMALL_INT_VALUE(args[2]);
        dst_addr = args[3];
    }

    mp_buffer_info_t bufinfo, addr_bi;
    mp_get_buffer_raise(args[1], &bufinfo, MP_BUFFER_READ);
    mp_get_buffer_raise(dst_addr, &addr_bi, MP_BUFFER_READ);
    int out_sz = sendto(self->fd, bufinfo.buf, bufinfo.len, flags,
                        (struct sockaddr *)addr_bi.buf, addr_bi.len);
    RAISE_ERRNO(out_sz, errno);

    return MP_OBJ_NEW_SMALL_INT(out_sz);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_sendto_obj, 3, 4, socket_sendto);

STATIC mp_obj_t socket_setsockopt(mp_uint_t n_args, const mp_obj_t *args) {
    (void)n_args; // always 4
    mp_obj_socket_t *self = args[0];
    int level = MP_OBJ_SMALL_INT_VALUE(args[1]);
    int option = mp_obj_get_int(args[2]);

    const void *optval;
    socklen_t optlen;
    int val;
    if (MP_OBJ_IS_INT(args[3])) {
        val = mp_obj_int_get_truncated(args[3]);
        optval = &val;
        optlen = sizeof(val);
    } else {
        mp_buffer_info_t bufinfo;
        mp_get_buffer_raise(args[3], &bufinfo, MP_BUFFER_READ);
        optval = bufinfo.buf;
        optlen = bufinfo.len;
    }
    int r = setsockopt(self->fd, level, option, optval, optlen);
    RAISE_ERRNO(r, errno);
    return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_setsockopt_obj, 4, 4, socket_setsockopt);

STATIC mp_obj_t socket_setblocking(mp_obj_t self_in, mp_obj_t flag_in) {
    mp_obj_socket_t *self = self_in;
    int val = mp_obj_is_true(flag_in);
    int flags = fcntl(self->fd, F_GETFL, 0);
    RAISE_ERRNO(flags, errno);
    if (val) {
        flags &= ~O_NONBLOCK;
    } else {
        flags |= O_NONBLOCK;
    }
    flags = fcntl(self->fd, F_SETFL, flags);
    RAISE_ERRNO(flags, errno);
    return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_setblocking_obj, socket_setblocking);

STATIC mp_obj_t socket_makefile(mp_uint_t n_args, const mp_obj_t *args) {
    // TODO: CPython explicitly says that closing returned object doesn't close
    // the original socket (Python2 at all says that fd is dup()ed). But we
    // save on the bloat.
    mp_obj_socket_t *self = args[0];
    mp_obj_t *new_args = alloca(n_args * sizeof(mp_obj_t));
    memcpy(new_args + 1, args + 1, (n_args - 1) * sizeof(mp_obj_t));
    new_args[0] = MP_OBJ_NEW_SMALL_INT(self->fd);
    mp_map_t kwargs;
    mp_map_init(&kwargs, 0);
    return mp_builtin_open(n_args, new_args, &kwargs);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_makefile_obj, 1, 3, socket_makefile);

STATIC mp_obj_t socket_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
    (void)type_in;
    (void)n_kw;

    int family = AF_INET;
    int type = SOCK_STREAM;
    int proto = 0;

    if (n_args > 0) {
        assert(MP_OBJ_IS_SMALL_INT(args[0]));
        family = MP_OBJ_SMALL_INT_VALUE(args[0]);
        if (n_args > 1) {
            assert(MP_OBJ_IS_SMALL_INT(args[1]));
            type = MP_OBJ_SMALL_INT_VALUE(args[1]);
            if (n_args > 2) {
                assert(MP_OBJ_IS_SMALL_INT(args[2]));
                proto = MP_OBJ_SMALL_INT_VALUE(args[2]);
            }
        }
    }

    int fd = socket(family, type, proto);
    RAISE_ERRNO(fd, errno);
    return socket_new(fd);
}

STATIC const mp_map_elem_t usocket_locals_dict_table[] = {
    { MP_OBJ_NEW_QSTR(MP_QSTR_fileno), (mp_obj_t)&socket_fileno_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_makefile), (mp_obj_t)&socket_makefile_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_read), (mp_obj_t)&mp_stream_read_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_readall), (mp_obj_t)&mp_stream_readall_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_readinto), (mp_obj_t)&mp_stream_readinto_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_readline), (mp_obj_t)&mp_stream_unbuffered_readline_obj},
    { MP_OBJ_NEW_QSTR(MP_QSTR_write), (mp_obj_t)&mp_stream_write_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_connect), (mp_obj_t)&socket_connect_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_bind), (mp_obj_t)&socket_bind_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_listen), (mp_obj_t)&socket_listen_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_accept), (mp_obj_t)&socket_accept_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_recv), (mp_obj_t)&socket_recv_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_recvfrom), (mp_obj_t)&socket_recvfrom_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_send), (mp_obj_t)&socket_send_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_sendto), (mp_obj_t)&socket_sendto_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_setsockopt), (mp_obj_t)&socket_setsockopt_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_setblocking), (mp_obj_t)&socket_setblocking_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_close), (mp_obj_t)&socket_close_obj },
};

STATIC MP_DEFINE_CONST_DICT(usocket_locals_dict, usocket_locals_dict_table);

STATIC const mp_stream_p_t usocket_stream_p = {
    .read = socket_read,
    .write = socket_write,
};

STATIC const mp_obj_type_t usocket_type = {
    { &mp_type_type },
    .name = MP_QSTR_socket,
    .print = socket_print,
    .make_new = socket_make_new,
    .getiter = NULL,
    .iternext = NULL,
    .stream_p = &usocket_stream_p,
    .locals_dict = (mp_obj_t)&usocket_locals_dict,
};

#if MICROPY_SOCKET_EXTRA
STATIC mp_obj_t mod_socket_htons(mp_obj_t arg) {
    return MP_OBJ_NEW_SMALL_INT(htons(MP_OBJ_SMALL_INT_VALUE(arg)));
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_socket_htons_obj, mod_socket_htons);

STATIC mp_obj_t mod_socket_gethostbyname(mp_obj_t arg) {
    assert(MP_OBJ_IS_TYPE(arg, &mp_type_str));
    const char *s = mp_obj_str_get_str(arg);
    struct hostent *h = gethostbyname(s);
    if (h == NULL) {
        // CPython: socket.herror
        nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(h_errno)));
    }
    assert(h->h_length == 4);
    return mp_obj_new_int(*(int*)*h->h_addr_list);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_socket_gethostbyname_obj, mod_socket_gethostbyname);
#endif // MICROPY_SOCKET_EXTRA

#define BINADDR_MAX_LEN sizeof(struct in6_addr)
STATIC mp_obj_t mod_socket_inet_pton(mp_obj_t family_in, mp_obj_t addr_in) {
    int family = mp_obj_get_int(family_in);
    byte binaddr[BINADDR_MAX_LEN];
    int r = inet_pton(family, mp_obj_str_get_str(addr_in), binaddr);
    RAISE_ERRNO(r, errno);
    if (r == 0) {
        nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(EINVAL)));
    }
    int binaddr_len = 0;
    switch (family) {
        case AF_INET:
            binaddr_len = sizeof(struct in_addr);
            break;
        case AF_INET6:
            binaddr_len = sizeof(struct in6_addr);
            break;
    }
    return mp_obj_new_bytes(binaddr, binaddr_len);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_socket_inet_pton_obj, mod_socket_inet_pton);

STATIC mp_obj_t mod_socket_getaddrinfo(mp_uint_t n_args, const mp_obj_t *args) {
    // TODO: Implement all args
    assert(n_args >= 2 && n_args <= 4);
    assert(MP_OBJ_IS_STR(args[0]));

    const char *host = mp_obj_str_get_str(args[0]);
    const char *serv = NULL;
    struct addrinfo hints;
    char buf[6];
    memset(&hints, 0, sizeof(hints));
    // getaddrinfo accepts port in string notation, so however
    // it may seem stupid, we need to convert int to str
    if (MP_OBJ_IS_SMALL_INT(args[1])) {
        unsigned port = (unsigned short)MP_OBJ_SMALL_INT_VALUE(args[1]);
        sprintf(buf, "%u", port);
        serv = buf;
        hints.ai_flags = AI_NUMERICSERV;
#ifdef __UCLIBC_MAJOR__
#if __UCLIBC_MAJOR__ == 0 && (__UCLIBC_MINOR__ < 9 || (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 32))
// "warning" requires -Wno-cpp which is a relatively new gcc option, so we choose not to use it.
//#warning Working around uClibc bug with numeric service name
        // Older versions og uClibc have bugs when numeric ports in service
        // arg require also hints.ai_socktype (or hints.ai_protocol) != 0
        // This actually was fixed in 0.9.32.1, but uClibc doesn't allow to
        // test for that.
        // http://git.uclibc.org/uClibc/commit/libc/inet/getaddrinfo.c?id=bc3be18145e4d5
        // Note that this is crude workaround, precluding UDP socket addresses
        // to be returned. TODO: set only if not set by Python args.
        hints.ai_socktype = SOCK_STREAM;
#endif
#endif
    } else {
        serv = mp_obj_str_get_str(args[1]);
    }

    if (n_args > 2) {
        hints.ai_family = MP_OBJ_SMALL_INT_VALUE(args[2]);
        if (n_args > 3) {
            hints.ai_socktype = MP_OBJ_SMALL_INT_VALUE(args[3]);
        }
    }

    struct addrinfo *addr_list;
    int res = getaddrinfo(host, serv, &hints, &addr_list);

    if (res != 0) {
        // CPython: socket.gaierror
        nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_OSError, "[addrinfo error %d]", res));
    }
    assert(addr_list);

    mp_obj_t list = mp_obj_new_list(0, NULL);
    for (struct addrinfo *addr = addr_list; addr; addr = addr->ai_next) {
        mp_obj_tuple_t *t = mp_obj_new_tuple(5, NULL);
        t->items[0] = MP_OBJ_NEW_SMALL_INT(addr->ai_family);
        t->items[1] = MP_OBJ_NEW_SMALL_INT(addr->ai_socktype);
        t->items[2] = MP_OBJ_NEW_SMALL_INT(addr->ai_protocol);
        // "canonname will be a string representing the canonical name of the host
        // if AI_CANONNAME is part of the flags argument; else canonname will be empty." ??
        if (addr->ai_canonname) {
            t->items[3] = MP_OBJ_NEW_QSTR(qstr_from_str(addr->ai_canonname));
        } else {
            t->items[3] = mp_const_none;
        }
        t->items[4] = mp_obj_new_bytearray(addr->ai_addrlen, addr->ai_addr);
        mp_obj_list_append(list, t);
    }
    freeaddrinfo(addr_list);
    return list;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_socket_getaddrinfo_obj, 2, 6, mod_socket_getaddrinfo);

extern mp_obj_type_t sockaddr_in_type;

STATIC const mp_map_elem_t mp_module_socket_globals_table[] = {
    { MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_usocket) },
    { MP_OBJ_NEW_QSTR(MP_QSTR_socket), (mp_obj_t)&usocket_type },
    { MP_OBJ_NEW_QSTR(MP_QSTR_getaddrinfo), (mp_obj_t)&mod_socket_getaddrinfo_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_inet_pton), (mp_obj_t)&mod_socket_inet_pton_obj },
#if MICROPY_SOCKET_EXTRA
    { MP_OBJ_NEW_QSTR(MP_QSTR_sockaddr_in), (mp_obj_t)&sockaddr_in_type },
    { MP_OBJ_NEW_QSTR(MP_QSTR_htons), (mp_obj_t)&mod_socket_htons_obj },
    { MP_OBJ_NEW_QSTR(MP_QSTR_gethostbyname), (mp_obj_t)&mod_socket_gethostbyname_obj },
#endif

#define C(name) { MP_OBJ_NEW_QSTR(MP_QSTR_ ## name), MP_OBJ_NEW_SMALL_INT(name) }
    C(AF_UNIX),
    C(AF_INET),
    C(AF_INET6),
    C(SOCK_STREAM),
    C(SOCK_DGRAM),
    C(SOCK_RAW),

    C(MSG_DONTROUTE),
    C(MSG_DONTWAIT),

    C(SOL_SOCKET),
    C(SO_BROADCAST),
    C(SO_ERROR),
    C(SO_KEEPALIVE),
    C(SO_LINGER),
    C(SO_REUSEADDR),
#undef C
};

STATIC MP_DEFINE_CONST_DICT(mp_module_socket_globals, mp_module_socket_globals_table);

const mp_obj_module_t mp_module_socket = {
    .base = { &mp_type_module },
    .name = MP_QSTR_usocket,
    .globals = (mp_obj_dict_t*)&mp_module_socket_globals,
};


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

    Jakarta Bean Validation TCK

    License: Apache License, Version 2.0
    See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.

-->
<constraint-mappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="https://jakarta.ee/xml/ns/validation/mapping validation-mapping-3.0.xsd"
                     xmlns="https://jakarta.ee/xml/ns/validation/mapping"
                     version="3.0">
    <default-package>org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.clazzlevel</default-package>
    <bean class="Package">
        <class ignore-annotations="false">
            <constraint annotation="org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.clazzlevel.ValidPackage">
                <message>ValidPackage defined in XML</message>
                <groups>
                    <value>org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.clazzlevel.PrePosting
                    </value>
                </groups>
            </constraint>
        </class>
    </bean>
</constraint-mappings>


text:
tinyMCE.addToLang('xhtmlxtras',{
cite_desc : 'Citation',
abbr_desc : 'Abbreviation',
acronym_desc : 'Acronym',
del_desc : 'Deletion',
ins_desc : 'Insertion',
attribute_label_title : 'Title',
attribute_label_id : 'ID',
attribute_label_class : 'Class',
attribute_label_style : 'Style',
attribute_label_cite : 'Cite',
attribute_label_datetime : 'Date/Time',
attribute_label_langdir : 'Text Direction',
attribute_option_ltr : 'Left to right',
attribute_option_rtl : 'Right to left',
attribute_label_langcode : 'Language',
attribute_label_tabindex : 'TabIndex',
attribute_label_accesskey : 'AccessKey',
attribute_label_cite : 'Cite',
attribute_events_tab : 'Events',
attribute_attrib_tab : 'Attributes',
general_tab : 'General',
attrib_tab : 'Attributes',
events_tab : 'Events',
fieldset_general_tab : 'General Settings',
fieldset_attrib_tab : 'Element Attributes',
fieldset_events_tab : 'Element Events',
title_ins_element : 'Insertion Element',
title_del_element : 'Deletion Element',
title_acronym_element : 'Acronym Element',
title_abbr_element : 'Abbreviation Element',
title_cite_element : 'Citation Element',
remove : 'Remove',
not_set : '--not set--',
insert_date : 'Insert current date/time',
option_ltr : 'Left to right',
option_rtl : 'Right to left',
attribs_desc : 'Insert/Edit Attributes',
attribs_title : 'Insert/Edit Attributes'
});


text:
require 'helper'

describe 'failover' do

  describe 'timeouts' do
    it 'not lead to corrupt sockets' do
      memcached(29125) do
        dc = Dalli::Client.new ['localhost:29125']
        begin
          Timeout.timeout 0.01 do
            1_000.times do
              dc.set("test_123", {:test => "123"})
            end
            flunk("Did not timeout")
          end
        rescue Timeout::Error
        end

        assert_equal({:test => '123'}, dc.get("test_123"))
      end
    end
  end

  describe 'assuming some bad servers' do

    it 'silently reconnect if server hiccups' do
      memcached(29125) do
        dc = Dalli::Client.new ['localhost:29125']
        dc.set 'foo', 'bar'
        foo = dc.get 'foo'
        assert_equal foo, 'bar'

        memcached_kill(29125)
        memcached(29125) do

          foo = dc.get 'foo'
          assert_nil foo

          memcached_kill(29125)
        end
      end
    end

    it 'handle graceful failover' do
      memcached(29125) do
        memcached(29126) do
          dc = Dalli::Client.new ['localhost:29125', 'localhost:29126']
          dc.set 'foo', 'bar'
          foo = dc.get 'foo'
          assert_equal foo, 'bar'

          memcached_kill(29125)

          dc.set 'foo', 'bar'
          foo = dc.get 'foo'
          assert_equal foo, 'bar'

          memcached_kill(29126)

          assert_raises Dalli::RingError, :message => "No server available" do
            dc.set 'foo', 'bar'
          end
        end
      end
    end

    it 'handle them gracefully in get_multi' do
      memcached(29125) do
        memcached(29126) do
          dc = Dalli::Client.new ['localhost:29125', 'localhost:29126']
          dc.set 'a', 'a1'
          result = dc.get_multi ['a']
          assert_equal result, {'a' => 'a1'}

          memcached_kill(29125)

          result = dc.get_multi ['a']
          assert_equal result, {'a' => 'a1'}
        end
      end
    end

    it 'handle graceful failover in get_multi' do
      memcached(29125) do
        memcached(29126) do
          dc = Dalli::Client.new ['localhost:29125', 'localhost:29126']
          dc.set 'foo', 'foo1'
          dc.set 'bar', 'bar1'
          result = dc.get_multi ['foo', 'bar']
          assert_equal result, {'foo' => 'foo1', 'bar' => 'bar1'}

          memcached_kill(29125)

          dc.set 'foo', 'foo1'
          dc.set 'bar', 'bar1'
          result = dc.get_multi ['foo', 'bar']
          assert_equal result, {'foo' => 'foo1', 'bar' => 'bar1'}

          memcached_kill(29126)

          result = dc.get_multi ['foo', 'bar']
          assert_equal result, {}
        end
      end
    end

    it 'stats it still properly report' do
      memcached(29125) do
        memcached(29126) do
          dc = Dalli::Client.new ['localhost:29125', 'localhost:29126']
          result = dc.stats
          assert_instance_of Hash, result['localhost:29125']
          assert_instance_of Hash, result['localhost:29126']

          memcached_kill(29125)

          dc = Dalli::Client.new ['localhost:29125', 'localhost:29126']
          result = dc.stats
          assert_instance_of NilClass, result['localhost:29125']
          assert_instance_of Hash, result['localhost:29126']

          memcached_kill(29126)
        end
      end
    end
  end
end


text:
/*
 * This library is distributed under a modified BSD license.  See the included
 * LICENSE file for details.
 */
package org.fife.ui.rtextarea;

import org.fife.ui.SwingRunnerExtension;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;

import javax.swing.text.DefaultEditorKit;
import java.awt.event.ActionEvent;

/**
 * Unit tests for the {@link RTextAreaEditorKit.SelectAllAction} class.
 *
 * @author Robert Futrell
 * @version 1.0
 */
@ExtendWith(SwingRunnerExtension.class)
class RTextAreaEditorKitSelectAllActionTest {

	@Test
	void testConstructor_multiArg() {
		RTextAreaEditorKit.SelectAllAction action = new RTextAreaEditorKit.SelectAllAction(
			"name", null, "Description", 0, null);
		Assertions.assertEquals("name", action.getName());
		Assertions.assertEquals("Description", action.getDescription());
	}

	@Test
	void testActionPerformedImpl_noSelection() {

		RTextArea textArea = new RTextArea("line 1\nline 2\nline 3");

		ActionEvent e = new ActionEvent(textArea, 0, "command");
		new RTextAreaEditorKit.SelectAllAction().actionPerformedImpl(e, textArea);

		Assertions.assertEquals(0, textArea.getSelectionStart());
		Assertions.assertEquals(textArea.getText().length(), textArea.getSelectionEnd());
		Assertions.assertEquals(textArea.getText().length(), textArea.getCaretPosition());
	}

	@Test
	void testGetMacroID() {
		Assertions.assertEquals(DefaultEditorKit.selectAllAction,
			new RTextAreaEditorKit.SelectAllAction().getMacroID());
	}
}


text:
@interface TweetViewController ()
@property (weak, nonatomic) IBOutlet UIImageView *profileImage;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *handleLabel;
@property (weak, nonatomic) IBOutlet UILabel *messageLabel;
@property (weak, nonatomic) IBOutlet UILabel *timestampLabel;
@property (weak, nonatomic) IBOutlet UILabel *retweetLabel;
@property (weak, nonatomic) IBOutlet UILabel *favLabel;
@property (weak, nonatomic) IBOutlet UIButton *retweetButton;
@property (weak, nonatomic) IBOutlet UIButton *favoriteButton;

@end

@implementation TweetViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.nameLabel.text = self.tweet.user.name;
    self.handleLabel.text = self.tweet.user.screenname;
    self.messageLabel.text = self.tweet.text;
    [self.profileImage setImageWithURL:self.tweet.user.profileUrl];

    NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
    [dateFormat setDateFormat:@"M/d/yy, h:mm a"];
    self.timestampLabel.text = [dateFormat stringFromDate:self.tweet.timestamp];

    self.retweetLabel.text = [NSString stringWithFormat:@"%ld", (long)self.tweet.retweetCount];
    self.favLabel.text = [NSString stringWithFormat:@"%ld", (long)self.tweet.favoriteCount];

    [self highlightButton:self.retweetButton highlight:self.tweet.retweeted];
    [self highlightButton:self.favoriteButton highlight:self.tweet.favorited];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)onReplyButton:(UIButton *)sender {
}
- (IBAction)onReplyBarButton:(UIBarButtonItem *)sender {
}

- (IBAction)onRetweetButton:(UIButton *)sender {
    [self.tweet retweet];
    self.retweetLabel.text = [NSString stringWithFormat:@"%ld", (long)self.tweet.retweetCount];
    [self highlightButton:self.retweetButton highlight:self.tweet.retweeted];
}

- (IBAction)onFavButton:(UIButton *)sender {
    BOOL favorited = [self.tweet favorite];

    self.tweet.favorited = favorited;

    self.favLabel.text = [NSString stringWithFormat:@"%ld", (long)self.tweet.favoriteCount];
    [self highlightButton:self.favoriteButton highlight:favorited];

}

- (void)highlightButton:(UIButton *)button highlight:(BOOL)highlight {
    if (highlight) {
        [button setSelected:YES];
    } else {
        [button setSelected:NO];
    }
}

#pragma mark - Navigation

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    if ([[segue identifier] isEqualToString:@"replyTweetSegue"] || [[segue identifier] isEqualToString:@"replyBarSegue"]) {
        ComposeViewController *vc = [segue destinationViewController];
        vc.replyToTweet = self.tweet;
    }
}

@end


text:
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
  return hasOwnProperty.call(it, key);
};


text:
<!DOCTYPE html>

  <title></title>

      <button id="customButton" onclick="cart.purchase();">Purchase</button>
      <button onclick="addRandomCart();">Add item to cart</button>
      <button onclick="cart.clear();">Empty cart</button>

         --


text:
package org.apache.camel.example.reactive.streams;

import org.apache.camel.Header;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.reactive.streams.util.UnwrapStreamProcessor;
import org.reactivestreams.Publisher;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import reactor.core.publisher.Flux;

/**
 * This example shows how a Camel route defined with rest DSL can call a can asynchronously request data to a reactive stream framework
 * and continue processing.
 *
 * The exchange pattern is in-out from Camel to Reactor.
 *
 * Note: the Camel and reactor components are placed in the same configuration class for the sake of clarity,
 * but they can be moved in their own files.
 */
@Configuration
@ConditionalOnProperty("examples.others.rest")
public class RestExample {

    /**
     * The reactor streams.
     */
    @Component("calculator")
    public static class RestExampleStreams {

        /**
         * This method will be called by a Camel route.
         */
        public Publisher<Long> sum(@Header("num1") Publisher<Long> num1, @Header("num2") Publisher<Long> num2) {
            return Flux.from(num1).zipWith(num2)
                    .map(t -> t.getT1() + t.getT2());
        }

    }

    /**
     * The Camel Configuration.
     */
    @Component
    public static class RestExampleRoutes extends RouteBuilder {

        @Override
        public void configure() throws Exception {

            // The full path should be eg.: http://localhost:8080/camel/sum/23/31
            rest().get("/sum/{num1}/{num2}")
                    .produces("text/plain")
                    .route()
                    .setHeader("num1").simple("headerAs(num1,Long)")
                    .setHeader("num2").simple("headerAs(num2,Long)")
                    .bean("calculator", "sum")
                    .process(new UnwrapStreamProcessor())
                    .setBody().simple("The result is: ${body}");

        }

    }

}


text:
.class public Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;
.super Landroid/widget/LinearLayout;
.source "CircleShortcutWidget.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "ShortcutItem"
.end annotation

# instance fields
.field private mClsName:Ljava/lang/String;

.field private mIcon:Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;

.field private mIntent:Landroid/content/Intent;

.field private mIsDummy:Z

.field private mItemPadding:I

.field private mPkgName:Ljava/lang/String;

.field final synthetic this$0:Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;

# direct methods
.method public constructor <init>(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;Landroid/content/Context;Landroid/content/ComponentName;Z)V
    .locals 12
    .parameter
    .parameter "context"
    .parameter "cn"
    .parameter "isNotDummy"

    .prologue
    .line 714
    iput-object p1, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->this$0:Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;

    .line 715
    invoke-direct {p0, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 717
    if-nez p4, :cond_2

    const/4 v0, 0x1

    :goto_0
    iput-boolean v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIsDummy:Z

    .line 719
    invoke-static {p2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v9

    .line 720
    .local v9, inflater:Landroid/view/LayoutInflater;
    const v0, 0x109005e

    const/4 v1, 0x1

    invoke-virtual {v9, v0, p0, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    .line 722
    const v0, 0x1020309

    invoke-virtual {p0, v0}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->findViewById(I)Landroid/view/View;

    move-result-object v10

    check-cast v10, Landroid/widget/LinearLayout;

    .line 723
    .local v10, mRoot:Landroid/widget/LinearLayout;
    const v0, 0x1020006

    invoke-virtual {p0, v0}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;

    iput-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIcon:Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;

    .line 725
    invoke-virtual {v10}, Landroid/widget/LinearLayout;->getPaddingLeft()I

    move-result v0

    iput v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mItemPadding:I

    .line 731
    invoke-virtual {p2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x1050066

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimension(I)F

    move-result v0

    float-to-int v0, v0

    #setter for: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->mIconHeight:I
    invoke-static {p1, v0}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$1102(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;I)I

    move-result v0

    #setter for: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->mIconWidth:I
    invoke-static {p1, v0}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$1002(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;I)I

    .line 735
    #getter for: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->DBG:Z
    invoke-static {p1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$500(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 736
    #getter for: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->TAG:Ljava/lang/String;
    invoke-static {p1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$100(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;)Ljava/lang/String;

    move-result-object v0

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "mIconWidth ="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    #getter for: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->mIconWidth:I
    invoke-static {p1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$1000(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;)I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 738
    :cond_0
    #calls: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->getLaunchIntent(Landroid/content/ComponentName;)Landroid/content/Intent;
    invoke-static {p1, p3}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$1200(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;Landroid/content/ComponentName;)Landroid/content/Intent;

    move-result-object v0

    iput-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIntent:Landroid/content/Intent;

    .line 739
    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIntent:Landroid/content/Intent;

    if-nez v0, :cond_3

    .line 740
    #getter for: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->DBG:Z
    invoke-static {p1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$500(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 741
    #getter for: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->TAG:Ljava/lang/String;
    invoke-static {p1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$100(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;)Ljava/lang/String;

    move-result-object v0

    const-string v1, "There\'s no activity"

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 742
    :cond_1
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIntent:Landroid/content/Intent;

    .line 800
    :goto_1
    return-void

    .line 717
    .end local v9           #inflater:Landroid/view/LayoutInflater;
    .end local v10           #mRoot:Landroid/widget/LinearLayout;
    :cond_2
    const/4 v0, 0x0

    goto :goto_0

    .line 747
    .restart local v9       #inflater:Landroid/view/LayoutInflater;
    .restart local v10       #mRoot:Landroid/widget/LinearLayout;
    :cond_3
    invoke-virtual {p3}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mPkgName:Ljava/lang/String;

    .line 748
    invoke-virtual {p3}, Landroid/content/ComponentName;->getClassName()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mClsName:Ljava/lang/String;

    .line 750
    #getter for: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
    invoke-static {p1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$1300(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;)Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;

    move-result-object v0

    invoke-virtual {v0}, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->isBootCompleted()Z

    move-result v0

    if-eqz v0, :cond_5

    .line 751
    invoke-virtual {p2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    invoke-static {}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$1400()Landroid/net/Uri;

    move-result-object v1

    invoke-static {}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$1500()[Ljava/lang/String;

    move-result-object v2

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "package=\""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {p3}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\" and class=\""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {p3}, Landroid/content/ComponentName;->getClassName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    const/4 v4, 0x0

    const/4 v5, 0x0

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v7

    .line 752
    .local v7, c:Landroid/database/Cursor;
    if-eqz v7, :cond_5

    .line 753
    invoke-interface {v7}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v0

    if-eqz v0, :cond_4

    .line 754
    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIcon:Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;

    const/4 v1, 0x0

    invoke-interface {v7, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;->setBadgeCount(I)V

    .line 756
    :cond_4
    invoke-interface {v7}, Landroid/database/Cursor;->close()V

    .line 762
    .end local v7           #c:Landroid/database/Cursor;
    :cond_5
    #getter for: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->mPm:Landroid/content/pm/PackageManager;
    invoke-static {p1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$1600(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;)Landroid/content/pm/PackageManager;

    move-result-object v0

    iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIntent:Landroid/content/Intent;

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/content/pm/PackageManager;->resolveActivity(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;

    move-result-object v11

    .line 763
    .local v11, resolveInfo:Landroid/content/pm/ResolveInfo;
    if-nez v11, :cond_7

    .line 764
    #getter for: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->DBG:Z
    invoke-static {p1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$500(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;)Z

    move-result v0

    if-eqz v0, :cond_6

    .line 765
    #getter for: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->TAG:Ljava/lang/String;
    invoke-static {p1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$100(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;)Ljava/lang/String;

    move-result-object v0

    const-string v1, "There\'s no activity"

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 766
    :cond_6
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIntent:Landroid/content/Intent;

    goto/16 :goto_1

    .line 769
    :cond_7
    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIcon:Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;

    invoke-virtual {p1, v11}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->getFullResIcon(Landroid/content/pm/ResolveInfo;)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    #calls: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->createIconThumbnail(Landroid/graphics/drawable/Drawable;Landroid/content/Context;)Landroid/graphics/drawable/Drawable;
    invoke-static {p1, v1, p2}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$1700(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;Landroid/graphics/drawable/Drawable;Landroid/content/Context;)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 770
    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIcon:Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;

    sget-object v1, Landroid/widget/ImageView$ScaleType;->CENTER_INSIDE:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v0, v1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 773
    :try_start_0
    #getter for: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->mPm:Landroid/content/pm/PackageManager;
    invoke-static {p1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$1600(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;)Landroid/content/pm/PackageManager;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, p3, v1}, Landroid/content/pm/PackageManager;->getActivityInfo(Landroid/content/ComponentName;I)Landroid/content/pm/ActivityInfo;

    move-result-object v6

    .line 775
    .local v6, aInfo:Landroid/content/pm/ActivityInfo;
    #getter for: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->mIsTouchExplorationEnabled:Z
    invoke-static {p1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$1800(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;)Z

    move-result v0

    if-nez v0, :cond_8

    .line 776
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    #getter for: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->mPm:Landroid/content/pm/PackageManager;
    invoke-static {p1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$1600(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;)Landroid/content/pm/PackageManager;

    move-result-object v1

    invoke-virtual {v6, v1}, Landroid/content/pm/ActivityInfo;->loadLabel(Landroid/content/pm/PackageManager;)Ljava/lang/CharSequence;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ". "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mContext:Landroid/content/Context;

    const v2, 0x1040674

    invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->setContentDescription(Ljava/lang/CharSequence;)V
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    .line 799
    .end local v6           #aInfo:Landroid/content/pm/ActivityInfo;
    :goto_2
    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->setFocusableInTouchMode(Z)V

    goto/16 :goto_1

    .line 778
    .restart local v6       #aInfo:Landroid/content/pm/ActivityInfo;
    :cond_8
    :try_start_1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    #getter for: Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->mPm:Landroid/content/pm/PackageManager;
    invoke-static {p1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;->access$1600(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget;)Landroid/content/pm/PackageManager;

    move-result-object v1

    invoke-virtual {v6, v1}, Landroid/content/pm/ActivityInfo;->loadLabel(Landroid/content/pm/PackageManager;)Ljava/lang/CharSequence;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ". "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mContext:Landroid/content/Context;

    const v2, 0x1040675

    invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->setContentDescription(Ljava/lang/CharSequence;)V
    :try_end_1
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_2

    .line 781
    .end local v6           #aInfo:Landroid/content/pm/ActivityInfo;
    :catch_0
    move-exception v8

    .line 783
    .local v8, e:Landroid/content/pm/PackageManager$NameNotFoundException;
    invoke-virtual {v8}, Landroid/content/pm/PackageManager$NameNotFoundException;->printStackTrace()V

    goto :goto_2
.end method

.method static synthetic access$400(Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;)Landroid/content/Intent;
    .locals 1
    .parameter "x0"

    .prologue
    .line 704
    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIntent:Landroid/content/Intent;

    return-object v0
.end method

# virtual methods
.method public getClassName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 824
    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mClsName:Ljava/lang/String;

    return-object v0
.end method

.method public getItemPadding()I
    .locals 1

    .prologue
    .line 803
    iget v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mItemPadding:I

    return v0
.end method

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

    .prologue
    .line 820
    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mPkgName:Ljava/lang/String;

    return-object v0
.end method

.method public isDummy()Z
    .locals 1

    .prologue
    .line 807
    iget-boolean v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIsDummy:Z

    return v0
.end method

.method public onPressed(Z)V
    .locals 1
    .parameter "pressed"

    .prologue
    .line 811
    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIcon:Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;

    invoke-virtual {v0, p1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;->onPressed(Z)V

    .line 812
    return-void
.end method

.method public refreshBadgeCount()V
    .locals 1

    .prologue
    .line 832
    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIcon:Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;

    invoke-virtual {v0}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;->postInvalidate()V

    .line 833
    return-void
.end method

.method public setBadgeCount(I)V
    .locals 1
    .parameter "count"

    .prologue
    .line 828
    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIcon:Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;

    invoke-virtual {v0, p1}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;->setBadgeCount(I)V

    .line 829
    return-void
.end method

.method public setOpacity(D)V
    .locals 1
    .parameter "distanceRatio"

    .prologue
    .line 815
    iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutItem;->mIcon:Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;

    invoke-virtual {v0, p1, p2}, Lcom/android/internal/policy/impl/sec/CircleShortcutWidget$ShortcutImageView;->setDistanceRatio(D)V

    .line 816
    return-void
.end method


text:
<?php

namespace app\models;

/**
 * This is the ActiveQuery class for [[TaskDefined]].
 *
 * @see TaskDefined
 */
class TaskDefinedQuery extends \yii\db\ActiveQuery
{
    /*public function active()
    {
        $this->andWhere('[[status]]=1');
        return $this;
    }*/

    /**
     * @inheritdoc
     * @return TaskDefined[]|array
     */
    public function all($db = null)
    {
        return parent::all($db);
    }

    /**
     * @inheritdoc
     * @return TaskDefined|array|null
     */
    public function one($db = null)
    {
        return parent::one($db);
    }
}


text:
package io.jenetics.tool.trial;

import static java.util.Objects.requireNonNull;
import static io.jenetics.internal.util.Hashes.hash;
import static io.jenetics.xml.stream.Writer.elem;
import static io.jenetics.xml.stream.Writer.text;

import java.io.Serializable;

import io.jenetics.xml.stream.Reader;
import io.jenetics.xml.stream.Writer;

/**
 * Represents the collected runtime information.
 *
 * @author Franz Wilhelmstötter
 * @version 4.0
 * @since 3.4
 */
public final class Env implements Serializable  {

	private static final long serialVersionUID = 1L;

	private final String _osName;
	private final String _osVersion;
	private final String _osArch;
	private final String _javaVersion;
	private final String _javaRuntimeName;
	private final String _javaRuntimeVersion;
	private final String _javaVMName;
	private final String _javaVMVersion;

	private Env(
		final String osName,
		final String osVersion,
		final String osArch,
		final String javaVersion,
		final String javaRuntimeName,
		final String javaRuntimeVersion,
		final String javaVMName,
		final String javaVMVersion
	) {
		_osName = requireNonNull(osName);
		_osVersion = requireNonNull(osVersion);
		_osArch = requireNonNull(osArch);
		_javaVersion = requireNonNull(javaVersion);
		_javaRuntimeName = requireNonNull(javaRuntimeName);
		_javaRuntimeVersion = requireNonNull(javaRuntimeVersion);
		_javaVMName = requireNonNull(javaVMName);
		_javaVMVersion = requireNonNull(javaVMVersion);
	}

	/**
	 * The OS architecture.
	 *
	 * @return the OS architecture
	 */
	public String getOSArch() {
		return _osArch;
	}

	/**
	 * The OS name.
	 *
	 * @return the OS name
	 */
	public String getOSName() {
		return _osName;
	}

	/**
	 * The OS version.
	 *
	 * @return the OS version
	 */
	public String getOSVersion() {
		return _osVersion;
	}

	/**
	 * The Java runtime name.
	 *
	 * @return the Java runtime name
	 */
	public String getJavaRuntimeName() {
		return _javaRuntimeName;
	}

	/**
	 * The Java runtime version.
	 *
	 * @return the Java runtime version
	 */
	public String getJavaRuntimeVersion() {
		return _javaRuntimeVersion;
	}

	/**
	 * The Java version.
	 *
	 * @return the Java version
	 */
	public String getJavaVersion() {
		return _javaVersion;
	}

	/**
	 * The Java VM name.
	 *
	 * @return the Java VM name
	 */
	public String getJavaVMName() {
		return _javaVMName;
	}

	/**
	 * Return the Java VM version.
	 *
	 * @return the Java VM version
	 */
	public String getJavaVMVersion() {
		return _javaVMVersion;
	}

	@Override
	public int hashCode() {
		return
			hash(_osName,
			hash(_osVersion,
			hash(_osArch,
			hash(_javaVersion,
			hash(_javaRuntimeName,
			hash(_javaRuntimeVersion,
			hash(_javaVMName,
			hash(_javaVMVersion))))))));
	}

	@Override
	public boolean equals(final Object obj) {
		return obj == this ||
			obj instanceof Env other &&
			_osName.equals(other._osName) &&
			_osVersion.equals(other._osVersion) &&
			_osArch.equals(other._osArch) &&
			_javaVersion.equals(other._javaVersion) &&
			_javaRuntimeName.equals(other._javaRuntimeName) &&
			_javaRuntimeVersion.equals(other._javaRuntimeVersion) &&
			_javaVMName.equals(other._javaVMName) &&
			_javaVMVersion.equals(other._javaVMVersion);
	}

	@Override
	public String toString() {
		return
			"OS name:              " + _osName + "\n" +
			"OS version:           " + _osVersion + "\n" +
			"OS architecture:      " + _osArch + "\n" +
			"Java version:         " + _javaVersion + "\n" +
			"Java runtime name:    " + _javaRuntimeName + "\n" +
			"Java runtime version: " + _javaRuntimeName + "\n" +
			"VM name:              " + _javaVMName + "\n" +
			"VM version:           " + _javaVMVersion;
	}

	/**
	 * Return a new {@code Env} object with the given parameters.
	 *
	 * @param osName the OS name
	 * @param osVersion the OS version
	 * @param osArch the OS architecture
	 * @param javaVersion the Java version
	 * @param javaRuntimeName the Java runtime name
	 * @param javaRuntimeVersion the Java runtime version
	 * @param javaVMName the Java VM name
	 * @param javaVMVersion the Java VM version
	 * @throws  NullPointerException if one of the parameters is {@code null}
	 * @return a new {@code Env} object
	 */
	public static Env of(
		final String osName,
		final String osVersion,
		final String osArch,
		final String javaVersion,
		final String javaRuntimeName,
		final String javaRuntimeVersion,
		final String javaVMName,
		final String javaVMVersion
	) {
		return new Env(
			osName,
			osVersion,
			osArch,
			javaVersion,
			javaRuntimeName,
			javaRuntimeVersion,
			javaVMName,
			javaVMVersion
		);
	}

	/**
	 * Return the current environment values.
	 *
	 * @return the current environment values
	 */
	public static Env of() {
		return of(
			System.getProperty("os.name"),
			System.getProperty("os.version"),
			System.getProperty("os.arch"),
			System.getProperty("java.version"),
			System.getProperty("java.runtime.name"),
			System.getProperty("java.runtime.version"),
			System.getProperty("java.vm.name"),
			System.getProperty("java.vm.version")
		);
	}

	/* *************************************************************************
	 *  XML reader/writer
	 * ************************************************************************/

	public static final Writer<Env> WRITER = elem("environment",
		elem("os-name", text().map(Env::getOSName)),
		elem("os-version", text().map(Env::getOSVersion)),
		elem("os-architecture", text().map(Env::getOSArch)),
		elem("java-version", text().map(Env::getJavaVersion)),
		elem("java-runtime-name", text().map(Env::getJavaRuntimeName)),
		elem("java-runtime-version", text().map(Env::getJavaRuntimeVersion)),
		elem("java-vm-name", text().map(Env::getJavaVMName)),
		elem("java-vm-version", text().map(Env::getJavaVMVersion))
	);

	public static final Reader<Env> READER = Reader.elem(
		(Object[] v) -> Env.of(
			(String)v[0],
			(String)v[1],
			(String)v[2],
			(String)v[3],
			(String)v[4],
			(String)v[5],
			(String)v[6],
			(String)v[7]
		),
		"environment",
		Reader.elem("os-name", Reader.text()),
		Reader.elem("os-version", Reader.text()),
		Reader.elem("os-architecture", Reader.text()),
		Reader.elem("java-version", Reader.text()),
		Reader.elem("java-runtime-name", Reader.text()),
		Reader.elem("java-runtime-version", Reader.text()),
		Reader.elem("java-vm-name", Reader.text()),
		Reader.elem("java-vm-version", Reader.text())
	);

}


text:
import { Year, YearMonth, TextStyle, LocalDate, LocalDateTime } from 'js-joda'

import { YearMonthEx, formatDay } from './JsJodaEx'

import { Displayable } from './Displayable'
import { Week } from './Week'

/**
 * Represents a specific period in time that a KPI refers to.
 *
 * For instance it could be a specific day, week or month.
 */
export abstract class KpiPeriod implements Displayable {

  abstract toString(): string

  abstract getDisplayText(): string

  abstract startOfPeriod(): LocalDate

  abstract nextPeriod(): KpiPeriod

  abstract endOfPeriod(): LocalDateTime

}

export class KpiPeriodYearMonth extends KpiPeriod {

  private yearMonth: YearMonthEx

  constructor(yearMonth: YearMonth) {
    super()
    this.yearMonth = yearMonth as any
  }

  toString(): string {
    return this.yearMonth.toString()
  }

  getDisplayText(): string {
    return `the month of ${this.yearMonth.month()} ${this.yearMonth.year()}`
  }

  startOfPeriod(): LocalDate {
    return this.yearMonth.atDay(1)
  }

  endOfPeriod(): LocalDateTime {
    return this.yearMonth.atEndOfMonth().plusDays(1).atStartOfDay()
  }

  nextPeriod(): KpiPeriodYearMonth {
    return new KpiPeriodYearMonth(this.yearMonth.plusMonths(1))
  }

}

export class KpiPeriodWeek extends KpiPeriod {

  private week: Week

  constructor(week: Week) {
    super()
    this.week = week
  }

  toString(): string {
    return this.week.toString()
  }

  getDisplayText(): string {
    return "the " + this.week.getDisplayText()
  }

  startOfPeriod(): LocalDate {
    return this.week.getMonday()
  }

  endOfPeriod(): LocalDateTime {
    return this.week.plusWeeks(1).getMonday().atStartOfDay()
  }

  nextPeriod(): KpiPeriodWeek {
    return new KpiPeriodWeek(this.week.plusWeeks(1))
  }

}

export class KpiPeriodDay extends KpiPeriod {

  private day: LocalDate

  constructor(day: LocalDate) {
    super()
    this.day = day
  }

  toString(): string {
    return this.day.toString()
  }

  getDisplayText(): string {
    return `${formatDay(this.day)}`
  }

  startOfPeriod(): LocalDate {
    return this.day
  }

  endOfPeriod(): LocalDateTime {
    return this.day.plusDays(1).atStartOfDay()
  }

  nextPeriod(): KpiPeriodDay {
    return new KpiPeriodDay(this.day.plusDays(1))
  }

}