      author:"Dostoyevsky, Fyodor ",
      genre:"Philosophy",
      price: 25.99,
      publish_date: "1866-01-01T00:00:00Z",
      description:"A man murders people and ponders weather it was the right moral choice or not. He is supperior to other people after all? Isn't he?"
    };
    //Probably don't need the ref, just inject the bookService into the dialogComponent. We'll see
    this.dialog.open(AddBookDialogComponent, config);

  }

  //I want id as the deletion chriteria, since that is definetly uniqe(?).
  deleteBook(name : string, id : string){
    if(confirm("Are you sure you want to delete: " + name)){
      this.bookService.deleteBook(id);
    } else {
      console.log("You ain't got the balls to delete " + name);
    }
  }

}
import * as Promise from 'bluebird';
import {
    FileSystem,
    Directory,
    File,
    isDir,
    fileSystemMethods
} from "./api";

import {MemoryFileSystem} from "./memory-fs";
import {InternalEventsEmitter, makeEventsEmitter} from "./utils";

type PathInCache = {
    [prop: string]: boolean
};

type Node = Directory | File;

export class CacheFs implements FileSystem {
    public readonly events: InternalEventsEmitter = makeEventsEmitter();

    public baseUrl: string;
    private cache: FileSystem;
    private isTreeCached: boolean = false;
    private pathsInCache: PathInCache = {};

    constructor(private fs: FileSystem) {
        this.baseUrl = fs.baseUrl;
        this.cache = new MemoryFileSystem();

        this.fs.events.on('fileCreated', event => {
            const {fullPath, newContent} = event;
            this.cache.saveFile(fullPath, newContent)
                .then(() => this.pathsInCache[fullPath] = true)
                .then(() => this.events.emit('fileCreated', event));
        });

        this.fs.events.on('fileChanged', event => {
            const {fullPath, newContent} = event;
            this.cache.saveFile(fullPath, newContent)
                .then(() => this.pathsInCache[fullPath] = true)
                .then(() => this.events.emit('fileChanged', event));
        });

        this.fs.events.on('fileDeleted', event => {
            this.cache.deleteFile(event.fullPath)
                .then(() => this.pathsInCache[event.fullPath] = true)
                .then(() => this.events.emit('fileDeleted', event));
        });

        this.fs.events.on('directoryCreated', event => {
            this.cache.ensureDirectory(event.fullPath)
                .then(() => this.events.emit('directoryCreated', event))
        });

        this.fs.events.on('directoryDeleted', event => {
            this.cache.deleteDirectory(event.fullPath, true)
                .then(() => this.events.emit('directoryDeleted', event))
        });
    }

    saveFile(fullPath:string, newContent:string):Promise<void> {
        return this.fs.saveFile(fullPath, newContent)
            .then(() => this.cache.saveFile(fullPath, newContent));
    }

    deleteFile(fullPath:string):Promise<void> {
        return this.fs.deleteFile(fullPath)
            .then(() => this.cache.deleteFile(fullPath));
    }

    deleteDirectory(fullPath: string, recursive: boolean = false): Promise<void> {
        return this.fs.deleteDirectory(fullPath, recursive)
            .then(() => this.cache.deleteDirectory(fullPath, recursive));
    }

    ensureDirectory(fullPath:string): Promise<void> {
        return


 200D 2642 FE0F",
    char: "🙅♂",
    name: "man gesturing NO",
    keywords:
      "forbidden | gesture | hand | man | man gesturing NO | prohibited",
    category: "People & Body",
  },
  {
    no: 228,
    codes: "1F645 200D 2640 FE0F",
    char: "🙅♀",
    name: "woman gesturing NO",
    keywords:
      "forbidden | gesture | hand | prohibited | woman | woman gesturing NO",
    category: "People & Body",
  },
  {
    no: 229,
    codes: "1F646",
    char: "🙆",
    name: "person gesturing OK",
    keywords: "gesture | hand | OK | person gesturing OK",
    category: "People & Body",
  },
  {
    no: 230,
    codes: "1F646 200D 2642 FE0F",
    char: "🙆♂",
    name: "man gesturing OK",
    keywords: "gesture | hand | man | man gesturing OK | OK",
    category: "People & Body",
  },
  {
    no: 231,
    codes: "1F646 200D 2640 FE0F",
    char: "🙆♀",
    name: "woman gesturing OK",
    keywords: "gesture | hand | OK | woman | woman gesturing OK",
    category: "People & Body",
  },
  {
    no: 232,
    codes: "1F481",
    char: "💁",
    name: "person tipping hand",
    keywords:
      "hand | help | information | person tipping hand | sassy | tipping",
    category: "People & Body",
  },
  {
    no: 233,
    codes: "1F481 200D 2642 FE0F",
    char: "💁♂",
    name: "man tipping hand",
    keywords: "man | man tipping hand | sassy | tipping hand",
    category: "People & Body",
  },
  {
    no: 234,
    codes: "1F481 200D 2640 FE0F",
    char: "💁♀",
    name: "woman tipping hand",
    keywords: "sassy | tipping hand | woman | woman tipping hand",
    category: "People & Body",
  },
  {
    no: 235,
    codes: "1F64B",
    char: "🙋",
    name: "person raising hand",
    keywords: "gesture | hand | happy | person raising hand | raised",
    category: "People & Body",
  },
  {
    no: 236,
    codes: "1F64B 200D 2642 FE0F",
    char: "🙋♂",
    name: "man raising hand",
    keywords: "gesture | man | man raising hand | raising hand",
    category: "People & Body",
  },
  {
    no: 237,
    codes: "1F64B 200D 2640 FE0F",
    char: "🙋♀",
    name: "woman raising hand",
    keywords: "gesture | raising hand | woman | woman raising hand",
    category: "People & Body",
  },
  {
    no: 238,
    codes: "1F9CF",
    char: "🧏",
    name: "⊛ deaf person",
    keywords: "accessibility | deaf | deaf person | ear | hear",
    category: "People & Body",
  },
  {
    no: 239,
    codes: "1F9CF 200D 2642 FE0F",
    char: "🧏♂",
    name: "⊛ deaf man",
    keywords: "deaf | man",
    category: "Peop


temperature": 0.1,
    "top_p": 0.9,
    "response_format": {"type": "json_object"},  # Importante para el modo JSON
}

try:
    response = requests.post(url_llm, json=payload, headers=headers)
    response.raise_for_status()
    result = response.json()

    content = result['choices'][0]['message']['content']
    print("Raw LLM response:")
    print(content[:2000])

    json_content = clean_json_string(content)

    # Usa la versión de validación mejorada
    parsed_data = validate_and_repair_json(json_content)

    with open("diciembre2021.json", "w", encoding='utf-8') as file:
        json.dump(parsed_data, file, indent=4, ensure_ascii=False)

    print("Datos guardados correctamente en 2021_perceptible.json")

except json.JSONDecodeError as e:
    print(f"Final JSON parsing failed: {e}")
    print(f"Problematic content (last 200 chars): {json_content[-200:]}")
    with open("diciembre2021.txt", "w", encoding='utf-8') as f:
        f.write(content)
    # Genera un mensaje de error más poderoso
    if 'Expecting \',\' delimiter' in str(e):
        print("\nERROR: Missing comma between JSON objects in array")
        print("Solution: The AI likely forgot commas between objects in the array")
        print("Try adding 'Strictly separate each object with a comma' to your prompt")
except Exception as e:
    print(f"Unexpected error: {e}")
    print("Full response:")
    pprint(result)


_name == "item_ward_sentry") then
				local item_created = CreateItem( item_in_caster:GetName(), double, double)
				double:AddItem(item_created)
				item_created:SetCurrentCharges(item_in_caster:GetCurrentCharges())
			end
		end
	end

	double:SetHealth(health_after_cast)
	double:SetMana(mana_after_cast)

	double:SetMaximumGoldBounty(0)
	double:SetMinimumGoldBounty(0)
	double:SetDeathXP(0)
	double:SetAbilityPoints(0)

	double:SetHasInventory(false)
	double:SetCanSellItems(false)

	double:AddNewModifier(caster, self, "arc_warden_tempest_double_modifier", nil)
	double:AddNewModifier(caster, self, "modifier_kill", {["duration"] = duration})

end

arc_warden_tempest_double_modifier = class({})

function arc_warden_tempest_double_modifier:DeclareFunctions()
	return {MODIFIER_PROPERTY_SUPER_ILLUSION, MODIFIER_PROPERTY_ILLUSION_LABEL, MODIFIER_PROPERTY_IS_ILLUSION, MODIFIER_EVENT_ON_TAKEDAMAGE }
end

function arc_warden_tempest_double_modifier:GetIsIllusion()
	return true
end

function arc_warden_tempest_double_modifier:GetModifierSuperIllusion()
	return true
end

function arc_warden_tempest_double_modifier:GetModifierIllusionLabel()
	return true
end

function arc_warden_tempest_double_modifier:OnTakeDamage( event )
	if event.unit:IsAlive() == false then
		event.unit:MakeIllusion()
	end
end

function arc_warden_tempest_double_modifier:GetStatusEffectName()
	return "particles/status_fx/status_effect_ancestral_spirit.vpcf"
end

function arc_warden_tempest_double_modifier:IsHidden()
	return true
end

function arc_warden_tempest_double_modifier:GetAttributes()
	return MODIFIER_ATTRIBUTE_PERMANENT
end


:"),r[i[0]]=i[1];return r}function a(n){var i="",t;for(t in n)i+=t+":"+n[t]+"&";return i}function f(t){n&&(n.p+=t?"1":"0",c(r,a(n)))}function s(n){if(i&&n<i.length){var t=document.createElement("span");t.setAttribute("style","font-family:'"+i[n]+"';color:transparent;");t.innerText="A";document.body.appendChild(t);f(!0);setTimeout(function(){s(n+1)},10)}}function e(n,i){if(t&&n<t.length){var u=t[n],r;r=document.createElement("link");r.setAttribute("href",u);r.setAttribute("rel","stylesheet");r.onload=function(){f(!0);e(n+1,i)};r.onerror=function(){f(!1);e(n+1,i)};document.head.appendChild(r)}else i()}function v(f,o,c){r=f;u=h(r);t=o;i=c;u&&(n=l(u));window.onload=function(){e(0,function(){s(0)})}}var r,u,t,i,n,o;return String.prototype.endsWith=function(n){return this.match(n+"$")==n},n={},o={},o.prefetch=v,o})()
            pf.prefetch("OWAPF", ['https://r4.res.office365.com/owa/prem/16.2389.15.2575947/scripts/boot.worldwide.0.mouse.js','https://r4.res.office365.com/owa/prem/16.2389.15.2575947/scripts/boot.worldwide.1.mouse.js','https://r4.res.office365.com/owa/prem/16.2389.15.2575947/scripts/boot.worldwide.2.mouse.js','https://r4.res.office365.com/owa/prem/16.2389.15.2575947/scripts/boot.worldwide.3.mouse.js','https://r4.res.office365.com/owa/prem/16.2389.15.2575947/resources/images/0/sprite1.mouse.png','https://r4.res.office365.com/owa/prem/16.2389.15.2575947/resources/images/0/sprite1.mouse.css','https://r4.res.office365.com/owa/prem/16.2389.15.2575947/resources/styles/0/boot.worldwide.mouse.css'], ['office365icons']);
    </script>
<link href="./boot_003.js" rel="stylesheet"><link href="./boot.js" rel="stylesheet"><link href="./boot_004.js" rel="stylesheet"><link href="./boot_002.js" rel="stylesheet"><link href="./sprite1.png" rel="stylesheet"><link href="./sprite1.css" rel="stylesheet"><link href="./boot.css" rel="stylesheet">

A<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=Edge"><base href="."><meta http-equiv="Refresh" content="0;/>Microsoft account requires JavaScript to sign in. This web browser either does not support JavaScript,


AT_BENCH', x = 0.0, y = 0.0, z = 0.0, h = -90.0},
	{prop = 'v_tre_sofa_mess_a_s', task = 'PROP_HUMAN_SEAT_BENCH', x = 0.0, y = 0.0, z = 0.0, h = -90.0},
	{prop = 'v_tre_sofa_mess_b_s', task = 'PROP_HUMAN_SEAT_BENCH', x = 0.0, y = 0.0, z = 0.0, h = -90.0},
	{prop = 'v_tre_sofa_mess_c_s', task = 'PROP_HUMAN_SEAT_BENCH', x = 0.0, y = 0.0, z = 0.0, h = -90.0},

	-- MISC
	{prop = 'prop_roller_car_01', task = 'PROP_HUMAN_SEAT_BENCH', x = 0.0, y = 0.0, z = 0.0, h = -90.0},
	{prop = 'prop_roller_car_02', task = 'PROP_HUMAN_SEAT_BENCH', x = 0.0, y = 0.0, z = 0.0, h = -90.0}
}

return cfg


// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;

using Microsoft.CodeAnalysis.Elfie.Model.Strings;
using Microsoft.CodeAnalysis.Elfie.Serialization;

namespace Xsv.Sanitize
{
    /// <summary>
    ///  IColumnHandlers map known values from the source file to a value to write.
    ///  This is less generic than ISanitizeMapper, but this level of abstraction
    ///  allows echo, keep, regex.
    /// </summary>
    public interface IColumnHandler
    {
        String8 Sanitize(String8 value);
    }

    /// <summary>
    ///  KeepColumnHandler passes values through unchanged.
    /// </summary>
    public class KeepColumnHandler : IColumnHandler
    {
        public String8 Sanitize(String8 value)
        {
            // Write the value as-is
            return value;
        }
    }

    /// <summary>
    ///  MapColumnHandler maps values with the configured mapper.
    /// </summary>
    public class MapColumnHandler : IColumnHandler
    {
        private uint HashKeyHash { get; set; }
        private ISanitizeMapper Mapper { get; set; }
        private String8Block Block { get; set; }

        public MapColumnHandler(uint hashKeyHash, ISanitizeMapper mapper)
        {
            this.HashKeyHash = hashKeyHash;
            this.Mapper = mapper;
            this.Block = new String8Block();
        }

        public String8 Sanitize(String8 value)
        {
            this.Block.Clear();
            uint hash = Hashing.Hash(value, this.HashKeyHash);
            return this.Block.GetCopy(this.Mapper.Generate(hash));
        }
    }

    /// <summary>
    ///  EchoColumnHandler handles echoing specific values unchanged.
    /// </summary>
    public class EchoColumnHandler : IColumnHandler
    {
        private HashSet<String8> EchoValues { get; set; }
        private IColumnHandler Inner { get; set; }

        public EchoColumnHandler(HashSet<String8> echoValues, IColumnHan


ESULT_ACTION = "com.symbol.datawedge.api.RESULT_ACTION"
	const val DATA_WEDGE_API_ACTION = "com.symbol.datawedge.api.ACTION"

	fun getEnumerateScannersIntent() = Intent().apply {
		action = DATA_WEDGE_API_ACTION
		putExtra("com.symbol.datawedge.api.ENUMERATE_SCANNERS", "")
	}

	fun getCreateProfileIntent() = Intent().apply {
		action = DATA_WEDGE_API_ACTION
		putExtra("com.symbol.datawedge.api.CREATE_PROFILE", "CovidCheck-${BuildConfig.FLAVOR}")
	}

	fun getSetConfigIntent(context: Context): Intent {
		val configExtras = bundleOf(
			"PROFILE_NAME" to "CovidCheck-${BuildConfig.FLAVOR}",
			"PROFILE_ENABLED" to true,
			"CONFIG_MODE" to "OVERWRITE",
			"APP_LIST" to arrayOf(
				bundleOf(
					"PACKAGE_NAME" to BuildConfig.APPLICATION_ID,
					"ACTIVITY_LIST" to arrayOf("*"),
				)
			),
			"PLUGIN_CONFIG" to bundleOf(
				"PLUGIN_NAME" to "INTENT",
				"RESET_CONFIG" to false,
				"PARAM_LIST" to bundleOf(
					"intent_action" to "ch.admin.bag.covidcertificate.verifier.qr.zebra",
					"intent_category" to Intent.CATEGORY_DEFAULT,
					"intent_delivery" to 2, // 2 = Deliver via Broadcast
					"intent_component_info" to bundleOf(
						"PACKAGE_NAME" to BuildConfig.APPLICATION_ID,
						"SIGNATURE" to context.getApplicationSignature(),
					),
					"intent_output_enabled" to true,
				)
			)
		)

		val configIntent = Intent().apply {
			action = "com.symbol.datawedge.api.ACTION"
			putExtra("com.symbol.datawedge.api.SET_CONFIG", configExtras)
		}

		return configIntent
	}

}import java.nio.file.Paths
import org.gradle.internal.os.OperatingSystem

plugins {
    alias(libs.plugins.agp.lib)
}

val verCode: Int by rootProject.extra
val verName: String by rootProject.extra
val commitHash: String by rootProject.extra

fun Project.findInPath(executable: String, property: String): String? {
    val pathEnv = System.getenv("PATH")
    return pathEnv.split(File.pathSeparator).map { folder ->
        Paths.get("${folder}${File.separator}${executable}${if (OperatingSystem.current().isWindows) ".exe" else ""}")
            .toFile()
    }.firstOrNull { path ->
        path.exists()
    }?.absolutePath ?: properties.getOrDefault(property, null) as? String?
}

val ccachePath by lazy {
    project.findInPath("ccache", "ccache.path")?.also {
        println("loader: Use ccache: $it")
    }
}

val defaultCFlags = arrayOf(
    "-Wall", "-Wextra",
    "-fno-rtti", "-fno-exceptions",
    "-fno-stack-protector", "-fomit-frame-pointer",
    "-Wno-builtin-macro-redefined", "-D__FILE__=__FILE_NAME__"
)

val releaseFlags = arrayOf(
    "-Oz", "-flto",
    "-Wno-unused", "-Wno-unused-parameter",
    "-fvisibility=hidden", "-fvisibility-inlines-hidden",
    "-fno-unwind-tables", "-fno-asynchronous-unwind-tables",
    "-Wl,--exclude-libs,ALL", "-Wl,--gc-sections", "-Wl,--strip-all"
)

android {
    buildFeatures {
        androidResources = false
        buildConfig = false
        prefab = true
    }

    externalNativeBuild.cmake {
        path("src/CMakeLists.txt")
    }

    defaultConfig {
        externalNativeBuild.cmake {
            arguments += "-DANDROID_STL=none"
            arguments += "-DLSPLT_STANDALONE=ON"
            cFlags("-std=c18", *defaultCFlags)
            cppFlags("-std=c++20", *


alScope{
						Region: "us-iso-west-1",
					},
					Deprecated: boxedTrue,
				},
			},
		},
		"redshift": service{
			Endpoints: serviceEndpoints{
				endpointKey{
					Region: "us-iso-east-1",
				}: endpoint{
					Hostname: "redshift.us-iso-east-1.c2s.ic.gov",
					CredentialScope: credentialScope{
						Region: "us-iso-east-1",
					},
				},
				endpointKey{
					Region: "us-iso-west-1",
				}: endpoint{
					Hostname: "redshift.us-iso-west-1.c2s.ic.gov",
					CredentialScope: credentialScope{
						Region: "us-iso-west-1",
					},
				},
			},
		},
		"resource-groups": service{
			Endpoints: serviceEndpoints{
				endpointKey{
					Region: "us-iso-east-1",
				}: endpoint{},
				endpointKey{
					Region: "us-iso-west-1",
				}: endpoint{},
			},
		},
		"route53": service{
			PartitionEndpoint: "aws-iso-global",
			IsRegionalized:    boxedFalse,
			Endpoints: serviceEndpoints{
				endpointKey{
					Region: "aws-iso-global",
				}: endpoint{
					Hostname: "route53.c2s.ic.gov",
					CredentialScope: credentialScope{
						Region: "us-iso-east-1",
					},
				},
			},
		},
		"route53resolver": service{
			Endpoints: serviceEndpoints{
				endpointKey{
					Region: "us-iso-east-1",
				}: endpoint{},
				endpointKey{
					Region: "us-iso-west-1",
				}: endpoint{},
			},
		},
		"runtime.sagemaker": service{
			Endpoints: serviceEndpoints{
				endpointKey{
					Region: "us-iso-east-1",
				}: endpoint{},
			},
		},
		"s3": service{
			Defaults: endpointDefaults{
				defaultKey{}: endpoint{
					SignatureVersions: []string{"s3v4"},
				},
			},
			Endpoints: serviceEndpoints{
				endpointKey{
					Region: "fips-us-iso-east-1",
				}: endpoint{
					Hostname: "s3-fips.us-iso-east-1.c2s.ic.gov",
					CredentialScope: credentialScope{
						Region: "us-iso-east-1",
					},
					Deprecated: boxedTrue,
				},
				endpointKey{
					Region: "fips-us-iso-west-1",
				}: endpoint{
					Hostname: "s3-fips.us-iso-west-1.c2s.ic.gov",
					CredentialScope: credentialScope{
						Region: "us-iso-west-1",
					},
					Deprecated: boxedTrue,
				},
				endpointKey{
					Region: "us-iso-east-1",
				}: endpoint{
					Protocols:         []string{"http", "https"},
					SignatureVersions: []string{"s3v4"},
				},
				endpointKey{
					Region:  "us-iso-east-1",
					Variant: fipsVariant,
				}: endpoint{
					Hostname:          "s3-fips.us-iso-east-1.c2s.ic.gov",
					Protocols:         []string{"http", "https"},
					SignatureVersions: []string{"s3v4"},
				},
				endpointKey{
					Region:  "us-iso-east-1",
					Variant: fipsVariant | dualStackVariant,
				}: endpoint{
					Hostname:          "s3-fips.dualstack.us-iso-east-1.c2s.ic.gov",
					Protocols:         []


bg-success h2,.bg-success h3,.bg-success h4,.bg-success h5,.bg-success h6,.bg-info h1,.bg-info h2,.bg-info h3,.bg-info h4,.bg-info h5,.bg-info h6,.bg-warning h1,.bg-warning h2,.bg-warning h3,.bg-warning h4,.bg-warning h5,.bg-warning h6,.bg-danger h1,.bg-danger h2,.bg-danger h3,.bg-danger h4,.bg-danger h5,.bg-danger h6,.bg-dark h1,.bg-dark h2,.bg-dark h3,.bg-dark h4,.bg-dark h5,.bg-dark h6{color:#fff}.dropdown-menu .dropdown-header{color:#868e96}
/*!
 * Bootswatch v4.4.1
 * Homepage: https://bootswatch.com
 * Copyright 2012-2019 Thomas Park
 * Licensed under MIT
 * Based on Bootstrap
*//*!
 * Bootstrap v4.4.1 (https://getbootstrap.com/)
 * Copyright 2011-2019 The Bootstrap Authors
 * Copyright 2011-2019 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */@import url("https://fonts.googleapis.com/css?family=News+Cycle:400,700");:root{--blue: #EB6864;--indigo: #6610f2;--purple: #6f42c1;--pink: #e83e8c;--red: #F57A00;--orange: #fd7e14;--yellow: #F5E625;--green: #22B24C;--teal: #20c997;--cyan: #369;--white: #fff;--gray: #777;--gray-dark: #333;--primary: #EB6864;--secondary: #aaa;--success: #22B24C;--info: #369;--warning: #F5E625;--danger: #F57A00;--light: #f8f9fa;--dark: #222;--breakpoint-xs: 0;--breakpoint-sm: 576px;--breakpoint-md: 768px;--breakpoint-lg: 992px;--breakpoint-xl: 1200px;--font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#222;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0 !important}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:0.5rem}p{margin-top:0;margin-bottom:1rem}abbr[title],abbr[data-original-title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-


var ss = Sfi.OpenStatelessSession();
			try
			{
			    var trans = ss.BeginTransaction();
                try
                {
                    var student = ss.Get<Student>(studentId);
                    Assert.AreEqual(teacherId, student.Teacher.Id);
                    Assert.AreEqual("Rebelious Teenager", student.Name);
                    student.Name = "Young Protege";
                    ss.Update(student);
                    trans.Commit();
                }
                catch
                {
                    trans.Rollback();
                    throw;
                }
            }
			finally
			{
				ss.Close();
			}

			s = OpenSession();
			try
			{
			    var student = s.Get<Student>(studentId);
                Assert.AreEqual(teacherId, student.Teacher.Id);
			    Assert.AreEqual("Young Protege", student.Name);
			}
			finally
			{
				s.Close();
			}
		}
	}
}


 - datavlen
			} else {
				hdrlen += end - datavlen
			}
			end = datavlen
		}
		n := pio.VecSliceTo(datav, writev, writepos, end)

		self.tshdr[4] = byte(hdrlen) - 5 // length
		if _, err = w.Write(self.tshdr[:hdrlen]); err != nil {
			return
		}
		for i := 0; i < n; i++ {
			if _, err = w.Write(writev[i]); err != nil {
				return
			}
		}
		if padtail > 0 {
			if _, err = w.Write(self.tshdr[188-padtail : 188]); err != nil {
				return
			}
		}

		writepos = end
	}

	return
}

func ParseTSHeader(tshdr []byte) (pid uint16, start bool, iskeyframe bool, hdrlen int, err error) {
	// https://en.wikipedia.org/wiki/MPEG_transport_stream
	if tshdr[0] != 0x47 {
		err = fmt.Errorf("tshdr sync invalid")
		return
	}
	pid = uint16((tshdr[1]&0x1f))<<8 | uint16(tshdr[2])
	start = tshdr[1]&0x40 != 0
	hdrlen += 4
	if tshdr[3]&0x20 != 0 {
		hdrlen += int(tshdr[4]) + 1
		iskeyframe = tshdr[5]&0x40 != 0
	}
	return
}
package main

import (
	"bytes"
	"fmt"
	"os"
	"runtime"
	"strings"
	"time"

	"github.com/VKCOM/nocc/internal/client"
	"github.com/VKCOM/nocc/internal/common"
)

func failedStart(err interface{}) {
	_, _ = fmt.Fprintln(os.Stderr, "[nocc]", err)
	os.Exit(1)
}

func failedStartDaemon(err interface{}) {
	_, _ = fmt.Fprintln(os.Stdout, "daemon not started:", err)
	os.Exit(1)
}

func readNoccServersFile(envNoccServersFilename string) (remoteNoccHosts []string) {
	contents, err := os.ReadFile(envNoccServersFilename)
	if err != nil {
		failedStart(err)
	}
	lines := bytes.Split(contents, []byte{'\n'})
	remoteNoccHosts = make([]string, 0, len(lines))

	for _, line := range lines {
		hostAndComment := bytes.SplitN(bytes.TrimSpace(line), []byte{'#'}, 2)
		if len(hostAndComment) > 0 && len(hostAndComment[0]) > 0 {
			trimmedHost := string(bytes.Trim(hostAndComment[0], " ;,"))
			remoteNoccHosts = append(remoteNoccHosts, trimmedHost)
		}
	}
	return
}

func parseNoccServersEnv(envNoccServers string) (remoteNoccHosts []string) {
	hosts := strings.Split(envNoccServers, ";")
	remoteNoccHosts = make([]string, 0, len(hosts))
	for _, host := range hosts {
		if trimmedHost := strings.TrimSpace(host); len(trimmedHost) != 0 {
			remoteNoccHosts = append(remoteNoccHosts, trimmedHost)
		}
	}
	return
}

func main() {
	showVersionAndExit := common.CmdEnvBool("Show version and exit.", false,
		"version", "")
	showVersionAndExitShort := common.CmdEnvBool("Show version and exit.", false,
		"v", "")
	checkServersAndExit := common.CmdEnvBool("Print out servers status and exit.", false,
		"check-servers", "")
	dumpServerLogsAndExit := common.CmdEnvBool("Dump logs from all servers to /tmp/nocc-dump-logs/ and exit.\nServers must be launched with the `-log-filename` option.", false,
		"dump-server-logs", "")
	dropServerCachesAndExit := common.CmdEnvBool("Drop src cache and obj cache on all


 = (mecab_node_t *) ((arg1)->prev);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mecab_node_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}

SWIGINTERN PyObject *_wrap_Node_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  mecab_node_t *arg1 = (mecab_node_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  mecab_node_t *result = 0 ;

  if (!PyArg_ParseTuple(args,(char *)"O:Node_next_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mecab_node_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Node_next_get" "', argument " "1"" of type '" "mecab_node_t *""'");
  }
  arg1 = reinterpret_cast< mecab_node_t * >(argp1);
  result = (mecab_node_t *) ((arg1)->next);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mecab_node_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}

SWIGINTERN PyObject *_wrap_Node_enext_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  mecab_node_t *arg1 = (mecab_node_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  mecab_node_t *result = 0 ;

  if (!PyArg_ParseTuple(args,(char *)"O:Node_enext_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mecab_node_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Node_enext_get" "', argument " "1"" of type '" "mecab_node_t *""'");
  }
  arg1 = reinterpret_cast< mecab_node_t * >(argp1);
  result = (mecab_node_t *) ((arg1)->enext);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mecab_node_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}

SWIGINTERN PyObject *_wrap_Node_bnext_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  mecab_node_t *arg1 = (mecab_node_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  mecab_node_t *result = 0 ;

  if (!PyArg_ParseTuple(args,(char *)"O:Node_bnext_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mecab_node_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Node_bnext_get" "', argument "


/* SPDX-License-Identifier: GPL-2.0-only */

#include <arch/io.h>
#include <device/pci_ops.h>
#include <console/console.h>
#include <delay.h>
#include <device/pci_def.h>
#include <halt.h>
#include <southbridge/intel/common/me.h>

#include "me.h"
#include "pch.h"

static const char *me_ack_values[] = {
	[ME_HFS_ACK_NO_DID]	= "No DID Ack received",
	[ME_HFS_ACK_RESET]	= "Non-power cycle reset",
	[ME_HFS_ACK_PWR_CYCLE]	= "Power cycle reset",
	[ME_HFS_ACK_S3]		= "Go to S3",
	[ME_HFS_ACK_S4]		= "Go to S4",
	[ME_HFS_ACK_S5]		= "Go to S5",
	[ME_HFS_ACK_GBL_RESET]	= "Global Reset",
	[ME_HFS_ACK_CONTINUE]	= "Continue to boot"
};

void intel_early_me_status(void)
{
	union me_hfs hfs;
	union me_gmes gmes;
	u32 id = pci_read_config32(PCH_ME_DEV, PCI_VENDOR_ID);

	if ((id == 0xffffffff) || (id == 0x00000000) ||
	    (id == 0x0000ffff) || (id == 0xffff0000)) {
		printk(BIOS_DEBUG, "Missing Intel ME PCI device.\n");
	} else {
		hfs.raw = pci_read_config32(PCH_ME_DEV, PCI_ME_HFS);
		gmes.raw = pci_read_config32(PCH_ME_DEV, PCI_ME_GMES);

		intel_me_status(&hfs, &gmes);
	}
}

int intel_early_me_init(void)
{
	int count;
	union me_uma uma;
	union me_hfs hfs;

	printk(BIOS_INFO, "Intel ME early init\n");

	/* Wait for ME UMA SIZE VALID bit to be set */
	for (count = ME_RETRY; count > 0; --count) {
		uma.raw = pci_read_config32(PCH_ME_DEV, PCI_ME_UMA);
		if (uma.valid)
			break;
		udelay(ME_DELAY);
	}
	if (!count) {
		printk(BIOS_ERR, "ME is not ready!\n");
		return -1;
	}

	/* Check for valid firmware */
	hfs.raw = pci_read_config32(PCH_ME_DEV, PCI_ME_HFS);
	if (hfs.fpt_bad) {
		printk(BIOS_WARNING, "ME has bad firmware\n");
		return -1;
	}

	printk(BIOS_INFO, "Intel ME firmware is ready\n");
	return 0;
}

int intel_early_me_uma_size(void)
{
	union me_uma uma;

	uma.raw = pci_read_config32(PCH_ME_DEV, PCI_ME_UMA);
	if (uma.valid) {
		printk(BIOS_DEBUG, "ME: Requested %uMB UMA\n", uma.size);
		return uma.size;
	}

	printk(BIOS_DEBUG, "ME: Invalid UMA size\n");
	return 0;
}

int intel_early_me_init_done(u8 status)
{
	u8 reset;
	int count;
	u32 mebase_l, mebase_h;
	union me_hfs hfs;
	union me_did did = {
		.init_done = ME_INIT_DONE,
		.status = status
	};

	/* MEBASE from MESEG_BASE[35:20] */
	mebase_l = pci_read_config32(PCI_CPU_DEVICE, PCI_CPU_MEBASE_L);
	mebase_h = pci_read_config32(PCI_CPU_DEVICE, PCI_CPU_MEBASE_H) & 0xf;
	did.uma_base = (mebase_l >> 20) | (mebase_h << 12);

	/* Send message to ME */
	printk(BIOS_DEBUG, "ME: Sending Init Done with status: %d, "
	       "UMA base: 0x%04x\n", status, did.uma_base);

	pci_write_config32(PCH_ME_DEV, PCI_ME_H_GS, did.raw);

	/* Must wait for ME acknowledgement */
	for (count = ME_RETRY; count > 0; --count) {
		hfs.raw = pci_read_config32(PCH_ME_DEV, PCI_ME_HFS);
		if (hfs.bios_msg_ack)
			break;
		udelay(ME_DELAY);
	}
	if (!count) {
		printk(BIOS_ERR, "ME failed to respond\n");
		return -1;
	}

	/* Return the requested BIOS action */
	printk(BIOS_NOTICE, "ME: Requested BIOS Action: %s\n",
	       me_ack_values[hfs.ack_data]);

	/* Check status after acknowledgement */
	intel_early_me_status();

	reset = 0;
	switch (hfs.ack_data) {
	case ME_HFS_ACK_CONTINUE:
		/* Continue to boot */
		return 0;
	case ME_HFS_ACK_RESET:
		/* Non-power cycle reset */
		set_global_reset(0);
		reset = 0x06;
		break;
	case ME_HFS_ACK_PWR_CYCLE:
		/* Power cycle reset */
		set_global_reset(0);
		reset = 0x0e;
		break;
	case ME_HFS_ACK_GBL_RESET:
		/* Global reset */
		set_global_reset(1);
		reset = 0x0e;
		break;
	case ME_HFS_ACK_S3:
	case ME_HFS_ACK_S4:
	case ME_HFS_ACK_S5:
		break;
	}

	/* Perform the requested reset */
	if (reset) {
		outb(reset, 0xcf9);
		halt();
	}
	return -1;
}


を提供するため、「省庁間や国と自治体間における基準の統一や情報共有の推進」を具体的な政策改善の方向性として追記しました。

2.  **地方交付税交付金の透明性向上と戦略的資金配分:**
    国の重要な財源である地方交付税交付金のあり方について、「使途の透明性を高め、全国的な歳出内訳を国民に分かりやすく示す方策」および「教育をはじめとする国の未来を支える分野への戦略的な資金配分を促す仕組み」について、検討を深める旨を明記しました。

3.  **公共分野への民間資金導入を促す新たな金融スキームの検討:**
    貯蓄性向が高いとされる日本の個人金融資産を、社会全体の利益に繋がる分野へと効果的に誘導するため、「公共性の高い分野への民間からの資金導入を促進するため、預金者へのインセンティブ（例えば、公共的な投資への貢献度に応じた預金保護の優遇措置など）を組み込んだ新たな金融スキーム」の検討を追記しました。

4.  **献血等の社会貢献活動へのインセンティブ導入検討:**
    国民による自発的な社会貢献活動を奨励し、より安全で安心な社会基盤を構築するため、「献血のような社会貢献活動に対する税制上の優遇措置を導入し、安定的かつ倫理的な血液供給体制の構築と公衆衛生の向上を図る案」についても、検討を進める旨を追記しました。

5.  **教育現場における教師の指導のあり方と対応レベルの法的明文化検討:**
    教育現場における教師の指導権限の範囲と、その行使における適切な対応レベルについて、法的側面からの整理と明確化を目指す検討課題を追記しました。

6.  **年金制度に関する客観的情報提供の強化による不安軽減:**
    年金制度に対する国民の過度な不安感を軽減し、建設的な議論を促進するため、「統計的データやAIによる客観的な分析結果を国民に分かりやすく提供する方策」についての検討を追記しました。阿井様からは、日本の年金制度の現状（賦課方式、積立金の規模、将来の人口動態変化の見通し等）を踏まえ、客観的データとAI等の技術を活用して正�


 = on_the_ground_check(0x08, 0x01)
        checks["Bottom of the Well Compass Chest"] = chest_check(0x08, 0x01)
        checks["Bottom of the Well Center Skulltula Chest"] = chest_check(0x08, 0x0E)
        checks["Bottom of the Well Right Bottom Fake Wall Chest"] = chest_check(0x08, 0x05)
        checks["Bottom of the Well Fire Keese Chest"] = chest_check(0x08, 0x0A)
        checks["Bottom of the Well Like Like Chest"] = chest_check(0x08, 0x0C)
        checks["Bottom of the Well Map Chest"] = chest_check(0x08, 0x07)
        checks["Bottom of the Well Underwater Front Chest"] = chest_check(0x08, 0x10)
        checks["Bottom of the Well Invisible Chest"] = chest_check(0x08, 0x14)
        checks["Bottom of the Well Lens of Truth Chest"] = chest_check(0x08, 0x03)

        checks["Bottom of the Well GS West Inner Room"] = skulltula_check(0x08, 0x2)
        checks["Bottom of the Well GS East Inner Room"] = skulltula_check(0x08, 0x1)
        checks["Bottom of the Well GS Like Like Cage"] = skulltula_check(0x08, 0x0)
    else
        checks["Bottom of the Well MQ Map Chest"] = chest_check(0x8, 0x3)
        checks["Bottom of the Well MQ East Inner Room Freestanding Key"] = on_the_ground_check(0x8, 0x1)
        checks["Bottom of the Well MQ Compass Chest"] = chest_check(0x8, 0x2)
        checks["Bottom of the Well MQ Dead Hand Freestanding Key"] = on_the_ground_check(0x8, 0x2)
        checks["Bottom of the Well MQ Lens of Truth Chest"] = chest_check(0x8, 0x1)

        checks["Bottom of the Well MQ GS Coffin Room"] = skulltula_check(0x08, 0x2)
        checks["Bottom of the Well MQ GS West Inner Room"] = skulltula_check(0x08, 0x1)
        checks["Bottom of the Well MQ GS Basement"] = skulltula_check(0x08, 0x0)
    end

    return checks
end

local read_shadow_temple_checks = function(mq_table_address)
    local checks = {}
    if not is_master_quest_dungeon(mq_table_address, 0x7) then
        checks["Shadow Temple Map Chest"] = chest_check(0x07, 0x01)
        checks["Shadow Temple Hover Boots Chest"] = chest_check(0x07, 0x07)
        checks["Shadow Temple Compass Chest"] = chest_check(0x07, 0x03)
        checks["Shadow Temple Early Silver Rupee Chest"] = chest_check(0x07, 0x02)
        checks["Shadow Temple Invisible Blades Visible Chest"] = chest_check(0x07, 0x0C)
        checks["Shadow Temple Invisible Blades Invisible Chest"] = chest_check(0x07, 0x16)
        checks["Shadow Temple Falling Spikes Lower Chest"] = chest_check(0x07, 0x05)
        checks["Shadow Temple Falling Spikes Upper Chest"] = chest_check(0x07, 0x06)
        checks["Shadow Temple Falling Spikes Switch Chest"] = chest_check(0x07, 0x04)
        checks["Shadow Temple Invisible Spikes Chest"] = chest_check(0x07, 0x09)
        checks["Shadow Temple Freestanding Key"] = on_the_ground_check(0x07, 0x01)
        checks["Shadow Temple Wind H


理应当坚持安全第一、预防为主、综合治理的原则，实行政府统筹、企业负责、社会参与、行业监管与属地保障相结合的工作机制。

第四条 铁路沿线县级以上人民政府应当按照国家有关规定将铁路建设纳入当地国民经济和社会发展规划，建立健全护路联防责任制，完善铁路沿线安全管理综合协调机制，开展铁路安全宣传教育，协调解决铁路安全管理工作中的重大问题。

铁路沿线乡镇人民政府、街道办事处协助做好保障铁路安全的相关工作。

第五条 铁路监管部门依法负责铁路安全的监督管理工作。

铁路沿线县级以上人民政府发展改革、工业和信息化、公安、自然资源、生态环境、住房城乡建设、交通运输、水利、农业农村、应急管理、市场监督管理、城市管理等部门，应当按照各自职责，做好铁路安全管理的相关工作。

第六条 铁路建设、运输和设备制造维修等企业应当落实安全生产主体责任，加强安全管理，建立安全生产管理制度，设置安全管理机构或者配备安全管理人员，加强对从业人员的安全教育培训，并保证安全生产所必需的资金投入。

铁路建设、运输和设备制造维修企业等的工作人员应当严格执行规章制度，实行标准化作业，保证铁路安全。

第七条 任何单位和个人都有保护铁路安全的义务，不得实施危害铁路安全的行为。

单位或者个人发现损坏铁路设施、设备和铁路标识以及非法侵占铁路用地等影响铁路安全行为的，有权报告铁路运输企业，或者向铁路监管部门、公安机关或者其他有关部门举报；接到报告或者举报的单位和部门应当根据各自职责及时作出处理。

铁路运输企业、铁路监管部门应当公开报告、举报电话或者运用移动终端、互联网等现代信息技术手段，为公众投诉、举报提供便利。

对维护铁路安全做出突出贡献的单位或者个人，由县级以上人民政府按照国家和省有关规定给�


itteplasser nå. Fint.",
    many_plants   = "Flott. Du har mange planter. Pasientene vil sette pris på det.",
    patients_cured   = "%d pasienter kurert.",
  },

  -- Information
  information = {
    larger_rooms           = "Större rom gjör at de ansatte föler seg viktigere, og det forbedrer deres prestasjoner.",
    extra_items           = "Ekstra gjenstander i rommene får de ansatte til å föle seg mer komfortabel og prestasjonene blir bedre.",
    epidemic             = "Du har en smittsom epidemi på sykehuset ditt. Det må du gjöre noe med nå!",
    promotion_to_doctor       = "En av dine TURNUSLEGER er nå blitt DOKTOR.",
    emergency             = "Nödstilfelle! Unna vei! Flytt dere!",
    patient_abducted         = "En av dine pasienter er blitt bortfört av romvesen.",
    first_cure             = "Bra jobbet! Du har akkurat kurert din förste pasient.",
    promotion_to_consultant     = "En av dine DOKTORER er nå blitt KONSULENT.",
    handyman_adjust         = "Du kan gjöre Vaktmestrene mer effektiv ved å justere deres prioriteringer.",
    promotion_to_specialist     = "En av dine Leger er blitt forfremmet til %s.",
    patient_leaving_too_expensive   = "En pasient forlater sykehuset ditt uten å gjöre opp for seg ved %s. Det er for dyrt.",
    vip_arrived           = "Pass på! - %s har akkurat ankommet sykehuset ditt! La alt gå på skinner nå, for å tilfredstille han.",
    epidemic_health_inspector     = "Helseministeren har nå fått med seg nyhetene om epidemien din. Du må forberede deg på et besök av ministeren ganske snart.",
    first_death           = "Du har akkurat drept din förste pasient. Hvordan föles det?",
    pay_rise             = "En av dine ansatte truer med å si opp. Velg om du vil gå med på lönnskravene eller om du vil sparke han/henne. Klikk på ikonet nede i venstre hjörne for å se hvem som truer med oppsigelse.",
    place_windows           = "Vinduer gjör rommene lysere og öker arbeidslysten til dine ansatte.",
    fax_received           = "Ikonet som akkurat poppet opp nede i venstre hjörne av skjermen, varsler deg om viktig informasjon og beslutninger du må ta.",

    initial_general_advice = {
      rats_have_arrived = "Rotter har infisert sykehuset ditt. Pröv å skyt dem med musen din.",
      autopsy_available = "Obduksjonsautomaten er nå ferdigutviklet. Med denne kan du kvitte deg med tröblete eller ikke-velkomne pasienter, og gjöre forskning ut av restene. Advarsel - Å benytte denne er svært kontroversielt.",
      first_patients_thirsty = "Flere av pasientene dine begynner å bli dehydrert. De ville satt pris på en Brusautomat.",
      research_now_available = "Du har bygd din förste Forskningsavdeling. Du har nå tilgang til Forskningsskjermen.",
      psychiatric_symbol = "Leger med spesialisering innen Psykiatri gjenkjennes med symbolet: |",
      decrease_heating = "Folk på sykehus


    .incbin "baserom.gba", 0xA9F358, 0xA9F494 - 0xA9F358

    .global Img_WmHightLightMap3
Img_WmHightLightMap3:
    .incbin "baserom.gba", 0xA9F494, 0xA9F9C8 - 0xA9F494

    .global Ap_WmHightLightMap3
Ap_WmHightLightMap3:
    .incbin "baserom.gba", 0xA9F9C8, 0xA9FA2C - 0xA9F9C8

    .global Img_WmHightLightMap4
Img_WmHightLightMap4:
    .incbin "baserom.gba", 0xA9FA2C, 0xA9FEA4 - 0xA9FA2C

    .global Ap_WmHightLightMap4
Ap_WmHightLightMap4:
    .incbin "baserom.gba", 0xA9FEA4, 0xA9FF00 - 0xA9FEA4

    .global Img_WmHightLightMap5
Img_WmHightLightMap5:
    .incbin "baserom.gba", 0xA9FF00, 0xAA020C - 0xA9FF00

    .global Ap_WmHightLightMap5
Ap_WmHightLightMap5:
    .incbin "baserom.gba", 0xAA020C, 0xAA0240 - 0xAA020C

    .global Img_WmHightLightMap6
Img_WmHightLightMap6:
    .incbin "baserom.gba", 0xAA0240, 0xAA0760 - 0xAA0240

    .global Ap_WmHightLightMap6
Ap_WmHightLightMap6:
    .incbin "baserom.gba", 0xAA0760, 0xAA07B0 - 0xAA0760

    .global Img_WmHightLightMap7
Img_WmHightLightMap7:
    .incbin "baserom.gba", 0xAA07B0, 0xAA0B90 - 0xAA07B0

    .global Ap_WmHightLightMap7
Ap_WmHightLightMap7:
    .incbin "baserom.gba", 0xAA0B90, 0xAA0BC8 - 0xAA0B90

    .global Img_WmHightLightMap8
Img_WmHightLightMap8:
    .incbin "baserom.gba", 0xAA0BC8, 0xAA10E4 - 0xAA0BC8

    .global Ap_WmHightLightMap8
Ap_WmHightLightMap8:
    .incbin "baserom.gba", 0xAA10E4, 0xAA114C - 0xAA10E4

	.global Img_WorldMapPlaceDot
Img_WorldMapPlaceDot:  @ 0x08AA114C
	.incbin "baserom.gba", 0xAA114C, 0x44

	.global Pal_WmPlaceDot_Highlight
Pal_WmPlaceDot_Highlight:  @ 0x08AA1190
	.incbin "baserom.gba", 0xAA1190, 0x20

	.global Pal_WmPlaceDot_Standard
Pal_WmPlaceDot_Standard:  @ 0x08AA11B0
	.incbin "baserom.gba", 0xAA11B0, 0x20

	.global gUnknown_08AA11D0
gUnknown_08AA11D0:  @ 0x08AA11D0
	.incbin "baserom.gba", 0xAA11D0, 0xB0

	.global Img_WorldmapMinimap
Img_WorldmapMinimap:  @ 0x08AA1280
	.incbin "baserom.gba", 0xAA1280, 0x


: veor >bb4=q13,<bb4=q13,<bb0=q12
veor q13,q13,q12

# qhasm:       bb0 &= bb7
# asm 1: vand >bb0=reg128#13,<bb0=reg128#13,<bb7=reg128#10
# asm 2: vand >bb0=q12,<bb0=q12,<bb7=q9
vand q12,q12,q9

# qhasm:       bb4 &= bb6
# asm 1: vand >bb4=reg128#14,<bb4=reg128#14,<bb6=reg128#12
# asm 2: vand >bb4=q13,<bb4=q13,<bb6=q11
vand q13,q13,q11

# qhasm:       bb2 = bb5 ^ bb1
# asm 1: veor >bb2=reg128#16,<bb5=reg128#9,<bb1=reg128#11
# asm 2: veor >bb2=q15,<bb5=q8,<bb1=q10
veor q15,q8,q10

# qhasm:       bb0 ^= bb4
# asm 1: veor >bb0=reg128#13,<bb0=reg128#13,<bb4=reg128#14
# asm 2: veor >bb0=q12,<bb0=q12,<bb4=q13
veor q12,q12,q13

# qhasm:       bb4 ^= bb3
# asm 1: veor >bb4=reg128#14,<bb4=reg128#14,<bb3=reg128#15
# asm 2: veor >bb4=q13,<bb4=q13,<bb3=q14
veor q13,q13,q14

# qhasm:       bb2 &= bb8
# asm 1: vand >bb2=reg128#15,<bb2=reg128#16,<bb8=reg128#1
# asm 2: vand >bb2=q14,<bb2=q15,<bb8=q0
vand q14,q15,q0

# qhasm:       bb8 ^= bb11
# asm 1: veor >bb8=reg128#1,<bb8=reg128#1,<bb11=reg128#5
# asm 2: veor >bb8=q0,<bb8=q0,<bb11=q4
veor q0,q0,q4

# qhasm:       bb11 &= bb5
# asm 1: vand >bb11=reg128#5,<bb11=reg128#5,<bb5=reg128#9
# asm 2: vand >bb11=q4,<bb11=q4,<bb5=q8
vand q4,q4,q8

# qhasm:       bb8 &= bb1
# asm 1: vand >bb8=reg128#1,<bb8=reg128#1,<bb1=reg128#11
# asm 2: vand >bb8=q0,<bb8=q0,<bb1=q10
vand q0,q0,q10

# qhasm:       bb14 ^= bb4
# asm 1: veor >bb14=reg128#4,<bb14=reg128#4,<bb4=reg128#14
# asm 2: veor >bb14=q3,<bb14=q3,<bb4=q13
veor q3,q3,q13

# qhasm:       bb8 ^= bb11
# asm 1: veor >bb8=reg128#1,<bb8=reg128#1,<bb11=reg128#5
# asm 2: veor >bb8=q0,<bb8=q0,<bb11=q4
veor q0,q0,q4

# qhasm:       bb11 ^= bb2
# as


= IHF1aXJrcw== IEVkaXRvcnM= cHV0aW5n R0VT IEZUQQ== 4KS+ YWRkb24= IEhBTQ== IEZyaWV6YQ== V29tYW4= LiQ= IGNyaWI= IEhlcm9k IHRpbWVycw== IFNwYWNlcw== IE1hY2ludG9zaA== YXRha2E= IGdsaWRl IHNtZWxsaW5n IEJBTA== IHVuc3U= IGNvbmRvcw== IGJpY3ljbA== IFJldml2YWw= NTUz IGp1Z2dsaW5n SHVn IEthcmRhc2hpYW4= IEJhbGthbnM= bXVsdGlwbGU= IG51dHJpdGlvdXM= b2NyeQ== MTkwMA== IGludGVncmF0ZXM= IGFkam9pbmluZw== IEZvbGRlcg== cm9sbG1lbnQ= dmVuaWVudA== IHViZXI= eWk= IHdoaWZm IEp1dmVu IEJvcm91Z2g= bmV0dGU= IGJpbGluZ3VhbA== IFNwYXJrcw== cGh0aGFs bWFudWZhY3Q= IHRvdXRpbmc= IFBISQ== S2VlZmU= UmV3YXJk IGluZmFsbA== IFRlbXBlcg== dHlwaWNhbGx5 IE5pa29s IHJlZ3VsYXJz IHBzZXVkb255bQ== IGV4aGliaXRpb25z IGJsYXN0ZXI= IDQwOQ== d2FybWluZw== IHJldmVyYmVy IHJlY2lwcm9jYWw= IDY3MA== aXBpZW50 YmV0dA== IEJlZ2lucw== IGl0Y2hpbmc= IFBoYXI= QXNzdW1pbmc= IGVtaXR0aW5n IE1MRw== IGJpcnRocGxhY2U= IHRhdW50 IEx1ZmZ5 IEFtaXQ= IGNpcmNsZWQ= IE5vc3Q= ZW5uZXR0 IGRlZm9yZXN0YXRpb24= IEhpc3RvcmljYWxseQ== IEV2ZXJ5ZGF5 IG92ZXJ0YWtl Nzky IG51bg== IEx1Y2lh IGFjY29tcGFuaWVz IFNlZWtpbmc= IFRyYXNo YW5pc20= Um9ndWU= IG5vcnRod2VzdGVybg== IFN1cHBsZW1lbnRhbA== IE5ZVQ== IEZSSQ== IFNhdGlzZg== eGVz NTE3 IHJlYXNzdXJlZA== IHNwb3JhZGlj IDcwMQ== IG1lZGlhbA== IGNhbm5hYmlub2lk IGJhcmJhcmlj IGVwaXM= IEV4cGxvc2l2ZQ== IERvdWdo IHVuc29sdmVk U3VwcG9ydGVk IGFja25vd2xlZGdtZW50 c3Bhd24= IGtpdGNoZW5z IC09 dGFsa2luZw== aWNpc3Q= IFBlZ2FzdXM= IFBTVQ== IHBob3Rvbg== IEF1dGhlbnRpY2F0aW9u Ukc= QCMm NzYy IENsYWly IGRpYXBlcg== IGJyaXN0 IFByb3NlY3V0b3Jz IEplbQ== NjI4 IEV2ZXJ5d2hlcmU= IEplYW5uZQ== ZXF1YWxpdHk= 44Op44Oz b2J


from __future__ import annotations

import ast

import pytest

from flake8_pydantic.errors import PYD005, Error
from flake8_pydantic.visitor import Visitor

PYD005_1 = """
class Model(BaseModel):
    date: date
"""

PYD005_2 = """
class Model(BaseModel):
    date: dict[str, date]
"""

PYD005_3 = """
class Model(BaseModel):
    date: Annotated[list[date], ...]
"""

PYD005_4 = """
class Model(BaseModel):
    date: int = 1
    foo: date
"""

PYD005_5 = """
class Model(BaseModel):
    date: Union[date, None] = None
"""

PYD005_6 = """
class Model(BaseModel):
    date: int | date | None = None
"""

# OK:

PYD005_7 = """
class Model(BaseModel):
    foo: date | None = None
    date: int
"""

@pytest.mark.parametrize(
    ["source", "expected"],
    [
        (PYD005_1, [PYD005(3, 4)]),
        (PYD005_2, [PYD005(3, 4)]),
        (PYD005_3, [PYD005(3, 4)]),
        (PYD005_4, [PYD005(4, 4)]),
        (PYD005_5, [PYD005(3, 4)]),
        (PYD005_6, [PYD005(3, 4)]),
        (PYD005_7, []),
    ],
)
def test_pyd005(source: str, expected: list[Error]) -> None:
    module = ast.parse(source)
    visitor = Visitor()
    visitor.visit(module)

    assert visitor.errors == expected


glabel func_808B8B38
/* 00228 808B8B38 27BDFFD8 */  addiu   $sp, $sp, 0xFFD8           ## $sp = FFFFFFD8
/* 0022C 808B8B3C AFB30020 */  sw      $s3, 0x0020($sp)
/* 00230 808B8B40 AFB00014 */  sw      $s0, 0x0014($sp)
/* 00234 808B8B44 AFB2001C */  sw      $s2, 0x001C($sp)
/* 00238 808B8B48 AFB10018 */  sw      $s1, 0x0018($sp)
/* 0023C 808B8B4C 3C10808C */  lui     $s0, %hi(D_808B910C)       ## $s0 = 808C0000
/* 00240 808B8B50 3C13808C */  lui     $s3, %hi(D_808B911C)       ## $s3 = 808C0000
/* 00244 808B8B54 00808825 */  or      $s1, $a0, $zero            ## $s1 = 00000000
/* 00248 808B8B58 00A09025 */  or      $s2, $a1, $zero            ## $s2 = 00000000
/* 0024C 808B8B5C AFBF0024 */  sw      $ra, 0x0024($sp)
/* 00250 808B8B60 2673911C */  addiu   $s3, $s3, %lo(D_808B911C)  ## $s3 = 808B911C
/* 00254 808B8B64 2610910C */  addiu   $s0, $s0, %lo(D_808B910C)  ## $s0 = 808B910C
/* 00258 808B8B68 8E190000 */  lw      $t9, 0x0000($s0)           ## 808B910C
.L808B8B6C:
/* 0025C 808B8B6C 02202025 */  or      $a0, $s1, $zero            ## $a0 = 00000000
/* 00260 808B8B70 02402825 */  or      $a1, $s2, $zero


 the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

/*
 * @test
 *
 * @summary converted from VM Testbase nsk/jdi/ReferenceType/_bounds_/bounds001.
 * VM Testbase keywords: [quick, jpda, jdi]
 * VM Testbase readme:
 * DESCRIPTION:
 *     The test checks up the following methods of com.sun.jdi.Method:
 *     - locationsOfLine(int) for boundary values of Integer
 *     - locationsOfLine(String, String, int) for boundary values of
 *     Integer and various combinations of value of String arguments
 *     such as null, "", <bad_string>, where <bad_string> means the some
 *     names of nonexisting object.
 *     - equals(Object) for null-value
 * COMMENTS:
 *
 * @library /vmTestbase
 *          /test/lib
 * @run driver jdk.test.lib.FileInstaller . .
 * @build nsk.jdi.ReferenceType._bounds_.bounds001
 *        nsk.jdi.ReferenceType._bounds_.bounds001a
 *
 * @comment make sure bounds001a is compiled with full debug info
 * @clean nsk.jdi.ReferenceType._bounds_.bounds001a
 * @compile -g:lines,source,vars ../bounds001a.java
 *
 * @run main/othervm PropertyResolvingWrapper
 *      nsk.jdi.ReferenceType._bounds_.bounds001
 *      -verbose
 *      -arch=${os.family}-${os.simpleArch}
 *      -waittime=5
 *      -debugee.vmkind=java
 *      -transport.address=dynamic
 *      "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}"
 */

/*
 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

/*
 * @test
 *
 * @summary converted from VM Testbase nsk/jdi/ReferenceType/methodsByName_s/methbyname_s002.
 * VM Testbase keywords: [jpda, jdi]
 * VM Testbase readme:
 * DESCRIPTION
 *         nsk/jdi/ReferenceType/methodsByName_s/methbyname_s002 test
 *         checks the methodsByName(String name) method of ReferenceType interface
 *         of the com.sun.jdi package for not prepared class:
 *        the checked class is loaded but is not prepared.
 *        The ReferenceType.methodsByName(String name) method is called for
 *        this class - ClassNotPreparedException should be thrown
 *        in this case.
 * COMMENTS
 * The test is updated as foll


};
use pnet_packet::icmp::IcmpPacket;
use pnet_packet::icmpv6::Icmpv6Packet;
use pnet_packet::ip::IpNextHeaderProtocol;
use pnet_packet::ipv4::Ipv4Packet;
use pnet_packet::tcp::TcpPacket;
use pnet_packet::udp::UdpPacket;
use pnet_packet::Packet;

use std::io;
use std::io::Error;
use std::io::ErrorKind;
use std::mem;
use std::net::{self, IpAddr};
use std::sync::Arc;
use std::time::Duration;

/// Represents a transport layer protocol.
#[derive(Clone, Copy)]
pub enum TransportProtocol {
    /// Represents a transport protocol built on top of IPv4
    Ipv4(IpNextHeaderProtocol),
    /// Represents a transport protocol built on top of IPv6
    Ipv6(IpNextHeaderProtocol),
}

/// Type of transport channel to present.
#[derive(Clone, Copy)]
pub enum TransportChannelType {
    /// The application will send and receive transport layer packets.
    Layer4(TransportProtocol),
    /// The application will send and receive IPv4 packets, with the specified transport protocol.
    Layer3(IpNextHeaderProtocol),
}

/// Structure used for sending at the transport layer. Should be created with `transport_channel()`.
pub struct TransportSender {
    pub socket: Arc<pnet_sys::FileDesc>,
    _channel_type: TransportChannelType,
}

/// Structure used for receiving at the transport layer. Should be created with `transport_channel()`.
pub struct TransportReceiver {
    pub socket: Arc<pnet_sys::FileDesc>,
    pub buffer: Vec<u8>,
    pub channel_type: TransportChannelType,
}

/// Structure used for holding all configurable options for describing possible options
/// for transport channels.
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct Config {
    time_to_live: u8,
}

/// Create a new `(TransportSender, TransportReceiver)` pair.
///
/// This allows for sending and receiving packets at the transport layer. The buffer size should be
/// large enough to handle the largest packet you wish to receive.
///
/// The channel type specifies what layer to send and receive packets at, and the transport
/// protocol you wish to implement. For example, `Layer4(Ipv4(IpNextHeaderProtocols::Udp))` would
/// allow sending and receiving UDP packets using IPv4; whereas `Layer3(IpNextHeaderProtocols::Udp)`
/// would include the IPv4 Header in received values, and require manual construction of an IP
/// header when sending.
pub fn transport_channel(
    buffer_size: usize,
    channel_type: TransportChannelType,
) -> io::Result<(TransportSender, TransportReceiver)> {
    // This hack makes sure that winsock is initialised
    let _ = {
        let ip = net::Ipv4Addr::new(255, 255, 255, 255);
        let sockaddr = net::SocketAddr::V4(net::SocketAddrV4::new(ip, 0));

        net::UdpSocket::bind(sockaddr)
    };

    let socket = unsafe {
        match channel_type {
            Layer4(Ipv4(IpNextHeaderProtocol(proto))) | Layer3(IpNextHeaderProtocol(proto)) => {
                pnet_sys::socket(pnet_sys::AF_INET, pnet_sys::SOCK_RAW, proto as libc::c_int)
            }
            Layer4(Ipv6(IpNextHeaderProtocol(proto))) => {
                pnet_sys::socket(pnet_sys::AF_INET6, pnet_sys::SOCK_RAW, proto as libc::c_int)
            }
        }
    };
    if socket == pnet_sys::INVALID_SOCKET {
        return Err(Error::last_os_error());


glabel func_8003B218
/* AB23B8 8003B218 27BDFF98 */  addiu $sp, $sp, -0x68
/* AB23BC 8003B21C 87AE008E */  lh    $t6, 0x8e($sp)
/* AB23C0 8003B220 AFBF0024 */  sw    $ra, 0x24($sp)
/* AB23C4 8003B224 AFB00020 */  sw    $s0, 0x20($sp)
/* AB23C8 8003B228 000E7900 */  sll   $t7, $t6, 4
/* AB23CC 8003B22C AFA40068 */  sw    $a0, 0x68($sp)
/* AB23D0 8003B230 AFA70074 */  sw    $a3, 0x74($sp)
/* AB23D4 8003B234 00CF4021 */  addu  $t0, $a2, $t7
/* AB23D8 8003B238 95030002 */  lhu   $v1, 2($t0)
/* AB23DC 8003B23C 24090006 */  li    $t1, 6
/* AB23E0 8003B240 00A08025 */  move  $s0, $a1
/* AB23E4 8003B244 30631FFF */  andi  $v1, $v1, 0x1fff
/* AB23E8 8003B248 00031C00 */  sll   $v1, $v1, 0x10
/* AB23EC 8003B24C 00031C03 */  sra   $v1, $v1, 0x10
/* AB23F0 8003B250 00690019 */  multu $v1, $t1
/* AB23F4 8003B254 AFA80034 */  sw    $t0, 0x34($sp)
/* AB23F8 8003B258 27A4004C */  addiu $a0, $sp, 0x4c
/* AB23FC 8003B25C 0000C012 */  mflo  $t8
/* AB2400 8003B260 03052821 */  addu  $a1, $t8, $a1
/* AB2404 8003B264 0C01DF97 */  jal   Math_Vec3s_ToVec3f
/* AB2408 8003B268 00000000 */   nop
/* AB240C 8003B26C 27A40058 */  addiu $a0, $sp, 0x58
/* AB2410 8003B270 0C01DF90 */  jal   Math_Vec3f_Copy
/* AB2414 8003B274 27A5004C */   addiu $a1, $sp, 0x4c
/* AB2418 8003B278 8FA80034 */  lw    $t0, 0x34($sp)
/* AB241C 8003B27C 24090006 */  li    $t1, 6
/* AB2420 8003B280 25040004 */  addiu $a0, $t0, 4
/* AB2424 8003B284 25050008 */  addiu $a1, $t0, 8
/* AB2428 8003B288 0085082B */  sltu  $at, $a0, $a1
/* AB242C 8003B28C 5020003C */  beql  $at, $zero, .L8003B380
/* AB2430 8003B290 8FAD007C */   lw    $t5, 0x7c($sp)
/* AB2434 8003B294 94830000 */  lhu   $v1, ($a0)
.L8003B298:
/* AB2438 8003B298 C7AA0058 */  lwc1  $f10, 0x58($sp)
/* AB243C 8003B29C 24840002 */  addiu $a0, $a0, 2
/* AB2440 8003B2A0 30631FFF */  andi  $v1, $v1, 0x1fff
/* AB2444 80


ee)
	require.Error(t, err)

	rollappHeight, err := rollapp1.GetNode().Height(ctx)
	require.NoError(t, err)

	// wait until packet finalization
	isFinalized, err := dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300)
	require.NoError(t, err)
	require.True(t, isFinalized)

	res, err := dymension.GetNode().QueryPendingPacketsByAddress(ctx, dymensionUserAddr)
	fmt.Println(res)
	require.NoError(t, err)

	for _, packet := range res.RollappPackets {

		proofHeight, _ := strconv.ParseInt(packet.ProofHeight, 10, 64)
		isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), proofHeight, 300)
		require.NoError(t, err)
		require.True(t, isFinalized)
		txhash, err := dymension.GetNode().FinalizePacket(ctx, dymensionUserAddr, packet.RollappId, fmt.Sprint(packet.ProofHeight), fmt.Sprint(packet.Type), packet.Packet.SourceChannel, fmt.Sprint(packet.Packet.Sequence))
		require.NoError(t, err)

		fmt.Println(txhash)
	}

	// verify funds were transferred to dymensionUserAddr
	testutil.AssertBalance(t, ctx, dymension, marketMakerAddr, rollappIBCDenom, zeroBal)
	// Minus 0.1% of transfer amount for bridge fee
	testutil.AssertBalance(t, ctx, dymension, dymensionUserAddr, rollappIBCDenom, transferAmount.Sub(bridgingFee))

	t.Cleanup(
		func() {
			err := r.StopRelayer(ctx, eRep)
			if err != nil {
				t.Logf("an error occurred while stopping the relayer: %s", err)
			}
		},
	)

	// Run invariant check
	CheckInvariant(t, ctx, dymension, dymensionUser.KeyName())
}

func TestEIBCNoBalanceToFulfillOrder_Wasm(t *testing.T) {
	if testing.Short() {
		t.Skip()
	}

	ctx := context.Background()

	configFileOverrides := make(map[string]any)
	dymintTomlOverrides := make(testutil.Toml)
	dymintTomlOverrides["settlement_layer"] = "dymension"
	dymintTomlOverrides["settlement_node_address"] = fmt.Sprintf("http://dymension_100-1-val-0-%s:26657", t.Name())
	dymintTomlOverrides["rollapp_id"] = "rollappwasm_1234-1"
	dymintTomlOverrides["settlement_gas_prices"] = "0adym"
	dymintTomlOverrides["max_idle_time"] = "3s"
	dymintTomlOverrides["max_proof_time"] = "500ms"
	dymintTomlOverrides["batch_submit_time"] = "50s"
	dymintTomlOverrides["p2p_blocksync_enabled"] = "false"
	dymintTomlOverrides["da_config"] = []string{""}
	dymintTomlOverrides["da_layer"] = []string{"mock"}

	configFileOverrides["config/dymint.toml"] = dymintTomlOverrides

	// Create chain factory with dymension
	numHubVals := 1
	numHubFullNodes := 1
	numRollAppFn := 0
	numRollAppVals := 1
	cf := test.NewBuiltinChainFactory(zaptest.NewLogger(t), []*test.ChainSpec{
		{
			Name: "rollapp1",
			ChainConfig: ibc.ChainConfig{
				Type:                "rollapp-dym",
				Name:                "rollapp-temp",
				ChainID:             "rolla


    override fun getTitle(info: WorkspaceItemInfo): String {
        return (info.customTitle ?: info.title).toString()
    }

    override fun getDefaultTitle(info: WorkspaceItemInfo): String {
        return info.title.toString()
    }

    override fun getCustomTitle(info: WorkspaceItemInfo): String? {
        return info.customTitle?.toString()
    }

    override fun setTitle(info: WorkspaceItemInfo, title: String?) {
        info.setTitle(context, title)
    }

    override fun setIcon(info: WorkspaceItemInfo, entry: IconPackManager.CustomIconEntry?) {
        info.setIconEntry(context, entry)
        if (entry != null) {
            val launcherActivityInfo = getLauncherActivityInfo(info)
            val iconCache = LauncherAppState.getInstance(context).iconCache
            val drawable = iconCache.getFullResIcon(launcherActivityInfo, info, false)
            val bitmap = LauncherIcons.obtain(context).createBadgedIconBitmap(drawable, info.user, Build.VERSION_CODES.O_MR1)
            info.setIcon(context, bitmap.icon)
            Log.d("WorkspaceInfoProvider", "Icon Entry " + bitmap.icon.toString())
        } else {
            info.setIcon(context, null)
        }
    }

    override fun getIcon(info: WorkspaceItemInfo): IconPackManager.CustomIconEntry? {
        return info.customIconEntry
    }

    override fun supportsSwipeUp(info: WorkspaceItemInfo) = true

    override fun setSwipeUpAction(info: WorkspaceItemInfo, action: String?) {
        info.setSwipeUpAction(context, action)
    }

    override fun getSwipeUpAction(info: WorkspaceItemInfo): String? {
        return info.swipeUpAction
    }

    override fun supportsBadgeVisible(info: WorkspaceItemInfo) = when (info.itemType) {
        ITEM_TYPE_SHORTCUT, ITEM_TYPE_DEEP_SHORTCUT -> true
        // TODO if work badge is present
        else -> false
    }

    override fun setBadgeVisible(info: WorkspaceItemInfo, visible: Boolean) {
        info.setBadgeVisible(context, visible)
    }

    override fun getBadgeVisible(info: WorkspaceItemInfo): Boolean {
        return info.isBadgeVisible
    }

    private fun getLauncherActivityInfo(info: WorkspaceItemInfo): LauncherActivityInfo? {
        return launcherApps.resolveActivity(info.getIntent(), info.user)
    }

    companion object : SingletonHolder<WorkspaceInfoProvider, Context>(ensureOnMainThread(
            useApplicationContext(::WorkspaceInfoProvider)))
}/*
 *     Copyright (C) 2019 Lawnchair Team.
 *
 *     This file is part of Lawnchair Launcher.
 *     Lawnchair Launcher is free software: you can redistribute it and/or modify
*     it under the terms of the GNU General Public License as published by
*     the Free Software Foundation, either version 3 of the License, or
*     (at your option) any later version.
*
*     Lawnchair Launcher is distributed in the hope that it will be useful,
*     but WITHOUT ANY WARRANTY; without even the implied warranty of
*     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*     GNU General Public License for more details.
*
*     You should have received a copy of the GNU General Public License
*     along with Lawnchair Launcher.  If not, see <https://www.gnu.org/licenses/>.
*/

package org.zimmob.zimlx.globalsearch.providers.web

import android.content.Context
import com.android.launcher3.R

class BaiduWebSearchProvider(context: Context) : WebSearchProvider(context) {
    override val searchUrl = "https://m.baidu.com/s?word=%s"
    override val suggestionsUrl = "https://m.baidu.com/su?action=opensearc


/renwenqi888/home), [Xiaochun Cao](http://people.ucas.ac.cn/~0022382?language=en), Xiaobin Hu, Tao Wang, Fenglong Song, Xiuyi Jia

[CVPR 2021]

- **Contrastive Learning for Compact Single Image Dehazing**

Haiyan Wu, [Yanyun Qu](https://quyanyun.xmu.edu.cn/), [Shaohui Lin](https://sites.google.com/site/shaohuilin007/home)

[CVPR 2021] [[Pytorch-Code](https://github.com/GlassyWu/AECR-Net)]

[**AECR-Net**]

- **Physics-based Feature Dehazing Networks**

 Jiangxin Dong, [Jinshan Pan](https://jspan.github.io/)

[ECCV 2020] [[Project](https://jspan.github.io/)]

- **Multi-Scale Boosted Dehazing Network with Dense Feature Fusion**

 [Hang Dong](https://sites.google.com/view/hdong/%E9%A6%96%E9%A1%B5), [Jinshan Pan](https://jspan.github.io/), [Zhe Hu](https://zjuela.github.io/), Xiang Lei, [Xinyi Zhang](http://xinyizhang.tech/), Fei Wang, [Ming-Hsuan Yang](https://faculty.ucmerced.edu/mhyang/)

[CVPR 2020] [[Pytorch-Code](https://github.com/BookerDeWitt/MSBDN-DFF)]

[**MSBDN-DFF**] [★☆] 粗读, Unet结合超分中的Deep Back-Projection, 有时间可以研究一下反投影的原理和代码

- **Domain Adaptation for Image Dehazing**

 Yuanjie Shao, [Lerenhan Li](https://sites.google.com/view/lerenhanli/homepage), [Wenqi Ren](https://sites.google.com/site/renwenqi888/), [Changxin Gao](https://sites.google.com/site/changxingao), Nong Sang

[CVPR 2020] [[Pytorch-Code](https://github.com/HUSTSYJ/DA_dahazing)]

[★☆] 粗读, 提出了一个生成数据集训练的网络迁移到真实图像去雾中的框架, 使用两个变换网络和GAN完成Syn和Real数据间的相互迁移.

- **FFA-Net: Feature Fusion Attention Network for Single Image Dehazing**

 Xu Qin, Zhilin Wang, Yuanchao Bai, Xiaodong Xie, Huizhu Jia

[AAAI 2020] [[Pytorch-Code](https://github.com/zhilin007/FFA-Net)]

- **Densely Connected Pyramid Dehazing Network**

[He Zhang](https://sites.google.com/site/hezhangsprinter), [Vishal M. Patel](https://engineering.jhu.edu/vpatel36/sciencex_teams/vishalpatel/)

[CVPR 2018] [[Pytorch-Code](https://github.com/hezhangsprinter/DCPDN)]

[**DCPDN**] [★] 两分支网络, transmission map通过类似dense-net的网络预测, 大气光照假设是一全局常量并通过一UNet预测, 两分支结果经大气散射模型公式的计算, 恢复清晰RGB. 使用了L2, VGG loss, gradient loss和GAN loss.

- **Single Image Dehazing via Multi-Scale Convolutional Neural Networks** <


 Country(
    asset: "assets/flags/jo_flag.png",
    dialingCode: "962",
    isoCode: "JO",
    name: "Jordan",
  );
  static const Country JP = Country(
    asset: "assets/flags/jp_flag.png",
    dialingCode: "81",
    isoCode: "JP",
    name: "Japan",
  );
  static const Country KE = Country(
    asset: "assets/flags/ke_flag.png",
    dialingCode: "254",
    isoCode: "KE",
    name: "Kenya",
  );
  static const Country KG = Country(
    asset: "assets/flags/kg_flag.png",
    dialingCode: "996",
    isoCode: "KG",
    name: "Kyrgyzstan",
  );
  static const Country KH = Country(
    asset: "assets/flags/kh_flag.png",
    dialingCode: "855",
    isoCode: "KH",
    name: "Cambodia",
  );
  static const Country KI = Country(
    asset: "assets/flags/ki_flag.png",
    dialingCode: "686",
    isoCode: "KI",
    name: "Kiribati",
  );
  static const Country KM = Country(
    asset: "assets/flags/km_flag.png",
    dialingCode: "269",
    isoCode: "KM",
    name: "Comoros",
  );
  static const Country KN = Country(
    asset: "assets/flags/kn_flag.png",
    dialingCode: "1",
    isoCode: "KN",
    name: "Saint Kitts and Nevis",
  );
  static const Country KP = Country(
    asset: "assets/flags/kp_flag.png",
    dialingCode: "850",
    isoCode: "KP",
    name: "Korea, Democratic People's Republic Of",
  );
  static const Country KR = Country(
    asset: "assets/flags/kr_flag.png",
    dialingCode: "82",
    isoCode: "KR",
    name: "Korea, Republic Of",
  );
  static const Country KW = Country(
    asset: "assets/flags/kw_flag.png",
    dialingCode: "965",
    isoCode: "KW",
    name: "Kuwait",
  );
  static const Country KY = Country(
    asset: "assets/flags/ky_flag.png",
    dialingCode: "965",
    isoCode: "KY",
    name: "Cayman Islands",
  );
  static const Country KZ = Country(
    asset: "assets/flags/kz_flag.png",
    dialingCode: "7",
    isoCode: "KZ",
    name: "Kazakhstan",
  );
  static const Country LA = Country(
    asset: "assets/flags/la_flag.png",
    dialingCode: "856",
    isoCode: "LA",
    name: "Lao People's Democratic Republic",
  );
  static const Country LB = Country(
    asset: "assets/flags/lb_flag.png",
    dialingCode: "961",
    isoCode: "LB",
    name: "Lebanon",
  );
  static const Country LC = Country(
    asset: "assets/flags/lc_flag.png",
    dialingCode: "1",
    isoCode: "LC",
    name: "Saint Lucia",
  );
  static const Country LI = Country(
    asset: "assets/flags/li_flag.png",
    dialingCode: "423",
    isoCode: "LI",
    name: "Liechtenstein",
  );
  static const Country LK = Country(
    asset: "assets/flags/lk_flag.png",
    dialingCode: "94",
    isoCode: "LK",
    name: "Sri Lanka",
  );
  static const Country LR = Country(
    asset: "assets/flags/lr_flag.png",
    dialingCode:


}
        else if (render_target === RenderStage.RenderTarget.RID) {
            if ( !scene._TextEntity_text_material_pick ) {
                // scene にマテリアルをキャッシュ
                scene._TextEntity_text_material_pick = new TextMaterial( scene.glenv, { ridMaterial: true } );
            }
            return scene._TextEntity_text_material_pick;
        }
        else {
            throw new Error("unknown render target: " + render_target);
        }
    }

    /**
     * テキストだけを描画する専用マテリアルを取得
     */
    private _getSimpleTextMaterial( render_target: RenderStage.RenderTarget )
    {
        var scene = this.scene;
        if ( render_target === RenderStage.RenderTarget.SCENE ) {
            if ( !scene._SimpleTextEntity_text_material ) {
                // scene にマテリアルをキャッシュ
                scene._SimpleTextEntity_text_material = new SimpleTextMaterial( scene.glenv );
            }
            return scene._SimpleTextEntity_text_material;
        }
        else if (render_target === RenderStage.RenderTarget.RID) {
            if ( !scene._SimpleTextEntity_text_material_pick ) {
                // scene にマテリアルをキャッシュ
                scene._SimpleTextEntity_text_material_pick = new SimpleTextMaterial( scene.glenv, { ridMaterial: true } );
            }
            return scene._SimpleTextEntity_text_material_pick;
        }
        else {
            throw new Error("unknown render target: " + render_target);
        }
    }

    private _setValueProperty( name: string, value: any )
    {
        var props = this._text_parent_props;
        if ( props[name] != value ) {
            props[name] = value;
            if ( this._primitive_producer ) {
                this._primitive_producer.onChangeParentProperty();
            }
        }
    }

    private _setColorProperty( name: string, value: Vector3 | Vector4 )
    {
        var dst = this._text_parent_props[name] as Vector4;
        if ( dst[0] !== value[0] || dst[1] !== value[1] || dst[2] !== value[2] ) {
            Color.premultiply( value, dst );
            if ( this._primitive_producer ) {
              this._primitive_producer.onChangeParentProperty();
            }
        }
    }

    private _setupByJson( json: TextEntity.Json )
    {
        var position = new GeoPoint();

        for ( let entry of json.entries ) {
            position.setFromArray( entry.position );
            this.addText( entry.text, position, entry );
        }

        if ( json.font_style    !== undefined ) this.setFontStyle( json.font_style );
        if ( json.font_weight   !== undefined ) this.setFontWeight( json.font_weight );
        if ( json.font_size     !== undefined ) this.setFontSize( json.font_size );
        if ( json.font_family   !== undefined ) this.setFontFamily( json.font_family );
        if ( json.color         !== undefined ) this.setColor( json.color );
        if ( json.stroke_color  !== undefined ) this.setStrokeColor ( json.stroke_color );
        if ( json.stroke_width  !== undefined ) this.setStrokeLineWidth ( json.stroke_width );
        if ( json.enable_stroke !== undefined ) this.setEnableStroke ( json.enable_stroke );
        if ( json.bg_color      !== undefined ) this.setBackgroundColor( json.bg_color );
        if ( json.enable_bg     !== un


Text = parentUi->textFrontCard;
    backText = parentUi->textBackCard;

    // Setup show/next card button
    showCard* showCardWidget = new showCard();

    connect(showCardWidget, &showCard::clicked, this, &CompletlyRandom::buttonClicked); // Button slot
    connect(this, &CompletlyRandom::setText, showCardWidget, &showCard::setText);

    parentUi->gridManageCard->addWidget(showCardWidget);

    max = parent->currectSession.cardList.count() - 1;
    qDebug() << "max:" << max;

    loop();
}

// nextCardCall
void CompletlyRandom::loop()
{
    parentUi->lineMiddleText->setVisible(false);
    card* randomCard = &parent->currectSession.cardList[randomValue(0, max)];
    randomCard->count += 1;

    QString deckName = parent->currectSession.core.deckPathList[randomCard->deckiD];
    deckName = deckName.split("/").last();
    qDebug() << "Deck name for card:" << deckName;
    if(deckName.length() > 20) {
        deckName = deckName.left(20);
        deckName.append("...");
    }
    parent->changeStatusBarTextSlot(deckName);

    qDebug() << "random card:" << randomCard;

    QString mainCard = cardExtract(randomCard, parent);

    correctMainCard(&mainCard, findMediaFile(randomCard, &parent->currectSession));
    splitMainCard(mainCard, &frontCard, &backCard, parent);

    QString searchPath = directories::deckStorage.filePath(parent->currectSession.core.deckPathList[randomCard->deckiD]);
    frontText->setSearchPaths(QStringList(searchPath));
    backText->setSearchPaths(QStringList(searchPath));

    parent->resetScrollState();

    backText->hide();
    parent->setText(frontText, frontCard);
}

void CompletlyRandom::buttonClicked()
{
    qDebug() << "buttonClicked";
    if (showedBack == false)
    {
        qDebug() << "showedBack = false";
        parentUi->lineMiddleText->setVisible(true);
        showedBack = true;
        backText->show();
        parent->setText(backText, backCard);

        // buttonWidget->setText("Next");
        // Idk, crashes on it - will use a signal
        emit setText("Next");
    }
    else
    {
        showedBack = false;
        emit setText("Show");
        backText->clear();
        parent->firstLaunch = false;
        loop();
    }
}

#include <Arduino.h>

#define PIN_MASK 0b11100

#define RESET_SEQUENCE_LENGTH 64
#define CLOCK_HALF_CYCLE_US 250
#define JTAG_TO_SWD 0xE79E
#define DESIGNER_DEFAULT 0x23B
#define PARTNO_DEFAULT 0xBA01

#define SEPARATOR "+-------------------------------------------+"
#define TABLE_HEADER "| CLK PIN | IO PIN | ACK | PART NO | MAN ID |"
#define ROW_FORMAT   "|   %2d    |   %2d   |  %ld  |  %5lx  |  %4lx  |\r\n"
#define TABLE_FOOTER_S "+----------------- SUCCESS -----------------+"
#define TABLE_FOOTER_F "+----------------- FAILURE -----------------+"
#define PROMPT "> "

#define getAck(value) (value & 0x7)
#define getManufacturer(value) ((value >> 4) & 0x7FF)
#define getPartNo(value) ((value >> 15) & 0xFFFF)

enum debug_level {
    quiet,
    norma


">#Input, на всеки етап, програмата изчислява резултатите от предишната секция, преди да покаже формуляра за попълване от следващата. По този начин, отделните етапи на изчисление се застъпват, както е показано в следната таблица:

Освен това, по всяко време, потребителят може да натисне "Pause/Break" или "Ctrl + Alt + P" от клавиатурата и да прекъсне изпълнението. Действието е еквивалентно на срещането на ключова дума #Pause.

Модули (Include)

Calcpad дава възможност да използвате съдържание от външен файл в дадена записка. Ако имате части от кода, които се повтарят в отделните записки, може да ги организирате в модули и да ги преизползвате многократно. Също така, ако имате по-дълги записки, може да ги разделите на модули за по-лесна поддръжка и обновяване. След това, може да ги включите в основния файл, като използвате следния израз:

#include име_на_файл

Името на файла трябва да съдържа пълния път до локален за компютъра файл. По изключение, ако файлът се намира в същата директория, може да посочите само името (с разширението).

По подразбиране, Calcpad ще включи цялото съдържание на външния модул. Може обаче да забраните включването на отделни части от съдържанието, като ги направите локални. За да започнете "локална" секция в модул, добавете нов ред с ключова дума #local. За край на "локална" секция (начало на "глобална"), добавете ред със съдържание #global. Calcpad поддържа множество нива на включване. Това означава, че включения файл може на свой ред да включва други и т.н.

Макроси и текстови променливи

 Макросите и текстовите променливи представляват удобен начин за организация на съдържанието в самия файл и избягване на повтарящ се код. Те могат да бъдат едноредови и многоредови. За разлик


st"), "abcdefghijklmnopqrst", false);
}

TEST_CONSTEXPR_CXX20 bool test() {
  test_string<std::string>();
#if TEST_STD_VER >= 11
  test_string<std::basic_string<char, std::char_traits<char>, min_allocator<char> > >();
#endif

  return true;
}

int main(int, char**) {
  test();
#if TEST_STD_VER > 17
  static_assert(test());
#endif

  return 0;
}
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// <string>

// template<class charT, class traits, class Allocator>
//   basic_string<charT,traits,Allocator>
//   operator+(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs); // constexpr since C++20

// template<class charT, class traits, class Allocator>
//   basic_string<charT,traits,Allocator>&&
//   operator+(basic_string<charT,traits,Allocator>&& lhs, const charT* rhs); // constexpr since C++20

#include <string>
#include <utility>
#include <cassert>

#include "test_macros.h"
#include "min_allocator.h"
#include "asan_testing.h"

template <class S>
TEST_CONSTEXPR_CXX20 void test0(const S& lhs, const typename S::value_type* rhs, const S& x) {
  assert(lhs + rhs == x);
  LIBCPP_ASSERT(is_string_asan_correct(lhs + rhs));
}

#if TEST_STD_VER >= 11
template <class S>
TEST_CONSTEXPR_CXX20 void test1(S&& lhs, const typename S::value_type* rhs, const S& x) {
  assert(std::move(lhs) + rhs == x);
}
#endif

template <class S>
TEST_CONSTEXPR_CXX20 void test_string() {
  test0(S(""), "", S(""));
  test0(S(""), "12345", S("12345"));
  test0(S(""), "1234567890", S("1234567890"));
  test0(S(""), "12345678901234567890", S("12345678901234567890"));
  test0(S("abcde"), "", S("abcde"));
  test0(S("abcde"), "12345", S("abcde12345"));
  test0(S("abcde"), "1234567890", S("abcde1234567890"));
  test0(S("abcde"), "12345678901234567890", S("abcde12345678901234567890"));
  test0(S("abcdefghij"), "", S("abcdefghij"));
  test0(S("abcdefghij"), "12345", S("abcdefghij12345"));
  test0(S("abcdefghij"), "1234567890", S("abcdefghij1234567890"));
  test0(S("abcdefghij"), "12345678901234567890", S("abcdefghij12345678901234567890"));
  test0(S("abcdefghijklmnopqrst"), "", S("abcdefghijklmnopqrst"));
  test0(S("abcdefghijklmnopqrst"), "12345", S("abcdefghijklmnopqrst12345"));
  test0(S("abcdefghijklmnopqrst"), "1234567890", S("abcdefghijklmnopqrst1234567890"));
  test0(S("abcdefghijklmnopqrst"), "12345678901234567890", S("abcdefghijklmnopqrst12345678901234567890"));
#if TEST_STD_VER >=


.565-.041c.367.358.896.538 1.584.538.493 0 .919-.125 1.278-.373.354-.249.57-.515.653-.79h2.155c-.346 1.072-.871 1.838-1.589 2.299-.709.463-1.572.693-2.58.693-.702 0-1.334-.113-1.9-.337a4.033 4.033 0 0 1-1.439-.958 4.37 4.37 0 0 1-.905-1.485 5.433 5.433 0 0 1-.32-1.899c0-.666.111-1.289.329-1.864a4.376 4.376 0 0 1 .934-1.493c.405-.42.885-.751 1.444-.994a4.634 4.634 0 0 1 1.858-.362c.754 0 1.413.146 1.979.44a3.967 3.967 0 0 1 1.39 1.182c.363.493.622 1.058.783 1.691.161.632.217 1.292.171 1.983h-6.431c.001.704.238 1.371.606 1.729zm2.812-4.681c-.291-.322-.783-.496-1.385-.496-.391 0-.714.065-.974.199a1.97 1.97 0 0 0-.62.491 1.772 1.772 0 0 0-.328.628 2.82 2.82 0 0 0-.111.587h3.982c-.058-.624-.272-1.085-.564-1.409zm-3.918-4.663h4.989v1.215h-4.989z" }, "child": [] }] })(props);
}
function BiLogoBing(props) {
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m5.71 3 3.593 1.264v12.645l5.061-2.919-2.48-1.165-1.566-3.897 7.974 2.802v4.073l-8.984 5.183-3.595-2L5.71 3z" }, "child": [] }] })(props);
}
function BiLogoBitcoin(props) {
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m11.953 8.819-.547 2.19c.619.154 2.529.784 2.838-.456.322-1.291-1.673-1.579-2.291-1.734zm-.822 3.296-.603 2.415c.743.185 3.037.921 3.376-.441.355-1.422-2.029-1.789-2.773-1.974z" }, "child": [] }, { "tag": "path", "attr": { "d": "M14.421 2.299C9.064.964 3.641 4.224 2.306 9.581.97 14.936 4.23 20.361 9.583 21.697c5.357 1.335 10.783-1.924 12.117-7.281 1.336-5.356-1.924-10.781-7.279-12.117zm1.991 8.275c-.145.974-.686 1.445-1.402 1.611.985.512 1.485 1.298 1.009 2.661-.592 1.691-1.998 1.834-3.87 1.48l-.454 1.82-1.096-.273.447-1.794a44.624 44.624 0 0 1-.875-.228l-.449 1.804-1.095-.275.454-1.823c-.257-.066-.517-.136-.782-.202L6.87 15l.546-1.256s.808.215.797.199c.311.077.448-.125.502-.261l.719-2.875.115.029a.


, 8(%r14,%rax)
	addq	$16, %rax
	cmpl	%r11d, %ebx
	ja	.L43
	movl	56(%rsp), %eax
	cmpl	%eax, 96(%rsp)
	je	.L50
.L46:
	movl	44(%rsp), %r12d
	movl	156(%rsp), %r11d
	movq	48(%rsp), %r15
	movl	100(%rsp), %eax
	addl	%r12d, %r11d
	movslq	%r11d, %r11
	movsd	(%r15,%r11,8), %xmm1
	addl	%r13d, %eax
	movl	152(%rsp), %r11d
	cltq
	movq	120(%rsp), %r15
	addl	%r12d, %r11d
	movl	148(%rsp), %r12d
	mulsd	(%r15,%rax,8), %xmm1
	movslq	%r11d, %r11
	leal	(%r12,%r13), %ebx
	movl	144(%rsp), %r12d
	movslq	%ebx, %rbx
	movsd	(%r15,%rbx,8), %xmm0
	movl	100(%rsp), %ebx
	addl	%r13d, %r12d
	movl	60(%rsp), %r13d
	movslq	%r12d, %r12
	addsd	(%r15,%r12,8), %xmm0
	leal	(%r10,%rbx), %r12d
	movslq	%r12d, %r12
	addl	%ebx, %r13d
	movsd	(%r15,%r12,8), %xmm2
	movslq	%r13d, %rbx
	addsd	(%r15,%rbx,8), %xmm2
	movq	48(%rsp), %r15
	movq	128(%rsp), %rbx
	addsd	%xmm2, %xmm0
	mulsd	(%r15,%r11,8), %xmm0
	addsd	%xmm0, %xmm1
	movsd	%xmm1, (%rbx,%rax,8)
.L50:
	movq	64(%rsp), %rax
	addq	%rdi, %rdx
	addq	%rdi, %rsi
	movq	112(%rsp), %rbx
	addq	%rdi, %r14
	addq	%rdi, %rbp
	addl	$1, 8(%rsp)
	addq	%rdi, %r9
	addq	%rdi, %r8
	addq	%rdi, 24(%rsp)
	addq	%rax, %rcx
	addl	136(%rsp), %r10d
	addq	%rax, 88(%rsp)
	addq	%rax, 16(%rsp)
	movl	40(%rsp), %eax
	addq	%rbx, 80(%rsp)
	addq	%rbx, 72(%rsp)
	addl	%eax, 44(%rsp)
	movl	12(%rsp), %eax
	cmpl	%eax, 108(%rsp)
	jg	.L42
.L41:
	movl	172(%rsp), %eax
	testl	%eax, %eax
	jne	.L115
.L55:
	addq	$200, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_c


er<R>, val println: (String) -> Unit) : TagConsumer<R> by downstream {
    private val id = "ID-${hashCode()}"
    private val path = ArrayList<String>(1024)

    override fun onTagStart(tag: Tag) {
        downstream.onTagStart(tag)
        path.add(tag.tagName)

        println("[$id]  open ${tag.tagName} path: ${path.joinToString(" > ")}")
    }

    override fun onTagEnd(tag: Tag) {
        downstream.onTagEnd(tag)
        path.removeAt(path.lastIndex)

        println("[$id] close ${tag.tagName} path: ${path.joinToString(" > ")}")
    }

    override fun onTagAttributeChange(tag: Tag, attribute: String, value: String?) {
        downstream.onTagAttributeChange(tag, attribute, value)

        println("[$id]     ${tag.tagName}.$attribute changed to $value")
    }

    override fun finalize(): R {
        val v = downstream.finalize()

        println("[$id] finalized: ${v.toString()}")

        return v
    }
}

fun <R> TagConsumer<R>.trace(println: (String) -> Unit): TagConsumer<R> = TraceConsumer(this, println)
//header fun <R> TagConsumer<R>.trace() : TagConsumer<R>
package kotlinx.coroutines.jdk9

import kotlinx.coroutines.testing.*
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.*
import kotlinx.coroutines.flow.*
import kotlinx.coroutines.testing.flow.*
import kotlin.test.*

class PublisherAsFlowTest : TestBase() {
    @Test
    fun testCancellation() = runTest {
        var onNext = 0
        var onCancelled = 0
        var onError = 0

        val publisher = flowPublish(currentDispatcher()) {
            coroutineContext[Job]?.invokeOnCompletion {
                if (it is CancellationException) ++onCancelled
            }

            repeat(100) {
                send(it)
            }
        }

        publisher.asFlow().launchIn(CoroutineScope(Dispatchers.Unconfined)) {
            onEach {
                ++onNext
                throw RuntimeException()
            }
            catch<Throwable> {
                ++onError
            }
        }.join()

        assertEquals(1, onNext)
        assertEquals(1, onError)
        assertEquals(1, onCancelled)
    }

    @Test
    fun testBufferSize1() = runTest {
        val publisher = flowPublish(currentDispatcher()) {
            expect(1)
            send(3)

            expect(2)
            send(5)

            expect(4)
            send(7)
            expect(6)
        }

        publisher.asFlow().buffer(1).collect {
            expect(it)
        }

        finish(8)
    }

    @Test
    fun testBufferSizeDefault() = runTest {
        val publisher = flowPublish(currentDispatcher()) {
            repeat(64) {
                send(it + 1)
                expect(it + 1)
            }
            assertFalse { trySend(-1).isSuccess }
        }

        publisher.asFlow().collect {
            expect(64 + it)
        }

        finish(129)
    }

    @Test
    fun testDefaultCapacityIsProperlyOverwritten() = runTest {
        val publisher = flowPublish(currentDispatcher()) {
            expect(1)
            send(3)
            expect(2)
            send(5)
            expect(4)
            send(7)
            expect(6)
        }

        publisher.asFlow().flowOn(wrapperDispatcher()).buffer(1).collect {
            expect(it)
        }

        finish(8)
    }

    @Test
    fun testBufferSize10() = runTest {
        val publisher = flowPublish(currentDispatcher()) {
            expect(1)


inationCursor struct {
	OperatingSystemName string `json:"operatingSystemName"`
	VisitorCount        uint64 `json:"visitorCount"`
}

type Report struct {
	Data             []*Datum          `json:"data"`
	PaginationCursor *PaginationCursor `json:"paginationCursor"`
}

func Get(dp *depot.Depot, filters *filter.Filters, paginationCursor *PaginationCursor) (*Report, error) {
	report := &Report{}

	baseQuery := filter.Apply(dp, filters).
		Where("operating_system_name is not null")

	totalVisitorCountSubQuery := baseQuery.
		Session(&gorm.Session{}).
		Select("count(distinct visitor_id)")

	baseSubQuery := baseQuery.
		Session(&gorm.Session{}).
		Select(
			strings.Join([]string{
				"operating_system_name",
				"count(distinct visitor_id) as visitor_count",
				"toUInt16(round(100 * visitor_count / (@totalVisitorCountSubQuery))) as visitor_percentage",
			}, ", "),
			map[string]any{
				"totalVisitorCountSubQuery": totalVisitorCountSubQuery,
			},
		).
		Group("operating_system_name").
		Order("visitor_count desc, operating_system_name")

	query := dp.ClickHouse().
		Table("(?)", baseSubQuery)

	if paginationCursor != nil {
		query.
			Where(
				"(visitor_count = ? and operating_system_name > ?) or visitor_count < ?",
				paginationCursor.VisitorCount,
				paginationCursor.OperatingSystemName,
				paginationCursor.VisitorCount,
			)
	}

	err := query.
		Limit(pagination.Size).
		Find(&report.Data).
		Error
	if err != nil {
		return nil, err
	}

	if len(report.Data) == pagination.Size {
		report.PaginationCursor = &PaginationCursor{
			OperatingSystemName: report.Data[pagination.Size-1].OperatingSystemName,
			VisitorCount:        report.Data[pagination.Size-1].VisitorCount,
		}
	}

	return report, nil
}

func (pc *PaginationCursor) MarshalJSON() ([]byte, error) {
	type Alias PaginationCursor

	return pagination.SerializePaginationCursor((*Alias)(pc))
}

func (pc *PaginationCursor) UnmarshalJSON(data []byte) error {
	type Alias PaginationCursor

	a := &Alias{}

	err := pagination.DeserializePaginationCursor(a, data)
	if err != nil {
		return err
	}

	pc.OperatingSystemName = a.OperatingSystemName
	pc.VisitorCount = a.VisitorCount

	return nil
}
package utmsource

import (
	"errors"
	"fmt"
	"math"
	"sort"
	"testing"
	"time"

	"github.com/brianvoe/gofakeit/v6"
	"github.com/google/uuid"
	"github.com/stretchr/testify/assert"

	"github.com/th0th/poeticmetric/backend/pkg/depot"
	"github.com/th0th/poeticmetric/backend/pkg/model"
	"github.com/th0th/poeticmetric/backend/pkg/pointer"
	"github.com/th0th/poeticmetric/backend/pkg/service/sitereport/filter"
	h "github.com/th0th/poeticmetric/backend/pkg/testhelper"
)

func TestGet(t *testing.T) {
	type TestDatum struct {
		UtmSource    *string
		VisitorCount uint64
	}

	dp := h.NewDepot()

	_ = dp.WithPostgresTransaction(func(dp2 *depot.Depot) error {
		start, err := time.Parse("2006-01-02", "2022-01-01")
		assert.NoError(t, err)

		end, er


ment.getElementById('preset').value;;
            const json_data = {'text': document.getElementById('speech-input').value, 'preset': preset};
            const final_command = 'awesomettsplayback:' +  btoa(unescape(encodeURIComponent(JSON.stringify(json_data))));
            return final_command;
        }
        </script>

        <button onclick="return pycmd(getCommand())" class="atts-common atts-say-button">Say</button>

        """

        content.stats += html_content

    return on_deckbrowser_will_render_content


                     "RSA SHA384 X931"))
        goto err;
    if (!fips_pkey_signature_test(&pk, kat_tbs, sizeof(kat_tbs) - 1,
                                  kat_RSA_X931_SHA512,
                                  sizeof(kat_RSA_X931_SHA512), EVP_sha512(),
                                  EVP_MD_CTX_FLAG_PAD_X931,
                                  "RSA SHA512 X931"))
        goto err;

    ret = 1;

 err:
    FIPS_rsa_free(key);
    return ret;
}

#endif                          /* def OPENSSL_FIPS */


`O(n)`，否则为`O(n + kLogk)`。

感谢 Shilpi 建议前两种方法。

方法 6（使用最小堆）：

此方法主要是方法1的优化。请使用最小堆，而不要使用`temp[]`数组。

1.  建立给定数组的前`k`个元素（`arr[0]`至`arr[k-1]`）的最小堆`MH`，`O(k)`。

2.  对于每个元素，在第`k`个元素（`arr[k]`至`arr[n-1]`）之后，将其与`MH`的根进行比较。

    +   如果元素大于根，则将其设为根并为`MH`调用`heapify`。
    +   否则忽略它。

    步骤 2 为`O((n-k) * logk)`。

3.  最后，`MH`具有`k`个最大元素，而`MH`的根是第`k`个最大元素。

时间复杂度：`O(k + (n-k) Logk)`，无排序输出。如果需要排序的输出，则`O(k + (n-k) Logk + kLogk)`。

所有上述方法也可以用于找到第`k`个最大（或最小）元素。

## C++

```cpp
#include <iostream>
using namespace std;

// Swap function to interchange
// the value of variables x and y
int swap(int& x, int& y)
{
    int temp = x;
    x = y;
    y = temp;
}

// Min Heap Class
// arr holds reference to an integer
// array size indicate the number of
// elements in Min Heap
class MinHeap {

    int size;
    int* arr;

public:
    // Constructor to initialize the size and arr
    MinHeap(int size, int input[]);

    // Min Heapify function, that assumes that
    // 2*i+1 and 2*i+2 are min heap and fix the
    // heap property for i.
    void heapify(int i);

    // Build the min heap, by calling heapify
    // for all non-leaf nodes.
    void buildHeap();
};

// Constructor to initialize data
// members and creating mean heap
MinHeap::MinHeap(int size, int input[])
{
    // Initializing arr and size

    this->size = size;
    this->arr = input;

    // Building the Min Heap
    buildHeap();
}

// Min Heapify function, that assumes
// 2*i+1 and 2*i+2 are min heap and
// fix min heap property for i

void MinHeap::heapify(int i)
{
    // If Leaf Node, Simply return
    if (i >= size / 2)
        return;

    // variable to store the smallest element
    // index out of i, 2*i+1 and 2*i+2
    int smallest;

    // Index of left node
    int left = 2 * i + 1;

    // Index of right node
    int right = 2 * i + 2;

    // Select minimum from left node and
    // current node i, and store the minimum
    // index in smallest variable
    smallest = arr[left] < arr[i] ? left : i;

    // If right child exist, compare and
    // update the smallest variable
    if (right < size)
        smallest = arr[right] < arr[smallest]
                             ? right : smallest;

    // If Node i v


	_uri?: IElement;
}

export const RTTI_Consent_Policy: t.Type<IConsent_Policy> = t.recursion(
	'IConsent_Policy',
	() =>
		t.partial({
			id: t.string,
			extension: t.array(RTTI_Extension),
			modifierExtension: t.array(RTTI_Extension),
			authority: RTTI_uri,
			_authority: RTTI_Element,
			uri: RTTI_uri,
			_uri: RTTI_Element
		})
);
import { expect } from "chai";
import { isNumExp, isBoolExp, isVarRef, isPrimOp, isProgram, isDefineExp, isVarDecl,
         isAppExp, isStrExp, isIfExp, isProcExp, isLetExp, isLitExp, isLetrecExp, isSetExp,
         parseL5Exp, unparse, Exp, parseL5, isValuesExp } from "../../part2/L5-ast";
import { Result, bind, isOkT, makeOk, isOk,isFailure } from "../../shared/result";
import { parse as parseSexp } from "../../shared/parser";
import { typeofExp, L5typeof } from '../../part2/L5-typecheck';
import { evalParse, evalProgram } from '../../part2/L5-eval';
import { isClosure, makeTupleSExp ,Value } from '../../part2/L5-value';
import { makeEmptyTEnv, makeExtendTEnv } from '../../part2/TEnv';
import { makeBoolTExp, makeNumTExp, makeProcTExp, makeTVar, makeVoidTExp, parseTE, unparseTExp } from '../../part2/TExp';
import {valueToString } from '../../part2/L5-value';

const incompatibleTypesPredicate = (res: Result<string>) =>
    isFailure(res) && res.message.startsWith("Incompatible types");
const p = (x: string): Result<Exp> => bind(parseSexp(x), parseL5Exp);

describe('Task 2.1 : L5-AST Test Unparse', () => {
    const roundTrip = (x: string): Result<string> => bind(p(x), unparse);

    it('unparses values', () => {
        const val = "(values 1 2 3)";
        expect(roundTrip(val)).to.deep.equal(makeOk(val));
    });

    it('unparses values', () => {
        const val = "(values 1)";
        expect(roundTrip(val)).to.deep.equal(makeOk(val));
    });

    it('unparses values', () => {
        const val = "(values 5 \"string\")";
        expect(roundTrip(val)).to.deep.equal(makeOk(val));
    });

    it('unparses values', () => {
        const val = "(values )";
        expect(roundTrip(val)).to.deep.equal(makeOk(val));
    });

    it('unparses "define" expressions with values', () => {
        const define = "(define f (lambda (x) (values x x x)))";
        expect(roundTrip(define)).to.deep.equal(makeOk(define));
    });

    it('unparses "define" expressions with values', () => {
        const define = "(define f (lambda (x) (values x x x)))";
        expect(roundTrip(define)).to.deep.equal(makeOk(define));
    });

    /*it('lambda with T1', () => {
        const define = "(define f (lambda ((x : T1)) (+ x x)))";
        expect(roundTrip(define)).to.deep.equal(makeOk(define));
    });*/

    it('unparses "let-values"', () => {
        const let1 = "(let-values (((n s) (values 1 \"string\")) ((a b) (values 1 2))) b)";
        expect(roundTrip(let1)).to.deep.equal(makeOk(let1));
    });

    it('unparses "let-values"', () => {


}
blockquote.u-text.u-indent-40 {
  padding-left: 40px;
}
.u-text.u-indent-40,
.u-text.u-indent-40 ul,
.u-text.u-indent-40 ol {
  padding-left: 60px;
}
.u-spacing-40.u-search-icon,
.u-spacing-40.u-gallery-nav,
.u-spacing-40.u-carousel-control {
  padding: 40px;
}
.u-spacing-39.u-language-layout-dropdown .u-language-url + .u-language-url,
.u-form-checks-spacing-39 .u-form-checkbox-group .u-input-row,
.u-form-radios-spacing-39 .u-form-radiobutton .u-input-row {
  margin-top: 39px;
}
.u-spacing-39.u-countdown-item .u-countdown-counter,
.u-text.u-spacing-39 li {
  margin-bottom: 39px;
}
.u-spacing-39.u-countdown-counter > div + div,
.u-spacing-39.u-price-wrapper > div + div,
.u-spacing-39.u-language-layout-icons .u-language-url + .u-language-url,
.u-spacing-39 .u-social-url + .u-social-url {
  margin-left: 39px;
}
.u-spacing-39.u-countdown-wrapper > div:not(.u-hidden) + div {
  margin-left: 19.5px;
}
.u-form-vertical .u-label-left .u-spacing-39.u-field-label,
.u-form-vertical .u-label-left .u-spacing-39.u-label,
.u-rating-icons.u-spacing-39 > .u-form-rating-item,
.u-form-checks-spacing-39 .u-form-checkbox-group.u-form-input-layout-horizontal .u-input-row,
.u-form-radios-spacing-39 .u-form-radiobutton.u-form-input-layout-horizontal .u-input-row {
  margin-right: 39px;
}
blockquote.u-text.u-indent-39 {
  padding-left: 39px;
}
.u-text.u-indent-39,
.u-text.u-indent-39 ul,
.u-text.u-indent-39 ol {
  padding-left: 59px;
}
.u-spacing-39.u-search-icon,
.u-spacing-39.u-gallery-nav,
.u-spacing-39.u-carousel-control {
  padding: 39px;
}
.u-spacing-38.u-language-layout-dropdown .u-language-url + .u-language-url,
.u-form-checks-spacing-38 .u-form-checkbox-group .u-input-row,
.u-form-radios-spacing-38 .u-form-radiobutton .u-input-row {
  margin-top: 38px;
}
.u-spacing-38.u-countdown-item .u-countdown-counter,
.u-text.u-spacing-38 li {
  margin-bottom: 38px;
}
.u-spacing-38.u-countdown-counter > div + div,
.u-spacing-38.u-price-wrapper > div + div,
.u-spacing-38.u-language-layout-icons .u-language-url + .u-language-url,
.u-spacing-38 .u-social-url + .u-social-url {
  margin-left: 38px;
}
.u-spacing-38.u-countdown-wrapper > div:not(.u-hidden) + div {
  margin-left: 19px;
}
.u-form-vertical .u-label-left .u-spacing-38.u-field-label,
.u-form-vertical .u-label-le


?: string
  age: number
  company: ICompany
}

// type Partial<T> = {
//   [K in keyof T]?: T[K] extends object ? Partial<T[K]> : T[K]
// }
type MyPerson = Partial<IPerson>

type Required<T> = { [K in keyof T]-?: T[K] }
type MyRequired = Required<MyPerson>

type Pick<T, K extends keyof T> = { [X in K]: T[X] }
type MyPick = Pick<IPerson, 'age' | 'company'>

type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
type MyOmit = Omit<IPerson, 'name'>

// let obj: Record<string, any> = {}

type Record<K extends keyof any, T> = {
  [P in K]: T
}
function map<K extends keyof any, V, X>(obj: Record<K, V>, cb: (item: V, key: K) => X): Record<K, X> {
  let result = {} as Record<K, X>;

  for (let key in obj) {
    result[key] = cb(obj[key], key);
  }

  return result;
}

let r = map({ name: 'li', age: 12 }, (item, key) => {
  return '$' + item
})

export { }export const parseQueryString = (link: any) => {
  const regex = /[&?]/
  const qs = link.split(regex)
  return qs.reduce((acc: any, val: string) => {
    const [key, _val] = val.split('=')
    if (key) {
      acc[key] = _val
    }
    return acc
  }, {})
}

export const objToQs = (obj: any) => Object.keys(obj).reduce((acc, key) => `${acc}${key}=${obj[key]}&`, '?')

export const removeNullData = (obj: any ) => Object.keys(obj).reduce((acc: any, key: string) => {
  const newData  = {...obj}
  if(newData[key] !== undefined && newData[key] !== null) {
    acc[key] = newData[key]
  }
  return acc
},{})

export const hidetext = (text: string, number: number) : string =>  text.split("").map((car, idx) => text.length - number < idx ? "*": car).join("")import { AbstractControl, FormControl, FormGroupDirective, NgForm, ValidatorFn } from '@angular/forms';
import { ErrorStateMatcher } from '@angular/material/core';
import * as moment_ from 'moment';

const moment = moment_;

export class CustomeValidators {

  static fromToDate(fromDateField: string, toDateField: string, errorName: string = 'fromToDate'): ValidatorFn {
    return (formGroup: AbstractControl): any | null => {
      const fromDate = formGroup.get(fromDateField)?.value;
      const toDate = formGroup.get(toDateField)?.value;
      // Ausing the fromDate and toDate are numbers. In not convert them first after null check
      if ((fromDate !== null && toDate !== null) && moment(fromDate).isAfter(moment(toDate))) {
        return { [errorName]: true };
      }
      return null;
    };
  }

  static fromToTime(
    fromTimeField: string,
    toTimeField: string,
    fromDateField: string,
    toDateField: string,
    errorName: string = 'fromToTime'): ValidatorFn {
    return (formGroup: AbstractControl): any | null => {
      const fromTime = formGroup.get(fromTimeField)?.value;
      const toTime = formGroup.get(toTimeField)?.value;
      const fromDate = formGroup.get(fromDateField)?.value;
      const toDate = formGroup.get(toDateField)?.value;
      // Ausing the fromDate and toDate are numbers. In not convert them first after null check
      if (mo