 are the points simply having any levels in this job brings to a defense
		let baseDefenses = new Set<{affectedDefense: Defenses, baseValue: number}>();

		// These are the points each level of this job brings to a defense
		let defensesSet = new Set<{affectedDefense: Defenses, pointsPerLevel: number}>();
		defensesSet.add({affectedDefense: Defenses.ARM, pointsPerLevel: 1});
		defensesSet.add({affectedDefense: Defenses.COOL, pointsPerLevel: 3});
		defensesSet.add({affectedDefense: Defenses.END, pointsPerLevel: 3});
		defensesSet.add({affectedDefense: Defenses.MFORT, pointsPerLevel: 3});

		let basePools = new Set<{affectedPool: Pools, baseValue: number}>();
		// Humans don't have any base pool values.

		return new RacialJob("Human", baseAttributes, attributesSet,
			baseDefenses, defensesSet, basePools, 0, 7, 3, true);
	}
}export interface INode {
  id: number;
  parent?: number;
  children?: number[];
  question?: string;
  answer?: string;
}

export interface ITree {
  nodes: INode[];
}
export class BinaryStream  {
constructor failed: Big endian is not supported yet!';

	this.data = data;
	this.offset = 0;
};

/**
	Get the full length (in bytes) of the stream.
	@returns {Number} the length of the stream.
 */
constructor() {
	return this.data.length;
};

/**
	Get current position of the indicator.
	@returns {Number} current position in stream.
 */
tell() {
	return this.offset;
};

/**
	Set the position indicator of the stream to a new position.
	@param {Number} position the new position.
	@returns {Boolean} true if succeeded; false if the given position is out of range.
 */
seek(position) {
	if(position < 0 || position >= this.data.length)
		return false;

	this.offset = position;

	return true;
};

/**
	Reset the position indicator to the beginning of the stream.
 */
reset() {
	this.offset = 0;
};

/**
	Advance the position indicator to skip a given number of bytes.
	@param {Number} bytesToSkip the number of bytes to skip.
 */
skip(bytesToSkip) {
	if(this.offset + bytesToSkip > this.data.length)
		this.offset = this.data.length;
	else
		this.offset += bytesToSkip;
};

/**
	Get count of the remaining bytes in the stream.
	@returns {Number} the number of bytes from current position to the end of the stream.
 */
available() {
	return this.data.length - this.offset;
};

/**
	See if the position indicator is already at the end of the stream.
	@returns {Boolean} true if the position indicator is at the end of the stream; false if not.
 */
eof() {
	return !(this.offset < this.data.length);
};

/**
	Read an 8-bits' unsigned int number.
	@returns {Number} an 8-bits' unsigned int number, or NaN if any error occured.
 */
readUInt8() {
	return this.decodeInt(1, false);
};

/**
	Read an 8-bits' signed int number.
	@returns {Number} an 8-bits' signed int number, or NaN if any error occured.
 */
readInt8() {
	return this.decodeInt(1, true);
};

/**
	Read a 16-bits'


Groups[0].Tasks,
		must.Sprintf("test and jobspec mismatch"))

	for _, tc := range assertions {
		logFile := fmt.Sprintf("alloc/logs/%s.stdout.0", tc.task)
		fd, err := nomad.AllocFS().Cat(alloc, logFile, nil)
		must.NoError(t, err)
		logBytes, err := io.ReadAll(fd)
		must.NoError(t, err)
		logs := string(logBytes)

		ps := must.Sprintf("Task: %s Logs: <<EOF\n%sEOF", tc.task, logs)

		must.StrHasSuffix(t, "done\n", logs, ps)

		lines := strings.Split(logs, "\n")

		// Whether filepath is set or not, the log length assertion should
		// be the same, assuming the token was read from the correct location.
		// So we don't need special switch cases for filepath.
		switch {
		case tc.env && tc.file:
			must.Len(t, 4, lines, ps)

			// Parse the env first
			token := parseEnv(t, lines[1], ps)

			// Assert the file length matches
			n, err := strconv.Atoi(lines[0])
			must.NoError(t, err, ps)
			must.Eq(t, n, len(token), ps)

		case !tc.env && tc.file:
			must.Len(t, 3, lines, ps)

			// Assert the length is > 10
			n, err := strconv.Atoi(lines[0])
			must.NoError(t, err, ps)
			must.Greater(t, 10, n, ps)

		case tc.env && !tc.file:
			must.Len(t, 3, lines, ps)

			parseEnv(t, lines[0], ps)

		case !tc.env && !tc.file:
			must.Len(t, 2, lines, ps)
		}
	}

}

func parseEnv(t *testing.T, line string, ps must.Setting) string {
	must.StrHasPrefix(t, "NOMAD_TOKEN=", line, ps)
	token := strings.Split(line, "=")[1]
	must.Positive(t, len(token), ps)
	return token
}

// testNobody asserts that when task.user is set, the nomad_token file is owned
// by that user and has minimal permissions.
//
// Test assumes Client is running as root!
func testNobody(t *testing.T) {
	nomad := e2eutil.NomadClient(t)

	jobID := "nobodyid-" + uuid.Short()
	jobIDs := []string{jobID}
	t.Cleanup(e2eutil.CleanupJobsAndGC(t, &jobIDs))

	// start job
	allocs := e2eutil.RegisterAndWaitForAllocs(t, nomad, "./input/nobody.nomad", jobID, "")
	must.Len(t, 1, allocs)
	allocID := allocs[0].ID

	// wait for batch alloc to complete
	alloc := e2eutil.WaitForAllocStopped(t, nomad, allocID)
	must.Eq(t, alloc.ClientStatus, "complete")

	logFile := "alloc/logs/nobody.stdout.0"
	fd, err := nomad.AllocFS().Cat(alloc, logFile, nil)
	must.NoError(t, err)
	logBytes, err := io.ReadAll(fd)
	must.NoError(t, err)
	logs := string(logBytes)

	must.StrHasSuffix(t, "done\n", logs)

	lines := strings.Split(logs, "\n")
	must.Len(t, 3, lines)
	parts := strings.Split(lines[0], " ")
	stats := map[string]string{}
	for _, p := range parts {
		kvparts := strings.Split(p, "=")
		stats[kvparts[0]] = kvparts[1]
	}

	must.Eq(t,


 {
                    panic!(format!("{}",e));
                },
                Ok(a) => {
                    println!("a: {:?}",a);
                    // ddos start

                },
            }
        },
    };

    println!("Hello, world!");
}
use std::sync::Arc;

use block::Height;
use chrono::{TimeZone, Utc};
use futures::future::Either;
use proptest::{arbitrary::any, array, collection::vec, option, prelude::*};

use crate::LedgerState;
use crate::{
    amount::Amount,
    block,
    parameters::NetworkUpgrade,
    primitives::{Bctv14Proof, Groth16Proof, ZkSnarkProof},
    sapling, sprout, transparent,
};

use super::{JoinSplitData, LockTime, Memo, ShieldedData, Transaction};

impl Transaction {
    /// Generate a proptest strategy for V1 Transactions
    pub fn v1_strategy(ledger_state: LedgerState) -> BoxedStrategy<Self> {
        (
            transparent::Input::vec_strategy(ledger_state, 10),
            vec(any::<transparent::Output>(), 0..10),
            any::<LockTime>(),
        )
            .prop_map(|(inputs, outputs, lock_time)| Transaction::V1 {
                inputs,
                outputs,
                lock_time,
            })
            .boxed()
    }

    /// Generate a proptest strategy for V2 Transactions
    pub fn v2_strategy(ledger_state: LedgerState) -> BoxedStrategy<Self> {
        (
            transparent::Input::vec_strategy(ledger_state, 10),
            vec(any::<transparent::Output>(), 0..10),
            any::<LockTime>(),
            option::of(any::<JoinSplitData<Bctv14Proof>>()),
        )
            .prop_map(
                |(inputs, outputs, lock_time, joinsplit_data)| Transaction::V2 {
                    inputs,
                    outputs,
                    lock_time,
                    joinsplit_data,
                },
            )
            .boxed()
    }

    /// Generate a proptest strategy for V3 Transactions
    pub fn v3_strategy(ledger_state: LedgerState) -> BoxedStrategy<Self> {
        (
            transparent::Input::vec_strategy(ledger_state, 10),
            vec(any::<transparent::Output>(), 0..10),
            any::<LockTime>(),
            any::<block::Height>(),
            option::of(any::<JoinSplitData<Bctv14Proof>>()),
        )
            .prop_map(
                |(inputs, outputs, lock_time, expiry_height, joinsplit_data)| Transaction::V3 {
                    inputs,
                    outputs,
                    lock_time,
                    expiry_height,
                    joinsplit_data,
                },
            )
            .boxed()
    }

    /// Generate a proptest strategy for V4 Transactions
    pub fn v4_strategy(ledger_state: LedgerState) -> BoxedStrategy<Self> {
        (
            transparent::Input::vec_strategy(ledger_state, 10),
            vec(any::<transparent::Output>(), 0..10),
            any::<LockTime>(),
            any::<block::Height>(),
            any::<Amount>(),
            option::of(any::<ShieldedData>()),
            option::of(any::<JoinSplitData<Groth16Proof>>()),
        )
            .prop_map(
                |(
                    inputs,
                    outputs,


   },

        -- https://wiki.archlinux.org/title/Bluetooth
        bluetooth = {
            enable = true,
            service_name = "bluetooth",
            package = "bluez",
        },

        systemd_mount = {
            services = {
                data = configs.mount({
                    enable = false,
                    name = "mnt-data",
                    type = "cifs",
                    what = "//mmserver.lan/NAS1",
                    where = "/mnt/data",
                    description = "MMserverNAS1",
                    options =
                    "vers=2.1,credentials=/etc/samba/mmserver-cred,iocharset=utf8,rw,x-systemd.automount,uid=1000",
                    after = "network.target",
                    wanted_by = "multi-user.target",
                    automount = true,
                    automount_config = "TimeoutIdleSec=0",
                }),

                library = configs.mount({
                    enable = false,
                    name = "mnt-library",
                    type = "nfs",
                    what = "homenas2.lan:/data/Documents",
                    where = "/mnt/library/",
                    description = "Document library",
                    options = "noatime,x-systemd.automount,noauto",
                    after = "network.target",
                    wanted_by = "multi-user.target",
                    automount = true,
                    automount_config = "TimeoutIdleSec=600",
                })
            }
        },
    }
}


 CPM fee.
  /// Not applicable when the partner cost cost_type is one of: *
  /// `PARTNER_COST_TYPE_MEDIA_COST_DATA` * `PARTNER_COST_TYPE_DV360_FEE`.
  /// - "PARTNER_COST_FEE_TYPE_MEDIA_FEE" : The partner cost is a percentage
  /// surcharge based on the media cost. Not applicable when the partner
  /// cost_type is one of: * `PARTNER_COST_TYPE_SHOP_LOCAL` *
  /// `PARTNER_COST_TYPE_TRUST_METRICS` *
  /// `PARTNER_COST_TYPE_INTEGRAL_AD_SCIENCE_VIDEO` *
  /// `PARTNER_COST_TYPE_MOAT_VIDEO`.
  core.String? feeType;

  /// The invoice type for this partner cost.
  ///
  /// * Required when cost_type is one of: - `PARTNER_COST_TYPE_ADLOOX` -
  /// `PARTNER_COST_TYPE_DOUBLE_VERIFY` -
  /// `PARTNER_COST_TYPE_INTEGRAL_AD_SCIENCE`. * Output only for other types.
  /// Possible string values are:
  /// - "PARTNER_COST_INVOICE_TYPE_UNSPECIFIED" : Type value is not specified or
  /// is unknown in this version.
  /// - "PARTNER_COST_INVOICE_TYPE_DV360" : Partner cost is billed through
  /// DV360.
  /// - "PARTNER_COST_INVOICE_TYPE_PARTNER" : Partner cost is billed by the
  /// partner.
  core.String? invoiceType;

  $PartnerCost({
    this.costType,
    this.feeAmount,
    this.feePercentageMillis,
    this.feeType,
    this.invoiceType,
  });

  $PartnerCost.fromJson(core.Map json_)
    : this(
        costType: json_['costType'] as core.String?,
        feeAmount: json_['feeAmount'] as core.String?,
        feePercentageMillis: json_['feePercentageMillis'] as core.String?,
        feeType: json_['feeType'] as core.String?,
        invoiceType: json_['invoiceType'] as core.String?,
      );

  core.Map<core.String, core.dynamic> toJson() => {
    if (costType != null) 'costType': costType!,
    if (feeAmount != null) 'feeAmount': feeAmount!,
    if (feePercentageMillis != null)
      'feePercentageMillis': feePercentageMillis!,
    if (feeType != null) 'feeType': feeType!,
    if (invoiceType != null) 'invoiceType': invoiceType!,
  };
}

/// Used by:
///
/// - displayvideo:v2 : PartnerGeneralConfig
/// - displayvideo:v3 : PartnerGeneralConfig
/// - displayvideo:v4 : PartnerGeneralConfig
class $PartnerGeneralConfig {
  /// Partner's currency in ISO 4217 format.
  ///
  /// Immutable.
  core.String? currencyCode;

  /// The standard TZ database name of the partner's time zone.
  ///
  /// For example, `America/New_York`. See more at:
  /// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  ///
  /// Immutable.
  core.String? timeZone;

  $PartnerGeneralConfig({this.currencyCode, this.timeZone});

  $PartnerGeneralConfig.fromJson(core.Map json_)
    : this(
        currencyCode: json_['currencyCode'] as core.String?,
        timeZone: json_['timeZone'] as core.String?,
      );

  core.Map<core.String, core.dynamic> toJson() => {
    if (currencyCode != null) 'currencyCode': currencyCode!,
    if (timeZone != null) 'timeZone': timeZone!,
  };
}

/// Used by:
///
/// - displayvideo:v2 : PartnerRevenueModel
/// - displayvideo:v3 : PartnerRevenueModel
/// - displayvideo:v4 : PartnerRevenueModel
class $PartnerRevenueModel {
  /// The markup amou


double> variance(cur_sumsq);
        variance.Scale(1.0 / window_frames);
        variance.AddVec2(-1.0 / (window_frames * window_frames), cur_sum);
        // now "variance" is the variance of the features in the window,
        // around their own mean.
        int32 num_floored;
	variance.ApplyFloor(1.0e-10, &num_floored);
        if (num_floored > 0 && num_frames > 1) {
          if (opts.max_warnings == warning_count) {
            KALDI_WARN << "Suppressing the remaining variance flooring "
                       << "warnings. Run program with --max-warnings=-1 to "
                       << "see all warnings.";
          }
          // If opts.max_warnings is a negative number, we won't restrict the
          // number of times that the warning is printed out.
          else if (opts.max_warnings < 0
                   || opts.max_warnings > warning_count) {
            KALDI_WARN << "Flooring when normalizing variance, floored "
                       << num_floored << " elements; num-frames was "
                       << window_frames;
          }
          warning_count++;
        }
        variance.ApplyPow(-0.5); // get inverse standard deviation.
        output_frame.MulElements(variance);
      }
    }
  }
}

void SlidingWindowCmn(const SlidingWindowCmnOptions &opts,
                      const MatrixBase<BaseFloat> &input,
                      MatrixBase<BaseFloat> *output) {
  KALDI_ASSERT(SameDim(input, *output) && input.NumRows() > 0);
  Matrix<double> input_dbl(input), output_dbl(input.NumRows(), input.NumCols());
  // call double-precision version
  SlidingWindowCmnInternal(opts, input_dbl, &output_dbl);
  output->CopyFromMat(output_dbl);
}

}  // namespace kaldi
// feat/feature-mfcc.cc

// Copyright 2009-2011  Karel Vesely;  Petr Motlicek
//                2016  Johns Hopkins University (author: Daniel Povey)

// See ../../COPYING for clarification regarding multiple 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
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
// WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
// MERCHANTABLITY OR NON-INFRINGEMENT.
// See the Apache 2 License for the specific language governing permissions and
// limitations under the License.

#include "feat/feature-mfcc.h"

namespace kaldi {

void MfccComputer::Compute(BaseFloat signal_raw_log_energy,
                           BaseFloat vtln_warp,
                           VectorBase<BaseFloat> *signal_frame,
                           VectorBase<BaseFloat> *feature) {
  KALDI_ASSERT(signal_frame->Dim() == opts_.frame_opts.PaddedWindowSize() &&
               feature->Dim() == this->Dim());

  const MelBanks &mel_banks = *(GetMelBanks(vtln_warp));

  if (opts_.use_energy && !opts_.raw_energy)
    signal_raw_log_energy = Log(std::max<BaseFloat>(VecVec(*signal_frame, *signal_frame),


// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
//
// 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.

#if (!SILVERLIGHT)

namespace CastleTests.Facilities.EventWiring
{
	using Castle.Windsor.In


0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" />`,
	"send-horizontal": `<path d="M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z" />
  <path d="M6 12h16" />`,
	"square-dashed-top-solid": `<path d="M14 21h1" />
  <path d="M21 14v1" />
  <path d="M21 19a2 2 0 0 1-2 2" />
  <path d="M21 9v1" />
  <path d="M3 14v1" />
  <path d="M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2" />
  <path d="M3 9v1" />
  <path d="M5 21a2 2 0 0 1-2-2" />
  <path d="M9 21h1" />`,
	"star-off": `<path d="M8.34 8.34 2 9.27l5 4.87L5.82 21 12 17.77 18.18 21l-.59-3.43" />
  <path d="M18.42 12.76 22 9.27l-6.91-1L12 2l-1.44 2.91" />
  <line x1="2" x2="22" y1="2" y2="22" />`,
	"circle-star": `<path d="M11.051 7.616a1 1 0 0 1 1.909.024l.737 1.452a1 1 0 0 0 .737.535l1.634.256a1 1 0 0 1 .588 1.806l-1.172 1.168a1 1 0 0 0-.282.866l.259 1.613a1 1 0 0 1-1.541 1.134l-1.465-.75a1 1 0 0 0-.912 0l-1.465.75a1 1 0 0 1-1.539-1.133l.258-1.613a1 1 0 0 0-.282-.867l-1.156-1.152a1 1 0 0 1 .572-1.822l1.633-.256a1 1 0 0 0 .737-.535z" />
  <circle cx="12" cy="12" r="10" />`,
	"file-music": `<path d="M10.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v8.4" />
  <path d="M8 18v-7.7L16 9v7" />
  <circle cx="14" cy="16" r="2" />
  <circle cx="6" cy="18" r="2" />`,
	"message-circle-reply": `<path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" />
  <path d="m10 15-3-3 3-3" />
  <path d="M7 12h8a2 2 0 0 1 2 2v1" />`,
	"messages-square": `<path d="M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z" />
  <path d="M20 9a2 2 0 0 1 2 2


      assert_allclose(spline_GCV(grid),
                        spline_interp(grid),
                        atol=1e-15)

    def test_weighted_smoothing_spline(self):
        # create data sample
        np.random.seed(1234)
        n = 100
        x = np.sort(np.random.random_sample(n) * 4 - 2)
        y = x**2 * np.sin(4 * x) + x**3 + np.random.normal(0., 1.5, n)

        spl = make_smoothing_spline(x, y)

        # in order not to iterate over all of the indices, we select 10 of
        # them randomly
        for ind in np.random.choice(range(100), size=10):
            w = np.ones(n)
            w[ind] = 30.
            spl_w = make_smoothing_spline(x, y, w)
            # check that spline with weight in a certain point is closer to the
            # original point than the one without weights
            orig = abs(spl(x[ind]) - y[ind])
            weighted = abs(spl_w(x[ind]) - y[ind])

            if orig < weighted:
                raise ValueError(f'Spline with weights should be closer to the'
                                 f' points than the original one: {orig:.4} < '
                                 f'{weighted:.4}')


olmen'Regal."}, {"Lleva 3 hachas de hierro macizo a Merok Zancada Larga en el campamento de la Legión de Orgrimmar, en las afueras de Colmen'Regal. También debes llevar el Informe de tareas logísticas VI para poder completar la misión."}},
[8787] = {"Complementos para armadura para el campo de batalla", {"Los valientes voluntarios de la Legión de Orgrimmar han venido a Silithus para ayudarnos en nuestra causa. De alguna forma, perdieron sus suministros de armaduras durante el viaje. Consigue un lote de armaduras y llévaselas a Merok Zancolargo al campamento de la Legión de Orgrimmar."}, {"Lleva 8 complementos bastos para armadura y 8 complementos pesados para armadura a Merok Zancolargo, cerca de Colmen'Regal. También debes llevar el Informe de tareas logísticas VII para poder completar la misión."}},
[8788] = {"Un obsequio ligeramente agitado", nil, nil},
[8789] = {"Armamentos imperiales qiraji", {"No hemos estado ociosos durante un milenio, <nombre>.","Hemos estado observando cómo estas bestias lo celebraban a solas cuando habían cumplido su propósito. Hemos estado escuchando cómo tramaban y se confabulaban para destruir nuestro mundo. Y nos hemos enterado de sus propias traiciones internas.","Existen puntos débiles y sabemos cómo usarlos a nuestro favor.","Encuentra sus armamentos ceremoniales y tráemelos. Combinados con el elemento creado a partir de la volatilidad de su propio Dios, se convertirán en una fuerza considerable."}, {"Arygos en el Templo de Ahn'Qiraj creará armamento imbuido de elementium para ti si le llevas armamento imperial qiraji y 3 menas de elementium."}},
[8790] = {"Regalos imperiales Qiraji", {"Según una teoría de Arygos el elemento nacido de conflictos entre los antiguos Dioses y sus esbirros también es extremadamente fatal para ellos si se dan las condiciones adecuadas. Me refiero al Eleméntium, mortal.","Encuentra regalos imperiales qiraji y tráemelos junto con el elemento tóxico para infundir con ellos armas de gran poder."}, {"Merithra del Sueño en el Templo de Ahn'Qiraj creará armamento imbuido de Elementium para ti si le llevas regalos imperiales qiraji y 3 minerales de Elementium."}},
[8791] = {"La caída de Osirio", {"Se acabó esa terrible amenaza. El cruel Osirio ha sido derrotado.","Los vecinos de Kalimdor sentirán gran alivio cuando conozcan la noticia. Coge la cabeza de Osirio y llévasela al comandante Mar'alith de Fuerte Cenarion."}, {"Entrégale la cabeza de Osirio el Sinmarcas al comandante Mar'alith de Fuerte Cenarion en Silithus.|n"}},
[8792] = {"¡La Horda te necesita!", {"Hola, ¡qué bien que hayas decidido escucharme! La Horda necesita toda la ayuda posible para preparar la guerra de Ahn'Qiraj ¡y eso significa que te necesitamos a ti también! En este mismo instante, los recolectores oficiales están reuniendo el material necesario para la guerra que se avecina, pero no lograremos nuestro objetivo sin tu ayuda, <nombre>!","Deberías hablar con quien está al mando, el señor de la guerra Gorchuk. ¿Qué me dices, <clase


/*
 *  "GEDKeeper", the personal genealogical database editor.
 *  Copyright (C) 2009-2025 by Sergey V. Zhdanovskih.
 *
 *  This file is part of "GEDKeeper".
 *
 *  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 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

using BSLib;
using Eto.Drawing;
using GKCore.Charts;
using GKCore.Design.Graphics;

namespace GKUI.


ESaIcEEEE10deallocateEPS6_m, .-_ZN9__gnu_cxx13new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE10deallocateEPS6_m
	.section	.text._ZNSt22__uninitialized_fill_nILb0EE15__uninit_fill_nIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmS7_EET_S9_T0_RKT1_,"axG",@progbits,_ZNSt22__uninitialized_fill_nILb0EE15__uninit_fill_nIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmS7_EET_S9_T0_RKT1_,comdat
	.weak	_ZNSt22__uninitialized_fill_nILb0EE15__uninit_fill_nIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmS7_EET_S9_T0_RKT1_
	.type	_ZNSt22__uninitialized_fill_nILb0EE15__uninit_fill_nIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmS7_EET_S9_T0_RKT1_, @function
_ZNSt22__uninitialized_fill_nILb0EE15__uninit_fill_nIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmS7_EET_S9_T0_RKT1_:
.LFB10221:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA10221
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L280
.L281:
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	_ZSt11__addressofINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEPT_RS6_
	movq	%rax, %rdx
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
.LEHB24:
	call	_ZSt10_ConstructINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRKS5_EEvPT_DpOT0_
.LEHE24:
	subq	$1, -48(%rbp)
	addq	$32, -24(%rbp)
.L280:
	cmpq	$0, -48(%rbp)
	jne	.L281
	movq	-24(%rbp), %rax
	jmp	.L287
.L285:
	endbr64
	movq	%rax, %rdi
	call	__cxa_begin_catch@PLT
	movq	-24(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
.LEHB25:
	call	_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_tra


, value);
    if (found_child) {
      // check output on current state
      CheckOutputOnMatch(found_child, line_num, column_num, output_file);

      // move to next goto-state
      current = found_child;

      // forward str
      ++ch;
      ++column_num;
    } else {
      // root->fail_link == NULL (could not move to any more)
      if (current == root) {
        // forward str
        ++ch;
        ++column_num;
      } else {
        // move along fail link (without forwarding str)
        current = current->fail_link;
      }
    }
  }
}

int main(int argc, char* argv[]) {
  if (argc < 4) {
    fprintf(stderr, "usage: ./acmatch STRING PATTERN OUTPUT\n");
    return 1;
  }

  FILE* string_file = fopen(argv[1], "r");
  FILE* pattern_file = fopen(argv[2], "r");
  FILE* output_file = fopen(argv[3], "w");

  if (!string_file || !pattern_file || !output_file) {
    if (string_file)
      fclose(string_file);
    else
      fprintf(stderr, "failed to open string file: %s\n", argv[1]);

    if (pattern_file)
      fclose(pattern_file);
    else
      fprintf(stderr, "failed to open pattern file: %s\n", argv[2]);

    if (output_file)
      fclose(output_file);
    else
      fprintf(stderr, "failed to open output file: %s\n", argv[3]);

    return 1;
  }

  // create root node of tire tree
  ACNode* root = NewNode(0);

  // build tire tree by pattern line
  {
    char* line = NULL;
    size_t line_len = 0;
    while (-1 != getline(&line, &line_len, pattern_file))
      BuildTireTree(line, root);
  }

  // init tire tree's fail function
  InitFailLink(root);

  // use AC to match string line
  {
    char* line = NULL;
    size_t line_len = 0;
    uint32_t line_num = 0;  // start with 1
    while (-1 != getline(&line, &line_len, string_file)) {
      ++line_num;
      ACMatch(line, line_num, root, output_file);
    }
  }

  // delete the tire tree
  DeleteNode(root);

  fclose(string_file);
  fclose(pattern_file);
  fclose(output_file);

  // ensure no memory leaks of node
  assert(g_node_count == 0);
  assert(g_queue_node_count == 0);
  return 0;
}


v but returned %v", test.in, test.isIPV6, isIPV6)
		}
	}
}

func TestIsPortAvailable(t *testing.T) {
	if !IsPortAvailable(0) {
		t.Fatal("expected port 0 to be available (random port) but returned false")
	}

	ln, err := net.Listen("tcp", ":0")
	if err != nil {
		t.Fatalf("unexpected error: %v", err)
	}
	defer ln.Close()

	p := ln.Addr().(*net.TCPAddr).Port
	if IsPortAvailable(p) {
		t.Fatalf("expected port %v to not be available", p)
	}
}

/*
// TODO: this test should be optional or running behind a flag
func TestIsIPv6Enabled(t *testing.T) {
	isEnabled := IsIPv6Enabled()
	if !isEnabled {
		t.Fatalf("expected IPV6 be enabled")
	}
}
*/
//go:build !ignore_autogenerated
// +build !ignore_autogenerated

/*
Copyright 2020 The Kubernetes 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.
*/

// Code generated by deepcopy-gen. DO NOT EDIT.

package k8s

import "k8s.io/apimachinery/pkg/runtime"

func (in *PodInfo) DeepCopyInto(out *PodInfo) {
	out.TypeMeta = in.TypeMeta
	out.ObjectMeta = in.ObjectMeta
}

// DeepCopyObject returns a generically typed copy of an object
func (in *PodInfo) DeepCopyObject() runtime.Object {
	out := PodInfo{}
	in.DeepCopyInto(&out)

	return &out
}
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: route.proto

package route

import (
	fmt "fmt"
	github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
	proto "github.com/gogo/protobuf/proto"
	io "io"
	math "math"
	reflect "reflect"
	strconv "strconv"
	strings "strings"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package

type OperatorType int32

const (
	OperatorUnDefined    OperatorType = 0
	OperatorEqual        OperatorType = 1
	OperatorGreater      OperatorType = 2
	OperatorLess         OperatorType = 3
	OperatorGreaterEqual OperatorType = 4
	OperatorLessEqual    OperatorType = 5
)

var OperatorType_name = map[int32]string{
	0: "OperatorUnDefined",
	1: "OperatorEqual",
	2: "OperatorGreater",
	3: "OperatorLess",
	4: "OperatorGreaterEqual",
	5: "OperatorLessEqual",
}

var Ope


"""
Pruebas Unitarias para las Utilidades de Respuesta.

Este archivo prueba que las funciones de ayuda en `backend.utils.responses`
construyen diccionarios de respuesta estandarizados y consistentes.
"""

from backend.utils.responses import crear_respuesta_exitosa, crear_respuesta_error

def test_crear_respuesta_exitosa():
    """
    Verifica que se cree una respuesta exitosa con la estructura correcta.
    """
    datos_payload = {"id": 1, "nombre": "Test"}
    mensaje_opcional = "Operación completada."

    respuesta = crear_respuesta_exitosa(datos_payload, mensaje_opcional)

    assert isinstance(respuesta, dict)
    assert respuesta["estado"] == "ok"
    assert respuesta["datos"] == datos_payload
    assert respuesta["mensaje"] == mensaje_opcional

def test_crear_respuesta_exitosa_sin_mensaje():
    """
    Verifica que una respuesta exitosa funciona correctamente sin un mensaje opcional.
    """
    datos_payload = [1, 2, 3]

    respuesta = crear_respuesta_exitosa(datos_payload)

    assert respuesta["estado"] == "ok"
    assert respuesta["datos"] == datos_payload
    assert respuesta["mensaje"] == "" # El valor por defecto debe ser un string vacío

def test_crear_respuesta_error():
    """
    Verifica que se cree una respuesta de error con la estructura correcta.
    """
    mensaje_error = "No se pudo encontrar el recurso."

    respuesta = crear_respuesta_error(mensaje_error)

    assert isinstance(respuesta, dict)
    assert respuesta["estado"] == "error"
    assert respuesta["mensaje"] == mensaje_error
    # Es importante verificar que no incluye la clave 'datos'
    assert "datos" not in respuesta


workHandler` 类来移除任何以前存在的 GameObject，这只能通过服务器完成。

```cs
public override void OnNetworkSpawn()
{
    LevelEvent = null;

    if (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer) // [!code ++]
        Instance?.gameObject.GetComponent<NetworkObject>().Despawn(); // [!code ++]
    Instance = this; // [!code ++]

    base.OnNetworkSpawn();
}
```

### 最终确定的网络处理程序

我们完成了！ 剩下的就是将所有内容整合到一个脚本中：

```cs:line-numbers
using System;
using Unity.Netcode;
using UnityEngine;
using Object = UnityEngine.Object;

namespace ExampleMod;

public class ExampleNetworkHandler : NetworkBehaviour // [!code focus:23]
{
    public override void OnNetworkSpawn()
    {
        LevelEvent = null;

        if (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer)
            Instance?.gameObject.GetComponent<NetworkObject>().Despawn();
        Instance = this;

        base.OnNetworkSpawn();
    }

    [ClientRpc]
    public void EventClientRpc(string eventName)
    {
        LevelEvent?.Invoke(eventName); // 如果事件有订阅者（不等于 null），则调用该事件
    }

    public static event Action<String> LevelEvent;

    public static ExampleNetworkHandler Instance { get; private set; }
}
```

## 生成 NetworkHandler

在生成 ExampleNetworkHandler 之前，我们必须将其加载到游戏中。 为此，我们需要从 AssetBundle 加载处理程序。

我们作为资源生成的游戏对象需要一个网络对象。 我们将使用这个预制件作为我们的网络处理程序：

![ExampleNetworkHandler 预制件](/images/custom-networking/ExampleNetworkHandlerPrefab.png)

我们打包这个预制件，然后使用以下命令导入：

```cs
// Info 是 `BaseUnityPlugin` 类的实例成员字段。
var dllFolderPath = System.IO.Path.GetDirectoryName(Info.Location);
var assetBundleFilePath = System.IO.Path.Combine(dllFolderPath, "ExampleModAssets");
MainAssetBundle = AssetBundle.LoadFromFile(assetBundleFilePath);
```

必须将 AssetBundle 文件添加到模组的 .dll 文件旁边的 plugins 文件夹中（与模组的 .dll 文件位于同一文件夹）。

我们建议使用此方法，而不是将资源直接嵌入到 dll 文件中，原因如下：

- 用于资源的内存将重复：如果资�


ionType.Reroll,
                1,
                new List<DieSide> { DieSide.Blank }
            );
        }

        public override void DeactivateAbility()
        {
            HostShip.OnAttackFinishAsDefender -= CheckAbility;
            RemoveDiceModification();
        }

        public bool IsDiceModificationAvailable()
        {
            return (Combat.AttackStep == CombatStep.Attack
                && Combat.Attacker == HostShip
                && Combat.Defender.IsStrained);
        }

        public int GetDiceModificationAiPriority()
        {
            return 95;
        }

        private void CheckAbility(GenericShip ship)
        {
            ShotInfo shotInfo = new ShotInfo(HostShip, Combat.Attacker, HostShip.PrimaryWeapons);
            if (shotInfo.InArc && HostUpgrade.State.Charges > 0)
            {
                RegisterAbilityTrigger(TriggerTypes.OnAttackFinish, AskToUseOwnAbility);
            }
        }

        private void AskToUseOwnAbility(object sender, EventArgs e)
        {
            AskToUseAbility(
                HostUpgrade.UpgradeInfo.Name,
                AlwaysUseByDefault,
                UseOwnAbility,
                descriptionLong: "Do you want to spend 1 Charge? (If you do, the attacker gains 1 strain token.",
                imageHolder: HostUpgrade
            );
        }

        private void UseOwnAbility(object sender, EventArgs e)
        {
            DecisionSubPhase.ConfirmDecisionNoCallback();

            HostUpgrade.State.SpendCharge();

            Combat.Attacker.Tokens.AssignToken(typeof(Tokens.StrainToken), Triggers.FinishTrigger);
        }
    }
}


1
end

function startCreatingPassengers(k)
	createPassengers = k
	tutorial.restartEvent = function()
			if currentStep >= k then	-- if I haven't gone back to a previous step
				createPassengers = k
				tutorial.passengersEnRoute = 0
			end
		end
end

function waitingForPassengersEvent(k)
	return function()

		cBox = codeBox.new(CODE_BOX_X, CODE_BOX_Y, CODE_dropOffPassenger)

		tutorial.reachedNewTileEvent = function(x, y)
			if x == 5 then
				tutorial.reachedEast = true
			elseif x == 1 then
				tutorial.reachedWest = true
			end
			if tutorial.reachedEast and tutorial.reachedWest then
				if currentStep == k then	-- if I haven't gone back to a previous step
					-- tutorial.reachedNewTileEvent = nil
					nextTutorialStep()
					tutorialBox.succeed()
				end
			end
		end
	end
end

function enoughMoneyEvent(k)
	return function()
			cBox = codeBox.new(CODE_BOX_X, CODE_BOX_Y, CODE_enoughMoney)
			local numOfTrains = 0
			tutorial.trainPlacingEvent = function()
				numOfTrains = numOfTrains + 1
				if numOfTrains >= 2 then
					if currentStep >= k then	-- if I haven't gone back to a previous step
						tutorial.trainPlacingEvent = nil
						nextTutorialStep()
						tutorialBox.succeed()
					end
				end
			end
		end
end

function waitFor10Passengers(k)
	return function()
		numPassengers = 0
		tutorial.passengerDropoffCorrectlyEvent = function()

			tutorial.passengersEnRoute = tutorial.passengersEnRoute - 1
			numPassengers = numPassengers + 1
			if currentStep == k then
				currentTutBox.text = "Теперь у пас есть 2 поезда!\nСейчас можете откинуться на спинку стула, расслабиться и ждать, пока ваши поезда развезут 10 пассажиров. Вы хорошо поработали!\n\n" .. numPassengers .. " из 10 перевезено."
				if numPassengers >= 10 then
					nextTutorialStep()
					tutorialBox.succeed()
				end


' || typeof color.g !== 'number' || typeof color.b !== 'number') {
      this.empty = true;
    } else {
      this.empty = false;
      this._rgb = color;
      this._rgba = {
        ...color,
        a: this.resetAlpha ? 1 : this._rgba.a
      };
      this._hsl = rgb2Hsl(color);
      this._hex = rgb2Hex(color);
      this._hsv = rgb2Hsv(color);
    }

    this.resetAlpha = true;
    this.render();
  }

  get rgb(): ColorRGB {
    return this.empty ? null : this._rgb;
  }

  set rgba(color: ColorRGBA) {
    if (!color ||
      typeof color.r !== 'number' ||
      typeof color.g !== 'number' ||
      typeof color.b !== 'number' ||
      typeof color.a !== 'number') {
      this.empty = true;
    } else {
      this.empty = false;
      this._rgba = color;
      this._hsl = rgb2Hsl(color);
      this._hex = rgb2Hex(color);
      this._hsv = rgb2Hsv(color);
    }
    this.render();
  }

  get rgba() {
    return this.empty ? null : this._rgba;
  }

  set hsv(color: ColorHSV) {
    if (!color || typeof color.h !== 'number' || typeof color.s !== 'number' || typeof color.v !== 'number') {
      this.empty = true;
    } else {
      this.empty = false;
      this._hsv = color;
      this._hex = hsv2Hex(color);
      this._hsl = hsv2Hsl(color);
      this._rgb = hsv2Rgb(color);
      this._rgba = {
        ...this._rgb,
        a: this.resetAlpha ? 1 : this._rgba.a
      };
    }
    this.resetAlpha = true;
    this.render();
  }

  get hsv() {
    return this.empty ? null : this._hsv;
  }

  private _hex: string;
  private _hsl: ColorHSL;
  private _rgb: ColorRGB;
  private _hsv: ColorHSV;

  private _rgba: ColorRGBA;

  private empty = false;
  private resetAlpha = true;

  private container: HTMLElement;
  private valueViewer: HTMLElement;
  private palette: HTMLElement;
  private palettePoint: HTMLElement;
  private hueBar: HTMLElement;
  private huePoint: HTMLElement;
  private checkBtn: HTMLElement;
  private alphaBar: HTMLElement;
  private alphaValue: HTMLElement;
  private alphaPoint: HTMLElement;
  private inputsWrap: HTMLElement;
  private hslInputs: HTMLInputElement[];
  private rgbInputs: HTMLInputElement[];
  private hexInput: HTMLInputElement;
  private colorWrapper: HTMLElement;
  private switchBtn: HTMLElement;
  private menu: HTMLElement;
  private backBtn: HTMLElement;
  private recentElement: HTMLElement;

  private recentColorOptions: string[] = [];
  private writing = false;

  private colorElements: HTMLElement[] = []

  private mainColors: HTMLElement
  private colors: HTMLElement

  constructor(selector: string | HTMLElement, options: PickerOptions = {}) {
    if (typeof selector === 'string') {
      this.container = document.querySelector(selector);
    } else {
      this.container = selector;
    }
    this.host.classList.add('tanbo-color-picker');
    this.host.innerHTML = template(
      options.btnText || '确定',
      options.paletteText || '调色盘',
      options.recentText || '最近使用',
      options.backText || '返回'
    );

    this.container.appendChild(this.host);
    this.valueViewer = th


item::Bool;
/// let value = Bool::from(true);
/// # assert_eq!(value.to_bool(), true);
/// ```
///
/// Extract a primitive `bool` out of a structurally typed `Bool` value:
///
/// ```
/// # use swim_structure::item::Bool;
/// let value = Bool::from(false);
/// let primitive = value.to_bool();
/// # assert_eq!(primitive, false);
/// ```
#[derive(Eq)]
#[repr(C)]
pub struct Bool {
    /// Discriminant with `TRUE_TYPE` or `FALSE_TYPE` at the lowest byte address.
    ///
    /// ```text
    /// 0        1        2        3        4        5        6        7        8
    /// +--------+--------+--------+--------+--------+--------+--------+--------+
    /// |  type  |      0 |      0 |      0 |      0 |      0 |      0 |      0 |
    /// +--------+--------+--------+--------+--------+--------+--------+--------+
    /// ```
    _0: NonZeroU64,
    /// Reserved.
    _1: u64,
}

impl Bool {
    /// Constructs a new `Bool` from a `bool` value.
    pub const fn from_bool(value: bool) -> Bool {
        Bool {
            _0: unsafe { NonZeroU64::new_unchecked(Value::discriminant(Value::FALSE_TYPE + value as u8)) },
            _1: value as u64,
        }
    }

    /// Returns a pointer to the tag in the first byte of this `Bool`.
    #[inline(always)]
    pub(crate) unsafe fn tag_ptr(&self) -> *mut u8 {
        mem::transmute::<&Bool, *mut u8>(self)
    }

    /// Returns the tag from the first byte of this `Bool`.
    #[inline(always)]
    pub(crate) fn tag(&self) -> u8 {
        unsafe { *self.tag_ptr() }
    }

    /// Returns the type tag from the low 7 bits of the first byte of this `Bool`.
    #[inline(always)]
    pub(crate) fn type_tag(&self) -> u8 {
        self.tag() & Value::TYPE_MASK
    }

    /// Returns the `bool` value of this `Bool` reference.
    pub fn to_bool(&self) -> bool {
        self.type_tag() != Value::FALSE_TYPE
    }

    /// Upcasts this `Bool` reference to a `Value` reference.
    #[inline]
    pub fn as_value<'a>(&self) -> &Value<'a> {
        unsafe { mem::transmute::<&Bool, &Value<'a>>(self) }
    }

    /// Upcasts this `Bool` reference to a mutable `Value` reference.
    #[inline]
    pub fn as_mut_value<'a>(&mut self) -> &mut Value<'a> {
        unsafe { mem::transmute::<&mut Bool, &mut Value<'a>>(self) }
    }

    /// Upcasts this `Bool` to a `Value`.
    #[inline]
    pub fn into_value<'a>(self) -> Value<'a> {
        unsafe { mem::transmute::<Bool, Value<'a>>(self) }
    }

    /// Upcasts this `Bool` to an `Item`.
    #[inline]
    pub fn into_item<'a>(self) -> Item<'a> {
        Item::from_value(self.into_value())
    }
}

impl<'a> AsRef<Value<'a>> for Bool {
    #[inline]
    fn as_ref(&self) -> &Value<'a> {
        self.as_value()
    }
}

impl<'a> AsMut<Value<'a>> for Bool {
    #[inline]
    fn as_mut(&mut


# List of animals with a common characteristic
animals = ["Dog", "Cat", "Rabbit"]

# Loop to print each animal name
for animal in animals:
    print(animal)

print()  # Blank line for readability

# Loop to print a statement about each animal
for animal in animals:
    print(f"A {animal.lower()} would make a great pet.")

print("\nAny of these animals would make a great pet!")


 this.audioFileName,
        transcriptFileName: transcriptFileName ?? this.transcriptFileName,
        summary: summary ?? this.summary,
        s3Url: s3Url ?? this.s3Url,
      );

  @override
  Map<String, Object?> toJson() {
    return {
      ...super.toJson(),
      AudioFields.audioFileName: audioFileName,
      AudioFields.transcriptFileName: transcriptFileName,
      AudioFields.summary: summary,
    };
  }

  static Audio fromJson(Map<String, Object?> json) {
    try {
      return Audio(
          id: json[MediaFields.id] as int?,
          title: json[MediaFields.title] as String?,
          description: json[MediaFields.description] as String?,
          tags: (json[MediaFields.tags] as String?)?.split(','),
          timestamp: DateTime.fromMillisecondsSinceEpoch(
            (json[MediaFields.timestamp] as int),
            isUtc: true,
          ),
          physicalAddress: json[MediaFields.physicalAddress] as String?,
          storageSize: json[MediaFields.storageSize] as int,
          isFavorited: json[MediaFields.isFavorited] == 1,
          audioFileName: json[AudioFields.audioFileName] as String,
          transcriptFileName: json[AudioFields.transcriptFileName] as String?,
          summary: json[AudioFields.summary] as String?,
          s3Url: json['s3Url'] as String?);
    } catch (e) {
      throw FormatException('Error parsing JSON: $e');
    }
  }

  Future<File?> loadTranscriptFile() async {
    try {
      if (transcriptFileName == null) {
        appLogger.severe('transcriptFileName is null');
        return null;
      }
      return FileManager.loadFile(
        DirectoryManager.instance.transcriptsDirectory.path,
        transcriptFileName!,
      );
    } catch (e) {
      appLogger.severe('Error loading transcript file: $e');
      return null;
    }
  }
}
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:memoryminder/src/features/account_creation_and_login/presentation/login_screen.dart';

class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
  final String? title;
  final Widget? leading;
  final List<Widget>? actions;
  final Color? backgroundColor;
  final TextStyle? titleTextStyle;
  final bool automaticallyImplyLeading;

  const CustomAppBar({
    Key? key,
    this.title,
    this.leading,
    this.actions,
    this.backgroundColor,
    this.titleTextStyle,
    this.automaticallyImplyLeading = true,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return AppBar(
      backgroundColor: Color.fromARGB(255, 2, 63, 129),
      elevation: 0.0,
      centerTitle: true,
      title: Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          Row(
            mainAxisSize: MainAxisSize.min,
            // This ensures the Row takes the least amount of space
            children: [
              Image.asset(
                'assets/icons/app_bar_icon_brain.png',
                // Replace this with your icon's path
                fit: BoxFit.contain,
                height: 36, // Adjust the size as needed
              ),
              // Spacing between the icon and title
              SizedBox(width: 6.0),
              Text(title!,
                  textAlign: TextAlign.center,
                  style: TextStyle(
                      fontSize: 24.0,
                      fontWeight: FontWeight.bold,
                      color: Colors.white,
                      fontFamily: 'Montserrat')),
            ],
          ),
          Text(


 format + " expected: " + expected,
                format.equals(expected));
    }

    private boolean compare(int count, String format, String expected) {
        boolean result = format.equals(expected);
        if (!result)
            System.out.println("Failure test: " + count + " got: " + format
                    + " expected: " + expected);
        return result;
    }

    public void test_formatDLjava_lang_StringBufferLjava_text_FieldPosition() {
        new Support_DecimalFormat(
                "test_formatDLjava_lang_StringBufferLjava_text_FieldPosition")
                .t_format_with_FieldPosition();

        int failCount = 0;
        BitSet failures = new BitSet();

        final DecimalFormatSymbols dfs = new DecimalFormatSymbols(Locale.US);

        DecimalFormat df = new DecimalFormat("00.0#E0", dfs);
        compare("00.0#E0: 0.0", df.format(0.0), "00.0E0");
        compare("00.0#E0: 1.0", df.format(1.0), "10.0E-1");
        compare("00.0#E0: 12.0", df.format(12.0), "12.0E0");
        compare("00.0#E0: 123.0", df.format(123.0), "12.3E1");
        compare("00.0#E0: 1234.0", df.format(1234.0), "12.34E2");
        compare("00.0#E0: 12346.0", df.format(12346.0), "12.35E3");
        compare("00.0#E0: 99999.0", df.format(99999.0), "10.0E4");
        compare("00.0#E0: 1.2", df.format(1.2), "12.0E-1");
        compare("00.0#E0: 12.3", df.format(12.3), "12.3E0");
        compare("00.0#E0: 123.4", df.format(123.4), "12.34E1");
        compare("00.0#E0: 1234.6", df.format(1234.6), "12.35E2");
        compare("00.0#E0: 9999.9", df.format(9999.9), "10.0E3");
        compare("00.0#E0: 0.1", df.format(0.1), "10.0E-2");
        compare("00.0#E0: 0.12", df.format(0.12), "12.0E-2");
        compare("00.0#E0: 0.123", df.format(0.123), "12.3E-2");
        compare("00.0#E0: 0.1234", df.format(0.1234), "12.34E-2");
        compare("00.0#E0: 0.12346", df.format(0.12346), "12.35E-2");
        compare("00.0#E0: 0.99999", df.format(0.99999), "10.0E-1");
        compare("00.0#E0: -0.0", df.format(-0.0), "-00.0E0");
        compare("00.0#E0: -1.0", df.format(-1.0), "-10.0E-1");
        compare("00.0#E0: -12.0", df.format(-12.0), "-12.0E0");
        compare("00.0#E0: -123.0", df.format(-123.0), "-12.3E1");
        compare("00.0#E0: -1234.0", df.format(-1234.0), "-12.34E2");
        compare("00.0#E0: -12346.0", df.format


 The array expression variant.
    variant: Variant,
}

impl Expression {
    ///
    /// A shortcut constructor.
    ///
    pub fn new_list(expressions: Vec<GeneratorExpression>) -> Self {
        Self {
            variant: Variant::new_list(expressions),
        }
    }

    ///
    /// A shortcut constructor.
    ///
    pub fn new_repeated(expression: GeneratorExpression, size: usize) -> Self {
        Self {
            variant: Variant::new_repeated(expression, size),
        }
    }
}

impl IBytecodeWritable for Expression {
    fn write_to_zinc_vm(self, state: Rc<RefCell<ZincVMState>>) {
        match self.variant {
            Variant::List { expressions } => {
                for expression in expressions.into_iter() {
                    expression.write_to_zinc_vm(state.clone());
                }
            }
            Variant::Repeated { expression, size } => {
                for expression in vec![expression; size].into_iter() {
                    expression.write_to_zinc_vm(state.clone());
                }
            }
        }
    }
}
// https://leetcode-cn.com/problems/available-captures-for-rook/
// Runtime: 0 ms
// Memory Usage: 2.2 MB
pub fn num_rook_captures(board: Vec<Vec<char>>) -> i32 {
    let mut sum = 0;
    let rook = search_rook(&board);
    for direction in vec![
        Direction::Right,
        Direction::Down,
        Direction::Left,
        Direction::Up,
    ] {
        if search_pawn(&board, &rook, direction) {
            sum += 1;
        }
    }
    sum
}

struct Chess {
    r: usize,
    c: usize,
}

enum Direction {
    Right,
    Down,
    Left,
    Up,
}

fn search_rook(board: &[Vec<char>]) -> Chess {
    for (r, row) in board.iter().enumerate().take(8) {
        for (c, &col) in row.iter().enumerate().take(8) {
            if col == 'R' {
                return Chess { r, c };
            }
        }
    }
    unreachable!()
}

fn search_pawn(board: &[Vec<char>], rook: &Chess, direction: Direction) -> bool {
    let mut r = rook.r;
    let mut c = rook.c;
    match direction {
        Direction::Right => {
            while c + 1 < 8 && board[r][c + 1] != 'B' {
                c += 1;
                if board[r][c] == 'p' {
                    return true;
                }
            }
        }
        Direction::Down => {
            while r + 1 < 8 && board[r + 1][c] != 'B' {
                r += 1;
                if board[r][c] == 'p' {
                    return true;
                }
            }
        }
        Direction::Left => {
            while c > 0 && board[r][c - 1] != 'B' {
                c -= 1;
                if board[r][c] == 'p' {
                    return true;
                }
            }
        }
        Direction::Up => {
            while r > 0 && board[r - 1][c] != 'B' {
                r -= 1;
                if board[r][c] == 'p' {
                    return true;
                }
            }
        }
    }
    false
}
// array
#[test]
fn test1_999() {
    use leetcode_prelude::vec2_char;
    assert_eq!(
        num_rook_captures(vec2_char![


B84ACB;
@define-color GRAPE_500 #9C27B0;
@define-color GRAPE_700 #830E97;
@define-color GRAPE_900 #6A007E;
@define-color COCOA_100 #9F9792;
@define-color COCOA_300 #7B736E;
@define-color COCOA_500 #574F4A;
@define-color COCOA_700 #463E39;
@define-color COCOA_900 #342C27;
@define-color SILVER_100 #EEE;
@define-color SILVER_300 #CCC;
@define-color SILVER_500 #AAA;
@define-color SILVER_700 #888;
@define-color SILVER_900 #666;
@define-color SLATE_100 #888;
@define-color SLATE_300 #666;
@define-color SLATE_500 #444;
@define-color SLATE_700 #222;
@define-color SLATE_900 #111;
@define-color BLACK_100 #474341;
@define-color BLACK_300 #403C3A;
@define-color BLACK_500 #393634;
@define-color BLACK_700 #33302F;
@define-color BLACK_900 #2B2928;
.webix_view{-webkit-appearance:none;-webkit-font-smoothing:antialiased;background-color:#393939;border:0 solid #818181;color:#fff;cursor:default;font-family:PT Sans,Tahoma;font-size:15px;overflow:hidden;white-space:normal}.webix_view.webix_form{background-color:#393939}body{-webkit-tap-highlight-color:transparent!important}.webix_abslayout{position:relative}.webix_abslayout>.webix_view{position:absolute!important}.webix_layout_space,.webix_layout_wide{background-color:#818181}.webix_layout_accordion,.webix_layout_clean,.webix_layout_line,.webix_multiview{background:transparent}.webix_overlay{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;padding-top:10px;position:absolute;text-align:center;width:100%;z-index:90}.webix_view>.webix_disabled{background-color:#ddd;cursor:not-allowed;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=40);height:100%;left:0;opacity:.4;position:absolute;top:0;width:100%;z-index:92}.webix_disabled_view{overflow:hidden!important;position:relative}body.webix_full_screen{margin:0;overflow:hidden;padding:0}body.webix_noselect{overscroll-behavior:none}.webix_noselect,.webix_noselect div{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}.webix_selectable{-moz-user-select:text;-webkit-user-select:text;user-select:text}.webix_template{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;padding:5px}.webix_clean{background:transparent}.webix_clean .webix_template{padding:0}.webix_section{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;background-color:transparent;box-sizing:border-box;font-size:10px;line-height:45px;position:relative;text-transform:uppercase}.webix_section:before{background-color:#818181;content:"";display:block;height:1px;position:absolute;to


assertEquals("\n"+sqlText+"\n", expected, TestUtils.FormattedResult.ResultFactory.toString(rs));
        rs.close();

                /* case 12, negative test case 4, inlist on rowid, MultiProbeTableScan should not be allowed
         */
        sqlText = "select * from t2 --splice-properties useSpark=true\n where rowid in ('84','86','88')";
        queryDoesNotContainString(sqlText, "MultiProbeTableScan", methodWatcher);

        rs = methodWatcher.executeQuery(sqlText);
        expected =
                "A2 |B2 |C2 |\n" +
                        "------------\n" +
                        " 4 | 4 | 4 |\n" +
                        " 6 | 6 | 1 |\n" +
                        " 8 | 8 | 3 |";

        assertEquals("\n"+sqlText+"\n", expected, TestUtils.FormattedResult.ResultFactory.toString(rs));
        rs.close();
    }

    // With DB-7482, we now allow inlist with constant expression for multi-probe scan
    @Test
    public void testInListWithExpressionsOnPK() throws Exception {
        //Q1: non-parameterized sql with inlist condition only
        String sqlText = "select * from t4 --splice-properties useSpark=false\n where a4 in (add_months('2014-01-03',12), add_months('2014-12-05',1))";

        rowContainsQuery(3, "explain " + sqlText, "MultiProbeTableScan", methodWatcher);

        String expected1 =
                "A4     |B4 |C4  | D4  |\n" +
                        "---------------------------\n" +
                        "2015-01-03 |13 |30  | 300 |\n" +
                        "2015-01-03 |18 |80  | 800 |\n" +
                        "2015-01-03 |23 |30  | 300 |\n" +
                        "2015-01-03 |28 |80  | 800 |\n" +
                        "2015-01-03 | 3 |30  | 300 |\n" +
                        "2015-01-03 |33 |30  | 300 |\n" +
                        "2015-01-03 |38 |80  | 800 |\n" +
                        "2015-01-03 |43 |30  | 300 |\n" +
                        "2015-01-03 |48 |80  | 800 |\n" +
                        "2015-01-03 |53 |30  | 300 |\n" +
                        "2015-01-03 |58 |80  | 800 |\n" +
                        "2015-01-03 |63 |30  | 300 |\n" +
                        "2015-01-03 |68 |80  | 800 |\n" +
                        "2015-01-03 |73 |30  | 300 |\n" +
                        "2015-01-03 |78 |80  | 800 |\n" +
                        "2015-01-03 | 8 |80  | 800 |\n" +
                        "2015-01-05 |10 |100 |1000 |\n" +
                        "2015-01-05 |15 |50  | 500 |\n" +
                        "2015-01-05 |20 |100 |1000 |\n" +
                        "2015-01-05 |25 |50  | 500 |\n" +
                        "2015-01-05 |30 |100 |1000 |\n" +
                        "2015-01-05 |35 |50  | 500 |\n" +
                        "2015-01-05 |40 |100 |1000 |\n" +
                        "2015-01-05 |45 |50  | 500 |\n" +
                        "2015-01-05 | 5 |50  | 500 |\n" +
                        "2015-01-05 |50 |100 |1000 |\n" +
                        "2015-01-05 |55 |50  | 500 |\n" +
                        "2015-01-05 |60 |100 |1000 |\n" +
                        "2015-01-05 |65 |50  | 500 |\n" +
                        "2015-01-05 |70 |100 |1000 |\n" +
                        "2015-01-05 |75 |50  | 500 |\n" +


RU,LENU); ret

f_unfilter:  // (char *ptr, uint len, uint cto, uint fid)
        ptr  .req r0
        len  .req r1
        cto  .req r2  // unused
        fid  .req r3

        t1   .req r2
        t2   .req r3

#ifndef FILTER_ID  /*{*/
#define FILTER_ID 0x50  /* little-endian */
#endif  /*}*/
        and fid,fid,#0xff
        cmp fid,#FILTER_ID  // last use of fid
        movne pc,lr  // no-op if not filter 0x50

        movs  len,len,lsr #2  // word count
        cmpne ptr,#0
        moveq pc,lr  // no-op if either len or ptr is 0

top_unf:
        sub len,len,#1
        ldr t1,[ptr,len,lsl #2]
        and t2,t1,#0x0f<<24
        cmp t2,   #0x0b<<24; bne tst_unf  // not 'bl' subroutine call
        and t2,t1,#0xff<<24  // all the non-displacement bits
        sub t1,t1,len  // convert to word-relative displacement
        bic t1,t1,#0xff<<24  // restrict to displacement field
        orr t1,t1,t2  // re-combine
        str t1,[ptr,len,lsl #2]
tst_unf:
        cmp len,#0
        bne top_unf
        mov pc,lr

        .unreq ptr
        .unreq len
        .unreq cto
        .unreq fid

#if DEBUG  /*{*/
TRACE_BUFLEN=512
trace:
        str lr,[sp,#(-1+ 15)*4]  @ return pc; [remember: sp is not stored]
        mov r4,sp  @ &saved_r0
        sub sp,sp,#TRACE_BUFLEN
        mov r2,sp  @ output string

        mov r1,#'\n'; bl trace_hex  @ In: r0 as label
        mov r1,#'>';  strb r1,[r2],#1

        mov r5,#3  @ rows to print
L600:  @ each row
        sub r0,r4,#TRACE_BUFLEN
        sub r0,r0,sp
        mov r0,r0,lsr #2; mov r1,#'\n'; bl trace_hex  @ which block of 8

        mov r6,#8  @ words per row
L610:  @ each word
        ldr r0,[r4],#4; mov r1,#' '; bl trace_hex  @ next word
        subs r6,r6,#1; bgt L610

        subs r5,r5,#1; bgt L600

        mov r0,#'\n'; strb r0,[r2],#1
        sub r2,r2,sp  @ count
        mov r1,sp  @ buf
        mov r0,#2  @ FD_STDERR
#if defined(ARMEL_EABI4)  /*{*/
        mov r7,#__NR_write
        swi 0
#else  /*}{*/
        swi __NR_write
#endif  /*}*/
        add sp,sp,#TRACE_BUFLEN
        ldmia sp!,{TRACE_REGS}

trace_hex:  // In: r0=val, r1=punctuation before, r2=ptr; Uses: r3, ip
        strb r1,[r2],#1  @ punctuation
        mov r3,#4*(8 -1)  @ shift count
        adr ip,hex
L620:
        mov r1,r0,lsr r3
        and r1,r1,#0xf
        ldrb r1,[ip, r1]
        strb r1,[r2],#1
        subs r3,r3,#4; bge L620
        ret
hex:
        .ascii "0123456789


// AForge Direct Show Library
// AForge.NET framework
//
// Copyright © Andrew Kirillov, 2020
// andrew.kirillov@gmail.com
//

namespace AForge.Video.DirectShow.Internals
{
    using System;
    using System.Runtime.InteropServices;

    /// <summary>
    /// This interface enumerates a pin's preferred media types.
    /// </summary>
    ///
    [ComImport,
    Guid( "89C31040-846B-11CE-97D3-00AA0055595A" ),
    InterfaceType( ComInterfaceType.InterfaceIsIUnknown )]
    internal interface IEnumMediaTypes
    {
        /// <summary>
        /// Retrieves a specified number of media types.
        /// </summary>
        ///
        /// <param name="cMediaTypes">The number of media types to retrieve.</param>
        /// <param name="mediaTypes">Array of media types to fill in.</param>
        /// <param name="typesFetched">Receives the number of media types returned.</param>
        ///
        /// <returns>Return's <b>HRESULT</b> error code.</returns>
        ///
        [PreserveSig]
        int Next( [In] int cMediaTypes,
            [In, Out, MarshalAs( UnmanagedType.Cust


%",
					"+1.1%"
				},
				{
					"12.7%",
					"+1.1%"
				},
				{
					"13.8%",
					"+1.2%"
				},
				{
					"15.0%"
				}
			}
		}
	},
	[14420] = {
		desc_get = "",
		name = "南西を吹くマエストラーレ",
		type = 1,
		max_level = 10,
		desc = "自身以外の所属艦隊がダメージを受けた場合30%で発動：特殊弾幕$1を展開する（威力はスキルレベルによる・このスキルは15秒間に一度しか発動できない）",
		id = 14420,
		system_transform = {},
		world_death_mark = {
			1
		},
		desc_get_add = {
			{
				"Lv.1",
				"Lv.10"
			}
		},
		desc_add = {
			{
				{
					"Lv.1"
				},
				{
					"Lv.2"
				},
				{
					"Lv.3"
				},
				{
					"Lv.4"
				},
				{
					"Lv.5"
				},
				{
					"Lv.6"
				},
				{
					"Lv.7"
				},
				{
					"Lv.8"
				},
				{
					"Lv.9"
				},
				{
					"Lv.10"
				}
			}
		}
	},
	[14430] = {
		desc_get = "",
		name = "水兵は南西へ！",
		type = 2,
		max_level = 10,
		desc = "自身の速力が5アップ。所属艦隊に自身以外のサディア艦船がいる場合、自身の対空・回避が$1アップ",
		id = 14430,
		system_transform = {},
		world_death_mark = {
			1
		},
		desc_get_add = {
			{
				"5.0%",
				"15.0%"
			}
		},
		desc_add = {
			{
				{
					"5.0%",
					"+1.1%"
				},
				{
					"6.1%",
					"+1.1%"
				},
				{
					"7.2%",
					"+1.1%"
				},
				{
					"8.3%",
					"+1.1%"
				},
				{
					"9.4%",
					"+1.1%"
				},
				{
					"10.5%",
					"+1.1%"
				},
				{
					"11.6%",
					"+1.1%"
				},
				{
					"12.7%",
					"+1.1%"
				},
				{
					"13.8%",
					"+1.2%"
				},
				{
					"15.0%"
				}
			}
		}
	},
	[14440] = {
		desc_get = "",
		name = "航海士の冒険センス",
		type = 2,
		max_level = 10,
		desc = "自身が所属する艦隊が海域に出撃し3回目の戦闘まで、自身の対空・回避が$1、速力が5アップ；自身の所属艦隊が敵艦隊を撃破する度に、戦闘中自身の火力・雷装・装填が$2アップ（最大3回まで加算可能）",
		id = 14440,
		system_transform = {},
		world_death_mark = {
			1
		},
		desc_get_add =


hal'trak, à Kargath. Fouiller les différentes grottes et mines du Rocher des Cognepeurs."}},
[3823] = {"Exterminer les Brûlentrailles", nil, {"Tuer 15 Ogres-mages brûlentrailles, 7 Ogres brûlentrailles et 7 Brutes brûlentrailles."}},
[3824] = {"Le seigneur-brute Gor'tesh", nil, {"Trouver la Tête coupée de Gor'tesh."}},
[3845] = {"C'est un secret pour tout le monde", nil, {"Examiner les objets du paquet et les apporter à leur propriétaire."}},
[3861] = {"COT-COT-CODEC !", nil, {"Trouver de la Nourriture spéciale pour poulet et l'apporter à la poule que vous voulez aider. Lorsque vous l'aurez trouvée, encouragez-la (/acclame) avant d'essayer de lui donner la Nourriture spéciale pour poulet."}},
[3881] = {"Le sauvetage de l'expédition", nil, {"Apporter une Caisse de nourriture et de l’Équipement de recherche à Williden Marshal dans le Cratère d'Un'Goro."}},
[3882] = {"Faites rouler les os", nil, {"Apporter 8 Os de dinosaure à Étincelle Minerien, au cratère d'Un'Goro."}},
[3883] = {"Écologie étrangère", nil, {"Utiliser la Fiole de raclement pour récolter un Échantillon de paroi de la ruche dans une des nurseries de la ruche Gorishi, à l'intérieur du cratère d'Un'Goro. Chercher les chambres qui contiennent des larves suspendues.\n\nApporter l'Échantillon de paroi de la ruche à Hol'anyee Marshal dans le cratère d'Un'Goro."}},
[3884] = {"Le journal de Williden", nil, {"Rapporter le Journal à Williden Marshal quelque part dans le Cratère d'Un'Goro."}},
[3901] = {"Faites cliqueter les thorax !", nil, {"Tuez 8 Squelettes cliquethorax."}},
[3902] = {"La chasse aux trésors", nil, {"Fouiller Le Glas et ses alentours pour trouver 6 caisses de Fournitures de récupération, et les ramener au Nécrogarde Saltain."}},
[3903] = {"Milly Osworth", nil, {"Parler à Milly Osworth."}},
[3904] = {"La récolte de Milly", nil, {"Apportez 8 seaux de la récolte de Milly à Milly Osworth, à l'Abbaye de Comté-du-Nord."}},
[3905] = {"Le manifeste des vendanges", nil, {"Apportez le Manifeste des vendanges à Frère Neals dans l'Abbaye de Comté-du-Nord."}},
[3906] = {"Discordance des flammes", nil, {"Partir pour la carrière dans le mont Rochenoire et tuer le Grand seigneur Pyron. Retourner voir Cœur-de-tonnerre une fois votre mission accomplie."}},
[3907] = {"Discordance des flammes", nil, {"Pénétrez dans les Profondeurs de Rochenoire et traquez le Seigneur Incendius. Tuez-le puis donner tous les renseignements que vous pourrez trouver à Cœur-de-tonnerre."}},
[3908] = {"C'est un secret pour tout le monde", nil, {"Apporter l'Epée de Linken à Donova Antreneige au Berceau-de-l'Hiver."}},
[3909] = {"L'élixir de Videre", nil,


*

     * This checks if this date-time can be queried for the specified field.
     * If false, then calling the {@link #range(TemporalField) range},
     * {@link #get(TemporalField) get} and {@link #with(TemporalField, long)}
     * methods will throw an exception.
     *

     * If the field is a {@link ChronoField} then the query is implemented here.
     * The supported fields are:
     *

     *
{@code NANO_OF_SECOND}
     *
{@code NANO_OF_DAY}
     *
{@code MICRO_OF_SECOND}
     *
{@code MICRO_OF_DAY}
     *
{@code MILLI_OF_SECOND}
     *
{@code MILLI_OF_DAY}
     *
{@code SECOND_OF_MINUTE}
     *
{@code SECOND_OF_DAY}
     *
{@code MINUTE_OF_HOUR}
     *
{@code MINUTE_OF_DAY}
     *
{@code HOUR_OF_AMPM}
     *
{@code CLOCK_HOUR_OF_AMPM}
     *
{@code HOUR_OF_DAY}
     *
{@code CLOCK_HOUR_OF_DAY}
     *
{@code AMPM_OF_DAY}
     *
{@code DAY_OF_WEEK}
     *
{@code ALIGNED_DAY_OF_WEEK_IN_MONTH}
     *
{@code ALIGNED_DAY_OF_WEEK_IN_YEAR}
     *
{@code DAY_OF_MONTH}
     *
{@code DAY_OF_YEAR}
     *
{@code EPOCH_DAY}
     *
{@code ALIGNED_WEEK_OF_MONTH}
     *
{@code ALIGNED_WEEK_OF_YEAR}
     *
{@code MONTH_OF_YEAR}
     *
{@code PROLEPTIC_MONTH}
     *
{@code YEAR_OF_ERA}
     *
{@code YEAR}
     *
{@code ERA}
     *
{@code INSTANT_SECONDS}
     *
{@code OFFSET_SECONDS}
     *

     * All other {@code ChronoField} instances will return false.
     *

     * If the field is not a {@code ChronoField}, then the result of this method
     * is obtained by invoking {@code TemporalField.isSupportedBy(TemporalAccessor)}
     * passing {@code this} as the argument.
     * Whether the field is supported is determined by the field.
     *
     * @param field  the field to check, null returns false
     * @return true if the field is supported on this date-time, false if not
     */
    @Override
    public boolean isSupported(TemporalField field) {
        return field instanceof ChronoField || (field != null && field.isSupportedBy(this));
    }

    /**
     * Checks if the specified unit is supported.
     *

     * This checks if the specified unit can be added to, or subtracted from, this date-time.
     * If false, then calling the {@link #plus(long, TemporalUnit)} and
     * {@link #minus(long, TemporalUnit) minus} methods will throw an exception.
     *

     * If the unit is a {@link ChronoUnit} then the query is implemented here.
     * The supported units are:
     *

     *
{@code NANOS}
     *
{@code MICROS}
     *
{@code MILLIS}
     *
{@code SECONDS}
     *
{@code MINUTES}
     *
{@code HOURS}
     *
{@code HALF_DAYS}
     *
{@code DAYS}
     *
{@code WEEKS}
     *
{@code MONTHS}
     *
{@code YEARS}
     *
{@code DECADES}
     *
{@code CENTURIES}
     *
{@code MILLENNIA}
     *
{@code ERAS}
     *

     * All other {@code ChronoUnit} instances will return false.
     *

     * If the unit is not a {@code ChronoUnit}, then the result of this method
     * is obtained by invoking {@code TemporalUnit.isSupportedBy(Temporal)}
     * passing {@code this} a


 ( 120 ),
		GAMES_PLAYED_5              ( 121, true ),
		HIGH_SCORE_5                ( 122 ),
		CHAMPION_2                  ( 123 ),
		CHAMPION_3                  ( 124 ),
		CYCLE_1                 ( 125, true ),
		CYCLE_2                 ( 126, true ),
		CYCLE_3                 ( 127, true ),
		CYCLE_4                 ( 128, true ),
		SCROLL_DENIAL           ( 130 ),
		POTION_DENIAL           ( 129 ),

		//Arena Masters series
		SECOND_ARENA_MASTER			( 22 ),
		THIRD_ARENA_MASTER			( 86 ),
		FOURTH_ARENA_MASTER 		( 122 );

		public boolean meta;

		public int image;

		Badge( int image ) {
			this( image, false );
		}

		Badge( int image, boolean meta ) {
			this.image = image;
			this.meta = meta;
		}

		public String title(){
			return Messages.get(this, name()+".title");
		}

		public String desc(){
			return Messages.get(this, name()+".desc");
		}

		Badge() {
			this( -1 );
		}
	}

	private static HashSet<Badge> global;
	private static HashSet<Badge> local = new HashSet<>();

	private static boolean saveNeeded = false;

	public static void reset() {
		local.clear();
		loadGlobal();
	}

	public static final String BADGES_FILE	= "badges.dat";
	private static final String BADGES		= "badges";

	private static final HashSet<String> removedBadges = new HashSet<>();
	static{
		//v1.3.0 (These were removed and re-added internally as new unlock reqs were added)
		removedBadges.add("YASD");
		removedBadges.add("DEATH_FROM_GLYPH");
	}

	private static final HashMap<String, String> renamedBadges = new HashMap<>();
	static{
		//no renamed badges currently
	}

	public static HashSet<Badge> restore( Bundle bundle ) {
		HashSet<Badge> badges = new HashSet<>();
		if (bundle == null) return badges;

		String[] names = bundle.getStringArray( BADGES );
		if (names == null) return badges;

		for (int i=0; i < names.length; i++) {
			try {
				if (renamedBadges.containsKey(names[i])){
					names[i] = renamedBadges.get(names[i]);
				}
				if (!removedBadges.contains(names[i])){
					badges.add( Badge.valueOf( names[i] ) );
				}
			} catch (Exception e) {
				ShatteredPixelDungeon.reportException(e);
			}
		}

		addReplacedBadges(badges);

		return badges;
	}

	public static void store( Bundle bundle, HashSet<Badge> badges ) {
		addReplacedBadges(badges);

		int count = 0;
		String names[] = new String[badges.size()];

		for (Badge badge:badges) {
			names[count++] = badge.name();
		}
		bundle.put( BADGES, names );
	}

	public static void loadLocal( Bundle bundle ) {
		local = restore( bundle );
	}

	public static void saveLocal( Bundle bundle ) {
		store( bundle, local );
	}


	var cursors [][]byte
	for _, engineCursor := range job.GetReplayCursors() {
		cursors = append(cursors, wrapCursor(WarehouseCursorType, job.GetJobID(), engineCursor))
	}

	// coalesce GetReferencedInstances with analyzeJob
	referencedInstances := job.GetReferencedInstances()
	if analyzeJob != nil && len(referencedInstances) == 0 {
		referencedInstances = analyzeJob.GetReferencedInstances()
	}

	referencedInstanceIDs := make([]uuid.UUID, len(referencedInstances))
	for idx, instanceID := range referencedInstances {
		referencedInstanceIDs[idx] = instanceID.GetTableInstanceID()
	}

	res := &WarehouseJob{
		JobID:               job.GetJobID(),
		Status:              job.GetStatus(),
		Error:               job.GetError(),
		ResultAvroSchema:    job.GetResultAvroSchema(),
		ReplayCursors:       cursors,
		ReferencedInstances: referencedInstanceIDs,
		BytesScanned:        job.GetBytesScanned(),
		ResultSizeBytes:     job.GetResultSizeBytes(),
		ResultSizeRecords:   job.GetResultSizeRecords(),
	}

	// coalesce GetResultAvroSchema with analyzeJob
	if analyzeJob != nil && res.ResultAvroSchema == "" {
		res.ResultAvroSchema = analyzeJob.GetResultAvroSchema()
	}

	// coalesce GetBytesScanned with analyzeJob
	if analyzeJob != nil && res.BytesScanned == 0 {
		res.BytesScanned = analyzeJob.GetBytesScanned()
	}

	return res
}
/*
Copyright (C) 2025  Ben Fiola

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

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

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
package operator

import (
	"context"
	"fmt"
	"reflect"
	"slices"
	"time"

	v1 "github.com/benfiola/minio-operator-ext/pkg/api/bfiola.dev/v1"
	"github.com/go-logr/logr"
	"github.com/minio/madmin-go/v3"
	"sigs.k8s.io/controller-runtime/pkg/builder"
	"sigs.k8s.io/controller-runtime/pkg/client"
	"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
	"sigs.k8s.io/controller-runtime/pkg/manager"
	"sigs.k8s.io/controller-runtime/pkg/reconcile"
)

// minioGroupBindingReconciler reconciles [v1.MinioGroupBinding] resources
type minioGroupBindingReconciler struct {
	client.Client
	logger                 logr.Logger
	minioOperatorNamespace string
	syncInterval           time.Duration
}

// Builds a controller with a [minioGroupBindingReconciler].
// Registers this controller with a [manager.Manager] instance.
// Returns an error if a controller cannot be built.
func (r *minioGroupBindingReconciler) register(m manager.Manager) error {
	r.Client = m.GetClient()
	ctrl, err := builder.ControllerManagedBy(m).For(&v1.MinioGroupBinding{}).Bu


To avoid any confusion, as well as to maintain compatibility with a large
///  number of software libraries, the quaternions represented using the protocol
///  buffer below *must* follow the Hamilton convention, which defines `ij = k`
///  (i.e. a right-handed algebra), and therefore:
///
///      i^2 = j^2 = k^2 = ijk = −1
///      ij = −ji = k
///      jk = −kj = i
///      ki = −ik = j
///
///  Please DO NOT use this to represent quaternions that follow the JPL
///  convention, or any of the other quaternion flavors out there.
///
///  Definitions:
///
///    - Quaternion norm (or magnitude): `sqrt(x^2 + y^2 + z^2 + w^2)`.
///    - Unit (or normalized) quaternion: a quaternion whose norm is 1.
///    - Pure quaternion: a quaternion whose scalar component (`w`) is 0.
///    - Rotation quaternion: a unit quaternion used to represent rotation.
///    - Orientation quaternion: a unit quaternion used to represent orientation.
///
///  A quaternion can be normalized by dividing it by its norm. The resulting
///  quaternion maintains the same direction, but has a norm of 1, i.e. it moves
///  on the unit sphere. This is generally necessary for rotation and orientation
///  quaternions, to avoid rounding errors:
///  https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions
///
///  Note that `(x, y, z, w)` and `(-x, -y, -z, -w)` represent the same rotation,
///  but normalization would be even more useful, e.g. for comparison purposes, if
///  it would produce a unique representation. It is thus recommended that `w` be
///  kept positive, which can be achieved by changing all the signs when `w` is
///  negative.
class Quaternion extends $pb.GeneratedMessage {
  factory Quaternion({
    $core.double? x,
    $core.double? y,
    $core.double? z,
    $core.double? w,
  }) {
    final $result = create();
    if (x != null) {
      $result.x = x;
    }
    if (y != null) {
      $result.y = y;
    }
    if (z != null) {
      $result.z = z;
    }
    if (w != null) {
      $result.w = w;
    }
    return $result;
  }
  Quaternion._() : super();
  factory Quaternion.fromBuffer($core.List<$core.int> i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(i, r);
  factory Quaternion.fromJson($core.String i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'Quaternion',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'google.type'),
      createEmptyInstance: create)
    ..a<$core.double>(1, _omitFieldNames ? '' : 'x', $pb.PbFieldType.OD)
    ..a<$core.double>(2, _omitFieldNames ? '' : 'y', $pb.PbFieldType.OD)
    ..a<$core.double>(3, _omitFieldNames ? '' : 'z', $pb.PbFieldType.OD)
    ..a<$core.double>(4, _omitFieldNames ? '' : 'w', $pb.PbFieldType.OD)
    ..hasRequiredFields = f


       ADD_OP_CODE => 3,
            MUL_OP_CODE => 3,
            JMP_TRUE_OP_CODE => 2,
            JMP_FALSE_OP_CODE => 2,
            LESS_THAN_OP_CODE => 3,
            EQUALS_OP_CODE => 3,
            INPUT_OP_CODE => 0,
            OUTPUT_OP_CODE => 1,
            HALT_OP_CODE => 0,
            _ => 0,
        };

        let param_modes_vec: Vec<_> = std::iter::repeat(0)
            .chain(digits.into_iter())
            .rev()
            .skip(2)
            .take(num_args)
            .map(|x| ParamMode::try_from(x).unwrap())
            .collect();

        match op_code_value as isize {
            ADD_OP_CODE => Add(param_modes_vec),
            MUL_OP_CODE => Mul(param_modes_vec),
            JMP_TRUE_OP_CODE => Jt(param_modes_vec),
            JMP_FALSE_OP_CODE => Jf(param_modes_vec),
            LESS_THAN_OP_CODE => Lt(param_modes_vec),
            EQUALS_OP_CODE => Eq(param_modes_vec),
            INPUT_OP_CODE => In,
            OUTPUT_OP_CODE => Out(param_modes_vec),
            HALT_OP_CODE => Halt,
            _ => Er(code),
        }
    }
}

#[derive(Debug)]
enum TapeError {
    WriteOutOfRangeError,
    ReadOutOfRangeError,
}

struct Tape(Vec<isize>);

impl Tape {
    fn new(input: Vec<isize>) -> Self {
        Tape(input)
    }

    fn len(&self) -> usize {
        self.0.len()
    }

    fn write(&mut self, position: usize, value: isize) -> Result<(), TapeError> {
        if self.0.len() < position {
            return Err(TapeError::WriteOutOfRangeError);
        }

        self.0[position] = value;
        Ok(())
    }

    fn read(&self, position: usize) -> Result<isize, TapeError> {
        if self.0.len() < position {
            return Err(TapeError::ReadOutOfRangeError);
        }

        Ok(self.0[position])
    }
}

#[derive(Debug)]
enum IntcodeMachineError {
    TapeOutOfBoundsError,
    ExecutionFailure,
}

impl From<TapeError> for IntcodeMachineError {
    fn from(_: TapeError) -> Self {
        IntcodeMachineError::TapeOutOfBoundsError
    }
}

impl From<OpCodeExecutionError> for IntcodeMachineError {
    fn from(_: OpCodeExecutionError) -> Self {
        IntcodeMachineError::ExecutionFailure
    }
}

struct IntcodeMachine {
    tape: Tape,
    head_position: usize,
    output: isize,
}

impl IntcodeMachine {
    fn new(tape: Tape) -> Self {
        IntcodeMachine {
            tape,
            head_position: 0,
            output: 0,
        }
    }

    fn update_head(&mut self, val: HeadPositionUpdate) -> Result<(), IntcodeMachineError> {
        // check if new head is within 0..tape.len()
        if !(0..self.tape.len()).contains(&val) {
            return Err(IntcodeMachineError::TapeOutOfBoundsError);
        }

        self.head_position = val;
        Ok(())
    }

    fn run(&mut self) -> Result<isize, IntcodeMachineError> {
        loop {
            let op = OpCode::from(self.tape.read(self.head_position)?);
            let head_update = match op.execute(&mut self.tape, self.head_position) {
                Err(err) => match err {
                    OpCodeExecutionError::ExecutionFinished => {


at
private constructor() {
    /**
     * The read-only **`WebGLShaderPrecisionFormat.precision`** property returns the number of bits of precision that can be represented.
     *
     * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLShaderPrecisionFormat/precision)
     */
    val precision: GLint

    /**
     * The read-only **`WebGLShaderPrecisionFormat.rangeMax`** property returns the base 2 log of the absolute value of the maximum value that can be represented.
     *
     * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLShaderPrecisionFormat/rangeMax)
     */
    val rangeMax: GLint

    /**
     * The read-only **`WebGLShaderPrecisionFormat.rangeMin`** property returns the base 2 log of the absolute value of the minimum value that can be represented.
     *
     * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLShaderPrecisionFormat/rangeMin)
     */
    val rangeMin: GLint
}
// Automatically generated - do not modify!

package web.gl

import js.reflect.unsafeCast
import web.rendering.OffscreenRenderingContext
import web.rendering.RenderingContext
import web.rendering.RenderingContextId

sealed /* final */
external class WebGL2RenderingContext
protected /* private */ constructor() :
    WebGL2RenderingContextBase,
    WebGL2RenderingContextOverloads,
    WebGLRenderingContextBase,
    OffscreenRenderingContext,
    RenderingContext {

    companion object {
        val READ_BUFFER: GLenum
        val UNPACK_ROW_LENGTH: GLenum
        val UNPACK_SKIP_ROWS: GLenum
        val UNPACK_SKIP_PIXELS: GLenum
        val PACK_ROW_LENGTH: GLenum
        val PACK_SKIP_ROWS: GLenum
        val PACK_SKIP_PIXELS: GLenum
        val COLOR: GLenum
        val DEPTH: GLenum
        val STENCIL: GLenum
        val RED: GLenum
        val RGB8: GLenum
        val RGB10_A2: GLenum
        val TEXTURE_BINDING_3D: GLenum
        val UNPACK_SKIP_IMAGES: GLenum
        val UNPACK_IMAGE_HEIGHT: GLenum
        val TEXTURE_3D: GLenum
        val TEXTURE_WRAP_R: GLenum
        val MAX_3D_TEXTURE_SIZE: GLenum
        val UNSIGNED_INT_2_10_10_10_REV: GLenum
        val MAX_ELEMENTS_VERTICES: GLenum
        val MAX_ELEMENTS_INDICES: GLenum
        val TEXTURE_MIN_LOD: GLenum
        val TEXTURE_MAX_LOD: GLenum
        val TEXTURE_BASE_LEVEL: GLenum
        val TEXTURE_MAX_LEVEL: GLenum
        val MIN: GLenum
        val MAX: GLenum
        val DEPTH_COMPONENT24: GLenum
        val MAX_TEXTURE_LOD_BIAS: GLenum
        val TEXTURE_COMPARE_MODE: GLenum
        val TEXTURE_COMPARE_FUNC: GLenum
        val CURRENT_QUERY: GLenum
        val QUERY_RESULT: GLenum
        val QUERY_RESULT_AVAILABLE: GLenum
        val STREAM_READ: GLenum
        val STREAM_COPY: GLenum
        val STATIC_READ: GLenum
        val STATIC_COPY: GLenum
        val DYNAMIC_READ: GLenum
        val DYNAMIC_COPY: GLenum
        val MAX_DRAW_BUFFERS: GLenum
        val DRAW_BUFFER0: GLenum
        val DRAW_BUFFER1: GLenum
        val DRAW_BUFFER2: GLenum
        val DRAW_BUFFER3: GLenum
        val DRAW_BUFFER4: GLenum
        val DRAW_BUFFER5: GLenum
        val DRAW_BUFFER6: GLenum


that determines the scaling of child controls.

"""

 ShowCheckMargin=property(lambda self: object(),lambda self,v: None,lambda self: None)
 """Gets or sets a value indicating whether space for a check mark is shown on the left edge of the System.Windows.Forms.ToolStripMenuItem.

Get: ShowCheckMargin(self: ToolStripDropDownMenu) -> bool

Set: ShowCheckMargin(self: ToolStripDropDownMenu)=value

"""

 ShowFocusCues=property(lambda self: object(),lambda self,v: None,lambda self: None)
 """Gets a value indicating whether the control should display focus rectangles.

"""

 ShowImageMargin=property(lambda self: object(),lambda self,v: None,lambda self: None)
 """Gets or sets a value indicating whether space for an image is shown on the left edge of the System.Windows.Forms.ToolStripMenuItem.

Get: ShowImageMargin(self: ToolStripDropDownMenu) -> bool

Set: ShowImageMargin(self: ToolStripDropDownMenu)=value

"""

 ShowKeyboardCues=property(lambda self: object(),lambda self,v: None,lambda self: None)
 """Gets a value indicating whether the user interface is in the appropriate state to show or hide keyboard accelerators.

"""

 TopMost=property(lambda self: object(),lambda self,v: None,lambda self: None)
 """Gets or sets a value indicating whether the form should be displayed as a topmost form.

"""

 VScroll=property(lambda self: object(),lambda self,v: None,lambda self: None)
 """Gets or sets a value indicating whether the vertical scroll bar is visible.

"""


028797018963968,
    72057594037927936,
    144115188075855872,
    288230376151711744,
    576460752303423488,
    1152921504606846976,
    2305843009213693952,
    4611686018427387904,
    9223372036854775808,
];
pub(super) const POW4: [u64; 32] = [
    1,
    4,
    16,
    64,
    256,
    1024,
    4096,
    16384,
    65536,
    262144,
    1048576,
    4194304,
    16777216,
    67108864,
    268435456,
    1073741824,
    4294967296,
    17179869184,
    68719476736,
    274877906944,
    1099511627776,
    4398046511104,
    17592186044416,
    70368744177664,
    281474976710656,
    1125899906842624,
    4503599627370496,
    18014398509481984,
    72057594037927936,
    288230376151711744,
    1152921504606846976,
    4611686018427387904,
];
pub(super) const POW8: [u64; 22] = [
    1,
    8,
    64,
    512,
    4096,
    32768,
    262144,
    2097152,
    16777216,
    134217728,
    1073741824,
    8589934592,
    68719476736,
    549755813888,
    4398046511104,
    35184372088832,
    281474976710656,
    2251799813685248,
    18014398509481984,
    144115188075855872,
    1152921504606846976,
    9223372036854775808,
];
pub(super) const POW16: [u64; 16] = [
    1,
    16,
    256,
    4096,
    65536,
    1048576,
    16777216,
    268435456,
    4294967296,
    68719476736,
    1099511627776,
    17592186044416,
    281474976710656,
    4503599627370496,
    72057594037927936,
    1152921504606846976,
];
pub(super) const POW32: [u64; 13] = [
    1,
    32,
    1024,
    32768,
    1048576,
    33554432,
    1073741824,
    34359738368,
    1099511627776,
    35184372088832,
    1125899906842624,
    36028797018963968,
    1152921504606846976,
];
#[doc = "Reader of register LEAS0STAT"]
pub type R = crate::R<u32, super::LEAS0STAT>;
#[doc = "Writer for register LEAS0STAT"]
pub type W = crate::W<u32, super::LEAS0STAT>;
#[doc = "Register LEAS0STAT `reset()`'s with value 0"]
impl crate::ResetValue for super::LEAS0STAT {
    type Type = u32;
    #[inline(always)]
    fn reset_value() -> Self::Type {
        0
    }
}
impl R {}
impl W {}
<reponame>lakwet/voracious_sort
use super::super::{RadixKey, Radixable};
use super::utils::Params;

const TRY_THRESHOLD: u8 = 32;

/// # Insertion sort
///
/// An implementation of the
/// [Insertion sort](https://en.wikipedia.org/wiki/Insertion_sort)
/// algorithm.
pub fn insertion_sort<T: PartialOrd>(arr: &mut [T]) {
    for i in 1..arr.len() {
        if arr[i - 1] > arr[i] {
            let mut j = i;
            while j > 0 && arr[j - 1] > arr[j] {


dn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/c1f9eecd1d0b411315f2e698e953a52d.jpg?bg=BCCBD7",
        "action": {
            "log_code": "30000001110005001"
        },
        "product_comment": "小米空气净化器、小米空气净化器 2、米家空气净化器 Pro 通用 / 3层高效净化悬浮物 / 可吸入颗粒物、甲醛与异味",
        "tag_img": ""
    },
    {
        "id": "5253",
        "stand_img_id": "8878121",
        "name": "米家空气净化器滤芯 抗菌版",
        "market_price_max": "159.00",
        "market_price_min": "159.00",
        "price_max": "159.00",
        "price_min": "159.00",
        "has_store": "1",
        "is_cos": false,
        "img_url": "//cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/627e742506047f3fe2971d4d87e10924.jpg",
        "action": {
            "log_code": "30000001110006001"
        },
        "product_comment": "抗菌率达99%以上 / 过滤PM2.5细颗粒物 / 活性炭有效吸附甲醛",
        "tag_img": ""
    },
    {
        "id": "5439",
        "stand_img_id": "8883808",
        "name": "米家车载空气净化器滤芯",
        "market_price_max": "49.00",
        "market_price_min": "49.00",
        "price_max": "49.00",
        "price_min": "49.00",
        "has_store": "0",
        "is_cos": true,
        "img_url": "//cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/192b741dd0b17b301bd7955bb5e7a7f5.jpg?bg=65A0B7",
        "action": {
            "log_code": "30000001110007001"
        },
        "product_comment": "【4月6日0点 首卖】</font>PET初效滤网 / H11高效过滤器 / 360°桶形设计",
        "tag_img": "//cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/89854765948bdb494f85deeab661a53e.png?bg=95C85E"
    },
    {
        "id": "4117",
        "stand_img_id": "6700405",
        "name": "USB-C至HDMI多功能转接器",
        "market_price_max": "149.00",
        "market_price_min": "149.00",
        "price_max": "149.00",
        "price_min": "149.00",
        "has_store": "1",
        "is_cos": false,
        "img_url": "//cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/c01573cec4d3363d7efd511cbf7cfbc1.jpg",
        "action": {
            "log_code": "30000001110001001"
        },
        "product_comment": "一举多得的转接器，


8 0.11978,0.30748 0.35658,-0.03 0.57586,4.162 -1.74364,0.265 -0.0392,-0.121 -5.54116,0.25 -0.72919,-0.118 -0.82725,-6.461"},"39003":{"name":"Allen, OH","path":"m 732.06062,231.29414 0.30309,2.307 0.51703,4.024 -3.90935,0.63242 -0.0152,-0.28642 -2.00884,0.121 -0.0856,-0.669 -2.98809,0.396 -0.33173,-2.83037 0.99134,-0.23716 -0.18715,-1.05647 3.96078,-0.48729 -0.0279,-1.02157 1.83947,-0.26691 -0.0172,-0.36023 1.95937,-0.265"},"39063":{"name":"Hancock, OH","path":"m 731.32251,225.61214 7.85711,-0.997 0.54734,4.003 -0.69063,0.0897 0.11374,1.07794 -0.36889,0.0438 0.2045,0.96082 -0.66882,0.15645 0.29759,1.88232 -6.25074,0.772 -0.30309,-2.307 -0.73811,-5.682"},"39137":{"name":"Putnam, OH","path":"m 731.32251,225.61214 0.73811,5.682 -1.95937,0.265 0.0172,0.36023 -1.83947,0.26691 0.0279,1.02157 -3.96078,0.48729 -0.13196,-0.8291 -0.92579,0.17644 -0.31684,-2.24034 0.96136,-0.17734 -0.46038,-3.96866 1.92729,-0.251 5.92269,-0.793"},"39161":{"name":"Van Wert, OH","path":"m 716.05401,231.66314 6.91754,-0.861 0.31684,2.24034 0.92579,-0.17644 0.13196,0.8291 0.18715,1.05647 -0.99134,0.23716 0.33173,2.83037 -1.01624,0.127 -0.1086,-0.97332 -5.96563,0.69332 -0.542,-4.468 -0.1872,-1.535"},"39099":{"name":"Mahoning, OH","path":"m 788.74875,218.21114 0.82904,5.151 -5.32369,0.78603 -0.13898,-0.71754 -1.19715,0.056 0.099,0.83372 -3.12019,0.52679 -0.30487,-1.942 1.4066,-0.22808 -0.45989,-3.33892 8.1798,-1.312 0.0303,0.185"},"39133":{"name":"Portage, OH","path":"m 773.1219,215.47114 6.61444,-1.022 0.8023,4.889 0.45989,3.33892 -1.4066,0.22808 -5.23629,0.812 -1.24088,-8.246 0.007,0"},"39153":{"name":"Summit, OH","path":"m 773.11476,215.47114 1.24088,8.246 -0.53627,0.10691 0.35156,1.72591 -3.89271,0.52718 -0.26078,-1.70951 -0.68949,0.11251 -0.9467,-6.615 2.03247,-0.321 -0.52238,-0.941 -0.29061,-0.649 3.51403,-0.483"},"39103":{"name":"Medina, OH","path


ColorCorrectionAberrationMode.FAST -> CameraMetadata.COLOR_CORRECTION_ABERRATION_MODE_FAST
        ColorCorrectionAberrationMode.HIGH_QUALITY ->
            CameraMetadata.COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY

        null -> null
    }
)

@androidx.camera.camera2.interop.ExperimentalCamera2Interop
fun CaptureRequestOptions.Builder.setDistortionCorrectionMode(
    distortionCorrectionMode: DistortionCorrectionMode?
) = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
    setOrClearCaptureRequestOption(
        CaptureRequest.DISTORTION_CORRECTION_MODE,
        when (distortionCorrectionMode) {
            DistortionCorrectionMode.OFF -> CameraMetadata.DISTORTION_CORRECTION_MODE_OFF
            DistortionCorrectionMode.FAST -> CameraMetadata.DISTORTION_CORRECTION_MODE_FAST
            DistortionCorrectionMode.HIGH_QUALITY ->
                CameraMetadata.DISTORTION_CORRECTION_MODE_HIGH_QUALITY

            null -> null
        }
    )
} else {
    this
}

@androidx.camera.camera2.interop.ExperimentalCamera2Interop
fun CaptureRequestOptions.Builder.setHotPixelMode(
    hotPixelMode: HotPixelMode?
) = setOrClearCaptureRequestOption(
    CaptureRequest.HOT_PIXEL_MODE,
    when (hotPixelMode) {
        HotPixelMode.OFF -> CameraMetadata.HOT_PIXEL_MODE_OFF
        HotPixelMode.FAST -> CameraMetadata.HOT_PIXEL_MODE_FAST
        HotPixelMode.HIGH_QUALITY -> CameraMetadata.HOT_PIXEL_MODE_HIGH_QUALITY
        null -> null
    }
)
package expo.modules.whisperkitexpo.example

import android.os.Build
import android.os.Bundle

import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate

import expo.modules.ReactActivityDelegateWrapper

class MainActivity : ReactActivity() {
  override fun onCreate(savedInstanceState: Bundle?) {
    // Set the theme to AppTheme BEFORE onCreate to support
    // coloring the background, status bar, and navigation bar.
    // This is required for expo-splash-screen.
    setTheme(R.style.AppTheme);
    super.onCreate(null)
  }

  /**
   * Returns the name of the main component registered from JavaScript. This is used to schedule
   * rendering of the component.
   */
  override fun getMainComponentName(): String = "main"

  /**
   * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
   * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
   */
  override fun createReactActivityDelegate(): ReactActivityDelegate {
    return ReactActivityDelegateWrapper(
          this,
          BuildConfig.IS_NEW_ARCHITECTURE_ENABLED,
          object : DefaultReactActivityDelegate(
              this,
              mainComponentName,
              fabricEnabled
          ){})
  }

  /**
    * Align the back button behavior with Android S
    * where moving root activities to background instead of finishing activities.
    * @see onBackPressed
    */
  override fun invokeDefaultOnBackPressed() {
      if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) {
          if (!moveTaskToBack(false)) {
              // For non-root activities, use the default implementation to finish them.


isShowing());

		// remove notepad
		runSwing(() -> panel.removeTab(programs[0]));

		assertTrue(!window.isShowing());
	}

	@Test
	public void testResize() throws Exception {
		setFrameSize(500, 500);
		programNames = new String[] { "notepad", "login", "tms", "taskman", "TestGhidraSearches" };
		openPrograms(programNames);

		HiddenValuesButton control = findComponent(tool.getToolFrame(), HiddenValuesButton.class);
		assertNotNull(control);

		assertEquals(programNames.length, panel.getTabCount());
		assertEquals(2, panel.getVisibleTabs().size());
		assertEquals(3, panel.getHiddenTabs().size());

		setFrameSize(925, 500);

		control = findComponent(tool.getToolFrame(), HiddenValuesButton.class);

		assertNull(control);
		assertEquals(5, panel.getVisibleTabs().size());
		assertEquals(0, panel.getHiddenTabs().size());
	}

	@Test
	public void testTabUpdatesOnProgramChange() throws Exception {
		ProgramBuilder builder = new ProgramBuilder("notepad", ProgramBuilder._TOY);
		builder.createMemory("test", "0x0", 100);
		Program p = doOpenProgram(builder.getProgram(), true);
		p.setTemporary(false); // we need to be notified of changes
		// select notepad
		selectTab(p);
		int transactionID = p.startTransaction("test");
		try {
			SymbolTable symTable = p.getSymbolTable();
			symTable.createLabel(builder.addr("0x10"), "fred", SourceType.USER_DEFINED);
		}
		finally {
			p.endTransaction(transactionID, true);
		}
		p.flushEvents();
		runSwing(() -> panel.refreshTab(p));

		JPanel tab = panel.getTab(p);
		JLabel label = (JLabel) findComponentByName(tab, "Tab Label");
		assertTrue(label.getText().startsWith("*"));
	}

	@Test
	public void testSetSelectedObject() throws Exception {
		setFrameSize(400, 500);
		programNames = new String[] { "notepad", "login", "tms", "taskman", "TestGhidraSearches" };
		openPrograms(programNames);
		assertHidden(programs[1]);

		runSwing(() -> panel.selectTab(programs[1]));
		assertEquals(programs[1], getSelectedTabValue());
		assertShowing(programs[1]);
	}

	@Test
	public void testGoToLastProgramAction() throws Exception {

		openPrograms_HideLastOpened();

		Program startProgram = getSelectedTabValue();

		MultiTabPlugin plugin = env.getPlugin(MultiTabPlugin.class);
		DockingAction action =
			(DockingAction) TestUtils.getInstanceField("goToLastActiveProgramAction", plugin);
		assertTrue(!action.isEnabled());// disabled before we've changed tabs

		// select second tab
		JPanel tab = panel.getTab(programs[1]);
		Point p = tab.getLocationOnScreen();
		clickMouse(tab, MouseEvent.BUTTON1, p.x + 1, p.y + 1, 1, 0);
		assertEquals(programs[1], getSelectedTabValue());
		assertTrue(!startProgram.equals(getSelectedTabValue()));

		assertTrue(action.isEnabled());

		performAction(action, true);
		assertEquals(startProgram, getSelectedTabValue());
	}

	@Test
	public void testStateOnSwitch() throws Exception {
		tool.addPlugin(CodeBrowserPlugin.class.getName());
		setFrameSize(400, 500);

		Program p1 = openDummyProgram("notepad", true);
		Program p2 = openDummyProgram("login", true);

		ProgramManager programManager = tool.getService(ProgramManager.class);
		programManager.setCurrentProgram(p1);

		MarkerSet set = createMarkers(p1);
		CodeBrowserPlugin cb = env.getPlugin(CodeBrowserPlugin.class);
		FieldPanel fp = cb.getFiel