| (state as u8)
}

/// Convert a u8 to a state and action
///
/// # Unsafety
///
/// If this function is called with a byte that wasn't encoded with the `pack`
/// function in this module, there is no guarantee that a valid state and action
/// can be produced.
#[inline]
pub unsafe fn unpack(val: u8) -> (State, Action) {
    (
        // State is stored in bottom 4 bits
        mem::transmute(val & 0x0f),

        // Action is stored in top 4 bits
        mem::transmute(val >> 4),
    )
}
//! Image writer

use core::{cmp, ops::Range};
use std::io::{self, Write};

use anyhow::format_err;
use xmas_elf::{
    program::{SegmentData, Type},
    sections::SectionData,
    symbol_table::Entry as _,
    ElfFile,
};

use crate::{
    dcd::{self, AddressValue},
    ivt, BootData, Ivt,
};

/// ROM bootloader limitation
const MAX_IMAGE_SIZE: u32 = 32 * 1024 * 1024;

const K: u32 = 1024;
const M: u32 = 1024 * K;
const OCRAM_START: u32 = 0x00900000;
const DRAM_START: u32 = 0x80000000;
const OCRAM_SIZE: u32 = 128 * K;
const DRAM_SIZE: u32 = 512 * M;

const OCRAM: Range<u32> = OCRAM_START..OCRAM_START + OCRAM_SIZE;
const DRAM: Range<u32> = DRAM_START..DRAM_START + DRAM_SIZE;

/// Image to write
pub struct Image {
    /// Application data (.text, .rodata, etc.)
    pub app: Vec<u8>,

    /// Optional DCD
    pub dcd: Option<Dcd>,

    /// The address of the entry point
    // NOTE currently hardcoded to point to the "_start" symbol
    pub entry: u32,
}

/// Write commands that initialize the external DDR RAM
pub fn init_ddr() -> Dcd {
    macro_rules! write {
        ($writes:expr, $register:ty, $value:expr) => {
            $writes.push(AddressValue {
                address: <$register>::address() as u32,
                value: $value,
            });
        };
    }

    use pac::{iomuxc, mmdc};

    let mut writes = vec![];

    /* IO configuration */
    // select DDR3 mode for DRAM pins
    write!(writes, iomuxc::SW_PAD_CTL_GRP_DDR_TYPE, 0x000c_0000);

    // disable the pull-up of the DRAM pins
    write!(writes, iomuxc::SW_PAD_CTL_GRP_DDRPKE, 0);

    // disable pull-ups
    write!(writes, iomuxc::SW_PAD_CTL_PAD_DRAM_RESET, 0x8_0030);
    write!(writes, iomuxc::SW_PAD_CTL_PAD_DRAM_SDBA2, 0);
    write!(writes, iomuxc::SW_PAD_CTL_PAD_DRAM_ODT0, 0x30);
    write!(writes, iomuxc::SW_PAD_CTL_PAD_DRAM_ODT1, 0x30);
    // FIXME(txt2rust) register `SW_PAD_CTL_PAD_DRAM_SDQS0_P` is missing
    writes.push(AddressValue {
        address: 0x020e0280,
        value: 0x30,
    });
    // FIXME(txt2rust) register `SW_PAD_CTL_PAD_DRAM_SDQS1_P` is missing
    writes.push(AddressValue {
        address: 0x020e0284,
        value: 0x30,
    });

    // differential input mode
    write!(writes, iomuxc::SW_PAD_CTL_GRP_DDRMODE_CTL, 0x0002_0000);
    write!(writes, iomuxc::SW_PAD_CTL_GRP_DDRMODE, 0x0002_0000);

    /* DDR RAM configuration */


ToRelative(19.92f, 19.92f, 0.0f, false, true, -7.51f, 15.62f)
                lineTo(84.51f, 133.0f)
                arcTo(43.8f, 43.8f, 0.0f, false, false, 68.0f, 167.38f)
                verticalLineTo(224.0f)
                arcToRelative(20.0f, 20.0f, 0.0f, false, false, 20.0f, 20.0f)
                horizontalLineTo(192.0f)
                arcToRelative(20.0f, 20.0f, 0.0f, false, false, 20.0f, -20.0f)
                verticalLineTo(211.47f)
                arcTo(274.77f, 274.77f, 0.0f, false, false, 180.68f, 84.0f)
                close()
                moveTo(84.0f, 36.0f)
                horizontalLineToRelative(68.0f)
                arcToRelative(36.0f, 36.0f, 0.0f, false, true, 33.94f, 24.0f)
                horizontalLineTo(84.0f)
                close()
                moveTo(188.0f, 211.47f)
                verticalLineTo(220.0f)
                horizontalLineTo(92.0f)
                verticalLineTo(167.38f)
                arcToRelative(19.92f, 19.92f, 0.0f, false, true, 7.51f, -15.62f)
                lineToRelative(16.0f, -12.78f)
                arcTo(43.8f, 43.8f, 0.0f, false, false, 132.0f, 104.62f)
                verticalLineTo(84.0f)
                horizontalLineToRelative(21.24f)
                arcTo(250.93f, 250.93f, 0.0f, false, true, 188.0f, 211.47f)
                close()
            }
        }
        .build()
        return _sprayBottle!!
    }

private var _sprayBottle: ImageVector? = null
package com.adammcneilly.toa.addtask.ui

import com.adammcneilly.toa.CoroutinesTestRule
import com.adammcneilly.toa.R
import com.adammcneilly.toa.addtask.domain.model.TaskInput
import com.adammcneilly.toa.core.models.Task
import com.adammcneilly.toa.core.ui.UIText
import org.junit.Rule
import org.junit.Test
import java.time.Instant
import java.time.LocalDate
import java.time.ZoneId

class AddTaskViewModelTest {
    private val testRobot = AddTaskViewModelRobot()

    @get:Rule
    val coroutineTestRule = CoroutinesTestRule()

    @Test
    fun createWithInitialDateFromSavedStateHandle() {
        val initialDate = LocalDate.now().plusDays(1)

        val expectedViewState = AddTaskViewState.Initial(
            initialDate = initialDate,
        )

        testRobot
            .mockInitialDate(initialDate)
            .buildViewModel()
            .assertViewState(expectedViewState)
    }

    @Test
    fun submitWithEmptyDescription() {
        val taskToSubmit = Task(
            id = "Testing",
            description = "",
            scheduledDateMillis = 0L,
            completed = false,
        )

        val expectedViewState = AddTaskViewState.Active(
            taskInput = TaskInput(
                description = taskToSubmit.description,
                scheduledDate = Instant.ofEpochMilli(taskToSubmit.scheduledDateMillis)
                    .atZone(ZoneId.systemDefault())
                    .toLocalDate(),
            ),
            descriptionInputErrorMessage = UIText.ResourceText(R.string.err_empty_task_description),
        )

        testRobot
            .mockInitialDate(LocalDate.now())
            .buildViewModel()
            .enterDescription(taskToSubmit.description)
            .selectDate(taskToSubmit.scheduledDateMillis)
            .clickSubmit()
            .assertViewState(expectedViewState)
    }
}
package com.adammcneill


tate FAR *state;

    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;
    if (check)
        state->wrap |= 4;
    else
        state->wrap &= ~4;
    return Z_OK;
}

long ZEXPORT inflateMark(strm)
z_streamp strm;
{
    struct inflate_state FAR *state;

    if (inflateStateCheck(strm))
        return -(1L << 16);
    state = (struct inflate_state FAR *)strm->state;
    return (long)(((unsigned long)((long)state->back)) << 16) +
        (state->mode == COPY ? state->length :
            (state->mode == MATCH ? state->was - state->length : 0));
}

unsigned long ZEXPORT inflateCodesUsed(strm)
z_streamp strm;
{
    struct inflate_state FAR *state;
    if (inflateStateCheck(strm)) return (unsigned long)-1;
    state = (struct inflate_state FAR *)strm->state;
    return (unsigned long)(state->next - state->codes);
}


s or those who do
# not have an associated paper.
MODELS_NOT_IN_README = [
    "BertJapanese",
    "Encoder decoder",
    "FairSeq Machine-Translation",
    "HerBERT",
    "RetriBERT",
    "Speech Encoder decoder",
    "Speech2Text",
    "Speech2Text2",
    "TimmBackbone",
    "Vision Encoder decoder",
    "VisionTextDualEncoder",
    "CLIPVisionModel",
    "SiglipVisionModel",
    "ChineseCLIPVisionModel",
    "VitPoseBackbone",
]

# Template for new entries to add in the main README when we have missing models.
README_TEMPLATE = (
    "1. **[{model_name}](https://huggingface.co/docs/main/transformers/model_doc/{model_type})** (from "
    "<FILL INSTITUTION>) released with the paper [<FILL PAPER TITLE>](<FILL ARKIV LINK>) by <FILL AUTHORS>."
)

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("--file", type=str, default=None, help="A specific file to check and/or fix")
    parser.add_argument("--fix_and_overwrite", action="store_true", help="Whether to fix inconsistencies.")
    args = parser.parse_args()

    check_copies(args.fix_and_overwrite, args.file)
    check_full_copies(args.fix_and_overwrite)


word = ":raised_hand:", label = "✋ :raised_hand:", insertText = "✋", filterText = ":raised_hand:" },
		{ word = ":v:", label = "✌ :v:", insertText = "✌", filterText = ":v:" },
		{
			word = ":writing_hand:",
			label = "✍ :writing_hand:",
			insertText = "✍",
			filterText = ":writing_hand:",
		},
		{ word = ":pencil2:", label = "✏ :pencil2:", insertText = "✏", filterText = ":pencil2:" },
		{ word = ":black_nib:", label = "✒ :black_nib:", insertText = "✒", filterText = ":black_nib:" },
		{
			word = ":heavy_check_mark:",
			label = "✔ :heavy_check_mark:",
			insertText = "✔",
			filterText = ":heavy_check_mark:",
		},
		{
			word = ":heavy_multiplication_x:",
			label = "✖ :heavy_multiplication_x:",
			insertText = "✖",
			filterText = ":heavy_multiplication_x:",
		},
		{ word = ":latin_cross:", label = "✝ :latin_cross:", insertText = "✝", filterText = ":latin_cross:" },
		{
			word = ":star_of_david:",
			label = "✡ :star_of_david:",
			insertText = "✡",
			filterText = ":star_of_david:",
		},
		{ word = ":sparkles:", label = "✨ :sparkles:", insertText = "✨", filterText = ":sparkles:" },
		{
			word = ":eight_spoked_asterisk:",
			label = "✳ :eight_spoked_asterisk:",
			insertText = "✳",
			filterText = ":eight_spoked_asterisk:",
		},
		{
			word = ":eight_pointed_black_star:",
			label = "✴ :eight_pointed_black_star:",
			insertText = "✴",
			filterText = ":eight_pointed_black_star:",
		},
		{ word = ":snowflake:", label = "❄ :snowflake:", insertText = "❄", filterText = ":snowflake:" },
		{ word = ":sparkle:", label = "❇ :sparkle:", insertText = "❇", filterText = ":sparkle:" },
		{ word = ":x:", label = "❌ :x:", insertText = "❌", filterText = ":x:" },
		{
			word = ":negative_squared_cross_mark:",
			label = "❎ :negative_squared_cross_mark:",
			insertText = "❎",
			filterText = ":negative_squared_cross_mark:",
		},
		{ word = ":question:", label = "❓ :question:", insertText = "❓", filterText = ":question:" },
		{ word = ":grey_question:", label = "❔ :grey_question:", insertText = "❔", filterText = ":grey_question:" },
		{
			word = ":grey_exclamation:",
			label = "❕ :grey_exclamation:",
			insertText = "❕",
			filterText = ":grey_exclamation:",
		},
		{ word = ":exclamation:", label = "❗ :exclamation:", insertText = "❗", filterText = ":exclamation:" },
		{
			word = ":heavy_exclamation_mark:",
			label = "❗ :heavy_exclamation_mark:",
			insertText = "❗",
			filterText = ":heavy_exclam


t<DebugCurve>();
        //            foreach (LgNodeInfo node in Graph.Nodes.Select(n => NodeToLgNodeInfo(n))) {
        //                l.Add(new DebugCurve(200, 1, "blue", node.BoundaryCurve, String.Format("{0:###.#}", node.ZoomLevel)));
        //                l.Add(new DebugCurve(100, 1, "black", node.DominatedRect.Perimeter()));
        //                l.Add(new DebugCurve(new LineSegment(node.BoundaryCurve[0], node.DominatedRect.Center)));
        //            }
        //            LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
        //        }

    }
}


", b"repr:short") => modifiers.weekday_repr = Some(WeekdayRepr::Short),
                (b"weekday", b"repr:long") => modifiers.weekday_repr = Some(WeekdayRepr::Long),
                (b"weekday", b"repr:sunday") => modifiers.weekday_repr = Some(WeekdayRepr::Sunday),
                (b"weekday", b"repr:monday") => modifiers.weekday_repr = Some(WeekdayRepr::Monday),
                (b"weekday", b"one_indexed:true") => modifiers.weekday_is_one_indexed = Some(true),
                (b"weekday", b"one_indexed:false") => {
                    modifiers.weekday_is_one_indexed = Some(false)
                }
                (b"week_number", b"repr:iso") => {
                    modifiers.week_number_repr = Some(WeekNumberRepr::Iso)
                }
                (b"week_number", b"repr:sunday") => {
                    modifiers.week_number_repr = Some(WeekNumberRepr::Sunday)
                }
                (b"week_number", b"repr:monday") => {
                    modifiers.week_number_repr = Some(WeekNumberRepr::Monday)
                }
                (b"year", b"repr:full") => modifiers.year_repr = Some(YearRepr::Full),
                (b"year", b"repr:last_two") => modifiers.year_repr = Some(YearRepr::LastTwo),
                (b"year", b"base:calendar") => modifiers.year_is_iso_week_based = Some(false),
                (b"year", b"base:iso_week") => modifiers.year_is_iso_week_based = Some(true),
                _ => {
                    return Err(InvalidFormatDescription::InvalidModifier {
                        value: String::from_utf8_lossy(modifier).into_owned(),
                        index: *index,
                    });
                }
            }
        }

        Ok(modifiers)
    }
}
/* automatically generated by rust-bindgen */

pub const _LANGINFO_H: u32 = 1;
pub const _NL_TYPES_H: u32 = 1;
pub const _FEATURES_H: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const __USE_ISOC11: u32 = 1;
pub const __USE_ISOC99: u32 = 1;
pub const __USE_ISOC95: u32 = 1;
pub const __USE_POSIX_IMPLICITLY: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
pub const _POSIX_C_SOURCE: u32 = 200809;
pub const __USE_POSIX: u32 = 1;
pub const __USE_POSIX2: u32 = 1;
pub const __USE_POSIX199309: u32 = 1;
pub const __USE_POSIX199506: u32 = 1;
pub const __USE_XOPEN2K: u32 = 1;
pub const __USE_XOPEN2K8: u32 = 1;
pub const _ATFILE_SOURCE: u32 = 1;
pub const __USE_MISC: u32 = 1;
pub const __USE_ATFILE: u32 = 1;
pub const __USE_FORTIFY_LEVEL: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
pub const _STDC_PREDEF_H: u32 = 1;
pub const __STDC_IEC_559__: u32 = 1;
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
pub const __STDC_ISO_10646__: u32 = 201706;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 29;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __glibc_c99_flexarr_available: u32 = 1;
pub const __WORDSIZE: u32 = 64;
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
pub const __SYSCALL_


ttribute__ ((__unused__)))
{
  __builtin_abort ();
  return 0;
}

/* @@@ Retrieve the Backing Store Pointer of the given context.  */
extern _Unwind_Word _Unwind_GetBSP (struct _Unwind_Context *);
#else
extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *);
extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *);
#endif

/* @@@ Given an address, return the entry point of the function that
   contains it.  */
extern void * _Unwind_FindEnclosingFunction (void *pc);

#ifndef __SIZEOF_LONG__
  #error "__SIZEOF_LONG__ macro not defined"
#endif

#ifndef __SIZEOF_POINTER__
  #error "__SIZEOF_POINTER__ macro not defined"
#endif

/* leb128 type numbers have a potentially unlimited size.
   The target of the following definitions of _sleb128_t and _uleb128_t
   is to have efficient data types large enough to hold the leb128 type
   numbers used in the unwind code.
   Mostly these types will simply be defined to long and unsigned long
   except when a unsigned long data type on the target machine is not
   capable of storing a pointer.  */

#if __SIZEOF_LONG__ >= __SIZEOF_POINTER__
  typedef long _sleb128_t;
  typedef unsigned long _uleb128_t;
#elif __SIZEOF_LONG_LONG__ >= __SIZEOF_POINTER__
  typedef long long _sleb128_t;
  typedef unsigned long long _uleb128_t;
#else
# error "What type shall we use for _sleb128_t?"
#endif

#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
/* Handles the mapping from SEH to GCC interfaces.  */
EXCEPTION_DISPOSITION _GCC_specific_handler (PEXCEPTION_RECORD, void *,
					     PCONTEXT, PDISPATCHER_CONTEXT,
					     _Unwind_Personality_Fn);
#endif

#ifdef __cplusplus
}
#endif

#ifndef HIDE_EXPORTS
#pragma GCC visibility pop
#endif

/* Additional actions to unwind number of stack frames.  */
#define _Unwind_Frames_Extra(frames)

/* Increment frame count.  */
#define _Unwind_Frames_Increment(exc, context, frames) frames++

#endif /* unwind.h */


 0x82cbbb58
	sub_82CBBB58(ctx, base);
loc_830F852C:
	// lwz r11,4(r30)
	r11.u64 = PPC_LOAD_U32(r30.u32 + int32_t(4) );
	// rlwimi r31,r11,20,8,11
	r31.u64 = (rotl32(r11.u32, 20) & 0xF00000) | (r31.u64 & 0xFFFFFFFFFF0FFFFF);
	// b 0x830f84d8
	goto loc_830F84D8;
loc_830F8538:
	// clrlwi. r11,r28,24
	r11.u64 = r28.u32 & 0xFF;
	cr0.compare<int32_t>(r11.s32, 0, xer);
	// beq 0x830f8544
	if (cr0.eq) goto loc_830F8544;
	// bl 0x82cbbb58
	sub_82CBBB58(ctx, base);
loc_830F8544:
	// lwz r11,4(r30)
	r11.u64 = PPC_LOAD_U32(r30.u32 + int32_t(4) );
	// rlwimi r31,r11,24,5,7
	r31.u64 = (rotl32(r11.u32, 24) & 0x7000000) | (r31.u64 & 0xFFFFFFFFF8FFFFFF);
	// b 0x830f84d8
	goto loc_830F84D8;
loc_830F8550:
	// clrlwi. r11,r28,24
	r11.u64 = r28.u32 & 0xFF;
	cr0.compare<int32_t>(r11.s32, 0, xer);
	// beq 0x830f855c
	if (cr0.eq) goto loc_830F855C;
	// bl 0x82cbbb58
	sub_82CBBB58(ctx, base);
loc_830F855C:
	// lwz r11,4(r30)
	r11.u64 = PPC_LOAD_U32(r30.u32 + int32_t(4) );
	// rlwimi r31,r11,31,0,0
	r31.u64 = (rotl32(r11.u32, 31) & 0x80000000) | (r31.u64 & 0xFFFFFFFF7FFFFFFF);
	// b 0x830f84d8
	goto loc_830F84D8;
loc_830F8568:
	// clrlwi. r11,r28,24
	r11.u64 = r28.u32 & 0xFF;
	cr0.compare<int32_t>(r11.s32, 0, xer);
	// bne 0x830f8574
	if (!cr0.eq) goto loc_830F8574;
	// bl 0x82cbbb58
	sub_82CBBB58(ctx, base);
loc_830F8574:
	// lwz r11,4(r30)
	r11.u64 = PPC_LOAD_U32(r30.u32 + int32_t(4) );
	// rlwimi r31,r11,8,18,23
	r31.u64 = (rotl32(r11.u32, 8) & 0x3F00) | (r31.u64 & 0xFFFFFFFFFFFFC0FF);
	// b 0x830f84d8
	goto loc_830F84D8;
loc_830F8580:
	// clrlwi. r11,r28,24
	r11.u64 = r28.u32 & 0xFF;
	cr0.compare<int32_t>(r11.s32, 0, xer);
	// bne 0x830f84d8
	if (!cr0.eq) goto loc_830F84D8;
	//


        $Modtime:: 7/23/01 4:46p                                               $*
 *                                                                                *
 *                    $Revision:: 4                                                           $*
 *                                                                                *
 *---------------------------------------------------------------------------------------------*
 * Functions:                                                                                *
 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

#include "grideffect.h"
#include "ww3d.h"
#include "physresourcemgr.h"
#include "vertmaterial.h"
#include "matpass.h"
#include "matrixmapper.h"
#include "rinfo.h"
#include "camera.h"
#include "phys.h"

/***********************************************************************************************
**
** GridEffectClass Implementation
**
***********************************************************************************************/

const float DEFAULT_GRID_PARAMTER_RATE = 0.5f;

GridEffectClass::GridEffectClass(void) :
	CurrentParameter(0.0f),
	TargetParameter(1.0f),
	ParameterRate(DEFAULT_GRID_PARAMTER_RATE),
	LastRenderTime(0),
	RenderBaseMaterial(true),
	RenderGridMaterial(false),
	Stage0Mapper(NULL),
	Stage1Mapper(NULL),
	MaterialPass(NULL)
{
	LastRenderTime = WW3D::Get_Sync_Time();

	MaterialPass = NEW_REF(MaterialPassClass,());

	VertexMaterialClass * vmtl = PhysResourceMgrClass::Create_Emissive_Material();

	Stage0Mapper = NEW_REF(MatrixMapperClass,(0));
	Stage0Mapper->Set_Type(MatrixMapperClass::DEPTH_GRADIENT);
	vmtl->Set_Mapper(Stage0Mapper,0);

	Stage1Mapper = NEW_REF(MatrixMapperClass,(1));
	Stage1Mapper->Set_Type(MatrixMapperClass::DEPTH_GRADIENT);
	vmtl->Set_Mapper(Stage1Mapper,1);

	MaterialPass->Set_Material(vmtl);
	REF_PTR_RELEASE(vmtl);

	ShaderClass shader = ShaderClass::_PresetAdditiveShader;
	shader.Set_Post_Detail_Color_Func(ShaderClass::DETAILCOLOR_ADD);
	MaterialPass->Set_Shader(shader);

	MaterialPass->Set_Texture(PhysResourceMgrClass::Peek_Grid_Texture(),0);
	MaterialPass->Set_Texture(PhysResourceMgrClass::Peek_Grid_Texture(),1);
}

GridEffectClass::~GridEffectClass(void)
{
	REF_PTR_RELEASE(Stage0Mapper);
	REF_PTR_RELEASE(Stage1Mapper);
	REF_PTR_RELEASE(MaterialPass);
}

void GridEffectClass::Render_Push(RenderInfoClass & rinfo,PhysClass * obj)
{
	if (CurrentParameter == TargetParameter) {
		if (CurrentParameter < 0.5f) {
			TargetParameter = 1.0f;
		} else {
			TargetParameter = 0.0f;
		}
	}

	/*
	** Update the grid properties
	** - compute dt since last render
	** - update the parameter
	** - compute the intensity, if it is above 0.0 then:
	** - compute the texture transform given this camera, update the mappers
	** - compute the texel row, update the mappers
	*/
	int millisecs = WW3D::Get_Sync_Time() - LastRenderTime;
	LastRenderTime = WW3D::Get_Sync_Time();
	float dt = (float)millisecs / 1000.0f;

	float parameter_step = ParameterRate * dt;
	if (parameter_step > WWMath::Fabs(TargetParameter - CurrentParameter)) {
		CurrentParameter = TargetParameter;
	} else {
		if (TargetParameter < CurrentParameter) {
			CurrentParameter -= parameter_step;
		} else {
			CurrentParameter += parameter_step;
		}
	}

	static float _angle = 0.0f;
	static float _angle_delta = 0.001f;
	_angle += _angle_delta;

	GridTransform = obj->Get_Transform();

	Matrix3D camera_tm = rinfo.Camera.Get_Transform();

	Matrix3D xgridtm


-17.8-9.9 6-18.8 8.1-27.3 8.3-8.5-.2-17.4-2.3-27.3-8.3 0 0 14.5 17.6 27.2 17.8zm61.7 230.7h-29.4c-4.2 0-7.2.9-8.9 2.7-2.2 2.3-1.5 5.2-.9 6.7 1 2.6 5.5 11.3 13 19.3 2.7 2.9 6.6 4.5 11 4.5s8.7-1.6 11.8-4.2c2.3-2 10.2-9.2 13.7-18.1 1.3-3.3 1-6-.9-7.9-1.3-1.3-4-2.9-9.4-3z"],gulp:[256,512,[],"f3ae","M209.8 391.1l-14.1 24.6-4.6 80.2c0 8.9-28.3 16.1-63.1 16.1s-63.1-7.2-63.1-16.1l-5.8-79.4-14.9-25.4c41.2 17.3 126 16.7 165.6 0zm-196-253.3l13.6 125.5c5.9-20 20.8-47 40-55.2 6.3-2.7 12.7-2.7 18.7.9 5.2 3 9.6 9.3 10.1 11.8 1.2 6.5-2 9.1-4.5 9.1-3 0-5.3-4.6-6.8-7.3-4.1-7.3-10.3-7.6-16.9-2.8-6.9 5-12.9 13.4-17.1 20.7-5.1 8.8-9.4 18.5-12 28.2-1.5 5.6-2.9 14.6-.6 19.9 1 2.2 2.5 3.6 4.9 3.6 5 0 12.3-6.6 15.8-10.1 4.5-4.5 10.3-11.5 12.5-16l5.2-15.5c2.6-6.8 9.9-5.6 9.9 0 0 10.2-3.7 13.6-10 34.7-5.8 19.5-7.6 25.8-7.6 25.8-.7 2.8-3.4 7.5-6.3 7.5-1.2 0-2.1-.4-2.6-1.2-1-1.4-.9-5.3-.8-6.3.2-3.2 6.3-22.2 7.3-25.2-2 2.2-4.1 4.4-6.4 6.6-5.4 5.1-14.1 11.8-21.5 11.8-3.4 0-5.6-.9-7.7-2.4l7.6 79.6c2 5 39.2 17.1 88.2 17.1 49.1 0 86.3-12.2 88.2-17.1l10.9-94.6c-5.7 5.2-12.3 11.6-19.6 14.8-5.4 2.3-17.4 3.8-17.4-5.7 0-5.2 9.1-14.8 14.4-21.5 1.4-1.7 4.7-5.9 4.7-8.1 0-2.9-6-2.2-11.7 2.5-3.2 2.7-6.2 6.3-8.7 9.7-4.3 6-6.6 11.2-8.5 15.5-6.2 14.2-4.1 8.6-9.1 22-5 13.3-4.2 11.8-5.2 14-.9 1.9-2.2 3.5-4


char reserved[7];
} FCGI_UnknownTypeBody;

typedef struct {
    FCGI_Header header;
    FCGI_UnknownTypeBody body;
} FCGI_UnknownTypeRecord;

         9. References

         The WWW Common Gateway Interface at W3C, version CGI/1.1.

         A. Table: Properties of the record types

         The following chart lists all of the record types and indicates these properties of each:

            <TT>WS->App</TT>: records of this type can only be sent by the Web server to the application. Records of
            other types can only be sent by the application to the Web server.

            <TT>management</TT>: records of this type contain information that is not specific to a Web server request,
            and use the null request ID. Records of other types contain request-specific information, and cannot use
            the null request ID.

            <TT>stream</TT>: records of this type form a stream, terminated by a record with empty
            <TT>contentData</TT>. Records of other types are discrete; each carries a meaningful unit of data.

                               WS->App   management  stream

        FCGI_GET_VALUES           x          x
        FCGI_GET_VALUES_RESULT               x
        FCGI_UNKNOWN_TYPE                    x

        FCGI_BEGIN_REQUEST        x
        FCGI_ABORT_REQUEST        x
        FCGI_END_REQUEST
        FCGI_PARAMS               x                    x
        FCGI_STDIN                x                    x
        FCGI_DATA                 x                    x
        FCGI_STDOUT                                    x
        FCGI_STDERR                                    x

         B. Typical Protocol Message Flow

         Additional notational conventions for the examples:

            The <TT>contentData</TT> of stream records (<TT>FCGI_PARAMS</TT>, <TT>FCGI_STDIN</TT>,
            <TT>FCGI_STDOUT</TT>, and <TT>FCGI_STDERR</TT>) is represented as a character string. A string ending in
            <TT>" ... "</TT> is too long to display, so only a prefix is shown.

            Messages sent to the Web server are indented with respect to messages received from the Web server.

            Messages are shown in the time sequence experienced by the application.

         1. A simple request with no data on <TT>stdin</TT>, and a successful response:

{FCGI_BEGIN_REQUEST,   1, {FCGI_RESPONDER, 0}}
{FCGI_PARAMS,          1, "\013\002SERVER_PORT80\013\016SERVER_ADDR199.170.183.42 ... "}
{FCGI_PARAMS,          1, ""}
{FCGI_STDIN,           1, ""}


", 384, 512))},
			{EFontAwesomeIcon.Solid_HandPointLeft, new FontAwesomeInformation("Hand Pointing Left", EFontAwesomeStyle.Solid, "", new FontAwesomeSvgInformation("M44.8 155.826h149.234c-5.841-8.248-10.57-16.558-14.153-24.918C166.248 99.098 189.778 63.986 224 64c18.616.008 32.203 10.897 40 29.092 12.122 28.286 78.648 64.329 107.534 77.323 17.857 7.956 28.453 25.479 28.464 43.845l.002.001v171.526c0 11.812-8.596 21.897-20.269 23.703-46.837 7.25-61.76 38.483-123.731 38.315-2.724-.007-13.254.195-16 .195-50.654 0-81.574-22.122-72.6-71.263-18.597-9.297-30.738-39.486-16.45-62.315-24.645-21.177-22.639-53.896-6.299-70.944H44.8c-24.15 0-44.8-20.201-44.8-43.826 0-23.283 21.35-43.826 44.8-43.826zM440 176h48c13.255 0 24 10.745 24 24v192c0 13.255-10.745 24-24 24h-48c-13.255 0-24-10.745-24-24V200c0-13.255 10.745-24 24-24zm24 212c11.046 0 20-8.954 20-20s-8.954-20-20-20-20 8.954-20 20 8.954 20 20 20z", 512, 512))},
			{EFontAwesomeIcon.Solid_HandPointRight, new FontAwesomeInformation("Hand Pointing Right", EFontAwesomeStyle.Solid, "", new FontAwesomeSvgInformation("M512 199.652c0 23.625-20.65 43.826-44.8 43.826h-99.851c16.34 17.048 18.346 49.766-6.299 70.944 14.288 22.829 2.147 53.017-16.45 62.315C353.574 425.878 322.654 448 272 448c-2.746 0-13.276-.203-16-.195-61.971.168-76.894-31.065-123.731-38.315C120.596 407.683 112 397.599 112 385.786V214.261l.002-.001c.011-18.366 10.607-35.889 28.464-43.845 28.886-12.994 95.413-49.038 107.534-77.323 7.797-18.194 21.384-29.084 40-29.092 34.222-.014 57.752 35.098 44.119 66.908-3.583 8.359-8.312 16.67-14.153 24.918H467.2c23.45 0 44.8 20.543 44.8 43.826zM96 200v192c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V200c0-13.255 10.745-24 24-24h48c13.255 0 24 10.745 24 24zM68 368c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20z", 512, 512))},
			{EFontAwesomeIcon.Solid_HandPointUp, new FontAwesomeInformation("Hand Pointing Up", EFontAwesomeStyle.Solid, "", new FontAwesomeSvgInformation("M135.652 0c23.625 0 43.826 20.65 43.826 44.8v99.851c17.048


				 + n14 * n22 * n31
				 - n12 * n24 * n31
			) +
			n44 * (
				- n13 * n22 * n31
				 - n11 * n23 * n32
				 + n11 * n22 * n33
				 + n13 * n21 * n32
				 - n12 * n21 * n33
				 + n12 * n23 * n31
			)

		);

	},

	transpose: function () {

		var te = this.elements;
		var tmp;

		tmp = te[ 1 ]; te[ 1 ] = te[ 4 ]; te[ 4 ] = tmp;
		tmp = te[ 2 ]; te[ 2 ] = te[ 8 ]; te[ 8 ] = tmp;
		tmp = te[ 6 ]; te[ 6 ] = te[ 9 ]; te[ 9 ] = tmp;

		tmp = te[ 3 ]; te[ 3 ] = te[ 12 ]; te[ 12 ] = tmp;
		tmp = te[ 7 ]; te[ 7 ] = te[ 13 ]; te[ 13 ] = tmp;
		tmp = te[ 11 ]; te[ 11 ] = te[ 14 ]; te[ 14 ] = tmp;

		return this;

	},

	setPosition: function ( x, y, z ) {

		var te = this.elements;

		if ( x.isVector3 ) {

			te[ 12 ] = x.x;
			te[ 13 ] = x.y;
			te[ 14 ] = x.z;

		} else {

			te[ 12 ] = x;
			te[ 13 ] = y;
			te[ 14 ] = z;

		}

		return this;

	},

	getInverse: function ( m, throwOnDegenerate ) {

		// based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm
		var te = this.elements,
			me = m.elements,

			n11 = me[ 0 ], n21 = me[ 1 ], n31 = me[ 2 ], n41 = me[ 3 ],
			n12 = me[ 4 ], n22 = me[ 5 ], n32 = me[ 6 ], n42 = me[ 7 ],
			n13 = me[ 8 ], n23 = me[ 9 ], n33 = me[ 10 ], n43 = me[ 11 ],
			n14 = me[ 12 ], n24 = me[ 13 ], n34 = me[ 14 ], n44 = me[ 15 ],

			t11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44,
			t12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44,
			t13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44,
			t14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34;

		var det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14;

		if ( det === 0 ) {

			var msg = "THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0";

			if ( throwOnDegenerate === true ) {

				throw new Error( msg );

			} else {

				console.warn( msg );

			}

			return this.identity();

		}

		var detInv = 1 / det;

		te[ 0 ] = t11 * detInv;
		te[ 1 ] = ( n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 *


// 09 xxx Set Sample Offset
				case 0x09:
				{
					e.FxP = (byte)(parm >> 1);
					e.F2T = Effects.Fx_HiOffset;
					e.F2P = (byte)(parm >> 9);
					break;
				}

				// 0A xyz Volume Slide + Fine Slide Up
				case 0x0a:
				{
					if ((parm & 0xff) != 0)
						e.FxP = (byte)(parm & 0xff);
					else
						e.FxT = 0;

					e.F2T = Effects.Fx_Extended;
					e.F2P = (byte)((Effects.Ex_F_Porta_Up << 4) | ((parm & 0xf00) >> 8));
					break;
				}

				// 0B xxx Position jump
				// 0C xyy Set Volume
				case 0x0b:
				case 0x0c:
				{
					e.FxP = (byte)parm;
					break;
				}

				// 0D xyy Pattern break
				case 0x0d:
				{
					e.FxT = Effects.Fx_It_Break;
					e.FxP = (byte)((parm & 0xff) < 0x40 ? parm : 0);
					break;
				}

				// 0F xxx Set Speed
				case 0x0f:
				{
					if (parm != 0)
					{
						e.FxT = Effects.Fx_S3M_Speed;
						e.FxP = (byte)Math.Min(parm, 255);
					}
					else
						e.FxT = 0;

					break;
				}

				// 13 xxy Glissando Control
				case 0x13:
				{
					e.FxT = Effects.Fx_Extended;
					e.FxP = (byte)((Effects.Ex_Gliss << 4) | (parm & 0x0f));
					break;
				}

				// 14 xxy Set Vibrato Waveform
				case 0x14:
				{
					e.FxT = Effects.Fx_Extended;
					e.FxP = (byte)((Effects.Ex_Vibrato_Wf << 4) | (parm & 0x0f));
					break;
				}

				// 15 xxy Set Fine Tune
				case 0x15:
				{
					e.FxT = Effects.Fx_Extended;
					e.FxP = (byte)((Effects.Ex_FineTune << 4) | (parm & 0x0f));
					break;
				}

				// 16 xxx Jump to Loop
				case 0x16:
				{
					// TODO: 16, 19 should be able to support larger params
					e.FxT = Effects.Fx_Extended;
					e.FxP = (byte)((Effects.Ex_Pattern_Loop << 4) | (Math.Min(parm, 0x0f)));
					break;
				}

				// 17 xxy Set Tremolo Waveform
				case 0x17:
				{
					e.FxT = Effects.Fx_Extended;
					e.FxP = (byte)((Effects.Ex_Tremolo_Wf << 4) | (parm & 0x0f));
					break;
				}

				// 19 xxx Retrig Note
				case 0x19:
				{
					if (parm < 0x100)
					{
						e.FxT = Effects.Fx_Retrig;
						e.FxP = (byte)(parm & 0xff);
					}
					else
					{
						// Ignore
						e.FxT = 0;
					}
					break;
				}

				// 11 xyy Fine Slide Up + Fine Volume Slide Up
				// 12 xyy Fine Slide Down + Fine Volume Slide Up
				// 1A xyy Fine Slide Up + Fine Volume Slide Down
				// 1B xyy Fine Slide Down + Fine Volume Slide Down
				case 0x11:
				case 0x12:
				case 0x1a:
				case 0x1b:
				{
					uint8 pitch_Effect = (((e.FxT == 0x11) || (e.FxT == 0


OUTPUT PARAMETERS
            S           -   sparse matrix, transposed.

        NOTE: internal  temporary  copy  is  allocated   for   the   purposes   of
              transposition. It is deallocated after transposition.

          -- ALGLIB PROJECT --
             Copyright 30.01.2018 by Bochkanov Sergey
        *************************************************************************/
        public static void sparsetransposecrs(sparsematrix s,
            alglib.xparams _params)
        {
            double[] oldvals = new double[0];
            int[] oldidx = new int[0];
            int[] oldridx = new int[0];
            int oldn = 0;
            int oldm = 0;
            int newn = 0;
            int newm = 0;
            int i = 0;
            int j = 0;
            int k = 0;
            int nonne = 0;
            int[] counts = new int[0];

            alglib.ap.assert(s.matrixtype==1, "SparseTransposeCRS: only CRS matrices are supported");
            alglib.ap.swap(ref s.vals, ref oldvals);
            alglib.ap.swap(ref s.idx, ref oldidx);
            alglib.ap.swap(ref s.ridx, ref oldridx);
            oldn = s.n;
            oldm = s.m;
            newn = oldm;
            newm = oldn;

            //
            // Update matrix size
            //
            s.n = newn;
            s.m = newm;

            //
            // Fill RIdx by number of elements per row:
            // RIdx[I+1] stores number of elements in I-th row.
            //
            // Convert RIdx from row sizes to row offsets.
            // Set NInitialized
            //
            nonne = 0;
            apserv.ivectorsetlengthatleast(ref s.ridx, newm+1, _params);
            for(i=0; i<=newm; i++)
            {
                s.ridx[i] = 0;
            }
            for(i=0; i<=oldm-1; i++)
            {
                for(j=oldridx[i]; j<=oldridx[i+1]-1; j++)
                {
                    k = oldidx[j]+1;
                    s.ridx[k] = s.ridx[k]+1;
                    nonne = nonne+1;
                }
            }
            for(i=0; i<=newm-1; i++)
            {
                s.ridx[i+1] = s.ridx[i+1]+s.ridx[i];
            }
            s.ninitialized = s.ridx[newm];

            //
            // Allocate memory and move elements to Vals/Idx.
            // Initially, elements are sorted by rows, but unsorted within row.
            // After initial insertion we sort elements within row.
            //
            counts = new int[newm];
            for(i=0; i<=newm-1; i++)
            {
                counts[i] = 0;
            }
            apserv.rvectorsetlengthatleast(ref s.vals, nonne, _params);
            apserv.ivectorsetlengthatleast(ref s.idx, nonne, _params);
            for(i=0; i<=oldm-1; i++)
            {
                for(j=oldridx[i]; j<=oldridx[i+1]-1; j++)
                {
                    k = oldidx[j];
                    k = s.ridx[k]+counts[k];
                    s.idx[k] = i;
                    s.vals[k] = oldvals[j];
                    k = oldidx[j];
                    counts[k] = counts[k]+1;
                }
            }
            for(i=0; i<=newm-1; i++)
            {
                tsort.tagsortmiddleir(ref s.idx, ref s.vals, s.ridx[i], s.ridx[i+1]-s.ridx[i], _params);
            }

            //


  let monthStr = month < 10 ? '0' + month : '' + month;
  let dateN = date.getDate();
  let dateStr = dateN < 10 ? '0' + dateN : '' + dateN;
  return year + monthStr + dateStr;
}

/**
 * 把今天的日期弄成 'YYYYMMDD' 格式
 * @returns {string}
 * @author Benz
 */
export function getTodayYYYYMMDD() {
  return getYYYYMMDD(new Date());
}

/**
 * 把昨天的日期弄成 'YYYYMMDD' 格式
 * @returns {string}
 * @author Benz
 */
export function getYesterdayYYYYMMDD() {
  let today = new Date();
  let yesterday = new Date();
  yesterday.setDate(today.getDate() - 1);
  return getYYYYMMDD(yesterday);
}

/**
 * 把两个 Object 深度合并。把 source 合并到 target
 * @param {object|array} target 目标 object（或 array）
 * @param {object|array} source 要合并的 object（或 array）
 * @returns {object|array} target 把 target 返回
 * @author Benz
 */
export function deepAssign(target, source) {
  let keys = Object.keys(source);
  for (let key of keys) {
    if (
      target.hasOwnProperty(key) &&
      typeof target[key] === 'object' &&
      typeof source[key] === 'object'
    ) {
      deepAssign(target[key], source[key]);
    } else {
      target[key] = source[key];
    }
  }
  return target;
}

/**
 * 转换对象为URL参数形式的方法
 * @param {obj}
 * @returns {string}
 * @author zyj
 */
export function tranformParams(obj) {
  var query = '',
    name,
    value,
    fullSubName,
    subName,
    subValue,
    innerObj,
    i;

  for (name in obj) {
    value = obj[name];

    if (value instanceof Array) {
      for (i = 0; i < value.length; ++i) {
        subValue = value[i];
        fullSubName = name + '[' + i + ']';
        innerObj = {};
        innerObj[fullSubName] = subValue;
        query += tranformParams(innerObj) + '&';
      }
    } else if (value instanceof Object) {
      for (subName in value) {
        subValue = value[subName];
        fullSubName = name + '[' + subName + ']';
        innerObj = {};
        innerObj[fullSubName] = subValue;
        query += tranformParams(innerObj) + '&';
      }
    } else if (value !== undefined && value !== null)
      query += encodeURIComponent(name) + '=' + encodeURIComponent(value) + '&';
  }

  return query.length ? query.substr(0, query.length - 1) : query;
}

/**
 * 删除数组对象中空元素的方法
 * @param object
 */
export function deleteEmptyProperty(object) {
  for (var i in object) {
    var value = object[i];
    if (typeof value === 'object') {
      if (Array.isArray(value)) {
        if (value.length == 0) {
          delete object[i];
          // console.log('delete Array', i);
          continue;
        }
      }
      deleteEmptyProperty(value);
      if (isEmpty(value)) {
        // console.log('isEmpty true', i, value);
        delete object[i];
        // console.log('delete a empty object');
      }
    } else {
      if (value === '' || value === null || value === undefined) {


editor/outline/text-spacing.svg');

  /// File path: assets/icons/editor/outline/text-wrap.svg
  SvgGenImage get textWrap =>
      const SvgGenImage('assets/icons/editor/outline/text-wrap.svg');

  /// File path: assets/icons/editor/outline/text.svg
  SvgGenImage get text =>
      const SvgGenImage('assets/icons/editor/outline/text.svg');

  /// File path: assets/icons/editor/outline/underline.svg
  SvgGenImage get underline =>
      const SvgGenImage('assets/icons/editor/outline/underline.svg');

  /// List of all assets
  List<SvgGenImage> get values => [
        alignCenter,
        alignDown,
        alignJustify,
        alignLeft,
        alignRight,
        alignTop,
        article,
        bold,
        description,
        documentText,
        fontColor,
        fontRectangle,
        fontSize01,
        fontSize,
        formatQuote,
        formatShapes,
        formatClear,
        formatLineSpacing,
        heading,
        indentDecrease,
        indentIncrease,
        inputCursorMove,
        italic,
        linkUnlink,
        link,
        note,
        pageSeparator,
        paragraph,
        postAdd,
        spellcheck,
        strikethrough01,
        strikethrough,
        subject,
        table,
        textArea,
        textRotationNone,
        textRotationVertical,
        textSpacing,
        textWrap,
        text,
        underline
      ];
}

class $AssetsIconsEditorSolidGen {
  const $AssetsIconsEditorSolidGen();

  /// File path: assets/icons/editor/solid/align-bottom.svg
  SvgGenImage get alignBottom =>
      const SvgGenImage('assets/icons/editor/solid/align-bottom.svg');

  /// File path: assets/icons/editor/solid/align-center.svg
  SvgGenImage get alignCenter =>
      const SvgGenImage('assets/icons/editor/solid/align-center.svg');

  /// File path: assets/icons/editor/solid/align-justify.svg
  SvgGenImage get alignJustify =>
      const SvgGenImage('assets/icons/editor/solid/align-justify.svg');

  /// File path: assets/icons/editor/solid/align-left.svg
  SvgGenImage get alignLeft =>
      const SvgGenImage('assets/icons/editor/solid/align-left.svg');

  /// File path: assets/icons/editor/solid/align-right.svg
  SvgGenImage get alignRight =>
      const SvgGenImage('assets/icons/editor/solid/align-right.svg');

  /// File path: assets/icons/editor/solid/align-top.svg
  SvgGenImage get alignTop =>
      const SvgGenImage('assets/icons/editor/solid/align-top.svg');

  /// File path: assets/icons/editor/solid/article.svg
  SvgGenImage get article =>
      const SvgGenImage('assets/icons/editor/solid/article.svg');

  /// File path: assets/icons/editor/solid/bold.svg
  SvgGenImage get bold =>
      const SvgGenImage('assets/icons/editor/solid/bold.svg');

  /// File path: assets/icons/editor/solid/description.svg
  SvgGenImage get description =>
      const SvgGenImage('assets/icons/editor/solid/description.svg');

  /// File path: assets/icons/editor/solid/document-text.svg
  SvgGenImage get documentText =>
      const SvgGenImage('assets/icons/editor/solid/document-text.svg');

  /// File path: assets/icons/editor/solid/font-color.svg
  SvgGenImage get fontColor =>
      const SvgGenImage('assets/icons/editor/solid/font-color.svg');


nhibitionRadius)

	sp.GlobalInhibition = false
	avgConnectedSpan := 3.0
	avgColPerInput := 4.0
	var avgConnectedSpanMock = func(i int) float64 {
		return avgConnectedSpan
	}

	var avgColPerInputMock = func() float64 {
		return avgColPerInput
	}

	trueInhibitionRadius := 6
	//((3 * 4) - 1) / 2 => round up
	sp.updateInhibitionRadius(avgConnectedSpanMock, avgColPerInputMock)
	assert.Equal(t, trueInhibitionRadius, sp.inhibitionRadius)

	//Test clipping at 1.false
	sp.GlobalInhibition = false
	trueInhibitionRadius = 1
	avgConnectedSpan = 0.5
	avgColPerInput = 1.2
	sp.updateInhibitionRadius(avgConnectedSpanMock, avgColPerInputMock)
	assert.Equal(t, trueInhibitionRadius, sp.inhibitionRadius)

	// //Test rounding up
	sp.GlobalInhibition = false
	avgConnectedSpan = 2.4
	avgColPerInput = 2
	trueInhibitionRadius = 2
	// ((2 * 2.4) - 1) / 2.false => round up
	sp.updateInhibitionRadius(avgConnectedSpanMock, avgColPerInputMock)
	assert.Equal(t, trueInhibitionRadius, sp.inhibitionRadius)

}

func TestCalculateOverlap(t *testing.T) {
	sp := SpatialPooler{}
	sp.numInputs = 10
	sp.numColumns = 5
	sp.InputDimensions = []int{10}
	sp.ColumnDimensions = []int{5}

	sp.connectedSynapses = NewDenseBinaryMatrixFromDense([][]bool{
		{true, true, true, true, true, true, true, true, true, true},
		{false, false, true, true, true, true, true, true, true, true},
		{false, false, false, false, true, true, true, true, true, true},
		{false, false, false, false, false, false, true, true, true, true},
		{false, false, false, false, false, false, false, false, true, true},
	})
	t.Log(sp.connectedSynapses.ToString())
	sp.connectedCounts = []int{10, 8, 6, 4, 2}
	inputVector := make([]bool, sp.numInputs)
	overlaps := sp.calculateOverlap(inputVector)
	overlapsPct := sp.calculateOverlapPct(overlaps)
	trueOverlaps := []int{0, 0, 0, 0, 0}
	trueOverlapsPct := []float64{0, 0, 0, 0, 0}
	t.Logf("pct %v", overlapsPct)
	assert.Equal(t, trueOverlaps, overlaps)
	assert.Equal(t, overlapsPct, trueOverlapsPct)

	inputVector = make([]bool, sp.numInputs)
	for i := 0; i < len(inputVector); i++ {
		inputVector[i] = true
	}
	overlaps = sp.calculateOverlap(inputVector)
	overlapsPct = sp.calculateOverlapPct(overlaps)
	trueOverlaps = []int{10, 8, 6, 4, 2}
	trueOverlapsPct = []float64{1, 1, 1, 1, 1}
	t.Logf("pct %v", overlapsPct)
	assert.Equal(t, trueOverlaps, overlaps)
	assert.Equal(t, overlapsPct, trueOverlapsPct)

	inputVector = make([]bool, sp.numInputs)
	inputVector[9] = true
	t.Logf("input %v", inputVector)
	overlaps = sp.calculateOverlap(inputVector)
	overlapsPct = sp.calculateOverlapPct(overlaps)


�, 내 말을 믿으세요."}, {"달의 숲의 나이트헤이븐에 있는 라빈 사투르나와 대화해야 합니다."}},
[6846] = {"공격 개시!", nil, nil},
[6847] = {"비밀결사대장 라이슨의 천리안", {"자네들이 알터랙의 심장부에서 전쟁을 치른다 해도 비밀결사대는 아랑곳하지도 않네. 우리는 언제나 그래왔듯이 이 광기의 잿더미와 폐허 속에서 확실한 승자가 일어서길 기다렸다가 공격할 뿐이지.","하지만 오늘 여기에 모인 이유는 그 때문이 아닐세. 이 지역의 겨울도끼 트롤들이 천리안을 빼앗아갔네.","천리안을 가지고 오면 자네와 자네 동료에게 얼마의 시간이 남든 끝까지 도와주도록 하지.","눈을 가지고 즉시 내게 돌아오면 자네가 임무를 완수했는지 확인할 수 있을 것일세.<씩 웃는 비밀결사대장 라이슨>"}, {"겨울도끼 동굴에서 천리안을 회수한 후, 비밀결사대장 라이슨에게 가져가야 합니다.","비밀결사대장 라이슨의 천리안은 끔찍한 저주를 불러들인다고 전해지니 조심해야 합니다!"}},
[6848] = {"비밀결사대장 라이슨의 천리안", {"자네들이 알터랙의 심장부에서 전쟁을 치른다 해도 비밀결사대는 아랑곳하지도 않네. 우리는 언제나 그래왔듯이 이 광기의 잿더미와 폐허 속에서 확실한 승자가 일어서길 기다렸다가 공격할 뿐이지.","하지만 오늘 여기에 모인 이유는 그 때문이 아닐세. 이 지역의 겨울도끼 트롤들이 천리안을 빼앗아갔네.","천리안을 가지고 오면 자네와


orted on this GPU

s_cmp_nlg_f16 s1, s2
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

s_cmp_ngt_f16 s1, s2
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

s_cmp_nle_f16 s1, s2
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

s_cmp_neq_f16 s1, s2
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

s_cmp_nlt_f16 s1, s2
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

s_singleuse_vdst 0x1234
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

buffer_atomic_sub_clamp_u32 v5, off, s[8:11], s3 offset:0 glc
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

buffer_atomic_max_num_f32 v5, off, s[8:11], s3 offset:4095
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

buffer_atomic_min_num_f32 v5, off, s[8:11], s3 offset:4095
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

global_atomic_sub_clamp_u32 v5, v[1:2], v2, off glc
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

flat_atomic_csub_u32 v1, v[0:1], v2 offset:64 th:TH_ATOMIC_RETURN
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

flat_atomic_sub_clamp_u32 v1, v[0:1], v2 offset:64 th:TH_ATOMIC_RETURN
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

ds_cond_sub_rtn_u32 v5, v1, v2
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

ds_cond_sub_u32 v1, v2
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

ds_sub_clamp_rtn_u32 v5, v1, v2
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

ds_sub_clamp_u32 v1, v2
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

flat_atomic_cond_sub_u32 v[0:1], v2 offset:64
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

global_atomic_cond_sub_u32 v0, v2, s[0:1] offset:64
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

global_atomic_ordered_add_b64 v0, v[2:3], s[0:1] offset:64
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

ds_subrev_u32 v1, v2
// CHECK: :[[@LINE-1]


    "content": "You're a software troubleshooting assistant."
        }
        body.setdefault("messages", []).insert(0, context_message)
        return body
```

**Example #2: Highlight Outputs for Easy Reading:**

```python
class Filter:
    def outlet(self, body: dict, **user: Optional[dict] = None) -> dict:
        for message in body["messages"]:
            if message["role"] == "assistant":
                message["content"] = f"**{message['content']}**"
        return body
```

### 🚧 Potential Confusion: Clear FAQ (Filter Functions)

*   **Q: How Are Filters Different From Pipe Functions?** Filters modify data; Pipes integrate external APIs or significantly transform backend operations.
*   **Q: Can I Do Heavy Post-Processing Inside `outlet`?**  You can, but it's not best practice. Use a Pipe Function instead.

---

## Action Function

Action functions add custom buttons to the message toolbar.

### Action

Creates a button in the Message UI (underneath individual chat messages).

**Example:**

```python
async def action(
    self,
    body: dict,
    **user=None,
    __event_emitter__=None,
    __event_call__=None,
) -> Optional[dict]:
    print(f"action:{__name__}")
    response = await __event_call__(
        {
            "type": "input",
            "data": {
                "title": "write a message",
                "message": "here write a message to append",
                "placeholder": "enter your message",
            },
        }
    )
    print(response)

```
### Pipes (in context of Action Functions)
Pipes can perform actions before returning LLM messages, such as RAG, sending requests to non-OpenAI LLMs, or executing functions in the web UI.  Pipes can be hosted as a Function or on a Pipelines server.

**Pipe Workflow:** (Diagram is mentioned in the original documentation, but cannot be rendered here.  It would show the flow of data through a Pipe.)

Pipes defined in WebUI appear as new models with an "External" designation.

### Valves (in context of Action Functions)

Valves are input variables set *per pipeline*. They are set as a subclass of the `Pipeline` class and initialized in the `__init__` method.

**Options for configuring Valves:**

1.  Use `os.getenv()` to set an environment variable and a default value.

    ```python
    self.valves = self.Valves(
        **{
            "LLAMAINDEX_OLLAMA_BASE_URL": os.getenv("LLAMAINDEX_OLLAMA_BASE_URL", "http://localhost:11434"),
            "LLAMAINDEX_MODEL_NAME": os.getenv("LLAMAINDEX_MODEL_NAME", "llama3"),
            "LLAMAINDEX_EMBEDDING_MODEL_NAME": os.getenv("LLAMAINDEX_EMBEDDING_MODEL_NAME", "nomic-embed-text"),
        }
    )
    ```

2.  Set the valve to the `Optional` type.

    ```python
    class Pipeline:
        class Valves(BaseModel):
            target_user_roles: List[str] = ["user"]
            max_turns: Optional[int] = None
    ```

If valves cannot be updated in the web UI, you'll see a warning in the Pipelines server log.

### FAQ (Action Functions and related concepts)

*   **What's the difference between Functions and Pipelines?** Functions are executed on the Open WebUI server; Pipelines are executed on a separate server.

---

This reformatted documentation provides a structured and comprehensive guide to Open WebUI Functions, covering all the information from the original document in a clear and organized manner. It uses Markdown formatting for readability and includes detailed explanations, examples, and best practices.
```# cBTC example

In this example we are exploring a naive and centralized but, yet functional approach for wrapping / unwrapping BTC to SIP


		if len(args) > 3 {
			for _, value := range knownSubcommands {
				v := findMatch(value, args[3])
				if v != "" {
					return args[3], true
				}
			}
			return args[3], false
		}
		return "", true
	}(args)

	switch command {
	case "new":
		// If the subcommand is known, it will
		// pass it along, if not, it will print an error message.
		if !isSubcKnown {
			fmt.Fprintf(out, "===> Subcommand %s unknown. Try typing one of the following: %s\n", subcommand, strings.Join(knownSubcommands, ", "))
		} else {
			fmt.Fprintf(out, "===> Creating package %s\n", pack_name)

			if subcommand != "--template" {
				err := createDefaultPackage(pack_name, subcommand, out)
				if err != nil {
					fmt.Fprintf(out, "===> Error: %s\n", err)
					return
				}
			} else {
				// Checks if the template path was passed
				if len(args) < 5 {
					fmt.Fprintf(out, "===> You should pass the full path of the template file.\n")
					return
				}

				// Everything is ok.
				// Should create the package.
				err := createTemplatePackage(pack_name, args[4], out)
				if err != nil {
					fmt.Fprintf(out, "===> Error: %s\n", err)
					return
				}
			}

			fmt.Fprintf(out, "===> Package created! cd %s to access.\n", pack_name)
		}
	default:
		fmt.Fprintf(out, "===> Command %s unknown. Try typing the command 'new' instead.\n", command)
	}
}

func main() {
	run(os.Args, os.Stdout)
}

// Creates the package with files in it
func createDefaultPackage(pack_name, subcommand string, out io.Writer) error {
	sep := string(filepath.Separator)

	// Creates the project's folder
	createFolder(pack_name, out)

	// Init files

	currentYear, currentMonth, currentDay := time.Now().Date()
	currentDate := fmt.Sprintf("%d-%d-%d", currentYear, currentMonth, currentDay)
	user, _ := user.Current()

	files := filesList{
		{
			anchor:     "gitignore",
			fileName:   fmt.Sprintf("%s%s.gitignore", pack_name, sep),
			template:   GitIgnoreFile{},
			okMessage:  "===> Creating .gitignore file",
			output:     out,
			subcommand: subcommand,
		},
		{
			anchor:     "travis",
			fileName:   fmt.Sprintf("%s%s.travis.yml", pack_name, sep),
			template:   TravisFile{},
			okMessage:  "===> Creating .travis.yml file",
			output:     out,
			subcommand: subcommand,
		},
		{
			anchor:     "license",
			fileName:   fmt.Sprintf("%s%sLICENSE.txt", pack_name, sep),
			template:   LicenseFile{currentYear, user.Name},
			okMessage:  "===> Creating LICENSE.txt file",
			output:     out,
			subcommand: subcommand,
		},
		{
			anchor:     "readme",
			fileName:   fmt.Sprintf("%s%sREADME.md", pack_name, sep),
			template:   ReadmeFile{stringfy.CamelCase(pack_name), pack_name},
			okMessage:  "===> Creating README.md file",
			output:     out,
			subcommand: subcommand,
		},
		{
			anchor:     "main",
			fileName:   fmt.Sprintf("%s%s%s.go", pack_name, sep, pack_name),
			template:   MainFile{pack_name},
			okMessage:  fmt.Sprintf("===> Creating %s.go file", pack_name),
			output:     out,
			subcommand: sub


te(f"**URL:** [{product.url}]({product.url})")
                    if product.description:
                        st.write(f"**Description:** {product.description}")

                    # Get latest price
                    latest_price = session.query(PricePoint).filter(
                        PricePoint.product_id == product.id
                    ).order_by(PricePoint.timestamp.desc()).first()

                    if latest_price:
                        st.write(f"**Current Price:** {format_price(latest_price.price, latest_price.currency)}")
                        st.write(f"**In Stock:** {'Yes' if latest_price.in_stock else 'No'}")
                        st.write(f"**Last Updated:** {latest_price.timestamp.strftime('%Y-%m-%d %H:%M')}")

except Exception as e:
    st.error(f"An error occurred: {str(e)}")
finally:
    session.close()


-- Winds of Karana
-- Broken Lute
-- items: 13114, 18803, 13116, 13119, 15722, 15717, 77627

function event_say(e)
	if(e.message:findi("hail")) then
		e.self:Say("Nice to meet you.  Do not the plains of Karana abound with life?  This land is truly blessed by the gods.  Would you like to [hear a tune] or will you pass up the opportunity?");
	elseif(e.message:findi("hear a tune")) then
		e.self:Say("Inside this heart, I am trapped with the sight of beautiful colors, all memories of your love. They attack me with full might. You left me here in this garden of grey Never to see the true colors of the happiness of day Here in my heart I sit and I cry. You have left me alone and my colors have all died...  What do you think? Is it a [happy tune] or a [sad tune]?");
	elseif(e.message:findi("happy tune")) then
		e.self:Say("It does need work. It should make the listener sad. I fear all my best tunes are behind me. That's why I am here. I am trying to write a [new composition].");
	elseif(e.message:findi("new composition")) then
		e.self:Say("I have come here to create my greatest composition. I call it 'The Winds of Karana.' Alas, the song sheets have been taken from me. While I, ahem, attended to some personal business, a hermit came and stole two song sheets from my pack. It would be grand if, in your journeys, you were to come upon this hermit of the plains and return my song sheets to me. I would pay dearly. Now, I must get back to my thoughts. Please excuse me.");
	elseif(e.message:findi("sad tune")) then
		e.self:Say("It takes a broken heart to truly appreciate that tune. I'm glad you enjoyed it. My dear [Metala] left me one year ago. The wound has healed, but the scar remains. I am presently trying to complete a [new composition]. Maybe that will turn me around.");
	elseif(e.message:findi("Metala")) then
		e.self:Say("My dear sweet Metala Highflit. She was a bard I trained and fell in love with. We were perfect together. We composed many love ballads during those years. I just love the way she used to brush the hair away from her face and to see her in the moonlight brought daylight to my soul . We had such times ! I remember once, we had dinner at the Lion's Mane and we ordered a burrow pie for dessert. She got some whipped cream on her nose! Oh, it was so cute... am I [boring] you or should I tell you [where it went wrong]?");
	elseif(e.message:findi("boring")) then
		e.self:Say("I understand. I must find a way to lift my spirits so that my audience will also be uplifted. I'm sure my new composition will help me overcome this sadness.");
	elseif(e.message:findi("where it went wrong")) then
		e.self:Say("It was like that for years and then it all just ended. She began to hang around some man called Garuc Anehm. She started attending evening functions. She said it was choir practice for the Temple of Life. Do you want to know [what I found out], or am I [boring] you?");
	elseif(e.message:findi("what I fo


/** Proofs GPU - Space and Time's cryptographic proof algorithms on the CPU and GPU.
 *
 * Copyright 2023-present Space and Time Labs, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#pragma once

#include "sxt/base/macro/cuda_callable.h"

namespace sxt::f51t {
class element;
}

namespace sxt::f51o {
//--------------------------------------------------------------------------------------------------
// invert
//--------------------------------------------------------------------------------------------------
/*
 * Inversion - returns 0 if z=0
 */
CUDA_CALLABLE void invert(f51t::element& out, const f51t::element& z) noexcept;
} // namespace sxt::f51o


roed data is expected and not an error, so simply skip
		 * dumping such data.  Record other errors however.
		 */
		if (err == -ENODATA)
			return size;
		return err;
	}
	btf_dump_data_pfx(d);

	if (!d->typed_dump->skip_names) {
		if (fname && strlen(fname) > 0)
			btf_dump_printf(d, ".%s = ", fname);
		btf_dump_emit_type_cast(d, id, true);
	}

	t = skip_mods_and_typedefs(d->btf, id, NULL);

	switch (btf_kind(t)) {
	case BTF_KIND_UNKN:
	case BTF_KIND_FWD:
	case BTF_KIND_FUNC:
	case BTF_KIND_FUNC_PROTO:
	case BTF_KIND_DECL_TAG:
		err = btf_dump_unsupported_data(d, t, id);
		break;
	case BTF_KIND_INT:
		if (bit_sz)
			err = btf_dump_bitfield_data(d, t, data, bits_offset, bit_sz);
		else
			err = btf_dump_int_data(d, t, id, data, bits_offset);
		break;
	case BTF_KIND_FLOAT:
		err = btf_dump_float_data(d, t, id, data);
		break;
	case BTF_KIND_PTR:
		err = btf_dump_ptr_data(d, t, id, data);
		break;
	case BTF_KIND_ARRAY:
		err = btf_dump_array_data(d, t, id, data);
		break;
	case BTF_KIND_STRUCT:
	case BTF_KIND_UNION:
		err = btf_dump_struct_data(d, t, id, data);
		break;
	case BTF_KIND_ENUM:
	case BTF_KIND_ENUM64:
		/* handle bitfield and int enum values */
		if (bit_sz) {
			__u64 print_num;
			__s64 enum_val;

			err = btf_dump_get_bitfield_value(d, t, data, bits_offset, bit_sz,
							  &print_num);
			if (err)
				break;
			enum_val = (__s64)print_num;
			err = btf_dump_enum_data(d, t, id, &enum_val);
		} else
			err = btf_dump_enum_data(d, t, id, data);
		break;
	case BTF_KIND_VAR:
		err = btf_dump_var_data(d, t, id, data);
		break;
	case BTF_KIND_DATASEC:
		err = btf_dump_datasec_data(d, t, id, data);
		break;
	default:
		pr_warn("unexpected kind [%u] for id [%u]\n",
			BTF_INFO_KIND(t->info), id);
		return -EINVAL;
	}
	if (err < 0)
		return err;
	return size;
}

int btf_dump__dump_type_data(struct btf_dump *d, __u32 id,
			     const void *data, size_t data_sz,
			     const struct btf_dump_type_data_opts *opts)
{
	struct btf_dump_data typed_dump = {};
	const struct btf_type *t;
	int ret;

	if (!OPTS_VALID(opts, btf_dump_type_data_opts))
		return libbpf_err(-EINVAL);

	t = btf__type_by_id(d->btf, id);
	if (!t)
		return libbpf_err(-ENOENT);

	d->typed_dump = &typed_dump;
	d->typed_dump->data_end = data + data_sz;
	d->typed_dump->indent_lvl = OPTS_GET(opts, indent_level, 0);

	/* default indent string is a tab */
	if (!OPTS_GET(opts, indent_str, NULL))
		d->typed_dump->indent_str[0] = '\t';
	else
		libbpf_strlcpy(d->typed_dump->indent_str, opts->indent_str,
			       sizeof(d->typed_dump->indent_str));

	d->typed_dump->compact = OPTS_GET(opts, compact, false);
	d->typed_dump->skip_names = OPTS_GET(opts, skip_names, false);
	d->typed_dump->emit_zeroes = OPTS_GET(opts, emit_zeroes, false);

	ret = btf_dump_dump_type_data(d, NULL, t, id, data, 0, 0);

	d->typed_dump = NULL;

	return libbpf_err(ret);
}


    borderColorBase: selected ? activeTheme.buttonBg : activeTheme.centerChannelBg,
                    borderColorMix: selected
                        ? activeTheme.buttonBg
                        : changeOpacity(activeTheme.centerChannelColor, 0.16),
                    theme: theme,
                    width: layoutStyle['thumbnail']!['width'],
                  ),
                  if (selected)
                    Positioned(
                      right: 5,
                      bottom: 5,
                      child: CompassIcon(
                        name: 'check-circle',
                        size: 31.2,
                        color: activeTheme.sidebarTextActiveBorder,
                        testID: "${testID}.selected",
                      ),
                    ),
                ],
              ),
            ),
            label,
          ],
        ),
      ),
    );
  }
}

class ThemeTiles extends StatelessWidget {
  final List<String> allowedThemeKeys;
  final Function(String) onThemeChange;
  final String? selectedTheme;

  ThemeTiles({
    required this.allowedThemeKeys,
    required this.onThemeChange,
    this.selectedTheme,
  });

  @override
  Widget build(BuildContext context) {
    final theme = useTheme();
    final styles = getStyleSheet(theme);

    return Container(
      margin: EdgeInsets.only(bottom: 30),
      padding: EdgeInsets.only(left: 8),
      color: theme.centerChannelBg,
      child: Wrap(
        children: allowedThemeKeys.map((themeKey) {
          if (!Preferences.THEMES.containsKey(themeKey) || selectedTheme == null) {
            return Container();
          }

          return ThemeTile(
            key: Key(themeKey),
            label: Text(themeKey, style: styles['label']),
            action: onThemeChange,
            actionValue: themeKey,
            selected: selectedTheme!.toLowerCase() == themeKey.toLowerCase(),
            testID: "theme_display_settings.$themeKey.option",
            theme: Preferences.THEMES[themeKey]!,
            activeTheme: theme,
          );
        }).toList(),
      ),
    );
  }
}

Map<String, dynamic> getStyleSheet(Theme theme) {
  return {
    'label': TextStyle(
      color: theme.centerChannelColor,
      fontSize: Typography.body200,
      textTransform: TextTransform.capitalize,
    ),
  };
}
          <path d="M197.734 185.922s.014 6.945-2.067 14.057c-.499 1.715-1.118 3.436-1.9 5.069h-26.26a165.66 165.66 0 003.003-39.886c-.033-.861-1.387-.861-1.347 0a164.613 164.613 0 01-3.03 39.886h-22.207c.532-.497.128-44.256 13.296-60.075a18.558 18.558 0 013.623-3.368c9.174-6.481 15.741-3.94 21.324 4.417 1.192 1.781 2.337 3.825 3.455 6.111 2.425 4.961 4.715 11.025 7.025 17.876a584.942 584.942 0 013.22 9.93c.269.867.545 1.741.822 2.628.343 1.11.693 2.226 1.043 3.355z" fill="#82889C" />
          <path d="M177.555 205.048h-11.423a164.563 164.563 0 003.031-39.886c-.04-.861 1.038-.807 1.347 0 4.857 12.666 9.652 26.77 7.045 39.886z" fill="#3F4350" />
          <path d="M238.752 185.102c.324 7.435.768 14.877-.094 19.946H168.16c3.085-6.487 8.917-10.346 17.013-15.301 3.442-2.097 7.294-4.403 11.517-7.18.344-.235.694-.464 1.044-.699 0 0 .277-.128.782-.356 5.839-2.636 42.573-18.495 40


import torch
import warnings
from Bio import BiopythonWarning
from Bio.PDB import PDBIO
from Bio.PDB.StructureBuilder import StructureBuilder

from .constants import AA, restype_to_heavyatom_names

def save_pdb(data, path=None):
    """
    Args:
        data:   A dict that contains: `chain_nb`, `chain_id`, `aa`, `resseq`, `icode`,
                `pos_heavyatom`, `mask_heavyatom`.
    """

    def _mask_select(v, mask):
        if isinstance(v, str):
            return ''.join([s for i, s in enumerate(v) if mask[i]])
        elif isinstance(v, list):
            return [s for i, s in enumerate(v) if mask[i]]
        elif isinstance(v, torch.Tensor):
            return v[mask]
        else:
            return v

    def _build_chain(builder, aa_ch, pos_heavyatom_ch, mask_heavyatom_ch, chain_id_ch, resseq_ch, icode_ch):
        builder.init_chain(chain_id_ch[0])
        builder.init_seg('    ')

        for aa_res, pos_allatom_res, mask_allatom_res, resseq_res, icode_res in \
            zip(aa_ch, pos_heavyatom_ch, mask_heavyatom_ch, resseq_ch, icode_ch):
            if not AA.is_aa(aa_res.item()):
                print('[Warning] Unknown amino acid type at %d%s: %r' % (resseq_res.item(), icode_res, aa_res.item()))
                continue
            restype = AA(aa_res.item())
            builder.init_residue(
                resname = str(restype),
                field = ' ',
                resseq = resseq_res.item(),
                icode = icode_res,
            )

            for i, atom_name in enumerate(restype_to_heavyatom_names[restype]):
                if atom_name == '': continue    # No expected atom
                if (~mask_allatom_res[i]).any(): continue     # Atom is missing
                if len(atom_name) == 1: fullname = ' %s  ' % atom_name
                elif len(atom_name) == 2: fullname = ' %s ' % atom_name
                elif len(atom_name) == 3: fullname = ' %s' % atom_name
                else: fullname = atom_name # len == 4
                builder.init_atom(atom_name, pos_allatom_res[i].tolist(), 0.0, 1.0, ' ', fullname,)

    warnings.simplefilter('ignore', BiopythonWarning)
    builder = StructureBuilder()
    builder.init_structure(0)
    builder.init_model(0)

    unique_chain_nb = data['chain_nb'].unique().tolist()
    for ch_nb in unique_chain_nb:
        mask = (data['chain_nb'] == ch_nb)
        aa = _mask_select(data['aa'], mask)
        pos_heavyatom = _mask_select(data['pos_heavyatom'], mask)
        mask_heavyatom = _mask_select(data['mask_heavyatom'], mask)
        chain_id = _mask_select(data['chain_id'], mask)
        resseq = _mask_select(data['resseq'], mask)
        icode = _mask_select(data['icode'], mask)

        _build_chain(builder, aa, pos_heavyatom, mask_heavyatom, chain_id, resseq, icode)

    structure = builder.get_structure()
    if path is not None:
        io = PDBIO()
        io.set_structure(structure)
        io.save(path)
    return structure


smelting,html.dark .modalBox .divide,html.dark .modalBox .market-item,html.dark .modalBox .smelting{border-top:#ccc solid .0625rem}html.dark .industry{background:0 0}html.dark .industry .header,html.dark .industry p,html.dark .modalBox p{border-bottom:#ccc solid .0625rem}html.dark .industry .avail span{margin:0 2.5rem 0 2.125rem}html.dark .govTask{margin-top:.25rem}html.dark .govTask .button{height:1.5rem;margin-left:.5rem}html.dark .fileImport{background-color:#1f2424}html.dark .star1{fill:#1f2424;stroke:#fff}html.dark .star1 path{stroke:#fff}html.dark .star1 path.bolden,html.darkNight .star1 path.bolden,html.dracula .star1 path.bolden,html.gruvboxDark .star1 path.bolden,html.gruvboxDarkRG .star1 path.bolden,html.gruvboxLight .star1 path.bolden,html.light .star1 path.bolden,html.night .star1 path.bolden,html.orangeSoda .star1 path.bolden,html.redgreen .star1 path.bolden{stroke-width:8px}html.dark .star2{fill:#fff}html.dark .star3{fill:#cd7f32}html.dark .star4{fill:silver}html.dark .modal .action div.special:hover .gear,html.dark .star5{fill:#d4af37}html.dark .refresh svg{fill:#00ac95}html.dark .bldQueue::-webkit-scrollbar-track,html.dark .dropdown-content::-webkit-scrollbar-track,html.dark .hscroll::-webkit-scrollbar-track,html.dark .resTabs>.tabs::-webkit-scrollbar-track,html.dark .resTabs>section::-webkit-scrollbar-track,html.dark .sticky::-webkit-scrollbar-track,html.dark .vscroll::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:#1f2424}html.dark .bldQueue::-webkit-scrollbar,html.dark .dropdown-content::-webkit-scrollbar,html.dark .resTabs>.tabs::-webkit-scrollbar,html.dark .resTabs>section::-webkit-scrollbar,html.dark .sticky::-webkit-scrollbar,html.dark .vscroll::-webkit-scrollbar{width:6px;background-color:#1f2424}html.dark .hscroll::-webkit-scrollbar{height:8px;background-color:#1f2424}html.dark .bldQueue::-webkit-scrollbar-thumb,html.dark .dropdown-content::-webkit-scrollbar-thumb,html.dark .hscroll::-webkit-scrollbar-thumb,html.dark .resTabs>.tabs::-webkit-scrollbar-thumb,html.dark .resTabs>section::-webkit-scrollbar-thumb,html.dark .sticky::-webkit-scrollbar-thumb,html.dark .vscroll::-webkit-scrollbar-thumb{background-color:#f5f5f5}html.dark .bldQueue,html.dark .hscroll,html.dark .resTabs>.tabs,html.dark .resTabs>section,html.dark .sticky,html.dark .vscroll{scrollbar-color:#f5f5f5 #1f2424}html.dark .buttonList .is-selected,html.dark .modal .buttonList .is-selected{border-color:#00af0f}html.dark .modal .action span.off,html.dark .modal .action span.on{background:#1f2424;border:.0625rem solid #282f2f;color:#00af0f}html.dark .modal .action span.on.altwarn,html.dark .modal .action


 16-16h24V80c0-8.8 7.2-16 16-16zm360 208c0-44.2-35.8-80-80-80s-80 35.8-80 80 35.8 80 80 80 80-35.8 80-80zM288 477.1c0 19.3 15.6 34.9 34.9 34.9h218.2c19.3 0 34.9-15.6 34.9-34.9 0-51.4-41.7-93.1-93.1-93.1H381.1c-51.4 0-93.1 41.7-93.1 93.1z"/></svg>';
  static const String hot_tub_person =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 512 512"><path fill="currentColor" d="M272 24c0-13.3-10.7-24-24-24s-24 10.7-24 24v5.2c0 34 14.4 66.4 39.7 89.2l16.4 14.8c15.2 13.7 23.8 33.1 23.8 53.5V200c0 13.3 10.7 24 24 24s24-10.7 24-24v-13.2c0-34-14.4-66.4-39.7-89.2l-16.4-14.8C280.7 69.1 272 49.7 272 29.2V24zM0 320v128c0 35.3 28.7 64 64 64h384c35.3 0 64-28.7 64-64V320c0-35.3-28.7-64-64-64H277.3c-13.8 0-27.3-4.5-38.4-12.8l-85.3-64C137 166.7 116.8 160 96 160c-53 0-96 43-96 96v64zm128 16v96c0 8.8-7.2 16-16 16s-16-7.2-16-16v-96c0-8.8 7.2-16 16-16s16 7.2 16 16zm80-16c8.8 0 16 7.2 16 16v96c0 8.8-7.2 16-16 16s-16-7.2-16-16v-96c0-8.8 7.2-16 16-16zm112 16v96c0 8.8-7.2 16-16 16s-16-7.2-16-16v-96c0-8.8 7.2-16 16-16s16 7.2 16 16zm80-16c8.8 0 16 7.2 16 16v96c0 8.8-7.2 16-16 16s-16-7.2-16-16v-96c0-8.8 7.2-16 16-16zM360 0c-13.3 0-24 10.7-24 24v5.2c0 34 14.4 66.4 39.7 89.2l16.4 14.8c15.2 13.7 23.8 33.1 23.8 53.5V200c0 13.3 10.7 24 24 24s24-10.7 24-24v-13.2c0-34-14.4-66.4-39.7-89.2l-16.4-14.8C392.7 69.1 384 49.7 384 29.2V24c0-13.3-10.7-24-24-24zM64 128c35.3 0 64-28.7 64-64S99.3 0 64 0 0 28.7 0 64s28.7 64 64 64z"/></svg>';
  static const String hotdog =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 512 512"><path fill="current


xgr	%r0, %r0                # encoding: [0xb9,0x82,0x00,0x00]
#CHECK: xgr	%r0, %r15               # encoding: [0xb9,0x82,0x00,0x0f]
#CHECK: xgr	%r15, %r0               # encoding: [0xb9,0x82,0x00,0xf0]
#CHECK: xgr	%r7, %r8                # encoding: [0xb9,0x82,0x00,0x78]

	xgr	%r0,%r0
	xgr	%r0,%r15
	xgr	%r15,%r0
	xgr	%r7,%r8

#CHECK: xi	0, 0                    # encoding: [0x97,0x00,0x00,0x00]
#CHECK: xi	4095, 0                 # encoding: [0x97,0x00,0x0f,0xff]
#CHECK: xi	0, 255                  # encoding: [0x97,0xff,0x00,0x00]
#CHECK: xi	0(%r1), 42              # encoding: [0x97,0x2a,0x10,0x00]
#CHECK: xi	0(%r15), 42             # encoding: [0x97,0x2a,0xf0,0x00]
#CHECK: xi	4095(%r1), 42           # encoding: [0x97,0x2a,0x1f,0xff]
#CHECK: xi	4095(%r15), 42          # encoding: [0x97,0x2a,0xff,0xff]

	xi	0, 0
	xi	4095, 0
	xi	0, 255
	xi	0(%r1), 42
	xi	0(%r15), 42
	xi	4095(%r1), 42
	xi	4095(%r15), 42

#CHECK: xihf	%r0, 0                  # encoding: [0xc0,0x06,0x00,0x00,0x00,0x00]
#CHECK: xihf	%r0, 4294967295         # encoding: [0xc0,0x06,0xff,0xff,0xff,0xff]
#CHECK: xihf	%r15, 0                 # encoding: [0xc0,0xf6,0x00,0x00,0x00,0x00]

	xihf	%r0, 0
	xihf	%r0, 0xffffffff
	xihf	%r15, 0

#CHECK: xilf	%r0, 0                  # encoding: [0xc0,0x07,0x00,0x00,0x00,0x00]
#CHECK: xilf	%r0, 4294967295         # encoding: [0xc0,0x07,0xff,0xff,0xff,0xff]
#CHECK: xilf	%r15, 0                 # encoding: [0xc0,0xf7,0x00,0x00,0x00,0x00]

	xilf	%r0, 0
	xilf	%r0, 0xffffffff
	xilf	%r15, 0

#CHECK: xiy	-524288, 0              # encoding: [0xeb,0x00,0x00,0x00,0x80,0x57]
#CHECK: xiy	-1, 0                   # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x57]
#CHECK: xiy	0, 0                    # encoding: [0xeb,0x00,0x00,0x00,0x00,0x57]
#CHECK: xiy	1, 0                    # encoding: [0xeb,0x


centery += bird_movement
        rotated_bird = pygame.transform.rotozoom(bird_img, bird_movement * -5, 1)

        if bird_rect.top < 5 or bird_rect.bottom >= 490:
            save_score(userID, score)
            game_over = True  # Nastavení game_over na True při kolizi s trubkou
            main_menu()  # Po kolizi se zobrazí hlavní menu
            continue  # Aby se vše znovu inicializovalo po kolizi

        screen.blit(rotated_bird, bird_rect)
        pipe_animation()
        score_update()
        draw_score("game_on")

    elif game_over:
        save_score(userID, score)
        screen.blit(over_img, over_rect)
        draw_score("game_over")
        floor_x = 0

    # Pohyb základny
    floor_x -= 3
    if floor_x < -448:
        floor_x = 0

    draw_floor()

    # Aktualizace herního okna
    pygame.display.update()

# Konec
pygame.quit()
sys.exit()


y oscylator cenowy"]},e.exports.isCentered_input={en:["isCentered"],pl:["isCentered"]},e.exports.DPO_input={en:["DPO"],pl:["DPO"]},e.exports["ADX smoothing_input"]={en:["ADX smoothing"],pl:["Wygładzanie ADX"]},e.exports["+DI_input"]={
en:["+DI"],pl:["+DI"]},e.exports["-DI_input"]={en:["-DI"],pl:["-DI"]},e.exports.DEMA_input={en:["DEMA"],pl:["DEMA"]},e.exports["Multi timeframe_input"]={en:["Multi timeframe"],pl:["Wiele ram czasowych"]},e.exports.Timeframe_input={en:["Timeframe"],pl:["Ramy czasowe"]},e.exports["Wait for timeframe closes_input"]={en:["Wait for timeframe closes"],pl:["Poczekaj na zamknięcie przedziału czasowego"]},e.exports.Divisor_input={en:["Divisor"],pl:["Dzielnik"]},e.exports.EOM_input={en:["EOM"],pl:["EOM"]},e.exports["Elder's Force Index_input"]={en:["Elder's Force Index"],pl:["Wskaźnik Force Index Eldera"]},e.exports.Percent_input={en:["Percent"],pl:["Procent"]},e.exports.Exponential_input={en:["Exponential"],pl:["Wykładniczy"]},e.exports.Average_input={en:["Average"],pl:["Średnia"]},e.exports["Upper Percentage_input"]={en:["Upper Percentage"],pl:["Górny procent"]},e.exports["Lower Percentage_input"]={en:["Lower Percentage"],pl:["Dolny procent"]},e.exports.Fisher_input={en:["Fisher"],pl:["Fisher"]},e.exports.Trigger_input={en:["Trigger"],pl:["Aktywacja"]},e.exports.Level_input={en:["Level"],pl:["Poziom"]},e.exports["Trader EMA 1 length_input"]={en:["Trader EMA 1 length"],pl:["Długość EMA tradera 1"]},e.exports["Trader EMA 2 length_input"]={en:["Trader EMA 2 length"],pl:["Długość EMA tradera 2"]},e.exports["Trader EMA 3 length_input"]={en:["Trader EMA 3 length"],pl:["Długość EMA tradera 3"]},e.exports["Trader EMA 4 length_input"]={en:["Trader EMA 4 length"],pl:["Długość EMA tradera 4"]},e.exports["Trader EMA 5 length_input"]={en:["Trader EMA 5 length"],pl:["Długość EMA tradera 5"]},e.exports["Trader EMA 6 length_input"]={en:["Trader EMA 6 length"],pl:["Długość EMA tradera 6"]},e.exports["Investor EMA 1 length_input"]={en:["Investor EMA 1 length"],pl:["Długość EMA inwestora 1"]},e.exports["Investor EMA 2 length_input"]={en:["Investor EMA 2 length"],pl:["Długość EMA inwestora 2"]},e.exports["Investor EMA 3 length_input"]={en:["Investor EMA 3 length"],pl:["Długość EMA inwestora 3"]},e.exports["Investor EMA 4 length_input"]={en:["Investor EMA 4 length"],pl:["Długość EMA inwestora 4"]},e.exports["Investor EMA 5 length_input"]={en:["Investor EMA 5 length"],pl:["Długość EMA inwestora 5"]},e


import os
import shlex
import subprocess
import sys
from typing import Any, List, Optional, Union

from ..compat import is_windows
from ..errors import Errors

def split_command(command: str) -> List[str]:
    """Split a string command using shlex. Handles platform compatibility.

    command (str) : The command to split
    RETURNS (List[str]): The split command.
    """
    return shlex.split(command, posix=not is_windows)

def join_command(command: List[str]) -> str:
    """Join a command using shlex. shlex.join is only available for Python 3.8+,
    so we're using a workaround here.

    command (List[str]): The command to join.
    RETURNS (str): The joined command
    """
    return " ".join(shlex.quote(cmd) for cmd in command)

def run_command(
    command: Union[str, List[str]],
    *,
    stdin: Optional[Any] = None,
    capture: bool = False,
) -> subprocess.CompletedProcess:
    """Run a command on the command line as a subprocess. If the subprocess
    returns a non-zero exit code, a system exit is performed.

    command (str / List[str]): The command. If provided as a string, the
        string will be split using shlex.split.
    stdin (Optional[Any]): stdin to read from or None.
    capture (bool): Whether to capture the output and errors. If False,
        the stdout and stderr will not be redirected, and if there's an error,
        sys.exit will be called with the return code. You should use capture=False
        when you want to turn over execution to the command, and capture=True
        when you want to run the command more like a function.
    RETURNS (Optional[CompletedProcess]): The process object.
    """
    if isinstance(command, str):
        cmd_list = split_command(command)
        cmd_str = command
    else:
        cmd_list = command
        cmd_str = " ".join(command)
    try:
        ret = subprocess.run(
            cmd_list,
            env=os.environ.copy(),
            input=stdin,
            encoding="utf8",
            check=False,
            stdout=subprocess.PIPE if capture else None,
            stderr=subprocess.STDOUT if capture else None,
        )
    except FileNotFoundError:
        # Indicates the *command* wasn't found, it's an error before the command
        # is run.
        raise FileNotFoundError(
            Errors.E501.format(str_command=cmd_str, tool=cmd_list[0])
        ) from None
    if ret.returncode != 0 and capture:
        message = f"Error running command:\n\n{cmd_str}\n\n"
        message += f"Subprocess exited with status {ret.returncode}"
        if ret.stdout is not None:
            message += "\n\nProcess log (stdout and stderr):\n\n"
            message += ret.stdout
        error = subprocess.SubprocessError(message)
        error.ret = ret  # type: ignore[attr-defined]
        error.command = cmd_str  # type: ignore[attr-defined]
        raise error
    elif ret.returncode != 0:
        sys.exit(ret.returncode)
    return ret


        */
/* :Author: Günter Milde, based on html4css1.css by David Goodger          */
/* :Id: $Id: minimal.css 8036 2017-02-14 13:05:46Z milde $               */
/* :Copyright: © 2015 Günter Milde.                                        */
/* :License: Released under the terms of the `2-Clause BSD license`_,      */
/*    in short:                                                            */
/*                                                                         */
/*    Copying and distribution of this file, with or without modification, */
/*    are permitted in any medium without royalty provided the copyright   */
/*    notice and this notice are preserved.                                */
/*                                                                         */
/*    This file is offered as-is, without any warranty.                    */
/*                                                                         */
/* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause     */

/* This CSS2.1_ stylesheet defines rules for Docutils elements without    */
/* HTML equivalent. It is required to make the document semantic visible. */
/*                                                                        */
/* .. _CSS2.1: http://www.w3.org/TR/CSS2                                  */
/* .. _validates: http://jigsaw.w3.org/css-validator/validator$link       */

/* alignment of text and inline objects inside block objects*/
.align-left   { text-align: left; }
.align-right  { text-align: right; }
.align-center { clear: both; text-align: center; }
.align-top    { vertical-align: top; }
.align-middle { vertical-align: middle; }
.align-bottom { vertical-align: bottom; }

/* titles */
h1.title, p.subtitle {
  text-align: center;
}
p.admonition-title,
p.topic-title,
p.sidebar-title,
p.rubric,
p.system-message-title {
  font-weight: bold;
}
h1 + p.subtitle,
h1 + p.section-subtitle {
  font-size: 1.6em;
}
h2 + p.section-subtitle { font-size: 1.28em; }
p.subtitle,
p.section-subtitle,
p.sidebar-subtitle {
  font-weight: bold;
  margin-top: -0.5em;
}
p.sidebar-title,
p.rubric {
  font-size: larger;
}
p.rubric { color: maroon; }
a.toc-backref {
  color: black;
  text-decoration: none; }

/* Warnings, Errors */
div.caution p.admonition-title,
div.attention p.admonition-title,
div.danger p.admonition-title,
div.error p.admonition-title,
div.warning p.admonition-title,
div.system-messages h1,
div.error,
span.problematic,
p.system-message-title {
  color: red;
}

/* inline literals */
span.docutils.literal {
  font-family: monospace;
  white-space: pre-wrap;
}
/* do not wraph at hyphens and similar: */
.literal > span.pre { white-space: nowrap; }

/* Lists */

/* compact and simple lists: no margin between items */
.simple  li, .compact li,
.simple  ul, .compact ul,
.simple  ol, .compact ol,
.simple > li p, .compact > li p,
dl.simple > dd, dl.compact > dd {
  margin-top: 0;
  margin


 to box.colorName,
            resources.getString(R.string.box_value) to String.format("#%06X", (0xFFFFFF and box.colorValue))
        )
    }

    private fun settingsToMap(isActive: Boolean): Map<String, String> {
        val isActiveString = resources.getString(if (isActive) R.string.yes else R.string.no)
        return mapOf(
            resources.getString(R.string.setting_is_active) to isActiveString
        )
    }

    private class Node(
        val id: Long,
        val attributes: Map<String, String>,
        val expansionStatus: ExpansionStatus,
        val nodes: List<Node>
    )

    private class ExpansionsState(
        val identifiers: Set<Long>
    )

    private companion object {
        const val ACCOUNT_MASK = 0x2L shl 60
        const val BOX_MASK = 0x3L shl 60
        const val SETTING_MASK = 0x4L shl 60
    }

}package ua.cn.stu.espresso.apps.testutils.espresso

import android.content.res.ColorStateList
import android.graphics.drawable.Drawable
import android.view.View
import android.widget.ImageView
import androidx.annotation.ColorRes
import androidx.annotation.DrawableRes
import androidx.core.content.ContextCompat
import androidx.core.graphics.drawable.toBitmap
import androidx.test.core.app.ApplicationProvider
import org.hamcrest.Description
import org.hamcrest.Matcher
import org.hamcrest.TypeSafeMatcher

/**
 * Check that the image view shows the specified drawable and
 * optionally the drawable is tinted with the [tintColorRes].
 */
fun withDrawable(
    drawable: Drawable,
    @ColorRes tintColorRes: Int? = null
): Matcher<View> = WithDrawable(drawable, tintColorRes)

/**
 * Check that the image view shows the specified drawable resource and
 * optionally the drawable is tinted with the [tintColorRes].
 */
fun withDrawable(
    @DrawableRes drawableRes: Int,
    @ColorRes tintColorRes: Int? = null
) : Matcher<View> = WithDrawable(drawableRes, tintColorRes)

private class WithDrawable(
    private val drawable: Drawable,
    @ColorRes private val tintColorRes: Int?
) : TypeSafeMatcher<View>() {

    constructor(
        @DrawableRes drawableRes: Int,
        @ColorRes tintColorRes: Int?
    ) : this(
        ContextCompat.getDrawable(
            ApplicationProvider.getApplicationContext(),
            drawableRes
        )!!,
        tintColorRes
    )

    override fun describeTo(description: Description) {
        description.appendText("ImageView with the specified drawable res.")
    }

    override fun matchesSafely(item: View): Boolean {
        if (item !is ImageView) return false
        if (tintColorRes != null) {
            drawable.setTintList(
                ColorStateList.valueOf(
                    ContextCompat.getColor(item.context, tintColorRes)
                )
            )
        }
        return item.drawable.toBitmap().sameAs(drawable.toBitmap())
    }
}package ua.cn.stu.espresso.apps.activities

import android.content.Intent
import android.os.Bundle
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.DefaultItemAnimator
import androidx.recyclerview.widget.LinearLayoutManager
import dagger.hilt.android.AndroidEntryPoint
import ua.cn.stu.espresso.CatsAdapterListener
import ua.cn.stu.espresso.catsAdapter
import ua.cn.stu.espresso.databinding.FragmentCatsBinding
import ua.cn.stu.espresso.viewmodel.CatListItem
import ua.cn.stu.espresso.viewmodel.CatsViewModel

@AndroidEntryPoint
class CatsListActivity : AppCompatActivity(), CatsAdapterListener {

    private val viewModel by viewModels<CatsViewModel>()

    override fun onCreate(savedInsta


持16k采样率16bit单声道编码方式，如有不一致可能导致评估不准确或失败。
//
// 可能返回的错误码:
//  AUTHFAILURE = "AuthFailure"
//  AUTHFAILURE_ACCOUNTUNAVAILABLE = "AuthFailure.AccountUnavailable"
//  AUTHFAILURE_INVALIDAUTHORIZATION = "AuthFailure.InvalidAuthorization"
//  FAILEDOPERATION = "FailedOperation"
//  FAILEDOPERATION_ERRORGETSESSION = "FailedOperation.ErrorGetSession"
//  FAILEDOPERATION_ERRORGETUSER = "FailedOperation.ErrorGetUser"
//  FAILEDOPERATION_EVALUATETIMEOUT = "FailedOperation.EvaluateTimeout"
//  FAILEDOPERATION_EVALUATEUNKNOWNERROR = "FailedOperation.EvaluateUnknownError"
//  FAILEDOPERATION_FAILEDGETENGINEIP = "FailedOperation.FailedGetEngineIP"
//  FAILEDOPERATION_FAILEDGETRESULT = "FailedOperation.FailedGetResult"
//  FAILEDOPERATION_FAILEDGETSESSION = "FailedOperation.FailedGetSession"
//  FAILEDOPERATION_FAILEDGETSESSIONSEQID = "FailedOperation.FailedGetSessionSeqID"
//  FAILEDOPERATION_FAILEDGETUSER = "FailedOperation.FailedGetUser"
//  FAILEDOPERATION_FAILEDINIT = "FailedOperation.FailedInit"
//  FAILEDOPERATION_FAILEDSETRESULT = "FailedOperation.FailedSetResult"
//  FAILEDOPERATION_FAILEDSETSESSION = "FailedOperation.FailedSetSession"
//  FAILEDOPERATION_FAILEDSETSESSIONSEQID = "FailedOperation.FailedSetSessionSeqID"
//  FAILEDOPERATION_FAILEDSETUSER = "FailedOperation.FailedSetUser"
//  FAILEDOPERATION_INTERNALSERVERERROR = "FailedOperation.InternalServerError"
//  FAILEDOPERATION_INVALIDPARAMETERVALUE = "FailedOperation.InvalidParameterValue"
//  FAILEDOPERATION_JSONCODECERROR = "FailedOperation.JsonCodecError"
//  FAILEDOPERATION_NEEDINITBEFOREEVALUATION = "FailedOperation.NeedInitBeforeEvaluation"
//  FAILEDOPERATION_PASTSEQIDLOSE = "FailedOperation.PastSeqIdLose"
//  FAILEDOPERATION_RESULTEXPIRED = "FailedOperation.ResultExpired"
//  FAILEDOPERATION_SEQIDEXPIRED = "FailedOperation.SeqIdExpired"
//  FAILEDOPERATION_SERVEROVERLOAD = "FailedOperation.ServerOverload"
//  FAILEDOPERATION_SERVICETIMEOUT = "FailedOperation.ServiceTimeout"
//  FAILEDOPERATION_SESSIONEXPIRED = "FailedOperation.SessionExpired"
//  FAILEDOPERATION_WAITPASTSEQIDTIMEOUT = "FailedOperation.WaitPastSeqIdTimeout"
//  INTERNALERROR = "InternalError"
//  INTERNALERROR_AUDIOPROCESSINGFAILED = "InternalError.AudioProcessingFailed"
//  INTERNALERROR_BASE64DECODEFAILED = "InternalError.BASE64DecodeFailed"
//  INTERNALERROR_CANNOTFINDSESSION = "InternalError.CannotFindSession"
//  INTERNALERROR_FAILTODECODEVOICE = "InternalError.FailToDecodeVoice"
//  INTERNALERROR_ILEGALSERVERRESPONSE = "InternalError.IlegalServerResponse"
//  INTERNALERROR_INITSTREAMNOTSUPPORT = "InternalError.InitStreamNotSupport"
//  INTERNALERROR_INITSTREAMUNFINISHED = "InternalError.InitStreamUnfinished"
//  INTERNALERROR_INITIALPARAMETERERROR = "InternalError.InitialParameterError"
//  INTERNALERROR_INVALIDSEQID = "InternalError.InvalidSeqId"
//  INTERNALERROR_INVALIDWAVHEADER = "InternalError.InvalidWAVHeader"
//  INTERNALERROR_LASTSEQUNFINISHED = "InternalError.LastSeqUnfinished"
//  INTERNALERROR_MP3DECODEFAILED = "InternalError.MP3DecodeFailed"
//  INTERNALERROR_NEEDTOINIT = "InternalError.NeedToInit"
//  INTERNALERROR_NOCONVERSATIONFOUND = "InternalError.NoConversationFound"
//  IN


overflow:hidden;
padding:0px;
white-space:nowrap;
text-overflow:ellipsis;
}
.ms-qSuggest-listItem
{
margin:0px;
padding:7px 10px;
}
.ms-qSuggest-hListItem{
/* [ReplaceColor(themeColor:"HoverBackground",opacity:"1")] */ background-color:#cde6f7;
/* [ReplaceColor(themeColor:"HoverBackground")] */ background-color:rgba( 205,230,247,0.5 );
margin:0px;
padding:7px 10px;
}
.ms-qSuggest-personalResultTitle
{
padding:7px 10px;
margin:0;
/* [ReplaceColor(themeColor:"SubtleEmphasisText")] */ color:#666;
}
.ms-qSuggest-listSeparator
{
/* [ReplaceColor(themeColor:"SubtleLines")] */ border-top:1px solid #c6c6c6;
margin:7px 0px;
}
a:active.ms-skip,
a:focus.ms-skip,
a:focus.ms-acc-button,
a:active.ms-acc-button
{
position:absolute;
top:2px;
background-color:#fff;
border:1px solid #000;
color:#000;
padding:2px 4px;
z-index:12;
height:auto;
width:auto;
}
#pageStatusBar[class],
.ms-status-msg
{
position:static;
margin-bottom:15px;
padding:7px 10px;
border-width:1px;
border-style:solid;
color:#444;
}
.ms-status-blue
{
background-color:#f0f0f0 !important;
border-color:#c6c6c6 !important;
}
.ms-status-blue a:link,
.ms-status-blue a:visited
{
color:#125ab2 !important;
}
.ms-status-green
{
background-color:#c7f299 !important;
border-color:#99cc62 !important;
}
.ms-status-green a:link,
.ms-status-green a:visited
{
color:#125ab2 !important;
}
.ms-status-yellow
{
background-color:#fff19d !important;
border-color:#d7d889 !important;
}
.ms-status-yellow a:link,
.ms-status-yellow a:visited
{
color:#125ab2 !important;
}
.ms-status-red
{
background-color:#f8d4d4 !important;
border-color:#f5a6a7 !important;
}
.ms-status-red a:link,
.ms-status-red a:visited
{
color:#125ab2 !important;
}
.ms-status-status
{
display:block;
}
.ms-status-title
{
margin-right:10px;
vertical-align:middle;
}
.ms-status-body
{
vertical-align:middle;
}
.ms-status-iconSpan
{
display:inline-block;
height:20px;
width:20px;
position:relative;
vertical-align:middle;
overflow:hidden;
margin-right:10px;
}
.ms-status-iconImg
{
position:absolute;
}
.ms-status-blue > .ms-status-status > .ms-status-iconSpan > .ms-status-iconImg
{
top:-52px;
left:-178px;
}
.ms-status-green > .ms-status-status > .ms-status-iconSpan > .ms-status-iconImg
{
top:-30px;
left:-178px;
}
.ms-status-red > .ms-status-status > .ms-status-iconSpan > .ms-status-iconImg
{
top:-74px;
left:-178px;
}
.ms-status-yellow > .ms-status-status > .ms-status-iconSpan > .ms-status-iconImg
{
top:-180px;
left:-45px;
}
#ms-gearPageBody{
padding:0px 20px;
}
#ms-loading-body


大干社会主义，推动普及大寨县运动。

   5日  中共中央决定调广西自治区党委第一书记、自治区革委主任、广西军区第一政委韦国清任广东省委第一书记、省革委主任，广州军区第一政委、军区党委第二书记；安平生任广西自治区党委第一书记、自治区革委主任、广西军区第一政委。

   11月

   上旬，全区八十六个县、市普遍召开四级干部会议传达贯彻全国农业学大寨会议精神。五十多万干部参加了会议。大家决心象搞土地改革、农业合作化、人民公社化那样，全力以赴，领导广大群众夺取普及大寨县和一九八○年基本实现农业机械化的胜利。由于农业学大寨的群众运动的开展，进一步发展了在农业生产上“左”的东西，严重地挫伤了广大干部、群众的积极性。

   上旬，毛泽东在听取毛远新几次歪曲情况、攻击邓小平的汇报后说：“有两种态度：一是对文化大革命不满，二是要算帐，算文化大革命的帐”。毛泽东在谈到对“文化大革命”的看法时，认为是“三七开，七分成绩，三分错误”。“文化大革命犯了两个错误，1、打倒一切，2、全面内战”。他说：“总的看法：基本正确，有所不足”。因此，根据毛泽东的意见，中央政治局部分委员几次开会，对邓小平作了错误的批评，并且停止他的大部分工作，让他“专管外事”。

   下旬，中央在北京召开“打招呼会议”，会上宣读了经毛泽东审阅批准的《打招呼的讲话要点》。《要点》说：“中央认为，毛主席的指示非常重要。清华大学的问题绝不是孤立的，是当前两个阶级、两条道路、两条路线斗争的反映。这是一股右倾翻案风”。“有些人总是对这次文化大革命不满意，总是要算文化大革命的帐，总是要


}
#  endif /* SU_USE_VOLK */
    __su_ncqo_step(ncqo);
  }
}

SUINLINE void
__su_ncqo_step_precalc(su_ncqo_t *ncqo)
{
  if (++ncqo->p == SU_NCQO_PRECALC_BUFFER_LEN) {
    ncqo->p = 0;
    __su_ncqo_populate_precalc_buffer(ncqo);
  }
}

#endif /* SU_NCQO_USE_PRECALC_BUFFER */
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ VOLK HACKS ABOVE ^^^^^^^^^^^^^^^^^^^^^^^^^^^*/

/* NCQO constructor */
SU_CONSTRUCTOR_TYPED(void, su_ncqo, SUFLOAT frel);

/* NCQO constructor for fixed frequency */
SU_METHOD(su_ncqo, void, init_fixed, SUFLOAT fnor);

/* Init ncqo from existing ncqo */
SU_METHOD(su_ncqo, void, copy, const su_ncqo_t *ncqo);

/* Compute next step */
SUINLINE
SU_METHOD(su_ncqo, void, step)
{
#ifdef SU_NCQO_USE_PRECALC_BUFFER
  if (self->pre_c) {
    __su_ncqo_step_precalc(self);
  } else {
#endif /* SU_NCQO_USE_PRECALC_BUFFER */
    __su_ncqo_step(self);

    /* Sine & cosine values are now outdated */
    self->cos_updated = SU_FALSE;
    self->sin_updated = SU_FALSE;
#ifdef SU_NCQO_USE_PRECALC_BUFFER
  }
#endif /* SU_NCQO_USE_PRECALC_BUFFER */
}

/* Force phase */
SU_METHOD(su_ncqo, void, set_phase, SUFLOAT phi);

/* Get current phase */
SUINLINE
SU_GETTER(su_ncqo, SUFLOAT, get_phase)
{
#ifdef SU_NCQO_USE_PRECALC_BUFFER
  if (self->pre_c)
    return self->phi_buffer[self->p];
#endif /* SU_NCQO_USE_PRECALC_BUFFER */

  return self->phi;
}

/* Increment current phase */
SUINLINE
SU_METHOD(su_ncqo, void, inc_phase, SUFLOAT delta)
{
#ifdef SU_NCQO_USE_PRECALC_BUFFER
  if (self->pre_c) {
#  ifdef SU_LOG_DOMAIN
    SU_ERROR("Cannot increase phase on a fixed NCQO\n");
#  endif /* SU_LOG_DOMAIN */
    return;
  }
#endif /* SU_NCQO_USE_PRECALC_BUFFER */

  self->phi += delta;

  if (self->phi < 0 || self->phi >= 2 * PI) {
    self->phi -= 2 * PI * SU_FLOOR(self->phi / (2 * PI));
  }
}
/* Get in-phase component */
SU_METHOD(su_ncqo, SUFLOAT, get_i);

/* Get cuadrature component */
SU_METHOD(su_ncqo, SUFLOAT, get_q);

/* Get both components as complex */
SU_METHOD(su_ncqo, SUCOMPLEX, get);

/* Read (compute next + get) in-phase component */
SU_METHOD(su_ncqo, SUFLOAT, read_i);

/* Read (compute next + get) cuadrature component */
SU_METHOD(su_ncqo, SUFLOAT, read_q);

/* Read (compute next + get) both components as complex */
SU_METHOD(su_ncqo, SUCOMPLEX, read);

/* Set oscillator frequency (normalized angular freq) */
SU_METHOD(su_ncqo, void, set_angfreq, SUFLOAT omrel);

/* Increase or decrease current frequency (normalized angular freq) */
SU_METHOD(su_ncqo, void, inc_angfreq, SUFLOAT delta);

/* Get current frequency (normalized angular freq) */
SU_GETTER(su_ncqo, SUFLOAT, get_angfreq);

/* Set oscillator frequency (normalized freq) */
SU_METHOD(su_ncqo, void, set_freq, SUFLOAT frel);

/* Increase or decrease current frequency (normalized freq) */
SU_METHOD(su_ncqo, void, inc_freq, SUFLOAT delta);

/* Get current frequency (normalized freq) */
SU_GETTER(su_ncqo, SUFLOAT, get_freq);

#ifdef __cplusplus
#  ifdef __clang__
#    pragma clang diagnostic pop
#  endif  // __clang__
}
#endif /* __cplusplus */

#endif /* _SIGUTILS_NCQO_H */


r filter = new TelemetryFilter(Sha256Hasher.HashWithNormalizedCasing);
        foreach (var e in filter.Filter(new InstallerSuccessReport(exeName)))
        {
            telemetry.TrackEvent(e.EventName, e.Properties, null);
        }
    }

    internal class ThreadBlockingTelemetry : ITelemetry
    {
        private readonly Telemetry.Telemetry telemetry;

        internal ThreadBlockingTelemetry()
        {
            var sessionId =
            Environment.GetEnvironmentVariable(TelemetrySessionIdEnvironmentVariableName);
            telemetry = new Telemetry.Telemetry(new NoOpFirstTimeUseNoticeSentinel(), sessionId, blockThreadInitialization: true);
        }
        public bool Enabled => telemetry.Enabled;

        public void Flush()
        {
        }

        public void Dispose()
        {
            telemetry.Dispose();
        }

        public void TrackEvent(string eventName, IDictionary<string, string> properties, IDictionary<string, double> measurements)
        {
            telemetry.ThreadBlockingTrackEvent(eventName, properties, measurements);
        }
    }
}

internal class InstallerSuccessReport(string exeName)
{
    public string ExeName { get; } = exeName ?? throw new ArgumentNullException(nameof(exeName));
}