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

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

/**
 *

 * A serializer to use for converting data to the ORC format before storing it in Amazon S3. For more information, see
 * Apache ORC.
 *

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

    /**
     *

     * The number of bytes in each stripe. The default is 64 MiB and the minimum is 8 MiB.
     *

     */
    private Integer stripeSizeBytes;
    /**
     *

     * The Hadoop Distributed File System (HDFS) block size. This is useful if you intend to copy the data from Amazon
     * S3 to HDFS before querying. The default is 256 MiB and the minimum is 64 MiB. Kinesis Data Firehose uses this
     * value for padding calculations.
     *

     */
    private Integer blockSizeBytes;
    /**
     *

     * The number of rows between index entries. The default is 10,000 and the minimum is 1,000.
     *

     */
    private Integer rowIndexStride;
    /**
     *

     * Set this to true to indicate that you want stripes to be padded to the HDFS block boundaries. This
     * is useful if you intend to copy the data from Amazon S3 to HDFS before querying. The default is
     * false.
     *

     */
    private Boolean enablePadding;
    /**
     *

     * A number between 0 and 1 that defines the tolerance for block padding as a decimal fraction of stripe size. The
     * default value is 0.05, which means 5 percent of stripe size.
     *

     *

     * For the default values of 64 MiB ORC stripes and 256 MiB HDFS blocks, the default block padding tolerance of 5
     * percent reserves a maximum of 3.2 MiB for padding within the 256 MiB block. In such a case, if the available size
     * within the block is more than 3.2 MiB, a new, smaller stripe is inserted to fit within that space. This ensures
     * that no stripe crosses block boundaries and causes remote reads within a node-local task.
     *

     *

     * Kinesis Data Firehose ignores this parameter when OrcSerDe$EnablePadding is false.
     *

     */
    private Double paddingTolerance;
    /**
     *

     * The compression code to use over data blocks. The default is SNAPPY.
     *

     */
    private String compression;
    /**
     *

     * The column names for which you want Kinesis Data Firehose to create bloom filters. The default is
     * null.
     *

     */
    private java.util.List<String> bloomFilterColumns;
    /**
     *

     * The Bloom filter false positive probability (FPP). The lower the FPP, the bigger the Bloom filter. The default
     * value is 0.05, the minimum is 0, and the maximum is 1.
     *

     */
    private Double bloomFilterFalsePositiveProbability;
    /**
     *

     * Represents the fraction of the total number of non-null rows. To turn off dictionary encoding, set this fraction
     * to a number that is less than the number of distinct keys in a dictionary. To always use dictionary encoding, set
     * this threshold to 1.
     *

     */
    private Double dictionaryKeyThreshold;
    /**
     *

     * The version of the file to write. The possible values are V0_11 and V0_12. The default
     * is V0_12.
     *

     */
    private String formatVersion;

    /**
     *

     * The number of bytes in each stripe. The default is 64 MiB and the minimum is 8 MiB.
     *

     *
     * @param stripeSizeBytes
     *        The number of bytes in each stripe. The default is 64 MiB and the minimum is 8 MiB.
     */

    public void setStripeSizeBytes(Integer stripeSizeBytes) {
        this.stripeSizeBytes = stripeSizeBytes;
    }

    /**
     *

     * The number of bytes in each stripe. The default is 64 MiB and the minimum is 8 MiB.
     *

     *
     * @return The number of bytes in each stripe. The default is 64 MiB and the minimum is 8 MiB.
     */

    public Integer getStripeSizeBytes() {
        return this.stripeSizeBytes;
    }

    /**
     *

     * The number of bytes in each stripe. The default is 64 MiB and the minimum is 8 MiB.
     *

     *
     * @param stripeSizeBytes
     *        The number of bytes in each stripe. The default is 64 MiB and the minimum is 8 MiB.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public OrcSerDe withStripeSizeBytes(Integer stripeSizeBytes) {
        setStripeSizeBytes(stripeSizeBytes);
        return this;
    }

    /**
     *

     * The Hadoop Distributed File System (HDFS) block size. This is useful if you intend to copy the data from Amazon
     * S3 to HDFS before querying. The default is 256 MiB and the minimum is 64 MiB. Kinesis Data Firehose uses this
     * value for padding calculations.
     *

     *
     * @param blockSizeBytes
     *        The Hadoop Distributed File System (HDFS) block size. This is useful if you intend to copy the data from
     *        Amazon S3 to HDFS before querying. The default is 256 MiB and the minimum is 64 MiB. Kinesis Data Firehose
     *        uses this value for padding calculations.
     */

    public void setBlockSizeBytes(Integer blockSizeBytes) {
        this.blockSizeBytes = blockSizeBytes;
    }

    /**
     *

     * The Hadoop Distributed File System (HDFS) block size. This is useful if you intend to copy the data from Amazon
     * S3 to HDFS before querying. The default is 256 MiB and the minimum is 64 MiB. Kinesis Data Firehose uses this
     * value for padding calculations.
     *

     *
     * @return The Hadoop Distributed File System (HDFS) block size. This is useful if you intend to copy the data from
     *         Amazon S3 to HDFS before querying. The default is 256 MiB and the minimum is 64 MiB. Kinesis Data
     *         Firehose uses this value for padding calculations.
     */

    public Integer getBlockSizeBytes() {
        return this.blockSizeBytes;
    }

    /**
     *

     * The Hadoop Distributed File System (HDFS) block size. This is useful if you intend to copy the data from Amazon
     * S3 to HDFS before querying. The default is 256 MiB and the minimum is 64 MiB. Kinesis Data Firehose uses this
     * value for padding calculations.
     *

     *
     * @param blockSizeBytes
     *        The Hadoop Distributed File System (HDFS) block size. This is useful if you intend to copy the data from
     *        Amazon S3 to HDFS before querying. The default is 256 MiB and the minimum is 64 MiB. Kinesis Data Firehose
     *        uses this value for padding calculations.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public OrcSerDe withBlockSizeBytes(Integer blockSizeBytes) {
        setBlockSizeBytes(blockSizeBytes);
        return this;
    }

    /**
     *

     * The number of rows between index entries. The default is 10,000 and the minimum is 1,000.
     *

     *
     * @param rowIndexStride
     *        The number of rows between index entries. The default is 10,000 and the minimum is 1,000.
     */

    public void setRowIndexStride(Integer rowIndexStride) {
        this.rowIndexStride = rowIndexStride;
    }

    /**
     *

     * The number of rows between index entries. The default is 10,000 and the minimum is 1,000.
     *

     *
     * @return The number of rows between index entries. The default is 10,000 and the minimum is 1,000.
     */

    public Integer getRowIndexStride() {
        return this.rowIndexStride;
    }

    /**
     *

     * The number of rows between index entries. The default is 10,000 and the minimum is 1,000.
     *

     *
     * @param rowIndexStride
     *        The number of rows between index entries. The default is 10,000 and the minimum is 1,000.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public OrcSerDe withRowIndexStride(Integer rowIndexStride) {
        setRowIndexStride(rowIndexStride);
        return this;
    }

    /**
     *

     * Set this to true to indicate that you want stripes to be padded to the HDFS block boundaries. This
     * is useful if you intend to copy the data from Amazon S3 to HDFS before querying. The default is
     * false.
     *

     *
     * @param enablePadding
     *        Set this to true to indicate that you want stripes to be padded to the HDFS block boundaries.
     *        This is useful if you intend to copy the data from Amazon S3 to HDFS before querying. The default is
     *        false.
     */

    public void setEnablePadding(Boolean enablePadding) {
        this.enablePadding = enablePadding;
    }

    /**
     *

     * Set this to true to indicate that you want stripes to be padded to the HDFS block boundaries. This
     * is useful if you intend to copy the data from Amazon S3 to HDFS before querying. The default is
     * false.
     *

     *
     * @return Set this to true to indicate that you want stripes to be padded to the HDFS block
     *         boundaries. This is useful if you intend to copy the data from Amazon S3 to HDFS before querying. The
     *         default is false.
     */

    public Boolean getEnablePadding() {
        return this.enablePadding;
    }

    /**
     *

     * Set this to true to indicate that you want stripes to be padded to the HDFS block boundaries. This
     * is useful if you intend to copy the data from Amazon S3 to HDFS before querying. The default is
     * false.
     *

     *
     * @param enablePadding
     *        Set this to true to indicate that you want stripes to be padded to the HDFS block boundaries.
     *        This is useful if you intend to copy the data from Amazon S3 to HDFS before querying. The default is
     *        false.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public OrcSerDe withEnablePadding(Boolean enablePadding) {
        setEnablePadding(enablePadding);
        return this;
    }

    /**
     *

     * Set this to true to indicate that you want stripes to be padded to the HDFS block boundaries. This
     * is useful if you intend to copy the data from Amazon S3 to HDFS before querying. The default is
     * false.
     *

     *
     * @return Set this to true to indicate that you want stripes to be padded to the HDFS block
     *         boundaries. This is useful if you intend to copy the data from Amazon S3 to HDFS before querying. The
     *         default is false.
     */

    public Boolean isEnablePadding() {
        return this.enablePadding;
    }

    /**
     *

     * A number between 0 and 1 that defines the tolerance for block padding as a decimal fraction of stripe size. The
     * default value is 0.05, which means 5 percent of stripe size.
     *

     *

     * For the default values of 64 MiB ORC stripes and 256 MiB HDFS blocks, the default block padding tolerance of 5
     * percent reserves a maximum of 3.2 MiB for padding within the 256 MiB block. In such a case, if the available size
     * within the block is more than 3.2 MiB, a new, smaller stripe is inserted to fit within that space. This ensures
     * that no stripe crosses block boundaries and causes remote reads within a node-local task.
     *

     *

     * Kinesis Data Firehose ignores this parameter when OrcSerDe$EnablePadding is false.
     *

     *
     * @param paddingTolerance
     *        A number between 0 and 1 that defines the tolerance for block padding as a decimal fraction of stripe
     *        size. The default value is 0.05, which means 5 percent of stripe size.

     *

     *        For the default values of 64 MiB ORC stripes and 256 MiB HDFS blocks, the default block padding tolerance
     *        of 5 percent reserves a maximum of 3.2 MiB for padding within the 256 MiB block. In such a case, if the
     *        available size within the block is more than 3.2 MiB, a new, smaller stripe is inserted to fit within that
     *        space. This ensures that no stripe crosses block boundaries and causes remote reads within a node-local
     *        task.
     *

     *

     *        Kinesis Data Firehose ignores this parameter when OrcSerDe$EnablePadding is false.
     */

    public void setPaddingTolerance(Double paddingTolerance) {
        this.paddingTolerance = paddingTolerance;
    }

    /**
     *

     * A number between 0 and 1 that defines the tolerance for block padding as a decimal fraction of stripe size. The
     * default value is 0.05, which means 5 percent of stripe size.
     *

     *

     * For the default values of 64 MiB ORC stripes and 256 MiB HDFS blocks, the default block padding tolerance of 5
     * percent reserves a maximum of 3.2 MiB for padding within the 256 MiB block. In such a case, if the available size
     * within the block is more than 3.2 MiB, a new, smaller stripe is inserted to fit within that space. This ensures
     * that no stripe crosses block boundaries and causes remote reads within a node-local task.
     *

     *

     * Kinesis Data Firehose ignores this parameter when OrcSerDe$EnablePadding is false.
     *

     *
     * @return A number between 0 and 1 that defines the tolerance for block padding as a decimal fraction of stripe
     *         size. The default value is 0.05, which means 5 percent of stripe size.

     *

     *         For the default values of 64 MiB ORC stripes and 256 MiB HDFS blocks, the default block padding tolerance
     *         of 5 percent reserves a maximum of 3.2 MiB for padding within the 256 MiB block. In such a case, if the
     *         available size within the block is more than 3.2 MiB, a new, smaller stripe is inserted to fit within
     *         that space. This ensures that no stripe crosses block boundaries and causes remote reads within a
     *         node-local task.
     *

     *

     *         Kinesis Data Firehose ignores this parameter when OrcSerDe$EnablePadding is false.
     */

    public Double getPaddingTolerance() {
        return this.paddingTolerance;
    }

    /**
     *

     * A number between 0 and 1 that defines the tolerance for block padding as a decimal fraction of stripe size. The
     * default value is 0.05, which means 5 percent of stripe size.
     *

     *

     * For the default values of 64 MiB ORC stripes and 256 MiB HDFS blocks, the default block padding tolerance of 5
     * percent reserves a maximum of 3.2 MiB for padding within the 256 MiB block. In such a case, if the available size
     * within the block is more than 3.2 MiB, a new, smaller stripe is inserted to fit within that space. This ensures
     * that no stripe crosses block boundaries and causes remote reads within a node-local task.
     *

     *

     * Kinesis Data Firehose ignores this parameter when OrcSerDe$EnablePadding is false.
     *

     *
     * @param paddingTolerance
     *        A number between 0 and 1 that defines the tolerance for block padding as a decimal fraction of stripe
     *        size. The default value is 0.05, which means 5 percent of stripe size.

     *

     *        For the default values of 64 MiB ORC stripes and 256 MiB HDFS blocks, the default block padding tolerance
     *        of 5 percent reserves a maximum of 3.2 MiB for padding within the 256 MiB block. In such a case, if the
     *        available size within the block is more than 3.2 MiB, a new, smaller stripe is inserted to fit within that
     *        space. This ensures that no stripe crosses block boundaries and causes remote reads within a node-local
     *        task.
     *

     *

     *        Kinesis Data Firehose ignores this parameter when OrcSerDe$EnablePadding is false.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public OrcSerDe withPaddingTolerance(Double paddingTolerance) {
        setPaddingTolerance(paddingTolerance);
        return this;
    }

    /**
     *

     * The compression code to use over data blocks. The default is SNAPPY.
     *

     *
     * @param compression
     *        The compression code to use over data blocks. The default is SNAPPY.
     * @see OrcCompression
     */

    public void setCompression(String compression) {
        this.compression = compression;
    }

    /**
     *

     * The compression code to use over data blocks. The default is SNAPPY.
     *

     *
     * @return The compression code to use over data blocks. The default is SNAPPY.
     * @see OrcCompression
     */

    public String getCompression() {
        return this.compression;
    }

    /**
     *

     * The compression code to use over data blocks. The default is SNAPPY.
     *

     *
     * @param compression
     *        The compression code to use over data blocks. The default is SNAPPY.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see OrcCompression
     */

    public OrcSerDe withCompression(String compression) {
        setCompression(compression);
        return this;
    }

    /**
     *

     * The compression code to use over data blocks. The default is SNAPPY.
     *

     *
     * @param compression
     *        The compression code to use over data blocks. The default is SNAPPY.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see OrcCompression
     */

    public OrcSerDe withCompression(OrcCompression compression) {
        this.compression = compression.toString();
        return this;
    }

    /**
     *

     * The column names for which you want Kinesis Data Firehose to create bloom filters. The default is
     * null.
     *

     *
     * @return The column names for which you want Kinesis Data Firehose to create bloom filters. The default is
     *         null.
     */

    public java.util.List<String> getBloomFilterColumns() {
        return bloomFilterColumns;
    }

    /**
     *

     * The column names for which you want Kinesis Data Firehose to create bloom filters. The default is
     * null.
     *

     *
     * @param bloomFilterColumns
     *        The column names for which you want Kinesis Data Firehose to create bloom filters. The default is
     *        null.
     */

    public void setBloomFilterColumns(java.util.Collection<String> bloomFilterColumns) {
        if (bloomFilterColumns == null) {
            this.bloomFilterColumns = null;
            return;
        }

        this.bloomFilterColumns = new java.util.ArrayList<String>(bloomFilterColumns);
    }

    /**
     *

     * The column names for which you want Kinesis Data Firehose to create bloom filters. The default is
     * null.
     *

     *

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

     *
     * @param bloomFilterColumns
     *        The column names for which you want Kinesis Data Firehose to create bloom filters. The default is
     *        null.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public OrcSerDe withBloomFilterColumns(String... bloomFilterColumns) {
        if (this.bloomFilterColumns == null) {
            setBloomFilterColumns(new java.util.ArrayList<String>(bloomFilterColumns.length));
        }
        for (String ele : bloomFilterColumns) {
            this.bloomFilterColumns.add(ele);
        }
        return this;
    }

    /**
     *

     * The column names for which you want Kinesis Data Firehose to create bloom filters. The default is
     * null.
     *

     *
     * @param bloomFilterColumns
     *        The column names for which you want Kinesis Data Firehose to create bloom filters. The default is
     *        null.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public OrcSerDe withBloomFilterColumns(java.util.Collection<String> bloomFilterColumns) {
        setBloomFilterColumns(bloomFilterColumns);
        return this;
    }

    /**
     *

     * The Bloom filter false positive probability (FPP). The lower the FPP, the bigger the Bloom filter. The default
     * value is 0.05, the minimum is 0, and the maximum is 1.
     *

     *
     * @param bloomFilterFalsePositiveProbability
     *        The Bloom filter false positive probability (FPP). The lower the FPP, the bigger the Bloom filter. The
     *        default value is 0.05, the minimum is 0, and the maximum is 1.
     */

    public void setBloomFilterFalsePositiveProbability(Double bloomFilterFalsePositiveProbability) {
        this.bloomFilterFalsePositiveProbability = bloomFilterFalsePositiveProbability;
    }

    /**
     *

     * The Bloom filter false positive probability (FPP). The lower the FPP, the bigger the Bloom filter. The default
     * value is 0.05, the minimum is 0, and the maximum is 1.
     *

     *
     * @return The Bloom filter false positive probability (FPP). The lower the FPP, the bigger the Bloom filter. The
     *         default value is 0.05, the minimum is 0, and the maximum is 1.
     */

    public Double getBloomFilterFalsePositiveProbability() {
        return this.bloomFilterFalsePositiveProbability;
    }

    /**
     *

     * The Bloom filter false positive probability (FPP). The lower the FPP, the bigger the Bloom filter. The default
     * value is 0.05, the minimum is 0, and the maximum is 1.
     *

     *
     * @param bloomFilterFalsePositiveProbability
     *        The Bloom filter false positive probability (FPP). The lower the FPP, the bigger the Bloom filter. The
     *        default value is 0.05, the minimum is 0, and the maximum is 1.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public OrcSerDe withBloomFilterFalsePositiveProbability(Double bloomFilterFalsePositiveProbability) {
        setBloomFilterFalsePositiveProbability(bloomFilterFalsePositiveProbability);
        return this;
    }

    /**
     *

     * Represents the fraction of the total number of non-null rows. To turn off dictionary encoding, set this fraction
     * to a number that is less than the number of distinct keys in a dictionary. To always use dictionary encoding, set
     * this threshold to 1.
     *

     *
     * @param dictionaryKeyThreshold
     *        Represents the fraction of the total number of non-null rows. To turn off dictionary encoding, set this
     *        fraction to a number that is less than the number of distinct keys in a dictionary. To always use
     *        dictionary encoding, set this threshold to 1.
     */

    public void setDictionaryKeyThreshold(Double dictionaryKeyThreshold) {
        this.dictionaryKeyThreshold = dictionaryKeyThreshold;
    }

    /**
     *

     * Represents the fraction of the total number of non-null rows. To turn off dictionary encoding, set this fraction
     * to a number that is less than the number of distinct keys in a dictionary. To always use dictionary encoding, set
     * this threshold to 1.
     *

     *
     * @return Represents the fraction of the total number of non-null rows. To turn off dictionary encoding, set this
     *         fraction to a number that is less than the number of distinct keys in a dictionary. To always use
     *         dictionary encoding, set this threshold to 1.
     */

    public Double getDictionaryKeyThreshold() {
        return this.dictionaryKeyThreshold;
    }

    /**
     *

     * Represents the fraction of the total number of non-null rows. To turn off dictionary encoding, set this fraction
     * to a number that is less than the number of distinct keys in a dictionary. To always use dictionary encoding, set
     * this threshold to 1.
     *

     *
     * @param dictionaryKeyThreshold
     *        Represents the fraction of the total number of non-null rows. To turn off dictionary encoding, set this
     *        fraction to a number that is less than the number of distinct keys in a dictionary. To always use
     *        dictionary encoding, set this threshold to 1.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public OrcSerDe withDictionaryKeyThreshold(Double dictionaryKeyThreshold) {
        setDictionaryKeyThreshold(dictionaryKeyThreshold);
        return this;
    }

    /**
     *

     * The version of the file to write. The possible values are V0_11 and V0_12. The default
     * is V0_12.
     *

     *
     * @param formatVersion
     *        The version of the file to write. The possible values are V0_11 and V0_12. The
     *        default is V0_12.
     * @see OrcFormatVersion
     */

    public void setFormatVersion(String formatVersion) {
        this.formatVersion = formatVersion;
    }

    /**
     *

     * The version of the file to write. The possible values are V0_11 and V0_12. The default
     * is V0_12.
     *

     *
     * @return The version of the file to write. The possible values are V0_11 and V0_12. The
     *         default is V0_12.
     * @see OrcFormatVersion
     */

    public String getFormatVersion() {
        return this.formatVersion;
    }

    /**
     *

     * The version of the file to write. The possible values are V0_11 and V0_12. The default
     * is V0_12.
     *

     *
     * @param formatVersion
     *        The version of the file to write. The possible values are V0_11 and V0_12. The
     *        default is V0_12.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see OrcFormatVersion
     */

    public OrcSerDe withFormatVersion(String formatVersion) {
        setFormatVersion(formatVersion);
        return this;
    }

    /**
     *

     * The version of the file to write. The possible values are V0_11 and V0_12. The default
     * is V0_12.
     *

     *
     * @param formatVersion
     *        The version of the file to write. The possible values are V0_11 and V0_12. The
     *        default is V0_12.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see OrcFormatVersion
     */

    public OrcSerDe withFormatVersion(OrcFormatVersion formatVersion) {
        this.formatVersion = formatVersion.toString();
        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 (getStripeSizeBytes() != null)
            sb.append("StripeSizeBytes: ").append(getStripeSizeBytes()).append(",");
        if (getBlockSizeBytes() != null)
            sb.append("BlockSizeBytes: ").append(getBlockSizeBytes()).append(",");
        if (getRowIndexStride() != null)
            sb.append("RowIndexStride: ").append(getRowIndexStride()).append(",");
        if (getEnablePadding() != null)
            sb.append("EnablePadding: ").append(getEnablePadding()).append(",");
        if (getPaddingTolerance() != null)
            sb.append("PaddingTolerance: ").append(getPaddingTolerance()).append(",");
        if (getCompression() != null)
            sb.append("Compression: ").append(getCompression()).append(",");
        if (getBloomFilterColumns() != null)
            sb.append("BloomFilterColumns: ").append(getBloomFilterColumns()).append(",");
        if (getBloomFilterFalsePositiveProbability() != null)
            sb.append("BloomFilterFalsePositiveProbability: ").append(getBloomFilterFalsePositiveProbability()).append(",");
        if (getDictionaryKeyThreshold() != null)
            sb.append("DictionaryKeyThreshold: ").append(getDictionaryKeyThreshold()).append(",");
        if (getFormatVersion() != null)
            sb.append("FormatVersion: ").append(getFormatVersion());
        sb.append("}");
        return sb.toString();
    }

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

        if (obj instanceof OrcSerDe == false)
            return false;
        OrcSerDe other = (OrcSerDe) obj;
        if (other.getStripeSizeBytes() == null ^ this.getStripeSizeBytes() == null)
            return false;
        if (other.getStripeSizeBytes() != null && other.getStripeSizeBytes().equals(this.getStripeSizeBytes()) == false)
            return false;
        if (other.getBlockSizeBytes() == null ^ this.getBlockSizeBytes() == null)
            return false;
        if (other.getBlockSizeBytes() != null && other.getBlockSizeBytes().equals(this.getBlockSizeBytes()) == false)
            return false;
        if (other.getRowIndexStride() == null ^ this.getRowIndexStride() == null)
            return false;
        if (other.getRowIndexStride() != null && other.getRowIndexStride().equals(this.getRowIndexStride()) == false)
            return false;
        if (other.getEnablePadding() == null ^ this.getEnablePadding() == null)
            return false;
        if (other.getEnablePadding() != null && other.getEnablePadding().equals(this.getEnablePadding()) == false)
            return false;
        if (other.getPaddingTolerance() == null ^ this.getPaddingTolerance() == null)
            return false;
        if (other.getPaddingTolerance() != null && other.getPaddingTolerance().equals(this.getPaddingTolerance()) == false)
            return false;
        if (other.getCompression() == null ^ this.getCompression() == null)
            return false;
        if (other.getCompression() != null && other.getCompression().equals(this.getCompression()) == false)
            return false;
        if (other.getBloomFilterColumns() == null ^ this.getBloomFilterColumns() == null)
            return false;
        if (other.getBloomFilterColumns() != null && other.getBloomFilterColumns().equals(this.getBloomFilterColumns()) == false)
            return false;
        if (other.getBloomFilterFalsePositiveProbability() == null ^ this.getBloomFilterFalsePositiveProbability() == null)
            return false;
        if (other.getBloomFilterFalsePositiveProbability() != null
                && other.getBloomFilterFalsePositiveProbability().equals(this.getBloomFilterFalsePositiveProbability()) == false)
            return false;
        if (other.getDictionaryKeyThreshold() == null ^ this.getDictionaryKeyThreshold() == null)
            return false;
        if (other.getDictionaryKeyThreshold() != null && other.getDictionaryKeyThreshold().equals(this.getDictionaryKeyThreshold()) == false)
            return false;
        if (other.getFormatVersion() == null ^ this.getFormatVersion() == null)
            return false;
        if (other.getFormatVersion() != null && other.getFormatVersion().equals(this.getFormatVersion()) == false)
            return false;
        return true;
    }

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

        hashCode = prime * hashCode + ((getStripeSizeBytes() == null) ? 0 : getStripeSizeBytes().hashCode());
        hashCode = prime * hashCode + ((getBlockSizeBytes() == null) ? 0 : getBlockSizeBytes().hashCode());
        hashCode = prime * hashCode + ((getRowIndexStride() == null) ? 0 : getRowIndexStride().hashCode());
        hashCode = prime * hashCode + ((getEnablePadding() == null) ? 0 : getEnablePadding().hashCode());
        hashCode = prime * hashCode + ((getPaddingTolerance() == null) ? 0 : getPaddingTolerance().hashCode());
        hashCode = prime * hashCode + ((getCompression() == null) ? 0 : getCompression().hashCode());
        hashCode = prime * hashCode + ((getBloomFilterColumns() == null) ? 0 : getBloomFilterColumns().hashCode());
        hashCode = prime * hashCode + ((getBloomFilterFalsePositiveProbability() == null) ? 0 : getBloomFilterFalsePositiveProbability().hashCode());
        hashCode = prime * hashCode + ((getDictionaryKeyThreshold() == null) ? 0 : getDictionaryKeyThreshold().hashCode());
        hashCode = prime * hashCode + ((getFormatVersion() == null) ? 0 : getFormatVersion().hashCode());
        return hashCode;
    }

    @Override
    public OrcSerDe clone() {
        try {
            return (OrcSerDe) 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.kinesisfirehose.model.transform.OrcSerDeMarshaller.getInstance().marshall(this, protocolMarshaller);
    }
}


text:
define('IN_PHPBB', true);
if(file_exists('./../../index.php')) { $phpbb_root_path = './../../'; } else { $phpbb_root_path = './../'; }
require_once($phpbb_root_path . 'index.php');
$myController = new \Controller\GenericController();

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
<title>{SITENAME} • {L_MCP} • {L_UCP} • {PAGE_TITLE}</title>

	<link rel="alternate" type="application/atom+xml" title="{L_FEED} - {SITENAME}" href="{U_FEED}" />
	<link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_NEWS}" href="{U_FEED}?mode=news" />
	<link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_ALL_FORUMS}" href="{U_FEED}?mode=forums" />
	<link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_NEW}" href="{U_FEED}?mode=topics" />
	<link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_ACTIVE}" href="{U_FEED}?mode=topics_active" />
	<link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FORUM} - {FORUM_NAME}" href="{U_FEED}?f={S_FORUM_ID}" />
	<link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{U_FEED}?f={S_FORUM_ID}&t={S_TOPIC_ID}" />

<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />

<link href="{T_THEME_PATH}/normal.css" rel="stylesheet" type="text/css" title="A" />
<link href="{T_THEME_PATH}/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
<link href="{T_THEME_PATH}/large.css" rel="alternate stylesheet" type="text/css" title="A++" />

	<link href="{T_THEME_PATH}/bidi.css" rel="stylesheet" type="text/css" media="screen, projection" />

<link rel="stylesheet" type="text/css" href="/Theme/CSS/bootstrap2.css" />
<link rel="stylesheet" type="text/css" href="/Theme/CSS/fonts.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/Theme/CSS/HeaderFooter.css" />

<link rel="shortcut icon" href="http://concernedjoe.com/analytics/favicon.ico" />

echo $myController->phpBBHeader();

				{L_INFORMATION}: {L_BOARD_DISABLED}

{FORUM_NAME}

{FORUM_DESC}

Keep the conversation going

What did you have for breakfast? No seriously, what did you have for breakfast?

				{L_INDEX}

							‹ {navlinks.FORUM_NAME}

						‹ {TOPIC_TITLE}

						‹ {L_FAQ}

						‹ {L_SEARCH}

						‹ {L_PROFILE}

						‹ {L_MEMBERLIST}

						‹ {L_MCP}

						‹ {L_POST}

						‹ {L_REPORTING_POST}

redpajama_set_name: RedPajamaGithub


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#nullable enable

using System;
using System.Collections.Immutable;
using System.ComponentModel.Composition;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Debugging;
using Microsoft.CodeAnalysis.EditAndContinue;
using Microsoft.CodeAnalysis.Editor.Implementation.EditAndContinue;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.CodeAnalysis.Shared.Extensions;
using Microsoft.CodeAnalysis.Text;
using Microsoft.VisualStudio.Debugger.UI.Interfaces;
using Roslyn.Utilities;

namespace Microsoft.VisualStudio.LanguageServices.EditAndContinue
{
    [Export(typeof(IDebugStateChangeListener))]
    [ExportMetadata("UIContext", Guids.EncCapableProjectExistsInWorkspaceUIContextString)]
    internal sealed class VisualStudioDebugStateChangeListener : IDebugStateChangeListener
    {
        private readonly Workspace _workspace;
        private readonly IDebuggingWorkspaceService _debuggingService;
        private readonly IActiveStatementTrackingService _activeStatementTrackingService;

        // EnC service or null if EnC is disabled for the debug session.
        private IEditAndContinueWorkspaceService? _encService;

        [ImportingConstructor]
        [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
        public VisualStudioDebugStateChangeListener(VisualStudioWorkspace workspace)
        {
            _workspace = workspace;
            _debuggingService = workspace.Services.GetRequiredService<IDebuggingWorkspaceService>();
            _activeStatementTrackingService = workspace.Services.GetRequiredService<IActiveStatementTrackingService>();
        }

        /// <summary>
        /// Called by the debugger when a debugging session starts and managed debugging is being used.
        /// </summary>
        public void StartDebugging(DebugSessionOptions options)
        {
            _debuggingService.OnBeforeDebuggingStateChanged(DebuggingState.Design, DebuggingState.Run);

            if ((options & DebugSessionOptions.EditAndContinueDisabled) == 0)
            {
                _encService = _workspace.Services.GetRequiredService<IEditAndContinueWorkspaceService>();
                _encService.StartDebuggingSession(_workspace.CurrentSolution);
            }
            else
            {
                _encService = null;
            }
        }

        public void EnterBreakState(IManagedActiveStatementProvider activeStatementProvider)
        {
            _debuggingService.OnBeforeDebuggingStateChanged(DebuggingState.Run, DebuggingState.Break);

            _encService?.StartEditSession(async cancellationToken =>
            {
                var infos = await activeStatementProvider.GetActiveStatementsAsync(cancellationToken).ConfigureAwait(false);
                return infos.SelectAsArray(ModuleUtilities.ToActiveStatementDebugInfo);
            });

            _activeStatementTrackingService.StartTracking();
        }

        public void ExitBreakState()
        {
            _debuggingService.OnBeforeDebuggingStateChanged(DebuggingState.Break, DebuggingState.Run);
            _activeStatementTrackingService.EndTracking();
            _encService?.EndEditSession();
        }

        public void StopDebugging()
        {
            _debuggingService.OnBeforeDebuggingStateChanged(DebuggingState.Run, DebuggingState.Design);
            _encService?.EndDebuggingSession();
        }
    }
}


text:
package org.apache.gobblin.service.modules.scheduler;

import com.google.common.base.Optional;
import com.google.common.base.Predicate;
import com.google.common.io.Files;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
import java.io.File;
import java.net.URI;
import java.util.Collection;
import java.util.Map;
import java.util.Properties;
import org.apache.gobblin.configuration.ConfigurationKeys;
import org.apache.gobblin.runtime.JobException;
import org.apache.gobblin.runtime.api.FlowSpec;
import org.apache.gobblin.runtime.api.Spec;
import org.apache.gobblin.runtime.api.SpecCatalogListener;
import org.apache.gobblin.runtime.app.ServiceBasedAppLauncher;
import org.apache.gobblin.runtime.spec_catalog.AddSpecResponse;
import org.apache.gobblin.runtime.spec_catalog.FlowCatalog;
import org.apache.gobblin.runtime.spec_catalog.TopologyCatalog;
import org.apache.gobblin.scheduler.SchedulerService;
import org.apache.gobblin.service.ServiceConfigKeys;
import org.apache.gobblin.service.modules.flow.MockedSpecCompiler;
import org.apache.gobblin.service.modules.flow.SpecCompiler;
import org.apache.gobblin.service.modules.orchestration.Orchestrator;
import org.apache.gobblin.runtime.spec_catalog.FlowCatalogTest;
import org.apache.gobblin.testing.AssertWithBackoff;
import org.apache.gobblin.util.ConfigUtils;

import org.mockito.Mockito;
import org.mockito.invocation.Invocation;
import org.mockito.stubbing.Answer;
import org.testng.Assert;
import org.testng.annotations.Test;

import static org.apache.gobblin.runtime.spec_catalog.FlowCatalog.*;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;

public class GobblinServiceJobSchedulerTest {
  private static final String TEST_GROUP_NAME = "testGroup";
  private static final String TEST_FLOW_NAME = "testFlow";
  private static final String TEST_SCHEDULE = "0 1/0 * ? * *";
  private static final String TEST_TEMPLATE_URI = "FS:///templates/test.template";

  /**
   * Test whenever JobScheduler is calling setActive, the FlowSpec is loading into scheduledFlowSpecs (eventually)
   */
  @Test
  public void testJobSchedulerInit() throws Exception {
    // Mock a FlowCatalog.
    File specDir = Files.createTempDir();

    Properties properties = new Properties();
    properties.setProperty(FLOWSPEC_STORE_DIR_KEY, specDir.getAbsolutePath());
    FlowCatalog flowCatalog = new FlowCatalog(ConfigUtils.propertiesToConfig(properties));
    SpecCatalogListener mockListener = Mockito.mock(SpecCatalogListener.class);
    when(mockListener.getName()).thenReturn(ServiceConfigKeys.GOBBLIN_SERVICE_JOB_SCHEDULER_LISTENER_CLASS);
    when(mockListener.onAddSpec(any())).thenReturn(new AddSpecResponse(""));
    flowCatalog.addListener(mockListener);
    ServiceBasedAppLauncher serviceLauncher = new ServiceBasedAppLauncher(properties, "GaaSJobSchedulerTest");

    serviceLauncher.addService(flowCatalog);
    serviceLauncher.start();

    FlowSpec flowSpec0 = FlowCatalogTest.initFlowSpec(specDir.getAbsolutePath(), URI.create("spec0"));
    FlowSpec flowSpec1 = FlowCatalogTest.initFlowSpec(specDir.getAbsolutePath(), URI.create("spec1"));

    flowCatalog.put(flowSpec0, true);
    flowCatalog.put(flowSpec1, true);

    Assert.assertEquals(flowCatalog.getSpecs().size(), 2);

    Orchestrator mockOrchestrator = Mockito.mock(Orchestrator.class);

    // Mock a GaaS scheduler.
    TestGobblinServiceJobScheduler scheduler = new TestGobblinServiceJobScheduler("testscheduler",
        ConfigFactory.empty(), Optional.of(flowCatalog), null, mockOrchestrator, null);

    SpecCompiler mockCompiler = Mockito.mock(SpecCompiler.class);
    Mockito.when(mockOrchestrator.getSpecCompiler()).thenReturn(mockCompiler);
    Mockito.doAnswer((Answer<Void>) a -> {
      scheduler.isCompilerHealthy = true;
      return null;
    }).when(mockCompiler).awaitHealthy();

    scheduler.setActive(true);

    AssertWithBackoff.create().timeoutMs(20000).maxSleepMs(2000).backoffFactor(2)
        .assertTrue(new Predicate<Void>() {
          @Override
          public boolean apply(Void input) {
            Map<String, Spec> scheduledFlowSpecs = scheduler.scheduledFlowSpecs;
            if (scheduledFlowSpecs != null && scheduledFlowSpecs.size() == 2) {
              return scheduler.scheduledFlowSpecs.containsKey("spec0") &&
                  scheduler.scheduledFlowSpecs.containsKey("spec1");
            } else {
              return false;
            }
          }
        }, "Waiting all flowSpecs to be scheduled");
  }

  @Test
  public void testDisableFlowRunImmediatelyOnStart()
      throws Exception {
    Properties properties = new Properties();
    properties.setProperty(ConfigurationKeys.FLOW_RUN_IMMEDIATELY, "true");
    properties.setProperty(ConfigurationKeys.JOB_SCHEDULE_KEY, TEST_SCHEDULE);
    properties.setProperty(ConfigurationKeys.JOB_GROUP_KEY, TEST_GROUP_NAME);
    properties.setProperty(ConfigurationKeys.JOB_NAME_KEY, TEST_FLOW_NAME);
    Config config = ConfigFactory.parseProperties(properties);
    FlowSpec spec = FlowSpec.builder().withTemplate(new URI(TEST_TEMPLATE_URI)).withVersion("version")
        .withConfigAsProperties(properties).withConfig(config).build();
    FlowSpec modifiedSpec = (FlowSpec) GobblinServiceJobScheduler.disableFlowRunImmediatelyOnStart(spec);
    for (URI templateURI : modifiedSpec.getTemplateURIs().get()) {
      Assert.assertEquals(templateURI.toString(), TEST_TEMPLATE_URI);
    }
    Assert.assertEquals(modifiedSpec.getVersion(), "version");
    Config modifiedConfig = modifiedSpec.getConfig();
    Assert.assertFalse(modifiedConfig.getBoolean(ConfigurationKeys.FLOW_RUN_IMMEDIATELY));
    Assert.assertEquals(modifiedConfig.getString(ConfigurationKeys.JOB_GROUP_KEY), TEST_GROUP_NAME);
    Assert.assertEquals(modifiedConfig.getString(ConfigurationKeys.JOB_NAME_KEY), TEST_FLOW_NAME);
  }

  /**
   * Test that flowSpecs that throw compilation errors do not block the scheduling of other flowSpecs
   */
  @Test
  public void testJobSchedulerInitWithFailedSpec() throws Exception {
    // Mock a FlowCatalog.
    File specDir = Files.createTempDir();

    Properties properties = new Properties();
    properties.setProperty(FLOWSPEC_STORE_DIR_KEY, specDir.getAbsolutePath());
    FlowCatalog flowCatalog = new FlowCatalog(ConfigUtils.propertiesToConfig(properties));
    ServiceBasedAppLauncher serviceLauncher = new ServiceBasedAppLauncher(properties, "GaaSJobSchedulerTest");

    // Assume that the catalog can store corrupted flows
    SpecCatalogListener mockListener = Mockito.mock(SpecCatalogListener.class);
    when(mockListener.getName()).thenReturn(ServiceConfigKeys.GOBBLIN_SERVICE_JOB_SCHEDULER_LISTENER_CLASS);
    when(mockListener.onAddSpec(any())).thenReturn(new AddSpecResponse(""));
    flowCatalog.addListener(mockListener);

    serviceLauncher.addService(flowCatalog);
    serviceLauncher.start();

    FlowSpec flowSpec0 = FlowCatalogTest.initFlowSpec(specDir.getAbsolutePath(), URI.create("spec0"),
        MockedSpecCompiler.UNCOMPILABLE_FLOW);
    FlowSpec flowSpec1 = FlowCatalogTest.initFlowSpec(specDir.getAbsolutePath(), URI.create("spec1"));
    FlowSpec flowSpec2 = FlowCatalogTest.initFlowSpec(specDir.getAbsolutePath(), URI.create("spec2"));

    // Ensure that these flows are scheduled
    flowCatalog.put(flowSpec0, true);
    flowCatalog.put(flowSpec1, true);
    flowCatalog.put(flowSpec2, true);

    Assert.assertEquals(flowCatalog.getSpecs().size(), 3);

    Orchestrator mockOrchestrator = Mockito.mock(Orchestrator.class);

    // Mock a GaaS scheduler.
    TestGobblinServiceJobScheduler scheduler = new TestGobblinServiceJobScheduler("testscheduler",
        ConfigFactory.empty(), Optional.of(flowCatalog), null, mockOrchestrator, null);

    SpecCompiler mockCompiler = Mockito.mock(SpecCompiler.class);
    Mockito.when(mockOrchestrator.getSpecCompiler()).thenReturn(mockCompiler);
    Mockito.doAnswer((Answer<Void>) a -> {
      scheduler.isCompilerHealthy = true;
      return null;
    }).when(mockCompiler).awaitHealthy();

    scheduler.setActive(true);

    AssertWithBackoff.create().timeoutMs(20000).maxSleepMs(2000).backoffFactor(2)
        .assertTrue(new Predicate<Void>() {
          @Override
          public boolean apply(Void input) {
            Map<String, Spec> scheduledFlowSpecs = scheduler.scheduledFlowSpecs;
            if (scheduledFlowSpecs != null && scheduledFlowSpecs.size() == 2) {
              return scheduler.scheduledFlowSpecs.containsKey("spec1") &&
                  scheduler.scheduledFlowSpecs.containsKey("spec2");
            } else {
              return false;
            }
          }
        }, "Waiting all flowSpecs to be scheduled");
  }

  /**
   * Test that flowSpecs that throw compilation errors do not block the scheduling of other flowSpecs
   */
  @Test
  public void testJobSchedulerUnschedule() throws Exception {
    // Mock a FlowCatalog.
    File specDir = Files.createTempDir();

    Properties properties = new Properties();
    properties.setProperty(FLOWSPEC_STORE_DIR_KEY, specDir.getAbsolutePath());
    FlowCatalog flowCatalog = new FlowCatalog(ConfigUtils.propertiesToConfig(properties));
    ServiceBasedAppLauncher serviceLauncher = new ServiceBasedAppLauncher(properties, "GaaSJobSchedulerTest");

    // Assume that the catalog can store corrupted flows
    SpecCatalogListener mockListener = Mockito.mock(SpecCatalogListener.class);
    when(mockListener.getName()).thenReturn(ServiceConfigKeys.GOBBLIN_SERVICE_JOB_SCHEDULER_LISTENER_CLASS);
    when(mockListener.onAddSpec(any())).thenReturn(new AddSpecResponse(""));
    flowCatalog.addListener(mockListener);

    serviceLauncher.addService(flowCatalog);
    serviceLauncher.start();

    FlowSpec flowSpec0 = FlowCatalogTest.initFlowSpec(specDir.getAbsolutePath(), URI.create("spec0"));
    FlowSpec flowSpec1 = FlowCatalogTest.initFlowSpec(specDir.getAbsolutePath(), URI.create("spec1"));
    FlowSpec flowSpec2 = FlowCatalogTest.initFlowSpec(specDir.getAbsolutePath(), URI.create("spec2"));

    // Ensure that these flows are scheduled
    flowCatalog.put(flowSpec0, true);
    flowCatalog.put(flowSpec1, true);
    flowCatalog.put(flowSpec2, true);

    Assert.assertEquals(flowCatalog.getSpecs().size(), 3);

    Orchestrator mockOrchestrator = Mockito.mock(Orchestrator.class);
    SchedulerService schedulerService = new SchedulerService(new Properties());
    // Mock a GaaS scheduler.
    TestGobblinServiceJobScheduler scheduler = new TestGobblinServiceJobScheduler("testscheduler",
        ConfigFactory.empty(), Optional.of(flowCatalog), null, mockOrchestrator, schedulerService );

    schedulerService.startAsync().awaitRunning();
    scheduler.startUp();
    SpecCompiler mockCompiler = Mockito.mock(SpecCompiler.class);
    Mockito.when(mockOrchestrator.getSpecCompiler()).thenReturn(mockCompiler);
    Mockito.doAnswer((Answer<Void>) a -> {
      scheduler.isCompilerHealthy = true;
      return null;
    }).when(mockCompiler).awaitHealthy();

    scheduler.setActive(true);

    AssertWithBackoff.create().timeoutMs(20000).maxSleepMs(2000).backoffFactor(2)
        .assertTrue(new Predicate<Void>() {
          @Override
          public boolean apply(Void input) {
            Map<String, Spec> scheduledFlowSpecs = scheduler.scheduledFlowSpecs;
            if (scheduledFlowSpecs != null && scheduledFlowSpecs.size() == 3) {
              return scheduler.scheduledFlowSpecs.containsKey("spec0") &&
                  scheduler.scheduledFlowSpecs.containsKey("spec1") &&
                  scheduler.scheduledFlowSpecs.containsKey("spec2");
            } else {
              return false;
            }
          }
        }, "Waiting all flowSpecs to be scheduled");

    // set scheduler to be inactive and unschedule flows
    scheduler.setActive(false);
    Collection<Invocation> invocations = Mockito.mockingDetails(mockOrchestrator).getInvocations();

    for (Invocation invocation: invocations) {
      // ensure that orchestrator is not calling remove
      Assert.assertFalse(invocation.getMethod().getName().equals("remove"));
    }

    Assert.assertEquals(scheduler.scheduledFlowSpecs.size(), 0);
    Assert.assertEquals(schedulerService.getScheduler().getJobGroupNames().size(), 0);
  }

  class TestGobblinServiceJobScheduler extends GobblinServiceJobScheduler {
    public boolean isCompilerHealthy = false;
    private boolean hasScheduler = false;

    public TestGobblinServiceJobScheduler(String serviceName, Config config,
        Optional<FlowCatalog> flowCatalog, Optional<TopologyCatalog> topologyCatalog, Orchestrator orchestrator,
        SchedulerService schedulerService) throws Exception {
      super(serviceName, config, Optional.absent(), flowCatalog, topologyCatalog, orchestrator, schedulerService, Optional.absent());
      if (schedulerService != null) {
        hasScheduler = true;
      }
    }

    /**
     * Override super method to only add spec into in-memory containers but not scheduling anything to simplify testing.
     */
    @Override
    public AddSpecResponse onAddSpec(Spec addedSpec) {
      String flowName = (String) ((FlowSpec) addedSpec).getConfigAsProperties().get(ConfigurationKeys.FLOW_NAME_KEY);
      if (flowName.equals(MockedSpecCompiler.UNCOMPILABLE_FLOW)) {
        throw new RuntimeException("Could not compile flow");
      }
      super.scheduledFlowSpecs.put(addedSpec.getUri().toString(), addedSpec);
      if (hasScheduler) {
        try {
          scheduleJob(((FlowSpec) addedSpec).getConfigAsProperties(), null);
        } catch (JobException e) {
          throw new RuntimeException(e);
        }
      }
      // Check that compiler is healthy at time of scheduling flows
      Assert.assertTrue(isCompilerHealthy);
      return new AddSpecResponse(addedSpec.getDescription());
    }
  }
}


text:
package uk.ac.ebi.gxa.db;

import org.junit.Test;

import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.sql.SQLException;

import static org.easymock.EasyMock.*;

/**
 * @author alf
 */
public class TestOracleScriptSplitter {
    @Test
    public void testPackage() throws IOException, SQLException {
        String sourceScript = "TestOracleScriptSplitter-package_with_body.sql";
        String[] expectedStatements = {
                "CREATE OR REPLACE PACKAGE ATLASMGR IS\n" +
                        "PROCEDURE DisableConstraints;\n" +
                        "PROCEDURE EnableConstraints;\n" +
                        "PROCEDURE DisableTriggers;\n" +
                        "PROCEDURE EnableTriggers;\n" +
                        "PROCEDURE RebuildSequence(seq_name varchar2);\n" +
                        "PROCEDURE RebuildSequences;\n" +
                        "PROCEDURE RebuildIndex;\n" +
                        "PROCEDURE fix_sequence(tbl VARCHAR2, field VARCHAR2, seq VARCHAR2);\n" +
                        "END ATLASMGR;",
                "CREATE OR REPLACE PACKAGE BODY ATLASMGR AS\n" +
                        "PROCEDURE DisableConstraints\n" +
                        "AS\n" +
                        "cursor c1 is select CONSTRAINT_NAME, TABLE_NAME from user_constraints where constraint_type = 'R';\n" +
                        "q varchar2(8000);\n" +
                        "begin\n" +
                        "for rec in c1\n" +
                        "loop\n" +
                        "q := 'ALTER TABLE ' || rec.TABLE_NAME  || ' DISABLE CONSTRAINT ' || rec.CONSTRAINT_NAME;\n" +
                        "dbms_output.put_line(q);\n" +
                        "EXECUTE IMMEDIATE q;\n" +
                        "end loop;\n" +
                        "END;\n" +
                        "END;"};
        checkParser(sourceScript, expectedStatements);
    }

    @Test
    public void testSimpleStatements() throws IOException, SQLException {
        String sourceScript = "TestOracleScriptSplitter-simple_statements.sql";
        String[] expectedStatements = {
                "select * from dual",
                "select spv.sampleid, o.name, o.organismid from a2_samplepv spv\n" +
                        "join a2_propertyvalue pv on pv.propertyvalueid = spv.propertyvalueid\n" +
                        "join a2_property p on p.propertyid = pv.propertyid\n" +
                        "join a2_organism o on lower(o.name) = lower(pv.name)\n" +
                        "where p.name = 'organism'",
                "update ( select s1.organismid, s2.organismid as orgid\n" +
                        "from A2_SAMPLE s1\n" +
                        "inner join A2_SAMPLE_ORGANISM_TMP s2 ON s1.sampleid = s2.sampleid\n" +
                        ") o set o.organismid = o.orgid"};
        checkParser(sourceScript, expectedStatements);
    }

    @Test
    public void testLastStatement() throws IOException, SQLException {
        String sourceScript = "TestOracleScriptSplitter-last_statement.sql";
        String[] expectedStatements = {
                "select * from dual1",
                "select * from dual2"};
        checkParser(sourceScript, expectedStatements);
    }

    @Test
    public void testTrigger() throws IOException, SQLException {
        String sourceScript = "TestOracleScriptSplitter-trigger.sql";
        String[] expectedStatements = {
                "CREATE SEQUENCE  \"A2_ONTOLOGY_SEQ\"",
                "CREATE OR REPLACE\n" +
                        "TRIGGER A2_ONTOLOGY_INSERT\n" +
                        "before insert on A2_Ontology\n" +
                        "for each row\n" +
                        "begin\n" +
                        "if( :new.OntologyID is null) then\n" +
                        "select A2_Ontology_seq.nextval into :new.OntologyID from dual;\n" +
                        "end if;\n" +
                        "end;",
                "ALTER TRIGGER A2_ONTOLOGY_INSERT ENABLE",
                "call atlasmgr.RebuildSequences()"};
        checkParser(sourceScript, expectedStatements);
    }

    @Test
    public void testSampleUpdateFrom209() throws IOException, SQLException {
        String sourceScript = "TestOracleScriptSplitter-sample.sql";
        String[] expectedStatements = {
                "DROP TRIGGER \"A2_ASSAYSAMPLE_INSERT\"",
                "DROP SEQUENCE \"A2_ASSAYSAMPLE_SEQ\"",
                "ALTER TABLE \"A2_ASSAYSAMPLE\" DROP CONSTRAINT PK_ASSAYSAMPLE",
                "ALTER TABLE \"A2_ASSAYSAMPLE\" DROP CONSTRAINT UQ_ASSAYSAMPLE",
                "ALTER TABLE \"A2_ASSAYSAMPLE\" DROP COLUMN ASSAYSAMPLEID",
                "ALTER TABLE \"A2_ASSAYSAMPLE\"\n" +
                        "ADD CONSTRAINT \"PK_ASSAYSAMPLE\"\n" +
                        "PRIMARY KEY (ASSAYID,SAMPLEID)\n" +
                        "/*PK_TABLESPACE*/\n" +
                        "ENABLE"};
        checkParser(sourceScript, expectedStatements);
    }

    private void checkParser(String sourceScript, String[] expectedStatements) throws SQLException, IOException {
        SqlStatementExecutor executor = createMock(SqlStatementExecutor.class);
        for (String statement : expectedStatements) {
            executor.executeStatement(statement);
            expectLastCall();
        }
        replay(executor);

        Reader reader = new InputStreamReader(getClass().getClassLoader()
                .getResourceAsStream("uk/ac/ebi/gxa/db/" + sourceScript));
        new OracleScriptSplitter().parse(reader, executor);
        reader.close();
    }
}


text:
using NMF.Collections.Generic;
using NMF.Collections.ObjectModel;
using NMF.Expressions;
using NMF.Expressions.Linq;
using NMF.Models;
using NMF.Models.Collections;
using NMF.Models.Expressions;
using NMF.Models.Meta;
using NMF.Models.Repository;
using NMF.Serialization;
using NMF.Utilities;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;

namespace NMF.Interop.Ecore
{

    /// <summary>
    /// The default implementation of the EStringToStringMapEntry class
    /// </summary>
    [XmlNamespaceAttribute("http://www.eclipse.org/emf/2002/Ecore")]
    [XmlNamespacePrefixAttribute("ecore")]
    [ModelRepresentationClassAttribute("http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry/")]
    public class EStringToStringMapEntry : ModelElement, IEStringToStringMapEntry, IModelElement
    {

        /// <summary>
        /// The backing field for the Key property
        /// </summary>
        private string _key;

        /// <summary>
        /// The backing field for the Value property
        /// </summary>
        private string _value;

        private static IClass _classInstance;

        /// <summary>
        /// The key property
        /// </summary>
        [XmlElementNameAttribute("key")]
        [XmlAttributeAttribute(true)]
        public virtual string Key
        {
            get
            {
                return this._key;
            }
            set
            {
                if ((this._key != value))
                {
                    this.OnKeyChanging(EventArgs.Empty);
                    this.OnPropertyChanging("Key");
                    string old = this._key;
                    this._key = value;
                    ValueChangedEventArgs e = new ValueChangedEventArgs(old, value);
                    this.OnKeyChanged(e);
                    this.OnPropertyChanged("Key", e);
                }
            }
        }

        /// <summary>
        /// The value property
        /// </summary>
        [XmlElementNameAttribute("value")]
        [XmlAttributeAttribute(true)]
        public virtual string Value
        {
            get
            {
                return this._value;
            }
            set
            {
                if ((this._value != value))
                {
                    this.OnValueChanging(EventArgs.Empty);
                    this.OnPropertyChanging("Value");
                    string old = this._value;
                    this._value = value;
                    ValueChangedEventArgs e = new ValueChangedEventArgs(old, value);
                    this.OnValueChanged(e);
                    this.OnPropertyChanged("Value", e);
                }
            }
        }

        /// <summary>
        /// Gets the Class model for this type
        /// </summary>
        public new static IClass ClassInstance
        {
            get
            {
                if ((_classInstance == null))
                {
                    _classInstance = ((IClass)(MetaRepository.Instance.Resolve("http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry/")));
                }
                return _classInstance;
            }
        }

        /// <summary>
        /// Gets fired before the Key property changes its value
        /// </summary>
        public event EventHandler KeyChanging;

        /// <summary>
        /// Gets fired when the Key property changed its value
        /// </summary>
        public event EventHandler<ValueChangedEventArgs> KeyChanged;

        /// <summary>
        /// Gets fired before the Value property changes its value
        /// </summary>
        public event EventHandler ValueChanging;

        /// <summary>
        /// Gets fired when the Value property changed its value
        /// </summary>
        public event EventHandler<ValueChangedEventArgs> ValueChanged;

        /// <summary>
        /// Raises the KeyChanging event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnKeyChanging(EventArgs eventArgs)
        {
            EventHandler handler = this.KeyChanging;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Raises the KeyChanged event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnKeyChanged(ValueChangedEventArgs eventArgs)
        {
            EventHandler<ValueChangedEventArgs> handler = this.KeyChanged;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Raises the ValueChanging event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnValueChanging(EventArgs eventArgs)
        {
            EventHandler handler = this.ValueChanging;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Raises the ValueChanged event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnValueChanged(ValueChangedEventArgs eventArgs)
        {
            EventHandler<ValueChangedEventArgs> handler = this.ValueChanged;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Resolves the given attribute name
        /// </summary>
        /// <returns>The attribute value or null if it could not be found</returns>
        /// <param name="attribute">The requested attribute name</param>
        /// <param name="index">The index of this attribute</param>
        protected override object GetAttributeValue(string attribute, int index)
        {
            if ((attribute == "KEY"))
            {
                return this.Key;
            }
            if ((attribute == "VALUE"))
            {
                return this.Value;
            }
            return base.GetAttributeValue(attribute, index);
        }

        /// <summary>
        /// Sets a value to the given feature
        /// </summary>
        /// <param name="feature">The requested feature</param>
        /// <param name="value">The value that should be set to that feature</param>
        protected override void SetFeature(string feature, object value)
        {
            if ((feature == "KEY"))
            {
                this.Key = ((string)(value));
                return;
            }
            if ((feature == "VALUE"))
            {
                this.Value = ((string)(value));
                return;
            }
            base.SetFeature(feature, value);
        }

        /// <summary>
        /// Gets the Class for this model element
        /// </summary>
        public override IClass GetClass()
        {
            if ((_classInstance == null))
            {
                _classInstance = ((IClass)(MetaRepository.Instance.Resolve("http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry/")));
            }
            return _classInstance;
        }

        /// <summary>
        /// Represents a proxy to represent an incremental access to the key property
        /// </summary>
        private sealed class KeyProxy : ModelPropertyChange<IEStringToStringMapEntry, string>
        {

            /// <summary>
            /// Creates a new observable property access proxy
            /// </summary>
            /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
            public KeyProxy(IEStringToStringMapEntry modelElement) :
                    base(modelElement)
            {
            }

            /// <summary>
            /// Gets or sets the value of this expression
            /// </summary>
            public override string Value
            {
                get
                {
                    return this.ModelElement.Key;
                }
                set
                {
                    this.ModelElement.Key = value;
                }
            }

            /// <summary>
            /// Registers an event handler to subscribe specifically on the changed event for this property
            /// </summary>
            /// <param name="handler">The handler that should be subscribed to the property change event</param>
            protected override void RegisterChangeEventHandler(System.EventHandler<NMF.Expressions.ValueChangedEventArgs> handler)
            {
                this.ModelElement.KeyChanged += handler;
            }

            /// <summary>
            /// Registers an event handler to subscribe specifically on the changed event for this property
            /// </summary>
            /// <param name="handler">The handler that should be unsubscribed from the property change event</param>
            protected override void UnregisterChangeEventHandler(System.EventHandler<NMF.Expressions.ValueChangedEventArgs> handler)
            {
                this.ModelElement.KeyChanged -= handler;
            }
        }

        /// <summary>
        /// Represents a proxy to represent an incremental access to the value property
        /// </summary>
        private sealed class ValueProxy : ModelPropertyChange<IEStringToStringMapEntry, string>
        {

            /// <summary>
            /// Creates a new observable property access proxy
            /// </summary>
            /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
            public ValueProxy(IEStringToStringMapEntry modelElement) :
                    base(modelElement)
            {
            }

            /// <summary>
            /// Gets or sets the value of this expression
            /// </summary>
            public override string Value
            {
                get
                {
                    return this.ModelElement.Value;
                }
                set
                {
                    this.ModelElement.Value = value;
                }
            }

            /// <summary>
            /// Registers an event handler to subscribe specifically on the changed event for this property
            /// </summary>
            /// <param name="handler">The handler that should be subscribed to the property change event</param>
            protected override void RegisterChangeEventHandler(System.EventHandler<NMF.Expressions.ValueChangedEventArgs> handler)
            {
                this.ModelElement.ValueChanged += handler;
            }

            /// <summary>
            /// Registers an event handler to subscribe specifically on the changed event for this property
            /// </summary>
            /// <param name="handler">The handler that should be unsubscribed from the property change event</param>
            protected override void UnregisterChangeEventHandler(System.EventHandler<NMF.Expressions.ValueChangedEventArgs> handler)
            {
                this.ModelElement.ValueChanged -= handler;
            }
        }
    }
}


text:
<?xml version='1.0' encoding='utf-8'?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

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

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

<!-- Additional config:
 JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
 JAVA_OPTS="-Djava.awt.headless=true -Xmx960m -XX:+UseG1GC -XX:+UseStringDeduplication"
-->

<Server port="8005" shutdown="SHUTDOWN">
  <!--APR library loader. Documentation at /docs/apr.html -->
  <!--<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />-->
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

  <Service name="Catalina">

    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="10" minSpareThreads="2"/>

    <Connector port="80" protocol="org.apache.coyote.http11.Http11Nio2Protocol"
               redirectPort="443"
               server="Apache" compression="4096"
               executor="tomcatThreadPool"
               URIEncoding="UTF-8"/>

    <Connector port="443" protocol="org.apache.coyote.http11.Http11Nio2Protocol"
               server="Apache" compression="4096"
               executor="tomcatThreadPool"
               SSLEnabled="true" scheme="https" secure="true"
               keyAlias="zxingorg"
               keystoreFile="" keystorePass=""
               URIEncoding="UTF-8" />

    <Engine name="Catalina" defaultHost="localhost">

      <Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="true">

        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt" rotatable="false"
               pattern="%h %l %u %t "%r" %s %b" />

      </Host>
    </Engine>
  </Service>
</Server>


text:
export default assignWithDepth;
/**
 * @function assignWithDepth Extends the functionality of {@link ObjectConstructor.assign} with the
 *   ability to merge arbitrary-depth objects For each key in src with path `k` (recursively)
 *   performs an Object.assign(dst[`k`], src[`k`]) with a slight change from the typical handling of
 *   undefined for dst[`k`]: instead of raising an error, dst[`k`] is auto-initialized to {} and
 *   effectively merged with src[`k`]<p> Additionally, dissimilar types will not clobber unless the
 *   config.clobber parameter === true. Example:
 *
 *   ```js
 *   let config_0 = { foo: { bar: 'bar' }, bar: 'foo' };
 *   let config_1 = { foo: 'foo', bar: 'bar' };
 *   let result = assignWithDepth(config_0, config_1);
 *   console.log(result);
 *   //-> result: { foo: { bar: 'bar' }, bar: 'bar' }
 *   ```
 *
 *   Traditional Object.assign would have clobbered foo in config_0 with foo in config_1. If src is a
 *   destructured array of objects and dst is not an array, assignWithDepth will apply each element
 *   of src to dst in order.
 * @param {any} dst - The destination of the merge
 * @param {any} src - The source object(s) to merge into destination
 * @param {{ depth: number; clobber: boolean }} [config={ depth: 2, clobber: false }] - Depth: depth
 *   to traverse within src and dst for merging - clobber: should dissimilar types clobber (default:
 *   { depth: 2, clobber: false }). Default is `{ depth: 2, clobber: false }`
 * @returns {any}
 */
declare function assignWithDepth(dst: any, src: any, config?: {
    depth: number;
    clobber: boolean;
} | undefined): any;


text:
#include "El.hpp"

namespace El {

// Draw each entry from a uniform PDF over a closed ball.

template<typename T>
void MakeUniform( Matrix<T>& A, T center, Base<T> radius )
{
    DEBUG_ONLY(CallStackEntry cse("MakeUniform"))
    auto sampleBall = [=]() { return SampleBall(center,radius); };
    EntrywiseFill( A, function<T()>(sampleBall) );
}

template<typename T>
void Uniform( Matrix<T>& A, Int m, Int n, T center, Base<T> radius )
{
    DEBUG_ONLY(CallStackEntry cse("Uniform"))
    A.Resize( m, n );
    MakeUniform( A, center, radius );
}

template<typename T>
void MakeUniform( AbstractDistMatrix<T>& A, T center, Base<T> radius )
{
    DEBUG_ONLY(CallStackEntry cse("MakeUniform"))
    if( A.RedundantRank() == 0 )
        MakeUniform( A.Matrix(), center, radius );
    Broadcast( A, A.RedundantComm(), 0 );
}

template<typename T>
void MakeUniform( AbstractBlockDistMatrix<T>& A, T center, Base<T> radius )
{
    DEBUG_ONLY(CallStackEntry cse("MakeUniform"))
    if( A.RedundantRank() == 0 )
        MakeUniform( A.Matrix(), center, radius );
    Broadcast( A, A.RedundantComm(), 0 );
}

template<typename T>
void Uniform( AbstractDistMatrix<T>& A, Int m, Int n, T center, Base<T> radius )
{
    DEBUG_ONLY(CallStackEntry cse("Uniform"))
    A.Resize( m, n );
    MakeUniform( A, center, radius );
}

template<typename T>
void Uniform
( AbstractBlockDistMatrix<T>& A, Int m, Int n, T center, Base<T> radius )
{
    DEBUG_ONLY(CallStackEntry cse("Uniform"))
    A.Resize( m, n );
    MakeUniform( A, center, radius );
}

template<typename T>
void MakeUniform( DistMultiVec<T>& X, T center, Base<T> radius )
{
    DEBUG_ONLY(CallStackEntry cse("MakeUniform"))
    const int localHeight = X.LocalHeight();
    const int width = X.Width();
    for( int j=0; j<width; ++j )
        for( int iLocal=0; iLocal<localHeight; ++iLocal )
            X.SetLocal( iLocal, j, SampleBall(center,radius) );
}

template<typename T>
void Uniform( DistMultiVec<T>& A, Int m, Int n, T center, Base<T> radius )
{
    DEBUG_ONLY(CallStackEntry cse("Uniform"))
    A.Resize( m, n );
    MakeUniform( A, center, radius );
}

#define PROTO(T) \
  template void MakeUniform \
  ( Matrix<T>& A, T center, Base<T> radius ); \
  template void MakeUniform \
  ( AbstractDistMatrix<T>& A, T center, Base<T> radius ); \
  template void MakeUniform \
  ( AbstractBlockDistMatrix<T>& A, T center, Base<T> radius ); \
  template void MakeUniform( DistMultiVec<T>& A, T center, Base<T> radius ); \
  template void Uniform \
  ( Matrix<T>& A, Int m, Int n, T center, Base<T> radius ); \
  template void Uniform \
  ( AbstractDistMatrix<T>& A, Int m, Int n, T center, Base<T> radius ); \
  template void Uniform \
  ( AbstractBlockDistMatrix<T>& A, Int m, Int n, T center, Base<T> radius ); \
  template void Uniform \
  ( DistMultiVec<T>& A, Int m, Int n, T center, Base<T> radius );

#include "El/macros/Instantiate.h"

} // namespace El


text:
import getDays from '.';

describe(`[Dates]: getDays`, () => {
  it(`without any options should return US American long formatted dates`, () => {
    expect(getDays()).toEqual([`Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`]);
  });

  it(`with the nl-BE locale`, () => {
    expect(getDays(`nl-BE`)).toEqual([`zondag`, `maandag`, `dinsdag`, `woensdag`, `donderdag`, `vrijdag`, `zaterdag`]);
  });

  it(`with a short format`, () => {
    expect(getDays(`en-US`, `short`)).toEqual([`Sun`, `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`]);
  });
});


text:
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

import { Data } from '../data.js';
import { BN } from '../util/bn.js';
import { Vector } from '../vector.js';
import { Visitor } from '../visitor.js';
import { MapRow } from '../row/map.js';
import { StructRow, StructRowProxy } from '../row/struct.js';
import { decodeUtf8 } from '../util/utf8.js';
import { TypeToDataType } from '../interfaces.js';
import { uint16ToFloat64 } from '../util/math.js';
import { Type, UnionMode, Precision, DateUnit, TimeUnit, IntervalUnit } from '../enum.js';
import {
    DataType, Dictionary,
    Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,
    Float, Float16, Float32, Float64,
    Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64,
    Date_, DateDay, DateMillisecond,
    Interval, IntervalDayTime, IntervalYearMonth,
    Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond,
    Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond,
    Union, DenseUnion, SparseUnion,
} from '../type.js';

/** @ignore */
export interface GetVisitor extends Visitor {
    visit<T extends DataType>(node: Data<T>, index: number): T['TValue'] | null;
    visitMany<T extends DataType>(nodes: Data<T>[], indices: number[]): (T['TValue'] | null)[];
    getVisitFn<T extends DataType>(node: Vector<T> | Data<T> | T): (data: Data<T>, index: number) => T['TValue'] | null;
    getVisitFn<T extends Type>(node: T): (data: Data<TypeToDataType<T>>, index: number) => TypeToDataType<T>['TValue'];
    visitNull<T extends Null>(data: Data<T>, index: number): T['TValue'] | null;
    visitBool<T extends Bool>(data: Data<T>, index: number): T['TValue'] | null;
    visitInt<T extends Int>(data: Data<T>, index: number): T['TValue'] | null;
    visitInt8<T extends Int8>(data: Data<T>, index: number): T['TValue'] | null;
    visitInt16<T extends Int16>(data: Data<T>, index: number): T['TValue'] | null;
    visitInt32<T extends Int32>(data: Data<T>, index: number): T['TValue'] | null;
    visitInt64<T extends Int64>(data: Data<T>, index: number): T['TValue'] | null;
    visitUint8<T extends Uint8>(data: Data<T>, index: number): T['TValue'] | null;
    visitUint16<T extends Uint16>(data: Data<T>, index: number): T['TValue'] | null;
    visitUint32<T extends Uint32>(data: Data<T>, index: number): T['TValue'] | null;
    visitUint64<T extends Uint64>(data: Data<T>, index: number): T['TValue'] | null;
    visitFloat<T extends Float>(data: Data<T>, index: number): T['TValue'] | null;
    visitFloat16<T extends Float16>(data: Data<T>, index: number): T['TValue'] | null;
    visitFloat32<T extends Float32>(data: Data<T>, index: number): T['TValue'] | null;
    visitFloat64<T extends Float64>(data: Data<T>, index: number): T['TValue'] | null;
    visitUtf8<T extends Utf8>(data: Data<T>, index: number): T['TValue'] | null;
    visitBinary<T extends Binary>(data: Data<T>, index: number): T['TValue'] | null;
    visitFixedSizeBinary<T extends FixedSizeBinary>(data: Data<T>, index: number): T['TValue'] | null;
    visitDate<T extends Date_>(data: Data<T>, index: number): T['TValue'] | null;
    visitDateDay<T extends DateDay>(data: Data<T>, index: number): T['TValue'] | null;
    visitDateMillisecond<T extends DateMillisecond>(data: Data<T>, index: number): T['TValue'] | null;
    visitTimestamp<T extends Timestamp>(data: Data<T>, index: number): T['TValue'] | null;
    visitTimestampSecond<T extends TimestampSecond>(data: Data<T>, index: number): T['TValue'] | null;
    visitTimestampMillisecond<T extends TimestampMillisecond>(data: Data<T>, index: number): T['TValue'] | null;
    visitTimestampMicrosecond<T extends TimestampMicrosecond>(data: Data<T>, index: number): T['TValue'] | null;
    visitTimestampNanosecond<T extends TimestampNanosecond>(data: Data<T>, index: number): T['TValue'] | null;
    visitTime<T extends Time>(data: Data<T>, index: number): T['TValue'] | null;
    visitTimeSecond<T extends TimeSecond>(data: Data<T>, index: number): T['TValue'] | null;
    visitTimeMillisecond<T extends TimeMillisecond>(data: Data<T>, index: number): T['TValue'] | null;
    visitTimeMicrosecond<T extends TimeMicrosecond>(data: Data<T>, index: number): T['TValue'] | null;
    visitTimeNanosecond<T extends TimeNanosecond>(data: Data<T>, index: number): T['TValue'] | null;
    visitDecimal<T extends Decimal>(data: Data<T>, index: number): T['TValue'] | null;
    visitList<T extends List>(data: Data<T>, index: number): T['TValue'] | null;
    visitStruct<T extends Struct>(data: Data<T>, index: number): T['TValue'] | null;
    visitUnion<T extends Union>(data: Data<T>, index: number): T['TValue'] | null;
    visitDenseUnion<T extends DenseUnion>(data: Data<T>, index: number): T['TValue'] | null;
    visitSparseUnion<T extends SparseUnion>(data: Data<T>, index: number): T['TValue'] | null;
    visitDictionary<T extends Dictionary>(data: Data<T>, index: number): T['TValue'] | null;
    visitInterval<T extends Interval>(data: Data<T>, index: number): T['TValue'] | null;
    visitIntervalDayTime<T extends IntervalDayTime>(data: Data<T>, index: number): T['TValue'] | null;
    visitIntervalYearMonth<T extends IntervalYearMonth>(data: Data<T>, index: number): T['TValue'] | null;
    visitFixedSizeList<T extends FixedSizeList>(data: Data<T>, index: number): T['TValue'] | null;
    visitMap<T extends Map_>(data: Data<T>, index: number): T['TValue'] | null;
}

/** @ignore */
export class GetVisitor extends Visitor { }

/** @ignore */
function wrapGet<T extends DataType>(fn: (data: Data<T>, _1: any) => any) {
    return (data: Data<T>, _1: any) => data.getValid(_1) ? fn(data, _1) : null;
}

/** @ignore */const epochDaysToMs = (data: Int32Array, index: number) => 86400000 * data[index];
/** @ignore */const epochMillisecondsLongToMs = (data: Int32Array, index: number) => 4294967296 * (data[index + 1]) + (data[index] >>> 0);
/** @ignore */const epochMicrosecondsLongToMs = (data: Int32Array, index: number) => 4294967296 * (data[index + 1] / 1000) + ((data[index] >>> 0) / 1000);
/** @ignore */const epochNanosecondsLongToMs = (data: Int32Array, index: number) => 4294967296 * (data[index + 1] / 1000000) + ((data[index] >>> 0) / 1000000);

/** @ignore */const epochMillisecondsToDate = (epochMs: number) => new Date(epochMs);
/** @ignore */const epochDaysToDate = (data: Int32Array, index: number) => epochMillisecondsToDate(epochDaysToMs(data, index));
/** @ignore */const epochMillisecondsLongToDate = (data: Int32Array, index: number) => epochMillisecondsToDate(epochMillisecondsLongToMs(data, index));

/** @ignore */
const getNull = <T extends Null>(_data: Data<T>, _index: number): T['TValue'] => null;
/** @ignore */
const getVariableWidthBytes = (values: Uint8Array, valueOffsets: Int32Array, index: number) => {
    if (index + 1 >= valueOffsets.length) {
        return null as any;
    }
    const x = valueOffsets[index];
    const y = valueOffsets[index + 1];
    return values.subarray(x, y);
};

/** @ignore */
const getBool = <T extends Bool>({ offset, values }: Data<T>, index: number): T['TValue'] => {
    const idx = offset + index;
    const byte = values[idx >> 3];
    return (byte & 1 << (idx % 8)) !== 0;
};

/** @ignore */
type Numeric1X = Int8 | Int16 | Int32 | Uint8 | Uint16 | Uint32 | Float32 | Float64;
/** @ignore */
type Numeric2X = Int64 | Uint64;

/** @ignore */
const getDateDay = <T extends DateDay>({ values }: Data<T>, index: number): T['TValue'] => epochDaysToDate(values, index);
/** @ignore */
const getDateMillisecond = <T extends DateMillisecond>({ values }: Data<T>, index: number): T['TValue'] => epochMillisecondsLongToDate(values, index * 2);
/** @ignore */
const getNumeric = <T extends Numeric1X>({ stride, values }: Data<T>, index: number): T['TValue'] => values[stride * index];
/** @ignore */
const getFloat16 = <T extends Float16>({ stride, values }: Data<T>, index: number): T['TValue'] => uint16ToFloat64(values[stride * index]);
/** @ignore */
const getBigInts = <T extends Numeric2X>({ values }: Data<T>, index: number): T['TValue'] => values[index];
/** @ignore */
const getFixedSizeBinary = <T extends FixedSizeBinary>({ stride, values }: Data<T>, index: number): T['TValue'] => values.subarray(stride * index, stride * (index + 1));

/** @ignore */
const getBinary = <T extends Binary>({ values, valueOffsets }: Data<T>, index: number): T['TValue'] => getVariableWidthBytes(values, valueOffsets, index);
/** @ignore */
const getUtf8 = <T extends Utf8>({ values, valueOffsets }: Data<T>, index: number): T['TValue'] => {
    const bytes = getVariableWidthBytes(values, valueOffsets, index);
    return bytes !== null ? decodeUtf8(bytes) : null as any;
};

/* istanbul ignore next */
/** @ignore */
const getInt = <T extends Int>({ values }: Data<T>, index: number): T['TValue'] => values[index];

/* istanbul ignore next */
/** @ignore */
const getFloat = <T extends Float>({ type, values }: Data<T>, index: number): T['TValue'] => (
    type.precision !== Precision.HALF ? values[index] : uint16ToFloat64(values[index])
);

/* istanbul ignore next */
/** @ignore */
const getDate = <T extends Date_>(data: Data<T>, index: number): T['TValue'] => (
    data.type.unit === DateUnit.DAY
        ? getDateDay(data as Data<DateDay>, index)
        : getDateMillisecond(data as Data<DateMillisecond>, index)
);

/** @ignore */
const getTimestampSecond = <T extends TimestampSecond>({ values }: Data<T>, index: number): T['TValue'] => 1000 * epochMillisecondsLongToMs(values, index * 2);
/** @ignore */
const getTimestampMillisecond = <T extends TimestampMillisecond>({ values }: Data<T>, index: number): T['TValue'] => epochMillisecondsLongToMs(values, index * 2);
/** @ignore */
const getTimestampMicrosecond = <T extends TimestampMicrosecond>({ values }: Data<T>, index: number): T['TValue'] => epochMicrosecondsLongToMs(values, index * 2);
/** @ignore */
const getTimestampNanosecond = <T extends TimestampNanosecond>({ values }: Data<T>, index: number): T['TValue'] => epochNanosecondsLongToMs(values, index * 2);
/* istanbul ignore next */
/** @ignore */
const getTimestamp = <T extends Timestamp>(data: Data<T>, index: number): T['TValue'] => {
    switch (data.type.unit) {
        case TimeUnit.SECOND: return getTimestampSecond(data as Data<TimestampSecond>, index);
        case TimeUnit.MILLISECOND: return getTimestampMillisecond(data as Data<TimestampMillisecond>, index);
        case TimeUnit.MICROSECOND: return getTimestampMicrosecond(data as Data<TimestampMicrosecond>, index);
        case TimeUnit.NANOSECOND: return getTimestampNanosecond(data as Data<TimestampNanosecond>, index);
    }
};

/** @ignore */
const getTimeSecond = <T extends TimeSecond>({ values }: Data<T>, index: number): T['TValue'] => values[index];
/** @ignore */
const getTimeMillisecond = <T extends TimeMillisecond>({ values }: Data<T>, index: number): T['TValue'] => values[index];
/** @ignore */
const getTimeMicrosecond = <T extends TimeMicrosecond>({ values }: Data<T>, index: number): T['TValue'] => values[index];
/** @ignore */
const getTimeNanosecond = <T extends TimeNanosecond>({ values }: Data<T>, index: number): T['TValue'] => values[index];
/* istanbul ignore next */
/** @ignore */
const getTime = <T extends Time>(data: Data<T>, index: number): T['TValue'] => {
    switch (data.type.unit) {
        case TimeUnit.SECOND: return getTimeSecond(data as Data<TimeSecond>, index);
        case TimeUnit.MILLISECOND: return getTimeMillisecond(data as Data<TimeMillisecond>, index);
        case TimeUnit.MICROSECOND: return getTimeMicrosecond(data as Data<TimeMicrosecond>, index);
        case TimeUnit.NANOSECOND: return getTimeNanosecond(data as Data<TimeNanosecond>, index);
    }
};

/** @ignore */
const getDecimal = <T extends Decimal>({ values, stride }: Data<T>, index: number): T['TValue'] => BN.decimal(values.subarray(stride * index, stride * (index + 1)));

/** @ignore */
const getList = <T extends List>(data: Data<T>, index: number): T['TValue'] => {
    const { valueOffsets, stride, children } = data;
    const { [index * stride]: begin, [index * stride + 1]: end } = valueOffsets;
    const child: Data<T['valueType']> = children[0];
    const slice = child.slice(begin, end - begin);
    return new Vector([slice]) as T['TValue'];
};

/** @ignore */
const getMap = <T extends Map_>(data: Data<T>, index: number): T['TValue'] => {
    const { valueOffsets, children } = data;
    const { [index]: begin, [index + 1]: end } = valueOffsets;
    const child = children[0] as Data<T['childType']>;
    return new MapRow(child.slice(begin, end - begin));
};

/** @ignore */
const getStruct = <T extends Struct>(data: Data<T>, index: number): T['TValue'] => {
    return new StructRow(data, index) as StructRowProxy<T['TValue']>;
};

/* istanbul ignore next */
/** @ignore */
const getUnion = <
    D extends Data<Union> | Data<DenseUnion> | Data<SparseUnion>
>(data: D, index: number): D['TValue'] => {
    return data.type.mode === UnionMode.Dense ?
        getDenseUnion(data as Data<DenseUnion>, index) :
        getSparseUnion(data as Data<SparseUnion>, index);
};

/** @ignore */
const getDenseUnion = <T extends DenseUnion>(data: Data<T>, index: number): T['TValue'] => {
    const childIndex = data.type.typeIdToChildIndex[data.typeIds[index]];
    const child = data.children[childIndex];
    return instance.visit(child, data.valueOffsets[index]);
};

/** @ignore */
const getSparseUnion = <T extends SparseUnion>(data: Data<T>, index: number): T['TValue'] => {
    const childIndex = data.type.typeIdToChildIndex[data.typeIds[index]];
    const child = data.children[childIndex];
    return instance.visit(child, index);
};

/** @ignore */
const getDictionary = <T extends Dictionary>(data: Data<T>, index: number): T['TValue'] => {
    return data.dictionary?.get(data.values[index]);
};

/* istanbul ignore next */
/** @ignore */
const getInterval = <T extends Interval>(data: Data<T>, index: number): T['TValue'] =>
    (data.type.unit === IntervalUnit.DAY_TIME)
        ? getIntervalDayTime(data as Data<IntervalDayTime>, index)
        : getIntervalYearMonth(data as Data<IntervalYearMonth>, index);

/** @ignore */
const getIntervalDayTime = <T extends IntervalDayTime>({ values }: Data<T>, index: number): T['TValue'] => values.subarray(2 * index, 2 * (index + 1));

/** @ignore */
const getIntervalYearMonth = <T extends IntervalYearMonth>({ values }: Data<T>, index: number): T['TValue'] => {
    const interval = values[index];
    const int32s = new Int32Array(2);
    int32s[0] = Math.trunc(interval / 12); /* years */
    int32s[1] = Math.trunc(interval % 12); /* months */
    return int32s;
};

/** @ignore */
const getFixedSizeList = <T extends FixedSizeList>(data: Data<T>, index: number): T['TValue'] => {
    const { stride, children } = data;
    const child: Data<T['valueType']> = children[0];
    const slice = child.slice(index * stride, stride);
    return new Vector([slice]);
};

GetVisitor.prototype.visitNull = wrapGet(getNull);
GetVisitor.prototype.visitBool = wrapGet(getBool);
GetVisitor.prototype.visitInt = wrapGet(getInt);
GetVisitor.prototype.visitInt8 = wrapGet(getNumeric);
GetVisitor.prototype.visitInt16 = wrapGet(getNumeric);
GetVisitor.prototype.visitInt32 = wrapGet(getNumeric);
GetVisitor.prototype.visitInt64 = wrapGet(getBigInts);
GetVisitor.prototype.visitUint8 = wrapGet(getNumeric);
GetVisitor.prototype.visitUint16 = wrapGet(getNumeric);
GetVisitor.prototype.visitUint32 = wrapGet(getNumeric);
GetVisitor.prototype.visitUint64 = wrapGet(getBigInts);
GetVisitor.prototype.visitFloat = wrapGet(getFloat);
GetVisitor.prototype.visitFloat16 = wrapGet(getFloat16);
GetVisitor.prototype.visitFloat32 = wrapGet(getNumeric);
GetVisitor.prototype.visitFloat64 = wrapGet(getNumeric);
GetVisitor.prototype.visitUtf8 = wrapGet(getUtf8);
GetVisitor.prototype.visitBinary = wrapGet(getBinary);
GetVisitor.prototype.visitFixedSizeBinary = wrapGet(getFixedSizeBinary);
GetVisitor.prototype.visitDate = wrapGet(getDate);
GetVisitor.prototype.visitDateDay = wrapGet(getDateDay);
GetVisitor.prototype.visitDateMillisecond = wrapGet(getDateMillisecond);
GetVisitor.prototype.visitTimestamp = wrapGet(getTimestamp);
GetVisitor.prototype.visitTimestampSecond = wrapGet(getTimestampSecond);
GetVisitor.prototype.visitTimestampMillisecond = wrapGet(getTimestampMillisecond);
GetVisitor.prototype.visitTimestampMicrosecond = wrapGet(getTimestampMicrosecond);
GetVisitor.prototype.visitTimestampNanosecond = wrapGet(getTimestampNanosecond);
GetVisitor.prototype.visitTime = wrapGet(getTime);
GetVisitor.prototype.visitTimeSecond = wrapGet(getTimeSecond);
GetVisitor.prototype.visitTimeMillisecond = wrapGet(getTimeMillisecond);
GetVisitor.prototype.visitTimeMicrosecond = wrapGet(getTimeMicrosecond);
GetVisitor.prototype.visitTimeNanosecond = wrapGet(getTimeNanosecond);
GetVisitor.prototype.visitDecimal = wrapGet(getDecimal);
GetVisitor.prototype.visitList = wrapGet(getList);
GetVisitor.prototype.visitStruct = wrapGet(getStruct);
GetVisitor.prototype.visitUnion = wrapGet(getUnion);
GetVisitor.prototype.visitDenseUnion = wrapGet(getDenseUnion);
GetVisitor.prototype.visitSparseUnion = wrapGet(getSparseUnion);
GetVisitor.prototype.visitDictionary = wrapGet(getDictionary);
GetVisitor.prototype.visitInterval = wrapGet(getInterval);
GetVisitor.prototype.visitIntervalDayTime = wrapGet(getIntervalDayTime);
GetVisitor.prototype.visitIntervalYearMonth = wrapGet(getIntervalYearMonth);
GetVisitor.prototype.visitFixedSizeList = wrapGet(getFixedSizeList);
GetVisitor.prototype.visitMap = wrapGet(getMap);

/** @ignore */
export const instance = new GetVisitor();


text:
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
	xmlns:g="urn:import:com.google.gwt.user.client.ui">
	<ui:style>

	</ui:style>
	<ui:with field="res"
		type='com.arm.nevada.client.view.design.ResourceBundle' />
	<g:HTMLPanel>
		<g:VerticalPanel>
			<g:HorizontalPanel>
				<g:PushButton ui:field="stepButton" title="Step">
					<g:upFace image="{res.step}" />
				</g:PushButton>
				<g:PushButton ui:field="runButton" title="Run">
					<g:upFace image="{res.runToBreakpoint}" />
				</g:PushButton>
				<g:PushButton ui:field="resetButton" title="Reset">
					<g:upFace image="{res.reset}" />
				</g:PushButton>
				<g:PushButton ui:field="viewEditButton" title="Toggle edit/view">
					<g:upFace image="{res.editView}" />
				</g:PushButton>
				<g:PushButton ui:field="loadSaveButton" title="Load and Save">
					<g:upFace image="{res.loadSave}" />
				</g:PushButton>
				<g:PushButton ui:field="helpButton" title="Help">
					<g:upFace image="{res.help}" />
				</g:PushButton>
				<g:PushButton height="32px" ui:field="randomizeButton" title="Randomize"
					text="Random" width="50px">
				</g:PushButton>
			</g:HorizontalPanel>
		</g:VerticalPanel>
	</g:HTMLPanel>
</ui:UiBinder>


text:
require 'erb'

module Capistrano
  module Memcached
    module Helpers

      def mem_template(template_name)
        config_file = "#{fetch(:templates_path)}/#{template_name}"
        # if no customized file, proceed with default
        unless File.exists?(config_file)
          config_file = File.join(File.dirname(__FILE__), "../../generators/capistrano/memcached/templates/#{template_name}")
        end
        StringIO.new(ERB.new(File.read(config_file)).result(binding))
      end

      def file_exists?(path)
        test "[ -e #{path} ]"
      end

      def deploy_user
        capture :id, '-un'
      end

      def sudo_upload!(from, to)
        filename = File.basename(to)
        to_dir = File.dirname(to)
        tmp_file = "#{fetch(:tmp_dir)}/#{filename}"
        upload! from, tmp_file
        sudo :mv, tmp_file, to_dir
      end

    end
  end
end