ur code:

```python
import torch
torch.backends.cuda.matmul.allow_tf32 = True
torch.backends.cudnn.allow_tf32 = True
```

CUDA will automatically switch to using tf32 instead of fp32 where possible, assuming that the used GPU is from the Ampere series.

According to [NVIDIA research](https://developer.nvidia.com/blog/accelerating-ai-training-with-tf32-tensor-cores/), the
majority of machine learning training workloads show the same perplexity and convergence with tf32 training as with fp32.
If you're already using fp16 or bf16 mixed precision it may help with the throughput as well.

You can enable this mode in the 🤗 Trainer:

```python
TrainingArguments(tf32=True, **default_args)
```

<Tip>

tf32 can't be accessed directly via `tensor.to(dtype=torch.tf32)` because it is an internal CUDA data type. You need `torch>=1.7` to use tf32 data types.

</Tip>

For additional information on tf32 vs other precisions, please refer to the following benchmarks:
[RTX-3090](https://github.com/huggingface/transformers/issues/14608#issuecomment-1004390803) and
[A100](https://github.com/huggingface/transformers/issues/15026#issuecomment-1004543189).

## Flash Attention 2

You can speedup the training throughput by using Flash Attention 2 integration in transformers. Check out the appropriate section in the [single GPU section](./perf_infer_gpu_one#Flash-Attention-2) to learn more about how to load a model with Flash Attention 2 modules.

## Optimizer choice

The most common optimizer used to train transformer models is Adam or AdamW (Adam with weight decay). Adam achieves
good convergence by storing the rolling average of the previous gradients; however, it adds an additional memory
footprint of the order of the number of model parameters. To remedy this, you can use an alternative optimizer.
For example if you have [NVIDIA/apex](https://github.com/NVIDIA/apex) installed for NVIDIA GPUs, or [ROCmSoftwarePlatform/apex](https://github.com/ROCmSoftwarePlatform/apex) for AMD GPUs, `adamw_apex_fused` will give you the
fastest training experience among all supported AdamW optimizers.

[`Trainer`] integrates a variety of optimizers that can be used out of box: `adamw_hf`, `adamw_torch`, `adamw_torch_fused`,
`adamw_apex_fused`, `adamw_anyprecision`, `adafactor`, or `adamw_bnb_8bit`. More optimizers can be plugged in via a third-party implementation.

Let's take a closer look at two alternatives to AdamW optimizer:
1. `adafactor` which is available in [`Trainer`]
2. `adamw_bnb_8bit` is also available in Trainer, but a third-party integration is provided below for demonstration.

For comparison, for a 3B-parameter model, like “google-t5/t5-3b”:
* A standard AdamW optimizer will need 24GB of GPU memory because it uses 8 bytes for each parameter (8*3 => 24GB)
* Adafactor optimizer will need more than 12GB. It uses slightly more than 4 bytes for each parameter, so 4*3 and then some extra.
* 8bit BNB quantized optimizer will use only (2*3) 6GB if all optimizer states are quantized.

### Adafactor

Adafactor doesn't store rolling averages for each element in weight matrices. Instead, it keeps aggregated information
(sums of rolling averages row- and column-wise), significantly reducing its footprint. However, compared to Adam,
Adafactor may have slower convergence in certain cases.

You can switch to Adafactor by setting `optim="adafactor"` in [`TrainingArguments`]:

```py
training_args = TrainingArguments(per_device_train_batch_size=4, optim="adafactor", **default_args)
```

Combined with other approaches (gradient accumulation, gradient checkpointing, and mixed precision training)
you can notice up to 3x improvement while maintaining the throughput! However, as mentioned before, the convergence of


ssAnd<Self> {
        self.with_constness(Constness::NotConst)
    }
}

impl<T> WithConstness for T {}

#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, TypeFoldable)]
pub struct ParamEnvAnd<'tcx, T> {
    pub param_env: ParamEnv<'tcx>,
    pub value: T,
}

impl<'tcx, T> ParamEnvAnd<'tcx, T> {
    pub fn into_parts(self) -> (ParamEnv<'tcx>, T) {
        (self.param_env, self.value)
    }
}

impl<'a, 'tcx, T> HashStable<StableHashingContext<'a>> for ParamEnvAnd<'tcx, T>
where
    T: HashStable<StableHashingContext<'a>>,
{
    fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
        let ParamEnvAnd { ref param_env, ref value } = *self;

        param_env.hash_stable(hcx, hasher);
        value.hash_stable(hcx, hasher);
    }
}

#[derive(Copy, Clone, Debug, HashStable)]
pub struct Destructor {
    /// The `DefId` of the destructor method
    pub did: DefId,
}

bitflags! {
    #[derive(HashStable)]
    pub struct AdtFlags: u32 {
        const NO_ADT_FLAGS        = 0;
        /// Indicates whether the ADT is an enum.
        const IS_ENUM             = 1 << 0;
        /// Indicates whether the ADT is a union.
        const IS_UNION            = 1 << 1;
        /// Indicates whether the ADT is a struct.
        const IS_STRUCT           = 1 << 2;
        /// Indicates whether the ADT is a struct and has a constructor.
        const HAS_CTOR            = 1 << 3;
        /// Indicates whether the type is `PhantomData`.
        const IS_PHANTOM_DATA     = 1 << 4;
        /// Indicates whether the type has a `#[fundamental]` attribute.
        const IS_FUNDAMENTAL      = 1 << 5;
        /// Indicates whether the type is `Box`.
        const IS_BOX              = 1 << 6;
        /// Indicates whether the type is `ManuallyDrop`.
        const IS_MANUALLY_DROP    = 1 << 7;
        /// Indicates whether the variant list of this ADT is `#[non_exhaustive]`.
        /// (i.e., this flag is never set unless this ADT is an enum).
        const IS_VARIANT_LIST_NON_EXHAUSTIVE = 1 << 8;
    }
}

bitflags! {
    #[derive(HashStable)]
    pub struct VariantFlags: u32 {
        const NO_VARIANT_FLAGS        = 0;
        /// Indicates whether the field list of this variant is `#[non_exhaustive]`.
        const IS_FIELD_LIST_NON_EXHAUSTIVE = 1 << 0;
        /// Indicates whether this variant was obtained as part of recovering from
        /// a syntactic error. May be incomplete or bogus.
        const IS_RECOVERED = 1 << 1;
    }
}

/// Definition of a variant -- a struct's fields or a enum variant.
#[derive(Debug, HashStable)]
pub struct VariantDef {
    /// `DefId` that identifies the variant itself.
    /// If this variant belongs to a struct or union, then this is a copy of its `DefId`.
    pub def_id: DefId,
    /// `DefId` that identifies the variant's constructor.
    /// If this variant is a struct variant, then this is `None`.
    pub ctor_def_id: Option<DefId>,
    /// Variant or struct name.
    #[stable_hasher(project(name))]
    pub ident: Ident,
    /// Discriminant of this variant.
    pub discr: VariantDiscr,
    /// Fields of this variant.
    pub fields: Vec<FieldDef>,
    /// Type of constructor of variant.
    pub ctor_kind: CtorKind,
    /// Flags of the variant (e.g.


		equipment_list = {
			1100249,
			1100394,
			1100364,
			2021601,
			2021620
		},
		random_equipment_list = {
			{
				2021611
			}
		},
		random_nub = {
			1
		}
	}
}


的斗争特点，党内走资派的实质和他的特点，就难以写出这方面有质量的好作品。这样的作品，不仅对今天的人民有教育意义，对教育后代也有意义。当前我们对走资派还在走所作的斗争，就有教育现在和教育后代的意义。

   你们要好好研究一下“这次运动的重点，是整党内那些走资本主义道路的当权派”这句话的精神。过去马、恩也讲过但都没有象主席提得这样明确、深刻。当初搞十大政治报告的时候，主席曾叫我引恩格斯的一段话：“无产阶级的发展，无论在什么地方总是在内部斗争中实现的，而现在才第一次建立工人政党的法国当然也不例外。……谁要是象马克思和我那样，一生中对冒牌社会主义者的所作的斗争比对其他任何人所作的斗争都多（因为我们把资产阶级只当作一个阶级来看待，几乎从来没有和资产者个人交锋），那他对爆发不可避免的斗争也就不会感到十分烦恼了……”毛主席很清楚提出“运动的重点是整党内走资派”。所以，现在看这段语录，体会很深，很有感受。要好好学习。有人反映，文化部有人曾讲过‘三项指示为纲’的话，现在了解是在九省文化调查会上张维民同志和侯再林同志讲的。不是文化部文件上的话。这个责任不在他们，不是他发明的。不过，将来有机会让他们（指张和侯）对有关方面表个态，不要专门打电话去说。

   关于五个重点电影的会，你们可以开。《四渡赤水》同意由八一电影制片厂搞，不要另搞了。这些以后都不要报江青同志批了。

   你们问《三剑客》和《寻墙记》翻不翻译？同意翻。关于过路片，江青同志看片很吃力，我们讨论决定，以后推荐给文元同志看。他认为可以送首长就上送首长。文化部推荐时要说明：买不买下；为什么买下，如有敌情的和艺术的参考价值；那些买下可以上送，那些买下可以不上送。

   江青同志交代，词曲音乐


SampleOffset		before analysing new period
	cmp.b	#$B,d0
	beq	mt_PositionJump
	cmp.b	#$D,d0
	beq	mt_PatternBreak
	cmp.b	#$E,d0
	beq	mt_E_Commands_PV
	cmp.b	#$F,d0
	beq	mt_Setspeed
	cmp.b	#$C,d0
	beq	mt_VolumeChange
*******					Copy frequency to DMA
mt_PerNop
	move	n_period(a6),mt_period(a5)
	rts

*-------------------------------	00XY Arpeggio
mt_Arpeggio_PV
	clr.b	bt_Arpeggioctr(a4)
	rts

*-------------------------------	04XY Vibrato
mt_Vibrato
	move.b	3(a6),d0			new command data
	beq.s	mt_Vibrato_e			= 0 ? no / yes => no change
	move.b	n_vibratocmd(a6),d2		old command data
	and.b	#$0F,d0				new low nibble = 0 ? (modulo)
	beq.s	mt_vibskip			no / yes => no change
	and.b	#$F0,d2				insert new data
	or.b	d0,d2
mt_vibskip
	move.b	3(a6),d0			new command data
	and.b	#$F0,d0				new high nibble = 0 ? (speed)
	beq.s	mt_vibskip2			no / yes => no change
	and.b	#$0F,d2				insert new data
	or.b	d0,d2
mt_vibskip2
	move.b	d2,n_vibratocmd(a6)		update command data
mt_Vibrato_e
	rts

*--------------------------------	07XY Tremolo
mt_Tremolo
	move.b	3(a6),d0			new command data
	beq.s	mt_Tremolo_e			= 0 ? no / yes => no change
	move.b	n_tremolocmd(a6),d2		old command data
	and.b	#$0F,d0				new low nibble = 0 ? (modulo)
	beq.s	mt_treskip			no / yes => no change
	and.b	#$F0,d2				insert new data
	or.b	d0,d2
mt_treskip
	move.b	3(a6),d0			new command data
	and.b	#$F0,d0				new high nibble = 0 ? (speed)
	beq.s	mt_treskip2			no / yes => no change
	and.b	#$0F,d2				insert new data
	or.b	d0,d2
mt_treskip2
	move.b	d2,n_tremolocmd(a6)		update command data
mt_Tremolo_e
	rts

*--------------------------------	09XY Set Sample Offset
mt_SampleOffset
	moveq	#0,d0
	move.b	3(a6),d0		$xy = $00
	beq.s	mt_sononew		no / yes
	move.b	d0,n_sampleoffset(a6)	update value
mt_sononew
	move.b	n_sampleoffset(a6),d0	sample offset
	lsl	#


,  1.0,        2.5,        1.0 );
  TEST_FP_OP3_S( 6, fnmadd.s, 1,             -1236.2, -1.0,    -1235.1,        1.1 );
  TEST_FP_OP3_S( 7, fnmadd.s, 0,                12.0,  2.0,       -5.0,       -2.0 );

  TEST_FP_OP3_S( 8,  fmsub.s, 0,                 1.5,  1.0,        2.5,        1.0 );
  TEST_FP_OP3_S( 9,  fmsub.s, 1,                1234, -1.0,    -1235.1,        1.1 );
  TEST_FP_OP3_S(10,  fmsub.s, 0,                -8.0,  2.0,       -5.0,       -2.0 );

  TEST_FP_OP3_S(11, fnmsub.s, 0,                -1.5,  1.0,        2.5,        1.0 );
  TEST_FP_OP3_S(12, fnmsub.s, 1,               -1234, -1.0,    -1235.1,        1.1 );
  TEST_FP_OP3_S(13, fnmsub.s, 0,                 8.0,  2.0,       -5.0,       -2.0 );

  TEST_PASSFAIL

RVTEST_CODE_END

  .data
RVTEST_DATA_BEGIN

  TEST_DATA

RVTEST_DATA_END


 no longer be available from 0.13.0",
  level = DeprecationLevel.WARNING
)
fun <A> liftEq(arg0: Eq<A>): Eq<Kind<ForSequenceK, A>> = arrow.core.extensions.sequence.eqK.Sequence
  .eqK()
  .liftEq<A>(arg0) as arrow.typeclasses.Eq<arrow.Kind<arrow.core.ForSequenceK, A>>

/**
 * cached extension
 */
@PublishedApi()
internal val eqK_singleton: SequenceKEqK = object : arrow.core.extensions.SequenceKEqK {}

@Deprecated(
  "Receiver Sequence object is deprecated, prefer to turn Sequence functions into top-level functions",
  level = DeprecationLevel.WARNING
)
object Sequence {
  @Suppress(
    "UNCHECKED_CAST",
    "NOTHING_TO_INLINE"
  )
  @Deprecated(
    "Kind/type constructors will be deprecated, so this typeclass will no longer be available from 0.13.0",
    level = DeprecationLevel.WARNING
  )
  inline fun eqK(): SequenceKEqK = eqK_singleton
}
package arrow.continuations.generic

import kotlinx.atomicfu.atomic
import kotlinx.atomicfu.loop
import kotlin.coroutines.Continuation
import kotlin.coroutines.EmptyCoroutineContext
import kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED
import kotlin.coroutines.intrinsics.startCoroutineUninterceptedOrReturn
import kotlin.coroutines.intrinsics.suspendCoroutineUninterceptedOrReturn
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine

/**
 * (Simulated) Multishot capable delimited control scope
 *
 * This has several drawbacks:
 * - f will rerun completely on multishot and only the results of [shift] are cached so any sideeffects outside of
 *   [shift] will rerun!
 * - This accumulates all results of [shift] (every argument passed when invoking the continuation) so on long running computations
 *   this may keep quite a bit of memory
 * - If the pure part before a multishot is expensive the multishot itself will have to rerun that, which makes it somewhat slow
 * - This is terribly hard to implement properly with nested scopes (which this one does not support)
 *
 * As per usual understanding of [DelimContScope] is required as I will only be commenting differences for now.
 */
internal open class MultiShotDelimContScope<R>(val f: suspend RestrictedScope<R>.() -> R) : RestrictedScope<R> {

  // TODO Since runs blocking these don't need to be atomic
  private val resultVar = atomic<R?>(null)
  private val nextShift = atomic<(suspend RestrictedScope<R>.() -> R)?>(null)

  // TODO This can be append only and needs fast reversed access
  private val shiftFnContinuations = mutableListOf<Continuation<R>>()

  /**
   * Keep the arguments passed to [DelimitedContinuation.invoke] to be able to replay the scope if necessary
   */
  // TODO This can be append only and needs fast random access and slicing
  internal open val stack = mutableListOf<Any?>()

  /**
   * Our continuation now includes the function [f] to rerun on multishot, the current live (single-shot) continuation,
   *  the current stack and the offset from that stack when this is created which is used to know when to resume normal
   *  execution again on a replay.
   */
  class MultiShotCont<A, R>(
    liveContinuation: Continuation<A>,
    private val f: suspend RestrictedScope


// This checks below are only performed is player isn't doing quest already

			//if (player.HasFinishedQuest(typeof(Academy_47)) == 0) return false;

			//if (!CheckPartAccessible(player,typeof(CityOfCamelot)))
			//	return false;

			if (player.Level < minimumLevel || player.Level > maximumLevel)
				return false;

			return true;
		}

		/* This is our callback hook that will be called when the player clicks
		 * on any button in the quest offer dialog. We check if he accepts or
		 * declines here...
		 */

		private static void CheckPlayerAbortQuest(GamePlayer player, byte response)
		{
			Essence_50 quest = player.IsDoingQuest(typeof (Essence_50)) as Essence_50;

			if (quest == null)
				return;

			if (response == 0x00)
			{
				SendSystemMessage(player, "Good, no go out there and finish your work!");
			}
			else
			{
				SendSystemMessage(player, "Aborting Quest " + questTitle + ". You can start over again if you want.");
				quest.AbortQuest();
			}
		}

		protected static void SubscribeQuest(DOLEvent e, object sender, EventArgs args)
		{
			QuestEventArgs qargs = args as QuestEventArgs;
			if (qargs == null)
				return;

			if (qargs.QuestID != QuestMgr.GetIDForQuestType(typeof(Essence_50)))
				return;

			if (e == GamePlayerEvent.AcceptQuest)
				CheckPlayerAcceptQuest(qargs.Player, 0x01);
			else if (e == GamePlayerEvent.DeclineQuest)
				CheckPlayerAcceptQuest(qargs.Player, 0x00);
		}

		private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
		{
			if(Brigit.CanGiveQuest(typeof (Essence_50), player)  <= 0)
				return;

			if (player.IsDoingQuest(typeof (Essence_50)) != null)
				return;

			if (response == 0x00)
			{
				player.Out.SendMessage("Our God forgives your laziness, just look out for stray lightning bolts.", eChatType.CT_Say, eChatLoc.CL_PopupWindow);
			}
			else
			{
				//Check if we can add the quest!
				if (!Brigit.GiveQuest(typeof (Essence_50), player, 1))
					return;
				player.Out.SendMessage("Kill Caithor in Cursed Forest loc 28k 48k ", eChatType.CT_System, eChatLoc.CL_PopupWindow);
			}
		}

		//Set quest name
		public override string Name
		{
			get { return "The Moonstone Twin (Level 50 Path of Essence Epic)"; }
		}

		// Define Steps
		public override string Description
		{
			get
			{
				switch (Step)
				{
					case 1:
						return "[Step #1] Seek out Caithor in Cursed Forest Loc 20k,48k kill him!";
					case 2:
						return "[Step #2] Return to Brigit and give the Moonstone!";
				}
				return base.Description;
			}
		}

		public override void Notify(DOLEvent e, object sender, EventArgs args)
		{
			GamePlayer player = sender as GamePlayer;

			if (player==null || player.IsDoingQuest(typeof (Essence_50)) == null)
				return;

			if (Step == 1 && e == GameLivingEvent.EnemyKilled)
			{
				EnemyKilledEventArgs gArgs = (EnemyKilledEventArgs) args;
				if (gArgs.Target.Name == Caithor.Name)
				{
					m_questPlayer.Out.SendMessage("You collect the Moonstone from Caithor", eChatType.CT_System, eChatLoc.CL_SystemWindow);
					GiveIt


.size());
		for (index i = 0; i < turnTableDiffs.size(); ++i) {
			turnTableDiffs[i] = std::stoi(tokens[i]);
		}

		metric.weights = OverlayWeights(w);
		metric.turnTablePtr = turnTablePtr;
		metric.turnTableDiffs = turnTableDiffs;
		metric.costFunction = std::move(costFunction);

		return true;
	}

private:
	std::unique_ptr<CostFunction> costFunction;
	OverlayWeights weights;
	std::vector<index> turnTablePtr;
	std::vector<int> turnTableDiffs;
};

} /* namespace CRP */

#endif /* DATASTRUCTURES_METRIC_H_ */


 {
    padding-left: 5rem;
    padding-right: 5rem;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column
}

.td-box .row {
    padding-left: 5rem;
    padding-right: 5rem;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row
}

.td-box.linkbox {
    padding: 5rem
}

.td-box--0 {
    color: #fff;
    background-color: #403f4c
}

.td-box--0 .td-arrow-down::before {
    left: 50%;
    margin-left: -30px;
    bottom: -25px;
    border-style: solid;
    border-width: 25px 30px 0;
    border-color: #403f4c transparent transparent transparent;
    z-index: 3;
    position: absolute;
    content: ""
}

.td-box--0 p>a {
    color: #d9e5f8
}

.td-box--0 p>a:hover,
.td-box--0 p>a:focus {
    color: #1e53a0
}

.td-box--10.td-box--gradient {
    background: #403F4C -webkit-gradient(linear, left top, left bottom, from(#5d5c67), to(#403F4C)) repeat-x!important;
    background: #403f4c -webkit-linear-gradient(top, #5d5c67, #403F4C) repeat-x!important;
    background: #403f4c -o-linear-gradient(top, #5d5c67, #403F4C) repeat-x!important;
    background: #403f4c linear-gradient(180deg, #5d5c67, #403F4C) repeat-x!important
}

.td-box--1 {
    color: #fff;
    background-color: {{ site.color }}
}

.td-box--1 .td-arrow-down::before {
    left: 50%;
    margin-left: -30px;
    bottom: -25px;
    border-style: solid;
    border-width: 25px 30px 0;
    border-color: {{ site.color }} transparent transparent transparent;
    z-index: 3;
    position: absolute;
    content: ""
}

.td-box--1 p>a {
    color: #cadcf5
}

.td-box--1 p>a:hover,
.td-box--1 p>a:focus {
    color: #1e53a0
}

.td-box--11.td-box--gradient {
    background: {{ site.color }} -webkit-gradient(linear, left top, left bottom, from(#4f7a9f), to({{ site.color }})) repeat-x!important;
    background: {{ site.color }} -webkit-linear-gradient(top, #4f7a9f, {{ site.color }}) repeat-x!important;
    background: {{ site.color }} -o-linear-gradient(top, #4f7a9f, {{ site.color }}) repeat-x!important;
    background: {{ site.color }} linear-gradient(180deg, #4f7a9f, {{ site.color }}) repeat-x!important
}

.td-box--2 {
    color: #fff;
    background-color: #d95040
}

.td-box--2 .td-arrow-down::before {
    left: 50%;
    margin-left: -30px;
    bottom: -25px;
    border-style: solid;
    border-width: 25px 30px 0;
    border-color: #d95040


org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",
zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return!1;var i=n.list[t.slice(e+1)];return!!i&&i.indexOf(" "+t.slice(r+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var r=t.lastIndexOf(".",e-1);if(r>=0)return!1;var i=n.list[t.slice(e+1)];return!!i&&i.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return null;var i=n.list[t.slice(e+1)];return i?i.indexOf(" "+t.slice(r+1,e)+" ")<0?null:t.slice(r+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return n})},{}],9:[function(t,e,n){!function(n,r){"use strict";"object"==typeof e&&e.exports?e.exports=r(t("./punycode"),t("./IPv6"),t("./SecondLevelDomains")):"function"==typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],r):n.URI=r(n.punycode,n.IPv6,n.SecondLevelDomains,n)}(this,function(t,e,n,r){"use strict";function i(t,e){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof i))


ne SIGNATURE_0 0x1E
#define SIGNATURE_1 0x94
#define SIGNATURE_2 0x05

/* Deprecated items */
#if !defined(__AVR_LIBC_DEPRECATED_ENABLE__)

#pragma GCC system_header

#pragma GCC poison SIG_INTERRUPT0
#pragma GCC poison SIG_PIN_CHANGE0
#pragma GCC poison SIG_PIN_CHANGE1
#pragma GCC poison SIG_OUTPUT_COMPARE2
#pragma GCC poison SIG_OVERFLOW2
#pragma GCC poison SIG_INPUT_CAPTURE1
#pragma GCC poison SIG_OUTPUT_COMPARE1A
#pragma GCC poison SIG_OUTPUT_COMPARE1B
#pragma GCC poison SIG_OVERFLOW1
#pragma GCC poison SIG_OUTPUT_COMPARE0
#pragma GCC poison SIG_OVERFLOW0
#pragma GCC poison SIG_SPI
#pragma GCC poison USART_RX_vect
#pragma GCC poison SIG_UART_RECV
#pragma GCC poison USART_UDRE_vect
#pragma GCC poison SIG_UART_DATA
#pragma GCC poison USART_TX_vect
#pragma GCC poison SIG_UART_TRANS
#pragma GCC poison SIG_USI_START
#pragma GCC poison SIG_USI_OVERFLOW
#pragma GCC poison SIG_COMPARATOR
#pragma GCC poison SIG_ADC
#pragma GCC poison SIG_EEPROM_READY
#pragma GCC poison SIG_SPM_READY

#endif  /* !defined(__AVR_LIBC_DEPRECATED_ENABLE__) */

#define SLEEP_MODE_IDLE (0x00<<1)
#define SLEEP_MODE_ADC (0x01<<1)
#define SLEEP_MODE_PWR_DOWN (0x02<<1)
#define SLEEP_MODE_PWR_SAVE (0x03<<1)
#define SLEEP_MODE_STANDBY (0x06<<1)

#endif /* _AVR_IOM165_H_ */


    pub mod $name {
            use super::*;
            pub fn part1(bench: &mut Bencher) {
                test_part1($day, bench);
            }
            pub fn part2(bench: &mut Bencher) {
                test_part2($day, bench);
            }
        }
        benchmark_group!($name, $name::part1, $name::part2);
    };
}

day_bench!(day01, 1);
day_bench!(day02, 2);
day_bench!(day03, 3);
day_bench!(day04, 4);
day_bench!(day05, 5);
day_bench!(day06, 6);
day_bench!(day07, 7);
day_bench!(day08, 8);
day_bench!(day09, 9);
day_bench!(day10, 10);
day_bench!(day11, 11);
day_bench!(day12, 12);
day_bench!(day13, 13);
day_bench!(day14, 14);
day_bench!(day15, 15);
day_bench!(day16, 16);
day_bench!(day17, 17);
day_bench!(day18, 18);
day_bench!(day19, 19);
day_bench!(day20, 20);
day_bench!(day21, 21);
day_bench!(day22, 22);
day_bench!(day23, 23);
day_bench!(day24, 24);
day_bench!(day25, 25);

benchmark_main!(day01, day02, day03, day04, day05,
                day06, day07, day08, day09, day10,
                day11, day12, day13, day14, day15,
                day16, day17, day18, day19, day20,
                day21, day22, day23, day24, day25);
<reponame>ValeryPiashchynski/rust_playground
use libc::{c_char, size_t};
use std::ffi::CString;

extern {
    pub fn php_printf(format: *const c_char , ...) -> size_t;
}

#[macro_export]
macro_rules! printf {
    ($format:expr) => {
        let c_format = CString::new($format).unwrap();
        unsafe {
            php::fmt::php_printf(c_format.as_ptr() as *const c_char);
        }
    };
    ($format:expr, $($arg:expr), *) => {
        let c_format = CString::new($format).unwrap();
        unsafe {
            php::fmt::php_printf(c_format.as_ptr() as *const c_char, $($arg), *);
        }
    };
}use crate::graph::Graph;
use crate::NodeId;

use std::collections::BinaryHeap;

pub struct Dijkstra<'a> {
    g: &'a Graph,
    dist: Vec<u32>,
    prev: Vec<Option<NodeId>>,
    heap: BinaryHeap<HeapElement>,
    touched: Vec<NodeId>,
    last_from: NodeId,
}

impl<'a> Dijkstra<'a> {
    pub fn new(g: &'a Graph) -> Self {
        let dist = vec![u32::MAX; g.node_count()];
        let prev = vec![None; g.node_count()];
        let heap = BinaryHeap::new();
        let touched = Vec::new();
        Dijkstra {
            g,
            dist,
            prev,
            heap,
            touched,
            last_from: NodeId(usize::MAX),
        }
    }

    pub fn reset_state(&mut self) {
        for t in &self.touched {
            self.dist[t.0] = u32::MAX;
            self.prev[t.0] = None;
        }
        self.heap.clear();
        self.touched.clear();
    }

    pub fn dist(&mut self, from: NodeId, to: NodeId) -> u32 {
        // If the query starts from the same node as before we can reuse it
        if self.last_from == from {
            if self.dist[to.0] < u


terface WechatProductAndPromotionMapper
{
	/**
     * 查询商品促销活动关联信息
     *
     * @param productAndPromotionId 商品促销活动关联ID
     * @return 商品促销活动关联信息
     */
	public WechatProductAndPromotion selectWechatProductAndPromotionById(Integer productAndPromotionId);

	/**
     * 查询商品促销活动关联列表
     *
     * @param wechatProductAndPromotion 商品促销活动关联信息
     * @return 商品促销活动关联集合
     */
	public List<WechatProductAndPromotion> selectWechatProductAndPromotionList(WechatProductAndPromotion wechatProductAndPromotion);

	/**
     * 新增商品促销活动关联
     *
     * @param wechatProductAndPromotion 商品促销活动关联信息
     * @return 结果
     */
	public int insertWechatProductAndPromotion(WechatProductAndPromotion wechatProductAndPromotion);

	/**
     * 修改商品促销活动关联
     *
     * @param wechatProductAndPromotion 商品促销活动关联信息
     * @return 结果
     */
	public int updateWechatProductAndPromotion(WechatProductAndPromotion wechatProductAndPromotion);

	/**
     * 删除商品促销活动关联
     *
     * @param productAndPromotionId 商品促销活动关联ID
     * @return 结果
     */
	public int deleteWechatProductAndPromotionById(Integer productAndPromotionId);

	/**
     * 批量删除商品促销活动关联
     *
     * @param productAndPromotionIds 需要删除的数据ID
     * @return 结果
     */
	public int deleteWechatProductAndPromotionByIds(String[] productAndPromotionIds);

}package com.yiran.wechat.service;

import com.yiran.wechat.domain.WechatProductAlbum;
import java.util.List;

/**
 * 商品相册 服务层
 *
 * @author yiran
 * @date 2019-06-13
 */
public interface IWechatProductAlbumService
{
	/**
     * 查询商品相册信息
     *
     * @param productAlbumId 商品相册ID
     * @return 商品相册信息
     */
	public WechatProductAlbum selectWechatProductAlbumById(Integer productAlbumId);

	/**
     * 查询商品相册列表
     *
     * @param wechatProductAlbum 商品相册信息
     * @return 商品相册集合
     */
	public List<WechatProductAlbum> selectWechatProductAlbumList(WechatProductAlbum wechatProductAlbum);

	/**
     * 新增商品相册
     *
     * @param wechatProductAlbum 商品相册信息
     * @return 结果
     */
	public int insertWechatProductAlbum(WechatProductAlbum wechatProductAlbum);

	/**
     * 修改商品相册
     *
     * @param wechatProductAlbum 商品相册信息
     * @return 结果
     */
	public int updateWechatProductAlbum(WechatProductAlbum wechatProductAlbum);

	/**
     * 删除商品相册信息
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	public int deleteWechatProductAlbumByIds(String ids);

	/**
	 * 根据产品ID获取去轮播图
	 * @param productId
	 * @return
	 */
	public List<WechatProductAlbum> selectWechatProductAlbumByProductId(Integer productId);

}
package com.yiran.wechat.service;

import com.yiran.wechat.domain.WechatProductAttribute;
import com.yiran.wechat.domain.WechatProductBrand;

import java.util.List;

/**
 * 商品属性 服务层
 *
 * @author y


--Maxime
local newTombs = tombs
local showing = false
local viewDistance = 20
local heightOffset = -1
local refreshRate = 30 -- minutes
local font = dxCreateFont ( "graveyard/tombstone.ttf" , 20 ) or false

function drawTombPlates()
	if getKeyState('lalt') then
		for i = 1, #newTombs do
			local x, y, z, int, dim = newTombs[i][1], newTombs[i][2], newTombs[i][3], newTombs[i][4], newTombs[i][5]
			local cx,cy,cz = getCameraMatrix()
			if getDistanceBetweenPoints3D(cx,cy,cz,x,y,z) <= viewDistance then --Within radius viewDistance
				local px,py,pz = getScreenFromWorldPosition(x,y,z+heightOffset,0.05)
				if px and isLineOfSightClear(cx, cy, cz, x, y, z, true, false, false, true, true, false, false) then
					--START DRAWING
					local marg = 5

					local tombInfo = newTombs[i][6]

					local textToDraw = string.gsub(tombInfo.charactername or "Unknown", "_", " ")
					local textToDraw2 = "○ "..(tombInfo.born or "Unknown").." ○"
					local textToDraw3 = "○ "..(tombInfo.dead or "Unknown").." ○"
					local textToDraw4 = string.upper(tombInfo.tomb_text and ("'"..tombInfo.tomb_text.."'") or "'Rest In Peace'")

					local fontWidth1 = dxGetTextWidth(textToDraw, 1, font)
					local fontWidth2 = dxGetTextWidth(textToDraw2)
					local fontWidth3 = dxGetTextWidth(textToDraw3)
					local fontWidth4 = dxGetTextWidth(textToDraw4)

					local fontWidth = getLongestLine({fontWidth1, fontWidth2, fontWidth3, fontWidth4})

					local fontHeight1 = dxGetFontHeight(1, font)
					local fontHeight2 = dxGetFontHeight(1, "default-small")
					local fontHeight = fontHeight1+fontHeight2*3

					px = px - (fontWidth-marg*4)/2

					dxDrawRectangle(px-marg, py-marg, (marg*2)+fontWidth, fontHeight+(marg*2), tocolor(0, 0, 0, 50))
					dxDrawRectangleBorder(px-marg, py-marg, (marg*2)+fontWidth, fontHeight+(marg*2), 1, tocolor(255, 255, 255, 50), true)
					dxDrawText(textToDraw, px, py+marg*2, px+fontWidth, (py + fontHeight2), tocolor(255, 255, 255, 200), 1, font or "default-small", "center", "center")
					dxDrawText(textToDraw2, px, py, px+fontWidth, (py + fontHeight), tocolor(255, 255, 255, 200), 1, "default-small", "center", "center")
					dxDrawText(textToDraw3, px, py+fontHeight2*2, px+fontWidth, (py + fontHeight), tocolor(255, 255, 255, 200), 1, "default-small", "center", "center")
					dxDrawText(textToDraw4, px, py+fontHeight2*4, px+font


* ROUNDED CORDERS  */
/* border-radius */

/* p {
  border: 5px solid #cccccc;
  padding: 20px;
  width: 275px;
  text-align: center;
  border-radius: 10px;
  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
} */

/* ELLIPTICAL SHAPES  */
/* border-radius */

/* p.one {
  border-top-left-radius: 80px 50px;
  -moz-border-radius-top-left: 80px 50px;
  -webkit-border-radius-top-left: 80px 50px;
}
p.two {
  border-radius: 1em 4em 1em 4em / 2em 1em 2em 1em;
  -moz-border-radius: 1em 4em 1em 4em / 2em 1em 2em 1em;
  -webkit-border-radius: 1em 4em 1em 4em / 2em 1em 2em 1em;
}
p.three {
  padding: 0px;
  border-radius: 100px;
  -moz-border-radius: 100px;
  -webkit-border-radius: 100px;/* ------ BOX Dimensions -------  */

/* ------- WIDTH AND HEIGHT ------- */

/* div.box {
  height: 300px;
  width: 300px;
  background-color: #bbbbaa;
}
p {
  height: 75%;
  width: 75%;
  background-color: #0088dd;
} */

/* --------- LIMITING WIDTH ------  */

/* ---------- min-width, max-width -----  */

/* td.description {
  min-width: 450px;
  max-width: 650px;
  text-align: left;
  padding: 5px;
  margin: 0px;
} */

/* -------- LIMITING HEIGHT ------  */
/* ------- min-height, max height -------  */

/* h2,
p {
  width: 400px;
  font-size: 90%;
  line-height: 1.2em;
}
h2 {
  color: #0088dd;
  border-bottom: 1px solid #0088dd;
}
p {
  min-height: 10px;
  max-height: 30px;
} */

/* -------Overflowing Content
-------------overflow ----- */

/* p.one {
  overflow: hidden;
}
p.two {
  overflow: scroll;
} */

/* -------- BORDER WIDTH -------  */

/* p.one {
  border-width: 2px;
}
p.two {
  border-width: thick;
}
p.three {
  border-width: 1px 4px 12px 4px;
} */

/* -------Border Style------
----------border-style------ */

/* p.one {
  border-style: solid;
}
p.two {
  border-style: dotted;
}
p.three {
  border-style: dashed;
}
p.four {
  border-style: double;
}
p.five {
  border-style: groove;
}
p.six {
  border-style: ridge;
}
p.seven {
  border-style: inset;
}
p.eight {
  border-style: outset;
} */

/* ------ Border Color ------  */

/* p.one {
  border-color: #0088dd;
}
p.two {
  border-color: #bbbbaa #111111 #ee3e80 #0088dd;
} */

/* SHORTHAND
border */

/* p {
  width: 250px;
  border: 3px dotted #0088dd;
} */

/* PADDING
padding */

/* p {
  width: 275px;
  border: 2px solid #0088dd;
}
p.example {
  padding: 10px;
} */

/* MARGIN
margin */

/* p {


rt/v2/test"
)

type flight4TestMockFlightConn struct{}

func (f *flight4TestMockFlightConn) notify(context.Context, alert.Level, alert.Description) error {
	return nil
}
func (f *flight4TestMockFlightConn) writePackets(context.Context, []*packet) error { return nil }
func (f *flight4TestMockFlightConn) recvHandshake() <-chan chan struct{}           { return nil }
func (f *flight4TestMockFlightConn) setLocalEpoch(uint16)                          {}
func (f *flight4TestMockFlightConn) handleQueuedPackets(context.Context) error     { return nil }
func (f *flight4TestMockFlightConn) sessionKey() []byte                            { return nil }

type flight4TestMockCipherSuite struct {
	ciphersuite.TLSEcdheEcdsaWithAes128GcmSha256

	t *testing.T
}

func (f *flight4TestMockCipherSuite) IsInitialized() bool {
	f.t.Fatal("IsInitialized called with Certificate but not CertificateVerify")
	return true
}

// Assert that if a Client sends a certificate they
// must also send a CertificateVerify message.
// The flight4handler must not interact with the CipherSuite
// if the CertificateVerify is missing
func TestFlight4_Process_CertificateVerify(t *testing.T) {
	// Limit runtime in case of deadlocks
	lim := test.TimeOut(5 * time.Second)
	defer lim.Stop()

	// Check for leaking routines
	report := test.CheckRoutines(t)
	defer report()

	mockConn := &flight4TestMockFlightConn{}
	state := &State{
		cipherSuite: &flight4TestMockCipherSuite{t: t},
	}
	cache := newHandshakeCache()
	cfg := &handshakeConfig{}

	rawCertificate := []byte{
		0x0b, 0x00, 0x01, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x01, 0x9b, 0x00, 0x01, 0x98, 0x00, 0x01, 0x95, 0x30, 0x82,
		0x01, 0x91, 0x30, 0x82, 0x01, 0x38, 0xa0, 0x03, 0x02, 0x01,
		0x02, 0x02, 0x11, 0x01, 0x65, 0x03, 0x3f, 0x4d, 0x0b, 0x9a,
		0x62, 0x91, 0xdb, 0x4d, 0x28, 0x2c, 0x1f, 0xd6, 0x73, 0x32,
		0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04,
		0x03, 0x02, 0x30, 0x00, 0x30, 0x1e, 0x17, 0x0d, 0x32, 0x32,
		0x30, 0x35, 0x31, 0x35, 0x31, 0x38, 0x34, 0x33, 0x35, 0x35,
		0x5a, 0x17, 0x0d, 0x32, 0x32, 0x30, 0x36, 0x31, 0x35, 0x31,
		0x38, 0x34, 0x33, 0x35, 0x35, 0x5a, 0x30, 0x00, 0x30, 0x59,
		0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02,
		0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01,
		0x07, 0x03, 0x42, 0x00, 0x04, 0xc3,


d. */
        bsp_group_irq_call(BSP_GRP_IRQ_RAM_PARITY);

        /** Clear RAM parity error flag. */
        R_ICU->NMICLR_b.RPECLR = 1U;
    }

    if (1 == R_ICU->NMISR_b.RECCST)
    {
        /** RAM ECC Error interrupt is requested. */
        bsp_group_irq_call(BSP_GRP_IRQ_RAM_ECC);

        /** Clear RAM ECC error flag. */
        R_ICU->NMICLR_b.RECCCLR = 1U;
    }

    if (1 == R_ICU->NMISR_b.BUSSST)
    {
        /** MPU Bus Slave Error interrupt is requested. */
        bsp_group_irq_call(BSP_GRP_IRQ_MPU_BUS_SLAVE);

        /** Clear MPU Bus Slave error flag. */
        R_ICU->NMICLR_b.BUSSCLR = 1U;
    }

    if (1 == R_ICU->NMISR_b.BUSMST)
    {
        /** MPU Bus Slave Error interrupt is requested. */
        bsp_group_irq_call(BSP_GRP_IRQ_MPU_BUS_MASTER);

        /** Clear MPU Bus Master error flag. */
        R_ICU->NMICLR_b.BUSMCLR = 1U;
    }

    if (1 == R_ICU->NMISR_b.SPEST)
    {
        /** MPU Stack Error interrupt is requested. */
        bsp_group_irq_call(BSP_GRP_IRQ_MPU_STACK);

        /** Clear MPU Stack error flag. */
        R_ICU->NMICLR_b.SPECLR = 1U;
    }
}

#endif

/** @} (end addtogroup BSP_MCU_GROUP_IRQ) */


etScreenHeight()) {
                double ar = (double)BaseGlobalEnvironment.getInstance().getScreenWidth() / (double)BaseGlobalEnvironment.getInstance().getScreenHeight();
                inGL.glFrustum(-ar * mCameraZoom, ar * mCameraZoom, -mCameraZoom, mCameraZoom, 1.0, 1000.0);
            } else {
                double ar = (double)BaseGlobalEnvironment.getInstance().getScreenHeight() / (double)BaseGlobalEnvironment.getInstance().getScreenWidth();
                inGL.glFrustum(-mCameraZoom, mCameraZoom, -ar * mCameraZoom, ar * mCameraZoom, 1.0, 1000.0);
            }
            inGL.glMatrixMode(GL_MODELVIEW);
            inGL.glLoadIdentity();
            inGLU.gluLookAt(
                      mCameraPos[0], mCameraPos[1], mCameraPos[2],
                      0.0f, 0.0f, 0.0f,
                      0.0f, 1.0f, 0.0f
            );
            inGL.glViewport(0, 0, BaseGlobalEnvironment.getInstance().getScreenWidth(), BaseGlobalEnvironment.getInstance().getScreenHeight());
            //track light position
            inGL.glLightfv(GL_LIGHT0, GL_POSITION, mLightPosFloatBuffer);
            inGL.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
            if (mShowShadowMap) {
                //display shadow map for debug purposes
                inGL.glMatrixMode(GL_PROJECTION);
                inGL.glLoadIdentity();
                inGL.glMatrixMode(GL_MODELVIEW);
                inGL.glLoadIdentity();
                inGL.glMatrixMode(GL_TEXTURE);
                inGL.glPushMatrix();
                inGL.glLoadIdentity();
                inGL.glEnable(GL_TEXTURE_2D);
                inGL.glDisable(GL_LIGHTING);
                inGL.glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
                inGL.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE);
                //show the shadowMap at its actual size relative to window
                inGL.glBegin(GL_QUADS);
                inGL.glTexCoord2f(0.0f, 0.0f);
                inGL.glVertex2f(-1.0f, -1.0f);
                inGL.glTexCoord2f(1.0f, 0.0f);
                inGL.glVertex2f(((float)BaseGlobalEnvironment.getInstance().getScreenWidth()/(float)BaseGlobalEnvironment.getInstance().getScreenWidth())*2.0f-1.0f, -1.0f);
                inGL.glTexCoord2f(1.0f, 1.0f);
                inGL.glVertex2f(((float)BaseGlobalEnvironment.getInstance().getScreenWidth()/(float)BaseGlobalEnvironment.getInstance().getScreenWidth())*2.0f-1.0f, ((float)BaseGlobalEnvironment.getInstance().getScreenHeight()/(float)BaseGlobalEnvironment.getInstance().getScreenHeight())*2.0f-1.0f);
                inGL.glTexCoord2f(0.0f, 1.0f);
                inGL.glVertex2f(-1.0f, ((float)BaseGlobalEnvironment.getInstance().getScreenHeight()/(float)BaseGlobalEnvironment.getInstance().getScreenHeight())*2.0f-1.0f);
                inGL.glEnd();
                inGL.glDisable(GL_TEXTURE_2D);
                inGL.glEnable(GL_LIGHTING);
                inGL.glPopMatrix();
                inGL.glMatrixMode(GL_PROJECTION);
                inGLU.gluPerspective(45.0f, 1.0f, 1.0f, 1000.0f);
                inGL.glMatrixMode(GL_MODELVIEW);
            } else {
                //ambient pass ...
                inGL.gl


elect_latest_time_by_source('North Atlantic Treaty Organization')
    print(latest_time_str_NATO)
    # 解析 "JULY 01, 2024" 格式的日期
    latest_time_NATO = datetime.strptime(latest_time_str_NATO, "%B %d, %Y")
    print(latest_time_NATO.date())
    days_ago_NATO = latest_time_NATO.date()

    latest_time_str_italy = a.select_latest_time_by_source('Italian Ministry of Defence')
    print(latest_time_str_italy)
    # 解析 "JULY 01, 2024" 格式的日期
    latest_time_italy = datetime.strptime(latest_time_str_italy, "%B %d, %Y")
    print(latest_time_italy.date())
    days_ago_italy = latest_time_italy.date()

    latest_time_str_german = a.select_latest_time_by_source('German Federal Ministry of Defence')
    print(latest_time_str_german)
    # 解析 "JULY 01, 2024" 格式的日期
    latest_time_str_german = datetime.strptime(latest_time_str_german, "%B %d, %Y")
    print(latest_time_str_german.date())
    days_ago_german = latest_time_str_german.date()

    # 比较日期对象，找到最小日期
    min_date = min(days_ago_white, days_ago_us_defense, days_ago_korea,
                   days_ago_british, days_ago_french, days_ago_NATO,days_ago_german,days_ago_italy)
    return min_date

# # 定义数据结构，包括日期、来源、关键词
class DataInput(BaseModel):
    title: Optional[str] = Field(None, example="")
    country: Optional[str] = Field(None, example="")
    level: Optional[str] = Field(None, example="")

def select_source(source):
    if source == "白宫":
        return "THE WHITE HOUSE"
    elif source == "美国国防部":
        return "U.S. Department of Defense"
    elif source == "北约":
        return "North Atlantic Treaty Organization"
    elif source == "韩国国防部":
        return "Ministry of National Defense of South Korea"
    elif source == "英国国防部":
        return "British Ministry of Defence"
    elif source == "法国国防部":
        return "French Ministry of Defence"
    elif source == "意大利国防部":
        return "Italian Ministry of Defence"
    elif source == "德国联邦国防部":
        return "German Federal Ministry of Defence"
    else:
        return "Unknown Source"
# # 模拟的最后两列数据
# last_two_columns = [
#     {"fawenliang": "50/1", "reduzhi": "15/2"},
#     {"fawenliang": "46/2", "reduzhi": "19/1"},
#     {"fawenliang": "52/3", "reduzhi": "14/3"},
#     {"fawenliang": "42/5", "reduzhi": "16/5"},
#     {"fawenliang": "48/4", "reduzhi": "18/4"},
#     {"fawenliang": "47/6", "reduzhi": "17/6"},
#     {"fawenliang": "45/7", "reduzhi": "20/7"},
#     {"fawenliang": "51/8", "reduzhi": "13/8"},
# ]

# 路由：获取最后两列数据
@app.get('/XinXiYuanGuanLi/lastTwoColumns')
async def get_last_two_columns():
    updated_data = await update_rank()
    return updated_data

def update_country_level(data_list: list[dict]):
    # 在这里处理数据库更新逻辑，这里简化为打印出接收到的数据
    for data in data_list:
        print(f"Updating data: {data}")
        source = data.get('title')
        source = select_source(source)
        print(source)
        country = data.get('country')
        print(country)
        level = data.get('level')
        print(level)
        a = Mysqlop()
        a.updateCountry('country', country, source)
        a.updateLevel('level', level, source)

@app.post('/XinXiYuanGuanLi/updateConfig')
# 接收返回前端传来的情报配置参数，表达格式的数据，包括日期、来源、关键词
# 返回值包括筛选出来的所有新闻，每条新闻包括新闻标题，热度值，摘要，来源，地点
async def update_config(data_list: list[DataInput]):
    try:
        # 这里可以添加更新配置的具体逻辑
        update_country_level([data.dict() for data in data_list])
        # 模拟更新配置成功，不做任何数据库操作
        return {"message": "配置更新成功", "status": "success"}
    except Exception as e:
        return {"message": str(e), "status": "error"}

@app.get('/XinXiYuanGuanLi/selectsource')
async def update_select_source():
    a = Mysqlop()
    data = {
        '白宫': a.get_levelandcountry_bysource('THE WHITE HOUSE'),
        '美国国防部': a.get_levelandcountry_bysource('U.S. Department of Defense'),
        '韩国国防部': a.get_levelandcountry_bysource(
            'Ministry of National Defense of South Korea'),
        '北约': a.get_levelandcountry_bysource('North Atlantic Treaty Organization'),
        '意大利国防部': a.get_levelandcountry_bysource('Italian Ministry of Defence'),
        '英国国防部': a.get_levelandcountry_bysource('British Ministry of Defence'),
        '法国国防部': a.get_levelandcountry_bysource('French Ministry of Defence'),
        '德国联邦国防部': a.get_levelandcountry_bysource('German Federal Ministry of Defence'),
    }
    print(data)
    return data

if __name__ == "__main__":

    # uvicorn.run(app="main:app", host="0.0.0.0", port=8000)
    uvicorn.run(app="QingBao3:app", host="127.0.0.1"


eckmark {
	color: green !important;
    line-height: 18px;
    padding-right: 2px;
    padding-left: 2px;
    padding-top: 2px;
    font-size: 13px;
}

.searchResultsWrapperDiv .confidenceUnknownImg {
	color: blue;
	margin-top: -2px;
}

.searchPageActions .togglePossibleMatch {
	border: 1px solid lightgray;
	border-radius: 3px;
	margin-left: -3px !important;
}

.searchPageActions .core-sprite-questionmark {
	color: blue !important;
    line-height: 18px;
    padding-right: 6px;
    padding-left: 6px;
    padding-top: 2px;
    font-size: 14px;
}

.searchResultsWrapperDiv .confidenceLowImg {
	color: red;
	padding-right: 1px;
	padding-bottom: 2px;
	padding-top: 1px;
}

.searchPageActions .toggleNonMatch {
	border: 1px solid lightgray;
	border-radius: 3px;
	margin-left: -3px !important;
}

.searchPageActions .core-sprite-error {
	color: red !important;
    line-height: 18px;
    padding-right: 2px;
    padding-left: 2px;
    padding-top: 2px;
    font-size: 13px;
}

.searchResultsWrapperDiv .confidenceHigh {
	color: white !important;
	background-color: #1BB199 !important;
}

.searchResultsWrapperDiv .confidenceLow {
	color: white !important;
	background-color: #d9534f !important;
}

.searchResultsWrapperDiv .selectableNavRow:hover {
	background-color: rgba(16,106,91, 0.3);
}

.searchResultsWrapperDiv .navlink {
	color: #333333;
}

.searchResultsWrapperDiv .modelDecorationSprite {
  color: #777;
}

.searchResultsWrapperDiv > b {
	margin-left: 10px;
}

.searchWrapper {
	width: calc(100% - 12px);
	height: calc(100% - 16px);
	padding: 6px;
	padding-top: 10px;
	display: flex;
	flex-direction: column;
}

.searchOptWrapperDiv {
}

.replaceModeActive > .searchOptWrapperDiv {
}

.searchWrapper.searchOptionsHidden > .searchOptWrapperDiv {
	height: 0;
	overflow: hidden;
	display: none;
}

.searchWrapper.searchOptParamBlockHidden > .searchOptWrapperDiv > .searchParamBlockDiv {
	display: none;
}

.searchWrapper.searchOptParamBlockHidden > .searchOptWrapperDiv > .searchMainOptionBlock > .toggleDisplayLink{
	display: none;
}

.searchWrapper.searchOptParamBlockHidden > .searchOptWrapperDiv > .searchMainOptionBlock > .searchOptionControlBar > .searchGeneralOptionBlock{
	display: none;
}

.searchResultsWrapperDiv {
	flex: 1 1 auto;
	background-color: white;
	outline: 1px solid lightgray;
	overflow: auto;
	min-width: 274px;
}

.searchResultsWrapperDiv > div {
	height: 100%;
	width: 100%;
}

.searchResultsWrapperDiv > div > .treetable {
	background: white;
}

.searchWrapper > .comboTextInputWrapper {
	margin: 5px 10px 0 10px;
}

.searchWrapper label {
	-moz-user-select: -moz-none;
	-ms-user-select: none;
	-webkit-user-select: none;
	user-select: none;
}

.replaceWrapper {
	display: block;
	overflow: visible;
}

.replaceWrapperHidden {
	display: none;
}

.fileNamePatternsTextInput {


|e| filter(e))
            .map(|e| format!("{}/{}", dir, e.file_name().to_str().expect("Invalid filename")))
            .collect()
    }

    fn find_c_source_files(dir: &str) -> Vec<String> {
        read_dir_and_filter(dir, |e| {
            let file_type = e.file_type().expect("Failed to read capstone source directory");
            let file_name = e.file_name().into_string().expect("Invalid filename");
            file_type.is_file() && (file_name.ends_with(".c") || file_name.ends_with(".C"))
        })
    }

    fn find_arch_dirs() -> Vec<String> {
        read_dir_and_filter(&format!("{}/{}", CAPSTONE_DIR, "arch"), |e| {
            let file_type = e.file_type().expect("Failed to read capstone source directory");
            file_type.is_dir()
        })
    }

    let mut files = find_c_source_files(CAPSTONE_DIR);
    for arch_dir in find_arch_dirs().into_iter() {
        files.append(&mut find_c_source_files(&arch_dir));
    }

    let use_static_crt = {
        let target_features = env::var("CARGO_CFG_TARGET_FEATURE").unwrap_or(String::new());
        target_features.split(",").any(|f| f == "crt-static")
    };

    cc::Build::new()
        .files(files)
        .include(format!("{}/{}", CAPSTONE_DIR, "include"))
        .define("CAPSTONE_X86_ATT_DISABLE_NO", None)
        .define("CAPSTONE_DIET_NO", None)
        .define("CAPSTONE_X86_REDUCE_NO", None)
        .define("CAPSTONE_USE_SYS_DYN_MEM", None)
        .define("CAPSTONE_HAS_ARM", None)
        .define("CAPSTONE_HAS_ARM64", None)
        .define("CAPSTONE_HAS_MIPS", None)
        .define("CAPSTONE_HAS_POWERPC", None)
        .define("CAPSTONE_HAS_SPARC", None)
        .define("CAPSTONE_HAS_SYSZ", None)
        .define("CAPSTONE_HAS_X86", None)
        .define("CAPSTONE_HAS_XCORE", None)
        .flag_if_supported("-Wno-unused-function")
        .flag_if_supported("-Wno-unused-parameter")
        .flag_if_supported("-Wno-unknown-pragmas")
        .flag_if_supported("-Wno-sign-compare")
        .flag_if_supported("-Wno-return-type")
        .static_crt(use_static_crt)
        .compile("capstone");
}

/// Search for header in search paths
#[cfg(feature = "use_bindgen")]
fn find_capstone_header(header_search_paths: &Vec<PathBuf>, name: &str) -> Option<PathBuf> {
    for search_path in header_search_paths.iter() {
        let potential_file = search_path.join(name);
        if potential_file.is_file() {
            return Some(potential_file);
        }
    }
    None
}

/// Gets environment variable value. Panics if variable is not set.
fn env_var(var: &str) -> String {
    env::var(var).expect(&format!("Environment variable {} is not set", var))
}

/// Create bindings using bindgen
#[cfg(feature = "use_bindgen")]
fn write_bindgen_bindings(
    header_search_paths: &Vec<PathBuf>,
    update_pregenerated_bindings: bool,
    pregenerated_bindgen_header: PathBuf,
    out_path: PathBuf,
) {
    let mut builder = bindgen::Builder::default()
        .rust_target(bindgen::RustTarget::Stable_1_19)
        .header


;

		//
		//	'Blit' the image from the source buffer to the dest buffer
		//
		for (int scanline = 0; scanline < m_iMarkerHeight; scanline ++) {
			for (int pixel = 0; pixel < m_iMarkerWidth; pixel ++) {
				BYTE blue	= m_pKeyFrameBits[src_index ++];
				BYTE green	= m_pKeyFrameBits[src_index ++];
				BYTE red		= m_pKeyFrameBits[src_index ++];

				if (blue == 255 && green == 0 && red == 255) {
					dest_index += 3;
				} else {
					m_pBits[dest_index ++] = blue;
					m_pBits[dest_index ++] = green;
					m_pBits[dest_index ++] = red;
				}
			}

			// Skip to the next scanline
			dest_index += (m_iScanlineSize - width_in_bytes);
			src_index += alignment_offset;
		}
	}

	return ;
}

/////////////////////////////////////////////////////////////////////////////
//
// Marker_From_Point
//
int
ColorBarClass::Marker_From_Point (CPoint point)
{
	int marker_index = -1;

	//
	//	Setup the data we need for the search
	//
	LONG style = ::GetWindowLong (m_hWnd, GWL_STYLE);
	int accept_dist = 0;
	int position = 0;
	if (style & CBRS_HORZ) {
		position = point.x;// - m_ColorArea.left;
		accept_dist = (m_iMarkerWidth + 1) >> 1;
	} else {
		position = point.y;// - m_ColorArea.top;
		accept_dist = (m_iMarkerHeight + 1) >> 1;
	}

	//
	//	Search through all the points, trying to find the closest
	//
	int closest = -1;
	int closest_dist = 1024;
	for (int index = 0; index < m_iColorPoints; index ++) {
		int delta = abs (m_ColorPoints[index].StartPos - position);
		if (delta < closest_dist) {
			closest_dist = delta;
			closest = index;
		}
	}

	//
	//	Did we find a marker at this point?
	//
	if (closest_dist < accept_dist) {
		marker_index = closest;
	}

	// Return the index of the marker at the specified point (-1 if not found).
	return marker_index;
}

/////////////////////////////////////////////////////////////////////////////
//
// OnLButtonDown
//
void
ColorBarClass::OnLButtonDown
(
	UINT nFlags,
	CPoint point
)
{
	//
	//	Ensure we have the focus
	//
	if (::GetFocus () != m_hWnd) {
		::SetFocus (m_hWnd);
	}

	LONG style = ::GetWindowLong (m_hWnd, GWL_STYLE);
	if (style & CBRS_SHOW_FRAMES) {

		//
		//	Find the key frame the user clicked on
		//
		int marker_clicked = Marker_From_Point (point);
		if (marker_clicked != -1) {

			// Did the user select a new key?
			if (m_iCurrentKey != marker_clicked) {
				m_iCurrentKey = marker_clicked;

				// Repaint the window
				Repaint ();
			}

			// Should we prepare to move this marker?
			if (m_ColorPoints[m_iCurrentKey].flags & POINT_CAN_MOVE) {
				m_bMoving = true;
				m_bMoved = false;
				::SetCapture (m_hWnd);
			}

		} else {

			//
			//	Insert a new point at this location if the user has the Ctrl key down
			//
			if (::GetAsyncKeyState (VK_CONTROL) < 0) {
				Insert_Po


tVolume(framework.PersistentVolumeConfig{
			PVSource: v1.PersistentVolumeSource{
				FlexVolume: &v1.FlexPersistentVolumeSource{
					Driver: "k8s/" + driver,
				}},
			NamePrefix:       "pv-",
			StorageClassName: resizableSc.Name,
			VolumeMode:       pvc.Spec.VolumeMode,
		})

		pv, err = framework.CreatePV(c, pv)
		Expect(err).NotTo(HaveOccurred(), "Error creating pv %v", err)

		By("Waiting for PVC to be in bound phase")
		pvcClaims := []*v1.PersistentVolumeClaim{pvc}
		var pvs []*v1.PersistentVolume

		pvs, err = framework.WaitForPVClaimBoundPhase(c, pvcClaims, framework.ClaimProvisionTimeout)
		Expect(err).NotTo(HaveOccurred(), "Failed waiting for PVC to be bound %v", err)
		Expect(len(pvs)).To(Equal(1))

		By("Creating a deployment with the provisioned volume")
		deployment, err := framework.CreateDeployment(c, int32(1), map[string]string{"test": "app"}, nodeKeyValueLabel, ns, pvcClaims, "")
		Expect(err).NotTo(HaveOccurred(), "Failed creating deployment %v", err)
		defer c.AppsV1().Deployments(ns).Delete(deployment.Name, &metav1.DeleteOptions{})

		By("Expanding current pvc")
		newSize := resource.MustParse("6Gi")
		pvc, err = expandPVCSize(pvc, newSize, c)
		Expect(err).NotTo(HaveOccurred(), "While updating pvc for more size")
		Expect(pvc).NotTo(BeNil())

		pvcSize := pvc.Spec.Resources.Requests[v1.ResourceStorage]
		if pvcSize.Cmp(newSize) != 0 {
			framework.Failf("error updating pvc size %q", pvc.Name)
		}

		By("Waiting for cloudprovider resize to finish")
		err = waitForControllerVolumeResize(pvc, c)
		Expect(err).NotTo(HaveOccurred(), "While waiting for pvc resize to finish")

		By("Getting a pod from deployment")
		podList, err := framework.GetPodsForDeployment(c, deployment)
		Expect(podList.Items).NotTo(BeEmpty())
		pod := podList.Items[0]

		By("Deleting the pod from deployment")
		err = framework.DeletePodWithWait(f, c, &pod)
		Expect(err).NotTo(HaveOccurred(), "while deleting pod for resizing")

		By("Waiting for deployment to create new pod")
		pod, err = waitForDeploymentToRecreatePod(c, deployment)
		Expect(err).NotTo(HaveOccurred(), "While waiting for pod to be recreated")

		By("Waiting for file system resize to finish")
		pvc, err = waitForFSResize(pvc, c)
		Expect(err).NotTo(HaveOccurred(), "while waiting for fs resize to finish")

		pvcConditions := pvc.Status.Conditions
		Expect(len(pvcConditions)).To(Equal(0), "pvc should not have conditions")
	})
})
/*
Copyright 2018 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.
*/

package network

import (
	"context"
	"fmt"
	"strconv"
	"time"

	"k8s.io/api/core/v1"


= 0;
    // X acceleration
    int16_t xacc = 0;
    // Y acceleration
    int16_t yacc = 0;
    // Z acceleration
    int16_t zacc = 0;
    // Angular speed around X axis
    int16_t xgyro = 0;
    // Angular speed around Y axis
    int16_t ygyro = 0;
    // Angular speed around Z axis
    int16_t zgyro = 0;
    // X Magnetic field
    int16_t xmag = 0;
    // Y Magnetic field
    int16_t ymag = 0;
    // Z Magnetic field
    int16_t zmag = 0;
    // Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C
    // it must send 1 (0.01C).
    int16_t temperature = 0;
    virtual std::string toJSon();

protected:
    virtual int pack(char* buffer) const;
    virtual int unpack(const char* buffer);
};

// Handshake message to initiate, control and stop image streaming when using the
// Image Transmission Protocol: https://mavlink.io/en/services/image_transmission.html.
class MavLinkDataTransmissionHandshake : public MavLinkMessageBase
{
public:
    const static uint8_t kMessageId = 130;
    MavLinkDataTransmissionHandshake() { msgid = kMessageId; }
    // Type of requested/acknowledged data.
    uint8_t type = 0;
    // total data size (set on ACK only).
    uint32_t size = 0;
    // Width of a matrix or image.
    uint16_t width = 0;
    // Height of a matrix or image.
    uint16_t height = 0;
    // Number of packets being sent (set on ACK only).
    uint16_t packets = 0;
    // Payload size per packet (normally 253 byte, see DATA field size in message
    // ENCAPSULATED_DATA) (set on ACK only).
    uint8_t payload = 0;
    // JPEG quality. Values: [1-100].
    uint8_t jpg_quality = 0;
    virtual std::string toJSon();

protected:
    virtual int pack(char* buffer) const;
    virtual int unpack(const char* buffer);
};

// Data packet for images sent using the Image Transmission Protocol: https://mavlink.io/en/services/image_transmission.html.
class MavLinkEncapsulatedData : public MavLinkMessageBase
{
public:
    const static uint8_t kMessageId = 131;
    MavLinkEncapsulatedData() { msgid = kMessageId; }
    // sequence number (starting with 0 on every transmission)
    uint16_t seqnr = 0;
    // image data bytes
    uint8_t data[253] = { 0 };
    virtual std::string toJSon();

protected:
    virtual int pack(char* buffer) const;
    virtual int unpack(const char* buffer);
};

// Distance sensor information for an onboard rangefinder.
class MavLinkDistanceSensor : public MavLinkMessageBase
{
public:
    const static uint8_t kMessageId = 132;
    MavLinkDistanceSensor() { msgid = kMessageId; }
    // Timestamp (time since system boot).
    uint32_t time_boot_ms = 0;
    // Minimum distance the sensor can measure
    uint16_t min_distance = 0;
    // Maximum distance the sensor can measure
    uint16_t max_distance = 0;
    // Current distance reading
    uint16_t current_distance = 0;
    // Type of distance sensor.
    uint8_t type = 0;
    // Onboard ID of the sensor
    uint8_t id = 0;
    // Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing:
    // ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE,
    // left-facing: ROTATION_YAW_90, right-facing: ROT


esponding
	 * to this register. For example the FullRegisterName of ah is rax.
	 */
	FullRegisterName string

	// RegisterSize is the size of this register in bits.
	RegisterSize int
}

/*
 * maxIterations is the maximum number of iterations that the register analysis
 * will run for before bailing out.
 */
const maxIterations = 8192

// allRegs is a list of the names of all registers.
var allRegs = []string{
	"rax", "rbx", "rcx", "rdx", "rdi", "rsi", "rbp", "rsp", "r8", "r9",
	"r10", "r11", "r12", "r13", "r14", "r15", "rip", "rflags",
}

// allRegsSet is a RegisterSet that contains all the registers.
var allRegsSet = regSetFromRegList(allRegs)

/*
 * subRegs maps subregister names to the name of the full register
 * (e.g. al -> rax, esp -> rsp).
 */
var subRegs = initializeSubRegs()

var regsUsedByRet = regSetFromRegList([]string{
	"rbx", "rbp", "rsp", "r12", "r13", "r14", "r15", "rax", "rdx", "r10",
	"r11", "r8", "r9", "rcx", "rdi", "rsi",
})

var regsUsedByCall = regSetFromRegList([]string{
	"rbx", "rbp", "rsp", "r12", "r13", "r14", "r15", "rdi", "rsi", "rdx",
	"rcx", "r8", "r9", "rax",
})

// regNameToUnitSet creates a RegisterSet containing only one register
func regNameToUnitSet(regName string) RegisterSet {
	for i, r := range allRegs {
		if subRegs[regName].FullRegisterName == r {
			return 1 << uint(i)
		}
	}

	panic(fmt.Sprintf("Unknown register name %s", regName))
}

// regSetFromRegList creates a RegisterSet from a list of register names
func regSetFromRegList(regList []string) RegisterSet {
	ret := RegisterSet(0)

	if len(regList) > 32 {
		panic("Register list too long")
	}

	for _, r := range regList {
		if r == "ds" || r == "gs" {
			// Skip segment registers
			continue
		}

		ret = ret.regSetUnion(regNameToUnitSet(r))
	}

	return ret
}

// regSetDifference computes the set difference between two register sets.
func (rs RegisterSet) regSetDifference(other RegisterSet) RegisterSet {
	return (rs ^ other) & rs
}

// regSetUnion computes the set union between two register sets.
func (rs RegisterSet) regSetUnion(other RegisterSet) RegisterSet {
	return rs | other
}

// regSetComplement computes the complement of a register set
func (rs RegisterSet) regSetComplement() RegisterSet {
	return ^rs
}

// regSetComplement computes the size of a register set
func (rs RegisterSet) regSetSize() int {
	return bits.OnesCount32(uint32(rs))
}

// regSetToRegList converts a RegisterSet to a list of register names
func (rs RegisterSet) regSetToRegList() []string {
	ret := make([]string, 0)

	for i, r := range allRegs {
		if (rs & (1 << uint(i))) != 0 && r != "rip" && r != "rsp" {
			ret = append(ret, r)
		}
	}

	return ret
}

func analyzeInstruction(i int, functionName string, functionInfo *FunctionInfo, usedRegs []RegisterSet) bool {
	instructionInfo := functionInfo.Instructions[i]

	reguses := instructionInfo.RegsReadSet
	regwrites := instructionInfo.RegsWrittenSet.regSetDifference(reguses)

	for _, successor := range instructionInfo.Successors {
		var regsUsedBySuccessor RegisterSet

		switch v := successor.(type) {
		case float64:
			succIndex := int(v)
			if succIndex > len(usedRegs) {
				panic(fmt.Sprintf("Successor index out of range in %s instruction %d (%d/%d)", functionName, i, succIndex, len(usedRegs)))


orpurile victimelor, au fost unse cu uleiuri mistice și insuflate cu tărie spirituală prin meditație. Creatorii acestor amulete au sperat că într-o zi acestea vor fi folosite pentru răzbunare.',
      tr: 'Kurt adamın kurbanlarının vücutlarında kalan bu korkunç pençeler, mistik yağlar ile mesh edilmiş ve meditasyon yoluyla içlerine ruhani metanet aşılanmış. Bu muskaları yapanlar, aşılanan ruhani korumanın bir gün kurt adamdan intikam almak için kullanılabileceğini ummuşlar.',
      hu: 'A farkasemberek még az áldozatokon hátrahagyott karmait misztikus olajokkal és hosszú meditációval kovácsolták egybe. Azt remélték, hogy egy napon ezek az eszközök a bosszú fegyvereivé válhatnak.',
      vi: 'Những móng vuốt người sói đáng sợ bị bỏ lại trên cơ thể của các nạn nhân đã được bôi bằng dầu thần bí và thấm nhuần tinh thần thông qua thiền định. Những người tạo ra những lá bùa hộ mệnh này hy vọng rằng một ngày nào đó những sự bảo vệ tâm linh này sẽ được sử dụng để trả thù.',
      cs: 'Strachuplné vlkodlačí drápy, které byly zanechány na jejich obětech, byly pomazány mystickými oleji a vštípeny do nich duchovní statečnost zkrz meditaci. Stvořitelé tohoto amuletu doufají, že tato duchovní protekce jednoho dne bude použita na pomstu.',
      it: 'Gli artigli di un terribile lupo mannaro lasciati sui corpi delle vittime vengono unti con oli mistici e infusi con una forza d\'animo attraverso la meditazione. I creatori di questi amuleti speravano che queste protezioni spirituali venissero un giorno usate per vendicarsi.',
      ja: '犠牲者の身体に刻み込まれた恐ろしいオオカミ男の爪は、聖なる油により聖別され、瞑想を通じて精神の強さを宿らせました。このお守りの作成者は、宿った精神の強さがいつの日か復讐に発揮される事を望んでいました。',
      zh: '被遺留在受害者身上的可怕狼人爪子被神秘的油膏抹了，並通過冥想被灌輸了精神上的毅力。這些護身符的創造者希望這些精神保護有一天能夠用於報仇。'
    }
  },

  {
    name       : {$$: 'Eagle\'s Talon'},
    description: {
      en: 'When a talon was found, it was considered a gift from the sacred birds in the mountains. The monks in the mountains used the talons to produce spiritual amulets to protect themselves from invaders during battle.',
      ru: 'Когда был найден этот коготь, его сч


InputWrapper .arrowDown:hover::after{border-top-color:#0f62fe;border-bottom-color:#0f62fe}.numInputWrapper .arrowUp:active::after,.numInputWrapper .arrowDown:active::after{border-top-color:#0f62fe;border-bottom-color:#0f62fe}.numInput[disabled]~.arrowUp::after{border-bottom-color:#c6c6c6}.numInput[disabled]~.arrowDown::after{border-top-color:#c6c6c6}.numInputWrapper:hover .arrowUp,.numInputWrapper:hover .arrowDown{opacity:1}.numInputWrapper:hover .numInput[disabled]~.arrowUp,.numInputWrapper:hover .numInput[disabled]~.arrowDown{opacity:0}.flatpickr-weekdays{display:flex;align-items:center;height:2.5rem}.flatpickr-weekdaycontainer{display:flex;width:100%}.flatpickr-weekday{font-size:.875rem;font-weight:400;line-height:1.28572;letter-spacing:.16px;flex:1;color:#161616;cursor:default}.flatpickr-days:focus{outline:0}.flatpickr-calendar.animate .dayContainer.slideLeft{-webkit-animation:fpFadeOut 400ms cubic-bezier(0.23, 1, 0.32, 1),fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeOut 400ms cubic-bezier(0.23, 1, 0.32, 1),fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-calendar.animate .dayContainer.slideLeft,.flatpickr-calendar.animate .dayContainer.slideLeftNew{-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0)}.flatpickr-calendar.animate .dayContainer.slideLeftNew{-webkit-animation:fpFadeIn 400ms cubic-bezier(0.23, 1, 0.32, 1),fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeIn 400ms cubic-bezier(0.23, 1, 0.32, 1),fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-calendar.animate .dayContainer.slideRight{-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);-webkit-animation:fpFadeOut 400ms cubic-bezier(0.23, 1, 0.32, 1),fpSlideRight 400ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeOut 400ms cubic-bezier(0.23, 1, 0.32, 1),fpSlideRight 400ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-calendar.animate .dayContainer.slideRightNew{-webkit-animation:fpFadeIn 400ms cubic-bezier(0.23, 1, 0.32, 1),fpSlideRightNew 400ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeIn 400ms cubic-bezier(0.23, 1, 0.32, 1),fpSlideRightNew 400ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-day{font-size:.875rem;font-weight:400;line-height:1.28572;letter-spacing:.16px;display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;color:#161616;cursor:pointer;transition:all 70ms cubic-bezier(0.2, 0, 0.38, 0.9)}.flatpickr-day:hover{background:#e5e5e5}.flatpickr-day:focus{outline:2px solid #0f62fe;outline-offset:-2px;outline-color:#0f62fe}@media screen and (prefers-contrast){.flatpickr-day:focus{outline-style:dotted}}.nextMonthDay,.prevMonthDay{color:#6f6f6f}.flatpickr-day.today{position:relative;color:#


DORMU = "Linaje de Nozdormu",
		CAER_DARROW = "Castel Darrow",
		CENARION_CIRCLE = "Círculo Cenarion",
		CENARION_EXPEDITION = "Expedición Cenarion",
		CLASSIC = "Clásicas",
		DARKMOON_FAIRE = "Feria de la Luna Negra",
		DARKSPEAR_TROLLS = "Trols Lanza Negra",
		DARNASSUS = "Darnassus",
		ENGINEERING_GNOME = "Ingeniería: gnoma",
		ENGINEERING_GOBLIN = "Ingeniería: goblin",
		EVERLOOK = "Vista Eterna",
		EXODAR = "El Exodar",
		EXPLORERS_LEAGUE = "Liga de Expedicionarios",
		FRENZYHEART_TRIBE = "Tribu Corazón Frenético",
		FRIENDLY_HIDDEN = "Amistoso, oculto",
		FROSTWOLF_CLAN = "Clan Lobo Gélido",
		GADGETZAN = "Gadgetzan",
		GELKIS_CLAN_CENTAUR = "Centauros del clan Gelkis",
		GNOMEREGAN_EXILES = "Exiliados de Gnomeregan",
		HONOR_HOLD = "Bastión del Honor",
		HORDE = "Horda",
		HORDE_EXPEDITION = "Expedición de la Horda",
		HORDE_FORCES = "Fuerzas de la Horda",
		HYDRAXIAN_WATERLORDS = "Srs. del Agua de Hydraxis",
		IRONFORGE = "Forjaz",
		KEEPERS_OF_TIME = "Vigilantes del Tiempo",
		KIRIN_TOR = "Kirin Tor",
		KNIGHTS_OF_THE_EBON_BLADE = "Caballeros de la Espada de Ébano",
		KURENAI = "Kurenai",
		LEATHERWORKING_DRAGONSCALE = "Peletería: dragontina",
		LEATHERWORKING_ELEMENTAL = "Peletería: elemental",
		LEATHERWORKING_TRIBAL = "Peletería: tribal",
		LOWER_CITY = "Bajo Arrabal",
		MAGRAM_CLAN_CENTAUR = "Centauros del clan Magram",
		NETHERWING = "Ala Abisal",
		OGRILA = "Ogri'la",
		ORGRIMMAR = "Orgrimmar",
		RATCHET = "Trinquete",
		RAVENHOLDT = "Ravenholdt",
		REUSE = "REUSE",
		SHATARI_SKYGUARD = "Guardia del cielo Sha'tari",
		SHATTERED_SUN_OFFENSIVE = "Ofensiva Sol Devastado",
		SHATTRATH_CITY = "Ciudad de Shattrath",
		SHENDRALAR = "Shen'dralar",
		SHOLAZAR_BASIN = "Cuenca de Sholazar",
		S


Request, output *ListPropertiesOutput) {
	op := &request.Operation{
		Name:       opListProperties,
		HTTPMethod: "POST",
		HTTPPath:   "/workspaces/{workspaceId}/properties-list",
		Paginator: &request.Paginator{
			InputTokens:     []string{"nextToken"},
			OutputTokens:    []string{"nextToken"},
			LimitToken:      "maxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListPropertiesInput{}
	}

	output = &ListPropertiesOutput{}
	req = c.newRequest(op, input, output)
	req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("api.", nil))
	req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
	return
}

// ListProperties API operation for AWS IoT TwinMaker.
//
// This API lists the properties of a component.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS IoT TwinMaker's
// API operation ListProperties for usage and error information.
//
// Returned Error Types:
//
//   - InternalServerException
//     An unexpected error has occurred.
//
//   - AccessDeniedException
//     Access is denied.
//
//   - ResourceNotFoundException
//     The resource wasn't found.
//
//   - ThrottlingException
//     The rate exceeds the limit.
//
//   - ValidationException
//     Failed
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/iottwinmaker-2021-11-29/ListProperties
func (c *IoTTwinMaker) ListProperties(input *ListPropertiesInput) (*ListPropertiesOutput, error) {
	req, out := c.ListPropertiesRequest(input)
	return out, req.Send()
}

// ListPropertiesWithContext is the same as ListProperties with the addition of
// the ability to pass a context and additional request options.
//
// See ListProperties for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *IoTTwinMaker) ListPropertiesWithContext(ctx aws.Context, input *ListPropertiesInput, opts ...request.Option) (*ListPropertiesOutput, error) {
	req, out := c.ListPropertiesRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// ListPropertiesPages iterates over the pages of a ListProperties operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListProperties method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//	// Example iterating over at most 3 pages of a ListProperties operation.
//	pageNum := 0
//	err := client.ListPropertiesPages(params,
//	    func(page *iottwinmaker.ListPropertiesOutput, lastPage bool) bool {
//	        pageNum++
//	        fmt.Println(page)
//	        return pageNum <= 3
//	    })
func (c *IoTTwinMaker) ListPropertiesPages(input *ListPropertiesInput, fn func(*ListPropertiesOutput, bool) bool) error {
	return c.ListPropertiesPagesWithContext(aws.BackgroundContext(), input, fn)
}

// ListPropertiesPagesWithContext same as ListPropertiesPages except
// it takes a Context and allows setting request options on t


: Tahoma;
    font-size: 12px;
    color: #ffffff;
}

.nodeExample1 img {
    margin-right:  10px;
}

.Treant > a:link {
    color: #ffffff;
}

.Treant > a:visited {
    color: #ffffff;
}

.Treant > a:link:hover {
    color: #636363;
}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { margin:0; padding:0; }

body { background: #fff; }

/* optional Container STYLES */
.chart { height: 400px; width: 900px; margin: 5px; margin: 5px auto; border: 3px solid #DDD; border-radius: 3px; }
.node { color: #9CB5ED; border: 2px solid #C8C8C8; border-radius: 3px; background: #fff; transition: background 0.7s, color 0.7s; }
.node p { font-size: 17px; line-height: 20px; height: 20px; font-weight: bold; padding: 3px; margin: 0; }

.node.main-date { width: 10px; height: 10px; border-radius: 50%; }
.node.main-date p.node-name { top: -15px; font-size: 15px; position: absolute; opacity: 0; z-index: -1; left: -30px; transition: top 1s, opacity 1s; }
.node.main-date:hover p.node-name { opacity: 1; top: -25px; }

.Treant .collapse-switch { width: 100%; height: 100%; border: none; }
.Treant .node.collapsed { background-color: #D7F5FF; color: #827A7A; }
.Treant .node.collapsed .collapse-switch { background: none; }

.timeline .node-desc { position: absolute; left: -999px; width: 2000px; background: #665B57; height: 3px; padding: 0; z-index: -1; top: 3px; }/*
  datetimectrls.css
  Modified fpdoc.css for use with the DateTimeCtrls package
*/

body {
  background-color: white;
  color: black;
  font-family: "Roboto", "DejaVu Sans", "Arial", Helvetica, sans-serif;
  font-size: 11pt;
}

tt, span.kw, pre {
  font-family: "Courier New", Courier, monospace;
  font-size: 11pt;
}

a:link {
  color: blue;
}

a:visited {
  color: darkblue;
}

a:active {
  color: red;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, td.h2 {
  color: #005A9C;
}

/* Especially for Netscape on Linux: */
h3, td.h3 {
  font-size: 11pt;
}

/* source fragments */
span.code {
  white-space: nowrap;
  font-weight: bold;
  /* font-size: 1em; */
}

/* symbols in source fragments */
span.sym {
  color: darkred;
}

/* keywords in source fragments */
span.kw {
  font-weight: bold;
}

/* comments in source fragments */
span.cmt {
  color: darkcyan;
  font-style: italic;
}

/* directives in source fragments */
span.dir {
  color: OrangeRed;
  font-style: italic;
}

/* numbers in source fragments */
span.num {
  color: darkmagenta;
}

/* characters (#...) in source fragments */
span.chr {
  color: darkcyan;
}

/* strings in source fragments */
span.str {
  co


eue', 'Ubuntu'" }};
$font-family-sans-serif: {{ .Site.Params.sans_serif_font | default "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Ubuntu'" }};
$font-family-monospace:  {{ .Site.Params.mono_font | default "SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace" }};

// Code Padding Variables
$code-block-padding-top: {{ if eq .Site.Params.docs.prism true -}}0{{ else }}1.25rem 0 0 0{{ end }};

// Icon Fonts
@import "custom/plugins/icons/google-material";

// Core files
@import "../../scss/bootstrap/functions";
@import "../../scss/bootstrap/variables";
@import {{ printf "'%s%s'" "custom/colors/" (.Site.Params.docs.themeColor | default "blue") }}; // current theme color
@import "../../scss/bootstrap/mixins";
@import "../../scss/bootstrap/bootstrap";
@import "variables";

{{ if and (.Site.Params.docsearch.appID) (.Site.Params.docsearch.apiKey) -}}
@import "custom/plugins/docsearch/style";
{{ end }}

// Structure
@import "custom/structure/general";
@import "custom/structure/content";
@import "custom/structure/sidebar";
@import "custom/structure/doc-nav";
@import "custom/structure/toc";
@import "custom/structure/footer";

// Components
@import "custom/components/buttons";
@import "custom/components/breadcrumb";
@import "custom/components/badge";
@import "custom/components/backgrounds";
@import "custom/components/alerts";
@import "custom/components/card";
@import "custom/components/forms";
@import "custom/components/table";
@import "custom/components/tabs";
@import "custom/components/tooltip";

// Pages
@import "custom/pages/features";
@import "custom/pages/helper";

// Plugins

// Prism / Chroma
{{- if eq .Site.Params.docs.prism true }}
@import {{ printf "'%s%s'" "custom/plugins/prism/themes/" (.Site.Params.docs.prismTheme | default "lotusdocs") }}; // current prism theme
@import "custom/plugins/prism/prism";
{{- else }}
@import "custom/plugins/chroma/default";
{{- end -}}

// FlexSearch
{{ if or (not (isset .Site.Params.flexsearch "enabled")) (eq .Site.Params.flexsearch.enabled true) -}}@import "custom/plugins/flexsearch/flexsearch";{{ end }}

// Feedback Widget
{{ if .Site.Params.feedback.enabled | default false -}}@import "custom/plugins/feedback/feedback";{{ end}}

// Mermaid
@import "custom/plugins/mermaid/mermaid";

h1 {
    margin-top: .5em;
    font-weight: 900 !important;
    margin-left: auto;
    margin-right: auto;
    padding: 0.1em 0.4em;
    border-radius: 0.8em 0.3em;
    background: transparent;
    background-image: linear-gradient(
        to right,
        hsla(226, 66, 51, 0.3),
        hsla(226, 66, 51, 0.1)
    );
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

h2 {
    padding-top: 1.5em;
    padding-bottom: 0.5em;
}

h4 {


A8imaCMFUDcQKYhjSD9TEgCTUC8jkRD1kENYkA26D8QhwHxNSINuQFV/x/dIBD4C8TmQPyGgCEgeVOoegZsBoHAFyA2BOJ/OAz5B5X/gizIhEPxEyC2xiFnDZVnIMYgEDgBxOloYhlQcQZSDAKBWUDcC2WD6Jm4FLIQETtlQPwdiOvxKQIIMADSFCE0PCEh2wAAAABJRU5ErkJggg==") no-repeat;
	width:9px;
	height:5px;
	-webkit-background-size:9px 5px;
	background-size:9px 5px;
	display:inline-block;
	right:9px;
	position:absolute;
	background-color:transparent;
	z-index:0;
}

.pay .id-area .element .text{
	padding:14px 10px;
	font-weight:350px;
	font-size:15px;
}

.pay .ticket-form .form-info{
	padding:7px 0 16px;
	line-height:19px;
	font-size:12px;
	color:#CCCCCC;
}

.pay .ticket-form .notice{
	font-size:12px;
	color:#0066FF;
	font-weight:700;
	display:inline-block;
	padding: 10px;
}

.pay .ticket-form .sum-info{
	font-size:24px;
	font-weight:700;
}

.pay .ticket-form .sum-info .small-mark{
	font-size:15px;
}

.pay .ticket-form .sum-info:before{
	content:"总额";
	font-size:15px;
	color:#999999;
	margin-right:25px;
}
.layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{text-overflow:ellipsis;white-space:nowrap}*html{background-image:url(about:blank);background-attachment:fixed}html #layuicss-skinlayercss{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+"px")}.layui-layer{-webkit-overflow-scrolling:touch;top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(loading-1.gif) center center no-repeat #eee}.layui-layer-ico{background:url(icon.png) no-repeat}.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-move{display:none;position:fixed;*position:absolute;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647}.layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize}.layui-layer{border-radius:2px;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform


 {
  --fa: "\f5d7"; }

.fa-table-cells-row-unlock {
  --fa: "\e691"; }

.fa-user-injured {
  --fa: "\f728"; }

.fa-face-sad-tear {
  --fa: "\f5b4"; }

.fa-sad-tear {
  --fa: "\f5b4"; }

.fa-plane {
  --fa: "\f072"; }

.fa-tent-arrows-down {
  --fa: "\e581"; }

.fa-exclamation {
  --fa: "\21"; }

.fa-arrows-spin {
  --fa: "\e4bb"; }

.fa-print {
  --fa: "\f02f"; }

.fa-turkish-lira-sign {
  --fa: "\e2bb"; }

.fa-try {
  --fa: "\e2bb"; }

.fa-turkish-lira {
  --fa: "\e2bb"; }

.fa-dollar-sign {
  --fa: "\24"; }

.fa-dollar {
  --fa: "\24"; }

.fa-usd {
  --fa: "\24"; }

.fa-x {
  --fa: "\58"; }

.fa-magnifying-glass-dollar {
  --fa: "\f688"; }

.fa-search-dollar {
  --fa: "\f688"; }

.fa-users-gear {
  --fa: "\f509"; }

.fa-users-cog {
  --fa: "\f509"; }

.fa-person-military-pointing {
  --fa: "\e54a"; }

.fa-building-columns {
  --fa: "\f19c"; }

.fa-bank {
  --fa: "\f19c"; }

.fa-institution {
  --fa: "\f19c"; }

.fa-museum {
  --fa: "\f19c"; }

.fa-university {
  --fa: "\f19c"; }

.fa-umbrella {
  --fa: "\f0e9"; }

.fa-trowel {
  --fa: "\e589"; }

.fa-d {
  --fa: "\44"; }

.fa-stapler {
  --fa: "\e5af"; }

.fa-masks-theater {
  --fa: "\f630"; }

.fa-theater-masks {
  --fa: "\f630"; }

.fa-kip-sign {
  --fa: "\e1c4"; }

.fa-hand-point-left {
  --fa: "\f0a5"; }

.fa-handshake-simple {
  --fa: "\f4c6"; }

.fa-handshake-alt {
  --fa: "\f4c6"; }

.fa-jet-fighter {
  --fa: "\f0fb"; }

.fa-fighter-jet {
  --fa: "\f0fb"; }

.fa-square-share-nodes {
  --fa: "\f1e1"; }

.fa-share-alt-square {
  --fa: "\f1e1"; }

.fa-barcode {
  --fa: "\f02a"; }

.fa-plus-minus {
  --fa: "\e43c"; }

.fa-video {
  --fa: "\f03d"; }

.fa-video-camera {
  --fa: "\f03d"; }

.fa-graduation-cap {
  --fa: "\f19d"; }

.fa-mortar-board {
  --fa: "\f19d"; }

.fa-hand-holding-medical {
  --fa: "\e05c"; }

.fa-person-circle-check {
  --fa: "\e53e"; }

.fa-turn-up {
  --fa: "\f3bf


doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u8) & 0x01) << 5);
        self.w
    }
}
#[doc = "Transmission Complete DMA Select\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TCDMAS_A {
    #[doc = "0: If C2\\[TCIE\\] is set and the S1\\[TC\\] flag is set, the TC interrupt request signal is asserted to request an interrupt service."]
    _0,
    #[doc = "1: If C2\\[TCIE\\] is set and the S1\\[TC\\] flag is set, the TC DMA request signal is asserted to request a DMA transfer."]
    _1,
}
impl From<TCDMAS_A> for bool {
    #[inline(always)]
    fn from(variant: TCDMAS_A) -> Self {
        match variant {
            TCDMAS_A::_0 => false,
            TCDMAS_A::_1 => true,
        }
    }
}
#[doc = "Reader of field `TCDMAS`"]
pub type TCDMAS_R = crate::R<bool, TCDMAS_A>;
impl TCDMAS_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TCDMAS_A {
        match self.bits {
            false => TCDMAS_A::_0,
            true => TCDMAS_A::_1,
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == TCDMAS_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == TCDMAS_A::_1
    }
}
#[doc = "Write proxy for field `TCDMAS`"]
pub struct TCDMAS_W<'a> {
    w: &'a mut W,
}
impl<'a> TCDMAS_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: TCDMAS_A) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "If C2\\[TCIE\\] is set and the S1\\[TC\\] flag is set, the TC interrupt request signal is asserted to request an interrupt service."]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(TCDMAS_A::_0)
    }
    #[doc = "If C2\\[TCIE\\] is set and the S1\\[TC\\] flag is set, the TC DMA request signal is asserted to request a DMA transfer."]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(TCDMAS_A::_1)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) ->


orja.",
    ["T"] = "O Teste da Justiça",
  },
  [1654] = {
    ["D"] = "Eu gostaria de recompensá-lo se você estiver disposto a aceitar tal coisa? Não me entenda mal, minha generosidade depende de quanta ajuda você pode oferecer, mas vejo que nós dois nos beneficiamos muito com essa aliança.$B$BI criará para você uma arma digna do que você conquistou, um símbolo do paladino e da Luz, mas você deve reunir os itens que preciso para criá-lo. Já comecei a anotar os itens, só é preciso alguém corajoso e habilidoso o suficiente para recuperá-los. O que você me diz, $c?",
    ["O"] = "Usando as Notas sobre Armas de Jordan, encontre um pouco de Madeira de Carvalho Pedra Branca, Remessa de Minério Refinado de Bailor, Martelo de Metalurgia de Jordan e uma Gema Kor, e devolva-os para Jordan Stilwell em Altaforja.",
    ["T"] = "O Teste da Justiça",
  },
  [1655] = {
    ["D"] = "Ah, você me assustou, $G homem:mulher;! Você não vê que eu estava perdido em pensamentos?$B$BO que é isso? A remessa de Jordan... para Altaforja. Ahhh, sim, eu sei do que você está falando. Ogros Mo\'grosh... foi quem levou o carregamento de minério do meu velho amigo. A caravana vinha dos Pantanais para cá e foi emboscada. O guarda que sobreviveu ao ataque faleceu há alguns dias - o curandeiro não conseguiu alcançá-los rápido o suficiente.$B$BSe você quiser a remessa, terá que seguir para nordeste através do Lago. Tem que estar em algum lugar.",
    ["O"] = "Leve a Remessa de Minério de Jordan para Bailor Stonehand em Loch Modan.",
    ["T"] = "Remessa de minério do fiador",
  },
  [1656] = {
    ["D"] = "$N, por favor, eu imploro, você pode me ajudar? Ainda não terminei minhas tarefas aqui na Mesa – estou no meio do meu Ritual de Força – e meu pai me pediu para entregar essas peles na pousada em Casco Sangrento.$B$BI estou longe de descansar o suficiente para completar meu rito e esta tarefa para meu pai. Você se importaria de continuar para mim?$B$BA pousada é agradável e um lugar perfeito para descansar durante suas longas viagens. Tenho certeza que você concordará quando ver.",
    ["O"] = "Leve o Pacote de Peles para o Estalajadeiro Kauth na Aldeia Casco Sangrento.",
    ["T"] = "Uma tarefa inacabada",
  },
  [1657] = {
    ["D"] = "Comemore a Noturnália com estilo... trazendo tristeza aos nossos inimigos em Southshore!$B$BPegue uma dessas bombas de mau cheiro especialmente criadas. Está repleto de um funk odioso que nenhum ser humano - ou qualquer animal de vontade fraca - pode suportar cheirar. Você precisará jogá-lo bem no coração de Southshore para que ele faça seu trabalho, então esteja preparado para uma luta contra a Aliança!$B$BQuando você completar esta tarefa... este tributo à nossa libertação, retorne para mim!",
    ["O"] = "Jogue três Bombas Fedorentas Renegadas no coração de Litoral Sul, em Eira dos


`diy`或`logoText`，如设置`default`则下拉为小程序原生的样式(三个圆点动画)。如设置`base`则下拉为组件提供的基础样式。如设置`logoText`则开启 LOGO 文字效果，如设置`diy`则下拉完全开放自定义，可根据下拉变化值或搭配[视差组件](./parallax.md)进行自定义 | _String_ | `default`  | 3.0.0 |
| config       | 一些下拉设置，详见[下拉设置](./refresh.md#下拉设置)                                                                                | _Obj_    |            | 3.0.0 |
| threshold    | 下拉变化值，数值范围为`0`~`1`，双向绑定 model:threshold。无需主动设置值，自动返回下拉变化值。作用是实时返回下拉变化，可根据变化值做自定义动画效果(如移动、旋转等)                                                                                | _Number_ | `0`        | 3.0.0 |
| refreshstate | 下拉变化状态，有三种状态：`pulldown`(下拉刷新)、`loosen`(松手刷新)、`loading`(刷新中)，双向绑定 model:refreshstate。无需主动设置值，自动返回下拉变化状态。作用是实时返回下拉变化，可根据变化状态做自定义动画效果                                                                          | _String_ | `pulldown` | 3.0.4 |

## 下拉设置

| 参数            | 说明                                                                                | 类型      | 默认值  | 版本  |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------- | ----- |
| shake           | 设置下拉时是否开启手机震动，可设置`true`或`false`。设置为`true`时开启                                                                                | _Boolean_ | `false` | 3.0.0 |
| height          | 设置下拉高度                                                                                | _Number_  | `50`    | 3.0.0 |
| background      | 设置下拉背景，详见[背景设置](./refresh.md#背景设置)                                                                                | _Obj_     |         | 3.0.0 |
| text            | 当 type 为`base`时，可设置下拉文字，详见[文字设置](./refresh.md#文字设置)                                                                                | _Obj_     |         | 3.0.0 |
| isAutoTriggered | 下拉刷新是否自动回弹,默认为`true`下拉之后自动回弹，可设置`false`下拉到最大松手之后只执行刷新操作，不自动回弹，获取 scroller 实例之后执行`scroller.settriggered(false)`方法。此设置为复杂动画提供可能，自定义回弹时机( `注意：default模式不支持此方法。如需要实现原生效果且支持此方法，请自行使用该组件写三个圆点闪烁来实现` ) | _Boolean_ | `true`  | 3.0.4 |

## 背景设置

| 参数   | 说明


#!/usr/bin/env python3
import time

from cereal import car, log, messaging
from openpilot.common.params import Params
from openpilot.system.manager.process_config import managed_processes
from openpilot.system.hardware import HARDWARE

if __name__ == "__main__":
  CP = car.CarParams(notCar=True, wheelbase=1, steerRatio=10)
  Params().put("CarParams", CP.to_bytes())

  procs = ['camerad', 'ui', 'modeld', 'calibrationd', 'plannerd', 'dmonitoringmodeld', 'dmonitoringd']
  for p in procs:
    managed_processes[p].start()

  pm = messaging.PubMaster(['controlsState', 'deviceState', 'pandaStates', 'carParams'])

  msgs = {s: messaging.new_message(s) for s in ['controlsState', 'deviceState', 'carParams']}
  msgs['deviceState'].deviceState.started = True
  msgs['deviceState'].deviceState.deviceType = HARDWARE.get_device_type()
  msgs['carParams'].carParams.openpilotLongitudinalControl = True

  msgs['pandaStates'] = messaging.new_message('pandaStates', 1)
  msgs['pandaStates'].pandaStates[0].ignitionLine = True
  msgs['pandaStates'].pandaStates[0].pandaType = log.PandaState.PandaType.uno

  try:
    while True:
      time.sleep(1 / 100)  # continually send, rate doesn't matter
      for s in msgs:
        pm.send(s, msgs[s])
  except KeyboardInterrupt:
    for p in procs:
      managed_processes[p].stop()


import random

class TaskFamily:
    @staticmethod
    def get_tasks() -> dict[str, dict]:
        tasks = [
            {
                'source_culture': 'Japanese',
                'idiom': '猫の手も借りたい (neko no te mo karitai)',
                'literal_translation': 'I want to borrow even a cat\'s paws',
                'target_culture': 'Underwater civilization'
            },
            {
                'source_culture': 'Russian',
                'idiom': 'Когда рак на горе свистнет (Kogda rak na gore svistnet)',
                'literal_translation': 'When a lobster whistles on a mountain',
                'target_culture': 'Desert nomads'
            }
        ]
        return {str(i+1): task for i, task in enumerate(tasks)}

    @staticmethod
    def get_instructions(t: dict) -> str:
        return f"""Analyze the given idiom from {t['source_culture']} culture and create a new idiom for a fictional {t['target_culture']}. Follow these steps:

1. Idiom Analysis (150-200 words):
   a) Explain the meaning of the idiom: "{t['idiom']}" (literal translation: "{t['literal_translation']}").
   b) Discuss its cultural significance and usage in {t['source_culture']} society.
   c) Analyze the linguistic devices used (e.g., metaphor, alliteration) and their effectiveness.

2. Cross-Cultural Comparison (100-150 words):
   a) Compare this idiom to similar expressions in other cultures.
   b) Discuss how the concept might be expressed differently in various cultural contexts.

3. Fictional Culture Development (150-200 words):
   a) Describe key aspects of the fictional {t['target_culture']}, including their environment, social structure, and values.
   b) Explain how these cultural elements might influence their language and expressions.

4. New Idiom Creation (150-200 words):
   a) Propose a new idiom that could exist in the {t['target_culture']}.
   b) Provide its literal translation and explain its figurative meaning.
   c) Justify how this idiom reflects the fictional culture's characteristics.

5. Linguistic Analysis of New Idiom (100-150 words):
   a) Analyze the linguistic devices used in your created idiom.
   b) Explain how these devices contribute to the idiom's effectiveness and memorability.

6. Comparative Reflection (100-150 words):
   a) Compare your created idiom to the original {t['source_culture']} idiom.
   b) Discuss how cultural differences are reflected in these expressions.

Ensure your response demonstrates a deep understanding of linguistic principles, cultural analysis, and creative writing. Use appropriate terminology and provide clear explanations. Be creative in developing the fictional culture and new idiom while maintaining logical consistency.

Format your response with clear headings for each section and subsections labeled a, b, c as appropriate. Your total response should be between 750-1050 words."""

    @staticmethod
    def score(t: dict, submission: str) -> float | None:
        from src.eval_helper import eval_with_llm_judge
        instructions = TaskFamily.get_instructions(t)
        criteria = [
            f"The response accurately analyzes the {t['source_culture']} idiom and its cultural significance.",
            f"The fictional {t['target_culture']} is well-developed and logically consistent.",
            "The newly created idiom is creative, culturally appropriate, and linguistically interesting.",
            "The analysis demonstrates a strong understanding of linguistic principles and cultural dynamics.",
            "The response follows the specified structure and word count guidelines."
        ]
        return 1.0 if eval_with_llm_judge(instructions, submission, criteria) else 0.0


+;
      }
    }
  }
}

static int f(const TensorMap<Tensor<int, 3> >& tensor) {
  //  Size<0> empty;
  EIGEN_STATIC_ASSERT((internal::array_size<Sizes<> >::value == 0), YOU_MADE_A_PROGRAMMING_MISTAKE);
  EIGEN_STATIC_ASSERT((internal::array_size<DSizes<int, 0> >::value == 0), YOU_MADE_A_PROGRAMMING_MISTAKE);
  Tensor<int, 0> result = tensor.sum();
  return result();
}

static void test_casting()
{
  Tensor<int, 3> tensor(2,3,7);

  int val = 0;
  for (int i = 0; i < 2; ++i) {
    for (int j = 0; j < 3; ++j) {
      for (int k = 0; k < 7; ++k) {
        tensor(i,j,k) = val;
        val++;
      }
    }
  }

  TensorMap<Tensor<int, 3> > map(tensor);
  int sum1 = f(map);
  int sum2 = f(tensor);

  VERIFY_IS_EQUAL(sum1, sum2);
  VERIFY_IS_EQUAL(sum1, 861);
}

void test_cxx11_tensor_map()
{
  CALL_SUBTEST(test_0d());
  CALL_SUBTEST(test_1d());
  CALL_SUBTEST(test_2d());
  CALL_SUBTEST(test_3d());

  CALL_SUBTEST(test_from_tensor());
  CALL_SUBTEST(test_casting());
}
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>

#include <stdio.h>

#include "main.h"
#include <unsupported/Eigen/NumericalDiff>

// Generic functor
template<typename _Scalar, int NX=Dynamic, int NY=Dynamic>
struct Functor
{
  typedef _Scalar Scalar;
  enum {
    InputsAtCompileTime = NX,
    ValuesAtCompileTime = NY
  };
  typedef Matrix<Scalar,InputsAtCompileTime,1> InputType;
  typedef Matrix<Scalar,ValuesAtCompileTime,1> ValueType;
  typedef Matrix<Scalar,ValuesAtCompileTime,InputsAtCompileTime> JacobianType;

  int m_inputs, m_values;

  Functor() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {}
  Functor(int inputs, int values) : m_inputs(inputs), m_values(values) {}

  int inputs() const { return m_inputs; }
  int values() const { return m_values; }

};

struct my_functor : Functor<double>
{
    my_functor(void): Functor<double>(3,15) {}
    int operator()(const VectorXd &x, VectorXd &fvec) const
    {
        double tmp1, tmp2, tmp3;
        double y[15] = {1.4e-1, 1.8e-1, 2.2e-1, 2.5e-1, 2.9e-1, 3.2e-1, 3.5e-1,
            3.9e-1, 3.7e-1, 5.8e-1, 7.3e-1, 9.6e-1, 1.34, 2.1, 4.39};

        for (int i = 0; i < values(); i++)
        {
            tmp1 = i+1;
            tmp2 = 16 - i - 1;