        scene.ambient_lighting_color = Color::opaque(200, 200, 200);

        // Camera is our eyes in the world - you won't see anything without it.
        create_camera(
            resource_manager.clone(),
            Vector3::new(0.0, 6.0, -12.0),
            &mut scene.graph,
        )
        .await;

        // Add some light.
        PointLightBuilder::new(BaseLightBuilder::new(
            BaseBuilder::new().with_local_transform(
                TransformBuilder::new()
                    .with_local_position(Vector3::new(0.0, 12.0, 0.0))
                    .build(),
            ),
        ))
        .with_radius(20.0)
        .build(&mut scene.graph);

        // Load model and animation resource in parallel. Is does *not* adds anything to
        // our scene - it just loads a resource then can be used later on to instantiate
        // models from it on scene. Why loading of resource is separated from instantiation?
        // Because it is too inefficient to load a resource every time you trying to
        // create instance of it - much more efficient is to load it once and then make copies
        // of it. In case of models it is very efficient because single vertex and index buffer
        // can be used for all models instances, so memory footprint on GPU will be lower.
        let (model_resource, walk_animation_resource) = rg3d::core::futures::join!(
            resource_manager.request_model(
                "examples/data/mutant/mutant.FBX",
                MaterialSearchOptions::RecursiveUp
            ),
            resource_manager.request_model(
                "examples/data/mutant/walk.fbx",
                MaterialSearchOptions::RecursiveUp
            )
        );

        // Instantiate model on scene - but only geometry, without any animations.
        // Instantiation is a process of embedding model resource data in desired scene.
        let model_handle = model_resource.unwrap().instantiate_geometry(&mut scene);

        // Now we have whole sub-graph instantiated, we can start modifying model instance.
        scene.graph[model_handle]
            .local_transform_mut()
            // Our model is too big, fix it by scale.
            .set_scale(Vector3::new(0.05, 0.05, 0.05));

        // Add simple animation for our model. Animations are loaded from model resources -
        // this is because animation is a set of skeleton bones with their own transforms.
        // Once animation resource is loaded it must be re-targeted to our model instance.
        // Why? Because animation in *resource* uses information about *resource* bones,
        // not model instance bones, retarget_animations maps animations of each bone on
        // model instance so animation will know about nodes it should operate on.
        let walk_animation = *walk_animation_resource
            .unwrap()
            .retarget_animations(model_handle, &mut scene)
            .get(0)
            .unwrap();

        let mut material = Material::standard();

        material
            .set_property(
                "diffuseTexture",
                PropertyValue::Sampler {


9B00 860C0036 */  lh      $t4, 0x0036($s0)           ## 8095DF86
/* 0A844 80959B04 258DFFCE */  addiu   $t5, $t4, 0xFFCE           ## $t5 = FFFFFFCE
/* 0A848 80959B08 A60D0036 */  sh      $t5, 0x0036($s0)           ## 8095DF86
/* 0A84C 80959B0C 86180036 */  lh      $t8, 0x0036($s0)           ## 8095DF86
/* 0A850 80959B10 07030005 */  bgezl   $t8, .L80959B28
/* 0A854 80959B14 92090024 */  lbu     $t1, 0x0024($s0)           ## 8095DF74
/* 0A858 80959B18 A6000036 */  sh      $zero, 0x0036($s0)         ## 8095DF86
/* 0A85C 80959B1C A6000026 */  sh      $zero, 0x0026($s0)         ## 8095DF76
/* 0A860 80959B20 A2000024 */  sb      $zero, 0x0024($s0)         ## 8095DF74
.L80959B24:
/* 0A864 80959B24 92090024 */  lbu     $t1, 0x0024($s0)           ## 8095DF74
.L80959B28:
/* 0A868 80959B28 24010004 */  addiu   $at, $zero, 0x0004         ## $at = 00000004
/* 0A86C 80959B2C 55210031 */  bnel    $t1, $at, .L80959BF4
/* 0A870 80959B30 920B0024 */  lbu     $t3, 0x0024($s0)           ## 8095DF74
/* 0A874 80959B34 8E020054 */  lw      $v0, 0x0054($s0)           ## 8095DFA4
/* 0A878 80959B38 0C03F66B */  jal     Math_Rand_ZeroOne
              ## Rand.Next() float
/* 0A87C 80959B3C AFA200A4 */  sw      $v0, 0x00A4($sp)
/* 0A880 80959B40 3C018096 */  lui     $at, %hi(D_8095C8A8)       ## $at = 80960000
/* 0A884 80959B44 C424C8A8 */  lwc1    $f4, %lo(D_8095C8A8)($at)
/* 0A888 80959B48 8619002E */  lh      $t9, 0x002E($s0)           ## 8095DF7E
/* 0A88C 80959B4C 8FA200A4 */  lw      $v0, 0x00A4($sp)
/* 0A890 80959B50 46040202 */  mul.s   $f8, $f0, $f4
/* 0A894 80959B54 C6120048 */  lwc1    $f18, 0x0048($s0)          ## 8095DF98
/* 0A898 80959B58 3C01439B */  lui     $at, 0x439B                ## $at = 439B0000
/* 0A89C 80959B5C 860D0028 */  lh      $t5, 0x0028($s0)           ## 8095DF78
/* 0A8A0 80959B60 960E0026 */  lhu     $t6, 0x0026($s0)           ## 8095DF76
/* 0A8A4 80959B64 25B80001 */  addiu   $t8, $t5, 0x0001           ## $t8 = 00000001
/* 0A8A8 80959B68 4600428D */  trunc.w.s $f10, $f8
/* 0A8AC 80959B6C 44814000 */  mtc1    $at, $f8                   ## $f8 = 310.00
/* 0A8B0 80


/likuli/data-analysis-learning/blob/main/docs/analysis_method/5_comparative_analysis.md)来比较该店铺今年和去年同样活动中老用户的复购情况。

可以使用R值来衡量老用户的复购情况。R值定义为老用户最后一次消费时间间隔，这样R值可以反映老用户的活跃程度和复购周期。可以简单理解为R值越小，用户越活跃、复购周期越短。

# Segment Anything

**[Meta AI Research, FAIR](https://ai.facebook.com/research/)**

[Alexander Kirillov](https://alexander-kirillov.github.io/), [Eric Mintun](https://ericmintun.github.io/), [Nikhila Ravi](https://nikhilaravi.com/), [Hanzi Mao](https://hanzimao.me/), Chloe Rolland, Laura Gustafson, [Tete Xiao](https://tetexiao.com), [Spencer Whitehead](https://www.spencerwhitehead.com/), Alex Berg, Wan-Yen Lo, [Piotr Dollar](https://pdollar.github.io/), [Ross Girshick](https://www.rossgirshick.info/)

[[`Paper`](https://ai.facebook.com/research/publications/segment-anything/)] [[`Project`](https://segment-anything.com/)] [[`Demo`](https://segment-anything.com/demo)] [[`Dataset`](https://segment-anything.com/dataset/index.html)] [[`Blog`](https://ai.facebook.com/blog/segment-anything-foundation-model-image-segmentation/)]

![SAM design](assets/model_diagram.png?raw=true)

The **Segment Anything Model (SAM)** produces high quality object masks from input prompts such as points or boxes, and it can be used to generate masks for all objects in an image. It has been trained on a [dataset](https://segment-anything.com/dataset/index.html) of 11 million images and 1.1 billion masks, and has strong zero-shot performance on a variety of segmentation tasks.

## Installation

The code requires `python>=3.8`, as well as `pytorch>=1.7` and `torchvision>=0.8`. Please follow the instructions [here](https://pytorch.org/get-started/locally/) to install both PyTorch and TorchVision dependencies. Installing both PyTorch and TorchVision with CUDA support is strongly recommended.

Install Segment Anything:

```
pip install git+https://github.com/facebookresearch/segment-anything.git
```

or clone the repository locally and install with

```
git clone git@github.com:facebookresearch/segment-anything.git
cd segment-anything; pip install -e .
```

The following optional dependencies are necessary for mask post-processing, saving masks in COCO format, the example notebooks, and exporting the model in ONNX format. `jupyter` is also required to run the example notebooks.
```
pip install opencv-python pycocotools matplotlib onnxruntime onnx
```

## Getting Started

First download a [model checkpoint](#model-checkpoints). Then the model can be used in just a few lines to get masks from a given prompt:

```
from segment_anything import build_sam, SamPredictor
predictor = SamPredictor(build_sam(checkpoint="</path/to/model.pth>"))
predictor.set_image(<your_image>)
masks, _, _ = predictor.predict(<input_prompts>)
```

or generate masks for an entire image:

```
from segment_anything import build_sam, SamAutomaticMaskGenerator
mask_generator = SamAutomaticMaskGenerator(build_s


"case0", () => {
    expect(createSeqByTemplate("{1}", 2)).toEqual(["1", "2"]);
    expect(createSeqByTemplate("{2}", 2)).toEqual(["2", "3"]);
    expect(createSeqByTemplate("第{1}", 2)).toEqual(["第1", "第2"]);
    expect(createSeqByTemplate("第{1}个", 2)).toEqual(["第1个", "第2个"]);
  });

  it("case1", () => {
    expect(createSeqByTemplate("{a}", 2)).toEqual(["a", "b"]);
    expect(createSeqByTemplate("{c}", 2)).toEqual(["c", "d"]);
    expect(createSeqByTemplate("第{a}", 2)).toEqual(["第a", "第b"]);
    expect(createSeqByTemplate("第{a}个", 2)).toEqual(["第a个", "第b个"]);
  });

  it("case2", () => {
    expect(createSeqByTemplate("1-{1}", 2)).toEqual(["1-1", "1-2"]);
    expect(createSeqByTemplate("第1-{1}", 2)).toEqual(["第1-1", "第1-2"]);
    expect(createSeqByTemplate("第1-{1}个", 2)).toEqual(["第1-1个", "第1-2个"]);
    expect(createSeqByTemplate("第1-{9}个", 3)).toEqual([
      "第1-9个",
      "第1-10个",
      "第1-11个",
    ]);
  });

  it("case3", () => {
    expect(createSeqByTemplate("1-{a}", 2)).toEqual(["1-a", "1-b"]);
    expect(createSeqByTemplate("第1-{a}", 2)).toEqual(["第1-a", "第1-b"]);
    expect(createSeqByTemplate("第1-{a}个", 2)).toEqual(["第1-a个", "第1-b个"]);
  });

  it("case4", () => {
    expect(createSeqByTemplate("a{1}", 2)).toEqual(["a1", "a2"]);
    expect(createSeqByTemplate("1{a}", 2)).toEqual(["1a", "1b"]);
    expect(createSeqByTemplate("第1{a}", 2)).toEqual(["第1a", "第1b"]);
  });

  it("case5", () => {
    expect(createSeqByTemplate("第第第", 2)).toEqual(["第第第", "第第第"]);
    expect(() => createSeqByTemplate("{ab}", 2)).toThrow();
    expect(() => createSeqByTemplate("{1b}", 2)).toThrow();
    expect(() => createSeqByTemplate("{b1}", 2)).toThrow();
  });
});
export class EventEmitter {
  private _events: { [type: string]: Function[] } = {};

  /**
   * Register an event handler for the given type.
   *
   * @param type Type of event to listen for, or `"*"` for all events
   * @param handler Function to call in response to given event
   */
  on(type: string, handler: (event?: any) => void) {
    (this._events[type] || (this._events[type] = [])).push(handler);
  }

  /**
   * Remove an event handler for the given type.
   *
   * @param type Type of event to unregister `handler` from, or `"*"`
   * @param handler Handler function to remove
   */
  off(type: string, handler: (event?: any) => void) {
    if (this._events[type]) {
      this._events[type].splice(this._events[type].indexOf(handler) >>> 0, 1);
    }
  }

  /** @ignore */
  protected removeAllListeners(): void {
    this._events = {};
  }

  /**
   * Invoke all handlers for the given type.
   * If present, `"*"` handlers are invoked after type-matched handlers.
   *
   * @param type The event type to invoke
   * @param evt Any value (object is recommended and powerful), passed to each handler
   * @ignore
   */
  protected emit<T, U = void>(type: string, ...data: [T?, U?]) {
    (this._events[type] || []).slice().map(handler => { handler(...data); });
  }
}
let common


 nil, res
	}

	err := acc.SetPubKey(pubKey)
	if err != nil {
		return nil, abciResult(std.ErrInternal("setting PubKey on signer's account"))
	}

	if res := sigGasConsumer(ctx.GasMeter(), sig.Signature, pubKey, params); !res.IsOK() {
		return nil, res
	}

	if !simulate && !pubKey.VerifyBytes(signBytes, sig.Signature) {
		return nil, abciResult(std.ErrUnauthorized("signature verification failed; verify correct account, sequence, and chain-id"))
	}

	if err := acc.SetSequence(acc.GetSequence() + 1); err != nil {
		panic(err)
	}

	return acc, res
}

// ProcessPubKey verifies that the given account address matches that of the
// std.Signature. In addition, it will set the public key of the account if it
// has not been set.
func ProcessPubKey(acc std.Account, sig std.Signature) (crypto.PubKey, sdk.Result) {
	// If pubkey is not known for account, set it from the std.Signature.
	pubKey := acc.GetPubKey()
	if pubKey == nil {
		pubKey = sig.PubKey
		if pubKey == nil {
			return nil, abciResult(std.ErrInvalidPubKey("PubKey not found"))
		}

		if pubKey.Address() != acc.GetAddress() {
			return nil, abciResult(std.ErrInvalidPubKey(
				fmt.Sprintf("PubKey does not match Signer address %s", acc.GetAddress())))
		}
	}

	return pubKey, sdk.Result{}
}

// DefaultSigVerificationGasConsumer is the default implementation of
// SignatureVerificationGasConsumer. It consumes gas for signature verification
// based upon the public key type. The cost is fetched from the given params
// and is matched by the concrete type.
func DefaultSigVerificationGasConsumer(
	meter store.GasMeter, sig []byte, pubkey crypto.PubKey, params Params,
) sdk.Result {
	switch pubkey := pubkey.(type) {
	case ed25519.PubKeyEd25519:
		meter.ConsumeGas(params.SigVerifyCostED25519, "ante verify: ed25519")
		return sdk.Result{}

	case secp256k1.PubKeySecp256k1:
		meter.ConsumeGas(params.SigVerifyCostSecp256k1, "ante verify: secp256k1")
		return sdk.Result{}

	case multisig.PubKeyMultisigThreshold:
		var multisignature multisig.Multisignature
		amino.MustUnmarshal(sig, &multisignature)

		consumeMultisignatureVerificationGas(meter, multisignature, pubkey, params)
		return sdk.Result{}

	default:
		return abciResult(std.ErrInvalidPubKey(fmt.Sprintf("unrecognized public key type: %T", pubkey)))
	}
}

func consumeMultisignatureVerificationGas(meter store.GasMeter,
	sig multisig.Multisignature, pubkey multisig.PubKeyMultisigThreshold,
	params Params,
) {
	size := sig.BitArray.Size()
	sigIndex := 0
	for i := range size {
		if sig.BitArray.GetIndex(i) {
			DefaultSigVerificationGasConsumer(meter, sig.Sigs[sigIndex], pubkey.PubKeys[i], params)
			sigIndex++
		}
	}
}

// DeductFees deducts fees from the given account.
//
// NOTE: We could use the CoinKeeper (in addition to the AccountKeeper, because
// the CoinKeeper doesn't give us accounts), but it seems easier to do this.
func DeductFees(bk BankKeeperI, ctx sdk.Context, acc std.Account, collector crypto.Address, fees std.Coin


 BufWriter::new(File::create(filename).expect("output file cannot be opened"));
    file.write_all("partition_id, latitude, longitude\n".as_bytes())
        .expect("error writing file");
    for i in 0..partition_ids.len() {
        file.write_all(partition_ids[i].to_string().as_bytes())
            .expect("error writing file");
        file.write_all(b", ").expect("error writing file");

        file.write_all(
            (coordinates[i].lat as f64 / 1000000.)
                .to_string()
                .as_bytes(),
        )
        .expect("error writing file");
        file.write_all(b", ").expect("error writing file");
        file.write_all(
            (coordinates[i].lon as f64 / 1000000.)
                .to_string()
                .as_bytes(),
        )
        .expect("error writing file");
        file.write_all(b"\n").expect("error writing file");
    }
}

pub fn binary_partition_file(partition_file: &str, partition_ids: &[PartitionID]) {
    let mut f = BufWriter::new(File::create(partition_file).unwrap());
    serialize_into(&mut f, &partition_ids).unwrap();
}

pub fn write_results(
    args: &Arguments,
    partition_ids: &[PartitionID],
    coordinates: &[FPCoordinate],
    edges: &[TrivialEdge],
) {
    if !args.assignment_csv.is_empty() {
        info!("writing partition csv into: {}", args.assignment_csv);
        assignment_csv(&args.assignment_csv, partition_ids, coordinates);
    }
    if !args.cut_csv.is_empty() {
        info!("writing cut csv to {}", &args.cut_csv);
        cut_csv(&args.cut_csv, edges, partition_ids, coordinates);
    }
    if !args.partition_file.is_empty() {
        info!("writing partition ids to {}", &args.partition_file);
        binary_partition_file(&args.partition_file, partition_ids);
    }
}
<reponame>atixlabs/chain-libs<filename>chain-impl-mockchain/src/stake/mod.rs
mod delegation;
mod distribution;
mod stake;

pub use delegation::*;
pub use distribution::*;
pub use stake::*;
mod analyzer;
pub mod checker;

#[cfg(test)]
mod tests;

pub use analyzer::Analyzer;
use criterion::{criterion_group, criterion_main, Bencher, Criterion};
use swc_common::{input::SourceFileInput, FileName};
use swc_ecma_ast::*;
use swc_ecma_parser::{lexer::Lexer, Parser, Syntax};
use swc_ecma_visit::{noop_visit_mut_type, VisitMut, VisitMutWith};

struct Inner {
    cnt: usize,
}

struct Outer {
    v: Inner,
}

impl VisitMut for Outer {
    noop_visit_mut_type!();

    fn visit_mut_stmts(&mut self, s: &mut Vec<Stmt>) {
        s.visit_mut_children_with(self);

        s.visit_mut_with(&mut self.v);
    }
}

impl VisitMut for Inner {
    noop_visit_mut_type!();

    fn visit_mut_ident(&mut self, _: &mut Ident) {
        self.cnt += 1;
    }
}

fn assert_cnt(b: &mut Bencher, src: &str, cnt: usize) {
    testing::run_test2(false, |cm, _handler| {
        let fm = cm.new_source_file(FileName::Anon, src.into());

        let lexer = Lexer::new(
            Syntax::default(),
            EsVersion::latest(),
            SourceFileInput::from(&*fm),
            None,


using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using Unity.VisualScripting.FullSerializer.Internal;

namespace Unity.VisualScripting.FullSerializer
{
    /// <summary>
    /// Provides serialization support for anything which extends from
    /// `IEnumerable` and has an `Add` method.
    /// </summary>
    public class fsIEnumerableConverter : fsConverter
    {
        public override bool CanProcess(Type type)
        {
            if (typeof(IEnumerable).IsAssignableFrom(type) == false)
            {
                return false;
            }
            return GetAddMethod(type) != null;
        }

        public override object CreateInstance(fsData data, Type storageType)
        {
            return fsMetaType.Get(Serializer.Config, storageType).CreateInstance();
        }

        public override fsResult TrySerialize(object instance_, out fsData serialized, Type storageType)
        {
            var instance = (IEnumerable)instance_;
            var result = fsResult.Success;

            var elementType = GetElementType(storageType);

            serialized = fsData.CreateList(HintSize(instance));
            var serializedList = serialized.AsList;

            foreach (var item in instance)
            {
                fsData itemData;

                // note: We don't fail the entire deserialization even if the
                //       item failed
                var itemResult = Serializer.TrySerialize(elementType, item, out itemData);
                result.AddMessages(itemResult);
                if (itemResult.Failed)
                {
                    continue;
                }

                serializedList.Add(itemData);
            }

            // Stacks iterate from back to front, which means when we deserialize
            // we will deserialize the items in the wrong order, so the stack
            // will get reversed.
            if (IsStack(instance.GetType()))
            {
                serializedList.Reverse();
            }

            return result;
        }

        private bool IsStack(Type type)
        {
            return type.Resolve().IsGenericType &&
                type.Resolve().GetGenericTypeDefinition() == typeof(Stack<>);
        }

        public override fsResult TryDeserialize(fsData data, ref object instance_, Type storageType)
        {
            var instance = (IEnumerable)instance_;
            var result = fsResult.Success;

            if ((result += CheckType(data, fsDataType.Array)).Failed)
            {
                return result;
            }

            // LAZLO/LUDIQ: Changes to default behaviour.
            //  - Do not try to serialize into existing element; always clear and add
            //    (more reliable, compatible with custom indexers)
            //  - If the type is a list, add a default element on failure to prevent
            //    messing up the order.
            //  - Commented out that last change.

            var elementStorageType = GetElementType(storageType);
            var addMethod = GetAddMethod(storageType);
            TryClear(storageType, instance);

            var serializedList = data.AsList;

            for (var i = 0; i < serializedList.C


                    statusAction.textContent = '重试';
                    statusAction.classList.add('error');
                    statusAction.onclick = checkForUpdates;

                    if (updateNotice) {
                        updateNotice.style.display = 'none';
                    }
                    break;
            }
        } else {
            // 如果没有状态横幅，退回到原来的行为
            switch (status) {
                case 'latest':
                    versionElement.classList.add('latest');
                    versionElement.title = '当前已是最新版本';
                    if (updateNotice) {
                        updateNotice.style.display = 'none';
                    }
                    break;

                case 'update_available':
                    versionElement.classList.add('update_available');
                    versionElement.title = '有新版本可用';
                    if (updateNotice) {
                        updateNotice.style.display = 'inline-block';
                    }
                    break;

                case 'offline':
                    versionElement.classList.add('offline');
                    versionElement.title = '网络连接不可用';
                    if (updateNotice) {
                        updateNotice.style.display = 'none';
                    }
                    break;

                case 'error':
                    versionElement.classList.add('error');
                    versionElement.title = '检查更新失败';
                    if (updateNotice) {
                        updateNotice.style.display = 'none';
                    }
                    break;
            }
        }
    }

    // 检查地址是否是HTTP或局域网，这会导致混合内容问题
    function checkHttpWarning(url) {
        const httpWarning = document.getElementById('httpWarning');
        if (!httpWarning) return;

        // 如果为空，隐藏警告
        if (!url) {
            httpWarning.style.display = 'none';
            return;
        }

        // 检查是否使用HTTP
        if (url.startsWith('http://')) {
            httpWarning.style.display = 'block';
            return;
        }

        // 检查是否是局域网IP
        try {
            const urlObj = new URL(url);
            const hostname = urlObj.hostname;

            // 检查常见的局域网地址模式
            if (
                hostname === 'localhost' ||
                hostname.startsWith('127.') ||
                hostname.startsWith('192.168.') ||
                hostname.startsWith('10.') ||
                hostname.match(/^172\.(1[6-9]|2[0-9]|3[0-1])\./)
            ) {
                httpWarning.style.display = 'block';
                return;
            }

            // 其他情况，隐藏警告
            httpWarning.style.display = 'none';
        } catch (e) {
            // URL解析失败，保持警告隐藏
            httpWarning.style.display = 'none';
        }
    }

    // 添加到baseUrl输入字段的事件监听
    if (baseUrlInput) {
        baseUrlInput.addEventListener('input', function() {
            const url = this.value.trim();
            checkHttpWarning(url);
        });

        // 页面加载时检查一次
        checkHttpWarning(baseUrlInput.value.trim());
    }

    // 创建保存排序按钮的函数
    function createSaveOrderButton() {
        const container


PackedTextAttributes(KSON_KEYWORD)
                TokenType.WHITESPACE -> TextAttributesKey.EMPTY_ARRAY
                TokenType.EOF -> TextAttributesKey.EMPTY_ARRAY
            }
        } else {
            return TextAttributesKey.EMPTY_ARRAY
        }
    }

    enum class KsonColorTag(val displayName: String) {
        KSON_CURLY_BRACE(KsonBundle.message("kson.syntaxHighlighter.curly_brace")),
        KSON_SQUARE_BRACKET(KsonBundle.message("kson.syntaxHighlighter.square_bracket")),
        KSON_ANGLE_BRACKET(KsonBundle.message("kson.syntaxHighlighter.angle_bracket")),
        KSON_COLON(KsonBundle.message("kson.syntaxHighlighter.colon")),
        KSON_COMMA(KsonBundle.message("kson.syntaxHighlighter.comma")),
        KSON_COMMENT(KsonBundle.message("kson.syntaxHighlighter.comment")),
        KSON_END_DOT("kson.syntaxHighlighter.end-dot"),
        KSON_DELIMITER(KsonBundle.message("kson.syntaxHighlighter.delimiter")),
        KSON_EMBED_TAG(KsonBundle.message("kson.syntaxHighlighter.embed_tag")),
        KSON_UNQUOTED_STRING(KsonBundle.message("kson.syntaxHighlighter.unquoted")),
        KSON_KEYWORD(KsonBundle.message("kson.syntaxHighlighter.keyword")),
        KSON_INVALID(KsonBundle.message("kson.syntaxHighlighter.invalid")),
        KSON_NUMBER(KsonBundle.message("kson.syntaxHighlighter.number")),
        KSON_CONTENT(KsonBundle.message("kson.syntaxHighlighter.content")),
        KSON_OBJECT_KEY(KsonBundle.message("kson.syntaxHighlighter.key"));
    }

    companion object {
        private val keyToColorMap = mapOf(
            KSON_CURLY_BRACE to DefaultLanguageHighlighterColors.BRACES,
            KSON_SQUARE_BRACKET to DefaultLanguageHighlighterColors.BRACES,
            KSON_ANGLE_BRACKET to DefaultLanguageHighlighterColors.BRACES,
            KSON_COLON to DefaultLanguageHighlighterColors.SEMICOLON,
            KSON_END_DOT to DefaultLanguageHighlighterColors.LINE_COMMENT,
            KSON_COMMA to DefaultLanguageHighlighterColors.PARENTHESES,
            KSON_COMMENT to DefaultLanguageHighlighterColors.BLOCK_COMMENT,
            KSON_DELIMITER to DefaultLanguageHighlighterColors.SEMICOLON,
            KSON_EMBED_TAG to DefaultLanguageHighlighterColors.METADATA,
            KSON_UNQUOTED_STRING to DefaultLanguageHighlighterColors.STRING,
            KSON_KEYWORD to DefaultLanguageHighlighterColors.KEYWORD,
            KSON_INVALID to HighlighterColors.BAD_CHARACTER,
            KSON_NUMBER to DefaultLanguageHighlighterColors.NUMBER,
            KSON_CONTENT to DefaultLanguageHighlighterColors.STRING,
            KSON_OBJECT_KEY to DefaultLanguageHighlighterColors.INSTANCE_FIELD,
        )

        private val textAttributesMap = keyToColorMap.entries.associate {
            it.key to TextAttributesKey.createTextAttributesKey(
                it.key.name,
                it.value
            )
        }
        private val packedTextAttributesMap = textAttributesMap.entries.associate { it.key to arrayOf(it.value) }

        fun getTextAttributesKey(colorTag: KsonColorTag): TextAttributesKey {
            return textAttributesMap[colorTag]
                ?: throw RuntimeException("This color tag should have an entry in textAttributesMap: $colorTag")
        }

        private fun getPackedTextAttributes(colorTag: KsonColorTag):


_42 = j_1_40
    innerSum_2_45 = innerSum_1_43
    goto  L5
L5:
    j_2 = j_2_42
    innerSum_2 = innerSum_2_45
    %t5_0 = j_2<4
    if %t5_0 goto L6 else goto L7
L6:
    %t6_0 = i_1+j_2
    %t7_0 = %t6_0%2
    %t8_0 = %t7_0==0
    innerSum_2_37 = innerSum_2
    innerSum_4_39 = innerSum_2_37
    if %t8_0 goto L8 else goto L9
L8:
    %t9_0 = innerSum_2+j_2
    innerSum_3 = %t9_0
    innerSum_3_38 = innerSum_3
    innerSum_4_39 = innerSum_3_38
    goto  L9
L9:
    innerSum_4 = innerSum_4_39
    %t10_0 = j_2+1
    j_3 = %t10_0
    j_3_41 = j_3
    innerSum_4_44 = innerSum_4
    j_2_42 = j_3_41
    innerSum_2_45 = innerSum_4_44
    goto  L5
L7:
    %t11_0 = outerSum_1+innerSum_2
    outerSum_2 = %t11_0
    %t12_0 = i_1+1
    i_2 = %t12_0
    i_2_47 = i_2
    innerSum_2_50 = innerSum_2
    outerSum_2_53 = outerSum_2
    i_1_48 = i_2_47
    innerSum_1_51 = innerSum_2_50
    outerSum_1_54 = outerSum_2_53
    goto  L2
L4:
    ret outerSum_1
    goto  L1
L1:
""", result);
    }

    @Test
    public void testSSA14() {
        String src = """
                func foo()->Int
                {
                    return 1 && 2
                }
""";
        String result = compileSrc(src);
        Assert.assertEquals("""
func foo
Before SSA
==========
L0:
    if 1 goto L2 else goto L3
L2:
    %t0 = 2
    goto  L4
L4:
    ret %t0
    goto  L1
L1:
L3:
    %t0 = 0
    goto  L4
After SSA
=========
L0:
    if 1 goto L2 else goto L3
L2:
    %t0_1 = 2
    goto  L4
L4:
    %t0_2 = phi(%t0_1, %t0_0)
    ret %t0_2
    goto  L1
L1:
L3:
    %t0_0 = 0
    goto  L4
After converting from SSA to CSSA
L0:
    if 1 goto L2 else goto L3
L2:
    %t0_1 = 2
    (%t0_1_4) = (%t0_1)
    goto  L4
L4:
    %t0_2_6 = phi(%t0_1_4, %t0_0_5)
    (%t0_2) = (%t0_2_6)
    ret %t0_2
    goto  L1
L1:
L3:
    %t0_0 = 0
    (%t0_0_5) = (%t0_0)
    goto  L4
After removing phis from CSSA
L0:
    if 1 goto L2 else goto L3
L2:
    %t0_1 = 2
    (%t0_1_4) = (%t0_1)


!== '*') {
    frequency.minuteValues = parseInt(cron[0], 10);
  }

  if (cron[1] !== '*') {
    frequency.hourValues = parseInt(cron[1], 10);
  }

  if (cron[2] !== '*') {
    frequency.dayOfMonthValues = parseInt(cron[2], 10);
  }

  if (cron[3] !== '*') {
    frequency.monthValues = parseInt(cron[3], 10);
  }

  if (cron[4] !== '*') {
    frequency.dayValues = parseInt(cron[4], 10);
  }

  return frequency;
};

export const cronDayName = (day: number) => Info.weekdays('long')[day];

export const cronMonthName = (input) => Info.months('long')[input - 1];

export const cronNumeral = (input) => input;

export const formatCrontab = (crontab) => {
  const schedule = parseCrontab(crontab);
  const {
    base,
    minuteValues,
    hourValues,
    dayOfMonthValues,
    dayValues,
    monthValues,
  } = schedule;
  const zeroPad = (value) => (value < 10 ? '0' + value : String(value));

  const formatTime = () => `${zeroPad(hourValues)}:${zeroPad(minuteValues)}`;
  const formatDay = () => cronDayName(dayValues);
  const formatMonth = () => cronMonthName(monthValues);
  const formatNumeral = () => cronNumeral(dayOfMonthValues);

  switch (base) {
    case Frequency.MINUTE:
      return translate('Every minute');

    case Frequency.HOUR:
      if (minuteValues) {
        return translate('Every hour at {minuteValues} past the hour', {
          minuteValues,
        });
      } else {
        return translate('Every hour');
      }

    case Frequency.DAY:
      if (hourValues !== undefined) {
        return `${translate('Every day at')} ${formatTime()}`;
      } else {
        return translate('Every day');
      }

    case Frequency.WEEK:
      if (dayValues !== undefined) {
        return translate('Every week on {day} at {time}', {
          day: formatDay(),
          time: formatTime(),
        });
      } else {
        return translate('Every week');
      }

    case Frequency.MONTH:
      if (dayOfMonthValues !== undefined) {
        return translate('Every month on the {days} at {time}', {
          days: formatNumeral(),
          time: formatTime(),
        });
      } else {
        return translate('Every month');
      }

    case Frequency.YEAR:
      if (dayOfMonthValues !== undefined) {
        return translate('Every month on the {days} of {months} at {time}', {
          days: formatNumeral(),
          months: formatMonth(),
          time: formatTime(),
        });
      } else {
        return translate('Every year');
      }

    default:
      return crontab;
  }
};

export const serializeCron = (input) => {
  const cron = ['*', '*', '*', '*', '*'];

  if (
    [
      Frequency.HOUR,
      Frequency.DAY,
      Frequency.WEEK,
      Frequency.MONTH,
      Frequency.YEAR,
    ].includes(input?.base)
  ) {
    cron[0] = input.minuteValues || 0;
  }

  if (
    [Frequency.DAY, Frequency.WEEK, Frequency.MONTH, Frequency.YEAR].includes(
      input?.base,
    )
  ) {
    cron[1] = input.hourValues || 0;
  }

  if (input?.base === Frequency.WEEK) {
    cron[4] = input.dayValues || 0;
  }

  if ([Frequency.MONTH, Frequency.YEAR].includes(input?.base)) {
    cron[2] = input.dayOfMonthValues || 1;
  }

  if (input?.base === Frequency.YEAR) {
    cron[3] =
      typeof input


agiado",
  [4476] = "Aparición gritona",
  [4483] = "[Deprecated for 4.x]Moktar Krin",
  [4489] = "Braug Espíritu Tenue",
  [4494] = "Vinculahechizos escarlata",
  [4495] = "Encargado de foso gnomo",
  [4496] = "Encargado de foso goblin",
  [4497] = "Capitán Quirk",
  [4500] = "Señor supremo Mok\'Morokk",
  [4505] = "Marinero de cubierta Velasangre",
  [4507] = "[Deprecated for 4.x]Daisy",
  [4511] = "Lágrima silenciosa de Agamaggan",
  [4512] = "Agam\'ar en podredumbre",
  [4516] = "Adepta Caramuerte",
  [4518] = "Sabia Caramuerte",
  [4519] = "Vidente Caramuerte",
  [4520] = "Geomántica de Rajacieno",
  [4522] = "Tejepolvo de Rajacieno",
  [4530] = "Controlador de Rajacieno",
  [4531] = "Instructor de bestias de Rajacieno",
  [4532] = "Maestro de bestias de Rajacieno",
  [4534] = "Hiena domesticada",
  [4535] = "Jabaguerrero domesticado",
  [4539] = "Murciélago del Horado superior",
  [4542] = "Alto inquisidor Ribalimpia",
  [4545] = "[Deprecated for 4.x]Nag\'zehn",
  [4546] = "[Deprecated for 4.x]Bor\'zehn",
  [4550] = "Ophelia Montague",
  [4559] = "Timothy Weldon",
  [4563] = "Kaal Segador de Almas",
  [4564] = "Luther Pickman",
  [4567] = "Pierce Shackleton",
  [4568] = "Anastasia Hartwell",
  [4573] = "Armand Cromwell",
  [4574] = "Lizbeth Cromwell",
  [4579] = "zzOLDAlexander Lister",
  [4582] = "Carolyn Ward",
  [4585] = "Ezekiel Graves",
  [4592] = "Nathaniel Steenwick",
  [4593] = "Christoph Walker",
  [4594] = "Angela Curthas",
  [4595] = "Baltus Fowler",
  [4600] = "Geoffrey Hartwell",
  [4603] = "Nicholas Atwood",
  [4604] = "Abigail Sawyer",
  [4608] = "Padre Lazarus",
  [4615] = "Katrina Alliestar",
  [4620] = "[Deprecated for 4.x]Fobeed",
  [4629] = "[Deprecated for 4.x]Maestro rastreador Zherin",
  [4630] = "[Deprecated for 4.x]Pozzik",
  [4634] = "Aplastador Kolkar",
  [4636] = "Señor de batalla Kolkar",
  [4638] = "Explorador Magram",
  [4640] = "Retador Magram",
  [4641] = "Cazavientos Magram",
  [4642] = "Agitadora Magram",
  [4643] = "Corremanadas Magram",
  [4645] = "Aplastador Magram",
  [4648] = "Coceador Gelkis",
  [4651] = "Clamatierras Gelkis",
  [4652] = "Aplastador Gelkis",
  [4655] = "Retador Maraudine",
  [4656] = "Apla


 (blkA*128 + tidAX + lda*tidAY) * 4
02:-:-:-:1      ISCADD   txa, blkA, tidAX, 7;
--:-:-:-:1      XMAD.LO2 ta0, lda,  tidAY, txa;
08:-:-:-:1      XMAD.LO2 ta0, ldaz, blkZ,  ta0;
--:-:-:-:1      IADD     ta1, ta0, lda4;
--:-:-:-:1      IADD     ta2, ta1, lda4;
--:-:-:-:1      IADD     ta3, ta2, lda4;

--:-:-:-:1      LEA      track0A0.CC, ta0, param_A[0],     2;
--:-:-:-:1      LEA.HI.X track0A1,    ta0, param_A[1], RZ, 2;
--:-:-:-:1      LEA      track1A0.CC, ta1, param_A[0],     2;
--:-:-:-:1      LEA.HI.X track1A1,    ta1, param_A[1], RZ, 2;
--:-:-:-:1      LEA      track2A0.CC, ta2, param_A[0],     2;
--:-:-:-:1      LEA.HI.X track2A1,    ta2, param_A[1], RZ, 2;
--:-:-:-:1      LEA      track3A0.CC, ta3, param_A[0],     2;
--:-:-:-:1      LEA.HI.X track3A1,    ta3, param_A[1], RZ, 2;

// trackB += (blkB*32 + ldb*tidBY + tidBX) * 4
04:-:-:-:1      ISCADD   txb, blkB, tidBX,  5;
--:-:-:-:1      XMAD.LO2 tb,  ldb,  tidBY, txb;
08:-:-:-:1      XMAD.LO2 tb,  ldbz, blkZ,  tb;
--:-:-:-:1      LEA      trackB0.CC, tb, param_B[0],     2;
--:-:-:-:1      LEA.HI.X trackB1,    tb, param_B[1], RZ, 2;

// writeAs = (tidAY*128 + tidAX) * 4
--:-:-:-:1      ISCADD writeAs, tidAY, tidAX, 7;
--:-:-:-:1      ISCADD writeAs, writeAs, 4x<szShareA + szShareB>, 2;

// writeBs = (tidBY*32 + tidBX) * 4
--:-:-:-:1      ISCADD writeBs, tidBY, tidBX, 5;
--:-:-:-:1      ISCADD writeBs, writeBs, 4x<szShareA*2 + szShareB>, 2;

// readAs  = (((tid & 0x70) >> 3) | (tid & 1)) << 4;
--:-:-:-:1      LOP.AND tid1,   tid,    1;
--:-:-:-:1      LOP.AND readAs, tid,    0x70;
--:-:-:-:1      SHR.U32 readAs, readAs, 3;
--:-:-:-:1      LOP.OR  readAs, readAs, tid1;
--:-:-:-:1      SHL     readAs, readAs, 4;
// readBs = ((tid >> 1) & 7) << 4 + 4x<128*8>;
--:-:-:-:1      BFE.U32 readBs, tid,    0x301; // 3 bits at position 1
--:-:-:-:1      ISCADD  readBs, readBs, 4x<szShareA>, 4;

--:-:-:-:1      MOV3


        ZI_ASSERT(current_==0);
        required_ += n;
    }

    void dec(size_t n = 1)
    {
        ZI_ASSERT(current_==0);
        ZI_ASSERT(n<=required_);
        required_ -= n;
    }

    //
    // sum += f
    //
    bool add(cube_p<real>&& f)
    {
        ZI_ASSERT(current_<required_);
        return do_add(std::move(f));
    }

    cube_p<real> reset()
    {
        ZI_ASSERT(current_==required_);
        current_ = 0;
        return std::move(sum_);
    }

    size_t required() const
    {
        return required_;
    }

};

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

#ifdef ZNN_USE_MKL_NATIVE_FFT
#  include "fftmkl.hpp"
#else

#include "fftw_plans.hpp"

#include <zi/time.hpp>

#ifdef ZNN_MEASURE_FFT_RUNTIME
#  define ZNN_MEASURE_FFT_START() zi::wall_timer wt
#  define ZNN_MEASURE_FFT_END() fftw_stats.add(wt.elapsed<double>())
#else
#  define ZNN_MEASURE_FFT_START() static_cast<void>(0)
#  define ZNN_MEASURE_FFT_END() static_cast<void>(0)
#endif

#ifdef ZNN_USE_FLOATS
#  define FFT_EXECUTE_DFT_R2C fftwf_execute_dft_r2c
#  define FFT_EXECUTE_DFT_C2R fftwf_execute_dft_c2r
#else
#  define FFT_EXECUTE_DFT_R2C fftw_execute_dft_r2c
#  define FFT_EXECUTE_DFT_C2R fftw_execute_dft_c2r
#endif

namespace znn { namespace v4 {

class fft_stats_impl
{
private:
    double              total_time_;
    std::size_t         total_     ;
    mutable std::mutex  m_         ;

public:
    fft_stats_impl()
        : total_time_(0)
        , total_(0)
        , m_()
    { }

    double get_total_time() const
    {
        guard g(m_);
        return total_time_;
    }

    void reset_total_time()
    {
        guard g(m_);
        total_time_ = 0;
    }

    size_t get_total() const
    {
        guard g(m_);
        return total_;
    }

    void add(double time)
    {
        guard g(m_);
        ++total_;
        total_time_ += time;
    }
};

namespace {
fft_stats_impl& fft_stats = zi::singleton<fft_stats_impl>::instance();
} // anonymous namespace

class fftw
{
public:
    class transformer
    {
    private:
        vec3i    sz           ;
        vec3i    actual_sz    ;
        fft_plan forward_plan ;
        fft_plan backward_plan;

        int32_t g


ng id = data[0];
      DownloadTaskStatus status = data[1];
      int progress = data[2];
      if (kDebugMode) {
        print("Download progress: $progress%");
      }
      if (status == DownloadTaskStatus.complete) {
        ScaffoldMessenger.of(context).showSnackBar(SnackBar(
          content: Text("Download $id completed!"),
        ));
      }
    });
    FlutterDownloader.registerCallback(downloadCallback);
  }

  @override
  void dispose() {
    IsolateNameServer.removePortNameMapping('downloader_send_port');
    super.dispose();
  }

  @pragma('vm:entry-point')
  static void downloadCallback(
      String id, DownloadTaskStatus status, int progress) {
    final SendPort? send =
        IsolateNameServer.lookupPortByName('downloader_send_port');
    send?.send([id, status, progress]);
  }

  void handleClick(int item) async {
    switch (item) {
      case 0:
        await webViewController?.loadUrl(
            urlRequest: URLRequest(
                url: WebUri("https://proof.ovh.net/files/10Mb.dat")));
        break;
      case 1:
        await webViewController?.loadUrl(
            urlRequest: URLRequest(
                url: WebUri(
                    "https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_a_download")));
        break;
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: const Text("InAppWebView Download"),
          actions: [
            PopupMenuButton<int>(
              onSelected: (item) => handleClick(item),
              itemBuilder: (context) => [
                const PopupMenuItem<int>(
                    value: 0, child: Text('Download file 1')),
                const PopupMenuItem<int>(
                    value: 1, child: Text('Download file 2')),
              ],
            ),
          ],
        ),
        body: Column(children: <Widget>[
          Expanded(
            child: InAppWebView(
              key: webViewKey,
              initialUrlRequest: URLRequest(url: WebUri("https://flutter.dev")),
              onWebViewCreated: (controller) {
                webViewController = controller;
              },
              shouldOverrideUrlLoading: (controller, navigationAction) async {
                if (!kIsWeb && defaultTargetPlatform == TargetPlatform.iOS) {
                  final shouldPerformDownload =
                      navigationAction.shouldPerformDownload ?? false;
                  final url = navigationAction.request.url;
                  if (shouldPerformDownload && url != null) {
                    await downloadFile(url.toString());
                    return NavigationActionPolicy.DOWNLOAD;
                  }
                }
                return NavigationActionPolicy.ALLOW;
              },
              onDownloadStartRequest: (controller, downloadStartRequest) async {
                await downloadFile(downloadStartRequest.url.toString(),
                    downloadStartRequest.suggestedFilename);
              },
            ),
          ),
        ]));
  }

  Future<void> downloadFile(String url, [String? filename]) async {
    var hasStoragePermission = await Permission.storage.isGranted;
    if (!hasStoragePermission) {
      final status = await Permission.storage.request();
      hasStoragePermission = status.isGranted;
    }
    if (hasStoragePermission) {
      final taskId = await FlutterDownloader.enqueue(
          url: url,
          headers: {},
          // optional: header send with url (auth token etc)
          savedDir: (await getTemporaryDirectory()).path,
          saveInPublicStorage: true,
          fileName: filename);


/* Verify that we can output multiple different versions of SARIF
   with -fdiagnostics-add-output (specifying version and filename),
   as well as usual text output.  */

/* { dg-do compile } */
/* { dg-additional-options "-fdiagnostics-add-output=sarif:file=multiple-outputs-c.2.1.sarif,version=2.1" } */
/* { dg-additional-options "-fdiagnostics-add-output=sarif:file=multiple-outputs-c.2.2.sarif,version=2.2-prerelease" } */

/* Verify that SARIF output can capture secondary locations
   relating to a diagnostic.  */

int missing_semicolon (void)
{
  return 42 /* { dg-error "expected ';' before '.' token" } */
}

/* Verify that JSON was written to the output files with the
   expected version and expected names:
   { dg-final { verify-sarif-file "2.1" "multiple-outputs-c.2.1.sarif" }  }
   { dg-final { verify-sarif-file "2.2" "multiple-outputs-c.2.2.sarif" }  }
*/

/* Use a Python script to verify various properties about the generated
   .sarif files:
   { dg-final { run-sarif-pytest multiple-outputs-c.2.1 "multiple-outputs.py" } }
   { dg-final { run-sarif-pytest multiple-outputs-c.2.2 "multiple-outputs.py" } }
*/


CHINESE);
        System.out.println("CHINESE, Binary:" + result3);

        // this return a wrong result because the code point of 😍 is 128525 > 65535
        String result4 = Charsets.strToBinary(EMOJI);
        System.out.println("EMOJI, Binary:" + result4);

        System.out.println();
        System.out.println("""
            /////////////////////////////////
            // For all Unicode characters  //
            /////////////////////////////////
            """);

        int ucp1 = LETTER.codePointAt(0);
        String uhcp1 = Integer.toHexString(ucp1);
        String ubcp1 = Integer.toBinaryString(ucp1);
        System.out.println("LETTER, Decimal code point: " + ucp1);
        System.out.println("LETTER, Hexadecimal code point: " + uhcp1);
        System.out.println("LETTER, Binary encoding: " + ubcp1);

        System.out.println();

        int ucp2 = CHINESE.codePointAt(0);
        String uhcp2 = Integer.toHexString(ucp2);
        String ubcp2 = Integer.toBinaryString(ucp2);
        System.out.println("CHINESE, Decimal code point: " + ucp2);
        System.out.println("CHINESE, Hexadecimal code point: " + uhcp2);
        System.out.println("CHINESE, Binary encoding: " + ubcp2);

        System.out.println();

        int a1 = LETTER.charAt(0);
        int a2 = LETTER.codePointAt(0);
        System.out.println("'a1', code point via charAt():" + a1);
        System.out.println("'a2', code point codePointAt():" + a2);

        int b1 = CHINESE.charAt(0);
        int b2 = CHINESE.codePointAt(0);
        System.out.println("'b1', code point via charAt():" + b1);
        System.out.println("'b2', code point codePointAt():" + b2);

        int c1 = EMOJI.charAt(0);
        int c2 = EMOJI.codePointAt(0);
        System.out.println("'c1', code point via charAt():" + c1);
        System.out.println("'c2', code point codePointAt():" + c2);

        System.out.println();

        int ucp3 = EMOJI.codePointAt(0);
        String uhcp3 = Integer.toHexString(ucp3);
        String ubcp3 = Integer.toBinaryString(ucp3);
        System.out.println("Is EMOJI ?: " + Character.isEmoji(ucp3)); // JDK 21
        System.out.println("EMOJI, Decimal code point: " + ucp3);
        System.out.println("EMOJI, Hexadecimal code point: " + uhcp3);
        System.out.println("EMOJI, Binary encoding: " + ubcp3);

        System.out.println();

        String result5 = Charsets.codePointToBinary("Hello World");
        System.out.println("Binary 'Hello World':" + result5);

        String result6 = Charsets.codePointToBinary(LETTER);
        System.out.println("LETTER, Binary:" + result6);

        String result7 = Charsets.codePointToBinary(CHINESE);
        System.out.println("CHINESE, Binary:" + result7);

        String result8 = Charsets.codePointToBinary(EMOJI);
        System.out.println("EMOJI, Binary:" + result8);

        String result9 = Charsets.codePointToBinary(STR);
        System.out.println("Binary of a combined string:" + result9);

        System.out.println();

        String str1 = String.valueOf(Character.toChars(65));
        System.out.println("Get the string from code point 65: " + str1 + "  Length:" + str1.length());
        String str2 = String.valueOf(Character.toChars(128525));
        System.out.println("Get the string from code point 128525: " + str2 + "  Length:" + str2.length());

        i


ueberry"),

	TF_MOD_FLAVOUR_BANANA(FluidFlavour.BANANA, "flavours/banana"),

	// Fetishes:

	TF_MOD_FETISH_BODY_PART("body part fetishes",
			"Applies an effect related to a body part fetish.",
			"fetish",
			"modifier_circle_desires",
			PresetColour.BASE_PINK,
			Rarity.COMMON),

	TF_MOD_FETISH_BEHAVIOUR("behavioural fetishes",
			"Applies an effect related to a behavioural fetish.",
			"fetish",
			"modifier_circle_desires",
			PresetColour.BASE_PURPLE,
			Rarity.COMMON),

	TF_MOD_FETISH_ANAL_GIVING(Fetish.FETISH_ANAL_GIVING),
	TF_MOD_FETISH_ANAL_RECEIVING(Fetish.FETISH_ANAL_RECEIVING),
	TF_MOD_FETISH_VAGINAL_GIVING(Fetish.FETISH_VAGINAL_GIVING),
	TF_MOD_FETISH_VAGINAL_RECEIVING(Fetish.FETISH_VAGINAL_RECEIVING),
	TF_MOD_FETISH_PENIS_GIVING(Fetish.FETISH_PENIS_GIVING),
	TF_MOD_FETISH_PENIS_RECEIVING(Fetish.FETISH_PENIS_RECEIVING),
	TF_MOD_FETISH_BREASTS_OTHERS(Fetish.FETISH_BREASTS_OTHERS),
	TF_MOD_FETISH_BREASTS_SELF(Fetish.FETISH_BREASTS_SELF),
	TF_MOD_FETISH_ORAL_RECEIVING(Fetish.FETISH_ORAL_RECEIVING),
	TF_MOD_FETISH_ORAL_GIVING(Fetish.FETISH_ORAL_GIVING),
	TF_MOD_FETISH_LEG_LOVER(Fetish.FETISH_LEG_LOVER),
	TF_MOD_FETISH_STRUTTER(Fetish.FETISH_STRUTTER),
	TF_MOD_FETISH_FOOT_GIVING(Fetish.FETISH_FOOT_GIVING),
	TF_MOD_FETISH_FOOT_RECEIVING(Fetish.FETISH_FOOT_RECEIVING),
	TF_MOD_FETISH_ARMPIT_GIVING(Fetish.FETISH_ARMPIT_GIVING),
	TF_MOD_FETISH_ARMPIT_RECEIVING(Fetish.FETISH_ARMPIT_RECEIVING),
	TF_MOD_FETISH_LACTATION_OTHERS(Fetish.FETISH_LACTATION_OTHERS),
	TF_MOD_FETISH_LACTATION_SELF(Fetish.FETISH_LACTATION_SELF),

	TF_MOD_FETISH_DOMINANT(Fetish.FETISH_DOMINANT),
	TF_MOD_FETISH_SUBMISSIVE(Fetish.FETISH_SUBMISSIVE),
	TF_MOD_FETISH_BONDAGE_VICTIM(Fetish.FETISH_BONDAGE_VICTIM),
	TF_MOD_FETISH_BONDAGE_APPLIER(Fetish.FETISH_BONDAGE_APPLIER),
	TF_MOD_FETISH_CROSS_DRESSER(Fetish.FETISH_CROSS_DRESSER),
	TF_MOD_FETISH_CUM_ADDICT(Fetish.FETISH_CUM_ADDICT),
	TF_MOD_FETISH_CUM_STUD(Fetish.FETISH_CUM_STUD),
	TF_MOD_FETISH_DEFLOWERING(Fetish.FETISH_DEFLOWERING),
	TF_MOD_FETISH_DENIAL(Fetish.FETISH_DENIAL),
	TF_MOD_FETISH_DENIAL_SELF(Fetish.FETISH_DENIAL_SELF),
	TF_MOD_FETISH_EXHIBITIONIST(Fetish.FETISH


 ignored scrobble. If RawMessage is set,
// it will be returned, other the message will be determined by the code.
//
// The Last.fm API seems to return code 1 (ArtistIgnored) regardless of the
// reason for ignoring the scrobble.
func (s ScrobbleIgnored) Message() string {
	if s.RawMessage != "" {
		return s.RawMessage
	}

	return s.Code.Message()
}

// https://www.last.fm/api/show/track.scrobble#attributes
type ScrobbleResult struct {
	Accepted IntBool  `xml:"accepted,attr"`
	Ignored  IntBool  `xml:"ignored,attr"`
	Scrobble Scrobble `xml:"scrobble"`
}

// https://www.last.fm/api/show/track.scrobble#attributes
type ScrobbleMultiResult struct {
	Accepted  int        `xml:"accepted,attr"`
	Ignored   int        `xml:"ignored,attr"`
	Scrobbles []Scrobble `xml:"scrobble"`
}

type Scrobble struct {
	Track struct {
		Title     string  `xml:",chardata"`
		Corrected IntBool `xml:"corrected,attr"`
	} `xml:"track"`
	Artist struct {
		Name      string  `xml:",chardata"`
		Corrected IntBool `xml:"corrected,attr"`
	} `xml:"artist"`
	Album struct {
		Title     string  `xml:",chardata"`
		Corrected IntBool `xml:"corrected,attr"`
	} `xml:"album"`
	AlbumArtist struct {
		Name      string  `xml:",chardata"`
		Corrected IntBool `xml:"corrected,attr"`
	} `xml:"albumArtist"`
	Timestamp DateTime        `xml:"timestamp"`
	Ignored   ScrobbleIgnored `xml:"ignoredMessage"`
}

// https://www.last.fm/api/show/track.search
type TrackSearchParams struct {
	Track  string `url:"track"`
	Artist string `url:"artist,omitempty"`
	Limit  uint   `url:"limit,omitempty"`
	Page   uint   `url:"page,omitempty"`
}

type TrackSearchResult struct {
	Query struct {
		Role      string `xml:"role,attr"`
		StartPage int    `xml:"startPage,attr"`
	} `xml:"Query"`
	TotalResults int `xml:"totalResults"`
	StartIndex   int `xml:"startIndex"`
	PerPage      int `xml:"itemsPerPage"`
	Tracks       []struct {
		Title  string `xml:"name"`
		Artist string `xml:"artist"`
		// All values returned from the Last.fm API are "FIXME". API issue?
		Streamable string `xml:"streamable"`
		Listeners  int    `xml:"listeners"`
		URL        string `xml:"url"`
		MBID       string `xml:"mbid"`
		Image      Image  `xml:"image"`
	} `xml:"trackmatches>track"`
}

// https://www.last.fm/api/show/track.unlove
type TrackUnloveParams struct {
	Track  string `url:"track"`
	Artist string `url:"artist"`
}

// https://www.last.fm/api/show/track.updateNowPlaying
type UpdateNowPlayingParams struct {
	Artist string `url:"artist"`
	Track  string `url:"track"`

	Album       string   `url:"album,omitempty"`
	AlbumArtist string   `url:"albumArtist,omitempty"`
	TrackNumber int      `url:"trackNumber,omitempty"`
	Duration    Duration `url:"duration,omitempty"`
	MBID        string   `url:"mbid,omitempty"`

	Context string `url:"context,omitempty"`
}

// https://www.last.fm/api/show/track.updateNowPlaying#attributes
type NowPlayingUpdate struct {
	Track struct {
		Title     string  `xml:",chardata"`
		Corrected IntBool `xml:"corrected,attr"`
	} `xml:"track"`
	Artist struct {
		Name


�"...
```

**Parameter**:

| Name | Type | Description | Required? |
|-----------|------|-------------|-----------|
| alert_id | number | Alert ID. | No
| data_source | array | RISKEN DataSource. e.g. aws, google, code (like github, gitlab, etc.), osint, diagnosis, azure, ... | No
| finding_id | number | Finding ID. | No
| from_score | number | Minimum score of the findings. | No
| limit | number | Limit of the findings. | No
| offset | number | Offset of the findings. | No
| resource_name | array | RISKEN ResourceName. e.g. "arn:aws:iam::123456789012:user/test-user" ... | No
| status | number | Status of the findings. (0: all, 1: active, 2: pending) | No
</details>

# 🔐 Resource SBOM

Minibridge will perform hash checks for the following resources. The hashes are given as references and are the sha256 sum of the description.

| Resource | Name | Parameter | Hash |
|-----------|------|------|------|
| tools | archive_finding | description | 7e0b3787de139f799028be042401a49b121d73c70e1f6860b8aaa95fdf69b674 |
| tools | archive_finding | finding_id | 759bc9f005fad1e7e479fce1b73838d6e75e23f33f3e4873e702864159bc0663 |
| tools | archive_finding | note | 0d1c48d987ab41af26de55fd0bc6091dba293c06487d2d4a49259d912edbd62a |
| tools | get_project | description | 48c5bb85a8cc1bc2cafcfad7a06edbb4e3a1d06811e5ff95e92b6ea7e280ca5c |
| tools | search_alert | description | 22350184df6c255c42432f2faac93dd917bfadfa34c84934dbc4f6aee6c4cd4c |
| tools | search_alert | status | 4adb7b86911431f8c98f24bb56889ef2428d4d7ec0ec665e82b0dec7e5e0bd5d |
| tools | search_finding | description | f0c615899c31b6df61735936f42c4ead0ecaca06e6a4af22fa4adb10873e4b23 |
| tools | search_finding | alert_id | 5328c984088a605673e80878cdcb6f53accf11d42ca67402039c81f94f29f283 |
| tools | search_finding | data_source | 10570b2b6267894e425ffcd647e386b14f1615bd7ae142823efab812a52230b5 |
| tools | search_finding | finding_id | 759bc9f005fad1e7e479fce1b73838d6e75e23f33f3e4873e702864159bc0663 |
| tools | search_finding | from_score | eac867fd6dc68f86c680718e40e11deba463c0bc35f43dbfdc9584336ee547f8 |
| tools | search_finding | limit | 0fadf3587e42c51ba1bf47ad7daea021ac7954871de891e60e487fe9ef9334e9 |
| tools | search_finding | offset | 5aae8e96a8d959f600fa4be4153de2c655c9a432ec341a327a7509a59477ee3d |
| tools | search_finding | resource_name | b2c9fd346530b01677b61f6a69c2e763d675cb96f5b143e5d64e6d7d1cd42e77


contention if many values
//! are proposed in parallel, but the following implementation follows this approach to match how
//! the algorithm is typically described.

use serde::{Deserialize, Serialize};
use stateright::{Expectation, Model, Checker};
use stateright::actor::{
    Actor, ActorModel, Id, majority, model_peers, Network,Out};
use stateright::actor::register::{RegisterActor, RegisterMsg, RegisterMsg::*};
use stateright::semantics::LinearizabilityTester;
use stateright::semantics::register::Register;
use stateright::util::{HashableHashMap, HashableHashSet};
use std::borrow::Cow;

type Round = u32;
type Ballot = (Round, Id);
type Proposal = (RequestId, Id, Value);
type RequestId = u64;
type Value = char;

#[derive(Clone, Debug, Eq, Hash, PartialEq)]
#[derive(Serialize, Deserialize)]
enum PaxosMsg {
    Prepare { ballot: Ballot },
    Prepared { ballot: Ballot, last_accepted: Option<(Ballot, Proposal)> },

    Accept { ballot: Ballot, proposal: Proposal },
    Accepted { ballot: Ballot },

    Decided { ballot: Ballot, proposal: Proposal },
}
use PaxosMsg::*;

#[derive(Clone, Debug, Eq, Hash, PartialEq)]
struct PaxosState {
    // shared state
    ballot: Ballot,

    // leader state
    proposal: Option<Proposal>,
    prepares: HashableHashMap<Id, Option<(Ballot, Proposal)>>,
    accepts: HashableHashSet<Id>,

    // acceptor state
    accepted: Option<(Ballot, Proposal)>,
    is_decided: bool,
}

#[derive(Clone)]
struct PaxosActor { peer_ids: Vec<Id> }

impl Actor for PaxosActor {
    type Msg = RegisterMsg<RequestId, Value, PaxosMsg>;
    type State = PaxosState;

    fn on_start(&self, _id: Id, _o: &mut Out<Self>) -> Self::State {
        PaxosState {
            // shared state
            ballot: (0, Id::from(0)),

            // leader state
            proposal: None,
            prepares: Default::default(),
            accepts: Default::default(),

            // acceptor state
            accepted: None,
            is_decided: false,
        }
    }

    fn on_msg(&self, id: Id, state: &mut Cow<Self::State>, src: Id, msg: Self::Msg, o: &mut Out<Self>) {
        if state.is_decided {
            if let Get(request_id) = msg {
                // While it's tempting to `o.send(src, GetOk(request_id, None))` for undecided,
                // we don't know if a value was decided elsewhere and the delivery is pending. Our
                // solution is to not reply in this case, but a more useful choice might be
                // to broadcast to the other actors and let them reply to the originator, or query
                // the other actors and reply based on that.
                let (_b, (_req_id, _src, value)) = state.accepted
                    .expect("decided but lacks accepted state");
                o.send(src, GetOk(request_id, value));
            };
            return;
        }

        match msg {
            Put(request_id, value) if state.proposal.is_none()  => {
                let mut state = state.to_mut();
                state.proposal = Some((request_id, src, value));
                state.prepares = Default::default();
                state.accepts = Default::default();

                // Simulate `Prepare` self-send.
                state.ballot = (state.ballot.0 + 1, id);
                // Simulate `Prepared` self-send.
                state.prepares.insert(id, state.accepted);

                o.broadcast(
                    &self.peer_ids,
                    &Internal(Prepare { ballot: state.ball


 font. This is normally a font configured in a renderer or loaded from the system.
    #[classattr]
    #[allow(non_snake_case)]
    fn DEFAULT() -> Self {
        Self(Font::Default)
    }

    /// Name of the font
    ///
    /// Returns
    /// -------
    /// str
    ///     The name of the font.
    /// None
    ///     For :py:attr:`~pyiced.Font.DEFAULT`.
    #[getter]
    fn name(&self) -> Option<&'static str> {
        match self.0 {
            Font::External { name, .. } => Some(name),
            Font::Default => None,
        }
    }

    /// Bytes data of the font
    ///
    /// Returns
    /// -------
    /// memoryview
    ///     The bytes data of the font.
    /// None
    ///     For :py:attr:`~pyiced.Font.DEFAULT`.
    #[getter]
    fn data(slf: PyRef<Self>, py: Python) -> PyResult<Option<Py<PyAny>>> {
        match slf.0 {
            Font::Default => Ok(None),
            Font::External { .. } => {
                let result = py
                    .import("builtins")?
                    .getattr("memoryview")?
                    .call1((slf,))?
                    .into_py(py);
                Ok(Some(result))
            },
        }
    }

    #[classattr]
    #[allow(non_snake_case)]
    fn __match_args__() -> (&'static str, &'static str) {
        ("name", "data")
    }

    fn __str__(&self) -> PyResult<String> {
        debug_str(&self.0)
    }

    fn __repr__(&self) -> PyResult<Cow<'static, str>> {
        match self.0 {
            Font::Default => Ok(Cow::Borrowed("Font.DEFAULT")),
            Font::External { name, bytes } => {
                format_to_cow!("Font({:?}, <{} bytes>)", name, bytes.len())
            },
        }
    }

    unsafe fn __getbuffer__(slf: PyRefMut<Self>, view: *mut Py_buffer, flags: c_int) -> PyResult<()> {
        if (flags & PyBUF_WRITABLE) == PyBUF_WRITABLE {
            return Err(PyValueError::new_err("Font is not writable."));
        }

        let bytes = match (*slf).0 {
            Font::Default => {
                return Err(PyNotImplementedError::new_err(
                    "Buffer not implemented for default font.",
                ));
            },
            Font::External { bytes, .. } => bytes,
        };

        let view = &mut *view;
        view.obj = slf.as_ptr();
        view.buf = bytes.as_ptr() as _;
        view.len = bytes.len() as _;
        view.readonly = 1;
        view.ndim = 1;
        view.format = null_mut();
        view.shape = null_mut();
        view.strides = null_mut();
        view.suboffsets = null_mut();
        view.itemsize = 1;

        if (flags & PyBUF_FORMAT) == PyBUF_FORMAT {
            view.format = &b"B\0"[..] as *const _ as _;
        }
        if (flags & PyBUF_ND) == PyBUF_ND {
            view.shape = &mut view.len as _;
        }
        if (flags & PyBUF_STRIDES) == PyBUF_STRIDES {
            view.strides = &mut view.itemsize as _;
        }

        Ok(())
    }

    unsafe fn __releasebuffer__(_slf: PyRefMut<Self>, view: *mut Py_buffer) -> PyResult<()> {
        let view = &mut *view;
        view.obj = null_mut();


447a214ca222004d413ee607197204f26950f3a0c">SC_MARK_CIRCLEPLUS
A drawn plus sign in a circle.

SC_MARK_CIRCLEPLUSCONNECTED
A drawn plus sign in a connected box.

SC_MARK_CIRCLEMINUS
A drawn minus sign in a circle.

SC_MARK_CIRCLEMINUSCONNECTED
A drawn minus sign in a connected circle.

SC_MARK_BACKGROUND
No symbol is drawn but the line is drawn with the same background color as the marker's.

SC_MARK_DOTDOTDOT
Three drawn dots.

SC_MARK_ARROWS
Three drawn arrows pointing right.

SC_MARK_PIXMAP
An XPM format pixmap.

SC_MARK_FULLRECT
A full rectangle (ie. the margin background) using the marker's background color.

SC_MARK_LEFTRECT
A left rectangle (ie. the left part of the margin background) using the marker's background color.

SC_MARK_AVAILABLE
The value is available for plugins to


  });

  describe("toRomanNumerals", function () {
    it("handles invalid arguments", function () {
      for (const input of ["foo", -1, 0]) {
        expect(function () {
          toRomanNumerals(input);
        }).toThrow(new Error("The number should be a positive integer."));
      }
    });

    it("converts numbers to uppercase Roman numerals", function () {
      expect(toRomanNumerals(1)).toEqual("I");
      expect(toRomanNumerals(6)).toEqual("VI");
      expect(toRomanNumerals(7)).toEqual("VII");
      expect(toRomanNumerals(8)).toEqual("VIII");
      expect(toRomanNumerals(10)).toEqual("X");
      expect(toRomanNumerals(40)).toEqual("XL");
      expect(toRomanNumerals(100)).toEqual("C");
      expect(toRomanNumerals(500)).toEqual("D");
      expect(toRomanNumerals(1000)).toEqual("M");
      expect(toRomanNumerals(2019)).toEqual("MMXIX");
    });

    it("converts numbers to lowercase Roman numerals", function () {
      expect(toRomanNumerals(1, /* lowercase = */ true)).toEqual("i");
      expect(toRomanNumerals(6, /* lowercase = */ true)).toEqual("vi");
      expect(toRomanNumerals(7, /* lowercase = */ true)).toEqual("vii");
      expect(toRomanNumerals(8, /* lowercase = */ true)).toEqual("viii");
      expect(toRomanNumerals(10, /* lowercase = */ true)).toEqual("x");
      expect(toRomanNumerals(40, /* lowercase = */ true)).toEqual("xl");
      expect(toRomanNumerals(100, /* lowercase = */ true)).toEqual("c");
      expect(toRomanNumerals(500, /* lowercase = */ true)).toEqual("d");
      expect(toRomanNumerals(1000, /* lowercase = */ true)).toEqual("m");
      expect(toRomanNumerals(2019, /* lowercase = */ true)).toEqual("mmxix");
    });
  });

  describe("log2", function () {
    it("handles values smaller than/equal to zero", function () {
      expect(log2(0)).toEqual(0);
      expect(log2(-1)).toEqual(0);
    });

    it("handles values larger than zero", function () {
      expect(log2(1)).toEqual(0);
      expect(log2(2)).toEqual(1);
      expect(log2(3)).toEqual(2);
      expect(log2(3.14)).toEqual(2);
    });
  });

  describe("numberToString", function () {
    it("should stringify integers", function () {
      expect(numberToString(1)).toEqual("1");
      expect(numberToString(0)).toEqual("0");
      expect(numberToString(-1)).toEqual("-1");
    });

    it("should stringify floats", function () {
      expect(numberToString(1.0)).toEqual("1");
      expect(numberToString(1.2)).toEqual("1.2");
      expect(numberToString(1.23)).toEqual("1.23");
      expect(numberToString(1.234)).toEqual("1.23");
    });
  });

  describe("isWhiteSpace", function () {
    it("handles space characters", function () {
      expect(isWhiteSpace(0x20)).toEqual(true);
      expect(isWhiteSpace(0x09)).toEqual(true);
      expect(isWhiteSpace(0x0d)).toEqual(true);
      expect(isWhiteSpace(0x0a)).toEqual(true);
    });

    it("handles non-space characters", function () {
      expect(isWhiteSpace(0x0b)).toEqual(false);
      expect(isWhiteSpace(null)).toEqual(false);
      expect(isWhiteSpace(undefined)).toEqual(false);
    });
  });

  describe("parseXFAPath", function () {
    it("should get a correctly parsed path", function () {
      const path = "foo.bar[12].oof[3].rab.FOO[123].BAR[456]


cted:"Nenhuma fei\u00e7\u00e3o selecionada",
NLS_validationInt:"O valor deve ser um inteiro.",NLS_next:"Pr\u00f3ximo",NLS_errorInvalid:"Inv\u00e1lido",NLS_previous:"Anterior",NLS_first:"Primeiro",NLS_deleteFeature:"Excluir",NLS_of:"de",NLS_last:"\u00daltimo"},templatePicker:{loading:"Carregando...",creationDisabled:"A cria\u00e7\u00e3o de fei\u00e7\u00f5es est\u00e1 desativada para todas as camadas."},locateButton:{locate:{tracking:"Rastrear local",title:"Encontrar meu local",stopTracking:"Parar rastreio de local",button:"Meu Local"}},scalebar:{ft:"p\u00e9s",
km:"km",mi:"mi",m:"m"},layerSwipe:{title:"Arraste para visualizar a camada subjacente"},HistogramTimeSlider:{dateRange:"Intervalo de Data: ${start} - ${end}",count:"Contagem: ${count}"},basemapToggle:{toggle:"Alternar mapa base"},FeatureTable:{defaultSort:"Ordem de Classifica\u00e7\u00e3o Padr\u00e3o",clearSelection:"Limpar Sele\u00e7\u00e3o",sortAsc:"Ordem Crescente",toggleColumns:"Mostrar/Ocultar Colunas",sortDesc:"Ordem Decrescente",showSelected:"Mostrar Registros Selecionados"},geocodeMatch:{matchedUC:"Correspondido",
idProperty:"id",unmatchedLC:"n\u00e3o correspondido",unmatchedUC:"N\u00e3o Correspondido",match:{columnLabelAddress:"Endere\u00e7o",columnLabelType:"Tipo",defaultMatchType:"DefaultMatch",mapAllCandidatesLabel:"Mapear Todas as Sugest\u00f5es",userCreatedLabel:"Usu\u00e1rio Criado",tableOptionsLabel:"Op\u00e7\u00f5es",columnLabelScore:"Pontua\u00e7\u00e3o",defaultSortOrderLabel:"Ordem de Classifica\u00e7\u00e3o Padr\u00e3o",noDataMsg:"Nenhum Resultado."},customLabel:"Personalizar",gridTitle:"Sugest\u00f5es",
popup:{locationTitle:"Local",optionsTitle:"Op\u00e7\u00f5es de Correspond\u00eancia:",checkBoxAddress:"Endere\u00e7o Sugerido",loadingPH:"Pesquisando...",yTitle:"Y: ",discardButtonLabel:"Descartar",xTitle:"X: ",checkBoxLocation:"Localiza\u00e7\u00e3o (X, Y)",matchButtonLabel:"Igualar",addressTitle:"Endere\u00e7o Sugerido",noAddress:"Nenhum Endere\u00e7o Encontrado."},matchedLC:"correspondido"},measurement:{NLS_geometry_service_error:"Erro do Servi\u00e7o de Geometria",NLS_length_kilometers:"Quil\u00f4metros",
NLS_length_nautical_miles:"Milhas N\u00e1uticas",NLS_area_sq_miles:"Milhas Quadradas",NLS_length_yards:"Jardas",NLS_distance:"Dist\u00e2ncia",NLS_GeoRef:"GeoRef",NLS_area_acres:"Acres",NLS_resultLabel:"Resultado da Medida",NLS_MGRS:"MGRS",NLS_length_miles:"Milhas",NLS_area_hectares:"Hectares",NLS_area_sq_nautical_miles:"Sq de Milhas N\u00e1uticas",NLS_deg_min_sec:"DMS",NLS_area:"\u00c1rea",NLS_UTM:"UTM",NLS_GARS:"GARS",NLS_area_sq_meters:"Metros Quadrados",NLS_USNG:"USNG",NLS_latitude:"Latitude",
NLS_area_sq_kilometers:"


t(1).(func(context.Context, common.Hash) error); ok {
		r1 = rf(ctx, hash)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// EvmTxStore_FindTxByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxByHash'
type EvmTxStore_FindTxByHash_Call struct {
	*mock.Call
}

// FindTxByHash is a helper method to define mock.On call
//   - ctx context.Context
//   - hash common.Hash
func (_e *EvmTxStore_Expecter) FindTxByHash(ctx interface{}, hash interface{}) *EvmTxStore_FindTxByHash_Call {
	return &EvmTxStore_FindTxByHash_Call{Call: _e.mock.On("FindTxByHash", ctx, hash)}
}

func (_c *EvmTxStore_FindTxByHash_Call) Run(run func(ctx context.Context, hash common.Hash)) *EvmTxStore_FindTxByHash_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(common.Hash))
	})
	return _c
}

func (_c *EvmTxStore_FindTxByHash_Call) Return(_a0 *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, pkgtypes.Nonce, gas.EvmFee], _a1 error) *EvmTxStore_FindTxByHash_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *EvmTxStore_FindTxByHash_Call) RunAndReturn(run func(context.Context, common.Hash) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, pkgtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxByHash_Call {
	_c.Call.Return(run)
	return _c
}

// FindTxWithAttempts provides a mock function with given fields: ctx, etxID
func (_m *EvmTxStore) FindTxWithAttempts(ctx context.Context, etxID int64) (types.Tx[*big.Int, common.Address, common.Hash, common.Hash, pkgtypes.Nonce, gas.EvmFee], error) {
	ret := _m.Called(ctx, etxID)

	if len(ret) == 0 {
		panic("no return value specified for FindTxWithAttempts")
	}

	var r0 types.Tx[*big.Int, common.Address, common.Hash, common.Hash, pkgtypes.Nonce, gas.EvmFee]
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, int64) (types.Tx[*big.Int, common.Address, common.Hash, common.Hash, pkgtypes.Nonce, gas.EvmFee], error)); ok {
		return rf(ctx, etxID)
	}
	if rf, ok := ret.Get(0).(func(context.Context, int64) types.Tx[*big.Int, common.Address, common.Hash, common.Hash, pkgtypes.Nonce, gas.EvmFee]); ok {
		r0 = rf(ctx, etxID)
	} else {
		r0 = ret.Get(0).(types.Tx[*big.Int, common.Address, common.Hash, common.Hash, pkgtypes.Nonce, gas.EvmFee])
	}

	if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
		r1 = rf(ctx, etxID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// EvmTxStore_FindTxWithAttempts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxWithAttempts'
type EvmTxStore_FindTxWithAttempts_Call struct {
	*mock.Call
}


print(colors.fail + '  ☒' + colors.close, end=' ')
        print('Guessed:', guessed)

Iteration  1
Train on 900 samples, validate on 100 samples
900/900 [==============================] - 1s 1ms/sample - loss: 1.5905 - accuracy: 0.3958 - val_loss: 1.6040 - val_accuracy: 0.3925
Q:   5+340   Actual:  345   ☒ Guessed:  155
Q:   5+721   Actual:  726   ☒ Guessed:  155
Q:    27+7   Actual:   34   ☒ Guessed:   22
Q:  91+665   Actual:  756   ☒ Guessed:  155
Q:   388+9   Actual:  397   ☒ Guessed:  155
Q:  941+23   Actual:  964   ☒ Guessed:  155
Q:   17+67   Actual:   84   ☒ Guessed:   55
Q:  91+665   Actual:  756   ☒ Guessed:  155
Q: 204+890   Actual: 1094   ☒ Guessed:  555
Q:     5+9   Actual:   14   ☒ Guessed:    2
Iteration  2
Train on 900 samples, validate on 100 samples
900/900 [==============================] - 1s 1ms/sample - loss: 1.5800 - accuracy: 0.4006 - val_loss: 1.6091 - val_accuracy: 0.4025
Q:   7+471   Actual:  478   ☒ Guessed:  449
Q:  672+52   Actual:  724   ☒ Guessed:  499
Q:    51+1   Actual:   52   ☒ Guessed:   34
Q: 757+459   Actual: 1216   ☒ Guessed: 1444
Q:    51+1   Actual:   52   ☒ Guessed:   34
Q:   5+721   Actual:  726   ☒ Guessed:  149
Q:     9+2   Actual:   11   ☒ Guessed:   34
Q:     5+9   Actual:   14   ☑ Guessed:   1


# Generated by Django 3.2.5 on 2021-12-05 06:33

from django.db import migrations

import logging

logger = logging.getLogger('inventree')

def delete_scheduled(apps, schema_editor):
    """
    Delete all stock items which are marked as 'scheduled_for_deletion'.

    The issue that this field was addressing has now been fixed,
    and so we can all move on with our lives...
    """

    StockItem = apps.get_model('stock', 'stockitem')

    items = StockItem.objects.filter(scheduled_for_deletion=True)

    if items.count() > 0:
        logger.info(f"Removing {items.count()} stock items scheduled for deletion")

        # Ensure any parent / child relationships are updated!
        for item in items:
            children = StockItem.objects.filter(parent=item)
            children.update(parent=item.parent)

            item.delete()

    Task = apps.get_model('django_q', 'schedule')

    Task.objects.filter(func='stock.tasks.delete_old_stock_items').delete()

class Migration(migrations.Migration):

    dependencies = [
        ('django_q', '0007_ormq'),
        ('stock', '0070_auto_20211128_0151'),
    ]

    operations = [
        migrations.RunPython(
            delete_scheduled,
            reverse_code=migrations.RunPython.noop,
        )
    ]


fset)
        else:
            done = self.set_cursor_on_line_with_string(self._stored_text_of_line, self._stored_line_offset)
            if not done and self._stored_relative_lines:
                next_relative_lines = sorted(self._stored_relative_lines, key=lambda type_tuple: type_tuple[0])
                text_of_line = next_relative_lines[0][1]
                done = self.set_cursor_on_line_with_string(text_of_line, self._stored_line_offset)
            return done

    @property
    def filtered_buffer(self):
        with self._filtered_buffer_lock.reader_lock:
            return self._filtered_buffer

    @filtered_buffer.setter
    def filtered_buffer(self, buffer):
        with self._filtered_buffer_lock.writer_lock:
            self._filtered_buffer = buffer


IoApi
import kotlinx.io.Source
import kotlinx.io.readByteArray

@OptIn(InternalIoApi::class)
internal class SourceInputStream(private val source: Source) : InputStream() {
    private var sourceMark: Source? = null

    private fun source(): Source = sourceMark ?: source

    override fun mark(readLimit: Int) {
        sourceMark = source().peek()
    }

    override fun markSupported(): Boolean {
        return true
    }

    override fun reset() {
        sourceMark?.close()
        sourceMark = null
    }

    override fun read(): Int {
        if (source().exhausted()) {
            return -1
        }
        return source().readByte().toInt() and 0xff
    }

    override fun read(bytes: ByteArray, off: Int, len: Int): Int {
        return source().readAtMostTo(bytes, off, off + len)
    }

    override fun readAllBytes(): ByteArray {
        return source().readByteArray()
    }

    override fun available(): Int {
        return minOf(source().buffer.size.toInt(), Int.MAX_VALUE - 1)
    }

    fun exhausted(): Boolean {
        return source().exhausted()
    }

    override fun close() {
        return source().close()
    }
}package com.fleeksoft.charset.cs.ext

import com.fleeksoft.charset.Charset
import com.fleeksoft.charset.CharsetDecoder
import com.fleeksoft.charset.CharsetEncoder
import com.fleeksoft.charset.cs.CharsetMapping
import com.fleeksoft.charset.cs.SingleByte
import com.fleeksoft.charset.cs.SingleByte.initC2B

class IBM273 : Charset("IBM273", null) {

    override fun contains(cs: Charset): Boolean {
        return (cs is IBM273)
    }

    override fun newDecoder(): CharsetDecoder {
        return SingleByte.Decoder(this, Holder.b2c, false, true)
    }

    override fun newEncoder(): CharsetEncoder {
        return SingleByte.Encoder(this, Holder.c2b, Holder.c2bIndex, false)
    }

    private object Holder {
        private const val b2cTable = "\u00D8\u0061\u0062\u0063\u0064\u0065\u0066\u0067" +  // 0x80 - 0x87
                "\u0068\u0069\u00AB\u00BB\u00F0\u00FD\u00FE\u00B1" +  // 0x88 - 0x8f
                "\u00B0\u006A\u006B\u006C\u006D\u006E\u006F\u0070" +  // 0x90 - 0x97
                "\u0071\u0072\u00AA\u00BA\u00E6\u00B8\u00C6\u00A4" +  // 0x98 - 0x9f
                "\u00B5\u00DF\u0073\u0074\u0075\u0076\u0077\u0078


/models/settings.dart';
import 'package:refilc/ui/widgets/grade/grade_tile.dart';
import 'package:refilc/utils/format.dart';
import 'package:refilc_kreta_api/models/grade.dart';
import 'package:refilc_kreta_api/models/subject.dart';
import 'package:refilc_kreta_api/providers/grade_provider.dart';
import 'package:refilc_mobile_ui/screens/summary/summary_screen.i18n.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:i18n_extension/i18n_extension.dart';

List<String> faces = [
  "(·.·)",
  "(≥o≤)",
  "(·_·)",
  "(˚Δ˚)b",
  "(^-^*)",
  "(='X'=)",
  "(>_<)",
  "(;-;)",
  "\\(^Д^)/",
  "\\(o_o)/",
];

class GradesBody extends StatefulWidget {
  const GradesBody({super.key});

  @override
  GradesBodyState createState() => GradesBodyState();
}

class GradesBodyState extends State<GradesBody> {
  late UserProvider user;
  late GradeProvider gradeProvider;
  late SettingsProvider settings;

  late double subjectAvg;
  late double endYearAvg;
  late String endYearAvgText;

  List<Widget> subjectTiles5 = [];
  List<Widget> subjectTiles3 = [];
  List<Widget> subjectTiles1 = [];

  int avgDropValue = 0;
  bool animation = false;

  List<Grade> getSubjectGrades(GradeSubject subject, {int days = 0}) =>
      gradeProvider.grades
          .where((e) =>
              e.subject == subject &&
              e.type == GradeType.midYear &&
              (days == 0 ||
                  e.date
                      .isBefore(DateTime.now().subtract(Duration(days: days)))))
          .toList();

  @override
  void initState() {
    super.initState();

    gradeProvider = Provider.of<GradeProvider>(context, listen: false);
    settings = Provider.of<SettingsProvider>(context, listen: false);

    WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
      setState(() {
        animation = true;
      });
    });
  }

  void generateTiles({required int filter}) {
    List<GradeSubject> subjects = gradeProvider.grades
        .map((e) => e.subject)
        .toSet()
        .toList()
      ..sort((a, b) => a.name.compareTo(b.name));
    List<Widget> tiles = [];

    Map<GradeSubject, double> subjectAvgs = {};

    var count = 1;

    for (GradeSubject subject in subjects) {
      List<Grade> subjectGrades = getSubjectGrades(subject);

      double avg = AverageHelper.averageEvals(subjectGrades);
      if (avg != 0) subjectAvgs[subject] = avg;

      Widget widget = AnimatedContainer(
        curve: Curves.easeInOut,
        duration: Duration(milliseconds: 300 + (count * 120)),
        transform: Matrix4.translationValues(
            animation ? 0 : MediaQuery.of(context).size.width, 0, 0),
        child: Row(
          children: [
            GradeValueWidget(
              GradeValue(avg.round(), '', '', 100),
              fill: true,
              size: 28.0,
            ),
            const SizedBox(width: 8),
            Text(
              subject.renamedTo ?? subject.name.capital(),
              maxLines: 2,
              overflow: TextOverflow.ellipsis,
              style: TextStyle(
                fontWeight: FontWeight.bold,
                fontSize: 20.0,
                color: Colors.white.withValues(alpha: 0.98),


buildQuestionCard(LevelStep step, Level level) {
    return Container(
      padding: const EdgeInsets.only(top: 80, right: 16, left: 16),
      alignment: Alignment.center, // Centra il contenuto verticalmente
      child: CourseQuestionCard(
        step: step,
        onAnswered: (isCorrect) {
          setState(() {
            allShortSteps[_pageController.page!.round()]['showQuestion'] = true;
          });
        },
        onCompleteStep: () {
          // Manteniamo vuoto questo callback come prima
        },
        topic: widget.selectedTopic ?? 'Just Learn',
      ),
    );
  }

  Future<void> _markSectionAsCompleted(String sectionTitle) async {
    final user = FirebaseAuth.instance.currentUser;
    if (user != null) {
      try {
        final userRef = FirebaseFirestore.instance.collection('users').doc(user.uid);
        final userDoc = await userRef.get();

        if (userDoc.exists) {
          final userData = userDoc.data() as Map<String, dynamic>;
          final completedSections = List<String>.from(userData['completedSections'] ?? []);

          if (!completedSections.contains(sectionTitle)) {
            completedSections.add(sectionTitle);
            await userRef.update({
              'completedSections': completedSections,
            });
          }
        }
      } catch (e) {
        print('Error marking section as completed: $e');
      }
    }
  }

  // Aggiungiamo un metodo dedicato per gestire i cambiamenti di sezione
  void _updateCurrentSection(Section newSection, {bool forceUpdate = false}) {
    if (forceUpdate || currentSection?.title != newSection.title) {
      setState(() {
        currentSection = newSection;
      });
    }
  }

  // Ottimizziamo startCourse
  Future<void> startCourse(Course? course, {Section? selectedSection}) async {
    if (!mounted) return;

    if (course == null) {
      setState(() {
        isInCourseMode = false;
        currentCourse = null;
        currentSection = null;
        currentStepIndex = 0;
      });

      widget.onSectionProgressUpdate(0, 0, false);
      await _loadCourses();
      return;
    }

    try {
      setState(() {
        isInCourseMode = true;
        currentCourse = course;
        allShortSteps = _createCourseSteps(course);
      });

      // Gestisci la sezione iniziale
      if (selectedSection != null) {
        _updateCurrentSection(selectedSection, forceUpdate: true);
        final startIndex = _calculateSectionStartIndex(course, selectedSection);
        _pageController.jumpToPage(startIndex);
      } else {
        final lastProgressIndex = await _loadLastProgress(course);
        _pageController.jumpToPage(lastProgressIndex);
      }

      _initializeControllers();
    } catch (e) {
      print('Error starting course: $e');
      // Qui potresti aggiungere una gestione degli errori più sofisticata
    }
  }

  // Nuovo metodo per creare gli step del corso
  List<Map<String, dynamic>> _createCourseSteps(Course course) {
    List<Map<String, dynamic>> steps = [];

    for (var section in course.sections) {
      for (var step in section.steps) {
        steps.add({
          'step': step,
          'level': Level(
            id: course.id,
            levelNumber: course.sections.indexOf(section) + 1,
            topic: course.topic,
            subtopic: course.subtopic,
            title: course.title,
            steps: section.steps,
            subtopicOrder: 1,
          ),
          'course': course,
          'section': section, // Aggiungiamo la sezione per riferimento diretto
          'showQuestion': step.type ==


}
					}else{
						orChain.addConfig(last);
					}
					conf = new DefaultConfig();
					conf.setJoin(Condition.JOIN.OR);
					if(compare == Compare.NULL || compare == Compare.NOT_NULL) {
						String column = var;
						if(BasicUtil.isNotEmpty(prefix)) {
							column = prefix + "." + var;
						}
						String txt = column + compare.formula();
						conf.setText(txt);
					}else {
						conf.setCompare(compare);
						conf.setVariable(var);
						conf.setPrefix(prefix);
						conf.setValue(value);
					}
					orChain.addConfig(conf);
					chain.addConfig(orChain);
				}
			}
		}
		return this;
	}
	@Override
	public ConfigStore ors(EMPTY_VALUE_SWITCH swt, Compare compare, String prefix, String var, Object value, boolean overCondition, boolean overValue) {
		if(null == prefix && var.contains(".")) {
			prefix = var.substring(0,var.indexOf("."));
			var = var.substring(var.indexOf(".")+1);
		}
		int compareCode = compare.getCode();

		List<Config> olds = new ArrayList<>();
		Config conf = null;
		if(overCondition) {
			olds = chain.getConfigs(prefix, var, compare);
			if(!olds.isEmpty()) {
				conf = olds.get(0);
				//相同参数只留一个 如 id = 1 or id = 2 or id = 3
				//只留下id = 1 下一步有可能把值1覆盖
				olds.remove(conf);
				chain.removeConfig(olds);
			}
		}

		ConfigChain newChain = new DefaultConfigChain();
		newChain.addConfig(chain);
		value = value(value);
		if(value instanceof List && ((List)value).size()>1 && compareCode >= 60 && compareCode <= 62) {
			List list = (List)value;
			if (overValue) {
				chain.removeConfig(olds);
			}
			if(compareCode == 60 || compareCode == 61) {
				//FIND_IN_OR
				for(Object item:list) {
					conf = new DefaultConfig();
					conf.setJoin(Condition.JOIN.OR);
					conf.setPrefix(prefix);
					conf.setCompare(compare);
					conf.setVariable(var);
					conf.setValue(item);
					newChain.addConfig(conf);
				}
			}else if(compareCode == 62) {
				//FIND_IN_AND
				ConfigChain findChain = new DefaultConfigChain();
				findChain.setJoin(Condition.JOIN.OR);
				for(Object item:list) {
					conf = new DefaultConfig();
					conf.setJoin(Condition.JOIN.AND);
					conf.setCompare(compare);
					conf.setPrefix(prefix);
					conf.setVariable(var);
					conf.setValue(item);
					findChain.addConfig(conf);
				}
				newChain.addConfig(findChain);
			}
		}else {
			if(null != conf) {
				if(overValue) {
					conf.setValue(value);
				}else{
					conf.addValue(value);
				}
			}else{
				conf = new DefaultConfig();
				conf.setJoin(Condition.JOIN.OR);

				if(compare == Compare.NULL || compare == Compare.NOT_NULL) {
					String column = var;
					if(BasicUtil.isNotEmpty(prefix)) {
						column = prefix + "." + var;
					}
					String txt = column + compare.formula();
					conf.setText(txt);
				}else {
					conf.setCompare(compare);
					conf.setVariable(var);
					conf.setPrefix(prefix);
					conf.setValue(value);
				}
				newChain.addConfig(conf);
			}

		}

		chain = newChain;
		return this;
	}


我：！？！？！？（黑人脸

我刚要扔臭鸡蛋，设计师咔嚓又上传了一张图，仿佛在说 “蛋下留人～” 而转机就这样发生了，我看到设计图，就如大家在15.8看到的Dock时尚模式一样，托盘问题竟然被 almost 完美地解决了——在最后的关键时刻设计师保住了自己的颜面。

怎么说呢，这基本上是我在深度继看到一个开发同事用钥匙给电脑开机感到由衷地佩服以来，再一次罕见地（尤其是被设计师？😈）觉得世界观被刷新的一次体验了。

另外一个要提的是一个很小的点，不过现在想起来都会有一种吃了广告中的德芙的感觉——丝滑。是什么呢？如果你现在使用 deepin 浏览这篇文章，应该能看到我特地在文章开头、上一段和中间甩锅那一段，几乎到处都贴了 emoji 表情：

能正常显示，而不是豆腐块！

关键是它们是彩色的！！！

整篇文章不再有黑乎乎的表情——这简直是使用Linux写技术博客的 Blogger 的福音啊。如果你也想在文字编辑的时候输入开爱的 emoji 表情，可以打开 https://getemoji.com/ ，只需 copy&paste，瞬间让你拥有进入 21 世纪互联网的赶脚。

至于这个新特性为什么没有写到更新注记里面，是低调，是彩蛋，还是忘了写？咳咳，有点赶时间，继续往下写了 🙄🙄🙄 。

开放和透明

上面说了发系统的接力棒已经成功交（shuai）接（guo）给别人了，那我去干啥了呢？总得做点啥吧，要不被开了就不好玩儿了嘛😱。

我这段时间做得其实就是开放和透明。

在中国说起开源，应该没有人不知道深度作为“东半球最大的开源软件公司”的名头，如果有人不知道，那也让我们先姑且这么认为着 😜， 深度从出生的那一刻起就一直在开源——深度出品的软件产品中95%以上都是开源的，但是直到最近我才�


 return this.ExecSQL(sqlStatement);
  }
}
export interface Card {

  id: number;
  name : string;
  date: Date;
  imageUrl : string;
  //timelineId : number
  description : string;

}
export const cards = [
  {
    id: 1,
    name: 'facebook',
    Date: new Date('2019-12-12'),
    //timelineId : 1,
    description: 'c est quand que',
  },
  {
    id: 2,
    name: 'twitter',
    Date: new Date('2019-12-12'),
    //timelineId : 1,
    description: 'c est quand que',

  },

];

export class card {
}
import { ICourse } from '../models/course';
import { ActionCreatorsMapObject, ActionCreator, Action, Dispatch } from 'redux';
import { Types } from './action-types';
import { CourseApi } from '../api/mock-course';

export interface ICourseAction extends Action {
    courses?: ICourse[],
    course?: ICourse
}

export const CourseActions: ActionCreatorsMapObject = {
    loadCoursesSuccess,
    createCourseSuccess,
    updateCourseSuccess,
    loadCourses,
    saveCourse
}

export function loadCoursesSuccess(courses: ICourse[]): ICourseAction {
    return {
        type: Types.LOAD_COURSES_SUCCESS,
        courses
    }
}

export function createCourseSuccess(course: ICourse): ICourseAction {
    console.log('SUCCESS CALLBACK');
    return {
        type: Types.CREATE_COURSE_SUCCESS, course
    };
}

export function updateCourseSuccess(course: ICourse): ICourseAction {
    return {
        type: Types.UPDATE_COURSE_SUCCESS, course
    };
}

export function loadCourses() {
    return function (dispatch: Dispatch<any>) {
        try {
            CourseApi.getAllCourses().then((_courses: ICourse[]) => {
                dispatch(loadCoursesSuccess(_courses));
            });

        } catch (error) {
            throw (error);
        }
    }
}

export function saveCourse(course: ICourse) {
    return function (dispatch: Dispatch<any>/*, getState: IState*/) {
        try {
            CourseApi.saveCourse(course).then((_course: ICourse) => {
                if (_course.id) {
                dispatch(updateCourseSuccess(_course));
            } else {
                console.log('DISPATCH');
                dispatch(createCourseSuccess(_course));
            }
            });

        } catch (error) {
            throw (error);
        }
    }
}/**
 * SAMPLE CODE NOTICE
 *
 * THIS SAMPLE CODE IS MADE AVAILABLE AS IS.  MICROSOFT MAKES NO WARRANTIES, WHETHER EXPRESS OR IMPLIED,
 * OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OR CONDITIONS OF MERCHANTABILITY.
 * THE ENTIRE RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS SAMPLE CODE REMAINS WITH THE USER.
 * NO TECHNICAL SUPPORT IS PROVIDED.  YOU MAY NOT DISTRIBUTE THIS CODE UNLESS YOU HAVE A LICENSE AGREEMENT WITH MICROSOFT THAT ALLOWS YOU TO DO SO.
 */

import { IExtensionCommandContext } from "PosApi/Extend/Views/AppBarCommands";
import * as SearchView from "PosApi/Extend/Views/SearchView";

export default class NavigateToSimpleExtensionViewCommand extends SearchView.ProductSearchExtensionCommandBase {
    /**
     * Creates a new instance of the NavigateToSimpleExtensionViewCommand class.
     * @param {IExtensionCommandContext<ProductDetailsView.IProductSearchToExtensionCommandMessageTypeMap>} context The command context.
     * @remarks The command context contains APIs through which a command


ort androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.unit.dp
import org.ohdj.nfcaimereader.ThemeMode

@Composable
fun SettingThemeItem(
    currentTheme: ThemeMode,
    onThemeSelected: (ThemeMode) -> Unit
) {
    Column(
        modifier = Modifier
            .fillMaxWidth()
            .padding(vertical = 8.dp)
    ) {
        Text(
            text = "深色模式",
            style = MaterialTheme.typography.bodyLarge,
            color = MaterialTheme.colorScheme.onSurface,
            modifier = Modifier.padding(bottom = 4.dp)
        )

        Text(
            text = "选择应用的外观模式",
            style = MaterialTheme.typography.bodyMedium,
            color = MaterialTheme.colorScheme.onSurfaceVariant,
            modifier = Modifier.padding(bottom = 16.dp)
        )

        Column(Modifier.selectableGroup()) {
            ThemeOption(
                title = "浅色",
                selected = currentTheme == ThemeMode.LIGHT,
                onClick = { onThemeSelected(ThemeMode.LIGHT) }
            )

            ThemeOption(
                title = "深色",
                selected = currentTheme == ThemeMode.DARK,
                onClick = { onThemeSelected(ThemeMode.DARK) }
            )

            ThemeOption(
                title = "跟随系统",
                selected = currentTheme == ThemeMode.SYSTEM,
                onClick = { onThemeSelected(ThemeMode.SYSTEM) }
            )
        }
    }
}

@Composable
private fun ThemeOption(
    title: String,
    selected: Boolean,
    onClick: () -> Unit
) {
    Row(
        modifier = Modifier
            .fillMaxWidth()
            .selectable(
                selected = selected,
                onClick = onClick,
                role = Role.RadioButton
            )
            .padding(vertical = 8.dp),
        verticalAlignment = Alignment.CenterVertically
    ) {
        RadioButton(
            selected = selected,
            onClick = null
        )
        Text(
            text = title,
            style = MaterialTheme.typography.bodyMedium,
            modifier = Modifier.padding(start = 16.dp)
        )
    }
}package me.adawoud.bottomsheettimepicker

import android.os.Bundle
import android.text.format.DateFormat
import androidx.appcompat.app.AppCompatActivity
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity(), OnTimeRangeSelectedListener {
    private val tagBottomSheetTimeRangePicker = "tagBottomSheetTimeRangePicker"

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        btnTimeRangePicker.setOnClickListener {
            BottomSheetTimeRangePicker
                .tabLabels(startTabLabel = "Hello", endTabLabel = "World")
                .doneButtonLabel("Ok")
                .startTimeInitialHour(2)
                .startTimeInitialMinute(11)
                .endTimeInitialHour(10)
                .endTimeInitialMinute(22)
                .newInstance(this, DateFormat.is24HourFormat(this))
                .show(supportFragmentManager, tagBottomSheetTimeRangePicker)
        }
    }

    override fun onTimeRangeSelected(
        startHour: Int,
        startMinute: Int,
        endHour: Int,
        endMinute: Int
    ) {
        var startHourString = startHour.toString()
        var startMinuteString = startMinute.toString()
        var endHourString = endHour.toString()
        var endMinuteString = endMinute.toString()
        when {
            startHour < 9 -> startHourString = startHour.toString().prependZero()
            startMinute < 9 -> startMinuteString = startMinute.toString().prependZero()
            endHour < 9 -> endHourString =


66ef97");
    TestAES128("2b7e151628aed2a6abf7158809cf4f3c", "ae2d8a571e03ac9c9eb76fac45af8e51", "f5d3d58503b9699de785895a96fdbaaf");
    TestAES128("2b7e151628aed2a6abf7158809cf4f3c", "30c81c46a35ce411e5fbc1191a0a52ef", "43b1cd7f598ece23881b00e3ed030688");
    TestAES128("2b7e151628aed2a6abf7158809cf4f3c", "f69f2445df4f9b17ad2b417be66c3710", "7b0c785e27e8ad3f8223207104725dd4");
    TestAES256("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4", "6bc1bee22e409f96e93d7e117393172a", "f3eed1bdb5d2a03c064b5a7e3db181f8");
    TestAES256("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4", "ae2d8a571e03ac9c9eb76fac45af8e51", "591ccb10d410ed26dc5ba74a31362870");
    TestAES256("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4", "30c81c46a35ce411e5fbc1191a0a52ef", "b6ed21b99ca6f4f9f153e7b1beafed1d");
    TestAES256("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4", "f69f2445df4f9b17ad2b417be66c3710", "23304b7a39f9f3ff067d8d8f9e24ecc7");
}

BOOST_AUTO_TEST_CASE(aes_cbc_testvectors) {

    // NIST AES CBC 128-bit encryption test-vectors
    TestAES128CBC("2b7e151628aed2a6abf7158809cf4f3c", "000102030405060708090A0B0C0D0E0F", false, \
                  "6bc1bee22e409f96e93d7e117393172a", "7649abac8119b246cee98e9b12e9197d");
    TestAES128CBC("2b7e151628aed2a6abf7158809cf4f3c", "7649ABAC8119B246CEE98E9B12E9197D", false, \
                  "ae2d8a571e03ac9c9eb76fac45af8e51", "5086cb9b507219ee95db113a917678b2");
    TestAES128CBC("2b7e151628aed2a6abf7158809cf4f3c", "5086cb9b507219ee95db113a917678b2", false, \
                  "30c81c46a35ce411e5fbc1191a0a52ef", "73bed6b8e3c1743b7116e69e22229516");
    TestAES128CBC("2b7e151628aed2a6abf7158809cf4f3c", "73bed6b8e3c1743b7116e69e22229516", false, \
                  "f69f2445df4f9b17ad2b417be66c3710", "3ff1caa1681fac09120eca307586e1a7");

    // The same vectors with padding enabled
    TestAES128CBC("2b7e151628aed2a6abf7158809cf4f3c", "0001


 = dartExpression.text
            ?.replace(Regex("[^A-Za-z0-9\\s]"), "")
            ?.toLowerCase()
            ?.split(" ")
            ?.take(10)
            ?.joinToString("_")

        runWriteCommandAction(project, text, Syntax.GROUP_ID, Runnable {
            showAndCreateFile(project, module, resId, Initializer.getStringFromExpression(dartExpression), text) {
                val fileText = dartExpression.text
                val newText = psiFile.text.replaceRange(
                    dartExpression.textOffset,
                    dartExpression.textOffset + fileText.length,
                    "S.of(context).$it"
                )
                editor.document.setText(newText)
            }
        }, psiFile)
    }
}package com.zhangzheng.superxml.library.decorate

import android.content.res.TypedArray
import android.graphics.drawable.StateListDrawable
import android.view.View
import com.zhangzheng.superxml.library.R
import com.zhangzheng.superxml.library.ext.createRadiusDrawable

internal class BackgroundPressedDecorate(var drawable: StateListDrawable? = null) :
    IDecorateView() {

    override fun initExtraInfo(typedArray: TypedArray): Boolean {
        val radius = typedArray.getDimension(R.styleable.decorate_view_layout_radius, 0f)

        val press = createRadiusDrawable(
            radius, typedArray.getDrawable(
                R.styleable.decorate_view_layout_background_pressedTrue
            )
        )
        val normal = createRadiusDrawable(
            radius, typedArray.getDrawable(
                R.styleable.decorate_view_layout_background_pressedFalse
            )
        )
        if (press == null || normal == null) {
            return false
        }

        drawable = StateListDrawable()
        drawable?.addState(intArrayOf(android.R.attr.state_pressed), press)
        drawable?.addState(intArrayOf(-android.R.attr.state_pressed), normal)
        return true
    }

    override fun decorate(view: View) {
        view.background = drawable
    }

}package com.longforus.mvpautocodeplus.maker

import com.intellij.ide.fileTemplates.FileTemplate
import com.intellij.ide.fileTemplates.FileTemplateManager
import com.intellij.ide.fileTemplates.FileTemplateUtil
import com.intellij.ide.fileTemplates.impl.FileTemplateManagerImpl
import com.intellij.openapi.project.Project
import com.longforus.mvpautocodeplus.*

/**
 * Created by XQ Yang on 2018/6/28  10:46.
 * Description : template管理类
 */

object TemplateMaker {

    var tpManager: FileTemplateManagerImpl? = null
    val cacheTemplate = HashMap<String, FileTemplate>()

    private fun createContractTemplate(name: String, type: String, content: String) {
        val template = FileTemplateUtil.createTemplate(name, type, content,
            tpManager!!.getTemplates(FileTemplateManager.DEFAULT_TEMPLATES_CATEGORY))
        template.isLiveTemplateEnabled = false
        //保存到ide中,这里就不保存了
//        tpManager.setTemplates(FileTemplateManager.DEFAULT_TEMPLATES_CATEGORY, listOf(template))
        cacheTemplate[name] = template
    }

    fun getTemplate(templateName: String, project: Project): FileTemplate? {
        if (cacheTemplate.contains(templateName)) {
            return cacheTemplate[templateName] as FileTemplate
        } else if (tpManager == null) {
            tpManager = FileTemplateManagerImpl.getInstanceImpl(project)
        }

        when (t