text:
namespace NFMsg {

namespace {

const ::google::protobuf::Descriptor* PackMysqlParam_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  PackMysqlParam_reflection_ = NULL;
const ::google::protobuf::Descriptor* PackMysqlServerInfo_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  PackMysqlServerInfo_reflection_ = NULL;

}  // namespace

void protobuf_AssignDesc_NFMsgMysql_2eproto() {
  protobuf_AddDesc_NFMsgMysql_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "NFMsgMysql.proto");
  GOOGLE_CHECK(file != NULL);
  PackMysqlParam_descriptor_ = file->message_type(0);
  static const int PackMysqlParam_offsets_[8] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlParam, strrecordname_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlParam, strkey_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlParam, fieldveclist_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlParam, valueveclist_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlParam, bexit_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlParam, nreqid_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlParam, nret_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlParam, etype_),
  };
  PackMysqlParam_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      PackMysqlParam_descriptor_,
      PackMysqlParam::default_instance_,
      PackMysqlParam_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlParam, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlParam, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(PackMysqlParam));
  PackMysqlServerInfo_descriptor_ = file->message_type(1);
  static const int PackMysqlServerInfo_offsets_[8] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlServerInfo, nrconnecttime_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlServerInfo, nrconnecount_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlServerInfo, nport_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlServerInfo, strdbname_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlServerInfo, strdnsip_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlServerInfo, strdbuser_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlServerInfo, strdbpwd_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlServerInfo, nserverid_),
  };
  PackMysqlServerInfo_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      PackMysqlServerInfo_descriptor_,
      PackMysqlServerInfo::default_instance_,
      PackMysqlServerInfo_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlServerInfo, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PackMysqlServerInfo, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(PackMysqlServerInfo));
}

namespace {

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
inline void protobuf_AssignDescriptorsOnce() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
                 &protobuf_AssignDesc_NFMsgMysql_2eproto);
}

void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    PackMysqlParam_descriptor_, &PackMysqlParam::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    PackMysqlServerInfo_descriptor_, &PackMysqlServerInfo::default_instance());
}

}  // namespace

void protobuf_ShutdownFile_NFMsgMysql_2eproto() {
  delete PackMysqlParam::default_instance_;
  delete PackMysqlParam_reflection_;
  delete PackMysqlServerInfo::default_instance_;
  delete PackMysqlServerInfo_reflection_;
}

void protobuf_AddDesc_NFMsgMysql_2eproto() {
  static bool already_here = false;
  if (already_here) return;
  already_here = true;
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\020NFMsgMysql.proto\022\005NFMsg\"\237\001\n\016PackMysqlP"
    "aram\022\025\n\rstrRecordName\030\001 \002(\014\022\016\n\006strKey\030\002 "
    "\002(\014\022\024\n\014fieldVecList\030\003 \003(\014\022\024\n\014valueVecLis"
    "t\030\004 \003(\014\022\r\n\005bExit\030\005 \002(\003\022\016\n\006nreqid\030\006 \002(\003\022\014"
    "\n\004nRet\030\007 \002(\003\022\r\n\005eType\030\010 \002(\003\"\256\001\n\023PackMysq"
    "lServerInfo\022\025\n\rnRconnectTime\030\001 \002(\003\022\024\n\014nR"
    "conneCount\030\002 \002(\003\022\r\n\005nPort\030\003 \002(\003\022\021\n\tstrDB"
    "Name\030\004 \002(\014\022\020\n\010strDnsIp\030\005 \002(\014\022\021\n\tstrDBUse"
    "r\030\006 \002(\014\022\020\n\010strDBPwd\030\007 \002(\014\022\021\n\tnServerID\030\010"
    " \002(\003", 364);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "NFMsgMysql.proto", &protobuf_RegisterTypes);
  PackMysqlParam::default_instance_ = new PackMysqlParam();
  PackMysqlServerInfo::default_instance_ = new PackMysqlServerInfo();
  PackMysqlParam::default_instance_->InitAsDefaultInstance();
  PackMysqlServerInfo::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_NFMsgMysql_2eproto);
}

// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_NFMsgMysql_2eproto {
  StaticDescriptorInitializer_NFMsgMysql_2eproto() {
    protobuf_AddDesc_NFMsgMysql_2eproto();
  }
} static_descriptor_initializer_NFMsgMysql_2eproto_;

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

#ifndef _MSC_VER
const int PackMysqlParam::kStrRecordNameFieldNumber;
const int PackMysqlParam::kStrKeyFieldNumber;
const int PackMysqlParam::kFieldVecListFieldNumber;
const int PackMysqlParam::kValueVecListFieldNumber;
const int PackMysqlParam::kBExitFieldNumber;
const int PackMysqlParam::kNreqidFieldNumber;
const int PackMysqlParam::kNRetFieldNumber;
const int PackMysqlParam::kETypeFieldNumber;
#endif  // !_MSC_VER

PackMysqlParam::PackMysqlParam()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void PackMysqlParam::InitAsDefaultInstance() {
}

PackMysqlParam::PackMysqlParam(const PackMysqlParam& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void PackMysqlParam::SharedCtor() {
  _cached_size_ = 0;
  strrecordname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  strkey_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  bexit_ = GOOGLE_LONGLONG(0);
  nreqid_ = GOOGLE_LONGLONG(0);
  nret_ = GOOGLE_LONGLONG(0);
  etype_ = GOOGLE_LONGLONG(0);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

PackMysqlParam::~PackMysqlParam() {
  SharedDtor();
}

void PackMysqlParam::SharedDtor() {
  if (strrecordname_ != &::google::protobuf::internal::kEmptyString) {
    delete strrecordname_;
  }
  if (strkey_ != &::google::protobuf::internal::kEmptyString) {
    delete strkey_;
  }
  if (this != default_instance_) {
  }
}

void PackMysqlParam::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* PackMysqlParam::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return PackMysqlParam_descriptor_;
}

const PackMysqlParam& PackMysqlParam::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_NFMsgMysql_2eproto();
  return *default_instance_;
}

PackMysqlParam* PackMysqlParam::default_instance_ = NULL;

PackMysqlParam* PackMysqlParam::New() const {
  return new PackMysqlParam;
}

void PackMysqlParam::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_strrecordname()) {
      if (strrecordname_ != &::google::protobuf::internal::kEmptyString) {
        strrecordname_->clear();
      }
    }
    if (has_strkey()) {
      if (strkey_ != &::google::protobuf::internal::kEmptyString) {
        strkey_->clear();
      }
    }
    bexit_ = GOOGLE_LONGLONG(0);
    nreqid_ = GOOGLE_LONGLONG(0);
    nret_ = GOOGLE_LONGLONG(0);
    etype_ = GOOGLE_LONGLONG(0);
  }
  fieldveclist_.Clear();
  valueveclist_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool PackMysqlParam::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required bytes strRecordName = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_strrecordname()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_strKey;
        break;
      }

      // required bytes strKey = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_strKey:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_strkey()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_fieldVecList;
        break;
      }

      // repeated bytes fieldVecList = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_fieldVecList:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->add_fieldveclist()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_fieldVecList;
        if (input->ExpectTag(34)) goto parse_valueVecList;
        break;
      }

      // repeated bytes valueVecList = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_valueVecList:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->add_valueveclist()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(34)) goto parse_valueVecList;
        if (input->ExpectTag(40)) goto parse_bExit;
        break;
      }

      // required int64 bExit = 5;
      case 5: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_bExit:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &bexit_)));
          set_has_bexit();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(48)) goto parse_nreqid;
        break;
      }

      // required int64 nreqid = 6;
      case 6: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_nreqid:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &nreqid_)));
          set_has_nreqid();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(56)) goto parse_nRet;
        break;
      }

      // required int64 nRet = 7;
      case 7: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_nRet:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &nret_)));
          set_has_nret();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(64)) goto parse_eType;
        break;
      }

      // required int64 eType = 8;
      case 8: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_eType:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &etype_)));
          set_has_etype();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void PackMysqlParam::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // required bytes strRecordName = 1;
  if (has_strrecordname()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      1, this->strrecordname(), output);
  }

  // required bytes strKey = 2;
  if (has_strkey()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      2, this->strkey(), output);
  }

  // repeated bytes fieldVecList = 3;
  for (int i = 0; i < this->fieldveclist_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      3, this->fieldveclist(i), output);
  }

  // repeated bytes valueVecList = 4;
  for (int i = 0; i < this->valueveclist_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      4, this->valueveclist(i), output);
  }

  // required int64 bExit = 5;
  if (has_bexit()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->bexit(), output);
  }

  // required int64 nreqid = 6;
  if (has_nreqid()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->nreqid(), output);
  }

  // required int64 nRet = 7;
  if (has_nret()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(7, this->nret(), output);
  }

  // required int64 eType = 8;
  if (has_etype()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(8, this->etype(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* PackMysqlParam::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // required bytes strRecordName = 1;
  if (has_strrecordname()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        1, this->strrecordname(), target);
  }

  // required bytes strKey = 2;
  if (has_strkey()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        2, this->strkey(), target);
  }

  // repeated bytes fieldVecList = 3;
  for (int i = 0; i < this->fieldveclist_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteBytesToArray(3, this->fieldveclist(i), target);
  }

  // repeated bytes valueVecList = 4;
  for (int i = 0; i < this->valueveclist_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteBytesToArray(4, this->valueveclist(i), target);
  }

  // required int64 bExit = 5;
  if (has_bexit()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->bexit(), target);
  }

  // required int64 nreqid = 6;
  if (has_nreqid()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(6, this->nreqid(), target);
  }

  // required int64 nRet = 7;
  if (has_nret()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(7, this->nret(), target);
  }

  // required int64 eType = 8;
  if (has_etype()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(8, this->etype(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int PackMysqlParam::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required bytes strRecordName = 1;
    if (has_strrecordname()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->strrecordname());
    }

    // required bytes strKey = 2;
    if (has_strkey()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->strkey());
    }

    // required int64 bExit = 5;
    if (has_bexit()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->bexit());
    }

    // required int64 nreqid = 6;
    if (has_nreqid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->nreqid());
    }

    // required int64 nRet = 7;
    if (has_nret()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->nret());
    }

    // required int64 eType = 8;
    if (has_etype()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->etype());
    }

  }
  // repeated bytes fieldVecList = 3;
  total_size += 1 * this->fieldveclist_size();
  for (int i = 0; i < this->fieldveclist_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
      this->fieldveclist(i));
  }

  // repeated bytes valueVecList = 4;
  total_size += 1 * this->valueveclist_size();
  for (int i = 0; i < this->valueveclist_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
      this->valueveclist(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void PackMysqlParam::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const PackMysqlParam* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const PackMysqlParam*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void PackMysqlParam::MergeFrom(const PackMysqlParam& from) {
  GOOGLE_CHECK_NE(&from, this);
  fieldveclist_.MergeFrom(from.fieldveclist_);
  valueveclist_.MergeFrom(from.valueveclist_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_strrecordname()) {
      set_strrecordname(from.strrecordname());
    }
    if (from.has_strkey()) {
      set_strkey(from.strkey());
    }
    if (from.has_bexit()) {
      set_bexit(from.bexit());
    }
    if (from.has_nreqid()) {
      set_nreqid(from.nreqid());
    }
    if (from.has_nret()) {
      set_nret(from.nret());
    }
    if (from.has_etype()) {
      set_etype(from.etype());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void PackMysqlParam::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void PackMysqlParam::CopyFrom(const PackMysqlParam& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PackMysqlParam::IsInitialized() const {
  if ((_has_bits_[0] & 0x000000f3) != 0x000000f3) return false;

  return true;
}

void PackMysqlParam::Swap(PackMysqlParam* other) {
  if (other != this) {
    std::swap(strrecordname_, other->strrecordname_);
    std::swap(strkey_, other->strkey_);
    fieldveclist_.Swap(&other->fieldveclist_);
    valueveclist_.Swap(&other->valueveclist_);
    std::swap(bexit_, other->bexit_);
    std::swap(nreqid_, other->nreqid_);
    std::swap(nret_, other->nret_);
    std::swap(etype_, other->etype_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata PackMysqlParam::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = PackMysqlParam_descriptor_;
  metadata.reflection = PackMysqlParam_reflection_;
  return metadata;
}

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

#ifndef _MSC_VER
const int PackMysqlServerInfo::kNRconnectTimeFieldNumber;
const int PackMysqlServerInfo::kNRconneCountFieldNumber;
const int PackMysqlServerInfo::kNPortFieldNumber;
const int PackMysqlServerInfo::kStrDBNameFieldNumber;
const int PackMysqlServerInfo::kStrDnsIpFieldNumber;
const int PackMysqlServerInfo::kStrDBUserFieldNumber;
const int PackMysqlServerInfo::kStrDBPwdFieldNumber;
const int PackMysqlServerInfo::kNServerIDFieldNumber;
#endif  // !_MSC_VER

PackMysqlServerInfo::PackMysqlServerInfo()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void PackMysqlServerInfo::InitAsDefaultInstance() {
}

PackMysqlServerInfo::PackMysqlServerInfo(const PackMysqlServerInfo& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void PackMysqlServerInfo::SharedCtor() {
  _cached_size_ = 0;
  nrconnecttime_ = GOOGLE_LONGLONG(0);
  nrconnecount_ = GOOGLE_LONGLONG(0);
  nport_ = GOOGLE_LONGLONG(0);
  strdbname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  strdnsip_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  strdbuser_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  strdbpwd_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  nserverid_ = GOOGLE_LONGLONG(0);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

PackMysqlServerInfo::~PackMysqlServerInfo() {
  SharedDtor();
}

void PackMysqlServerInfo::SharedDtor() {
  if (strdbname_ != &::google::protobuf::internal::kEmptyString) {
    delete strdbname_;
  }
  if (strdnsip_ != &::google::protobuf::internal::kEmptyString) {
    delete strdnsip_;
  }
  if (strdbuser_ != &::google::protobuf::internal::kEmptyString) {
    delete strdbuser_;
  }
  if (strdbpwd_ != &::google::protobuf::internal::kEmptyString) {
    delete strdbpwd_;
  }
  if (this != default_instance_) {
  }
}

void PackMysqlServerInfo::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* PackMysqlServerInfo::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return PackMysqlServerInfo_descriptor_;
}

const PackMysqlServerInfo& PackMysqlServerInfo::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_NFMsgMysql_2eproto();
  return *default_instance_;
}

PackMysqlServerInfo* PackMysqlServerInfo::default_instance_ = NULL;

PackMysqlServerInfo* PackMysqlServerInfo::New() const {
  return new PackMysqlServerInfo;
}

void PackMysqlServerInfo::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    nrconnecttime_ = GOOGLE_LONGLONG(0);
    nrconnecount_ = GOOGLE_LONGLONG(0);
    nport_ = GOOGLE_LONGLONG(0);
    if (has_strdbname()) {
      if (strdbname_ != &::google::protobuf::internal::kEmptyString) {
        strdbname_->clear();
      }
    }
    if (has_strdnsip()) {
      if (strdnsip_ != &::google::protobuf::internal::kEmptyString) {
        strdnsip_->clear();
      }
    }
    if (has_strdbuser()) {
      if (strdbuser_ != &::google::protobuf::internal::kEmptyString) {
        strdbuser_->clear();
      }
    }
    if (has_strdbpwd()) {
      if (strdbpwd_ != &::google::protobuf::internal::kEmptyString) {
        strdbpwd_->clear();
      }
    }
    nserverid_ = GOOGLE_LONGLONG(0);
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool PackMysqlServerInfo::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required int64 nRconnectTime = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &nrconnecttime_)));
          set_has_nrconnecttime();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_nRconneCount;
        break;
      }

      // required int64 nRconneCount = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_nRconneCount:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &nrconnecount_)));
          set_has_nrconnecount();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_nPort;
        break;
      }

      // required int64 nPort = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_nPort:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &nport_)));
          set_has_nport();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(34)) goto parse_strDBName;
        break;
      }

      // required bytes strDBName = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_strDBName:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_strdbname()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(42)) goto parse_strDnsIp;
        break;
      }

      // required bytes strDnsIp = 5;
      case 5: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_strDnsIp:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_strdnsip()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(50)) goto parse_strDBUser;
        break;
      }

      // required bytes strDBUser = 6;
      case 6: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_strDBUser:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_strdbuser()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(58)) goto parse_strDBPwd;
        break;
      }

      // required bytes strDBPwd = 7;
      case 7: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_strDBPwd:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_strdbpwd()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(64)) goto parse_nServerID;
        break;
      }

      // required int64 nServerID = 8;
      case 8: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_nServerID:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &nserverid_)));
          set_has_nserverid();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void PackMysqlServerInfo::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // required int64 nRconnectTime = 1;
  if (has_nrconnecttime()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->nrconnecttime(), output);
  }

  // required int64 nRconneCount = 2;
  if (has_nrconnecount()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->nrconnecount(), output);
  }

  // required int64 nPort = 3;
  if (has_nport()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->nport(), output);
  }

  // required bytes strDBName = 4;
  if (has_strdbname()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      4, this->strdbname(), output);
  }

  // required bytes strDnsIp = 5;
  if (has_strdnsip()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      5, this->strdnsip(), output);
  }

  // required bytes strDBUser = 6;
  if (has_strdbuser()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      6, this->strdbuser(), output);
  }

  // required bytes strDBPwd = 7;
  if (has_strdbpwd()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      7, this->strdbpwd(), output);
  }

  // required int64 nServerID = 8;
  if (has_nserverid()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(8, this->nserverid(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* PackMysqlServerInfo::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // required int64 nRconnectTime = 1;
  if (has_nrconnecttime()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->nrconnecttime(), target);
  }

  // required int64 nRconneCount = 2;
  if (has_nrconnecount()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->nrconnecount(), target);
  }

  // required int64 nPort = 3;
  if (has_nport()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->nport(), target);
  }

  // required bytes strDBName = 4;
  if (has_strdbname()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        4, this->strdbname(), target);
  }

  // required bytes strDnsIp = 5;
  if (has_strdnsip()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        5, this->strdnsip(), target);
  }

  // required bytes strDBUser = 6;
  if (has_strdbuser()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        6, this->strdbuser(), target);
  }

  // required bytes strDBPwd = 7;
  if (has_strdbpwd()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        7, this->strdbpwd(), target);
  }

  // required int64 nServerID = 8;
  if (has_nserverid()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(8, this->nserverid(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int PackMysqlServerInfo::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required int64 nRconnectTime = 1;
    if (has_nrconnecttime()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->nrconnecttime());
    }

    // required int64 nRconneCount = 2;
    if (has_nrconnecount()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->nrconnecount());
    }

    // required int64 nPort = 3;
    if (has_nport()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->nport());
    }

    // required bytes strDBName = 4;
    if (has_strdbname()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->strdbname());
    }

    // required bytes strDnsIp = 5;
    if (has_strdnsip()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->strdnsip());
    }

    // required bytes strDBUser = 6;
    if (has_strdbuser()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->strdbuser());
    }

    // required bytes strDBPwd = 7;
    if (has_strdbpwd()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->strdbpwd());
    }

    // required int64 nServerID = 8;
    if (has_nserverid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->nserverid());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void PackMysqlServerInfo::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const PackMysqlServerInfo* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const PackMysqlServerInfo*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void PackMysqlServerInfo::MergeFrom(const PackMysqlServerInfo& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_nrconnecttime()) {
      set_nrconnecttime(from.nrconnecttime());
    }
    if (from.has_nrconnecount()) {
      set_nrconnecount(from.nrconnecount());
    }
    if (from.has_nport()) {
      set_nport(from.nport());
    }
    if (from.has_strdbname()) {
      set_strdbname(from.strdbname());
    }
    if (from.has_strdnsip()) {
      set_strdnsip(from.strdnsip());
    }
    if (from.has_strdbuser()) {
      set_strdbuser(from.strdbuser());
    }
    if (from.has_strdbpwd()) {
      set_strdbpwd(from.strdbpwd());
    }
    if (from.has_nserverid()) {
      set_nserverid(from.nserverid());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void PackMysqlServerInfo::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void PackMysqlServerInfo::CopyFrom(const PackMysqlServerInfo& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PackMysqlServerInfo::IsInitialized() const {
  if ((_has_bits_[0] & 0x000000ff) != 0x000000ff) return false;

  return true;
}

void PackMysqlServerInfo::Swap(PackMysqlServerInfo* other) {
  if (other != this) {
    std::swap(nrconnecttime_, other->nrconnecttime_);
    std::swap(nrconnecount_, other->nrconnecount_);
    std::swap(nport_, other->nport_);
    std::swap(strdbname_, other->strdbname_);
    std::swap(strdnsip_, other->strdnsip_);
    std::swap(strdbuser_, other->strdbuser_);
    std::swap(strdbpwd_, other->strdbpwd_);
    std::swap(nserverid_, other->nserverid_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata PackMysqlServerInfo::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = PackMysqlServerInfo_descriptor_;
  metadata.reflection = PackMysqlServerInfo_reflection_;
  return metadata;
}

// @@protoc_insertion_point(namespace_scope)

}  // namespace NFMsg

// @@protoc_insertion_point(global_scope)


text:
package org.wikimapia.api;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import java.util.Locale;

/**
 * https://raw.githubusercontent.com/Sannis/wikimapia-api-clients/master/java/WikimapiaAPI.java
 * Wikimapia API Java Client Class
 *
 * @author Wikimapia API Stuff
 * @version 0.1
 * @package Wikimapia API
 * @tutorial http://wikimapia.org/api/
 */
public class WikimapiaAPI {

    Parser m_Parser = new Parser();

    public enum Format {
        XML("xml"),
        JSON("json"),
        KML("kml"),
        BINARY("binary");

        public final String key;

        Format(String format) {
            key = format;
        }
    }

    /**
     * Wikimapia API URL
     * Do not change this!
     */
    protected String m_Url = "http://api.wikimapia.org";

    /**
     * This is your Wikimapia API Key.
     * <p>
     * If you do not have the key, you can not use the API.
     * You can get it for free by registering on wikimapia.org,
     * and easily create a key on this page:
     * http://wikimapia.org/api/
     */
    protected String m_Key;

    /**
     * Wikimapia Output format
     * For now we support: xml, json, kml, binary
     * Default: xml
     */
    protected Format m_Format = Format.XML;

    /**
     * Packing output data parameter
     * For now we support: gz, none
     * Default: none
     */
    protected String m_Packing = "none";

    /**
     * Output data language
     */
    protected String m_Language = "en";

    /**
     * Object constructor
     *
     * @param string $apiKey You wikimapia API key
     * @param string $format Output format
     */
    public WikimapiaAPI(String apiKey) {
        m_Key = apiKey;
    }

    /**
     *
     * @param apiKey
     * @param format
     */
    public WikimapiaAPI(String apiKey, Format format) {
        m_Key = apiKey;
        m_Format = format;
    }

    /**
     * Set API output data format
     *
     * @param string $format
     * @return boolean
     * @tutorial http://wikimapia.org/api
     */
    public void setFormat(Format format) {
        m_Format = format;
    }

    /**
     * Get selected output data format
     *
     * @return string
     */
    public Format getFormat() {
        return m_Format;
    }

    /**
     * Set API output data packing
     *
     * @param string $pack
     * @return boolean
     * @tutorial http://wikimapia.org/api
     */
    public void setPacking(String packing) {
        m_Packing = packing;
    }

    /**
     * Get selected packing
     *
     * @return string
     */
    public String getPacking() {
        return m_Packing;
    }

    /**
     * Get output data language
     *
     * @return string
     */
    public String getLanguage() {
        return m_Language;
    }

    public void setLanguage(String language) {
        m_Language = language;
    }

    /**
     * Function to get Object data by its ID
     *
     * @param int    $objectId   Object identifier
     * @param string $language   Output language (default `en` - English)
     * @return string   Output data in selected format (see setFormat())
     */
    public String getObjectById(int objectId) {
        return doSendApiRequest("object", "&id=" + objectId);
    }

    /**
     * This is a alias of getObjectsInBoxByLatLon
     *
     * @return string
     */
    public String getObjectInBox(float lon_min, float lat_min, float lon_max, float lat_max) {
        return getObjectsInBoxByLatLon(lon_min, lat_min, lon_max, lat_max);
    }

    /**
     * Get objects in box by latitude and longitude
     *
     * @param float $lon_min Minimum longitude
     * @param float $lat_min Minimum latitude
     * @param float $lon_max Maximum longitude
     * @param float $lat_max Maximum latitude
     * @return string
     */
    public String getObjectsInBoxByLatLon(float lon_min, float lat_min, float lon_max, float lat_max) {
        return doSendApiRequest("box", "lon_min=" + lon_min + "&lat_min=" + lat_min + "&lon_max=" + lon_max + "&lat_max=" + lat_max);
    }

    /**
     * Get objects in box by latitude and longitude separated by comma
     *
     * @param string $bbox -> "$lon_min,$lat_min,$lon_max,$lat_max"
     * @return string
     */
    public String getObjectsInBoxByBBox(String bbox) {
        return doSendApiRequest("box", "bbox=" + bbox);
    }

    /**
     * Get objects in box by tile coordinates
     *
     * @param int $x
     * @param int $y
     * @param int $z
     * @param int $count
     * @return string
     */
    public String getObjectsInBoxByTile(int x, int y, int z, int count) {
        return doSendApiRequest("box", "x=" + x + "&y=" + y + "&z=" + z + "&count=" + count);
    }

    /**
     * Get objects in box by tile coordinates
     *
     * @param int $x
     * @param int $y
     * @param int $z
     * @return string
     */
    public String getObjectsInBoxByTile(int x, int y, int z) {
        return getObjectsInBoxByTile(x, y, x, 50);
    }

    /**
     * Get objects that intersects with point
     *
     * @param float $x
     * @param float $y
     * @return string
     */
    public String getObjectsInPoint(float x, float y) {
        return doSendApiRequest("point", "x=" + x + "&y=" + y);
    }

    /**
     * Get objects that determines search query
     *
     * @param string $query
     * @param int    $page
     * @return string
     */
    public SearchResults getObjectsBySearchQuery(String query, double lat, double lon, int page, int pageSize) {
        String result = doSendApiRequest("search", "q=" + query + "&lat=" + lat + "&lon=" + lon +
                "&page=" + page + "&count=" + pageSize);
        return m_Parser.parseResults(result);
    }

    /**
     * Get objects that determines search query
     *
     * @param string $query
     * @return string
     */
//    public SearchResults getObjectsBySearchQuery(String query) {
//        return getObjectsBySearchQuery(query, 1);
//    }

    /**
     * Send request to api
     *
     * @param string $function
     * @param string $args
     * @return string
     */
    public String doSendApiRequest(String function, String args) {
        // if you don't have a key, create it on http://wikimapia.org/api/
        if (m_Key == null) {
            return null;
        }

        String str = "";
        try {
            // Create a URL for the desired page
            URL url = new URL(m_Url + "/?function=" + function + "&key=" + m_Key + "&format=" + m_Format.key
                + "&pack=" + m_Packing + "&language=" + m_Language + "&" + args);

            // Read all the text returned by the server
            BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));

            String buffer;
            while ((buffer = in.readLine()) != null) {
                str += buffer;
            }

            in.close();

        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

        return str;
    }

    public interface OnCategoryResult {
        void onCategoryResult(Categories results);
    }

    /**
     * since every request counts against the rate limit, save these results and use them later
     *
     * @param callback
     */
    public void getAllCategories(OnCategoryResult callback) {
        try {
            int count;
            int page = 1;
            Categories result = new Categories();
            do {
//                URL url = new URL(m_Url + "/?function=category.getall&key=" + m_Key + "&format=json&page=" + page++ + "&count=100");
                Categories categories = getCategories(page++, 100);
                count = categories.getCategories().size();
                result.addAll(categories);
            } while (count > 0);
            callback.onCategoryResult(result);
        } catch (Exception e) {
            callback.onCategoryResult(new Categories());
        }
    }

    /**
     * pages must start at 1
     *
     * @param page
     * @param pageSize
     * @return
     */
    public Categories getCategories(int page, int pageSize) {
        //http://api.wikimapia.org/?function=category.getall&key=  &format=json&page= & count=
        Categories result = new Categories();
        try {
            String reply = doSendApiRequest("category.getall",
                    String.format("page=%d&count=%d", page, pageSize));
            Categories categories = m_Parser.parseCategoryResults(reply);
            result.addAll(categories);
        } catch (Throwable t) {
            t.printStackTrace();
        }
        return result;
    }

    public SearchResults findByArea(double latNorth, double latSouth, double longEast, double longWest, List<Category> cats) {
        StringBuilder cateogires = new StringBuilder();

        for (Category c: cats) {
            cateogires.append(c.getId()).append(",");
        }
        cateogires.setLength(cateogires.length()-1);

        URL url = null;
        InputStream is = null;
        try {
         url = new URL(m_Url + "/?function=place.getbyarea&key=" + m_Key + "&format=json&page=" + 1 + "&count=" + 100 + "&lon_min=" + longWest + "&lat_min=" + latSouth +"&lon_max=" + longEast+ "&lat_max=" + latNorth + "&categories=" + cateogires.toString());
            System.out.println("fetching " + url.toString());
            is = url.openStream();
            SearchResults searchResults = m_Parser.parseResults(is);
           return searchResults;

        } catch (Throwable t) {
            t.printStackTrace();
        } finally {
            if (is != null) try {
                is.close();
            } catch (Exception ex) {
            }
        }
        return null;
    }
}

redpajama_set_name: RedPajamaGithub


text:
package nl.vu.datalayer.hbase.connection;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

import nl.vu.datalayer.hbase.schema.PrefixMatchRemoteHTable;

import org.apache.hadoop.hbase.client.HTableInterface;
import org.apache.hadoop.hbase.rest.client.Client;
import org.apache.hadoop.hbase.rest.client.Cluster;

public class RESTConnection extends HBaseConnection {

	public static final String REST_SERVER = "rest_server";
	public static final String REST_PORT = "rest_port";

	public static final String DAS4_SERVER = "fs0.das4.cs.vu.nl";
	public static final String DAS4_PORT = "8090";

	private Client client = null;

	public RESTConnection() throws IOException {
		super();
		Cluster cluster = new Cluster();

		Properties prop = new Properties();
		try{
			prop.load(new FileInputStream("config.properties"));
		}
		catch (FileNotFoundException e) {
			//continue to use the default properties
		}
		String restServer = prop.getProperty(REST_SERVER, DAS4_SERVER);
		int restPort = Integer.parseInt(prop.getProperty(REST_PORT, DAS4_PORT));
		cluster.add(restServer, restPort);
		client = new Client(cluster);
	}

	public HTableInterface getTable(String tableName) throws IOException{
		return new PrefixMatchRemoteHTable(client, tableName);
	}

	@Override
	public void close() throws IOException {
		client.shutdown();
	}

}


text:
package org.jmxtrans.agent.influxdb;

import static com.github.tomakehurst.wiremock.client.WireMock.*;

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

import org.jmxtrans.agent.testutils.FixedTimeClock;
import org.jmxtrans.agent.util.time.Clock;
import org.junit.Rule;
import org.junit.Test;

import com.github.tomakehurst.wiremock.junit.WireMockRule;

/**
 * @author Kristoffer Erlandsson
 */
public class InfluxDbOutputWriterTest {

    private final static Clock FAKE_CLOCK = new FixedTimeClock(1234l);

    @Rule
    public WireMockRule wireMockRule = new WireMockRule(0);

    @Test
    public void simpleRequest() throws Exception {
        Map<String, String> s = new HashMap<>();
        s.put("url", "http://localhost:" + wireMockRule.port());
        s.put("database", "test-db");
        stubFor(post(urlPathEqualTo("/write")).willReturn(aResponse().withStatus(200)));
        InfluxDbOutputWriter writer = new InfluxDbOutputWriter(FAKE_CLOCK);
        writer.postConstruct(s);
        writer.writeQueryResult("foo", null, 1);
        writer.postCollect();
        verify(postRequestedFor(urlPathEqualTo("/write"))
                .withQueryParam("db", equalTo("test-db"))
                .withQueryParam("precision", equalTo("ms"))
                .withRequestBody(equalTo("foo value=1i 1234")));
    }

    @Test
    public void allConfigParameters() throws Exception {
        Map<String, String> s = new HashMap<>();
        s.put("url", "http://localhost:" + wireMockRule.port());
        s.put("database", "test-db");
        s.put("retentionPolicy", "policy");
        s.put("user", "admin");
        s.put("password", "shadow");
        s.put("tags", "t1=v1,t2=v2");
        s.put("connectTimeoutMillis", "1000");
        s.put("readTimeoutMillis", "5000");
        stubFor(post(urlPathEqualTo("/write")).willReturn(aResponse().withStatus(200)));
        InfluxDbOutputWriter writer = new InfluxDbOutputWriter(FAKE_CLOCK);
        writer.postConstruct(s);
        writer.writeQueryResult("foo", null, 1);
        writer.postCollect();
        verify(postRequestedFor(urlPathEqualTo("/write"))
                .withQueryParam("db", equalTo("test-db"))
                .withQueryParam("precision", equalTo("ms"))
                .withQueryParam("rp", equalTo("policy"))
                .withQueryParam("u", equalTo("admin"))
                .withQueryParam("p", equalTo("shadow"))
                .withRequestBody(equalTo("foo,t1=v1,t2=v2 value=1i 1234")));
    }

    @Test
    public void tagsInMetricName() throws Exception {
        Map<String, String> s = new HashMap<>();
        s.put("url", "http://localhost:" + wireMockRule.port());
        s.put("database", "test-db");
        stubFor(post(urlPathEqualTo("/write")).willReturn(aResponse().withStatus(200)));
        InfluxDbOutputWriter writer = new InfluxDbOutputWriter(FAKE_CLOCK);
        writer.postConstruct(s);
        writer.writeQueryResult("foo,tag=tagValue", null, 1);
        writer.postCollect();
        verify(postRequestedFor(urlPathEqualTo("/write"))
                .withQueryParam("db", equalTo("test-db"))
                .withQueryParam("precision", equalTo("ms"))
                .withRequestBody(equalTo("foo,tag=tagValue value=1i 1234")));
    }

    @Test
    public void manyMetrics() throws Exception {
        Map<String, String> s = new HashMap<>();
        s.put("url", "http://localhost:" + wireMockRule.port());
        s.put("database", "test-db");
        stubFor(post(urlPathEqualTo("/write")).willReturn(aResponse().withStatus(200)));
        InfluxDbOutputWriter writer = new InfluxDbOutputWriter(FAKE_CLOCK);
        writer.postConstruct(s);
        writer.writeQueryResult("foo", null, 1);
        writer.writeQueryResult("foo2", null, 2.0);
        writer.postCollect();
        verify(postRequestedFor(urlPathEqualTo("/write"))
                .withQueryParam("db", equalTo("test-db"))
                .withQueryParam("precision", equalTo("ms"))
                .withRequestBody(equalTo("foo value=1i 1234\nfoo2 value=2.0 1234")));
    }

    @Test
    public void requestWhenDisabled() throws Exception {
        Map<String, String> s = new HashMap<>();
        s.put("url", "http://localhost:" + wireMockRule.port());
        s.put("database", "test-db");
        s.put("enabled", "false");
        InfluxDbOutputWriter writer = new InfluxDbOutputWriter(FAKE_CLOCK);
        writer.postConstruct(s);
        writer.writeQueryResult("foo", null, 1);
        writer.postCollect();
        verify(exactly(0), getRequestedFor(urlEqualTo("/write")));
    }

    @Test
    public void requestWhenEnabled() throws Exception {
        Map<String, String> s = new HashMap<>();
        s.put("url", "http://localhost:" + wireMockRule.port());
        s.put("database", "test-db");
        s.put("enabled", "true");
        stubFor(post(urlPathEqualTo("/write")).willReturn(aResponse().withStatus(200)));
        InfluxDbOutputWriter writer = new InfluxDbOutputWriter(FAKE_CLOCK);
        writer.postConstruct(s);
        writer.writeQueryResult("foo", null, 1);
        writer.postCollect();
        verify(postRequestedFor(urlPathEqualTo("/write"))
                .withQueryParam("db", equalTo("test-db"))
                .withQueryParam("precision", equalTo("ms"))
                .withRequestBody(equalTo("foo value=1i 1234")));
    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <dimen name="bottom_tab_padding_drawable">2.0dip</dimen>
    <dimen name="bottom_tab_padding_up">2.0dip</dimen>
    <dimen name="bottom_tab_font_size">14.0sp</dimen>
</resources>


text:
#pragma once
#include <aws/ec2/EC2_EXPORTS.h>
#include <aws/ec2/EC2Request.h>
#include <aws/ec2/model/ScheduledInstanceRecurrenceRequest.h>
#include <aws/ec2/model/SlotDateTimeRangeRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/ec2/model/Filter.h>

namespace Aws
{
namespace EC2
{
namespace Model
{

  /**
   *
Contains the parameters for DescribeScheduledInstanceAvailability.

   */
  class AWS_EC2_API DescribeScheduledInstanceAvailabilityRequest : public EC2Request
  {
  public:
    DescribeScheduledInstanceAvailabilityRequest();
    Aws::String SerializePayload() const override;

    /**
     *
Checks whether you have the required permissions for the action, without
     * actually making the request, and provides an error response. If you have the
     * required permissions, the error response is DryRunOperation.
     * Otherwise, it is UnauthorizedOperation.

     */
    inline bool GetDryRun() const{ return m_dryRun; }

    /**
     *
Checks whether you have the required permissions for the action, without
     * actually making the request, and provides an error response. If you have the
     * required permissions, the error response is DryRunOperation.
     * Otherwise, it is UnauthorizedOperation.

     */
    inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }

    /**
     *
Checks whether you have the required permissions for the action, without
     * actually making the request, and provides an error response. If you have the
     * required permissions, the error response is DryRunOperation.
     * Otherwise, it is UnauthorizedOperation.

     */
    inline DescribeScheduledInstanceAvailabilityRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}

    /**
     *
The schedule recurrence.

     */
    inline const ScheduledInstanceRecurrenceRequest& GetRecurrence() const{ return m_recurrence; }

    /**
     *
The schedule recurrence.

     */
    inline void SetRecurrence(const ScheduledInstanceRecurrenceRequest& value) { m_recurrenceHasBeenSet = true; m_recurrence = value; }

    /**
     *
The schedule recurrence.

     */
    inline void SetRecurrence(ScheduledInstanceRecurrenceRequest&& value) { m_recurrenceHasBeenSet = true; m_recurrence = value; }

    /**
     *
The schedule recurrence.

     */
    inline DescribeScheduledInstanceAvailabilityRequest& WithRecurrence(const ScheduledInstanceRecurrenceRequest& value) { SetRecurrence(value); return *this;}

    /**
     *
The schedule recurrence.

     */
    inline DescribeScheduledInstanceAvailabilityRequest& WithRecurrence(ScheduledInstanceRecurrenceRequest&& value) { SetRecurrence(value); return *this;}

    /**
     *
The time period for the first schedule to start.

     */
    inline const SlotDateTimeRangeRequest& GetFirstSlotStartTimeRange() const{ return m_firstSlotStartTimeRange; }

    /**
     *
The time period for the first schedule to start.

     */
    inline void SetFirstSlotStartTimeRange(const SlotDateTimeRangeRequest& value) { m_firstSlotStartTimeRangeHasBeenSet = true; m_firstSlotStartTimeRange = value; }

    /**
     *
The time period for the first schedule to start.

     */
    inline void SetFirstSlotStartTimeRange(SlotDateTimeRangeRequest&& value) { m_firstSlotStartTimeRangeHasBeenSet = true; m_firstSlotStartTimeRange = value; }

    /**
     *
The time period for the first schedule to start.

     */
    inline DescribeScheduledInstanceAvailabilityRequest& WithFirstSlotStartTimeRange(const SlotDateTimeRangeRequest& value) { SetFirstSlotStartTimeRange(value); return *this;}

    /**
     *
The time period for the first schedule to start.

     */
    inline DescribeScheduledInstanceAvailabilityRequest& WithFirstSlotStartTimeRange(SlotDateTimeRangeRequest&& value) { SetFirstSlotStartTimeRange(value); return *this;}

    /**
     *
The minimum available duration, in hours. The minimum required duration is
     * 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the
     * minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100
     * hours.

     */
    inline int GetMinSlotDurationInHours() const{ return m_minSlotDurationInHours; }

    /**
     *
The minimum available duration, in hours. The minimum required duration is
     * 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the
     * minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100
     * hours.

     */
    inline void SetMinSlotDurationInHours(int value) { m_minSlotDurationInHoursHasBeenSet = true; m_minSlotDurationInHours = value; }

    /**
     *
The minimum available duration, in hours. The minimum required duration is
     * 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the
     * minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100
     * hours.

     */
    inline DescribeScheduledInstanceAvailabilityRequest& WithMinSlotDurationInHours(int value) { SetMinSlotDurationInHours(value); return *this;}

    /**
     *
The maximum available duration, in hours. This value must be greater than
     * MinSlotDurationInHours and less than 1,720.

     */
    inline int GetMaxSlotDurationInHours() const{ return m_maxSlotDurationInHours; }

    /**
     *
The maximum available duration, in hours. This value must be greater than
     * MinSlotDurationInHours and less than 1,720.

     */
    inline void SetMaxSlotDurationInHours(int value) { m_maxSlotDurationInHoursHasBeenSet = true; m_maxSlotDurationInHours = value; }

    /**
     *
The maximum available duration, in hours. This value must be greater than
     * MinSlotDurationInHours and less than 1,720.

     */
    inline DescribeScheduledInstanceAvailabilityRequest& WithMaxSlotDurationInHours(int value) { SetMaxSlotDurationInHours(value); return *this;}

    /**
     *
The token for the next set of results.

     */
    inline const Aws::String& GetNextToken() const{ return m_nextToken; }

    /**
     *
The token for the next set of results.

     */
    inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }

    /**
     *
The token for the next set of results.

     */
    inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }

    /**
     *
The token for the next set of results.

     */
    inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }

    /**
     *
The token for the next set of results.

     */
    inline DescribeScheduledInstanceAvailabilityRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}

    /**
     *
The token for the next set of results.

     */
    inline DescribeScheduledInstanceAvailabilityRequest& WithNextToken(Aws::String&& value) { SetNextToken(value); return *this;}

    /**
     *
The token for the next set of results.

     */
    inline DescribeScheduledInstanceAvailabilityRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}

    /**
     *
The maximum number of results to return in a single call. This value can be
     * between 5 and 300. The default value is 300. To retrieve the remaining results,
     * make another call with the returned NextToken value.

     */
    inline int GetMaxResults() const{ return m_maxResults; }

    /**
     *
The maximum number of results to return in a single call. This value can be
     * between 5 and 300. The default value is 300. To retrieve the remaining results,
     * make another call with the returned NextToken value.

     */
    inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }

    /**
     *
The maximum number of results to return in a single call. This value can be
     * between 5 and 300. The default value is 300. To retrieve the remaining results,
     * make another call with the returned NextToken value.

     */
    inline DescribeScheduledInstanceAvailabilityRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}

    /**
     *
One or more filters.

availability-zone - The
     * Availability Zone (for example, us-west-2a).

     *
instance-type - The instance type (for example,
     * c4.large).

network-platform - The
     * network platform (EC2-Classic or EC2-VPC).

     *

platform - The platform (Linux/UNIX or
     * Windows).

     */
    inline const Aws::Vector<Filter>& GetFilters() const{ return m_filters; }

    /**
     *
One or more filters.

availability-zone - The
     * Availability Zone (for example, us-west-2a).

     *
instance-type - The instance type (for example,
     * c4.large).

network-platform - The
     * network platform (EC2-Classic or EC2-VPC).

     *

platform - The platform (Linux/UNIX or
     * Windows).

     */
    inline void SetFilters(const Aws::Vector<Filter>& value) { m_filtersHasBeenSet = true; m_filters = value; }

    /**
     *
One or more filters.

availability-zone - The
     * Availability Zone (for example, us-west-2a).

     *
instance-type - The instance type (for example,
     * c4.large).

network-platform - The
     * network platform (EC2-Classic or EC2-VPC).

     *

platform - The platform (Linux/UNIX or
     * Windows).

     */
    inline void SetFilters(Aws::Vector<Filter>&& value) { m_filtersHasBeenSet = true; m_filters = value; }

    /**
     *
One or more filters.

availability-zone - The
     * Availability Zone (for example, us-west-2a).

     *
instance-type - The instance type (for example,
     * c4.large).

network-platform - The
     * network platform (EC2-Classic or EC2-VPC).

     *

platform - The platform (Linux/UNIX or
     * Windows).

     */
    inline DescribeScheduledInstanceAvailabilityRequest& WithFilters(const Aws::Vector<Filter>& value) { SetFilters(value); return *this;}

    /**
     *
One or more filters.

availability-zone - The
     * Availability Zone (for example, us-west-2a).

     *
instance-type - The instance type (for example,
     * c4.large).

network-platform - The
     * network platform (EC2-Classic or EC2-VPC).

     *

platform - The platform (Linux/UNIX or
     * Windows).

     */
    inline DescribeScheduledInstanceAvailabilityRequest& WithFilters(Aws::Vector<Filter>&& value) { SetFilters(value); return *this;}

    /**
     *
One or more filters.

availability-zone - The
     * Availability Zone (for example, us-west-2a).

     *
instance-type - The instance type (for example,
     * c4.large).

network-platform - The
     * network platform (EC2-Classic or EC2-VPC).

     *

platform - The platform (Linux/UNIX or
     * Windows).

     */
    inline DescribeScheduledInstanceAvailabilityRequest& AddFilters(const Filter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }

    /**
     *
One or more filters.

availability-zone - The
     * Availability Zone (for example, us-west-2a).

     *
instance-type - The instance type (for example,
     * c4.large).

network-platform - The
     * network platform (EC2-Classic or EC2-VPC).

     *

platform - The platform (Linux/UNIX or
     * Windows).

     */
    inline DescribeScheduledInstanceAvailabilityRequest& AddFilters(Filter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }

  private:
    bool m_dryRun;
    bool m_dryRunHasBeenSet;
    ScheduledInstanceRecurrenceRequest m_recurrence;
    bool m_recurrenceHasBeenSet;
    SlotDateTimeRangeRequest m_firstSlotStartTimeRange;
    bool m_firstSlotStartTimeRangeHasBeenSet;
    int m_minSlotDurationInHours;
    bool m_minSlotDurationInHoursHasBeenSet;
    int m_maxSlotDurationInHours;
    bool m_maxSlotDurationInHoursHasBeenSet;
    Aws::String m_nextToken;
    bool m_nextTokenHasBeenSet;
    int m_maxResults;
    bool m_maxResultsHasBeenSet;
    Aws::Vector<Filter> m_filters;
    bool m_filtersHasBeenSet;
  };

} // namespace Model
} // namespace EC2
} // namespace Aws


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using EPiServer.Forms.Core.Data;
using EPiServer.Forms.Core.Models;
using EPiServer.Forms.Helpers;
using EPiServer.Framework;
using EPiServer.Globalization;
using EPiServer.Personalization.VisitorGroups;
using EPiServer.ServiceLocation;
using FormVisitorGroups.Enums;
using FormVisitorGroups.Impl;
using FormVisitorGroups.Models;

namespace FormVisitorGroups.Criterion
{
    [VisitorGroupCriterion(
        Category = "Episerver Forms",
        DisplayName = "Submitted form value",
        Description = "Check for the value submitted in form (the latest submission of the form by the user within the current session)",
        LanguagePath = "/formvisitorgroups/criteria/formvaluecriteria")]
    public class FormValueCriteria : CriterionBase<FormValueCriterionModel>
    {
        public override bool IsMatch(IPrincipal principal, HttpContextBase httpContext)
        {
            try
            {
                // Check that the form has been submitted by the user
                var formGuid = GetFormId(Model.FormField);
                var flag = FormsExtensions.HasAlreadyPosted(formGuid, httpContext);
                if (flag == false)
                {
                    return false;
                }

                var formSubmissionRepo = ServiceLocator.Current.GetInstance<ISubmittedFormsRepository>();
                if (formSubmissionRepo.IsActive() == false)
                {
                    return false;
                }

                // Get a list of form submission Ids
                var formSubmissionIdsList = formSubmissionRepo.GetFormSubmissionIdsList();

                // Note! Language isn't required to get SubmissionData from the default
                // Form permanent store but constructor requires a language
                var submissions = ServiceLocator.Current
                    .GetInstance<FormDataManager>()
                    .GetSubmissionData(new FormIdentity(formGuid, "en"), formSubmissionIdsList.ToArray())
                    .ToList();

                // Get the field name to check and the form of that field in the form
                var fieldName = GetFieldId(Model.FormField);
                if (fieldName != string.Empty && submissions.Count > 0)
                {
                    var formValue = submissions[submissions.Count - 1].Data[fieldName].ToString();
                    return CheckForMatch(formValue, Model.Value);
                }
                return false;
            }
            catch (Exception)
            {
                return false;
            }

        }

        private bool CheckForMatch(string formValue, string criteriaValue)
        {
            switch (Model.Condition)
            {
                case FormValueCondition.HasValue:
                    return !String.IsNullOrWhiteSpace(formValue);

                case FormValueCondition.DoesNotHaveAValue:
                    return String.IsNullOrWhiteSpace(formValue);

                case FormValueCondition.Contains:
                    return (Model.CaseSensitive
                        ? formValue.IndexOf(criteriaValue, 0, StringComparison.CurrentCulture) >= 0
                        : formValue.IndexOf(criteriaValue, 0, StringComparison.CurrentCultureIgnoreCase) >= 0);

                case FormValueCondition.DoesNotContain:
                    return !(Model.CaseSensitive
                        ? formValue.IndexOf(criteriaValue, 0, StringComparison.CurrentCulture) >= 0
                        : formValue.IndexOf(criteriaValue, 0, StringComparison.CurrentCultureIgnoreCase) >= 0);

                case FormValueCondition.Is:
                    return (Model.CaseSensitive
                        ? criteriaValue.Equals(formValue, StringComparison.CurrentCulture)
                        : criteriaValue.Equals(formValue, StringComparison.CurrentCultureIgnoreCase));

                case FormValueCondition.IsNot:
                    return !(Model.CaseSensitive
                        ? criteriaValue.Equals(formValue, StringComparison.CurrentCulture)
                        : criteriaValue.Equals(formValue, StringComparison.CurrentCultureIgnoreCase));

                default:
                    return false;
            }
        }

        private Guid GetFormId(string value)
        {
            Guid formIdGuid;
            Guid.TryParse(Model.FormField.Split(">".ToCharArray())[0].Trim(), out formIdGuid);
            return formIdGuid;
        }

        private string GetFieldId(string value)
        {
            var formField = Model.FormField.Split(">".ToCharArray());
            if (formField.Length == 2)
            {
                return formField[1].Trim();
            }
            else
            {
                return string.Empty;
            }
        }
    }
}


text:
package cn.jsprun.filter;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.nio.channels.FileLock;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import cn.jsprun.utils.Common;
import cn.jsprun.utils.ForumInit;
import cn.jsprun.utils.JspRunConfig;
import cn.jsprun.utils.WapperedResponse;
public class FileCaptureFilter implements Filter {
	public void init(FilterConfig fc) throws ServletException {
	}
	public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException,
			ServletException {
		HttpServletRequest request = (HttpServletRequest) req;
		HttpServletResponse response = (HttpServletResponse) res;
		HttpSession session = request.getSession();
		Integer uid = (Integer) session.getAttribute("jsprun_uid");
		Map<String, String> settings = ForumInit.settings;
		String url = request.getRequestURI();
		if(url!=null&&url.endsWith("attachment.jsp")){
			chain.doFilter(request, response);
			return;
		}
		if (settings != null && uid != null) {
			WapperedResponse wapper = new WapperedResponse(response);
			chain.doFilter(request, wapper);
			String contentType = response.getContentType();
			if (contentType != null && contentType.startsWith("application/octet-stream")) {
				byte[] content = wapper.getByteData();
				ServletOutputStream out = response.getOutputStream();
				out.write(content);
				out.flush();
			} else {
				String content = wapper.getStringData().trim();
				int reWriteStatus = Common.intval(settings.get("rewritestatus"));
				if (reWriteStatus > 0) {
					content = rewriteContent(content, reWriteStatus);
				}
				if (uid == 0) {
					String accessPath = request.getRequestURI();
					int index = accessPath.lastIndexOf("/");
					if (index != -1 && accessPath.indexOf("archiver") == -1 && accessPath.indexOf("wap") == -1) {
						accessPath = accessPath.substring(index + 1);
					}
					if (request.getQueryString() == null && (accessPath.equals("index.jsp") || accessPath.equals("") || accessPath.equals(settings.get("indexname")))) {
						int cacheindexlife = Common.toDigit(settings.get("cacheindexlife"));
						if (cacheindexlife > 0) {
							boolean iswrite = request.getAttribute("CACHE_INDEX")!=null?true:false;
							if(request.getAttribute("indexfileName")!=null&&iswrite){
								String indexfileName = (String)request.getAttribute("indexfileName");
								writeFile(indexfileName, content);
							}
						}
					} else if (accessPath.equals("viewthread.jsp") || accessPath.startsWith("thread-")) {
						int cachethreadlife = Common.toDigit(settings.get("cachethreadlife"));
						if (cachethreadlife > 0) {
							boolean iswrite = request.getAttribute("CACHE_THREADS")!=null?true:false;
							if(request.getAttribute("fileName")!=null&&iswrite){
								String fileName = (String)request.getAttribute("fileName");
								writeFile(fileName, content);
							}
						}
					}
				}
				PrintWriter out = response.getWriter();
				out.write(content);
				out.flush();
			}
		} else {
			chain.doFilter(request, response);
		}
	}
	private String rewriteContent(String content, int reWriteStatus) throws IOException {
		if ((reWriteStatus & 1) > 0) {
			content = rewriteURL("forum", content,
					"(?is)\\<a href\\=\"forumdisplay\\.jsp\\?fid\\=(\\d+)(&page\\=(\\d+))?\"([^\\>]*)\\>");
		}
		if ((reWriteStatus & 2) > 0) {
			content = rewriteURL(
					"thread",
					content,
					"(?is)\\<a href\\=\"viewthread\\.jsp\\?tid\\=(\\d+)(&extra\\=page\\%3D(\\d+))?(&page\\=(\\d+))?\"([^\\>]*)\\>");
		}
		if ((reWriteStatus & 4) > 0) {
			content = rewriteURL("space", content,
					"(?is)\\<a href\\=\"space\\.jsp\\?(uid\\=(\\d+)|username\\=([^&]+?))\"([^\\>]*)\\>");
		}
		if ((reWriteStatus & 8) > 0) {
			content = rewriteURL("tag", content,
					"(?is)\\<a href\\=\"tag\\.jsp\\?name\\=([^&]+?)\"([^\\>]*)\\>");
		}
		return content;
	}
	private String rewriteURL(String pre, String content, String regex) {
		Pattern pCode = Pattern.compile(regex);
		Matcher m = pCode.matcher(content);
		StringBuffer b = new StringBuffer();
		while (m.find()) {
			String url = null;
			if ("forum".equals(pre)) {
				String fid = m.group(1);
				int page = Common.intval(m.group(3));
				String extra = Common.stripslashes(m.group(4));
				url = fid + "-" + (page > 0 ? page : 1) + ".html\"" + extra + ">";
			} else if ("thread".equals(pre)) {
				String tid = m.group(1);
				int page = Common.intval(m.group(5));
				int prevPage = Common.intval(m.group(3));
				String extra = Common.stripslashes(m.group(6));
				url = tid + "-" + (prevPage > 0 ? prevPage : 1) + "-" + (page > 0 ? page : 1) + ".html\""
						+ extra + ">";
			} else if ("space".equals(pre)) {
				int uid = Common.intval(m.group(2));
				String username = m.group(3);
				String extra = Common.stripslashes(m.group(4));
				url = (uid > 0 ? "uid-" + uid : "username-" + username) + ".html\"" + extra + ">";
			} else if ("tag".equals(pre)) {
				String name = m.group(1);
				String extra = Common.stripslashes(m.group(2));
				url = name + ".html\"" + extra + ">";
			}
			m.appendReplacement(b, "<a href=\"" + pre + "-" + Matcher.quoteReplacement(url));
		}
		m.appendTail(b);
		return b.toString();
	}
	public void writeFile(String fileName, String content) throws IOException {
		FileOutputStream out = new FileOutputStream(fileName);
		OutputStreamWriter fwout = new OutputStreamWriter(out, JspRunConfig.CHARSET);
		BufferedWriter bw = new BufferedWriter(fwout);
		FileLock fl = out.getChannel().tryLock();
		if (fl.isValid()) {
			bw.write(content);
			fl.release();
		}
		bw.close();
		fwout.close();
		out.close();
		bw = null;
		fwout = null;
		out = null;
	}
	public void destroy() {
	}
}


text:
package org.apache.ignite.internal.processors.closure;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.ArrayList;
import java.util.Collection;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCompute;
import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.cluster.ClusterGroup;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.compute.ComputeTaskTimeoutException;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.lang.IgniteCallable;
import org.apache.ignite.lang.IgniteFuture;
import org.apache.ignite.lang.IgnitePredicate;
import org.apache.ignite.lang.IgniteReducer;
import org.apache.ignite.lang.IgniteRunnable;
import org.apache.ignite.resources.IgniteInstanceResource;
import org.apache.ignite.resources.LoggerResource;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
import org.jetbrains.annotations.Nullable;

/**
 * Tests for {@link GridClosureProcessor}.
 */
@GridCommonTest(group = "Closure Processor")
public class GridClosureProcessorSelfTest extends GridCommonAbstractTest {
    /** Number of grids started for tests. Should not be less than 2. */
    private static final int NODES_CNT = 2;

    /** Job sleep duration in order to initiate timeout exception. */
    private static final long JOB_SLEEP = 200;

    /** Timeout used in timed tests. */
    private static final long JOB_TIMEOUT = 100;

    /** IP finder. */
    private final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);

    /** {@inheritDoc} */
    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

        TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();

        discoSpi.setIpFinder(ipFinder);

        cfg.setDiscoverySpi(discoSpi);

        cfg.setCacheConfiguration();

        return cfg;
    }

    /** {@inheritDoc} */
    @SuppressWarnings({"ConstantConditions"})
    @Override protected void beforeTestsStarted() throws Exception {
        assert NODES_CNT >= 2;

        startGrids(NODES_CNT);
    }

    /** {@inheritDoc} */
    @Override protected void beforeTest() throws Exception {
        execCntr.set(0);
    }

    /** Execution counter for runnable and callable jobs. */
    private static AtomicInteger execCntr = new AtomicInteger(0);

    /**
     * Test runnable job.
     */
    private static class ClosureTestRunnable implements IgniteRunnable {
        /** */
        @IgniteInstanceResource
        private Ignite ignite;

        /** */
        @LoggerResource
        private IgniteLogger log;

        /** {@inheritDoc} */
        @Override public void run() {
            log.info("Runnable job executed on node: " + ignite.cluster().localNode().id());

            assert ignite != null;

            execCntr.incrementAndGet();
        }
    }

    /**
     * Base class for test callables.
     */
    private abstract static class AbstractTestCallable implements IgniteCallable<Integer> {
        /** */
        @IgniteInstanceResource
        protected Ignite ignite;

        /** */
        @LoggerResource
        protected IgniteLogger log;
    }

    /**
     * Test callable job.
     */
    private static class ClosureTestCallable extends AbstractTestCallable {
        /** {@inheritDoc} */
        @Override public Integer call() {
            log.info("Callable job executed on node: " + ignite.cluster().localNode().id());

            assert ignite != null;

            return execCntr.incrementAndGet();
        }
    }

    /**
     * Test callable job which throws class not found exception.
     */
    private static class ClosureTestCallableError extends AbstractTestCallable implements Externalizable {
        /**
         *
         */
        public ClosureTestCallableError() {
            // No-op.
        }

        /** {@inheritDoc} */
        @Override public Integer call() {
            log.info("Callable job executed on node: " + ignite.cluster().localNode().id());

            return null;
        }

        /** {@inheritDoc} */
        @Override public void writeExternal(ObjectOutput out) throws IOException {
            // No-op.
        }

        /** {@inheritDoc} */
        @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
            throw new ClassNotFoundException();
        }
    }

    /**
     * Test callable job which sleeps for some time. Is used in timeout tests.
     */
    private static class TestCallableTimeout extends AbstractTestCallable {
        /** {@inheritDoc} */
        @Override public Integer call() throws Exception {
            Thread.sleep(JOB_SLEEP);

            return null;
        }
    }

    /**
     * @param idx Node index.
     * @param job Runnable job.
     * @param p Optional node predicate.
     * @return Future object.
     */
    private IgniteFuture<?> runAsync(int idx, IgniteRunnable job, @Nullable IgnitePredicate<ClusterNode> p) {
        assert idx >= 0 && idx < NODES_CNT;
        assert job != null;

        execCntr.set(0);

        IgniteCompute comp = p != null ? compute(grid(idx).cluster().forPredicate(p)) : grid(idx).compute();

        return comp.runAsync(job);
    }

    /**
     * @param idx Node index.
     * @param job Runnable job.
     * @param p Optional node predicate.
     * @return Future object.
     */
    private IgniteFuture<?> broadcast(int idx, IgniteRunnable job, @Nullable IgnitePredicate<ClusterNode> p) {
        assert idx >= 0 && idx < NODES_CNT;
        assert job != null;

        execCntr.set(0);

        ClusterGroup prj = grid(idx).cluster();

        if (p != null)
            prj = prj.forPredicate(p);

        return compute(prj).broadcastAsync(job);
    }

    /**
     * @param idx Node index.
     * @param jobs Runnable jobs.
     * @param p Optional node predicate.
     * @return Future object.
     */
    private IgniteFuture<?> runAsync(int idx,
        Collection<ClosureTestRunnable> jobs,
        @Nullable IgnitePredicate<ClusterNode> p)
    {
        assert idx >= 0 && idx < NODES_CNT;
        assert !F.isEmpty(jobs);

        execCntr.set(0);

        IgniteCompute comp = p != null ? compute(grid(idx).cluster().forPredicate(p)) : grid(idx).compute();

        return comp.runAsync(jobs);
    }

    /**
     * @param idx Node index.
     * @param job Callable job.
     * @param p Optional node predicate.
     * @return Future object.
     */
    private IgniteFuture<Integer> callAsync(int idx,
        IgniteCallable<Integer> job, @Nullable
        IgnitePredicate<ClusterNode> p) {
        assert idx >= 0 && idx < NODES_CNT;
        assert job != null;

        execCntr.set(0);

        IgniteCompute comp = p != null ? compute(grid(idx).cluster().forPredicate(p)) : grid(idx).compute();

        return comp.callAsync(job);
    }

    /**
     * @param idx Node index.
     * @param job Callable job.
     * @param p Optional node predicate.
     * @return Future object.
     */
    private IgniteFuture<Collection<Integer>> broadcast(int idx, IgniteCallable<Integer> job,
        @Nullable IgnitePredicate<ClusterNode> p) {
        assert idx >= 0 && idx < NODES_CNT;
        assert job != null;

        execCntr.set(0);

        IgniteCompute comp = p != null ? compute(grid(idx).cluster().forPredicate(p)) : grid(idx).compute();

        return comp.broadcastAsync(job);
    }

    /**
     * @param idx Node index.
     * @param jobs Callable job.
     * @param p Optional node predicate.
     * @return Future object.
     */
    private IgniteFuture<Collection<Integer>> callAsync(int idx, Collection<ClosureTestCallable> jobs,
        @Nullable IgnitePredicate<ClusterNode> p) {
        assert idx >= 0 && idx < NODES_CNT;
        assert !F.isEmpty(jobs);

        execCntr.set(0);

        IgniteCompute comp = p != null ? compute(grid(idx).cluster().forPredicate(p)) : grid(idx).compute();

        return comp.callAsync(jobs);
    }

    /**
     * @param idx Node index.
     * @return Predicate.
     */
    private IgnitePredicate<ClusterNode> singleNodePredicate(final int idx) {
        assert idx >= 0 && idx < NODES_CNT;

        return new IgnitePredicate<ClusterNode>() {
            @Override public boolean apply(ClusterNode e) { return grid(idx).localNode().id().equals(e.id()); }
        };
    }

    /**
     * @throws Exception If failed.
     */
    public void testRunAsyncSingle() throws Exception {
        IgniteRunnable job = new ClosureTestRunnable();

        IgniteFuture<?> fut = broadcast(0, job, null);

        assert fut.get() == null;

        assertEquals(NODES_CNT, execCntr.getAndSet(0));

        fut = broadcast(0, job, singleNodePredicate(0));

        assert fut.get() == null;

        assertEquals(1, execCntr.get());

        fut = runAsync(0, job, null);

        assert fut.get() == null : "Execution result must be null.";

        assert execCntr.get() == 1 :
            "Execution counter must be equal to 1, actual: " + execCntr.get();
    }

    /**
     * @throws Exception If failed.
     */
    public void testRunAsyncMultiple() throws Exception {
        Collection<ClosureTestRunnable> jobs = F.asList(new ClosureTestRunnable(), new ClosureTestRunnable());

        IgniteFuture<?> fut = runAsync(0, jobs, null);

        assert fut.get() == null : "Execution result must be null.";

        assert execCntr.get() == jobs.size() :
            "Execution counter must be equal to " + jobs.size() + ", actual: " + execCntr.get();
    }

    /**
     * @throws Exception If failed.
     */
    public void testCallAsyncSingle() throws Exception {
        IgniteCallable<Integer> job = new ClosureTestCallable();

        IgniteFuture<Collection<Integer>> fut1 = broadcast(0, job, null);

        assert fut1.get() != null;

        assertEquals(NODES_CNT, execCntr.getAndSet(0));

        fut1 = broadcast(0, job, singleNodePredicate(0));

        // We left one node so we can get definite result.
        assertEquals(Integer.valueOf(1), F.first(fut1.get()));

        assertEquals(1, execCntr.get());

        IgniteFuture<Integer> fut2 = callAsync(0, job, null);

        assert fut2.get() == 1 :
            "Execution result must be equal to 1, actual: " + fut2.get();

        assert execCntr.get() == 1 :
            "Execution counter must be equal to 1, actual: " + execCntr.get();
    }

    /**
     * @throws Exception If failed.
     */
    public void testCallAsyncErrorNoFailover() throws Exception {
        IgniteCompute comp = compute(grid(0).cluster().forPredicate(F.notEqualTo(grid(0).localNode())));

        IgniteFuture<Integer> fut = comp.withNoFailover().callAsync(new ClosureTestCallableError());

        try {
            fut.get();

            assert false : "Exception should have been thrown.";
        }
        catch (IgniteException e) {
            info("Caught expected exception: " + e);
        }
    }

    /**
     * @throws Exception If failed.
     */
    public void testWithName() throws Exception {
        grid(0).compute().withName("TestTaskName").call(new ClosureTestCallable());
    }

    /**
     * @throws Exception If failed.
     */
    public void testWithTimeout() throws Exception {
        Collection<TestCallableTimeout> jobs = F.asList(new TestCallableTimeout());

        boolean timedOut = false;

        try {
            // Ensure that we will get timeout exception.
            grid(0).compute().withTimeout(JOB_TIMEOUT).call(jobs);
        }
        catch (ComputeTaskTimeoutException ignore) {
            timedOut = true;
        }

        assert timedOut : "Task has not timed out.";

        timedOut = false;

        try {
            // Previous task invocation cleared the timeout.
            grid(0).compute().call(jobs);
        }
        catch (ComputeTaskTimeoutException ignore) {
            timedOut = true;
        }

        assert !timedOut : "Subsequently called task has timed out.";
    }

    /**
     * @throws Exception If failed.
     */
    public void testCallAsyncMultiple() throws Exception {
        Collection<ClosureTestCallable> jobs = F.asList(new ClosureTestCallable(), new ClosureTestCallable());

        IgniteFuture<Collection<Integer>> fut = callAsync(0, jobs, null);

        Collection<Integer> results = fut.get();

        assert !results.isEmpty() : "Collection of results is empty.";

        assert results.size() == jobs.size() :
            "Collection of results must be of size: " + jobs.size() + ".";

        for (int i = 1; i <= jobs.size(); i++)
            assert results.contains(i) : "Collection of results does not contain value: " + i;
    }

    /**
     * @throws Exception If failed.
     */
    public void testReduceAsync() throws Exception {
        Collection<ClosureTestCallable> jobs = F.asList(new ClosureTestCallable(), new ClosureTestCallable());

        IgniteFuture<Integer> fut = grid(0).compute().callAsync(jobs, F.sumIntReducer());

        // Sum of arithmetic progression.
        int exp = (1 + jobs.size()) * jobs.size() / 2;

        assert fut.get() == exp :
            "Execution result must be equal to " + exp + ", actual: " + fut.get();

        assert execCntr.get() == jobs.size() :
            "Execution counter must be equal to " + jobs.size() + ", actual: " + execCntr.get();

        execCntr.set(0);
    }

    /**
     * @throws Exception If failed.
     */
    public void testReducerError() throws Exception {
        final Ignite g = grid(0);

        final Collection<IgniteCallable<Integer>> jobs = new ArrayList<>();

        for (int i = 0; i < g.cluster().nodes().size(); i++) {
            jobs.add(new IgniteCallable<Integer>() {
                @Override public Integer call() throws Exception {
                    throw new RuntimeException("Test exception.");
                }
            });
        }

        GridTestUtils.assertThrows(log, new Callable<Void>() {
            @Override public Void call() throws Exception {
                g.compute().call(jobs, new IgniteReducer<Integer, Object>() {
                    @Override public boolean collect(@Nullable Integer e) {
                        fail("Expects failed jobs never call 'collect' method.");

                        return true;
                    }

                    @Override public Object reduce() {
                        return null;
                    }
                });

                return null;
            }
        }, IgniteException.class, null);
    }
}


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

namespace RethinkDb.DatumConverters
{
    public class CompoundIndexDatumConverterFactory : AbstractDatumConverterFactory
    {
        public static readonly CompoundIndexDatumConverterFactory Instance = new CompoundIndexDatumConverterFactory();

        public override bool TryGet<T>(IDatumConverterFactory rootDatumConverterFactory, out IDatumConverter<T> datumConverter)
        {
            if (rootDatumConverterFactory == null)
                throw new ArgumentNullException("rootDatumConverterFactory");

            datumConverter = null;

            if (typeof(CompoundIndexKey).IsAssignableFrom(typeof(T)))
            {
                var retval = Activator.CreateInstance(
                    typeof(CompoundIndexKeyDatumConverterShim<>).MakeGenericType(typeof(T)),
                    new object[] { rootDatumConverterFactory }
                );
                datumConverter = (IDatumConverter<T>)retval;
            }

            return datumConverter != null;
        }

        public class CompoundIndexKeyDatumConverterShim<T> : AbstractReferenceTypeDatumConverter<T>
            where T : CompoundIndexKey
        {
            private readonly CompoundIndexKeyDatumConverter datumConverter;

            public CompoundIndexKeyDatumConverterShim(IDatumConverterFactory rootDatumConverterFactory)
            {
                this.datumConverter = new CompoundIndexKeyDatumConverter(rootDatumConverterFactory);
            }

            #region implemented abstract members of AbstractReferenceTypeDatumConverter

            public override T ConvertDatum(Datum datum)
            {
                throw new NotSupportedException("Converting back to a CompoundIndexKey object is not supported.");
            }

            public override Datum ConvertObject(T value)
            {
                return datumConverter.ConvertObject(value);
            }

            #endregion
        }

        public class CompoundIndexKeyDatumConverter : AbstractReferenceTypeDatumConverter<CompoundIndexKey>
        {
            private readonly IDatumConverterFactory rootDatumConverterFactory;

            public CompoundIndexKeyDatumConverter(IDatumConverterFactory rootDatumConverterFactory)
            {
                this.rootDatumConverterFactory = rootDatumConverterFactory;
            }

            public override CompoundIndexKey ConvertDatum(Datum datum)
            {
                throw new NotSupportedException("Converting back to a CompoundIndexKey object is not supported.");
            }

            public override Datum ConvertObject(CompoundIndexKey compoundIndexKey)
            {
                if (compoundIndexKey == null)
                    return new Datum { type = Datum.DatumType.R_NULL };

                var retval = new Datum {type = Datum.DatumType.R_ARRAY};
                foreach (var key in compoundIndexKey.KeyValues)
                {
                    var converter = rootDatumConverterFactory.Get(key.GetType());
                    retval.r_array.Add(converter.ConvertObject(key));
                }

                return retval;
            }
        }
    }
}


text:
/*
 * Creating default parent controller with the general functionalities
 * through out the entire app.
 */
define(['./module'], function (controllers) {
	'use strict';

	controllers.controller('indexController', [
		'$scope',
		'$rootScope',
		'$location',
		'productFactory',
		function ($scope, $rootScope, $location, productFactory) {

			console.log('index controller initialized.');

			// collection of orders
			$rootScope.orders = [];

			// listen to event from child productController
			$scope.$on('addOrderEvent', function (event, data) {

				$rootScope.orders.push(data);

			});

			/*
			 * Communicate with product detail controller through
			 * root scope
			 */
			$scope.viewCart = function () {

				// route to 'cart' view
				$location.path('/cart');
			}

			/*
			 * search for particular products with keywords
			 */
			$scope.searchProducts = function (keyword) {

				// route to 'cart' view
				$location.path('/search/' + keyword);
				$scope.searchValue = '';
			};

		}]);
});


text:
/**
 * Creates an array of length equal to size with incremental values starting at 0.
 *
 * @since 1.28.0
 *
 * @param {number} size Array length.
 * @return {number[]} Array of incremental numbers.
 * @example createIncrementalArrayBySize(3); // [0, 1, 2]
 */
export const createIncrementalArrayBySize = ( size ) =>
	new Array( size ?? 0 ).fill().map( ( _, i ) => i );


text:
import * as React from 'react';
import { observer } from 'mobx-react';

import { provideSingleton } from '../../ioc';
import { ElfState } from '../../state/elf.state';

import { inject } from '../../ioc';

@observer
export class Header extends React.Component<{}, {}> {
    @inject(ElfState) private elfState: ElfState;

    public render() {
        const state = this.elfState;
        return (

ELFVisualizator

file: {state.filename}

);
    }
}


text:
using System.Reflection;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("SharpBrakeCore")]
[assembly: AssemblyDescription("Airbrake Notifier for .NET")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Kayoom GmbH")]
[assembly: AssemblyProduct("SharpBrakeCore")]
[assembly: AssemblyCopyright("Copyright 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("25ce95a4-58dd-4408-8484-e71f3c03549c")]
[assembly: AssemblyVersion("0.2.0")]
[assembly: AssemblyFileVersion("0.2.0")]