/* Copyright (C) 2016 Alexander Lamaison
 * All rights reserved.
 *
 * 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 the copyright holder nor the names
 *   of any other contributors may be used to endorse or
 *   promote products derived from this software without
 *   specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 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.
 */

#ifndef LIBSSH2_TESTS_OPENSSH_FIXTURE_H
#define LIBSSH2_TESTS_OPENSSH_FIXTURE_H

int start_openssh_fixture(void);
void stop_openssh_fixture(void);
libssh2_socket_t open_socket_to_openssh_server(void);
void close_socket_to_openssh_server(libssh2_socket_t sock);
int openssh_fixture_have_docker(void);

#endif


2263 onMouseOver="ShowTip(event, 'tt2263', 'link2263')" onMouseOut="HideTip('tt2263')" class=ISymbol>onCreate, OpenLayers.<wbr>Ajax.<wbr>Responders

 	ondblclick, OpenLayers.<wbr>Popup

 	onDrag, OpenLayers.<wbr>Control.<wbr>DragFeature

 	onEnter, OpenLayers.<wbr>Control.<wbr>DragFeature

 	onFeatureInsert, OpenLayers.<wbr>Layer.<wbr>Vector

 	onImageError, OpenLayers.<wbr>Tile.<wbr>Image

 	onImageLoad
GlobalOpenLayers.<wbr>Tile.<wbr>Image

 	onLeave, OpenLayers.<


MockContractManagerKeeper
}

// NewMockContractManagerKeeper creates a new mock instance.
func NewMockContractManagerKeeper(ctrl *gomock.Controller) *MockContractManagerKeeper {
	mock := &MockContractManagerKeeper{ctrl: ctrl}
	mock.recorder = &MockContractManagerKeeperMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockContractManagerKeeper) EXPECT() *MockContractManagerKeeperMockRecorder {
	return m.recorder
}

// AddContractFailure mocks base method.
func (m *MockContractManagerKeeper) AddContractFailure(ctx context.Context, address string, sudoPayload []byte, errMsg string) types1.Failure {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AddContractFailure", ctx, address, sudoPayload, errMsg)
	ret0, _ := ret[0].(types1.Failure)
	return ret0
}

// AddContractFailure indicates an expected call of AddContractFailure.
func (mr *MockContractManagerKeeperMockRecorder) AddContractFailure(ctx, address, sudoPayload, errMsg interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddContractFailure", reflect.TypeOf((*MockContractManagerKeeper)(nil).AddContractFailure), ctx, address, sudoPayload, errMsg)
}

// GetParams mocks base method.
func (m *MockContractManagerKeeper) GetParams(ctx context.Context) types1.Params {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetParams", ctx)
	ret0, _ := ret[0].(types1.Params)
	return ret0
}

// GetParams indicates an expected call of GetParams.
func (mr *MockContractManagerKeeperMockRecorder) GetParams(ctx interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetParams", reflect.TypeOf((*MockContractManagerKeeper)(nil).GetParams), ctx)
}
package keeper

import (
	"testing"

	"cosmossdk.io/log"
	"cosmossdk.io/store"
	metrics2 "cosmossdk.io/store/metrics"
	storetypes "cosmossdk.io/store/types"
	tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
	adminmoduletypes "github.com/cosmos/admin-module/v2/x/adminmodule/types"
	db2 "github.com/cosmos/cosmos-db"
	"github.com/cosmos/cosmos-sdk/codec"
	codectypes "github.com/cosmos/cosmos-sdk/codec/types"
	sdk "github.com/cosmos/cosmos-sdk/types"
	authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
	"github.com/stretchr/testify/require"

	"github.com/neutron-org/neutron/v8/x/feerefunder/keeper"
	"github.com/neutron-org/neutron/v8/x/feerefunder/types"
)

func FeeKeeper(t testing.TB, channelKeeper types.ChannelKeeper, bankKeeper types.BankKeeper) (*keeper.Keeper, sdk.Context) {
	storeKey := storetypes.NewKVStoreKey(types.StoreKey)
	memStoreKey := storetypes.NewMemoryStoreKey(types.MemStoreKey)

	db := db2.NewMemDB()
	stateStore := store.NewCommitMult


_VERSIONS = MapUtils.getString(configMap, "cachecloud.warn.client",
                ConstUtils.DEFAULT_WARN_CLIENT_VERSIONS);
        logger.info("{}: {}", "ConstUtils.WARN_CLIENT_VERSIONS", ConstUtils.WARN_CLIENT_VERSIONS);

        ConstUtils.ERROR_CLIENT_VERSIONS = MapUtils.getString(configMap, "cachecloud.error.client",
                ConstUtils.DEFAULT_ERROR_CLIENT_VERSIONS);
        logger.info("{}: {}", "ConstUtils.ERROR_CLIENT_VERSIONS", ConstUtils.ERROR_CLIENT_VERSIONS);

        //redis-migrate-tool安装路径
        ConstUtils.REDIS_MIGRATE_TOOL_HOME = MapUtils.getString(configMap, "redis.migrate.tool.home",
                ConstUtils.DEFAULT_REDIS_MIGRATE_TOOL_HOME);
        logger.info("{}: {}", "ConstUtils.REDIS_MIGRATE_TOOL_HOME", ConstUtils.REDIS_MIGRATE_TOOL_HOME);

        //用户登录状态方式
        ConstUtils.USER_LOGIN_TYPE = MapUtils.getIntValue(configMap, "cachecloud.user.login.type", ConstUtils.DEFAULT_USER_LOGIN_TYPE);
        UserLoginTypeEnum userLoginTypeEnum = UserLoginTypeEnum.getLoginTypeEnum(ConstUtils.USER_LOGIN_TYPE);
        logger.info("{}: {}, {}", "ConstUtils.USER_LOGIN_TYPE", userLoginTypeEnum.getType(), userLoginTypeEnum.getDesc());

        //cookie登录方式所需要的domain
        ConstUtils.COOKIE_DOMAIN = MapUtils.getString(configMap, "cachecloud.cookie.domain", ConstUtils.DEFAULT_COOKIE_DOMAIN);
        logger.info("{}: {}", "ConstUtils.COOKIE_DOMAIN", ConstUtils.COOKIE_DOMAIN);

        //cachecloud根目录
        ConstUtils.CACHECLOUD_BASE_DIR = MapUtils.getString(configMap, "cachecloud.base.dir", ConstUtils.DEFAULT_CACHECLOUD_BASE_DIR);
        logger.info("{}: {}", "ConstUtils.CACHECLOUD_BASE_DIR", ConstUtils.CACHECLOUD_BASE_DIR);

        //应用客户端连接报警阀值
        ConstUtils.APP_CLIENT_CONN_THRESHOLD = MapUtils.getIntValue(configMap, "cachecloud.app.client.conn.threshold", ConstUtils.DEFAULT_APP_CLIENT_CONN_THRESHOLD);
        logger.info("{}: {}", "ConstUtils.APP_CLIENT_CONN_THRESHOLD", ConstUtils.APP_CLIENT_CONN_THRESHOLD);

        //邮件报警接口
        ConstUtils.EMAIL_ALERT_INTERFACE = MapUtils.getString(configMap, "cachecloud.email.alert.interface", ConstUtils.DEFAULT_EMAIL_ALERT_INTERFACE);
        logger.info("{}: {}", "ConstUtils.EMAIL_ALERT_INTERFACE", ConstUtils.EMAIL_ALERT_INTERFACE);

        //短信报警接口
        ConstUtils.MOBILE_ALERT_INTERFACE = MapUtils.getString(configMap, "cachecloud.mobile.alert.interface", ConstUtils.DEFAULT_MOBILE_ALERT_INTERFACE);
        logger.info("{}: {}", "ConstUtils.MOBILE_ALERT_INTERFACE", ConstUtils.MOBILE_ALERT_INTERFACE);

        //LDAP登录地址
        ConstUtils.LDAP_URL = MapUtils.getString(configMap, "cachecloud.ldap.url", ConstUtils.DEFAULT_LDAP_URL);
        logger.info("{}: {}", "ConstUtils.LDAP_URL", ConstUtils.LDAP_URL);

        //是否定期清理各种统计数据(详见CleanUpStatisticsJob)
        ConstUtils.WHETHER_SCHEDULE_CLEAN_DATA = MapUtils.getBooleanValue(configMap, "cachecloud.whether.schedule


D Format
    uint32_t    formatSize;

    IGetD3DTextureFormat( mipmap, formatType, formatSize );

    // Compressed or 16 bit, we can use directly.
    if( mipmap->IsCompressed() || ( mipmap->GetPixelSize() < 32 ) )
    {
        numPixels = 0;
        if( noMip )
        {
            numLevels = 1;
            levelSizes = nullptr;
            totalSize = mipmap->GetLevelSize(0);
        }
        else
        {
            uint32_t          sizeMask = 0x03;

            int maxLevel = mipmap->GetNumLevels() - 1;

            /// 9.7.2000 - Also do this test if the card doesn't support
            /// itty bitty textures
            if( mipmap->IsCompressed() || !( fSettings.fD3DCaps & kCapsDoesSmallTextures ) )
            {
                mipmap->SetCurrLevel( maxLevel );
                while (maxLevel && (mipmap->GetCurrWidth() | mipmap->GetCurrHeight()) & sizeMask)
                {
                    maxLevel--;
                    mipmap->SetCurrLevel( maxLevel );
                }
            }

            mipmap->SetCurrLevel( 0 );
            totalSize = 0;
            numLevels = maxLevel + 1;
            levelSizes = new uint32_t[ numLevels ];
            int i;
            for( i = 0; i < numLevels; i++ )
            {
                levelSizes[ i ] = mipmap->GetLevelSize( i );
                totalSize += mipmap->GetLevelSize( i );
            }
        }

        textureData = mipmap->GetImage();
        externData = true;
    }
    else
    {
        // 32 bit uncompressed data. In general, we reformat to 16 bit if we're running
        // 16 bit, or if 32 bit leave it at 32. All subject to what the hardware can do
        // and what the texture is for. See IGetD3DTextureFormat.
        formatSize >>= 3;

        if( !noMip )
        {
            numPixels = mipmap->GetTotalSize() * 8 / mipmap->GetPixelSize();
            numLevels = mipmap->GetNumLevels();

            levelSizes = new uint32_t[ numLevels ];

            int     i;
            uint32_t w, h;
            for( i = 0; i < numLevels; i++ )
            {
                mipmap->GetLevelPtr( i, &w, &h );
                levelSizes[ i ] = w * h * formatSize;
            }
        }
        else
        {
            numPixels = mipmap->GetWidth() * mipmap->GetHeight();
            numLevels = 1;
            levelSizes = nullptr;
        }
        totalSize = numPixels * formatSize;

        // Shared scratch space to reformat a texture before it's copied into
        // the D3D surface.
        textureData = IGetPixelScratch( totalSize );

        // Convert it to the requested format.
        IFormatTextureData( formatType, numPixels, (hsRGBAColor32 *)mipmap->GetImage(), textureData );
    }

    return externData;
}

//// IGetPixelScratch /////////////////////////////////////////////////////////
// Return scratch space at least of at least size bytes, to reformat a mipmap into.
void    *plDXPipeline::IGetPixelScratch( uint32_t size )
{
    static char     *sPtr = nullptr;
    static uint32_t   sSize = 0;

    if( size > sSize )
    {
        if (sPtr != nullptr)
            delete [] sPtr;

        if( size > 0 )
            sPtr = new char[ sSize = size ];


import ejercicio14 as ej14
import ejercicio15 as ej15

# Constantes
CADENA_A = "CAAACCAABAACBBCABACCAAABCBBACC"
CADENA_B = "BBAAACCAAABCCCAACCCBBACCAABBAA"

# Funciones
def resolver_inciso(cadena: str) -> None:
    alfabeto, matriz_de_transiciones = ej15.obtenerAlfabetoYTransiciones(cadena)
    if ej15.esFuenteDeMemoriaNula(matriz_de_transiciones):
        print("La cadena proviene de una fuente de memoria nula.")
    else:
        print("La cadena proviene de una fuente con memoria.")
    print("Entropía de la fuente: ", ej14.entropiaMarkoviana(matriz_de_transiciones), " bits")

# Programa principal
print("Inciso A:")
resolver_inciso(CADENA_A)
print("\nInciso B:")
resolver_inciso(CADENA_B)


# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing_extensions import Literal, TypeAlias

__all__ = ["ChatModel"]

ChatModel: TypeAlias = Literal[
    "o3-mini",
    "o3-mini-2025-01-31",
    "o1",
    "o1-2024-12-17",
    "o1-preview",
    "o1-preview-2024-09-12",
    "o1-mini",
    "o1-mini-2024-09-12",
    "gpt-4o",
    "gpt-4o-2024-11-20",
    "gpt-4o-2024-08-06",
    "gpt-4o-2024-05-13",
    "gpt-4o-audio-preview",
    "gpt-4o-audio-preview-2024-10-01",
    "gpt-4o-audio-preview-2024-12-17",
    "gpt-4o-mini-audio-preview",
    "gpt-4o-mini-audio-preview-2024-12-17",
    "gpt-4o-search-preview",
    "gpt-4o-mini-search-preview",
    "gpt-4o-search-preview-2025-03-11",
    "gpt-4o-mini-search-preview-2025-03-11",
    "chatgpt-4o-latest",
    "gpt-4o-mini",
    "gpt-4o-mini-2024-07-18",
    "gpt-4-turbo",
    "gpt-4-turbo-2024-04-09",
    "gpt-4-0125-preview",
    "gpt-4-turbo-preview",
    "gpt-4-1106-preview",
    "gpt-4-vision-preview",
    "gpt-4",
    "gpt-4-0314",
    "gpt-4-0613",
    "gpt-4-32k",
    "gpt-4-32k-0314",
    "gpt-4-32k-0613",
    "gpt-3.5-turbo",
    "gpt-3.5-turbo-16k",
    "gpt-3.5-turbo-0301",
    "gpt-3.5-turbo-0613",
    "gpt-3.5-turbo-1106",
    "gpt-3.5-turbo-0125",
    "gpt-3.5-turbo-16k-0613",
]


_OUTPUT_PATH, logo_rs).unwrap();
}
//
//
// ktail.rs
// Copyright (C) 2021 ktools Author imotai <<EMAIL>>
//
// 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.
//
//

extern crate getopts;
use getopts::Options;
use std::env;
use std::io::{self, Write};
mod base;

fn main() {
    let args: Vec<String> = env::args().collect();
    let program = args[0].clone();
    let mut opts = Options::new();
    opts.optflag("h", "help", "print this help menu");
    opts.optflag("f", "", "no stop");
    opts.optopt("n", "", "The location is number lines", "NUMBER");
    let matches = match opts.parse(&args[1..]) {
        Ok(m) => m,
        Err(f) => {
            panic!("Error {}", f.to_string())
        }
    };
    if matches.opt_present("h") {
        base::print_usage(&program, opts);
        return;
    }
    let brokers: Vec<&str> = matches.free[0].split(",").collect();
    let brokers: Vec<String> = brokers.iter().map(|&x| String::from(x)).collect();

    let mut number: i32 = -1;
    if matches.opt_present("n") {
        number = matches.opt_str("n").unwrap().parse().unwrap();
    }
    let broker_config = base::MessageServerConfig {
        brokers,
        server_type: base::MessageQueueServerType::Kafka,
    };
    let topic_config = base::TopicConfig {
        topic: matches.free[1].clone(),
        offset_position: base::ReadPosition::Tail { limit: number },
        format: base::MessageFormat::JSON,
        fetch_max_bytes_read_per_partition: 1000_1000,
    };
    let consumer = base::KtoolsConsumer::new(broker_config, topic_config, 10);
    match consumer {
        Ok(mut c) => c.consume(),
        _ => {
            println!("some errors")
        }
    }
}
<reponame>TyPR124/winping<filename>src/async_pinger.rs
use winapi::{
    shared::{
        minwindef::{DWORD, TRUE},
        ntdef::{HANDLE, NULL, ULONG, VOID},
        winerror::ERROR_IO_PENDING,
        ws2def::AF_INET6,
        ws2ipdef::SOCKADDR_IN6,
    },
    um::{
        errhandlingapi::GetLastError,
        handleapi::INVALID_HANDLE_VALUE,
        icmpapi::{
            Icmp6CreateFile, Icmp6ParseReplies, Icmp6SendEcho2, IcmpCreateFile, IcmpParseReplies,
            IcmpSendEcho2, IcmpSendEcho2Ex,
        },
        ipexport::{IP_FLAG_DF, IP_SUCCESS},
        synchapi::{CreateEventExW, SetEvent, WaitForSingleObjectEx},
        winbase::{INFINITE, WAIT_FAILED, WAIT_IO_COMPLETION, WAIT_OBJECT_0},
        winnt::{DELETE, EVENT_MODIFY_STATE, SYNCHRONIZE},
    },
};

#[cfg(target_pointer_width = "32")]
use winapi::um::ipexport::IP


  F: EnvironmentalK<F, Fix0, Fix1, Fix2, Fix3>
): <R0, R>(
  f: (r: R0) => R
) => <TK, TKN extends string, SI, SO, X, I, S, E, A>(
  fa: KindFix<F, Fix0, Fix1, Fix2, Fix3, TK, TKN, SI, SO, X, I, S, R, E, A>
) => KindFix<F, Fix0, Fix1, Fix2, Fix3, TK, TKN, SI, SO, X, I, S, R0, E, A>
export function provideSomeF<F, Fix0 = any, Fix1 = any, Fix2 = any, Fix3 = any>(
  F: EnvironmentalF<F, Fix0, Fix1, Fix2, Fix3>
): <R0, R>(
  f: (r: R0) => R
) => <TK, TKN extends string, SI, SO, X, I, S, E, A>(
  fa: HKTFix<F, Fix0, Fix1, Fix2, Fix3, TK, TKN, SI, SO, X, I, S, R, E, A>
) => HKTFix<F, Fix0, Fix1, Fix2, Fix3, TK, TKN, SI, SO, X, I, S, R0, E, A>
export function provideSomeF<F>(
  F: EnvironmentalF<F>
): <R0, R>(f: (r: R0) => R) => <E, A>(fa: HKT3<F, R, E, A>) => HKT3<F, R0, E, A> {
  return <R0, R>(f: (r: R0) => R) => <E, A>(fa: HKT3<F, R, E, A>) =>
    accessMF(F)((r: R0) => F.provide(f(r))(fa))
}

/**
 * Generic provideSome
 */
export function provideServiceF<
  F extends URIS,
  Fix0 = any,
  Fix1 = any,
  Fix2 = any,
  Fix3 = any
>(
  F: EnvironmentalK<F, Fix0, Fix1, Fix2, Fix3>
): <SR>(
  Has: Augmented<SR>
) => (
  Service: SR
) => <TK, TKN extends string, SI, SO, X, I, S, R, E, A>(
  fa: KindFix<F, Fix0, Fix1, Fix2, Fix3, TK, TKN, SI, SO, X, I, S, R & Has<SR>, E, A>
) => KindFix<F, Fix0, Fix1, Fix2, Fix3, TK, TKN, SI, SO, X, I, S, R, E, A>
export function provideServiceF<F, Fix0 = any, Fix1 = any, Fix2 = any, Fix3 = any>(
  F: EnvironmentalF<F, Fix0, Fix1, Fix2, Fix3>
): <SR>(
  Has: Augmented<SR>
) => (
  Service: SR
) => <TK, TKN extends string, SI, SO, X, I, S, R, E, A>(
  fa: HKTFix<F, Fix0, Fix1, Fix2, Fix3, TK, TKN, SI, SO, X, I, S, R & Has<SR>, E, A>
) => HKTFix<F, Fix0, Fix1, Fix2, Fix3, TK, TKN, SI, SO, X, I, S, R, E, A>
export function provideServiceF<F>(
  F: EnvironmentalF<F>
): <SR>(
  Has: Augmented<SR>
) => (Service: SR) => <R, E, A>(fa: HKT3<F, R & Has<SR>, E, A>) => HKT3<F, R, E, A> {
  return (Has) => (Service) =>
    provideSomeF(F)((r) => ({ ...r, [Has[HasURI].key]: Service } as any))
}

/**
 * Generic a


>位置	类型	称号	主题曲

辉光所见的幻想乡(欢乐书客 网络小说作品)	人间之里西北部		光辉猎手	赤黑/Duet

## 角色设定

来历不明的外界人，并未通过任何一种旧有的方法进入幻想乡，从而引发了管理者相当的警觉。

作为女性，个性称得上开朗豪爽、粗中有细，是一位勇敢无畏的女性。

对身为人类有着高度的认同感和自豪感，不喜欢被当成非人类。因为处世有智慧而能够得到他人的认可和尊敬，乐于帮助别人。

她的三观正常，明是非，讲道理。尽管如此，她依然有着强大的实力。而且她能够捕捉到一些不应该在这个世界上的人物的踪迹，从他们那里得到力量和过去的记忆。

目前已经协同退治了红雾异变。

## 同人的求闻格式设定

银与黑的不灭烛火 落

能力·操纵光芒程度的能力

危险度：低

人类友好度：极高

主要活动范围：幻想乡全境，以人间之里、博丽神社、无名之丘以及雾之湖为主。

在红雾异变前不久被首次目击于无缘冢，随后定居于人间之里的外来者。住所位于人间之里中心偏西北的商店街地带。


       "Private-Lines: 14\n" +
                "erS8mfUDEme+ujzF1k0GA7d2P4umHriMFQjBZIdvht6amZXoF1L+bkJp82/vG9lv\n" +
                "YYNYQqk5tHezkV3sJncPwr3RI/0Y1L+WtKWSfE6OzSKdYJoX3WpAuMTeMlVrxu0t\n" +
                "RXnjbfSz7Z1czryxO4NgAK3NsYQK6h290uq5/mpqP6fIhT3/tn+mH8kihAt8+uum\n" +
                "1RW9ucNi3TZTG4I00Z3LWHw1VaqYFeCYh3yp8Canv3mKGn5ISqsd5ehNXW1TYvJF\n" +
                "Bd742+JlxK8dhrAr2R+g+erSA0ac8Df3wH72syVPzdewnh+21zff3NGI9GWN799X\n" +
                "CnVtf+psDPuebGQIHewNTGsaziNkAT5rGXdNMo3Xln/B1Wr9l8tIJAtDWSNqjDLp\n" +
                "kAcLQ+Z1wTPZehZKBi0oTsLVm4tEcPQsbnuK9h+Y/d9EWcmBEiHTGM6otesNZNA8\n" +
                "i247YZpyrG3azeRFBVMNSzKJ+vS2rKpgvm8nbYKy+nO5uNZDEm9oARr9QPCxdzXK\n" +
                "dmI9F8IT3tLd4qCekD4DI9MKxJLjzFmyGOHc4zMxgUyL5BT5suVDIAWL/hiekwjt\n" +
                "T1+V+TRScq4c+pIWxfVu4kY+HpLUpSR3RAVaRFar7jaB+YEEXw+gqEVTCyZeXGFf\n" +
                "dWU+8BkhFBF24v3Qoi9SmuWYrSQGl9O8smIHW0H2JCNF+8oqpQG8dwx37L3VyMNq\n" +
                "ApJh0LnRhoRwKo2YaAZKInaFTYS8Gnj7DvZ+l7lxPRfCV5yl9U2How2BI9YPRDDu\n" +
                "Gs4agAG3InJnMiuIOzaNOIFLGM9STtYNyvG411rj6tR4EEQ6cJCxIlVe5a1mEt7M\n" +
                "GVfbB5wUvow0o0a56OBmFMZOCxV2Vpxu6PuGTD8QQ0O0YzNDWFk3Fj2RRnnLCBLF\n" +
                "Private-MAC: f742e2954fbb0c98984db0d9855a0f15507ecc0a"
        )
    }

    private lateinit var scenario: ActivityScenario<MainActivity>

    /**
     * Pre test setup.
     */
    @Before
    fun setUp() {
        RxJavaPlugins.reset()
        RxJavaPlugins.setIoSchedulerHandler { Schedulers.trampoline() }
        RxAndroidPlugins.reset()
        RxAndroidPlugins.setInitMainThreadSchedulerHandler { Schedulers.trampoline() }
        if (SDK_INT >= N) TestUtils.initializeInternalStorage()
        scenario = ActivityScenario.launch(MainActivity::class.java)


i dataa",carousel:{prev:"Edellinen kuva",next:"Seuraava kuva",ariaLabel:{delimiter:"Karusellin kuva {0}/{1}"}},calendar:{moreEvents:"{0} lisää"},fileInput:{counter:"{0} tiedostoa",counterSize:"{0} tiedostoa ({1} yhteensä)"},timePicker:{am:"ap.",pm:"ip."},pagination:{ariaLabel:{wrapper:"Pagination Navigation",next:"Seuraava sivu",previous:"Edellinen sivu",page:"Mene sivulle {0}",currentPage:"Nykyinen sivu, Sivu {0}"}},rating:{ariaLabel:{icon:"Luokitus {0}/{1}"}}}},"./src/locale/fr.ts":function(t,e,i){"use strict";i.r(e),e.default={badge:"Badge",close:"Fermer",dataIterator:{noResultsText:"Aucun enregistrement correspondant trouvé",loadingText:"Chargement de l'élément..."},dataTable:{itemsPerPageText:"Lignes par page :",ariaLabel:{sortDescending:"Tri décroissant.",sortAscending:"Tri croissant.",sortNone:"Non trié.",activateNone:"Activer pour supprimer le tri.",activateDescending:"Activer pour trier par ordre décroissant.",activateAscending:"Activer pour trier par ordre croissant."},sortBy:"Trier par"},dataFooter:{itemsPerPageText:"Élements par page :",itemsPerPageAll:"Tous",nextPage:"Page suivante",prevPage:"Page précédente",firstPage:"Première page",lastPage:"Dernière page",pageText:"{0}-{1} de {2}"},datePicker:{itemsSelected:"{0} sélectionné(s)",nextMonthAriaLabel:"Le mois prochain",nextYearAriaLabel:"L'année prochaine",prevMonthAriaLabel:"Le mois précédent",prevYearAriaLabel:"Année précédente"},noDataText:"Aucune donnée disponible",carousel:{prev:"Visuel précédent",next:"Visuel suivant",ariaLabel:{delimiter:"Diapositive {0} de {1}"}},calendar:{moreEvents:"{0} de plus"},fileInput:{counter:"{0} fichier(s)",counterSize:"{0} fichier(s) ({1} au total)"},timePicker:{am:"AM",pm:"PM"},pagination:{ariaLabel:{wrapper:"Navigation de pagination",next:"Page suivante",previous:"Page précédente",page:"Aller à la page {0}",currentPage:"Page actuelle, Page {0}"}},rating:{ariaLabel:{icon:"Note de {0} sur {1}"}}}},"./src/locale/he.ts":function(t,e,i){"use strict";i.r(e),e.default={badge:"תג",close:"סגור",dataIterator:{noResultsText:"לא נמצאו תוצאות מתאימות",loadingText:"טוען פריט..."},dataTable:{itemsPerPageText:"שורות לעמוד:",ariaLabel:{sortDescending:"ממוין לפי סדר עולה. לחץ להספקת המיון.",sortAscending:"ממוין לפי סדר יורד. לחץ למיון לפי סדר עולה.",sortNone:"לא ממוין. לחץ למיון לפי סדר עולה.",activateNone:"הפעל להסרת המיון.",activateDescending:"הפעל למיון יורד.",activateAscending:"הפעל למיון עולה."},sortBy:"סדר לפי"},dataFooter:{itemsPerPageText:"פריטים לדף:",itemsPerPageAll:"הכל",


_cpe[i] & 1) {
            pce->cpe_channel[pce->side_element_tag_select[i]] = pce->channels;
            pce->num_side_channels += 2;
            pce->channels += 2;
        } else {
            pce->sce_channel[pce->side_element_tag_select[i]] = pce->channels;
            pce->num_side_channels++;
            pce->channels++;
        }
    }
    for (i = 0; i < pce->num_back_channel_elements; i++) {
        pce->back_element_is_cpe[i] = faad_get1bit(ld);
        pce->back_element_tag_select[i] = (uint8_t)faad_getbits(ld, 4);
        if (pce->back_element_is_cpe[i] & 1) {
            pce->cpe_channel[pce->back_element_tag_select[i]] = pce->channels;
            pce->channels += 2;
            pce->num_back_channels += 2;
        } else {
            pce->sce_channel[pce->back_element_tag_select[i]] = pce->channels;
            pce->num_back_channels++;
            pce->channels++;
        }
    }
    for (i = 0; i < pce->num_lfe_channel_elements; i++) {
        pce->lfe_element_tag_select[i] = (uint8_t)faad_getbits(ld, 4);
        pce->sce_channel[pce->lfe_element_tag_select[i]] = pce->channels;
        pce->num_lfe_channels++;
        pce->channels++;
    }
    for (i = 0; i < pce->num_assoc_data_elements; i++) pce->assoc_data_element_tag_select[i] = (uint8_t)faad_getbits(ld, 4);
    for (i = 0; i < pce->num_valid_cc_elements; i++) {
        pce->cc_element_is_ind_sw[i] = faad_get1bit(ld);
        pce->valid_cc_element_tag_select[i] = (uint8_t)faad_getbits(ld, 4);
    }
    faad_byte_align(ld);
    pce->comment_field_bytes = (uint8_t)faad_getbits(ld, 8);
    for (i = 0; i < pce->comment_field_bytes; i++) { pce->comment_field_data[i] = (uint8_t)faad_getbits(ld, 8); }
    pce->comment_field_data[i] = 0;
    if (pce->channels > MAX_CHANNELS) return 22;
    return 0;
}
//——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
void decode_sce_lfe(NeAACDecStruct* hDecoder, NeAACDecFrameInfo* hInfo, bitfile* ld, uint8_t id_syn_ele) {
    uint8_t channels = hDecoder->fr_channels;
    uint8_t tag = 0;
    if (channels + 1 > MAX_CHANNELS) {
        hInfo->error = 12;
        return;
    }
    if (hDecoder->fr_ch_ele + 1 > MAX_SYNTAX_ELEMENTS) {
        hInfo->error = 13;
        return;
    }
    /* for SCE hDecoder->element_output_channels[] is not set here because this
       can become 2 when some form of Parametric Stereo coding is used
    */
    if (hDecoder->element_id[hDecoder->fr_ch_ele] != INVALID_ELEMENT_ID && hDecoder->element_id[hDecoder->fr_ch_ele] != id_syn_ele) {
        /* element inconsistency */
        memset(&hDecoder->element_


                    "Vertical rate not available for ICAO 0x%lx.", icao_address);
        decode_successful = false;
    } else {
        ADSBTypes::VerticalRateSource vertical_rate_source =
            static_cast<ADSBTypes::VerticalRateSource>(packet.GetNBitWordFromMessage(1, 35));
        bool vertical_rate_sign_is_negative = packet.GetNBitWordFromMessage(1, 36);
        switch (vertical_rate_source) {
            case ADSBTypes::kVerticalRateSourceBaro:
                WriteBitFlag(kBitFlagBaroVerticalRateValid, true);
                WriteBitFlag(kBitFlagUpdatedBaroVerticalRate, true);
                baro_vertical_rate_fpm =
                    (vertical_rate_magnitude_fpm - 1) * 64 * (vertical_rate_sign_is_negative ? -1 : 1);
                break;
            case ADSBTypes::kVerticalRateSourceGNSS:
                WriteBitFlag(kBitFlagGNSSVerticalRateValid, true);
                WriteBitFlag(kBitFlagUpdatedGNSSVerticalRate, true);
                gnss_vertical_rate_fpm =
                    (vertical_rate_magnitude_fpm - 1) * 64 * (vertical_rate_sign_is_negative ? -1 : 1);
                break;
            default:
                // No vertical rate source specified.
                CONSOLE_WARNING("AircraftDictionary::ApplyAirborneVelocitiesMessage",
                                "Vertical rate source not specified for ICAO 0x%lx.", icao_address);
                decode_successful = false;
        }
    }

    // Decode altitude difference between GNSS and barometric altitude.
    bool gnss_alt_below_baro_alt = static_cast<bool>(packet.GetNBitWordFromMessage(1, 48));
    uint16_t encoded_gnss_alt_baro_alt_difference_ft = static_cast<uint16_t>(packet.GetNBitWordFromMessage(7, 49));
    if (encoded_gnss_alt_baro_alt_difference_ft == 0) {
        CONSOLE_WARNING("AircraftDictionary::ApplyAirborneVelocitiesMessage",
                        "Difference between GNSS and baro altitude not available for aircraft 0x%lx.", icao_address);
        // Don't set decode_successful to false so that we ignore missing GNSS/Baro altitude info.
    } else {
        int gnss_alt_baro_alt_difference_ft =
            (encoded_gnss_alt_baro_alt_difference_ft - 1) * 25 * (gnss_alt_below_baro_alt ? -1 : 1);
        switch (altitude_source) {
            case ADSBTypes::kAltitudeSourceBaro:
                gnss_altitude_ft = baro_altitude_ft + gnss_alt_baro_alt_difference_ft;
                WriteBitFlag(ModeSAircraft::BitFlag::kBitFlagGNSSAltitudeValid, true);
                WriteBitFlag(ModeSAircraft::BitFlag::kBitFlagUpdatedGNSSAltitude, true);
                break;
            case ADSBTypes::kAltitudeSourceGNSS:
                baro_altitude_ft = gnss_altitude_ft - gnss_alt_baro_alt_difference_ft;
                WriteBitFlag(ModeSAircraft::BitFlag::kBitFlagBaroAltitudeValid, true);
                WriteBitFlag(ModeSAircraft::BitFlag::kBitFlagUpdatedBaroAltitude, true);
                break;
            default:
                // Don't sweat it if the aircraft doesn't have an altitude yet.
                break;
        }
    }

    return decode_successful;
}

bool ModeSAircraft::ApplyAircraftStatusMessage(const ModeSADSBPacket &packet) {
    // TODO: Implement Airraft Status message decoding.
    return true;
}

bool ModeSAircraft::ApplyTargetStateAndStatusInfoMessage(const ModeSADSBPacket &packet) {
    // TODO: Implement Target State and Status Info message decoding.
    return true;


ITED_JERK_EDITING)
      constexpr xyze_float_t max_jerk_edit =
        #ifdef MAX_JERK_EDIT_VALUES
          MAX_JERK_EDIT_VALUES
        #else
          { (DEFAULT_XJERK) * 2, (DEFAULT_YJERK) * 2,
            (DEFAULT_ZJERK) * 2, (DEFAULT_EJERK) * 2 }
        #endif
      ;
      limit_and_warn(inMaxJerkMMS, axis, PSTR("Jerk"), max_jerk_edit);
    #endif
    max_jerk[axis] = inMaxJerkMMS;
  }

#endif

#if HAS_WIRED_LCD

  uint16_t Planner::block_buffer_runtime() {
    #ifdef __AVR__
      // Protect the access to the variable. Only required for AVR, as
      //  any 32bit CPU offers atomic access to 32bit variables
      const bool was_enabled = stepper.suspend();
    #endif

    uint32_t bbru = block_buffer_runtime_us;

    #ifdef __AVR__
      // Reenable Stepper ISR
      if (was_enabled) stepper.wake_up();
    #endif

    // To translate µs to ms a division by 1000 would be required.
    // We introduce 2.4% error here by dividing by 1024.
    // Doesn't matter because block_buffer_runtime_us is already too small an estimation.
    bbru >>= 10;
    // limit to about a minute.
    NOMORE(bbru, 0x0000FFFFUL);
    return bbru;
  }

  void Planner::clear_block_buffer_runtime() {
    #ifdef __AVR__
      // Protect the access to the variable. Only required for AVR, as
      //  any 32bit CPU offers atomic access to 32bit variables
      const bool was_enabled = stepper.suspend();
    #endif

    block_buffer_runtime_us = 0;

    #ifdef __AVR__
      // Reenable Stepper ISR
      if (was_enabled) stepper.wake_up();
    #endif
  }

#endif
/************************
 * move_axis_screen.cpp *
 ************************/

/****************************************************************************
 *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
 *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
 *                                                                          *
 *   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, either version 3 of the License, or      *
 *   (at your option) any later version.                                    *
 *                                                                          *
 *   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.                           *
 *                                                                          *
 *   To view a copy of the GNU General Public License, go to the following  *
 *   location: <https://www.gnu.org/licenses/>.                             *
 ****************************************************************************/

#include "../config.h"
#include "screens.h"
#include "screen_data.h"

#ifdef FTDI_MOVE_AXIS_SCREEN

using namespace FTDI;
using namespace ExtUI;

constexpr static MoveAxisScreenData &mydata = screen_data.


 9.5-22.5 22.5-9.5h32v-65q-32-3-48-16.5t-16-46.5q0-36 18-80.5t49-78 61-33.5 61 33.5 49 78 18 80.5q0 33-16 46.5t-48 16.5v65h32q13 0 22.5 9.5t9.5 22.5-9.5 22.5-22.5 9.5h-32v256h64V512q0-88 54-157t138-91v-8q0-26 19-45t45.5-19 45 19 18.5 45v8q84 22 138 91t54 157v128h64V384h-32q-13 0-22.5-9.5t-9.5-22.5 9.5-22.5 22.5-9.5h32v-65q-32-3-48-16.5t-16-46.5q0-36 18.5-80.5t49-78 60.5-33.5 61 33.5 49 78 18 80.5q0 33-16 46.5t-48 16.5v65h32q13 0 22.5 9.5t9.5 22.5-9.5 22.5-22.5 9.5h-32v256h32zm-736 160q0-13-9.5-22.5t-22.5-9.5-22.5 9.5-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5 22.5-9.5 9.5-22.5v-64zm128 0q0-13-9.5-22.5t-22.5-9.5-22.5 9.5-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5 22.5-9.5 9.5-22.5v-64zm320 0q0-13-9.5-22.5t-22.5-9.5-22.5 9.5-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5 22.5-9.5 9.5-22.5v-64zm128 0q0-13-9.5-22.5t-22.5-9.5-22.5 9.5-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5 22.5-9.5 9.5-22.5v-64z"/></svg>';
  static const String mountains =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1024" height="895" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1024 895"><path fill="currentColor" d="M1001 895H24q-40-37-13-62L410 15q16-15 38-15t38 15l178 364 34-108q15-15 37.5-15t38.5 15l239 562q27 25-12 62zM448 128 321 383q0 7-1.5 20t-1 19 3 13.5 10 10T353 447q21-1 37.5-11.5t26-22 26-21T480 383q18 0 34 13.5t28.5 33 26 38.5 32 31.5T640 511z"/></svg>';
  static const String mouse =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="705" height="1024" preserveAspectRatio="xMidYMid meet" viewBox="0 0 705 1024"><path fill="currentColor" d="M385 445v-63q28-9 46-36.5t18-58.5V159q0-32-18-59.5T385 62V0q124 12 213 107t104 229Q560 436 385 445zm-32.5-126q-13.5 0-22.5-9.5t-9-22.5V159q0-14 9-23t22.5-9 23 9 9.5 23v128q0 13-9.5 22.5t-23 9.5zM321 382v63Q145 436 3 336q15-134 104.5-229T321 0v62q-28 10-46.5 37.5T2


ntext.getResources().getDisplayMetrics());
        return sActionBarHeight;
    }
}
package com.chroma;

public class ChromaLAB extends ChromaColor {

	private double lab_L;
	private double lab_A;
	private double lab_B;

	public ChromaLAB(double lab_L_, double lab_A_, double lab_B_, double alpha_) {

		this.lab_L = lab_L_;
		this.lab_A = lab_A_;
		this.lab_B = lab_B_;
		this.alpha = alpha_;
	}

	public double[] getLABComp() {
		return new double[] { lab_L, lab_A, lab_B };
	}

	// GET & SET METHODS
	// ///////////////////////////////////////////////////////////////////////////////////
	@Override
	public double getLAB_L() {
		return this.lab_L;
	}

	@Override
	public double getLAB_A() {
		return this.lab_A;
	}

	@Override
	public double getLAB_B() {
		return this.lab_B;
	}

	@Override
	public void setLAB_L(double lab_L_) {
		this.lab_L = lab_L_;
	}

	@Override
	public void setLAB_A(double lab_A_) {
		this.lab_A = lab_A_;
	}

	@Override
	public void setLAB_B(double lab_B_) {
		this.lab_B = lab_B_;
	}

	// CONVERSION METHODS
	// ///////////////////////////////////////////////////////////////////////////////////

	@Override
	public ChromaRGB getChromaRGB() {

		double y = (this.lab_L + 16.0) / 116.0;
		double x = y + this.lab_A / 500.0;
		double z = y - this.lab_B / 200.0;

		x = ChromaUtil.lab_xyz(x) * CONSTANT_X;
		y = ChromaUtil.lab_xyz(y) * CONSTANT_Y;
		z = ChromaUtil.lab_xyz(z) * CONSTANT_Z;

		double rgb_R_ = ChromaUtil.xyz_rgb(3.2404542 * x - 1.5371385 * y
				- 0.4985314 * z);
		double rgb_G_ = ChromaUtil.xyz_rgb(-0.9692660 * x + 1.8760108 * y
				+ 0.0415560 * z);
		double rgb_B_ = ChromaUtil.xyz_rgb(0.0556434 * x - 0.2040259 * y
				+ 1.0572252 * z);

		return new ChromaRGB(rgb_R_, rgb_G_, rgb_B_, alpha);
	}

	@Override
	public ChromaHSL getChromaHSL() {
		return getChromaRGB().getChromaHSL();
	}

	@Override
	public ChromaHSV getChromaHSV() {
		return getChromaRGB().getChromaHSV();
	}

	@Override
	public ChromaLAB getChromaLAB() {
		return this;
	}

	@Override
	public ChromaLCH getChromaLCH() {

		double lch_C_ = Math.sqrt(Math.pow(this.lab_A, 2)
				+ Math.pow(this.lab_B, 2));
		double lch_H_ = Math.atan2(this.lab_B, this.lab_A) / Math.PI * 180;

		return new ChromaLCH(this.lab_L, lch_C_, lch_H_, alpha);
	}

}
package nekiplay.meteorplus.hud;

import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.hud.HudElement;
import meteordevelopment.meteorclient.systems.hud.HudElementInfo;
import meteordevelopment.meteorclient.systems.hud.HudRenderer;
import meteordevelopment.meteorclient.utils.render.color.Color;
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
import nekiplay.meteorplus.features.modules.world.timer.TimerPlus;
import nekiplay.meteorplus.MeteorPlusAddon;

public class TimerPlusCharge extends HudElement {
	public static final HudElementInfo<TimerPlusCharge> INFO = new HudElementInfo<>(MeteorPlusAddon.HUD_GROUP, "timer+-charge", "Displays timer plus charge.", TimerPlusCharge::new);

	private final SettingGroup sgGeneral = settings.get


PECT_EQ(1, heap.top().data);
  heap.pop();
  EXPECT_EQ(2, heap.top().data);
  heap.pop();
  EXPECT_EQ(12, heap.top().data);
  heap.pop();
  EXPECT_EQ(99, heap.top().data);

  EXPECT_FALSE(heap.empty());
  heap.pop();
  EXPECT_TRUE(heap.empty());
}

TEST(IndIntruHeap, K_4) {
  crimson::IndIntruHeap<std::shared_ptr<Elem>,
			Elem,
			&Elem::heap_data,
			ElemCompare,
			4> heap;

  EXPECT_TRUE(heap.empty());

  heap.push(std::make_shared<Elem>(2));

  EXPECT_FALSE(heap.empty());

  heap.push(std::make_shared<Elem>(99));
  heap.push(std::make_shared<Elem>(1));
  heap.push(std::make_shared<Elem>(-5));
  heap.push(std::make_shared<Elem>(12));
  heap.push(std::make_shared<Elem>(-12));
  heap.push(std::make_shared<Elem>(-7));

  // std::cout << heap << std::endl;

  EXPECT_FALSE(heap.empty());

  EXPECT_EQ(-12, heap.top().data);
  heap.pop();
  EXPECT_EQ(-7, heap.top().data);
  heap.pop();
  EXPECT_EQ(-5, heap.top().data);
  heap.pop();
  EXPECT_EQ(1, heap.top().data);
  heap.pop();
  EXPECT_EQ(2, heap.top().data);
  heap.pop();
  EXPECT_EQ(12, heap.top().data);
  heap.pop();
  EXPECT_EQ(99, heap.top().data);

  EXPECT_FALSE(heap.empty());
  heap.pop();
  EXPECT_TRUE(heap.empty());
}

TEST(IndIntruHeap, K_10) {
  crimson::IndIntruHeap<std::shared_ptr<Elem>,
			Elem,
			&Elem::heap_data,
			ElemCompare,
			10> heap;

  EXPECT_TRUE(heap.empty());

  heap.push(std::make_shared<Elem>(2));

  EXPECT_FALSE(heap.empty());

  heap.push(std::make_shared<Elem>(99));
  heap.push(std::make_shared<Elem>(1));
  heap.push(std::make_shared<Elem>(-5));
  heap.push(std::make_shared<Elem>(12));
  heap.push(std::make_shared<Elem>(-12));
  heap.push(std::make_shared<Elem>(-7));

  // std::cout << heap << std::endl;

  EXPECT_FALSE(heap.empty());

  EXPECT_EQ(-12, heap.top().data);
  heap.pop();
  EXPECT_EQ(-7, heap.top().data);
  heap.pop();
  EXPECT_EQ(-5, heap.top().data);
  heap.pop();
  EXPECT_EQ(1, heap.top().data);
  heap.pop();
  EXPECT_EQ(2, heap.top().data);
  heap.pop();
  EXPECT_EQ(12, heap.top().data);
  heap.pop();
  EXPECT_EQ(99, heap.top().data);

  EXPECT_FALSE(heap.empty());
  heap.pop();
  EXPECT_TRUE(heap.empty());
}

TEST(IndIntruHeap, multi_K) {
  crimson::IndIntruHeap<std::shared_ptr<Elem>,
			Elem,
			&Elem::heap_data,
			ElemCompare,
			2> heap2;

  crimson::IndIntruHeap<std::shared_ptr<Elem>,
			Elem,
			&Elem::heap_data,
			ElemCompare,
			3> heap3;

  crimson::IndIntruHeap<std::


-items .OwO-item:hover{background:#eee;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}.OwO .OwO-body .OwO-items-emoji .OwO-item{font-size:20px;line-height:19px}.OwO .OwO-body .OwO-items-image .OwO-item{max-width:calc(25% - 10px);box-sizing:border-box}.OwO .OwO-body .OwO-items-image .OwO-item img{max-width:100%}.OwO .OwO-body .OwO-items-show{display:block}.OwO .OwO-body .OwO-bar{width:100%;height:30px;border-top:1px solid #ddd;background:#fff;border-radius:0 0 4px 4px;color:#444}.OwO .OwO-body .OwO-bar .OwO-packages{margin:0;padding:0;font-size:0}.OwO .OwO-body .OwO-bar .OwO-packages li{list-style-type:none;display:inline-block;line-height:30px;font-size:14px;padding:0 10px;cursor:pointer;margin-right:3px}.OwO .OwO-body .OwO-bar .OwO-packages li:nth-child(1){border-radius:0 0 0 3px}.OwO .OwO-body .OwO-bar .OwO-packages li:hover{background:#eee}.OwO .OwO-body .OwO-bar .OwO-packages .OwO-package-active{background:#eee;-webkit-transition:.3s;transition:.3s}/**
 * typecho-theme-aria - Theme Aria for Typecho crafted by Siphils
 *
 * @author Siphils
 * @email siphils16@gmail.com
 * @version v1.9.0
 * @link https://eriri.ink
 * @license GNU General Public License v2.0
 *
 */
@charset "utf-8";/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */#toc a.toc-active,b,strong{font-weight:bolder}button,hr,input{overflow:visible}button,pre .lang,select{text-transform:none}progress,sub,sup{vertical-align:baseline}.hljs-ln td.hljs-ln-numbers,.iconfont{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none}#footer p:first-child,#nav-btns i,#nav-vertical i,#response,a{text-shadow:0 1px 2px rgba(0,0,0,.15)}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:But


sition
	UDWORD msk=1<<((pc->datalock&7)^7);

	// random data
	UDWORD seed=pd->nseed;

	// accessing the first bit in the stream triggers new data
	if (msk == 0x80) {
		seed<<=1;
		if ((seed>>22 ^ seed) & DF_1)
			seed++;
		pd->nseed=seed;
	}

	return seed & msk;
}

// add data bit to shifter and am detector
void FdcShiftBit(PCAPSFDC pc)
{
	// get selected drive
	PCAPSDRIVE pd=pc->driveprc;

	// do nothing in bit skip area
	if (pc->datalock<=pd->ovlmax && pc->datalock>=pd->ovlmin)
		return;

	// read real or random data
	int bval=(pc->datamode == cfdcdmNoise) ? FdcReadBitNoise(pc) : FdcReadBit(pc);

	// shift read bit into am decoder
	UDWORD amdecode=pc->amdecode<<1;
	if (bval)
		amdecode|=1;
	pc->amdecode=amdecode;

	// get am info, clear AM found, A1 and C2 mark signals
	UDWORD aminfo=pc->aminfo & ~(CAPSFDC_AI_AMFOUND|CAPSFDC_AI_MARKA1|CAPSFDC_AI_MARKC2);

	// bitcell distance of last mark detected
	if (pc->ammarkdist)
		pc->ammarkdist--;

	// am detector if enabled
	if (aminfo & CAPSFDC_AI_AMDETENABLE) {
		// not a mark in shifter/decoder
		int amt=0;

		// check if shifter/decoder has a mark
		// the real hardware probably has two shifters (clocked and fed by data separator) connected to a decoder
		// each bit of the shifter/decoder is for shifter0#0, shifter1#0...shifter0#7, shifter1#7,
		// only 2 comparisons is needed per cell instead of 8 (A1/0A, C2/14 and 0A/A1, 14/C2)
		switch (amdecode & 0xffff) {
			// A1 mark only enabled if not overlapped with another A1
			case 0x4489:
				if (!pc->ammarkdist || pc->ammarktype!=1)
					amt=1;
				break;

			// C2 mark always enabled
			case 0x5224:
				amt=2;
				break;
		}

		// process mark if found
		if (amt) {
			// we just read the last data bit of a mark, delay by a clock bit to read from decoder#1
			pc->amdatadelay=1;

			// if overlapped with a different mark
			if (pc->ammarkdist && pc->ammarktype!=amt) {
				// dsr value is invalid
				pc->amdataskip++;

				// delay by an additional data bit (data, clock)
				pc->amdatadelay+=2;
			}

			// if dsr is empty dsr shouldn't be flushed, dsr value is invalid
			if (!pc->dsrcnt)
				pc->amdataskip++;

			// force dsr to flush its current value, since data values start from next data bit
			pc->dsrcnt=7;

			// 16 bitcells must be read before next mark, otherwise marks are overlapped (8 clock+data bits)
			pc->ammarkdist=16;

			// save last mark type; only used when marks overlap
			pc->ammarktype=amt;

			// set mark signal, the shifter/decoder must be connected to the crc logic, not dsr
			if (amt == 1) {
				aminfo|=CAPSFDC_AI_MARKA1|CAPSFDC_AI_MA1ACTIVE;

				// if CRC is enabled, first A1 mark activates the CRC logic
				if (aminfo & CAPSFDC_AI_


		let max = this.upper_length;
		let temp = muscleMapper(change) * max;
		this.main_muscle.length = temp
	}

	move_m2(change) {
		let max = (this.upper_length / 2) + (this.lower_length / 2);
		let temp = muscleMapper(change) * max;
		this.left_muscle.length = temp;
	}

	move_m3(change) {
		let max = (this.upper_length / 2) + (this.lower_length / 2)
		let temp = muscleMapper(change) * max;
		this.right_muscle.length = temp;
	}

	adjust_score() {
		let score = this.upper_left_leg.position.x ;
		this.score = score > 0 ? score : 0.001;
	}

	think(boundary) {
		let ground = boundary.ground;
		let distance_from_ground = ground.position.y - ((this.upper_left_leg.position.y + this.upper_right_leg.position.y + this.lower_right_leg.position.y + this.lower_left_leg.position.y) / 4)
		let torque = this.upper_left_leg.angularVelocity + this.upper_right_leg.angularVelocity + this.lower_right_leg.angularVelocity + this.lower_left_leg.angularVelocity;
		let vx = this.upper_left_leg.velocity.x + this.upper_right_leg.velocity.x + this.lower_right_leg.velocity.x + this.lower_left_leg.velocity.x;
		let vy = this.upper_left_leg.velocity.y + this.upper_right_leg.velocity.y + this.lower_right_leg.velocity.y + this.lower_left_leg.velocity.y;
		let input = [distance_from_ground / width, vx / 4, vy / 4, torque / 4];

		let result = this.brain.predict(input);

		// this.move_m1(result[0]);
		this.move_m2(result[0]);
		this.move_m3(result[1]);
	}

	clone() {
		let params = Object.assign({}, this.params);
		let new_person = new Person(params);
		new_person.brain.dispose();
		new_person.brain = this.brain.clone();
		return new_person;
	}

	kill(world) {
		Matter.World.remove(world, [this.upper_right_leg, this.upper_left_leg, this.lower_left_leg, this.lower_right_leg,
		this.left_joint, this.right_joint, this.main_joint, this.main_muscle, this.left_muscle, this.right_muscle]);

		// Dispose its brain
		this.brain.dispose();
	}

	mutate() {
		function fn(x) {
			if (random(1) < 0.05) {
				let offset = randomGaussian() * 0.5;
				let newx = x + offset;
				return newx;
			}
			return x;
		}

		let ih = this.brain.input_weights.dataSync().map(fn);
		let ih_shape = this.brain.input_weights.shape;
		this.brain.input_weights.dispose();
		this.brain.input_weights = tf.tensor(ih, ih_shape);

		let ho = this.brain.output_weights.dataSync().map(fn);
		let ho_shape = this.brain.output_weights.shape;
		this.brain.output_weights.dispose();
		this.brain.output_weights = tf.tensor(ho, ho_shape);
	}

	crossover(partner) {
		let parentA_in_dna = this.brain.input_weights.dataSync();
		let


C);

export const PRICE_MULTIPLIER = BigNumber.from(1e18.toString());

export interface PriceUpdate {
  pair: IWatchPair,
  token0: {
    poolBalance: BigNumber,
    price: BigNumber, // price is calculated as (token1Balance * {PRICE_MULTIPLIER}) / token0Balance
    address: string
  },
  token1: {
    poolBalance: BigNumber,
    price: BigNumber, // price is calculated as (token0Balance * {PRICE_MULTIPLIER}) / token1Balance
    address: string
  }
}

export function watchSushiwapPairs(watchPairs: IWatchPair[]): Observable<PriceUpdate> {

  // emit a PriceUpdate event after every swap for a given watch pair
  const updates = new Subject<PriceUpdate>();

  watchPairs.forEach(pair => {

    const filter = {
      address: pair.pairAddress,
      topics: [ethers.utils.id("Swap(address,uint256,uint256,uint256,uint256,address)")]
    };

    provider.on(filter, async () => {

      const { token0Balance, token1Balance } = await getPairBalances(pair);

      const token0 = {
        price: (token1Balance.mul(PRICE_MULTIPLIER)).div(token0Balance),
        poolBalance: token0Balance,
        address: pair.token0.address
      };

      const token1 = {
        price: (token0Balance.mul(PRICE_MULTIPLIER)).div(token1Balance),
        poolBalance: token1Balance,
        address: pair.token1.address
      };

      updates.next({ pair, token0, token1 });

    });

  });

  return updates;
}

async function getPairBalances(pair: IWatchPair) {

  const token0 = new ethers.Contract(pair.token0.address, ERC20_ABI, provider);
  const token1 = new ethers.Contract(pair.token1.address, ERC20_ABI, provider);
  const token0Balance = await token0.balanceOf(pair.pairAddress);
  const token1Balance = await token1.balanceOf(pair.pairAddress);

  return { token0Balance, token1Balance };

}import { Component, Input, Output, EventEmitter } from '@angular/core';
import { Animal } from './animal.model';

@Component({
  selector: 'animal-list',
  template: `
  <select (change)="onChange($event.target.value)">
    <option value="allAnimals" selected="selected">All Animals</option>
    <option value="ageThreeAndUp">Age Three and Up Animals</option>
  </select>

Species: {{currentAnimal.species}}

Name: {{currentAnimal.name}}

Age: {{currentAnimal.age}}

Diet: {{currentAnimal.diet}}

Location: {{currentAnimal.location}}

Caretakers: {{currentAnimal.caretakers}}

Sex: {{currentAnimal.sex}}

Likes: {{currentAnimal.likes}}

Dislikes: {{currentAnimal.dislikes}}

    <button (click)="editButtonHasBeenClicked(currentAnimal)">Edit</button>

  `
})

export class AnimalListComponent {
  @Input() childAnimalList: Animal[];
  @Output() clickSender = new EventEmitter();

  filterByAge: string = "age";

  onChange(optionFromMenu) {
    this.filterByAge = optionFromMenu;
  }

  editButtonHasBeenClicked(animalToEdit: Animal) {
    this.clickSender.emit(animalToEdit);
  }
}
import { Injectable } from '@angular/core';

import { Item } from 'app/models/item'

const mock_items = Object.freeze([


iffon.annotations.core.Nonnull;
import javax.swing.JComponent;
import javax.swing.JFrame;
import java.awt.BorderLayout;
import java.awt.Image;
import java.awt.Toolkit;
import java.util.Collections;

import static java.util.Arrays.asList;
import static javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE;

@ArtifactProviderFor(GriffonView.class)
public class AppView extends AbstractSwingGriffonView {
    private JFrame window;
    private JComponent container;

    @Nonnull
    public JFrame getWindow() {
        return window;
    }

    @Nonnull
    public JComponent getContainer() {
        return container;
    }

    @Override
    public void initUI() {
        window = (JFrame) getApplication()
            .createApplicationContainer(Collections.<String, Object>emptyMap());
        window.setName("mainWindow");
        window.setTitle(getApplication().getConfiguration().getAsString("application.title"));
        window.setResizable(false);
        window.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
        window.setIconImage(getImage("/griffon-icon-48x48.png"));
        window.setIconImages(asList(
            getImage("/griffon-icon-48x48.png"),
            getImage("/griffon-icon-32x32.png"),
            getImage("/griffon-icon-16x16.png")
        ));
        getApplication().getWindowManager().attach("mainWindow", window);

        window.getContentPane().setLayout(new BorderLayout());
        container = (JComponent) window.getContentPane();
    }

    private Image getImage(String path) {
        return Toolkit.getDefaultToolkit().getImage(AppView.class.getResource(path));
    }
}/*
 * Copyright 2016-2018 the original author or authors.
 *
 * 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 org.example.calculator;

import griffon.util.CollectionUtils;
import org.codehaus.griffon.runtime.core.addon.AbstractGriffonAddon;

import griffon.annotations.core.Nonnull;
import javax.inject.Named;
import java.util.Map;

@Named("calculator")
public class CalculatorAddon extends AbstractGriffonAddon {
    @Nonnull
    @Override
    public Map<String, Map<String, Object>> getMvcGroups() {
        return CollectionUtils.<String, Map<String, Object>>map()
            .e("calculator", CollectionUtils.<String, Object>map()
                    .e("model", "org.example.calculator.CalculatorModel")
                    .e("view", "org.example.calculator.CalculatorView")
                    .e("controller", "org.example.calculator.CalculatorController")
            );
    }
}
/*
 * Copyright 2016-2018 the original author or authors.
 *
 * 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


    }]
};

// Pure dedupe, across mechanisms, resolved as sum
const Nigeria1:DedupeValueSet = {
    orgUnitId: 'BY7bSKwPjPJ',
    dataSet: 'qzVASYuaIey',
    period: '2020Q4',
    dataElement_de: 'FI2s716RRZc',
    categoryOptionCombo_co: "inrjeyWelOD",
    dataValues: [{
        value: 20010,
        categoryOption_cp: 'nwyMXmV0vPR',
    },{
        value: 20020,
        categoryOption_cp: 'EqCzVuUpqZW',
    },{
        value: 0,
        categoryOption_cp: 'xEzelmtHWPn',
        isResolution: true
    }]
};

// Pure dedupe, across mechanisms, resolved as max
const Nigeria2:DedupeValueSet = {
    orgUnitId: 'p7M264Wg1qB',
    dataSet: 'qzVASYuaIey',
    period: '2020Q4',
    dataElement_de: "qhGxKnmrZBd",
    categoryOptionCombo_co: "NMYN9FAPqWa",
    dataValues: [{
        value: 30010,
        categoryOption_cp: 'gBvOZlOT7vE',
    },{
        value: 30020,
        categoryOption_cp: 'SnYYwQ0MNdg',
    },{
        value: -30010,
        categoryOption_cp: 'xEzelmtHWPn',
        isResolution: true
    }]
};

const Zambia1:DedupeValueSet = {
    dataSet: 'jKdHXpBfWop',
    orgUnitId: 'ivv9yPgimic',
    period: '2020Q4',
    categoryOption_cp: 'PHHHN8hDekc',
    categoryOptionCombo_co: "a0F1mOe30rp",
    dataValues: [{
        value: 40010,
        dataElement_de: 'RhkU5KjtAi6',
    },{
        value: 40020,
        dataElement_de: 'Jj8qonfbvBA'
    }]
}

const Zambia2:DedupeValueSet = {
    dataSet: 'jKdHXpBfWop',
    orgUnitId: 'ivv9yPgimic',
    period: '2020Q4',
    categoryOptionCombo_co: "eD7hpv3uU9Q",
    dataValues: [{
        value: 50010,
        categoryOption_cp: 'ddfsp55f4jN',
        dataElement_de: 'cRCw63EQEbM',
    },{
        value: 50020,
        categoryOption_cp: 'k6dOaAE6oWj',
        dataElement_de: 'TiMvlchPiPH'
    }]
};

const Botswana:DedupeValueSet = {
    dataSet: 'qzVASYuaIey',
    orgUnitId: 'gGqaAXuUGpb',
    period: '2020Q4',
    categoryOptionCombo_co: "xYyVHiXrvSi",
    dataElement_de: 'qhGxKnmrZBd',
    dataValues: [{
        value: 60010,
        categoryOption_cp: 'eE1lo7cjSwe',
    },{
        value: 60020,
        categoryOption_cp: 'iRbiBYQuiNZ',
    },{
        value: 60030,
        categoryOption_cp: 'peOpZPZyPaf',
    }]
};

const Cameroon:DedupeValueSet = {
    dataSet: 'jKdHXpBfWop',
    orgUnitId: 'Qxqy3OnMtLi',
    period: '2020Q4',
    categoryOptionCombo_co: "pWaGXt8b4rt",
    categoryOption_cp: 'gSrW64Ru7Ia',
    dataValues: [{
        value: 70010,
        dataElement_de: 'cRCw63EQEbM',
    },{
        value: 70020,
        dataElement_de: 'TiMvlchPiPH',
    }]
};

const Ethiopia:DedupeValueSet = {
    dataSet: 'qzVASYuaIey',
    orgUnitId: 'Dl0yK0OhftZ',
    period: '2020Q4',
    categoryOptionCombo_co: "xYyVHiXrvSi


 PersistRepository repository;

    /**
     * Persist.
     *
     * @param versionNodePath version node path
     * @param content to be persisted content
     * @return version of persisted content
     */
    public int persist(final VersionNodePath versionNodePath, final String content) {
        int nextVersion = getNextVersion(versionNodePath.getVersionsPath());
        repository.persist(versionNodePath.getVersionPath(nextVersion), content);
        switchActiveVersion(versionNodePath, nextVersion);
        return nextVersion;
    }

    private void switchActiveVersion(final VersionNodePath versionNodePath, final int currentVersion) {
        repository.persist(versionNodePath.getActiveVersionPath(), String.valueOf(currentVersion));
        if (MetaDataVersion.INIT_VERSION != currentVersion) {
            getVersions(versionNodePath.getVersionsPath()).stream().filter(version -> version < currentVersion)
                    .forEach(version -> repository.delete(versionNodePath.getVersionPath(version)));
        }
    }

    /**
     * Get next version.
     *
     * @param path path
     * @return next version
     */
    public int getNextVersion(final String path) {
        List<Integer> versions = getVersions(path);
        return versions.isEmpty() ? MetaDataVersion.INIT_VERSION : versions.get(0) + 1;
    }

    private List<Integer> getVersions(final String path) {
        List<Integer> result = repository.getChildrenKeys(path).stream().map(Integer::parseInt).collect(Collectors.toList());
        if (result.size() > 2) {
            log.warn("There are multiple versions of: {}, please check the configuration.", path);
            result.sort(Collections.reverseOrder());
        }
        return result;
    }

    /**
     * Load content.
     *
     * @param versionNodePath version node path
     * @return loaded content
     */
    public String loadContent(final VersionNodePath versionNodePath) {
        String version = repository.query(versionNodePath.getActiveVersionPath());
        return null == version ? null : repository.query(versionNodePath.getVersionPath(Integer.parseInt(version)));
    }
}
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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 org.apache.openejb.assembler.classic.migrate.database;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.sql.DataSource;

import org.hsqldb.Server;
import org.junit.Before;
import org.junit.Test;

import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;

/**
 * This class is to be used instead of the ImportSql class, to import scripts
 * into the database.
 *
 * @


r most adult age groups?',
        choice1: 'Restart',
        choice2: ''),
    Story(
        storyTitle:
            'As you smash through the guardrail and careen towards the jagged rocks below you reflect on the dubious wisdom of stabbing someone while they are driving a car you are in.',
        choice1: 'Restart',
        choice2: ''),
    Story(
        storyTitle:
            'You bond with the murderer while crooning verses of "Can you feel the love tonight". He drops you off at the next town. Before you go he asks you if you know any good places to dump bodies. You reply: "Try the pier".',
        choice1: 'Restart',
        choice2: '')
  ];

  //TODO: Step 23 - Use the storyNumber property inside getStory(), getChoice1() and getChoice2() so that it gets the updated story and choices rather than always just the first (0th) one.

//TODO: Step 8 - Create a method called getStory() that returns the first storyTitle from _storyData.
  String getStory() {
    return _storyData[_storyNumber].storyTitle;
  }

//TODO: Step 11 - Create a method called getChoice1() that returns the text for the first choice1 from _storyData.
  String getChoice1() {
    return _storyData[_storyNumber].choice1;
  }

//TODO: Step 12 - Create a method called getChoice2() that returns the text for the first choice2 from _storyData.
  String getChoice2() {
    return _storyData[_storyNumber].choice2;
  }

//TODO: Step 16 - Create a property called storyNumber which starts with a value of 0. This will be used to track which story the user is currently viewing.

  //TODO: Step 25 - Change the storyNumber property into a private property so that only story_brain.dart has access to it. You can do this by right clicking on the name (storyNumber) and selecting Refactor -> Rename to make the change across all the places where it's used.
  int _storyNumber = 0;

//TODO: Step 17 - Create a method called nextStory(), it should not have any outputs but it should have 1 input called choiceNumber which will be the choice number (int) made by the user.
  void nextStory(int choiceNumber) {
    //TODO: Step 21 - Using the story plan, update nextStory to change the storyNumber depending on the choice made by the user.
    //When user is on story0 and they chose choice1, the story should progress to story2.
    if (choiceNumber == 1 && _storyNumber == 0) {
      _storyNumber = 2;
    } else if (choiceNumber == 2 && _storyNumber == 0) {
      _storyNumber = 1;
    } else if (choiceNumber == 1 && _storyNumber == 1) {
      _storyNumber = 2;
    } else if (choiceNumber == 2 && _storyNumber == 1) {
      _storyNumber = 3;
    } else if (choiceNumber == 1 && _storyNumber == 2) {
      _storyNumber = 5;
    } else if (choiceNumber == 2 && _storyNumber == 2) {
      _storyNumber = 4;
    }
    //TODO: Step 22 - In nextStory() if the storyNumber is equal to 3 or 4 or 5, that means it's the end of the game and it should call a method called restart() that resets the storyNumber to 0.
    else if (_storyNumber == 3 || _storyNumber == 4 || _storyNumber == 5) {
      restart();
    }
  }

  void restart() {
    _storyNumber = 0;
  }

//TODO: Step 20 - Download the story plan here: https://drive.google.com/uc?export=download&id=1KU6EghkO9Hf2hRM0756xFHgNaZyGCou3

//TODO: Step 27 - Create a method called buttonShouldBeVisible() which checks to see if storyNumber is 0 or 1 or 2 (when both buttons should show choices) and return true if that is the case, else it should return false.
  bool buttonShouldBeVisible() {
    //You could also just check if (_storyNumber < 3)
    if (_storyNumber == 0 || _storyNumber == 1 || _storyNumber == 2) {
      return true;
    } else {
      return false;
    }
  }
}
// This is a basic Flutter


ه زیر رشته مورد نظر پیدا شد یا اگر چیزی پیدا نشد `-1` را برمی‌گرداند.

برای مثال:

```js run
let str = 'Widget with id';

alert( str.indexOf('Widget') ); // 0 ،در شروع رشته پیدا شد 'Widget' چون
alert( str.indexOf('widget') ); // -1 ،چیزی پیدا نشد، جستجو به بزرگی یا کوچکی حروف حساس است

alert( str.indexOf("id") ); // 1 ،(است id دارای ..idget) در موقعیت 1 پیدا شد "id"
```

پارامتر اختیاری دوم به ما اجازه جستجو از موقعیت داده شده را می‌دهد.

برای مثال، اولین `"id"` که وجود دارد در موقعیت `1` است. برای پیدا کردن بعدی، بیایید جستجو را از موقعیت `2` شروع کنیم:

```js run
let str = 'Widget with id';

alert( str.indexOf('id', 2) ) // 12
```

اگر ما مشتاق این هستیم که تمام آنها را پیدا کنیم، می‌توانیم `indexOf` را دورن یک حلقه اجرا کنیم. تمام صدازدن‌های جدید با موقعیتی بعد از موقعیت زیر رشته‌ی پیدا شده قبلی انجام می‌شود:

```js run
let str = 'As sly as a fox, as strong as an ox';

let target = 'as'; // بیایید به دنبال آن بگردیم

let pos = 0;
while (true) {
  let foundPos = str.indexOf(target, pos);
  if (foundPos == -1) break;

  alert( `Found at ${foundPos}` );
  pos = foundPos + 1; // جستجو را از موقعیت بعدی ادامه بده
}
```

الگوریتم یکسان را می‌توان کوتاه‌تر نوشت:

```js run
let str = "As sly as a fox, as strong as an ox";
let target = "as";

*!*
let pos = -1;
while ((pos = str.indexOf(target, pos + 1)) != -1) {
  alert( pos );
}
*/!*
```

```smart header="`متد str.lastIndexOf(substr, position)`"
یک متد مشابه [str.lastIndexOf(substr, position)](mdn:js/String/lastIndexOf) هم وجود دارد که از انتهای رشته تا آغاز آن جستجو می‌کند.

این متد زیر رشته‌های پیدا شده را با ترتیب برعکس لیست می‌کند.
```

یک چیز ناخوشایند در رابطه با `indexOf` در `if` وجود دارد. ما نمی‌توانیم آن را اینگونه درون `if` بگذاریم:

```js


-1.006-.652-.026-2.178.055-2.945.1V31.94c1.326-.472 4.011-1.436 4.705-1.752ZM26 20.429c0 2-1.54 3.571-3.5 3.571S19 22.429 19 20.429 22.5 14 22.5 14s3.5 4.571 3.5 6.429ZM36 21c2.778 0 5-2.163 5-4.868C41 13.428 36 6 36 6s-5 7.428-5 10.132C31 18.836 33.222 21 36 21Z" clip-rule="evenodd"/></svg>';
  static const String wash_hands_outline =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" preserveAspectRatio="xMidYMid meet" viewBox="0 0 48 48"><g fill="currentColor"><path fill-rule="evenodd" d="m35.5 8 .8-.6.004.006.01.014.04.053a38.074 38.074 0 01.668.93 51.91 51.91 0 011.578 2.382c.573.924 1.159 1.947 1.605 2.913.428.929.795 1.943.795 2.802 0 3.052-2.448 5.5-5.5 5.5a5.481 5.481 0 01-5.5-5.5c0-.859.367-1.873.795-2.802.446-.966 1.032-1.99 1.605-2.913a51.91 51.91 0 012.245-3.312l.04-.053.01-.014.005-.006.8.6Zm-1.4 3.84a49.5 49.5 0 011.4-2.124 49.5 49.5 0 011.4 2.124c.552.889 1.091 1.835 1.489 2.696.415.9.611 1.573.611 1.964 0 1.948-1.552 3.5-3.5 3.5a3.481 3.481 0 01-3.5-3.5c0-.391.196-1.064.611-1.964.398-.861.937-1.807 1.489-2.696Z" clip-rule="evenodd"/><path d="m35.5 8 .8-.6-.8-1.067-.8 1.067.8.6Z"/><path fill-rule="evenodd" d="m23.811 14.415-.798-1.095-.813 1.08-.003.004-.008.01-.027.037a31.868 31.868 0 00-.451.628c-.289.412-.676.984-1.064 1.617a18.301 18.301 0 00-1.092 2.018c-.291.65-.556 1.4-.556 2.073C19 23.072 20.704 25 23 25c2.296 0 4-1.928 4-4.214 0-.65-.271-1.389-.558-2.022a19.799 19.799 0 00-1.087-2.016 36.682 36.682 0 00-1.51-2.285l-.027-.038-.007-.01ZM23 15l-.799-.601L23 15Zm-.01 1.75c-.2.298-.42.635-.638.991a16.377 16.377 0 00-.97 1.79c-.272.605-.382 1.028-.382 1.255 0 1.313.936 2.214 2 2.214s2-.9 2-2.214c0-.187-.104-.588-.38-1.197-.258-.57-.61-1.203-.975-1.805a33.98 33.98 0 00-.655-1.034Zm-9.99 23v.246a2 2 0 01-2 2H8a2 2 0 01-2-2V29.001a2 2 0 012-2h3a2 2 0 011.947 1.539c1.324


llocate space for deltamode inrush history term",obj->name?obj->name:"unnamed");
						//Defined above
					}

					//Zero everything, to be safe -- from side
					chrcstore[0] = 0.0;
					chrcstore[1] = 0.0;
					chrcstore[2] = 0.0;
					chrcstore[3] = 0.0;
					chrcstore[4] = 0.0;
					chrcstore[5] = 0.0;
					chrcstore[6] = 0.0;
					chrcstore[7] = 0.0;
					chrcstore[8] = 0.0;

					LinkCapShuntTerm[0] = gld::complex(0.0,0.0);
					LinkCapShuntTerm[1] = gld::complex(0.0,0.0);
					LinkCapShuntTerm[2] = gld::complex(0.0,0.0);
					LinkCapShuntTerm[3] = gld::complex(0.0,0.0);
					LinkCapShuntTerm[4] = gld::complex(0.0,0.0);
					LinkCapShuntTerm[5] = gld::complex(0.0,0.0);
					LinkCapShuntTerm[6] = gld::complex(0.0,0.0);
					LinkCapShuntTerm[7] = gld::complex(0.0,0.0);
					LinkCapShuntTerm[8] = gld::complex(0.0,0.0);
				}
				//Default else -- capacitance not enabled
			}//End "normal" (so a line
			else if (SpecialLnk == WYEWYE)	//Wye-wye transformer
			{
				//Allocate the terms -- Main transformer -- fully allocate, to stay consistent
				LinkHistTermL = (gld::complex *)gl_malloc(12*sizeof(gld::complex));

				//Check it
				if (LinkHistTermL == nullptr)
				{
					GL_THROW("Link:%s failed to allocate space for deltamode inrush history term",obj->name?obj->name:"unnamed");
					//Defined above
				}

				//Zero everything, to be safe
				LinkHistTermL[0] = gld::complex(0.0,0.0);
				LinkHistTermL[1] = gld::complex(0.0,0.0);
				LinkHistTermL[2] = gld::complex(0.0,0.0);
				LinkHistTermL[3] = gld::complex(0.0,0.0);
				LinkHistTermL[4] = gld::complex(0.0,0.0);
				LinkHistTermL[5] = gld::complex(0.0,0.0);
				LinkHistTermL[6] = gld::complex(0.0,0.0);
				LinkHistTermL[7] = gld::complex(0.0,0.0);
				LinkHistTermL[8] = gld::complex(0.0,0.0);
				LinkHistTermL[9] = gld::complex(0.0,0.0);
				LinkHistTermL[10] = gld::complex(0.0,0.0);
				LinkHistTermL[11] = gld::complex(0.0,0.0);

				//"C" terms (magnetization) will be allocated within transformer

				//Allocate the "constant" terms
				//Ahrl
				//Allocate the terms -- inductance ahrl constant
				ahrlstore = (gld::complex *)gl_malloc(36*sizeof(gld::complex));

				//Check it
				if (ahrlstore == nullptr)
				{
					GL_THROW("Link:%s failed to allocate space for deltamode inrush history term",obj->name?obj->name:"unnamed");
					//Defined above
				}

				//Zero everything, to be safe -- from side
				ahrlstore[0] = ahrlstore[9]  = ahrlstore[18] = ahrlstore[27] = gld::complex(0.0,0.0);
				ahrlstore[1] = ahrlstore[10] = ahrlstore[19]


D Ug Mi 42 NC w1 Lj M4 ID Au Mz Es MS 45 ID Au NT gs My 44 MS Aw Lj gy LD Uu Nz Ig MC 40 Ny wz Lj cy ID Au OD gs Ny 40 NS Ax Lj M5 LD Ex Lj E2 ID Eu MT Us OC 4z OC Ay Lj g1 LD E2 Lj Y4 ID Qu MS wy NS 4w NS Aw Lj I3 LD Eu OD gg MC 41 NC wz Lj c2 ID Au Nz Ys NS 42 NS Aw Lj Ey LD Au OT Qg MC 41 Ny wy Lj Qz IC 0w Lj Ex LD Mu Mj Ug ei IK IC Ag IC Ag IH N0 eW xl PS Jm aW xs Oi Nm M2 Vi ZT Qi Ci Ag IC Ag IC Bp ZD 0i cG F0 aD M3 Nj gi Ci Ag IC Ag IC Bp bm tz Y2 Fw ZT pj b2 5u ZW N0 b3 It Y3 Vy dm F0 dX Jl PS Iw Ii Av Pg og IC Ag PG cK IC Ag IC Ag IG lk PS Jn Mz c4 OC I+ Ci Ag IC Ag ID xw YX Ro Ci Ag IC Ag IC Ag IG Q9 Im 0g MT I2 Lj gs MT A2 Lj gy IG Mg MC 4w Ny wt MS 40 ID Au Nz Es LT Uu Mz Eg MC 42 OS wt Ni 4w Ny At MC 4w Ny wt OS 43 NC At Ni 4y NS wt ND Eu OD Qg LT cu Mj Qs LT Q5 Lj Y2 IG wg LT Au MD Ys LT Au ND gg Yy At MC 4z NC wt My 4w Ny At MC 40 Ny wt Ni 43 Mi At MS 42 LC 05 Lj Yy IC 0x Lj E0 LC 0y Lj ky IC 00 Lj gz LC 0z Lj k0 IC 03 Lj Q5 LC 00 Lj k3 IC 0x MS 4w MS wt NC 4y IC 0y My 40 NC wt Ny 43 NC At Mz Uu MT Is LT Qu MD Qg LT Qu NT Ys MS 40 NC At OC 42 Ny w0 Lj Ax IC 0x MS 45 Ny w4 Lj A2 IC 0z Lj I5 LC 00 Lj A1 IC 03 Lj Qx LC 02 Lj Yy IC 0x MS 45 Ni wt OC 4w Ni At MT Eu Nj gs LT Mu Ny At Mj Qu MT Es LT Au MT Yg LT M1 Lj Ey LD Qu MD Qg LT Iu Nj Ys MS 4w Mi At Ni 4z Ny wy Lj A0 IC 03 Lj Us NC 45 Ny At MS 4x My wy Lj kg LT Eu Mj Ys Ni 41 NC At MS 42 LD ku Nj Ig bC At MC 4w Ni ww Lj Q4 IG Mg LT Au OT ks Ny 44 Mi At Ny 4x Ni wz OS 45 Mi At Ny 4y NC w0 OS 42 Ni At MC 4w Mi ww Lj c3 ID Au Nj Ms NC 42 Ny Aw Lj cs Ni 4w Ny Aw Lj Es Mi 4w Mi At MC 4x NC w0 Lj A1 IC 0w Lj A0 LD Yu MD Yg LT Au Mi ww Lj cg LT Au MD Is MS 4z Ni Aw Lj Qx LD Eu OD gg MC 4y OC ww Lj U0 ID Au Nz Es MC 44 Ny Ax Lj E4 LD Eu MD Qg MS 4w Ny wx Lj E4 ID Mu MD Es MC 40 ID Qu Mj gs MC Ax MS 4z OC wt My 42 OC Ay My 44 OS wt My 41 NC Az NS 42 My wt MS 45 OC Ay Lj A4 LD Au Mj cg NC 4x NS ww Lj Yx ID Yu Mj Es MS 4w MS Ay Lj E0 LD Au ND Ig NC 4x Ny wx Lj E4 ID Yu Mj Is MS 45 MS Ax Lj Y5 LD Au Ni Az Lj Q2 LD Eu MS A1 Lj I0 LD Eu ND Qg MS 4y OC ww Lj I5 ID Iu NT Ms MC 40 MS Az Lj Es MC 40 Mi Aw Lj Is MC Aw Lj M4 LC 0w Lj Ay ID Au NT cs LT Au MD Mg MC 4x OS ww ID Au Mz gs MC 4w My Aw Lj U


},
				{
					"63.1%",
					"+3.3%"
				},
				{
					"66.4%",
					"+3.6%"
				},
				{
					"70.0%"
				}
			},
			{
				{
					"Lv.1"
				},
				{
					"Lv.2"
				},
				{
					"Lv.3"
				},
				{
					"Lv.4"
				},
				{
					"Lv.5"
				},
				{
					"Lv.6"
				},
				{
					"Lv.7"
				},
				{
					"Lv.8"
				},
				{
					"Lv.9"
				},
				{
					"Lv.10"
				}
			}
		}
	},
	[13870] = {
		desc_get = "",
		name = "별의 안무가",
		type = 3,
		max_level = 10,
		desc = "전투 시작 시, 함대에 자신을 제외한 μ장비 함선 또는 경항공모함, 항공모함이 있을 경우, 자신의 기동 $1 증가, 전열 함대 전원의 대공 $2 증가.",
		id = 13870,
		system_transform = {},
		world_death_mark = {
			1
		},
		desc_get_add = {
			{
				"5.0%",
				"15.0%"
			},
			{
				"5.0%",
				"15.0%"
			}
		},
		desc_add = {
			{
				{
					"5.0%",
					"+1.1%"
				},
				{
					"6.1%",
					"+1.1%"
				},
				{
					"7.2%",
					"+1.1%"
				},
				{
					"8.3%",
					"+1.1%"
				},
				{
					"9.4%",
					"+1.1%"
				},
				{
					"10.5%",
					"+1.1%"
				},
				{
					"11.6%",
					"+1.1%"
				},
				{
					"12.7%",
					"+1.1%"
				},
				{
					"13.8%",
					"+1.2%"
				},
				{
					"15.0%"
				}
			},
			{
				{
					"5.0%",
					"+1.1%"
				},
				{
					"6.1%",
					"+1.1%"
				},
				{
					"7.2%",
					"+1.1%"
				},
				{
					"8.3%",
					"+1.1%"
				},
				{
					"9.4%",
					"+1.1%"
				},
				{
					"10.5%",
					"+1.1%"
				},
				{
					"11.6%",
					"+1.1%"
				},
				{
					"12.7%",
					"+1.1%"
				},
				{
					"13.8%",
					"+1.2%"
				},
				{
					"15.0%"
				}
			}
		}
	},
	[13880] = {
		desc_get = "",
		name = "철의 날


# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the Apache License, Version 2.0
# found in the LICENSE file in the root directory of this source tree.

from typing import Dict, Union

import numpy as np
import torch

TypeSpec = Union[str, np.dtype, torch.dtype]

_NUMPY_TO_TORCH_DTYPE: Dict[np.dtype, torch.dtype] = {
    np.dtype("bool"): torch.bool,
    np.dtype("uint8"): torch.uint8,
    np.dtype("int8"): torch.int8,
    np.dtype("int16"): torch.int16,
    np.dtype("int32"): torch.int32,
    np.dtype("int64"): torch.int64,
    np.dtype("float16"): torch.float16,
    np.dtype("float32"): torch.float32,
    np.dtype("float64"): torch.float64,
    np.dtype("complex64"): torch.complex64,
    np.dtype("complex128"): torch.complex128,
}

def as_torch_dtype(dtype: TypeSpec) -> torch.dtype:
    if isinstance(dtype, torch.dtype):
        return dtype
    if isinstance(dtype, str):
        dtype = np.dtype(dtype)
    assert isinstance(dtype, np.dtype), f"Expected an instance of nunpy dtype, got {type(dtype)}"
    return _NUMPY_TO_TORCH_DTYPE[dtype]


 (customScriptsFolderLoc);

    IO::Folder customScriptsFolder (customScriptsFolderLoc);
    customScriptsFolder.Enumerate ([&] (const IO::Name& name, bool isFolder) {
        if (isFolder) {
            return;
        }

        if (!hasCustomScript) {
            scriptSelectionPopUp.InsertSeparator (DG::PopUp::TopItem);
            hasCustomScript = true;
        }

        IO::Location file (customScriptsFolderLoc, name);
        AddScriptToPopUp (GS::NewRef<PopUpItemData> (file));
    });
}

void TapirPalette::LoadScriptsToPopUp ()
{
    scriptSelectionPopUp.DeleteItem (DG_ALL_ITEMS);

    hasCustomScript = false;
    hasAddedScript = false;

    AddScriptsFromCustomScriptsFolder ();
    auto itemToSelect = AddScriptsFromPreferences ();
    AddScriptsFromRepositories ();

    scriptSelectionPopUp.AppendSeparator ();
    scriptSelectionPopUp.AppendItem ();
    scriptSelectionPopUp.SetItemText (DG::PopUp::BottomItem, "Reload scripts...");

    if (itemToSelect <= 0 || scriptSelectionPopUp.IsSeparator (itemToSelect) || scriptSelectionPopUp.GetItemCount () - 1 <= itemToSelect) {
        itemToSelect = DG::PopUp::TopItem;
    }
    scriptSelectionPopUp.SelectItem (itemToSelect);

    SetDeleteScriptButtonStatus ();
}

void TapirPalette::SetRunButtonIcon ()
{
    short resId = ID_RUN_BUTTON_ICON;
    if (IsProcessRunning ()) {
        resId = ID_KILL_BUTTON_ICON;
    } else if (VersionChecker::IsUsingLatestVersion ()) {
        resId = ID_RUN_BUTTON_ICON;
    } else {
        resId = ID_RUNWITHUPDATE_BUTTON_ICON;
    }
    runScriptButton.SetIcon (DG::Icon (ACAPI_GetOwnResModule (), resId));
}

bool TapirPalette::UpdateAddOn ()
{
    if (VersionChecker::IsUsingLatestVersion ()) {
        return false;
    }

    short response = DGAlert (DG_WARNING,
        RSGetIndString (ID_AUTOUPDATE_STRINGS, ID_AUTOUPDATE_NEWVERSION_ALERT_TITLE, ACAPI_GetOwnResModule ()),
        GS::UniString::Printf (RSGetIndString (ID_AUTOUPDATE_STRINGS, ID_AUTOUPDATE_NEWVERSION_ALERT_TEXT1, ACAPI_GetOwnResModule ()),
            ADDON_VERSION, VersionChecker::LatestVersion ().ToPrintf ()),
        RSGetIndString (ID_AUTOUPDATE_STRINGS, ID_AUTOUPDATE_NEWVERSION_ALERT_TEXT2, ACAPI_GetOwnResModule ()),
        RSGetIndString (ID_AUTOUPDATE_STRINGS, ID_AUTOUPDATE_NEWVERSION_ALERT_BUTTON1, ACAPI_GetOwnResModule ()),
        RSGetIndString (ID_AUTOUPDATE_STRINGS, ID_AUTOUPDATE_NEWVERSION_ALERT_BUTTON2, ACAPI_GetOwnResModule ()));

    if (response != DG_OK) {
        return false;
    }

    const GS::UniString uvCommand = uvManager.GetUvExecutablePath ();
    if (uvCommand.IsEmpty ()) {
        DGAlert (DG_ERROR, "Update Failed", "The update process requires 'uv' to be installed.", "Please install 'uv' and try again.", "OK");
        return false;
    }

    constexpr const char* fileName = "update_addon_and_restart_archicad.py";
    const GS::UniString url = "https://raw.githubusercontent.com/ENZYME-APD/tapir-archicad-automation/main/archicad-addon/Tools/" + GS::UniString (fileName);
    const GS::UniString content = DownloadFileContent (url);
    if (content.GetLength () < 10) {
        response = DGAlert (DG_ERROR, "Tapir Update", "Failed to download the update script.", "Please check your internet connection and try again.", "OK", "Cancel");

        if (response != DG_OK) {
            return false;
        }

        return UpdateAddOn ();
    }
    const IO::Location fileLoc = SaveBuiltInScript (GetTapir


: 'resetzoom'
      },
      {
        type: 'separator'
      },
      {
        role: 'togglefullscreen'
      },
      {
          label: 'language',
          submenu: [
              {
                  label: 'en',
                  type: 'radio',
                  checked: defaultSetting.lang == 'en',
                  click(menuItem, browserWindow, event) {
                      settingLang(menuItem.label, browserWindow);
                  }
              },
              {
                  label: 'zh-CN',
                  type: 'radio',
                  checked: defaultSetting.lang == 'zh-CN',
                  click(menuItem, browserWindow, event) {
                      settingLang(menuItem.label, browserWindow);
                  }
              }
          ]
      }
    ]
  },
  {
    role: 'window',
    submenu: [
      {
        role: 'minimize'
      },
      {
        role: 'close'
      }
    ]
  },
  {
    role: 'help',
    submenu: [
      {
        label: 'Learn More',
        click () { require('electron').shell.openExternal('https://github.com/phantom0301/PTEye') }
      }
    ]
  }
]

if (process.platform === 'darwin') {
  template.unshift({
    label: app.getName(),
    submenu: [
      {
        role: 'about'
      },
      {
        type: 'separator'
      },
      {
        role: 'services',
        submenu: []
      },
      {
        type: 'separator'
      },
      {
        role: 'hide'
      },
      {
        role: 'hideothers'
      },
      {
        role: 'unhide'
      },
      {
        type: 'separator'
      },
      {
        role: 'quit'
      }
    ]
  })
  // Edit menu.
  template[1].submenu.push(
    {
      type: 'separator'
    },
    {
      label: 'Speech',
      submenu: [
        {
          role: 'startspeaking'
        },
        {
          role: 'stopspeaking'
        }
      ]
    }
  )
  // Window menu.
  template[3].submenu = [
    {
      label: 'Close',
      accelerator: 'CmdOrCtrl+W',
      role: 'close'
    },
    {
      label: 'Minimize',
      accelerator: 'CmdOrCtrl+M',
      role: 'minimize'
    },
    {
      label: 'Zoom',
      role: 'zoom'
    },
    {
      type: 'separator'
    },
    {
      label: 'Bring All to Front',
      role: 'front'
    }
  ]
}

module.exports = template;var path = require('path')
var webpack = require('webpack')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
var isPro = process.env.NODE_ENV === 'production';

module.exports = {
  entry: './src/main.js',
  output: {
    path: path.resolve(__dirname, './dist'),        //真实存放路径
    publicPath: isPro ? 'D:/projects/github/PTEye/client/dist':'/dist/' ,//发布引用路径
    //             ,                           //开发引用路径
    filename: 'build.js',
  },
  module: {
    rules: [
      {
        test: /\.vue$/,
        loader: 'vue-loader',
        options: {
            loaders: {
                css: 'style-loader!css-loader!less-loader'
                // ExtractTextPlugin.extract({
                //     use: ['css-loader', 'less-loader'],
                //     fallback: 'vue


 प्राप्त करें।
- **सुविधा:** मूल्यांकन प्रक्रिया को सरल बनाने के लिए ट्रेनिंग सेटिंग्स को याद करने वाली इनबिल्ट सुविधा का उपयोग करें।
- **लचीलापन:** अपने मॉडल को एक ही या अलग डेटासेट और छवि आकार के साथ मान्यता दें।
- **हाइपरपैरामीटर ट्यूनिंग:** मूल्यांकन मापों का उपयोग करके अपने मॉडल को बेहतर प्रदर्शन के लिए समायोजित करें।

### Val मोड की मुख्य विशेषताएं

ये हैं YOLOv8 के Val मोड द्वारा प्रदान की जाने वाली महत्वपूर्ण कार्यक्षमताएं:

- **स्वत: सेटिंग्स:** मॉडल योग्यता के लिए अपने प्रशिक्षण समायोजनों को स्वतः याद रखते हैं।
- **बहुमान्यता समर्थन:** विभिन्न सटीकता मापों के आधार पर अपने मॉडल की मूल्यांकन करें।
- **CLI और पायथन एपीआई:** मान्यता के लिए CLI या पायथन एपीआई में से एक का चयन करें।
- **डेटा सम्पर्कता:** कोकोविवक प्रशिक्षण चरण में उपयोग की जाने वाली डेटासेट के साथ सहजता से काम करता है।

!!! Tip "टिप"

    * YOLOv8 मॉडल अपने प्रशिक्षण सेटिंग्स को स्वतः याद रखते हैं, इसलिए आप केवल `yolo val model=yolov8n.pt` या `model('yolov8n.pt').val()` द्वारा सरलतापूर्वक एक मॉडल को समान छवि आकार के साथ और मूल डेटासेट पर मान्यता दे सकते हैं।

## उपयोग के उदाहरण

COCO128 डेटासेट पर प्रशिक्षित YOLOv8n मॉडल की सटीकता मान्यांकन करें। `model` को विद्यमान ट्रेनिंग `data` और तर्क बने रहते हैं, इसलिए कोई तर्क पास कराने की आवश्


if (LuceneTestCase.VERBOSE) {
          System.out.println("RIW.add/updateDocument: now doing a commit at docCount=" + docCount);
        }
        w.commit();
      }
      flushAt += TestUtil.nextInt(r, (int) (flushAtFactor * 10), (int) (flushAtFactor * 1000));
      if (flushAtFactor < 2e6) {
        // gradually but exponentially increase time b/w flushes
        flushAtFactor *= 1.05;
      }
    }
  }

  private void flushAllBuffersSequentially() throws IOException {
    if (LuceneTestCase.VERBOSE) {
      System.out.println(
          "RIW.add/updateDocument: now flushing the largest writer at docCount=" + docCount);
    }
    int threadPoolSize = INDEX_WRITER_ACCESS.getDocWriterThreadPoolSize(w);
    int numFlushes = Math.min(1, r.nextInt(threadPoolSize + 1));
    for (int i = 0; i < numFlushes; i++) {
      if (w.flushNextBuffer() == false) {
        break; // stop once we didn't flush anything
      }
    }
  }

  public long addDocuments(Iterable<? extends Iterable<? extends IndexableField>> docs)
      throws IOException {
    LuceneTestCase.maybeChangeLiveIndexWriterConfig(r, config);
    long seqNo = w.addDocuments(docs);
    maybeFlushOrCommit();
    return seqNo;
  }

  public long updateDocuments(
      Term delTerm, Iterable<? extends Iterable<? extends IndexableField>> docs)
      throws IOException {
    LuceneTestCase.maybeChangeLiveIndexWriterConfig(r, config);
    long seqNo;
    if (useSoftDeletes()) {
      seqNo =
          w.softUpdateDocuments(
              delTerm, docs, new NumericDocValuesField(config.getSoftDeletesField(), 1));
    } else {
      if (r.nextInt(10) < 3) {
        // 30% chance
        seqNo = w.updateDocuments(new TermQuery(delTerm), docs);
      } else {
        seqNo = w.updateDocuments(delTerm, docs);
      }
    }
    maybeFlushOrCommit();
    return seqNo;
  }

  private boolean useSoftDeletes() {
    return r.nextDouble() < softDeletesRatio;
  }

  /**
   * Updates a document.
   *
   * @see IndexWriter#updateDocument(Term, Iterable)
   */
  public <T extends IndexableField> long updateDocument(Term t, final Iterable<T> doc)
      throws IOException {
    LuceneTestCase.maybeChangeLiveIndexWriterConfig(r, config);
    final long seqNo;
    if (useSoftDeletes()) {
      if (r.nextInt(5) == 3) {
        seqNo =
            w.softUpdateDocuments(
                t, Arrays.asList(doc), new NumericDocValuesField(config.getSoftDeletesField(), 1));
      } else {
        seqNo =
            w.softUpdateDocument(
                t, doc, new NumericDocValuesField(config.getSoftDeletesField(), 1));
      }
    } else {
      if (r.nextInt(5) == 3) {
        seqNo = w.updateDocuments(t, Arrays.asList(doc));
      } else {
        seqNo = w.updateDocument(t, doc);
      }
    }
    maybeFlushOrCommit();

    return seqNo;
  }

  public long addIndexes(Directory... dirs) throws IOException {
    LuceneTestCase.maybeChangeLiveIndexWriterConfig(r, config);
    return w.addIndexes(dirs);
  }

  public long addIndexes(CodecReader... readers) throws IOException {
    LuceneTestCase.maybeChangeLiveIndexWriterConfig(r, config);
    return w.addIndexes(readers);
  }

  public long updateNumericDocValue(Term term, String field, Long value) throws IOException {
    LuceneTestCase.maybeChangeLiveIndexWriterConfig(r, config);
    return w.updateNumericDocValue(term, field, value);
  }

  public long updateBinaryDocValue(Term term, String field, BytesRef value) throws IOException {
    LuceneTestCase.maybeChangeLiveInd


1,
		system_transform = {},
		world_death_mark = {
			1
		},
		desc_get_add = {},
		desc_add = {}
	},
	[29482] = {
		desc_get = "",
		name = "특수 탄막-{namecode:50}II",
		type = 1,
		max_level = 1,
		desc = "자신의 주포 8회 발사 시, 특수 탄막- {namecode:50}II를 발사한다.",
		id = 29482,
		system_transform = {},
		world_death_mark = {
			1
		},
		desc_get_add = {},
		desc_add = {}
	},
	[29491] = {
		desc_get = "",
		name = "전탄 발사-다이도I",
		type = 1,
		max_level = 1,
		desc = "자신의 주포 15회 발사 시, 특수 탄막-다이도I를 발사한다.",
		id = 29491,
		system_transform = {},
		world_death_mark = {
			1
		},
		desc_get_add = {},
		desc_add = {}
	},
	[29492] = {
		desc_get = "",
		name = "전탄 발사-다이도II",
		type = 1,
		max_level = 1,
		desc = "자신의 주포 10회 발사 시, 특수 탄막-다이도II를 발사한다.",
		id = 29492,
		system_transform = {},
		world_death_mark = {
			1
		},
		desc_get_add = {},
		desc_add = {}
	},
	[29501] = {
		desc_get = "",
		name = "전탄 발사-타슈켄트I",
		type = 1,
		max_level = 1,
		desc = "자신의 주포 15회 발사 시, 특수 탄막-타슈켄트I를 발사한다.",
		id = 29501,
		system_transform = {},
		world_death_mark = {
			1
		},
		desc_get_add = {},
		desc_add = {}
	},
	[29502] = {
		desc_get = "",
		name = "전탄 발사-타슈켄트II",
		type = 1,
		max_level = 1,
		desc = "자신의 주포 10회 발사 시, 특수 탄막-타슈켄트II를 발사한다.",
		id = 29502,
		system_transform = {},
		world_death_mark = {
			1
		},
		desc_get_add = {},
		desc_add = {}
	},
	[29511] = {
		desc_get = "",
		name = "전탄 발사-차파예프I",
		type = 1,
		max_level = 1,
		desc = "자신의 주포 15회 발사 시, 특수 탄막-차파예프I를 발사한다.",
		id = 29511,
		system_transform = {},


latform_device *pdev)
{
	struct skl_clk_data *data;

	data = platform_get_drvdata(pdev);
	unregister_src_clk(data);
	unregister_parent_src_clk(data->parent, SKL_MAX_CLK_SRC);

	return 0;
}

static struct platform_driver skl_clk_driver = {
	.driver = {
		.name = "skl-ssp-clk",
	},
	.probe = skl_clk_dev_probe,
	.remove = skl_clk_dev_remove,
};

module_platform_driver(skl_clk_driver);

MODULE_DESCRIPTION("Skylake clock driver");
MODULE_AUTHOR("Jaikrishna Nemallapudi <jaikrishnax.nemallapudi@intel.com>");
MODULE_AUTHOR("Subhransu S. Prusty <subhransu.s.prusty@intel.com>");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:skl-ssp-clk");


iIGcGVubnkzKggI2AUQWhoBOQ',
          },
          'adUnitCode': 'adunit-code-2',
          'sizes': [1, 1],
          'mediaTypes': {
            'native': {
              'title': {
                'required': true,
                'len': 15
              },
              'body': {
                'required': true
              },
              'image': {
                'required': true,
                'sizes': [150, 150]
              },
              'icon': {
                'required': true,
                'sizes': [50, 50]
              },
              'clickUrl': {
                'required': true
              },
              'cta': {
                'required': true
              },
              'sponsoredBy': {
                'required': true
              }
            }
          },
          'bidId': '3150ccb55da321',
          'bidderRequestId': '22edbae2733bf6',
          'auctionId': '1d1a030790a475',
        },
      ]
    };

    const nativeServerResponses = [
      {
        'id': '0e4048d3-5c74-4380-a21a-00ba35629f7d',
        'bidder_code': 'bridgewell',
        'cpm': 7.0,
        'width': 1,
        'height': 1,
        'adomain': ['response.com'],
        'mediaType': 'native',
        'native': {
          'image': {
            'url': 'https://img.scupio.com/test/test-image.jpg',
            'width': 150,
            'height': 150
          },
          'title': 'test-title',
          'sponsoredBy': 'test-sponsoredBy',
          'body': 'test-body',
          'icon': {
            'url': 'https://img.scupio.com/test/test-icon.jpg',
            'width': 50,
            'height': 50
          },
          'clickUrl': 'https://img.scupio.com/test-clickUrl',
          'clickTrackers': ['https://img.scupio.com/test-clickTracker'],
          'impressionTrackers': ['https://img.scupio.com/test-impressionTracker']
        },
        'ttl': 400,
        'netRevenue': true,
        'currency': 'NTD'
      },
    ];

    const bannerBidRequests = {
      validBidRequests: [
        {
          'mediaTypes': {
            'banner': {
              'sizes': [300, 250]
            }
          },
          'bidId': '3150ccb55da321',
        },
      ]
    };

    const bannerServerResponses = [
      {
        'id': 'e5b10774-32bf-4931-85ee-05095e8cff21',
        'bidder_code': 'bridgewell',
        'cpm': 5.0,
        'width': 300,
        'height': 250,
        'adomain': ['response.com'],
        'mediaType': 'banner',
        'ad': '
test 300x250
',
        'ttl': 360,
        'netRevenue': true,
        'currency': 'NTD'
      },
    ];

    it('should return all required parameters', function () {
      const result = spec.interpretResponse({ 'body': nativeServerResponses }, nativeBidRequests);

      expect(result[0].requestId).to.equal('3150ccb55da321');
      expect(result[0].cpm).to.equal(7.0);
      expect(result[0].width).to.equal(1);
      expect(result[0].height).to.equal(1);
      expect(result[0].ttl).to.equal(400);
      expect(result[0].creativeId).to.equal('0e40


IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,
                    "[WSK] [Client] WSKSocket failed: 0x%08X.\n",
                    Status);

                break;
            }

            Status = WSKGetNameInfo(Addr->ai_addr, (ULONG)(Addr->ai_addrlen),
                HostName, NI_MAXHOST, PortName, NI_MAXSERV, NI_NUMERICHOST | NI_NUMERICSERV);
            if (!NT_SUCCESS(Status))
            {
                DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,
                    "[WSK] [Client] WSKGetNameInfo failed: 0x%08X.\n",
                    Status);

                break;
            }

            DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,
                "[WSK] [Client] Client attempting connection to: %ls port: %ls.\n",
                HostName, PortName);

            if (Addr->ai_socktype == SOCK_STREAM)
            {
                Status = WSKConnect(ClientSocket, Addr->ai_addr, Addr->ai_addrlen);
            }

            if (Addr->ai_socktype == SOCK_DGRAM)
            {
                Status = WSKIoctl(ClientSocket, SIO_WSK_SET_SENDTO_ADDRESS,
                    Addr->ai_addr, Addr->ai_addrlen, nullptr, 0, nullptr, nullptr, nullptr);
            }

            if (NT_SUCCESS(Status))
            {
                break;
            }
        }

        if (!NT_SUCCESS(Status))
        {
            DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,
                "[WSK] [Client] Unable to establish connection... 0x%08X.\n",
                Status);

            break;
        }

        DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,
            "[WSK] [Client] Connection established...\n");

        HANDLE ThreadHandle = nullptr;

        Status = PsCreateSystemThread(&ThreadHandle, SYNCHRONIZE,
            nullptr, nullptr, nullptr,
            &WSKClientThread,
            (PVOID)ClientSocket);
        if (!NT_SUCCESS(Status))
        {
            DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,
                "[WSK] [Client] PsCreateSystemThread failed: 0x%08X.\n",
                Status);

            break;
        }

        Status = ObReferenceObjectByHandleWithTag(ThreadHandle, SYNCHRONIZE, *PsThreadType, KernelMode,
            POOL_TAG, (PVOID*)&ClientThread, nullptr);

        ZwClose(ThreadHandle);

        if (!NT_SUCCESS(Status))
        {
            DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,
                "[WSK] [Client] ObReferenceObjectByHandleWithTag failed: 0x%08X.\n",
                Status);

            break;
        }

    } while (false);

    if (HostName)
    {
        ExFreePoolWithTag(HostName, POOL_TAG);
    }

    if (PortName)
    {
        ExFreePoolWithTag(PortName, POOL_TAG);
    }

    if (AddrInfo)
    {
        WSKFreeAddrInfo(AddrInfo);
    }

    if (!NT_SUCCESS(Status))
    {
        CloseWSKClient();
    }

    return Status;
}

VOID CloseWSKClient(void)
{
    if (ClientSocket != WSK_INVALID_SOCKET)
    {
        WSKCloseSocket(ClientSocket);

        ClientSocket = WSK_INVALID_SOCKET;
    }

    if (ClientThread)
    {
        KeWaitForSingleObject(ClientThread, Executive, KernelMode, FALSE, nullptr);
        ObDereferenceObjectWithTag(ClientThread, POOL_TAG);

        ClientThread = nullptr;
    }
}

//
//////////////////////////////////////////////////////


.xml和hdfs-site.xml两个配置文件拷贝到project的src/main/resources目录下

需要注意的是，ClientSideRegionScanner的查询是依赖Snapshot的，所以为了查询能获取到最新的数据，每次查询时都会自动创建一个命名规则如下的Snapshot：

```
"ss-" + schemaName + "." + tableName + "-" + System.nanoTime()
```

HBase最大可支持的Snapshot数为65536个，所以在使用ClientSideRegionScanner时最好能够做到定时清理过期Snapshot。

## 问题解决

##### 1.如何让ClientSideRegionScanner可以查询Snappy压缩格式的HBase表？

你需要解决以下几个问题：

###### 1) SnappyCodec找不到的问题

这是因为在Presto的classPath中缺少hadoop-common-2.7.3.jar这个jar包。因为我们是基于ambari搭建的presto，所以需要将这个jar包拷贝到/usr/lib/presto/lib目录下。

###### 2) SnappyCodec无法转换为CompressionCodec的问题

经过定位发现Presto加载插件的类是采用自定义的PluginClassLoader，而SnappyCodec是采用AppClassLoader加载的。二者classLoader不同导致父类和子类不具备父子继承关系。

修改hbase-common-1.1.2.jar中代码，将SnappyCodec改为使用PluginClassLoader的方式加载解决了这个问题。需要修改的代码为hbase-common模块的org.apache.hadoop.hbase.io.compress.Compression类，修改方法如下：

```
  /**
   * Returns the classloader to load the Codec class from.
   */
  private static ClassLoader getClassLoaderForCodec() {
    /*修改前：
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    if (cl == null) {
      cl = Compression.class.getClassLoader();
    }*/
    // 修改后：
    ClassLoader cl = Compression.class.getClassLoader();
    if (cl == null) {
      cl = Thread.currentThread().getContextClassLoader();
    }

    if (cl == null) {
      cl = ClassLoader.getSystemClassLoader();
    }
    if (cl == null) {
      throw new RuntimeException("A ClassLoader to load the Codec could not be determined");
    }
```

用修改后的代码重新install maven仓库，再重新打组件jar包即可。

###### 3) java.lang.UnsatisfiedLinkError: org.apache.hadoop.util.NativeCodeLoader.buildSupportsSnappy()Z

这是需要在jvm中增加hadoop的native snappy库。可以在presto的jvm.config中，增加如下配置：

```
-Djava.library.path={path to hadoop native lib}
```

###### 4) java.io.IOException: java.lang.NoSuchMethodError: com.google.common.base.Objects.toStringHelper(Ljava/lang/Object;)Lcom/google/common/ba


69;
  --color-dracula-yellow-500: #e5f347;
  --color-dracula-yellow-600: #dfef26;
  --color-dracula-yellow-700: #ccdd12;
  --color-dracula-yellow-800: #abb811;
  --color-dracula-yellow-900: #899410;
  --color-dracula-yellow: #f1fa8c; /* DEFAULT */

  /* Nosferatu Palette */
  --color-dracula-nosferatu-50: #cdd0e4;
  --color-dracula-nosferatu-100: #b5bad6;
  --color-dracula-nosferatu-200: #9ea4c8;
  --color-dracula-nosferatu-300: #888fb8;
  --color-dracula-nosferatu-400: #727aa8;
  --color-dracula-nosferatu-500: #5f6795;
  --color-dracula-nosferatu-600: #53597c;
  --color-dracula-nosferatu-700: #454a64;
  --color-dracula-nosferatu-800: #373a4d;
  --color-dracula-nosferatu-900: #282a36;
  --color-dracula-nosferatu: #282a36; /* DEFAULT */

  /* Aro Palette */
  --color-dracula-aro-50: #f7f7fb;
  --color-dracula-aro-100: #dfe1ed;
  --color-dracula-aro-200: #c7cadf;
  --color-dracula-aro-300: #b1b5d0;
  --color-dracula-aro-400: #9ba0c0;
  --color-dracula-aro-500: #858bb0;
  --color-dracula-aro-600: #71779f;
  --color-dracula-aro-700: #606689;
  --color-dracula-aro-800: #525771;
  --color-dracula-aro-900: #44475a;
  --color-dracula-aro: #44475a; /* DEFAULT */

  /* Cullen Palette */
  --color-dracula-cullen-50: #f8f8f2;
  --color-dracula-cullen-100: #eaeada;
  --color-dracula-cullen-200: #dcdcc3;
  --color-dracula-cullen-300: #cdcdac;
  --color-dracula-cullen-400: #bdbd96;
  --color-dracula-cullen-500: #adad81;
  --color-dracula-cullen-600: #9c9c6c;
  --color-dracula-cullen-700: #85855d;
  --color-dracula-cullen-800: #6d6d4f;
  --color-dracula-cullen-900: #565641;
  --color-dracula-cullen: #f8f8f2; /* DEFAULT */

  /* VonCount Palette */
  --color-dracula-vonCount-50: #f0f2f8;
  --color-dracula-vonCount-100: #d7dcec;
  --color-dracula-vonCount-200: #bec6df;
  --color-dracula-vonCount-300: #a6b0d1;
  --color-dracula-vonCount-400: #8f9bc3;
  --color-dracula-vonCount-500: #7886b4;
  --color-dracula-vonCount-600: #6272a4;
  --color-dracula-vonCount-700: #54628c;
  --color-dracula-vonCount-800: #485273;
  --color-dra