y = b.createDataArray("sinewave", "nix.sampled", nix::DataType::Double, {voltage.size()});
    oned_array.setData(voltage);
    oned_array.label("voltage");
    oned_array.unit("mV");

    nix::SampledDimension dim = oned_array.appendSampledDimension(interval);
    dim.label("time");
    dim.unit("s");

    // 2d data: Set - Sample
    typedef boost::multi_array<double, 2> array_type_2d;
    typedef array_type_2d::index index;

    array_type_2d data(boost::extents[10][time.size()]);
    for(index i = 0; i < 10; ++i) {
        for (size_t j = 0; j < time.size(); ++j) {
            data[i][j] = std::sin(time[j] * freq * 2 * pi + (i*2*pi/10));
        }
    }

    nix::NDSize data_shape(2, 10);  // NDSize object with rank two  10 elements per dim, for now
    data_shape[1] = time.size();
    // create the DataArray and store the data.
    nix::DataArray twod_array = b.createDataArray("2d sinewaves", "nix.test", nix::DataType::Double, data_shape);
    twod_array.setData(data);
    twod_array.label("voltage");
    twod_array.unit("mV");
    twod_array.appendSetDimension();
    dim = twod_array.appendSampledDimension(interval);
    dim.label("time");
    dim.unit("s");

    // 2d data: Range - Sample
    std::vector<double> ticks(10);
    for(size_t i = 0; i < 10; ++i) {
        ticks[i] = i * pi;
    }
    nix::DataArray twod_array2 = b.createDataArray("2d sinewaves 2", "nix.test", nix::DataType::Double, data_shape);
    twod_array2.setData(data);
    twod_array2.label("voltage");
    twod_array2.unit("mV");
    RangeDimension rangeDim = twod_array2.appendRangeDimension(ticks);
    rangeDim.label("time");
    rangeDim.unit("s");
    dim = twod_array2.appendSampledDimension(interval);
    dim.label("time");
    dim.unit("s");

    // do the tests!
    nix::DataArray no_array;
    CPPUNIT_ASSERT_THROW(util::dataSlice(no_array, {1, 2}, {2,3}), nix::UninitializedEntity);
    CPPUNIT_ASSERT_THROW(util::dataSlice(oned_array, {1, 2}, {2, 3}), std::invalid_argument); // 1d data but called with 2d segment
    CPPUNIT_ASSERT_THROW(util::dataSlice(oned_array, {1}, {2}, {"ms", "mV"}), std::invalid_argument); // 1d positions, but two units
    CPPUNIT_ASSERT_THROW(util::dataSlice(oned_array, {1, 2, 3}, {1, 2}), std::invalid_argument); // different size of start and end
    CPPUNIT_ASSERT_THROW(util::dataSlice(oned_array, {0.0}, {1.0}, {"mV"}), nix::IncompatibleDimensions); // sampledDimension represents time
    CPPUNIT_ASSERT_THROW(util::dataSlice(oned_array, {0.0}, {1.0}, {"ks"}), nix::OutOfBounds); // well beyond data
    CPPUNIT_ASSERT_THROW(util::dataSlice(oned_array, {1.0}, {0.0}), std::invalid_argument); // start > end

    CPPUNIT_ASSERT_NO_THROW(util::dataSlice(oned_array, {0.0}, {1.0}));
    CPPUNIT_ASSERT_NO_THROW(util::dataSlice(oned_array, {0.0}, {1.0}, {"s"}));
    CPPUNIT_


from langchain_core.messages import HumanMessage
from src.agents.state import AgentState, show_agent_reasoning
import json

def valuation_agent(state: AgentState):
    """Performs detailed valuation analysis using multiple methodologies."""
    show_reasoning = state["metadata"]["show_reasoning"]
    data = state["data"]
    metrics = data["financial_metrics"][0]
    current_financial_line_item = data["financial_line_items"][0]
    previous_financial_line_item = data["financial_line_items"][1]
    market_cap = data["market_cap"]

    reasoning = {}

    # Calculate working capital change
    working_capital_change = (current_financial_line_item.get(
        'working_capital') or 0) - (previous_financial_line_item.get('working_capital') or 0)

    # Owner Earnings Valuation (Buffett Method)
    owner_earnings_value = calculate_owner_earnings_value(
        net_income=current_financial_line_item.get('net_income'),
        depreciation=current_financial_line_item.get(
            'depreciation_and_amortization'),
        capex=current_financial_line_item.get('capital_expenditure'),
        working_capital_change=working_capital_change,
        growth_rate=metrics["earnings_growth"],
        required_return=0.15,
        margin_of_safety=0.25
    )

    # DCF Valuation
    dcf_value = calculate_intrinsic_value(
        free_cash_flow=current_financial_line_item.get('free_cash_flow'),
        growth_rate=metrics["earnings_growth"],
        discount_rate=0.10,
        terminal_growth_rate=0.03,
        num_years=5,
    )

    # Calculate combined valuation gap (average of both methods)
    dcf_gap = (dcf_value - market_cap) / market_cap
    owner_earnings_gap = (owner_earnings_value - market_cap) / market_cap
    valuation_gap = (dcf_gap + owner_earnings_gap) / 2

    if valuation_gap > 0.10:  # Changed from 0.15 to 0.10 (10% undervalued)
        signal = 'bullish'
    elif valuation_gap < -0.20:  # Changed from -0.15 to -0.20 (20% overvalued)
        signal = 'bearish'
    else:
        signal = 'neutral'

    reasoning["dcf_analysis"] = {
        "signal": "bullish" if dcf_gap > 0.10 else "bearish" if dcf_gap < -0.20 else "neutral",
        "details": f"Intrinsic Value: ${dcf_value:,.2f}, Market Cap: ${market_cap:,.2f}, Gap: {dcf_gap:.1%}"
    }

    reasoning["owner_earnings_analysis"] = {
        "signal": "bullish" if owner_earnings_gap > 0.10 else "bearish" if owner_earnings_gap < -0.20 else "neutral",
        "details": f"Owner Earnings Value: ${owner_earnings_value:,.2f}, Market Cap: ${market_cap:,.2f}, Gap: {owner_earnings_gap:.1%}"
    }

    message_content = {
        "signal": signal,
        "confidence": f"{abs(valuation_gap):.0%}",
        "reasoning": reasoning
    }

    message = HumanMessage(
        content=json.dumps(message_content),
        name="valuation_agent",
    )

    if show_reasoning:
        show_agent_reasoning(message_content, "Valuation Analysis Agent")

    return {
        "messages": [message],
        "data": data,
    }

def calculate_owner_earnings_value(
    net_income: float,
    depreciation: float,
    capex: float,
    working_capital_change: float,
    growth_rate: float = 0.05,
    required_return: float = 0.15,
    margin_of_safety: float = 0.25,
    num_years: int = 5
) -> float:
    """
    使用改进的所有者收益法计算公司价值。

    Args:
        net_income: 净利润
        depreciation: 折旧和摊销
        capex: 资本支出
        working_capital_change: 营运资金变化
        growth_rate: 预期增长率
        required_return: 要求回报率
        margin_of_safety: 安全边际
        num_years: 预测年数

    Returns:
        float: 计算得到的公司价值
    """
    try:
        # 数据有效性检查
        if not all(isinstance(x, (int, float)) for x in [net_income, depreciation, capex, working_capital_change]):
            return 0

        # 计算初始所有者收益
        owner_earnings = (
            net_income +
            depreciation -
            capex -
            working_capital_change
        )

        if owner_earnings <= 0:
            return 0

        # 调整增长率，确保合理性
        growth_rate = min(max(growth_rate, 0), 0.25)  # 限制在0-25%之间

        # 计算预测期收益现值
        future_values = []
        for year in range(1, num_years + 1):
            # 使用递减增长率模型
            year_growth = growth_rate * (1 - year / (2 * num_years))  # 增长率逐年递减
            future_value = owner_earnings * (1 + year_growth) ** year
            discounted_value = future_value / (1 + required_return) ** year
            future_values.append(discounted_value)

        # 计算永续价值
        termina


val pagerState = rememberPagerState(
        pageCount = { MainScreenPageEnum.entries.size })
    val coroutineScope = rememberCoroutineScope()
    WeScaffold(topBar = {
        WeTopBar(
            title = when (MainScreenPageEnum.entries[pagerState.currentPage]) {
                MainScreenPageEnum.FEATURE -> stringResource(id = R.string.string_main_screen_page_features)
                MainScreenPageEnum.UI -> stringResource(id = R.string.string_main_screen_page_ui)
                MainScreenPageEnum.SETTINGS -> stringResource(id = R.string.string_main_screen_page_settings)
            }
        )
    }, bottomBar = {
        MainScreenBottomBar(
            selectedEnum = MainScreenPageEnum.entries[pagerState.currentPage],
            onSelectedEnumChange = {
                coroutineScope.launch {
                    pagerState.scrollToPage(it.ordinal)
                }
            })
    }) {
        HorizontalPager(
            state = pagerState,
            modifier = Modifier.fillMaxSize(),
            beyondViewportPageCount = if (isPreview()) 0 else MainScreenPageEnum.entries.size
        ) {
            when (MainScreenPageEnum.entries[it]) {
                MainScreenPageEnum.FEATURE -> FeatureScreen(onAction = onAction)

                MainScreenPageEnum.UI -> UiDemoScreen(onAction = onAction)

                MainScreenPageEnum.SETTINGS -> SettingsScreen(onAction = onAction)
            }
        }
    }
}

@Composable
private fun MainScreenBottomBar(
    selectedEnum: MainScreenPageEnum,
    onSelectedEnumChange: (MainScreenPageEnum) -> Unit,
) {
    WeBottomBar {
        WeBottomBarItem(
            unSelectImageVector = WeIcons.Feature,
            title = stringResource(id = R.string.string_main_screen_page_features),
            selected = selectedEnum == MainScreenPageEnum.FEATURE,
            onClick = {
                onSelectedEnumChange(MainScreenPageEnum.FEATURE)
            })
        WeBottomBarItem(
            unSelectImageVector = WeIcons.Ui,
            title = stringResource(id = R.string.string_main_screen_page_ui),
            selected = selectedEnum == MainScreenPageEnum.UI,
            onClick = {
                onSelectedEnumChange(MainScreenPageEnum.UI)
            })
        WeBottomBarItem(
            unSelectImageVector = WeIcons.Device,
            title = stringResource(id = R.string.string_main_screen_page_settings),
            selected = selectedEnum == MainScreenPageEnum.SETTINGS,
            onClick = {
                onSelectedEnumChange(MainScreenPageEnum.SETTINGS)
            })
    }
}

@Preview
@Composable
private fun PreviewMainScreenUi() {
    QuicklyTheme {
        MainScreenUi(onAction = {})
    }
}package com.laomuji1999.compose.core.ui

import androidx.navigation.NavHostController
import androidx.navigation.NavOptions
import androidx.navigation.navOptions
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatcher


) * d, 0]
            // dv: [(Math.Cos(u)*(2*c0.y*c1.y)+2*c0.x*c1.x)))/(2*d),(Math.Sin(u)*(2*c0.y*c1.y)+2*c0.x*c1.x)))/(2*d),c1.z)]
            // duu:[-Math.Cos(u)*d,-Math.Sin(u)*d,0]
            // dvv: [(Math.Cos(u)*(2*c0.y*(c2.y))+2*c1.y)^2+2*c0.x*(c2.x))+2*c1.x)^2))/(2*d)-(Math.Cos(u)*(2*c0.y*c1.y)+2*c0.x*c1.x))^2)/(4*(c0.y^2+c0.x^2)^(3/2)),(Math.Sin(u)*(2*c0.y*(c2.y))+2*c1.y)^2+2*c0.x*(c2.x))+2*c1.x)^2))/(2*d)-(Math.Sin(u)*(2*c0.y*c1.y)+2*c0.x*c1.x))^2)/(4*(c0.y^2+c0.x^2)^(3/2)),c2.z)]
            // duv: [-(Math.Sin(u)*(2*c0.y*c1.y)+2*c0.x*c1.x)))/(2*d),(Math.Cos(u)*(2*c0.y*c1.y)+2*c0.x*c1.x)))/(2*d),0]
            axisDirection.ArbitraryNormals(out GeoVector dirx, out GeoVector diry);
            Plane pln = new Plane(axisLocation, axisDirection);
            ModOp toNormal = ModOp.Transform(pln.CoordSys, new CoordSys(GeoPoint.Origin, GeoVector.XAxis, GeoVector.YAxis));
            if (curveToRotate.TryPointDeriv2At(uv.y, out GeoPoint c0, out GeoVector c1, out GeoVector c2))
            {
                c0 = toNormal * c0;
                c1 = toNormal * c1;
                c2 = toNormal * c2;
                double d = Math.Sqrt(c0.x * c0.x + c0.y * c0.y);
                location = new GeoPoint(d * Math.Cos(uv.x), d * Math.Sin(uv.x), c0.z);
                du = new GeoVector(-Math.Sin(uv.x) * d, Math.Cos(uv.x) * d, 0);
                dv = new GeoVector(Math.Cos(uv.x) * (c0.y * c1.y + c0.x * c1.x) / (d), Math.Sin(uv.x) * (c0.y * c1.y + c0.x * c1.x) / (d), c1.z);
                duu = new GeoVector(-Math.Cos(uv.x) * d, -Math.Sin(uv.x) * d, 0);
                dvv = new GeoVector(Math.Cos(uv.x) * (c0.y * c2.y + c1.y * c1.y + c0.x * c2.x + c1.x * c1.x) / d - Math.Cos(uv.x) * sqr(c0.y * c1.y + c0.x * c1.x) / (exp32(c0.y * c0.y + c0.x * c0.x)),
                                    Math.Sin(uv.x) * (c0.y * c2.y + c1.y * c1.y + c0.x * c2.x + c1.x * c1.x) / d - Math.Sin(uv.x) * sqr(c0.y * c1.y + c0.x * c1.x) / (exp32(c0.y * c0.y + c0.x * c0.x)), c2.z);
                duv = new GeoVector(-Math.Sin(uv.x)


lf {
            Self::Mosquitto => "mosquitto",
            Self::TEdgeMapperAz => "tedge-mapper-az",
            Self::TEdgeMapperC8y => "tedge-mapper-c8y",
        };
        write!(f, "{}", s)
    }
}
<gh_stars>0
//! Tock kernel for the SMA Q3 smartwatch.
//!
//! It is based on nRF52840 SoC (Cortex M4 core with a BLE transceiver) with
//! SWD as I/O and many peripherals.

#![no_std]
// Disable this attribute when documenting, as a workaround for
// https://github.com/rust-lang/rust/issues/62184.
#![cfg_attr(not(doc), no_main)]
#![deny(missing_docs)]

use capsules::bmp280::Bmp280;
use capsules::virtual_aes_ccm::MuxAES128CCM;
use capsules::virtual_alarm::VirtualMuxAlarm;
use components::bmp280_component_helper;
use components::bmp280::Bmp280Component;
use kernel::component::Component;
use kernel::dynamic_deferred_call::{DynamicDeferredCall, DynamicDeferredCallClientState};
use kernel::hil::sensors::{TemperatureClient, TemperatureDriver};
use kernel::hil::i2c::I2CMaster;
use kernel::hil::led::LedHigh;
use kernel::hil::symmetric_encryption::AES128;
use kernel::hil::time::Counter;
use kernel::platform::{KernelResources, SyscallDriverLookup};
use kernel::scheduler::round_robin::RoundRobinSched;
#[allow(unused_imports)]
use kernel::{capabilities, create_capability, debug, debug_gpio, debug_verbose, static_init};
use nrf52840::gpio::Pin;
use nrf52840::interrupt_service::Nrf52840DefaultPeripherals;
use nrf52_components::{self, UartChannel};

mod gnss;
mod periodic;
mod util;

// The backlight LED
const LED1_PIN: Pin = Pin::P0_08;

// Vibration motor
const VIBRA1_PIN: Pin = Pin::P0_19;

// The side button
const BUTTON_PIN: Pin = Pin::P0_17;

/// I2C pins for the temp/pressure sensor
const I2C_TEMP_SDA_PIN: Pin = Pin::P1_15;
const I2C_TEMP_SCL_PIN: Pin = Pin::P0_02;

// Constants related to the configuration of the 15.4 network stack
const SRC_MAC: u16 = 0xf00f;
const PAN_ID: u16 = 0xABCD;

/// UART Writer
pub mod io;

// State for loading and holding applications.
// How should the kernel respond when a process faults.
const FAULT_RESPONSE: kernel::process::PanicFaultPolicy = kernel::process::PanicFaultPolicy {};

// Number of concurrent processes this platform supports.
const NUM_PROCS: usize = 8;

static mut PROCESSES: [Option<&'static dyn kernel::process::Process>; NUM_PROCS] =
    [None; NUM_PROCS];

// Static reference to chip for panic dumps
static mut CHIP: Option<&'static nrf52840::chip::NRF52<Nrf52840DefaultPeripherals>> = None;
// Static reference to process printer for panic dumps
static mut PROCESS_PRINTER: Option<&'static kernel::process::ProcessPrinterText> = None;

/// Dummy buffer that causes the linker to reserve enough space for the stack.
#[no_mangle]
#[link_section = ".stack_buffer"]
pub static mut STACK_MEMORY: [u8; 0x1000] = [0; 0x1000];

/// Supported drivers by the platform
pub struct Platform {
    temperature: &'static capsules::temperature::TemperatureSensor<'static>,
    ble_radio: &'static capsules::ble_advertising_driver::BLE<
        'static,


s);
					f = "#000000";
					g.createPath("M-111 109.601C-111 109.601 -116.6 119.601 -91.8 113.601C-91.8 113.601 -77.8 112.401 -75.4 110.001C-74.2 110.801 -65.834 113.734 -63 114.401C-56.2 116.001 -47.8 106 -47.8 106C-47.8 106 -43.2 95.5 -40.4 95.5C-37.6 95.5 -40.8 97.1 -40.8 97.1C-40.8 97.1 -47.4 107.201 -47 108.801C-47 108.801 -52.2 128.801 -68.2 129.601C-68.2 129.601 -84.35 130.551 -83 136.401C-83 136.401 -74.2 134.001 -71.8 136.401C-71.8 136.401 -61 136.001 -69 142.401L-75.8 154.001C-75.8 154.001 -75.66 157.919 -85.8 154.401C-95.6 151.001 -105.9 138.101 -105.9 138.101C-105.9 138.101 -121.85 123.551 -111 109.601z").setFill(f).setStroke(s);
					f = "#e59999";
					g.createPath("M-112.2 113.601C-112.2 113.601 -114.2 123.201 -77.4 112.801C-77.4 112.801 -73 112.801 -70.6 113.601C-68.2 114.401 -56.2 117.201 -54.2 116.001C-54.2 116.001 -61.4 129.601 -73 128.001C-73 128.001 -86.2 129.601 -85.8 134.401C-85.8 134.401 -81.8 141.601 -77 144.001C-77 144.001 -74.2 146.401 -74.6 149.601C-75 152.801 -77.8 154.401 -79.8 155.201C-81.8 156.001 -85 152.801 -86.6 152.801C-88.2 152.801 -96.6 146.401 -101 141.601C-105.4 136.801 -113.8 124.801 -113.4 122.001C-113 119.201 -112.2 113.601 -112.2 113.601z").setFill(f).setStroke(s);
					f = "#b26565";
					g.createPath("M-109 131.051C-106.4 135.001 -103.2 139.201 -101 141.601C-96.6 146.401 -88.2 152.801 -86.6 152.801C-85 152.801 -81.8 156.001 -79.8 155.201C-77.8 154.401 -75 152.801 -74.6 149.601C-74.2 146.401 -77 144.001 -77 144.001C-80.066 142.468 -82.806 138.976 -84.385 136.653C-84.385 136.653 -84.2 139.201 -89.4 138.401C-94.6 137.601 -99.8 134.801 -101.4 131.601C-103 128.401 -105.4 126.001 -103.8 129.601C-102.2 133.201 -99.8 136.801 -98.2 137.201C-96.6 137.601 -97 138.801 -99.4 138.401C-101.8 138.001 -104.6 137.601 -109 132.401z").setFill(f).setStroke(s);
					f = "#992600";
					g.createPath("M-111.6 110.001C-111.6 110.001 -109.8 96.4 -108.6 92.4C-108.6 92.4 -109.4 85.6 -107 81.4C-104.6 77.2 -102.6


::Signature<S>) -> GroupCommitment {
        GroupCommitment(value.r_bytes)
    }
}

/// Define our own `VerificationKey` type instead of using [`verification_key::VerificationKey<SpendAuth>`].
///
/// The serialization design specifies that `VerificationKey` is a [`verification_key::VerificationKeyBytes`] that uses:
/// "a 32-byte little-endian canonical representation".
#[derive(Serialize, Deserialize, PartialEq, Debug, Copy, Clone)]
#[cfg_attr(test, derive(Arbitrary))]
pub struct VerificationKey([u8; 32]);

impl<S: SpendAuth> From<verification_key::VerificationKey<S>> for VerificationKey {
    fn from(value: verification_key::VerificationKey<S>) -> VerificationKey {
        VerificationKey(<[u8; 32]>::from(value))
    }
}

/// The data required to serialize a frost message.
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
#[cfg_attr(test, derive(Arbitrary))]
pub struct Message {
    header: Header,
    payload: Payload,
}

/// The data required to serialize the common header fields for every message.
///
/// Note: the `msg_type` is derived from the `payload` enum variant.
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, Copy)]
pub struct Header {
    version: MsgVersion,
    sender: ParticipantId,
    receiver: ParticipantId,
}

/// The data required to serialize the payload for a message.
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
#[cfg_attr(test, derive(Arbitrary))]
pub enum Payload {
    SharePackage(SharePackage),
    SigningCommitments(SigningCommitments),
    SigningPackage(SigningPackage),
    SignatureShare(SignatureShare),
    AggregateSignature(AggregateSignature),
}

/// The numeric values used to identify each [`Payload`] variant during serialization.
// TODO: spec says `#[repr(u8)]` but it is incompatible with `bincode`
// manual serialization and deserialization is needed.
#[repr(u32)]
#[non_exhaustive]
#[derive(Serialize, Deserialize, Debug, PartialEq)]
enum MsgType {
    SharePackage,
    SigningCommitments,
    SigningPackage,
    SignatureShare,
    AggregateSignature,
}

/// The numeric values used to identify the protocol version during serialization.
#[derive(PartialEq, Serialize, Deserialize, Debug, Clone, Copy)]
pub struct MsgVersion(u8);

/// The numeric values used to identify each participant during serialization.
///
/// In the `frost` module, participant ID `0` should be invalid.
/// But in serialization, we want participants to be indexed from `0..n`,
/// where `n` is the number of participants.
/// This helps us look up their shares and commitments in serialized arrays.
/// So in serialization, we assign the dealer and aggregator the highest IDs,
/// and mark those IDs as invalid for signers.
///
/// "When performing Shamir secret sharing, a polynomial `f(x)` is used to generate
/// each party’s share of the secret. The actual secret is `f(0)` and the party with
/// ID `i` will be given a share with value `f(i)`.
/// Since a DKG may be implemented in the future, we recommend that the ID `0` be declared invalid."
/// https://raw.githubusercontent.com/ZcashFoundation/redjubjub/main/zcash-frost-audit-report-20210323.pdf#d
#[derive(PartialEq, Eq, Hash, PartialOrd, Debug, Copy, Clone, Ord)]
pub enum ParticipantId {
    /// A serialized participant ID for a signer.
    ///
    /// Must be less than or equal to [`constants::MAX_SIGNER_PARTICIPANT_ID`].
    Signer(u64),
    /// The fixed participant ID for the dealer as def


-symbolIcon-namespaceForeground: #ffffff;
    --vscode-symbolIcon-nullForeground: #ffffff;
    --vscode-symbolIcon-numberForeground: #ffffff;
    --vscode-symbolIcon-objectForeground: #ffffff;
    --vscode-symbolIcon-operatorForeground: #ffffff;
    --vscode-symbolIcon-packageForeground: #ffffff;
    --vscode-symbolIcon-propertyForeground: #ffffff;
    --vscode-symbolIcon-referenceForeground: #ffffff;
    --vscode-symbolIcon-snippetForeground: #ffffff;
    --vscode-symbolIcon-stringForeground: #ffffff;
    --vscode-symbolIcon-structForeground: #ffffff;
    --vscode-symbolIcon-textForeground: #ffffff;
    --vscode-symbolIcon-typeParameterForeground: #ffffff;
    --vscode-symbolIcon-unitForeground: #ffffff;
    --vscode-symbolIcon-variableForeground: #75beff;
    --vscode-tab-activeBackground: #000000;
    --vscode-tab-activeForeground: #ffffff;
    --vscode-tab-border: #6fc3df;
    --vscode-tab-dragAndDropBorder: #f38518;
    --vscode-tab-inactiveForeground: #ffffff;
    --vscode-tab-inactiveModifiedBorder: #ffffff;
    --vscode-tab-lastPinnedBorder: #6fc3df;
    --vscode-tab-unfocusedActiveBackground: #000000;
    --vscode-tab-unfocusedActiveForeground: #ffffff;
    --vscode-tab-unfocusedActiveModifiedBorder: #ffffff;
    --vscode-tab-unfocusedInactiveForeground: #ffffff;
    --vscode-tab-unfocusedInactiveModifiedBorder: #ffffff;
    --vscode-terminal-ansiBlack: #000000;
    --vscode-terminal-ansiBlue: #0000ee;
    --vscode-terminal-ansiBrightBlack: #7f7f7f;
    --vscode-terminal-ansiBrightBlue: #5c5cff;
    --vscode-terminal-ansiBrightCyan: #00ffff;
    --vscode-terminal-ansiBrightGreen: #00ff00;
    --vscode-terminal-ansiBrightMagenta: #ff00ff;
    --vscode-terminal-ansiBrightRed: #ff0000;
    --vscode-terminal-ansiBrightWhite: #ffffff;
    --vscode-terminal-ansiBrightYellow: #ffff00;
    --vscode-terminal-ansiCyan: #00cdcd;
    --vscode-terminal-ansiGreen: #00cd00;
    --vscode-terminal-ansiMagenta: #cd00cd;
    --vscode-terminal-ansiRed: #cd0000;
    --vscode-terminal-ansiWhite: #e5e5e5;
    --vscode-terminal-ansiYellow: #cdcd00;
    --vscode-terminal-border: #6fc3df;
    --vscode-terminal-findMatchBorder: #f38518;
    --vscode-terminal-findMatchHighlightBorder: #f38518;
    --vscode-terminal-foreground: #ffffff;
    --vscode-terminal-hoverHighlightBackground: rgba(173, 214, 255, 0.07);
    --vscode-terminal-inactiveSelectionBackground: rgba(255, 255, 255, 0.7);
    --vscode-terminal-selectionBackground: #ffffff;
    --vscode-terminal-selectionForeground: #000000;
    --vscode-terminalCommandDecoration-defaultBackground: rgba(255, 255, 255, 0.5);
    --vscode-terminalComman


1) {
        JXL_RETURN_IF_ERROR(builder.AddStage(GetUpsamplingStage(
            memory_manager, frame_header.nonserialized_metadata->transform_data,
            3 + ec,
            CeilLog2Nonzero(frame_header.extra_channel_upsampling[ec]))));
      }
    }
  }

  if ((frame_header.flags & FrameHeader::kPatches) != 0) {
    JXL_RETURN_IF_ERROR(builder.AddStage(GetPatchesStage(
        &shared->image_features.patches,
        &frame_header.nonserialized_metadata->m.extra_channel_info)));
  }
  if ((frame_header.flags & FrameHeader::kSplines) != 0) {
    JXL_RETURN_IF_ERROR(
        builder.AddStage(GetSplineStage(&shared->image_features.splines)));
  }

  if (frame_header.upsampling != 1) {
    size_t nb_channels =
        3 +
        (late_ec_upsample ? frame_header.extra_channel_upsampling.size() : 0);
    for (size_t c = 0; c < nb_channels; c++) {
      JXL_RETURN_IF_ERROR(builder.AddStage(GetUpsamplingStage(
          memory_manager, frame_header.nonserialized_metadata->transform_data,
          c, CeilLog2Nonzero(frame_header.upsampling))));
    }
  }
  if (render_noise) {
    JXL_RETURN_IF_ERROR(builder.AddStage(GetConvolveNoiseStage(num_c)));
    JXL_RETURN_IF_ERROR(builder.AddStage(GetAddNoiseStage(
        shared->image_features.noise_params, shared->cmap.base(), num_c)));
  }
  if (frame_header.dc_level != 0) {
    JXL_RETURN_IF_ERROR(builder.AddStage(GetWriteToImage3FStage(
        memory_manager, &shared_storage.dc_frames[frame_header.dc_level - 1])));
  }

  if (frame_header.CanBeReferenced() &&
      frame_header.save_before_color_transform) {
    JXL_RETURN_IF_ERROR(builder.AddStage(GetWriteToImageBundleStage(
        &frame_storage_for_referencing, output_encoding_info)));
  }

  bool has_alpha = false;
  size_t alpha_c = 0;
  for (size_t i = 0; i < metadata->extra_channel_info.size(); i++) {
    if (metadata->extra_channel_info[i].type == ExtraChannel::kAlpha) {
      has_alpha = true;
      alpha_c = 3 + i;
      break;
    }
  }

  if (fast_xyb_srgb8_conversion) {
#if !JXL_HIGH_PRECISION
    JXL_ENSURE(!NeedsBlending(frame_header));
    JXL_ENSURE(!frame_header.CanBeReferenced() ||
               frame_header.save_before_color_transform);
    JXL_ENSURE(!options.render_spotcolors ||
               !metadata->Find(ExtraChannel::kSpotColor));
    bool is_rgba = (main_output.format.num_channels == 4);
    uint8_t* rgb_output = reinterpret_cast<uint8_t*>(main_output.buffer);
    JXL_RETURN_IF_ERROR(builder.AddStage(
        GetFastXYBTosRGB8Stage(rgb_output, main_output.stride, width, height,
                               is_rgba, has_alpha, alpha_c)));
#endif
  } else {
    bool linear = false;
    if (frame_header.color_transform == ColorTransform::kYCbCr) {
      JXL_RETURN_IF_ERROR(builder.AddStage(GetYCbCrStage()));
    } else if (frame_header.color_transform == ColorTransform::kXYB) {
      JXL_RETURN_IF_ERROR(builder.AddStage(GetXYBStage(output_encoding_info


    }

    if (genericTypes != null && genericTypes.isNotEmpty) {
      final typeArgNames = SurroundedCommaList(
          '<', '>', genericTypes.map(_getDartTypeName).toList());
      return '${namesByElement[typeElement]}$typeArgNames${_nullabilitySuffixToString(type.nullabilitySuffix)}';
    }

    return namesByElement[typeElement]! +
        _nullabilitySuffixToString(type.nullabilitySuffix);
  }

  String _nullabilitySuffixToString(NullabilitySuffix nullabilitySuffix) =>
      nullabilitySuffix == NullabilitySuffix.question ? '?' : '';
}
import 'dart:async';
import 'dart:convert';

import 'package:http/http.dart' as http;

enum Type { newest, top }

extension on Type {
  Uri get uri {
    switch (this) {
      case Type.newest:
        return Uri.parse(
            'https://hacker-news.firebaseio.com/v0/newstories.json');

      case Type.top:
        return Uri.parse(
            'https://hacker-news.firebaseio.com/v0/topstories.json');
    }
  }
}

class FeedItem {
  FeedItem(
      {required this.score,
      required this.title,
      this.url,
      required this.author});

  final int score;
  final String title;
  final String? url;
  final String author;

  @override
  String toString() =>
      // ignore: unnecessary_this
      '${this.author}: ${this.title}(${this.score}⭐), ${this.url ?? 'no-url'}';
}

class HNApi {
  Future<List<FeedItem>> newest() async {
    final ids = await _getItems(Type.newest);
    final items = await Future.wait(ids.map(_getItem));

    return items.toList(growable: false);
  }

  Future<List<FeedItem>> top() async {
    final ids = await _getItems(Type.top);
    final items = await Future.wait(ids.map(_getItem));

    return items.toList(growable: false);
  }

  Future<FeedItem> _getItem(int id) async {
    final response = await http
        .get(Uri.parse('https://hacker-news.firebaseio.com/v0/item/$id.json'));
    final json = jsonDecode(response.body) as Map<String, dynamic>;

    return FeedItem(
        score: json['score'],
        title: json['title'],
        author: json['by'],
        url: json['url']);
  }

  Future<List<int>> _getItems(Type type, {int count = 25}) async {
    final response = await http.get(type.uri);

    final ids = (jsonDecode(response.body) as List)
        .take(count)
        .map((e) => e as int)
        .toList(growable: false);

    return ids;
  }
}

// Only for testing
Future<void> main() async {
  final list = await HNApi().top();
  // ignore: avoid_print
  print(list);
}
import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:mobx_examples/form/form_store.dart';

class FormExample extends StatefulWidget {
  const FormExample({Key? key}) : super(key: key);

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

class FormExampleState extends State<FormExample> {
  final FormStore store = FormStore();

  @override
  void initState() {
    super.initState();
    store.setupValidations();
  }

  @override
  void dispose() {
    store.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) => Scaffold(
      appBar: AppBar(
        title: const Text('Login Form'),
      ),
      body: Form(
        child: Padding(
          padding: const EdgeInsets.all(8),
          child: Column(
            children: <Widget>[
              Observer(
                builder: (_) => TextField(
                  onChanged: (value) => store.name = value,
                  decoration: InputDecoration(


OVER_TALLIES.boosters.of = G.DISCOVER_TALLIES.boosters.of+1
        if v.discovered then
            G.DISCOVER_TALLIES.boosters.tally = G.DISCOVER_TALLIES.boosters.tally+1
        end
      end
      if v.set and v.set == 'Edition' then
        G.DISCOVER_TALLIES.editions.of = G.DISCOVER_TALLIES.editions.of+1
        if v.discovered then
            G.DISCOVER_TALLIES.editions.tally = G.DISCOVER_TALLIES.editions.tally+1
        end
      end
    end
  end
  for _, v in pairs(G.P_BLINDS) do
      G.DISCOVER_TALLIES.total.of = G.DISCOVER_TALLIES.total.of+1
      G.DISCOVER_TALLIES.blinds.of = G.DISCOVER_TALLIES.blinds.of+1
      if v.discovered then
          G.DISCOVER_TALLIES.blinds.tally = G.DISCOVER_TALLIES.blinds.tally+1
          G.DISCOVER_TALLIES.total.tally = G.DISCOVER_TALLIES.total.tally+1
      end
  end
  for _, v in pairs(G.P_TAGS) do
    G.DISCOVER_TALLIES.total.of = G.DISCOVER_TALLIES.total.of+1
    G.DISCOVER_TALLIES.tags.of = G.DISCOVER_TALLIES.tags.of+1
    if v.discovered then
        G.DISCOVER_TALLIES.tags.tally = G.DISCOVER_TALLIES.tags.tally+1
        G.DISCOVER_TALLIES.total.tally = G.DISCOVER_TALLIES.total.tally+1
    end
  end
  G.PROFILES[G.SETTINGS.profile].high_scores.collection.amt = G.DISCOVER_TALLIES.total.tally
  G.PROFILES[G.SETTINGS.profile].high_scores.collection.tot = G.DISCOVER_TALLIES.total.of
  G.PROFILES[G.SETTINGS.profile].progress.discovered = copy_table(G.DISCOVER_TALLIES.total)

  if check_for_unlock then check_for_unlock({type = 'discover_amount',
        amount = G.DISCOVER_TALLIES.total.tally,
        planet_count = G.DISCOVER_TALLIES.planets.tally,
        tarot_count = G.DISCOVER_TALLIES.tarots.tally})
  end
end

function stop_use()
  G.GAME.STOP_USE = (G.GAME.STOP_USE or 0) + 1
  dec_stop_use(6)
end

function dec_stop_use(_depth)
  if _depth > 0 then
  G.E_MANAGER:add_event(Event({
    blocking = false,
    no_delete = true,
    func = (function()
    dec_stop_use(_depth - 1)
  return true end)}))
  else
    G.E_MANAGER:add_event(Event({
      blocking = false,
      no_delete = true,
      func = (function()
      G.GAME.STOP_USE = math.max(G.GAME.STOP_USE - 1, 0)
    return true end)}))
  end
end

function inc_career_stat(stat, mod)
  if G.GAME.seeded or G.GAME.challenge then return end
  if not G.PROFILES[G.SETTINGS.profile].career_stats[stat] then G.PROFILES[G.SETTINGS.profile].care


ine_to_current_position(MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED));
      current_position.e = olde;
      planner.set_e_position_mm(olde);
      planner.synchronize();

      #if ENABLED(SWITCHING_EXTRUDER)
        switch (active_extruder) {
          default: if (oldstatus) stepper.ENABLE_EXTRUDER(0); else stepper.DISABLE_EXTRUDER(0); break;
          #if E_STEPPERS > 1
            case 2: case 3: if (oldstatus) stepper.ENABLE_EXTRUDER(1); else stepper.DISABLE_EXTRUDER(1); break;
            #if E_STEPPERS > 2
              case 4: case 5: if (oldstatus) stepper.ENABLE_EXTRUDER(2); else stepper.DISABLE_EXTRUDER(2); break;
            #endif // E_STEPPERS > 2
          #endif // E_STEPPERS > 1
        }
      #else // !SWITCHING_EXTRUDER
        switch (active_extruder) {
          #define _CASE_RESTORE(N) case N: if (oldstatus) stepper.ENABLE_EXTRUDER(N); else stepper.DISABLE_EXTRUDER(N); break;
          REPEAT(E_STEPPERS, _CASE_RESTORE);
        }
      #endif // !SWITCHING_EXTRUDER

      gcode.reset_stepper_timeout(ms);
    }
  #endif // EXTRUDER_RUNOUT_PREVENT

  #if ENABLED(DUAL_X_CARRIAGE)
    // handle delayed move timeout
    if (delayed_move_time && ELAPSED(ms, delayed_move_time) && IsRunning()) {
      // travel moves have been received so enact them
      delayed_move_time = 0xFFFFFFFFUL; // force moves to be done
      destination = current_position;
      prepare_line_to_destination();
      planner.synchronize();
    }
  #endif

  TERN_(TEMP_STAT_LEDS, handle_status_leds());

  TERN_(MONITOR_DRIVER_STATUS, monitor_tmc_drivers());

  TERN_(MONITOR_L6470_DRIVER_STATUS, L64xxManager.monitor_driver());

  // Limit check_axes_activity frequency to 10Hz
  static millis_t next_check_axes_ms = 0;
  if (ELAPSED(ms, next_check_axes_ms)) {
    planner.check_axes_activity();
    next_check_axes_ms = ms + 100UL;
  }

  #if PIN_EXISTS(FET_SAFETY)
    static millis_t FET_next;
    if (ELAPSED(ms, FET_next)) {
      FET_next = ms + FET_SAFETY_DELAY;  // 2µs pulse every FET_SAFETY_DELAY mS
      OUT_WRITE(FET_SAFETY_PIN, !FET_SAFETY_INVERTED);
      DELAY_US(2);
      WRITE(FET_SAFETY_PIN, FET_SAFETY_INVERTED);
    }
  #endif
}

/**
 * Standard idle routine keeps the machine alive:
 *  - Core Marlin activities
 *  - Manage heaters (and Watchdog)
 *  - Max7219 heartbeat, animation, etc.
 *
 *  Only after setup() is complete:
 *  - Handle filament runout sensors
 *  - Run HAL idle tasks
 *  - Handle Power-Loss Recovery
 *  - Run StallGuard endstop checks
 *  - Handle SD Card insert / remove
 *  - Handle USB Flash Drive insert / remove
 *  - Announce Host Keepalive state (if any)
 *  - Update the Print Job Timer state
 *


**3、**
**Adobe Substance 3D Stager越界读取漏洞**

Adobe Substance 3D Stager是美国奥多比（Adobe）公司的一个虚拟3D工作室。Adobe Substance 3D Stager存在越界读取漏洞，攻击者可利用该漏洞在当前用户的上下文中执行代码。

参考链接：

https://www.cnvd.org.cn/flaw/show/CNVD-2023-43890

**4、**
**Google Chrome缓冲区溢出漏洞（CNVD-2023-43887）**

Google Chrome是美国谷歌（Google）公司的一款Web浏览器。Skia是其中的一个开放源码的2D图形库，能够提供可在各种硬件和软件平台上工作的常见API。Google Chrome
112.0.5615.137之前版本中的Skia存在缓冲区溢出漏洞。攻击者可利用该漏洞执行任意代码或造成拒绝服务。

参考链接：

https://www.cnvd.org.cn/flaw/show/CNVD-2023-43887

**5、**
**Microsoft Windows DNS远程代码执行漏洞（CNVD-2023-44299）**

Microsoft Windows DNS是美国微软（Microsoft）公司的一个域名解析服务。域名系统（DNS）是包含TCP/IP的行业标准协议套件之一，并且DNS客户端和DNS服务器共同为计算机和用户提供计算机名称到IP地址的映射名称解析服务。Microsoft Windows DNS存在远程代码执行漏洞，攻击者可利用该漏洞导致远程代码执行。

参考链接：

https://www.cnvd.org.cn/flaw/show/CNVD-2023-44299

**二、境内厂商产品漏洞**

**1、**
**Tenda AC23命令注入漏洞**

Tenda AC23是中国腾达（Tenda）公司的一款双频千兆无线路由器。Tenda AC23存在命令注入漏洞，该漏洞源于文件/bin/ate的参数v2未能正确过滤构造命令特殊字符、命令等，攻击者可利用该漏洞导致任意命令执行
。

参考链接：

https://www.cnvd.org.cn/flaw/show/CNVD-2023-45447

**2、**
**TEMMOKUMVC存在SQL注入漏洞**

TEMMOKUMVC是邳州天目网络科技有限公司开发的一款专业的PHP+MYSQL产品，采用自主MVC构架，适用大型及中小型企业的开源MVC。TEMMOKUMVC存在SQL注入漏洞，攻击者可利用该漏洞获取数据库敏感信息。

参考链接：


 org.publicvalue.multiplatform.oidc

import assertk.assertThat
import assertk.assertions.isEqualTo
import org.publicvalue.multiplatform.oidc.flows.Pkce
import org.publicvalue.multiplatform.oidc.types.CodeChallengeMethod
import kotlin.test.Test
import kotlin.test.assertNotNull
import kotlin.test.assertTrue

class PKCETest {
    @Test
    fun testExample1() {
        val inputBytes = ubyteArrayOf(3u, 236u, 255u, 224u, 193u)

        val result = inputBytes.toByteArray().encodeForPKCE()
        assertThat(result).isEqualTo("A-z_4ME")
    }

    @Test
    fun testExamples() {
        val bytes = "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk".s256()
        assertThat(bytes).isEqualTo(
            ubyteArrayOf(19u, 211u, 30u, 150u, 26u, 26u, 216u, 236u, 47u, 22u, 177u, 12u, 76u, 152u, 46u,
            8u, 118u, 168u, 120u, 173u, 109u, 241u, 68u, 86u, 110u, 225u, 137u, 74u, 203u,
            112u, 249u, 195u).toByteArray()
        )

        assertThat("dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk".s256().encodeForPKCE()).isEqualTo("E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM")

        assertThat("OtVkSmgv4FG0Yunzad_Y41FfqBMeNv5R5t9Y1F0SCa4".s256().encodeForPKCE()).isEqualTo("6O-tieQY_-8QPlx2gHJf-kY8ZZsndw8WrYYFheRk4Uk")
        assertThat("49f28fec29cfc6243be4348e20dbb3c45a5ca230dbd2508b61d3bb80".s256().encodeForPKCE()).isEqualTo("71_p-2XnQNtp0ejBitMKotd0KXC4mOrBGQCrV2NB_SM")
        assertThat("gdFYQb_89x1lV7c0oHoCkJEQjRXhQzGRD4kmzYk1s5M".s256().encodeForPKCE()).isEqualTo("t0hcawUItzlHvJczV9dDP18E--htlBE1MlBd37OgZRc")
        assertThat("FvquH4N_qH-YZRxkkfauVCXv0nWmLtbLjnAqQS5LVVU".s256().encodeForPKCE()).isEqualTo("QkfMjldvTK49kFrHLjwm1ZIy1SHkmKong4BmKBATIL0")
        assertThat("12W5Fscr8w34Q6510F8MmiDoN3cBhA_XSWSONObhKUg".s256().encodeForPKCE()).isEqualTo("vPGsmc1pTnazk-Q9lwMOBrzG2wNdEa8KkYoVXq7Tknk")
    }

    @Test
    fun `should generate valid code verifier`() {
        val pkce = Pkce(codeChallengeMethod = CodeChallengeMethod.S256)

        val codeVerifier = pkce.codeVerifier

        assertTrue("Code verifier length must be between 43 and 128") {
            codeVerifier.length in 43..128
        }
        assertTrue("Code verifier must match Base64 URL format") {
            codeVerifier.matches(Re


msnet = "csc",
			mono = "mcs",
			pnet = "cscc",
		}

		if tool == "csc" then
			local toolset = _OPTIONS.dotnet or iif(os.is(premake.WINDOWS), "msnet", "mono")
			return compilers[toolset]
		else
			return "resgen"
		end
	end

--
-- Returns a list of compiler flags, based on the supplied configuration.
--

	dotnet.flags = {
		clr = {
			Unsafe = "/unsafe",
		},
		flags = {
			FatalWarning = "/warnaserror",
			Symbols = "/debug",
		},
		optimize = {
			On = "/optimize",
			Size = "/optimize",
			Speed = "/optimize",
		},
	}

	function dotnet.getflags(cfg)
		local flags = config.mapFlags(cfg, dotnet.flags)

		-- Tells the compiler not to include the csc.rsp response file which
		-- it does by default and references all the assemblies shipped with
		-- the .NET Framework. VS


  final bool showToUser;

  DebugAdapterInvalidArgumentException({
    required this.requestName,
    required this.argumentName,
    required this.expectedType,
    required this.actualType,
    required this.actualValue,
    this.showToUser = false,
  });

  @override
  String get message =>
      '"$argumentName" argument in $requestName configuration must be a '
      '$expectedType but provided value was a $actualType ($actualValue)';

  @override
  String toString() => 'DebugAdapterInvalidArgumentException: $message';
}
// 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.

import 'package:collection/collection.dart';
import 'package:language_server_protocol/json_parsing.dart';
import 'package:language_server_protocol/protocol_custom_generated.dart';
import 'package:language_server_protocol/protocol_generated.dart';

const jsonRpcVersion = '2.0';

const nullJsonHandler = LspJsonHandler<void>(_alwaysTrue, _alwaysNull);

/// Returns if two objects are equal, recursively checking items in
/// Maps/Lists.
bool lspEquals(dynamic obj1, dynamic obj2) {
  return const DeepCollectionEquality().equals(obj1, obj2);
}

/// Returns an objects hash code, recursively combining hashes for items in
/// Maps/Lists.
int lspHashCode(dynamic obj) {
  return const DeepCollectionEquality().hash(obj);
}

Object? specToJson(Object? obj) {
  if (obj is ToJsonable) {
    return obj.toJson();
  } else {
    return obj;
  }
}

void _alwaysNull(dynamic _, [dynamic __]) {}

bool _alwaysTrue(dynamic _, [dynamic __]) => true;

/// An LSP Code Action, which can be either a [CodeActionLiteral] (if supported
/// by the client) that contains a [Command] and/or an inline edit, or just a
/// [Command] itself.
typedef CodeAction = Either2<CodeActionLiteral, Command>;

typedef DocumentChanges
    = List<Either4<CreateFile, DeleteFile, RenameFile, TextDocumentEdit>>;

class Either2<T1, T2> implements ToJsonable {
  final int _which;
  final T1? _t1;
  final T2? _t2;

  const Either2.t1(T1 this._t1)
      : _t2 = null,
        _which = 1;

  const Either2.t2(T2 this._t2)
      : _t1 = null,
        _which = 2;

  @override
  int get hashCode => map(lspHashCode, lspHashCode);

  @override
  bool operator ==(other) =>
      other is Either2<T1, T2> &&
      lspEquals(other._t1, _t1) &&
      lspEquals(other._t2, _t2);

  T map<T>(T Function(T1) f1, T Function(T2) f2) {
    return _which == 1 ? f1(_t1 as T1) : f2(_t2 as T2);
  }

  @override
  Object? toJson() => map(specToJson, specToJson);

  @override
  String toString() => map((t) => t.toString(), (t) => t.toString());

  /// Checks whether the value of the union equals the supplied value.
  bool valueEquals(Object o) => map((t) => t == o, (t) => t == o);
}

class Either3<T1, T2, T3> implements ToJsonable {
  final int _which;
  final T1? _t1;
  final T2? _t2;
  final T3? _t3;

  Either3.t1(this._t1)
      : _t2 = null,
        _t3 = null,
        _which = 1;

  Either3.t2(this._t2)
      : _t1 = null,
        _t3 = null,
        _which = 2;

  Either3.t3(this._t3)
      : _t1 = null,
        _t2 = null,
        _which = 3;

  @override
  int get hashCode => map(lspHashCode, lspHashCode, lspHashCode);

  @override
  bool


t value (using the "default:" property), however, the generated
  /// source code must fall back to having a nullable type.
  /// Consider adding a "default:" property in the specification file to hide this note.
  ///
  int? observedGeneration;

  @override
  bool operator ==(Object other) => identical(this, other) || other is IoK8sApiAutoscalingV1HorizontalPodAutoscalerStatus &&
    other.currentCPUUtilizationPercentage == currentCPUUtilizationPercentage &&
    other.currentReplicas == currentReplicas &&
    other.desiredReplicas == desiredReplicas &&
    other.lastScaleTime == lastScaleTime &&
    other.observedGeneration == observedGeneration;

  @override
  int get hashCode =>
    // ignore: unnecessary_parenthesis
    (currentCPUUtilizationPercentage == null ? 0 : currentCPUUtilizationPercentage!.hashCode) +
    (currentReplicas.hashCode) +
    (desiredReplicas.hashCode) +
    (lastScaleTime == null ? 0 : lastScaleTime!.hashCode) +
    (observedGeneration == null ? 0 : observedGeneration!.hashCode);

  @override
  String toString() => 'IoK8sApiAutoscalingV1HorizontalPodAutoscalerStatus[currentCPUUtilizationPercentage=$currentCPUUtilizationPercentage, currentReplicas=$currentReplicas, desiredReplicas=$desiredReplicas, lastScaleTime=$lastScaleTime, observedGeneration=$observedGeneration]';

  Map<String, dynamic> toJson() {
    final json = <String, dynamic>{};
    if (this.currentCPUUtilizationPercentage != null) {
      json[r'currentCPUUtilizationPercentage'] = this.currentCPUUtilizationPercentage;
    } else {
      json[r'currentCPUUtilizationPercentage'] = null;
    }
      json[r'currentReplicas'] = this.currentReplicas;
      json[r'desiredReplicas'] = this.desiredReplicas;
    if (this.lastScaleTime != null) {
      json[r'lastScaleTime'] = this.lastScaleTime!.toUtc().toIso8601String();
    } else {
      json[r'lastScaleTime'] = null;
    }
    if (this.observedGeneration != null) {
      json[r'observedGeneration'] = this.observedGeneration;
    } else {
      json[r'observedGeneration'] = null;
    }
    return json;
  }

  /// Returns a new [IoK8sApiAutoscalingV1HorizontalPodAutoscalerStatus] instance and imports its values from
  /// [value] if it's a [Map], null otherwise.
  // ignore: prefer_constructors_over_static_methods
  static IoK8sApiAutoscalingV1HorizontalPodAutoscalerStatus? fromJson(dynamic value) {
    if (value is Map) {
      final json = value.cast<String, dynamic>();

      // Ensure that the map contains the required keys.
      // Note 1: the values aren't checked for validity beyond being non-null.
      // Note 2: this code is stripped in release mode!
      assert(() {
        requiredKeys.forEach((key) {
          assert(json.containsKey(key), 'Required key "IoK8sApiAutoscalingV1HorizontalPodAutoscalerStatus[$key]" is missing from JSON.');
          assert(json[key] != null, 'Required key "IoK8sApiAutoscalingV1HorizontalPodAutoscalerStatus[$key]" has a null value in JSON.');
        });
        return true;
      }());

      return IoK8sApiAutoscalingV1HorizontalPodAutoscalerStatus(
        currentCPUUtilizationPercentage: mapValueOfType<int>(json, r'currentCPUUtilizationPercentage'),
        currentReplicas: mapValueOfType<int>(json, r'currentReplicas')!,
        desiredReplicas: mapValueOfType<int>(json, r'desiredReplicas')!,
        lastScaleTime: mapDateTime(json, r'lastScaleTime', r''),
        observedGeneration: mapValueOfType<int>(json, r'observedGeneration'),
      );


ple/l1_f1/l2/README.md Typeflag: 0", increment_element)
vm.on_output("tar_example/l1_f1/l2/service.cpp Typeflag: 0", increment_element)
vm.on_output("tar_example/l1_f1/service.cpp Typeflag: 0", increment_element)
vm.on_output("tar_example/second_file.md Typeflag: 0", increment_element)
vm.on_output("tar_example/first_file.txt Typeflag: 0", increment_element)
vm.on_output("tar_example/l1_f2/ Typeflag: 5", increment_element)
vm.on_output("tar_example/l1_f2/virtio.hpp Typeflag: 0", increment_element)

vm.on_output("Something special to close with", check_num_outputs)

# Boot the VM, taking a timeout as parameter

if len(sys.argv) > 1:
    vm.boot(image_name=str(sys.argv[1]))
else:
    vm.boot(30,image_name='util_tar.elf.bin')


/*
 * Support for Intel Camera Imaging ISP subsystem.
 * Copyright (c) 2015, Intel Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
 * version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 */

#ifndef __IA_CSS_CTC_PARAM_H
#define __IA_CSS_CTC_PARAM_H

#include "type_support.h"
#include <system_global.h>

#include "ia_css_ctc_types.h"

#ifndef PIPE_GENERATION
#if defined(HAS_VAMEM_VERSION_2)
#define SH_CSS_ISP_CTC_TABLE_SIZE_LOG2       IA_CSS_VAMEM_2_CTC_TABLE_SIZE_LOG2
#define SH_CSS_ISP_CTC_TABLE_SIZE            IA_CSS_VAMEM_2_CTC_TABLE_SIZE
#elif defined(HAS_VAMEM_VERSION_1)
#define SH_CSS_ISP_CTC_TABLE_SIZE_LOG2       IA_CSS_VAMEM_1_CTC_TABLE_SIZE_LOG2
#define SH_CSS_ISP_CTC_TABLE_SIZE            IA_CSS_VAMEM_1_CTC_TABLE_SIZE
#else
#error "VAMEM should be {VERSION1, VERSION2}"
#endif

#else
/* For pipe generation, the size is not relevant */
#define SH_CSS_ISP_CTC_TABLE_SIZE 0
#endif

/* This should be vamem_data_t, but that breaks the pipe generator */
struct sh_css_isp_ctc_vamem_params {
	uint16_t ctc[SH_CSS_ISP_CTC_TABLE_SIZE];
};

#endif /* __IA_CSS_CTC_PARAM_H */


iv style="line-height: 1.70;">publication date: 2025-06-09
<h style="color: #F5F5F5;">PUBLISHED</h>

Ebac
 United Kingdom
     www.ebac.com
👁 views: 2712
added: 2025-06-05
publication date: 2025-06-09
<h style="color: #F5F5F5;">PUBLISHED</h>	Sorter Construction
 United States
     www.sorterdigs.com
👁 views: 3181
added: 2025-06-03
publication date: 2025-06-07
<h style="color: #F5F5F5;">PUBLISHED</h>	Rochon
 United States
     www.rochoncorp.com
👁 views: 3157
added: 2025-06-03
publication date: 2025-06-07
<h style="color: #F5F5F5;">PUBLISHED FULL</h>

   <span class="Page" onclick="goto_page('1')" style="color: #EA5


namespace TheBoxSoftware.DeveloperSuite.LiveDocumenter
{
    using System.Windows.Input;

    /// <summary>
    /// Application commands used to correctly manage activities in the user interface.
    /// </summary>
    internal static class Commands
    {
        /// <summary>
        /// Command for exporting documentation in the <see cref="MainWindow"/>.
        /// </summary>
        public static readonly RoutedUICommand Export = new RoutedUICommand("Export", "export", typeof(MainWindow));

        /// <summary>
        /// Command for adding new files to the LiveDocumenterFile
        /// </summar


    break;
    }
  }

  if (makeIs(LIBRAW_CAMERAMAKER_HMD_Global) && !strncasecmp(model, "Nokia", 5)) {
    maker_index = LIBRAW_CAMERAMAKER_Nokia;
  }  else if (makeIs(LIBRAW_CAMERAMAKER_JK_Imaging) && !strncasecmp(model, "Kodak", 5)) {
    maker_index = LIBRAW_CAMERAMAKER_Kodak;
  } else if (makeIs(LIBRAW_CAMERAMAKER_Ricoh) && !strncasecmp(model, "PENTAX", 6)) {
    maker_index = LIBRAW_CAMERAMAKER_Pentax;
  }

  for (i = 0; i < int(sizeof CorpTable / sizeof *CorpTable); i++) {
    if (maker_index == (unsigned)CorpTable[i].CorpId) {
      strcpy(make, CorpTable[i].CorpName);
      break;
    }
  }

  if ((makeIs(LIBRAW_CAMERAMAKER_Kodak) || makeIs(LIBRAW_CAMERAMAKER_Leica)) &&
      ((cp = strcasestr(model, " DIGITAL CAMERA")) ||
       (cp = strstr(model, "FILE VERSION")))) {
    *cp = 0;
  }

  remove_trailing_spaces(make, sizeof(make));
  remove_trailing_spaces(model, sizeof(model));

  i = int(strbuflen(make)); /* Remove make from model */
  if (!strncasecmp(model, make, i) && model[i++] == ' ')
    memmove(model, model + i, 64 - i);

  if (makeIs(LIBRAW_CAMERAMAKER_Fujifilm) && !strncmp(model, "FinePix", 7)) {
    memmove(model, model + 7, strlen(model) - 6);
    if (model[0] == ' ') {
      memmove(model, model + 1, strlen(model));
    }
  } else if ((makeIs(LIBRAW_CAMERAMAKER_Kodak) || makeIs(LIBRAW_CAMERAMAKER_Konica)) &&
             !strncmp(model, "Digital Camera ", 15)) {
    memmove(model, model + 15, strlen(model) - 14);
  }
#endif

  desc[511] = artist[63] = make[63] = model[63] = model2[63] = 0;
  if (!is_raw)
    goto notraw;

  if (!height)
    height = raw_height;
  if (!width)
    width = raw_width;

  identify_finetune_pentax();

  if (dng_version)
  {
    if (filters == UINT_MAX)
      filters = 0;
    if (!filters)
      colors = tiff_samples;
    switch (tiff_compress)
    {
    case 0: // Compression not set, assuming uncompressed
    case 1:
      // Uncompressed float: decoder set in apply_tiff for valid files; not set for non-valid with sampleformat==3
      if ((load_raw != &LibRaw::uncompressed_fp_dng_load_raw)  && (tiff_sampleformat != 3))
        load_raw = &LibRaw::packed_dng_load_raw;
      break;
    case 7:
      load_raw = &LibRaw::lossless_dng_load_raw;
      break;
    case 8:
        if (tiff_sampleformat == 3 && tiff_bps > 8 && (tiff_bps % 8 == 0) && tiff_bps <= 32)
            load_raw = &LibRaw::deflate_dng_load_raw;
        else if((tiff_sampleformat == 0 || tiff_sampleformat == 1) && tiff_bps>=8 && tiff_bps <=16)
          load_raw = &LibRaw::deflate_dng_load_raw;
        break;


/*-
 * Copyright (c) 2007 Yahoo!, Inc.
 * All rights reserved.
 * Written by: John Baldwin <jhb@FreeBSD.org>
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the author nor the names of any co-contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 * Partly from: src/sys/boot/i386/boot2/boot1.S 1.31
 */

/* Memory Locations */
		.set MEM_REL,0x700		# Relocation address
		.set MEM_ARG,0x900		# Arguments
		.set MEM_ORG,0x7c00		# Origin
		.set MEM_BUF,0x8cec		# Load area
		.set MEM_BTX,0x9000		# BTX start
		.set MEM_JMP,0x9010		# BTX entry point
		.set MEM_USR,0xa000		# Client start
		.set BDA_BOOT,0x472		# Boot howto flag

/* Misc. Constants */
		.set SIZ_PAG,0x1000		# Page size
		.set SIZ_SEC,0x200		# Sector size
		.set COPY_BLKS,0x8		# Number of blocks
						# to copy for boot2 (<= 15)
		.set COPY_BLK_SZ,0x8000		# Copy in 32k blocks; must be
						# a multiple of 16 bytes

		.globl start
		.code16

/*
 * Copy BTX and boot2 to the right locations and start it all up.
 */

/*
 * Setup the segment registers to flat addressing (segment 0) and setup the
 * stack to end just below the start of our code.
 */
start:		xor %cx,%cx			# Zero
		mov %cx


rule.rules.size)

        rule.rules.forEach {
            if (it is Rule.QueryRule && it.field !in fields) {
                rules.add(it)
            }

            if (it is Rule.NestedRule && it.relation == Rule.NestedRule.RelationType.AND) {
                val filteredRule = filterAndNestedRuleField(it, fields)
                if (filteredRule.rules.isNotEmpty()) {
                    rules.add(filteredRule)
                }
            }

            if (it is Rule.NestedRule && it.relation == Rule.NestedRule.RelationType.OR) {
                rules.addAll(filterOrNestedRuleField(it, fields).rules)
            }
        }

        return Rule.NestedRule(rules, Rule.NestedRule.RelationType.OR)
    }

    /**
     * 填充包的fullPath字段
     * TODO 实现批量获取package完整数据接口后移除此方法
     */
    private fun populatePackage(pkg: Package): Package {
        require(pkg.packageVersion != null)
        with(pkg) {
            if (logger.isDebugEnabled) {
                logger.debug("populating package[$pkg]")
            }
            val packageVersion = packageService.findVersionByName(projectId, repoName, packageKey, packageVersion!!)
            pkg.fullPath = packageVersion?.contentPath ?: packageVersion?.manifestPath
            pkg.size = packageVersion?.size
        }
        return pkg
    }

    /**
     * 请求[packages]对应的node数据
     */
    private fun requestNode(packages: List<Package>): List<Node> {
        if (packages.isEmpty()) {
            return emptyList()
        }
        val nodeQueryRule = nodeQueryRule(packages)
        val nodes = Request.requestNodes(nodeSearchService, nodeQueryRule, DEFAULT_PAGE_NUMBER, position.pageSize)
        val packageMap = packages.associateBy { it.fullPath }
        nodes.forEach {
            val pkg = packageMap[it.fullPath]!!
            it.artifactName = pkg.artifactName
            it.packageKey = pkg.packageKey
            it.packageVersion = pkg.packageVersion
            it.packageSize = pkg.size ?: it.size
        }
        return nodes
    }

    /**
     * 获取查询[packages]对应node信息的rule
     */
    private fun nodeQueryRule(packages: List<Package>): Rule {
        require(packages.isNotEmpty())
        val projectIdRule = (position.rule as Rule.NestedRule)
            .rules
            .first { it is Rule.QueryRule && it.field == NodeDetail::projectId.name }

        val rules = mutableListOf(projectIdRule)
        val packagesRules = packages.map {
            val packageRules = mutableListOf<Rule>(
                Rule.QueryRule(NodeDetail::repoName.name, it.repoName, OperationType.EQ),
                Rule.QueryRule(NodeDetail::fullPath.name, it.fullPath!!, OperationType.EQ)
            )
            Rule.NestedRule(packageRules, Rule.NestedRule.RelationType.AND)
        }
        rules.add(Rule.NestedRule(packagesRules.toMutableList(), Rule.NestedRule.RelationType.OR))

        return Rule.NestedRule(rules, Rule.NestedRule.RelationType.AND)
    }

    companion object {
        private val logger = LoggerFactory.getLogger(PackageIterator::class.java)

        private val packageSelect = listOf(
            PackageSummary::projectId.name,
            PackageSummary::repoName.name,
            PackageSummary::type.name,
            PackageSummary::key.name,
            PackageSummary::name.name,
            PackageSummary::latest.name,
            PackageSummary::historyVersion.name
        )
    }

    data class Package(
        val projectId: String,
        val repoName: String,
        val type: String,
        val artifactName: String,
        val packageKey: String,
        val latestVersion: String,
        val historyVersion: List<String> = emptyList(),
        var packageVersion: String? = null,
        var fullPath: String? = null,
        var size:


tem::Windows::Forms::ToolStripItemAlignment::Right;
            this->toolStripSeparator2->Name = L"toolStripSeparator2";
            this->toolStripSeparator2->Size = System::Drawing::Size(6, 25);
            //
            // fcgTSBOtherSettings
            //
            this->fcgTSBOtherSettings->Alignment = System::Windows::Forms::ToolStripItemAlignment::Right;
            this->fcgTSBOtherSettings->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Text;
            this->fcgTSBOtherSettings->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"fcgTSBOtherSettings.Image")));
            this->fcgTSBOtherSettings->ImageTransparentColor = System::Drawing::Color::Magenta;
            this->fcgTSBOtherSettings->Name = L"fcgTSBOtherSettings";
            this->fcgTSBOtherSettings->Size = System::Drawing::Size(76, 22);
            this->fcgTSBOtherSettings->Text = L"その他の設定";
            this->fcgTSBOtherSettings->Click += gcnew System::EventHandler(this, &frmConfig::fcgTSBOtherSettings_Click);
            //
            // fcgTSLSettingsNotes
            //
            this->fcgTSLSettingsNotes->DoubleClickEnabled = true;
            this->fcgTSLSettingsNotes->Font = (gcnew System::Drawing::Font(L"Meiryo UI", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
                static_cast<System::Byte>(128)));
            this->fcgTSLSettingsNotes->Margin = System::Windows::Forms::Padding(3, 1, 0, 2);
            this->fcgTSLSettingsNotes->Name = L"fcgTSLSettingsNotes";
            this->fcgTSLSettingsNotes->Overflow = System::Windows::Forms::ToolStripItemOverflow::Never;
            this->fcgTSLSettingsNotes->Size = System::Drawing::Size(45, 22);
            this->fcgTSLSettingsNotes->Text = L"メモ表示";
            this->fcgTSLSettingsNotes->DoubleClick += gcnew System::EventHandler(this, &frmConfig::fcgTSLSettingsNotes_DoubleClick);
            //
            // fcgTSTSettingsNotes
            //
            this->fcgTSTSettingsNotes->BackColor = System::Drawing::SystemColors::Window;
            this->fcgTSTSettingsNotes->Font = (gcnew System::Drawing::Font(L"Meiryo UI", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
                static_cast<System::Byte>(128)));
            this->fcgTSTSettingsNotes->Margin = System::Windows::Forms::Padding(3, 0, 1, 0);
            this->fcgTSTSettingsNotes->Name = L"fcgTSTSettingsNotes";
            this->fcgTSTSettingsNotes->Size = System::Drawing::Size(200, 25);
            this->fcgTSTSettingsNotes->Text = L"メモ...";
            this->fcgTSTSettingsNotes->Visible = false;
            this->fcgTSTSettingsNotes->Leave += gcnew System::EventHandler(this, &frmConfig::fcgTSTSettingsNotes_Leave);
            this->fcgTSTSettingsNotes->KeyDown += gcnew System::Windows::Forms::KeyEventHandler(this, &frmConfig::fcgTSTSettingsNotes_KeyDown);
            this->fcgTSTSettingsNotes->TextChanged += gcnew System::EventHandler(this, &frmConfig::fcgTSTSettingsNotes_TextChanged);
            //
            // toolStripSeparator4
            //
            this->toolStripSeparator4->Alignment = System::Windows::Forms::ToolStripItemAlignment::Right;
            this->toolStripSeparator4->Name = L"toolStripSeparator4";
            this->toolStripSeparator4->Size = System::Drawing::Size(6, 25);
            //
            // fcggroupBoxAudio
            //
            this->fcggroupBoxAudio->Controls->Add(this->fcgPNAudioExt);
            this->fcggroupBoxAudio->Controls->Add(this->fcgCBAudioUseInternal);
            this->fcggroupBoxAudio->Controls->Add(this->fcgCBFAWCheck);
            this->fcggroupBoxAudio->Controls->Add(this->fcgPNAudioInternal);
            this->fcggroupBoxAudio->Font = (gcnew System::Drawing::Font(L"Meiryo UI", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
                static_cast<System::Byte>(128)));
            this->fcggroupBoxAudio->Location = System::Drawing::Point(622, 25);
            this->fcggroupBoxAudio->Name = L"fcggroupBoxAudio";
            this->fcggroupBoxAudio->Size = System::Drawing::Size(379, 325);
            this->fcggroupBoxAudio->TabIndex = 2;
            this->fcggroupBoxAudio->TabStop = false;
            this->fcggroupBoxAudio->Text = L"音声";
            //
            // fcgPNAudioExt
            //
            this->fcgPNAudioExt->Controls->Add(this->fcgCXAudioDelayCut);
            this->fcgPNAudioEx


CombatActBusy() )
				{
					ChainStartTask( TASK_RUN_PATH );
				}
				else
				{
					ChainStartTask( TASK_WALK_PATH );
				}
			}
			break;
		}

	case TASK_ACTBUSY_GET_PATH_TO_ACTBUSY:
		{
			ChainStartTask( TASK_GET_PATH_TO_HINTNODE );

			if ( !HasCondition(COND_TASK_FAILED) )
			{
				// We successfully built a path, so stop counting consecutive failures.
				m_iNumConsecutivePathFailures = 0;

				// Set the arrival sequence for the actbusy to be the busy sequence, if we don't have an entry animation
				busyanim_t *pBusyAnim = g_ActBusyAnimDataSystem.GetBusyAnim( m_iCurrentBusyAnim );
				if ( pBusyAnim && pBusyAnim->iszSequences[BA_ENTRY] == NULL_STRING && pBusyAnim->iActivities[BA_ENTRY] == ACT_INVALID )
				{
					// Try and play the sequence first
					if ( pBusyAnim->iszSequences[BA_BUSY] != NULL_STRING )
					{
						GetNavigator()->SetArrivalSequence( GetOuter()->LookupSequence( STRING(pBusyAnim->iszSequences[BA_BUSY]) ) );
					}
					else if ( pBusyAnim->iActivities[BA_BUSY] != ACT_INVALID )
					{
						// Try and play the activity second
						GetNavigator()->SetArrivalActivity( pBusyAnim->iActivities[BA_BUSY] );
					}
				}
				else
				{
					// Robin: Set the arrival sequence / activity to be the entry animation.
					if ( pBusyAnim->iszSequences[BA_ENTRY] != NULL_STRING )
					{
						GetNavigator()->SetArrivalSequence( GetOuter()->LookupSequence( STRING(pBusyAnim->iszSequences[BA_ENTRY]) ) );
					}
					else if ( pBusyAnim->iActivities[BA_ENTRY] != ACT_INVALID )
					{
						// Try and play the activity second
						GetNavigator()->SetArrivalActivity( pBusyAnim->iActivities[BA_ENTRY] );
					}
				}
			}
			else
			{
				m_iNumConsecutivePathFailures++;

				if ( ai_debug_actbusy.GetInt() == 1 )
				{
					if ( GetHintNode() )
					{
						// Show which actbusy we're moving towards
						NDebugOverlay::Line( GetOuter()->WorldSpaceCenter(), GetHintNode()->GetAbsOrigin(), 255, 0, 0, true, 1.0 );
					}
				}
			}

			break;
		}

	default:
		BaseClass::StartTask( pTask);
	}
}

//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CAI_ActBusyBehavior::RunTask( const Task_t *pTask )
{
	switch ( pTask->iTask )
	{
	case TASK_WAIT_FOR_MOVEMENT:
		{
			// Ensure the hint node hasn't been disabled
			if ( IsCurSchedule( SCHED_ACTBUSY_START_BUSYING ) )
			{
				if ( !ActBusyNodeStillActive() )
				{
					TaskFail(FAIL_NO_HINT_NODE);
					return;
				}
			}

			if ( ai_debug_actbusy.GetInt() == 1 )
			{
				if ( GetHintNode() )
				{
					// Show which actbusy we're moving towards
					NDebugOverlay::Line( GetOuter()->WorldSpaceCenter(), GetHintNode()->GetAbsOrigin(), 0, 255, 0, true, 0.2 );
				}
			}

			BaseClass::RunTask( pTask );
			break;
		}

	case TASK_ACTBUSY_PLAY_BUSY_ANIM:
		{
			if( m_bUseRenderBoundsForCollision )
			{


 fun getAlbumCountHelperText(count: Int): String {
    return when (count) {
        -1 -> "Loading albums..."
        0 -> "No albums found!"
        1 -> "You have 1 album in your library"
        else -> {
            val formattedCount =
                count.toString().reversed().chunked(3).joinToString(" ,").reversed()
            "You have $formattedCount albums in your library"
        }
    }
}
package ch.admin.bag.dp3t.reports

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
import ch.admin.bag.dp3t.R
import ch.admin.bag.dp3t.checkin.models.DiaryEntry
import ch.admin.bag.dp3t.databinding.*
import ch.admin.bag.dp3t.extensions.getDetailsString
import ch.admin.bag.dp3t.util.StringUtil
import org.crowdnotifier.android.sdk.model.ExposureEvent
import org.dpppt.android.sdk.models.ExposureDay
import java.util.*
import kotlin.collections.ArrayList

class ReportsRecyclerAdapter : RecyclerView.Adapter<ReportsRecyclerAdapter.ReportViewHolder>() {

	private var items: List<ReportItem> = emptyList()
	private var onClickListener: ((ReportItem) -> Unit)? = null

	fun setItems(newItems: List<ReportItem>) {
		this.items = ArrayList<ReportItem>().apply { addAll(newItems) }
		notifyDataSetChanged()
	}

	fun setOnClickListener(listener: (ReportItem) -> Unit) {
		this.onClickListener = listener
	}

	override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) =
		ReportViewHolder(ItemReportBinding.inflate(LayoutInflater.from(parent.context), parent, false))

	override fun onBindViewHolder(holder: ReportViewHolder, position: Int) = holder.bind(items[position])

	override fun getItemCount() = items.size

	/*--------VIEW HOLDERS-------*/

	inner class ReportViewHolder(private val binding: ItemReportBinding) : RecyclerView.ViewHolder(binding.root) {
		fun bind(item: ReportItem) {
			binding.apply {
				cardView.setOnClickListener { onClickListener?.invoke(item) }
				place.isVisible = item is CheckinReportItem && item.diaryEntry != null
				when (item) {
					is ProximityTracingReportItem -> {
						reportType.setText(R.string.meldung_detail_exposed_list_card_title_encounters)
						reportDetails.text = item.exposures.joinToString("\n") {
							StringUtil.getReportDateString(
								it.exposedDate.getStartOfDay(TimeZone.getDefault()),
								true,
								false,
								root.context
							)
						}
					}
					is CheckinReportItem -> {
						reportType.setText(R.string.meldung_detail_exposed_list_card_title_checkin)
						place.text = item.diaryEntry?.venueInfo?.title
						reportDetails.text = item.exposure.getDetailsString(root.context)
					}
				}
			}
		}
	}

}

/*--------ITEMS-------*/

abstract class ReportItem {
	companion object {
		const val TYPE_PROXIMITY_TRACING_REPORT = 0
		const val TYPE_CHECKIN_REPORT = 1

	}

	abstract val type: Int
}

class ProximityTracingReportItem(val exposures: List<ExposureDay>) : ReportItem() {
	override val type = TYPE_PROXIMITY_TRACING_REPORT
}

class CheckinReportItem(val exposure: ExposureEvent, val diaryEntry: DiaryEntry?) : ReportItem() {
	override val type = TYPE_CHECKIN_REPORT
}

/*
 * Copyright (c) 2020 Ubique Innovation AG <https://www.ubique.ch>
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 *


pe);
      if (query.conditions.isNotEmpty) _buffer.write(" and ");
    }

    if (query.conditions case [var first] when first.startsWith("(not ")) {
      _buffer.write("not ");
      var condition = query.conditions.first;
      _buffer.write(condition.substring("(not ".length, condition.length - 1));
    } else {
      var operator = query.conjunction ? "and" : "or";
      _writeBetween(
        query.conditions,
        _isCompressed ? "$operator " : " $operator ",
        _buffer.write,
      );
    }
  }

  void visitCssStyleRule(CssStyleRule node) {
    _writeIndentation();

    _for(node.selector, () => node.selector.accept(this));
    _writeOptionalSpace();
    _visitChildren(node);
  }

  void visitCssSupportsRule(CssSupportsRule node) {
    _writeIndentation();

    _for(node, () {
      _buffer.write("@supports");

      if (!(_isCompressed && node.condition.value.codeUnitAt(0) == $lparen)) {
        _buffer.writeCharCode($space);
      }

      _write(node.condition);
    });

    _writeOptionalSpace();
    _visitChildren(node);
  }

  void visitCssDeclaration(CssDeclaration node) {
    _writeIndentation();

    _write(node.name);
    _buffer.writeCharCode($colon);

    // If `node` is a custom property that was parsed as a normal Sass-syntax
    // property (such as `#{--foo}: ...`), we serialize its value using the
    // normal Sass property logic as well.
    if (node.isCustomProperty && node.parsedAsCustomProperty) {
      _for(node.value, () {
        if (_isCompressed) {
          _writeFoldedValue(node);
        } else {
          _writeReindentedValue(node);
        }
      });
    } else {
      _writeOptionalSpace();
      try {
        _buffer.forSpan(
          node.valueSpanForMap,
          () => node.value.value.accept(this),
        );
      } on MultiSpanSassScriptException catch (error, stackTrace) {
        throwWithTrace(
          MultiSpanSassException(
            error.message,
            node.value.span,
            error.primaryLabel,
            error.secondarySpans,
          ),
          error,
          stackTrace,
        );
      } on SassScriptException catch (error, stackTrace) {
        throwWithTrace(
          SassException(error.message, node.value.span),
          error,
          stackTrace,
        );
      }
    }
  }

  /// Emits the value of [node], with all newlines followed by whitespace
  void _writeFoldedValue(CssDeclaration node) {
    var scanner = StringScanner((node.value.value as SassString).text);
    while (!scanner.isDone) {
      var next = scanner.readChar();
      if (next != $lf) {
        _buffer.writeCharCode(next);
        continue;
      }

      _buffer.writeCharCode($space);
      while (scanner.peekChar().isWhitespace) {
        scanner.readChar();
      }
    }
  }

  /// Emits the value of [node], re-indented relative to the current indentation.
  void _writeReindentedValue(CssDeclaration node) {
    var value = (node.value.value as SassString).text;

    switch (_minimumIndentation(value)) {
      case null:
        _buffer.write(value);
      case -1:
        _buffer.write(trimAsciiRight(value, excludeEscape: true));
        _buffer.writeCharCode($space);
      case var minimumIndentation:
        _writeWithIndent(
          value,


em,1.8em,2.2em);font-style:bold;margin-left:20px;padding:13px;margin-bottom:1rem}section.card .main-info p{font-family:"Euclid Circular A",sans-serif;font-weight:400;font-size:clamp(1.4em,1.6em,2em);font-style:normal;color:#666;margin-bottom:2rem}section.card .subscription-stats{flex-grow:1}section.card .subscription-stats h4{font-family:"Euclid Circular A",sans-serif;font-weight:400;font-size:1.5em;font-style:normal;margin-left:20px;padding:13px;margin-bottom:1.5rem}section.card .subscription-stats ul{list-style-type:none;padding-left:0}section.card .subscription-stats ul li{font-family:"Euclid Circular A",sans-serif;font-weight:400;font-size:1.1em;font-style:normal;margin-bottom:1rem;position:relative;padding-left:1.5rem}section.card .subscription-stats ul li::before{content:"\f00c";font-family:"Font Awesome 5 Free";font-weight:600;position:absolute;left:0;color:green}section.card button.filled-web-btn{width:100%;height:50px;background-color:#008DAA;font-family:"Euclid Circular A",sans-serif;font-weight:400;font-size:1.2em;font-style:normal;color:white;border-radius:8px;margin-top:2rem;font-weight:bold;transition:all 0.3s ease}section.card button.filled-web-btn:hover{transform:translateY(-2px);box-shadow:0 5px 15px rgba(0,0,0,0.2)}article#cards-container{display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch;gap:30px;margin-top:5rem;padding:20px;width:100%;box-sizing:border-box}@media (max-width:1000px){article#cards-container{flex-direction:column;align-items:center;gap:50px;padding:20px 10px}article#cards-container section.card{margin:0;width:80%;height:auto}}@media (max-width:400px){section.card{padding:1.5rem;min-height:auto}section.card .main-info h3{font-size:1.5em!important}section.card .main-info p{font-size:1.2em!important}section.card .subscription-stats h4{font-size:1.3em!important}section.card .subscription-stats ul li{font-size:1em!important}}@charset "UTF-8";article#website-testimonials{margin-top:20rem;overflow:hidden}article#website-testimonials h1{text-align:center;margin-bottom:2rem;font-family:"Euclid Circular A",sans-serif;font-weight:400;font-size:clamp(1.5em,3.5em,5em);font-style:bolder;margin-left:20px;padding:13px}article#website-testimonials div.reviews-flex-wrapper{display:flex;flex-wrap:wrap;flex-direction:column;justify-content:space-evenly;align-items:center;gap:10px}article#website-testimonials div.reviews-flex-wrapper div.reviews-row{width:100%;display:flex;gap:10px;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-around}article#website-testimonials div.reviews-flex-wrapper div.reviews-row-bottom{width:100%;display:flex;gap:10px;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-evenly}article#website-testimonials section.review-card{border-radius:8px;padding:1.5rem;


;
}
extern "C" {
    pub fn rte_uuid_compare(a: *mut ::std::os::raw::c_uchar, b: *mut ::std::os::raw::c_uchar) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rte_uuid_parse(
        in_: *const ::std::os::raw::c_char,
        uu: *mut ::std::os::raw::c_uchar,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rte_uuid_unparse(uu: *mut ::std::os::raw::c_uchar, out: *mut ::std::os::raw::c_char, len: size_t);
}
pub const rte_intr_mode_RTE_INTR_MODE_NONE: rte_intr_mode = 0;
pub const rte_intr_mode_RTE_INTR_MODE_LEGACY: rte_intr_mode = 1;
pub const rte_intr_mode_RTE_INTR_MODE_MSI: rte_intr_mode = 2;
pub const rte_intr_mode_RTE_INTR_MODE_MSIX: rte_intr_mode = 3;
pub type rte_intr_mode = ::std::os::raw::c_uint;
pub const rte_proc_type_t_RTE_PROC_AUTO: rte_proc_type_t = -1;
pub const rte_proc_type_t_RTE_PROC_PRIMARY: rte_proc_type_t = 0;
pub const rte_proc_type_t_RTE_PROC_SECONDARY: rte_proc_type_t = 1;
pub const rte_proc_type_t_RTE_PROC_INVALID: rte_proc_type_t = 2;
pub type rte_proc_type_t = ::std::os::raw::c_int;
extern "C" {
    pub fn rte_eal_process_type() -> rte_proc_type_t;
}
extern "C" {
    pub fn rte_eal_iopl_init() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rte_eal_init(argc: ::std::os::raw::c_int, argv: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rte_eal_cleanup() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rte_eal_primary_proc_alive(config_file_path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rte_mp_disable() -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rte_mp_msg {
    pub name: [::std::os::raw::c_char; 64usize],
    pub len_param: ::std::os::raw::c_int,
    pub num_fds: ::std::os::raw::c_int,
    pub param: [u8; 256usize],
    pub fds: [::std::os::raw::c_int; 8usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rte_mp_reply {
    pub nb_sent: ::std::os::raw::c_int,
    pub nb_received: ::std::os::raw::c_int,
    pub msgs: *mut rte_mp_msg,
}
pub type rte_mp_t = ::std::option::Option<
    unsafe extern "C" fn(msg: *const rte_mp_msg, peer: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int,
>;
pub type rte_mp_async_reply_t = ::std::option::Option


4] << 24 | data[5] << 16 | data[6] << 8 | data[7];
	Blowfish_decipher(c, &l, &r);
	data[0] = l >> 24 & 0xff;
	data[1] = l >> 16 & 0xff;
	data[2] = l >> 8 & 0xff;
	data[3] = l & 0xff;
	data[4] = r >> 24 & 0xff;
	data[5] = r >> 16 & 0xff;
	data[6] = r >> 8 & 0xff;
	data[7] = r & 0xff;
	for (j = 0; j < 8; j++)
		data[j] ^= iva[j];
}
DEF_WEAK(blf_cbc_decrypt);

#if 0
void
report(u_int32_t data[], u_int16_t len)
{
	u_int16_t i;
	for (i = 0; i < len; i += 2)
		printf("Block %0hd: %08lx %08lx.\n",
		    i / 2, data[i], data[i + 1]);
}
void
main(void)
{

	blf_ctx c;
	char    key[] = "AAAAA";
	char    key2[] = "abcdefghijklmnopqrstuvwxyz";

	u_int32_t data[10];
	u_int32_t data2[] =
	{0x424c4f57l, 0x46495348l};

	u_int16_t i;

	/* First test */
	for (i = 0; i < 10; i++)
		data[i] = i;

	blf_key(&c, (u_int8_t *) key, 5);
	blf_enc(&c, data, 5);
	blf_dec(&c, data, 1);
	blf_dec(&c, data + 2, 4);
	printf("Should read as 0 - 9.\n");
	report(data, 10);

	/* Second test */
	blf_key(&c, (u_int8_t *) key2, strlen(key2));
	blf_enc(&c, data2, 1);
	printf("\nShould read as: 0x324ed0fe 0xf413a203.\n");
	report(data2, 2);
	blf_dec(&c, data2, 1);
	report(data2, 2);
}
#endif


u05E9\u05D5 \u05D1\u05DE\u05E0\
  \u05EA\u05D7\u2026"
lastmod: '2024-03-13T22:44:39.098847-06:00'
model: gpt-4-0125-preview
summary: "\u05E2\u05D1\u05D5\u05D3\u05D4 \u05E2\u05DD TOML \u05D1-VBA \u05DB\u05D5\
  \u05DC\u05DC\u05EA \u05E0\u05D9\u05EA\u05D5\u05D7 \u05E7\u05D5\u05D1\u05E5 TOML\
  \ \u05DC\u05E7\u05E8\u05D9\u05D0\u05EA \u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05D0\
  \u05D5 \u05EA\u05E6\u05D5\u05E8\u05D5\u05EA \u05DC\u05EA\u05D5\u05DA \u05E4\u05E8\
  \u05D5\u05D9\u05E7\u05D8 VBA \u05E9\u05DC\u05DA."
title: "\u05E2\u05D5\u05D1\u05D3\u05D9\u05DD \u05E2\u05DD TOML"
weight: 39
---

## איך ל:
עבודה עם TOML ב-VBA כוללת ניתוח קובץ TOML לקריאת הגדרות או תצורות לתוך פרויקט VBA שלך. ל-VBA אין תמיכה פנימית עבור TOML, אז בדרך כלל תשתמשו במנתח או תמירו נתוני TOML לפורמט ש-VBA יכול לעבוד איתו בקלות, כמו JSON או XML. הנה איך לנתח באופן ידני קובץ תצורה פשוט של TOML:

1. **דוגמת קובץ TOML** (`config.toml`):
```
title = "TOML Example"

[database]
server = "192.168.1.1"
ports = [ 8000, 8001, 8002 ]
connection_max = 5000
enabled = true
```

2. **קוד VBA לניתוח TOML**:

בהנחה שתוכן TOML נקרא לתוך משתנה מחרוזת `tomlStr`, הקוד VBA הבא מדגים גישה פשטנית לניתוח הסעיף `[database]`:

```vb
Function ParseTOML(tomlStr As String)
    Dim lines() As String
    lines = Split(tomlStr, vbCrLf)

    Dim config As Object
    Set config = CreateObject("Scripting.Dictionary")
    Dim currentSection As String
    currentSection = ""

    Dim i As Integer
    For i = 0 To UBound(lines)
        Dim line As String
        line = Trim(lines(i))
        If InStr(line, "[") > 0 And InStr(line, "]") > 0 Then
            currentSe


 typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1);
            return vector_data3(*i0 , *i1 , *i2);
        }
        template <typename Sequence>
        BOOST_FUSION_GPU_ENABLED
        static vector_data3
        init_from_sequence(Sequence& seq)
        {
            typedef typename result_of::begin<Sequence>::type I0;
            I0 i0 = fusion::begin(seq);
            typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1);
            return vector_data3(*i0 , *i1 , *i2);
        }
        T0 m0; T1 m1; T2 m2;
    };
    template <typename T0 , typename T1 , typename T2>
    struct vector3
      : vector_data3<T0 , T1 , T2>
      , sequence_base<vector3<T0 , T1 , T2> >
    {
        typedef vector3<T0 , T1 , T2> this_type;
        typedef vector_data3<T0 , T1 , T2> base_type;
        typedef mpl::vector3<T0 , T1 , T2> types;
        typedef vector_tag fusion_tag;
        typedef fusion_sequence_tag tag;
        typedef mpl::false_ is_view;
        typedef random_access_traversal_tag category;
        typedef mpl::int_<3> size;
        BOOST_FUSION_GPU_ENABLED
        vector3() {}
        BOOST_FUSION_GPU_ENABLED
        vector3(
            typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2)
            : base_type(_0 , _1 , _2) {}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
        template <typename U0 , typename U1 , typename U2>
        BOOST_FUSION_GPU_ENABLED
        vector3(U0 && _0 , U1 && _1 , U2 && _2)
            : base_type(std::forward<U0>(_0) , std::forward<U1>(_1) , std::forward<U2>(_2)) {}
        BOOST_FUSION_GPU_ENABLED
        vector3(vector3&& rhs)
            : base_type(std::forward<base_type>(rhs)) {}
        BOOST_FUSION_GPU_ENABLED
        vector3(vector3 const& rhs)
            : base_type(static_cast<base_type const&>(rhs)) {}
        BOOST_FUSION_GPU_ENABLED
        vector3&
        operator=(vector3 const& vec)
        {
            base_type::operator=(vec);
            return *this;
        }
        BOOST_FUSION_GPU_ENABLED
        vector3&
        operator=(vector3&& vec)
        {
            this->m0 = std::forward< T0>(vec.m0); this->m1 = std::forward< T1>(vec.m1); this->m2 = std::forward< T2>(vec.m2);
            return *this;
        }
# endif
        template <typename U0 , typename U1 , typename U2>
        BOOST_FUSION_GPU_ENABLED
        vector3(
            vector3<U0 , U1 , U2> const& vec)
            : base_type(vec.m0 , vec.m1 , vec.m2) {}
        template <typename Sequence>
        BOOST_FUSION_GPU_ENABLED
        vector3(
            Sequence const& seq
            )
            : base_type(base_type::init_from_sequence(seq)) {}
        tem


15}, "zerolinecolor": "white", "automargin": true, "zerolinewidth": 2}, "scene": {"xaxis": {"backgroundcolor": "#E5ECF6", "gridcolor": "white", "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white", "gridwidth": 2}, "yaxis": {"backgroundcolor": "#E5ECF6", "gridcolor": "white", "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white", "gridwidth": 2}, "zaxis": {"backgroundcolor": "#E5ECF6", "gridcolor": "white", "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white", "gridwidth": 2}}, "shapedefaults": {"line": {"color": "#2a3f5f"}}, "annotationdefaults": {"arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1}, "geo": {"bgcolor": "white", "landcolor": "#E5ECF6", "subunitcolor": "white", "showland": true, "showlakes": true, "lakecolor": "white"}, "title": {"x": 0.05}, "mapbox": {"style": "light"}}}, "legend": {"orientation": "h", "yanchor": "bottom", "y": 1.02, "xanchor": "right", "x": 1}}}, "details": {"parts": [{"title": "Age_x0_q3 by target", "id": "ColumnSummaryMetric-8-age_x0_q3_by_target"}], "insights": []}}, "insights": [], "alerts": [], "tabs": [], "widgets": [], "pageSize": 5, "source_fingerprint": "47123e9531d4f3336eeb2ae1e176d336"}, {"type": "rich_data", "title": "", "size": 2, "id": "ColumnSummaryMetric-9", "details": "", "alertsPosition": null, "alertStats": null, "params": {"header": "Age_x0_q4", "description": "num", "metricsValuesHeaders": ["current", "reference"], "metrics": [{"label": "count", "values": ["300", "20678"]}, {"label": "mean", "values": ["0.19", "0.19"]}, {"label": "std", "values": ["0.39", "0.39"]}, {"label": "min", "values": ["0.0", "0.0"]}, {"label": "25%", "values": ["0.0", "0.0"]}, {"label": "50%", "values": ["0.0", "0.0"]}, {"label": "75%", "values": ["0.0", "0.0"]}, {"label": "max", "values": ["1.0", "1.0"]}, {"label": "unique", "values": ["2 (0.67%)", "2 (0.01%)"]}, {"label": "most common", "values": ["0.0 (81.33%)", "0.0 (80.93%)"]}, {"label": "missing", "values": ["0 (0.0%)", "0 (0.0%)"]}, {"label": "infinite", "values": ["0 (0.0%)", "0 (0.0%)"]}], "graph": {"data": [{"marker": {"color": "#ed0400"}, "name": "current", "x": [0.0, 0.045454545454545456, 0.09090909090909091, 0.13636363636363635, 0.18181818181818182, 0.2272727272727273, 0.2727272727272727, 0.3181818181818182, 0.36363636363636365, 0.40909090909


.param

class TestEditDistance:
    def test_unknown_distance_algorithm(self):
        with pytest.raises(ValueError) as excinfo:
            _ = EditDistance(2)
        assert "unknown distance algorithm" == str(excinfo.value)

    def test_missing_custom_comparer(self):
        with pytest.raises(ValueError) as excinfo:
            _ = EditDistance(DistanceAlgorithm.USER_PROVIDED)
        assert "no comparer passed in" in str(excinfo.value)

    def test_abstract_distance_comparer(self):
        with pytest.raises(TypeError) as excinfo:
            comparer = AbstractDistanceComparer()
            _ = comparer.distance("string_1", "string_2", 10)
        assert str(excinfo.value).startswith(
            "Can't instantiate abstract class AbstractDistanceComparer"
        )

    def test_warn_when_builtin_comparer_override_custom_comparer(self):
        with pytest.warns(UserWarning, match="A built-in comparer will be used.$"):
            comparer = CustomDistanceComparer()
            edit_distance = EditDistance(DistanceAlgorithm.LEVENSHTEIN, comparer)

    def test_internal_distance_comparer(self, get_edit_distance):
        edit_distance, expected = get_edit_distance
        assert isinstance(edit_distance._distance_comparer, expected)

    def test_comparer_match_ref(self, get_comparer, get_strings):
        comparer, expected = get_comparer
        strings, max_distance = get_strings

        for s1 in strings:
            for s2 in strings:
                assert expected(s1, s2, max_distance) == comparer.distance(
                    s1, s2, max_distance
                )

    def test_editdistance_use_custom_comparer(self, get_strings):
        strings, max_distance = get_strings
        comparer = CustomDistanceComparer()
        edit_distance = EditDistance(DistanceAlgorithm.USER_PROVIDED, comparer)

        for s1 in strings:
            for s2 in strings:
                assert -2 == comparer.distance(s1, s2, max_distance)

    def test_comparer_null_distance(self, get_comparer, get_short_and_long_strings):
        comparer, _ = get_comparer

        for s1, s2, expected in get_short_and_long_strings:
            distance = comparer.distance(s1, s2, 10)
            assert expected["null"] == distance

    def test_comparer_negative_max_distance(
        self, get_comparer, get_short_and_long_strings
    ):
        comparer, _ = get_comparer

        for s1, s2, expected in get_short_and_long_strings:
            distance = comparer.distance(s1, s2, 0)
            assert expected["zero"] == distance

        for s1, s2, expected in get_short_and_long_strings:
            distance = comparer.distance(s1, s2, 0)
            assert expected["neg"] == distance

    def test_comparer_very_long_string(self, get_comparer):
        comparer, _ = get_comparer
        distance = comparer.distance(SHORT_STRING, VERY_LONG_STRING, 5)

        assert -1 == distance


.

Website: https://peteg.org/beasts/beasts.html

Wikipedia: https://en.wikipedia.org/wiki/Beast_(video_game)

### Behacked

Matching game with the goal of getting a group of four
connected gems, written with ncurses.

Website: https://github.com/Pentachoron-Labs/Behacked

Wikipedia: https://en.wikipedia.org/wiki/Bejeweled

### beyond the tesseract

A highly conceptual game in which you interact with abstract
concepts and mathematical entities as if they were tangible.

Website: https://www.wurb.com/if.php/game/211

**Play**: `telnet or ssh on sdf.org`

### blocks

A block-based puzzle game.

### bluemoon

[![asciicast](https://asciinema.org/a/486306.svg)](https://asciinema.org/a/486306)

The Blue Moon card solitaire.

Website: http://www.catb.org/~esr/bluemoon/

### bj

a black-jack card game.

**Play**: `telnet or ssh on sdf.org`

### BootMine

![Alt Text](https://raw.githubusercontent.com/io12/BootMine/master/demo.gif)

Bootable minesweeper game in a 512-byte boot sector.

Website: https://github.com/io12/BootMine

Wikipedia: https://en.wikipedia.org/wiki/Minesweeper_(video_game)

### BootRogue

[![asciicast](https://asciinema.org/a/487008.svg)](https://asciinema.org/a/487008)

is a roguelike game that fits in a boot sector (510 bytes).

Website: https://github.com/nanochess/bootRogue

### boggle

Word search game. It's a BSD game.

Website: https://man.openbsd.org/boggle.6

Wikipedia: https://en.wikipedia.org/wiki/Boggle

**Play**: `telnet mud.darkerrealms.org 2000`

### bombardier

[![asciicast](https://asciinema.org/a/486231.svg)](https://asciinema.org/a/486231)

Clone of the old Blitz16 game on Commodore 16/Plus 4.

Website: https://packages.debian.org/en/sid/i386/games/bombardier

### boulder dash

A Boulder Dash game clone for your favorite terminal. You are
trapped in the CAVEZ of PHEAR, your mission is to escape
through all the caves and make it out alive. To escape
through a cave you will have to find all the diamonds located
in it. Once you've found all the diamonds, their powers
combined will help you get to the next cave, one step
closer to freedom.

Wikipedia: https://en.wikipedia.org/wiki/Boulder_Dash

### bowling

[![asciicast](https://asciinema.org/a/41475.svg)](https://asciinema.org/a/41475)

Python bowling game using the Blessed terminal library.

Website: https://github.com/haliphax/pybowl

### braincurses

[![asciicast](https://asciinema.org/a/486307.svg)](https://asciinema.org/a/486307)

A nice version of the mastermind game.

Website: https://sourceforge.net/projects/braincurses/

### Bricks

[![asciicast](https://asciinema.org/a/487020.svg)](https://asciinema.org/a/487020)

A game of bricks and paddle on one boot sector (510 bytes).

Website: https://gi


有先进性就拿出来，我虚心向你们学习。像这样挂羊头卖狗肉的团员，我就是瞧不起！班上很多的团员比同学还不如，这样的团不加入比加入的好。

   党不能克服“三害”，但要什么制度才能克服，我没有考虑过。有差别就有矛盾，矛盾只能最大限度的缓和，不能根本解决；矛盾产生的根源是什么，我没有考虑过。

   反对在学校建立党委制，而应该在学校实行“民主治校”、“教授治校”；外行不能领导内行，让有学问的人来领导教学工作以及科研工作。应该把我们学校的党委书记换掉。

   我同意储安平的很多论点，的确是这样，每个单位都要安一个党员作头儿是一点不假，党到处都派有他的党员，不相信群众。

   邓××(物理系一年级)：马列主义是否是真理？很成问题。它的前途我很怀疑，我们应该批判的接受马列主义。

   共产党已经腐朽了，人民内部矛盾日益尖锐，矛盾是不能彻底解决的，只能暂时缓和；矛盾日益尖锐，社会上就会产生庞大的官僚机构，阻碍生产力的发展，所以到共产主义可能还有一个新的东西来代替。

   李××(中文系一年级)：世界上没有一个彻头彻尾的百分之百的马克思主义者，也没有一个百分之百的唯心主义者；前者中间有后者的成分，后者中间也有前者的成分。列宁和毛主席还没有经过充分的时间考验，其唯心主义成分还没有发现，其实，也并非百分之百的马克思主义者。

   ……做一个社会主义大学生，应当有充分的思想自由。我是相信马克思主义的，但对每个大学生来说，可以学唯物论，也可以学唯心论，二者应当让人自由选择，高兴学什么就学什么。要人家觉得这一个主义好就学，觉得不好就不学。一个人在大街上喊“我要打倒共产党”！只要不拿枪支的打，也不会判死刑，因为这是思想自由！

   关××(中


    new_mean, color='gray', linestyle='--')

    mean_label.remove()
    mean_label = ax.text(
        end_index-1,
        new_mean,
        f"平均值: {new_mean:.2f}",
        ha='right',
        va='bottom',
        color='black',
    )

# 滑块数值更新事件
def slider_update(slider, intake_ax, weight_ax, exercise_ax, intake_arr, exercise_arr,
                  intake_bar, exercise_bar, intake_mean_line, intake_mean_label,
                  exercise_mean_line, exercise_mean_label):

    # 滑块变动时，只显示指定x轴范围的数据，其他位置的文本也隐藏

    def update(val):

        # 获取滑块的值
        start_index, end_index = val
        start_index = int(start_index)
        end_index = int(end_index)

        # 有0.5在滑动时左右边缘就不会显示半个
        # intake_ax.set_xlim(start_index-0.5, end_index+0.5)  # 设置x轴范围
        # weight_ax.set_xlim(start_index-0.5, end_index+0.5)  # 设置x轴范围

        # 选择了滑块范围之后，重新绘制各项图，避免缩小范围后y轴外面还显示文字
        axes = [intake_ax, weight_ax, exercise_ax]
        for ax in axes:

            # 有0.5在滑动时左右边缘就不会显示半个
            ax.set_xlim(start_index-0.5, end_index+0.5)

            for annotation in ax.texts:
                # 取得标签文字的x轴坐标
                x = annotation.get_position()[0]
                # 滑块之外的x轴上标签文字设置不可见，滑块内的设置为可见
                if x < start_index-0.5 or x > end_index+0.5:
                    # annotation.remove()
                    annotation.set_visible(False)
                else:
                    annotation.set_visible(True)

        # 选择滑动块指定范围后，平均值和参考线要重新计算和绘制
        new_intake_mean = np.mean(intake_arr[start_index:end_index])
        new_exercise_mean = np.mean(exercise_arr[start_index:end_index])

        # 在update函数中，intake_mean_line的作用域不是全局范围内，所以不能直接在函数内部引用它。
        # 为了解决这个问题，可以使用 nonlocal 声明将其声明为嵌套作用域内的变量。
        nonlocal intake_mean_line, intake_mean_label, exercise_mean_line, exercise_mean_label

        # update_refrence_line(
        #     intake_ax, intake_arr,
        #     start_index, end_index,
        #     intake_mean_line, intake_mean_label,
        # )

        # 移除旧的参考线和数值文本，并添加新的
        intake_mean_line.remove()
        intake_mean_line = intake_ax.axhline(
            new_intake_mean, color='gray', linestyle='--')

        intake_mean_label.remove()
        intake_mean_label = intake_ax.text(
            start_index,  # 平均线标签文字显示在左边
            new_intake_mean,
            f"平均值: {new_intake_mean:.2f}",
            ha='left',
            va='bottom',
            color='black',
        )
        # 滑块变更返回不显示文字，去看图例(依旧添加文本是因为上面有移除，没有文本移除会报错)
        intake_mean_label.set_visible(False)

        exercise_mean_line.remove()
        exercise_mean_line = exercise_ax.axhline(
            new_exercise_mean, color='#dfebe2', linestyle='--')

        exercise_mean_label.remove()
        exercise_mean_label = exercise_ax.text(
            start_index,
            new_exercise_mean,
            f"平均值: {new_exercise_mean:.2f}",
            ha='left',
            va='bottom',
            color='black',
        )
        # 滑块变更返回不显示文字，去看图例(依旧添加文本是因为上面有移除，没有文本移除会报错)
        exercise_mean_label.set_visible(False)

        # 图例更新即可
        intake_ax.legend(
            [intake_bar, intake_mean_line],
            ['Intake', f'Intake 平均值: {new_intake_mean:.2f}'],
            loc="upper right",
            bbox_to_anchor=(0.93, 1.01)
        )

        exercise_ax.legend(
            [exercise_bar, exercise_mean_line],
            ['Exercise', f'Exercise 平均值: {new_exercise_mean:.2f}'],
            loc="upper right",
            bbox_to_anchor=(0.78, 1.01)
        )

        # fig.canvas.draw_idle()  # 重新绘制图形
        # 重新绘制图表
        plt.draw()

    slider.on_changed(update)

# 创建坐标系
def create_plot(dates):
    # 创建坐标系和实例
    fig, intake_ax = plt.subplots(figsize=(16, 8))
    # 设置x轴的刻度和标签
    intake_ax.set_xticks(range(len(dates)))
    intake_ax.set_xticklabels(dates, rotation=90)
    # 设置共用的x轴和不同的y轴的名称和颜色
    intake_ax.set_xlabel("Date (day)")
    intake_ax.set_ylabel("Intake (kcal)", color='green')
    intake_ax.tick_params("y", colors="green")

    # 创建一个与 intake_ax 坐标系共享 x 轴的另一个坐标系 weight_ax
    weight_ax = intake_ax.twinx()
    weight_ax.set_ylabel("Weight (kg)", color='blue')
    weight_ax.tick_params("y", colors="blue")

    # 创建一个与 intake_ax 坐标系共享 x 轴的另一个坐标系 exercise_ax
    exercise_ax = intake_ax.twinx()
    # y轴的刻度和颜色
    exercise_ax.set_ylabel("Exercise (min)", color="grey")
    exercise_ax.tick_params("y", colors="grey")
    # 将y轴右侧边框线从默认位置移动到1.05倍axes的宽度处
    exercise_ax.spines["right"].set_position(("axes"


npmrc")}${
    linkHomeDirFileIfExists(".yarnrc")
  }
      - type: bind
        source: ${path.resolve(workingDir as string)}
        target: /project-folder/
    command: >
      bash -c "yarn config set cache-folder /yarn-cache
      && cd /project-folder
      && echo 'WORKING_DIR  : ${workingDir}'
      && echo 'CWD          :' $PWD
      && echo 'NODE_VERSION : ${nodeVersion}'
      && echo '${command} ${commandArguments}'
      && ${command} ${commandArguments}"
`;
}

function linkHomeDirFileIfExists(filename: string): string {
  const filePath = path.resolve("~/" + filename);
  return existsSync(filePath) ? `      - ${filePath}:/root/${filename}\n` : "";
}
/* tslint:disable */
/* eslint-disable */
/**
 * Selling Partner API for Pricing
 * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.
 *
 * The version of the OpenAPI document: v0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

/**
 * The time range in which an item will likely be shipped once an order has been placed.
 * @export
 * @interface DetailedShippingTimeType
 */
export interface DetailedShippingTimeType {
    /**
     * The minimum time, in hours, that the item will likely be shipped after the order has been placed.
     * @type {number}
     * @memberof DetailedShippingTimeType
     */
    'minimumHours'?: number;
    /**
     * The maximum time, in hours, that the item will likely be shipped after the order has been placed.
     * @type {number}
     * @memberof DetailedShippingTimeType
     */
    'maximumHours'?: number;
    /**
     * The date when the item will be available for shipping. Only displayed for items that are not currently available for shipping.
     * @type {string}
     * @memberof DetailedShippingTimeType
     */
    'availableDate'?: string;
    /**
     * Indicates whether the item is available for shipping now, or on a known or an unknown date in the future. If known, the availableDate property indicates the date that the item will be available for shipping. Possible values: NOW, FUTURE_WITHOUT_DATE, FUTURE_WITH_DATE.
     * @type {string}
     * @memberof DetailedShippingTimeType
     */
    'availabilityType'?: DetailedShippingTimeTypeAvailabilityTypeEnum;
}

export const DetailedShippingTimeTypeAvailabilityTypeEnum = {
    Now: 'NOW',
    FutureWithoutDate: 'FUTURE_WITHOUT_DATE',
    FutureWithDate: 'FUTURE_WITH_DATE'
} as const;

export type DetailedShippingTimeTypeAvailabilityTypeEnum = typeof DetailedShippingTimeTypeAvailabilityTypeEnum[keyof typeof DetailedShippingTimeTypeAvailabilityTypeEnum];

import {
  BadRequestException,
  Injectable,
  NotFoundException,
} from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { CreateVideoInput, UpdateVideoInput } from 'src/schema/graphql.schema';
import { In, Repository } from 'typeorm';
import { Video } from './entity/video.entity';

@Injectable