// than threshold, then include this pair in the SDM matrix
      bool isConstraint =
          (d_o3aConstraintVect && (mapIdx < (*d_o3aConstraintVect).size()) &&
           (j == (*d_o3aConstraintVect)[mapIdx]->getPrbIdx()) &&
           (i == (*d_o3aConstraintVect)[mapIdx]->getRefIdx()));
      if ((sqDist < sqThreshold) || isConstraint) {
        auto *sdmElement = new SDMElement();
        sdmElement->idx[0] = i;
        sdmElement->idx[1] = j;
        sdmElement->sqDist = sqDist;
        sdmElement->o3aConstraint = nullptr;
        if (isConstraint) {
          sdmElement->o3aConstraint = (*d_o3aConstraintVect)[mapIdx];
          // in case there are duplicate constraints referring to the same
          // atom pair, apply only the one with the highest weight
          while ((mapIdx < (*d_o3aConstraintVect).size()) &&
                 (j == (*d_o3aConstraintVect)[mapIdx]->getPrbIdx()) &&
                 (i == (*d_o3aConstraintVect)[mapIdx]->getRefIdx())) {
            ++mapIdx;
          }
        }
        d_SDMPtrVect.push_back(boost::shared_ptr<SDMElement>(sdmElement));
        ++n;
      }
    }
  }
  // sort the SDM matrix by decreasing constraint weights and,
  // as a second criterion, increasing distances
  std::sort(d_SDMPtrVect.begin(), d_SDMPtrVect.end(), this->compareSDMDist);
  // increase the number of pairs which will be used
  // by rmsAlgorithm until an atom which has been
  // included in a previous pair is found
  for (unsigned int i = 0; (i < n) && (!(refUsed[d_SDMPtrVect[i]->idx[0]])) &&
                           (!(prbUsed[d_SDMPtrVect[i]->idx[1]]));
       ++i) {
    ++pairs;
    refUsed[d_SDMPtrVect[i]->idx[0]] = 1;
    prbUsed[d_SDMPtrVect[i]->idx[1]] = 1;
  }
  d_SDMPtrVect.resize(pairs);
}

double o3aMMFFWeightFunc(const unsigned int prbIdx, const unsigned int refIdx,
                         void *data) {
  std::uint8_t mmffSim =
      mmffSimMatrix[(static_cast<MMFF::MMFFMolProperties *>(
                         (static_cast<O3AFuncData *>(data))->refProp))
                        ->getMMFFAtomType(refIdx) -
                    1][(static_cast<MMFF::MMFFMolProperties *>(
                            (static_cast<O3AFuncData *>(data))->prbProp))
                           ->getMMFFAtomType(prbIdx) -
                       1];

  return static_cast<double>(O3_MAX_WEIGHT_COEFF -
                             (static_cast<O3AFuncData *>(data))->weight) *
             ((1.0 + O3_CHARGE_COEFF *
                         fabs((static_cast<MMFF::MMFFMolProperties *>(
                                   (static_cast<O3AFuncData *>(data))->refProp))
                                  ->getMMFFPartialCharge(refIdx) +
                              (static_cast<MMFF::MMFFMolProperties *>(
                                   (static_cast<O3AFuncData *>(data))->prbProp))
                                  ->getMMFFPartialCharge(prbIdx))) /
              (1.0 + fabs((static_cast<MMFF::MMFFMolProperties *>(
                               (static_cast<O3AFuncData *>(data))->refProp))
                              ->getMMFFPartialCharge(refIdx) -
                          (stati


0% {
    transform: scale(1.2);
    background-color: rgb(247, 191, 70);
  }

  100% {
    transform: scale(1);
    background-color: chartreuse;
  }
}

.fence {
  animation-name: fenceAnimation;
  animation-duration: 0.3s;
  animation-timing-function: ease-out;
  animation-delay: 0;
  animation-direction: alternate;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
  animation-play-state: running;
}

@keyframes fenceAnimation {
  0% {
    transform: scale(0.3);
    background-color: rgb(23, 154, 45);
  }

  50% {
    transform: scale(1.2);
    background-color: rgb(194, 142, 28);
  }

  100% {
    transform: scale(1);
    background-color: rgb(0, 0, 0);
  }
}
:root {
	--gray-0: #F8F9FA;
	--gray-1: #f4f5f1;
	--gray-2: #E9ECEF;
	--gray-3: #DEE2E6;
	--gray-4: #CED4DA;
	--gray-5: #ADB5BD;
	--gray-6: #868E96;
	--gray-7: #495057;
	--gray-8: #343A40;
	--gray-9: #212529;
	--white: #FFFFFF;
	--black: #000000;
	--dark: #212529;
	--font-color: var(--gray-8);
	--heading-color: var(--gray-9);
	--border-color: var(--gray-2);
	--body-color: var(--gray-1);
	--card-color: var(--white);
	--sidebar-color: var(--white);
	--buy-color: #0ecb81;
	--sell-color: #f6465d;
}

[data-theme=dark] {
	--gray-0: #212529;
	--gray-1: #31363a;
	--gray-2: #4e5358;
	--gray-3: #6f7479;
	--gray-4: #606264;
	--gray-5: #737579;
	--gray-6: #929599;
	--gray-7: #a8acaf;
	--gray-8: #e5e7e9;
	--gray-9: #e3e6e9;
	--white: #FFFFFF;
	--black: #000000;
	--dark: #000000;
	--font-color: var(--gray-6);
	--heading-color: var(--gray-8);
	--border-color: #19191a;
	--body-color: #070707;
	--card-color: #101010;
	--sidebar-color: #1f2122;
}

[data-theme=dark] .body-bg {
	background: #0f0f10;
}

[data-theme=dark] [data-qboat=theme-DaisyBush] {
	--primary-color: #7529c2;
}

[data-theme=dark] [data-qboat=theme-Midnight] {
	--primary-color: #3f5770;
}

body.radius-0 .card,
body.radius-0 .card .card-header,
body.radius-0 .card .card-footer,
body.radius-0 .sidebar .menu-link,
body.radius-0 .form-select,
body.radius-0 .btn,
body.radius-0 .form-control,
body.radius-0 .nav-link,
body.radius-0 .dropdown-menu,
body.radius-0 .choose-skin li div,
body.radius-0 .choose-skin li.active:after,
body.radius-0 .avatar,
body.radius-0 .rounded,
body.radius-0 .rounded-1,
body.radius-0 .rounded-2,
body.radius-0 .rounded-3,
body.radius-0 .rounded-4,
body.radius-0 .rounded-pill,
body.radius-0 .card .card-img-top,
body.radius-0 .alert,
body.radius-0 .badge,
body.radius-0 .input-group-


.include "macros.inc"

.section .text, "ax"  # 0x80006980 - 0x803E1E60

.global DWC_InitLanMatch
DWC_InitLanMatch:
/* 8031D4B0 00319110  94 21 FF F0 */	stwu r1, -0x10(r1)
/* 8031D4B4 00319114  7C 08 02 A6 */	mflr r0
/* 8031D4B8 00319118  38 60 00 05 */	li r3, 5
/* 8031D4BC 0031911C  38 80 02 10 */	li r4, 0x210
/* 8031D4C0 00319120  90 01 00 14 */	stw r0, 0x14(r1)
/* 8031D4C4 00319124  4B FF F4 29 */	bl DWC_Alloc
/* 8031D4C8 00319128  90 6D B0 38 */	stw r3, lbl_806402F8-_SDA_BASE_(r13)
/* 8031D4CC 0031912C  38 80 00 00 */	li r4, 0
/* 8031D4D0 00319130  38 A0 00 04 */	li r5, 4
/* 8031D4D4 00319134  4B CE 6C 31 */	bl memset
/* 8031D4D8 00319138  80 6D B0 38 */	lwz r3, lbl_806402F8-_SDA_BASE_(r13)
/* 8031D4DC 0031913C  38 80 00 00 */	li r4, 0
/* 8031D4E0 00319140  38 00 FF FF */	li r0, -1
/* 8031D4E4 00319144  90 83 00 00 */	stw r4, 0(r3)
/* 8031D4E8 00319148  80 6D B0 38 */	lwz r3, lbl_806402F8-_SDA_BASE_(r13)
/* 8031D4EC 0031914C  90 03 01 74 */	stw r0, 0x174(r3)
/* 8031D4F0 00319150  4B F5 52 C9 */	bl OSGetTime
/* 8031D4F4 00319154  80 AD B0 38 */	lwz r5, lbl_806402F8-_SDA_BASE_(r13)
/* 8031D4F8 00319158  90 85 02 0C */	stw r4, 0x20c(r5)
/* 8031D4FC 0031915C  90 65 02 08 */	stw r3, 0x208(r5)
/* 8031D500 00319160  80 01 00 14 */	lwz r0, 0x14(r1)
/* 8031D504 00319164  7C 08 03 A6 */	mtlr r0
/* 8031D508 00319168  38 21 00 10 */	addi r1, r1, 0x10
/* 8031D50C 0031916C  4E 80 00 20 */	blr

.global DWC_SetRecvLanMatchCallback
DWC_SetRecvLanMatchCallback:
/* 8031D510 00319170  80 8D B0 38 */	lwz r4, lbl_806402F8-_SDA_BASE_(r13)
/* 8031D514 00319174  90 64 02 00 */	stw r3, 0x200(r4)
/* 8031D518 00319178  4E 80 00 20 */	blr

.global DWC_SetSendLanMatchCallback
DWC_SetSendLanMatchCallback:
/* 8031D51C 0031917C  80 8D B0 38 */	lwz r4, lbl_806402F8-_SDA_BASE_(r13)
/* 8031D520 00319180  90 64 02 04 */	stw r3, 0x204(r4)
/* 8031D524 00319184  4E 80 00 20


  #endif
  }
}

void EnvGetDatabaseNamesRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const EnvGetDatabaseNamesRequest& EnvGetDatabaseNamesRequest::default_instance() {
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  protobuf_AddDesc_messages_2eproto();
#else
  if (default_instance_ == NULL) protobuf_AddDesc_messages_2eproto();
#endif
  return *default_instance_;
}

EnvGetDatabaseNamesRequest* EnvGetDatabaseNamesRequest::default_instance_ = NULL;

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

void EnvGetDatabaseNamesRequest::Clear() {
  env_handle_ = GOOGLE_ULONGLONG(0);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->clear();
}

bool EnvGetDatabaseNamesRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::StringOutputStream unknown_fields_string(
      mutable_unknown_fields());
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string);
  // @@protoc_insertion_point(parse_start:upscaledb.EnvGetDatabaseNamesRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required uint64 env_handle = 1;
      case 1: {
        if (tag == 8) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, &env_handle_)));
          set_has_env_handle();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(
            input, tag, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:upscaledb.EnvGetDatabaseNamesRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:upscaledb.EnvGetDatabaseNamesRequest)
  return false;
#undef DO_
}

void EnvGetDatabaseNamesRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:upscaledb.EnvGetDatabaseNamesRequest)
  // required uint64 env_handle = 1;
  if (has_env_handle()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->env_handle(), output);
  }

  output->WriteRaw(unknown_fields().data(),
                   unknown_fields().size());
  // @@protoc_insertion_p


e []int32) ApiDcimDeviceTypesListRequest {
	r.rearPortTemplateCountGte = &rearPortTemplateCountGte
	return r
}

func (r ApiDcimDeviceTypesListRequest) RearPortTemplateCountLt(rearPortTemplateCountLt []int32) ApiDcimDeviceTypesListRequest {
	r.rearPortTemplateCountLt = &rearPortTemplateCountLt
	return r
}

func (r ApiDcimDeviceTypesListRequest) RearPortTemplateCountLte(rearPortTemplateCountLte []int32) ApiDcimDeviceTypesListRequest {
	r.rearPortTemplateCountLte = &rearPortTemplateCountLte
	return r
}

func (r ApiDcimDeviceTypesListRequest) RearPortTemplateCountN(rearPortTemplateCountN []int32) ApiDcimDeviceTypesListRequest {
	r.rearPortTemplateCountN = &rearPortTemplateCountN
	return r
}

func (r ApiDcimDeviceTypesListRequest) Slug(slug []string) ApiDcimDeviceTypesListRequest {
	r.slug = &slug
	return r
}

func (r ApiDcimDeviceTypesListRequest) SlugEmpty(slugEmpty bool) ApiDcimDeviceTypesListRequest {
	r.slugEmpty = &slugEmpty
	return r
}

func (r ApiDcimDeviceTypesListRequest) SlugIc(slugIc []string) ApiDcimDeviceTypesListRequest {
	r.slugIc = &slugIc
	return r
}

func (r ApiDcimDeviceTypesListRequest) SlugIe(slugIe []string) ApiDcimDeviceTypesListRequest {
	r.slugIe = &slugIe
	return r
}

func (r ApiDcimDeviceTypesListRequest) SlugIew(slugIew []string) ApiDcimDeviceTypesListRequest {
	r.slugIew = &slugIew
	return r
}

func (r ApiDcimDeviceTypesListRequest) SlugIsw(slugIsw []string) ApiDcimDeviceTypesListRequest {
	r.slugIsw = &slugIsw
	return r
}

func (r ApiDcimDeviceTypesListRequest) SlugN(slugN []string) ApiDcimDeviceTypesListRequest {
	r.slugN = &slugN
	return r
}

func (r ApiDcimDeviceTypesListRequest) SlugNic(slugNic []string) ApiDcimDeviceTypesListRequest {
	r.slugNic = &slugNic
	return r
}

func (r ApiDcimDeviceTypesListRequest) SlugNie(slugNie []string) ApiDcimDeviceTypesListRequest {
	r.slugNie = &slugNie
	return r
}

func (r ApiDcimDeviceTypesListRequest) SlugNiew(slugNiew []string) ApiDcimDeviceTypesListRequest {
	r.slugNiew = &slugNiew
	return r
}

func (r ApiDcimDeviceTypesListRequest) SlugNisw(slugNisw []string) ApiDcimDeviceTypesListRequest {
	r.slugNisw = &slugNisw
	return r
}

// Parent devices house child devices in device bays. Leave blank if this device type is neither a parent nor a child.  * `parent` - Parent * `child` - Child
func (r ApiDcimDeviceTypesListRequest) SubdeviceRole(subdeviceRole ParentChildStatus) ApiDcimDeviceTypesListRequest {
	r.subdeviceRole = &subdeviceRole
	return r
}

func (r ApiDcimDeviceTypesListRequest) Tag(tag []string) ApiDcimDeviceTypesListRequest {
	r.tag = &tag
	return r
}

func (r ApiDcimDeviceTypesListRequest) TagN(tagN []string) ApiDcimDeviceTypesListRequest {
	r.tagN = &tagN
	return r
}

func (r ApiDcimDeviceTypesListRequest) TagId(tagId []int32) ApiDcim


    italic,
    key,
    layers,
    link,
    location,
    lock,
    lock_open,
    logout,
    mail,
    mail_open,
    map,
    maximize,
    microphone,
    microphone_off,
    minus,
    minus_circle,
    mobile,
    moon,
    moustache,
    music_note,
    navigation,
    package,
    pause,
    pencil,
    phone,
    phone_call,
    phone_forward,
    phone_incoming,
    phone_missed,
    phone_off,
    phone_outgoing,
    pie_chart,
    play,
    plus,
    plus_circle,
    power,
    print,
    radio,
    rain,
    refresh,
    rewind,
    rocket,
    rss,
    save,
    scissors,
    search,
    share,
    share_alt,
    ship,
    skip_backward,
    skip_forward,
    snow,
    square,
    star,
    storm,
    sun,
    support,
    switch_off,
    switch_on,
    tag,
    tags,
    text,
    times,
    times_circle,
    trash,
    trending_down,
    trending_up,
    triangle,
    truck,
    underline,
    upload,
    user,
    user_add,
    user_asking,
    user_remove,
    users,
    verified,
    view_grid,
    view_list,
    volume,
    volume_1,
    volume_2,
    volume_off,
    wifi,
    wifi_off,
    wind,
    zoom_in,
    zoom_out,
  ];
}
///Discover all icons of this iconset at https://andronasef.github.io/iconify_flutter/collection/icons8
class Icons8 {
  static const String add_shopping_cart =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path fill="currentColor" d="M4 7a1 1 0 000 2h2.22l2.624 10.5c.223.89 1.02 1.5 1.937 1.5h12.47c.903 0 1.67-.6 1.907-1.47L27.75 10h-2.094l-2.406 9H10.78L8.157 8.5A1.984 1.984 0 006.22 7H4zm18 14c-1.645 0-3 1.355-3 3s1.355 3 3 3 3-1.355 3-3-1.355-3-3-3zm-9 0c-1.645 0-3 1.355-3 3s1.355 3 3 3 3-1.355 3-3-1.355-3-3-3zm3-14v3h-3v2h3v3h2v-3h3v-2h-3V7h-2zm-3 16c.564 0 1 .436 1 1 0 .564-.436 1-1 1-.564 0-1-.436-1-1 0-.564.436-1 1-1zm9 0c.564 0 1 .436 1 1 0 .564-.436 1-1 1-.564 0-1-.436-1-1 0-.564.436-1 1-1z"/></svg>';
  static const String add_user =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path fill="currentColor" d="M14 4c-3.854 0-7 3.146-7 7 0 2.41 1.23 4.552 3.094 5.813C6.527 18.343 4 21.88 4 26h2c0-4.43 3.57-8 8-8 1.376 0 2.654.358 3.78.97A7.993 7.993 0 0016 24c0 4.406 3.594 8 8 8 4.406 0 8-3.594 8-8 0-4.406-3.594-8-8-8a7.98 7.98 0 00-


 w.mult_add(x, b);
  x
}

fn _build_batch_norm_conv(x: Val<GPUDeviceOuterBatchArray3d<f32>>, online: Val<bool>, avg_rate: Val<f32>, conv_shape: Conv2dShape, params: &mut NodeVec, online_stats: &mut NodeVec, avg_stats: &mut NodeVec) -> Val<GPUDeviceOuterBatchArray3d<f32>> {
  let w = src(GPUDeviceArray4d::<f32>::kaiming_conv2d_init(
      [conv_shape.ker_dims[0], conv_shape.ker_dims[1], conv_shape.src_features, conv_shape.features],
      conv_shape.ker_dims,
      conv_shape.src_features,
      conv_shape.features,
      &mut thread_rng()));
  params.push_val(w.clone());
  let x = w.conv(conv_shape.clone(), x);
  x
}

fn build_batch_norm_conv(x: Val<GPUDeviceOuterBatchArray3d<f32>>, online: Val<bool>, avg_rate: Val<f32>, conv_shape: Conv2dShape, params: &mut NodeVec, online_stats: &mut NodeVec, avg_stats: &mut NodeVec) -> Val<GPUDeviceOuterBatchArray3d<f32>> {
  let w = src(GPUDeviceArray4d::<f32>::kaiming_conv2d_init(
      [conv_shape.ker_dims[0], conv_shape.ker_dims[1], conv_shape.src_features, conv_shape.features],
      conv_shape.ker_dims,
      conv_shape.src_features,
      conv_shape.features,
      &mut thread_rng()));
  params.push_val(w.clone());
  let x = w.conv(conv_shape.clone(), x);
  let epsilon = 1.0e-6_f32;
  let (x, x_mean, x_var, x_avg_mean, x_avg_var) = x.batch_normalize_2d([0, 1], online, avg_rate, epsilon);
  online_stats.push_val(x_mean);
  online_stats.push_val(x_var);
  avg_stats.push_val(x_avg_mean);
  avg_stats.push_val(x_avg_var);
  // TODO: broadcast mult add here.
  /*let scale = src(GPUDeviceArray1d::<f32>::ones_init(conv_shape.features));
  let shift = src(GPUDeviceArray1d::<f32>::zeros_init(conv_shape.features));
  let x = scale.broadcast_1d_mult_add(2, x, shift);
  params.push_val(scale.clone());
  params.push_val(shift.clone());*/
  x
}

fn build_residual2_conv(x: Val<GPUDeviceOuterBatchArray3d<f32>>, online: Val<bool>, avg_rate: Val<f32>, conv_shape: Conv2dShape, params: &mut NodeVec, online_stats: &mut NodeVec, avg_stats: &mut NodeVec) -> Val<GPUDeviceOuterBatchArray3d<f32>> {
  // TODO
  let mut conv1 = conv_shape;
  conv1.ker_dims = [3, 3];
  conv1.stride = [1, 1];
  conv1.zero_pad = [1, 1];
  let y = build_batch_norm_conv(x.clone(), online.clone(), avg_rate.clone(), conv1, params, online_stats, avg_stats);
  //let y = y.positive_clip();
  let y = y.positive_clip_inplace();
  // TODO
  let mut conv2 = conv_shape;
  conv2.ker_dims = [


/* Optimized with sse2 version of sinf
   Copyright (C) 2012-2019 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, see
   <http://www.gnu.org/licenses/>.  */

#include <sysdep.h>
#include <errno.h>

/* Short algorithm description:
 *
 *  1) if |x| == 0: return x.
 *  2) if |x| <  2^-27: return x-x*DP_SMALL, raise underflow only when needed.
 *  3) if |x| <  2^-5 : return x+x^3*DP_SIN2_0+x^5*DP_SIN2_1.
 *  4) if |x| <   Pi/4: return x+x^3*(S0+x^2*(S1+x^2*(S2+x^2*(S3+x^2*S4)))).
 *  5) if |x| < 9*Pi/4:
 *      5.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0x0e, n=k+1,
 *           t=|x|-j*Pi/4.
 *      5.2) Reconstruction:
 *          s = sign(x) * (-1.0)^((n>>2)&1)
 *          if(n&2 != 0) {
 *              using cos(t) polynomial for |t|<Pi/4, result is
 *              s     * (1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4))))).
 *          } else {
 *              using sin(t) polynomial for |t|<Pi/4, result is
 *              s * t * (1.0+t^2*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4))))).
 *          }
 *  6) if |x| < 2^23, large args:
 *      6.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+1,
 *           t=|x|-j*Pi/4.
 *      6.2) Reconstruction same as (5.2).
 *  7) if |x| >= 2^23, very large args:
 *      7.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+1,
 *           t=|x|-j*Pi/4.
 *      7.2) Reconstruction same as (5.2).
 *  8) if x is Inf, return x-x, and set errno=EDOM.
 *  9) if x is NaN, return x-x.
 *
 * Special cases:
 *  sin(+-0) = +-0 not raising inexact/u


using BenchmarkDotNet.Attributes;
using Quickenshtein.Benchmarks.Config;

namespace Quickenshtein.Benchmarks.Comparisons
{
	/// <summary>
	/// This is the overall comparison benchmark between different implementations for different string sizes.
	/// </summary>
	[Config(typeof(BaseRuntimeQuickConfig))]
	public class QuickComparisonBenchmark
	{
		[Params(10, 400, 8000)]
		public int NumberOfCharacters;

		public string StringA;
		public string StringB;

		[GlobalSetup]
		public void Setup()
		{
			StringA = Utilities.BuildString("aabcdecbaabcadbab", NumberOfCharacters);
			StringB = Utilities.BuildS


Input;
;
#line 676 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTSE/Sources/EntitiesMP/PyramidSpaceShip.es"
STATE_CPyramidSpaceShip_FireLightBeam, TRUE;
Jump(STATE_CURRENT, 0x02610004, FALSE, EBegin());return TRUE;}BOOL CPyramidSpaceShip::H0x02610004_MPIntro_03(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x02610004
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPyramidSpaceShip_FireLightBeam, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x02610005, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPyramidSpaceShip::H0x02610005_MPIntro_04(const CEntityEvent &__eeInput){
#undef STATE_CURRENT
#define STATE_CURRENT 0x02610005
const EReturn&__e= (EReturn&)__eeInput;
;
#line 677 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTSE/Sources/EntitiesMP/PyramidSpaceShip.es"
m_epssState  = PSSS_BEAM_DEACTIVATED ;
#line 678 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTSE/Sources/EntitiesMP/PyramidSpaceShip.es"
SetTimerAfter(m_fWaitAfterKillingBeam );
Jump(STATE_CURRENT, 0x02610006, FALSE, EBegin());return TRUE;}BOOL CPyramidSpaceShip::H0x02610006_MPIntro_05(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x02610006
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x02610007, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPyramidSpaceShip::H0x02610007_MPIntro_06(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x02610007
;
#line 679 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTSE/Sources/EntitiesMP/PyramidSpaceShip.es"
STATE_CPyramidSpaceShip_FireLightBeam, TRUE;
Jump(STATE_CURRENT, 0x02610008, FALSE, EBegin());return TRUE;}BOOL CPyramidSpaceShip::H0x02610008_MPIntro_07(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x02610008
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPyramidSpaceShip_FireLightBeam, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x02610009, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPyramidSpaceShip::H0x02610009_MPIntro_08(const CEntityEvent &__eeInput){
#undef STATE_CURRENT
#define STATE_CURRENT 0x02610009
const EReturn&__e= (EReturn&)__eeInput;
;
#line 680 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTSE/Sources/Entitie


& 863 & 497 & 383 & 563 &  79 & 973 & 287 &  63 & 343 & 169 & 583 \\\\
  627 & 343 & 773 & 959 & 943 & 767 & 473 & 103 & 699 & 303 & 957 & 703 & 583 & 639 & 913 \\\\
  447 & 283 & 463 &  29 &  23 & 487 & 463 & 993 & 119 & 883 & 327 & 493 & 423 & 159 & 743 \\\\
  217 & 623 &   3 & 399 & 853 & 407 & 103 & 983 &  89 & 463 & 290 & 516 & 212 & 462 & 350 \\\\
  960 & 376 & 682 & 962 & 300 & 780 & 486 & 502 & 912 & 800 & 250 & 346 & 172 & 812 & 350 \\\\
  870 & 456 & 192 & 162 & 593 & 473 & 915 &  45 & 989 & 873 & 823 & 965 & 425 & 329 & 803 \\\\
  973 & 965 & 905 & 919 & 133 & 673 & 665 & 235 & 509 & 613 & 673 & 815 & 165 & 992 & 326 \\\\
  322 & 148 & 972 & 962 & 286 & 255 & 941 & 541 & 265 & 323 & 925 & 281 & 601 &  95 & 973 \\\\
  445 & 721 &  11 & 525 & 473 &  65 & 511 & 164 & 138 & 672 &  18 & 428 & 154 & 448 & 848 \\\\
  414 & 456 & 310 & 312 & 798 & 104 & 566 & 520 & 302 & 248 & 694 & 976 & 430 & 392 & 198 \\\\
  184 & 829 & 373 & 181 & 631 & 101 & 969 & 613 & 840 & 740 & 778 & 458 & 284 & 760 & 390 \\\\
  821 & 461 & 843 & 513 &  17 & 901 & 711 & 993 & 293 & 157 & 274 &  94 & 192 & 156 & 574 \\\\
   34 & 124 &   4 & 878 & 450 & 476 & 712 & 914 & 838 & 669 & 875 & 299 & 823 & 329 & 699 \\\\
  815 & 559 & 813 & 459 & 522 & 788 & 168 & 586 & 966 & 232 & 308 & 833 & 251 & 631 & 107 \\\\
  813 & 883 & 451 & 509 & 615 &  77 & 281 & 613 & 459 & 205 & 380 & 274 & 302 &  35 & 805
\end{array}$$

### --tests--

`matrixSum()` should return `13938`.

```js
assert.strictEqual(matrixSum(), 13938);
```

## 45

### --description--

The number 7 is special, because 7 is 111 written in base 2, and 11 written in base 6 (i.e. $7_{10} = {11}_6 = {111}_2$). In other words, 7 is a repunit in at least two bases $b > 1$.

We shall call a positive integer with this property a strong repunit. It can be verified that there are 8 strong repunits below 50: {1, 7, 13, 15, 21, 31, 40, 43}. Furthermore, the sum of all strong repunits below 1000 equals 15864.

Find the sum of all strong repunits below ${10}^{12}$.

### --tests--

`strongRepunits()` should return `336108797689259260`.

```js
assert.strictEqual(strongRepunits(), 336108797689259260);
```

## 46

### --description--

The largest integer $≤ 100$ that is only divisible by both the primes 2 and 3 is 96, as $96 = 32 \times 3 = 2^5 \times 3$.

For two distinct primes $p$ and $q$ let $M(p, q, N)$ be the largest positive integer $≤ N$ only divisible by both $p$ and $q$ and $M(p, q, N)=0$ if such a positive integer does not exist.

E.g. $M(2, 3, 100) = 96$.

$M(3, 5, 100) = 75$ and not 90 because 90 is divisible by 2, 3 and 5. Also $M(2, 73, 100) = 0$ because there does not exist a positive integer $≤ 100$ that is divisible by both 2 and 73.

Let $S(N)$ be the sum of all distinct $M(p, q, N)$. $S(100)=2262$.

Find $S(10\\,000\\,000)$.

### --tests--

`integerDivisibleByTwoPrimes()` should return `11109800204052`.


pub mod table_element;
pub mod title_element;
pub mod whitelisted_immutable_slices;
pub mod xpath_result;

#[wasm_bindgen_test]
fn deref_works() {
    fn _check(a: &web_sys::XmlHttpRequestUpload) {
        let _x: &web_sys::XmlHttpRequestEventTarget = a;
        let _x: &web_sys::EventTarget = a;
        let _x: &js_sys::Object = a;
        let _x: &wasm_bindgen::JsValue = a;
    }
}
<filename>geo/src/algorithm/map_coords.rs<gh_stars>0
//! # Advanced Example: Fallible Geometry coordinate conversion using `PROJ`
//!
//! ```
//! // activate the [use-proj] feature in cargo.toml in order to access proj functions
//! # #[cfg(feature = "use-proj")]
//! use geo::{Coordinate, Point};
//! # #[cfg(feature = "use-proj")]
//! use geo::algorithm::map_coords::TryMapCoords;
//! # #[cfg(feature = "use-proj")]
//! use proj::Proj;
//! // GeoJSON uses the WGS 84 coordinate system
//! # #[cfg(feature = "use-proj")]
//! let from = "EPSG:4326";
//! // The NAD83 / California zone 6 (ftUS) coordinate system
//! # #[cfg(feature = "use-proj")]
//! let to = "EPSG:2230";
//! # #[cfg(feature = "use-proj")]
//! let to_feet = Proj::new_known_crs(&from, &to, None).unwrap();
//! # #[cfg(feature = "use-proj")]
//! let f = |x: f64, y: f64| {
//!     // proj can accept Point, Coordinate, Tuple, and array values, returning a Result
//!     let shifted = to_feet.convert((x, y))?;
//!     Ok((shifted.x(), shifted.y()))
//! };
//! # #[cfg(feature = "use-proj")]
//! // 👽
//! # #[cfg(feature = "use-proj")]
//! let usa_m = Point::new(-115.797615, 37.2647978);
//! # #[cfg(feature = "use-proj")]
//! let usa_ft = usa_m.try_map_coords(|&(x, y)| f(x, y)).unwrap();
//! # #[cfg(feature = "use-proj")]
//! assert_eq!(6693625.67217475, usa_ft.x());
//! # #[cfg(feature = "use-proj")]
//! assert_eq!(3497301.5918027186, usa_ft.y());
//! ```

use crate::{
    Coordinate, CoordinateType, Geometry, GeometryCollection, Line, LineString, MultiLineString,
    MultiPoint, MultiPolygon, Point, Polygon, Rect, Triangle,
};
use std::error::Error;

/// Map a function over all the coordinates in an object, returning a new one
pub trait MapCoords<T, NT> {
    type Output;

    /// Apply a function to all the coordinates in a geometric object, returning a new object.
    ///
    /// # Examples
    ///
    /// ```
    /// use geo::algorithm::map_coords::MapCoords;
    /// use geo::Point;
    ///
    /// let p1 = Point::new(10., 20.);
    /// let p2 = p1.map_coords(|&(x, y)| (x + 1000., y * 2.));
    ///
    /// assert_eq!(p2, Point::new(1010., 40.));
    /// ```
    ///
    /// You can convert the coordinate type this way as well
    ///
    /// ```
    /// # use geo::Point;
    /// # use geo::algorithm::map_coords::MapCoords;
    ///
    /// let p1: Point<f32> = Point::new(10.0f32, 20.0f32);
    /// le


{
				var elements = [
					new CKEDITOR.htmlParser.element( 'ul' ),
					new CKEDITOR.htmlParser.element( 'ul' )
				];

				// Explicit style declarations have priority over setListSymbol().
				elements[ 0 ].attributes.style = 'list-style-type: disc';
				elements[ 1 ].attributes.style = 'list-style-type: disc';

				this.lists.setListSymbol( elements[ 0 ], 'o', 1 );
				this.lists.setListSymbol( elements[ 1 ], 'o', 2 );

				assert.areSame( '

', elements[0].getOuterHtml() );
				assert.areSame( '

', elements[1].getOuterHtml() );
			},
			'test remove list symbol 1': function() {
				var html = '<cke:li cke-list-level="1" cke-symbol="1.">1.       This</cke:li>',
					fragment = CKEDITOR.htmlParser.fragment.fromHtml( html ),
					element = fragment.children[ 0 ];

				this.lists.removeSymbolText( element );

				assert.areSame( '<cke:li cke-list-level="1" cke-symbol="1."> This</cke:li>', element.getOuterHtml() );
			},
			'test remove list symbol 2': function() {
				var html = '<cke:li cke-list-level="1" cke-symbol="1.">1.       This</cke:li>',
					fragment = CKEDITOR.htmlParser.fragment.fromHtml( html ),
					element = fragment.children[ 0 ];

				this.lists.removeSymbolText( element );

				assert.areSame( '<cke:li cke-list-level="1" cke-symbol="1."> This</cke:li>', element.getOuterHtml() );
			},
			'test supportFields comment': function() {
				/*jshint nonbsp:false */
				var html = '',
					inComment = 0;
				/*jshint nonbsp:true */

				var fragment = CKEDITOR.htmlParser.fragment.fromHtml( html );

				var filter = new CKEDITOR.htmlParser.filter( {
					comment: function( element ) {
						if ( element == '[if supportFields]' ) {
							inComment++;
						}
						if ( element == '[endif]' ) {
							inComment = inComment > 0 ? inComment - 1 : 0;
						}
						return false;
					},
					text: function( content ) {
						if ( inComment ) {
							return '';
						}
						return content.replace( / /g, ' ' );
					}
				} );

				var writer = new CKEDITOR.htmlParser.basicWriter();

				filter.applyTo( fragment );
				fragment.writeHtml( writer );

				assert.areSame( CKEDITOR.cleanWord( html, this.editor ), writer.getHtml() );
			},
			'test dissolving lists': function() {
				var editorStub = {
						fire: sinon.stub(),
						config: {}
					};

				var html = '
The list below does not copy + paste correctly:<o:p></o:p>
' +
							'
<o:p> </o:p>
' +
							'
<span lang="EN-


]
	vpshufb	ymm2, ymm2, ymm0
	vpermq	ymm2, ymm2, 232                 # ymm2 = ymm2[0,2,2,3]
	vmovdqu	xmmword ptr [rcx + 2*rdi + 48], xmm2
	vmovdqu	xmmword ptr [rcx + 2*rdi + 32], xmm1
	add	rdi, 32
	add	rax, 2
	jne	.LBB3_487
	jmp	.LBB3_754
.LBB3_488:
	mov	esi, r9d
	and	esi, -32
	lea	rax, [rsi - 32]
	mov	rdi, rax
	shr	rdi, 5
	add	rdi, 1
	mov	r8d, edi
	and	r8d, 3
	cmp	rax, 96
	jae	.LBB3_602
# %bb.489:
	xor	eax, eax
	jmp	.LBB3_604
.LBB3_490:
	mov	esi, r9d
	and	esi, -16
	lea	rax, [rsi - 16]
	mov	r8, rax
	shr	r8, 4
	add	r8, 1
	test	rax, rax
	je	.LBB3_761
# %bb.491:
	mov	rax, r8
	and	rax, -2
	neg	rax
	xor	edi, edi
	vmovdqa	ymm0, ymmword ptr [rip + .LCPI3_10] # ymm0 = [0,1,4,5,8,9,12,13,8,9,12,13,12,13,14,15,16,17,20,21,24,25,28,29,24,25,28,29,28,29,30,31]
.LBB3_492:                              # =>This Inner Loop Header: Depth=1
	vpmovsxwd	ymm1, xmmword ptr [rdx + 2*rdi]
	vpmovsxwd	ymm2, xmmword ptr [rdx + 2*rdi + 16]
	vpsrad	ymm3, ymm2, 15
	vpsrad	ymm4, ymm1, 15
	vpaddd	ymm1, ymm4, ymm1
	vpaddd	ymm2, ymm3, ymm2
	vpxor	ymm2, ymm2, ymm3
	vpxor	ymm1, ymm1, ymm4
	vpshufb	ymm1, ymm1, ymm0
	vpermq	ymm1, ymm1, 232                 # ymm1 = ymm1[0,2,2,3]
	vpshufb	ymm2, ymm2, ymm0
	vpermq	ymm2, ymm2, 232                 # ymm2 = ymm2[0,2,2,3]
	vmovdqu	xmmword ptr [rcx + 2*rdi + 16], xmm2
	vmovdqu	xmmword ptr [rcx + 2*rdi], xmm1
	vpmovsxwd	ymm1, xmmword ptr [rdx + 2*rdi + 32]
	vpmovsxwd	ymm2, xmmword ptr [rdx + 2*rdi + 48]
	vpsrad	ymm3, ymm2, 15
	vpsrad	ymm4, ymm1, 15
	vpaddd	ymm1, ymm4, ymm1
	vpaddd	ymm2, ymm3, ymm2
	vpxor	ymm2, ymm2, ymm3
	vpxor	ymm1, ymm1, ymm4
	vpshufb	ymm1, ymm1, ymm0
	vpermq	ymm1, ymm1, 232                 # ymm1 = ymm1[0,2,2,3]
	vpshufb	ymm2, ymm2, ymm0
	vpermq	ymm2,


 curly_braces_in_flow_control_structures
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
// ignore_for_file: non_constant_identifier_names

import 'dart:core' as $core;

import 'package:protobuf/protobuf.dart' as $pb;

class AttentionRelationStatus extends $pb.ProtobufEnum {
  static const AttentionRelationStatus ARS_NONE =
      AttentionRelationStatus._(0, _omitEnumNames ? '' : 'ARS_NONE');
  static const AttentionRelationStatus ARS_N0RELATION =
      AttentionRelationStatus._(1, _omitEnumNames ? '' : 'ARS_N0RELATION');
  static const AttentionRelationStatus ARS_FOLLOWHIM =
      AttentionRelationStatus._(2, _omitEnumNames ? '' : 'ARS_FOLLOWHIM');
  static const AttentionRelationStatus ARS_FOLLOWME =
      AttentionRelationStatus._(3, _omitEnumNames ? '' : 'ARS_FOLLOWME');
  static const AttentionRelationStatus ARS_BUDDY =
      AttentionRelationStatus._(4, _omitEnumNames ? '' : 'ARS_BUDDY');
  static const AttentionRelationStatus ARS_SPECIAL =
      AttentionRelationStatus._(5, _omitEnumNames ? '' : 'ARS_SPECIAL');
  static const AttentionRelationStatus ARS_CANCELBLOCK =
      AttentionRelationStatus._(6, _omitEnumNames ? '' : 'ARS_CANCELBLOCK');

  static const $core.List<AttentionRelationStatus> values =
      <AttentionRelationStatus>[
    ARS_NONE,
    ARS_N0RELATION,
    ARS_FOLLOWHIM,
    ARS_FOLLOWME,
    ARS_BUDDY,
    ARS_SPECIAL,
    ARS_CANCELBLOCK,
  ];

  static final $core.List<AttentionRelationStatus?> _byValue =
      $pb.ProtobufEnum.$_initByValueList(values, 6);
  static AttentionRelationStatus? valueOf($core.int value) =>
      value < 0 || value >= _byValue.length ? null : _byValue[value];

  const AttentionRelationStatus._(super.value, super.name);
}

class DescType extends $pb.ProtobufEnum {
  static const DescType DescTypeUnknown =
      DescType._(0, _omitEnumNames ? '' : 'DescTypeUnknown');
  static const DescType DescTypeText =
      DescType._(1, _omitEnumNames ? '' : 'DescTypeText');
  static const DescType DescTypeAt =
      DescType._(2, _omitEnumNames ? '' : 'DescTypeAt');

  static const $core.List<DescType> values = <DescType>[
    DescTypeUnknown,
    DescTypeText,
    DescTypeAt,
  ];

  static final $core.List<DescType?> _byValue =
      $pb.ProtobufEnum.$_initByValueList(values, 2);
  static DescType? valueOf($core.int value) =>
      value < 0 || value >= _byValue.length ? null : _byValue[value];

  const DescType._(super.value, super.name);
}

class ExtType extends $pb.ProtobufEnum {
  static const ExtType ExtNone = ExtType._(0, _omitEnumNames ? '' : 'ExtNone');
  static const ExtType ExtDataCenter =
      ExtType._(1, _omitEnumNames ? '' : 'ExtDataCenter');
  static const ExtType ExtDataEarnings =
      ExtType._(2, _omitEnumNames ? '' : 'ExtDataEarnings');

  static const $core.List<ExtType> values = <ExtType>[


lityZone: jsii.String("availabilityZone"),
//   	Hardware: &HardwareProperty{
//   		CpuCount: jsii.Number(123),
//   		Disks: []interface{}{
//   			&DiskProperty{
//   				DiskName: jsii.String("diskName"),
//   				Path: jsii.String("path"),
//
//   				// the properties below are optional
//   				AttachedTo: jsii.String("attachedTo"),
//   				AttachmentState: jsii.String("attachmentState"),
//   				Iops: jsii.Number(123),
//   				IsSystemDisk: jsii.Boolean(false),
//   				SizeInGb: jsii.String("sizeInGb"),
//   			},
//   		},
//   		RamSizeInGb: jsii.Number(123),
//   	},
//   	KeyPairName: jsii.String("keyPairName"),
//   	Location: &LocationProperty{
//   		AvailabilityZone: jsii.String("availabilityZone"),
//   		RegionName: jsii.String("regionName"),
//   	},
//   	Networking: &NetworkingProperty{
//   		Ports: []interface{}{
//   			&PortProperty{
//   				AccessDirection: jsii.String("accessDirection"),
//   				AccessFrom: jsii.String("accessFrom"),
//   				AccessType: jsii.String("accessType"),
//   				CidrListAliases: []*string{
//   					jsii.String("cidrListAliases"),
//   				},
//   				Cidrs: []*string{
//   					jsii.String("cidrs"),
//   				},
//   				CommonName: jsii.String("commonName"),
//   				FromPort: jsii.Number(123),
//   				Ipv6Cidrs: []*string{
//   					jsii.String("ipv6Cidrs"),
//   				},
//   				Protocol: jsii.String("protocol"),
//   				ToPort: jsii.Number(123),
//   			},
//   		},
//
//   		// the properties below are optional
//   		MonthlyTransfer: &MonthlyTransferProperty{
//   			GbPerMonthAllocated: jsii.String("gbPerMonthAllocated"),
//   		},
//   	},
//   	State: &StateProperty{
//   		Code: jsii.Number(123),
//   		Name: jsii.String("name"),
//   	},
//   	Tags: []cfnTag{
//   		&cfnTag{
//   			Key: jsii.String("key"),
//   			Value: jsii.String("value"),
//   		},
//   	},
//   	UserData: jsii.String("userData"),
//   })
//
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html
//
type CfnInstance interface {
	awscdk.CfnResource
	IInstanceRef
	awscdk.IInspectable
	awscdk.ITaggable
	// An array of add-ons for the instance.
	AddOns() interface{}
	SetAddOns(val interface{})
	// The number of vCPUs the instance has.
	AttrHardwareCpuCount() *float64
	// The amount of RAM in GB on the instance (for example, `1.0` ).
	AttrHardwareRamSizeInGb() *float64
	// The Amazon Resource Name (ARN) of the instance (for example, `arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE` ).
	AttrInstanceArn() *string
	// The IPv6 addresses of the instance.
	AttrIpv6Addresses() *[]*string


#include <windows.h>

#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>

#include "dinput/device_dinput8.h"
#include "dinput/dinput.h"

#include <stdbool.h>

#include "hook/com-proxy.h"
#include "hook/pe.h"
#include "hook/table.h"

#include "util/defs.h"
#include "util/log.h"

static HRESULT STDCALL my_DirectInput8Create(
    HINSTANCE hinst,
    DWORD dwVersion,
    REFIID riidltf,
    LPVOID *ppvOut,
    LPVOID punkOuter);

static HRESULT(STDCALL *real_DirectInput8Create)(
    HINSTANCE hinst,
    DWORD dwVersion,
    REFIID riidltf,
    LPVOID *ppvOut,
    LPVOID punkOuter);

static const struct hook_symbol dinput_syms[] = {
    {
        .name = "DirectInput8Create",
        .patch = my_DirectInput8Create,
        .link = (void **) &real_DirectInput8Create,
    },
};

static HRESULT STDCALL my_CreateDevice(
    IDirectInput8W *self,
    REFGUID rguid,
    LPDIRECTINPUTDEVICE8W *lplpDirectInputDevice,
    LPUNKNOWN pUnkOuter)
{
    log_misc("IDirectInput8::CreateDevice hook hit");

    if (lplpDirectInputDevice == NULL) {
        return DIERR_INVALIDPARAM;
    }

    if (IsEqualGUID(rguid, &GUID_SysKeyboard) ||
        IsEqualGUID(rguid, &GUID_SysMouse)) {
        log_misc("Returning stub device");

        *lplpDirectInputDevice = di8_stub_device;
        di8_stub_device->lpVtbl->AddRef(di8_stub_device);

        return DI_OK;
    }

    return DIERR_NOINTERFACE;
}

static HRESULT STDCALL my_EnumDevices(
    IDirectInput8W *self,
    DWORD dwDevType,
    LPDIENUMDEVICESCALLBACKW lpCallback,
    LPVOID pvRef,
    DWORD dwFlags)
{
    log_misc("IDirectInput8::EnumDevices hook hit");

    return DI_OK;
}

static HRESULT STDCALL my_DirectInput8Create(
    HINSTANCE hinst,
    DWORD dwVersion,
    REFIID riidltf,
    LPVOID *ppvOut,
    LPVOID punkOuter)
{
    IDirectInput8W *api;
    IDirectInput8WVtbl *api_vtbl;
    struct com_proxy *api_proxy;
    HRESULT res;

    log_info("DirectInput8Create hook hit");

    res = real_DirectInput8Create(
        hinst, dwVersion, riidltf, (LPVOID *) &api, punkOuter);

    if (res != DI_OK) {
        return res;
    }

    res = com_proxy_wrap(&api_proxy, api, sizeof(*api->lpVtbl));

    if (res != S_OK) {
        log_warning("Wrapping com proxy failed: %08lx", res);
        return res;
    }

    api_vtbl = api_proxy->vptr;

    api_vtbl->EnumDevices = my_EnumDevices;
    api_vtbl->CreateDevice = my_CreateDevice;

    *(IDirectInput8W **) ppvOut = (IDirectInput8W *) api_proxy;

    return res;
}

void dinput_init(void)
{
    hook_table_apply(NULL, "dinput8.dll", dinput_syms, lengthof(dinput_syms));

    log_info("Inserted dinput hooks");
}


HibernateAbstractDataSource implements JRDataSource
{
	public static final String EXCEPTION_MESSAGE_KEY_FIELD_ALIAS_TYPE_MISMATCH = "data.hibernate.field.alias.type.mismatch";
	public static final String EXCEPTION_MESSAGE_KEY_MANY_FIELDS_DETECTED = "data.hibernate.many.fields.detected";
	public static final String EXCEPTION_MESSAGE_KEY_NO_FIELD_ALIAS = "data.hibernate.no.field.alias";
	public static final String EXCEPTION_MESSAGE_KEY_NO_FIELD_READER = "data.hibernate.no.field.reader";
	public static final String EXCEPTION_MESSAGE_KEY_UNKNOWN_RETURN_ALIAS = "data.hibernate.unknown.return.alias";

	public static final char NESTED_DELIM = '.';

	private final JRAbstractBeanDataSource.PropertyNameProvider propertyNameProvider;
	private Map<String, FieldReader> fieldReaders;
	protected final JRHibernateQueryExecuter queryExecuter;
	private Tuple currentReturnValue;

	/**
	 * Creates a Hibernate data source.
	 *
	 * @param queryExecuter the query executer
	 * @param useFieldDescription whether to use field descriptions for fields to results mapping
	 */
	protected JRHibernateAbstractDataSource(JRHibernateQueryExecuter queryExecuter, boolean useFieldDescription)
	{
		this.propertyNameProvider = new JRAbstractBeanDataSource.DefaultPropertyNameProvider(useFieldDescription);

		this.queryExecuter = queryExecuter;
	}

	/**
	 * Assigns field readers to report fields.
	 *
	 * @return a report field name to field reader mapping
	 * @see FieldReader
	 */
	protected Map<String, FieldReader> assignReaders(Tuple result)
	{
		Map<String, FieldReader> readers = new HashMap<>();

		JRField[] fields = queryExecuter.getDataset().getFields();
		List<TupleElement<?>> elements = result.getElements();

		Map<String, Integer> aliasesMap = new HashMap<>();
		for (ListIterator<TupleElement<?>> iterator = elements.listIterator(); iterator.hasNext();)
		{
			TupleElement<?> tupleElement = (TupleElement<?>) iterator.next();
			aliasesMap.put(tupleElement.getAlias(), iterator.previousIndex());
		}

		if (elements.size() == 1)
		{
			TupleElement<?> element = elements.get(0);

			boolean managedType = isManagedType(element);
			if (managedType)
			{
				for (int i = 0; i < fields.length; i++)
				{
					JRField field = fields[i];
					readers.put(field.getName(), getFieldReaderSingleReturn(aliasesMap, field));
				}
			}
			else
			{
				if (fields.length > 1)
				{
					throw
						new JRRuntimeException(
							EXCEPTION_MESSAGE_KEY_MANY_FIELDS_DETECTED,
							(Object[])null);
				}

				if (fields.length == 1)
				{
					JRField field = fields[0];
					readers.put(field.getName(), new IndexFieldReader(0));
				}
			}
		}
		else
		{
			for (int i = 0; i < fields.length; i++)
			{
				JRField field = fields[i];
				readers.put(field.getName(), getFieldReader(elements, aliasesMap, field));
			}
		}

		return readers;
	}

	protected boolean isManagedType(TupleElement<?> element)
	{
		try
		{
			queryExecuter.getSession().getMetamodel().managedType(element.getJavaType());
			return true;
		}
		catch (IllegalArgumentException e)
		{
			return false;
		}
	}

	protected FieldReader getFieldReaderSingleReturn(Map<String,Integer> aliasesMap, JRField field)
	{
		FieldReader reader;

		String fieldMapping = getFieldMapping(field);
		if (aliasesMap.containsKey(fieldMapping))
		{
			reader = new IndexFieldReader(0);
		}
		else
		{
			int firstNestedIdx = fieldMapping.indexOf(NESTED_DELIM);

			if (firstNestedIdx >= 0 && aliasesMap.containsKey(fieldMapping.substring(0


vd	%f0, %f58
cpu_intr_1_372:
	setx	0x44002e, %g1, %o0
	ta	T_SEND_THRD_INTR
	.word 0xbfab8820  ! 4613: FMOVPOS	fmovs	%fcc1, %f0, %f31
iob_intr_1_383:
!$EV trig_pc_d(1,expr(@VA(.MAIN.iob_intr_1_383), 16, 16)) -> intp(1, 0, 32)
	.word 0xb7a489a0  ! 4617: FDIVs	fdivs	%f18, %f0, %f27
T1_asi_reg_rd_233:
	mov	0x2e, %r14
	.word 0xf0db8e60  ! 4618: LDXA_R	ldxa	[%r14, %r0] 0x73, %r24
cpu_intr_1_373:
	setx	0x470000, %g1, %o0
	ta	T_SEND_THRD_INTR
	.word 0xbda58960  ! 4620: FMULq	dis not found

iob_intr_1_384:
!$EV trig_pc_d(1,expr(@VA(.MAIN.iob_intr_1_384), 16, 16)) -> intp(1, 0, 26)
	.word 0xbbabc820  ! 4623: FMOVVC	fmovs	%fcc1, %f0, %f29
cpu_intr_1_374:
	setx	0x46033a, %g1, %o0
	ta	T_SEND_THRD_INTR
	.word 0xb9a88820  ! 4626: FMOVLE	fmovs	%fcc1, %f0, %f28
	.word 0xb40c2064  ! 4628: AND_I	and 	%r16, 0x0064, %r26
	.word 0xbda00020  ! 4630: FMOVs	fmovs	%f0, %f30
	ta	T_CHANGE_HPRIV
	mov	8, %g1
	stxa	%g0, [%g1] 0x60
	flush
	ta	T_CHANGE_NONHPRIV
	flush
T1_asi_reg_wr_210:
	mov	0xa, %r14
	.word 0xf6f38e40  ! 4632: STXA_R	stxa	%r27, [%r14 + %r0] 0x72
	.word 0xbfa589a0  ! 4633: FDIVs	fdivs	%f22, %f0, %f31
	.word 0xb3a449e0  ! 4634: FDIVq	dis not found

	.word 0xb1a44840  ! 4635: FADDd	faddd	%f48, %f0, %f24
cpu_intr_1_375:
	setx	0x450007, %g1, %o0
	ta	T_SEND_THRD_INTR
	.word 0xb1ab4820  ! 4640: FMOVCC	fmovs	%fcc1, %f0, %f24
T1_asi_reg_rd_234:
	mov	0x3c5, %r14
	.word 0xf8db84a0  ! 4643: LDXA_R	ldxa	[%r14, %r0] 0x25, %r28
T1_asi_reg_wr_211:
	mov	0x12, %r14
	.word 0xf2f38400  ! 4645: STXA_R	stxa	%r25, [%r14 + %r0] 0x20
	.word 0xbda409e0  ! 4647: FDIVq	dis not found

T1_asi_reg_wr_212:
	mov	0x2b, %r14
	.word 0xf4f38e60  ! 4648: STXA_R	stxa	%r


, train_loss.item(), test_loss.item()))

            # Uncomment this to save model every args.print_every steps
            os.makedirs(directory + '/trained_model/adaptive') if not os.path.exists(
                directory + '/trained_model/adaptive') else None
            label = '-full'
            path = '{}/{}{}-{}p-{}.tar'.format(directory + '/trained_model/adaptive', args.name, label, args.num_points,
                                               step)
            torch.save(model.state_dict(), path)

        # Estimate total time for num_epochs
        end_time = time.time()
        one_epoch_time = end_time - start_time
        total_time_estimate = one_epoch_time * (args.total_steps - step)
        print(f"\rTime taken for one epoch: {one_epoch_time:.2f} seconds", end='')
        print(
            f"\rEstimated time for the remaining {args.total_steps - step} epochs: {total_time_estimate / 60:.2f} minutes",
            end='')

    # save best model
    model.load_state_dict(best_module)
    os.makedirs(directory + '/trained_model/adaptive') if not os.path.exists(
        directory + '/trained_model/adaptive') else None
    label = '-full'
    path = '{}/{}{}-{}p-best.tar'.format(directory + '/trained_model/adaptive', args.name, label, args.num_points)
    torch.save(model.state_dict(), path)

    stats['train_x'] = train_x_cat.detach().cpu().numpy()
    stats['test_x'] = test_x_cat.detach().cpu().numpy()
    stats['dt'] = dt.detach().cpu().numpy()

    return model, stats

if __name__ == "__main__":
    args = get_args()
    model, stats = train(args)

    # Save model
    os.makedirs(directory + '/trained_model/adaptive') if not os.path.exists(
        directory + '/trained_model/adaptive') else None
    label = '-full'
    path = '{}/{}{}-{}p.tar'.format(directory + '/trained_model/adaptive', args.name, label, args.num_points)
    torch.save(model.state_dict(), path)
    path = '{}/{}{}-{}p-stats.pkl'.format(directory + '/trained_model/adaptive', args.name, label, args.num_points)
    print("Saved file: ", path)
    with open(path, 'wb') as file:
        pickle.dump(stats, file)


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

namespace Microsoft.Psi.Audio
{
    using System;

    /// <summary>
    /// Provides a class for computing a Fast Fourier Transform.
    /// </summary>
    internal sealed class FastFourierTransform
    {
        private readonly int fftSize;         // FFT size
        private readonly int windowSize;      // Size of the data window.  FFTSize - WindowSize = ZeroPadSize
        private readonly int fftPow2;         // FFT size in form of POW of 2

        private readonly float[] alignedWriFactors;  // SinCos(theta) array - 16 byte aligned
        private readonly short[] revMap;

        /// <summary>
        /// Initializes a new instance of the <see cref="FastFourierTransform"/> class.
        /// </summary>
        /// <param name="fftSize">The FFT size.</param>
        /// <param name="windowSize">The window size.</param>
        public FastFourierTransform(int fftSize, int windowSize)
        {
            this.fftSize = fftSize;
            this.windowSize = windowSize;
            this.fftPow2 = 1;
            int size = 2;
            while (size < fftSize)
            {
                size <<= 1;
                this.fftPow2++;
            }

            this.alignedWriFactors = new float[this.fftSize * 2];
            this.revMap = new short[this.fftSize / 2];
            this.alignedWriFactors[0] = 1.0f;
            this.alignedWriFactors[1] = -1.0f;
            this.alignedWriFactors[2] = 1.0f;
            this.alignedWriFactors[3] = -1.0f;
            this.alignedWriFactors[this.fftSize] = 0.5f;
            this.alignedWriFactors[this.fftSize + 1] = 0.5f;
            this.alignedWriFactors[this.fftSize + 2] = 0.5f;
            this.alignedWriFactors[this.fftSize + 3] = 0.5f;

            int i, j, k, limit;
            for (i = 2, k = 4, limit = 8; i < this.fftPow2; i++, limit *= 2)
            {
                float theta = (float)(2 * Math.PI / limit);
                for (j = 0; j < limit / 2; j++)
                {
                    this.alignedWriFactors[k] = (float)Math.Cos(theta * j);
                    this.alignedWriFactors[this.fftSize + k] = (float)Math.Sin(theta * j);
                    k++;
                }
            }

            for (i = 0, j = 0; i < ((this.fftSize / 2) - 1); i++)
            {
                this.revMap[i] = (short)((j * 2 < this.windowSize) ? 2 * j : -1);
                k = this.fftSize >> 2;
                while (j >= k)
                {
                    j -= k;
                    k >>= 1;
                }

                j += k;
            }

            this.revMap[i] = (short)((i * 2 < this.windowSize) ? 2 * i : -1);
        }

        /// <summary>
        /// Computes an FFT.
        /// </summary>
        /// <param name="input">The input data on which to apply the FFT.</param>
        /// <param name="output">
        /// An array which will hold the output values. If this array is not initialized
        /// or is not of size fftSize on input, it will be allocated and assigned.
        /// </param>
        public void ComputeFFT(float[] input, ref float[] output)
        {
            if ((output == null) || (output.Length != this.f


FFFA0F.W
	RTE

FIN:
	MOVE	#$2700,SR
	MOVE.B	#8,$FFFFFC02.W
	MOVE.B	MFP1,$FFFFFA07.W
	MOVE.B	MFP2,$FFFFFA09.W
	MOVE.B	MFP3,$FFFFFA0F.W
	MOVE.B	MFP4,$FFFFFA13.W
	MOVE.B	MFP5,$FFFFFA1B.W
	MOVE.B	MFP6,$FFFFFA21.W
	MOVE.B	MFP7,$FFFFFA15.W
	MOVE.B	MFP8,$FFFFFA17.W
	MOVE.B	MFP9,$FFFFFA19.W
	MOVE.B	MFP10,$FFFFFA1F.W
	MOVE.L	ANC_VBL,$70.W
	MOVE.L	SAUVE_TMA,$134.W
	MOVE.L	SAUVE_HBL,$68.W

	MOVE	#$2300,SR

	MOVEM.L	ANC_PAL,D0-D7
	MOVEM.L	D0-D7,$FFFF8240.W
	SF	$FFFF8240.W

	MOVE.L	#$8080000,$FFFF8800.W
	MOVE.L	#$9090000,$FFFF8800.W
	MOVE.L	#$A0A0000,$FFFF8800.W

	BSET	#0,$484.W
	BSET	#1,$484.W
	BSET	#2,$484.W

	MOVE.B	#8,$FFFFFC02.W
	MOVE.B	#2,$FFFF820A.W

	MOVE.L	SAUV_SP,-(SP)
	MOVE.W 	#$20,-(SP)
	TRAP 	#1
	ADDQ.L 	#6,SP

	PEA	0.W
	TRAP	#1

AFF_FNT
 	ADDQ.L	#1,PNT
	CMPI.L	#11,PNT
	BNE.S	OKAY
	MOVE.L	#1,PNT
OKAY	CMPI.L	#1,PNT
	BEQ	PART1
	CMPI.L	#2,PNT
	BEQ	PART1B
	CMPI.L	#3,PNT
	BEQ	PART2
	CMPI.L	#4,PNT
	BEQ	PART2B
	CMPI.L	#5,PNT
	BEQ	PART3
	CMPI.L	#6,PNT
	BEQ	PART3B

	CMPI.L	#7,PNT
	BEQ	PART4
	CMPI.L	#8,PNT
	BEQ	PART4B
	CMPI.L	#9,PNT
	BEQ	PART5
	CMPI.L	#10,PNT
	BEQ	PART5B
R2	RTS

PART5

	move.l	#IMAGE,A5	3
	move.l	MEM_LET,a2	5
	ADDA.L	(a2),A5		4
	move.l	SCREEN,A6	5
	ADDA.L	VALUE,A6	6
	adda.l	#230+216+160*7+230*165,A6	4

	MOVE	#80,D7
AFFT1
INC	SET	0
INC2	SET	0
;	REPT	81
	MOVEP.L	INC+25(A5),D6
	MOVEP.L	D6,INC2(A6)

	MOVEP.L	INC+32(A5),D6
	MOVEP.L	D6,INC2+1(A6)

	MOVEP.L	INC+33(A5),D6
	MOVEP.L	D6


;font-size:14px;font-style:normal;font-weight:700;line-height:18px;text-transform:none}.tox:not([dir=rtl]) .tox-user__avatar img,.tox:not([dir=rtl]) .tox-user__avatar svg{margin-right:8px}.tox:not([dir=rtl]) .tox-user__avatar+.tox-user__name{margin-left:8px}.tox[dir=rtl] .tox-user__avatar img,.tox[dir=rtl] .tox-user__avatar svg{margin-left:8px}.tox[dir=rtl] .tox-user__avatar+.tox-user__name{margin-right:8px}.tox .tox-dialog-wrap{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:1100}.tox .tox-dialog-wrap__backdrop{background-color:rgba(255,255,255,.75);bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}.tox .tox-dialog-wrap__backdrop--opaque{background-color:#fff}.tox .tox-dialog{background-color:#fff;border-color:#eee;border-radius:10px;border-style:solid;border-width:0;box-shadow:0 16px 16px -10px rgba(34,47,62,.15),0 0 40px 1px rgba(34,47,62,.15);display:flex;flex-direction:column;max-height:100%;max-width:480px;overflow:hidden;position:relative;width:95vw;z-index:2}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog{align-self:flex-start;margin:8px auto;max-height:calc(100vh - 8px * 2);width:calc(100vw - 16px)}}.tox .tox-dialog-inline{z-index:1100}.tox .tox-dialog__header{align-items:center;background-color:#fff;border-bottom:none;color:#222f3e;display:flex;font-size:16px;justify-content:space-between;padding:8px 16px 0 16px;position:relative}.tox .tox-dialog__header .tox-button{z-index:1}.tox .tox-dialog__draghandle{cursor:grab;height:100%;left:0;position:absolute;top:0;width:100%}.tox .tox-dialog__draghandle:active{cursor:grabbing}.tox .tox-dialog__dismiss{margin-left:auto}.tox .tox-dialog__title{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:20px;font-style:normal;font-weight:400;line-height:1.3;margin:0;text-transform:none}.tox .tox-dialog__body{color:#222f3e;display:flex;flex:1;font-size:16px;font-style:normal;font-weight:400;line-height:1.3;min-width:0;text-align:left;text-transform:none}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body{flex-direction:column}}.tox .tox-dialog__body-nav{align-items:flex-start;display:flex;flex-direction:column;flex-shrink:0;padding:16px 16px}@media only screen and (min-width:768px){.tox .tox-dialog__body-nav{max-width:11em}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body-nav{flex-direction:row;-webkit-overflow-scrolling:touch;overflow-x:auto;padding-bottom:0}}.tox .tox-dialog__body-nav-item{border-bottom:2px solid transparent;color:rgba(34,47,62,.7);display:inline-block;flex-shrink:0;font-size:14px;line-


* As needed. The server checks to make sure that the client provides matching values in requests using the signed URL.
     * Any header starting with `x-goog-` is accepted but see the [Google Docs](https://cloud.google.com/storage/docs/xml-api/reference-headers) for list of headers that are supported by Google.
     */
    extensionHeaders?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
    /**
     * What HTTP Method will the signed URL allow (defaults to `GET`)
     */
    httpMethod?: pulumi.Input<string>;
    /**
     * The full path to the object inside the bucket
     */
    path: pulumi.Input<string>;
}
import {
  ADD_BOOK_TO_CART,
  REMOVE_BOOK_FROM_CART,
  CLEAN_UP_CART,
  CartActions,
} from '../actions/cartActions'
import { BookCartRecord } from '../../helpers/BookCartRecord'

// TODO: try to find a way to use Dictionary<Book, number>
export const initialCartState = {
  bookRecords: [] as Array<BookCartRecord>,
}

export type CartState = typeof initialCartState

export function cartReducer(state: CartState = initialCartState, action: CartActions): CartState {
  switch (action.type) {
    case ADD_BOOK_TO_CART:
      return {
        bookRecords: state.bookRecords.map(br => br.book).some(book => book.id === action.book.id)
          ?
          state.bookRecords.map(br => br.book.id === action.book.id ? { book: br.book, quantity: br.quantity += 1 } : br)
          :
          [...state.bookRecords, { book: action.book, quantity: 1 }],
      }
    case REMOVE_BOOK_FROM_CART:
      return {
        bookRecords: state.bookRecords.find(br => br.book.id === action.book.id).quantity === 1 ?
          state.bookRecords.filter(br => br.book.id !== action.book.id)
          :
          state.bookRecords.map(br => br.book.id === action.book.id ? { book: br.book, quantity: br.quantity -= 1 } : br),
      }
    case CLEAN_UP_CART:
      return {
        bookRecords: [],
      }
    default:
      return state
  }
}
function whoAmI(target: Function): void {
	console.log(`You are: \n ${target}`);
}

@whoAmI
class Friend {
	constructor(private name: string, private age: number) { }
}

function UIcomponent(html: string) {
	console.log(`The decorator received ${html} \n`);
	return function (target: Function) {
		console.log(`Someone wants to create a UI component from \n ${target}`);
	}
}

@UIcomponent('
Hello Shopper!
')
class Shopper {
	constructor(private name: string) {}
}

type constructorMixin = { new(...args: any[]): {} };
function useSalutation(salutation: string) {
	return function <T extends constructorMixin>(target: T) {
		return class extends target {
			name: string;
			private message = 'Hello ' + salutation + this.name;
			sayHello() {
				console.log(`${this.message}`);
			}
		}
	}
}

@useSalutation('Mr.')
class Greeter {
	constructor(public name: string) { }
	sayHello() {
		console.log(`Hello ${this.name}`);
	}
}

const grt = new Greeter('John');
grt.sayHello();import {DQAgent} from "./algorithms/deepq/dqagent";
import {AgentTrackingInformation} from "./algorithms/agent_config";

const DEFAULT_TEACHING_CONFIG: TeachingConfig = {
    lessonLength: 1000,
    lessonsQuantity: 30,
    lessonsWithRandom: 2,
    epsilon: 1,
    epsilonMin: 0.05,
    epsilonDecay: 0.95,
    gamma: 0.9,
    alpha: 1
};

export


command', 'command_cb', function (e)
    -- Parse the command args..
    local args = e.command:args();

    -- Ensure the command is for onevent..
    if (#args >= 1 and not (args[1]:ieq('/onevent') or args[1]:ieq('/oe'))) then
        return;
    end

    -- Block all related commands..
    e.blocked = true;

    -- Skip invalid command attempts..
    if (#args <= 1 or e.command:contains('<st')) then
        return;
    end

    -- Process the command while pausing the ad


/****************************************************************************
* Copyright (C) 2019 Eric Mor
*
* This file is part of Spore ModAPI.
*
* Spore ModAPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#pragma once

#include <Spore\Simulator\cToolStrategy.h>

#define cToggleToolStrategyPtr eastl::intrusive_ptr<Simulator::cToggleToolStrategy>

namespace Simulator
{
	class cToggleToolStrategy
		: public cToolStrategy
	{
	public:
		static const uint32_t STRATEGY_ID = 0xA5D0D08F;
		static const uint32_t TYPE = 0x61D959A;

		virtual bool OnSelect(cSpaceToolData* pTool) override;
		virtual bool OnDeselect(cSpaceToolData* pTool) override;
		virtual void SelectedUpdate(cSpaceToolData* pTool, const Vector3& position) override;
	};
}


int,	/* number of pages daemon freed since boot */
    pdscans: c_int,	/* number of pages daemon scanned since boot */
    pdanscan: c_int,	/* number of anonymous pages scanned by daemon */
    pdobscan: c_int,	/* number of object pages scanned by daemon */
    pdreact: c_int,	/* number of pages daemon reactivated since boot */
    pdbusy: c_int,	/* number of times daemon found a busy page */
    pdpageouts: c_int,	/* number of times daemon started a pageout */
    pdpending: c_int,	/* number of times daemon got a pending pagout */
    pddeact: c_int,	/* number of pages daemon deactivates */
    pdreanon: c_int,	/* anon pages reactivated due to min threshold */
    pdrevnode: c_int,	/* vnode pages reactivated due to min threshold */
    pdrevtext: c_int,	/* vtext pages reactivated due to min threshold */

    fpswtch: c_int,	/* FPU context switches */
    kmapent: c_int,	/* number of kernel map entries */
}
use crate::msgs::enums::{ContentType, HandshakeType};
use crate::msgs::enums::{ProtocolVersion, AlertDescription};
use crate::msgs::message::{Message, MessagePayload};
use crate::msgs::base::{Payload, PayloadU8};
use crate::msgs::handshake::{HandshakePayload, HandshakeMessagePayload};
use crate::msgs::handshake::DecomposedSignatureScheme;
use crate::msgs::handshake::ServerKeyExchangePayload;
use crate::msgs::handshake::DigitallySignedStruct;
use crate::msgs::enums::ClientCertificateType;
use crate::msgs::codec::Codec;
use crate::msgs::persist;
use crate::msgs::ccs::ChangeCipherSpecPayload;
use crate::client::ClientSessionImpl;
use crate::session::SessionSecrets;
use crate::suites;
use crate::verify;
use crate::ticketer;
#[cfg(feature = "logging")]
use crate::log::{debug, trace, warn};
use crate::error::TLSError;
use crate::handshake::{check_message, check_handshake_message};

use crate::client::common::{ServerCertDetails, ServerKXDetails, HandshakeDetails};
use crate::client::common::{ReceivedTicketDetails, ClientAuthDetails};
use crate::client::hs;

use std::mem;
use ring::constant_time;

pub struct ExpectCertificate {
    pub handshake: HandshakeDetails,
    pub server_cert: ServerCertDetails,
    pub may_send_cert_status: bool,
    pub must_issue_new_ticket: bool,
}

impl ExpectCertificate {
    fn into_expect_certificate_status_or_server_kx(self) -> hs::NextState {
        Box::new(ExpectCertificateStatusOrServerKX {
            handshake: self.handshake,
            server_cert: self.server_cert,
            must_issue_new_ticket: self.must_issue_new_ticket,
        })
    }

    fn into_expect_server_kx(self) -> hs::NextState {
        Box::new(ExpectServerKX {
            handshake: self.handshake,
            server_cert: self.server_cert,
            must_issue_new_ticket: self.must_issue_new_ticket,
        })
    }
}

impl hs::State for ExpectCertificate {
    fn check_message(&self, m: &Message) -> Result<(), TLSError> {
        check_handshake_message(m, &[HandshakeType::Certificate])
    }

    fn handle(mut self: Box<Self>, _sess: &mut ClientSessionImpl, m: Message) -> hs::NextStateOrError {
        let cert_chain = extract_handshake!(m, HandshakePayload::Certificate).unwrap();
        self.handshake.transcript.add_message(&m);

        self.server_cert.cert_chain = cert_


e     $v0, $at, .L80B93D28
/* 00188 80B93CE8 00000000 */  nop
.L80B93CEC:
/* 0018C 80B93CEC 0C2E4F64 */  jal     func_80B93D90
/* 00190 80B93CF0 02002025 */  or      $a0, $s0, $zero            ## $a0 = 00000000
/* 00194 80B93CF4 1000000C */  beq     $zero, $zero, .L80B93D28
/* 00198 80B93CF8 00000000 */  nop
.L80B93CFC:
/* 0019C 80B93CFC 00032A03 */  sra     $a1, $v1,  8
/* 001A0 80B93D00 0C00B2D0 */  jal     Flags_GetSwitch

/* 001A4 80B93D04 30A5003F */  andi    $a1, $a1, 0x003F           ## $a1 = 00000000
/* 001A8 80B93D08 10400005 */  beq     $v0, $zero, .L80B93D20
/* 001AC 80B93D0C 00000000 */  nop
/* 001B0 80B93D10 0C2E4F64 */  jal     func_80B93D90
/* 001B4 80B93D14 02002025 */  or      $a0, $s0, $zero            ## $a0 = 00000000
/* 001B8 80B93D18 10000003 */  beq     $zero, $zero, .L80B93D28
/* 001BC 80B93D1C 00000000 */  nop
.L80B93D20:
/* 001C0 80B93D20 0C2E4F6C */  jal     func_80B93DB0
/* 001C4 80B93D24 02002025 */  or      $a0, $s0, $zero            ## $a0 = 00000000
.L80B93D28:
/* 001C8 80B93D28 3C028016 */  lui     $v0, 0x8016                ## $v0 = 80160000
/* 001CC 80B93D2C 2442FA90 */  addiu   $v0, $v0, 0xFA90           ## $v0 = 8015FA90
/* 001D0 80B93D30 8C590000 */  lw      $t9, 0x0000($v0)           ## 8015FA90
/* 001D4 80B93D34 240300FF */  addiu   $v1, $zero, 0x00FF         ## $v1 = 000000FF
/* 001D8 80B93D38 A723116E */  sh      $v1, 0x116E($t9)           ## 0000116E
/* 001DC 80B93D3C 8C480000 */  lw      $t0, 0x0000($v0)           ## 8015FA90
/* 001E0 80B93D40 A5031170 */  sh      $v1, 0x1170($t0)           ## 00001170
/* 001E4 80B93D44 8C490000 */  lw      $t1, 0x0000($v0)           ## 8015FA90
/* 001E8 80B93D48 A5231172 */  sh      $v1, 0x1172($t1)           ## 00001172
/* 001EC 80B93D4C 8FBF001C */  lw      $ra, 0x001C($sp)
/* 001F0 80B93D50 8FB00018 */  lw      $s0, 0x0018($sp)
/* 001F4 80B93D54 27BD0020 */  addiu   $sp, $sp, 0x0020           ## $sp = 00000000
/* 001F8 80B93D58 03E00008 */  jr      $ra
/* 001FC 80B93D5C 00000000 */  nop


using System.Text;
using Util.Data.Sql.Builders.Clauses;
using Util.Data.Sql.Tests.Samples;
using Xunit;

namespace Util.Data.Sql.Tests.Builders.Clauses;

/// <summary>
/// From子句测试
/// </summary>
public class FromClauseTest {

    #region 测试初始化

    /// <summary>
    /// From子句
    /// </summary>
    private readonly FromClause _clause;

    /// <summary>
    /// 测试初始化
    /// </summary>
    public FromClauseTest() {
        _clause = new FromClause( new TestSqlBuilder() );
    }

    /// <summary>
    /// 获取Sql语句
    /// </summary>
    private string GetSql( IFromClause clause = null ) {
        clause ??= _clause;
        var builder = new StringBuilder();
        clause.AppendTo( builder );
        return builder.ToString();
    }

    #endregion

    #region 默认输出

    /// <summary>
    /// 默认输出空
    /// </summary>
    [Fact]
    public void TestDefault() {
        Assert.Empty( GetSql() );
    }

    #endregion

    #region From

    /// <summary>
    /// 测试设置简单表
    /// </summary>
    [Fact]
    public void TestFrom_1() {
        _clause.From( "a" );
        Assert.Equal( "From [a]", GetSql() );
    }

    /// <summary>
    /// 测试设置带架构的表
    /// </summary>
    [Fact]
    public void TestFrom_2() {
        _clause.From( "a.b" );
        Assert.Equal( "From [a].[b]", GetSql() );
    }

    /// <summary>
    /// 测试设置带表别名的表
    /// </summary>
    [Fact]
    public void TestFrom_3() {
        _clause.From( "a as b" );
        Assert.Equal( "From [a] [b]", GetSql() );
    }

    /// <summary>
    /// 测试设置带架构和表别名的表
    /// </summary>
    [Fact]
    public void TestFrom_4() {
        _clause.From( "a.b as c" );
        Assert.Equal( "From [a].[b] [c]", GetSql() );
    }

    /// <summary>
    /// 测试设置子查询表
    /// </summary>
    [Fact]
    public void TestFrom_5() {
        var result = new StringBuilder();
        result.AppendLine( "From (Select [a] " );
        result.Append( "From [b]) As [c]" );

        var builder = new TestSqlBuilder().Select( "a" ).From( "b" );
        _clause.From( builder, "c" );
        Assert.Equal( res


active: 1px solid #3C69E7 !important;--n-border-focus: 1px solid #3C69E7 !important;--n-border-hover: 1px solid #3C69E7 !important;--n-caret-color: #3C69E7 !important;--n-option-text-color-active: #3C69E7 !important}.video_sub_sidebar .n-select[data-v-da78829c] .n-base-select-option--selected{--n-option-text-color-active: #3C69E7 !important}.video_sub_sidebar .scroll_card[data-v-da78829c]{padding-bottom:80px}.video_sub_sidebar .scroll_card[data-v-da78829c]::-webkit-scrollbar{display:none}.video_sub_sidebar .scroll_card .type_tab[data-v-da78829c]{cursor:pointer;flex-grow:1;font-size:15px;display:flex;justify-content:center;align-items:center}.video_sub_sidebar .scroll_card .selected_type_tab[data-v-da78829c]{cursor:pointer;background-color:#10a37f;padding:4px 12px;border-radius:8px;color:#fff}.video_sub_sidebar .scroll_card .style_card[data-v-da78829c]{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:13px}.video_sub_sidebar .scroll_card .style_card .style_item[data-v-da78829c]{width:80px;height:80px;border-radius:10px;border:2px solid transparent;position:relative;cursor:pointer}.video_sub_sidebar .scroll_card .style_card .style_item.selected[data-v-da78829c]{border:2px solid #0066ff}.video_sub_sidebar .scroll_card .style_card .style_item[data-v-da78829c]:nth-child(3n){margin-right:0}.video_sub_sidebar .scroll_card .style_card .def_style_item[data-v-da78829c]{width:80px;height:80px;border-radius:10px;position:relative;cursor:pointer}.video_sub_sidebar .scroll_card .style_card .def_style_item[data-v-da78829c]:nth-child(3n){margin-right:0}.video_sub_sidebar .scroll_card .style_card .style_img[data-v-da78829c]{width:100%;height:100%;border-radius:10px}.video_sub_sidebar .scroll_card .style_card .style_name[data-v-da78829c]{width:100%;height:26px;color:#fff;font-size:12px;position:absolute;bottom:0;border-bottom-left-radius:5px;border-bottom-right-radius:5px;text-align:center;line-height:26px}.video_sub_sidebar .scroll_card .style_card .def_style_name[data-v-da78829c]{width:100%;text-align:center;color:#fff;font-size:12px;position:absolute;bottom:6px}.video_sub_sidebar .scroll_card .size_card[data-v-da78829c]{display:flex;align-items:center;flex-wrap:wrap;gap:13px}.video_sub_sidebar .scroll_card .size_card .size_item[data-v-da78829c]{flex-grow:1;height:72px;margin-bottom:10px;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer}.video_sub_sidebar .scroll_card .size_card .size_item.selected[data-v-da78829c]{border:2px solid #0066ff}.video_sub_


e" tabindex="-1">year <- 2024
slug <- "2024-06-16-ccd-sips"
url <- "https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view"
total_pages <- 5<button title="Copy to Clipboard" class="code-copy-button"></button>

source(here::here("project", slug, paste0("_", year), "R", "ccd_sips_functions.R"))<button title="Copy to Clipboard" class="code-copy-button"></button>

Checking the page

# check page's terms of service
get_robotstxt(url)<button title="Copy to Clipboard" class="code-copy-button"></button>

Warning in request_handler_handler(request = request, handler = on_not_found, :
Event: on_not_found

Warning in request_handler_handler(request = request, handler =
on_file_type_mismatch, : Event: on_file_type_mismatch

Warning in request_handler_handler(request = request, handler =
on_suspect_content, : Event: on_suspect_content

[robots.txt]
--------------------------------------

# robots.txt overwrite by: on_suspect_content

User-agent: *
Allow: /

[events]
--------------------------------------

requested:   https://centercityphila.org/explore-center-city/ccd-sips/sips-list-view/robots.txt
downloaded


m-lockmode-shared⑤">shared".
Multiple tabs/workers can hold a lock for the same resource in "shared" mode, but only one tab/worker can hold a lock for the resource in "exclusive" mode.

The most common use for this is to allow multiple readers to access a resource simultaneously but prevent changes.
Once reader locks are released a single exclusive writer can acquire the lock to make changes, followed by another exclusive writer or more shared readers.

<c- k>await</c-> navigator<c- p>.</c->locks<c- p>.</c->request<c- p>(</c-><c- t>'resource'</c-><c- p>,</c-> <c- p>{</c->mode<c- o>:</c-> <c- t>'shared'</c-><c- p>},</c-> <c- k>async</c-> lock <c- p>=></c-> <c- p>{</c->
  <c- c1>// Lock is held here. Other contexts might also hold the lock in shared mode,</c->
  <c- c1>// but no other contexts will hold the lock in exclusive mode.</c->
<c- p>});</c->

<var>options</var> . ifAvailable

If the ifAvailable option is true, then the lock is only granted if it can be without additional waiting. Note that this is still not synchronous; in many user agents this will require cross-process communication to see if the lock can be granted. If the lock cannot be granted, the callback is invoked with null. (Since this is expected, the request is not rejected.)

<c- k>await</c-> navigator<c- p>.</c->locks<c- p>.</c->request<c- p>(</c-><c- t>'resource'</c-><c- p>,</c-> <c- p>{</c->ifAvailable<c- o>:</c-> <c- kc>true</c-><c- p>},</c-> <c- k>async</c-> lock <c- p>=></c-> <c- p>{</c->
  <c- k>if</c-> <c- p>(</c-><c- o>!</c->lock<c- p>)</c-> <c- p>{</c->
    <c- c1>// Didn't get it. Maybe take appropriate action.</c->
    <c- k>return</c-><c- p>;</c->
  <c- p>}</c->
  <c- c1>// Lock is held here.</c->
<c- p>});</c->

<var>options</var> . signal

The signal option can be set to an AbortSignal. This allows aborting a lock request, for example if the request is not


   id: RequestInterface['getDeviceForecast']['id'],
    units: RequestInterface['getDeviceForecast']['units'],
  ) => Promise<
    ResponseInterface['getDeviceForecastSuccess'] |
    ResponseInterface['error']
  >,

  putDeviceStopWater: (
    id: RequestInterface['putDeviceStopWater']['id'],
  ) => Promise<
    ResponseInterface['putSuccess'] |
    ResponseInterface['error']
  >,

  putDeviceRainDelay: (
    id: RequestInterface['putDeviceRainDelay']['id'],
  ) => Promise<
    ResponseInterface['putSuccess'] |
    ResponseInterface['error']
  >,

  putDeviceOn: (
    id: RequestInterface['putDeviceOn']['id'],
  ) => Promise<
    ResponseInterface['putSuccess'] |
    ResponseInterface['error']
  >,

  putDeviceOff: (
    id: RequestInterface['putDeviceOff']['id'],
  ) => Promise<
    ResponseInterface['putSuccess'] |
    ResponseInterface['error']
  >,

  putDevicePauseZoneRun: (
    id: RequestInterface['putDevicePauseZoneRun']['id'],
  ) => Promise<
    ResponseInterface['putSuccess'] |
    ResponseInterface['error']
  >,

  putDeviceResumeZoneRun: (
    id: RequestInterface['putDeviceResumeZoneRun']['id'],
  ) => Promise<
    ResponseInterface['putSuccess'] |
    ResponseInterface['error']
  >,

  getZone: (
    id: RequestInterface['getZone']['id'],
  ) => Promise<
    ResponseInterface['putSuccess'] |
    ResponseInterface['error']
  >,

  putZoneStart: (
    id: RequestInterface['putZoneStart']['id'],
    duration: RequestInterface['putZoneStart']['duration'],
  ) => Promise<
    ResponseInterface['putSuccess'] |
    ResponseInterface['error']
  >,

  putZoneStartMultiple: (
    zones: RequestInterface['putZoneStartMultiple']['zones'],
  ) => Promise<
    ResponseInterface['putSuccess'] |
    ResponseInterface['error']
  >,

};
import { EventBus, type EventBusListener } from '@ima/core';
import { useCallback, useEffect, useMemo } from 'react';

import { useComponentUtils } from './componentUtils';

export interface useEventBusType {
  fire: EventBus['fire'];
}

/**
 * Hook to register listeners for dispatcher events. Returns
 * decorated dispatcher fire function. Omitting hook params
 * doesn't register any events to the dispatcher but provides
 * access to the dispatcher's fire method.
 *
 * @example
 * const { fire } = useEventBus(
 * 	componentRef.current,
 * 	'event',
 *  () => {}
 * );
 *
 * @param event Event name.
 * @param callback Callback to register to dispatcher.
 * @returns Dispatcher `fire` method.
 */
export function useEventBus(
  eventTarget?: EventTarget | null,
  eventName?: string,
  listener?: EventBusListener
): useEventBusType {
  const { $EventBus } = useComponentUtils();
  const memoListener = useCallback(
    (...args: Parameters<EventBusListener>) => {
      listener?.(...args);
    },
    [listener]
  );

  useEffect(() => {
    if (!eventTarget || !eventName || !memoListener) {
      return;
    }

    $EventBus.listen(eventTarget, eventName, memoListener);

    return () => {
      $EventBus.unlisten(eventTarget, eventName, memoListener);
    };
  }, [$EventBus, eventName, eventTarget, memoListener]);

  return useMemo<useEventBusType>(
    () => ({
      fire: (...params) => $EventBus.fire(...params),
    }),
    [$EventBus]
  );
}
// class child extends parent
class ParentClass {
    private i: number;
    j: number;
    constructor (k: number) {
        this.j = k;
    }

    value() {
        return "The


, Network::Address::InstanceConstSharedPtr(),
                                          std::move(bad_transport_socket), nullptr, nullptr);
  bad_ssl_client->addConnectionCallbacks(connect_callbacks);
  bad_ssl_client->enableHalfClose(true);
  bad_ssl_client->connect();

  // Run the dispatcher until it exits due to a read/write.
  dispatcher_->run(Event::Dispatcher::RunType::RunUntilExit);

  // At this point, the connection should be idle but the SSL handshake isn't done.
  EXPECT_FALSE(connect_callbacks.connected());

  // Set the load so the timer is reduced but not to the minimum value.
  updateResource(0.8);
  test_server_->waitForGaugeGe("overload.envoy.overload_actions.reduce_timeouts.scale_percent", 50);

  // Advancing past the minimum time shouldn't close the connection, but it shouldn't complete it
  // either.
  timeSystem().advanceTimeWait(std::chrono::seconds(5));
  EXPECT_FALSE(connect_callbacks.connected());

  // At this point, Envoy has been waiting for the (bad) client to finish the TLS handshake for 5
  // seconds. Increase the load so that the minimum time has now elapsed. This should cause Envoy to
  // close the connection on its end.
  updateResource(0.9);
  test_server_->waitForGaugeEq("overload.envoy.overload_actions.reduce_timeouts.scale_percent",
                               100);

  // The bad client will continue attempting to read, eventually noticing the remote close and
  // closing the connection.
  while (!connect_callbacks.closed()) {
    dispatcher_->run(Event::Dispatcher::RunType::NonBlock);
  }

  // The transport-level connection was never completed, and the connection was closed.
  EXPECT_FALSE(connect_callbacks.connected());
  EXPECT_TRUE(connect_callbacks.closed());
}

class LoadShedPointIntegrationTest : public BaseOverloadIntegrationTest,
                                     public HttpProtocolIntegrationTest {
protected:
  void initializeOverloadManager(const envoy::config::overload::v3::LoadShedPoint& config) {
    setupOverloadManagerConfig(config);
    config_helper_.addConfigModifier([this](envoy::config::bootstrap::v3::Bootstrap& bootstrap) {
      *bootstrap.mutable_overload_manager() = this->overload_manager_config_;
    });
    initialize();
    updateResource(0);
  }
  void
  initializeWithBypassOverloadManager(const envoy::config::overload::v3::LoadShedPoint& config) {
    setupOverloadManagerConfig(config);
    config_helper_.addConfigModifier([this](envoy::config::bootstrap::v3::Bootstrap& bootstrap) {
      *bootstrap.mutable_overload_manager() = this->overload_manager_config_;
    });
    config_helper_.addConfigModifier([](envoy::config::bootstrap::v3::Bootstrap& bootstrap) {
      auto* listener = bootstrap.mutable_static_resources()->mutable_listeners(0);
      listener->set_bypass_overload_manager(true);
      // add a listener that doesn't bypass overload manager.
      auto* new_listener = bootstrap.mutable_static_resources()->add_listeners();
      new_listener->CopyFrom(*listener);
      new_listener->set_name("http_2");
      new_listener->set_bypass_overload_manager(false);
    });
    initialize();
    updateResource(0);
  }
};

INSTANTIATE_TEST_SUITE_P(Protocols, LoadShedPointIntegrationTest,
                         testing::ValuesIn(HttpProtocolIntegrationTest::getProtocolTestParams(
                             {Http::CodecClient::Type::HTTP1, Http::CodecClient::Type::HTTP2,
                              Http::CodecClient::Type::HTTP3},
                             {FakeHttpConnection::Type::HTTP1})),
                         Http


CommandLine = mDrawSrv->createRenderedLabel(mFont, ">");
    mConsoleSheet = mDrawSrv->createSheet("CONSOLE_SHEET");

    mConsoleText->setZOrder(2);
    mCommandLine->setZOrder(2);

    // show up on our sheet
    mConsoleSheet->addDrawOperation(mConsoleBackground);
    mConsoleSheet->addDrawOperation(mCommandLineBackground);
    mConsoleSheet->addDrawOperation(mConsoleText);
    mConsoleSheet->addDrawOperation(mCommandLine);

    mPosition = 0;

    // pull out the current resolution from render service
    RenderServicePtr rs = GET_SERVICE(RenderService);

    const RenderWindowSize &rws = rs->getCurrentScreenSize();
    resolutionChanged(rws.width, rws.height);
}

ConsoleGUI::~ConsoleGUI() {
    // destroy the draw operations and the sheet
    mDrawSrv->destroyRenderedLabel(mConsoleText);
    mConsoleText = NULL;
    mDrawSrv->destroyRenderedLabel(mCommandLine);
    mCommandLine = NULL;
    mDrawSrv->destroyRenderedRect(mConsoleBackground);
    mConsoleBackground = NULL;
    mDrawSrv->destroySheet(mConsoleSheet);

    mConsoleSheet.reset();

    mDrawSrv.reset();
}

void ConsoleGUI::setActive(bool active) {
    mIsActive = active;

    if (mIsActive)
        mDrawSrv->setActiveSheet(mConsoleSheet);
}

bool ConsoleGUI::injectKeyPress(unsigned int keycode) {
    if (!mIsActive)
        return false;

    if (keycode == SDLK_ESCAPE) {
        mOwner->hideConsole();
    } else if (keycode == SDLK_RETURN) {
        // add the command to the log...
        mConsoleBackend->putMessage(">" + mCommand, 6);
        // and execute
        Variant result = mInputSrv->processCommand(mCommand);

        if (!result.toBool())
            mConsoleBackend->putMessage("Invalid command or parameters", 1);

        mCommand = "";
    } else if (keycode == SDLK_BACKSPACE) {
        mCommand = mCommand.substr(0, mCommand.length() - 1);
    } else if (keycode == SDLK_PAGEUP) {
        if (mPosition >= SCROLL_LINES)
            mPosition -= SCROLL_LINES; // let two lines be the same
        else if (mPosition < 0) {
            mPosition = mConsoleBackend->getHistorySize();

            mPosition =
                std::max(0, mPosition - (SCROLL_LINES + SCROLL_LINES + 1));
        } else
            mPosition = 0;

        mConsoleBackend->setChanged();
    } else if (keycode == SDLK_PAGEDOWN) {
        if (mPosition >= 0)
            mPosition += SCROLL_LINES;

        // if at the end, set follow
        if ((unsigned int)(mPosition) >
            mConsoleBackend->getHistorySize() - SCROLL_LINES)
            mPosition = -1;

        mConsoleBackend->setChanged();
    } else if (keycode == SDLK_END) {
        mPosition = -1;
        mConsoleBackend->setChanged();
    } else if (keycode == SDLK_HOME) {
        mPosition = 0;
        mConsoleBackend->setChanged();
    } else {
        // not a char key?
        if (keycode & (1 << 30))
            return true;

        string allowed = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0"
                         "123456789 ,./:;'-_+=[]{}()| \"\t";

        char key[2];
        key[0] = (char)(keycode);
        key[1] = 0;

        if (allowed.find(key) != string::npos)
            mCommand += key;
    }

    mCommandLine->clearText();
    mCommandLine->addText(">" + mCommand, Ogre::ColourValue::Blue);

    return true;
}

void ConsoleGUI::update(int timems) {
    if (mIsActive) {
        mConsoleSheet->activate();

        if (mConsoleBackend->getChanged()) {


     if title is not None:
        ax.set_title(title)
      return fig, ax

    plot_scalars([rewards],
                 title="Reward graph (DQN)",
                 ax_labels=["Episodes", "Reward per episode"])
    plot_scalars([opts],
                 title="Percentage of optimal actions (DQN)",
                 ax_labels=["Episodes", "% optimal actions"])

    plot_confusion_matrix(
        converge_point.astype(int), title="Final policy (DQN)")

    plt.show()

  return percent_opt

if __name__ == "__main__":
  app.run(main)


RPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */
package org.gitective.tests;

import org.eclipse.jgit.revwalk.RevCommit;
import org.gitective.core.CommitFinder;
import org.gitective.core.filter.commit.ShortestMessageFilter;
import org.junit.Test;

/**
 * Unit tests of {@link ShortestMessageFilter}
 */
public class ShortestMessageTest extends GitTestCase {

	/**
	 * Verify state when no commits are visited
	 */
	@Test
	public void noCommitsIncluded() {
		ShortestMessageFilter filter = new ShortestMessageFilter();
		assertEquals(-1, filter.getLength());
		assertNotNull(filter.getCommits());
		assertEquals(0, filter.getCommits().size());
	}

	/**
	 * Include commits where only one has the shortest message
	 *
	 * @throws Exception
	 */
	@Test
	public void singleLongestMessage() throws Exception {
		ShortestMessageFilter filter = new ShortestMessageFilter();
		RevCommit shortest = add("test.txt", "test1", "a");
		add("test.txt", "test2", "ab");
		add("test.txt", "test3", "abcd");
		add("test.txt", "test4", "abc");
		new CommitFinder(testRepo).setFilter(filter).find();
		assertEquals(1, filter.getLength());
		assertNotNull(filter.getCommits());
		assertEquals(1, filter.getCommits().size());
		assertEquals(shortest, filter.getCommits().iterator().next());
	}

	/**
	 * Include commits where multiples have the shortest message
	 *
	 * @throws Exception
	 */
	@Test
	public void multipleLongestMessages() throws Exception {
		ShortestMessageFilter filter = new ShortestMessageFilter();
		add("test.txt", "test1", "abc");
		add("test.txt", "test2", "ab");
		RevCommit shortest1 = add("test.txt", "test3", "a");
		add("test.txt", "test4", "abcde");
		RevCommit shortest2 = add("test.txt", "test5", "b");
		new CommitFinder(testRepo).setFilter(filter).find();
		assertEquals(1, filter.getLength());
		assertNotNull(filter.getCommits());
		assertEquals(2, filter.getCommits().size());
		assertTrue(filter.getCommits().contains(shortest1));
		assertTrue(filter.getCommits().contains(shortest2));
	}
}
/*
 * Copyright (c) 2011 Kevin Sawicki <kevinsawicki@gmail.com>
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to
 * deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 * sell copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */
package org.gitective.tests;

import java.util.Arrays;

import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.filter.RevFilter;
import


)

// ComProc stores a COM procedure.
type ComProc uintptr

// NewComProc creates a new COM proc from a Go function.
func NewComProc(fn interface{}) ComProc {
	return ComProc(windows.NewCallback(fn))
}

type EventRegistrationToken struct {
	value int64
}

// IUnknown
type IUnknown struct {
	Vtbl *IUnknownVtbl
}

type IUnknownVtbl struct {
	QueryInterface ComProc
	AddRef         ComProc
	Release        ComProc
}

func (i *IUnknownVtbl) CallRelease(this unsafe.Pointer) error {
	_, _, err := i.Release.Call(
		uintptr(this),
	)
	if err != windows.ERROR_SUCCESS {
		return err
	}
	return nil
}

type IUnknownImpl interface {
	QueryInterface(refiid, object uintptr) uintptr
	AddRef() uintptr
	Release() uintptr
}

// Call calls a COM procedure.
//
//go:uintptrescapes
func (p ComProc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {
	return syscall.SyscallN(uintptr(p), a...)
}
//go:build windows

/*
 * Copyright (C) 2019 Tad Vizbaras. All Rights Reserved.
 * Copyright (C) 2010-2012 The W32 Authors. All Rights Reserved.
 */
package w32

import (
	"syscall"
	"unsafe"
)

var (
	modkernel32 = syscall.NewLazyDLL("kernel32.dll")

	procGetModuleHandle            = modkernel32.NewProc("GetModuleHandleW")
	procMulDiv                     = modkernel32.NewProc("MulDiv")
	procGetConsoleWindow           = modkernel32.NewProc("GetConsoleWindow")
	procGetCurrentThread           = modkernel32.NewProc("GetCurrentThread")
	procGetCurrentThreadId         = modkernel32.NewProc("GetCurrentThreadId")
	procGetLogicalDrives           = modkernel32.NewProc("GetLogicalDrives")
	procGetLogicalDriveStrings     = modkernel32.NewProc("GetLogicalDriveStringsW")
	procGetUserDefaultLCID         = modkernel32.NewProc("GetUserDefaultLCID")
	procLstrlen                    = modkernel32.NewProc("lstrlenW")
	procLstrcpy                    = modkernel32.NewProc("lstrcpyW")
	procGlobalAlloc                = modkernel32.NewProc("GlobalAlloc")
	procGlobalFree                 = modkernel32.NewProc("GlobalFree")
	procGlobalLock                 = modkernel32.NewProc("GlobalLock")
	procGlobalUnlock               = modkernel32.NewProc("GlobalUnlock")
	procMoveMemory                 = modkernel32.NewProc("RtlMoveMemory")
	procFindResource               = modkernel32.NewProc("FindResourceW")
	procSizeofResource             = modkernel32.NewProc("SizeofResource")
	procLockResource               = modkernel32.NewProc("LockResource")
	procLoadResource               = modkernel32.NewProc("LoadResource")
	procGetLastError               = modkernel32.NewProc("GetLastError")
	procOpenProcess                = modkernel32.NewProc("OpenProcess")
	procTerminateProcess           = modkernel32.NewProc("TerminateProcess")
	procCloseHandle                = modkernel32.NewProc("CloseHandle")
	procCreateToolhelp32Snapshot   = modkernel32.NewProc("CreateToolhelp32Snapshot")
	procModule32First              = modkernel32.NewProc("Module32FirstW")
	procModule32Next               = modkernel32.NewProc("Module32NextW")
	procGetSystemTimes             = modkernel32.NewProc("GetSystemTimes")
	procGetConsoleScreenBufferInfo = modkernel32.NewProc


template <class T>
struct HasTypeWithSelfAsParam {
  using TT = HasTypeWithSelfAsParam<HasTypeWithSelfAsParam<T>>;
};

using WillBeInfinite = HasTypeWithSelfAsParam<int>;

namespace RegressionTest {

// This is a regression test to check that we don't instantiate exponentially
// large templates. The below template will instantiate hundreds of thousands
// (or more) of specializations before hitting the 8-template-param-deep limit.
template<class E, int>
struct SliceExpr {
  using type = typename E::type;
  E expr;

  typename E::type* test() { return nullptr; }
};

template<class T>
struct Array {
  using type = T;
};

template<class E>
struct ValExpr {
  using type = typename E::type;
  E expr;

  ValExpr<SliceExpr<E, 1>> test1() { return {SliceExpr<E, 1>{expr}}; }
  ValExpr<SliceExpr<E, 2>> test2() { return {SliceExpr<E, 2>{expr}}; }
  ValExpr<SliceExpr<E, 3>> test3() { return {SliceExpr<E, 3>{expr}}; }
  ValExpr<SliceExpr<E, 4>> test4() { return {SliceExpr<E, 4>{expr}}; }
  ValExpr<SliceExpr<E, 5>> test5() { return {SliceExpr<E, 5>{expr}}; }
  ValExpr<SliceExpr<E, 6>> test6() { return {SliceExpr<E, 6>{expr}}; }
  ValExpr<SliceExpr<E, 7>> test7() { return {SliceExpr<E, 7>{expr}}; }
  ValExpr<SliceExpr<E, 8>> test8() { return {SliceExpr<E, 8>{expr}}; }
  ValExpr<SliceExpr<E, 9>> test9() { return {SliceExpr<E, 8>{expr}}; }
  ValExpr<SliceExpr<E, 11>> test11() { return {SliceExpr<E, 11>{expr}}; }
  ValExpr<SliceExpr<E, 12>> test12() { return {SliceExpr<E, 12>{expr}}; }
};

// This class template is exponentially slow to *fully* instantiate (and the
// exponent is the number of testX methods). Make sure that we can still
// partially import it without importing all of its child template
// instantiations.
void user(ValExpr<Array<int>> *) { }

} // end namespace 'RegressionTest'


lt;strong>Output:</strong>
object(Foo\\Test)#1 (0) { }
object(Bar\\Test)#2 (0) { }

示例三，不同文件中的namespace

/*定义*/
/* global.php */
&lt;?php
function hello()
{
    echo "hello from the global scope!";
}
?&gt;

/* Foo.php */
&lt;?php
namespace Foo;
function hello()
{
    echo "hello from the Foo namespace!";
}
?&gt;

/* Foo_Bar.php */
&lt;?php
namespace Foo/Bar;
function hello()
{
    echo "hello from the Foo/Bar namespace!";
}
?&gt;
<!--p namespace Foo/Bar; function hello() {     echo "hello from the Foo/Bar namespace!"; }-->

/*使用 */
<!--p include "./global.php"; include "./Foo.php"; include "./Foo_Bar.php"; use Foo;  hello();         // outputs "hello from the Foo namespace!" Bar\\hello();   // outputs "hello from the Foo/Bar namespace!" \\hello();       // outputs "hello from the global scope!"-->&lt;?php
include "./global.php";
include "./Foo.php";
include "./Foo_Bar.php";

use Foo;

hello();         // outputs "hello from the Foo namespace!"
Bar\\hello();   // outputs "hello from the Foo/Bar namespace!"
\\hello();       // outputs "hello from the global scope!"
?&gt;

更为详细的文章，请参考这里，链接。

6)开始支持Achieve包

正像JAR一样，PHP也要开始支持自己的Achieve包了，叫作，Phar。PHP提供了一整套函数来帮助开发人员创建和使用Phar，正如下面的示例所示：

创建：

$p = new Phar("/path/to/my.phar",
 CURRENT_AS_FILEINFO | KEY_AS_FILENAME, "my.phar");
$p-&gt;startBuffering();

创建文件存根（stub）

$p-&gt;setStub("<!--p Phar::mapPhar();  include "phar://myphar.phar/index.php"; __HALT_COMPILER();-->");

加入文件：

$p["file.txt"] = "This is a text file";
$p["index.php"] = file_get_contents("index.php");
$p["big.txt"] = "This is a big text file";
$p["big.txt"]-&gt;setCompressedBZIP2();
//加入某目录下所有的文件
$p-&gt;buildFromDirectory("/path/to/files","./\\.php$/");

使用Phar

include "myphar.phar";
include "phar://myphar.phar/fil


,IRF,ce,5,53, x,x,x, x,x,x)
	.word 0xb20d0000  ! 793: AND_R	and 	%r20, %r0, %r25
T0_irf_ce_61:
!$EV error(0,expr(@VA(.MAIN.T0_irf_ce_61), 16, 16),1,IRF,ce,27,27, x,x,x, x,x,x)
	.word 0xbe854000  ! 795: ADDcc_R	addcc 	%r21, %r0, %r31
	.word 0xf8d5ce00  ! 796: LDSHA_R	ldsha	[%r23, %r0] 0x70, %r28
	.word 0xf414a0ad  ! 797: LDUH_I	lduh	[%r18 + 0x00ad], %r26
	.word 0xb4150000  ! 798: OR_R	or 	%r20, %r0, %r26
	.word 0xb69c6076  ! 799: XORcc_I	xorcc 	%r17, 0x0076, %r27
	sta	%f2, [%r20 + %g0] 0xf0
	.word 0xfc156130  ! 804: LDUH_I	lduh	[%r21 + 0x0130], %r30
	.word 0xfbbd6172  ! 805: STDFA_I	stda	%f29, [0x0172, %r21]
T0_dtlb_err_33:
!$EV error (0,expr(@VA(.MAIN.T0_dtlb_err_33),16,16),1,DTLB_DATA,23)
	.word 0xf20d6139  ! 807: LDUB_I	ldub	[%r21 + 0x0139], %r25
T0_dtlb_err_34:
!$EV error (0,expr(@VA(.MAIN.T0_dtlb_err_34),16,16),1,DTLB_DATA,13)
	.word 0xf8dc4040  ! 809: LDXA_R	ldxa	[%r17, %r0] 0x02, %r28
T0_hwint_101:
!$EV trig_pc_d(0,expr(@VA(.MAIN.T0_hwint_101), 16, 16)) -> intp(0, 0, 2b)
T0_irf_ce_62:
!$EV error(0,expr(@VA(.MAIN.T0_irf_ce_62), 16, 16),1,IRF,ce,49,59, x,x,x, x,x,x)
	.word 0xbd643801  ! 811: MOVcc_I	<illegal instruction>
T0_dtlb_err_35:
!$EV error (0,expr(@VA(.MAIN.T0_dtlb_err_35),16,16),1,DTLB_DATA,41)
	.word 0xfd3c21f7  ! 812: STDF_I	std	%f30, [0x01f7, %r16]
	.word 0xb8442090  ! 812: ADDC_I	addc 	%r16, 0x0090, %r28
T0_hwint_102:
!$EV trig_pc_d(0,expr(@VA(.MAIN.T0_hwint_102), 16, 16)) -> intp(0, 0, 15)
T0_hwint_103:
!$EV trig_pc_d(0,expr(@VA(.MAIN.T0_hwint_103), 16, 16)) -> intp(0, 0, 30)
T0_itlb_err_0:
!$EV error (0,expr(@VA(.MAIN.T0_itlb_err_0),16,16),1,ITLB_DATA,29)
	.word 0xfc1c0000  ! 817: LDD_R	ldd	[%r