l['vel.x']
    T = cfdbl['T']

    bloxide = read_bloxide_file('bloxide/bloxide.dat')
    bloxide['y']*=1000.0

    inside_idxs = y<bloxide['y'].max()
    y_inside = y[inside_idxs]
    bl_interp_objs = {key:interp1d(bloxide['y'], val) for key,val in bloxide.items()}
    bl_interped = {key:interp(y_inside) for key,interp in bl_interp_objs.items()}
    bl_interped['y'] = y_inside

    n = bl_interped['vel'].size
    vrms = sqrt(((bl_interped['vel']-velx[inside_idxs])**2).sum()/n)
    Trms = sqrt(((bl_interped['T']-T[inside_idxs])**2).sum()/n)

    if makeplot:
        print("vrms", vrms, "Trms", Trms)

    assert vrms < 1.2, "CFD velocity profile does not match self-similar solution"
    assert Trms < 1.0, "CFD temperature profile does not match self-similar solution"

    if makeplot:
        fig = plt.figure(figsize=(9,4))
        ax = fig.subplots(1,2)

        fig.suptitle("Boundary Layer at x={:4.1f}mm".format(x[0]))
        ax[0].set_title("Velocity")
        ax[0].plot(velx, y, color='black', marker='o', markersize=4.0, linewidth=2.0, label="CFD")
        #ax[0].plot(bl_interped['vel'], bl_interped['y'], color='green', marker='o', markersize=4.0, linestyle="None")
        ax[0].plot(bloxide['vel'], bloxide['y'], 'b--', linewidth=2.0, label="bloxide")
        ax[0].set_ylabel('y (mm)')
        ax[0].set_xlabel('vel.x (m/s)')
        ax[0].grid()
        ax[0].legend(framealpha=1.0)

        ax[1].set_title("Temperature")
        ax[1].plot(T, y, color='black', marker='o', markersize=4.0, linewidth=2.0, label="CFD")
        #ax[1].plot(bl_interped['T'], bl_interped['y'], marker='o', markersize=4.0, linestyle="None", color="green")
        ax[1].plot(bloxide['T'], bloxide['y'], 'r--', linewidth=2.0, label="bloxide")
        ax[1].set_xlabel('T (K)')
        ax[1].grid()
        ax[1].legend(framealpha=1.0)
        ax[1].yaxis.set_ticklabels([])

        plt.tight_layout()
        plt.savefig('bl.svg')
        plt.show()

def test_cleanup():
    cmd = "rm -rf lmrsim ideal-air.gas __pycache__ bl.svg"
    proc = subprocess.run(cmd.split())
    assert proc.returncode == 0, "Failed during: " + cmd

if __name__=='__main__':
    test_prep()
    test_run()
    test_loads(verbose=True)
    test_profile(makeplot=True)


if err != nil {
		return defaultPIDForStoppedProcess, stacktrace.Propagate(err, "Unable to get file path to Kurtosis Portal PID file")
	}
	if _, err = createFileIfNecessary(portalPidFilePath); err != nil {
		return defaultPIDForStoppedProcess, stacktrace.Propagate(err, "Unable to get or create Kurtosis Portal PID file")
	}
	pidFileContent, err := os.ReadFile(portalPidFilePath)
	if err != nil {
		return defaultPIDForStoppedProcess, stacktrace.Propagate(err, "Unable to read Kurtosis Portal PID file content")
	}
	if len(pidFileContent) == 0 {
		// PID file is empty, portal is not running
		return defaultPIDForStoppedProcess, nil
	}
	pidFileRawContent := string(pidFileContent)
	pid, err := strconv.ParseInt(pidFileRawContent, pidNumberBase, strconv.IntSize)
	if err != nil {
		return defaultPIDForStoppedProcess, stacktrace.Propagate(err, "Unable to parse Kurtosis Portal PID file content. Was expecting a single PID number, got: '%s'", pidFileRawContent)
	}
	return int(pid), nil
}

// getRunningProcessFromPID returns the os.Process object corresponding to the Portal process, or nil if the process is not running
func getRunningProcessFromPID(pid int) (*os.Process, error) {
	process, err := os.FindProcess(pid)
	if err != nil {
		// this should never happen on Unix system, see FindProcess docs
		return nil, stacktrace.Propagate(err, "Unexpected error getting process attached to PID '%d'", pid)
	}
	if err = process.Signal(syscall.Signal(portalProcessPingSignal)); err != nil {
		// PID file exists but process seem to be dead
		return nil, nil
	}
	return process, nil
}

// waitForTermination waits for the portal process running on pid to terminate
func waitForTermination(pid int, retries int, retriesDelayMilliseconds int) error {
	logrus.Info("Waiting for the portal to terminate...")
	for i := 0; i < retries; i++ {
		process, err := getRunningProcessFromPID(pid)
		if err != nil {
			return stacktrace.Propagate(err, "Unexpected error getting process from pid '%d' while waiting for termination", pid)
		}
		if process == nil {
			logrus.Info("Portal terminated")
			return nil
		}
		time.Sleep(time.Duration(retriesDelayMilliseconds) * time.Millisecond)
	}

	return stacktrace.NewError("Portal did not terminate after %d retries", retries)
}
package v4

import "github.com/kurtosis-tech/kurtosis/cli/cli/kurtosis_config/config_version"

/*
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                           DO NOT CHANGE THIS FILE!
  If you change this file, it will break config for users who have instantiated an
           overrides file with this version of config overrides!
    Instead, to make changes, you will need to add a new version of the config
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/

// NOTE: All new YAML property names here should be kebab-case because
//  1. it's easier to read
//  2. it's easier to write
//  3. it's consistent with previous properties and changing the format of an already-written config file is very difficult
type KurtosisConfigV4 struct {
	// vvvvvvvvv Every new Kurtosis config version must have this key vvvvvvvv
	ConfigVersion config_version.ConfigVersion `yaml:"config-version"`
	// ^^^^^^^^^ Every new Kurtosis config version must have this key ^^^^^^^^

	ShouldSendMetrics *bool                               `yaml:"should-send-metrics,omitempty"`
	KurtosisClusters  map[string]*KurtosisClusterConfigV4 `yaml:"kurtosis-clusters,omitempty"`
	CloudConfig       *KurtosisCloudConfigV


         best_score = scores[best_category]
            formatted_category = best_category.replace("_", " ")
            print(f"\nReroll limit reached. Recommended action: Score in '{formatted_category}' for {best_score} points.")
            time.sleep(3)
            played_categories.add(best_category)  # Mark the category as played
            category_history.append(best_category)  # Save the played category to history
            roll_count = 0  # Reset reroll count after forced scoring
            LastPlayedWasCategory = True

        # Save the updated roll data to the database
        save_roll_data(roll_data)
        time.sleep(3)
        clear()

if __name__ == "__main__":
    main()


, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
    color: #93a1a1;
    border-color: #839496; }
  .dark a, .dark a:active, .dark a:visited {
    color: #93a1a1; }

.dark a, .dark a:active, .dark a:visited, .dark a:hover, .dark code.url, .dark a > em {
  color: #2aa198; }
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
  color: #2aa198; }
.dark code {
  color: #b58900; }
.dark .quote h1 {
  color: #b58900; }

.dark pre code {
  display: block;
  padding: 0.5em;
  background: #002b36;
  color: #839496; }
.dark pre .comment,
.dark pre .template_comment,
.dark pre .diff .header,
.dark pre .doctype,
.dark pre .pi,
.dark pre .lisp .string,
.dark pre .javadoc {
  color: #586e75;
  font-style: italic; }
.dark pre .keyword,
.dark pre .winutils,
.dark pre .method,
.dark pre .addition,
.dark pre .css .tag,
.dark pre .request,
.dark pre .status,
.dark pre .nginx .title {
  color: #859900; }
.dark pre .number,
.dark pre .command,
.dark pre .string,
.dark pre .tag .value,
.dark pre .phpdoc,
.dark pre .tex .formula,
.dark pre .regexp,
.dark pre .hexcolor {
  color: #2aa198; }
.dark pre .title,
.dark pre .localvars,
.dark pre .chunk,
.dark pre .decorator,
.dark pre .built_in,
.dark pre .identifier,
.dark pre .vhdl .literal,
.dark pre .id {
  color: #268bd2; }
.dark pre .attribute,
.dark pre .variable,
.dark pre .lisp .body,
.dark pre .smalltalk .number,
.dark pre .constant,
.dark pre .class .title,
.dark pre .parent,
.dark pre .haskell .type {
  color: #b58900; }
.dark pre .preprocessor,
.dark pre .preprocessor .keyword,
.dark pre .shebang,
.dark pre .symbol,
.dark pre .symbol .string,
.dark pre .diff .change,
.dark pre .special,
.dark pre .attr_selector,
.dark pre .important,
.dark pre .subst,
.dark pre .cdata,
.dark pre .clojure .title {
  color: #cb4b16; }
.dark pre .deletion {
  color: #dc322f; }
.dark pre .tex .formula {
  background: #073642; }

html * {
  color-profile: sRGB;
  rendering-intent: auto; }
  html * a, html * a:active, html * a:visited, html * a:hover, html * code.url, html * a > em {
    color: #d30102; }
  html * h1, html * h2, html * h3, html * h4, html * h5, html * h6 {
    color: #d30102; }
  html * code {
    color: #268bd2; }
  html * .quote h1 {
    color: #268bd2; }

body {
  font-size: 16pt; }

code {
  font-size: 16pt; }

footer {
  font-size: 12pt; }

.h1 {
  font-size: 16pt; }

.h2 {
  f


s\n\n**Please see the [check documentation](https://test.url) in the ossf/scorecard repository for more details**".to_string()),
                ..Default::default()
            }
        );
    }

    #[test]
    fn check_output_from_url_some() {
        assert_eq!(
            CheckOutput::<()>::from_url(Some("url".to_string())),
            CheckOutput {
                passed: true,
                url: Some("url".to_string()),
                ..Default::default()
            }
        );
    }

    #[test]
    fn check_output_from_url_none() {
        assert_eq!(
            CheckOutput::<()>::from_url(None),
            CheckOutput {
                passed: false,
                ..Default::default()
            }
        );
    }

    #[test]
    fn check_output_from_path_some() {
        let gh_md = MdRepository {
            name: "repo".to_string(),
            owner: MdRepositoryOwner {
                login: "owner".to_string(),
                on: MdRepositoryOwnerOn::Organization,
            },
            ..MdRepository::default()
        };

        assert_eq!(
            CheckOutput::<()>::from_path(Some(&PathBuf::from("path")), &gh_md),
            CheckOutput {
                passed: true,
                url: Some("https://github.com/owner/repo/blob/master/path".to_string()),
                ..Default::default()
            }
        );
    }

    #[test]
    fn check_output_from_path_none() {
        assert_eq!(
            CheckOutput::<()>::from_path(None, &MdRepository::default()),
            CheckOutput {
                passed: false,
                ..Default::default()
            }
        );
    }
}
<gh_stars>1-10
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#![cfg(test)]

use {
    assert_matches::assert_matches,
    fuchsia_archive::{ChunkType, Error, Reader, DIR_CHUNK_TYPE, DIR_NAMES_CHUNK_TYPE},
    std::{fs::File, path::Path},
};

const ALL_ZEROES_CHUNK_TYPE: ChunkType = [0u8; 8];

// Creates a test fn named after the first parameter that:
//   1. opens a FAR file named after the first parameter
//   2. calls fuchsia_archive::Reader::new on the file
//   3. asserts that the new() result matches the second parameter
// And also an async version of the same test using fuchsia_archive::AsyncReader.
macro_rules! tests {
    ( $( $fn:ident => $err:pat $(if $guard:expr)? , )+ ) => {
        $(
            #[test]
            fn $fn() {
                let mut filename = stringify!($fn).replace("_", "-");
                filename.push_str(".far");
                let file = File::open(Path::new("/pkg/data/invalid-fars").join(filename)).unwrap();
                assert_matches!(Reader::new(file), $err $(if $guard)?);
            }
        )+

        mod async_tests {
            use {
                super::*,
                fuchsia_async as fasync,
                fuchsia_archive::AsyncReader,
                assert_matches::assert_matches,
            };

            $(
                #[fasync::run_singlethreaded(test)]
                async fn $fn() {
                    let mut filename = stringify!($fn).replace("_", "-");
                    filename.push_str(".far");
                    let path = Path::new("/pkg/data/invalid-fars").join(filename);
                    let file = io_util::file::open_in_namespace(
                        path.to_str().unwrap(),
                        fidl_fuchsia_io::OPEN_RIGHT_READABLE,
                    )


 with", func(oldIPAMClaim, newIPAMClaim *ipamclaimsapi.IPAMClaim) {
			Expect(ipamClaimsReconciler.Reconcile(oldIPAMClaim, newIPAMClaim, namedAllocator)).To(Succeed())
			updatedIPAMClaim, err := ovnkapiclient.IPAMClaimsClient.K8sV1alpha1().IPAMClaims(namespace).Get(context.Background(), claimName, metav1.GetOptions{})
			Expect(err).NotTo(HaveOccurred())
			Expect(updatedIPAMClaim.Status.IPs).To(ConsistOf(newIPAMClaim.Status.IPs))
		},
			Entry(
				"no IP addresses to persist",
				nil,
				emptyDummyIPAMClaim(namespace, claimName, networkName),
			),
			Entry(
				"no IP addresses to persist, but it is nothing new",
				emptyDummyIPAMClaim(namespace, claimName, networkName),
				emptyDummyIPAMClaim(namespace, claimName, networkName),
			),
			Entry(
				"an IP addresses to persist",
				nil,
				ipamClaimWithIPs(namespace, claimName, networkName),
			),
			Entry(
				"an IP addresses to persist, but already present",
				ipamClaimWithIPs(namespace, claimName, networkName),
				ipamClaimWithIPs(namespace, claimName, networkName),
			),
		)

		DescribeTable("syncing the IP allocator from the IPAMClaims is successful when provided with", func(ipamClaims ...interface{}) {
			Expect(ipamClaimsReconciler.Sync(ipamClaims, namedAllocator)).To(Succeed())
		},
			Entry("no objects to sync with"),
			Entry("an IPAMClaim without persisted IPs", emptyDummyIPAMClaim(namespace, claimName, networkName)),
			Entry("an IPAMClaim with persisted IPs",
				ipamClaimWithIPs(namespace, claimName, networkName, "192.168.200.2/24", "fd10::1/64"),
				ipamClaimWithIPs(namespace, claimName, networkName, "192.168.200.3/24", "fd10::2/64")),
		)
	})

	When("reconciling an IPAMClaim already featuring IPs", func() {
		const originalIPAMClaimIP = "192.168.200.2/24"

		var (
			namedAllocator subnet.NamedAllocator
			netInfo        util.NetInfo
			originalClaims []*ipamclaimsapi.IPAMClaim
		)

		BeforeEach(func() {
			var err error
			netInfo, err = util.NewNetInfo(dummyNetconf(networkName))
			Expect(err).NotTo(HaveOccurred())

			originalClaims = []*ipamclaimsapi.IPAMClaim{
				ipamClaimWithIPs(namespace, claimName, networkName, originalIPAMClaimIP),
			}
			ipAllocator := subnet.NewAllocator()
			ovnkapiclient = &ovnkclient.KubeOVN{
				Kube: ovnkclient.Kube{},
				IPAMClaimsClient: fakeipamclaimclient.NewSimpleClientset(
					toRuntimeObj(originalClaims)...,
				),
			}
			Expect(ipAllocator.AddOrUpdateSubnet(subnet.SubnetConfig{Name: subnetName, Subnets: ovntest.MustParseIPNets("192.168.200.0/24", "fd10::/64")})).To(Succeed())
			namedAllocator = ipAllocator.ForSubnet(subnetName)
			ipamClaimsReconciler = NewIPAMClaimReconciler(ovnkapiclient, netInfo, nil)
		})

		It("the IPAMClaim is *not* updated", func() {
			originalNonEmptyClaim := originalClaims[0]
			Expect(ipamClaimsReconciler.Reconcile(
				originalNonEmptyClaim,
				ipamClaimWithIPs(namespace, claimName, networkName, originalIPAMClaimIP, "fd10::2/64"),
				namedAlloc


, {"Llévale la tablilla de Markri a Andron Gant en Entrañas."}},
[3561] = {"Entrega al archimago Xylem", nil, {"Llévale la tablilla de Sael'hai al archimago Xylem en Azshara."}},
[3563] = {"El pago de Jes'rimon a Jediga", nil, {"Entrega la nota de Jes'rimon a Jediga en Azshara."}},
[3564] = {"El pago de Andron a Jediga", nil, {"Entrega la nota de Andron a Jediga en Azshara."}},
[3565] = {"El pago de Xylem a Jediga", nil, {"Entrega la nota de Xylem a Jediga en Azshara."}},
[3568] = {"La filtración de la corrupción", nil, {"Llena los 4 viales vacíos en las pozas de las mareas que se encuentran a lo largo de la costa de las Ruinas de Eldarath en Azshara y después ve a ver al químico Cuely."}},
[3581] = {"<UNUSED>", nil, {"Habla con Saern Correorgullo otra vez para aprender la habilidad Correr planicies."}},
[3601] = {"¡Kim'jael, claro!", nil, {"Busca en el Campamento base thalassiano la brújula de Kim'jael, la mira, el pollo relleno y el cachivache y llévaselo todo a Azshara."}},
[3621] = {"La formación de Aterravil", nil, {"Llévale el envío a Galvan el Antiguo en la Vega de Tuercespina."}},
[3622] = {"<UNUSED>", nil, nil},
[3627] = {"Juntar pedazos del amuleto", nil, {"Mata a Grol el Destructor, a Lady Sevine y al archimago Allistarj. De sus cadáveres, despoja el amuleto de Grol, el amuleto de Sevine y el amuleto de Allistarj.\n\nAcuérdate de USAR tus armas viles de azsharita encantada para debilitar a la tríade. Es la única forma de matarlos, pero úsalas con moderación...\r\n"}},
[3629] = {"Ingeniería goblin", nil, {"Si quieres saber más sobre ingeniería goblin, llévale el Manual de disciplinas de ingeniería a Nixx Muellepiñón de Gadgetzan."}},
[3630] = {"Ingeniería gnómica", nil, {"Si quieres saber más sobre ingeniería gnómica, lleva el Manual de disciplinas de ingeniería al maestro manitas Sobrechispa en Forjaz."}},
[3631] = {"Invoca un corcel vil", nil, {"Habla con Strahad Farsan en Los Baldíos."}},
[3632] = {"Ingeniería gnómica", nil, {"Si quieres saber más sobre ingeniería gnómica, lleva el Manual de disciplinas de ingeniería al maestro manitas Sobrechispa en Forjaz."}},
[3633] = {"Ingeniería goblin", nil, {"Si quieres saber más sobre ingeniería goblin, llévale el Manual de disciplinas de ingeniería a Nixx Muellepiñón de Gadgetzan, en Tanaris."}},
[3635] = {"Ingeniería gnómica", nil, {"Si quieres aprender más cosas sobre ingeniería gnómica, lleva el Manual de disciplinas de ingeniería a Oglethorpe Obnoticus en Bahía del Botín."}},
[3636] = {"Trae la Luz", nil, {"El arzobispo Benedictus quiere que mates a Amnennar el Gélido en Zahúrda Rajacieno."}},
[3639] = {"Muestra tu trabajo", nil,


.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path>
			</svg>

National holidays celebrated in various countries can influence local Internet traffic trends. That was the case during Easter, celebrated between April 7-10, 2023. In countries including Italy, Poland, Germany, France, Spain, Portugal, the United States, Mexico, and Australia, the Easter long weekend led to the lowest traffic levels of 2023 up to that point—over 100 days into the year. Traffic dipped most significantly on Easter Sunday, compared to the previous Sunday, in Poland (22% lower), Italy (18% lower), France (16% lower).

The post also illustrates Orthodox Easter trends, with Greece being most impacted. It examines Ramadan-related changes, where eating rituals impacted Internet patterns in several countries with significant Muslim populations, and Passover trends, showing how Israel’s Internet traffic dropped as much as 24%.

Effects of the conflict in Sudan on Internet patterns (✍)

			<svg width="16" height="16" viewBox="0 0 24 24">
				<path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path>
			</svg>

We’ve been monitoring changes and disruptions in Internet patterns linked to military interventions. In this Sudan-related blog post, we analyze the impact of the armed conflict between rival factions of the military government that began on April 15, 2023. Cloud


self) -> &Self {
        self.file(
            "src/lib.rs",
            r#"
                extern crate wasm_bindgen;
                use wasm_bindgen::prelude::*;

                // Import the `window.alert` function from the Web.
                #[wasm_bindgen]
                extern {
                    fn alert(s: &str);
                }

                // Export a `greet` function from Rust to JavaScript, that alerts a
                // hello message.
                #[wasm_bindgen]
                pub fn greet(name: &str) {
                    alert(&format!("Hello, {}!", name));
                }
            "#,
        )
    }

    /// Install a local wasm-bindgen for this fixture.
    ///
    /// Takes care not to re-install for every fixture, but only the one time
    /// for the whole test suite.
    pub fn install_local_wasm_bindgen(&self) -> &Self {
        static INSTALL_WASM_BINDGEN: Once = ONCE_INIT;

        let tests = Path::new(env!("CARGO_MANIFEST_DIR")).join("tests");
        let shared_wasm_bindgen = wasm_pack::binaries::local_bin_path(&tests, "wasm-bindgen");
        let shared_wasm_bindgen_test_runner =
            wasm_pack::binaries::local_bin_path(&tests, "wasm-bindgen-test-runner");

        INSTALL_WASM_BINDGEN.call_once(|| {
            if shared_wasm_bindgen.is_file() {
                assert!(shared_wasm_bindgen_test_runner.is_file());
                return;
            }

            const WASM_BINDGEN_VERSION: &str = "0.2.21";
            wasm_pack::bindgen::download_prebuilt_wasm_bindgen(&tests, WASM_BINDGEN_VERSION)
                .or_else(|_| {
                    wasm_pack::bindgen::cargo_install_wasm_bindgen(&tests, WASM_BINDGEN_VERSION)
                }).unwrap();
        });

        assert!(shared_wasm_bindgen.is_file());
        assert!(shared_wasm_bindgen_test_runner.is_file());

        wasm_pack::binaries::ensure_local_bin_dir(&self.path).unwrap();

        hard_link_or_copy(
            &shared_wasm_bindgen,
            wasm_pack::binaries::local_bin_path(&self.path, "wasm-bindgen"),
        ).expect("could not copy `wasm-bindgen` to fixture directory");

        hard_link_or_copy(
            &shared_wasm_bindgen_test_runner,
            wasm_pack::binaries::local_bin_path(&self.path, "wasm-bindgen-test-runner"),
        ).expect("could not copy `wasm-bindgen-test` to fixture directory");

        self
    }

    /// Download `geckodriver` and return its path.
    ///
    /// Takes care to ensure that only one `geckodriver` is downloaded for the whole
    /// test suite.
    pub fn install_local_geckodriver(&self) -> &Self {
        static FETCH_GECKODRIVER: Once = ONCE_INIT;

        let tests = Path::new(env!("CARGO_MANIFEST_DIR")).join("tests");

        wasm_pack::binaries::ensure_local_bin_dir(&tests)
            .expect("could not create fixture's `bin` directory");

        let geckodriver = wasm_pack::binaries::local_bin_path(&tests, "geckodriver");

        FETCH_GECKODRIVER.call_once(|| {
            if geckodriver.is_file() {
                return;
            }

            wasm_pack::test::webdriver::install_geckodriver(&tests).unwrap();
            assert!(geckodriver.is_file());
        });

        wasm_pack::binaries::ensure_local_bin_dir(&self.pat


font-style: normal;
  font-weight: 400;
  src: local('Roboto'), local('Roboto-Regular'), url(CWB0XYA8bzo0kSThX0UTuA.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: local('Roboto Bold'), local('Roboto-Bold'), url(77FXFjRbGzN4aCrSFhlh3hJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
  unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: local('Roboto Bold'), local('Roboto-Bold'), url(isZ-wbCXNKAbnjo6_TwHThJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: local('Roboto Bold'), local('Roboto-Bold'), url(UX6i4JxQDm3fVTc1CPuwqhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: local('Roboto Bold'), local('Roboto-Bold'), url(jSN2CGVDbcVyCnfJfjSdfBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
  unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: local('Roboto Bold'), local('Roboto-Bold'), url(PwZc-YbIL414wB9rB1IAPRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
  unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: local('Roboto Bold'), local('Roboto-Bold'), url(97uahxiqZRoncBaCEI3aWxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: local('Roboto Bold'), local('Roboto-Bold'), url(d-6IYplOFocCacKzxwXSOFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}
/*!
 * Bootstrap v3.3.6 (http://getbootstrap.com)
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */.btn-danger,.btn-default,.btn-info,.bt


ted on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.http;

import java.util.List;
import java.util.Map;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;

import static org.assertj.core.api.Assertions.assertThat;

/**
 * @author Arjen Poutsma
 */
class HttpStatusTests {

	private final MultiValueMap<Integer, String> statusCodes = new LinkedMultiValueMap<>();

	@BeforeEach
	void createStatusCodes() {
		statusCodes.add(100, "CONTINUE");
		statusCodes.add(101, "SWITCHING_PROTOCOLS");
		statusCodes.add(102, "PROCESSING");
		statusCodes.add(103, "EARLY_HINTS");

		statusCodes.add(200, "OK");
		statusCodes.add(201, "CREATED");
		statusCodes.add(202, "ACCEPTED");
		statusCodes.add(203, "NON_AUTHORITATIVE_INFORMATION");
		statusCodes.add(204, "NO_CONTENT");
		statusCodes.add(205, "RESET_CONTENT");
		statusCodes.add(206, "PARTIAL_CONTENT");
		statusCodes.add(207, "MULTI_STATUS");
		statusCodes.add(208, "ALREADY_REPORTED");
		statusCodes.add(226, "IM_USED");

		statusCodes.add(300, "MULTIPLE_CHOICES");
		statusCodes.add(301, "MOVED_PERMANENTLY");
		statusCodes.add(302, "FOUND");
		statusCodes.add(303, "SEE_OTHER");
		statusCodes.add(304, "NOT_MODIFIED");
		statusCodes.add(307, "TEMPORARY_REDIRECT");
		statusCodes.add(308, "PERMANENT_REDIRECT");

		statusCodes.add(400, "BAD_REQUEST");
		statusCodes.add(401, "UNAUTHORIZED");
		statusCodes.add(402, "PAYMENT_REQUIRED");
		statusCodes.add(403, "FORBIDDEN");
		statusCodes.add(404, "NOT_FOUND");
		statusCodes.add(405, "METHOD_NOT_ALLOWED");
		statusCodes.add(406, "NOT_ACCEPTABLE");
		statusCodes.add(407, "PROXY_AUTHENTICATION_REQUIRED");
		statusCodes.add(408, "REQUEST_TIMEOUT");
		statusCodes.add(409, "CONFLICT");
		statusCodes.add(410, "GONE");
		statusCodes.add(411, "LENGTH_REQUIRED");
		statusCodes.add(412, "PRECONDITION_FAILED");
		statusCodes.add(413, "PAYLOAD_TOO_LARGE");
		statusCodes.add(413, "CONTENT_TOO_LARGE");
		statusCodes.add(414, "URI_TOO_LONG");
		statusCodes.add(415, "UNSUPPORTED_MEDIA_TYPE");
		statusCodes.add(416, "REQUESTED_RANGE_NOT_SATISFIABLE");
		statusCodes.add(417, "EXPECTATION_FAILED");
		statusCodes.add(418, "I_AM_A_TEAPOT");
		statusCodes.add(421, "MISDIRECTED_REQUEST");
		statusCodes.add(422, "UNPROCESSABLE_CONTENT");
		statusCodes.add(422, "UNPROCESSABLE_ENTITY");
		statusCodes.add(423, "LOCKED");
		statusCodes.add(424, "FAILED_DEPENDENCY");
		statusCodes.add(425, "TOO_EARLY");
		statusCodes.add(426, "UPGRADE_REQUIRED");
		statusCodes.add(428, "PRECONDITION_REQUIRED");
		statusCodes.add(429, "TOO_MANY_REQUESTS");
		statusCodes.add(431, "REQUEST_HEADER_FIELDS_TOO_LARGE");
		statusCodes.add(451, "UNAVAIL


{"-"},
	}, {
		name: "Multi comma in json tag",
		x: testStruct{
			MultiComma: "Foo",
		},
		y: testStruct{
			MultiComma: "Bar",
		},
		want: []string{"multi"},
	}}

	for _, test := range tests {
		t.Run(test.name, func(t *testing.T) {
			reporter := new(fieldListReporter)
			cmp.Equal(test.x, test.y, append(test.opts, cmp.Reporter(reporter))...)
			got := reporter.Fields()
			if diff := cmp.Diff(got, test.want); diff != "" {
				t.Errorf("%s: Fields() = %v, Want %v", test.name, got, test.want)
			}
		})
	}
}

func TestImmutableReporter(t *testing.T) {
	tests := []struct {
		name      string
		x         interface{}
		y         interface{}
		want      string
		expectErr bool
		opts      []cmp.Option
	}{{
		name: "No diff",
		x: testStruct{
			StringField: "foo",
		},
		y: testStruct{
			StringField: "foo",
		},
		want: "",
	}, {
		name: "Both nil objects",
		want: "",
	}, {
		name: "Nil second object",
		x: testStruct{
			StringField: "foo",
		},
		want: `{any}:
	-: "{A: StringField:foo IntField:0 StructField:{ChildString: ChildInt:0} Omit: Ignore: Dash: MultiComma:}"
`,
	}, {
		name: "Single character field name",
		x: testStruct{
			A: "foo",
		},
		y: testStruct{},
		want: `{kmp.testStruct}.A:
	-: "foo"
	+: ""
`,
	}, {
		name: "Single field",
		x: testStruct{
			StringField: "foo",
		},
		y: testStruct{
			StringField: "bar",
		},
		want: `{kmp.testStruct}.StringField:
	-: "foo"
	+: "bar"
`,
	}, {
		name: "Multi field",
		x: testStruct{
			StringField: "foo",
			IntField:    5,
		},
		y: testStruct{
			StringField: "bar",
			IntField:    6,
		},
		want: `{kmp.testStruct}.StringField:
	-: "foo"
	+: "bar"
{kmp.testStruct}.IntField:
	-: "5"
	+: "6"
`,
	}, {
		name: "Missing field",
		x: testStruct{
			StringField: "foo",
		},
		y: testStruct{},
		want: `{kmp.testStruct}.StringField:
	-: "foo"
	+: ""
`,
	}, {
		name: "Nested field",
		x: testStruct{
			StructField: childStruct{
				ChildString: "baz",
			},
		},
		y: testStruct{
			StructField: childStruct{
				ChildString: "zap",
				ChildInt:    1,
			},
		},
		want: `{kmp.testStruct}.StructField.ChildString:
	-: "baz"
	+: "zap"
{kmp.testStruct}.StructField.ChildInt:
	-: "0"
	+: "1"
`,
	}, {
		name: "Non Struct",
		x:    "foo",
		y:    "bar",
		want: `{string}:
	-: "foo"
	+: "bar"
`,
	}, {
		name: "Private field allowed",
		x: privateStruct{
			privateField: "Foo",
		},
		y: privateStruct{
			privateField: "Bar",
		},
		want: `{kmp.privateStruct}.privateField:
	-: "Foo"
	+: "Bar"
`,
		opts: []cmp.Option{cmp.AllowUnexported(privateStruct{})},
	}, {
		name: "Private field ignored",
		x: privateStruct{
			privateField: "Foo",
		},
		y: privateStruct{
			privateField: "Bar",
		},
		want: "",
		opts: []cmp.Option{cmpopts.IgnoreUnexported(privateStruct{})},
	},


String("Update"),
			),
		)
		defer span.End()
	}
	ret0, ret1 := c.inner.Update(arg0, arg1, arg2)
	if span != nil {
		tracing.SetSpanStatus(span, ret1)
	}
	return ret0, ret1
}
func (c *withTracing) UpdateStatus(arg0 context.Context, arg1 *k8s_io_kube_aggregator_pkg_apis_apiregistration_v1.APIService, arg2 k8s_io_apimachinery_pkg_apis_meta_v1.UpdateOptions) (*k8s_io_kube_aggregator_pkg_apis_apiregistration_v1.APIService, error) {
	var span trace.Span
	if tracing.IsInSpan(arg0) {
		arg0, span = tracing.StartChildSpan(
			arg0,
			"",
			fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "UpdateStatus"),
			trace.WithAttributes(
				tracing.KubeClientGroupKey.String(c.client),
				tracing.KubeClientKindKey.String(c.kind),
				tracing.KubeClientOperationKey.String("UpdateStatus"),
			),
		)
		defer span.End()
	}
	ret0, ret1 := c.inner.UpdateStatus(arg0, arg1, arg2)
	if span != nil {
		tracing.SetSpanStatus(span, ret1)
	}
	return ret0, ret1
}
func (c *withTracing) Watch(arg0 context.Context, arg1 k8s_io_apimachinery_pkg_apis_meta_v1.ListOptions) (k8s_io_apimachinery_pkg_watch.Interface, error) {
	var span trace.Span
	if tracing.IsInSpan(arg0) {
		arg0, span = tracing.StartChildSpan(
			arg0,
			"",
			fmt.Sprintf("KUBE %s/%s/%s", c.client, c.kind, "Watch"),
			trace.WithAttributes(
				tracing.KubeClientGroupKey.String(c.client),
				tracing.KubeClientKindKey.String(c.kind),
				tracing.KubeClientOperationKey.String("Watch"),
			),
		)
		defer span.End()
	}
	ret0, ret1 := c.inner.Watch(arg0, arg1)
	if span != nil {
		tracing.SetSpanStatus(span, ret1)
	}
	return ret0, ret1
}
package matching

import (
	"fmt"
	"reflect"

	reflectutils "github.com/kyverno/kyverno-json/pkg/utils/reflect"
)

func Match(expected, actual any) (bool, error) {
	if expected != nil {
		switch reflectutils.GetKind(expected) {
		case reflect.Slice:
			if reflectutils.GetKind(actual) != reflect.Slice {
				return false, fmt.Errorf("invalid actual value, must be a slice, found %s", reflectutils.GetKind(actual))
			}
			if reflect.ValueOf(expected).Len() != reflect.ValueOf(actual).Len() {
				return false, nil
			}
			for i := 0; i < reflect.ValueOf(expected).Len(); i++ {
				if inner, err := Match(reflect.ValueOf(expected).Index(i).Interface(), reflect.ValueOf(actual).Index(i).Interface()); err != nil {
					return false, err
				} else if !inner {
					return false, nil
				}
			}
			return true, nil
		case reflect.Map:
			if reflectutils.GetKind(actual) != reflect.Map {
				return false, fmt.Errorf("invalid actual value, must be a map, found %s", reflectutils.GetKind(actual))
			}
			iter := reflect.ValueOf(expected).MapRange()
			for iter.Next() {
				actualValue := reflect.ValueOf(actual).MapIndex(iter.Key())
				if !actualValue.IsValid() {
					return false, nil
				}
				if inner, err := Match(iter.Value().Interface(), actualValue.Interface()); err != nil {
					return false, err
				} else if !inner {


if not False:
    print(42)
else:
    print(777)


cted)
	bool                                          bLogCorrectedServerTimeDelta;                      // 0x00B1(0x0001)(Edit, ZeroConstructor, DisableEditOnInstance, IsPlainOldData, NoDestructor, Protected, HasGetValueTypeHash, NativeAccessSpecifierProtected)
	uint8                                         Pad_B2[0x2];                                       // 0x00B2(0x0002)(Fixing Size After Last Property [ Dumper-7 ])
	float                                         SpeedSyncTimeoutLength;                            // 0x00B4(0x0004)(Edit, ZeroConstructor, DisableEditOnInstance, IsPlainOldData, NoDestructor, Protected, HasGetValueTypeHash, NativeAccessSpecifierProtected)
	float                                         TempoDeltaThrottleSeconds;                         // 0x00B8(0x0004)(Edit, ZeroConstructor, DisableEditOnInstance, IsPlainOldData, NoDestructor, Protected, HasGetValueTypeHash, NativeAccessSpecifierProtected)
	uint8                                         Pad_BC[0x4];                                       // 0x00BC(0x0004)(Fixing Size After Last Property [ Dumper-7 ])
	class UFabricMetaSoundManagerComponent*       MetaSoundManager;                                  // 0x00C0(0x0008)(ExportObject, ZeroConstructor, Transient, InstancedReference, NoDestructor, Protected, HasGetValueTypeHash, NativeAccessSpecifierProtected)
	class UMusicClockComponent*                   MusicClock;                                        // 0x00C8(0x0008)(ExportObject, ZeroConstructor, Transient, InstancedReference, NoDestructor, Protected, HasGetValueTypeHash, NativeAccessSpecifierProtected)
	uint8                                         Pad_D0[0x8];                                       // 0x00D0(0x0008)(Fixing Size After Last Property [ Dumper-7 ])
	struct FMidiSongPos                           ServerCurrentSongRenderPos;                        // 0x00D8(0x0040)(Net, Transient, RepNotify, Protected, NativeAccessSpecifierProtected)
	struct FFabricTimelineSyncServerSongPosition  ServerTimelineSyncServerSongPosition;              // 0x0118(0x001C)(Net, Transient, RepNotify, NoDestructor, Protected, NativeAccessSpecifierProtected)
	uint8                                         Pad_134[0x2C];                                     // 0x0134(0x002C)(Fixing Struct Size After Last Property [ Dumper-7 ])

public:
	void OnRep_ServerCurrentSongPos();
	void OnTimelinePlayingChanged(EMusicClockState State);
	void SetFabricMetaSoundManager(class UFabricMetaSoundManagerComponent* InMetaSoundManager);

public:
	static class UClass* StaticClass()
	{
		return StaticClassImpl<"FabricTimelineSyncComponent">();
	}
	static class UFabricTimelineSyncComponent* GetDefaultObj()
	{
		return GetDefaultObjImpl<UFabricTimelineSyncComponent>();
	}
};
static_assert(alignof(UFabricTimelineSyncComponent) == 0x000008, "Wrong alignment on UFabricTimelineSyncComponent");
static_assert(sizeof(UFabricTimelineSyncComponent) == 0x000160, "Wrong size on UFabricTimelineSyncComponent");
static_assert(offsetof(UFabricTimelineSyncComponent, ThresholdForSeekMS) == 0x0000A0, "Member 'UFabricTimelineSyncComponent::ThresholdForSeekMS' has a wrong offset!");
static_assert(offsetof(UFabricTimelineSyncComponent, ThresholdForStartSpeedAdjustMS) == 0x0000A4, "Member 'UFabricTimelineSyncComponent::ThresholdForStartSpeedAdjustMS' has a wrong offset!");
static_assert(offsetof(UFabricTimelineSyncComponent, ThresholdForEndOfSpeedAdjustMS) == 0x0000A8, "Member 'UFabricTimelineSyncComponent::ThresholdForEndOfSpeedAdjustMS' has a wrong offset!");
static_assert(offsetof(UFabricTimelineSyncComponent, SpeedAdjustFactor) == 0x0000AC, "Member 'UFabricTimelineSyncComponent::SpeedAdjustFactor' has a wrong offset!");
static_assert(offsetof(UFabric


gros",
[27840] = "Cetro de Sha'tar",
[27841] = "Garra Decepada da Matriarca",
[27842] = "Grande Cetro dos Reis do Nexus",
[27843] = "Cinta Forrada de Glifos",
[27844] = "Brafoneiras do Castigo Imediato",
[27845] = "Botas Magma Emplumadas",
[27846] = "Garra do Vigia",
[27847] = "Brafoneiras Lâmina-leque",
[27848] = "Botas Bordadas da Pira dos Feitiços",
[27849] = "Monster - Axe, 1H Large Double Bladed (Broken)",
[27850] = "Monster - Axe, 1H Hot Steel (Broken)",
[27851] = "Monster - Shield (Broken)",
[27852] = "Monster - Mace2H (Broken)",
[27854] = "Carne de Talbuque Defumada",
[27855] = "Pão Integral Mag'har",
[27856] = "Amoras de Skethyl",
[27857] = "Queijo Picante de Garadar",
[27858] = "Carpa Solavera",
[27859] = "Campânulas Zíngaras",
[27860] = "Água Draeneica Purificada",
[27861] = "Mercadorias Roubadas de Lathrai",
[27862] = "Monster - Mace2H, Olhorn Totem",
[27864] = "Brianita do Brian de Custo Estendido Copiando",
[27865] = "Braçadeiras de Shirrak",
[27866] = "Adorno Esplendoroso da Segunda Visão",
[27867] = "Botas do Injusto",
[27868] = "Adaga do Cantorruna",
[27869] = "Anel da Determinação do Sacerdalma",
[27870] = "Guarda-pernas de Placas da Ruína",
[27871] = "Camalha Abençoada de Maladaar",
[27872] = "O Ceifador de Almas",
[27873] = "Calças da Clareira da Lua",
[27874] = "Perneiras do Senhor das Feras",
[27875] = "Calças Consagradas",
[27876] = "Vontade do Exarca Caído",
[27877] = "Cajado Selvagem Draeneico",
[27878] = "Mortalha Auchenai",
[27879] = "Peito d'Armas em Escamas do Gladiador",
[27880] = "Manoplas em Escamas do Gladiador",
[27881] = "Elmo em Escamas do Gladiador",
[27882] = "Guarda-pernas em Escamas do Gladiador",
[27883] = "Omoplatas em Escamas do Gladiador",
[27884] = "Botas Ornamentadas do Santificado",
[27885] = "Varinha de Alma dos Aldor",
[27886] = "Ídolo da Rainha Esmeralda",
[27887] = "Escudo de Platina dos Valorosos",
[27888] = "Elmo Asa dos Sonhos",
[27889] = "Luvas Fogo-jade da Aniquilação",
[27890] = "Varinha dos Asa Etérea",
[27891] = "Estatueta de Adamantina",
[27892] = "Manto do Incitador",
[27893] = "Perneiras Ornamentadas do Venerado",
[27895] = "Elo de Muitos Prismas",
[27896] = "Alambique de Poder Infernal",
[27897] = "Peitoral de Muitos Encantos",
[27898] = "Canhão-de-mão Fogo Furioso",
[2789


nt(nxml, &doctype);
	if (err)
		*err = ret;

	if (ret != NXML_OK)
		return NULL;

	return doctype;
}

nxml_data_t *
nxmle_find_element(nxml_t *nxml, nxml_data_t *data, char *name,
				   nxml_error_t *err)
{
	nxml_data_t *element;
	nxml_error_t ret;

	ret = nxml_find_element(nxml, data, name, &element);
	if (err)
		*err = ret;

	if (ret != NXML_OK)
		return NULL;

	return element;
}

char *
nxmle_find_attribute(nxml_data_t *data, char *name, nxml_error_t *err)
{
	nxml_attr_t *attribute;
	nxml_error_t ret;
	char *str;

	ret = nxml_find_attribute(data, name, &attribute);
	if (err)
		*err = ret;

	if (ret != NXML_OK)
		return NULL;

	if (!attribute)
		return NULL;

	str = strdup(attribute->value);
	if (!str)
	{
		if (err)
			*err = NXML_ERR_POSIX;
		return NULL;
	}

	return str;
}

char *
nxmle_find_namespace(nxml_data_t *data, char *name, nxml_error_t *err)
{
	nxml_namespace_t *namespace;
	nxml_error_t ret;
	char *str;

	ret = nxml_find_namespace(data, name, &namespace);
	if (err)
		*err = ret;

	if (ret != NXML_OK)
		return NULL;

	if (!namespace)
		return NULL;

	str = strdup(namespace->ns);
	if (!str)
	{
		if (err)
			*err = NXML_ERR_POSIX;
		return NULL;
	}

	return str;
}

char *
nxmle_get_string(nxml_data_t *data, nxml_error_t *err)
{
	nxml_error_t ret;
	char *str = NULL;

	ret = nxml_get_string(data, &str);
	if (err)
		*err = ret;

	if (ret != NXML_OK)
		return NULL;

	return str;
}

char *
nxmle_write_buffer(nxml_t *nxml, nxml_error_t *err)
{
	char *buffer;
	nxml_error_t ret;

	buffer = NULL;
	ret = nxml_write_buffer(nxml, &buffer);

	if (err)
		*err = ret;

	if (ret != NXML_OK)
		return NULL;

	return buffer;
}

int nxmle_line_error(nxml_t *nxml, nxml_error_t *err)
{
	int line;
	nxml_error_t ret;

	ret = nxml_line_error(nxml, &line);

	if (err)
		*err = ret;

	return line;
}

/* EOF */


a = id.match(matchRegex)) == null ? void 0 : _a.groups) || {};
    const existingLookFieldWithNameAndFileClassName = (_b = index.filesFields.get(filePath)) == null ? void 0 : _b.find(
      (field) => field.name === fieldName && (field.fileClassName === void 0 && fileClassName === "presetField" || field.fileClassName === fileClassName)
    );
    const dvPage = index.dv.api.page(filePath);
    if (dvPage === void 0 || dvPage[fieldName] === void 0 || !existingLookFieldWithNameAndFileClassName) {
      index.fileLookupFiles.delete(id);
      index.fileLookupFieldLastValue.delete(id);
      index.fileLookupFieldLastOutputType.delete(id);
      index.fileLookupFieldsStatus.delete(`${filePath}__${fieldName}`);
    }
  }
}

// src/commands/updateCanvas.ts
var import_obsidian64 = require("obsidian");
async function updateCanvas(plugin, forceUpdateOne) {
  var _a;
  const start2 = Date.now();
  const f = plugin.fieldIndex;
  const dvApi = (_a = plugin.app.plugins.plugins.dataview) == null ? void 0 : _a.api;
  const canvases = forceUpdateOne ? [forceUpdateOne.canvas] : plugin.app.vault.getFiles().filter((t) => t.extension === "canvas");
  const isNodeInGroup = (node, group) => {
    const { x: x1, y: y1, width: w1, height: h1 } = node;
    const { x: x2, y: y2, width: w2, height: h2 } = group;
    return x2 <= x1 && y2 <= y1 && x2 + w2 >= x1 + w1 && y2 + h2 >= y1 + h1;
  };
  const orientedEdges = (direction, edges, node) => {
    switch (direction) {
      case "incoming":
        return edges.filter((edge) => edge.toNode === node.id);
      case "outgoing":
        return edges.filter((edge) => edge.fromNode === node.id);
      case "bothsides":
        return edges.filter((edge) => edge.fromNode === node.id || edge.toNode === node.id);
      default:
        return [];
    }
  };
  const targetNode = (direction, edge, nodes, currentNode) => {
    switch (direction) {
      case "incoming":
        return nodes.find((node) => node.id !== currentNode.id && node.id === edge.fromNode);
      case "outgoing":
        return nodes.find((node) => node.id !== currentNode.id && node.id === edge.toNode);
      case "bothsides":
        return nodes.find((node) => node.id !== currentNode.id && (node.id === edge.toNode || node.id === edge.fromNode));
      default:
        return void 0;
    }
  };
  const resolveFieldLinksForNode = (field, targetFilePath, edges, nodes, node, cumulativeSet) => {
    const { nodeColors, edgeColors, edgeFromSides, edgeToSides, edgeLabels, filesFromDVQuery, direction } = field.options;
    const matchingFiles = filesFromDVQuery && dvApi ? new Function("dv", "current", `return ${filesFromDVQuery}`)(dvApi, dvApi.page(targetFilePath)) : void 0;
    const matchingEdges = orientedEdges(direction, edges, node);
    const linkNodes = matchingEdges.filter(
      (edge) => !edgeLabels || edgeLabels.length === 0 || edgeLabels.includes(edge.label)
    ).filter(
      (edge) => !edgeColors || edgeColors.length === 0 || !edge.color && edgeColors.includes("0") || edgeColors.includes(edge.color)
    ).filter(
      (edge) => !edgeFromSides || edgeFromSides.length === 0 || edgeFromSides.includes(edge.fromSide)
    ).filter(
      (edge) => !edgeToSides || edgeToSides.length === 0 || edgeTo


ainerStatuses[i].State.Terminated != nil &&
							started[id]) ||
						// State.Terminated might not have been updated although the container already
						// stopped running. Also check whether the pod is deleted.
						(pod.DeletionTimestamp != nil && started[id]) ||
						// Don't attempt to get logs for a container unless it is running or has terminated.
						// Trying to get a log would just end up with an error that we would have to suppress.
						(pod.Status.ContainerStatuses[i].State.Running == nil &&
							pod.Status.ContainerStatuses[i].State.Terminated == nil) {
						continue
					}
					readCloser, err := logsForPod(ctx, cs, ns, pod.ObjectMeta.Name,
						&v1.PodLogOptions{
							Container: c.Name,
							Follow:    true,
						})
					if err != nil {
						// We do get "normal" errors here, like trying to read too early.
						// We can ignore those.
						if to.StatusWriter != nil &&
							expectedErrors.FindStringIndex(err.Error()) == nil {
							fmt.Fprintf(to.StatusWriter, "WARNING: pod log: %s: %s\n", name, err)
						}
						continue
					}

					// Determine where we write. If this fails, we intentionally return without clearing
					// the active[name] flag, which prevents trying over and over again to
					// create the output file.
					var out io.Writer
					var closer io.Closer
					var prefix string
					if to.LogWriter != nil {
						out = to.LogWriter
						nodeName := pod.Spec.NodeName
						if len(nodeName) > 10 {
							nodeName = nodeName[0:4] + ".." + nodeName[len(nodeName)-4:]
						}
						prefix = name + "@" + nodeName + ": "
					} else {
						var err error
						filename := to.LogPathPrefix + pod.ObjectMeta.Name + "-" + c.Name + ".log"
						err = os.MkdirAll(path.Dir(filename), 0755)
						if err != nil {
							if to.StatusWriter != nil {
								fmt.Fprintf(to.StatusWriter, "ERROR: pod log: create directory for %s: %s\n", filename, err)
							}
							return
						}
						// The test suite might run the same test multiple times,
						// so we have to append here.
						file, err := os.OpenFile(filename, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
						if err != nil {
							if to.StatusWriter != nil {
								fmt.Fprintf(to.StatusWriter, "ERROR: pod log: create file %s: %s\n", filename, err)
							}
							return
						}
						closer = file
						out = file
					}
					go func() {
						if closer != nil {
							defer closer.Close()
						}
						first := true
						defer func() {
							m.Lock()
							// If we never printed anything, then also skip the final message.
							if !first {
								if prefix != "" {
									fmt.Fprintf(out, "%s==== end of pod log ====\n", prefix)
								} else {
									fmt.Fprintf(out, "==== end of pod log for container %s ====\n", name)
								}
							}
							active[name] = false
							m.Unlock()
							readCloser.Close()
						}()
						scanner := bufio.NewScanner(readCloser)
						for scanner.Scan() {
							line := scanner.Text()
							// Filter out the expected "end of stream" error message,
							// it would just confuse developers who don't know about it.
							// Same for attempts to read logs from a container that
							// isn't ready (yet?!).
							if !strings.HasPrefix(line, "rpc error: code = Unknown desc = Error: No such container:") &&
								!strings.HasPrefix(line, "unable to retrieve container logs for ") &&
								!strings.HasPrefix(line, "Unable to retrieve container logs for ") {
								if first {
									// Because the same log might be


			sensor_gps.s_variance_m_s = 100.f;
			sensor_gps.c_variance_rad = 100.f;
			sensor_gps.eph = 100.f;
			sensor_gps.epv = 100.f;
			sensor_gps.hdop = 100.f;
			sensor_gps.vdop = 100.f;
		}

		sensor_gps.timestamp_sample = gpos.timestamp_sample;
		sensor_gps.time_utc_usec = 0;
		sensor_gps.device_id = device_id.devid;
		sensor_gps.latitude_deg = latitude; // Latitude in degrees
		sensor_gps.longitude_deg = longitude; // Longitude in degrees
		sensor_gps.altitude_msl_m = altitude; // Altitude in meters above MSL
		sensor_gps.altitude_ellipsoid_m = altitude;
		sensor_gps.noise_per_ms = 0;
		sensor_gps.jamming_indicator = 0;
		sensor_gps.vel_m_s = sqrtf(gps_vel(0) * gps_vel(0) + gps_vel(1) * gps_vel(1)); // GPS ground speed, (metres/sec)
		sensor_gps.vel_n_m_s = gps_vel(0);
		sensor_gps.vel_e_m_s = gps_vel(1);
		sensor_gps.vel_d_m_s = gps_vel(2);
		sensor_gps.cog_rad = atan2(gps_vel(1),
					   gps_vel(0)); // Course over ground (NOT heading, but direction of movement), -PI..PI, (radians)
		sensor_gps.timestamp_time_relative = 0;
		sensor_gps.heading = NAN;
		sensor_gps.heading_offset = NAN;
		sensor_gps.heading_accuracy = 0;
		sensor_gps.automatic_gain_control = 0;
		sensor_gps.jamming_state = 0;
		sensor_gps.spoofing_state = 0;
		sensor_gps.vel_ned_valid = true;
		sensor_gps.satellites_used = _sim_gps_used.get();

		sensor_gps.timestamp = hrt_absolute_time();
		_sensor_gps_pub.publish(sensor_gps);
	}

	perf_end(_loop_perf);
}

int SensorGpsSim::task_spawn(int argc, char *argv[])
{
	SensorGpsSim *instance = new SensorGpsSim();

	if (instance) {
		_object.store(instance);
		_task_id = task_id_is_work_queue;

		if (instance->init()) {
			return PX4_OK;
		}

	} else {
		PX4_ERR("alloc failed");
	}

	delete instance;
	_object.store(nullptr);
	_task_id = -1;

	return PX4_ERROR;
}

int SensorGpsSim::custom_command(int argc, char *argv[])
{
	return print_usage("unknown command");
}

int SensorGpsSim::print_usage(const char *reason)
{
	if (reason) {
		PX4_WARN("%s\n", reason);
	}

	PRINT_MODULE_DESCRIPTION(
		R"DESCR_STR(
### Description

)DESCR_STR");

	PRINT_MODULE_USAGE_NAME("sensor_gps_sim", "system");
	PRINT_MODULE_USAGE_COMMAND("start");
	PRINT_MODULE_USAGE_DEFAULT_COMMANDS();

	return 0;
}

extern "C" __EXPORT int sensor_gps_sim_main(int argc, char *argv[])
{
	return SensorGpsSim::main(argc, argv);
}
/****************************************************************************
 *
 *   Copyright (c) 2025 PX4 Development Team. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *	notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *	notice, this list of conditions and the following disclaimer in
 *	the documentation and/or other materials provided with the
 *	distribution.
 * 3. Neither the name PX4 nor the names of its contributors may be
 *	used to endorse or promote products derived from this software
 *	without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED


 }

  SOPHUS_FUNC static float epsilonSqrt() { return std::sqrt(epsilon()); }

  SOPHUS_FUNC static float constexpr pi() {
    return 3.141592653589793238462643383279502884f;
  }
};

/// Nullopt type of lightweight optional class.
struct nullopt_t {
  explicit constexpr nullopt_t() {}
};

constexpr nullopt_t nullopt{};

/// Lightweight optional implementation which requires ``T`` to have a
/// default constructor.
///
/// TODO: Replace with std::optional once Sophus moves to c++17.
///
template <class T>
class optional {
 public:
  optional() : is_valid_(false) {}

  optional(nullopt_t) : is_valid_(false) {}

  optional(T const& type) : type_(type), is_valid_(true) {}

  explicit operator bool() const { return is_valid_; }

  T const* operator->() const {
    SOPHUS_ENSURE(is_valid_, "must be valid");
    return &type_;
  }

  T* operator->() {
    SOPHUS_ENSURE(is_valid_, "must be valid");
    return &type_;
  }

  T const& operator*() const {
    SOPHUS_ENSURE(is_valid_, "must be valid");
    return type_;
  }

  T& operator*() {
    SOPHUS_ENSURE(is_valid_, "must be valid");
    return type_;
  }

 private:
  T type_;
  bool is_valid_;
};

template <bool B, class T = void>
using enable_if_t = typename std::enable_if<B, T>::type;

template <class G>
struct IsUniformRandomBitGenerator {
  static const bool value = std::is_unsigned<typename G::result_type>::value &&
                            std::is_unsigned<decltype(G::min())>::value &&
                            std::is_unsigned<decltype(G::max())>::value;
};
}  // namespace Sophus

#endif  // SOPHUS_COMMON_HPP
/// @file
/// Special orthogonal group SO(2) - rotation in 2d.

#ifndef SOPHUS_SO2_HPP
#define SOPHUS_SO2_HPP

#include <complex>
#include <type_traits>

// Include only the selective set of Eigen headers that we need.
// This helps when using Sophus with unusual compilers, like nvcc.
#include <Eigen/LU>

#include "rotation_matrix.hpp"
#include "types.hpp"

namespace Sophus {
template <class Scalar_, int Options = 0>
class SO2;
using SO2d = SO2<double>;
using SO2f = SO2<float>;
}  // namespace Sophus

namespace Eigen {
namespace internal {

template <class Scalar_, int Options_>
struct traits<Sophus::SO2<Scalar_, Options_>> {
  static constexpr int Options = Options_;
  using Scalar = Scalar_;
  using ComplexType = Sophus::Vector2<Scalar, Options>;
};

template <class Scalar_, int Options_>
struct traits<Map<Sophus::SO2<Scalar_>, Options_>>
    : traits<Sophus::SO2<Scalar_, Options_>> {
  static constexpr int Options = Options_;
  using Scalar = Scalar_;
  using ComplexType = Map<Sophus::Vector2<Scalar>, Options>;
};

template <class Scalar_, int Options_>
struct traits<Map<Sophus::SO2<Scalar_> const, Options_>>
    : traits<Sophus::SO2<Scalar_, Options_> const> {
  static constexpr int Options = Options_;
  using Scalar = Scalar_;
  using ComplexType = Map<Sophus::Vector2<Scalar> const, Options>;
};
}  // namespace internal
}  // namespace Eigen

namespace Sophus {

/// SO2 base type - implements SO2 class but is storage agnostic.
///
/// SO(2) is the group of rotations in 2


per-neuron temporal projection layer\\n        self.NEURON_TEMPORAL_PROJECTION_DIM = 32 # Dimension for the learned temporal features per neuron\\n        self.neuron_temporal_dense_projection = keras.layers.Dense(\\n            self.NEURON_TEMPORAL_PROJECTION_DIM, activation='relu', name='neuron_temporal_dense_projection'\\n        )\\n\\n    def call(self, series_input: tf.Tensor) -> tf.Tensor:\\n        \\"\\"\\"\\n        Performs the forward pass of the feature extractor.\\n\\n        Args:\\n          series_input: Raw neural activity data, shape (batch_size, C, NUM_NEURONS).\\n\\n        Returns:\\n          A tuple of tensors:\\n            - raw_neuron_context_for_temporal_layer: Raw C-length context for each neuron, shaped (B*N, C, 1).\\n            - non_temporal_features_flat: Combined non-sequential features (stats, global context, neuron embedding, temporal projection).\\n        \\"\\"\\"\\n        batch_size = tf.shape(series_input)[0]\\n        num_neurons = tf.shape(series_input)[2] # Use dynamic num_neurons from input tensor\\n\\n        # Transpose to (batch_size, NUM_NEURONS, C) for easier per-neuron context processing.\\n        raw_neuron_data = tf.transpose(series_input, perm=[0, 2, 1]) # Shape: (B, N, C)\\n\\n        # Raw per-neuron context features for temporal processing layer (e.g., Conv1D in Model)\\n        raw_neuron_context_flat = tf.reshape(raw_neuron_data, [-1, self.NUM_TIMESTEPS_CONTEXT]) # Shape: (B*N, C)\\n        # Reshape for Conv1D input: (batch_size * num_neurons, timesteps_context, 1)\\n        raw_neuron_context_for_temporal_layer = tf.expand_dims(raw_neuron_context_flat, axis=-1) # Shape: (B*N, C, 1)\\n\\n        # Calculate mean, std, min, max, last_value, first_value, median, range for each neuron's C context window.\\n        neuron_means = tf.reduce_mean(raw_neuron_data, axis=2, keepdims=True) # Shape: (B, N, 1)\\n        neuron_stds = tf.math.reduce_std(raw_neuron_data, axis=2, keepdims=True) # Shape: (B, N, 1)\\n        neuron_mins = tf.reduce_min(raw_neuron_data, axis=2, keepdims=True) # Shape (B, N, 1)\\n        neuron_maxs = tf.reduce_max(raw_neuron_data, axis=2, keepdims=True) # Shape (B, N, 1)\\n        neuron_last_value = raw_neuron_data[:, :, self.last_value_index:self.last_value_index+1] # Shape (B, N, 1)\\n        neuron_first_value = raw_neuron_data[:, :, self.first_value_index:self.first_value_index+1] # Shape (B, N, 1)\\n        \\n        # For median on C=4, sort and take average of middle two\\n        sorted_neuron_data = tf.sort(raw_neuron_data, axis=2) # Sort along the context dimension\\n        neuron_medians = (sorted_neuron_data[:, :, self.NUM_TIMESTEPS_CONTEXT // 2 -1 ] +\\n                          sorted_neuron_data[:, :, self.NUM_TIMESTEPS_CONTEXT // 2 ]) / 2.0 # Shape (B, N)\\n        neuron_medians = tf.expand_dims(neuron_medians, ax


SIVE_LOCK)) {
            // IR command not found in mapping or received a recursive (while just running another one) regular command -> request stop
#ifdef INFO
            Serial.println(F("Invalid or recursive regular command received -> set stop"));
#endif
            requestToStopReceived = true; // return to loop
            return true;
        }
    }
    return false;
}

/*
 * Special delay function for the IRCommandDispatcher.
 * @return  true - if stop received
 */
bool IRCommandDispatcher::delayAndCheckForIRCommand(uint16_t aDelayMillis) {
    uint32_t tStartMillis = millis();

    do {
        if (IRDispatcher.checkIRInputForAlwaysExecutableCommand()) {
            return true;
        }

    } while (millis() - tStartMillis < aDelayMillis);
    return false;
}

void IRCommandDispatcher::printIRCommandString() {
#ifdef INFO
    Serial.print(F("IRCommand="));
    for (uint8_t i = 0; i < sizeof(IRMapping) / sizeof(struct IRToCommandMappingStruct); ++i) {
        if (IRReceivedData.command == IRMapping[i].IRCode) {
            Serial.println(reinterpret_cast<const __FlashStringHelper*>(IRMapping[i].CommandString));
            return;
        }
    }
    Serial.println(reinterpret_cast<const __FlashStringHelper*>(unknown));
#endif
}


						}
						this.CheckForAssignment(current);
						if (current.NodeState == AssignmentNodeState.NotAssigned)
						{
							assignmentFlowNodes.Enqueue(current);
						}
						else if (current.NodeState != AssignmentNodeState.ContainsAssignment)
						{
							if (current.NodeState != AssignmentNodeState.ContainsUsage)
							{
								continue;
							}
							assignmentType = AssignmentType.NotAssigned;
							return assignmentType;
						}
						else
						{
							num++;
						}
					}
					continue;
				}
				return assignmentType;
			}
			if (num == 0)
			{
				return AssignmentType.NotUsed;
			}
			if (num != 1)
			{
				return AssignmentType.MultipleAssignments;
			}
			return AssignmentType.SingleAssignment;
		}

		private void CheckForAssignment(AssignmentFlowNode node)
		{
			if (node.NodeState != AssignmentNodeState.Unknown)
			{
				return;
			}
			foreach (Expression item in this.expressionsData.BlockExpressions[node.CFGBlock.First.get_Offset()])
			{
				UsageFinderSearchResult usageFinderSearchResult = this.visitor.SearchForUsage(item);
				if (usageFinderSearchResult != UsageFinderSearchResult.Assigned)
				{
					if (usageFinderSearchResult != UsageFinderSearchResult.Used)
					{
						continue;
					}
					node.NodeState = AssignmentNodeState.ContainsUsage;
					return;
				}
				else
				{
					node.NodeState = AssignmentNodeState.ContainsAssignment;
					return;
				}
			}
			node.NodeState = AssignmentNodeState.NotAssigned;
		}
	}
}


using System;
using System.Collections.Generic;

namespace SubiektGTModels.Models;

public partial class EmEmail
{
    public int EmId { get; set; }

    public DateTime EmDate { get; set; }

    public string EmUidl { get; set; } = null!;

    public string EmMessageId { get; set; } = null!;

    public string EmSubject { get; set; } = null!;

    public string EmFrom { get; set; } = null!;

    public string EmFromAddress { get; set; } = null!;

    public string EmFromName { get; set; } = null!;

    public string EmTo { get; set; } = null!;

    public DateTime? EmReceived { get; set; }

    public DateTime? EmSent { get; set; }

    public string EmAccount { get; set; } = null!;

    public int? EmAttachmentCount { get; set; }

    public string? EmSource { get; set; }

    public bool? EmHtmlbody { get; set; }

    public int EmStatus { get; set; }

    public int? EmAccountId { get; set; }

    public int? EmTransId { get; set; }

    public int? EmPackageId { get; set; }

    public int? EmAuctionId { get; set; }

    public int? EmCus


 @return [D4Array].
 * @sample samples.NDArrayTest.ndarrayCollections4D
 */
public fun <T : Number> Multik.ndarray(
    elements: Collection<T>,
    dim1: Int,
    dim2: Int,
    dim3: Int,
    dim4: Int
): D4Array<T> =
    ndarray(elements, intArrayOf(dim1, dim2, dim3, dim4), D4)

/**
 * Returns a new 4-dimensions array given shape from a collection.
 *
 * @param elements collection of elements.
 * @param dim1 value of 1-dimension.
 * @param dim2 value of 2-dimension.
 * @param dim3 value of 3-dimension.
 * @param dim4 value of 4-dimension.
 * @return [D4Array].
 * @sample samples.NDArrayTest.ndarrayCollections4D
 */
@JvmName("ndarrayComplex")
public fun <T : Complex> Multik.ndarray(
    elements: Collection<T>,
    dim1: Int,
    dim2: Int,
    dim3: Int,
    dim4: Int
): D4Array<T> =
    ndarray(elements, intArrayOf(dim1, dim2, dim3, dim4), D4)

/**
 * Returns a new 4-dimensions array from [ByteArray].
 *
 * @param args [ByteArray] of elements.
 * @param dim1 value of 1-dimension.
 * @param dim2 value of 2-dimension.
 * @param dim3 value of 3-dimension.
 * @param dim4 value of 4-dimension.
 * @return [D4Array].
 * @sample samples.NDArrayTest.ndarrayByteArray4D
 */
public fun Multik.ndarray(args: ByteArray, dim1: Int, dim2: Int, dim3: Int, dim4: Int): D4Array<Byte> {
    requireElementsWithShape(args.size, dim1 * dim2 * dim3 * dim4)
    val data = MemoryViewByteArray(args)
    return D4Array(data, shape = intArrayOf(dim1, dim2, dim3, dim4), dim = D4)
}

/**
 * Returns a new 4-dimensions array from [ShortArray].
 *
 * @param args [ShortArray] of elements.
 * @param dim1 value of 1-dimension.
 * @param dim2 value of 2-dimension.
 * @param dim3 value of 3-dimension.
 * @param dim4 value of 4-dimension.
 * @return [D4Array].
 * @sample samples.NDArrayTest.ndarrayShortArray4D
 */
public fun Multik.ndarray(args: ShortArray, dim1: Int, dim2: Int, dim3: Int, dim4: Int): D4Array<Short> {
    requireElementsWithShape(args.size, dim1 * dim2 * dim3 * dim4)
    val data = MemoryViewShortArray(args)
    return D4Array(data, shape = intArrayOf(dim1, dim2, dim3, dim4), dim = D4)
}

/**
 * Returns a new 4-dimensions array from [IntArray].
 *
 * @param args [IntArray] of elements.
 * @param dim1 value of 1-dimension.
 * @param dim2 value of 2-dimension.
 * @param dim3 value of 3-dimension.
 * @param dim4 value of 4-dimension.
 * @return [D4Array].
 * @sample samples.NDArrayTest.ndarrayIntArray4D
 */
public fun Multik.ndarray(args: IntArray, dim1: Int, dim2: Int, dim3: Int, dim4: Int): D4Array<Int> {
    requireElementsWithShape(args.size, dim1 * dim2 * dim3 * dim4)
    val data = MemoryViewIntArray(args)
    return D4Array(data, shape = intArrayOf(dim1, dim2, dim3, dim4), dim = D4)
}

/**
 * Returns a new 4-dimensions array from [LongArray].
 *
 * @param args [LongArray] of elements.
 * @param dim1 value of 1-dimension.
 * @param dim2 value of 2-d


croldisp=off] {
  opacity: 0;
  visibility: hidden;
}

/* 各アイコンを正方形に収める */
.skin-grayish .main .article-header .sns-share a,
.skin-grayish .main .article-footer .sns-share a,
.skin-grayish .main .article-footer .sns-follow a,
.skin-grayish .share-menu-content .sns-share a,
.skin-grayish .follow-menu-content .sns-follow a {
  height: 40px;
  width: 40px;
}

/* モバイルメニューのアイコンを綺麗に並べる */
.skin-grayish .share-menu-content .sns-buttons,
.skin-grayish .follow-menu-content .sns-buttons {
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

/* モバイルメニューのアイコンは円に */
.skin-grayish .share-menu-content .sns-share a,
.skin-grayish .follow-menu-content .sns-follow a {
  color: var(--white);
  font-size: clamp(14px, 2.9vw, 24px);
  min-height: 0vw;
  border-radius: 99%;
}

/* Twitterなどのキャプション削除 */
.skin-grayish .sns-share.ss-high-and-low-lc a .button-caption,
.skin-grayish .article-footer .button-caption {
  display: none;
}

/* 各アイコンの大きさ調整 */
.skin-grayish .sns-share.ss-high-and-low-lc a .social-icon {
  font-size: 24px;
}

/* 各アイコンの枠線と背景色を透明に */
.skin-grayish .main .article-header .bc-brand-color-white.sns-share [class*="-button"] {
  border: none;
  background-color: transparent;
}

/* SNSボタンを縦方向に並べる */
.skin-grayish .article-header .sns-share-buttons {
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  padding: 1rem 0;
  gap: 0.5rem;
  margin: 0;
}

/* 各アイコンにホバー時の拡大アニメーション */
.skin-grayish .article-header .sns-share-buttons a {
  color: var(--cocoon-sns-color);
  transform: scale(1);
  transition: transform .3s ease-in-out;
}

.skin-grayish .article-header .sns-share-buttons a:hover {
  transform: scale(1.2);
}

/* toc 目次 */
.skin-grayish .toc {
  border: 0;
  border-bottom: 1px solid var(--skin-grayish-site-sub-color) !important;
  border-top: 1px solid var(--skin-grayish-site-sub-color) !important;
  display: block;
  margin-bottom: 40px;
  padding: 0;
  width: 100%;
}

.skin-grayish .toc-checkbox:checked~.toc-content {
  padding-bottom: 2em;
}

.skin-grayish .toc-title {
  background-image: linear-gradient(-45deg, #fff 25%, var(--skin-grayish-gradient) 25%, var(--skin-grayish-gradient) 50%, #fff 50%, #fff 75%, var(--skin-grayish-gradient) 75%, var(--skin-grayish-gradient));


sh --issue --dns dns_cf -d yourdomain.com -d *.yourdomain.com

配合crontab设置自动续期，就像给系统装上永不断电的电池：

bash 0 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null

5.2 CNAME记录的隐藏优势

除了常规的A记录解析，为代理服务设置CNAME记录可以：
 - 实现多CDN自动故障转移
 - 隐藏真实服务器IP
 - 方便后续迁移

在DNS面板中添加如下记录：
 proxy.yourdomain.com CNAME proxy.cdnprovider.com

第六章：三位一体的协同作战

6.1 流量路径的完美编排

用户访问 proxy.yourdomain.com →

DNS解析到Kangle服务器 →

Kangle根据规则转发到EP →

EP智能路由选择最优V2Ray节点 →

V2Ray通过TLS隧道连接目标网站

这个过程就像精密设计的接力赛，每个环节都经过加密和优化。

6.2 监控系统的搭建

使用Prometheus+Grafana构建可视化监控：

```yaml</p>  <h1>prometheus.yml 片段  <p>scrape<em>configs:   - job</em>name: 'kangle'     static<em>configs:       - targets: ['localhost:2000']   - job</em>name: 'v2ray'     static_configs:       - targets: ['localhost:10080'] ```

这相当于给系统装上了X光机，任何性能瓶颈都无所遁形。

技术点评：隐私工程的交响乐章

这套组合方案展现了现代网络工程的精妙之处：Kangle如同经验丰富的乐队指挥，精确控制每个流量的节奏；EP则像灵活的第一小提琴手，用边缘计算提升整体响应速度；V2Ray就是神秘的低音提琴，在深层网络奏响加密的旋律。而域名绑定则是连接这些乐章的乐谱，将技术元素和谐统一。

不同于简单的工具堆砌，这种组合实现了1+1+1>3的效果：
 - 安全性：多层加密+流量混淆达到军事级防护
 - 可靠性：故障自动转移确保99.99%可用性
 - 扩展性：模块化设计支持随时添加新组件

在GFW不断升级的今天，这种深度定制方案代表着网络自由技术的最新演进方向。正如Linux创始人Linus Torvalds所说："好的软件应该像透明的水晶，每个角度都折射出设计者的智慧。"这套系统正是这句话的完美诠释。

注意事项：技术发展日新月异，本文配置方法可能随软件版本更新而调整。建议读者在实施前


);
      ctx.beginPath();
      ctx.arc(originX - p.r * Math.cos(p.angle), originY - p.r * Math.sin(p.angle), circleRadius, 0, 2 * Math.PI);
      ctx.fill();
   }

   // Returns the vocal tract position for an x/y coordinate.
   public getIndex(x: number, y: number) {
      const xx = x - originX;
      const yy = y - originY;
      let angle = Math.atan2(yy, xx);
      while (angle > 0) {
         angle -= 2 * Math.PI;
      }
      return (Math.PI + angle - angleOffset) * (this.tract.lipStart - 1) / (angleScale * Math.PI);
   }

   // Returns the scaled distance from the outer circle.
   public getDiameter(x: number, y: number) {
      const xx = x - originX;
      const yy = y - originY;
      return (radius - Math.sqrt(xx * xx + yy * yy)) / scale;
   }

   public draw(ctx: CanvasRenderingContext2D) {
      this.ctx = ctx;
      const tract = this.tract;
      this.guiWobbleTime = Utils.getTime();

      ctx.save();
      ctx.lineCap = 'round';
      ctx.lineJoin = 'round';

      this.drawTongueControl();

      const velum = tract.noseDiameter[0];
      const velumAngle = velum * 4;

      // first draw fill
      ctx.beginPath();
      ctx.lineWidth = 2;
      ctx.strokeStyle = fillColour;
      ctx.fillStyle = fillColour;
      this.moveTo(1, 0);
      for (let i = 1; i < tract.n; i++) {
         this.lineTo(i, tract.diameter[i]);
      }
      for (let i = tract.n - 1; i >= 2; i--) {
         this.lineTo(i, 0);
      }
      ctx.closePath();
      ctx.stroke();
      ctx.fill();

      // for nose
      ctx.beginPath();
      ctx.lineWidth = 2;
      ctx.strokeStyle = fillColour;
      ctx.fillStyle = fillColour;
      this.moveTo(tract.noseStart, -noseOffset);
      for (let i = 1; i < tract.noseLength; i++) {
         this.lineTo(i + tract.noseStart, -noseOffset - tract.noseDiameter[i] * 0.9);
      }
      for (let i = tract.noseLength - 1; i >= 1; i--) {
         this.lineTo(i + tract.noseStart, -noseOffset);
      }
      ctx.closePath();
      this.ctx.fill();

      // velum
      ctx.beginPath();
      ctx.lineWidth = 2;
      ctx.strokeStyle = fillColour;
      ctx.fillStyle = fillColour;
      this.moveTo(tract.noseStart - 2, 0);
      this.lineTo(tract.noseStart, -noseOffset);
      this.lineTo(tract.noseStart + velumAngle, -noseOffset);
      this.lineTo(tract.noseStart + velumAngle - 2, 0);
      ctx.closePath();
      ctx.stroke();
      ctx.fill();

      // white text
      ctx.fillStyle = "white";
      ctx.font = "20px Arial";
      ctx.textAlign = "center";
      ctx.globalAlpha = 1;
      this.drawText(tract.n * 0.10, 0.425, "throat");
      this.drawText(tract.n * 0.71, -1.8, "nasal");
      this.drawText(tract.n * 0.71, -1.3, "cavity");
      ctx.font = "22px Arial";
      this.drawText(tract.n * 0.6, 0.9, "oral")


e.Y) != (MathF.RoundToInt(device.TargetSize.Y) / 2) * 2)
				{
					vertices[0].Pos.Y += 0.5f;
					vertices[1].Pos.Y += 0.5f;
					vertices[2].Pos.Y += 0.5f;
					vertices[3].Pos.Y += 0.5f;
				}
			}
		}
		protected void GetUVRect(Texture mainTex, int spriteIndex, out Rect uvRect)
		{
			// Determine the rect area of the texture to be displayed
			if (mainTex == null)
				uvRect = new Rect(1.0f, 1.0f);
			else if (spriteIndex != -1)
				mainTex.LookupAtlas(spriteIndex, out uvRect);
			else
				uvRect = new Rect(mainTex.UVRatio);

			// Determine wrap-around and stretch behavior if the displayed rect size does
			// not equal the rect size that would be required for a 1:1 display.
			if (mainTex != null)
			{
				Vector2 fullSize = mainTex.ContentSize * (uvRect.Size / mainTex.UVRatio);
				if ((this.rectMode & UVMode.WrapHorizontal) != 0)
					uvRect.W *= this.rect.W / fullSize.X;
				if ((this.rectMode & UVMode.WrapVertical) != 0)
					uvRect.H *= this.rect.H / fullSize.Y;
			}
		}

		/// <inheritdoc/>
		public virtual void ApplySpriteAnimation(int currentSpriteIndex, int nextSpriteIndex, float progressToNext)
		{
			this.spriteIndex = currentSpriteIndex;
		}
		/// <inheritdoc/>
		public override void Draw(IDrawDevice device)
		{
			Texture mainTex = this.RetrieveMainTex();

			Rect uvRect;
			this.GetUVRect(mainTex, this.spriteIndex, out uvRect);
			this.PrepareVertices(ref this.vertices, device, this.colorTint, uvRect);
			if (this.customMat != null)
				device.AddVertices(this.customMat, VertexMode.Quads, this.vertices);
			else
				device.AddVertices(this.sharedMat, VertexMode.Quads, this.vertices);
		}

		protected override void OnSetupCloneTargets(object targetObj, ICloneTargetSetup setup)
		{
			base.OnSetupCloneTargets(targetObj, setup);
			SpriteRenderer target = targetObj as SpriteRenderer;

			setup.HandleObject(this.customMat, target.customMat);
		}
		protected override void OnCopyDataTo(object targetObj, ICloneOperation operation)
		{
			base.OnCopyDataTo(targetObj, operation);
			SpriteRenderer target = targetObj as SpriteRenderer;

			target.rect      = this.rect;
			target.colorTint = this.colorTint;
			target.rectMode  = this.rectMode;
			target.offset    = this.offset;
			target.pixelGrid = this.pixelGrid;
			target.flipMode  = this.flipMode;
			target.spriteIndex = this.spriteIndex;

			operation.HandleValue(ref this.sharedMat, ref target.sharedMat);
			operation.HandleObject(this.customMat, ref target.customMat);
		}
	}
}


namespace Core.User
{
    public interface ITokenServic


l,n,r,i,o,a,s,u,l,c);f=j(h);var d=O(h);if(10===t)return e.ma||e.ma?e.ma(n,r,i,o,a,s,u,l,c,f):e.call(null,n,r,i,o,a,s,u,l,c,f);h=j(d);var p=O(d);if(11===t)return e.na||e.na?e.na(n,r,i,o,a,s,u,l,c,f,h):e.call(null,n,r,i,o,a,s,u,l,c,f,h);d=j(p);var m=O(p);if(12===t)return e.oa||e.oa?e.oa(n,r,i,o,a,s,u,l,c,f,h,d):e.call(null,n,r,i,o,a,s,u,l,c,f,h,d);p=j(m);var v=O(m);if(13===t)return e.pa||e.pa?e.pa(n,r,i,o,a,s,u,l,c,f,h,d,p):e.call(null,n,r,i,o,a,s,u,l,c,f,h,d,p);m=j(v);var y=O(v);if(14===t)return e.qa||e.qa?e.qa(n,r,i,o,a,s,u,l,c,f,h,d,p,m):e.call(null,n,r,i,o,a,s,u,l,c,f,h,d,p,m);v=j(y);var g=O(y);if(15===t)return e.ra||e.ra?e.ra(n,r,i,o,a,s,u,l,c,f,h,d,p,m,v):e.call(null,n,r,i,o,a,s,u,l,c,f,h,d,p,m,v);y=j(g);var b=O(g);if(16===t)return e.sa||e.sa?e.sa(n,r,i,o,a,s,u,l,c,f,h,d,p,m,v,y):e.call(null,n,r,i,o,a,s,u,l,c,f,h,d,p,m,v,y);g=j(b);var _=O(b);if(17===t)return e.ta||e.ta?e.ta(n,r,i,o,a,s,u,l,c,f,h,d,p,m,v,y,g):e.call(null,n,r,i,o,a,s,u,l,c,f,h,d,p,m,v,y,g);b=j(_);var x=O(_);if(18===t)return e.ua||e.ua?e.ua(n,r,i,o,a,s,u,l,c,f,h,d,p,m,v,y,g,b):e.call(null,n,r,i,o,a,s,u,l,c,f,h,d,p,m,v,y,g,b);if(_=j(x),x=O(x),19===t)return e.va||e.va?e.va(n,r,i,o,a,s,u,l,c,f,h,d,p,m,v,y,g,b,_):e.call(null,n,r,i,o,a,s,u,l,c,f,h,d,p,m,v,y,g,b,_);var w=j(x);if(O(x),20===t)return e.wa||e.wa?e.wa(n,r,i,o,a,s,u,l,c,f,h,d,p,m,v,y,g,b,_,w):e.call(null,n,r,i,o,a,s,u,l,c,f,h,d,p,m,v,y,g,b,_,w);throw Error("Only up to 20 arguments supported on functions")}function sn(){switch(arguments.length){case 2:return un(arguments[0],arguments[1


};
use frame_support::{
    decl_error, decl_module, dispatch::DispatchResult, ensure,
    traits::{
        Currency, EnsureOrigin, Get,
        ExistenceRequirement::{AllowDeath, KeepAlive},
    },
};
use frame_system::{self as system, ensure_signed};
use sp_runtime::{traits::{Zero, Saturating}};
use sp_core::U256;
use sp_arithmetic::traits::SaturatedConversion;
use node_primitives::{ChainId, ETH_CHAIN_ID, RSymbol};
use rtoken_balances::{traits::{Currency as RCurrency}};

#[cfg(test)]
mod mock;
#[cfg(test)]
mod tests;

type BalanceOf<T> = <<T as Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance;

pub trait Trait: system::Trait + bridge::Trait {
    /// The currency mechanism.
    type Currency: Currency<Self::AccountId>;
    /// Currency mechanism of rtoken
    type RCurrency: RCurrency<Self::AccountId>;

    /// Specifies the origin check provided by the bridge for calls that can only be called by the bridge pallet
    type BridgeOrigin: EnsureOrigin<Self::Origin, Success = Self::AccountId>;

    // Ids can be defined by the runtime and passed in, perhaps from blake2b_128 hashes.
    type NativeTokenId: Get<ResourceId>;
}

decl_error! {
    pub enum Error for Module<T: Trait> {
        ServicePaused,
        InvalidChainId,
        InvalidEthereumAddress,
        InvalidChainFee,
        InvalidFeesRecipientAccount,
        InsufficientRbalance,
        RsymbolNotMapped,
        ResourceNotMapped,
    }
}

decl_module! {
    pub struct Module<T: Trait> for enum Call where origin: T::Origin {
        type Error = Error<T>;

        const NativeTokenId: ResourceId = T::NativeTokenId::get();

        /// Transfers some amount of the native token to some recipient on a (whitelisted) destination chain.
        #[weight = 195_000_000]
        pub fn transfer_native(origin, amount: BalanceOf<T>, recipient: Vec<u8>, dest_id: ChainId) -> DispatchResult {
            let source = ensure_signed(origin)?;

            ensure!(!<bridge::Module<T>>::check_is_paused(), Error::<T>::ServicePaused);

            ensure!(<bridge::Module<T>>::chain_whitelisted(dest_id), Error::<T>::InvalidChainId);

            if dest_id == ETH_CHAIN_ID {
                Self::check_eth_recipient(recipient.clone())?;
            }

            let chain_fees = <bridge::Module<T>>::get_chain_fees(dest_id)
                .ok_or_else(|| Error::<T>::InvalidChainFee)?;
            let fees: BalanceOf<T> = chain_fees.saturated_into();

            let fees_recipient_account = <bridge::Module<T>>::get_fees_recipient_account()
                .ok_or_else(|| Error::<T>::InvalidFeesRecipientAccount)?;

            let total_amount = amount.saturating_add(fees);

            let bridge_id = <bridge::Module<T>>::account_id();
            T::Currency::transfer(&source, &bridge_id, total_amount.into(), AllowDeath)?;

            if fees > Zero::zero() {
                T::Currency::transfer(&bridge_id, &fees_recipient_account, fees.into(), KeepAlive)?;
            }

            let resource_id = T::NativeTokenId::get();
            <bridge::Module<T>>::transfer_fungible(source, dest_id, resource_id, recipient, U256::from(amount.saturated_into()))
        }

        /// Allows the bridge to swap native token back
        #[weight = 195_000_000]


 buffer[ptr + 2] << 16
           | buffer[ptr + 3] << 24;
    },
    set: function set_int(ptr, value) {
      buffer[ptr    ] = value        & 255;
      buffer[ptr + 1] = value >>> 8  & 255;
      buffer[ptr + 2] = value >>> 16 & 255;
      buffer[ptr + 3] = value >>> 24;
    }
  };

  memory.uint = memory.u32 = {
    get: function get_uint(ptr) {
      return (buffer[ptr    ]
            | buffer[ptr + 1] << 8
            | buffer[ptr + 2] << 16
            | buffer[ptr + 3] << 24) >>> 0;
    },
    set: function set_uint(ptr, value) {
      buffer[ptr    ] = value        & 255;
      buffer[ptr + 1] = value >>> 8  & 255;
      buffer[ptr + 2] = value >>> 16 & 255;
      buffer[ptr + 3] = value >>> 24;
    }
  };

  function get_long_s(ptr, unsigned) {
    const lo = buffer[ptr    ]
             | buffer[ptr + 1] << 8
             | buffer[ptr + 2] << 16
             | buffer[ptr + 3] << 24;
    const hi = buffer[ptr + 4]
             | buffer[ptr + 5] << 8
             | buffer[ptr + 6] << 16
             | buffer[ptr + 7] << 24;
    return LongModule
      ? LongModule.fromBits(lo, hi, !!unsigned)
      : { low: lo, high: hi, unsigned: !!unsigned };
  }

  function set_long_s(ptr, value) {
    buffer[ptr    ] = value.low         & 255;
    buffer[ptr + 1] = value.low  >>> 8  & 255;
    buffer[ptr + 2] = value.low  >>> 16 & 255;
    buffer[ptr + 3] = value.low  >>> 24;
    buffer[ptr + 4] = value.high        & 255;
    buffer[ptr + 5] = value.high >>> 8  & 255;
    buffer[ptr + 6] = value.high >>> 16 & 255;
    buffer[ptr + 7] = value.high >>> 24;
  }

  memory.long = memory.s64 = {
    get: function get_long(ptr) { return get_long_s(ptr, false); },
    set: set_long_s
  };

  memory.ulong = memory.u64 = {
    get: function get_ulong(ptr) { return get_long_s(ptr, true); },
    set: set_long_s
  };

  const f64 = new Float64Array([ -0 ]);
  const f32 = new Float32Array(f64.buffer);
  const f8b = new Uint8Array(f64.buffer);
  const fle = f8b[7] === 128;

  memory.float = memory.f32 = {
    get: function get_float(ptr) {
      if (fle) {
        f8b[0] = buffer[ptr    ];
        f8b[1] = buffer[ptr + 1];
        f8b[2] = buffer[ptr + 2];
        f8b[3] = buffer[ptr + 3];
      } else {
        f8b[3] = buffer[ptr    ];
        f8b[2] = buffer[ptr + 1];
        f8b[1] = buffer[ptr + 2];
        f8b[0] = buffer[ptr + 3];
      }
      return f32[0];
    },
    set: function set_float(ptr, value) {
      f32[0] = value;
      if (fle) {
        buffer[ptr    ] = f8b[0];
        buffer[ptr + 1] = f8b[1];
        buffer[ptr + 2] = f8b[2];
        buffer[ptr + 3] = f8b[3];
      } else {
        buffer[ptr    ] = f8b[3];
        buffer[ptr + 1] = f8b[2];
        buffer[ptr + 2] = f8b[1];
        buffer[ptr + 3] = f8b[0];
      }
    }
  };

  memory.double = memory.f64 = {
    get: function get_double(ptr) {
      if (fle) {


="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm*">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm*
>    <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm>)
>    the same interface can be implemented starting with a relaxed load, where
>    the acquire operation is performed only the first time each thread hits the
>    initialization.
>
>    On 19 November 2013 at 17:57, Richard Smith <*richardsmith at google.com*
>    <richardsmith at google.com>> wrote:
>    Hi,
>
>    There are a few things in the current ABI which are known to be
>    suboptimal, but we cannot change because doing so would introduce an ABI
>    break. However, vendors sometimes get an opportunity to break their ABI (or
>    are defining a new ABI), and for some vendors, this is a very common
>    occurrence. To this end, I think it would be valuable for the ABI document
>    to describe what we might want to put in a 'Version 2' of the ABI; that is,
>    a set of changes that we recommend be made whenever a vendor has a chance
>    to introduce an ABI break.
>
>    (Or perhaps this should be viewed from the opposite perspective: we
>    could make improvements to the ABI, with an annex listing changes that old
>    platforms must make for compatibility.)
>
>    Would there be support for this idea?
>
>
>    In off-line discussion with John McCall, we came up with the following
>    list of potential changes that might be made (sorry if I forgot any):
>
>     * Make constructors and destructors return 'this' instead of
>    returning 'void', in order to allow callers to avoid a reload in common
>    cases and to allow more tail calls.
>     * Simplify case 2b in non-POD class layout.
>     * Make virtual functions that are defined as 'inline' not be key
>    functions
>     * Fix the bug that -1 is both the null pointer-to-data-member value
>    and also a valid value of a pointer-to-data-member (could use SIZE_MIN
>    instead)
>     * Relax the definition of POD used in the ABI, in order to allow more
>    class types to be passed in registers
>
>    Are there any other things that it would make


/// @file
/// @ingroup plugin_api
/*************************************************************************
 * Copyright (c) 2011 AT&T Intellectual Property
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors: Details at https://graphviz.org
 *************************************************************************/

#pragma once

#include "types.h"
#include "gvplugin.h"
#include "gvcjob.h"

#ifdef __cplusplus
extern "C" {
#endif

    /// @ingroup plugin_api
    struct gvrender_engine_s {
	void (*begin_job) (GVJ_t * job);
	void (*end_job) (GVJ_t * job);
	void (*begin_graph) (GVJ_t * job);
	void (*end_graph) (GVJ_t * job);
	void (*begin_layer) (GVJ_t * job, char *layername,
			     int layerNum, int numLayers);
	void (*end_layer) (GVJ_t * job);
	void (*begin_page) (GVJ_t * job);
	void (*end_page) (GVJ_t * job);
	void (*begin_cluster) (GVJ_t * job);
	void (*end_cluster) (GVJ_t * job);
	void (*begin_nodes) (GVJ_t * job);
	void (*end_nodes) (GVJ_t * job);
	void (*begin_edges) (GVJ_t * job);
	void (*end_edges) (GVJ_t * job);
	void (*begin_node) (GVJ_t * job);
	void (*end_node) (GVJ_t * job);
	void (*begin_edge) (GVJ_t * job);
	void (*end_edge) (GVJ_t * job);
	void (*begin_anchor) (GVJ_t * job,
		char *href, char *tooltip, char *target, char *id);
	void (*end_anchor) (GVJ_t * job);
	void (*begin_label) (GVJ_t * job, label_type type);
	void (*end_label) (GVJ_t * job);
	void (*textspan) (GVJ_t * job, pointf p, textspan_t * span);
	void (*resolve_color) (GVJ_t * job, gvcolor_t * color);
	void (*ellipse) (GVJ_t * job, pointf * A, int filled);
	void (*polygon) (GVJ_t * job, pointf * A, int n, int filled);
	void (*beziercurve) (GVJ_t * job, pointf * A, int n, int);
	void (*polyline) (GVJ_t * job, pointf * A, int n);
	void (*comment) (GVJ_t * job, char *comment);
	void (*library_shape) (GVJ_t * job, char *name, pointf * A, int n, int filled);
    };

#ifdef __cplusplus
}
#endif


reEach(() => {
        game = FallingBlocksModel.create();
        game.start();
    });

    describe("The Id Generator", () => {
        it("generates a number one higher than the last one with every call", () => {
            const id = generateId();
            const idplus1 = generateId();
            expect(idplus1).toEqual(id + 1);
            const idplus2 = generateId();
            expect(idplus2).toEqual(id + 2);
        });

        it("will give two created pieces a different id", () => {
            const piece1 = Piece.create({x: 10, y: 10, ...TEST_L});
            const piece2 = Piece.create({x: 9, y: 10, ...TEST_L});
            expect(piece1.id).not.toEqual(piece2.id);
        });
    });

    describe("The collide function", () => {
        it("detects if two pieces have one point in common", () => {
            const piece = Piece.create({x: 10, y: 10, ...TEST_L});
            const other = Piece.create({x: 10, y: 8, ...TEST_L});
            expect(collidesWithPiece(piece, [other])).toEqual(true);
        });
        it("detects collision of piece with a single point", () => {
            const piece = Piece.create({x: 5, y: 5, ...PIXEL});
            const other = Piece.create({x: 4, y: 5, ...TEST_L});
            expect(collidesWithPiece(piece, [other])).toEqual(true);
        });
        it("does not detect collision if pieces are only adjacent", () => {
            const piece = Piece.create({x: 10, y: 10, ...TEST_L});
            const other = Piece.create({x: 10, y: 7, ...TEST_L});
            expect(collidesWithPiece(piece, [other])).toEqual(false);
        });
    });

    describe("The full line manager", () => {
        it("detects if a line is not filled", () => {
            const piece1 = Piece.create({x: 0, y: 7, ...TEST_LINE});
            expect(lineFull(7, [piece1], 10)).toEqual(false);
            const piece2 = Piece.create({x: 6, y: 7, ...TEST_LINE});
            const piece3 = Piece.create({x: 4, y: 7, ...PIXEL});
            expect(lineFull(7, [piece1, piece2], 10)).toEqual(false);
            // should not detect wrong line
            const piece5 = Piece.create({x: 5, y: 6, ...PIXEL});
            expect(lineFull(7, [piece1, piece2, piece3, piece5], 10)).toEqual(false);
        });

        it("detects if a line is fully filled", () => {
            const piece1 = Piece.create({x: 0, y: 7, ...TEST_LINE});
            const piece2 = Piece.create({x: 6, y: 7, ...TEST_LINE});
            const piece3 = Piece.create({x: 4, y: 7, ...PIXEL});
            const piece4 = Piece.create({x: 5, y: 7, ...PIXEL});
            expect(lineFull(7, [piece1, piece2, piece3, piece4], 10)).toEqual(true);
        });

        it("detects if two lines are fully filled", () => {
            const piece1 = Piece.create({x: 0, y: 6, ...TEST_LINE});
            const piece2 = Piece.create({x: 6, y: 6, ...TEST_LINE});
            const piece3 = Piece.create({x: 0, y: 7, ...TEST_LINE});
            const piece4 = Piece.create({x: 6, y:


/**
 * @file dlg_load_deck_from_clipboard.h
 * @ingroup LocalDeckStorageDialogs
 * @ingroup Lobby
 * @brief TODO: Document this.
 */

#ifndef DLG_LOAD_DECK_FROM_CLIPBOARD_H
#define DLG_LOAD_DECK_FROM_CLIPBOARD_H

#include <QCheckBox>
#include <QDialog>

class DeckLoader;
class QPlainTextEdit;
class QPushButton;

/**
 * Base class for dialog windows for actions that involve loading decks from text input.
 */
class AbstractDlgDeckTextEdit : public QDialog
{
    Q_OBJECT
private:
    QPlainTextEdit *contentsEdit;
    QPushButton *refreshButton;
    QCheckBox *loadSetNameAndNumberCheckBox;

private slots:
    void refreshShortcuts();

public:
    explicit AbstractDlgDeckTextEdit(QWidget *parent = nullptr);

    /**
     * Gets the loaded deck. Only call this method after this dialog window has been successfully exec'd.
     *
     * The returned DeckLoader is parented to this object; make sure to take ownership of the DeckLoader if you intend
     * to use it, since otherwise it will get destroyed once this dlg is destroyed
     * @return The DeckLoader
     */
    virtual DeckLoader *getDeckList() const = 0;

protected:
    void setText(const QString &text);
    bool loadIntoDeck(DeckLoader *deckLoader) const;
    void keyPressEvent(QKeyEvent *event) override;

protected slots:
    virtual void actOK() = 0;
    virtual void actRefresh() = 0;
};

/**
 * Dialog window for the "Load deck from clipboard" action
 */
class DlgLoadDeckFromClipboard : public AbstractDlgDeckTextEdit
{
    Q_OBJECT
protected slots:
    void actOK() override;
    void actRefresh() override;

private:
    DeckLoader *deckList;

public:
    explicit DlgLoadDeckFromClipboard(QWidget *parent = nullptr);

    DeckLoader *getDeckList() const override
    {
        return deckList;
    }
};

/**
 * Dialog window for the "Edit deck in clipboard" action
 */
class DlgEditDeckInClipboard : public AbstractDlgDeckTextEdit
{
    Q_OBJECT
protected slots:
    void actOK() override;
    void actRefresh() override;

private:
    DeckLoader *deckLoader;
    bool annotated;

public:
    explicit DlgEditDeckInClipboard(const DeckLoader &deckList, bool _annotated, QWidget *parent = nullptr);

    DeckLoader *getDeckList() const override
    {
        return deckLoader;
    }
};

#endif


CHECK: [0x0a,0x00,0xb3,0xd0,0xf7,0x04,0x02,0x00]

v_cmpx_le_i16_e64 s[10:11], v1, v255
// CHECK: [0x0a,0x00,0xb3,0xd0,0x01,0xff,0x03,0x00]

v_cmpx_le_i16_e64 s[10:11], v1, s2
// CHECK: [0x0a,0x00,0xb3,0xd0,0x01,0x05,0x00,0x00]

v_cmpx_le_i16_e64 s[10:11], v1, s101
// CHECK: [0x0a,0x00,0xb3,0xd0,0x01,0xcb,0x00,0x00]

v_cmpx_le_i16_e64 s[10:11], v1, flat_scratch_lo
// CHECK: [0x0a,0x00,0xb3,0xd0,0x01,0xcd,0x00,0x00]

v_cmpx_le_i16_e64 s[10:11], v1, flat_scratch_hi
// CHECK: [0x0a,0x00,0xb3,0xd0,0x01,0xcf,0x00,0x00]

v_cmpx_le_i16_e64 s[10:11], v1, vcc_lo
// CHECK: [0x0a,0x00,0xb3,0xd0,0x01,0xd5,0x00,0x00]

v_cmpx_le_i16_e64 s[10:11], v1, vcc_hi
// CHECK: [0x0a,0x00,0xb3,0xd0,0x01,0xd7,0x00,0x00]

v_cmpx_le_i16_e64 s[10:11], v1, m0
// CHECK: [0x0a,0x00,0xb3,0xd0,0x01,0xf9,0x00,0x00]

v_cmpx_le_i16_e64 s[10:11], v1, exec_lo
// CHECK: [0x0a,0x00,0xb3,0xd0,0x01,0xfd,0x00,0x00]

v_cmpx_le_i16_e64 s[10:11], v1, exec_hi
// CHECK: [0x0a,0x00,0xb3,0xd0,0x01,0xff,0x00,0x00]

v_cmpx_le_i16_e64 s[10:11], v1, 0
// CHECK: [0x0a,0x00,0xb3,0xd0,0x01,0x01,0x01,0x00]

v_cmpx_le_i16_e64 s[10:11], v1, -1
// CHECK: [0x0a,0x00,0xb3,0xd0,0x01,0x83,0x01,0x00]

v_cmpx_le_i16_e64 s[10:11], v1, 0.5
// CHECK: [0x0a,0x00,0xb3,0xd0,0x01,0xe1,0x01,0x00]

v_cmpx_le_i16_e64 s[10:11], v1, -4.0
// CHECK: [0x0a,0x00,0xb3,0xd0,0x01,0xef,0x01,0x00]

v_cmpx_gt_i16 vcc, v1, v2
// CHECK: [0x01,0x05,0x68,0x7d]

v_cmpx_gt_i16 vcc, v255, v2
// CHECK: [0xff,0x05,0x68,


">See me
 * 模版请保持更新
 * ================================================
 */
interface WebviewContract {
    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
    interface View : IView {
        fun  collect(collected:Boolean)
        fun  collectUrlSucc(collected:Boolean,data:CollectUrlResponse)
    }

    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
    interface Model : IModel{
        fun collect(id:Int): Observable<ApiResponse<Any>>
        fun collectUrl(name:String,link:String): Observable<ApiResponse<CollectUrlResponse>>
        fun uncollect(id:Int): Observable<ApiResponse<Any>>
        fun uncollectList(id:Int,originId:Int): Observable<ApiResponse<Any>>
        fun uncollectUrl(id:Int): Observable<ApiResponse<Any>>
    }

}
package me.hegj.wandroid.mvp.contract.main.home.search

import com.jess.arms.mvp.IModel
import com.jess.arms.mvp.IView
import io.reactivex.Observable
import me.hegj.wandroid.mvp.model.entity.ApiResponse
import me.hegj.wandroid.mvp.model.entity.SearchResponse

/**
 * ================================================
 * Description:
 *

 * Created by MVPArmsTemplate on 08/16/2019 20:31
 * Contact me
 * Follow me
 * Star me
 * See me
 * 模版请保持更新
 * ================================================
 */
interface SearchContract {
    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
    interface View : IView {
        fun  requestSearchSucc(tagData:MutableList<SearchResponse>)
    }

    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
    interface Model : IModel{
        fun getHotData(): Observable<ApiResponse<MutableList<SearchResponse>>>
    }

}
package me.hegj.wandroid.mvp.presenter.collect

import android.app.Application

import com.jess.arms.integration.AppManager
import com.jess.arms.di.scope.FragmentScope
import com.jess.arms.mvp.BasePresenter
import com.jess.arms.http.imageloader.ImageLoader
import com.jess.arms.utils.RxLifecycleUtils
import com.trello.rxlifecycle2.android.FragmentEvent
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import me.hegj.wandroid.app.utils.HttpUtils
import me.jessyan.rxerrorhandler.core.RxErrorHandler
import javax.inject.Inject

import me.hegj.wandroid.mvp.contract.collect.CollectUrlContract
import me.hegj.wandroid.mvp.model.entity.ApiResponse
import me.hegj.wandroid.mvp.model.entity.CollectUrlResponse
import me.jessyan.rxerrorhandler.handler.ErrorHandleSubscriber
import me.jessyan.rxerrorhandler.handler.RetryWithDelay

/**
 * ================================================
 * Description:
 *

 * Created by MVPArmsTemplate on 08/31/2019 11:27
 * Contact me
 * Follow me
 * <a href="


x80, 0x42, 0xEB, 0x70 # 805e8f6c
.byte 0x80, 0x42, 0xEB, 0x5C # 805e8f70
.byte 0x80, 0x42, 0x87, 0x68 # 805e8f74
.byte 0x80, 0x42, 0x87, 0x64 # 805e8f78
.byte 0x80, 0x42, 0xEB, 0x1C # 805e8f7c
__vt__13J3DPEBlockXlu:
.byte 0x00, 0x00, 0x00, 0x00 # 805e8f80
.byte 0x00, 0x00, 0x00, 0x00 # 805e8f84
.byte 0x80, 0x42, 0x87, 0x60 # 805e8f88
.byte 0x80, 0x42, 0xC6, 0x60 # 805e8f8c
.byte 0x80, 0x42, 0x87, 0xC8 # 805e8f90
.byte 0x80, 0x42, 0x87, 0x50 # 805e8f94
.byte 0x80, 0x42, 0x87, 0xC4 # 805e8f98
.byte 0x80, 0x42, 0x87, 0xC0 # 805e8f9c
.byte 0x80, 0x42, 0x97, 0x60 # 805e8fa0
.byte 0x80, 0x42, 0xEC, 0x54 # 805e8fa4
.byte 0x80, 0x42, 0x87, 0xB8 # 805e8fa8
.byte 0x80, 0x42, 0x87, 0xBC # 805e8fac
.byte 0x80, 0x16, 0x85, 0xF0 # 805e8fb0
.byte 0x80, 0x42, 0x87, 0xB0 # 805e8fb4
.byte 0x80, 0x42, 0x87, 0xB4 # 805e8fb8
.byte 0x80, 0x42, 0x87, 0xA8 # 805e8fbc
.byte 0x80, 0x16, 0x86, 0x00 # 805e8fc0
.byte 0x80, 0x42, 0x87, 0xA4 # 805e8fc4
.byte 0x80, 0x42, 0x87, 0x9C # 805e8fc8
.byte 0x80, 0x16, 0x85, 0xFC # 805e8fcc
.byte 0x80, 0x42, 0x87, 0x98 # 805e8fd0
.byte 0x80, 0x42, 0x87, 0x90 # 805e8fd4
.byte 0x80, 0x42, 0x87, 0x88 # 805e8fd8
.byte 0x80, 0x42, 0x87, 0x8C # 805e8fdc
.byte 0x80, 0x42, 0x87, 0x80 # 805e8fe0
.byte 0x80, 0x42, 0x87, 0x78 # 805e8fe4
.byte 0x80, 0x42, 0x87, 0x7C # 805e8fe8
.byte 0x80, 0x42, 0x87, 0x70 # 805e8fec
.byte 0x80, 0x42, 0x87, 0x68 # 805e8ff0
.byte 0x80, 0x42, 0x87, 0x64 # 805e8ff4
.byte 0x80, 0x42, 0xEC, 0x14 # 805e8ff8
__vt__17J3DPEBlockTexEdge:
.byte 0x00, 0x00, 0x00, 0x00 # 805e8ffc
.byte 0x00, 0x00, 0x00, 0x00 # 805e9000
.byte 0x80, 0x42, 0x87, 0x60 #


s));
      emit(LsDirBlocSuccess(ev.account, ev.root, await _query(ev)));
    } catch (e) {
      _log.severe("[_onEventQuery] Exception while request", e);
      emit(LsDirBlocFailure(ev.account, ev.root, state.items, e));
    }
  }

  Future<List<LsDirBlocItem>> _query(LsDirBlocQuery ev) async {
    final product = <LsDirBlocItem>[];
    var files = _cache[ev.root.path];
    if (files == null) {
      final op = isListMinimal ? LsMinimal(fileRepo) : Ls(fileRepo);
      files =
          (await op(
            ev.account,
            ev.root,
          )).where((f) => f.isCollection ?? false).toList();
      _cache[ev.root.path] = files;
    }
    final removes = <File>[];
    for (final f in files) {
      try {
        List<LsDirBlocItem>? children;
        if (ev.depth > 1) {
          children = await _query(ev.copyWith(root: f, depth: ev.depth - 1));
        }
        product.add(LsDirBlocItem(f, false, children));
      } on ApiException catch (e) {
        if (e.response.statusCode == 404) {
          // this could happen when the server db contains dangling entries
          _log.warning(
            "[call] HTTP404 error while listing dir: ${logFilename(f.path)}",
          );
          removes.add(f);
        } else if (f.isCollection == true && e.response.statusCode == 403) {
          // e2ee dir
          _log.warning("[call] HTTP403 error, likely E2EE dir: ${f.path}");
          product.add(LsDirBlocItem(f, true, []));
        } else {
          rethrow;
        }
      }
    }
    if (removes.isNotEmpty) {
      files.removeWhere((f) => removes.contains(f));
    }
    return product;
  }

  final FileRepo fileRepo;
  final bool isListMinimal;

  final _cache = <String, List<File>>{};
}
import 'package:flutter/foundation.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';
import 'package:nc_photos/account.dart';
import 'package:nc_photos/di_container.dart';
import 'package:nc_photos/entity/file.dart';
import 'package:nc_photos/entity/file_descriptor.dart';
import 'package:nc_photos/entity/file_util.dart' as file_util;
import 'package:nc_photos/entity/search.dart';
import 'package:nc_photos/event/event.dart';
import 'package:nc_photos/throttler.dart';
import 'package:nc_photos/use_case/search.dart';
import 'package:np_log/np_log.dart';
import 'package:to_string/to_string.dart';

part 'search.g.dart';

abstract class SearchBlocEvent {
  const SearchBlocEvent();
}

@toString
class SearchBlocQuery extends SearchBlocEvent {
  const SearchBlocQuery(this.account, this.criteria);

  @override
  String toString() => _$toString();

  final Account account;
  final SearchCriteria criteria;
}

/// An external event has happened and may affect the state of this bloc
@toString
class _SearchBlocExternalEvent extends SearchBlocEvent {
  const _SearchBlocExternalEvent();

  @override
  String toString() => _$toString();
}

@toString
class SearchBlocResetLand