function getFrecuencyByString(frecuencyStr: string): Frequency {
    switch (frecuencyStr) {
        case "YEARLY": return RRule["YEARLY"]
        case "MONTHLY": return RRule["MONTHLY"]
        case "WEEKLY": return RRule["WEEKLY"]
        case "DAILY": return RRule["DAILY"]
        case "HOURLY": return RRule["HOURLY"]
        case "MINUTELY": return RRule["MINUTELY"]
        default: return RRule["SECONDLY"]
    }
}

function getByweekdayByStringArr(weekdays: string[]): Weekday[] {
    var weekdaysReturn: Weekday[] = []
    weekdays.forEach(day => {
        switch (day) {
            case "MONDAY": weekdaysReturn.push(RRule.MO); break;
            case "TUESDAY": weekdaysReturn.push(RRule.TU); break;
            case "WEDNESDAY": weekdaysReturn.push(RRule.WE); break;
            case "THURSDAY": weekdaysReturn.push(RRule.TH); break;
            case "FRIDAY":weekdaysReturn.push(RRule.FR); break;
            case "SATURDAY": weekdaysReturn.push(RRule.SA); break;
            default: return weekdaysReturn.push(RRule.SU);
        }
    });
    return weekdaysReturn;
}

function test() {

    const freqStr: string = "WEEKLY"
    const Freq: Frequency = getFrecuencyByString(freqStr);

    const Interval: number = 5;

    const byweekdayStr: string[] = ["MONDAY", "FRIDAY"];
    const Byweekday: Weekday[] = getByweekdayByStringArr(byweekdayStr);

    const startStr: string = "2012-02-01T10:30:00.000Z"
    const Start = new Date(startStr);

    const endStr: string = "2013-01-31T00:00:00.000Z"
    const End = new Date(endStr);

    const rule = new RRule({
        freq: Freq,
        interval: Interval,
        byweekday: Byweekday,
        dtstart: Start,
        until: End
    })

    console.log(rule.all())

}

function test2() {
    const daysHash = {
        MONDAY: new Weekday(0),
        TUESDAY: new Weekday(1),
        WEDNESDAY: new Weekday(2),
        THURSDAY: new Weekday(3),
        FRIDAY: new Weekday(4),
        SATURDAY: new Weekday(5),
        SUNDAY: new Weekday(6),
    }

    console.log(daysHash["MONDAY"])
}
const sarah = {
    name: 'Sarah',
    idade: 26,
    casado: true,
    trabalho: 'Engenheira' // Nesse campo é dito que a sarah trabalha como 'Engenheira'
}

const maria = {
    name: 'Maria',
    idade: 23,
    casado: false,
    trabalho: 'engenheira' // E aqui é dito que maria trabalha como 'engenheira'.
}

// Isso está correto? Existe diferença entre 'Engenheira' e 'engenheira'? Acredito que não. Isso deve ter sido um erro cometido em desenvolvimento.

// Para resolver isso vamos usar a feature Enum do TypeScript para criar o enum Profissao
enum Profissao {
    Professor,
    Engenheiro,
    Pintor,
    Porteiro
}

// E para garantir que o enum vai ser usado corretamente, vamos criar um tipo Pessoa também
type Pessoa = {
    name: string,
    idade: number,
    casado: boolean,
    trabalho: Profissao // Aqui inserimos o enum como um tipo
}

const gabriel: Pessoa = {
    name: 'Gabriel',
    idade: 26,
    casado: false,
    trabalho: Profissao.Engen


u $t6, $t4, -1
/* 14BD78 801A5D08 AC4E0000 */  sw    $t6, ($v0)
/* 14BD7C 801A5D0C 8C680000 */  lw    $t0, ($v1)
/* 14BD80 801A5D10 00084080 */  sll   $t0, $t0, 2
/* 14BD84 801A5D14 0328C821 */  addu  $t9, $t9, $t0
/* 14BD88 801A5D18 8F39C4A0 */  lw    $t9, -0x3b60($t9)
/* 14BD8C 801A5D1C 0248C021 */  addu  $t8, $s2, $t0
/* 14BD90 801A5D20 02285021 */  addu  $t2, $s1, $t0
/* 14BD94 801A5D24 57200008 */  bnezl $t9, .L801A5D48_ovl7
/* 14BD98 801A5D28 02486821 */   addu  $t5, $s2, $t0
/* 14BD9C 801A5D2C 8F0F0000 */  lw    $t7, ($t8)
/* 14BDA0 801A5D30 51E00005 */  beql  $t7, $zero, .L801A5D48_ovl7
/* 14BDA4 801A5D34 02486821 */   addu  $t5, $s2, $t0
/* 14BDA8 801A5D38 8D4B0000 */  lw    $t3, ($t2)
/* 14BDAC 801A5D3C 1160FFE9 */  beqz  $t3, .L801A5CE4_ovl7
/* 14BDB0 801A5D40 00000000 */   nop
/* 14BDB4 801A5D44 02486821 */  addu  $t5, $s2, $t0
.L801A5D48_ovl7:
/* 14BDB8 801A5D48 8DAC0000 */  lw    $t4, ($t5)
/* 14BDBC 801A5D4C 02287021 */  addu  $t6, $s1, $t0
/* 14BDC0 801A5D50 1180000A */  beqz  $t4, .L801A5D7C_ovl7
/* 14BDC4 801A5D54 00000000 */   nop
/* 14BDC8 801A5D58 8DD90000 */  lw    $t9, ($t6)
/* 14BDCC 801A5D5C 17200007 */  bnez  $t9, .L801A5D7C_ovl7
/* 14BDD0 801A5D60 00000000 */   nop
/* 14BDD4 801A5D64 0C06937F */  jal   func_801A4DFC_ovl7
/* 14BDD8 801A5D68 8FA40030 */   lw    $a0, 0x30($sp)
/* 14BDDC 801A5D6C 3C038005 */  lui   $v1, %hi(D_8004A7C4) # $v1, 0x8005
/* 14BDE0 801A5D70 8C63A7C4 */  lw    $v1, %lo(D_8004A7C4)($v1)
/* 14BDE4 801A5D74 8C680000 */  lw    $t0, ($v1)
/* 14BDE8 801A5D78 00084080 */  sll   $t0, $t0, 2
.L801A5D7C_ovl7:
/* 14BDEC 801A5D7C 3C01800F */  lui   $at, 0x800f
/* 14BDF0 801A5D80 00280821 */  addu  $at, $at, $t0
/* 14BDF4 801A5D84 24180001 */  li    $t8, 1
/* 14BDF8 801A5D88 AC38C2E0 */  sw    $


 crate::core::{
    ribosome::{CallContext, RibosomeT},
    state::metadata::LinkMetaKey,
};
use holochain_p2p::actor::GetLinksOptions;
use holochain_zome_types::link::LinkDetails;
use holochain_zome_types::GetLinkDetailsInput;
use holochain_zome_types::GetLinkDetailsOutput;
use std::sync::Arc;

#[allow(clippy::extra_unused_lifetimes)]
pub fn get_link_details<'a>(
    ribosome: Arc<impl RibosomeT>,
    call_context: Arc<CallContext>,
    input: GetLinkDetailsInput,
) -> RibosomeResult<GetLinkDetailsOutput> {
    let (base_address, tag) = input.into_inner();

    // Get zome id
    let zome_id = ribosome.zome_name_to_id(&call_context.zome_name)?;

    // Get the network from the context
    let network = call_context.host_access.network().clone();

    tokio_safe_block_on::tokio_safe_block_forever_on(async move {
        // Create the key
        let key = match tag.as_ref() {
            Some(tag) => LinkMetaKey::BaseZomeTag(&base_address, zome_id, tag),
            None => LinkMetaKey::BaseZome(&base_address, zome_id),
        };

        // Get the links from the dht
        let link_details = LinkDetails::from(
            call_context
                .host_access
                .workspace()
                .write()
                .await
                .cascade(network)
                .get_link_details(&key, GetLinksOptions::default())
                .await?,
        );

        Ok(GetLinkDetailsOutput::new(link_details))
    })
}

#[cfg(test)]
#[cfg(feature = "slow_tests")]
pub mod slow_tests {

    use crate::fixt::ZomeCallHostAccessFixturator;
    use ::fixt::prelude::*;
    use holochain_wasm_test_utils::TestWasm;
    use holochain_zome_types::element::SignedHeaderHashed;
    use holochain_zome_types::Header;
    use test_wasm_common::*;

    #[tokio::test(threaded_scheduler)]
    async fn ribosome_entry_hash_path_children_details() {
        let test_env = holochain_state::test_utils::test_cell_env();
        let env = test_env.env();

        let mut workspace =
            crate::core::workflow::CallZomeWorkspace::new(env.clone().into()).unwrap();

        // commits fail validation if we don't do genesis
        crate::core::workflow::fake_genesis(&mut workspace.source_chain)
            .await
            .unwrap();

        let workspace_lock = crate::core::workflow::CallZomeWorkspaceLock::new(workspace);
        let mut host_access = fixt!(ZomeCallHostAccess);
        host_access.workspace = workspace_lock;

        // ensure foo.bar twice to ensure idempotency
        let _: () = crate::call_test_ribosome!(
            host_access,
            TestWasm::HashPath,
            "ensure",
            TestString::from("foo.bar".to_string())
        );
        let _: () = crate::call_test_ribosome!(
            host_access,
            TestWasm::HashPath,
            "ensure",
            TestString::from("foo.bar".to_string())
        );

        // ensure foo.baz
        let _: () = crate::call_test_ribosome!(
            host_access,
            TestWasm::HashPath,
            "ensure",
            TestString::from("foo.baz".to_string())
        );

        let exists_output: TestBool = crate::call_test_ribosome!(
            host_access,
            TestWasm::HashPath,
            "exists",
            TestString::from("foo".to_string())
        );

        assert_eq!(TestBool(true), exists_output,);

        let _foo_bar: holo_hash::EntryHash = crate::call_test_ribosome!(


-bit status code into 64-bit.
	 */
	test	%rax, %rax
	jz	1f
	movl	%eax, %ecx
	andl	$0x0fffffff, %ecx
	andl	$0xf0000000, %eax
	shl	$32, %rax
	or	%rcx, %rax
1:
	addq	$8, %rsp
	pop	%rbx
	pop	%rbp
	ret
ENDPROC(efi64_thunk)

ENTRY(efi_exit32)
	movq	func_rt_ptr(%rip), %rax
	push	%rax
	mov	%rdi, %rax
	ret
ENDPROC(efi_exit32)

	.code32
/*
 * EFI service pointer must be in %edi.
 *
 * The stack should represent the 32-bit calling convention.
 */
ENTRY(efi_enter32)
	movl	$__KERNEL_DS, %eax
	movl	%eax, %ds
	movl	%eax, %es
	movl	%eax, %ss

	/* Reload pgtables */
	movl	%cr3, %eax
	movl	%eax, %cr3

	/* Disable paging */
	movl	%cr0, %eax
	btrl	$X86_CR0_PG_BIT, %eax
	movl	%eax, %cr0

	/* Disable long mode via EFER */
	movl	$MSR_EFER, %ecx
	rdmsr
	btrl	$_EFER_LME, %eax
	wrmsr

	call	*%edi

	/* We must preserve return value */
	movl	%eax, %edi

	/*
	 * Some firmware will return with interrupts enabled. Be sure to
	 * disable them before we switch GDTs.
	 */
	cli

	movl	56(%esp), %eax
	movl	%eax, 2(%eax)
	lgdtl	(%eax)

	movl	%cr4, %eax
	btsl	$(X86_CR4_PAE_BIT), %eax
	movl	%eax, %cr4

	movl	%cr3, %eax
	movl	%eax, %cr3

	movl	$MSR_EFER, %ecx
	rdmsr
	btsl	$_EFER_LME, %eax
	wrmsr

	xorl	%eax, %eax
	lldt	%ax

	movl	60(%esp), %eax
	pushl	$__KERNEL_CS
	pushl	%eax

	/* Enable paging */
	movl	%cr0, %eax
	btsl	$X86_CR0_PG_BIT, %eax
	movl	%eax, %cr0
	lret
ENDPROC(efi_enter32)

	.data
	.balign	8
	.global	efi32_boot_gdt
efi32_boot_gdt:	.word	0
		.quad	0

save_gdt:	.word	0
		.quad	0
func_rt_ptr:	.quad	0

	.global efi_gdt64
efi_gdt64:
	.word	efi_gdt64_end - efi_gdt64
	.long	0			/* Filled out by user */
	.word	0
	.quad	0x0000000000000000	/* NULL descriptor */
	.quad	0x00af9a000000ffff	/* __KERNEL_CS */
	.quad	0x00cf92000000ffff	/* __KERNEL_DS */
	.quad	0x0080890000000000	/* TS descriptor */
	.quad   0x0000000000000000	/* TS continued */
efi_gdt64_end:


070105',	'2070105',	'R1支援反馈芯片',	'支援：\n1.提升角色的耐久\n2.修复效果增加',	'207',	'1',	'1',	'1',	'5',	'3',	'4',	'1.8',	'1',	'',	'',	'',	'20701',	'207',	'',	'21122',	'',	''},
{'2070201',	'2070201',	'R2支援运算芯片',	'支援：\n1.提升角色的耐久\n2.修复效果增加',	'207',	'1',	'2',	'2',	'1',	'6',	'1',	'0.03',	'0.01',	'',	'',	'',	'20701,1',	'207',	'',	'21122',	'',	''},
{'2070202',	'2070202',	'R2支援控制芯片',	'支援：\n1.提升角色的耐久\n2.修复效果增加',	'207',	'1',	'2',	'2',	'2',	'6',	'2',	'0.03',	'0.01',	'',	'',	'',	'20701,1',	'207',	'',	'21122',	'',	''},
{'2070203',	'2070203',	'R2支援存储芯片',	'支援：\n1.提升角色的耐久\n2.修复效果增加',	'207',	'1',	'2',	'2',	'3',	'6',	'3',	'0.03',	'0.01',	'',	'',	'',	'20701,1',	'207',	'',	'21122',	'',	''},
{'2070204',	'2070204',	'R2支援输入芯片',	'支援：\n1.提升角色的耐久\n2.修复效果增加',	'207',	'1',	'2',	'2',	'4',	'6',	'5',	'0.03',	'0.01',	'',	'',	'',	'20701,1',	'207',	'',	'21122',	'',	''},
{'2070205',	'2070205',	'R2支援反馈芯片',	'支援：\n1.提升角色的耐久\n2.修复效果增加',	'207',	'1',	'2',	'2',	'5',	'6',	'4',	'3',	'1',	'',	'',	'',	'20701,1',	'207',	'',	'21122',	'',	''},
{'2070301',	'2070301',	'R3支援运算芯片',	'支援：\n1.提升角色的耐久\n2.修复效果增加',	'207',	'1',	'3',	'3',	'1',	'9',	'1',	'0.036',	'0.012',	'',	'',	'',	'20702,2',	'207',	'',	'21122',	'',	''},
{'2070302',	'2070302',	'R3支援控制芯�


zza diventa obbligatoria cosa cambia per le aziende](https://www.agendadigitale.eu/sicurezza/cyber-resilience-act-la-sicurezza-diventa-obbligatoria-cosa-cambia-per-le-aziende/)
- Social Engineering
  - [ ] [How to make lighthearted personal observations about yourself during conversations?](https://www.reddit.com/r/SocialEngineering/comments/1hvr3y7/how_to_make_lighthearted_personal_observations/)
  - [ ] [I want to covertly know what my colleagues earn.](https://www.reddit.com/r/SocialEngineering/comments/1hve85a/i_want_to_covertly_know_what_my_colleagues_earn/)
- Your Open Hacker Community
  - [ ] [Staying untraceable for activism](https://www.reddit.com/r/HowToHack/comments/1hvo19t/staying_untraceable_for_activism/)
  - [ ] [Help](https://www.reddit.com/r/HowToHack/comments/1hw1gin/help/)
  - [ ] [GPS Dongle.](https://www.reddit.com/r/HowToHack/comments/1hvyqig/gps_dongle/)
  - [ ] [Trying to crack a MD5 but failing to to do it](https://www.reddit.com/r/HowToHack/comments/1hvxj16/trying_to_crack_a_md5_but_failing_to_to_do_it/)
  - [ ] [Bypass internet quota of University internet :)](https://www.reddit.com/r/HowToHack/comments/1hw28k9/bypass_internet_quota_of_university_internet/)
  - [ ] [How to establish permanent public access point for AsyncRAT](https://www.reddit.com/r/HowToHack/comments/1hw1l39/how_to_establish_permanent_public_access_point/)
  - [ ] [finding hidden login URL? real IP behind cloudflare? hydra bypass captcha? crack zip password?](https://www.reddit.com/r/HowToHack/comments/1hvrz4f/finding_hidden_login_url_real_ip_behind/)
  - [ ] [Script for Traffic in websites](https://www.reddit.com/r/HowToHack/comments/1hvrli6/script_for_traffic_in_websites/)
  - [ ] [RFID Grabbing Through Fabric](https://www.reddit.com/r/HowToHack/comments/1hvmchv/rfid_grabbing_through_fabric/)
  - [ ] [Need Help: BitLocker Locked Me Out of My Extern Flash Drive](https://www.reddit.com/r/HowToHack/comments/1hvr5tr/need_help_bitlocker_locked_me_out_of_my_extern/)
  - [ ] [help with screen recording blocks](https://www.reddit.com/r/HowToHack/comments/1hvlwn8/help_with_screen_recording_blocks/)
  - [ ] [I want to start to collect data with a link, how do I start this?](https://www.reddit.com/r/HowToHack/comments/1hvnyzs/i_want_to_start_to_collect_data_with_a_link_how/)
- netsecstudents: Subreddit for students studying Network Security and its related subjects
  - [ ] [How to build your Home Lab using your PC or Laptop with the free VMware workstation Pro 2025](https://www.reddit.com/r/netsecstudents/comments/1hw249n/how_to_build_your_home_lab_using_your_pc_or/)
- TorrentFreak
  - [ ] [IPTV Piracy Expert Urges Restraint in Rush Towards Automated Blocking](https://torrentfreak.com/iptv-piracy-expert-urges-restraint-in-rush-towards-automated-blocking-250107/)
- The Hacker News
  - [ ] [Researchers Un


CreateChannelError::ServiceUnavailable(String::from(error_message))
                }
                "TooManyRequestsException" => {
                    return CreateChannelError::TooManyRequests(String::from(error_message))
                }
                "UnprocessableEntityException" => {
                    return CreateChannelError::UnprocessableEntity(String::from(error_message))
                }
                "ValidationException" => {
                    return CreateChannelError::Validation(error_message.to_string())
                }
                _ => {}
            }
        }
        return CreateChannelError::Unknown(res);
    }
}

impl From<serde_json::error::Error> for CreateChannelError {
    fn from(err: serde_json::error::Error) -> CreateChannelError {
        CreateChannelError::ParseError(err.description().to_string())
    }
}
impl From<CredentialsError> for CreateChannelError {
    fn from(err: CredentialsError) -> CreateChannelError {
        CreateChannelError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateChannelError {
    fn from(err: HttpDispatchError) -> CreateChannelError {
        CreateChannelError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateChannelError {
    fn from(err: io::Error) -> CreateChannelError {
        CreateChannelError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateChannelError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateChannelError {
    fn description(&self) -> &str {
        match *self {
            CreateChannelError::Forbidden(ref cause) => cause,
            CreateChannelError::InternalServerError(ref cause) => cause,
            CreateChannelError::NotFound(ref cause) => cause,
            CreateChannelError::ServiceUnavailable(ref cause) => cause,
            CreateChannelError::TooManyRequests(ref cause) => cause,
            CreateChannelError::UnprocessableEntity(ref cause) => cause,
            CreateChannelError::Validation(ref cause) => cause,
            CreateChannelError::Credentials(ref err) => err.description(),
            CreateChannelError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateChannelError::ParseError(ref cause) => cause,
            CreateChannelError::Unknown(_) => "unknown error",
        }
    }
}
/// Errors returned by CreateOriginEndpoint
#[derive(Debug, PartialEq)]
pub enum CreateOriginEndpointError {
    ///
The client is not authorized to access the requested resource.

    Forbidden(String),
    ///
An unexpected error occurred.

    InternalServerError(String),
    ///
The requested resource does not exist.

    NotFound(String),
    ///
An unexpected error occurred.

    ServiceUnavailable(String),
    ///
The client has exceeded their resource or throttling limits.

    TooManyRequests(String),
    ///
The parameters sent in the request are not valid.

    UnprocessableEntity(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An error occurred parsing the response payload.
    ParseError(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(BufferedHttpResponse),
}

impl CreateOriginEndpointError {
    // see boto RestJSONParser impl for parsing errors
    // https://github.com/boto/botocore/blob/4dff78c840403d1d17db9b3f800b20d3bd9fbf9f/botocore/parsers.py#


00033754  C0 02 82 58 */	lfs f0, lbl_80640858-_SDA2_BASE_(r2)
/* 80037AF8 00033758  D0 21 00 0C */	stfs f1, 0xc(r1)
/* 80037AFC 0003375C  D0 01 00 08 */	stfs f0, 8(r1)
/* 80037B00 00033760  D0 21 00 10 */	stfs f1, 0x10(r1)
lbl_80037B04:
/* 80037B04 00033764  7F E3 FB 78 */	mr r3, r31
/* 80037B08 00033768  38 81 00 08 */	addi r4, r1, 8
/* 80037B0C 0003376C  48 00 0D 11 */	bl func_8003881C
/* 80037B10 00033770  7F E3 FB 78 */	mr r3, r31
/* 80037B14 00033774  38 81 00 20 */	addi r4, r1, 0x20
/* 80037B18 00033778  48 00 0F B9 */	bl func_80038AD0
/* 80037B1C 0003377C  7F E3 FB 78 */	mr r3, r31
/* 80037B20 00033780  38 81 00 14 */	addi r4, r1, 0x14
/* 80037B24 00033784  48 00 0E 2D */	bl func_80038950
/* 80037B28 00033788  A0 1F 05 0C */	lhz r0, 0x50c(r31)
/* 80037B2C 0003378C  28 00 00 01 */	cmplwi r0, 1
/* 80037B30 00033790  40 82 01 04 */	bne lbl_80037C34
/* 80037B34 00033794  A0 1F 05 10 */	lhz r0, 0x510(r31)
/* 80037B38 00033798  2C 00 01 47 */	cmpwi r0, 0x147
/* 80037B3C 0003379C  41 82 00 14 */	beq lbl_80037B50
/* 80037B40 000337A0  40 80 00 F4 */	bge lbl_80037C34
/* 80037B44 000337A4  2C 00 01 3C */	cmpwi r0, 0x13c
/* 80037B48 000337A8  41 82 00 E4 */	beq lbl_80037C2C
/* 80037B4C 000337AC  48 00 00 E8 */	b lbl_80037C34
lbl_80037B50:
/* 80037B50 000337B0  3C 80 09 31 */	lis r4, 0x09310C00@ha
/* 80037B54 000337B4  80 7F 0C 48 */	lwz r3, 0xc48(r31)
/* 80037B58 000337B8  38 84 0C 00 */	addi r4, r4, 0x09310C00@l
/* 80037B5C 000337BC  48 1A 39 61 */	bl func_801DB4BC
/* 80037B60 000337C0  2C 03 00 00 */	cmpwi r3, 0
/* 80037B64 000337C4  7C 7E 1B 78 */	mr r30, r3
/* 80037B68 000337C8  41 82 00 CC */	beq lbl_80037C34
/* 80037B6C 000337CC  3C 80 09 30 */	lis r4, 0x09300C00@ha
/* 80037B70 000337D0  80 7F 0C 48 */	lwz r3, 0xc48(r31)
/* 80037B74 000337D4  38 84 0C 00 */	addi r4, r4, 0x09300C00@l
/* 80037B78 000337D8  48 1A 39 45 */	bl func_801DB4BC
/* 80037B7C 000337DC  2C 03 00 00 */	cmpwi r3, 0
/* 80037B80 000337E0  7C


间，单位秒。
  /// * 抵达这个时间后，将自动关闭loading widget,默认15秒
  showProgressDialog(
      {Widget? progress,
        Color? bgColor, int loadingTimeOut = 15,
        AfterLoadingCallback? afterDismiss}) {
    if (_dialogLoadingController == null) {
      _dialogLoadingController = DialogLoadingController();
      Navigator.of(context)
          .push(PageRouteBuilder(
              settings: RouteSettings(name: loadingLayerRouteName),

              ///使用默认值效果可能不好
              transitionDuration: const Duration(milliseconds: 0),
              //reverseTransitionDuration: const Duration(milliseconds: 0),
              opaque: false,
              pageBuilder: (ctx, animation, secondAnimation) {
                return LoadingProgressState(
                  controller: _dialogLoadingController,
                  progress: progress,
                  bgColor: bgColor,
                  loadingTimeOut: loadingTimeOut
                ).transformToPageWidget();
              }))
          .then((value) {
        _dialogLoadingController?.invokeAfterPopTask(value);
        _dialogLoadingController = null;
        if (afterDismiss != null) {
          afterDismiss(value);
        }
      });
    }
  }

  ///隐藏loading
  /// * 注意： [afterPopTask] 会在loading隐藏后被调用，但是如果用户主动取消的话，将不会被调用
  /// *       用户主动取消的将会调用[showLoading]的[afterDismiss]
  void dismissProgressDialog({AfterLoadingCallback? afterPopTask}) {
    if (afterPopTask != null)
      _dialogLoadingController?.holdAfterPopTask(task: afterPopTask);
    _dialogLoadingController?.dismissDialog();
  }

  @override
  void dispose() {
    // TODO: implement dispose
    _dialogLoadingController = null;
    super.dispose();
  }

  /*
  * size adapter with tool ScreenUtil
  *
  * */

  ///得到适配后的高度
  /// * 可以直接使用 [num.w] 或 [num.h] 来获取适配后的尺寸
  /// * 参考[SizeAdapterExtension]
  @Deprecated("已废弃，建议使用size_adapter_extension中的方法")
  double getHeightPx(double height) => height.h;

  ///得到适配后的宽度
  /// * 可以直接使用 [num.w] 或 [num.h] 来获取适配后的尺寸
  /// * 参考[SizeAdapterExtension]
  @Deprecated("已废弃，建议使用size_adapter_extension中的方法")
  double getWidthPx(double width) => width.w;

  ///屏幕宽度
  double getScreenWidth() => ScreenUtil.getInstance().screenWidth;

  ///屏幕高度
  double getScreenHeight() => ScreenUtil.getInstance().screenHeight;

  //目前仅对于手机： 因为手机大多数情况下是长度变化较大，
  // 所以以高度来算出半径，保证异形屏的弧度不会缩小
  //有其他需求，还需要重改
  /// 得到适配后的圆角半径
  double getRadiusFromHeight(double radius) =>
      ScreenUtil.getInstance().getHeightPx(radius);

  ///得到适配后的字号
  /// * 可以直接使用 [num.w] 或 [num.h] 来获取适配后的尺寸
  /// * 参考[SizeAdapterExtension]
  @Deprecated("已废弃，建议使用size_adapter_extension中的方法")
  double getSp(double fontSize) => fontSize.sp;

/*
  * app 生命周期，建议在需要的地方自己注册监听
  *
  * */

//
//  //


            #region tls-implicit
            NatsOpts opts = new NatsOpts
            {
                TlsOpts = new NatsTlsOpts
                {
                    Mode = TlsMode.Implicit,
                },
            };

            await using NatsClient nats = new NatsClient(opts);
            #endregion
        }

        {
            #region tls-mutual
            NatsOpts opts = new NatsOpts
            {
                TlsOpts = new NatsTlsOpts
                {
                    CertFile = "path/to/cert.pem",
                    KeyFile = "path/to/key.pem",
                    CaFile = "path/to/ca.pem",
                },
            };

            await using NatsClient nats = new NatsClient(opts);
            #endregion
        }
    }
}


:#f1f1f1}ul,ol{margin:10px 0 10px 20px}}

.nest-a {
  .nest-b {
    .nest-c {
      color: red;
    }
  }
}
*{-webkit-font-smoothing:antialiased;-webkit-overflow-scrolling:touch;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:none;-webkit-touch-callout:none;box-sizing:border-box}body:not(.ready){overflow:hidden}body:not(.ready) .app-nav,body:not(.ready)>nav,body:not(.ready) [data-cloak]{display:none}div#app{font-size:30px;font-weight:lighter;margin:40vh auto;text-align:center}div#app:empty:before{content:"Loading..."}.emoji{height:1.2rem;vertical-align:middle}.progress{background-color:var(--theme-color,#42b983);height:2px;left:0;position:fixed;right:0;top:0;transition:width .2s,opacity .4s;width:0;z-index:999999}.search .search-keyword,.search a:hover{color:var(--theme-color,#42b983)}.search .search-keyword{font-style:normal;font-weight:700}body,html{height:100%}body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:#34495e;font-family:Source Sans Pro,Helvetica Neue,Arial,sans-serif;font-size:15px;letter-spacing:0;margin:0;overflow-x:hidden}img{max-width:100%}a[disabled]{cursor:not-allowed;opacity:.6}kbd{border:1px solid #ccc;border-radius:3px;display:inline-block;font-size:12px!important;line-height:12px;margin-bottom:3px;padding:3px 5px;vertical-align:middle}li input[type=checkbox]{margin:0 .2em .25em 0;vertical-align:middle}.app-nav{margin:25px 60px 0 0;position:absolute;right:0;text-align:right;z-index:10}.app-nav.no-badge{margin-right:25px}.app-nav p{margin:0}.app-nav>a{margin:0 1rem;padding:5px 0}.app-nav li,.app-nav ul{display:inline-block;list-style:none;margin:0}.app-nav a{color:inherit;font-size:16px;text-decoration:none;transition:color .3s}.app-nav a.active,.app-nav a:hover{color:var(--theme-color,#42b983)}.app-nav a.active{border-bottom:2px solid var(--theme-color,#42b983)}.app-nav li{display:inline-block;margin:0 1rem;padding:5px 0;position:relative;cursor:pointer}.app-nav li ul{background-color:#fff;border:1px solid;border-color:#ddd #ddd #ccc;border-radius:4px;box-sizing:border-box;display:none;max-height:calc(100vh - 61px);overflow-y:auto;padding:10px 0;position:absolute;right:-15px;text-align:left;top:100%;white-space:nowrap}.app-nav li ul li{display:block;font-size:14px;line-height:1rem;margin:8px 14px;white-space:nowrap}.app-nav li ul a{display:block;font-size:inherit;margin:0;padding:0}.app-nav li ul a.active{border-bottom:0}.app-nav li:hover ul{display:block}.github-corner{border-bottom:0;position:fixed;right:0;text-decoration:none;top:0;z-index:1}.github-corner:hover .octo-arm{-webkit-animation:octocat-wave .56s ease-in-out;animation:octocat-wave .56s ease-in-out}.github-corner svg{color:#fff;fill:var(--theme-color,#42b983);height:80


    }
    for _i in 1..=200 {
        // if there's an asteroid with this angle, destroy the one with the smallest Euclidean distance
        let asteroids_on_this_angle = h.get(&theta.to_bits());
        if asteroids_on_this_angle.is_some() {
            let min = asteroids_on_this_angle
                .unwrap()
                .iter()
                .min_by(|x, y| x.distance(p).partial_cmp(&y.distance(p)).unwrap());
            if min.is_some() {
                this_asteroid = *min.unwrap();
                asteroids_the_game
                    .iter_mut()
                    .position(|item| item == min.unwrap())
                    .map(|index| asteroids_the_game.remove(index)); // see https://github.com/rust-lang/rust/issues/40062#issuecomment-480060761
            } else {
                panic!();
            }
        }
        let angles: Vec<f64> = h.keys().map(|t| f64::from_bits(*t)).collect();

        let mut closest_clockwise_angle = 10.0; // larger than possible
        let mut smallest_positive_angle = 10.0;
        for a in angles {
            if a > theta && a < closest_clockwise_angle {
                closest_clockwise_angle = a;
            }
            if a < smallest_positive_angle {
                smallest_positive_angle = a;
            }
        }

        if closest_clockwise_angle == 10.0 {
            theta = smallest_positive_angle;
        } else {
            theta = closest_clockwise_angle;
        }
    }
    (this_asteroid.x as u32) * 100 + this_asteroid.y as u32
}

#[cfg(test)]
mod tests {
    use day10::generator;
    use day10::math_on_200th_asteroid;
    use day10::visible_asteroids;
    use day10::AsteroidSightMap;
    use day10::Point;
    use day10::PointAnalysis;
    use std::fs;
    const UNIT_INPUT_10A_1: &str = r"......#.#.
#..#.#....
..#######.
.#.#.###..
.#..#.....
..#....#.#
#..#....#.
.##.#..###
##...#..#.
.#....####";
    const UNIT_INPUT_10A_2: &str = r"#.#...#.#.
.###....#.
.#....#...
##.#.#.#.#
....#.#.#.
.##..###.#
..#...##..
..##....##
......#...
.####.###.";
    const UNIT_INPUT_10A_3: &str = r".#..#..###
####.###.#
....###.#.
..###.##.#
##.##.#.#.
....###..#
..#.#..#.#
#..#.#.###
.##...##.#
.....#.#..";
    const UNIT_INPUT_10A_4: &str = r".#..##.###...#######
##.############..##.
.#.######.########.#
.###.#######.####.#.
#####.##.#.##.###.##
..#####..#.#########
####################
#.####....###.#.#.##
##.#################
#####.##.###..####..
..######..##.#######
####.##.####...##..#
.#####..#.######.###
##...#.##########...
#.##########.#######
.####.#.###.###.#.##
....##.##.###..#####
.#.#.###########.###
#.#.#.#####.####.###
###.##.####.##.#..##";
    const ANSWER_10A: u32 = 263;
    const ANSWER_10B: u32 = 1110;


'''
Kattis - poplava
Notice that we can achieve the biggest possible sum by putting the largest and second largest as the first and
last respectively, ie n,1,2,3,4,...,n-1.

Consider the following algorithm to get a subset of {1, 2, 3, ..., n} to sum to an arbitary value k:
    for i = n to i = 1
        if i <= k
            select i
            k = k - i

We will prove that this algorithm will be able to generate all values of k <= n(n+1)/2 by induction.

Assume that this algorithm works for n-1. Now, to construct all values of k > n, we first select n, then
we have some number <= (n)(n-1)/2 and can still select the rest of [1..n-1], by induction, we can form all such k.
If k < n, we can just select k directly. Base case of n=1 is trivial.

Now using this, notice that we can construct the histogram using the same idea, essentially we form an upward staircase
between (n) and (n-1) such that sum (n-1 - i) for each i in the staircase = volume = k. The leftover bars
are just put as a downward staircase after n-1, adding 0 to the capacity.

Time: O(n), Space: O(n)
'''
n, x = map(int, input().split())
max_cap = (n-2)*(n-1)//2

import sys
if (x > max_cap):
    print(-1)
    sys.exit()

ans = [n]
left_overs = []
for i in range(n-2, 0, -1):
    if (i <= x):
        ans.append(n-1 - i)
        x -= i
    else:
        left_overs.append(n-1 - i)

ans = ans + [n-1] + left_overs[::-1]
ans = [str(i) for i in ans]
print(' '.join(ans))


   AssertRenderOrder(nodes, 3);
    }

    void AssertRenderOrder(dmGui::HNode a, dmGui::HNode b, dmGui::HNode c, dmGui::HNode d) {
        dmGui::HNode nodes[] = {a, b, c, d};
        AssertRenderOrder(nodes, 4);
    }

    void AssertRenderOrder(dmGui::HNode a, dmGui::HNode b, dmGui::HNode c, dmGui::HNode d, dmGui::HNode e) {
        dmGui::HNode nodes[] = {a, b, c, d, e};
        AssertRenderOrder(nodes, 5);
    }

    void AssertClipperOrder(dmGui::HNode clipper, dmGui::HNode node) {
        uint64_t clipping_order;
        GetClippingOrder(clipper, clipping_order);
        uint64_t render_order;
        GetRenderOrder(node, render_order);
        ASSERT_TRUE(clipping_order < render_order);
    }
};

/* BIT-FIELD CONSISTENCY TESTS */

/**
 * Test the clipping states of the following hierarchy:
 * - a (inv)
 *   - b
 * - c
 */
TEST_F(dmGuiClippingTest, TestMinimal) {
    dmGui::HNode a = AddInvClipperBox("a");
    dmGui::HNode a_child = AddBox("a_child", a);
    dmGui::HNode b = AddClipperBox("b", a);
    dmGui::HNode b_child = AddBox("b_child", b);
    dmGui::HNode c = AddClipperBox("c");
    dmGui::HNode c_child = AddBox("c_child", c);

    Render();

    //             n, child,   ref,        mask,       write-mask, child-ref,  child-mask, child-write-mask
    AssertClipping(a, a_child, BITS(10000000), BITS(00000000), BITS(11111111), BITS(00000000), BITS(10000000), 0x0);
    AssertClipping(b, b_child, BITS(00000001), BITS(10000000), BITS(11111111), BITS(00000001), BITS(10000011), 0x0);
    AssertClipping(c, c_child, BITS(00000010), BITS(00000000), BITS(11111111), BITS(00000010), BITS(00000011), 0x0);
}

/**
 * Test the clipping states of the following hierarchy:
 * - a
 *   - b
 *     - c
 *       - d
 *       - e
 * - f
 *   - g
 *     - h
 *   - i
 *   - j
 *   - k
 * - l
 *
 * Expected values are listed in the design doc: (***REMOVED***)/1mzeoLx4HNV4Fbl9aEgtsCNZ4jQDw112SehPggtQAiYE/edit#
 */
TEST_F(dmGuiClippingTest, TestSimpleHierarchy) {
    dmGui::HNode a = AddClipperBox("a");
    dmGui::HNode a_child = AddBox("a_child", a);
    dmGui::HNode b = AddClipperBox("b", a);
    dmGui::HNode b_child = AddBox("b_child", b);
    dmGui::HNode c = AddClipperBox("c", b);
    dmGui::HNode c_child = AddBox("c_child", c);
    dmGui::HNode d = AddClipperBox("d", c);
    dmGui::HNode d_child = AddBox("d_child", d);
    dmGui::HNode e = AddClipperBox("e", c);
    dmGui::HNode e_child = AddBox("e_child", e);
    dmGui::HNode f = AddClipperBox("f");
    dmGui::HNode f_child = AddBox("f_child", f);
    dmGui::HNode g = AddClipperBox("g", f);
    dmGui::HNode g_child = AddBox("g_child", g);
    dmGui::HNode h = AddClipperBox("h", g);
    dmGui::HNode h_child = AddBox("h_child", h);
    dmGui::HNode i = AddClipperBox("i", f);
    dmGui::HNode i


们在给定数据的情况下的后验信念。在实践中，概率*P*（*B*）可能难以计算或以其他方式估计，因此用比例形式的贝叶斯定理替换上述强等式是很常见的：

![](img/ebdc2354-2595-40dc-b038-949ee0ca5fe0.png)

在配方中，我们假设我们之前的产品是 beta 版的。贝塔分布的概率密度函数如下式所示：

![](img/a78a4ebb-bebe-49fe-89cb-908ef5f74e07.png)

这里，*Γ*（*α*是伽马函数。似然为二元分布，其概率密度函数由以下等式给出：

![](img/8535466c-882c-4283-a838-58a01e26e23c.png)

这里，*k*是观察次数，*j*是成功的观察次数之一。在配方中，我们观察到*m=122*成功和*n*=257 失败，得出*k=m+n=379*和*j=m=122*。为了计算后验分布，我们可以利用贝塔分布是二项式分布的共轭先验这一事实，看到贝叶斯定理比例形式的右侧是贝塔分布，参数为*α+m**和*β+**n***这是我们在配方中使用的。贝塔分布是二项式随机变量的共轭先验，这一事实使其在贝叶斯统计中非常有用。***

 ***我们在本配方中演示的方法是使用贝叶斯方法的一个相当基本的示例，但它对于以系统方式更新给定新数据的先前信念仍然有用。

## 还有更多。。。

贝叶斯方法可以用于各种各样的任务，使其成为一个强大的工具。在这个配方中，我们使用了贝叶斯方法，根据我们对网站表现的先前信念和从用户收集的额外数据，对网站的成功率进行建模。这是一个相当复杂的例子，因为我们之前的信念是建立在 beta 分布上的。这里是另一个使用贝叶斯定理的例子，它只使用简单的概率（0 到 1 之间的数字）来检验两个相互竞争的假设。

假设你每天回家时把钥匙放在同一个地方，但有一天早上醒来发现钥匙不在这个地方。在搜索了一小段时间后，你找不到它们，因此得出结论，它们一定已经从存在中消失了。我们把这个假设称为*H1*。现在，*H1*肯定解释了数据，*D*你找不到你的钥匙，因此可能*P**D**H1=1。（如果你的钥匙不存在了，那么你就不可能找到它们。）另一种假设是，你只是在前一天晚上回家时把它们放在别的地方。我们把这个假设称为*H2*。现在这个假设也解释了数据，所以*P**D**H2*=1，但实际上*H2*远比*H1*可信。假设你的钥匙完全消失的概率是百万分之一——这是一个巨大的高估，但我们需要保持数字的合理性——而你


import logging

from django.conf import settings
from django.utils import timezone
from django_q.models import Schedule
from django_q.tasks import schedule

from qatrack.notifications.models import QCReviewNotice
from qatrack.qatrack_core.email import send_email_to_users
from qatrack.qatrack_core.tasks import run_periodic_scheduler

logger = logging.getLogger('django-q')

def run_review_notices():

    run_periodic_scheduler(
        QCReviewNotice,
        "run_review_notices",
        schedule_qcreview_notice,
        time_field="time",
        recurrence_field="recurrences",
    )

def schedule_qcreview_notice(notice, send_time):

    logger.info("Scheduling notification %s for %s" % (notice.pk, send_time))
    name = "Send notification %d %s" % (notice.pk, send_time.isoformat())

    schedule(
        "qatrack.notifications.qcreview.tasks.send_qcreview_notice",
        notice.id,
        name,
        name=name,
        schedule_type=Schedule.ONCE,
        repeats=1,
        next_run=send_time,
        task_name=name,
    )

def send_qcreview_notice(notice_id, task_name=""):

    notice = QCReviewNotice.objects.filter(id=notice_id).first()

    if notice:

        if not notice.send_required():
            logger.info("Send of QCReviewNotice %s requested, but no QC to notify about" % notice_id)
            return

        recipients = notice.recipients.recipient_emails()
        if not recipients:
            logger.info("Send of QCReviewNotice %s requested, but no recipients" % notice_id)
            return
    else:
        logger.info("Send of QCReviewNotice %s requested, but no such QCReviewNotice exists" % notice_id)
        return

    try:
        send_email_to_users(
            recipients,
            "qcreview/email.html",
            context={'notice': notice},
            subject_template="qcreview/subject.txt",
            text_template="qcreview/email.txt",
        )
        logger.info("Sent QCReviewNotice %s at %s" % (notice_id, timezone.now()))
        try:
            Schedule.objects.get(name=task_name).delete()
        except:  # noqa: E722  # pragma: nocover
            logger.exception("Unable to delete Schedule.name = %s after successful send" % task_name)
    except:  # noqa: E722  # pragma: nocover
        logger.exception(
            "Error sending email for QCReviewNotice %s at %s." % (notice_id, timezone.now())
        )

        fail_silently = getattr(settings, "EMAIL_FAIL_SILENTLY", True)
        if not fail_silently:
            raise
    finally:
        notice.last_sent = timezone.now()
        notice.save()


/// <note>
/// This is not supported by Amazon S3 on Outposts buckets.
/// </note>
class ReplicationTimeValue {
  /// Contains an integer that specifies the time period in minutes.
  ///
  /// Valid value: 15
  final int? minutes;

  ReplicationTimeValue({
    this.minutes,
  });
  factory ReplicationTimeValue.fromXml(_s.XmlElement elem) {
    return ReplicationTimeValue(
      minutes: _s.extractXmlIntValue(elem, 'Minutes'),
    );
  }

  _s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
    final minutes = this.minutes;
    final $children = <_s.XmlNode>[
      if (minutes != null) _s.encodeXmlIntValue('Minutes', minutes),
    ];
    final $attributes = <_s.XmlAttribute>[
      ...?attributes,
    ];
    return _s.XmlElement(
      _s.XmlName(elemName),
      $attributes,
      $children,
    );
  }
}

enum RequestedJobStatus {
  cancelled('Cancelled'),
  ready('Ready'),
  ;

  final String value;

  const RequestedJobStatus(this.value);

  static RequestedJobStatus fromString(String value) => values.firstWhere(
      (e) => e.value == value,
      orElse: () =>
          throw Exception('$value is not known in enum RequestedJobStatus'));
}

///

class S3AccessControlList {
  ///

  final S3ObjectOwner owner;

  ///

  final List<S3Grant>? grants;

  S3AccessControlList({
    required this.owner,
    this.grants,
  });
  factory S3AccessControlList.fromXml(_s.XmlElement elem) {
    return S3AccessControlList(
      owner: S3ObjectOwner.fromXml(_s.extractXmlChild(elem, 'Owner')!),
      grants: _s.extractXmlChild(elem, 'Grants')?.let(
          (elem) => elem.findElements('member').map(S3Grant.fromXml).toList()),
    );
  }

  _s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
    final owner = this.owner;
    final grants = this.grants;
    final $children = <_s.XmlNode>[
      owner.toXml('Owner'),
      if (grants != null)
        _s.XmlElement(
            _s.XmlName('Grants'), [], grants.map((e) => e.toXml('member'))),
    ];
    final $attributes = <_s.XmlAttribute>[
      ...?attributes,
    ];
    return _s.XmlElement(
      _s.XmlName(elemName),
      $attributes,
      $children,
    );
  }
}

///

class S3AccessControlPolicy {
  ///

  final S3AccessControlList? accessControlList;

  ///

  final S3CannedAccessControlList? cannedAccessControlList;

  S3AccessControlPolicy({
    this.accessControlList,
    this.cannedAccessControlList,
  });
  factory S3AccessControlPolicy.fromXml(_s.XmlElement elem) {
    return S3AccessControlPolicy(
      accessControlList: _s
          .extractXmlChild(elem, 'AccessControlList')
          ?.let(S3AccessControlList.fromXml),
      cannedAccessControlList: _s
          .extractXmlStringValue(elem, 'CannedAccessControlList')
          ?.let(S3CannedAccessControlList.fromString),
    );
  }

  _s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
    final accessControlList = this.accessControlList;
    final cannedAccessControlList = this.cannedAccessControlList;
    final $children = <_s.XmlNode>[
      if (accessControlList != null)
        accessControlList.toXml('AccessControlList'),
      if (cannedAccessControlList != null)
        _s.encodeXmlStringValue(
            'CannedAccessC


,int col,int level, int iteration, NCCresultSDM *nccresult, CSize *Size_Grid2D, char *add_str)
{
    int k,j;
    FILE *outfile_min; //*outfile_max, *outfile_h, *outfile_roh, *outfile_diff, *outfile_peak, *outINCC, *outGNCC,*outcount
    CSize temp_S;
    char t_str[500];

    sprintf(t_str,"%s/txt/nccresult_roh1_level_%d_%d_%d_iter_%d_%s.txt",save_path,row,col,level,iteration,add_str);
    outfile_min    = fopen(t_str,"w");

    temp_S.height    = Size_Grid2D->height;
    temp_S.width    = Size_Grid2D->width;

    for(k=0;k<temp_S.height;k++)
    {
        for(j=0;j<temp_S.width;j++)
        {
            int matlab_index    = k*temp_S.width + j;

            fprintf(outfile_min,"%f\t",SignedCharToDouble_result(nccresult[matlab_index].result0));
        }
        fprintf(outfile_min,"\n");
    }

    fclose(outfile_min);
}

bool average_filter_colrowshift(CSize Size_Grid2D, UGRIDSDM *GridPT3,uint8 Pyramid_step)
{
    int kernel_size = 40;
    if(Pyramid_step == 3)
        kernel_size = 30;
    else if(Pyramid_step == 2)
        kernel_size = 10;
    else if(Pyramid_step == 1)
        kernel_size = 5;
    else if(Pyramid_step == 0)
        kernel_size = 5;

#pragma omp parallel for schedule(guided)
    for(int iter_count = 0 ; iter_count < Size_Grid2D.height*Size_Grid2D.width ; iter_count++)
    {
        int pts_row = (int)(floor(iter_count/Size_Grid2D.width));
        int pts_col = iter_count % Size_Grid2D.width;
        int pt_index;
        pt_index = pts_row*Size_Grid2D.width + pts_col;

        if(pt_index < Size_Grid2D.width * Size_Grid2D.height && pts_row < Size_Grid2D.height && pts_col < Size_Grid2D.width && pts_row >= 0 && pts_col >= 0)
        {
            double sum_c = 0;
            double sum_r = 0;
            double weight = 0;
            int count_cr=0;

            if(GridPT3[pt_index].ortho_ncc < 0.4)
            {
                for(int k = -kernel_size ; k <= kernel_size ; k++)
                {
                    for(int j=-kernel_size ; j <= kernel_size ; j++)
                    {
                        int index = (pts_row+k)*Size_Grid2D.width + (pts_col+j);

                        if(pts_row+k >= 0 && pts_row+k < Size_Grid2D.height && pts_col+j >= 0 && pts_col+j < Size_Grid2D.width && index >= 0 && index < Size_Grid2D.height*Size_Grid2D.width)
                        {
                            if(GridPT3[index].ortho_ncc > 0.5)
                            {
                                sum_c += GridPT3[index].col_shift*GridPT3[index].ortho_ncc;
                                sum_r += GridPT3[index].row_shift*GridPT3[index].ortho_ncc;
                                count_cr ++;
                                weight += GridPT3[index].ortho_ncc;
                            }
                        }
                    }
                }

                if(count_cr > 1)
                {
                    GridPT3[pt_index].col_shift = sum_c/weight;
                    GridPT3[pt_index].row_shift = sum_r/weight;
                }
            }

        }
    }

    return true;


, ($t3)
/* 084964 800FBEF4 8D8E0008 */  lw    $t6, 8($t4)
/* 084968 800FBEF8 8D8D000C */  lw    $t5, 0xc($t4)
/* 08496C 800FBEFC AD6E0008 */  sw    $t6, 8($t3)
/* 084970 800FBF00 AD6D000C */  sw    $t5, 0xc($t3)
/* 084974 800FBF04 8D8D0014 */  lw    $t5, 0x14($t4)
/*


djunct/issues/437)) ([f7d7f7c](https://github.com/char0n/ramda-adjunct/commit/f7d7f7c454c2e49806b3fc0e1e521577a38ea544)), closes [#370](https://github.com/char0n/ramda-adjunct/issues/370)
* add inRange ([#436](https://github.com/char0n/ramda-adjunct/issues/436)) ([9937600](https://github.com/char0n/ramda-adjunct/commit/99376002198d67dfc073a19202d06265ddfbbb97)), closes [#393](https://github.com/char0n/ramda-adjunct/issues/393)
* add traversable lenses ([#494](https://github.com/char0n/ramda-adjunct/issues/494)) ([d34be73](https://github.com/char0n/ramda-adjunct/commit/d34be73111eb944e0e8d9b6c3f0b7f936d91e95c))

# [2.6.0](https://github.com/char0n/ramda-adjunct/compare/v2.5.0...v2.6.0) (2018-03-19)

### Features

* add concatAll ([#404](https://github.com/char0n/ramda-adjunct/issues/404)) ([341f3f1](https://github.com/char0n/ramda-adjunct/commit/341f3f1797e75c469fd7e02e4faa457defeb8d85)), closes [#109](https://github.com/char0n/ramda-adjunct/issues/109)
* add dispatch ([#407](https://github.com/char0n/ramda-adjunct/issues/407)) ([fb5aa08](https://github.com/char0n/ramda-adjunct/commit/fb5aa08cd6d1ae13974fed29e47cd9b5d82c5a79)), closes [#66](https://github.com/char0n/ramda-adjunct/issues/66)
* add ensureArray ([#375](https://github.com/char0n/ramda-adjunct/issues/375)) ([7b60189](https://github.com/char0n/ramda-adjunct/commit/7b601899b39f4d1a2e7add08f7540f0ccadbf89c)), closes [#371](https://github.com/char0n/ramda-adjunct/issues/371)
* add isNonPositive, isNonNegative ([#434](https://github.com/char0n/ramda-adjunct/issues/434)) ([8d62dc1](https://github.com/char0n/ramda-adjunct/commit/8d62dc1df1727157e204961bc6d68a7e4a5adcaa)), closes [#324](https://github.com/char0n/ramda-adjunct/issues/324)
* add isTrue, isFalse ([#435](https://github.com/char0n/ramda-adjunct/issues/435)) ([9687b51](https://github.com/char0n/ramda-adjunct/commit/9687b5100c2d6b51d89724bd94380234260115ed)), closes [#255](https://github.com/char0n/ramda-adjunct/issues/255)
* add omitBy ([#376](https://github.com/char0n/ramda-adjunct/issues/376)) ([c7c9c7e](https://github.com/char0n/ramda-adjunct/commit/c7c9c7e07f938d688c26ad91d1b6a6b3abd3c5cf)), closes [#171](https://github.com/char0n/ramda-adjunct/issues/171)

# [2.5.0](https://github.com/char0n/ramda-adjunct/compare/v2.4.1...v2.5.0) (2018-


   62ff8:	fc          	xfc
   62ff9:	ff ff       	.word 0xffff
   62ffb:	ff 6f       	.word 0xff6f
   62ffd:	00          	halt
   62ffe:	00          	halt
   62fff:	00          	halt
   63000:	69 00 00    	cvtdw $0x0 [d-float],$0x0
   63003:	00          	halt
   63004:	1c 00       	bvc 63006 <op+0x41aa>
   63006:	00          	halt
   63007:	00          	halt
   63008:	f8 ff ff ff 	ashp *70300d <_end+0x6935e5>,$0x0,$0x0,(r9),$0x0,$0x0
   6300c:	69 00 00 00
   63010:	69 00 00
   63013:	00          	halt
   63014:	69 00 00    	cvtdw $0x0 [d-float],$0x0
   63017:	00          	halt
   63018:	08 00 00 00 	cvtps $0x0,$0x0,$0x0,(pc)
   6301c:	6f
   6301d:	00          	halt
   6301e:	00          	halt
   6301f:	00          	halt
   63020:	6a 00 00    	cvtdl $0x0 [d-float],$0x0
   63023:	00          	halt
   63024:	1c 00       	bvc 63026 <op+0x41ca>
   63026:	00          	halt
   63027:	00          	halt
   63028:	00          	halt
   63029:	00          	halt
   6302a:	00          	halt
   6302b:	00          	halt
   6302c:	69 00 00    	cvtdw $0x0 [d-float],$0x0
   6302f:	00          	halt
   63030:	69 00 00    	cvtdw $0x0 [d-float],$0x0
   63033:	00          	halt
   63034:	69 00 00    	cvtdw $0x0 [d-float],$0x0
   63037:	00          	halt
   63038:	04          	ret
   63039:	00          	halt
   6303a:	00          	halt
   6303b:	00          	halt
   6303c:	69 00 00    	cvtdw $0x0 [d-float],$0x0
   6303f:	00          	halt
   63040:	6c 00 00    	cvtbd $0x0,$0x0 [d-float]
   63043:	00          	halt
   63044:	00          	halt
   63045:	00          	halt
   63046:	00          	halt
   63047:	00          	halt
   63048:	04          	ret
   63049:	00          	halt
   6304a:	00          	halt
   6304b:	00          	halt
   6304c:	69 00 00    	cvtdw $0x0 [d-float],$0x0
   6304f:	00          	halt
   63050:	00          	halt
   63051:	00          	halt
   63052:	00          	halt
   63053:	00          	halt
   63054:	1c 00       	bvc 63056 <op+0x41fa>
   63056:	00          	halt
   63057:	00          	halt
   63058:	04          	ret
   63059:	00          	halt
   6305a:	00          	halt
   6305b:	00          	halt
   6305c:	6f


.
","
Math Menu: MathJax adds a contextual menu to equations."," Right-click or CTRL-click on any mathematics to access the menu.
",'
',"
Show Math As: These options allow you to view the formula's"," source markup (as MathML or in its original format).
","
Copy to Clipboard: These options copy the formula's source markup,"," as MathML or in its original format, to the clipboard"," (in browsers that support that).
","
Math Settings: These give you control over features of MathJax,"," such the size of the mathematics, and the mechanism used"," to display equations.
","
Accessibility: MathJax can work with screen"," readers to make mathematics accessible to the visually impaired."," Turn on the explorer to enable generation of speech strings"," and the ability to investigate expressions interactively.
","
Language: This menu lets you select the language used by MathJax"," for its menus and warning messages. (Not yet implemented in version 3.)
","
","
Math Zoom: If you are having difficulty reading an"," equation, MathJax can enlarge it to help you see it better, or"," you can scall all the math on the page to make it larger."," Turn these features on in the Math Settings menu.
","
Preferences: MathJax uses your browser's localStorage database"," to save the preferences set via this menu locally in your browser.  These"," are not used to track you, and are not transferred or used remotely by"," MathJax in any way.
"].join("\n")}),'www.mathjax.org'),this.mathmlCode=new h.SelectableInfo("MathJax MathML Expression",(function(){if(!r.menu.mathItem)return"";var t=r.toMML(r.menu.mathItem);return"
"+r.formatSource(t)+"
"}),""),this.originalText=new h.SelectableInfo("MathJax Original Source",(function(){if(!r.menu.mathItem)return"";var t=r.menu.mathItem.math;return'
'+r.formatSource(t)+"
"}),""),this.annotationText=new h.SelectableInfo("MathJax Annotation Text",(function(){if(!r.menu.mathItem)return"";var t=r.menu.annotation;return'
'+r.formatSource(t)+"
"}),""),this.zoomBox=new f.Info("MathJax Zoomed Expression",(function(){if(!r.menu.mathItem)return"";var t=r.menu.mathItem.typesetRoot.cloneNode(!0);return t.style.margin="0",'
'+t.outerHTML+"
"}),""),this.document=t,this.options=(0,c.userOptions)((0,c.defaultOptions)({},this.constructor.OPTIONS),e),this.initSettings(),this.mergeUserSettings(),this.initMenu(),this.applySettings()}return Object.defineProperty(t.prototype,"isLoading",{get:function(){return t.loading>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loadingPromise",{get:function(){return this.isLoading?(t._loadingPromise||(t._loadingPromise=new Promise((function(e,r){t._loadingOK=e,t._loadingFailed=r}))),t._loadingPromise):Promise.resolve()},enumerable:!1,configurable:!0}),t.prototype.initSettings=function(){this.settings=this.o


%s%s", torso_anim_name, leg_anim_name );

			// Human Anim Override
			if ( HumanAnimOverride != NULL ) {
				if ( hold_style == WEAPON_HOLD_STYLE_EMPTY_HANDS ) {
					if ( leg_style == LEG_STYLE_RUN_FORWARD ) {
						anim_name = HumanAnimOverride->RunEmptyHands;
					}
					if ( leg_style == LEG_STYLE_WALK_FORWARD ) {
						anim_name = HumanAnimOverride->WalkEmptyHands;
					}
				}
				if ( hold_style == WEAPON_HOLD_STYLE_AT_CHEST ) {
					if ( leg_style == LEG_STYLE_RUN_FORWARD ) {
						anim_name = HumanAnimOverride->RunAtChest;
					}
					if ( leg_style == LEG_STYLE_WALK_FORWARD ) {
						anim_name = HumanAnimOverride->WalkAtChest;
					}
				}
				if ( hold_style == WEAPON_HOLD_STYLE_AT_HIP ) {
					if ( leg_style == LEG_STYLE_RUN_FORWARD ) {
						anim_name = HumanAnimOverride->RunAtHip;
					}
					if ( leg_style == LEG_STYLE_WALK_FORWARD ) {
						anim_name = HumanAnimOverride->WalkAtHip;
					}
				}
			}

			// Saftey check anim
//			Debug_Say(( "Anim name %s\n", (const char *)anim_name ));

//			float frame = AnimControl->Get_Frame();			// Maintain the frame number for moving
			AnimControl->Set_Animation( anim_name, blend_time );
	//		AnimControl->Set_Mode( ANIM_MODE_LOOP, frame );
			AnimControl->Set_Mode( ANIM_MODE_LOOP );
		}

	} else if ( State == DIVE ) {

		const char * anim_name = NULL;
#if 0
		if ( SubState & SUB_STATE_LEFT ) 				anim_name = "S_A_HUMAN.H_A_DIV3";
		if ( SubState & SUB_STATE_RIGHT )				anim_name = "S_A_HUMAN.H_A_DIV4";
		if ( SubState & SUB_STATE_FORWARD ) 			anim_name = "S_A_HUMAN.H_A_DIV1";
		if ( SubState & SUB_STATE_BACKWARD )			anim_name = "S_A_HUMAN.H_A_DIV2";
#else
		int offset = FreeRandom.Get_Int( 2 );
		if ( !IS_SOLOPLAY ) {
			offset = 0;
		}
		if ( SubState & SUB_STATE_FORWARD ) 			offset += 0;
		if ( SubState & SUB_STATE_BACKWARD )			offset += 2;
		if ( SubState & SUB_STATE_LEFT ) 				offset += 4;
		if ( SubState & SUB_STATE_RIGHT )				offset += 6;
		anim_name = _dive_anims[offset];
#endif

		AnimControl->Set_Animation( anim_name, 0.2f );
		AnimControl->Set_Mode( ANIM_MODE_ONCE );
		StateLocked = true;

	} else if ( State == LAND ) {

		int dir = 0;
		if ( SubState & SUB_STATE_LEFT ) 				dir = 3;
		if ( SubState & SUB_STATE_RIGHT )				dir = 4;
		if ( SubState & SUB_STATE_FORWARD ) 			dir = 1;
		if ( SubState & SUB_STATE_BACKWARD )			dir = 2;

		StringClass anim_name(0,true);
		anim_name.Format( "S_A_HUMAN.H_A_A0L%d", dir );
		AnimControl->Set_Animation( anim_name, 0.2f );
		AnimControl->Set_Mode( ANIM_M


import time

import torch
from pointops import knn_query

B, N, M, D, K = 12, 49152, 928, 3, 16

def knn_torch(k: int, xyz_ref: torch.Tensor, xyz_query: torch.Tensor):
    dists = torch.cdist(xyz_query, xyz_ref, p=2)  # shape: (B, M, N)
    sorted_dists, indices = torch.topk(dists, k, dim=-1, largest=False, sorted=True)
    return sorted_dists, indices

def knn_pointops(k: int, xyz_ref: torch.Tensor, xyz_query: torch.Tensor):
    B, N, _ = xyz_ref.shape
    _, M, _ = xyz_query.shape
    orig_dtype = xyz_ref.dtype

    xyz_ref_flat = xyz_ref.contiguous().view(B * N, 3).to(torch.float32)
    xyz_query_flat = xyz_query.contiguous().view(B * M, 3).to(torch.float32)

    offset = torch.arange(1, B + 1, device=xyz_ref.device) * N
    new_offset = torch.arange(1, B + 1, device=xyz_query.device) * M

    idx, dists = knn_query(k, xyz_ref_flat, offset, xyz_query_flat, new_offset)

    # Remap global indices to local per-batch
    idx = idx.view(B, M, k)
    idx = idx - (torch.arange(B, device=idx.device).view(B, 1, 1) * N)
    dists = dists.view(B, M, k).to(orig_dtype)

    return dists, idx

def benchmark(fn, name, HALF_PRECISION=False, iters=100):
    total_time = 0.0
    peak_memories = []
    for _ in range(iters):
        xyz_ref = torch.randn(B, N, D, device="cuda")
        xyz_query = torch.randn(B, M, D, device="cuda")
        if HALF_PRECISION:
            xyz_ref = xyz_ref.half()
            xyz_query = xyz_query.half()
        fn(K, xyz_ref, xyz_query)  # warm up
        torch.cuda.empty_cache()
        torch.cuda.reset_peak_memory_stats()
        torch.cuda.synchronize()
        start = time.time()
        fn(K, xyz_ref, xyz_query)
        torch.cuda.synchronize()
        total_time += time.time() - start
        peak_memories.append(torch.cuda.max_memory_allocated() / 1e6)  # MB

    avg_time = total_time / iters
    peak_memory_min = min(peak_memories)
    peak_memory_avg = sum(peak_memories) / len(peak_memories)
    peak_memory_max = max(peak_memories)
    print(f"{name:<24} | "
          f"Avg Time: {avg_time:.6f} s | "
          f"Peak Memory: {peak_memory_avg:>6.2f} MB (min: {peak_memory_min:>6.2f}, max: {peak_memory_max:>6.2f})")

print("Benchmarking KNN with different methods (HALF_PRECISION=True):")
benchmark(knn_torch, "torch.cdist+torch.topk", True)
benchmark(knn_pointops, "pointops.knn_query", True)

print("\nBenchmarking KNN with different methods (HALF_PRECISION=False):")
benchmark(knn_torch, "torch.cdist+torch.topk", False)
benchmark(knn_pointops, "pointops.knn_query", False)


.addComponent(hologramshape)

const hologrammaterial = new Material()
hologrammaterial.hasAlpha = true
hologrammaterial.albedoColor = new Color4(0.1,0.5,5,0.01)
hologramlighting.addComponent(hologrammaterial)

const hologram1 = new Entity()
engine.addEntity(hologram1)
hologram1.addComponent(new TextShape("Welcome to\nHaAk World"))
const hologramtransform1 = new Transform({
  position : new Vector3(3,1.5,20)
  scale : new Vector3(0.15,0.15,0.15)
  rotation: Quaternion.Euler(0,90,0)
})
hologram1.addComponent(hologramtransform1)

let hologramshape1 = new ConeShape()
hologramshape1.withCollisions = false
const hologramlighting1 = new Entity()
engine.addEntity(hologramlighting1)
hologramlighting1.addComponentOrReplace(new Transform({
  position : new Vector3(3,1,20)
  rotation : Quaternion.Euler(180,0,0)
  scale: new Vector3(0.5,0.5,0.5)
}))
hologramlighting1.addComponent(hologramshape1)

const hologrammaterial1 = new Material()
hologrammaterial1.hasAlpha = true
hologrammaterial1.albedoColor = new Color4(0.1,0.5,5,0.01)
hologramlighting1.addComponent(hologrammaterial1)

class hologramRotate implements ISystem {
  update() {
    hologramtransform.rotate(Vector3.Up(), 3)
	hologramtransform1.rotate(Vector3.Up(), 3)
  }
}

engine.addSystem(new hologramRotate())

//--------------------Stairs--------------------------------

const stairs = new Entity()
engine.addEntity(stairs)
stairs.addComponent(new GLTFShape('models/Stairs_L_01/Stairs_L_01.glb'))
stairs.addComponent(new Transform({
	position: new Vector3(25,0,43.5),
	rotation: Quaternion.Euler(0,180,0),
	scale: new Vector3(1,1,1.5)
})

import { ICaseState } from "../../models/ICaseState";
import { caseActions } from "../actions/actions/caseActions";
import { initialState } from "../../models/ICaseState";

export const caseReducer = (
  state: ICaseState = initialState,
  action: caseActions
): ICaseState => {
  switch (action.type) {
    case "POST_NEW_RESULT":
      if (Array.isArray(action.payload))
        return ({
          ...state,
          results: [...state.results, ...action.payload]
        });
      else
        return ({
          ...state,
          results: [...state.results, action.payload]
        });
    case "POST_NEW_NOTES":
      if (Array.isArray(action.payload))
        return ({
          ...state,
          notes: [...state.notes, ...action.payload]
        });
      else
        return ({
          ...state,
          notes: [...state.notes, action.payload]
        });
    case "POST_NEW_HISTORIES":
      if (Array.isArray(action.payload))
        return ({
          ...state,
          history: [...state.history, ...action.payload]
        });
      else
        return ({
          ...state,
          history: [...state.history, action.payload]
        });
    case "IGetNotes":
      return {
        ...state,
        ...action.notes,
      };
    case "IGetHistory":
      return {
        ...state,
        ...action.history,
      };
    case "IGetResult":
      return {
        ...state,


LoopUnswitch.h>
#include <llvm/Transforms/InstCombine/InstCombine.h>

// Preprocessor Macros
#ifdef REPORT_BASE
#undef REPORT_BASE
#endif

#define REPORT_BASE 0

#define REPORT_ALL_LLVM_ASSEMBLY 0

namespace llvm {

LLVMContext &getGlobalContext();

} // namespace llvm

namespace executive
{

////////////////////////////////////////////////////////////////////////////////
// LLVMModuleManager
void LLVMModuleManager::loadModule(const ir::Module* m,
	translator::Translator::OptimizationLevel l, Device* d)
{
	_database.loadModule(m, l, d);
}

bool LLVMModuleManager::isModuleLoaded(void* id)
{
	return _database.isModuleLoaded(id);
}

void LLVMModuleManager::unloadModule(void* id)
{
	_database.unloadModule(id);
}

unsigned int LLVMModuleManager::totalFunctionCount()
{
	return _database.totalFunctionCount();
}

void LLVMModuleManager::associate(hydrazine::Thread* thread)
{
	_database.associate(thread);
}

hydrazine::Thread::Id LLVMModuleManager::id()
{
	return _database.id();
}

void LLVMModuleManager::setExternalFunctionSet(
	const ir::ExternalFunctionSet& s)
{
	_database.setExternalFunctionSet(s);
}

void LLVMModuleManager::clearExternalFunctionSet()
{
	_database.clearExternalFunctionSet();
}

////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
// Helper Functions
static unsigned int pad(unsigned int& size, unsigned int alignment)
{
	unsigned int padding = alignment - (size % alignment);
	padding = (alignment == padding) ? 0 : padding;
	size += padding;
	return padding;
}

static void setupGlobalMemoryReferences(ir::PTXKernel& kernel,
	const ir::PTXKernel& parent)
{
	for(ir::ControlFlowGraph::iterator block = kernel.cfg()->begin();
		block != kernel.cfg()->end(); ++block)
	{
		for( ir::ControlFlowGraph::InstructionList::iterator
			instruction = block->instructions.begin();
			instruction != block->instructions.end(); ++instruction )
		{
			ir::PTXInstruction& ptx = static_cast<
				ir::PTXInstruction&>(**instruction);

			if(ptx.mayHaveAddressableOperand()
				&& (ptx.a.addressMode == ir::PTXOperand::Address
				|| ptx.a.addressMode == ir::PTXOperand::Indirect))
			{
				ir::Module::GlobalMap::const_iterator
					global = parent.module->globals().find(ptx.a.identifier);
				if(global == parent.module->globals().end()) continue;
				if(global->second.statement.directive
					!= ir::PTXStatement::Global) continue;

				ptx.addressSpace = ir::PTXInstruction::Global;
				report("   For instruction \"" << ptx.toString()
					<< "\" setting address space to global.");
			}
		}
	}
}

static void setupArgumentMemoryReferences(ir::PTXKernel& kernel,
	LLVMModuleManager::KernelAndTranslation::MetaData* metadata,
	const ir::PTXKernel& parent)
{
	typedef std::unordered_map<std::string, unsigned int> OffsetMap;
	report("  Setting up argument memory references.");

	unsigned int offset = 0;

	OffsetMap offsets;

	for(ir::Kernel::ParameterVector::const_iterator
		argument = parent.arguments.begin();
		argument != parent.arguments.end(); ++argument)
	{
		pad(offset, argument->getAlignment());
		offsets.insert(std::make_pair(argument->name, offset));
		report("   Argument " << argument->name << ", offset " << offset);
		offset += argument->get


   X_test_last_5 = X_test.tail(5)

    arima = ARIMARegressor(use_covariates=use_covariates)
    arima.fit(X_train, y_train)

    assert (
        arima.predict(X_test).tail(5).tolist() == arima.predict(X_test_last_5).tolist()
    )

@pytest.mark.parametrize("use_covariates", [True, False])
def test_arima_regressor_can_forecast_arbitrary_dates_past_holdout(
    use_covariates,
    ts_data,
):
    X, _, y = ts_data(
        train_features_index_dt=False,
        train_target_index_dt=False,
    )

    # Create a training and testing set that are not continuous
    X_train, X_test, y_train, _ = split_data(
        X,
        y,
        problem_type="time series regression",
        test_size=0.1,
        random_seed=0,
    )
    X_train, _, y_train, _ = split_data(
        X_train,
        y_train,
        problem_type="time series regression",
        test_size=0.4,
        random_seed=0,
    )

    arima = ARIMARegressor(use_covariates=use_covariates)
    arima.fit(X_train, y_train)

    arima.predict(X_test)

@pytest.mark.parametrize(
    "nullable_ltype",
    ["IntegerNullable", "AgeNullable"],
)
def test_arima_regressor_with_nullable_types(nullable_ltype):
    X = pd.DataFrame()
    X["nums"] = pd.Series([i for i in range(100)], dtype="Int64")
    X.index = pd.date_range("1/1/21", periods=100)
    X.ww.init(logical_types={"nums": nullable_ltype})

    y = pd.Series([i for i in range(100)], dtype="Int64")
    y.index = pd.date_range("1/1/21", periods=100)

    X_train = X.ww.iloc[:80, :]
    X_test = X.ww.iloc[80:, :]

    y_train = y[:80]
    y_train = ww.init_series(y_train, logical_type=nullable_ltype)

    arima_params = {
        "trend": None,
        "start_p": 2,
        "d": 0,
        "start_q": 2,
        "max_p": 5,
        "max_d": 2,
        "max_q": 5,
        "seasonal": True,
        "maxiter": 10,
        "n_jobs": -1,
    }

    evalml_arima = ARIMARegressor(**arima_params)
    evalml_arima.fit(X_train, y_train)
    preds = evalml_arima.predict(X=X_test.ww.copy())
    assert not preds.isnull().any().any()
    results_coverage = evalml_arima.get_prediction_intervals(X=X_test.ww.copy())
    assert results_coverage


get_body() ) {
        const float wetness_percentage = elem.second.get_wetness_percentage();
        float dmg_float = you.enchantment_cache->modify_value( enchant_vals::mod::WEAKNESS_TO_WATER,
                          0 ) * wetness_percentage / 100;
        const int dmg = roll_remainder( dmg_float );
        if( dmg > 0 ) {
            you.apply_damage( nullptr, elem.first, dmg );
            you.add_msg_player_or_npc( m_bad, _( "Your %s is damaged by the water." ),
                                       _( "<npcname>'s %s is damaged by the water." ),
                                       body_part_name( elem.first ) );
        } else if( dmg < 0 && !elem.second.is_at_max_hp() ) {
            you.heal( elem.first, std::abs( dmg ) );
            you.add_msg_player_or_npc( m_good, _( "Your %s is healed by the water." ),
                                       _( "<npcname>'s %s is healed by the water." ),
                                       body_part_name( elem.first ) );
        }
    }
}

void suffer::mutation_power( Character &you, const trait_id &mut_id )
{
    if( you.get_cost_timer( mut_id ) > 0_turns ) {
        // Not ready to consume cost yet, the timer ticks on
        you.mod_cost_timer( mut_id, -1_turns );
    } else {
        // Ready to consume cost: pay the power cost and reset timer
        if( mut_id->cooldown > 0_turns ) {
            you.set_cost_timer( mut_id, mut_id->cooldown - 1_turns );
        }
        if( mut_id->hunger ) {
            if( you.get_bmi_fat() < character_weight_category::underweight ) {
                you.add_msg_if_player( m_warning,
                                       _( "You're too malnourished to keep your %s going." ),
                                       you.mutation_name( mut_id ) );
                you.deactivate_mutation( mut_id );
            } else {
                // does not directly modify hunger, but burns kcal
                you.mod_stored_kcal( -mut_id->cost );
            }
        }
        if( mut_id->thirst ) {
            // Well into Dehydrated
            if( you.get_thirst() >= 260 ) {
                you.add_msg_if_player( m_warning,
                                       _( "You're too dehydrated to keep your %s going." ),
                                       you.mutation_name( mut_id ) );
                you.deactivate_mutation( mut_id );
            } else {
                you.mod_thirst( mut_id->cost );
            }
        }
        if( mut_id->sleepiness ) {
            // Exhausted
            if( you.get_sleepiness() >= sleepiness_levels::EXHAUSTED ) {
                you.add_msg_if_player( m_warning,
                                       _( "You're too exhausted to keep your %s going." ),
                                       you.mutation_name( mut_id ) );
                you.deactivate_mutation( mut_id );
            } else {
                you.mod_sleepiness( mut_id->cost );
            }
        }
        if( mut_id->mana ) {
            // no enough mana
            if( you.magic->available_mana() < mut_id->cost ) {
                you.add_msg_if_player( m


E

emit()

    environment variable

MACOSX_DEPLOYMENT_TARGET

PATH, [1]

PYQTDESIGNERPATH

PYTHONPATH

L

loadUi() (in module PyQt4.uic)

loadUiType() (in module PyQt4.uic)

M

MACOSX_DEPLOYMENT_TARGET

P

PATH, [1]

phononModuleMakefile (class in PyQt4.pyqtconfig)

PyQt4.pyqtconfig (module)

PyQt4.QtCore.pyqtProperty() (built-in function)

PyQt4.QtCore.pyqtSignal() (built-in function)

PyQt4.QtCore.pyqtSlot() (built-in function)

PyQt4.uic (module)

<a href="build_system.html#PyQt4.pyqtconfig.


 }

    return Raster_Err_Ok;
  }

  static void
  ft_black_init( black_PRaster  raster )
  {
    FT_UNUSED( raster );
  }

  /**** RASTER OBJECT CREATION: In standalone mode, we simply use *****/
  /****                         a static object.                  *****/

#ifdef STANDALONE_

  static int
  ft_black_new( void*       memory,
                FT_Raster  *araster )
  {
     static black_TRaster  the_raster;
     FT_UNUSED( memory );

     *araster = (FT_Raster)&the_raster;
     FT_ZERO( &the_raster );
     ft_black_init( &the_raster );

     return 0;
  }

  static void
  ft_black_done( FT_Raster  raster )
  {
    /* nothing */
    FT_UNUSED( raster );
  }

#else /* !STANDALONE_ */

  static int
  ft_black_new( FT_Memory       memory,
                black_PRaster  *araster )
  {
    FT_Error       error;
    black_PRaster  raster = NULL;

    *araster = 0;
    if ( !FT_NEW( raster ) )
    {
      raster->memory = memory;
      ft_black_init( raster );

      *araster = raster;
    }

    return error;
  }

  static void
  ft_black_done( black_PRaster  raster )
  {
    FT_Memory  memory = (FT_Memory)raster->memory;

    FT_FREE( raster );
  }

#endif /* !STANDALONE_ */

  static void
  ft_black_reset( FT_Raster  raster,
                  PByte      pool_base,
                  ULong      pool_size )
  {
    FT_UNUSED( raster );
    FT_UNUSED( pool_base );
    FT_UNUSED( pool_size );
  }

  static int
  ft_black_set_mode( FT_Raster  raster,
                     ULong      mode,
                     void*      args )
  {
    FT_UNUSED( raster );
    FT_UNUSED( mode );
    FT_UNUSED( args );

    return 0;
  }

  static int
  ft_black_render( FT_Raster                raster,
                   const FT_Raster_Params*  params )
  {
    const FT_Outline*  outline    = (const FT_Outline*)params->source;
    const FT_Bitmap*   target_map = params->target;

#ifndef FT_STATIC_RASTER
    black_TWorker  worker[1];
#endif

    Long  buffer[FT_MAX_BLACK_POOL];

    if ( !raster )
      return FT_THROW( Raster_Uninitialized );

    if ( !outline )
      return FT_THROW( Invalid_Outline );

    /* return immediately if the outline is empty */
    if ( outline->n_points == 0 || outline->n_contours <= 0 )
      return Raster_Err_Ok;

    if ( !outline->contours || !outline->points )
      return FT_THROW( Invalid_Outline );

    if ( outline->n_points !=
           outline->contours[outline->n_contours - 1] + 1 )
      return FT_THROW( Invalid_Outline );

    /* this version of the raster does not support direct rendering, sorry */
    if ( params->flags & FT_RASTER_FLAG_DIRECT ||
         params->flags & FT_RASTER_FLAG_AA     )
      return FT_THROW( Cannot_Render_Glyph );

    if ( !target_map )
      return FT_THROW( Invalid_Argument );

    /* nothing to do */
    if ( !target_map->width || !target_map->rows )
      return Raster_Err_Ok;

    if ( !target_map->buffer )
      return FT_THROW( Invalid_Argument );

    ras.outline = *outline;
    ras.target  = *target_map;

    ras.buff     = buffer;
    ras.sizeBuff = (&buffer)[1]; /* Points to right after buffer. */

    return Render_Glyph( RAS_VAR );
  }

  FT_DEFINE_RASTER_FUNCS(
    ft_standard_raster,

    FT_GLYPH_FORMAT_OUTLINE,

    (FT_Raster_New_Func)     ft_black_new,       /* raster_new      */
    (FT_Raster_Reset_Func)   ft_black_reset,     /* raster_reset    */
    (FT_Raster_Set_Mode_Func)ft_black_set_mode,  /* raster_set_mode */
    (FT_Raster_Render_Func)  ft_black_render,    /* raster_render   */
    (FT_Raster_Done_Func)    ft_black_done       /* raster_done     */
  )

/* END */


_LIBRARY = /usr/local/share/tcl8.0
DEJAGNULIBS = /usr/local/share/dejagnu

(On systems such as Cygwin, these paths are required to be actual
paths, not mounts or links; presumably this is due to some lack of
portability in the DejaGnu code.)

Finally, you can run the testsuite (which may take a long time):

cd <var>objdir</var>; make -k check

This will test various components of GCC, such as compiler
front ends and runtime libraries.  While running the testsuite, DejaGnu
might emit some harmless messages resembling
‘<samp>WARNING: Couldn't find the global config file.</samp>’ or
‘<samp>WARNING: Couldn't find tool init file</samp>’ that can be ignored.

If you are testing a cross-compiler, you may want to run the testsuite
on a simulator as described at http://gcc.gnu.org/simtest-howto.html.

How can you run the testsuite on selected tests?

In order to run sets of tests selectively, there are targets
‘<samp>make check-gcc</samp>’ and language specific ‘<samp>make check-c</samp>’,
‘<samp>make check-c++</samp>’, ‘<samp>make check-fortran</samp>’,
‘<samp>make check-ada</samp>’, ‘<samp>make check-objc</samp>’, ‘<samp>make check-obj-c++</samp>’,
‘<samp>make check-lto</samp>’
in the <samp>gcc</samp> subdirectory of the object directory.  You can also
just run ‘<samp>make check</samp>’ in a subdirectory of the object directory.

A more selective way to just run all gcc execute tests in the
testsuite is to use

make check-gcc RUNTESTFLAGS="execute.exp <var>other-options</var>"

Likewise, in order to run only the g++ “old-deja” tests in
the testsuite with filenames matching ‘<samp>9805*</samp>’, you would use

make check-g++ RUNTESTFLAGS="old-deja.exp=9805* <var>other-options</var>"

The file-matching expression following <var>filename</var>.exp= is treated
as a series of whitespace-delimited glob expressions so that multiple patterns
may be passed, although any whitespace must either be escaped or surrounded by
single quotes if multiple expressions are desired. For example,

make check-g++ RUNTESTFLAGS="old-deja.exp=9805*\ virtual2.c <var>other-options</var>"
make check-g++ RUNTESTFLAGS="'old-deja.exp=9805* virtual2.c' <var>other-options</var>"

The <samp>*.exp</samp> files are located in the testsuite directories of the GCC
source,


 is the content of the genesis block used by the benchmarks.
	benchRootKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
	benchRootAddr   = crypto.PubkeyToAddress(benchRootKey.PublicKey)
	benchRootFunds  = math.BigPow(2, 100)
)

// genValueTx returns a block generator that includes a single
// value-transfer transaction with n bytes of extra data in each
// block.
func genValueTx(nbytes int) func(int, *BlockGen) {
	return func(i int, gen *BlockGen) {
		toaddr := common.Address{}
		data := make([]byte, nbytes)
		gas, _ := IntrinsicGas(data, nil, false, nil, 0, false)
		tx, _ := types.SignTx(types.NewTransaction(gen.TxNonce(benchRootAddr), toaddr, big.NewInt(1), gas, gen.MinimumGasPrice(nil), data), types.HomesteadSigner{}, benchRootKey)
		gen.AddTx(tx)
	}
}

var (
	ringKeys  = make([]*ecdsa.PrivateKey, 1000)
	ringAddrs = make([]common.Address, len(ringKeys))
)

func init() {
	ringKeys[0] = benchRootKey
	ringAddrs[0] = benchRootAddr
	for i := 1; i < len(ringKeys); i++ {
		ringKeys[i], _ = crypto.GenerateKey()
		ringAddrs[i] = crypto.PubkeyToAddress(ringKeys[i].PublicKey)
	}
}

// genTxRing returns a block generator that sends ether in a ring
// among n accounts. This is creates n entries in the state database
// and fills the blocks with many small transactions.
func genTxRing(naccounts int) func(int, *BlockGen) {
	from := 0
	return func(i int, gen *BlockGen) {
		gas := params.DefaultGasLimit
		for {
			gas -= params.TxGas
			if gas < params.TxGas {
				break
			}
			to := (from + 1) % naccounts
			tx := types.NewTransaction(
				gen.TxNonce(ringAddrs[from]),
				ringAddrs[to],
				benchRootFunds,
				params.TxGas,
				gen.MinimumGasPrice(nil),
				nil,
			)
			tx, _ = types.SignTx(tx, types.HomesteadSigner{}, ringKeys[from])
			gen.AddTx(tx)
			from = to
		}
	}
}

func benchInsertChain(b *testing.B, disk bool, gen func(int, *BlockGen)) {
	// Create the database in memory or in a temporary directory.
	var db ethdb.Database
	if !disk {
		db = rawdb.NewMemoryDatabase()
	} else {
		dir, err := ioutil.TempDir("", "eth-core-bench")
		if err != nil {
			b.Fatalf("cannot create temporary directory: %v", err)
		}
		defer os.RemoveAll(dir)
		db, err = rawdb.NewLevelDBDatabase(dir, 128, 128, "", false)
		if err != nil {
			b.Fatalf("cannot create temporary database: %v", err)
		}
		defer db.Close()
	}

	// Generate a chain of b.N blocks using the supplied block
	// generator function.
	gspec := Genesis{
		Config: params.IstanbulTestChainConfig,
		Alloc:  GenesisAlloc{benchRootAddr: {Balance: benchRootFunds}},
	}
	genesis := gspec.MustCommit(db)
	chain, _ := GenerateChain(gspec.Config, genesis, mockEngine.NewFaker(), db, b.N, gen)

	// Time the insertion of the new chain.
	// State and blocks are stored in the same DB.
	chainman, _ := NewBlockChain(db,


= tss.NewPeerContext(signPIDs)
	signParties := make([]*signing.LocalParty, 0, len(signPIDs))

	signErrCh := make(chan *tss.Error, len(signPIDs))
	signOutCh := make(chan tss.Message, len(signPIDs))
	signEndCh := make(chan common.SignatureData, len(signPIDs))

	for j, signPID := range signPIDs {
		params := tss.NewParameters(tss.Edwards(), signP2pCtx, signPID, len(signPIDs), newThreshold)
		P := signing.NewLocalParty(big.NewInt(42), params, signKeys[j], signOutCh, signEndCh).(*signing.LocalParty)
		signParties = append(signParties, P)
		go func(P *signing.LocalParty) {
			if err := P.Start(); err != nil {
				signErrCh <- err
			}
		}(P)
	}

	var signEnded int32
	for {
		select {
		case err := <-signErrCh:
			common.Logger.Errorf("Error: %s", err)
			assert.FailNow(t, err.Error())
			return

		case msg := <-signOutCh:
			dest := msg.GetTo()
			if dest == nil {
				for _, P := range signParties {
					if P.PartyID().Index == msg.GetFrom().Index {
						continue
					}
					go updater(P, msg, signErrCh)
				}
			} else {
				if dest[0].Index == msg.GetFrom().Index {
					t.Fatalf("party %d tried to send a message to itself (%d)", dest[0].Index, msg.GetFrom().Index)
				}
				go updater(signParties[dest[0].Index], msg, signErrCh)
			}

		case signData := <-signEndCh:
			atomic.AddInt32(&signEnded, 1)
			if atomic.LoadInt32(&signEnded) == int32(len(signPIDs)) {
				t.Logf("Signing done. Received sign data from %d participants", signEnded)

				// BEGIN EDDSA verify
				pkX, pkY := signKeys[0].EDDSAPub.X(), signKeys[0].EDDSAPub.Y()
				pk := edwards.PublicKey{
					Curve: tss.Edwards(),
					X:     pkX,
					Y:     pkY,
				}

				newSig, err := edwards.ParseSignature(signData.Signature)
				if err != nil {
					println("new sig error, ", err.Error())
				}

				ok := edwards.Verify(&pk, big.NewInt(42).Bytes(),
					newSig.R, newSig.S)

				assert.True(t, ok, "eddsa verify must pass")
				t.Log("EDDSA signing test done.")
				// END EDDSA verify

				return
			}
		}
	}
}
// Copyright © 2019 Binance
//
// This file is part of Binance. The full Binance copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.

package keygen

import (
	"errors"
	"fmt"
	"math/big"

	"github.com/bnb-chain/tss-lib/common"
	cmt "github.com/bnb-chain/tss-lib/crypto/commitments"
	"github.com/bnb-chain/tss-lib/crypto/vss"
	"github.com/bnb-chain/tss-lib/tss"
)

// Implements Party
// Implements Stringer
var _ tss.Party = (*LocalParty)(nil)
var _ fmt.Stringer = (*LocalParty)(nil)

type (
	LocalParty struct {
		*tss.BaseParty
		params *tss.Parameters

		temp localTempData
		data LocalPartySaveData

		// outbound messaging
		out chan<- tss.Message
		end chan<- LocalPartySaveData


Content::Unknown(ref mut inner) => v.visit_ber_unknown_mut(inner, depth),
        BerObjectContent::VideotexString(ref mut s) => v.visit_ber_videotextstring_mut(s, depth),
        BerObjectContent::VisibleString(ref mut s) => v.visit_ber_visiblestring_mut(s, depth),
    }
}

#[cfg(test)]
mod tests {
    use super::VisitMut;
    use crate::ber::BerObject;

    #[derive(Debug)]
    struct BerObjectVisitor {}

    impl<'a> VisitMut<'a> for BerObjectVisitor {
        fn visit_ber_mut(&mut self, ber: &'_ mut BerObject<'a>, depth: usize) {
            eprintln!("Depth {}: Object with tag {}", depth, ber.tag());
        }
    }
}
<reponame>threecgreen/nile
use yew::prelude::*;

use crate::{
    components::{utils::update_if_changed, Footer},
    in_game::InGame,
    landing::Landing,
};

pub struct App {
    link: ComponentLink<App>,
    player_names: Vec<String>,
    has_confirmed: bool,
    cpu_player_count: u8,
    game_number: u32,
    should_show_shortcuts: bool,
    should_show_new_game_form: bool,
}

pub enum Msg {
    AddPlayer,
    PlayerNameChange(PlayerNameChange),
    RemovePlayer,
    AddCpuPlayer,
    RemoveCpuPlayer,
    Confirm,
    SetShouldShowShortcuts(bool),
    SetShouldShowNewGameForm(bool),
    NewGame,
    Reset,
}

pub struct PlayerNameChange {
    pub idx: usize,
    pub name: String,
}

impl Component for App {
    type Message = Msg;
    type Properties = ();

    fn create(_: Self::Properties, link: ComponentLink<Self>) -> Self {
        Self {
            player_names: vec![String::default()],
            has_confirmed: false,
            cpu_player_count: 1,
            game_number: 1,
            should_show_shortcuts: false,
            should_show_new_game_form: false,
            link,
        }
    }

    fn update(&mut self, msg: Self::Message) -> ShouldRender {
        match msg {
            Msg::AddPlayer => {
                let total_player_count = self.player_names.len() + self.cpu_player_count as usize;
                if total_player_count < 4 {
                    self.player_names.push(String::default());
                    true
                } else {
                    false
                }
            }
            Msg::PlayerNameChange(PlayerNameChange { idx, name }) => {
                if let Some(player_name) = self.player_names.get_mut(idx) {
                    *player_name = name;
                    true
                } else {
                    false
                }
            }
            Msg::RemovePlayer => self.player_names.pop().is_some(),
            Msg::AddCpuPlayer => {
                let cpu_player_count = (self.cpu_player_count + 1).min(3);
                update_if_changed(&mut self.cpu_player_count, cpu_player_count)
            }
            Msg::RemoveCpuPlayer => {
                let cpu_player_count = (self.cpu_player_count - 1).max(0);
                update_if_changed(&mut self.cpu_player_count, cpu_player_count)
            }
            Msg::Confirm => update_if_changed(&mut self.has_confirmed, true),
            Msg::SetShouldShowShortcuts(should_show_shortcuts) => {
                update_if_changed(&mut self.should_show_shortcuts, should_show_shortcuts)
            }
            Msg::SetShouldShowNewGameForm(should_show_new_game_form) => update_if_changed(
                &mut self.should_show_new_game_form,
                should_show_new_game_form,
            ),
            Msg::NewGame => {
                self.has_con


09";

            var deposit = new Deposit(asset, amount, time, status, address, addressTag, txId);

            Assert.Equal(asset, deposit.Asset);
            Assert.Equal(amount, deposit.Amount);
            Assert.Equal(time, deposit.Time);
            Assert.Equal(status, deposit.Status);
            Assert.Equal(address, deposit.Address);
            Assert.Equal(addressTag, deposit.AddressTag);
            Assert.Equal(txId, deposit.TxId);
        }

        [Fact]
        public void Serialization()
        {
            var asset = Asset.BTC;
            const decimal amount = 1.23m;
            var time = DateTimeOffset.FromUnixTimeMilliseconds(DateTime.UtcNow.ToTimestamp()).UtcDateTime;
            const DepositStatus status = DepositStatus.Success;
            const string address = "0x12345678901234567890";
            const string addressTag = "ABCDEF";
            const string txId = "21436587092143658709";

            var deposit = new Deposit(asset, amount, time, status, address, addressTag, txId);

            var json = JsonConvert.SerializeObject(deposit);

            deposit = JsonConvert.DeserializeObject<Deposit>(json);

            Assert.Equal(asset, deposit.Asset);
            Assert.Equal(amount, deposit.Amount);
            Assert.Equal(time, deposit.Time);
            Assert.Equal(status, deposit.Status);
            Assert.Equal(address, deposit.Address);
            Assert.Equal(addressTag, deposit.AddressTag);
            Assert.Equal(txId, deposit.TxId);
        }
    }
}


//
//     Generated by class-dump 3.5 (64 bit).
//
//     class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//

#import "NSObject.h"

__attribute__((visibility("hidden")))
@interface CMShapeRenderer : NSObject
{
}

+ (void)_setupDrawingStyleInDrawingContext:(id)arg1 dash:(id)arg2 state:(id)arg3;
+ (void)_setupDrawingStyleInDrawingContext:(id)arg1 stroke:(id)arg2 state:(id)arg3;
+ (void)_setupDrawingStyleInDrawingContext:(id)arg1 fill:(id)arg2 stroke:(id)arg3 state:(id)arg4;
+ (struct CGImage *)_copyImageFromOADImagefill:(id)arg1 withContext:(id)arg2;
+ (struct CGColor *)_copyCGColorFromOADFill:(id)arg1 andState:(id)arg2;
+ (struct CGColor *)_copyCGColorFromOADColor:(id)arg1 andState:(id)arg2;
+ (void)_renderCGPath:(struct CGPath *)arg1 stroke:(id)arg2 fill:(id)arg3 orientedBounds:(id)arg4 state:(id)arg5 drawingContext:(id)arg6;
+ (void)renderCanonicalShape:(int)arg1 fill:(id)arg2 stroke:(id)arg3 adjustValues:(id)arg4 orientedBounds:(id)arg5 state:(id)arg6 drawingContext:(id)arg7;
+ (void)renderLine:(int)arg1 stroke:(id)arg2 adjustValues:(id)arg3 orientedBounds:(id)arg4 state:(id)arg5 drawingContext:(id)arg6;
+ (void)renderDiagramPath:(id)arg1 fill:(id)arg2 stroke:(id)arg3 state:(id)arg4 drawingContext:(id)arg5;
+ (void)renderFreeForm:(id)arg1 fill:(id)arg2 stroke:(id)arg3 orientedBounds:(id)arg4 state:(id)arg5 drawingContext:(id)arg6;

@end


class Config {
  /**
   * The base of the API's URL
   *
   * @property apiBaseUrl
   * @type {String}
   */
  private apiBaseUrl: string;

  /**
   * The base URL of the application
   *
   * @property baseUrl
   * @type {String}
   */
  private baseUrl: string;

  /**
   * The application config derived from the environment
   *
   * @property environment
   * @type {IEnvConfig}
   */
  private environment: IEnvConfig;

  /**
   * Constructor.
   *
   * @class Config
   * @constructor
   */
  constructor() {
    this.environment = env[process.env.NODE_ENV];
  }

  /**
   * Get the base URL as configured for the environment
   *
   * @return {String}
   */
  public getBaseUrl(): string {
    if (!this.hasOwnProperty('baseUrl')) {
      this.baseUrl = this.environment.host;
    }

    return this.baseUrl;
  }

  /**
   * Get the base URL for the API as configured for the environment
   *
   * @return {String}
   */
  public getApiBaseUrl(): string {
    if (!this.hasOwnProperty('apiBaseUrl')) {
      const apiBase = this.environment.apiBase;

      this.apiBaseUrl = `${this.getBaseUrl()}${apiBase}`;
    }

    return this.apiBaseUrl;
  }
}

const config = new Config();

export default config;
import { Field, InputType } from '@nestjs/graphql';
import { MinLength, IsDateString, IsNotEmpty } from 'class-validator';

@InputType()
export class CreateUserInput {
  @MinLength(3)
  @Field()
  firstname: string;

  @MinLength(1)
  @Field()
  lastname: string;

  @IsNotEmpty()
  @Field()
  specialization: string;

  @IsDateString()
  @Field()
  createdAt: string;
}
let utf8decoder = new TextDecoder("utf-8");
let mem = new WebAssembly.Memory({ 'initial': 32 });
let u8buffer = new Uint8Array(mem.buffer);
let f32buffer = new Float32Array(mem.buffer);
let f64buffer = new Float64Array(mem.buffer);
let u32buffer = new Uint32Array(mem.buffer);
let i32buffer = new Int32Array(mem.buffer);
var bullet:BulletExport = {} as BulletExport;

export function getBullet():BulletExport|null{
    return bullet;
}

function strlen(str:i32):i32{
    let st=str;
    if(u8buffer.byteLength==0)
        u8buffer = new Uint8Array(mem.buffer);//不知道为什么这里u8buffer不对了，只能重建。是grow了？
    while(u8buffer[str++]!=0){}
    return str-st;
}

export async function loadBullet(wasm:string):Promise<BulletExport> {
    const response = await fetch(wasm);
    const buffer = await response.arrayBuffer();
    const obj = await WebAssembly.instantiate(buffer, {
        BTJSRT: {
            log: (str: i32, len: i32, f1: f32, f2: f32, f3: f32) => {
                let arr = mem.buffer.slice(str, str + len);
                console.log(utf8decoder.decode(arr), f1, f2, f3);
            },
            logs:(str:i32)=>{
                let len = strlen(str);
                let arr = mem.buffer.slice(str, str + len);
                console.log(utf8decoder.decode(arr));
            }
        },
        wasi_unstable: {
            fd_close: () => { console.log('close'); throw 'notimp';},
            fd_seek: () => { console.log('seek'); throw 'notimp';},
            fd_fdstat_get: () => { console.log('get');throw 'notimp'; },
            fd_write: () =>


hide:not(.ng-hide-animate) {
  display: inherit !important;
}
@media screen and (min-width: 1024px) {
  .glue-c-carousel__page-list.glue-c-carousel__page-list--dots
    .glue-pagination__page-list-button-container {
    margin-right: 14px;
  }
  .glue-c-carousel__page-list.glue-c-carousel__page-list--dots
    .glue-pagination__page-list-button-container
    .glue-pagination__page-list-button {
    height: 14px;
    width: 14px;
  }
}
.glue-c-carousel__page-list.glue-c-carousel__page-list--dots
  .glue-pagination__page-list-button {
  background-color: #585858;
  border: solid 2px #585858;
  border-radius: 50%;
  color: #fff;
  font-size: 0;
  height: 20px;
  padding: 0;
  vertical-align: middle;
  width: 20px;
}
.glue-c-carousel__page-list.glue-c-carousel__page-list--dots
  .glue-pagination__page-list-button:focus {
  background-color: #585858;
  border-color: #000;
  outline: none;
}
.glue-c-carousel__page-list.glue-c-carousel__page-list--dots
  .glue-pagination__page-list-button[aria-selected='true'] {
  background-color: #000;
  border: solid 1px #000;
}
@media screen and (-ms-high-contrast: active) {
  .glue-c-carousel__page-list.glue-c-carousel__page-list--dots
    .glue-pagination__page-list-button[aria-selected='true'] {
    background: buttonText;
  }
}
.glue-c-carousel__page-list.glue-c-carousel__page-list--dots
  .glue-pagination__page-list-button[aria-selected='true']:focus {
  border-color: #000;
}
.glue-c-carousel__pages.glue-c-carousel__pages--xfade {
  min-height: 200px;
  position: relative;
}
.glue-c-carousel__pages.glue-c-carousel__pages--xfade
  > ul
  > .glue-pagination__page,
.glue-c-carousel__pages.glue-c-carousel__pages--xfade
  > .glue-pagination__page {
  background-color: #fff;
  display: block;
  height: 100%;
  left: 0;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 1;
}
.glue-c-carousel__pages.glue-c-carousel__pages--xfade
  > ul
  > .glue-pagination__page.glue-pagination__page--previously-shown,
.glue-c-carousel__pages.glue-c-carousel__pages--xfade
  > .glue-pagination__page.glue-pagination__page--previously-shown {
  opacity: 1;
  z-index: 1;
}
.glue-c-carousel__pages.glue-c-carousel__pages--xfade
  > ul
  > .glue-pagination__page.glue-is-shown,
.glue-c-carousel__pages.glue-c-carousel__pages--xfade
  > .glue-pagination__page.glue-is-shown {
  opacity: 1;
  transition: opacity 400ms linear;
  z-index: 2;
}
.glue-tabset {
  width: 100%;
}
.glu


toDouble(), 0, 80, 80),
          bottomRight: someFixedRadius,
          topRight: growingRadius,
          bottomLeft: growingRadius);

      rc.drawRRect(rrect, niceRRectPaint);
    }
    await canvasScreenshot(rc, 'canvas_rrect_overlapping_radius', canvasRect: canvasRect, region: region);
  });

  test('diff round rect with big radius scale down smaller radius', () async {
    for (int i = 0; i < 5; i++) {
      final Radius growingRadius = Radius.circular(rRectRadii[i]);
      final RRect outerRRect = RRect.fromRectAndCorners(
          Rect.fromLTWH(100 * i.toDouble(), 0, 80, 80),
          bottomRight: someFixedRadius,
          topRight: growingRadius,
          bottomLeft: growingRadius);

      // Inner is half of outer, but offset a little so it looks nicer
      final RRect innerRRect = RRect.fromRectAndCorners(
          Rect.fromLTWH(100 * i.toDouble() + 5, 5, 40, 40),
          bottomRight: someFixedRadius / 2,
          topRight: growingRadius / 2,
          bottomLeft: growingRadius / 2);

      rc.drawDRRect(outerRRect, innerRRect, niceRRectPaint);
    }

    await canvasScreenshot(rc, 'canvas_drrect_overlapping_radius', canvasRect: canvasRect, region: region);
  });
}
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:test/bootstrap/browser.dart';
import 'package:test/test.dart';
import 'package:ui/src/engine.dart';
import 'package:ui/ui.dart';

import '../../common/test_initialization.dart';
import '../screenshot.dart';

const Rect region = Rect.fromLTWH(0, 0, 500, 100);

void main() {
  internalBootstrapBrowserTest(() => testMain);
}

SurfacePaint makePaint() => Paint() as SurfacePaint;

Future<void> testMain() async {
  setUpUnitTests(
    emulateTesterEnvironment: false,
    setUpTestViewDimensions: false,
  );

  setUpAll(() async {
    debugShowClipLayers = true;
  });

  setUp(() async {
    SurfaceSceneBuilder.debugForgetFrameScene();
  });

  group('Add picture to scene', () {
    test('draw growing picture across frames', () async {
      final SurfaceSceneBuilder builder = SurfaceSceneBuilder();
      builder.pushClipRect(
        const Rect.fromLTRB(0, 0, 100, 100),
      );

      _drawTestPicture(builder, 100, false);
      builder.pop();

      final DomElement elm1 = builder
          .build()
          .webOnlyRootElement!;
      domDocument.body!.append(elm1);

      // Now draw picture again but at larger size.
      final SurfaceSceneBuilder builder2 = SurfaceSceneBuilder();
      builder2.pushClipRect(
        const Rect.fromLTRB(0, 0, 100, 100),
      );
      // Now draw the picture at original target size, which will use a
      // different code path that should normally not have width/height set
      // on image element.
      _drawTestPicture(builder2, 20, false);
      builder2.pop();

      elm1.remove();
      await sceneScreenshot(builder2, 'canvas_draw_picture_acrossframes',
        region: region);
    });

    test('draw growing picture across frames clipped', () async {
      final SurfaceSceneBuilder builder = SurfaceSceneBuilder();
      builder.pushClipRect(
        const Rect.fromLTRB(0, 0, 100, 100)


 height) {
    container.resize(width, height);
  }
}
part of dock_spawn;

class Color {
  num r = 0;
  num g = 0;
  num b = 0;
  num a = 1;

  int get r255 => (r * 255).toInt();
  int get g255 => (g * 255).toInt();
  int get b255 => (b * 255).toInt();

  Color();
  Color.fromRGBA(this.r, this.g, this.b, this.a);

  String toString() => "$r, $g, $b";
  String toString255() => "$r255, $g255, $b255";
  void parse(String data) {
    var tokens = data.split(",");
    if (tokens.length >= 3) {
      r = double.parse(tokens[0]);
      g = double.parse(tokens[1]);
      b = double.parse(tokens[2]);
    }
  }
  void parse255(String data) {
    var tokens = data.split(",");
    if (tokens.length < 3) {
      throw new Exception("Invalid color input format $data");
    }
    r = double.parse(tokens[0]) / 255;
    g = double.parse(tokens[1]) / 255;
    b = double.parse(tokens[2]) / 255;
  }

  String toRgba() => "rgba($r255, $g255, $b255, $a)";
}

class Point2 {
  num x;
  num y;

  Point2(this.x, this.y);
  Point2.copy(Point2 other) : x = other.x, y = other.y;
  Point2.empty() : x = 0, y = 0;

  Point2 operator-(Point2 other) {
    return new Point2(x - other.x, y - other.y);
  }

  Point2 operator+(Point2 other) {
    return new Point2(x + other.x, y + other.y);
  }

  Point2 operator*(num value) {
    return new Point2(x * value, y * value);
  }

  bool operator==(Point2 other) {
    return x == other.x && y == other.y;
  }

  bool inside(Point2 startLocation, Size size) {
    final sx = startLocation.x;
    final sy = startLocation.y;
    final width = size.width;
    final height = size.height;
    return x >= sx && y >= sy &&
        x <= sx + width && y <= sy + height;
  }

  String toString() => "[$x, $y]";

  int get hashCode {
    int result = 17;
    result = 37 * result + x.hashCode;
    result = 37 * result + y.hashCode;
    return result;
  }
}

class Size {
  num width = 0;
  num height = 0;
  Size.empty();
  Size.copy(Size other) {
    this.width = other.width;
    this.height = other.height;
  }
  Size(this.width, this.height);

  Size operator-(Size other) {
    return new Size(width - other.width, height - other.height);
  }

  Size operator+(Size other) {
    return new Size(width + other.width, height + other.height);
  }

  Size operator*(num value) {
    return new Size(width * value, height * value);
  }
}
part of dock_spawn;

int getPixels(String pixels) {
  if (pixels == null) return 0;
  return int.parse(pixels.replaceAll("px", ""));
}

Point2 getMousePosition(MouseEvent e, Element element) {
  int parentOffsetX = element.offset.left;
  int parentOffsetY = element.offset.top;
  int parentWidth = element.client.width;
  int parentHeight = element.client.height;
  int x = e.offset.x - parentOffsetX;
  int y = e.offset.x - parentOffsetY;
  return new Point2(x, y);
}

void disableGlobalTextSelection() {
  document.body.classes.add("disable-selection");
}

void enableGlobalTextSelection() {
  document.body.classes.remove("disable-selection");
}

bool isPo