text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/datastream/v1/datastream.proto

package com.google.cloud.datastream.v1;

/**
 *
 *
 *

 * Response message for a 'FetchStaticIps' response.
 *

 *
 * Protobuf type {@code google.cloud.datastream.v1.FetchStaticIpsResponse}
 */
public final class FetchStaticIpsResponse extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.datastream.v1.FetchStaticIpsResponse)
    FetchStaticIpsResponseOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use FetchStaticIpsResponse.newBuilder() to construct.
  private FetchStaticIpsResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private FetchStaticIpsResponse() {
    staticIps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    nextPageToken_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new FetchStaticIpsResponse();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.datastream.v1.DatastreamProto
        .internal_static_google_cloud_datastream_v1_FetchStaticIpsResponse_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.datastream.v1.DatastreamProto
        .internal_static_google_cloud_datastream_v1_FetchStaticIpsResponse_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.datastream.v1.FetchStaticIpsResponse.class,
            com.google.cloud.datastream.v1.FetchStaticIpsResponse.Builder.class);
  }

  public static final int STATIC_IPS_FIELD_NUMBER = 1;
  private com.google.protobuf.LazyStringList staticIps_;
  /**
   *
   *
   *

   * list of static ips by account
   *

   *
   * repeated string static_ips = 1;
   *
   * @return A list containing the staticIps.
   */
  public com.google.protobuf.ProtocolStringList getStaticIpsList() {
    return staticIps_;
  }
  /**
   *
   *
   *

   * list of static ips by account
   *

   *
   * repeated string static_ips = 1;
   *
   * @return The count of staticIps.
   */
  public int getStaticIpsCount() {
    return staticIps_.size();
  }
  /**
   *
   *
   *

   * list of static ips by account
   *

   *
   * repeated string static_ips = 1;
   *
   * @param index The index of the element to return.
   * @return The staticIps at the given index.
   */
  public java.lang.String getStaticIps(int index) {
    return staticIps_.get(index);
  }
  /**
   *
   *
   *

   * list of static ips by account
   *

   *
   * repeated string static_ips = 1;
   *
   * @param index The index of the value to return.
   * @return The bytes of the staticIps at the given index.
   */
  public com.google.protobuf.ByteString getStaticIpsBytes(int index) {
    return staticIps_.getByteString(index);
  }

  public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2;
  private volatile java.lang.Object nextPageToken_;
  /**
   *
   *
   *

   * A token that can be sent as `page_token` to retrieve the next page.
   * If this field is omitted, there are no subsequent pages.
   *

   *
   * string next_page_token = 2;
   *
   * @return The nextPageToken.
   */
  @java.lang.Override
  public java.lang.String getNextPageToken() {
    java.lang.Object ref = nextPageToken_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      nextPageToken_ = s;
      return s;
    }
  }
  /**
   *
   *
   *

   * A token that can be sent as `page_token` to retrieve the next page.
   * If this field is omitted, there are no subsequent pages.
   *

   *
   * string next_page_token = 2;
   *
   * @return The bytes for nextPageToken.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNextPageTokenBytes() {
    java.lang.Object ref = nextPageToken_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      nextPageToken_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    for (int i = 0; i < staticIps_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, staticIps_.getRaw(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    {
      int dataSize = 0;
      for (int i = 0; i < staticIps_.size(); i++) {
        dataSize += computeStringSizeNoTag(staticIps_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getStaticIpsList().size();
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.cloud.datastream.v1.FetchStaticIpsResponse)) {
      return super.equals(obj);
    }
    com.google.cloud.datastream.v1.FetchStaticIpsResponse other =
        (com.google.cloud.datastream.v1.FetchStaticIpsResponse) obj;

    if (!getStaticIpsList().equals(other.getStaticIpsList())) return false;
    if (!getNextPageToken().equals(other.getNextPageToken())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (getStaticIpsCount() > 0) {
      hash = (37 * hash) + STATIC_IPS_FIELD_NUMBER;
      hash = (53 * hash) + getStaticIpsList().hashCode();
    }
    hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
    hash = (53 * hash) + getNextPageToken().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.datastream.v1.FetchStaticIpsResponse parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.datastream.v1.FetchStaticIpsResponse parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.datastream.v1.FetchStaticIpsResponse parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.datastream.v1.FetchStaticIpsResponse parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.datastream.v1.FetchStaticIpsResponse parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.datastream.v1.FetchStaticIpsResponse parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.datastream.v1.FetchStaticIpsResponse parseFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.datastream.v1.FetchStaticIpsResponse parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.datastream.v1.FetchStaticIpsResponse parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.datastream.v1.FetchStaticIpsResponse parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.datastream.v1.FetchStaticIpsResponse parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.datastream.v1.FetchStaticIpsResponse parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(
      com.google.cloud.datastream.v1.FetchStaticIpsResponse prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   *

   * Response message for a 'FetchStaticIps' response.
   *

   *
   * Protobuf type {@code google.cloud.datastream.v1.FetchStaticIpsResponse}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.datastream.v1.FetchStaticIpsResponse)
      com.google.cloud.datastream.v1.FetchStaticIpsResponseOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.datastream.v1.DatastreamProto
          .internal_static_google_cloud_datastream_v1_FetchStaticIpsResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.datastream.v1.DatastreamProto
          .internal_static_google_cloud_datastream_v1_FetchStaticIpsResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.datastream.v1.FetchStaticIpsResponse.class,
              com.google.cloud.datastream.v1.FetchStaticIpsResponse.Builder.class);
    }

    // Construct using com.google.cloud.datastream.v1.FetchStaticIpsResponse.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      staticIps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      nextPageToken_ = "";

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.datastream.v1.DatastreamProto
          .internal_static_google_cloud_datastream_v1_FetchStaticIpsResponse_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.datastream.v1.FetchStaticIpsResponse getDefaultInstanceForType() {
      return com.google.cloud.datastream.v1.FetchStaticIpsResponse.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.datastream.v1.FetchStaticIpsResponse build() {
      com.google.cloud.datastream.v1.FetchStaticIpsResponse result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.datastream.v1.FetchStaticIpsResponse buildPartial() {
      com.google.cloud.datastream.v1.FetchStaticIpsResponse result =
          new com.google.cloud.datastream.v1.FetchStaticIpsResponse(this);
      int from_bitField0_ = bitField0_;
      if (((bitField0_ & 0x00000001) != 0)) {
        staticIps_ = staticIps_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000001);
      }
      result.staticIps_ = staticIps_;
      result.nextPageToken_ = nextPageToken_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.datastream.v1.FetchStaticIpsResponse) {
        return mergeFrom((com.google.cloud.datastream.v1.FetchStaticIpsResponse) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.datastream.v1.FetchStaticIpsResponse other) {
      if (other == com.google.cloud.datastream.v1.FetchStaticIpsResponse.getDefaultInstance())
        return this;
      if (!other.staticIps_.isEmpty()) {
        if (staticIps_.isEmpty()) {
          staticIps_ = other.staticIps_;
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          ensureStaticIpsIsMutable();
          staticIps_.addAll(other.staticIps_);
        }
        onChanged();
      }
      if (!other.getNextPageToken().isEmpty()) {
        nextPageToken_ = other.nextPageToken_;
        onChanged();
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureStaticIpsIsMutable();
                staticIps_.add(s);
                break;
              } // case 10
            case 18:
              {
                nextPageToken_ = input.readStringRequireUtf8();

                break;
              } // case 18
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private com.google.protobuf.LazyStringList staticIps_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureStaticIpsIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        staticIps_ = new com.google.protobuf.LazyStringArrayList(staticIps_);
        bitField0_ |= 0x00000001;
      }
    }
    /**
     *
     *
     *

     * list of static ips by account
     *

     *
     * repeated string static_ips = 1;
     *
     * @return A list containing the staticIps.
     */
    public com.google.protobuf.ProtocolStringList getStaticIpsList() {
      return staticIps_.getUnmodifiableView();
    }
    /**
     *
     *
     *

     * list of static ips by account
     *

     *
     * repeated string static_ips = 1;
     *
     * @return The count of staticIps.
     */
    public int getStaticIpsCount() {
      return staticIps_.size();
    }
    /**
     *
     *
     *

     * list of static ips by account
     *

     *
     * repeated string static_ips = 1;
     *
     * @param index The index of the element to return.
     * @return The staticIps at the given index.
     */
    public java.lang.String getStaticIps(int index) {
      return staticIps_.get(index);
    }
    /**
     *
     *
     *

     * list of static ips by account
     *

     *
     * repeated string static_ips = 1;
     *
     * @param index The index of the value to return.
     * @return The bytes of the staticIps at the given index.
     */
    public com.google.protobuf.ByteString getStaticIpsBytes(int index) {
      return staticIps_.getByteString(index);
    }
    /**
     *
     *
     *

     * list of static ips by account
     *

     *
     * repeated string static_ips = 1;
     *
     * @param index The index to set the value at.
     * @param value The staticIps to set.
     * @return This builder for chaining.
     */
    public Builder setStaticIps(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureStaticIpsIsMutable();
      staticIps_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * list of static ips by account
     *

     *
     * repeated string static_ips = 1;
     *
     * @param value The staticIps to add.
     * @return This builder for chaining.
     */
    public Builder addStaticIps(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureStaticIpsIsMutable();
      staticIps_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * list of static ips by account
     *

     *
     * repeated string static_ips = 1;
     *
     * @param values The staticIps to add.
     * @return This builder for chaining.
     */
    public Builder addAllStaticIps(java.lang.Iterable<java.lang.String> values) {
      ensureStaticIpsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, staticIps_);
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * list of static ips by account
     *

     *
     * repeated string static_ips = 1;
     *
     * @return This builder for chaining.
     */
    public Builder clearStaticIps() {
      staticIps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * list of static ips by account
     *

     *
     * repeated string static_ips = 1;
     *
     * @param value The bytes of the staticIps to add.
     * @return This builder for chaining.
     */
    public Builder addStaticIpsBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureStaticIpsIsMutable();
      staticIps_.add(value);
      onChanged();
      return this;
    }

    private java.lang.Object nextPageToken_ = "";
    /**
     *
     *
     *

     * A token that can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *

     *
     * string next_page_token = 2;
     *
     * @return The nextPageToken.
     */
    public java.lang.String getNextPageToken() {
      java.lang.Object ref = nextPageToken_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        nextPageToken_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     *

     * A token that can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *

     *
     * string next_page_token = 2;
     *
     * @return The bytes for nextPageToken.
     */
    public com.google.protobuf.ByteString getNextPageTokenBytes() {
      java.lang.Object ref = nextPageToken_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        nextPageToken_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     *

     * A token that can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *

     *
     * string next_page_token = 2;
     *
     * @param value The nextPageToken to set.
     * @return This builder for chaining.
     */
    public Builder setNextPageToken(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      nextPageToken_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * A token that can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *

     *
     * string next_page_token = 2;
     *
     * @return This builder for chaining.
     */
    public Builder clearNextPageToken() {

      nextPageToken_ = getDefaultInstance().getNextPageToken();
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * A token that can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *

     *
     * string next_page_token = 2;
     *
     * @param value The bytes for nextPageToken to set.
     * @return This builder for chaining.
     */
    public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      nextPageToken_ = value;
      onChanged();
      return this;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.cloud.datastream.v1.FetchStaticIpsResponse)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.datastream.v1.FetchStaticIpsResponse)
  private static final com.google.cloud.datastream.v1.FetchStaticIpsResponse DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.datastream.v1.FetchStaticIpsResponse();
  }

  public static com.google.cloud.datastream.v1.FetchStaticIpsResponse getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<FetchStaticIpsResponse> PARSER =
      new com.google.protobuf.AbstractParser<FetchStaticIpsResponse>() {
        @java.lang.Override
        public FetchStaticIpsResponse parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

  public static com.google.protobuf.Parser<FetchStaticIpsResponse> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<FetchStaticIpsResponse> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.datastream.v1.FetchStaticIpsResponse getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}


text:
package protocbridge.frontend

import java.io.{ByteArrayOutputStream, InputStream, PrintWriter, StringWriter}
import java.nio.file.{Files, Path}

import protocbridge.{ProtocCodeGenerator, ExtraEnv}

import scala.util.Try

/** A PluginFrontend instance provides a platform-dependent way for protoc to communicate with
  * a JVM based ProtocCodeGenerator.
  *
  * protoc is able to launch plugins. Plugins are executables that take a serialized
  * CodeGenerationRequest via stdin and serialize a CodeGenerationRequest to stdout.
  * The idea in PluginFrontend is to create a minimal plugin that wires its stdin/stdout
  * to this JVM.
  *
  * The two-way communication always goes as follows:
  *
  * 1. protoc writes a request to the stdin of a plugin
  * 2. plugin writes the data to the channel
  * 3. this JVM reads it, interprets it as CodeGenerationRequest and process it.
  * 4. this JVM writes a CodeGenerationResponse to the channel
  * 5. this JVM closes the channel.
  * 6. the plugin reads the data and writes it to standard out.
  * 7. protoc handles the CodeGenerationResponse (creates Scala sources)
  */
trait PluginFrontend {
  type InternalState

  // Notifies the frontend to set up a protoc plugin that runs the given generator. It returns
  // the system path of the executable and an arbitary internal state object that is passed
  // later. Useful for cleanup.
  def prepare(plugin: ProtocCodeGenerator, env: ExtraEnv): (Path, InternalState)

  def cleanup(state: InternalState): Unit
}

object PluginFrontend {
  private def getStackTrace(e: Throwable): String = {
    val stringWriter = new StringWriter
    val printWriter = new PrintWriter(stringWriter)
    e.printStackTrace(printWriter)
    stringWriter.toString
  }

  def runWithBytes(
      gen: ProtocCodeGenerator,
      request: Array[Byte]
  ): Array[Byte] = {
    Try {
      gen.run(request)
    }.recover { case throwable =>
      createCodeGeneratorResponseWithError(
        throwable.toString + "\n" + getStackTrace(throwable)
      )
    }.get
  }

  def createCodeGeneratorResponseWithError(error: String): Array[Byte] = {
    val b = Array.newBuilder[Byte]

    def addRawVarint32(value0: Int): Unit = {
      var value = value0
      while (true) {
        if ((value & ~0x7f) == 0) {
          b += value.toByte
          return
        } else {
          b += ((value & 0x7f) | 0x80).toByte
          value >>>= 7
        }
      }
    }

    b += 10
    val errorBytes = error.getBytes(java.nio.charset.Charset.forName("UTF-8"))
    var length = errorBytes.length
    addRawVarint32(length)
    b ++= errorBytes
    b.result()
  }

  @deprecated("This method is going to be removed.", "0.9.0")
  def readInputStreamToByteArray(fsin: InputStream): Array[Byte] = {
    val b = new ByteArrayOutputStream()
    val buffer = new Array[Byte](4096)
    var count = 0
    while (count != -1) {
      count = fsin.read(buffer)
      if (count > 0) {
        b.write(buffer, 0, count)
      }
    }
    b.toByteArray
  }

  private[protocbridge] def readInputStreamToByteArrayWithEnv(
      fsin: InputStream,
      env: ExtraEnv
  ): Array[Byte] = {
    val b = new ByteArrayOutputStream()
    val buffer = new Array[Byte](4096)
    var count = 0
    while (count != -1) {
      count = fsin.read(buffer)
      if (count > 0) {
        b.write(buffer, 0, count)
      }
    }
    val envBytes = env.toByteArrayAsField
    b.write(envBytes, 0, envBytes.length)
    b.toByteArray
  }

  def runWithInputStream(
      gen: ProtocCodeGenerator,
      fsin: InputStream,
      env: ExtraEnv
  ): Array[Byte] = {
    val bytes = readInputStreamToByteArrayWithEnv(fsin, env)
    runWithBytes(gen, bytes)
  }

  def createTempFile(extension: String, content: String): Path = {
    val fileName = Files.createTempFile("protocbridge", extension)
    val os = Files.newOutputStream(fileName)
    os.write(content.getBytes("UTF-8"))
    os.close()
    fileName
  }

  def isWindows: Boolean = sys.props("os.name").startsWith("Windows")

  def newInstance: PluginFrontend = {
    if (isWindows) WindowsPluginFrontend
    else PosixPluginFrontend
  }
}

redpajama_set_name: RedPajamaGithub


text:
"""
Copyright (c) 2009 Barry Schwartz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""

from distutils.core import setup
from distutils.extension import Extension

setup (name = 'glyph_name',
       version = '1.2',
       description = 'Glyph name processing based on the Adobe Glyph List',
       ext_modules = [
        Extension('glyph_name',
                  sources = ['glyphname-no_cython.c', 'agl_lookup.c'],
                  )
        ],
       )


text:
Album tulajdonságok

Ezen az oldalon lehetősége van az adminisztrátoroknak az albumok kezelésére.
Számos lehetőség áll rendelkezésére, kezelhet akár több albumot is egyszerre.

Feltöltés

Kezelheti mely albumokba engedélyezi látogatóinak a feltöltést. Csak nem virtuális és nem távoli albumok esetén.</add>

Hozzászólások

Eldöntheti mely albumokhoz engedélyez hozzászólásokat.
Válassza ki azokat az albumokat, melyekhez engedélyezni kívánja a hozzászólásokat.
Az engedélyezett albumok képei alatt elérhetővé válik a hozzászólás űrlap.

Lezárás

Lehetősége van az albumok ideiglenes zárolására.
  Ha zárol egy albumot, annak gyermek albumai is zárolva lesznek.
  Ha feloldja egy album zárolását, annak szülő albuma is feloldásra kerül.

Nyilvános / Privát

Kezelheti a kiválasztott albumokhoz tartozó engedélyeket.
  Kiválaszthatja a privát albumokat : összefüggésben van a látogatók és/vagy csoportok engedélyeinek beállításával.
  Ha egy album privát, a belső albumok is privát albumokká válnak.
  Ha egy album nyilvános, a szülő album is nyilvánossá válik.

Reprezentál

Ez a lehetőség csak akkor kezelhető, ha az
  allow_random_representative konfigurációs paramétere true (lásd include/config_defaults.inc.php).
  Minden album képviselő lehet véletlenszerű, vagy lehet egyedi (egy egyedi kép).


text:
package com.alibaba.nacos.api.remote;

/**
 * payload class sign.
 *
 * @author hujun
 */
public interface Payload {

}


text:
__author_unit__

__author_title__

__author_desc__

<bx_if:addon>

        __content__

</bx_if:addon>


text:
package com.example.b00047562.parkinson_mhealth;

import android.app.ProgressDialog;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.Switch;
import android.widget.TableRow;
import android.widget.TextView;
import android.widget.Toast;

import com.parse.ParseUser;

import org.achartengine.ChartFactory;
import org.achartengine.chart.BarChart;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

/*TODO
call data processing functions from this class and use AsyncTasks
 */

public class ResultsAnalysis extends AppCompatActivity {

    private static final int NORMAL=0,SLIGHT=1,MILD=2,MODERATE=3,SEVERE=4;
    private Map<Integer,String> ResultsMap;
    private ProgressDialog mProgressDialog;
    private boolean clicked=false;
    private TappingTestFunctions tapresults;
    private SpiralDataProcessing spiralDataProcessing;
    private AccelAnalysis accelresult;
    private SpiralData sd;
    public static ArrayList<SpiralData> StaticSpiralData;
    public static ArrayList<SpiralData> DynamicSpiralData;

    private ParseFunctions customParse;
    private  Double qscore; //questionnaire score - not overall score
    private TextView extras,advice,extra1,title_tv,tapscore_tv,spiralscore_tv,handsore_tv;

    private FrameLayout primarygraph,secondarygraph;

    private  TableRow ad1,ad2,ad3,tapres,spiralres,handres,graphs,title;
    private Button showhide;
    private View mChart1,mChart2;
    private double tapprecision;

    private int tapscore,handscore,spiralscore; //use these for final scale

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_results_analysis);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        ResultsMap=new HashMap<>() ;
        ResultsMap.put(0, getString(R.string.Results_Normal));
        ResultsMap.put(1,getString(R.string.Results_Slight));
        ResultsMap.put(2,getString(R.string.Results_Mild));
        ResultsMap.put(3,getString(R.string.Results_Moderate));
        ResultsMap.put(4,getString(R.string.Results_Severe));

        //customParse = new ParseFunctions(getApplicationContext());
         customParse = new ParseFunctions();
         tapresults= new TappingTestFunctions();
         accelresult = new AccelAnalysis(10.0);
        initialize();

        //accelresult= new AccelAnalysis();

//        ad1=(TableRow)findViewById(R.id.tbrow_ad1);
//        ad2=(TableRow)findViewById(R.id.tbrow_ad2);
//        ad3=(TableRow)findViewById(R.id.tbrow_ad3);
//        graphs=(TableRow)findViewById(R.id.tbrow_graphs);
//        tapres= (TableRow)findViewById(R.id.tbrow_tap);
//        spiralres=(TableRow)findViewById(R.id.tbrow_spiral);
//        handres=(TableRow)findViewById(R.id.tbrow_hand);
//        title=(TableRow)findViewById(R.id.tbrow_title);
//
//        showhide=(Button)findViewById(R.id.btn_showadvice);
//
//        extras = (TextView)findViewById(R.id.tv_question_extra); //questionnaire score here
//        extra1=(TextView)findViewById(R.id.tv_extra1);
//        advice= (TextView)findViewById(R.id.advice_tv_analysis); //detail advice and score details
//        title_tv=(TextView)findViewById(R.id.tv_title);
//        tapscore_tv=(TextView)findViewById(R.id.tapscore_tv);
//        spiralscore_tv=(TextView)findViewById(R.id.tv_spiralres);
//        handsore_tv=(TextView)findViewById(R.id.handres_tv);
//
//
//        //test draw a bar chart
//        primarygraph=(FrameLayout)findViewById(R.id.content_primary);
//        secondarygraph=(FrameLayout)findViewById(R.id.content_secondary);

//        StaticSpiralData= new ArrayList();
//        DynamicSpiralData= new ArrayList();
//        sd=new SpiralData(0,0,0,this);
        new processDataTask().execute();

    }

    @Override
    protected void onResume() {
        super.onResume();
        //Tapping data task
    }

//    private class processSpiralDataTask extends AsyncTask<Void,Void,Void>
//    {
//        @Override
//        protected void onPreExecute() {
//            super.onPreExecute();
//            // Create a progressdialog
//            mProgressDialog = new ProgressDialog(ResultsAnalysis.this);
//            // Set progressdialog title
//            mProgressDialog.setTitle("Fetching Results");
//            // Set progressdialog message
//            mProgressDialog.setMessage("Hang on...");
//            mProgressDialog.setIcon(R.drawable.process);
//            mProgressDialog.setIndeterminate(false);
//            // Show progressdialog
//            mProgressDialog.show();
//        }
//        @Override
//        protected Void doInBackground(Void... params) {
//
//
//
//            return null;
//        }
//
//        @Override
//        protected void onPostExecute(Void result) {
//
//
//        }
//
//    }

    private class processDataTask extends AsyncTask<Void, Void, Void> {
        @Override
        protected void onPreExecute() {
            super.onPreExecute();

            // Create a progressdialog
            mProgressDialog = new ProgressDialog(ResultsAnalysis.this);
            mProgressDialog.setCancelable(false);
            // Set progressdialog title
            mProgressDialog.setTitle("Fetching Results");
            // Set progressdialog message
            mProgressDialog.setMessage("Hang on...");
            mProgressDialog.setIcon(R.drawable.process);
            mProgressDialog.setIndeterminate(false);
            // Show progressdialog
            mProgressDialog.show();
        }

        @Override
        protected Void doInBackground(Void... params) {
            StaticSpiralData= new ArrayList();
            DynamicSpiralData= new ArrayList();
            sd=new SpiralData(0,0,0,getApplicationContext());
            //initialize();

            try{
                processQuestionnaire();
                processSpiralData();
                processTappingData();
                processAccelData();

            }catch (Exception e){
                Log.d("TAG", "doInBackground: Error " + e.getMessage());
                runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        Toast.makeText(getApplicationContext(), "ProcessingError - Some tests do not have complete data", Toast.LENGTH_SHORT).show();
                    }
                });

                //finish();
            }
            return null;
        }

        @Override
        protected void onPostExecute(Void result) {

            mProgressDialog.dismiss();

            displayscoreAdvice();
            //tapresults.displayResults();
            extras.setText("Questionnaire Score: " + qscore);

            tapscore_tv.setText(ResultsMap.get(tapscore)+" ("+ String.format("%.2f", tapprecision)+"%)");
            spiralscore_tv.setText(""+ResultsMap.get(spiralscore));
            handsore_tv.setText("" + ResultsMap.get(handscore));

              // calls all display functions

            //display graphs for  results
            try {
                viewgraphs();
            } catch (Exception e) {
                Toast.makeText(getApplicationContext(),"ViewError - Some tests do not have complete data",Toast.LENGTH_SHORT).show();
               //finish();
            }
            showhide.performClick();

            //call next AsyncTask
            //--place functions for other Tests ex: HandTremorAsyncTask or SpiralDataAsyncTask

            // Vibrator vibe = (Vibrator) getApplicationContext().getSystemService(Context.VIBRATOR_SERVICE);
            // vibe.vibrate(50); // 50 is time in ms
        }
    }

    private void processSpiralData() {
        spiralscore=0;

        StaticSpiralData =sd.getAS();
        DynamicSpiralData=sd.getDAS();
        spiralDataProcessing= new SpiralDataProcessing(StaticSpiralData,DynamicSpiralData);
        final float DAH=spiralDataProcessing.getDAH();

        Log.d("DAH", "processSpiralData: "+DAH);

       if(6.517041E-06f >= DAH)
          spiralscore=NORMAL;
        else if (6.517041E-06f<DAH&&DAH<=9.174153E-06f)
           spiralscore=SLIGHT;
        else if (9.174153E-06f<DAH&&DAH<=3.376123E-05f)
           spiralscore=MILD;
       else if (3.376123E-05f<DAH&&DAH<=6.834831E-05f)
           spiralscore=MODERATE;
        else if (DAH>6.834831E-05f)
           spiralscore=SEVERE;
    }

    private void processAccelData()
    {

        //accelresult.getAccelData();
        handscore = accelresult.PerformAnalysis1();
    }

     private void processTappingData()
    {
        //tapresults.runAlgorithm(tapresults.fetchData());   //run algo on arraylist retreived from parse

        tapresults.fetchData();//get data from DB
        tapresults.runAlgorithm(); //main algo
        tapscore=tapresults.runTempAlgorithm();//other algos
        tapprecision=tapresults.getPrecision()*100;

        Log.d("TapPrec",tapprecision+"");
    }
    private void processQuestionnaire()//questionairre data fetch result
    {
        qscore = sumArr(customParse.getParseData2(ParseUser.getCurrentUser(), 0, "Questionnaire", "createdAt", "Answers"));
    }

    public double sumArr(ArrayList<Long> arr)
    {
        double sum = 0;
        for(int i = 0; i < arr.size(); i++)
        {
            sum += arr.get(i);
        }
        return sum;
    }

    //questionnaire score thresholds  59+/108 = severe -   33-58/108 moderate - 32 and below/108 mild
    private void displayscoreAdvice()
    {
        try{
        if(qscore>=0 && qscore<20)//normal
        {
            advice.setText("Your Questionnaire score shows almost no symptoms\n Nothing to worry about for now");
        }
       else if(qscore>=20 && qscore<=32) //mild
     {
            advice.setText("Your Questionnaire score shows mild symptoms.Repeat the tests every month to track your progress");
     }
        else if(qscore>=33 && qscore<=58) //moderate
     {
            advice.setText("Your Questionnaire score shows moderate symptoms\nconsider visiting your doctor ");
     }
        else if(qscore>=59)//severe
     {
            advice.setText("Your Questionnaire score shows severe symptoms\nconsider visiting your doctor ");
     }
        else if(qscore<0) {
            qscore = 0.0;
            advice.setText("Your Questionnaire score is incomplete");
        }

        extra1.setText("Keep in mind that Questionnaire scores may not reflect all symptoms.\nConsider scores for other tests aswell.");
    }catch (Exception e ){
            Log.e("Q failure", "displayscoreAdvice: "+e.getMessage() );
        }
    }

    private void viewgraphs()
    {

        mChart1 = ChartFactory.getLineChartView(getBaseContext(), tapresults.getDataSet1(),
                tapresults.getRenderer1());
        mChart2 =ChartFactory.getBarChartView(getBaseContext(), tapresults.getDataSet2(),
                tapresults.getRenderer2(), BarChart.Type.STACKED);
        // Adding the Line Chart to the FrameLayout
        primarygraph.addView(mChart1);
        secondarygraph.addView(mChart2);
    }

    public void displayadvicebtn(View v) //btn trigger
    {
        if(clicked==false) {

            graphs.setVisibility(View.GONE);
            ad1.setVisibility(View.VISIBLE);
            ad2.setVisibility(View.VISIBLE);
            ad3.setVisibility(View.VISIBLE);
            tapres.setVisibility(View.VISIBLE);
            spiralres.setVisibility(View.VISIBLE);
            handres.setVisibility(View.VISIBLE);
            title.setVisibility(View.VISIBLE);
            title_tv.setVisibility(View.GONE);
            clicked=true;
            showhide.setText("Show Graphs");
        }
        else
        {
            graphs.setVisibility(View.VISIBLE);
            ad1.setVisibility(View.GONE);
            ad2.setVisibility(View.GONE);
            ad3.setVisibility(View.GONE);
            tapres.setVisibility(View.GONE);
            spiralres.setVisibility(View.GONE);
            handres.setVisibility(View.GONE);
            title.setVisibility(View.GONE);
            title_tv.setVisibility(View.VISIBLE);
            clicked=false;
            showhide.setText("Show Advice");
        }
    }

    private void initialize ()
    {

        ad1=(TableRow)findViewById(R.id.tbrow_ad1);
        ad2=(TableRow)findViewById(R.id.tbrow_ad2);
        ad3=(TableRow)findViewById(R.id.tbrow_ad3);
        graphs=(TableRow)findViewById(R.id.tbrow_graphs);
        tapres= (TableRow)findViewById(R.id.tbrow_tap);
        spiralres=(TableRow)findViewById(R.id.tbrow_spiral);
        handres=(TableRow)findViewById(R.id.tbrow_hand);
        title=(TableRow)findViewById(R.id.tbrow_title);

        showhide=(Button)findViewById(R.id.btn_showadvice);

        extras = (TextView)findViewById(R.id.tv_question_extra); //questionnaire score here
        extra1=(TextView)findViewById(R.id.tv_extra1);
        advice= (TextView)findViewById(R.id.advice_tv_analysis); //detail advice and score details
        title_tv=(TextView)findViewById(R.id.tv_title);
        tapscore_tv=(TextView)findViewById(R.id.tapscore_tv);
        spiralscore_tv=(TextView)findViewById(R.id.tv_spiralres);
        handsore_tv=(TextView)findViewById(R.id.handres_tv);

        //test draw a bar chart
        primarygraph=(FrameLayout)findViewById(R.id.content_primary);
        secondarygraph=(FrameLayout)findViewById(R.id.content_secondary);
    }

    @Override
    protected void onStop() {
        super.onStop();
        new processDataTask().cancel(true);
    }
}


text:
struct seqStreamIndex {
  u32bit   _iid;  //  seqFile IID
  u32bit   _len;  //  length of the sequence
  u64bit   _bgn;  //  begin position in the stream
};

class seqStream {
public:
  seqStream(const char *filename);
  seqStream(char *sequence, u32bit length);
  ~seqStream();

  //  Separate sequences with this letter.  Non-ACGT is always
  //  returned as 'N'.  Changing the length of the separator AFTER
  //  setting the range will result in the wrong range being used.
  //
  void              setSeparator(char sep, u32bit len);

  //  get() returns one letter per input letter -- a gap of size n
  //  will return n gap symbols.
  //
  unsigned char     get(void);
  bool              eof(void)        { return(_eof); };

  //  Returns to the start of the range.
  //
  void              rewind(void);

  //  Set the range of ACGT sequence we will return.  Coordinates are
  //  space-based.  Example:
  //
  //  >one
  //  AAA
  //  >two
  //  C
  //  >three
  //  GGG
  //
  //  We separate these sequences with three '-' letters.
  //
  //  strPos    012...3...456
  //            AAA---C---GGG
  //
  //  range(0,0) -> nothing
  //  range(0,1) -> A
  //  range(0,3) -> AAA
  //  range(0,4) -> AAAnnnC
  //  range(0,5) -> AAAnnnCnnnG
  //
  void              setRange(u64bit bgn, u64bit end);
  void              setPosition(u64bit pos);

  //  seqPos() is the position we are at in the current sequence;
  //  seqIID() is the iid of that sequence;
  //  strPos() is the position we are at in the chained sequence
  //
  //  Values are not defined if the letter is a separator.
  //
  u32bit            seqPos(void)     { return(_currentPos);            };
  u32bit            seqIID(void)     { return(_idx[_currentIdx]._iid); };
  u64bit            strPos(void)     { return(_streamPos);             };

  u32bit            numberOfSequences(void) { return(_idxLen); };

  //  Return the length of, position of (in the chain) and IID of the
  //  (s)th sequence in the chain.
  //
  u32bit            lengthOf(u32bit s) { return((s >= _idxLen) ? ~u32bitZERO : _idx[s]._len); };
  u32bit            IIDOf(u32bit s)    { return((s >= _idxLen) ? ~u32bitZERO : _idx[s]._iid); };
  u64bit            startOf(u32bit s)  { return((s >= _idxLen) ? ~u64bitZERO : _idx[s]._bgn); };

  //  For a chain position p, returns the s (above) for that position.
  //
  u32bit            sequenceNumberOfPosition(u64bit p);
  void              tradeSpaceForTime(void);

private:
  void              fillBuffer(void);

  seqFile         *_file;        //  Backed by a seqFile.
  char            *_string;      //  Backed by a character string.

  u64bit           _bgn;         //  Begin/End position in chained sequence
  u64bit           _end;

  u32bit           _currentIdx;  //  index into _idx of the current sequence
  u32bit           _currentPos;  //  position in the current sequence
  u64bit           _streamPos;   //  position in the chained sequence

  // Buffer for holding sequence from the seqFile.

  u32bit           _bufferMax;   //  Max size of the buffer
  u32bit           _bufferLen;   //  Actual size of the buffer
  u32bit           _bufferPos;   //  Position we are at in the buffer
  u32bit           _bufferSep;   //  How much of the buffer is separator
  char            *_buffer;

  //  Info about the raw sequences

  u32bit           _idxLen;
  seqStreamIndex  *_idx;

  u32bit          *_seqNumOfPos;

  u64bit           _lengthOfSequences;

  bool             _eof;

  char             _separator;
  u32bit           _separatorLength;
};

#endif  //  SEQSTREAM_H


text:
package org.apache.geode.internal.cache.wan.wancommand;

import static org.apache.geode.distributed.ConfigurationProperties.DISTRIBUTED_SYSTEM_ID;
import static org.apache.geode.distributed.ConfigurationProperties.REMOTE_LOCATORS;
import static org.apache.geode.internal.cache.wan.wancommand.WANCommandUtils.verifySenderAttributes;
import static org.apache.geode.internal.cache.wan.wancommand.WANCommandUtils.verifySenderDoesNotExist;
import static org.apache.geode.internal.cache.wan.wancommand.WANCommandUtils.verifySenderState;
import static org.assertj.core.api.Assertions.assertThat;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;

import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import org.apache.geode.cache.wan.GatewaySender;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.management.internal.i18n.CliStrings;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
import org.apache.geode.test.dunit.rules.MemberVM;
import org.apache.geode.test.junit.categories.WanTest;
import org.apache.geode.test.junit.rules.GfshCommandRule;
import org.apache.geode.test.junit.rules.VMProvider;

@Category(WanTest.class)
@SuppressWarnings("serial")
public class CreateDestroyGatewaySenderCommandDUnitTest implements Serializable {

  private static final String SERVER_3 = "server-3";
  private static final String SERVER_4 = "server-4";
  private static final String SERVER_5 = "server-5";

  private static final String CREATE =
      "create gateway-sender --id=ln " + "--remote-distributed-system-id=2";
  private static final String DESTROY = "destroy gateway-sender --id=ln ";

  @ClassRule
  public static ClusterStartupRule clusterStartupRule = new ClusterStartupRule(8);

  @Rule
  public GfshCommandRule gfsh = new GfshCommandRule();

  private static MemberVM locatorSite1;
  private static MemberVM server1;
  private static MemberVM server2;
  private static MemberVM server3;

  @BeforeClass
  public static void beforeClass() {
    Properties props = new Properties();
    props.setProperty(DISTRIBUTED_SYSTEM_ID, "" + 1);
    locatorSite1 = clusterStartupRule.startLocatorVM(1, props);

    props.setProperty(DISTRIBUTED_SYSTEM_ID, "" + 2);
    props.setProperty(REMOTE_LOCATORS, "localhost[" + locatorSite1.getPort() + "]");
    clusterStartupRule.startLocatorVM(2, props);

    server1 = clusterStartupRule.startServerVM(3, "senderGroup1", locatorSite1.getPort());
    server2 = clusterStartupRule.startServerVM(4, locatorSite1.getPort());
    server3 = clusterStartupRule.startServerVM(5, locatorSite1.getPort());
  }

  @Before
  public void before() throws Exception {
    gfsh.connectAndVerify(locatorSite1);
  }

  @After
  public void after() {
    gfsh.executeAndAssertThat(DESTROY + " --if-exists").statusIsSuccess();
  }

  /**
   * GatewaySender with all default attributes
   */
  @Test
  public void testCreateDestroyGatewaySenderWithDefault() {
    gfsh.executeAndAssertThat(CREATE).statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(3).hasColumn("Message").containsOnly(
            "GatewaySender \"ln\" created on \"" + SERVER_3 + "\"",
            "GatewaySender \"ln\" created on \"" + SERVER_4 + "\"",
            "GatewaySender \"ln\" created on \"" + SERVER_5 + "\"");

    VMProvider.invokeInEveryMember(() -> verifySenderState("ln", true, false), server1, server2,
        server3);

    locatorSite1.invoke(() -> {
      InternalLocator locator = ClusterStartupRule.getLocator();
      assertThat(locator).isNotNull();
      String xml = locator.getConfigurationPersistenceService().getConfiguration("cluster")
          .getCacheXmlContent();
      assertThat(xml).contains(
          "<gateway-sender id=\"ln\" remote-distributed-system-id=\"2\" parallel=\"false\" manual-start=\"false\" enable-batch-conflation=\"false\" enable-persistence=\"false\" disk-synchronous=\"true\" group-transaction-events=\"false\"/>");
    });

    // destroy gateway sender and verify AEQs cleaned up
    gfsh.executeAndAssertThat(DESTROY).statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(3).hasColumn("Message").containsOnly(
            "GatewaySender \"ln\" destroyed on \"" + SERVER_3 + "\"",
            "GatewaySender \"ln\" destroyed on \"" + SERVER_4 + "\"",
            "GatewaySender \"ln\" destroyed on \"" + SERVER_5 + "\"");

    VMProvider.invokeInEveryMember(() -> verifySenderDoesNotExist("ln", false), server1, server2,
        server3);

    locatorSite1.invoke(() -> {
      InternalLocator locator = ClusterStartupRule.getLocator();
      assertThat(locator).isNotNull();
      String xml = locator.getConfigurationPersistenceService().getConfiguration("cluster")
          .getCacheXmlContent();
      assertThat(xml).doesNotContain("gateway-sender id=\"ln\"");
    });
  }

  /**
   * GatewaySender with given attribute values
   */
  @Test
  public void testCreateDestroyGatewaySender() {
    int socketReadTimeout = GatewaySender.MINIMUM_SOCKET_READ_TIMEOUT + 1000;
    String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID
        + "=ln" + " --" + CliStrings.CREATE_GATEWAYSENDER__REMOTEDISTRIBUTEDSYSTEMID + "=2" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__PARALLEL + "=false" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__MANUALSTART + "=true" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__SOCKETBUFFERSIZE + "=1000" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__SOCKETREADTIMEOUT + "=" + socketReadTimeout + " --"
        + CliStrings.CREATE_GATEWAYSENDER__ENABLEBATCHCONFLATION + "=true" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__BATCHSIZE + "=1000" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__BATCHTIMEINTERVAL + "=5000" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__ENABLEPERSISTENCE + "=true" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__DISKSYNCHRONOUS + "=false" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__MAXQUEUEMEMORY + "=1000" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__ALERTTHRESHOLD + "=100" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__DISPATCHERTHREADS + "=2" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__ORDERPOLICY + "=THREAD";

    gfsh.executeAndAssertThat(command).statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(3).hasColumn("Message").containsOnly(
            "GatewaySender \"ln\" created on \"" + SERVER_3 + "\"",
            "GatewaySender \"ln\" created on \"" + SERVER_4 + "\"",
            "GatewaySender \"ln\" created on \"" + SERVER_5 + "\"");

    VMProvider.invokeInEveryMember(() -> {
      verifySenderState("ln", false, false);
      verifySenderAttributes("ln", 2, false, true, 1000, socketReadTimeout, true, 1000, 5000, true,
          false, 1000, 100, 2, GatewaySender.OrderPolicy.THREAD, null, null, false);
    }, server1, server2, server3);

    // destroy gateway sender and verify AEQs cleaned up
    gfsh.executeAndAssertThat(DESTROY).statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(3).hasColumn("Message").containsOnly(
            "GatewaySender \"ln\" destroyed on \"" + SERVER_3 + "\"",
            "GatewaySender \"ln\" destroyed on \"" + SERVER_4 + "\"",
            "GatewaySender \"ln\" destroyed on \"" + SERVER_5 + "\"");

    VMProvider.invokeInEveryMember(() -> verifySenderDoesNotExist("ln", false), server1, server2,
        server3);
  }

  /**
   * GatewaySender with single dispatcher thread
   */
  @Test
  public void testCreateDestroyGatewaySenderWithSingleDispatcherThread() {
    String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID
        + "=ln" + " --" + CliStrings.CREATE_GATEWAYSENDER__REMOTEDISTRIBUTEDSYSTEMID + "=2" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__MANUALSTART + "=true" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__SOCKETBUFFERSIZE + "=1000" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__DISPATCHERTHREADS + "=1" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__GROUPTRANSACTIONEVENTS + "=true";

    gfsh.executeAndAssertThat(command).statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(3).hasColumn("Message").containsOnly(
            "GatewaySender \"ln\" created on \"" + SERVER_3 + "\"",
            "GatewaySender \"ln\" created on \"" + SERVER_4 + "\"",
            "GatewaySender \"ln\" created on \"" + SERVER_5 + "\"");

    VMProvider.invokeInEveryMember(() -> {
      verifySenderState("ln", false, false);
      verifySenderAttributes("ln", 2, false, true, 1000, 0, false, 100, 1000, false,
          true, 100, 0, 1, null, null, null, true);
    }, server1, server2, server3);

    // destroy gateway sender and verify AEQs cleaned up
    gfsh.executeAndAssertThat(DESTROY).statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(3).hasColumn("Message").containsOnly(
            "GatewaySender \"ln\" destroyed on \"" + SERVER_3 + "\"",
            "GatewaySender \"ln\" destroyed on \"" + SERVER_4 + "\"",
            "GatewaySender \"ln\" destroyed on \"" + SERVER_5 + "\"");

    VMProvider.invokeInEveryMember(() -> verifySenderDoesNotExist("ln", false), server1, server2,
        server3);
  }

  /**
   * GatewaySender with given attribute values and event filters.
   */
  @Test
  public void testCreateDestroyGatewaySenderWithGatewayEventFilters() {
    int socketReadTimeout = GatewaySender.MINIMUM_SOCKET_READ_TIMEOUT + 1000;
    String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID
        + "=ln" + " --" + CliStrings.CREATE_GATEWAYSENDER__REMOTEDISTRIBUTEDSYSTEMID + "=2" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__PARALLEL + "=false" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__MANUALSTART + "=true" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__SOCKETBUFFERSIZE + "=1000" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__SOCKETREADTIMEOUT + "=" + socketReadTimeout + " --"
        + CliStrings.CREATE_GATEWAYSENDER__ENABLEBATCHCONFLATION + "=true" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__BATCHSIZE + "=1000" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__BATCHTIMEINTERVAL + "=5000" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__ENABLEPERSISTENCE + "=true" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__DISKSYNCHRONOUS + "=false" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__MAXQUEUEMEMORY + "=1000" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__ALERTTHRESHOLD + "=100" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__DISPATCHERTHREADS + "=2" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__ORDERPOLICY + "=THREAD" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__GATEWAYEVENTFILTER
        + "=org.apache.geode.cache30.MyGatewayEventFilter1,org.apache.geode.cache30.MyGatewayEventFilter2";

    gfsh.executeAndAssertThat(command).statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(3).hasColumn("Message").containsOnly(
            "GatewaySender \"ln\" created on \"" + SERVER_3 + "\"",
            "GatewaySender \"ln\" created on \"" + SERVER_4 + "\"",
            "GatewaySender \"ln\" created on \"" + SERVER_5 + "\"");

    List<String> eventFilters = new ArrayList<>();
    eventFilters.add("org.apache.geode.cache30.MyGatewayEventFilter1");
    eventFilters.add("org.apache.geode.cache30.MyGatewayEventFilter2");

    VMProvider.invokeInEveryMember(() -> {
      verifySenderState("ln", false, false);
      verifySenderAttributes("ln", 2, false, true, 1000, socketReadTimeout, true, 1000, 5000, true,
          false, 1000, 100, 2, GatewaySender.OrderPolicy.THREAD, eventFilters, null, false);
    }, server1, server2, server3);

    // destroy gateway sender and verify AEQs cleaned up
    gfsh.executeAndAssertThat(DESTROY).statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(3).hasColumn("Message").containsOnly(
            "GatewaySender \"ln\" destroyed on \"" + SERVER_3 + "\"",
            "GatewaySender \"ln\" destroyed on \"" + SERVER_4 + "\"",
            "GatewaySender \"ln\" destroyed on \"" + SERVER_5 + "\"");

    VMProvider.invokeInEveryMember(() -> verifySenderDoesNotExist("ln", false), server1, server2,
        server3);
  }

  /**
   * GatewaySender with given attribute values and transport filters.
   */
  @Test
  public void testCreateDestroyGatewaySenderWithGatewayTransportFilters() {
    int socketReadTimeout = GatewaySender.MINIMUM_SOCKET_READ_TIMEOUT + 1000;
    String command = CliStrings.CREATE_GATEWAYSENDER + " --" + CliStrings.CREATE_GATEWAYSENDER__ID
        + "=ln" + " --" + CliStrings.CREATE_GATEWAYSENDER__REMOTEDISTRIBUTEDSYSTEMID + "=2" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__PARALLEL + "=false" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__MANUALSTART + "=true" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__SOCKETBUFFERSIZE + "=1000" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__SOCKETREADTIMEOUT + "=" + socketReadTimeout + " --"
        + CliStrings.CREATE_GATEWAYSENDER__ENABLEBATCHCONFLATION + "=true" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__BATCHSIZE + "=1000" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__BATCHTIMEINTERVAL + "=5000" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__ENABLEPERSISTENCE + "=true" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__DISKSYNCHRONOUS + "=false" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__MAXQUEUEMEMORY + "=1000" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__ALERTTHRESHOLD + "=100" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__DISPATCHERTHREADS + "=2" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__ORDERPOLICY + "=THREAD" + " --"
        + CliStrings.CREATE_GATEWAYSENDER__GATEWAYTRANSPORTFILTER
        + "=org.apache.geode.cache30.MyGatewayTransportFilter1";

    gfsh.executeAndAssertThat(command).statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(3).hasColumn("Message").containsOnly(
            "GatewaySender \"ln\" created on \"" + SERVER_3 + "\"",
            "GatewaySender \"ln\" created on \"" + SERVER_4 + "\"",
            "GatewaySender \"ln\" created on \"" + SERVER_5 + "\"");

    List<String> transportFilters = new ArrayList<>();
    transportFilters.add("org.apache.geode.cache30.MyGatewayTransportFilter1");

    VMProvider.invokeInEveryMember(() -> {
      verifySenderState("ln", false, false);
      verifySenderAttributes("ln", 2, false, true, 1000, socketReadTimeout, true, 1000, 5000, true,
          false, 1000, 100, 2, GatewaySender.OrderPolicy.THREAD, null, transportFilters, false);
    }, server1, server2, server3);

    // destroy gateway sender and verify AEQs cleaned up
    gfsh.executeAndAssertThat(DESTROY).statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(3).hasColumn("Message").containsOnly(
            "GatewaySender \"ln\" destroyed on \"" + SERVER_3 + "\"",
            "GatewaySender \"ln\" destroyed on \"" + SERVER_4 + "\"",
            "GatewaySender \"ln\" destroyed on \"" + SERVER_5 + "\"");

    VMProvider.invokeInEveryMember(() -> verifySenderDoesNotExist("ln", false), server1, server2,
        server3);
  }

  /**
   * GatewaySender with given attribute values on given member.
   */
  @Test
  public void testCreateDestroyGatewaySender_OnMember() {
    gfsh.executeAndAssertThat(CREATE + " --member=" + server1.getName()).statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(1).hasColumn("Message")
        .containsOnly("GatewaySender \"ln\" created on \"" + SERVER_3 + "\"");

    server1.invoke(() -> verifySenderState("ln", true, false));
    VMProvider.invokeInEveryMember(() -> verifySenderDoesNotExist("ln", false), server2, server3);

    gfsh.executeAndAssertThat(DESTROY + " --member=" + server1.getName()).statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(1).hasColumn("Message")
        .containsOnly("GatewaySender \"ln\" destroyed on \"" + SERVER_3 + "\"");

    VMProvider.invokeInEveryMember(() -> verifySenderDoesNotExist("ln", false), server1);
  }

  /**
   * GatewaySender with given attribute values on given group
   */
  @Test
  public void testCreateDestroyGatewaySender_Group() {
    gfsh.executeAndAssertThat(CREATE + " --group=senderGroup1").statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(1).hasColumn("Message")
        .containsOnly("GatewaySender \"ln\" created on \"" + SERVER_3 + "\"");

    server1.invoke(() -> verifySenderState("ln", true, false));
    VMProvider.invokeInEveryMember(() -> verifySenderDoesNotExist("ln", false), server2, server3);

    gfsh.executeAndAssertThat(DESTROY + " --group=senderGroup1").statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(1).hasColumn("Message")
        .containsOnly("GatewaySender \"ln\" destroyed on \"" + SERVER_3 + "\"");

    VMProvider.invokeInEveryMember(() -> verifySenderDoesNotExist("ln", false), server1);
  }

  /**
   * Parallel GatewaySender with given attribute values +
   */
  @Test
  public void testCreateDestroyParallelGatewaySender() {
    gfsh.executeAndAssertThat(CREATE + " --parallel").statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(3).hasColumn("Message").containsOnly(
            "GatewaySender \"ln\" created on \"" + SERVER_3 + "\"",
            "GatewaySender \"ln\" created on \"" + SERVER_4 + "\"",
            "GatewaySender \"ln\" created on \"" + SERVER_5 + "\"");

    // destroy gateway sender and verify AEQs cleaned up
    gfsh.executeAndAssertThat(DESTROY).statusIsSuccess()
        .doesNotContainOutput("Did not complete waiting")
        .hasTableSection().hasRowSize(3).hasColumn("Message").containsOnly(
            "GatewaySender \"ln\" destroyed on \"" + SERVER_3 + "\"",
            "GatewaySender \"ln\" destroyed on \"" + SERVER_4 + "\"",
            "GatewaySender \"ln\" destroyed on \"" + SERVER_5 + "\"");

    VMProvider.invokeInEveryMember(() -> verifySenderDoesNotExist("ln", false), server1, server2,
        server3);
  }
}


text:
package ga.botthreads;

public class ThreadedGABot1 extends GABot {

	public ThreadedGABot1() {
		super(1);
	}
}


text:
import subprocess
import pytest

from ..helpers import BaseWFC3

class TestIR07Single(BaseWFC3):
    """Tests for WFC3/IR."""
    detector = 'ir'

    def _single_raw_calib(self, rootname):
        raw_file = '{}_raw.fits'.format(rootname)

        # Prepare input file.
        self.get_input_file(raw_file)

        # Run CALWF3
        subprocess.call(['calwf3.e', raw_file, '-v'])

        # Compare results
        outputs = [('{}_flt.fits'.format(rootname),
                    '{}_flt_ref.fits'.format(rootname)),
                   ('{}_ima.fits'.format(rootname),
                    '{}_ima_ref.fits'.format(rootname))]
        self.compare_outputs(outputs)

    # ib3m55wfq = Ported from calwf3_ir_07
    @pytest.mark.parametrize(
        'rootname', ['ib3m55wfq'])
    def test_ir_07single(self, rootname):
        self._single_raw_calib(rootname)


text:
package it.redhat.algorithms.raft.services;

import it.redhat.algorithms.raft.domain.messages.AppendLogEntriesRequest;
import it.redhat.algorithms.raft.domain.messages.AppendLogEntriesResponse;
import it.redhat.algorithms.raft.domain.messages.VoteRequest;
import it.redhat.algorithms.raft.domain.messages.VoteResponse;
import it.redhat.algorithms.raft.support.Handler;

public interface Transport<V> {

  <T> void onMessage(Handler<T> message);

  void appendEntries(AppendLogEntriesRequest<V> entries);
  void appendEntriesResponse(long leaderId, AppendLogEntriesResponse<V> response);

  void askForVotes(VoteRequest request);
  void askForVotesResponse(long candidateId, VoteResponse response);
}


text:
package api

import (
	"k8s.io/kubernetes/pkg/api/unversioned"
)

// IngressAdmissionConfig is the configuration for the the ingress
// controller limiter plugin. It changes the behavior of ingress
// objects to behave better with openshift routes and routers.
// *NOTE* This has security implications in the router when handling
// ingress objects
type IngressAdmissionConfig struct {
	unversioned.TypeMeta

	// AllowHostnameChanges when false or unset openshift does not
	// allow changing or adding hostnames to ingress objects. If set
	// to true then hostnames can be added or modified which has
	// security implications in the router.
	AllowHostnameChanges bool
}


text:
module Gitlab # rubocop:disable Naming/FileName
  module Auth
    Result = Struct.new(:actor, :project, :type, :authentication_abilities) do
      def ci?(for_project)
        type == :ci &&
          project &&
          project == for_project
      end

      def lfs_deploy_token?(for_project)
        type == :lfs_deploy_token &&
          actor.try(:has_access_to?, for_project)
      end

      def success?
        actor.present? || type == :ci
      end

      def failed?
        !success?
      end
    end
  end
end


text:
var gulp = require('gulp');
var inject = require('gulp-inject');
var wiredep = require('wiredep').stream;

gulp.task('inject', function () {
  var target = gulp.src('./index.html');
  // It's not necessary to read the files (will speed up things), we're only after their paths:
  var sources = gulp.src(['app.js', './scripts/**/*.js', './scripts/**/*.css'], {read: false});

  return target.pipe(inject(sources))
    .pipe(gulp.dest('./')).pipe(wiredep({   //Once custom js files are injected, inject bower js files as well
      optional: 'configuration',
      goes: 'here'
    }))
    .pipe(gulp.dest('./'));
});


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Fabrikam.Module1.Uc1.Query.Business
{
    public class Class1
    {
    }
}


text:
package org.apache.accumulo.tserver.session;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.accumulo.core.client.Durability;
import org.apache.accumulo.core.clientImpl.thrift.SecurityErrorCode;
import org.apache.accumulo.core.constraints.Violations;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.dataImpl.KeyExtent;
import org.apache.accumulo.core.securityImpl.thrift.TCredentials;
import org.apache.accumulo.core.util.MapCounter;
import org.apache.accumulo.core.util.Stat;
import org.apache.accumulo.tserver.TservConstraintEnv;
import org.apache.accumulo.tserver.tablet.Tablet;

public class UpdateSession extends Session {
  public final TservConstraintEnv cenv;
  public final MapCounter<Tablet> successfulCommits = new MapCounter<>();
  public final Map<KeyExtent,Long> failures = new HashMap<>();
  public final HashMap<KeyExtent,SecurityErrorCode> authFailures = new HashMap<>();
  public final Stat prepareTimes = new Stat();
  public final Stat walogTimes = new Stat();
  public final Stat commitTimes = new Stat();
  public final Stat authTimes = new Stat();
  public final Map<Tablet,List<Mutation>> queuedMutations = new HashMap<>();
  public final Violations violations;

  public Tablet currentTablet = null;
  public long totalUpdates = 0;
  public long flushTime = 0;
  public long queuedMutationSize = 0;
  public final Durability durability;

  public UpdateSession(TservConstraintEnv env, TCredentials credentials, Durability durability) {
    super(credentials);
    this.cenv = env;
    this.violations = new Violations();
    this.durability = durability;
  }
}


text:
layout: default
---

{{ page.title }}

    {{ content }}

  <link rel="icon" type="image/x-icon"  href="{{ "/favicon.ico" | prepend:site.baseurl }}" />


text:
mvc.view.partial.mainTop = (function(){

	var topView = Ti.UI.createView({
		top: 0,
		left: 0,
		height: 45,
		width: 320,
		backgroundImage: '/assets/main_top_bg.png'
	});

	var avatar = Ti.UI.createLabel({
		top: 0,
		height: 45,
		width: 45,
		right: 0
	});

	var sideButton = Ti.UI.createLabel({
		top: 0,
		left: 0,
		height: 40,
		width: 40
	});

	var testButton = Ti.UI.createLabel({
		left: 140,
		top: 0,
		height: 45,
		width: 40
	});

	sideButton.addEventListener('click', function(){
		mvc.view.mainList.toggleMonthList();
	});

	avatar.addEventListener('click', function(){
		mvc.view.mainList.toggleSettings();
	});

	topView.add(sideButton);
	topView.add(avatar);
	topView.add(testButton);
	return topView;

})();


text:
uint64_t Internal_ThisThreadId() noexcept
{
    return reinterpret_cast<uint64_t>(pthread_self());
}

void Internal_HCTraceMessage(const char* areaName, HCTraceLevel traceLevel, const char* message) noexcept
{
    printf("%s", message);
}


text:
<?php

namespace CodeIgniter\Log\Handlers;

/**
 * Expected behavior for a Log handler
 */
interface HandlerInterface
{

	/**
	 * Handles logging the message.
	 * If the handler returns false, then execution of handlers
	 * will stop. Any handlers that have not run, yet, will not
	 * be run.
	 *
	 * @param $level
	 * @param $message
	 *
	 * @return boolean
	 */
	public function handle($level, $message): bool;

	//--------------------------------------------------------------------

	/**
	 * Checks whether the Handler will handle logging items of this
	 * log Level.
	 *
	 * @param string $level
	 *
	 * @return boolean
	 */
	public function canHandle(string $level): bool;

	//--------------------------------------------------------------------

	/**
	 * Sets the preferred date format to use when logging.
	 *
	 * @param string $format
	 *
	 * @return HandlerInterface
	 */
	public function setDateFormat(string $format);

	//--------------------------------------------------------------------
}


text:
using Example
using Base.Test

@test hello("Julia") == "Hello, Julia"
@test_approx_eq domath(2.0) 7.0


text:
#include "regColl.h"
#include "procApiRequest.h"
#include "apiNumber.h"

/**
 * \fn rcRegColl( rcComm_t *conn, collInp_t *regCollInp )
 *
 * \brief Register a collection.
 *
 * \ingroup server_icat
 *
 * \param[in] conn - A rcComm_t connection handle to the server.
 * \param[in] regCollInp
 *
 * \return integer
 * \retval 0 on success
 * \sideeffect none
 * \pre none
 * \post none
 * \sa none
**/
int
rcRegColl( rcComm_t *conn, collInp_t *regCollInp ) {
    int status;
    status = procApiRequest( conn, REG_COLL_AN, regCollInp, NULL,
                             ( void ** ) NULL, NULL );

    return status;
}


text:
user_name="${user_name:-}"
user_home="${user_home:-}"

# set default value for devops home environment variable if not set. -------------------------------
devops_home="${devops_home:-/opt/devops}"

# define usage function. ---------------------------------------------------------------------------
usage() {
  cat <<EOF
Usage:
  All inputs are defined by external environment variables.
  Script should be run with 'root' privilege.
  Example:
    [root]# export user_name="user1"                        # user name.
    [root]# export user_home="/home/user1"                  # [optional] user home directory path.
                                                            #
    [root]# export devops_home="/opt/devops"                # [optional] devops home (defaults to '/opt/devops').
    [root]# $0
EOF
}

# validate environment variables. ------------------------------------------------------------------
if [ -z "$user_name" ]; then
  echo "Error: 'user_name' environment variable not set."
  usage
  exit 1
fi

if [ "$user_name" == "root" ]; then
  echo "Error: 'user_name' should NOT be 'root'."
  usage
  exit 1
fi

# if not set, retrieve user home directory path.
if [ -z "$user_home" ]; then
  user_home=$(eval echo "~${user_name}")
fi

# modify default environment profile for the user. -------------------------------------------------
cd ${user_home}

# uncomment proxy environment variables (if set).
proxy_set="${http_proxy:-}"
if [ -n "${proxy_set}" ]; then
  sed -i 's/^#http_proxy/http_proxy/g;s/^#export http_proxy/export http_proxy/g' .bashrc
  sed -i 's/^#https_proxy/https_proxy/g;s/^#export https_proxy/export https_proxy/g' .bashrc
fi

# uncomment gvim alias for desktop users.
sed -i 's/^#alias gvim/alias gvim/g' .bashrc

# configure gnome-3 desktop properties for devops users. -------------------------------------------
#cd ${devops_home}/provisioners/scripts/centos
#chmod 755 config_centos7_gnome_desktop.sh
##sudo -u ${user_name} -S -E sh -eux "${devops_home}/provisioners/scripts/centos/config_centos7_gnome_desktop.sh"
#runuser -c "devops_home=${devops_home} ${devops_home}/provisioners/scripts/centos/config_centos7_gnome_desktop.sh" - ${user_name}


text:
//*****************************************************************************
//
// Hardware ULPI registers.
//
//*****************************************************************************
#define ULPI_FCTL               0x04
#define ULPI_FCTL_SET           0x05
#define ULPI_FCTL_CLEAR         0x06
#define ULPI_ICTL               0x07
#define ULPI_ICTL_SET           0x08
#define ULPI_ICTL_CLEAR         0x09
#define ULPI_OTGCTL             0x0A
#define ULPI_OTGCTL_SET         0x0B
#define ULPI_OTGCTL_CLEAR       0x0C

//*****************************************************************************
//
// The following are defines for the bit fields in the ULPI_FCTL register.
//
//*****************************************************************************
#define ULPI_FCTL_XCVR_M        0x03
#define ULPI_FCTL_XCVR_HS       0x00
#define ULPI_FCTL_XCVR_FS       0x01
#define ULPI_FCTL_XCVR_LS       0x02
#define ULPI_FCTL_XCVR_FSLS     0x03
#define ULPI_FCTL_TERMSEL       0x04
#define ULPI_FCTL_OPMODE_M      0x18
#define ULPI_FCTL_OPMODE_NORM   0x00
#define ULPI_FCTL_OPMODE_NODRV  0x08
#define ULPI_FCTL_OPMODE_NONRZI 0x10
#define ULPI_FCTL_OPMODE_DISAUTO \
                                0x18
#define ULPI_FCTL_OPMODE_RESET  0x20
#define ULPI_FCTL_OPMODE_SUSPEND \
                                0x40

//*****************************************************************************
//
// The following are defines for the bit fields in the ULPI_ICTL register.
//
//*****************************************************************************
#define ULPI_ICTL_SER6PIN       0x01
#define ULPI_ICTL_SER3PIN       0x02
#define ULPI_ICTL_AUTORESUME    0x10
#define ULPI_ICTL_INDINV        0x20
#define ULPI_ICTL_INDPASSTHRU   0x40
#define ULPI_ICTL_PROTDIS       0x80

//*****************************************************************************
//
// The following are defines for the bit fields in the ULPI_OTGCTL register.
//
//*****************************************************************************
#define ULPI_OTGCTL_ID_EN       0x01
#define ULPI_OTGCTL_DPPD_EN     0x02
#define ULPI_OTGCTL_DMPD_EN     0x04
#define ULPI_OTGCTL_DISCHRG_VBUS \
                                0x08
#define ULPI_OTGCTL_CHRG_VBUS   0x10
#define ULPI_OTGCTL_VBUSINT_EN  0x20
#define ULPI_OTGCTL_VBUSEXT_EN  0x40
#define ULPI_OTGCTL_VBUSEXT_IND 0x80

//*****************************************************************************
//
//! Sets the configuration of an external USB Phy.
//!
//! \param ui32Base specifies the USB module base address.
//! \param ui32Config specifies the configuration options for the external Phy.
//!
//! This function sets the configuration options for an externally connected
//! USB Phy that is connected using the ULPI interface.  The \e ui32Config
//! parameter holds all of the configuration options defined by the
//! \b UPLI_CFG_ values.  The values are grouped as follows:
//!
//! Connection speed, using one of the following:
//! - \b UPLI_CFG_HS enables high speed operation.
//! - \b UPLI_CFG_FS enables full speed operation.
//! - \b UPLI_CFG_HS enables low speed operation.
//!
//! Any of the following can be included:
//! - \b UPLI_CFG_AUTORESUME enable automatic transmission of resume signaling
//!   from the Phy.
//! - \b UPLI_CFG_INVVBUSIND inverts the external VBUS indicator if it is
//!   selected.
//! - \b UPLI_CFG_PASSTHRUIND passes the external VBUS indicator through
//!   without using the Phy's VBUS comparator.
//! - \b ULPI_CFG_EXTVBUSDRV enables an external VBUS drive source.
//! - \b ULPI_CFG_EXTVBUSIND enables an external signal for VBUS valid.
//!
//! \return None.
//
//*****************************************************************************
void
ULPIConfigSet(uint32_t ui32Base, uint32_t ui32Config)
{
    uint8_t ui8Val;

    ui8Val = USBULPIRegRead(ui32Base, ULPI_FCTL);
    ui8Val &= ~(ULPI_FCTL_XCVR_M);
    ui8Val = ui8Val | (uint8_t)ui32Config;

    USBULPIRegWrite(ui32Base, ULPI_FCTL, ui8Val);

    ui8Val = USBULPIRegRead(ui32Base, ULPI_ICTL);
    ui8Val &= ~(ULPI_ICTL_AUTORESUME | ULPI_ICTL_INDINV |
                ULPI_ICTL_INDPASSTHRU);
    ui8Val = ui8Val | (uint8_t)((ui32Config >> 8) & 0xff);

    USBULPIRegWrite(ui32Base, ULPI_ICTL, ui8Val);

    ui8Val = USBULPIRegRead(ui32Base, ULPI_OTGCTL);
    ui8Val &= ~(ULPI_OTGCTL_VBUSINT_EN | ULPI_OTGCTL_VBUSEXT_EN |
                ULPI_OTGCTL_VBUSEXT_IND);
    ui8Val = ui8Val | (uint8_t)((ui32Config >> 16) & 0xff);

    USBULPIRegWrite(ui32Base, ULPI_OTGCTL, ui8Val);
}

//*****************************************************************************
//
//! Enables or disables power to the external USB Phy.
//!
//! \param ui32Base specifies the USB module base address.
//! \param bEnable specifies if the Phy is fully powered or in suspend mode.
//!
//! This function sets the current power configuration for the external ULPI
//! connected Phy.  When \e bEnable is \b true the Phy is fully powered and
//! when \b false the USB Phy is in suspend mode.
//!
//! \return None.
//
//*****************************************************************************
void
ULPIPowerTransceiver(uint32_t ui32Base, bool bEnable)
{
    if(bEnable)
    {
        USBULPIRegWrite(ui32Base, ULPI_FCTL_CLEAR,
                        ULPI_FCTL_OPMODE_SUSPEND);
    }
    else
    {
        USBULPIRegWrite(ui32Base, ULPI_FCTL_SET,
                        ULPI_FCTL_OPMODE_SUSPEND);
    }
}


text:
class UserMailer < ApplicationMailer

  def send_test(email)
    @email = email
    mail(to: email, subject: "Testing the emails")
  end

end


text:
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
                        unicode_literals, with_statement)

from pants.base.deprecated import deprecated_module
from pants.build_graph.address import Address, Addresses, BuildFileAddress, parse_spec

deprecated_module('0.0.55', hint_message='Use pants.build_graph.address instead.')

Address = Address
Addresses = Addresses
BuildFileAddress = BuildFileAddress
parse_spec = parse_spec


text:
'use strict';

const config = require('config');
const _ = require('lodash');
const path = require('path');

const local = path.join(__dirname, '../../input-plugins');

module.exports = (application) => {
  return new Promise((res, rej) => {
    const app = application;

    // grab plugins dir from config
    let plugins = _.get(config, 'content.plugins.directory', []);

    // convert string to array
    if (typeof plugins === 'string') {
      plugins = [plugins];
    }

    // must be string or array
    if (!Array.isArray(plugins)) {
      rej('Plugin directory configuration must be string or an array');
    }

    // push local directory if it does not exist
    if (plugins.indexOf(local) === -1) {
      plugins.push(local);
    }

    const configuration = _.set(config, 'content.plugins.directory', plugins);

    // use node-config function to add Punchcard plugin directory
    config.util.extendDeep(config, configuration);

    res(app);
  });
};


text:
#ifndef _NME_ENGINE_H
#define _NME_ENGINE_H

#include <NTypes.h>

bool NEngine_init();
bool NEngine_destroy();

void NEngine_update_viewport();
void NEngine_update_time();
void NEngine_update_fps();

void NEngine_run();

#endif


text:
module Regexp::Expression
  # abstract class
  class SequenceOperation < Regexp::Expression::Subexpression
    alias :sequences :expressions
    alias :operands :expressions
    alias :operator :text

    def starts_at
      expressions.first.starts_at
    end
    alias :ts :starts_at

    def <<(exp)
      expressions.last << exp
    end

    def add_sequence(active_opts = {})
      self.class::OPERAND.add_to(self, {}, active_opts)
    end

    def parts
      intersperse(expressions, text.dup)
    end
  end
end


text:
using System.IO;
using log4net.Util;
using TicTacTubeCore.Sources.Files;
using TicTacTubeCore.Sources.Files.External;

namespace TicTacTubeTest.Sources.Files
{
	public class MockFileSource : IFileSource
	{
		public IExternalFileSource ExternalSource => null;
		public FileInfo FileInfo => null;
		public string FileName => null;
		public string FullFileName => null;
		public string FileExtension => null;
		public string Path => null;

		public void Init()
		{
		}

		public void BeginExecute()
		{
		}

		public void EndExecute()
		{
		}
	}
}


text:
> The builder is bundled in the NPM package [@tmorin/ceb-elements-builders](https://www.npmjs.com/package/@tmorin/ceb-elements-builders).

The builder handles the integration of a templating solution to update the content of the Custom Element.

The builder doesn't provide the templating solution out of the box.
However, the library provides a built-in solution described later, c.f. [Templating](../templating/README.md) .

## Challenge yourself

Will you be able to ...
1. display `Hello, John Doe!` calling the `render` method?
2. render into a Shadow DOM?
3. render into a Grey DOM?

  See the Pen
  <ceb/> ~ challenge/TemplateBuilder by Thibault Morin (@tmorin)
  on CodePen.


text:
void register_Element_class();

#endif//Element_hpp__pyplusplus_wrapper


text:
module Spree
  class BarcodeGeneratorService
    require 'barby'
    require 'barby/barcode/code_128'
    require 'barby/barcode/ean_13'
    require 'barby/outputter/png_outputter'
    require 'prawn'
    require 'prawn/measurement_extensions'

    def append_barcode_to_pdf_for_variants_of_product(variants)
      variants.inject(empty_pdf(height: 120)) { |pdf, variant| append_barcode_to_pdf_for_variant(variant, pdf) }
    end

    def append_barcode_to_pdf_for_variant(variant, pdf = empty_pdf)
      [ variant.name, variant.options_text, (variant.price.to_s + current_symbol) ].each { |item| pdf.text(item) }

      barcode = get_barcode(variant)
      pdf.image(StringIO.new(barcode.to_png(xdim: 5)), width: 50.mm, height: 10.mm, margin: 2.mm) if barcode
      pdf.text(' ')
      pdf
    end

    private

      def empty_pdf(layout = {})
        layout = { width: 54, height: 31, margin: 1 }.merge(layout)
        pdf = ::Prawn::Document.new( page_size: [ layout[:width].mm , layout[:height].mm ], margin: layout[:margin].mm )
      end

      def current_symbol
        currency = ::Spree::Config[:currency]
        currency == 'NGN' ? 'N' : ::Money::Currency.table.find { |key, value| value.has_value?(currency) }[1][:symbol]
      end

      def get_barcode(variant)
        code = variant.sku
        ::Barby::Code128B.new(code) if code
      end
  end
end