 U+7CCA, U+7EBA, U+7EEA, U+7EF5, U+7F1D, U+7F69, U+806A, U+809A, U+80BF, U+80C3, U+81C0, U+820C, U+82AC, U+82AF, U+82CD, U+82D7, U+838E, U+839E, U+8404, U+84B8, U+852C, U+8587, U+8650, U+8679, U+86C7, U+8702, U+87BA, U+886B-886C, U+8870, U+8C10, U+8C23, U+8C6B, U+8D3E, U+8D4B-8D4C, U+8D64, U+8D6B, U+8D74, U+8E29, U+8F69, U+8F74, U+8FB0, U+8FDF, U+901B, U+9038, U+9093, U+9171, U+9489, U+94AE, U+94C3, U+9508, U+9510, U+9601, U+9614, U+964C, U+9675, U+971C, U+97F5, U+9888, U+98D8, U+9971, U+9AA4, U+9E3F, U+9E45, U+9E4F, U+9E70, U+9F7F;
}
@font-face {
  font-family: "IBM Plex Sans SC";
  font-style: normal;
  font-weight: 400;
  src: local("IBM Plex Sans SC"), local("IBMPlexSansSC"), url("https://cdn.jsdelivr.net/npm/@ibm/plex-sans-sc@1.1.0/fonts/split/woff2/hinted/IBMPlexSansSC-Regular-084.woff2") format("woff2");
  unicode-range: U+00A5, U+2192, U+2605, U+4E11, U+4E22, U+4E32, U+4F0D, U+4F0F, U+4F69, U+4FF1, U+50B2, U+5154, U+51DD, U+51F0, U+5211, U+5269, U+533F, U+5366-5367, U+5389, U+5413, U+5440, U+5446, U+5561, U+574A, U+5751, U+57AB, U+5806, U+5821, U+582A, U+58F3, U+5938, U+5948, U+5978, U+59D1, U+5A03, U+5A07, U+5AC1, U+5ACC, U+5AE9, U+5BB4, U+5BC4, U+5C3F, U+5E3D, U+5E7D, U+5F92, U+5FAA, U+5FE0, U+5FFD, U+6016, U+60A0, U+60DC, U+60E8, U+614E, U+6212, U+6284, U+62C6, U+62D3-62D4, U+63F4, U+642C, U+6478, U+6491-6492, U+64E6, U+6591, U+65A4, U+664B, U+6735, U+6746, U+67F1, U+67F3, U+6842, U+68AF, U+68C9, U+68CB, U+6A31, U+6B3A, U+6BC1, U+6C0F, U+6C27, U+6C57, U+6CC4, U+6CE5, U+6D2A, U+6D66, U+6D69, U+6DAF, U+6E58,


F928C 8007ECC4 286E638C */  lw         $v1, %lo(g_Camera + 0x58)($v1)
/* 31F9290 8007ECC8 00000000 */  nop
/* 31F9294 8007ECCC 12006914 */  bne        $v1, $t1, .Llevel_34_8007ED18
/* 31F9298 8007ECD0 0080023C */   lui       $v0, (0x80000009 >> 16)
/* 31F929C 8007ECD4 0880023C */  lui        $v0, %hi(g_Spyro + 0x118)
/* 31F92A0 8007ECD8 708B428C */  lw         $v0, %lo(g_Spyro + 0x118)($v0)
/* 31F92A4 8007ECDC 04004386 */  lh         $v1, 0x4($s2)
/* 31F92A8 8007ECE0 83100200 */  sra        $v0, $v0, 2
/* 31F92AC 8007ECE4 21186200 */  addu       $v1, $v1, $v0
/* 31F92B0 8007ECE8 9800A3AF */  sw         $v1, 0x98($sp)
/* 31F92B4 8007ECEC 06004286 */  lh         $v0, 0x6($s2)
/* 31F92B8 8007ECF0 00000000 */  nop
/* 31F92BC 8007ECF4 9C00A2AF */  sw         $v0, 0x9C($sp)
/* 31F92C0 8007ECF8 08004286 */  lh         $v0, 0x8($s2)
/* 31F92C4 8007ECFC 00000000 */  nop
/* 31F92C8 8007ED00 A000A2AF */  sw         $v0, 0xA0($sp)
/* 31F92CC 8007ED04 64004228 */  slti       $v0, $v0, 0x64
/* 31F92D0 8007ED08 12004010 */  beqz       $v0, .Llevel_34_8007ED54
/* 31F92D4 8007ED0C 64000224 */   addiu     $v0, $zero, 0x64
/* 31F92D8 8007ED10 55FB0108 */  j          .Llevel_34_8007ED54
/* 31F92DC 8007ED14 A000A2AF */   sw        $v0, 0xA0($sp)
.Llevel_34_8007ED18:
/* 31F92E0 8007ED18 09004234 */  ori        $v0, $v0, (0x80000009 & 0xFFFF)
/* 31F92E4 8007ED1C 04006214 */  bne        $v1, $v0, .Llevel_34_8007ED30
/* 31F92E8 8007ED20 00000000 */   nop
/* 31F92EC 8007ED24 04004286 */  lh         $v0, 0x4($s2)
/* 31F92F0 8007ED28 4DFB0108 */  j          .Llevel_34_8007ED34
/* 31F92F4 8007ED2C 00FE4224 */   addiu     $v0, $v0, -0x200
.Llevel_34_8007ED30:
/* 31F92F8 8007ED30 04004286 */  lh         $v0, 0x4($s2)
.Llevel_34_8007ED34:
/* 31F92FC 8007ED34 00000000 */  nop
/* 31F9300 8007ED38 9800A2AF */  sw         $v0, 0x98($sp)
/* 31F9304 8007ED3C 06004286 */  lh         $v0, 0x6($s2)
/* 31F9308 8007ED40 00000000 */  nop
/* 31F930C 8007ED44 9C00A2AF */  sw         $v0, 0x9C($sp)
/* 31F9310 8007ED48 08004286 */  lh         $v0,


ll=num_unroll,
        input_length=length,
        input_key=key,
        input_sequences=sequences,
        input_context=context,
        initial_states=initial_states,
        name=sqss_scope_name)
    prefetch_op = state_saver.prefetch_op
    next_batch = state_saver.next_batch
    self.assertTrue(
        state_saver.barrier.barrier_ref.name.startswith("%s/" %
                                                        sqss_scope_name))
    self.assertTrue(prefetch_op.name.startswith("%s/" % sqss_scope_name))
    self.assertTrue(next_batch.key.name.startswith("%s/" % sqss_scope_name))

if __name__ == "__main__":
  test.main()


685] = "vb_36_scenario1",
	[1979507894] = "pound2_lvl3_dd",
	[1739383993] = "v_25_drframes",
	[1532290236] = "vtc_brc_2",
	[1616700605] = "ch_chint03_bedlamp",
	[3800229054] = "hei_ch2_12b_critical_0",
	[1258742976] = "pey3_dials5",
	[3670336708] = "schaft_hood_2",
	[251585737] = "prev_liv4",
	[765125839] = "hei_cs3_08c",
	[659481809] = "hw1_int_placement",
	[3782534354] = "v_57_hallshas",
	[894362841] = "green_cage_2",
	[3493913818] = "id1_11_jl00int",
	[2137056477] = "wheel_racecar_9c",
	[2729370857] = "tur_wing_ec",
	[3436766452] = "fur_grill_a1",
	[2632901880] = "ex_office2c_mirror2",
	[2942756090] = "bkr_ware05_monitorbasic",
	[3068454145] = "cablemesh1924256_1_hvstd",
	[1817896208] = "wheel_smod4b",
	[2972902675] = "hei_ch3_rd1a_props_spline_tele21",
	[516482328] = "tord_bump_r2",
	[3033326873] = "ex_office2c_glassshelf00",
	[3360089370] = "lr_cs6_10_strm_1",
	[3593921822] = "ex_office_01c_winglass04",
	[3735741728] = "dom7_intake4",
	[1117578530] = "drug_skidpltr2",
	[2427249964] = "ss1_14_strm_1",
	[1281025332] = "pmo_dr_2a",
	[1396368693] = "knjosj_brc_11b",
	[3501647161] = "sent2_intercooler",
	[3489850687] = "hei_distlodlights_small041",
	[3078808896] = "v_69_main_deta4",
	[73721153] = "vtc_cv_4",
	[540861764] = "ptr_bon_h",
	[2410997066] = "hei_kt1_03_strm_0",
	[3849905483] = "euro_bucketd2_smod",
	[3931825488] = "green_lcover_2",
	[2760697169] = "vtc_split_3",
	[824632666] = "bansh2_door2l",
	[109110623] = "h4_int_sub_signage_bridge004",
	[4277593441] = "prev_dr_l_b",
	[1900995943] = "cs6_08_mines02",
	[3292587393] = "imgn_liv11",
	[2008737160] = "v_63_vaultdec03",
	[4259636618] = "bh1_33_strm_0",
	[2822038930] = "ch_chint02_trophy_cab_glass6",
	[3171870109] = "wheel_4smod16e",
	[35055006] = "h4_int_sub_sub_commad_dials_33",
	[816768418] = "zent_cage_1",
	[1349313955] = "penum2_wing1",
	[


d3d12shader-d3d12_shader_buffer_desc)
             | Describes a shader constant-buffer.
                         |
| [**D3D12\_SHADER\_DESC**](/windows/desktop/api/d3d12shader/ns-d3d12shader-d3d12_shader_desc)
                            | Describes a shader.
                                         |
| [**D3D12\_SHADER\_INPUT\_BIND\_DESC**](/windows/desktop/api/d3d12shader/ns-d3d12shader-d3d12_shader_input_bind_desc)
    | Describes how a shader resource is bound to a shader input.
 |
| [**D3D12\_SHADER\_TYPE\_DESC**](/windows/desktop/api/d3d12shader/ns-d3d12shader-d3d12_shader_type_desc)
                 | Describes a shader-variable type.
                           |
| [**D3D12\_SHADER\_VARIABLE\_DESC**](/windows/desktop/api/d3d12shader/ns-d3d12shader-d3d12_shader_variable_desc)
         | Describes a shader variable.
                                |
| [**D3D12\_SIGNATURE\_PARAMETER\_DESC**](/windows/desktop/api/d3d12shader/ns-d3d12shader-d3d12_signature_parameter_desc)
 | Describes a shader signature.
                               |

## Related topics

[Direct3D 12 Reference](direct3d-12-reference.md)

[Shader Reference](d3d12-graphics-reference-shader-reference.md)

---
-api-id: T:Windows.System.UserProfile.SetAccountPictureResult
-api-type: winrt enum
---

# SetAccountPictureResult

## -description
A result that is returned when you try to set the image for a user account.

This object is returned when you call [SetAccountPictureAsync](userinformation_setaccountpictureasync_2005420122.md), [SetAccountPictureFromStreamAsync](userinformation_setaccountpicturefromstreamasync_649508924.md), [SetAccountPicturesAsync](userinformation_setaccountpicturesasync_1051215039.md), and [SetAccountPicturesFromStreamAsync.](windows_system_userprofile.md)

## -enum-fields
### -field Success:0
Indicates the picture was successfully set.

### -field ChangeDisabled:1
Indicates that the picture was not set because the [AccountPictureChangeEnabled](userinformation_accountpicturechangeenabled.md) property is disabled, or the user cancelled the consent prompt.

### -field LargeOrDynamicError:2
Indicates that the picture was not set because the picture was too large.

### -field VideoFrameSizeError:3
Indicates that the video was not set because of its frame size was too large.

### -field FileSizeError:4
Indicates the picture was not set because the file size was too large.

### -field Failure:5
Indicates the picture or video was not set.

## -remarks

## -examples

## -see-also---
title: 11on12 Functions
description: The following functions are declared in d3d11on12.h.
ms.assetid: 99DDA586-ACFD-4326-B25E-EF8875901690
ms.topic: reference
ms.date: 05/31/2018
---

# 11on12 Functions

The following functions are declared in d3d11on12.h.

## In this section

|


ограничений, наложенных на героя.";
BLIZZARD_STORE_ERROR_ITEM_UNAVAILABLE = "Покупка этого предмета временно невозможна. Пожалуйста, повторите попытку позже.";
BLIZZARD_STORE_ERROR_MESSAGE_ALREADY_OWNED = "У вас это уже есть!";
BLIZZARD_STORE_ERROR_MESSAGE_BATTLEPAY_DISABLED = "Произошла ошибка. Пожалуйста, зайдите позже.";
BLIZZARD_STORE_ERROR_MESSAGE_CONSUMABLE_TOKEN_OWNED = "Чтобы купить жетон WoW во внутриигровом магазине, нужно сначала использовать все жетоны WoW, купленные на аукционе.";
BLIZZARD_STORE_ERROR_MESSAGE_INSUFFICIENT_BALANCE = "Недостаточно средств на счете для покупки. Чтобы пополнить счет, перейдите на страницу управления учетной записью.";
BLIZZARD_STORE_ERROR_MESSAGE_OTHER = "Возникла проблема при выполнении заказа. Пожалуйста, повторите попытку позже.";
BLIZZARD_STORE_ERROR_MESSAGE_PARENTAL_CONTROLS = "Функция покупки отключена системой родительского контроля. Пожалуйста, перейдите на страницу управления учетной записью.";
BLIZZARD_STORE_ERROR_MESSAGE_PAYMENT = "У вас нет действующего способа оплаты. Пожалуйста, перейдите на страницу управления учетной записью.";
BLIZZARD_STORE_ERROR_MESSAGE_PURCHASE_DENIED = "Пожалуйста, обратитесь в службу поддержки.";
BLIZZARD_STORE_ERROR_PARENTAL_CONTROLS = "Эта функция отключена системой родительского контроля.";
BLIZZARD_STORE_ERROR_TITLE_ALREADY_OWNED = "Уже имеется";
BLIZZARD_STORE_ERROR_TITLE_BATTLEPAY_DISABLED = "Ошибка магазина";
BLIZZARD_STORE_ERROR_TITLE_CLIENT_RESTRICTED = "Возможность совершать покупки ограничена";
BLIZZARD_STORE_ERROR_TITLE_CONSUMABLE_TOKEN_OWNED = "Ошибка магазина";
BLIZZARD_STORE_ERROR_TITLE_INSUFFICIENT_BALANCE = "Недостаточно средств на счете";
BLIZZARD_STORE_ERROR_TITLE_OTHER = "Ошибка магазина";
BLIZZARD_STORE_ERROR_TITLE_PARENTAL_CONTROLS = "Покупка невозможна.";
BLIZZARD_STORE_ERROR_TITLE_PAYMENT = "Ошибка оплаты";
BLIZZARD_STORE_ERROR_TITLE_PURCHASE_DENIED = "Невозможно купить.";
BLIZZARD_STORE_ERROR_UNAVAILABLE = "Магазин в данный момент недоступен.";


ナイト&fromwiki=東方プレシャス流星少女">	04:27

	编曲	REDALiCE，RoughSketch

	演唱	イザベル

	作词	はかせ

	原曲
メイガスナイト

妖精大战争　～ 东方三月精

04	文々。新聞 ～ペロぺろチュっちゅ増刊号～<a rel="nofollow" class="external text" href="https://cd.thwiki.cc?arrange=minami&vocal=ピクピクン，minami&lyric=ピクピクン&ogmusic=無間の鐘　～


 the day (Only when [ManualVehicleEngineAndLights](ManualVehicleEngineAndLights) is enabled).

:::

## Related Functions

- [GetVehicleParamsEx](GetVehicleParamsEx): Get a vehicle's parameters.
- [SetVehicleParamsForPlayer](SetVehicleParamsForPlayer): Set the parameters of a vehicle for a player.
- [UpdateVehicleDamageStatus](UpdateVehicleDamageStatus): Update the vehicle damage.
---
title: GetSVarsUpperIndex
sidebar_label: GetSVarsUpperIndex
description: Each SVar (server-variable) has its own unique identification number for lookup, this function returns the highest ID.
tags: ["server variable", "svar"]
---

## Description

Each SVar (server-variable) has its own unique identification number for lookup, this function returns the highest ID.

## Examples

```c
// Store the upper index in the variable 'SVarUpperIndex' + 1
new SVarUpperIndex = GetSVarsUpperIndex() + 1;

// This sVarCount variable will store how many sVars are set as we count them.
new sVarCount;

new sVarName[128];

for(new i = 0; i != sVarUpperIndex; i++) // Loop through all sVar IDs under the upper index
{
    // At first, we need to get SVar name
    GetSVarNameAtIndex(i, sVarName, sizeof(sVarName));

    // If the var is set (type not 0), increment sVarCount.
    if (GetSVarType(sVarName) != 0)
    {
        sVarCount ++;
    }
}

printf("There are %i server-variables set. Upper index (highest ID): %i.", sVarCount, SVarUpperIndex-1);
```

## Related Functions

- [GetSVarNameAtIndex](GetSVarNameAtIndex): Get the server variable's name from its index.
- [GetSVarType](GetSVarType): Get the type of the server variable.
---
title: CreatePlayerGangZone
sidebar_label: CreatePlayerGangZone
description: Create player gangzone
tags: ["player", "gangzone", "playergangzone"]
---

<VersionWarn version='omp v1.1.0.2612' />

## Description

Create player gangzone. This can be used as a way around the global gangzone limit.

| Name       | Description                                                       |
| ---------- | ----------------------------------------------------------------- |
| playerid   | The ID of the player to whom the player gangzone will be created. |
| Float:minX | The X coordinate for the west side of the player gangzone.        |
| Float:minY | The Y coordinate for the south side of the player gangzone.       |
| Float:maxX | The X coordinate for the east side of the player gangzone.        |
| Float:maxY | The Y coordinate for the north side of the player gangzone.       |

## Returns

The ID of the created player gangzone, returns **-1** if not created

## Examples

```c
// This variable is used to store the id of the gangzone
// so that we can use it throught the script
new gGangZoneID[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    // Create the gangzone
    gGangZoneID[playerid] = CreatePlayerGangZone(playerid, 2236.1475, 2424.7266, 2319.1636, 2502.4348);
}
```

```
                          MaxY
                          v
             -------------* < MaxX
             |            |
             |  gangzone  |
             |   center   |
             |            |
      MinX > *-------------
             ^
             MinY
```

## Notes

:::warning

- There is a limit of 1024 gangzones.
- Putting the parameters in the wrong order results in glitchy behavior.

:::

:::tip

This function merely CREATES the gangzone, you must use [PlayerG


oid GenerateAlliesAndEnemies()
    {
        Model.Encounters.Insert(0, EncounterGenerator.GenerateAlliesAndEnemies(new Dice(), Model));
    }

    protected void GenerateMission()
    {
        Model.Encounters.Insert(0, EncounterGenerator.GenerateMission(new Dice(), Model));
    }

    protected void GenerateNpc()
    {
        Model.Encounters.Insert(0, EncounterGenerator.GenerateNpc(new Dice(), Model, Model.CareerType, Model.NpcCount));
    }

    protected void GeneratePatron()
    {
        Model.Encounters.Insert(0, EncounterGenerator.GeneratePatron(new Dice(), Model));
    }

    protected override void Initialized()
    {
        Model.SpeciesAndFactionsList = CharacterBuilder.FactionsAndSpecies;
    }

    protected void MetropolisStarportGeneralEncounter()
    {
        Model.Encounters.Insert(0, EncounterGenerator.MetropolisStarportGeneralEncounter(new Dice(), Model));
    }

    protected void MetropolisStarportSignificantEncounter()
    {
        Model.Encounters.Insert(0, EncounterGenerator.MetropolisStarportSignificantEncounter(new Dice(), Model));
    }
}


Classes() && Plugins[i])
	{
		return Plugins[i]();
	}
	else
	{
		return NULL;
	}
}

CORE_EXPORT_DECL void LibInit()
{
}

ParaEngine::IParaEngineCore* g_pCoreInterface = NULL;
ParaEngine::IParaEngineCore* GetCoreInterface()
{
	return g_pCoreInterface;
}

CORE_EXPORT_DECL void LibInitParaEngine(ParaEngine::IParaEngineCore* pCoreInterface)
{
	g_pCoreInterface = pCoreInterface;
}

CORE_EXPORT_DECL void LibActivate(int nType, void* pVoid)
{
	if(nType == ParaEngine::PluginActType_STATE)
	{
		OUTPUT_LOG("You just activated: %s\n", LibDescription());
	}
}

#ifdef WIN32
BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
#else
void __attribute__ ((constructor)) DllMain()
#endif
{
	// TODO: dll start up code here
#ifdef WIN32
	Instance = hinstDLL;				// Hang on to this DLL's instance handle.
	return (TRUE);
#endif
}
//-----------------------------------------------------------------------------
// Copyright (C) 2004 - 2009 ParaEngine Corporation, All Rights Reserved.
// Author: LiXizhi
// Date:	2009.7
// Desc: Cross platformed NPL Mono plugin for ParaEngine
//-----------------------------------------------------------------------------
#include "NPLMono.h"

// ParaEngine includes
#include "PluginAPI.h"
#include "IParaEngineApp.h"

#include "MonoScriptingState.h"
#include "NPLMonoInterface.h"
#include "NPLMonoInterface_Bind.h"
#ifdef WIN32
// #include <mono/metadata/threads.h>
#endif
using namespace ParaEngine;
ParaEngine::Mutex g_mutex;
MonoDomain *	CMonoScriptingState::s_mono_domain = NULL;

//////////////////////////////////////////////////////////////////////////
//
// GlobalAssembliesPool
//
//////////////////////////////////////////////////////////////////////////

GlobalAssembliesPool::GlobalAssembliesPool()
:m_mono_domain(NULL)
{

}
GlobalAssembliesPool::~GlobalAssembliesPool()
{
	// safe delete all reference data
	Assembly_File_Map_Type::iterator itCur, itEnd = m_assemblies.end();
	for(itCur = m_assemblies.begin(); itCur != itEnd; ++itCur)
	{
		AssemblyFile* pAssembly = itCur->second;
		if(pAssembly)
		{
			Class_Map_Type::iterator itCur1, itEnd1 = pAssembly->m_classes.end();
			for(itCur1 = pAssembly->m_classes.begin(); itCur1 != itEnd1; ++itCur1)
			{
				ClassObject* pObject =  itCur1->second;
				if(pObject)
					delete pObject;
			}
			pAssembly->m_classes.clear();
			if(pAssembly)
				delete pAssembly;
		}
	}
	m_assemblies.clear();
}

GlobalAssembliesPool& GlobalAssembliesPool::GetSingleton()
{
	static GlobalAssembliesPool s_instance;
	return s_instance;
}

ClassObject* GlobalAssembliesPool::GetClass(const string& filePath)
{
	ParaEngine::Mutex::ScopedLock lock_(m_mutex);

	if(GetMonoDomain() == NULL)
	{
		APP_LOG("warning: NPLMono domain is not initialized");
		return NULL;
	}

	int nLastSlash = filePath.find_last_of('/');
	if(nLastSlash!=string::npos)
	{
		string assembly_file_name = filePath.substr(0, nLastSlash);
		int nLastDot = filePath.find_last_of('.');
		if(nLastDot!=string::npos && nLastSlash<nLastDot)
		{
			string full_class_name = filePath.substr(nLastSlash+1, nLastDot - nLastSlash-1);

			// Load the assembly_file_name if


#!/usr/bin/env python3

# <xbar.title>Todoist Today</xbar.title>
# <xbar.version>v2.2.0</xbar.version>
# <xbar.author>K.Kobayashi, et al</xbar.author>
# <xbar.author.github>kobayashi,gingerbeardman</xbar.author.github>
# <xbar.desc>Today's task in your menu bar!</xbar.desc>
# <xbar.dependencies>python</xbar.dependencies>
# <xbar.image>http://i.imgur.com/f37VtAg.png</xbar.image>

import sys
from urllib.request import urlopen, Request
from urllib.parse import urlencode
import json
import datetime

api_key = ''
url = 'https://api.todoist.com/sync/v8/sync'
value = { 'token': api_key, 'sync_token': '*', 'resource_types': '["all"]' }
data = urlencode(value).encode('utf-8')

d = datetime.datetime.today()
today = d.strftime("%Y-%m-%d")
comment = "Today's task: "

if len(api_key) == 0:
    print("set api first")
else:
    try:
        request = Request(url, data)
        r = urlopen(request)
        j = json.loads(r.read())
        items = j['items']
        for item in items:
            if (item['due']):
                due = item['due']['date'] # due date of a task
                if (due.startswith(today)):
                    if ("T" in due):
                        time = "@%s " % due[-8:-3]
                    else:
                        time = ""
                    print((comment + time + item['content']).encode('utf-8'))
    finally:
        r.close()


0-9-]*[a-z0-9])?")]),
      'phone' : new FormControl('', Validators.required),
      'gender': new FormControl('Male')
      });

  }

  onSubmitDD(){
    console.log(this.myForm);
  }

}
enum Types {
  'String',
  'Object',
  'Module',
  'Boolean',
  'AsyncFunction',
  'Date',
  'RegExp',
}
const { toString } = Object.prototype;
const typeChecker = (type: keyof typeof Types) => (value: any) =>
  toString.call(value) === `[object ${type}]`;

const isString = typeChecker('String');

const isArray = (value: any[]) => Array.isArray(value);

const isObject = typeChecker('Object');

const isEsModule = typeChecker('Module');

const isBoolean = typeChecker('Boolean');

const isAsyncFunction = typeChecker('AsyncFunction');

const isFunction = (value: any) => typeof value === 'function';

const isDate = typeChecker('Date');

const isNumber = (value: any) =>
  toString.call(value) === '[object Number]' &&
  !Number.isNaN(value) &&
  Number.isFinite(value);

const isInteger = (value: any) => Number.isInteger(value);

const isRegExp = typeChecker('RegExp');

const notEmptyStr = (value: any) => isString(value) && !/^\s*$/u.test(value);

const isEmptyStr = (value: any) => isString(value) && /^\s*$/u.test(value);

const notEmptyArray = (value: any) => isArray(value) && value.length > 0;

const isEmptyArray = (value: any) => isArray(value) && value.length === 0;

const notEmptyObject = (value: any) =>
  isObject(value) && Object.keys(value).length > 0;

const isEmptyObject = (value: any) =>
  isObject(value) && Object.keys(value).length === 0;

const isTypedArray = (value: any) =>
  /^\[object (?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)Array\]$/u.test(
    toString.call(value),
  );

export {
  isNumber,
  isInteger,
  isString,
  isBoolean,
  isObject,
  isArray,
  isDate,
  isEsModule,
  isFunction,
  isAsyncFunction,
  isTypedArray,
  isRegExp,
  notEmptyStr,
  notEmptyArray,
  notEmptyObject,
  toString,
  isEmptyStr,
  isEmptyArray,
  isEmptyObject,
};
import { Injectable } from '@angular/core';

@Injectable()
export class Util {

  /**
   * Formatta una data nel formato dd/MM
   */
  formatTimesliceDate(t) {
    const tdate = new Date(t);
    const day = tdate.getUTCDate() < 10 ? ('0' + tdate.getUTCDate()) : tdate.getUTCDate();
    const month = tdate.getUTCMonth() < 9 ? ('0' + (tdate.getUTCMonth() + 1)) : tdate.getUTCMonth() + 1;
    return tdate.getFullYear() + '' + month + '' + day;
  }

  /**
   * Formatta una data nel formato dd/MM
   */
  formatTimesliceTime(t) {
    const tdate = new Date(t);
    const hours = tdate.getUTCHours() < 10 ? ('0' + tdate.getUTCHours()) : tdate.getUTCHours();
    const minutes = tdate.getUTCMinutes() < 10 ? ('0' + tdate.getUTCMinutes()) : tdate.getUTCMinutes();
    return hours + '' + minutes;
  }
}
import { Schema } from "../schema"
import { check_is_string } from "../validator/string/is_string"
import { check_regex_pattern } from "../validator/string/regex"
impo


499_D(o, s, l)
# define BOOST_PP_LIST_FOLD_RIGHT_500(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_500_D(o, s, l)
# define BOOST_PP_LIST_FOLD_RIGHT_501(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_501_D(o, s, l)
# define BOOST_PP_LIST_FOLD_RIGHT_502(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_502_D(o, s, l)
# define BOOST_PP_LIST_FOLD_RIGHT_503(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_503_D(o, s, l)
# define BOOST_PP_LIST_FOLD_RIGHT_504(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_504_D(o, s, l)
# define BOOST_PP_LIST_FOLD_RIGHT_505(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_505_D(o, s, l)
# define BOOST_PP_LIST_FOLD_RIGHT_506(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_506_D(o, s, l)
# define BOOST_PP_LIST_FOLD_RIGHT_507(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_507_D(o, s, l)
# define BOOST_PP_LIST_FOLD_RIGHT_508(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_508_D(o, s, l)
# define BOOST_PP_LIST_FOLD_RIGHT_509(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_509_D(o, s, l)
# define BOOST_PP_LIST_FOLD_RIGHT_510(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_510_D(o, s, l)
# define BOOST_PP_LIST_FOLD_RIGHT_511(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_511_D(o, s, l)
# define BOOST_PP_LIST_FOLD_RIGHT_512(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_512_D(o, s, l)
#
# define BOOST_PP_LIST_FOLD_RIGHT_257_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(258, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_258, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l))
# define BOOST_PP_LIST_FOLD_RIGHT_258_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(259, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_259, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l))
# define BOOST_PP_LIST_FOLD_RIGHT_259_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(260, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_260, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l))
# define BOOST_PP_LIST_FOLD_RIGHT_260_D


() && m_iCoastalTradeRoutes > 0)
		{
			return 0;
		}
		else if (!isNegativeTrait() && m_iCoastalTradeRoutes < 0)
		{
			return 0;
		}
	}
	return m_iCoastalTradeRoutes;
}

int CvTraitInfo::getGlobalPopulationgrowthratepercentage() const
{
	if (GC.getGame().isOption(GAMEOPTION_LEADER_PURE_TRAITS))
	{
		if (isNegativeTrait() && m_iGlobalPopulationgrowthratepercentage < 0)
		{
			return 0;
		}
		else if (!isNegativeTrait() && m_iGlobalPopulationgrowthratepercentage > 0)
		{
			return 0;
		}
	}
	return m_iGlobalPopulationgrowthratepercentage;
}

int CvTraitInfo::getCityStartCulture(bool bForLoad) const
{
	if (!bForLoad && GC.getGame().isOption(GAMEOPTION_CULTURE_1_CITY_TILE_FOUNDING))
	{
		return 0;
	}
	if (GC.getGame().isOption(GAMEOPTION_LEADER_PURE_TRAITS))
	{
		if (isNegativeTrait() && m_iCityStartCulture > 0)
		{
			return 0;
		}
		else if (!isNegativeTrait() && m_iCityStartCulture < 0)
		{
			return 0;
		}
	}
	return m_iCityStartCulture;
}

int CvTraitInfo::getGlobalAirUnitCapacity() const
{
	if (GC.getGame().isOption(GAMEOPTION_LEADER_PURE_TRAITS))
	{
		if (isNegativeTrait() && m_iGlobalAirUnitCapacity > 0)
		{
			return 0;
		}
		else if (!isNegativeTrait() && m_iGlobalAirUnitCapacity < 0)
		{
			return 0;
		}
	}
	return m_iGlobalAirUnitCapacity;
}

int CvTraitInfo::getCapitalXPModifier() const
{
	if (GC.getGame().isOption(GAMEOPTION_LEADER_PURE_TRAITS))
	{
		if (isNegativeTrait() && m_iCapitalXPModifier > 0)
		{
			return 0;
		}
		else if (!isNegativeTrait() && m_iCapitalXPModifier < 0)
		{
			return 0;
		}
	}
	return m_iCapitalXPModifier;
}

int CvTraitInfo::getHolyCityofStateReligionXPModifier() const
{
	if (GC.getGame().isOption(GAMEOPTION_LEADER_PURE_TRAITS))
	{
		if (isNegativeTrait() && m_iHolyCityofStateReligionXPModifier > 0)
		{
			return 0;
		}
		else if (!isNegativeTrait() && m_iHolyCityofStateReligionXPModifier < 0)
		{
			return 0;
		}
	}
	return m_iHolyCityofStateReligionXPModifier;
}

int CvTraitInfo::getHolyCityofNonStateReligionXPModifier() const
{
	if (GC.getGame().isOption(GAMEOPTION_LEADER_PURE_TRAITS))
	{
		if (isNegativeTrait() && m_iHolyCityofNonStateReligionXPModifier > 0)
		{
			return 0;
		}
		else if (!isNegativeTrait() && m_iHolyCityofNonStateReligionXPModifier < 0)
		{
			return 0;
		}
	}
	return m_iHolyCityofNonStateReligionXPModifier;
}

int CvTraitInfo::getBonusPopulationinNewCities() const
{
	if (GC.getGame().isOption(GAMEOPTION_LEADER_PURE_TRAITS))
	{
		if (isNegativeTra


 details of multiple applications.

    let pdf = await pdfjs.getDocument({ data: buffer, disableFontFace: true, ignoreErrors: true });
    for (let pageIndex = 0; pageIndex < pdf.numPages; pageIndex++) {
        console.log(`Reading and parsing applications from page ${pageIndex + 1} of ${pdf.numPages}.`);
        let page = await pdf.getPage(pageIndex + 1);

        // Construct a text element for each item from the parsed PDF information.

        let textContent = await page.getTextContent();
        let viewport = await page.getViewport(1.0);
        let elements: Element[] = textContent.items.map(item => {
            let transform = pdfjs.Util.transform(viewport.transform, item.transform);

            // Work around the issue https://github.com/mozilla/pdf.js/issues/8276 (heights are
            // exaggerated).  The problem seems to be that the height value is too large in some
            // PDFs.  Provide an alternative, more accurate height value by using a calculation
            // based on the transform matrix.

            let workaroundHeight = Math.sqrt(transform[2] * transform[2] + transform[3] * transform[3]);
            return { text: item.str, x: transform[4], y: transform[5], width: item.width, height: workaroundHeight };
        });

        // Sort the elements by Y co-ordinate and then by X co-ordinate.

        let elementComparer = (a, b) => (a.y > b.y) ? 1 : ((a.y < b.y) ? -1 : ((a.x > b.x) ? 1 : ((a.x < b.x) ? -1 : 0)));
        elements.sort(elementComparer);

        // Group the elements into sections based on where the "Valuation Num:" text starts (and
        // any other element the "Valuation Num:" elements line up with horizontally with a margin
        // of error equal to about half the height of the "Valuation Num:" text).

        let applicationElementGroups = [];
        let startElements = findStartElements(elements);
        for (let index = 0; index < startElements.length; index++) {
            // Determine the highest Y co-ordinate of this row and the next row (or the bottom of
            // the current page).  Allow some leeway vertically (add some extra height).

            let startElement = startElements[index];
            let raisedStartElement: Element = {
                text: startElement.text,
                confidence: startElement.confidence,
                x: startElement.x,
                y: startElement.y - startElement.height / 2,  // leeway
                width: startElement.width,
                height: startElement.height };
            let rowTop = getRowTop(elements, raisedStartElement);
            let nextRowTop = (index + 1 < startElements.length) ? getRowTop(elements, startElements[index + 1]) : Number.MAX_VALUE;

            // Extract all elements between the two rows.

            applicationElementGroups.push({ startElement: startElements[index], elements: elements.filter(element => element.y >= rowTop && element.y + element.height < nextRowTop) });
        }

        // Parse the development application from each group of elements (ie. a section of the
        // current page of the PDF document).  If the same application number is encountered a
        // second time add a suffix to the application number so it is unique (and so will be
        // inserted into the database later instead of being ignored).

        for (let applicationElementGroup of applicationElementGroups) {
            let developmentApplication = parseApplicationElements(applicationElementGroup.elements, applicationElementGroup.startElement, url);
            if (developmentApplication !== undefined) {
                let suffix = 0;
                let applicationNumber = developmentApplication.applicationNumber;
                while (developmentApplications.some(otherDevelopmentApplication => otherDevelopmentApplication.applicationNumber === developmentApplication.applicationNumber))


FAIL( ".A={",    "Error #1002" );

    // Invalid declarations
    TEST_PARSE_FAIL( ".A=(",    "Error #1017" );
    TEST_PARSE_FAIL( ".A=]",    "Error #1017" );
    TEST_PARSE_FAIL( ".A=}",    "Error #1017" );

    // Invalid operations
    TEST_PARSE_FAIL( ".A<5",    "Error #1034" );
    TEST_PARSE_FAIL( ".A>5",    "Error #1034" );
    TEST_PARSE_FAIL( ".A<=5",   "Error #1034" );
    TEST_PARSE_FAIL( ".A>=5",   "Error #1034" );
    TEST_PARSE_FAIL( ".A!=5",   "Error #1034" );
    TEST_PARSE_FAIL( ".A==5",   "Error #1034" );

    // Dynamic variables (lhs)
    TEST_PARSE_OK( ".A = 'B'\n"
                   ".'$A$' = 'C'\n" );
    TEST_PARSE_OK( ".A = 'B'\n"
                   ".'Thing$A$' = 'C'\n" );

    // Dynamic variables (rhs)
    TEST_PARSE_OK( ".A = 'A'\n"
                   ".X = .'$A$'" );
    TEST_PARSE_OK( ".A = 'A'\n"
                   ".X = { .'$A$' }" );

    // Invalid dynamic variables (lhs)
    TEST_PARSE_FAIL( ".'$A$' = 'String'",   "Error #1009 - Unknown variable" );

    // Invalid dynamic variables (rhs)
    TEST_PARSE_FAIL( ".A = .'$B$'",         "Error #1009 - Unknown variable" );
    TEST_PARSE_FAIL( ".A = 'B'\n"
                     ".X = .'$A$'",         "Error #1009 - Unknown variable" );
    TEST_PARSE_FAIL( ".A = 'B'\n"
                     ".X = { .'$A$' }",     "Error #1009 - Unknown variable" );
}

// Functions
//------------------------------------------------------------------------------
void TestBFFParsing::Functions() const
{
    TEST_PARSE_FAIL( "If",          "Error #1023" );
    TEST_PARSE_FAIL( "If(",         "Error #1002" );
    TEST_PARSE_FAIL( "If{",         "Error #1023" );
    TEST_PARSE_FAIL( "Settings",    "Error #1024" );
    TEST_PARSE_FAIL( "Settings(",   "Error #1021" );
    TEST_PARSE_FAIL( "Settings{",   "Error #1002" );
}

// ErrorRowAndColumn
//------------------------------------------------------------------------------
void TestBFFParsing::ErrorRowAndColumn() const
{
    // Ensure error row/column indices are as expected
    // (indices are 1-based)

    // Normal with/without whitespace
    TEST_PARSE_FAIL( "X",           "(1,1)" );
    TEST_PARSE_FAIL( " X",          "(1,2)" );
    TEST_PARSE_FAIL( "    X",       "(1,5)" );

    // Tabs
    TEST_PARSE_FAIL( "\tX",         "(1,2)" );
    TEST_PARSE_FAIL( "\t\tX",       "(1,3)" );
    TEST_PARSE_FAIL( " \tX",        "(1,3)" );

    // Line endings
    TEST_PARSE_FAIL( "\n\nX",       "(3,1)" ); // \n line endings
    TEST_PARSE_FAIL( "\r\rX",       "(3,1)" ); // \r line endings
    TEST_PARSE_FAIL( "\r\n\r\nX",   "(3,1)" ); // \r\n line endings
    TEST_PARSE_FAIL( "\n\r\nX",     "(3,1)" ); // mixed line endings
    TEST_PARSE_FAIL( "\r\n\nX",     "(3,1)" ); // mixed line endings
}

// ForEach
//------------------------------------------------------------------------------
void TestBFFParsing::ForEach() const
{
    // Simple Loop
    TEST_PARSE_OK( ".Array1 = { 'A', 'B' }\n"
                   "ForEach( .A in .Array1 )"
                   "{}" );

    // Dual Loop
    // - Without comma separator
    TEST_PARSE_OK( ".Array1 = { 'A', 'B' }\n"
                   ".Array2 = { 'A', 'B' }\n"
                   "ForEach( .A in .Array1"


hl bX
        res.y.v = a.y.v shl bY
        res.z.v = a.z.v shl bZ
        return res
    }

    fun shr(res: Vec3ui, a: Vec3ui, bX: Uint, bY: Uint, bZ: Uint): Vec3ui {
        res.x.v = a.x.v ushr bX.v
        res.y.v = a.y.v ushr bY.v
        res.z.v = a.z.v ushr bZ.v
        return res
    }

    fun shr(res: Vec3ui, a: Vec3ui, bX: Int, bY: Int, bZ: Int): Vec3ui {
        res.x.v = a.x.v ushr bX
        res.y.v = a.y.v ushr bY
        res.z.v = a.z.v ushr bZ
        return res
    }

    fun inv(res: Vec3ui, a: Vec3ui): Vec3ui {
        res.x.v = a.x.v.inv()
        res.y.v = a.y.v.inv()
        res.z.v = a.z.v.inv()
        return res
    }
}

// -- Specific binary arithmetic operators --

infix operator fun Uint.plus(b: Vec3ui) = plus(Vec3ui(), b, this, this, this)
fun Uint.plus(b: Vec3ui, res: Vec3ui) = plus(res, b, this, this, this)
infix fun Uint.plusAssign(b: Vec3ui) = plus(b, b, this, this, this)

infix operator fun Uint.minus(b: Vec3ui) = minus(Vec3ui(), this, this, this, b)
fun Uint.minus(b: Vec3ui, res: Vec3ui) = minus(res, b, this, this, this)
infix fun Uint.minusAssign(b: Vec3ui) = minus(b, this, this, this, b)

infix operator fun Uint.times(b: Vec3ui) = times(Vec3ui(), b, this, this, this)
fun Uint.times(b: Vec3ui, res: Vec3ui) = times(res, b, this, this, this)
infix fun Uint.timesAssign(b: Vec3ui) = times(b, b, this, this, this)

infix operator fun Uint.div(b: Vec3ui) = div(Vec3ui(), this, this, this, b)
fun Uint.div(b: Vec3ui, res: Vec3ui) = div(res, b, this, this, this)
infix fun Uint.divAssign(b: Vec3ui) = div(b, this, this, this, b)

infix operator fun Uint.rem(b: Vec3ui) = rem(Vec3ui(), this, this, this, b)
fun Uint.rem(b: Vec3ui, res: Vec3ui) = rem(res, b, this, this, this)
infix fun Uint.remAssign(b: Vec3ui) = rem(b, this, this, this, b)

infix operator fun Int.plus(b: Vec3ui) = plus(Vec3ui(), b, this, this, this)
fun Int.plus(b: Vec3ui, res: Vec3ui) = plus(res, b, this, this, this)
infix fun Int.plusAssign(b: Vec3ui) = plus(b, b, this, this, this)

infix operator fun Int.minus(b: Vec3ui) = minus(Vec3ui(), this, this, this, b)
fun Int.minus(b: Vec3ui, res: Vec3ui) = minus(res,


d->add_rect_filled_multicolor(saturation, {color::white(), fake_color, fake_color, color::white()});

	// saturation
	d->add_rect_filled_multicolor(saturation, {color::black_transparent(), color::black_transparent(), color::black(), color::black()});

	const auto sb_grip_pos = saturation.tl() + vec2{fake_saturation * saturation.width(), (1.f - fake_brightness) * saturation.height()};
	const auto sb_grip_color = std::clamp(std::max((1.f - fake_brightness), fake_saturation), 0.f, 1.f);

	const auto old_clip = d->g.clip_rect;
	d->override_clip_rect(saturation);
	d->g.anti_alias = true;
	d->add_circle(sb_grip_pos, 3.f, color(sb_grip_color, sb_grip_color, sb_grip_color), 36, 1.f, 2.f);
	d->g.clip_rect = old_clip;

	// apply fake rounding
	d->add_fake_rounding(saturation, colors.bg_block, 4.f);
	d->add_rect_rounded(saturation.expand(1.f), colors.outline, 4.f);
	d->g.anti_alias = false;

	// --- hue ---
	const std::vector<color> hue_parts = {color(255, 0, 0), color(255, 255, 0), color(0, 255, 0), color(0, 255, 255), color(0, 0, 255), color(255, 0, 255),
										  color(255, 0, 0)};

	d->add_shadow_rect(hue, 4.f);

	const auto part_height = hue.height() / (hue_parts.size() - 1);
	for (auto i = 0; i < hue_parts.size() - 1; i++)
	{
		const auto &p = hue_parts[i];
		const auto &n = hue_parts[i + 1];

		d->add_rect_filled_multicolor(hue.translate({0.f, i * part_height}).height(part_height), {p, p, n, n});
	}

	d->g.anti_alias = true;
	d->add_fake_rounding(hue, colors.bg_block, 4.f);
	d->add_rect_rounded(hue.expand(1.f), colors.outline, 4.f);
	d->g.anti_alias = false;

	const auto hue_grip_pos = hue.tl() + vec2{-2.f, std::clamp((fake_hue / 360.f) * hue.height(), 0.f, hue.height() - 1)};
	const auto hue_grip_rect = rect(hue_grip_pos).size({hue.width() + 4.f, 2.f});

	d->add_shadow_rect(hue_grip_rect, 4.f);
	d->add_rect_filled(hue_grip_rect, colors.text_light);

	// --- alpha ---
	if (allow_alpha)
	{
		d->add_shadow_rect(alpha, 4.f);
		d->add_rect_filled_multicolor(alpha, {value->mod_a(0.f), value, value, value->mod_a(0.f)});

		d->g.anti_alias = true;
		d->add_fake_rounding(alpha, colors.bg_block, 4.f);
		d->add_rect_rounded(alpha.expand(1.f), colors.outline, 4.f);
		d->g.anti_alias = false;

		const auto alpha_grip_pos = alpha.tl() + vec2{std::clamp(value->value.a * alpha.width(), 0.f, alpha.width() - 1), -2.f};
		const auto alpha_grip_rect = rect(alpha_grip_pos).size({2.f, alpha.heigh


strtVexInfo == nullptr){
                dijStart->setValue("Run dijkstra first");
                dijPrev->setValue("Run dijkstra first");
                dijDistance->setValue("Infinite");
            }
            else{
                dijStart->setValue(g->GetInfoOf(view->selectedVex())->strtVexInfo->gVex->Text());
                if(g->GetInfoOf(view->selectedVex())->preVexID == -1)
                    dijPrev->setValue("This vex");
                else
                    dijPrev->setValue(g->GetInfoOf(g->GetInfoOf(view->selectedVex())->preVexID)->gVex->Text());
                dijDistance->setValue(g->GetInfoOf(view->selectedVex())->distance == 2147483647 ? "Infinite" : QString::asprintf("%d", g->GetInfoOf(view->selectedVex())->distance));
            }
        }
        else if(type == MyGraphicsLineItem::Type){
            defInfoPage->hide();
            vexInfoPage->hide();
            arcInfoPage->show();
            arcWeight->setValue(view->selectedArc()->weightText() == "" ? "1" : view->selectedArc()->weightText());
            arcStart->setValue(view->selectedArc()->stVex()->Text());
            arcEnd->setValue(view->selectedArc()->edVex()->Text());
        }
        else{
            vexInfoPage->hide();
            arcInfoPage->hide();
            defInfoPage->show();
            vexNumText->setValue(QString::asprintf("%d",view->vexNum));
            arcNumText->setValue(QString::asprintf("%d",view->arcNum));
        }
    });
    connect(textTag, &textInputItem::textEdited, this, [=](QString text){
        logDisplay->addWidget(new viewLog("[Vex] | Rename \""+view->selectedVex()->Text()+"\" to \""+text+"\""));
        if(view->selectedVex() != nullptr)
            view->selectedVex()->setText(text);
        if(g->GetInfoOf(view->selectedVex())->strtVexInfo != nullptr){
            dijStart->setValue(g->GetInfoOf(view->selectedVex())->strtVexInfo->gVex->Text());
            if(g->GetInfoOf(view->selectedVex())->preVexID != -1)
                dijPrev->setValue(g->GetInfoOf(g->GetInfoOf(view->selectedVex())->preVexID)->gVex->Text());
        }
    });
    connect(arcWeight, &textInputItem::textEdited, this, [=](QString text){
        logDisplay->addWidget(new viewLog("[Arc] | \""+view->selectedArc()->stVex()->Text()+"\" -> \""+view->selectedArc()->edVex()->Text()+"\" set to "+text));
        g->SetWeight(view->selectedArc(), text.toDouble());
    });
    connect(view, &MyGraphicsView::unselected, this, [=](){
        vexInfoPage->hide();
        arcInfoPage->hide();
        defInfoPage->show();
        vexNumText->setValue(QString::asprintf("%d",view->vexNum));
        arcNumText->setValue(QString::asprintf("%d",view->arcNum));
    });
    connect(startBfs, &textButton::clicked, this, [=](){
        viewLog *newLog = new viewLog("[BFS] | --- BFS start ---");
        newLog->setStyleSheet("color:#0078d4");
        logDisplay->addWidget(newLog);
        g->BFS(view->selectedVex(), generateForest);
        view->hasVisitedItem = true;
    });
    connect(startDfs, &textButton::clicked, this, [=](){
        viewLog *newLog = new viewLog("[DFS] | --- DFS start ---")


s_orderentry_boe_v1_3.modify_order_message.size(buffer, offset)

  -- Optionally add struct element to protocol tree
  if show.modify_order_message then
    local range = buffer(offset, size_of_modify_order_message)
    local display = cboe_futures_orderentry_boe_v1_3.modify_order_message.display(buffer, packet, parent)
    parent = parent:add(omi_cboe_futures_orderentry_boe_v1_3.fields.modify_order_message, range, display)
  end

  cboe_futures_orderentry_boe_v1_3.modify_order_message.fields(buffer, offset, packet, parent, size_of_modify_order_message)

  return offset + size_of_modify_order_message
end

-- Cancel Order Byte 2
cboe_futures_orderentry_boe_v1_3.cancel_order_byte_2 = {}

-- Size: Cancel Order Byte 2
cboe_futures_orderentry_boe_v1_3.cancel_order_byte_2.size = 1

-- Display: Cancel Order Byte 2
cboe_futures_orderentry_boe_v1_3.cancel_order_byte_2.display = function(buffer, packet, parent)
  local display = ""

  -- Is Cancel Order Reserved Bit 8 Exists flag set?
  if buffer:bitfield(0) > 0 then
    display = display.."Cancel Order Reserved Bit 8 Exists|"
  end
  -- Is Cancel Order Reserved Bit 7 Exists flag set?
  if buffer:bitfield(1) > 0 then
    display = display.."Cancel Order Reserved Bit 7 Exists|"
  end
  -- Is Cancel Order Reserved Bit 6 Exists flag set?
  if buffer:bitfield(2) > 0 then
    display = display.."Cancel Order Reserved Bit 6 Exists|"
  end
  -- Is Cancel Order Reserved Bit 5 Exists flag set?
  if buffer:bitfield(3) > 0 then
    display = display.."Cancel Order Reserved Bit 5 Exists|"
  end
  -- Is Cancel Order Reserved Bit 4 Exists flag set?
  if buffer:bitfield(4) > 0 then
    display = display.."Cancel Order Reserved Bit 4 Exists|"
  end
  -- Is Cancel Order Reserved Bit 3 Exists flag set?
  if buffer:bitfield(5) > 0 then
    display = display.."Cancel Order Reserved Bit 3 Exists|"
  end
  -- Is Cancel Order Reserved Bit 2 Exists flag set?
  if buffer:bitfield(6) > 0 then
    display = display.."Cancel Order Reserved Bit 2 Exists|"
  end
  -- Is Cancel Order Mass Cancel Inst Exists flag set?
  if buffer:bitfield(7) > 0 then
    display = display.."Cancel Order Mass Cancel Inst Exists|"
  end

  return display:sub(1, -2)
end

-- Dissect Bit Fields: Cancel Order Byte 2
cboe_futures_orderentry_boe_v1_3.cancel_order_byte_2.bits = function(buffer, offset, packet, parent)

  -- Cancel Order Reserved Bit 8 Exists: 1 Bit
  parent:add(omi_cboe_futures_orderentry_boe_v1_3.fields.cancel_order_reserved_bit_8_exists, buffer(offset, 1))

  -- Cancel Order Reserved Bit 7 Exists: 1 Bit
  parent:add(omi_cboe_futures_orderentry_boe_v1_3.fields.cancel_order_reserved_bit_7_exists, buffer(offset, 1))

  -- Cancel Order Reserved Bit 6 Exists: 1 Bit
  parent:add(omi_cboe_futures_orderentry_boe_v1_3.fields.cancel_order_reserved_bit_6_exists, buffer(offset, 1))

  -- Cancel Order Reserved


rror al cargar el perfil');
            }
        };

        loadProfile();
    }, [fetchProfile, setGlobalVariables]);

    // Manejo de cambios para cada campo
    const handleUsernameChange = (e) => {
        setUsername(e.target.value);
        setUsernameError(!e.target.value ? 'El usuario es requerido' : '');
    };

    const handlePhoneChange = (e) => {
        const value = e.target.value;
        setPhone(value);
        setPhoneError(!value ? 'El teléfono es requerido' : !phoneRegex.test(value) ? 'El teléfono no es válido' : '');
    };

    const handleEmailChange = (e) => {
        const value = e.target.value;
        setEmail(value);
        setEmailError(!value ? 'El correo es requerido' : !emailRegex.test(value) ? 'El correo no es válido' : '');
    };

    const handleNameChange = (e) => {
        const value = e.target.value;
        setName(value);
        setNameError(!value ? 'El nombre es requerido' : value.length < 3 || value.length > 50 ? 'El nombre debe tener entre 3 y 50 caracteres' : '');
    };

    const handleLastnameChange = (e) => {
        const value = e.target.value;
        setLastname(value);
        setLastnameError(!value ? 'El apellido es requerido' : value.length < 3 || value.length > 50 ? 'El apellido debe tener entre 3 y 50 caracteres' : '');
    };

    const handleCompanyChange = (e) => {
        const value = e.target.value;
        setCompany(value);
        setCompanyError(!value ? 'La compañía es requerida' : value.length < 3 || value.length > 50 ? 'La compañía debe tener entre 3 y 50 caracteres' : '');
    };

    const handleSubmit = async (e) => {
        e.preventDefault();
        if ([username, phone, email, name, lastname, company].some((field) => !field)) return;

        const formdata = { username, phone, email, name, lastname, company };
        const result = await updateProfile(formdata);

        if (result.success) {
            setGlobalVariables((prev) => ({ ...prev, ...formdata }));
            showSuccessAlert('Perfil actualizado exitosamente');
        } else {
            showErrorAlert(result.message || 'Error al actualizar el perfil');
            setErrorResponse(result.message);
        }
    };

    return {
        username,
        phone,
        email,
        name,
        lastname,
        company,
        usernameError,
        phoneError,
        emailError,
        nameError,
        lastnameError,
        companyError,
        errorResponse,
        loading: loadingProfile || loadingUpdate,
        handleUsernameChange,
        handlePhoneChange,
        handleEmailChange,
        handleNameChange,
        handleLastnameChange,
        handleCompanyChange,
        handleSubmit,
    };
}
import { Dialog, Transition } from '@headlessui/react';
import { Fragment, useState, useEffect } from 'react';
import { Formik, Form, Field, ErrorMessage } from 'formik';
import * as Yup from 'yup';
import IconX from '../../../components/Icon/IconX';
import Select from 'react-select';
import { HandleMode } from './SelectStyles';
import { useSelector } from 'react-redux';
import { useGetAllRolesService } from '../../../hooks/services/system/Users_services';
import { showErrorAlert, showSuccessAlert } from '../../../components/alerts/Alerts';

const validationSchema = Yup.object().shape({
    username: Yup.string().required('El nombre de usuario es requerido').max(50, 'Máximo 50 caracteres'),
    email: Yup.string().email('Correo electrónico no válido').required('Correo electrónico es requerido').max(100, 'Máximo 100 caracteres'),
    phone: Yup.string()
        .matches(/^\d+$/, 'Solo números


w BuffScriptMetaData
        {
            BuffAddType = BuffAddType.REPLACE_EXISTING,
            IsHidden = true
        };

        public StatsModifier StatsModifier { get; private set; } = new StatsModifier();

        public void OnActivate(AttackableUnit unit, Buff buff, Spell ownerSpell)
        {
            OverrideAnimation(unit, "Spell3b", "Run");
        }

        public void OnDeactivate(AttackableUnit unit, Buff buff, Spell ownerSpell)
        {
            ClearOverrideAnimation(unit, "Run");
        }
    }
}


(packet.prettyPrint(120, "  "));

        // Now repack it and make sure the bytes are the same
        ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
        try (IppOutputStream output = new IppOutputStream(bytesOut)) {
            output.write(packet);
        }
        // Compare input bytes to output bytes in hex string format for easy comparison
        assertEquals(toWrappedHexString(inputBytes), toWrappedHexString(bytesOut.toByteArray()));
    }

    private List<File> getBinFiles() {
        File printerDir = new File(getResource("printer"));
        assertTrue(printerDir.isDirectory());

        List<File> files = new ArrayList<>();
        getBinFiles(files, printerDir);
        return files;
    }

    private String getResource(String path) {
        URL url = getClass().getClassLoader().getResource(path);
        if (url != null) return url.getPath();

        // If running in AndroidStudio, manually adjust path
        url = getClass().getClassLoader().getResource(".");
        assertNotNull(url);
        return url.getPath().replace("/build/classes/java/test/", "/build/resources/test/" + path);
    }

    private void getBinFiles(List<File> files, File dir) {
        File[] foundFiles = dir.listFiles();
        if (foundFiles == null) return;
        for (File file : foundFiles) {
            if (file.isDirectory()) getBinFiles(files, file);
            else if (file.getName().endsWith(".bin")) {
                files.add(file);
            }
        }
    }

    @Test
    public void checkOne() throws IOException {
        // Try to decode some improperly encoded values:
        String path = getResource("printer/HP_OfficeJet_Pro_8710/HP_OfficeJet_Pro_8710.Get-Printer-Attributes.rsp.bin");
        System.out.println(path);
        File binFile = new File(path);
        IppInputStream input = new IppInputStream(new FileInputStream(binFile));
        IppPacket packet = input.readPacket();
        for (AttributeGroup group : packet.getAttributeGroups()) {
            if (group.getTag() == Tag.printerAttributes) {
                System.out.println(group.get("finishings-col-supported"));
                System.out.println(group.getValue(Types.finishingsColSupported));
                System.out.println(group.get("printer-finisher-description"));
                System.out.println(group.getValue(Types.printerFinisherDescription));
                System.out.println(group.get("job-pages-per-set-supported"));
                System.out.println(group.getValue(Types.jobPagesPerSetSupported));
            }
        }
    }

    @Test
    public void speedTest() throws Exception {
        for (File binFile : getBinFiles()) {
            byte[] bytes = FilesKt.readBytes(binFile);
            long nanos = System.nanoTime();
            int reps = 50;
            for (int i = 0; i < reps; i++) {
                IppInputStream in = new IppInputStream(new ByteArrayInputStream(bytes));
                in.readPacket();
                in.close();
            }
            System.out.println(((System.nanoTime() - nanos)/1000/reps) + "us for each rx of " + reps + " of " +
                    binFile.getName() + " (" + bytes.length + " bytes): ");
        }
    }
}
// © Copyright 2018 HP Development Company, L.P.
// SPDX-License-Identifier: MIT

package com.hp.jipp.trans;

import com.hp.jipp.encoding.Tag;
import com.hp.jipp.encoding.IppPacket;
import com.hp.jipp.model.Operation;
import com.hp.jipp.model.Status;
import org.jetbrains.annotations.NotNull;


(),Ka(ln)&&pe&&ze&&(Lr.vertical=Hx(zr,R.glyphMap,R.glyphPositions,R.imagePositions,Lt,sa,fe,ro,Xa,pa,yi,i.ah.vertical,!1,fr,Qt))}}let dn=!1;if(ut.icon&&ut.icon.name){let ln=R.imageMap[ut.icon.name];ln&&(ui=jx(R.imagePositions[ut.icon.name],F.get("icon-offset").evaluate(ut,{},R.canonical),F.get("icon-anchor").evaluate(ut,{},R.canonical)),dn=!!ln.sdf,R.bucket.sdfIcons===void 0?R.bucket.sdfIcons=dn:R.bucket.sdfIcons!==dn&&T("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(ln.pixelRatio!==R.bucket.pixelRatio||F.get("icon-rotate").constantOr(1)!==0)&&(R.bucket.iconsNeedLinear=!0))}let Fi=Gk(Lr.horizontal)||Lr.vertical;R.bucket.iconsInText=!!Fi&&Fi.iconsInText,(Fi||ui)&&Q9(R.bucket,ut,Lr,ui,R.imageMap,te,fr,mr,yi,dn,R.canonical)}R.showCollisionBoxes&&R.bucket.generateCollisionDebugBuffers()},i.bq=Kv,i.br=Ot,i.bs=so,i.bt=br,i.bu=tS,i.bv=class{constructor(R){this._marks={start:[R.url,"start"].join("#"),end:[R.url,"end"].join("#"),measure:R.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let R=performance.getEntriesByName(this._marks.measure);return R.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),R=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),R}},i.bw=function(R,S,F,W,te){return a(this,void 0,void 0,function*(){if(b())try{return yield H(R,S,F,W,te)}catch(fe){}return function(fe,pe,ze,Ke,ut){let Lt=fe.width,Qt=fe.height;N&&j||(N=new OffscreenCanvas(Lt,Qt),j=N.getContext("2d",{willReadFrequently:!0})),N.width=Lt,N.height=Qt,j.drawImage(fe,0,0,Lt,Qt);let fr=j.getImageData(pe,ze,Ke,ut);return j.clearRect(0,0,Lt,Qt),fr.data}(R,S,F,W,te)})},i.bx=Lk,i.by=o,i.bz=s,i.c=oe,i.d=R=>a(void 0,void 0,void 0,function*(){if(R.byteLength===0)return createImageBitmap(new ImageData(1,1));let S=new Blob([new Uint8Array(R)],{type:"image/png"});try{return createImageBitmap(S)}catch(F){throw new Error(`Could not load image because of ${F.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),i.e=L,i.f=R=>new Promise((S,F)=>{let W=new Image;W.onload=()=>{S(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>{W.src=Z})},W.onerror=()=>F(new Error("Could not load image. Please make sure to use a supported image type


  drawLabel("-Z")
        drawLabel("+X")
        drawLabel("+Z")
        drawLabel("-X")
    }

    private fun drawLabel(name: String) {
        MainFontRenderer.drawString(
            name,
            MainFontRenderer.getWidth(name, 0.8f) * -0.5f,
            -radius,
            GuiSetting.primary,
            0.8f
        )
         GlStateManager.rotate(90.0f, 0.0f, 0.0f, 1.0f)
    }

    private fun getColor(entity: EntityLivingBase): ColorRGB {
        return if (entity.isPassive || FriendManager.isFriend(entity.name)) {
            // Green
            ColorRGB(32, 224, 32, 224)
        } else if (entity.isNeutral) {
            // Yellow
            ColorRGB(255, 240, 32)
        } else {
            // Red
            ColorRGB(255, 32, 32)
        }
    }

}package io.lumstudio.yohub.runtime

import androidx.compose.runtime.*
import com.sun.jna.platform.win32.Kernel32
import com.sun.jna.platform.win32.User32
import com.sun.jna.platform.win32.WinDef
import com.sun.jna.platform.win32.WinUser
import io.lumstudio.yohub.common.sendNotice
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.usb4java.*

@Composable
fun InputDevicesWatcherWithWindows(
    onChange: () -> Unit,
    isRunning: Boolean = true
) {
    var point by remember { mutableStateOf(System.currentTimeMillis() - 1000) }
    LaunchedEffect(Unit) {
        withContext(Dispatchers.IO) {
            val user32 = User32.INSTANCE
            val hMod = Kernel32.INSTANCE.GetModuleHandle("")

            val wndClass = WinUser.WNDCLASSEX()
            wndClass.hInstance = hMod
            wndClass.lpfnWndProc =
                WinUser.WindowProc { hWnd: WinDef.HWND, msg: Int, wParam: WinDef.WPARAM, lParam: WinDef.LPARAM ->
                    if (msg == WinUser.WM_DEVICECHANGE) {
                        val millis = System.currentTimeMillis()
                        if (millis - point > 500) {
                            onChange()
                            point = millis
                        }
                    }
                    user32.DefWindowProc(hWnd, msg, wParam, lParam)
                }
            wndClass.lpszClassName = "InputDevicesWatcher"
            user32.RegisterClassEx(wndClass)
            val hWnd = user32.CreateWindowEx(
                0,
                wndClass.lpszClassName,
                "YoHubInputDevicesWatcher",
                0,
                0, 0, 0, 0,
                null,
                null,
                hMod,
                null
            )

            onChange()
            val msg = WinUser.MSG()
            while (user32.GetMessage(msg, hWnd, 0, 0) != 0 && isRunning) {
                user32.TranslateMessage(msg)
                user32.DispatchMessage(msg)
            }
        }
    }
}

@Composable
fun InputDevicesWatcherWithLinux(
    onChange: () -> Unit,
    isRunning: Boolean = true
) {
    val context by remember { mutableStateOf(Context()) }
    val handle by remember { mutableStateOf(HotplugCallbackHandle()) }

    var result = LibUsb.init(context)
    if (result != LibUsb.SUCCESS) {
        val exception = LibUsbException("Unable to initialize libusb.", result)
        sendNotice(exception::class.simpleName ?: "", exception.message?:"")


* Copyright (c) 2023-2025. Patrick Schmidt.
 * All rights reserved.
 */

import 'package:common/data/dto/config/config_file_object_identifiers_enum.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

import '../temperature_sensor_mixin.dart';
import 'heater_mixin.dart';

part 'heater_bed.freezed.dart';
part 'heater_bed.g.dart';

@freezed
class HeaterBed with _$HeaterBed, TemperatureSensorMixin, HeaterMixin {
  const HeaterBed._();

  const factory HeaterBed({
    @Default(0) double temperature,
    @Default(0) double target,
    @Default(0) double power,
  }) = _HeaterBed;

  factory HeaterBed.fromJson(Map<String, dynamic> json) =>
      _$HeaterBedFromJson(json);

  factory HeaterBed.partialUpdate(HeaterBed? current, Map<String, dynamic> partialJson) {
    HeaterBed old = current ?? HeaterBed();

    return HeaterBed.fromJson({...old.toJson(), ...partialJson});
  }

  @override
  String get name => 'heater_bed';

  @override
  ConfigFileObjectIdentifiers get kind => ConfigFileObjectIdentifiers.heater_bed;
}
/*
 * Copyright (c) 2024-2025. Patrick Schmidt.
 * All rights reserved.
 */

import 'package:common/data/dto/machine/filament_sensors/filament_motion_sensor.dart';
import 'package:common/data/dto/machine/filament_sensors/filament_switch_sensor.dart';

import '../../config/config_file_object_identifiers_enum.dart';

abstract interface class FilamentSensor {
  abstract final String name;
  abstract final bool filamentDetected;
  abstract final bool enabled;

  ConfigFileObjectIdentifiers get kind;

  factory FilamentSensor.fallback(ConfigFileObjectIdentifiers identifier, String name) {
    return switch (identifier) {
      ConfigFileObjectIdentifiers.filament_motion_sensor => FilamentMotionSensor(name: name),
      ConfigFileObjectIdentifiers.filament_switch_sensor => FilamentSwitchSensor(name: name),
      _ => throw UnsupportedError('Unknown FilamentSensor type: $identifier, can not create fallback.'),
    };
  }

  factory FilamentSensor.partialUpdate(FilamentSensor current, Map<String, dynamic> partialJson) {
    if (current is FilamentMotionSensor) {
      return FilamentMotionSensor.partialUpdate(current, partialJson);
    } else if (current is FilamentSwitchSensor) {
      return FilamentSwitchSensor.partialUpdate(current, partialJson);
    } else {
      throw UnsupportedError('The provided FilamentSensor type is not supported');
    }
  }
}
/*
 * Copyright (c) 2024-2025. Patrick Schmidt.
 * All rights reserved.
 */

import 'package:common/data/converters/double_precision_converter.dart';
import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

part 'screw_tilt_result.freezed.dart';
part 'screw_tilt_result.g.dart';

/*
      "screw4": {
        "z": 1.9753139553884536,
        "sign": "CCW",
        "adjust": "00:09",
        "is_base": false
      }

 */

@freezed
class ScrewTiltResult with _$ScrewTiltResult {
  const ScrewTiltResult._();

  @JsonSerializable(fieldRename: FieldRename.snake)
  const factory ScrewTiltResult({
    required String screw,
    @Double4Prec


// -----------------------------------------------------------------------------------------
// NVEnc by rigaya
// -----------------------------------------------------------------------------------------
//
// The MIT License
//
// Copyright (c) 2014-2016 rigaya
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
// ------------------------------------------------------------------------------------------

#pragma once

#include "NVEncFilter.h"
#include "NVEncParam.h"

class NVEncFilterParamTransform : public NVEncFilterParam {
public:
    VppTransform trans;

    NVEncFilterParamTransform() : trans() {};
    virtual ~NVEncFilterParamTransform() {};
    virtual tstring print() const override;
};

class NVEncFilterTransform : public NVEncFilter {
public:
    NVEncFilterTransform();
    virtual ~NVEncFilterTransform();
    virtual RGY_ERR init(shared_ptr<NVEncFilterParam> pParam, shared_ptr<RGYLog> pPrintMes) override;
protected:
    virtual RGY_ERR run_filter(const RGYFrameInfo *pInputFrame, RGYFrameInfo **ppOutputFrames, int *pOutputFrameNum, cudaStream_t stream) override;
    virtual void close() override;
    virtual RGY_ERR checkParam(const std::shared_ptr<NVEncFilterParamTransform> pParam);

    CUMemBuf m_weight0;
    std::array<CUMemBuf, 2> m_weight1;
};


distance
                if (StartDist > _EndDist)
                {
                    SwapEnds();
                }

                return true;
            }
            else
            {
                return false;
            }
        }

        /**
        * Sets an end as edge (starting point if none end were defined, ending point otherwise)
        *
        * @param vertex1 one of the vertices of the intercepted edge
        * @param vertex2 one of the vertices of the intercepted edge
        * @return false if all ends were already defined, true otherwise
        */
        private bool SetEdge(Vertex vertex1, Vertex vertex2)
        {
            Vector3d point1 = vertex1.Position;
            Vector3d point2 = vertex2.Position;
            Vector3d edgeDirection = new Vector3d(point2.X - point1.X, point2.Y - point1.Y, point2.Z - point1.Z);
            Line edgeLine = new Line(edgeDirection, point1);

            if (_Index == 0)
            {
                _StartVertex = vertex1;
                _StartType = EDGE;
                _StartPos = Line.ComputeLineIntersection(edgeLine);
                StartDist = Line.ComputePointToPointDistance(_StartPos);
                _MiddleType = FACE;
                _Index++;
                return true;
            }
            else if (_Index == 1)
            {
                _EndVertex = vertex1;
                _EndType = EDGE;
                _EndPos = Line.ComputeLineIntersection(edgeLine);
                _EndDist = Line.ComputePointToPointDistance(_EndPos);
                _MiddleType = FACE;
                _Index++;

                //the ending point distance should be smaller than  starting point distance
                if (StartDist > _EndDist)
                {
                    SwapEnds();
                }

                return true;
            }
            else
            {
                return false;
            }
        }

        /** Swaps the starting point and the ending point */
        private void SwapEnds()
        {
            double distTemp = StartDist;
            StartDist = _EndDist;
            _EndDist = distTemp;

            int typeTemp = _StartType;
            _StartType = _EndType;
            _EndType = typeTemp;

            Vertex vertexTemp = _StartVertex;
            _StartVertex = _EndVertex;
            _EndVertex = vertexTemp;

            Vector3d posTemp = _StartPos;
            _StartPos = _EndPos;
            _EndPos = posTemp;
        }
    }
}


28, 163, 249, 143, 154, 205, 141, 117, 87, 164, 37, 47, 226, 173, 243, 94, 253, 245, 82, 250, 226, 95, 99, 252, 219, 217, 183, 39, 223, 144, 173, 117, 93, 238, 221, 150, 232, 58, 138, 147, 86, 201, 230, 125, 228, 132, 229, 27, 207, 223, 152, 144, 88, 227, 190, 70, 227, 18, 237, 231, 88, 200, 79, 252, 205, 42, 172, 50, 200, 99, 33, 59, 80, 229, 215, 187, 7, 153, 162, 86, 132, 198, 113, 85, 116, 53, 29, 68, 7, 15, 168, 174, 128, 147, 244, 84, 240, 68, 209, 165, 95, 58, 181, 188, 69, 165, 173, 74, 98, 35, 97, 212, 79, 142, 234, 23, 76, 250, 85, 141, 115, 143, 30, 126, 182, 8, 132, 250, 194, 177, 45, 140, 196, 96, 186, 23, 123, 133, 158, 196, 199, 245, 164, 219, 61, 120, 4, 227, 86, 146, 51, 138, 204, 245, 51, 121, 45, 197, 36, 74, 79, 227, 253, 50, 52, 234, 12, 227, 213, 192, 226, 250, 124, 189, 201, 65, 219, 168, 51, 152, 176, 50, 180, 25, 231, 172, 134, 69, 111, 122, 92, 0, 81, 127, 12, 221, 107, 136, 10, 241, 162, 26, 70, 238, 144, 38, 70, 228, 52, 30, 43, 225, 99, 131, 0, 228, 48, 223, 103, 84, 243, 173, 95, 226, 113, 205, 242, 196, 202, 53, 17, 156, 32, 224, 197, 179, 16, 4, 183, 6, 250, 243, 77, 164, 182, 15, 102, 11, 240, 151, 222, 9, 208, 19, 124, 159, 223, 97, 38, 225, 222, 244, 230, 138, 126, 24, 92, 251, 81, 210, 151, 190, 180, 113, 194, 4, 55, 231, 99, 63, 61, 88, 32, 79, 200, 235, 170, 79, 244, 90, 31, 92, 239, 199, 151, 200, 11, 184, 48, 188, 230, 249, 60, 87, 9, 82, 174, 252, 162, 76, 203, 178, 212, 209, 51, 186, 251, 29, 232, 84, 209, 16, 243, 90, 254, 130, 87, 151, 132, 153, 132, 121, 161, 94, 120, 42, 28, 114, 47, 197, 238, 165, 169, 210, 37, 137, 222, 177, 114, 13, 60, 71, 215, 51, 41, 62, 66, 18, 185, 16, 137, 255, 3, 90, 189, 168, 70, 124, 25, 0, 0 }) { } }
    public class PersonPlayingWaterPolo : Emoji { public PersonPlayingWaterPolo() : base("PersonPlayingWaterPolo", EmojiSize.Size32, EmojiGroup.People_Body, EmojiSkintone.Default, EmojiStyle.Flat, new byte [] { 31, 139, 8, 0, 0, 0, 0, 0, 0, 10, 133, 154, 59, 143, 229, 198, 17, 133, 255, 202, 96, 157, 211, 236, 23, 217, 4, 36, 3, 194, 93, 9, 10, 198, 233, 4, 202, 228, 23, 36, 88, 129, 3, 1, 254, 251, 254, 206, 169, 226, 37, 239, 4, 114, 178, 123, 207, 244, 171, 222, 93, 85, 205, 111, 254, 243, 243, 239, 191, 188, 253, 227, 219, 47, 127, 173, 111, 117, 95, 142, 250, 99, 91, 151, 181, 126, 148, 185, 148, 241, 168, 199, 178, 246,


 () => {})
}

function handleUpdate() {
	const { lastAction, transport } = store.getState() as ReduxStoreType
	switch (lastAction.type) {
		case TRANSPORT_PAUSE:
			// this doesn't seem to work, not sure why
			Transport.pause('now')
			break
		case TRANSPORT_PLAY:
			console.log('▶ playing transport')
			Transport.start()
			break
		case TRANSPORT_STOP:
			console.log('⏸ stopping transport')
			Transport.stop()
			break
		case TRANSPORT_UPDATE_BPM:
			Transport.bpm.value = lastAction.bpm
			// Transport.bpm.rampTo(lastAction.bpm, '4n')
			break
		case TRANSPORT_UPDATE_TIME_SIGNATURE:
			console.log('Updating time signature to ' + lastAction.timeSignature.join(':'))
			Transport.timeSignature = lastAction.timeSignature as TimeSignature
			break
	}
}
export type FiberMapping<
  TMethod extends keyof any = string,
  TProducer extends FiberProducer<any> = any
> = Record<TMethod, TProducer>

export type FiberProducer<TArgs extends any[], TResult = any> = (
  ...args: TArgs
) => Promise<TResult>

export type InferFiberMapping<
  TFiber extends Fiber<FiberMapping>
> = TFiber extends Fiber<infer TMapping> ? TMapping : never

export type InferFiberMethods<
  TFiber extends Fiber<FiberMapping>
> = keyof InferFiberMapping<TFiber>

export type InferFiberProducer<
  TFiber extends Fiber<FiberMapping>,
  TMethod extends InferFiberMethods<TFiber>
> = TFiber extends Fiber<infer TMapping>
  ? TMethod extends keyof TMapping
    ? TMapping[TMethod]
    : never
  : never

export type InferFiberProducerArgs<
  TFiber extends Fiber<FiberMapping>,
  TMethod extends InferFiberMethods<TFiber>
> = Parameters<InferFiberProducer<TFiber, TMethod>>

export type InferFiberProducerResult<
  TFiber extends Fiber<FiberMapping>,
  TMethod extends InferFiberMethods<TFiber>
> = ReturnType<InferFiberProducer<TFiber, TMethod>>

export interface Fiber<TMapping extends FiberMapping<never>> {
  call<
    TMethod extends InferFiberMethods<Fiber<TMapping>>,
    TArgs extends InferFiberProducerArgs<Fiber<TMapping>, TMethod>,
    THandlerResult extends InferFiberProducerResult<Fiber<TMapping>, TMethod>
  >(
    method: TMethod,
    ...args: TArgs
  ): Promise<THandlerResult>
}

export type FiberFactory = <TMapping extends FiberMapping<never>>(
  mapping?: TMapping
) => Fiber<TMapping>

export type FiberClientHandler<TFiber extends Fiber<FiberMapping>> = <
  TMethod extends InferFiberMethods<TFiber>,
  TArgs extends InferFiberProducerArgs<TFiber, TMethod>
>(
  method: TMethod,
  ...args: TArgs
) => Promise<any>

export interface FiberClient<TFiber extends Fiber<FiberMapping>> {
  call<
    TMethod extends InferFiberMethods<TFiber>,
    TArgs extends InferFiberProducerArgs<TFiber, TMethod>,
    THandlerResult extends InferFiberProducerResult<TFiber, TMethod>
  >(
    method: TMethod,
    ...args: TArgs
  ): Promise<THandlerResult>
}

export type FiberClientAccessor<
  TFiber extends Fiber<FiberMapping>
> = FiberClient<TFiber> &
  {
    [TMethod in InferFiberMethods<TFiber>]: InferFiberProducer<TFiber, TMethod>
  }

export type FiberClientFactory = <TFiber extends Fiber<FiberMapping>>(
  handler:


ll after the tanh over the whole time sequence.
     */
    public final Operand<T> co;

    /**
     * The output h vector over the whole time sequence.
     */
    public final Operand<T> h;

    /**
     * The current gradient of cs.
     */
    public final Operand<T> csGrad;

    /**
     * The gradient of h vector.
     */
    public final Operand<T> hGrad;

    /**
     * Whether to use peephole weights.
     */
    public final boolean usePeephole;

    /**
     * The T attribute
     */
    public final DataType T;

    public Inputs(GraphOperation op) {
      super(new BlockLSTMGrad<>(op), op, Arrays.asList("use_peephole", "T"));
      int inputIndex = 0;
      seqLenMax = (Operand<TInt64>) op.input(inputIndex++);
      x = (Operand<T>) op.input(inputIndex++);
      csPrev = (Operand<T>) op.input(inputIndex++);
      hPrev = (Operand<T>) op.input(inputIndex++);
      w = (Operand<T>) op.input(inputIndex++);
      wci = (Operand<T>) op.input(inputIndex++);
      wcf = (Operand<T>) op.input(inputIndex++);
      wco = (Operand<T>) op.input(inputIndex++);
      b = (Operand<T>) op.input(inputIndex++);
      i = (Operand<T>) op.input(inputIndex++);
      cs = (Operand<T>) op.input(inputIndex++);
      f = (Operand<T>) op.input(inputIndex++);
      o = (Operand<T>) op.input(inputIndex++);
      ci = (Operand<T>) op.input(inputIndex++);
      co = (Operand<T>) op.input(inputIndex++);
      h = (Operand<T>) op.input(inputIndex++);
      csGrad = (Operand<T>) op.input(inputIndex++);
      hGrad = (Operand<T>) op.input(inputIndex++);
      usePeephole = op.attributes().getAttrBool("use_peephole");
      T = op.attributes().getAttrType("T");
    }
  }
}
/* Copyright 2018-2023 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=======================================================================*/

// This class has been generated, DO NOT EDIT!

package org.tensorflow.op.nn;

import java.util.Arrays;
import java.util.List;
import org.tensorflow.GraphOperation;
import org.tensorflow.Operand;
import org.tensorflow.Operation;
import org.tensorflow.OperationBuilder;
import org.tensorflow.Output;
import org.tensorflow.op.Operands;
import org.tensorflow.op.RawOp;
import org.tensorflow.op.RawOpInputs;
import org.tensorflow.op.Scope;
import org.tensorflow.op.annotation.Endpoint;
import org.tensorflow.op.annotation.OpInputsMetadata;
import org.tensorflow.op.annotation.OpMetadata;
import org.tensorflow.op.annotation.Operator;
import org.tensorflow.proto.DataType;
import org.tensorflow.types.TFloat32;
import org.tensorflow.types.family.TNumber;

/**


token"),
  anilistToken("anilist_token"),
  malToken("mal_token"),

  //auth objects
  malAuthResponse("mal_auth_response"),

  //codes
  malChallengeVerifier("mal_challenge_verifier");

  final String value;

  const SecureStorageKey(this.value);
}

enum PlayerState {
  playing,
  paused,
  buffering,
}
import 'package:animestream/core/commons/enums.dart';
import 'package:animestream/core/data/secureStorage.dart';
import 'package:animestream/core/database/database.dart';
import 'package:animestream/core/database/mal/login.dart';
import 'package:animestream/core/database/types.dart';
import 'package:http/http.dart';

class MAL extends Database {
  @override
  Future<DatabaseInfo> getAnimeInfo(int id) {
    throw UnimplementedError();
  }

  @override
  Future<List<DatabaseSearchResult>> search(String query) {
    throw UnimplementedError();
  }

  static Map<String, String>? headers = null;

  static Future<Map<String, String>> getHeader({bool refreshHeaders = false}) async {
    if(headers != null && !refreshHeaders) return headers!;
    final token = await getSecureVal(SecureStorageKey.malToken);
    final map = {
      'Authorization': "Bearer ${token}",
    };
    headers = map;
    return map;
  }

  Future<String> fetch(String url, {int recallAttempt = 0, bool refreshHeaders = false }) async {

    if(recallAttempt > 2) throw Exception("MAX RECALL DEPTH LIMIT REACHED!");

    final headers = await getHeader(refreshHeaders: refreshHeaders);
    final res = await get(Uri.parse(url), headers: headers);

    // print(res.statusCode);

    if(res.statusCode == 401) {
      await MALLogin().refreshToken();
      return await fetch(url, recallAttempt: recallAttempt+1, refreshHeaders: true);
    }

    //might have to remove this!
    if(res.statusCode != 200) {
      throw Exception("SOMETHING WRONG HAPPENED WHILE FETCHING MAL");
    }

    return res.body;
  }
}//Call the database functions from this!

import 'package:animestream/core/app/runtimeDatas.dart';
import 'package:animestream/core/database/anilist/anilist.dart';
import 'package:animestream/core/database/database.dart';
import 'package:animestream/core/database/mal/mal.dart';
import 'package:animestream/core/database/simkl/simkl.dart';
import 'package:animestream/core/database/types.dart';

class DatabaseHandler extends Database {
  DatabaseHandler({Databases? database}) {
    if (database != null) {
      this.db = database;
    }
  }

  Databases db = currentUserSettings?.database ?? Databases.anilist;

  static Database getDatabaseInstance(Databases dbs) {
    switch (dbs) {
      case Databases.anilist:
        return Anilist();
      case Databases.simkl:
        return Simkl();
      case Databases.mal:
        return MAL();
      // default:
      //   throw Exception("NOT_AN_OPTION_LIL_BRO");
    }
  }

  @override
  Future<List<DatabaseSearchResult>> search(String query) async {
    return await getDatabaseInstance(db).search(query);
  }

  @override
  Future<DatabaseInfo> getAnimeInfo(int id) async {
    return await getDatabaseInstance(d


m an array of the points corresponding
 * to the vertices of the element.
 * Each point is represented by an array of three doubles.
 *
 * @param pts     array of points
 * @param numPts  number of vertices
 *
 */
template <int SPACEDIM>
BoundingBoxT<SPACEDIM>::BoundingBoxT(const double **pts, const unsigned numPts)
{
    initializeWith(pts, numPts);
}

template <int SPACEDIM>
void
BoundingBoxT<SPACEDIM>::fillInXMinXmaxYminYmaxZminZmaxFormat(double data[2 * SPACEDIM]) const
{
    for (int i = 0; i < SPACEDIM; ++i)
    {
        data[2 * i] = this->getCoordinate(i);
        data[2 * i + 1] = this->getCoordinate(i + SPACEDIM);
    }
}

/**
 * Constructor creating box from an array of the points corresponding
 * to the vertices of the element.
 * Each point is represented by an array of three doubles.
 *
 * @param pts     array of points
 * @param numPts  number of vertices
 *
 */
template <int SPACEDIM>
void
BoundingBoxT<SPACEDIM>::initializeWith(const double **pts, const unsigned numPts)
{
    // initialize with first two points
    const double *pt0(pts[0]);

    for (int c = 0; c < SPACEDIM; ++c)
    {
        _coords[c] = pt0[c];
        _coords[c + SPACEDIM] = pt0[c];
    }

    for (unsigned i = 1; i < numPts; ++i)
    {
        updateWithPoint(pts[i]);
    }

    assert(isValid());
}

/**
 * Constructor creating box from union of two boxes, resulting in a box that encloses both of them
 *
 * @param  box1  the first box
 * @param  box2  the second box
 */
template <int SPACEDIM>
BoundingBoxT<SPACEDIM>::BoundingBoxT(const BoundingBoxT<SPACEDIM> &box1, const BoundingBoxT<SPACEDIM> &box2)
{
    for (int c = 0; c < SPACEDIM; ++c)
    {
        _coords[c] = std::min(box1._coords[c], box2._coords[c]);
        _coords[c + SPACEDIM] = std::max(box1._coords[c + SPACEDIM], box2._coords[c + SPACEDIM]);
    }

    assert(isValid());
}

/**
 * Determines if the intersection with a given box is empty
 *
 * @param    box   BoundingBox with which intersection is tested
 * @return  true if intersection between boxes is empty, false if not
 */
template <int SPACEDIM>
bool
BoundingBoxT<SPACEDIM>::isDisjointWith(const BoundingBoxT<SPACEDIM> &box) const
{
    for (int c = 0; c < SPACEDIM; ++c)
    {
        const double otherMinCoord = box.getCoordinate(c);
        const double otherMaxCoord = box.getCoordinate(c + SPACEDIM);

        // boxes are disjoint if there exists a direction in which the
        // minimum coordinate of one is greater than the maximum coordinate of the other

        // more stable version ?
        // const double tol = 1.0e-2*_coords[c];
        // if(_coords[c] > otherMaxCoord + tol
        //   || _coords[c + SPACEDIM] < otherMinCoord - tol)

        if (_coords[c] > otherMaxCoord || _coords[c + SPACEDIM] < otherMinCoord)
        {
            return true;
        }
    }
    return false;
}

/**
 * Updates the bounding box to include a given point
 *
 * @param pt    point to be included
 *
 */
template <int SPACEDIM>
void
BoundingBoxT<SPACEDIM>::updateWithPoint(const double *pt)
{
    for (int c = 0; c < SPACEDIM; ++c)
    {
        const double ptVal = pt[c];

        // update min and max coordinates
        _coords[c] = std::min(_coords[c], ptVal);
        _coords[c + SPACEDIM] = std::max(_coords[c + SPACEDIM], ptVal);
    }
}

/**
 * Checks if the box is


MathJax();
      if (isLoaded) {
        console.log('Styles loaded!')
      }

      const el = window.document.getElementById('content-text');
      if (el) {
        const options = {
          htmlTags: true
        };
        const html = window.render(text, options);
        el.outerHTML = html;
      }
    };
  </script>

<!DOCTYPE html>

  <meta charset="UTF-8">
  <title>Title</title>


// *************************************************************
// project:  graphql-aspnet
// --
// repo: https://github.com/graphql-aspnet
// docs: https://graphql-aspnet.github.io
// --
// License:  MIT
// *************************************************************

namespace GraphQL.AspNet.Benchmarks.Model
{
    using System.Collections.Generic;

    public class MusicRepository : IMusicRepository
    {
        public MusicRepository()
        {
            var edm = new MusicGenre() { Id = 1, Name = "EDM", };
            var pop = new MusicGenre() { Id = 2, Name = "Pop", };
            var rock = new MusicGenre() { Id = 3, Name = "Rock", };
            var rap = new MusicGenre() { Id = 4, Name = "Rap", };
            this.Genres = new List<MusicGenre>() { edm, pop, rock, rap };

            var sonyMusic = new RecordCompany() { Id = 1, Name = "Sony Music", };
            var emiMusic = new RecordCompany() { Id = 2, Name = "EMI Music", };
            var rbw = new RecordCompany() { Id = 3, Name = "RBW" };
            var sm = new RecordCompany() { Id = 4, Name = "SM" };
            this.Companys = new List<RecordCompany>() { sonyMusic, emiMusic, rbw, sm };

            var mamamoo = new Artist() { Id = 1, Name = "Mamamoo", RecordCompanyId = rbw.Id };
            var jackson = new Artist() { Id = 2, Name = "Michael Jackson", RecordCompanyId = sonyMusic.Id };
            var beyonce = new Artist() { Id = 3, Name = "Beyonce", RecordCompanyId = sonyMusic.Id };
            var alanWalker = new Artist() { Id = 4, Name = "Alan Walker", RecordCompanyId = sonyMusic.Id };
            var pitbull = new Artist() { Id = 5, Name = "Pitbull", RecordCompanyId = sonyMusic.Id };
            var rickyMartin = new Artist() { Id = 6, Name = "Ricky Martin", RecordCompanyId = sonyMusic.Id };
            var queen = new Artist() { Id = 7, Name = "Queen", RecordCompanyId = emiMusic.Id };
            var pinkFloyd = new Artist() { Id = 8, Name = "Pink Floyd", RecordCompanyId = emiMusic.Id };
            var ironMadien = new Artist() {


s.
    fn multiple_dgram() {
        let mut buf = [0; 65535];
        let mut s = Session::default().unwrap();
        s.handshake().unwrap();

        // We'll send default data of 10 bytes on flow ID 0.
        let result = (11, 0, 1);

        s.send_dgram_client(0).unwrap();
        s.send_dgram_client(0).unwrap();
        s.send_dgram_client(0).unwrap();

        assert_eq!(s.poll_server(), Ok((0, Event::Datagram)));
        assert_eq!(s.recv_dgram_server(&mut buf), Ok(result));
        assert_eq!(s.poll_server(), Ok((0, Event::Datagram)));
        assert_eq!(s.recv_dgram_server(&mut buf), Ok(result));
        assert_eq!(s.poll_server(), Ok((0, Event::Datagram)));
        assert_eq!(s.recv_dgram_server(&mut buf), Ok(result));
        assert_eq!(s.poll_server(), Err(Error::Done));

        s.send_dgram_server(0).unwrap();
        s.send_dgram_server(0).unwrap();
        s.send_dgram_server(0).unwrap();

        assert_eq!(s.poll_client(), Ok((0, Event::Datagram)));
        assert_eq!(s.recv_dgram_client(&mut buf), Ok(result));
        assert_eq!(s.poll_client(), Ok((0, Event::Datagram)));
        assert_eq!(s.recv_dgram_client(&mut buf), Ok(result));
        assert_eq!(s.poll_client(), Ok((0, Event::Datagram)));
        assert_eq!(s.recv_dgram_client(&mut buf), Ok(result));
        assert_eq!(s.poll_client(), Err(Error::Done));
    }

    #[test]
    /// Send more DATAGRAMs than the send queue allows.
    fn multiple_dgram_overflow() {
        let mut buf = [0; 65535];
        let mut s = Session::default().unwrap();
        s.handshake().unwrap();

        // We'll send default data of 10 bytes on flow ID 0.
        let result = (11, 0, 1);

        // Five DATAGRAMs
        s.send_dgram_client(0).unwrap();
        s.send_dgram_client(0).unwrap();
        s.send_dgram_client(0).unwrap();
        s.send_dgram_client(0).unwrap();
        s.send_dgram_client(0).unwrap();

        // Only 3 independent DATAGRAM events will fire.
        assert_eq!(s.poll_server(), Ok((0, Event::Datagram)));
        assert_eq!(s.recv_dgram_server(&mut buf), Ok(result));
        assert_eq!(s.poll_server(), Ok((0, Event::Datagram)));
        assert_eq!(s.recv_dgram_server(&mut buf), Ok(result));
        assert_eq!(s.poll_server(), Ok((0, Event::Datagram)));
        assert_eq!(s.recv_dgram_server(&mut buf), Ok(result));
        assert_eq!(s.poll_server(), Err(Error::Done));
    }

    #[test]
    /// Send a single DATAGRAM and request. Ensure that poll continuously cycles
    /// between the two types if the data is not read.
    fn poll_yield_cycling() {
        let mut config = crate::Config::new(crate::PROTOCOL_VERSION).unwrap();
        config
            .load_cert_chain_from_pem_file("examples/cert.crt")
            .unwrap();
        config
            .load_priv_key_from_pem_file("examples/cert.key")
            .unwrap();
        config.set_application_protos(b"\x02h3").unwrap();
        config.set_initial_max_data(1500);
        config.set_initial_max_stream_data_bidi_local(150);
        config.set_initial_max_stream_data_bidi_remote(


import os
import multiprocessing
import sys

from varkt.config import Config

def run_flight(config_):
    os.system(f'python flight.py {config_.data['flight_config']}')

def run_flight_plotter(config_):
    os.system(f'python flight_plotter.py {config_.data['flight_plotter_config']}')

def run_model_plotter(config_):
    os.system(f'python model_plotter.py {config_.data['model_plotter_config']}')

def run_analysis_plotter(config_):
    os.system(f'python analysis_plotter.py {config_.data['analysis_plotter_config']}')

if __name__ == '__main__':
    if len(sys.argv) < 2:
        print('Нет имени файла конфигурации!')

    config = Config.from_file(sys.argv[1])

    flight_process = multiprocessing.Process(target=run_flight, args=(config,))
    flight_plotter_process = multiprocessing.Process(target=run_flight_plotter, args=(config,))
    model_plotter_process = multiprocessing.Process(target=run_model_plotter, args=(config,))
    analysis_plotter_process = multiprocessing.Process(target=run_analysis_plotter, args=(config,))

    print('Начало работы загрузчика')

    print('Запуск полёта')

    flight_process.start()

    print('Моделирование графиков полёта')

    flight_plotter_process.start()

    print('Моделирование графиков модели')

    model_plotter_process.start()

    print('Ожидание моделирования графиков полёта и модели')

    flight_process.join()
    flight_plotter_process.join()
    model_plotter_process.join()

    print('Моделирования графиков полёта и модели завершено')

    print('Моделирование графиков погрешностей и различий')

    analysis_plotter_process.start()

    print('Ожидание моделирования графиков погрешностей и различий')

    analysis_plotter_process.join()

    print('Моделирование графиков погрешностей и различий завершено')

    print('Окончание работы загрузчика')


 access individual elements using [] operator etc. The
vectors are allocated on stack, as opposite to std::valarray, std::vector, cv::Mat etc., which
elements are dynamically allocated in the heap.

The template takes 2 parameters:
@tparam _Tp element type
@tparam cn the number of elements

In addition to the universal notation like Vec<float, 3>, you can use shorter aliases
for the most popular specialized variants of Vec, e.g. Vec3f ~ Vec<float, 3>.

It is possible to convert Vec\<T,2\> to/from Point_, Vec\<T,3\> to/from Point3_ , and Vec\<T,4\>
to CvScalar or Scalar_. Use operator[] to access the elements of Vec.

All the expected vector operations are also implemented:
-   v1 = v2 + v3
-   v1 = v2 - v3
-   v1 = v2 \* scale
-   v1 = scale \* v2
-   v1 = -v2
-   v1 += v2 and other augmenting operations
-   v1 == v2, v1 != v2
-   norm(v1) (euclidean norm)
The Vec class is commonly used to describe pixel types of multi-channel arrays. See Mat for details.
*/
template<typename _Tp, int cn> class Vec : public Matx<_Tp, cn, 1>
{
public:
    typedef _Tp value_type;
    enum {
           channels = cn,
#ifdef OPENCV_TRAITS_ENABLE_DEPRECATED
           depth    = Matx<_Tp, cn, 1>::depth,
           type     = CV_MAKETYPE(depth, channels),
#endif
           _dummy_enum_finalizer = 0
         };

    //! default constructor
    Vec();

    Vec(_Tp v0); //!< 1-element vector constructor
    Vec(_Tp v0, _Tp v1); //!< 2-element vector constructor
    Vec(_Tp v0, _Tp v1, _Tp v2); //!< 3-element vector constructor
    Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3); //!< 4-element vector constructor
    Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4); //!< 5-element vector constructor
    Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5); //!< 6-element vector constructor
    Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6); //!< 7-element vector constructor
    Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7); //!< 8-element vector constructor
    Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8); //!< 9-element vector constructor
    Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9); //!< 10-element vector constructor
    Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9, _Tp v10, _Tp v11, _Tp v12, _Tp v13); //!< 14-element vector constructor
    explicit Vec(const _Tp* values);

    Vec(std::initializer_list<_Tp>);

    Vec(const Vec<_Tp, cn>& v);

    static Vec all(_Tp alpha);

    //! per-element multiplication
    Vec mul(const Vec<_Tp, cn>& v) const;

    //! conjugation (makes sense for complex numbers and quaternions)
    Vec conj() const;

    /*!
      cross product of the two 3D vectors.

      For other dimensionalities the exception is raised
    */
    Vec cross(con


import json

from washer.worker.actions import AppendStdout, AppendStderr
from washer.worker.actions import CreateNamedLog, AppendToLog
from washer.worker.actions import SetProperty
from washer.worker.commands import washertask

def npmjson2deps(rawgraph):
    graph = json.loads(rawgraph)

    def extract_dependencies(entries):
        for package_name, entry in entries.items():
            try:
                yield {'installer': 'npm',
                       'spec': entry['from'],
                       'source': entry.get('resolved', 'npm'),
                       'name': package_name,
                       'version': entry['version']}
            except KeyError as exc:
                print("Cannot get mandatory field %s" % exc)
            if 'dependencies' in entry:
                yield from extract_dependencies(entry['dependencies'])

    if 'dependencies' in graph:
        yield from extract_dependencies(graph['dependencies'])

@washertask
def npm_install(repopath, path=".", **kwargs):
    import invoke
    c = invoke.Context()

    with c.cd(repopath):
        with c.cd(path):
            res = c.run("npm install", warn=True)
            # Dump the output to a file to avoid
            # https://github.com/npm/npm/issues/17331
            deps = c.run("npm ls --json > /tmp/npmdeps.json", warn=True)

    yield AppendStdout(res.stdout)
    yield AppendStderr(res.stderr)
    with open("/tmp/npmdeps.json", "r", encoding='utf-8') as f:
        yield SetProperty("dependencies",
                          list(npmjson2deps(f.read())))

    return True


 Changing this sleepFrames(51) to sleepFrames(2) had an enormous impact
			// on idle cpu utilization, from 11.2% to 8.5% with a C-5 beacon, ie, with only 4 SACCH running.
			// TODO: Can use fewer CPU cycles by using something like waitToSend to sleep until the next SACCH transmission time.
			sleepFrames(1);
#endif
			// A clever way to avoid the sleep above would be to wait for ESTABLISH primitive.
			// (But which do you wait on - the tx or the rx queue?
			continue;	// paranoid, check again.
		}

		// (pat 4-2014) Added to detect RR failure.  This is needed because a Layer3 MMContext is not allocated
		// until the first L3 message arrives.  If the channel fails without sending an L3 message we would never
		// notice unless we are watching these RR level timers.
		// Close the host channel, which will also close this SACCH.
		sacch->serviceSACCH(count);
	}
	//sacch->mSacchRunning = false;		dont think we would restart this one; would alloc a new one.
	return NULL;
}

// These have to go into the .cpp file to prevent an illegal forward reference.
void L2LogicalChannel::l1InitPhy(float wRSSI, float wTimingError, double wTimestamp)
	{ assert(mSACCH); mSACCH->l1InitPhy(wRSSI,wTimingError,wTimestamp); }
void L2LogicalChannel::setPhy(const L2LogicalChannel& other)
	{ assert(mSACCH); mSACCH->setPhy(*other.mSACCH); }
MSPhysReportInfo * L2LogicalChannel::getPhysInfo() const {
	assert(mSACCH); return mSACCH->getPhysInfo();
}
const L3MeasurementResults& L2LogicalChannel::measurementResults() const
	{ assert(mSACCH); return mSACCH->measurementResults(); }

TCHFACCHLogicalChannel::TCHFACCHLogicalChannel(
		unsigned wCN,
		unsigned wTN,
		const CompleteMapping& wMapping)
{
	mTCHL1 = new TCHFACCHL1FEC(wCN,wTN,wMapping.LCH());
	mL1 = mTCHL1;
	// SAP0 is RR/MM/CC, SAP3 is SMS
	// SAP1 and SAP2 are not used.
	L2LAPDm *sap0 = new FACCHL2(1,SAPI0);
	L2LAPDm *sap3 = new FACCHL2(1,SAPI3);
	sapInit(sap0,sap3);
	mSACCH = new SACCHLogicalChannel(wCN,wTN,wMapping.SACCH(),this);
	connect(mL1);
}

CBCHLogicalChannel::CBCHLogicalChannel(int wCN, int wTN, const CompleteMapping& wMapping)
{
	mL1 = new CBCHL1FEC(wCN, wTN, wMapping.LCH());
	L2DL *sap0 = new CBCHL2;
	sapInit(sap0,NULL);
	mSACCH = new SACCHLogicalChannel(wCN,wTN,wMapping.SACCH(),this);
	connect(mL1);
}

void CBCHLogicalChannel::l2sendm(const L3SMSCBMessage& msg)
{
	L3Frame frame(L3_UNIT_DATA,88*8);
	msg.write(frame);
	l2sendf(frame);
}

void CBCHLogicalChannel::l2sendf(const L3Frame& frame)
{
	if (mL2[0]) {	// Should always be set, but protects against a race during startup.
		mL2[0]->l2dlWriteHighSide(frame);
	}
}

void CBCHLogicalChannel::cbchOpen()
{
	if (mL1) mL1->l1init();		// (pat) L1FEC::l1init()
	sapStart(); // startl1();
	devassert(mSACCH);
	if (mSACCH) {
		mSACCH->sacchInit();
		mSACCH->sapStart();
	}
}

ostream& operator<<(ostream& os, const L2LogicalChannelBase& chan)
{
	os << chan.descriptiveString();
	return os;
}

s


al", "ailment" }, },
	["BleedingDamagePrefixTwoHandInfluence2"] = { type = "Prefix", affix = "Warlord's", "(110-119)% increased Physical Damage over Time", statOrder = { 1096 }, level = 71, group = "PhysicalDamageOverTimePrefix", weightKey = { "2h_sword_adjudicator", "2h_axe_adjudicator", "2h_mace_adjudicator", "default", }, weightVal = { 300, 300, 300, 0 }, modTags = { "physical_damage", "bleed", "influence_mod", "damage", "physical", "ailment" }, },
	["BleedingDamagePrefixTwoHandInfluence3"] = { type = "Prefix", affix = "Warlord's", "(120-129)% increased Physical Damage over Time", statOrder = { 1096 }, level = 75, group = "PhysicalDamageOverTimePrefix", weightKey = { "2h_sword_adjudicator", "2h_axe_adjudicator", "2h_mace_adjudicator", "default", }, weightVal = { 200, 200, 200, 0 }, modTags = { "physical_damage", "bleed", "influence_mod", "damage", "physical", "ailment" }, },
	["BleedingDamagePrefixTwoHandInfluence4"] = { type = "Prefix", affix = "Warlord's", "(130-134)% increased Physical Damage over Time", statOrder = { 1096 }, level = 78, group = "PhysicalDamageOverTimePrefix", weightKey = { "2h_sword_adjudicator", "2h_axe_adjudicator", "2h_mace_adjudicator", "default", }, weightVal = { 100, 100, 100, 0 }, modTags = { "physical_damage", "bleed", "influence_mod", "damage", "physical", "ailment" }, },
	["PoisonDamagePrefixInfluence1__"] = { type = "Prefix", affix = "Hunter's", "(60-69)% increased Chaos Damage over Time", statOrder = { 1099 }, level = 68, group = "ChaosDamageOverTimePrefix", weightKey = { "sword_basilisk", "claw_basilisk", "dagger_basilisk", "rune_dagger_basilisk", "bow_basilisk", "default", }, weightVal = { 400, 400, 400, 400, 400, 0 }, modTags = { "chaos_damage", "poison", "damage", "chaos", "ailment" }, },
	["PoisonDamagePrefixInfluence2__"] = { type = "Prefix", affix = "Hunter's", "(70-79)% increased Chaos Damage over Time", statOrder = { 1099 }, level = 71, group = "ChaosDamageOverTimePrefix", weightKey = { "sword_basilisk", "claw_basilisk", "dagger_basilisk", "rune_dagger_basilisk", "bow_basilisk", "default", }, weightVal = { 300, 300, 300, 300, 300, 0 }, modTags = { "chaos_damage", "poison", "damage", "chaos", "ailment" }, },
	["PoisonDamagePrefixInfluence3"] = { type = "Prefix", affix = "Hunter's", "(80-89)% increased Chaos Damage over Time", statOrder = { 1099 }, level = 75, group = "ChaosDamageOverTimePrefix", weightKey = { "sword_basilisk", "claw_basilisk", "dagger_basilisk", "rune_dagger_basilisk", "bow_basilisk", "default", }, weightVal = { 200, 200, 200, 200, 200, 0 }, modTags = { "chaos_damage", "poison", "damage", "chaos", "ailment" }, },
	["PoisonDamagePrefixInfluence4"] = { type = "Prefix", affix = "Hunter's", "(90-94)% increased Chaos Damage over Time", statOrder = { 1099 }, level = 78, group = "ChaosDamageOverTimePrefix", weightKey = { "sword_basilisk", "claw_basilisk", "dagger_basilisk", "rune_dagger_basilisk", "bow_