ng:calc(20px * var(--pagefind-ui-scale)) 0;display:flex;align-items:center;font-weight:700;margin-top:0}.pagefind-ui__button.svelte-1d60ae3{margin-top:calc(40px * var(--pagefind-ui-scale));border:var(--pagefind-ui-border-width) solid var(--pagefind-ui-border);border-radius:var(--pagefind-ui-border-radius);height:calc(48px * var(--pagefind-ui-scale));padding:0 calc(12px * var(--pagefind-ui-scale));font-size:calc(16px * var(--pagefind-ui-scale));color:var(--pagefind-ui-primary);background:var(--pagefind-ui-background);width:100%;text-align:center;font-weight:700;cursor:pointer}.pagefind-ui__button.svelte-1d60ae3:hover{border-color:var(--pagefind-ui-primary);color:var(--pagefind-ui-primary);background:var(--pagefind-ui-background)}
:root,::backdrop{--sl-color-white: hsl(0, 0%, 100%);--sl-color-gray-1: hsl(224, 20%, 94%);--sl-color-gray-2: hsl(224, 6%, 77%);--sl-color-gray-3: hsl(224, 6%, 56%);--sl-color-gray-4: hsl(224, 7%, 36%);--sl-color-gray-5: hsl(224, 10%, 23%);--sl-color-gray-6: hsl(224, 14%, 16%);--sl-color-black: hsl(224, 10%, 10%);--sl-hue-orange: 41;--sl-color-orange-low: hsl(var(--sl-hue-orange), 39%, 22%);--sl-color-orange: hsl(var(--sl-hue-orange), 82%, 63%);--sl-color-orange-high: hsl(var(--sl-hue-orange), 82%, 87%);--sl-hue-green: 101;--sl-color-green-low: hsl(var(--sl-hue-green), 39%, 22%);--sl-color-green: hsl(var(--sl-hue-green), 82%, 63%);--sl-color-green-high: hsl(var(--sl-hue-green), 82%, 80%);--sl-hue-blue: 234;--sl-color-blue-low: hsl(var(--sl-hue-blue), 54%, 20%);--sl-color-blue: hsl(var(--sl-hue-blue), 100%, 60%);--sl-color-blue-high: hsl(var(--sl-hue-blue), 100%, 87%);--sl-hue-purple: 281;--sl-color-purple-low: hsl(var(--sl-hue-purple), 39%, 22%);--sl-color-purple: hsl(var(--sl-hue-purple), 82%, 63%);--sl-color-purple-high: hsl(var(--sl-hue-purple), 82%, 89%);--sl-hue-red: 339;--sl-color-red-low: hsl(var(--sl-hue-red), 39%, 22%);--sl-color-red: hsl(var(--sl-hue-red), 82%, 63%);--sl-color-red-high: hsl(var(--sl-hue-red), 82%, 87%);--sl-color-accent-low: hsl(224, 54%, 20%);--sl-color-accent: hsl(224, 100%, 60%);--sl-color-accent-high: hsl(224, 100%, 85%);--sl-color-text: var(--sl-color-gray-2);--sl-color-text-accent: var(--sl-color-accent-high);--sl-color-text-invert: var(--sl-color-accent-low);--sl-color-bg: var(--sl-color-black);--sl-color-bg-nav: var(--sl-color-gray-6);


S0uNzA3IDIuMTIyLTYuNzM4IDYuNzM3LS43MDcgMi4xMjEtMS4wNCAxLjA0MSAyLjgyOCAyLjgyOSAxLjA0LTEuMDQxIDIuMTIyLS43MDcgNi43MzctNi43MzgtNC4yNDItNC4yNDJabTAgMi44MjggMS40MTQgMS40MTQtNC45NSA0Ljk1LTEuNDE0LTEuNDE0IDQuOTUtNC45NVoiLz48L3N2Zz4='>
  static const designMarkPenLine = IconData(0xe003, fontFamily: iconFontFamily, fontPackage: iconFontPackage);

  /// Font icon named "__design ink bottle line__"
  ///
  /// <image width='32px' src='data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJtMTYgOSA0LjM3MSAxLjc0OWExIDEgMCAwIDEgLjYyOS45MjhWMjFhMSAxIDAgMCAxLTEgMUg0YTEgMSAwIDAgMS0xLTF2LTkuMzIzYzAtLjQwOS4yNDktLjc3Ny42MjktLjkyOEw4IDloOFptLS4zODUgMmgtNy4yM0w1IDEyLjM1NFYyMGgxNHYtMUg4di01aDExdi0xLjY0NkwxNS42MTUgMTFaTTE2IDNhMSAxIDAgMCAxIDEgMXY0SDdWNGExIDEgMCAwIDEgMS0xaDhabS0xIDJIOXYxaDZWNVoiLz48L3N2Zz4='>
  static const designInkBottleLine = IconData(0xe004, fontFamily: iconFontFamily, fontPackage: iconFontPackage);

  /// Font icon named "__design pantone line__"
  ///
  /// <image width='32px' src='data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJtMTYuNTk1IDIuNzc0IDUuNjIgMTMuOTA4YTEgMSAwIDAgMS0uNTUzIDEuMzAyTDEyLjM5IDIxLjczYTEgMSAwIDAgMS0xLjMwMi0uNTUzTDExIDIwLjk2VjIxSDdhMSAxIDAgMCAxLTEtMXYtLjI3bC0zLjM1LTEuMzUzYTEgMSAwIDAgMS0uNTUyLTEuMzAyTDUuNzY0IDhsLS4yOTUtLjczYTEgMSAwIDAgMSAuNTUzLTEuMzAybDkuMjcyLTMuNzQ2YTEgMSAwIDAgMSAxLjMwMS41NTJabS0xLjQ3OSAxLjY3N0w3LjY5OCA3LjQ0N2w0Ljg3IDEyLjA1NCA3LjQxOC0yLjk5Ny00Ljg3LTEyLjA1M1pNOCAxMy41MzNWMTloMi4yMDlMOCAxMy41MzNabS0yLS43NzctMS42NzMgNC4xNDFMNiAxNy42MDh2LTQuODUyWm01LjIzLTQuNTc4YTEgMSAwIDAgMS0uNTUzIDEuMzAyaC0uMDAxYTEgMSAwIDEgMSAuN


(8521, "Samoa", "Lotofaga", -14.0166667, -171.5166626, 163.0),
	City::new(8522, "Samoa", "Lufilufi", -13.8500000, -171.5833282, -9999.0),
	City::new(8523, "Samoa", "Levi", -13.9166667, -172.0000000, 57.0),
	City::new(8524, "Samoa", "Sapulu", -13.8000000, -171.8833313, 28.0),
	City::new(8525, "Samoa", "Samatau", -13.9000000, -172.0333405, -9999.0),
	City::new(8526, "Samoa", "Tufulele", -13.8000000, -171.8833313, 28.0),
	City::new(8527, "Samoa", "Sapapalii", -13.6833333, -172.1166687, -9999.0),
	City::new(8528, "Samoa", "Sili", -13.7166667, -172.3500061, 232.0),
	City::new(8529, "Samoa", "Matautu", -13.9500000, -171.9333344, 83.0),
	City::new(8530, "Samoa", "Faleatiu", -13.8166667, -171.9333344, 79.0),
	City::new(8531, "Samoa", "Samalaeulu", -13.4666667, -172.2666626, -9999.0),
	City::new(8532, "Samoa", "Toamua", -13.8000000, -171.7833405, 1.0),
	City::new(8533, "Samoa", "Sagone", -13.6500000, -172.5833282, 733.0),
	City::new(8534, "Samoa", "Salepoua`e", -13.8000000, -171.8500061, 9.0),
	City::new(8535, "Samoa", "Sataua", -13.4666667, -172.6666718, -9999.0),
	City::new(8536, "Samoa", "Vaialoa", -13.7333333, -172.2833405, 98.0),
	City::new(8537, "Samoa", "Fusi", -14.0000000, -171.8000031, -9999.0),
	City::new(8538, "Samoa", "Vaigaga", -13.8166667, -171.8000031, 1.0),
	City::new(8539, "Samoa", "Lano", -13.6000000, -172.1333313, -9999.0),
	City::new(8540, "Samoa", "Saipipi", -13.6166667, -172.1333313, -9999.0),
	City::new(8541, "Samoa", "Lalomanu", -14.0000000, -171.3999939, -9999.0),
	City::new(8542, "Samoa", "Samusu", -13.9666667, -171.3666687, -9999.0),
	City::new(8543, "Samoa", "Taga", -13.7666667, -172.4666595, 59.0),
	City::new(8544, "Samoa", "Siutu", -13.6833333, -172.5500031, 640.0),
	City::new(8545, "Samoa", "Saleilua", -14.0166667, -171.6999969, 23.0),
	City::new(8546, "Samoa", "Vaisala", -13.4666667, -172.6166687, -9999.0),
	City::new(8547, "Samoa", "Patamea", -13.4833333, -172.2666626, -9999.0),
	City::new(8548, "Samoa", "Saleaula", -13.43333


ate();

    pubServe();
    requestShouldSucceed("packages/myapp/lib.dart", "foo() => 'foo';");
    requestShouldSucceed("packages/myapp/sub/lib.dart", "bar() => 'bar';");

    // "packages" can be in a subpath of the URL:
    requestShouldSucceed("foo/packages/myapp/lib.dart", "foo() => 'foo';");
    requestShouldSucceed("a/b/packages/myapp/sub/lib.dart", "bar() => 'bar';");
    endPubServe();
  });
}
// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS d.file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library pub_tests;

import '../descriptor.dart' as d;
import '../test_pub.dart';
import 'utils.dart';

main() {
  initConfig();
  integration("does not serve .dart files in release mode", () {

    d.dir("foo", [
      d.libPubspec("foo", "0.0.1"),
      d.dir("lib", [
        d.file("foo.dart",
            """
            library foo;
            foo() => 'foo';
            """)
      ])
    ]).create();

    d.dir(appPath, [
      d.appPubspec({
        "foo": {"path": "../foo"}
      }),
      d.dir("lib", [
        d.file("lib.dart", "lib() => print('hello');"),
      ]),
      d.dir("web", [
        d.file("file.dart",
            """
            import 'package:foo/foo.dart';
            main() => print('hello');
            """),
        d.dir("sub", [
          d.file("sub.dart", "main() => 'foo';"),
        ])
      ])
    ]).create();

    pubServe(shouldGetFirst: true, args: ["--mode", "release"]);
    requestShould404("file.dart");
    requestShould404("packages/myapp/lib.dart");
    requestShould404("packages/foo/foo.dart");
    requestShould404("sub/sub.dart");
    endPubServe();
  });
}
// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import "package:expect/expect.dart";

// Test the semantics of static members mixed with instance members.

// Following are relevant quotes from Dart Programming Language
// Specification, Draft Version 0.10, June 7, 2012.

// 7 Classes:

// "It is a compile-time error if a class has an instance method and a
// static member method with the same name."

// 7.1 Instance Methods:

// "Instance methods are functions (6) whose declarations are
// immediately contained within a class declaration and that are not
// declared static. The instance methods of a class C are those
// instance methods declared by C and the instance methods inherited
// by C from its superclass."

// 7.6 Static Methods

// "Static methods are functions whose declarations are immediately
// contained within a class declaration and that are declared
// static. The static methods of a class C are those static methods
// declared by C."

// 7.7 Static Variables

// "Static variables are variables whose declarations are immediately
// contained within a class declaration and that are declared
// static. The static variables of a class C are those static
// variables declared by C."

// "A static variable declaration of one of the forms static T v;,
// static T v = e; , static


/*	$NetBSD: yamon.c,v 1.14 2015/06/26 21:57:25 matt Exp $	*/

/*
 * Copyright 2002 Wasabi Systems, Inc.
 * All rights reserved.
 *
 * Written by Simon Burge for Wasabi Systems, Inc.
 *
 * 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. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *      This product includes software developed for the NetBSD Project by
 *      Wasabi Systems, Inc.
 * 4. The name of Wasabi Systems, Inc. may not be used to endorse
 *    or promote products derived from this software without specific prior
 *    written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

/* XXX move to arch/mips/yamon/yamon.c or similar? */

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: yamon.c,v 1.14 2015/06/26 21:57:25 matt Exp $");

#include <sys/param.h>
#include <sys/device.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/cpu.h>

#include <dev/cons.h>

#include <mips/locore.h>

#include <machine/yamon.h>

static int  yamongetc(dev_t);
static void yamonputc(dev_t, int);

/*
 * Default consdev, for errors or warnings before
 * consinit runs: use the PROM.
 */
struct consdev yamon_promcd = {
	NULL,		/* probe */
	NULL,		/* init */
	yamongetc,	/* getc */
	yamonputc,	/* putc */
	nullcnpollc,	/* pollc */
	NULL,		/* bell */
	makedev(0, 0),
	CN_DEAD,
};
/*
 * Get character from PROM console.
 */
static int
yamongetc(dev_t dev)
{
	char chr;

	while (!YAMON_GETCHAR(&chr))
		/* nothing */;
	return chr;
}

/*
 * Print a character on PROM console.
 */
static void
yamonputc(dev_t dev, int c)
{
	char chr;

	chr = c;
	YAMON_PRINT_COUNT(&chr, 1);
}

char *
yamon_getenv(const char *name)
{
	yamon_env_var *yev = yamon_envp;

	if (yev == NULL)
		return (NULL);
	while (yev->name != NULL) {
		if (strcmp(yev->name, name) == 0)
			return (yev->val);
		yev++;
	}

	return (NULL);
}

void
yamon_print(const char *str)
{

	YAMON_PRINT(str);
}

void
yamon_exit(uint32_t rc)
{

	YAMON_EXIT(rc);
}

/*
 * Ask YAMON for the CPU frequency.
 * If "force" is set, then use a random frequency (100MHz) so
 * that at least delay() works, even though not perfectly.
 * Return 1 if YAMON returns a CPU frequency.
 */
int
yamon_setcpufreq(int force)
{
	struct cpu_info * const ci = curcpu();
	uint32_t freq;
	int ret;

	ret = YAMON_SYSCON_READ(SYSCON_BOARD_CPU_CLOCK_FREQ_ID, &freq,
	    sizeof(freq));
	if (!force && (ret != 0 || freq == 0))
		return 0;

	if (ret != 0 || freq == 0) {
		freq = 100 * 1000 * 1000;
		ret = 0;
	} else
		ret = 1;

	ci->ci_cpu_freq = freq;
	ci->ci_cycles_per_hz = (freq + hz / 2) / hz;
	ci->ci_divisor_delay = ((freq + 500000) / 1000000);
	ci->ci_cctr_freq /= ci->ci_cpu_freq;
	if (mips_options.mips_cpu_flags & CPU_MIPS_DOUBLE_COUNT) {
		ci->ci_cycles_per_hz /= 2;
		ci->ci_divisor_delay /= 2;
		ci->ci_cctr_freq /= 2;
	}

	return ret;
}


: terminalGeneratorPoint);
    expect(terminal.isEphemeralPublicKeySet, true);
    expect(
        terminal.getPubKeyEphemeral().toBytes(),
        Uint8List.fromList(
            [...terminalEphemeralPublicKeyX, ...terminalEphemeralPublicKeyY]));

    // chip's public key
    chip.setEphemeralKeyPair(
        private: chipEphemeralPrivateKey,
        mappedGenerator: terminalGeneratorPoint);
    expect(chip.isEphemeralPublicKeySet, true);
    expect(
        chip.getPubKeyEphemeral().toBytes(),
        Uint8List.fromList(
            [...chipEphemeralPublicKeyX, ...chipEphemeralPublicKeyY]));

    //check ephemeral key pair shared secret
    ECPoint terminalEphemeralSharedSecret = terminal.getEphemeralSharedSecret(
        otherEphemeralPubKey: chip.ephemeralPublicKey);
    ECPoint chipEphemeralSharedSecret = chip.getEphemeralSharedSecret(
        otherEphemeralPubKey: terminal.ephemeralPublicKey);

    //check mapping point
    print(
        "terminalEphemeralSharedSecret (X, Y): ${ECDHPace.ecPointToList(point: terminalEphemeralSharedSecret).toBytes().hex()}");
    print(
        "chipEphemeralSharedSecret (X, Y): ${ECDHPace.ecPointToList(point: chipEphemeralSharedSecret).toBytes().hex()}");

    expect(terminalEphemeralSharedSecret, chipEphemeralSharedSecret);
    expect(
        ECDHPace.ecPointToList(point: terminalEphemeralSharedSecret)
            .toRelavantBytes(),
        ephemeralKeyPairSharedSecret);

    //checking message of step 3
    Uint8List step3terminal = PACE.generateGeneralAuthenticateDataStep2and3(
        public: terminal.getPubKeyEphemeral(), isEphemeral: true);
    Uint8List step3terminalAPDU = CommandAPDU(
            cla: ISO7816_CLA.COMMAND_CHAINING,
            ins: ISO7816_INS.GENERAL_AUTHENTICATE,
            p1: 0x00,
            p2: 0x00,
            data: step3terminal,
            ne: 256)
        .toBytes();

    expect(step3terminalAPDU, generalAuthenticateStep3MsgTerminal);

    ResponseAPDUStep2or3Pace step3Chip =
        ResponseAPDUStep2or3Pace(generalAuthenticateStep3MsgChip);
    step3Chip.parse(tokenAgreementAlgorithm: TOKEN_AGREEMENT_ALGO.ECDH);

    print(step3Chip.public.toBytes().hex());
    print(Uint8List.fromList(
        [...chipEphemeralPublicKeyX, ...chipEphemeralPublicKeyY]).hex());
    expect(
        step3Chip.public.toBytes(),
        Uint8List.fromList(
            [...chipEphemeralPublicKeyX, ...chipEphemeralPublicKeyY]));

    Uint8List seed =
        ECDHPace.ecPointToList(point: terminalEphemeralSharedSecret)
            .toRelavantBytes();
    Uint8List encKey = PACE.cacluateEncKey(
        paceProtocol: efCardAccess.paceInfo!.protocol, seed: seed);
    Uint8List macKey = PACE.cacluateMacKey(
        paceProtocol: efCardAccess.paceInfo!.protocol, seed: seed);

    print("KS-enc is ${encKey.hex()}");
    print("KS-mac is ${macKey.hex()}");

    expect(encKey, ksEnc);
    expect(macKey, ksMac);

    //authentication token calculation for terminal - IFD
    var calcInputDataTTerminal = PACE.


"fMBA9jUv/DeBOzRWMFG6sC6yk8NGG7Swea7EHKeQI40G3jgO/+xANtMyTP4C"
      + "AwJ5KgazImo+sGBl2C7CFuI+5KM4ZhbtVie7l+OiTpr5JW2z5VgnV3EX9p04"
      + "LcGKfQvD65+ELwli6yh8B2zGcipqTaYk3QoYNIhPBBgRAgAPBQJAPN8BAhsM"
      + "BQkB4TOAAAoJEJh8Njfhe8KmG7kAniuRkaFFv1pdCBN8JJXpcorHmyouAJ9L"
      + "xxmusffR6OI7WgD3XZ0AL8zUC7ACAAA=");

    char[]    pass1 = "qwertzuiop".toCharArray();

    byte[] pub2 = Base64.decode(
         "mQGiBEBtfW8RBADfWjTxFedIbGBNVgh064D/OCf6ul7x4PGsCl+BkAyheYkr"
      + "mVUsChmBKoeXaY+Fb85wwusXzyM/6JFK58Rg+vEb3Z19pue8Ixxq7cRtCtOA"
      + "tOP1eKXLNtTRWJutvLkQmeOa19UZ6ziIq23aWuWKSq+KKMWek2GUnGycnx5M"
      + "W0pn1QCg/39r9RKhY9cdKYqRcqsr9b2B/AsD/Ru24Q15Jmrsl9zZ6EC47J49"
      + "iNW5sLQx1qf/mgfVWQTmU2j6gq4ND1OuK7+0OP/1yMOUpkjjcqxFgTnDAAoM"
      + "hHDTzCv/aZzIzmMvgLsYU3aIMfbz+ojpuASMCMh+te01cEMjiPWwDtdWWOdS"
      + "OSyX9ylzhO3PiNDks8R83onsacYpA/9WhTcg4bvkjaj66I7wGZkm3BmTxNSb"
      + "pE4b5HZDh31rRYhY9tmrryCfFnU4BS2Enjj5KQe9zFv7pUBCBW2oFo8i8Osn"
      + "O6fa1wVN4fBHC6wqWmmpnkFerNPkiC9V75KUFIfeWHmT3r2DVSO3dfdHDERA"
      + "jFIAioMLjhaX6DnODF5KQrABh7QmU2FpIFB1bGxhYmhvdGxhIDxwc2FpQG15"
      + "amF2YXdvcmxkLmNvbT6wAwP//4kAVwQQEQIAFwUCQG19bwcLCQgHAwIKAhkB"
      + "BRsDAAAAAAoJEKXQf/RT99uYmfAAoMKxV5g2owIfmy2w7vSLvOQUpvvOAJ4n"
      + "jB6xJot523rPAQW9itPoGGekirABZ7kCDQRAbX1vEAgA9kJXtwh/CBdyorrW"
      + "qULzBej5UxE5T7bxbrlLOCDaAadWoxTpj0BV89AHxstDqZSt90xkhkn4DIO9"
      + "ZekX1KHTUPj1WV/cdlJPPT2N286Z4VeSWc39uK50T8X8dryDxUcwYc58yWb/"


int dataType)
	{
		return dataType == Types.CHAR || dataType == Types.LONGVARCHAR || dataType == Types.VARCHAR;
	}

	/**
	 * Returns true if dataType is a valid int data type
	 *
	 * @param dataType
	 *           data type to check
	 * @return true/false
	 */
	public static boolean isDataTypeInt(int dataType)
	{
		return dataType == Types.BIGINT || dataType == Types.INTEGER || dataType == Types.SMALLINT
			|| dataType == Types.TINYINT;
	}

	/**
	 * Returns true if dataType is a valid numeric data type
	 *
	 * @param dataType
	 *           data type to check
	 * @return true/false
	 */
	public static boolean isDataTypeNumeric(int dataType)
	{
		return dataType == Types.DECIMAL || dataType == Types.DOUBLE || dataType == Types.FLOAT
			|| dataType == Types.NUMERIC || dataType == Types.REAL;
	}

	/**
	 * Returns true if dataType is a valid date data type
	 *
	 * @param dataType
	 *           data type to check
	 * @return true/false
	 */
	public static boolean isDataTypeDate(int dataType)
	{
		return dataType == Types.DATE || dataType == Types.TIMESTAMP || dataType == Types.TIME;
	}

	/**
	 * Returns the readable data type for the given tableColumnInfo
	 *
	 * @param tableColumnInfo
	 *           data to generate the readable data type info
	 * @return readable data type info
	 */
	public static String getDataTypeForDisplay(TableColumnInfo tableColumnInfo)
	{
		StringBuilder buf = new StringBuilder();

		buf.append(tableColumnInfo.getTypeName());
		if (SmarttoolsHelper.isDataTypeString(tableColumnInfo.getDataType()))
		{
			buf.append(" (" + tableColumnInfo.getColumnSize() + ")");
		}
		else if (SmarttoolsHelper.isDataTypeNumeric(tableColumnInfo.getDataType()))
		{
			buf.append(" (" + tableColumnInfo.getColumnSize() + "," + tableColumnInfo.getDecimalDigits() + ")");
		}

		return buf.toString();
	}

	/**
	 * Check the columns data and returns found record number
	 *
	 * @param stmt
	 *           Statement to execute query
	 * @param sql
	 *           SQL-Statement for executeQuery
	 * @return number of found records
	 * @throws SQLException
	 *            SQLException
	 */
	public static int checkColumnData(Statement stmt, String sql) throws SQLException
	{
		int resultFound = 0;
		ResultSet rs = stmt.executeQuery(sql);
		if (rs.next())
		{
			resultFound = rs.getInt(1);
		}
		rs.close();
		return resultFound;
	}

	/**
	 * Mark or demark all rows in column col of table tbl
	 *
	 * @param tbl
	 *           JTable
	 * @param col
	 *           column to mark or demark
	 * @param mark
	 *           true=mark; false=demark
	 */
	public static void markAllRows(JTable tbl, int col, boolean mark)
	{
		for (int row = 0; row < tbl.getRowCount(); row++)
		{
			tbl.setValueAt(mark, row, col);
		}
	}

	/**
	 * Set the widths for the columns of table
	 *
	 * @param table
	 *           table to set the column width
	 * @param colWidth
	 *           array with the new column width
	 */
	public static void setColumnWidth(JTable table, int[] colWidth)
	{
		TableColumnModel tcm = table.getColumnModel();
		for (int col = 0; col < tcm.getColumnCount(); col++)
		{
			if (col < colWidth.length)
			{
				tcm.getColumn(col).setPreferredWidth(colWidth[col


* Specifies which referrer information to send with the link
*
* |  Chrome  | Firefox |  Safari   |  Edge  |
* | :------: | :-----: | :-------: | :----: |
* |  **Yes**  | **Yes**  |   **Yes**   | **Yes** |
*
@see https://www.w3schools.com/TAGS/att_area_referrerpolicy.asp
*/
    referrerpolicy?: string;

    /**
* `<area rel>`
*
* Specifies the relationship between the current document and the target URL
*
* |  Chrome  | Firefox |  Safari   |  Edge  |
* | :------: | :-----: | :-------: | :----: |
* |  **Yes**  | **Yes**  |   **Yes**   | **Yes** |
*
Example: <map name="planetmap">  <area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.htm" rel="alternate">   <\/map>
*
@see https://www.w3schools.com/TAGS/att_area_rel.asp
*/
    rel?: /**
     * Links to an alternate version of the document (i.e. print page, translated or mirror)
     *
     */
    | "alternate"

      /**
       * Links to the author of the document
       *
       */
      | "author"

      /**
       * Permanent URL used for bookmarking
       *
       */
      | "bookmark"

      /**
       * Links to a help document
       *
       */
      | "help"

      /**
       * Links to copyright information for the document
       *
       */
      | "license"

      /**
       * The next document in a selection
       *
       */
      | "next"

      /**
* Links to an unendorsed document, like a paid link.
 ("nofollow" is used by Google, to specify that the Google search spider should not follow that link)
*
*/
      | "nofollow"

      /**
       * Specifies that the browser should not send a HTTP referer header if the user follows the hyperlink
       *
       */
      | "noreferrer"

      /**
       * Specifies that the target document should be cached
       *
       */
      | "prefetch"

      /**
       * The previous document in a selection
       *
       */
      | "prev"

      /**
       * Links to a search tool for the document
       *
       */
      | "search"

      /**
       * A tag (keyword) for the current document
       *
       */
      | "tag";

    /**
* `<area shape>`
*
* Specifies the shape of the area
*
* |  Chrome  | Firefox |  Safari   |  Edge  |
* | :------: | :-----: | :-------: | :----: |
* |  **Yes**  | **Yes**  |   **Yes**   | **Yes** |
*
Example: <map        name="planetmap">       <area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun">       <area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury">       <area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">       <\/map>
*
@see https://www.w3schools.com/TAGS/att_area_shape.asp
*/
    shape?: /**
     * Specifies the entire region
     *
     */
    | "default"

      /**
       * Defines a rectangular region
       *
       */
      | "rect"

      /**
       * Defines a circular region
       *
       */
      | "circle"

      /**
       * Defines a polygonal region
       *
       */
      | "poly";

    /**
* `<area target>`
*
* Specifies where to open the target URL
*
* |  Chrome  | Firefox |  Safari   |  Edge  |
* | :------: | :-----: | :-------:


000b400000000008010b8000000000200400438004b1ca92c714d3015cba78ec7055fa7e9e65c68905b5f86ea3c66b0b1391bc01b00e6fe71e");

    byte[] serializedCell1 = c1.toBoc(true);
    log.info("c1 hex {}", Utils.bytesToHex(serializedCell1));
    Cell dc1 = CellBuilder.beginCell().fromBoc(serializedCell1).endCell();
    log.info("c1 deserialized");
    log.info(dc1.print());
    log.info("dc1 hex: {}", Utils.bytesToHex(dc1.toBoc(true)));

    assertThat(Utils.bytesToHex(serializedCell1)).isEqualTo(Utils.bytesToHex(dc1.toBoc(true)));
    assertThat(Utils.bytesToHex(serializedCell1)).isEqualTo(dc1.toHex(true));
    assertThat(serializedCell1).isEqualTo(dc1.toBoc(true));

    Cell c6 = CellBuilder.beginCell().storeCell(c1).endCell();
    assertThat(Utils.bytesToHex(serializedCell1)).isEqualTo(c6.toHex(true));
    assertThat(serializedCell1).isEqualTo(c6.toBoc(true));
    assertThat(c1.toBoc(true)).isEqualTo(dc1.toBoc(true));
    assertThat(c1.toBoc(true))
        .isEqualTo(CellBuilder.beginCell().fromBoc(dc1.toBoc(true)).endCell().toBoc(true));

    byte[] serializedCell2 = c1_more.toBoc(true);
    log.info("serializedCell2 hex {}", Utils.bytesToHex(serializedCell1));
    Cell dc2 = CellBuilder.beginCell().fromBoc(serializedCell2).endCell();
    assertThat(CellSlice.beginParse(dc2).loadRef().bits.toString()).isEqualTo(c2.bits.toString());
    assertThat(dc2.refs.get(1).bits.toString()).isEqualTo(c4.bits.toString());
    assertThat(dc2.refs.get(0).refs.get(0).bits.toString()).isEqualTo(c3.bits.toString());
    assertThat(dc2.refs.get(0).refs.get(0).refs.get(0).bits.toString())
        .isEqualTo(c5.bits.toString());
  }

  @Test
  public void testBocDeserializationNew() {
    CellBuilder cb = CellBuilder.beginCell();
    cb.storeUint(42, 7);
    Cell c2 = cb.endCell();
    byte[] serializedCell2 = c2.toBoc(true);

    log.info(c2.print());
    log.info(Utils.bytesToHex(serializedCell2));
    log.info(c2.bitStringToHex());

    assertThat(c2.bitStringToHex()).isEqualTo("55_");
    assertThat(c2.toBitString()).isEqualTo("0101010");
    assertThat(Utils.bytesToHex(serializedCell2)).isEqualTo("b5ee9c72410101010003000001558501ef11");

    Cell dc2 = CellBuilder.beginCell().fromBoc(serializedCell2).endCell();
    log.info("dc2 bitString {}", dc2.bits.toBitString());
    log.info("dc2 hex       {}", dc2.bits.toHex());
    assertThat(dc2.toBitString()).isEqualTo("0101010"); // bad 101010101
    assertThat(dc2.bitStringToHex()).isEqualTo("55_"); // bad 000155
  }

  @Test
  public void testCellUintsOld() {
    CellBuilder cb = CellBuilder.beginCell();
    cb.storeUint(42, 7);
    Cell c2 = cb.endCell();
    byte[] serializedCell2 = c2.toBoc(true);

    log.info(c2.print());
    log.info(Utils.bytes


errors"
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"strings"
	"time"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/ginkgo/extensions/table"
	. "github.com/onsi/gomega"
	. "github.com/onsi/gomega/types"
)

func getFullPath(relPath ...string) string {
	wd, _ := os.Getwd()
	return filepath.Join(wd, filepath.Join(relPath...))
}

var _ = Describe("FSOPS", func() {

	var _ = Describe("CreateDir", func() {

		AfterEach(func() {
			os.RemoveAll(getFullPath("testdata", "level2", "result"))
		})

		var _ = DescribeTable("CreateDir", func(dirPath string) {

			Ω(CreateDirIfNotExist(dirPath)).Should(Succeed())
		},
			Entry("Sanity", getFullPath("testdata", "level2", "result")),
			Entry("DirectoryExists", getFullPath("testdata", "level2", "level3")),
		)
		It("Fails because file with the same name exists", func() {
			Ω(CreateDirIfNotExist(getFullPath("testdata", "level2", "result"))).Should(Succeed())
			file, err := os.Create(getFullPath("testdata", "level2", "result", "file"))
			Ω(err).Should(Succeed())
			Ω(file.Close()).Should(Succeed())
			Ω(CreateDirIfNotExist(getFullPath("testdata", "level2", "result", "file"))).Should(HaveOccurred())
		})
	})

	var _ = Describe("Archive", func() {
		var targetFilePath = getFullPath("testdata", "arch.mbt")

		BeforeEach(func() {
			fileInfoProvider = &mockFileInfoProvider{}
		})

		AfterEach(func() {
			fileInfoProvider = &standardFileInfoProvider{}
			Ω(os.RemoveAll(targetFilePath)).Should(Succeed())
		})

		var _ = DescribeTable("Archive", func(source, target string, ignore []string, fails bool, expectedFiles []string) {
			err := Archive(source, target, ignore)
			if fails {
				Ω(err).Should(HaveOccurred())
			} else {
				Ω(err).Should(Succeed())
				Ω(target).Should(BeAnExistingFile())
				validateArchiveContents(expectedFiles, target)
			}
		},
			Entry("Sanity",
				getFullPath("testdata", "mtahtml5"), targetFilePath, nil, false, []string{
					"mta.sh", "mta.yaml",
					"ui5app/", "ui5app/Gruntfile.js",
					"ui5app/webapp/", "ui5app/webapp/Component.js", "ui5app/webapp/abc.jar", "ui5app/webapp/index.html",
					"ui5app/webapp/controller/", "ui5app/webapp/controller/View1.controller.js",
					"ui5app/webapp/css/", "ui5app/webapp/css/style.css",
					"ui5app/webapp/i18n/", "ui5app/webapp/i18n/i18n.properties",
					"ui5app/webapp/model/", "ui5app/webapp/model/models.js",
					"ui5app/webapp/view/", "ui5app/webapp/view/View1.view.xml",
				}),
			Entry("Target is folder",
				getFullPath("testdata", "mtahtml5"), getFullPath("testdata"), nil, true, nil),
			Entry("Source is broken symbolic link",
				getFullPath("testdata", "testsymlink", "symlink_broken"), targetFilePath, nil, true, nil),
			Entry("Sanity - ignore folder",
				getFullPath("testdata", "test


(`time_by_day`.`quarter` = 'Q1' and `time_by_day`.`the_year` = 1997) "
            + "or (`time_by_day`.`month_of_year` = 4 and `time_by_day`.`quarter` = 'Q2' "
            + "and `time_by_day`.`the_year` = 1997))";
        SqlPattern mySqlPattern =
            new SqlPattern(Dialect.DatabaseProduct.MYSQL, sql, sql.length());
        assertQuerySql(context, mdx, new SqlPattern[]{mySqlPattern});
    }
}

// End SqlQueryTest.java
/*! ******************************************************************************
 *
 * Pentaho
 *
 * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com
 *
 * Use of this software is governed by the Business Source License included
 * in the LICENSE.TXT file.
 *
 * Change Date: 2029-07-20
 ******************************************************************************/

package mondrian.test.clearview;

import mondrian.olap.MondrianProperties;
import mondrian.test.DiffRepository;
import mondrian.util.Bug;

import junit.framework.TestSuite;

/**
 * SummaryTest is a test suite which tests scenarios of
 * summing unit sales against the FoodMart database.
 * MDX queries and their expected results are maintained separately in
 * SummaryTest.ref.xml file.If you would prefer to see them as inlined
 * Java string literals, run ant target "generateDiffRepositoryJUnit" and
 * then use file SummaryTestJUnit.java which will be generated in
 * this directory.
 *
 * @author Khanh Vu
 */
public class SummaryTest extends ClearViewBase {

    public SummaryTest() {
        super();
    }

    public SummaryTest(String name) {
        super(name);
    }

    public DiffRepository getDiffRepos() {
        return getDiffReposStatic();
    }

    private static DiffRepository getDiffReposStatic() {
        return DiffRepository.lookup(SummaryTest.class);
    }

    public static TestSuite suite() {
        return constructSuite(getDiffReposStatic(), SummaryTest.class);
    }

    @Override
    protected void runTest() throws Exception {
        if (!Bug.BugMondrian785Fixed
            && (getName().equals("testRankExpandNonNative")
                || getName().equals("testCountExpandNonNative")
                || getName().equals("testCountOverTimeExpandNonNative"))
            && MondrianProperties.instance().EnableNativeCrossJoin.get())
        {
            // Tests give wrong results if native crossjoin is disabled.
            return;
        }
        if (!Bug.BugMondrian2452Fixed
            && (getName().equals("testRankExpandNonNative"))
            && !MondrianProperties.instance().EnableNativeCrossJoin.get())
        {
            // Tests give wrong results if native crossjoin is disabled.
            return;
        }
        super.runTest();
    }
}

// End SummaryTest.java
/*! ******************************************************************************
 *
 * Pentaho
 *
 * Copyright (C) 2024 by Hitachi Vantara, LLC : http://www.pentaho.com
 *
 * Use of this software is governed by the Business Source License included
 * in the LICENSE.TXT file.
 *
 * Change Date: 2029-07-20
 ******************************************************************************/

package mondrian.test.clearview;

import mondrian.test.DiffRepository;

import junit.framework.TestSuite;

/**
 * OrderTest tests the extended syntax of Order
 * function. See { @link
 * http://pub.eigenbase.org/wiki/MondrianOrderFunctionExtension } for


实例
      * 语句上下文可以引用模板自身上下文中的属性，就把模板的$event对象、模板输入变量和模板引用变量
      *
      * HTML attribute 和 DOM property 之间的区别
      * attribute 是由HTML定义的。 property是由DOM定义的
      * attribute初始化DOM property, 然后它们的任务就完成了。property的值可以改变；attribute的值不能改变
      *
      * 模板绑定是通过property和事件来工作的，而不是attribute
      * 在Angular的世界中，attribute唯一的作用是用来初始化元素和指令的状态。当进行数据绑定时，只是在与元素和指令的property
      * 和事件打交道
      *
      * 绑定目标
      * 数据绑定的目标是DOM中的某些东西。这个目标可能是（元素|组件|指令的）property、（元素|组件|指令的）事件
      * 或（极少数的情况下）attribute名
      *
      * 属性绑定还是插值
      * 在多数情况下，插值是更方便的备选项 但数据类型不是字符串时，就必须使用属性绑定了
      *
      * attribute绑定 [attr.colspan]
      *
      * 为目标事件设置事件处理器 绑定会通过名收$event 的事件对象传递关于此事件的信息（包括数据值）
      * 如果目标事件是原生DOM元素事件，$event就是DOM事件对象，它有像target和target.value这样的属性
      *
      * 使用ngModel时必须导入ForsModule并把它添加到NgModule的imports列表中
      *
      * 属性型指令  结构型指令
      * 给结构型指令加上（*）前缀
      * 用<ng-container>对元素进行分组
      * 一个元素应用一个结构型指令
      * ngIf表达式为假时 NgIf会从DOM中元素级其子元素
      * 可以防止空指针错误
      *
      * ngFor 指令上下文中的index属性返回一个从零开始的索引，表示当前条目在迭代中的须序
      * index: number：可迭代对象中当前条目的索引。
      first: boolean：如果当前条目是可迭代对象中的第一个条目则为 true。
      last: boolean：如果当前条目是可迭代对象中的最后一个条目则为 true。
      even: boolean：如果当前条目在可迭代对象中的索引号为偶数则为 true。
      odd: boolean：如果当前条目在可迭代对象中的索引号为奇数则为 true。

      trackBy   ngFor的性能优化 后面跟一个方法面（不传参数 内置 index和item）方法返回一个item的属性
      angular后面就检测item的这个属性改变没有 有改变才去刷新dom

      ngSwitch指令它可以从多个可能的元素中根据switch条件来显某一个。Angular只会把选中的元素放进DOM中
      ngSwitch ngSwitchCase ngSwi


mov r1, #0x0
	cmp r4, #0x0
	ble _0201404A
	ldr r3, [r0, #0x8]
	add r2, r3, #0x0
_02014032:
	ldr r0, [r2, #0x0]
	cmp r0, #0x0
	bne _02014042
	mov r0, #0x28
	mul r0, r1
	add r0, r3, r0
	pop {r3-r4}
	bx lr
_02014042:
	add r1, r1, #0x1
	add r2, #0x28
	cmp r1, r4
	blt _02014032
_0201404A:
	mov r0, #0x0
	pop {r3-r4}
	bx lr

	thumb_func_start sub_02014050
sub_02014050: ; 0x02014050
	push {r3-r4}
	ldr r4, [r0, #0x4]
	mov r1, #0x0
	cmp r4, #0x0
	ble _02014076
	ldr r3, [r0, #0x10]
	add r2, r3, #0x0
_0201405E:
	ldr r0, [r2, #0x0]
	cmp r0, #0x0
	bne _0201406E
	mov r0, #0x18
	mul r0, r1
	add r0, r3, r0
	pop {r3-r4}
	bx lr
_0201406E:
	add r1, r1, #0x1
	add r2, #0x18
	cmp r1, r4
	blt _0201405E
_02014076:
	mov r0, #0x0
	pop {r3-r4}
	bx lr

	thumb_func_start sub_0201407C
sub_0201407C: ; 0x0201407C
	push {r3, lr}
	ldr r3, _0201408C ; =NNS_GfdDefaultFuncAllocTexVram
	mov r1, #0x0
	ldr r0, [r0, #0x10]
	ldr r3, [r3, #0x0]
	add r2, r1, #0x0
	blx r3
	pop {r3, pc}
	.balign 4
_0201408C: .word NNS_GfdDefaultFuncAllocTexVram

	thumb_func_start sub_02014090
sub_02014090: ; 0x02014090
	push {r3, lr}
	ldr r3, _020140A0 ; =NNS_GfdDefaultFuncAllocPlttVram
	mov r1, #0x0
	ldr r3, [r3, #0x0]
	lsl r0, r0, #0x5
	add r2, r1, #0x0
	blx r3
	pop {r3, pc}
	.balign 4
_020140A0: .word NNS_GfdDefaultFuncAllocPlttVram

	thumb_func_start sub_020140A4
sub_020140A4: ; 0x020140A4
	push {r3, lr}
	lsl r1, r1, #0x10
	add r3, r2, #0x0
	lsr r1, r1, #0xd
	mov r2, #0x0
	bl NNS_G2dLoadImage2DMapping
	pop {r3, pc}

	thumb_func_start sub_020140B4
su


d {
		if res.Body != nil {
			res.Body.Close()
		}
		return nil, &googleapi.Error{
			Code:   res.StatusCode,
			Header: res.Header,
		}
	}
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, err
	}
	ret := &Creative{
		ServerResponse: googleapi.ServerResponse{
			Header:         res.Header,
			HTTPStatusCode: res.StatusCode,
		},
	}
	target := &ret
	if err := gensupport.DecodeResponse(target, res); err != nil {
		return nil, err
	}
	return ret, nil
	// {
	//   "description": "Inserts a new creative.",
	//   "flatPath": "userprofiles/{profileId}/creatives",
	//   "httpMethod": "POST",
	//   "id": "dfareporting.creatives.insert",
	//   "parameterOrder": [
	//     "profileId"
	//   ],
	//   "parameters": {
	//     "profileId": {
	//       "description": "User profile ID associated with this request.",
	//       "format": "int64",
	//       "location": "path",
	//       "required": true,
	//       "type": "string"
	//     }
	//   },
	//   "path": "userprofiles/{profileId}/creatives",
	//   "request": {
	//     "$ref": "Creative"
	//   },
	//   "response": {
	//     "$ref": "Creative"
	//   },
	//   "scopes": [
	//     "https://www.googleapis.com/auth/dfatrafficking"
	//   ]
	// }

}

// method id "dfareporting.creatives.list":

type CreativesListCall struct {
	s            *Service
	profileId    int64
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context
	header_      http.Header
}

// List: Retrieves a list of creatives, possibly filtered. This method
// supports paging.
//
// - profileId: User profile ID associated with this request.
func (r *CreativesService) List(profileId int64) *CreativesListCall {
	c := &CreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.profileId = profileId
	return c
}

// Active sets the optional parameter "active": Select only active
// creatives. Leave blank to select active and inactive creatives.
func (c *CreativesListCall) Active(active bool) *CreativesListCall {
	c.urlParams_.Set("active", fmt.Sprint(active))
	return c
}

// AdvertiserId sets the optional parameter "advertiserId": Select only
// creatives with this advertiser ID.
func (c *CreativesListCall) AdvertiserId(advertiserId int64) *CreativesListCall {
	c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
	return c
}

// Archived sets the optional parameter "archived": Select only archived
// creatives. Leave blank to select archived and unarchived creatives.
func (c *CreativesListCall) Archived(archived bool) *CreativesListCall {
	c.urlParams_.Set("archived", fmt.Sprint(archived))
	return c
}

// CampaignId sets the optional parameter "campaignId": Select only
// creatives with this campaign ID.
func (c *CreativesListCall) CampaignId(campaignId int64) *CreativesListCall {
	c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
	return c
}

// CompanionCreativeIds sets the optional parameter
// "companionCreativeIds": Select only in-stream


/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>

  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
  arising from the use of this software.

  Permission is granted to anyone to use this software for any purpose,
  including commercial applications, and to alter it and redistribute it
  freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not
     claim that you wrote the original software. If you use this software
     in a product, an acknowledgment in the product documentation would be
     appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be
     misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.
*/
#ifndef SDL_dataqueue_h_
#define SDL_dataqueue_h_

/* this is not (currently) a public API. But maybe it should be! */

struct SDL_DataQueue;
typedef struct SDL_DataQueue SDL_DataQueue;

SDL_DataQueue *SDL_CreateDataQueue(const size_t packetlen, const size_t initialslack);
void SDL_DestroyDataQueue(SDL_DataQueue *queue);
void SDL_ClearDataQueue(SDL_DataQueue *queue, const size_t slack);
int SDL_WriteToDataQueue(SDL_DataQueue *queue, const void *data, const size_t len);
size_t SDL_ReadFromDataQueue(SDL_DataQueue *queue, void *buf, const size_t len);
size_t SDL_PeekIntoDataQueue(SDL_DataQueue *queue, void *buf, const size_t len);
size_t SDL_GetDataQueueSize(SDL_DataQueue *queue);
SDL_mutex *SDL_GetDataQueueMutex(SDL_DataQueue *queue);  /* don't destroy this, obviously. */

#endif /* SDL_dataqueue_h_ */


 Class2a.getter2:int?*/

  /*member: Class2a.setter1=:int*/
  /*member: Class2a.setter2=:int?*/

  /*member: Class2a.field1:int*/
  /*member: Class2a.field1=:int*/

  /*member: Class2a.field2:int?*/
  /*member: Class2a.field2=:int?*/

  /*member: Class2a.field3:int*/
  /*member: Class2a.field3=:int*/

  /*member: Class2a.field4:int?*/
  /*member: Class2a.field4=:int?*/

  /*member: Class2a.field5:int*/
  /*member: Class2a.field5=:int*/

  /*member: Class2a.field6:int?*/
  /*member: Class2a.field6=:int?*/

  /*member: Class2a.property1:int*/
  /*member: Class2a.property1=:int*/

  /*member: Class2a.property2:int?*/
  /*member: Class2a.property2=:int?*/

  /*member: Class2a.property3:int*/
  /*member: Class2a.property3=:int*/

  /*member: Class2a.property4:int?*/
  /*member: Class2a.property4=:int?*/
}

/*class: Class2b:Class2b,Interface,LegacyClass,Object*/
/*cfe|cfe:builder.member: Class2b.toString:String Function()*/
/*cfe|cfe:builder.member: Class2b.runtimeType:Type*/
/*cfe|cfe:builder.member: Class2b._simpleInstanceOf:bool Function(dynamic)*/
/*cfe|cfe:builder.member: Class2b._instanceOf:bool Function(dynamic, dynamic, dynamic)*/
/*cfe|cfe:builder.member: Class2b.noSuchMethod:dynamic Function(Invocation)*/
/*cfe|cfe:builder.member: Class2b._identityHashCode:int*/
/*cfe|cfe:builder.member: Class2b.hashCode:int*/
/*cfe|cfe:builder.member: Class2b._simpleInstanceOfFalse:bool Function(dynamic)*/
/*cfe|cfe:builder.member: Class2b._simpleInstanceOfTrue:bool Function(dynamic)*/
/*cfe|cfe:builder.member: Class2b.==:bool* Function(dynamic)**/
class Class2b extends LegacyClass implements Interface {
  /*member: Class2b.method1:int Function()*/
  int method1() => 0;

  /*member: Class2b.method2:int? Function()*/
  int? method2() => 0;

  /*member: Class2b.method3a:int Function(int, int)*/
  int method3a(int a, int b) => 0;

  /*member: Class2b.method3b:int Function(int, [int])*/
  int method3b(int a, [int b = 0]) => 0;

  /*member: Class2b.method3c:int Function([int, int])*/
  int method3c([int a = 0, int b = 0]) => 0;

  /*member: Class2b.method4a:int? Function(int?, int?)*/
  int? method4a(int? a, int? b) => 0;

  /*member: Class2b.method4b:int? Function(int?, [int?])*/
  int? method4b(int? a, [int? b]) => 0;

  /*member: Class2b.method4c:int? Function([int?, int?])*/
  int? method4c([int? a, int? b]) => 0;

  /*member: Class2b.method5a:int Function(int, {int b})*/
  int method5a(int a, {int b = 0}) => 0;

  /*member: Class2b.method5b:int Function({int a, int b})*/
  int method5b({int a = 0, int b = 0}) => 0;


.8v50.7H259.4V196zM248 43.2c60.3 0 114.8 25 153.6 65.2H202.5V190H45.1C73.1 104.8 153.4 43.2 248 43.2zm0 427.1c-117.9 0-213.6-95.6-213.6-213.5 0-21.2 3.1-41.8 8.9-61.1L87.1 252h114.7v196.8h64.6V253h83.3v-62.7h-83.2v-19.2h145.6v-50.8c30.8 37 49.3 84.6 49.3 136.5.1 117.9-95.5 213.5-213.4 213.5zM178.8 275l-11-21.4 1.7 24.5-23.7 3.9 23.8 5.9-3.7 23.8 13-20.9 21.5 10.8-15.8-18.8 16.9-17.1z"],trello:[448,512,[],"f181","M392.3 32H56.1C25.1 32 0 57.1 0 88c-.1 0 0-4 0 336 0 30.9 25.1 56 56 56h336.2c30.8-.2 55.7-25.2 55.7-56V88c.1-30.8-24.8-55.8-55.6-56zM197 371.3c-.2 14.7-12.1 26.6-26.9 26.6H87.4c-14.8.1-26.9-11.8-27-26.6V117.1c0-14.8 12-26.9 26.9-26.9h82.9c14.8 0 26.9 12 26.9 26.9v254.2zm193.1-112c0 14.8-12 26.9-26.9 26.9h-81c-14.8 0-26.9-12-26.9-26.9V117.2c0-14.8 12-26.9 26.8-26.9h81.1c14.8 0 26.9 12 26.9 26.9v142.1z"],tripadvisor:[576,512,[],"f262","M528.91,178.82,576,127.58H471.66a326.11,326.11,0,0,0-367,0H0l47.09,51.24A143.911,143.911,0,0,0,241.86,390.73L288,440.93l46.11-50.17A143.94,143.94,0,0,0,575.88,285.18h-.03A143.56,143.56,0,0,0,528.91,178.82ZM144.06,382.57a97.39,97.39,0,1,1,97.39-97.39A97.39,97.39,0,0,1,144.06,382.57ZM288,282.37c0-64.09-46.62-119.08-108.09-142.59a281,281,0,0,1,216.17,0C334.61,163.3,288,218.29,288,282.37Zm143.88,100.2h-.01a97.405,97.405,0,1,1,.01,0ZM144.06,234.12h-.01a51.06,51.06,0,1,0,51.06,51.06v-.11A51,51,0,0,0,144.06,234.12Zm287.82,0a51.06,51.06,0,1,0,51.06,51.06A51.06,51.06,0,0,0,431.88,234.12Z"],tumblr:[320,512,[],"f173","M309.8 480.3c-13.6 14.5-50 31.7-97.4 31.7-120.8 0-147-88.8-147-140.6v-144H17.9c-5.5 0-10-4.5-10-10v


.email },
            'secret-key-teste',
            {
            subject: user.id,
            expiresIn: '1d'
            }
        );

        return token;
    }

}

export { AutenticaUserService };import {expect} from 'chai';
import {
    divideBy,
    halfTheLast,
    isLastHigherThan5,
    last,
} from './maybe';
import {Maybe} from 'tsmonad';

describe('last', () => {
    it('should return a Maybe', () => {
        const sut = last([]);
        expect(Maybe.isNothing(sut) || Maybe.isJust(sut)).to.be.true;
    });

    it('should return the last element', () => {
        expect(last([1, 2, 3]).equals(Maybe.just(3))).to.be.true;
    });

    it('should return Nothing if array is empty', () => {
        expect(last([]).equals(Maybe.nothing())).to.be.true;
    });

    it('should return Nothing if no array given', () => {
        expect((last as any)().equals(Maybe.nothing())).to.be.true;
    });
});

describe('isLastHigherThan5', () => {
    it('should return true if last is higher than 5', () => {
        expect(isLastHigherThan5([1,7])).to.be.true;
    });

    it('should return true if last is 5', () => {
        expect(isLastHigherThan5([5])).to.be.true;
    });

    it('should return false if last is lesser than 5', () => {
        expect(isLastHigherThan5([9,4])).to.be.false;
    });

    it('should return false if array is empty', () => {
        expect(isLastHigherThan5([])).to.be.false;
    });

    it('should return false if no array given', () => {
        expect((isLastHigherThan5 as any)()).to.be.false;
    });
});

describe('divideBy', () => {
    it('should return a maybe', () => {
        const sut = divideBy(2, 1);
        expect(Maybe.isNothing(sut) || Maybe.isJust(sut)).to.be.true;
    });

    it('should be curried', () => {
        expect(divideBy(2)(4).equals(divideBy(2, 4))).to.be.true;
    });

    it('should return the division, if any', () => {
        expect(divideBy(5, 10).valueOr(null)).to.equal(2);
    });

    it('should return Nothing if trying to divide by zero', () => {
        expect(divideBy(0, 10).equals(Maybe.nothing())).to.be.true;
    });
});

describe('halfTheLast', () => {
    it('should return a maybe', () => {
        const sut = halfTheLast([4]);
        expect(Maybe.isNothing(sut) || Maybe.isJust(sut)).to.be.true;
    });

    it('should return half the last, if any', () => {
        expect(halfTheLast([1, 3, 4]).valueOr(null)).to.equal(2);
    });

    it('should return Nothing, if no last item', () => {
        expect(halfTheLast([]).equals(Maybe.nothing())).to.be.true;
    });
});
import { module, test } from 'qunit';

import { setupTest } from 'ember-qunit';

import Model, { attr, belongsTo, hasMany } from '@ember-data/model';
import { graphFor, RecordData } from '@ember-data/record-data/-private';
import Store from '@ember-data/store';
import { recordDataFor } from '@ember-data/store/-private';

module('Integration | Graph | Edges', function (hooks) {
  setupTest(hooks);

  let store;
  let graph;
  hooks.beforeEach(function () {
    const { owner } = this;
    owner.register('service:store', Store);
    store = owner.lookup('service:store');
    graph = graphFor(store);
  });

  module('Lazy instantiation of RecordData', function () {
    /**
     * Tests in this module affirm that the relationship graph does not
     * unnecessarily force materialization of RecordData instances. This
     * allows for us to manage the state of a relationship purely from
     * knowledge derived from


c inline uint8_t mavlink_msg_flexifunction_directory_ack_get_target_system(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  2);
}

/**
 * @brief Get field target_component from flexifunction_directory_ack message
 *
 * @return Component ID
 */
static inline uint8_t mavlink_msg_flexifunction_directory_ack_get_target_component(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  3);
}

/**
 * @brief Get field directory_type from flexifunction_directory_ack message
 *
 * @return 0=inputs, 1=outputs
 */
static inline uint8_t mavlink_msg_flexifunction_directory_ack_get_directory_type(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  4);
}

/**
 * @brief Get field start_index from flexifunction_directory_ack message
 *
 * @return index of first directory entry to write
 */
static inline uint8_t mavlink_msg_flexifunction_directory_ack_get_start_index(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  5);
}

/**
 * @brief Get field count from flexifunction_directory_ack message
 *
 * @return count of directory entries to write
 */
static inline uint8_t mavlink_msg_flexifunction_directory_ack_get_count(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  6);
}

/**
 * @brief Get field result from flexifunction_directory_ack message
 *
 * @return result of acknowledge, 0=fail, 1=good
 */
static inline uint16_t mavlink_msg_flexifunction_directory_ack_get_result(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  0);
}

/**
 * @brief Decode a flexifunction_directory_ack message into a struct
 *
 * @param msg The message to decode
 * @param flexifunction_directory_ack C-struct to decode the message contents into
 */
static inline void mavlink_msg_flexifunction_directory_ack_decode(const mavlink_message_t* msg, mavlink_flexifunction_directory_ack_t* flexifunction_directory_ack)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    flexifunction_directory_ack->result = mavlink_msg_flexifunction_directory_ack_get_result(msg);
    flexifunction_directory_ack->target_system = mavlink_msg_flexifunction_directory_ack_get_target_system(msg);
    flexifunction_directory_ack->target_component = mavlink_msg_flexifunction_directory_ack_get_target_component(msg);
    flexifunction_directory_ack->directory_type = mavlink_msg_flexifunction_directory_ack_get_directory_type(msg);
    flexifunction_directory_ack->start_index = mavlink_msg_flexifunction_directory_ack_get_start_index(msg);
    flexifunction_directory_ack->count = mavlink_msg_flexifunction_directory_ack_get_count(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN? msg->len : MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN;
        memset(flexifunction_directory_ack, 0, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN);
    memcpy(flexifunction_directory_ack, _MAV_PAYLOAD(msg), len);
#endif
}


离了ViewPager和非ViewPager的情况，并处理数据增加减少时，notifyDataChange()导致布局混乱的问题
-  v1.291: 修复notifyDataChange部分场景不起作用的问题，小重构了参数配置
-  v1.29 : 修复添加了tabWidth，round和res第一次不起作用的问题
-  v1.28 : 1. 修复底部条跳动的问题；2. 修复TabColorText不能设置padding的问题
-  v1.27 : 修复 tab_color 不起作用的问题
-  v1.26 : 增加 ViewPager2
....

## QQ群
为方便大家交流，创建了一个qq群，群号216618259

## 如果该项目对您有帮助，赞赏一下吧 ^_^

    赞赏名单
    方式

     *头
    微信

     *变
    微信

## 参考

本工程参考以下优秀项目：

[鸿洋的 flowLayout](https://github.com/hongyangAndroid/FlowLayout)

[Flyco的 TabLayout](https://github.com/H07000223/FlycoTabLayout)

你是否有遇到这样的问题，每次开发一个新的项目，在 viewpager 这一块上，总是在做重复的东西，比如app引导页，轮播图，
viewpager+fragment 的 tab 指示器等等，这些虽然简单，但却是每个app都要的，而且很耗时，有没有每次在写这个，都很无语的感觉呢？
基于这个，ViewPagerHleper 就诞生了，它可以快速帮你搞定 banner 轮播图，实现高级定制化，内置多种指示器，满足你的日常需求，妈妈再也不用担心我不会复制粘贴了。

[![](https://jitpack.io/v/LillteZheng/ViewPagerHelper.svg)](https://jitpack.io/#LillteZheng/ViewPagerHelpe)
![](https://img.shields.io/github/stars/LillteZheng/ViewPagerHelper.svg)
![](https://img.shields.io/github/forks/LillteZheng/ViewPagerHelper.svg)
[![](https://img.shields.io/badge/%E4%BD%9C%E8%80%85-%E9%83%91%E5%B0%91%E9%94%90-green.svg)](https://blog.csdn.net/u011418943)

**工程实际使用 - 玩Android 客户端 : https://github.com/LillteZheng/WanAndroid**

**注意注意注意！！！**
**提问题的时候，请遵循以下标准**

- **现象: 操作步骤


      backgroundColor != oldDelegate.backgroundColor ||
      borderColor != oldDelegate.borderColor;

  @override
  bool shouldRebuildSemantics(_UpDownCaretsPainter oldDelegate) => false;
}

class NativeDropdownItem<T> {
  final String label;
  final T value;
  final bool enabled;
  final bool isDivider;

  const NativeDropdownItem({
    required this.label,
    required this.value,
    this.enabled = true,
    this.isDivider = false,
  });
}
part of '../cli.dart';

class _CliConvertToIco {
  /// Converts an image file to ICO format using ImageMagick
  ///
  /// The input file can be any image format supported by ImageMagick
  /// The output will be an ICO file with multiple sizes (16, 32, 48, 64, 128, 256, 512)
  Future<String?> convertToIco(String inputPath,
      {void Function(double)? onProgress}) async {
    logger.log('=== Starting ICO Conversion Process ===');
    logger.log('Input path: $inputPath');

    if (await dropChannel.isProcessRunning()) {
      logger.log('⚠ Process conflict: Another conversion process is running');
      throw Exception('Another process is already running');
    }

    final outputPath =
        cli._getUniqueFilePath(inputPath, suffix: '', inputExtension: 'ico');
    logger.log('Generated output path: $outputPath');

    final args = [
      inputPath,
      '-define',
      'icon:auto-resize=16,32,48,64,128,256,512',
      outputPath
    ];

    try {
      logger.log('🚀 Launching ImageMagick process...');
      logger.log('ImageMagick command arguments: ${args.join(" ")}');

      final result = await cli.run('magick', args);

      if (result.exitCode != 0) {
        logger.log('❌ Process failed with exit code: ${result.exitCode}');
        throw Exception(
            'ImageMagick process failed with exit code: ${result.exitCode}');
      }

      // Call progress callback with completion
      if (onProgress != null) {
        onProgress(1.0);
      }

      logger.log('✅ ICO conversion completed successfully');
      return outputPath;
    } catch (e) {
      logger.log('❌ Critical error during ICO conversion: $e');
      logger.log('Stack trace: ${StackTrace.current}');
      rethrow;
    } finally {
      logger.log('Cleaning up process resources');
      logger.log('=== ICO Conversion Process Completed ===');
    }
  }
}
part of '../cli.dart';

class _CliMinifyImage {
  Future<String?> minifyImage(
    String inputPath, {
    String? fileExtension,
    int quality = 95,
    required int downScale,
    int cropLeft = 0,
    int cropRight = 0,
    int cropTop = 0,
    int cropBottom = 0,
    void Function(double)? onProgress,
  }) async {
    logger.log('=== Starting Image Minification Process ===');
    logger.log('Input path: $inputPath');
    logger.log('Target quality: $quality');
    logger.log('Target format: ${fileExtension ?? "same as input"}');

    if (await dropChannel.isProcessRunning()) {
      logger
          .log('⚠ Process conflict: Another minification process is running');
      logger.log('Aborting new minification request');
      return null;
    }

    final outputPath = cli._getUniqueFilePath(inputPath,
        suffix: '_minified', inputExtension: fileExtension);
    logger.log('Generated output path: $outputPath');

    final inputFile = File(inputPath);
    if (!inputFile.existsSync()) {
      logger.log('❌ Error: Input file does not exist at path: $inputPath');
      throw FileSystemException('Input file not found', inputPath);
    }

    final inputFileSize = await inputFile.length();
    logger.log(
        'Input file size: ${(inputFileSiz


  left: 8px;
    right: 8px;
}

video:-webkit-full-screen::video::-webkit-media-controls-status-display {
    width: 420px;
    position: absolute;
    bottom: 9px;
    left: 8px;
    right: 8px;
}
/*
 * basic.css
 * ~~~~~~~~~
 *
 * Sphinx stylesheet -- basic theme.
 *
 * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
 * :license: BSD, see LICENSE for details.
 *
 */

/* -- main layout ----------------------------------------------------------- */

div.clearer {
    clear: both;
}

div.section::after {
    display: block;
    content: '';
    clear: left;
}

/* -- relbar ---------------------------------------------------------------- */

div.related {
    width: 100%;
    font-size: 90%;
}

div.related h3 {
    display: none;
}

div.related ul {
    margin: 0;
    padding: 0 0 0 10px;
    list-style: none;
}

div.related li {
    display: inline;
}

div.related li.right {
    float: right;
    margin-right: 5px;
}

/* -- sidebar --------------------------------------------------------------- */

div.sphinxsidebarwrapper {
    padding: 10px 5px 0 10px;
}

div.sphinxsidebar {
    float: left;
    width: 230px;
    margin-left: -100%;
    font-size: 90%;
    word-wrap: break-word;
    overflow-wrap : break-word;
}

div.sphinxsidebar ul {
    list-style: none;
}

div.sphinxsidebar ul ul,
div.sphinxsidebar ul.want-points {
    margin-left: 20px;
    list-style: square;
}

div.sphinxsidebar ul ul {
    margin-top: 0;
    margin-bottom: 0;
}

div.sphinxsidebar form {
    margin-top: 10px;
}

div.sphinxsidebar input {
    border: 1px solid #98dbcc;
    font-family: sans-serif;
    font-size: 1em;
}

div.sphinxsidebar #searchbox form.search {
    overflow: hidden;
}

div.sphinxsidebar #searchbox input[type="text"] {
    float: left;
    width: 80%;
    padding: 0.25em;
    box-sizing: border-box;
}

div.sphinxsidebar #searchbox input[type="submit"] {
    float: left;
    width: 20%;
    border-left: none;
    padding: 0.25em;
    box-sizing: border-box;
}

img {
    border: 0;
    max-width: 100%;
}

/* -- search page ----------------------------------------------------------- */

ul.search {
    margin: 10px 0 0 20px;
    padding: 0;
}

ul.search li {
    padding: 5px 0 5px 20px;
    background-image: url(file.png);
    background-repeat: no-repeat;
    background-position: 0 7px;
}

ul.search li a {
    font-weight: bold;
}

ul.search li div.context {
    color: #888;
    margin: 2px 0 0 30px;
    text-align: left;
}

ul.keywordmatches li.goodmatch a {
    font-weight: bold;
}

/* -- index page ------------------------------------------------------------ */

table.contentstable {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

table.contentstable p.biglink {
    line-height: 150%;
}

a.biglink {
    font-size: 1.3em;
}

span.linkdescr {
    font-style:


清除苏维埃机关中的官僚主义分子和新资产阶级分子，并且要造成使资产阶级既不能存在也不能再产生的条件。列宁曾经尖锐地提出：“如果不进行有系统的和顽强的斗争来改善国家机关，那我们一定会在社会主义的基础还没有建成以前灭亡。”③①

   同时，列宁还非常强调，在工资政策中必须坚持巴黎公社的原则，即一切公务人员，都只应领取相当于工人工资的薪金，只对资产阶级专家付给高额的薪金。在十月革命后直到国民经济恢复时期，苏联基本上是实行列宁的指示，党政机关的负责人，企业负责人和专家中的共产党员，他们的薪金大体上同工人的工资相当。

   当时苏联共产党和政府采取了一系列措施，从政治上、思想上以及分配制度上防止在各部门中担任领导工作的干部利用职权，腐化堕落，蜕化变质。

   以斯大林为首的苏联共产党坚持了无产阶级专政和社会主义道路，同资本主义势力进行了坚决的斗争。斯大林当时同托洛茨基分子、季诺维也夫分子、布哈林分子等的斗争，实质上是无产阶级和资产阶级的阶级斗争在党内的反映，也是社会主义和资本主义这两条道路的斗争在党内的反映。这些斗争的胜利，粉碎了资产阶级妄想在苏联实行资本主义复辟的阴谋。

   不可否认，斯大林逝世以前，在苏联，已经对一部分人实行高薪制度，已经有一些干部蜕化为资产阶级分子。在一九五二年十月举行的苏共第十九次代表大会上，苏共中央的报告中指出：在一些党的组织中，出现了堕落和腐化现象。有些党组织的领导人，把党组织变成由自己人组成的小家庭，“把他们小集团的利益放在党和国家的利益之上”。有些工业企业的领导人，“忘记委托他们管理和领导的企业是国营企业，竟然企图把这些企业变为他们的世袭领地”。有些党组


,
	}

	// Set TTL
	ttl := defaultTTL
	if record.Spec.TTL != nil {
		ttl = *record.Spec.TTL
	}

	set.TTL = &ttl

	if hostedZoneID, ok := record.Spec.Properties[AliasTarget]; ok {
		// User specified Alias Hosted Zone ID. As such, Phonebook will
		// create a DNS record using AWS' Alias Target function(1).
		//
		// Alias Target is useful when you want to create a DNS record that points to
		// an AWS service. Since AWS can validate that the route doesn't leave their infra, you
		// get some benefits like cost reduction, etc. The official documentation will have more
		// information about this.
		//
		// 1. https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html

		set.AliasTarget = &types.AliasTarget{
			DNSName:      &record.Spec.Targets[0],
			HostedZoneId: &hostedZoneID,
		}
		// Note: For Alias records, TTL is not used and should be omitted
		set.TTL = nil
	} else {
		// Handle different record types
		switch types.RRType(record.Spec.RecordType) {
		case types.RRTypeA, types.RRTypeAaaa, types.RRTypeCname:
			set.ResourceRecords = make([]types.ResourceRecord, len(record.Spec.Targets))
			for i, target := range record.Spec.Targets {
				set.ResourceRecords[i] = types.ResourceRecord{Value: &target}
			}
		case types.RRTypeTxt:
			set.ResourceRecords = make([]types.ResourceRecord, len(record.Spec.Targets))
			for i, target := range record.Spec.Targets {
				// AWS TXT Records requires value to be "quoted". For this reason, the Sprintf() method
				// is called before wrapping the returned value in a pointer for ResourceRecord.
				set.ResourceRecords[i] = types.ResourceRecord{Value: to.Ptr(fmt.Sprintf("\"%s\"", target))}
			}

		case types.RRTypeMx:
			set.ResourceRecords = make([]types.ResourceRecord, len(record.Spec.Targets))
			for i, target := range record.Spec.Targets {
				// Assuming MX records are in the format "priority target"
				set.ResourceRecords[i] = types.ResourceRecord{Value: &target}
			}
		case types.RRTypeSrv:
			set.ResourceRecords = make([]types.ResourceRecord, len(record.Spec.Targets))
			for i, target := range record.Spec.Targets {
				// Assuming SRV records are in the format "priority weight port target"
				set.ResourceRecords[i] = types.ResourceRecord{Value: &target}
			}

		default:
			// For unsupported types, log an error
			log.FromContext(ctx).Error(fmt.Errorf("PB-AWS-#0005: Unsupported record type"), "Record Type", record.Spec.RecordType)
		}
	}

	return &set
}
package lz4

import (
	"io"

	"github.com/pierrec/lz4/v4/internal/lz4block"
	"github.com/pierrec/lz4/v4/internal/lz4errors"
	"github.com/pierrec/lz4/v4/internal/lz4stream"
)

var writerStates = []aState{
	noState:     newState,
	newState:    writeState,
	writeState:  closedState,
	closedState: newState,
	errorState:  newState,
}

// NewWriter returns a new LZ4 frame encoder.
func NewWriter(w io.Writer) *Writer {
	zw := &Writer{frame: lz4stream.NewFrame()}
	zw.state.init(writerStates)
	_ = zw.Apply(DefaultBlockSizeOption, DefaultChecksumOption, DefaultConcurrency, defaultOnBlockDone)
	zw.Reset(w)
	return zw
}

// Writer allows


ader(test_data, **test_kwargs)

    model = Net().to(device)
    optimizer = optim.Adadelta(model.parameters(), lr=lr)

    scheduler = StepLR(optimizer, step_size=1, gamma=gamma)

    # load the experiment run from the context

    print({"epochs": epochs, "lr": lr, "gamma": gamma})

    for epoch in range(1, epochs + 1):
        train(model, device, train_loader, optimizer, epoch, log_interval, dry_run)
        check_performance(model, device, test_loader, epoch)
        scheduler.step()

    # log confusion matrix
    with torch.no_grad():
        data, target = next(iter(test_loader))
        data, target = data.to(device), target.to(device)
        output = model(data)
        pred = output.max(1, keepdim=True)[1]

    return model

def main():
    train_set = datasets.MNIST(
        "./data",
        train=True,
        transform=transforms.Compose(
            [transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,))]
        ),
         download=True,
    )

    test_set = datasets.MNIST(
        "./data",
        train=False,
        transform=transforms.Compose(
            [transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,))]
        ),
        download=True,
    )
    perform_train(train_set, test_set)

if __name__ == "__main__":
    main()


磨栖外东北"
	},
	"d0829": {
		"y": "祭祀.作灶.沐浴.修饰垣墙.平治道涂.余事勿取.",
		"j": "诸事不宜.",
		"c": "生肖冲蛇",
		"s": "煞西",
		"ch": "平",
		"zc": "正冲正冲乙巳",
		"ts": "厨灶床外东北"
	},
	"d0830": {
		"y": "祭祀.求嗣.开光.出行.伐木.作梁.出火.解除.拆卸.进人口.修造.动土.起基.安床.栽种.纳畜.入殓.破土.安葬.除服.成服.",
		"j": "嫁娶.移徙.",
		"c": "生肖冲马",
		"s": "煞南",
		"ch": "定",
		"zc": "正冲正冲丙午",
		"ts": "仓库碓外东北"
	},
	"d0831": {
		"y": "祭祀.求医.捕捉.栽种.塞穴.入殓.破土.安葬.移柩.余事勿取.",
		"j": "诸事不宜.",
		"c": "生肖冲羊",
		"s": "煞东",
		"ch": "执",
		"zc": "正冲正冲丁未",
		"ts": "房床厕外东北"
	},
	"d0701": {
		"y": "破屋.坏垣.余事勿取.",
		"j": "诸事不宜.",
		"c": "生肖冲马",
		"s": "煞南",
		"ch": "破",
		"zc": "正冲正冲丙午",
		"ts": "仓库碓外东北"
	},
	"d0621": {
		"y": "开光.求医.治病.动土.上梁.入殓.破土.安葬.",
		"j": "嫁娶.开光.",
		"c": "生肖冲猴",
		"s": "煞北",
		"ch": "成",
		"zc": "正冲正冲丙申",
		"ts": "仓库炉房内南"
	},
	"d0702": {
		"y": "开市.交易.立券.纳财.开池.作厕.结网.祭祀.修造.动土.安床.放水.经络.破土.",
		"j": "嫁娶.造桥.词讼.移徙.安门.作灶.栽种.",
		"c": "生肖冲羊",
		"s": "煞东",
		"ch": "危",
		"zc": "正冲正冲丁未",
		"ts": "房床厕外东北"
	},
	"d0703": {
		"y": "开市.交易.立券.纳财.栽种.安


/* Set floating-point environment exception handling.
   Copyright (C) 1998-2024 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

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

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library.  If not, see
   <https://www.gnu.org/licenses/>.  */

#include <fenv.h>
#include <fpu_control.h>

int
fesetexceptflag (const fexcept_t *flagp, int excepts)
{
  fexcept_t flags = *flagp;
  asm volatile ("csrc fflags, %0" : : "r" (excepts));
  asm volatile ("csrs fflags, %0" : : "r" (flags & excepts));

  return 0;
}


per<TSparseSpace, TDenseSpace>::InitializeInterface(Kratos::Flags MappingOptions)
{

	/* 32) Creates 2 instances of the class CouplingGeometryLocalSystem */

	CouplingGeometryLocalSystem ref_projector_local_system(nullptr, true, dual_mortar, direct_map_to_destination);
    	CouplingGeometryLocalSystem ref_slave_local_system(nullptr, false, dual_mortar, direct_map_to_destination);

        /* This class can be found in coupling_geometry_mapper.h */
        class CouplingGeometryLocalSystem : public MapperLocalSystem
{
public:

    explicit CouplingGeometryLocalSystem(GeometryPointerType pGeom,
                                         const bool IsProjection,
                                         const bool IsDualMortar,
                                         const bool IsDestinationIsSlave
                                         )
        : mpGeom(pGeom),
          mIsProjection(IsProjection),
          mIsDualMortar(IsDualMortar),
          mIsDestinationIsSlave(IsDestinationIsSlave)
        {}

        void CalculateAll(MatrixType& rLocalMappingMatrix,
                      EquationIdVectorType& rOriginIds,
                      EquationIdVectorType& rDestinationIds,
                      MapperLocalSystem::PairingStatus& rPairingStatus) const override;

        /* 33) Creates the local systems objects which will finally give rise to the mapping matrices (Note: 1 local matrix per gaussian point) */

        MapperUtilities::CreateMapperLocalSystemsFromGeometries(ref_projector_local_system,
                             mpCouplingMP->GetCommunicator(),
                             mMapperLocalSystemsProjector);

    	MapperUtilities::CreateMapperLocalSystemsFromGeometries(ref_slave_local_system,
                             mpCouplingMP->GetCommunicator(),
                             mMapperLocalSystemsSlave);

        /* 34) Assign interface equations id´s */

        AssignInterfaceEquationIds(); // Has to be done every time in case of overlapping interfaces!

        /* 35) Creates the projector interface mass matrix - interface_matrix_projector */

        const std::size_t num_nodes_interface_slave = mpCouplingInterfaceSlave->NumberOfNodes();
    	const std::size_t num_nodes_interface_master = mpCouplingInterfaceMaster->NumberOfNodes();
    	mpMappingMatrix = Kratos::make_unique<MappingMatrixType>(num_nodes_interface_slave, num_nodes_interface_master);

    	// If you dereference and print mpMappingMatrix, you get:

    	*mpMappingMatrix : [2,3]((0,0,0),(0,0,0))

    	/* 36) It builds the slave mapping matrix (int_gammaD N_D * N_D dgamma_D) */

    	MappingMatrixUtilities<TSparseSpace, TDenseSpace>::BuildMappingMatrix(
        mpMappingMatrixSlave,
        mpInterfaceVectorContainerSlave->pGetVector(),
        mpInterfaceVectorContainerSlave->pGetVector(),
        mpInterfaceVectorContainerSlave->GetModelPart(),
        mpInterfaceVectorContainerSlave->GetModelPart(),
        mMapperLocalSystemsSlave,
        0); // The echo-level is no longer neeed here, refactor in separate PR

        Note: Check the BuildMappingMatrix() method inside mapping_matrix_utilities.cpp

        The output is:

        *mpMappingMatrixSlave : [2,2]((0.666667,0.333333),(0.333333,0.666667))

        /* 37) It builds the projector mapping matrix (int_gammaDO N_D * N_O dgamma_DO) */

        MappingMatrixUtilities<TSparseSpace, TDenseSpace>::BuildMappingMatrix(
        mpMappingMatrixProjector,
        mpInterfaceVectorContainerMaster->pGetVector(),
        mpInterfaceVectorContainerSlave->pGetVector(),
        mpInterfaceVectorContainerMaster->GetModelPart(),
        mpInterfaceVectorContainerSlave->GetModelPart


-toc-skip>License

Full license

MIT + file LICENSE

Citation

Citing SpectroPipeR

Developers

Stephan Michalik
 Author, maintainer

Developed by Stephan Michalik.

Site built with pkgdown 2.1.1.

<!DOCTYPE html>

	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<title>Hello, world!</title>


		if ( lastNode ) { lastNode.next = node.leadingCommentStart || node.start; }
			lastNode = node;
		}
	}

	basename () {
		const base = basename( this.id );
		const ext = extname( this.id );

		return makeLegal( ext ? base.slice( 0, -ext.length ) : base );
	}

	bindImportSpecifiers () {
		[ this.imports, this.reexports ].forEach( specifiers => {
			keys( specifiers ).forEach( name => {
				const specifier = specifiers[ name ];

				const id = this.resolvedIds[ specifier.source ] || this.resolvedExternalIds[ specifier.source ];
				specifier.module = this.bundle.moduleById.get( id );
			} );
		} );

		this.exportAllModules = this.exportAllSources.map( source => {
			const id = this.resolvedIds[ source ] || this.resolvedExternalIds[ source ];
			return this.bundle.moduleById.get( id );
		} );

		this.sources.forEach( source => {
			const id = this.resolvedIds[ source ];

			if ( id ) {
				const module = this.bundle.moduleById.get( id );
				this.dependencies.push( module );
			}
		} );
	}

	bindReferences () {
		for ( const node of this.ast.body ) {
			node.bind();
		}

		// if ( this.declarations.default ) {
		// 	if ( this.exports.default.identifier ) {
		// 		const declaration = this.trace( this.exports.default.identifier );
		// 		if ( declaration ) this.declarations.default.bind( declaration );
		// 	}
		// }
	}

	error ( props, pos ) {
		if ( pos !== undefined ) {
			props.pos = pos;

			var ref = locate( this.code, pos, { offsetLine: 1 } );
			var line = ref.line;
			var column = ref.column; // TODO trace sourcemaps

			props.loc = { file: this.id, line, column };
			props.frame = getCodeFrame( this.code, line, column );
		}

		error( props );
	}

	getExports () {
		return keys( this.exports );
	}

	getReexports () {
		const reexports = blank();

		keys( this.reexports ).forEach( name => {
			reexports[ name ] = true;
		} );

		this.exportAllModules.forEach( module => {
			if ( module.isExternal ) {
				reexports[ `*${module.id}` ] = true;
				return;
			}

			module.getExports().concat( module.getReexports() ).forEach( name => {
				if ( name !== 'default' ) { reexports[ name ] = true; }
			} );
		} );

		return keys( reexports );
	}

	includeAllInBundle () {
		this.ast.body.forEach( includeFully );
	}

	includeInBundle () {
		let addedNewNodes = false;
		this.ast.body.forEach( node => {
			if ( node.shouldBeIncluded() ) {
				if ( node.includeInBundle() ) {
					addedNewNodes = true;
				}
			}
		} );
		return addedNewNodes;
	}

	namespace () {
		if ( !this.declarations[ '*' ] ) {
			this.declarations[ '*' ] = new NamespaceVariable( this );
		}

		return this.declarations[ '*' ];
	}

	render ( es, legacy ) {
		const magicString = this.magicString.clone();

		for ( const node of this.ast.body ) {
			node.render( magicString, es );
		}

		if ( this.namespace().needsNamespaceBlock ) {
			magicString.append( '\n\n' + this.namespace().renderBlock( es, legacy, '\t' ) ); // TODO use correct indentation
		}

		return magicString.trim();
	}

	toJSON () {
		return {
			id: this.id,
			dependencies: this.dependencies.map( module => module.id ),


l Rights Reserved.

                Groundspeak Terms of Use
                |
                Privacy Policy
                |
                Geocaching Logo Usage Guidelines
                |
                API License Agreement
                |
                Service Status

        Return to the Top of the Page

</form>


	for (int i=0; index<0 && i<individuals2.size(); ++i)
						if (nextInd.equals(individuals2)) index = i;
					if (posExs.contains(index))
						emptyIntersection = false;
					else if (negExs.contains(index))
						emptyIntersection = false;
				}

			} while (emptyIntersection);
			//if (newConcept !=null){
			System.out.println(newConcept==null);
			rConcepts.add(newConcept);
			//}

		}
		System.out.println();

		logger.debug(""+rConcepts.size());
		return rConcepts;
	}

	private OWLClassExpression setSeed() {

		//for (OWLClassExpression cl: allConcepts){
		//if (cl.toString().compareToIgnoreCase(conceptSeed)==0){
		//return cl;
		//}

		//}
		return null;
	}

	@Override
	public Set<OWLClassExpression> refine(OWLClassExpression description) {
		// this method calls the naive refinement operator for DLTree
		return null;
	}

	@Override
	public void init() throws ComponentInitException {
		// TODO Auto-generated method stub

		//		allConcepts=new ArrayList<OWLClass>(reasoner.getClasses());
		//		//System.out.println("all Concepts: "+allConcepts.size());
		//		allRoles= new ArrayList<OWLObjectProperty>(reasoner.getObjectProperties());
		//this.beam=beam; // set the maximum number of candidates that can be generated
		generator= new Random(2);

		//		if (beam==0)
		//			setBeam(4); // a default value

	}

     //
	public void setReasoner(AbstractReasonerComponent reasoner) {
		// TODO Auto-generated method stub
		this.reasoner= reasoner;
		if (allConcepts==null)
			allConcepts= new ArrayList<>(reasoner.getClasses());
		//System.out.println("all+ Concepts: "+allConcepts.size());
		if (allRoles==null)
			allRoles= new ArrayList<>(reasoner.getObjectProperties());

	}

	@Override
	public void setReasoner(Reasoner reasoner) {
		// TODO Auto-generated method stub
		this.reasoner= reasoner;
		if (allConcepts==null)
			allConcepts= new ArrayList<>(reasoner.getClasses());
		//System.out.println("all+ Concepts: "+allConcepts.size());
		if (allRoles==null)
			allRoles= new ArrayList<>(reasoner.getObjectProperties());

	}

	@Override
	public Set<OWLClassExpression> refine(OWLClassExpression definition, SortedSet<OWLIndividual> posExs,
			SortedSet<OWLIndividual> negExs) {

		Set<OWLClassExpression> children;
		int n=-1; // initialization
		ArrayList<OWLClassExpression> childrenList= new ArrayList<>();
		OWLClassExpression def= definition;

		if ((!definition.isOWLThing())&&(!definition.isOWLNothing())){
			children = OWLClassExpressionUtils.getChildren(def);

			Random rg= new Random();

			if (children.size()>0){
				n= rg.nextInt(children.size());
				childrenList= new ArrayList<>(children);

			}
		}

		if (ro==RHO){
			RhoDRDown rho = new RhoDRDown();

			rho.setReasoner((AbstractReasonerComponent)reasoner);
			ClassHierarchy classHierarchy = (ClassHierarchy) reasoner.getClassHierarchy();
			rho.setClassHierarchy(classHierarchy);
			rho.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy());
			rho.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy());

			rho.setApplyAllFilter(false);
			rho.setUseAllConstructor(true);
			rho.setUseExistsConstructor(true);
			rho.setUseHasValueConstructor(false);
			rho.


 'SASRec': 'ckpt/PDSRec-main.py_--model=SASRec_--sd=B_--td=B_--loss_type=ce_--lr=1e-2_--exp_type=lr-Sep-14-2024_09-29-11-ac20ba.pth',
                    'DreamRec': 'ckpt/PDSRec-main.py_--model=DreamRec_--sd=B_--td=B_--hidden_size=3072_--exp_type=dim-Sep-13-2024_15-26-48-9c76db.pth',
                    'PDSRec': 'ckpt/PDSRec-main.py_--model=PDSRec_--sd=B_--td=B_--loss_type=cosine_--ab=iids_--hidden_size=3072_--exp_type=ab-Sep-14-2024_15-53-12-06c9df.pth'
                }
                self.model.load_state_dict(torch.load(ckpt_dict[self.config['model']]))
                embeddings = self.model.get_current_embeddings()
                embeddings_np = embeddings.cpu().numpy()
                import numpy as np
                np.save('{}_{}_embeddings.npy'.format(self.config['model'], self.config['dataset']), embeddings_np)

            self.model, test_dataloader = self.accelerator.prepare(
                self.model, test_dataloader
            )
            if self.accelerator.is_main_process:
                print(f'Loaded best model checkpoint from {self.trainer.saved_model_ckpt}')

        if self.config.get('step', None) != 0:
            test_results = self.trainer.evaluate(test_dataloader)
            print(test_results)
            if self.accelerator.is_main_process:
                for key in test_results:
                    self.accelerator.log({f'Test_Metric/{key}': test_results[key]})

        if self.config['exp_type'] == 'check':
            np.save('{}_{}_vis_embeddings.npy'.format(self.config['model'], self.config['dataset']),
                    np.array(self.model.samples))
            np.save('{}_{}_pred_embeddings.npy'.format(self.config['model'], self.config['dataset']),
                    np.array(self.model.predict_embeddings.detach().cpu().numpy()))
            np.save('{}_{}_target_embeddings.npy'.format(self.config['model'], self.config['dataset']),
                    np.array(self.model.target_embedding.detach().cpu().numpy()))

        if self.accelerator.is_main_process:
            if self.config['save'] is False:
                import os
                if os.path.exists(self.trainer.saved_model_ckpt):
                    os.remove(self.trainer.saved_model_ckpt)
                    print(f"{self.trainer.saved_model_ckpt} has been deleted.")
                else:
                    print(f"{self.trainer.saved_model_ckpt} not found.")

        self.trainer.end()
        return test_results, self.config


ision for i=1, .., n.
 *    It can return result y[i]=0 in case a[i]^2 and b[i]^2 underflow in target
 *    precision (for some i). It can return result y[i]=NAN in case
 *    a[i]^2+b[i]^2 overflow in target precision, for some i. It can return
 *    result y[i]=NAN in case a[i] or b[i] is infinite, for some i.
 *
 *
 */

/* Offsets for data table __svml_shypot_data_internal
 */
#define _sAbsMask			0
#define _sHalf				64
#define _iExpBound			128

#include <sysdep.h>

	.section .text.evex512, "ax", @progbits
ENTRY(_ZGVeN16vv_hypotf_skx)
	pushq	%rbp
	cfi_def_cfa_offset(16)
	movq	%rsp, %rbp
	cfi_def_cfa(6, 16)
	cfi_offset(6, -16)
	andq	$-64, %rsp
	subq	$256, %rsp
	vgetexpps {sae}, %zmm0, %zmm2
	vgetexpps {sae}, %zmm1, %zmm3
	vmovups	_sHalf+__svml_shypot_data_internal(%rip), %zmm6
	vmaxps	{sae}, %zmm3, %zmm2, %zmm4
	vmulps	{rn-sae}, %zmm0, %zmm0, %zmm2
	vandps	_sAbsMask+__svml_shypot_data_internal(%rip), %zmm4, %zmm5
	vfmadd231ps {rn-sae}, %zmm1, %zmm1, %zmm2
	vpcmpd	$5, _iExpBound+__svml_shypot_data_internal(%rip), %zmm5, %k0
	vrsqrt14ps %zmm2, %zmm7
	kmovw	%k0, %edx
	vmulps	{rn-sae}, %zmm7, %zmm2, %zmm9
	vmulps	{rn-sae}, %zmm7, %zmm6, %zmm8
	vfnmadd231ps {rn-sae}, %zmm9, %zmm9, %zmm2
	vfmadd213ps {rn-sae}, %zmm9, %zmm8, %zmm2

	/*
	 * VSCALEF( S, _VRES1, _VRES1, sExp );
	 *  The end of implementation
	 */
	testl	%edx, %edx

	/* Go to special inputs processing branch */
	jne	L(SPECIAL_VALUES_BRANCH)
	# LOE rbx r12 r13 r14 r15 edx zmm0 zmm1 zmm2

	/* Restore registers
	 * and exit the function
	 */

L(EXIT):
	vmovaps	%zmm2, %zmm0
	movq	%rbp, %rsp
	popq	%rbp
	cfi_def_cfa(7, 8)
	cfi_restore(6)
	ret
	cfi_def_cfa(6, 16)
	cfi_offset(6, -16)

	/* Branch to process
	 * special inputs
	 */

L(SPECIAL_VALUES_BRANCH):
	vmovups	%zmm0, 64(%rsp)
	vmovups	%zmm1, 128(%rsp)
	vmovups	%zmm2, 192(%rsp)
	# LOE rbx r12 r13 r14 r15 edx zmm2

	xorl	%eax, %eax
	# LOE rbx r12 r13 r14 r15 eax edx

	vzeroupper
	movq	%r12, 16(%rsp)
	/*  DW_CFA_expression: r12 (r12) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -64; DW_OP_and; DW_OP_const4s: -240; DW_OP_plus)  */
	.cfi_escape 0x10, 0x0c, 0x0e, 0x38, 0x1c, 0x0d, 0xc0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x10, 0xff, 0xff, 0xff, 0x22
	movl	%eax, %r12d
	movq	%r13, 8(%rsp)
	/*  DW_CFA_expression: r13 (r13) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -64; DW_OP_and; DW_OP_const4s: -248; DW_OP_plus)  */
	.cfi_escape 0x10, 0x


 in compliance with the License. A copy of the
// License is located at
//
//	http://aws.amazon.com/apache2.0/
//
// or in the "license" file accompanying this file. This file is distributed
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

package cloudwatch

import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"os"
	"runtime"
	"sort"
	"strings"
	"time"
	"unicode/utf8"

	"github.com/aws/amazon-kinesis-firehose-for-fluent-bit/plugins"
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/arn"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/credentials/endpointcreds"
	"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
	"github.com/aws/aws-sdk-go/aws/endpoints"
	"github.com/aws/aws-sdk-go/aws/request"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
	fluentbit "github.com/fluent/fluent-bit-go/output"
	jsoniter "github.com/json-iterator/go"
	"github.com/segmentio/ksuid"
	"github.com/sirupsen/logrus"
	"github.com/valyala/bytebufferpool"
	"github.com/valyala/fasttemplate"
)

const (
	// See: http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html
	perEventBytes          = 26
	maximumBytesPerPut     = 1048576
	maximumLogEventsPerPut = 10000
	maximumBytesPerEvent   = 1024 * 256 //256KB
	maximumTimeSpanPerPut  = time.Hour * 24
	truncatedSuffix        = "[Truncated...]"
	maxGroupStreamLength   = 512
)

const (
	// Log stream objects that are empty and inactive for longer than the timeout get cleaned up
	logStreamInactivityTimeout = time.Hour
	// Check for expired log streams every 10 minutes
	logStreamInactivityCheckInterval = 10 * time.Minute
	// linuxBaseUserAgent is the base user agent string used for Linux.
	linuxBaseUserAgent = "aws-fluent-bit-plugin"
	// windowsBaseUserAgent is the base user agent string used for Windows.
	windowsBaseUserAgent = "aws-fluent-bit-plugin-windows"
)

// LogsClient contains the CloudWatch API calls used by this plugin
type LogsClient interface {
	CreateLogGroup(input *cloudwatchlogs.CreateLogGroupInput) (*cloudwatchlogs.CreateLogGroupOutput, error)
	PutRetentionPolicy(input *cloudwatchlogs.PutRetentionPolicyInput) (*cloudwatchlogs.PutRetentionPolicyOutput, error)
	CreateLogStream(input *cloudwatchlogs.CreateLogStreamInput) (*cloudwatchlogs.CreateLogStreamOutput, error)
	DescribeLogStreams(input *cloudwatchlogs.DescribeLogStreamsInput) (*cloudwatchlogs.DescribeLogStreamsOutput, error)
	PutLogEvents(input *cloudwatchlogs.PutLogEventsInput) (*cloudwatchlogs.PutLogEventsOutput, error)
}

type logStream struct {
	logEvents         []*cloudwatchlogs.InputLogEvent
	currentByteLength int


romUnpackedArraySize(
    unpackedSize: number, channelsPerTexture: number): number {
  if (unpackedSize % channelsPerTexture !== 0) {
    throw new Error(
        `unpackedSize (${unpackedSize}) must be a multiple of ` +
        `${channelsPerTexture}`);
  }
  return unpackedSize / channelsPerTexture;
}

export function decodeMatrixFromUnpackedColorRGBAArray(
    unpackedArray: Float32Array, matrix: Float32Array, channels: number) {
  const requiredSize = unpackedArray.length * channels / 4;
  if (matrix.length < requiredSize) {
    throw new Error(
        `matrix length (${matrix.length}) must be >= ${requiredSize}`);
  }
  let dst = 0;
  for (let src = 0; src < unpackedArray.length; src += 4) {
    for (let c = 0; c < channels; c++) {
      matrix[dst++] = unpackedArray[src + c];
    }
  }
}

/*
export function getPackedMatrixTextureShapeWidthHeight(
    rows: number, columns: number): [number, number] {
  return [
    Math.max(1, Math.ceil(columns / 2)), Math.max(1, Math.ceil(rows / 2))
  ];
}
*/

export function getPackedMatrixTextureShapeWidthHeight(
    rows: number, columns: number, format: GPUTextureFormat): [number, number] {
  // kBytesPerTexel = 4;
  if (format == 'rgba32float' || format == 'rgba32uint')
    // return [Math.max(1, Math.ceil(rows)), Math.max(1, Math.ceil(columns /
    // 4))];
    return [Math.max(1, Math.ceil(columns / 4)), Math.max(1, Math.ceil(rows))];
  else if (format == 'rgba8uint')
    return [columns, rows];
  else
    return [columns, rows];
}

export function getPackedRGBAArraySizeFromMatrixShape(
    rows: number, columns: number, format: GPUTextureFormat): number {
  const [w, h] = getPackedMatrixTextureShapeWidthHeight(rows, columns, format);
  return w * h * 4;
}

// BufferSpec MinimumBufferSpec(uint32_t width, uint32_t height) {
//  uint32_t bytesPerRow = Align(width * kBytesPerTexel,
//  kTextureBytesPerRowAlignment); return {bytesPerRow * (height - 1) + width *
//  kBytesPerTexel, 0, bytesPerRow};
// }
export function getBytesPerRow(width: number, kBytesPerTexel = 16) {
  const kTextureBytesPerRowAlignment = 256;
  const alignment = kTextureBytesPerRowAlignment;
  // const kBytesPerTexel = 16;
  const value = kBytesPerTexel * width;
  // const bytesPerRow = (value + (alignment - 1)) & ~(alignment - 1);
  const bytesPerRow =
      ((value + (alignment - 1)) & ((~(alignment - 1)) >>> 0)) >>> 0;
  return bytesPerRow;
}

export function getBytesPerTexel(format: GPUTextureFormat): number {
  // kBytesPerTexel = 4;
  if (format == 'rgba32float' || format == 'rgba32uint')
    return 16;
  else if (format == 'r32float' || format == 'r32uint')
    return 4;
  else {
    console.error('Unsupported format ' + format);
    return 4;
  }
}

export function getShaderFormat(format: GPUTextureFormat): string {
  // kBytesPerTexel = 4;
  if (format == 'rgba32float')
    return 'rgba32f';
  else if (format == 'rgba32uint')
    return 'rgba32ui';
  else if (format == 'r32float')
    return 'r32f';
  else if (format == 'r32uint')
    return 'r32ui';
  else {
    console.error('Unsupported format ' + format);
    return 'r32f';
  }
}

export function get


< 256; i++) {
		write_sram(card, card->rt_base + i, log_to_rate[i]);
	}

	for (i = 0; i < 128; i++) {
		unsigned int tmp;

		tmp  = rate_to_log[(i << 2) + 0] << 0;
		tmp |= rate_to_log[(i << 2) + 1] << 8;
		tmp |= rate_to_log[(i << 2) + 2] << 16;
		tmp |= rate_to_log[(i << 2) + 3] << 24;
		write_sram(card, card->rt_base + 256 + i, tmp);
	}

#if 0 /* Fill RDF and AIR tables. */
	for (i = 0; i < 128; i++) {
		unsigned int tmp;

		tmp = RDF[0][(i << 1) + 0] << 16;
		tmp |= RDF[0][(i << 1) + 1] << 0;
		write_sram(card, card->rt_base + 512 + i, tmp);
	}

	for (i = 0; i < 128; i++) {
		unsigned int tmp;

		tmp = AIR[0][(i << 1) + 0] << 16;
		tmp |= AIR[0][(i << 1) + 1] << 0;
		write_sram(card, card->rt_base + 640 + i, tmp);
	}
#endif

	IPRINTK("%s: initialize rate table ...\n", card->name);
	writel(card->rt_base << 2, SAR_REG_RTBL);

	/* Initialize TSTs */
	IPRINTK("%s: initialize TST ...\n", card->name);
	card->tst_free = card->tst_size - 2;	/* last two are jumps */

	for (i = card->tst[0]; i < card->tst[0] + card->tst_size - 2; i++)
		write_sram(card, i, TSTE_OPC_VAR);
	write_sram(card, i++, TSTE_OPC_JMP | (card->tst[0] << 2));
	idt77252_sram_write_errors = 1;
	write_sram(card, i++, TSTE_OPC_JMP | (card->tst[1] << 2));
	idt77252_sram_write_errors = 0;
	for (i = card->tst[1]; i < card->tst[1] + card->tst_size - 2; i++)
		write_sram(card, i, TSTE_OPC_VAR);
	write_sram(card, i++, TSTE_OPC_JMP | (card->tst[1] << 2));
	idt77252_sram_write_errors = 1;
	write_sram(card, i++, TSTE_OPC_JMP | (card->tst[0] << 2));
	idt77252_sram_write_errors = 0;

	card->tst_index = 0;
	writel(card->tst[0] << 2, SAR_REG_TSTB);

	/* Initialize ABRSTD and Receive FIFO */
	IPRINTK("%s: initialize ABRSTD ...\n", card->name);
	writel(card->abrst_size | (card->abrst_base << 2),
	       SAR_REG_ABRSTD);

	IPRINTK("%s: initialize receive fifo ...\n", card->name);
	writel(card->fifo_size | (card->fifo_base << 2),
	       SAR_REG_RXFD);

	IPRINTK("%s: SRAM initialization complete.\n", card->name);
	return 0;
}

static int __devinit
init_card(struct atm_dev *dev)
{
	struct idt77252_dev *card = dev->dev_data;
	struct pci_dev *pcidev = card->pcidev;
	unsigned long tmpl, modl;
	unsigned int linkrate, rsvdcr;
	unsigned int tst_entries;
	struct net_device *tmp;
	char tname[10];

	u32 size;
	u_char pci_byte;
	u32 conf;
	int i, k;

	if (test_bit(IDT77252_BIT_INIT, &card->flags)) {
		printk("Error: SAR already initialized.\n");
		return -1;
	}

/*****************************************************************/
/*   P C I   C O N F I G U R A T I O N                           */
/*****************************************************************/

	/* Set PCI Retry-Timeout and TRDY timeout */
	IPRINTK("%s: Checking PCI retries.\n", card->name);
	if (pci_read_config_byte(pcidev, 0x40, &pci_byte) != 0) {
		printk("%s: can't read PCI retry timeout.\n", card->name);
		deinit_card(card);
		return -1;
	}
	if (pci_byte != 0) {
		IPRINTK("%s: PCI retry timeout: %d, set to 0.\n",
			card->name, pci_byte);
		if (pci_write_config_byte(pcidev, 0x40, 0) != 0) {
			printk("%s: can't set PCI retry timeout.\n",
			       card->name);
			deinit_card(card);
			return -1;
		}
	}
	IPRINTK("%s: Checking PCI TRDY.\n", card->name);
	if (pci_read_config_byte(pcidev, 0x41, &pci_byte) != 0) {
		printk("%s: can't read PCI TRDY timeout.\n", card->name);
		deinit_card(card);
		return -1;
	}
	if (pci_byte != 0) {
		IPRINTK("%s: PCI TRDY timeout: %d, set to 0.\n",
		        card->name, pci_byte);
		if (pci_write_config_byte(pcidev, 0x41, 0) != 0) {
			printk("%s: can't set PCI TRDY timeout.\n", card->name);
			deinit_card(card);
			return -1;
		}
	}
	/* Reset Timer register */
	if (readl(SAR_REG_STAT) & SAR_STAT_TMROF) {
		printk("%s: resetting timer overflow.\n", card->name);
		writel(SAR_STAT_TMROF, SAR_REG_STAT);
	}
	IPRINTK("%s: Request IRQ ... ", card->name);
	if (request_irq(pcidev->irq, idt77252_interrupt, IRQF_DISABLED|IRQF_SHARED,
			card->name, card) != 0) {
		printk("%s: can't allocate IRQ.\n", card->name);
		deinit_card(card);
		return -1;
	}
	IPRINTK("got %d.\n", pcidev->irq);

/*****************************************************************/
/*   C H E C K   A N D   I N I T   S R A M                       */
/*****************************************************************/

	IPRINTK("%s: Initializing SRAM\n", card->name);

	/* preset size of connecton table, so that init_sram() knows about it */
	conf =	SAR_CFG_TX_FIFO_SIZE_9 |	/* Use maximum fifo size */
		SAR_CFG_RXSTQ_SIZE_8k |


), (v1, v2) => {
            deepStrictEqual(prefix.gt(v1)(v2), v1 > v2);
          })
        );
      });
    });

    describe('gte', () => {
      it('behaves like `>=` for floats', () => {
        fc.assert(
          fc.property(fc.float(), fc.float(), (v1, v2) => {
            deepStrictEqual(prefix.gte(v1)(v2), v1 >= v2);
          })
        );
      });
    });

    describe('eq', () => {
      it('behaves like `==` for floats', () => {
        fc.assert(
          fc.property(fc.float(), fc.float(), (v1, v2) => {
            deepStrictEqual(prefix.eq(v1)(v2), v1 == v2);
          })
        );
      });
    });

    describe('neq', () => {
      it('behaves like `!=` for floats', () => {
        fc.assert(
          fc.property(fc.float(), fc.float(), (v1, v2) => {
            deepStrictEqual(prefix.neq(v1)(v2), v1 != v2);
          })
        );
      });
    });

    describe('neqq', () => {
      it('behaves like `!==` for floats', () => {
        fc.assert(
          fc.property(fc.float(), fc.float(), (v1, v2) => {
            deepStrictEqual(prefix.neqq(v1)(v2), v1 !== v2);
          })
        );
      });
    });
  });

  describe('Logical', () => {
    describe('or', () => {
      it('behaves like `||`', () => {
        fc.assert(
          fc.property(fc.boolean(), fc.boolean(), (v1, v2) => {
            deepStrictEqual(prefix.or(v1)(v2), v1 || v2);
          })
        );
      });
    });

    describe('and', () => {
      it('behaves like `&&`', () => {
        fc.assert(
          fc.property(fc.boolean(), fc.boolean(), (v1, v2) => {
            deepStrictEqual(prefix.and(v1)(v2), v1 && v2);
          })
        );
      });
    });

    describe('not', () => {
      it('behaves like `||`', () => {
        fc.assert(
          fc.property(fc.boolean(), (v1) => {
            deepStrictEqual(prefix.not(v1), !v1);
          })
        );
      });
    });
  });
});
import { CustomizationActions } from "./actions";
import {
  BACKGROUND,
  HEADING,
  PANEL,
  PANEL_FONT,
  RESET_THEME,
  SET_THEME_COLOR,
} from "./constants";
import { colors } from "../../utils/colors";

export interface ICustomizationState {
  backgroundColor: string;
  headingColor: string;
  panel: string;
  panelFont: string;
  buttonBgColor: string;
}

const INITIAL_STATE: ICustomizationState = {
  backgroundColor: colors.WHITE,
  headingColor: colors.KILLARNEY,
  panel: colors.ALABASTER,
  panelFont: colors.BOULDER,
  buttonBgColor: colors.KILLARNEY,
};

export const customizationReducer = (
  state: ICustomizationState = INITIAL_STATE,
  action: CustomizationActions
): ICustomizationState => {
  switch (action.type) {
    case RESET_THEME:
      return INITIAL_STATE;

    case SET_THEME_COLOR:
      switch (action.payload.preset) {
        case HEADING:
          return { ...state, headingColor: action.payload.color };
        case PANEL:


#!/usr/bin/env python3

import asyncio
from bs4 import BeautifulSoup
import aiohttp

class ScanerRapidDns:
    def __init__(self) -> None:
        self.results: set[tuple[str, str]] = set()

    @staticmethod
    async def _scrape_subdomains(session: aiohttp.ClientSession, domain: str) -> set[tuple[str, str]]:
        url = f"https://rapiddns.io/s/{domain}?full=1#result"
        try:
            async with session.get(url) as response:
                if response.status == 200:
                    html = await response.text()
                    soup = BeautifulSoup(html, "lxml")

                    if table := soup.find("table", id="table"):
                        subdomains = set()
                        rows = table.findAll("tr")
                        for row in rows:
                            passive_dns = row.findAll("td")
                            # passive DNS Data
                            # [value.text.strip() for value in passive_dns]
                            for cell in passive_dns:
                                subdomain = cell.get_text().strip()
                                if domain in subdomain and subdomain:
                                    subdomains.add(subdomain)

                        return subdomains

                else:
                    print(f"RapidDNS returned status {response.status} for {domain}")

        except asyncio.TimeoutError:
            print(f"Timeout scanning {domain} on RapidDNS")
        except (aiohttp.ClientError, aiohttp.ServerConnectionError) as e:
            print(f"Connection error scanning {domain} on RapidDNS: {str(e)}")
        except Exception as e:
            print(f"Unexpected error scanning {domain} on RapidDNS: {str(e)}")

        return set()

    async def get_results(self, domains, session: aiohttp.ClientSession):
        for domain in domains:
            try:
                subdomains = await self._scrape_subdomains(session, domain)
                self.results.update(subdomains)
            except Exception as e:
                print(f"Failed to scan {domain} on RapidDNS: {str(e)}")
        return self.results


MP_AMF0_DECODE;
        srs_error("amf0 read string marker failed. ret=%d", ret);
        return ret;
    }

    char marker = stream->read_1bytes();
    if (marker != RTMP_AMF0_String) {
        ret = ERROR_RTMP_AMF0_DECODE;
        srs_error("amf0 check string marker failed. "
            "marker=%#x, required=%#x, ret=%d", marker, RTMP_AMF0_String, ret);
        return ret;
    }
    srs_verbose("amf0 read string marker success");

    return srs_amf0_read_utf8(stream, value);
}

int srs_amf0_write_string(SrsStream* stream, string value)
{
    int ret = ERROR_SUCCESS;

    // marker
    if (!stream->require(1)) {
        ret = ERROR_RTMP_AMF0_ENCODE;
        srs_error("amf0 write string marker failed. ret=%d", ret);
        return ret;
    }

    stream->write_1bytes(RTMP_AMF0_String);
    srs_verbose("amf0 write string marker success");

    return srs_amf0_write_utf8(stream, value);
}

int srs_amf0_read_boolean(SrsStream* stream, bool& value)
{
    int ret = ERROR_SUCCESS;

    // marker
    if (!stream->require(1)) {
        ret = ERROR_RTMP_AMF0_DECODE;
        srs_error("amf0 read bool marker failed. ret=%d", ret);
        return ret;
    }

    char marker = stream->read_1bytes();
    if (marker != RTMP_AMF0_Boolean) {
        ret = ERROR_RTMP_AMF0_DECODE;
        srs_error("amf0 check bool marker failed. "
            "marker=%#x, required=%#x, ret=%d", marker, RTMP_AMF0_Boolean, ret);
        return ret;
    }
    srs_verbose("amf0 read bool marker success");

    // value
    if (!stream->require(1)) {
        ret = ERROR_RTMP_AMF0_DECODE;
        srs_error("amf0 read bool value failed. ret=%d", ret);
        return ret;
    }

    value = (stream->read_1bytes() != 0);

    srs_verbose("amf0 read bool value success. value=%d", value);

    return ret;
}
int srs_amf0_write_boolean(SrsStream* stream, bool value)
{
    int ret = ERROR_SUCCESS;

    // marker
    if (!stream->require(1)) {
        ret = ERROR_RTMP_AMF0_ENCODE;
        srs_error("amf0 write bool marker failed. ret=%d", ret);
        return ret;
    }
    stream->write_1bytes(RTMP_AMF0_Boolean);
    srs_verbose("amf0 write bool marker success");

    // value
    if (!stream->require(1)) {
        ret = ERROR_RTMP_AMF0_ENCODE;
        srs_error("amf0 write bool value failed. ret=%d", ret);
        return ret;
    }

    if (value) {
        stream->write_1bytes(0x01);
    } else {
        stream->write_1bytes(0x00);
    }

    srs_verbose("amf0 write bool value success. value=%d", value);

    return ret;
}

int srs_amf0_read_number(SrsStream* stream, double& value)
{
    int ret =