text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: ProtobufMessage.proto

package com.codebrig.beam.messages;

public final class ProtobufMessage {
  private ProtobufMessage() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface MessageEntrySetOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // repeated .messages.MessageEntry entries = 1;
    /**
     * repeated .messages.MessageEntry entries = 1;
     */
    java.util.List<com.codebrig.beam.messages.ProtobufMessage.MessageEntry>
        getEntriesList();
    /**
     * repeated .messages.MessageEntry entries = 1;
     */
    com.codebrig.beam.messages.ProtobufMessage.MessageEntry getEntries(int index);
    /**
     * repeated .messages.MessageEntry entries = 1;
     */
    int getEntriesCount();
    /**
     * repeated .messages.MessageEntry entries = 1;
     */
    java.util.List<? extends com.codebrig.beam.messages.ProtobufMessage.MessageEntryOrBuilder>
        getEntriesOrBuilderList();
    /**
     * repeated .messages.MessageEntry entries = 1;
     */
    com.codebrig.beam.messages.ProtobufMessage.MessageEntryOrBuilder getEntriesOrBuilder(
        int index);
  }
  /**
   * Protobuf type {@code messages.MessageEntrySet}
   */
  public static final class MessageEntrySet extends
      com.google.protobuf.GeneratedMessage
      implements MessageEntrySetOrBuilder {
    // Use MessageEntrySet.newBuilder() to construct.
    private MessageEntrySet(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private MessageEntrySet(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final MessageEntrySet defaultInstance;
    public static MessageEntrySet getDefaultInstance() {
      return defaultInstance;
    }

    public MessageEntrySet getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private MessageEntrySet(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                entries_ = new java.util.ArrayList<com.codebrig.beam.messages.ProtobufMessage.MessageEntry>();
                mutable_bitField0_ |= 0x00000001;
              }
              entries_.add(input.readMessage(com.codebrig.beam.messages.ProtobufMessage.MessageEntry.PARSER, extensionRegistry));
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
          entries_ = java.util.Collections.unmodifiableList(entries_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.codebrig.beam.messages.ProtobufMessage.internal_static_messages_MessageEntrySet_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.codebrig.beam.messages.ProtobufMessage.internal_static_messages_MessageEntrySet_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet.class, com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet.Builder.class);
    }

    public static com.google.protobuf.Parser<MessageEntrySet> PARSER =
        new com.google.protobuf.AbstractParser<MessageEntrySet>() {
      public MessageEntrySet parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new MessageEntrySet(input, extensionRegistry);
      }
    };

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

    // repeated .messages.MessageEntry entries = 1;
    public static final int ENTRIES_FIELD_NUMBER = 1;
    private java.util.List<com.codebrig.beam.messages.ProtobufMessage.MessageEntry> entries_;
    /**
     * repeated .messages.MessageEntry entries = 1;
     */
    public java.util.List<com.codebrig.beam.messages.ProtobufMessage.MessageEntry> getEntriesList() {
      return entries_;
    }
    /**
     * repeated .messages.MessageEntry entries = 1;
     */
    public java.util.List<? extends com.codebrig.beam.messages.ProtobufMessage.MessageEntryOrBuilder>
        getEntriesOrBuilderList() {
      return entries_;
    }
    /**
     * repeated .messages.MessageEntry entries = 1;
     */
    public int getEntriesCount() {
      return entries_.size();
    }
    /**
     * repeated .messages.MessageEntry entries = 1;
     */
    public com.codebrig.beam.messages.ProtobufMessage.MessageEntry getEntries(int index) {
      return entries_.get(index);
    }
    /**
     * repeated .messages.MessageEntry entries = 1;
     */
    public com.codebrig.beam.messages.ProtobufMessage.MessageEntryOrBuilder getEntriesOrBuilder(
        int index) {
      return entries_.get(index);
    }

    private void initFields() {
      entries_ = java.util.Collections.emptyList();
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      for (int i = 0; i < getEntriesCount(); i++) {
        if (!getEntries(i).isInitialized()) {
          memoizedIsInitialized = 0;
          return false;
        }
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      for (int i = 0; i < entries_.size(); i++) {
        output.writeMessage(1, entries_.get(i));
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      for (int i = 0; i < entries_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, entries_.get(i));
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code messages.MessageEntrySet}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements com.codebrig.beam.messages.ProtobufMessage.MessageEntrySetOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.codebrig.beam.messages.ProtobufMessage.internal_static_messages_MessageEntrySet_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.codebrig.beam.messages.ProtobufMessage.internal_static_messages_MessageEntrySet_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet.class, com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet.Builder.class);
      }

      // Construct using com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getEntriesFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        if (entriesBuilder_ == null) {
          entries_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          entriesBuilder_.clear();
        }
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.codebrig.beam.messages.ProtobufMessage.internal_static_messages_MessageEntrySet_descriptor;
      }

      public com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet getDefaultInstanceForType() {
        return com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet.getDefaultInstance();
      }

      public com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet build() {
        com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet buildPartial() {
        com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet result = new com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet(this);
        int from_bitField0_ = bitField0_;
        if (entriesBuilder_ == null) {
          if (((bitField0_ & 0x00000001) == 0x00000001)) {
            entries_ = java.util.Collections.unmodifiableList(entries_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.entries_ = entries_;
        } else {
          result.entries_ = entriesBuilder_.build();
        }
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet) {
          return mergeFrom((com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet other) {
        if (other == com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet.getDefaultInstance()) return this;
        if (entriesBuilder_ == null) {
          if (!other.entries_.isEmpty()) {
            if (entries_.isEmpty()) {
              entries_ = other.entries_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureEntriesIsMutable();
              entries_.addAll(other.entries_);
            }
            onChanged();
          }
        } else {
          if (!other.entries_.isEmpty()) {
            if (entriesBuilder_.isEmpty()) {
              entriesBuilder_.dispose();
              entriesBuilder_ = null;
              entries_ = other.entries_;
              bitField0_ = (bitField0_ & ~0x00000001);
              entriesBuilder_ =
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                   getEntriesFieldBuilder() : null;
            } else {
              entriesBuilder_.addAllMessages(other.entries_);
            }
          }
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        for (int i = 0; i < getEntriesCount(); i++) {
          if (!getEntries(i).isInitialized()) {

            return false;
          }
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.codebrig.beam.messages.ProtobufMessage.MessageEntrySet) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      // repeated .messages.MessageEntry entries = 1;
      private java.util.List<com.codebrig.beam.messages.ProtobufMessage.MessageEntry> entries_ =
        java.util.Collections.emptyList();
      private void ensureEntriesIsMutable() {
        if (!((bitField0_ & 0x00000001) == 0x00000001)) {
          entries_ = new java.util.ArrayList<com.codebrig.beam.messages.ProtobufMessage.MessageEntry>(entries_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilder<
          com.codebrig.beam.messages.ProtobufMessage.MessageEntry, com.codebrig.beam.messages.ProtobufMessage.MessageEntry.Builder, com.codebrig.beam.messages.ProtobufMessage.MessageEntryOrBuilder> entriesBuilder_;

      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public java.util.List<com.codebrig.beam.messages.ProtobufMessage.MessageEntry> getEntriesList() {
        if (entriesBuilder_ == null) {
          return java.util.Collections.unmodifiableList(entries_);
        } else {
          return entriesBuilder_.getMessageList();
        }
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public int getEntriesCount() {
        if (entriesBuilder_ == null) {
          return entries_.size();
        } else {
          return entriesBuilder_.getCount();
        }
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public com.codebrig.beam.messages.ProtobufMessage.MessageEntry getEntries(int index) {
        if (entriesBuilder_ == null) {
          return entries_.get(index);
        } else {
          return entriesBuilder_.getMessage(index);
        }
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public Builder setEntries(
          int index, com.codebrig.beam.messages.ProtobufMessage.MessageEntry value) {
        if (entriesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureEntriesIsMutable();
          entries_.set(index, value);
          onChanged();
        } else {
          entriesBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public Builder setEntries(
          int index, com.codebrig.beam.messages.ProtobufMessage.MessageEntry.Builder builderForValue) {
        if (entriesBuilder_ == null) {
          ensureEntriesIsMutable();
          entries_.set(index, builderForValue.build());
          onChanged();
        } else {
          entriesBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public Builder addEntries(com.codebrig.beam.messages.ProtobufMessage.MessageEntry value) {
        if (entriesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureEntriesIsMutable();
          entries_.add(value);
          onChanged();
        } else {
          entriesBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public Builder addEntries(
          int index, com.codebrig.beam.messages.ProtobufMessage.MessageEntry value) {
        if (entriesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureEntriesIsMutable();
          entries_.add(index, value);
          onChanged();
        } else {
          entriesBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public Builder addEntries(
          com.codebrig.beam.messages.ProtobufMessage.MessageEntry.Builder builderForValue) {
        if (entriesBuilder_ == null) {
          ensureEntriesIsMutable();
          entries_.add(builderForValue.build());
          onChanged();
        } else {
          entriesBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public Builder addEntries(
          int index, com.codebrig.beam.messages.ProtobufMessage.MessageEntry.Builder builderForValue) {
        if (entriesBuilder_ == null) {
          ensureEntriesIsMutable();
          entries_.add(index, builderForValue.build());
          onChanged();
        } else {
          entriesBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public Builder addAllEntries(
          java.lang.Iterable<? extends com.codebrig.beam.messages.ProtobufMessage.MessageEntry> values) {
        if (entriesBuilder_ == null) {
          ensureEntriesIsMutable();
          super.addAll(values, entries_);
          onChanged();
        } else {
          entriesBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public Builder clearEntries() {
        if (entriesBuilder_ == null) {
          entries_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          entriesBuilder_.clear();
        }
        return this;
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public Builder removeEntries(int index) {
        if (entriesBuilder_ == null) {
          ensureEntriesIsMutable();
          entries_.remove(index);
          onChanged();
        } else {
          entriesBuilder_.remove(index);
        }
        return this;
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public com.codebrig.beam.messages.ProtobufMessage.MessageEntry.Builder getEntriesBuilder(
          int index) {
        return getEntriesFieldBuilder().getBuilder(index);
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public com.codebrig.beam.messages.ProtobufMessage.MessageEntryOrBuilder getEntriesOrBuilder(
          int index) {
        if (entriesBuilder_ == null) {
          return entries_.get(index);  } else {
          return entriesBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public java.util.List<? extends com.codebrig.beam.messages.ProtobufMessage.MessageEntryOrBuilder>
           getEntriesOrBuilderList() {
        if (entriesBuilder_ != null) {
          return entriesBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(entries_);
        }
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public com.codebrig.beam.messages.ProtobufMessage.MessageEntry.Builder addEntriesBuilder() {
        return getEntriesFieldBuilder().addBuilder(
            com.codebrig.beam.messages.ProtobufMessage.MessageEntry.getDefaultInstance());
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public com.codebrig.beam.messages.ProtobufMessage.MessageEntry.Builder addEntriesBuilder(
          int index) {
        return getEntriesFieldBuilder().addBuilder(
            index, com.codebrig.beam.messages.ProtobufMessage.MessageEntry.getDefaultInstance());
      }
      /**
       * repeated .messages.MessageEntry entries = 1;
       */
      public java.util.List<com.codebrig.beam.messages.ProtobufMessage.MessageEntry.Builder>
           getEntriesBuilderList() {
        return getEntriesFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilder<
          com.codebrig.beam.messages.ProtobufMessage.MessageEntry, com.codebrig.beam.messages.ProtobufMessage.MessageEntry.Builder, com.codebrig.beam.messages.ProtobufMessage.MessageEntryOrBuilder>
          getEntriesFieldBuilder() {
        if (entriesBuilder_ == null) {
          entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
              com.codebrig.beam.messages.ProtobufMessage.MessageEntry, com.codebrig.beam.messages.ProtobufMessage.MessageEntry.Builder, com.codebrig.beam.messages.ProtobufMessage.MessageEntryOrBuilder>(
                  entries_,
                  ((bitField0_ & 0x00000001) == 0x00000001),
                  getParentForChildren(),
                  isClean());
          entries_ = null;
        }
        return entriesBuilder_;
      }

      // @@protoc_insertion_point(builder_scope:messages.MessageEntrySet)
    }

    static {
      defaultInstance = new MessageEntrySet(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:messages.MessageEntrySet)
  }

  public interface MessageEntryOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // required string key = 1;
    /**
     * required string key = 1;
     */
    boolean hasKey();
    /**
     * required string key = 1;
     */
    java.lang.String getKey();
    /**
     * required string key = 1;
     */
    com.google.protobuf.ByteString
        getKeyBytes();

    // repeated string value = 2;
    /**
     * repeated string value = 2;
     */
    java.util.List<java.lang.String>
    getValueList();
    /**
     * repeated string value = 2;
     */
    int getValueCount();
    /**
     * repeated string value = 2;
     */
    java.lang.String getValue(int index);
    /**
     * repeated string value = 2;
     */
    com.google.protobuf.ByteString
        getValueBytes(int index);
  }
  /**
   * Protobuf type {@code messages.MessageEntry}
   */
  public static final class MessageEntry extends
      com.google.protobuf.GeneratedMessage
      implements MessageEntryOrBuilder {
    // Use MessageEntry.newBuilder() to construct.
    private MessageEntry(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private MessageEntry(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final MessageEntry defaultInstance;
    public static MessageEntry getDefaultInstance() {
      return defaultInstance;
    }

    public MessageEntry getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private MessageEntry(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              bitField0_ |= 0x00000001;
              key_ = input.readBytes();
              break;
            }
            case 18: {
              if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
                value_ = new com.google.protobuf.LazyStringArrayList();
                mutable_bitField0_ |= 0x00000002;
              }
              value_.add(input.readBytes());
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
          value_ = new com.google.protobuf.UnmodifiableLazyStringList(value_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.codebrig.beam.messages.ProtobufMessage.internal_static_messages_MessageEntry_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.codebrig.beam.messages.ProtobufMessage.internal_static_messages_MessageEntry_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.codebrig.beam.messages.ProtobufMessage.MessageEntry.class, com.codebrig.beam.messages.ProtobufMessage.MessageEntry.Builder.class);
    }

    public static com.google.protobuf.Parser<MessageEntry> PARSER =
        new com.google.protobuf.AbstractParser<MessageEntry>() {
      public MessageEntry parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new MessageEntry(input, extensionRegistry);
      }
    };

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

    private int bitField0_;
    // required string key = 1;
    public static final int KEY_FIELD_NUMBER = 1;
    private java.lang.Object key_;
    /**
     * required string key = 1;
     */
    public boolean hasKey() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * required string key = 1;
     */
    public java.lang.String getKey() {
      java.lang.Object ref = key_;
      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();
        if (bs.isValidUtf8()) {
          key_ = s;
        }
        return s;
      }
    }
    /**
     * required string key = 1;
     */
    public com.google.protobuf.ByteString
        getKeyBytes() {
      java.lang.Object ref = key_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        key_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    // repeated string value = 2;
    public static final int VALUE_FIELD_NUMBER = 2;
    private com.google.protobuf.LazyStringList value_;
    /**
     * repeated string value = 2;
     */
    public java.util.List<java.lang.String>
        getValueList() {
      return value_;
    }
    /**
     * repeated string value = 2;
     */
    public int getValueCount() {
      return value_.size();
    }
    /**
     * repeated string value = 2;
     */
    public java.lang.String getValue(int index) {
      return value_.get(index);
    }
    /**
     * repeated string value = 2;
     */
    public com.google.protobuf.ByteString
        getValueBytes(int index) {
      return value_.getByteString(index);
    }

    private void initFields() {
      key_ = "";
      value_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      if (!hasKey()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBytes(1, getKeyBytes());
      }
      for (int i = 0; i < value_.size(); i++) {
        output.writeBytes(2, value_.getByteString(i));
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(1, getKeyBytes());
      }
      {
        int dataSize = 0;
        for (int i = 0; i < value_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeBytesSizeNoTag(value_.getByteString(i));
        }
        size += dataSize;
        size += 1 * getValueList().size();
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntry parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntry parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntry parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntry parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntry parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntry parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntry parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntry parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntry parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static com.codebrig.beam.messages.ProtobufMessage.MessageEntry parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(com.codebrig.beam.messages.ProtobufMessage.MessageEntry prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code messages.MessageEntry}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements com.codebrig.beam.messages.ProtobufMessage.MessageEntryOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.codebrig.beam.messages.ProtobufMessage.internal_static_messages_MessageEntry_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.codebrig.beam.messages.ProtobufMessage.internal_static_messages_MessageEntry_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.codebrig.beam.messages.ProtobufMessage.MessageEntry.class, com.codebrig.beam.messages.ProtobufMessage.MessageEntry.Builder.class);
      }

      // Construct using com.codebrig.beam.messages.ProtobufMessage.MessageEntry.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        key_ = "";
        bitField0_ = (bitField0_ & ~0x00000001);
        value_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.codebrig.beam.messages.ProtobufMessage.internal_static_messages_MessageEntry_descriptor;
      }

      public com.codebrig.beam.messages.ProtobufMessage.MessageEntry getDefaultInstanceForType() {
        return com.codebrig.beam.messages.ProtobufMessage.MessageEntry.getDefaultInstance();
      }

      public com.codebrig.beam.messages.ProtobufMessage.MessageEntry build() {
        com.codebrig.beam.messages.ProtobufMessage.MessageEntry result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public com.codebrig.beam.messages.ProtobufMessage.MessageEntry buildPartial() {
        com.codebrig.beam.messages.ProtobufMessage.MessageEntry result = new com.codebrig.beam.messages.ProtobufMessage.MessageEntry(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.key_ = key_;
        if (((bitField0_ & 0x00000002) == 0x00000002)) {
          value_ = new com.google.protobuf.UnmodifiableLazyStringList(
              value_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.value_ = value_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.codebrig.beam.messages.ProtobufMessage.MessageEntry) {
          return mergeFrom((com.codebrig.beam.messages.ProtobufMessage.MessageEntry)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.codebrig.beam.messages.ProtobufMessage.MessageEntry other) {
        if (other == com.codebrig.beam.messages.ProtobufMessage.MessageEntry.getDefaultInstance()) return this;
        if (other.hasKey()) {
          bitField0_ |= 0x00000001;
          key_ = other.key_;
          onChanged();
        }
        if (!other.value_.isEmpty()) {
          if (value_.isEmpty()) {
            value_ = other.value_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureValueIsMutable();
            value_.addAll(other.value_);
          }
          onChanged();
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasKey()) {

          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.codebrig.beam.messages.ProtobufMessage.MessageEntry parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.codebrig.beam.messages.ProtobufMessage.MessageEntry) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      // required string key = 1;
      private java.lang.Object key_ = "";
      /**
       * required string key = 1;
       */
      public boolean hasKey() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * required string key = 1;
       */
      public java.lang.String getKey() {
        java.lang.Object ref = key_;
        if (!(ref instanceof java.lang.String)) {
          java.lang.String s = ((com.google.protobuf.ByteString) ref)
              .toStringUtf8();
          key_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * required string key = 1;
       */
      public com.google.protobuf.ByteString
          getKeyBytes() {
        java.lang.Object ref = key_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          key_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * required string key = 1;
       */
      public Builder setKey(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        key_ = value;
        onChanged();
        return this;
      }
      /**
       * required string key = 1;
       */
      public Builder clearKey() {
        bitField0_ = (bitField0_ & ~0x00000001);
        key_ = getDefaultInstance().getKey();
        onChanged();
        return this;
      }
      /**
       * required string key = 1;
       */
      public Builder setKeyBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        key_ = value;
        onChanged();
        return this;
      }

      // repeated string value = 2;
      private com.google.protobuf.LazyStringList value_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      private void ensureValueIsMutable() {
        if (!((bitField0_ & 0x00000002) == 0x00000002)) {
          value_ = new com.google.protobuf.LazyStringArrayList(value_);
          bitField0_ |= 0x00000002;
         }
      }
      /**
       * repeated string value = 2;
       */
      public java.util.List<java.lang.String>
          getValueList() {
        return java.util.Collections.unmodifiableList(value_);
      }
      /**
       * repeated string value = 2;
       */
      public int getValueCount() {
        return value_.size();
      }
      /**
       * repeated string value = 2;
       */
      public java.lang.String getValue(int index) {
        return value_.get(index);
      }
      /**
       * repeated string value = 2;
       */
      public com.google.protobuf.ByteString
          getValueBytes(int index) {
        return value_.getByteString(index);
      }
      /**
       * repeated string value = 2;
       */
      public Builder setValue(
          int index, java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureValueIsMutable();
        value_.set(index, value);
        onChanged();
        return this;
      }
      /**
       * repeated string value = 2;
       */
      public Builder addValue(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureValueIsMutable();
        value_.add(value);
        onChanged();
        return this;
      }
      /**
       * repeated string value = 2;
       */
      public Builder addAllValue(
          java.lang.Iterable<java.lang.String> values) {
        ensureValueIsMutable();
        super.addAll(values, value_);
        onChanged();
        return this;
      }
      /**
       * repeated string value = 2;
       */
      public Builder clearValue() {
        value_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
        return this;
      }
      /**
       * repeated string value = 2;
       */
      public Builder addValueBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureValueIsMutable();
        value_.add(value);
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:messages.MessageEntry)
    }

    static {
      defaultInstance = new MessageEntry(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:messages.MessageEntry)
  }

  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_messages_MessageEntrySet_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_messages_MessageEntrySet_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_messages_MessageEntry_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_messages_MessageEntry_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\025ProtobufMessage.proto\022\010messages\":\n\017Mes" +
      "sageEntrySet\022\'\n\007entries\030\001 \003(\0132\026.messages" +
      ".MessageEntry\"*\n\014MessageEntry\022\013\n\003key\030\001 \002" +
      "(\t\022\r\n\005value\030\002 \003(\tB-\n\032com.codebrig.beam.m" +
      "essagesB\017ProtobufMessage"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
        public com.google.protobuf.ExtensionRegistry assignDescriptors(
            com.google.protobuf.Descriptors.FileDescriptor root) {
          descriptor = root;
          internal_static_messages_MessageEntrySet_descriptor =
            getDescriptor().getMessageTypes().get(0);
          internal_static_messages_MessageEntrySet_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_messages_MessageEntrySet_descriptor,
              new java.lang.String[] { "Entries", });
          internal_static_messages_MessageEntry_descriptor =
            getDescriptor().getMessageTypes().get(1);
          internal_static_messages_MessageEntry_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_messages_MessageEntry_descriptor,
              new java.lang.String[] { "Key", "Value", });
          return null;
        }
      };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        }, assigner);
  }

  // @@protoc_insertion_point(outer_class_scope)
}


text:
package fm.last.hadoop.examples;

import org.apache.hadoop.util.ProgramDriver;
import org.apache.log4j.Logger;

public class Launcher {

  private static Logger log = Logger.getLogger(Launcher.class);

  public static void main(String argv[]) {
    try {
      ProgramDriver pgd = new ProgramDriver();
      pgd.addClass("batchimport", BatchImport.class, "Import already preprocessed data into Cassandra");
      pgd.driver(argv);
    } catch (Throwable e) {
      log.error("Could not start program", e);
    }
  }
}

redpajama_set_name: RedPajamaGithub


text:
/**
 * Reflection utils.
 */
package org.apache.ibatis.reflection;


text:
Create new schedule?

(any current schedule for the current year will be erased)

                <select id="select-template">
                <?php foreach($templates as $t): ?>
                    <option value="<?=$t->id?>"><?=$t->name.' '.$t->teams.' teams, '.$t->divisions.' divisions'?></option>
                <?php endforeach;?>
                </select>

League Teams

                <button class="button is-small is-link" type="submit" id="create-schedule-button">Create</button>


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.picscout.netdepend</groupId>
  <artifactId>netdepend_graph</artifactId>
  <version>0.0.1</version>
  <name>netdepend_graph</name>
  <packaging>hpi</packaging>
  <description>create edges in graph, using extension point in Dependency Graph View Plugin. build using hpi:hpi and put in Jenkins plugins library, upload from advanced-> hpi</description>

  <parent>
   <groupId>org.jenkins-ci.plugins</groupId>
    <artifactId>plugin</artifactId>
    <version>1.501</version>
  </parent>
  <dependencies>
 <dependency>
  <groupId>org.jenkins-ci.plugins</groupId>
  <artifactId>depgraph-view</artifactId>
  <version>0.11</version>
</dependency>
<dependency>
	<groupId>org.eclipse.hudson.main</groupId>
	<artifactId>hudson-core</artifactId>
	<version>3.0.0-M2</version>
</dependency>
<dependency>
  <groupId>org.jenkins-ci.main</groupId>
  <artifactId>jenkins-core</artifactId>
  <version>1.609.1</version>
</dependency>
<dependency>
<groupId>com.picscout.depend</groupId>
	<artifactId>dependency</artifactId>
	<version>0.0.1</version>
</dependency>
<dependency>
  <groupId>org.jenkins-ci.main</groupId>
  <artifactId>jenkins-war</artifactId>
  <type>war</type>
  <version>1.396<!-- replace this with the version you want--></version>
  <scope>test</scope>
</dependency>
  </dependencies>

  <build>
   <plugins>
      <plugin>
          <groupId>org.jenkins-ci.tools</groupId>
          <artifactId>maven-hpi-plugin</artifactId>
          <version>1.90</version>
          <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>

  <repositories>
 <repository>
    <id>jenkins-releases</id>
    <url>http://repo.jenkins-ci.org/releases/</url>
  </repository>
  </repositories>

   <pluginRepositories>
        <pluginRepository>
            <id>repo.jenkins-ci.org</id>
            <url>http://repo.jenkins-ci.org/public/</url>
        </pluginRepository>
    </pluginRepositories>

</project>


text:
class Review < ActiveRecord::Base
  belongs_to :walker, class_name: "User"
  belongs_to :owner, class_name: "User"
  validates_presence_of :content, :rating

end


text:
<?php
include_once 'includes/constant/config.inc.php';

//Pre-assign our variables to avoid undefined indexes
$username = NULL;
$pass2 = NULL;
$msg = NULL;
$err = array();

//See if form was submitted, if so, execute...
if(isset($_POST['login']))
{

	//Assigning vars and sanitizing user input
	$username = filter($_POST['user']);
	$pass2 = filter($_POST['pass']);

	if(empty($username) || strlen($username) < 1)
	{
		$err[] = "You must enter a username";
	}
	if(empty($pass2) || strlen($pass2) < 1)
	{
		$err[] = "You seem to have forgotten your password.";
	}
	//Select only ONE password from the db table if the username = username, or the user input email (after being encrypted) matches an encrypted email in the db
	$q = mysql_query("SELECT Password, Id FROM ".USERS." WHERE UserName = '$username' OR Email = AES_ENCRYPT('$username', '$salt')") or die(mysql_error());

	//Select only the password if a user matched

	list($pass, $userid ) = mysql_fetch_row($q);
    echo "UserId". $userid;

	//now the variable $pass holds the value in column usr_pwd, $userid holds the value for id, and $approved holds the value for approved

	//if($approved == 0)
	//{
//		$err[] = "You must activate your account, and may do so here";
//	}

	if(empty($err))
	{
		//If someone was found, check to see if passwords match
		if(mysql_num_rows($q) > 0)
		{
			if(hash_pass($pass2) === $pass)
			{

                $user_info = mysql_query("SELECT Id, FirstName, UserName FROM ".USERS.
                    " WHERE Id = $userid LIMIT 1") or die("Unable to get user info" . mysql_error($link));
                $user_role = mysql_query("select UserType from UserRole where UserId = $userid limit 1")
                    or die("Unable to get user role" . mysql_error($link));

                list($role) = mysql_fetch_row($user_role);
				list($id, $name, $username) = mysql_fetch_row($user_info);

				session_start();
				//REALLY start new session (wipes all prior data)
	   			session_regenerate_id(true);

				//update the timestamp and key for session verification
				$stamp = time();
				$ckey = generate_key();
				//mysql_query("UPDATE ".USERS." SET ctime = '$stamp', ckey = '$ckey', num_logins = num_logins+1, last_login = now() WHERE id='$id'") or die(mysql_error());

				//Assign session variables to information specific to user
				$_SESSION['UserId'] = $id;
				$_SESSION['FirstName'] = $name;
				$_SESSION['UserName'] = $username;
				$_SESSION['stamp'] = $stamp;
				$_SESSION['key'] = $ckey;
				$_SESSION['logged'] = true;

				//And some added encryption for session security
				$_SESSION['HTTP_USER_AGENT'] = md5($_SERVER['HTTP_USER_AGENT']);

				//Build a message for display where we want it
				$msg = "Logged in successfully!";

				//redirect to a new location
                if($role === "Client")
                {
                    header("Location: " . SITE_BASE . "/users/clients.php");
                }
                else if($role ==="Volunteer")
                {
                    header("Location: " . SITE_BASE."/users/volunteers.php");
                }
                else
                {
                    header("Location: ".SITE_BASE."/users/profile.php");
                }

			} //end passwords matched
			else
			{
				//Passwords don't match, issue an error
				$err[] = "Invalid Password";
			}
		} //end if user found
		else
		{
			//No rows found in DB matching username or email, issue error
			$err[] = "You have to register on this site first. (Use the link in the upper-right.)";
		}
	} //end if no error
}  //end form posted

return_meta("Log in to your account");
?>

	<?php include 'includes/constant/nav.inc.php'; ?>

		<?php
	//Show message if isset
	if(isset($msg) || !empty($_GET['msg']))
	{
		if(!empty($_GET['msg']))
		{
			$msg = $_GET['msg'];
		}
		echo '
'.$msg.'
';
	}
	//Show error message if isset
	if(!empty($err))
	{
		echo '
';
		foreach($err as $e)
		{
		echo $e.'
';
		}
		echo '
';
	}

	?>

Login

		<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" id="login_form">

		Username/Email
		<input type="text" name="user" value="" class="required" />

		Password
		<input type="password" name="pass" value="" class="required" />

		<input type="submit" name="login" value="Login" />

		</form>

Be sure to always keep your personal information updated so the best use can be made of volunteer resources!

    <?php include 'includes/constant/footer.inc.php'; ?>


text:
from thefuck.rules.fix_alt_space import match, get_new_command
from tests.utils import Command

def test_match():
    """The character before 'grep' is Alt+Space, which happens frequently
    on the Mac when typing the pipe character (Alt+7), and holding the Alt
    key pressed for longer than necessary.

    """
    assert match(Command(u'ps -ef | grep foo',
                         stderr=u'-bash:  grep: command not found'))
    assert not match(Command('ps -ef | grep foo'))
    assert not match(Command())

def test_get_new_command():
    """ Replace the Alt+Space character by a simple space """
    assert get_new_command(Command(u'ps -ef | grep foo'))\
           == 'ps -ef | grep foo'


text:
<?php

namespace Page\Controller;

use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase;

/**
 * Description of IndexControllerTest
 *
 * @author seyfer
 */
class IndexControllerTest extends AbstractHttpControllerTestCase {

    protected $traceError = true;

    public function setUp()
    {
        $this->setApplicationConfig(
                require 'config/application.config.php'
        );

        parent::setUp();
    }

    public function testIndexActionCanBeAccessed()
    {
        $this->dispatch('/page');
        $this->assertResponseStatusCode(200);

        $this->assertModuleName('Page');
        $this->assertControllerName('Page\Controller\Index');
        $this->assertControllerClass('IndexController');
        $this->assertMatchedRouteName('page');
    }

}


text:
using System;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace Avalara.AvaTax.RestClient
{
    /// <summary>
    /// Represents a transaction parameter.
    /// </summary>
    public class TransactionParameterModel
    {
        /// <summary>
        /// The name of the parameter.
        /// </summary>
        public String name { get; set; }

        /// <summary>
        /// The value of the parameter.
        /// </summary>
        public String value { get; set; }

        /// <summary>
        /// The unit of measure of the parameter value.
        /// </summary>
        public String unit { get; set; }

        /// <summary>
        /// Convert this object to a JSON string of itself
        /// </summary>
        /// <returns>A JSON string of this object</returns>
        public override string ToString()
        {
            return JsonConvert.SerializeObject(this, new JsonSerializerSettings() { Formatting = Formatting.Indented });
        }
    }
}


text:
package distribution.services.jcloud;

import java.util.List;
import java.util.Set;

import distribution.VMManagerCallback;
import distribution.services.model.RunningVM;;

public interface VMManager {

	/**
	 * Returns the number of vms running for a type
	 *
	 * @param cluster the cluster
	 * @param type the specified type
	 *
	 * @return the number of vms
	 */
	int countRunningVms(String cluster, String type);

	/**
	 * Adds a new vm in a cluster for a type
	 *
	 * @param vmBuilder the vm builder
	 *
	 * @return true if ok and false if not ok
	 */
	boolean add(VmBuilder vmBuilder, VMManagerCallback vmManagerCallback) throws Exception, Throwable;

	/**
	 * Removes a vm in a cluster of a type
	 *
	 * @param String the vm builder
	 *
	 * @return true if removed and false if not
	 */
	boolean remove(String id) throws Exception, Throwable;

	/**
	 * Returns the running vm types in a cluster
	 *
	 * @param cluster the cluster
	 *
	 * @return the types
	 */
	Set<String> getRunningTypes(String cluster);

	/**
	 * Returns the running vms for a type in a cluster
	 *
	 * @param cluster the cluster
	 * @param type the type
	 *
	 * @return the running vms
	 */
	List<RunningVM> getRunningVms(String cluster, String type);

	/**
	 * Returns the running vms for a type in a cluster
	 *
	 * @param cluster the cluster
	 *
	 * @return the running vms
	 */
	List<RunningVM> getRunningVms(String cluster)  throws Exception, Throwable;
}


text:
package com.sun.jmx.snmp;
/**
 * Represents a get-bulk PDU as defined in RFC 1448.
 *

 *

 * The SnmpSocpedPduBulk extends {@link com.sun.jmx.snmp.SnmpScopedPduPacket SnmpScopedPduPacket}
 * and defines attributes specific to the get-bulk PDU (see RFC 1448).
 *
 *
This API is a Sun Microsystems internal API  and is subject
 * to change without notice.

 * @since 1.5
 */

public class SnmpScopedPduBulk extends SnmpScopedPduPacket
    implements SnmpPduBulkType {
    private static final long serialVersionUID = -1648623646227038885L;

    /**
     * The non-repeaters value.
     * @serial
     */
    int            nonRepeaters;

    /**
     * The max-repetitions value.
     * @serial
     */
    int            maxRepetitions;

    public SnmpScopedPduBulk() {
        type = pduGetBulkRequestPdu;
        version = snmpVersionThree;
    }

    /**
     * The max-repetitions setter.
     * @param max Maximum repetition.
     */
    public void setMaxRepetitions(int max) {
        maxRepetitions = max;
    }

    /**
     * The non-repeaters setter.
     * @param nr Non repeaters.
     */
    public void setNonRepeaters(int nr) {
        nonRepeaters = nr;
    }

    /**
     * The max-repetitions getter.
     * @return Maximum repetition.
     */
    public int getMaxRepetitions() { return maxRepetitions; }

    /**
     * The non-repeaters getter.
     * @return Non repeaters.
     */
    public int getNonRepeaters() { return nonRepeaters; }

    /**
     * Generates the pdu to use for response.
     * @return Response pdu.
     */
    public SnmpPdu getResponsePdu() {
        SnmpScopedPduRequest result = new SnmpScopedPduRequest();
        result.address = address ;
        result.port = port ;
        result.version = version ;
        result.requestId = requestId;
        result.msgId = msgId;
        result.msgMaxSize = msgMaxSize;
        result.msgFlags = msgFlags;
        result.msgSecurityModel = msgSecurityModel;
        result.contextEngineId = contextEngineId;
        result.contextName = contextName;
        result.securityParameters = securityParameters;
        result.type = pduGetResponsePdu ;
        result.errorStatus = SnmpDefinitions.snmpRspNoError ;
        result.errorIndex = 0 ;
        return result;
    }
}


text:
import ModuleConstructor from './moduleConstructor';

interface ModuleDescriptor {
    factory: ModuleConstructor;
    moduleName: string;
    permissions?: Array<string>;
}

export default ModuleDescriptor;


text:
ACCEPTED

#### According to
IRMNG Homonym List

#### Published in
Proc. Roy. Soc. Victoria, 42, 111.

#### Original name
null

### Remarks
null


text:
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE23_Relative_Path_Traversal__wchar_t_environment_ofstream_66b.cpp
Label Definition File: CWE23_Relative_Path_Traversal.label.xml
Template File: sources-sink-66b.tmpl.cpp
*/
/*
 * @description
 * CWE: 23 Relative Path Traversal
 * BadSource: environment Read input from an environment variable
 * GoodSource: Use a fixed file name
 * Sinks: ofstream
 *    BadSink : Open the file named in data using ofstream::open()
 * Flow Variant: 66 Data flow: data passed in an array from one function to another in different source files
 *
 * */

#include "std_testcase.h"

#ifdef _WIN32
#define BASEPATH L"c:\\temp\\"
#else
#include <wchar.h>
#define BASEPATH L"/tmp/"
#endif

#define ENV_VARIABLE L"ADD"

#ifdef _WIN32
#define GETENV _wgetenv
#else
#define GETENV getenv
#endif

#include <fstream>
using namespace std;

namespace CWE23_Relative_Path_Traversal__wchar_t_environment_ofstream_66
{

#ifndef OMITBAD

void badSink(wchar_t * dataArray[])
{
    /* copy data out of dataArray */
    wchar_t * data = dataArray[2];
    {
        ofstream outputFile;
        /* POTENTIAL FLAW: Possibly opening a file without validating the file name or path */
        outputFile.open((char *)data);
        outputFile.close();
    }
}

#endif /* OMITBAD */

#ifndef OMITGOOD

/* goodG2B uses the GoodSource with the BadSink */
void goodG2BSink(wchar_t * dataArray[])
{
    wchar_t * data = dataArray[2];
    {
        ofstream outputFile;
        /* POTENTIAL FLAW: Possibly opening a file without validating the file name or path */
        outputFile.open((char *)data);
        outputFile.close();
    }
}

#endif /* OMITGOOD */

} /* close namespace */


text:
/**
 * Created by hope.kim on 6/25/18.
 */
import roversData from "./data/rovers.json";

const preloadedState = {
  rovers: roversData
}

export default preloadedState;


text:
package uk.co.techblue.docusign.client.dto.user;

import org.codehaus.jackson.annotate.JsonProperty;

import uk.co.techblue.docusign.client.dto.BaseDto;

/**
 * The Class LoginAccount.
 */
public class LoginAccount extends BaseDto {

    /**
	 *
	 */
	private static final long serialVersionUID = -3342182577694376526L;

	/** The account id. */
    @JsonProperty("accountId")
    private String accountId;

    /** The base url. */
    @JsonProperty("baseUrl")
    private String baseUrl;

    /** The email. */
    @JsonProperty("email")
    private String email;

    /** The is default. */
    @JsonProperty("isDefault")
    private boolean isDefault;

    /** The name. */
    @JsonProperty("name")
    private String name;

    /** The site description. */
    @JsonProperty("siteDescription")
    private String siteDescription;

    /** The user id. */
    @JsonProperty("userId")
    private String userId;

    /** The user name. */
    @JsonProperty("userName")
    private String userName;

    /**
     * Gets the account id.
     *
     * @return the account id
     */
    public String getAccountId() {
        return accountId;
    }

    /**
     * Sets the account id.
     *
     * @param accountId
     *            the new account id
     */
    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    /**
     * Gets the base url.
     *
     * @return the base url
     */
    public String getBaseUrl() {
        return baseUrl;
    }

    /**
     * Sets the base url.
     *
     * @param baseUrl
     *            the new base url
     */
    public void setBaseUrl(String baseUrl) {
        this.baseUrl = baseUrl;
    }

    /**
     * Gets the email.
     *
     * @return the email
     */
    public String getEmail() {
        return email;
    }

    /**
     * Sets the email.
     *
     * @param email
     *            the new email
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * Checks if is default.
     *
     * @return true, if is default
     */
    public boolean isDefault() {
        return isDefault;
    }

    /**
     * Sets the default.
     *
     * @param isDefault
     *            the new default
     */
    public void setDefault(boolean isDefault) {
        this.isDefault = isDefault;
    }

    /**
     * Gets the name.
     *
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the name.
     *
     * @param name
     *            the new name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Gets the site description.
     *
     * @return the site description
     */
    public String getSiteDescription() {
        return siteDescription;
    }

    /**
     * Sets the site description.
     *
     * @param siteDescription
     *            the new site description
     */
    public void setSiteDescription(String siteDescription) {
        this.siteDescription = siteDescription;
    }

    /**
     * Gets the user id.
     *
     * @return the user id
     */
    public String getUserId() {
        return userId;
    }

    /**
     * Sets the user id.
     *
     * @param userId
     *            the new user id
     */
    public void setUserId(String userId) {
        this.userId = userId;
    }

    /**
     * Gets the user name.
     *
     * @return the user name
     */
    public String getUserName() {
        return userName;
    }

    /**
     * Sets the user name.
     *
     * @param userName
     *            the new user name
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }
}


text:
module Bosh
  module Tools
    class Command < WIP::Runner::Command
      include WIP::Runner::Renderer

      def tasks
        @tasks ||= []
      end

      def task(&block)
        tasks << WIP::Runner::Shell::Task.new(self, &block)
      end
    end
  end
end


text:
using NMSView;
using SiliconStudio.Core.Mathematics;
using SiliconStudio.Xenko.Engine;
using SiliconStudio.Xenko.Graphics;
using SiliconStudio.Xenko.Rendering;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Concurrent;

namespace NMSView
{
    public class NMSViewGame : Game
    {
        public static string ReqFname = null;

        public FreeCamera CamController;

        public delegate void ModelLoadedEventHandler(NMSModel Model, NMSEntity Entity, string Name);
        public event ModelLoadedEventHandler OnModelLoaded;

        protected override Task LoadContent()
        {
            EntityAddQueue = new ConcurrentQueue<Entity>();
            EntityRemoveQueue = new ConcurrentQueue<Entity>();

            // Make camera
            CamController = new FreeCamera();
            Script.Add(CamController);

            if (ReqFname != null)
            {
                // Load the model...
                var modelFname = ReqFname;
                LoadModel(modelFname);
            }

            Script.AddTask(UpdateFrame);

            return base.LoadContent();
        }

        public bool LoadModel(string FileName)
        {
            if (!File.Exists(FileName))
                return false;

            Console.WriteLine("Loading {0}...", Path.GetFileNameWithoutExtension(FileName));

            var model = NMSModel.Read(FileName);
            model.PrintStats();

            var Desc = RasterizerStateDescription.Default;
            Desc.CullMode = CullMode.None;

            var entity = CreateCustomMeshModel(
                GraphicsDevice,
                model.ToXenkoVertices(),
                model.Indices.ToArray(),
                PrimitiveType.TriangleList,
                Desc,
                Asset.Load<Material>("Sphere Material"),
                Vector3.Zero,
                Quaternion.Identity,
                false);

            EntityAddQueue.Enqueue(entity);

            Console.WriteLine("OK");

            if (OnModelLoaded != null)
            {
                OnModelLoaded(model, entity, FileName);
            }

            return true;
        }

        public void ClearNMSEntities()
        {
            var entities = SceneSystem.SceneInstance.Scene.Entities.Where(x => x is NMSEntity);

            foreach (var entity in entities)
                EntityRemoveQueue.Enqueue(entity);
        }

        public NMSEntity CreateCustomMeshModel(GraphicsDevice graphicsDevice, VertexPositionNormalTexture[] Vertexes, int[] Indices, PrimitiveType PrimType, RasterizerStateDescription RasterizerDesc, Material Mat, Vector3 SpawnPos, Quaternion SpawnRot, bool SpawnNow = true)
        {
            var meshMesh = new Mesh();
            var meshDraw = new MeshDraw();
            var meshMod = new Model();
            var meshComp = new ModelComponent();

            var buffIdx = SiliconStudio.Xenko.Graphics.Buffer.Index.New(graphicsDevice, Indices);
            var buffVert = SiliconStudio.Xenko.Graphics.Buffer.Vertex.New(graphicsDevice, Vertexes);

            var RasterizerStateDesc = RasterizerDesc;

            meshDraw.IndexBuffer = new IndexBufferBinding(buffIdx, true, Indices.Length);
            meshDraw.VertexBuffers = new VertexBufferBinding[] { new VertexBufferBinding(buffVert, VertexPositionNormalTexture.Layout, Vertexes.Length) };
            meshDraw.PrimitiveType = PrimType;
            meshDraw.DrawCount = Indices.Length;

            meshMesh.Draw = meshDraw;
            meshMesh.Parameters.Set(Effect.RasterizerStateKey, RasterizerState.New(graphicsDevice, RasterizerStateDesc));
            meshMesh.MaterialIndex = 0;

            var mat = Mat;

            Vector3 min = new Vector3(float.MaxValue), max = new Vector3(float.MinValue);
            foreach (var vert in Vertexes)
            {
                if (vert.Position.X < min.X)
                    min.X = vert.Position.X;
                if (vert.Position.Y < min.Y)
                    min.Y = vert.Position.Y;
                if (vert.Position.Z < min.Z)
                    min.Z = vert.Position.Z;

                if (vert.Position.X > max.X)
                    max.X = vert.Position.X;
                if (vert.Position.Y > max.Y)
                    max.Y = vert.Position.Y;
                if (vert.Position.Z > max.Z)
                    max.Z = vert.Position.Z;
            }
            meshMod.BoundingBox = new BoundingBox(min, max);

            meshMod.Materials.Add(mat);

            meshMod.Meshes.Add(meshMesh);
            meshComp.Model = meshMod;

            var outEntity = new NMSEntity();
            outEntity.Transform.Position = SpawnPos;
            outEntity.Transform.Rotation = SpawnRot;
            outEntity.Add(meshComp);
            outEntity.Group = EntityGroup.Group29;

            outEntity.Transform.UpdateLocalMatrix();
            meshMesh.Parameters.Set(TransformationKeys.World, outEntity.Transform.LocalMatrix);

            if (SpawnNow)
            {
                SceneSystem.SceneInstance.Scene.Entities.Add(outEntity);
            }

            return outEntity;
        }

        private async Task UpdateFrame()
        {
            while (IsRunning)
            {
                await Script.NextFrame();
                ProcessQueues();
            }
        }

        public ConcurrentQueue<Entity> EntityAddQueue;
        public ConcurrentQueue<Entity> EntityRemoveQueue;
        private void ProcessQueues()
        {
            while (!EntityRemoveQueue.IsEmpty)
            {
                Entity ent;
                if (EntityRemoveQueue.TryDequeue(out ent))
                {
                    SceneSystem.SceneInstance.Scene.Entities.Remove(ent);
                }
                else
                    break;
            }

            while (!EntityAddQueue.IsEmpty)
            {
                Entity ent;
                if (EntityAddQueue.TryDequeue(out ent))
                {
                    if (ent.IsDisposed)
                        continue;

                    SceneSystem.SceneInstance.Scene.Entities.Add(ent);
                }
                else
                    break;
            }
        }
    }
}


text:
module Metro

  #
  # @example Finding a scene based on the scene name
  #
  #     class IntroScene < Metro::Scene
  #       # ... scene content ...
  #     end
  #
  #     Scenes.find("intro")    # => IntroScene
  #     Scenes.find(:intro)     # => IntroScene
  #
  # @example Creating a scene instance based on the scene name
  #
  #     class IntroScene < Metro::Scene
  #       # ... scene content ...
  #     end
  #
  #     Scenes.generate("intro")    # => [SCENE: title]
  #     Scenes.generate(:intro)     # => [SCENE: title]
  #
  # @example Finding a scene that does not exist
  #
  #     scene = Scenes.find(:unknown)
  #     scene.missing_scene            # => :unknown
  #
  module Scenes
    extend self

    #
    # Add a scene to the hash of scenes with the scene name of the scene as the key
    # to retrieving this scene.
    #
    # @param [Scene] scene the scene to be added to the hash of Scenes.
    #
    def add(scene)
      all_scenes_for(scene).each { |scene| scenes_hash[scene.scene_name] = scene.to_s }
    end

    #
    # Finds the scene based on the specified scene name.
    #
    # @param [String,Symbol] scene_name the name of the scene to locate.
    # @return the Scene class that is found matching the specified scene name.
    #
    def find(scene_name)
      scenes_hash[scene_name].constantize
    end

    #
    # @return [Array<String>] all the names supported by the scenes hash.
    #
    def list
      scenes_hash.keys
    end

    #
    # Finds the scene with the specified name and then creates an instance of that
    # scene.
    #
    # @param [String,Symbol,Object] scene_name the name of the scene to locate.
    # @return an instance of Scene that is found matching the specified scene name
    #
    def generate(scene_or_scene_name,options = {})
      new_scene = generate_scene_from(scene_or_scene_name)
      apply_post_filters(new_scene,options)
    end

    #
    # If we have been given a scene, then we simply want to use it otherwise
    # we need to find and generate our scene from the scene name.
    #
    # @param [String,Sybmol,Class] scene_or_scene_name the name of the scene or an instance
    #   of Scene.
    #
    def generate_scene_from(scene_or_scene_name)
      if scene_or_scene_name.is_a? Scene
        scene_or_scene_name
      else
        find(scene_or_scene_name).new
      end
    end

    #
    # Post filters are applied to the scene after it has been found. These are
    # all objects that can respond to the #filter method.
    #
    def post_filters
      @post_filters ||= []
    end

    #
    # Register a filter that will be executed after a scene is found and generated. This
    # allows for the scene to be modified or changed based on the provided options.
    #
    # A filter is any object that responds to #filter and accepts two parameters: the
    # scene and a hash of options.
    #
    # @param [#filter] post_filter a filter is an object that can act as a filter.
    #
    def register_post_filter(post_filter)
      post_filters.push(post_filter)
    end

    private

    #
    # Apply all the post filtering to the specified scene with the given options
    #
    # @return a Scene object that has been filtered.
    #
    def apply_post_filters(new_scene,options)
      post_filters.inject(new_scene) {|scene,post| post.filter(scene,options) }
    end

    #
    # @return a Hash that allows for accessing  symbol names of the scenes
    #   as well as the class name constants to allow for the scenes to be found.
    #
    def scenes_hash
      @scenes_hash ||= hash_with_missing_scene_default
    end

    #
    # Create a hash that will return a setup missing scene by default.
    #
    def hash_with_missing_scene_default
      hash = HashWithIndifferentAccess.new do |hash,key|
        missing_scene = hash[:missing_scene].constantize
        missing_scene.missing_scene = key.to_sym
        missing_scene
      end
      hash[:missing_scene] = "Metro::MissingScene"
      hash
    end

    #
    # Returns all subclassed scenes of the scene or scenes provided. This method is
    # meant to be called recursively to generate the entire list of all the scenes.
    #
    # @param [Scene,Array<Scene>] scenes a scene or scene subclass or an array of
    #   scene subclasses.
    #
    def all_scenes_for(scenes)
      Array(scenes).map do |scene_class_name|
        scene = scene_class_name.constantize
        [ scene ] + all_scenes_for(scene.scenes)
      end.flatten.compact
    end

  end
end

require_relative 'transitions/scene_transitions'


text:
+ [Pure](https://github.com/yahoo/pure)
  [Official Site](http://purecss.io/)
  A set of small, responsive CSS modules that you can use in every web project.


text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    android:id="@+id/chat_layout"
    tools:context="dev.blunch.blunch.activity.ChatActivity">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/AppTheme.AppBarOverlay">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:popupTheme="@style/AppTheme.PopupOverlay" />

    </android.support.design.widget.AppBarLayout>

    <RelativeLayout
        android:id="@+id/frameLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <include layout="@layout/content_chat" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="bottom"
            android:background="#ECEFF1"
            android:id="@+id/bottom_bar"
            android:layout_alignParentBottom="true"
            android:paddingStart="5dp"
            android:paddingEnd="5dp"
            android:orientation="horizontal">

            <EditText
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/new_message"
                android:inputType="textCapSentences"
                android:layout_weight="1"
                android:hint="@string/write_something" />

            <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/send"
                android:id="@+id/send" />
        </LinearLayout>

    </RelativeLayout>

</android.support.design.widget.CoordinatorLayout>


text:
// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)

// See http://www.boost.org/libs/iostreams for documentation.

// Adapted from an example of James Kanze, with suggestions from Peter Dimov.
// See https://web.archive.org/web/20041222094942/http://www.gabi-soft.fr/codebase-en.html.

#ifndef BOOST_IOSTREAMS_FINITE_STATE_FILTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_FINITE_STATE_FILTER_HPP_INCLUDED

#include <cassert>
#include <cstdio>    // EOF.
#include <iostream>  // cin, cout.
#include <locale>
#include <string>
#include <boost/config.hpp>                 // JOIN, member template friends.
#include <boost/detail/workaround.hpp>
#include <boost/iostreams/categories.hpp>
#include <boost/iostreams/char_traits.hpp>
#include <boost/iostreams/checked_operations.hpp>   // put_if.
#include <boost/iostreams/concepts.hpp>
#include <boost/iostreams/detail/ios.hpp>           // openmode.
#include <boost/iostreams/filter/stdio.hpp>
#include <boost/iostreams/operations.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/deref.hpp>
#include <boost/preprocessor/control/expr_if.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>

namespace boost { namespace iostreams {

//------------------Definition of basic character classes---------------------//

struct finite_state_machine_base {

    static const int initial_state = 0;

        // All-inclusive character class.

    struct is_any {
        template<typename Ch>
        static bool test(Ch, const std::locale&) { return true; }
    };

        // Locale-sensitive character classes.

    #define BOOST_IOSTREAMS_CHARACTER_CLASS(class) \
        struct BOOST_JOIN(is_, class) { \
            template<typename Ch> \
            static bool test(Ch event, const std::locale& loc) \
            { return std::BOOST_JOIN(is, class)(event, loc); } \
        }; \
        /**/

    BOOST_IOSTREAMS_CHARACTER_CLASS(alnum)
    BOOST_IOSTREAMS_CHARACTER_CLASS(alpha)
    BOOST_IOSTREAMS_CHARACTER_CLASS(cntrl)
    BOOST_IOSTREAMS_CHARACTER_CLASS(digit)
    BOOST_IOSTREAMS_CHARACTER_CLASS(graph)
    BOOST_IOSTREAMS_CHARACTER_CLASS(lower)
    BOOST_IOSTREAMS_CHARACTER_CLASS(print)
    BOOST_IOSTREAMS_CHARACTER_CLASS(punct)
    BOOST_IOSTREAMS_CHARACTER_CLASS(space)
    BOOST_IOSTREAMS_CHARACTER_CLASS(upper)
    BOOST_IOSTREAMS_CHARACTER_CLASS(xdigit)

    #undef BOOST_IOSTREAMS_CHARACTER_CLASS
};

template<typename Ch>
struct finite_state_machine_base_ex : finite_state_machine_base {
    template<Ch C>
    struct is {
        static bool test(Ch event, const std::locale&)
        {
            return event == C;
        }
    };
};

//------------------Definition of base class for finite state filters---------//

namespace detail {

template<typename FiniteStateMachine>
class finite_state_filter_impl;

} // End namespace detail.

template<typename Derived, typename Ch = char>
class finite_state_machine : public finite_state_machine_base_ex<Ch> {
public:
    typedef Ch                                  char_type;
    typedef typename char_traits<Ch>::int_type  int_type;
    void imbue(const std::locale& loc) { loc_ = loc; }
    const std::locale& getloc() const { return loc_; }
protected:
    finite_state_machine() : off_(0) { }

    // Template whose instantiations make up transition table.

    template< int State,
              typename CharacterClass,
              int NextState,
              void (Derived::*Action)(char_type) >
    struct row {
        typedef CharacterClass  character_class;
        static const int        state = State;
        static const int        next_state = NextState;
        static void execute(Derived& d, char_type event)
        {
            (d.*Action)(event);
        }
    };

    // Stack interface.

    bool empty() const
    {
        return off_ == buf_.size();
    }
    void push(char c) { buf_ += c; }
    char_type pop()
    {
        char_type result = buf_[off_++];
        if (off_ == buf_.size())
            clear();
        return result;
    }
    char_type& top() { return buf_[off_]; }
    void clear()
    {
        buf_.clear();
        off_ = 0;
    }

    // Default event handlers.

    void on_eof() { }
    void skip(char_type) { }

#if BOOST_WORKAROUND(__MWERKS__, <= 0x3206)
    template<typename Ch>
    void _push_impl(Ch c) { push(c); }
#endif

#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
    template<typename FiniteStateFilter>
    friend class detail::finite_state_filter_impl;
#else
    public:
#endif
    void on_any(char_type) { }
private:
    typedef std::basic_string<char_type>     string_type;
    typedef typename string_type::size_type  size_type;
    std::locale  loc_;
    string_type  buf_;
    size_type    off_;
};

#if !BOOST_WORKAROUND(__MWERKS__, <= 0x3206)
# define BOOST_IOSTREAMS_FSM(fsm) \
    template<typename Ch> \
    void push(Ch c) \
    { ::boost::iostreams::finite_state_machine<fsm, Ch>::push(c); } \
    template<typename Ch> \
    void skip(Ch c) { (void) c; } \
    /**/
#else // #ifndef __MWERKS__
# define BOOST_IOSTREAMS_FSM(fsm) \
    void push(char c) { this->_push_impl(c); } \
    void push(wchar_t c) { this->_push_impl(c); } \
    void skip(char c) { (void) c; } \
    void skip(wchar_t c) { (void) c; } \
    /**/
#endif

//------------------Definition of finite_state_filter_impl--------------------//

namespace detail {

template<typename FiniteStateMachine>
class finite_state_filter_impl : protected FiniteStateMachine
{
private:
    template<typename First, typename Last>
    struct process_event_impl;
public:
    typedef typename char_type_of<FiniteStateMachine>::type char_type;

    finite_state_filter_impl() : state_(FiniteStateMachine::initial_state) { }

    template<typename T0>
    explicit finite_state_filter_impl(const T0& t0)
        : FiniteStateMachine(t0), state_(FiniteStateMachine::initial_state)
        { }

    template<typename T0, typename T1>
    finite_state_filter_impl(const T0& t0, const T1& t1)
        : FiniteStateMachine(t0, t1), state_(FiniteStateMachine::initial_state)
        { }

    template<typename T0, typename T1, typename T2>
    finite_state_filter_impl(const T0& t0, const T1& t1, const T2& t2)
        : FiniteStateMachine(t0, t1, t2),
          state_(FiniteStateMachine::initial_state)
        { }
protected:
    void process_event(char_type c)
    {
        typedef typename FiniteStateMachine::transition_table  transitions;
        typedef typename mpl::begin<transitions>::type         first;
        typedef typename mpl::end<transitions>::type           last;
        state_ = process_event_impl<first, last>::execute(*this, state_, c);
    }
    int& state() { return state_; }
    void reset()
    {
        state_ = FiniteStateMachine::initial_state;
        this->clear();
    }
private:
    template<typename First, typename Last>
    struct process_event_impl {
        static int execute(FiniteStateMachine& fsm, int state, char_type event)
        {
            typedef typename mpl::deref<First>::type  rule;
            typedef typename mpl::next<First>::type   next;
            typedef typename rule::character_class    character_class;

            if ( state == rule::state &&
                 character_class::test(event, fsm.getloc()) )
            {
                // Rule applies.
                rule::execute(fsm, event);
                return rule::next_state;
            }

            // Rule is inapplicable: try next rule.
            return process_event_impl<next, Last>::execute(fsm, state, event);
        }
    };

    template<typename Last>
    struct process_event_impl<Last, Last> {
        static int execute(FiniteStateMachine& fsm, int state, char_type c)
        {
            on_any(fsm, c);
            return state;
        }
    };
#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) /* Tru64 */ \
 || BOOST_WORKAROUND(__MWERKS__,   BOOST_TESTED_AT(0x3205))   /* CW9.4 */
    public:
#endif
    template<typename FSM>
    static void on_any(FSM& fsm, char_type c) { fsm.on_any(c); }
private:
    int state_;
};

} // End namespace detail.

//------------------Definition of finite_state_filter-------------------------//

template<typename FiniteStateMachine>
class finite_state_filter
    : public detail::finite_state_filter_impl<FiniteStateMachine>
{
private:
    typedef detail::finite_state_filter_impl<FiniteStateMachine>  base_type;
public:
    typedef typename base_type::char_type                         char_type;
    typedef char_traits<char_type>                                traits_type;
    typedef typename base_type::int_type                          int_type;
    struct category
        : dual_use, filter_tag, closable_tag, localizable_tag
        { };

    finite_state_filter() : flags_(0) { }

    template<typename T0>
    finite_state_filter(const T0& t0)
        : base_type(t0), flags_(0)
        { }

    template<typename T0, typename T1>
    finite_state_filter(const T0& t0, const T1& t1)
        : base_type(t0, t1), flags_(0)
        { }

    template<typename T0, typename T1, typename T2>
    finite_state_filter(const T0& t0, const T1& t1, const T2& t2)
        : base_type(t0, t1, t2), flags_(0)
        { }

    template<typename Source>
    int_type get(Source& src)
    {
        assert((flags_ & f_write) == 0);
        flags_ |= f_read;

        while (true) {
            if ((flags_ & f_eof) == 0) {

                // Read a character and process it.
                int_type c;
                if (traits_type::is_eof(c = iostreams::get(src))) {
                    flags_ |= f_eof;
                    this->on_eof();
                } else if (!traits_type::would_block(c)) {
                    this->process_event(c);
                }
            }

            // Return a character, if available.
            if (!this->empty())
                return this->pop();
            else if ((flags_ & f_eof) != 0)
                return traits_type::eof();
        }
    }

    template<typename Sink>
    bool put(Sink& dest, char_type c)
    {
        assert((flags_ & f_read) == 0);
        flags_ |= f_write;

        this->process_event(c);
        while (!this->empty() && iostreams::put(dest, this->top()))
            this->pop();

        return true;
    }

    template<typename Device>
    void close(Device& dev, BOOST_IOS::openmode which)
    {
        if (which == BOOST_IOS::out) {
            if (flags_ & f_write)
                while (!this->empty())
                    iostreams::put_if(dev, this->pop());
            this->reset();
            flags_ = 0;
        }
    }
private:
    enum flags {
        f_read    = 1,
        f_write   = f_read << 1,
        f_eof     = f_write << 1
    };

    int flags_;
};

} }       // End namespaces iostreams, boost.

#endif // #ifndef BOOST_IOSTREAMS_FINITE_STATE_FILTER_HPP_INCLUDED


text:
package moe.lymia.lycoris.protocol

import moe.lymia.lycoris.util.HeterogeneousMap

import scala.collection.mutable.ArrayBuffer

case class ShowdownMessageKey[T]()
case class ShowdownMessage(room: String, command: String, args: IndexedSeq[String],
                           extraArgs: HeterogeneousMap[ShowdownMessageKey, HeterogeneousMap.Identity] =
                              HeterogeneousMap.empty) {
  def apply(i: Int) = args(i)
  def get(i: Int) = if(i < args.length) Some(args(i)) else None
  def getOrElse(i: Int, default: => String) = if(i < args.length) args(i) else default
  def getOrEmpty(i: Int) = getOrElse(i, "")
  def remaining(i: Int) = args.drop(i).mkString("|")
  def length = args.length

  override def toString = command+(if(args.nonEmpty) "|"+args.mkString("|") else "")
  lazy val rawMessage = toString
}
object ShowdownMessage {
  def apply(args: IndexedSeq[String]) = new ShowdownMessage(RoomName.Generated, args.head, args.tail)
  def apply(roomName: String, args: IndexedSeq[String]) = new ShowdownMessage(roomName, args.head, args.tail)
}

trait ShowdownHandler {
  def receiveMessage(room: String, message: ShowdownMessage) { }
  def rawMessage(line: String) { }

  def shutdown() { }
}
class ShowdownProtocol(config: ServerConfig, initHandlers: ShowdownHandler *) extends SockJsHandler {
  val connection = new SockJsConnection(this, config.getSockJsURL)
  def send(room: String, s: String) = connection.send(s"$room|$s")

  private val handlers = ArrayBuffer[ShowdownHandler](initHandlers: _*)
  def addHandler(newHandlers: ShowdownHandler *): Unit =
    for(handler <- newHandlers) handlers.append(handler)

  override def receiveMessage(s: String): Unit = {
    handlers.foreach(_.rawMessage(s))

    var room = ""
    for(line <- s.split("\n") if line.nonEmpty) {
      line.head match {
        case '>' => room = toRoomId(line.tail)
        case '|' =>
          val split = line.tail.split("\\|")
          val message = ShowdownMessage(room, split.head, split.tail.toIndexedSeq)
          handlers.foreach(_.receiveMessage(room, message))
        case _ =>
          System.out.println(s"Unknown command char: '${line.head}'")
      }
    }
  }
  override def shutdown(): Unit = {
    handlers.foreach(_.shutdown())
  }
}


text:
package com.podio.filter;

public enum StandardSortBy implements SortBy {

	LAST_EDIT_ON,
	CREATED_ON,
	FIVESTAR;

	@Override
	public String getKey() {
		return name().toLowerCase();
	}
}


text:
layout: post
title: "JavaScript flip card jQuery"
category: posts
---

These days I got to use this nice javascript library called [Flippant](http://labs.mintchaos.com/flippant.js/)
which lets you create a really nice functional flip card on an html
element. You might have seen this if on the OSX dashboard, when you
change a widget settings.

You can see the main website [http://labs.mintchaos.com/flippant.js/](http://labs.mintchaos.com/flippant.js/) or go ahead to the repository on github [https://github.com/mintchaos/flippant.js](https://github.com/mintchaos/flippant.js)

My only problem with it was using it on elements with relative position.
So you happen to have any issue like this here is the code I replaced to
make it work for me.

I basicaly changed the method "set_styles" that currently looks like
this

{% highlight js %}
function set_styles(back, front, position) {
  back.style.position = position
  back.style.top = front.offsetTop + "px"
  back.style.left = front.offsetLeft + "px"
  back.style['min-height'] = front.offsetHeight + "px"
  back.style.width = front.offsetWidth + "px"
  back.style["z-index"] = 9999
}
{% endhighlight %}

with the following.

{% highlight js %}
function set_styles(back, front, position) {
  back.style.position = position
  // back.style.top = front.offsetTop + "px"
  // back.style.left = front.offsetLeft + "px"
  back.style['min-height'] = front.offsetHeight + "px"
  back.style.width = front.offsetWidth + "px"
  back.style["z-index"] = 9999

  // HACK on library to get proper positioning
    var offsets = front.getBoundingClientRect();
    back.style.top = offsets.top + "px";
    back.style.left = offsets.left + "px";
  // \HACK
}
{% endhighlight %}

Basically it makes flippant use the real position of the elem calculated
by the browser.

Thanks for reading this :)