LIMIT, True)

        payload = {
            "image": None,
            "do_sample": do_sample == True,
            "temperature": temperature,
            "max_new_tokens": max_tokens,
            "caption_type": caption_type,
            "caption_length": caption_length,
            "extra_options": [extra_options],
            "name_input": name_input,
            "custom_prompt": custom_prompt,
        }

        pbar.update_absolute(30)
        caption = bizyairAPI.joyCaption2(payload, image, apikey_override)

        pbar.update_absolute(100)
        return (caption,)

NODE_CLASS_MAPPINGS = {
    "easy fluxPromptGenAPI": fluxPromptGenAPI,
    "easy joyCaption2API": joyCaption2API,
}

NODE_DISPLAY_NAME_MAPPINGS = {
    "easy fluxPromptGenAPI": "Prompt Gen (FluxAI)",
    "easy joyCaption2API": "JoyCaption2 (BizyAIR)",
}


_sync_actions(&remote_data, &local_notes);

        assert_eq!(action.len(), 1);
        println!("{}", action[0]);
        assert!(matches!(action[0], UpdateAction::AddRemotely(_)));

    }

}<filename>rust/crypto-primitives/benches/beavers_mul.rs<gh_stars>10-100
use criterion::{criterion_group, criterion_main, Criterion};
// use itertools::Itertools;

use std::time::Duration;

use algebra::{fields::near_mersenne_64::F, fixed_point::*};
use crypto_primitives::{additive_share::Share, beavers_mul::*};
use rand::{Rng, SeedableRng};
use rand_chacha::ChaChaRng;

fn generate_random_number<R: Rng>(rng: &mut R) -> (f64, TenBitExpFP) {
    let is_neg: bool = rng.gen();
    let mul = if is_neg { -10.0 } else { 10.0 };
    let float: f64 = rng.gen();
    let f = TenBitExpFP::truncate_float(float * mul);
    let n = TenBitExpFP::from(f);
    (f, n)
}

struct TenBitExpParams {}
impl FixedPointParameters for TenBitExpParams {
    type Field = F;
    const MANTISSA_CAPACITY: u8 = 5;
    const EXPONENT_CAPACITY: u8 = 5;
}

type TenBitExpFP = FixedPoint<TenBitExpParams>;

const RANDOMNESS: [u8; 32] = [
    0x11, 0xe0, 0x8f, 0xbc, 0x89, 0xa7, 0x34, 0x01, 0x45, 0x86, 0x82, 0xb6, 0x51, 0xda, 0xf4, 0x76,
    0x5d, 0xc9, 0x8d, 0xea, 0x23, 0xf2, 0x90, 0x8f, 0x9d, 0x03, 0xf2, 0x77, 0xd3, 0x4a, 0x52, 0xd2,
];

fn bench_beavers_mul(c: &mut Criterion) {
    c.bench_function_over_inputs(
        &format!("beavers_mul"),
        move |bench, num| {
            let mut rng = ChaChaRng::from_seed(RANDOMNESS);
            let seed = RANDOMNESS;
            let mut gen = InsecureTripleGen::<TenBitExpFP>::new(seed);
            let mut inputs = vec![];
            for _ in 0..1000 {
                let (t1, t2) = gen.generate_triple_shares();
                let (_, n1) = generate_random_number(&mut rng);
                let (_, n2) = generate_random_number(&mut rng);

                let (s11, s12) = n1.share(&mut rng);
                let (s21, s22) = n2.share(&mut rng);

                inputs.push([(s11, s12, t1), (s21, s22, t2)]);
            }

            let mut i = 0;
            bench.iter(|| {
                for _ in 0..*num {
                    let [(s11, s12, t1), (s21, s22, t2)] = inputs[i % 1000].clone();
                    let p1_bl_input = FPBeaversMul::share_and_blind_inputs(&s11, &s21, &t1);
                    let p2_bl_input = FPBeaversMul::share_and_blind_inputs(&s12, &s22, &t2);
                    let (p1_bl_input, p2_bl_input) = (
                        FPBeaversMul::reconstruct_blinded_inputs(p1_bl_input, p2_bl_input),
                        FPBeaversMul::reconstruct_blinded_inputs(p2_bl_input, p1_bl_input),
                    );

                    let mut s31 = FPBeaversMul::multiply_blinded_inputs(1, p1_bl_input, &t1);
                    let mut s32 = FPBeaversMul::multiply_blinded_inputs(2, p2_bl_input, &t2);
                    s31.inner.signed_reduce_in_place();
                    s32.inner.signed_reduce_in_place();
                    let n4 = s31.combine(&s32);
                    i += 1;
                    let _ = criterion::black_


// Copyright (C) 2020  Matthew "strager" Glazar
// See end of file for extended copyright information.

#pragma once

#include <cstdint>

namespace quick_lint_js {
inline std::uint32_t load_u32_le(const void* data) {
  const unsigned char* d = reinterpret_cast<const unsigned char*>(data);
  return (static_cast<std::uint32_t>(d[0]) << (8 * 0)) |
         (static_cast<std::uint32_t>(d[1]) << (8 * 1)) |
         (static_cast<std::uint32_t>(d[2]) << (8 * 2)) |
         (static_cast<std::uint32_t>(d[3]) << (8 * 3));
}

inline std::uint64_t load_u64_le(const void* data) {
  const unsigned char* d = reinterpret_cast<const unsigned char*>(data);
  return (static_cast<std::uint64_t>(d[0]) << (8 * 0)) |
         (static_cast<std::uint64_t>(d[1]) << (8 * 1)) |
         (static_cast<std::uint64_t>(d[2]) << (8 * 2)) |
         (static_cast<std::uint64_t>(d[3]) << (8 * 3)) |
         (static_cast<std::uint64_t>(d[4]) << (8 * 4)) |
         (static_cast<std::uint64_t>(d[5]) << (8 * 5)) |
         (static_cast<std::uint64_t>(d[6]) << (8 * 6)) |
         (static_cast<std::uint64_t>(d[7]) << (8 * 7));
}
}

// quick-lint-js finds bugs in JavaScript programs.
// Copyright (C) 2020  Matthew "strager" Glazar
//
// This file is part of quick-lint-js.
//
// quick-lint-js 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.
//
// quick-lint-js 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 quick-lint-js.  If not, see <https://www.gnu.org/licenses/>.


/* AbiWord
 * Copyright (C) 1998 AbiSource, Inc.
 *
 * This program 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 2
 * 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, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 */

#ifndef AP_LOADBINDINGS_DEADGRAVE_H
#define AP_LOADBINDINGS_DEADGRAVE_H
class EV_EditBindingMap;
class AP_BindingSet;

bool ap_LoadBindings_DeadGrave(AP_BindingSet * pThis,
								  EV_EditBindingMap * pebm);

#endif /* AP_LOADBINDINGS_DEADGRAVE_H */


:          map[string]string(nil),
					},
				},
			},

			Mounts: []container.MountPoint{},
		},
	}

	expectedDiscoveryData := []discovery.Discovery{
		{
			Variables: data.Map{
				"discovery.containerId":         "484c2678906bed94a51fe12ec1fc8ac55f177453dba00c1b0ae0a22f4b655e41",
				"discovery.image":               "test-server",
				"discovery.ip":                  "0.0.0.0",
				"discovery.ip.0":                "",
				"discovery.ip.1":                "0.0.0.0",
				"discovery.name":                "sharp_beaver",
				"discovery.port":                "7199",
				"discovery.ports.0":             "0",
				"discovery.ports.1":             "7199",
				"discovery.ports.tcp":           "0",
				"discovery.ports.tcp.0":         "0",
				"discovery.ports.tcp.1":         "7199",
				"discovery.private.ip":          "172.17.0.2",
				"discovery.private.ip.0":        "172.17.0.2",
				"discovery.private.port":        "4567",
				"discovery.private.ports.0":     "4567",
				"discovery.private.ports.1":     "7199",
				"discovery.private.ports.tcp":   "4567",
				"discovery.private.ports.tcp.0": "4567",
				"discovery.private.ports.tcp.1": "7199",
			},
			MetricAnnotations: data.InterfaceMap{
				"command":       "/bin/bash -c 'java ${JAVA_OPTS} -jar /test-server.jar'",
				"containerId":   "484c2678906bed94a51fe12ec1fc8ac55f177453dba00c1b0ae0a22f4b655e41",
				"containerName": "sharp_beaver",
				"image":         "test-server",
				"imageId":       "sha256:8282995409c26b82d66243f169f6695115a06ce860966db549f8ca09dcbb9767",
				"label":         map[string]string{}},
			EntityRewrites: []data.EntityRewrite{
				{
					Action:       "replace",
					Match:        "${ip}",
					ReplaceField: "container:${containerId}",
				},
			},
		},
	}

	matcher, err := discovery.NewMatcher(map[string]string{
		"image": "/test-server/",
	})
	require.NoError(t, err)

	actualDiscoveryData := getDiscoveries(givenContainerList, &matcher)
	assert.Equal(t, expectedDiscoveryData, actualDiscoveryData)
}

func TestIsIPv4(t *testing.T) {
	testCases := []struct {
		name     string
		ip       string
		expected bool
	}{
		{
			name:     "ValidIpV4",
			ip:       "127.0.0.1",
			expected: true,
		},
		{
			name:     "EmptyIp",
			ip:       "",
			expected: false,
		},
		{
			name:     "IpV6",
			ip:       "0000:0000:0000:0000:0000:0000:0000:0001",
			expected: false,
		},
	}

	for _, testCase := range testCases {
		t.Run(testCase.name, func(t *testing.T) {
			assert.Equal(t, testCase.expected, isIPv4(testCase.ip))
		})
	}
}
// Copyright 2020 New Relic Corporation. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package databind

import (
	"testing"
	"time"

	"github.com


_bld1_woodstruc',
	[1176586107] = 'vb_30_bld1',
	[-2117451445] = 'vb_30_bld1a',
	[-224943092] = 'vb_30_bld2c',
	[-2022516370] = 'vb_30_bld2test',
	[498095064] = 'vb_30_decal1',
	[203534523] = 'vb_30_decal2',
	[-980442224] = 'vb_30_decal3',
	[-1217984705] = 'vb_30_decal4',
	[-384996725] = 'vb_30_decal5',
	[371075145] = 'vb_30_detail1',
	[76809525] = 'vb_30_detail2',
	[1538195681] = 'vb_30_detail3_stairs',
	[-70814820] = 'vb_30_detail3',
	[-402502638] = 'vb_30_detail4',
	[-1492817272] = 'vb_30_floyd_emissive',
	[-644321229] = 'vb_30_floyd_emissive2',
	[1285182522] = 'vb_30_floyd_emissivemurder_01',
	[421763414] = 'vb_30_ground',
	[1415974920] = 'vb_30_hedges_dcl',
	[725741943] = 'vb_30_ladder_05',
	[1832690753] = 'vb_30_ladder',
	[-1859494018] = 'vb_30_mission_afterdeath_ipl',
	[1156857486] = 'vb_30_mission_afterdeath_ipl2',
	[-1860937765] = 'vb_30_raildetail',
	[1230296866] = 'vb_30_rails',
	[-1381449219] = 'vb_30_shd',
	[-623442521] = 'vb_30_shutters_slod',
	[500487298] = 'vb_30_shutters',
	[806473936] = 'vb_30_windows',
	[-1015811998] = 'vb_31_build1',
	[-1246669603] = 'vb_31_build2',
	[693999615] = 'vb_31_dcl',
	[108205748] = 'vb_31_dcl2',
	[297151802] = 'vb_31_dcl3',
	[2069211346] = 'vb_31_dtl',
	[619380024] = 'vb_31_ground',
	[986790280] = 'vb_31_hedge_rnd_b_mm003',
	[691410514] = 'vb_31_hedge_rnd_b_mm004',
	[157158237] = 'vb_31_rails',
	[-514543928] = 'vb_31_railsb_lod',
	[-1959459549] = 'vb_31_railsb',
	[-984099672] = 'vb_31_railsb02',
	[1916939902] = 'vb_31_railsb03',
	[-1189667444] = 'vb_31_railsb04_lod',
	[1634831581] = 'vb_31_railsb04',
	[-2050426297] = 'vb_31_railse',
	[-408629410] = 'vb_31_railse01',
	[482720159] = 'vb_31_railse02',
	[167744531] = 'vb_31_railse03',
	[1126401626] = 'vb_31_railse04',
	[828236495] = 'vb_31_railse05',
	[1776288018] = 'vb_32_build1',
	[877794811] = 'vb_32_build2',
	[1300318297] = 'vb_3


2.048-2.33-4.098m24.75-1.156.007.055c.148 1.021.479 2.706-.051 3.636-.357.63-.437-.344-.447-.54-.05-.803-.06-1.607-.121-2.41-.158-2.122-.866-4.279-.856-6.407.009-2.67 2.275 1.52.978 1.293.113 1.459.287 2.923.49 4.373m1.705-3.446c.361-.473.809.092.613.295-.225.23-.471-.193-.451.391.012.336.186.9-.133 1.158-.23-.119-1.101-1.381-.941-1.603.271-.378.723.772.82.907.088-.371-.163-.808.092-1.148m.667 3.958c-.063-.055-.044-.038-.005-.007-.435-.388.116-.826.42-.393.23.328.24 1.095-.183 1.292 0-.31.038-.663-.232-.892m-1.329-.177c-.269-.407 1.452-1.502 1.75-1.699.205.313-1.241 1.437-1.75 1.699m.125 1.88c.795-1.198 1.936 1.894 2.458-.084.328-1.239-.079-2.563-.177-3.805-.072-.914-.396-1.629-.946-2.351-.567-.747-1.191-1.45-.838-2.447.958.373.968 1.176 1.476 1.923.138-.588-.325-1.333.052-1.89.445-.661.866 1.165.91 1.363.115.526-.405.688-.093 1.431.244.582.594 1.176.999 1.661-.081-.543-.999-4.586.034-4.669.3-.024.563 1.146.609 1.337.155.622-.177 1.116-.213 1.742-.069 1.175.136 2.51.849 3.473.354.476 1.87 2.254 1.095 2.836-.549-.701-.991-1.479-1.508-2.2 0 .745.183 1.624-.24 2.297-.386-.171-.165-1.448-.161-1.774.012-1.092-.701-2.016-1.296-2.856-.168 1.438.933 4.239-.352 5.343-.926.797-2.019-.946-2.376-.316-.276.485-.964 2.261-1.723 2.094-.953-.21-1.698-2.941-.598-3.277.04.647.004 1.335.262 1.946.534 1.285 1.509-1.377 1.777-1.777m5.07-8.087c.461.34.674 1.751.244 2.231-.152-.595-.753-1.772-.244-2.231m-2.849 9.937c.252-.017.814.842.484 1.063-.223.147-1.081.308-.578-.141.569-.505.029-.918.094-.922m1.888 1.227c-.04-.57 1.27-1.154 1.635-1.456.939-.773.872-2.229.803-3.314-.096-1.462-.217-2.962-.465-4.404-.144-.839-.574-2.122.215-2.779.442.377 1.209 1.428.852 1.857-.427.513.109 4.984.119 5.341.059 2.103-.554 4.755-3.159 4.755"/></svg>';
  static const String flag_for_flag_senegal =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64" preserveAspectRatio="xMidYMid meet" viewBox="0 0 64 64"><path fi


v_gld_b+4], v[v_gld_b+6] op_sel:[1, 1]
    v_pack_b32_f16 v[v_pack_k_tmp+2], v[v_gld_b+8], v[v_gld_b+10] op_sel:[1, 1]
    v_pack_b32_f16 v[v_pack_k_tmp+3], v[v_gld_b+12], v[v_gld_b+14] op_sel:[1, 1]
    ds_write_b128 v[v_sst_b_os], v[v_pack_k_tmp:v_pack_k_tmp+3] offset:16
    v_pack_b32_f16 v[v_pack_k_tmp], v[v_gld_b+1], v[v_gld_b+3]
    v_pack_b32_f16 v[v_pack_k_tmp+1], v[v_gld_b+5], v[v_gld_b+7]
    v_pack_b32_f16 v[v_pack_k_tmp+2], v[v_gld_b+9], v[v_gld_b+11]
    v_pack_b32_f16 v[v_pack_k_tmp+3], v[v_gld_b+13], v[v_gld_b+15]
    ds_write_b128 v[v_sst_b_os], v[v_pack_k_tmp:v_pack_k_tmp+3] offset:32
    v_pack_b32_f16 v[v_pack_k_tmp], v[v_gld_b+1], v[v_gld_b+3] op_sel:[1, 1]
    v_pack_b32_f16 v[v_pack_k_tmp+1], v[v_gld_b+5], v[v_gld_b+7] op_sel:[1, 1]
    v_pack_b32_f16 v[v_pack_k_tmp+2], v[v_gld_b+9], v[v_gld_b+11] op_sel:[1, 1]
    v_pack_b32_f16 v[v_pack_k_tmp+3], v[v_gld_b+13], v[v_gld_b+15] op_sel:[1, 1]
    ds_write_b128 v[v_sst_b_os], v[v_pack_k_tmp:v_pack_k_tmp+3] offset:48

    s_waitcnt vmcnt(0)
    ds_write_b128 v[v_sst_a_os], v[v_gld_a+0:v_gld_a+0+3]

    .v_clear_acc_c a_c, 64
    ; make sure acc WAR harzard, at least 1 nop for src_c
    s_sub_i32 s[s_kitr], s[s_knum], 32
    s_cmp_gt_i32 s[s_kitr], 0
    s_cbranch_scc0 L_igemm_bwd_gtcx_nhwc_fp16_bx0_ex1_bt64x256x32_wt32x32x8_ws1x1_wr2x2_ta1x8x1x1_1x4x1x64_tb1x8x1x4_1x4x1x64_mh_mfma_end

    s_add_u32 s[s_out_offset],  s[s_move_slice_out_stride_k], s[s_out_offset]
    v_add_u32 v[v_wei_os], s[s_move_slice_wei_stride_k], v[v_wei_os]
    s_cmp_le_u32 s[s_gemm_k_num_k], s[s_out_offset]
    s_cselect_b32 s[s_flag_need_acc_yx], 1, 0

    s_cmp_eq_u


 criticality: Criticality,
    pub value: RelocationRequiredProtocolIEs_EntryValue,
}

#[derive(Debug, AperCodec)]
#[asn(
    type = "SEQUENCE-OF",
    sz_extensible = false,
    sz_lb = "0",
    sz_ub = "65535"
)]
pub struct RelocationRequiredProtocolIEs(Vec<RelocationRequiredProtocolIEs_Entry>);

#[derive(Debug, AperCodec)]
#[asn(type = "OPEN")]
pub enum RelocationRequiredProtocolExtensions_EntryExtensionValue {
    #[asn(key = 203)]
    Id_CSG_Id(CSG_Id),
    #[asn(key = 235)]
    Id_Cell_Access_Mode(Cell_Access_Mode),
    #[asn(key = 108)]
    Id_GERAN_Classmark(GERAN_Classmark),
    #[asn(key = 259)]
    Id_RSRVCC_HO_Indication(RSRVCC_HO_Indication),
    #[asn(key = 226)]
    Id_SRVCC_HO_Indication(SRVCC_HO_Indication),
    #[asn(key = 161)]
    Id_SourceBSS_ToTargetBSS_TransparentContainer(SourceBSS_ToTargetBSS_TransparentContainer),
    #[asn(key = 293)]
    Id_UE_Application_Layer_Measurement_Configuration_For_Relocation(
        UE_Application_Layer_Measurement_Configuration_For_Relocation,
    ),
}

#[derive(Debug, AperCodec)]
#[asn(type = "SEQUENCE", extensible = false)]
pub struct RelocationRequiredProtocolExtensions_Entry {
    #[asn(key_field = true)]
    pub id: ProtocolExtensionID,
    pub criticality: Criticality,
    pub extension_value: RelocationRequiredProtocolExtensions_EntryExtensionValue,
}

#[derive(Debug, AperCodec)]
#[asn(
    type = "SEQUENCE-OF",
    sz_extensible = false,
    sz_lb = "1",
    sz_ub = "65535"
)]
pub struct RelocationRequiredProtocolExtensions(Vec<RelocationRequiredProtocolExtensions_Entry>);

#[derive(Debug, AperCodec)]
#[asn(type = "INTEGER", lb = "0", ub = "127")]
pub struct INTEGER_56(u8);

#[derive(Debug, AperCodec)]
#[asn(type = "OPEN")]
pub enum Requested_RAB_Parameter_ValuesIE_Extensions_EntryExtensionValue {
    #[asn(key = 159)]
    Id_AlternativeRABConfigurationRequest(AlternativeRABConfigurationRequest),
    #[asn(key = 179)]
    Id_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList(
        Requested_RAB_Parameter_ExtendedGuaranteedBitrateList,
    ),
    #[asn(key = 178)]
    Id_Requested_RAB_Parameter_ExtendedMaxBitrateList(
        Requested_RAB_Parameter_ExtendedMaxBitrateList,
    ),
    #[asn(key = 221)]
    Id_Requested_RAB_Parameter_SupportedGuaranteedBitrateList(SupportedRAB_ParameterBitrateList),
    #[asn(key = 220)]
    Id_Requested_RAB_Parameter_SupportedMaxBitrateList(SupportedRAB_ParameterBitrateList),
}

#[derive(Debug, AperCodec)]
#[asn(type = "SEQUENCE", extensible = false)]
pub struct Requested_RAB_Parameter_ValuesIE_Extensions_Entry {
    #[asn(key_field = true)]
    pub id: ProtocolExtensionID,
    pub criticality: Criticality,
    pub extension_value: Requested_RAB_Paramete


      let have = env.out();
      let want = "         Name  foo
      Comment  comment
Creation Date  1970-01-01 00:00:01 UTC
   Created By  created by
       Source  source
    Info Hash  e12253978dc6d50db11d05747abcea1ad03b51c5
 Torrent Size  327 bytes
 Content Size  20 bytes
      Private  yes
      Tracker  a
Announce List  Tier 1: x
               Tier 2: y
               Tier 3: z
    DHT Nodes  x:12
               1.1.1.1:16
               [2fc00:e968:6179::de52:7100:370]:7334
   Piece Size  16 KiB
  Piece Count  2
   File Count  1
        Files  foo
";

      assert_eq!(have, want);
    }

    {
      let mut env = TestEnvBuilder::new()
        .arg_slice(&["imdl", "torrent", "show", "--input", "foo.torrent"])
        .build();

      let path = env.resolve("foo.torrent")?;

      metainfo.dump(path).unwrap();

      env.assert_ok();

      let have = env.out();
      let want = "\
name\tfoo
comment\tcomment
creation date\t1970-01-01 00:00:01 UTC
created by\tcreated by
source\tsource
info hash\te12253978dc6d50db11d05747abcea1ad03b51c5
torrent size\t327
content size\t20
private\tyes
tracker\ta
announce list\tx\ty\tz
dht nodes\tx:12\t1.1.1.1:16\t[2001:fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b:370]:7334
piece size\t16384
piece count\t2
file count\t1
files\tfoo
";

      assert_eq!(have, want);
    }

    Ok(())
  }

  #[test]
  fn tier_list_without_main() -> Result<()> {
    let metainfo = Metainfo {
      announce: Some("a".into()),
      announce_list: Some(vec![vec!["b".into()], vec!["c".into()], vec!["a".into()]]),
      comment: Some("comment".into()),
      nodes: Some(vec![
        "x:12".parse().unwrap(),
        "1.1.1.1:16".parse().unwrap(),
        "[2001:0db8:8fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b:0370]:7334".parse().unwrap(),
      ]),
      created_by: Some("created by".into()),
      creation_date: Some(1),
      encoding: Some("UTF-8".into()),
      info: Info {
        private: Some(true),
        piece_length: Bytes(16 * 1024),
        source: Some("source".into()),
        name: "foo".into(),
        pieces: PieceList::from_pieces(&["abc"]),
        mode: Mode::Single {
          length: Bytes(20),
          md5sum: None,
        },
      },
    };

    {
      let mut env = TestEnvBuilder::new()
        .arg_slice(&["imdl", "torrent", "show", "--input", "foo.torrent"])
        .out_is_term()
        .build();

      let path = env.resolve("foo.torrent")?;

      metainfo.dump(path).unwrap();

      env.assert_ok();

      let have = env.out();
      let want = "         Name  foo
      Comment  comment
Creation Date  1970-01-01 00:00:01 UTC
   Created By  created by
       Source  source
    Info Hash  b9cd9cae5748518c99d00d8ae86c0162510be4d9
 Torrent Size  307 bytes
 Content


	'',	'',	'2',	'',	'托尔',	'Thor',	'',	'',	'3',	'',	'',	'',	'',	'',	'',	'',	'',	'1025650',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'1025650',	'',	'不愧是你，就连另类的程度也是天才级别的。',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'7026001',	'',	'',	'2',	'',	'托尔',	'Thor',	'',	'',	'3',	'',	'',	'',	'',	'',	'',	'',	'',	'1025651',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'1025651',	'',	'也是多亏了你一个劲地埋头研究造物，我才有办法像这样控制住世界树，我很感谢你哟，丝卡蒂。',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'7026001',	'',	'',	'2',	'',	'托尔',	'Thor',	'',	'',	'3',	'',	'',	'',	'',	'',	'',	'',	'',	'1025652',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'1025652',	'',	'别说些有的没的，老实交代你的目的。',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'7022001',	'',	'',	'2',	'',	'洛基',	'Loki',	'[{"id":7022001,"pos":2,"enter":2}]',	'',	'4',	'',	'',	'',	'',	'',	'',	'',	'',	'1025653',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'1025653',	'',	'用这种不友善的态度对待专程来协助你们的人真的好吗？我们是伙伴吧。',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'7026001',	'',	'',	'2',	'',	'托尔',	'Thor',	'[{"id":7026001,"pos":2,"enter":2}]',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'1025654',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'1025654',	'',	'伙伴在你的词典里该不会是互相怀疑，最后捅一刀的意思吧？',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'7022001',	'',	'',	'


Day 18](#-day-18)
  - [Regular Expressions](#regular-expressions)
    - [The *re* Module](#the-re-module)
    - [Methods in *re* Module](#methods-in-re-module)
      - [Match](#match)
      - [Search](#search)
      - [Searching for All Matches Using *findall*](#searching-for-all-matches-using-findall)
      - [Replacing a Substring](#replacing-a-substring)
  - [Splitting Text Using RegEx Split](#splitting-text-using-regex-split)
  - [Writing RegEx Patterns](#writing-regex-patterns)
    - [Square Bracket](#square-bracket)
    - [Escape character(\\) in RegEx](#escape-character-in-regex)
    - [One or more times(+)](#one-or-more-times)
    - [Period(.)](#period)
    - [Zero or more times(\*)](#zero-or-more-times)
    - [Zero or one time(?)](#zero-or-one-time)
    - [Quantifier in RegEx](#quantifier-in-regex)
    - [Cart ^](#cart-)
  - [💻 Exercises: Day 18](#-exercises-day-18)
    - [Exercises: Level 1](#exercises-level-1)
    - [Exercises: Level 2](#exercises-level-2)
    - [Exercises: Level 3](#exercises-level-3)

# 📘 Day 18

## Regular Expressions

A regular expression or RegEx is a special text string that helps to find patterns in data. A RegEx can be used to check if some pattern exists in a different data type. To use RegEx in python first we should import the RegEx module which is called *re*.

### The *re* Module

After importing the module we can use it to detect or find patterns.

```py
import re
```

### Methods in *re* Module

To find a pattern we use different set of *re* character sets that allows to search for a match in a string.

- *re.match()*: searches only in the beginning of the first line of the string and returns matched objects if  found, else returns None.
- *re.search*: Returns a match object if there is one anywhere in the string, including multiline strings.
- *re.findall*: Returns a list containing all matches
- *re.split*: Takes a string, splits it at the match points, returns a list
- *re.sub*:  Replaces one or many matches within a string

#### Match

```py
# syntac
re.match(substring, string, re.I)
# substring is a string or a pattern, string is the text we look for a pattern , re.I is case ignore
```

```py
import re

txt = 'I love to teach python and javaScript'
# It returns an object with span, and match
match = re.match('I love to teach', txt, re.I)
print(match)  # <re.Match object; span=(0, 15), match='I love to teach'>
# We can get the starting and ending position of the match as tuple using span
span = match.span()
print(span)     # (0, 15)
# Lets find the start and stop position from the span
start, end = span
print(start, end)  # 0, 15
substring = txt[start:end]
print(substring)       # I love to teach
```

As you can see from the example above, the pattern we are looking for (or the substring we are looking for) is *I love to teach*. The match function returns an object **only** if the text starts with the pattern.

```py
import re

txt = 'I love to teach python and javaScript'
match = re.match('I like to teach', txt, re.I)
print(match)  # None
```

The string does not string with *I like to teach*, therefore there was no match and the match method returned None.

#### Search

```py
# syntax
re.match(substring, string, re.I)
# substring is a pattern, string is the text we look for a pattern , re.I is case ignore flag
```

```py


ral: ; read a number of plain bytes from the input stream
    and     %00111111; number of bytes to read
    inc     a; add 1 since the encoder encodes 1 as 0
    ld      b,a; store loop counter

.literal_copy:

    ; wait for vblank
    ld      a,[rSTAT]       ; <---+
    and     STATF_BUSY      ;     |
    jr      nz,@-4          ; ----+

    ; goto next literal byte (and eventually the next instruction byte)
    ld      a,[hli]
    ld      [de],a
    inc     de
    dec     b
    jr      nz,.literal_copy
    jr      core_decode_eom

; Repeating -------------------------------------------------------------------
.repeat:
    bit     6,a; check if we need to repeat one or two bytes
    jr      nz,.repeat_two; two bytes

.repeat_one:
    and     %00111111; number of times to repeat
    add     a,CORE_DECODE_MIN_REPEAT_LENGTH
    ld      b,a; store loop counter
    ld      a,[hli]; load byte to repeat and goto next instruction byte
    ld      c,a; store repeat byte

.repeat_one_loop:

    ; wait for vblank
    ld      a,[rSTAT]       ; <---+
    and     STATF_BUSY      ;     |
    jr      nz,@-4          ; ----+

    ; restore repeat byte and set
    ld      a,c
    ld      [de],a
    inc     de
    dec     b
    jr      nz,.repeat_one_loop
    jr      core_decode_eom

.repeat_zero:
    bit     4,a
    ret     nz; %00110000 is the end of data marker
    and     %00001111; number of times to repeat
    add     a,CORE_DECODE_MIN_REPEAT_LENGTH
    ld      b,a; store loop counter

.repeat_zero_loop:

    ; wait for vblank
    ld      a,[rSTAT]       ; <---+
    and     STATF_BUSY      ;     |
    jr      nz,@-4          ; ----+

    ; a is already zero after the compare above
    ld      [de],a
    inc     de
    dec     b
    jr      nz,.repeat_zero_loop
    jp      core_decode_eom

.repeat_two:
    and     %00111111; number of times to repeat
    add     a,CORE_DECODE_MIN_REPEAT_LENGTH
    ld      b,a; store loop counter
    ld      a,[hli]; load first data byte
    ld      c,a

.repeat_two_loop:

    ; wait for vblank
    ld      a,[rSTAT]       ; <---+
    and     STATF_BUSY      ;     |
    jr      nz,@-4          ; ----+

    ; set first byte
    ld      a,c
    ld      [de],a
    inc     de

    ; wait for vblank
    ld      a,[rSTAT]       ; <---+
    and     STATF_BUSY      ;     |
    jr      nz,@-4          ; ----+

    ; load and set second byte
    ld      a,[hl]
    ld      [de],a
    inc     de

    dec     b
    jr      nz,.repeat_two_loop
    ld      a,[hli]; goto next instruction byte (faster than inc hl)
    jp      core_decode_eom


;)|1.22|  inf  |             |
| Huber     | min( 1, 1/\|x\| ) |       inf | 4.00 |  inf  | improper    |
|           |                   |           |      |       | aka Median  |
| Lorentz   | 1 / ( 1 + x2 )   |      π | 2.00 |  inf  |             |
| Parabola  | 1 - x2           |       4/3 | 1.41 |  1.0  |             |
| Sinc      | sin(π*x)/(π*x)|     1.0 | 1.21 |  inf  |             |
| Triangle  | 1 - \|x\|         |       1.0 | 1.00 |  1.0  |             |
| Tricube   | ( 1 - \|x\|3 )3 |     81/70 | 1.18 |  1.0  |             |
| Triweight | ( 1 - x2 )3     |     32/35 | 0.91 |  1.0  |             |
| Uniform   | 1.0               |       2.0 | 2.00 |  1.0  | aka Clip    |
| Tophat 0  | 1.0               |       1.0 | 1.00 |  0.5  | like Uniform|
| Tophat 1  | 1 - \|x\|         |       1.0 | 1.00 |  1.0  | aka Triangle|
| Tophat 2  | 2nd order polynome|       1.0 | 1.26 |  1.5  |             |
| Tophat 3  | 3rd order polynome|       1.0 | 1.44 |  2.0  |             |
| Tophat 4  | 4th order polynome|       1.0 | 1.60 |  2.5  |             |
| Tophat 5  | 5th order polynome|       1.0 | 1.73 |  3.0  |             |
| Tophat 6  | 6th order polynome|       1.0 | 1.86 |  3.5  |             |

For all bound Kernels the definition in the table is true for |x| < range;
elsewhere it is 0.

Huber is not a proper Kernel as the integral is inf. However it is important
in robust fitting (RobustShell) to get a madian-like solution for the outliers.

Attributes

* integral  :  float

     the integral over the valid range
* fwhm  :  float

     the full width at half maximum
* range  :  float

     the region [-range..+range] where the kernel is non-zero.

Author      Do Kester

Category    mathematics/Fitting

Kernel( integral=1.0, fwhm=1.0, range=1.0 )

Constructor

Parameters

* integral  :  float

     over [-inf, +inf]
* fwhm  :  float

     full width at half maximum
* range  :  float

     the region [-range,+range] where the kernel is nonzero

result( x )

Return the result for input values.

Parameters

* x  :  array-like

     input values

resultsq( xsq


df_with_regimes, symbol)

            print(f"✅ Regímenes detectados para {symbol}: {len(df_with_regimes)} muestras válidas")
            return df_with_regimes

        except Exception as e:
            print(f"⚠  Error detectando regímenes: {e}")
            print(f"   🔄 Usando detección de regímenes por defecto...")
            return self._create_fallback_regimes(df, symbol)

    def _interpret_regimes(self, features: np.ndarray, labels: np.ndarray) -> dict:
        """🎯 Interpretar qué cluster representa cada régimen"""

        # ✅ PROTECCIÓN: Asegurar que numpy esté disponible
        import numpy as np

        regime_centers = {}
        for regime_id in range(3):
            regime_mask = labels == regime_id
            if np.any(regime_mask):
                regime_features = features[regime_mask]
                # Usar numpy.mean de forma explícita para evitar conflictos
                try:
                    regime_centers[regime_id] = np.array(regime_features).mean(axis=0)
                except Exception as e:
                    print(f"⚠  Error calculando media para régimen {regime_id}: {e}")
                    # Usar método alternativo
                    regime_centers[regime_id] = np.sum(regime_features, axis=0) / len(regime_features)

        # Interpretar basado en características:
        # [atr_norm, sma_slope, volume_momentum, rsi_norm, macd_norm]

        # Encontrar el régimen más bajista (pendiente negativa, RSI bajo)
        regime_scores = {}
        for regime_id, center in regime_centers.items():
            # Score negativo para características bajistas
            score = (center[1] * -2.0 +  # Pendiente negativa = bajista
                    (0.5 - center[3]) * 2.0 +  # RSI bajo = bajista
                    center[4] * -1.0)  # MACD negativo = bajista
            regime_scores[regime_id] = score

        # Ordenar regímenes por score (más negativo = más bajista)
        sorted_regimes = sorted(regime_scores.items(), key=lambda x: x[1])

        # Mapear: 0=bajista, 1=lateral, 2=alcista
        regime_mapping = {}
        for i, (regime_id, score) in enumerate(sorted_regimes):
            regime_mapping[regime_id] = i

        return regime_mapping

    def _analyze_regime_distribution(self, df: pd.DataFrame, symbol: str):
        """📊 Analizar distribución de regímenes detectados"""

        regime_counts = df['market_regime'].value_counts().sort_index()
        total_samples = len(df)

        print(f"📊 DISTRIBUCIÓN DE REGÍMENES - {symbol}:")
        print("=" * 50)

        for regime_id in range(3):
            count = regime_counts.get(regime_id, 0)
            percentage = (count / total_samples * 100) if total_samples > 0 else 0
            regime_name = self.regime_names[regime_id]

            print(f"   {regime_name:>8}: {count:>4} muestras ({percentage:>5.1f}%)")

        # ✅ VERIFICAR BALANCE
        min_samples_per_regime = total_samples * 0.15  # Mínimo 15% por régimen
        balanced = all(count >= min_samples_per_regime for count in regime_counts.values())

        if balanced:
            print(f"✅ Distribución equilibrada (mínimo {min_samples_per_regime:.0f} por régimen)")
        else:
            print(f"⚠  Distribución desequilibrada (mínimo {min_samples_per_regime:.0f} por régimen)")
            print(f"   💡 Considera ajustar parámetros de clustering")

    def _create_fallback_regimes(self, df: pd.DataFrame, symbol: str) -> pd.DataFrame:
        """🔄 Crear regímenes por defecto usando método simple"""

        print(f"🔄 Creando regímenes por defecto para {symbol}...")

        df_fallback = df.copy()
        close_prices = df_fallback['close'].values.astype(float)

        # Método simple basado en SMA
        sma_20 = talib.SMA(close_prices, timeperiod=20)
        sma_50 = talib.SMA(close_prices, timeperiod=50)

        regimes = []
        for i in range(len(close_prices)):
            if i < 50 or np.isnan(sma_20[i]) or np.isnan(sma_50[i]):
                regimes.append(1)  # Lateral por defecto
            else:
                # Calcular tendencia
                trend = (sma_20[i] - sma_50[i]) / sma_50[i]

                if trend > 0.02:  # 2% por encima
                    regimes.append(2)  # Alcista
                elif trend < -0.02:  # 2% por debajo


p>

Items:

                    {% for item in order_details.items %}

{{ item.product_name }} x {{ item.quantity }} - {{ item.item_total }}

                    {% endfor %}

{% load static %}
<!doctype html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/x-icon" href="favicon.ico">

    <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
    <link rel="stylesheet" href="{% static 'css/owl.carousel.min.css' %}">
    <link rel="stylesheet" href="{% static 'css/owl.theme.default.min.css' %}">
    <link href='https://unpkg.com/boxicons@2.1.1/css/boxicons.min.css' rel='stylesheet'>
    <link rel="stylesheet" href="{% static 'css/style.css' %}">

    <title>sparx motors light vehicles</title>


1.1.1.1.1.3.3" xref="S6.F4.18.m6.1.1.1.1.1.3.3.cmml"><mn id="S6.F4.18.m6.1.1.1.1.1.3.3.2" xref="S6.F4.18.m6.1.1.1.1.1.3.3.2.cmml">200</mn><mo id="S6.F4.18.m6.1.1.1.1.1.3.3.1" xref="S6.F4.18.m6.1.1.1.1.1.3.3.1.cmml"></mo><mi id="S6.F4.18.m6.1.1.1.1.1.3.3.3" mathvariant="normal" xref="S6.F4.18.m6.1.1.1.1.1.3.3.3.cmml">c</mi></mrow></msub></mrow><mo id="S6.F4.18.m6.1.1.1.1.3" stretchy="false" xref="S6.F4.18.m6.1.1.1.1.1.cmml">)</mo></mrow><mo id="S6.F4.18.m6.1.1.5" xref="S6.F4.18.m6.1.1.5.cmml">=</mo><mn id="S6.F4.18.m6.1.1.6" xref="S6.F4.18.m6.1.1.6.cmml">0.1</mn></mrow><annotation-xml encoding="MathML-Content" id="S6.F4.18.m6.1c"><apply id="S6.F4.18.m6.1.1.cmml" xref="S6.F4.18.m6.1.1"><and id="S6.F4.18.m6.1.1a.cmml" xref="S6.F4.18.m6.1.1"></and><apply id="S6.F4.18.m6.1.1b.cmml" xref="S6.F4.18.m6.1.1"><eq id="S6.F4.18.m6.1.1.4.cmml" xref="S6.F4.18.m6.1.1.4"></eq><ci id="S6.F4.18.m6.1.1.3.cmml" xref="S6.F4.18.m6.1.1.3">𝑥</ci><apply id="S6.F4.18.m6.1.1.1.1.1.cmml" xref="S6.F4.18.m6.1.1.1.1"><divide id="S6.F4.18.m6.1.1.1.1.1.1.cmml" xref="S6.F4.18.m6.1.1.1.1.1.1"></divide><ci id="S6.F4.18.m6.1.1.1.1.1.2.cmml" xref="S6.F4.18.m6.1.1.1.1.1.2">𝑅</ci><apply id="S6.F4.18.m6.1.1.1.1.1.3.cmml" xref="S6.F4.18.m6.1.1.1.1.1.3"><csymbol cd="ambiguous" id="S6.F4.18.m6.1.1.1.1.1.3.1.cmml" xref="S6.F4.18.m6.1.1.1.1.1.3">subscript</csymbol><ci id="S6.F4.18.m6.1.1.1.1.1.3.2.cmml" xref="S6.F4.18.m6.1.1.1.1.1.3.2">𝑅</ci><apply id="S6.F4.18.m6.1.1.1.1.1.3.3.cmml" xref="S6.F4.18.m6.1.1.1.1.1.3.3"><times id="S6


github.com/twgh/xcgui/window"
	"github.com/twgh/xcgui/xcc"
)

var (
	layoutTab *widget.LayoutEle
	tabBtn1   *widget.Button
	tabBtn2   *widget.Button
	tabBtn3   *widget.Button

	layoutBody  *widget.LayoutEle
	layoutPage1 *widget.LayoutEle
	layoutPage2 *widget.LayoutEle
	layoutPage3 *widget.LayoutEle
)

func main() {
	// 初始化界面库
	a := app.New(true)
	a.EnableAutoDPI(true).EnableDPI(true)
	// 创建窗口
	w := window.New(0, 0, 600, 400, "选择夹切换页面", 0, xcc.Window_Style_Default)

	// 我是喜欢创建一个水平布局元素, tab按钮都放在里面
	layoutTab = widget.NewLayoutEle(14, 35, 500, 30, w.Handle)
	// 放在水平布局元素中的组件, x, y绝对坐标是无效的
	tabBtn1 = widget.NewButton(0, 0, 100, 30, "页面1", layoutTab.Handle)
	tabBtn2 = widget.NewButton(0, 0, 100, 30, "页面2", layoutTab.Handle)
	tabBtn3 = widget.NewButton(0, 0, 100, 30, "页面3", layoutTab.Handle)

	// 设为单选类型按钮
	tabBtn1.SetTypeEx(xcc.Button_Type_Radio)
	tabBtn2.SetTypeEx(xcc.Button_Type_Radio)
	tabBtn3.SetTypeEx(xcc.Button_Type_Radio)
	// 设置为默认按钮样式, 就不会是单选按钮样式了
	tabBtn1.SetStyle(xcc.Button_Style_Default)
	tabBtn2.SetStyle(xcc.Button_Style_Default)
	tabBtn3.SetStyle(xcc.Button_Style_Default)
	// 默认选中第一个
	tabBtn1.SetCheck(true)

	// 主体部分, 页面都放进这里面, 我是喜欢这样设计, 不是必须
	layoutBody = widget.NewLayoutEle(14, 65, 500, 350, w.Handle)
	// 第一页
	layoutPage1 = widget.NewLayoutEle(0, 0, 500, 350, layoutBody.Handle)
	// 第二页
	layoutPage2 = widget.NewLayoutEle(0, 0, 500, 350, layoutBody.Handle)
	// 第三页
	layoutPage3 = widget.NewLayoutEle(0, 0, 500, 350, layoutBody.Handle)
	// 只让第一页显示, 其他页都设为不显示
	layoutPage2.Show(false)
	layoutPage3.Show(false)

	// 给按钮绑定页面, 绑定后切换页面的原理就是: 你点哪个按钮就显示哪个页面
	tabBtn1.SetBindEle(layoutPage1.Handle)
	tabBtn2.SetBindEle(layoutPage2.Handle)
	tabBtn3.SetBindEle(layoutPage3.Handle)

	// 页面中放置内容
	widget.NewShapeText(0, 0, 100, 30, "我是第一页", layoutPage1.Handle)
	widget.NewShapeText(0, 0, 100, 30, "我是第二页", layoutPage2.Handle)
	widget.NewShapeText(0, 0, 100, 30, "


# Scrapy settings for quotescrawler project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
#     https://docs.scrapy.org/en/latest/topics/settings.html
#     https://docs.scrapy.org/en/latest/topics/downloader-middleware.html
#     https://docs.scrapy.org/en/latest/topics/spider-middleware.html

BOT_NAME = 'quotescrawler'

SPIDER_MODULES = ['quotescrawler.spiders']
NEWSPIDER_MODULE = 'quotescrawler.spiders'

# Crawl responsibly by identifying yourself (and your website) on the user-agent
#USER_AGENT = 'quotescrawler (+http://www.yourdomain.com)'

# Obey robots.txt rules
ROBOTSTXT_OBEY = True

# Configure maximum concurrent requests performed by Scrapy (default: 16)
#CONCURRENT_REQUESTS = 32

# Configure a delay for requests for the same website (default: 0)
# See https://docs.scrapy.org/en/latest/topics/settings.html#download-delay
# See also autothrottle settings and docs
#DOWNLOAD_DELAY = 3
# The download delay setting will honor only one of:
#CONCURRENT_REQUESTS_PER_DOMAIN = 16
#CONCURRENT_REQUESTS_PER_IP = 16

# Disable cookies (enabled by default)
#COOKIES_ENABLED = False

# Disable Telnet Console (enabled by default)
#TELNETCONSOLE_ENABLED = False

# Override the default request headers:
#DEFAULT_REQUEST_HEADERS = {
#   'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
#   'Accept-Language': 'en',
#}

# Enable or disable spider middlewares
# See https://docs.scrapy.org/en/latest/topics/spider-middleware.html
#SPIDER_MIDDLEWARES = {
#    'quotescrawler.middlewares.QuotescrawlerSpiderMiddleware': 543,
#}

# Enable or disable downloader middlewares
# See https://docs.scrapy.org/en/latest/topics/downloader-middleware.html
#DOWNLOADER_MIDDLEWARES = {
#    'quotescrawler.middlewares.QuotescrawlerDownloaderMiddleware': 543,
#}

# Enable or disable extensions
# See https://docs.scrapy.org/en/latest/topics/extensions.html
#EXTENSIONS = {
#    'scrapy.extensions.telnet.TelnetConsole': None,
#}

# Configure item pipelines
# See https://docs.scrapy.org/en/latest/topics/item-pipeline.html
#ITEM_PIPELINES = {
#    'quotescrawler.pipelines.QuotescrawlerPipeline': 300,
#}

# Enable and configure the AutoThrottle extension (disabled by default)
# See https://docs.scrapy.org/en/latest/topics/autothrottle.html
#AUTOTHROTTLE_ENABLED = True
# The initial download delay
#AUTOTHROTTLE_START_DELAY = 5
# The maximum download delay to be set in case of high latencies
#AUTOTHROTTLE_MAX_DELAY = 60
# The average number of requests Scrapy should be sending in parallel to
# each remote server
#AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0
# Enable showing throttling stats for every response received:
#AUTOTHROTTLE_DEBUG = False

# Enable and configure HTTP caching (disabled by default)
# See https://docs.scrapy.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings
#HTTPCACHE_ENABLED = True
#HTTPCACHE_EXPIRATION_SECS = 0
#HTTPCACHE_DIR = 'httpcache'
#HTTPCACHE_IGNORE_HTTP_CODES = []
#HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'


strlenW(str.wsz) * SIZEOF(WCHAR);
                    pauto->Navigate(str.wsz, PVAREMPTY, PVAREMPTY, PVAREMPTY, PVAREMPTY);
                    pauto->put_Visible(TRUE);
                    pauto->Release();
                }
                punk->Release();
            }
            RegCloseKey(hkeyProtocol);
        } else {
            TraceMsg(DM_WARNING, "HandlePluggableProtocol can't find %s", pszProtocol);
        }
        RegCloseKey(hkey);
    } else {
        ASSERT(0);
    }
    return hres;
}

extern "C" HRESULT CoAllowSetForegroundWindow(IUnknown *punk, void *pvReserved);

HRESULT _IEExecFile_TryRunningWindow(VARIANT *pvarIn, DWORD cid)
{
    HRESULT hr = E_FAIL;
    ASSERT(pvarIn);

    IShellWindows *psw = WinList_GetShellWindows(TRUE);
    if (psw)
    {
        IUnknown *punk;
        if (SUCCEEDED(psw->_NewEnum(&punk)))
        {
            VARIANT var = {0};
            IEnumVARIANT *penum;

            //  its too bad _NewEnum doesnt return an penum....
            //  this should never fail.

            punk->QueryInterface(IID_IEnumVARIANT, (LPVOID *)&penum);
            ASSERT(penum);

            //  this can be super spendy since every one of these
            //  items is marshalled.

            //  should we clone the stream here??

            while (FAILED(hr) && S_OK == penum->Next(1, &var, NULL))
            {

                ASSERT(var.vt == VT_DISPATCH);
                ASSERT(var.pdispVal);
                IOleCommandTarget *poct;

                if (SUCCEEDED(var.pdispVal->QueryInterface(IID_IOleCommandTarget, (LPVOID *)&poct)))
                {
                    CoAllowSetForegroundWindow(poct, NULL);

                    hr = poct->Exec(&CGID_Explorer, cid, 0, pvarIn, NULL);

                    poct->Release();
                }

                //  this should release the pdisp
                VariantClear(&var);
            }

            punk->Release();
            penum->Release();
        }

        psw->Release();
    }

    TraceMsgW(DM_SHELLEXECOBJECT, "IEExecFile_Running returns 0x%X", hr);
    return hr;
}

BOOL
IsIESchemeHandler(LPTSTR pszVerb, LPTSTR pszScheme)
{
    //  if we fail to get any value at all, the we must assume that it
    //  is some protocol like about: or res: that is not in the registry
    //  so we default to success.
    BOOL fRet = FALSE;
    TCHAR szExe[MAX_PATH];

    if (SUCCEEDED(AssocQueryString(0, ASSOCSTR_EXECUTABLE, pszScheme, pszVerb, szExe, (LPDWORD)MAKEINTRESOURCE(SIZECHARS(szExe)))))
    {
        //  if we find something and it aint us, then fail.
        if ((StrStrI(szExe, TEXT("iexplore.exe")) || StrStrI(szExe, TEXT("explorer.exe"))))
        {
            fRet = TRUE;

            TraceMsg(DM_SHELLEXECOBJECT, "IsIEScheme() found %s", szExe);
        }
    }
    else
    {
        // these are unregistered schemes, we are the only ones that
        //  should ever even use the unregistered schemes like
        //  res: or shell: so return TRUE here too.
        fRet = TRUE;
    }

    TraceMsg(DM_SHELLEXECOBJECT, "IsIEScheme() returns %d for %s", fRet, pszScheme);
    return fRet;
}

HRESULT IEExecFile(LPTSTR pszVerb, LPTSTR pszScheme, DWORD cid, LPTSTR pszPath)
{
    HRESULT hr = E_FAIL;
    ASSERT(psz


ref = base + 'changeset/' + changeId + '/close'
  var hq = hyperquest.put(href)
  hq.once('response', function (res) {
    t.equal(res.statusCode, 409, 'expected conflict code')
    var contentObj = contentType.parse(res)
    t.equal(contentObj.type, 'text/plain', 'media type correct')
    t.equal(contentObj.parameters.charset.toLowerCase(), 'utf-8', 'charset correct')
  })
  hq.pipe(concat({ encoding: 'string' }, function (body) {
    t.equal(
      body.trim().replace(/closed at.*/, 'closed at'),
      'The changeset ' + changeId + ' was closed at',
      'already closed message'
    )
  }))
  hq.end()
})

test('upload to closed changeset', function (t) {
  t.plan(4)
  var href = base + 'changeset/' + changeId + '/upload'
  var hq = hyperquest.post(href, {
    headers: { 'content-type': 'text/xml' }
  })
  hq.on('response', function (res) {
    t.equal(res.statusCode, 409, 'expected conflict code')
    var contentObj = contentType.parse(res)
    t.equal(contentObj.type, 'text/plain', 'media type correct')
    t.equal(contentObj.parameters.charset.toLowerCase(), 'utf-8', 'charset correct')
  })
  hq.pipe(concat({ encoding: 'string' }, function (body) {
    t.equal(
      body.trim().replace(/closed at.*/, 'closed at'),
      'The changeset ' + changeId + ' was closed at',
      'already closed message'
    )
  }))
  hq.end(`<osmChange version="1.0" generator="acme osm editor">
    <create>
      <node id="1" changeset="${changeId}" lat="64.5" lon="-121.5"/>
      <node id="2" changeset="${changeId}" lat="63.9" lon="-120.9"/>
      <way id="3" changeset="${changeId}">
        <nd ref="1"/>
        <nd ref="2"/>
      </way>
    </create>
  </osmChange>`)
})

var secondChangeId
test('create second changeset', function (t) {
  t.plan(4)
  var href = base + 'changeset/create'
  var hq = hyperquest.put(href, {
    headers: { 'content-type': 'text/xml' }
  })
  hq.once('response', function (res) {
    t.equal(res.statusCode, 200, 'create 200 ok')
    var contentObj = contentType.parse(res)
    t.equal(contentObj.type, 'text/plain', 'media type correct')
    t.equal(contentObj.parameters.charset.toLowerCase(), 'utf-8', 'charset correct')
  })
  hq.pipe(concat({ encoding: 'string' }, function (body) {
    secondChangeId = body.trim()
    t.ok(/^[0-9A-Fa-f]+$/.test(secondChangeId), 'expected changeset id response')
  }))
  hq.end(`<osm>
    <changeset>
      <tag k="comment" v="second"/>
    </changeset>
  </osm>`)
})

test('second changeset upload', function (t) {
  t.plan(13)
  var href = base + 'changeset/' + secondChangeId + '/upload'
  var hq = hyperquest.post(href, {
    headers: { 'content-type': 'text/xml' }
  })
  hq.on('response', function (res) {
    t.equal(res.statusCode, 200)
    var contentObj = contentType.parse(res)
    t.equal(contentObj.type, 'text/xml', 'media type correct')
    t.equal(contentObj.parameters.charset


有什么不同？                                            |
| 语音转写                                      | 请将这段录音转换为文字格式。                                    |
| 建议反馈                                      | 对于我们产品在用户体验方面应该怎样优化？                        |
| 商品推荐                                      | 可以根据用户购买记录，推荐哪些商品？                          |
| 文本翻译                                      | 请帮我将这篇文章的英文翻译成中文。                              |
| 自动摘要                                      | 将这篇文章自动摘要成200字左右的简洁概述。                       |
|自然语言处理|请使用Python编写一个自然语言处理的程序，并详细介绍其实现过程。|
|大数据技术|您认为哪些大数据技术在未来几年内将变得更加流行？|
|机器学习算法|什么是K-Means聚类算法？它可以解决哪些问题？|
|人工智能应用|请举例说明人工智能在医疗保健领域有哪些应用。|
|数据库优化|如何通过修改查询语句来优化数据库性能？|
|深度学习模型|请介绍一种常用的深度学习模型结构，并说明其适用场景和优缺点。|
|数据清洗|请列举至少三种常见的数据清洗方法，并具体说明其操作步骤。|
|云计算安全|您认为云计算安全性如何？有哪些措施可以提高云计算的安全性？|
|推荐系统|请解释协同过滤推荐系统的工作原理，并列举至少两个具体的应用案例。|
|神经网络|什么是ResNet神经网络？它与其他类型的神经网络有什么不同？|
|音乐推荐|能否根据我最近喜欢的歌曲，推荐一些类似的音乐？|
|新闻分类|请将以下新闻按照国际、国内、娱乐、体育四个类别进行分类。|
|情感分析|请对以下评论进行情感分析，并给出积极或消极的评价：[评论内容]。|
|文章生成|请生成一篇关于环保的文章，字数不少于500字。|
|数据清洗|请对以下数据进行清洗：[数据集]，包括去重、空值处理等步骤。|
|问答生成|请回答以下问题：[问题]，注意回答要准确、简洁明了。|
|语言翻译|请将以下英文翻译成中文：[英文文本]。|
|文本编辑|请修改以下文章，使其更加通顺、易读：[文章内容]。|
|抽取式摘要|请根据以下文章，提取出其中的核心内容：[文章内容]。|
|对话生成|请与机器人进行一次自然对话，探讨你最近的兴趣爱好。|
|自然语言处理|请简要介绍一下什么是自然语言处理？|
|疫情数据|根据最新的疫情数据，请问全球累计确诊人数和死亡人数分别是多少？|
|文学创作|请用五个词语描述夏天的感觉，并将其转化成一个句子。|
|自然灾害|请问南美洲最近一次地震的发生时间、地点和震级大小分别是什么？|
|音乐推荐|能否推荐近期值得一听的华语歌曲？|
|历史事件|请问第二次世界大战开始于哪一年，由哪些国家组成的阵营参战？|
|健康饮食|怎样搭配膳食可以帮助降低血压？|
|电影推荐|有没有关于爱情与奋斗的好看的电影？|
|股票投资|请问目前纳斯达克指数的涨幅是多少？|
|环保科技|有哪些应用了环保科技的企业或项目值得关注？|
| 电影推荐               | 请推荐一部类型为科幻的好看电影。                                                                                |
| 菜谱查


           nfloat minx = rect.Left;
            nfloat midx = rect.Left + (rect.Width)/2;
            nfloat maxx = rect.Right;
            nfloat miny = rect.Top;
            nfloat midy = rect.Y+rect.Size.Height/2;
            nfloat maxy = rect.Bottom;

            var path = new CGPath ();
            path.MoveToPoint (minx, midy);
            path.AddArcToPoint (minx, miny, midx, miny, radius);
            path.AddArcToPoint (maxx, miny, maxx, midy, radius);
            path.AddArcToPoint (maxx, maxy, midx, maxy, radius);
            path.AddArcToPoint (minx, maxy, minx, midy, radius);
            path.CloseSubpath ();

            return path;
        }

        public static void FillRoundedRect (CGContext ctx, CGRect rect, float radius)
        {
                var p = Graphics.MakeRoundedRectPath (rect, radius);
                ctx.AddPath (p);
                ctx.FillPath ();
        }

        public static CGPath MakeRoundedPath (float size, float radius)
        {
            float hsize = size/2;

            var path = new CGPath ();
            path.MoveToPoint (size, hsize);
            path.AddArcToPoint (size, size, hsize, size, radius);
            path.AddArcToPoint (0, size, 0, hsize, radius);
            path.AddArcToPoint (0, 0, hsize, 0, radius);
            path.AddArcToPoint (size, 0, size, hsize, radius);
            path.CloseSubpath ();

            return path;
        }
    }
}


if (isValid(value)) return format(value, prettyDateFormat);
  else return "";
};

export const printPrettyTime = (value: any): string => {
  if (typeof value === "string") {
    return printPrettyTime(strToDate(value));
  }
  if (isValid(value)) return format(value, "p");
  else return "";
};

export const strToDate = (str: string): Date | null => {
  try {
    return parseISO(str);
  } catch (e) {
    return null;
  }
};

import * as redux from 'redux';
import * as state from '../../reducers'

import { CounterCommand, CounterCommands } from '../../actions/CounterSaga'
import { FetchCommand } from '../../actions/ValuesSaga'

export type AttributeProps = {} & {
    name: string
}

export type StateProps = {} & {
    counter?: number
}

export type ConnectedDispatch = {} & {
    increment?: (name:string) => void
    decrement?: (name:string) => void
}

export const mapStateToProps = (state1: state.All, ownProps: AttributeProps): StateProps => ({
  counter: state1.counters[ownProps.name]
})

export const mapDispatchToProps = (dispatch: redux.Dispatch<FetchCommand | CounterCommand>): ConnectedDispatch => ({
  decrement: (name:string) => dispatch(CounterCommands.decrementCounter(name)),
  increment: (name:string) => dispatch(CounterCommands.incrementCounter(name)),
})
/**
 * @since 1.0.0
 */
import * as fc from 'fast-check'
import { Eq } from 'fp-ts/lib/Eq'

import { HasZero } from './HasZero'

declare const NON_ZERO: unique symbol

/**
 * The type of values not equal to `zero`
 * @since 1.0.0
 */
export type NonZero = A & { readonly [NON_ZERO]: typeof NON_ZERO }

/**
 * @since 1.0.0
 */
export function isNonZero(T: Eq & HasZero): (a: A) => a is NonZero {
  return (a: A): a is NonZero => !T.equals(T.zero, a)
}

/**
 * @since 1.0.0
 */
export function arbitraryNonZero(
  T: Eq & HasZero
): (arb: fc.Arbitrary) => fc.Arbitrary<NonZero> {
  return (arb) => arb.filter(isNonZero(T))
}
/**
 *
A lifecycle rule that deletes application versions after the specified number of days.

 */
export interface _MaxAgeRule {
  /**
   *
Specify true to apply the rule, or false to disable it.

   */
  Enabled: boolean;

  /**
   *
Specify the number of days to retain an application versions.

   */
  MaxAgeInDays?: number;

  /**
   *
Set to true to delete a version's source bundle from Amazon S3 when Elastic Beanstalk deletes the application version.

   */
  DeleteSourceFromS3?: boolean;
}

export type _UnmarshalledMaxAgeRule = _MaxAgeRule;
import {
  CreateLocationStyleInput,
  UpdateLocationStyleInput
} from '../generated/graphql';
import {
  CreateMutationPayload,
  DeleteMutationPayload,
  ResolverContextBase,
  UpdateMutationPayload
} from '../types/graphql';
import { LocationStyleDBScheme } from './locations';
import emptyMutation from '../utils/emptyMutation';
import { ObjectId } from 'mongodb';
import { UserInputError } from 'apollo-server-express';
import mergeWithCustomizer from '../utils/mergeWithCustomizer';

const LocationStyleMutations = {
  /**
   * Create new location style
   *
   * @param parent - this is the return value of the resolver for this field's parent
   * @param args - contains all GraphQL arguments provided for this field
   * @param context - this object is shared across all resolvers that execute for a particular operation


_ANNOTATIONS);
    }
  }
};

/**
 * Applies both X and Y zooms.
 */
anychart.core.CartesianBase.prototype.applyComplexZoom = function() {
  if (this.hasInvalidationState(anychart.ConsistencyState.CARTESIAN_ZOOM)) {
    this.applyXZoom(true);
    this.applyYZoom(true);

    this.invalidate(
        anychart.ConsistencyState.CARTESIAN_X_SCROLLER |
        anychart.ConsistencyState.CARTESIAN_Y_SCROLLER |
        anychart.ConsistencyState.AXES_CHART_ANNOTATIONS);
  }
};

/** @inheritDoc */
anychart.core.CartesianBase.prototype.calculate = function() {
  anychart.core.CartesianBase.base(this, 'calculate');
  // mark ZOOM as calculated and applied (in ChartWithOrthogonalScales#calculate)
  this.markConsistent(anychart.ConsistencyState.CARTESIAN_ZOOM);
};

/** @inheritDoc */
anychart.core.CartesianBase.prototype.getZoomStartRatio = function() {
  return this.xZoom_.getStartRatio();
};

/** @inheritDoc */
anychart.core.CartesianBase.prototype.getZoomEndRatio = function() {
  return this.xZoom_.getEndRatio();
};

//endregion
//region --- Drawing
//----------------------------------------------------------------------------------------------------------------------
//
//  Drawing
//
//----------------------------------------------------------------------------------------------------------------------
/** @inheritDoc */
anychart.core.CartesianBase.prototype.getBoundsChangedSignal = function() {
  return anychart.core.CartesianBase.base(this, 'getBoundsChangedSignal') |
      anychart.ConsistencyState.CARTESIAN_X_SCROLLER |
      anychart.ConsistencyState.CARTESIAN_Y_SCROLLER;
};

/** @inheritDoc */
anychart.core.CartesianBase.prototype.drawElements = function() {
  anychart.core.CartesianBase.base(this, 'drawElements');
  if (this.hasInvalidationState(anychart.ConsistencyState.CARTESIAN_X_SCROLLER)) {
    this.xScroller().container(this.rootElement);
    this.xScroller().draw();
    this.markConsistent(anychart.ConsistencyState.CARTESIAN_X_SCROLLER);
  }

  if (this.hasInvalidationState(anychart.ConsistencyState.CARTESIAN_Y_SCROLLER)) {
    this.yScroller().container(this.rootElement);
    this.yScroller().draw();
    this.markConsistent(anychart.ConsistencyState.CARTESIAN_Y_SCROLLER);
  }
};

//endregion
//region --- CSV
//------------------------------------------------------------------------------
//
//  CSV
//
//------------------------------------------------------------------------------
/** @inheritDoc */
anychart.core.CartesianBase.prototype.shouldAddCsvRow = function(mode, series, x) {
  var xScale = this.getCsvSourceXScale(series);
  var left = xScale.transform(x, 0);
  var right = xScale.transform(x, 1);
  return mode != anychart.enums.ChartDataExportMode.SELECTED ||
      (Math.min(left, right) <= 1 && Math.max(left, right) >= 0);
};

/**
 * @param {*} series
 * @return {anychart.scales.IXScale}
 * @protected
 */
anychart.core.CartesianBase.prototype.getCsvSourceXScale = function(series) {
  return (/** @type {anychart.core.series.Base} */(series)).getXScale();
};

//endregion
//region --- Serialization / Deserialization / Disposing
//-------------------------------------------------------------------------------------------------------------


,	'',	'',	'',	'',	'',	'',	'',	'100000,5030002',	'',	'1',	'2',	'1',	'%s',	'',	'',	'',	'6',	'',	'',	'',	'',	'',	'',	'',	'',	'2081386',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'2081386',	'',	'从一开始，你们要做的就不是二选一。',	'',	'',	'',	'',	'',	'',	'',	'',	'100000,5030002',	'',	'1',	'2',	'1',	'%s',	'',	'',	'',	'6',	'',	'',	'',	'',	'',	'',	'',	'',	'2081387',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'2081387',	'',	'我……能做得好吗？',	'',	'',	'',	'',	'',	'',	'',	'',	'5030002',	'',	'',	'2',	'',	'刺蝽',	'Reduvia',	'',	'',	'12',	'',	'',	'',	'',	'',	'',	'',	'',	'2081388',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'2081388',	'',	'我相信如果是你的话，一定可以。',	'',	'',	'',	'',	'',	'',	'',	'',	'100000,5030002',	'',	'1',	'2',	'1',	'%s',	'',	'',	'',	'12',	'',	'',	'',	'',	'',	'',	'',	'',	'2081389',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'2081389',	'',	'但你不需要什么都勉强自己，哪怕是大人也会依靠其他人。',	'',	'',	'',	'',	'',	'',	'',	'',	'100000,5030002',	'',	'1',	'2',	'1',	'%s',	'',	'',	'',	'12',	'',	'',	'',	'',	'',	'',	'',	'',	'2081390',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'2081390',	'',	'小财迷、安娜，还是其他居民……包括我在内。',	'',	'',	'',	'',	'',	'',	'',	'',	'100000,5030002',	'',	'1',	'2',	'1',	'%s',	'',	'',	'',	'12',	'',	'',	'',	'',	'',	'',	'',	'',	'2081391',	'',	'',	'',	'',	'',	'


+7d8a, U+7d90, U+7da5, U+7db6, U+7dc8, U+7deb, U+7ded, U+7df8, U+7dff-7e00, U+7e06, U+7e18-7e19, U+7e2c, U+7e4e, U+7e5d, U+7e64, U+7e66, U+7e71, U+7e85, U+7e89, U+7e9d, U+7f3b, U+7f59, U+7f64, U+7f6f, U+7f80, U+7f84, U+7f90, U+7f98, U+7fab, U+7fc4, U+7fc6, U+7fc8, U+7fd3, U+7fd6, U+7fe4, U+7ff6, U+8009-800a, U+8013, U+801a, U+8023, U+802b, U+802d, U+803a, U+8044-8045, U+8049, U+804e;
}
/* [t2/kx_13] (501) */
@font-face {
  font-family: 'Chiron Hei HK WS';
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url('../woff2/vf-italic/t2/kx_13.woff2') format('woff2-variations'), url('../woff2/vf-italic/t2/kx_13.woff2') format('woff2 supports variations');
  unicode-range: U+8055, U+8057, U+8059, U+8060, U+8065, U+806d, U+807a-807b, U+8081, U+8088, U+808d-808e, U+8091, U+8094, U+8097, U+809e, U+80a6, U+80ac, U+80b3, U+80b9, U+80bb, U+80d2-80d3, U+80df, U+80e2, U+8104, U+811c, U+8120, U+8128, U+812e, U+813b-813c, U+813f-8141, U+8145, U+8149, U+8157, U+815d, U+815f, U+8163, U+8168, U+816a, U+8175, U+8185, U+8190, U+8192, U+8196, U+81a1, U+81cb, U+81ce, U+81d4, U+81eb, U+81f0-81f1, U+81f5, U+8203, U+820f, U+8213, U+8219, U+8227, U+8241, U+8243, U+8246, U+824a, U+824c, U+8267, U+8281, U+8286, U+828c, U+8295-8296, U+82b2, U+82ce, U+82da, U+82dd, U+82e9, U+830a, U+831f, U+8321, U+8323, U+832e, U+8330, U+833e, U+8355, U+8370-8372, U+8379, U+8382, U+8384, U+83a1, U+83ad, U+83d0, U+83d2, U+83da, U+83e6, U+83f7, U+8400, U+8402,


15-2.746-.956.597-2.03.955-3.105 1.194-1.79-2.03-4.895-2.15-6.925-.239-1.314 1.194-1.91 2.985-1.433 4.776C7.88 5.9 4.299 3.988 1.79 1.003a4.305 4.305 0 0 0-.716 2.388c0 1.672.835 3.105 2.149 4.06-.717 0-1.433-.12-2.15-.597v.12c0 2.268 1.672 4.298 3.94 4.775-.477.12-.835.24-1.313.24-.358 0-.597 0-.955-.12.597 2.03 2.508 3.343 4.538 3.343-1.672 1.313-3.821 2.15-6.09 2.15-.358 0-.836 0-1.194-.12 2.269 1.433 4.896 2.268 7.522 2.268 7.642.12 13.851-6.089 13.97-13.73v-.837c1.075-.716 1.911-1.552 2.508-2.507Z" fill="#999"></path></svg>
<svg width="24" height="20" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M24 2.436c-.955.358-1.791.597-2.866.716 1.075-.597 1.791-1.552 2.15-2.746-.956.597-2.03.955-3.105 1.194-1.79-2.03-4.895-2.15-6.925-.239-1.314 1.194-1.91 2.985-1.433 4.776C7.88 5.9 4.299 3.988 1.79 1.003a4.305 4.305 0 0 0-.716 2.388c0 1.672.835 3.105 2.149 4.06-.717 0-1.433-.12-2.15-.597v.12c0 2.268 1.672 4.298 3.94 4.775-.477.12-.835.24-1.313.24-.358 0-.597 0-.955-.12.597 2.03 2.508 3.343 4.538 3.343-1.672 1.313-3.821 2.15-6.09 2.15-.358 0-.836 0-1.194-.12 2.269 1.433 4.896 2.268 7.522 2.268 7.642.12 13.851-6.089 13.97-13.73v-.837c1.075-.716 1.911-1.552 2.508-2.507Z" fill="#234999"></path></svg>
<svg width="24" height="25" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M22.191 0H1.809C.844 0 0 .724 0 1.688v20.624c0 1.085.844 1.809 1.809 1.809h20.382c.965 0 1.809-.724 1.809-1.689V1.688C24 .724 23.156 0 22.191 0ZM7.236 20.14H3.618V9.287h3.618v10.855ZM5.427 7.84c-.965 0-1.809-.845-1.809-1.93 0-1.086.844-1.93 1.93-1.93 1.085-.12 1.93.603 2.05 1.688.12 1.086-.724 2.05-1.688 2.171h-.483Zm14.955 12.3h-3.618v-5.788c0-1.447-.483-2.412-1.81-2.412-.843 0-1.567.482-1.808 1.326-.12.242-.12.603-.12.845v6.03H9.406V9.286h3.618v1.568c.724-1.206 1.93-1.809 3.256-1.809 2.413 0 4.222 1.568 4.222 4.945v6.15h-.121Z" fill="#999"></path></svg><div class="ArticleEx


 id="1"><name>Joe</name><age>20</age></employee>;

x = emps.copy();

emps += <employee id="2"><name>Sue</name><age>32</age></employee>;

TEST(4, correct, x);

END();/* -*- Mode: javascript; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

gTestfile = '11.1.2.js';

START("11.1.2 - Qualified Identifiers");

x =
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <soap:Body>
        <m:getLastTradePrice xmlns:m="http://mycompany.com/stocks">
            <symbol>DIS</symbol>
        </m:getLastTradePrice>
    </soap:Body>
</soap:Envelope>;

soap = new Namespace("http://schemas.xmlsoap.org/soap/envelope/");
stock = new Namespace("http://mycompany.com/stocks");

encodingStyle = x.@soap::encodingStyle;
TEST_XML(1, "http://schemas.xmlsoap.org/soap/encoding/", encodingStyle);

correct =
<soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <m:getLastTradePrice xmlns:m="http://mycompany.com/stocks">
        <symbol>DIS</symbol>
    </m:getLastTradePrice>
</soap:Body>;

body = x.soap::Body;
TEST_XML(2, correct.toXMLString(), body);

body = x.soap::["Body"];
TEST_XML(3, correct.toXMLString(), body);

q = new QName(soap, "Body");
body = x[q];
TEST_XML(4, correct.toXMLString(), body);

correct =
<symbol xmlns:m="http://mycompany.com/stocks" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">MYCO</symbol>;

x.soap::Body.stock::getLastTradePrice.symbol = "MYCO";
TEST_XML(5, correct.toXMLString(), x.soap::Body.stock::getLastTradePrice.symbol);

END();
/* -*- Mode: javascript; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

gTestfile = '11.1.4.js';

START("11.1.4 - XML Initializer");

person = <person><name>John</name><age>25</age></person>;
TEST(1, <person><name>John</name><age>25</age></person>, person);

e = <employees>
    <employee id = "1"><name>Joe</name><age>20</age></employee>
    <employee id = "2"><name>Sue</name><age>30</age></employee>
    </employees>;

TEST_XML(2, 1, e.employee[0].@id);

correct = <name>Sue</name>;
TEST(3, correct, e.employee[1].name);

names = new Array();
names[0] = "Alpha";
names[1] = "Bravo";
names[2] = "Charlie";
names[3] = "Delta";
name


-popup {
    padding: 0 15px;
}

.main .search-form.form-inline.navbar-right {
    display: none;
}

/* ie image display for apps */
.noImage {
    display: none;
}

/*/

/* feedback  Web form */
.customcontactform {
    padding-top: 5px;

}

.customcontactform input[type='text'] {
    /*width: 50%;*/
    margin: 3px 10px 10px 0px;

}

.customcontactform input[type='checkbox'] {

    margin: 3px 10px 10px 0px;

}

.customcontactform label {
    display: block;
    width: 50%;
    font-weight: bold;

}

.customcontactform textarea {

    width: 50%;
    resize: none;
    overflow-y: hidden;
    margin: 3px 10px 10px 0px;
}

.page-id-41582 .customcontactform label.select {
    display: inline;
    font-weight: inherit;
    color: inherit;
    margin: 10px 10px 10px 0px;

}

.customcontactform select {
    margin: 3px 10px 10px 0px;

}

.customcontactform label.required {
    color: #FF0000;

}

.customcontactform h4 {
    display: none;
}

.customcontactform input.submit {

    background: none repeat scroll 0 0 #294B78;
    border: medium none #033162;
    border-radius: 5px 5px 5px 5px;
    color: #FFFFFF;
    display: inline-block;
    font-family: Myriad, Helvetica, Tahoma, Arial, sans-serif !important;
    font-size: 11px;
    font-weight: bold;
    min-height: 25px;
    line-height: 25px;
    margin: 8px 2px;
    margin-left: 0px;
    padding: 0 5px;
    vertical-align: middle;
    font-size: 60%;

}

/* End Web form */

/* Finance form styles */

.page-id-129965 .customcontactform {
    padding-top: 5px;

}

.page-id-129965 .customcontactform input[type='text'] {
    /*  width: 50%;*/
    margin: 3px 10px 10px 0px;

}

.page-id-129965 .customcontactform input[type='checkbox'] {

    margin: 3px 10px 10px 0px;

}

.page-id-129965 .customcontactform label {
    display: block;
    width: 50%;
    font-weight: bold;

}

.page-id-129965 .customcontactform textarea {

    width: 50%;
    resize: none;
    overflow-y: hidden;
    margin: 3px 10px 10px 0px;
}

.page-id-129965 .customcontactform label.select {
    display: inline;
    font-weight: inherit;
    color: inherit;
    margin: 10px 10px 10px 0px;

}

.page-id-129965 .customcontactform select {
    margin: 3px 10px 10px 0px;

}

.page-id-129965 .customcontactform label.required {
    color: #FF0000;

}

.page-id-129965 .customcontactform h4 {
    display: none;
}

.page-id-129965 .customcontactform input.submit {

    background: none repeat scroll 0 0 #294B78;
    border: medium none #033162;
    border-radius: 5px 5px 5px 5px;
    color: #FFFFFF;
    display: inline-block;
    font-family: Myriad, Helvetica, Tahoma, Arial, sans-serif !important;
    font-size: 11px !important;
    font-we


9057v1#bib.bib34" title="">1994) allows us to express <math alttext="G" class="ltx_Math" display="inline" id="S2.SS3.SSS4.p1.6.m1.1"><semantics id="S2.SS3.SSS4.p1.6.m1.1a"><mi id="S2.SS3.SSS4.p1.6.m1.1.1" xref="S2.SS3.SSS4.p1.6.m1.1.1.cmml">G</mi><annotation-xml encoding="MathML-Content" id="S2.SS3.SSS4.p1.6.m1.1b"><ci id="S2.SS3.SSS4.p1.6.m1.1.1.cmml" xref="S2.SS3.SSS4.p1.6.m1.1.1">𝐺</ci></annotation-xml><annotation encoding="application/x-tex" id="S2.SS3.SSS4.p1.6.m1.1c">G</annotation><annotation encoding="application/x-llamapun" id="S2.SS3.SSS4.p1.6.m1.1d">italic_G</annotation></semantics></math> as

<math alttext="\displaystyle G(\mu,\sigma^{2})" class="ltx_Math" display="inline" id="S2.Ex4.m1.2"><semantics id="S2.Ex4.m1.2a"><mrow id="S2.Ex4.m1.2.2" xref="S2.Ex4.m1.2.2.cmml"><mi id="S2.Ex4.m1.2.2.3" xref="S2.Ex4.m1.2.2.3.cmml">G</mi><mo id="S2.Ex4.m1.2.2.2" xref="S2.Ex4.m1.2.2.2.cmml"></mo><mrow id="S2.Ex4.m1.2.2.1.1" xref="S2.Ex4.m1.2.2.1.2.cmml"><mo id="S2.Ex4.m1.2.2.1.1.2" stretchy="false" xref="S2.Ex4.m1.2.2.1.2.cmml">(</mo><mi id="S2.Ex4.m1.1.1" xref="S2.Ex4.m1.1.1.cmml">μ</mi><mo id="S2.Ex4.m1.2.2.1.1.3" xref="S2.Ex4.m1.2.2.1.2.cmml">,</mo><msup id="S2.Ex4.m1.2.2.1.1.1" xref="S2.Ex4.m1.2.2.1.1.1.cmml"><mi id="S2.Ex4.m1.2.2.1.1.1.2" xref="S2.Ex4.m1.2.2.1.1.1.2.cmml">σ</mi><mn id="S2.Ex4.m1.2.2.1.1.1.3" xref="S2.Ex4.m1.2.2.1.1.1.3.cmml">2</mn></msup><mo id="S2.Ex4.m1.2.2.1.1.4" stretchy="false" xref="S2.Ex4


f = np.outer(((xi-xj)/(L**2)), ((xi-xj)/(L**2)))

                            rhs = dKXgXgdL[i, j] * \
                                (-diff + np.diag(1/L**2))  # Rechte Seite

                            #Geprüft mit Mathematica
                            mat = np.zeros((D3, D3))
                            Lcurr = L[dim]
                            tmp = diff[dim, :]*(1/Lcurr)
                            tmp = -2*tmp
                            tmp[dim] = 2*tmp[dim]
                            mat[dim, :] = tmp.reshape((1, -1))
                            valind = mat[dim, dim]
                            mat = mat+mat.T
                            mat[dim, dim] = mat[dim, dim]-valind

                            tt[dim, dim] = -2/currL**3

                            lhs = KXgXg[i, j] * (mat-tt)

                            res = rhs-lhs
                            'Build the matrix'
                            tmplist.append(res)

                        'Form final matrix'
                        colXgXg.append(np.hstack(tmplist))

                        'Clear up'
                        tmplist = []

                    dXgXgdL = np.vstack(colXgXg)
                    colXgXg = []

                    #Concatenate matrices
                    dKtildedL = np.concatenate((dKdL, dKXXgdL), axis=1)
                    dKtildedL = np.concatenate((dKtildedL, np.concatenate(
                        (np.transpose(dKXXgdL), dXgXgdL), axis=1)), axis=0)

                    dpdL[dim] = -0.5 * np.trace((np.outer(alpha, alpha) - invK)@dKtildedL)

# =============================================================================
#             elif jj == 1:
#
#                 Kt = np.concatenate((KYY, KXtXgrad), axis=1)
#                 Kt = np.concatenate((Kt, np.concatenate((np.transpose(KXtXgrad), Kfdy), axis=1)), axis=0)
#                 dKdsigma = 2 * Kt
#
#                 """ Calculate alpha, dK/dsigma """
#                 invK = np.linalg.inv(K)
#                 alpha = invK@ytilde.T
#
#                 """ dp / dsigma """
#                 dpdsigma = -0.5*np.trace((np.outer(alpha, alpha) - invK)@dKdsigma)
# =============================================================================

        #jacobi = dpdL.reshape(D2, -1)
        #return jacobi
        return dpdL


ATTACK:
			case CMD_MANUALFIRE: {
				if (ci->GetNumParams() == 1) {
					const CUnit* unit = GetTrackableUnit(owner, unitHandler.GetUnit(ci->GetParam(0)));

					if (unit != nullptr)
						lineDrawer.DrawLineAndIcon(cmdID, unit->GetObjDrawErrorPos(owner->allyteam), cmdColors.attack);

				} else {
					assert(ci->GetNumParams() >= 3);

					const float x = ci->GetParam(0);
					const float z = ci->GetParam(2);
					const float y = CGround::GetHeightReal(x, z, false) + 3.0f;

					lineDrawer.DrawLineAndIcon(cmdID, float3(x, y, z), cmdColors.attack);
				}
			} break;

			case CMD_WAIT: {
				DrawWaitIcon(*ci);
			} break;
			case CMD_SELFD: {
				lineDrawer.DrawIconAtLastPos(cmdID);
			} break;

			default: {
				DrawDefaultCommand(*ci, owner);
			} break;
		}
	}

	lineDrawer.FinishPath();
}

void CommandDrawer::DrawAirCAICommands(const CAirCAI* cai, int queueDrawDepth) const
{
	const CUnit* owner = cai->owner;
	const CCommandQueue& commandQue = cai->commandQue;

	if (queueDrawDepth <= 0)
		queueDrawDepth = commandQue.size();

	lineDrawer.StartPath(owner->GetObjDrawMidPos(), cmdColors.start);

	if (owner->selfDCountdown != 0)
		lineDrawer.DrawIconAtLastPos(CMD_SELFD);

	for (auto ci = commandQue.begin(); ci != commandQue.end(); ++ci) {
		if (std::distance(commandQue.begin(), ci) > queueDrawDepth)
			break;

		const int cmdID = ci->GetID();

		switch (cmdID) {
			case CMD_MOVE: {
				lineDrawer.DrawLineAndIcon(cmdID, ci->GetPos(0), cmdColors.move);
			} break;
			case CMD_FIGHT: {
				lineDrawer.DrawLineAndIcon(cmdID, ci->GetPos(0), cmdColors.fight);
			} break;
			case CMD_PATROL: {
				lineDrawer.DrawLineAndIcon(cmdID, ci->GetPos(0), cmdColors.patrol);
			} break;

			case CMD_ATTACK: {
				if (ci->GetNumParams() == 1) {
					const CUnit* unit = GetTrackableUnit(owner, unitHandler.GetUnit(ci->GetParam(0)));

					if (unit != nullptr)
						lineDrawer.DrawLineAndIcon(cmdID, unit->GetObjDrawErrorPos(owner->allyteam), cmdColors.attack);

				} else {
					assert(ci->GetNumParams() >= 3);

					const float x = ci->GetParam(0);
					const float z = ci->GetParam(2);
					const float y = CGround::GetHeightReal(x, z, false) + 3.0f;

					lineDrawer.DrawLineAndIcon(cmdID, float3(x, y, z), cmdColors.attack);
				}
			} break;

			case CMD_AREA_ATTACK: {
				const float3& endPos = ci->GetPos(0);

				lineDrawer.DrawLineAndIcon(cmdID, endPos, cmdColors.attack);
				lineDrawer.Break(endPos, cmdColors.attack);

				glSurfaceCircle(endPos, ci->GetParam(3), { cmdColors.attack }, cmdCircleResolution);

				lineDrawer.RestartWithColor(cmdColors.attack);
			} break;

			case CMD_GUARD: {
				const CUnit* unit = GetTrackableUnit(owner, unitHandler.GetUnit(ci->GetParam(0)));

				if (unit != nullptr)
					lineDrawer.DrawLineAndIcon(cmdID, unit->GetObjDrawError


TTI_uri';
import { RTTI_base64Binary } from '../Scalar/RTTI_base64Binary';
export enum Device_UdiCarrierEntryTypeKind {
	_barcode = 'barcode',
	_rfid = 'rfid',
	_manual = 'manual',
	_card = 'card',
	_selfReported = 'self-reported',
	_unknown = 'unknown'
}
import { createEnumType } from '../../EnumType';

export interface IDevice_UdiCarrier {
	/**
	 * Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
	 */
	id?: string;

	/**
	 * May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
	 */
	extension?: IExtension[];

	/**
                     * May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
                     */
	modifierExtension?: IExtension[];

	/**
	 * The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.
	 */
	deviceIdentifier?: string;

	/**
	 * Extensions for deviceIdentifier
	 */
	_deviceIdentifier?: IElement;

	/**
                     * Organization that is charged with issuing UDIs for devices.  For example, the US FDA issuers include :
1) GS1:
http://hl7.org/fhir/NamingSystem/gs1-di,
2) HIBCC:
http://hl7.org/fhir/NamingSystem/hibcc-dI,
3) ICCBBA for blood containers:
http://hl7.org/fhir/NamingSystem/iccbba-blood-di,
4) ICCBA for other devices:
http://hl7.org/fhir/NamingSystem/iccbba-other-di.
                     */
	issuer?: string;

	/**
	 * Extensions for issuer
	 */
	_issuer?: IElement;

	/**
	 * The identity of the authoritative source for UDI generation within a  jurisdiction.  All UDIs are globally unique within a single namespace with the appropriate repository uri as the system.  For example,  UDIs of devices managed in the U.S. by the FDA, the value is  http://hl7.org/fhir/NamingSystem/fda-udi.
	 */
	jurisdiction?: string;

	/**
	 * Extensions for jurisdiction
	 */
	_jurisdiction?: IElement;

	/**
	 * The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID.   Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.
	 */
	carrierAIDC?: string;

	/**
	 * Extensions for carrierAIDC
	 */
	_carrierAIDC?: IElement;

	/**
	 * The full UDI carrier as the human readable form (HRF) representation of the ba


nstruction.value / 90;
      const i = directions.indexOf(xWaypoint.action) + jumps;
      const j = directions.indexOf(yWaypoint.action) + jumps;
      xWaypoint.action = directions[i % directions.length];
      yWaypoint.action = directions[j % directions.length];
      if(xWaypoint.action !== 'E' && xWaypoint.action !== 'W'){
        let aux = xWaypoint;
        xWaypoint = yWaypoint;
        yWaypoint = aux;
      }
      break;
    case "F":
      const tmpX = xWaypoint.value * instruction.value;
      const tmpY = yWaypoint.value * instruction.value;
      if (xWaypoint.action === x.action) x.value += tmpX;
      else {
        x.action = xWaypoint.action;
        x.value = tmpX - x.value;
      }
      if (yWaypoint.action === y.action) y.value += tmpY;
      else {
        y.action = yWaypoint.action;
        y.value = tmpY - y.value;
      }
      break;
    default:
      console.log("Error in input");
      Deno.exit();
  }
  /* console.log( */
  /*   `Waypoint ${JSON.stringify(xWaypoint)}, ${JSON.stringify(yWaypoint)}` */
  /* ); */
  /* console.log(`Ship ${JSON.stringify(x)}, ${JSON.stringify(y)}`); */
  /* console.log("---------"); */
}
console.log(Math.abs(x.value) + Math.abs(y.value));
import Game from "./lib/birds/game";
import { constants } from "./constants";
import { Server } from "socket.io";

type GamesMap = {
  [key: string]: Game;
};

let games: GamesMap = {};

function getOrCreateGame(room: string) {
  if (!(room in games)) {
    let game = new Game();
    game.start();
    games[room] = game;
  }

  return games[room];
}

function deleteGame(room: string) {
  if (!(room in games)) {
    return;
  }

  games[room].stop();

  delete games[room];
}

const io = new Server(constants.SOCKET_PORT, {
  cors: { origin: "*" },
});

// On new client connection
io.sockets.on("connection", (socket) => {
  console.log("[connection]", `socket with id: ${socket.id} connected!`);

  const roomID = socket.handshake.query.roomID as string;

  if (roomID === "" || roomID === undefined) {
    socket.disconnect();

    return;
  }

  socket.on("close_game", () => {
    console.log("[close_game]", `deleting game with roomID of ${roomID}`);

    deleteGame(roomID);
  });

  getOrCreateGame(roomID).handle(socket);
});

console.log(`[🐤 socket.io] listening on port ${constants.SOCKET_PORT}`);
import { OrderStatusModel } from './enum.model';

/**
 * 單頭
 *
 * @export
 * @class OrderMasterModel
 */
export class OrderMasterModel {
  orderId: string = '';
  status: string = new OrderStatusModel().value;
  orderDate: Date;

  customerId: string = '';
  customerName: string = '';
  orderAddr: string = '';
  total: number = 0;
  salesmanId: string = '';
  salesmanName: string = '';
  gender: string = '';

  constructor(values: any) {
    Object.assign(this, values);
  }
}

/**
 * 單身
 */
export class OrderProductInfo {
  seq = 0;
  productCode = '';
  productName = '';
  distributionStatus = '1';
  distributionStatusDesc = '未出貨';
  price = 0;
  quantity = 0;
  subtotal = 0;

  constructor(object: any) {
    Object.assign(this, object);
  }
}
import { clone


content, Map<String, String> res) {
        int index = temp.indexOf("{");
        int endIndex = temp.indexOf("}") + 1;

        String next = temp.substring(endIndex).trim();
        int nextContain= next.indexOf("{");
        String nexIndexValue = next;
        if (nextContain != -1) {
            nexIndexValue = next.substring(0, nextContain);
        }
        String key = temp.substring(index + 1, endIndex - 1);

        int valueLastIndex;
        if ("".equals(nexIndexValue)) {
            valueLastIndex = content.length();
        } else {
            valueLastIndex = content.indexOf(nexIndexValue);
        }
        String value = content.substring(index, valueLastIndex).trim();
        res.put(key, value);

        if (nextContain != -1) {
            reverTemplate(next, content.substring(content.indexOf(value)  + value.length(), content.length()).trim(), res);
        }
    }
}
package mayfly.core.util;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAccessor;

/**
 * 日期工具类
 *
 * @author hml
 * @version 1.0
 * @date 2018-11-07 10:56 AM
 */
public final class DateUtils {

    public static DateTimeFormatter defaultDateFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd");

    public static DateTimeFormatter defaultTimeFormat = DateTimeFormatter.ofPattern("HH:mm:ss");

    public static DateTimeFormatter defaultDateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

    /**
     * 格式化日期时间
     *
     * @param temporal  可以是LocalDateTime, LocalDate以及LocalTime等常用日期时间类
     * @param formatter 格式器
     * @return          格式化后日期字符串
     */
    public static String formatDate(TemporalAccessor temporal, DateTimeFormatter formatter) {
        return formatter.format(temporal);
    }

    /**
     * 使用默认格式解析日期时间

     * localDate格式为 yyyy-MM-dd

     * localTime格式为 HH:mm:ss

     * localDateTime格式为 yyyy-MM-dd HH:mm:ss

     *
     * @param temporalAccessor 可以是LocalDateTime, LocalDate以及LocalTime等常用日期时间类
     * @return   格式化后日期字符串
     */
    public static String defaultFormat(TemporalAccessor temporalAccessor) {
        if (temporalAccessor instanceof LocalDateTime) {
            return formatDate(temporalAccessor, defaultDateTimeFormatter);
        }
        if (temporalAccessor instanceof LocalDate) {
            return formatDate(temporalAccessor, defaultDateFormat);
        }
        if (temporalAccessor instanceof LocalTime) {
            return formatDate(temporalAccessor, defaultTimeFormat);
        }
        return null;
    }

    /**
     * 格式化日期时间
     *
     * @param temporal 可以是LocalDateTime, LocalDate以及LocalTime等常用日期时间类
     * @param pattern  yyyy:年 MM:月 dd:日 HH:小时 mm:分钟 ss:秒
     * @return 格式化后日期字符串
     */
    public static String formatDate(TemporalAccessor temporal, String pattern) {
        return formatDate(temporal, DateTimeFormatter.ofPattern(pattern));
    }

    /**
     * 默认解析字符串日期时间（yyyy-MM-dd HH:mm:ss）
     *
     * @param dateTime  字符串日期
     * @return  LocalDateTime
     */
    public static LocalDateTime defaultParse(String dateTime) {
        return LocalDateTime.parse(dateTime, defaultDateTimeFormatter);
    }
}
package mayfly.core.captcha;

import mayfly.core.captcha.base


, %f0, %f3
	stw		%r8, -0x8000 (%r9)
	fadds	%f0, %f0, %f4
	stfs	%f3, -0x8000 (%r9)
	fnmsubs	%f12, %f12, %f5, %f6
	fadds	%f11, %f11, %f1
	fneg	%f4, %f4
	fadds	%f2, %f0, %f2
	stfs	%f4, -0x8000 (%r9)
	stfs	%f12, -0x8000 (%r9)
	stfs	%f11, -0x8000 (%r9)
	stfs	%f2, -0x8000 (%r9)
	stfs	%f6, -0x8000 (%r9)
	sth		%r7, 2 (%r10)
	blr
2:	fmadds	%f1, %f11, %f11, %f1
	beq		1b
	fsubs	%f1, %f1, %f11
	b		1b

.globl GXSetViewportJitterTAAPatch1Length
GXSetViewportJitterTAAPatch1Length:
.long (. - GXSetViewportJitterTAAPatch1) / 4


bjectIdentifier,
	bindingPolicies []*v1alpha1.BindingPolicy) error {
	logger := klog.FromContext(ctx)
	for _, bindingPolicy := range bindingPolicies {
		if resolutionUpdated := c.bindingPolicyResolver.RemoveObjectIdentifier(bindingPolicy.GetName(),
			objIdentifier); resolutionUpdated {
			// enqueue binding to be synced since object was removed from its bindingpolicy's resolution
			logger.V(5).Info("Enqueuing Binding due to deletion of matching object", "bindingPolicy", bindingPolicy.Name, "object", objIdentifier)
			c.enqueueBinding(bindingPolicy.GetName())
		} else {
			logger.V(5).Info("Not enqueuing Binding due to deletion of non-matching object", "bindingPolicy", bindingPolicy.Name, "object", objIdentifier)
		}
	}

	return nil
}

// testObject tests if the object matches the given tests.
// The returned tuple is:
//   - bool: whether the object matches ANY of the tests
//   - bool: whether any test that matches the object also says CreateOnly==true
//   - sets.Set[string]: the UNION of the statuscollector names that appear within
//     EACH of the tests that the object matches
func (c *Controller) testObject(ctx context.Context, bindingName string, objIdentifier util.ObjectIdentifier, objLabels map[string]string,
	tests []v1alpha1.DownsyncPolicyClause) (bool, DownsyncModulation) {

	logger := klog.FromContext(ctx)

	var matched bool
	mod := ZeroDownsyncModulation()

	var objNS *corev1.Namespace
	for _, test := range tests {
		if test.APIGroup != nil && (*test.APIGroup) != objIdentifier.GVK.Group {
			continue
		}
		if len(test.Resources) > 0 && !(SliceContains(test.Resources, "*") ||
			SliceContains(test.Resources, objIdentifier.Resource)) {
			continue
		}
		if len(test.Namespaces) > 0 && !(SliceContains(test.Namespaces, "*") ||
			SliceContains(test.Namespaces, objIdentifier.ObjectName.Namespace)) {
			continue
		}
		if len(test.ObjectNames) > 0 && !(SliceContains(test.ObjectNames, "*") ||
			SliceContains(test.ObjectNames, objIdentifier.ObjectName.Name)) {
			continue
		}
		if len(test.ObjectSelectors) > 0 && !labelsMatchAny(c.logger, objLabels, test.ObjectSelectors) {
			continue
		}
		if len(test.NamespaceSelectors) > 0 && !ALabelSelectorIsEmpty(test.NamespaceSelectors...) {
			if objNS == nil {
				var err error
				objNS, err = c.namespaceClient.Get(ctx,
					objIdentifier.ObjectName.Namespace, metav1.GetOptions{})
				if err != nil {
					logger.V(3).Info("Object namespace not found, assuming object does not match",
						"object identifier", objIdentifier, "binding", bindingName)
					continue
				}
			}
			if !labelsMatchAny(logger, objNS.Labels, test.NamespaceSelectors) {
				continue
			}
		}

		klog.FromContext(ctx).V(5).Info("Workload object matched clause", "objIdentifier", objIdentifier, "objLabels", objLabels, "clause", test, "binding", bindingName)
		// test is a match
		matched = true
		mod.AddExternal(test.DownsyncModulation)
	}

	return matched, mod
}

func minInt(a, b int32) int32 {
	if a < b {
		return a
	}
	return b
}
/*
Copyright 2024 The KubeStellar Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

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

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

package metrics

import (
	"


dropImage: 'Αφήστε την εικόνα',
        selectFromFiles: 'Επιλογή από αρχεία',
        maximumFileSize: 'Μέγιστο μέγεθος αρχείου',
        maximumFileSizeError: 'Το μέγεθος είναι μεγαλύτερο από το μέγιστο επιτρεπτό.',
        url: 'URL',
        remove: 'Αφαίρεση',
        original: 'Original',
      },
      link: {
        link: 'Σύνδεσμος',
        insert: 'Εισαγωγή συνδέσμου',
        unlink: 'Αφαίρεση συνδέσμου',
        edit: 'Επεξεργασία συνδέσμου',
        textToDisplay: 'Κείμενο συνδέσμου',
        url: 'URL',
        openInNewWindow: 'Άνοιγμα σε νέο παράθυρο',
      },
      video: {
        video: 'Βίντεο',
        videoLink: 'Σύνδεσμος Βίντεο',
        insert: 'Εισαγωγή',
        url: 'URL',
        providers: '(YouTube, Vimeo, Vine, Instagram, DailyMotion or Youku)',
      },
      table: {
        table: 'Πίνακας',
        addRowAbove: 'Add row above',
        addRowBelow: 'Add row below',
        addColLeft: 'Add column left',
        addColRight: 'Add column right',
        delRow: 'Delete row',
        delCol: 'Delete column',
        delTable: 'Delete table',
      },
      hr: {
        insert: 'Εισαγωγή οριζόντιας γραμμής',
      },
      style: {
        style: 'Στυλ',
        normal: 'Κανονικό',
        blockquote: 'Παράθεση',
        pre: 'Ως έχει',
        h1: 'Κεφαλίδα 1',
        h2: 'συνδέσμου 2',
        h3: 'συνδέσμου 3',
        h4: 'συνδέσμου 4',
        h5: 'συνδέσμου 5',
        h6: 'συνδέσμου 6',
      },
      lists: {
        unordered: 'Αταξινόμητη λίστα',
        ordered: 'Ταξινομημένη λίστα',
      },
      options: {
        help: 'Βοήθεια',
        fullscreen: 'Πλήρης οθόνη',
        codeview: 'Προβολή HTML',
      },
      paragraph: {
        paragraph: 'Παράγραφος',
        outdent: 'Μείωση εσοχής',
        indent: 'Άυξηση εσοχής',
        left: 'Αριστερή στοίχιση',
        center: 'Στοίχιση στο κέντρο',
        right: 'Δεξιά στοίχιση',
        justify: 'Πλήρης στοίχιση',
      },
      color: {
        recent: 'Πρόσφατη επιλογή',
        more: 'Περισσότερα',
        background: 'Υπόβαθρο',
        foreground: 'Μπροστά',
        transparent: 'Διαφανές',
        setTransparent: 'Επιλογή διαφάνειας',


lder(parent);
      return builder;
    }
    /**
     * <pre>
     * CmdId: 27569
     * Obf: KAGMEJHECDK
     * </pre>
     *
     * Protobuf type {@code BeginCameraSceneLookNotify}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:BeginCameraSceneLookNotify)
        emu.grasscutter.net.proto.BeginCameraSceneLookNotifyOuterClass.BeginCameraSceneLookNotifyOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return emu.grasscutter.net.proto.BeginCameraSceneLookNotifyOuterClass.internal_static_BeginCameraSceneLookNotify_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return emu.grasscutter.net.proto.BeginCameraSceneLookNotifyOuterClass.internal_static_BeginCameraSceneLookNotify_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                emu.grasscutter.net.proto.BeginCameraSceneLookNotifyOuterClass.BeginCameraSceneLookNotify.class, emu.grasscutter.net.proto.BeginCameraSceneLookNotifyOuterClass.BeginCameraSceneLookNotify.Builder.class);
      }

      // Construct using emu.grasscutter.net.proto.BeginCameraSceneLookNotifyOuterClass.BeginCameraSceneLookNotify.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        entityId_ = 0;

        jBCEDEGCGFJ_ = false;

        aDPLABBOBKF_ = false;

        dOCBFPIPMPK_ = 0;

        if (lKGGBPLCEJIBuilder_ == null) {
          lKGGBPLCEJI_ = null;
        } else {
          lKGGBPLCEJI_ = null;
          lKGGBPLCEJIBuilder_ = null;
        }
        kJHLOCKMIMB_ = false;

        gJNLEMGJCJI_ = 0F;

        iPKFLPFLNNI_ = false;

        pDOCOOCFAIH_ = false;

        if (mMOMOKPCOJKBuilder_ == null) {
          mMOMOKPCOJK_ = null;
        } else {
          mMOMOKPCOJK_ = null;
          mMOMOKPCOJKBuilder_ = null;
        }
        fPDPEHICGAC_ = false;

        mIKBDFOBIBB_ = 0F;

        cLLOFLJICAF_ = 0F;

        otherParams_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000001);
        keepRotType_ = 0;

        fFHJPJBDLJC_ = false;

        duration_ = 0F;

        gEBMAIIKMBJ_ = 0;

        mCFGAPGPNLN_ = false;

        oJKGLFJCMID_ = 0F;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return emu.grasscutter.net.proto.BeginCameraSceneLookNotifyOuterClass.internal_static_BeginCameraSceneLookNotify_descriptor;
      }

      @java.lang.Override
      public emu.grasscutter.net.proto.BeginCameraSceneLookNotifyOuterClass.BeginCameraSceneLookNotify getDefaultInstanceForType() {
        return emu.grasscutter.net.proto.BeginCameraSceneLookNotifyOuterClass.BeginCameraSceneLookNotify.getDefaultInstance();
      }

      @java.lang.Override
      public emu.grasscutter.net.proto.BeginCameraSceneLookNotifyOuterClass.BeginCameraSceneLookNotify build() {


				if(File.Exists(strFile))
				{
					try
					{
						// Mono's WriteRecentlyUsedFiles method also loads the
						// XML file using XmlDocument
						XmlDocument xd = new XmlDocument();
						xd.Load(strFile);
					}
					catch(Exception) // The XML file is invalid
					{
						File.Delete(strFile);
					}
				}
			}
			catch(Exception) { Debug.Assert(false); }
		}
#endif // !KeePassUAP
	}
}


-right: 2.5%;}
	.form-group4 div:nth-child(2) {margin-right: 0;}
	.form-group4 div:nth-child(3) {margin-right: 2.5%;}
	.form-group4 div:nth-child(4) {margin-right: 0;}
	.form-group4 div:nth-child(5) {margin-right: 2.5%;}
	.form-group4 div:nth-child(6) {margin-right: 0;}
	.form-group4 div:nth-child(7) {margin-right: 2.5%;}
	.form-group4 div:nth-child(3) {margin-top: 10px;}
	.form-group4 div:nth-child(4) {margin-top: 10px;}
}/*! This file is auto-generated */
@font-face{font-family:dashicons;src:url(../wp-includes/fonts/dashicons.eot)}@font-face{font-family:dashicons;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAGYMAA4AAAAAowAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABRAAAABwAAAAcckwii0dERUYAAAFgAAAAHwAAACABMwAET1MvMgAAAYAAAABAAAAAYJYFacxjbWFwAAABwAAAAUEAAAKi6kAXkmdhc3AAAAMEAAAACAAAAAj//wADZ2x5ZgAAAwwAAFnuAACMgOFsk4doZWFkAABc/AAAAC4AAAA2DP0UgmhoZWEAAF0sAAAAGgAAACQPogeuaG10eAAAXUgAAAEHAAACFodAcgtsb2NhAABeUAAAAg4AAAIO/oLadm1heHAAAGBgAAAAHwAAACABWQC1bmFtZQAAYIAAAAGbAAADVi8qdoNwb3N0AABiHAAAA+cAAApGwPo//ndlYmYAAGYEAAAABgAAAAayr1bhAAAAAQAAAADMPaLPAAAAANMHHI4AAAAA0wdjLXjaY2BkYGDgA2IJBhBgYmBkYGRkBZIsYB4DAASNADkAeNpjYGY/xTiBgZWBhVWEZQMDA8M0CM20h8GIKQLIB0phB6He4X4MDqp/vrqzXwDxgaQGkGJEUqLAwAgANrQKyHja3ZC9SwNBEMXnkqgcuzcGxOIgxYGkuO78JMHmNMQkoCKmkIhI/GhiFRshXRoLO1vBv0U7tdFGFAzWaqXO7o426nkkYGFv44N5w4Ph92AAIAm9yYAVO1jHcbK6OWW1470GIfRBJvtBNg2RSyPkU0BTlKcCFalMNdqgBrVoX1nKVq7yVV6Falbb2tW+zuuKqZgVUzN10zAtc2COOMU2u+zzKOe4wKUoAojpQGkaJo+yMX2MchTG9BJVqU5btEttBSqp0spTQZdu6bT2dKBDUzZLXfqmaZq2OWTgfk6zxwGPc8jFKOoMDKbw


 int mSelectedOption;
    /** The time elapsed between while the game is saving and credits scrolling */
    public static int mTimer;
    /** The level header information */
    private Header mLevelHeader;
    /** The currently selected save file */
    private int mSelectedSaveFile;
    /** The name string for a new game folder */
    private String mNewGameName;
    /** Is the screen transitions being displayed */
    public boolean showTransition;
    /** The screen transition mode 0-horizontal, 1-vertical */
    private int mScreenTransitionMode;
    /** The time elapsed while showing a screen transition */
    private int mTransitionTimer;
    /** The text displayed in the credits screen */
    private ArrayList<String> mCreditsText;
    /** The amount the credits have scrolled in the y direction */
    private int mCreditScrollY;
    /** The pause while showing the level opening screen */
    private int mLevelOpenPause;

    /**
     * Constructs the UserInterface
     */
    public UserInterface() {
        mGameFont = new GameFont("main");
        mSpeechFont = new GameFont("speech");
        mNumbers = new SpriteSheet("res/gui/numbers.bmp", 16, 16, 10);
        mStatusIcons = new SpriteSheet("res/gui/status.bmp", 50, 17, 4);
        mSpeechBubble = new SpriteSheet("res/gui/speech.bmp", 16, 16, 7);
        mTitleLogo = new Image("res/gui/title.bmp").getImage();
        mPauseBackground = new Image("res/gui/pause.bmp").getImage();
        mLevelOpening = new Image("res/gui/level.bmp").getImage();
        mScreenTransition = new BufferedImage[2];
        mScreenTransition[0] = new Image("res/gui/transition1.bmp").getImage();
        mScreenTransition[1] = new Image("res/gui/transition2.bmp").getImage();
        setCharacter();

        mCreditsText = new ArrayList<String>();
        mCreditsText.add("Credits");
        mCreditsText.add("");
        mCreditsText.add("Programmer - Lawrence Schmid");

        try
        {
            BufferedReader input = new BufferedReader(new FileReader("res/gui/credits.txt"));
            String line = null;
            while ((line = input.readLine()) != null) {
                mCreditsText.add(line);
            }
            input.close();
        } catch (IOException ex) {}

        mLevelOpenPause = 180;
        mScreenTransitionMode = 1;
    }

    /**
     * Loads the main character icon based on the MainCharacter setting
     */
    public void setCharacter()
    {
        Image img = new Image("res/chr/" + Settings.MainCharacter + "/icon.bmp");
        mCharacterIcon = img.getImage();
    }

    /**
     * Draws the amount of remaining lives
     * @param g The graphics context
     * @param amount The amount of lives
     * @param x The x coordinate
     * @param y The y coordinate
     */
    public void drawLives(Graphics g, int amount, int x, int y) {
        //convert number into digits - http://stackoverflow.com/questions/5196186/split-int-value-into-seperate-digits
        int tmp = amount;
        int digit[] = new int[2];
        for (int i = 1; i >= 0; i--) {
            digit[i] = tmp % 10;
            tmp = tmp / 10;
        }
        g.drawImage(mCharacterIcon, x - 10, y + 1, null);
        g.drawImage(mStatusIco