 let res = serde_yaml::to_string(&preset).unwrap();
    println!("{}", res);
}
<filename>src/util/script.rs
use bitcoin::blockdata::script::{Instruction::PushBytes, Script};

#[cfg(feature = "liquid")]
use elements::address as elements_address;

use crate::chain::Network;
use crate::chain::{TxIn, TxOut};

pub struct InnerScripts {
    pub redeem_script: Option<Script>,
    pub witness_script: Option<Script>,
}

pub fn script_to_address(script: &Script, network: &Network) -> Option<String> {
    // rust-elements provides an Address::from_script() utility that's not yet
    // available in rust-bitcoin, but should be soon
    #[cfg(feature = "liquid")]
    match network {
        Network::Liquid | Network::LiquidRegtest => {
            return elements_address::Address::from_script(script, None, network.address_params())
                .map(|a| a.to_string())
        }
        _ => (),
    };

    bitcoin::Address::from_script(script, network.into()).map(|s| s.to_string())
}

pub fn get_script_asm(script: &Script) -> String {
    let asm = format!("{:?}", script);
    (&asm[7..asm.len() - 1]).to_string()
}

// Returns the witnessScript in the case of p2wsh, or the redeemScript in the case of p2sh.
pub fn get_innerscripts(txin: &TxIn, prevout: &TxOut) -> InnerScripts {
    // Wrapped redeemScript for P2SH spends
    let redeem_script = if prevout.script_pubkey.is_p2sh() {
        if let Some(PushBytes(redeemscript)) = txin.script_sig.iter(true).last() {
            Some(Script::from(redeemscript.to_vec()))
        } else {
            None
        }
    } else {
        None
    };

    // Wrapped witnessScript for P2WSH or P2SH-P2WSH spends
    let witness_script = if prevout.script_pubkey.is_v0_p2wsh()
        || redeem_script.as_ref().map_or(false, |s| s.is_v0_p2wsh())
    {
        let witness = &txin.witness;
        #[cfg(feature = "liquid")]
        let witness = &witness.script_witness;
        witness.iter().last().cloned().map(Script::from)
    } else {
        None
    };

    InnerScripts {
        redeem_script,
        witness_script,
    }
}
use std;
use rmps;

// -------------------------------------------------------------- //
// This file is copy-pasted from the synac common repository.     //
// Reason is because crates.io doesn't want to publish crates     //
// with a git repository.                                         //
// And common doesn't deserve it's own repo.                      //
// -------------------------------------------------------------- //

use std::collections::HashMap;
use std::io;

pub const DEFAULT_PORT:   u16 = 8439;
pub const RSA_LENGTH:     u32 = 3072;
pub const TYPING_TIMEOUT: u8  = 10;

pub const LIMIT_USER_NAME:    usize = 128;
pub const LIMIT_CHANNEL_NAME: usize = 128;
pub const LIMIT_MESSAGE:      usize = 16384;

pub const LIMIT_BULK:         usize = 64;

pub const ERR_ALREADY_EXISTS:     u8 = 0;
pub const ERR_LIMIT_REACHED:      u8 = 1;
pub const ERR_LOGIN_BANNED:       u8 = 2;
pub const ERR_LOGIN_BOT:          u8 = 3;
pub const ERR_LOGIN_INVALID:      u8 = 4;
pub


��어도 될 것 같은데 뭐지
          // Visibility.maintain(
          //   child: OrientationBuilder(builder: (context, orientation) {
          //     c.jump(c.page.value);
          //     return const SizedBox.shrink();
          //   }),
          // ),
          Container(
            decoration: const BoxDecoration(color: Colors.black),
            constraints: BoxConstraints.expand(
              height: MediaQuery.of(context).size.height,
            ),
            child: ValueListenableBuilder(
              valueListenable: sizeNoti,
              builder: (_, __, ___) {
                return Obx(
                  () => VPhotoViewGallery.builder(
                    scrollPhysics: const AlwaysScrollableScrollPhysics(),
                    builder: _buildItem,
                    itemCount: c.onTwoPage.value
                        ? landscapeMaxPage()
                        : c.maxPage,
                    backgroundDecoration: const BoxDecoration(
                      color: Colors.black,
                    ),
                    scrollDirection: c.viewScrollType.value == ViewType.vertical
                        ? Axis.vertical
                        : Axis.horizontal,
                    pageController: c.horizontalPageController,
                    reverse: c.rightToLeft.value,
                    onPageChanged: _onPageChanged,
                  ),
                );
              },
            ),
          ),
          if (c.overlayButton.value)
            Align(
              alignment: Alignment.centerRight,
              child: Container(
                color: null,
                width: width / 3,
                height: height,
                child: Obx(
                  () => CustomDelayTapListener(
                    onTap: c.leftButton,
                    delay: c.onTwoPage.value || Settings.useTabletMode.value
                        ? const Duration(milliseconds: 1)
                        : const Duration(milliseconds: 200),
                  ),
                ),
              ),
            ),
          Align(
            alignment: Alignment.center,
            child: Container(
              color: null,
              width: width / 3,
              height: height,
              child: GestureDetector(
                behavior: HitTestBehavior.translucent,
                onTap: c.middleButton,
              ),
            ),
          ),
          if (c.overlayButton.value)
            Align(
              alignment: Alignment.centerLeft,
              child: Container(
                color: null,
                width: width / 3,
                height: height,
                child: Obx(
                  () => CustomDelayTapListener(
                    onTap: c.rightButton,
                    delay: c.onTwoPage.value || Settings.useTabletMode.value
                        ? const Duration(milliseconds: 1)
                        : const Duration(milliseconds: 200),
                  ),
                ),
              ),
            ),
        ],
      ),
    );
  }

  Future<void> _onPageChanged(int page) async {
    if (c.onTwoPageJump) return;
    if (c.onTwoPage.value) {
      c.page.value = page * 2;
    } else {
      c.page.value = page;
    }
    if (c.provider.useProvider) {
      if (c.onTwoPage.value) {
        var indexPad = 0;
        if (c.secondPageToSecondPage.value) {
          indexPad = 1;
        }

        const evict = [-4, -3, 4, 5];
        for (final i in evict) {
          final target = c.page.value + i - indexPad;

          if (target < 0 || c.maxPage <= target || c.urlCache[target] == null) {
            continue;
          }

          CachedNetworkImage.evictFromCache(c.urlCache[target]!.value);
        }

        const precache = [-2, -1, 2, 3];
        for (final i in precache) {
          final target = c.page.value + i - indexPad;

          if (target < 0 || c.maxPage <= target || c.urlCache[target] == null) {


from pydantic import BaseModel
from datetime import datetime
from typing import List, Generic, TypeVar
from models.timeline_card import TimelineCard

# -----------------------------------------------

T = TypeVar("T")

class CommonResponse(BaseModel, Generic[T]):
    success: bool = True
    message: str
    data: T

class ErrorResponse(BaseModel):
    success: bool = False
    message: str

# -------- timeline --------
class TimelineRequest(BaseModel):
    query: List[str]
    startAt: datetime
    endAt: datetime

# Response - CommonResponse[TimelineData]
class TimelineData(BaseModel):
    title: str
    summary: str
    image: str
    category: str  # ECONOMY, ENTERTAINMENT, SPORTS, KTB, ""
    timeline: List[TimelineCard]

# -------- merge --------
# Request
class MergeRequest(BaseModel):
    timeline: List[TimelineCard]

# Response - CommonResponse[TimelineCard]

# -------- hot --------
# Request
class HotRequest(BaseModel):
    num: int

# Response - CommonResponse[HotData]
class HotData(BaseModel):
    keywords: List[str]

# -------- comment --------
# Request
class CommentRequest(BaseModel):
    query: List[str]
    num: int

# Response - CommonResponse[CommentData]
class CommentData(BaseModel):
    positive: int
    neutral: int
    negative: int


dingTransaction {
  PendingNanoTransaction({
    required this.nanoClient,
    required this.amount,
    required this.id,
    required this.blocks,
  });

  final NanoClient nanoClient;
  final BigInt amount;
  final String id;
  final List<Map<String, String>> blocks;
  String hex = "unused";

  @override
  String get amountFormatted {
    final String amt = NanoAmounts.getRawAsUsableString(amount.toString(), NanoAmounts.rawPerNano);
    return amt;
  }

  String get accurateAmountFormatted {
    final String amt = NanoAmounts.getRawAsUsableString(amount.toString(), NanoAmounts.rawPerNano);
    final String acc = NanoAmounts.getRawAccuracy(amount.toString(), NanoAmounts.rawPerNano);
    return "$acc$amt";
  }

  @override
  String get feeFormatted => "$feeFormattedValue XNO";

  @override
  String get feeFormattedValue => "0";

  @override
  Future<void> commit() async {
    for (var block in blocks) {
      await nanoClient.processBlock(block, "send");
    }
  }

  @override
  Future<Map<String, String>> commitUR() {
    throw UnimplementedError();
  }
}
import 'package:bip39/bip39.dart' as bip39;
import 'package:nanodart/nanodart.dart';

class NanoMnemonicIsIncorrectException implements Exception {
  @override
  String toString() =>
      'Nano mnemonic has incorrect format. Mnemonic should contain 12 or 24 words separated by space.';
}

class NanoMnemomics {
  /// Converts a nano seed to a 24-word mnemonic word list
  static List<String> seedToMnemonic(String seed) {
    if (!NanoSeeds.isValidSeed(seed)) {
      throw Exception('Invalid Seed');
    }
    String words = bip39.entropyToMnemonic(seed);
    return words.split(' ');
  }

  /// Convert a 24-word mnemonic word list to a nano seed
  static String mnemonicListToSeed(List<String> words) {
    if (words.length != 24) {
      throw Exception('Expected a 24-word list, got a ${words.length} list');
    }
    return bip39.mnemonicToEntropy(words.join(' ')).toUpperCase();
  }

  /// Validate a mnemonic word list
  static bool validateMnemonic(List<String> words) {
    return bip39.validateMnemonic(words.join(' '));
  }

  /// Validate a specific menmonic word
  static bool isValidWord(String word) {
    return WORDLIST.contains(word);
  }

  static const WORDLIST = [
    "abandon",
    "ability",
    "able",
    "about",
    "above",
    "absent",
    "absorb",
    "abstract",
    "absurd",
    "abuse",
    "access",
    "accident",
    "account",
    "accuse",
    "achieve",
    "acid",
    "acoustic",
    "acquire",
    "across",
    "act",
    "action",
    "actor",
    "actress",
    "actual",
    "adapt",
    "add",
    "addict",
    "address",
    "adjust",
    "admit",
    "adult",
    "advance",
    "advice",
    "aerobic",
    "affair",
    "afford",
    "afraid",
    "again",
    "age",
    "agent",
    "agree",
    "ahead",
    "aim",
    "air",
    "airport",
    "aisle",
    "alarm",
    "album",
    "alcohol",
    "alert",
    "alien",
    "all",
    "alley",
    "allow",
    "almost",
    "alone",
    "alpha",
    "already",
    "also",
    "alter",
    "always",
    "amateur",
    "amazing",
    "among",
    "amount",
    "amused",
    "analyst",
    "anchor",
    "ancient",
    "anger",
    "angle",


ash.h#459" rel="custom">PL_DHashTableFinish で破棄される必要があります。

ヒープに配置する場合、 PL_NewDHashTable, PL_DHashTableDestroy でテーブルの割り当て・削除を行ってください。

PLHashTable

PLHashTable は NSPR の一部です。ヘッダファイルは nsprpub/lib/ds/plhash.h にあります。 PLHashTable はヒープに多数の領域を割り当てようとするため、一般的には PLDHash の方が PLHashTable よりも優れています。

PLDHash よりも PLHashTable の方が好ましい状況は以下の2つです。

エントリーへのポインタが定数である必要がある場合。

ハッシュテーブルに格納されているエントリーが非常に大きい場合（12ワード以上）。 PLDHash は大きな構造体を効率的に扱えません。

nsTHashtable

nsTHashtable は PLDHash をラップする C++ のテンプレートで、 PLDHash の複雑な部分（コールバック関数、構造体など）を隠蔽します。 xpcom/glue/nsTHashtable.h に目を通しておいてください。

nsTHashtable を利用するためには、利用者は pre-defined format　にある通りにエントリークラスを宣言する必要があります。このエントリークラスは、ハッシュテーブルに格納するキーとデータを保持します（上記の PLDHash と同様です）。また、クラスの中でキーを処理する関数も宣言します。ほとんどの場


 jdk.codetools.apidiff.model.ElementKey.TypeElementKey;
import jdk.codetools.apidiff.model.ElementKey.TypeParameterElementKey;
import jdk.codetools.apidiff.model.ElementKey.VariableElementKey;

class GetFileVisitor implements ElementKey.Visitor<DocPath, Void> {

    DocPath getFile(ElementKey k) {
        return k.accept(this, null);
    }

    @Override
    public DocPath visitModuleElement(ModuleElementKey k, Void _p) {
        return getModuleDir(k).resolve("module-summary.html");
    }

    private DocPath getModuleDir(ModuleElementKey k) {
        return (k == null)
                ? DocPath.empty
                : DocPath.create(k.name.toString());
    }

    @Override
    public DocPath visitPackageElement(PackageElementKey k, Void _p) {
        return getPackageDir(k).resolve("package-summary.html");
    }

    private DocPath getPackageDir(PackageElementKey k) {
        return (k == null)
                ? DocPath.empty
                : getModuleDir((ModuleElementKey) k.moduleKey)
                        .resolve(k.name.toString().replace(".", File.separator));
    }

    @Override
    public DocPath visitTypeElement(TypeElementKey k, Void _p) {
        StringBuilder fn = new StringBuilder(k.name + ".html");
        while (k.enclosingKey instanceof TypeElementKey) {
            k = (TypeElementKey) k.enclosingKey;
            fn.insert(0,k.name + ".");
        }
        return getPackageDir((PackageElementKey) k.enclosingKey).resolve(fn.toString());
    }

    @Override
    public DocPath visitExecutableElement(ExecutableElementKey k, Void _p) {
        return k.typeKey.accept(this, null);
    }

    @Override
    public DocPath visitVariableElement(VariableElementKey k, Void _p) {
        return k.typeKey.accept(this, null);
    }

    @Override
    public DocPath visitTypeParameterElement(TypeParameterElementKey k, Void _p) {
        return null;
    }
}
/*
 * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

package jdk.codetools.apidiff.report.html;

/**
 * Abstraction for simple relative URIs, consisting of a path,
 * an optional query, and an optional fragment. {@code DocLink} objects can
 * be created by the constructors below or from a {@code DocPath} using the
 * convenience methods {@link DocPath#fragment fragment} and
 * {@link DocPath#query query}.
 */
public class DocLink {
    final DocPath path;
    final String query;
    final String fragment;

    /**
     * Creates a DocLink representing the URI {@code #fragment}.
     *
     * @param fragment the fragment
     * @return the DocLink
     */
    public static DocLink fragment(String fr


-height:4px
	}
	.blog-showcase ul li .blog-showcase-thumb img {
		max-width:100%;
		width:100%;
		height:auto!important
	}
}

/* Circular Navigation */

@media (min-width: 980px) and (max-width:1024px)  {
  .csstransforms .cn-wrapper{
    font-size: .9em;
  }
}

@media only screen and (max-width: 620px) {
  .no-csstransforms li{
    width:4em;
    height:4em;
    line-height:4em;
  }
}
@media only screen and (max-width: 500px) {
  .no-ccstransforms .cn-wrapper{
    padding:.5em;
  }
  .no-csstransforms .cn-wrapper li{
    font-size:.9em;
    width:4em;
    height:4em;
    line-height:4em;
  }
}
@media only screen and (max-width: 480px) {
  .csstransforms .cn-wrapper{
    font-size: .78em;
	margin-left: -142px;
  }
  .cn-button{
    font-size:1em;
  }
}
@media only screen and (max-width:420px){
  .no-csstransforms .cn-wrapper li{
    width:100%;
    height:3em;
    line-height:3em;
  }
}

/* Coming soon page Small devices (tablets, 768px and less) */
@media (max-width: 768px) {
	.coming-soon-copyright {
		margin-top: 40px;
	}
	.coming-soon-copyright p {
		text-align: left;
	}
}/* Purple Color #800080 & #b71db7 */

.btn:focus, .subscribe-btn, .progress .progress-bar, .accordionMod .panel-heading .current, #current:after, .tp-leftarrow.default:hover,.tp-rightarrow.default:hover, .nivo-prevNav:hover, .nivo-nextNav:hover, .contact-box:hover, #options li a.selected, .ch-info-front {
    background: #800080;
}

.bg-color {
    background: #800080;
	color: #fff;
}

.spinner {
	border-top-color: #800080;
}

.ch-info-back {
	background: rgba(128, 0, 128, 0.7) !important;
}

.tp-leftarrow.default:hover,.tp-rightarrow.default:hover, .nivo-prevNav:hover, .nivo-nextNav:hover {
	border-color: #800080;
}

.pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus, .pager li > a:hover, .pager li > a:focus, .navbar-toggle i, .cn-wrapper li a, .cn-wrapper:after {
    background-color: #800080;
    color: #fff;
}

.hero {
    border-left-color: #800080;
}

.ie8 .btn-color, .ie9 .btn-color {
	background: #800080 !important;
}

.ie8 .btn-color:hover, .ie9 .btn-color:hover {
	background: #800080 !important;
}

.btn-color:hover, .subscribe-btn:hover {
	background: #b71db7;
}

.btn-color, .subscribe-btn {
	background: #800080;
	cursor: pointer;
}

#current,.menu ul li a:hover,.menu ul>li:hover>a {
    border-bottom: 3px solid #800080;
}

ul.why li:before {
    background


#ifndef SPARSE_INDEX_H__
#define SPARSE_INDEX_H__

/*
 * If performing an operation where the index is supposed to expand to a
 * full index, then disable the advice message by setting this global to
 * zero.
 */
extern int give_advice_on_expansion;

struct index_state;
#define SPARSE_INDEX_MEMORY_ONLY (1 << 0)
int is_sparse_index_allowed(struct index_state *istate, int flags);
int convert_to_sparse(struct index_state *istate, int flags);
void ensure_correct_sparsity(struct index_state *istate);
void clear_skip_worktree_from_present_files(struct index_state *istate);

/*
 * Some places in the codebase expect to search for a specific path.
 * This path might be outside of the sparse-checkout definition, in
 * which case a sparse-index may not contain a path for that index.
 *
 * Given an index and a path, check to see if a leading directory for
 * 'path' exists in the index as a sparse directory. In that case,
 * expand that sparse directory to a full range of cache entries and
 * populate the index accordingly.
 */
void expand_to_path(struct index_state *istate,
		    const char *path, size_t pathlen, int icase);

struct repository;
int set_sparse_index_config(struct repository *repo, int enable);

struct pattern_list;

/**
 * Scan the given index and compare its entries to the given pattern list.
 * If the index is sparse and the pattern list uses cone mode patterns,
 * then modify the index to contain the all of the file entries within that
 * new pattern list. This expands sparse directories only as far as needed.
 *
 * If the pattern list is NULL or does not use cone mode patterns, then the
 * index is expanded to a full index.
 */
void expand_index(struct index_state *istate, struct pattern_list *pl);

void ensure_full_index(struct index_state *istate);

#endif


protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Required. GlossaryCategory identifier.
	CategoryId string `protobuf:"bytes,2,opt,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"`
	// Required. The GlossaryCategory to create.
	Category *GlossaryCategory `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"`
}

func (x *CreateGlossaryCategoryRequest) Reset() {
	*x = CreateGlossaryCategoryRequest{}
	mi := &file_google_cloud_dataplex_v1_business_glossary_proto_msgTypes[9]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *CreateGlossaryCategoryRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CreateGlossaryCategoryRequest) ProtoMessage() {}

func (x *CreateGlossaryCategoryRequest) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_dataplex_v1_business_glossary_proto_msgTypes[9]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use CreateGlossaryCategoryRequest.ProtoReflect.Descriptor instead.
func (*CreateGlossaryCategoryRequest) Descriptor() ([]byte, []int) {
	return file_google_cloud_dataplex_v1_business_glossary_proto_rawDescGZIP(), []int{9}
}

func (x *CreateGlossaryCategoryRequest) GetParent() string {
	if x != nil {
		return x.Parent
	}
	return ""
}

func (x *CreateGlossaryCategoryRequest) GetCategoryId() string {
	if x != nil {
		return x.CategoryId
	}
	return ""
}

func (x *CreateGlossaryCategoryRequest) GetCategory() *GlossaryCategory {
	if x != nil {
		return x.Category
	}
	return nil
}

// Update GlossaryCategory Request
type UpdateGlossaryCategoryRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	// Required. The GlossaryCategory to update.
	// The GlossaryCategory's `name` field is used to identify the
	// GlossaryCategory to update. Format:
	// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
	Category *GlossaryCategory `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"`
	// Required. The list of fields to update.
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
}

func (x *UpdateGlossaryCategoryRequest) Reset() {
	*x = UpdateGlossaryCategoryRequest{}
	mi := &file_google_cloud_dataplex_v1_business_glossary_proto_msgTypes[10]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *UpdateGlossaryCategoryRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*UpdateGlossaryCategoryRequest) ProtoMessage() {}

func (x *UpdateGlossaryCategoryRequest) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_dataplex_v1_business_glossary_proto_msgTypes[10]
	if


// Note 2: this code is stripped in release mode!
      assert(() {
        requiredKeys.forEach((key) {
          assert(json.containsKey(key), 'Required key "IoK8sApiCoreV1ConfigMapNodeConfigSource[$key]" is missing from JSON.');
          assert(json[key] != null, 'Required key "IoK8sApiCoreV1ConfigMapNodeConfigSource[$key]" has a null value in JSON.');
        });
        return true;
      }());

      return IoK8sApiCoreV1ConfigMapNodeConfigSource(
        kubeletConfigKey: mapValueOfType<String>(json, r'kubeletConfigKey')!,
        name: mapValueOfType<String>(json, r'name')!,
        namespace: mapValueOfType<String>(json, r'namespace')!,
        resourceVersion: mapValueOfType<String>(json, r'resourceVersion'),
        uid: mapValueOfType<String>(json, r'uid'),
      );
    }
    return null;
  }

  static List<IoK8sApiCoreV1ConfigMapNodeConfigSource> listFromJson(dynamic json, {bool growable = false,}) {
    final result = <IoK8sApiCoreV1ConfigMapNodeConfigSource>[];
    if (json is List && json.isNotEmpty) {
      for (final row in json) {
        final value = IoK8sApiCoreV1ConfigMapNodeConfigSource.fromJson(row);
        if (value != null) {
          result.add(value);
        }
      }
    }
    return result.toList(growable: growable);
  }

  static Map<String, IoK8sApiCoreV1ConfigMapNodeConfigSource> mapFromJson(dynamic json) {
    final map = <String, IoK8sApiCoreV1ConfigMapNodeConfigSource>{};
    if (json is Map && json.isNotEmpty) {
      json = json.cast<String, dynamic>(); // ignore: parameter_assignments
      for (final entry in json.entries) {
        final value = IoK8sApiCoreV1ConfigMapNodeConfigSource.fromJson(entry.value);
        if (value != null) {
          map[entry.key] = value;
        }
      }
    }
    return map;
  }

  // maps a json object with a list of IoK8sApiCoreV1ConfigMapNodeConfigSource-objects as value to a dart map
  static Map<String, List<IoK8sApiCoreV1ConfigMapNodeConfigSource>> mapListFromJson(dynamic json, {bool growable = false,}) {
    final map = <String, List<IoK8sApiCoreV1ConfigMapNodeConfigSource>>{};
    if (json is Map && json.isNotEmpty) {
      // ignore: parameter_assignments
      json = json.cast<String, dynamic>();
      for (final entry in json.entries) {
        map[entry.key] = IoK8sApiCoreV1ConfigMapNodeConfigSource.listFromJson(entry.value, growable: growable,);
      }
    }
    return map;
  }

  /// The list of required keys that must be present in a JSON.
  static const requiredKeys = <String>{
    'kubeletConfigKey',
    'name',
    'namespace',
  };
}

import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
import 'package:k8zdev/common/const.dart';
import 'package:k8zdev/common/helpers.dart';
import 'package:k8zdev/common/ops.dart';
import 'package:k8zdev/common/styles.dart';
import 'package:k8zdev/dao/kube.dart';
import 'package:k8zdev/generated/l10n.dart';
import 'package:k8zdev/models/models.dart';
import 'package:k8zdev/services/k8z_native.dart';
import 'package:k8zdev/services/k8z_service.dart';
import 'package:k8zdev/widgets/namespace.dart';
import 'package:k8zdev/widgets/settings_tile.dart';
import 'package:k8zdev/widgets/widgets.dart';
import 'package:settings_ui/settings_ui.dart';

class DeploymentsPage extends StatefulWidget {
  final K8zCluster cluster;
  const DeploymentsPage({super.key, required this.cluster});

  @override
  State<DeploymentsPage> createState() => _DeploymentsPageState();
}

class _DeploymentsPageState extends State<DeploymentsPage> {
  final String _path = "apis/apps/v1";
  final String


ChatID:    update.Message.Chat.ID,
				Text:      fmt.Sprintf("Payment was successful with payment payload: *%s*", update.Message.SuccessfulPayment.InvoicePayload),
				ParseMode: models.ParseModeMarkdown,
			})
			return
		}
	}
}
// Code generated by gotdgen, DO NOT EDIT.

package tg

import (
	"context"
	"errors"
	"fmt"
	"sort"
	"strings"

	"go.uber.org/multierr"

	"github.com/gotd/td/bin"
	"github.com/gotd/td/tdjson"
	"github.com/gotd/td/tdp"
	"github.com/gotd/td/tgerr"
)

// No-op definition for keeping imports.
var (
	_ = bin.Buffer{}
	_ = context.Background()
	_ = fmt.Stringer(nil)
	_ = strings.Builder{}
	_ = errors.Is
	_ = multierr.AppendInto
	_ = sort.Ints
	_ = tdp.Format
	_ = tgerr.Error{}
	_ = tdjson.Encoder{}
)

// StarGiftUpgradePrice represents TL type `starGiftUpgradePrice#99ea331d`.
//
// See https://core.telegram.org/constructor/starGiftUpgradePrice for reference.
type StarGiftUpgradePrice struct {
	// Date field of StarGiftUpgradePrice.
	Date int
	// UpgradeStars field of StarGiftUpgradePrice.
	UpgradeStars int64
}

// StarGiftUpgradePriceTypeID is TL type id of StarGiftUpgradePrice.
const StarGiftUpgradePriceTypeID = 0x99ea331d

// Ensuring interfaces in compile-time for StarGiftUpgradePrice.
var (
	_ bin.Encoder     = &StarGiftUpgradePrice{}
	_ bin.Decoder     = &StarGiftUpgradePrice{}
	_ bin.BareEncoder = &StarGiftUpgradePrice{}
	_ bin.BareDecoder = &StarGiftUpgradePrice{}
)

func (s *StarGiftUpgradePrice) Zero() bool {
	if s == nil {
		return true
	}
	if !(s.Date == 0) {
		return false
	}
	if !(s.UpgradeStars == 0) {
		return false
	}

	return true
}

// String implements fmt.Stringer.
func (s *StarGiftUpgradePrice) String() string {
	if s == nil {
		return "StarGiftUpgradePrice(nil)"
	}
	type Alias StarGiftUpgradePrice
	return fmt.Sprintf("StarGiftUpgradePrice%+v", Alias(*s))
}

// FillFrom fills StarGiftUpgradePrice from given interface.
func (s *StarGiftUpgradePrice) FillFrom(from interface {
	GetDate() (value int)
	GetUpgradeStars() (value int64)
}) {
	s.Date = from.GetDate()
	s.UpgradeStars = from.GetUpgradeStars()
}

// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*StarGiftUpgradePrice) TypeID() uint32 {
	return StarGiftUpgradePriceTypeID
}

// TypeName returns name of type in TL schema.
func (*StarGiftUpgradePrice) TypeName() string {
	return "starGiftUpgradePrice"
}

// TypeInfo returns info about TL type.
func (s *StarGiftUpgradePrice) TypeInfo() tdp.Type {
	typ := tdp.Type{
		Name: "starGiftUpgradePrice",
		ID:   StarGiftUpgradePriceTypeID,
	}
	if s == nil {
		typ.Null = true
		return typ
	}
	typ.Fields = [


e> {
  void _back() {
    NavigatorTool.pop();
  }

  void _pickImage() async {
    final path = await ImagePickTool.pickImageAndSave();
    if (path != null) {
      await Levels.setBackground(path);
      setState(() {});
    }
  }

  @override
  Widget build(BuildContext context) {
    return ScreenConfig(
      builder: () => Scaffold(
        backgroundColor: Colors.grey[100],
        body: SafeArea(
          child: Center(
            child: Column(
              children: [
                _topAction(),
                lExpanded(
                  child: _background(),
                ),
                _bottomAction(),
              ],
            ),
          ),
        ),
      ),
    );
  }

  Widget _background() {
    return Container(
      width: 100.vw,
      height: 100.vh,
      child: RawImage(
        image: ImageTool.image(Levels.background),
        fit: BoxFit.cover,
      ),
    );
  }

  Widget _topAction() => Container(
        padding: EdgeInsets.all(5.vw),
        child: Row(
          children: [
            lIconButton(
              Icons.chevron_left,
              size: 10.vw,
              color: Colors.black,
              onTap: _back,
            ),
            lExpanded(
                child: lText(
              '更换背景',
              bold: true,
              size: 18,
            )),
            lIconButton(
              Icons.chevron_left,
              size: 10.vw,
              color: Colors.transparent,
            ),
          ],
        ),
      );

  Widget _bottomAction() => Container(
        padding: EdgeInsets.all(10.vw),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          children: [
            lButton(
              '更换图片',
              onTap: _pickImage,
              height: 5.vw * 2.2,
              colorBg: Colors.black,
              colorText: Colors.white,
            ),
          ],
        ),
      );
}
export 'package:flutter/cupertino.dart';
export 'package:flutter_easyhub/animation/easy_flip_diamond.dart';
export 'package:flutter_easyhub/animation/easy_rain_couplet.dart';
export 'package:flutter_easyhub/animation/easy_creeping_bug.dart';
export 'package:flutter_easyhub/animation/easy_dancing_ball.dart';
export 'package:flutter_easyhub/animation/easy_dancing_cube.dart';
export 'package:flutter_easyhub/animation/easy_falling_ball.dart';
export 'package:flutter_easyhub/animation/easy_flashing_circles.dart';
export 'package:flutter_easyhub/animation/easy_hourglass_timer.dart';
export 'package:flutter_easyhub/animation/easy_moving_cube.dart';
export 'package:flutter_easyhub/animation/easy_rotating_two_color_circles.dart';
export 'package:flutter_easyhub/animation/easy_rubber_band.dart';
export 'package:flutter_easyhub/animation/easy_spit_bubbles.dart';
export 'package:flutter_easyhub/animation/easy_pendulum_ball.dart';
export 'package:flutter_easyhub/animation/easy_swimming_ball.dart';
export 'package:flutter_easyhub/animation/easy_waves.dart';
export 'animation/easy_beating_rects.dart';
export 'animation/easy_fliping_rect.dart';
export 'animation/easy_folding_rect.dart';
export 'animation/easy_rotating_circles.dart';
export 'animation/easy_rotating_two_circles.dart';
export 'animation/easy_beating_circle.dart';
export 'animation/easy_custom_painter.dart';
export 'animation/easy_rotating_two_rect.dart';
export 'animation/easy_progress_widget.dart';
export 'easyHub.dart';
export 'flutter_main_hub.dart';
export 'package:flutter_easyhub/tool/config.dart';
import 'dart:math';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class EasyPendulumBall extends StatefulWidget {
  final double radius; //小�


%l4, 1, %l4

P173: !PREFETCH [3] (Int)
prefetch [%i0 + 32], 1

P174: !ST [7] (maybe <- 0x7c) (Int) (CBR)
stw   %l4, [%i1 + 84 ]
add   %l4, 1, %l4

! cbranch
andcc %l0, 1, %g0
be,pn  %xcc, TARGET174
nop
RET174:

! lfsr step begin
srlx %l0, 1, %l7
xnor %l7, %l0, %l7
sllx %l7, 63, %l7
or  %l7, %l0, %l0
srlx %l0, 1, %l0

P175: !DWST [7] (maybe <- 0x7d) (Int)
sllx %l4, 32, %o5
add   %l4, 1, %l4
or %o5, %l4, %o5
stx %o5, [%i1 + 80]
add   %l4, 1, %l4

P176: !ST [14] (maybe <- 0x3f800006) (FP)
! 0 th moved, current_fp_src=20
fmovs  %f16, %f20
fadds  %f16, %f17, %f16
st   %f20, [%i3 + 128 ]

P177: !ST [0] (maybe <- 0x7f) (Int) (Branch target of P852)
stw   %l4, [%i0 + 0 ]
add   %l4, 1, %l4
ba P178
nop

TARGET852:
ba RET852
nop

P178: !CAS [13] (maybe <- 0x80) (Int)
add %i3, 64, %l6
lduw [%l6], %o3
mov %o3, %l3
! move %l3(lower) -> %o3(upper)
sllx %l3, 32, %o3
mov %l4, %o5
cas [%l6], %l3, %o5
! move %o5(lower) -> %o3(lower)
srl %o5, 0, %l6
or %l6, %o3, %o3
add   %l4, 1, %l4

P179: !PREFETCH [10] (Int)
prefetch [%i2 + 32], 1

P180: !DWST [7] (maybe <- 0x81) (Int)
sllx %l4, 32, %l3
add   %l4, 1, %l4
or %l3, %l4, %l3
stx %l3, [%i1 + 80]
add   %l4, 1, %l4

P181: !ST [2] (maybe <- 0x3f800007) (FP)
! 0 th moved, current_fp_src=20
fmovs  %f16, %f20
fadds  %f16, %f17, %f16
st   %f20, [%i0 + 12 ]

P182: !ST [3] (maybe <- 0x83) (Int)
stw   %l4, [%i0 + 32 ]
add   %l4, 1, %l4

P183: !ST [6] (maybe <- 0x84) (Int)
stw   %l4, [%i1 + 80 ]
add   %l4, 1, %l4

P184: !CAS [3] (maybe <- 0x85) (Int)
add %i0, 32, %l6
lduw [%l6], %o4
mov %o4, %l3
! move %l3(lower) -> %o4(upper)
sllx %l3, 32, %o4
mov %l4, %o5
cas [%l6], %l3, %o5
! move %o5(lower) -> %o4(lower)
srl %o5, 0,


lockBuffer(block) } as UniformBlockBuffer<T>
    }

    val uniformLayouts = program.typedUniforms.map { it.block }.distinct()
    val maxLocation = uniformLayouts.maxOfOrNull { it.fixedLocation + 1 } ?: 0

    val uniformsBlocks = Array<UniformBlock?>(maxLocation) { null }.also {
        for (layout in uniformLayouts) it[layout.fixedLocation] = layout
    }
    val uniformsBlocksData = Array<UniformBlockBuffer<*>?>(uniformsBlocks.size) {
        uniformsBlocks[it]?.let { bufferCache[it] }
    }
    private val agUniformBlockDatas: Array<UniformBlockBuffer<*>?> = Array(uniformsBlocks.size) { uniformsBlocksData[it]?.block?.let { UniformBlockBuffer(it) } }
    private val agBuffers = Array(uniformsBlocks.size) { uniformsBlocksData[it]?.agBuffer }
    private val agBufferIndices = IntArray(uniformsBlocks.size) { 0 }

    fun reset() {
        agUniformBlockDatas.fastForEach { it?.reset() }
    }

    fun createRef(): UniformBlocksBuffersRef {
        for (n in agBufferIndices.indices) agBufferIndices[n] = uniformsBlocksData[n]?.currentIndex ?: -1
        return UniformBlocksBuffersRef(agUniformBlockDatas, agBuffers, agBufferIndices.copyOf())
    }

    operator fun <T : UniformBlock> get(block: T): UniformBlockBuffer<T> {
        val rblock = uniformsBlocks.getOrNull(block.fixedLocation)
            ?: error("Can't find block '$block'")
        if (rblock !== block) error("Block $block not used in program")
        return uniformsBlocksData[block.fixedLocation]!! as UniformBlockBuffer<T>
    }
}
package korlibs.korge

import korlibs.event.*
import korlibs.inject.*
import korlibs.io.lang.*
import korlibs.korge.internal.*
import korlibs.logger.*
import korlibs.platform.*
import kotlin.jvm.*
import kotlin.reflect.*

class ReloadClassContext(val injector: Injector, val refreshedClasses: Set<String>, val rootFolders: List<String>)

@KorgeInternal
open class KorgeReloadInternalImpl {
    open fun <T : Any> getReloadedClass(clazz: KClass<T>, context: ReloadClassContext): KClass<T> = clazz
    open fun transferKeepProperties(old: Any, new: Any) = Unit
}

internal expect val KorgeReloadInternal: KorgeReloadInternalImpl

object KorgeReload {
    @Suppress("VARIABLE_IN_SINGLETON_WITHOUT_THREAD_LOCAL")
    private var KorgeReload_eventDispatcher: EventListener? = null

    val logger = Logger("KorgeReload")

    @JvmStatic
    @Suppress("unused") // This is called from [korlibs.korge.reloadagent.KorgeReloadAgent]
    fun triggerReload(classes: List<String>, success: Boolean, rootFolders: List<String>) {
        logger.debug { "KorgeReloadAgent detected a class change. Reload: $classes" }
        KorgeReload_eventDispatcher?.dispatch(ReloadEvent(classes.toSet(), success, rootFolders))
    }

    fun registerEventDispatcher(eventDispatcher: EventListener) {
        // Only in JVM and if KORGE_AUTORELOAD env is set
        if (!Platform.runtime.isJvm || Environment["KORGE_AUTORELOAD"] != "true") return
        KorgeReload_eventDispatcher = eventDispatcher
    }

    fun unregisterEventDispatcher() {
        if (!Platform.runtime.isJvm) return // Prevent mutation in K/N
        if (KorgeReload_eventDispatcher != null) KorgeReload_eventDispatcher = null
    }

    //fun <T : Any> getReloadedClass(clazz: KClass<T>): KClass<T> = KorgeReload_getReloadedClass(clazz)
}


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

"""Generator."""

import common

def generate(width=None, height=None, rowoffset=None, coloffset=None, rows=None,
             cols=None, colors=None):
  """Returns input and output grids according to the given parameters.

  Args:
    width: the width of the input grid
    height: the height of the input grid
    rowoffset: the number of rows to shift the sprite
    coloffset: the number of columns to shift the sprite
    rows: a list of vertical coordinates where pixels should be placed
    cols: a list of horizontal coordinates where pixels should be placed
    colors: a list of digits representing the colors to be used
  """
  if width is None:
    width, height = common.randint(5, 7), common.randint(5, 7)
    wide, tall = common.randint(2, 3), common.randint(2, 3)
    rowoffset = common.randint(0, height - tall)
    coloffset = common.randint(0, width - wide)
    rows, cols = common.hollow_conway(wide, tall, common.randint(0, 3))
    color_list = common.random_colors(2, exclude=[common.blue()])
    colors = [common.choice(color_list) for _ in rows]

  wide, tall = max(cols) + 1, max(rows) + 1
  grid = common.grid(width, height, common.blue())
  output = common.grid(wide, tall, common.black())
  for row, col, color in zip(rows, cols, colors):
    output[row][col] = grid[rowoffset + row][coloffset + col] = color
  return {"input": grid, "output": output}

def validate():
  """Validates the generator."""
  train = [
      generate(width=7, height=5, rowoffset=1, coloffset=1,
               rows=[0, 0, 1, 1, 1, 2], cols=[0, 1, 0, 1, 2, 2],
               colors=[2, 2, 2, 2, 3, 2]),
      generate(width=7, height=7, rowoffset=1, coloffset=2, rows=[0, 0, 1, 1],
               cols=[0, 2, 0, 2], colors=[3, 2, 3, 2]),
      generate(width=6, height=7, rowoffset=2, coloffset=1,
               rows=[0, 0, 1, 1, 2, 2], cols=[0, 1, 0, 1, 0, 1],
               colors=[5, 5, 5, 5, 6, 6]),
  ]
  test = [
      generate(width=6, height=6, rowoffset=2, coloffset=2, rows=[0, 1, 1],
               cols=[1, 0, 1], colors=[2, 2, 3]),
  ]
  return {"train": train, "test": test}


Name="spent-asset-icon">
															<Coin
																iconId={
																	coins[selectedDeal?.spending_asset]?.icon_id
																}
																type="CS9"
															/>

														{selectedDeal?.spending_asset?.toUpperCase()}

													<InputNumber
														className={
															amountFiat <= 0 ||
															!amountFiat ||
															selectedDeal?.min_order_value > amountFiat ||
															selectedDeal?.max_order_value < amountFiat
																? 'error-field amount-spent-field w-75'
																: 'amount-spent-field w-75'
														}
														value={amountFiat}
														onChange={(e) => {
															setAmountFiat(e);
															const currencyAmount =
																Number(e) /
																Number(
																	selectedDeal?.exchange_rate *
																		(1 +
																			Number(selectedDeal?.spread / 100 || 0))
																);

															const formatted = formatAmount(
																selectedDeal?.buying_asset,
																currencyAmount
															);

															setAmountCurrency(formatted);
														}}
														placeholder="0"
														autoFocus={true}
														onFocus={() => onHandleFocus('spent amount')}
														onBlur={() => setSpentAmountInput(false)}
													/>

												{selectedDeal?.min_order_value > amountFiat && (

														<ExclamationCircleFilled />
														<EditWrapper
															stringId={STRINGS.formatString(
																STRINGS['P2P.MINIMUM_AMOUNT_WARNING'],
																STRINGS['P2P.SPEND_AMOUNT'].toLowerCase(),
																selectedDeal?.min_order_value
															)}
														>

																{STRINGS.formatString(
																	STRINGS['P2P.MINIMUM_AMOUNT_WARNING'],
																	STRINGS['P2P.SPEND_AMOUNT'].toLowerCase(),
																	selectedDeal?.min_order_value
																)}

														</EditWrapper>

												)}
												{selectedDeal?.max_order_value < amountFiat && (

														<ExclamationCircleFilled />
														<EditWrapper
															stringId={STRINGS.formatString(
																STRINGS['P2P.MAXIMUM_AMOUNT_WARNING'],
																STRINGS['P2P.SPEND_AMOUNT'].toLowerCase(),
																selectedDeal?.max_order_value
															)}
														>

																{STRINGS.formatString(
																	STRINGS['P2P.MAXIMUM_AMOUNT_WARNING'],
																	STRINGS['P2P.SPEND_AMOUNT'].toLowerCase(),
																	selectedDeal?.max_order_value
																)}

														</EditWrapper>

												)}

														<EditWrapper stringId="P2P.AMOUNT_TO_RECEIVE">
															{STRINGS['P2P.AMOUNT_TO_


�主体的财产和企业经营者个人财产实施查封、冻结和扣押等行政强制措施；

(四)在法律、法规规定之外要求市场主体提供财力、物力或者人力；

(五)没有法律、法规依据，强制或者变相强制市场主体参加评比、达标、表彰、培训、考核、考试以及类似活动，或者借前述活动向市场主体收费或者变相收费；

(六)违法设立或者在目录清单之外执行政府性基金、涉企行政事业性收费、涉企保证金；

(七)不履行向市场主体依法作出的政策承诺以及依法订立的各类合同，或者违约拖欠市场主体的货物、工程、服务等账款；

(八)变相设定或者实施行政许可，继续实施或者变相实施已取消的行政许可，或者转由行业协会商会或者其他组织实施已取消的行政许可；

(九)为市场主体指定或者变相指定中介服务机构，或者违法强制市场主体接受中介服务；

(十)制定与市场主体生产经营活动密切相关的行政法规、规章、行政规范性文件时，不按照规定听取市场主体、行业协会商会的意见；

(十一)其他不履行优化营商环境职责或者损害营商环境的情形。

第七十条 公用企事业单位有下列情形之一的，由有关部门责令改正，依法追究法律责任：

(一)不向社会公开服务标准、资费标准、办理时限等信息；

(二)强迫市场主体接受不合理的服务条件；

(三)向市场主体收取不合理费用。

第七十一条 行业协会商会、中介服务机构有下列情形之一的，由有关部门责令改正，依法追究法律责任：

(一)违法开展收费、评比、认证等行为；

(二)违法干预市场主体加入或者退出行业协会商会等社会组织；

(三)没有法律、法规依据，强制或者变相强制市场主体参加评比、达标、表彰、培训、考核、考试以及类似活动，或者借前述活动向市场主体收费或者变相收费；

(四)不向社会公开办理法定行政审批中介服务的条件、流程、时限、收费标准


inates": [[-70.6439379, -33.5054908], [-70.6437665, -33.5048675], [-70.6433102, -33.5032664]], "type": "LineString"}, "id": "2513", "properties": {"SEV_Index": 1, "color": "#a6dea3", "name": "Dario Salas", "num_crashes": 1, "osm_id": "24636765"}, "type": "Feature"}, {"geometry": {"coordinates": [[-70.6561862, -33.4830671], [-70.6559053, -33.4823395], [-70.6555513, -33.4814228], [-70.6549449, -33.4799641]], "type": "LineString"}, "id": "2491", "properties": {"SEV_Index": 1, "color": "#a6dea3", "name": "Ram\u00f3n Barros Luco", "num_crashes": 1, "osm_id": "24636486"}, "type": "Feature"}, {"geometry": {"coordinates": [[-70.7002658, -33.4350983], [-70.6998994, -33.436096], [-70.6997292, -33.4365973], [-70.6996144, -33.4368876], [-70.6993629, -33.4376587]], "type": "LineString"}, "id": "2489", "properties": {"SEV_Index": 1, "color": "#a6dea3", "name": "Pasaje 1", "num_crashes": 1, "osm_id": "24636455"}, "type": "Feature"}, {"geometry": {"coordinates": [[-70.5684359, -33.4433035], [-70.5686157, -33.4430812], [-70.568834, -33.4428861], [-70.568861, -33.4428355], [-70.5688581, -33.4427832], [-70.5688447, -33.4427567]], "type": "LineString"}, "id": "4572", "properties": {"SEV_Index": 1, "color": "#a6dea3", "name": "La Ca\u00f1ada", "num_crashes": 1, "osm_id": "38958297"}, "type": "Feature"}, {"geometry": {"coordinates": [[-70.6991676, -33.6185517], [-70.6983882, -33.6172663], [-70.6982613, -33.6170455], [-70.6981178, -33.6167891], [-70.6980457, -33.6166545], [-70.6979578, -33.6164764], [-70.69788, -33.6162812], [-70.697731, -33.615863], [-70.6975758, -33.615353], [-70.6975027, -33.6150935], [-70.697431, -33.6148302], [-70.6973344, -33.6144653], [-70.6972473, -33.614019], [-70.6971, -33.6131087], [-70.6970273, -33.6127346], [-70.6969858, -33.6121828], [-70.6969429, -33.6112759], [-70.6969469, -33.6111586]], "type": "LineString"}, "id": "4569", "properties": {"SEV_Index": 1, "color": "#a6dea3", "name": "Avenida Portales", "num_crashes": 1, "osm_id": "389569901"}, "type": "Feature"}, {"geometry": {"coordinates": [[-70.6731432, -33.4184296], [-70.673276, -33.4185734], [-70.6740185, -33.4193774], [-70.6740914, -33.4194564], [-70.6746778, -33.4200913], [-70.6748009, -33.4202245], [-70.6753276, -33.42079


N(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);const cloudHelper = require('../../../helper/cloud_helper.js');
const PublicBiz = require('../../../comm/biz/public_biz.js');

Component({
    options: {
        addGlobalClass: true,
        //pureDataPattern: /^_dataList/, // 指定所有 _ 开头的数据字段为纯数据字段
        multipleSlots: true // 在组件定义时的选项中启用多slot支持
    },

    /**
     * 组件的属性列表
     */
    properties: {
        route: { // 业务路由
            type: String,
            value: ''
        },
        _params: { //路由的附加参数
            type: Object,
            value: {}
        },
        _dataList: {
            type: Object,
            value: null
        },
        type: {
            type: String, //业务类型 info,user,well
            value: ''
        },
        top: {
            type: String, // 顶部空出高度 rpx
            value: '0'
        },
        topBottom: {
            type: String, // 回顶部按钮的位置 rpx
            value: '50'
        },
        isLoad: {
            type: Boolean, //数据加载中
            value: false
        },
        dataNoHint: {
            type: String, //无数据提示
            value: '暂无数据哦~'
        },
        isCache: { // 非缓存状态下或者list缓存过期下onshow加载, 缓存下onload加载
            type: Boolean, //是否cache
            value: true
        },
		show: {
            type: String, //显示模式 分页page或者直接显示show
            value: 'page'
        },
    },

    /**
     * 组件的初始数据
     */
    data: {
        refresherTriggered: false, //下拉刷新是否完成

        topNum: 0, //回顶部
        topShow: false,
    },

    lifetimes: {
        created: function () {
            // 组件实例化，但节点树还未导入，因此这时不能用setData
        },
        attached: function () {
            // 在组件实例进入页面节点树时执行
            // 节点树完成，可以用setData渲染节点，但无法操作节点
        },
        ready: async function () {

            // 组件布局完成，这时可以获取节点信息，也可以操作节点

            if (this.data.isCache) //缓存状态下加载
                await this._getList(1);
        },
        move: function () {
            // 组件实例被移动到树的另一个位置
        },
        detached: function () {
            // 在组件实例被从页面节点树移除时执行
        },
    },

    pageLifetimes: {
        async show() {
            // 页面被展示
            if (!this.data.isCache || !PublicBiz.isCacheList(this.data.type)) {
                // 非缓存状态下或者 list缓存过期下加载
                await this._getList(1);
            }

        },
        hide() {
            // 页面


4 */ STR R3, [SP, 0x8] \n\
/* 08024b36 */ BL sprite_set_anim \n\
/* 08024b3a */ LDR R0, [R6] \n\
/* 08024b3c */ LDR R1, [R5] \n\
/* 08024b3e */ ADDS R1, R1, R4 @ Set R1 to R1 + R4 \n\
/* 08024b40 */ MOVS R2, 0x0 @ Set R2 to 0x0 \n\
/* 08024b42 */ LDRSH R1, [R1, R2] \n\
/* 08024b44 */ MOVS R2, 0x1 @ Set R2 to 0x1 \n\
/* 08024b46 */ BL sprite_set_visible \n\
/* 08024b4a */ B branch_08024b8c \n\
\n\
.ltorg \n\
 \n\
branch_08024b58: \n\
/* 08024b58 */ LDR R6, =gSpriteHandler \n\
/* 08024b5a */ LDR R0, [R6] \n\
/* 08024b5c */ LDR R5, =gCurrentEngineData \n\
/* 08024b5e */ LDR R1, [R5] \n\
/* 08024b60 */ MOVS R4, 0xE5 @ Set R4 to 0xE5 \n\
/* 08024b62 */ LSLS R4, R4, 0x2 \n\
/* 08024b64 */ ADDS R1, R1, R4 @ Set R1 to R1 + R4 \n\
/* 08024b66 */ MOVS R2, 0x0 @ Set R2 to 0x0 \n\
/* 08024b68 */ LDRSH R1, [R1, R2] \n\
/* 08024b6a */ LDR R2, =anim_drum_player_unk24 \n\
/* 08024b6c */ MOVS R3, 0x1 @ Set R3 to 0x1 \n\
/* 08024b6e */ STR R3, [SP] \n\
/* 08024b70 */ MOVS R3, 0x7F @ Set R3 to 0x7F \n\
/* 08024b72 */ STR R3, [SP, 0x4] \n\
/* 08024b74 */ MOVS R3, 0x0 @ Set R3 to 0x0 \n\
/* 08024b76 */ STR R3, [SP, 0x8] \n\
/* 08024b78 */ BL sprite_set_anim \n\
/* 08024b7c */ LDR R0, [R6] \n\
/* 08024b7e */ LDR R1, [R5] \n\
/* 08024b80 */ ADDS R1, R1, R4 @ Set R1 to R1 + R4 \n\
/* 08024b82 */ MOVS R2, 0x0 @ Set R2 to 0x0 \n\
/* 08024b84 */ LDRSH R1, [R1, R2] \n\
/* 08024b86 */ MOVS R2, 0x1 @ Set R2 to 0x1 \n\
/* 08024b88 */ BL sprite_set_visible \n\
 \n\
branch_08024b8c: \n\
/* 08024b8c */ ADD SP, 0xC \n\
/* 08024b8e */ POP {R4-R6} \n\
/* 08024b90 */ POP {R0} \n\
/* 08024b92 */ BX R0 \n\
\n\
.ltorg \n\
.balign 4, 0 \n\
.syntax divided");


from dolfin import *
import mpi4py.MPI

k1 = 10
k2 = 10

comm = mpi4py.MPI.COMM_WORLD
mesh = UnitDiscMesh.create(comm, 10, 2, 2)

# Build function space with Lagrange multiplier
P1 = FiniteElement("Lagrange", mesh.ufl_cell(), 1)
R = FiniteElement("Real", mesh.ufl_cell(), 0)
W = FunctionSpace(mesh, P1 * R)

# Define variational problem
(u, c) = TrialFunction(W)
(v, d) = TestFunctions(W)
eps = 0.1
t = 0
f1 = Expression('x[0] < -0.5 + eps && x[0] > -0.5 - eps && x[1] < -0.5 + eps && x[1] > -0.5 - eps ? sin(k1 * t) : 0', k1=k1, eps=eps, t=t, degree=1)
f2 = Expression('x[0] < 0 + eps && x[0] > 0 - eps && x[1] < 0.5 + eps && x[1] > 0.5 - eps ? sin(k2 * t) : 0', k2=k2, eps=eps, t=t, degree=1)
f3 = Expression('x[0] < 0.5 + eps && x[0] > 0.5 - eps && x[1] < -0.5 + eps && x[1] > -0.5 - eps ? sin(k1 * t) + sin(k2 * t) : 0', k1=k1, k2=k2, eps=eps, t=t, degree=1)

g = Expression("0", degree=2)
w = Function(W)
a = (inner(grad(u), grad(v)) + c * v + u * d) * dx
L = (f1 + f2 - f3) * v * dx

file = File("StandingWaves/StandingWaves3Sources.pvd")
dt = 0.01
while t <= 2:
    f1.t = t
    f2.t = t
    f3.t = t
    solve(a == L, w)
    (u, c) = w.split()
    file << (u, t)
    print(t)
    t += dt


# Fibonacci Sequence Calculator in RISC-V Assembly
# Calculates the first 10 numbers in the Fibonacci sequence

.text
main:
    # Initialize registers
    addi x1, x0, 0      # x1 = 0 (first Fibonacci number)
    addi x2, x0, 1      # x2 = 1 (second Fibonacci number)
    addi x3, x0, 10     # x3 = 10 (counter)
    addi x4, x0, 0      # x4 = 0 (current index)

    # Print first two numbers (assuming they're already in x1 and x2)

fibonacci_loop:
    # Check if we've calculated enough numbers
    beq x4, x3, end_program

    # Calculate next Fibonacci number: x5 = x1 + x2
    add x5, x1, x2

    # Update f


ut[0] = inout[0].booleanValue() && in.booleanValue();

	}

	public static void pBOOLEAN(boolean in, boolean[] inout, boolean[] out) throws SQLException {

		if (out[0] != false)
			throw new SQLException ("pBOOLEAN expected out[] to be null");

		out[0] = in;
		inout[0] =inout[0] && in;

	}
	public static void oALLINT(Integer in, Integer[] inout, Integer[] out) throws SQLException {

		if (out[0] != null)
			throw new SQLException ("oALLINT expected out[] to be null");

		out[0] = in;
		if (in == null)
			;//inout[0] = null;
		else if (inout[0] == null)
			inout[0] = 3 * in.intValue();
		else
			inout[0] = inout[0].intValue() + in.intValue();
	}
	public static void pTINYINT(byte in, byte[] inout, byte[] out) throws SQLException {

		out[0] = in;
		inout[0] += in;
	}
	public static void pSMALLINT(short in, short[] inout, short[] out) throws SQLException {

		out[0] = in;
		inout[0] += in;
	}

	/*
	** Procedures for testing literals passed to procedures as IN parameters
	*/

	public static void literalTest(int p1, String[] p2) {
		p2[0] = ">" + Integer.toString(p1) + "<";
	}
	public static void literalTest(long p1, String[] p2) {
		p2[0] = ">" + Long.toString(p1) + "<";
	}
	public static void literalTest(float p1, String[] p2) {
		p2[0] = ">" + Float.toString(p1) + "<";
	}
	public static void literalTest(double p1, String[] p2) {
		p2[0] = ">" + Double.toString(p1) + "<";
	}
	public static void literalTest(BigDecimal p1, String[] p2) {
		String s = p1 == null ? "NULL" : p1.toString();
		p2[0] = ">" + s + "<";
	}
	public static void literalTest(String p1, String[] p2) {
		String s = p1 == null ? "NULL" : p1.toString();
		p2[0] = ">" + s + "<";
	}
	public static void literalTest(java.sql.Date p1, String[] p2) {
		String s = p1 == null ? "NULL" : p1.toString();
		p2[0] = ">" + s + "<";
	}
	public static void literalTest(java.sql.Time p1, String[] p2) {
		String s = p1 == null ? "NULL" : p1.toString();
		p2[0] = ">" + s + "<";
	}
	public static void literalTest(java.sql.Timestamp p1, String[] p2) {

		String s = p1 == null ? "NULL" : p1.toString();
		p2[0] = ">" + s + "<";
	}

	/*
	** Procedure which uses BigDecimal - for parameter mapping testing.
	*/

	public static void pmap(BigDecimal in, BigDecimal[] inout, BigDecimal[] out) {
		inout[0] = inout[0].add(new BigDecimal(2.3));
		out[0] = new BigDecimal(84.1);
	}

	public static int countRows(String schema, String table) throws SQLException
	{
		Connection conn = DriverManager.getConnection("jdbc:default:connection");
		Statement s = conn.createStatement();
		ResultSet rs = s.executeQuery("SELECT COUNT(*) FROM " + schema + "." + table);
		rs.next();
		int count = rs.getInt(1);
		rs.close();
		s.close();


px;
  position: relative;
  padding: 0 4px;
  background: light-dark(#ccc, #333);
  color: light-dark(white, black);
}
.missing-if-branch .typ,
.skip-if-branch .typ {
  color: inherit !important;
}
.coverage-summary {
  border-collapse: collapse;
  width: 100%;
}
.coverage-summary tr {
  border-bottom: 1px solid light-dark(#bbb, #444);
}
.keyline-all {
  border: 1px solid light-dark(#ddd, #222);
}
.coverage-summary td,
.coverage-summary th {
  padding: 10px;
}
.coverage-summary tbody {
  border: 1px solid light-dark(#bbb, #444);
}
.coverage-summary td {
  border-right: 1px solid light-dark(#bbb, #444);
}
.coverage-summary td:last-child {
  border-right: none;
}
.coverage-summary th {
  text-align: left;
  font-weight: normal;
  white-space: nowrap;
}
.coverage-summary th.file {
  border-right: none !important;
}
.coverage-summary th.pct {
}
.coverage-summary th.pic,
.coverage-summary th.abs,
.coverage-summary td.pct,
.coverage-summary td.abs {
  text-align: right;
}
.coverage-summary td.file {
  white-space: nowrap;
}
.coverage-summary td.pic {
  min-width: 120px !important;
}
.coverage-summary tfoot td {
}

.coverage-summary .sorter {
  height: 10px;
  width: 7px;
  display: inline-block;
  margin-left: 0.5em;
  background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
}
.coverage-summary .sorted .sorter {
  background-position: 0 -20px;
}
.coverage-summary .sorted-desc .sorter {
  background-position: 0 -10px;
}
.status-line {
  height: 10px;
}
/* yellow */
.cbranch-no {
  background: light-dark(yellow, #cc0) !important;
  color: #111;
}
/* dark red */
.red.solid,
.status-line.low,
.low .cover-fill {
  background: light-dark(#c21f39, #a5162e);
}
.low .chart {
  border: 1px solid light-dark(#c21f39, #a5162e);
}
.highlighted,
.highlighted .cstat-no,
.highlighted .fstat-no,
.highlighted .cbranch-no {
  background: light-dark(#c21f39, #a5162e) !important;
}
/* medium red */
.cstat-no,
.fstat-no,
.cbranch-no,
.cbranch-no {
  background: light-dark(#f6c6ce, #553339);
}
/* light red */
.low,
.cline-no {
  background: light-dark(#fce1e5, #2e2023);
}
/* light green */
.high,
.cline-yes {
  background: light-dark(#e6f5d0, #25291f);
}
/* medium green */
.cstat-yes {
  background: light-dark(#a1d76a, #293b18);
}
/* dark green */
.status-line.high,
.high .cover-fill {
  background: light-dark(#4d9221, #2a5211);
}
.high .chart {
  border: 1px solid light-dark(#4d9221,


.Logicallabel, label) {
			return &aa.IoBundleList[i]
		}
	}
	return nil
}

// LookupIoBundleGroup returns an empty slice if not found
// Returns pointers into aa
func (aa *AssignableAdapters) LookupIoBundleGroup(group string) []*IoBundle {
	var list []*IoBundle
	if group == "" {
		return list
	}
	for i, b := range aa.IoBundleList {
		if b.AssignmentGroup == "" {
			continue
		}
		if strings.EqualFold(b.AssignmentGroup, group) {
			list = append(list, &aa.IoBundleList[i])
		}
	}
	return list
}

// LookupIoBundleAny returns an empty slice if not found; name can be
// a member phylabel, logicallabel, or a group
// Returns pointers into aa
func (aa *AssignableAdapters) LookupIoBundleAny(name string) []*IoBundle {
	list := aa.LookupIoBundleGroup(name)
	if len(list) != 0 {
		return list
	}
	ib := aa.LookupIoBundlePhylabel(name)
	if ib == nil {
		ib = aa.LookupIoBundleLogicallabel(name)
		if ib == nil {
			return list
		}
	}
	if ib.AssignmentGroup == "" {
		// Singleton
		list = append(list, ib)
		return list
	}
	return aa.LookupIoBundleGroup(ib.AssignmentGroup)
}

// LookupIoBundleIfName checks for IoNet* types and a ifname match
func (aa *AssignableAdapters) LookupIoBundleIfName(ifname string) *IoBundle {
	for i, b := range aa.IoBundleList {
		if b.Type.IsNet() && strings.EqualFold(b.Ifname, ifname) {
			return &aa.IoBundleList[i]
		}
	}
	return nil
}

// ErrOwnParent describes an error where an IoBundle is parent of itself
type ErrOwnParent struct{}

func (ErrOwnParent) Error() string {
	return "IOBundle cannot be it's own parent"
}

// ErrParentAssigngrpMismatch describes an error where an IoBundle has a mismatch with the parentassigngrp
type ErrParentAssigngrpMismatch struct{}

func (ErrParentAssigngrpMismatch) Error() string {
	return "IOBundle with parentassigngrp mismatch found"
}

// ErrEmptyAssigngrpWithParent describes an error where an IoBundle without assigngrp has a parentassingrp
type ErrEmptyAssigngrpWithParent struct{}

func (ErrEmptyAssigngrpWithParent) Error() string {
	return "IOBundle with empty assigngrp cannot have a parent"
}

// ErrCycleDetected describes an error where an IoBundle has cycles with parentassigngrp
type ErrCycleDetected struct{}

func (ErrCycleDetected) Error() string {
	return "Cycle detected, please check provided parentassigngrp/assigngrp"
}

// CheckParentAssigngrp finds dependency loops between ioBundles and sets/clears the error
func (aa *AssignableAdapters) CheckParentAssigngrp() bool {
	assigngrp2parent := make(map[string]string)

	for i := range aa.IoBundleList {
		ioBundle := &aa.IoBundleList[i]
		for _, parentAssigngrpErr := range []error{
			ErrOwnParent{},
			ErrParentAssigngrpMismatch{},
			ErrEmptyAssigngrpWithParent{},
			ErrCycleDetected{},
		} {
			ioBundle.Error.removeByType(parentAssigngrpErr)
		}
	}

	var cycleDetectedAssigngrp string
	for i := range aa.IoBundleList {
		ioBundle := &aa.IoBundleList[i]

		if ioBundle.AssignmentGroup == ioBundle.ParentAssignmentGroup && ioBundle.AssignmentGroup != "" {
			ioBundle.Error.Append(ErrOwnParent{})


   if (isVote) {
                _onVote(false);
              } else {
                _onSendToCouncil(false);
              }
            },
          )
        ],
        cancelButton: CupertinoActionSheetAction(
          child: Text(I18n.of(context).home['cancel']),
          onPressed: () {
            Navigator.of(context).pop();
          },
        ),
      ),
    );
  }

  Future<void> _onSendToCouncil(bool approve) async {
    var dic = I18n.of(context).gov;
    final SpendProposalData proposal =
        ModalRoute.of(context).settings.arguments;
    final String txName =
        'treasury.${approve ? 'approveProposal' : 'rejectProposal'}';
    var args = {
      "title": approve ? dic['treasury.approve'] : dic['treasury.reject'],
      "txInfo": {"module": 'council', "call": 'propose', "txName": txName},
      "detail": jsonEncode({"proposal": txName, "proposal_id": proposal.id}),
      "params": [proposal.id],
      'onFinish': (BuildContext txPageContext, Map res) {
        Navigator.popUntil(
            txPageContext, ModalRoute.withName(TreasuryPage.route));

        globalProposalsRefreshKey.currentState.show();
      }
    };
    Navigator.of(context).pushNamed(TxConfirmPage.route, arguments: args);
  }

  Future<void> _onVote(bool approve) async {
    var dic = I18n.of(context).gov;
    final SpendProposalData proposal =
        ModalRoute.of(context).settings.arguments;
    final CouncilMotionData councilProposal = proposal.council[0];
    var args = {
      "title": dic['treasury.vote'],
      "txInfo": {
        "module": 'council',
        "call": 'vote',
      },
      "detail": jsonEncode({
        "councilHash": councilProposal.hash,
        "councilId": councilProposal.votes.index,
        "voteValue": approve,
      }),
      "params": [
        councilProposal.hash,
        councilProposal.votes.index,
        approve,
      ],
      'onFinish': (BuildContext txPageContext, Map res) {
        Navigator.popUntil(
            txPageContext, ModalRoute.withName(TreasuryPage.route));

        globalProposalsRefreshKey.currentState.show();
      }
    };
    Navigator.of(context).pushNamed(TxConfirmPage.route, arguments: args);
  }

  @override
  Widget build(BuildContext context) {
    final Map dic = I18n.of(context).gov;
    final String symbol = widget.store.settings.networkState.tokenSymbol ?? '';
    final int decimals = widget.store.settings.networkState.tokenDecimals ??
        kusama_token_decimals;
    final SpendProposalData proposal =
        ModalRoute.of(context).settings.arguments;
    final AccountData proposer = AccountData();
    final AccountData beneficiary = AccountData();
    proposer.address = proposal.proposal.proposer;
    beneficiary.address = proposal.proposal.beneficiary;
    final Map accInfoProposer =
        widget.store.account.addressIndexMap[proposer.address];
    final Map accInfoBeneficiary =
        widget.store.account.addressIndexMap[beneficiary.address];
    bool isCouncil = false;
    widget.store.gov.council.members.forEach((e) {
      if (widget.store.account.currentAddress == e[0]) {
        isCouncil = true;
      }
    });
    final bool isApproval = proposal.isApproval ?? false;
    final bool hasProposals = proposal.council.length > 0;
    bool isVoted


// 检查是否曾经预约过
            foreach (XmlElement node in nodes)
            {
                // XmlNode node = nodes[i];
                string strItems = DomUtil.GetAttr(node, "items");

                string[] barcodes = strItems.Split(new char[] { ',' });
                foreach (string barcode in barcodes)
                {
                    string strBarcode = barcode.Trim();
                    if (String.IsNullOrEmpty(strBarcode) == true)
                        continue;

                    foreach (string newbarcode in newbarcodes)
                    {
                        string strNewBarcode = newbarcode.Trim();
                        if (String.IsNullOrEmpty(strNewBarcode) == true)
                            continue;

                        if (strNewBarcode == strBarcode)
                        {
                            // text-level: 用户提示
                            strError = string.Format(this.GetString("册条码号s已经被预约过"), // "册条码号 '{0}' 已经被预约过..."
                                strNewBarcode);
                            // "册条码号 '" + strNewBarcode + "' 已经被预约过...";
                            return 1;
                        }

                    } // end of newbarcodes

                } // end for barcode

            } // end for nodes

            // 检查是否正被当前读者借阅
            nodes = readerdom.DocumentElement.SelectNodes("borrows/borrow");
            foreach (XmlElement node in nodes)
            {
                // XmlNode node = nodes[i];

                string strItemBarcode = DomUtil.GetAttr(node, "barcode");
                if (String.IsNullOrEmpty(strItemBarcode) == true)
                    continue;

                foreach (string newbarcode in newbarcodes)
                {
                    string strNewBarcode = newbarcode.Trim();
                    if (String.IsNullOrEmpty(strNewBarcode) == true)
                        continue;

                    if (strNewBarcode == strItemBarcode)
                    {
                        // text-level: 用户提示
                        strError = string.Format(this.GetString("册s已经被当前读者借阅"),   // "册 '{0}' 已被当前读者借阅，因此不能被预约..."
                            strNewBarcode);
                        // "册 '" + strNewBarcode + "' 已被当前读者借阅，因此不能被预约...";
                        return 1;
                    }
                } // end of newbarcodes
            } // end for nodes

#if NO
            // 检查册是否允许借出?
            foreach (string newbarcode in newbarcodes)
            {
                string strNewBarcode = newbarcode.Trim();
                if (String.IsNullOrEmpty(strNewBarcode) == true)
                    continue;

            }
#endif

            return 0;
        }

        // 在册记录中加入预约信息
        // TODO: 要关注本函数到底保存了 itemdom 代表的册记录没有？因为这样会引起时间戳发生变化
        // parameters:
        //      strFunction "new"新增预约信息；"delete"删除预约信息
        //      bOnShelf    strFunction为"new"的情况下，如果册本来就没有人借阅，并且当前读者为预约该册的第一人，则bOnShelf返回true
        //      bArrived    strFunciont为"delete"的情况下，删除了状态为"arrived"的预约请求
        public int DoReservationItemXml(
            CachedRecordCollection records,
            RmsChannel channel,
            string strFunction,
            string strReaderBarcode,
            string strOperator,
            ref XmlDocument itemdom,
            out bool bOnShelf,
            out bool bArriv


    PrintLevel low_lvl = level == ALWAYS ? ALWAYS : PrintLevel(level-1);
    printout(level,m_tag,"+++ Hit Collection: %s  # Calorimeter hits %d",container.c_str(),int(hits->size()));
    for(const CalorimeterHit* hit : *hits)
      print(low_lvl, hit);
    return;
  }
}
//==========================================================================
//  AIDA Detector description implementation
//--------------------------------------------------------------------------
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
// All rights reserved.
//
// For the licensing terms see $DD4hepINSTALL/LICENSE.
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
//
//  \author Markus Frank
//  \date   2015-11-03
//
//==========================================================================

// Framework include files
#include <DDG4/Factories.h>
#include <DDG4/Python/Geant4PythonAction.h>
#include <DDG4/Python/Geant4PythonCall.h>
#include <DDG4/Python/DDPython.h>

using namespace dd4hep::sim;

DECLARE_GEANT4ACTION(Geant4PythonAction)

/// Standard constructor, initializes variables
Geant4PythonAction::Geant4PythonAction(Geant4Context* ctxt, const std::string& nam)
  : Geant4Action(ctxt,nam)
{
  m_needsControl = true;
}

/// Execute command in the python interpreter. Directly forwarded to TPython.
int Geant4PythonAction::exec(const std::string& cmd)   {
  return DDPython::instance().execute(cmd);
}

/// Execute command in the python interpreter.
int Geant4PythonAction::eval(const std::string& cmd)   {
  return DDPython::instance().evaluate(cmd);
}

/// Execute command in the python interpreter.
int Geant4PythonAction::runFile(const std::string& cmd)   {
  return DDPython::instance().runFile(cmd);
}

/// Execute command in the python interpreter.
int Geant4PythonAction::call(PyObject* method, PyObject* args)  {
  return Geant4PythonCall().execute<int>(method,args);
}

/// Invoke command prompt
void Geant4PythonAction::prompt()   {
  DDPython::instance().prompt();
}
//==========================================================================
//  AIDA Detector description implementation
//--------------------------------------------------------------------------
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
// All rights reserved.
//
// For the licensing terms see $DD4hepINSTALL/LICENSE.
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
//
// Author     : M.Frank
//
//==========================================================================

// Framework include files
#include "run_plugin.h"

//______________________________________________________________________________
int main(int argc,char** argv)  {
  std::vector<const char*> av;
  std::string level, visopt, opt, detector;
  bool dry = false;
  for(int i=0; i<argc; ++i)  {
    if ( i==1 && argv[i][0] != '-' ) av.emplace_back("-input");
    if      ( strncmp(argv[i],"-load-only",4) == 0 ) dry = true, av.emplace_back(argv[i]);
    else if ( strncmp(argv[i],"-dry-run",4)   == 0 ) dry = true, av.emplace_back(argv[i]);
    else if ( strncmp(


  return this.unlockedSpells[pos];
  }

  provide(_x: number, _y: number, greed = false): IItem[] {
    // see https://github.com/TwoAbove/noita-tools/issues/270
    const x = new D(_x).toSD(6).toNumber();
    const y = new D(_y).toSD(6).toNumber();
    const rand_x = x + 509.7;
    const rand_y = y + 683.1;
    this.randoms.SetRandomSeed(rand_x, rand_y);
    const entities: PartialExcept<IItem, "entity">[] = [];
    let count = 1;
    while (count > 0) {
      count--;
      let rnd = this.randoms.Random(1, 100);
      if (rnd <= 7) {
        // Bomb
        entities.push({
          entity: "data/entities/misc/custom_cards/bomb.xml",
        });
      } else if (rnd <= 40) {
        // Gold
        let amount = 5;
        rnd = this.randoms.Random(0, 100);
        if (rnd <= 80) {
          amount = 7;
        } else if (rnd <= 95) {
          amount = 10;
        } else if (rnd <= 100) {
          amount = 20;
        }
        rnd = this.randoms.Random(0, 100);
        if (rnd > 30 && rnd <= 80) {
          entities.push({
            entity: "data/entities/items/pickup/goldnugget_50.xml",
            x: x + this.randoms.Random(-10, 10),
            y: y - 4 + this.randoms.Random(-10, 5),
          });
        } else if (rnd <= 95) {
          entities.push({
            entity: "data/entities/items/pickup/goldnugget_200.xml",
            x: x + this.randoms.Random(-10, 10),
            y: y - 4 + this.randoms.Random(-10, 5),
          });
        } else if (rnd <= 99) {
          entities.push({
            entity: "data/entities/items/pickup/goldnugget_1000.xml",
            x: x + this.randoms.Random(-10, 10),
            y: y - 4 + this.randoms.Random(-10, 5),
          });
        } else {
          let tamount = this.randoms.Random(1, 3);
          for (let i = 1; i <= tamount; i++) {
            entities.push({
              entity: "data/entities/items/pickup/goldnugget_50.xml",
              x: x + this.randoms.Random(-10, 10),
              y: y - 4 + this.randoms.Random(-10, 5),
            });
          }
          if (this.randoms.Random(0, 100) > 50) {
            tamount = this.randoms.Random(1, 3);
            for (let i = 1; i <= tamount; i++) {
              entities.push({
                entity: "data/entities/items/pickup/goldnugget_200.xml",
                x: x + this.randoms.Random(-10, 10),
                y: y - 4 + this.randoms.Random(-10, 5),
              });
            }
          }
          if (this.randoms.Random(0, 100) > 80) {
            tamount = this.randoms.Random(1, 3);
            for (let i = 1; i <= tamount; i++) {
              entities.push({
                entity: "data/entities/items/pickup/goldnugget_1000.xml",
                x: x + this.randoms.Random(-10, 10),
                y: y - 4 + this.randoms.Random(-10, 5),
              });
            }
          }
        }
        for (let i = 1; i <= amount; i++) {
          entities.push({
            entity: "data/entities/items/pickup/goldnugget.xml",
            x: x


=====================================
 */

/* ###################### Global Styles ########################## */

/* ++++++ Remove these to have ONLY the main IDE shell dark ++++++ */

TabFolder,
TabFolder > Composite > TabFolder,
TabFolder > Composite > * > TabFolder,
DocCommentOwnerComposite > Group > TabFolder,
TabFolder > Composite > ScrolledComposite > TabFolder,
Shell > Composite > Composite > TabFolder,
Composite > Composite > Composite > Group > TabFolder,
Shell > Composite > Composite > Composite > TabFolder,
ScrolledComposite > Composite > Composite > Composite > TabFolder,
Shell > Composite > Composite > Composite > Composite > Composite > TabFolder,
Shell[style~='SWT.RADIO'][style~='SWT.CASCADE'][style~='SWT.SHADOW_ETCHED_IN'][style~='SWT.SHADOW_ETCHED_OUT'][style~='SWT.RESIZE'][style~='SWT.MENU'][style~='SWT.FULL_SELECTION'][style~='SWT.DATE'] > Composite > TabFolder,
Shell[style~='SWT.RADIO'][style~='SWT.CASCADE'][style~='SWT.SHADOW_ETCHED_IN'][style~='SWT.SHADOW_ETCHED_OUT'][style~='SWT.RESIZE'][style~='SWT.MENU'][style~='SWT.FULL_SELECTION'][style~='SWT.DATE'] > Composite > * > TabFolder {
    /* background-color is not applied to the whole button,
       but text color is changed, so it appear light on light */
    background-color: #515658;
    color: #222;
}

Button,
Composite > Button,
TabFolder > Composite > Button,
TabFolder > Composite > * > Button,
DocCommentOwnerComposite > Group > Button,
TabFolder > Composite > ScrolledComposite > Button,
Shell > Composite > Composite > Button,
Composite > Composite > Composite > Group > Button,
Shell > Composite > Composite > Composite > Button,
ScrolledComposite > Composite > Composite > Composite > Button,
Shell > Composite > Composite > Composite > Composite > Composite > Button,
Shell[style~='SWT.RADIO'][style~='SWT.CASCADE'][style~='SWT.SHADOW_ETCHED_IN'][style~='SWT.SHADOW_ETCHED_OUT'][style~='SWT.RESIZE'][style~='SWT.MENU'][style~='SWT.FULL_SELECTION'][style~='SWT.DATE'] > Composite > Button,
Shell[style~='SWT.RADIO'][style~='SWT.CASCADE'][style~='SWT.SHADOW_ETCHED_IN'][style~='SWT.SHADOW_ETCHED_OUT'][style~='SWT.RESIZE'][style~='SWT.MENU'][style~='SWT.FULL_SELECTION'][style~='SWT.DATE'] > Composite > * > Button,
Form > LayoutComposite > LayoutComposite > Button,
.MPart Button,
.MPartStack.active .MPart Button,
.MPart LayoutComposite > * > LayoutComposite > Section > LayoutComposite > Button,
.MPartStack.active .MPart LayoutComposite > * > LayoutComposite > Section > LayoutComposite > Button {
    /* background-color is not applied to the whole button,
       but text color is changed, so it appear light on light */
    background-color: #515658;
    color: #222;
}
Button[style~='SWT.CHECK'],
Composite > Button[style~='SWT.CHECK'],
TabFolder > Composite > Button[style~='SWT.CHECK'],


\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,Ai);break;case"sqrtSize3":r=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,Ai);break;case"sqrtSize4":r=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,Ai);break;case"sqrtTall":r=function(e,t,n){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(n-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t


RTV_FM_ENABLE) \
	|| defined(RTV_DAB_ENABLE) \
	|| defined(RAONTV_CHIP_PKG_WLCSP) \
	|| defined(RAONTV_CHIP_PKG_LGA)
#error "Not support parallel TSIF!"
#endif

#if defined(RTV_TDMB_ENABLE) && (RTV_MAX_NUM_SUB_CHANNEL_USED > 1)
#error "Not support T-DMB multi sub channel mode!"
#endif

#if defined(RTV_DAB_ENABLE) && (RTV_MAX_NUM_SUB_CHANNEL_USED > 1)
#error "Not support DAB multi sub channel mode!"
#endif
#endif

#if defined(RTV_IF_SPI) || defined(RTV_IF_EBI2)
#if !defined(RTV_MSC_INTR_MEM_ACC_CLR_MODE) \
	&& !defined(RTV_MSC_INTR_ISTAUS_ACC_CLR_MODE)
#error " Should selects an interrupt clear mode"
#endif

#if defined(RTV_MSC_INTR_MEM_ACC_CLR_MODE) \
	&& defined(RTV_MSC_INTR_ISTAUS_ACC_CLR_MODE)
#error " Should selects an interrupt clear mode"
#endif
#endif

#if defined(RTV_DAB_ENABLE) && defined(RTV_TDMB_ENABLE)
#error "Should select RTV_DAB_ENABLE(B3, L-BAND, B3-Korea) "
	"or RTV_TDMB_ENABLE(B3-Korea)"
#endif

#if defined(RTV_CIF_HEADER_INSERTED) && !defined(RTV_CIF_MODE_ENABLED)
#error "Should defines RTV_CIF_MODE_ENABLED"
#endif

void rtvOEM_ConfigureInterrupt(void);
void rtvOEM_PowerOn(int on);

#ifdef __cplusplus
}
#endif

#endif /* __RAONTV_PORT_H__ */


eturn ERR_PTR(-EINVAL);

	return device_node_get_regmap(np, true);
}
EXPORT_SYMBOL_GPL(syscon_node_to_regmap);

struct regmap *syscon_regmap_lookup_by_compatible(const char *s)
{
	struct device_node *syscon_np;
	struct regmap *regmap;

	syscon_np = of_find_compatible_node(NULL, NULL, s);
	if (!syscon_np)
		return ERR_PTR(-ENODEV);

	regmap = syscon_node_to_regmap(syscon_np);
	of_node_put(syscon_np);

	return regmap;
}
EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_compatible);

struct regmap *syscon_regmap_lookup_by_phandle(struct device_node *np,
					const char *property)
{
	struct device_node *syscon_np;
	struct regmap *regmap;

	if (property)
		syscon_np = of_parse_phandle(np, property, 0);
	else
		syscon_np = np;

	if (!syscon_np)
		return ERR_PTR(-ENODEV);

	regmap = syscon_node_to_regmap(syscon_np);

	if (property)
		of_node_put(syscon_np);

	return regmap;
}
EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_phandle);

struct regmap *syscon_regmap_lookup_by_phandle_args(struct device_node *np,
					const char *property,
					int arg_count,
					unsigned int *out_args)
{
	struct device_node *syscon_np;
	struct of_phandle_args args;
	struct regmap *regmap;
	unsigned int index;
	int rc;

	rc = of_parse_phandle_with_fixed_args(np, property, arg_count,
			0, &args);
	if (rc)
		return ERR_PTR(rc);

	syscon_np = args.np;
	if (!syscon_np)
		return ERR_PTR(-ENODEV);

	regmap = syscon_node_to_regmap(syscon_np);
	for (index = 0; index < arg_count; index++)
		out_args[index] = args.args[index];
	of_node_put(syscon_np);

	return regmap;
}
EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_phandle_args);

/*
 * It behaves the same as syscon_regmap_lookup_by_phandle() except where
 * there is no regmap phandle. In this case, instead of returning -ENODEV,
 * the function returns NULL.
 */
struct regmap *syscon_regmap_lookup_by_phandle_optional(struct device_node *np,
					const char *property)
{
	struct regmap *regmap;

	regmap = syscon_regmap_lookup_by_phandle(np, property);
	if (IS_ERR(regmap) && PTR_ERR(regmap) == -ENODEV)
		return NULL;

	return regmap;
}
EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_phandle_optional);

static int syscon_probe(struct platform_device *pdev)
{
	struct device *dev = &pdev->dev;
	struct syscon_platform_data *pdata = dev_get_platdata(dev);
	struct syscon *syscon;
	struct regmap_config syscon_config = syscon_regmap_config;
	struct resource *res;
	void __iomem *base;

	syscon = devm_kzalloc(dev, sizeof(*syscon), GFP_KERNEL);
	if (!syscon)
		return -ENOMEM;

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (!res)
		return -ENOENT;

	base = devm_ioremap(dev, res->start, resource_size(res));
	if (!base)
		return -ENOMEM;

	syscon_config.max_register = resource_size(res) - 4;
	if (pdata)
		syscon_config.name = pdata->label;
	syscon->regmap = devm_regmap_init_mmio(dev, base, &syscon_config);
	if (IS_ERR(syscon->regmap)) {
		dev_err(dev, "regmap init failed\n");
		return PTR_ERR(syscon->regmap);
	}

	platform_set_drvdata(pdev, syscon);

	dev_dbg(dev, "regmap %pR registered\n", res);

	return 0;
}

static const struct platform_device_id syscon_ids[] = {
	{ "syscon", },
	{ }
};

static struct platform_driver syscon_driver = {
	.driver = {
		.name = "syscon",
	},
	.probe		= syscon_probe,
	.id_table	= syscon_ids,
};

static int __init syscon_init(void)
{
	return platform_driver_register(&syscon_driver);
}
postcore_initcall(syscon_init);


.723-1.62 1.344-2.75a2.136 2.136 0 00-2.719-1.343l-2.656.874-1.719-5.093 2.563-.844a2.136 2.136 0 001.343-2.719c-.378-1.129-1.59-1.754-2.718-1.375l-2.532.844-.906-2.656A2.155 2.155 0 0017.656 3zm.032 9.594 1.718 5.094-5.093 1.718-1.72-5.093z"/></svg>';
  static const String slack_hash =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path fill="currentColor" d="M17.656 3a2.266 2.266 0 00-.875.125 2.136 2.136 0 00-1.343 2.719l.906 2.656-5.125 1.719-.844-2.563a2.136 2.136 0 00-2.719-1.343c-1.133.378-1.754 1.59-1.375 2.718l.844 2.531-2.656.907c-1.13.379-1.723 1.62-1.344 2.75a2.136 2.136 0 002.719 1.344l2.656-.875 1.719 5.093-2.563.844a2.136 2.136 0 00-1.343 2.719c.378 1.133 1.59 1.754 2.718 1.375l2.531-.844.907 2.656c.379 1.13 1.62 1.723 2.75 1.344a2.136 2.136 0 001.344-2.719l-.875-2.656 5.093-1.719.844 2.563a2.136 2.136 0 002.719 1.343c1.133-.378 1.754-1.59 1.375-2.718l-.844-2.532 2.656-.906c1.13-.379 1.723-1.62 1.344-2.75a2.136 2.136 0 00-2.719-1.343l-2.656.874-1.719-5.093 2.563-.844a2.136 2.136 0 001.343-2.719c-.378-1.129-1.59-1.754-2.718-1.375l-2.532.844-.906-2.656A2.155 2.155 0 0017.656 3zm.032 9.594 1.718 5.094-5.093 1.718-1.72-5.093z"/></svg>';
  static const String slash =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path fill="currentColor" d="m26.281 4.281-22 22L5.72 27.72l22-22z"/></svg>';
  static const String sleigh =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path fill="currentColor" d="M4.5 7A2.518 2.518 0 002 9.5v.5h2v-.5c0-.285.215-.5.5-.5.258 0 .5.273.5.5 0 .203


kjack ♣"
        new_embed.add_field(name="Your Hand", value=f"{player_hand_message} ({player_score})", inline=False)
        new_embed.add_field(name="Dealer's Hand", value=f"{dealer_hand_message} ({dealer_score})", inline=False)
        new_embed.description = result_message
        await interaction.response.edit_message(embed=new_embed, view=None)
        del self.game_state[message_id]

    def draw_card(self):
        return random.choice(list(card_emojis.keys()))

    def calculate_score(self, hand):
        score = 0
        num_aces = 0
        for card in hand:
            card_rank = card.split(" ")[0]
            if card_rank.isdigit():
                score += int(card_rank)
            elif card_rank in ("Jack", "Queen", "King"):
                score += 10
            elif card_rank == "Ace":
                score += 11
                num_aces += 1
        while score > 21 and num_aces:
            score -= 10
            num_aces -= 1
        return score

    def calculate_dealer_score(self, hand):
        score = 0
        num_aces = 0
        for card in hand:
            card_rank = card.split(" ")[0]
            if card_rank.isdigit():
                score += int(card_rank)
            elif card_rank in ("Jack", "Queen", "King"):
                score += 10
            elif card_rank == "Ace":
                score += 11
                num_aces += 1
        while score > 21 and num_aces:
            score -= 10
            num_aces -= 1
        return score

async def setup(bot):
    await bot.add_cog(BlackJackCog(bot))


40 0037CC40  93 A1 00 14 */	stw r29, 0x14(r1)
/* 8037FE44 0037CC44  7C 9D 23 78 */	mr r29, r4
/* 8037FE48 0037CC48  90 C3 00 00 */	stw r6, 0(r3)
/* 8037FE4C 0037CC4C  90 03 00 04 */	stw r0, 4(r3)
/* 8037FE50 0037CC50  90 03 00 08 */	stw r0, 8(r3)
/* 8037FE54 0037CC54  81 83 00 00 */	lwz r12, 0(r3)
/* 8037FE58 0037CC58  81 8C 00 10 */	lwz r12, 0x10(r12)
/* 8037FE5C 0037CC5C  7D 89 03 A6 */	mtctr r12
/* 8037FE60 0037CC60  4E 80 04 21 */	bctrl
/* 8037FE64 0037CC64  3C 80 80 4C */	lis r4, lbl_804BDE78@ha
/* 8037FE68 0037CC68  38 00 00 00 */	li r0, 0
/* 8037FE6C 0037CC6C  38 84 DE 78 */	addi r4, r4, lbl_804BDE78@l
/* 8037FE70 0037CC70  C0 02 E5 B4 */	lfs f0, lbl_805E4CB4@sda21(r2)
/* 8037FE74 0037CC74  90 9F 00 00 */	stw r4, 0(r31)
/* 8037FE78 0037CC78  3C 60 80 2D */	lis r3, func_802CD8DC@ha
/* 8037FE7C 0037CC7C  38 83 D8 DC */	addi r4, r3, func_802CD8DC@l
/* 8037FE80 0037CC80  38 A0 00 00 */	li r5, 0
/* 8037FE84 0037CC84  90 1F 00 0C */	stw r0, 0xc(r31)
/* 8037FE88 0037CC88  38 7F 00 58 */	addi r3, r31, 0x58
/* 8037FE8C 0037CC8C  38 C0 00 0C */	li r6, 0xc
/* 8037FE90 0037CC90  38 E0 00 04 */	li r7, 4
/* 8037FE94 0037CC94  90 1F 00 10 */	stw r0, 0x10(r31)
/* 8037FE98 0037CC98  90 1F 00 14 */	stw r0, 0x14(r31)
/* 8037FE9C 0037CC9C  B0 1F 00 1A */	sth r0, 0x1a(r31)
/* 8037FEA0 0037CCA0  B0 1F 00 1C */	sth r0, 0x1c(r31)
/* 8037FEA4 0037CCA4  D0 1F 00 34 */	stfs f0, 0x34(r31)
/* 8037FEA8 0037CCA8  D0 1F 00 30 */	stfs f0, 0x30(r31)
/* 8037FEAC 0037CCAC  D0 1F 00 2C */	stfs f0, 0x2c(r31)
/* 8037FEB0 0037CCB0  D0 1F 00 40 */	stfs f0, 0x40(r31)
/* 8037FEB4 0037CCB4  D0 1F 00 3C */	stfs f0, 0x3c(r31)
/* 8037FEB8 0037CCB8  D0 1F 00 38 */	stfs f0, 0x38(r31)
/* 8037FEBC 0037CCBC  D0 1F 00 4C */	stfs f0, 0x4c(r31)
/* 8037FEC0 0037CCC0  D0 1F 00 48 */	stfs f0, 0x48(r31)
/* 8037FEC4 0037CCC


y_right_shift,%esi	/ load shift proc ptr
	jmp	form_expon_difference	/ merge with sp_subadd
sp_subadd:
	mov	$sp_right_shift,%esi	/ load shift proc ptr
form_expon_difference:
	mov	dword_expon1,%ecx
	sub	dword_expon2,%ecx
	js	expon2_larger
	cmp	$67,%ecx			/set cl to shift amount =
	jbe	adjust_frac2		/min(67,expon1-expon2)
	mov	$67,%ecx
adjust_frac2:
	movb	$0x00,%al			/al = bit to inject from left
	mov	$offset_operand2,%edi
	push	%esi
	call	*%esi			/shift op2 fraction
	pop	%esi
	mov	expon1(%ebp),%eax		/set result expon to expon1
	mov	%eax,result_expon(%ebp)
	cmpb	special, tag1(%ebp)
	je	determine_operation_true
	testb	$0x80,msb_frac1
	jnz	determine_operation_true / branch if frac1 is normal
	jmp	frac2_normal_	/ test frac2
expon2_larger:
	neg	%ecx			/set cl to shift amount
	cmp	$67,%ecx
	jbe	adjust_frac1
	mov	$67,%ecx
adjust_frac1:
	push	%ecx			/save shift amount
	movb	$0x00,%al			/al = bit to inject
	mov	$offset_operand1,%edi
	call	*%esi
	mov	expon2(%ebp),%eax	/set result expon to expon2
	mov	%eax,result_expon(%ebp)
	pop	%ecx
frac2_normal_:
	cmpb	special, tag2(%ebp)
	je	determine_operation_true
	movb	false,%al
	testb	$0x80,msb_frac2	/ set al to true if frac2 is
	jz	determine_operation	/ normalized
determine_operation_true:
	movb	true,%al
determine_operation:
	cmpb	$sub_op,operation_type(%ebp) /if op=sub_op, negate op2
	jne	add_or_sub_
	notb	sign2(%ebp)
add_or_sub_:
	movb	sign1(%ebp),%ah
	cmpb	sign2(%ebp),%ah
	jne	do_subtraction
	call	addx			/do fractional add
	mov	$offset_result,%edi
	call	addition_normalize	/normalize result after add
	movb	sign1(%ebp),%al
	movb	%al,result_sign(%ebp)	/set result sign to sign1
	testb	$0x80, msb_result
	jnz	add_done
	mov	$offset_result, %edi
	call	test_6w
	jnz	norm_result
add_done:
	ret
do_subtraction:
	push	%eax			/save normalization indicator
	movb	sign1(%ebp),%al		/initially, set sign to sign1
	movb	%al,result_sign(%ebp)
	call	subx			/do fractional subtract
	mov	$offset_result,%edi
	cmpb	$0,%al
	mov	$0,%eax
	je	detect_zero

	not	(%ebp,%edi)		/form 2's comp of result_frac
	add	$1,(%ebp,%edi)
	not	4(%ebp,%edi)
	adc	%eax,4(%ebp,%edi)
	not	8(%ebp,%edi)
	adc	%eax,8(%ebp,%edi)
	notb	result_sign(%ebp)	/and complement result_sign
detect_zero:
	call	t


b4:	17ffe8d1 	b	44b4f8 <_IO_vfscanf+0x448>
  4511b8:	11002022 	add	w2, w1, #0x8
  4511bc:	b9015ba2 	str	w2, [x29, #344]
  4511c0:	7100005f 	cmp	w2, #0x0
  4511c4:	54fd7cac 	b.gt	44c158 <_IO_vfscanf+0x10a8>
  4511c8:	f940a7a0 	ldr	x0, [x29, #328]
  4511cc:	8b21c000 	add	x0, x0, w1, sxtw
  4511d0:	17ffebe5 	b	44c164 <_IO_vfscanf+0x10b4>
  4511d4:	11002042 	add	w2, w2, #0x8
  4511d8:	7100005f 	cmp	w2, #0x0
  4511dc:	5400022d 	b.le	451220 <_IO_vfscanf+0x6170>
  4511e0:	91003c21 	add	x1, x1, #0xf
  4511e4:	52800026 	mov	w6, #0x1                   	// #1
  4511e8:	927df021 	and	x1, x1, #0xfffffffffffffff8
  4511ec:	2a0603e7 	mov	w7, w6
  4511f0:	17fff4e3 	b	44e57c <_IO_vfscanf+0x34cc>
  4511f4:	34000067 	cbz	w7, 451200 <_IO_vfscanf+0x6150>
  4511f8:	2a0203e3 	mov	w3, w2
  4511fc:	b9019ba2 	str	w2, [x29, #408]
  451200:	34000066 	cbz	w6, 45120c <_IO_vfscanf+0x615c>
  451204:	aa0103e0 	mov	x0, x1
  451208:	f900c3a1 	str	x1, [x29, #384]
  45120c:	37f800e3 	tbnz	w3, #31, 451228 <_IO_vfscanf+0x6178>
  451210:	91003c01 	add	x1, x0, #0xf
  451214:	927df021 	and	x1, x1, #0xfffffffffffffff8
  451218:	f900c3a1 	str	x1, [x29, #384]
  45121c:	17fff1c2 	b	44d924 <_IO_vfscanf+0x2874>
  451220:	52800027 	mov	w7, #0x1                   	// #1
  451224:	17fff4d6 	b	44e57c <_IO_vfscanf+0x34cc>
  451228:	11002061 	add	w1, w3, #0x8
  45122c:	b9019ba1 	str	w1, [x29, #408]
  451230:	7100003f 	cmp	w1, #0x0
  451234:	54fffeec 	b.gt	451210 <_IO_vfscanf+0x6160>
  451238:	f940c7a0 	ldr	x0, [x29, #392]
  45123c:	8b23c000 	add	x0, x0, w3, sxtw
  451240:	17fff1b9 	b	44d924 <_IO_vfscanf


(|x| Position::try_from((x, row)).unwrap()) {
            if let Some(_) = self.get_piece(pos) {
                return false;
            }
        }

        // King must not be in check or move through a square in check
        let files_to_check = if castle_type == CastleType::Long {
            2..=4
        } else {
            4..=6
        };
        for pos in files_to_check.map(|x| Position::try_from((x, row)).unwrap()) {
            if self.is_attacked(colour, pos) {
                return false;
            }
        }
        return true;
    }

    pub fn from_san_moves(input: Vec<&str>) -> Result<Self, String> {
        let mut game = Game::new();
        for (i, x) in input.into_iter().enumerate() {
            if game.try_move_san(x).is_err() {
                return Err(format!("Cannot parse move no.{}: {}", i + 1, x));
            }
        }
        return Ok(game);
    }
}

impl Display for Game {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let result = self.display_board_as_colour(Colour::White);
        write!(f, "{}", result)
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_find_move() {
        let game = Game::new();

        // Pawn E2 -> E4
        assert_eq!(
            game.find_move("e2".try_into().unwrap(), "e4".try_into().unwrap())
                .unwrap(),
            MoveType::PawnStart
        );
        // Pawn E2 -> E3
        assert_eq!(
            game.find_move("e2".try_into().unwrap(), "e3".try_into().unwrap())
                .unwrap(),
            MoveType::PawnPush
        );
        // Knight B1 -> C3
        assert_eq!(
            game.find_move("b1".try_into().unwrap(), "c3".try_into().unwrap())
                .unwrap(),
            MoveType::Standard
        );
        // Queen D1 -> B3
        assert_eq!(
            game.find_move("d1".try_into().unwrap(), "b3".try_into().unwrap())
                .err()
                .unwrap(),
            MoveError::PositionBlocked
        );
        // Bishop F8 -> A4
        assert_eq!(
            game.find_move("f8".try_into().unwrap(), "a4".try_into().unwrap())
                .err()
                .unwrap(),
            MoveError::InvalidMovement
        );
        // Queen D1 -> E1
        assert_eq!(
            game.find_move("d1".try_into().unwrap(), "e1".try_into().unwrap())
                .err()
                .unwrap(),
            MoveError::AttackingSameColour
        );

        let game =
            Game::from_san_moves(vec!["e4", "h5", "Nf3", "h4", "Ba6", "h3", "e5", "d5"]).unwrap();
        // Short Castle: E1 -> G1
        assert_eq!(
            game.find_move("e1".try_into().unwrap(), "g1".try_into().unwrap())


(((!rd.IsPC() || OutsideITBlockAndAlOrLast(cond)) &&
            (!rd.IsPC() || !rm.IsPC())) ||
           AllowUnpredictable())) {
        EmitT32_16(0x4400 | (rd.GetCode() & 0x7) | ((rd.GetCode() & 0x8) << 4) |
                   (rm.GetCode() << 3));
        AdvanceIT();
        return;
      }
    }
  }
  Delegate(kAdd, &Assembler::add, cond, rd, operand);
}

void Assembler::adds(Condition cond,
                     EncodingSize size,
                     Register rd,
                     Register rn,
                     const Operand& operand) {
  VIXL_ASSERT(AllowAssembler());
  CheckIT(cond);
  if (operand.IsImmediate()) {
    uint32_t imm = operand.GetImmediate();
    if (IsUsingT32()) {
      ImmediateT32 immediate_t32(imm);
      // ADDS{<q>} <Rd>, <Rn>, #<imm3> ; T1
      if (OutsideITBlock() && !size.IsWide() && rd.IsLow() && rn.IsLow() &&
          (imm <= 7)) {
        EmitT32_16(0x1c00 | rd.GetCode() | (rn.GetCode() << 3) | (imm << 6));
        AdvanceIT();
        return;
      }
      // ADDS{<q>} {<Rdn>}, <Rdn>, #<imm8> ; T2
      if (OutsideITBlock() && !size.IsWide() && rd.Is(rn) && rn.IsLow() &&
          (imm <= 255)) {
        EmitT32_16(0x3000 | (rd.GetCode() << 8) | imm);
        AdvanceIT();
        return;
      }
      // ADDS{<c>}{<q>} {<Rd>}, <Rn>, #<const> ; T3
      if (!size.IsNarrow() && immediate_t32.IsValid() && !rn.Is(sp) &&
          !rd.Is(pc) && (!rn.IsPC() || AllowUnpredictable())) {
        EmitT32_32(0xf1100000U | (rd.GetCode() << 8) | (rn.GetCode() << 16) |
                   (immediate_t32.GetEncodingValue() & 0xff) |
                   ((immediate_t32.GetEncodingValue() & 0x700) << 4) |
                   ((immediate_t32.GetEncodingValue() & 0x800) << 15));
        AdvanceIT();
        return;
      }
      // ADDS{<c>}{<q>} {<Rd>}, SP, #<const> ; T3
      if (!size.IsNarrow() && rn.Is(sp) && immediate_t32.IsValid() &&
          !rd.Is(pc)) {
        EmitT32_32(0xf11d0000U | (rd.GetCode() << 8) |
                   (immediate_t32.GetEncodingValue() & 0xff) |
                   ((immediate_t32.GetEncodingValue() & 0x700) << 4) |
                   ((immediate_t32.GetEncodingValue() & 0x800) << 15));
        AdvanceIT();
        return;
      }
    } else {
      ImmediateA32 immediate_a32(imm);
      // ADDS{<c>}{<q>} {<Rd>}, <Rn>, #<const> ; A1
      if (immediate_a32.IsValid() && cond.IsNotNever() && !rn.Is(sp)) {
        EmitA32(0x02900000U | (cond.GetCondition() << 28) |
                (rd.GetCode() << 12) | (rn.GetCode() << 16) |
                immediate_a32.GetEncodingValue());
        return;
      }
      // ADDS{<c>}{<q>} {<Rd>}, SP, #<const> ; A1
      if (r


 #d24e52;
    -fx-background-radius: 14px;
}

.gitee-btn .fg-region {
    -fx-shape: "M24.1,14.2H15c-0.4,0-0.8,0.4-0.8,0.8l0,2c0,0.4,0.4,0.8,0.8,0.8c0,0,0,0,0,0l5.5,0c0.4,0,0.8,0.4,0.8,0.8  c0,0,0,0,0,0v0.2V19c0,1.3-1.1,2.4-2.4,2.4h-7.5c-0.4,0-0.8-0.4-0.8-0.8l0-7.5c0-1.3,1.1-2.4,2.4-2.4c0,0,0,0,0,0h11.1  c0.4,0,0.8-0.4,0.8-0.8l0-2c0-0.4-0.4-0.8-0.8-0.8c0,0,0,0,0,0H13c-3.3,0-5.9,2.7-5.9,5.9v11.1c0,0.4,0.4,0.8,0.8,0.8h11.7  c2.9,0,5.3-2.4,5.3-5.3V15C24.9,14.6,24.5,14.2,24.1,14.2z";
    -fx-background-color: white;
}

.gitee-btn:hover {
    -fx-background-color: rgba(250, 0, 0, 0.30);
}

.url-label {
    -fx-cursor: hand;
}
.url-label:hover {
    -fx-underline: true;
}

.donor-list-btn {
    -fx-border-color:#75A4EB;
    -fx-border-radius: 16px;
    -fx-background-radius: 16px;
    -fx-background-color: null;
    -fx-font-size: 16px;
}
.donor-list-btn:hover {
    -fx-background-color: rgba(232, 232, 232, 0.8);;
}

.donor-list-btn:pressed {
    -fx-background-color: rgb(225, 225, 225);;
}.spectrum {
    -rx-crest-pos: DOUBLE;
}

.spectrum .bar-box {
    -fx-spacing: 0px;
}

.spectrum .bar-box .bar {
    -fx-min-height: 3px;
}

.data0, .data1, .data2, .data3, .data4, .data5, .data6, .data7 {
    -fx-background-color: #3faeea;
}

.data8, .data9, .data10, .data11, .data12, .data13, .data14, .data15 {
    -fx-background-color: #42adeb;
}

.data16, .data17, .data18, .data19, .data20, .data21, .data22, .data23 {
    -fx-background-color: #5ca1eb;
}

.data24, .data25, .data26, .data27, .data28, .data29, .data30, .data31 {
    -fx-background-color: #7795ec;
}

.data32, .data33, .data34, .data35, .data36, .data37, .data38, .data39 {
    -fx-background-color: #838eeb;
}

.data40, .data41, .data42, .data43, .data44, .data45, .data46, .data47 {
    -fx-background-color: #9985ec;
}

.data48, .data49, .data50, .data51, .data52, .data53, .data54, .data55 {
    -fx-background-color: #af7bed;
}

.data56, .data57, .data58, .data59, .data60, .data61, .data62, .data63 {
    -fx-background-color: #c96ee0;
}

.data64, .data65, .data66, .data67,