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

#ifndef PROTOBUF_google_2fapi_2fdocumentation_2eproto__INCLUDED
#define PROTOBUF_google_2fapi_2fdocumentation_2eproto__INCLUDED

#include <string>

#include <google/protobuf/stubs/common.h>

#if GOOGLE_PROTOBUF_VERSION < 3001000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers.  Please update
#error your headers.
#endif
#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers.  Please
#error regenerate this file with a newer version of protoc.
#endif

#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/metadata.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)

namespace google {
namespace api {

// Internal implementation detail -- do not call these.
void protobuf_AddDesc_google_2fapi_2fdocumentation_2eproto();
void protobuf_InitDefaults_google_2fapi_2fdocumentation_2eproto();
void protobuf_AssignDesc_google_2fapi_2fdocumentation_2eproto();
void protobuf_ShutdownFile_google_2fapi_2fdocumentation_2eproto();

class Documentation;
class DocumentationRule;
class Page;

// ===================================================================

class Documentation : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.api.Documentation) */ {
 public:
  Documentation();
  virtual ~Documentation();

  Documentation(const Documentation& from);

  inline Documentation& operator=(const Documentation& from) {
    CopyFrom(from);
    return *this;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const Documentation& default_instance();

  static const Documentation* internal_default_instance();

  void Swap(Documentation* other);

  // implements Message ----------------------------------------------

  inline Documentation* New() const { return New(NULL); }

  Documentation* New(::google::protobuf::Arena* arena) const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const Documentation& from);
  void MergeFrom(const Documentation& from);
  void Clear();
  bool IsInitialized() const;

  size_t ByteSizeLong() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
    return InternalSerializeWithCachedSizesToArray(false, output);
  }
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  void InternalSwap(Documentation* other);
  void UnsafeMergeFrom(const Documentation& from);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return _internal_metadata_.arena();
  }
  inline void* MaybeArenaPtr() const {
    return _internal_metadata_.raw_arena_ptr();
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional string summary = 1;
  void clear_summary();
  static const int kSummaryFieldNumber = 1;
  const ::std::string& summary() const;
  void set_summary(const ::std::string& value);
  void set_summary(const char* value);
  void set_summary(const char* value, size_t size);
  ::std::string* mutable_summary();
  ::std::string* release_summary();
  void set_allocated_summary(::std::string* summary);

  // repeated .google.api.Page pages = 5;
  int pages_size() const;
  void clear_pages();
  static const int kPagesFieldNumber = 5;
  const ::google::api::Page& pages(int index) const;
  ::google::api::Page* mutable_pages(int index);
  ::google::api::Page* add_pages();
  ::google::protobuf::RepeatedPtrField< ::google::api::Page >*
      mutable_pages();
  const ::google::protobuf::RepeatedPtrField< ::google::api::Page >&
      pages() const;

  // repeated .google.api.DocumentationRule rules = 3;
  int rules_size() const;
  void clear_rules();
  static const int kRulesFieldNumber = 3;
  const ::google::api::DocumentationRule& rules(int index) const;
  ::google::api::DocumentationRule* mutable_rules(int index);
  ::google::api::DocumentationRule* add_rules();
  ::google::protobuf::RepeatedPtrField< ::google::api::DocumentationRule >*
      mutable_rules();
  const ::google::protobuf::RepeatedPtrField< ::google::api::DocumentationRule >&
      rules() const;

  // optional string documentation_root_url = 4;
  void clear_documentation_root_url();
  static const int kDocumentationRootUrlFieldNumber = 4;
  const ::std::string& documentation_root_url() const;
  void set_documentation_root_url(const ::std::string& value);
  void set_documentation_root_url(const char* value);
  void set_documentation_root_url(const char* value, size_t size);
  ::std::string* mutable_documentation_root_url();
  ::std::string* release_documentation_root_url();
  void set_allocated_documentation_root_url(::std::string* documentation_root_url);

  // optional string overview = 2;
  void clear_overview();
  static const int kOverviewFieldNumber = 2;
  const ::std::string& overview() const;
  void set_overview(const ::std::string& value);
  void set_overview(const char* value);
  void set_overview(const char* value, size_t size);
  ::std::string* mutable_overview();
  ::std::string* release_overview();
  void set_allocated_overview(::std::string* overview);

  // @@protoc_insertion_point(class_scope:google.api.Documentation)
 private:

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::RepeatedPtrField< ::google::api::Page > pages_;
  ::google::protobuf::RepeatedPtrField< ::google::api::DocumentationRule > rules_;
  ::google::protobuf::internal::ArenaStringPtr summary_;
  ::google::protobuf::internal::ArenaStringPtr documentation_root_url_;
  ::google::protobuf::internal::ArenaStringPtr overview_;
  mutable int _cached_size_;
  friend void  protobuf_InitDefaults_google_2fapi_2fdocumentation_2eproto_impl();
  friend void  protobuf_AddDesc_google_2fapi_2fdocumentation_2eproto_impl();
  friend void protobuf_AssignDesc_google_2fapi_2fdocumentation_2eproto();
  friend void protobuf_ShutdownFile_google_2fapi_2fdocumentation_2eproto();

  void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<Documentation> Documentation_default_instance_;

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

class DocumentationRule : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.api.DocumentationRule) */ {
 public:
  DocumentationRule();
  virtual ~DocumentationRule();

  DocumentationRule(const DocumentationRule& from);

  inline DocumentationRule& operator=(const DocumentationRule& from) {
    CopyFrom(from);
    return *this;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const DocumentationRule& default_instance();

  static const DocumentationRule* internal_default_instance();

  void Swap(DocumentationRule* other);

  // implements Message ----------------------------------------------

  inline DocumentationRule* New() const { return New(NULL); }

  DocumentationRule* New(::google::protobuf::Arena* arena) const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const DocumentationRule& from);
  void MergeFrom(const DocumentationRule& from);
  void Clear();
  bool IsInitialized() const;

  size_t ByteSizeLong() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
    return InternalSerializeWithCachedSizesToArray(false, output);
  }
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  void InternalSwap(DocumentationRule* other);
  void UnsafeMergeFrom(const DocumentationRule& from);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return _internal_metadata_.arena();
  }
  inline void* MaybeArenaPtr() const {
    return _internal_metadata_.raw_arena_ptr();
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional string selector = 1;
  void clear_selector();
  static const int kSelectorFieldNumber = 1;
  const ::std::string& selector() const;
  void set_selector(const ::std::string& value);
  void set_selector(const char* value);
  void set_selector(const char* value, size_t size);
  ::std::string* mutable_selector();
  ::std::string* release_selector();
  void set_allocated_selector(::std::string* selector);

  // optional string description = 2;
  void clear_description();
  static const int kDescriptionFieldNumber = 2;
  const ::std::string& description() const;
  void set_description(const ::std::string& value);
  void set_description(const char* value);
  void set_description(const char* value, size_t size);
  ::std::string* mutable_description();
  ::std::string* release_description();
  void set_allocated_description(::std::string* description);

  // optional string deprecation_description = 3;
  void clear_deprecation_description();
  static const int kDeprecationDescriptionFieldNumber = 3;
  const ::std::string& deprecation_description() const;
  void set_deprecation_description(const ::std::string& value);
  void set_deprecation_description(const char* value);
  void set_deprecation_description(const char* value, size_t size);
  ::std::string* mutable_deprecation_description();
  ::std::string* release_deprecation_description();
  void set_allocated_deprecation_description(::std::string* deprecation_description);

  // @@protoc_insertion_point(class_scope:google.api.DocumentationRule)
 private:

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::internal::ArenaStringPtr selector_;
  ::google::protobuf::internal::ArenaStringPtr description_;
  ::google::protobuf::internal::ArenaStringPtr deprecation_description_;
  mutable int _cached_size_;
  friend void  protobuf_InitDefaults_google_2fapi_2fdocumentation_2eproto_impl();
  friend void  protobuf_AddDesc_google_2fapi_2fdocumentation_2eproto_impl();
  friend void protobuf_AssignDesc_google_2fapi_2fdocumentation_2eproto();
  friend void protobuf_ShutdownFile_google_2fapi_2fdocumentation_2eproto();

  void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<DocumentationRule> DocumentationRule_default_instance_;

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

class Page : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.api.Page) */ {
 public:
  Page();
  virtual ~Page();

  Page(const Page& from);

  inline Page& operator=(const Page& from) {
    CopyFrom(from);
    return *this;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const Page& default_instance();

  static const Page* internal_default_instance();

  void Swap(Page* other);

  // implements Message ----------------------------------------------

  inline Page* New() const { return New(NULL); }

  Page* New(::google::protobuf::Arena* arena) const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const Page& from);
  void MergeFrom(const Page& from);
  void Clear();
  bool IsInitialized() const;

  size_t ByteSizeLong() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
    return InternalSerializeWithCachedSizesToArray(false, output);
  }
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  void InternalSwap(Page* other);
  void UnsafeMergeFrom(const Page& from);
  private:
  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
    return _internal_metadata_.arena();
  }
  inline void* MaybeArenaPtr() const {
    return _internal_metadata_.raw_arena_ptr();
  }
  public:

  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional string name = 1;
  void clear_name();
  static const int kNameFieldNumber = 1;
  const ::std::string& name() const;
  void set_name(const ::std::string& value);
  void set_name(const char* value);
  void set_name(const char* value, size_t size);
  ::std::string* mutable_name();
  ::std::string* release_name();
  void set_allocated_name(::std::string* name);

  // optional string content = 2;
  void clear_content();
  static const int kContentFieldNumber = 2;
  const ::std::string& content() const;
  void set_content(const ::std::string& value);
  void set_content(const char* value);
  void set_content(const char* value, size_t size);
  ::std::string* mutable_content();
  ::std::string* release_content();
  void set_allocated_content(::std::string* content);

  // repeated .google.api.Page subpages = 3;
  int subpages_size() const;
  void clear_subpages();
  static const int kSubpagesFieldNumber = 3;
  const ::google::api::Page& subpages(int index) const;
  ::google::api::Page* mutable_subpages(int index);
  ::google::api::Page* add_subpages();
  ::google::protobuf::RepeatedPtrField< ::google::api::Page >*
      mutable_subpages();
  const ::google::protobuf::RepeatedPtrField< ::google::api::Page >&
      subpages() const;

  // @@protoc_insertion_point(class_scope:google.api.Page)
 private:

  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  ::google::protobuf::RepeatedPtrField< ::google::api::Page > subpages_;
  ::google::protobuf::internal::ArenaStringPtr name_;
  ::google::protobuf::internal::ArenaStringPtr content_;
  mutable int _cached_size_;
  friend void  protobuf_InitDefaults_google_2fapi_2fdocumentation_2eproto_impl();
  friend void  protobuf_AddDesc_google_2fapi_2fdocumentation_2eproto_impl();
  friend void protobuf_AssignDesc_google_2fapi_2fdocumentation_2eproto();
  friend void protobuf_ShutdownFile_google_2fapi_2fdocumentation_2eproto();

  void InitAsDefaultInstance();
};
extern ::google::protobuf::internal::ExplicitlyConstructed<Page> Page_default_instance_;

// ===================================================================

// ===================================================================

#if !PROTOBUF_INLINE_NOT_IN_HEADERS
// Documentation

// optional string summary = 1;
inline void Documentation::clear_summary() {
  summary_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline const ::std::string& Documentation::summary() const {
  // @@protoc_insertion_point(field_get:google.api.Documentation.summary)
  return summary_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void Documentation::set_summary(const ::std::string& value) {

  summary_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:google.api.Documentation.summary)
}
inline void Documentation::set_summary(const char* value) {

  summary_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:google.api.Documentation.summary)
}
inline void Documentation::set_summary(const char* value, size_t size) {

  summary_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:google.api.Documentation.summary)
}
inline ::std::string* Documentation::mutable_summary() {

  // @@protoc_insertion_point(field_mutable:google.api.Documentation.summary)
  return summary_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* Documentation::release_summary() {
  // @@protoc_insertion_point(field_release:google.api.Documentation.summary)

  return summary_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void Documentation::set_allocated_summary(::std::string* summary) {
  if (summary != NULL) {

  } else {

  }
  summary_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), summary);
  // @@protoc_insertion_point(field_set_allocated:google.api.Documentation.summary)
}

// repeated .google.api.Page pages = 5;
inline int Documentation::pages_size() const {
  return pages_.size();
}
inline void Documentation::clear_pages() {
  pages_.Clear();
}
inline const ::google::api::Page& Documentation::pages(int index) const {
  // @@protoc_insertion_point(field_get:google.api.Documentation.pages)
  return pages_.Get(index);
}
inline ::google::api::Page* Documentation::mutable_pages(int index) {
  // @@protoc_insertion_point(field_mutable:google.api.Documentation.pages)
  return pages_.Mutable(index);
}
inline ::google::api::Page* Documentation::add_pages() {
  // @@protoc_insertion_point(field_add:google.api.Documentation.pages)
  return pages_.Add();
}
inline ::google::protobuf::RepeatedPtrField< ::google::api::Page >*
Documentation::mutable_pages() {
  // @@protoc_insertion_point(field_mutable_list:google.api.Documentation.pages)
  return &pages_;
}
inline const ::google::protobuf::RepeatedPtrField< ::google::api::Page >&
Documentation::pages() const {
  // @@protoc_insertion_point(field_list:google.api.Documentation.pages)
  return pages_;
}

// repeated .google.api.DocumentationRule rules = 3;
inline int Documentation::rules_size() const {
  return rules_.size();
}
inline void Documentation::clear_rules() {
  rules_.Clear();
}
inline const ::google::api::DocumentationRule& Documentation::rules(int index) const {
  // @@protoc_insertion_point(field_get:google.api.Documentation.rules)
  return rules_.Get(index);
}
inline ::google::api::DocumentationRule* Documentation::mutable_rules(int index) {
  // @@protoc_insertion_point(field_mutable:google.api.Documentation.rules)
  return rules_.Mutable(index);
}
inline ::google::api::DocumentationRule* Documentation::add_rules() {
  // @@protoc_insertion_point(field_add:google.api.Documentation.rules)
  return rules_.Add();
}
inline ::google::protobuf::RepeatedPtrField< ::google::api::DocumentationRule >*
Documentation::mutable_rules() {
  // @@protoc_insertion_point(field_mutable_list:google.api.Documentation.rules)
  return &rules_;
}
inline const ::google::protobuf::RepeatedPtrField< ::google::api::DocumentationRule >&
Documentation::rules() const {
  // @@protoc_insertion_point(field_list:google.api.Documentation.rules)
  return rules_;
}

// optional string documentation_root_url = 4;
inline void Documentation::clear_documentation_root_url() {
  documentation_root_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline const ::std::string& Documentation::documentation_root_url() const {
  // @@protoc_insertion_point(field_get:google.api.Documentation.documentation_root_url)
  return documentation_root_url_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void Documentation::set_documentation_root_url(const ::std::string& value) {

  documentation_root_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:google.api.Documentation.documentation_root_url)
}
inline void Documentation::set_documentation_root_url(const char* value) {

  documentation_root_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:google.api.Documentation.documentation_root_url)
}
inline void Documentation::set_documentation_root_url(const char* value, size_t size) {

  documentation_root_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:google.api.Documentation.documentation_root_url)
}
inline ::std::string* Documentation::mutable_documentation_root_url() {

  // @@protoc_insertion_point(field_mutable:google.api.Documentation.documentation_root_url)
  return documentation_root_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* Documentation::release_documentation_root_url() {
  // @@protoc_insertion_point(field_release:google.api.Documentation.documentation_root_url)

  return documentation_root_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void Documentation::set_allocated_documentation_root_url(::std::string* documentation_root_url) {
  if (documentation_root_url != NULL) {

  } else {

  }
  documentation_root_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), documentation_root_url);
  // @@protoc_insertion_point(field_set_allocated:google.api.Documentation.documentation_root_url)
}

// optional string overview = 2;
inline void Documentation::clear_overview() {
  overview_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline const ::std::string& Documentation::overview() const {
  // @@protoc_insertion_point(field_get:google.api.Documentation.overview)
  return overview_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void Documentation::set_overview(const ::std::string& value) {

  overview_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:google.api.Documentation.overview)
}
inline void Documentation::set_overview(const char* value) {

  overview_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:google.api.Documentation.overview)
}
inline void Documentation::set_overview(const char* value, size_t size) {

  overview_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:google.api.Documentation.overview)
}
inline ::std::string* Documentation::mutable_overview() {

  // @@protoc_insertion_point(field_mutable:google.api.Documentation.overview)
  return overview_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* Documentation::release_overview() {
  // @@protoc_insertion_point(field_release:google.api.Documentation.overview)

  return overview_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void Documentation::set_allocated_overview(::std::string* overview) {
  if (overview != NULL) {

  } else {

  }
  overview_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), overview);
  // @@protoc_insertion_point(field_set_allocated:google.api.Documentation.overview)
}

inline const Documentation* Documentation::internal_default_instance() {
  return &Documentation_default_instance_.get();
}
// -------------------------------------------------------------------

// DocumentationRule

// optional string selector = 1;
inline void DocumentationRule::clear_selector() {
  selector_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline const ::std::string& DocumentationRule::selector() const {
  // @@protoc_insertion_point(field_get:google.api.DocumentationRule.selector)
  return selector_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void DocumentationRule::set_selector(const ::std::string& value) {

  selector_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:google.api.DocumentationRule.selector)
}
inline void DocumentationRule::set_selector(const char* value) {

  selector_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:google.api.DocumentationRule.selector)
}
inline void DocumentationRule::set_selector(const char* value, size_t size) {

  selector_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:google.api.DocumentationRule.selector)
}
inline ::std::string* DocumentationRule::mutable_selector() {

  // @@protoc_insertion_point(field_mutable:google.api.DocumentationRule.selector)
  return selector_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* DocumentationRule::release_selector() {
  // @@protoc_insertion_point(field_release:google.api.DocumentationRule.selector)

  return selector_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void DocumentationRule::set_allocated_selector(::std::string* selector) {
  if (selector != NULL) {

  } else {

  }
  selector_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), selector);
  // @@protoc_insertion_point(field_set_allocated:google.api.DocumentationRule.selector)
}

// optional string description = 2;
inline void DocumentationRule::clear_description() {
  description_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline const ::std::string& DocumentationRule::description() const {
  // @@protoc_insertion_point(field_get:google.api.DocumentationRule.description)
  return description_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void DocumentationRule::set_description(const ::std::string& value) {

  description_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:google.api.DocumentationRule.description)
}
inline void DocumentationRule::set_description(const char* value) {

  description_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:google.api.DocumentationRule.description)
}
inline void DocumentationRule::set_description(const char* value, size_t size) {

  description_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:google.api.DocumentationRule.description)
}
inline ::std::string* DocumentationRule::mutable_description() {

  // @@protoc_insertion_point(field_mutable:google.api.DocumentationRule.description)
  return description_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* DocumentationRule::release_description() {
  // @@protoc_insertion_point(field_release:google.api.DocumentationRule.description)

  return description_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void DocumentationRule::set_allocated_description(::std::string* description) {
  if (description != NULL) {

  } else {

  }
  description_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), description);
  // @@protoc_insertion_point(field_set_allocated:google.api.DocumentationRule.description)
}

// optional string deprecation_description = 3;
inline void DocumentationRule::clear_deprecation_description() {
  deprecation_description_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline const ::std::string& DocumentationRule::deprecation_description() const {
  // @@protoc_insertion_point(field_get:google.api.DocumentationRule.deprecation_description)
  return deprecation_description_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void DocumentationRule::set_deprecation_description(const ::std::string& value) {

  deprecation_description_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:google.api.DocumentationRule.deprecation_description)
}
inline void DocumentationRule::set_deprecation_description(const char* value) {

  deprecation_description_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:google.api.DocumentationRule.deprecation_description)
}
inline void DocumentationRule::set_deprecation_description(const char* value, size_t size) {

  deprecation_description_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:google.api.DocumentationRule.deprecation_description)
}
inline ::std::string* DocumentationRule::mutable_deprecation_description() {

  // @@protoc_insertion_point(field_mutable:google.api.DocumentationRule.deprecation_description)
  return deprecation_description_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* DocumentationRule::release_deprecation_description() {
  // @@protoc_insertion_point(field_release:google.api.DocumentationRule.deprecation_description)

  return deprecation_description_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void DocumentationRule::set_allocated_deprecation_description(::std::string* deprecation_description) {
  if (deprecation_description != NULL) {

  } else {

  }
  deprecation_description_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), deprecation_description);
  // @@protoc_insertion_point(field_set_allocated:google.api.DocumentationRule.deprecation_description)
}

inline const DocumentationRule* DocumentationRule::internal_default_instance() {
  return &DocumentationRule_default_instance_.get();
}
// -------------------------------------------------------------------

// Page

// optional string name = 1;
inline void Page::clear_name() {
  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline const ::std::string& Page::name() const {
  // @@protoc_insertion_point(field_get:google.api.Page.name)
  return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void Page::set_name(const ::std::string& value) {

  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:google.api.Page.name)
}
inline void Page::set_name(const char* value) {

  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:google.api.Page.name)
}
inline void Page::set_name(const char* value, size_t size) {

  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:google.api.Page.name)
}
inline ::std::string* Page::mutable_name() {

  // @@protoc_insertion_point(field_mutable:google.api.Page.name)
  return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* Page::release_name() {
  // @@protoc_insertion_point(field_release:google.api.Page.name)

  return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void Page::set_allocated_name(::std::string* name) {
  if (name != NULL) {

  } else {

  }
  name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
  // @@protoc_insertion_point(field_set_allocated:google.api.Page.name)
}

// optional string content = 2;
inline void Page::clear_content() {
  content_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline const ::std::string& Page::content() const {
  // @@protoc_insertion_point(field_get:google.api.Page.content)
  return content_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void Page::set_content(const ::std::string& value) {

  content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:google.api.Page.content)
}
inline void Page::set_content(const char* value) {

  content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:google.api.Page.content)
}
inline void Page::set_content(const char* value, size_t size) {

  content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:google.api.Page.content)
}
inline ::std::string* Page::mutable_content() {

  // @@protoc_insertion_point(field_mutable:google.api.Page.content)
  return content_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* Page::release_content() {
  // @@protoc_insertion_point(field_release:google.api.Page.content)

  return content_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void Page::set_allocated_content(::std::string* content) {
  if (content != NULL) {

  } else {

  }
  content_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), content);
  // @@protoc_insertion_point(field_set_allocated:google.api.Page.content)
}

// repeated .google.api.Page subpages = 3;
inline int Page::subpages_size() const {
  return subpages_.size();
}
inline void Page::clear_subpages() {
  subpages_.Clear();
}
inline const ::google::api::Page& Page::subpages(int index) const {
  // @@protoc_insertion_point(field_get:google.api.Page.subpages)
  return subpages_.Get(index);
}
inline ::google::api::Page* Page::mutable_subpages(int index) {
  // @@protoc_insertion_point(field_mutable:google.api.Page.subpages)
  return subpages_.Mutable(index);
}
inline ::google::api::Page* Page::add_subpages() {
  // @@protoc_insertion_point(field_add:google.api.Page.subpages)
  return subpages_.Add();
}
inline ::google::protobuf::RepeatedPtrField< ::google::api::Page >*
Page::mutable_subpages() {
  // @@protoc_insertion_point(field_mutable_list:google.api.Page.subpages)
  return &subpages_;
}
inline const ::google::protobuf::RepeatedPtrField< ::google::api::Page >&
Page::subpages() const {
  // @@protoc_insertion_point(field_list:google.api.Page.subpages)
  return subpages_;
}

inline const Page* Page::internal_default_instance() {
  return &Page_default_instance_.get();
}
#endif  // !PROTOBUF_INLINE_NOT_IN_HEADERS
// -------------------------------------------------------------------

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

// @@protoc_insertion_point(namespace_scope)

}  // namespace api
}  // namespace google

// @@protoc_insertion_point(global_scope)

#endif  // PROTOBUF_google_2fapi_2fdocumentation_2eproto__INCLUDED


text:
using System;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;

#endif

namespace HouraiTeahouse {

    /// <summary> A propperty attribute that provides a Tag selector for strings. </summary>
    [AttributeUsage(AttributeTargets.Field)]
    public class TagAttribute : PropertyAttribute {

    }

#if UNITY_EDITOR
    /// <summary> Custom PropertyDrawer for TagAttribute </summary>
    [CustomPropertyDrawer(typeof(TagAttribute))]
    public class TagAttributeDrawer : PropertyDrawer {

        /// <summary>
        ///     <see cref="PropertyDrawer.OnGUI" />
        /// </summary>
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) {
            if (property.propertyType != SerializedPropertyType.String) {
                EditorGUI.PropertyField(position, property, label);
                return;
            }
            EditorGUI.BeginProperty(position, label, property);
            property.stringValue = EditorGUI.TagField(position, label, property.stringValue);
            EditorGUI.EndProperty();
        }

    }
#endif
}

redpajama_set_name: RedPajamaGithub


text:
import LocaleDetails, { Detail } from './LocaleDetails'

export class IngredientDetail extends Detail {

    constructor (singular, plural) {
        this.singular = singular
        this.plural = plural
    }

    toString() {
        return `singular=${this.singular}, plural=${this.plural}`
    }

    static fromJSON(json) {
        return Detail.fromJSON(json, x => new IngredientDetail(x.get("singular"), x.get("plural")))
    }
}

export class Ingredient extends LocaleDetails {
    constructor(key, details) {
        super(details)
        this.key = key
    }

    equals(other) {
        return this === other || (other instanceof Ingredient && this.key === other.key)
    }

    toString() {
        return `key=${this.key}, ${detail.toString()}`
    }

    static fromJSON(key, json) {
        return new Ingredient(key, IngredientDetail.fromJSON(json))
    }
}


text:
/*
 * ConfbridgeLockAction.h
 *
 *  Created on: Jun 27, 2013
 *      Author: augcampos
 */

#ifndef CONFBRIDGELOCKACTION_H_
#define CONFBRIDGELOCKACTION_H_

#include "AbstractManagerAction.h"

namespace asteriskcpp {

    /**
     * The ConfbridgeLockAction lockes a specified conference.
     *
     * @author jmb
     * @version $Id$
     */

    class ConfbridgeLockAction : public AbstractManagerAction {
    public:

        /**
         * Creates a new empty ConfbridgeLockAction.
         */
        ConfbridgeLockAction();

        /**
         * Creates a new ConfbridgeLockAction for a specific conference.
         */
        ConfbridgeLockAction(const std::string& conference);

        virtual ~ConfbridgeLockAction();

        /**
         * Sets the id of the conference to lock.
         */
        void setConference(const std::string& conference);

        const std::string& getConference() const;
    };

} //NAMESPACE

#endif /*CONFBRIDGELOCKACTION_H_*/


text:
FindInteriorPoints::FindInteriorPoints() {

	registerInput(_membranes, "membranes");
	registerInput(_smooth, "smooth");
	registerOutput(_spheres, "spheres");
	registerOutput(_boundaries, "boundaries");
}

void
FindInteriorPoints::updateOutputs() {

	if (!_spheres)
		_spheres = new Spheres();
	else
		_spheres->clear();

	if (!_boundaries)
		_boundaries = new ImageStack();
	else
		_boundaries->clear();

	const unsigned int minX = _membranes->getBoundingBox().getMinX();
	const unsigned int minY = _membranes->getBoundingBox().getMinY();
	const unsigned int minZ = _membranes->getBoundingBox().getMinZ();
	const unsigned int resX = _membranes->getResolutionX();
	const unsigned int resY = _membranes->getResolutionY();
	const unsigned int resZ = _membranes->getResolutionZ();

	unsigned int width  = _membranes->width();
	unsigned int height = _membranes->height();
	unsigned int depth  = _membranes->size();

	vigra::Shape3 size(width, height, depth);

	vigra::MultiArray<3, float> distance(size);
	vigra::MultiArray<3, float> maxima(size);
	distance = 0;
	maxima = 0;

	// prepare foreground-background picture
	for (unsigned int section = 0; section < depth; section++) {

			vigra::copyMultiArray(
					*(*_membranes)[section],
					distance.bind<2>(section));
	}

	// perform distance transform
	float pitch[3];
	pitch[0] = resX; pitch[1] = resY; pitch[2] = resZ;
	vigra::separableMultiDistSquared(
			distance,
			distance,
			true, // distance to foreground
			pitch);

	// smooth a little
	float scale = *_smooth;
	if (scale >= 1e-10)
		vigra::gaussianSmoothMultiArray(
				distance,
				distance,
				scale,
				vigra::ConvolutionOptions<3>()
						.stepSize(resX, resY, resZ));

	// find maxima
	vigra::localMaxima(
			distance,
			maxima,
			vigra::LocalMinmaxOptions().allowAtBorder());

	// extract spheres
	typedef vigra::CoupledIteratorType<3, float, float>::type CoupledIterator;

	CoupledIterator i = vigra::createCoupledIterator(maxima, distance);

	for (; i != i.getEndIterator(); i++) {

		if (i.get<1>() > 0) {

			vigra::Shape3 location  = i.get<0>();
			float         distance  = sqrt(i.get<2>());

			_spheres->add(
					Sphere(
							(location[0] + minX)*resX,
							(location[1] + minY)*resY,
							(location[2] + minZ)*resZ,
							 distance));
		}
	}

	// normalize distance transform image
	vigra::FindMinMax<float> findMinMax;
	vigra::inspectMultiArray(
			distance,
			findMinMax);
	vigra::transformMultiArray(
			distance,
			distance,
			vigra::functor::Param(1.0) - vigra::functor::Arg1()/vigra::functor::Param(findMinMax.max));

	// provide distances as output
	_boundaries->setBoundingBox(
			BoundingBox(
					minX, minY, minZ,
					minX + size[0]*resX, minY + size[1]*resY, minZ + size[2]*resZ));
	_boundaries->setResolution(resX, resY, resZ);
	for (unsigned int z = 0; z < size[2]; z++) {

		boost::shared_ptr<Image> image = boost::make_shared<Image>(size[0], size[1]);
		vigra::copyMultiArray(
				distance.bind<2>(z),
				*image);
		_boundaries->add(image);
	}
}


text:
namespace chrono {
namespace vehicle {

using namespace chrono::fea;

// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
ChANCFTire::ChANCFTire(const std::string& name) : ChDeformableTire(name) {}

// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void ChANCFTire::CreatePressureLoad() {
    // Create a pressure load for each element in the mesh.  Note that we set a
    // negative pressure (i.e. internal pressure, acting opposite to the surface normal)
    for (unsigned int ie = 0; ie < m_mesh->GetNelements(); ie++) {
        if (auto mshell = std::dynamic_pointer_cast<ChElementShellANCF>(m_mesh->GetElement(ie))) {
            auto load = std::make_shared<ChLoad<ChLoaderPressure>>(mshell);
            load->loader.SetPressure(-m_pressure);
            load->loader.SetStiff(false);          //// TODO:  user control?
            load->loader.SetIntegrationPoints(2);  //// TODO:  user control?
            m_load_container->Add(load);
        }
    }
}

// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void ChANCFTire::CreateContactSurface() {
    switch (m_contact_type) {
        case NODE_CLOUD: {
            auto contact_surf = std::make_shared<ChContactSurfaceNodeCloud>();
            m_mesh->AddContactSurface(contact_surf);
            contact_surf->AddAllNodes(m_contact_node_radius);
            contact_surf->SetMaterialSurface(m_contact_mat);
            break;
        }
        case TRIANGLE_MESH: {
            auto contact_surf = std::make_shared<ChContactSurfaceMesh>();
            m_mesh->AddContactSurface(contact_surf);
            contact_surf->AddFacesFromBoundary(m_contact_face_thickness, false);
            contact_surf->SetMaterialSurface(m_contact_mat);
            break;
        }
    }
}

// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void ChANCFTire::CreateRimConnections(std::shared_ptr<ChBody> wheel) {
    auto nodes = GetConnectedNodes();

    m_connections.resize(nodes.size());
    m_connectionsD.resize(nodes.size());

    for (size_t in = 0; in < nodes.size(); ++in) {
        auto node = std::dynamic_pointer_cast<ChNodeFEAxyzD>(nodes[in]);
        m_connections[in] = std::make_shared<ChLinkPointFrame>();
        m_connections[in]->Initialize(node, wheel);
        wheel->GetSystem()->Add(m_connections[in]);

        m_connectionsD[in] = std::make_shared<ChLinkDirFrame>();
        m_connectionsD[in]->Initialize(node, wheel);
        m_connectionsD[in]->SetDirectionInAbsoluteCoords(node->GetD());
        wheel->GetSystem()->Add(m_connectionsD[in]);
    }
}

}  // end namespace vehicle
}  // end namespace chrono


text:
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

#include "webrtc/common_types.h"
#include "webrtc/modules/pacing/include/mock/mock_paced_sender.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h"
#include "webrtc/system_wrappers/interface/scoped_vector.h"
#include "webrtc/test/rtcp_packet_parser.h"

using ::testing::_;
using ::testing::ElementsAre;
using ::testing::NiceMock;
using ::testing::Return;
using ::testing::SaveArg;

namespace webrtc {
namespace {
const uint32_t kSenderSsrc = 0x12345;
const uint32_t kReceiverSsrc = 0x23456;
const int64_t kOneWayNetworkDelayMs = 100;
const uint8_t kBaseLayerTid = 0;
const uint8_t kHigherLayerTid = 1;
const uint16_t kSequenceNumber = 100;

class RtcpRttStatsTestImpl : public RtcpRttStats {
 public:
  RtcpRttStatsTestImpl() : rtt_ms_(0) {}
  virtual ~RtcpRttStatsTestImpl() {}

  void OnRttUpdate(int64_t rtt_ms) override { rtt_ms_ = rtt_ms; }
  int64_t LastProcessedRtt() const override { return rtt_ms_; }
  int64_t rtt_ms_;
};

class SendTransport : public Transport,
                      public NullRtpData {
 public:
  SendTransport()
      : receiver_(NULL),
        clock_(NULL),
        delay_ms_(0),
        rtp_packets_sent_(0) {
  }

  void SetRtpRtcpModule(ModuleRtpRtcpImpl* receiver) {
    receiver_ = receiver;
  }
  void SimulateNetworkDelay(int64_t delay_ms, SimulatedClock* clock) {
    clock_ = clock;
    delay_ms_ = delay_ms;
  }
  int SendPacket(int /*ch*/, const void* data, size_t len) override {
    RTPHeader header;
    rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
    EXPECT_TRUE(parser->Parse(static_cast<const uint8_t*>(data), len, &header));
    ++rtp_packets_sent_;
    last_rtp_header_ = header;
    return static_cast<int>(len);
  }
  int SendRTCPPacket(int /*ch*/, const void* data, size_t len) override {
    test::RtcpPacketParser parser;
    parser.Parse(static_cast<const uint8_t*>(data), len);
    last_nack_list_ = parser.nack_item()->last_nack_list();

    if (clock_) {
      clock_->AdvanceTimeMilliseconds(delay_ms_);
    }
    EXPECT_TRUE(receiver_ != NULL);
    EXPECT_EQ(0, receiver_->IncomingRtcpPacket(
        static_cast<const uint8_t*>(data), len));
    return static_cast<int>(len);
  }
  ModuleRtpRtcpImpl* receiver_;
  SimulatedClock* clock_;
  int64_t delay_ms_;
  int rtp_packets_sent_;
  RTPHeader last_rtp_header_;
  std::vector<uint16_t> last_nack_list_;
};

class RtpRtcpModule : public RtcpPacketTypeCounterObserver {
 public:
  RtpRtcpModule(SimulatedClock* clock)
      : receive_statistics_(ReceiveStatistics::Create(clock)) {
    RtpRtcp::Configuration config;
    config.audio = false;
    config.clock = clock;
    config.outgoing_transport = &transport_;
    config.receive_statistics = receive_statistics_.get();
    config.rtcp_packet_type_counter_observer = this;
    config.rtt_stats = &rtt_stats_;

    impl_.reset(new ModuleRtpRtcpImpl(config));
    impl_->SetRTCPStatus(kRtcpCompound);

    transport_.SimulateNetworkDelay(kOneWayNetworkDelayMs, clock);
  }

  RtcpPacketTypeCounter packets_sent_;
  RtcpPacketTypeCounter packets_received_;
  rtc::scoped_ptr<ReceiveStatistics> receive_statistics_;
  SendTransport transport_;
  RtcpRttStatsTestImpl rtt_stats_;
  rtc::scoped_ptr<ModuleRtpRtcpImpl> impl_;
  uint32_t remote_ssrc_;

  void SetRemoteSsrc(uint32_t ssrc) {
    remote_ssrc_ = ssrc;
    impl_->SetRemoteSSRC(ssrc);
  }

  void RtcpPacketTypesCounterUpdated(
      uint32_t ssrc,
      const RtcpPacketTypeCounter& packet_counter) override {
    counter_map_[ssrc] = packet_counter;
  }

  RtcpPacketTypeCounter RtcpSent() {
    // RTCP counters for remote SSRC.
    return counter_map_[remote_ssrc_];
  }

  RtcpPacketTypeCounter RtcpReceived() {
    // Received RTCP stats for (own) local SSRC.
    return counter_map_[impl_->SSRC()];
  }
  int RtpSent() {
    return transport_.rtp_packets_sent_;
  }
  uint16_t LastRtpSequenceNumber() {
    return transport_.last_rtp_header_.sequenceNumber;
  }
  std::vector<uint16_t> LastNackListSent() {
    return transport_.last_nack_list_;
  }

 private:
  std::map<uint32_t, RtcpPacketTypeCounter> counter_map_;
};
}  // namespace

class RtpRtcpImplTest : public ::testing::Test {
 protected:
  RtpRtcpImplTest()
      : clock_(133590000000000),
        sender_(&clock_),
        receiver_(&clock_) {
    // Send module.
    EXPECT_EQ(0, sender_.impl_->SetSendingStatus(true));
    sender_.impl_->SetSendingMediaStatus(true);
    sender_.impl_->SetSSRC(kSenderSsrc);
    sender_.SetRemoteSsrc(kReceiverSsrc);
    sender_.impl_->SetSequenceNumber(kSequenceNumber);
    sender_.impl_->SetStorePacketsStatus(true, 100);

    memset(&codec_, 0, sizeof(VideoCodec));
    codec_.plType = 100;
    strncpy(codec_.plName, "VP8", 3);
    codec_.width = 320;
    codec_.height = 180;
    EXPECT_EQ(0, sender_.impl_->RegisterSendPayload(codec_));

    // Receive module.
    EXPECT_EQ(0, receiver_.impl_->SetSendingStatus(false));
    receiver_.impl_->SetSendingMediaStatus(false);
    receiver_.impl_->SetSSRC(kReceiverSsrc);
    receiver_.SetRemoteSsrc(kSenderSsrc);
    // Transport settings.
    sender_.transport_.SetRtpRtcpModule(receiver_.impl_.get());
    receiver_.transport_.SetRtpRtcpModule(sender_.impl_.get());
  }
  SimulatedClock clock_;
  RtpRtcpModule sender_;
  RtpRtcpModule receiver_;
  VideoCodec codec_;

  void SendFrame(const RtpRtcpModule* module, uint8_t tid) {
    RTPVideoHeaderVP8 vp8_header = {};
    vp8_header.temporalIdx = tid;
    RTPVideoHeader rtp_video_header = {codec_.width,
                                       codec_.height,
                                       kVideoRotation_0,
                                       true,
                                       0,
                                       kRtpVideoVp8,
                                       {vp8_header}};

    const uint8_t payload[100] = {0};
    EXPECT_EQ(0, module->impl_->SendOutgoingData(kVideoFrameKey,
                                                 codec_.plType,
                                                 0,
                                                 0,
                                                 payload,
                                                 sizeof(payload),
                                                 NULL,
                                                 &rtp_video_header));
  }

  void IncomingRtcpNack(const RtpRtcpModule* module, uint16_t sequence_number) {
    bool sender = module->impl_->SSRC() == kSenderSsrc;
    rtcp::Nack nack;
    uint16_t list[1];
    list[0] = sequence_number;
    const uint16_t kListLength = sizeof(list) / sizeof(list[0]);
    nack.From(sender ? kReceiverSsrc : kSenderSsrc);
    nack.To(sender ? kSenderSsrc : kReceiverSsrc);
    nack.WithList(list, kListLength);
    rtcp::RawPacket packet = nack.Build();
    EXPECT_EQ(0, module->impl_->IncomingRtcpPacket(packet.buffer(),
                                                   packet.buffer_length()));
  }
};

TEST_F(RtpRtcpImplTest, SetSelectiveRetransmissions_BaseLayer) {
  sender_.impl_->SetSelectiveRetransmissions(kRetransmitBaseLayer);
  EXPECT_EQ(kRetransmitBaseLayer, sender_.impl_->SelectiveRetransmissions());

  // Send frames.
  EXPECT_EQ(0, sender_.RtpSent());
  SendFrame(&sender_, kBaseLayerTid);    // kSequenceNumber
  SendFrame(&sender_, kHigherLayerTid);  // kSequenceNumber + 1
  SendFrame(&sender_, kNoTemporalIdx);   // kSequenceNumber + 2
  EXPECT_EQ(3, sender_.RtpSent());
  EXPECT_EQ(kSequenceNumber + 2, sender_.LastRtpSequenceNumber());

  // Min required delay until retransmit = 5 + RTT ms (RTT = 0).
  clock_.AdvanceTimeMilliseconds(5);

  // Frame with kBaseLayerTid re-sent.
  IncomingRtcpNack(&sender_, kSequenceNumber);
  EXPECT_EQ(4, sender_.RtpSent());
  EXPECT_EQ(kSequenceNumber, sender_.LastRtpSequenceNumber());
  // Frame with kHigherLayerTid not re-sent.
  IncomingRtcpNack(&sender_, kSequenceNumber + 1);
  EXPECT_EQ(4, sender_.RtpSent());
  // Frame with kNoTemporalIdx re-sent.
  IncomingRtcpNack(&sender_, kSequenceNumber + 2);
  EXPECT_EQ(5, sender_.RtpSent());
  EXPECT_EQ(kSequenceNumber + 2, sender_.LastRtpSequenceNumber());
}

TEST_F(RtpRtcpImplTest, SetSelectiveRetransmissions_HigherLayers) {
  const uint8_t kSetting = kRetransmitBaseLayer + kRetransmitHigherLayers;
  sender_.impl_->SetSelectiveRetransmissions(kSetting);
  EXPECT_EQ(kSetting, sender_.impl_->SelectiveRetransmissions());

  // Send frames.
  EXPECT_EQ(0, sender_.RtpSent());
  SendFrame(&sender_, kBaseLayerTid);    // kSequenceNumber
  SendFrame(&sender_, kHigherLayerTid);  // kSequenceNumber + 1
  SendFrame(&sender_, kNoTemporalIdx);   // kSequenceNumber + 2
  EXPECT_EQ(3, sender_.RtpSent());
  EXPECT_EQ(kSequenceNumber + 2, sender_.LastRtpSequenceNumber());

  // Min required delay until retransmit = 5 + RTT ms (RTT = 0).
  clock_.AdvanceTimeMilliseconds(5);

  // Frame with kBaseLayerTid re-sent.
  IncomingRtcpNack(&sender_, kSequenceNumber);
  EXPECT_EQ(4, sender_.RtpSent());
  EXPECT_EQ(kSequenceNumber, sender_.LastRtpSequenceNumber());
  // Frame with kHigherLayerTid re-sent.
  IncomingRtcpNack(&sender_, kSequenceNumber + 1);
  EXPECT_EQ(5, sender_.RtpSent());
  EXPECT_EQ(kSequenceNumber + 1, sender_.LastRtpSequenceNumber());
  // Frame with kNoTemporalIdx re-sent.
  IncomingRtcpNack(&sender_, kSequenceNumber + 2);
  EXPECT_EQ(6, sender_.RtpSent());
  EXPECT_EQ(kSequenceNumber + 2, sender_.LastRtpSequenceNumber());
}

TEST_F(RtpRtcpImplTest, Rtt) {
  RTPHeader header;
  header.timestamp = 1;
  header.sequenceNumber = 123;
  header.ssrc = kSenderSsrc;
  header.headerLength = 12;
  receiver_.receive_statistics_->IncomingPacket(header, 100, false);

  // Sender module should send a SR.
  EXPECT_EQ(0, sender_.impl_->SendRTCP(kRtcpReport));

  // Receiver module should send a RR with a response to the last received SR.
  clock_.AdvanceTimeMilliseconds(1000);
  EXPECT_EQ(0, receiver_.impl_->SendRTCP(kRtcpReport));

  // Verify RTT.
  int64_t rtt;
  int64_t avg_rtt;
  int64_t min_rtt;
  int64_t max_rtt;
  EXPECT_EQ(0,
      sender_.impl_->RTT(kReceiverSsrc, &rtt, &avg_rtt, &min_rtt, &max_rtt));
  EXPECT_EQ(2 * kOneWayNetworkDelayMs, rtt);
  EXPECT_EQ(2 * kOneWayNetworkDelayMs, avg_rtt);
  EXPECT_EQ(2 * kOneWayNetworkDelayMs, min_rtt);
  EXPECT_EQ(2 * kOneWayNetworkDelayMs, max_rtt);

  // No RTT from other ssrc.
  EXPECT_EQ(-1,
      sender_.impl_->RTT(kReceiverSsrc+1, &rtt, &avg_rtt, &min_rtt, &max_rtt));

  // Verify RTT from rtt_stats config.
  EXPECT_EQ(0, sender_.rtt_stats_.LastProcessedRtt());
  EXPECT_EQ(0, sender_.impl_->rtt_ms());
  sender_.impl_->Process();
  EXPECT_EQ(2 * kOneWayNetworkDelayMs, sender_.rtt_stats_.LastProcessedRtt());
  EXPECT_EQ(2 * kOneWayNetworkDelayMs, sender_.impl_->rtt_ms());
}

TEST_F(RtpRtcpImplTest, SetRtcpXrRrtrStatus) {
  EXPECT_FALSE(receiver_.impl_->RtcpXrRrtrStatus());
  receiver_.impl_->SetRtcpXrRrtrStatus(true);
  EXPECT_TRUE(receiver_.impl_->RtcpXrRrtrStatus());
}

TEST_F(RtpRtcpImplTest, RttForReceiverOnly) {
  receiver_.impl_->SetRtcpXrRrtrStatus(true);

  // Receiver module should send a Receiver time reference report (RTRR).
  EXPECT_EQ(0, receiver_.impl_->SendRTCP(kRtcpReport));

  // Sender module should send a response to the last received RTRR (DLRR).
  clock_.AdvanceTimeMilliseconds(1000);
  EXPECT_EQ(0, sender_.impl_->SendRTCP(kRtcpReport));

  // Verify RTT.
  EXPECT_EQ(0, receiver_.rtt_stats_.LastProcessedRtt());
  EXPECT_EQ(0, receiver_.impl_->rtt_ms());
  receiver_.impl_->Process();
  EXPECT_EQ(2 * kOneWayNetworkDelayMs, receiver_.rtt_stats_.LastProcessedRtt());
  EXPECT_EQ(2 * kOneWayNetworkDelayMs, receiver_.impl_->rtt_ms());
}

TEST_F(RtpRtcpImplTest, RtcpPacketTypeCounter_Nack) {
  EXPECT_EQ(-1, receiver_.RtcpSent().first_packet_time_ms);
  EXPECT_EQ(-1, sender_.RtcpReceived().first_packet_time_ms);
  EXPECT_EQ(0U, sender_.RtcpReceived().nack_packets);
  EXPECT_EQ(0U, receiver_.RtcpSent().nack_packets);

  // Receive module sends a NACK.
  const uint16_t kNackLength = 1;
  uint16_t nack_list[kNackLength] = {123};
  EXPECT_EQ(0, receiver_.impl_->SendNACK(nack_list, kNackLength));
  EXPECT_EQ(1U, receiver_.RtcpSent().nack_packets);
  EXPECT_GT(receiver_.RtcpSent().first_packet_time_ms, -1);

  // Send module receives the NACK.
  EXPECT_EQ(1U, sender_.RtcpReceived().nack_packets);
  EXPECT_GT(sender_.RtcpReceived().first_packet_time_ms, -1);
}

TEST_F(RtpRtcpImplTest, RtcpPacketTypeCounter_FirAndPli) {
  EXPECT_EQ(0U, sender_.RtcpReceived().fir_packets);
  EXPECT_EQ(0U, receiver_.RtcpSent().fir_packets);
  // Receive module sends a FIR.
  EXPECT_EQ(0, receiver_.impl_->SendRTCP(kRtcpFir));
  EXPECT_EQ(1U, receiver_.RtcpSent().fir_packets);
  // Send module receives the FIR.
  EXPECT_EQ(1U, sender_.RtcpReceived().fir_packets);

  // Receive module sends a FIR and PLI.
  std::set<RTCPPacketType> packet_types;
  packet_types.insert(kRtcpFir);
  packet_types.insert(kRtcpPli);
  EXPECT_EQ(0, receiver_.impl_->SendCompoundRTCP(packet_types));
  EXPECT_EQ(2U, receiver_.RtcpSent().fir_packets);
  EXPECT_EQ(1U, receiver_.RtcpSent().pli_packets);
  // Send module receives the FIR and PLI.
  EXPECT_EQ(2U, sender_.RtcpReceived().fir_packets);
  EXPECT_EQ(1U, sender_.RtcpReceived().pli_packets);
}

TEST_F(RtpRtcpImplTest, AddStreamDataCounters) {
  StreamDataCounters rtp;
  const int64_t kStartTimeMs = 1;
  rtp.first_packet_time_ms = kStartTimeMs;
  rtp.transmitted.packets = 1;
  rtp.transmitted.payload_bytes = 1;
  rtp.transmitted.header_bytes = 2;
  rtp.transmitted.padding_bytes = 3;
  EXPECT_EQ(rtp.transmitted.TotalBytes(), rtp.transmitted.payload_bytes +
                                          rtp.transmitted.header_bytes +
                                          rtp.transmitted.padding_bytes);

  StreamDataCounters rtp2;
  rtp2.first_packet_time_ms = -1;
  rtp2.transmitted.packets = 10;
  rtp2.transmitted.payload_bytes = 10;
  rtp2.retransmitted.header_bytes = 4;
  rtp2.retransmitted.payload_bytes = 5;
  rtp2.retransmitted.padding_bytes = 6;
  rtp2.retransmitted.packets = 7;
  rtp2.fec.packets = 8;

  StreamDataCounters sum = rtp;
  sum.Add(rtp2);
  EXPECT_EQ(kStartTimeMs, sum.first_packet_time_ms);
  EXPECT_EQ(11U, sum.transmitted.packets);
  EXPECT_EQ(11U, sum.transmitted.payload_bytes);
  EXPECT_EQ(2U, sum.transmitted.header_bytes);
  EXPECT_EQ(3U, sum.transmitted.padding_bytes);
  EXPECT_EQ(4U, sum.retransmitted.header_bytes);
  EXPECT_EQ(5U, sum.retransmitted.payload_bytes);
  EXPECT_EQ(6U, sum.retransmitted.padding_bytes);
  EXPECT_EQ(7U, sum.retransmitted.packets);
  EXPECT_EQ(8U, sum.fec.packets);
  EXPECT_EQ(sum.transmitted.TotalBytes(),
            rtp.transmitted.TotalBytes() + rtp2.transmitted.TotalBytes());

  StreamDataCounters rtp3;
  rtp3.first_packet_time_ms = kStartTimeMs + 10;
  sum.Add(rtp3);
  EXPECT_EQ(kStartTimeMs, sum.first_packet_time_ms);  // Holds oldest time.
}

TEST_F(RtpRtcpImplTest, SendsInitialNackList) {
  // Send module sends a NACK.
  const uint16_t kNackLength = 1;
  uint16_t nack_list[kNackLength] = {123};
  EXPECT_EQ(0U, sender_.RtcpSent().nack_packets);
  EXPECT_EQ(0, sender_.impl_->SendNACK(nack_list, kNackLength));
  EXPECT_EQ(1U, sender_.RtcpSent().nack_packets);
  EXPECT_THAT(sender_.LastNackListSent(), ElementsAre(123));
}

TEST_F(RtpRtcpImplTest, SendsExtendedNackList) {
  // Send module sends a NACK.
  const uint16_t kNackLength = 1;
  uint16_t nack_list[kNackLength] = {123};
  EXPECT_EQ(0U, sender_.RtcpSent().nack_packets);
  EXPECT_EQ(0, sender_.impl_->SendNACK(nack_list, kNackLength));
  EXPECT_EQ(1U, sender_.RtcpSent().nack_packets);
  EXPECT_THAT(sender_.LastNackListSent(), ElementsAre(123));

  // Same list not re-send.
  EXPECT_EQ(0, sender_.impl_->SendNACK(nack_list, kNackLength));
  EXPECT_EQ(1U, sender_.RtcpSent().nack_packets);
  EXPECT_THAT(sender_.LastNackListSent(), ElementsAre(123));

  // Only extended list sent.
  const uint16_t kNackExtLength = 2;
  uint16_t nack_list_ext[kNackExtLength] = {123, 124};
  EXPECT_EQ(0, sender_.impl_->SendNACK(nack_list_ext, kNackExtLength));
  EXPECT_EQ(2U, sender_.RtcpSent().nack_packets);
  EXPECT_THAT(sender_.LastNackListSent(), ElementsAre(124));
}

TEST_F(RtpRtcpImplTest, ReSendsNackListAfterRttMs) {
  sender_.transport_.SimulateNetworkDelay(0, &clock_);
  // Send module sends a NACK.
  const uint16_t kNackLength = 2;
  uint16_t nack_list[kNackLength] = {123, 125};
  EXPECT_EQ(0U, sender_.RtcpSent().nack_packets);
  EXPECT_EQ(0, sender_.impl_->SendNACK(nack_list, kNackLength));
  EXPECT_EQ(1U, sender_.RtcpSent().nack_packets);
  EXPECT_THAT(sender_.LastNackListSent(), ElementsAre(123, 125));

  // Same list not re-send, rtt interval has not passed.
  const int kStartupRttMs = 100;
  clock_.AdvanceTimeMilliseconds(kStartupRttMs);
  EXPECT_EQ(0, sender_.impl_->SendNACK(nack_list, kNackLength));
  EXPECT_EQ(1U, sender_.RtcpSent().nack_packets);

  // Rtt interval passed, full list sent.
  clock_.AdvanceTimeMilliseconds(1);
  EXPECT_EQ(0, sender_.impl_->SendNACK(nack_list, kNackLength));
  EXPECT_EQ(2U, sender_.RtcpSent().nack_packets);
  EXPECT_THAT(sender_.LastNackListSent(), ElementsAre(123, 125));
}

TEST_F(RtpRtcpImplTest, UniqueNackRequests) {
  receiver_.transport_.SimulateNetworkDelay(0, &clock_);
  EXPECT_EQ(0U, receiver_.RtcpSent().nack_packets);
  EXPECT_EQ(0U, receiver_.RtcpSent().nack_requests);
  EXPECT_EQ(0U, receiver_.RtcpSent().unique_nack_requests);
  EXPECT_EQ(0, receiver_.RtcpSent().UniqueNackRequestsInPercent());

  // Receive module sends NACK request.
  const uint16_t kNackLength = 4;
  uint16_t nack_list[kNackLength] = {10, 11, 13, 18};
  EXPECT_EQ(0, receiver_.impl_->SendNACK(nack_list, kNackLength));
  EXPECT_EQ(1U, receiver_.RtcpSent().nack_packets);
  EXPECT_EQ(4U, receiver_.RtcpSent().nack_requests);
  EXPECT_EQ(4U, receiver_.RtcpSent().unique_nack_requests);
  EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(10, 11, 13, 18));

  // Send module receives the request.
  EXPECT_EQ(1U, sender_.RtcpReceived().nack_packets);
  EXPECT_EQ(4U, sender_.RtcpReceived().nack_requests);
  EXPECT_EQ(4U, sender_.RtcpReceived().unique_nack_requests);
  EXPECT_EQ(100, sender_.RtcpReceived().UniqueNackRequestsInPercent());

  // Receive module sends new request with duplicated packets.
  const int kStartupRttMs = 100;
  clock_.AdvanceTimeMilliseconds(kStartupRttMs + 1);
  const uint16_t kNackLength2 = 4;
  uint16_t nack_list2[kNackLength2] = {11, 18, 20, 21};
  EXPECT_EQ(0, receiver_.impl_->SendNACK(nack_list2, kNackLength2));
  EXPECT_EQ(2U, receiver_.RtcpSent().nack_packets);
  EXPECT_EQ(8U, receiver_.RtcpSent().nack_requests);
  EXPECT_EQ(6U, receiver_.RtcpSent().unique_nack_requests);
  EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(11, 18, 20, 21));

  // Send module receives the request.
  EXPECT_EQ(2U, sender_.RtcpReceived().nack_packets);
  EXPECT_EQ(8U, sender_.RtcpReceived().nack_requests);
  EXPECT_EQ(6U, sender_.RtcpReceived().unique_nack_requests);
  EXPECT_EQ(75, sender_.RtcpReceived().UniqueNackRequestsInPercent());
}

}  // namespace webrtc


text:
from django.shortcuts import render
from django.http import HttpResponse
from temperature.models import TempReading

def index(request):
    return HttpResponse("Hello, world. You're at the home-mon-server index page.")

def save_temp_reading(request):
    if request.method == 'POST':
        value = request.POST.get('value')
        date = request.POST.get('date')

        entry = TempReading(value=value, date=date)
        entry.save()

        response_msg = 'Added new entry with value set to ' + str(value)

        return HttpResponse(
            response_msg,
            content_type="application/json"
        )
    else:
        return HttpResponse()


text:
package org.guvnor.tools.utils.webdav;

import java.net.URL;
import java.util.HashMap;
import java.util.Map;

import org.eclipse.webdav.http.client.IAuthenticator;

/**
 * Authenticates based on in-memory credentials, and is limited to the VM session.
 */
public class WebDavSessionAuthenticator implements IAuthenticator {

    private class ServerAuthenInfo {
        private String serverUrl;
        private HashMap<String, Map<String, String>> authInfo;

        public ServerAuthenInfo(String serverUrl) {
            this.serverUrl = serverUrl;
            authInfo = new HashMap<String, Map<String, String>>();
        }
        public Map<String, String> getAuthenicationInfo(String scheme) {
            return authInfo.get(scheme);
        }
        public void addAuthenicationInfo(String scheme, Map<String, String> info) {
            authInfo.put(scheme, info);
        }
        public String getServerURL() {
            return serverUrl;
        }
    }

    private HashMap<String, ServerAuthenInfo> serverAuthMaps;

    public WebDavSessionAuthenticator() {
        serverAuthMaps = new HashMap<String, ServerAuthenInfo>();
    }

    @SuppressWarnings("unchecked")
    public void addAuthenticationInfo(URL serverUrl,
                                     String realm,
                                     String scheme,
                                     Map info) {
        ServerAuthenInfo authInfo = serverAuthMaps.get(serverUrl.getHost().toLowerCase());
        if (authInfo == null) {
            authInfo = new ServerAuthenInfo(serverUrl.getHost());
            serverAuthMaps.put(serverUrl.getHost().toLowerCase(), authInfo);
        }
        authInfo.addAuthenicationInfo(scheme.toLowerCase(), info);
    }

    public void addProtectionSpace(URL resourceUrl, String realm) {
        // Not using the notion of "realm," so do nothing
    }

    @SuppressWarnings("unchecked")
    public Map getAuthenticationInfo(URL serverUrl,
                                    String realm,
                                    String scheme) {

        ServerAuthenInfo authInfo = serverAuthMaps.get(serverUrl.getHost().toLowerCase());
        if (authInfo == null) {
            return null;
        }
        return authInfo.getAuthenicationInfo(scheme.toLowerCase());
    }

    public String getProtectionSpace(URL resourceUrl) {
        // We don't have the notion of "realm," but the client
        // requires a non-null return value.
        return ""; //$NON-NLS-1$
    }

    @SuppressWarnings("unchecked")
    public Map requestAuthenticationInfo(URL resourceUrl,
                                        String realm,
                                        String scheme) {
        // We do not distinguish between resource- and server-based
        // authentication: all authentication is done on a per-server
        // basis. Therefore, delegate to a server authentication check.
        return getAuthenticationInfo(resourceUrl, realm, scheme);
    }
}


text:
'use strict';

const path = require('path');

const Color = require('colorjs.io/dist/color.legacy.cjs').default;
const nunjucks = require('nunjucks');

const baseDir = path.resolve(__dirname, '../../templates');
const colors_iFrameTpl = path.join(baseDir, 'colors', 'base.njk');
const docTpl = path.join(baseDir, 'doc.njk');
const example_iFrameTpl = path.join(baseDir, 'example', 'base.njk');
const fontFaceTpl = path.join(baseDir, 'fonts', 'font_face.njk');
const fonts_iFrameTpl = path.join(baseDir, 'fonts', 'base.njk');
const groupTpl = path.join(baseDir, 'group.njk');
const icons_iFrameTpl = path.join(baseDir, 'icons', 'base.njk');
const icons_tpl = path.join(baseDir, '_icon_template.lodash');
const indexTpl = path.join(baseDir, 'index.njk');
const ratios_iFrameTpl = path.join(baseDir, 'ratios', 'base.njk');
const searchTpl = path.join(baseDir, 'search.njk');
const sizes_iFrameTpl = path.join(baseDir, 'sizes', 'base.njk');

const templates = {
  baseDir,
  colors_iFrame: colors_iFrameTpl,
  index: indexTpl,
  search: searchTpl,
  group: groupTpl,
  extraDoc: docTpl,
  example_iFrame: example_iFrameTpl,
  fonts_iFrame: fonts_iFrameTpl,
  icons_iFrame: icons_iFrameTpl,
  fontFace: fontFaceTpl,
  icons_tpl,
  ratios_iFrame: ratios_iFrameTpl,
  sizes_iFrame: sizes_iFrameTpl,
};

const makeNunjucksColors = (ctx) => (input) => {
  let color;
  if (!input || input.match(/^var\(--.+\)$/)) {
    // Don't try to parse CSS custom properties
    return null;
  }
  try {
    color = new Color(input);
  } catch (err) {
    ctx.logger.warn(`Error parsing color value: ${input}\n${err.message}`);
    return null;
  }
  const obj = {};
  const formats = ctx.herman?.displayColors || ['hex', 'rgb', 'hsl'];
  formats.forEach((format) => {
    try {
      let targetColor;
      switch (format) {
        case 'hex':
          targetColor = color.to('srgb');
          obj.hex = targetColor.toString({ format: 'hex' });
          break;
        case 'rgb':
        case 'rgba':
          targetColor = color.to('srgb');
          obj.rgb = targetColor.toString();
          break;
        case 'hsl':
        case 'hsla':
          targetColor = color.to('hsl');
          obj.hsl = targetColor.toString();
          break;
      }
    } catch (err) {
      /* istanbul ignore next */
      ctx.logger.warn(
        `Error converting color ${input} to format: ${format}\n${err.message}`,
      );
    }
  });
  return obj;
};

nunjucks.installJinjaCompat();
let nunjucksEnv;

const getNunjucksEnv = (ctx) => {
  if (!nunjucksEnv) {
    nunjucksEnv = nunjucks.configure(baseDir, { noCache: true });
    nunjucksEnv.addFilter('split', (str, separator) => str.split(separator));
    nunjucksEnv.addFilter('isString', (val) => typeof val === 'string');
    nunjucksEnv.addFilter('startsWith', (str, search) =>
      str.startsWith(search),
    );

    // Accepts a color (in any format) and returns an object with hex, rgba, and
    // hsla strings.
    nunjucksEnv.addFilter('colors', makeNunjucksColors(ctx));
  }
  return nunjucksEnv;
};

module.exports = {
  getNunjucksEnv,
  makeNunjucksColors,
  templates,
};


text:
package net.floodlightcontroller.automaniot.mqtt;

import java.util.ArrayList;
import java.util.List;

/**
 *
 */
public class SubscribeMessage extends MessageIDMessage {

    public static class Couple {

        private byte m_qos;
        private String m_topic;

        public Couple(byte qos, String topic) {
            m_qos = qos;
            m_topic = topic;
        }

        public byte getQos() {
            return m_qos;
        }

        public String getTopic() {
            return m_topic;
        }
    }
    private List<Couple> m_subscriptions = new ArrayList<Couple>();

    public SubscribeMessage() {
        //Subscribe has always QoS 1
        m_messageType = AbstractMessage.SUBSCRIBE;
        m_qos = AbstractMessage.QOSType.LEAST_ONE;
    }

    public List<Couple> subscriptions() {
        return m_subscriptions;
    }

    public void addSubscription(Couple subscription) {
        m_subscriptions.add(subscription);
    }
}


text:
package wrench.orm.model.associations;

import wrench.orm.model.Table;

/**
 * @author mhauck
 */
public interface BelongsTo extends Table {

    ForeignKeys belongsTo();

}


text:
% Table of contents formatting
\renewcommand{\contentsname}{Table of Contents}
\setcounter{tocdepth}{3}

% Headers and page numbering
\usepackage{fancyhdr}
\pagestyle{plain}

% Following package is used to add background image to front page
\usepackage{wallpaper}

% Table package
\usepackage{ctable}% http://ctan.org/pkg/ctable

% Deal with 'LaTeX Error: Too many unprocessed floats.'
\usepackage{morefloats}
% or use \extrafloats{100}
% add some \clearpage

% % Chapter header
% \usepackage{titlesec, blindtext, color}
% \definecolor{gray75}{gray}{0.75}
% \newcommand{\hsp}{\hspace{20pt}}
% \titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Huge\bfseries}

% % Fonts and typesetting
% \setmainfont[Scale=1.1]{Helvetica}
% \setsansfont[Scale=1.1]{Verdana}

% FONTS
\usepackage{xunicode}
\usepackage{xltxtra}
\defaultfontfeatures{Mapping=tex-text} % converts LaTeX specials (``quotes'' --- dashes etc.) to unicode
% \setromanfont[Scale=1.0,Ligatures={Common},Numbers={OldStyle}]{Times New Roman}
% \setromanfont[Scale=1.01,Ligatures={Common},Numbers={OldStyle}]{Adobe Caslon Pro}
%Following line controls size of code chunks
% \setmonofont[Scale=0.9]{Monaco}
%Following line controls size of figure legends
% \setsansfont[Scale=1.2]{Optima Regular}

%Attempt to set math size
%First size must match the text size in the document or command will not work
%\DeclareMathSizes{display size}{text size}{script size}{scriptscript size}.
\DeclareMathSizes{11}{12}{12}{12}

% ---- CUSTOM AMPERSAND
\newcommand{\amper}{{\fontspec[Scale=.95]{Adobe Caslon Pro}\selectfont\itshape\&}}

% HEADINGS
\usepackage{sectsty}
\usepackage[normalem]{ulem}
\sectionfont{\rmfamily\mdseries\Large}
\subsectionfont{\rmfamily\mdseries\scshape\large}
\subsubsectionfont{\rmfamily\bfseries\upshape\large}
% \sectionfont{\rmfamily\mdseries\Large}
% \subsectionfont{\rmfamily\mdseries\scshape\normalsize}
% \subsubsectionfont{\rmfamily\bfseries\upshape\normalsize}

% Set figure legends and captions to be smaller sized sans serif font
\usepackage[font={footnotesize,sf}]{caption}

\usepackage{siunitx}

% Adjust spacing between lines to 1.5
\usepackage{setspace}
% \singlespacing
\onehalfspacing
% \doublespacing
\raggedbottom

% Set margins
% \usepackage[top=1.5in,bottom=1.5in,left=1.5in,right=1.4in]{geometry}
\usepackage[landscape, top=1.0in,bottom=1.0in,left=1.0in,right=1.0in]{geometry}
% \setlength\parindent{0.4in} % remove indent at start of paragraphs (or set to 0.3?)
\setlength{\parskip}{9pt}

% Add space between pararaphs
% http://texblog.org/2012/11/07/correctly-typesetting-paragraphs-in-latex/
% \usepackage{parskip}
% \setlength{\parskip}{\baselineskip}

% Set colour of links to black so that they don't show up when printed
\usepackage{hyperref}
\hypersetup{colorlinks=true, linkcolor=black}

% Tables
\usepackage{booktabs}
\usepackage{threeparttable}
\usepackage{array}
\newcolumntype{x}[1]{%
>{\centering\arraybackslash}m{#1}}%

% Allow for long captions and float captions on opposite page of figures
% \usepackage[rightFloats, CaptionBefore]{fltpage}

% Don't let floats cross subsections
% \usepackage[section,subsection]{extraplaceins}


text:
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">

<dom-module id="a-slide">
  <style>
    :host {
      display: block;
      box-sizing: border-box;
      width: 100%;
      height: 100%;

      -webkit-overflow-scrolling: touch;
      @apply(--layout);
      @apply(--layout-center);
    }

    :host([align-center]) {
      @apply(--layout-center-justified);
    }

    :host([align-right]) {
      @apply(--layout-end-justified);
    }

    :host([align-left]) {
      @apply(--layout-start-justified);
    }

    :host([align-right]) ::content .pretitle,
    :host([align-right]) ::content .title,
    :host([align-right]) ::content .subtitle  {
      text-align: right;
    }

    .content-wrapper {
      max-width: 100%;
      box-sizing: border-box;
    }

    :host([full-width]) > .content-wrapper {
      width: 100%;
    }

    ::content .pretitle,
    ::content .title,
    ::content .subtitle {
      padding: 0 10vw;

      /* Prevent selection */
      -webkit-touch-callout: none;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
    }

    ::content .pretitle {
      font-size: calc(16px + 2vw);
      font-weight: normal;
    }

    ::content .title {
      font-size: calc(16px + 6vw);
      font-weight: bold;
    }

    ::content .subtitle {
      font-size: calc(16px + 4vw);
      font-weight: lighter;
    }
  </style>

  <template>
    <div class="content-wrapper">
      <content select=".pretitle"></content>
      <content select=".title"></content>
      <content select=".subtitle"></content>
      <content></content>
    </div>
  </template>

  <script>
    Polymer({
      is: 'a-slide'
    });
  </script>
</dom-module>


text:
(function (window, undefined) {
  var c,
    cache,
    state,
    view,
    dispatch,
    defaults;

  c = cache = {};
  state = {};
  view = {};
  dispatch = {};
  defaults = {
    backgrounds: [
      '/img/nasa-1.jpg',
      '/img/nasa-2.jpg',
      '/img/nasa-3.jpg',
      '/img/nasa-4.jpg',
      '/img/nasa-5.jpg'
    ]
  };

  cache.init = function () {
    this.body = document.body;
  };

  state.init = function () {
    this.backgrounds = defaults.backgrounds;
  };

  state.getRandomBackground = function () {
    return this.backgrounds[Math.floor(Math.random() * this.backgrounds.length)];
  };

  view.init = function () {
    c.body.style.backgroundImage = 'url(' + state.getRandomBackground() + ')';
  };

  cache.init();
  state.init();
  view.init();

})(window);


text:
/*
  This file is licensed to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

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

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

import org.junit.Rule;
import org.junit.Test;
import org.mockito.Mockito;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.xml.sax.InputSource;
import org.xmlunit.diff.Comparison;
import org.xmlunit.diff.ComparisonFormatter;
import org.xmlunit.diff.ComparisonResult;
import org.xmlunit.diff.ComparisonType;
import org.xmlunit.diff.DefaultNodeMatcher;
import org.xmlunit.diff.DifferenceEvaluator;
import org.xmlunit.diff.DifferenceEvaluators;
import org.xmlunit.diff.ElementSelectors;
import org.xmlunit.util.Predicate;

import java.io.IOException;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import static org.xmlunit.assertj.ExpectedException.none;
import static org.xmlunit.assertj.XmlAssert.assertThat;
import static org.xmlunit.diff.DifferenceEvaluators.chain;

public class CompareAssertAreIdenticalTest {

    @Rule
    public ExpectedException thrown = none();

    @Test
    public void testAreIdentical_withSameAttributesOrder_shouldPass() {

        String testXml = "<Element attr1=\"12\" attr2=\"xy\"/>";
        String controlXml = "<Element attr1=\"12\" attr2=\"xy\"/>";

        assertThat(testXml).and(controlXml).areIdentical();
    }

    @Test
    public void testAreIdentical_withDifferentAttributesOrder_shouldPass() {

        String testXml = "<Element attr2=\"xy\" attr1=\"12\"/>";
        String controlXml = "<Element attr1=\"12\" attr2=\"xy\"/>";

        assertThat(testXml).and(controlXml).areIdentical();
    }

    @Test
    public void testAreIdentical_shouldFail() {

        thrown.expectAssertionError("Expecting:%n <control instance> and <test instance> to be identical");
        thrown.expectAssertionError("Expected node type 'CDATA Section' but was 'Text'");

        String testXml = "<!DOCTYPE a>" +
                "" +
                "   text" +
                "   <c>" +
                "      <d/>" +
                "      <xyz:e/>" +
                "   </c>" +
                "";

        String controlXml = "" +
                "" +
                "   <![CDATA[text]]>" +
                "   <c>" +
                "      <d/>" +
                "      <vwy:e/>" +
                "   </c>" +
                "";

        assertThat(testXml).and(controlXml).areIdentical();
    }

    @Test
    public void testAreIdentical_shouldUseCustomFailMessage() {

        thrown.expectAssertionError("Alarm alarm!");

        String testXml = "<!DOCTYPE a>" +
                "" +
                "   text" +
                "   <c>" +
                "      <d/>" +
                "      <xyz:e/>" +
                "   </c>" +
                "";

        String controlXml = "" +
                "" +
                "   <![CDATA[text]]>" +
                "   <c>" +
                "      <d/>" +
                "      <vwy:e/>" +
                "   </c>" +
                "";

        assertThat(testXml)
            .withFailMessage("Alarm alarm!")
            .and(controlXml).areIdentical();
    }

    @Test
    public void testAreIdentical_shouldFailed_withReadableMessage() {

        thrown.expectAssertionError("Expecting:%n <control instance> and <test instance> to be identical");
        thrown.expectAssertionError("Expected attribute value 'xy' but was 'xyz'");
        thrown.expectAssertionError("at /Element[1]/@attr2");
        thrown.expectAssertionError("attr2=\"xyz\"");

        String testXml = "<Element attr2=\"xyz\" attr1=\"12\"/>";
        String controlXml = "<Element attr1=\"12\" attr2=\"xy\"/>";

        assertThat(testXml).and(controlXml).areIdentical();
    }

    @Test
    public void testAreIdentical_shouldFailed_withElementOrderMessage() {

        thrown.expectAssertionError("Expecting:%n <control instance> and <test instance> to be identical");
        thrown.expectAssertionError("Expected child nodelist sequence '0' but was '1'");
        thrown.expectAssertionError("comparing  at /a[1]/b[1] to  at /a[1]/b[1]");

        String testXml = "<c/>";
        String controlXml = "<c/>";

        assertThat(testXml).and(controlXml)
                .withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byNameAndText))
                .areIdentical();
    }

    @Test
    public void testAreIdentical_withWhitespaces_shouldFailed() {

        thrown.expectAssertionError("Expecting:%n <control instance> and <test instance> to be identical");
        thrown.expectAssertionError("Expected child nodelist length '1' but was '3'");
        thrown.expectAssertionError("expected:<[]> but was:<[%n %n]>");

        String testXml = String.format("%n %n");
        String controlXml = "";

        assertThat(testXml).and(controlXml).areIdentical();
    }

    @Test
    public void testAreIdentical_withIgnoreWhitespacees_shouldPass() {

        String testXml = String.format("%n %n");
        String controlXml = "";

        assertThat(testXml).and(controlXml)
                .ignoreWhitespace()
                .areIdentical();
    }

    @Test
    public void testAreIdentical_withIgnoreWhitespaceAndTextValue_shouldPass() {

        String testXml = String.format("%nX %n");
        String controlXml = "X";

        assertThat(testXml).and(controlXml)
                .ignoreWhitespace()
                .areIdentical();
    }

    @Test
    public void testAreIdentical_withIgnoreElementContentWhitespace_shouldFailed() {

        thrown.expectAssertionError("Expecting:%n <control instance> and <test instance> to be identical");
        thrown.expectAssertionError("Expected text value 'x' but was '\nx '");

        String testXml = String.format("%nx %n");
        String controlXml = "x";

        assertThat(testXml).and(controlXml)
                .ignoreElementContentWhitespace()
                .areIdentical();
    }

    @Test
    public void testAreIdentical_withIgnoreComments_shouldPass() {

        String testXml = "";
        String controlXml = "";

        assertThat(testXml).and(controlXml)
                .ignoreComments()
                .areIdentical();
    }

    @Test
    public void testAreIdentical_withIgnoreComments_1_0_shouldPass() {

        String testXml = "";
        String controlXml = "";

        assertThat(testXml).and(controlXml)
                .ignoreCommentsUsingXSLTVersion("1.0")
                .areIdentical();
    }

    @Test
    public void testAreIdentical_withIgnoreComments_2_0_shouldPass() {

        String testXml = "";
        String controlXml = "";

        assertThat(testXml).and(controlXml)
                .ignoreCommentsUsingXSLTVersion("2.0")
                .areIdentical();
    }

    @Test
    public void testAreIdentical_withNormalizeWhitespace_shouldPass() {

        String testXml = String.format("%n  %n  Test%n  Node%n  %n");
        String controlXml = "Test Node";

        assertThat(testXml).and(controlXml)
                .normalizeWhitespace()
                .areIdentical();
    }

    @Test
    public void testAreIdentical_withNormalizeWhitespace_shouldFailed() {

        thrown.expectAssertionError("Expecting:%n <control instance> and <test instance> to be identical");
        thrown.expectAssertionError("Expected text value 'TestNode' but was 'Test Node'");

        String testXml = String.format("%n  %n  Test%n  Node%n  %n");
        String controlXml = "TestNode";

        assertThat(testXml).and(controlXml)
                .normalizeWhitespace()
                .areIdentical();
    }

    @Test
    public void testAreIdentical_withInvalidTestXml_shouldFailed() {

        thrown.expectAssertionErrorPattern(".*Expecting code not to raise a throwable but caught.*Caught exception during comparison.*");

        String testXml = "abc";
        String controlXml = "<c/>";

        assertThat(testXml).and(controlXml).areIdentical();
    }

    @Test
    public void testAreIdentical_withInvalidControlXml_shouldFailed() {

        thrown.expectAssertionErrorPattern(".*Expecting code not to raise a throwable but caught.*Caught exception during comparison.*");

        String testXml = "<c/>";
        String controlXml = "abc";

        assertThat(testXml).and(controlXml).areIdentical();
    }

    @Test
    public void testAreIdentical_withDifferenceEvaluator_shouldPass() {

        String testXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
                "<feed>" +
                "   <title>title</title>" +
                "   <entry>" +
                "       <title>title1</title>" +
                "       <id>id1</id>" +
                "   </entry>" +
                "</feed>";

        String controlXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
                "<feed>" +
                "   <title>title</title>" +
                "   <entry>" +
                "       <description>description</description>" +
                "       <uuid>uuid1</uuid>" +
                "   </entry>" +
                "</feed>";

        assertThat(testXml).and(controlXml)
                .withDifferenceEvaluator(
                        chain(DifferenceEvaluators.Default,
                                new IgnoreNodeEvaluator("entry")))
                .areIdentical();
    }

    @Test
    public void testAreIdentical_withAttributeFilter_shouldPass() {

        String testXml = "<Element attr2=\"xyz\" attr1=\"12\"/>";
        String controlXml = "<Element attr1=\"12\" attr2=\"xy\"/>";

        assertThat(testXml).and(controlXml)
                .withAttributeFilter(new AttributeFilter("attr2"))
                .areIdentical();
    }

    @Test
    public void testAreIdentical_withNodeFilter_shouldPass() {

        String testXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
                "<feed>" +
                "   <title>title</title>" +
                "   <entry>" +
                "       <title>title1</title>" +
                "       <id>id1</id>" +
                "   </entry>" +
                "</feed>";

        String controlXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
                "<feed>" +
                "   <title>title</title>" +
                "   <entry>" +
                "       <description>description</description>" +
                "       <uuid>uuid1</uuid>" +
                "   </entry>" +
                "</feed>";

        assertThat(testXml).and(controlXml)
                .withNodeFilter(new NodeFilter("entry"))
                .areIdentical();
    }

    @Test
    public void testAreIdentical_withComparisonFormatter_shouldFailed() {

        thrown.expectAssertionError("Expecting:%n <control instance> and <test instance> to be identical");
        thrown.expectAssertionError("foo");
        thrown.expectAssertionErrorPattern(".*bar.*bar.*");

        String testXml = "<c/>";
        String controlXml = "<c/>";

        assertThat(testXml).and(controlXml)
                .withComparisonFormatter(new DummyFormatter())
                .withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byNameAndText))
                .areIdentical();
    }

    @Test
    public void usesDocumentBuilderFactorySpecifiedOnXmlAssert() throws Exception {
        thrown.expectAssertionError("Expecting code not to raise a throwable but caught");
        thrown.expectAssertionError("org.xmlunit.XMLUnitException: Caught exception during comparison");
        thrown.expectAssertionError("java.io.IOException");

        DocumentBuilderFactory dFac = Mockito.mock(DocumentBuilderFactory.class);
        DocumentBuilder b = Mockito.mock(DocumentBuilder.class);
        Mockito.when(dFac.newDocumentBuilder()).thenReturn(b);
        Mockito.doThrow(new IOException())
                .when(b).parse(Mockito.any(InputSource.class));

        String control = "<c/>";

        try {
            assertThat(control)
                    .withDocumentBuilderFactory(dFac)
                    .and(control)
                    .areIdentical();
        } finally {
            Mockito.verify(b).parse(Mockito.any(InputSource.class));
        }
    }

    @Test
    public void usesDocumentBuilderFactorySpecifiedCompareXmlAssert() throws Exception {
        thrown.expectAssertionError("Expecting code not to raise a throwable but caught");
        thrown.expectAssertionError("org.xmlunit.XMLUnitException: Caught exception during comparison");
        thrown.expectAssertionError("java.io.IOException");

        DocumentBuilderFactory dFac = Mockito.mock(DocumentBuilderFactory.class);
        DocumentBuilder b = Mockito.mock(DocumentBuilder.class);
        Mockito.when(dFac.newDocumentBuilder()).thenReturn(b);
        Mockito.doThrow(new IOException())
                .when(b).parse(Mockito.any(InputSource.class));

        String control = "<c/>";

        try {
            assertThat(control)
                    .and(control)
                    .withDocumentBuilderFactory(dFac)
                    .areIdentical();
        } finally {
            Mockito.verify(b).parse(Mockito.any(InputSource.class));
        }
    }

    @Test
    public void testAreIdentical_withIgnoreChildNodesOrder_shouldPass() {

        String testXml = "" +
                "   <c><d/><e/></c>" +
                "   text" +
                "";

        String controlXml = "" +
                "   text" +
                "   <c><e/><d/></c>" +
                "";

        assertThat(testXml).and(controlXml)
                .ignoreChildNodesOrder()
                .areIdentical();
    }

    private final class IgnoreNodeEvaluator implements DifferenceEvaluator {

        private final String nodeName;

        public IgnoreNodeEvaluator(String nodeName) {
            this.nodeName = nodeName;
        }

        @Override
        public ComparisonResult evaluate(Comparison comparison, ComparisonResult outcome) {
            Node controlNode = comparison.getControlDetails().getTarget();

            do {
                if (controlNode instanceof Element) {
                    Element elem = (Element) controlNode;
                    if (elem.getTagName().equals(nodeName)) {
                        return ComparisonResult.EQUAL;
                    }
                }
                controlNode = controlNode.getParentNode();
            } while (controlNode != null);

            return outcome;
        }
    }

    private final class AttributeFilter implements Predicate<Attr> {

        private final String attrName;

        private AttributeFilter(String attrName) {
            this.attrName = attrName;
        }

        @Override
        public boolean test(Attr toTest) {
            return !attrName.equalsIgnoreCase(toTest.getName());
        }
    }

    private final class NodeFilter implements Predicate<Node> {

        private final String nodeName;

        private NodeFilter(String nodeName) {
            this.nodeName = nodeName;
        }

        @Override
        public boolean test(Node toTest) {
            if (toTest instanceof Element) {
                return !nodeName.equalsIgnoreCase(((Element) toTest).getTagName());
            }
            return true;
        }
    }

    private static final class DummyFormatter implements ComparisonFormatter {
        @Override
        public String getDescription(Comparison difference) {
            return "foo";
        }

        @Override
        public String getDetails(Comparison.Detail details, ComparisonType type,
                                 boolean formatXml) {
            return "bar";
        }
    }
}


text:
cask 'boostnote' do
  version '0.11.8'
  sha256 'acfd54dc84f2a41447e93329220350e269a326d5906058826aea57a7875b8839'

  # github.com/BoostIO/boost-releases was verified as official when first introduced to the cask
  url "https://github.com/BoostIO/boost-releases/releases/download/v#{version}/Boostnote-mac.dmg"
  appcast 'https://github.com/BoostIO/boost-releases/releases.atom'
  name 'Boostnote'
  homepage 'https://boostnote.io/'

  auto_updates true
  depends_on macos: '>= :mavericks'

  app 'Boostnote.app'

  uninstall signal: [
                      ['TERM', 'com.maisin.boost.helper'],
                      ['TERM', 'com.maisin.boost'],
                    ]

  zap trash: [
               '~/Library/Application Support/boost',
               '~/Library/Preferences/com.maisin.boost.plist',
               '~/Library/Preferences/com.maisin.boost.helper.plist',
               '~/Library/Saved Application State/com.maisin.boost.savedState',
             ]
end


text:
<?php

namespace RectorPrefix20210615;

return [];


text:
package org.kuali.rice.kew.dto;

/**
 * Signal to the PostProcessor that the routeHeader is about to be processed
 *
 * @author Kuali Rice Team (rice.collab@kuali.org)
 */
public class DocumentLockingEventDTO extends DocumentEventDTO {

	private static final long serialVersionUID = 1462372563938714818L;

    public DocumentLockingEventDTO() {
        super(LOCK_DOCUMENTS);
    }

}


text:
@{
GUID="{Fb6cc51d-c096-4b38-b78d-0fed6277096a}"
Author="PowerShell"
CompanyName="Microsoft Corporation"
Copyright="Copyright (c) Microsoft Corporation. All rights reserved."
ModuleVersion="6.1.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion="3.0"
RootModule="Microsoft.Management.Infrastructure.CimCmdlets"
RequiredAssemblies="Microsoft.Management.Infrastructure.CimCmdlets.dll","Microsoft.Management.Infrastructure.Dll"
FunctionsToExport = @()
CmdletsToExport= "Get-CimAssociatedInstance", "Get-CimClass", "Get-CimInstance", "Get-CimSession", "Invoke-CimMethod",
    "New-CimInstance","New-CimSession","New-CimSessionOption","Register-CimIndicationEvent","Remove-CimInstance",
    "Remove-CimSession","Set-CimInstance",
    "Export-BinaryMiLog","Import-BinaryMiLog"
AliasesToExport = "gcim","scim","ncim", "rcim","icim","gcai","rcie","ncms","rcms","gcms","ncso","gcls"
HelpInfoUri="https://go.microsoft.com/fwlink/?linkid=855946"
}