34C ; =ov11_02324CE0
	mov r2, #0x8100
	mov r4, r0
	str r2, [r1, #8]
	ldrh r0, [r4, #0x16]
	cmp r0, #0
	bne _022F414C
	ldr r0, [r1]
	ldr r0, [r0, #0x33c]
	mov r0, r0, lsl #0x10
	mov r0, r0, asr #0x10
	bl FemaleToMaleForm
	ldr r1, _022F4354 ; =0x00000807
	bl GetIdleAnimationType
	ldrh r2, [r4, #0x10]
	ldr r1, _022F434C ; =ov11_02324CE0
	mov r2, r2, lsr #2
	add r2, r2, #4
	and r2, r2, #7
	ldr r3, [r1]
	mov r1, r0, lsl #0x10
	mov r2, r2, lsl #0x18
	add r0, r3, #0x18
	mov r1, r1, asr #0x10
	mov r2, r2, asr #0x18
	bl SetAnimDataFields2
_022F414C:
	ldr r1, [r4, #8]
	ldr r0, _022F434C ; =ov11_02324CE0
	rsb r1, r1, #0xf0
	mov r1, r1, lsl #8
	str r1, [r0, #0xc]
	ldr r0, [r0]
	ldr r2, _022F4350 ; =ov11_02324CE8
	ldr r1, [r0, #0x33c]
	add r0, r0, #0x18
	mov r1, r1, lsl #0x10
	mov r1, r1, asr #0x10
	mov r3, #0
	bl ov11_022F5C94
	ldr r0, _022F434C ; =ov11_02324CE0
	mov r1, #0x8100
	str r1, [r0, #8]
	ldr r1, [r4, #4]
	ldr r2, _022F4350 ; =ov11_02324CE8
	rsb r1, r1, #0xf0
	mov r1, r1, lsl #8
	str r1, [r0, #0xc]
	ldr r0, [r0]
	mov r3, #0
	ldr r1, [r0, #0x340]
	add r0, r0, #0xdc
	mov r1, r1, lsl #0x10
	mov r1, r1, asr #0x10
	bl ov11_022F5C94
	ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc}
_022F41C0:
	bl ov11_0231474C
	ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc}
_022F41C8:
	bl sub_0206B9DC
	ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc}
_022F41D0:
	bl ov11_0231474C
	cmp r0, #0
	ldmeqia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc}
	mov r0, #0
	bl ov11_0231598C
	ldrh r1, [r0]
	cmp r1, #0xff
	ldmeqia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc}
	ldr r


capacity(node.d_h.len());
    for (i, d) in node.d_h.iter().enumerate() {
        let mut new_d = sys.f_h[i].mul(&delta);
        new_d.add(d);
        new_d_h.push(new_d);
    }

    // Compute new e.
    let mut new_e = sys.h.mul(&delta);
    new_e.add(&node.e);

    BTENode {
        tau: new_tau,
        a: new_a,
        b: new_b,
        d_t: new_d_t,
        d_h: new_d_h,
        e: new_e,
    }
}

impl SecretKey {
    /// The current key (the end of list of BTENodes) of a `SecretKey` should
    /// always correspond to an epoch described by lambda_t bits. Some
    /// internal operations break this invariant, leaving less than lambda_t
    /// bits in the current key. This function should be called when this
    /// happens; it modifies the list so the current key corresponds to the
    /// first epoch of the subtree described by the current key.
    ///
    /// For example, if lambda_t = 5, then [..., 011] will change to
    /// [..., 0111, 01101, 01100].
    /// The current key's `tau` now has 5 bits, and the other entries cover the
    /// rest of the 011 subtree after we delete the current key.
    ///
    /// Another example: during the very first epoch the private key is
    /// [1, 01, 001, 0001, 00001, 00000].
    ///
    /// This makes key update easy: pop off the current key, then call this
    /// function.
    ///
    /// An alternative is to only store the root nodes of the subtrees that
    /// cover the remaining valid keys. Thus the first epoch, the private
    /// key would simply be \[0\], and would only change to [1, 01, 001, 0001,
    /// 00001] after the first update. Generally, some computations
    /// happen one epoch later than they would with our current scheme. However,
    /// key update is a bit fiddlier.
    ///
    /// No-op if `self` is empty.
    pub fn fast_derive(&mut self, sys: &SysParam, rng: &mut impl RAND) {
        let mut epoch = Vec::new();
        if self.bte_nodes.is_empty() {
            return;
        }
        let now = self.current().expect("bte_nodes unexpectedly empty");
        for i in 0..sys.lambda_t {
            if i < now.tau.len() {
                epoch.push(now.tau[i]);
            } else {
                epoch.push(Bit::Zero);
            }
        }
        self.update_to(&epoch, &sys, rng);
    }

    /// A simpler but slower variant of the above.
    pub fn slow_derive(&mut self, sys: &SysParam, rng: &mut impl RAND) {
        let mut append_me = match self.bte_nodes.pop_back() {
            None => return,
            Some(mut node) => {
                let mut ks = LinkedList::new();
                loop {
                    if node.d_t.is_empty() {
                        ks.push_back(node);
                        break;
                    }
                    ks.push_back(node_gen(&node, Bit::One, rng, sys));
                    node = node_gen(&node, Bit::Zero, rng, sys);
                }
                ks
            }
        };
        self.bte_nodes.append(&mut append_me);
    }

    fn new(bte_root: BTENode) -> SecretKey {
        let mut bte_nodes = LinkedList::new();
        bte_nodes.push_back(bte_root);
        SecretKey { bte_nodes }
    }

    /// Returns this key's  BTE-node that corresponds to the current epoc


,"dice");
     div.appendChild(div3);

     var dice3 = document.createElement("img");
     dice3.setAttribute("id","dice3");
     div3.appendChild(dice3);
    document.getElementById("dice3").setAttribute("src","./Assets/images/1.png");

    var div4 = document.createElement("div");
     div4.setAttribute("id","dice");
     div.appendChild(div4);

     var dice4 = document.createElement("img");
     dice4.setAttribute("id","dice4");
     div4.appendChild(dice4);
    document.getElementById("dice4").setAttribute("src","./Assets/images/1.png");

    var value1 = document.createElement("p");
     value1.setAttribute("id","value1");
     div1.appendChild(value1);

    var value2 = document.createElement("p");
     value2.setAttribute("id","value2");
     div2.appendChild(value2);

     var value3 = document.createElement("p");
     value3.setAttribute("id","value3");
     div3.appendChild(value3);

    var value4 = document.createElement("p");
     value4.setAttribute("id","value4");
     div4.appendChild(value4);

     var result = document.createElement("p");
     result.setAttribute("id","result");
     main.appendChild(result);

     var btn = document.getElementById("roll");
    btn.addEventListener("click",function(evt){
        var soundID = "Thunder";
        createjs.Sound.registerSound("./Assets/sounds/click.mp3", soundID);
        createjs.Sound.play(soundID);

        var spin1 = Math.floor(Math.random() * 6) + 1;
        var dice1img = `./Assets/images/${spin1}.png`;
        document.getElementById("dice1").setAttribute("src", dice1img);
       document.getElementById("value1").innerHTML = spin1;

       var spin2 = Math.floor(Math.random() * 6) + 1;
       var dice2img = `./Assets/images/${spin2}.png`;
       document.getElementById("dice2").setAttribute("src", dice2img);
       document.getElementById("value2").innerHTML = spin2;

       var spin3 = Math.floor(Math.random() * 6) + 1;
       var dice3img = `./Assets/images/${spin3}.png`;
       document.getElementById("dice3").setAttribute("src", dice3img);
       document.getElementById("value3").innerHTML = spin3;

       var spin4 = Math.floor(Math.random() * 6) + 1;
       var dice4img = `./Assets/images/${spin4}.png`;
       document.getElementById("dice4").setAttribute("src", dice4img);
       document.getElementById("value4").innerHTML = spin4;

       var minNum = Math.min(spin1,spin2,spin3,spin4);
       var total = spin1 + spin2 + spin3 + spin4;
       total -= minNum;
       document.getElementById("result").innerHTML = `total result is ${total} <br><br> lowest dice drops`;
      // document.getElementById("drop").innerHTML = `lowest dice drops`;

     });import { System, decorators, OBSERVER_TYPE } from '@eva/eva.js';
import PhysicsEngine from './PhysicsEngine';

@decorators.componentObserver({
  Physics: [{ prop: ['bodyParams'], deep: true }],
})
export default class PhysicsSystem extends System {
  static systemName = 'PhysicsSystem';
  private engine: PhysicsEngine;

  /**
   * System 初始化用，可以配置参数，游戏未开始
   *
   * System init, set params, game is not begain
   * @param param init params
   */
  init(param?: any) {


ass="r1-i" style="background-color: #1c1d26;">

This email was sent to {{ contact.EMAIL }}You received this email because you are registered with The Institute for Ethical AI & Machine Learning's newsletter "The Machine Learning Engineer"

<a href="{{ unsubscribe }}" style


TokenMatcherInterface<TT>): N | null;
}
// create here the inputs for the users

import { Field, InputType } from '@nestjs/graphql';

//this is the input for create a user
@InputType()
export class CreateUserInput {
    @Field()
    readonly name: string;

    @Field()
    readonly mail: string;

    @Field()
    readonly pass: string;

    @Field()
    readonly img: string;

    @Field()
    readonly role: string;

}

// generate input for uodate a user
@InputType()
export class UpdateUserInput {

    @Field()
    readonly id: string;

    @Field()
    readonly name: string;

    @Field()
    readonly mail: string;

    @Field()
    readonly pass: string;

    @Field()
    readonly img: string;

    @Field()
    readonly role: string;

}

// generate input for find a user
@InputType()
export class FindUserInput {
    @Field()
    readonly id: string;

}

@InputType()
export class FindLoginUserInput {
    @Field()
    readonly mail: string;
    @Field()
    readonly pass: string;

}// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

import * as pulumi from "@pulumi/pulumi";
import * as utilities from "../utilities";

/**
 * Provides a security group rule resource.
 * Represents a single `ingress` or `egress` group rule, which can be added to external Security Groups.
 *
 * > **NOTE:**  `nicType` should set to `intranet` when security group type is `vpc` or specifying the `sourceSecurityGroupId`. In this situation it does not distinguish between intranet and internet, the rule is effective on them both.
 *
 * ## Example Usage
 *
 * Basic Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as alicloud from "@pulumi/alicloud";
 *
 * const _default = new alicloud.ecs.SecurityGroup("default", {});
 * const allowAllTcp = new alicloud.ecs.SecurityGroupRule("allowAllTcp", {
 *     type: "ingress",
 *     ipProtocol: "tcp",
 *     nicType: "internet",
 *     policy: "accept",
 *     portRange: "1/65535",
 *     priority: 1,
 *     securityGroupId: _default.id,
 *     cidrIp: "0.0.0.0/0",
 * });
 * ```
 * ## Module Support
 *
 * You can use the existing security-group module
 * to create a security group and add several rules one-click.
 */
export class SecurityGroupRule extends pulumi.CustomResource {
    /**
     * Get an existing SecurityGroupRule resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SecurityGroupRuleState, opts?: pulumi.CustomResourceOptions): SecurityGroupRule {
        return new SecurityGroupRule(name, <any>state, { ...opts, id: id });
    }

    /** @internal */
    public static readonly __pulumiType = 'alicloud:ecs/securityGroupRule:SecurityGroupRule';

    /**
     * Returns true if the given object is an instance of SecurityGroupRule.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    public static isInstance(obj: any): obj is SecurityGroupRule {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] ===


 * J1.transpose() * invR * e, 1e-9, "Block 0");
    ASSERT_DOUBLE_MX_EQ(rhs.segment(Hessian.rowBaseOfBlock(1), J2.cols()), -2.0 * J2.transpose() * invR * e, 1e-9, "Block 1");
  } catch (const std::exception& e) {
    FAIL() << "Exception: " << e.what();
  }
}
/*
 * Marginalizer.h
 *
 *  Created on: May 24, 2013
 *      Author: mbuerki
 */

#ifndef MARGINALIZER_H_
#define MARGINALIZER_H_

#include <aslam/backend/DesignVariable.hpp>
#include <aslam/backend/MarginalizationPriorErrorTerm.hpp>
#include <aslam/backend/ErrorTerm.hpp>
#include <boost/shared_ptr.hpp>

namespace aslam {
namespace backend {

/// \brief Marginalizes out the given design variables
///
///	\param[IN] inDesignVariables list of input design variables to be marginalized
/// \param[IN] inErrorTerms list of all error terms related to the input design variables
/// \param[IN] numberOfInputDesignVariablesToRemove Number of input design variables to be removed.
/// 											The functions removes this many input design variables, starting at the beginning of
///												the list of input design variables. Therefore, the ordering of the design variables in the
///												input desing variables list matters!
/// \param[IN] useMEstimator					Wheter or not to use an M-Estimator in the QR sovler.
/// \param[OUT] outPriorErrorTermPtr			Shared pointer to the resulting marginalized prior error term.
///
void marginalize(
			std::vector<aslam::backend::DesignVariable*>& inDesignVariables,
			std::vector<aslam::backend::ErrorTerm*>& inErrorTerms,
			int numberOfInputDesignVariablesToRemove,
			bool useMEstimator,
			boost::shared_ptr<aslam::backend::MarginalizationPriorErrorTerm>& outPriorErrorTermPtr,
			Eigen::MatrixXd& outRtop,
			std::vector<aslam::backend::DesignVariable*>& designVariablesInvolvedInRtop,
			size_t numTopRowsInRtop = 0,
			size_t numThreads = 1
		);
} /* namespace backend */
} /* namespace aslam */
#endif /* MARGINALIZER_H_ */
#ifndef ASLAM_BACKEND_DENSE_MATRIX_HPP
#define ASLAM_BACKEND_DENSE_MATRIX_HPP

#include "Matrix.hpp"

namespace aslam {
  namespace backend {

    /// \class DenseMatrix
    /// \brief A very simple matrix wrapper.
    class DenseMatrix : public Matrix {
    public:
      DenseMatrix();

      virtual ~DenseMatrix();

      /// \brief Get a value from the matrix at row r and column c
      virtual double operator()(size_t r, size_t c) const;

      /// \brief The number of rows in the matrix.
      virtual size_t rows() const;

      /// \brief The number of columns in the matrix.
      virtual size_t cols() const;

      /// \brief Fill and return a dense matrix.
      Eigen::MatrixXd toDense() const;

      /// \brief Fill the input dense matrix. The default version just
      ///        Goes through the matrix calling operator(). Please override.
      virtual void toDenseInto(Eigen::MatrixXd& outM) const;

      /// \brief Initialize the matrix from a dense matrix
      virtual void fromDense(const Eigen::MatrixXd& M);

      /// \brief Initialize the matrix from a dense matrix.
      ///        Entries with absolute value less than tolerance
      ///        should be considered zeros.
      virtual void fromDenseTolerance(const Eigen::MatrixXd& M, double tolerance);

      /// \brief right multiply the vector y = A x
      virtual void rightMultiply(const Eigen::VectorXd& x, Eigen::VectorXd& outY) const;

      /// \brief left multiply the vector y = A^T x
      vir


using Memoria.Prime.CSV;
using System;

namespace Memoria.Data
{
    public class BattleMagicSwordSet : ICsvEntry
    {
        public Int32 Id;
        public CharacterId Supporter;
        public CharacterId Beneficiary;
        public Int32[] BaseAbilities;
        public Int32[] UnlockedAbilities;
        public BattleStatus SupporterBlockingStatus;
        public BattleStatus BeneficiaryBlockingStatus;

        public void ParseEntry(String[] raw, CsvMetaData metadata)
        {
            Int32 index = 0;
            Id = CsvParser.Int32(raw[index++]);
            Supporter = (CharacterId)CsvParser.Int32(raw[index++]);
            Beneficiary = (CharacterId)CsvParser.Int32(raw[index++]);
            BaseAbilities = CsvParser.AnyAbilityArray(raw[index++]);
            UnlockedAbilities = CsvParser.AnyAbilityArray(raw[index++]);

            if (metadata.HasOption($"IncludeStatusBlockers"))
            {
                metadata.AddOption("UnshiftStatuses");
                SupporterBlockingStatus = BattleStatusEntry.ParseBattleStatus(raw[index++],


ad returned to the caller.
	public int EncodeValue(BigInteger value, byte[] decBytes, int lsbIndex)
	{
		ValidateLsbIndex(lsbIndex, decBytes.Length);

		return EncodeValue0(BigInteger.Abs(value), decBytes, lsbIndex);
	}

	BigInteger DecodeValue0(int signum, int firstDigit, byte[] decBytes, int lsbIndex)
	{
		var digitChars = CreateZeroedCharArray();
		for (var digitGroup = 0; digitGroup < _digitGroups; digitGroup++)
		{
			// Each digit group is 10 bits in two bytes in the array as [.., second, first, ..],
			// moving to the left for next digit groups. If there are unconsumed bits in the second byte,
			// the second byte becomes the first byte of the next group.
			var digitBitsFromEnd = digitGroup * BitsPerGroup;
			var firstByteBitOffset = digitBitsFromEnd % BitPerByte;
			var firstByteIndex = lsbIndex - digitBitsFromEnd / BitPerByte;

			var dpdGroupBits = 0x3FF & (
					(decBytes[firstByteIndex] & 0xFF) >>> firstByteBitOffset
							| decBytes[firstByteIndex - 1] << BitPerByte - firstByteBitOffset);

			if (dpdGroupBits != 0)
			{
				Array.Copy(DPDGroupBits2Digits, dpdGroupBits * DigitsPerGroup, digitChars, digitChars.Length - (digitGroup + 1) * DigitsPerGroup, DigitsPerGroup);
			}
		}
		if (firstDigit != 0)
		{
			digitChars[1] = char.Parse(firstDigit.ToString());
		}

		return ToBigInteger(signum, digitChars);
	}

	int EncodeValue0(BigInteger value, byte[] decBytes, int lsbIndex)
	{
		var remainingValue = value;
		for (var digitGroup = 0; digitGroup < _digitGroups; digitGroup++)
		{
			// Each digit group is 10 bits in two bytes in the array as [.., second, first, ..],
			// moving to the left for next digit groups. If there are unconsumed bits in the second byte,
			// the second byte becomes the first byte of the next group.
			var digitBitsFromEnd = digitGroup * BitsPerGroup;
			var firstByteBitOffset = digitBitsFromEnd % BitPerByte;
			var firstByteIndex = lsbIndex - digitBitsFromEnd / BitPerByte;

			remainingValue = BigInteger.DivRem(remainingValue, OneThousand, out var remainder);
			var currentGroup = Bin2DPD[(int)remainder];

			decBytes[firstByteIndex] =
					(byte)(decBytes[firstByteIndex] | (currentGroup << firstByteBitOffset));
			decBytes[firstByteIndex - 1] =
					(byte)(decBytes[firstByteIndex - 1] | (currentGroup >>> BitPerByte - firstByteBitOffset));
		}
		var mostSignificantDigit = (int)remainingValue;
		Debug.Assert(0 <= mostSignificantDigit && mostSignificantDigit <= 9, $"{nameof(mostSignificantDigit)} out of range, was {mostSignificantDigit}.");
		return mostSignificantDigit;
	}

	char[] CreateZeroedCharArray()
	{
		var digitChars = new char[_numberOfDigits + 1];
		for (var i = 0; i < digitChars.Length; i++)
		{
			digitChars[i] = '0';
		}
		return digitChars;
	}

	void ValidateLsbIndex(int lsbIndex, int decBytesLength)
	{
		if (lsbIndex < 0 || lsbIndex >= decBytesLength)
		{
			throw new IndexOutOfRangeException($"{nameof(lsbIndex)} must be within array {nameof(dec


 cc are passed in'
  },
  {
    expected: `${mailToEmail}?cc=${encodeURIComponent(cc)}&subject=${encodeURIComponent(
      subject
    )}&bcc=${encodeURIComponent(bcc)}`,
    args: { to: emailAddress, cc, subject, bcc },
    assertMsg:
      'it should return a mailto: string with an email, subject, bcc, and a cc query when to, subject, bcc, and cc are passed in'
  },
  {
    expected: `${mailToEmail}?cc=${encodeURIComponent(cc)}&subject=${encodeURIComponent(
      subject
    )}&bcc=${encodeURIComponent(bcc)}&body=${encodeURIComponent(body)}`,
    args: { to: emailAddress, cc, subject, bcc, body },
    assertMsg:
      'it should return a mailto: string with an email, subject, bcc, body, and a cc query when to, subject, bcc, body, and cc are passed in'
  }
];

export { emailMailToAsserts };
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Persons } from 'src/model/persons';

@Injectable({
  providedIn: 'root'
})
export class PersonService {
         //'http://localhost:8080/persons'
  _url = '/persons';

  constructor(private _http: HttpClient) { }

  // Get all persons.
  public getPersons(_url?:string) {
    console.log(`Request going to : ${this._url}`)
    return this._http.get<Persons[]>(`${this._url}`);
  }

  // Get persons based on the search criteria. It could be either, one or none.
  public getPersonswithCriteria(person: Persons) {
    console.log(`Criteria Request going to : ${this._url} , parameters: ${person.firstName}, ${person.lastName}`);

    return this._http.get<Persons[]>(`${this._url}/find`, {
      params: {
        fName: person.firstName,
        lName: person.lastName
        }
    });
  }
}
/**
 * Command run-all.
 */
import { Const, RawTextHelpFormatter, SubParser } from "argparse";

import { combineCommonOptionsWithConfig,
         execForAllPackages } from "../common-fns";
import * as commonOptions from "../common-options";
import { MonistConfig } from "../config";

const commandName = "run";

// tslint:disable-next-line:no-any
async function runCommand(config: MonistConfig,
                          args: Record<string, any>): Promise<void> {
  return execForAllPackages(config, "npm", [commandName].concat(args.cmd),
                            combineCommonOptionsWithConfig(commandName, args,
                                                           config));
}

export function addParser(subparsers: SubParser): void {
  const { serial, localDeps, inhibitSubprocessOutput } = commonOptions;

  const run = subparsers.addParser(commandName, {
    argumentDefault: Const.SUPPRESS,
    description: `\
Run a script on all packages. For instance, running \`monist ${commandName}
build\` \ would, for all packages:

 - move to the package's directory
 - run \`npm run build\`

The packages are visited in an order that takes into account depedencies. If, \
say, package A depends on package B and C, then packages B and C will be \
visited before package A. And if package B depends on package C, then package \
C will be visited first.

This command takes advantage of opportunities for parallelism. Here's a simple \
example. You have a monorepo with packages A and B, which depend on no other \
package. \`monist npm\` will


// Berkeley Open Infrastructure for Network Computing
// http://boinc.berkeley.edu
// Copyright (C) 2005 University of California
//
// This 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.
//
// This software 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.
//
// To view the GNU Lesser General Public License visit
// http://www.gnu.org/copyleft/lesser.html
// or write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
//

#ifndef _CASHUTDOWNBOINC_H_
#define _CASHUTDOWNBOINC_H_

class CAShutdownBOINC : public BOINCCABase
{
public:

    CAShutdownBOINC(MSIHANDLE hMSIHandle);
    ~CAShutdownBOINC();
    virtual UINT OnExecution();

};

#endif


= {},
		grid = {
			{
				-2,
				-1,
				-2,
				-1
			},
			{
				-1,
				2,
				-1,
				2
			},
			{
				2,
				1,
				2,
				1
			},
			{
				1,
				-2,
				1,
				-2
			}
		},
		slg_bufflist = {},
		slg_buffnum = {},
		map_buff = {},
		deviation = {
			0,
			-15
		}
	},
	[2000011] = {
		enemyicon = 4,
		name = "",
		visuality = 0,
		scale = 0,
		auto_pri = 0,
		icontype = 2,
		is_scanevent = 0,
		obstacle = 6,
		event_sight = -1,
		icon = "1x1XWIsLand_3",
		special_enemy = 0,
		infection_value = 0,
		compass_index = 0,
		discover_type = 2,
		scan_desc = "",
		expedition_icon = 0,
		is_guide = 0,
		object_icon = "",
		id = 2000011,
		event_op = {},
		effect = {},
		grid = {
			{
				0,
				1,
				0,
				1
			},
			{
				0,
				-1,
				0,
				-1
			},
			{
				-1,
				0,
				-1,
				0
			},
			{
				1,
				0,
				1,
				0
			}
		},
		slg_bufflist = {},
		slg_buffnum = {},
		map_buff = {},
		deviation = {}
	},
	[2000012] = {
		enemyicon = 4,
		name = "",
		visuality = 0,
		scale = 0,
		auto_pri = 0,
		icontype = 2,
		is_scanevent = 0,
		obstacle = 6,
		event_sight = -1,
		icon = "1x1XWIsLand_2",
		special_enemy = 0,
		infection_value = 0,
		compass_index = 0,
		discover_type = 2,
		scan_desc = "",
		expedition_icon = 0,
		is_guide = 0,
		object_icon = "",
		id = 2000012,
		event_op = {},
		effect = {},
		grid = {
			{
				0,
				1,
				0,
				1
			},
			{
				0,
				-1,
				0,
				-1
			},
			{
				-1,
				0,
				-1,
				0
			},
			{
				1,
				0,
				1,
				0
			}
		},
		slg_bufflist = {},
		slg_buffnum = {},
		map_buff = {},
		deviation = {}
	},
	[2000013] = {
		enemyicon = 5,
		name = "",
		visuality = 0,
		scale = 0,
		auto_pri = 0,
		icontype = 2,
		is_scanevent = 0,
		obstacle = 6,
		event_sight = -1,
		icon = "1x1XWIsLand_2",
		special_enemy = 0,
		infection_value = 0,
		compass_index = 0,
		discover_type = 2,
		scan_desc = "",
		expedition_icon = 0,
		is_guide = 0,
		object_icon = "",
		id = 2000013,
		event_op = {},
		effect = {},
		grid = {
			{
				0,
				2,
				0,
				2
			},
			{
				0,
				-2,
				0,
				-2
			},
			{
				-2,
				0,
				-2


errors }}

                {% else %}

                        {{ field.label|default:"Field" }}  {{ field|default:"Field" }}

                              {{ field.help_text|default:"" }}

                {% endif %}

            {% else %}

                    {{ field.label|default:"" }}

                    {% if field.errors %}

                                {{ field|default:"Field" }}
                                {{ field.errors|default:"" }}

                    {% else %}
                        {{ field|default:"Field" }}{{ field.help_text|default:"" }}
                    {% endif %}

            {% endif %}

    {% endfor %}

    <input class="btn btn-success" type="submit" value="Save" data-role="button" />
    {% block extra_buttons%}{% endblock %}
</form>


// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//  * Redistributions of source code must retain the above copyright
//    notice, this list of conditions and the following disclaimer.
//  * Redistributions in binary form must reproduce the above copyright
//    notice, this list of conditions and the following disclaimer in the
//    documentation and/or other materials provided with the distribution.
//  * Neither the name of NVIDIA CORPORATION nor the names of its
//    contributors may be used to endorse or promote products derived
//    from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Copyright (c) 2016-2024 NVIDIA Corporation. All rights reserved.

#ifndef NVBLASTARRAY_H
#define NVBLASTARRAY_H

#include "NvBlastAllocator.h"
#include "NsInlineArray.h"

namespace Nv
{
namespace Blast
{

/**
Wrapped NvShared Array that uses NvBlastGlobals AllocatorCallback.
*/
template <class T>
struct Array
{
    typedef nvidia::shdfnd::Array<T, Allocator> type;
};

/**
Wrapped NvShared InlineArray that uses NvBlastGlobals AllocatorCallback.

InlineArraya is array that pre-allocates for N elements.
*/
template <class T, uint32_t N>
struct InlineArray
{
    typedef nvidia::shdfnd::InlineArray<T, N, Allocator> type;
};

} // namespace Blast
} // namespace Nv

#endif // #ifndef NVBLASTARRAY_H


_obs

  def step(self, act):
    act = act.ravel()
    obs = self.curr_obs
    if self.using_rnn_dyn:
      obs = obs[:self.env.n_z_dim]

    data = self.dynamics_model.compute_next_obs(
        obs[np.newaxis, :],
        act[np.newaxis, :],
        init_state=self.curr_hidden_state)

    prev_obs = deepcopy(self.curr_obs)
    self.curr_obs = data['next_obs'].ravel()
    if self.using_rnn_dyn:
      self.curr_hidden_state = data['next_state']
    r = self.env.reward_func(prev_obs[np.newaxis, :], act[np.newaxis, :],
                             self.curr_obs[np.newaxis, :])
    done = False
    prob_succ = self.env.prob_succ(self.curr_obs[np.newaxis, :])[0]
    prob_crash = self.env.prob_crash(self.curr_obs[np.newaxis, :])[0]
    info = {'succ': prob_succ, 'crash': prob_crash}

    return self.curr_obs, r, done, info

def rollout_in_dream(policy,
                     env,
                     dynamics_model,
                     init_obs=None,
                     max_ep_len=None):
  dream_env = DreamEnv(env, dynamics_model)
  if init_obs is not None:
    dream_env.env.default_init_obs = init_obs
  rollout = run_ep(policy, dream_env, max_ep_len=max_ep_len)
  init_act_seq = act_seq_of_rollout(rollout)
  init_traj = traj_of_rollout(rollout)
  return init_traj, init_act_seq

def bal_weights(elts):
  size = len(elts)
  weights = np.ones(size)
  idxes_of_elt = collections.defaultdict(list)
  for idx, elt in enumerate(elts):
    idxes_of_elt[elt].append(idx)
  n_classes = len(idxes_of_elt)
  for elt, idxes in idxes_of_elt.items():
    weights[idxes] = size / (n_classes * len(idxes))
  return weights

def opt_scope_of_obj(obj):
  return str(uuid.uuid4())


ry_mac_type_spec_hmac_stribog512;
#endif
#if USE_WHIRLPOOL
extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_whirlpool;
#endif
#if USE_RMD160
extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_rmd160;
#endif
#if USE_TIGER
extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_tiger1;
#endif
#if USE_MD5
extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_md5;
#endif
#if USE_MD4
extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_md4;
#endif

/*
 * The CMAC algorithm specifications (mac-cmac.c).
 */
#if USE_BLOWFISH
extern gcry_mac_spec_t _gcry_mac_type_spec_cmac_blowfish;
#endif
#if USE_DES
extern gcry_mac_spec_t _gcry_mac_type_spec_cmac_tripledes;
#endif
#if USE_CAST5
extern gcry_mac_spec_t _gcry_mac_type_spec_cmac_cast5;
#endif
#if USE_AES
extern gcry_mac_spec_t _gcry_mac_type_spec_cmac_aes;
#endif
#if USE_TWOFISH
extern gcry_mac_spec_t _gcry_mac_type_spec_cmac_twofish;
#endif
#if USE_SERPENT
extern gcry_mac_spec_t _gcry_mac_type_spec_cmac_serpent;
#endif
#if USE_RFC2268
extern gcry_mac_spec_t _gcry_mac_type_spec_cmac_rfc2268;
#endif
#if USE_CAMELLIA
extern gcry_mac_spec_t _gcry_mac_type_spec_cmac_camellia;
#endif
#ifdef USE_IDEA
extern gcry_mac_spec_t _gcry_mac_type_spec_cmac_idea;
#endif
#if USE_GOST28147
extern gcry_mac_spec_t _gcry_mac_type_spec_cmac_gost28147;
#endif

/*
 * The GMAC algorithm specifications (mac-gmac.c).
 */
#if USE_AES
extern gcry_mac_spec_t _gcry_mac_type_spec_gmac_aes;
#endif
#if USE_TWOFISH
extern gcry_mac_spec_t _gcry_mac_type_spec_gmac_twofish;
#endif
#if USE_SERPENT
extern gcry_mac_spec_t _gcry_mac_type_spec_gmac_serpent;
#endif
#if USE_CAMELLIA
extern gcry_mac_spec_t _gcry_mac_type_spec_gmac_camellia;
#endif

/*
 * The Poly1305 MAC algorithm specifications (mac-poly1305.c).
 */
extern gcry_mac_spec_t _gcry_mac_type_spec_poly1305mac;
#if USE_AES
extern gcry_mac_spec_t _gcry_mac_type_spec_poly1305mac_aes;
#endif
#if USE_CAMELLIA
extern gcry_mac_spec_t _gcry_mac_type_spec_poly1305mac_camellia;
#endif
#if USE_TWOFISH
extern gcry_mac_spec_t _gcry_mac_type_spec_poly1305mac_twofish;
#endif
#if USE_SERPENT
extern gcry_mac_spec_t _gcry_mac_type_spec_poly1305mac_serpent;
#endif


c override readonly int GetHashCode() => Value.GetHashCode();
    public static bool operator ==(SPRECOCONTEXTHANDLE left, SPRECOCONTEXTHANDLE right) => left.Equals(right);
    public static bool operator !=(SPRECOCONTEXTHANDLE left, SPRECOCONTEXTHANDLE right) => !left.Equals(right);
    public static implicit operator nint(SPRECOCONTEXTHANDLE value) => value.Value;
    public static implicit operator SPRECOCONTEXTHANDLE(nint value) => new(value);

    readonly nint IValueGet<nint>.GetValue() => Value;
    readonly object? IValueGet.GetValue() => Value;
}


e);

    // Balancer should unassign the region
    assertTrue("Balancer did not run", admin.balance());
    TEST_UTIL.waitUntilNoRegionsInTransition();

    admin.assign(region.getEncodedNameAsBytes());
    TEST_UTIL.waitUntilNoRegionsInTransition(60000);

    currentFN = fnm.getFavoredNodes(region);
    assertNotNull(currentFN);
    assertEquals("Expected number of FN not present", FavoredNodeAssignmentHelper.FAVORED_NODES_NUM,
      currentFN.size());

    assertTrue("Balancer did not run", admin.balance());
    TEST_UTIL.waitUntilNoRegionsInTransition(60000);

    checkFavoredNodeAssignments(tableName, fnm, regionStates);
  }

  @Ignore
  @Test
  public void testMisplacedRegions() throws Exception {
    TableName tableName = TableName.valueOf("testMisplacedRegions");
    TableDescriptor tableDescriptor = TableDescriptorBuilder.newBuilder(tableName)
      .setColumnFamily(ColumnFamilyDescriptorBuilder.of(HConstants.CATALOG_FAMILY)).build();
    admin.createTable(tableDescriptor, Bytes.toBytes("aaa"), Bytes.toBytes("zzz"), REGION_NUM);
    TEST_UTIL.waitTableAvailable(tableName);

    final RegionInfo misplacedRegion = admin.getRegions(tableName).get(0);
    FavoredNodesManager fnm = master.getFavoredNodesManager();
    List<ServerName> currentFN = fnm.getFavoredNodes(misplacedRegion);
    assertNotNull(currentFN);

    List<ServerName> serversForNewFN = Lists.newArrayList();
    for (ServerName sn : admin.getClusterMetrics(EnumSet.of(Option.LIVE_SERVERS))
      .getLiveServerMetrics().keySet()) {
      serversForNewFN.add(ServerName.valueOf(sn.getHostname(), sn.getPort(), NON_STARTCODE));
    }
    for (ServerName sn : currentFN) {
      serversForNewFN.remove(sn);
    }
    FavoredNodeAssignmentHelper helper = new FavoredNodeAssignmentHelper(serversForNewFN, conf);
    helper.initialize();
    List<ServerName> newFavoredNodes = helper.generateFavoredNodes(misplacedRegion);
    assertNotNull(newFavoredNodes);
    assertEquals(FavoredNodeAssignmentHelper.FAVORED_NODES_NUM, newFavoredNodes.size());
    Map<RegionInfo, List<ServerName>> regionFNMap = Maps.newHashMap();
    regionFNMap.put(misplacedRegion, newFavoredNodes);
    fnm.updateFavoredNodes(regionFNMap);

    final RegionStates regionStates = master.getAssignmentManager().getRegionStates();
    final ServerName current = regionStates.getRegionServerOfRegion(misplacedRegion);
    assertNull("Misplaced region is still hosted on favored node, not expected.",
      FavoredNodesPlan.getFavoredServerPosition(fnm.getFavoredNodes(misplacedRegion), current));
    admin.balancerSwitch(true, true);
    assertTrue("Balancer did not run", admin.balance());
    TEST_UTIL.waitFor(120000, 30000, new Waiter.Predicate<Exception>() {
      @Override
      public boolean evaluate() throws Exception {
        ServerName host = regionStates.getRegionServerOfRegion(misplacedRegion);
        return !ServerName.isSameAddress(host, current);
      }
    });
    checkFavoredNodeAssignments(tableName, fnm, regionStates);
  }

  @Test
  public void test2FavoredNodesDead() throws Exception {
    TableName tableName = TableName.valueOf("testAllFavoredNodesDead");
    TableDescriptor tableDescriptor = TableDescriptorBuilder.newBuilder(tableName)
      .setColumnFamily(ColumnFamilyDescriptorBuilder.of(HConstants.CATALOG_FAMILY)).build();
    admin.createTable(tableDescriptor, Bytes.toBytes("aaa"), Bytes.toBytes("zzz"), REGION_NUM);
    TEST_UTIL.wait


// SPDX-License-Identifier: Apache-2.0
// Copyright 2023 The Prime Citizens

//go:build !noos && js && wasm

#include "textflag.h"

// wasm_export_run has wasm signature of (argc i32, argv i32) -> ()
//
// it gets called from JavaScript.
//
// In the official go std, it is the entrypoint of the js/wasm program.
// But in pcz, it is used to handle callbacks.
//
// R0: argc (i32), heap.Ref<CallbackContext>, if 0, continue paused execution.
// R1: argv (i32), optional SP.
TEXT wasm_export_run(SB),NOSPLIT|NOFRAME,$0
	Get R1
	I32Eqz
	Not
	If
	  Get R1
	  Set SP
	End

	Get R0
	I32Eqz
	If
	  // the program is awaiting.
	  Call wasm_pc_f_loop(SB)
	  Return
	End

	// prepare arg ctx and pLR for handleCallback
	Get SP
	I32Const $16 // 8 bytes for args, 8 bytes for LR
	I32Sub
	Set SP

	Get SP
	Get R0
	I64ExtendI32U
	I64Store32 $8 // 8(SP) = R0 (= ref ctx)

	Get SP
	I64Const $wasm_pc_f_loop(SB)
	I64Store // LR

	I32Const $0
	Call ·handleCallback(SB)
	If
	  // the callback issued awaiting, return immediately as PAUSE is set to 1.
	  Return
	End

	// only loop for async callback, synchronous callbacks (go -> js -> go)
	// are expected to resume the program on its own.
	Get PAUSE
	If
	  Call wasm_pc_f_loop(SB)
	Else
	  // pop args for `Call ·handleCallback(SB)` (LR already poped by it)
	  Get SP
	  I32Const $8
	  I32Add
	  Set SP
	End

	Return

// wasm_pc_f_loop has wasm signature of () -> ()
//
// NOTE: this function is different from the `wasm_pc_f_loop` found in
// the standard go runtime.
TEXT wasm_pc_f_loop(SB),NOSPLIT|NOFRAME,$0
	I32Const $0
	Set PAUSE

loop:
	Loop
	  Get SP
	  I32Const $8
	  I32Sub
	  I64Load $0
	  I64Const $wasm_pc_f_loop(SB)
	  I64Eq
	  If
	    // reached end of the loop (callback done), pop the LR and return.
	    Get SP


, 2, 13, 4, 15, 6, 17, 8, -19, 20, 21, 22, 23, 24, -127]);
/// ```
/// * **Intrinsic:** [`_mm256_sign_epi8`]
/// * **Assembly:** `vpsignb ymm, ymm, ymm`
#[must_use]
#[inline(always)]
#[cfg_attr(docs_rs, doc(cfg(target_feature = "avx2")))]
pub fn sign_apply_i8_m256i(a: m256i, b: m256i) -> m256i {
  m256i(unsafe { _mm256_sign_epi8(a.0, b.0) })
}

/// Lanewise `a * signum(b)` with lanes as `i16`
///
/// * If `b` is positive, the output is `a`.
/// * If `b` is zero, the output is 0.
/// * If `b` is negative, the output is `-a`.
/// ```
/// # use safe_arch::*;
/// let a = m256i::from([5_i16, 6, 2, 5, 4, 3, 1, 0, -12, 13, 56, 21, 8, 7, 6, 5]);
/// let b = m256i::from([12000_i16, 13000, -2, -8, 0, 1, 2, 3, -8, -7, 6, 5, 0, 0, 0, 978]);
/// let c: [i16; 16] = sign_apply_i16_m256i(a, b).into();
/// assert_eq!(c, [5, 6, -2, -5, 0, 3, 1, 0, 12, -13, 56, 21, 0, 0, 0, 5]);
/// ```
/// * **Intrinsic:** [`_mm256_sign_epi16`]
/// * **Assembly:** `vpsignw ymm, ymm, ymm`
#[must_use]
#[inline(always)]
#[cfg_attr(docs_rs, doc(cfg(target_feature = "avx2")))]
pub fn sign_apply_i16_m256i(a: m256i, b: m256i) -> m256i {
  m256i(unsafe { _mm256_sign_epi16(a.0, b.0) })
}

/// Lanewise `a * signum(b)` with lanes as `i32`
///
/// * If `b` is positive, the output is `a`.
/// * If `b` is zero, the output is 0.
/// * If `b` is negative, the output is `-a`.
/// ```
/// # use safe_arch::*;
/// let a = m256i::from([0_i32, 1, 2, 3, 4, 5, 6, 7]);
/// let b = m256i::from([0_i32, 0, -2, -13, 4, 15, 6, -17]);
/// let c: [i32; 8] = sign_apply_i32_m256i(a, b).into();
/// assert_eq!(c, [0_i32, 0, -2, -3, 4, 5, 6, -7]);
/// ```
/// * **Intrinsic:** [`_mm256_sign_epi32`]
/// * **Assembly:** `vpsignd ymm, ymm, ymm`
#[must_use]
#[inline(always)]
#[cfg_attr(docs_rs, doc(cfg(target_feature = "avx2")))]
pub fn sign_apply_i32_m256i(a: m256i, b: m256i) -> m256i {
  m256i(unsafe { _mm256_sign_epi32(a.0, b.0) })
}

/// Lanewise `u16` shift left by the lower `u64` lane of `count`.
/// ```
/// # use safe_arch::*;
/// let a = m256i::from([5_u16, 6, 2, 5, 4, 3, 1, 0, 12, 13, 56, 21, 8, 7, 6, 5]);
/// let


       break;
    case CMP_FORMAT_BC4_S:
        m_GLnum = GL_COMPRESSED_SIGNED_RED_RGTC1;
        break;
    case CMP_FORMAT_BC5:
    case CMP_FORMAT_ATI2N:
    case CMP_FORMAT_ATI2N_XY:
    case CMP_FORMAT_ATI2N_DXT5:
        m_GLnum = GL_COMPRESSED_RG_RGTC2;
        break;
    case CMP_FORMAT_BC5_S:
        m_GLnum = GL_COMPRESSED_SIGNED_RG_RGTC2;
        break;
    case CMP_FORMAT_BC6H:
        m_GLnum = GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT;
        break;
    case CMP_FORMAT_BC6H_SF:
        m_GLnum = GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT;
        break;
    case CMP_FORMAT_BC7:
        m_GLnum = GL_COMPRESSED_RGBA_BPTC_UNORM;
        break;
    case CMP_FORMAT_ETC_RGB:
    case CMP_FORMAT_ETC2_RGB:
        m_GLnum = GL_COMPRESSED_RGB8_ETC2;
        break;
    case CMP_FORMAT_ETC2_SRGB:
        m_GLnum = GL_COMPRESSED_SRGB8_ETC2;
        break;
    case CMP_FORMAT_ETC2_RGBA:
        m_GLnum = GL_COMPRESSED_RGBA8_ETC2_EAC;
        break;
    case CMP_FORMAT_ETC2_RGBA1:
        m_GLnum = GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2;
        break;
    case CMP_FORMAT_ETC2_SRGBA:
        m_GLnum = GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC;
        break;
    case CMP_FORMAT_ETC2_SRGBA1:
        m_GLnum = GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2;
        break;
#if (OPTION_BUILD_ASTC == 1)
    case CMP_FORMAT_ASTC:
        if ((pSourceTexture->nBlockWidth == 4) && (pSourceTexture->nBlockHeight == 4))
            m_GLnum = GL_COMPRESSED_RGBA_ASTC_4x4_KHR;
        else if ((pSourceTexture->nBlockWidth == 5) && (pSourceTexture->nBlockHeight == 4))
            m_GLnum = GL_COMPRESSED_RGBA_ASTC_5x4_KHR;
        else if ((pSourceTexture->nBlockWidth == 5) && (pSourceTexture->nBlockHeight == 5))
            m_GLnum = GL_COMPRESSED_RGBA_ASTC_5x5_KHR;
        else if ((pSourceTexture->nBlockWidth == 6) && (pSourceTexture->nBlockHeight == 5))
            m_GLnum = GL_COMPRESSED_RGBA_ASTC_6x5_KHR;
        else if ((pSourceTexture->nBlockWidth == 6) && (pSourceTexture->nBlockHeight == 6))
            m_GLnum = GL_COMPRESSED_RGBA_ASTC_6x6_KHR;
        else if ((pSourceTexture->nBlockWidth == 8) && (pSourceTexture->nBlockHeight == 5))
            m_GLnum = GL_COMPRESSED_RGBA_ASTC_8x5_KHR;
        else if ((pSourceTexture->nBlockWidth == 8) && (pSourceTexture->nBlockHeight == 6))
            m_GLnum = GL_COMPRESSED_RGBA_ASTC_8x6_KHR;
        else if ((pSourceTexture->nBlockWidth == 8) && (pSourceTexture->nBlockHeight == 8))
            m_GLnum = GL_COMPRESSED_RGBA_ASTC_8x8_K


    a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
-+    d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
-+    c = md5_ii(c, d, a, b, x[i+ 2], 15,  718787259);
-+    b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
-+
-+    a = safe_add(a, olda);
-+    b = safe_add(b, oldb);
-+    c = safe_add(c, oldc);
-+    d = safe_add(d, oldd);
-+  }
-+  return Array(a, b, c, d);
-+
-+}
-+
-+/*
-+ * These functions implement the four basic operations the algorithm uses.
-+ */
-+function md5_cmn(q, a, b, x, s, t)
-+{
-+  return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
-+}
-+function md5_ff(a, b, c, d, x, s, t)
-+{
-+  return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
-+}
-+function md5_gg(a, b, c, d, x, s, t)
-+{
-+  return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
-+}
-+function md5_hh(a, b, c, d, x, s, t)
-+{
-+  return md5_cmn(b ^ c ^ d, a, b, x, s, t);
-+}
-+function md5_ii(a, b, c, d, x, s, t)
-+{
-+  return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
-+}
-+
-+/*
-+ * Calculate the HMAC-MD5, of a key and some data
-+ */
-+function core_hmac_md5(key, data)
-+{
-+  var bkey = str2binl(key);
-+  if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz);
-+
-+  var ipad = Array(16), opad = Array(16);
-+  for(var i = 0; i < 16; i++)
-+  {
-+    ipad[i] = bkey[i] ^ 0x36363636;
-+    opad[i] = bkey[i] ^ 0x5C5C5C5C;
-+  }
-+
-+  var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz);
-+  return core_md5(opad.concat(hash), 512 + 128);
-+}
-+
-+/*
-+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
-+ * to work around bugs in some JS interpreters.
-+ */
-+function safe_add(x, y)
-+{
-+  var lsw = (x & 0xFFFF) + (y & 0xFFFF);
-+  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
-+  return (msw << 16) | (lsw & 0xFFFF);
-+}
-+
-+/*
-+ * Bitwise rotate a 32-bit number to the left.
-+ */
-+function bit_rol(num, cnt)
-+{
-+  return (num << cnt) | (num >>> (32 - cnt));
-+}
-+
-+/*
-+ * Convert a string to an array of little-endian words
-+ * If chrsz is ASCII, characters >255 have their hi-byte silent


ar.client.api.plugins.DisposablePlugin
import org.runestar.client.api.game.live.Keyboard
import org.runestar.client.raw.CLIENT
import org.runestar.client.raw.access.XClient
import org.runestar.client.api.plugins.PluginSettings

class AntiDrag : DisposablePlugin<AntiDrag.Settings>() {

    override val defaultSettings = Settings()

    override val name = "Anti-Drag"

    private var dragDurationBuffer = 0

    override fun onStart() {
        add(XClient.doCycle.enter.filter { Keyboard.isKeyPressed(settings.keyCode.value) }.subscribe { onCycle() })
    }

    private fun onCycle() {
        if (dragDurationBuffer >= settings.delay) {
            dragDurationBuffer = 0
            return
        }
        if (CLIENT.itemDragDuration == 1) {
            dragDurationBuffer++
            CLIENT.itemDragDuration = 0
        }
    }

    class Settings(
            val keyCode: KeyCodeForm = KeyCodeForm("CONTROL"),
            val delay: Int = 25
    ) : PluginSettings()
}package org.runestar.client.plugins.minimapdots

import org.runestar.client.api.forms.RgbForm
import org.runestar.client.api.plugins.DisposablePlugin
import org.runestar.client.raw.CLIENT
import org.runestar.client.raw.access.XSprite
import org.runestar.client.api.plugins.PluginSettings
import java.awt.Color

class MinimapDots : DisposablePlugin<MinimapDots.Settings>() {

    override val defaultSettings = Settings()

    override val name = "Minimap Dots"

    private var originalDots: Array<XSprite>? = null

    override fun onStart() {
        originalDots = CLIENT.mapDotSprites.clone()
        val dots = CLIENT.mapDotSprites
        if (settings.items.enabled) {
            recolorDot(dots, 0, settings.items.color.value)
        }
        if (settings.npcs.enabled) {
            recolorDot(dots, 1, settings.npcs.color.value)
        }
        if (settings.players.enabled) {
            recolorDot(dots, 2, settings.players.color.value)
        }
        if (settings.friends.enabled) {
            recolorDot(dots, 3, settings.friends.color.value)
        }
        if (settings.team.enabled) {
            recolorDot(dots, 4, settings.team.color.value)
        }
        if (settings.clan.enabled) {
            recolorDot(dots, 5, settings.clan.color.value)
        }
    }

    override fun onStop() {
        CLIENT.mapDotSprites = originalDots
    }

    private fun recolorDot(dots: Array<XSprite>, index: Int, color: Color) {
        val dot = dots[index].copy()
        dots[index] = dot
        val pixels = dot.pixels
        for (j in pixels.indices) {
            val c = pixels[j]
            if (c != 0 && c != 1) {
                pixels[j] = color.rgb
            }
        }
    }

    data class Settings(
            val items: Dot = Dot(RgbForm(Color.RED)),
            val npcs: Dot = Dot(RgbForm(Color.ORANGE)),
            val players: Dot = Dot(RgbForm(Color.WHITE)),
            val friends: Dot = Dot(RgbForm(Color.GREEN)),
            val team: Dot = Dot(RgbForm(Color.BLUE)),
            val clan: Dot = Dot(RgbForm(Color.MAGENTA))
    ) : PluginSettings() {

        data class Dot(
                val color: RgbForm,
                val enabled: Boolean = false
        )
    }
}package org.runestar.client.api.util

import java.awt.Transparency
import java.awt.image.ColorModel
import java.awt.image.DataBuffer
import java.awt.image.DirectColorModel
import java.awt.image.Raster
import java.awt.image.SampleModel
import java.awt.image.WritableRaster

/**
 *


symbol{\theta})) - \log(p(x_2\mid\boldsymbol{\theta})) \cdots - \log(p(x_n\mid\boldsymbol{\theta})) = -\sum_i \log(p(x_i \mid \theta)).
$$

질문은 “왜 괜찮은가?”결국 밀도를 도입 한 이유는 특정 결과를 얻을 확률이 0이기 때문에 매개 변수 집합에 대해 데이터를 생성 할 확률이 0이 아니기 때문입니다.

실제로 이것이 사실이며 밀도로 이동할 수있는 이유를 이해하는 것은 엡실론에 어떤 일이 발생하는지 추적하는 연습입니다.

먼저 목표를 다시 정의해 보겠습니다.연속 확률 변수의 경우 더 이상 정확한 값을 얻을 확률을 계산하지 않고 대신 특정 범위 $\epsilon$ 내에서 일치시킬 확률을 계산한다고 가정합니다.단순화하기 위해 데이터가 동일하게 분포된 랜덤 변수 $X_1, \ldots, X_N$의 반복 관측치 $x_1, \ldots, x_N$라고 가정합니다.이전에 살펴본 것처럼 다음과 같이 작성할 수 있습니다.

$$
\begin{aligned}
&P(X_1 \in [x_1, x_1+\epsilon], X_2 \in [x_2, x_2+\epsilon], \ldots, X_N \in [x_N, x_N+\epsilon]\mid\boldsymbol{\theta}) \\
\approx &\epsilon^Np(x_1\mid\boldsymbol{\theta})\cdot p(x_2\mid\boldsymbol{\theta}) \cdots p(x_n\mid\boldsymbol{\theta}).
\end{aligned}
$$

따라서 음의 로그를 취하면

$$
\begin{aligned}
&-\log(P(X_1 \in [x_1, x_1+\epsilon], X_2 \in [x_2, x_2+\epsilon], \ldots, X_N \in [x_N, x_N+\epsilon]\mid\boldsymbol{\theta})) \\
\approx & -N\log(\epsilon) - \sum_{i} \log(p(x_i\mid\boldsymbol{\theta})).
\end{aligned}
$$

이 식을 살펴보면 $\epsilon$가 발생하는 유일한 위치는 가산 상수 $-N\log(\epsilon)$입니다.이것은 매개 변수 $\boldsymbol{\theta}$에 전혀 의존하지 않으므로 $\boldsymbol{\theta}$의 최적 선택은


ok {
			return x.Import
		}
	}
	return nil
}

func (x *Decl) GetPackage() *Decl_Package {
	if x != nil {
		if x, ok := x.Decl.(*Decl_Package_); ok {
			return x.Package
		}
	}
	return nil
}

func (x *Decl) GetDef() *Def {
	if x != nil {
		if x, ok := x.Decl.(*Decl_Def); ok {
			return x.Def
		}
	}
	return nil
}

func (x *Decl) GetBody() *Decl_Body {
	if x != nil {
		if x, ok := x.Decl.(*Decl_Body_); ok {
			return x.Body
		}
	}
	return nil
}

func (x *Decl) GetRange() *Decl_Range {
	if x != nil {
		if x, ok := x.Decl.(*Decl_Range_); ok {
			return x.Range
		}
	}
	return nil
}

type isDecl_Decl interface {
	isDecl_Decl()
}

type Decl_Empty_ struct {
	Empty *Decl_Empty `protobuf:"bytes,1,opt,name=empty,proto3,oneof"`
}

type Decl_Syntax_ struct {
	Syntax *Decl_Syntax `protobuf:"bytes,2,opt,name=syntax,proto3,oneof"`
}

type Decl_Import_ struct {
	Import *Decl_Import `protobuf:"bytes,3,opt,name=import,proto3,oneof"`
}

type Decl_Package_ struct {
	Package *Decl_Package `protobuf:"bytes,4,opt,name=package,proto3,oneof"`
}

type Decl_Def struct {
	Def *Def `protobuf:"bytes,5,opt,name=def,proto3,oneof"`
}

type Decl_Body_ struct {
	Body *Decl_Body `protobuf:"bytes,6,opt,name=body,proto3,oneof"`
}

type Decl_Range_ struct {
	Range *Decl_Range `protobuf:"bytes,7,opt,name=range,proto3,oneof"`
}

func (*Decl_Empty_) isDecl_Decl() {}

func (*Decl_Syntax_) isDecl_Decl() {}

func (*Decl_Import_) isDecl_Decl() {}

func (*Decl_Package_) isDecl_Decl() {}

func (*Decl_Def) isDecl_Decl() {}

func (*Decl_Body_) isDecl_Decl() {}

func (*Decl_Range_) isDecl_Decl() {}

// A definition is a particular kind of declaration that combines the syntactic
// elements of type definitions, fields, options, and service methods.
//
// This allows the parser to accept and represent many invalid but plausible productions.
type Def struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Definitions without a clear kind may be marked as `KIND_UNSPECIFIED`.
	Kind Def_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=buf.compiler.v1alpha1.Def_Kind" json:"kind,omitempty"`
	Name *Path    `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// The type for a `KIND_FIELD` definition.
	Type      *Type          `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	Signature *Def_Signature `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	// This is the tag number of `KIND_FIELD` or `KIND_ENUM_VALUE,
	// or the value of `KIND_OPTION`.
	Value *Expr `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"`
	// This is options appearing in `[...]`, such as on `KIND_FIELD`
	// or `KIND_GROUP`. This will NOT


resetexperimentsprofittracker") {
            description = "Resets the Experiments Profit Tracker"
            category = CommandCategory.USERS_RESET
            callback { tracker.resetCommand() }
        }
    }

    private fun isEnabled() = config.enabled && ExperimentationTableApi.inDistanceToTable(5.0)
}
package at.hannibal2.skyhanni.features.inventory.chocolatefactory

import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.events.ProfileJoinEvent
import at.hannibal2.skyhanni.events.SecondPassedEvent
import at.hannibal2.skyhanni.features.fame.ReminderUtils
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.HypixelCommands
import at.hannibal2.skyhanni.utils.SimpleTimeMark
import at.hannibal2.skyhanni.utils.SoundUtils
import at.hannibal2.skyhanni.utils.StringUtils
import kotlin.time.Duration
import kotlin.time.Duration.Companion.minutes
import kotlin.time.Duration.Companion.seconds

@SkyHanniModule
object CFTimeTowerManager {

    private val config get() = CFApi.config
    private val profileStorage get() = CFApi.profileStorage

    private var lastTimeTowerWarning = SimpleTimeMark.farPast()
    private var warnAboutNewCharge = false
    private var wasTimeTowerRecentlyActive = false

    @HandleEvent
    fun onProfileJoin(event: ProfileJoinEvent) {
        wasTimeTowerRecentlyActive = false
    }

    private const val HOVER_TEXT = "§eClick to run /cf!"

    @HandleEvent(onlyOnSkyblock = true)
    fun onSecondPassed(event: SecondPassedEvent) {
        val profileStorage = profileStorage ?: return

        if (profileStorage.currentTimeTowerEnds.isInPast()) {
            profileStorage.currentTimeTowerEnds = SimpleTimeMark.farPast()
        }

        checkTimeTowerExpired()

        if (CFApi.inChocolateFactory) return

        if (timeTowerFullTimeMark().isInPast()) {
            profileStorage.currentTimeTowerUses = maxCharges()
        } else {
            var nextCharge = profileStorage.nextTimeTower
            while (nextCharge.isInPast() && !nextCharge.isFarPast()) {
                profileStorage.currentTimeTowerUses++
                nextCharge += CFApi.timeTowerChargeDuration()
                profileStorage.nextTimeTower = nextCharge
                warnAboutNewCharge = true
            }
        }

        if (currentCharges() > 0 && currentCharges() < maxCharges()) {
            if (!config.timeTowerWarning || timeTowerActive()) return
            if (!warnAboutNewCharge) return
            ChatUtils.clickableChat(
                "Your Time Tower has an available charge §7(${timeTowerCharges()})§e. " +
                    "Click here to open the Chocolate Factory menu.",
                onClick = { HypixelCommands.chocolateFactory() },
                HOVER_TEXT,
            )
            SoundUtils.playBeepSound()
            lastTimeTowerWarning = SimpleTimeMark.now()
            warnAboutNewCharge = false
        }
        checkTimeTowerWarning(false)
    }

    private fun checkTimeTowerExpired() {
        val isTimeTowerActive = timeTowerActive()
        if (!isTimeTowerActive && wasTimeTowerRecentlyActive && config.timeTowerReminder && currentCharges() > 0) {
            val charges = StringUtils.pluralize(currentCharges(), "charge", "charges", withNumber = true)
            ChatUtils.clickableChat(
                "§cYour Time Tower just expired and has $charges remaining. " +


.debug("Attaching tab activation events to element",P),P.on("click"+e,v.event.click))}},determineTabs:function(){var e;"parent"===T.context?(0<P.closest(t.ui).length?(e=P.closest(t.ui),v.verbose("Using closest UI element as parent",e)):e=P,h=e.parent(),v.verbose("Determined parent element for creating context",h)):T.context?(h=E(T.context),v.verbose("Using selector for tab context",T.context,h)):h=E("body"),T.childrenOnly?(o=h.children(t.tabs),v.debug("Searching tab context children for tabs",h,o)):(o=h.find(t.tabs),v.debug("Searching tab context for tabs",h,o))},fix:{callbacks:function(){E.isPlainObject(r)&&(r.onTabLoad||r.onTabInit)&&(r.onTabLoad&&(r.onLoad=r.onTabLoad,delete r.onTabLoad,v.error(A.legacyLoad,r.onLoad)),r.onTabInit&&(r.onFirstLoad=r.onTabInit,delete r.onTabInit,v.error(A.legacyInit,r.onFirstLoad)),T=E.extend(!0,{},E.fn.tab.settings,r))}},initializeHistory:function(){if(v.debug("Initializing page state"),E.address===k)return v.error(A.state),!1;if("state"==T.historyType){if(v.debug("Using HTML5 to manage state"),!1===T.path)return v.error(A.path),!1;E.address.history(!0).state(T.path)}E.address.bind("change",v.event.history.change)},event:{click:function(e){var t=E(this).data(x.tab);t!==k?(T.history?(v.verbose("Updating page state",e),E.address.value(t)):(v.verbose("Changing tab",e),v.changeTab(t)),e.preventDefault()):v.debug("No tab specified")},history:{change:function(e){var t=e.pathNames.join("/")||v.get.initialPath(),a=T.templates.determineTitle(t)||!1;v.performance.display(),v.debug("History change event",t,e),y=e,t!==k&&v.changeTab(t),a&&E.address.title(a)}}},refresh:function(){p&&(v.debug("Refreshing tab",p),v.changeTab(p))},cache:{read:function(e){return e!==k&&n[e]},add:function(e,t){e=e||p,v.debug("Adding cached content for",e),n[e]=t},remove:function(e){e=e||p,v.debug("Removing cached content for",e),delete n[e]}},set:{auto:function(){var e="string"==typeof T.path?T.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";v.verbose("Setting up automatic tab retrieval from server",e),E.isPlainObject(T.apiSettings)?T.apiSettings.url=e:T.apiSettings={url:e}},loading:function(e){var t=v.get.tabElement(e);t.hasClass(L.loading)||(v.verbose("Setting loading state for",t),t.addClass(L.loading).siblings(o).removeClass(L.active+" "+L.loading),0<t.length&&T.onRequest.call(t[0],e))},state:function(e){E.address.value(e)}},changeTab:function(u){var b=O.history&&O.history.pushState&&T.ignoreFirstLoad&&C,g=T.auto||E.isPlainObject(T.apiSettings),f=g&&!b?v.utilities.pathToArray(u):v.get.default


 { createClient, quitClients } from './redis.utils';
import { RedisClients } from '../interfaces';

jest.mock('ioredis');
const IORedisMock = IORedis as jest.MockedClass<typeof IORedis>;

beforeEach(() => {
    IORedisMock.mockReset();
});

describe('createClient', () => {
    describe('with a URL', () => {
        const url = `redis://:authpassword@127.0.0.1:6380/0`;

        test('should create a client with a URL', () => {
            const client = createClient({ url });
            expect(IORedisMock).toHaveBeenCalledTimes(1);
            expect(IORedisMock).toHaveBeenCalledWith(url, {});
            expect(client).toBeInstanceOf(IORedis);
        });

        test('should create a client with a URL and options', () => {
            const client = createClient({ url, lazyConnect: true });
            expect(IORedisMock).toHaveBeenCalledTimes(1);
            expect(IORedisMock).toHaveBeenCalledWith(url, { lazyConnect: true });
            expect(client).toBeInstanceOf(IORedis);
        });
    });

    describe('with options', () => {
        test('should create a client with options', () => {
            const client = createClient({ host: '127.0.0.1', port: 6380 });
            expect(IORedisMock).toHaveBeenCalledTimes(1);
            expect(IORedisMock).toHaveBeenCalledWith({ host: '127.0.0.1', port: 6380 });
            expect(client).toBeInstanceOf(IORedis);
        });

        test('should call onClientCreated', () => {
            const mockOnClientCreated = jest.fn();

            const client = createClient({ onClientCreated: mockOnClientCreated });
            expect(IORedisMock).toHaveBeenCalledTimes(1);
            expect(IORedisMock).toHaveBeenCalledWith({});
            expect(client).toBeInstanceOf(IORedis);
            expect(mockOnClientCreated).toHaveBeenCalledTimes(1);
            expect(mockOnClientCreated).toHaveBeenCalledWith(client);
        });
    });
});

describe('quitClients', () => {
    let client0: Redis;
    let client1: Redis;
    const clients: RedisClients = new Map();

    beforeEach(() => {
        client0 = new IORedis();
        client1 = new IORedis();
        clients.set('client0', client0);
        clients.set('client1', client1);
    });

    test('when the status is ready', async () => {
        Reflect.defineProperty(client0, 'status', { value: 'ready' });
        Reflect.defineProperty(client1, 'status', { value: 'ready' });

        const mockClient0Quit = jest.spyOn(client0, 'quit').mockResolvedValue('OK');
        const mockClient1Quit = jest.spyOn(client1, 'quit').mockResolvedValue('OK');

        const results = await quitClients(clients);
        expect(results).toHaveLength(2);
        results.forEach(result => expect(result.status).toBe('fulfilled'));
        expect(mockClient0Quit).toHaveBeenCalledTimes(1);
        expect(mockClient1Quit).toHaveBeenCalledTimes(1);
    });

    test('when the status is ready and end', async () => {
        Reflect.defineProperty(client0, 'status', {


            }
                yield break;
            }
            while (true) {
                if (comparer.Compare(enumerator2.Current, enumerator1.Current) < 0) {
                    yield return enumerator2.Current;
                    hasValue2 = enumerator2.MoveNext();
                    if (!hasValue2) {
                        do {
                            yield return enumerator1.Current;
                        } while (enumerator1.MoveNext());
                        yield break;
                    }
                } else {
                    yield return enumerator1.Current;
                    hasValue1 = enumerator1.MoveNext();
                    if (!hasValue1) {
                        do {
                            yield return enumerator2.Current;
                        } while (enumerator2.MoveNext());
                        yield break;
                    }
                }
            }
        }
    }
}


=rb-1.2.1&auto=format&fit=crop&w=500&q=60"
            ))
    }

}package com.cyxbs.pages.volunteer.fragment

import android.annotation.SuppressLint
import android.content.Context
import android.os.Bundle
import android.util.SparseArray
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.animation.AnimationUtils
import android.widget.LinearLayout
import android.widget.PopupWindow
import android.widget.TextSwitcher
import android.widget.TextView
import android.widget.ViewSwitcher
import androidx.core.content.ContextCompat
import androidx.core.util.containsKey
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.cyxbs.components.base.ui.BaseFragment
import com.mredrock.cyxbs.common.utils.extensions.dp2px
import com.cyxbs.pages.volunteer.R
import com.cyxbs.pages.volunteer.adapter.PopupWindowRvAdapter
import com.cyxbs.pages.volunteer.adapter.VolunteerRecordAdapter
import com.cyxbs.pages.volunteer.bean.VolunteerTime
import com.cyxbs.pages.volunteer.event.VolunteerLoginEvent
import com.cyxbs.pages.volunteer.utils.DateUtils
import com.cyxbs.pages.volunteer.viewmodel.VolunteerRecordViewModel
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode

/**
 * Created by yyfbe, Date on 2020/9/4.
 */
class VolunteerRecordFragment : BaseFragment(), ViewSwitcher.ViewFactory {

    //last当前，first最早的一年
    private val firstYear by lazy(LazyThreadSafetyMode.NONE) { mutableListOf<VolunteerTime.RecordBean>() }
    private val secondYear by lazy(LazyThreadSafetyMode.NONE) { mutableListOf<VolunteerTime.RecordBean>() }
    private val thirdYear by lazy(LazyThreadSafetyMode.NONE) { mutableListOf<VolunteerTime.RecordBean>() }
    private val lastYear by lazy(LazyThreadSafetyMode.NONE) { mutableListOf<VolunteerTime.RecordBean>() }
    private val volunteer_time_recycler by R.id.volunteer_time_recycler.view<RecyclerView>()
    private val swc_volunteer_record_year by R.id.swc_volunteer_record_year.view<TextSwitcher>()
    private val tv_volunteer_record_year_time by R.id.tv_volunteer_record_year_time.view<TextView>()
    private val srl_refresh by R.id.srl_refresh.view<SwipeRefreshLayout>()
    private val ll_volunteer_record_year by R.id.ll_volunteer_record_year.view<LinearLayout>()

    //每年在rv的index
    private var firstYearIndex = -


-- BLOB
    'my-text',           -- TEXT
    X'abcd',             -- MEDIUMBLOB
    'my-mediumtext',     -- MEDIUMTEXT
    X'abcd',             -- LONGBLOB
    'my-longtext',       -- LONGTEXT
    '{"k1": "v1"}',      -- JSON
    'x-small',           -- ENUM('x-small', 'small', 'medium', 'large', 'x-large')
    'a',                 -- SET('a', 'b', 'c', 'd')

    -- TEMPORAL DATA TYPES

    1901, -- YEAR
    2155, -- YEAR(4)

    '1999-01-01 00:00:01',        -- TIMESTAMP
    '1999-10-19 10:23:54',        -- TIMESTAMP(0)
    '2004-10-19 10:23:54.1',      -- TIMESTAMP(1)
    '2004-10-19 10:23:54.12',     -- TIMESTAMP(2)
    '2004-10-19 10:23:54.123',    -- TIMESTAMP(3)
    '2004-10-19 10:23:54.1234',   -- TIMESTAMP(4)
    '2004-10-19 10:23:54.12345',  -- TIMESTAMP(5)
    '2004-10-19 10:23:54.123456', -- TIMESTAMP(6)

    -- TEMPORAL TYPES

    '1000-01-01',   -- DATE

    '04:05:06',        -- TIME
    '04:05:06',        -- TIME(0)
    -- '04:05:06.1',      -- TIME(1)
    '04:05:06.12',     -- TIME(2)
    -- '04:05:06.123',    -- TIME(3)
    '04:05:06.1234',   -- TIME(4)
    -- '04:05:06.12345',  -- TIME(5)
    -- '04:05:06.123456', -- TIME(6)

    '2020-01-01 15:10:10',        -- DATETIME
    '2020-01-01 15:10:10',        -- DATETIME(0)
    '2020-01-01 15:10:10.1',      -- DATETIME(1)
    '2020-01-01 15:10:10.12',     -- DATETIME(2)
    '2020-01-01 15:10:10.123',    -- DATETIME(3)
    '2020-01-01 15:10:10.1234',   -- DATETIME(4)
    '2020-01-01 15:10:10.12345',  -- DATETIME(5)
    '2020-01-01 15:10:10.123456', -- DATETIME(6)

    -- DECIMAL TYPES

    1234567890, -- NUMERIC
    12345,      -- NUMERIC(5)
    123.45,     -- NUMERIC(5,2)

    2345678901, -- DECIMAL
    23451,      -- DECIMAL(5)
    231.45      -- DECIMAL(5,2)
);
`

func init() {
	_ = os.Setenv("YC", "1")                                                                            // to not go to vanga
	helpers.InitSrcDst(helpers.TransferID, &Source, &Target, abstract.TransferTypeSnapshotAndIncrement) // to WithDefaults() & FillDependentFields(): IsHomo, helpers.TransferID, IsUpdateable
}

func TestSnapshotAndIncrement(t *testing.T) {
	defer func() {
		require.NoError(t, helpers.CheckConnections(
			helpers.LabeledPort{Label: "Mysql source", Port: Source.Port},
			helpers.LabeledPort{Label: "Mysql target", Port: Target.Port},
		))
	}()

	//---

	emitter, err := debezium.NewMessagesEmitter(map[string]string{
		debeziumparameters.TopicPrefix:      "my_topic",
		debeziumparameters.AddOriginalTypes: "false",
		debeziumparameters.SourceType:       "mysql",
	}, "1.1.2.Final", false, logger.Log)
	require.NoError(t, err)
	originalTypes := map[abstract.TableID]map[string]*debeziumcommon.OriginalTypeInfo{
		{Namespace: "", Name: "customer


/* Copyright (C) 2000 MySQL AB

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; version 2 of the License.

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

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

/*
  thread safe version of some common functions:
  my_inet_ntoa

  This file is also used to make handling of sockets and ioctl()
  portable accross systems.

*/

#ifndef _my_net_h
#define _my_net_h
C_MODE_START

#include <errno.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef HAVE_POLL
#include <sys/poll.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif

#if !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__BEOS__) && !defined(__NETWARE__)
#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#if !defined(alpha_linux_port)
#include <netinet/tcp.h>
#endif
#endif

#if defined(__WIN__)
#define O_NONBLOCK 1    /* For emulation of fcntl() */

/*
  SHUT_RDWR is called SD_BOTH in windows and
  is defined to 2 in winsock2.h
  #define SD_BOTH 0x02
*/
#define SHUT_RDWR 0x02

#endif

/*
  On OSes which don't have the in_addr_t, we guess that using uint32 is the best
  possible choice. We guess this from the fact that on HP-UX64bit & FreeBSD64bit
  & Solaris64bit, in_addr_t is equivalent to uint32. And on Linux32bit too.
*/
#ifndef HAVE_IN_ADDR_T
#define in_addr_t uint32
#endif

/* On some operating systems (e.g. Solaris) INADDR_NONE is not defined */
#ifndef INADDR_NONE
#define INADDR_NONE -1                          /* Error value from inet_addr */
#endif

/* Thread safe or portable version of some functions */

void my_inet_ntoa(struct in_addr in, char *buf);

/*
  Handling of gethostbyname_r()
*/

#if !defined(HPUX10)
struct hostent;
#endif /* HPUX */
#if !defined(HAVE_GETHOSTBYNAME_R)
struct hostent *my_gethostbyname_r(const char *name,
				   struct hostent *result, char *buffer,
				   int buflen, int *h_errnop);
void my_gethostbyname_r_free();
#elif defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE)
struct hostent *my_gethostbyname_r(const char *name,
				   struct hostent *result, char *buffer,
				   int buflen, int *h_errnop);
#define my_gethostbyname_r_free()
#if !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) && !defined(HPUX10)
#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data)
#endif /* !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */

#elif defined(HAVE_GETHOSTBYNAME_R_RETURN_INT)
#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data)
struct hostent *my_gethostbyname_r(const char *name,
				   struct hostent *result, char *buffer,
				   int buflen, int *h_errnop);
#define my_gethostbyname_r_free()
#else
#define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(C),(D),(E))
#define my_gethostbyname_r_free()
#endif /* !defined(HAVE_GETHOSTBYNAME_R) */

#ifndef GETHOSTBYNAME_BUFF_SIZE
#define GETHOSTBYNAME_BUFF_SIZE 2048
#endif

/* On SCO you get a link error when refering to h_errno */
#ifdef SCO
#undef h_errno
#define h_errno errno
#endif

C_MODE_END
#endif


local epochs = require("epochs")
local gar = require("gar")
local balances = require("balances")
local json = require("json")
local testSettings = {
	fqdn = "test.com",
	protocol = "https",
	port = 443,
	allowDelegatedStaking = true,
	minDelegatedStake = 100,
	autoStake = true,
	label = "test",
	delegateRewardShareRatio = 0,
}
local startTimestamp = 0
local protocolBalance = 500000000 * 1000000
local hashchain = "NGU1fq_ssL9m6kRbRU1bqiIDBht79ckvAwRMGElkSOg" -- base64 of "some sample hash"

describe("epochs", function()
	before_each(function()
		_G.Balances = {
			[ao.id] = protocolBalance,
			["test-this-is-valid-arweave-wallet-address-1"] = 500000000,
		}
		_G.Epochs = {
			[0] = {
				startTimestamp = 0,
				endTimestamp = 100,
				distributionTimestamp = 115,
				prescribedObservers = {},
				distributions = {},
				observations = {
					failureSummaries = {},
					reports = {},
				},
			},
		}
		_G.GatewayRegistry = {}
		_G.NameRegistry = {
			records = {},
			reserved = {},
		}
		epochs.updateEpochSettings({
			prescribedNameCount = 5,
			maxObservers = 3,
			epochZeroStartTimestamp = 0,
			durationMs = 100,
			distributionDelayMs = 15,
			rewardPercentage = 0.0025, -- 0.25%
		})
	end)

	describe("computePrescribedObserversForEpoch", function()
		it("should return all eligible gateways if fewer than the maximum in network", function()
			GatewayRegistry["test-this-is-valid-arweave-wallet-address-1"] = {
				operatorStake = gar.getSettings().operators.minStake,
				totalDelegatedStake = 0,
				vaults = {},
				delegates = {},
				startTimestamp = startTimestamp,
				stats = {
					prescribedEpochCount = 0,
					observedEpochCount = 0,
					totalEpochCount = 0,
					passedEpochCount = 0,
					failedEpochCount = 0,
					failedConsecutiveEpochs = 0,
					passedConsecutiveEpochs = 0,
				},
				settings = testSettings,
				status = "joined",
				observerAddress = "observerAddress",
			}
			local expectation = {
				{
					gatewayAddress = "test-this-is-valid-arweave-wallet-address-1",
					observerAddress = "observerAddress",
					stake = gar.getSettings().operators.minStake,
					startTimestamp = startTimestamp,
					stakeWeight = 1,
					tenureWeight = 1 / gar.getSettings().observers.tenureWeightPeriod,
					gatewayRewardRatioWeight = 1,
					observerRewardRatioWeight = 1,
					compositeWeight = 1 / gar.getSettings().observers.tenureWeightPeriod,
					normalizedCompositeWeight = 1,
				},
			}
			local status, result = pcall(epochs.computePrescribedObserversForEpoch, 0, hashchain)
			assert.is_true(status)
			assert.are.equal(1, #result)
			assert.are.same(expectation, result)
		end)

		it("should return the maximum number of gateways if more are enrolled in network", function()
			local hashchain = "c29tZSBzYW1wbGUgaGFzaA==" -- base64 of "some sample hash"
			epochs.updateEpochSettings({
				maxObservers = 2, -- limit to 2 observers
				epochZeroStartTimestamp = startTimestamp,
				durationMs = 60 * 1000 * 60 * 24, -- 24 hours
				distributionDelayMs = 60 * 1000 * 2 * 15, -- 15 blocks
			})
			for i = 1, 3 do
				local gateway = {
					operatorStake = gar.getSettings().operators.mi


s;
  }
}
/*
 * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
 * Copyright (c) 2010 JogAmp Community. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 * - Redistribution of source code must retain the above copyright
 *   notice, this list of conditions and the following disclaimer.
 *
 * - Redistribution in binary form must reproduce the above copyright
 *   notice, this list of conditions and the following disclaimer in the
 *   documentation and/or other materials provided with the distribution.
 *
 * Neither the name of Sun Microsystems, Inc. or the names of
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * This software is provided "AS IS," without a warranty of any kind. ALL
 * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
 * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
 * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
 * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
 * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
 * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
 * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
 * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
 * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
 * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 *
 * You acknowledge that this software is not designed or intended for use
 * in the design, construction, operation or maintenance of any nuclear
 * facility.
 *
 * Sun gratefully acknowledges that this software was originally authored
 * and developed by Kenneth Bradley Russell and Christopher John Kline.
 */

package jogamp.opengl.macosx.cgl;

import com.jogamp.nativewindow.AbstractGraphicsScreen;
import com.jogamp.nativewindow.DefaultGraphicsScreen;
import com.jogamp.nativewindow.NativeSurface;
import com.jogamp.nativewindow.NativeWindowFactory;
import com.jogamp.opengl.GLCapabilitiesImmutable;
import com.jogamp.opengl.GLContext;
import com.jogamp.opengl.GLDrawableFactory;
import com.jogamp.opengl.GLException;

import jogamp.nativewindow.WrappedSurface;
import jogamp.opengl.GLContextShareSet;
import jogamp.opengl.macosx.cgl.MacOSXCGLDrawable.GLBackendType;

public class MacOSXExternalCGLContext extends MacOSXCGLContext {

  private MacOSXExternalCGLContext(final Drawable drawable, final boolean isNSContext, final long handle) {
    super(drawable, null);
    setOpenGLMode(isNSContext ? GLBackendType.NSOPENGL : GLBackendType.CGL );
    this.contextHandle = handle;
    GLContextShareSet.contextCreated(this);
    if( !setGLFunctionAvailability(false, 0, 0, 0, false /* strictMatch */, false /* withinGLVersionsMapping */) ) { // use GL_VERSION
        throw new InternalError("setGLFunctionAvailability !strictMatch failed");
    }
    getGLStateTracker().setEnabled(false); // external context usage can't track state in Java
  }

  protected static MacOSXExternalCGLContext create(final GLDrawableFactory factory) {
    long pixelFormat = 0;
    long currentDrawable = 0;
    long contextHandle = CGL.getCurrentContext(); // Check: MacOSX 10.3 ..
    final boolean isNSContext = 0 != contextHandle;


},
		[287490] = {
			2281, -- [1]
			"Неизвестно", -- [2]
		},
		[275204] = {
			2122, -- [1]
			"Стонущий кошмар", -- [2]
		},
		[228738] = {
			1964, -- [1]
			"Нестабильная энергия <Смотритель>", -- [2]
		},
		[271099] = {
			2136, -- [1]
			"Зек'воз", -- [2]
		},
		[199051] = {
			1837, -- [1]
			"Дубосерд", -- [2]
		},
		[56938] = {
			2010, -- [1]
			"Великая ведунья Телестра", -- [2]
		},
		[15580] = {
			243, -- [1]
			"Гнев'рел", -- [2]
		},
		[46186] = {
			1895, -- [1]
			"Зелфан", -- [2]
		},
		[190984] = {
			2065, -- [1]
			11, -- [2]
		},
		[41068] = {
			1589, -- [1]
			"Кровавый маг из клана Призрачной Луны", -- [2]
		},
		[126664] = {
			2051, -- [1]
			1, -- [2]
		},
		[39019] = {
			1914, -- [1]
			"Предвестник Скайрисс", -- [2]
		},
		[209291] = {
			1866, -- [1]
			"Око Гул'дана", -- [2]
		},
		[215429] = {
			1805, -- [1]
			"Валарьяр - призыватель молний", -- [2]
		},
		[102606] = {
			1884, -- [1]
			"Эхо Тиранды", -- [2]
		},
		[250241] = {
			2085, -- [1]
			"Вол'каал", -- [2]
		},
		[206220] = {
			1866, -- [1]
			"Гул'дан", -- [2]
		},
		[56937] = {
			2010, -- [1]
			"Великая ведунья Телестра", -- [2]
		},
		[306168] = {
			2331, -- [1]
			"Неизвестно", -- [2]
		},
		[271103] = {
			2135, -- [1]
			1, -- [2]
		},
		[33132] = {
			1939, -- [1]
			"Оскверненный тотем вспышки <Менну Предатель> <Менну Предатель>", -- [2]
		},
		[215430] = {
			1805, -- [1]
			"Валарьяр - призыватель молний", -- [2]
		},
		[91853] = {
			1055, -- [1]
			"Сиамат", -- [2]
		},
		[250368] = {
			2085, -- [1]
			"Вол'каал", -- [2]
		},
		[202120] = {
			2065, -- [1]
			12, -- [2]
		},
		[310022] = {
			2331, -- [1]
			"[*] Заряженные узы", -- [2]
		},
		[199054] = {
			1960, -- [1]
			7, -- [2]
		},


 3, 4, 5];
 * const arr2 = [1, 2, 1, 3, 4, 4, 3, 5, 1];
 * const arr3 = [
 *   { id: 1, name: "google" },
 *   { id: 2, name: "microsoft" },
 *   { id: 1, name: "google" },
 *   { id: 3, name: "amazone" }
 * ];
 * console.log(distinct(arr1)); // [1, 2, 3, 4, 5]
 * console.log(distinct(arr2)); // [1, 2, 3, 4, 5]
 * console.log(distinct(arr3, item => {
 *   return item.id;
 * })); // [{ id: 1, name: "google" }, { id: 2, name: "microsoft" }, { id: 3, name: "amazone" }]
 */
export function distinct<T>(array: ReadonlyArray<T>, uniqueFn?: (item: T) => string | any): T[] {
  if (!uniqueFn) {
    return array.filter((item, index) => {
      return array.indexOf(item) === index;
    });
  }
  return array.filter(uniqueFilter(uniqueFn));
}

/**
 * unique 필터를 만들 때 흔히 반복되는 구문을 구현해 놓은 함수
 * @template T
 * @param uniqueFn filter 할 key 값을 반환할 수 있는 함수
 * @example
 * const arr1 = [
 *   { id: 1, name: "google" },
 *   { id: 2, name: "microsoft" },
 *   { id: 1, name: "google" },
 *   { id: 3, name: "amazone" }
 * ];
 * const idFilter = item => {
 *   return item.id;
 * };
 * const nameFilter = item => {
 *   return item.name;
 * };
 * console.log(arr1.filter(uniqueFilter(idFilter))); // [{ id: 1, name: "google" },{ id: 2, name: "microsoft" },{ id: 3, name: "amazone" } ]
 * console.log(arr1.filter(uniqueFilter(nameFilter))); // [{ id: 1, name: "google" },{ id: 2, name: "microsoft" },{ id: 3, name: "amazone" } ]
 */
export function uniqueFilter<T>(uniqueFn: (item: T) => string | any): (item: T) => boolean {
  const hash: { [key: string]: boolean } = {};
  return (item) => {
    const key = uniqueFn(item);
    if (hash[key]) return false;
    hash[key] = true;
    return true;
  };
}

/**
 * 배열을 섞습니다.
 * @template T
 * @param ref 소스 배열
 * @param [seed] [getRandomizer]{@link getRandomizer}
 * @example
 * const arr = [1,2,3,4];
 * shuffle(arr);
 * console.log(arr); // [?,?,?,?]
 */
export function shuffle<T>(ref: T[], seed?: number): void {
  const random = getRandomizer(seed);
  for (let i = ref.length - 1; i > 0; i -= 1) {
    const j = Math.floor(random() * (i + 1));
    const temp = ref[i];
    ref[i] = ref[j];
    ref[j] = temp;
  }
}

/**
 * 1차원 행[]을 2차원 행열[][]로 바꿉니다. 원본 컬럼을 그대로 사용합니다.
 * @template T 각 행의 타입
 * @param {T[]} ref 변경 할 배열
 * @returns {T[][]}
 * @example
 * const arr


cute(x->irpart_plan);
		fftwf_destroy_plan(x->irpart_plan);
		// now, x->irpart[i] contains the DFT of the ith partition of the impulse response.
	}

	x->inbuf = fftwf_malloc(sizeof(float) * x->partsize);
	x->inbufpos = 0;

	// allocate buffer for DFT of padded input
	x->input_td = fftwf_malloc(sizeof(float) * x->paddedsize);	// float array into which input block is copied and padded
	x->input_fd = (fftwf_complex *) x->input_td;			// fftwf_complex pointer to the same array to facilitate in-place fft
	x->input_plan =  fftwf_plan_dft_r2c_1d(x->fftsize, x->input_td, x->input_fd, FFTW_MEASURE);

	// set up circular list/array of buffers for accumulating results of convolution
	x->nsumbufs = x->nparts + 2;
	x->sumbuf = &(x->sumbufs[0]);
	for (i  = 0; i < x->nsumbufs; i++) {
		x->sumbufs[i].index = i;
		x->sumbufs[i].fd = fftwf_malloc(sizeof(float) * x->paddedsize);
		memset(x->sumbufs[i].fd, 0, sizeof(float) * x->paddedsize);
		x->sumbufs[i].td = (float *) x->sumbufs[i].fd;
		x->sumbufs[i].plan = fftwf_plan_dft_c2r_1d(x->fftsize, x->sumbufs[i].fd, x->sumbufs[i].td, FFTW_MEASURE);
		x->sumbufs[i].readpos = 0;
	}
	x->sumbufs[0].next = &(x->sumbufs[1]);
	x->sumbufs[0].prev = &(x->sumbufs[x->nsumbufs - 1]);
	for (i = 1; i < x->nsumbufs; i++) {
		x->sumbufs[i].next = &(x->sumbufs[(i + 1) % x->nsumbufs]);
		x->sumbufs[i].prev = &(x->sumbufs[i - 1]);
	}

	partconv_deal_work(x);
	x->curcall = 0;
	x->curpart = 0;

	post("partconv~: using %s in %d partitions with FFT-size %d", x->arrayname->s_name, x->nparts, x->fftsize);
	x->ir_prepared = 1;
}

static void partconv_dsp(t_partconv *x, t_signal **sp)
{
	// if the ir array has not been prepared, prepare it
	if (x->ir_prepared == 0) {
		partconv_set(x, x->arrayname);
	}
	if (x->hosed)
		dsp_add(partconv_perform_hosed, 4, x, sp[0]->s_vec,
			sp[1]->s_vec, (t_int)sp[0]->s_n);
	else
		dsp_add(partconv_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec,
			(t_int)sp[0]->s_n);
}

static void *partconv_new(t_symbol *s, int argc, t_atom *argv)
{
	t_partconv *x = (t_partconv *)pd_new(partconv_class);

	outlet_new(&x->x_obj, gensym("signal"));
        t_atom sane_defaults[2];

	if (argc != 2) {
            /* Give some sane defaults with no args so we can at least
               instantiate and get to the help patch */
            if (!argc)
            {
                SETSYMBOL(sane_defaults, &s_);
                SETFLOAT(sane_defaults+1, 64.);
                argc = 2;
                argv = sane_defaults;
                pd_error(x, "partconv~: no arguments given. Setting some "
			"sane defaults to keep Pd-L2Ork from crashing.");
            }
            else
            {
		post("argc = %d", argc);
		error("partconv~: usage: [partconv~ <arrayname> <partsize>]\n\t- partition size must be a power of 2 >= blocksize");
		return NULL;
            }
	}

	x->arrayname = atom_getsymbol(argv);
	x->partsize = atom_getfloatarg(1, argc, argv);
	if (x->partsize <= 0 || x->partsize != (1 << ilog2(x->partsize)))
	{
		error("partconv~: partition size not a power of 2");
		return NULL;
	}
	x->fftsize = 2 * x->partsize;
	x->scale = 1 / ((float) x->fftsize);

	// need 2*(n/2+1) float array for in-place transform, where n is fftsize.
#ifdef USE_SSE
	// for sse, make it a multiple of 8, because we pull in 4 bins at a time and don't want to get a segfault
	x->paddedsize = 2 * (x->fftsize / 2 + 4);
#else
	x->paddedsize = 2 * (x->fftsize / 2 + 1);
#endif
	x->nbins = x->fftsize / 2 + 1;
	x->ir_prepared = 0;
	x->pd_blocksize = sys_getblksize();

	return (x);
}

void partconv_tilde_setup(void)
{
	partconv_class = class_new(gensym("partconv~"), (t_newmethod)partconv_new,
			(t_method)partconv_free, sizeof(t_partconv), 0, A_GIMME, 0);
	class_addmethod(partconv_class, nullfn, gensym("signal"), 0);
	class_addmethod(partconv_class, (t_method) partconv_dsp, gensym("dsp"), A_CANT, 0);
	class_addmethod(partconv_class, (t_method) partconv_set, gensym("set"), A_DEFSYMBOL, 0);
}

#endif /* __EMSCRIPTEN__ */


*Deftones**和**Limp Bizkit**相继在加州和佛罗里达崛起。这些新团体不同于七八十年代一味追求炫技与复杂结构的金属乐队，他们更注重节奏的重击感和情绪的极致释放。*Adrenaline*（1995）与*Three Dollar Bill, Y'all$*（1997）等专辑将这一理念推向更广泛听众。同时，他们借助MTV等新媒体渠道，将视觉与听觉充分结合，使Nu Metal不仅是音乐，更成为当代青年文化认同的载体。

除了地域分布上的特点，90年代美国都市内部的多样性也推动了Nu Metal风格的形成。新一代青少年生活在充满种族与社会紧张关系的环境中。大量移民家庭的后代涌入都市，他们成长过程中同时受到主流美国文化和父辈传统影响，使文化认同变得复杂。这种多源背景反映在音乐中，Nu Metal大胆吸收*Hip-Hop*、*电子*和*另类摇滚*要素。以**Linkin Park**为例，在2000年推出的*Hybrid Theory*里，*说唱*与*旋律主唱*切换自如，歌曲*In the End*和*Crawling*成为不同族群青年共同的情绪出口。这种杂揉策略让Nu Metal很快赢得跨阶层、跨种族群体的欢迎。

技术创新同样在Nu Metal历史发展的关键节点上起到不可忽视的作用。1990年代的录音与制作技术已经进入数字时代，磁带录音逐步被数字工作站（DAW）取代。年轻制作人用更低成本创造多轨录音和特殊音效，让电子样本、合成器和旋律叠加成为可能。例如，**Slipknot**通过叠加鼓组、打击乐与混音效果，塑造出极具冲击力的听觉体验。Nu Metal的制作美学强调“厚重”“层次感”“空间感”，不同于以往金属音乐单一吉他驱动的声场。

文化方面，这种新金属表现出对主流文化的疏离和批判。90年代末，美国社会探讨心理健康、家庭结构、校园暴力话题日益增多。Nu Metal歌词频繁触及焦虑、抑郁、自我否定与对社会不公的愤怒。许多年轻人借其表达内心挣扎。如**Korn**在*Freak on a Leash*中直面童年创伤，**Linkin Park**通过*Numb*诉说认同危机。这些内容在听众之间激起强烈共鸣，同时也让传统音乐评论者产生


er *big.Int) ([]byte, error) {
	result, err := p.ethClient.CallContract(ctx, call, blockNumber)
	if err != nil && result != nil {
		metrics.ReportFuncError(p.svcTags)
		return nil, err
	}
	return result, nil
}

func (p *evmProviderWithRet) SendTransaction(ctx context.Context, tx *types.Transaction) error {
	err := p.ethClient.SendTransaction(ctx, tx)
	if err != nil {
		metrics.ReportFuncError(p.svcTags)
		return err
	}
	return nil
}

func (p *evmProviderWithRet) SendTransactionWithRet(ctx context.Context, tx *types.Transaction) (txHash common.Hash, err error) {
	metrics.ReportFuncCall(p.svcTags)
	doneFn := metrics.ReportFuncTiming(p.svcTags)
	defer doneFn()

	data, err := rlp.EncodeToBytes(tx)
	if err != nil {
		metrics.ReportFuncError(p.svcTags)
		return common.Hash{}, err
	}

	err = p.rpcClient.CallContext(ctx, &txHash, "eth_sendRawTransaction", hexutil.Encode(data))
	if err != nil {
		metrics.ReportFuncError(p.svcTags)
		return common.Hash{}, err
	}

	return txHash, nil
}

func (p *evmProviderWithRet) SendTransactionWithRetSync(ctx context.Context, tx *types.Transaction) (txHash common.Hash, err error) {
	metrics.ReportFuncCall(p.svcTags)
	doneFn := metrics.ReportFuncTiming(p.svcTags)
	defer doneFn()

	data, err := rlp.EncodeToBytes(tx)
	if err != nil {
		metrics.ReportFuncError(p.svcTags)
		return common.Hash{}, err
	}

	err = p.rpcClient.CallContext(ctx, &txHash, "eth_sendRawTransaction", hexutil.Encode(data))
	if err != nil {
		metrics.ReportFuncError(p.svcTags)
		return common.Hash{}, err
	}

	_, txIsPending, err := p.ethClient.TransactionByHash(ctx, txHash)
	if err != nil || !txIsPending {
		return txHash, nil
	}

	// wait for tx to be mined
	maxRetries := 10
	retryCount := 0
	for retryCount < maxRetries {
		time.Sleep(10 * time.Second)
		_, txIsPending, err = p.ethClient.TransactionByHash(ctx, txHash)
		if err != nil || !txIsPending {
			return txHash, nil
		}
		retryCount++
	}

	return txHash, errors.New("transaction is not mined after " + strconv.Itoa(maxRetries) + " retries")
}

// Implement other methods of EVMProvider using the pool
func (p *evmProviderWithRet) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error) {
	return p.ethClient.PendingNonceAt(ctx, account)
}

func (p *evmProviderWithRet) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error) {
	return p.ethClient.PendingCodeAt(ctx, account)
}

func (p *evmProviderWithRet) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error) {
	return p.ethClient.EstimateGas(ctx, msg)
}

func (p *evmProviderWithRet) SuggestGasTipCap(ctx context.Context) (*big.Int, error) {
	return p.ethClient.SuggestGasTipCap(ctx)
}

func (p *evmProviderWithRet) SuggestGasPrice(ctx context.Context) (*big.Int, error) {
	return p.ethClient.SuggestGasPrice(ctx)
}

func (p *evmProviderWithRet) TransactionByHash(ctx context.Context, hash common.Hash) (*types.Transaction, bool, error) {
	return p


t);
  Expect.equals("json-object", decoded[0]);
}
// Copyright (c) 2013, 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.

library json_unicode_tests;
import 'unicode_tests.dart';

const _QUOTE = 0x22;  // "
const _COLON = 0x3a;  // :
const _COMMA = 0x2c;  // ,
const _BRACE_OPEN = 0x7b;  // {
const _BRACE_CLOSE = 0x7d;  // }
const _BRACKET_OPEN = 0x5b;  // [
const _BRACKET_CLOSE = 0x5d;  // ]

_expandUnicodeTests() {
  return UNICODE_TESTS.expand((test) {
    // The unicode test will be a string (possibly) containing unicode
    // characters. It also contains the empty string.
    // It must not contain a double-quote '"'.
    assert(!test.contains('"'));

    var bytes = test[0];
    var string = test[1];

    // expanded will hold all tests that are generated from the unicode test.
    var expanded = [];

    // Put the string into quotes.
    // For example: 'abcd' -> '"abcd"'.
    var inQuotesBytes = [];
    inQuotesBytes.add(_QUOTE);
    inQuotesBytes.addAll(bytes);
    inQuotesBytes.add(_QUOTE);
    expanded.add([inQuotesBytes, string]);

    // Put the quoted string into a triple nested list.
    // For example: 'abcd' -> '[[["abcd"]]]'.
    var listExpected = [[[string]]];
    var inListBytes = [];
    inListBytes.addAll([_BRACKET_OPEN, _BRACKET_OPEN, _BRACKET_OPEN]);
    inListBytes.addAll(inQuotesBytes);
    inListBytes.addAll([_BRACKET_CLOSE, _BRACKET_CLOSE, _BRACKET_CLOSE]);
    expanded.add([inListBytes, listExpected]);

    // Put the quoted string into a triple nested list and duplicate that
    // list three times.
    // For example: 'abcd' -> '[[[["abcd"]]],[[["abcd"]]],[[["abcd"]]]]'.
    var listLongerExpected = [listExpected, listExpected, listExpected];
    var listLongerBytes = [];
    listLongerBytes.add(_BRACKET_OPEN);
    listLongerBytes.addAll(inListBytes);
    listLongerBytes.add(_COMMA);
    listLongerBytes.addAll(inListBytes);
    listLongerBytes.add(_COMMA);
    listLongerBytes.addAll(inListBytes);
    listLongerBytes.add(_BRACKET_CLOSE);
    expanded.add([listLongerBytes, listLongerExpected]);

    // Put the previous strings/lists into a map.
    // For example:
    //    'abcd' -> '{"abcd":[[[["abcd"]]],[[["abcd"]]],[[["abcd"]]]]}'.
    var mapExpected = new Map();
    mapExpected[string] = listLongerExpected;
    var mapBytes = [];
    mapBytes.add(_BRACE_OPEN);
    mapBytes.addAll(inQuotesBytes);
    mapBytes.add(_COLON);
    mapBytes.addAll(listLongerBytes);
    mapBytes.add(_BRACE_CLOSE);
    expanded.add([mapBytes, mapExpected]);

    return expanded;
  }).toList();
}

final JSON_UNICODE_TESTS = _expandUnicodeTests();
// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
// for details. All


cc, 'mkpath', return_value=None),
            EnvironmentVarGuard() as env,
        ):
            env['CC'] = 'ccache my_cc'
            env['CXX'] = 'my_cxx'
            del env['LDSHARED']
            sysconfig.customize_compiler(self.cc)
            assert self.cc.linker_so[0:2] == ['ccache', 'my_cc']
            self.cc.link(None, [], 'a.out', target_lang='c++')
            call_args = mock_spawn.call_args[0][0]
            expected = ['my_cxx', '-bundle', '-undefined', 'dynamic_lookup']
            assert call_args[:4] == expected

    @pytest.mark.skipif('platform.system == "Windows"')
    def test_explicit_ldshared(self):
        # Issue #18080:
        # ensure that setting CC env variable does not change
        #   explicit LDSHARED setting for linker
        def gcv(v):
            if v == 'LDSHARED':
                return 'gcc-4.2 -bundle -undefined dynamic_lookup '
            return 'gcc-4.2'

        def gcvs(*args, _orig=sysconfig.get_config_vars):
            if args:
                return list(map(sysconfig.get_config_var, args))
            return _orig()

        sysconfig.get_config_var = gcv
        sysconfig.get_config_vars = gcvs
        with EnvironmentVarGuard() as env:
            env['CC'] = 'my_cc'
            env['LDSHARED'] = 'my_ld -bundle -dynamic'
            sysconfig.customize_compiler(self.cc)
        assert self.cc.linker_so[0] == 'my_ld'

    def test_has_function(self):
        # Issue https://github.com/pypa/distutils/issues/64:
        # ensure that setting output_dir does not raise
        # FileNotFoundError: [Errno 2] No such file or directory: 'a.out'
        self.cc.output_dir = 'scratch'
        os.chdir(self.mkdtemp())
        self.cc.has_function('abort')

    def test_find_library_file(self, monkeypatch):
        compiler = unix.Compiler()
        compiler._library_root = lambda dir: dir
        monkeypatch.setattr(os.path, 'exists', lambda d: 'existing' in d)

        libname = 'libabc.dylib' if sys.platform != 'cygwin' else 'cygabc.dll'
        dirs = ('/foo/bar/missing', '/foo/bar/existing')
        assert (
            compiler.find_library_file(dirs, 'abc').replace('\\', '/')
            == f'/foo/bar/existing/{libname}'
        )
        assert (
            compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/')
            == f'/foo/bar/existing/{libname}'
        )

        monkeypatch.setattr(
            os.path,
            'exists',
            lambda d: 'existing' in d and '.a' in d and '.dll.a' not in d,
        )
        assert (
            compiler.find_library_file(dirs, 'abc').replace('\\', '/')
            == '/foo/bar/existing/libabc.a'
        )
        assert (
            compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/')
            == '/foo/bar/existing/libabc.a'
        )


_PROGRESS)
            _text = getString(R.styleable.LineTextProgressView_progress_text) ?: ""
            textPaint.color = getColor(R.styleable.LineTextProgressView_progress_text_color, color(R.color.md_theme_onPrimary))
            textPaint.textSize = getDimension(R.styleable.LineTextProgressView_progress_text_size, DEFAULT_TEXT_SIZE)
            progressPaint.color = getColor(R.styleable.LineTextProgressView_progress_color, color(R.color.md_theme_primary))
            backgroundPaint.color = getColor(R.styleable.LineTextProgressView_progress_background_color, color(R.color.md_theme_primaryContainer))
            _progressHeight = getDimension(R.styleable.LineTextProgressView_linetext_progress_height, dimension(R.dimen.default_horizontal_text_progress_height))
            boxPaint.color = getColor(R.styleable.LineTextProgressView_linetext_progress_box_color, color(R.color.md_theme_primary))
            _textMargin = getDimension(R.styleable.LineTextProgressView_linetext_progress_text_margin, dimension(R.dimen.default_linetext_progress_text_margin))
            _textboxWidth = getDimension(R.styleable.LineTextProgressView_linetext_progress_box_width, dimension(R.dimen.default_linetext_progress_box_width))
        }
    }

}/*
 * Copyright 2021-2025 VastGui
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.ave.vastgui.tools.view.viewpager2.indicator

import android.content.Context
import android.graphics.Bitmap
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.Rect
import android.graphics.RectF
import android.util.AttributeSet
import android.view.View
import androidx.annotation.ColorInt
import androidx.annotation.ColorRes
import androidx.annotation.DrawableRes
import androidx.annotation.FloatRange
import androidx.annotation.IntRange
import androidx.core.content.ContextCompat
import androidx.core.content.withStyledAttributes
import androidx.viewpager2.widget.ViewPager2
import com.ave.vastgui.core.extension.NotNUllVar
import com.ave.vastgui.tools.R
import com.ave.vastgui.tools.graphics.BmpUtils
import com.ave.vastgui.tools.utils.ColorUtils
import com.ave.vastgui.tools.utils.color
import com.ave.vastgui.tools.utils.dimension
import com.ave.vastgui.tools.utils.integer
import com.ave.vastgui.tools.view.extension.gone
import com.ave.vastgui.tools.view.extension.visible
import kotlin.math.roundToInt

// Author: Vast Gui
// Email: guihy2019@gmail.com
// Date: 2023/4/1
// Documentation: https://sakurajimamaii.github.io/AVE-DOC/documents/tools/core-topics/ui/viewpager2/indicator/vp2-indicator-view/

/**
 * [Vp2IndicatorView].
 *
 * ```xml
 * <com.ave.vastgui.tools.view.vp2indicatorview.V