using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.ComponentModel;
using System.Collections.ObjectModel;
using Buzz.MachineInterface;
using BuzzGUI.Interfaces;
using BuzzGUI.Common;

namespace WDE.MidiOutput
{
    [MachineDecl(Name = "Midi Output", ShortName = "Midi Out", Author = "WDE", MaxTracks = 32)]
	public class MidiOutputMachine : IBuzzMachine, INotifyPropertyChanged
	{
		IBuzzMachineHost host;

		internal class NoteEvent
		{
			internal int device;
			internal Note note;
            internal int track;
            internal int velocity;
            internal int delayInSamples;
            internal int cutInSamples;
			internal int channel;

            public bool NoteOnHandled { get; internal set; }

			internal NoteEvent Copy()
			{
				NoteEvent e = new NoteEvent();
				e.device = device;
				e.note = note;
				e.velocity = velocity;
				e.channel = channel;
				e.delayInSamples = delayInSamples;
				e.cutInSamples = cutInSamples;
				e.track = track;
				return e;
			}
        }

        internal class MidiCCEvent
        {
            internal int control;
            internal int value;
            internal int channel;
            internal int device;
        }

        Dictionary<int, NoteEvent> pNote = new Dictionary<int, NoteEvent>();
        Dictionary<int, NoteEvent> noteEvents = new Dictionary<int, NoteEvent>();
        Dictionary<int, MidiCCEvent> ccEvents = new Dictionary<int, MidiCCEvent>();
        public MidiOutputMachine(IBuzzMachineHost host)
		{
			this.host = host;
        }

        NoteEvent GetNoteEvent(int track)
		{
			if (!noteEvents.ContainsKey(track))
				noteEvents.Add(track, new NoteEvent());

			return noteEvents[track];
		}

        MidiCCEvent GetCCEvent(int track)
        {
            if (!ccEvents.ContainsKey(track))
                ccEvents.Add(track, new MidiCCEvent());

            return ccEvents[track];
        }

        [ParameterDecl(MinValue = 0, MaxValue = 255, DefValue = 0)]
        public void Device(int value, int track)
        {
		}

        [ParameterDecl(IsStateless = true)]
		public void Note(Note value, int track)
		{
			GetNoteEvent(track).note = value;
        }

        Dictionary<int,int> dictVelocity = new Dictionary<int, int>();
        [ParameterDecl(IsStateless = true, MinValue = 0, MaxValue =127, DefValue = 120)]
        public void Volume(int value, int track)
        {
            dictVelocity[track] = value;
        }

        [ParameterDecl(IsStateless = true, MinValue = 0, MaxValue = 127, DefValue = 0)]
        public void Delay(int value, int track)
        {
            GetNoteEvent(track).delayInSamples = (int)(value / 127.0 * host.MasterInfo.SamplesPerTick);
        }

        [ParameterDecl(IsStateless = true, MinValue = 0, MaxValue = 127, DefValue = 0)]
        public void Cut(int value, int track)
        {
            GetNoteEvent(track).cutInSamples = (int)(value / 127.0 * host.MasterInfo.SamplesPerTick);
        }

        [ParameterDecl(MinValue = 0, MaxValue = 254, DefValue = 0)]
        public void MidiCC(int value, int track)
        {
        }

        [ParameterDecl(MinValue = 0, MaxValue = 0xfffe, DefValue = 0)]
        public void MidiCCValue(int value, int track)
        {
            GetCCEvent(track).value = value;
        }

        [ParameterDecl(MinValue = 0, MaxValue = 15, DefValue = 0)]
        publ


equence, config['num_digits'])

                print(f"      Trajectories shape: {trajectories.shape}")

                # Compute signatures
                signatures = compute_path_signatures(trajectories, signature_level=3)
                print(f"      Signature features shape: {signatures.shape}")

                # Visualize
                config_name = config['name'].lower()
                viz_path = output_dir / f"{config_name}_sample_{i+1}_trajectories.png"
                visualize_trajectories(
                    sequence, trajectories, str(viz_path),
                    f"Moving MNIST {config['name']} - Sample {i+1}"
                )

                results.append({
                    'sequence': sequence,
                    'trajectories': trajectories,
                    'signatures': signatures
                })

            # Analyze signature features
            print(f"   📈 Signature Analysis:")
            all_signatures = [r['signatures'] for r in results]

            if all_signatures[0].ndim == 1:
                # Single path signatures
                sig_matrix = np.stack(all_signatures)
                print(f"      Signature matrix shape: {sig_matrix.shape}")
                print(f"      Feature statistics:")
                print(f"        Mean: {sig_matrix.mean(axis=0)[:5]}... (first 5)")
                print(f"        Std:  {sig_matrix.std(axis=0)[:5]}... (first 5)")
            else:
                # Multiple path signatures
                print(f"      Multiple path signatures - shape varies by sample")
                for j, sig in enumerate(all_signatures):
                    print(f"        Sample {j+1}: {sig.shape}")

            print(f"   ✅ Configuration {config['name']} completed")

        except Exception as e:
            print(f"   ❌ Error with configuration {config['name']}: {e}")
            import traceback
            traceback.print_exc()

    print(f"\n🎉 Demo completed! Check output directory: {output_dir.absolute()}")
    print("\nGenerated files:")
    for file_path in sorted(output_dir.glob("*.png")):
        print(f"   📄 {file_path.name}")

    print(f"\n💡 Next Steps:")
    print(f"   • Use extracted trajectories with signature kernel methods")
    print(f"   • Train models on signature features for digit classification")
    print(f"   • Compare signature distances between different motion patterns")
    print(f"   • Integrate with existing D2/D3 distributional diffusion models")

if __name__ == "__main__":
    demo_signature_analysis()


/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "NR-RRC-Definitions"
 * 	found in "asn/nr-rrc-15.6.0.asn1"
 * 	`asn1c -fcompound-names -pdu=all -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D rrc`
 */

#include "ASN_RRC_Alpha.h"

/*
 * This type is implemented using NativeEnumerated,
 * so here we adjust the DEF accordingly.
 */
asn_per_constraints_t asn_PER_type_ASN_RRC_Alpha_constr_1 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 3,  3,  0,  7 }	/* (0..7) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static const asn_INTEGER_enum_map_t asn_MAP_ASN_RRC_Alpha_value2enum_1[] = {
	{ 0,	6,	"alpha0" },
	{ 1,	7,	"alpha04" },
	{ 2,	7,	"alpha05" },
	{ 3,	7,	"alpha06" },
	{ 4,	7,	"alpha07" },
	{ 5,	7,	"alpha08" },
	{ 6,	7,	"alpha09" },
	{ 7,	6,	"alpha1" }
};
static const unsigned int asn_MAP_ASN_RRC_Alpha_enum2value_1[] = {
	0,	/* alpha0(0) */
	1,	/* alpha04(1) */
	2,	/* alpha05(2) */
	3,	/* alpha06(3) */
	4,	/* alpha07(4) */
	5,	/* alpha08(5) */
	6,	/* alpha09(6) */
	7	/* alpha1(7) */
};
const asn_INTEGER_specifics_t asn_SPC_ASN_RRC_Alpha_specs_1 = {
	asn_MAP_ASN_RRC_Alpha_value2enum_1,	/* "tag" => N; sorted by tag */
	asn_MAP_ASN_RRC_Alpha_enum2value_1,	/* N => "tag"; sorted by N */
	8,	/* Number of elements in the maps */
	0,	/* Enumeration is not extensible */
	1,	/* Strict enumeration */
	0,	/* Native long size */
	0
};
static const ber_tlv_tag_t asn_DEF_ASN_RRC_Alpha_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_ASN_RRC_Alpha = {
	"Alpha",
	"Alpha",
	&asn_OP_NativeEnumerated,
	asn_DEF_ASN_RRC_Alpha_tags_1,
	sizeof(asn_DEF_ASN_RRC_Alpha_tags_1)
		/sizeof(asn_DEF_ASN_RRC_Alpha_tags_1[0]), /* 1 */
	asn_DEF_ASN_RRC_Alpha_tags_1,	/* Same as above */
	sizeof(asn_DEF_ASN_RRC_Alpha_tags_1)
		/sizeof(asn_DEF_ASN_RRC_Alpha_tags_1[0]), /* 1 */
	{ 0, &asn_PER_type_ASN_RRC_Alpha_constr_1, NativeEnumerated_constraint },
	0, 0,	/* Defined elsewhere */
	&asn_SPC_ASN_RRC_Alpha_specs_1	/* Additional specs */
};


icShaper);

                            return _possibleConstructorReturn(this, _DefaultShaper.apply(this, arguments));
                        }

                        IndicShaper.planFeatures = function planFeatures(plan) {
                            plan.addStage(setupSyllables);

                            plan.addStage(['locl', 'ccmp']);

                            plan.addStage(initialReordering);

                            plan.addStage('nukt');
                            plan.addStage('akhn');
                            plan.addStage('rphf', false);
                            plan.addStage('rkrf');
                            plan.addStage('pref', false);
                            plan.addStage('blwf', false);
                            plan.addStage('abvf', false);
                            plan.addStage('half', false);
                            plan.addStage('pstf', false);
                            plan.addStage('vatu');
                            plan.addStage('cjct');
                            plan.addStage('cfar', false);

                            plan.addStage(finalReordering);

                            plan.addStage({
                                local: ['init'],
                                global: ['pres', 'abvs', 'blws', 'psts', 'haln', 'dist', 'abvm', 'blwm', 'calt', 'clig']
                            });

                            // Setup the indic config for the selected script
                            plan.unicodeScript = fromOpenType(plan.script);
                            plan.indicConfig = INDIC_CONFIGS[plan.unicodeScript] || INDIC_CONFIGS.Default;
                            plan.isOldSpec = plan.indicConfig.hasOldSpec && plan.script[plan.script.length - 1] !== '2';

                            // TODO: turn off kern (Khmer) and liga features.
                        };

                        IndicShaper.assignFeatures = function assignFeatures(plan, glyphs) {
                            var _loop = function _loop(i) {
                                var codepoint = glyphs[i].codePoints[0];
                                var d = INDIC_DECOMPOSITIONS[codepoint] || decompositions[codepoint];
                                if (d) {
                                    var decomposed = d.map(function (c) {


	g_smdVersion = 1;

	if (!OpenGlobalFile( psource->filename ))
		return 0;

	if( !g_quiet )
	{
		printf ("SMD MODEL %s\n", psource->filename);
	}

	g_iLinecount = 0;

	while (GetLineInput())
	{
		int numRead = sscanf( g_szLine, "%s %d", cmd, &option );

		// Blank line
		if ((numRead == EOF) || (numRead == 0))
			continue;

		if (stricmp( cmd, "version" ) == 0)
		{
			if (option < 1 || option > 2)
			{
				MdlError("bad version\n");
			}
			g_smdVersion = option;
		}
		else if (stricmp( cmd, "nodes" ) == 0)
		{
			psource->numbones = Grab_Nodes( psource->localBone );
		}
		else if (stricmp( cmd, "skeleton" ) == 0)
		{
			Grab_Animation( psource, "BindPose" );
		}
		else if (stricmp( cmd, "triangles" ) == 0)
		{
			Grab_Triangles( psource );
		}
		else if (stricmp( cmd, "vertexanimation" ) == 0)
		{
			Grab_Vertexanimation( psource, "BindPose" );
		}
		else if ((strncmp( cmd, "//", 2 ) == 0) || (strncmp( cmd, ";", 1 ) == 0) || (strncmp( cmd, "#", 1 ) == 0))
		{
			ProcessSourceComment( psource, cmd );
			continue;
		}
		else
		{
			MdlWarning("unknown studio command \"%s\"\n", cmd );
		}
	}
	fclose( g_fpInput );

	return 1;
}

//========= Copyright Valve Corporation, All rights reserved. ============//
#include <windows.h>
#include "tier1/strtools.h"
#include <conio.h>
#include "utlvector.h"
#include <Dbghelp.h>
#include "isqlwrapper.h"
#include "CMiniDumpObject.h"

extern ISQLWrapper *g_pSqlWrapper;

CMiniDumpObject::CMiniDumpObject( const char *pszFilename, CUtlVector<module> *pKnownModuleList )
{
	InitFromFilename( pszFilename, pKnownModuleList );
}

CMiniDumpObject::CMiniDumpObject( HANDLE pMiniDumpHandle, CUtlVector<module> *pKnownModuleList )
{
	InitFromHandle( pMiniDumpHandle, pKnownModuleList );
}

void CMiniDumpObject::Init( HANDLE pszFileMap, CUtlVector<module> *pKnownModuleList )
{
	PMINIDUMP_DIRECTORY miniDumpDir;
	PVOID pOutput;
	ULONG ulSize;

	if ( !pszFileMap )
		return;
	PVOID pMiniDump = MapViewOfFile( pszFileMap, FILE_MAP_READ, 0, 0, 0 );

	MiniDumpReadDumpStream( pMiniDump, ModuleListStream, &miniDumpDir, &pOutput, &ulSize );

	int numberOfModules = ((int *)pOutput)[0];
	MINIDUMP_MODULE *pModules = (MINIDUMP_MODULE *)((byte *)pOutput + sizeof(int));

	for ( int i = 0; i < numberOfModules; i++ )
	{
		MINIDUMP_MODULE *pCurrentModule = (pModules + i);
		module *newModule = new module;
		newModule->key = 0;
		newModule->knownVersion = false;
		int offset = pCurrentModule->ModuleNameRva;
		int nSizeOfName = *(int *)((byte *)pMiniDump + offset);
		char nameBuf[1024];
		char *pszName = (char *)(byte *)pMiniDump + offset + sizeof(in


.LBB2081:
	.loc 3 219 0
	vand	q3, q2, q7	@,, tmp3157
.LBE2081:
.LBE2118:
.LBE2167:
.LBB2168:
	.loc 3 131 0
	veor	q8, q14, q8	@ tmp2738, D.17813, D.17967
.LVL513:
.LBE2168:
.LBB2169:
.LBB2119:
.LBB2082:
	.loc 3 219 0
	vtbl.8	d24, {d30, d31}, d6	@ tmp2698,,,
	vtbl.8	d25, {d30, d31}, d7	@,,,
	vstr	d6, [sp, #248]	@, %sfp
	vstr	d7, [sp, #256]	@, %sfp
	.loc 3 196 0
	vldr	d6, [sp, #184]	@, %sfp
	vldr	d7, [sp, #192]	@, %sfp
	vand	q2, q3, q7	@,, tmp3157
	vldr	d6, .L309+48	@,
	vldr	d7, .L309+56	@,
	vstr	d4, [sp, #264]	@, %sfp
	vstr	d5, [sp, #272]	@, %sfp
	vtbl.8	d30, {d6, d7}, d4	@ tmp2702,,,
	vtbl.8	d31, {d6, d7}, d5	@,,,
	.loc 3 186 0
	vldr	d4, .L309+80	@,
	vldr	d5, .L309+88	@,
	.loc 3 196 0
	veor	q15, q12, q15	@ tmp2706, tmp2698, tmp2702
	.loc 3 186 0
	vldr	d24, [sp, #136]	@, %sfp
	vldr	d25, [sp, #144]	@, %sfp
	vand	q3, q12, q7	@,, tmp3157
	vtbl.8	d24, {d4, d5}, d6	@ tmp2707,,,
	vtbl.8	d25, {d4, d5}, d7	@,,,
	vstr	d6, [sp, #136]	@, %sfp
	vstr	d7, [sp, #144]	@, %sfp
	.loc 3 209 0
	vldr	d4, .L309+96	@,
	vldr	d5, .L309+104	@,
	veor	q15, q15, q12	@ tmp2711, tmp2706, tmp2707
	vldr	d24, [sp, #152]	@, %sfp
	vldr	d25, [sp, #160]	@, %sfp
	vand	q3, q12, q7	@,, tmp3157
	vtbl.8	d24, {d4, d5}, d6	@ tmp2712,,,
	vtbl.8	d25, {d4, d5}, d7	@,,,
	vstr	d6, [sp, #152]	@, %sfp
	vstr	d7, [sp, #160]	@, %sfp
	.loc 3 219 0
	veor	q15, q15, q12	@ tmp2716, tmp2711, tmp2712
	.loc 3 197 0
	vldr	d6, .L309+48	@,
	vldr	d7, .L309+56	@,
.LBE2082:
.LBE2119:
.LBE2169:
.LBB2170:
	.loc 3 131 0
	veor	q11, q15, q11	@ D.17812, tmp271


COURSE_RECOMMENDATIONS = {
    "python": {
        "free": "https://www.freecodecamp.org/learn/scientific-computing-with-python/",
        "paid": "https://www.coursera.org/learn/python"
    },
    "sql": {
        "free": "https://www.kaggle.com/learn/intro-to-sql",
        "paid": "https://www.udemy.com/course/sql-mysql-for-data-analytics-and-business-intelligence/"
    },
    "power bi": {
        "free": "https://www.youtube.com/watch?v=AGrl-H87pRU",
        "paid": "https://learn.microsoft.com/en-us/training/powerplatform/power-bi/"
    },
    "machine learning": {
        "free": "https://www.kaggle.com/learn/intro-to-machine-learning",
        "paid": "https://www.coursera.org/learn/machine-learning"
    },
    "tableau": {
        "free": "https://www.youtube.com/playlist?list=PLUaB-1hjhk8H48Pj32z4GZgGWyylqv85f",
        "paid": "https://www.tableau.com/learn/training/20221"
    },
    "excel": {
        "free": "https://www.youtube.com/watch?v=Iim3B5HRd3o",
        "paid": "https://www.coursera.org/learn/excel-data-analysis"
    },
    "numpy": {
        "free": "https://www.kaggle.com/learn/numpy",
        "paid": "https://www.udemy.com/course/data-science-and-machine-learning-with-python/"
    },
    "pandas": {
        "free": "https://www.kaggle.com/learn/pandas",
        "paid": "https://www.udemy.com/course/data-manipulation-with-pandas-python/"
    },
    "matplotlib": {
        "free": "https://www.youtube.com/watch?v=3Xc3CA655Y4",
        "paid": "https://www.udemy.com/course/python-for-data-visualization/"
    },
    "seaborn": {
        "free": "https://www.kaggle.com/learn/data-visualization",
        "paid": "https://www.udemy.com/course/python-for-data-visualization/"
    },
    "scikit-learn": {
        "free": "https://www.youtube.com/watch?v=0Lt9w-BxKFQ",
        "paid": "https://www.udemy.com/course/python-for-data-science-and-machine-learning-bootcamp/"
    },
    "tensorflow": {
        "free": "https://www.tensorflow.org/tutorials",
        "paid": "https://www.coursera.org/learn/introduction-tensorflow"
    },
    "keras": {
        "free": "https://keras.io/getting_started/",
        "paid": "https://www.udemy.com/course/deep-learning-keras-tensorflow/"
    },
    "nlp": {
        "free": "https://www.kaggle.com/learn/natural-language-processing",
        "paid": "https://www.coursera.org/learn/language-processing"
    },
    "flask": {
        "free": "https://www.youtube.com/watch?v=Z1RJmh_OqeA",
        "paid": "https://www.coursera.org/projects/python-flask"
    },
    "django": {
        "free": "https://www.youtube.com/watch?v=F5mRW0jo-U4",
        "paid": "https://www.udemy.com/course/python-and-django-full-stack-web-developer-bootcamp/"
    },
    "git": {
        "free": "https://www.youtube.com/watch?v=RGOj5yH7evk",
        "paid": "https://www.udemy.com/course/git-and-github-bootcamp/"
    },
    "linux": {
        "free": "https://ubuntu.com/tutorials/command-line-for-beginners",
        "paid": "https://www.udemy.com/course/linux-command-line-tutorial/"
    },
    "data structures": {
        "free": "https://www.geeksforgeeks.org/data-structures/",
        "paid": "https://www.coursera.org/specializations/data-structures-algorithms"
    },
    "algorithms": {
        "free": "https://visualgo.net/en",
        "paid": "https://www.udemy.com/course/master-the-coding-interview-data-structures-algorithms/"
    }
}

def get_course_links(missing_skills):
    results = {}
    for skill in missing_skills:
        if skill in COURSE_RECOMMENDATIONS:
            results[skill] = COURSE_RECOMMENDATIONS[skill]
    return results


, min(Vp):max(Vp):(max(Vp)-min(Vp))/30, min(Vs):max(Vs):(max(Vs)-min(Vs))/30, min(Rho):max(Rho):(max(Rho)-min(Rho))/30]
# jointdomain = np.vstack([P.ravel(), V.ravel(), S.ravel(), VP.ravel(), VS.ravel(), R.ravel()])
# datadomain = np.vstack([VP[0,0,0,:,0,0], VS[0,0,0,0,:,0], R[0,0,0,0,0,:]])
# phidomain=P[:,0,0,0,0,0]
# cdomain=V[0,:,0,0,0,0]
# swdomain=S[0,0,:,0,0,0]
# jointdim = P.shape
# mdim = P[:,:,:,0,0,0].shape
# # # inversion
# Ppost = RockPhysicsKDEInversion(mtrain, dtrain, jointdomain, datadomain, dcond, jointdim, mdim)


eventId != default ? eventId : SentryId.Create();
        Platform = SentryConstants.Platform;
    }

    /// <inheritdoc />
    public void AddBreadcrumb(Breadcrumb breadcrumb) =>
        (_breadcrumbs ??= new List<Breadcrumb>()).Add(breadcrumb);

    /// <inheritdoc />
    public void SetExtra(string key, object? value) =>
        (_extra ??= new Dictionary<string, object?>())[key] = value;

    /// <inheritdoc />
    public void SetTag(string key, string value) =>
        (_tags ??= new Dictionary<string, string>())[key] = value;

    /// <inheritdoc />
    public void UnsetTag(string key) =>
        (_tags ??= new Dictionary<string, string>()).Remove(key);

    internal void Redact()
    {
        foreach (var breadcrumb in Breadcrumbs)
        {
            breadcrumb.Redact();
        }
    }

    /// <inheritdoc />
    public void WriteTo(Utf8JsonWriter writer, IDiagnosticLogger? logger)
    {
        writer.WriteStartObject();

        writer.WriteStringDictionaryIfNotEmpty("modules", _modules!);
        writer.WriteSerializable("event_id", EventId, logger);
        writer.WriteString("timestamp", Timestamp);
        writer.WriteSerializableIfNotNull("logentry", Message, logger);
        writer.WriteStringIfNotWhiteSpace("logger", Logger);
        writer.WriteStringIfNotWhiteSpace("platform", Platform);
        writer.WriteStringIfNotWhiteSpace("server_name", ServerName);
        writer.WriteStringIfNotWhiteSpace("release", Release);
        writer.WriteStringIfNotWhiteSpace("dist", Distribution);
        writer.WriteSerializableIfNotNull("exception", SentryExceptionValues, logger);
        writer.WriteSerializableIfNotNull("threads", SentryThreadValues, logger);
        writer.WriteStringIfNotWhiteSpace("level", Level?.ToString().ToLowerInvariant());
        writer.WriteStringIfNotWhiteSpace("transaction", TransactionName);
        writer.WriteSerializableIfNotNull("request", _request, logger);
        writer.WriteSerializableIfNotNull("contexts", _contexts.NullIfEmpty(), logger);
        writer.WriteSerializableIfNotNull("user", _user, logger);
        writer.WriteStringIfNotWhiteSpace("environment", Environment);
        writer.WriteSerializable("sdk", Sdk, logger);
        writer.WriteStringArrayIfNotEmpty("fingerprint", _fingerprint);
        writer.WriteArrayIfNotEmpty("breadcrumbs", _breadcrumbs, logger);
        writer.WriteDictionaryIfNotEmpty("extra", _extra, logger);
        writer.WriteStringDictionaryIfNotEmpty("tags", _tags!);
        writer.WriteSerializableIfNotNull("debug_meta", _debugMeta, logger);

        writer.WriteEndObject();
    }

    /// <summary>
    /// Parses from JSON.
    /// </summary>
    public static SentryEvent FromJson(JsonElement json) => FromJson(json, null);

    private static SentryLevel? SafeLevelFromJson(JsonElement json)
    {
        var levelString = json.GetPropertyOrNull("level")?.GetString();
        if (levelString == null)
            return null;

        // Native SentryLevel.None does not exist in dotnet
        return levelString.ToLowerInvariant() switch
        {
            "debug" => SentryLevel.Debug,
            "info" => SentryLevel.Info,
            "warning" => SentryLevel.Warning,
            "fatal" => SentryLevel.Fatal,


.complete 4921,1 --Find Mankrik's Wife (1)
step
    .goto The Barrens,45.6,59.0
    .home >>Set your Hearthstone to Camp Taurajo
step
    .goto The Barrens,44.5,59.2
.target Mangletooth
>>Talk to |cRXP_FRIENDLY_Mangletooth|r
    .accept 878 >>Accept Tribes at War
step
    .goto The Barrens,44.5,59.2
    .fp Camp Taurajo >> Get the Camp Taurajo flight path
    .fly Crossroads >>Fly to Crossroads
step
    .goto The Barrens,51.9,30.3
.target Gazrog
>>Talk to |cRXP_FRIENDLY_Gazrog|r
    .turnin 3281 >>Turn in Stolen Silver
step
    .goto The Barrens,52.2,31.0
>>Talk to |cRXP_FRIENDLY_Sergra Darkthorn|r
    .turnin 905 >>Turn in The Angry Scytheclaws
.target Sergra Darkthorn
    .accept 3261 >>Accept Jorn Skyseer
step
    .goto The Barrens,52.2,31.9
>>Talk to |cRXP_FRIENDLY_Tonga Runetotem|r
    .turnin 877 >>Turn in The Stagnant Oasis
.target Tonga Runetotem
    .accept 880 >>Accept Altered Beings
step
    .goto The Barrens,52.0,31.6
.target Mankrik
>>Talk to |cRXP_FRIENDLY_Mankrik|r
    .turnin 4921 >>Turn in Lost in Battle
step
    #sticky
	#completewith next
    >>Kill Plainstriders. Loot them for their Kidneys
    .complete 821,2 --Plainstrider Kidney (5)
step
    .goto The Barrens,45.39,28.43
>>Talk to |cRXP_FRIENDLY_Regthar Deathgate|r
    .turnin 851 >>Turn in Verog the Dervish
.target Regthar Deathgate
    .accept 852 >>Accept Hezrul Bloodmark
step
    .goto The Barrens,45.39,28.43
.target Regthar Deathgate
>>Talk to |cRXP_FRIENDLY_Regthar Deathgate|r
    .turnin 855 >> Turn in Centaur Bracers
    .isQuestComplete 855
step
    .goto The Barrens,45.39,28.43
>>Talk to |cRXP_FRIENDLY_Regthar Deathgate|r
    .turnin 851 >>Turn in Verog the Dervish
.target Regthar Deathgate
    .accept 852 >>Accept Hezrul Bloodmark
step
    #sticky
	#label CeBracers
    >>Kill Centaurs. Loot them for their bracers
    .complete 855,1 --Centaur Bracers (15)
step
    .goto The Barrens,45.87,40.80
    >> Hezrul patrols around the big WC lake
    .complete 852,1 --Hezrul's Head (1)
step
	#requires CeBracers
	.goto The Barrens,45.37,28.43
.target Regthar Deathgate
>>Talk to |cRXP_FRIENDLY_Regthar Deathgate|r
    .turnin 852 >>Turn in Hezrul Bloodmark
    .turnin 855 >> Turn in Centaur Bracers
step
    .goto The Barrens,45.37,28.43
.target Regthar Deathgate
>>Talk to |cRXP_FRIENDLY_Regthar Deathgate|r
    .accept 4021 >>Accept Counterattack!
step
    >> This quest can be very hard to solo, if you got no one to group with consider grouping up for it or kite it near the building of the quest giver.
    >> Skip this if it's too difficult
    .


XG59O1xuZXhwb3J0c1snZGVmYXVsdCddID0gSWNvbjtcbm1vZHVsZS5leHBvcnRzID0gZXhwb3J0c1snZGVmYXVsdCddO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2FudGQvbGliL2ljb24vaW5kZXguanNcbi8vIG1vZHVsZSBpZCA9IDc4XG4vLyBtb2R1bGUgY2h1bmtzID0gOSJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///78\n");

/***/ }),
/* 79 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _grid = __webpack_require__(214);\n\nexports['default'] = _grid.Row;\nmodule.exports = exports['default'];//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYW50ZC9saWIvcm93L2luZGV4LmpzP2QxYmQiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHtcbiAgdmFsdWU6IHRydWVcbn0pO1xuXG52YXIgX2dyaWQgPSByZXF1aXJlKCcuLi9ncmlkJyk7XG5cbmV4cG9ydHNbJ2RlZmF1bHQnXSA9IF9ncmlkLlJvdztcbm1vZHVsZS5leHBvcnRzID0gZXhwb3J0c1snZGVmYXVsdCddO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2FudGQvbGliL3Jvdy9pbmRleC5qc1xuLy8gbW9kdWxlIGlkID0gNzlcbi8vIG1vZHVsZSBjaHVua3MgPSA5Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3Q


per.ppuRead(loopyV & 0x3fff);
                } else {
                    readbuffer = mapper.ppuRead((loopyV & 0x3fff) - 0x1000);
                    temp = mapper.ppuRead(loopyV);
                }
                if (!renderingOn() || (scanline > 240 && scanline < (numscanlines - 1))) {
                    loopyV += vraminc;
                } else {
                    //if 2007 is read during rendering PPU increments both horiz
                    //and vert counters erroneously.
                    incLoopyVHoriz();
                    incLoopyVVert();
                }
                openbus = temp;
                break;

            // and don't increment on read
            default:
                return openbus; // last value written to ppu
        }
        return openbus;
    }

    /**
     * Performs a write to a PPU register
     *
     * @param regnum register number from 0 to 7, memory addresses are decoded
     * to these elsewhere
     * @param data the value to write to the register (0x00 to 0xff valid)
     */
    public final void write(final int regnum, final int data) {
//        if (regnum != 4 /*&& regnum != 7*/) {
//            System.err.println("PPU write - wrote " + utils.hex(data) + " to reg "
//                    + utils.hex(regnum + 0x2000)
//                    + " frame " + framecount + " scanline " + scanline);
//        }
        //debugdraw();
        openbus = data;
        switch (regnum) {
            case 0: //PPUCONTROL (2000)
                //set 2 bits of vram address (nametable select)
                //bits 0 and 1 affect loopyT to change nametable start by 0x400
                loopyT &= ~0xc00;
                loopyT |= (data & 3) << 10;
                /*
                 SMB1 writes here at the end of its main loop and if this write
                 lands on one exact PPU clock, the address bits are set to 0.
                 This only happens on one CPU/PPU alignment of real hardware
                 though so it only shows up ~33% of the time.
                 */
                vraminc = (((data & (utils.BIT2)) != 0) ? 32 : 1);
                sprpattern = ((data & (utils.BIT3)) != 0);
                bgpattern = ((data & (utils.BIT4)) != 0);
                spritesize = ((data & (utils.BIT5)) != 0);
                /*bit 6 is kind of a halt and catch fire situation since it outputs
                 ppu color data on the EXT pins that are tied to ground if set
                 and that'll make the PPU get very hot from sourcing the current.
                 Only really useful for the NESRGB interposer board, kind of
                 useless for emulators. I will ignore it.
                 */
                nmicontrol = ((data & (utils.BIT7)) != 0);

                break;
            case 1: //PPUMASK (2001)
                grayscale = ((data & (utils.BIT0)) != 0);
                bgClip = !((data & (utils.BIT1)) != 0); //clip left 8 pixels when its on
                spriteClip = !((data & (utils.BIT2)) != 0);
                bgOn = ((data & (utils.BIT3)) != 0);
                spritesOn = ((data & (utils.BIT4)) != 0);
                emph = (data & 0xe0) << 1;
                if (numscanlines == 312) {
                    //if PAL switch position of red and green emphasis bits (6 and 5)
                    //red is bit 6 -> bit 7
                    //green is bit 7 -> bit 6
                    int red = (emph >> 6) & 1;
                    int green = (emph >> 7) & 1;
                    emph &= 0xf3f;
                    emph |= (red << 7) | (green << 6);
                }
                break;
            case 3:
                // PPUOAMADDR (2003)
                // most games just write zero and use the dma
                oamaddr = data & 0xff;
                break;
            case 4:
                // PPUOAMDATA(2004)
                if ((oamaddr & 3) == 2) {


response body may contain clues as to what went wrong.
      console.error(
        `Backend returned code ${error.status}, ` +
        `body was: ${error.error}`);
    }
    // Return an observable with a user-facing error message.
    return throwError(
      'Something bad happened; please try again later.');
  }

}
import { IContext, IPlugin, PluginType } from "~context";
import maxBy from "lodash/maxBy";

const index = 1000000000;

export const getNewId = (context: IContext): string => {
  const plugins = context.state.plugins;
  if (!plugins.length) {
    return `${index}`;
  }
  const plugin = maxBy(plugins, p => parseInt(p.id, 10));
  const max = parseInt(plugin!.id, 10);
  return `${max + 1}`;
};

export const getPluginById = (
  context: IContext,
  id?: string
): IPlugin | null => {
  const plugins = context.state.plugins;
  return plugins.find(plugin => plugin.id === id) || null;
};

export const createPlugin = (context: IContext): IPlugin => {
  const id = getNewId(context);
  return { id, name: `Plugin ${id}`, type: PluginType.Css } as IPlugin;
};

export const updatePlugin = (context: IContext, plugin: IPlugin): void => {
  const { id, ...params } = plugin;
  const _plugin = getPluginById(context, id);
  Object.assign(_plugin, params);
  context.actions.setPlugins([...context.state.plugins]);
};

export const deletePlugin = (context: IContext, id: string): void => {
  const plugins = context.state.plugins.filter(p => p.id !== id);

  context.actions.setSelectedPluginId((plugins[0] && plugins[0].id) || null);
  context.actions.setPlugins([...plugins]);
};
import * as React from "react";

export type SmartSubscriber = (oldState, newState) => void | Promise<void>;
export type SetStateOptions = {
  /**
   * You run this when you want to perform multiple operations without dispatching changes yet. You have to manually call .inform() when ready
   */
  silent?: boolean;
};
export abstract class Smart<StateModel = any, Config = any> {
  public state: StateModel;
  public config: Config;
  public subscribers: SmartSubscriber[] = [];
  protected previousState?: StateModel;

  /**
   * This function should be called only once when the state is created
   * @param config
   */
  setConfig(config?: Config) {
    if (!config) {
      config = {} as Config;
    }
    this.config = config;
  }

  /**
   * Write code for initialisation like defining your state and others
   */
  async init(): Promise<void> {}

  /**
   * Write code for initialisation like defining your state and others
   */
  async destroy(): Promise<void> {}

  static getContext() {
    throw new Error(
      "Please implement the static getContext() method which returns a React context object."
    );
  }

  /**
   * Overrides the whole state with a new model.
   * @param newStateModel
   */
  setState(newStateModel: StateModel, options?: SetStateOptions) {
    if (this.isDebug()) {
      console.log(`Previous state`, this.state);
      console.log(`Next state`, newStateModel);
    }

    this.previousState = this.state;
    this.state = newStateModel;
    if (options?.silent) {
      // When it's silent we don't inform anyone, you have to manually call .inform()
    } else {
      this.inform();
    }
  }

  /**
   * Informs all subscribers of a


    "backupMsg": "バックアップしました！",
    "backupSettingsAndPlaylists": "設定と再生リストをバックアップ",
    "backupSettingsAndPlaylistsDes": "すべての設定と再生リスト、ログイン情報をバックアップファイルに保存",
    "backFilesFound": "データベースを発見",
    "backupAppData": "アプリのデータをバックアップ",
    "letsStrart": "始めよう..",
    "backup": "バックアップ",
    "processFiles": "ファイルを処理中...",
    "backupInProgress": "バックアップ中...",
    "restoreAppData": "アプリのデータを復元",
    "restartApp": "アプリを再起動",
    "includeDownloadedFiles": "ダウンロー済みの曲のファイルを含める",
    "songInfo": "曲の情報",
    "title": "題名",
    "bitrate": "ビットレート",
    "loudnessDb": "音の大きさ:デジベル",
    "id": "ID",
    "duration": "長さ",
    "audioCodec": "音声コーデック",
    "appInfo": "アプリの情報",
    "music&Playback": "音楽と再生",
    "loudnessNormalization": "音の大きさの正規化",
    "download": "ダウンロード",
    "personalisation": "カスタマイズ",
    "networkError": "ネットワークエラー！ネットワーク接続をご確認ください。",
    "downloadError3": "ネットワークやストリームのエラーでダウンロード失敗！再度お試しください",
    "downloadError2": "曲がサーバーの制限によりダウンロード不可能です。再試行でうまくいかもしれません",
    "content": "コンテンツ",
    "queueShufflingDeniedMsg": "シャッフルモードが有効なのでシャッフルできません",
    "queuerearrangingDeniedMsg": "シャッフルモードが有効なので並べ替えできません",
    "loudnessNormalizationDes": "すべての曲の音の大きさを同程度にする(実験的な設定) (バージョン1.10.0未満でダウンロードした曲では動作しません)",
    "songNotPlayable": "曲はサーバーの制限により再生できません！",
    "urlSearchDes": "URLをクリックして、関連コンテンツを開く/再生",
    "androidBackupWarning": "未検査: 60ファイル以上ダウンロードした後にチェックして選択すると、大量にメモリを使用し、スマホまたはアプリが落ちることがあります。自己責任で行ってください。",
    "standard": "標準",
    "gesture": "ジェスチャー",
    "playerUi": "プレイヤーUI",
    "playerUiDes": "プレイヤーの外観を選択",
    "shuffleQueue"


 com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.SquareCaretRight
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.SquareCaretUp
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.SquareCheck
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.SquareFull
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.SquareMinus
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.SquarePlus
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.Star
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.StarHalf
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.StarHalfStroke
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.Sun
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.ThumbsDown
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.ThumbsUp
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.TrashCan
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.User
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.WindowMaximize
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.WindowMinimize
import com.woowla.compose.icon.collections.fontawesome.fontawesome.regular.WindowRestore
import kotlin.collections.List as ____KtList

public object RegularGroup

public val FontAwesome.Regular: RegularGroup
  get() = RegularGroup

private var __AllIcons: ____KtList<ImageVector>? = null

public val RegularGroup.AllIcons: ____KtList<ImageVector>
  get() {
    if (__AllIcons != null) {
      return __AllIcons!!
    }
    __AllIcons= listOf(AddressBook, AddressCard, Bell, BellSlash, Bookmark, Building, Calendar,
        CalendarCheck, CalendarDays, CalendarMinus, CalendarPlus, CalendarXmark, ChartBar,
        ChessBishop, ChessKing, ChessKnight, ChessPawn, ChessQueen, ChessRook, Circle, CircleCheck,
        CircleDot, CircleDown, CircleLeft, CirclePause, CirclePlay, CircleQuestion, CircleRight,
        CircleStop, CircleUp, CircleUser, CircleXmark, Clipboard, Clock, Clone, ClosedCaptioning,
        Comment, CommentDots, Comments, Compass, Copy, Copyright, CreditCard, Envelope,
        EnvelopeOpen, Eye, EyeSlash, FaceAngry, FaceDizzy, FaceFlushed, FaceFrown, FaceFrownOpen,
        FaceGrimace, FaceGrin, FaceGrinBeam, FaceGrinBeamSweat, FaceGrinHearts, FaceGrinSquint,
        FaceGrinSquintTears, FaceGrinStars, FaceGrinTears, FaceGrinTongue, FaceGrinTongueSquint,
        FaceGrinTongueWink, FaceGrinWide, FaceGrinWink, FaceKiss, FaceKissBeam, FaceKissWinkHeart,
        FaceLaugh, FaceLaughBeam, FaceLaughSquint, FaceLaughWink, FaceMeh, FaceMehBlank,
        FaceRollingEyes, FaceSadCry, FaceSadTear, FaceSmile, FaceSmileBeam, FaceSmileWink,
        FaceSurprise, FaceTired, File,


67425,46.54262320123849],[24.928244317208105,46.546250160491525],[24.95126481103414,46.56429879272688],[24.954032538598497,46.57480781690207],[24.967387408303907,46.5783184122685],[24.97677328112849,46.56530372731513],[24.996728633635026,46.547316213663926],[25.022377639645814,46.54112408422172]]]},"properties":{"countyId":"Chibed", "scoring":"0","procente":"
Populatie: 1752
 Total consilieri: 11
 Procent USRPLUS: 1.8%
 Necesar consilieri USRPLUS: 0.2
 Necesar rotunjit: 0" }},
       {"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[22.63559248925029,46.52446720954042],[22.61880780524368,46.511258357668666],[22.599399643674758,46.50856934912104],[22.579910855957706,46.494450916292905],[22.550910934797802,46.49180053492793],[22.547143887265914,46.479223978490815],[22.52498035238934,46.49557151490217],[22.514182346735296,46.497874517055806],[22.498666993793112,46.50888975165294],[22.49364148059077,46.52790219767121],[22.49695823447758,46.54231102983758],[22.505649259958233,46.55047783542157],[22.514440946953144,46.55293052316084],[22.520889701074843,46.54972076516955],[22.543429273704806,46.553460622535276],[22.554531972895923,46.545737058238494],[22.561921714135973,46.530634946412015],[22.577316618300195,46.535005639823396],[22.610392243279467,46.525044869439284],[22.63559248925029,46.52446720954042]]]},"properties":{"countyId":"Cîmpani", "scoring":"0","procente":"
Populatie: 2322
 Total consilieri: 11
 Procent USRPLUS: 6.24%
 Necesar consilieri USRPLUS: 0.69
 Necesar rotunjit: 0" }},
       {"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[22.505649259958233,46.55047783542157],[22.49695823447758,46.54231102983758],[22.49364148059077,46.52790219767121],[22.498666993793112,46.50888975165294],[22.514182346735296,46.497874517055806],[22.497794820006987,46.49722631088734],[22.482182248633578,46.491792325430396],[22.44838119755842,46.488714258310814],[22.419350941727235,46.493953929259156],[22.413721251146647,46.48840444997515],[22.393499582511765,46.48277394622971],[22.34668527801305,46.45325903047291],[22.33936280891198,46.47355526705687],[22.323560264106693,46.48278723259757],[22.328381614840126,46.49042080899889],[22.325172


.
** feature: made the stap function {{{ngx_chain_dump()}}} print out info about the "last_buf" and "last_in_chain" flags in bufs and removed the old "<eof>" notation in the output.
! Mainline Version 1.2.7.3 - 24 March 2013
* upgraded LuaNginxModule to 0.7.18.
** feature: implemented [[ngx.req.http_version()|http://wiki.nginx.org/HttpLuaModule#ngx.req.http_version]] that returns the HTTP version number for the current request. thanks Matthieu Tourne for requesting this.
** feature: implemented the [[ngx.req.raw_header()|http://wiki.nginx.org/HttpLuaModule#ngx.req.raw_header]] function for returning the original raw HTTP protocol header string received by Nginx. thanks Matthieu Tourne for requesting this.
** feature: added new methods [[safe_set|http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT.safe_set]] and [[safe_add|http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT.safe_add]] to ngx.shared.DICT objects, which never override existing unexpired items but immediately return nil and a "no memory" string message when running out of storage. thanks Matthieu Tourne for requesting this.
** feature: datagram Unix domain sockets created by [[ngx.socket.udp()|http://wiki.nginx.org/HttpLuaModule#ngx.socket.udp]] can now receive data from the other endpoint via "autobind" on Linux. thanks Dirk Feytons for the patch.
** change: the [[ngx.re.match|http://wiki.nginx.org/HttpLuaModule#ngx.re.match]], [[ngx.re.gmatch|http://wiki.nginx.org/HttpLuaModule#ngx.re.gmatch]], [[ngx.re.sub|http://wiki.nginx.org/HttpLuaModule#ngx.re.sub]], and [[ngx.re.gsub|http://wiki.nginx.org/HttpLuaModule#ngx.re.gsub]] functions used to throw Lua exceptions aggressively for all the error conditions; now they just return an additional Lua string describing the error for almost all common errors instead of throwing exceptions, including pcre compile-time and exec-time failures. thanks Matthieu Tourne for requesting this change.
** bugfix: use of [[ngx.req.socket()|http://wiki.nginx.org/HttpLuaModule#ngx.req.socket]] could make socket reading hang infinitely when the request did not take a request body at all (that is, when the ~Content-Length request header is missing). thanks Matthieu Tourne for reporting this issue.
** bugfix: when a non-table value was specified for the "args" option in the [[ngx.location.capture|http://wiki.nginx.org/HttpLuaModule#ngx.location.capture]] or [[ngx.location.capture_multi|http://wiki.nginx.org/HttpLuaModule#ngx.location.capture_multi]] call, memory invalid access might happen, which resulted in garbage data at least. thanks Siddon Tang for reporting this issue.
** bugfix: when the Lua code using UDP/TCP cosockets + resolver was run in a subrequest, the subrequest could hang due to missing calls to {{{ngx_http_run_posted_requests}}} in the UDP/TCP cosocket resolver handler. thanks Lanshun Zhou for reporting this issue.
** bugfix: [[ngx.socket.udp|http://wiki.nginx.org/HttpLuaModule#ngx.socket.udp]]: memory leaks or invalid memory accesses might happen when the DNS resolver failed to resolve.
** bugfix: [[rewrite_by_lua_no_postpone|http://wiki.nginx.org/HttpLuaModule#rewrite_by_lua_no_postpone]] can only work globally and did not reject contexts like "server" and "location


 = true,
        icon = painterResource(MR.images.ic_smartphone_300),
        text = activeHost.hostDeviceName,
        actionButtonVisible = activeHost.sessionState is RemoteHostSessionState.Connected,
        onActionButtonClick = { onRemoteHostActionButtonClick(activeHost) }
      ) {
        onRemoteHostClick(activeHost, connecting)
      }
    }

    DevicePill(
      active = localDeviceActive,
      icon = painterResource(MR.images.ic_desktop),
      text = stringResource(MR.strings.this_device),
      actionButtonVisible = false
    ) {
      onLocalDeviceClick()
    }

    remoteHosts.filter { h -> h.sessionState is RemoteHostSessionState.Connected && !h.activeHost }.forEach { h ->
      val connecting = rememberSaveable { mutableStateOf(false) }

      DevicePill(
        active = h.activeHost,
        icon = painterResource(MR.images.ic_smartphone_300),
        text = h.hostDeviceName,
        actionButtonVisible = h.sessionState is RemoteHostSessionState.Connected,
        onActionButtonClick = { onRemoteHostActionButtonClick(h) }
      ) {
        onRemoteHostClick(h, connecting)
      }
    }
  }
}

@Composable
expect fun UserPickerUsersSection(
  users: List<UserInfo>,
  iconColor: Color,
  stopped: Boolean,
  onUserClicked: (user: User) -> Unit,
)

@Composable
expect fun PlatformUserPicker(
  modifier: Modifier,
  pickerState: MutableStateFlow<AnimatedViewState>,
  content: @Composable () -> Unit
)

@Composable
fun DevicePill(
  active: Boolean,
  icon: Painter,
  text: String,
  actionButtonVisible: Boolean,
  onActionButtonClick: (() -> Unit)? = null,
  onClick: () -> Unit) {
  Row(
    Modifier
      .clip(RoundedCornerShape(8.dp))
      .border(
        BorderStroke(1.dp, MaterialTheme.colors.secondaryVariant),
        shape = RoundedCornerShape(8.dp)
      )
      .background(if (active) MaterialTheme.colors.secondaryVariant else Color.Transparent)
      .clickable(
        enabled = !active,
        onClick = onClick,
        interactionSource = remember { MutableInteractionSource() },
        indication = LocalIndication.current
      ),
    verticalAlignment = Alignment.CenterVertically
  ) {
    Row(
      Modifier.padding(horizontal = 6.dp, vertical = 4.dp),
      verticalAlignment = Alignment.CenterVertically
    ) {
      Icon(
        icon,
        text,
        Modifier.size(16.dp * fontSizeSqrtMultiplier),
        tint = MaterialTheme.colors.onSurface
      )
      Spacer(Modifier.width(DEFAULT_SPACE_AFTER_ICON * fontSizeSqrtMultiplier))
      Text(
        text,
        color = MaterialTheme.colors.onSurface,
        fontSize = 12.sp,
        overflow = TextOverflow.Ellipsis,
        maxLines = 1,
        modifier = if (onActionButtonClick != null && actionButtonVisible) Modifier.widthIn(max = 300.dp * fontSizeSqrtMultiplier) else Modifier
      )
      if (onActionButtonClick != null && actionButtonVisible) {
        val interactionSource = remember { MutableInteractionSource() }
        val hovered = interactionSource.collectIsHoveredAsState().value
        Spacer(Modifier.width(DEFAULT_SPACE_AFTER_ICON * fontSizeSqrtMultiplier))
        IconButton(onActionButtonClick, Modifier.requiredSize(16.dp * fontSizeSqrtMultiplier)) {
          Icon(
            painterResource(if (hovered) MR.images.ic_wifi_off else MR.images.ic_wifi),
            null,
            Mod


- Forwarding Server: Message routing and client management
- MCP Server: Protocol translation and request orchestration
- VM Service: Error diagnostics and state inspection

## Error Handling Architecture

**Components:**

1. Diagnostic Node: Flutter widget tree node with error state
2. VM Service: Access point for error information
3. Error Info: Structured error data with context

**Flow Diagram:**

```
+----------------+     +--------------+     +-------------+
|                |     |              |     |             |
| VM Service     +---->+ Diagnostic   +---->+ Error Info  |
|                |     | Node         |     |             |
+----------------+     +--------------+     +-------------+
```

**Implementation Patterns:**

1. Error Access:

```dart
class DevtoolsService {
  Future<String?> getErrorForNode(String nodeId) async {
    // Access error through VM service
  }
}
```

2. Node Management:

```dart
class ObjectGroup {
  Future<List<String>> getErrorsInSubtree(String rootId) async {
    // Check errors in node subtree
  }
}
```

3. Error Monitoring:

```dart
class ErrorMonitor {
  void checkNode(String nodeId) {
    // Monitor specific nodes for errors
  }
}
```

## Forwarding Server

**Purpose:** Enables bi-directional communication between Flutter applications and TypeScript clients.

**Mechanism:** WebSocket server that forwards messages between different client types (`flutter` and `inspector`).

**Features:**

- Prevents message loops
- Emits connection events
- Handles client type routing
- Supports error propagation

**Diagram:**

```
+----------------+                  +-------------------+
|                |                  |                   |
| Flutter Client +<---------------->+ Forwarding Server |
|                |                  |                   |
+----------------+                  |                   |
                                   |                   |
+----------------+                  |                   |
|                |                  |                   |
| Inspector Client +<--------------->+                   |
|                |                  |                   |
+----------------+                  +-------------------+
```
## 0.3.0

BREAKING CHANGES:

Dart SDK: 3.8.0

- chore: dart_mcp: ^0.3.30
- chore: from_json_to_json: ^0.3.0
- chore: lints: ^6.0.0
- chore: xsoulspace_lints: ^0.1.2

## 0.2.3

- perf: added more checks for [MCPCallEntry.resourceUri]

## 0.2.0

- Added `addMcpTool` function to add a single MCP tool to the MCP toolkit.

## BREAKING CHANGES

- Replaced `MCPCallEntry` with two constructors to create MCPCallEntry for resources and tools:
  - `MCPCallEntry.resource` to create MCPCallEntry for resources.
  - `MCPCallEntry.tool` to create MCPCallEntry for tools.
    This change simplifies the syntax by removing the need to write name of tool twice.
  - Now `MCPToolDefinition` has inputSchema as required parameter with `ObjectSchema` from `dart_mcp` package for better type safety. For example:
    ```dart
      definition: MCPToolDefinition(
        name: 'calculate_fibonacci',
        description: 'Calculate the nth Fibonacci number and return the sequence',
        inputSchema: ObjectSchema(
          properties: {
            'n': IntegerSchema(
              description: 'The position in the Fibonacci sequence (0-100)',
              minimum: 0,
              maximum: 100,
            ),
          },
          required: ['n'],
        ),
      ),
    ```

## 0.1.2

- Added `kDefaultMaxErrors` and `maxErrors` constants to `ErrorMonitor` class to limit number of errors stored.
- Added `kDebugMode`


x19, x20, [sp, 16]
	ldr	x21, [sp, 32]
	ldp	x29, x30, [sp], 64
	ret
	.p2align 3
.L183:
	add	x21, x19, 8
	mov	w0, -1
	mov	x5, x19
	add	x4, x29, 60
	add	x3, x29, 52
	add	x2, x29, 56
	str	w0, [x21, 40]
	mov	w1, 0
	mov	x0, x20
	bl	Real8_CB_GetSliceHeader
	cmp	w0, 1
	mov	w0, -2
	bne	.L158
	ldr	w0, [x21, 36]
	cmp	w0, 3
	bls	.L188
.L159:
	ldrb	w1, [x19, 8]
	str	w1, [x19, 124]
	mov	w1, 8144
	ldr	w0, [x19, 100]
	ldrb	w2, [x21, 1]
	str	w2, [x19, 128]
	sub	w0, w0, #48
	cmp	w0, w1
	ldrb	w0, [x21, 2]
	str	w0, [x19, 132]
	ldr	w0, [x21, 44]
	str	w0, [x19, 120]
	ldr	w0, [x21, 48]
	str	w0, [x19, 140]
	ldr	w0, [x21, 52]
	str	w0, [x19, 144]
	bls	.L182
	mov	w0, -2
	b	.L189
	.p2align 3
.L186:
	mov	x1, x19
	mov	x0, x20
	bl	Real8_CB_GetCPFMT
	cbz	w0, .L175
	ldr	w0, [x19, 100]
	b	.L172
	.p2align 3
.L188:
	ldr	x1, .LC30
	ldrb	w0, [x1,w0,uxtw]
	adr	x1, .Lrtx161
	add	x0, x1, w0, sxtb #2
	br	x0
.Lrtx161:
	.section	.rodata
	.align	0
	.align	2
.L161:
	.byte	(.L160 - .Lrtx161) / 4
	.byte	(.L162 - .Lrtx161) / 4
	.byte	(.L163 - .Lrtx161) / 4
	.byte	(.L164 - .Lrtx161) / 4
	.text
	.p2align 3
.L187:
	str	wzr, [x19, 92]
	b	.L170
.L163:
	mov	w0, 1
	str	w0, [x19, 92]
	b	.L159
.L162:
	str	wzr, [x19, 92]
	str	wzr, [x21, 20]
	b	.L159
.L160:
	str	wzr, [x19, 92]
	mov	w0, 1
	str	w0, [x21, 20]
	b	.L159
.L164:
	mov	w0, 2
	str	w0, [x19, 92]
	b	.L159
	.size	Real8_CB_GetPictureHeader, .-Real8_CB_GetPictureHeader
	.align	3
.LC30:
	.xword	.L161
	.align	3
.LC31:
	.xword	vfmw_Osal_Func_Ptr_S
	.global	_mcount
	.align	2
	.p2align 3,,7


  startForeground(NOTIFICATION_ID, createForegroundNotification())
    }

    private fun initializeManagers() {
        val application = ScamMaxDisablerApplication.getInstance(this)
        if (application != null) {
            serviceStateManager = application.serviceStateManager
            permissionStateManager = application.permissionStateManager
        } else {
            serviceStateManager = ServiceStateManager.getInstance(this)
            permissionStateManager = PermissionStateManager.getInstance(this)
        }
    }

    override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
        ensureAccessibilityServiceRunning()
        return START_NOT_STICKY
    }

    private fun ensureAccessibilityServiceRunning() {
        serviceScope.launch {
            delay(SERVICE_STARTUP_DELAY_MS)

            permissionStateManager.refreshPermissionStates()
            val permissionState = permissionStateManager.permissionState.value

            if (permissionState.hasAccessibilityPermission) {
                serviceStateManager.ensureServiceRunning()
            }

            stopSelfGracefully()
        }
    }

    private fun stopSelfGracefully() {
        serviceScope.launch {
            delay(GRACEFUL_STOP_DELAY_MS)
            stopForeground(Service.STOP_FOREGROUND_REMOVE)
            stopSelf()
        }
    }

    override fun onBind(intent: Intent?): IBinder? = null

    override fun onDestroy() {
        super.onDestroy()
        serviceScope.cancel()
    }

    private fun createNotificationChannel() {
        val notificationManager = getSystemService(NotificationManager::class.java)
        if (notificationManager.getNotificationChannel(NOTIFICATION_CHANNEL_ID) == null) {
            val channel = NotificationChannel(
                NOTIFICATION_CHANNEL_ID,
                NOTIFICATION_CHANNEL_NAME,
                NotificationManager.IMPORTANCE_MIN
            ).apply {
                setShowBadge(false)
            }
            notificationManager.createNotificationChannel(channel)
        }
    }

    private fun createForegroundNotification(): Notification {
        return NotificationCompat.Builder(this, NOTIFICATION_CHANNEL_ID)
            .setSmallIcon(R.mipmap.ic_launcher)
            .setContentTitle(getString(R.string.app_name))
            .setContentText(NOTIFICATION_TEXT)
            .setPriority(NotificationCompat.PRIORITY_MIN)
            .setOngoing(true)
            .build()
    }

    companion object {
        private const val NOTIFICATION_CHANNEL_ID = "warmup_service_channel"
        private const val NOTIFICATION_CHANNEL_NAME = "Service Bootstrap"
        private const val NOTIFICATION_ID = 1001
        private const val NOTIFICATION_TEXT = "Инициализация службы"
        private const val SERVICE_STARTUP_DELAY_MS = 200L
        private const val GRACEFUL_STOP_DELAY_MS = 500L
    }
}
package ru.scaik.scammaxdisabler.ui.components

import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.RepeatMode
import androidx.compose.animation.core.animateFloat
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.infiniteRepeatable
import androidx.compose.animation.core.rememberInfiniteTransition
import androidx.compose.animation.core.spring
import androidx.compose.animation.core.tween
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.PowerSettingsNew
import androidx.compose.material3.Icon
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.


// Padded and checksummed version of: boot2_generic_03h.4.bin

.cpu cortex-m0plus
.thumb

.section .boot2, "ax"

.byte 0x00, 0xb5, 0x0c, 0x4b, 0x00, 0x21, 0x99, 0x60, 0x04, 0x21, 0x59, 0x61, 0x0a, 0x49, 0x19, 0x60
.byte 0x0a, 0x49, 0x0b, 0x48, 0x01, 0x60, 0x00, 0x21, 0x59, 0x60, 0x01, 0x21, 0x99, 0x60, 0x01, 0xbc
.byte 0x00, 0x28, 0x00, 0xd0, 0x00, 0x47, 0x07, 0x48, 0x07, 0x49, 0x08, 0x60, 0x03, 0xc8, 0x80, 0xf3
.byte 0x08, 0x88, 0x08, 0x47, 0x00, 0x00, 0x00, 0x18, 0x00, 0x03, 0x1f, 0x00, 0x18, 0x02, 0x00, 0x03
.byte 0xf4, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00, 0x10, 0x08, 0xed, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x


f ]", g);
}

struct MeasuredSS {
    const char *name;
    RGB sigma_prime_s, sigma_a;  // mm^-1
};

bool GetMediumScatteringProperties(const std::string &name, Spectrum *sigma_a,
                                   Spectrum *sigma_s, Allocator alloc) {
    static MeasuredSS SubsurfaceParameterTable[] = {
        // From "A Practical Model for Subsurface Light Transport"
        // Jensen, Marschner, Levoy, Hanrahan
        // Proc SIGGRAPH 2001
        // clang-format off
        {"Apple", RGB(2.29, 2.39, 1.97), RGB(0.0030, 0.0034, 0.046)},
        {"Chicken1", RGB(0.15, 0.21, 0.38), RGB(0.015, 0.077, 0.19)},
        {"Chicken2", RGB(0.19, 0.25, 0.32), RGB(0.018, 0.088, 0.20)},
        {"Cream", RGB(7.38, 5.47, 3.15), RGB(0.0002, 0.0028, 0.0163)},
        {"Ketchup", RGB(0.18, 0.07, 0.03), RGB(0.061, 0.97, 1.45)},
        {"Marble", RGB(2.19, 2.62, 3.00), RGB(0.0021, 0.0041, 0.0071)},
        {"Potato", RGB(0.68, 0.70, 0.55), RGB(0.0024, 0.0090, 0.12)},
        {"Skimmilk", RGB(0.70, 1.22, 1.90), RGB(0.0014, 0.0025, 0.0142)},
        {"Skin1", RGB(0.74, 0.88, 1.01), RGB(0.032, 0.17, 0.48)},
        {"Skin2", RGB(1.09, 1.59, 1.79), RGB(0.013, 0.070, 0.145)},
        {"Spectralon", RGB(11.6, 20.4, 14.9), RGB(0.00, 0.00, 0.00)},
        {"Wholemilk", RGB(2.55, 3.21, 3.77), RGB(0.0011, 0.0024, 0.014)},

        // From "Acquiring Scattering Properties of Participating Media by
        // Dilution",
        // Narasimhan, Gupta, Donner, Ramamoorthi, Nayar, Jensen
        // Proc SIGGRAPH 2006
        {"Lowfat Milk", RGB(0.89187, 1.5136, 2.532), RGB(0.002875, 0.00575, 0.0115)},
        {"Reduced Milk", RGB(2.4858, 3.1669, 4.5214), RGB(0.0025556, 0.0051111, 0.012778)},
        {"Regular Milk", RGB(4.5513, 5.8294, 7.136), RGB(0.0015333, 0.0046, 0.019933)},
        {"Espresso", RGB(0.72378, 0.84557, 1.0247), RGB(4.7984, 6.5751, 8.8493)},
        {"Mint Mocha Coffee", RGB(0.31602, 0.38538, 0.48131), RGB(3.772, 5.8228, 7.82)},
        {"Lowfat Soy Milk", RGB(0.30576, 0.34233, 0.61664), RGB(0.0014375, 0.0071875, 0.035937)},
        {"Regular Soy Milk", RGB(0.59223, 0.73866, 1.4693), RGB(0.0019167, 0.0095833, 0.065167)},
        {"Lowfat Chocolate Milk", RGB(0.64925, 0.83916, 1.1057), RGB(0.0115, 0.0368, 0.1564)},
        {"Regular Chocolate Milk", RGB(1.4585, 2.1289, 2.9527), RGB(0.010063, 0.043125, 0.14375)},
        {"Coke", RGB(8.9053e-05, 8.372e-05, 0), RGB(0.10014, 0.16503, 0.2468)},
        {"Pepsi", RGB(6.1697e-05, 4.2564e-05, 0), RGB(0.091641, 0.14158, 0.20729)},
        {"Sprite", RGB(6.0306e-06, 6.4139e-06, 6.5504e-06), RGB(0.001886


            fields[YEAR] = -fields[YEAR] + 1;
        } else {
            fields[ERA] = AD;
        }
        fields[MONTH] = month;
        fields[DATE] = date;
        fields[DAY_OF_WEEK_IN_MONTH] = (date - 1) / 7 + 1;
        fields[WEEK_OF_MONTH] = (date - 1 + mod7(days - date - 2
                - (getFirstDayOfWeek() - 1))) / 7 + 1;
        int daysFromStart = mod7(days - 3 - (fields[DAY_OF_YEAR] - 1)
                - (getFirstDayOfWeek() - 1));
        int week = (fields[DAY_OF_YEAR] - 1 + daysFromStart) / 7
                + (7 - daysFromStart >= getMinimalDaysInFirstWeek() ? 1 : 0);
        if (week == 0) {
            fields[WEEK_OF_YEAR] = 7 - mod7(daysFromStart
                    - (isLeapYear(fields[YEAR] - 1) ? 2 : 1)) >= getMinimalDaysInFirstWeek() ? 53
                    : 52;
        } else if (fields[DAY_OF_YEAR] >= (leapYear ? 367 : 366)
                - mod7(daysFromStart + (leapYear ? 2 : 1))) {
            fields[WEEK_OF_YEAR] = 7 - mod7(daysFromStart + (leapYear ? 2 : 1)) >= getMinimalDaysInFirstWeek() ? 1
                    : week;
        } else {
            fields[WEEK_OF_YEAR] = week;
        }
    }

    @Override
    protected void computeFields() {
        TimeZone timeZone = getTimeZone();
        int dstOffset = timeZone.inDaylightTime(new Date(time)) ? timeZone.getDSTSavings() : 0;
        int zoneOffset = timeZone.getRawOffset();

        // We unconditionally overwrite DST_OFFSET and ZONE_OFFSET with
        // values from the timezone that's currently in use. This gives us
        // much more consistent behavior, and matches ICU4J behavior (though
        // it is inconsistent with the RI).
        //
        // Anything callers can do with ZONE_OFFSET they can do by constructing
        // a SimpleTimeZone with the required offset.
        //
        // DST_OFFSET is a bit of a WTF, given that it's dependent on the rest
        // of the fields. There's no sensible reason we'd want to allow it to
        // be set, nor can we implement consistent full-fields calculation after
        // this field is set without maintaining a large deal of additional state.
        //
        // At the very least, we will need isSet to differentiate between fields
        // set by the user and fields set by our internal field calculation.
        fields[DST_OFFSET] = dstOffset;
        fields[ZONE_OFFSET] = zoneOffset;

        fullFieldsCalc();

        for (int i = 0; i < FIELD_COUNT; i++) {
            isSet[i] = true;
        }
    }

    @Override
    protected void computeTime() {
        if (!isLenient()) {
            if (isSet[HOUR_OF_DAY]) {
                if (fields[HOUR_OF_DAY] < 0 || fields[HOUR_OF_DAY] > 23) {
                    throw new IllegalArgumentException();
                }
            } else if (isSet[HOUR] && (fields[HOUR] < 0 || fields[HOUR] > 11)) {
                throw new IllegalArgumentException();
            }
            if (isSet[MINUTE] && (fields[MINUTE] < 0 || fields[MINUTE] > 59)) {
                throw new IllegalArgumentException();
            }
            if (isSet[SECOND] && (fields[SECOND] < 0 || fields[SECOND] > 59)) {
                throw new IllegalArgumentException();
            }
            if (isSet[MILLISECOND]
                    && (fields[MILLISECOND] < 0 || fields[MILLISECOND] > 999)) {
                throw new IllegalArgumentException();
            }
            if (isSet[WEEK_OF_YEAR]


local M = {}

M.parse_reference = function(passage_ref)
	local version = "NASB"
	local book = passage_ref:match("%d*[%a%s]+%a")
	local numbers = passage_ref:gsub(book, "")
	local chapter = numbers:match("%d+")
	local verses = numbers:match(":%d+")
	local start_verse
	local end_verse

	if verses ~= nil then
		start_verse = verses:match("%d+")
		local end_verse_part = numbers:match("-%d+")
		if end_verse_part ~= nil then
			end_verse = end_verse_part:match("%d+")
		end
	end

	local parsed_version = passage_ref:gsub(book, ""):match("%a+")
	if parsed_version ~= nil then
		version = parsed_version
		passage_ref = vim.trim(passage_ref:gsub(parsed_version, ""))
	end
	return {
		passage_ref = passage_ref,
		book = book,
		chapter = chapter,
		start_verse = start_verse,
		end_verse = end_verse,
		version = version,
	}
end

-- Thank you AI!
M.create_passage_reference = function(first_reference, last_reference)
	local passage_reference = ""
	if first_reference.book == last_reference.book then
		passage_reference = first_reference.book
		if first_reference.chapter == last_reference.chapter then
			passage_reference = passage_reference .. " " .. first_reference.chapter
			if first_reference.start_verse == last_reference.start_verse then
				passage_reference = passage_reference .. ":" .. first_reference.start_verse
				if first_reference.end_verse ~= nil then
					passage_reference = passage_reference .. "-" .. last_reference.end_verse
				end
			else
				passage_reference = passage_reference .. ":" .. first_reference.start_verse
				if first_reference.end_verse ~= nil then
					passage_reference = pass


ght=Node(26),
                    ),
                    right=Node(12,
                        left=Node(25),
                        right=Node(24),
                    ),
                ),
            ),
            right=Node(2,
                left=Node(5,
                    left=Node(11,
                        left=Node(23),
                        right=Node(22),
                    ),
                    right=Node(10,
                        left=Node(21),
                        right=Node(20),
                    ),
                ),
                right=Node(4,
                    left=Node(9,
                        left=Node(19),
                        right=Node(18),
                    ),
                    right=Node(8,
                        left=Node(17),
                        right=Node(16),
                    ),
                ),
            ),
        )
    )

    tree_huge.invert()

    print(f"Tree: {str(tree_huge)}")
    print(f"Tree (expected): {str(tree_huge_inverted)}")

    equals = tree_huge == tree_huge_inverted
    assert equals, f"Tree is not properly inverted, {tree_huge} != {tree_huge_inverted}"

if __name__ == '__main__':
    main()


get {
                return marked;
            }
        }

        /*
         * Restore state that was previously saved via SaveViewState.
         */

        /// <devdoc>
        ///    <para>Loads the specified previously saved state information</para>
        /// </devdoc>
        internal void LoadViewState(object state) {
            if (state != null) {
                ArrayList data = (ArrayList)state;

                for (int i = 0; i < data.Count; i += 2) {
#if OBJECTSTATEFORMATTER
                    string key = ((IndexedString)data[i]).Value;
#else
                    string key = (string)data[i];
#endif
                    object value = data[i + 1];

                    Add(key, value);
                }
            }
        }

        /*
         * Start tracking state changes after "mark".
         */

        /// <devdoc>
        ///    <para>Initiates the tracking of state changes for items stored in the
        ///    <see langword='StateBag'/> object.</para>
        /// </devdoc>
        internal void TrackViewState() {
            marked = true;
        }

        /*
         * Remove a StateItem from the bag altogether regardless of marked.
         * Used internally by controls.
         */

        /// <devdoc>
        /// <para>Removes the specified item from the <see cref='System.Web.UI.StateBag'/> object.</para>
        /// </devdoc>
        public void Remove(string key) {
            bag.Remove(key);
        }

        /*
         * Private implementation of IDictionary Remove
         */

        /// <internalonly/>
        void IDictionary.Remove(object key) {
            Remove((string) key);
        }

        /*
         * Return object containing state that has been modified since "mark".
         * Returns null if there is no modified state.
         */

        /// <devdoc>
        ///    <para>Returns an object that contains all state changes for items stored in the
        ///    <see langword='StateBag'/> object.</para>
        /// </devdoc>
        internal object SaveViewState() {
            ArrayList data = null;

            //

            if (bag.Count != 0) {
                IDictionaryEnumerator e = bag.GetEnumerator();
                while (e.MoveNext()) {
                    StateItem item = (StateItem)(e.Value);
                    if (item.IsDirty) {
                        if (data == null) {
                            data = new ArrayList();
                        }
#if OBJECTSTATEFORMATTER
                        data.Add(new IndexedString((string)e.Key));
#else
                        data.Add(e.Key);
#endif
                        data.Add(item.Value);
                    }
                }
            }


} else {
        Err(error_buffer)
    }
}
<filename>src/controller/state/silent.rs
use super::super::{Environment, Modifications, System};
use super::{RoomState, State};
use crate::controller::system::mpd_control as mpd;
use crate::errors::Error;

use philipshue::hue::LightCommand;
use std::time::{Duration, Instant};

#[derive(Clone, Copy)]
pub struct Silent {}

impl Silent {
    pub fn setup(mods: &mut Modifications, sys: &mut System) -> Result<Box<dyn RoomState>, Error> {
        dbg!("entering silent mode");
        mods.reset();

        sys.update_period = Duration::from_secs(60);
        sys.next_update = Instant::now() + sys.update_period;

        mpd::pause()?;

        sys.lights.single_off(2)?;
        let command = LightCommand::default().on().with_bri(77).with_ct(2000);

        for lamp_id in &[1, 8, 5, 4, 6] {
            sys.lights.bridge.set_light_state(*lamp_id, &command)?;
            sys.lights.lamps.get_mut(lamp_id).unwrap().on = true;
        }

        Ok(Box::new(Silent {}))
    }
}

impl RoomState for Silent {
    fn update(
        &mut self,
        _: &mut Modifications,
        _: &mut System,
        _env: &mut Environment,
    ) -> Result<Option<State>, Error> {
        Ok(None)
    }

    fn breakdown(&self, _: &mut Modifications, _: &mut System) -> Result<(), Error> {
        Ok(())
    }
    fn state(&self) -> State {
        State::Silent
    }
}
<reponame>mattuna15/aloevera<filename>vera/tests/tilemap.rs
// Copyright 2020 Revcore Technologies Ltd.
//
// 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.

use aloevera_util::init_test_logger;
use aloevera_vera::Error;

use aloevera_vera::{AsmFormat, Assemblable};
use aloevera_vera::{
	VeraImageSet, VeraImageSetLoadConfig, VeraPalette, VeraPaletteLoadConfig, VeraPixelDepth,
	VeraTileMap, VeraTileMapDim, VeraTileMapMode,
};

#[test]
fn tilemap_32_x_32_x_16_8bpp() -> Result<(), Error> {
	init_test_logger();
	let setdata = include_bytes!("data/tilemap/tileset_4-bpp.png");
	// Load Palette straigt from tilemap
	let pal_config = VeraPaletteLoadConfig {
		direct_load: true,
		include_defaults: false,
		sort: false,
		..VeraPaletteLoadConfig::default()
	};
	let palette = VeraPalette::derive_from_png("pal", setdata.to_vec(), &pal_config)?;
	println!("{}", palette);

	// create imageset from tilemap
	let mut set = VeraImageSet::new("tileset_1", 16, 16);
	let config = VeraImageSetLoadConfig::default();
	set.load_from_


0){
            dist[xx][yy] = dist[x][y]+1;
            prev1[xx][yy] = make_pair(x,y);
            acts[xx][yy] = Act('F',1,-1);
            Q.push(make_pair(xx, yy));
        }
        xx=x,yy=B;
        if(dist[xx][yy]<0){
            dist[xx][yy] = dist[x][y]+1;
            prev1[xx][yy] = make_pair(x,y);
            acts[xx][yy] = Act('F',2,-1);
            Q.push(make_pair(xx, yy));
        }
        //drop
        xx=0,yy=y;
        if(dist[xx][yy]<0){
            dist[xx][yy] = dist[x][y]+1;
            prev1[xx][yy] = make_pair(x,y);
            acts[xx][yy] = Act('D',1,-1);
            Q.push(make_pair(xx, yy));
        }
        xx=x,yy=0;
        if(dist[xx][yy]<0){
            dist[xx][yy] = dist[x][y]+1;
            prev1[xx][yy] = make_pair(x,y);
            acts[xx][yy] = Act('D',2,-1);
            Q.push(make_pair(xx, yy));
        }

        //pour
        int e = A-x;
        xx = x+min(e,y);
        yy = y-min(e,y);
        if(dist[xx][yy]<0){
            dist[xx][yy] = dist[x][y]+1;
            prev1[xx][yy] = make_pair(x,y);
            acts[xx][yy] = Act('P',2,1);
            Q.push(make_pair(xx, yy));
        }

        e = B-y;
        xx = x-min(e,x);
        yy = y+min(e,x);
        if(dist[xx][yy]<0){
            dist[xx][yy] = dist[x][y]+1;
            prev1[xx][yy] = make_pair(x,y);
            acts[xx][yy] = Act('P',1,2);
            Q.push(make_pair(xx, yy));
        }

    }
    printf("impossible\n");
    return 0;
}
#include<iostream>
#include<vector>
#include<string.h>
#include<stdio.h>
#include<stack>
#include<algorithm>
#include<stdlib.h>
#include<queue>
#include<utility>
#include<float.h>
#include<math.h>
#include<sstream>
#include<stdlib.h>
#include<limits.h>
#include<string>
#include<assert.h>
#include<numeric>
#include<map>
using namespace std;
int L,N,M;
vector<int> rock;
bool check(int d){
    //remove <=M rock
    int last = 0;
    int cnt = 1;
    int i=1;
    bool take = false;
    while(i<=N){
        while(i<=N && rock[i]-last<d) i++;
        if(i==N) take = true;
        if(i<=N) last = rock[i],cnt++;
        i++;
    }
    cnt++;
    if(take && L-rock[N]<d) cnt--;

    return N+2-cnt<=M;
}
int main(){
    scanf("%d%d%d",&L,&N,&M);
    int d;
    for(int i=0;i<N;i++){
        scanf("%d",&d);
        r


4, *+AR7			; 6004
	STL B, -4, *AR7-0B			; 6005
	STL B, -4, *AR7-0			; 6006
	STL B, -4, *AR7+0			; 6007
	STL B, -4, *AR7+0B			; 6008
	STL B, -4, *AR7-%			; 6009
	STL B, -4, *AR7-0%			; 6010
	STL B, -4, *AR7+%			; 6011
	STL B, -4, *AR7+0%			; 6012
	STL B, -4, *AR7(045B4h)			; 6013
	STL B, -4, *+AR7(045B5h)		; 6014
	STL B, -4, *+AR7(045B6h)%		; 6015
	STL B, -4, *(045B7h)			; 6016
	STL B, -3, *AR0				; 6017
	STL B, -3, *AR0-			; 6018
	STL B, -3, *AR0+			; 6019
	STL B, -3, *+AR0			; 6020
	STL B, -3, *AR0-0B			; 6021
	STL B, -3, *AR0-0			; 6022
	STL B, -3, *AR0+0			; 6023
	STL B, -3, *AR0+0B			; 6024
	STL B, -3, *AR0-%			; 6025
	STL B, -3, *AR0-0%			; 6026
	STL B, -3, *AR0+%			; 6027
	STL B, -3, *AR0+0%			; 6028
	STL B, -3, *AR0(045B8h)			; 6029
	STL B, -3, *+AR0(045B9h)		; 6030
	STL B, -3, *+AR0(045BAh)%		; 6031
	STL B, -3, *(045BBh)			; 6032
	STL B, -3, *AR1				; 6033
	STL B, -3, *AR1-			; 6034
	STL B, -3, *AR1+			; 6035
	STL B, -3, *+AR1			; 6036
	STL B, -3, *AR1-0B			; 6037
	STL B, -3, *AR1-0			; 6038
	STL B, -3, *AR1+0			; 6039
	STL B, -3, *AR1+0B			; 6040
	STL B, -3, *AR1-%			; 6041
	STL B, -3, *AR1-0%			; 6042
	STL B, -3, *AR1+%			; 6043
	STL B, -3, *AR1+0%			; 6044
	STL B, -3, *AR1(045BCh)			; 6045
	STL B, -3, *+AR1(045BDh)		; 6046
	STL B, -3, *+AR1(045BEh)%		; 6047
	STL B, -3, *(045BFh)			; 6048
	STL B, -3, *AR2				; 6049
	STL B, -3, *AR2-			; 6050
	STL B, -3, *AR2+			; 6051
	STL B, -3, *+AR2			; 6052
	STL B, -3, *AR2-0B			; 6053
	STL B, -3, *AR2-0			; 6054
	ST


(ent)
            ent:Fire("Close")
        end)

        -- Workaround: Make sure we let the dropship fly off, atm theres is no lua way to tell the contents of a specific model shape.
        -- 3031.886963 5218.268066 1532.155762
        local hackTrigger1 = ents.Create("trigger_once")
        hackTrigger1:SetupTrigger(Vector


fp_main         *Punkt 7 setzen

                move.w  40(a7),d0       *x_Koordinate
                sub.w   d5,d0           *y_Wert subtrahieren
                move.w  42(a7),d1       *y_Koordinate
                sub.w   d4,d1           *x_Wert subtrahieren
                movea.l 48(a7),a0       *Logbase
                bsr     fp_main         *Punkt 8 setzen

                sub.w   d4,d6


条 医院治安保卫人员因正常履行职责给不法行为人造成损害，符合法定免责条件的，依法不承担责任。

其他人员制止违法犯罪行为，符合见义勇为条件的，依照有关规定认定。

第二十八条 医院未履行安全秩序管理工作职责，存在安全工作隐患的，由公安机关责令改正，并处警告；逾期不改正的，依法予以处罚，并可建议有关组织对单位主要负责人和其他直接责任人员依法给予处分；构成犯罪的，依法追究刑事责任。

第二十九条 卫生健康、公安机关等有关部门工作人员在医院安全秩序管理工作中，玩忽职守、徇私舞弊、滥用职权的，依法给予政务处分；构成犯罪的，依法追究刑事责任。

第三十条 其他医疗卫生机构的安全秩序管理工作，参照本规定执行。

本规定所称就诊人员，是指进入医院的患者及其陪同人员。

第三十一条 本规定自2020年7月1日起施行。# 北京市实施《中华人民共和国工会法》办法

1994年9月8日 北京市第十届人民代表大会常务委员会第十二次会议通过

2002年7月18日 北京市第十一届人民代表大会常务委员会第三十五次会议修订

2015年11月27日 北京市第十四届人民代表大会常务委员会第二十三次会议修订

<!-- INFO END -->

## 第一章　总则

第一条 为了实施《中华人民共和国工会法》，结合本市实际情况，制定本办法。

第二条 本市的企业、事业单位、机关以及其他组织中以工资收入为主要生活来源或者与用人单位建立劳动关系的劳动者，不分民族、种族、性别、职业、宗教信仰、教育程度，都有依法参加和组织工会的权利。

企业、事业单位、机关以及其他组织应当对职工参加和组织工会给予支持，提供必要的条件。

任何组织和个人不得以职工户籍、就业期限、就业形式等为由，以解除劳动合同、降低工资、不缴纳社会保险费等手段，阻挠和限制职工参加和组织工会；不得对参加和组织工会的职工进行打


lock().push((handler, once));
    }

    /// Send an event to the `EventListener`.
    ///
    /// All the handlers handle the event, and those marked `once` will be removed immediately.
    pub fn trigger(&self, event: T) {
        self.events.lock().retain(|(f, once)| {
            f(&event);
            !once
        });
    }
}

impl<T> Default for EventListener<T> {
    fn default() -> Self {
        Self::new()
    }
}
<gh_stars>1-10
use std::sync::Arc;

use chrono::NaiveDate;

use finql_data::Currency;
use finql_postgres::PostgresDB;
use finql::portfolio::{PortfolioPosition, PositionTotals, PositionError, calculate_position_for_period};

use crate::accounts::AccountHandler;

// Calculate position for a given period for transactions in a set of accounts
pub async fn calculate_position_for_period_for_accounts(currency: Currency, account_ids: &[usize],
    start: NaiveDate, end: NaiveDate, db: Arc<PostgresDB>)
        -> Result<(PortfolioPosition, PositionTotals), PositionError> {
    let transactions = db.get_transactions_before_time(account_ids, end).await
        .map_err(PositionError::NoTransaction)?;
    calculate_position_for_period(currency, &transactions, start, end, db).await
}
<gh_stars>100-1000
// https://github.com/heim-rs/heim/blob/master/heim-disk/src/sys/unix/bindings/mod.rs
// https://github.com/heim-rs/heim/blob/master/heim-disk/src/sys/unix/partitions.rs

use std::ffi::CStr;
use std::io;
use std::mem;
use std::path::PathBuf;
use std::ptr;
use std::str::FromStr;

use nix::libc;

use crate::disk::{FileSystem, Partition};

#[allow(unused)]
pub const MNT_WAIT: libc::c_int = 1;
pub const MNT_NOWAIT: libc::c_int = 2;

extern "C" {
	fn getfsstat64(buf: *mut libc::statfs, bufsize: libc::c_int, flags: libc::c_int)
		-> libc::c_int;
}

// TODO: Since `MNT_NOWAIT` might return inconsistent data (see `getfsstat(2)`)
// it might be a good idea (maybe?) to wrap it into a `blocking` call
// and switch to the `MNT_WAIT` mode?
// Should be considered later.
fn mounts() -> io::Result<Vec<libc::statfs>> {
	let expected_len = unsafe { getfsstat64(ptr::null_mut(), 0, MNT_NOWAIT) };
	let mut mounts: Vec<libc::statfs> = Vec::with_capacity(expected_len as usize);
	let result = unsafe {
		getfsstat64(
			mounts.as_mut_ptr(),
			mem::size_of::<libc::statfs>() as libc::c_int * expected_len,
			MNT_NOWAIT,
		)
	};
	if result == -1 {
		return Err(io::Error::last_os_error());
	} else {
		debug_assert!(
			expected_len == result,
			"Expected {} statfs entries, but got {}",
			expected_len,
			result
		);
		unsafe {
			mounts.set_len(result as usize);
		}
	}

	Ok(mounts)
}

impl From<libc::statfs> for Partition {
	fn from(stat: libc::statfs) -> Partition {
		let device = unsafe {
			CStr::from_ptr(stat.f_mntfromname.as_ptr())
				.to_string_lossy()
				.to_string()
		};
		let filesystem = FileSystem::from_str(unsafe {
			&CStr::from_ptr(stat.f_fstypename.as_ptr()).to_string_lossy()
		})
		.unwrap();
		let mountpoint = PathBuf::


> fromTempDir() async {
    final tempDir = await getAppTemporaryDirectory();
    final freeSpace = await DiskSpace.getFreeDiskSpaceForPath(tempDir.path);
    final totalSpace = await DiskSpace.getTotalDiskSpace;

    // Convert from mebibytes (2^20 bytes) to bytes
    const mebibytesToBytes = 1024 * 1024;

    return DiskSpaceInfo(
      freeSpace: ((freeSpace ?? 0) * mebibytesToBytes).toInt(),
      totalSpace: ((totalSpace ?? 0) * mebibytesToBytes).toInt(),
    );
  }

  final int freeSpace;
  final int totalSpace;

  int get usedSpace => totalSpace - freeSpace;
  double get usagePercentage => totalSpace > 0 ? usedSpace / totalSpace : 0.0;

  static var zero = DiskSpaceInfo(
    freeSpace: 0,
    totalSpace: 0,
  );
}
// Package imports:
import 'package:booru_clients/danbooru.dart';
import 'package:dio/dio.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

// Project imports:
import '../../core/boorus/booru/providers.dart';
import '../../core/configs/config.dart';
import '../../core/http/http.dart';
import '../../core/http/providers.dart';
import '../../foundation/info/app_info.dart';
import '../../foundation/info/package_info.dart';
import '../../foundation/loggers/providers.dart';
import '../../foundation/vendors/google/providers.dart';

final danbooruClientProvider = Provider.family<DanbooruClient, BooruConfigAuth>(
  (ref, config) {
    final dio = ref.watch(danbooruDioProvider(config));

    return DanbooruClient(
      dio: dio,
      baseUrl: config.url,
      login: config.login,
      apiKey: config.apiKey,
    );
  },
);

final danbooruDioProvider = Provider.family<Dio, BooruConfigAuth>((
  ref,
  config,
) {
  final ddosProtectionHandler = ref.watch(httpDdosProtectionBypassHandler);
  final packageInfo = ref.watch(packageInfoProvider);
  final appInfo = ref.watch(appInfoProvider);
  final loggerService = ref.watch(loggerProvider);
  final booruDb = ref.watch(booruDbProvider);
  final cronetAvailable = ref.watch(isGooglePlayServiceAvailableProvider);

  return newDio(
    options: DioOptions(
      ddosProtectionHandler: ddosProtectionHandler,
      userAgent: getDefaultUserAgent(appInfo, packageInfo),
      authConfig: config,
      loggerService: loggerService,
      booruDb: booruDb,
      cronetAvailable: cronetAvailable,
    ),
    additionalInterceptors: [
      // 10 requests per second
      SlidingWindowRateLimitInterceptor(
        config: const SlidingWindowRateLimitConfig(
          requestsPerWindow: 10,
          windowSizeMs: 1000,
        ),
      ),
    ],
  );
});
// Flutter imports:
import 'package:flutter/material.dart';

// Package imports:
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:i18n/i18n.dart';

// Project imports:
import '../../core/boorus/defaults/widgets.dart';
import '../../core/boorus/engine/engine.dart';
import '../../core/comments/widgets.dart';
import '../../core/configs/config.dart';
import '../../core/configs/create/widgets.dart';
import '../../core/configs/manage/widgets.dart';
import '../../core/configs/ref.dart';
import '../../core/downloads/filename/types.dart';
import '../../core/home/custom_home.dart';
import '../../core/posts/details_parts/types.dart';
import '../../core/p


Request request =
   *       ListWorkspacesRequest.newBuilder()
   *           .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setOrderBy("orderBy-1207110587")
   *           .setFilter("filter-1274492040")
   *           .build();
   *   while (true) {
   *     ListWorkspacesResponse response = dataformClient.listWorkspacesCallable().call(request);
   *     for (Workspace element : response.getWorkspacesList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }

   */
  public final UnaryCallable<ListWorkspacesRequest, ListWorkspacesResponse>
      listWorkspacesCallable() {
    return stub.listWorkspacesCallable();
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Fetches a single Workspace.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (DataformClient dataformClient = DataformClient.create()) {
   *   WorkspaceName name =
   *       WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]");
   *   Workspace response = dataformClient.getWorkspace(name);
   * }
   * }

   *
   * @param name Required. The workspace's name.
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final Workspace getWorkspace(WorkspaceName name) {
    GetWorkspaceRequest request =
        GetWorkspaceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
    return getWorkspace(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Fetches a single Workspace.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (DataformClient dataformClient = DataformClient.create()) {
   *   String name =
   *       WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]").toString();
   *   Workspace response = dataformClient.getWorkspace(name);
   * }
   * }

   *
   * @param name Required. The workspace's name.
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final Workspace getWorkspace(String name) {
    GetWorkspaceRequest request = GetWorkspaceRequest.newBuilder().setName(name).build();
    return getWorkspace(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Fetches a single Workspace.
   *
   *
Sample code:


K-NEXT: [3]   - BWPort1
# CHECK-NEXT: [4]   - BWPort2
# CHECK-NEXT: [5]   - BWPort3
# CHECK-NEXT: [6]   - BWPort4
# CHECK-NEXT: [7]   - BWPort5
# CHECK-NEXT: [8]   - BWPort6
# CHECK-NEXT: [9]   - BWPort7

# CHECK:      Resource pressure per iteration:
# CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6]    [7]    [8]    [9]
# CHECK-NEXT:  -      -     17.50  7.50   3.33   3.33   4.00   15.50  13.50  1.33

# CHECK:      Resource pressure by instruction:
# CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6]    [7]    [8]    [9]    Instructions:
# CHECK-NEXT:  -      -     3.25   2.25   0.83   0.83   1.00   2.25   3.25   0.33   cmpxchg8b	(%rax)
# CHECK-NEXT:  -      -     5.50   1.50   0.83   0.83   1.00   5.50   3.50   0.33   cmpxchg16b	(%rax)
# CHECK-NEXT:  -      -     3.25   2.25   0.83   0.83   1.00   2.25   3.25   0.33   lock		cmpxchg8b	(%rax)
# CHECK-NEXT:  -      -     5.50   1.50   0.83   0.83   1.00   5.50   3.50   0.33   lock		cmpxchg16b	(%rax)


Entity )
{
	return EntityPassesFilter(pEntity);
}

void CFuncVPhysicsClip::InputEnable( inputdata_t &inputdata )
{
	VPhysicsGetObject()->EnableCollisions(true);
	m_bDisabled = false;
}

void CFuncVPhysicsClip::InputDisable( inputdata_t &inputdata )
{
	VPhysicsGetObject()->EnableCollisions(false);
	m_bDisabled = true;
}
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//=============================================================================//
#include "cbase.h"
#include "smoke_trail.h"
#include "dt_send.h"

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

#define SMOKETRAIL_ENTITYNAME		"env_smoketrail"
#define SPORETRAIL_ENTITYNAME		"env_sporetrail"
#define SPOREEXPLOSION_ENTITYNAME	"env_sporeexplosion"
#define DUSTTRAIL_ENTITYNAME		"env_dusttrail"

//-----------------------------------------------------------------------------
//Data table
//-----------------------------------------------------------------------------
IMPLEMENT_SERVERCLASS_ST(SmokeTrail, DT_SmokeTrail)
	SendPropFloat(SENDINFO(m_SpawnRate), 8, 0, 1, 1024),
	SendPropVector(SENDINFO(m_StartColor), 8, 0, 0, 1),
	SendPropVector(SENDINFO(m_EndColor), 8, 0, 0, 1),
	SendPropFloat(SENDINFO(m_ParticleLifetime), 16, SPROP_ROUNDUP, 0.1, 100),
	SendPropFloat(SENDINFO(m_StopEmitTime), 0, SPROP_NOSCALE),
	SendPropFloat(SENDINFO(m_MinSpeed), -1, SPROP_NOSCALE),
	SendPropFloat(SENDINFO(m_MaxSpeed), -1, SPROP_NOSCALE),
	SendPropFloat(SENDINFO(m_MinDirectedSpeed), -1, SPROP_NOSCALE),
	SendPropFloat(SENDINFO(m_MaxDirectedSpeed), -1, SPROP_NOSCALE),
	SendPropFloat(SENDINFO(m_StartSize), -1, SPROP_NOSCALE),
	SendPropFloat(SENDINFO(m_EndSize), -1, SPROP_NOSCALE),
	SendPropFloat(SENDINFO(m_SpawnRadius), -1, SPROP_NOSCALE),
	SendPropBool(SENDINFO(m_bEmit) ),
	SendPropInt(SENDINFO(m_nAttachment), 32 ),
	SendPropFloat(SENDINFO(m_Opacity), -1, SPROP_NOSCALE),
END_SEND_TABLE()

LINK_ENTITY_TO_CLASS(env_smoketrail, SmokeTrail);

BEGIN_DATADESC( SmokeTrail )

	DEFINE_FIELD( m_StartColor, FIELD_VECTOR ),
	DEFINE_FIELD( m_EndColor, FIELD_VECTOR ),
	DEFINE_KEYFIELD( m_Opacity, FIELD_FLOAT, "opacity" ),
	DEFINE_KEYFIELD( m_SpawnRate, FIELD_FLOAT, "spawnrate" ),
	DEFINE_KEYFIELD( m_ParticleLifetime, FIELD_FLOAT, "lifetime" ),
	DEFINE_FIELD( m_StopEmitTime, FIELD_TIME ),
	DEFINE_KEYFIELD( m_MinSpeed, FIELD_FLOAT, "minspeed" ),
	DEFINE_KEYFIELD( m_MaxSpeed, FIELD_FLOAT, "maxspeed" ),
	DEFINE_KEYFIELD( m_MinDirectedSpeed, FIELD_FLOAT, "mindirectedspeed" ),
	DEFINE_KEYFIELD( m_MaxDirectedSpeed, FIELD_FLOAT, "maxdirectedspeed" ),
	DEFINE_KEYFIELD( m_StartSize, FIELD_FLOAT, "startsize" ),
	DEFINE_KEYFIELD( m_EndSize, FIELD_FLOAT, "endsize" ),
	DEFINE_KEYFIELD( m_SpawnRadius, FIELD_


nano, JulieSigtuna, GldHkkowo, SukkaW, Rapiz1, Henry-ZHR, H-J-Granger, countercurrent-time, fouzhe, Ir1d, abc1763613206, EndlessCheng, Plaaant6, LUTLJS, ZsgsDesign, CB-X2-Jun, tallnutliu

本页面主要列举了一些与算法竞赛有关的在线评测网站、题目合集、书籍、工具等资源。

## 在线评测平台

在线评测平台（英语：Online Judging System，简称：OJ），一般用于刷题训练，参与和组织比赛，以及用户之间的交流分享。

### 国内

-   [51Nod](https://www.51nod.com/)：有许多值得尝试的数学题和思维题。
-   [Comet OJ](https://www.cometoj.com)：始于 2018 年，旨在为广大算法爱好者提供一个竞技、练习、交流的平台，经常举办原创性的高质量比赛，有丰富的题库。
-   [HDU Online Judge](http://acm.hdu.edu.cn/) 始于 2005 年，杭州电子科技大学在线评测系统，有多校训练的题目。
-   [HydroOJ](https://hydro.ac/)：始于 2021 年，为开源项目 [Hydro](https://hydro.js.org/) 的官方站。用户可以创建自己的 [域](https://hydro.ac/discuss/6087cc44e098b0cd7dde1a0c)，域中可以使用题库、比赛、讨论等主站可以使用的功能。
-   [Judge Duck Online](https://duck.ac/) 基于 [松松松](https://github.com/wangyisong1996) 开发的开源项目 [JudgeDuck](https://github.com/JudgeDuck)，可以将评测程序的运行时间精确到微秒。（题目较少）
-   [LibreOJ](https://loj.ac/)：始于 2017 年。基于开源项目 [Lyrio](https://github.com/lyrio-dev/lyrio)，Libre 取自由之意。题目所有测试数据以及提交的代码均对所有用户开放。目前由 [Menci](https://github.com/Menci) 维护。
-   [CDOJ](https://cdoj.site/d/lutece/)：电子科技大学在线评测系统，始于 2012 年。
-   [洛谷](https://www.luogu.com.cn/)：始于 2013 年，社区群体庞大，各类 OI 的真题和习题较全。提供有偿教育服务。
-   [牛客网](https://www.nowcoder.com/)：


);s=/(chrome|firefox)[ \/]([\w.]+)/.exec(s)||/(iphone|ipad|ipod)(?:.*version)?[ \/]([\w.]+)/.exec(s)||/(android)(?:.*version)?[ \/]([\w.]+)/.exec(s)||/(webkit|opera)(?:.*version)?[ \/]([\w.]+)/.exec(s)||/(msie) ([\w.]+)/.exec(s)||/(trident).+rv:(\w.)+/.exec(s)||[];o=s[1];h=parseFloat(s[2]);switch(o){case"msie":case"trident":o="ie";h=y.documentMode||h;break;case"firefox":o="ff";break;case"ipod":case"ipad":case"iphone":o="ios";break;case"webkit":o="safari"}for(u.browser={name:o,version:h},u.browser[o]=!0,l=0,d=i.browsers.length;l<d;l++)for(f in i.browsers[l])if(o===f)for(r(f),g=i.browsers[l][f].min,nt=i.browsers[l][f].max,e=g;e<=nt;e++)h>e?(i.browserCss.gt&&r("gt-"+f+e),i.browserCss.gte&&r("gte-"+f+e)):h<e?(i.browserCss.lt&&r("lt-"+f+e),i.browserCss.lte&&r("lte-"+f+e)):h===e&&(i.browserCss.lte&&r("lte-"+f+e),i.browserCss.eq&&r("eq-"+f+e),i.browserCss.gte&&r("gte-"+f+e));else r("no-"+f);r(o);r(o+parseInt(h,10));i.html5&&o==="ie"&&h<9&&p("abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|progress|section|summary|time|video".split("|"),function(n){y.createElement(n)});p(ut.pathname.split("/"),function(n,u){if(this.length>2&&this[u+1]!==t)u&&r(this.slice(u,u+1).join("-").toLowerCase()+i.section);else{var f=n||"index",e=f.indexOf(".");e>0&&(f=f.substring(0,e));c.id=f.toLowerCase()+i.page;u||r("root"+i.section)}});u.screen={height:n.screen.height,width:n.screen.width};tt();b=0;n.addEventListener?n.addEventListener("resize",it,!1):n.attachEvent("onresize",it)})(window);
		/*! head.css3 - v1.0.0 */
		(function(n,t){"use strict";function a(n){for(var r in n)if(i[n[r]]!==t)return!0;return!1}function r(n){var t=n.charAt(0).toUpperCase()+n.substr(1),i=(n+" "+c.join(t+" ")+t).split(" ");return!!a(i)}var h=n.document,o=h.createElement("i"),i=o.style,s=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),c="Webkit Moz O ms Khtml".split(" "),l=n.head_conf&&n.head_conf.head||"head",u=n[l],f={gradient:function(){var n="background-image:";return i.cssText=(n+s.join("gradient(linear,left top,right bottom,from(#9f9),to(#fff));"+n)+s.join("linear-gradient(left top,#eee,#fff);"+n)).slice(


/*
 * 9p utilities
 *
 * Copyright IBM, Corp. 2017
 *
 * Authors:
 *  Greg Kurz <groug@kaod.org>
 *
 * This work is licensed under the terms of the GNU GPL, version 2 or later.
 * See the COPYING file in the top-level directory.
 */

#ifndef QEMU_9P_UTIL_H
#define QEMU_9P_UTIL_H

#ifdef O_PATH
#define O_PATH_9P_UTIL O_PATH
#else
#define O_PATH_9P_UTIL 0
#endif

static inline void close_preserve_errno(int fd)
{
    int serrno = errno;
    close(fd);
    errno = serrno;
}

static inline int openat_dir(int dirfd, const char *name)
{
    return openat(dirfd, name,
                  O_DIRECTORY | O_RDONLY | O_NOFOLLOW | O_PATH_9P_UTIL);
}

static inline int openat_file(int dirfd, const char *name, int flags,
                              mode_t mode)
{
    int fd, serrno, ret;

again:
    fd = openat(dirfd, name, flags | O_NOFOLLOW | O_NOCTTY | O_NONBLOCK,
                mode);
    if (fd == -1) {
        if (errno == EPERM && (flags & O_NOATIME)) {
            /*
             * The client passed O_NOATIME but we lack permissions to honor it.
             * Rather than failing the open, fall back without O_NOATIME. This
             * doesn't break the semantics on the client side, as the Linux
             * open(2) man page notes that O_NOATIME "may not be effective on
             * all filesystems". In particular, NFS and other network
             * filesystems ignore it entirely.
             */
            flags &= ~O_NOATIME;
            goto again;
        }
        return -1;
    }

    serrno = errno;
    /* O_NONBLOCK was only needed to open the file. Let's drop it. We don't
     * do that with O_PATH since fcntl(F_SETFL) isn't supported, and openat()
     * ignored it anyway.
     */
    if (!(flags & O_PATH_9P_UTIL)) {
        ret = fcntl(fd, F_SETFL, flags);
        assert(!ret);
    }
    errno = serrno;
    return fd;
}

ssize_t fgetxattrat_nofollow(int dirfd, const char *path, const char *name,
                             void *value, size_t size);
int fsetxattrat_nofollow(int dirfd, const char *path, const char *name,
                         void *value, size_t size, int flags);
ssize_t flistxattrat_nofollow(int dirfd, const char *filename,
                              char *list, size_t size);
ssize_t fremovexattrat_nofollow(int dirfd, const char *filename,
                                const char *name);

#endif


-----------------|
| ToBeSigned (TBS) MD5              | 7dd2351a85d3665eeb6720a21f4f7dee  |
| ToBeSigned (TBS) SHA1             | 77838c4d7f36958a581841d28f481d61ce0696ed |
| ToBeSigned (TBS) SHA256           | 846725f4b0193468c1079d6127e9e6e420fc6ed66019ed02d732ba644decad57 |
| Subject                           | C=BE, O=GlobalSign nv,sa, OU=ObjectSign CA, CN=GlobalSign ObjectSign CA |
| ValidFrom                         | 2004-01-22 10:00:00 |
| ValidTo                           | 2017-01-27 10:00:00 |
| Signature                         | 1e6af36df48ea922fe7008652ea15dab3330dd6c78fa4beaadc58dec107a6ac55897396b92f391e20ca7281cd15d768e8b077c136fadc43643b3c1bc3159cf1838d8a33bceffca6758bfe0f1ac613ea23b1ebc025b41ac446bf526f3ed5ea865f6ca65a63fcaf577eba5862a582956f8be161040e9d2fc572c636137662539202e0703a036032594bd7ceb7ed3a3c2c57616753092b9ff7641352168d10e5e5c8ec30360e68040fcc05da2546e6e9267a7811287a2a32bdbb74dffe4d5c7e505e6d5f1aefccd661821f33e47c9e59542612c9d2680b20fa83d0ec9a778df6e748c2c46f672e93c646b2855c44b6433cb78541338f0d57106d43e0d0a350ee0b3 |
| SignatureAlgorithmOID             | 1.2.840.113549.1.1.5 |
| IsCertificateAuthority            | True |
| SerialNumber                      | 040000000001239e0faf24 |
| Version                           | 3 |
###### Certificate 610b7f6b000000000019
| Field                             | Value                      |
|-----------------------------------|----------------------------|
| ToBeSigned (TBS) MD5              | 4798d55be7663a75649cda4dedc686ef  |
| ToBeSigned (TBS) SHA1             | 0f1ab2937b245d9466ea6f9bf056a5942e3989cf |
| ToBeSigned (TBS) SHA256           | ef14ea05bb066ee9f4188196dd69cd769b283ac4d7555db52f5e76922d3456e1 |
| Subject                           | C=BE, O=GlobalSign nv,sa, OU=Root CA, CN=GlobalSign Root CA |
| ValidFrom                         | 2006-05-23 17:00:51 |
| ValidTo                           | 2016-05-23 17:10:51 |
| Signature                         | 13c56c5e077f3c57ff9b315f3fbd955425c679f92c31034d64694b56d95b976f7cf3f0d024657538639813701613f7a701f1c623e085866c0bf080945a75e87ce41e92b473bfc1b3a7b00bd31884cbcc09a35c9c4f3eb03a9c2d1bc404ef9737966fe5ecbaac6ab3d4e23cdf8b25e7acbc624531dda40a72e41bf8784301ccba3914de5d90aed85acf5eca46815133d5a60e5867d3d8665888169beeb11acaad91138421da9a6e20efda007428bac95ff34d5dc3da25692554ea44bcc39b29331cd63c961f8781


using System.Web.Optimization;

namespace YoYoCms.AbpProjectTemplate.Web.Bundling
{
    public static class FrontEndBundleConfig
    {
        public static void RegisterBundles(BundleCollection bundles)
        {
            //LIBRARIES

            AddFrontendCssLibs(bundles, false);
            AddFrontendCssLibs(bundles, true);

            bundles.Add(
                new ScriptBundle("~/Bundles/Frontend/libs/js")
                    .Include(

                        ScriptPaths.MomentJs,
                        ScriptPaths.MomentTimezoneJs,
                        ScriptPaths.Abp,
                        ScriptPaths.Abp_JQuery,
                        ScriptPaths.Abp_Toastr,
                        ScriptPaths.Abp_BlockUi,
                        ScriptPaths.Abp_SpinJs,
                        ScriptPaths.Abp_SweetAlert,
                        ScriptPaths.Abp_Moment
                    ).ForceOrdered()
                );

            //METRONIC

            AddFrontendCssMetronic(bundles, false);
            AddFrontendCssMetronic(bundles, true);

        }

        private static void AddFrontendCssLibs(BundleCollection bundles, bool isRTL)
        {
            bundles.Add(
                new StyleBundle("~/Bundles/Frontend/libs/css" + (isRTL ? "RTL" : ""))
                    .Include(StylePaths.Simple_Line_Icons, new CssRewriteUrlWithVirtualDirectoryTransform())
                    .Include(StylePaths.FontAwesome, new CssRewriteUrlWithVirtualDi