	WithdrawalRoot   [32]byte
	Withdrawal       IDelegationManagerTypesWithdrawal
	SharesToWithdraw []*big.Int
	Raw              types.Log // Blockchain specific contextual infos
}

// FilterSlashingWithdrawalQueued is a free log retrieval operation binding the contract event 0x26b2aae26516e8719ef50ea2f6831a2efbd4e37dccdf0f6936b27bc08e793e30.
//
// Solidity: event SlashingWithdrawalQueued(bytes32 withdrawalRoot, (address,address,address,uint256,uint32,address[],uint256[]) withdrawal, uint256[] sharesToWithdraw)
func (_DelegationManagerStorage *DelegationManagerStorageFilterer) FilterSlashingWithdrawalQueued(opts *bind.FilterOpts) (*DelegationManagerStorageSlashingWithdrawalQueuedIterator, error) {

	logs, sub, err := _DelegationManagerStorage.contract.FilterLogs(opts, "SlashingWithdrawalQueued")
	if err != nil {
		return nil, err
	}
	return &DelegationManagerStorageSlashingWithdrawalQueuedIterator{contract: _DelegationManagerStorage.contract, event: "SlashingWithdrawalQueued", logs: logs, sub: sub}, nil
}

// WatchSlashingWithdrawalQueued is a free log subscription operation binding the contract event 0x26b2aae26516e8719ef50ea2f6831a2efbd4e37dccdf0f6936b27bc08e793e30.
//
// Solidity: event SlashingWithdrawalQueued(bytes32 withdrawalRoot, (address,address,address,uint256,uint32,address[],uint256[]) withdrawal, uint256[] sharesToWithdraw)
func (_DelegationManagerStorage *DelegationManagerStorageFilterer) WatchSlashingWithdrawalQueued(opts *bind.WatchOpts, sink chan<- *DelegationManagerStorageSlashingWithdrawalQueued) (event.Subscription, error) {

	logs, sub, err := _DelegationManagerStorage.contract.WatchLogs(opts, "SlashingWithdrawalQueued")
	if err != nil {
		return nil, err
	}
	return event.NewSubscription(func(quit <-chan struct{}) error {
		defer sub.Unsubscribe()
		for {
			select {
			case log := <-logs:
				// New log arrived, parse the event and forward to the user
				event := new(DelegationManagerStorageSlashingWithdrawalQueued)
				if err := _DelegationManagerStorage.contract.UnpackLog(event, "SlashingWithdrawalQueued", log); err != nil {
					return err
				}
				event.Raw = log

				select {
				case sink <- event:
				case err := <-sub.Err():
					return err
				case <-quit:
					return nil
				}
			case err := <-sub.Err():
				return err
			case <-quit:
				return nil
			}
		}
	}), nil
}

// ParseSlashingWithdrawalQueued is a log parse operation binding the contract event 0x26b2aae26516e8719ef50ea2f6831a2efbd4e37dccdf0f6936b27bc08e793e30.
//
// Solidity: event SlashingWithdrawalQueued(bytes32 withdrawalRoot, (address,address,address,uint256,uint32,address[],uint256[]) withdrawal, uint256[] sharesToWithdraw)
func (_DelegationManagerStorage *DelegationManagerStorageFilterer) ParseSlashingWithdrawalQueued(log types.Log) (*DelegationManagerStorageSlashingWithdrawalQueued, error) {
	event := new(DelegationManagerStorageSlashingWithdrawalQueued)
	if err := _DelegationManagerStorage.contract.UnpackLog(event, "SlashingWithdrawalQueued", log); err != nil {
		return nil, err
	}
	event.Raw = log
	return event, nil
}

// DelegationManagerStorageStakerDelegatedIterator is returned from FilterStakerDelegated and is used to iterate over the raw logs and unpacked data for StakerDelegated events raised by the DelegationManagerStorage contract.
type DelegationManagerStorageStakerDelegatedIterator struct


t decode")
		}
		m.peers.Add(createENR(), id0, ma0, network.DirInbound)
		m.peers.SetConnectionState(id0, peers.Connected)
		m.peers.SetChainState(id0, &pb.StatusV2{FinalizedEpoch: 10})
		id1, err := peer.Decode(MockRawPeerId1)
		if err != nil {
			log.WithError(err).Debug("Cannot decode")
		}
		ma1, err := ma.NewMultiaddr("/ip4/52.23.23.253/tcp/30000/ipfs/QmfAgkmjiZNZhr2wFN9TwaRgHouMTBT6HELyzE5A3BT2wK/p2p-circuit")
		if err != nil {
			log.WithError(err).Debug("Cannot decode")
		}
		m.peers.Add(createENR(), id1, ma1, network.DirOutbound)
		m.peers.SetConnectionState(id1, peers.Connected)
		m.peers.SetChainState(id1, &pb.StatusV2{FinalizedEpoch: 11})
	}
	return m.peers
}

func createENR() *enr.Record {
	key, err := crypto.GenerateKey()
	if err != nil {
		log.Error(err)
	}
	db, err := enode.OpenDB("")
	if err != nil {
		log.Error("Could not open node's peer database")
	}
	lNode := enode.NewLocalNode(db, key)
	return lNode.Node().Record()
}
package testing

import (
	"context"

	"github.com/OffchainLabs/prysm/v6/beacon-chain/p2p/encoder"
	"github.com/OffchainLabs/prysm/v6/beacon-chain/p2p/peers"
	fieldparams "github.com/OffchainLabs/prysm/v6/config/fieldparams"
	"github.com/OffchainLabs/prysm/v6/consensus-types/blocks"
	"github.com/OffchainLabs/prysm/v6/consensus-types/interfaces"
	"github.com/OffchainLabs/prysm/v6/consensus-types/primitives"
	ethpb "github.com/OffchainLabs/prysm/v6/proto/prysm/v1alpha1"
	"github.com/OffchainLabs/prysm/v6/proto/prysm/v1alpha1/metadata"
	"github.com/ethereum/go-ethereum/p2p/enode"
	"github.com/ethereum/go-ethereum/p2p/enr"
	pubsub "github.com/libp2p/go-libp2p-pubsub"
	"github.com/libp2p/go-libp2p/core/control"
	"github.com/libp2p/go-libp2p/core/host"
	"github.com/libp2p/go-libp2p/core/network"
	"github.com/libp2p/go-libp2p/core/peer"
	"github.com/multiformats/go-multiaddr"
	"google.golang.org/protobuf/proto"
)

// FakeP2P stack
type FakeP2P struct {
}

// NewFuzzTestP2P - Create a new fake p2p stack.
func NewFuzzTestP2P() *FakeP2P {
	return &FakeP2P{}
}

// Encoding -- fake.
func (*FakeP2P) Encoding() encoder.NetworkEncoding {
	return &encoder.SszNetworkEncoder{}
}

// AddConnectionHandler -- fake.
func (*FakeP2P) AddConnectionHandler(_, _ func(ctx context.Context, id peer.ID) error) {

}

// AddDisconnectionHandler -- fake.
func (*FakeP2P) AddDisconnectionHandler(_ func(ctx context.Context, id


f defined(__i386__)
  asm volatile ("lock; xchgl %0, %1"
		: "=r" (newval)
		: "m" (*oldval), "0" (newval)
		: "memory");

#elif defined(__sgi)
  newval = test_and_set (oldval, newval);

#elif defined(__x86_64__)
  // Contributed by Kurt Roeckx.
  asm volatile ("lock; xchgq %0, %1"
		: "=r" (newval)
		: "m" (*oldval), "0" (newval)
		: "memory");

#elif defined(__ppc) || defined(__powerpc__) || defined(PPC) || defined(__POWERPC__)
  // PPC assembly contributed by Maged Michael.
  int ret;
  asm volatile (
		"La..%=0:    lwarx %0,0,%1 ;"
		"      cmpw  %0,%2;"
		"      beq La..%=1;"
		"      stwcx. %2,0,%1;"
		"      bne- La..%=0;"
		"La..%=1:    isync;"
                : "=&r"(ret)
                : "r"(oldval), "r"(newval)
                : "cr0", "memory");
  return ret;

#elif defined(__arm__)
  // Contributed by Bo Granlund.
  long result;
  asm volatile (
		"\n\t"
		"swp     %0,%2,[%1] \n\t"
		""
		: "=&r"(result)
		: "r"(oldval), "r"(newval)
		: "memory");
  return (result);
#elif defined(__APPLE__)
  size_t oldValue = *oldval;
  bool swapped = OSAtomicCompareAndSwapLongBarrier (oldValue, newval, (volatile long *) oldval);
  if (swapped) {
    return newval;
  } else {
    return oldValue;
  }
#else
#error "No spin lock implementation is available for this platform."
#endif
  return newval;
}

#endif

#endif // _SPINLOCK_H_


aml};

const SERVER_ADDRESS: &str = "127.0.0.1:4774";
const SIG_KILL: &str = "kill\0";
const SIG_CHALLENGE: &str = "lost\0";
const SIG_RESPONSE: &str = "found\0";

pub fn start(clap_config: &'static Yaml) {
    logger::info(&format!("Starting padd server on {}", SERVER_ADDRESS));

    let clap_config_arc = Arc::new(clap_config);

    match TcpListener::bind(SERVER_ADDRESS) {
        Ok(listener) => {
            for stream in listener.incoming() {
                match stream {
                    Ok(stream) => {
                        if handle_stream(stream, clap_config_arc.clone()) {
                            break;
                        }
                    }
                    Err(err) => {
                        logger::err(&format!("Failed to read incoming tcp stream: {}", err))
                    }
                }
            }
        }
        Err(err) => logger::fatal(&format!("Failed to bind server: {}", err)),
    };
}

fn handle_stream(stream: TcpStream, clap_config: Arc<&'static Yaml>) -> bool {
    match stream.try_clone() {
        Ok(mut stream_writer) => {
            let mut buf: Vec<u8> = Vec::new();
            for byte_res in stream.bytes() {
                match byte_res {
                    Ok(byte) => {
                        buf.push(byte);

                        if byte == 0 {
                            break;
                        }
                    }
                    Err(err) => {
                        logger::err(&format!("Failed to read byte from stream: {}", err));
                        return false;
                    }
                }
            }

            match String::from_utf8(buf) {
                Ok(string) => match &string[..] {
                    SIG_KILL => return true,
                    SIG_CHALLENGE => {
                        if let Err(err) = stream_writer.write_all(SIG_RESPONSE.as_bytes()) {
                            logger::err(&format!("Failed to write challenge response: {}", err));
                        }
                    }
                    &_ => execute_command(string, clap_config),
                },
                Err(err) => logger::err(&format!(
                    "Failed to convert stream bytes to string: {}",
                    err
                )),
            };
        }
        Err(err) => logger::err(&format!("Failed to clone read stream for writing: {}", err)),
    }

    false
}

pub fn kill() {
    if let Ok(mut stream) = TcpStream::connect(SERVER_ADDRESS) {
        if let Err(err) = stream.write_all(SIG_KILL.as_bytes()) {
            logger::err(&format!("Failed to write kill: {}", err));
        }
    }
}

pub fn running() -> bool {
    if let Ok(mut stream) = TcpStream::connect(SERVER_ADDRESS) {
        if let Err(err) = stream.write(SIG_CHALLENGE.as_bytes()) {
            logger::err(&format!("Failed to write challenge: {}", err));
            return false;
        }

        let mut buf = String::new();

        if let Err(err) = stream.read_to_string(&mut buf) {
            logger::err(&format!("Failed to read stream: {}", err));
            return false;
        }

        if buf == SIG_RESPONSE {
            return true;


span>
#### Property value

[C++]
 [C\#]
 [JavaScript]

Type: [Object](http://msdn.microsoft.com/en-us/library/hh748265.aspx)
Type: [Object](http://msdn.microsoft.com/en-us/library/system.object.aspx)
Type: Object

The object that represents the Kinect Toolkit input element.

Requirements
============

**Namespace:**Microsoft.Kinect.Toolkit.Input
**Assembly:** (in )

See also
========

#### Reference

[PressableModel Class](../../PressableModel_Class.md)
 [Microsoft.Kinect.Toolkit.Input Namespace](../../../Kinect.Toolkit.Input.md)

InputPointerManager.HandlePointerAsCursor Method
================================================

Instructs the input pointer manager to handle the pointer as a cursor.

Syntax
======

<colgroup>
<col width="100%" />
</colgroup>

C++

public:
HitTestResult^ HandlePointerAsCursor(
         KinectPointerPoint^ kinectPointerPoint,
         Rect bounds,
         HitTestResult^ hitTestResult
)

<colgroup>
<col width="100%" />
</colgroup>

C#

public HitTestResultHandlePointerAsCursor (
         KinectPointerPointkinectPointerPoint,
         Rect bounds,
         HitTestResulthitTestResult
)

<colgroup>
<col width="100%" />
</colgroup>

JavaScript

var hitTestResult = inputPointerManager.handlePointerAsCursor(


be registered as a fragment and have an ID
      fhir:SubstanceNucleicAcid.subunit.linkage.name [ string ]; # 0..1 Each linkage will be registered as a fragment and have at least one name. A single name shall be assigned to each linkage
      fhir:SubstanceNucleicAcid.subunit.linkage.residueSite [ string ]; # 0..1 Residues shall be captured as described in 5.3.6.8.3
    ], ...;
    fhir:SubstanceNucleicAcid.subunit.sugar [ # 0..* 5.3.6.8.1 Sugar ID (Mandatory)
      fhir:SubstanceNucleicAcid.subunit.sugar.identifier [ Identifier ]; # 0..1 The Substance ID of the sugar or sugar-like component that make up the nucleotide
      fhir:SubstanceNucleicAcid.subunit.sugar.name [ string ]; # 0..1 The name of the sugar or sugar-like component that make up the nucleotide
      fhir:SubstanceNucleicAcid.subunit.sugar.residueSite [ string ]; # 0..1 The residues that contain a given sugar will be captured. The order of given residues will be captured in the 5â€˜-3â€˜direction consistent with the base sequences listed above
    ], ...;
  ], ...;
]

<b


 {
			setValue(new Color(Integer.parseInt(val,16)));
		}
	}

	/** getAsText for Color turns the color into either one of the standard
	 ** colors or into an RGB hex value with # prepended. **/
	public String getAsText() {
		for(int i=0;i<stdColors.length;i++) {
			if(stdColors[i].equals(getValue())) {
				return stdColorNames[i];
			}
		}
		return "#" + Integer.toHexString(((Color)getValue()).getRGB() & 0x00FFFFFF);
	}

	/** getTags for Color returns a list of standard colors. **/
	public String[] getTags() {
		return stdColorNames;
	}
}
/* UTF_16LE.java --
   Copyright (C) 2002 Free Software Foundation, Inc.

This file is part of GNU Classpath.

GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

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

You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING.  If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.

Linking this library statically or dynamically with other modules is
making a combined work based on this library.  Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.

As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module.  An independent module is a module which is not derived from
or based on this library.  If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so.  If you do not wish to do so, delete this
exception statement from your version. */

package gnu.java.nio.charset;

import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;

/**
 * UTF-16LE charset.
 *
 * @author Jesse Rosenstock
 */
final class UTF_16LE extends Charset
{
  UTF_16LE ()
  {
    super ("UTF-16LE", null);
  }

  public boolean contains (Charset cs)
  {
    return cs instanceof US_ASCII || cs instanceof ISO_8859_1
      || cs instanceof UTF_8 || cs instanceof UTF_16BE
      || cs instanceof UTF_16LE || cs instanceof UTF_16;
  }

  public CharsetDecoder newDecoder ()
  {
    return new UTF_16Decoder (this, UTF_16Decoder.LITTLE_ENDIAN);
  }

  public CharsetEncoder newEncoder ()
  {
    return new UTF_16Encoder (this, UTF_16Encoder.LITTLE_ENDIAN, true);
  }
}
/* UTF_16Decoder.java --
   Copyright (C) 2002 Free Software Foundation, Inc.

This file is part of GNU Classpath.

GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

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

You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING.  If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA


github.com/SmallStoneSK/rn-components-kit/tree/master/packages/SwipeOut/README.zh-CN.md)|[![NPM version](https://img.shields.io/npm/v/@rn-components-kit/swipe-out.svg)](https://www.npmjs.com/package/@rn-components-kit/swipe-out)|
|switch|[文档](https://github.com/SmallStoneSK/rn-components-kit/tree/master/packages/Switch/README.zh-CN.md)|[![NPM version](https://img.shields.io/npm/v/@rn-components-kit/switch.svg)](https://www.npmjs.com/package/@rn-components-kit/switch)|
|tag|[文档](https://github.com/SmallStoneSK/rn-components-kit/tree/master/packages/Tag/README.zh-CN.md)|[![NPM version](https://img.shields.io/npm/v/@rn-components-kit/tag.svg)](https://www.npmjs.com/package/@rn-components-kit/tag)|
|text|[文档](https://github.com/SmallStoneSK/rn-components-kit/blob/master/packages/Text/README.zh-CN.md)|[![NPM version](https://img.shields.io/npm/v/@rn-components-kit/text.svg)](https://www.npmjs.com/package/@rn-components-kit/text)|
|tooltip|[文档](https://github.com/SmallStoneSK/rn-components-kit/blob/master/packages/Tooltip/README.zh-CN.md)|[![NPM version](https://img.shields.io/npm/v/@rn-components-kit/tooltip.svg)](https://www.npmjs.com/package/@rn-components-kit/tooltip)|

## 常见问题

**问:** 如果你遇到诸如`No component found for view with name "ARTXXX"`之类的报错，那是因为你的项目还没有集成`ART`模块。

**答:** 你需要：

1. 使用Xcode打开项目下的ios工程，`Libraries` -> `Add Files to` -> `node_modules/react-native/Libraries/ART/ART.xcodeproj`。
2. 点击项目根目录，找到`Linked Frameworks and Libraries`，点击`+`选择`libART.a`，然后重新编译工程。
3. 重新编译完成后，重新运行命令`react-native run-ios/android`，重启项目。

## License

[MIT LICENSE](./LICENSE)
# 第四章 认识项目目录 (项目整体介绍)

## 前言

我们现在已经创建好项目的目录了，现在让我们来了解下项目的基本构成以及各个文件的作用。

## 一、node_modules文件夹

在 `Vue` 项目中，`node_modules` 文件夹包含了项目依赖的所有第三方模块和库。这些模块通常是通过`npm（Node Package Manager）`安装的，用于实现各种功能，包括但不限于前端框架、工具库、样式预处理器、构建工具等。`node_modules` 的存在使得开发人员能够方便地管理项目所需的各种模块和库，并且可以通过引用它们来扩展项目的功能。

![node_modules](/images/04/node_modules.png)

我们也可以很方便的在这里看到一些插件库的源码。

## 二、public文件夹

在 `Vue` 项目中，`public` 文件夹用于存放不需要经过构建处理的静态资源。这些资源会直接复制到构建输出的根目录下。例如，你可以将不需要经过编译的图片、字体文件、以及各种不需要打包处理的静态文件放置在 `public` 文件夹中。这样做可以在构建过程中节省时间，因为这些资源不需要经过 `vite`、`webpack`等构建工具的处理，而是直接复制到最终的构


 contains previous incomplete fragment
		var err error
		if typ, err = c.curWriteMsgType(); err != nil {
			return 0, err
		}
	}

	if isControlMessage(typ) {
		return c.Conn.Write(b)
	}

	writeMsg := &message{typ: typ} // start a new message...
	// ... or continue the existing one if it has not been finalized.
	if c.writeMsgIsIncomplete() || c.writeBufHasIncompleteFragment() {
		writeMsg = c.currentWriteMsg
	}

	if _, err := c.writeBuf.Write(b); err != nil {
		c.log.Errorf("write: error writing to write buf: %v", err)
		return 0, fmt.Errorf("[unexpected] error writing to internal write buffer: %w", err)
	}

	ok, err := writeMsg.Parse(c.writeBuf.Bytes(), c.log)
	if err != nil {
		c.log.Errorf("write: parsing a message errored: %v", err)
		return 0, fmt.Errorf("write: error parsing message: %v", err)
	}

	c.currentWriteMsg = writeMsg
	if !ok { // incomplete fragment
		return len(b), nil
	}

	c.writeBuf.Next(len(writeMsg.raw)) // advance frame

	if len(writeMsg.payload) != 0 && writeMsg.isFinalized {
		if writeMsg.streamID.Load() == remotecommand.StreamStdOut || writeMsg.streamID.Load() == remotecommand.StreamStdErr {
			// we must wait for confirmation that the initial cast header was sent before proceeding with any more writes
			select {
			case <-c.ctx.Done():
				return 0, c.ctx.Err()
			case <-c.initialCastHeaderSent:
				if err := c.rec.WriteOutput(writeMsg.payload); err != nil {
					return 0, fmt.Errorf("error writing message to recorder: %w", err)
				}
			}
		}
	}

	_, err = c.Conn.Write(c.currentWriteMsg.raw)
	if err != nil {
		c.log.Errorf("write: error writing to conn: %v", err)
	}

	return len(b), nil
}

func (c *conn) Close() error {
	c.wmu.Lock()
	defer c.wmu.Unlock()
	if c.closed {
		return nil
	}
	c.closed = true
	connCloseErr := c.Conn.Close()
	recCloseErr := c.rec.Close()
	return errors.Join(connCloseErr, recCloseErr)
}

// writeBufHasIncompleteFragment returns true if the latest data message
// fragment written to the connection was incomplete and the following write
// must be the remaining payload bytes of that fragment.
func (c *conn) writeBufHasIncompleteFragment() bool {
	return c.writeBuf.Len() != 0
}

// readBufHasIncompleteFragment returns true if the latest data message
// fragment read from the connection was incomplete and the following read
// must be the remaining payload bytes of that fragment.
func (c *conn) readBufHasIncompleteFragment() bool {
	return c.readBuf.Len() != 0
}

// writeMsgIsIncomplete returns true if the latest WebSocket message written to
// the connection was fragmented and the next data message fragment written to
// the connection must be a fragment of that message.
// https://www.rfc-editor.org/rfc/rfc6455#section-5.4
func (c *conn) writeMsgIsIncomplete() bool {
	return c.currentWriteMsg != nil && !c.currentWriteMsg.isFinalized
}

// readMsgIsIncomplete returns true if the latest WebSocket message written to
// the connection was fragmented and the next data message fragment written to
// the connection must be a fragment of that message.
// https://www.rfc-editor.org/rfc/rfc6455#section-5.4
func (c *conn) readMsgIsIncomplete() bool {
	return c.currentReadMsg != nil && !c.currentReadMsg.isFinalized
}

func (c *conn) curReadMsgType() (messageType, error) {
	if c.currentReadMsg != nil {
		retu


                      default(1000)
/// - unsigned minGroupSize : minimum number of a squared of a chart that must be
///                           detected. default(4)
pub trait MCC_DetectorParametersTraitConst {
	fn as_raw_MCC_DetectorParameters(&self) -> *const c_void;

	#[inline]
	fn adaptive_thresh_win_size_min(&self) -> i32 {
		let ret = unsafe { sys::cv_mcc_DetectorParameters_getPropAdaptiveThreshWinSizeMin_const(self.as_raw_MCC_DetectorParameters()) };
		ret
	}

	#[inline]
	fn adaptive_thresh_win_size_max(&self) -> i32 {
		let ret = unsafe { sys::cv_mcc_DetectorParameters_getPropAdaptiveThreshWinSizeMax_const(self.as_raw_MCC_DetectorParameters()) };
		ret
	}

	#[inline]
	fn adaptive_thresh_win_size_step(&self) -> i32 {
		let ret = unsafe { sys::cv_mcc_DetectorParameters_getPropAdaptiveThreshWinSizeStep_const(self.as_raw_MCC_DetectorParameters()) };
		ret
	}

	#[inline]
	fn adaptive_thresh_constant(&self) -> f64 {
		let ret = unsafe { sys::cv_mcc_DetectorParameters_getPropAdaptiveThreshConstant_const(self.as_raw_MCC_DetectorParameters()) };
		ret
	}

	#[inline]
	fn min_contours_area_rate(&self) -> f64 {
		let ret = unsafe { sys::cv_mcc_DetectorParameters_getPropMinContoursAreaRate_const(self.as_raw_MCC_DetectorParameters()) };
		ret
	}

	#[inline]
	fn min_contours_area(&self) -> f64 {
		let ret = unsafe { sys::cv_mcc_DetectorParameters_getPropMinContoursArea_const(self.as_raw_MCC_DetectorParameters()) };
		ret
	}

	#[inline]
	fn confidence_threshold(&self) -> f64 {
		let ret = unsafe { sys::cv_mcc_DetectorParameters_getPropConfidenceThreshold_const(self.as_raw_MCC_DetectorParameters()) };
		ret
	}

	#[inline]
	fn min_contour_solidity(&self) -> f64 {
		let ret = unsafe { sys::cv_mcc_DetectorParameters_getPropMinContourSolidity_const(self.as_raw_MCC_DetectorParameters()) };
		ret
	}

	#[inline]
	fn find_candidates_approx_poly_dp_eps_multiplier(&self) -> f64 {
		let ret = unsafe { sys::cv_mcc_DetectorParameters_getPropFindCandidatesApproxPolyDPEpsMultiplier_const(self.as_raw_MCC_DetectorParameters()) };
		ret
	}

	#[inline]
	fn border_width(&self) -> i32 {
		let ret = unsafe { sys::cv_mcc_DetectorParameters_getPropBorderWidth_const(self.as_raw_MCC_DetectorParameters()) };
		ret
	}

	#[inline]
	fn b0factor(&self) -> f32 {
		let ret = unsafe { sys::cv_mcc_DetectorParameters_getPropB0factor_const(self.as_raw_MCC_DetectorParameters()) };
		ret
	}

	#[inline]
	fn max_error(&self) -> f32 {
		let ret = unsafe { sys::cv_mcc_DetectorParameters_getPropMaxError_const(self.as_raw_MCC_DetectorParameters()) };
		ret
	}

	#[inline]
	fn min_contour_points_allowed(&self) -> i32 {
		let ret = unsafe { sys::cv_mcc_DetectorParameters_getPropMinContourPointsAllowed_con


(n), read = 0;
      var loadFile = function(file, i) {
        var reader = new FileReader;
        reader.onload = function() {
          text[i] = reader.result;
          if (++read == n) {
            pos = clipPos(cm.doc, pos);
            replaceRange(cm.doc, text.join(""), pos, "around", "paste");
          }
        };
        reader.readAsText(file);
      };
      for (var i = 0; i < n; ++i) loadFile(files[i], i);
    } else {
      // Don't do a replace if the drop happened inside of the selected text.
      if (cm.state.draggingText && !(posLess(pos, cm.doc.sel.from) || posLess(cm.doc.sel.to, pos))) {
        cm.state.draggingText(e);
        // Ensure the editor is re-focused
        setTimeout(bind(focusInput, cm), 20);
        return;
      }
      try {
        var text = e.dataTransfer.getData("Text");
        if (text) {
          var curFrom = cm.doc.sel.from, curTo = cm.doc.sel.to;
          setSelection(cm.doc, pos, pos);
          if (cm.state.draggingText) replaceRange(cm.doc, "", curFrom, curTo, "paste");
          cm.replaceSelection(text, null, "paste");
          focusInput(cm);
          onFocus(cm);
        }
      }
      catch(e){}
    }
  }

  function clickInGutter(cm, e) {
    var display = cm.display;
    try { var mX = e.clientX, mY = e.clientY; }
    catch(e) { return false; }

    if (mX >= Math.floor(getRect(display.gutters).right)) return false;
    e_preventDefault(e);
    if (!hasHandler(cm, "gutterClick")) return true;

    var lineBox = getRect(display.lineDiv);
    if (mY > lineBox.bottom) return true;
    mY -= lineBox.top - display.viewOffset;

    for (var i = 0; i < cm.options.gutters.length; ++i) {
      var g = display.gutters.childNodes[i];
      if (g && getRect(g).right >= mX) {
        var line = lineAtHeight(cm.doc, mY);
        var gutter = cm.options.gutters[i];
        signalLater(cm, "gutterClick", cm, line, gutter, e);
        break;
      }
    }
    return true;
  }

  function onDragStart(cm, e) {
    if (eventInWidget(cm.display, e)) return;

    var txt = cm.getSelection();
    e.dataTransfer.setData("Text", txt);

    // Use dummy image instead of default browsers image.
    // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
    if (e.dataTransfer.setDragImage && !safari) {
      var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");
      if (opera) {
        img.width = img.height = 1;
        cm.display.wrapper.appendChild(img);
        // Force a relayout, or Opera won't use our image for some obscure reason
        img._top = img.offsetTop;
      }
      e.dataTransfer.setDragImage(img, 0, 0);
      if (opera) img.parentNode.removeChild(img);
    }
  }

  function setScrollTop(cm, val) {
    if (Math.abs(cm.doc.scrollTop - val) < 2) return;
    cm.doc.scrollTop = val;
    if (!gecko) updateDisplay(cm, [], val);
    if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val;
    if (cm.display.scrollbarV.scrollTop != val) cm.display.scrollbarV.scrollTop = val;
    if (gecko) updateDisplay(cm, []);
  }
  function setScrollLeft(cm, val, isScroller) {


m = CONSTANTS.UIMAPIDS.HILLSBRAD_FOOTHILLS, x = 43.6, y = 39.6 } },
	},
	["Falling Star Flinger"] = {
		cat = CONSTANTS.ITEM_CATEGORIES.HOLIDAY,
		type = CONSTANTS.ITEM_TYPES.ITEM,
		isToy = true,
		method = CONSTANTS.DETECTION_METHODS.USE,
		name = L["Falling Star Flinger"],
		itemId = 191925,
		items = { 116762 },
		chance = 100, -- Blind guess
		holidayEvents = CONSTANTS.HolidayEvents["Feast of Winter Veil"],
		questId = { 6983, 7043 },
		coords = { { m = CONSTANTS.UIMAPIDS.HILLSBRAD_FOOTHILLS, x = 43.6, y = 39.6 } },
	},
	["Falling Star Catcher"] = {
		cat = CONSTANTS.ITEM_CATEGORIES.HOLIDAY,
		type = CONSTANTS.ITEM_TYPES.ITEM,
		isToy = true,
		method = CONSTANTS.DETECTION_METHODS.USE,
		name = L["Falling Star Catcher"],
		itemId = 191937,
		items = { 116762 },
		chance = 100, -- Blind guess
		holidayEvents = CONSTANTS.HolidayEvents["Feast of Winter Veil"],
		questId = { 6983, 7043 },
		coords = { { m = CONSTANTS.UIMAPIDS.HILLSBRAD_FOOTHILLS, x = 43.6, y = 39.6 } },
	},
}

Rarity.ItemDB.MergeItems(Rarity.ItemDB.toys, holidayEventToysShadowlands)
return holidayEventToysShadowlands


eOperationStarted == dto2.DateOperationStarted &&
        dto1.DatePixStarted == dto2.DatePixStarted &&
        dto1.DateRegistered == dto2.DateRegistered &&
        dto1.DateUpdated == dto2.DateUpdated;
  }

  bool areListsEqual(List<BankDTO> list1, List<BankDTO> list2) {
    // Check if the lengths of the lists are equal
    if (list1.length != list2.length) {
      return false;
    }

    for (int i = 0; i < list1.length; i++) {
      if (!areBankDTOsEqual(list1[i], list2[i])) {
        return false;
      }
    }

    return true;
  }

  group('A group of tests', () {

    test('Bancos Test', () {
      File file = File('assets/bancos.json');
      Iterable l = json.decode(file.readAsStringSync());
      List<BankDTO> bancos =
      List<BankDTO>.from(l.map((model) => BankDTO.fromJson(model)));

      expect(areListsEqual(BancosData.getBancos(), bancos), true);
    });
  });
}
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:rickmorty/layers/presentation/using_cubit/details_page/cubit/character_details_cubit.dart';
import 'package:rickmorty/layers/presentation/using_cubit/details_page/view/character_details_page.dart';

import '../../../../../../fixtures/fixtures.dart';

void main() {
  testWidgets('CharacterDetailsPage should render correctly',
      (WidgetTester tester) async {
    final character = characterList1.first;

    // Build our app and trigger a frame.
    await tester.pumpWidget(
      MaterialApp(
        home: BlocProvider.value(
          value: CharacterDetailsCubit(character: character),
          child: const CharacterDetailsPage(),
        ),
      ),
    );

    // Find items on the page
    expect(find.text('Details'), findsOneWidget);
    expect(find.text(character.name!), findsOneWidget);
    expect(find.text('Origin: ${character.origin!.name}'), findsOneWidget);
    expect(find.text('Species: ${character.species}'), findsOneWidget);
    expect(find.text('Type: ${character.type}'), findsOneWidget);
    expect(find.text('Gender: ${character.gender}'), findsOneWidget);
    expect(
      find.text('Status: ${character.isAlive ? 'ALIVE!' : 'DEAD!'}'),
      findsOneWidget,
    );
    expect(
      find.text('Last location: ${character.location!.name}'),
      findsOneWidget,
    );
    expectLater(
      find.byType(EpisodeItem),
      findsNWidgets(character.episode!.length),
    );
  });
}
import 'package:rickmorty/layers/data/dto/character_dto.dart';
import 'package:rickmorty/layers/data/dto/location_dto.dart';
import 'package:test/test.dart';

void main() {
  group('CharacterDto', () {
    late String referenceRawJson;
    late CharacterDto referenceDto;

    setUp(() {
      referenceDto = CharacterDto(
        id: 1,
        name: 'Rick Sanchez',
        status: 'Alive',
        species: 'Human',
        type: 'Super genius',
        gender: 'Male',
        origin: LocationDto(name: 'Earth', url: 'https://example.com/earth'),
        location: LocationDto(name: 'Earth', url: 'https://example.com/earth'),
        image: 'https://example.com


using System;
using static System.Buffers.Binary.BinaryPrimitives;

namespace PKHeX.Core;

/// <summary>
/// Extra-data block for Hall of Fame records.
/// </summary>
/// <param name="Raw">Chunk of memory storing the structure.</param>
public sealed class Hall4(Memory<byte> Raw)
{
    private const int SIZE = 0xBA0;
    private const int SIZE_FOOTER = 0x10;
    public const int SIZE_USED = SIZE + SIZE_FOOTER;
  //public const int SIZE_BLOCK = 0x1000;

    private Span<byte> Data => Raw.Span[..SIZE_USED];

    private const int SIZE_ARRAY = 0x3DE; // 493+(egg, bad-egg) species

    // Structure:
    // u32 key
    // u16[495] single records
    // u16[495] double records
    // u16[495] multi records
    // u16 alignment
    // extdata 0x10 byte footer

    public uint Key { get => ReadUInt32LittleEndian(Data); set => WriteUInt32LittleEndian(Data, value); }

    public ushort GetCount(int battleType, ushort species)
    {
        var offset = GetRecordOffset(battleType, species);
        return ReadUInt16LittleEndian(Data[offset..]);
    }

    public void SetCount(int battleType, ushort species, ushort value)
    {
        var offset = GetRecordOffset(battleType, species);
        WriteUInt16LittleEndian(Data[offset..], value);
    }

    private static int GetRecordOffset(int battleType, ushort species)
    {
        ArgumentOutOfRangeExce


    "content":
        "വിശ്വസിച്ചതിന് ശേഷം അവിശ്വാസികളായി മാറുകയും, അവിശ്വാസം കൂടിക്കൂടി വരികയും ചെയ്ത വിഭാഗത്തിന്‍റെ പശ്ചാത്താപം ഒരിക്കലും സ്വീകരിക്കപ്പെടുകയില്ല. അവരത്രെ വഴിപിഴച്ചവര്."
  },
  {
    "surah_number": 3,
    "verse_number": 91,
    "content":
        "അവിശ്വസിക്കുകയും അവിശ്വാസികളായിക്കൊണ്ട് മരിക്കുകയും ചെയ്തവരില്‍പെട്ട ഒരാള് ഭൂമി നിറയെ സ്വര്‍ണം പ്രായശ്ചിത്തമായി നല്‍കിയാല് പോലും അത് സ്വീകരിക്കപ്പെടുന്നതല്ല. അവര്‍ക്കാണ് വേദനയേറിയ ശിക്ഷയുള്ളത്. അവര്‍ക്ക് സഹായികളായി ആരുമുണ്ടായിരിക്കുന്നതുമല്ല."
  },
  {
    "surah_number": 3,
    "verse_number": 92,
    "content":
        "നിങ്ങള് ഇഷ്ടപ്പെടുന്നതില് നിന്ന് നിങ്ങള് ചെലവഴിക്കുന്നത് വരെ നിങ്ങള്‍ക്ക് പുണ്യം നേടാനാവില്ല. നിങ്ങള് ഏതൊരു വസ്തു ചെലവഴിക്കുന്നതായാലും തീര്‍ച്ചയായും അല്ലാഹു അതിനെപ്പറ്റി അറിയുന്നവനാ


多大用处，因为规则总是不断在变；在总是变化的领域成为专家是十分困难的。 c:85

通过这次研究梳理，他们发现，对于规则不常改变的国际象棋或拼字游戏，练习时间确实和表现好坏有关系，但相关性并没有我们猜想的那么大：对于表现好与坏，练习的影响只占26%。对于音乐和体育运动，练习的影响更小，分别只占21%和18%。而在规则不太确定或规则快速变化的领域，研究发现更让人瞠目结舌。 c:26

当涉及我们在职业和个人生活中经常遇到的难题时，熟能生巧这句话并不见得总是对的。 c:73

在一些情境中，专业知识对人的支配作用实在太大了。 c:23

研究结果还显示，对许多事情都多少有些了解，而且能从多个角度思考的人，比那些只深入研究一件事情的人在预测未来事件上的表现要好。胜出的是知识面广的人。 c:146

### 为何局外人让专家相形见绌

当面对比较复杂的挑战时，见多识广的人往往比只潜心研究单一领域的专家更占优势。 c:58

一个人的专业知识越是和问题不相干，其解决问题的可能性就越大。 c:87

专家有专家的劣势——他们往往深陷埃里克·戴恩所说的“认知囹圄”，看不到传统之外的资源利用方法。随着人们的专业知识不断积累，人们往往一再地依赖已经掌握的方式处理问题——即便在面临新信息或新环境时也是如此。 c:130

女性科学家在缺少帮助的情况下，能以更加开放的眼光处理问题，而较少受到圈内传统惯例的束缚。她们从不同的经验角度出发审视问题，从而取得了更好的结果。 c:32

在《差异》一书中，政治学家和数学建模专家斯科特·佩奇已经证明，不论是解决民主问题还是解决科学问题，随机组成的团队一般都比理想团队表现得要好，因为随机团队里可能既有专家，也有局外人。事实上，团队资源的多样性才是影响表现好坏的最重要因素。有了多样性，团队才更有可能进行开放的辩论，并最终找到一个囊括了多重视角的最佳解决方案。


blocked due to your browser's built-in\nsecurity.
\n",itemtype:"method",name:"loadFont",params:[{name:"path",description:"
name of the file or url to load
\n",type:"String"},{name:"callback",description:"
function to be executed after\n                                   loadFont()\n                                   completes
\n",type:"Function",optional:!0}],return:{description:"p5.Font object",type:"p5.Font"},example:["\n\n
Calling loadFont() inside preload() guarantees that the load\noperation will have completed before setup() and draw() are called.
\n\n
\nvar myFont;\nfunction preload() {\n  myFont = loadFont('assets/AvenirNextLTPro-Demi.otf');\n}\n\nfunction setup() {\n  fill('#ED225D');\n  textFont(myFont);\n  textSize(36);\n  text('p5*js', 10, 50);\n}\n
\n\nOutside of preload(), you may supply a callback function to handle the\nobject:\n\n
\nfunction setup() {\n  loadFont('assets/AvenirNextLTPro-Demi.otf', drawText);\n}\n\nfunction drawText(font) {\n  fill('#ED225D');\n  textFont(font, 36);\n  text('p5*js', 10, 50);\n}\n\n
\n\n
You can also use the string name of the font to style other HTML\nelements.
\n\n
\nvar myFont;\n\nfunction preload() {\n  myFont = loadFont('assets/Avenir.otf');\n}\n\nfunction setup() {\n  var myDiv = createDiv('hello there');\n  myDiv.style('font-family', 'Avenir');\n}\n
"],alt:"p5*js in p5's theme dark pink\np5*js in p5's theme dark pink",class:"p5",module:"Typography",submodule:"Loading & Displaying"},{file:"src/typography/loading_displaying.js",line:135,description:"
Draws text to the screen. Displays the information specified in the first\nparameter on the screen in the position specified by the additional\nparameters. A default font will be used unless a font is set with the\ntextFont() function and a default size will be used unless a font is set\nwith textSize(). Change the color of the text with the fill() function.\nChange the outline of the text with the stroke() and strokeWeight()\nfunctions.\n

\nThe text displays in relation to the textAlign() function, which gives the\noption to draw to the left, right, and center of the coordinates.\n

\nThe x2 and y2 parameters define a rectangular area to display within and\nmay only be used with string data. When these parameters are specified,\nthey are interpreted based on the current rectMode() setting. Text that\ndoes not fit completely within the rectangle specified will not be drawn\nto the screen.
\n",itemtype:"method",name:"text",params:[{name:"str",description:"
the alphanumeric symbols to be displayed
\n",type:"String"},{name:"x",description:"
x-coordinate of text
\n",type:"Number"},{name:"y",description:"
y-coordinate of text
\n",type:"Number"},{name:"x2",description:"
by default, the width of the text box,\n                    see rectMode() for more info
\n",type:"Number",optional:!0},{name:"y2",description:"
by default, the height of the text box,\n                    see rectMode() for more info
\n",type:"Number",optional:!0}],return:{description:"this",type:"P5"},example:['\n
\n\ntextSize(


rules-elements-add ul.action-links a,
body.adminimal-skin-material ul.rules-operations a,
body.adminimal-skin-material .rules-elements-add ul.action-links a {
  background: transparent;
  color: #2196F3;
  box-shadow: none;
  padding: 8px 18px;
  margin: 5px 0 0 0;
}

body.adminimal-skin-material .rules-elements-add ul.action-links a:hover,
body.adminimal-skin-material ul.rules-operations a:hover,
body.adminimal-skin-material .rules-elements-add ul.action-links a:hover {
  background: transparent;
  color: #2196F3;
  box-shadow: none;
}

body.adminimal-skin-material .rules-elements-add ul.action-links a:focus,
body.adminimal-skin-material ul.rules-operations a:focus,
body.adminimal-skin-material .rules-elements-add ul.action-links a:focus {
  text-decoration: none;
}

body.sticky-actions.adminimal-skin-material .form-actions.form-wrapper {
  padding: 20px 40px 20px;
  box-shadow: -20px 2px 40px rgba(0,0,0,0.2);
  border-bottom: none;
}

body.sticky-actions.adminimal-skin-material .ajax-new-content .form-actions.form-wrapper {
  padding: 0;
  box-shadow: none;
}

body.sticky-actions.adminimal-skin-material #page {
  margin-bottom: 80px;
}

html.js .module-filter-inputs-wrapper .form-item {
  padding-bottom: 0;
  margin-bottom: 10px;
  background: #fff;
}

html.js .module-filter-inputs-wrapper .form-item.form-type-checkbox,
html.js .module-filter-inputs-wrapper .form-item.form-type-radio {
  background: transparent;
}

body.adminimal-skin-material .ctools-twisty {
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-right-color: transparent;
  border-style: solid;
  border-width: 4px 4px 0;
  line-height: 0;
  right: 6px;
  position: absolute;
  padding: 0;
  top: 16px;
}

body.adminimal-skin-material .ctools-dropbutton-processed.open .ctools-twisty {
  top: 12px;
}
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;position:static;transition:none}.cke_reset_all,.cke_reset_all *,.cke_reset_all a,.cke_reset_all textarea{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;position:static;transition:none;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto;float:none}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre-wrap}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type


InDevPx);
    aCtx->Fill();
    return;
  }

  Rect bgAreaGfx = NSRectToRect(aClipState.mBGClipArea, aAppUnitsPerPixel);
  bgAreaGfx.Round();

  if (bgAreaGfx.IsEmpty()) {
    // I think it's become possible to hit this since
    // https://hg.mozilla.org/mozilla-central/rev/50e934e4979b landed.
    NS_WARNING("converted background area should not be empty");
    // Make our caller not do anything.
    aClipState.mDirtyRectInDevPx.SizeTo(gfxSize(0.0, 0.0));
    return;
  }

  aCtx->Save();
  gfxRect dirty = ThebesRect(bgAreaGfx).Intersect(aClipState.mDirtyRectInDevPx);

  aCtx->SnappedClip(dirty);

  if (aClipState.mHasAdditionalBGClipArea) {
    gfxRect bgAdditionalAreaGfx = nsLayoutUtils::RectToGfxRect(
        aClipState.mAdditionalBGClipArea, aAppUnitsPerPixel);
    bgAdditionalAreaGfx.Round();
    gfxUtils::ConditionRect(bgAdditionalAreaGfx);
    aCtx->SnappedClip(bgAdditionalAreaGfx);
  }

  RefPtr<Path> roundedRect =
      MakePathForRoundedRect(*drawTarget, bgAreaGfx, aClipState.mClippedRadii);
  aCtx->SetPath(roundedRect);
  aCtx->Fill();
  aCtx->Restore();
}

enum class ScrollbarColorKind {
  Thumb,
  Track,
};

static Maybe<nscolor> CalcScrollbarColor(nsIFrame* aFrame,
                                         ScrollbarColorKind aKind) {
  ComputedStyle* scrollbarStyle = nsLayoutUtils::StyleForScrollbar(aFrame);
  const auto& colors = scrollbarStyle->StyleUI()->mScrollbarColor;
  if (colors.IsAuto()) {
    return Nothing();
  }
  const auto& color = aKind == ScrollbarColorKind::Thumb
                          ? colors.AsColors().thumb
                          : colors.AsColors().track;
  return Some(color.CalcColor(*scrollbarStyle));
}

static nscolor GetBackgroundColor(nsIFrame* aFrame, ComputedStyle* aStyle) {
  switch (aStyle->StyleDisplay()->mAppearance) {
    case StyleAppearance::ScrollbarthumbVertical:
    case StyleAppearance::ScrollbarthumbHorizontal: {
      if (Maybe<nscolor> overrideColor =
              CalcScrollbarColor(aFrame, ScrollbarColorKind::Thumb)) {
        return *overrideColor;
      }
      break;
    }
    case StyleAppearance::ScrollbarVertical:
    case StyleAppearance::ScrollbarHorizontal:
    case StyleAppearance::Scrollcorner: {
      if (Maybe<nscolor> overrideColor =
              CalcScrollbarColor(aFrame, ScrollbarColorKind::Track)) {
        return *overrideColor;
      }
      break;
    }
    default:
      break;
  }
  return aStyle->GetVisitedDependentColor(&nsStyleBackground::mBackgroundColor);
}

nscolor nsCSSRendering::DetermineBackgroundColor(nsPresContext* aPresContext,
                                                 ComputedStyle* aStyle,
                                                 nsIFrame* aFrame,
                                                 bool& aDrawBackgroundImage,
                                                 bool& aDrawBackgroundColor) {
  aDrawBackgroundImage = true;
  aDrawBackgroundColor = true;

  const nsStyleVisibility* visibility = aStyle->StyleVisibility();

  if (visibility->mColorAdjust != StyleColorAdjust::Exact &&
      aFrame->HonorPrintBackgroundSettings()) {
    aDrawBackgroundImage = aPresContext->GetBackgroundImageDraw();
    aDrawBackgroundColor = aPresContext->GetBackgroundColorDraw();
  }

  const nsStyleBackground* bg = aStyle->StyleBackground();
  nscolor bgColor;
  if (aDrawBackgroundColor) {
    bgColor = GetBackgroundColor(aFrame, aStyle);
    i


sToPoll,
    PeerIgnored,
    PeerNoLongerIgnored,
    PeerPollingError,
    PeerSelectionError,
    ResponseError,
    ResponseSuccess,
    SendRequest,
}
<reponame>cfsamson/mio
#![doc(html_root_url = "https://docs.rs/mio/0.7.0")]
#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)]
// Disallow warnings when running tests.
#![cfg_attr(test, deny(warnings))]
// Disallow warnings in examples.
#![doc(test(attr(deny(warnings))))]

//! A fast, low-level IO library for Rust focusing on non-blocking APIs, event
//! notification, and other useful utilities for building high performance IO
//! apps.
//!
//! # Features
//!
//! * Non-blocking TCP, UDP
//! * I/O event queue backed by epoll, kqueue, and IOCP
//! * Zero allocations at runtime
//! * Platform specific extensions
//!
//! # Non-goals
//!
//! The following are specifically omitted from Mio and are left to the user or
//! higher-level libraries.
//!
//! * File operations
//! * Thread pools / multi-threaded event loop
//! * Timers
//!
//! # Platforms
//!
//! Currently supported platforms:
//!
//! * Android
//! * Bitrig
//! * DragonFly BSD
//! * FreeBSD
//! * Linux
//! * NetBSD
//! * OpenBSD
//! * Solaris
//! * Windows
//! * iOS
//! * macOS
//!
//! Mio can handle interfacing with each of the event systems of the
//! aforementioned platforms. The details of their implementation are further
//! discussed in [`Poll`].
//!
//! # Usage
//!
//! Using Mio starts by creating a [`Poll`], which reads events from the OS and
//! puts them into [`Events`]. You can handle IO events from the OS with it.
//!
//! For more detail, see [`Poll`].
//!
//! [`Poll`]: struct.Poll.html
//! [`Events`]: struct.Events.html
//!
//! # Example
//!
//! ```
//! use mio::*;
//! use mio::net::{TcpListener, TcpStream};
//!
//! // Setup some tokens to allow us to identify which event is
//! // for which socket.
//! const SERVER: Token = Token(0);
//! const CLIENT: Token = Token(1);
//!
//! let addr = "127.0.0.1:13265".parse().unwrap();
//!
//! // Setup the server socket
//! let server = TcpListener::bind(addr).unwrap();
//!
//! // Create a poll instance
//! let mut poll = Poll::new().unwrap();
//! let registry = poll.registry().clone();
//!
//! // Start listening for incoming connections
//! registry.register(&server, SERVER, Interests::READABLE).unwrap();
//!
//! // Setup the client socket
//! let sock = TcpStream::connect(addr).unwrap();
//!
//! // Register the socket
//! registry.register(&sock, CLIENT, Interests::READABLE).unwrap();
//!
//! // Create storage for events
//! let mut events = Events::with_capacity(1024);
//!
//! loop {
//!     poll.poll(&mut events, None).unwrap();
//!
//!     for event in events.iter() {
//!         match event.token() {
//!             SERVER => {
//!                 // Accept and drop the socket immediately, this will close
//!                 // the socket and notify the client of the EOF.
//!                 let _ = server.accept();
//!             }
//!             CLIENT => {
//!                 // The server just shuts down


ubWVudGFsIFNjaWVuY2U8L2RjOnN1YmplY3Q+CiAgPGRjOnN1YmplY3Q+\n"
                    + "SHVtYW4gZ2VvZ3JhcGh5PC9kYzpzdWJqZWN0PgogIDxkYzpzdWJqZWN0PlRvcG9ncmFwaHkvUGh5\n"
                    + "c2ljYWwgR2VvZ3JhcGh5PC9kYzpzdWJqZWN0PgogIDxkYzpzdWJqZWN0PlBvbGljeSBpc3N1ZXM8\n"
                    + "L2RjOnN1YmplY3Q+CiAgPGRjOnN1YmplY3Q+Q29tcG9zaXRpb24gYW5kIENoZW1pc3RyeTwvZGM6c3ViamVjdD4K\n"
                    + "ICA8ZGM6c3ViamVjdD5BdG1vc3BoZXJpYyBEeW5hbWljczwvZGM6c3ViamVjdD4KICA8ZGM6c3Vi\n"
                    + "amVjdD5HbG9iYWwgV2FybWluZzwvZGM6c3ViamVjdD4KICA8ZGM6c3ViamVjdD5XZWF0aGVyPC9k\n"
                    + "YzpzdWJqZWN0PgogIDxkYzpzdWJqZWN0PkFudGhyb3BvZ2VuaWMgQWN0aXZpdHk8L2RjOnN1Ympl\n"
                    + "Y3Q+CiAgPGRjOnN1YmplY3Q+U3lzdGVtcywgSW50ZXJhY3Rpb25zLCBGZWVkYmFjayBMb29wczwv\n"
                    + "ZGM6c3ViamVjdD4KICA8ZGM6c3ViamVjdCB4c2k6dHlwZT0ibnNkbF9kYzpHRU0iPlNjaWVuY2U8\n"
                    + "L2RjOnN1YmplY3Q+CiAgPGRjOnN1YmplY3QgeHNpOnR5cGU9Im5zZGxfZGM6R0VNIj5FYXJ0aCBz\n"
                    + "Y2llbmNlPC9kYzpzdWJqZWN0PgogIDxkYzpzdWJqZWN0IHhzaTp0eXBlPSJuc2RsX2RjOkdFTSI+\n"
                    + "UGh5c2ljYWwgc2NpZW5jZXM8L2RjOnN1YmplY3Q+CiAgPGRjOnN1YmplY3QgeHNpOnR5cGU9Im5z\n"
                    + "ZGxfZGM6R0VNIj5NZXRlb3JvbG9neTwvZGM6c3ViamVjdD4KICA8ZGM6c3ViamVjdCB4c2k6dHlw\n"
                    + "ZT0ibnNkbF9kYzpHRU0iPkdlb2xvZ3k8L2RjOnN1YmplY3Q+CiAgPGRjOnN1YmplY3QgeHNpOnR5\n"
                    + "cGU9Im5zZGxfZGM6R0VNIj5HZW9ncmFwaHk8L2RjOnN1YmplY3Q+CiAgPGRjOnN1YmplY3QgeHNp\n"
                    + "OnR5cGU9Im5zZGxfZGM6R0VNIj5DaGVtaXN0cnk8L2RjOnN1YmplY3Q+CiAgPGRjOnN1YmplY3Qg\n"


    this.mLights = null;  // lights from the Renderable

    //*******WARNING***************
    // this number MUST correspond to the GLSL uLight[] array size (for LightFS.glsl and IllumFS.glsl)
    //*******WARNING********************
    this.kGLSLuLightArraySize = 8;  // <-- make sure this is the same as LightFS.glsl and IllumFS.glsl
    this.mShaderLights = [];
    var i, ls;
    for (i = 0; i < this.kGLSLuLightArraySize; i++) {
        ls = new ShaderLightAtIndex(this.mCompiledShader, i);
        this.mShaderLights.push(ls);
    }
}
gEngine.Core.inheritPrototype(LightShader, SpriteShader);
//</editor-fold>

// <editor-fold desc="Public Methods">

// Overriding the Activation of the shader for rendering
/**
 * Activate the shader for rendering.
 * @param {float[]} pixelColor [R, G, B, A] Sets the shader pixel color.
 * @param {Camera} aCamera Camera to draw to
 * @returns {void}
 * @memberOf LightShader
 */
LightShader.prototype.activateShader = function (pixelColor, aCamera) {
    // first call the super class's activate
    SpriteShader.prototype.activateShader.call(this, pixelColor, aCamera);

    // now push the light information to the shader
    var numLight = 0;
    if (this.mLights !== null) {
        while (numLight < this.mLights.length) {
            this.mShaderLights[numLight].loadToShader(aCamera, this.mLights[numLight]);
            numLight++;
        }
    }
    // switch off the left over ones.
    while (numLight < this.kGLSLuLightArraySize) {
        this.mShaderLights[numLight].switchOffLight(); // switch off unused lights
        numLight++;
    }
};

/**
 * Set the Shader lights
 * @param {Light[]} l Shader lights
 * @returns {void}
 * @memberOf LightShader
 */
LightShader.prototype.setLights = function (l) {
    this.mLights = l;
};
//</editor-fold>/*
 * File: TextureShader.js
 * Subclass from SimpleShader
 * Implements a Textured ShaderProgram object.
 */

/*jslint node: true, vars: true */
/*global gEngine: false, SimpleShader: false */
/* find out more about jslint: http://www.jslint.com/help.html */

"use strict";  // Operate in Strict mode such that variables must be declared before used!

//<editor-fold desc="constructor">
/**
 * Default Constructor<p>
 * Implements a Textured ShaderProgram object.
 * @param {string} vertexShaderPath filepath of the Vertex Shader.
 * @param {string} fragmentShaderPath filepath of the Fragment Shader.
 * @returns {TextureShader} An intsnace of TextureShader.
 * @class TextureShader
 */
function TextureShader(vertexShaderPath, fragmentShaderPath) {
    // Call super class constructor
    SimpleShader.call(this, vertexShaderPath, fragmentShaderPath);  // call SimpleShader constructor

    // reference to aTextureCoordinate within the shader
    this.mShaderTextureCoordAttribute = null;
    this.mSamplerRef = null; // reference to the uSampler, when using only texture,
                             // this is not necessary, with NormalMap, we must do this.

    // get the reference of uSampler and aTextureCoordinate within the shader
    var gl = gEngine.Core.getGL();
    this.mSamplerRef = gl.getUniformLocation(this.mCompiledShader, "uSampler");
    this.mShaderTextureCoordAttribute = gl.getAttribLocation(this.mCompiledShader, "aTextureCoordinate");
}

// get all the prototype functions from SimpleShader
gEngine.Core


reliableDataInTransit += outgoingCommand->fragmentLength;
            }

            ++peer->packetsSent;
            ++peer->totalPacketsSent;

            ++command;
            ++buffer;
        }

        host->commandCount = command - host->commands;
        host->bufferCount = buffer - host->buffers;

        return canPing;
    } /* enet_protocol_send_reliable_outgoing_commands */

    int
    enet_protocol_send_outgoing_commands(ENetHost *host, ENetEvent *event, int checkForTimeouts)
    {
        size_t packetSize = host->usingNewPacket ? sizeof(ENetProtocolHeaderUbisoft) : sizeof(ENetProtocolHeader);
        enet_uint8 headerData[sizeof(ENetProtocolHeaderUbisoft) + sizeof(enet_uint32)] = {0};
        ENetProtocolHeader *header = (ENetProtocolHeader *)headerData;
        ENetProtocolHeaderUbisoft *newHeader = (ENetProtocolHeaderUbisoft *)headerData;

        if (host->usingNewPacket)
        {
            enet_uint16 port = host->peers->address.port;

            if (host->usingProxy)
            {
                port = ENET_HOST_TO_NET_16(host->proxyHeader.ipv4.port);
            }

            enet_uint16 rand1 = rand() % (port + 1);
            enet_uint16 rand2 = rand();

            newHeader->integrity[0] = ENET_HOST_TO_NET_16(rand1);
            newHeader->integrity[1] = ENET_HOST_TO_NET_16(rand1 ^ port);
            newHeader->integrity[2] = ENET_NET_TO_HOST_16(rand2 & 0xF3DF | 0x920D);
        }

        ENetPeer *currentPeer;
        int sentLength;
        size_t shouldCompress = 0;

        host->continueSending = 1;

        while (host->continueSending)
            for (host->continueSending = 0,
                currentPeer = host->peers;
                 currentPeer < &host->peers[host->peerCount];
                 ++currentPeer)
            {
                if (currentPeer->state == ENET_PEER_STATE_DISCONNECTED ||
                    currentPeer->state == ENET_PEER_STATE_ZOMBIE)
                    continue;

                host->headerFlags = 0;
                host->commandCount = 0;
                host->bufferCount = 1;
                host->packetSize = packetSize;

                if (!enet_list_empty(&currentPeer->acknowledgements))
                    enet_protocol_send_acknowledgements(host, currentPeer);

                if (checkForTimeouts != 0 &&
                    !enet_list_empty(&currentPeer->sentReliableCommands) &&
                    ENET_TIME_GREATER_EQUAL(host->serviceTime, currentPeer->nextTimeout) &&
                    enet_protocol_check_timeouts(host, currentPeer, event) == 1)
                {
                    if (event != NULL && event->type != ENET_EVENT_TYPE_NONE)
                        return 1;
                    else
                        continue;
                }

                if ((enet_list_empty(&currentPeer->outgoingReliableCommands) ||
                     enet_protocol_send_reliable_outgoing_commands(host, currentPeer)) &&
                    enet_list_empty(&currentPeer->sentReliableCommands) &&
                    ENET_TIME_DIFFERENCE(host->serviceTime, currentPeer->lastReceiveTime) >= currentPeer->pingInterval &&
                    currentPeer->mtu - host->packetSize >= sizeof(ENetProtocolPing))
                {
                    enet_peer_ping(currentPeer);
                    enet_protocol_send_reliable_outgoing_commands(host, currentPeer);
                }

                if (!enet_list_empty(&currentPeer->outgoingUnreliableCommands))
                    enet_protocol_send_unreliable_outgoing_commands(host, currentPeer);

                if (host->commandCount == 0)
                    continue;

                if (currentPeer->packetLossEpoch == 0)
                    currentPeer->packetLossEpoch = host->serviceTime;
                else if (ENET_TIME_DIFFERENCE(host->serviceTime, currentPeer->packetLossEpoch) >= ENET_PEER_PACKET_LOSS_INTERVAL &&
                         currentPeer-


c6212ede2f,
    0xc7b83f83a798fc7d,
    0x33bd8f399e8b3741,
    0xb2d48f0d7c33992b,
    0xa8a25b6b259c39cc,
    0x4aafb95636c6ff3b,
    0xf685c0c56739cbf3,
    0x5f885605ada76029,
    0x6ed22d6c51b17caf,
    0x6bfd04b4c808c0b5,
    0xab358de568fcbc61,
    0x97e42da2f992dca5,
    0xeaeee49fc4a16045,
    0xa8fef7bcce13efcc,
    0xd3c5ba9c0aaa0f44,
    0xd240d969c3f04b28,
    0x541eebca40288dc4,
    0x292768477779dc00,
    0x172788219608034c,
    0xd5024d6272206ba,
];
use std::num::Wrapping;

pub fn test(a1: i32, a2: i32) -> i32
{
    (Wrapping(a1) + Wrapping(a2)).0
}

pub struct Foo
{
    Field: i32
}

impl Foo
{
    pub fn new(field: i32) -> Foo
    {
        Foo{ Field: field }
    }
}

pub struct Bar
{
}

impl Bar
{
    pub fn new() -> Bar
    {
        Bar{}
    }
}

pub trait GetValueTrait
{
    fn GetValue(&self) -> i32;

    fn ToDyn(&self) -> &dyn GetValueTrait
        where Self: std::marker::Sized
    {
        self
    }
}

impl GetValueTrait for Foo
{
    fn GetValue(&self) -> i32
    {
        self.Field
    }
}

impl GetValueTrait for Bar
{
    fn GetValue(&self) -> i32
    {
        233
    }
}

pub fn GetValue(o : &dyn GetValueTrait) -> i32
{
    o.GetValue()
}

#[no_mangle]
pub fn rust_mian() -> i32
{
    let foo = Foo::new(123);
    let bar = Bar::new();
    test(GetValue((&foo).ToDyn()), GetValue((&bar).ToDyn()))
}
use crate::Face;
use crate::buffer::{Buffer, BufferScratchFlags, GlyphInfo};
use crate::complex::MAX_COMBINING_MARKS;
use crate::plan::ShapePlan;
use crate::unicode::{CharExt, GeneralCategory};

// HIGHLEVEL DESIGN:
//
// This file exports one main function: normalize().
//
// This function closely reflects the Unicode Normalization Algorithm,
// yet it's different.
//
// Each shaper specifies whether it prefers decomposed (NFD) or composed (NFC).
// The logic however tries to use whatever the font can support.
//
// In general what happens is that: each grapheme is decomposed in a chain
// of 1:2 decompositions, marks reordered, and then recomposed if desired,
// so far it's like Unicode Normalization.  However, the decomposition and
// recomposition only happens if the font supports the resulting characters.
//
// The goals are:
//
//   - Try to render all canonically equivalent strings similarly.  To really
//     achieve this we have to always do the full decomposition and then
//     selectively recompose from there.  It's kinda too expensive though, so
//     we skip some cases.  For example, if composed is desired, we simply
//     don't touch 1-character clusters that are supported by the font, even
//     though their NFC may be different.
//
//   - When a font has a precomposed character for a sequence but the 'ccmp'
//     feature in the font is not adequate, use the precomposed character
//     which typically has better mark positioning.
//
//   - When a font does not support a combining mark, but supports it precomposed
//     with previous base, use that.  This needs the itemizer to have this
//     knowledge too.  We need to provide assistance to the itemizer.
//
//   - When a font does not support a character but supports its canonical
//


de(d); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return errors.Wrap(err, "decode field \"spec\"")
			}
		default:
			return d.Skip()
		}
		return nil
	}); err != nil {
		return errors.Wrap(err, "decode IoK8sAPINetworkingV1NetworkPolicy")
	}

	return nil
}

// MarshalJSON implements stdjson.Marshaler.
func (s *IoK8sAPINetworkingV1NetworkPolicy) MarshalJSON() ([]byte, error) {
	e := jx.Encoder{}
	s.Encode(&e)
	return e.Bytes(), nil
}

// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *IoK8sAPINetworkingV1NetworkPolicy) UnmarshalJSON(data []byte) error {
	d := jx.DecodeBytes(data)
	return s.Decode(d)
}

// Encode implements json.Marshaler.
func (s *IoK8sAPINetworkingV1NetworkPolicyEgressRule) Encode(e *jx.Encoder) {
	e.ObjStart()
	s.encodeFields(e)
	e.ObjEnd()
}

// encodeFields encodes fields.
func (s *IoK8sAPINetworkingV1NetworkPolicyEgressRule) encodeFields(e *jx.Encoder) {
	{
		if s.Ports != nil {
			e.FieldStart("ports")
			e.ArrStart()
			for _, elem := range s.Ports {
				elem.Encode(e)
			}
			e.ArrEnd()
		}
	}
	{
		if s.To != nil {
			e.FieldStart("to")
			e.ArrStart()
			for _, elem := range s.To {
				elem.Encode(e)
			}
			e.ArrEnd()
		}
	}
}

var jsonFieldsNameOfIoK8sAPINetworkingV1NetworkPolicyEgressRule = [2]string{
	0: "ports",
	1: "to",
}

// Decode decodes IoK8sAPINetworkingV1NetworkPolicyEgressRule from json.
func (s *IoK8sAPINetworkingV1NetworkPolicyEgressRule) Decode(d *jx.Decoder) error {
	if s == nil {
		return errors.New("invalid: unable to decode IoK8sAPINetworkingV1NetworkPolicyEgressRule to nil")
	}

	if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
		switch string(k) {
		case "ports":
			if err := func() error {
				s.Ports = make([]IoK8sAPINetworkingV1NetworkPolicyPort, 0)
				if err := d.Arr(func(d *jx.Decoder) error {
					var elem IoK8sAPINetworkingV1NetworkPolicyPort
					if err := elem.Decode(d); err != nil {
						return err
					}
					s.Ports = append(s.Ports, elem)
					return nil
				}); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return errors.Wrap(err, "decode field \"ports\"")
			}
		case "to":
			if err := func() error {
				s.To = make([]IoK8sAPINetworkingV1NetworkPolicyPeer, 0)
				if err := d.Arr(func(d *jx.Decoder) error {
					var elem IoK8sAPINetworkingV1NetworkPolicyPeer
					if err := elem.Decode(d); err != nil {
						return err
					}
					s.To = append(s.To, elem)
					return nil
				}); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return errors.Wrap(err, "decode field \"to\"")
			}
		default:
			return d.Skip()
		}
		return nil
	}); err != nil {


:var(--tblr-gray-100);--tblr-bg-surface-tertiary:var(--tblr-gray-50);--tblr-bg-surface-dark:var(--tblr-dark);--tblr-bg-forms:var(--tblr-bg-surface);--tblr-border-color:#dadfe5;--tblr-border-color-translucent:rgba(4, 32, 69, 0.14);--tblr-border-dark-color:#bbc3cd;--tblr-border-dark-color-translucent:rgba(4, 32, 69, 0.27);--tblr-border-active-color:#b6bcc3;--tblr-icon-color:var(--tblr-gray-500);--tblr-active-bg:rgba(var(--tblr-primary-rgb), 0.04);--tblr-disabled-bg:var(--tblr-bg-surface-secondary);--tblr-disabled-color:var(--tblr-gray-300);--tblr-code-color:var(--tblr-gray-600);--tblr-code-bg:var(--tblr-bg-surface-secondary);--tblr-dark-mode-border-color:#1f2e41;--tblr-dark-mode-border-color-translucent:rgba(72, 110, 149, 0.14);--tblr-dark-mode-border-color-active:#2c415d;--tblr-dark-mode-border-dark-color:#1f2e41;--tblr-page-padding:var(--tblr-spacer-3);--tblr-page-padding-y:var(--tblr-spacer-4);--tblr-font-weight-light:300;--tblr-font-weight-normal:400;--tblr-font-weight-medium:500;--tblr-font-weight-bold:600;--tblr-font-weight-headings:var(--tblr-font-weight-bold);--tblr-font-size-h1:1.5rem;--tblr-font-size-h2:1.25rem;--tblr-font-size-h3:1rem;--tblr-font-size-h4:0.875rem;--tblr-font-size-h5:0.75rem;--tblr-font-size-h6:0.625rem;--tblr-line-height-h1:2rem;--tblr-line-height-h2:1.75rem;--tblr-line-height-h3:1.5rem;--tblr-line-height-h4:1.25rem;--tblr-line-height-h5:1rem;--tblr-line-height-h6:1rem;--tblr-shadow:rgba(var(--tblr-body-color-rgb), 0.04) 0 2px 4px 0;--tblr-shadow-transparent:0 0 0 0 transparent;--tblr-shadow-button:0 1px 0 rgba(var(--tblr-body-color-rgb), 0.04);--tblr-shadow-button-inset:inset 0 -1px 0 rgba(var(--tblr-body-color-rgb), 0.2);--tblr-shadow-card:0 0 4px rgba(var(--tblr-body-color-rgb), 0.04);--tblr-shadow-card-hover:rgba(var(--tblr-body-color-rgb), 0.16) 0 2px 16px 0;--tblr-shadow-dropdown:0px 16px 24px 2px rgba(0, 0, 0, 0.07),0px 6px 30px 5px rgba(0, 0, 0, 0.06),0px 8px 10px -5px rgba(0, 0, 0, 0.1)}@media (max-width:991.98px){:host,:root{--tblr-page-padding:var(--tbl


FLOPs (G)** & **AP\\({}^{\\text{o1}}_{50.95}\\) (\\%)** & **AP\\({}^{\\text{o1}}_{50}\\) (\\%)** & **AP\\({}^{\\text{o2}}_{75}\\) (\\%)** & **AP\\({}^{\\text{o1}}_{5}\\) (\\%)** & **AP\\({}^{\\text{o1}}_{M}\\) (\\%)** & **AP\\({}^{\\text{o2}}_{L}\\) (\\%)** \\\\ \\hline\n' +
      '**YOLOv6-N v3.0 [30] (D)** & 4.7 & 11.4 & **37.5** & 53.1 & – & – & – & – \\\\\n' +
      '**Gold YOLO-N**[61] (D)** & 5.6 & 12.1 & **39.9** & 55.9 & – & – & – & – \\\\\n' +
      '**RTMDet-T**[44] (I)** & 4.8 & 12.6 & **41.1** & 57.9 & – & – & – & – \\\\\n' +
      '**PPYOLOE+S**[74] (C)** & 7.9 & 14.4 & **43.7** & 60.6 & 47.9 & 23.2 & 46.4 & 56.9 \\\\\n' +
      '**PPYOLOE-S**[74] (I)** & 7.9 & 14.4 & 43.0 & 60.5 & 46.6 & 23.2 & 46.4 & 56.9 \\\\\n' +
      '**DMMO YOLO-T**[75] (D)** & 8.5 & 18.1 & 43.6 & 59.4 & 46.6 & 23.3 & 47.4 & 61.0 \\\\\n' +
      '**RTMDet-S**[44] (I)** & 9.0 & 25.6 & **44.6** & 61.9 & – & – & – & – \\\\\n' +
      '**YOLOv9-S**[75] (D)** & 7.2 & 26.7 & **46.8** & 63.4 & 50.7 & 26.6 & 56.0 & 64.5 \\\\\n' +
      '**DAMO YOLO-S**[75] (D)** & 16.3 & 37.8 & **47.7** & 63.5 & 51.1 & 26.9 & 51.7 & 64.9 \\\\\n' +
      '**YOLOE-S**[30] (D)** & 18.5 & 45.3 & 45.0 & 61.8 & – & – & – & – \\\\\n' +
      '**Gold YOLO-S**[61] (C)** & 21.5 & 46.0 & 46.4 & 63.4 & – & – & – & – \\\\\n' +
      '**Gold YOLO-S**[61] (D)** & 21.5 & 46.0 & 46.1 & 63.3 & – & – & – & – \\\\\n' +
      '**Gold YOLO-S**[61] (D)** & 21.5 & 46.0 & 45.5 & 62.2 & – & – & – & – \\\\\n' +
      '**PPYOLOE+M**[74] (C)** & 23.4 & 49.9 & **49.8** & 67.1 & 54.5 & 31.8 & 53.9 & 66.2 \\\\\n' +
      '**PPYOLOE-M**[74] (I)** & 23.4 & 49.9 & 49.0 & 66.5 & 53.0 & 28.6 & 52.9 & 63.8 \\\\\n' +
      '**Gold YOLO-M**[61] (C)** & 41.3 & 57.5 & **51.1** & 68.5 & – & – & – & – \\\\\n' +
      '**Gold YOLO-M**[61] (D)** & 41.3 & 57.5 & 50.9 & 68.2 & – & – & – & – \\\\\n' +


assertFailsWith<VariableResolutionException> {
            variableResolver.getValue("unknown")
        }
    }

    @Suppress("unused")
    private class TestBean {
        var foo = Any()
        val isBar = true
        val baz = "qwerty"
        private val privateVariable = "foo"

        val throwingVariable: String
            get() = throw RuntimeException()
    }
}
/*
 * Copyright (c) 2017 Evident Solutions Oy
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

package org.dalesbred.testutils

import java.util.*

inline fun withUTCTimeZone(block: () -> Unit) {
    withTimeZone("UTC", block)
}

inline fun withTimeZone(name: String, block: () -> Unit) {
    val old = TimeZone.getDefault()
    try {
        TimeZone.setDefault(TimeZone.getTimeZone(name))
        block()
    } finally {
        TimeZone.setDefault(old)
    }
}
package org.dalesbred.internal.jdbc

import org.dalesbred.dialect.DefaultDialect
import org.dalesbred.dialect.MariaDBDialect
import org.dalesbred.testutils.unimplemented
import java.sql.Blob
import java.sql.ResultSetMetaData
import kotlin.test.Test
import kotlin.test.assertEquals

class ResultSetUtilsTest {

    companion object {
        private val DEFAULT_DIALECT = DefaultDialect()
        private val MARIADB_DIALECT_OLD = MariaDBDialect().apply { setBlobsAsByteArrays(false) }
        private val MARIADB_DIALECT_CURRENT = MariaDBDialect().apply { setBlobsAsByteArrays(true) }
    }

    @Test
    fun `column type resolution`() {
        val metadata = MockResultSetMetaData(
            classNames = listOf("java.lang.String", "[Ljava.lang.String;", "[B")
        )
        assertEquals(String::class.java, ResultSetUtils.getColumnType(metadata, DEFAULT_DIALECT, 1))
        assertEquals(Array<String>::class.java, ResultSetUtils.getColumnType(metadata, DEFAULT_DIALECT, 2))
        assertEquals(ByteArray::class.java, ResultSetUtils.getColumnType(metadata, DEFAULT_DIALECT, 3))
    }

    @Test
    fun `resolving byte array types for MariaDB`() {
        val metadata = MockResultSetMetaData(classNames = listOf("byte[]"))
        assertEquals(ByteArray::class.java, ResultSetUtils.getColumnType(metadata, MARIADB_DIALECT_OLD, 1))
        assertEquals(ByteArray::class.java, ResultSetUtils.getColumnType(metadata, MARIADB_DIALECT_CURRENT, 1))
    }

    @Test
    fun `resolving binary blob types for MariaDB ConnectorJ 3_5_1 or earlier`() {
        val metadata = MockResultSetMetaData(classNames = listOf("java.sql.Blob"))
        assertEquals(Blob::class.java, ResultSetUtils.getColumnType(metadata, MARIADB_DIALECT_OLD, 1))
    }

    @Test
    fun `resolving binary blob types for MariaDB ConnectorJ 3_5_2 or later`() {
        val metadata = MockResultSetMetaData(classNames = listOf("java.sql.Blob"))
        assertEquals(ByteArray::class.


ltype rot ,const std::vector<float>& axis, const int selHnd = -1 );
    int SetTransform ( const matrix tMat, const bool reset);
    int SetTransform ( mmdb::mat44 &TMatrix , const bool reset);
    int ReApplyTransform( const bool reset=0);
    void UnSetTransform(bool apply_inverse=1);
    std::vector<float> GetTransform();
    std::string GetTransformString();
    bool GetIsTransformed() { return isTransformed; }
    int TransformToSuperposeAtoms (  mmdb::PPAtom A1, int nA, mmdb::PPAtom A2 );
    double DeltaResidueOrientation (mmdb::PResidue pRes, mmdb::PResidue pResFx);
    int TransformToSuperposeCloseAtoms(PCMMANManager fxMolHnd, int fxSelHnd , mmdb::realtype central_cutoff, mmdb::realtype cutoff, int mvSuperposeHnd,int fxSuperposeHnd);
    int CopyCoordinates(const mmdb::PManager fromMolHnd,int fromModel=1);
    int LoadSerial(const mmdb::PManager fromMolHnd );
    bool GetUnremediated() { return unremediated; };
    std::string PrintSecStructure (void);

  private:

    // SAS
    PCSASArea p_sas;
    int udd_atomSAS;
    int udd_resSAS;

    // Bonds
    PCMGSBase p_sbase;
    PCMolBondParams p_bond_params;
    PCMolBonds p_bonds;
    //Atom energy types
    int udd_sbaseCompoundID;
    int udd_sbaseAtomOrdinal;
    int udd_atomEnergyType;

    std::string loaded_charge;

    int label_mask[20];

    std::map<std::string,int> customResTypes;
    std::map<std::string,std::string> customResSynonym;

    bool isTransformed,transform_com_set ;
    mmdb::mat44 current_transform;
    mmdb::realtype transform_com[3];

    bool unremediated;

};

#endif


 MvInfoBean?) {
                mView?.hideLoading()
                mView?.showBaiduMvDetailInfo(result)
            }

            override fun error(msg: String?) {
                mView?.hideLoading()
                mView?.showError(msg, true)
            }

        })
    }

    fun loadMvUrl(type: Int, mvid: String?) {
        mvModel.loadMvUrl(type, mvid, object : RequestCallBack<String> {
            override fun success(result: String?) {
                mView?.showMvUrlInfo(result)
            }

            override fun error(msg: String?) {

            }
        })
    }

    override fun loadMvDetail(mvid: String?, type: Int) {
        mvModel.loadMvDetail(mvid, type,object : RequestCallBack<VideoInfoBean> {
            override fun success(result: VideoInfoBean?) {
                mView?.hideLoading()
                result?.let {
                    mView?.showMvDetailInfo(it)
                }
            }

            override fun error(msg: String?) {
                mView?.hideLoading()
                mView?.showError(msg, true)
            }
        })
    }

    override fun loadMv(offset: Int) {
        mvModel.loadMv(offset, object : RequestCallBack<MvInfo> {
            override fun success(result: MvInfo?) {
                result?.data?.let {
//                    mView?.showVideoInfoList(it)
                }
            }

            override fun error(msg: String?) {
            }

        })
    }

    override fun loadSimilarMv(mvid: String?, type: Int) {
        mvModel.loadSimilarMv(mvid, type, object : RequestCallBack<MutableList<VideoInfoBean>> {
            override fun success(result: MutableList<VideoInfoBean>) {
                mView?.showVideoInfoList(result)
            }

            override fun error(msg: String?) {
            }

        })
    }

    override fun loadMvComment(mvid: String?, type: Int, offset: Int) {
        val videoType = if (type == 2) "mv" else "video"
        mvModel.loadMvComment(mvid, videoType, offset, object : RequestCallBack<MvComment> {
            override fun success(result: MvComment?) {
                result?.hotComments?.let {
                    if (it.size > 0) {
                        mView?.showMvHotComment(it)
                    }
                }
                result?.comments?.let {
                    mView?.showMvComment(it)
                }
            }

            override fun error(msg: String?) {
            }

        })
    }
}
package com.cyl.musiclake.ui.music.charts.activity

import android.os.Bundle

import com.cyl.musiclake.bean.Playlist
import com.cyl.musiclake.common.Extras
import com.cyl.musiclake.ui.base.BaseActivity
import com.cyl.musiclake.utils.LogUtil

/**
 * 作者：yonglong on 2016/8/24 10:43
 * 邮箱：643872807@qq.com
 * 版本：2.5
 */
class NeteasePlaylistActivity : BasePlaylistActivity() {
    override fun setEnableMore(): Boolean {
        return false
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        if (mPlaylist == null) {
            mPlaylist = intent.getParcelableExtra(Extras.PLAYLIST)
        }
        mPlaylist?.pid?.let {
            mPresenter?.loadPlaylist(it, mPlaylist?.type)
        }
        LogUtil.d(TAG,"mPlaylist "+mPlaylist?.toString())
    }

    override fun retryLoading() {
        super.retryLoading()
        mPlaylist?.pid?.let { mPresenter?.loadPlaylist(it, mPlaylist?.type) }
    }

    override


radius","value"),&QMeshPolygonNode::set_particle_radius );

    ADD_PROPERTY( PropertyInfo(Variant::FLOAT, "particle_radius"),"set_particle_radius","get_particle_radius" );
    ADD_PROPERTY( PropertyInfo(Variant::FLOAT, "polygon_radius", PROPERTY_HINT_RANGE,"0,99999,0.5"),"set_polygon_radius","get_polygon_radius" );
    ADD_PROPERTY( PropertyInfo(Variant::INT, "side_count"),"set_side_count","get_side_count" );
    ADD_PROPERTY( PropertyInfo(Variant::VECTOR2, "center_position"),"set_center_position","get_center_position" );
    ADD_PROPERTY( PropertyInfo(Variant::INT, "polar_grid"),"set_polar_grid","get_polar_grid" );

}

void QMeshPolygonNode::update_mesh_node_data() {
    QMesh::MeshData meshData=meshObject->GeneratePolygonMeshData(polygonRadius,sideCount,QVector(centerPosition.x,centerPosition.y),polarGrid,particleRadius);
    apply_mesh_data_to_mesh_node_data(meshData);
    queue_redraw();
}

void QMeshPolygonNode::set_polygon_radius(float value) {
    polygonRadius=value;
    update_mesh_node_data();
}

float  QMeshPolygonNode::get_polygon_radius() {
    return polygonRadius;
}

void QMeshPolygonNode::set_side_count(int value) {
    sideCount=value;
    update_mesh_node_data();
}

int  QMeshPolygonNode::get_side_count() {
    return sideCount;
}

void QMeshPolygonNode::set_center_position(Vector2 value) {
    centerPosition=value;
    update_mesh_node_data();
}

Vector2  QMeshPolygonNode::get_center_position() {
    return centerPosition;
}
void QMeshPolygonNode::set_polar_grid(int value) {
    polarGrid=value;
    update_mesh_node_data();
}

int  QMeshPolygonNode::get_polar_grid() {
    return polarGrid;
}

QMeshPolygonNode *QMeshPolygonNode::set_particle_radius(float value){
    particleRadius=value>=0.5f ? value:0.5f;
    update_mesh_node_data();
    return this;
}

float QMeshPolygonNode::get_particle_radius(){
    return particleRadius;
}#include "qraycast_object.h"
#include "qworld_node.h"

void QRaycastObject::_bind_methods() {
	ClassDB::bind_method(D_METHOD("get_position"),&QRaycastObject::get_position );
	ClassDB::bind_method(D_METHOD("get_rotation"),&QRaycastObject::get_rotation );
	ClassDB::bind_method(D_METHOD("get_ray_vector"),&QRaycastObject::get_ray_vector );
	ClassDB::bind_method(D_METHOD("get_containing_bodies_enabled"),&QRaycastObject::get_containing_bodies_enabled );

	ClassDB::bind_method(D_METHOD("set_position","value"),&QRaycastObject::set_position );
	ClassDB::bind_method(D_METHOD("set_rotation","value"),&QRaycastObject::set_rotation );
	ClassDB::bind_method(D_METHOD("set_ray_vector","value"),&QRaycastObject::set_ray_vector );
	ClassDB::bind_method(D_METHOD("set_containing_bodies_enabled","value"),&QRaycastObject::set_containing_bodies_enabled );
	ClassDB::bind_method(D_METHOD("set_collidable_layers_bit","value"),&QRaycastObject::set_collidable_layers_bit );

	ClassDB::bind_method(D_METHOD("configure",


 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="m21.977 13.783-2-9A1.002 1.002 0 0019 4h-3v2h2.198l.961 4.326A4.467 4.467 0 0017.5 10c-1.953 0-3.603 1.258-4.224 3h-2.553c-.621-1.742-2.271-3-4.224-3-.587 0-1.145.121-1.659.326L5.802 6H8V4H5a1 1 0 00-.976.783l-2 9 .047.011A4.552 4.552 0 002 14.5C2 16.981 4.019 19 6.5 19c2.31 0 4.197-1.756 4.449-4h2.102c.252 2.244 2.139 4 4.449 4 2.481 0 4.5-2.019 4.5-4.5 0-.242-.034-.475-.071-.706l.048-.011zM6.5 17C5.122 17 4 15.878 4 14.5S5.122 12 6.5 12 9 13.122 9 14.5 7.878 17 6.5 17zm11 0c-1.379 0-2.5-1.122-2.5-2.5s1.121-2.5 2.5-2.5 2.5 1.122 2.5 2.5-1.121 2.5-2.5 2.5z"/></svg>';
  static const String bx_glasses_alt =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="m21.948 11.684-2-6A.997.997 0 0019 5h-3v2h2.279l1.334 4H15c-1.103 0-2 .897-2 2h-2c0-1.103-.897-2-2-2H4.387l1.334-4H8V5H5a.998.998 0 00-.948.684l-2 6 .012.004A.928.928 0 002 12v4c0 1.654 1.346 3 3 3h3c1.654 0 3-1.346 3-3v-1h2v1c0 1.654 1.346 3 3 3h3c1.654 0 3-1.346 3-3v-4a.964.964 0 00-.063-.313l.011-.003zM9 16c0 .551-.448 1-1 1H5c-.552 0-1-.449-1-1v-3h5v3zm11 0c0 .551-.448 1-1 1h-3c-.552 0-1-.449-1-1v-3h5v3z"/></svg>';
  static const String bx_globe =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm7.931 9h-2.764a14.67 14.67 0 00-1.792-6.243A8.013 8.013 0 0119.931 11zM12.53 4.027c1.035 1.364 2.427 3.78 2.627 6.973H9.03c.139-2.596.994-5.028 2.451-6.974.172-.01.344-.026.519-.026.179 0 .354.016.53.027zm-3.842.7C7.704 6.618 7.136 8.762 7.03 11H4.069a8


# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init
from .attachment_info import AttachmentInfo

class GetInterviewRecordAttachmentResponseBody(object):
    _types = {
        "attachment": AttachmentInfo,
    }

    def __init__(self, d=None):
        self.attachment: Optional[AttachmentInfo] = None
        init(self, d, self._types)

    @staticmethod
    def builder() -> "GetInterviewRecordAttachmentResponseBodyBuilder":
        return GetInterviewRecordAttachmentResponseBodyBuilder()

class GetInterviewRecordAttachmentResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._get_interview_record_attachment_response_body = GetInterviewRecordAttachmentResponseBody()

    def attachment(self, attachment: AttachmentInfo) -> "GetInterviewRecordAttachmentResponseBodyBuilder":
        self._get_interview_record_attachment_response_body.attachment = attachment
        return self

    def build(self) -> "GetInterviewRecordAttachmentResponseBody":
        return self._get_interview_record_attachment_response_body


#include <stdio.h>
#include <math.h>
#include "const.h"

/*---------------------------------------------------------------------------*/
/* read in wavelength-reflectance value pairs from the user specified file   */
/* there should be one pair per line; tab or space delimited                 */

int zreadref (wave, refl)
     float  wave[1000], refl[1000];
{

  int  eof, npts, status, count;
  char reflfile[64], inbuf[LineLength];
  FILE *rfile;

  npts = 0;

  status = zvp ("REFLFILE", reflfile, &count);

  rfile = fopen(reflfile,"r");

  while (getline_vicar(inbuf, LineLength, rfile, &eof) >= 0 && !eof)
    if (sscanf(inbuf, "%f %f", &wave[npts], &refl[npts]) == 2)
      npts++;

  fclose(rfile);

  return npts;
}

/*---------------------------------------------------------------------------*/
/* use default values for reflectance if the user doesn"t specify anything   */

int zbldref(salb, wave, refl)
     float  salb;
     float  wave[1000], refl[1000];
{

  wave[0] = 0.1;
  wave[1] = 100.0;
  refl[0] = salb;
  refl[1] = salb;

  return 2;          /* npts == 2, is number of values in the arrays */
}

/*---------------------------------------------------------------------------*/
/* interpolate input or defaulted reflectance values to produce an array     */
/* with spacing and step size defined by user parms v1, v2 and dv            */

int zinterp_refl (start_wave, end_wave, wave_step, in_pts, wave, refl, specalb)
     float  start_wave, end_wave, wave_step;
     int in_pts;
     float  wave[1000], refl[1000], specalb[8000];
{
  int i, j, out_pts;
  float  ratio, wave_i;

  /*----- convert from wavelength to wavenumbers (micrometers to cm -1 -----*/
  for (j = 0; j < in_pts; j++)
    wave[j] = 10000.0 / wave[j];

  out_pts = (int ) ceil((end_wave - start_wave + wave_step) / wave_step);

  j = in_pts - 1;
  wave_i = start_wave;

  for (i = 0; i < out_pts; i++) {

    while (wave[j] < wave_i && j > 0)
      j -= 1;

    ratio = (wave[j] - wave_i) / (wave[j] - wave[j+1]);
    specalb[i] = ratio * refl[j+1] + (1 - ratio) * refl[j];

    wave_i += wave_step;
  }
  return out_pts;
}


using System;
using DigitalRune.Game;
using DigitalRune.Game.Input;
using DigitalRune.Geometry;
using DigitalRune.Graphics;
using DigitalRune.Graphics.SceneGraph;
using DigitalRune.Mathematics;
using DigitalRune.Mathematics.Algebra;
using Microsoft.Practices.ServiceLocation;
using Microsoft.Xna.Framework.Input;
using MathHelper = DigitalRune.Mathematics.MathHelper;

namespace Samples.Physics.Specialized
{
  /// <summary>
  /// Controls the camera.
  /// </summary>
  /// <remarks>
  /// The camera has two modes: It is either attached to the vehicle or at a fixed position
  /// looking at the vehicle ("spectator view").
  /// </remarks>
  [Controls(@"Camera
  Press <Enter> to toggle camera between player camera and spectator mode.
  Use Mouse or <Right Stick> to control camera in car-fixed camera mode.")]
  public class VehicleCameraObject : GameObject
  {
    //--------------------------------------------------------------
    #region Fields
    //--------------------------------------------------------------

    private readonly IServiceLocator _services;
    private readonly IInputService _inputService;
    private readonly IGeometricObject _vehicle;
    private bool _useSpectatorView;
    private float _yaw;
    private float _pitch;
    #endregion

    //--------------------------------------------------------------
    #region Properties & Events
    //--------------------------------------------------------------

    public CameraNode CameraNode { get; private set; }
    #endregion

    //--------------------------------------------------------------
    #region Creation & Cleanup
    //--------------------------------------------------------------

    public VehicleCameraObject(IGeometricObject vehicle, IServiceLocator services)
    {
      Name = "VehicleCamera";

      _vehicle = vehicle;
      _services = services;
      _inputService = services.GetInstance<IInputService>();
    }
    #endregion

    //--------------------------------------------------------------
    #region Methods
    //--------------------------------------------------------------

    protected override void OnLoad()
    {
      var graphicsService = _services.GetInstance<IGraphicsService>();

      // Define camera projection.
      var projection = new PerspectiveProjection();
      projection.SetFieldOfView(
        ConstantsF.PiOver4,
        graphicsService.GraphicsDevice.Viewport.AspectRatio,
        0.1f,
        1000.0f);

      // Create a camera node.
      CameraNode = new CameraNode(new Camera(projection));

      SetCameraPose();
    }

    protected override void OnUnload()
    {
      CameraNode.Dispose(false);
      CameraNode = null;
    }

    prote


codeSize);
        result.status_code = EVMC_SUCCESS;
        result.gas_left = vm->m_io_gas;
    }
    catch (dev::eth::RevertInstruction& ex)
    {
        result.status_code = EVMC_REVERT;
        result.gas_left = vm->m_io_gas;
        output = ex.output();  // This moves the output from the exception!
    }
    catch (dev::eth::BadInstruction const&)
    {
        result.status_code = EVMC_UNDEFINED_INSTRUCTION;
    }
    catch (dev::eth::OutOfStack const&)
    {
        result.status_code = EVMC_STACK_OVERFLOW;
    }
    catch (dev::eth::StackUnderflow const&)
    {
        result.status_code = EVMC_STACK_UNDERFLOW;
    }
    catch (dev::eth::BufferOverrun const&)
    {
        result.status_code = EVMC_INVALID_MEMORY_ACCESS;
    }
    catch (dev::eth::OutOfGas const&)
    {
        result.status_code = EVMC_OUT_OF_GAS;
    }
    catch (dev::eth::BadJumpDestination const&)
    {
        result.status_code = EVMC_BAD_JUMP_DESTINATION;
    }
    catch (dev::eth::DisallowedStateChange const&)
    {
        result.status_code = EVMC_STATIC_MODE_VIOLATION;
    }
    catch (dev::eth::VMException const&)
    {
        result.status_code = EVMC_FAILURE;
    }
    catch (...)
    {
        result.status_code = EVMC_INTERNAL_ERROR;
    }

    if (!output.empty())
    {
        // Make a copy of the output.
        auto outputData = new uint8_t[output.size()];
        std::memcpy(outputData, output.data(), output.size());
        result.output_data = outputData;
        result.output_size = output.size();
        result.release = delete_output;
    }

    return result;
}
}  // namespace

extern "C" evmc_instance* evmc_create_interpreter() noexcept
{
    // TODO: Allow creating multiple instances with different configurations.
    static evmc_instance s_instance{
        EVMC_ABI_VERSION,
        "interpreter",
        aleth_get_buildinfo()->project_version,
        ::destroy,
        ::execute,
        nullptr,  // set_tracer
        nullptr,  // set_option
    };
    return &s_instance;
}

namespace dev
{
namespace eth
{
uint64_t VM::memNeed(u256 _offset, u256 _size)
{
    return toInt63(_size ? u512(_offset) + _size : u512(0));
}

template <class S>
S divWorkaround(S const& _a, S const& _b)
{
    return (S)(s512(_a) / s512(_b));
}

template <class S>
S modWorkaround(S const& _a, S const& _b)
{
    return (S)(s512(_a) % s512(_b));
}

//
// for decoding destinations of JUMPTO, JUMPV, JUMPSUB and JUMPSUBV
//

uint64_t VM::decodeJumpDest(const byte* const _code, uint64_t& _pc)
{
    // turn 2 MSB-first bytes in the code into a native-order integer
    uint64_t dest      = _code[_pc++];
    dest = (dest << 8) | _code[_pc++];
    return dest;
}

uint64_t VM::decodeJumpvDest(const byte* const _code, uint64_t& _pc, byte _voff)
{
    // Layou


+a]=n.buf_[o+a];r-=g,w+=g,t-=g,o=0}for(a=0;a<r;a++)s[w+a]=n.buf_[o+a];if(t-=r,(w+=r)>=E){A.write(s,E),w-=E;for(a=0;a<w;a++)s[a]=s[E+a]}for(;w+t>=E;){if(r=E-w,n.input_.read(s,w,r)<r)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");A.write(s,E),t-=r,w=0}if(n.input_.read(s,w,t)<t)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");n.reset()}}function N(A){var t=A.bit_pos_+7&-8;return 0==A.readBits(t-A.bit_pos_)}function V(A){var t=new s(A),e=new B(t);return L(e),R(e).meta_block_length}function k(A,t){var e,s,i,E,a,Q,I,f,b,Y,M=0,v=0,d=0,p=[16,15,11,4],V=0,k=0,J=0,j=[new P(0,0),new P(0,0),new P(0,0)],K=128+B.READ_SIZE;i=(1<<(s=L(Y=new B(A))))-16,a=(E=1<<s)-1,Q=new Uint8Array(E+K+n.maxDictionaryWordLength),I=E,f=[],b=[];for(var z=0;z<3*D;z++)f[z]=new r(0,0),b[z]=new r(0,0);for(;!v;){var T,O,Z,X,q,_,$,AA,tA,eA,sA,iA=0,BA=[1<<28,1<<28,1<<28],nA=[0],rA=[1,1,1],EA=[0,1,0,1,0,1],wA=[0],oA=null,gA=null,aA=0,QA=null,cA=0,CA=0,hA=0;for(e=0;e<3;++e)j[e].codes=null,j[e].htrees=null;Y.readMoreInput();var lA=R(Y);if(M+(iA=lA.meta_block_length)>t.buffer.length){var uA=new Uint8Array(M+iA);uA.set(t.buffer),t.buffer=uA}if(v=lA.input_end,T=lA.is_uncompressed,lA.is_metadata)for(N(Y);iA>0;--iA)Y.readMoreInput(),Y.readBits(8);else if(0!==iA)if(T)Y.bit_pos_=Y.bit_pos_+7&-8,U(t,iA,M,Q,a,Y),M+=iA;else{for(e=0;e<3;++e)rA[e]=y(Y)+1,rA[e]>=2&&(x(rA[e]+2,f,e*D,Y),x(h,b,e*D,Y),BA[e]=G(b,e*D,Y),wA[e]=1);for(Y.readMoreInput(),X=(1<<(O=Y.readBits(2)))-1,q=(Z=F+(Y.readBits(4)<<O))+(48<<O),oA=new Uint8Array(rA[0]),e=0;e<rA[0];++e)Y.readMoreInput(),oA[e]=Y.readBits(2)<<1;var IA=H(rA[0]<<l,Y);$=IA.num_htrees,_=IA.context_map;var fA=H(rA[2]<<u,Y);for(tA=fA.num_htrees,AA=


/attachments/Pasted%20image%2020250225141636.png)

$f$ 在 $x_{0}$ 处的$n$ 阶泰勒多项式由级数的前 $n+1$ 项构成：
$$T_{n}(x)=\sum_{k = 0}^{n}\frac{D_{x}^{k}f(x_{0})}{k!}\delta^{k}$$
在(5.151)和(5.152)中，记号 $\delta^{k}$ 略显草率的，因为当向量 $x\in \mathbb{R}^{D}$，$D>1$，和 $k>1$ 是未被定义的。事实上，$D_{x}^{k}f$ 和 $\delta^{k}$ 都是 $k$ 阶张量，即 $k$ 维数组，如图 5.13 所示。$k$ 阶张量 $\delta^{k}\in \mathbb{R}^{\overbrace{D\times D\times\cdots\times D}^{k \text{ times}}}$ 是通过向量 $\delta\in \mathbb{R}^{D}$ 的 $k$ 重外积得到的，其中 “外积” 用 $\otimes$ 表示。例如，
$$
\begin{align}
\boldsymbol{\delta}^{2}:=\boldsymbol{\delta}\otimes\boldsymbol{\delta}=\boldsymbol{\delta}\boldsymbol{\delta}^{\top}&, \quad \boldsymbol{\delta}^{2}[i,j]=\delta[i]\delta[j]; \tag{5.153}\\
\boldsymbol{\delta}^{3}:=\boldsymbol{\delta}\otimes\boldsymbol{\delta}\otimes\boldsymbol{\delta} &, \quad \boldsymbol{\delta}^{3}[i,j,k]=\delta[i]\delta[j]\delta[k]. \tag{5.154}
\end{align}
$$
这样一来我们可以写出 Taylor 级数
$$
D_{\boldsymbol{x}}^{k} f(\boldsymbol{x}_{0})\boldsymbol{\delta}^{k} = \sum\limits_{i_{1}=1}^{D} \cdots \sum\limits_{i_{k}=1}^{D} D_{\boldsymbol{x}}^{k}f(\boldsymbol{x}_{0})[i_{1}, \dots, i_{k}]\delta[i_{1}]\cdots \delta[i_{k}] \tag{5.155}
$$
其中 $D_{x}^{k}f(x_{0})\boldsymbol{\delta}^{k}$ 包含关于 $\boldsymbol{\delta}$ 的 $k$ 阶多项式。

我们现在已经定义了向量场的 Taylor 级数。让我们显式的写下它的前几项（$k = 0, \dots, 3, \boldsymbol{\delta} := \boldsymbol{x} - \boldsymbol{x}_{0}$）：
* $k = 0: D_{x}^{0}f(x_{0})\boldsymbol{ \delta }^{0}=f(x_{0})\in \mathbb{R}$
* $\displaystyle k = 1: D_{x}^{1}f(x_{0})\boldsymbol{ \delta }^{1}=\underbrace{\nabla_{x}f(x_{0})}_{1\times D}\,\underbrace{\boldsymbol{ \delta }}_{D\times 1}=\sum_{i = 1}^{D}\


    }

    for field in &defn_mesg.dev_field_defns {

        let mut desc2: Option<Arc<FitDevDataDescription>> = None;
        if let Some(dev_data) = context.developer_ids.get(
            &field.dev_data_index) {
            desc2 = match dev_data.developer_field_definitions.get(
                &field.field_defn_num) {
                None => {None },
                Some(x) => {Some(x.clone())},
            };
        }

        if let Some(desc) = desc2
        {
            let base_type = desc.base_type.unwrap();
            let data_size = base_type.data_size();
            let count:u8 = match data_size {
                0 => field.size_in_bytes,
                _ => field.size_in_bytes / data_size };

            let field_value_data = read_fit_field(context, reader,
                                                  base_type, count)?;

            let field_value = FitDevDataField {
                field_defn_num: field.field_defn_num,
                data: field_value_data,
                description: Some( desc.clone() ),
            };
            mesg.dev_fields.push(field_value);
        } else {
            // Field description not found. Load as bytes.
            warn!("Unknown dev field index={} defn_num={}", field.dev_data_index, field.field_defn_num);
            let base_type = FitDataType::FitByte;
            let count = field.size_in_bytes;
            let field_value_data = read_fit_field(context, reader,
                                                  base_type, count)?;

            let field_value = FitDevDataField {
                field_defn_num: field.field_defn_num,
                data: field_value_data,
                description: None,
            };
            mesg.dev_fields.push(field_value);
        }
    }

    debug!("Data message: {:?}", mesg);

    const FIELD_DESCRIPTION: u16 = 206;

    if defn_mesg.global_message_number == FIELD_DESCRIPTION {
        add_dev_field_description( context, &mesg );
    }

    Ok(mesg)
}

fn add_dev_field_description( context: &mut FitFileContext, mesg: &FitDataMessage )
{
    const DEV_DATA_INDEX: u8 = 0;
    const FIELD_DEFN_NUM: u8 = 1;
    const BASE_TYPE_ID: u8 = 2;
    const NAME: u8 = 3;
    // ARRAY = 4,
    // 5	components
    const SCALE: u8 = 6;
    const OFFSET: u8 = 7;
    const UNITS: u8 = 8;
    //9	bits
    //10	accumulate
    //13	fit_base_unit_id
    //14	native_mesg_num
    //15	native_field_num

    let mut has_field_defn = false;

    let mut dev_data_desc: FitDevDataDescription = Default::default();
    for ifield in &mesg.fields {
        match ifield.field_defn_num {
            DEV_DATA_INDEX => { // dev_data_index
                if let Ok(x) = u8::try_from(&ifield.data) {
                    dev_data_desc.dev_data_index = x;
                } else {
                    warn!("Bad type for dev_data_index");
                }
            },
            FIELD_DEFN_NUM => { // field_defn_num
                if let  Ok(x) = u8::try_from(&ifield.data) {
                    has_field_defn = true;
                    dev_data_desc.field_defn_num = x;
                } else {
                    warn!("Bad type for field_defn_num");
                }
            },
            BASE_TYPE_ID => {
                if  let Ok(x) = u8::try_from(&ifield.data) {
                    // U


if (shift-- == 0) {
        set = lastset;
      }
    }
    while (sb.length() > 0 && sb.charAt(sb.length() - 1) == PAD) {
      sb.setLength(sb.length() - 1);
    }
    return sb.toString();
  }

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

package com.google.zxing.pdf417.decoder.ec;

import com.google.zxing.ChecksumException;

/**
 *
PDF417 error correction implementation.

 *
 *
This example
 * is quite useful in understanding the algorithm.

 *
 * @author Sean Owen
 * @see com.google.zxing.common.reedsolomon.ReedSolomonDecoder
 */
public final class ErrorCorrection {

  private final ModulusGF field;

  public ErrorCorrection() {
    this.field = ModulusGF.PDF417_GF;
  }

  public void decode(int[] received,
                     int numECCodewords,
                     int[] erasures) throws ChecksumException {

    ModulusPoly poly = new ModulusPoly(field, received);
    int[] S = new int[numECCodewords];
    boolean error = false;
    for (int i = numECCodewords; i > 0; i--) {
      int eval = poly.evaluateAt(field.exp(i));
      S[numECCodewords - i] = eval;
      if (eval != 0) {
        error = true;
      }
    }

    if (error) {

      ModulusPoly knownErrors = field.getOne();
      for (int erasure : erasures) {
        int b = field.exp(received.length - 1 - erasure);
        // Add (1 - bx) term:
        ModulusPoly term = new ModulusPoly(field, new int[] { field.subtract(0, b), 1 });
        knownErrors = knownErrors.multiply(term);
      }

      ModulusPoly syndrome = new ModulusPoly(field, S);
      //syndrome = syndrome.multiply(knownErrors);

      ModulusPoly[] sigmaOmega =
          runEuclideanAlgorithm(field.buildMonomial(numECCodewords, 1), syndrome, numECCodewords);
      ModulusPoly sigma = sigmaOmega[0];
      ModulusPoly omega = sigmaOmega[1];

      //sigma = sigma.multiply(knownErrors);

      int[] errorLocations = findErrorLocations(sigma);
      int[] errorMagnitudes = findErrorMagnitudes(omega, sigma, errorLocations);

      for (int i = 0; i < errorLocations.length; i++) {
        int position = received.length - 1 - field.log(errorLocations[i]);
        if (position < 0) {
          throw ChecksumException.getChecksumInstance();
        }
        received[position] = field.subtract(received[position], errorMagnitudes[i]);
      }
    }
  }

  private ModulusPoly[] runEuclideanAlgorithm(ModulusPoly a, ModulusPoly b, int R)
      throws ChecksumException {
    // Assume a's degree is >= b's
    if (a.getDegree() < b.getDegree()) {
      ModulusPoly temp = a;
      a = b;
      b = temp;
    }

    ModulusPoly rLas