.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Items;

public class MagicAdvancement implements Consumer<Consumer<Advancement>> {

	@Override
	public void accept(Consumer<Advancement> t) {
		Advancement m1 = Advancement.Builder.advancement().display(MagicInit.EXTRACT_BLUE.get(), Component.translatable("advancements.dcs_climate.magic.root.title"),
				Component.translatable("advancements.dcs_climate.magic.root.desc"),
				new ResourceLocation("dcs_climate:textures/gui/advancement/magic.png"), FrameType.TASK, true, true, false)
				.addCriterion("has_drops", InventoryChangeTrigger.TriggerInstance.hasItems(ItemPredicate.Builder.item().of(TagDC.ItemTag.COLOR_EXTRACTS).build())).save(t,
						"dcs_climate:magic/magic_root");

		Advancement m2 = Advancement.Builder.advancement().parent(m1).display(MagicInit.ARROW_BLACK.get(), Component.translatable("advancements.dcs_climate.magic.arrow.title"),
				Component.translatable("advancements.dcs_climate.magic.arrow.desc"), null, FrameType.TASK, true, true, false)
				.addCriterion("has_arrow_white", InventoryChangeTrigger.TriggerInstance.hasItems(ItemPredicate.Builder.item().of(TagDC.ItemTag.MAGIC_TIER1).build()))
				.save(t, "dcs_climate:magic/mana_arrow");

		Advancement m3 = Advancement.Builder.advancement().parent(m2).display(MagicInit.CARD_WU.get(), Component.translatable("advancements.dcs_climate.magic.tier2.title"),
				Component.translatable("advancements.dcs_climate.magic.tier2.desc"), null, FrameType.TASK, true, true, false)
				.addCriterion("has_magic_tier2", InventoryChangeTrigger.TriggerInstance.hasItems(ItemPredicate.Builder.item().of(TagDC.ItemTag.MAGIC_TIER2).build()))
				.save(t, "dcs_climate:magic/magic_tier2");

		Advancement m4 = Advancement.Builder.advancement().parent(m3).display(Items.FEATHER, Component.translatable("advancements.dcs_climate.magic.bird.title"),
				Component.translatable("advancements.dcs_climate.magic.bird.desc"), null, FrameType.CHALLENGE, true, true, false)
				.addCriterion("has_magic_tier2", EffectsChangedTrigger.TriggerInstance.hasEffects(MobEffectsPredicate.effects().and(CoreInit.BIRD.get())))
				.save(t, "dcs_climate:magic/bird");

		Advancement g1 = Advancement.Builder.advancement().parent(m1).display(CoreInit.GEM_CELESTITE.get(), Component.translatable("advancements.dcs_climate.magic.gem.title"),
				Component.translatable("advancements.dcs_climate.magic.gem.desc"), null, FrameType.TASK, true, true, false)
				.addCriterion("has_gems", InventoryChangeTrigger.TriggerInstance.hasItems(ItemPredicate.Builder.item().of(TagDC.ItemTag.COLOR_GEMS).build())).save(t, "dcs_climate:magic/gem");

		Advancement g2 = Advancement.Builder.advancement().parent(g1).display(MagicInit.RING_GOLD_RED.get(), Component.translatable("advancements.dcs_climate.magic.ring.title"),
				Component.translatable("advancements.dcs_climate.magic.ring.desc"), null, FrameType.TASK, true, true, false)
				.addCriterion("ha


),
            &UncompressedFloatFormat::F32F32 => version >= &Version(Api::GlEs, 3, 2),
            &UncompressedFloatFormat::F32F32F32F32 => version >= &Version(Api::GlEs, 3, 2),
            &UncompressedFloatFormat::F11F11F10 => version >= &Version(Api::GlEs, 3, 2),
            _ => false
        }
    }

    fn to_glenum(&self) -> gl::types::GLenum {
        match self {
            &UncompressedFloatFormat::U8 => gl::R8,
            &UncompressedFloatFormat::I8 => gl::R8_SNORM,
            &UncompressedFloatFormat::U16 => gl::R16,
            &UncompressedFloatFormat::I16 => gl::R16_SNORM,
            &UncompressedFloatFormat::U8U8 => gl::RG8,
            &UncompressedFloatFormat::I8I8 => gl::RG8_SNORM,
            &UncompressedFloatFormat::U16U16 => gl::RG16,
            &UncompressedFloatFormat::I16I16 => gl::RG16_SNORM,
            &UncompressedFloatFormat::U3U3U2 => gl::R3_G3_B2,
            &UncompressedFloatFormat::U4U4U4 => gl::RGB4,
            &UncompressedFloatFormat::U5U5U5 => gl::RGB5,
            &UncompressedFloatFormat::U8U8U8 => gl::RGB8,
            &UncompressedFloatFormat::I8I8I8 => gl::RGB8_SNORM,
            &UncompressedFloatFormat::U10U10U10 => gl::RGB10,
            &UncompressedFloatFormat::U12U12U12 => gl::RGB12,
            &UncompressedFloatFormat::U16U16U16 => gl::RGB16,
            &UncompressedFloatFormat::I16I16I16 => gl::RGB16_SNORM,
            &UncompressedFloatFormat::U2U2U2U2 => gl::RGBA2,
            &UncompressedFloatFormat::U4U4U4U4 => gl::RGBA4,
            &UncompressedFloatFormat::U5U5U5U1 => gl::RGB5_A1,
            &UncompressedFloatFormat::U8U8U8U8 => gl::RGBA8,
            &UncompressedFloatFormat::I8I8I8I8 => gl::RGBA8_SNORM,
            &UncompressedFloatFormat::U10U10U10U2 => gl::RGB10_A2,
            &UncompressedFloatFormat::U12U12U12U12 => gl::RGBA12,
            &UncompressedFloatFormat::U16U16U16U16 => gl::RGBA16,
            &UncompressedFloatFormat::I16I16I16I16 => gl::RGBA16_SNORM,
            &UncompressedFloatFormat::F16 => gl::R16F,
            &UncompressedFloatFormat::F16F16 => gl::RG16F,
            &UncompressedFloatFormat::F16F16F16 => gl::RGB16F,
            &UncompressedFloatFormat::F16F16F16F16 => gl::RGBA16F,
            &UncompressedFloatFormat::F32 => gl::R32F,
            &UncompressedFloatFormat::F32F32 => gl::RG32F,
            &UncompressedFloatFormat::F32F32F32 => gl::RGB32F,
            &UncompressedFloatFormat::F32F32F32F32 => gl::RGBA32F,
            &UncompressedFloatFormat::F11F11F10 => gl::R11F_G11F_B10F,
            &UncompressedFloatFormat::F9F9F9 => gl::RGB9_E5,
        }
    }
}

/// List of uncompressed pixel formats that contain floating-point data in the sRGB color space.
#[allow(missing_docs)]
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
pub enum SrgbFormat {
    U8U8U8,
    U8U8U8U8,
}

impl SrgbFormat {
    /// Returns a list of all the possible values of this enumeration.
    #[inline]
    pub fn get_fo


 200,  1, 0)}, 20899.504975002);
  }

  void R_L()
  {
    // Note : the values are not verified by hand
    std::cout << "Ray - Line" << std::endl;
    check_compare_squared_distance_with_bound(R{p( 0, 0, 30), p(  0, 30, 30)}, L{p(100, -100, 0), p( 200,  1, 0)}, 20899.504975002);
    check_compare_squared_distance(R{p(10, 0,  0), p( 20,  0,  0)}, L{p(  0,    0, 3), p(   0,  3, 3)}, 109);
    check_compare_squared_distance(R{p( 1, 0,  0), p(  0,  0,  0)}, L{p(  1,    3, 3), p(   0,  0, 3)}, 9);
    check_compare_squared_distance(R{p( 0, 0,  0), p(  1,  0,  0)}, L{p(  0,    0, 2), p(  -1,  0, 2)}, 4);
  }

  void P_L()
  {
    std::cout << "Point - Line" << std::endl;
    check_compare_squared_distance(p(  0,  1,  2), L{p(  2,    0, 0), p(   3,  0, 0)}, 5);
    check_compare_squared_distance(p(  0,  0,  2), L{p(  0,    0, 0), p(   1,  2, 0)}, 4);
  }

  void S_L()
  {
    // Note : the values are not verified by hand
    std::cout << "Segment - Line" << std::endl;
    check_compare_squared_distance(S{p( 1, 0,  0), p(  0,  0,  0)}, L{p(  1,    3, 3), p(   0,  0, 3)}, 9);
    check_compare_squared_distance(S{p(-90, 0,  0), p(-10,  0,  0)}, L{p(  0,    0, 3), p(   0,  3, 3)}, 109);
    check_compare_squared_distance(S{p(  0, 0,  0), p(  1,  0,  0)}, L{p(  0,    0, 2), p(  -1,  0, 2)}, 4);
  }

  void L_L()
  {
    // Note : the values are not verified by hand
    std::cout << "Line - Line" << std::endl;
    check_compare_squared_distance(L{p(-10, 0,  0), p(-90,  0,  0)}, L{p(  0,    0, 3), p(   0,  3, 3)}, 9);
    check_compare_squared_distance(L{p(  1, 0,  0), p(  0,  0,  0)}, L{p(  1,    3, 3), p(   0,  0, 3)}, 9);
    check_compare_squared_distance(L{p(  0, 0,  0), p(  1,  0,  0)}, L{p(  0,    0, 2), p(  -1,  0, 2)}, 4);
  }

  void P_Pl()
  {
    std::cout << "Point - Plane" << std::endl;
    check_compare_squared_distance(p(2, 5,  3), Pl(0, 1, 0, 0), 25);
  }

  void S_Pl()
  {
    std::cout << "Segment - Plane" << std::endl;
    check_compare_squared_distance(S{p(2, -3,  3), p( 3,-7, 4)}, pl(0, 1, 0, 0), 9);
  }

  void R_Pl()
  {
    std::cout << "Ray - Plane" << std::endl;
    check_compa


// Copyright (c) "Neo4j"
// Neo4j Sweden AB [https://neo4j.com]
//
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections;
using FluentAssertions;
using Xunit;

namespace Neo4j.Driver.Tests.Types;

public class LocalTimeTests
{
    [Fact]
    public void ShouldCreateTimeWithTimeComponents()
    {
        var cypherTime = new LocalTime(13, 15, 59);

        cypherTime.ToTimeSpan().Should().Be(new TimeSpan(13, 15, 59));
    }

    [Fact]
    public void ShouldCreateTimeWithTimeSpan()
    {
        var time = new TimeSpan(0, 13, 59, 59, 255);
        var cypherTime = new LocalTime(time);

        cypherTime.ToTimeSpan().Should().Be(time);
    }

#if NET6_0_OR_GREATER
    [Fact]
    public void ShouldCreateTimeWithTimeOnly()
    {
        var time = new TimeOnly(13, 59, 59, 255);
        var cypherTime = new LocalTime(time);

        cypherTime.ToTimeOnly().Should().Be(time);
    }
#endif

    [Theory]
    [InlineData(-1)]
    [InlineData(24)]
    public void ShouldThrowOnInvalidHour(int hour)
    {
        var ex = Record.Exception(() => new LocalTime(hour, 0, 0, 0));

        ex.Should().NotBeNull().And.BeOfType<ArgumentOutOfRangeException>();
    }

    [Theory]
    [InlineData(-1)]
    [InlineData(60)]
    [InlineData(61)]
    public void ShouldThrowOnInvalidMinute(int minute)
    {
        var ex = Record.Exception(() => new LocalTime(0, minute, 0, 0));

        ex.Should().NotBeNull().And.BeOfType<ArgumentOutOfRangeException>();
    }

    [Theory]
    [InlineData(-1)]
    [InlineData(60)]
    [InlineData(61)]
    public void ShouldThrowOnInvalidSecond(int second)
    {
        var ex = Record.Exception(() => new LocalTime(0, 0, second, 0));

        ex.Should().NotBeNull().And.BeOfType<ArgumentOutOfRangeException>();
    }

    [Theory]
    [InlineData(-1)]
    [InlineData(999_999_999 + 1)]
    public void ShouldThrowOnInvalidNanosecond(int nanosecond)
    {
        var ex = Record.Exception(() => new LocalTime(0, 0, 0, nanosecond));

        ex.Should().NotBeNull().And.BeOfType<ArgumentOutOfRangeException>();
    }

    [Theory]
    [InlineData(1)]
    [InlineData(20)]
    [InlineData(99)]
    [InlineData(999000727)]
    [InlineData(999000750)]
    [InlineData(999000001)]
    public void ShouldThrowOnTruncation(int nanosecond)
    {
        var time = new LocalTime(0, 0, 0, nanosecond);
        var ex = Record.Exception(() => time.ToTimeSpan());

        ex.Should().NotBeNull().And.BeOfType<ValueTruncationException>();
    }

#if NET6_0_OR_GREATER
    [Theory]
    [InlineData(1)]
    [InlineData(20)]
    [Inline


DC.L $AA00FFFF
;			DC.L $FF00FFFF
;			DC.L $55AAFFFF
;			DC.L $00FFFFFF
;			DC.L $AAFFFFFF
;			DC.L $FFFFFFFF
;
;			dc.l $FFFFFFFF		; repeated to have 32 value ??? est ce qu'on doit metre 32 valeur ou est ce qu'il
;			dc.l 0,0,0,0						; vaut mieux pas garder 31 valeur et faire le tableau en consequence
;			BSS
;c;2phalftone	ds.l 32
;			ds.l 1

;		3 valeur 7 bit additionné table c2p : 2 texel  14bit +2bit=4 octet pour le movep
;
;		pour chaque sin:
;		un word  7+7+2 bit
;		deployé en paire impaire
		DATA
liste128colorj
	dc.b 0,0,1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29
	dc.b 29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,1,0,0
	dc.b 0,0,1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29
	dc.b 29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,1,0,0
liste128colord
	dc.b 0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15
	dc.b 16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,30,30,30,30
	dc.b 30,30,30,30,29,29,28,28,27,27,26,26,25,25,24,24,23,23,22,22,21,21,20,20,19,19,18,18,17,17,16,16
	dc.b 15,15,14,14,13,13,12,12,11,11,10,10,9,9,8,8,7,7,6,6,5,5,4,4,3,3,2,2,1,1,0,0

liste128color
	dc.b 0,0,0,0,0,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5,6,6,6,6,6,7,7,7,7,7
	dc.b 8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15
	dc.b 16,16,16,16,17,17,17,17,18,18,18,18,19,


#pragma once
#include <openvr.h>
#include <easylogging++.h>
#include "../utils/paths.h"

namespace input
{
/*!
Initializes IVRInput to point at the correct manifest. Can't be done in the
constructor body since objects being initialized require this to be set.
*/
class Manifest
{
public:
    Manifest()
    {
        const auto actionManifestPath
            = paths::binaryDirectoryFindFile( "action_manifest.json" );

        if ( !actionManifestPath.has_value() )
        {
            LOG( ERROR ) << "Could not find action manifest. Action manifests "
                            "not initialized.";
            return;
        }

        const auto validManifestPath = actionManifestPath->c_str();

        auto error = vr::VRInput()->SetActionManifestPath( validManifestPath );
        if ( error != vr::EVRInputError::VRInputError_None )
        {
            LOG( ERROR ) << "Error setting action manifest path: "
                         << validManifestPath << ". OpenVR Error: " << error;
        }
    }

    // Explicitly deleted because this object should do nothing but run the
    // constructor during initialization.
    // Destructor left blank on purpose since there are no terminating calls.
    ~Manifest() {}
    // Copy constructor
    Manifest( const Manifest& ) = delete;
    // Copy assignment
    Manifest& operator=( const Manifest& ) = delete;
    // Move constructor
    Manifest( const Manifest&& ) = delete;
    // Move assignment
    Manifest& operator=( const Manifest&& ) = delete;
};

} // namespace input


剩余的参数递归调用
	- 注意要有非可变参数版本作为停止条件，否则会无限递归
```C++
template<typename T>
ostream &print(ostream &os, const T &t)
{
    return os << t;
}

template <typename T, typename... Args>
ostream &print(ostream &os, const T &t, const Args&... rest)
{
    os << t << ", ";
    return print(os, rest...);
}
```

- 包扩展：直接展开可变参数，**对每个参数应用特定的操作**，形成一组独立的结果。
```C++
print(ostream &os, const T &t, const Args&... rest)
{
    os << t << ", ";
    return print(os, rest...);
}
```
- `...` 来展开一个可变参数（展开为一系列参数通过逗号间隔的形式）
- `debug_rep(rest)...` 相当于对每个元素调用方法，并将结果用逗号分割

- 模版特例化
- 当特例化一个函数模板时，必须为原模板中的**每个模板参数**都提供实参。
```C++
template <typename t> int compare(const t&, const t&);
//特例化
template <>
int compare(const char* const &p1, const char* const &p2)
{
    return strcmp(p1, p2);
}
```
- **完全特例化**：为某个具体的类型提供完全不同的实现。
- **部分特例化**：为一类特定的类型提供部分实现，保留部分模板参数。
```C++
template <typename T>
class Foo {
public:
    Foo(T val) : value(val) {}
    void display() { std::cout << "Generic template: " << value << std::endl; }
private:
    T value;
};

// 完全特例化版本，用于 int 类型
template <>
class Foo<int> {
public:
    Foo(int val) : value(val) {}
    void display() { std::cout << "Specialized template for int: " << value << std::endl; }
private:
    int value;
};
// 部分特例化，当两个参数类型相同时
template <typename T>
class Pair<T, T> {
public:
    Pair(T a, T b) : first(a), second(b) {}
    void display() { std::cout << "Specialized Pair: " << first << ", " << second << std::endl; }
private:
    T first;
    T second;
};
```
- 如果为某个类型提供了**非模板版本**，编译器会**优先选择非模板版本**，因为非模板函数的匹配优先级更高。---
presentation:
  width: 1024
  height: 768
  #theme: blood.css
  theme: white.css
---

<!-- slide -->
# 面向对象编程基础
本课程入选教育部产学合作协同育人项目
课程主页:h


32 = 0x4e3;

/// Trace Output Base Register (R/W)
pub const MSR_IA32_RTIT_OUTPUT_BASE: u32 = 0x560;

/// Trace Output Mask Pointers Register (R/W)
pub const MSR_IA32_RTIT_OUTPUT_MASK_PTRS: u32 = 0x561;

/// Trace Control Register (R/W)
pub const MSR_IA32_RTIT_CTL: u32 = 0x570;

/// Tracing Status Register (R/W)
pub const MSR_IA32_RTIT_STATUS: u32 = 0x571;

/// Trace Filter CR3 Match Register (R/W)
pub const MSR_IA32_CR3_MATCH: u32 = 0x572;

/// Trace Start Address 0
pub const MSR_IA32_ADDR0_START: u32 = 0x580;

/// Trace End Address 0
pub const MSR_IA32_ADDR0_END: u32 = 0x581;

/// Trace Start Address 1
pub const MSR_IA32_ADDR1_START: u32 = 0x582;

/// Trace End Address 1
pub const MSR_IA32_ADDR1_END: u32 = 0x583;

/// Trace Start Address 3
pub const MSR_IA32_ADDR2_START: u32 = 0x584;

/// Trace End Address 3
pub const MSR_IA32_ADDR2_END: u32 = 0x585;

/// Trace Start Address 4
pub const MSR_IA32_ADDR3_START: u32 = 0x586;

/// Trace End Address 4
pub const MSR_IA32_ADDR3_END: u32 = 0x587;

/// DS Save Area (R/W) See Table 35-2. Points to the DS buffer management area, which is used to manage the  BTS and PEBS buffers. See Section 18.12.4, Debug Store (DS)  Mechanism.
pub const IA32_DS_AREA: u32 = 0x600;

/// Unit Multipliers used in RAPL Interfaces (R/O)  See Section 14.7.1, RAPL Interfaces.
pub const MSR_RAPL_POWER_UNIT: u32 = 0x606;

/// Package C3 Interrupt Response Limit (R/W)  Note: C-state values are processor specific C-state code names,  unrelated to MWAIT extension C-state parameters or ACPI C- States.
pub const MSR_PKGC3_IRTL: u32 = 0x60a;

/// Package C6 Interrupt Response Limit (R/W)  This MSR defines the budget allocated for the package to exit from  C6 to a C0 state, where interrupt request can be delivered to the  core and serviced. Additional core-exit latency amy be applicable  depending on the actual C-state the core is in.  Note: C-state values are processor specific C-state code names,  unrelated to MWAIT extension C-state parameters or ACPI C- States.
pub const MSR_PKGC6_IRTL: u32 = 0x60b;

/// Package C7 Interrupt Response Limit (R/W)  This MSR defines the budget allocated for the package to exit from  C7 to a C0 state, where interrupt request can be delivered to the  core and serviced. Additional core-exit latency amy be applicable  depending on the actual C-state the core is in.  Note: C-state values are processor specific C-state code names,  unrelated to MWAIT extension C-state parameters or ACPI C-States.
pub const MSR_PKGC7_IRTL: u32 = 0x60c;

/// PKG RAPL Power Limit Control (R/W)  See Section 14.7.3, Package RAPL Domain.
pub const MSR_PKG_POWER_L


http3")]
                {
                    // TODO: find better way to discover http3.
                    if let Ok(conn) = self.make_h3(connect, timer).await {
                        return Ok(conn);
                    }
                    // Fallback to tcp if http3 failed.
                }

                self.make_tls(connect, timer, max_version).await
            }
            #[cfg(unix)]
            Uri::Unix(uri) => self.make_unix(uri, timer).await,
        }
    }

    async fn make_tcp(&self, connect: &mut Connect<'_>, timer: &mut Pin<Box<Sleep>>) -> Result<TcpStream, Error> {
        timer
            .as_mut()
            .reset(Instant::now() + self.timeout_config.connect_timeout);

        let stream = self
            .make_tcp_inner(connect)
            .timeout(timer.as_mut())
            .await
            .map_err(|_| TimeoutError::Connect)??;

        Ok(stream)
    }

    async fn make_tcp_inner(&self, connect: &mut Connect<'_>) -> Result<TcpStream, Error> {
        let mut iter = connect.addrs();

        let mut addr = iter.next().ok_or(Error::Resolve)?;

        // try to connect with all addresses resolved by dns resolver.
        // return the last error when all are fail to be connected.
        loop {
            match self.maybe_connect_with_local_addr(addr).await {
                Ok(stream) => return Ok(stream),
                Err(e) => match iter.next() {
                    Some(a) => addr = a,
                    None => return Err(e),
                },
            }
        }
    }

    async fn maybe_connect_with_local_addr(&self, addr: SocketAddr) -> Result<TcpStream, Error> {
        match self.local_addr {
            Some(local_addr) => {
                let socket = match local_addr {
                    SocketAddr::V4(_) => {
                        let socket = TcpSocket::new_v4()?;
                        socket.bind(local_addr)?;
                        socket
                    }
                    SocketAddr::V6(_) => {
                        let socket = TcpSocket::new_v6()?;
                        socket.bind(local_addr)?;
                        socket
                    }
                };

                socket.connect(addr).await.map_err(Into::into)
            }
            None => TcpStream::connect(addr).await.map_err(Into::into),
        }
    }

    async fn make_tls(
        &self,
        connect: &mut Connect<'_>,
        timer: &mut Pin<Box<Sleep>>,
        max_version: Version,
    ) -> Result<Connection, Error> {
        let stream = self.make_tcp(connect, timer).await?;

        timer
            .as_mut()
            .reset(Instant::now() + self.timeout_config.tls_connect_timeout);

        let (stream, version) = self
            .connector
            .connect(stream, connect.hostname())
            .timeout(timer.as_mut())
            .await
            .map_err(|_| TimeoutError::TlsHandshake)??;

        let version = match (version, max_version) {
            (Version::HTTP_3, Version::HTTP_2 | Version::HTTP_11 | Version::HTTP_10 | Version::HTTP_09) => max_version,
            (Version::HTTP_2, Version::HTTP_11 | Version::HTTP_10 | Version::HTTP_09) => max_version,
            (Version::HTTP_11, Version::HTTP_10 | Version::HTTP_09) => max_version,
            (Version::HTTP_10, Version::HTTP_09) => max_version,
            _ => version,
        };

        match ve


c - Oscillator Control"]
    pub octrl: OCTRL,
    #[doc = "0x10 - CLKOUT Frequency Select"]
    pub clkout: CLKOUT,
    #[doc = "0x14 - Key Register for Clock Control Register"]
    pub clkkey: CLKKEY,
    #[doc = "0x18 - HFRC Clock Control"]
    pub cctrl: CCTRL,
    #[doc = "0x1c - Clock Generator Status"]
    pub status: STATUS,
    #[doc = "0x20 - HFRC Adjustment"]
    pub hfadj: HFADJ,
    _reserved9: [u8; 4usize],
    #[doc = "0x28 - Clock Enable Status"]
    pub clockenstat: CLOCKENSTAT,
    #[doc = "0x2c - Clock Enable Status"]
    pub clocken2stat: CLOCKEN2STAT,
    #[doc = "0x30 - Clock Enable Status"]
    pub clocken3stat: CLOCKEN3STAT,
    #[doc = "0x34 - HFRC Frequency Control register"]
    pub freqctrl: FREQCTRL,
    _reserved13: [u8; 4usize],
    #[doc = "0x3c - BLE BUCK TON ADJUST"]
    pub blebucktonadj: BLEBUCKTONADJ,
    _reserved14: [u8; 192usize],
    #[doc = "0x100 - CLKGEN Interrupt Register: Enable"]
    pub intrpten: INTRPTEN,
    #[doc = "0x104 - CLKGEN Interrupt Register: Status"]
    pub intrptstat: INTRPTSTAT,
    #[doc = "0x108 - CLKGEN Interrupt Register: Clear"]
    pub intrptclr: INTRPTCLR,
    #[doc = "0x10c - CLKGEN Interrupt Register: Set"]
    pub intrptset: INTRPTSET,
}
#[doc = "XT Oscillator Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [calxt](calxt) module"]
pub type CALXT = crate::Reg<u32, _CALXT>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _CALXT;
#[doc = "`read()` method returns [calxt::R](calxt::R) reader structure"]
impl crate::Readable for CALXT {}
#[doc = "`write(|w| ..)` method takes [calxt::W](calxt::W) writer structure"]
impl crate::Writable for CALXT {}
#[doc = "XT Oscillator Control"]
pub mod calxt;
#[doc = "RC Oscillator Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [calrc](calrc) module"]
pub type CALRC = crate::Reg<u32, _CALRC>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _CALRC;
#[doc = "`read()` method returns [calrc::R](calrc::R) reader structure"]
impl crate::Readable for CALRC {}
#[doc = "`write(|w| ..)` method takes [calrc::W](calrc::W) writer structure"]
impl crate::Writable for CALRC {}
#[doc = "RC Oscillator Control"]
pub mod calrc;
#[doc = "Autocalibration Counter\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::


",
		[1476] = "哈金·穆達爾",
		[5108] = "萊納·火錘",
		[5140] = "埃德瑞斯·麥鬚",
		[5172] = "布瑞爾索恩",
		[5204] = "藥劑師金格",
		[5236] = "戈杜尼薩滿",
		[5268] = "鐵鬃熊",
		[5300] = "亂羽角鷹獸",
		[10663] = "法力利爪",
		[5364] = "北泉殺戮者",
		[5396] = "潘迪加斯上尉",
		[5428] = "大鵬",
		[5460] = "森提帕爾沙奪者",
		[5492] = "純潔的凱薩琳",
		[11047] = "克瑞",
		[4359] = "沼鰭魚人",
		[14398] = "艾德雷斯精龍",
		[5620] = "調酒師溫塔爾",
		[5652] = "幽暗城練習假人",
		[4637] = "科卡爾摧毀者",
		[5716] = "祖羅爾",
		[5748] = "基利恩·薩納森",
		[11559] = "瑪格拉姆死靈法師",
		[5812] = "圖米",
		[11687] = "鬼魅掠奪者",
		[11751] = "瑞蘭·霍華德",
		[5908] = "蠻兵多格蘭",
		[5940] = "哈恩·長線",
		[11943] = "瑪卡爾",
		[6004] = "影誓祭儀師",
		[10316] = "黑手監禁者",
		[6068] = "瓦魯格的保鏢",
		[12199] = "珀月的陰影",
		[12263] = "屠宰房保衛者",
		[1061] = "甘祖拉恩",
		[6196] = "惡鞭部屬",
		[6228] = "黑鐵大使",
		[4499] = "羅卡里姆",
		[6292] = "艾拉迪爾",
		[5499] = "莉琳希亞·夜風",
		[6499] = "鐵皮魔暴龍",
		[6527] = "焦油蠕行者",
		[9499] = "普拉格·史帕齊林",
		[12903] = "碎木崗哨守衛",
		[11137] = "塞安得爾",
		[6516] = "安戈洛大猩猩",
		[6548] = "[Deprecated for 4.x]魔導師提爾斯",
		[13159] = "詹姆士·克拉克",
		[5932] = "監工維普弗恩",
		[2932] = "馬格雷甘·深影",
		[14508] = "小個子約翰·米斯瑞�


etic_analysis_order_by_seller_exist(
				account_id,
			) {
			return Err(Error::<T>::GeneticAnalystHasPendingOrders)
		}

		let mut genetic_analyst = genetic_analyst.unwrap();
		genetic_analyst.availability_status = status.clone();

		GeneticAnalysts::<T>::insert(account_id, &genetic_analyst);

		Ok(genetic_analyst)
	}

	fn stake_genetic_analyst(
		account_id: &T::AccountId,
	) -> Result<Self::GeneticAnalyst, Self::Error> {
		let genetic_analyst = GeneticAnalysts::<T>::get(account_id);
		if genetic_analyst == None {
			return Err(Error::<T>::GeneticAnalystDoesNotExist)
		}

		let mut genetic_analyst = genetic_analyst.unwrap();
		if genetic_analyst.stake_status.is_staked() {
			return Err(Error::<T>::GeneticAnalystAlreadyStaked)
		}

		if !genetic_analyst.stake_status.is_waiting_for_unstaked() {
			if !Self::is_balance_sufficient_for_staking(account_id) {
				return Err(Error::<T>::InsufficientFunds)
			}

			genetic_analyst.stake_amount = Self::transfer_balance(
				account_id,
				&Self::account_id(),
				Self::get_required_stake_balance(),
			);
		}
		genetic_analyst.stake_status = StakeStatus::Staked;
		genetic_analyst.unstake_at = MomentOf::<T>::default();
		genetic_analyst.retrieve_unstake_at = MomentOf::<T>::default();

		GeneticAnalysts::<T>::insert(account_id, &genetic_analyst);

		Ok(genetic_analyst)
	}

	fn unstake_genetic_analyst(
		account_id: &T::AccountId,
	) -> Result<Self::GeneticAnalyst, Self::Error> {
		let genetic_analyst = GeneticAnalysts::<T>::get(account_id);
		if genetic_analyst == None {
			return Err(Error::<T>::GeneticAnalystDoesNotExist)
		}

		let mut genetic_analyst = genetic_analyst.unwrap();
		if !genetic_analyst.stake_status.is_staked() {
			return Err(Error::<T>::GeneticAnalystIsNotStaked)
		}

		if T::GeneticAnalysisOrders::is_pending_genetic_analysis_order_by_seller_exist(account_id) {
			return Err(Error::<T>::GeneticAnalystHasPendingOrders)
		}

		let now = pallet_timestamp::Pallet::<T>::get();
		genetic_analyst.stake_status = StakeStatus::WaitingForUnstaked;
		genetic_analyst.availability_status = AvailabilityStatus::Unavailable;
		genetic_analyst.unstake_at = now;
		genetic_analyst.retrieve_unstake_at = Self::get_unstake_time(now);

		GeneticAnalysts::<T>::insert(account_id, &genetic_analyst);

		Ok(genetic_analyst)
	}

	fn retrieve_unstake_amount(
		admin_key: &T::AccountId,
		account_id: &T::AccountId,
	) -> Result<Self::GeneticAnalyst, Self::Error> {
		if admin_key.clone() != GeneticAnalystVerifierKey::<T>::get() {
			return Err(Error::<T>::Unauthorized)
		}

		let genetic_analyst = GeneticAnalysts::<T>::get(account_id);
		if genetic_analyst == None {
			return Err(Error::<T>::GeneticAnalystDoesNotExist)
		}

		let mut genetic_anal


    /// Constructs a  Script instance by parsing a byte buffer representing a script.
    ///
    /// *NOTE:* Same constructor as [fromByteArray]. Different name.
    SVScript.fromBuffer(List<int> buffer) {
        _processBuffer(buffer);
    }

    /// Default constructor. Processing in this constructor is used by subclasses to bootstrap their internals.
    SVScript() { }

    /// This constructor is *only* used by the Script Interpreter test vectors at the moment.
    /// Bitcoind test vectors are rather special snowflakes so we made a special constructor just for them.
    SVScript.fromBitcoindString(String str) {
      _chunks = _stringToChunks(str);
        // _processBuffer(bw.toBytes());
    }

    // SVScript.fromBitcoindString(String str){
    //
    //   var bw = ByteDataWriter();
    //   var tokens = str.split(' ');
    //   for (var i = 0; i < tokens.length; i++) {
    //     var token = tokens[i];
    //     if (token == '') {
    //       continue;
    //     }
    //
    //     var opstr;
    //     int opcodenum;
    //     var tbuf;
    //     if (token.startsWith('0x')) {
    //       var hex = token.substring(2).replaceAll(',', '');
    //       bw.write(HEX.decode(hex));
    //     } else if (token[0] == '\'') {
    //       String tstr = token.substring(1, token.length - 1);
    //       tbuf = SVScript()
    //           .add(utf8.encode(tstr))
    //           .buffer;
    //       bw.write(tbuf);
    //     } else if (OpCodes.opcodeMap.containsKey("OP_${token.toUpperCase()}")) {
    //       opstr = 'OP_' + token;
    //       opcodenum = OpCodes.opcodeMap[opstr]!;
    //       bw.writeUint8(opcodenum);
    //     } else if (OpCodes.opcodeMap[token] is num) {
    //       opstr = token;
    //       opcodenum = OpCodes.opcodeMap[opstr]!;
    //       bw.writeUint8(opcodenum);
    //     } else if (BigInt.tryParse(token) != null) {
    //       var script = SVScript()
    //         ..add(Uint8List.fromList(castToBuffer(BigInt.parse(token))));
    //       tbuf = script.buffer;
    //       bw.write(tbuf);
    //     } else {
    //       throw  ScriptException(ScriptError.SCRIPT_ERR_UNKNOWN_ERROR, 'Could not determine type of script value');
    //     }
    //   }
    //
    //   _processBuffer(bw.toBytes());
    // }

    SVScript.fromASM(String str) {
      var script = new SVScript();
      _chunks = [];

      var tokens = str.split(' ');
      for (var i = 0; i < tokens.length; i++) {
        var token = tokens[i];
      var opcode = OpCodes.opcodeMap[token];
      var opcodenum = opcode;

      // we start with two special cases, 0 and -1, which are handled specially in
      // toASM. see _chunkToString.
      if (token == '0') {
        opcodenum = 0;
        _chunks.add(ScriptChunk(null, 0, opcodenum));
      } else if (token == '-1') {
        opcodenum = OpCodes.OP_1NEGATE;
        _chunks.add(ScriptChunk(null, 0, opcodenum));
      } else if (opcodenum == null) {
//          var buf = Buffer.from(tokens[i], 'hex')
        var buf = HEX.decode(tokens[i]);
        if (HEX.encode(buf) != tokens[i]) {
          throw ScriptException(Scr


v3, out _v4);

                _v1 = Round(_v1, _queue1);
                _v2 = Round(_v2, _queue2);
                _v3 = Round(_v3, _queue3);
                _v4 = Round(_v4, val);
            }
        }

        public int ToHashCode()
        {
            // Storing the value of _length locally shaves of quite a few bytes
            // in the resulting machine code.
            uint length = _length;

            // position refers to the *next* queue position in this method, so
            // position == 1 means that _queue1 is populated; _queue2 would have
            // been populated on the next call to Add.
            uint position = length % 4;

            // If the length is less than 4, _v1 to _v4 don't contain anything
            // yet. xxHash32 treats this differently.

            uint hash = length < 4 ? MixEmptyState() : MixState(_v1, _v2, _v3, _v4);

            // _length is incremented once per Add(Int32) and is therefore 4
            // times too small (xxHash length is in bytes, not ints).

            hash += length * 4;

            // Mix what remains in the queue

            // Switch can't be inlined right now, so use as few branches as
            // possible by manually excluding impossible scenarios (position > 1
            // is always false if position is not > 0).
            if (position > 0)
            {
                hash = QueueRound(hash, _queue1);
                if (position > 1)
                {
                    hash = QueueRound(hash, _queue2);
                    if (position > 2)


#ifndef CARYLL_INCLUDE_TABLE_CFF_H
#define CARYLL_INCLUDE_TABLE_CFF_H

#include "table-common.h"
#include "head.h"
#include "glyf.h"

typedef struct {
	scale_t a;
	scale_t b;
	scale_t c;
	scale_t d;
	VQ x;
	VQ y;
} cff_FontMatrix;

typedef struct {
	arity_t blueValuesCount;
	OWNING double *blueValues;
	arity_t otherBluesCount;
	OWNING double *otherBlues;
	arity_t familyBluesCount;
	OWNING double *familyBlues;
	arity_t familyOtherBluesCount;
	OWNING double *familyOtherBlues;
	double blueScale;
	double blueShift;
	double blueFuzz;
	double stdHW;
	double stdVW;
	arity_t stemSnapHCount;
	OWNING double *stemSnapH;
	arity_t stemSnapVCount;
	OWNING double *stemSnapV;
	bool forceBold;
	uint32_t languageGroup;
	double expansionFactor;
	double initialRandomSeed;
	double defaultWidthX;
	double nominalWidthX;
} cff_PrivateDict;

typedef struct _table_CFF table_CFF;

struct _table_CFF {
	// Name
	sds fontName;

	// General properties
	bool isCID;
	sds version;
	sds notice;
	sds copyright;
	sds fullName;
	sds familyName;
	sds weight;
	bool isFixedPitch;
	double italicAngle;
	double underlinePosition;
	double underlineThickness;
	double fontBBoxTop;
	double fontBBoxBottom;
	double fontBBoxLeft;
	double fontBBoxRight;
	double strokeWidth;
	OWNING cff_PrivateDict *privateDict;
	OWNING cff_FontMatrix *fontMatrix;

	// CID-only operators
	sds cidRegistry;
	sds cidOrdering;
	uint32_t cidSupplement;
	double cidFontVersion;
	double cidFontRevision;
	uint32_t cidCount;
	uint32_t UIDBase;
	// CID FDArray
	tableid_t fdArrayCount;
	OWNING table_CFF **fdArray;
};

extern caryll_RefElementInterface(table_CFF) table_iCFF;

// CFF and glyf
typedef struct {
	OWNING table_CFF *meta;
	OWNING table_glyf *glyphs;
} table_CFFAndGlyf;

#endif


   enabled: enabled ?? this.enabled,
      coinName: coinName ?? this.coinName,
      isFailover: isFailover ?? this.isFailover,
      isDown: isDown ?? this.isDown,
      trusted: trusted,
      torEnabled: torEnabled ?? this.torEnabled,
      clearnetEnabled: clearnetEnabled ?? this.clearnetEnabled,
      forceNoTor: forceNoTor ?? this.forceNoTor,
      isPrimary: isPrimary ?? this.isPrimary,
    );
  }

  /// convenience getter to retrieve login password
  Future<String?> getPassword(SecureStorageInterface secureStorage) async {
    return await secureStorage.read(key: "${id}_nodePW");
  }

  Map<String, dynamic> toMap() {
    final Map<String, dynamic> map = {};
    map['host'] = host;
    map['port'] = port;
    map['name'] = name;
    map['id'] = id;
    map['useSSL'] = useSSL;
    map['loginName'] = loginName;
    map['enabled'] = enabled;
    map['coinName'] = coinName;
    map['isFailover'] = isFailover;
    map['isDown'] = isDown;
    map['trusted'] = trusted;
    map['torEnabled'] = torEnabled;
    map['clearEnabled'] = clearnetEnabled;
    map['forceNoTor'] = forceNoTor;
    map['isPrimary'] = isPrimary;
    return map;
  }

  bool get isDefault => id.startsWith(DefaultNodes.defaultNodeIdPrefix);

  @override
  String toString() {
    return toMap().toString();
  }
}
/*
 * This file is part of Stack Wallet.
 *
 * Copyright (c) 2023 Cypher Stack
 * All Rights Reserved.
 * The code is distributed under GPLv3 license, see LICENSE file for details.
 * Generated by Cypher Stack on 2023-05-26
 *
 */

import 'package:hive/hive.dart';

part 'type_adaptors/epicbox_server_model.g.dart';

// @HiveType(typeId: 71)
class EpicBoxServerModel {
  // @HiveField(0)
  final String id;
  // @HiveField(1)
  final String host;
  // @HiveField(2)
  final int? port;
  // @HiveField(3)
  final String name;
  // @HiveField(4)
  final bool? useSSL;
  // @HiveField(5)
  final bool? enabled;
  // @HiveField(6)
  final bool? isFailover;
  // @HiveField(7)
  final bool? isDown;

  EpicBoxServerModel({
    required this.id,
    required this.host,
    this.port,
    required this.name,
    this.useSSL,
    this.enabled,
    this.isFailover,
    this.isDown,
  });

  EpicBoxServerModel copyWith({
    String? host,
    int? port,
    String? name,
    bool? useSSL,
    bool? enabled,
    bool? isFailover,
    bool? isDown,
  }) {
    return EpicBoxServerModel(
      id: id,
      host: host ?? this.host,
      port: port ?? this.port,
      name: name ?? this.name,
      useSSL: useSSL ?? this.useSSL,
      enabled: enabled ?? this.enabled,
      isFailover: isFailover ?? this.isFailover,
      isDown: isDown ?? this.isDown,
    );
  }

  Map<String, dynamic> toMap() {
    final Map<String, dynamic> map = {};
    map['id'] = id;
    map['host'] = host;
    map['port'] = port;
    map['name'] = name;
    map['useSSL'] = useSSL;
    map['enabled'] = enabled;
    map['isFailover'] = isFail


4 .req r11

   ###########################################################
   # for (size_t i = 0; i < 256; i += 16)
   ###########################################################
   mov i, #256
   Loop256_CompVOrbBrief256_31_32f_Asm_NEON64\@:
       .set xy, 0
       .rept 2
           .if xy == 0
               ldp q12, q13, [kBrief256Pattern31AX], #32
               ldp q14, q15, [kBrief256Pattern31AX], #32
           .else
               ldp q12, q13, [kBrief256Pattern31BX], #32
               ldp q14, q15, [kBrief256Pattern31BX], #32
           .endif
           fmul v4.4s, v12.4s, vecCosT.s[0]
           fmul v5.4s, v13.4s, vecCosT.s[0]
           fmul v6.4s, v14.4s, vecCosT.s[0]
           fmul v7.4s, v15.4s, vecCosT.s[0]
           fmul v8.4s, v12.4s, vecSinT.s[0]
           fmul v9.4s, v13.4s, vecSinT.s[0]
           fmul v10.4s, v14.4s, vecSinT.s[0]
           fmul v11.4s, v15.4s, vecSinT.s[0]
           .if xy == 0
               ldp q12, q13, [kBrief256Pattern31AY], #32
               ldp q14, q15, [kBrief256Pattern31AY], #32
           .else
               ldp q12, q13, [kBrief256Pattern31BY], #32
               ldp q14, q15, [kBrief256Pattern31BY], #32
           .endif
           .if \fusedMultiplyAdd
                fmls v4.4s, v12.4s, vecSinT.s[0]
                fmls v5.4s, v13.4s, vecSinT.s[0]
                fmls v6.4s, v14.4s, vecSinT.s[0]
                fmls v7.4s, v15.4s, vecSinT.s[0]
                fmla v8.4s, v12.4s, vecCosT.s[0]
                fmla v9.4s, v13.4s, vecCosT.s[0]
                fmla v10.4s, v14.4s, vecCosT.s[0]
                fmla v11.4s, v15.4s, vecCosT.s[0]
            .else
                fmul v16.4s, v12.4s, vecSinT.s[0]
                fmul v17.4s, v13.4s, vecSinT.s[0]
                fmul v18.4s, v14.4s, vecSinT.s[0]
                fmul v19.4s, v15.4s, vecSinT.s[0]
                fmul v20.4s, v12.4s, vecCosT.s[0]
                fmul v21.4s, v13.4s, vecCosT.s[0]
                fmul v22.4s, v14.4s, vecCosT.s[0]
                fmul v23.4s, v15.4s, vecCosT.s[0]
                fsub v4.4s, v4.4s, v16.4s
                fsub v5.4s, v5.4s, v17.4s
                fsub v6.4s, v6.4s, v18.4s
                fsub v7.4s, v7.4s, v19.4s
                fadd v8.4s, v8.4s, v20.4s
                fadd v9.4s, v9.4s, v21.4s
                fadd v10.4s, v10.4s, v22.4s
                fadd v11.4s, v11.4s, v23.4s
           .endif
           fcvtas v


/***************************************************************************
                               ucl_nv_kernel.h
                             -------------------
                               W. Michael Brown

  Preprocessor macros for OpenCL/CUDA compatibility

 __________________________________________________________________________
    This file is part of the Geryon Unified Coprocessor Library (UCL)
 __________________________________________________________________________

    begin                : Mon May 3 2010
    copyright            : (C) 2010 by W. Michael Brown
    email                : brownw@ornl.gov
 ***************************************************************************/

/* -----------------------------------------------------------------------
   Copyright (2010) Sandia Corporation.  Under the terms of Contract
   DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
   certain rights in this software.  This software is distributed under
   the Simplified BSD License.
   ----------------------------------------------------------------------- */

// Only allow this file to be included by CUDA and OpenCL specific headers
#ifndef UCL_NV_KERNEL_H
#define UCL_NV_KERNEL_H

#if (__CUDA_ARCH__ < 200)
#define mul24 __mul24
#define MEM_THREADS 16
#else
#define mul24(X,Y) (X)*(Y)
#define MEM_THREADS 32
#endif

#ifdef CUDA_PRE_THREE
struct __builtin_align__(16) _double4
{
  double x, y, z, w;
};
typedef struct _double4 double4;
#endif

#define GLOBAL_ID_X threadIdx.x+mul24(blockIdx.x,blockDim.x)
#define GLOBAL_ID_Y threadIdx.y+mul24(blockIdx.y,blockDim.y)
#define GLOBAL_SIZE_X mul24(gridDim.x,blockDim.x);
#define GLOBAL_SIZE_Y mul24(gridDim.y,blockDim.y);
#define THREAD_ID_X threadIdx.x
#define THREAD_ID_Y threadIdx.y
#define BLOCK_ID_X blockIdx.x
#define BLOCK_ID_Y blockIdx.y
#define BLOCK_SIZE_X blockDim.x
#define BLOCK_SIZE_Y blockDim.y
#define __kernel extern "C" __global__
#define __local __shared__
#define __global
#define atom_add atomicAdd
#define ucl_inline static __inline__ __device__

#endif


STATEMENTS, XMLElements.CONSTANTS_CATEGORIES, XMLElements.CONSTANTS,
			XMLElements.INSIDE_STAT_KINDS, XMLElements.INSIDE_STAT_SYMBOLS, XMLElements.STATEMENT_KINDS,
			XMLElements.TYPES, XMLElements.FILES };
	// among tebEltXML, categories do not need to have an additional projectName
	// attribute
//	private static String[] tabCategoriesEltXML = { XMLElements.OPERATORS_CATEGORIES, XMLElements.CONSTANTS_CATEGORIES,
//			XMLElements.INSIDE_STAT_KINDS, XMLElements.INSIDE_STAT_SYMBOLS, XMLElements.STATEMENT_KINDS,
//			XMLElements.CONCEPT_LIST };

	/**
	 * Unify.
	 *
	 * @param local the local
	 */
	public static void unify(boolean local) {
		try {

			WorkspaceManager ws = new WorkspaceManager(".",local);
			HashMap<String, File> hmFiles = ws.getProductDocFiles();

			Document doc = mergeFiles(hmFiles);

			System.out.println("" + hmFiles);

			XMLOutputter sortie = new XMLOutputter(Format.getPrettyFormat());
			sortie.output(doc, Files.newOutputStream(new File(Constants.DOCGAMA_GLOBAL_FILE).toPath()));
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	/**
	 * Unify all projects.
	 *
	 * @param local the local
	 */
	public static void unifyAllProjects(boolean local) {
		try {

			WorkspaceManager ws = new WorkspaceManager(".", local);
	 		HashMap<String, File> hmFiles = local ? ws.getAllDocFilesLocal() : ws.getAllDocFiles();

			Document doc = mergeFiles(hmFiles);

			System.out.println("" + hmFiles);

			XMLOutputter sortie = new XMLOutputter(Format.getPrettyFormat());
			sortie.output(doc, Files.newOutputStream(new File(Constants.DOCGAMA_GLOBAL_FILE).toPath()));
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	/**
	 * Merge files.
	 *
	 * @param hmFilesPackages the hm files packages
	 * @return the document
	 */
	private static Document mergeFiles(final HashMap<String, File> hmFilesPackages) {
		try {

			SAXBuilder builder = new SAXBuilder();
			Document doc = null;

			doc = new Document(new Element(XMLElements.DOC));
			for (String elt : tabEltXML) {
				doc.getRootElement().addContent(new Element(elt));
			}

			for (Entry<String, File> fileDoc : hmFilesPackages.entrySet()) {
				Document docTemp = builder.build(fileDoc.getValue());

				for (String catXML : tabEltXML) {
					if (docTemp.getRootElement().getChild(catXML) != null) {

						List<Element> existingElt = doc.getRootElement().getChild(catXML).getChildren();

						for (Element e : docTemp.getRootElement().getChild(catXML).getChildren()) {
							// Do not add the projectName for every kinds of
							// categories
					//		if (!Arrays.asList(tabCategoriesEltXML).contains(catXML)) {
								e.setAttribute("projectName", fileDoc.getKey());
					//		}

							// Test whether the element is already in the merged
							// doc
							boolean found = false;
							for (Element exElt : existingElt) {
								boolean equals = exElt.getName().equals(e.getName());
								for (Attribute att : exElt.getAttributes()) {
									String valueExElt = exElt.getAttribute(att.getName()) != null
											? exElt.getAttributeValue(att.getName()) : "";
									String valueE = e.getAttribute(att.getName()) != null
											? e.getAttributeValue(att.getName()) : "";


SubTotal = 0;
  BalanceDue = 0;
  Discount = 0;

  ngOnInit(): void {

    this.api.getCategories().subscribe((data: ProductCategoryData[]) => {
      this.CategoryList = data
    }

    );

    //this retrieves and populates the Table with the items
    this.api.getCartItems().subscribe(data => {
      this.CartItems = data;
      this.CalculateTotals(); //calculate totals is a method called everytime the Cart updates, in order to recalculate the price
    })

    let count = this.CategoryList.length

    //counter is used to determine how to adjust rowHeight based on the CategoryList, one can be re-created for itemList
    switch (true) {
      case (count <= 4):
        this.rowHeight = "2:1";
        break;
      case (count > 4 && count < 7):
        this.rowHeight = "4:1.5";
        break;
      case (count >= 7):
        this.rowHeight = "4:1";
        break
    }
  }

  //not functional at the moment
  EnterBarcode() {
    const dialogConfig = new MatDialogConfig();

    dialogConfig.width = '500px';
    dialogConfig.disableClose = true;
    dialogConfig.autoFocus = true;

    const dialogRef = this.dialog.open(BarcodeDialog, dialogConfig);
  }

  CalculateTotals() {
    this.TotalVAT = 0;
    this.SubTotal = 0;
    this.BalanceDue = 0;
    this.Discount = 0;

    if (this.CartItems.length > 0) {

      this.CartItems.forEach(zz => {
        this.SubTotal += zz._Product_Size?.Price * zz.Quantity;
        this.TotalVAT += zz._Product_Size?.Price * (this.VAT / 100)
      })

      this.BalanceDue = this.SubTotal + this.TotalVAT - this.Discount;
    }
    else {
      this.TotalVAT = 0;
      this.SubTotal = 0;
      this.BalanceDue = 0;
      this.Discount = 0;
    }
  }

  //assigns the different colors per new Category
  getButtonColor(index: number) {
    let colours: string[] = this.Colors
    return colours[index]
  }

  AddCategory() {
    alert("hello friend")
  }

  AddItem() {

  }

  //when selecting a category this code helps change the view to items
  CategorySelected = false;
  SelectCategory(CategoryID: any) {
    this.api.getItems(CategoryID).subscribe((data: ProductSizeData[]) => {
      this.ItemList = data;

      if (this.ItemList) {
        this.CategorySelected = true;
      }
      else {
        this.CategorySelected = true;
        alert("There are no products under this category. Click the '+' button to add a new Product")
      }
    }
    )

  }

  //just a back button
  Back()
  {
    this.CategorySelected = false;
  }

  CancelSale() {
    this.api.CancelSale().subscribe(zz => {
      this.CartItems = [];
      this.CalculateTotals();
    });
  }

  IncreaseQuantity(PS_ID: any, QuantityOnHand: any, Quantity: any) {
    if (Quantity > QuantityOnHand) {
      alert("Can't select more items than in stock.")
    }
    else {
      this.api.IncreaseQuantity(PS_ID).subscribe(zz => {
        this.api.getCartItems().subscribe(data => {
          this.CartItems = data;
          this.CalculateTotals();
        })
      });

    }
  }

  DecreaseQuantity(PS_ID: any) {
    this.api.DecreaseQuantity(PS_ID).subscribe(zz => {
      t


   string
		ledger bool
		want   string
	}

	testCases := []testCase{
		{
			name:   "ledger support enabled",
			ledger: true,
			want:   "Error: failed to generate ledger key: failed to retrieve device: ledger nano S: LedgerHID device (idx 0) not found: device may be locked or in use by another application\n",
		},
		{
			name:   "ledger support disabled",
			ledger: false,
			want:   "Error: failed to generate ledger key: failed to retrieve device: ledger nano S: support for ledger devices is not available in this executable\n",
		},
	}

	for _, tc := range testCases {
		t.Run(tc.name, func(t *testing.T) {
			var cmd *exec.Cmd
			if tc.ledger {
				// Generate the binary with Ledger support
				cmd = exec.Command("go", "build", "-tags", "ledger", "-o", "celestia-appd", "../../cmd/celestia-appd")
			} else {
				// Generate the binary without Ledger support
				cmd = exec.Command("go", "build", "-o", "celestia-appd", "../../cmd/celestia-appd")
			}
			err := cmd.Run()
			require.NoError(t, err)

			// Clean up the binary
			defer os.Remove("celestia-appd")

			// Run the binary
			cmd = exec.Command("./celestia-appd", "keys", "add", "test-key-name", "--ledger")
			var out bytes.Buffer
			cmd.Stderr = &out
			err = cmd.Run()
			require.Error(t, err)
			assert.Equal(t, tc.want, out.String())
		})
	}
}
package malicious

import (
	"io"

	"cosmossdk.io/log"
	"github.com/celestiaorg/celestia-app/v6/app"
	abci "github.com/cometbft/cometbft/abci/types"
	dbm "github.com/cosmos/cosmos-db"
	"github.com/cosmos/cosmos-sdk/baseapp"
	servertypes "github.com/cosmos/cosmos-sdk/server/types"
)

const (
	// BehaviorConfigKey is the key used to set the malicious config.
	BehaviorConfigKey = "behavior_config"

	// OutOfOrderHandlerKey is the key used to set the out of order prepare
	// proposal handler.
	OutOfOrderHandlerKey = "out_of_order"
)

// BehaviorConfig defines the malicious behavior for the application. It
// dictates the height at which the malicious behavior will start along with
// what type of malicious behavior will be performed.
type BehaviorConfig struct {
	// HandlerName is the name of the malicious handler to use. All known
	// handlers are defined in the PrepareProposalHandlerMap.
	HandlerName string `json:"handler_name"`
	// StartHeight is the height at which the malicious behavior will start.
	StartHeight int64 `json:"start_height"`
}

type PrepareProposalHandler func(req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error)

// PrepareProposalHandlerMap is a map of all the known prepare proposal handlers.
func (a *App) PrepareProposalHandlerMap() map[string]PrepareProposalHandler {
	return map[string]PrepareProposalHandler{
		OutOfOrderHandlerKey: a.OutOfOrderPrepareProposal,
	}
}

type App struct {
	*app.App
	maliciousStartHeight      int64
	malPrepareProposalHandler PrepareProposalHandler
}

func New(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	appOpts servertypes.AppOptions,
	baseAppOptions ...func(*baseapp.BaseApp),
) *App {
	goodApp := app.New(logger, db, traceStore, 0, appOpts, baseAppOptions...)
	badApp


ame:'im', label:'', style:'font-style:italic;font-weight:bold'},
        //    {tag:'span',name:'hi', label:'', style:'font-style:italic;font-weight:bold;color:rgb(51, 153, 204)'}
        //]

        //打开右键菜单功能
        //,enableContextMenu: true
        //右键菜单的内容，可以参考plugins/contextmenu.js里边的默认菜单的例子，label留空支持国际化，否则以此配置为准
        //,contextMenu:[
        //    {
        //        label:'',       //显示的名称
        //        cmdName:'selectall',//执行的command命令，当点击这个右键菜单时
        //        //exec可选，有了exec就会在点击时执行这个function，优先级高于cmdName
        //        exec:function () {
        //            //this是当前编辑器的实例
        //            //this.ui._dialogs['inserttableDialog'].open();
        //        }
        //    }
        //]

        //快捷菜单
        //,shortcutMenu:["fontfamily", "fontsize", "bold", "italic", "underline", "forecolor", "backcolor", "insertorderedlist", "insertunorderedlist"]

        //elementPathEnabled
        //是否启用元素路径，默认是显示
        ,elementPathEnabled : false

        //wordCount
        ,wordCount:false          //是否开启字数统计
        //,maximumWords:10000       //允许的最大字符数
        //字数统计提示，{#count}代表当前字数，{#leave}代表还可以输入多少字符数,留空支持多语言自动切换，否则按此配置显示
        //,wordCountMsg:''   //当前已输入 {#count} 个字符，您还可以输入{#leave} 个字符
        //超出字数限制提示  留空支持多语言自动切换，否则按此配置显示
        //,wordOverFlowMsg:''    //你输入的字符个数已经超出最大允许值，服务器可能会拒绝保存！

        //tab
        //点击tab键时移动的距离,tabSize倍数，tabNode什么字符做为单位
        //,tabSize:4
        //,tabNode:' '

        //removeFormat
        //清除格式时可以删除的标签和属性
        //removeForamtTags标签
        //,removeFormatTags:'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var'
        //removeFormatAttributes属性
        //,removeFormatAttributes:'class,style,lang,width,height,align,hspace,valign'

        //undo
        //可以最多回退的次数,默认20
        //,maxUndoCount:20
        //当输入的字符数超过该值时，保存一次现场
        //,maxInputCount:1

        //autoHeightEnabled
        // 是否自动长高,默认true
        //,autoHeightEnabled:true

        ,scaleEnabled: true
        //是否可以拉伸长高,默认true(当开启时，自动长高失效)
        //,scaleEnabled:false
        //,minFrameWidth:800


},
	{
		mods = "LEADER",
		key = "l",
		action = wezterm.action.ActivatePaneDirection("Right"),
	},
	{
		mods = "LEADER",
		key = "LeftArrow",
		action = wezterm.action.AdjustPaneSize({ "Left", 5 }),
	},
	{
		mods = "LEADER",
		key = "RightArrow",
		action = wezterm.action.AdjustPaneSize({ "Right", 5 }),
	},
	{
		mods = "LEADER",
		key = "DownArrow",
		action = wezterm.action.AdjustPaneSize({ "Down", 5 }),
	},
	{
		mods = "LEADER",
		key = "UpArrow",
		action = wezterm.action.AdjustPaneSize({ "Up", 5 }),
	},
}

for i = 0, 9 do
	-- leader + number to activate that tab
	table.insert(config.keys, {
		key = tostring(i),
		mods = "LEADER",
		action = wezterm.action.ActivateTab(i),
	})
end

-- tab bar
config.hide_tab_bar_if_only_one_tab = false
config.tab_bar_at_bottom = true
config.use_fancy_tab_bar = false
config.tab_and_split_indices_are_zero_based = true

wezterm.on("update-right-status", function(window, _)
	local SOLID_LEFT_ARROW = ""
	local ARROW_FOREGROUND = { Foreground = { Color = "#bd93f9" } }
	local prefix = ""

	if window:leader_is_active() then
		prefix = " " .. utf8.char(0x1f30a)
		SOLID_LEFT_ARROW = utf8.char(0xe0b2)
	end

	if window:active_tab():tab_id() ~= 0 then
		ARROW_FOREGROUND = { Foreground = { Color = "#282a36" } }
	end

	window:set_left_status(wezterm.format({
		{ Background = { Color = "#ff79c6" } },
		{ Attribute = { Intensity = "Bold" } },
		{ Text = prefix },
		{ Background = { Color = "#bd93f9" } },
		{ Foreground = { Color = "#282a36" } },
		{ Text = " TERM " },
		ARROW_FOREGROUND,
		{ Text = SOLID_LEFT_ARROW },
	}))
end)

-- Performance Optimizations
config.allow_square_glyphs_to_overflow_width = "Never


:.LANCHOR19]
	tbz	x0, 12, .L2921
	mov	w0, 1
	and	w4, w4, 65535
	lsl	w2, w0, w2
	mov	w3, w19
	adrp	x0, .LC172
	sub	w2, w2, #1
	mov	w1, w19
	add	x0, x0, :lo12:.LC172
	bl	printf
.L2921:
	mov	w0, 0
	ldr	x23, [sp, 48]
	ldp	x19, x20, [sp, 16]
	ldp	x21, x22, [sp, 32]
	ldp	x29, x30, [sp], 64
	ret
	.size	pm_alloc_new_blk, .-pm_alloc_new_blk
	.section	.text.pm_write_page,"ax",@progbits
	.align	2
	.global	pm_write_page
	.type	pm_write_page, %function
pm_write_page:
	stp	x29, x30, [sp, -96]!
	add	x29, sp, 0
	stp	x19, x20, [sp, 16]
	mov	w19, w0
	stp	x21, x22, [sp, 32]
	adrp	x21, .LANCHOR94
	stp	x23, x24, [sp, 48]
	adrp	x22, .LANCHOR111
	adrp	x24, .LANCHOR110
	mov	x23, x1
	add	x21, x21, :lo12:.LANCHOR94
	mov	x20, x24
	add	x22, x22, :lo12:.LANCHOR111
	stp	x25, x26, [sp, 64]
	str	x27, [sp, 80]
	mov	w25, 65535
.L2929:
	ldr	x0, [x24, #:lo12:.LANCHOR110]
	ldr	w1, [x0, 48]
	ldrh	w2, [x0, 696]
	add	w1, w1, 1
	str	w1, [x0, 48]
	ldrh	w1, [x21]
	cmp	w2, w1
	bcs	.L2930
	ldrh	w0, [x0, 692]
	cmp	w0, w25
	bne	.L2931
.L2930:
	bl	pm_alloc_new_blk
	mov	w0, 0
	bl	ftl_info_flush
.L2931:
	ldr	x0, [x20, #:lo12:.LANCHOR110]
	ldrh	w0, [x0, 692]
	cmp	w0, w25
	bne	.L2932
	adrp	x1, .LANCHOR206
	adrp	x0, .LC0
	mov	w2, 303
	add	x1, x1, :lo12:.LANCHOR206
	add	x0, x0, :lo12:.LC0
	bl	printf
.L2932:
	ldr	x0, [x20, #:lo12:.LANCHOR110]
	adrp	x27, .LANCHOR207
	ldrh	w1, [x22]
	mov	w2, 64
	ldrh	w26, [x0, 692]
	ldrh	w0, [x0, 696]
	madd	w26, w26, w1, w0
	ldr	x0, [x27, #:lo12:.LANCHOR207]
	mov	w1, 0
	bl	ftl_memset
	ldr	x6, [x27, #:lo12:.LANCHOR207]
	ldr	x7, [x20, #:lo12:.LANCHO


.5 31.69-71.5a201.24 201.24 0 0 0 6.2 25.8c2.8 9.5 8.7 19.9 13.4 30-3.8 5.2-6.1 8.2-6.1 8.2a.31.31 0 0 0 .1.2c-3 4-6.4 8.3-9.9 12.5-12.79 15.2-28 32.6-30 37.6-2.4 5.9-1.8 10.3 2.8 13.7 3.4 2.6 9.4 3 15.69 2.5 11.5-.8 19.6-3.6 23.5-5.4a82.2 82.2 0 0 0 20.19-10.6c12.5-9.2 20.1-22.4 19.4-39.8-.4-9.6-3.5-19.2-7.3-28.2 1.1-1.6 2.3-3.3 3.4-5C434.8 301.72 450.1 270 450.1 270a201.24 201.24 0 0 0 6.2 25.8c2.4 8.1 7.09 17 11.39 25.7-18.59 15.1-30.09 32.6-34.09 44.1-7.4 21.3-1.6 30.9 9.3 33.1 4.9 1 11.9-1.3 17.1-3.5a79.46 79.46 0 0 0 21.59-11.1c12.5-9.2 24.59-22.1 23.79-39.6-.3-7.9-2.5-15.8-5.4-23.4 15.7-6.6 36.09-10.2 62.09-7.2 55.68 6.5 66.58 41.3 64.48 55.8s-13.8 22.6-17.7 25-5.1 3.3-4.8 5.1c.5 2.6 2.3 2.5 5.6 1.9 4.6-.8 29.19-11.8 30.29-38.7 1.6-34-31.09-71.4-89-71.1zm-429.18 144.7c-18.39 20.1-44.19 27.7-55.28 21.3C54.61 451 59.31 421.42 82 400c13.8-13 31.59-25 43.39-32.4 2.7-1.6 6.6-4 11.4-6.9.8-.5 1.2-.7 1.2-.7.9-.6 1.9-1.1 2.9-1.7 8.29 30.4.3 57.2-19.1 78.3zm134.36-91.4c-6.4 15.7-19.89 55.7-28.09 53.6-7-1.8-11.3-32.3-1.4-62.3 5-15.1 15.6-33.1 21.9-40.1 10.09-11.3 21.19-14.9 23.79-10.4 3.5 5.9-12.2 49.4-16.2 59.2zm111 53c-2.7 1.4-5.2 2.3-6.4 1.6-.9-.5 1.1-2.4 1.1-2.4s13.9-14.9 19.4-21.7c3.2-4 6.9-8.7 10.89-13.9 0 .5.1 1 .1 1.6-.13 17.9-17.32 30-25.12 34.8zm85.58-19.5c-2-1.4-1.7-6.1 5-20.7 2.6-5.7 8.59-15.3 19-24.5a36.18 36.18 0 0 1 1.9 10.8c-.1 22.5-16.2 30.9-25.89 34.4z", 640, 512))},
			{EFontAwesomeIcon.


Prev">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>execution::bulk_guarantee_t::unsequenced</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Asio">
<link rel="up" href="../execution__bulk_guarantee_t.html" title="execution::bulk_guarantee_t">
<link rel="prev" href="sequenced.html" title="execution::bulk_guarantee_t::sequenced">
<link rel="next" href="../execution__bulk_guarantee_t__parallel_t.html" title="execution::bulk_guarantee_t::parallel_t">

execution::bulk_guarantee_t::unsequenced

A
          special value used for accessing the execution::bulk_guarantee_t::unsequenced_t
          property.

static constexpr unsequenced_t unsequenced;

Copyright © 2003-2021 Christopher
      M. Kohlhoff

        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

<img src="../../.


// | | | |

// (row 2):
// ._._._.
// | | | |

// (row 3):
// ._._._.
export function calculatePrice(
  size: string,
  crustType: string,
  toppings: number,
): number {
  let price = 0

  switch (size) {
    case 'small':
      price += 8
      break
    case 'medium':
      price += 10
      break
    case 'large':
      price += 12
      break
    // no default
  }

  switch (crustType) {
    case 'thin':
      price += 2
      break
    case 'thick':
      price += 4
      break
    // no default
  }

  const toppingsValue = (toppings - 3) * 0.5
  if (toppingsValue > 0) price += toppingsValue

  return price
}

import * as AllData from './action';

const initialState =
{

    productName : "A-Z-12-Glasses",

    Pid : 1000010100,

    productPrice : 1000

};

export function myReducer(state = initialState ,action : AllData.actionClass)
{

switch(action.type)
{

case AllData.ADD_PRODUCT:
    return { ...state};

default :
return state;

}

}
import * as tape from 'tape';
import {Test} from "tape";
import {TwingBaseNodeVisitor} from "../../../../../src/lib/base-node-visitor";
import {TwingNode} from "../../../../../src/lib/node";
import {TwingEnvironment} from "../../../../../src/lib/environment";

class CustomVisitor extends TwingBaseNodeVisitor {
    protected doEnterNode(node: TwingNode, env: TwingEnvironment): TwingNode {
        return undefined;
    }

    protected doLeaveNode(node: TwingNode, env: TwingEnvironment): TwingNode {
        return undefined;
    }

    getPriority(): number {
        return 0;
    }
}

tape('base-node-visitor', (test: Test) => {
    test.test('constructor', (test: Test) => {
        let visitor = new CustomVisitor();

        test.same(visitor.TwingNodeVisitorInterfaceImpl, visitor);

        test.end();
    });

    test.end();
});
import {NamedAPIResource} from "../Utility/NamedAPIResource";
import {EncounterVersionDetails} from "./EncounterVersionDetails";

export class EncounterMethodRate {
  encounter_method: NamedAPIResource;
  version_details: EncounterVersionDetails[];

  constructor(
    encounter_method: NamedAPIResource,
    version_details: EncounterVersionDetails[],
  ) {
    this.encounter_method = encounter_method;
    this.version_details = version_details;
  }
}
import { Injectable } from "@angular/core";
import { Storage } from "@ionic/storage";
@Injectable({
  providedIn: "root",
})
export class ComidaService {
  constructor(private storage: Storage) {
    //this.removeAll();
    //storage.set("comidas", [{ nome: "Pizza" }]);
    // Or to get a key/value pair
    //storage.get("comidas").then((val) => {
    //  console.log("Comidasss", val);
    // });
  }

  public async getAll() {
    let comidas = await this.storage.get("comidas");
    comidas = JSON.parse(comidas);
    return comidas;

    //return this.storage.get("comidas").then((comidas) => {

    //return Promise.resolve(comidas);
    // });
  }
  // public async salvarComida(id: number, comida) {
  //  if (id || id === 0) {
  //   await thi


okio::main]
async fn main() {
    let session = Session::connect_mux("ssh://jon@ssh.thesquareplanet.com:222", KnownHosts::Strict)
        .await
        .unwrap();

    let ls = session.command("ls").output().await.unwrap();
    eprintln!(
        "{}",
        String::from_utf8(ls.stdout).expect("server output was not valid UTF-8")
    );

    let whoami = session.command("whoami").output().await.unwrap();
    assert_eq!(whoami.stdout, b"jon\n");

    session.close().await.unwrap();
}
<gh_stars>0
use std::collections::HashSet;

use abstutil::{Counter, Timer};
use map_model::{
    DirectedRoadID, IntersectionID, LaneID, Map, Path, PathConstraints, PathRequest, PathStep,
    PathfinderCaching, Position, RoadID,
};

use super::{Cell, Neighborhood};
use crate::App;

pub struct RatRuns {
    pub paths: Vec<Path>,
    pub count_per_road: Counter<RoadID>,
    pub count_per_intersection: Counter<IntersectionID>,
}

impl RatRuns {
    pub fn quiet_and_total_streets(&self, neighborhood: &Neighborhood) -> (usize, usize) {
        let quiet_streets = neighborhood
            .orig_perimeter
            .interior
            .iter()
            .filter(|r| self.count_per_road.get(**r) == 0)
            .count();
        let total_streets = neighborhood.orig_perimeter.interior.len();
        (quiet_streets, total_streets)
    }
}

pub fn find_rat_runs(app: &App, neighborhood: &Neighborhood, timer: &mut Timer) -> RatRuns {
    let map = &app.map;
    let modal_filters = &app.session.modal_filters;
    // The overall approach: look for all possible paths from an entrance to an exit, only if they
    // connect to different major roads.
    //
    // But an entrance and exit to _what_? If we try to route from the entrance to one cell to the
    // exit of another, then the route will make strange U-turns and probably use the perimeter. By
    // definition, two cells aren't reachable without using the perimeter. So restrict our search
    // to pairs of entrances/exits in the _same_ cell.
    let mut requests = Vec::new();

    for cell in &neighborhood.cells {
        let entrances = find_entrances(map, neighborhood, cell);
        let exits = find_exits(map, neighborhood, cell);

        for entrance in &entrances {
            for exit in &exits {
                if entrance.major_road_name != exit.major_road_name {
                    requests.push(PathRequest::vehicle(
                        Position::start(entrance.lane),
                        Position::end(exit.lane, map),
                        PathConstraints::Car,
                    ));
                }
            }
        }
    }

    let mut params = map.routing_params().clone();
    modal_filters.update_routing_params(&mut params);
    let paths: Vec<Path> = timer
        .parallelize(
            "calculate paths between entrances and exits",
            requests,
            |req| map.pathfind_with_params(req, &params, PathfinderCaching::CacheDijkstra),
        )
        .into_iter()
        .flatten()
        .collect();

    // TODO Rank the likeliness of each rat run by
    // 1) Calculating a path between similar start/endpoints -- travelling along the perimeter,
    //    starting and ending on


Runtime
import com.heyanle.easybangumi4.source_api.entity.Episode
import com.heyanle.easybangumi4.source_api.entity.PlayLine

/**
 * 番剧下载请求
 * Created by heyanle on 2024/7/7.
 * https://github.com/heyanLE
 */
data class CartoonDownloadReq(
    val uuid: String,

    // 下载任务创建来自的番剧信息
    val fromCartoonInfo: CartoonInfo,
    val fromPlayLine: PlayLine,
    val fromEpisode: Episode,

    // 下载任务目标本地番剧信息
    val toLocalItemId: String,
    val localItem: CartoonLocalItem,

    val toEpisodeTitle: String,
    val toEpisode: Int,

    // 历史遗留问题，默认不使用快速模式
    val quickMode: Boolean = false,
){

    companion object {
        private val quickActionName = listOf<String>(
            ParseAction.NAME,
            AriaAction.NAME,
            TranscodeAction.NAME,
            CopyAndNfoAction.NAME
        )

        private val normalActionNameList = listOf<String>(
            ParseAction.NAME,
            TransformerAction.NAME,
            CopyAndNfoAction.NAME
        )
    }

    val stepChain: List<String> by lazy {
        if(quickMode) quickActionName else normalActionNameList
    }
}

data class CartoonDownloadInfo (
    val req: CartoonDownloadReq,
    val runtime: CartoonDownloadRuntime?,
) {

}package com.heyanle.easybangumi4.cartoon.story.download.runtime

import android.content.Intent
import android.os.Build
import com.heyanle.easybangumi4.APP
import com.heyanle.easybangumi4.R
import com.heyanle.easybangumi4.cartoon.entity.CartoonDownloadReq
import com.heyanle.easybangumi4.cartoon.story.download.action.BaseAction
import com.heyanle.easybangumi4.cartoon.story.download.req.CartoonDownloadReqController
import com.heyanle.easybangumi4.cartoon.story.download.service.DownloadingService
import com.heyanle.easybangumi4.cartoon.story.local.CartoonLocalController
import com.heyanle.easybangumi4.utils.CoroutineProvider
import com.heyanle.easybangumi4.utils.scaleHelper
import com.heyanle.easybangumi4.utils.stringRes
import com.heyanle.inject.api.get
import com.heyanle.inject.api.getOrNull
import com.heyanle.inject.core.Inject
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch

/**
 * 下载任务调度器，服务于运行时
 * Created by heyanle on 2024/8/2.
 * https://github.com/heyanLE
 */
class CartoonDownloadDispatcher(
    private val cartoonDownloadReqController: CartoonDownloadReqController,
    private val cartoonLocalController: CartoonLocalController,
) : CartoonDownloadRuntime.Listener {

    private val mainScope = MainScope()
    private val dispatchExecutor = CoroutineProvider.newSingleExecutor

    // 一些比较轻量级的任务可以直接在这里执行
    private val workerExecutor = CoroutineProvider.newSingleExecutor

    private val _runtimeMap = MutableStateFlow<Map<String, CartoonDownloadRuntime>>(emptyMap())
    val runtimeMap = _runtimeMap.asStateFlow()

    init {
        mainScope.launch {
            _runtimeMap.map {
                it.any { it.value.state == CartoonDownloadRuntime.State.DOING ||
                        it.value.state == CartoonDownloadRuntime.State.WAITING ||
                        it.value.state == CartoonDownloadRuntime.State.STEP_COMPLETELY }
            }.distinctUntilChanged().collectLatest {
                if (it) {
                    try {
                        val intent = Intent(APP, DownloadingService::class.java)
                        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
                            APP.startForegroundService(intent)
                        } else {
                            APP.startService(intent)
                        }


*/

package runner

import (
	"encoding/json"
	"log"
	"os"
	"sync/atomic"

	"github.com/nxadm/tail"
	"github.com/opencontainers/runc/libcontainer/configs"
	"github.com/opencontainers/runc/libcontainer/seccomp"
	"github.com/opencontainers/runc/libcontainer/specconv"
	"github.com/opencontainers/runtime-spec/specs-go"
	libseccomp "github.com/seccomp/libseccomp-golang"
	"sigs.k8s.io/yaml"

	"sigs.k8s.io/security-profiles-operator/internal/pkg/cli/command"
	"sigs.k8s.io/security-profiles-operator/internal/pkg/daemon/enricher/auditsource"
	"sigs.k8s.io/security-profiles-operator/internal/pkg/daemon/enricher/types"
)

type defaultImpl struct{}

//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate -header ../../../../hack/boilerplate/boilerplate.generatego.linux.txt
//counterfeiter:generate . impl
type impl interface {
	ReadFile(string) ([]byte, error)
	YamlUnmarshal([]byte, interface{}) error
	JSONMarshal(any) ([]byte, error)
	JSONUnmarshal([]byte, any) error
	SetupSeccomp(*specs.LinuxSeccomp) (*configs.Seccomp, error)
	InitSeccomp(*configs.Seccomp) (int, error)
	CommandRun(*command.Command) (uint32, error)
	CommandWait(*command.Command) error
	TailFile(string, tail.Config) (*tail.Tail, error)
	Lines(*tail.Tail) chan *tail.Line
	IsAuditLine(string) bool
	ExtractAuditLine(string) (*types.AuditLine, error)
	GetName(libseccomp.ScmpSyscall) (string, error)
	PidLoad() uint32
	Printf(format string, v ...any)
}

func (*defaultImpl) ReadFile(name string) ([]byte, error) {
	return os.ReadFile(name)
}

func (*defaultImpl) YamlUnmarshal(y []byte, o interface{}) error {
	return yaml.Unmarshal(y, o)
}

func (*defaultImpl) JSONMarshal(v any) ([]byte, error) {
	return json.Marshal(v)
}

func (*defaultImpl) JSONUnmarshal(data []byte, v any) error {
	return json.Unmarshal(data, v)
}

func (*defaultImpl) SetupSeccomp(config *specs.LinuxSeccomp) (*configs.Seccomp, error) {
	return specconv.SetupSeccomp(config)
}

func (*defaultImpl) InitSeccomp(config *configs.Seccomp) (int, error) {
	return seccomp.InitSeccomp(config)
}

func (*defaultImpl) CommandRun(cmd *command.Command) (uint32, error) {
	return cmd.Run()
}

func (*defaultImpl) CommandWait(cmd *command.Command) error {
	return cmd.Wait()
}

func (*defaultImpl) TailFile(filename string, config tail.Config) (*tail.Tail, error) {
	return tail.TailFile(filename, config)
}

func (*defaultImpl) Lines(tailFile *tail.Tail) chan *tail.Line {
	return tailFile.Lines
}

func (*defaultImpl) IsAuditLine(line string) bool {
	return auditsource.IsAuditLine(line)
}

func (*defaultImpl) ExtractAuditLine(line string) (*types.AuditLine, error) {
	return auditsource.ExtractAuditLine(line)
}

func (*defaultImpl) GetName(s libseccomp.ScmpSyscall) (string, error) {
	return s.GetName()
}

func (*defaultImpl) PidLoad() uint32 {
	return atomic.LoadUint32(&pid)
}

func (*defaultImpl) Printf(format string, v ...any) {
	log.Printf(format,


ext, mCenterX - textWidth / 2, mCenterY + textHeight / 2, mTimePaint)
    }

    /**
     * 外圈 绘画
     */
    private fun drawOuterRing(canvas: Canvas?) {
        canvas ?: return
        //判断当前状态是否结束 结束则不画外圈
        if (mCurrentStatus == STATUS_STOP) {
            return
        }
        //-----画全路段
        canvas.drawCircle(mCenterX, mCenterY, mRadius, mOuterRingPaint)

        //-----画已经经过的路段  外圈
        val left = mCenterX - mRadius
        val right = mCenterX + mRadius
        val top = mCenterY - mRadius
        val bottom = mCenterY + mRadius
        val path = Path()
        val sweep = (mPastTime * 1.0 / mAllTime * 360).toFloat()
        path.addArc(left, top, right, bottom, -90f, sweep)
        canvas.drawPath(path, mOuterRingPassPaint)
    }

    private var timeTask: Runnable = object : Runnable {
        override fun run() {
            mPastTime += 1000
            //重绘
            invalidate()
            //延迟1秒 继续倒计时
            if (mPastTime != mAllTime && mCurrentStatus == STATUS_START) {
                handler.postDelayed(this, PASS_TIME_DELAY_MILLIS)
            } else {
                mCurrentStatus = STATUS_STOP
                if (mPastTime == mAllTime) {
                    mPastTime = 0
                    mListener?.onFinish()
                }
            }
        }
    }

    /**
     * 开始倒计时
     */
    fun startFocus() {
        mCurrentStatus = STATUS_START
        handler.postDelayed(timeTask, PASS_TIME_DELAY_MILLIS)
    }

    /**
     * 停止倒计时
     */
    fun stopFocus() {
        mPastTime = 0
        mCurrentStatus = STATUS_STOP
        handler.removeCallbacksAndMessages(timeTask)
    }

    /**
     * 设置监听器
     */
    fun setTomatoListener(listener: TomatoListener) {
        mListener = listener
    }

    interface TomatoListener {
        fun onFinish()
    }

}package com.xfhy.deepnight.config

/**
 * @author xfhy
 * create at 2018/1/1 11:02
 * description：
 */
object GirlUrl {

    val zgnd = "http://www.msgao.com/dqfl/zgnd/"
    val tw = "http://www.msgao.com/dqfl/tw/"
    val xg = "http://www.msgao.com/dqfl/xg/"

    /*
    *
    * 中国内地
		台湾
		香港
		日本
		韩国
		马来西亚
		泰国
		<a href="http://www.msgao.com/dqfl/om/" class="link" data-id


�，使攻击目标攻击-30%，防御-30%，持续2回合，受到攻击时，35%概率使用该技能进行反击',	'6',	'9229001',	'',	'0',	'one_row',	'',	'1000',	'0',	'0',	'0',	'1',	'1',	'',	'1',	'0',	'0',	'',	'',	'0',	'1.2',	'2',	'2',	'7',	'2',	'',	'12003',	'OnAttackOver',	'922910201',	'OnActionOver',	'922910101',	'',	'',	'',	'',	'',	'1',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'922910201',	'',	'',	'9229102',	'能量喷射',	'1',	'1',	'2',	'',	'cast1',	'1',	'全体2段攻击，每段攻击造成75%能量伤害，驱散目标2个强化效果',	'6',	'9229002',	'',	'0',	'all',	'',	'1200',	'0',	'0',	'0',	'1',	'1',	'',	'0',	'0',	'0',	'',	'',	'0',	'1.5',	'2',	'8,0.5,0,3',	'6',	'4',	'',	'12002',	'OnAttackOver',	'922900101',	'',	'',	'',	'',	'',	'',	'',	'1',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'922910301',	'',	'',	'9229103',	'指定坐标',	'1',	'2',	'2',	'',	'cast2',	'1',	'对当前血量最高的角色释放【瞄准】，被标记角色行动2次后，受到维达尔5段攻击，每段攻击造成伤害70%能量伤害',	'6',	'9229003',	'',	'0',	'one',	'',	'1000',	'0',	'0',	'0',	'1',	'0',	'',	'0',	'0',	'0',	'',	'',	'4',	'1',	'0',	'4',	'9',	'6',	'',	'922910301',	'OnActionOver2',	'922910302',	'',	'',	'',	'',	'',	'',	'',	'1',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	'',	''},
{'922910401',	'',	'',	'9229104',	'绝对沉寂',	'1',	'3',	'2',	'',	'cast3',	'1',	'全体5段攻击，每段攻击造成50%能量伤害',	'6',	'9229003',	'',	'0',	'all',	'',	'1000',	'100',


art(&hadc1);

    if (HAL_ADC_PollForConversion(&hadc1, 10) == HAL_OK) {
        uint32_t adcValue = HAL_ADC_GetValue(&hadc1);

        // DRV8251 current sense conversion
        // Assuming 3.3V reference and 12-bit ADC
        float voltage = (adcValue / 4095.0f) * 3.3f;

        // Convert voltage to current based on DRV8251 specs
        float current = voltage / 0.5f; // Adjust ratio as needed

        return current;
    }

    return -1.0f; // Error case
}

/* Private: Update PWM outputs */
static void UpdatePWMOutputs(void) {
    uint32_t period = __HAL_TIM_GET_AUTORELOAD(&htim1);
    uint32_t pulseValue = (uint32_t)(currentDutyCycle * period);

    switch (currentDirection) {
        case MOTOR_FORWARD:
            // For forward: CH1 active, CH2 inactive
            __HAL_TIM_SET_COMPARE(&htim1, TIM_CHANNEL_1, pulseValue);
            __HAL_TIM_SET_COMPARE(&htim1, TIM_CHANNEL_2, 0);
            break;

        case MOTOR_BACKWARD:
            // For backward: CH2 active, CH1 inactive
            __HAL_TIM_SET_COMPARE(&htim1, TIM_CHANNEL_1, 0);
            __HAL_TIM_SET_COMPARE(&htim1, TIM_CHANNEL_2, pulseValue);
            break;

        case MOTOR_STOP:
        default:
            // Stop motor by setting both channels to 0
            __HAL_TIM_SET_COMPARE(&htim1, TIM_CHANNEL_1, 0);
            __HAL_TIM_SET_COMPARE(&htim1, TIM_CHANNEL_2, 0);
            break;
    }
}

/* ADC Watchdog callback for overcurrent protection */
void HAL_ADC_LevelOutOfWindowCallback(ADC_HandleTypeDef *hadc) {
    if (hadc->Instance == ADC1) {
        // Overcurrent detected - emergency stop
        Motor_Stop();
        // Report error over CAN
        CAN_Log_Now("ERR:OVERCURRENT");
    }
}

/* Get current brake status */
bool Motor_IsBraking(void) {
    return isBraking;
}

/* Get last known direction */
Motor_Direction_t Motor_GetLastDirection(void) {
    return lastDirection;
}


on for recipient - onwards!

	// add the proposal
	stmt, err = tx.Prepare("INSERT INTO moderation_proposals (proposerid, recipientid, time, action) VALUES (?, ?, ?, ?)")
	defer stmt.Close()
	if rollbackOnErr(ed.Eout(err, "prepare proposal stmt")) {
		return
	}
	_, err = stmt.Exec(proposerid, recipientid, t, action)
	if rollbackOnErr(ed.Eout(err, "insert into proposals table")) {
		return
	}

	// TODO (2023-12-18): hmm how do we do this properly now? only have one constant per action
	// {demote, make admin, remove user} but vary translations for these three depending on if there is also a decision or not?

	// add moderation log that user x proposed action y for recipient z
	stmt, err = tx.Prepare(`INSERT INTO moderation_log (actingid, recipientid, action, time) VALUES (?, ?, ?, ?)`)
	defer stmt.Close()
	if rollbackOnErr(ed.Eout(err, "prepare modlog stmt")) {
		return
	}
	_, err = stmt.Exec(proposerid, recipientid, action, t)
	if rollbackOnErr(ed.Eout(err, "insert into modlog")) {
		return
	}

	err = tx.Commit()
	ed.Check(err, "commit transaction")
	return
}

type ModProposal struct {
	ActingUsername, RecipientUsername string
	ActingID, RecipientID             int
	ProposalID, Action                int
	Time                              time.Time
}

func (d DB) GetProposedActions() []ModProposal {
	ed := util.Describe("get moderation proposals")
	stmt, err := d.db.Prepare(`SELECT mp.id, proposerid, up.name, recipientid, ur.name, action, mp.time
	FROM moderation_proposals mp
	INNER JOIN users up on mp.proposerid = up.id
	INNER JOIN users ur on mp.recipientid = ur.id
	ORDER BY time DESC
	;`)
	defer stmt.Close()
	ed.Check(err, "prepare stmt")
	rows, err := stmt.Query()
	ed.Check(err, "perform query")
	defer rows.Close()
	var proposals []ModProposal
	for rows.Next() {
		var prop ModProposal
		if err = rows.Scan(&prop.ProposalID, &prop.ActingID, &prop.ActingUsername, &prop.RecipientID, &prop.RecipientUsername, &prop.Action, &prop.Time); err != nil {
			ed.Check(err, "error scanning in row data")
		}
		proposals = append(proposals, prop)
	}
	return proposals
}

// finalize a proposal by either confirming or vetoing it, logging the requisite information and then finally executing
// the proposed action itself
func (d DB) FinalizeProposedAction(proposalid, adminid int, decision bool) (finalErr error) {
	ed := util.Describe("finalize proposed mod action")

	t := time.Now()
	tx, err := d.db.BeginTx(context.Background(), &sql.TxOptions{})
	ed.Check(err, "open transaction")

	rollbackOnErr := func(incomingErr error) bool {
		if incomingErr != nil {
			_ = tx.Rollback()
			log.Println(incomingErr, "rolling back")
			finalErr = incomingErr
			return true
		}
		return false
	}

	/* start tx */
	// make sure the proposal is still there (i.e. nobody has beat us to acting on it yet)
	stmt, err := tx.Prepare("SELECT 1 FROM moderation_proposals WHERE id = ?")
	defer stmt.Close()
	if rollbackOnErr(ed.Eout(err, "prepare proposal existence stmt")) {
		return
	}
	existence := -1
	err = stmt.QueryRow(proposalid).Scan(&existence)
	// proposal id did not exist (


# pylint: disable = C0111
from setuptools import find_packages, setup

with open("README.md", "r", encoding="utf-8") as f:
    # Remove GitHub dark mode images
    DESCRIPTION = "".join([line for line in f if "gh-dark-mode-only" not in line])

setup(
    name="txtchat",
    version="0.4.0",
    author="NeuML",
    description="Build autonomous agents, retrieval augmented generation (RAG) processes and language model powered chat applications ",
    long_description=DESCRIPTION,
    long_description_content_type="text/markdown",
    url="https://github.com/neuml/txtchat",
    project_urls={
        "Documentation": "https://github.com/neuml/txtchat",
        "Issue Tracker": "https://github.com/neuml/txtchat/issues",
        "Source Code": "https://github.com/neuml/txtchat",
    },
    license="Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0",
    packages=find_packages(where="src/python"),
    package_dir={"": "src/python"},
    keywords="search embedding machine-learning nlp",
    python_requires=">=3.10",
    install_requires=["huggingface-hub>=0.19.0", "pyyaml>=5.3", "rocketchat_async>=4.2.0", "txtai>=8.5.0"],
    classifiers=[
        "License :: OSI Approved :: Apache Software License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Topic :: Scientific/Engineering :: Artificial Intelligence",
        "Topic :: Software Development",
        "Topic :: Text Processing :: Indexing",
        "Topic :: Utilities",
    ],
)


 den definierten Bereichen gibt, bestimmt die Quellreihenfolge, welcher Bereich bevorzugt wird.
    Die gewählte Form bestimmt die Koordinateninformationen, die Sie in `coords` bereitstellen müssen.

- [`coords`](/de/docs/Web/HTML/Reference/Elements/area#coords)
  - : Koordinaten werden in CSS-Pixeln angegeben und der Wert hängt von der gewählten `shape` ab.
    - Bei einem Kreis geben Sie die x- und y-Koordinaten des Mittelpunkts an, gefolgt von der Länge des Radius.
    - Für ein Rechteck geben Sie die x- und y-Koordinaten der oberen linken und unteren rechten Ecke an.
    - Für ein Polygon müssen Sie die x- und y-Koordinaten jeder Ecke angeben (also mindestens sechs Werte).

- [`href`](/de/docs/Web/HTML/Reference/Elements/area#href)
  - : Die URL der Ressource, auf die Sie verlinken. Sie können dieses Attribut leer lassen, wenn Sie nicht möchten, dass der aktuelle Bereich irgendwohin verlinkt (z.B. wenn Sie einen Hohlkreis erstellen).

- [`alt`](/de/docs/Web/HTML/Reference/Elements/area#alt)
  - : Ein obligatorisches Attribut, das beschreibt, wohin der Link führt oder was er bewirkt. `alt`-Text wird nur angezeigt, wenn das Bild nicht verfügbar ist. Bitte beachten Sie unsere [Richtlinien für das Schreiben von zugänglichem Linktext](/de/docs/Learn_web_development/Core/Structuring_content/Creating_links#use_clear_link_wording).

    Sie können `alt=""` schreiben, wenn das `href`-Attribut leer ist _und_ das gesamte Bild bereits ein `alt`-Attribut hat.

```html
<map name="example-map-1">
  <area
    shape="circle"
    coords="200,250,25"
    href="page-2.html"
    alt="circle example" />

  <area
    shape="rect"
    coords="10, 5, 20, 15"
    href="page-3.html"
    alt="rectangle example" />
</map>
```

### Schritt 3: Stellen Sie sicher, dass es für alle funktioniert

Sie sind erst fertig, wenn Sie Bildkarten gründlich auf vielen Browsern und Geräten getestet haben. Versuchen Sie, Links nur mit Ihrer Tastatur zu folgen. Versuchen Sie, Bilder auszuschalten.

Wenn Ihre Bildkarte breiter als etwa 240px ist, müssen Sie weitere Anpassungen vornehmen, um Ihre Website reaktionsfähig zu machen. Es reicht nicht aus, das Bild für kleine Bildschirme zu verkleinern, da die Koordinaten gleich bleiben und nicht mehr mit dem Bild übereinstimmen.

## Mehr erfahren

- {{htmlelement("img")}}
- {{htmlelement("map")}}
- {{htmlelement("area")}}
- [Online-Bildkarten-Editor](https://www.maschek.hu/imagemap/)
---
title: SVG-Attributreferenz
short-title: Attributes
slug: Web/SVG/Reference/Attribute
l10n:
  sourceCommit: 594ae0d4ffb6326a9529fe366d30ca633309ee30
---

SVG-Elemente kö


# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

import torch

from .types import ShardingType
from .utils import shard_param, get_shard_endpoints

def shard_unembed_param(param: torch.Tensor, shard_rank: int, num_shards: int) -> torch.Tensor:
    """
    Utility method for sharding an unembed parameter. We shard unembeddings on the vocab dimension
    with the expectation of an all-gather to produce the full results.

    TODO(cmikeh2): Really ideal would be if MII could have access to the comm and we would do
    an A2A and sharded sampling.

    Args:
        param (torch.Tensor): The parameter to shard. Should be of shape [vocab_size, model_dim]
        shard_rank (int): Which shard of the partitioned tensor to return.
        num_shards (int): The total number of shards the parameter is distributed across.

    Returns:
        torch.Tensor: The sharded parameter of shape [sharded_vocab_size, model_dim]
    """
    return shard_param(param, ShardingType.OUTER_DIMENSION, shard_rank, num_shards, granularity=1)

def sharded_unembed_dim(vocab_size: int, shard_rank: int, num_shards: int) -> int:
    """
    Utility method for determining the sharded vocab size of a sharded unembed parameter.

    Args:
        vocab_size (int): The size of the vocabulary.
        shard_rank (int): Which shard of the partitioned tensor to return.
        num_shards (int): The total number of shards the parameter is distributed across.
    """
    start_idx, end_idx = get_shard_endpoints(vocab_size, shard_rank, num_shards, granularity=1)
    return end_idx - start_idx


:flow-root}.mw-parser-output .side-box-abovebelow,.mw-parser-output .side-box-text{padding:0.25em 0.9em}.mw-parser-output .side-box-image{padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .side-box-imageright{padding:2px 0.9em 2px 0;text-align:center}@media(min-width:500px){.mw-parser-output .side-box-flex{display:flex;align-items:center}.mw-parser-output .side-box-text{flex:1}}@media(min-width:720px){.mw-parser-output .side-box{width:238px}.mw-parser-output .side-box-right{clear:right;float:right;margin-left:1em}.mw-parser-output .side-box-left{margin-right:1em}}</style>

Wikispecies has information related to Tardigrada.

<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1134653256">
<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1126788409">

Wikimedia Commons has media related to Tardigrada.


}     The euclidian distance.
   */
  sigma.utils.getDistance = function(x0, y0, x1, y1) {
    return Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2));
  };

  /**
   * Return the coordinates of the intersection points of two circles.
   *
   * @param  {number} x0  The X coordinate of center location of the first
   *                      circle.
   * @param  {number} y0  The Y coordinate of center location of the first
   *                      circle.
   * @param  {number} r0  The radius of the first circle.
   * @param  {number} x1  The X coordinate of center location of the second
   *                      circle.
   * @param  {number} y1  The Y coordinate of center location of the second
   *                      circle.
   * @param  {number} r1  The radius of the second circle.
   * @return {xi,yi}      The coordinates of the intersection points.
   */
  sigma.utils.getCircleIntersection = function(x0, y0, r0, x1, y1, r1) {
    // http://stackoverflow.com/a/12219802
    var a, dx, dy, d, h, rx, ry, x2, y2;

    // dx and dy are the vertical and horizontal distances between the circle
    // centers:
    dx = x1 - x0;
    dy = y1 - y0;

    // Determine the straight-line distance between the centers:
    d = Math.sqrt((dy * dy) + (dx * dx));

    // Check for solvability:
    if (d > (r0 + r1)) {
        // No solution. circles do not intersect.
        return false;
    }
    if (d < Math.abs(r0 - r1)) {
        // No solution. one circle is contained in the other.
        return false;
    }

    //'point 2' is the point where the line through the circle intersection
    // points crosses the line between the circle centers.

    // Determine the distance from point 0 to point 2:
    a = ((r0 * r0) - (r1 * r1) + (d * d)) / (2.0 * d);

    // Determine the coordinates of point 2:
    x2 = x0 + (dx * a / d);
    y2 = y0 + (dy * a / d);

    // Determine the distance from point 2 to either of the intersection
    // points:
    h = Math.sqrt((r0 * r0) - (a * a));

    // Determine the offsets of the intersection points from point 2:
    rx = -dy * (h / d);
    ry = dx * (h / d);

    // Determine the absolute intersection points:
    var xi = x2 + rx;
    var xi_prime = x2 - rx;
    var yi = y2 + ry;
    var yi_prime = y2 - ry;

    return {xi: xi, xi_prime: xi_prime, yi: yi, yi_prime: yi_prime};
  };

  /**
    * Check if a point is on a line segment.
    *
    * @param  {number} x       The X coordinate of the point to check.
    * @param  {number} y       The Y coordinate of the point to check.
    * @param  {number} x1      The X coordinate of the line start point.
    * @param  {number} y1      The Y coordinate of the line start point.
    * @param  {number} x2      The X coordinate of the line end point.
    * @param  {number} y2      The Y coordinate of the line end point.
    * @param  {number} epsilon The precision (consider the line thickness).
    * @return {boolean}        True if point is "close to


 the LICENSE file.

/*library:
 a_pre_fragments=[p1: {units: [1{lib}], usedBy: [], needs: []}],
 b_finalized_fragments=[f1: [1{lib}]],
 c_steps=[lib=(f1)]
*/

// Test that when a deferred import fails to load, it is possible to retry.

import 'lib.dart' deferred as lib;
import "package:expect/expect.dart";
import "package:async_helper/async_helper.dart";
import "dart:js" as js;

/*member: main:member_unit=main{}*/
main() {
  // We patch document.body.appendChild to change the script src on first
  // invocation.
  js.context.callMethod("eval", [
    """
    if (self.document) {
      oldAppendChild = document.body.appendChild;
      document.body.appendChild = function(element) {
        element.src = "non_existing.js";
        document.body.appendChild = oldAppendChild;
        document.body.appendChild(element);
      }
    }
    if (self.load) {
      oldLoad = load;
      load = function(uri) {
        load = oldLoad;
        load("non_existing.js");
      }
    }
  """
  ]);

  asyncStart();
  lib.loadLibrary().then(/*closure_unit=main{}*/ (_) {
    Expect.fail("Library should not have loaded");
  }, onError: /*closure_unit=main{}*/ (error) {
    lib.loadLibrary().then(/*closure_unit=main{}*/ (_) {
      Expect.equals("loaded", lib.foo());
    }, onError: /*closure_unit=main{}*/ (error) {
      Expect.fail("Library should have loaded this time");
    }).whenComplete(/*closure_unit=main{}*/ () {
      asyncEnd();
    });
  });
}
// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart = 2.7

class Class {
  Class next;
}

main() {
  null1(null);
  null2(null);
  null3(null);
  null4(null);
  null5(null);
  null6(null);
  null7(null);
  null8(null);
}

null1(dynamic c) {
  /*dynamic*/ c.next;
  /*dynamic*/ c != null;
  /*dynamic*/ c.next;
}

null2(dynamic c) {
  /*dynamic*/ c.next;
  /*dynamic*/ c == null;
  /*dynamic*/ c.next;
}

null3(dynamic c) {
  if (/*dynamic*/ c == null) return;
  /*dynamic*/ c.next;
}

null4(dynamic c) {
  if (/*dynamic*/ c != null) return;
  /*Null*/ c.next;
}

null5(dynamic c) {
  if (/*dynamic*/ c != null) {
    /*dynamic*/ c.next;
  }
}

null6(dynamic c) {
  if (/*dynamic*/ c == null) {
    /*Null*/ c.next;
  }
}

null7(dynamic c) {
  while (/*dynamic*/ c != null) {
    /*dynamic*/ c.next;
  }
}

null8(dynamic c) {
  while (/*dynamic*/ c == null) {
    /*Null*/ c.next;
  }
}
// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// @dart = 2.7

/*member: main:
 static=[
  testAbstractClassWithField(0),
  testEnum(0),
  testForwardingConstructor(0),
  testForwardingConstructorGeneric(0),
  te


2#5
# asm 2: eor >y6=r4,<y6=r8,<t30=r4
eor r4,r8,r4

# qhasm:   y7 ^= t31
# asm 1: eor >y7=int32#6,<y7=int32#10,<t31=int32#6
# asm 2: eor >y7=r5,<y7=r9,<t31=r5
eor r5,r9,r5

# qhasm:   y6 ^= t71
# asm 1: eor >y6=int32#9,<y6=int32#5,<t71=int32#8
# asm 2: eor >y6=r8,<y6=r4,<t71=r7
eor r8,r4,r7

# qhasm:   y7 ^= t70
# asm 1: eor >y7=int32#10,<y7=int32#6,<t70=int32#7
# asm 2: eor >y7=r9,<y7=r5,<t70=r6
eor r9,r5,r6

# qhasm:   assign r8 r9 to y6 y7;mem64[input_0 + 24] = y6 y7
# asm 1: strd <y6=int32#9,[<input_0=int32#1,#24]
# asm 2: strd <y6=r8,[<input_0=r0,#24]
strd r8,[r0,#24]

# qhasm:   b0 = mem8[yp +40]
# asm 1: ldrb >b0=int32#5,[<yp=int32#4,#40]
# asm 2: ldrb >b0=r4,[<yp=r3,#40]
ldrb r4,[r3,#40]

# qhasm:   b4 = mem8[yp +36]
# asm 1: ldrb >b4=int32#6,[<yp=int32#4,#36]
# asm 2: ldrb >b4=r5,[<yp=r3,#36]
ldrb r5,[r3,#36]

# qhasm:   b1 = mem8[yp +57]
# asm 1: ldrb >b1=int32#11,[<yp=int32#4,#57]
# asm 2: ldrb >b1=r10,[<yp=r3,#57]
ldrb r10,[r3,#57]

# qhasm:   b5 = mem8[yp +53]
# asm 1: ldrb >b5=int32#12,[<yp=int32#4,#53]
# asm 2: ldrb >b5=r11,[<yp=r3,#53]
ldrb r11,[r3,#53]

# qhasm:   b0 = input_1 - (b0 << 5)
# asm 1: sub >b0=int32#5,<input_1=int32#2,<b0=int32#5,LSL #5
# asm 2: sub >b0=r4,<input_1=r1,<b0=r4,LSL #5
sub r4,r1,r4,LSL #5

# qhasm:   b4 = input_1 - (b4 << 5)
# asm 1: sub >b4=int32#6,<input_1=int32#2,<b4=int32#6,LSL #5
# asm 2: sub >b4=r5,<input_1=r1,<b4=r5,LSL #5
sub r5,r1,r5,LSL #5

# qhasm:   assign r8 r9 to y8 y9 = mem64[b0 + 0]
# asm 1: ldrd >y8=int32#9,[<b0=int32#5,#0]
# asm 2: ldrd >y8


/*
 *  linux/arch/arm/lib/copypage-xsc3.S
 *
 *  Copyright (C) 2004 Intel Corp.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * Adapted for 3rd gen XScale core, no more mini-dcache
 * Author: Matt Gilbert (matthew.m.gilbert@intel.com)
 */

#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/asm-offsets.h>

/*
 * General note:
 *  We don't really want write-allocate cache behaviour for these functions
 *  since that will just eat through 8K of the cache.
 */

	.text
	.align	5
/*
 * XSC3 optimised copy_user_page
 *  r0 = destination
 *  r1 = source
 *  r2 = virtual user address of ultimate destination page
 *
 * The source page may have some clean entries in the cache already, but we
 * can safely ignore them - break_cow() will flush them out of the cache
 * if we eventually end up using our copied page.
 *
 */
ENTRY(xsc3_mc_copy_user_page)
	stmfd	sp!, {r4, r5, lr}
	mov	lr, #PAGE_SZ/64-1

	pld	[r1,


/* Generated by RuntimeBrowser
   Image: /System/Library/PrivateFrameworks/OfficeImport.framework/OfficeImport
 */

@interface OITSUPerformanceTest : NSObject {
    double  mGoalTime;
    NSString * mName;
    bool  mPassed;
    double  mPrecision;
    bool  mQuiet;
    SEL  mSelector;
    id  mTarget;
    struct TSUOpstat_s {
        bool running;
        unsigned long long count;
        struct timeval {
            long long tv_sec;
            int tv_usec;
        } min_time;
        struct timeval {
            long long tv_sec;
            int tv_usec;
        } max_time;
        struct timeval {
            long long tv_sec;
            int tv_usec;
        } total_time;
        struct timeval {
            long long tv_sec;
            int tv_usec;
        } last_time;
    }  mTiming;
}

@property (nonatomic) double goalTime;
@property (nonatomic, readonly) NSString *name;
@property (nonatomic, readonly) bool passed;
@property (nonatomic) double precision;
@property (nonatomic) bool quiet;
@property (nonatomic) struct TSUOpstat_s { bool x1; unsigned long long x2; struct timeval { long long x_3_1_1; int x_3_1_2; } x3; struct timeval { long long x_4_1_1; int x_4_1_2; } x4; struct timeval { long long x_5_1_1; int x_5_1_2; } x5; struct timeval { long long x_6_1_1; int x_6_1_2; } x6; } timing;

+ (id)csvHeader;

- (id)csvString;
- (void)dealloc;
- (double)goalTime;
- (id)initWithName:(id)arg1 selector:(SEL)arg2 target:(id)arg3 goalTime:(double)arg4;
- (id)name;
- (bool)passed;
- (double)precision;
- (bool)quiet;
- (void)report;
- (void)run;
- (void)setGoalTime:(double)arg1;
- (void)setPrecision:(double)arg1;
- (void)setQuiet:(bool)arg1;
- (void)setTiming:(struct TSUOpstat_s { bool x1; unsigned long long x2; struct timeval { long long x_3_1_1; int x_3_1_2; } x3; struct timeval { long long x_4_1_1; int x_4_1_2; } x4; struct timeval { long long x_5_1_1; int x_5_1_2; } x5; struct timeval { long long x_6_1_1; int x_6_1_2; } x6; })arg1;
- (struct TSUOpstat_s { bool x1; unsigned long long x2; struct timeval { long long x_3_1_1; int x_3_1_2; } x3; struct timeval { long long x_4_1_1; int x_4_1_2; } x4; struct timeval { long long x_5_1_1; int x_5_1_2; } x5; struct timeval { long long x_6_1_1; int x_6_1_2; } x6; })timing;

@end