keygen_10_validators.yaml")
}

#[test]
fn load_from_yaml() {
    let keypairs = keypairs_from_yaml_file(yaml_path()).expect("should read keypairs from file");

    keypairs.into_iter().enumerate().for_each(|(i, keypair)| {
        assert_eq!(
            keypair,
            reference_keypair(i),
            "Decoded key {} does not match generated key",
            i
        )
    });
}
use pico_sdk::common::PicoChannel;
use serde::Serialize;

use std::{
    collections::{HashMap, VecDeque},
    time::Instant,
};

#[derive(Clone, Serialize)]
pub struct ChannelInfo {
    pub channel: String,
    pub virt_channels: u32,
    pub voltage_range: f32,
}

#[derive(Clone, Serialize)]
pub struct DeviceInfo {
    pub pico_scope_type: String,
    pub channel_info: Vec<ChannelInfo>,
    pub refresh_rate: u32,
}

impl ToString for DeviceInfo {
    fn to_string(&self) -> String {
        serde_json::to_string(self).unwrap()
    }
}

#[derive(Clone)]

pub struct AppState {
    pub voltage_stream: HashMap<PicoChannel, Vec<f64>>,
    pub voltage_queue: HashMap<PicoChannel, VecDeque<f64>>,
    pub device_info: DeviceInfo,
    pub streaming_speed: u64,
    pub start_time: Instant,
    pub recording: bool,
}

impl AppState {
    pub fn new(device_info: DeviceInfo) -> Self {
        AppState {
            voltage_stream: HashMap::new(),
            voltage_queue: HashMap::new(),
            device_info,
            streaming_speed: 0u64,
            start_time: Instant::now(),
            recording: false,
        }
    }
}
#![feature(intrinsics)]
extern "rust-intrinsic" {
    fn atomic_foo(); //~ ERROR E0092
}

fn main() {
}
//! Network-related operations.

use crate::imp;

mod send_recv;
mod socket;
#[cfg(not(target_os = "wasi"))]
mod socketpair;

pub use send_recv::{
    recv, recvfrom, send, sendto_unix, sendto_v4, sendto_v6, RecvFlags, SendFlags,
};
pub use socket::{
    accept, accept_with, acceptfrom, acceptfrom_with, bind_unix, bind_v4, bind_v6, connect_unix,
    connect_v4, connect_v6, getpeername, getsockname, getsockopt_socket_type, listen, shutdown,
    socket, AcceptFlags, AddressFamily, Protocol, SocketType,
};
#[cfg(not(target_os = "wasi"))]
pub use socketpair::socketpair;

#[cfg(libc)]
pub use imp::net::{Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrUnix, SocketAddrV4, SocketAddrV6};
#[cfg(linux_raw)]
pub use imp::net::{Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrUnix, SocketAddrV4, SocketAddrV6};
use anyhow::{Context, Result};
use chrono::{DateTime, Utc};
use uuid::Uuid;

#[derive(Debug, Clone)]
pub struct Input {
    pub id: Uuid,
    pub updated_at: DateTime<Utc>,
    pub project_id: Option<Uuid>,
    pub pending_project_id: Option<Uuid>,
    pub items: serde_json::Value,
}

pub async fn update_registration_form_answer<'a, E>(conn: E, input: Input) -> Result<()>
where
    E: sqlx::Executor<'


m *ZipkinConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
	if m == nil {
		return 0, nil
	}
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.unknownFields != nil {
		i -= len(m.unknownFields)
		copy(dAtA[i:], m.unknownFields)
	}
	if m.CollectorService != nil {
		if vtmsg, ok := interface{}(m.CollectorService).(interface {
			MarshalToSizedBufferVTStrict([]byte) (int, error)
		}); ok {
			size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
		} else {
			encoded, err := proto.Marshal(m.CollectorService)
			if err != nil {
				return 0, err
			}
			i -= len(encoded)
			copy(dAtA[i:], encoded)
			i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
		}
		i--
		dAtA[i] = 0x4a
	}
	if m.TraceContextOption != 0 {
		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TraceContextOption))
		i--
		dAtA[i] = 0x40
	}
	if m.SplitSpansForRequest {
		i--
		if m.SplitSpansForRequest {
			dAtA[i] = 1
		} else {
			dAtA[i] = 0
		}
		i--
		dAtA[i] = 0x38
	}
	if len(m.CollectorHostname) > 0 {
		i -= len(m.CollectorHostname)
		copy(dAtA[i:], m.CollectorHostname)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CollectorHostname)))
		i--
		dAtA[i] = 0x32
	}
	if m.CollectorEndpointVersion != 0 {
		i = protohelpers.EncodeVarint(dAtA, i, uint64(m.CollectorEndpointVersion))
		i--
		dAtA[i] = 0x28
	}
	if m.SharedSpanContext != nil {
		size, err := (*wrapperspb.BoolValue)(m.SharedSpanContext).MarshalToSizedBufferVTStrict(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0x22
	}
	if m.TraceId_128Bit {
		i--
		if m.TraceId_128Bit {
			dAtA[i] = 1
		} else {
			dAtA[i] = 0
		}
		i--
		dAtA[i] = 0x18
	}
	if len(m.CollectorEndpoint) > 0 {
		i -= len(m.CollectorEndpoint)
		copy(dAtA[i:], m.CollectorEndpoint)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CollectorEndpoint)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.CollectorCluster) > 0 {
		i -= len(m.CollectorCluster)
		copy(dAtA[i:], m.CollectorCluster)
		i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CollectorCluster)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *ZipkinConfig) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.CollectorCluster)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	l = len(m.CollectorEndpoint)
	if l > 0 {
		n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
	}
	if m.TraceId_128Bit


                                            「11月7日」最高速度22.9M/S，2024年Stash Github每天更新免费机场订阅节点链接

这一次的节点更新覆盖了韩国、欧洲、日本、新加坡、加拿大、美国、香港等地区,最高速度可达22.9 M/S。只需复制下方的Clash/v2ray订阅链接,在客户端添加后即可正常使用。

                                            「11月6日」最高速度20.2M/S，2024年Stash Github每天更新免费机场订阅节点链接

这一次的节点更新覆盖了加拿大、香港、新加坡、美国、日本、韩国、欧洲等地区,最高速度可达20.2 M/S。只需复制下方的Clash/v2ray订阅链接,在客户端添加后即可正常使用。

                                            「11月5日」最高速度22.7M/S，2024年Stash Github每天更


href="qsimplexmlnodemodel.html">QSimpleXmlNodeModel.

Types

enum SimpleAxis { Parent, FirstChild, PreviousSibling, NextSibling }

Methods

__init__ (self)

list-of-QXmlNodeModelIndex attributes (self, QXmlNodeModelIndex)

QUrl baseUri (self, QXmlNodeModelIndex)

QXmlNodeModelIndex.DocumentOrder compareOrder (self, QXmlNodeModelIndex, QXmlNodeModelIndex)

QXmlNodeModelIndex createIndex (self, int)

QXmlNodeModelIndex createIndex (self, int, int)

QXmlNodeModelIndex createIndex (self, object, int additionalData = 0)

QUrl documentUri (self, QXmlNodeModelIndex)

QXmlNodeModelIndex elementById (self, QXmlName)

QXmlNodeModelIndex.NodeKind kind (self, QXmlNodeModelIndex)

QXmlName name (self, QXmlNodeModelIndex)

list-of-QXmlName namespaceBindings (self, QXmlNodeModelIndex)

QXmlNodeModelIndex nextFromSimpleAxis (self, SimpleAxis, QXmlNodeModelIndex)

list-of-QXmlNodeModelIndex nodesByIdref (self, QXmlName)

QXmlNodeModelIndex root (self, QXmlNodeModelIndex)

QSourceLocation sourceLocation (self, QXmlNodeModelIndex)</


in/user_upload/Rusterausbruch_Feiler-Artinger-c-beigestellt-2048.jpg" data-fancybox="gallery-id-1" data-caption="" data-credit="Foto beigestellt">

Auch die Ruster Winzerfamilien machte der Ausbruch reich, und so konnten sie sich zahlreiche Privilegien erkaufen, um ihre gesuchte Spezialität auch über die ungarischen Landesgrenzen hinaus verkaufen zu können. 1524 erteilte Königin Maria von Ungarn die Erlaubnis, die Ruster Ausfuhrfässer mit einem eingebrannten R zu kennzeichnen. Ein wichtiger Schritt für die Stadt, denn seit jeher ist Ruster Wein ein Garant für höchste Qualität. Auch heute noch findet man das R auf den Korken und Etiketten der Ruster Winzer. Die Stadt erkaufte sich im Jahr 1681 bei Kaiser Leopold I. das Stadtrecht, das sie mit »60.000 Gulden sowie 500 Eimern Ruster Ausbruch«, also mit umgerechnet 30.000 Litern des hochwertigen Weins bezahlte.

Seit 1991 steht in Rust die Weinakademie Österreich als Tochtergesellschaft der Österreich Wein Marketing mit eigenen Seminar- und Fortbildungsprogrammen Interessierten aus aller Welt offen. Mit der Herkunftsbezeichnung Ruster Ausbruch DAC ist die Einführung des Appellationssystems im Burgenland nun fürs Erste erfolgreich abgeschlossen und ermöglicht dem Konsumenten eine klare Orientierung.


),
        Bytecode::Exists(class_idx) => {
            binary.push(Opcodes::EXISTS as u8)?;
            write_u16_as_uleb128(binary, class_idx.0)
        }
        Bytecode::MutBorrowGlobal(class_idx) => {
            binary.push(Opcodes::MUT_BORROW_GLOBAL as u8)?;
            write_u16_as_uleb128(binary, class_idx.0)
        }
        Bytecode::ImmBorrowGlobal(class_idx) => {
            binary.push(Opcodes::IMM_BORROW_GLOBAL as u8)?;
            write_u16_as_uleb128(binary, class_idx.0)
        }
        Bytecode::MoveFrom(class_idx) => {
            binary.push(Opcodes::MOVE_FROM as u8)?;
            write_u16_as_uleb128(binary, class_idx.0)
        }
        Bytecode::MoveToSender(class_idx) => {
            binary.push(Opcodes::MOVE_TO as u8)?;
            write_u16_as_uleb128(binary, class_idx.0)
        }
        Bytecode::ExistsGeneric(class_idx) => {
            binary.push(Opcodes::EXISTS_GENERIC as u8)?;
            write_u16_as_uleb128(binary, class_idx.0)
        }
        Bytecode::MutBorrowGlobalGeneric(class_idx) => {
            binary.push(Opcodes::MUT_BORROW_GLOBAL_GENERIC as u8)?;
            write_u16_as_uleb128(binary, class_idx.0)
        }
        Bytecode::ImmBorrowGlobalGeneric(class_idx) => {
            binary.push(Opcodes::IMM_BORROW_GLOBAL_GENERIC as u8)?;
            write_u16_as_uleb128(binary, class_idx.0)
        }
        Bytecode::MoveFromGeneric(class_idx) => {
            binary.push(Opcodes::MOVE_FROM_GENERIC as u8)?;
            write_u16_as_uleb128(binary, class_idx.0)
        }
        Bytecode::MoveToSenderGeneric(class_idx) => {
            binary.push(Opcodes::MOVE_TO_GENERIC as u8)?;
            write_u16_as_uleb128(binary, class_idx.0)
        }
        Bytecode::GetTxnSequenceNumber => binary.push(Opcodes::GET_TXN_SEQUENCE_NUMBER as u8),
        Bytecode::GetTxnPublicKey => binary.push(Opcodes::GET_TXN_PUBLIC_KEY as u8),
        Bytecode::Nop => binary.push(Opcodes::NOP as u8),
    };
    res?;
    Ok(())
}

/// Serializes a `Bytecode` stream. Serialization of the function body.
fn serialize_code(binary: &mut BinaryData, code: &[Bytecode]) -> Result<()> {
    let code_size = code.len();
    if code_size > u16::max_value() as usize {
        bail!(
            "code size ({}) cannot exceed {}",
            code_size,
            u16::max_value(),
        )
    }
    write_u16(binary, code_size as u16)?;
    for opcode in code {
        serialize_instruction_inner(binary, opcode)?;
    }
    Ok(())
}

/// Compute the table size with a check for underflow
fn checked_calculate_table_size(binary: &mut BinaryData, start: u32) -> Result<u32> {
    let offset = check_index_in_binary(binary.len())?;
    checked_assume!(offset >= start, "table start must be before end");
    Ok(offset - start)
}

impl CommonSerializer {
    pub fn new(major_version: u8, minor_version: u8) -> CommonSerializer {
        CommonSerializer {
            major_version,
            minor_version,
            table_count: 0,
            module_handles: (0, 0),
            struct_handles: (0, 0),
            function_handles: (0, 0),
            function_instantiations: (0, 0),
            signatures: (0, 0),
            identifiers: (0, 0),
            address_pool: (0, 0),
            byte_array_poo


a.util.List<Jubo.JuLiao.IM.Wx.Proto.ChatRoomPushNotice.ChatRoomMessage.DisplayNameMessage>
        getShowNameListList();
    /**
     * repeated .Jubo.JuLiao.IM.Wx.Proto.ChatRoomMessage.DisplayNameMessage ShowNameList = 6;
     */
    Jubo.JuLiao.IM.Wx.Proto.ChatRoomPushNotice.ChatRoomMessage.DisplayNameMessage getShowNameList(int index);
    /**
     * repeated .Jubo.JuLiao.IM.Wx.Proto.ChatRoomMessage.DisplayNameMessage ShowNameList = 6;
     */
    int getShowNameListCount();
    /**
     * repeated .Jubo.JuLiao.IM.Wx.Proto.ChatRoomMessage.DisplayNameMessage ShowNameList = 6;
     */
    java.util.List<? extends Jubo.JuLiao.IM.Wx.Proto.ChatRoomPushNotice.ChatRoomMessage.DisplayNameMessageOrBuilder>
        getShowNameListOrBuilderList();
    /**
     * repeated .Jubo.JuLiao.IM.Wx.Proto.ChatRoomMessage.DisplayNameMessage ShowNameList = 6;
     */
    Jubo.JuLiao.IM.Wx.Proto.ChatRoomPushNotice.ChatRoomMessage.DisplayNameMessageOrBuilder getShowNameListOrBuilder(
        int index);

    /**
     * string SelfDisplayName = 7;
     */
    java.lang.String getSelfDisplayName();
    /**
     * string SelfDisplayName = 7;
     */
    com.google.protobuf.ByteString
        getSelfDisplayNameBytes();

    /**
     *

     *微信头像
     *

     *
     * string Avatar = 8;
     */
    java.lang.String getAvatar();
    /**
     *

     *微信头像
     *

     *
     * string Avatar = 8;
     */
    com.google.protobuf.ByteString
        getAvatarBytes();
  }
  /**
   * Protobuf type {@code Jubo.JuLiao.IM.Wx.Proto.ChatRoomMessage}
   */
  public  static final class ChatRoomMessage extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:Jubo.JuLiao.IM.Wx.Proto.ChatRoomMessage)
      ChatRoomMessageOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use ChatRoomMessage.newBuilder() to construct.
    private ChatRoomMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private ChatRoomMessage() {
      userName_ = "";
      nickName_ = "";
      memberList_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      owner_ = "";
      notice_ = "";
      showNameList_ = java.util.Collections.emptyList();
      selfDisplayName_ = "";
      avatar_ = "";
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private ChatRoomMessage(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if


(word), 1, file); // colorMapOrigin
	fwrite (&w, sizeof (word), 1, file); // colorMapLength
	fputc (0, file); // colorMapEntrySize

	fwrite (&w, sizeof (word), 1, file); // imageOriginX
	fwrite (&w, sizeof (word), 1, file); // imageOriginY

	w = (word) image->width;
	fwrite (&w, sizeof (word), 1, file); // imageWidth

	w = (word) image->height;
	fwrite (&w, sizeof (word), 1, file); // imageHeight

	fputc (24, file); // imagePixelSize
	fputc (0, file); // imageDescriptorByte

	// write no ident field

	// write no color map

	// write imagedata

	byte *data = (byte *) image->data;
	for (int y = 0; y < image->height; y++)
	{
		byte *scanline = (byte *) &data[(image->height - y - 1) * image->width * 3];
		for (int x = 0; x < image->width; x++)
		{
			fputc ((byte) scanline[x * 3 + 2], file);
			fputc ((byte) scanline[x * 3 + 1], file);
			fputc ((byte) scanline[x * 3 + 0], file);
		}
	}

	fclose (file);

	return true;
}//
//                 mxToolKit (c) 1999 by Mete Ciragan
//
// file:           mxListView.cpp
// implementation: Win32 API
// last modified:  May 03 1999, Mete Ciragan
// copyright:      The programs and associated files contained in this
//                 distribution were developed by Mete Ciragan. The programs
//                 are not in the public domain, but they are freely
//                 distributable without licensing fees. These programs are
//                 provided without guarantee or warrantee expressed or
//                 implied.
//
#include "mxtk/mxListView.h"
#include <windows.h>
#include <commctrl.h>

class mxListView_i
{
public:
	HWND d_hwnd;
};

mxListView::mxListView (mxWindow *parent, int x, int y, int w, int h, int id)
: mxWidget (parent, x, y, w, h)
{
	if (!parent)
		return;

	d_this = new mxListView_i;

	DWORD dwStyle = LVS_NOSORTHEADER | LVS_REPORT | LVS_SHOWSELALWAYS | WS_VISIBLE | WS_CHILD;
	HWND hwndParent = (HWND) ((mxWidget *) parent)->getHandle ();

	d_this->d_hwnd = CreateWindowEx (WS_EX_CLIENTEDGE, WC_LISTVIEW, "", dwStyle,
				x, y, w, h, hwndParent,
				(HMENU) id, (HINSTANCE) GetModuleHandle (NULL), NULL);

	SendMessage (d_this->d_hwnd, WM_SETFONT, (WPARAM) (HFONT) GetStockObject (ANSI_VAR_FONT), MAKELPARAM (TRUE, 0));
	SetWindowLong (d_this->d_hwnd, GWL_USERDATA, (LONG) this);

	setHandle ((void *) d_this->d_hwnd);
	setType (MX_LISTVIEW);
	setParent (parent);
	setId (id);
}

mxListView::~mxListView ()
{
	remove (0);
	delete d_this;
}
int mxListView::add ( const char *item )
{
	if (!d_this)
		return 0;

	LVITEM lvItem;
	memset( &lvItem, 0, sizeof( lvItem ) );

	lvItem.iItem = getItemCount();

	lvItem.mask = LVIF_TEXT;
	lvItem.pszText = (LPSTR) item;
	lvItem.cchTextMax = 256;

	return ListView_InsertItem( d_this->d_hwnd, &lvItem );
}


([
      error(CompileTimeErrorCode.partOfDifferentLibrary, 23, 8),
    ]);

    var node = findNode.singlePartDirective;
    assertResolvedNodeText(node, r'''
PartDirective
  partKeyword: part
  uri: SimpleStringLiteral
    literal: 'c.dart'
  semicolon: ;
  partInclude: PartInclude
    uri: DirectiveUriWithSource
      source: package:test/c.dart
''');
  }

  test_inPart_withSource_notPart_library() async {
    newFile('$testPackageLibPath/a.dart', r'''
part 'b.dart';
''');

    var b = newFile('$testPackageLibPath/b.dart', r'''
part of 'a.dart';
part 'c.dart';
''');

    newFile('$testPackageLibPath/c.dart', '');

    await resolveFile2(b);
    assertErrorsInResult([error(CompileTimeErrorCode.partOfNonPart, 23, 8)]);

    var node = findNode.singlePartDirective;
    assertResolvedNodeText(node, r'''
PartDirective
  partKeyword: part
  uri: SimpleStringLiteral
    literal: 'c.dart'
  semicolon: ;
  partInclude: PartInclude
    uri: DirectiveUriWithSource
      source: package:test/c.dart
''');
  }
}
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:analyzer/src/error/codes.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';

import 'context_collection_resolution.dart';

main() {
  defineReflectiveSuite(() {
    defineReflectiveTests(LogicalAndPatternResolutionTest);
  });
}

@reflectiveTest
class LogicalAndPatternResolutionTest extends PubPackageResolutionTest {
  test_ifCase() async {
    await assertNoErrorsInCode(r'''
void f(x) {
  if (x case int _ && double _) {}
}
''');
    var node = findNode.singleGuardedPattern.pattern;
    assertResolvedNodeText(node, r'''
LogicalAndPattern
  leftOperand: WildcardPattern
    type: NamedType
      name: int
      element: dart:core::@class::int
      type: int
    name: _
    matchedValueType: dynamic
  operator: &&
  rightOperand: WildcardPattern
    type: NamedType
      name: double
      element: dart:core::@class::double
      type: double
    name: _
    matchedValueType: int
  matchedValueType: dynamic
''');
  }

  test_switchCase() async {
    await assertNoErrorsInCode(r'''
void f(x) {
  switch (x) {
    case int _ && double _:
      break;
  }
}
''');
    var node = findNode.singleGuardedPattern.pattern;
    assertResolvedNodeText(node, r'''
LogicalAndPattern
  leftOperand: WildcardPattern
    type: NamedType
      name: int
      element: dart:core::@class::int
      type: int
    name: _
    matchedValueType: dynamic
  operator: &&
  rightOperand: WildcardPattern
    type: NamedType
      name: double
      element: dart:core::@class::double
      type: double
    name: _
    matchedValueType: int
  matchedValueType: dynamic
''');
  }

  test_variableDeclaration() async {
    await assertErrorsInCode(
      r'''
void f() {
  var (a && b) = 0;
}
''',
      [
        error(WarningCode.unusedLocalVariable, 18, 1),
        error(WarningCode.unusedLocalVariable, 23, 1),
      ],
    );
    var node = findNode.singlePatternVariableDeclarationStatement;
    assertResolvedNodeText(node, r'''
PatternVariableDeclarationStatement
  declarat


["pickSpecificPrey"] = "Available only for protocols 12+",
  ["rerollButton"] = "If you like to select another prey crature, click here to get a new list with 9 creatures to choose from.\nThe newly selected prey will be active for 2 hours hunting time again.",
  ["preyCandidate"] = "Select a new prey creature for the next 2 hours hunting time.",
  ["choosePreyButton"] = "Click on this button to confirm selected monsters as your prey creature for the next 2 hours hunting time."
}

function onHover(widget)
  if type(widget) == "string" then
    return preyWindow.description:setText(descriptionTable[widget])
  elseif type(widget) == "number" then
    local slot = "slot" .. (widget + 1)
    local tracker = preyTracker.contentsPanel[slot]
    local desc = tracker.time:getTooltip()
    desc = desc:sub(1,desc:len()-46)
    return preyWindow.description:setText(desc)
  end
  if widget:isVisible() then
    local id = widget:getId()
    local desc = descriptionTable[id]
    if desc then
      preyWindow.description:setText(desc)
    end
  end
end

function terminate()
  disconnect(g_game, {
    onGameStart = check,
    onGameEnd = hide,
    onResourceBalance = onResourceBalance,
    onPreyFreeRolls = onPreyFreeRolls,
    onPreyTimeLeft = onPreyTimeLeft,
    onPreyPrice = onPreyPrice,
    onPreyLocked = onPreyLocked,
    onPreyInactive = onPreyInactive,
    onPreyActive = onPreyActive,
    onPreySelection = onPreySelection
  })

  if preyButton then
    preyButton:destroy()
  end
  if preyTrackerButton then
    preyTrackerButton:destroy()
  end
  preyWindow:destroy()
  preyTracker:destroy()
  if msgWindow then
    msgWindow:destroy()
    msgWindow = nil
  end
end

local n = 0
function setUnsupportedSettings()
  local t = {"slot1", "slot2", "slot3"}
  for i, slot in pairs(t) do
    local panel = preyWindow[slot]
    for j, state in pairs({panel.active, panel.inactive}) do
      state.select.price.text:setText("-------")
    end
    panel.active.autoRerollPrice.text:setText("-")
    panel.active.lockPreyPrice.text:setText("-")
    panel.active.choose.price.text:setText(1)
    panel.active.autoReroll.autoRerollCheck:disable()
    panel.active.lockPrey.lockPreyCheck:disable()
  end
end

function check()
  if g_game.getFeature(GamePrey) then
    if not preyButton then
      preyButton = modules.client_topmenu.addRightGameToggleButton('preyButton', tr('Prey Dialog'), '/images/topbuttons/prey_window', toggle)
    end
    if not preyTrackerButton then
      preyTrackerButton = modules.client_topmenu.addRightGameToggleButton("preyTrackerButton", tr('Prey Tracker'), '/images/topbuttons/prey', toggleTracker)
    end
  elseif preyButton then
    preyButton:destroy()
    preyButton = nil
  end
end

function toggleTracker()
  if preyTracker:isVisible() then
    preyTracker:hide()
  else
    preyTracker:show()
  end
end

function hide()
  preyWindow:hide()
  if msgWindow then
    msgWindow:destroy()
    msgWindow = nil
  end
end

function show()
  if not g_game.getFeature(GamePrey) then
    return hide()
  end
  preyWindow:show()
  preyWindow:raise()
  preyWindow:focus()
  g_game.prey


00 Component in column 0, row 0 position (index 0)
 * @param {Number} m01 Component in column 0, row 1 position (index 1)
 * @param {Number} m02 Component in column 0, row 2 position (index 2)
 * @param {Number} m10 Component in column 1, row 0 position (index 3)
 * @param {Number} m11 Component in column 1, row 1 position (index 4)
 * @param {Number} m12 Component in column 1, row 2 position (index 5)
 * @param {Number} m20 Component in column 2, row 0 position (index 6)
 * @param {Number} m21 Component in column 2, row 1 position (index 7)
 * @param {Number} m22 Component in column 2, row 2 position (index 8)
 * @returns {mat3} out
 */
function set$6(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {
  out[0] = m00;
  out[1] = m01;
  out[2] = m02;
  out[3] = m10;
  out[4] = m11;
  out[5] = m12;
  out[6] = m20;
  out[7] = m21;
  out[8] = m22;
  return out;
}

/**
 * Set a mat3 to the identity matrix
 *
 * @param {mat3} out the receiving matrix
 * @returns {mat3} out
 */
function identity$3(out) {
  out[0] = 1;
  out[1] = 0;
  out[2] = 0;
  out[3] = 0;
  out[4] = 1;
  out[5] = 0;
  out[6] = 0;
  out[7] = 0;
  out[8] = 1;
  return out;
}

/**
 * Transpose the values of a mat3
 *
 * @param {mat3} out the receiving matrix
 * @param {ReadonlyMat3} a the source matrix
 * @returns {mat3} out
 */
function transpose$1(out, a) {
  // If we are transposing ourselves we can skip a few steps but have to cache some values
  if (out === a) {
    var a01 = a[1],
      a02 = a[2],
      a12 = a[5];
    out[1] = a[3];
    out[2] = a[6];
    out[3] = a01;
    out[5] = a[7];
    out[6] = a02;
    out[7] = a12;
  } else {
    out[0] = a[0];
    out[1] = a[3];
    out[2] = a[6];
    out[3] = a[1];
    out[4] = a[4];
    out[5] = a[7];
    out[6] = a[2];
    out[7] = a[5];
    out[8] = a[8];
  }
  return out;
}

/**
 * Inverts a mat3
 *
 * @param {mat3} out the receiving matrix
 * @param {ReadonlyMat3} a the source matrix
 * @returns {mat3 | null} out, or null if source matrix is not invertible
 */
function invert$3(out, a) {
  var a00 = a[0],
    a01 = a[1],
    a02 = a[2];
  var a10 = a[3],
    a11 = a[4],
    a12 = a[5];
  var a20 = a[6],
    a21 = a[7],
    a22 = a[8];
  var b01 = a22 * a11 - a12 * a21;
  var b11 = -a22 * a10 + a12 * a20;
  var b21 = a21 * a10 - a11 * a20;

  // Calculate the determinant
  var det = a00 * b01 + a01 * b11 + a


 check if assigned to pen, pit, (built) cage or chain
// note: BUILDING_CAGED is not set for animals (maybe it's used for dwarves who get caged as sentence)
// animals in cages (no matter if built or on stockpile) get the ref CONTAINED_IN_ITEM instead
// removing them from cages on stockpiles is no problem even without clearing the ref
// and usually it will be desired behavior to do so.
static bool isAssigned(df::unit *unit) {
    for (auto ref : unit->general_refs) {
        auto rtype = ref->getType();
        if(rtype == df::general_ref_type::BUILDING_CIVZONE_ASSIGNED
                || rtype == df::general_ref_type::BUILDING_CAGED
                || rtype == df::general_ref_type::BUILDING_CHAIN
                || (rtype == df::general_ref_type::CONTAINED_IN_ITEM && isInBuiltCage(unit))) {
            return true;
        }
    }
    return false;
}

static bool unlikely_to_revert_to_wild(df::unit *unit) {
    if (Units::isDomesticated(unit))
        return true;
    return Units::isTame(unit) && Units::isMarkedForTraining(unit);
}

static bool isFreeEgglayer(df::unit *unit) {
    return Units::isActive(unit)
        && !Units::isUndead(unit)
        && Units::isFemale(unit)
        && Units::isAdult(unit)
        && unlikely_to_revert_to_wild(unit)
        && Units::isOwnCiv(unit)
        && Units::isEggLayer(unit)
        && !isAssigned(unit)
        && !Units::isGrazer(unit) // exclude grazing birds because they're messy
        && !Units::isMerchant(unit) // don't steal merchant mounts
        && !Units::isForest(unit);  // don't steal birds from traders, they hate that
}

static df::general_ref_building_civzone_assignedst * createCivzoneRef() {
    return (df::general_ref_building_civzone_assignedst *)
        df::general_ref_building_civzone_assignedst::_identity.instantiate();
}

static bool assignUnitToZone(color_ostream &out, df::unit *unit, df::building_civzonest *zone) {
    auto ref = createCivzoneRef();
    if (!ref) {
        ERR(cycle,out).print("Could not create activity zone reference!\n");
        return false;
    }

    ref->building_id = zone->id;
    unit->general_refs.push_back(ref);
    zone->assigned_units.push_back(unit->id);

    INFO(cycle,out).print("Unit %d (%s) assigned to nestbox zone %d (%s)\n",
        unit->id, Units::getRaceName(unit).c_str(),
        zone->id, zone->name.c_str());

    return true;
}

// also assigns units to zone if they have already claimed the nestbox
// and are not assigned elsewhere; returns number assigned
static size_t getFreeNestboxZones(color_ostream &out, vector<df::building_civzonest *> &free_zones) {
    size_t assigned = 0;
    for (auto zone : world->buildings.other.ZONE_PEN) {
        TRACE(cycle,out).print("scanning pasture %d (%s)\n", zone->id, zone->name.c_str());
        if (!Buildings::isActive(zone)) {
            TRACE(cycle,out).print("pasture %d is inactive\n", zone->id);
            continue;
        }
        if (!isEmptyPasture(zone)) {
            TRACE(cycle,out).print("pasture %d is not empty\n", zone->id);
            continue;
        }

        // nestbox must be in upper left corner
        // this could be made more flexible
        df::coord pos(zone->x1, zone->y1, zone->z


th>HRESULT
Severity
Meaning

S_OK
SUCCESS
This function completed successfully.

CHANNEL_ALREADY_CLOSED
ERROR
The channel has already been closed.

The return values are COM error codes. Because this function might complete the operation successfully yet return an HRESULT other than S_OK you should use the SUCCEEDED or FAILED macro to determine the success of the call. To get the specific HRESULT that was returned by the function, use the HRESULT_CODE macro.

See PrintAsyncNotifyError for other possible return values.

For more information about COM error codes, see Error Handling.

The following code example shows how these macros can be used to evaluate the return value.

```cpp

if (SUCCEEDED(hr)){
  // Call was successful
}

if (FAILED(hr)) {
  // Call failed
}

if (FAILED(hr)) {
  // Call failed, check HRESULT value returned
  switch (HRESULT_CODE(hr)){
    case CHANNEL_ALREADY_CLOSED:
      // Some action
      break;
    default:
      // Default action
      break;
  }
} else {
  // Call succeeded
}

```

## -remarks

When a component that is hosted by the print spooler closes a communication channel with a listening application, the component should call the ChannelClosed method of the IPrintAsyncNotifyCallback object, which the listening application provided at the time it registered for notifications. If the print server crashes, the print spooler will attempt to call the OnEventNotify method of the IPrintAsyncNotifyCallback object provided by the listening application. It will send a notification of type NOTIFICATION_RELEASE.

If the listening application closes a bidirectional communication channel, it should call the ChannelClosed method of the IPrintAsyncNotifyCallback object provided by the component when it created the channel. If the listening application crashes, the print spooler will call the OnEventNotify method of the IPrintAsyncNotifyCallback object provided by the  component that is hosted by the print spooler. It will send a notification of type NOTIFICATION_RELEASE.

## -see-also

Asynchronous Printing Notification Interfaces

<a href="/window


.loc === 'Atrium'
				? `• ${dish.title.split(',')
					.filter(element => ['vegan', 'vegetarisch'].some(s => element.toLowerCase().includes(s)))
					.join('\n•')}`
				: dish.title;
			string += `${title}${mini ? '' : '\n'}`;
			if (dish.price && !mini) {
				string += `\nPrice: \`${dish.price}${COMMANDS.MENSA.CURRENCY_SYMBOL}\``;
			}
			if (dish.rating_count && !mini) {
				const rate = COMMANDS.MENSA.EMOJIS.RATING.repeat(Math.floor(dish.rating!)).padEnd(COMMANDS.MENSA.RATING_MAX, '\u2003');
				string += `\nRating: \`${rate}\`\nVotes: ${dish.rating_count}`;
			}
			if (!veg || (veg && (dish.vegetarian || dish.loc === 'Buffet'))) {
				e.addFields({ name: dish.loc, value: string, inline: true });
			}
		}
		if (veg) {
			e.setColor(COMMANDS.MENSA.COLORS.VEG);
		}
		return e;
	}

	public parseAPIData(data: ApiEntry[]): Dish[] {
		return data.map((entry: ApiEntry): Dish => {
			const vegRegex = /(?<loc>.+)(?<veg>veg$)/;
			const noVegRegex = /(?<loc>.+)/;
			let match = vegRegex.exec(entry.loc);
			if (!match) {
				match = noVegRegex.exec(entry.loc);
			}
			const groups = match!.groups!;
			const loc = groups.loc!;
			const vegetarian = groups.veg || entry.title.toLowerCase().includes('vegan') || entry.icon === 'veg' ? true : false;
			return {
				id: entry.m_id,
				date: new Date(entry.date),
				loc: isNaN(parseInt(loc, 10)) ? loc : `Ausgabe ${loc}${vegetarian ? ' (vegetarisch)' : ''}`,
				title: entry.title.trim(),
				price: parseFloat(entry.price) || null,
				rating: parseFloat(entry.rating) || null,
				rating_count: parseInt(entry.rating_amt, 10),
				imageURL: entry.image ? `${COMMANDS.MENSA.API.IMAGE_BASE_URL}/${entry.image}` : null,
				icon: entry.icon || null,
				vegetarian,
				tags: []
			};
		});
	}

	public async exec(message: Message, { date, veg, all, mini }: {date: Date; veg: boolean; all: boolean; mini: boolean}): Promise<Message | Message[]> {
		const weekday = getDay(date);
		const dateString = format(date, COMMANDS.MENSA.DATEFORMAT);
		if (!all && [6, 0].includes(weekday)) {
			return message.util!.send((MESSAGES.COMMANDS.MENSA.ERRORS.NO_WEEKDAY(dateString)));
		}
		const queryString = qs.stringify({ format: 'json', date: all ? 'all' : format(date, COMMANDS.MENSA.DATE_ISO) });
		const headers = {
			'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:27.0) 	Gecko/20100101 Firefox/27.0'
		};
		const res = await fetch(`${COMMANDS.MENSA.API.API_BASE_URL}?${queryString}`, { headers });
		try {
			const json = await res.json();
			const data = this.parseAPIData(json);
			if (all) {
				const filtered: Collection<number, Dish[]> = new Collection();
				for (const entry of data) {
					const day = getDay(entry.date);
					if (!filtered.get(day)) {
						filtered.set(day, []);
					}
					filtered.get(day)!.push(entry);
				}
				if (!filtered.size) {
					return message.channel.send(MESSAGES.COMMANDS.MENSA.ERRORS.NO_DATA_ALL);
				}


, f2:int), B:bag{T:(t1:float, t2:float)}, M:map[]);\n" +
            "macro_group_and_count_D_1 = load 'myfile.txt' USING PigStorage('\t') AS (name:chararray, age:int, gpa:float);\n" +
            "delta = load 'mydir' USING PigStorage('\t') AS (F:(f1:int, f2:int, f3:int), T:(t1:chararray, t2:int));\n" +
            "macro_group_and_count_E_1 = load 'myfile.txt' USING org.apache.pig.builtin.PigStorage('\t') AS B:bag{T:(t1:int, t2:int, t3:int)};\n" +
            "macro_group_and_count_F_1 = load 'myfile.txt' USING org.apache.pig.builtin.PigStorage('\t') AS (T1:(f1:int, f2:int), B:bag{T:(t1:float, t2:float)}, M:map[]);\n" +
            "store gamma INTO 'byuser';\n" +
            "store delta INTO 'byage';\n";

        verify(macro + script, expected);
    }

    @Test
    public void storeTest() throws Exception {
        String macro = "define group_and_count (A,C) returns B {\n" +
            "    $B = CROSS $A, $C partition by org.apache.pig.test.utils.SimpleCustomPartitioner parallel 5;\n" +
            "    STORE $A INTO 'myoutput' USING PigStorage ('*');\n" +
            "};\n";

        String script =
            "alpha = load 'users' as (user, age, zip);\n" +
            "beta = load 'links' as (user, page, view);\n" +
            "gamma = group_and_count (alpha, beta);\n" +
            "delta = group_and_count (beta, alpha);\n" +
            "store gamma into 'byuser';\n" +
            "store delta into 'byage';\n";

        String expected =
            "alpha = load 'users' as (user, age, zip);\n" +
            "beta = load 'links' as (user, page, view);\n" +
            "gamma = CROSS alpha, beta partition BY org.apache.pig.test.utils.SimpleCustomPartitioner parallel 5;\n" +
            "STORE alpha INTO 'myoutput' USING PigStorage('*');\n" +
            "delta = CROSS beta, alpha partition BY org.apache.pig.test.utils.SimpleCustomPartitioner parallel 5;\n" +
            "STORE beta INTO 'myoutput' USING PigStorage('*');\n" +
            "store gamma INTO 'byuser';\n" +
            "store delta INTO 'byage';\n";

        verify(macro + script, expected);
    }

    @Test
    public void streamTest() throws Exception {
        String macro = "define group_and_count (A) returns B {\n" +
            "    $B = STREAM $A THROUGH `stream.pl -n 5`;\n" +
            "    DEFINE mycmd `stream.pl -n 5`;\n" +
            "    $B = STREAM $A THROUGH mycmd;\n" +
            "};\n";

        String script =
            "alpha = load 'users' as (user, age, zip);\n" +
            "gamma = group_and_count (alpha);\n" +
            "store gamma into 'byuser';\n";

        String expected =
            "alpha = load 'users' as (user, age, zip);\n" +
            "gamma = STREAM alpha THROUGH `stream.pl -n 5`;\n" +
            "DEFINE mycmd `stream.pl -n 5`;\n" +
            "gamma = STREAM alpha THROUGH mycmd;\n" +
            "store gamma INTO 'byuser';\n";

        verify(macro + script, expected);
    }

    @Test
    public void defineTest() throws Exception {


";
import {compareVersions} from "./compare-versions.js";
import type {CaniuseBrowser} from "./i-caniuse.js";
import {NORMALIZE_BROWSER_VERSION_REGEXP} from "./normalize-browser-version-regexp.js";

export const SAFARI_TP_MAJOR_VERSION = (() => {
	const versions = getSortedBrowserVersions("safari");
	const lastVersionBeforeTp = versions[versions.length - 2];
	const coerced = _coerce(lastVersionBeforeTp)!;
	if (coerced.minor === 9) {
		return _coerce(coerced.major + 1)!;
	} else {
		return _coerce(`${coerced.major}.${coerced.minor + 1}.0`)!;
	}
})();

/**
 * Ensures that for any given version of a browser, if it is newer than the latest known version, the last known version will be used as a fallback
 */
export function normalizeBrowserVersion(browser: CaniuseBrowser, givenVersion: string, versions: string[] = getSortedBrowserVersions(browser), allowSmaller = false): string {
	const givenVersionCoerced = ensureSemver(browser, givenVersion);
	const latestVersion = getLatestVersionOfBrowser(browser);
	const latestVersionCoerced = ensureSemver(browser, latestVersion);

	if (givenVersionCoerced == null || latestVersionCoerced == null) {
		throw new TypeError(`Could not detect the version of: '${givenVersion}' for browser: ${browser}`);
	}

	if (
		givenVersionCoerced.major > latestVersionCoerced.major ||
		(givenVersionCoerced.major === latestVersionCoerced.major && givenVersionCoerced.minor > latestVersionCoerced.minor) ||
		(givenVersionCoerced.major === latestVersionCoerced.major && givenVersionCoerced.minor === latestVersionCoerced.minor && givenVersionCoerced.patch > latestVersionCoerced.patch)
	) {
		return latestVersion;
	}

	const closestMatch = getClosestMatchingBrowserVersion(browser, givenVersion, versions);

	// Allow smaller, but not larger browser versions than the known ones
	if (allowSmaller && lt(givenVersionCoerced, ensureSemver(browser, closestMatch), {loose: true})) {
		return givenVersion;
	}

	return closestMatch;
}

/**
 * Gets the known version of the given browser that is closest to the given version
 */
export function getClosestMatchingBrowserVersion(browser: CaniuseBrowser, version: string, versions: string[] = getSortedBrowserVersions(browser)): string {
	const coerced = ensureSemver(browser, version);

	if (browser === "op_mini" && version === "all") return "all";
	if (browser === "safari") {
		if (version === "TP") return "TP";
		// If the given version is greater than or equal to the latest non-technical preview version of Safari, the closest match IS TP.
		else if (gt(ensureSemver(browser, `${coerced.major}.${coerced.minor}`), ensureSemver(browser, versions.slice(-2)[0]))) return "TP";
	}

	let candidate = versions[0];

	versions.forEach(currentVersion => {
		const currentCoerced = ensureSemver(browser, currentVersion);
		if (gte(coerced, currentCoerced)) {
			candidate = currentVersion;
		}
	});

	return candidate;
}

export function getSortedBrowserVersionsWithLeadingVersion(browser: CaniuseBrowser, inputVersion?: string): string[] {
	const versions: string[] = getSortedBrowserVersions(browser);
	const [firstVersion] = versions;

	if (firstVersion != null && inputVersion != null) {
		const firstVersionSemver = ensureSemver(browser, firstVersion);
		let nextInputVersion = inputVersion;
		while (true) {
			const nextInputSemver = ensureSemver(browser, nextInputVersion);
			if (gt(firstVersionSemver, nextInputSemver)) {
				versions.unshift(nextInputVersion);
				nextInputVersion = String(


LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProviders
import androidx.lifecycle.get

class DetailFragment : Fragment() {

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        return inflater.inflate(R.layout.fragment_detail, container, false)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        activity?.let {
            val vm: BasicViewModel = ViewModelProviders.of(it).get()
            view.findViewById<TextView>(R.id.textView2).text = vm.cryptocurrency
        }
    }
}
```

Notice in this fragment the “of” method of ViewModelProviders can accept fragment or activity as parameter. You want to give it the activity not the fragment because two fragments share the same activity.

Add new class, app / java / com.example.hellolifecycle6 / MainFragment.

```kotlin
package com.example.hellolifecycle6

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import android.widget.TextView
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProviders
import androidx.lifecycle.get

class MainFragment : Fragment() {

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        return inflater.inflate(R.layout.fragment_main, container, false)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        activity?.let {
            val vm: BasicViewModel = ViewModelProviders.of(it).get()
            view.findViewById<TextView>(R.id.textView).text = vm.cryptocurrency
            view.findViewById<Button>(R.id.button).setOnClickListener {
                fragmentManager?.beginTransaction()!!.replace(android.R.id.content, DetailFragment())
                    .addToBackStack(null).commit()
            }
        }
    }
}
```

Notice, the “of” method of ViewModelProviders accepts activity parameter not fragment parameter. If you use fragment parameter, you can not share the view model between two fragments.

Edit app / java / com.example.hellolifecycle6 / MainActivity.

```kotlin
package com.example.hellolifecycle6

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        if (savedInstanceState == null) {
            supportFragmentManager.beginTransaction()!!.replace(android.R.id.content, MainFragment()).commit()
        }
    }

}
```

Run the application.

<


.be.false;
    });
    it('Tocantins', () => {
      expect(validateBr.inscricaoestadual('27036505735', 'to')).to.be.true;
      expect(validateBr.inscricaoestadual('8103233399-3', 'to')).to.be.true;
      expect(validateBr.inscricaoestadual('8103233399-0', 'to')).to.be.false;
    });
  });

  it('IPTU', () => {
    expect(validateBr.iptu('668.686.179.694.6', 'minas-gerais', 'belo-horizonte')).to.be.true;
    expect(validateBr.iptu('68152735387-9', 'sao-paulo', 'sao-paulo')).to.be.true;
    // expect(validateBr.iptu('12891948261-2','parana','curitiba')).to.be.true;
  });

  it('Número', () => {
    expect(validateBr.number('473124829')).to.be.true;
    expect(validateBr.number('473.12,48,28,1231231312')).to.be.false;
  });

  context('Porcentagem', () => {
    it('Pass when valid', () => {
      expect(validateBr.porcentagem('10')).to.be.true;
      expect(validateBr.porcentagem('10%')).to.be.true;
      expect(validateBr.porcentagem('1.000%')).to.be.true;
      expect(validateBr.porcentagem('1.000,10%')).to.be.true;
    });
    it('Error when not valid', () => {
      expect(validateBr.porcentagem('1234,23,23')).to.be.false;
    });
  });

  context('PIS/PASEP', () => {
    it('Pass when valid', () => {
      expect(validateBr.pispasep('648.60185.98-9')).to.be.true;
    });
    it('Error when not valid', () => {
      expect(validateBr.pispasep('648.60185.98-2')).to.be.false;
      expect(validateBr.pispasep('1234')).to.be.false;
    });
  });

  context('PLACA', () => {
    it('Legado BR', () => {
      expect(validateBr.placa('ABC1234')).to.be.true;
      expect(validateBr.placa('ABCD1234')).to.be.false;
      expect(validateBr.placa('ACD12345')).to.be.false;
      expect(validateBr.placa('SAW0002')).to.be.false;
      expect(validateBr.placa('1234')).to.be.false;
    });
    it('Mercosul BR', () => {
      expect(validateBr.placa('ABC1D23')).to.be.true;
      expect(validateBr.placa('ABC 1D23')).to.be.true;
      expect(validateBr.placa('A1B23DE')).to.be.false;
      expect(validateBr.placa('AB123DE')).to.be.false;
    });
    it('Mercosul AR', () => {
      expect(validateBr.placa('AB 123 CD', true)).to.be.true;
      expect(validateBr.placa('A12 3BCD', true)).to.be.true;
      expect(validateBr.placa('A12 3BCDD', true)).to.be.false;
      expect(validateBr.placa('AA12 3BCD', true)).to.be.false;
    });
    it('Mercosul BO', () => {
      expect(validateBr.placa('AB 12345', true)).to.be.true;
      expect(validateBr.placa('AB 123456', true)).to.be.false;


    return False

        # 检查position是否为长度为7的数组（严格符合ControlRvizArm服务的7元素float64[]要求）
        if not isinstance(response['position'], list) or len(response['position']) != 7:
            self.get_logger().error(f"position格式错误，必须是长度为7的数组，当前: {response['position']}")
            return False

        # 检查position中的元素是否为数字（确保符合float64[]类型要求）
        try:
            # 尝试将所有元素转换为浮点数，确保类型兼容性
            for i, val in enumerate(response['position']):
                float(val)
        except (ValueError, TypeError):
            self.get_logger().error(f"position数组中包含非数字元素: {response['position']}")
            return False

        # 检查gripper是否为有效的值（严格符合ControlRvizArm服务的open_or_close字符串要求）
        if response['gripper'] not in ['open', 'close']:
            self.get_logger().error(f"gripper值无效，必须是'open'或'close'，当前: {response['gripper']}")
            return False

        return True

def main():
    """主函数，初始化ROS2，启动对话模式"""
    # 初始化ROS2
    rclpy.init(args=sys.argv)

    try:
        # 获取命令行参数（如果有）
        model = sys.argv[1] if len(sys.argv) > 1 else "deepseek-ai/DeepSeek-V3"
        base_url = sys.argv[2] if len(sys.argv) > 2 else None

        # 创建OpenAI接口实例（同时也是ROS2节点）
        if base_url:
            openai_interface = OpenAIInterface(model=model, base_url=base_url)
        else:
            openai_interface = OpenAIInterface(model=model)

        print("机械臂对话控制系统已启动！")
        print("输入自然语言指令控制机械臂，输入'退出'或'quit'结束会话")
        print("\n示例指令：")
        print("- 移动到桌子中央")
        print("- 向上移动10厘米")
        print("- 抓取前方物体\n")

        # 启动对话循环
        while True:
            try:
                # 在获取用户输入前处理ROS2回调，确保位置更新及时处理
                rclpy.spin_once(openai_interface, timeout_sec=0.1)
                # 获取用户输入
                command = input("请输入指令: ")

                # 检查退出条件
                if command.lower() in ['退出', 'quit', 'exit']:
                    print("感谢使用机械臂对话控制系统，再见！")
                    break

                # 处理空输入
                if not command.strip():
                    continue

                # 转换自然语言指令为机械臂坐标
                openai_interface.get_logger().info(f"处理自然语言指令: {command}")
                result = openai_interface.convert_natural_language_to_position(command)

                # 输出结果到控制台
                openai_interface.get_logger().info(f"OpenAI处理结果: {json.dumps(result)}")
                print(f"\n执行结果: {result['description']}")
                print(f"目标位置: {result['position'][:3]}")
                print(f"夹爪状态: {result['gripper']}\n")

                # 发送控制请求给机械臂
                success = openai_interface.send_control_request(result['position'], result['gripper'])

                # 控制请求发送后，增加回调处理次数并延长等待时间，确保机械臂到达目标位置后位置数据能被更新
                if success:
                    # 机械臂移动需要时间，增加回调处理次数和等待时间
                    openai_interface.get_logger().info("等待机械臂移动到位并更新位置信息...")
                    # 保存目标位置信息（取位置的前三个坐标：x, y, z）
                    target_position = result['position'][:3]

                    # 先等待1秒让机械臂开始移动
                    time.sleep(1.0)

                    # 首先处理30次回调以获取初始的位置更新
                    for i in range(30):
                        rclpy.spin_once(openai_interface, timeout_sec=0.1)
                        # 每5次回调打印一次当前位置，便于调试
                        if i % 5 == 0 and openai_interface.current_pose:
                            openai_interface.get_logger().info(f"更新位置检查 (第{i+1}/30次): x={openai_interface.current_pose[0]:.4f}, y={openai_interface.current_pose[1]:.4f}, z={openai_interface.current_pose[2]:.4f}")

                    # 设置目标位置差异阈值（移除超时机制）
                    target_threshold = 0.005  # 与目标位置的差异阈值（米）

                    openai_interface.get_logger().info(f"开始监控与目标位置的差异，阈值={target_threshold}米，目标位置: x={target_position[0]:.4f}, y={target_position[1]:.4f}, z={target_position[2]:.4f}")

                    # 然后持续监控当前位置与目标位置的差异（移除超时机制，一直等待直到到达目标位置）
                    while True:
                        rclpy.spin_once(openai_interface, timeout_sec=0.1)

                        # 检查是否获取到了位置信息
                        if not openai_interface.current_pose:
                            time.sleep(0.1)
                            continue


 after logging the last logs.
        """
        if args.save_on_each_node:
            if not state.is_local_process_zero:
                return
        else:
            if not state.is_world_process_zero:
                return

        logs = dict(
            current_steps=self.cur_steps,
            total_steps=self.max_steps,
            loss=state.log_history[-1].get("loss", None),
            eval_loss=state.log_history[-1].get("eval_loss", None),
            predict_loss=state.log_history[-1].get("predict_loss", None),
            reward=state.log_history[-1].get("reward", None),
            accuracy=state.log_history[-1].get("rewards/accuracies", None),
            learning_rate=state.log_history[-1].get("learning_rate", None),
            epoch=state.log_history[-1].get("epoch", None),
            percentage=round(self.cur_steps / self.max_steps * 100, 2) if self.max_steps != 0 else 100,
            elapsed_time=self.elapsed_time,
            remaining_time=self.remaining_time,
        )
        if self.runner is not None:
            logger.info(
                "{{'loss': {:.4f}, 'learning_rate': {:2.4e}, 'epoch': {:.2f}}}".format(
                    logs["loss"] or 0, logs["learning_rate"] or 0, logs["epoch"] or 0
                )
            )

        os.makedirs(args.output_dir, exist_ok=True)
        with open(os.path.join(args.output_dir, "trainer_log.jsonl"), "a", encoding="utf-8") as f:
            f.write(json.dumps(logs) + "\n")

    def on_prediction_step(
        self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs
    ):
        r"""
        Event called after a prediction step.
        """
        eval_dataloader = kwargs.pop("eval_dataloader", None)
        if state.is_local_process_zero and has_length(eval_dataloader) and not self.in_training:
            if self.max_steps == 0:
                self.max_steps = len(eval_dataloader)
            self.cur_steps += 1
            self.timing()


nnamed0() => {
  'x': {
    'list': [1, 2, 3],
    'bool': true,
    'string': 'foo',
  },
  'y': {
    'list': [1, 2, 3],
    'bool': true,
    'string': 'foo',
  },
};

void checkUnnamed0(core.Map<core.String, core.Object?> o) {
  unittest.expect(o, unittest.hasLength(2));
  var casted1 = (o['x']!) as core.Map;
  unittest.expect(casted1, unittest.hasLength(3));
  unittest.expect(casted1['list'], unittest.equals([1, 2, 3]));
  unittest.expect(casted1['bool'], unittest.equals(true));
  unittest.expect(casted1['string'], unittest.equals('foo'));
  var casted2 = (o['y']!) as core.Map;
  unittest.expect(casted2, unittest.hasLength(3));
  unittest.expect(casted2['list'], unittest.equals([1, 2, 3]));
  unittest.expect(casted2['bool'], unittest.equals(true));
  unittest.expect(casted2['string'], unittest.equals('foo'));
}

core.List<core.Map<core.String, core.Object?>> buildUnnamed1() => [
  buildUnnamed0(),
  buildUnnamed0(),
];

void checkUnnamed1(core.List<core.Map<core.String, core.Object?>> o) {
  unittest.expect(o, unittest.hasLength(2));
  checkUnnamed0(o[0]);
  checkUnnamed0(o[1]);
}

core.int buildCounterGoogleApiHttpBody = 0;
api.GoogleApiHttpBody buildGoogleApiHttpBody() {
  final o = api.GoogleApiHttpBody();
  buildCounterGoogleApiHttpBody++;
  if (buildCounterGoogleApiHttpBody < 3) {
    o.contentType = 'foo';
    o.data = 'foo';
    o.extensions = buildUnnamed1();
  }
  buildCounterGoogleApiHttpBody--;
  return o;
}

void checkGoogleApiHttpBody(api.GoogleApiHttpBody o) {
  buildCounterGoogleApiHttpBody++;
  if (buildCounterGoogleApiHttpBody < 3) {
    unittest.expect(o.contentType!, unittest.equals('foo'));
    unittest.expect(o.data!, unittest.equals('foo'));
    checkUnnamed1(o.extensions!);
  }
  buildCounterGoogleApiHttpBody--;
}

core.int buildCounterGoogleCloudRecommendationengineV1beta1BigQuerySource = 0;
api.GoogleCloudRecommendationengineV1beta1BigQuerySource
buildGoogleCloudRecommendationengineV1beta1BigQuerySource() {
  final o = api.GoogleCloudRecommendationengineV1beta1BigQuerySource();
  buildCounterGoogleCloudRecommendationengineV1beta1BigQuerySource++;
  if (buildCounterGoogleCloudRecommendationengineV1beta1BigQuerySource < 3) {
    o.dataSchema = 'foo';
    o.datasetId = 'foo';
    o.gcsStagingDir = 'foo';
    o.projectId = 'foo';
    o.tableId = 'foo';
  }
  buildCounterGoogleCloudRecommendationengineV1beta1BigQuerySource--;
  return o;
}

void checkGoogleCloudRecommendationengineV1beta1BigQuerySource(
  api.GoogleCloudRecommendationengineV1beta1BigQuerySource o,
) {
  buildCounterGoogleCloudRecommendationengineV1beta1BigQuerySource++;
  if (buildCounterGoogleCloudRecommendationengineV1beta1BigQuerySource < 3) {
    unittest.expect(o.dataSchema!, unittest.equals('foo'));
    unittest.expect(o.datasetId!, unittest.equals('foo'));
    unittest.expect(o.gcsStagingDir!, unittest.equals('foo'));
    unittest.expect(o.projectId!, unittest.equals('foo'));
    unittest.expect(o.tableId!, unittest.equals('foo'));
  }
  buildCounterGoogleCloudRecommendationengineV1beta


me: "expected to be second",
    url: "",
    vote: 0,
    updatedAt: 0,
    createdAt: 1,
  },
  {
    uuid: "",
    name: "expected to be third",
    url: "",
    vote: 0,
    updatedAt: 0,
    createdAt: 1,
  },
  {
    uuid: "",
    name: "expected to be first",
    url: "",
    vote: 0,
    updatedAt: 0,
    createdAt: 2,
  },
];

const toBeSortedByVotesDesc: ItemSchema[] = [
  {
    uuid: "",
    name: "expected to be last",
    url: "",
    vote: 0,
    updatedAt: 0,
    createdAt: 0,
  },
  {
    uuid: "",
    name: "expected to be third",
    url: "",
    vote: 3,
    updatedAt: 1,
    createdAt: 0,
  },
  {
    uuid: "",
    name: "expected to be second",
    url: "",
    vote: 3,
    updatedAt: 2,
    createdAt: 0,
  },
  {
    uuid: "",
    name: "expected to be first",
    url: "",
    vote: 5,
    updatedAt: 0,
    createdAt: 0,
  },
];

const toBeSortedByVotesAsc: ItemSchema[] = [
  {
    uuid: "",
    name: "expected to be last",
    url: "",
    vote: 5,
    updatedAt: 0,
    createdAt: 0,
  },
  {
    uuid: "",
    name: "expected to be third",
    url: "",
    vote: 3,
    updatedAt: 1,
    createdAt: 0,
  },
  {
    uuid: "",
    name: "expected to be second",
    url: "",
    vote: 3,
    updatedAt: 2,
    createdAt: 0,
  },
  {
    uuid: "",
    name: "expected to be first",
    url: "",
    vote: 0,
    updatedAt: 0,
    createdAt: 0,
  },
];

test("Sorting by createdAt descending", () => {
  const compareFunction = compareFactory("createdAtDesc");

  const sortedArray = toBeSortedByCreatedAtDesc.sort(compareFunction);
  expect(sortedArray).toMatchObject([
    { name: "expected to be first" },
    { name: "expected to be second" },
    { name: "expected to be third" },
    { name: "expected to be last" },
  ]);
});

test("Sorting by votes descending", () => {
  const compareFunction = compareFactory("votesDesc");

  const sortedArray = toBeSortedByVotesDesc.sort(compareFunction);
  expect(sortedArray).toMatchObject([
    { name: "expected to be first" },
    { name: "expected to be second" },
    { name: "expected to be third" },
    { name: "expected to be last" },
  ]);
});

test("Sorting by votes descending", () => {
  const compareFunction = compareFactory("votesAsc");

  const sortedArray = toBeSortedByVotesAsc.sort(compareFunction);
  expect(sortedArray).toMatchObject([
    { name: "expected to be first" },
    { name: "expected to be second" },
    { name: "expected to be third" },
    { name: "expected to be last" },
  ]);
});
/**
 * 盾塔-等级：三级-类型1--   士兵小队
 */

class ShieldTower03_1 extends ShieldTowerBase {
    public constructor() {
        super();

        this.minRadius = 100;
        this.maxRadius = 140;
        this.ratioY = this.minRadius / this.maxRadius;

        this.addChild(Utiles.createBitmapByName("ShieldTower03_1"));

        this.soldierLife = 35;
        this.soldierDamage = 6;
    }
}import { readFileSync } from 'fs';

const parseOrbitMap = (filepath) => {
  const fileData = readFileSync(filepath, 'utf8').trim();
  const mapOfStrings = fileData.split('\n');
  const orbitMap = mapOfStrings.map((orbitString) => orbitString.split(')'));
  return orbitMap;
};

const sumArray = (arr) => arr.reduce((a, b) => a +


L28_2 = L24_2
    L25_2[1] = L26_2
    L25_2[2] = L27_2
    L25_2[3] = L28_2
    L21_2[3] = L25_2
    L26_2 = L20_2
    L25_2 = L20_2.f1B877572
    L25_2, L26_2, L27_2 = L25_2(L26_2)
    L28_2 = {}
    L29_2 = L25_2
    L30_2 = L26_2
    L31_2 = L27_2
    L28_2[1] = L29_2
    L28_2[2] = L30_2
    L28_2[3] = L31_2
    L21_2[2] = L28_2
    L29_2 = L20_2
    L28_2 = L20_2.fD34C0BB0
    L28_2 = L28_2(L29_2)
    L29_2 = L28_2
    L28_2 = L28_2.fE87F9A08
    L28_2 = L28_2(L29_2)
    L21_2[4] = L28_2
    L29_2 = L20_2
    L28_2 = L20_2.f39CFB448
    L28_2 = L28_2(L29_2)
    L21_2[5] = L28_2
    L29_2 = L20_2
    L28_2 = L20_2.f6F8C88BD
    L28_2 = L28_2(L29_2)
    L21_2[6] = L28_2
    L28_2 = c04846604
    L28_2 = L28_2.f1A30C15B
    L30_2 = L20_2
    L29_2 = L20_2.fC12793A5
    L29_2, L30_2, L31_2 = L29_2(L30_2)
    L28_2 = L28_2(L29_2, L30_2, L31_2)
    L21_2[7] = L28_2
    L29_2 = L20_2
    L28_2 = L20_2.f97CD3602
    L28_2 = L28_2(L29_2)
    L21_2[8] = L28_2
    L29_2 = L7_2
    L28_2 = L7_2.push
    L30_2 = L21_2
    L28_2(L29_2, L30_2)
  end
  return L7_2
end

L45_1.S9E7F9F1C6EB5BBB9 = L46_1
L45_1 = C06249860459C8E5A

function L46_1(A0_2, A1_2, A2_2, A3_2)
  local L4_2, L5_2, L6_2, L7_2, L8_2, L9_2, L10_2, L11_2, L12_2
  if nil == A3_2 then
    A3_2 = 1
  end
  L4_2 = C06249860459C8E5A
  L4_2 = L4_2.SA614A0FD7D5BC105
  L5_2 = A0_2
  L6_2 = A1_2
  L7_2 = A2_2
  L8_2 = L4_1
  L9_2 = L7_1
  L10_2 = 1
  L11_2 = 1
  L9_2 = L9_2(L10_2


       = 0x65,
  kVK_F11                       = 0x67,
  kVK_F13                       = 0x69,
  kVK_F16                       = 0x6A,
  kVK_F14                       = 0x6B,
  kVK_F10                       = 0x6D,
  kVK_F12                       = 0x6F,
  kVK_F15                       = 0x71,
  kVK_Help                      = 0x72,
  kVK_Home                      = 0x73,
  kVK_PageUp                    = 0x74,
  kVK_ForwardDelete             = 0x75,
  kVK_F4                        = 0x76,
  kVK_End                       = 0x77,
  kVK_F2                        = 0x78,
  kVK_PageDown                  = 0x79,
  kVK_F1                        = 0x7A,

  kVK_Reset                     = 0x7F, /* actually 7F7F */

  kVK_Insert                    = kVK_Help,

#if 0
  kVK_RightCommand              = 0x37,
  kVK_RightShift                = 0x7B,
  kVK_RightOption               = 0x7C,
  kVK_RightControl              = 0x7D,
#else
  kVK_RightCommand              = kVK_Command,
  kVK_RightShift                = kVK_Shift,
  kVK_RightOption               = kVK_Option,
  kVK_RightControl              = kVK_Control,
#endif

#if 0
/* Mac OS used a KMAP resource to remap ADB codes:
 * Control       36  -> 3B
 * Left Arrow    3B  -> 7B
 * Right Arrow   3C  -> 7C
 * Down Arrow    3D  -> 7D
 * Up Arrow      3E  -> 7E
 * Right Shift   7B* -> 3C
 * Right Option  7C* -> 3D
 * Right Control 7D* -> 3E
 *
 * Right shift/option/control only generate unique codes
 * when device handler ID in keyboard register 3 has a
 * value of $3 (as opposed to $2).
 *
 * See Guide to the Macintosh Family Hardware, ch 8, page 306-310
 *
 * KMAP also maps $7e to $36 ... ?
 *
 */

  kVK_RightCommand              = 0x36,
  kVK_RightShift                = 0x3C,
  kVK_RightOption               = 0x3D,
  kVK_RightControl              = 0x3E,

  kVK_LeftArrow                 = 0x7B,
  kVK_RightArrow                = 0x7C,
  kVK_DownArrow                 = 0x7D,
  kVK_UpArrow                   = 0x7E,

#endif

};

#endif


eous ui',
    (wt) async {
      await init(wt);
      await wt.tapAndSettle(find.outlinedButtonWithText(_sdk.title));
      await wt.tapAndSettle(find.startTourButton());

      await _checkContentTreeBuildsProperly(wt);
      await _checkHighlightsSelectedUnit(wt);
      await _checkRunCodeWorks(wt);
      await _checkResizeUnitContent(wt);
      await _checkSdkChanges(wt);

      expect(
        ExamplesLoader.failedToLoadExamples,
        isEmpty,
        reason: 'Failed to load some examples.',
      );
    },
  );
}

Future<void> _checkContentTreeBuildsProperly(WidgetTester wt) async {
  final modules = _getModules(wt);

  for (final module in modules) {
    await _checkParent(module, wt);
  }
}

List<ModuleModel> _getModules(WidgetTester wt) {
  final contentTreeCache = GetIt.instance.get<ContentTreeCache>();
  final contentTree = contentTreeCache.getContentTree(_sdk);
  return contentTree?.nodes ?? (throw Exception('Cannot load modules'));
}

Future<void> _checkParent(ParentNodeModel node, WidgetTester wt) async {
  if (!_getExpandedIds(wt).contains(node.id)) {
    await wt.ensureVisible(find.byKey(Key(node.id)));
    await wt.tapAndSettle(find.byKey(Key(node.id)));
  }

  for (final child in node.nodes) {
    if (child is UnitModel) {
      await _checkNode(child, wt);
    }
    if (child is ParentNodeModel) {
      await _checkParent(child, wt);
    }
  }
}

Future<void> _checkNode(UnitModel node, WidgetTester wt) async {
  final finder = find.byKey(Key(node.id));
  expect(finder, findsOneWidget, reason: node.id);

  await wt.ensureVisible(finder);
  expect(
    find.descendant(
      of: find.byType(ContentTreeBuilder),
      matching: find.text(node.title),
    ),
    findsAtLeastNWidgets(1),
  );

  await _checkUnitContentLoadsProperly(node, wt);
}

Future<void> _checkUnitContentLoadsProperly(
  UnitModel unit,
  WidgetTester wt,
) async {
  await wt.tapAndSettle(find.byKey(Key(unit.id)));

  final hasSnippet = _getTourNotifier(wt).isPlaygroundShown;

  expect(
    find.byType(PlaygroundWidget),
    hasSnippet ? findsOneWidget : findsNothing,
  );

  expect(
    find.descendant(
      of: find.byType(UnitContentWidget),
      matching: find.text(unit.title),
    ),
    findsAtLeastNWidgets(1),
  );
}

Future<void> _checkHighlightsSelectedUnit(WidgetTester wt) async {
  final controller = getContentTreeController(wt);
  final selectedUnit = controller.currentNode;

  if (selectedUnit == null) {
    fail('No unit selected');
  }

  final selectedUnitText = find.descendant(
    of: find.byKey(Key(selectedUnit.id)),
    matching: find.text(selectedUnit.title),
    skipOffstage: false,
  );

  final selectedUnitContainer = find.ancestor(
    of: selectedUnitText,
    matching: find.byKey(UnitWidget.containerKey),
  );

  final context = wt.element(selectedUnitText);

  expect(
    (wt.widget<Container>(selectedUnitContainer).decoration as BoxDecoration?)
        ?.color,
    Theme.of(context).selectedRowColor,
  );
}

Future<void> _checkRunCodeWorks(WidgetTester wt) async {
  const text = 'OK';
  const code = '''
public class MyClass {
  public static void main(String[] args) {
    System.out.print("$text");
  }
}
''';

  await _selectUnitWithSnippet(wt);
  await wt.p


e CodeReview interface.
func (gc *gerritCodeReview) GetRepoUrl(ci *gerrit.ChangeInfo) string {
	return gc.gerritClient.GetRepoUrl() + "/" + ci.Project
}

// GetCQVoters implements the CodeReview interface.
func (gc *gerritCodeReview) GetCQVoters(ctx context.Context, ci *gerrit.ChangeInfo) []string {
	// Find which CQ label value we are looking for.
	labelValue := gerrit.LabelCommitQueueDryRun
	if gc.IsCQ(ctx, ci) {
		labelValue = gerrit.LabelCommitQueueSubmit
	}

	// Fing all voters of the CQ label value.
	voters := []string{}
	if val, ok := ci.Labels[gerrit.LabelCommitQueue]; ok {
		for _, ld := range val.All {
			if ld.Value == labelValue {
				voters = append(voters, ld.Email)
			}
		}
	}
	return voters
}
package try

import (
	"bytes"
	"context"
	"encoding/json"
	"fmt"
	"os"
	"path"
	"path/filepath"
	"regexp"
	"sort"
	"strconv"
	"strings"

	"github.com/urfave/cli/v2"
	"golang.org/x/oauth2/google"

	"go.skia.org/infra/go/auth"
	"go.skia.org/infra/go/common"
	"go.skia.org/infra/go/exec"
	"go.skia.org/infra/go/gerrit"
	"go.skia.org/infra/go/git"
	"go.skia.org/infra/go/git/git_common"
	"go.skia.org/infra/go/gitiles"
	"go.skia.org/infra/go/httputils"
	"go.skia.org/infra/go/skerr"
	"go.skia.org/infra/go/supported_branches"
	"go.skia.org/infra/go/util"
	"go.skia.org/infra/go/vfs"
	gitiles_vfs "go.skia.org/infra/go/vfs/gitiles"
	"go.skia.org/infra/sk/go/relnotes"
	"go.skia.org/infra/task_scheduler/go/specs"
)

const (
	chromeBranchTmpl  = "chrome/m%s"
	flutterBranchTmpl = "flutter/%s.%s"

	flagReviewers                = "reviewer"
	flagAllowEmptyCLs            = "allow-empty"
	gerritProject                = "skia"
	milestoneFile                = "include/core/SkMilestone.h"
	milestoneTmpl                = "#define SK_MILESTONE %s"
	supportedChromeBranches      = 4
	supportedFlutterBranches     = 2
	updateMilestoneCommitMsgTmpl = "Update Skia milestone to %d"
	jobsJSONFile                 = "infra/bots/jobs.json"
	tasksJSONFile                = "infra/bots/tasks.json"
	cqJSONFile                   = "infra/skcq.json"
	releaseNotesFile             = "RELEASE_NOTES.md"
	releaseNotesDir              = "relnotes"
)

var (
	chromeBranchMilestoneRegex = regexp.MustCompile(fmt.Sprintf(chromeBranchTmpl, `(\d+)`))
	flutterBranchVersionRegex  = regexp.MustCompile(fmt.Sprintf(flutterBranchTmpl, `(\d+)`, `(\d+)`))
	milestoneRegex             = regexp.MustCompile(fmt.Sprintf(milestoneTmpl, `(\d+)`))

	excludeTrybotsOnReleaseBranches = []*regexp.Regexp{
		regexp.MustCompile(".*CanvasKit.*"),
		regexp.MustCompile(".*PathKit.*"),
	}

	jobsJSONReplaceRegex    = regexp.MustCompile(`(?m)\{\n\s*"name":\s*"(\S+)",\n\s*"cq_config":\s*null\n\s*}`)
	jobsJSONReplaceContents = []byte(`{"name": "$1"}`)

	// new


ньше чем 1500: 443 шт.

Поиск оборота. На 4-й день (2025-01-30) из 10 оборот по бумаге RU000A1065M8 меньше чем 1500: 537 шт.

Поиск оборота. На 5-й день (2025-01-31) из 10 оборот по бумаге RU000A1065M8 меньше чем 1500: 217 шт.

Поиск оборота. На 6-й день (2025-02-03) из 10 оборот по бумаге RU000A1065M8 меньше чем 1500: 761 шт.

Поиск оборота. На 7-й день (2025-02-04) из 10 оборот по бумаге RU000A1065M8 меньше чем 1500: 661 шт.

Поиск оборота. На 8-й день (2025-02-05) из 10 оборот по бумаге RU000A1065M8 меньше чем 1500: 33 шт.

Поиск оборота. На 9-й день (2025-02-06) из 10 оборот по бумаге RU000A1065M8 меньше чем 1500: 551 шт.

Поиск оборота. На 10-й день (2025-02-07) из 10 оборот по бумаге RU000A1065M8 меньше чем 1500: 23 шт.

Поиск оборота. Итоговый оборот в бумагах (объем сделок, шт) за 10 дней: 3267 шт нарастающим итогом.

Облигация АйДи Коллект 03 (RU000A1065M8) в выборку не попадает из-за малых оборотов или доступно мало торговых дней.

Строка 1350 из 2447: ДОМ.РФ Ипотечный агент БО 1P33 (RU000A1065R7): цена=76.96%, доходность=0%, дюрация=0 мес.

Строка 1351 из 2447: МегаФон ПАО БО-002P-03 (RU000A1065S5): цена=98%, доходность=21.51%, дюрация=2.36 мес.

Строка 1352 из 2447: Агротек БО-02 (RU000A1065Y3): цена=80.8%, доходность=30.58%, дюрация=21.4 мес.

Строка 1353 из 2447: Минфин Ульяновской обл. 34005 (RU000A106607): цена=87.23%, доходность=22.3%, дюрация=15.83 мес.

Поиск оборота. Ссылка: https://iss.moex.com/iss/history/engines/stock/markets/bonds/boards/TQCB/securities/RU000A106607.json?iss.meta=off&iss.only=history&history.columns=SECID,TRADEDATE,VOLUME,NUMTRADES&limit=20&from=2025-


"y": 23, "v": "Xp-6d", "Subtypes": "Connectivity", "colors": "#4fff00"}, {"x": 33, "y": 25, "v": "Xp-5d", "Subtypes": "Connectivity", "colors": "#4fff00"}, {"x": 34, "y": 9, "v": "Xp-1dv", "Subtypes": "Connectivity", "colors": "#4fff00"}, {"x": 34, "y": 13, "v": "Xp-1d", "Subtypes": "Connectivity", "colors": "#4fff00"}, {"x": 34, "y": 17, "v": "Xp-2d", "Subtypes": "Connectivity", "colors": "#4fff00"}, {"x": 34, "y": 20, "v": "Xp-3d", "Subtypes": "Connectivity", "colors": "#4fff00"}, {"x": 35, "y": 9, "v": "Xp-0dv", "Subtypes": "Connectivity", "colors": "#4fff00"}], "type": "heatmap", "color": "#4fff00", "name": "Connectivity"}, {"data": [{"x": 2, "y": 27, "v": "PositiveCharges", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 3, "y": 25, "v": "NegativeCharges", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 4, "y": 15, "v": "NumAcyclicOxygenAtoms", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 4, "y": 16, "v": "NumHydrogenBondAcceptorSites", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 5, "y": 17, "v": "NumHydrogenBondAcceptorAtoms", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 6, "y": 13, "v": "NumAcyclicDoubleBonds", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 7, "y": 13, "v": "AcyclicTrivalentNodes", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 7, "y": 15, "v": "NumHydrogenBondDonorAtoms", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 7, "y": 16, "v": "NumAmideBonds", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 7, "y": 17, "v": "AcyclicSingleValentNodes", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 7, "y": 18, "v": "NumHeteroAtoms", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 7, "y": 21, "v": "NumFluorineAtoms", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 8, "y": 13, "v": "NumHydrogenBondDonorSites", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 8, "y": 22, "v": "NumHalogenAtoms", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 9, "y": 19, "v": "AcyclicTetravalentNodes", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 10, "y": 15, "v": "NumAcyclicNitrogenAtoms", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 14, "y": 3, "v": "NumAcyclicTripleBonds", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 16, "y": 25, "v": "NumChlorineAtoms", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 18, "y": 29, "v": "NumBromineAtoms", "Subtypes": "Constitution", "colors": "#ffd500"}, {"x": 20, "y": 2, "v": "NumCyclicTripleBonds", "Subtypes": "Con


构建机")
    fun deleteDispatchDocker(
        @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_DEVOPS_USER_ID_DEFAULT_VALUE)
        @HeaderParam(AUTH_HEADER_DEVOPS_USER_ID)
        userId: String,
        @Parameter(description = "服务ID", required = true)
        @PathParam("dockerIp")
        dockerIp: String
    ): Result<Boolean>

    @DELETE
    @Path("/dockerBuildBinding/delete/{pipelineId}/{vmSeqId}")
    @Operation(summary = "删除Docker构建绑定关系")
    fun removeDockerBuildBinding(
        @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_DEVOPS_USER_ID_DEFAULT_VALUE)
        @HeaderParam(AUTH_HEADER_DEVOPS_USER_ID)
        userId: String,
        @Parameter(description = "流水线ID", required = true)
        @PathParam("pipelineId")
        pipelineId: String,
        @Parameter(description = "构建序列号", required = true)
        @PathParam("vmSeqId")
        vmSeqId: String
    ): Result<Boolean>

    @GET
    @Path("/load-config/list")
    @Operation(summary = "获取Docker构建机负载配置")
    fun getDockerHostLoadConfig(
        @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_DEVOPS_USER_ID_DEFAULT_VALUE)
        @HeaderParam(AUTH_HEADER_DEVOPS_USER_ID)
        userId: String
    ): Result<Map<String, DockerHostLoadConfig>>

    @POST
    @Path("/load-config/add")
    @Operation(summary = "新增Docker构建机负载配置")
    fun createDockerHostLoadConfig(
        @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_DEVOPS_USER_ID_DEFAULT_VALUE)
        @HeaderParam(AUTH_HEADER_DEVOPS_USER_ID)
        userId: String,
        @Parameter(description = "创建IDC构建机所需信息", required = true)
        dockerHostLoadConfigMap: Map<String, DockerHostLoadConfig>
    ): Result<Boolean>

    @GET
    @Path("/docker/threshold/list")
    @Operation(summary = "获取docker漂移负载阈值")
    fun getDockerDriftThreshold(
        @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_DEVOPS_USER_ID_DEFAULT_VALUE)
        @HeaderParam(AUTH_HEADER_DEVOPS_USER_ID)
        userId: String
    ): Result<Map<String, String>>

    @POST
    @Path("/docker/threshold/update")
    @Operation(summary = "更新docker漂移负载阈值")
    fun updateDockerDriftThreshold(
        @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_DEVOPS_USER_ID_DEFAULT_VALUE)
        @HeaderParam(AUTH_HEADER_DEVOPS_USER_ID)
        userId: String,
        @Parameter(description = "阈值", required = true)
        hostDriftLoad: HostDriftLoad
    ): Result<Boolean>
}
/*
 * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
 *
 * Copyright (C) 2019 Tencent.  All rights reserved.
 *
 * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
 *
 * A copy of the MIT License is included in this file.
 *
 *
 * Terms of the MIT License:
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subjec


pt-xks-proxy">external
  /// key store proxy uses to refer to the external key. For help, see the
  /// documentation for your external key store proxy.
  ///
  /// This parameter is required for a KMS key with an Origin value
  /// of EXTERNAL_KEY_STORE. It is not valid for KMS keys with any
  /// other Origin value.
  ///
  /// The external key must be an existing 256-bit AES symmetric encryption key
  /// hosted outside of Amazon Web Services in an external key manager
  /// associated with the external key store specified by the
  /// CustomKeyStoreId parameter. This key must be enabled and
  /// configured to perform encryption and decryption. Each KMS key in an
  /// external key store must use a different external key. For details, see Requirements
  /// for a KMS key in an external key store in the Key Management
  /// Service Developer Guide.
  ///
  /// Each KMS key in an external key store is associated two backing keys. One
  /// is key material that KMS generates. The other is the external key
  /// specified by this parameter. When you use the KMS key in an external key
  /// store to encrypt data, the encryption operation is performed first by KMS
  /// using the KMS key material, and then by the external key manager using the
  /// specified external key, a process known as double encryption. For
  /// details, see Double
  /// encryption in the Key Management Service Developer Guide.
  Future<CreateKeyResponse> createKey({
    bool? bypassPolicyLockoutSafetyCheck,
    String? customKeyStoreId,
    CustomerMasterKeySpec? customerMasterKeySpec,
    String? description,
    KeySpec? keySpec,
    KeyUsageType? keyUsage,
    bool? multiRegion,
    OriginType? origin,
    String? policy,
    List<Tag>? tags,
    String? xksKeyId,
  }) async {
    final headers = <String, String>{
      'Content-Type': 'application/x-amz-json-1.1',
      'X-Amz-Target': 'TrentService.CreateKey'
    };
    final jsonResponse = await _protocol.send(
      method: 'POST',
      requestUri: '/',
      exceptionFnMap: _exceptionFns,
      // TODO queryParams
      headers: headers,
      payload: {
        if (bypassPolicyLockoutSafetyCheck != null)
          'BypassPolicyLockoutSafetyCheck': bypassPolicyLockoutSafetyCheck,
        if (customKeyStoreId != null) 'CustomKeyStoreId': customKeyStoreId,
        if (customerMasterKeySpec != null)
          'CustomerMasterKeySpec': customerMasterKeySpec.value,
        if (description != null) 'Description': description,
        if (keySpec != null) 'KeySpec': keySpec.value,
        if (keyUsage != null) 'KeyUsage': keyUsage.value,
        if (multiRegion != null) 'MultiRegion': multiRegion,
        if (origin != null) 'Origin': origin.value,
        if (policy != null) 'Policy': policy,
        if (tags != null) 'Tags': tags,
        if (xksKeyId != null) 'XksKeyId': xksKeyId,
      },
    );

    return CreateKeyResponse.fromJson(jsonResponse.body);
  }

  /// Decrypts ciphertext that was encrypted by a KMS key using any of the
  /// following operations:
  ///
  ///

  ///

  /// Encrypt
  ///

  ///

  /// GenerateDataKey


3VUVrAh4g/J3DeCbeAR2misyt6R+rqq/LDHL64xfa4JvqEAOYBzf0NsVoqW/lvCAafy7tCUrC/KqVzv2Ocf0P8L8AAGNbD56e7lRwAAAAASUVORK5CYII=);padding-left: 50px;
	line-height: 40px
}

div.fw-footer p {
	clear: both
}

div.fw-footer a {
	color: #ccc;
	text-decoration: underline
}

div.fw-footer div.copyright {
	position: relative;
	text-align: right;
	padding: 1em 0;
	max-width: 1140px;
	margin: 0 auto;
	line-height: 1.8em;
	z-index: 1
}

div.fw-footer div.skew {
	background: #363d46;
	height: 70px;
	transform: skew(0, -1.5deg);
	transform-origin: top right;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	box-shadow: inset 0 3px 10px rgba(0,0,0,0.1)
}

div.fw-footer div.skew-bg {
	position: absolute;
	top: 70px;
	bottom: 0;
	left: 0;
	right: 0;
	background: #363d46
}

body.wide div.fw-body {
	width: 80%;
	float: right
}

body.wide div.fw-page-nav {
	display: none
}

div.mobile-show {
	display: none
}

@media only screen and (max-width: 1070px) {
	div.fw-container div.fw-header div.nav-search input {
		width: 150px
	}

	div.fw-footer div.copyright {
		padding-right: 1em
	}
}

@media only screen and (max-width: 959px) {
	div.fw-container div.fw-body {
		width: 80%
	}

	div.fw-container div.fw-page-nav {
		display: none
	}

	div.fw-container div.fw-header div.nav-item.i-manual,div.fw-container div.fw-header div.nav-item.i-download {
		display: none !important
	}
}

@media only screen and (max-width: 860px) {
	div.fw-hero h1 br {
		content: ' '
	}

	div.fw-hero h1 br:after {
		display: inline-block;
		content: ' ';
		white-space: pre
	}

	div.fw-hero div.grid .w-1-3 {
		display: none
	}

	div.fw-hero div.grid .w-2-3 {
		width: 100%
	}

	div.index-features div.feature {
		width:


s" (i.e., we are using `estimatedItemSize` for the underlying
		//		UICollectionView, rather than setting `itemSize` or using `sizeForItemAtIndexPath`.)
		// 4. The item has never appeared on screen before

		// This may be an iOS bug.

		// To work around this, we check below for the right conditions and, it they are met, we simply call
		// ScrollToItem twice. The first time gets us close to the correct offset, the second time gets us all the way
		// there. If the scroll is _not_ animated, we can simply call it twice in a row; if it's animated, then we
		// have to wait for the first scroll to finish before calling the second one (`SetScrollAnimationEndedCallback`).

		protected override void ScrollToRequested(object sender, ScrollToRequestEventArgs args)
		{
			if (WillNeedScrollAdjustment(args))
			{
				if (args.IsAnimated)
				{
					Controller.SetScrollAnimationEndedCallback(() => base.ScrollToRequested(sender, args));
				}
				else
				{
					base.ScrollToRequested(sender, args);
				}
			}

			base.ScrollToRequested(sender, args);
		}

		bool WillNeedScrollAdjustment(ScrollToRequestEventArgs args)
		{
			return ItemsView.ItemSizingStrategy == ItemSizingStrategy.MeasureAllItems
				&& ItemsView.IsGrouped
				&& (args.ScrollToPosition == ScrollToPosition.End || args.ScrollToPosition == ScrollToPosition.MakeVisible);
		}
	}
}


// Copyright (c) 1997-2010
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
// and Tel-Aviv University (Israel).  All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL: https://github.com/CGAL/cgal/blob/v5.6.1/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_do_intersect.h $
// $Id: Plane_3_Ray_3_do_intersect.h 3a4e230 2022-11-22T12:22:42+01:00 Mael Rouxel-Labbé
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s)     : Geert-Jan Giezeman <geert@cs.uu.nl>

#ifndef CGAL_INTERNAL_INTERSECTIONS_3_PLANE_3_RAY_3_DO_INTERSECT_H
#define CGAL_INTERNAL_INTERSECTIONS_3_PLANE_3_RAY_3_DO_INTERSECT_H

#include <CGAL/enum.h>
#include <CGAL/number_utils.h>

namespace CGAL {
namespace Intersections {
namespace internal {

template <class K>
typename K::Boolean
do_intersect(const typename K::Plane_3& plane,
             const typename K::Ray_3& ray,
             const K& k)
{
  typename K::Oriented_side_3 oriented_side_3 = k.oriented_side_3_object();
  CGAL::Oriented_side os = oriented_side_3(plane, ray.source());
  if(os == ON_ORIENTED_BOUNDARY)
    return true;

  return (sign(ray.to_vector()* plane.orthogonal_vector()) * os == -1);
}

template <class K>
inline
typename K::Boolean
do_intersect(const typename K::Ray_3& ray,
             const typename K::Plane_3& plane,
             const K& k)
{
  return do_intersect(plane, ray, k);
}

} // namespace internal
} // namespace Intersections
} // namespace CGAL

#endif // CGAL_INTERNAL_INTERSECTIONS_3_PLANE_3_RAY_3_DO_INTERSECT_H


%xmm5,%xmm5
	leaq	48(%rsi),%rsi
	jmp	L$cbc_dec_tail_collected

.p2align	4
L$cbc_dec_clear_tail_collected:
	pxor	%xmm3,%xmm3
	pxor	%xmm4,%xmm4
	pxor	%xmm5,%xmm5
	pxor	%xmm6,%xmm6
	pxor	%xmm7,%xmm7
	pxor	%xmm8,%xmm8
	pxor	%xmm9,%xmm9
L$cbc_dec_tail_collected:
	movups	%xmm10,(%r8)
	andq	$15,%rdx
	jnz	L$cbc_dec_tail_partial
	movups	%xmm2,(%rsi)
	pxor	%xmm2,%xmm2
	jmp	L$cbc_dec_ret
.p2align	4
L$cbc_dec_tail_partial:
	movaps	%xmm2,(%rsp)
	pxor	%xmm2,%xmm2
	movq	$16,%rcx
	movq	%rsi,%rdi
	subq	%rdx,%rcx
	leaq	(%rsp),%rsi
.long	0x9066A4F3
	movdqa	%xmm2,(%rsp)

L$cbc_dec_ret:
	xorps	%xmm0,%xmm0
	pxor	%xmm1,%xmm1
	movq	-8(%r11),%rbp

	leaq	(%r11),%rsp

L$cbc_ret:
	.byte	0xf3,0xc3

.globl	_aes_hw_set_decrypt_key
.private_extern _aes_hw_set_decrypt_key

.p2align	4
_aes_hw_set_decrypt_key:

.byte	0x48,0x83,0xEC,0x08

	call	__aesni_set_encrypt_key
	shll	$4,%esi
	testl	%eax,%eax
	jnz	L$dec_key_ret
	leaq	16(%rdx,%rsi,1),%rdi

	movups	(%rdx),%xmm0
	movups	(%rdi),%xmm1
	movups	%xmm0,(%rdi)
	movups	%xmm1,(%rdx)
	leaq	16(%rdx),%rdx
	leaq	-16(%rdi),%rdi

L$dec_key_inverse:
	movups	(%rdx),%xmm0
	movups	(%rdi),%xmm1
.byte	102,15,56,219,192
.byte	102,15,56,219,201
	leaq	16(%rdx),%rdx
	leaq	-16(%rdi),%rdi
	movups	%xmm0,16(%rdi)
	movups	%xmm1,-16(%rdx)
	cmpq	%rdx,%rdi
	ja	L$dec_key_inverse

	movups	(%rdx),%xmm0
.byte	102,15,56,219,192
	pxor	%xmm1,%xmm1
	movups	%xmm0,(%rdi)
	pxor	%xmm0,%xmm0
L$dec_key_ret:
	addq	$8,%rsp

	.byte	0xf3,0xc3

L$SEH_end_set_decrypt_key:

.globl	_aes_hw_set_encrypt_key
.private_extern _aes_hw_set_encrypt_key

.p2align	4
_aes_hw_set_encrypt_key:
__aesni_set_encrypt_key:

#ifdef BORINGSSL_DISPATCH_TEST
	movb	$1,_BORINGSSL_function_hit+3(%rip)
#endif
.byte	0x48,0x83,0xEC,0x08

	movq	$-1,%rax
	t


AlphaUpdate
/* 803461D0 00343110  38 60 00 01 */	li r3, 1
/* 803461D4 00343114  38 80 00 00 */	li r4, 0
/* 803461D8 00343118  4B DA 31 15 */	bl GXSetDstAlpha
/* 803461DC 0034311C  C0 7E 00 28 */	lfs f3, 0x28(r30)
/* 803461E0 00343120  7F E3 FB 78 */	mr r3, r31
/* 803461E4 00343124  C0 5E 00 20 */	lfs f2, 0x20(r30)
/* 803461E8 00343128  38 9E 00 80 */	addi r4, r30, 0x80
/* 803461EC 0034312C  C0 3E 00 2C */	lfs f1, 0x2c(r30)
/* 803461F0 00343130  38 A1 00 08 */	addi r5, r1, 8
/* 803461F4 00343134  C0 1E 00 24 */	lfs f0, 0x24(r30)
/* 803461F8 00343138  EC 43 10 28 */	fsubs f2, f3, f2
/* 803461FC 0034313C  EC 01 00 28 */	fsubs f0, f1, f0
/* 80346200 00343140  EF BE 10 2A */	fadds f29, f30, f2
/* 80346204 00343144  EF 9F 00 2A */	fadds f28, f31, f0
/* 80346208 00343148  4B DA 40 F9 */	bl PSMTXConcat
/* 8034620C 0034314C  38 61 00 08 */	addi r3, r1, 8
/* 80346210 00343150  38 80 00 00 */	li r4, 0
/* 80346214 00343154  4B DA 33 65 */	bl GXLoadPosMtxImm
/* 80346218 00343158  38 60 00 80 */	li r3, 0x80
/* 8034621C 0034315C  38 80 00 00 */	li r4, 0
/* 80346220 00343160  38 A0 00 04 */	li r5, 4
/* 80346224 00343164  4B D9 F7 65 */	bl GXBegin
/* 80346228 00343168  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 8034622C 0034316C  C0 02 FE F8 */	lfs f0, lbl_8051E258@sda21(r2)
/* 80346230 00343170  D3 C5 80 00 */	stfs f30, 0xCC008000@l(r5)
/* 80346234 00343174  38 60 00 00 */	li r3, 0
/* 80346238 00343178  38 80 00 00 */	li r4, 0
/* 8034623C 0034317C  D3 E5 80 00 */	stfs f31, 0xCC008000@l(r5)
/* 80346240 00343180  D0 05 80 00 */	stfs f0, 0xCC008000@l(r5)
/* 80346244 00343184  D3 A5 80 00 */	stfs f29, 0xCC008000@l(r5)
/* 80346248 00343188  D3 E5 80 00 */	stfs f31, 0xCC008000@l(r5)
/* 8034624C 0034318C  D0 05 80 00 */	stfs f0, 0xCC008000@l(r5)
/* 80346250 00343190  D3 A5 80 00 */	stfs f29, 0xCC008000@l(r5)
/* 80346254 00343194  D3 85 80 00 */	stfs f28, 0xCC008000@l(r5)
/* 80346258 00343198  D0 05 80 00 */


hud.Marks[i]:IsValid() then
						hud.Marks[i]:RemoveCallOnRemove("EGP HUD unlink on remove")
					end
				end
			end
			vehiclelinks[hud] = nil
			hud.LinkedVehicles = nil
			hud.Marks = nil
		else
			if vehiclelinks[hud] then
				local bool = vehiclelinks[hud][vehicle]
				if bool then
					if vehicle:IsValid() then
						vehicle:RemoveCallOnRemove("EGP HUD unlink on remove")
						if vehicle:GetDriver() and vehicle:GetDriver():IsValid() then
							EGPHudConnect(hud, false, vehicle:GetDriver())
						end
					end
				end

				if hud.Marks then
					for i = 1, #hud.Marks do
						if hud.Marks[i] == vehicle then
							table.remove(hud.Marks, i)
							break
						end
					end
				end

				hud.LinkedVehicles


128-120(%rsi),%xmm0
        pxor    %xmm12,%xmm12

.byte   102,15,56,220,209
        pcmpgtd %xmm12,%xmm11
        movdqu  -120(%rsi),%xmm12
.byte   102,15,56,220,217
        paddd   %xmm11,%xmm10
        movdqa  %xmm10,32(%rsp)
.byte   102,15,56,220,225
.byte   102,15,56,220,233
        movups  144-120(%rsi),%xmm1

        cmpl    $11,%eax

.byte   102,15,56,220,208
.byte   102,15,56,220,216
.byte   102,15,56,220,224
.byte   102,15,56,220,232
        movups  160-120(%rsi),%xmm0

        jb      .Lenc4x_tail

.byte   102,15,56,220,209
.byte   102,15,56,220,217
.byte   102,15,56,220,225
.byte   102,15,56,220,233
        movups  176-120(%rsi),%xmm1

.byte   102,15,56,220,208
.byte   102,15,56,220,216
.byte   102,15,56,220,224
.byte   102,15,56,220,232
        movups  192-120(%rsi),%xmm0

        je      .Lenc4x_tail

.byte   102,15,56,220,209
.byte   102,15,56,220,217
.byte   102,15,56,220,225
.byte   102,15,56,220,233
        movups  208-120(%rsi),%xmm1

.byte   102,15,56,220,208
.byte   102,15,56,220,216
.byte   102,15,56,220,224
.byte   102,15,56,220,232
        movups  224-120(%rsi),%xmm0
        jmp     .Lenc4x_tail

.align  32
.Lenc4x_tail:
.byte   102,15,56,220,209
.byte   102,15,56,220,217
.byte   102,15,56,220,225
.byte   102,15,56,220,233
        movdqu  (%r8,%rbx,1),%xmm6
        movdqu  16-120(%rsi),%xmm1

.byte   102,15,56,221,208
        movdqu  (%r9,%rbx,1),%xmm7
        pxor    %xmm12,%xmm6
.byte   102,15,56,221,216
        movdqu  (%r10,%rbx,1),%xmm8
        pxor    %xmm12,%xmm7
.byte   102,15,56,221,224
        movdqu  (%r11,%rbx,1),%xmm9
        pxor    %xmm12,%xmm8
.byte   102,15,56,221,232
        movdqu  32-120(%rsi),%xmm0
        pxor    %xmm12,%xmm9

        movups  %xmm2,-16(%r12,%rbx,1)
        pxor    %xmm6,%xmm2
        movups  %xmm3,-16(%r13,%rbx,1)
        pxor    %xmm7,%xmm3
        movups  %xmm4,-16(%r14,%rbx,1)
        pxor    %xmm8,%xmm4
        movups  %xmm5,-16(%r15,%rbx,1)
        pxor    %xmm9,%xmm5

        decl    %edx
        jnz     .Loop_enc4x

        movq    16(%rsp),%rax
.cfi_def_cfa    %rax,8
        movl    24(%rsp),%edx

        leaq    160(%rdi),%rdi
        decl    %edx
        jnz     .Lenc4x_loop_grande


* @returns Promise of returned csv lines
   */
  collectLines(): Promise<Array<string>>
}
import { playSong } from './synth.ts'
import { drawPath } from './animation.ts'
import { generateSong, Note, Voice } from './music.ts'

// Game State
let hardDifficulty: boolean = null
let responding: boolean = false
let response = []
let sequence: any = []

function initialize () {
  // Keyboard outline.
  Array
    .from({ length: 24 }, (_, key) => key)
    .map(x => `#_${x + 60}`)
    .forEach((selector, index) => {
      setTimeout(() => {
        const key: HTMLElement = document.querySelector(selector)
        key.style.opacity = '1'
        drawPath(
          selector,
          { start: 0, end: 0 },
          { start: 0, end: 1 },
          200
        )
      }, 100 * index)
    })

  // Fill in black keys.
  const blackKeys = document.getElementById('Black').children
  for (let i = 0; i < blackKeys.length; i++) {
    setTimeout(() => {
      (blackKeys[i] as any).style.fill = 'black'
    }, 1000 + 200 * i)
  }

  const logoLetters = document.getElementById('Logo').children
  for (let i = 0; i < logoLetters.length; i++) {
    // Show Songbirds logo.
    setTimeout(() => {
      (logoLetters[i] as any).style.opacity = '1'
    }, 2000 + 100 * i)
    //  Hide Songbirds logo.
    setTimeout(() => {
      (logoLetters[i] as any).style.opacity = '0'
    }, 4000 + 50 * i)
  }

  // Show menu.
  setTimeout(() => {
    document.getElementById('Easy').style.opacity = '1'
    document.getElementById('Hard').style.opacity = '1'
    document.getElementById('Bird1').style.opacity = '1'
    document.getElementById('Bird2').style.opacity = '1'

    document.getElementById('Easy').addEventListener('click', () => { selectDifficulty('easy') })
    document.getElementById('Hard').addEventListener('click', () => { selectDifficulty('hard') })
  }, 4500)
}

function selectDifficulty (difficulty: string) {
  alert('MUAHAHAHAHAHA! There is actually only one difficulty mode: EXPERT. Only those with perfect pitch may attract the lovebirds! (Yeah... I procrastinated too long. Didn\'t have the time to highlight the notes when they are played.)')
  hardDifficulty = (difficulty === 'hard')
  document.getElementById('Easy').style.opacity = '0'
  document.getElementById('Hard').style.opacity = '0'
  setInterval(() => {
    document.getElementById('Easy').style.display = 'none'
    document.getElementById('Hard').style.display = 'none'
  }, 1000)

  // Add event listeners to keys
  const blackKeys = document.getElementById('Black').children
  for (let i = 0; i < blackKeys.length; i++) {
    blackKeys[i].addEventListener('click', handleKeyClick);
    (blackKeys[i] as any).style.transition = 'none'
  }
  const whiteKeys = document.getElementById('White').children
  for (let i = 0; i < whiteKeys.length; i++) {
    whiteKeys[i].addEventListener('click', handleKeyClick);
    (whiteKeys[i] as any).style.transition = 'none'
  }

  // Enter game loop.
  gameLoop()
}

function gameLoop () {
  const song: any = generateSong()
  sequence = song[0].flat().map((n: Note) => n.midiNumber)
  playSong(song)
  setTimeout(() => {
    alert('Your turn. Repeat what you heard.')
    responding = true
  }, 8000)
}

function handleKeyClick (event: any) {
  if (respondin


using Microsoft.CodeAnalysis.Diagnostics;

namespace MapTo.Configuration;

/// <summary>
/// Represents the analyzer configuration options for the MapTo generator.
/// </summary>
/// <param name="MapMethodPrefix">The generated mapping extension method suffix.</param>
/// <param name="MapExtensionClassSuffix">The generated mapping extension class suffix.</param>
/// <param name="ReferenceHandling">Indicates whether to use reference handling.</param>
/// <param name="CopyPrimitiveArrays">Indicates whether to copy object and primitive type arrays into a new array.</param>
/// <param name="NullHandling">Indicates how to handle null properties.</param>
/// <param name="EnumMappingStrategy">Indicates the strategy to use when mapping enum values.</param>
/// <param name="StrictEnumMapping">Indicates how strict the enum mapping should be.</param>
/// <param name="ProjectionType">Indicates the type of projection mappings to generate.</param>
/// <param name="SuppressXmlDocWarnings">Indicates whether to suppress XML doc warnings.</param>
/// <param name="GenerateFullExtensionClassNames">Indicates whether to use target namespace for the generated extension class name.</param>
internal readonly record struct CodeGeneratorOptions(
    string MapMethodPrefix = "MapTo",
    string MapExtensionClassSuffix = "MapToExtensions",
    ReferenceHandling ReferenceHandling = ReferenceHandling.Disabled,
    bool CopyPrimitiveArrays = false,
    NullHandling NullHandling = NullHandling.Auto,
    EnumMappingStrategy EnumMappingStrategy = EnumMappingStrategy.ByValue,
    StrictEnumMapping StrictEnumMapping = StrictEnumMapping.Off,
    ProjectionType ProjectionType = ProjectionType.Array | ProjectionType.IEnumerable | ProjectionType.List,
    bool SuppressXmlDocWarnings = true,
    bool GenerateFullExtensionClassNames = false)
{
    /// <summary>
    /// The prefix of the property name in the .editorconfig file.
    /// </summary>
    internal const string GlobalBu


cks() {
        Some(s) => {
            println!("{}", s);
            std::process::exit(1);
        }
        None => (),
    }

    if matches.is_present("new") {
        otpc::modes::run_new();
        return;
    } else if matches.is_present("list") {
        otpc::modes::run_list();
        return;
    } else if matches.is_present("remove") {
        match matches.value_of("remove") {
            Some(label) => otpc::modes::run_remove(&String::from(label)),
            None => {
                eprintln!("A value is required to remove an item.");
                std::process::exit(1);
            }
        }

        return;
    } else if matches.is_present("code") {
        match matches.value_of("code") {
            Some(label) => otpc::modes::run_display_code(&String::from(label)),
            None => {
                eprintln!("A value is required to show the code of an item.");
                std::process::exit(1);
            }
        }

        return;
    } else if cfg!(feature = "interactive") {
        if matches.is_present("interactive") {
            #[cfg(feature = "interactive")]
            otpc::modes::run_interactive();
        }

        return;
    }
}
pub mod address_converter;
pub mod gfx_viewer;
pub mod palette_viewer;
pub mod rom_info;
//! Trade history inserts

extern crate chrono;

extern crate trade_history;
extern crate common;

use chrono::{Utc, DateTime, TimeZone};

use common::{exchange, asset, trade};
use trade_history::{model, crud};

static DATABASE_URL: &str = "postgres://stephan@localhost/sammy_trade_history";

#[test]
fn insert_fresh_trade_item() {
    let trades = crud::Trades::connect(DATABASE_URL).expect("Can't connect to DB.");

    let fti_1 = model::FreshTradeItem::new(
        exchange::Exchange::Kraken,
        asset::BTC_USD,
        Utc::now(),
        10.into(),
        100.into(),
        trade::Market::Maker,
        trade::Type::Limit,
    );

    let ftis = vec![fti_1];

    let _tis = trades.create(&ftis).expect("DB error.");
}

fn gen_trade_item(ts: DateTime<Utc>) -> model::FreshTradeItem {
    model::FreshTradeItem::new(
        exchange::Exchange::Kraken,
        asset::BTC_USD,
        ts,
        10.into(),
        100.into(),
        trade::Market::Maker,
        trade::Type::Limit,
    )
}

#[test]
fn search_date_range() {
    let trades = crud::Trades::connect(DATABASE_URL).expect("Can't connect to DB.");

    let ts1 = Utc.ymd(2014, 1, 1).and_hms(1, 1, 1);
    let ts2 = Utc.ymd(2014, 1, 1).and_hms(1, 1, 2);
    let ts3 = Utc.ymd(2014, 1, 1).and_hms(1, 1, 3);
    let ts4 = Utc.ymd(2014, 1, 1).and_hms(1, 1, 4);
    let ts5 = Utc.ymd(2014, 1, 1).and_hms(1, 1, 5);

    let ftis = vec![
        gen_trade_item(ts1),
        gen_trade_item(ts2),
        gen_trade_item(ts3),
        gen_trade_item(ts4),
        gen_trade_item(ts5),
    ];

    let _tis = trades.create(&ftis).expect("DB error.");

    let fetched = trades.read_between(
        Some(exchange::Exchange::Kraken), asset::BTC_USD, ts2, ts5,
    ).expect("DB read error.");

    assert!(!fetched.is_empty());
    assert!(fet


t entry works well
	 * enough. We also clamp it to 1G to avoid some funky things
	 * such as RTAS bugs etc...
	 */
	ppc64_rma_size = min_t(u64, first_memblock_size, 0x40000000);

	/* Finally limit subsequent allocations */
	memblock_set_current_limit(ppc64_rma_size);
}

#ifdef CONFIG_DEBUG_FS

static int hpt_order_get(void *data, u64 *val)
{
	*val = ppc64_pft_size;
	return 0;
}

static int hpt_order_set(void *data, u64 val)
{
	if (!mmu_hash_ops.resize_hpt)
		return -ENODEV;

	return mmu_hash_ops.resize_hpt(val);
}

DEFINE_SIMPLE_ATTRIBUTE(fops_hpt_order, hpt_order_get, hpt_order_set, "%llu\n");

static int __init hash64_debugfs(void)
{
	if (!debugfs_create_file("hpt_order", 0600, powerpc_debugfs_root,
				 NULL, &fops_hpt_order)) {
		pr_err("lpar: unable to create hpt_order debugsfs file\n");
	}

	return 0;
}
machine_device_initcall(pseries, hash64_debugfs);
#endif /* CONFIG_DEBUG_FS */