2, 1, 2, 2, 2, 2, 1];
    }

    if (isSharpsVisible) {
        chrom = ["A", "A♯", "B", "C", "C♯", "D", "D♯", "E", "F", "F♯", "G", "G♯"];
    } else {
        chrom = ["A", "B♭", "B", "C", "D♭", "D", "E♭", "E", "F", "G♭", "G", "A♭"];
    }

    let modeOne = new Mode(1, chrom, tonic, scaleType, scaleName, isParallelVisible, scaleIntervals, scaleChords, modeNames);
    let modeTwo = new Mode(2, chrom, tonic, scaleType, scaleName, isParallelVisible, scaleIntervals, scaleChords, modeNames);
    let modeThree = new Mode(3, chrom, tonic, scaleType, scaleName, isParallelVisible, scaleIntervals, scaleChords, modeNames);
    let modeFour = new Mode(4, chrom, tonic, scaleType, scaleName, isParallelVisible, scaleIntervals, scaleChords, modeNames);
    let modeFive = new Mode(5, chrom, tonic, scaleType, scaleName, isParallelVisible, scaleIntervals, scaleChords, modeNames);
    let modeSix = new Mode(6, chrom, tonic, scaleType, scaleName, isParallelVisible, scaleIntervals, scaleChords, modeNames);
    let modeSeven = new Mode(7, chrom, tonic, scaleType, scaleName, isParallelVisible, scaleIntervals, scaleChords, modeNames);

    let modeObjs: Mode[] = [modeOne, modeTwo, modeThree, modeFour, modeFive, modeSix, modeSeven];

    document.getElementById("modes").innerHTML =
        outputTitle(chrom, tonic, scaleName, isParallelVisible) +
        outputAllModes(modeObjs, isOctaveVisible, isNumeralsVisible, isIntervalsVisible);

    document.getElementById("print").innerHTML = outputPrintButton();
}

function outputTitle(chrom: string[], tonic: number, scaleName: string, isParallelVisible: boolean) {
    let modeMethod: string;

    if (isParallelVisible) {
        modeMethod = "Parallel";
    } else {
        modeMethod = "Relative";
    }

    let codeBlock: string = '
' +
        '
 The ' + modeMethod + ' Modes of ' + chrom[tonic] + ' ' + scaleName + '
' +
        '
';

    return codeBlock;
}

function outputAllModes(modeObjs: Mode[], isOctaveVisible: boolean, isNumeralsVisible: boolean, isIntervalsVisible: boolean) {
    let codeBlock: string = "";

    for (var i = 1; i < 8; i++) {
        codeBlock += outputSingleMode(modeObjs[i - 1], isOctaveVisible, isNumeralsVisible, isIntervalsVisible);
    }

    return codeBlock;
}

function outputSingleMode(mode: Mode, isOctaveVisible: boolean, isNumeralsVisible: boolean, isIntervalsVisible: boolean) {
    var degrees;
    var intervals;

    if (isNumeralsVisible) {
        degrees = outputDegreesNumerals(mode, isOctaveVisible);
    } else {
        degrees = outputDegrees(mode, isOctaveVisible);
    }

    if (isIntervalsVisible) {
        intervals = outputIntervals(mode);
    } else {
        intervals = "";
    }

    let codeBlock: string = '
' +
        '
' +           // Begin row one
        '
<h5


elative;
}
.CodeMirror-Tern-completion:before {
  position: absolute;
  left: 2px;
  bottom: 2px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  height: 15px;
  width: 15px;
  line-height: 16px;
  text-align: center;
  color: white;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.CodeMirror-Tern-completion-unknown:before {
  content: "?";
  background: #4bb;
}
.CodeMirror-Tern-completion-object:before {
  content: "O";
  background: #77c;
}
.CodeMirror-Tern-completion-fn:before {
  content: "F";
  background: #7c7;
}
.CodeMirror-Tern-completion-array:before {
  content: "A";
  background: #c66;
}
.CodeMirror-Tern-completion-number:before {
  content: "1";
  background: #999;
}
.CodeMirror-Tern-completion-string:before {
  content: "S";
  background: #999;
}
.CodeMirror-Tern-completion-bool:before {
  content: "B";
  background: #999;
}

.CodeMirror-Tern-completion-guess {
  color: #999;
}

.CodeMirror-Tern-tooltip {
  border: 1px solid silver;
  border-radius: 3px;
  color: #444;
  padding: 2px 5px;
  font-size: 90%;
  font-family: monospace;
  background-color: white;
  white-space: pre-wrap;

  max-width: 40em;
  position: absolute;
  z-index: 10;
  -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
  -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
  box-shadow: 2px 3px 5px rgba(0,0,0,.2);

  transition: opacity 1s;
  -moz-transition: opacity 1s;
  -webkit-transition: opacity 1s;
  -o-transition: opacity 1s;
  -ms-transition: opacity 1s;
}

.CodeMirror-Tern-hint-doc {
  max-width: 25em;
  margin-top: -3px;
}

.CodeMirror-Tern-fname { color: black; }
.CodeMirror-Tern-farg { color: #70a; }
.CodeMirror-Tern-farg-current { text-decoration: underline; }
.CodeMirror-Tern-type { color: #07c; }
.CodeMirror-Tern-fhint-guess { opacity: .7;


 m_previewArea, string.Empty, UIUtils.GetCustomStyle( CustomStyle.SamplerFrame ) );
			}
		}

		void OnNewSubstanceSelected( Texture[] textures )
		{
			CacheCurrentSettings();
			ConfigPortsFromMaterial( true, textures );
			ConnectFromCache();
			m_requireMaterialUpdate = true;
			CalculateFirstOutputConnected();
			ContainerGraph.ParentWindow.RequestRepaint();
		}

		public override void DrawProperties()
		{
			base.DrawProperties();
			EditorGUI.BeginChangeCheck();
			m_proceduralMaterial = EditorGUILayoutObjectField( SubstanceStr, m_proceduralMaterial, m_type, false ) as ProceduralMaterial;
			if( EditorGUI.EndChangeCheck() )
			{
				Texture[] textures = m_proceduralMaterial != null ? m_proceduralMaterial.GetGeneratedTextures() : null;
				if( textures != null )
				{
					OnNewSubstanceSelected( textures );
				}
			}

			m_textureCoordSet = EditorGUILayoutIntPopup( Constants.AvailableUVSetsLabel, m_textureCoordSet, Constants.AvailableUVSetsStr, Constants.AvailableUVSets );
			EditorGUI.BeginChangeCheck();
			m_autoNormal = EditorGUILayoutToggle( AutoNormalStr, m_autoNormal );
			if( EditorGUI.EndChangeCheck() )
			{
				for( int i = 0; i < m_textureTypes.Length; i++ )
				{
					WirePortDataType portType = ( m_autoNormal && m_textureTypes[ i ] == ProceduralOutputType.Normal ) ? WirePortDataType.FLOAT3 : WirePortDataType.COLOR;
					if( m_outputPorts[ i ].DataType != portType )
					{
						m_outputPorts[ i ].ChangeType( portType, false );
					}
				}
			}
		}

		private void CacheCurrentSettings()
		{
			m_cacheNodeConnections.Clear();
			for( int portId = 0; portId < m_outputPorts.Count; portId++ )
			{
				if( m_outputPorts[ portId ].IsConnected )
				{
					int connCount = m_outputPorts[ portId ].ConnectionCount;
					for( int connIdx = 0; connIdx < connCount; connIdx++ )
					{
						WireReference connection = m_outputPorts[ portId ].GetConnection( connIdx );
						m_cacheNodeConnections.Add( m_outputPorts[ portId ].Name, new NodeCache( connection.NodeId, connection.PortId ) );
					}
				}
			}
		}

		private void ConnectFromCache()
		{
			for( int i = 0; i < m_outputPorts.Count; i++ )
			{
				List<NodeCache> connections = m_cacheNodeConnections.GetList( m_outputPorts[ i ].Name );
				if( connections != null )
				{
					int count = connections.Count;
					for( int connIdx = 0; connIdx < count; connIdx++ )
					{
						UIUtils.SetConnection( connections[ connIdx ].TargetNodeId, connections[ connIdx ].TargetPortId, UniqueId, i );
					}
				}
			}
		}

		private void ConfigPortsFromMaterial( bool invalidateConnections = false, Texture[] newTextures = null )
		{
			SetAdditonalTitleText( ( m_proceduralMaterial != null ) ? string.Format( Constants.PropertyValueLabel, m_proceduralMaterial.name ) : "Value( <None> )" );

			Texture[] textures = newTextures != null ? newTextures : ( ( m_proceduralMaterial != null ) ? m_proceduralMaterial.GetGeneratedTextures() : null );
			if( textures != null )
			{
				m_firstOutputConnected = -1;
				string nameToRemove = m_proceduralMaterial.name + "_";
				m_textureTypes = new ProceduralOutputType[ textures.Length ];
				for( int i = 0; i < textures.Length; i++ )
				{
					ProceduralTexture procTex


import discord
from discord.ext import commands
from discord import app_commands
import json
from functools import wraps

class BotManageCommands(commands.Cog):
    def __init__(self, bot):
        self.bot = bot
        self.logger = bot.logger
        self.name = "管理命令"
        self.config = None
        # 从main.py加载配置
        try:
            with open('config.json', 'r', encoding='utf-8') as f:
                self.config = json.load(f)
        except Exception as e:
            if self.logger:
                self.logger.error(f"加载配置文件失败: {e}")

    command_bot_manage = app_commands.Group(name="管理机器人", description="管理机器人")

    @commands.Cog.listener()
    async def on_ready(self):
        if self.logger:
            self.logger.info("管理命令已加载")

    def is_bot_manager():
        async def predicate(ctx):
            try:
                guild = ctx.guild
                if not guild:
                    return False

                # 在运行时重新加载配置以获取最新的管理员列表
                with open('config.json', 'r', encoding='utf-8') as f:
                    config = json.load(f)

                admin_roles = config.get('admins', [])

                # 检查用户是否拥有任何管理员身份组
                for admin_role_id in admin_roles:
                    role = guild.get_role(int(admin_role_id))
                    if role and role in ctx.author.roles:
                        return True
                return False
            except Exception:
                return False
        return commands.check(predicate)

    # ---- 全局Cog管理命令 ----
    @command_bot_manage.command(name="模块列表", description="列出所有可用模块及其状态")
    @is_bot_manager()
    async def list_modules(self, interaction: discord.Interaction):
        """列出所有可用模块及其状态"""
        embed = discord.Embed(title="可用模块", color=discord.Color.blue())

        cog_manager = self.bot.cog_manager
        for cog_name, cog_config in self.config.get('cogs', {}).items():
            # 检查模块是否在cog_manager中存在
            if cog_name in cog_manager.cog_map:
                cog_instance = cog_manager.cog_map[cog_name]
                # 检查该cog类是否已加载到bot中（通过类名检查）
                cog_class_name = cog_instance.__class__.__name__
                status = "✅ 已启用" if cog_class_name in self.bot.cogs else "❌ 已禁用"
            else:
                status = "❌ 未知模块"

            description = cog_config.get('description', '无描述')

            embed.add_field(
                name=f"{cog_name} - {status}",
                value=description,
                inline=False
            )

        await interaction.response.send_message(embed=embed, ephemeral=True)

    @command_bot_manage.command(name="启用模块", description="启用指定模块")
    @is_bot_manager()
    async def enable_module(self, interaction: discord.Interaction, module_name: str):
        """启用指定模块"""
        cog_manager = self.bot.cog_manager

        # 检查模块是否存在于配置中
        if module_name not in self.config.get('cogs', {}):
            await interaction.response.send_message(f"❌ 模块 `{module_name}` 不存在于配置中", ephemeral=True)
            return

        # 如果模块已加载，则返回
        if module_name in self.bot.cogs:
            await interaction.response.send_message(f"⚠ 模块 `{module_name}` 已经处于启用状态", ephemeral=True)
            return

        # 加载模块
        if module_name in cog_manager.cog_map:
            cog = cog_manager.cog_map[module_name]
            success, message = await cog_manager.load_cog(cog)
        else:
            await interaction.response.send_message(f"❌ 模块 `{module_name}` 不在cog_map中", ephemeral=True)
            return

        # 如果成功，更新配置
        if success:
            self.config['cogs'][module_name]['enabled'] = True
            with open('config.json', 'w', encoding='utf-8') as f:
                json.dump(self.config, f, indent=4, ensure_ascii=False)

        await interaction.response.send_message(message, ephemeral=True)

    @command_bot_manage.command(name="禁用模块", description="禁用指定模块")
    @is_bot_manager()
    async def disable_module(self, interaction: discord.Interaction, module_name: str):
        """禁用指定模块"""
        cog_manager = self.bot.cog_manager

        # 检查模块是否存在于配置中
        if module_name not in self.config.get('cogs', {}):
            await interaction.response.send_message(f"❌ 模块 `{module_name}` 不存在于配置中", ephemeral=True)
            return

        # 如果模块未加


,
	shape_table_data = { {
			classname = "lLandVehicle",
			desrt = "Jagdpanther_G1_p_1",
			file = "Jagdpanther_G1",
			life = 6,
			name = "Jagdpanther_G1",
			positioning = "BYNORMAL",
			username = "Jagdpanther_G1"
		}, {
			file = "Jagdpanther_G1_p_1",
			name = "Jagdpanther_G1_p_1"
		} },
	snd = {
		engine_pitch = { {}, {}, {} },
		engine_vol_a = { {}, {}, {} },
		engine_vol_v = { {}, {}, {} },
		move_pitch = { {}, {} },
		move_vol = { {}, {}, {} }
	},
	swapped_names = true,
	swing_on_run = false,
	tags = { "Armor", "SPG" },
	type = "Jagdpanther_G1",
	visual = {
		IR = {
			coeffs = { { 0.02, 0.0012, 3 }, { 0.008, 0.002, 2.7 }, { 0.0038, 0.0015 }, { 0.01, 0.0017 }, { 0.3, 0.00026086956521739 } }
		},
		agony_explosion_size = 3,
		dirt_pos = { -3.2, 0.6, -1.4 },
		dust_pos = { 3.05, 0.1, -1.4 },
		fire_pos = { -1.9, 0.9, 0 },
		fire_size = 0.65,
		fire_time = 500,
		max_time_agony = 55,
		min_time_agony = 10,
		shape = "Jagdpanther_G1",
		shape_dstr = "Jagdpanther_G1_p_1"
	}
}


 (__SIZEOF_POINTER__ * 3)
DATA_WORD(local_label)
DATA_WORD(local_label)
DATA_WORD(local_label)
.space (__SIZEOF_POINTER__ * 7)
DATA_WORD(local_label)
DATA_WORD(local_label)
DATA_WORD(b__MA7naqebvq7ErsOnfr10baSvefgErsRi)
DATA_WORD(b__MA7naqebvq7ErsOnfr15baYnfgFgebatErsRCXi)
DATA_WORD(b__MA7naqebvq7ErsOnfr20baVapFgebatNggrzcgrqRwCXi)
DATA_WORD(b__MA7naqebvq7ErsOnfr13baYnfgJrnxErsRCXi)
.space (__SIZEOF_POINTER__ * 2)
DATA_WORD(local_label)
DATA_WORD(local_label)
DATA_WORD(b__MAX7naqebvq3thv7OvgGhor13jevgrGbCnepryRCAF_6CnepryR)
DATA_WORD(b__MA7naqebvq3thv7OvgGhor14ernqSebzCnepryRCXAF_6CnepryR)
.space (__SIZEOF_POINTER__ * 3)
DATA_WORD(local_label)
DATA_WORD(local_label)
DATA_WORD(b__MA7naqebvq17OhssreUhoPbafhzre10baNfOvaqreRi)
DATA_WORD(b__MAX7naqebvq22VTencuvpOhssrePbafhzre22trgVagresnprQrfpevcgbeRi)
DATA_WORD(b__MA7naqebvq17OhssreUhoPbafhzre13npdhverOhssreRCAF_10OhssreVgrzRyz)
DATA_WORD(b__MA7naqebvq17OhssreUhoPbafhzre12qrgnpuOhssreRv)
DATA_WORD(b__MA7naqebvq17OhssreUhoPbafhzre12nggnpuOhssreRCvEXAF_2fcVAF_13TencuvpOhssreRRR)
DATA_WORD(b__MA7naqebvq17OhssreUhoPbafhzre13eryrnfrOhssreRvzCiF1_EXAF_2fcVAF_5SraprRRR)
DATA_WORD(b__MA7naqebvq17OhssreUhoPbafhzre15pbafhzrePbaarpgREXAF_2fcVAF_17VPbafhzreYvfgrareRRRo)
DATA_WORD(b__MA7naqebvq17OhssreUhoPbafhzre18pbafhzreQvfpbaarpgRi)
DATA_WORD(b__MA7naqebvq17OhssreUhoPbafhzre18trgEryrnfrqOhssrefRCz)
DATA_WORD(b__MA7naqebvq17OhssreUhoPbafhzre20frgQrsnhygOhssreFvmrRww)
DATA_WORD(b__MA7naqebvq17OhssreUhoPbafhzre17frgZnkOhssrePbhagRv)
DATA_WORD(b__MA7naqebvq17OhssreUhoPbafhzre25frgZnkNpdhverqOhssrePbhagRv)
DATA_WORD(b__MA7naqebvq17OhssreUhoPbafhzre15frgPbafhzreAnzrREXAF_7Fgevat8R)
DATA_WORD(b__MA7naqebvq17OhssreUhoPbafhzre22frgQrsnhygOhssreSbezngRv)
DATA_WORD(b__MA7naqebvq17


Uri = "/Llamas/Foo/{Foobar}";
        public const string RoutePathUri2 = "/Llamas/Fizz/{Llama}";

        public object Get(DtoForParamRoute dto)
        {
            if (!string.IsNullOrWhiteSpace(dto.Foobar))
                return dto.Foobar;

            return dto.Llama;
        }

        public object Any(DtoForParamQueryRoute dto)
        {
            if (!string.IsNullOrWhiteSpace(dto.Foobar))
                return dto.Foobar;

            return dto.Llama;
        }

        public ResponseDto Put(RequestDto dto)
        {
            return new ResponseDto {Foobar = dto.Foobar};
        }
    }

    public class SvcWithMultParamRoutes : ServiceBase
    {
        public const string RoutePath1 = "/Llamas/Eats";
        public const string RoutePath2 = "/Llamas/Hands";

        public void Any(DtoForMultParamRoutes dto)
        {
        }
    }

    public class SvcForMethods : ServiceBase
    {
        public const string PostPath = "/Methods";
        public const RestVerbs PostMethod = RestVerbs.Post;

        public const string MultiPath = "/Multi";
        public const RestVerbs MultiMethod = RestVerbs.Get | RestVerbs.Post;

        [Route(PostPath, PostMethod)]
        public void Post()
        {
        }

        [Route(MultiPath, MultiMethod)]
        public void GetPost()
        {
        }
    }

    [Route(SvcWithParamRoute.RoutePath, RestVerbs.Get)]
    public class DtoForParamRoute
    {
        public string Foobar { get; set; }
        public int Llama { get; set; }
    }

    [Route(SvcWithParamRoute.RoutePathUri, RestVerbs.Get)]
    [Route(SvcWithParamRoute.RoutePathUri2, RestVerbs.Get)]
    public class DtoForParamQueryRoute
    {
        public string Foobar { get; set; }
        public int Llama { get; set; }
    }

    [Route(SvcWithMultParamRoutes.RoutePath1, RestVerbs.Get)]
    [Route(SvcWithMultParamRoutes.RoutePath2, RestVerbs.Get)]
    public class DtoForMultParamRoutes
    {

    }

    [Route(SvcWithParamRoute.RoutePath, RestVerbs.Put)]
    public class RequestDto
    {
        public string Foobar { get; set; }
    }

    public class ResponseDto
    {
        public string Foobar { get; set; }
    }
}


from .ask_prompts import AskPrompts
from .base_coder import Coder

class AskCoder(Coder):
    """Ask questions about code without making any changes."""

    edit_format = "ask"
    gpt_prompts = AskPrompts()


u00e5",
"Dark Turquoise": "M\u00f6rkturkos",
"Dark Green": "M\u00f6rkgr\u00f6n",
"Medium Blue": "Mellanbl\u00e5",
"Medium Purple": "Mellanlila",
"Midnight Blue": "Midnattsbl\u00e5",
"Yellow": "Gul",
"Orange": "Orange",
"Red": "R\u00f6d",
"Light Gray": "Ljusgr\u00e5",
"Gray": "Gr\u00e5",
"Dark Yellow": "M\u00f6rkgul",
"Dark Orange": "M\u00f6rkorange",
"Dark Red": "M\u00f6rkr\u00f6d",
"Medium Gray": "Mellangr\u00e5",
"Dark Gray": "M\u00f6rkgr\u00e5",
"Light Green": "Ljusgr\u00f6n",
"Light Yellow": "Ljusgul",
"Light Red": "Ljusr\u00f6d",
"Light Purple": "Ljuslila",
"Light Blue": "Ljusbl\u00e5",
"Dark Purple": "M\u00f6rklila",
"Dark Blue": "M\u00f6rkbl\u00e5",
"Black": "Svart",
"White": "Vit",
"Switch to or from fullscreen mode": "V\u00e4xla till eller fr\u00e5n fullsk\u00e4rmsl\u00e4ge",
"Open help dialog": "\u00d6ppna hj\u00e4lpdialogrutan",
"history": "historik",
"styles": "stilar",
"formatting": "formatering",
"alignment": "justering",
"indentation": "indragning",
"permanent pen": "permanent penna",
"comments": "kommentarer",
"Format Painter": "H\u00e4mta format",
"Insert\/edit iframe": "Infoga\/redigera iframe",
"Capitalization": "Versaler",
"lowercase": "gemener",
"UPPERCASE": "VERSALER",
"Title Case": "Inledande versal",
"Permanent Pen Properties": "Permanenta pennegenskaper",
"Permanent pen properties...": "Permanenta pennegenskaper\u00a0\u2026",
"Font": "Teckensnitt",
"Size": "Storlek",
"More...": "Mer...",
"Spellcheck Language": "Spr\u00e5k f\u00f6r stavningskontroll",
"Select...": "V\u00e4lj...",
"Preferences": "Inst\u00e4llningar",
"Yes": "Ja",
"No": "Nej",
"Keyboard Navigation": "Tangentbordsnavigering",
"Version": "Version",
"Anchor": "Ankare",
"Special character": "Specialtecken",
"Code sample": "K\u00e5dexempel",
"Color": "F\u00e4rg",
"Emoticons": "Emoticons",
"Document properties": "Dokumentegenskaper",
"Image": "Bild",
"Insert link": "Infoga l\u00e4nk",
"Target": "M\u00e5l",
"Link": "L\u00e4nk",
"Poster": "Affish",
"Media": "Media",
"Print": "Skriv ut",
"Prev": "F\u00f6reg\u00e5ende",
"Find and replace": "S\u00f6k och ers\u00e4tt",
"Whole words": "Hela ord",
"Spellcheck": "R\u00e4ttstava",
"Caption": "Rubrik",
"Insert template": "Infoga mall"
});tinymce.addI18n('es_419',{
"Redo": "Rehacer",
"Undo": "Deshacer",
"Cut": "Cort


/** @file

Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
  list of conditions and the following disclaimer in the documentation and/or
  other materials provided with the distribution.
* Neither the name of Intel Corporation nor the names of its contributors may
  be used to endorse or promote products derived from this software without
  specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  THE POSSIBILITY OF SUCH DAMAGE.

  This file is automatically generated. Please do NOT modify !!!

**/

#ifndef _FSP_ERROR_INFO_HOB_H_
#define _FSP_ERROR_INFO_HOB_H_

///
/// GUID value indicating the FSP error information.
///
#define FSP_ERROR_INFO_HOB_GUID { 0x611e6a88, 0xadb7, 0x4301, { 0x93, 0xff, 0xe4, 0x73, 0x04, 0xb4, 0x3d, 0xa6 } }

#define FSP_ERROR_INFO_STATUS_CODE_TYPE          (EFI_ERROR_CODE | EFI_ERROR_UNRECOVERED)
///
/// FSP Error Information Block.
///
#pragma pack(1)
typedef struct {
  ///
  /// GUID HOB header.
  ///
  EFI_HOB_GUID_TYPE     GuidHob;

  ///
  /// ReportStatusCode () type identifier.
  ///
  EFI_STATUS_CODE_TYPE  Type;

  ///
  /// ReportStatusCode () value.
  ///
  EFI_STATUS_CODE_VALUE Value;

  ///
  /// ReportStatusCode () Instance number.
  ///
  UINT32                Instance;

  ///
  /// Optional GUID which may be used to identify
  /// which internal component of the FSP was
  /// executing at the time of the error.
  ///
  EFI_GUID              CallerId;

  ///
  /// GUID identifying the nature of the fatal error.
  ///
  EFI_GUID              ErrorType;

  ///
  /// EFI_STATUS code describing the error encountered.
  ///
  UINT32                Status;
} FSP_ERROR_INFO_HOB;

#pragma pack()

#endif //_FSP_ERROR_INFO_H_


     loss_real = torch.mean(F.softplus(-logits_real))
                loss_fake = torch.mean(F.softplus(logits_fake))
                loss = (loss_real + loss_fake) / 2

            return {
                'loss': loss,
                'disc_logits_real': logits_real.mean().item(),
                'disc_logits_fake': logits_fake.mean().item(),
            }

    def calculate_adaptive_gan_w(self, nll_loss, g_loss, last_layer):
        nll_grads = torch.autograd.grad(nll_loss, last_layer, retain_graph=True)[0]
        g_grads = torch.autograd.grad(g_loss, last_layer, retain_graph=True)[0]
        world_size = int(os.environ.get('WORLD_SIZE', '1'))
        if world_size > 1:
            dist.all_reduce(nll_grads, op=dist.ReduceOp.SUM)
            nll_grads.div_(world_size)
            dist.all_reduce(g_grads, op=dist.ReduceOp.SUM)
            g_grads.div_(world_size)
        d_weight = torch.norm(nll_grads) / (torch.norm(g_grads) + 1e-4)
        d_weight = torch.clamp(d_weight, 0.0, 1e4).detach()
        return d_weight


}

        public void OnSelectText(object sender, String str)
        {
            if (m_d3dInterop != null && m_receiveHandler != null)
            {
                m_d3dInterop.OnCocos2dEditboxEvent(sender, str, m_receiveHandler);
            }
        }

        public void OpenURL(String url)
        {
            WebBrowserTask webBrowserTask = new WebBrowserTask();
            webBrowserTask.Uri = new Uri(url, UriKind.Absolute);
            webBrowserTask.Show();
        }

        private void StartTimer()
        {
            m_timer = new DispatcherTimer();
            m_timer.Interval = new TimeSpan(0, 0, 1);
            m_timer.Tick += new EventHandler(Timer


EC4')
  @DocsEditable()
  static const int BOOL_VEC4 = 0x8B59;

  @DomName('WebGLRenderingContext.BROWSER_DEFAULT_WEBGL')
  @DocsEditable()
  static const int BROWSER_DEFAULT_WEBGL = 0x9244;

  @DomName('WebGLRenderingContext.BUFFER_SIZE')
  @DocsEditable()
  static const int BUFFER_SIZE = 0x8764;

  @DomName('WebGLRenderingContext.BUFFER_USAGE')
  @DocsEditable()
  static const int BUFFER_USAGE = 0x8765;

  @DomName('WebGLRenderingContext.BYTE')
  @DocsEditable()
  static const int BYTE = 0x1400;

  @DomName('WebGLRenderingContext.CCW')
  @DocsEditable()
  static const int CCW = 0x0901;

  @DomName('WebGLRenderingContext.CLAMP_TO_EDGE')
  @DocsEditable()
  static const int CLAMP_TO_EDGE = 0x812F;

  @DomName('WebGLRenderingContext.COLOR_ATTACHMENT0')
  @DocsEditable()
  static const int COLOR_ATTACHMENT0 = 0x8CE0;

  @DomName('WebGLRenderingContext.COLOR_BUFFER_BIT')
  @DocsEditable()
  static const int COLOR_BUFFER_BIT = 0x00004000;

  @DomName('WebGLRenderingContext.COLOR_CLEAR_VALUE')
  @DocsEditable()
  static const int COLOR_CLEAR_VALUE = 0x0C22;

  @DomName('WebGLRenderingContext.COLOR_WRITEMASK')
  @DocsEditable()
  static const int COLOR_WRITEMASK = 0x0C23;

  @DomName('WebGLRenderingContext.COMPILE_STATUS')
  @DocsEditable()
  static const int COMPILE_STATUS = 0x8B81;

  @DomName('WebGLRenderingContext.COMPRESSED_TEXTURE_FORMATS')
  @DocsEditable()
  static const int COMPRESSED_TEXTURE_FORMATS = 0x86A3;

  @DomName('WebGLRenderingContext.CONSTANT_ALPHA')
  @DocsEditable()
  static const int CONSTANT_ALPHA = 0x8003;

  @DomName('WebGLRenderingContext.CONSTANT_COLOR')
  @DocsEditable()
  static const int CONSTANT_COLOR = 0x8001;

  @DomName('WebGLRenderingContext.CONTEXT_LOST_WEBGL')
  @DocsEditable()
  static const int CONTEXT_LOST_WEBGL = 0x9242;

  @DomName('WebGLRenderingContext.CULL_FACE')
  @DocsEditable()
  static const int CULL_FACE = 0x0B44;

  @DomName('WebGLRenderingContext.CULL_FACE_MODE')
  @DocsEditable()
  static const int CULL_FACE_MODE = 0x0B45;

  @DomName('WebGLRenderingContext.CURRENT_PROGRAM')
  @DocsEditable()
  static const int CURRENT_PROGRAM = 0x8B8D;

  @DomName('WebGLRenderingContext.CURRENT_VERTEX_ATTRIB')
  @DocsEditable()
  static const int CURRENT_VERTEX_ATTRIB = 0x8626;

  @DomName('WebGLRenderingContext.CW')
  @DocsEditable()
  static const int CW = 0x0900;

  @DomName('WebGLRenderingContext.DECR')
  @DocsEditable()
  static const int DECR = 0x1E03;

  @DomName('WebGLRenderingContext.DECR_WRAP')
  @DocsEditable()
  static const int DECR_WRAP = 0x8508;

  @DomName('WebGLRenderingContext.DELETE_STATUS')
  @


// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef PPAPI_HOST_HOST_FACTORY_H_
#define PPAPI_HOST_HOST_FACTORY_H_

#include "base/memory/scoped_ptr.h"
#include "ppapi/c/pp_instance.h"

namespace IPC {
class Message;
}

namespace ppapi {

namespace proxy {
class ResourceMessageCallParams;
}

namespace host {

class PpapiHost;
class ResourceHost;

// A host factory creates ResourceHosts for incoming create messages from
// the plugin. This allows us to implement the hosts at the chrome/content
// layer without the ppapi layer knowing about the details.
class HostFactory {
 public:
  virtual ~HostFactory() {}

  virtual scoped_ptr<ResourceHost> CreateResourceHost(
      PpapiHost* host,
      const proxy::ResourceMessageCallParams& params,
      PP_Instance instance,
      const IPC::Message& message) = 0;
};

}  // namespace host
}  // namespace ppapi

#endif  // PPAPI_HOST_HOST_FACTORY_H_


 &mesh.vertices);

	encode_vertex_internal(&pv, ' ');
}

fn encode_vertex_oct(mesh: &Mesh) {
	let mut pv = vec![PackedVertexOct::default(); mesh.vertices.len()];
	pack_mesh_oct(&mut pv, &mesh.vertices);

	encode_vertex_internal(&pv, 'O');
}

fn encode_vertex_internal<PV>(pv: &[PV], pvn: char)
where
	PV: Clone + Debug + Default + PartialEq
{
	// allocate result outside of the timing loop to exclude memset() from decode timing
	let mut result = vec![PV::default(); pv.len()];

	let start = Instant::now();

	let mut vbuf = vec![0; encode_vertex_buffer_bound(pv.len(), std::mem::size_of::<PV>())];
	let vb_size = encode_vertex_buffer(&mut vbuf, &pv, VertexEncodingVersion::default()).unwrap();
	vbuf.resize(vb_size, 0);

	let encode = start.elapsed();
	let start = Instant::now();

	decode_vertex_buffer(&mut result, &vbuf).unwrap();

	let decode = start.elapsed();

	assert_eq!(pv, result);

	let csize = compress_data(&vbuf);

	println!("VtxCodec{:1}: {:.1} bits/vertex (post-deflate {:.1} bits/vertex); encode {:2} msec, decode {:2} msec ({:2} GB/s)",
		pvn,
		(vbuf.len() * 8) as f64/ pv.len() as f64,
		(csize * 8) as f64 / pv.len() as f64,
		encode.as_micros() as f64 / 1000.0,
		decode.as_micros() as f64 / 1000.0,
		((result.len() * std::mem::size_of::<PV>()) as f64 / (1 << 30) as f64) / decode.as_secs_f64(),
	);
}

fn simplify_mesh(mesh: &Mesh) {
    let threshold = 0.2;

	let mut lod = Mesh::default();

	let start = Instant::now();

	let target_index_count = (mesh.indices.len() as f32 * threshold) as usize;
	let target_error = 0.01;

    lod.indices.resize(mesh.indices.len(), 0); // note: simplify needs space for index_count elements in the destination array, not `target_index_count`
    let size = simplify(&mut lod.indices, &mesh.indices, &mesh.vertices, target_index_count, target_error);
	lod.indices.resize(size, 0);

    let size = if lod.indices.len() < mesh.vertices.len() { lod.indices.len() } else { mesh.vertices.len() };
    lod.vertices.resize(size, Vertex::default()); // note: this is just to reduce the cost of relen()
    let size = optimize_vertex_fetch(&mut lod.vertices, &mut lod.indices, &mesh.vertices);
	lod.vertices.resize(size, Vertex::default());

	let duration = start.elapsed();

	println!("{:9}: {} triangles => {} triangles in {:.2} msec",
	    "Simplify", mesh.indices.len() / 3, lod.indices.len() / 3, duration.as_micros() as f64 / 1000.0
    );
}

fn simplify_mesh_sloppy(mesh: &Mesh, threshold: f32) {
	let mut lod = Mesh::default();

	let start = Instant::now();

	let target_index_count = (mesh.indices.len() as f32 * threshold) as usize;

	lod.indices.resize(target_index_count, Default::default()); // note: `simplify_loppy`, unlike `simplify`, is guaranteed to output results that don't exceed the requested `target_index_count`
	let size = simplify_sloppy(&mut lod.indices, &mesh.indices, &mesh.vertices, target_index_count);
	lod.indices.resize(size, Default::default());

	lod.vertices.resize(if lod.indices.len() < mesh.vertices.len() { lo


, false, new List<SDPAudioVideoMediaFormat> { new SDPAudioVideoMediaFormat(SDPWellKnownMediaFormatsEnum.PCMU) });
                rtpSession.addTrack(audioTrack);

                SIPURI dstUri = new SIPURI(SIPSchemesEnum.sip, calleeTransport.GetSIPChannels().First().ListeningSIPEndPoint);
                var result = await userAgent.Call(dstUri.ToString(), null, null, rtpSession);
                Assert.True(result);
            }
            finally
            {
                rtpSession?.Close("normal");
                callerTransport?.Shutdown();
                calleeTransport?.Shutdown();
            }
        }

        /// <summary>
        /// Tests that the SIPUserAgent can correctly handle the condition where the port number
        /// supplied in the remote SDP is invalid when a call attempt is made. Originally the
        /// behaviour was to reject the SDP with the invalid port number. That has now been changed
        /// to use the SDP "ignore" port number and wait for the port to be set by some other means.
        /// </summary>
        [Fact]
        public async Task HandleInvalidSdpPortOnPlaceCallUnitTest()
        {
            logger.LogDebug("--> {MethodName}", System.Reflection.MethodBase.GetCurrentMethod().Name);
            logger.BeginScope(System.Reflection.MethodBase.GetCurrentMethod().Name);

            // This transport will act as the call receiver. It allows the test to provide a
            // tailored response to an incoming call.
            SIPTransport calleeTransport = new SIPTransport();

            // This transport will be used by the SIPUserAgent being tested to place the call.
            SIPTransport callerTransport = new SIPTransport();
            RTPSession rtpSession = new RTPSession(false, false, false);

            try
            {
                calleeTransport.AddSIPChannel(new SIPUDPChannel(IPAddress.Loopback, 0));
                calleeTransport.SIPTransportRequestReceived += async (lep, rep, req) =>
                {
                    if (req.Method != SIPMethodsEnum.INVITE)
                    {
                        SIPResponse notAllowedResponse = SIPResponse.GetResponse(req, SIPResponseStatusCodesEnum.MethodNotAllowed, null);
                        await calleeTransport.SendResponseAsync(notAllowedResponse);
                    }
                    else
                    {
                        UASInviteTransaction uasTransaction = new UASInviteTransaction(calleeTransport, req, null);
                        var uas = new SIPServerUserAgent(calleeTransport, null, uasTransaction, null);
                        uas.Progress(SIPResponseStatusCodesEnum.Trying, null, null, null, null);
                        uas.Progress(SIPResponseStatusCodesEnum.Ringing, null, null, null, null);

                        var answerSdp = @"
v=0
o=- 1838015445 0 IN IP4 127.0.0.1
s=-
c=IN IP4 127.0.0.1
t=0 0
m=audio 79762 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=sendrecv";
                        uas.Answer(SDP.SDP_MIME_CONTENTTYPE, answerSdp, null, SIPDialogueTransferModesEnum.NotAllowed);
                    }
                };

                SIPUserAgent userAgent = new SIPUserAgent(callerTransport, null);

                MediaStreamTrack audioTrack = new MediaStreamTrack(SDPMediaTypesEnum.audio, false, new List<SDPAudioVideoMediaFormat> { new SDPAudioVideoMediaFormat(SDPWellKnownMediaFormatsEnum.PCMU) });
                rtpSession.addTrack(audioTrack);

                SIPURI dstUri = new SIPURI(SIPSchemesEnum.sip, calleeTransport.GetSIPChannels().First().ListeningSIPEndPoint);
                var result = await userAgent.Call(dstUri.ToString(), null, null, rtpSession);
                Assert.True(result);
            }
            finally
            {
                rtpSession?.Close("normal");
                callerTransport?.Shutd


I_CAN_OWN) {
			setTitle(AwesomeFactory.getIconHtml("tasks", I18N.message("workflowtaskspooled")));
		} else if (type == WorkflowDashboard.TASKS_SUSPENDED) {
			setTitle(AwesomeFactory.getIconHtml("cogs", I18N.message("workflowtaskssuspended")));
		} else if (type == WorkflowDashboard.TASKS_ALL) {
			setTitle(AwesomeFactory.getIconHtml("cogs", I18N.message("allworkflows")));
		} else if (type == WorkflowDashboard.TASKS_SUPERVISOR) {
			setTitle(AwesomeFactory.getIconHtml("cogs", I18N.message("workflowsyousupervise")));
		} else if (type == WorkflowDashboard.TASKS_INVOLVED) {
			setTitle(AwesomeFactory.getIconHtml("cogs", I18N.message("workflowsinvolvedin")));
		}

		HeaderControl exportControl = new HeaderControl(HeaderControl.SAVE, event -> GridUtil.exportCSV(list, true));
		exportControl.setTooltip(I18N.message("export"));

		HeaderControl printControl = new HeaderControl(HeaderControl.PRINT, event -> GridUtil.print(list));
		printControl.setTooltip(I18N.message("print"));

		HeaderControl refreshControl = new HeaderControl(HeaderControl.REFRESH, event -> refresh(null));
		refreshControl.setTooltip(I18N.message("refresh"));

		DynamicForm maxSelector = new DynamicForm();
		maxSelector.setNumCols(1);
		maxSelector.setLayoutAlign(Alignment.CENTER);

		max = ItemFactory.newSpinnerItem("max", Session.get().getConfigAsInt("gui.wf.dashlet.rows"));
		max.setMin(0);
		max.setStep(10);
		max.setShowHint(false);
		max.addChangedHandler(event -> refresh(null));
		maxSelector.setItems(max);

		setHeaderControls(HeaderControls.HEADER_LABEL, maxSelector, refreshControl, exportControl, printControl);
	}

	@Override
	public void onDraw() {
		ListGridField workflowDisplay = new ListGridField("workflowLabel", I18N.message("workflow"), 100);
		ListGridField workflow = new ListGridField("workflow", I18N.message("workflowname"), 100);
		workflow.setHidden(true);
		ListGridField id = new IdListGridField();
		ListGridField processId = new ListGridField(PROCESS_ID, I18N.message("processid"), 80);
		processId.setHidden(true);
		ListGridField name = new WorkflowTaskNameListGridField("name", "display", "task", 100);

		ListGridField templateVersion = new VersionListGridField("templateVersion", "version");
		templateVersion.setHidden(true);

		ListGridField pooledAssignees = new ListGridField("pooledassignees", I18N.message("pooledassignees"), 150);
		ListGridField documents = new ListGridField("documents", I18N.message("documents"), 300);
		ListGridField documentIds = new ListGridField("documentIds", I18N.message("documentids"), 200);
		documentIds.setHidden(true);
		ListGridField tag = new ListGridField("tag", I18N.message("tag"), 120);

		ListGridField lastnote = new ListGridField("lastnote", I18N.message("lastnote"), 120);

		DateListGridField startdate = new DateListGridField(STARTDATE, STARTDATE);

		ListGridField duedate = new DateListGridField("duedate", "duedate");

		ListGridField enddate = new DateListGridField("enddate", "enddate");
		enddate.setHidden(true);

		list = new RefreshableListGrid() {
			@Override
			protected String getCellCSSText(ListGridRecord rcd, int rowNum, int colNum) {
				String color = rcd.getAttributeAsString("wfcolor");
				if (color != null && !color.isEmpty()) {
					return "background-c


) {
  Derived1T<T>::Foo();
  Derived2T<T>::Member = 42;
  this->Derived1T<T>::Foo();
  this->Derived2T<T>::Member = 42;
  this->Foo(); // expected-error{{non-static member 'Foo' found in multiple base-class subobjects of type 'BaseT<int>'}}
}

template<typename T>
void Test(DerivedT<T> d) {
  d.template Derived1T<T>::Foo();
  d.template Derived2T<T>::Member = 17;
  d.Inner(); // expected-note{{in instantiation}}
}

template void Test(DerivedT<int>);
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s

struct X { };

template<typename T> T& lvalue();
template<typename T> T&& xvalue();
template<typename T> T prvalue();

// In a .* expression whose object expression is an rvalue, the
// program is ill-formed if the second operand is a pointer to member
// function with ref-qualifier &. In a ->* expression or in a .*
// expression whose object expression is an lvalue, the program is
// ill-formed if the second operand is a pointer to member function
// with ref-qualifier &&.
void test(X *xp, int (X::*pmf)(int), int (X::*l_pmf)(int) &,
          int (X::*r_pmf)(int) &&) {
  // No ref-qualifier.
  (lvalue<X>().*pmf)(17);
  (xvalue<X>().*pmf)(17);
  (prvalue<X>().*pmf)(17);
  (xp->*pmf)(17);

  // Lvalue ref-qualifier.
  (lvalue<X>().*l_pmf)(17);
  (xvalue<X>().*l_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int){{( __attribute__\(\(thiscall\)\))?}} &' can only be called on an lvalue}}
  (prvalue<X>().*l_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int){{( __attribute__\(\(thiscall\)\))?}} &' can only be called on an lvalue}}
  (xp->*l_pmf)(17);

  // Rvalue ref-qualifier.
  (lvalue<X>().*r_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int){{( __attribute__\(\(thiscall\)\))?}} &&' can only be called on an rvalue}}
  (xvalue<X>().*r_pmf)(17);
  (prvalue<X>().*r_pmf)(17);
  (xp->*r_pmf)(17);  // expected-error-re{{pointer-to-member function type 'int (X::*)(int){{( __attribute__\(\(thiscall\)\))?}} &&' can only be called on an rvalue}}
}
// RUN: %clang_cc1 -verify -std=c++11 %s

template<typename T> struct complex {
  complex(T = T(), T = T());
  void operator+=(complex);
  T a, b;
};

void std_example() {
  complex<double> z;
  z = { 1, 2 };
  z += { 1, 2 };

  int a, b;
  a = b = { 1 };
  a = { 1 } = b; // expected-error {{initializer list cannot be used on the left hand side of operator '='}}
  a = a + { 4 }; // expected-error {{initializer list cannot be used on the right hand side of operator '+'}}
  a = { 3 } * { 4 }; // expected-error {{initializer list cannot be used on the left hand side of operator '*'}} \
                        expected-error {{initializer list cannot be used on the right hand side of operator '*'}}
}

struct S {
  constexpr S(int a, int b) : a(a), b(b) {}
  int a, b;
};
struct T {
  constexpr int operator=(


Showing = false;
			var onClose = this._get(inst, 'onClose');
			if (onClose)
				onClose.apply((inst.input ? inst.input[0] : null),
					[(inst.input ? inst.input.val() : ''), inst]);
			this._lastInput = null;
			if (this._inDialog) {
				this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
				if ($.blockUI) {
					$.unblockUI();
					$('body').append(this.dpDiv);
				}
			}
			this._inDialog = false;
		}
	},

	/* Tidy up after a dialog display. */
	_tidyDialog: function(inst) {
		inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');
	},

	/* Close date picker if clicked elsewhere. */
	_checkExternalClick: function(event) {
		if (!$.datepicker._curInst)
			return;

		var $target = $(event.target),
			inst = $.datepicker._getInst($target[0]);

		if ( ( ( $target[0].id != $.datepicker._mainDivId &&
				$target.parents('#' + $.datepicker._mainDivId).length == 0 &&
				!$target.hasClass($.datepicker.markerClassName) &&
				!$target.closest("." + $.datepicker._triggerClass).length &&
				$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
			( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != inst ) )
			$.datepicker._hideDatepicker();
	},

	/* Adjust one of the date sub-fields. */
	_adjustDate: function(id, offset, period) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		if (this._isDisabledDatepicker(target[0])) {
			return;
		}
		this._adjustInstDate(inst, offset +
			(period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
			period);
		this._updateDatepicker(inst);
	},

	/* Action for current link. */
	_gotoToday: function(id) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
			inst.selectedDay = inst.currentDay;
			inst.drawMonth = inst.selectedMonth = inst.currentMonth;
			inst.drawYear = inst.selectedYear = inst.currentYear;
		}
		else {
			var date = new Date();
			inst.selectedDay = date.getDate();
			inst.drawMonth = inst.selectedMonth = date.getMonth();
			inst.drawYear = inst.selectedYear = date.getFullYear();
		}
		this._notifyChange(inst);
		this._adjustDate(target);
	},

	/* Action for selecting a new month/year. */
	_selectMonthYear: function(id, select, period) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		inst['selected' + (period == 'M' ? 'Month' : 'Year')] =
		inst['draw' + (period == 'M' ? 'Month' : 'Year')] =
			parseInt(select.options[select.selectedIndex].value,10);
		this._notifyChange(inst);
		this._adjustDate(target);
	},

	/* Action for selecting a day. */
	_selectDay: function(id, month, year, td) {
		var target = $(id);
		if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
			return;
		}
		var inst = this._getInst(target[0]);
		inst.selectedDay = inst.currentDay = $('a', td).html();
		inst.selectedMonth = inst.currentMonth = month;
		inst.selectedYear = inst.currentYear = year;
		this._selectDate(id, this._formatDate(inst,
			inst.current


 bytes');
  return byteData.buffer.asUint8List();
}

/// Convert raw RGBA bytes to List<[r,g,b]> (drop alpha)
List<List<int>> _rgbaToRgbList(Uint8List rgba) {
  final out = <List<int>>[];
  for (int i = 0; i + 3 < rgba.length; i += 4) {
    final r = rgba[i];
    final g = rgba[i + 1];
    final b = rgba[i + 2];
    out.add([r, g, b]);
  }
  return out;
}

/// -------------------- Simple KMeans --------------------
/// Signature now accepts named parameters for clarity (maxIters, seed)
List<Map<String, dynamic>> _kMeansPalette(
  List<List<int>> pixels,
  int k, {
  int maxIters = 10,
  int seed = 0,
}) {
  final rnd = Random(seed);
  if (pixels.isEmpty) return <Map<String, dynamic>>[];

  // If there are fewer unique colors than k, reduce k
  final unique = <int>{};
  for (var p in pixels) {
    unique.add((p[0] << 16) | (p[1] << 8) | p[2]);
  }
  final effectiveK = min(k, unique.length);

  // initialize centers by random pixels
  final centers = <List<double>>[];
  final usedIdx = <int>{};
  while (centers.length < effectiveK) {
    final idx = rnd.nextInt(pixels.length);
    if (usedIdx.contains(idx)) continue;
    usedIdx.add(idx);
    final px = pixels[idx];
    centers.add([px[0].toDouble(), px[1].toDouble(), px[2].toDouble()]);
  }

  var labels = List<int>.filled(pixels.length, -1);

  for (int iter = 0; iter < maxIters; iter++) {
    bool changed = false;
    // assign
    for (int i = 0; i < pixels.length; i++) {
      final p = pixels[i];
      double bestDist = double.infinity;
      int best = 0;
      for (int c = 0; c < centers.length; c++) {
        final dx = centers[c][0] - p[0];
        final dy = centers[c][1] - p[1];
        final dz = centers[c][2] - p[2];
        final d = dx * dx + dy * dy + dz * dz;
        if (d < bestDist) {
          bestDist = d;
          best = c;
        }
      }
      if (labels[i] != best) {
        labels[i] = best;
        changed = true;
      }
    }

    // update
    final sums = List.generate(centers.length, (_) => <double>[0.0, 0.0, 0.0]);
    final counts = List<int>.filled(centers.length, 0);
    for (int i = 0; i < pixels.length; i++) {
      final l = labels[i];
      sums[l][0] += pixels[i][0];
      sums[l][1] += pixels[i][1];
      sums[l][2] += pixels[i][2];
      counts[l] += 1;
    }
    for (int c = 0; c < centers.length; c++) {
      if (counts[c] == 0) {
        // re-seed empty cluster
        final idx = rnd.nextInt(pixels.length);
        centers[c] = [
          pixels[idx][0].toDouble(),
          pixels[idx][1].toDouble(),
          pixels[idx][2].toDouble()
        ];
      } else {
        centers[c][0] = sums[c][0] / counts[c];
        centers[c][1] = sums[c][1] / counts[c];
        centers[c][2] = sums[c][2] / counts[c];


/* ecc-mul-g.c

   Copyright (C) 2013 Niels Möller

   This file is part of GNU Nettle.

   GNU Nettle is free software: you can redistribute it and/or
   modify it under the terms of either:

     * the GNU Lesser General Public License as published by the Free
       Software Foundation; either version 3 of the License, or (at your
       option) any later version.

   or

     * the GNU General Public License as published by the Free
       Software Foundation; either version 2 of the License, or (at your
       option) any later version.

   or both in parallel, as here.

   GNU Nettle is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received copies of the GNU General Public License and
   the GNU Lesser General Public License along with this program.  If
   not, see http://www.gnu.org/licenses/.
*/

/* Development of Nettle's ECC support was funded by the .SE Internet Fund. */

#if HAVE_CONFIG_H
# include "config.h"
#endif

#include <assert.h>

#include "ecc.h"
#include "ecc-internal.h"

void
ecc_mul_g (const struct ecc_curve *ecc, mp_limb_t *r,
	   const mp_limb_t *np, mp_limb_t *scratch)
{
  /* Scratch need determined by the ecc_add_jja call. Current total is
     9 * ecc->p.size, at most 648 bytes. */
#define tp scratch
#define scratch_out (scratch + 3*ecc->p.size)

  unsigned k, c;
  unsigned i, j;
  unsigned bit_rows;

  int is_zero;

  k = ecc->pippenger_k;
  c = ecc->pippenger_c;

  bit_rows = (ecc->p.bit_size + k - 1) / k;

  mpn_zero (r, 3*ecc->p.size);

  for (i = k, is_zero = 1; i-- > 0; )
    {
      ecc_dup_jj (ecc, r, r, scratch);
      for (j = 0; j * c < bit_rows; j++)
	{
	  unsigned bits;
	  /* Avoid the mp_bitcnt_t type for compatibility with older GMP
	     versions. */
	  unsigned bit_index;

	  /* Extract c bits from n, stride k, starting at i + kcj,
	     ending at i + k (cj + c - 1)*/
	  for (bits = 0, bit_index = i + k*(c*j+c); bit_index > i + k*c*j; )
	    {
	      mp_size_t limb_index;
	      unsigned shift;

	      bit_index -= k;

	      limb_index = bit_index / GMP_NUMB_BITS;
	      if (limb_index >= ecc->p.size)
		continue;

	      shift = bit_index % GMP_NUMB_BITS;
	      bits = (bits << 1) | ((np[limb_index] >> shift) & 1);
	    }
	  sec_tabselect (tp, 2*ecc->p.size,
			 (ecc->pippenger_table
			  + (2*ecc->p.size * (mp_size_t) j << c)),
			 1<<c, bits);
	  cnd_copy (is_zero, r, tp, 2*ecc->p.size);
	  cnd_copy (is_zero, r + 2*ecc->p.size, ecc->unit, ecc->p.size);

	  ecc_add_jja (ecc, tp, r, tp, scratch_out);
	  /* Use the sum when valid. ecc_add_jja produced garbage if
	     is_zero != 0 or bits == 0, . */
	  cnd_copy (bits & (is_zero - 1), r, tp, 3*ecc->p.size);
	  is_zero &= (bits == 0);
	}
    }
#undef tp
#undef scratch_out
}


(Vec3Tests, testVec3IndexOperator) {
    Vec3 x1 (1, 2, 3);
    EXPECT_EQ(x1[0], 1);
    EXPECT_EQ(x1[1], 2);
    EXPECT_EQ(x1[2], 3);
}

TEST(Vec3Tests, testSquaredDistanceBetween) {
    EXPECT_EQ(Vec3::squaredDistanceBetween(Vec3{1.0f, 2.0f, 3.0f}, Vec3{10.0f, 30.0f, 5.0f}), 9*9 + 28*28 + 2*2);
}

TEST(Vec3Tests, testDistanceBetween) {
    EXPECT_EQ(Vec3::distanceBetween(Vec3{9.0f, 2.0f, 3.0f}, Vec3{10.0f, 4.0f, 5.0f}), 3.0f);
}
/*
Copyright 2020 Standard Cyborg

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.
*/

#include <standard_cyborg/util/DebugHelpers.hpp>
#include <map>
#include <algorithm>
#include <sstream>

#include <standard_cyborg/math/Mat3x4.hpp>
#include <standard_cyborg/math/Mat4x4.hpp>
#include <standard_cyborg/math/Mat3x3.hpp>
#include <standard_cyborg/math/Vec2.hpp>
#include <standard_cyborg/math/Vec3.hpp>
#include <standard_cyborg/math/Vec4.hpp>
#include <standard_cyborg/math/Quaternion.hpp>
#include <standard_cyborg/sc3d/BoundingBox3.hpp>
#include <standard_cyborg/sc3d/ColorImage.hpp>
#include <standard_cyborg/sc3d/DepthImage.hpp>
#include <standard_cyborg/sc3d/Face3.hpp>
#include <standard_cyborg/sc3d/Geometry.hpp>
#include <standard_cyborg/sc3d/MeshTopology.hpp>
#include <standard_cyborg/sc3d/Plane.hpp>
#include <standard_cyborg/sc3d/Polyline.hpp>
#include <standard_cyborg/sc3d/VertexSelection.hpp>
#include <standard_cyborg/sc3d/Point2D.hpp>
#include <standard_cyborg/sc3d/Size2D.hpp>
#include <standard_cyborg/sc3d/Rect2D.hpp>
#include <standard_cyborg/sc3d/PerspectiveCamera.hpp>
#include <standard_cyborg/sc3d/Landmark.hpp>
#include <standard_cyborg/scene_graph/SceneGraph.hpp>

#include <iomanip>

using namespace standard_cyborg;
using namespace standard_cyborg::math;
using namespace standard_cyborg::sc3d;
using namespace


)

    domainTx.toBesu().also { besuTx ->
      assertThat(besuTx.type).isEqualTo(org.hyperledger.besu.datatypes.TransactionType.EIP1559)
      assertThat(besuTx.nonce).isEqualTo(0x0L)
      assertThat(besuTx.gasPrice.getOrNull()).isNull()
      assertThat(besuTx.maxFeePerGas.getOrNull()).isEqualTo(Wei.of(0xeL))
      assertThat(besuTx.maxPriorityFeePerGas.getOrNull()).isEqualTo(Wei.of(0x0L))
      assertThat(besuTx.gasLimit).isEqualTo(0x29e2f7L)
      assertThat(besuTx.to.getOrNull()).isNull()
      assertThat(besuTx.value).isEqualTo(Wei.of(0x0L))
      assertThat(besuTx.payload).isEqualTo(Bytes.fromHexString("0x60806040523480156200001157600080fd5b506200001c"))
      assertThat(besuTx.signature.r).isEqualTo(
        "0x1fa31b9272cc67174efb129c2fd2ec5afda122503745beb22bd26e48a42240bb".toBigIntegerFromHex(),
      )
      assertThat(besuTx.signature.s).isEqualTo(
        "0x248c9cdf9352b4a379577c5b44bcb25a5350dc6722fd7b2aec40e193f670e4f4".toBigIntegerFromHex(),
      )
      assertThat(besuTx.signature.recId).isEqualTo(0)
      assertThat(besuTx.chainId.getOrNull()).isEqualTo(0x539L)
    }
  }

  @Test
  fun `should map frontier transactions`() {
    val txWeb3j = serialize(
      """
      {
        "blockHash": "0x004257e560a5f82595dddb73f752b904efef4b73cb3ece1469f5e5091e3c9665",
        "blockNumber": "0xe1d30",
        "chainId": "0xe705",
        "from": "0x228466f2c715cbec05deabfac040ce3619d7cf0b",
        "gas": "0x5208",
        "gasPrice": "0xee2d984",
        "hash": "0x5d3b5e1ae3e4ea5612e6907cb09c4e0e5482171b4c2af794e17b77314547bb79",
        "input": "0x",
        "nonce": "0x97411",
        "r": "0xdf28597129341d5d345c9043c7d0b0a22be82cac13988cfc1d8cbdaf3ab3f35b",
        "s": "0x3189b2ff80d8f728d6fb7503b46734ee77a60a42db01d0b09db10bdc9d5caa44",
        "to": "0x228466f2c715cbec05deabfac040ce3619d7cf0b",
        "transactionIndex": "0x0",
        "type": "0x0",
        "v": "0x1ce2e",
        "value": "0x186a0"
      }
      """.trimIndent(),
    )
    val domainTx = txWeb3j.toDomain()
    assertThat(domainTx).isEqualTo(
      Transaction(
        nonce = 0x97411UL,
        gasPrice = 0xee2d984UL,
        gasLimit = 0x5208UL,
        to = "0x228466f2c715cbec05deabfac040ce3619d7cf0b".decodeHex(),
        value = 0x186a0UL.toBigInteger(),
        input = "0x".decodeHex(),
        r = "0xdf28597129341d5d345c9043c7d0b0a22be82cac13988cfc1d8cbda


 {}", err);
                std::process::exit(-1);
            }
        }
        ("dump-cancel-challenge-tx", Some(m)) => {
            let godwoken_rpc_url = m.value_of("godwoken-rpc-url").unwrap();
            let block = ChallengeBlock::from_str(m.value_of("block").unwrap()).unwrap();
            let index = u32::from_str(m.value_of("index").unwrap()).unwrap();
            let type_ = match m.value_of("type").unwrap() {
                "tx_execution" => ChallengeTargetType::TxExecution,
                "tx_signature" => ChallengeTargetType::TxSignature,
                "withdrawal" => ChallengeTargetType::Withdrawal,
                _ => panic!("invalid challenge target type"),
            };
            let output = Path::new(m.value_of("output").unwrap());

            if let Err(err) = dump_tx::dump_tx(godwoken_rpc_url, block, index, type_, output) {
                log::error!("Dump offchain cancel challenge tx: {}", err);
                std::process::exit(-1);
            };
        }
        ("stat-custodian-ckb", Some(m)) => {
            let indexer_rpc_url = m.value_of("indexer-rpc-url").unwrap();
            let rollup_type_hash = cli_args::to_h256(m.value_of("rollup-type-hash").unwrap())?;
            let custodian_script_type_hash =
                cli_args::to_h256(m.value_of("custodian-script-type-hash").unwrap())?;
            let min_capacity: u64 = m.value_of("min-capacity").unwrap_or_default().parse()?;
            let rpc_client = CKBIndexerClient::new(HttpClient::new(indexer_rpc_url)?);

            let alias: HashMap<ckb_types::bytes::Bytes, String> = [
                (
                    "USDC",
                    "5c4ac961a2428137f27271cf2af205e5c55156d26d9ac285ed3170e8c4cc1501",
                ),
                (
                    "USDT",
                    "1b89ae72b96c4f02fa7667ab46febcedf9b495737752176303ddd215d66a615a",
                ),
                (
                    "TAI",
                    "08430183dda1cbd81912c4762a3006a59e2291d5bd43b48bb7fa7544cace9e4a",
                ),
                (
                    "ETH",
                    "9657b32fcdc463e13ec9205914fd91c443822a949937ae94add9869e7f2e1de8",
                ),
                (
                    "dCKB",
                    "e5451c05231e1df43e4b199b5d12dbed820dfbea2769943bb593f874526eeb55",
                ),
            ]
            .iter()
            .map(|(symbol, script_args)| {
                (
                    hex::decode(&script_args).unwrap().into(),
                    symbol.to_string(),
                )
            })
            .collect();

            let stat = stat::stat_custodian_cells(
                &rpc_client,
                &rollup_type_hash.into(),
                &custodian_script_type_hash.into(),
                Some(min_capacity),
            )?;

            let ckb = stat.total_capacity / ONE_CKB as u128;
            let shannon = stat.total_capacity - (ckb * ONE_CKB as u128);
            println!("Cells count: {}", stat.cells_count);
            println!("Total custodian: {}.{:0>8} CKB", ckb, shannon);
            println!("CKB cells count: {}", stat.ckb_cells_count);
            if !stat.sudt_stat.is_empty() {
                println!("========================================");


connector/connector_callbacks.dart';
part 'src/purchase_connector/missing_configuration_exception.dart';
part 'src/purchase_connector/purchase_connector_configuration.dart';
part 'src/purchase_connector/store_kit_version.dart';
part 'src/purchase_connector/models/subscription_purchase.dart';
part 'src/purchase_connector/models/in_app_purchase_validation_result.dart';
part 'src/purchase_connector/models/product_purchase.dart';
part 'src/purchase_connector/models/subscription_validation_result.dart';
part 'src/purchase_connector/models/validation_failure_data.dart';
part 'src/purchase_connector/models/jvm_throwable.dart';
part 'src/purchase_connector/models/ios_error.dart';
part 'src/appsflyer_consent.dart';
part 'src/appsflyer_request_listener.dart';
part 'appsflyer_sdk.g.dart';
part 'src/appsflyer_ad_revenue_data.dart';
part 'src/af_purchase_details.dart';
part of appsflyer_sdk;

class AppsflyerSdk {
  EventChannel _eventChannel;
  static AppsflyerSdk? _instance;
  final MethodChannel _methodChannel;
  bool _isSdkStarted = false;

  AppsFlyerOptions? afOptions;
  Map? mapOptions;

  ///Returns the [AppsflyerSdk] instance, initialized with a custom options
  ///provided by the user
  factory AppsflyerSdk(options) {
    if (_instance == null) {
      MethodChannel methodChannel =
          const MethodChannel(AppsflyerConstants.AF_METHOD_CHANNEL);

      EventChannel eventChannel =
          EventChannel(AppsflyerConstants.AF_EVENTS_CHANNEL);

      //check if the option variable is AFOptions type or map type
      assert(options is AppsFlyerOptions || options is Map);
      if (options is AppsFlyerOptions) {
        _instance = AppsflyerSdk.private(methodChannel, eventChannel,
            afOptions: options);
      } else if (options is Map) {
        _instance = AppsflyerSdk.private(methodChannel, eventChannel,
            mapOptions: options);
      }
    }
    return _instance!;
  }

  @visibleForTesting
  AppsflyerSdk.private(this._methodChannel, this._eventChannel,
      {this.afOptions, this.mapOptions});

  /// Validates [AppsFlyerOptions] and converts them to a map acceptable for the AppsFlyer SDK.
  Map<String, dynamic> _validateAFOptions(AppsFlyerOptions options) {
    Map<String, dynamic> validatedOptions = {};

    bool? manualStart = options.manualStart;
    if (manualStart != null) {
      validatedOptions[AppsflyerConstants.AF_MANUAL_START] = manualStart;
    }

    //validations
    dynamic devKey = options.afDevKey;
    assert(devKey != null);
    assert(devKey is String);

    validatedOptions[AppsflyerConstants.AF_DEV_KEY] = devKey;

    dynamic appInviteOneLink = options.appInviteOneLink;
    if (appInviteOneLink != null) {
      assert(appInviteOneLink is String);
    }

    validatedOptions[AppsflyerConstants.APP_INVITE_ONE_LINK] = appInviteOneLink;

    if (options.disableCollectASA != null) {
      validatedOptions[AppsflyerConstants.DISABLE_COLLECT_ASA] =
          options.disableCollectASA;
    }

    if (options.disableAdvertisingIdentifier != null) {
      validatedOptions[AppsflyerConstants.DISABLE_ADVERTISING_IDENTIFIER] =
          options.disableAdvertisingIdentifier;
    } else {
      validatedOptions[AppsflyerConstants.DISABLE_ADVERTISING_IDENTIFIER] =
          false;
    }

    if (Platform.isIOS) {
      if (options.timeToWaitForATTUserAuthorization != null) {
        dynamic timeToWaitForATTUserAuthorization =


ctor rhoncus nibh condimentum mollis. Aliquam consequat enim at metus luctus, a eleifend purus egestas. Curabitur at nibh metus. Nam bibendum, neque at auctor tristique, lorem libero aliquet arcu, non interdum tellus lectus sit amet eros. Cras rhoncus, metus ac ornare cursus, dolor justo ultrices metus, at ullamcorper volutpat",
		output: "B904004C6F72656D20697073756D20646F6C6F722073697420616D65742C20636F6E73656374657475722061646970697363696E6720656C69742E20437572616269747572206D6175726973206D61676E612C20737573636970697420736564207665686963756C61206E6F6E2C20696163756C697320666175636962757320746F72746F722E2050726F696E20737573636970697420756C74726963696573206D616C6573756164612E204475697320746F72746F7220656C69742C2064696374756D2071756973207472697374697175652065752C20756C7472696365732061742072697375732E204D6F72626920612065737420696D70657264696574206D6920756C6C616D636F7270657220616C6971756574207375736369706974206E6563206C6F72656D2E2041656E65616E2071756973206C656F206D6F6C6C69732C2076756C70757461746520656C6974207661726975732C20636F6E73657175617420656E696D2E204E756C6C6120756C74726963657320747572706973206A7573746F2C20657420706F73756572652075726E6120636F6E7365637465747572206E65632E2050726F696E206E6F6E20636F6E76616C6C6973206D657475732E20446F6E65632074656D706F7220697073756D20696E206D617572697320636F6E67756520736F6C6C696369747564696E2E20566573746962756C756D20616E746520697073756D207072696D697320696E206661756369627573206F726369206C756374757320657420756C74726963657320706F737565726520637562696C69612043757261653B2053757370656E646973736520636F6E76616C6C69732073656D2076656C206D617373612066617563696275732C2065676574206C6163696E6961206C616375732074656D706F722E204E756C6C61207175697320756C747269636965732070757275732E2050726F696E20617563746F722072686F6E637573206E69626820636F6E64696D656E74756D206D6F6C6C69732E20416C697175616D20636F6E73657175617420656E696D206174206D65747573206C75637475732C206120656C656966656E6420707572757320656765737461732E20437572616269747572206174206E696268206D657475732E204E616D20626962656E64756D2C206E6571756520617420617563746F7220747


###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Crossbar.io Technologies GmbH
#
# 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.
#
###############################################################################

__version__ = u'19.11.2'


 Remove the item at the top of the stack and return it as a byte buffer
    T pop() {
        return _list.removeLast();
    }

    /// Removes items from the stack and optionally inserts new values
    ///
    /// `index` - starting index for items to be removed
    ///
    /// `howMany` - the number of items to be removed
    ///
    /// `values`  - an optional List of new items to add to the stack, or null if no items need insertion
    List<T> splice(int index, int howMany, {T? values}) {
        List<T> buffer = _list.toList();

        List<T> removedItems = buffer.getRange(index, index+howMany).toList();
        buffer.removeRange(index, index+howMany);

        if (values != null) {
            buffer.insert(index, values);
        }
        this._list = List<T>.from(buffer);

        return removedItems;

    }

    /*
     Index here counts backwards into the list. So effectively "index" items
     deep into the stack.
     */
    T removeAt(int index){

      if (_list.length - index - 1 >= 0) {
        return _list.removeAt(_list.length - index - 1);
      }else{
        throw Exception("Invalid ");
      }

    }

    /// Replace item at 'index' with 'value'
    /*
    void replaceAt(int index, T value) {
        List<T> buffer = _list.toList();
        buffer.removeAt(index);
        buffer.insert(index, value);
        _list = List<T>.from(buffer);
    }

     */

  bool contains(T item) {
        return _list.contains(item);

  }

  void add(T item) {
    push(item);
  }

  T getLast() => _list.last;

  T pollLast() {
      return _list.removeLast();
  }

  int size() {
      return _list.length;
  }

  void set(int index, T item) {
      _list[index] = item;
  }

  T getFirst() {
    return _list.first;
  }

  T pollFirst() {
    return _list.removeAt(0);
  }

  Iterator<T> descendingIterator() {
    return _list.reversed.iterator;
  }

  T getAt(int index) {
    return _list[index];
  }

  String toString(){
    return _list.fold("", (previousValue, element) => " ${previousValue} ${element}");
  }

    /**
     * Copy the element at index to top of stack
     */
  void copyToTop(int index) {
    add(_list[_list.length - index -1]);
  }

    /**
     * Move the element at index to top of the stack
     */
  void moveToTop(int index) {
    var item = _list.removeAt(_list.length - index -1);
    _list.add(item);
  }

}

import 'dart:typed_data';

import 'package:collection/collection.dart';
import 'package:dartsv/dartsv.dart';
import 'package:dartsv/src/encoding/utils.dart';
import 'package:dartsv/src/script/svscript.dart';
import 'package:dartsv/src/transaction/signed_unlock_builder.dart';
import 'package:dartsv/src/transaction/transaction_output.dart';
import 'package:hex/hex.dart';
import 'package:buffer/buffer.dart';

import 'default_builder.dart';
import 'transaction.dart';

/// Class that represents the "input" to a transaction.
///
/// In bitcoin the transaction inputs of a new transaction are formed
/// from what was the output of the previous transaction that we are
/// "spending" from. In this way a chain of transactions are formed,
/// and because each transaction contains a signature in the input,
/// a chain of digital signatures representing change of ownership
/// from one transaction to the next is also captured.
///
class TransactionInput {

    UnlockingScriptBuilder? _unlockingScriptBuilder;

    /**
     * BIP68: If this flag set, sequence is NOT interpreted as a relative lock-time.
     */
    static final int SEQUENCE_LOC


/*============================================================================

This C source file is part of TestFloat, Release 3e, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.

Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
California.  All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

 1. Redistributions of source code must retain the above copyright notice,
    this list of conditions, and the following disclaimer.

 2. Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions, and the following disclaimer in the documentation
    and/or other materials provided with the distribution.

 3. Neither the name of the University nor the names of its contributors may
    be used to endorse or promote products derived from this software without
    specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

=============================================================================*/

#include <stdint.h>
#include "platform.h"
#include "softfloat.h"
#include "genCases.h"
#include "verCases.h"
#include "writeCase.h"
#include "testLoops.h"

#ifdef EXTFLOAT80

#pragma STDC FENV_ACCESS ON

void
 test_a_ui64_z_extF80(
     void trueFunction( uint64_t, extFloat80_t * ),
     void subjFunction( uint64_t, extFloat80_t * )
 )
{
    int count;
    extFloat80_t trueZ;
    uint_fast8_t trueFlags;
    extFloat80_t subjZ;
    uint_fast8_t subjFlags;

    genCases_ui64_a_init();
    genCases_writeTestsTotal( testLoops_forever );
    verCases_errorCount = 0;
    verCases_tenThousandsCount = 0;
    count = 10000;
    while ( ! genCases_done || testLoops_forever ) {
        genCases_ui64_a_next();
        *testLoops_trueFlagsPtr = 0;
        trueFunction( genCases_ui64_a, &trueZ );
        trueFlags = *testLoops_trueFlagsPtr;
        testLoops_subjFlagsFunction();
        subjFunction( genCases_ui64_a, &subjZ );
        subjFlags = testLoops_subjFlagsFunction();
        --count;
        if ( ! count ) {
            verCases_perTenThousand();
            count = 10000;
        }
        if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
            if (
                   verCases_checkNaNs
                || ! extF80M_isNaN( &trueZ )
                || ! extF80M_isNaN( &subjZ )
                || extF80M_isSignalingNaN( &subjZ )
                || (trueFlags != subjFlags)
            ) {
                ++verCases_errorCount;
                verCases_writeErrorFound( 10000 - count );
                writeCase_a_ui64( genCases_ui64_a, "\n\t" );
                writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
                if ( verCases_errorCount == verCases_maxErrorCount ) break;
            }
        }
    }
    verCases_writeTestsPerformed( 10000 - count );

}

#endif


ProgrammaticWindowsMDMUnenrollment)
		if meta.shouldEnroll {
			require.Contains(t, resp.Notifications.WindowsMDMDiscoveryEndpoint, microsoft_mdm.MDE2DiscoveryPath)
		} else {
			require.Empty(t, resp.Notifications.WindowsMDMDiscoveryEndpoint)
		}
	}

	// turn on MDM for another host
	orbitHost, _ := createWindowsHostThenEnrollMDM(s.ds, s.server.URL, t)

	// disable Microsoft MDM
	s.DoJSON("PATCH", "/api/latest/fleet/config", json.RawMessage(`{
		"mdm": { "windows_enabled_and_configured": false }
  }`), http.StatusOK, &acResp)
	assert.False(t, acResp.MDM.WindowsEnabledAndConfigured)
	assert.False(t, acResp.MDM.WindowsMigrationEnabled)
	s.lastActivityOfTypeMatches(fleet.ActivityTypeDisabledWindowsMDM{}.ActivityName(), `{}`, 0)

	// get the orbit config for that MDM-enrolled host returns true for the
	// unenrollment notification
	var resp orbitGetConfigResponse
	s.DoJSON("POST", "/api/fleet/orbit/config",
		json.RawMessage(fmt.Sprintf(`{"orbit_node_key": %q}`, *orbitHost.OrbitNodeKey)),
		http.StatusOK, &resp)
	require.True(t, resp.Notifications.NeedsProgrammaticWindowsMDMUnenrollment)
	require.False(t, resp.Notifications.NeedsProgrammaticWindowsMDMEnrollment)
	require.False(t, resp.Notifications.NeedsMDMMigration)
	require.Empty(t, resp.Notifications.WindowsMDMDiscoveryEndpoint)

	// get the orbit config for each host, only the fleet-enrolled ones get the unenrollment,
	// and none get enrollment/migration (because MDM is now off).
	for _, meta := range metadataHosts {
		var resp orbitGetConfigResponse
		s.DoJSON("POST", "/api/fleet/orbit/config",
			json.RawMessage(fmt.Sprintf(`{"orbit_node_key": %q}`, *hostsBySuffix[meta.suffix].OrbitNodeKey)),
			http.StatusOK, &resp)
		require.False(t, resp.Notifications.NeedsProgrammaticWindowsMDMEnrollment)
		require.False(t, resp.Notifications.NeedsMDMMigration)
		if meta.enrolledName == fleet.WellKnownMDMFleet {
			require.True(t, resp.Notifications.NeedsProgrammaticWindowsMDMUnenrollment)
		} else {
			require.False(t, resp.Notifications.NeedsProgrammaticWindowsMDMUnenrollment)
		}
		require.Empty(t, resp.Notifications.WindowsMDMDiscoveryEndpoint)
	}
}

func (s *integrationMDMTestSuite) TestOrbitConfigNudgeSettings() {
	t := s.T()

	// ensure the config is empty before starting
	s.applyConfig([]byte(`
  mdm:
    macos_updates:
      deadline: ""
      minimum_version: ""
 `))

	var resp orbitGetConfigResponse
	// missing orbit key
	s.DoJSON("POST", "/api/fleet/orbit/config", nil, http.StatusUnauthorized, &resp)

	// nudge config is empty if macos_updates is not set, and Windows MDM notifications are unset
	h := createOrbitEnrolledHost(t, "darwin", "h", s.ds)

	err := s.ds.UpdateHostOperatingSystem(context.Background(), h.ID, fleet.OperatingSystem{Platform: "darwin", Version: "12.0"})
	require.NoError(t, err)

	resp = orbitGetConfigResponse{}
	s.DoJSON("POST", "/api/f


.include "macros.inc"

.section .text, "ax"  # 0x80006980 - 0x803E1E60

.global NWC24FOpen
NWC24FOpen:
/* 80301B48 002FD7A8  94 21 FF E0 */	stwu r1, -0x20(r1)
/* 80301B4C 002FD7AC  7C 08 02 A6 */	mflr r0
/* 80301B50 002FD7B0  28 05 00 09 */	cmplwi r5, 9
/* 80301B54 002FD7B4  90 01 00 24 */	stw r0, 0x24(r1)
/* 80301B58 002FD7B8  38 00 00 00 */	li r0, 0
/* 80301B5C 002FD7BC  93 E1 00 1C */	stw r31, 0x1c(r1)
/* 80301B60 002FD7C0  7C BF 2B 78 */	mr r31, r5
/* 80301B64 002FD7C4  93 C1 00 18 */	stw r30, 0x18(r1)
/* 80301B68 002FD7C8  7C 9E 23 78 */	mr r30, r4
/* 80301B6C 002FD7CC  93 A1 00 14 */	stw r29, 0x14(r1)
/* 80301B70 002FD7D0  7C 7D 1B 78 */	mr r29, r3
/* 80301B74 002FD7D4  80 CD AF 80 */	lwz r6, lbl_80640240-_SDA_BASE_(r13)
/* 80301B78 002FD7D8  38 C6 00 01 */	addi r6, r6, 1
/* 80301B7C 002FD7DC  64 C4 80 00 */	oris r4, r6, 0x8000
/* 80301B80 002FD7E0  90 8D AF 80 */	stw r4, lbl_80640240-_SDA_BASE_(r13)
/* 80301B84 002FD7E4  90 83 00 00 */	stw r4, 0(r3)
/* 80301B88 002FD7E8  90 03 00 08 */	stw r0, 8(r3)
/* 80301B8C 002FD7EC  90 A3 00 04 */	stw r5, 4(r3)
/* 80301B90 002FD7F0  41 82 00 18 */	beq lbl_80301BA8
/* 80301B94 002FD7F4  28 05 00 0A */	cmplwi r5, 0xa
/* 80301B98 002FD7F8  41 82 00 10 */	beq lbl_80301BA8
/* 80301B9C 002FD7FC  38 05 FE F7 */	addi r0, r5, -265
/* 80301BA0 002FD800  28 00 00 01 */	cmplwi r0, 1
/* 80301BA4 002FD804  41 81 00 24 */	bgt lbl_80301BC8
lbl_80301BA8:
/* 80301BA8 002FD808  48 00 17 3D */	bl NWC24IsMsgLibOpened
/* 80301BAC 002FD80C  2C 03 00 00 */	cmpwi r3, 0
/* 80301BB0 002FD810  40 82 00 18 */	bne lbl_80301BC8
/* 80301BB4 002FD814  48 00 17 45 */	bl NWC24IsMsgLibOpenedByTool
/* 80301BB8 002FD818  2C 03 00 00 */	cmpwi r3, 0
/* 80301BBC 002FD81C  40 82 00 0C */	bne lbl_80301BC8
/* 80301BC0 002FD820  38 60 FF F7 */	li r3, -9
/* 80301BC4 002FD824  48


d" || (typeof resource[key] === 'object' && resource[key] instanceof ObjectID)) {
                resource[key] = { "$oid": resource[key].toString() };
            } else if (!Array.isArray(resource[key]) && resource[key] && !resource["exampleSentences"] && resource[key].toString() && resource[key].toString().match(/^[a-f\d]{24}$/i)) {
                resource[key] = { "$oid": resource[key].toString() };
            } else if (typeof resource[key] === 'object') {
                if (key === "lexica") {
                    resource[key]._id = { "$oid": resource[key]._id.toString() };
                } else {
                    resource[key] = recursiveReplacer(resource[key]);
                }
            }
        });
    }
    return resource;
}

/**
 * Converts ObjectIDs in a JSON file to correct format for import
 * @param resource Resource object to check
 */
export function replaceObjectIDs(resource: any): any {
    let clonedResource = recursiveReplacer(_.cloneDeep(resource));
    return clonedResource;
}

/**
 * Checks for dependencies such as Cognigy Lexicons and Cognigy Flows
 * These dependencies must be mapped in dependencyReplacements.json, otherwise an error is thrown
 * @param resource Flow to check
 */
export function checkFlowDependencies(resource: any): any {
    // Check if there are Cognigy lexica and if yes, check if they are in the dependency map
    if (resource && resource.lexica && resource.lexica.cognigy && Array.isArray(resource.lexica.cognigy) && resource.lexica.cognigy.length > 0) {
        // there are attached Cognigy Lexica
        resource.lexica.cognigy.forEach((value, index, sourceArray) => {
            if (dependencyReplacements[value]) sourceArray[index] = dependencyReplacements[value];
            else {
                if (process.env.ABORT_ON_ERROR) {
                    logRed(`Missing dependency mapping in dependencyReplacements.json: COGNIGGY LEXICON ${value}\nPlease add this resource to the file.\nAborting...`);
                    process.exit(0);
                } else {
                    logYellow(`Missing dependency mapping in dependencyReplacements.json: COGNIGGY LEXICON ${value}\nPlease add this resource to the file.`);
                }
            }
        });
    }

    // Check if there are Cognigy attached Flows and if yes, check if they are in the dependency map
    if (resource && resource.attachedFlows && resource.attachedFlows.cognigy && Array.isArray(resource.attachedFlows.cognigy) && resource.attachedFlows.cognigy.length > 0) {
        // there are attached Cognigy Flows
        resource.attachedFlows.cognigy.forEach((value, index, sourceArray) => {
            if (dependencyReplacements[value]) sourceArray[index] = dependencyReplacements[value];
            else {
                if (process.env.ABORT_ON_ERROR) {
                    logRed(`Missing dependency mapping in dependencyReplacements.json: ATTACHED COGNIGY FLOW ${value}\nPlease add this resource to the file.\nAborting...`);
                    process.exit(0);
                } else {
                    logYellow(`Missing dependency mapping in dependencyReplacements.json: ATTACHED COGNIGY FLOW ${value}\nPlease add this resource to the file.`);
                }
            }
        });
    }
}import { ErrorMapper } from "utils/ErrorMapper";
import * as _ from "lodash";
import roleHarvester from "./role.harvester";
import roleUpgrader from "./role.upgrader";

declare global {
  /*
    Example types, expand on these or remove them and add your own.
    Note: Values, properties defined here do no fully *exist* by this type definiton alone.
          You must also give them an implemention if you would like to use them. (ex. actually setting a `role` property in a Creeps memory)

    Types added


rintln(err1)
		}
	}()
	return
}
package graph

func shadowGraph(roads [][]int) [][]int {
	shadow := make([][]int, len(roads))
	for i := 0; i < len(roads); i++ {
		nexts := roads[i]
		for j := 0; j < len(nexts); j++ {
			peer := nexts[j]
			shadow[peer] = append(shadow[peer], i)
		}
	}
	return shadow
}

const fakeID = -1

type biNode struct {
	prev, next *biNode
	id         int
}

type context struct {
	roads [][]int
	book  []biNode
	knot  *biNode
	parts [][]int
}

func doDFS(doit func(*context, int), ctx *context, curr int) {
	node := &ctx.book[curr]
	node.id = fakeID
	node.prev.next, node.next.prev = node.next, node.prev

	nexts := ctx.roads[curr]
	for i := 0; i < len(nexts); i++ {
		peer := nexts[i]
		if ctx.book[peer].id != fakeID {
			doit(ctx, peer)
		}
	}
}

func doDFSX(ctx *context, curr int) {
	doDFS(doDFSX, ctx, curr)
	node := &ctx.book[curr]
	ctx.knot.next.prev, node.next = node, ctx.knot.next
	ctx.knot.next, node.prev = node, ctx.knot
}

func doDFSY(ctx *context, curr int) {
	doDFS(doDFSY, ctx, curr)
	last := len(ctx.parts) - 1
	ctx.parts[last] = append(ctx.parts[last], curr)
}

func (ctx *context) dfsX(id int) {
	doDFSX(ctx, id)
}

func (ctx *context) dfsY(id int) {
	doDFSY(ctx, id)
}

//分解强联通分量
func SplitDirectedGraph(roads [][]int) [][]int {
	size := len(roads)
	if size < 1 {
		return nil
	}
	if size == 1 {
		return [][]int{{0}}
	}

	book := make([]biNode, size+2)
	for i := 0; i < size; i++ {
		book[i].next, book[i+1].prev = &book[i+1], &book[i]
		book[i].id = i
	}
	book[size].next, book[0].prev = &book[0], &book[size]
	book[size].id, book[size+1].id = fakeID, fakeID
	book[size+1].prev, book[size+1].next = &book[size+1], &book[size+1]

	ctx := context{
		roads: roads,
		book:  book,
		knot:  &book[size+1]}
	knot := &book[size]
	for knot.next != knot {
		ctx.dfsX(knot.next.id)
	}

	for i := 0; i < size; i++ {
		book[i].id = i
	}
	ctx.roads = shadowGraph(roads)
	knot = ctx.knot
	for knot.next != knot {
		ctx.parts = append(ctx.parts, nil)
		ctx.dfsY(knot.next.id)
	}
	return ctx.parts
}
package cukoo

import (
	"DSGO/hashtable"
	"DSGO/utils"
)

type node struct {
	code [4]uint32
	key  string
}

type hashSet struct {
	buckets [4][]*node
	master  int //当前主表号
	size    int
	full    int
}

func (s *hashSet) Size() int


 lifetime_and_additional_type_params_specialized_for_ip_inner<
        'a,
        W: GetWrapperItem<&'a mut i32>,
        I: Ip,
    >(
        w1: W,
        w2: W,
    ) -> &'a mut i32 {
        #[ipv4]
        let ret = w1.get_first();

        #[ipv6]
        let ret = w2.get_first();

        ret
    }

    fn lifetime_and_additional_type_params_specialized_for_ip_address<'a, A: IpAddress>(
        a: &'a mut i32,
        b: &'a mut i32,
        c: &'a mut i32,
        d: &'a mut i32,
    ) -> &'a mut i32 {
        let w1 = Wrapper(a, b);
        let w2 = Wrapper(c, d);
        lifetime_and_additional_type_params_specialized_for_ip_address_inner::<
            'a,
            Wrapper<&'a mut i32>,
            A,
        >(w1, w2)
    }

    #[specialize_ip_address]
    fn lifetime_and_additional_type_params_specialized_for_ip_address_inner<
        'a,
        W: GetWrapperItem<&'a mut i32>,
        A: IpAddress,
    >(
        w1: W,
        w2: W,
    ) -> &'a mut i32 {
        #[ipv4addr]
        let ret = w1.get_second();

        #[ipv6addr]
        let ret = w2.get_second();

        ret
    }

    fn multiple_lifetimes_and_additional_type_params_specialized_for_ip<'a, 'b, I: Ip>(
        a: &'a mut i32,
        b: &'a mut i32,
        c: &'b mut i32,
        d: &'b mut i32,
    ) -> EitherLifetime<'a, 'b> {
        let w1 = Wrapper(a, b);
        let w2 = Wrapper(c, d);
        multiple_lifetimes_and_additional_type_params_specialized_for_ip_inner::<
            'a,
            'b,
            Wrapper<&'a mut i32>,
            Wrapper<&'b mut i32>,
            I,
        >(w1, w2)
    }

    #[specialize_ip]
    fn multiple_lifetimes_and_additional_type_params_specialized_for_ip_inner<
        'a,
        'b,
        W1: GetWrapperItem<&'a mut i32>,
        W2: GetWrapperItem<&'b mut i32>,
        I: Ip,
    >(
        w1: W1,
        w2: W2,
    ) -> EitherLifetime<'a, 'b> {
        #[ipv4]
        let ret = EitherLifetime::A(w1.get_first());

        #[ipv6]
        let ret = EitherLifetime::B(w2.get_first());

        ret
    }

    fn multiple_lifetimes_and_additional_type_params_specialized_for_ip_address<
        'a,
        'b,
        A: IpAddress,
    >(
        a: &'a mut i32,
        b: &'a mut i32,
        c: &'b mut i32,
        d: &'b mut i32,
    ) -> EitherLifetime<'a, 'b> {
        let w1 = Wrapper(a, b);
        let w2 = Wrapper(c, d);
        multiple_lifetimes_and_additional_type_params_specialized_for_ip_address_inner::<
            'a,
            'b,
            Wrapper<&'a mut i32>,
            Wrapper<&'b mut i32>,
            A,
        >(w1, w2)
    }

    #[spec


turn _T("Unknown error");
    }
}

static void
DoMultiArgs(
    CSimpleOpt &    args,
    int             nMultiArgs
    )
{
    TCHAR ** rgpszArg = NULL;

    // get the number of arguments if necessary
    if (nMultiArgs == -1) {
        // first arg is a count of how many we have
        rgpszArg = args.MultiArg(1);
        if (!rgpszArg) {
            _tprintf(
                _T("%s: '%s' (use --help to get command line help)\n"),
                GetLastErrorText(args.LastError()), args.OptionText());
            return;
        }

        nMultiArgs = _ttoi(rgpszArg[0]);
    }
    _tprintf(_T("%s: expecting %d args\n"), args.OptionText(), nMultiArgs);

    // get the arguments to follow
    rgpszArg = args.MultiArg(nMultiArgs);
    if (!rgpszArg) {
        _tprintf(
            _T("%s: '%s' (use --help to get command line help)\n"),
            GetLastErrorText(args.LastError()), args.OptionText());
        return;
    }

    for (int n = 0; n < nMultiArgs; ++n) {
        _tprintf(_T("MultiArg %d: %s\n"), n, rgpszArg[n]);
    }
}

int _tmain(int argc, TCHAR * argv[]) {
    // process the command line to extract that flags for SimpleOpt
    int nFlags = SO_O_USEALL;
    CSimpleOpt args(argc, argv, g_rgFlags, SO_O_NOERR|SO_O_EXACT);
    while (args.Next()) {
        nFlags |= args.OptionId();
    }

    // now process the remainder of the command line with these flags
    args.Init(args.FileCount(), args.Files(), g_rgOptions, nFlags);
    while (args.Next()) {
        if (args.LastError() != SO_SUCCESS) {
            _tprintf(
                _T("%s: '%s' (use --help to get command line help)\n"),
                GetLastErrorText(args.LastError()), args.OptionText());
            continue;
        }

        switch (args.OptionId()) {
        case OPT_HELP:
            ShowUsage();
            return 0;
        case OPT_MULTI:
            DoMultiArgs(args, -1);
            break;
        case OPT_MULTI0:
            DoMultiArgs(args, 0);
            break;
        case OPT_MULTI1:
            DoMultiArgs(args, 1);
            break;
        case OPT_MULTI2:
            DoMultiArgs(args, 2);
            break;
        case OPT_STOP:
            args.Stop();
            break;
        default:
            if (args.OptionArg()) {
                _tprintf(_T("option: %2d, text: '%s', arg: '%s'\n"),
                    args.OptionId(), args.OptionText(), args.OptionArg());
            }
            else {
                _tprintf(_T("option: %2d, text: '%s'\n"),
                    args.OptionId(), args.OptionText());
            }
        }
    }

    /* process files from command line */
    ShowFiles(args.FileCount(), args.Files());

	return 0;
}
/*
 * Copyright (C) 2012 The Android Open Source Project
 *
 * 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


using NUnit.Framework;
using System.Xml;

namespace Braintree.Tests
{
    [TestFixture]
    public class TransactionLineItemRequestTest
    {
        [Test]
        public void toXml()
        {
            var request = new TransactionLineItemRequest()
            {
                CommodityCode = "250300",
                Description = "This is the item 1",
                DiscountAmount = 2.50M,
                LineItemKind = TransactionLineItemKind.DEBIT,
                Name = "Item 1",
                ProductCode = "RM 90",
                Quantity = 2M,
                TaxAmount = 2.85M,
                TotalAmount = 10.00M,
                UnitAmount = 10.00M,
                UnitOfMeasure = "gallons",
                UnitTaxAmount = 1.11M,
                UpcCode = "042100005264",
                UpcType = "UPC-A",
                Url = "https://example.com/products/RM-90",
                ImageUrl = "https://example.com/products/RM-90.jpeg"
            };

            string xml = request.ToXml("line-item");
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(xml);

            Assert.IsTrue(xml.Contains("<line-item>"));
            Assert.IsTrue(xml.Contains("<commodity-code>250300</commodity-code>"));


a robar mercancías de la ruta de suministros de Crestagrana.$B$BVe a Páramos de Poniente y contacta con la agente Kearnen para dar parte. La encontrarás escondida, cerca de la torre.$B$B... Y $N, si te descubrieran, el SI:7 negaría todo conocimiento de tu existencia.",
    ["O"] = "Ve a Páramos de Poniente y encuentra a la agente Kearnen para dar parte.",
    ["T"] = "Mathias y los Defias",
  },
  [2361] = {
    ["D"] = "",
    ["O"] = "",
    ["T"] = "Restaurar el collar",
  },
  [2378] = {
    ["D"] = "Has servido con diligencia a los mortacechadores, $N, pero quizás sea hora de que vayas más allá. Aunque tengas cualidades para el sigilo y el engaño, debes continuar con tu instrucción.$B$BLos mortacechadores cuentan con aliados entre los Mano Destrozada. Busca a los que nos puedan echar una mano; encuentra a Shenthul en Orgrimmar.",
    ["O"] = "Viaja a Orgrimmar y habla con Shenthul, que estará en el Circo de las Sombras.",
    ["T"] = "Encuentra a los Mano Destrozada",
  },
  [2379] = {
    ["D"] = "No conseguirás superar los obstáculos que nos esperan solo con fuerza de voluntad.$b$bHabla con Zando\'zan para empezar tu formación como miembro de Mano Destrozada.$b$bSolo cuando domines el sigilo y el robo podrás seguir tu camino hacia tu destino.",
    ["O"] = "Habla con Zando\'zan en el Circo de las Sombras.",
    ["T"] = "Zando\'zan",
  },
  [2380] = {
    ["D"] = "No eres $gel rey:la reina; del sigilo pero eso puede cambiar. Y cambiará. Evidentemente, has impresionado a los de arriba con tus pobres habilidades, porque el gran Shenthul desea verte.$B$BSigue la carretera que hay al norte de aquí. Te llevará a Orgrimmar. Habla con Shenthul, estará en el Circo de las Sombras.",
    ["O"] = "Ve a Orgrimmar, al Circo de las Sombras, y habla con Shenthul.",
    ["T"] = "Ve a Orgrimmar",
  },
  [2381] = {
    ["D"] = "No quiero asustarte, $N, pero los cinco últimos ladrones a los que había enviado a robar el tesoro de los Mares del Sur acabaron en pedacitos.$B$BHacia el sur, bordeando la costa, encontrarás el Surcamareas, el barco de los filibusteros de los Mares del Sur. A buen recaudo en la bodega se encuentra el premio: el tesoro de los Mares del Sur. En el segundo nivel de ese barco está la guarida de los piratas, un lugar donde practican todos sus ladrones.$B$BSube a bordo de ese barco, roba el tesoro y tráemelo. Usa la guarida de los piratas si necesitas practicar cómo robar ¡pero ten cuidado!",
    ["O"] = "Llévale el tesoro de los Mares del Sur a Desdio el Desdichado en Trinquete. No olvides conseguir un E.P.A.Q. y herramientas de ladrones del aparato Gizmotrónico de Wrenix. Necesitarás todo eso para completar tu misión.$B$BSi te atacaran unos loros anormalmente agresivos, ¡usa el E.P.A.Q.!",
    ["T"] = "Saquear a los saqueadores",
  },
  [2382] = {
    ["D"] = "Zando\'zan


(count, set_count) = create_signal(2);\r\n// class:hidden-[div]-25 is invalid attribute name\r\nview! { <div class:hidden-[div]-25={move || count.get() < 3}>\"Now you see me, now you don’t.\"
 }\r\nHowever, you can pass arbitrary class names using the syntax class=(\"name\", value).\r\n\r\nlet (count, set_count) = create_signal(2);\r\n// this allows you to use CSS frameworks that include complex class names\r\nview! {\r\n  <div\r\n    class=(\"is-[this_-_really]-necessary-42\", move || count.get() < 3)\r\n  >\r\n    \"Now you see me, now you don’t.\"\r\n
\r\n}\r\nIndividual styles can also be set with style: or style=(\"property-name\", value) syntax.\r\nlet (x, set_x) = create_signal(0);\r\nlet (y, set_y) = create_signal(0);\r\nview! {\r\n
\r\n    \"Moves when coordinates change\"\r\n
\r\n}\r\nYou can use the node_ref or _ref attribute to store a reference to its DOM element in a NodeRef to use later.\r\nuse leptos::html::Input;\r\n\r\nlet (value, set_value) = create_signal(0);\r\nlet my_input = create_node_ref::<Input>();\r\nview! { <input type=\"text\" _ref=my_input/> }\r\n// `my_input` now contains an `Element` that we can use anywhere\r\nYou can add the same class to every element in the view by passing in a special class = {/* ... */}, argument after ``. This is useful for injecting a class provided by a scoped styling library.\r\nlet class = \"mycustomclass\";\r\nview! { class = class,\r\n
 // will have class=\"mycustomclass\"\r\n
\"Some text\"
 // will also have class \"mycustomclass\"\r\n
\r\n}\r\nYou can set any HTML element’s innerHTML with the inner_html attribute on an element. Be careful: this HTML will not be escaped, so you should ensure that it only contains trusted input.\r\nlet html = \"
This HTML will be injected.
\";\r\nview! {\r\n
\r\n}\r\nHere’s a simple example that shows off several of these features, put together\r\n\r\n\r\npub fn SimpleCounter() -> impl IntoView {\r\n// create a reactive signal with the initial value\r\nlet (value, set_value) = create_signal(0);\r\n\r\n    // create event handlers for our buttons\r\n    // note that `value` and `set_value` are `Copy`, so it's super easy to move them into closures\r\n    let clear = move |_ev| set_value.set(0);\r\n    let decrement = move |_ev| set_value.update(|value| *value -= 1);\r\n    let increment = move |_ev| set_value.update(|value| *value += 1);\r\n\r\n    view! {\r\n
\r\n            <button on:click=clear>\"Clear\"</button>\r\n            <button on:click=decrement>\"-1\"</button>\r\n            \"Value: \" {move || value.get().to_string()} \"!\"\r\n            <button on:click=increment>\"


    Emoji(
      '📽',
      'ビデオ | フィルム | プロジェクター | ムービー | 映写機 | 映画 ',
    ),
    Emoji(
      '📺',
      'TV | テレビ | ビデオ',
    ),
    Emoji(
      '📷',
      'カメラ | 写真',
    ),
    Emoji(
      '📸',
      'カメラ | カメラフラッシュ | フラッシュ | フラッシュを焚いているカメラ | 写真',
    ),
    Emoji(
      '📹',
      'カメラ | ビデオ | ビデオカメラ | ムービー | 動画 | 録画',
    ),
    Emoji(
      '📼',
      'VHS | テープ | ビデオ | ビデオカセット | ビデオテープ | 動画',
    ),
    Emoji(
      '🔍',
      'ルーペ | 拡大鏡 | 検索 | 科学 | 虫めがね | 虫眼鏡左',
    ),
    Emoji(
      '🔎',
      'ルーペ | 拡大鏡 | 検索 | 科学 | 虫めがね | 虫眼鏡右',
    ),
    Emoji(
      '🕯',
      'キャンドル | ろうそく | ロウソク | 明かり ',
    ),
    Emoji(
      '💡',
      'ぴこーん | ひらめき | マンガ | 明かり | 電球',
    ),
    Emoji(
      '🔦',
      'ライト | 懐中電灯 | 明かり',
    ),
    Emoji(
      '🏮',
      'ちょうちん | 居酒屋 | 赤ちょうちん | 飲み屋',
    ),
    Emoji(
      '📔',
      'ノート | 学校 | 文具 | 文房具 | 本 | 表紙付きノート',
    ),
    Emoji(
      '📕',
      '書籍 | 本 | 赤い本 | 閉じた本',
    ),
    Emoji(
      '📖',
      '図書館 | 小説 | 書籍 | 本 | 知識 | 読書 | 開いた本',
    ),
    Emoji(
      '📗',
      '図書館 | 書籍 | 本 | 緑の本 | 読書',
    ),
    Emoji(
      '📘',
      '図書館 | 書籍 | 本 | 読書 | 青い本 | 青の本',
    ),
    Emoji(
      '📙',
      'オレンジの本 | 図書館 | 書籍 | 本 | 読書',
    ),
    Emoji(
      '📚',
      '勉強 | 学校 | 小説 | 書籍 | 本 | 本の山 | 読書',
    ),
    Emoji(
      '📓',
      'ノート | 手帳 | 文具 | 文房具',
    ),
    Emoji(
      '📃',
      'カール | ドキュメント


t">

Project64 JavaScript API

Required settings

The following settings must be used to enable the script console.

Go to Options > Configuration and uncheck Hide advanced settings.
Optional: You may also want to uncheck Pause emulation when window is not active for general debugging.

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACcCAYAAAAUAsXtAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAA/kSURBVHhe7Z1taBzHGcf/suMPSYmgebEdHLcxsiJsRTWqrQ92PqSJHOG4/pAK1aQODQqEE9RUsluCUUwJiUmMCHmRiD5IFHIkxBRFqFCMbRS/pIFYHxRXuLYc5JNwUwx+SQ2JjF/AdtSZ2bnd2dPem3U7t3f6/2DZ3dm52bnb+e/zzOztMxWbW343A0KIFRboNSHEAhUzArnR/2+1X7bEfqE3CCkiPsGtXaLSyo4Tlyg4Eg3oUhJiEQqOEItQcIRYJD/BHW3DuqUV7vJy36Q+kCfnPsDLSzdg3zm9X3QOoq1iAz6Y9XXSpZvkkocQh9wFJ8W27RT+NDKDry/KJYFn/1Gdo+gO4m1TYCt24KOLx7Fthd4nZJ6Qo+Amse/dfjTvM0WyEts+fB94/R18pVMIIZnJTXDn9uPzEzE89YzeT7JiC55dewrfKsulrdhR6S6aLqdM34whjOC99SL91YNe3qTFUy6m56q+fVSnJ/P1ea6sZ1HFTeDXQZ8JkckPsKGiAhVqaRO1S0W7lwe9fBvoaxKD3F3KtavwM73pZwT/cftiQlTvAm9Kl3NEWr+XhKiew2sXD6AZ6x139J3ndN4kQlTrd6J6n3ZVxecS28z+nShz8nnn2L4YTiUt6tF38N7qA9q9ncFrqTeDvBnBzuqkmJLLZvTro0pM1QPYmpiBfHQ5cwDYEygmUc4e4GOZJyF+g50vsX9HXHIX3Ilv8F+96Wc9HnPdTCGqD3dgudwU/bRXfm+KMQ3nJpCAYT1nfU6U+Qct0meeF8LVFnXFKtR9svnuB25msR7vJ8XkLgdEzTSTE+LMhig392Pkm4Q+aCLK+XiHcLgFK3fgL7ERBGYj85LcBKdcx378M9VtU65mHX4eOPgxiW/P6M0wUAMvM3gTL9lzKYX8DpiC7Eu11qlMYuKU3iREkKOFW4ltf45haFubMUDiuIJ441U8qVOkO/X5sLY46fp9qayoQbVw3Fwxi/7cXz/J4XOa5W3H8fc31iORCNlvW1mDOlHPYDfSZAQD+3Weyf0YGInh+Wy6JPOG3F3KZ/pEHwro0IMU65ZuBkS/66M25Txp1qN60rE461S/rE+L8Tk8JdxEb9DERPTxVL9Nl7t+AM+OJD+XAeOZ4G9er8MrvnqEwXPoU32yaq+P1zZ72ET+BnXfvOQcr96JugN94pOEOFQI16hAf16WI4p78NhI9J6v2fvzshyl3INViePYEbb+SUmSu4UjhMwZCo4QixTQpYwufB+ORIWK6elpJbiPvlmkEsqVl1fd0luEFI+K77//XglucjLkYXVC5iErV/pHz1yX8sSJE3j88cdVIiFk7pw9exZr167Vew4cNCHEIoGC+/HHH60uhMwXaOEIsQ


p MULTI(BASE) *multi2)
{
	DOM *dom1, *dom2;
	isl_bool equal;

	if (FN(MULTI(BASE),check_has_explicit_domain)(multi1) < 0 ||
	    FN(MULTI(BASE),check_has_explicit_domain)(multi2) < 0)
		return isl_bool_error;
	dom1 = FN(MULTI(BASE),get_explicit_domain)(multi1);
	dom2 = FN(MULTI(BASE),get_explicit_domain)(multi2);
	equal = FN(DOM,is_equal)(dom1, dom2);
	FN(DOM,free)(dom1);
	FN(DOM,free)(dom2);

	return equal;
}

static isl_stat FN(MULTI(BASE),check_explicit_domain)(
	__isl_keep MULTI(BASE) *multi) __attribute__ ((unused));

/* Debugging function to check that the explicit domain of "multi"
 * has the correct space.
 */
isl_stat FN(MULTI(BASE),check_explicit_domain)(__isl_keep MULTI(BASE) *multi)
{
	isl_space *space1, *space2;
	isl_bool equal;

	if (FN(MULTI(BASE),check_has_explicit_domain)(multi) < 0)
		return isl_stat_error;
	space1 = isl_space_domain(isl_space_copy(multi->space));
	space2 = FN(DOM,get_space)(multi->u.dom);
	equal = isl_space_is_equal(space1, space2);
	isl_space_free(space1);
	isl_space_free(space2);
	if (equal < 0)
		return isl_stat_error;
	if (!equal)
		isl_die(FN(MULTI(BASE),get_ctx)(multi), isl_error_internal,
			"check failed", return isl_stat_error);
	return isl_stat_ok;
}