text:
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Ads.GoogleAds.V11.Services {

  /// Holder for reflection information generated from google/ads/googleads/v11/services/customer_conversion_goal_service.proto
  public static partial class CustomerConversionGoalServiceReflection {

    #region Descriptor
    /// File descriptor for google/ads/googleads/v11/services/customer_conversion_goal_service.proto
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static CustomerConversionGoalServiceReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "Ckhnb29nbGUvYWRzL2dvb2dsZWFkcy92MTEvc2VydmljZXMvY3VzdG9tZXJf",
            "Y29udmVyc2lvbl9nb2FsX3NlcnZpY2UucHJvdG8SIWdvb2dsZS5hZHMuZ29v",
            "Z2xlYWRzLnYxMS5zZXJ2aWNlcxpBZ29vZ2xlL2Fkcy9nb29nbGVhZHMvdjEx",
            "L3Jlc291cmNlcy9jdXN0b21lcl9jb252ZXJzaW9uX2dvYWwucHJvdG8aHGdv",
            "b2dsZS9hcGkvYW5ub3RhdGlvbnMucHJvdG8aF2dvb2dsZS9hcGkvY2xpZW50",
            "LnByb3RvGh9nb29nbGUvYXBpL2ZpZWxkX2JlaGF2aW9yLnByb3RvGhlnb29n",
            "bGUvYXBpL3Jlc291cmNlLnByb3RvGiBnb29nbGUvcHJvdG9idWYvZmllbGRf",
            "bWFzay5wcm90byK0AQokTXV0YXRlQ3VzdG9tZXJDb252ZXJzaW9uR29hbHNS",
            "ZXF1ZXN0EhgKC2N1c3RvbWVyX2lkGAEgASgJQgPgQQISWwoKb3BlcmF0aW9u",
            "cxgCIAMoCzJCLmdvb2dsZS5hZHMuZ29vZ2xlYWRzLnYxMS5zZXJ2aWNlcy5D",
            "dXN0b21lckNvbnZlcnNpb25Hb2FsT3BlcmF0aW9uQgPgQQISFQoNdmFsaWRh",
            "dGVfb25seRgDIAEoCCKtAQofQ3VzdG9tZXJDb252ZXJzaW9uR29hbE9wZXJh",
            "dGlvbhIvCgt1cGRhdGVfbWFzaxgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5G",
            "aWVsZE1hc2sSTAoGdXBkYXRlGAEgASgLMjouZ29vZ2xlLmFkcy5nb29nbGVh",
            "ZHMudjExLnJlc291cmNlcy5DdXN0b21lckNvbnZlcnNpb25Hb2FsSABCCwoJ",
            "b3BlcmF0aW9uIn8KJU11dGF0ZUN1c3RvbWVyQ29udmVyc2lvbkdvYWxzUmVz",
            "cG9uc2USVgoHcmVzdWx0cxgBIAMoCzJFLmdvb2dsZS5hZHMuZ29vZ2xlYWRz",
            "LnYxMS5zZXJ2aWNlcy5NdXRhdGVDdXN0b21lckNvbnZlcnNpb25Hb2FsUmVz",
            "dWx0InEKIk11dGF0ZUN1c3RvbWVyQ29udmVyc2lvbkdvYWxSZXN1bHQSSwoN",
            "cmVzb3VyY2VfbmFtZRgBIAEoCUI0+kExCi9nb29nbGVhZHMuZ29vZ2xlYXBp",
            "cy5jb20vQ3VzdG9tZXJDb252ZXJzaW9uR29hbDL+AgodQ3VzdG9tZXJDb252",
            "ZXJzaW9uR29hbFNlcnZpY2USlQIKHU11dGF0ZUN1c3RvbWVyQ29udmVyc2lv",
            "bkdvYWxzEkcuZ29vZ2xlLmFkcy5nb29nbGVhZHMudjExLnNlcnZpY2VzLk11",
            "dGF0ZUN1c3RvbWVyQ29udmVyc2lvbkdvYWxzUmVxdWVzdBpILmdvb2dsZS5h",
            "ZHMuZ29vZ2xlYWRzLnYxMS5zZXJ2aWNlcy5NdXRhdGVDdXN0b21lckNvbnZl",
            "cnNpb25Hb2Fsc1Jlc3BvbnNlImGC0+STAkIiPS92MTEvY3VzdG9tZXJzL3tj",
            "dXN0b21lcl9pZD0qfS9jdXN0b21lckNvbnZlcnNpb25Hb2FsczptdXRhdGU6",
            "ASraQRZjdXN0b21lcl9pZCxvcGVyYXRpb25zGkXKQRhnb29nbGVhZHMuZ29v",
            "Z2xlYXBpcy5jb23SQSdodHRwczovL3d3dy5nb29nbGVhcGlzLmNvbS9hdXRo",
            "L2Fkd29yZHNCjgIKJWNvbS5nb29nbGUuYWRzLmdvb2dsZWFkcy52MTEuc2Vy",
            "dmljZXNCIkN1c3RvbWVyQ29udmVyc2lvbkdvYWxTZXJ2aWNlUHJvdG9QAVpJ",
            "Z29vZ2xlLmdvbGFuZy5vcmcvZ2VucHJvdG8vZ29vZ2xlYXBpcy9hZHMvZ29v",
            "Z2xlYWRzL3YxMS9zZXJ2aWNlcztzZXJ2aWNlc6ICA0dBQaoCIUdvb2dsZS5B",
            "ZHMuR29vZ2xlQWRzLlYxMS5TZXJ2aWNlc8oCIUdvb2dsZVxBZHNcR29vZ2xl",
            "QWRzXFYxMVxTZXJ2aWNlc+oCJUdvb2dsZTo6QWRzOjpHb29nbGVBZHM6OlYx",
            "MTo6U2VydmljZXNiBnByb3RvMw=="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Google.Ads.GoogleAds.V11.Resources.CustomerConversionGoalReflection.Descriptor, global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Ads.GoogleAds.V11.Services.MutateCustomerConversionGoalsRequest), global::Google.Ads.GoogleAds.V11.Services.MutateCustomerConversionGoalsRequest.Parser, new[]{ "CustomerId", "Operations", "ValidateOnly" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Ads.GoogleAds.V11.Services.CustomerConversionGoalOperation), global::Google.Ads.GoogleAds.V11.Services.CustomerConversionGoalOperation.Parser, new[]{ "UpdateMask", "Update" }, new[]{ "Operation" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Ads.GoogleAds.V11.Services.MutateCustomerConversionGoalsResponse), global::Google.Ads.GoogleAds.V11.Services.MutateCustomerConversionGoalsResponse.Parser, new[]{ "Results" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Ads.GoogleAds.V11.Services.MutateCustomerConversionGoalResult), global::Google.Ads.GoogleAds.V11.Services.MutateCustomerConversionGoalResult.Parser, new[]{ "ResourceName" }, null, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  ///
  /// Request message for
  /// [CustomerConversionGoalService.MutateCustomerConversionGoals][google.ads.googleads.v11.services.CustomerConversionGoalService.MutateCustomerConversionGoals].
  ///
  public sealed partial class MutateCustomerConversionGoalsRequest : pb::IMessage<MutateCustomerConversionGoalsRequest>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<MutateCustomerConversionGoalsRequest> _parser = new pb::MessageParser<MutateCustomerConversionGoalsRequest>(() => new MutateCustomerConversionGoalsRequest());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<MutateCustomerConversionGoalsRequest> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Ads.GoogleAds.V11.Services.CustomerConversionGoalServiceReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateCustomerConversionGoalsRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateCustomerConversionGoalsRequest(MutateCustomerConversionGoalsRequest other) : this() {
      customerId_ = other.customerId_;
      operations_ = other.operations_.Clone();
      validateOnly_ = other.validateOnly_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateCustomerConversionGoalsRequest Clone() {
      return new MutateCustomerConversionGoalsRequest(this);
    }

    /// Field number for the "customer_id" field.
    public const int CustomerIdFieldNumber = 1;
    private string customerId_ = "";
    ///
    /// Required. The ID of the customer whose customer conversion goals are being modified.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string CustomerId {
      get { return customerId_; }
      set {
        customerId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "operations" field.
    public const int OperationsFieldNumber = 2;
    private static readonly pb::FieldCodec<global::Google.Ads.GoogleAds.V11.Services.CustomerConversionGoalOperation> _repeated_operations_codec
        = pb::FieldCodec.ForMessage(18, global::Google.Ads.GoogleAds.V11.Services.CustomerConversionGoalOperation.Parser);
    private readonly pbc::RepeatedField<global::Google.Ads.GoogleAds.V11.Services.CustomerConversionGoalOperation> operations_ = new pbc::RepeatedField<global::Google.Ads.GoogleAds.V11.Services.CustomerConversionGoalOperation>();
    ///
    /// Required. The list of operations to perform on individual customer conversion goal.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::Google.Ads.GoogleAds.V11.Services.CustomerConversionGoalOperation> Operations {
      get { return operations_; }
    }

    /// Field number for the "validate_only" field.
    public const int ValidateOnlyFieldNumber = 3;
    private bool validateOnly_;
    ///
    /// If true, the request is validated but not executed. Only errors are
    /// returned, not results.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool ValidateOnly {
      get { return validateOnly_; }
      set {
        validateOnly_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as MutateCustomerConversionGoalsRequest);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(MutateCustomerConversionGoalsRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (CustomerId != other.CustomerId) return false;
      if(!operations_.Equals(other.operations_)) return false;
      if (ValidateOnly != other.ValidateOnly) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (CustomerId.Length != 0) hash ^= CustomerId.GetHashCode();
      hash ^= operations_.GetHashCode();
      if (ValidateOnly != false) hash ^= ValidateOnly.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (CustomerId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(CustomerId);
      }
      operations_.WriteTo(output, _repeated_operations_codec);
      if (ValidateOnly != false) {
        output.WriteRawTag(24);
        output.WriteBool(ValidateOnly);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (CustomerId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(CustomerId);
      }
      operations_.WriteTo(ref output, _repeated_operations_codec);
      if (ValidateOnly != false) {
        output.WriteRawTag(24);
        output.WriteBool(ValidateOnly);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (CustomerId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(CustomerId);
      }
      size += operations_.CalculateSize(_repeated_operations_codec);
      if (ValidateOnly != false) {
        size += 1 + 1;
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(MutateCustomerConversionGoalsRequest other) {
      if (other == null) {
        return;
      }
      if (other.CustomerId.Length != 0) {
        CustomerId = other.CustomerId;
      }
      operations_.Add(other.operations_);
      if (other.ValidateOnly != false) {
        ValidateOnly = other.ValidateOnly;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            CustomerId = input.ReadString();
            break;
          }
          case 18: {
            operations_.AddEntriesFrom(input, _repeated_operations_codec);
            break;
          }
          case 24: {
            ValidateOnly = input.ReadBool();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            CustomerId = input.ReadString();
            break;
          }
          case 18: {
            operations_.AddEntriesFrom(ref input, _repeated_operations_codec);
            break;
          }
          case 24: {
            ValidateOnly = input.ReadBool();
            break;
          }
        }
      }
    }
    #endif

  }

  ///
  /// A single operation (update) on a customer conversion goal.
  ///
  public sealed partial class CustomerConversionGoalOperation : pb::IMessage<CustomerConversionGoalOperation>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<CustomerConversionGoalOperation> _parser = new pb::MessageParser<CustomerConversionGoalOperation>(() => new CustomerConversionGoalOperation());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<CustomerConversionGoalOperation> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Ads.GoogleAds.V11.Services.CustomerConversionGoalServiceReflection.Descriptor.MessageTypes[1]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public CustomerConversionGoalOperation() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public CustomerConversionGoalOperation(CustomerConversionGoalOperation other) : this() {
      updateMask_ = other.updateMask_ != null ? other.updateMask_.Clone() : null;
      switch (other.OperationCase) {
        case OperationOneofCase.Update:
          Update = other.Update.Clone();
          break;
      }

      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public CustomerConversionGoalOperation Clone() {
      return new CustomerConversionGoalOperation(this);
    }

    /// Field number for the "update_mask" field.
    public const int UpdateMaskFieldNumber = 2;
    private global::Google.Protobuf.WellKnownTypes.FieldMask updateMask_;
    ///
    /// FieldMask that determines which resource fields are modified in an update.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.FieldMask UpdateMask {
      get { return updateMask_; }
      set {
        updateMask_ = value;
      }
    }

    /// Field number for the "update" field.
    public const int UpdateFieldNumber = 1;
    ///
    /// Update operation: The customer conversion goal is expected to have a
    /// valid resource name.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Ads.GoogleAds.V11.Resources.CustomerConversionGoal Update {
      get { return operationCase_ == OperationOneofCase.Update ? (global::Google.Ads.GoogleAds.V11.Resources.CustomerConversionGoal) operation_ : null; }
      set {
        operation_ = value;
        operationCase_ = value == null ? OperationOneofCase.None : OperationOneofCase.Update;
      }
    }

    private object operation_;
    /// Enum of possible cases for the "operation" oneof.
    public enum OperationOneofCase {
      None = 0,
      Update = 1,
    }
    private OperationOneofCase operationCase_ = OperationOneofCase.None;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public OperationOneofCase OperationCase {
      get { return operationCase_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearOperation() {
      operationCase_ = OperationOneofCase.None;
      operation_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as CustomerConversionGoalOperation);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(CustomerConversionGoalOperation other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(UpdateMask, other.UpdateMask)) return false;
      if (!object.Equals(Update, other.Update)) return false;
      if (OperationCase != other.OperationCase) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (updateMask_ != null) hash ^= UpdateMask.GetHashCode();
      if (operationCase_ == OperationOneofCase.Update) hash ^= Update.GetHashCode();
      hash ^= (int) operationCase_;
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (operationCase_ == OperationOneofCase.Update) {
        output.WriteRawTag(10);
        output.WriteMessage(Update);
      }
      if (updateMask_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(UpdateMask);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (operationCase_ == OperationOneofCase.Update) {
        output.WriteRawTag(10);
        output.WriteMessage(Update);
      }
      if (updateMask_ != null) {
        output.WriteRawTag(18);
        output.WriteMessage(UpdateMask);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (updateMask_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateMask);
      }
      if (operationCase_ == OperationOneofCase.Update) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Update);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(CustomerConversionGoalOperation other) {
      if (other == null) {
        return;
      }
      if (other.updateMask_ != null) {
        if (updateMask_ == null) {
          UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask();
        }
        UpdateMask.MergeFrom(other.UpdateMask);
      }
      switch (other.OperationCase) {
        case OperationOneofCase.Update:
          if (Update == null) {
            Update = new global::Google.Ads.GoogleAds.V11.Resources.CustomerConversionGoal();
          }
          Update.MergeFrom(other.Update);
          break;
      }

      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            global::Google.Ads.GoogleAds.V11.Resources.CustomerConversionGoal subBuilder = new global::Google.Ads.GoogleAds.V11.Resources.CustomerConversionGoal();
            if (operationCase_ == OperationOneofCase.Update) {
              subBuilder.MergeFrom(Update);
            }
            input.ReadMessage(subBuilder);
            Update = subBuilder;
            break;
          }
          case 18: {
            if (updateMask_ == null) {
              UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask();
            }
            input.ReadMessage(UpdateMask);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            global::Google.Ads.GoogleAds.V11.Resources.CustomerConversionGoal subBuilder = new global::Google.Ads.GoogleAds.V11.Resources.CustomerConversionGoal();
            if (operationCase_ == OperationOneofCase.Update) {
              subBuilder.MergeFrom(Update);
            }
            input.ReadMessage(subBuilder);
            Update = subBuilder;
            break;
          }
          case 18: {
            if (updateMask_ == null) {
              UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask();
            }
            input.ReadMessage(UpdateMask);
            break;
          }
        }
      }
    }
    #endif

  }

  ///
  /// Response message for a customer conversion goal mutate.
  ///
  public sealed partial class MutateCustomerConversionGoalsResponse : pb::IMessage<MutateCustomerConversionGoalsResponse>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<MutateCustomerConversionGoalsResponse> _parser = new pb::MessageParser<MutateCustomerConversionGoalsResponse>(() => new MutateCustomerConversionGoalsResponse());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<MutateCustomerConversionGoalsResponse> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Ads.GoogleAds.V11.Services.CustomerConversionGoalServiceReflection.Descriptor.MessageTypes[2]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateCustomerConversionGoalsResponse() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateCustomerConversionGoalsResponse(MutateCustomerConversionGoalsResponse other) : this() {
      results_ = other.results_.Clone();
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateCustomerConversionGoalsResponse Clone() {
      return new MutateCustomerConversionGoalsResponse(this);
    }

    /// Field number for the "results" field.
    public const int ResultsFieldNumber = 1;
    private static readonly pb::FieldCodec<global::Google.Ads.GoogleAds.V11.Services.MutateCustomerConversionGoalResult> _repeated_results_codec
        = pb::FieldCodec.ForMessage(10, global::Google.Ads.GoogleAds.V11.Services.MutateCustomerConversionGoalResult.Parser);
    private readonly pbc::RepeatedField<global::Google.Ads.GoogleAds.V11.Services.MutateCustomerConversionGoalResult> results_ = new pbc::RepeatedField<global::Google.Ads.GoogleAds.V11.Services.MutateCustomerConversionGoalResult>();
    ///
    /// All results for the mutate.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::Google.Ads.GoogleAds.V11.Services.MutateCustomerConversionGoalResult> Results {
      get { return results_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as MutateCustomerConversionGoalsResponse);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(MutateCustomerConversionGoalsResponse other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!results_.Equals(other.results_)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      hash ^= results_.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      results_.WriteTo(output, _repeated_results_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      results_.WriteTo(ref output, _repeated_results_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      size += results_.CalculateSize(_repeated_results_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(MutateCustomerConversionGoalsResponse other) {
      if (other == null) {
        return;
      }
      results_.Add(other.results_);
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            results_.AddEntriesFrom(input, _repeated_results_codec);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            results_.AddEntriesFrom(ref input, _repeated_results_codec);
            break;
          }
        }
      }
    }
    #endif

  }

  ///
  /// The result for the customer conversion goal mutate.
  ///
  public sealed partial class MutateCustomerConversionGoalResult : pb::IMessage<MutateCustomerConversionGoalResult>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<MutateCustomerConversionGoalResult> _parser = new pb::MessageParser<MutateCustomerConversionGoalResult>(() => new MutateCustomerConversionGoalResult());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<MutateCustomerConversionGoalResult> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Ads.GoogleAds.V11.Services.CustomerConversionGoalServiceReflection.Descriptor.MessageTypes[3]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateCustomerConversionGoalResult() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateCustomerConversionGoalResult(MutateCustomerConversionGoalResult other) : this() {
      resourceName_ = other.resourceName_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MutateCustomerConversionGoalResult Clone() {
      return new MutateCustomerConversionGoalResult(this);
    }

    /// Field number for the "resource_name" field.
    public const int ResourceNameFieldNumber = 1;
    private string resourceName_ = "";
    ///
    /// Returned for successful operations.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string ResourceName {
      get { return resourceName_; }
      set {
        resourceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as MutateCustomerConversionGoalResult);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(MutateCustomerConversionGoalResult other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (ResourceName != other.ResourceName) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (ResourceName.Length != 0) hash ^= ResourceName.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (ResourceName.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(ResourceName);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (ResourceName.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(ResourceName);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (ResourceName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ResourceName);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(MutateCustomerConversionGoalResult other) {
      if (other == null) {
        return;
      }
      if (other.ResourceName.Length != 0) {
        ResourceName = other.ResourceName;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            ResourceName = input.ReadString();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            ResourceName = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

  #endregion

}

#endregion Designer generated code


text:
#include "sky/engine/platform/text/TextStream.h"

#include "sky/engine/platform/geometry/FloatPoint.h"
#include "sky/engine/platform/geometry/FloatRect.h"
#include "sky/engine/platform/geometry/FloatSize.h"
#include "sky/engine/platform/geometry/IntPoint.h"
#include "sky/engine/platform/geometry/IntRect.h"
#include "sky/engine/wtf/MathExtras.h"
#include "sky/engine/wtf/StringExtras.h"
#include "sky/engine/wtf/text/WTFString.h"

namespace blink {

static const size_t printBufferSize = 100; // large enough for any integer or floating point value in string format, including trailing null character

static inline bool hasFractions(double val)
{
    static const double s_epsilon = 0.0001;
    int ival = static_cast<int>(val);
    double dval = static_cast<double>(ival);
    return fabs(val - dval) > s_epsilon;
}

TextStream& TextStream::operator<<(bool b)
{
    return *this << (b ? "1" : "0");
}

TextStream& TextStream::operator<<(int i)
{
    m_text.appendNumber(i);
    return *this;
}

TextStream& TextStream::operator<<(unsigned i)
{
    m_text.appendNumber(i);
    return *this;
}

TextStream& TextStream::operator<<(long i)
{
    m_text.appendNumber(i);
    return *this;
}

TextStream& TextStream::operator<<(unsigned long i)
{
    m_text.appendNumber(i);
    return *this;
}

TextStream& TextStream::operator<<(long long i)
{
    m_text.appendNumber(i);
    return *this;
}

TextStream& TextStream::operator<<(unsigned long long i)
{
    m_text.appendNumber(i);
    return *this;
}

TextStream& TextStream::operator<<(float f)
{
    m_text.append(String::numberToStringFixedWidth(f, 2));
    return *this;
}

TextStream& TextStream::operator<<(double d)
{
    m_text.append(String::numberToStringFixedWidth(d, 2));
    return *this;
}

TextStream& TextStream::operator<<(const char* string)
{
    m_text.append(string);
    return *this;
}

TextStream& TextStream::operator<<(const void* p)
{
    char buffer[printBufferSize];
    snprintf(buffer, sizeof(buffer) - 1, "%p", p);
    return *this << buffer;
}

TextStream& TextStream::operator<<(const String& string)
{
    m_text.append(string);
    return *this;
}

TextStream& TextStream::operator<<(const FormatNumberRespectingIntegers& numberToFormat)
{
    if (hasFractions(numberToFormat.value))
        return *this << numberToFormat.value;

    m_text.appendNumber(static_cast<int>(numberToFormat.value));
    return *this;
}

String TextStream::release()
{
    String result = m_text.toString();
    m_text.clear();
    return result;
}

TextStream& operator<<(TextStream& ts, const IntRect& r)
{
    return ts << "at (" << r.x() << "," << r.y() << ") size " << r.width() << "x" << r.height();
}

TextStream& operator<<(TextStream& ts, const IntPoint& p)
{
    return ts << "(" << p.x() << "," << p.y() << ")";
}

TextStream& operator<<(TextStream& ts, const FloatPoint& p)
{
    ts << "(" << TextStream::FormatNumberRespectingIntegers(p.x());
    ts << "," << TextStream::FormatNumberRespectingIntegers(p.y());
    ts << ")";
    return ts;
}

TextStream& operator<<(TextStream& ts, const FloatSize& s)
{
    ts << "width=" << TextStream::FormatNumberRespectingIntegers(s.width());
    ts << " height=" << TextStream::FormatNumberRespectingIntegers(s.height());
    return ts;
}

TextStream& operator<<(TextStream& ts, const FloatRect& r)
{
    ts << "at (" << TextStream::FormatNumberRespectingIntegers(r.x());
    ts << "," << TextStream::FormatNumberRespectingIntegers(r.y());
    ts << ") size " << TextStream::FormatNumberRespectingIntegers(r.width());
    ts << "x" << TextStream::FormatNumberRespectingIntegers(r.height());
    return ts;
}

void writeIndent(TextStream& ts, int indent)
{
    for (int i = 0; i != indent; ++i)
        ts << "  ";
}

}

redpajama_set_name: RedPajamaGithub


text:
#pragma once

#include "targetver.h"

#define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>

// TODO: reference additional headers your program requires here

#include <tchar.h>


text:
package org.greenrobot.eventbus;

import org.greenrobot.eventbus.meta.SubscriberInfoIndex;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 构建器模式
 * Effective Java : 遇到多个构造器参数时要考虑用构造器.
 */
@SuppressWarnings("unused")
public class EventBusBuilder {
    private final static ExecutorService DEFAULT_EXECUTOR_SERVICE = Executors.newCachedThreadPool();

    /** 是否监听异常日志. */
    boolean logSubscriberExceptions = true;

    /** 如果没有订阅者,显示log信息. */
    boolean logNoSubscriberMessages = true;

    /** 是否发送监听到的异常. */
    boolean sendSubscriberExceptionEvent = true;

    /** 如果没有订阅者,就发布一条默认事件. */
    boolean sendNoSubscriberEvent = true;

    /** 如果失败,则抛出异常. */
    boolean throwSubscriberException;

    /** 是否响应订阅事件的父类事件. */
    boolean eventInheritance = true;
    boolean ignoreGeneratedIndex;

    /** 是否为严格模式.值为true时,当Subscribe注解描述的响应函数不符合要求时,会抛出相应的异常. */
    boolean strictMethodVerification;

    /** 线程池. */
    ExecutorService executorService = DEFAULT_EXECUTOR_SERVICE;

    /** 从命名来看,含义是不遍历的Method响应函数集合,但是没啥软用,EventBus3.0版本也没有遍历这个集合. */
    List<Class<?>> skipMethodVerificationForClasses;
    List<SubscriberInfoIndex> subscriberInfoIndexes;

    EventBusBuilder() {
    }

    /** Default: true. */
    public EventBusBuilder logSubscriberExceptions(boolean logSubscriberExceptions) {
        this.logSubscriberExceptions = logSubscriberExceptions;
        return this;
    }

    /** Default: true. */
    public EventBusBuilder logNoSubscriberMessages(boolean logNoSubscriberMessages) {
        this.logNoSubscriberMessages = logNoSubscriberMessages;
        return this;
    }

    /** Default: true. */
    public EventBusBuilder sendSubscriberExceptionEvent(boolean sendSubscriberExceptionEvent) {
        this.sendSubscriberExceptionEvent = sendSubscriberExceptionEvent;
        return this;
    }

    /** Default: true. */
    public EventBusBuilder sendNoSubsciberEvent(boolean sendNoSubscriberEvent) {
        this.sendNoSubscriberEvent = sendNoSubscriberEvent;
        return this;
    }

    /**
     * Fails if an subscriber throws an exception (default: false).
     */
    public EventBusBuilder throwSubscriberException(boolean throwSubscriberException) {
        this.throwSubscriberException = throwSubscriberException;
        return this;
    }

    /**
     * By default, EventBus considers the event class hierarchy
     * (subscribers to super classes will be notified).
     */
    public EventBusBuilder eventInheritance(boolean eventInheritance) {
        this.eventInheritance = eventInheritance;
        return this;
    }

    /**
     * Provide a custom thread pool to EventBus used for async and background event delivery.
     */
    public EventBusBuilder executorService(ExecutorService executorService) {
        this.executorService = executorService;
        return this;
    }

    public EventBusBuilder skipMethodVerificationFor(Class<?> clazz) {
        if (skipMethodVerificationForClasses == null) {
            skipMethodVerificationForClasses = new ArrayList<>();
        }
        skipMethodVerificationForClasses.add(clazz);
        return this;
    }

    /**
     * Forces the use of reflection even if there's a generated index.(default: false)
     */
    public EventBusBuilder ignoreGeneratedIndex(boolean ignoreGeneratedIndex) {
        this.ignoreGeneratedIndex = ignoreGeneratedIndex;
        return this;
    }

    /** Default: false. */
    public EventBusBuilder strictMethodVerification(boolean strictMethodVerification) {
        this.strictMethodVerification = strictMethodVerification;
        return this;
    }

    /**
     * Adds an index generated by EventBus' annotation preprocessor.
     */
    public EventBusBuilder addIndex(SubscriberInfoIndex index) {
        if (subscriberInfoIndexes == null) {
            subscriberInfoIndexes = new ArrayList<>();
        }
        subscriberInfoIndexes.add(index);
        return this;
    }

    /**
     * Installs the default EventBus returned by {@link EventBus#getDefault()}
     * using this builder's values.
     */
    public EventBus installDefaultEventBus() {
        synchronized (EventBus.class) {
            if (EventBus.defaultInstance != null) {
                throw  new EventBusException("Default instance already exists." +
                        "It may be only set once before it's used the first time to " +
                        "ensure consistent behavior.");
            }
            EventBus.defaultInstance = build();
            return EventBus.defaultInstance;
        }
    }

    /**
     * Builds an EventBus based on the current configuration.
     */
    public EventBus build() {
        return new EventBus(this);
    }
}


text:
#ifndef SB_CHANNEL_FUN_H
#define SB_CHANNEL_FUN_H
#ifdef PIC30

#ifndef NULL
typedef unsigned int size_t;
#define NULL ((void*)0)
#endif

#else
#include <stdlib.h>
#endif

struct SBChannelFunction {
	int (*destroy)(void*);

	int (*open)(void*);
	int (*close)(void*);

	int (*send)(void*,const unsigned char *data, size_t size);
	int (*receive)(void*,unsigned char *data, size_t size);

	int (*sendall)(void*,const unsigned char *data, size_t size,unsigned int timeout_ms);
	int (*waitbuffer)(void*,unsigned char *data, size_t size,unsigned int timeout_ms);
	int (*waitdata)(void*,unsigned int timeout_ms);

	int (*flush)(void*);
} ;

#endif // SB_CHANNEL_FUN_H


text:
Just a simple portfolio page made by me using the "createive" boostrap template. Images are from Unsplash and it was a bitch finding the right size ones.

## Copyright and License

Copyright 2013-2016 Blackrock Digital LLC. Code released under the [MIT](https://github.com/BlackrockDigital/startbootstrap-creative/blob/gh-pages/LICENSE) license.


text:
GentillesseApp
==============

Suivre la gentillesse des utilisateurs :)


text:
namespace Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers
{
    using ApplicationInsights.Extensibility;
    using Channel;
    using Microsoft.ApplicationInsights.AspNetCore.Extensions;
    using Microsoft.Extensions.Options;

    /// <summary>
    /// A telemetry initializer that populates telemetry.Context.Component.Version to the value read from configuration
    /// </summary>
    public class ComponentVersionTelemetryInitializer : ITelemetryInitializer
    {
        private readonly string version;

        public ComponentVersionTelemetryInitializer(IOptions<ApplicationInsightsServiceOptions> options)
        {
             this.version = options.Value.ApplicationVersion;
        }

        public void Initialize(ITelemetry telemetry)
        {
            if (string.IsNullOrEmpty(telemetry.Context.Component.Version))
            {
                if (!string.IsNullOrEmpty(this.version))
                {
                    telemetry.Context.Component.Version = this.version;
                }
            }
        }
    }
}


text:
import {ListWrapper, MapWrapper} from 'angular2/src/core/facade/collection';
import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {
  isPresent,
  isString,
  RegExpWrapper,
  StringWrapper,
  RegExp
} from 'angular2/src/core/facade/lang';

export class Log {
  /** @internal */
  _result: any[];

  constructor() { this._result = []; }

  add(value): void { this._result.push(value); }

  fn(value) {
    return (a1 = null, a2 = null, a3 = null, a4 = null, a5 = null) => { this._result.push(value); }
  }

  clear(): void { this._result = []; }

  result(): string { return this._result.join("; "); }
}

export class BrowserDetection {
  private _ua: string;

  constructor(ua: string) {
    if (isPresent(ua)) {
      this._ua = ua;
    } else {
      this._ua = isPresent(DOM) ? DOM.getUserAgent() : '';
    }
  }

  get isFirefox(): boolean { return this._ua.indexOf('Firefox') > -1; }

  get isAndroid(): boolean {
    return this._ua.indexOf('Mozilla/5.0') > -1 && this._ua.indexOf('Android') > -1 &&
           this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Chrome') == -1;
  }

  get isEdge(): boolean { return this._ua.indexOf('Edge') > -1; }

  get isIE(): boolean { return this._ua.indexOf('Trident') > -1; }

  get isWebkit(): boolean {
    return this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Edge') == -1;
  }

  get isIOS7(): boolean {
    return this._ua.indexOf('iPhone OS 7') > -1 || this._ua.indexOf('iPad OS 7') > -1;
  }

  get isSlow(): boolean { return this.isAndroid || this.isIE || this.isIOS7; }

  // The Intl API is only properly supported in recent Chrome and Opera.
  // Note: Edge is disguised as Chrome 42, so checking the "Edge" part is needed,
  // see https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
  get supportsIntlApi(): boolean {
    return this._ua.indexOf('Chrome/4') > -1 && this._ua.indexOf('Edge') == -1;
  }
}
export var browserDetection: BrowserDetection = new BrowserDetection(null);

export function dispatchEvent(element, eventType): void {
  DOM.dispatchEvent(element, DOM.createEvent(eventType));
}

export function el(html: string): HTMLElement {
  return <HTMLElement>DOM.firstChild(DOM.content(DOM.createTemplate(html)));
}

var _RE_SPECIAL_CHARS =
    ['-', '[', ']', '/', '{', '}', '\\', '(', ')', '*', '+', '?', '.', '^', '$', '|'];
var _ESCAPE_RE = RegExpWrapper.create(`[\\${_RE_SPECIAL_CHARS.join('\\')}]`);
export function containsRegexp(input: string): RegExp {
  return RegExpWrapper.create(
      StringWrapper.replaceAllMapped(input, _ESCAPE_RE, (match) => `\\${match[0]}`));
}

export function normalizeCSS(css: string): string {
  css = StringWrapper.replaceAll(css, /\s+/g, ' ');
  css = StringWrapper.replaceAll(css, /:\s/g, ':');
  css = StringWrapper.replaceAll(css, /'/g, '"');
  css = StringWrapper.replaceAll(css, / }/g, '}');
  css = StringWrapper.replaceAllMapped(css, /url\((\"|\s)(.+)(\"|\s)\)(\s*)/g,
                                       (match) => `url("${match[2]}")`);
  css = StringWrapper.replaceAllMapped(css, /\[(.+)=([^"\]]+)\]/g,
                                       (match) => `[${match[1]}="${match[2]}"]`);
  return css;
}

var _singleTagWhitelist = ['br', 'hr', 'input'];
export function stringifyElement(el): string {
  var result = '';
  if (DOM.isElementNode(el)) {
    var tagName = StringWrapper.toLowerCase(DOM.tagName(el));

    // Opening tag
    result += `<${tagName}`;

    // Attributes in an ordered way
    var attributeMap = DOM.attributeMap(el);
    var keys = [];
    attributeMap.forEach((v, k) => keys.push(k));
    ListWrapper.sort(keys);
    for (let i = 0; i < keys.length; i++) {
      var key = keys[i];
      var attValue = attributeMap.get(key);
      if (!isString(attValue)) {
        result += ` ${key}`;
      } else {
        result += ` ${key}="${attValue}"`;
      }
    }
    result += '>';

    // Children
    var childrenRoot = DOM.templateAwareRoot(el);
    var children = isPresent(childrenRoot) ? DOM.childNodes(childrenRoot) : [];
    for (let j = 0; j < children.length; j++) {
      result += stringifyElement(children[j]);
    }

    // Closing tag
    if (!ListWrapper.contains(_singleTagWhitelist, tagName)) {
      result += `</${tagName}>`;
    }
  } else if (DOM.isCommentNode(el)) {
    result += `<!--${DOM.nodeValue(el)}-->`;
  } else {
    result += DOM.getText(el);
  }

  return result;
}


text:
// Copyright 2011-2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.security.zynamics.binnavi.Gui.Debug;

/**
 * This package is the base package of all the controls that are shown in the lower half of the
 * graph windows. These controls deal mostly with debugging stuff. The individual controls are
 * implemented in the sub-packages of this package.
 */


text:
package de.fct.fdmm.apidl;

import java.util.List;

import de.fct.fdmm.basis.IDescription;
import de.fct.fdmm.basis.INamedElement;

public interface TypeDescription extends IDescription, INamedElement {

    public String getFqtn();

    public PackageDescription getPackage();

    public List<MethodDescription> getMethods();

}


text:
package uk.co.real_logic.sbe.xml;

import org.junit.Assert;
import org.junit.Test;
import uk.co.real_logic.sbe.TestUtil;

import java.util.List;

import static java.lang.Integer.valueOf;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import static uk.co.real_logic.sbe.xml.XmlSchemaParser.parse;

/*
 * Tests associated with offset and blockLength calculation and validation
 */
public class OffsetFileTest
{
    @Test
    public void shouldHandleAllTypeOffsets()
        throws Exception
    {
        final MessageSchema schema = parse(TestUtil.getLocalResource("basic-types-schema.xml"), ParserOptions.DEFAULT);
        final List<Field> fields = schema.getMessage(1).fields();

        assertThat(valueOf(fields.get(0).computedOffset()), is(valueOf(0)));
        assertThat(valueOf(fields.get(0).type().encodedLength()), is(valueOf(8)));
        assertThat(valueOf(fields.get(1).computedOffset()), is(valueOf(8)));
        assertThat(valueOf(fields.get(1).type().encodedLength()), is(valueOf(20)));
        assertThat(valueOf(fields.get(2).computedOffset()), is(valueOf(28)));
        assertThat(valueOf(fields.get(2).type().encodedLength()), is(valueOf(1)));
        assertThat(valueOf(fields.get(3).computedOffset()), is(valueOf(29)));
        assertThat(valueOf(fields.get(3).type().encodedLength()), is(valueOf(4)));
        assertThat(valueOf(fields.get(4).computedOffset()), is(valueOf(33)));
        assertThat(valueOf(fields.get(4).type().encodedLength()), is(valueOf(8)));
    }

    @Test
    public void shouldHandleAllTypeOffsetsSetByXML()
        throws Exception
    {
        final MessageSchema schema = parse(TestUtil.getLocalResource("basic-types-schema.xml"), ParserOptions.DEFAULT);
        final List<Field> fields = schema.getMessage(2).fields();

        assertThat(valueOf(fields.get(0).computedOffset()), is(valueOf(0)));
        assertThat(valueOf(fields.get(0).type().encodedLength()), is(valueOf(8)));
        assertThat(valueOf(fields.get(1).computedOffset()), is(valueOf(8)));
        assertThat(valueOf(fields.get(1).type().encodedLength()), is(valueOf(20)));
        assertThat(valueOf(fields.get(2).computedOffset()), is(valueOf(32)));
        assertThat(valueOf(fields.get(2).type().encodedLength()), is(valueOf(1)));
        assertThat(valueOf(fields.get(3).computedOffset()), is(valueOf(128)));
        assertThat(valueOf(fields.get(3).type().encodedLength()), is(valueOf(4)));
        assertThat(valueOf(fields.get(4).computedOffset()), is(valueOf(136)));
        assertThat(valueOf(fields.get(4).type().encodedLength()), is(valueOf(8)));
    }

    @Test
    public void shouldCalculateGroupOffsetWithNoPaddingFromBlockLength()
        throws Exception
    {
        final MessageSchema schema = parse(TestUtil.getLocalResource("block-length-schema.xml"), ParserOptions.DEFAULT);
        final Message msg = schema.getMessage(1);

        assertThat(valueOf(msg.blockLength()), is(valueOf(8)));

        final List<Field> fields = msg.fields();
        assertThat(valueOf(fields.get(0).computedOffset()), is(valueOf(0)));
        assertThat(valueOf(fields.get(0).type().encodedLength()), is(valueOf(8)));
        assertThat(valueOf(fields.get(1).computedOffset()), is(valueOf(8)));
        Assert.assertNull(fields.get(1).type());

        final List<Field> groupFields = fields.get(1).groupFields();
        assertThat(valueOf(groupFields.size()), is(valueOf(2)));
        assertThat(valueOf(groupFields.get(0).computedOffset()), is(valueOf(0)));
        assertThat(valueOf(groupFields.get(0).type().encodedLength()), is(valueOf(4)));
        assertThat(valueOf(groupFields.get(1).computedOffset()), is(valueOf(4)));
        assertThat(valueOf(groupFields.get(1).type().encodedLength()), is(valueOf(8)));
    }

    @Test
    public void shouldCalculateGroupOffsetWithPaddingFromBlockLength()
        throws Exception
    {
        final MessageSchema schema = parse(TestUtil.getLocalResource("block-length-schema.xml"), ParserOptions.DEFAULT);
        final List<Field> fields = schema.getMessage(2).fields();

        assertThat(valueOf(fields.get(0).computedOffset()), is(valueOf(0)));
        assertThat(valueOf(fields.get(0).type().encodedLength()), is(valueOf(8)));
        assertThat(valueOf(fields.get(1).computedOffset()), is(valueOf(64)));
        Assert.assertNull(fields.get(1).type());
        assertThat(valueOf(fields.get(1).computedBlockLength()), is(valueOf(12)));

        final List<Field> groupFields = fields.get(1).groupFields();

        assertThat(valueOf(groupFields.size()), is(valueOf(2)));
        assertThat(valueOf(groupFields.get(0).computedOffset()), is(valueOf(0)));
        assertThat(valueOf(groupFields.get(0).type().encodedLength()), is(valueOf(4)));
        assertThat(valueOf(groupFields.get(1).computedOffset()), is(valueOf(4)));
        assertThat(valueOf(groupFields.get(1).type().encodedLength()), is(valueOf(8)));
    }

    @Test
    public void shouldCalculateGroupOffsetWithPaddingFromBlockLengthAndGroupBlockLength()
        throws Exception
    {
        final MessageSchema schema = parse(TestUtil.getLocalResource("block-length-schema.xml"), ParserOptions.DEFAULT);
        final List<Field> fields = schema.getMessage(3).fields();

        assertThat(valueOf(fields.get(0).computedOffset()), is(valueOf(0)));
        assertThat(valueOf(fields.get(0).type().encodedLength()), is(valueOf(8)));
        assertThat(valueOf(fields.get(1).computedOffset()), is(valueOf(64)));
        Assert.assertNull(fields.get(1).type());
        assertThat(valueOf(fields.get(1).computedBlockLength()), is(valueOf(16)));

        final List<Field> groupFields = fields.get(1).groupFields();

        assertThat(valueOf(groupFields.size()), is(valueOf(2)));
        assertThat(valueOf(groupFields.get(0).computedOffset()), is(valueOf(0)));
        assertThat(valueOf(groupFields.get(0).type().encodedLength()), is(valueOf(4)));
        assertThat(valueOf(groupFields.get(1).computedOffset()), is(valueOf(4)));
        assertThat(valueOf(groupFields.get(1).type().encodedLength()), is(valueOf(8)));
    }

    @Test
    public void shouldCalculateDataOffsetWithPaddingFromBlockLength()
        throws Exception
    {
        final MessageSchema schema = parse(TestUtil.getLocalResource("block-length-schema.xml"), ParserOptions.DEFAULT);
        final List<Field> fields = schema.getMessage(4).fields();

        assertThat(valueOf(fields.get(0).computedOffset()), is(valueOf(0)));
        assertThat(valueOf(fields.get(0).type().encodedLength()), is(valueOf(8)));
        assertThat(valueOf(fields.get(1).computedOffset()), is(valueOf(64)));
        assertThat(valueOf(fields.get(1).type().encodedLength()), is(valueOf(-1)));
    }

    @Test
    public void shouldCalculateCompositeSizeWithOffsetsSpecified()
        throws Exception
    {
        final MessageSchema schema = parse(TestUtil.getLocalResource("composite-offsets-schema.xml"), ParserOptions.DEFAULT);
        final CompositeType header = schema.messageHeader();

        assertThat(valueOf(header.encodedLength()), is(valueOf(12)));
    }

    @Test
    public void shouldCalculateDimensionSizeWithOffsetsSpecified()
        throws Exception
    {
        final MessageSchema schema = parse(TestUtil.getLocalResource("composite-offsets-schema.xml"), ParserOptions.DEFAULT);
        final CompositeType dimensions = schema.getMessage(1).fields().get(0).dimensionType();

        assertThat(valueOf(dimensions.encodedLength()), is(valueOf(8)));
    }
}


text:
/**
 * Pipedrive API v1
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

import ApiClient from '../ApiClient';

/**
 * The CreateTeam model module.
 * @module model/CreateTeam
 * @version 1.0.0
 */
class CreateTeam {
    /**
     * Constructs a new CreateTeam.
     * @alias module:model/CreateTeam
     * @param name {String} The team name
     * @param managerId {Number} The team manager ID
     */
    constructor(name, managerId) {

        CreateTeam.initialize(this, name, managerId);
    }

    /**
     * Initializes the fields of this object.
     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
     * Only for internal use.
     */
    static initialize(obj, name, managerId) {
        obj['name'] = name;
        obj['manager_id'] = managerId;
    }

    /**
     * Constructs a CreateTeam from a plain JavaScript object, optionally creating a new instance.
     * Copies all relevant properties from data to obj if supplied or a new instance if not.
     * @param {Object} data The plain JavaScript object bearing properties of interest.
     * @param {module:model/CreateTeam} obj Optional instance to populate.
     * @return {module:model/CreateTeam} The populated CreateTeam instance.
     */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new CreateTeam();

            if (data.hasOwnProperty('name')) {
                obj['name'] = ApiClient.convertToType(data['name'], 'String');

                delete data['name'];
            }
            if (data.hasOwnProperty('description')) {
                obj['description'] = ApiClient.convertToType(data['description'], 'String');

                delete data['description'];
            }
            if (data.hasOwnProperty('manager_id')) {
                obj['manager_id'] = ApiClient.convertToType(data['manager_id'], 'Number');

                delete data['manager_id'];
            }
            if (data.hasOwnProperty('users')) {
                obj['users'] = ApiClient.convertToType(data['users'], ['Number']);

                delete data['users'];
            }

            if (Object.keys(data).length > 0) {
                Object.assign(obj, data);
            }

        }
        return obj;
    }

}

/**
 * The team name
 * @member {String} name
 */
CreateTeam.prototype['name'] = undefined;

/**
 * The team description
 * @member {String} description
 */
CreateTeam.prototype['description'] = undefined;

/**
 * The team manager ID
 * @member {Number} manager_id
 */
CreateTeam.prototype['manager_id'] = undefined;

/**
 * The list of user IDs
 * @member {Array.<Number>} users
 */
CreateTeam.prototype['users'] = undefined;

export default CreateTeam;


text:
/*# Tom's UI */
.ffCur{
    font-family:cursive;
}
.ffSans{
    font-family: sans-serif;
}
.ffFant{
    font-family: fantasy;
}
.fs25{
  font-size:25px;
}
.fs20{
  font-size: 20px;
}
.fs15{
  font-size: 15px;
}
.ml10{
  margin-left: 10px;
}
.ml50{
  margin-left: 50px;
}
.pt15{
  padding-top: 15px;
}
.pt20{
  padding-top: 20px;
}
.pt40{
  padding-top: 40px;
}
.pt60{
  padding-top: 60px;
}
.pt100{
  padding-top: 100px;
}
.plno{
  padding-left: 0px;
}
.movieBG{
  background: transparent url(../movie.jpg);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
}
.tvshowBG{
  background: transparent url(../tvshow.jpg);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: 1700px;
}
.mediaBG{
  background-color: #191818;
}
a{
  color: white;
  text-decoration: none;
  -webkit-transition: .25s;
          transition: .25s;
}
li>a:hover,
li>a:focus {
  color: #444637;
  text-decoration: none;
}
a:focus {
  outline: none;
}
.space-5{
  width: 5px;
  display: inline-block;
}
.space-20{
  width: 20px;
  display: inline-block;
}
.space-25{
  width: 25px;
  display: inline-block;
}
.topbanner{
  position: fixed;
  width: 100%;
}
.letter-font
{
  color:black;
  font-family: initial;
  font-size: 18px;
}
.letter-font:hover{
  color: white;
  text-decoration: none;
}
.letter-box{
  margin-bottom: -15px;
  margin-top: -5px;
  margin-left:100px;
}
.letter-box .pagination{
  padding-right: 20px;
}
/*.file {
  display:none;
}
.folder:focus + .file{
  display:block;
}*/
.filename:focus,.filename:hover{
  color:#7ed26e;
}
.folder {
  outline:none;
  color:#4044c6;
  cursor:pointer;
}
.file a{
  color: cyan;
}
.subtitle a{
  color:#b8b963;
}
.tvIcon{
  margin:-35px 150px;
  width: 32px;
  height: 32px;
}
.movieIcon{
  margin:-35px 50px;
  width:  32px;
  height: 32px;
}
.icon{
  width : 32px;
  height: 32px;
}
.pull-right{
  float:right;
}
.text-nowrap{
  white-space: nowrap;
}
.help-icon{
  margin: 15px 15px;
  height: 30px;
}
a{
  cursor:pointer;
}
.season{
  cursor:pointer;
}
.agentcarter{
  background: #191818 url("../TV Shows/Agent Carter.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 10px;
  background-size: contain;
}
.arrow{
  background: #191818 url("../TV Shows/Arrow.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 50px;
  background-size: contain;
}
.avengersassemble{
  background: #191818 url("../TV Shows/Avengers Assemble.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 50px;
  background-size: contain;
}
.bettercallsaul{
  background: #191818 url("../TV Shows/Better Call Saul.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-size: contain;
}
.breakingbad{
  background: #191818 url("../TV Shows/Breaking Bad.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-size: contain;
}
.brooklynninenine{
  background: #191818 url("../TV Shows/Brooklyn Nine Nine.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 10px;
  background-size: contain;
}
.daredevil{
  background: #191818 url("../TV Shows/DareDevil.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 60px;
  background-size: contain;
}
.flash{
  background: #191818 url("../TV Shows/Flash.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 60px;
  background-size: contain;
}
.gameofthrones{
  background: #191818 url("../TV Shows/Game Of Thrones.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 30px;
  background-size: contain;
}
.gotham{
  background: #191818 url("../TV Shows/Gotham.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 60px;
  background-size: contain;
}
.jessicajones{
  background: #191818 url("../TV Shows/Jessica Jones.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 60px;
  background-size: contain;
}
.legendsoftomorrow{
  background: #191818 url("../TV Shows/Legends Of Tomorrow.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 50px;
  background-size: contain;
}
.limitless{
  background: #191818 url("../TV Shows/Limitless.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 55px;
  background-size: contain;
}
.lukecage{
  background: #191818 url("../TV Shows/Luke Cage.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 65px;
  background-size: contain;
}
.narcos{
  background: #191818 url("../TV Shows/Narcos.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 60px;
  background-size: contain;
}
.manwithaplan{
  background: #191818 url("../TV Shows/Man with a Plan.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 60px;
  background-size: contain;
}
.onepiece{
  background: #191818 url("../TV Shows/One Piece.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 60px;
  background-size: contain;
}
.onepunchman{
  background: #191818 url("../TV Shows/One Punch Man.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 60px;
  background-size: contain;
}
.siliconvalley{
  background: #191818 url("../TV Shows/Silicon Valley.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 60px;
  background-size: contain;
}
.suits{
  background: #191818 url("../TV Shows/Suits.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 30px;
  background-size: contain;
}
.themusketeers{
  background: #191818 url("../TV Shows/The Musketeers.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 30px;
  background-size: contain;
}
.supernatural{
  background: #191818 url("../TV Shows/Supernatural.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 30px;
  background-size: contain;
}
.themusketeers{
  background: #191818 url("../TV Shows/The Musketeers.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 30px;
  background-size: contain;
}
.vixen{
  background: #191818 url("../TV Shows/Vixen.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 50px;
  background-size: contain;
}
.whitecollar{
  background: #191818 url("../TV Shows/White Collar.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position-x: right;
  background-position-y: 40px;
  background-size: contain;
}
.episodescroll {
      max-width: 700px;
      height: 200px;
      overflow-y: scroll; /* showing scrollbars */
      border: 10px dashed white;
      border-right-width: 0px;
      background-color: black;
}

.button {
  border-radius: 50%;
  position: fixed;
  top:1.5%;
  left:90%;
  background-color: #555555;
  border: none;
  color: white;
  padding: 5px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 5px -25px;
  cursor: pointer;
} /* Gray */

.button:hover {
    background-color: white;
    color: black;
}
.button:active {
  background-color: white;
  box-shadow: 0 5px #666;
  transform: translateY(4px);
}


text:
```ucm:hide
.> builtins.merge
```

Types needs to be prefixed with either `unique` or `structural`:

```unison:error
type Abc = Abc
```

Abilities needs to be prefixed with either `unique` or `structural`:

```unison:error
ability MyAbility where const : a
```

There should be no errors when `unique` or `structural` is provided:

```unison
structural type AbcS = AbcS
unique type AbcU = AbcU
structural ability MyAbilityS where const : a
unique ability MyAbilityU where const : a
```


text:
<button type="button" class="vclButton">

    No pointer influence

</button>

<button type="button" class="vclButton vclHovered">

    Hovered

</button>

<button type="button" class="vclButton vclPressed">

    Pressed

</button>

<button type="button" class="vclButton vclFocused">

    Focused

</button>

<button type="button" class="vclButton vclActive">

    Active

</button>


text:
import { Component, OnDestroy, OnInit } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { FormControl, FormGroup } from '@angular/forms'
import { Story } from 'core/lb-services'
import { StoreService } from 'core/store.service'

@Component({
  selector: 'edit-story',
  styleUrls: [
    './edit-story.scss'
  ],
  templateUrl: './edit-story.html'
})

export class EditStoryComponent implements OnDestroy, OnInit {
  projects = []
  gitServers = []
  privateKeys = []
  sub: any
  type: string
  stories = []
  form: FormGroup = new FormGroup({
    _id: new FormControl(),
    branch: new FormControl(),
    name: new FormControl(),
    project: new FormControl(),
    privateKey: new FormControl(),
    gitServer: new FormControl(),
    organization: new FormControl(),
    repository: new FormControl(),
    stories: new FormControl(),
    sharedWith: new FormControl()
  })

  constructor(
    private route: ActivatedRoute,
    private router: Router,
    private story: Story,
    private store: StoreService
  ) { }

  ngOnDestroy() {
    this.sub.unsubscribe()
  }

  ngOnInit() {
    //loading git servers
    this.loadGitServers()

    //loading private keys
    this.loadPrivateKeys()

    //loading projects
    this.loadProjects()

    this.sub = this.route.params.subscribe(params => {
      const _id = params['_id']
      if (_id === 'new') {
        this.type = 'New'
      } else {
        this.type = 'Edit'
        this.store.read('story').subscribe((stories) => {
          const story = stories && stories.find((it) => it._id === _id)
          if (story) {
            this.form.patchValue(story)
          }
        })
      }
    })
  }

  loadGitServers() {
    this.store.read('gitserver').subscribe(gitServers => {
      this.gitServers = gitServers
    })
  }

  loadPrivateKeys() {
    this.store.read('privatekey').subscribe(privateKeys => {
      this.privateKeys = privateKeys
    })
  }

  loadProjects() {
    this.store.read('project').subscribe((projects) => {
      this.projects = projects
    })
  }

  save() {
    console.log('story', this.form.value)
    if (this.form.get('_id').value) {
      this.story.updateAttributes(this.form.get('_id').value, this.form.value).subscribe((res) => {
        this.store.update('story', this.form.value)
        this.router.navigate(['/project-management/stories'])
      })
    } else {
      this.story.create(this.form.value).subscribe((res) => {
        console.log('res...', res)
        this.store.create('story', res)
        this.router.navigate(['/project-management/stories'])
      })
    }
  }
}


text:
#include <metal/io.h>
#include <openamp/rsc_table_parser.h>

static int handle_dummy_rsc(struct remoteproc *rproc, void *rsc);

/* Resources handler */
rsc_handler rsc_handler_table[] = {
	handle_carve_out_rsc, /**< carved out resource */
	handle_dummy_rsc, /**< IOMMU dev mem resource */
	handle_trace_rsc, /**< trace buffer resource */
	handle_vdev_rsc, /**< virtio resource */
	handle_dummy_rsc, /**< rproc shared memory resource */
	handle_dummy_rsc, /**< firmware checksum resource */
};

int handle_rsc_table(struct remoteproc *rproc,
		     struct resource_table *rsc_table, int size,
		     struct metal_io_region *io)
{
	char *rsc_start;
	unsigned int rsc_type;
	unsigned int idx, offset;
	int status = 0;

	/* Validate rsc table header fields */

	/* Minimum rsc table size */
	if (sizeof(struct resource_table) > (unsigned int)size) {
		return -RPROC_ERR_RSC_TAB_TRUNC;
	}

	/* Supported version */
	if (rsc_table->ver != RSC_TAB_SUPPORTED_VERSION) {
		return -RPROC_ERR_RSC_TAB_VER;
	}

	/* Offset array */
	offset = sizeof(struct resource_table)
		 + rsc_table->num * sizeof(rsc_table->offset[0]);

	if (offset > (unsigned int)size) {
		return -RPROC_ERR_RSC_TAB_TRUNC;
	}

	/* Reserved fields - must be zero */
	if ((rsc_table->reserved[0] != 0 || rsc_table->reserved[1]) != 0) {
		return -RPROC_ERR_RSC_TAB_RSVD;
	}

	/* Loop through the offset array and parse each resource entry */
	for (idx = 0; idx < rsc_table->num; idx++) {
		rsc_start = (char *)rsc_table;
		rsc_start += rsc_table->offset[idx];
		if (io &&
		    metal_io_virt_to_offset(io, rsc_start) == METAL_BAD_OFFSET)
			return -RPROC_ERR_RSC_TAB_TRUNC;
		rsc_type = *((uint32_t *)rsc_start);
		if (rsc_type < RSC_LAST)
			status = rsc_handler_table[rsc_type](rproc,
							     rsc_start);
		else if (rsc_type >= RSC_VENDOR_START &&
			 rsc_type <= RSC_VENDOR_END)
			status = handle_vendor_rsc(rproc, rsc_start);
		if (status == -RPROC_ERR_RSC_TAB_NS) {
			status = 0;
			continue;
		}
		else if (status)
			break;
	}

	return status;
}

/**
 * handle_carve_out_rsc
 *
 * Carveout resource handler.
 *
 * @param rproc - pointer to remote remoteproc
 * @param rsc   - pointer to carveout resource
 *
 * @returns - 0 for success, or negative value for failure
 *
 */
int handle_carve_out_rsc(struct remoteproc *rproc, void *rsc)
{
	struct fw_rsc_carveout *carve_rsc = (struct fw_rsc_carveout *)rsc;
	metal_phys_addr_t da;
	metal_phys_addr_t pa;
	size_t size;
	unsigned int attribute;

	/* Validate resource fields */
	if (!carve_rsc) {
		return -RPROC_ERR_RSC_TAB_NP;
	}

	if (carve_rsc->reserved) {
		return -RPROC_ERR_RSC_TAB_RSVD;
	}
	pa = carve_rsc->pa;
	da = carve_rsc->da;
	size = carve_rsc->len;
	attribute = carve_rsc->flags;
	if (remoteproc_mmap(rproc, &pa, &da, size, attribute, NULL))
		return 0;
	else
		return -RPROC_EINVAL;
}

int handle_vendor_rsc(struct remoteproc *rproc, void *rsc)
{
	if (rproc && rproc->ops->handle_rsc) {
		struct fw_rsc_vendor *vend_rsc = rsc;
		size_t len = vend_rsc->len;

		return rproc->ops->handle_rsc(rproc, rsc, len);
	}
	return -RPROC_ERR_RSC_TAB_NS;
}

int handle_vdev_rsc(struct remoteproc *rproc, void *rsc)
{
	struct fw_rsc_vdev *vdev_rsc = (struct fw_rsc_vdev *)rsc;
	unsigned int notifyid, i, num_vrings;

	/* only assign notification IDs but do not initialize vdev */
	notifyid = vdev_rsc->notifyid;
	if (notifyid == RSC_NOTIFY_ID_ANY) {
		notifyid = remoteproc_allocate_id(rproc,
						  notifyid, notifyid + 1);
		vdev_rsc->notifyid = notifyid;
	}

	num_vrings = vdev_rsc->num_of_vrings;
	for (i = 0; i < num_vrings; i++) {
		struct fw_rsc_vdev_vring *vring_rsc;

		vring_rsc = &vdev_rsc->vring[i];
		notifyid = vring_rsc->notifyid;
		if (notifyid == RSC_NOTIFY_ID_ANY) {
			notifyid = remoteproc_allocate_id(rproc,
							  notifyid,
							  notifyid + 1);
			vdev_rsc->notifyid = notifyid;
		}
	}

	return 0;
}

/**
 * handle_trace_rsc
 *
 * trace resource handler.
 *
 * @param rproc - pointer to remote remoteproc
 * @param rsc   - pointer to trace resource
 *
 * @returns - no service error
 *
 */
int handle_trace_rsc(struct remoteproc *rproc, void *rsc)
{
	struct fw_rsc_trace *vdev_rsc = (struct fw_rsc_trace *)rsc;
	(void)rproc;

	if (vdev_rsc->da != FW_RSC_U32_ADDR_ANY && vdev_rsc->len != 0)
		return 0;
	/* FIXME: master should allocated a memory used by slave */

	return -RPROC_ERR_RSC_TAB_NS;
}

/**
 * handle_dummy_rsc
 *
 * dummy resource handler.
 *
 * @param rproc - pointer to remote remoteproc
 * @param rsc   - pointer to trace resource
 *
 * @returns - no service error
 *
 */
static int handle_dummy_rsc(struct remoteproc *rproc, void *rsc)
{
	(void)rproc;
	(void)rsc;

	return -RPROC_ERR_RSC_TAB_NS;
}

size_t find_rsc(void *rsc_table, unsigned int rsc_type, unsigned int index)
{
	struct resource_table *r_table = rsc_table;
	unsigned int i, rsc_index;
	unsigned int lrsc_type;
	char *rsc_start;

	metal_assert(r_table);
	/* Loop through the offset array and parse each resource entry */
	rsc_index = 0;
	for (i = 0; i < r_table->num; i++) {
		rsc_start = (char *)r_table;
		rsc_start += r_table->offset[i];
		lrsc_type = *((uint32_t *)rsc_start);
		if (lrsc_type == rsc_type) {
			if (rsc_index++ == index)
				return r_table->offset[i];
		}
	}
	return 0;
}


text:
/*!
 * \file   blob.h
 * \brief  Blob is a simple structure that contains a length and a pointer to an
 * external array,
 */
#pragma once
#include <cstring>
#include <type_traits>
#include "ps/base.h"
#if USE_EIGEN
#include "Eigen/src/Core/Map.h"
#include "Eigen/src/Core/Array.h"
#endif  // DMLC_USE_EIGEN

namespace ps {

/**
 * \brief Binary Large OBject
 *
 * Blob is a simple structure
 * containing a pointer into some external storage and a size. The user of a
 * Blob must ensure that the blob is not used after the corresponding external
 * storage has been deallocated.
 *
 * \tparam T the date type
 */
template <typename T>
struct Blob {
  T* data;
  size_t size;

  /*! \brief Create an empty blob */
  Blob() : data(NULL), size(0) { }

  /*! \brief Create a blob from a pointer */
  Blob(T* d, size_t s) : data(d), size(s) { }

  /*! \brief Create a blob from std::vector */
  Blob(const std::vector<typename std::remove_cv<T>::type>& v)
      : data(v.data()), size(v.size()) { }
  Blob(std::vector<T>* v) : data(v->data()), size(v->size()) { }

  inline T& operator[] (size_t n) const {
    CHECK_LT(n, size);
    return data[n];
  }

  T* begin() { return data; }
  T* end() { return data+size; }

  /*! \brief Slics a segment [begin, end) */
  Blob Slice(size_t begin, size_t end) const {
    CHECK_LE(begin, end); CHECK_LE(end, size);
    return Blob(data+begin, end-begin);
  }

#if USE_EIGEN
  typedef Eigen::Map<
    Eigen::Array<T, Eigen::Dynamic, 1> > EigenArrayMap;
  /*! \brief Return a size() by 1 Eigen3 Array */
  EigenArrayMap EigenArray() const {
    return EigenArrayMap(data, size);
  }

  typedef Eigen::Map<
    const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> > EigenMatrixMap;
  /*! \brief Return a size()/k by k Eigen3 Matrix */
  EigenMatrixMap EigenMatrix(int k = 1) const {
    CHECK_EQ(size % k, 0);
    return EigenMatrixMap(data, size / k, k);
  }
#endif  // USE_EIGEN

  /**
   * \brief Returns the m head and m tail element as string
   */
  std::string ShortDebugString(size_t m = 5) const {
    return DebugStr(data, size);
  }
};

/// \brief for debug use
template <typename T>
std::ostream& operator<<(std::ostream& os, const Blob<T>& obj) {
  os << obj.ShortDebugString(); return os;
}

}  // namespace ps


text:
class LoginController < ApplicationController

  before_filter :authorize, :except => :login

  layout "admin"

  def index
    @total_orders = Order.count
    @products = Product.find(:all)
  end

  # just display the form and wait for user to
  # enter a name and password

  def login
    session[:user_id] = nil
    if request.post?
      user = User.authenticate(params[:name], params[:password])
      if user
        session[:user_id] = user.id
        redirect_to(:action => "index")
      else
        flash.now[:notice] = "Invalid user/password combination"
      end
    end
  end

  def add_user
    @user = User.new(params[:user])
    if request.post? and @user.save
      flash.now[:notice] = "User #{@user.name} created"
      @user = User.new
    end
  end

  def delete_user
    if request.post?
      user = User.find(params[:id])
      begin
        user.destroy
        flash[:notice] = "User #{user.name} deleted"
      rescue Exception => e
        flash[:notice] = e.message
      end
    end
    redirect_to(:action => :list_users)
  end

  def list_users
    @all_users = User.find(:all)
  end

  def logout
    session[:user_id] = nil
    flash[:notice] = "Logged out"
    redirect_to(:action => "login")
  end
end


text:
using Dnn.PersonaBar.Library.Prompt.Attributes;

namespace Dnn.PersonaBar.Prompt.Components.Commands.Portal
{
    /// <summary>
    /// alias for get-portal
    /// </summary>
    [ConsoleCommand("get-site", Constants.PortalCategory, "Prompt_GetSite_Description")]
    public class GetSite : GetPortal
    {
    }
}


text:
package jetbrains.jetpad.model.composite;

import java.util.*;

public class TreePath<CompositeT extends Composite<CompositeT>> implements Comparable<TreePath<CompositeT>> {

  public static <CompositeT extends Composite<CompositeT>> void sort(List<? extends CompositeT> composites) {
    final Map<CompositeT, TreePath<CompositeT>> paths = new HashMap<>();
    for (CompositeT composite : composites) {
      paths.put(composite, new TreePath<>(composite));
    }
    Collections.sort(composites, new Comparator<CompositeT>() {
      @Override
      public int compare(CompositeT composite1, CompositeT composite2) {
        return paths.get(composite1).compareTo(paths.get(composite2));
      }
    });
  }

  public static <CompositeT extends Composite<CompositeT>> TreePath<CompositeT> deserialize(String text) {
    if (text.isEmpty()) {
      return new TreePath<>(Collections.<Integer>emptyList());
    }
    String[] split = text.split(",");
    List<Integer> path = new ArrayList<>(split.length);
    for (String p : split) {
      try {
        path.add(Integer.parseInt(p));
      } catch (NumberFormatException e) {
        throw new IllegalArgumentException("Failed to parse TreePath: " + text, e);
      }
    }
    return new TreePath<>(path);
  }

  private List<Integer> myPath = new ArrayList<>();

  public TreePath(CompositeT composite) {
    this(composite, null);
  }

  public TreePath(CompositeT from, CompositeT to) {
    CompositeT current = from;
    while (current != null && current != to) {
      CompositeT parent = current.getParent();
      if (parent != null) {
        int index = parent.children().indexOf(current);
        if (index == -1) {
          throw new IllegalStateException();
        }
        myPath.add(index);
      }
      current = parent;
    }
    if (current != to) {
      throw new IllegalStateException();
    }
    Collections.reverse(myPath);
  }

  private TreePath(List<Integer> path) {
    myPath.addAll(path);
  }

  public CompositeT get(CompositeT root) {
    if (!isValid(root)) {
      throw new IllegalStateException("Invalid context");
    }

    CompositeT current = root;
    for (Integer i : myPath) {
      current = current.children().get(i);
    }
    return current;
  }

  public boolean isValid(CompositeT root) {
    CompositeT current = root;
    for (Integer i : myPath) {
      List<CompositeT> children = current.children();
      if (i >= children.size()) {
        return false;
      }
      current = children.get(i);
    }
    return true;
  }

  public boolean isEmpty() {
    return myPath.isEmpty();
  }

  public int getLastIndex() {
    if (myPath.isEmpty()) {
      throw new IllegalStateException();
    }
    return myPath.get(myPath.size() - 1);
  }

  public TreePath<CompositeT> getParent() {
    if (myPath.isEmpty()) {
      throw new IllegalStateException();
    }

    return new TreePath<>(myPath.subList(0, myPath.size() - 1));
  }

  public TreePath<CompositeT> getChild(int index) {
    List<Integer> newPath = new ArrayList<>();
    newPath.addAll(myPath);
    newPath.add(index);
    return new TreePath<>(newPath);
  }

  public String serialize() {
    StringBuilder sb = new StringBuilder();
    boolean first = true;
    for (int p : myPath) {
      if (!first) {
        sb.append(',');
      }
      sb.append(p);
      first = false;
    }
    return sb.toString();
  }

  @Override
  public boolean equals(Object o) {
    if (!(o instanceof TreePath)) return false;
    TreePath<?> path = (TreePath<?>) o;
    return myPath.equals(path.myPath);
  }

  @Override
  public int hashCode() {
    return myPath.hashCode();
  }

  @Override
  public int compareTo(TreePath<CompositeT> o) {
    int maxIndex = Math.min(myPath.size(), o.myPath.size());
    for (int i = 0; i < maxIndex; i++) {
      int delta = myPath.get(i) - o.myPath.get(i);
      if (delta != 0) return delta;
    }
    return myPath.size() - o.myPath.size();
  }

  @Override
  public String toString() {
    return myPath.toString();
  }
}


text:
const int MAX_RESERVED_WORDS = 30;

class THistoryFormClass : public TForm
{
__published:	// IDE-managed Components
	TRzPanel *HistoryPanel;
	TRzSpacer *TopSpacer;
	TRzSpacer *MiddleSpacer;
	TRzSpacer *LeftSpacer;
	TRzSpacer *RightSpacer;
	TRzPanel *HeaderPanel;
	TRzPanel *TopPanel;
	TRzLabel *CloseLabel;
	TRzLabel *HistoryLabel;
	TImage *HistoryImage;
	TRzSpacer *BottomSpacer;
	TImage *CloseImage;
	TRzPanel *LeftPanel;
	TRzLabel *ClearLabel;
	TRzLabel *HelpLabel;
	TImage *HelpImage;
	TImage *ClearImage;
	TImage *ShowImage;
	TRzLabel *ShowLabel;
	TRzSpacer *RzSpacer4;
	TRzSpacer *RzSpacer5;
	TRzSpacer *RzSpacer6;
	TRzPanel *TreePanel;
	TRzTreeView *CardTreeView;
	TRzTreeView *QueryTreeView;
	TPopupMenu *QueryMenu;
	TMenuItem *QuerySaveMenuItem;
	TMenuItem *QueryClearMenuItem;
	TSaveDialog *SaveDialog;
	TRzPanel *LabelPanel;
	TRzToolButton *QueryButton;
	TRzToolButton *CardButton;
	void __fastcall HelpImageMouseEnter(TObject *Sender);
	void __fastcall HelpLabelClick(TObject *Sender);
	void __fastcall ClearLabelClick(TObject *Sender);
	void __fastcall HelpLabelMouseLeave(TObject *Sender);
	void __fastcall ClearLabelMouseEnter(TObject *Sender);
	void __fastcall ShowLabelMouseEnter(TObject *Sender);
	void __fastcall CloseLabelMouseEnter(TObject *Sender);
	void __fastcall CloseLabelClick(TObject *Sender);
	void __fastcall TopPanelMouseMove(TObject *Sender, TShiftState Shift, int X,
          int Y);
	void __fastcall TopPanelMouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
	void __fastcall TopPanelMouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
	void __fastcall FormShow(TObject *Sender);
	void __fastcall FormActivate(TObject *Sender);
	void __fastcall TranslateImageClick(TObject *Sender);
	void __fastcall QueryClearMenuItemClick(TObject *Sender);
	void __fastcall QuerySaveMenuItemClick(TObject *Sender);
	void __fastcall QueryButtonMouseEnter(TObject *Sender);
	void __fastcall QueryButtonMouseLeave(TObject *Sender);
	void __fastcall QueryButtonClick(TObject *Sender);
	void __fastcall CardButtonClick(TObject *Sender);
private:	// User declarations
	TTreeNode *rootNode, *rootNodeCard;
	TFont *PFont;
	bool bottonPressed;
	int prevX, prevY;
	void changeStyle();
	void delete_node_if_exists(TTreeNode*, const AnsiString&);
	void __fastcall SetLinkCursor(TControl *Control);
public:		// User declarations
	__fastcall THistoryFormClass(TComponent* Owner);
	void insertWord(const AnsiString&);
	void insertToCardList(const AnsiString&);
	void saveHistory(TDataFile*);
	void readHistory(TDataFile*);
};
//---------------------------------------------------------------------------
extern PACKAGE THistoryFormClass *HistoryFormClass;
//---------------------------------------------------------------------------
#endif