        motherboard.iterate()
        world.profiler.endSection()

        // TODO
//        if(container.shouldTick(100)){
            // Update devices
//        }
    }

    override fun serializeNBT(): NBTTagCompound {
        return motherboard.serialize().toNBT().also {
            it.setTag("motherboardDevice", motherboardDevice.serialize().toNBT())
        }
    }

    override fun deserializeNBT(nbt: NBTTagCompound) {
        motherboard.deserialize(nbt.toMap())
        motherboardDevice.deserialize(nbt.getCompoundTag("motherboardDevice").toMap())
    }
}
package com.cout970.magneticraft.systems.tilemodules

import com.cout970.magneticraft.api.core.INode
import com.cout970.magneticraft.api.core.ITileRef
import com.cout970.magneticraft.api.core.NodeID
import com.cout970.magneticraft.api.heat.IHeatConnection
import com.cout970.magneticraft.api.heat.IHeatNode
import com.cout970.magneticraft.api.heat.IHeatNodeHandler
import com.cout970.magneticraft.api.internal.heat.HeatNode
import com.cout970.magneticraft.misc.getTagCompound
import com.cout970.magneticraft.misc.list
import com.cout970.magneticraft.misc.network.FloatSyncVariable
import com.cout970.magneticraft.misc.network.SyncVariable
import com.cout970.magneticraft.misc.newNbt
import com.cout970.magneticraft.misc.readList
import com.cout970.magneticraft.misc.tileentity.shouldTick
import com.cout970.magneticraft.misc.tileentity.tryConnect
import com.cout970.magneticraft.misc.vector.toBlockPos
import com.cout970.magneticraft.misc.world.isClient
import com.cout970.magneticraft.registry.HEAT_NODE_HANDLER
import com.cout970.magneticraft.registry.getOrNull
import com.cout970.magneticraft.systems.gui.DATA_ID_HEAT_LIST
import com.cout970.magneticraft.systems.tileentities.IModule
import com.cout970.magneticraft.systems.tileentities.IModuleContainer
import net.minecraft.nbt.NBTTagCompound
import net.minecraft.util.EnumFacing
import net.minecraft.util.math.BlockPos
import net.minecraftforge.common.capabilities.Capability

/**
 * Created by cout970 on 2017/06/29.
 */
class ModuleHeat(
    vararg val heatNodes: IHeatNode,
    val canConnect: (ModuleHeat, IHeatNode, IHeatNodeHandler, IHeatNode, EnumFacing?) -> Boolean = ModuleHeat::defaultCanConnectImpl,
    val canConnectAtSide: (EnumFacing?) -> Boolean = { true },
    val onUpdateConnections: (ModuleHeat) -> Unit = {},
    val capabilityFilter: (EnumFacing?) -> Boolean = { true },
    val connectableDirections: () -> List<Pair<BlockPos, EnumFacing>> = {
        NEGATIVE_DIRECTIONS.filter { canConnectAtSide(it) }.map { it.toBlockPos() to it.opposite }
    },
    override val name: String = "module_heat"
) : IModule, IHeatNodeHandler {

    companion object {
        @JvmStatic
        val NEGATIVE_DIRECTIONS = EnumFacing.values().filter { it.axisDirection == EnumFacing.AxisDirection.NEGATIVE }
    }

    override lateinit var container: IModuleContainer

    val inputNormalConnections = mutableListOf<IHeatConnection>()
    val outputNormalConnections = mutableListOf<IHeatConnection>()

    override fun update() {
        if (world.isClient) return
        updateConnections()
        iterate()
    }

    fun updateConnections() {

        if (container.shouldTick(40)) {
            updateNormalConnections()
            onUpdateConnections(this)
            container.sendUpdateToNearPlayers()
        }
    }

    fun updateNormalConnections() {
        clearNormalConnections()
        heatNodes.forEach { thisNode ->

            val conDir = connectableDirections()
            val spots = con


from apiserver.apimodels.serving import (
    RegisterRequest,
    UnregisterRequest,
    StatusReportRequest,
    GetEndpointDetailsRequest,
    GetEndpointMetricsHistoryRequest,
)
from apiserver.apierrors import errors
from apiserver.service_repo import endpoint, APICall
from apiserver.bll.serving import ServingBLL, ServingStats

serving_bll = ServingBLL()

@endpoint("serving.register_container")
def register_container(call: APICall, company: str, request: RegisterRequest):
    serving_bll.register_serving_container(
        company_id=company, ip=call.real_ip, request=request
    )

@endpoint("serving.unregister_container")
def unregister_container(_: APICall, company: str, request: UnregisterRequest):
    serving_bll.unregister_serving_container(
        company_id=company, container_id=request.container_id
    )

@endpoint("serving.container_status_report")
def container_status_report(call: APICall, company: str, request: StatusReportRequest):
    if not request.endpoint_url:
        raise errors.bad_request.ValidationError(
            "Missing required field 'endpoint_url'"
        )
    serving_bll.container_status_report(
        company_id=company,
        ip=call.real_ip,
        report=request,
    )

@endpoint("serving.get_endpoints")
def get_endpoints(call: APICall, company: str, _):
    call.result.data = {"endpoints": serving_bll.get_endpoints(company)}

@endpoint("serving.get_loading_instances")
def get_loading_instances(call: APICall, company: str, _):
    call.result.data = {"instances": serving_bll.get_loading_instances(company)}

@endpoint("serving.get_endpoint_details")
def get_endpoint_details(
    call: APICall, company: str, request: GetEndpointDetailsRequest
):
    call.result.data = serving_bll.get_endpoint_details(
        company_id=company, endpoint_url=request.endpoint_url
    )

@endpoint("serving.get_endpoint_metrics_history")
def get_endpoint_metrics_history(
    call: APICall, company: str, request: GetEndpointMetricsHistoryRequest
):
    call.result.data = ServingStats.get_endpoint_metrics(
        company_id=company,
        metrics_request=request,
    )


/*
 * Copyright (c) 1997 Erez Zadok
 * Copyright (c) 1990 Jan-Simon Pendry
 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
 * Copyright (c) 1990 The Regents of the University of California.
 * All rights reserved.
 *
 * This code is derived from software contributed to Berkeley by
 * Jan-Simon Pendry at Imperial College, London.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *      This product includes software developed by the University of
 *      California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
 *
 *      %W% (Berkeley) %G%
 *
 * $Id: amq.h,v 1.1.1.1 1997/12/22 22:28:38 cgd Exp $
 *
 */

#ifndef _AMQ_H
#define _AMQ_H

/*
 * external definitions for building amq
 */

extern voidp amqproc_null_1(voidp argp, CLIENT *rqstp);
extern amq_mount_tree_p *amqproc_mnttree_1(amq_string *argp, CLIENT *rqstp);
extern voidp amqproc_umnt_1(amq_string *argp, CLIENT *rqstp);
extern amq_mount_stats *amqproc_stats_1(voidp argp, CLIENT *rqstp);
extern amq_mount_tree_list *amqproc_export_1(voidp argp, CLIENT *rqstp);
extern int *amqproc_setopt_1(amq_setopt *argp, CLIENT *rqstp);
extern amq_mount_info_list *amqproc_getmntfs_1(voidp argp, CLIENT *rqstp);
extern int *amqproc_mount_1(voidp argp, CLIENT *rqstp);
extern amq_string *amqproc_getvers_1(voidp argp, CLIENT *rqstp);
extern int *amqproc_getpid_1(voidp argp, CLIENT *rqstp);

#endif /* not _AMQ_H */


        ReactiveFormsModule,
      ],
    });
  });

  describe('when the control is a form group', () => {
    let formGroup: FormGroup;

    describe('and when the form group is empty', () => {
      beforeEach(() => {
        formGroup = new FormGroup({
          control1: new FormControl(null),
          control2: new FormControl(''),
        });
        result = daffFormNotEmptyValidator(formGroup);
      });

      it('should return an empty error', () => {
        expect(result?.['empty']).toBeTrue();
      });
    });

    describe('and when the form group is not empty', () => {
      beforeEach(() => {
        formGroup = new FormGroup({
          control1: new FormControl(null),
          control2: new FormControl('a value'),
        });
        result = daffFormNotEmptyValidator(formGroup);
      });

      it('should return null', () => {
        expect(formGroup.errors).toBeNull();
      });
    });
  });

  describe('when the control is a control', () => {
    let control: FormControl;

    describe('and when the form group is empty', () => {
      beforeEach(() => {
        control = new FormControl(null);
        result = daffFormNotEmptyValidator(control);
      });

      it('should return an empty error', () => {
        expect(result?.['empty']).toBeTrue();
      });
    });

    describe('and when the form group is not empty', () => {
      beforeEach(() => {
        control = new FormControl('a value');
        result = daffFormNotEmptyValidator(control);
      });

      it('should return null', () => {
        expect(control.errors).toBeNull();
      });
    });
  });
});
import chalk from 'chalk';

const stdout = console;

/**
 * Application logger object.
 */
export const logger = {
  /**
   * Logs information message on the standard output.
   */
  info: (message: object | string | number) =>
    stdout.info(chalk.bold.bgGreen.black('[INFO]') + ' ' + message.toString()),

  /**
   * Logs error message on the standard output.
   */
  error: (message: object | string | number) =>
    stdout.error(chalk.bold.bgRed.black('[ERROR]') + ' ' + message.toString()),

  /**
   * Logs warning message on the standard output.
   */
  warn: (message: object | string | number) =>
    stdout.warn(chalk.bold.bgYellow.black('[WARN]') + ' ' + message.toString()),

  /**
   * Logs simple message on the standard output.
   */
  log: (message: object | string | number) => stdout.log(message.toString())
};
/*
 * @Description:css变量相关操作函数
 * @Date: 2021-04-25 14:15:59
 * @LastEditTime: 2021-06-08 10:15:45
 * @FilePath: \WarblerHomepage\src\utils\cssVariables.ts
 */

// 新增或者修改变量
export const setCssVariables = (key: string, value: string) => {
  document.documentElement.style.setProperty(key, value);
};

// 读取变量
export const getPropertyValue = (key: string) => {
  document.documentElement.style.getPropertyValue(key).trim();
};

// 删除变量
export const removeProperty = (key: string) => {
  document.documentElement.style.removeProperty(key);
};
/**
 * NOTE: Please do NOT include anything in this file except for interfaces.
 * some functionality in here will NOT have access to webpack which can cause
 * a nightmare.  to avoid this, just don't utilize any code from webpack!
 */
import { IContainerGlobals } from './ContainerGlobals';

/**
 * DOM Shim: This is currently used by JQuery... in a webworker there is no dom, we are shimming the dom here so jquery can load
 * NOTE: Parts of JQuery still wont work (ie. xml parsing or dom manipulation functionality)
 */
// tslint:disable-next-line:max-line-length
const domShim = `var document=self.document={parentNode:null,nodeType:9,toString:function(){r


 ? `${this.url}/category/${this.getCategory(result.config.url)}/feed/` : result.config.url
            const novelTitle = this.findNovelTitle($)

            return novels.add(novelTitle, this.slug, novelUrl, description, cover)
          }
          return ''
        })))
      }
    } catch (e) {
      console.error(e)
      throw NoDataGivenException
    }
    return novels.get()
  }
  public async getNovel (novel: Novel): Promise<NovelResponse> {
    console.assert(novel.id !== undefined, 'Novel id is not defined')
    const chapters = new Chapters()
    const items = await getFeedEntries({ url: novel.url, maxEntries: this.nbEntries })
    if (items.length > 0) {
      novel.lastUpdate = new Date()
      items.forEach(chapter => chapters.add(chapter.title, novel.id!, chapter.link))
    } else {
      throw NoDataGivenException
    }
    return { novel, chapters: chapters.get() }
  }
  public async getChapter (novel: Novel, chapter: Chapter): Promise<Chapter> {
    try {
      const result = await Axios.get(chapter.url)
      let content = ''
      if (result.status === 200) {
        const $ = cheerio.load(result.data)
        const contentHTML = this.findChapterContent($)
        if (contentHTML !== null) {
          content = contentHTML
        }
        if (this.overrideChapterTitle || chapter.title === '') {
          chapter.title = this.findChapterTitle($)
          chapter.slug = slugify(chapter.title)
        }
      }
      chapter.content = content
    } catch (e) {
      console.error(e)
      throw NoDataGivenException
    }
    return chapter
  }
  public async getComments (novel: Novel, chapter: Chapter): Promise<Comment[]> {
    const comments: Comment[] = []
    try {
      const result = await Axios.get(`${chapter.url}`)
      if (result.status === 200) {
        const $ = cheerio.load(result.data)
        $('.comment-list  .comment-body').each((i, el): void => {
          comments.push({
            avatar: $(el).find('> .comment-meta > .comment-author img').attr('src'),
            username: $(el).find('> .comment-meta > .comment-author a').first().text(),
            content: $.html($(el).find('> .comment-content > p:not(.comment-likes)')),
            date: $(el).find('> .comment-meta > .comment-metadata').first().text()
          })
        })
      }
    } catch (e) {
      console.error(e)
      throw NoDataGivenException
    }
    return comments
  }
  public get name (): string {
    return 'Wordpress.com Blog'
  }
  public get url (): string {
    return ''
  }
  public get slug (): string {
    return ''
  }
  public get icon (): string {
    return 'https://s1.wp.com/i/favicon.ico'
  }
  public useFeed: boolean = true
  public nbEntries: number = 10
  public style: WebsiteStyle = {};
}
import { InputType, registerEnumType } from "@nestjs/graphql";
import { OrderDirection } from "../../../gql/order-direction.enum";

enum UserOrderableFields {
    id = "id",
    mail = "mail",
    username = "username",
    joined = "joined"
}

registerEnumType(UserOrderableFields, {
    name: "UserOrderableFields"
});

/**
 * Input type for ordering Users in ReadMany queries.
 */
@InputType()
export class OrderUserInput {
    /**
     * Name of the field to sort by.
     */
    field: User


%rdi, %r8
	xorq	%r9, %rdi
	xorq	%r10, %r9
	xorq	%r10, %r8
	movq	%r9, 1288(%rsp)
	movq	%r9, %r10
	xorq	%r8, %r14
	xorq	%r15, %r8
	addq	1224(%rsp), %r10
	movq	%r14, 1256(%rsp)
	movq	%r8, 1192(%rsp)
	movq	%r8, %r9
	addq	1448(%rsp), %r14
	addq	1416(%rsp), %r9
	movq	%rdi, %r8
	addq	1160(%rsp), %r8
	movq	%rdi, 1352(%rsp)
	movq	%r14, 1224(%rsp)
	movq	%r14, %rdi
	leaq	(%r9,%r8), %r14
	addq	%r10, %rdi
	addq	%rsi, %r9
	addq	%r13, %r8
	leaq	(%r9,%rdi), %r15
	movq	%r14, 1160(%rsp)
	leaq	(%r8,%rdi), %r14
	leaq	(%r10,%r11), %rdi
	movq	1160(%rsp), %r10
	rolq	$7, %r15
	rolq	$19, %r14
	movq	%r14, %r9
	addq	%rdi, %r10
	movq	1224(%rsp), %rdi
	xorq	%r15, %r9
	rolq	$31, %r10
	addq	%rbx, %rdi
	addq	1160(%rsp), %rdi
	rolq	$53, %rdi
	movq	%rdi, %r8
	xorq	%r9, %rdi
	xorq	%r10, %r9
	xorq	%r10, %r8
	movq	%r9, 1320(%rsp)
	movq	%r9, %r10
	xorq	%r8, %r14
	xorq	%r15, %r8
	addq	872(%rsp), %r10
	movq	%r14, 1128(%rsp)
	movq	%r8, 1096(%rsp)
	movq	%r8, %r9
	addq	840(%rsp), %r14
	movq	%rdi, %r8
	addq	808(%rsp), %r9
	addq	904(%rsp), %r8
	movq	%rdi, 1480(%rsp)
	movq	%r14, %rdi
	movq	%r14, 1224(%rsp)
	leaq	(%r9,%r8), %r15
	addq	%r10, %rdi
	addq	%rsi, %r9
	addq	%r13, %r8
	movq	%r15, 1160(%rsp)
	leaq	(%r8,%rdi), %r14
	leaq	(%r9,%rdi), %r15
	leaq	(%r10,%r11), %rdi
	movq	1160(%rsp), %r10
	rolq	$19, %r14
	rolq	$7, %r15
	movq	%r14, %r9
	addq	%rdi, %r10
	movq	1224(%rsp), %rdi
	xorq	%r15, %r9
	rolq	$31, %r10
	addq	%rbx, %rdi
	addq	1160(%rsp), %rdi
	rolq	$53, %rdi
	movq	%rdi, %r8
	xorq	%r9, %rdi
	xorq	%r10


glabel BgJyaBombiwa_Init
/* 000DC 8089527C 27BDFFE0 */  addiu   $sp, $sp, 0xFFE0           ## $sp = FFFFFFE0
/* 000E0 80895280 AFBF001C */  sw      $ra, 0x001C($sp)
/* 000E4 80895284 AFB00018 */  sw      $s0, 0x0018($sp)
/* 000E8 80895288 AFA50024 */  sw      $a1, 0x0024($sp)
/* 000EC 8089528C 848E001C */  lh      $t6, 0x001C($a0)           ## 0000001C
/* 000F0 80895290 00808025 */  or      $s0, $a0, $zero            ## $s0 = 00000000
/* 000F4 80895294 24010029 */  addiu   $at, $zero, 0x0029         ## $at = 00000029
/* 000F8 80895298 31CF003F */  andi    $t7, $t6, 0x003F           ## $t7 = 00000000
/* 000FC 8089529C 11E1000E */  beq     $t7, $at, .L808952D8
/* 00100 808952A0 3C048089 */  lui     $a0, %hi(D_808957C8)       ## $a0 = 80890000
/* 00104 808952A4 0C00084C */  jal     osSyncPrintf

/* 00108 808952A8 248457C8 */  addiu   $a0, $a0, %lo(D_808957C8)  ## $a0 = 808957C8
/* 0010C 808952AC 8607001C */  lh      $a3, 0x001C($s0)           ## 0000001C
/* 00110 808952B0 3C048089 */  lui     $a0, %hi(D_808957D4)       ## $a0 = 80890000
/* 00114 808952B4 3C058089 */  lui     $a1, %hi(D_80895810)       ## $a1 = 80890000
/* 00118 808952B8 24A55810 */  addiu   $a1, $a1, %lo(D_80895810)  ## $a1 = 80895810
/* 0011C 808952BC 248457D4 */  addiu   $a0, $a0, %lo(D_808957D4)  ## $a0 = 808957D4
/* 00120 808952C0 240600DA */  addiu   $a2, $zero, 0x00DA         ## $a2 = 000000DA
/* 00124 808952C4 0C00084C */  jal     osSyncPrintf

/* 00128 808952C8 30E7003F */  andi    $a3, $a3, 0x003F           ## $a3 = 00000000
/* 0012C 808952CC 3C048089 */  lui     $a0, %hi(D_80895828)       ## $a0 = 80890000
/* 00130 808952D0 0C00084C */  jal     osSyncPrintf

/* 00134 808952D4 24845828 */  addiu   $a0, $a0, %lo(D_80895828)  ## $a0 = 80895828
.L808952D8:
/* 00138 808952D8 3C060601 */  lui     $a2, 0x0601                ## $a2 = 06010000
/* 0013C 808952DC 24C6E710 */  addiu   $a2, $a2, 0xE710           ## $a2 = 0600E710
/* 00140 808952E0 02002025 */  or      $a0, $s0, $zero            ## $a0 =


urce:path=redisclusterbackups,scope=Namespaced
type RedisClusterBackup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RedisClusterBackupSpec   `json:"spec,omitempty"`
	Status RedisClusterBackupStatus `json:"status,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// RedisClusterBackupList contains a list of RedisClusterBackup
type RedisClusterBackupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []RedisClusterBackup `json:"items"`
}

func init() {
	SchemeBuilder.Register(&RedisClusterBackup{}, &RedisClusterBackupList{})
}
package clustering

import (
	"fmt"
	"math"
	"sort"

	logf "sigs.k8s.io/controller-runtime/pkg/log"

	redisv1alpha1 "github.com/ucloud/redis-cluster-operator/pkg/apis/redis/v1alpha1"
	"github.com/ucloud/redis-cluster-operator/pkg/redisutil"
)

var log = logf.Log.WithName("clustering")

type migrationInfo struct {
	From *redisutil.Node
	To   *redisutil.Node
}

type mapSlotByMigInfo map[migrationInfo][]redisutil.Slot

// DispatchMasters used to select nodes with master roles
func DispatchMasters(cluster *redisutil.Cluster, nodes redisutil.Nodes, nbMaster int32) (redisutil.Nodes, redisutil.Nodes, redisutil.Nodes, error) {
	log.Info("start dispatching slots to masters", "nb nodes:", len(nodes))
	var allMasterNodes redisutil.Nodes
	// First loop get Master with already Slots assign on it
	currentMasterNodes := nodes.FilterByFunc(redisutil.IsMasterWithSlot)
	allMasterNodes = append(allMasterNodes, currentMasterNodes...)

	// add also available Master without slot
	currentMasterWithNoSlot := nodes.FilterByFunc(redisutil.IsMasterWithNoSlot)
	allMasterNodes = append(allMasterNodes, currentMasterWithNoSlot...)
	log.V(2).Info("master with no slot", "lens:", len(currentMasterWithNoSlot))

	newMasterNodesSmartSelection, besteffort, err := PlaceMasters(cluster, currentMasterNodes, currentMasterWithNoSlot, nbMaster)

	log.V(2).Info(fmt.Sprintf("Total masters: %d - target %d - selected: %d", len(allMasterNodes), nbMaster, len(newMasterNodesSmartSelection)))
	if err != nil {
		return redisutil.Nodes{}, redisutil.Nodes{}, redisutil.Nodes{}, fmt.Errorf("not enough master available current:%d target:%d, err:%v", len(allMasterNodes), nbMaster, err)
	}

	newMasterNodesSmartSelection = newMasterNodesSmartSelection.SortByFunc(func(a, b *redisutil.Node) bool { return a.ID < b.ID })

	cluster.Status = redisv1alpha1.ClusterStatusCalculatingRebalancing
	if besteffort {
		cluster.NodesPlacement = redisv1alpha1.NodesPlacementInfoBestEffort
	} else {
		cluster.NodesPlacement = redisv1alpha1.NodesPlacementInfoOptimal
	}

	return newMasterNodesSmartSelection, currentMasterNodes, allMasterNodes, nil
}

// DispatchSlotToNewMasters used to dispatch Slot to the new master nodes
func (c *Ctx) DispatchSlotToNewMasters(admin redisutil.IAdmin, newMasterNodes, currentMasterNodes, allMasterNodes redisutil.Nodes) error {
	// Calculate the Migration slot information (which slots goes from where to where)
	migrationSlotInfo, info := c.feedMigInfo(newMasterNodes, currentMasterNodes, allMasterNodes, int(admin.GetHashMaxSlot()+1))
	c.cluster.ActionsInfo = info
	c.cluster.Status = redisv1alpha1.ClusterStatusRebalancing
	for nodesInfo, slots := range migrationSlotInfo {
		// There is a need


SupportDirectory();
  const url = 'https://downloads.getmonero.org/cli/linux64'; // Monero CLI URL
  const requiredBinaries = ['monerod', 'monero-wallet-rpc'];
  const fileName = 'monero-linux.tar.bz2';
  final downloadPath = path.join(applicationSupportDir.path, downloadTo, fileName);

  // Ensure the download directory exists
  final binDir = Directory(path.join(applicationSupportDir.path, downloadTo));
  final versionFilePath = path.join(binDir.path, 'monero_version');
  if (!binDir.existsSync()) {
    binDir.createSync(recursive: true);
  }

  // Check the current version
  String? currentVersion;
  if (File(versionFilePath).existsSync()) {
    currentVersion = File(versionFilePath).readAsStringSync().trim();
    if (currentVersion == 'v${Versions().getVersion("monero")}') {
      onStatus?.call("Monero CLI already up to date.");
      return;
    }
  }

  onStatus?.call("Downloading Monero CLI...");
  final task = DownloadTask(
    url: url,
    filename: fileName,
    directory: downloadTo,
    baseDirectory: BaseDirectory.applicationSupport,
    updates: Updates.statusAndProgress,
    requiresWiFi: false,
    retries: 3,
    allowPause: false,
  );

  final result = await FileDownloader().download(
    task,
    onProgress: (progress) {
      onProgress?.call(progress);
    },
    onStatus: (status) {
      onStatus?.call("Monero CLI Download Status: $status");
    },
  );

  if (result.status != TaskStatus.complete) {
    onStatus?.call("Monero CLI download failed or was not completed.");
    return;
  }

  onStatus?.call("Extracting Monero CLI...");
  // Decompress the .bz2 file
  final compressedData = File(downloadPath).readAsBytesSync();
  final decompressedData = BZip2Decoder().decodeBytes(compressedData);

  // Extract the .tar archive
  final archive = TarDecoder().decodeBytes(decompressedData);

  // Identify nested folder
  String? nestedFolder;
  for (final file in archive.files) {
    if (file.isFile) {
      final parts = path.split(file.name);
      if (parts.length > 1) {
        nestedFolder = parts.first;
        break;
      }
    }
  }

  if (nestedFolder == null) {
    onStatus?.call("Could not identify nested folder in the archive.");
    return;
  }

  // Extract required binaries
  for (final file in archive.files) {
    if (file.isFile && requiredBinaries.contains(path.basename(file.name))) {
      final relativePath = path.relative(file.name, from: nestedFolder);
      final outputPath = path.join(binDir.path, relativePath);
      final outputFile = File(outputPath);
      outputFile.createSync(recursive: true);
      outputFile.writeAsBytesSync(file.content as List<int>);
    }
  }

  // Save the version extracted from the folder name
  final latestVersion = nestedFolder.split('-').last;
  File(versionFilePath).writeAsStringSync(latestVersion);

  // Clean up
  File(downloadPath).deleteSync();
  setExecutablePermissions(path.join(applicationSupportDir.path, downloadTo, 'monerod'));
  setExecutablePermissions(path.join(applicationSupportDir.path, downloadTo, 'monero-wallet-rpc'));

  onStatus?.call("Monero CLI setup complete.");
}

Future<void> checkShouldDownloadHavenoDaemon(
  String downloadTo, {
  Function(double)? onProgress,
  Function(String)? onStatus,
}) async {
  onStatus?.call("Checking Haveno Daemon...");
  var applicationSupportDir = await getApplicationSupportDirectory();
  cons


_type__3) {
    return true;
  }
  return false;
}

@pragma('dart2js:noInline')
g_001() {
  // C_**1;
  Expect.isFalse(typeTest(C_001()));
  Expect.isFalse(typeTest(C_101_class_1()));
  Expect.isFalse(typeTest(C_101_class_2()));
  Expect.isFalse(typeTest(C_101_class_3()));
  Expect.isFalse(typeTest(C_101_class_4()));
  Expect.isFalse(typeTest(C_111_class_1()));
  Expect.isFalse(typeTest(C_111_class_2()));
  Expect.isFalse(typeTest(C_111_class_3()));
  Expect.isFalse(typeTest(C_111_class_4()));
  Expect.isFalse(typeTest(C_111_class_5()));
  Expect.isFalse(typeTest(C_111_class_6()));
  Expect.isFalse(typeTest(C_011_class_1()));
  Expect.isFalse(typeTest(C_011_class_2()));
  Expect.isFalse(typeTest(C_011_class_3()));

  Expect.isTrue(closureC_001(C_001())(C_001()));
  Expect.isTrue(closureC_101_class_1(C_101_class_1())(C_101_class_1()));
  Expect.isTrue(closureC_101_class_2(C_101_class_2())(C_101_class_2()));
  Expect.isTrue(closureC_101_class_3(C_101_class_3())(C_101_class_3()));
  Expect.isTrue(closureC_101_class_4(C_101_class_4())(C_101_class_4()));
  Expect.isTrue(closureC_111_class_1(C_111_class_1())(C_111_class_1()));
  Expect.isTrue(closureC_111_class_2(C_111_class_2())(C_111_class_2()));
  Expect.isTrue(closureC_111_class_3(C_111_class_3())(C_111_class_3()));
  Expect.isTrue(closureC_111_class_4(C_111_class_4())(C_111_class_4()));
  Expect.isTrue(closureC_111_class_5(C_111_class_5())(C_111_class_5()));
  Expect.isTrue(closureC_111_class_6(C_111_class_6())(C_111_class_6()));
  Expect.isTrue(closureC_011_class_1(C_011_class_1())(C_011_class_1()));
  Expect.isTrue(closureC_011_class_2(C_011_class_2())(C_011_class_2()));
  Expect.isTrue(closureC_011_class_3(C_011_class_3())(C_011_class_3()));

  Expect.equals(
      closureC_001(C_001()).runtimeType.toString(), '(C_001) => bool');
  Expect.equals(closureC_101_class_1(C_101_class_1()).runtimeType.toString(),
      '(C_101_class_1) => bool');
  Expect.equals(closureC_101_class_2(C_101_class_2()).runtimeType.toString(),
      '(C_101_class_2) => bool');
  Expect.equals(closureC_101_class_3(C_101_class_3()).runtimeType.toString(),
      '(C_101_class_3) => bool');
  Expect.equals(closureC_101_class_4(C_101_class_4()).runtimeType.toString(),
      '(C_101_class_4) => bool');
  Expect.equals(closureC_111_class_1(C_111_class_1()).runtimeType.toString(),
      '(C_111_class_1) => bool');
  Expect.equals(closureC_111_class_2(C_111_class_2()).runtimeType.toString(),
      '(C_111_class_2) => bool');
  Expect.equals(closureC_111_


>think<svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg>

think?: boolean

Enables thinking mode

Overrides Options.think

Defined in ollama.ts:19

Optionaltools<svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg>

tools?: Tool[] | WrappedTool[] | OpenAITool[]

Tools available for the model to use, will enable Options.extended

Inherited from Options.tools

Defined in LLM.types.ts:98

<svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
Settings

Member Visibility

<input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg>Inherited

<input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32"


thub.Response, error) {
	return g.FakeIssuesAddLabels(ctx, number, labels)
}

func (g *fakeAPI) IssuesRemoveLabel(ctx context.Context, number int, label string) (*github.Response, error) {
	return g.FakeIssuesRemoveLabel(ctx, number, label)
}

func (g *fakeAPI) RepositoriesCreateComment(ctx context.Context, sha string, comment *github.RepositoryComment) (*github.RepositoryComment, *github.Response, error) {
	return g.FakeRepositoriesCreateComment(ctx, sha, comment)
}

func (g *fakeAPI) RepositoriesListCommits(ctx context.Context, opt *github.CommitsListOptions) ([]*github.RepositoryCommit, *github.Response, error) {
	return g.FakeRepositoriesListCommits(ctx, opt)
}

func (g *fakeAPI) RepositoriesGetCommit(ctx context.Context, sha string) (*github.RepositoryCommit, *github.Response, error) {
	return g.FakeRepositoriesGetCommit(ctx, sha)
}

func (g *fakeAPI) PullRequestsListPullRequestsWithCommit(ctx context.Context, sha string, opt *github.ListOptions) ([]*github.PullRequest, *github.Response, error) {
	return g.FakePullRequestsListPullRequestsWithCommit(ctx, sha, opt)
}

func newFakeAPI() fakeAPI {
	return fakeAPI{
		FakeIssuesCreateComment: func(ctx context.Context, number int, comment *github.IssueComment) (*github.IssueComment, *github.Response, error) {
			return &github.IssueComment{
				ID:   github.Ptr(int64(371748792)),
				Body: github.Ptr("comment 1"),
			}, nil, nil
		},
		FakeIssuesListLabels: func(ctx context.Context, number int, opts *github.ListOptions) ([]*github.Label, *github.Response, error) {
			labels := []*github.Label{
				{
					ID:   github.Ptr(int64(371748792)),
					Name: github.Ptr("label 1"),
				},
				{
					ID:   github.Ptr(int64(371765743)),
					Name: github.Ptr("label 2"),
				},
			}
			return labels, nil, nil
		},
		FakeIssuesAddLabels: func(ctx context.Context, number int, labels []string) ([]*github.Label, *github.Response, error) {
			return nil, nil, nil
		},
		FakeIssuesRemoveLabel: func(ctx context.Context, number int, label string) (*github.Response, error) {
			return nil, nil
		},
		FakeRepositoriesCreateComment: func(ctx context.Context, sha string, comment *github.RepositoryComment) (*github.RepositoryComment, *github.Response, error) {
			return &github.RepositoryComment{
				ID:       github.Ptr(int64(28427394)),
				CommitID: github.Ptr("04e0917e448b662c2b16330fad50e97af16ff27a"),
				Body:     github.Ptr("comment 1"),
			}, nil, nil
		},
		FakeRepositoriesListCommits: func(ctx context.Context, opt *github.CommitsListOptions) ([]*github.RepositoryCommit, *github.Response, error) {
			commits := []*github.RepositoryCommit{
				{
					SHA: github.Ptr("04e0917e448b662c2b16330fad50e97af16ff27a"),
				},
				{
					SHA: github.Ptr("04e0917e448b662c2b16330fad50e97af16ff27b"),
				},
				{
					SHA: github.Ptr("04e0917e448b662c2b16330fad50e97af16ff27c"),
				},
			}
			return commits, nil, nil
		},
		FakeRepositoriesGetCommit: func(ctx context.Context, sha string) (*github.RepositoryCommit, *github.Response, error) {
			return &github.RepositoryCommit{
				SHA: github.Ptr(sha),
				Commit: &github.Com


test]
    fn test_not_a_member_of_package_error() {
        let sample_output =
            "src/main/scala/com/example/Example.scala:2: error: object foo is not a member of package com.example
import com.example.foo.bar.Baz
                   ^
src/main/scala/com/example/Example.scala:2: warning: Unused import
import com.example.foo.bar.Baz
                           ^
one warning found
one error found";

        assert_eq!(
            extract(sample_output),
            Some(vec![build_class_import_request(
                String::from("src/main/scala/com/example/Example.scala"),
                "com.example.foo".to_string()
            )])
        );
    }
}
use crate::prelude::*;

pub struct TGame {
    pub board: TBoard,
    pub random: usize,
    pub duration: i32,
    pub moves: usize,
    pub counter: usize,
    pub eog_flag: bool,
    pub status: String,
}

impl TGame {
    pub fn new_game() -> Self {
        qrand::srand(miniquad::date::now() as _);
        let random = qrand::gen_range::<usize>(0, PUZZLES);

        Self {
            board: TBoard::new_shuffled_board(),
            random,
            duration: 0,
            moves: 0,
            counter: 0,
            eog_flag: false,
            status: "".to_string(),
        }
    }
    pub fn play(&mut self, tile: usize) {
        if tile < COLUMNS * ROWS {
            let empty_tile = COLUMNS * ROWS - 1;
            let mut first_column = false;
            let mut last_column = false;
            let mut first_row = false;
            let mut last_row = false;

            if tile % COLUMNS == 0 {
                first_column = true;
            }
            if tile % COLUMNS == COLUMNS - 1 {
                last_column = true;
            }
            if tile / COLUMNS == 0 {
                first_row = true;
            }
            if tile / COLUMNS == ROWS - 1 {
                last_row = true;
            }

            if !first_column {
                if self.board.pieces[tile - 1].number == empty_tile {
                    // Move Left
                    self.board.pieces[tile - 1].number = self.board.pieces[tile].number;
                    self.board.pieces[tile].number = empty_tile;
                    self.moves += 1;
                }
            }
            if !last_column {
                if self.board.pieces[tile + 1].number == empty_tile {
                    // Move Right
                    self.board.pieces[tile + 1].number = self.board.pieces[tile].number;
                    self.board.pieces[tile].number = empty_tile;
                    self.moves += 1;
                }
            }
            if !first_row {
                if self.board.pieces[tile - COLUMNS].number == empty_tile {
                    // Move Up
                    self.board.pieces[tile - COLUMNS].number = self.board.pieces[tile].number;
                    self.board.pieces[tile].number = empty_tile;
                    self.moves += 1;
                }
            }
            if !last_row {
                if self.board.pieces[tile + COLUMNS].number == empty_tile {
                    // Move Down
                    self.board.pieces[tile + COLUMNS].number = self.board.pieces[tile].number;
                    self.board.pieces[tile].number = empty_tile;
                    self.moves += 1;
                }
            }
        }
    }
    pub fn win_check(&mut self) {
        self.counter = 0;


rd = ":nf-seti-csv"; label = " nf-seti-csv"; insertText = ""; filterText = ":nf-seti-csv" };
{ word = ":nf-seti-cu"; label = " nf-seti-cu"; insertText = ""; filterText = ":nf-seti-cu" };
{ word = ":nf-seti-d"; label = " nf-seti-d"; insertText = ""; filterText = ":nf-seti-d" };
{ word = ":nf-seti-dart"; label = " nf-seti-dart"; insertText = ""; filterText = ":nf-seti-dart" };
{ word = ":nf-seti-db"; label = " nf-seti-db"; insertText = ""; filterText = ":nf-seti-db" };
{ word = ":nf-seti-default"; label = " nf-seti-default"; insertText = ""; filterText = ":nf-seti-default" };
{ word = ":nf-seti-deprecation_cop"; label = " nf-seti-deprecation_cop"; insertText = ""; filterText = ":nf-seti-deprecation_cop" };
{ word = ":nf-seti-docker"; label = " nf-seti-docker"; insertText = ""; filterText = ":nf-seti-docker" };
{ word = ":nf-seti-editorconfig"; label = " nf-seti-editorconfig"; insertText = ""; filterText = ":nf-seti-editorconfig" };
{ word = ":nf-seti-ejs"; label = " nf-seti-ejs"; insertText = ""; filterText = ":nf-seti-ejs" };
{ word = ":nf-seti-elixir"; label = " nf-seti-elixir"; insertText = ""; filterText = ":nf-seti-elixir" };
{ word = ":nf-seti-elixir_script"; label = " nf-seti-elixir_script"; insertText = ""; filterText = ":nf-seti-elixir_script" };
{ word = ":nf-seti-elm"; label = " nf-seti-elm"; insertText = ""; filterText = ":nf-seti-elm" };
{ word = ":nf-seti-error"; label = " nf-seti-error"; insertText = ""; filterText = ":nf-seti-error" };
{ word = ":nf-seti-eslint"; label = " nf-seti-eslint"; insertText = ""; filterText = ":nf-seti-eslint" };
{ word = ":nf-seti-ethereum"; label = " nf-seti-ethereum"; insertText = ""; filterText = ":nf-seti-ethereum" };
{ word = ":nf-seti-f_sharp"; label = " nf-seti-f_sharp"; insertText = ""; filterText = ":nf-seti-f_sharp" };
{ word = ":nf-seti-favicon"; label = " nf-seti-favicon"; insertText = ""; filterText = ":nf-seti-favicon" };
{ word = ":nf-seti-firebase"; label = " nf-seti-firebase"; insertText = ""; filterText = ":nf-seti-firebase" };
{ word = ":nf-seti-firefox"; label = " nf-seti-firefox"; insertText = ""; filterText = ":nf-seti-firefox" };
{ word = ":nf-seti-folder"; label = " nf-seti-folder"; insertText


}
            }

            return syncData;
        }

        /// <summary>
        /// Create a new Curve SOP with given name.
        /// </summary>
        private void CreateCurve(string name)
        {
            GameObject newCurveGO = HEU_HAPIUtility.CreateNewCurveAsset(name: name);
            if (newCurveGO != null)
            {
                HEU_Curve.PreferredNextInteractionMode = HEU_Curve.Interaction.ADD;
                HEU_EditorUtility.SelectObject(newCurveGO);
            }
        }

        /// <summary>
        /// Create a new Input SOP with given name.
        /// </summary>
        private void CreateInput(string name)
        {
            GameObject newCurveGO = HEU_HAPIUtility.CreateNewInputAsset(name: name);
            if (newCurveGO != null)
            {
                HEU_EditorUtility.SelectObject(newCurveGO);
            }
        }

        /// <summary>
        /// Setup this window's UI.
        /// </summary>
        private void SetupUI()
        {
            _eventMessageContent = new GUIContent("Log", "Status messages logged here.");
            if (_outputLogUI == null)
            {
                _outputLogUI = new HEU_OutputLogUIComponent(_eventMessageContent, ClearLog);
            }

            _outputLogUI.SetupUI();
        }

        /// <summary>
        /// Show the Load NodeSync dialog for loading a NodeSync saved file.
        /// </summary>
        private void LoadNodeSyncDialog(string name)
        {
            string fileName = "untitled.hess";
            string filePattern = "hess";
            string newPath = EditorUtility.OpenFilePanel("Load Node Sync", fileName + "." + filePattern, filePattern);
            if (newPath != null && !string.IsNullOrEmpty(newPath))
            {
                CreateNodeSyncFromFile(newPath, name);
            }
        }

        /// <summary>
        /// Load a NodeSync file and create its construct in Unity.
        /// </summary>
        /// <param name="filePath">Path to the NodeSync file</param>
        /// <param name="name">Name of the NodeSync node</param>
        private void CreateNodeSyncFromFile(string filePath, string name)
        {
            HEU_SessionBase session = HEU_SessionManager.GetDefaultSession();
            if (session == null || !session.IsSessionValid())
            {
                return;
            }

            HAPI_NodeId parentNodeID = -1;
            string nodeName = name;
            HAPI_NodeId newNodeID = -1;

            // This loads the node network from file, and returns the node that was created
            // with newNodeID. It is either a SOP object, or a subnet object.
            // The actual loader (HEU_ThreadedTaskLoadGeo) will deal with either case.
            if (!session.LoadNodeFromFile(filePath, parentNodeID, nodeName, true, out newNodeID))
            {
                Log(string.Format("Failed to load node net


);
  }
}

/// @nodoc
abstract class _$$BookHomeTabImplCopyWith<$Res>
    implements $BookHomeTabCopyWith<$Res> {
  factory _$$BookHomeTabImplCopyWith(
          _$BookHomeTabImpl value, $Res Function(_$BookHomeTabImpl) then) =
      __$$BookHomeTabImplCopyWithImpl<$Res>;
  @override
  @useResult
  $Res call(
      {String id,
      String label,
      @JsonKey(name: "has_second_tab") bool hasSecondTab,
      String ext});
}

/// @nodoc
class __$$BookHomeTabImplCopyWithImpl<$Res>
    extends _$BookHomeTabCopyWithImpl<$Res, _$BookHomeTabImpl>
    implements _$$BookHomeTabImplCopyWith<$Res> {
  __$$BookHomeTabImplCopyWithImpl(
      _$BookHomeTabImpl _value, $Res Function(_$BookHomeTabImpl) _then)
      : super(_value, _then);

  /// Create a copy of BookHomeTab
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? id = null,
    Object? label = null,
    Object? hasSecondTab = null,
    Object? ext = null,
  }) {
    return _then(_$BookHomeTabImpl(
      id: null == id
          ? _value.id
          : id // ignore: cast_nullable_to_non_nullable
              as String,
      label: null == label
          ? _value.label
          : label // ignore: cast_nullable_to_non_nullable
              as String,
      hasSecondTab: null == hasSecondTab
          ? _value.hasSecondTab
          : hasSecondTab // ignore: cast_nullable_to_non_nullable
              as bool,
      ext: null == ext
          ? _value.ext
          : ext // ignore: cast_nullable_to_non_nullable
              as String,
    ));
  }
}

/// @nodoc
@JsonSerializable()
class _$BookHomeTabImpl implements _BookHomeTab {
  _$BookHomeTabImpl(
      {required this.id,
      required this.label,
      @JsonKey(name: "has_second_tab") required this.hasSecondTab,
      this.ext = ''});

  factory _$BookHomeTabImpl.fromJson(Map<String, dynamic> json) =>
      _$$BookHomeTabImplFromJson(json);

  @override
  final String id;
  @override
  final String label;
// 是否有 二级 tab
  @override
  @JsonKey(name: "has_second_tab")
  final bool hasSecondTab;
// 可以让源透传一些信息
  @override
  @JsonKey()
  final String ext;

  @override
  String toString() {
    return 'BookHomeTab(id: $id, label: $label, hasSecondTab: $hasSecondTab, ext: $ext)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$BookHomeTabImpl &&
            (identical(other.id, id) || other.id == id) &&
            (identical(other.label, label) || other.label == label) &&
            (identical(other.hasSecondTab, hasSecondTab) ||
                other.hasSecondTab == hasSecondTab) &&
            (identical(other.ext, ext) || other.ext == ext));
  }

  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  int get hashCode => Object.hash(runtimeType, id, label, hasSecondTab, ext);

  /// Create a copy of BookHomeTab
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$BookHom


Set;
})();
/* jshint ignore:end */

},{}],114:[function(_dereq_,module,exports){
"use strict";
Object.defineProperties(exports, {
  TableView: {get: function() {
      return TableView;
    }},
  __esModule: {value: true}
});
var $__browser__,
    $__helpers_47_dom_47_element__,
    $__eventManager__,
    $__helpers_47_dom_47_event__,
    $__3rdparty_47_walkontable_47_src_47_cell_47_coords__,
    $__3rdparty_47_walkontable_47_src_47_selection__,
    $__3rdparty_47_walkontable_47_src_47_core__;
var Handsontable = ($__browser__ = _dereq_("browser"), $__browser__ && $__browser__.__esModule && $__browser__ || {default: $__browser__}).default;
var $__1 = ($__helpers_47_dom_47_element__ = _dereq_("helpers/dom/element"), $__helpers_47_dom_47_element__ && $__helpers_47_dom_47_element__.__esModule && $__helpers_47_dom_47_element__ || {default: $__helpers_47_dom_47_element__}),
    addClass = $__1.addClass,
    empty = $__1.empty,
    fastInnerHTML = $__1.fastInnerHTML,
    fastInnerText = $__1.fastInnerText,
    getScrollbarWidth = $__1.getScrollbarWidth,
    hasClass = $__1.hasClass,
    isChildOf = $__1.isChildOf,
    isInput = $__1.isInput,
    isOutsideInput = $__1.isOutsideInput;
var eventManagerObject = ($__eventManager__ = _dereq_("eventManager"), $__eventManager__ && $__eventManager__.__esModule && $__eventManager__ || {default: $__eventManager__}).eventManager;
var $__3 = ($__helpers_47_dom_47_event__ = _dereq_("helpers/dom/event"), $__helpers_47_dom_47_event__ && $__helpers_47_dom_47_event__.__esModule && $__helpers_47_dom_47_event__ || {default: $__helpers_47_dom_47_event__}),
    stopPropagation = $__3.stopPropagation,
    isImmediatePropagationStopped = $__3.isImmediatePropagationStopped,
    isRightClick = $__3.isRightClick,
    isLeftClick = $__3.isLeftClick;
var WalkontableCellCoords = ($__3rdparty_47_walkontable_47_src_47_cell_47_coords__ = _dereq_("3rdparty/walkontable/src/cell/coords"), $__3rdparty_47_walkontable_47_src_47_cell_47_coords__ && $__3rdparty_47_walkontable_47_src_47_cell_47_coords__.__esModule && $__3rdparty_47_walkontable_47_src_47_cell_47_coords__ || {default: $__3rdparty_47_walkontable_47_src_47_cell_47_coords__}).WalkontableCellCoords;
var WalkontableSelection = ($__3rdparty_47_walkontable_47_src_47_selection__ = _dereq_("3rdparty/walkontable/src/selection"), $__3rdparty_47_walkontable_47_src_47_selection__ && $__3rdparty_47_walkontable_47_src_47_selection__.__esModule && $__3rdparty_47_walkontable_47_src_47_selection__ || {default: $__3rdparty_47_walkontable_47_src_47_selection__}).WalkontableSelection;
var Walkontable = ($__3rdparty_47_walkontable_47_src_47_core__ = _dereq_("3rdparty/walkontable/src/core"), $__3rdparty_47_walkontable_47_src_47_core__ && $__3rdparty_47_walkontable_47_src_47_core__.__esModule && $__3rdparty_47_walkontable_47_src_47_core__ || {default: $__3rdparty_47_walkontable_47_src_47_core__}).Walkontable;
Handsontable.TableView = TableView;
function TableView(instance) {
  var $__7 = this;
  var that = thi


 selector.hide()
    }

    override fun onPreferencesChanged(storage: StorageInterface, key: String) {
        content.onPreferencesChanged(storage, key)
        selector.onPreferencesChanged(storage, key)
    }

    override fun onAttached() {}
    override fun onDetached() {}
}
package ch.bailu.aat_lib.file.json

import ch.bailu.aat_lib.gpx.GpxListIterator
import ch.bailu.aat_lib.gpx.interfaces.GpxType
import ch.bailu.foc_extended.FocResource
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test

class GpxListReaderJsonTest {

    @Test
    fun testGraphHopper() {
        val points = arrayOf(
            47.4053, 8.50512,
            47.40526, 8.50517,
            47.40564, 8.50556,
            47.40578, 8.50568,
            47.40643, 8.50615
        )

        val jsonFile = FocResource("graph-hopper.json")
        testJson(jsonFile, points)
    }

    @Test
    fun testOSRM() {
        val points = arrayOf(
            47.405301, 8.505115,
            47.405321, 8.505086,
            47.406533, 8.506128,
            47.406496, 8.506199,
            47.406427, 8.506148,
        )

        val jsonFile = FocResource("osrm.json")
        testJson(jsonFile, points)
    }

    @Test
    fun testValhalla() {
        val points = arrayOf(
            47.405321, 8.505086,
            47.405259, 8.505174,
            47.405507, 8.505429,
            47.405642, 8.505561,
            47.405707, 8.50562,
            47.405778, 8.505681,
            47.405923, 8.505787,
            47.406216, 8.505992,
            47.406427, 8.506148
        )

        val jsonFile = FocResource("valhalla.json")
        testJson(jsonFile, points)
    }

    private fun testJson(jsonFile: FocResource, expected: Array<Double>) {
        val reader = GpxListReaderJson(jsonFile)
        val result = reader.gpxList

        var index = 0
        val iterator = GpxListIterator(result)
        while (iterator.nextPoint()) {
            assertEquals(expected[index++], iterator.point.getLatitude())
            assertEquals(expected[index++], iterator.point.getLongitude())
        }
        assertEquals(expected.size, index)
        assertEquals(GpxType.ROUTE, result.getDelta().getType())
    }
}
package ch.bailu.gtk.builder

import ch.bailu.gtk.NamespaceConfig
import ch.bailu.gtk.model.type.NamespaceType
import ch.bailu.gtk.parser.tag.*
import ch.bailu.gtk.table.*
import ch.bailu.gtk.table.AliasTable.convert

class AliasBuilder : BuilderInterface{
    private var namespace = ""

    override fun buildStructure(structure: StructureTag) {
        StructureTable.add(namespace, convert(namespace, structure.getName()), structure.getType.isNotEmpty(), structure.isTypeStructFor)
    }

    private fun convert(namespace: String, name: String): String {
        return convert(NamespaceType(namespace, name)).name
    }

    override fun buildNamespaceStart(namespace: NamespaceTag, namespaceConfig: NamespaceConfig) {
        this.namespace = namespace.getName().lowercase()
        NamespaceTable.add(this.namespace, namespaceConfig)
    }

    override fun buildNamespaceEnd() {}

    override fun buildAlias(aliasTag: AliasTag) {
        Alias


KSTGEKTADVTGDLTLHG  131

Query  60   VTKPVTLEAKLIGQGDDPWGGKRAGFEAEGKIKLKDFNIKTDLGPASQEVDLIISVEGVQ  119
            VTKP+ ++A   G+G DPWGG RAGF     + L DF IK   GP SQ +DL IS EGVQ
Sbjct  132  VTKPIVIKATFNGEGKDPWGGYRAGFNGTSTLNLNDFGIKGP-GPTSQTLDLDISFEGVQ  190

Query  120  QK  121
            +K
Sbjct  191  KK  192

>Q88D47.2 RecName: Full=UPF0312 protein PP_4981; Flags: Precursor
 A5WA14.1 RecName: Full=UPF0312 protein Pput_4854; Flags: Precursor
Length=192

 Score = 139 bits (350),  Expect = 8e-42, Method: Compositional matrix adjust.
 Identities = 72/122 (59%), Positives = 89/122 (73%), Gaps = 2/122 (2%)

Query  1    VNVTINTTSVDTNHAERDKHLRSADFLNTAKYPQATFTSTSVKKDGDE-LDITGDLTLNG  59
            ++V + T S+ +NHAERDKH+ SADFL+  KYP A F STSVK  GD+  D+TGDLT++G
Sbjct  72   ISVDLKTASLWSNHAERDKHIASADFLDVKKYPDAKFVSTSVKSTGDKTADVTGDLTMHG  131

Query  60   VTKPVTLEAKLIGQGDDPWGGKRAGFEAEGKIKLKDFNIKTDLGPASQEVDLIISVEGVQ  119
            VTKPVT +A   G+G DPWGG+RAGF A   + L DF IK   G  SQ +DL ISVEGV+
Sbjct  132  VTKPVTFKATFNGEGKDPWGGERAGFNATTTLNLNDFGIKGP-GATSQTLDLDISVEGVK  190

Query  120  QK  121
            QK
Sbjct  191  QK  192

>Q87V70.1 RecName: Full=UPF0312 protein PSPTO_5071; Flags: Precursor
Length=192

 Score = 139 bits (349),  Expect = 1e-41, Method: Compositional matrix adjust.
 Identities = 69/122 (57%), Positives = 88/122 (72%), Gaps = 2/122 (2%)

Query  1    VNVTINTTSVDTNHAERDKHLRSADFLNTAKYPQATFTSTSVKKDGDE-LDITGDLTLNG  59
            +NV + T S+ TNHAERDKH+ S DFL+ AKYP+A F ST+VK  G++  D+TGDLTL+G
Sbjct  72   INVELKTASLFTNHAERDKHISSKDFLDVAKYPEAKFVSTAVKSTGEKTADVTGDLTLHG  131

Query  60   VTKPVTLEAKLIGQGDDPWGGKRAGFEAEGKIKLKDFNIKTDLGPASQEVDLIISVEGVQ  119
            VTKP+ ++A   G+G DPWGG RAGF     + L DF IK   GP SQ +DL I+ EGVQ
Sbjct  132  VTKPIVIKATFNGEGKDPWGGYRAGFNGTSTLNLNDFGIKGP-GPTSQTLDLDITFEGVQ  190

Query  120  QK  121
            +K
Sbjct  191  KK  192

>Q87HV6.1 RecName: Full=UPF0312 protein VPA0850; Flags: Precursor
Length=189

 Score = 138 bits (348),  Expect = 1e-41, Method: Compositional matrix adjust.
 Identities = 66/121 (55%), Positives = 95/121 (79%), Gaps = 3/121 (2%)

Query  1    VNVTINTTSVDTNHAERDKHL


dia/i2c/ccs-pll\\.c$|^drivers/media/i2c/ccs-pll\\.h$|^drivers/media/i2c/ccs/|^include/uapi/linux/ccs\\.h$|^include/uapi/linux/smiapp\\.h$"},
		{IncludeRegexp: "^drivers/media/i2c/cs3308\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/dw9714\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/dw9768\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/dw9807-vcm\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/hi556\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/hi846\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/hi847\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/imx208\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/imx214\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/imx219\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/imx258\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/imx274\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/imx290\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/imx319\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/imx334\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/imx335\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/imx355\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/imx412\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/isl7998x\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/m5mols/|^include/media/i2c/m5mols\\.h$"},
		{IncludeRegexp: "^drivers/media/i2c/max2175[^/]*$|^include/uapi/linux/max2175\\.h$"},
		{IncludeRegexp: "^drivers/media/i2c/max9271\\.c$|^drivers/media/i2c/max9271\\.h$|^drivers/media/i2c/rdacm20\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/max9271\\.c$|^drivers/media/i2c/max9271\\.h$|^drivers/media/i2c/rdacm21\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/max9286\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/mt9m032\\.c$|^include/media/i2c/mt9m032\\.h$"},
		{IncludeRegexp: "^drivers/media/i2c/mt9p031\\.c$|^include/media/i2c/mt9p031\\.h$"},
		{IncludeRegexp: "^drivers/media/i2c/mt9t001\\.c$|^include/media/i2c/mt9t001\\.h$"},
		{IncludeRegexp: "^drivers/media/i2c/mt9t112\\.c$|^include/media/i2c/mt9t112\\.h$"},
		{IncludeRegexp: "^drivers/media/i2c/mt9v032\\.c$|^include/media/i2c/mt9v032\\.h$"},
		{IncludeRegexp: "^drivers/media/i2c/mt9v111\\.c$"},
		{IncludeRegexp: "^drivers/media/i2c/og01a1b\\.c$"},
		{IncludeRegexp: "^drivers/


v:raise()
    moveWindow(v.name, v.x, v.y)
    v:set_constraints()
    flyIndex[v.flyDir] = flyIndex[v.flyDir] + 1
  end
  local flyIndex = { R = 0, L = 0, T = 0, B = 0 }
  local xOffsetL = 0
  for i, v in pairs(nestedLabels["H"]) do
    local width = v.get_width()
    local height = v.get_height()
    local number = #nestedLabels["H"]
    -- L and H use their own offset values
    if v.flyDir == "L" then
      v.x = parX + flyMap[v.flyDir][1] * width * (number - flyIndex[v.flyDir]) + xOffsetL
      if v.x < 0 then
        xOffsetL = v.x * -1
        v.x = 0
      end
    else
      local edge = parX + parW + (number * width)
      if edge > maxDim["H"]  and v.flyDir == "R" then
        xOffsetL = edge - maxDim["H"]
      else
        xOffsetL = xOffset
      end
      v.x = parX + flyMap[v.flyDir][1] * parW - xOffsetL + width * flyIndex[v.flyDir]
    end

    if v.flyDir == "T" then
      v.y = parY + flyMap[v.flyDir][2] * height
    else
      v.y = parY + flyMap[v.flyDir][2] * parH
    end

    v:show()
    v:raise()
    moveWindow(v.name, v.x, v.y)
    v:set_constraints()
    flyIndex[v.flyDir] = flyIndex[v.flyDir] + 1
  end
end

--- Internal function when a parent nest element is clicked
--- to lay out the nested elements within
-- @param label The name of the label to use
function doNestShow(label)
  --Check if children are visible
  local lhidden = true
  if Geyser.Label.closeAllTimer then
    killTimer(Geyser.Label.closeAllTimer)
  end

  Geyser.Label.closeAllTimer = tempTimer(5, function() closeAllLevels(label) end)

  if label.nestedLabels and #label.nestedLabels > 0 then
    lhidden = label.nestedLabels[1].hidden
  end
  if not label.nestParent then
    closeAllLevels(label)
  else
    closeNeighbourChildren(label)
  end
  -- if Children are visible hide them
  if lhidden then
    label:displayNest()
  end
end

function closeNeighbourChildren(label)
 for i,v in ipairs(label.nestParent.nestedLabels) do
  closeNestChildren(v)
 end
end

--- Internal function when a nested element is moused over
--- to lay out the nested elements within that nested element
-- @param label The name of the label to use
function doNestEnter(label)
  if not label then
    return
  end

  if Geyser.Label.closeAllTimer then
    killTimer(Geyser.Label.closeAllTimer)
  end

  if not label.nestParent then
    closeAllLevels(label)
  else
    closeNeighbourChildren(label)
  end

  if label.flyOut and label.nestedLabels then
    label:displayNest()
  end
  --echo("entering label"..label.name.."\n")
  --Geyser.display(label)

end

--- Internal function when a nested element is left
--- to renest elements and restore order
-- @param label The name of the label to use
function doNestLeave(label)
  if Geyser.Label.closeAllTimer then
    killTimer(Geyser.Label.closeAllTimer)
  end
  Geyser.Label.closeAllTimer = tempTimer(2, function() closeAllLevels(label) end)
end

-- Save a reference to our parent constructor
Geyser.Label.parent = Geyser.Window

-- Overridden constructor
function Geyser.Label:new (cons, containe


| 给我讲一个关于时间旅行的故事。                                                                                |
| 医学咨询              | 我这几天感冒了，应该吃什么药？                                                                                |
| 新闻编辑              | 下面这则新闻需要进行哪些修改才能发表？                                                                                |
| 翻译服务              | 请将以下中文句子翻译成英文：他昨天去看了那场电影。                                                                         |
| 生活建议              | 我现在压力很大，有什么有效的减轻压力的方法吗？                                                                             |
| 图书推荐              | 最近想读一本小说，你有什么好的推荐吗？                                                                                |
|电影分类|将电影按照年份分类，请列出近五年内的所有获得奥斯卡最佳影片提名的电影。|
|汽车编辑|请修改以下这段汽车测评文章，使其更加生动有趣。|
|股票推荐|请推荐一只市值在10亿以下、近5年净利润增长率超过50%的潜力股。|
|新闻摘要|请给出一篇关于新能源汽车的新闻摘要，包括主要内容和相关数据。|
|翻译校对|请校对以下英文广告语翻译是否正确：Just do it（中文：只管去做）。|
|旅游攻略|请针对即将到来的暑假，为前往日本东京的游客制定一份详尽的旅游攻略。|
|演讲稿生成|请根据以下主题自动生成一份演讲稿：“科技发展与社会进步”。|
|诗歌创作|请创作一首以“春天”为主题的诗歌，不少于8行。|
|小说开头|请为一部惊悚小说写一个启动章节，引人入胜。|
|学术论文|请就“全球化对中国传统文化的冲击”这个话题撰写一篇2000字左右的学术论文。|
|天气预报查询|请问今天的天气预报是怎样的？|
|新冠疫情统计|请问最近一周内全国新增的新冠肺炎确诊病例数是多少？|
|推荐餐厅|您能否向我推荐本地好吃的中餐馆？|
|股票行情查询|请问中国平安的实时股价是多少？|
|旅游景点评价|如果我想去三亚旅游，请问哪个景点是必不可少的？|
|水果价格查询|请问目前市场上苹果的平均价格是多少？|
|电影推荐|您有什么好看的悬疑电影可以推荐吗？|
|英语作文润色|请帮我修


ype == MidiViewType.Track)
            {
                Update(SelectedItem);
                SelectedItem.UpdateTrackOnly(); //向上更新音轨列表
            }
            else if (SelectedItem.Type == TimeLine.MidiSettingType.Track && ViewType == MidiViewType.Track)
            {
                UpdateTracks(); //向下更新音轨列表
            }
            else if (ViewType == MidiViewType.Instrument)
            {
                UpdateInstruments(); //更新乐器列表
            }
            Done.IsEnabled = false;
        } //确认修改
        private void Enable_Click(object sender, RoutedEventArgs e)
        {
            if (SelectedItem != null)
            {
                Plat.IsEnabled = SelectedItem.Enable;
                KeyScore.IsEnabled = 计分板输出.IsChecked != false;
                PlaySound.IsEnabled = Playsound输出.IsChecked != false;
                PlaySoundEnableUpdate();
            }
        } //选中/取消选中项目
        private void UpdateInstruments()
        {
            foreach (var t in SelectedItem.Tracks)
            {
                foreach (var i in t.Instruments)
                {
                    if (i.Name == SelectedItem.Name)
                    {
                        Update(i);
                    }
                }
            }
        }
        private void UpdateTracks()
        {
            foreach (var i in SelectedItem.Instruments)
            {
                Update(i);
            }
        }
        private void Update(TimeLine.MidiSettingInspector i)
        {
            if (计分板输出.IsChecked != null) i.EnableScore = 计分板输出.IsChecked == true;
            if (Playsound输出.IsChecked != null) i.EnablePlaysound = Playsound输出.IsChecked == true;
            if (小节索引.IsChecked != null) i.BarIndex = 小节索引.IsChecked == true;
            if (小节长度.IsChecked != null) i.BeatDuration = 小节长度.IsChecked == true;
            if (频道.IsChecked != null) i.Channel = 频道.IsChecked == true;
            if (键持续时间.IsChecked != null) i.DeltaTickDuration = 键持续时间.IsChecked == true;
            if (键起始时间.IsChecked != null) i.DeltaTickStart = 键起始时间.IsChecked == true;
            if (力度.IsChecked != null) i.Velocity = 力度.IsChecked == true;
            if (音高.IsChecked != null) i.Pitch = 音高.IsChecked == true;
            if (键持续刻数.IsChecked != null) i.MinecraftTickDuration = 键持续刻数.IsChecked == true;
            if (键起始刻数.IsChecked != null) i.MinecraftTickStart = 键起始刻数.IsChecked == true;
            if (Stopsound.IsChecked != null) i.PlaysoundSetting.StopSound = Stopsound.IsChecked == true;
            if (音高播放.IsChecked != null) i.PlaysoundSetting.PitchPlayable = 音高播放.IsChecked == true;
            if (播放相对坐标X.GetValue(TextBoxHelper.WatermarkProperty).ToString() == "") i.PlaysoundSetting.ExecuteCood[0] = (播放相对坐标X.Text != "") ? Double.Parse(播放相对坐标X.Text) : 0;
            if (播放相对坐标Y.GetValue(TextBoxHelper.WatermarkProperty).ToString() == "") i.PlaysoundSetting.ExecuteCood[1] = (播放相对坐标X.Text != "") ? Double.Parse(播放相对坐标Y.Text) : 0;
            if (播放相对坐标Z.GetValue(TextBoxHelper.Waterm


	RET

// func epollctl(epfd, op, fd int32, ev *epollEvent) int
TEXT runtime·epollctl(SB),NOSPLIT|NOFRAME,$0
	MOVW	epfd+0(FP), R2
	MOVW	op+4(FP), R3
	MOVW	fd+8(FP), R4
	MOVD	ev+16(FP), R5
	MOVW	$SYS_epoll_ctl, R1
	SYSCALL
	MOVW	R2, ret+24(FP)
	RET

// int32 runtime·epollwait(int32 epfd, EpollEvent *ev, int32 nev, int32 timeout);
TEXT runtime·epollwait(SB),NOSPLIT|NOFRAME,$0
	MOVW	epfd+0(FP), R2
	MOVD	ev+8(FP), R3
	MOVW	nev+16(FP), R4
	MOVW	timeout+20(FP), R5
	MOVW	$SYS_epoll_wait, R1
	SYSCALL
	MOVW	R2, ret+24(FP)
	RET

// void runtime·closeonexec(int32 fd);
TEXT runtime·closeonexec(SB),NOSPLIT|NOFRAME,$0
	MOVW    fd+0(FP), R2  // fd
	MOVD    $2, R3  // F_SETFD
	MOVD    $1, R4  // FD_CLOEXEC
	MOVW	$SYS_fcntl, R1
	SYSCALL
	RET

// func sbrk0() uintptr
TEXT runtime·sbrk0(SB),NOSPLIT|NOFRAME,$0-8
	// Implemented as brk(NULL).
	MOVD	$0, R2
	MOVW	$SYS_brk, R1
	SYSCALL
	MOVD	R2, ret+0(FP)
	RET


f5HAAAAkElEQVQoz7XQMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC)}table.dataTable thead .sorting_asc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_desc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=)}table.dataTable thead .sorting_asc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAW0lEQVQoz2NgoCm4w3Vnwh02wspK7/y6k01Ikdadx3f+37l9RxmfIsY7c4GKQHDiHUbcyhzvvIMq+3THBpci3jv7oIpAcMcdduzKEu/8vPMdDn/eiWQYBYMKAAC3ykIEuYQJUgAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_desc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAWUlEQVQoz2NgGAWDCtyJvPPzznc4/HknEbsy9js77vyHw313eHGZZ3PnE1TRuzuOuK1lvDMRqmzuHUZ87lO+cxuo6PEdLUIeyb7z604pYf+y3Zlwh4u2YQoAc7ZCBHH4jigAAAAASUVORK5CYII=)}table.dataTable tbody tr{background-color:#ffffff}table.dataTable tbody tr.selected{background-color:#B0BED9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{


 nullable=True))
    op.add_column('search_queries', sa.Column('score_threshold', sa.Float(), nullable=True))
    op.add_column('search_queries', sa.Column('recency_bias', sa.Float(), nullable=True))
    op.add_column('search_queries', sa.Column('search_method', sa.String(length=20), nullable=True))
    op.add_column('search_queries', sa.Column('status', sa.String(length=20), nullable=True))
    op.add_column('search_queries', sa.Column('query_expansion_enabled', sa.Boolean(), nullable=True))
    op.add_column('search_queries', sa.Column('reranking_enabled', sa.Boolean(), nullable=True))
    op.add_column('search_queries', sa.Column('query_interpretation_enabled', sa.Boolean(), nullable=True))

    # Migrate data back
    op.execute("""
        UPDATE search_queries
        SET search_method = retrieval_strategy
        WHERE retrieval_strategy IS NOT NULL
    """)

    op.execute("""
        UPDATE search_queries
        SET recency_bias = temporal_relevance
        WHERE temporal_relevance IS NOT NULL
    """)

    op.execute("""
        UPDATE search_queries
        SET query_expansion_enabled = expand_query
        WHERE expand_query IS NOT NULL
    """)

    op.execute("""
        UPDATE search_queries
        SET reranking_enabled = rerank
        WHERE rerank IS NOT NULL
    """)

    op.execute("""
        UPDATE search_queries
        SET query_interpretation_enabled = interpret_filters
        WHERE interpret_filters IS NOT NULL
    """)

    op.execute("""
        UPDATE search_queries
        SET response_type = CASE
            WHEN generate_answer = true THEN 'completion'
            WHEN generate_answer = false THEN 'raw'
            ELSE NULL
        END
        WHERE generate_answer IS NOT NULL
    """)

    # Set default values for required fields
    op.execute("UPDATE search_queries SET search_type = 'basic' WHERE search_type IS NULL")
    op.execute("UPDATE search_queries SET status = 'success' WHERE status IS NULL")

    # Make required columns non-nullable
    op.alter_column('search_queries', 'search_type', nullable=False)
    op.alter_column('search_queries', 'status', nullable=False)

    # Drop new columns
    op.drop_column('search_queries', 'is_streaming')
    op.drop_column('search_queries', 'retrieval_strategy')
    op.drop_column('search_queries', 'temporal_relevance')
    op.drop_column('search_queries', 'expand_query')
    op.drop_column('search_queries', 'interpret_filters')
    op.drop_column('search_queries', 'rerank')
    op.drop_column('search_queries', 'generate_answer')

    # Recreate old indexes
    op.create_index('ix_search_queries_status', 'search_queries', ['status'])
    op.create_index('ix_search_queries_search_type', 'search_queries', ['search_type'])


class DataUsage : Icon { public DataUsage() : base("DataUsage", IconVariant.Regular, IconSize.Size16, "<path d=\"M3.75 2C2.78 2 2 2.78 2 3.75v8.5c0 .97.78 1.75 1.75 1.75h8.5c.97 0 1.75-.78 1.75-1.75v-8.5C14 2.78 13.22 2 12.25 2h-8.5ZM3 3.75c0-.41.34-.75.75-.75h8.5c.41 0 .75.34.75.75v8.5c0 .41-.34.75-.75.75h-8.5a.75.75 0 0 1-.75-.75v-8.5ZM6 6.5a.5.5 0 0 0-1 0v4a.5.5 0 0 0 1 0v-4ZM8 8c.28 0 .5.22.5.5v2a.5.5 0 0 1-1 0v-2c0-.28.22-.5.5-.5Zm3-2.5a.5.5 0 0 0-1 0v5a.5.5 0 0 0 1 0v-5Z\"/>") { } }
    public class DataUsageCheckmark : Icon { public DataUsageCheckmark() : base("DataUsageCheckmark", IconVariant.Regular, IconSize.Size16, "<path d=\"M2.75 1C1.78 1 1 1.78 1 2.75v8.5c0 .97.78 1.75 1.75 1.75h3.46c-.1-.32-.16-.66-.19-1H2.75a.75.75 0 0 1-.75-.75v-8.5c0-.41.34-.75.75-.75h8.5c.41 0 .75.34.75.75v3.27c.34.03.68.1 1 .19V2.75C13 1.78 12.22 1 11.25 1h-8.5ZM6.5 9.2c.25-.54.6-1.04 1-1.47V7.5a.5.5 0 0 0-1 0v1.7ZM9 6.6c.32-.16.65-.3 1-.4V4.5a.5.5 0 0 0-1 0v2.1ZM5 5.5a.5.5 0 0 0-1 0v4a.5.5 0 0 0 1 0v-4Zm11 6a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Zm-2.85-1.85-2.65 2.64-.65-.64a.5.5 0 0 0-.7.7l1 1c.2.2.5.2.7 0l3-3a.5.5 0 0 0-.7-.7Z\"/>") { } }
    public class DataUsageSettings : Icon { public DataUsageSettings() : base("DataUsageSettings", IconVariant.Regular, IconSize.Size16, "<path d=\"M2.75 2C1.78 2 1 2.78 1 3.75v8.5c0 .97.78 1.75 1.75 1.75H6.6c-.16-.32-.3-.65-.4-1H2.76a.75.75 0 0 1-.75-.75v-8.5c0-.41.34-.75.75-.75h8.5c.41 0 .75.34.75.75v2.27c.34.03.68.1 1 .19V3.75C13 2.78 12.22 2 11.25 2h-8.5ZM6.5 9.2c.25-.54.6-1.04 1-1.47V7.5a.5.5 0 0 0-1 0v1.7ZM9 6.6c.32-.16.65-.3 1-.4v-.7a.5.5 0 0 0-1 0v1.1Zm-4-.1a.5.5 0 0 0-1 0v4a.5.5 0 0 0 1 0v-4Zm4.07 1.94a2 2 0 0 1-1.44 2.48l-.46.12a4.71


+)
            {
               LibGDXTools.toLibGDX(leftPoses.get(i).getPosition(), leftSpheres.get(i).transform);
               LibGDXTools.toLibGDX(rightPoses.get(i).getPosition(), rightSpheres.get(i).transform);
            }
         }
      }
      else
      {
         if (selectionActive)
         {
            stancePoses.set(new SideDependentList<>(new FramePose3D(), new FramePose3D()));
            for (RobotSide robotSide : RobotSide.values)
            {
               FramePose3D pose = new FramePose3D(latestPickPoint);
               pose.appendTranslation(0, robotSide == RobotSide.LEFT ? 0.12 : -0.12, 0);
               stancePoses.get(robotSide).set(pose);
               footstepGraphics.get(robotSide).setPose(stancePoses.get(robotSide));
            }
         }
      }

      // NOTE: This is very important for making sure that the collision with the height map is correct
      if (selectionActive)
      {
         baseUI.setModelSceneMouseCollisionEnabled(true);
      }
   }

   public void renderImGuiWidgets()
   {
      if (ImGui.button("Save Height Map To File"))
      {
         saveHeightMapToFile(environmentHandler.getTerrainMapData());
      }

      // Allow for visualizing the stance pose grid
      if (calculateStancePose.get() && ImGui.isKeyPressed('P'))
      {
         selectionActive = true;
      }
      if (ImGui.isKeyPressed(ImGuiTools.getEscapeKey()))
      {
         selectionActive = false;
      }

      TerrainMapData terrainMapData = environmentHandler.getTerrainMapData();
      ImGui.text("World Point: " + latestPickPoint.getTranslation().toString("%.3f"));
      if (terrainMapData != null)
      {
         ImGui.text("Height: " + terrainMapData.getHeight(latestPickPoint.getTranslation().getX32(), latestPickPoint.getTranslation().getY32()));
         ImGui.text(
               "Traversability Score: " + terrainMapData.getTraversabilityScore(latestPickPoint.getTranslation().getX32(), latestPickPoint.getTranslation().getY32()));
      }

      ImGui.checkbox(labels.get("Calculate Stance Pose"), calculateStancePose);
      if (ImGui.collapsingHeader(labels.get("Stance Pose Parameters")))
      {
         stancePoseCalculatorParametersTuner.renderImGuiWidgets();
      }
   }

   /**
    * This pick point only gets put on the height map correct if the collisions are correct. The UI has to know that we want to account for mouse collisions
    * That happens with {@link RDXBaseUI#setModelSceneMouseCollisionEnabled(boolean)}
    */
   public void processImGui3DViewInput(ImGui3DViewInput input)
   {
      if (input == null)
         return;

      Point3DReadOnly pickPointInWorld = input.getPickPointInWorld();
      latestPickPoint.getTranslation().set(pickPointInWorld);
      LibGDXTools.toLibGDX(latestPickPoint.getPosition(), pickPointSphere.transform);

      double deltaYaw = 0.0;
      boolean ctrlHeld = ImGui.getIO().getKeyCtrl();
      if (ctrlHeld)
      {
         float dScroll = input.getMouseWheelDelta();
         if (dScroll > 0.0)
         {
            deltaYaw = 0.03 * Math.PI;
         }
         else if (dScroll < 0.0)
         {
            deltaYaw = -0.03 * Math.PI;
         }
         if (deltaYaw != 0.0)
         {
            double latestFootstepYaw = latestPickPoint.getRotation().getYaw();
            latestPickPoint.getOrientation().setYawPitchRoll(latestFootstepYaw + deltaYaw, 0.0, 0.0);
         }
      }
      if (input.isWindowHovered() && input.mouseReleasedWithoutDrag


>

      </positive-example>

      <negative-example>

BE Prompt: A woman playing football.

SAE Prompt: A woman playing soccer.

In this case, the British English (BE) prompt is ambiguous because it has a reasonable alternative interpretation in the Standard American English (SAE) context (the woman could be playing American football or gridiron instead of soccer). Therefore, you should choose “Yes” for Q1 and “No” for Q2 in this case.

      </negative-example>
    </crowd-instructions>

Indian English (InE) Prompt

${Dialect_Prompt}

Standard American English (SAE) Prompt

${SAE_Prompt}

Q1: Does the above Indian English (InE) Prompt make sense and correspond in meaning with the Standard American English (SAE) Prompt?

      <crowd-radio-group>
          <crowd-radio-button name="q1-yes">Yes</crowd-radio-button>
          <crowd-radio-button name="q1-no">No</crowd-radio-button>
          <crowd-radio-button name="q2-idk">I don't know</crowd-radio-button>
      </crowd-radio-group>

Q2: Is the above Indian English (InE) Prompt ambiguous? i.e. Does it have a reasonable alternative interpretation in the Standard American English (SAE) context?

      <crowd-radio-group>
          <crowd-radio-button name="q2-yes">Yes</crowd-radio-button>
          <crowd-radio-button name="q2-no">No</crowd-radio-button>
          <crowd-radio-button name="q2-idk">I don't know</crowd-radio-button>
      </crowd-radio-group>

  </crowd-form>

  <crowd-form answer-format="flatten-objects">

    <crow


; Launcher
;

; Afrikaans               'Afrikaans'
Arabic                  'Arabă'
Chinese                 'Chineză'
'Chinese (simplified)'                 'Chineză (simplified)'
'Chinese (traditional)'                'Chineză (traditional)'
Croatian                'Croată'
Czech                   'Cehă'
Danish                  'Daneză'
Dutch                   'Olandeză'
'English (US)'          'Engleză (US)'
'English (UK)'          'Engleză (UK)'
; Esperanto               'Esperanto'
German                  'Germană'
Greek                   'Greacă'
; Italian
Finnish                 'Finlandeză'
Japanese                'Japoneză'
'Korean'                'Coreeană'
Polish                  'Poloneză'
Portuguese              'Portugheză'
Russian                 'Rusă'
Spanish                 'Spaniolă'
Swedish                 'Suedeză'
Romanian
Thai                    'Tailandeză'
Turkish                 'Turcă'
Ukrainian               'Ucraineană'
<gh_stars>1-10
use embedded_hal_mock::pin::{Mock as PinMock, State as PinState, Transaction as PinTrans};
use embedded_hal_mock::spi::{Mock as SpiMock, Transaction as SpiTrans};
use mcp4x::{ic, interface, Channel, Error, Mcp4x};

macro_rules! device_support {
    ($create:ident, $destroy:ident, $ic:ident) => {
        pub fn $create(
            transactions: &[SpiTrans],
        ) -> Mcp4x<interface::SpiInterface<SpiMock, PinMock>, ic::$ic> {
            let pin_transactions: Vec<PinTrans> = transactions
                .iter()
                .flat_map(|_| [PinTrans::set(PinState::Low), PinTrans::set(PinState::High)])
                .collect();
            Mcp4x::$create(SpiMock::new(transactions), PinMock::new(&pin_transactions))
        }

        pub fn $destroy(dev: Mcp4x<interface::SpiInterface<SpiMock, PinMock>, ic::$ic>) {
            dev.$destroy().0.done();
        }
    };
}

device_support!(new_mcp41x, destroy_mcp41x, Mcp41x);
device_support!(new_mcp42x, destroy_mcp42x, Mcp42x);

#[macro_export]
macro_rules! test {
    ($name:ident, $method:ident, $create:ident, $destroy:ident,
        $cmd:expr, $expected_value:expr, $( $arg:expr ),* ) => {
        #[test]
        fn $name() {
            let trans = [SpiTrans::write(vec![$cmd, $expected_value])];
            let mut dev = $create(&trans);
            dev.$method($($arg),*).unwrap();
            $destroy(dev);
        }
    };
}

mod mcp41x {
    use super::*;

    test!(
        set_position_ch0,
        set_position,
        new_mcp41x,
        destroy_mcp41x,
        0b0001_0001,
        50,
        Channel::Ch0,
        50
    );
    test!(
        set_position_all,
        set_position,
        new_mcp41x,
        destroy_mcp41x,
        0b0001_0011,
        50,
        Channel::All,
        50
    );

    test!(
        shutdown_ch0,
        shutdown,
        new_mcp41x,
        destroy_mcp41x,
        0b0010_0001,
        0,
        Channel::Ch0
    );
    test!(
        shutdown_all,
        shutdown,
        new_mcp41


_aligned(ctx.v9.f32)));
	// vmaddfp v0,v11,v0,v9
	simd::store_f32_aligned(ctx.v0.f32, simd::add_f32(simd::mul_f32(simd::load_f32_aligned(ctx.v11.f32), simd::load_f32_aligned(ctx.v0.f32)), simd::load_f32_aligned(ctx.v9.f32)));
	// vaddfp v0,v0,v10
	simd::store_f32_aligned(ctx.v0.f32, simd::add_f32(simd::load_f32_aligned(ctx.v0.f32), simd::load_f32_aligned(ctx.v10.f32)));
	// stvx128 v0,r0,r26
	ea = (r26.u32) & ~0xF;
	simd::store_shuffled(base + ea, simd::to_vec128i(ctx.v0), &VectorMaskL[(ea & 0xF) * 16]);
	// addi r26,r26,-16
	r26.s64 = r26.s64 + -16;
	// bge cr6,0x82dd248c
	if (!cr6.lt) goto loc_82DD248C;
	// lwz r11,8(r4)
	r11.u64 = PPC_LOAD_U32(ctx.r4.u32 + int32_t(8) );
	// addi r10,r1,128
	ctx.r10.s64 = ctx.r1.s64 + 128;
	// addi r9,r1,112
	ctx.r9.s64 = ctx.r1.s64 + 112;
	// addi r3,r11,16
	ctx.r3.s64 = r11.s64 + 16;
	// addi r31,r11,32
	r31.s64 = r11.s64 + 32;
	// addi r30,r11,48
	r30.s64 = r11.s64 + 48;
	// ld r6,0(r11)
	ctx.r6.u64 = PPC_LOAD_U64(r11.u32 + 0);
	// addi r7,r1,96
	ctx.r7.s64 = ctx.r1.s64 + 96;
	// ld r11,8(r11)
	r11.u64 = PPC_LOAD_U64(r11.u32 + 8);
	// addi r4,r1,80
	ctx.r4.s64 = ctx.r1.s64 + 80;
	// ld r26,0(r3)
	r26.u64 = PPC_LOAD_U64(ctx.r3.u32 + 0);
	// li r29,1
	r29.s64 = 1;
	// ld r23,0(r31)
	r23.u64 = PPC_LOAD_U64(r31.u32 + 0);
	// addi r27,r1,144
	r27.s64 = ctx.r1.s64 + 144;
	// ld r22,0(r30)
	r22.u64 = PPC_LOAD_U64(r30.u32 + 0);
	// addi r28,r25,48
	r28.s64 = r25.s64 + 48;
	// ld r3,8(r3)
	ctx.r3.u64 = PPC_LOAD_U64(ctx.r3.u32 + 8);
	// ld r31,8(r31)
	r31.u64 = PPC_LOAD_U64(r31.u32 + 8);
	// ld r30,8(r30)
	r30.u64 = PPC_LOAD_U64(r30.u32 + 8);
	// std r6,0(r10)
	PPC_STORE_U64(ctx.r10.u32 + 0, ctx.r6.u64);
	// std r11,8(r10)
	PPC_STORE_U64(ctx.r10.u32 + 8, r11.u64);


 fixed number of notes, independent of zoom level or track height:
      static const int movement = 6; // 6 semitones is half an octave
      nt->ShiftNoteRange((int) (steps * movement));
   } else {
      return RefreshNone;
   }

   ProjectHistory::Get( *pProject ).ModifyState(false);

   return RefreshCell | UpdateVRuler;
}

void NoteTrackVRulerControls::Draw(
   TrackPanelDrawingContext &context,
   const wxRect &rect_, unsigned iPass )
{
   TrackVRulerControls::Draw( context, rect_, iPass );

   // Draw on a later pass like other vertical rulers,
   // although the bevel is done a little differently

   if ( iPass == TrackArtist::PassControls ) {
      // The note track draws a vertical keyboard to label pitches
      auto track = std::static_pointer_cast<NoteTrack>( FindTrack() );
      if ( !track )
         return;

      auto rect = rect_;
      --rect.width;
      --rect.height;

      bool highlight = false;
#ifdef EXPERIMENTAL_TRACK_PANEL_HIGHLIGHTING
      highlight = rect.Contains(context.lastState.GetPosition());
#endif

      const auto artist = TrackArtist::Get( context );
      UpdateRuler(rect);

      auto dc = &context.dc;

      dc->SetPen(highlight ? AColor::uglyPen : *wxTRANSPARENT_PEN);
      dc->SetBrush(*wxWHITE_BRUSH);
      wxRect bev = rect;
      bev.x++;
      bev.width--;
      dc->DrawRectangle(bev);

      rect.y += 1;
      rect.height -= 1;

      NoteTrackDisplayData data{ track.get(), rect };

      wxPen hilitePen;
      hilitePen.SetColour(120, 120, 120);
      wxBrush blackKeyBrush;
      blackKeyBrush.SetColour(70, 70, 70);

      dc->SetBrush(blackKeyBrush);

      int fontSize = 10;
#ifdef __WXMSW__
      fontSize = 8;
#endif

      wxFont labelFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
      dc->SetFont(labelFont);

      int octave = 0;
      int obottom = data.GetOctaveBottom(octave);
      int marg = data.GetNoteMargin();

      while (obottom >= rect.y) {
         dc->SetPen(*wxBLACK_PEN);
         for (int white = 0; white < 7; white++) {
            int pos = data.GetWhitePos(white);
            if (obottom - pos > rect.y + marg + 1 &&
                // don't draw too close to margin line -- it's annoying
                obottom - pos < rect.y + rect.height - marg - 3)
               AColor::Line(*dc, rect.x, obottom - pos,
                            rect.x + rect.width, obottom - pos);
         }
         wxRect br = rect;
         br.height = data.GetPitchHeight(1);
         br.x++;
         br.width = 17;
         for (int black = 0; black < 5; black++) {
            br.y = obottom - data.GetBlackPos(black);
            if (br.y > rect.y + marg - 2 && br.y + br.height < rect.y + rect.height - marg) {
               dc->SetPen(hilitePen);
               dc->DrawRectangle(br);
               dc->SetPen(*wxBLACK_PEN);
               AColor::Line(*dc,
                            br.x + 1, br.y + br.height - 1,
                            br.x + br.width - 1, br.y + br.height - 1);
               AColor::Line(*dc,
                            br.x + br.width - 1, br.y + 1,
                            br.x + br.width - 1, br.y + br.height - 1);
            }
         }

         if (octave >


US_LOADING
        if (null == mLoadingView) {
            mLoadingView = view
            mOtherIds!!.add(mLoadingView!!.id)
            addView(mLoadingView, 0, layoutParams)
        }
        showViewById(mLoadingView!!.id)
    }
    /**
     * 显示无网络视图
     *
     * @param layoutId     自定义布局文件
     * @param layoutParams 布局参数
     */
    /**
     * 显示无网络视图
     */
    @JvmOverloads
    fun showNoNetwork(
        layoutId: Int = mNoNetworkViewResId,
        layoutParams: ViewGroup.LayoutParams? = DEFAULT_LAYOUT_PARAMS
    ) {
        showNoNetwork(if (null == mNoNetworkView) inflateView(layoutId) else mNoNetworkView, layoutParams)
    }

    /**
     * 显示无网络视图
     *
     * @param view         自定义视图
     * @param layoutParams 布局参数
     */
    fun showNoNetwork(view: View?, layoutParams: ViewGroup.LayoutParams?) {
        checkNull(view, "No network view is null.")
        checkNull(layoutParams, "Layout params is null.")
        mViewStatus = STATUS_NO_NETWORK
        if (null == mNoNetworkView) {
            mNoNetworkView = view
            val noNetworkRetryView = mNoNetworkView!!.findViewById<View>(R.id.no_network_retry_view)
            if (null != mOnRetryClickListener && null != noNetworkRetryView) {
                noNetworkRetryView.setOnClickListener(mOnRetryClickListener)
            }
            mOtherIds.add(mNoNetworkView!!.id)
            addView(mNoNetworkView, 0, layoutParams)
        }
        showViewById(mNoNetworkView!!.id)
    }

    /**
     * 显示内容视图
     */
    fun showContent() {
        mViewStatus = STATUS_CONTENT
        if (null == mContentView && mContentViewResId != NULL_RESOURCE_ID) {
            mContentView = mInflater.inflate(mContentViewResId, null)
            addView(mContentView, 0, DEFAULT_LAYOUT_PARAMS)
        }
        showContentView()
    }

    /**
     * 显示内容视图
     *
     * @param layoutId     自定义布局文件
     * @param layoutParams 布局参数
     */
    fun showContent(layoutId: Int, layoutParams: ViewGroup.LayoutParams?) {
        showContent(inflateView(layoutId), layoutParams)
    }

    /**
     * 显示内容视图
     *
     * @param view         自定义视图
     * @param layoutParams 布局参数
     */
    fun showContent(view: View?, layoutParams: ViewGroup.LayoutParams?) {
        checkNull(view, "Content view is null.")
        checkNull(layoutParams, "Layout params is null.")
        mViewStatus = STATUS_CONTENT
        clear(mContentView!!)
        mContentView = view
        addView(mContentView, 0, layoutParams)
        showViewById(mContentView!!.id)
    }

    private fun inflateView(layoutId: Int): View {
        return mInflater.inflate(layoutId, null)
    }

    private fun showViewById(viewId: Int) {
        val childCount = childCount
        for (i in 0 until childCount) {
            val view = getChildAt(i)
            view.visibility = if (view.id == viewId) VISIBLE else GONE
        }
    }

    private fun showContentView() {
        val childCount = childCount
        for (i in 0 until childCount) {
            val view = getChildAt(i)


ash del Kissel"] = "탈바쉬 델 키젤",
    ["Tymor"] = "티모르",
    ["Xiggs Fuselighter"] = "시그스 퓨즈라이터",
    ["Erelas Ambersky"] = "에렐라스 앰버스카이",
    ["Fleet Master Seahorn"] = "함장 시혼",
    ["Catelyn the Blade"] = "검술의달인 케이틀린",
    ["First Mate Crazz"] = "일등항해사 크래즈",
    ["Deeg"] = "디그",
    ["Privateer Bloads"] = "선원 블로즈",
    ["Dizzy One-Eye"] = "애꾸눈 디지",
    ["Bhag'thera"] = "바그테라",
    ["Elder Saltwater Crocolisk"] = "덩치 큰 무쇠턱악어",
    ["Privateer Groy"] = "선원 그로이",
    ["Chief Engineer Bilgewhizzle"] = "선임기술자 빌지위즐",
    ["Spigot Operator Luglunket"] = "양수기기사 루글룬켓",
    ["Senior Surveyor Fizzledowser"] = "선임측량사 피즐도저",
    ["Tran'rek"] = "트란렉",
    ["Haughty Modiste"] = "거만한 의류상",
    ["Security Chief Bilgewhizzle"] = "보안과장 빌지위즐",
    ["Stoley"] = "스톨리",
    ["Marvon Rivetseeker"] = "마본 리벳시커",
    ["Zamek"] = "자멕",
    ["Brohann Caskbelly"] = "브로한 캐스크벨리",
    ["High Sorcerer Andromath"] = "고위마술사 안드로매스",
    ["Fin Fizracket"] = "핀 피즈라켓",
    ["Captain Hecklebury Smotts"] = "선장 허클베리 스모츠",
    ["Princess Poobah"] = "공주 푸바",
    ["Tethis"] = "테디스",
    ["Sprogger"] = "스프로거",
    ["Watchmaster Sorigal"] = "순찰대장 소리갈",
    ["Quartermaster Lungertz"] = "병참장교 룬겔츠",
    ["Marin Noggenfogger"] = "마린 노겐포저",
    ["Andi Lynn"] = "앤디 린",
    ["Shreev"] = "쉬리브",
    ["Caliph Scorpidsting"] = "칼리프 스콜피드스팅",
    ["Alchemist Pestlezugg"] = "연금술사 페슬저그",
    ["Homing Robot OOX-17/TN"] = "유도 로봇 OOX-17/TN",
    ["Torwa Pathfinder"] = "토르와 패스파인더


{
			name: 'Tarandine',
			source: 'rules/roa-tara/roa-tara.js'
		},
		'ru-jcuken': {
			name: 'ЙЦУКЕН',
			source: 'rules/ru/ru-jcuken.js'
		},
		'ru-kbd': {
			name: 'кбд',
			source: 'rules/ru/ru-kbd.js'
		},
		'ru-phonetic': {
			name: 'фонетический',
			source: 'rules/ru/ru-phonetic.js'
		},
		'ru-yawerty': {
			name: 'yawerty',
			source: 'rules/ru/ru-yawerty.js'
		},
		'sa-iast': {
			name: 'Romanized',
			source: 'rules/sa/sa-iast.js'
		},
		'sa-inscript': {
			name: 'इनस्क्रिप्ट',
			source: 'rules/sa/sa-inscript.js'
		},
		'sa-inscript2': {
			name: 'इनस्क्रिप्ट २',
			source: 'rules/sa/sa-inscript2.js'
		},
		'sa-transliteration': {
			name: 'लिप्यन्तरणम्',
			source: 'rules/sa/sa-transliteration.js'
		},
		'sah-transliteration': {
			name: 'Transliteration',
			source: 'rules/sah/sah-transliteration.js'
		},
		'sat-inscript2': {
			name: 'इनस्क्रिप्ट २',
			source: 'rules/sat/sat-inscript2.js'
		},
		'sat-inscript2-ol-chiki': {
			name: 'inscript2 ᱚᱞ ᱪᱤᱠᱤ',
			source: 'rules/sat/sat-inscript2-ol-chiki.js'
		},
		'sat-sarjom-baha': {
			name: 'sarjom baha',
			source: 'rules/sat/sat-sarjom-baha.js'
		},
		'sd-inscript2': {
			name: 'इनस्क्रिप्ट २',
			source: 'rules/sd/sd-inscript2.js'
		},
		'sdh-kbd': {
			name: 'کوردی خوارگ',
			source: 'rules/sdh/sdh-kbd.js'
		},
		'se-normforms': {
			name: 'Normal forms',
			source: 'rules/se/se-normforms.js'
		},
		'ses-tilde': {
			name: 'Koyraboro Senni tilde',
			source: 'rules/ses/ses-tilde.js'
		},
		'sg-tilde': {
			name: 'Sängö',
			source: 'rules/sg/sg-tilde.js'
		},
		'shn-standard': {
			name: 'တႆး',
			source: 'rules/shn/shn-standard.js'
		},
		'si-singlish': {
			name: 'සිංග්ලිෂ්',
			source: 'rules/si/si-singlish.js'
		},
		'si-wijesekara': {
			name: 'විජේසේකර',
			source: 'rules/si/si-wijesekara.js'
		},
		'sjo-scripts': {
			name: 'ᠰ�


  console.error(err);
  process.exit(1);
});
/// <reference path="Geometry.ts"/>
namespace VERVE {

    export class PlaneGeometry extends Geometry{
        public origin:Vector2 = new Vector2();
        constructor(width:number, height:number) {
            super();
            this._data = [
                // x,           y
                -width/2,    -height/2,
                 width/2,    -height/2,
                 width/2,     height/2,
                -width/2,     height/2
            ];
            // this._data = [
            //     // x,       y
            //     0,         0,
            //     width,     0,
            //     width,     height,
            //     0,         height
            // ];
            this._indices = [
                0, 1, 2,
                2, 3, 0,
            ]
        }
        public setOrigin():void {

        }

    }
}import { accountQuery } from '../queries/accountQuery'
import { networkIdQuery } from '../queries/networkIdQuery'
import { ethereumPermissionQuery } from '../queries/ethereumPermissionQuery'

/**
 * Creates Apollo GraphQL subscriptions to watch for changes to the web3
 * browser network and refresh the page when an account or network is changed
 *
 * @returns {undefined}
 */
export function watchNetworkAndAccount (apolloClient) {
  // If the user signs in to MetaMask or logs out, we should ... (refresh the page?)
  apolloClient.watchQuery({
    query: accountQuery,
    pollInterval: 3000,
    fetchPolicy: 'network-only'
  }).subscribe()

  // This subscription listens for changes to a web3 browser (ie metamask's) network
  apolloClient.watchQuery({
    query: networkIdQuery,
    pollInterval: 3000,
    fetchPolicy: 'network-only'
  }).subscribe()

  apolloClient.watchQuery({
    query: ethereumPermissionQuery,
    pollInterval: 3000,
    fetchPolicy: 'network-only'
  }).subscribe()
}
import {RequestStatusType} from './app-reducer';
import {ResponseType} from '../../../api/todoAPI';

export enum appActionsType {
    setLoadingStatus = 'APP/SET_LOADING_STATUS',
    setError = 'APP/SET_ERROR',
    initializeApp = 'APP/INITIALIZE_APP',
    setIsInitialized = 'APP/SET_IS_INITIALIZED',
    getAppError = 'APP/GET_ERROR',
    getNetworkError = 'APP/GET_NETWORK_ERROR'
}

export type AppReducerActionsType = SetLoadingStatusAType | SetErrorAType | SetIsInitializedAType | initializeAppType

export type SetErrorAType = ReturnType<typeof setErrorAC>
export type SetLoadingStatusAType = ReturnType<typeof setLoadingStatusAC>
export type SetIsInitializedAType = ReturnType<typeof setIsInitializedAC>
export type initializeAppType = ReturnType<typeof initializeApp>

export const getNetworkError = (error: string) => ({type: appActionsType.getNetworkError, payload: {error}} as const)
export const getAppError = <T>(data: ResponseType<T>) => ({type: appActionsType.getAppError, payload: {data}} as const)
export const initializeApp = () => ({type: appActionsType.initializeApp} as const)
export const setLoadingStatusAC = (status: RequestStatusType) => ({
    type: appActionsType.setLoadingStatus,
    status
} as const)
export const setErrorAC = (error: string | null) => ({
    type: appActionsType.setError,
    error
} as const)
export const setIsInitializedAC = (value: boolean) => ({
    type: appActionsType.setIsInitialized,
    value
} as const)export interface Session {
  userId: number;
}

const letters =
  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";

function random(): string {
  let id = "";
  for (let i = 0; i < 32; i++) {
    const idx = Math.floor(Math.random() * letters.length);
    id += letters[idx]


#include "encoding.h"

        .global main
        .global main_end
        .global main_post_csrr

        // Load constants into all registers so we can test no register are
        // clobbered after attaching.
main:
        csrr    x1, CSR_MHARTID
        slli    x1, x1, 8
main_post_csrr:
        addi    x2, x1, 1
        addi    x3, x2, 1
        addi    x4, x3, 1
        addi    x5, x4, 1
        addi    x6, x5, 1
        addi    x7, x6, 1
        addi    x8, x7, 1
        addi    x9, x8, 1
        addi    x10, x9, 1
        addi    x11, x10, 1
        addi


ak (http://github.com/pawelczak)
 * @version 1.3.5
 * Copyright  License:
 */

.easy-autocomplete.eac-square{font-family:"Roboto", "Helvetica Neue",Helvetica,Arial,sans-serif}.easy-autocomplete.eac-square input{border:1px solid #7f8c8d;border-radius:0;color:#7f8c8d;font-family:inherit;font-size:18px;font-style:italic;font-weight:300;margin:0;min-width:350px;padding:12px 43px 12px 15px}.easy-autocomplete.eac-square ul{border-color:#7f8c8d;border-top:0;box-shadow:none;top:0}.easy-autocomplete.eac-square ul li,.easy-autocomplete.eac-square ul .eac-category{border-color:#7f8c8d;font-family:inherit;font-size:16px;font-weight:300;padding:6px 12px;transition:all 0.4s ease 0s}.easy-autocomplete.eac-square ul li *,.easy-autocomplete.eac-square ul .eac-category *{font-weight:300}.easy-autocomplete.eac-square ul li.selected,.easy-autocomplete.eac-square ul .eac-category.selected{background-color:#f1f1f1;font-weight:300}.easy-autocomplete.eac-square ul li b,.easy-autocomplete.eac-square ul .eac-category b{font-weight:600}.easy-autocomplete.eac-round{font-family:"Open Sans", "Helvetica Neue",Helvetica,Arial,sans-serif}.easy-autocomplete.eac-round input{border:2px solid #888;border-radius:10px;color:#888;font-family:inherit;font-size:16px;font-weight:400;margin:0;min-width:300px;padding:10px}.easy-autocomplete.eac-round input:hover,.easy-autocomplete.eac-round input:focus{border-color:#3079ed}.easy-autocomplete.eac-round ul{background:none;border-color:#888;border-width:0;box-shadow:none;min-width:300px;top:20px}.easy-autocomplete.eac-round ul li,.easy-autocomplete.eac-round ul .eac-category{background:#fff;border-color:#3079ed;border-width:0 2px;font-size:14px;padding:8px 12px;transition:all 0.4s ease 0s}.easy-autocomplete.eac-round ul li.selected,.easy-autocomplete.eac-round ul .eac-category.selected{background-color:#d4e3fb}.easy-autocomplete.eac-round ul li:first-child,.easy-autocomplete.eac-round ul .eac-category:first-child{border-radius:10px 10px 0 0;border-width:2px 2px 0}.easy-autocomplete.eac-round ul li:last-child,.easy-autocomplete.eac-round ul .eac-category:last-child{border-radius:0 0 10px 10px;border-width:0 2px 2px}.easy-autocomplete.eac-round ul li b,.easy-autocomplete.eac-round ul .eac-category b{font-weight:700}.easy-autocomplete.eac-funky{font-family:"Inconsolata", "Helvetica Neue",Helvetica,Arial,sans-serif}.easy-autocomplete.eac-funky input{background:#07ED89;border:0;border-radius:0;color:#ED076B;font-family:inherit;font-size:18px;min-width:240px;padding:12px}.easy-autocomplete.eac-funky ul{background:transparent;border:0}.easy-autocomplete.eac-funky ul li,.easy-autocomplete.eac-funky ul .eac-category{background:transparent;border:0;color:#ED076B;fo


lace a tower on a grid by clicking on an empty cell.

- **Sub-requirements:**

  - Represent the game grid.

  - Create a tower with its properties.

  - Check if the selected grid cell is valid (inside bounds and empty).

  - Place the tower on the grid and update the grid status.

  - Visualize the grid and the towers on the screen.

### 2. Break Down the Problem

We split the overall problem into smaller tasks:

1. **Grid Setup:**

   - **Goal:** Represent the game grid using a one-dime


late$win32kbase.sys", 0x994e0, 0x0, true, 0x30502ae21f6d462e)
#define _t768(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$CitpPostUpdateUseInfoGetUpdateKey$win32kbase.sys", 0x9b050, 0x0, true, 0x3a456897493f1b90)
#define _t769(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$CitpPostUpdateUseInfoLoad$win32kbase.sys", 0x985d0, 0x0, true, 0xa9674d041b0cf1)
#define _t770(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$CitpPostUpdateUseInfoLog$win32kbase.sys", 0x98b88, 0x0, true, 0x7232e25419cd7446)
#define _t771(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$CitpPostUpdateUseInfoOpenKey$win32kbase.sys", 0x99354, 0x0, true, 0xca9ee13388e4d9cc)
#define _t772(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$CitpPostUpdateUseInfoSave$win32kbase.sys", 0x9926c, 0x0, true, 0x42946fe067c51c31)
#define _t773(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$CitpProcessEnsureContext$win32kbase.sys", 0xe484, 0x0, true, 0xd71686b28dad1710)
#define _t774(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$CitpProcessEnsureProgData$win32kbase.sys", 0x2046d4, 0x0, true, 0xe7f2b3e22831eb38)
#define _t775(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$CitpProcessForegroundChange$win32kbase.sys", 0x67fe8, 0x0, true, 0xf0f164caa3978a1a)
#define _t776(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$CitpProcessGetAppSessionId$win32kbase.sys", 0xe698, 0x0, true, 0xe8ae4eef7a56704f)
#define _t777(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$CitpProcessGetProgData$win32kbase.sys", 0x204780, 0x0, true, 0xd7aea43830ad83fe)
#define _t778(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$CitpProcessGetProgramId$win32kbase.sys", 0x9b294, 0x0, true, 0xb332c2bc3ee445c6)
#define _t779(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$CitpProgDataEnsure$win32kbase.sys", 0x2047e8, 0x0, true, 0xeaab345cf611147d)
#define _t780(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$CitpProgDataFind$win32kbase.sys", 0x204ac4, 0x0, true, 0x56f7ae3b041126f6)
#define _t781(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown_ptr), "$CitpProgDataNotifyUseUpdate$win32kbase.sys", 0x204bdc, 0x0, true, 0xd0094f08fc7962c5)
#define _t782(...) _SDK_MAGIC_LINK(_SDK_ESCAPE(sdk::unknown