M_AttributeSetInstance_ID(0);
			line.setM_LocatorTo_ID(M_LocatorTo_ID);					//	to
			line.setM_AttributeSetInstanceTo_ID(0);
			line.setIsInvoiced(false);
			line.saveEx();

		}
		if (replenishs.length == 0)
		{
			m_info = new StringBuffer("No Source Warehouse");
			log.warning(m_info.toString());
		}
		else
		{
			m_info = new StringBuffer("#").append(noMoves).append(info);
			if (log.isLoggable(Level.INFO)) log.info(m_info.toString());
		}
	}	//	create Distribution Order

	/**
	 * 	Get Replenish Records
	 *	@return replenish
	 */
	private X_T_Replenish[] getReplenish (String where)
	{
		StringBuilder sql = new StringBuilder("SELECT * FROM T_Replenish ");
						sql.append("WHERE AD_PInstance_ID=? AND C_BPartner_ID > 0 ");
		if (where != null && where.length() > 0)
			sql.append(" AND ").append(where);
		sql.append(" ORDER BY M_Warehouse_ID, M_WarehouseSource_ID, C_BPartner_ID");
		ArrayList<X_T_Replenish> list = new ArrayList<X_T_Replenish>();
		PreparedStatement pstmt = null;
		ResultSet rs = null;
		try
		{
			pstmt = DB.prepareStatement (sql.toString(), get_TrxName());
			pstmt.setInt (1, getAD_PInstance_ID());
			rs = pstmt.executeQuery ();
			while (rs.next ())
				list.add (new X_T_Replenish (getCtx(), rs, get_TrxName()));
		}
		catch (Exception e)
		{
			log.log(Level.SEVERE, sql.toString(), e);
		}
		finally
		{
			DB.close(rs, pstmt);
			rs = null;
			pstmt = null;
		}
		X_T_Replenish[] retValue = new X_T_Replenish[list.size ()];
		list.toArray (retValue);
		return retValue;
	}	//	getReplenish

	/**
	 * 	Get Replenish Records
	 *	@return replenish
	 */
	private X_T_Replenish[] getReplenishDO (String where)
	{
		StringBuilder sql = new StringBuilder("SELECT * FROM T_Replenish ");
								sql.append("WHERE AD_PInstance_ID=? ");
		if (where != null && where.length() > 0)
			sql.append(" AND ").append(where);
		sql.append(" ORDER BY M_Warehouse_ID, M_WarehouseSource_ID, C_BPartner_ID");
		ArrayList<X_T_Replenish> list = new ArrayList<X_T_Replenish>();
		PreparedStatement pstmt = null;
		ResultSet rs = null;
		try
		{
			pstmt = DB.prepareStatement (sql.toString(), get_TrxName());
			pstmt.setInt (1, getAD_PInstance_ID());
			rs = pstmt.executeQuery ();
			while (rs.next ())
				list.add (new X_T_Replenish (getCtx(), rs, get_TrxName()));
		}
		catch (Exception e)
		{
			log.log(Level.SEVERE, sql.toString(), e);
		}
		finally
		{
			DB.close(rs, pstmt);
			rs = null;
			pstmt = null;
		}
		X_T_Replenish[] retValue = new X_T_Replenish[list.size ()];
		list.toArray (retValue);
		return retValue;
	}	//	getReplenish

}	//	Replenish


ygui help to see more info about the plugin.")

 override var shyGuiCommandDescription = LanguageItem("[&9PetBlocks&f] All commands for the ShyGUI plugin.")

 override var shyGuiCommandSenderHasToBePlayer = LanguageItem("[&9PetBlocks&f] The command sender has to be a player if you do not specify the optional player argument.")

 override var shyGuiGuiMenuNotFoundMessage = LanguageItem("[&9PetBlocks&f] &cMenu %petblocks_param_1% not found.")

 override var shyGuiGuiMenuNoPermissionMessage = LanguageItem("[&9PetBlocks&f] &cYou do not have permission for menu %petblocks_param_1%.")

 override var shyGuiManipulateOtherMessage = LanguageItem("[&9PetBlocks&f] &cYou do not have permission to open the GUI menu for other players.")

 override var shyGuiCloseCommandHint = LanguageItem("Closes the GUI menu.")

 override var shyGuiBackCommandHint = LanguageItem("Goes back one GUI page.")

 override var shyGuiOpenCommandHint = LanguageItem("Opens the GUI menu with the given name.")

 override var shyGuiNextCommandHint = LanguageItem("Opens the next GUI page.")

 override var shyGuiReloadCommandHint = LanguageItem("Reloads all GUI menus and configuration.")

 override var shyGuiMessageCommandHint = LanguageItem("Sends a chat message.")

 override var shyGuiReloadMessage = LanguageItem("[&9PetBlocks&f] Reloaded all GUI menus and configuration.")

 override var shyGuiCannotParseItemStackError = LanguageItem("[&9PetBlocks&f] &cCannot parse ItemStack at row %petblocks_param_1% and col %petblocks_param_2%! Check your GUI menu configuration by reviewing the full item parsing error in the console log.")

 override var shyGuiRowColOutOfRangeError = LanguageItem("[&9PetBlocks&f] &cThe specified row %petblocks_param_1% and col %petblocks_param_2% are out of range of the GUI! Check your GUI menu configuration.")

 override var shyGuiRefreshCommandHint = LanguageItem("Refreshes the current GUI page.")

 override var shyGuiServerCommandHint = LanguageItem("Sends the player to the given server.")

 override var shyGuiServerMessage = LanguageItem("[&9PetBlocks&f] Connecting to server '%petblocks_param_1%' ...")
}
// Figurinhas

/*
Ricardo e Vicente são aficionados por figurinhas. Nas horas vagas, eles arrumam
um jeito de jogar um “bafo” ou algum outro jogo que envolva tais figurinhas.
Ambos também têm o hábito de trocarem as figuras repetidas com seus amigos e
certo dia pensaram em uma brincadeira diferente. Chamaram todos os amigos e
propuseram o seguinte: com as figurinhas em mãos, cada um tentava fazer uma
troca com o amigo que estava mais perto seguindo a seguinte regra: cada um
contava quantas figurinhas tinha. Em seguida, eles tinham que dividir as
figurinhas de cada um em pilhas do mesmo tamanho, no maior tamanho que fosse
possível para ambos. Então, cada um escolhia uma das pilhas de figurinhas do
amigo para receber. Por exemplo, se Ricardo e Vicente fossem trocar as
figurinhas e tivessem respectivamente 8 e 12 figuras, ambos dividiam todas as
suas figuras em pilhas de 4 figuras (Ricardo teria 2 pilhas e Vicente teria 3
pilhas) e ambos escolhiam uma pilha do amigo para receber.

- Entrada

A primeira linha da entrada contém um único inteiro N (1 ≤ N ≤ 3000), indicando
o número de casos de teste. Cada caso de teste contém 2 inteiros F1
(1 ≤ F1 ≤ 1000) e F2 (1 ≤ F2 ≤ 1000) indicando, respectivamente, a quantidade
de figurinhas que Ricardo e Vicente


 BSC1 registers.
  static const int REGBASE_BSC1 = 8;

  /// !< Base of the AUX registers.
  static const int REGBASE_AUX = 9;

  /// !< Base of the SPI1 registers.
  static const int REGBASE_SPI1 = 10;

  /// !< Base of the SMI registers.
  static const int REGBASE_SMI = 11;
}

/// !   \brief bcm2835PortFunction
/// Port function select modes for bcm2835_gpio_fsel()
abstract class FunctionSelect {
  /// !< Input 0b000
  static const int GPIO_FSEL_INPT = 0;

  /// !< Output 0b001
  static const int GPIO_FSEL_OUTP = 1;

  /// !< Alternate function 0 0b100
  static const int GPIO_FSEL_ALT0 = 4;

  /// !< Alternate function 1 0b101
  static const int GPIO_FSEL_ALT1 = 5;

  /// !< Alternate function 2 0b110,
  static const int GPIO_FSEL_ALT2 = 6;

  /// !< Alternate function 3 0b111
  static const int GPIO_FSEL_ALT3 = 7;

  /// !< Alternate function 4 0b011
  static const int GPIO_FSEL_ALT4 = 3;

  /// !< Alternate function 5 0b010
  static const int GPIO_FSEL_ALT5 = 2;

  /// !< Function select bits mask 0b111
  static const int GPIO_FSEL_MASK = 7;
}

/// ! \brief bcm2835PUDControl
/// Pullup/Pulldown defines for bcm2835_gpio_pud()
abstract class PUDControl {
  /// !< Off ? disable pull-up/down 0b00
  static const int GPIO_PUD_OFF = 0;

  /// !< Enable Pull Down control 0b01
  static const int GPIO_PUD_DOWN = 1;

  /// !< Enable Pull Up control 0b10
  static const int GPIO_PUD_UP = 2;
}

/// ! \brief bcm2835PadGroup
/// Pad group specification for bcm2835_gpio_pad()
abstract class PadGroup {
  /// !< Pad group for GPIO pads 0 to 27
  static const int PAD_GROUP_GPIO_0_27 = 0;

  /// !< Pad group for GPIO pads 28 to 45
  static const int PAD_GROUP_GPIO_28_45 = 1;

  /// !< Pad group for GPIO pads 46 to 53
  static const int PAD_GROUP_GPIO_46_53 = 2;
}

/// ! \brief GPIO Pin Numbers
///
/// Here we define Raspberry Pin GPIO pins on P1 in terms of the underlying BCM GPIO pin numbers.
/// These can be passed as a pin number to any function requiring a pin.
/// Not all pins on the RPi 26 bin IDE plug are connected to GPIO pins
/// and some can adopt an alternate function.
/// RPi version 2 has some slightly different pinouts, and these are values RPI_V2_*.
/// RPi B+ has yet differnet pinouts and these are defined in RPI_BPLUS_*.
/// At bootup, pins 8 and 10 are set to UART0_TXD, UART0_RXD (ie the alt0 function) respectively
/// When SPI0 is in use (ie after bcm2835_spi_begin()), SPI0 pins are dedicated to SPI
/// and cant be controlled independently.
/// If you are using the RPi Compute Module, just use the GPIO number: there is no need to use one of these
/// symbolic names
abstract class RPiGPIOPin {
  /// !< Version 1, Pin P1-0


 Pos(7)),
    8usize.into(),
    HalfBtf(Neg(16), 9, Pos(48), 14),
    HalfBtf(Neg(48), 10, Neg(16), 13),
    11usize.into(),
    12usize.into(),
    HalfBtf(Neg(16), 10, Pos(48), 13),
    HalfBtf(Pos(48), 9, Pos(16), 14),
    15usize.into(),
    AddClamp(Pos(16), Pos(19)),
    AddClamp(Pos(17), Pos(18)),
    AddClamp(Pos(17), Neg(18)),
    AddClamp(Pos(16), Neg(19)),
    AddClamp(Neg(20), Pos(23)),
    AddClamp(Neg(21), Pos(22)),
    AddClamp(Pos(21), Pos(22)),
    AddClamp(Pos(20), Pos(23)),
    AddClamp(Pos(24), Pos(27)),
    AddClamp(Pos(25), Pos(26)),
    AddClamp(Pos(25), Neg(26)),
    AddClamp(Pos(24), Neg(27)),
    AddClamp(Neg(28), Pos(31)),
    AddClamp(Neg(29), Pos(30)),
    AddClamp(Pos(29), Pos(30)),
    AddClamp(Pos(28), Pos(31)),
  ];
  let stg5 = Stage::next(stg4, stg5);
  let stg5 = VarArr::let_(dst, format_args!("{}_idct32_stg5", disc), &stg5);

  let stg6 = vec![
    AddClamp(Pos(0), Pos(3)),
    AddClamp(Pos(1), Pos(2)),
    AddClamp(Pos(1), Neg(2)),
    AddClamp(Pos(0), Neg(3)),
    4usize.into(),
    HalfBtf(Neg(32), 5, Pos(32), 6),
    HalfBtf(Pos(32), 5, Pos(32), 6),
    7usize.into(),
    AddClamp(Pos(8), Pos(11)),
    AddClamp(Pos(9), Pos(10)),
    AddClamp(Pos(9), Neg(10)),
    AddClamp(Pos(8), Neg(11)),
    AddClamp(Neg(12), Pos(15)),
    AddClamp(Neg(13), Pos(14)),
    AddClamp(Pos(13), Pos(14)),
    AddClamp(Pos(12), Pos(15)),
    16usize.into(),
    17usize.into(),
    HalfBtf(Neg(16), 18, Pos(48), 29),
    HalfBtf(Neg(16), 19, Pos(48), 28),
    HalfBtf(Neg(48), 20, Neg(16), 27),
    HalfBtf(Neg(48), 21, Neg(16), 26),
    22usize.into(),
    23usize.into(),
    24usize.into(),
    25usize.into(),
    HalfBtf(Neg(16), 21, Pos(48), 26),
    HalfBtf(Neg(16), 20, Pos(48), 27),
    HalfBtf(Pos(48), 19, Pos(16), 28),
    HalfBtf(Pos(48), 18, Pos(16), 29),
    30usize.into(),
    31usize.into(),
  ];
  let stg6 = Stage::next(stg5, stg6);
  let stg6 = VarArr::let_(dst, format_args!("{}_idct32_stg6", disc), &stg6);

  let stg7 = vec![
    AddClamp(Pos(0), Pos(7)),
    AddClamp(Pos(1), Pos(6)),
    AddClamp(Pos(2), Pos(5)),
    AddClamp(Pos(3), Pos(4)),
    AddClamp(Pos(3), Neg(4)),
    AddClamp(Pos(2), Neg(5)),
    AddClamp(Pos(1), Neg(6)),
    Add


//	Copyright (c) 2011-2023 by Artem A. Gevorkyan (gevorkyan.org)
//
//	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.

#pragma once

#include "log.h"

#include <common/time.h>
#include <functional>
#include <list>
#include <mt/mutex.h>
#include <mt/tls.h>

namespace micro_profiler
{
	namespace log
	{
		class multithreaded_logger : public logger, noncopyable
		{
		public:
			typedef std::function<void (const char *text)> writer_t;
			typedef std::function<datetime ()> time_provider_t;

		public:
			multithreaded_logger(const writer_t &writer, const time_provider_t &time_provider);
			~multithreaded_logger();

			virtual void begin(const char *message, level level_) throw();
			virtual void add_attribute(const attribute &a) throw();
			virtual void commit() throw();

		private:
			buffer_t &get_buffer();

		private:
			const writer_t _writer;
			const time_provider_t _time_provider;
			std::list<buffer_t> _buffer_container;
			mt::tls<buffer_t> _buffers;
			mt::mutex _construction_mutex;
		};
	}
}


	}

	if !sys.flipY {
		cameraPositionInScene.Y += 2
	} else {
		cameraPositionInScene.Y -= 2
	}

	return nil
}
package main

import (
	"embed"
	"log"

	"github.com/TheBitDrifter/bappa/blueprint"
	"github.com/TheBitDrifter/bappa/coldbrew"
	"github.com/TheBitDrifter/bappa/coldbrew/coldbrew_clientsystems"
	"github.com/TheBitDrifter/bappa/coldbrew/coldbrew_rendersystems"

	"github.com/TheBitDrifter/bappa/warehouse"
)

//go:embed assets/*
var assets embed.FS

func main() {
	client := coldbrew.NewClient(
		640,
		360,
		10,
		10,
		10,
		assets,
	)
	client.SetTitle("Split Screen Camera")
	err := client.RegisterScene(
		"Example Scene",
		640,
		360,
		exampleScenePlan,
		[]coldbrew.RenderSystem{},
		[]coldbrew.ClientSystem{
			&coldbrew_clientsystems.BackgroundScrollSystem{},
			&cameraMovementSystem{},
		},
		[]blueprint.CoreSystem{},
	)
	if err != nil {
		log.Fatal(err)
	}
	client.RegisterGlobalRenderSystem(coldbrew_rendersystems.GlobalRenderer{})

	client.SetCameraBorderSize(6)

	quarterWidth := 640 / 2
	quarterHeight := 360 / 2
	cam1, err := client.ActivateCamera()
	if err != nil {
		log.Fatal(err)
	}
	cam2, err := client.ActivateCamera()
	if err != nil {
		log.Fatal(err)
	}
	cam3, err := client.ActivateCamera()
	if err != nil {
		log.Fatal(err)
	}
	cam4, err := client.ActivateCamera()
	if err != nil {
		log.Fatal(err)
	}
	cam1.SetDimensions(quarterWidth, quarterHeight)
	cam2.SetDimensions(quarterWidth, quarterHeight)
	cam3.SetDimensions(quarterWidth, quarterHeight)
	cam4.SetDimensions(quarterWidth, quarterHeight)
	cam1Pos, _ := cam1.Positions()
	cam1Pos.X = 0
	cam1Pos.Y = 0
	cam2Pos, cam2ScenePos := cam2.Positions()
	cam2Pos.X = float64(quarterWidth)
	cam2Pos.Y = 0
	cam2ScenePos.Y = 240
	cam3Pos, cam3ScenePos := cam3.Positions()
	cam3Pos.X = 0
	cam3Pos.Y = float64(quarterHeight)
	cam3ScenePos.Y = 160
	cam4Pos, cam4ScenePos := cam4.Positions()
	cam4Pos.X = float64(quarterWidth)
	cam4Pos.Y = float64(quarterHeight)
	cam4ScenePos.Y = 80
	if err := client.Start(); err != nil {
		log.Fatal(err)
	}
}

func exampleScenePlan(width, height int, sto warehouse.Storage) error {
	err := blueprint.NewParallaxBackgroundBuilder(sto).
		AddLayer("images/sky.png", 0.1, 0.1).
		AddLayer("images/far.png", 0.3, 0.3).
		AddLayer("images/mid.png", 0.4, 0.4).
		AddLayer("images/near.png", 0.8, 0.8).
		Build()
	if err != nil {
		return err
	}
	return nil
}

type cameraMovementSystem struct {
	flipX bool
}

func (sys *cameraMovementSystem) Run(cli coldbrew.LocalClient, scene coldbrew.Scene) error {
	cameras := cli.ActiveCamerasFor(scene)
	for _, cam := range cameras {
		_, cameraPositionInScene := cam.Positions()
		if cameraPositionInScene.X > 640 {
			sys.flipX = true
		} else if cameraPositionInScene.X < 0 {
			sys.flipX = false
		}

		if !sys.flipX {
			cameraPositionInScene.X += 1
		} else {
			cameraP


人嫌犯遗体被找到#](https://s.weibo.com/weibo?q=%23%E9%BB%91%E9%BE%99%E6%B1%9F%E6%9D%807%E4%BA%BA%E5%AB%8C%E7%8A%AF%E9%81%97%E4%BD%93%E8%A2%AB%E6%89%BE%E5%88%B0%23)
    - 暂无数据
    - 4204讨论 1.4亿阅读
1. [#茅台酒纸箱一个炒到500元#](https://s.weibo.com/weibo?q=%23%E8%8C%85%E5%8F%B0%E9%85%92%E7%BA%B8%E7%AE%B1%E4%B8%80%E4%B8%AA%E7%82%92%E5%88%B0500%E5%85%83%23)
    - 记者春节期间走访发现，有茅台酒纸箱一个炒到500元，同规格普通纸箱每个售价不过3元。
    - 5070讨论 1.3亿阅读
1. [#77城房价过万#](https://s.weibo.com/weibo?q=%2377%E5%9F%8E%E6%88%BF%E4%BB%B7%E8%BF%87%E4%B8%87%23)
    - 当前，在全国300多个城市（含直辖市、省会城市、计划单列市和普通地级市）中，共有77个城市的平均单价超过了1万元/平方米，其中东南沿海的江苏、浙江、福建、广东最为集中，四省单价过万的城市之和占比过半。
    - 3438讨论 1亿阅读
1. [#你好李焕英哪个细节打动了你#](https://s.weibo.com/weibo?q=%23%E4%BD%A0%E5%A5%BD%E6%9D%8E%E7%84%95%E8%8B%B1%E5%93%AA%E4%B8%AA%E7%BB%86%E8%8A%82%E6%89%93%E5%8A%A8%E4%BA%86%E4%BD%A0%23)
    - 这个春节档，不知道《你好，李焕英》看哭了多少人。带话题说说，你被哪个细节/台词打动了？
    - 2.6万讨论 3.2亿阅读
1. [#感动中国2020给张桂梅的颁奖词#](https://s.weibo.com/weibo?q=%23%E6%84%9F%E5%8A%A8%E4%B8%AD%E5%9B%BD2020%E7%BB%99%E5%BC%A0%E6%A1%82%E6%A2%85%E7%9A%84%E9%A2%81%E5%A5%96%E8%AF%8D%23)
    - “烂漫的山花中


, p3/z, [x13, z8.d, lsl #1]
// CHECK-INST: ld1h    { z23.d }, p3/z, [x13, z8.d, lsl #1]
// CHECK-ENCODING: [0xb7,0xcd,0xe8,0xc4]
// CHECK-ERROR: instruction requires: sve
// CHECK-UNKNOWN: c4e8cdb7 <unknown>

ld1h    { z21.d }, p5/z, [x10, z21.d, uxtw]
// CHECK-INST: ld1h    { z21.d }, p5/z, [x10, z21.d, uxtw]
// CHECK-ENCODING: [0x55,0x55,0x95,0xc4]
// CHECK-ERROR: instruction requires: sve
// CHECK-UNKNOWN: c4955555 <unknown>

ld1h    { z21.d }, p5/z, [x10, z21.d, sxtw]
// CHECK-INST: ld1h    { z21.d }, p5/z, [x10, z21.d, sxtw]
// CHECK-ENCODING: [0x55,0x55,0xd5,0xc4]
// CHECK-ERROR: instruction requires: sve
// CHECK-UNKNOWN: c4d55555 <unknown>

ld1h    { z0.d }, p0/z, [x0, z0.d, uxtw #1]
// CHECK-INST: ld1h    { z0.d }, p0/z, [x0, z0.d, uxtw #1]
// CHECK-ENCODING: [0x00,0x40,0xa0,0xc4]
// CHECK-ERROR: instruction requires: sve
// CHECK-UNKNOWN: c4a04000 <unknown>

ld1h    { z0.d }, p0/z, [x0, z0.d, sxtw #1]
// CHECK-INST: ld1h    { z0.d }, p0/z, [x0, z0.d, sxtw #1]
// CHECK-ENCODING: [0x00,0x40,0xe0,0xc4]
// CHECK-ERROR: instruction requires: sve
// CHECK-UNKNOWN: c4e04000 <unknown>

ld1h    { z31.s }, p7/z, [z31.s, #62]
// CHECK-INST: ld1h    { z31.s }, p7/z, [z31.s, #62]
// CHECK-ENCODING: [0xff,0xdf,0xbf,0x84]
// CHECK-ERROR: instruction requires: sve
// CHECK-UNKNOWN: 84bfdfff <unknown>

ld1h    { z0.s }, p0/z, [z0.s]
// CHECK-INST: ld1h    { z0.s }, p0/z, [z0.s]
// CHECK-ENCODING: [0x00,0xc0,0xa0,0x84]
// CHECK-ERROR: instruction requires: sve
// CHECK-UNKNOWN: 84a0c000 <unknown>

ld1h    { z31.d }, p7/z, [z31.d, #62]
// CHECK-INST: ld1h    { z31.d }, p7/z, [z31.d, #62]
// CHECK-ENCODING: [0xff,0xdf,0xbf,0xc4]
// CHECK-ERROR: instruction requires: sve
// CHECK-UNKNOWN: c4bfdfff <unknown>

ld1h    { z0.d }, p0/z, [z0.d]
// CHECK-INST: ld1h    { z0.d }, p0/z, [z0.d]
// CHECK-ENCODING: [0x00,0xc0,0xa0,0xc4]
// CHECK-ERROR: instruction requires: sve
// CHECK-UNKNOWN: c4a0c000 <unknown>


Context) -> Result<(), Self::Err> {
        self.call(event, ctx).await
    }
}

async fn some<Ev: Event + ?Sized>(ev: &Ev, ctx: &()) -> Result<(), std::convert::Infallible> {
    Ok(())
}

fn test_some() {
    assert_is_event_handler(EventHandlerTryFn(
        some,
        PhantomData,
        PhantomData,
        PhantomData,
        PhantomData,
    ))
}

fn assert_is_event_handler<T, Ev>(_: T)
where
    T: EventHandler<Ev>,
    Ev: Event + ?Sized,
{
}
*/

pub trait RegisteredEvent: Event + 'static {
    #[inline]
    fn type_id(&self) -> TypeId;
}

#[derive(Clone, Debug)]
pub struct EventProcessingConfiguration {
    handlers: Arc<EventHandlersRegistry>,
}

sa::assert_impl_all!(EventProcessingConfiguration: Send, Sync);

impl EventProcessingConfiguration {
    #[inline]
    pub fn new() -> EventProcessingConfigurationBuilder {
        EventProcessingConfigurationBuilder {
            handlers: EventHandlersRegistry::default(),
        }
    }

    #[inline]
    pub fn iter_event_handlers_of<Ev, Ctx, Err>(
        &self,
        ev: &Ev,
    ) -> impl Iterator<Item = &DynEventHandler<Ev, Ctx, Err>>
    where
        Ev: RegisteredEvent + ?Sized,
        Ctx: ?Sized + 'static,
        Err: 'static,
    {
        self.handlers.iter::<Ev, Ctx, Err>(ev)
    }
}

#[derive(Debug)]
pub struct EventProcessingConfigurationBuilder {
    handlers: EventHandlersRegistry,
}

impl EventProcessingConfigurationBuilder {
    #[inline]
    pub fn build(self) -> EventProcessingConfiguration {
        EventProcessingConfiguration {
            handlers: Arc::new(self.handlers),
        }
    }

    #[inline]
    pub fn register_event_handler<Ev, AsEv, Ctx, Err, H>(&mut self, handler: H)
    where
        Ev: Event + ?Sized + 'static,
        for<'e> &'e Ev: TryFrom<&'e AsEv>,
        AsEv: Event + ?Sized + 'static,
        Ctx: AsRef<H::Context> + ?Sized + 'static,
        Err: From<H::Err> + 'static,
        H: EventHandler<Ev> + Send + Sync + 'static,
    {
        self.handlers.register::<Ev, AsEv, Ctx, Err, H>(handler)
    }
}

#[derive(Debug, Default)]
struct EventHandlersRegistry(
    HashMap<TypeId, HashMap<(TypeId, TypeId, TypeId), HashMap<TypeId, OpaqueEventHandler>>>,
);

sa::assert_impl_all!(EventHandlersRegistry: Send, Sync);

impl EventHandlersRegistry {
    fn register<Ev, AsEv, Ctx, Err, H>(&mut self, handler: H)
    where
        Ev: Event + ?Sized + 'static,
        for<'e> &'e Ev: TryFrom<&'e AsEv>,
        AsEv: Event + ?Sized + 'static,
        Ctx: AsRef<H::Context> + ?Sized + 'static,
        Err: From<H::Err> + 'static,
        H: EventHandler<Ev> + Send + Sync + 'static,
    {
        let raw =
            RawEventHandler::<H, Ev, Ctx, Err>(handler, PhantomData, PhantomData, PhantomData);
        let r#dyn = DynEventHandler::<AsEv, Ctx, Err>(Box::new(raw));
        let opaque = OpaqueEv


mov     r4, r0
	bl      Function_21ff2e8
	ldr     r0, [r4]
	cmp     r0, #0x3
	addls   pc, pc, r0, lsl #2
	b       branch_22014fc
@ 0x22014d4

.arm
Function_22014d4: @ 22014d4 :arm
	b       branch_22014f0
@ 0x22014d8

.arm
Function_22014d8: @ 22014d8 :arm
	b       branch_22014fc
@ 0x22014dc

.arm
Function_22014dc: @ 22014dc :arm
	b       branch_22014e4
@ 0x22014e0

.arm
Function_22014e0: @ 22014e0 :arm
	b       branch_22014e4
@ 0x22014e4

.arm
branch_22014e4: @ 22014e4 :arm
	mov     r0, r4
	bl      Function_22010cc
	ldmfd   sp!, {r4,pc}
@ 0x22014f0

.arm
branch_22014f0: @ 22014f0 :arm
	mov     r0, r4
	bl      Function_2201394
	ldmfd   sp!, {r4,pc}
@ 0x22014fc

.arm
branch_22014fc: @ 22014fc :arm
	mov     r0, #0x0
	ldmfd   sp!, {r4,pc}
@ 0x2201504

.arm
Function_2201504: @ 2201504 :arm
	stmfd   sp!, {r3-r11,lr}
	mov     r6, #0x0
	cmp     r2, #0x0
	ldmlsfd sp!, {r3-r11,pc}
	mov     r4, #2, 18 @ #0x8000
	ldr     lr, [pc, #0x12c] @ [0x220164c] (=0x7fff)
	ldr     r12, [pc, #0x12c] @ [0x2201650] (=0x2215c44)
	ldr     r5, [pc, #0x12c] @ [0x2201654] (=0x2215c54)
	rsb     r4, r4, #0x0
.arm
branch_2201528: @ 2201528 :arm
	ldrb    r7, [r3, #0x2]
	ldrb    r10, [r0]
	ldrsh   r8, [r3]
	mov     r9, r7, lsl #1
	ldrsh   r11, [r5, r9]
	and     r10, r10, #0xf
	tst     r10, #0x4
	mov     r9, r11, asr #3
	addne   r9, r9, r11
	tst     r10, #0x2
	addne   r9, r9, r11, asr #1
	tst     r10, #0x1
	addne   r9, r9, r11, asr #2
	tst     r10, #0x8
	beq     branch_2201574
	sub     r8, r8, r9
	cmp     r8, r4
	movlt   r8, r4
	b       branch_2201580
@ 0x2201574

.arm
branch_2201574: @ 2201574 :arm
	add     r8, r8, r9
	cmp     r8, lr
	movgt   r8, lr
.arm
branch_2201580: @ 2201580 :arm
	ldrsb   r9, [r12, r10]
	adds    r7, r7, r9
	movmi   r7, #0x0
	bmi     branch_2201598
	cmp     r7, #0x58
	movgt   r7, #0x58


',	'民反'},
{'64306',	'港支',	'港支'},
{'64307',	'玲婊',	'玲婊'},
{'64308',	'赣国',	'赣国'},
{'64309',	'komeseland',	'komeseland'},
{'64310',	'赣尼士兰',	'赣尼士兰'},
{'64311',	'贛國',	'贛國'},
{'64312',	'贛尼士蘭',	'贛尼士蘭'},
{'64313',	'一代执政',	'一代执政'},
{'64314',	'壹代執政',	'壹代執政'},
{'64315',	'二代执政',	'二代执政'},
{'64316',	'二代執政',	'二代執政'},
{'64317',	'三代执政',	'三代执政'},
{'64318',	'三代執政',	'三代執政'},
{'64319',	'四代执政',	'四代执政'},
{'64320',	'四代執政',	'四代執政'},
{'64321',	'五代执政',	'五代执政'},
{'64322',	'五代執政',	'五代執政'},
{'64323',	'当代执政',	'当代执政'},
{'64324',	'噹代執政',	'噹代執政'},
{'64325',	'入关',	'入关'},
{'64326',	'入關',	'入關'},
{'64327',	'体制僵化',	'体制僵化'},
{'64328',	'體製殭化',	'體製殭化'},
{'64329',	'(?i)(fas*pP*s*lun)',	'(?i)(fas*pP*s*lun)'},
{'64330',	'袭尽凭',	'袭尽凭'},
{'64331',	'襲儘憑',	'襲儘憑'},
{'64332',	'媳进瓶',	'媳进瓶'},
{'64333',	'媳進缾',	'媳進缾'},
{'64334',	'シーターター',	'シーターター'},
{'64335',	'国祸',	'国祸'},
{'64336',	'國禍',	'國禍'},
{'64337',	'(?i)(liberates*pP*s*hongs*pP*s*kong)',	'(?i)(liberates*pP*s*hongs*pP*s*kong)'},
{'64338',	'(?i)(revolutions*pP*s*ofs*pP*s*ours*pP*s*times)',	'(?i)(revolutions*pP*s*ofs*pP*s*ours*pP*s*times)'},
{'64339',	'里课墙',	'里课墙'},
{'64340',	'礼客强',	'礼客强'},
{'64341',	'裏課牆',	'裏課牆'},
{'64342',	'禮客強',	'禮客強'},
{'64343',	'胡s*pP*s*yaos*pP*s*bang',	'胡s*pP*s*yaos*pP*s*bang'},
{'64344',	'鬍s*pP*s*yaos*pP*s*bang',	'鬍s*pP*s


1/3`或者等效 一同使用。

率接受下面的选项：

- mode

    设置反交错模式，有下列有效值：

    ‘fast’
    ‘medium’
    ‘slow’

        使用迭代的运动估计
    ‘extra_slow’

        类似‘slow’,但使用多个参考帧

    默认‘fast’.
- parity

    设置输入视频图片字段校验。它必须以下值之一:

    ‘0, tff’

        对应上场优先
    ‘1, bff’

        对应下场优先

    默认 ‘bff’.
- qp

    设置内部使用的编码器按块量化参数设置(QP)

    更高的值会导致一个更平滑的运动向量场但不最优个体向量。默认值是1。

### mpdecimate ###
减少对前帧变化不大的帧,以减少帧速率

这个滤镜的主要作用是对非常低码率的编码进行预处理（例如面向拨号调整解调器应用的），不过理论上还可以用于修复发转的电视电影影片（影片转换成电视又转换回来）

下面是选项介绍：

- max

    设置连续帧的最大数量,可以删除(如果正),或删除帧之间的最小间隔帧(如果负的) ，如果为0，则删除帧和前面删除帧没有关联（关系）

    默认为0.
- hi
- lo
- frac

    设置删除阀值。

    其中`hi`和`lo`是对于一个`8x8`像素块和代表实际像素值差异，所以阀值64对应与每个像素都有1个单位的差异，或者被完全不同的块覆盖

    一个帧作为候选（被丢弃）则它没有超过`hi`个不同的`8x8`块和没有超过`frac`量的（1意味着整个图像）超过`lo`个不同的`8x8`块

    默认值为`hi`是`64*12`,`lo`为`64*5`,`frac`为`0.33`

### negate ###
否定输入视频

它接受一个整数（参数）,如果非零它否定透明分量(如果可用)。默认值是0

### noformat ###
强制`libavfilter`不采用指定的像素格式来输入到下一个滤镜

接受的参数为：

- pix_fmts

    是一个由 ’|’分隔的像素格式名列表，例如pix_fmts=yuv420p|monow|rgb24"

#### noformat例子 ####
- 强制不采用`yuv420p`的像素格式来输出到`vfilp`滤镜

	noformat=pix_fmts=yuv420p,vflip
- 转换输入到不是指定的像素格式

	noformat=yuv420p|yuv444p|yuv410p

### noise ###
给视频添加噪点

滤镜接受下面的选项：

- all_seed
- c0_seed
- c1_seed
- c2_seed
- c3_seed

    对指定像素分量或者整个像素设置噪点种子，默认为123457.
- all_strength,


v-64q0-14-9-23t-23-9h-192q-14 0-23 9t-9 23v64q0 14 9 23t23 9h192q14 0 23-9t9-23zm0-256v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23zM128 256h1792v-96q0-14-9-23t-23-9H160q-14 0-23 9t-9 23v96zm1920-96v1216q0 66-47 113t-113 47H160q-66 0-113-47T0 1376V160Q0 94 47 47T160 0h1728q66 0 113 47t47 113z"/></svg>';
  static const String id_card_o =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="2048" height="1536" preserveAspectRatio="xMidYMid meet" viewBox="0 0 2048 1536"><path fill="currentColor" d="M896 1084q0 55-31.5 93.5T789 1216H363q-44 0-75.5-38.5T256 1084q0-54 7.5-100.5t24.5-90 51-68.5 81-25q64 64 156 64t156-64q47 0 81 25t51 68.5 24.5 90T896 1084zM768 640q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1024 416v64q0 14-9 23t-23 9h-704q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h704q14 0 23 9t9 23zm-384-256v64q0 14-9 23t-23 9h-320q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h320q14 0 23 9t9 23zm384 0v64q0 14-9 23t-23 9h-192q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h192q14 0 23 9t9 23zm0-256v64q0 14-9 23t-23 9h-704q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h704q14 0 23 9t9 23zm128 832V256H128v1120q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5-9.5t9.5-22.5zm128-1216v1216q0 66-47 113t-113 47H160q-66 0-113-47T0 1376V160Q0 94 47 47T160 0h1728q66 0 113 47t47 113z"/></svg>';
  static const String institution =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1920" height="1792" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1920 1792"><path fill="currentColor" d="m960 0 960 384v128h-128q0 26-20.5 45t-48.5 19H197q-28 0-48.5-19T128 512H0V384zM256 640h256v768h128V640h256v768h128V640h256v768h128V640h256v768h59q28 0 48.5 19t20.5 45v64H128v-64q0-26 20.5-45t48.5-19h59V640zm1595 960q28 0 48.5 19t20.5 45v128H0v-128q0-26 20.5-45t48.5-19h1782z"/></svg>';
  static const String jpy =
      '<svg xmlns="http://www.w


        public void foo() {\n" +
		"                X<T>.I= 10;\n" +
		"        }\n" +
		"}\n",
		},
		"----------\n" +
		"1. ERROR in X.java (at line 4)\n" +
		"	X<T>.I= 10;\n" +
		"	     ^\n" +
		"Syntax error on token \"I\", VariableDeclaratorId expected after this token\n" +
		"----------\n");
}
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=119238 - variation
public void _test0932() {
	this.runNegativeTest(
		new String[] {
		"X.java",
		"public class X<T> {\n" +
		"        public static int Method() { return 0; }\n" +
		"        public void foo() {\n" +
		"                X.Method();\n" +
		"        }\n" +
		"        public void bar() {\n" +
		"                X<String>.Method();\n" +
		"        }\n" +
		"}\n",
		},
		"----------\n" +
		"1. ERROR in X.java (at line 7)\n" +
		"	X<String>.Method();\n" +
		"	^^^^^^^^^^\n" +
		"Syntax error on token(s), misplaced construct(s)\n" +
		"----------\n");
}
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=128063
public void test0933() {
	this.runNegativeTest(
		new String[] {
		"a/AbstractFoo.java", //================================
		"package a;\n" +
		"public abstract class AbstractFoo<T extends AbstractFoo<T>> {\n" +
		"	protected static class Inner<T extends AbstractFoo<T>> {\n" +
		"		public Inner() {\n" +
		"		}\n" +
		"\n" +
		"		public final void doSmth() {\n" +
		"		}\n" +
		"	}\n" +
		"}\n",
		"b/CustomFoo.java", //================================
		"package b;\n" +
		"import a.AbstractFoo;\n" +
		"public final class CustomFoo extends AbstractFoo<CustomFoo> {\n" +
		"	private Inner<DefaultFoo> defaultInner;\n" +
		"\n" +
		"	Inner<DefaultFoo> getDefaultInner() {\n" +
		"		return (this.defaultInner == null)\n" +
		"				? this.defaultInner = new Inner<DefaultFoo>()\n" +
		"				: this.defaultInner;\n" +
		"	}	\n" +
		"\n" +
		"	private Inner<CustomFoo> customInner;\n" +
		"\n" +
		"	Inner<CustomFoo> getCustomInner() {\n" +
		"		return (this.customInner == null)\n" +
		"				? this.customInner = new Inner<CustomFoo>()\n" +
		"				: this.customInner;\n" +
		"	}	\n" +
		"}\n",
		"b/DefaultFoo.java", //================================
		"package b;\n" +
		"import a.AbstractFoo;\n" +
		"public final class DefaultFoo extends AbstractFoo<DefaultFoo> {\n" +
		"	private Inner<DefaultFoo> defaultInner;\n" +
		"\n" +
		"	Inner<DefaultFoo> getDefaultInner() {\n" +
		"		return (this.defaultInner == null)\n" +
		"				? this.defaultInner = new Inner<DefaultFoo>()\n" +
		"				: this.defaultInner;\n" +
		"	}	\n" +
		"\n" +
		"	private Inner<CustomFoo> customInner;\n" +
		"\n" +
		"	Inner<CustomFoo> ge


0x8,r5,r0
   19911:	9a 50 50    	movzbl r0,r0
   19914:	90 50 a7 1b 	movb r0,0x1b(r7)
   19918:	90 54 a7 1c 	movb r4,0x1c(r7)
   1991c:	9c 18 54 50 	rotl $0x18,r4,r0
   19920:	ca 8f 00 00 	bicl2 $0xff000000,r0
   19924:	00 ff 50
   19927:	90 50 a7 1d 	movb r0,0x1d(r7)
   1992b:	9c 10 54 50 	rotl $0x10,r4,r0
   1992f:	3c 50 50    	movzwl r0,r0
   19932:	90 50 a7 1e 	movb r0,0x1e(r7)
   19936:	9c 08 54 50 	rotl $0x8,r4,r0
   1993a:	9a 50 50    	movzbl r0,r0
   1993d:	90 50 a7 1f 	movb r0,0x1f(r7)
   19941:	90 53 a7 20 	movb r3,0x20(r7)
   19945:	9c 18 53 50 	rotl $0x18,r3,r0
   19949:	ca 8f 00 00 	bicl2 $0xff000000,r0
   1994d:	00 ff 50
   19950:	90 50 a7 21 	movb r0,0x21(r7)
   19954:	9c 10 53 50 	rotl $0x10,r3,r0
   19958:	3c 50 50    	movzwl r0,r0
   1995b:	90 50 a7 22 	movb r0,0x22(r7)
   1995f:	9c 08 53 50 	rotl $0x8,r3,r0
   19963:	9a 50 50    	movzbl r0,r0
   19966:	90 50 a7 23 	movb r0,0x23(r7)
   1996a:	90 52 a7 24 	movb r2,0x24(r7)
   1996e:	9c 18 52 50 	rotl $0x18,r2,r0
   19972:	ca 8f 00 00 	bicl2 $0xff000000,r0
   19976:	00 ff 50
   19979:	90 50 a7 25 	movb r0,0x25(r7)
   1997d:	9c 10 52 50 	rotl $0x10,r2,r0
   19981:	3c 50 50    	movzwl r0,r0
   19984:	90 50 a7 26 	movb r0,0x26(r7)
   19988:	9c 08 52 50 	rotl $0x8,r2,r0
   1998c:	9a 50 50    	movzbl r0,r0
   1998f:	90 50 a7 27 	movb r0,0x27(r7)
   19993:	90 51 a7 28 	movb r1,0x28(r7)
   19997:	9c 18 51 50 	rotl $0x18,r1,r0
   1999b:	ca 8f 00 00 	bicl2 $0xff000000,r0
   1999f:	00 ff 50
   199a2:	90 50 a7 29 	movb r0,0x29(r7)
   199a6:	9c 10 51 50 	rotl $0x10,r1,r0
   199aa:	3c 50 50    	movzwl r0,r0
   199ad:	90 50 a7 2a 	movb r0,0x2a(r7)
   199b1:	9c 08


depth: 23;
    unsigned int valid: 1;
} SSHInfo;

NS_INLINE NSString *SSHInfoDescription(SSHInfo info) {
    if (!info.valid) {
        return @"<SSHInfo: invalid>";
    }
    return [NSString stringWithFormat:@"<SSHInfo: channel=%@ pid=%@ depth=%@>",
            @(info.channel), @(info.pid), @(info.depth)];
}

@interface VT100Token : NSObject {
@public
    VT100TerminalTokenType type;

    // data is populated because the current mode uses the raw input. data is
    // always set for ascii strings regardless of mode.
    BOOL savingData;

    unsigned char code;  // For VT100_UNKNOWNCHAR, VT100CSI_SCS0...SCS3, and VT100_LITERAL.
}

// For VT100_STRING
@property(nonatomic, retain) NSString *string;
@property(nonatomic, readonly) CTVector(int) *crlfs;

// For saved data (when copying to clipboard) or sixel payload.
@property(nonatomic, retain) NSData *savedData;

// For XTERMCC_SET_KVP.
@property(nonatomic, retain) NSString *kvpKey;
@property(nonatomic, retain) NSString *kvpValue;

// For VT100CSI_ codes that take parameters.
@property(nonatomic, readonly) CSIParam *csi;

// Is this an ascii string?
@property(nonatomic, readonly) BOOL isAscii;

// Is this a string or ascii string?
@property(nonatomic, readonly) BOOL isStringType;

// For ascii strings (type==VT100_ASCIISTRING).
@property(nonatomic, readonly) AsciiData *asciiData;
@property(nonatomic) VT100TerminalTokenType type;
@property(nonatomic) SSHInfo sshInfo;
@property(nonatomic, strong) NSArray<VT100Token *> *subtokens;

+ (instancetype)token;
+ (instancetype)newTokenForControlCharacter:(unsigned char)controlCharacter;

- (void)setAsciiBytes:(char *)bytes length:(int)length;

// Returns a string for |asciiData|, for convenience (this is slow).
- (NSString *)stringForAsciiData;

- (void)translateFromScreenTerminal;

- (void)realizeCRLFsWithCapacity:(int)capacity;

// This is meant for swift code in tests. Everyone else should modify the vector directly.
- (void)appendCRLF:(int)value;

@end


x274,
			0x274, 0x274, 0x274, 0x274, 0x274, 0x274, 0x274, 0x274, 0x2aa,
		},
	},
	{ // asa
		"AndoraFalme dha KiarabuAfuganistaniAntigua na BarbudaAnguillaAlbaniaArmeniaAntil" +
			"i za UholandhiAngolaAjentinaThamoa ya MarekaniAuthtriaAuthtraliaArubaAdhabajaniB" +
			"othnia na HedhegovinaBabadothiBangladeshiUbelgijiBukinafathoBulgariaBahareniBuru" +
			"ndiBeniniBermudaBruneiBraziliBahamaButaniBotthwanaBelaruthiBelidheKanadaJamhuri " +
			"ya Kidemokrathia ya KongoJamhuri ya Afrika ya KatiKongoUthwithiKodivaaVithiwa vy" +
			"a CookChileKameruniChinaKolombiaKothtarikaKubaKepuvedeKuprothiJamhuri ya ChekiUj" +
			"erumaniJibutiDenmakiDominikaJamhuri ya DominikaAljeriaEkwadoEthtoniaMithriEritre" +
			"aHithpaniaUhabeshiUfiniFijiVithiwa vya FalklandMikronethiaUfaranthaGaboniUingere" +
			"dhaGrenadaJojiaGwiyana ya UfaranthaGhanaJibraltaGrinlandiGambiaGineGwadelupeGine" +
			"kwetaUgirikiGwatemalaGwamGinebisauGuyanaHondurathiKorathiaHaitiHungariaIndonethi" +
			"aAyalandiIthraeliIndiaIeneo la Uingeredha katika Bahari HindiIrakiUajemiAithland" +
			"iItaliaJamaikaYordaniJapaniKenyaKirigizithtaniKambodiaKiribatiKomoroThantakitdhi" +
			" na NevithKorea KathkaziniKorea KuthiniKuwaitiVithiwa vya KaymanKazakithtaniLaot" +
			"hiLebanoniThantaluthiaLishenteniThirilankaLiberiaLethotoLitwaniaLathembagiLativi" +
			"aLibyaMorokoMonakoMoldovaBukiniVithiwa vya MarshalMathedoniaMaliMyamaMongoliaVit" +
			"hiwa vya Mariana vya KathkaziniMartinikiMoritaniaMonttherratiMaltaMorithiModivuM" +
			"alawiMekthikoMalethiaMthumbijiNamibiaNyukaledoniaNijeriKithiwa cha NorfokNijeria" +
			"NikaragwaUholandhiNorweNepaliNauruNiueNyudhilandiOmaniPanamaPeruPolinesia ya Ufa" +
			"ranthaPapuaFilipinoPakithtaniPolandiThantapieri na MikeloniPitkairniPwetorikoPal" +
			"estinaUren


{
        match self.bits {
            true => CTICHINSTATUS_2_A::ACTIVE,
            false => CTICHINSTATUS_2_A::INACTIVE,
        }
    }
    #[doc = "Checks if the value of the field is `ACTIVE`"]
    #[inline(always)]
    pub fn is_active(&self) -> bool {
        *self == CTICHINSTATUS_2_A::ACTIVE
    }
    #[doc = "Checks if the value of the field is `INACTIVE`"]
    #[inline(always)]
    pub fn is_inactive(&self) -> bool {
        *self == CTICHINSTATUS_2_A::INACTIVE
    }
}
#[doc = "Shows the status of the ctitrigin 3 input.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTICHINSTATUS_3_A {
    #[doc = "1: Ctichin 3 is active"]
    ACTIVE,
    #[doc = "0: Ctichin 3 is inactive"]
    INACTIVE,
}
impl From<CTICHINSTATUS_3_A> for bool {
    #[inline(always)]
    fn from(variant: CTICHINSTATUS_3_A) -> Self {
        match variant {
            CTICHINSTATUS_3_A::ACTIVE => true,
            CTICHINSTATUS_3_A::INACTIVE => false,
        }
    }
}
#[doc = "Reader of field `CTICHINSTATUS_3`"]
pub type CTICHINSTATUS_3_R = crate::R<bool, CTICHINSTATUS_3_A>;
impl CTICHINSTATUS_3_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> CTICHINSTATUS_3_A {
        match self.bits {
            true => CTICHINSTATUS_3_A::ACTIVE,
            false => CTICHINSTATUS_3_A::INACTIVE,
        }
    }
    #[doc = "Checks if the value of the field is `ACTIVE`"]
    #[inline(always)]
    pub fn is_active(&self) -> bool {
        *self == CTICHINSTATUS_3_A::ACTIVE
    }
    #[doc = "Checks if the value of the field is `INACTIVE`"]
    #[inline(always)]
    pub fn is_inactive(&self) -> bool {
        *self == CTICHINSTATUS_3_A::INACTIVE
    }
}
impl R {
    #[doc = "Bit 0 - Shows the status of the ctitrigin 0 input."]
    #[inline(always)]
    pub fn ctichinstatus_0(&self) -> CTICHINSTATUS_0_R {
        CTICHINSTATUS_0_R::new((self.bits & 0x01) != 0)
    }
    #[doc = "Bit 1 - Shows the status of the ctitrigin 1 input."]
    #[inline(always)]
    pub fn ctichinstatus_1(&self) -> CTICHINSTATUS_1_R {
        CTICHINSTATUS_1_R::new(((self.bits >> 1) & 0x01) != 0)
    }
    #[doc = "Bit 2 - Shows the status of the ctitrigin 2 input."]
    #[inline(always)]
    pub fn ctichinstatus_2(&self) -> CTICHINSTATUS_2_R {
        CTICHINSTATUS_2_R::new(((self.bits >> 2) & 0x01) != 0)
    }
    #[doc = "Bit 3 - Shows the status of the ctitrigin 3 input."]
    #[inline(always)]
    pub fn ctichinstatus_3(&self) -> CTICHINSTATUS_3_R {
        CTICHINSTATUS_3_R::new(((self.bits >> 3) & 0x01) != 0)
    }
}
<filename>sdk/resourcegroupstagging/src/output.rs<gh_stars>1-10
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UntagResourcesOutput {
    ///
A map containing a key-value pair for each failed item that couldn't be untagged. The
    /// key is the ARN of the failed resource. The value is a FailureInfo object
    /


 "extended",
  } = {}) {
    if (!this.isValid) {
      return null;
    }

    let c = includePrefix ? "T" : "";
    return (
      c +
      toISOTime(
        this,
        format === "extended",
        suppressSeconds,
        suppressMilliseconds,
        includeOffset,
        extendedZone
      )
    );
  }

  /**
   * Returns an RFC 2822-compatible string representation of this DateTime
   * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'
   * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'
   * @return {string}
   */
  toRFC2822() {
    return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false);
  }

  /**
   * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.
   * Specifically, the string conforms to RFC 1123.
   * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
   * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'
   * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'
   * @return {string}
   */
  toHTTP() {
    return toTechFormat(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'");
  }

  /**
   * Returns a string representation of this DateTime appropriate for use in SQL Date
   * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'
   * @return {string}
   */
  toSQLDate() {
    if (!this.isValid) {
      return null;
    }
    return toISODate(this, true);
  }

  /**
   * Returns a string representation of this DateTime appropriate for use in SQL Time
   * @param {Object} opts - options
   * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.
   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
   * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'
   * @example DateTime.utc().toSQL() //=> '05:15:16.345'
   * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'
   * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'
   * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'
   * @return {string}
   */
  toSQLTime({ includeOffset = true, includeZone = false, includeOffsetSpace = true } = {}) {
    let fmt = "HH:mm:ss.SSS";

    if (includeZone || includeOffset) {
      if (includeOffsetSpace) {
        fmt += " ";
      }
      if (includeZone) {
        fmt += "z";
      } else if (includeOffset) {
        fmt += "ZZ";
      }
    }

    return toTechFormat(this, fmt, true);
  }

  /**
   * Returns a string representation of this DateTime appropriate for use in SQL DateTime
   * @param {Object} opts - options
   * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.
   * @param {boolean} [opts.includeOffset


 CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.duckduckgo.app.browser.urlextraction

import android.webkit.CookieManager
import android.webkit.WebView
import androidx.core.net.toUri
import androidx.test.annotation.UiThreadTest
import com.duckduckgo.app.browser.*
import com.duckduckgo.app.browser.certificates.rootstore.TrustedCertificateStore
import com.duckduckgo.app.browser.cookies.ThirdPartyCookieManager
import com.duckduckgo.app.browser.httpauth.WebViewHttpAuthStore
import com.duckduckgo.common.test.CoroutineTestRule
import com.duckduckgo.cookies.api.CookieManagerProvider
import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.mockito.kotlin.mock
import org.mockito.kotlin.verify
import org.mockito.kotlin.whenever

class UrlExtractingWebViewClientTest {

    @get:Rule
    var coroutinesTestRule = CoroutineTestRule()

    private lateinit var testee: UrlExtractingWebViewClient

    private val requestInterceptor: RequestInterceptor = mock()
    private val cookieManagerProvider: CookieManagerProvider = mock()
    private val cookieManager: CookieManager = mock()
    private val trustedCertificateStore: TrustedCertificateStore = mock()
    private val webViewHttpAuthStore: WebViewHttpAuthStore = mock()
    private val thirdPartyCookieManager: ThirdPartyCookieManager = mock()
    private val urlExtractor: DOMUrlExtractor = mock()
    private val mockWebView: WebView = mock()

    @UiThreadTest
    @Before
    fun setup() {
        testee = UrlExtractingWebViewClient(
            webViewHttpAuthStore,
            trustedCertificateStore,
            requestInterceptor,
            cookieManagerProvider,
            thirdPartyCookieManager,
            TestScope(),
            coroutinesTestRule.testDispatcherProvider,
            urlExtractor,
        )
        whenever(cookieManagerProvider.get()).thenReturn(cookieManager)
    }

    @UiThreadTest
    @Test
    fun whenOnPageStartedCalledThenInjectUrlExtractionJS() {
        testee.onPageStarted(mockWebView, BrowserWebViewClientTest.EXAMPLE_URL, null)
        verify(urlExtractor).injectUrlExtractionJS(mockWebView)
    }

    @UiThreadTest
    @Test
    fun whenOnPageStartedCalledThenProcessUriForThirdPartyCookiesCalled() = runTest {
        testee.onPageStarted(mockWebView, EXAMPLE_URL, null)
        verify(thirdPartyCookieManager).processUriForThirdPartyCookies(mockWebView, EXAMPLE_URL.toUri())
    }

    @UiThreadTest
    @Test
    fun whenOnPageFinishedCalledThenFlushCookies() {
        testee.onPageFinished(mockWebView, null)
        verify(cookieManager).flush()
    }

    companion object {
        const val EXAMPLE_URL = "example.com"
    }
}
/*
 * Copyright (c) 2020 DuckDuckGo
 *
 * 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


("roomType" + playerNumList[i]);
				playerNumSelect.name = playerNumList[i] + "";
				this.player_num_select_group.addChild(playerNumSelect);
				playerNumSelect.value = this.getRoomID(playerNumList[i]);
				playerNumSelect.selected = (this.selectValue_mjPlayerNumRadioGroup == playerNumSelect.value);
				playerNumSelect.group = this.mjPlayerNumRadioGroup;
				if (playerNumSelect.selected) {
					this.initMjJuNumGroup(lobbyScene.JuNumList[i]);

					let areaIndex = 0;
					for (let i = 0; i < lobbyScene.AreaListCreatRoomList.length; i++) {
						if (this.selectValue_mjAreaRadioGroup == lobbyScene.AreaListCreatRoomList[i]) {
							areaIndex = i;
							break;
						}
					}
					this.initMjRuleGroup(lobbyScene.RulesAreaList[areaIndex]);
				}
			}
		}

		private initMjJuNumGroup(juNumList: number[]) {
			this.ju_num_select_group.removeChildren();
			this.selectValue_mjJuNumRadioGroup = juNumList[0] >> 4 * 4;
			let radioChangeHandler = (evt: eui.UIEvent) => {
				let radioGroup: eui.RadioButtonGroup = evt.target;
				this.selectValue_mjJuNumRadioGroup = radioGroup.selectedValue;
			}
			this.mjJuNumRadioGroup = new eui.RadioButtonGroup();
			this.mjJuNumRadioGroup.addEventListener(eui.UIEvent.CHANGE, radioChangeHandler, this);

			let localSelect = myStorage.MyStorage.getHashInfByAreaAndRoomID(this.getArea(), this.selectValue_mjPlayerNumRadioGroup);
			if (localSelect != null && localSelect["quanNum"] != null) {
				this.selectValue_mjJuNumRadioGroup = localSelect["quanNum"];
			}
			for (let i: number = 0; i < juNumList.length; i++) {
				let juNumSelect: mySubassemblie.JuNumSelectBtnOfCreatRoom = new mySubassemblie.JuNumSelectBtnOfCreatRoom("juNum_" + (juNumList[i] & 0xffff));
				juNumSelect.name = juNumList[i] + "";
				this.ju_num_select_group.addChild(juNumSelect);
				juNumSelect.value = juNumList[i] >> 4 * 4;
				juNumSelect.selected = (juNumSelect.value == this.selectValue_mjJuNumRadioGroup);
				juNumSelect.group = this.mjJuNumRadioGroup;
			}
		}
		private initMjRuleGroup(ruleList: number[]) {
			this.rules_mj_creat_room_group.removeChildren();
			this.mjRulesButtonList = [];
			let checkRuleCheckBox = (evt: eui.UIEvent = null) => {
				let flag_allSelect = true;
				let flag_noSelect = true;
				let rulesSelect = [];
				for (let j: number = 0; j < this.mjRulesButtonList.length; j++) {
					let ruleCheckBox = this.mjRulesButtonList[j];
					if (ruleCheckBox.selected) {
						flag_noSelect = false;
						rulesSelect.push(parseInt(ruleCheckBox.name));
					}
					else {
						flag_allSelect = false;
					}
				}
				this.all_select_checkBox.selected = flag_allSelect;
				this.none_select_checkBox.selected = flag_noSelect;
			}
			let localSelect = myStorage.MyStorage.getHashInfByAreaAndRoomID(this.getArea(), this.selectValue_mjPlayerNumRadioGroup);
			if (localSelect != null && localSelect["tableRule"] != null) {
				th


sWarnings("rawtypes")
//				Class batteryStatsSamplingTimerClass = cl.loadClass("com.android.internal.os.BatteryStatsImpl$SamplingTimer");

				//Parameters Types
//				@SuppressWarnings("rawtypes")
//				Class[] paramTypesGetTotalTimeLocked= new Class[2];
//				paramTypesGetTotalTimeLocked[0]= long.class;
//				paramTypesGetTotalTimeLocked[1]= int.class;
//
//				//Parameters
//				Object[] paramGetTotalTimeLocked= new Object[2];
//				paramGetTotalTimeLocked[0]= new Long(uSecBatteryTime);
//				paramGetTotalTimeLocked[1]= new Integer(iStatType);
//
//
//				Method methodGetTotalTimeLocked = classSamplingTimer
//						.getMethod("getTotalTimeLocked", paramTypesGetTotalTimeLocked);
//
//				//Parameters Types
//				@SuppressWarnings("rawtypes")
//				Class[] paramTypesGetCountLocked= new Class[1];
//				paramTypesGetCountLocked[0]= int.class;
//
//				//Parameters
//				Object[] paramGetCountLocked= new Object[1];
//				paramGetCountLocked[0]= new Integer(iStatType);
//
//				Method methodGetCountLocked = classSamplingTimer
//						.getMethod("getCountLocked", paramTypesGetCountLocked);
//
//
//				Long wake = (Long) methodGetTotalTimeLocked.invoke(samplingTimer, paramGetTotalTimeLocked);
//
//				Integer count = (Integer) methodGetCountLocked.invoke(samplingTimer, paramGetCountLocked);
//
//				if (CommonLogSettings.DEBUG)
//				{
//					Log.d(TAG, "Kernel wakelock: " + wakelockEntry.getKey() + " wakelock [s] " + wake / 1000
//							+ " count " + count);
//				}

				// public NativeKernelWakelock(String name, String details, int count, int expire_count, int wake_count,
				// long active_since, long total_time, long sleep_time, long max_time, long last_change, long time)
				//public KernelWakelock(String name, long duration, long time, int count)
				// return the data depending on the method
				//if (!bAlternate)
				//{
					//KernelWakelock myWl = new KernelWakelock(wakelockEntry.getKey(), wake / 1000, uSecBatteryTime / 1000, count);

//					NativeKernelWakelock myWl = new NativeKernelWakelock(wakelockEntry.getKey() + " *api*", "", count.intValue(), 0, 0,
//							0L, wake/1000, wake/1000, 0L, 0L, uSecBatteryTime / 1000);
//					myStats.add(myWl);
				//}
//				else
//				{
				if (CommonLogSettings.DEBUG)
				{
					Log.d(TAG, "Kernel wakelock: " + wakelockEntry.getKey() + " wakelock [s] " + currentReportedTotalTimeVal / 1000
							+ " count " + currentReportedCountVal);
				}

				NativeKernelWakelock myWl = new NativeKernelWakelock(
							wakelockEntry.getKey(), "*api*", currentReportedCountVal, 0, 0, 0L,
							currentReportedTotalTimeVal / 1000, currentReportedTotalTimeVal / 1000, 0L, 0L,
							uSecBatteryTime / 1000);
					myStats.add(myWl);
//				}
            }
        }
        catch( NoSuchFieldException e )
        {
            Log.e(TAG, "An exception occured in getKernelWakelockStats(). Message: " + e.getMessage());
            throw e;
        }
        catch( Exception e )
        {
        	Log.e(TAG, "An exception occured in getKernelWakelockStats(). Message: " + e.getMessage() + ", cause: " + e.getCause().getMessage());
            throw e;
        }

        return myStats;
	}

	/**
	 * Obtain the process stats as a list of Processes (@see com.asksven.android.common.privateapiprox


  max-width: 630px;
  /* add 'overflow: auto' so the floated child
     buttons stay contained within the segment */
  overflow: auto;
}
.pennai .file-upload-form-dataset-input {
  width: 40%;
}
.pennai .file-upload-form-server-resp {
  max-width: 650px;
  background-color: white;
}
.pennai .file-upload-form-hide-inputs {
  display: none;
}
.pennai .file-upload-form-show-inputs {
  display: block;
}
.pennai .file-upload-button {
  padding: 1.25em 1.25em 1.25em 1.25em;
}
.pennai .file-upload-button + i.icon {
  position: absolute;
  top: 0.6em;
  right: 0.7em;
}
.pennai .file-upload-help-icon {
  padding-left: 0;
}
.pennai .file-upload-header {
  margin-top: 1em;
}
.pennai .file-upload-pseudo-dialog-button {
  size: "small";
  float: right;
}
.pennai .file-upload-feature-text-info {
  color: rgba(255, 255, 255, 0.9);
  background-color: rgba(17, 17, 17, 0.9);
}
.pennai .file-upload-feature-text-input {
  width: 100%;
  color: rgba(255, 255, 255, 0.9);
  background-color: rgba(17, 17, 17, 0.9);
  resize: none;
}
.pennai .file-upload-centered-div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}
.file-upload-sortable-list {
  list-style-type: none;
  margin: auto;
  width: 80%;
  padding: 10px 5px;
}
.file-upload-sortable-list-item {
  /*border-style: solid;*/
  border: 1px solid;
  text-align: center;
  padding: 2px;
  border-color: rgb(84, 200, 255);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
}
/* This class is for the list item that moves
around when using the SortableList. Because
of how it's instantiated on-demand, it can't be
a child of .pennai.
The most important part is the z-index. Without it
the element isn't visible at all.
See https://github.com/clauderic/react-sortable-hoc/issues/87
*/
.file-upload-sortable-list-item-helper {
  z-index: 10; /*important*/
  list-style-type: none;
}
.pennai .file-upload-table {
  line-height: 1;
}
.pennai .dataset-card .ui.error.message {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid #555;
  box-shadow: none;
}

.pennai .dataset-card .ui.error.message .icon {
  color: #ff695e;
  font-size: 1rem;
}

.pennai .dataset-card .panel-header {
  max-height: 57px;
}

.pennai .dataset-card .ui.grid.cat-and-ord-dataset-table {
  max-width: 400px;
}

.pennai .dataset-card .ui.header.title {
  max-width: 75%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  margin-bottom: 0;
}

.pennai .dataset-card .ui.header.title:hover {
  text-decoration: underline;
}

.pennai .dataset-card .ai-label {
  font-size: 1.1em;
  margin-right: 0.7rem;
  vertical-align


14,
      '6': '.CloudOtpTokenType',
      '10': 'type'
    },
    {'1': 'period', '3': 8, '4': 1, '5': 3, '10': 'period'},
    {'1': 'counter', '3': 9, '4': 1, '5': 3, '10': 'counter'},
    {'1': 'pinned', '3': 10, '4': 1, '5': 3, '10': 'pinned'},
    {'1': 'copyTimes', '3': 11, '4': 1, '5': 3, '10': 'copyTimes'},
    {
      '1': 'lastCopyTimeStamp',
      '3': 12,
      '4': 1,
      '5': 3,
      '10': 'lastCopyTimeStamp'
    },
    {'1': 'imagePath', '3': 13, '4': 1, '5': 9, '10': 'imagePath'},
    {'1': 'description', '3': 14, '4': 1, '5': 9, '10': 'description'},
    {'1': 'remark', '3': 15, '4': 1, '5': 9, '10': 'remark'},
    {'1': 'uid', '3': 16, '4': 1, '5': 9, '10': 'uid'},
  ],
};

/// Descriptor for `CloudOtpTokenParameters`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List cloudOtpTokenParametersDescriptor = $convert.base64Decode(
    'ChdDbG91ZE90cFRva2VuUGFyYW1ldGVycxIWCgZzZWNyZXQYASABKAxSBnNlY3JldBIWCgZpc3'
    'N1ZXIYAiABKAlSBmlzc3VlchIYCgdhY2NvdW50GAMgASgJUgdhY2NvdW50EhAKA3BpbhgEIAEo'
    'CVIDcGluEjUKCWFsZ29yaXRobRgFIAEoDjIXLkNsb3VkT3RwVG9rZW5BbGdvcml0aG1SCWFsZ2'
    '9yaXRobRIwCgZkaWdpdHMYBiABKA4yGC5DbG91ZE90cFRva2VuRGlnaXRDb3VudFIGZGlnaXRz'
    'EiYKBHR5cGUYByABKA4yEi5DbG91ZE90cFRva2VuVHlwZVIEdHlwZRIWCgZwZXJpb2QYCCABKA'
    'NSBnBlcmlvZBIYCgdjb3VudGVyGAkgASgDUgdjb3VudGVyEhYKBnBpbm5lZBgKIAEoA1IGcGlu'
    'bmVkEhwKCWNvcHlUaW1lcxgLIAEoA1IJY29weVRpbWVzEiwKEWxhc3RDb3B5VGltZVN0YW1wGA'
    'wgASgDUhFsYXN0Q29weVRpbWVTdGFtcBIcCglpbWFnZVBhdGgYDSABKAlSCWltYWdlUGF0aBIg'
    'CgtkZXNjcmlwdGlvbhgOIAEoCVILZGVzY3JpcHRpb24SFgoGcmVtYXJrGA8gASgJUgZyZW1hcm'
    'sSEAoDdWlkGBAgASgJUgN1aWQ=');
import 'package:flutter/material.dart';

import 'slidable.dart';

/// Signature for [CustomSlidableAction.onPressed].
typedef SlidableActionCallback = void Function(BuildContext context);

const int _kFlex = 1;
const Color _kBackgroundColor = Colors.white;
const bool _kAutoClose = true;

/// Represents an action of an [ActionPane].
class CustomSlidableAction extends StatelessWidget {
  /// Creates a [CustomSlidableAction].
  ///
  /// The [flex], [backgroundColor], [autoClose]


/* mark.h */
/* Copyright 1995 by Steve Kirkendall */

typedef struct mark_s
{
	struct mark_s	*next;		/* another mark in the same buffer */
	BUFFER		buffer;		/* the buffer that the mark refers to */
	long		offset;		/* the offset of the char within that buffer */
} *MARK, MARKBUF;

#define markbuffer(mark)	((mark)->buffer)
#define markoffset(mark)	((mark)->offset)
#define marksetoffset(mark,o)	((mark)->offset = (o))
#define markaddoffset(mark,o)	((mark)->offset += (o))
#define markdup(mark)		markalloc(markbuffer(mark), markoffset(mark))
#define marktmp(mbuf, buf, off)	((mbuf).buffer = (buf), (mbuf).offset = (off), &(mbuf))
#define markset(mark,newmark)	(marksetbuffer(mark, markbuffer(newmark)), marksetoffset(mark, markoffset(newmark)))

extern MARK namedmark[26];

BEGIN_EXTERNC
extern void markadjust P_((MARK from, MARK to, long delta));
extern long markline P_((MARK mark));
extern MARK marksetline P_((MARK mark, long linenum));
#ifdef DEBUG_MARK
#define marksetbuffer(m,b)	_marksetbuffer(__FILE__, __LINE__, (m), (b))
extern void _marksetbuffer P_((char *file, int line, MARK mark, BUFFER buffer));
#else
extern void marksetbuffer P_((MARK mark, BUFFER buffer));
#endif
END_EXTERNC

#ifndef DEBUG_ALLOC
BEGIN_EXTERNC
extern MARK markalloc P_((BUFFER buffer, long offset));
extern void markfree P_((MARK mark));
END_EXTERNC
#else
BEGIN_EXTERNC
extern MARK _markalloc P_((char *file, int line, BUFFER buffer, long offset));
extern void _markfree P_((char *file, int line, MARK mark));
END_EXTERNC
#define markalloc(b,o)	_markalloc(__FILE__, __LINE__, b, o)
#define markfree(m)	_markfree(__FILE__, __LINE__, m)
#endif


modifier_sven_warcry_lua = class({})
--------------------------------------------------------------------------------

function modifier_sven_warcry_lua:OnCreated( kv )
	self.warcry_armor = self:GetAbility():GetSpecialValueFor( "warcry_armor" )
	self.warcry_movespeed = self:GetAbility():GetSpecialValueFor( "warcry_movespeed" )
	if IsServer() then
		local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_sven/sven_warcry_buff.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetParent() )
		ParticleManager:SetParticleControlEnt( nFXIndex, 2, self:GetCaster(), PATTACH_POINT_FOLLOW, "attach_head", self:GetCaster():GetOrigin(), true )
		self:AddParticle( nFXIndex, false, false, -1, false, true )
	end
end

--------------------------------------------------------------------------------

function modifier_sven_warcry_lua:OnRefresh( kv )
	self.warcry_armor = self:GetAbility():GetSpecialValueFor( "warcry_armor" )
	self.warcry_movespeed = self:GetAbility():GetSpecialValueFor( "warcry_movespeed" )
end

-----


    addTestFile('''
mixin A {}
class B extends Object with A {} // B
''');
    await findElementReferences(search: 'A {}', false);
    expect(searchElement!.kind, ElementKind.MIXIN);
    expect(results, hasLength(1));
    assertHasResult(SearchResultKind.REFERENCE, 'A {} // B');
  }

  Future<void> test_noElement() async {
    addTestFile('''
void f() {
  print(noElement);
}
''');
    await findElementReferences(search: 'noElement', false);
    expect(searchId, isNull);
  }

  Future<void> test_oneUnit_zeroLibraries() async {
    addTestFile('''
part of lib;
fff(p) {}
void f() {
  fff(10);
}
''');
    await findElementReferences(search: 'fff(p) {}', false);
    expect(results, isEmpty);
  }

  Future<void> test_parameter() async {
    addTestFile('''
void f(ppp) {
  print(ppp);
  ppp += 3;
  ppp = 2;
  ppp();
}
''');
    await findElementReferences(search: 'ppp) {', false);
    expect(searchElement!.kind, ElementKind.PARAMETER);
    expect(results, hasLength(4));
    assertHasResult(SearchResultKind.READ, 'ppp);');
    assertHasResult(SearchResultKind.READ_WRITE, 'ppp += 3');
    assertHasResult(SearchResultKind.WRITE, 'ppp = 2');
    assertHasResult(SearchResultKind.READ, 'ppp();');
  }

  Future<void> test_parameter_generic_declaration() async {
    addTestFile('''
void f() {
  B().m(p: null); // 1
  B().m(p: null); // 2
}

class A<T> {
  void m({T? p}) {} // 3
}

class B extends A<String> {}
''');
    await findElementReferences(search: 'p}) {} // 3', false);
    expect(searchElement!.kind, ElementKind.PARAMETER);
    expect(results, hasLength(2));
    assertHasResult(SearchResultKind.REFERENCE, 'p: null); // 1');
    assertHasResult(SearchResultKind.REFERENCE, 'p: null); // 2');
  }

  @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/60200')
  Future<void> test_parameter_generic_invocation() async {
    addTestFile('''
void f() {
  B().m(p: null); // 1
  B().m(p: null); // 2
}

class A<T> {
  void m({T? p}) {} // 3
}

class B extends A<String> {}
''');
    await findElementReferences(search: 'p: null); // 1', false);
    expect(searchElement!.kind, ElementKind.PARAMETER);
    expect(results, hasLength(2));
    assertHasResult(SearchResultKind.REFERENCE, 'p: null); // 1');
    assertHasResult(SearchResultKind.REFERENCE, 'p: null); // 2');
  }

  @failingTest
  Future<void> test_path_inConstructor_named() async {
    // The path does not contain the first expected element.
    addTestFile('''
library my_lib;
class A {}
class B {
  B.named() {
    A a = null;
  }
}
''');
    await findElementReferences(search: 'A {}', false);
    assertHasResult(SearchResultKind.REFERENCE, 'A a = null;');
    expect(getPathString(result.path), '''
LOCAL_VARIABLE a
CONSTRUCTOR named
CLASS B
COMPILATION_UNIT test.dart
LIBRARY my_lib''');
  }

  @failingTest
  Future<void> test_path_inConstructor_unnamed() async {
    // The path does not contain the first


     [array[i], array[j]] = [array[j], array[i]];
    }
    return array;
}

/**
 * sample 从数组中抽取出指定数量的元素
 */
export function sample<T>(n: number, arr: Array<T>): Array<T> {
    n = Math.max(Math.min(n, arr.length), 0);
    return R.take(n, shuffle(arr));
}
import { Model, Document } from "mongoose";
import { Entity } from "../../interfaces/entity";
import { Request, Response } from "express";

export class RestApiMiddlewareFactory {
    public static getRestMiddlewareForModel(model: Model<Entity>, getBy: string = "id"): (req: Request, res: Response) => any {
        return (req: Request, res: Response) => {
            switch (req.method) {
                default:
                    // Список сущностей
                    if (!req.params[getBy]) {
                        const skip = parseInt(req.query.offset, 10) ? parseInt(req.query.offset, 10) : 0;
                        const limit = parseInt(req.query.limit, 10) ? parseInt(req.query.limit, 10) : 0;
                        let sort: any = {};
                        if (req.query.sort && req.query.order)  {
                            sort[req.query.sort] = req.query.order;
                        }
                        model.find().skip(skip).limit(limit).sort(sort).then((entities: Entity[]) => {
                            const response: Entity[] = [];
                            for(const entity of entities) {
                                response.push(entity.toJSON({
                                    virtuals: true
                                }));
                            }
                            let countPromise: Promise<void> = Promise.resolve();
                            if (limit > 0) {
                                countPromise = model.count({}).then((count: number) => {
                                    let contentRangeHeader = `entities ${skip + 1}-${skip + limit < count ? skip + limit : count}/${count}`;
                                    res.setHeader("Content-Range", contentRangeHeader);
                                })
                                .catch((err) => {
                                    Promise.reject(err);
                                });
                            }
                            countPromise.then(() => {
                                res.send(response);
                            })
                            .catch((err) => {
                                console.error(err);
                                res.status(500);
                                res.send();
                            });
                        })
                        .catch((err) => {
                            console.error(err);
                            res.status(500);
                            res.send();
                        });
                    }
            }
        }
    }
}import { Inject, Service } from 'typedi';

import config from '../config';
import MemoryDb from '../database/MemoryDb';
import Product from '../interfaces/Product';

@Service()
export default class ProductRepository {
  @Inject()
  private db: MemoryDb;

  private get collection(): Product[] {
    return this.db.get(config.collections.product) as Product[];
  }

  private set nextCollection(products: Product[]) {
    this.db.set(config.collections.product, products);
  }


>
                    ${award.desc}

${tbody}

        `;

        // show
        mcstats.showView(
            e.title,
            mcstats.localize(e.active ? 'page.eventView.title.active' : 'page.eventView.title.inactive'),
            eventTime,
            'img/award-icons/' + awardId + '.png');
    });
};
mcstats.showAward = function(id) {
    loadJson('data/rankings/' + id + '.json', function(ranking) {
        var award = mcstats.awards[id];
        var tbody = '';
        var rank = 1;
        ranking.forEach(function(entry) {
            var rankWidget = mcstats.rankWidget(rank++);
            var playerWidget = mcstats.playerWidget(entry.uuid);
            var value = mcstats.formatValue(entry.value, award.unit);

            tbody += `

                    ${rankWidget}
                    ${playerWidget}
                    ${value}

            `;
        });

        mcstats.viewContent.innerHTML = `

                    ${mcstats.localize('stat.rank')}
                    ${mcstats.localize('stat.player')}
                    ${award.desc}

${tbody}

        `;

        // show
        mcstats.showView(
            award.title,
            mcstats.localize('page.awardView.subtitle'),
            false,
            'img/award-icons/' + id + '.png');
    });
};
/*!
  * Bootstrap v5.0.1 (https://getbootstrap.com/)
  * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
  */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){"use strict";const t={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const i=[];let n=t.parentNode;for(;n&&n.nodeType==


condList = brnPickerItem.children;
      return secondList[index].text;
    } else {
      BrnMultiDataPickerEntity brnPickerItem = data[firstSelectedIndex];
      List<BrnMultiDataPickerEntity> secondList = brnPickerItem.children;
      List<BrnMultiDataPickerEntity> threeList =
          secondList[secondSelectedIndex].children;
      return threeList[index].text;
    }
  }
}

/// 适用于 BrnDefaultMultiDataPickerDelegate 的数据类
class BrnMultiDataPickerEntity {
  /// 显示内容
  final String text;

  /// 数据值
  final dynamic value;

  /// 子项
  final List<BrnMultiDataPickerEntity> children;

  BrnMultiDataPickerEntity({
    required this.text,
    this.value,
    this.children = const [],
  });
}
import 'package:journal/components/bruno/src/components/charts/brn_progress_bar_chart/brn_progress_bar_chart_painter.dart';
import 'package:flutter/material.dart';

/// BrnProgressBarChart
/// 柱形数据图表
/// 展示一组或者多组数据，方便数据的查看以及对比
// ignore: must_be_immutable
class BrnProgressBarChart extends StatefulWidget {
  /// 图表最小宽度，默认0
  final double minWidth;

  /// 内边距，默认 EdgeInsets.all(20)
  final EdgeInsetsGeometry padding;

  /// x轴数据，必传
  final ChartAxis xAxis;

  /// y轴数据，必传
  final ChartAxis yAxis;

  /// 柱形数据，必传
  final List<BrnProgressBarBundle> barBundleList;

  /// 柱形图间的间距，默认 30
  final double barGroupSpace;

  /// 单个柱形宽度，默认 30
  final double singleBarWidth;

  /// 柱状图的最大值，柱状图的宽/高会依此值计算，默认 0，为0时自动计算柱状图最大值
  final double barMaxValue;

  /// 柱状图方向，默认 BarChartStyle.vertical
  final BarChartStyle barChartStyle;

  /// 选中柱状图时条形文案颜色，默认 Colors.white
  final Color selectedHintTextColor;

  /// 选中柱状图时条形文案背景颜色，默认 Colors.black
  final Color selectedHintTextBackgroundColor;

  /// 是否可点击回调
  final OnBarItemClickInterceptor? onBarItemClickInterceptor;

  /// 选中柱状图时候的回调(暂仅支持垂直柱状图)
  final BrnProgressBarChartSelectCallback? barChartSelectCallback;

  /// 图表高度，竖直柱状图有效，默认300
  final double height;

  /// create BrnProgressBarChart
  BrnProgressBarChart(
      {Key? key,
      this.minWidth = 0,
      this.padding = const EdgeInsets.all(20),
      this.barChartStyle = BarChartStyle.vertical,
      required this.xAxis,
      required this.yAxis,
      required this.barBundleList,
      this.barGroupSpace = 30,
      this.singleBarWidth = 30,
      this.barMaxValue = 0,
      this.selectedHintTextColor = Colors.white,
      this.selectedHintTextBackgroundColor = Colors.black,
      this.onBarItemClickInterceptor,
      this.barChartSelectCallback,
      this.height = 300})
      : super(key: key) {
    if (BarChartStyle.horizontal == barChartStyle) {
      assert(barBundleList[0].barList.length == yAxis.axisItemList.length,
          '水平柱状图个数与Y轴坐标数目要相等');
    } else if (BarChartStyle.vertical == barChartStyle) {
      assert(barBundleList[0].barList.length == xAxis.axisItemList.length,
          '竖直柱状图个数与X轴坐标数目要相等');


  sdkComputePool.Metadata.Labels,
			Annotations:       sdkComputePool.Metadata.Annotations,
		},
		Spec: LocalComputePoolSpec{
			Type:        sdkComputePool.Spec.Type,
			ClusterSpec: sdkComputePool.Spec.ClusterSpec,
		},
	}

	if sdkComputePool.Status != nil {
		localPool.Status = &LocalComputePoolStatus{
			Phase: sdkComputePool.Status.Phase,
		}
	}

	return localPool
}
package environment

import (
	"fmt"
	"strings"

	"github.com/spf13/cobra"

	orgv2 "github.com/confluentinc/ccloud-sdk-go-v2/org/v2"

	pcmd "github.com/confluentinc/cli/v4/pkg/cmd"
	"github.com/confluentinc/cli/v4/pkg/output"
	"github.com/confluentinc/cli/v4/pkg/utils"
)

func (c *command) newCreateCommand() *cobra.Command {
	cmd := &cobra.Command{
		Use:   "create <name>",
		Short: "Create a new Confluent Cloud environment.",
		Args:  cobra.ExactArgs(1),
		RunE:  c.create,
	}

	c.addStreamGovernancePackageFlag(cmd, "essentials")
	pcmd.AddContextFlag(cmd, c.CLICommand)
	pcmd.AddOutputFlag(cmd)

	return cmd
}

func (c *command) create(cmd *cobra.Command, args []string) error {
	governancePackage, err := cmd.Flags().GetString("governance-package")
	if err != nil {
		return err
	}

	environment := orgv2.OrgV2Environment{
		DisplayName:            orgv2.PtrString(args[0]),
		StreamGovernanceConfig: &orgv2.OrgV2StreamGovernanceConfig{Package: strings.ToUpper(governancePackage)},
	}
	environment, err = c.V2Client.CreateOrgEnvironment(environment)
	if err != nil {
		return err
	}

	table := output.NewTable(cmd)
	table.Add(&out{
		IsCurrent:               environment.GetId() == c.Context.GetCurrentEnvironment(),
		Id:                      environment.GetId(),
		Name:                    environment.GetDisplayName(),
		StreamGovernancePackage: environment.StreamGovernanceConfig.GetPackage(),
	})
	if err := table.Print(); err != nil {
		return err
	}

	c.Context.AddEnvironment(environment.GetId())
	_ = c.Config.Save()

	return nil
}

func (c *command) addStreamGovernancePackageFlag(cmd *cobra.Command, defaultValue string) {
	values := utils.ArrayToCommaDelimitedString([]string{"essentials", "advanced"}, "or")
	cmd.Flags().String("governance-package", defaultValue, fmt.Sprintf(`Specify the Stream Governance package as %s. Downgrading the package from "advanced" to "essentials" is not allowed once the Schema Registry cluster is provisioned.`, values))
}
package environment

import (
	"strings"

	"github.com/spf13/cobra"

	orgv2 "github.com/confluentinc/ccloud-sdk-go-v2/org/v2"

	pcmd "github.com/confluentinc/cli/v4/pkg/cmd"
	"github.com/confluentinc/cli/v4/pkg/output"
)

func (c *command) newUpdateCommand() *cobra.Command {
	cmd := &cobra.Command{
		Use:               "update <id>",
		Short:             "Update an existing Confluent Cloud environment.",
		Args:              cobra.ExactArgs(1),
		ValidArgsFunction: pcmd.NewValidArgsFunction(c.validArgs),
		RunE:              c.update,
	}

	cmd.Flags().String("name", "", "New name for Confluent Cloud environment.")
	c.addStreamGovernancePackageFlag(cmd, "")


 kotlin
 * class Bar : JavaClass() {
 *     fun foo() {}
 * }
 * ```
 *
 * It should result in:
 * - 1 regular function `foo`
 * - Map a=[`getA`, `setA`]
 */
internal fun splitFunctionsAndInheritedAccessors(
    properties: List<PropertyDescriptor>,
    functions: List<FunctionDescriptor>
): DescriptorFunctionsHolder {
    val (javaMethods, kotlinFunctions) = functions.partition { it is JavaMethodDescriptor }
    if (javaMethods.isEmpty()) {
        return DescriptorFunctionsHolder(regularFunctions = kotlinFunctions, emptyMap())
    }

    val propertiesByName = properties.associateBy { it.name.asString() }
    val regularFunctions = ArrayList<FunctionDescriptor>(kotlinFunctions)

    val accessors = mutableMapOf<PropertyDescriptor, DescriptorAccessorHolder>()
    javaMethods.forEach { function ->
        val possiblePropertyNamesForFunction = function.toPossiblePropertyNames()
        val property = possiblePropertyNamesForFunction.firstNotNullOfOrNull { propertiesByName[it] }
        if (property != null && function.isAccessorFor(property)) {
            accessors.compute(property) { prop, accessorHolder ->
                if (function.isGetterFor(prop))
                    accessorHolder?.copy(getter = function) ?: DescriptorAccessorHolder(getter = function)
                else
                    accessorHolder?.copy(setter = function) ?: DescriptorAccessorHolder(setter = function)
            }
        } else {
            regularFunctions.add(function)
        }
    }

    val accessorLookalikes = removeNonAccessorsReturning(accessors)
    regularFunctions.addAll(accessorLookalikes)

    return DescriptorFunctionsHolder(regularFunctions, accessors)
}

/**
 * If a field has no getter, it's not accessible as a property from Kotlin's perspective,
 * but it still might have a setter lookalike. In this case, this "setter" should be just a regular function
 *
 * @return removed elements
 */
private fun removeNonAccessorsReturning(
    propertyAccessors: MutableMap<PropertyDescriptor, DescriptorAccessorHolder>
): List<FunctionDescriptor> {
    val nonAccessors = mutableListOf<FunctionDescriptor>()
    propertyAccessors.entries.removeIf { (_, accessors) ->
        if (accessors.getter == null && accessors.setter != null) {
            nonAccessors.add(accessors.setter)
            true
        } else {
            false
        }
    }
    return nonAccessors
}

private fun FunctionDescriptor.toPossiblePropertyNames(): List<String> {
    val stringName = this.name.asString()
    return when {
        JvmAbi.isSetterName(stringName) -> propertyNamesBySetMethodName(this.name).map { it.asString() }
        JvmAbi.isGetterName(stringName) -> propertyNamesByGetMethod(this)
        else -> listOf()
    }
}

private fun propertyNamesByGetMethod(functionDescriptor: FunctionDescriptor): List<String> {
    val stringName = functionDescriptor.name.asString()
    // In java, the convention for boolean property accessors is as follows:
    // - `private boolean active;`
    // - `private boolean isActive();`
    //
    // Whereas in Kotlin, because there are no explicit accessors, the convention is
    // - `val isActive: Boolean`
    //
    // This makes it difficult to guess the name of the accessor property in case of Java


多，大家肯定会说给个例子吧,别光YY! 我们知道学习技术也是要成本的，GemFire内存数据库，对于我这样的穷人现在是用不起的！但不影响我们去学习OQL这门对象查询语言。

它其实就在我们的JDK中：

首先，我们启动任何一个Java程序，我这里是个Tomcat,再找到它的PID,如图：

然后使用jmap命令生成堆转储快照，如图：

然后使用堆分析命令jhat,它是个http服务，默认端口7000，如图：

我们就可以使用浏览器查看堆信息了，它还提供我们前面需要的OQL查询功能，如图：

查询长度大于100的字符串：

Java代码执行系统命令也不需要老外说的那么复杂，还使用反射？（当然，看语句拼接情况）：

未来使用对象数据库会越来越多，而漏洞类型已经不是我们之前熟悉的SQL注入漏洞了，而是OQL注入，危害就更为严重了(不仅限于Java)。

©乌云知识库版权所有 未经许可 禁止转载

<div id="donate" style="padding:10px;border-top:1


          if (RA != 0) {
            return "        ".substring(mnemonic.length()) +
                   mnemonic +
                   "   " +
                   rname(rt) +
                   "," +
                   rname(RA) +
                   "," +
                   intAsHexString(ufield);
          } else {
            return "     liu   " + rname(rt) + "," + intAsHexString(ufield);
          }
        }
      case 1:
        return "        ".substring(mnemonic.length()) +
               mnemonic +
               "   " +
               rname(RA) +
               "," +
               rname(rt) +
               "," +
               intAsHexString(ufield);
      case 2:
        if ((opcode == 14) && (RA == 0)) {
          return "     lil" + "   " + rname(rt) + "," + datafield;
        } else {
          return "        ".substring(mnemonic.length()) +
                 mnemonic +
                 "   " +
                 rname(rt) +
                 "," +
                 datafield +
                 "(" +
                 rname(RA) +
                 ")";
        }
      case 3: /* Trap immediate */
        common_opt = TO_ext(TO);
        asm_mnemonic = ((opcode == 2) ? "td" : "tw") + common_opt + "i";
        if (common_opt != null) {
          return "        ".substring(asm_mnemonic.length()) + asm_mnemonic + "   " + rname(RA) + "," + datafield;
        } else {
          return "        ".substring(mnemonic.length()) + mnemonic + "   " + TO + "," + rname(RA) + "," + datafield;
        }
      case 4:
        int L = inst & 0x00200000;
        if (opcode == 11) {
          return "       ".substring(mnemonic.length()) +
                 mnemonic +
                 ((L == 0) ? "W" : "D") +
                 "   cr" +
                 BF +
                 "," +
                 rname(RA) +
                 "," +
                 datafield;
        } else {
          return "       ".substring(mnemonic.length()) +
                 mnemonic +
                 ((L == 0) ? "W" : "D") +
                 "   cr" +
                 BF +
                 "," +
                 rname(RA) +
                 "," +
                 ufield;
        }
      case 5:
        return "        ".substring(mnemonic.length()) + mnemonic + "   fr" + FRT + "," + rname(RA) + "," + datafield;
      default:
        return "    Invalid opcode";
    }
  }

  /* Decode the DS instruction format */
  static String decode_DSform(int inst, int opcode) {
    int XO, RT, RA, sfield;
    String datafield, mnemonic;

    XO = bits(inst, 30, 31);
    RT = bits(inst, 6, 10);
    RA = bits(inst, 11, 15);
    sfield = (((inst) & 0xfffc) << 16) >> 16;
    datafield = intAsHexString(sfield);

    switch (opcode) {
      case 58:
        mnemonic = opcode58[XO].mnemonic;
        if (mnemonic.equals("RESERVED")) return "    Invalid opcode";
        return "        ".substring(mnemonic.length()) +
               mnemonic +
               "   " +
               rname(RT) +
               ", " +
               datafield +
               "(" +
               rname(RA) +
               ")";
      case 62:
        mnemonic = opcode62[XO].mnemonic;


 var fillPaintColor3: Int = 0xffff9e19.toInt()
    private val customFillPaint3 = Paint(Paint.ANTI_ALIAS_FLAG).also { p ->
        p.color = fillPaintColor3
        p.alpha = 110
        p.isDither = true
        p.strokeWidth = 0f
        p.style = Paint.Style.FILL_AND_STROKE
        p.blendMode = BlendMode.SRC
    }

    private var fillPaintColor4: Int = 0xffff9e19.toInt()
    private val customFillPaint4 = Paint(Paint.ANTI_ALIAS_FLAG).also { p ->
        p.color = fillPaintColor4
        p.alpha = 110
        p.isDither = true
        p.strokeWidth = 0f
        p.style = Paint.Style.FILL_AND_STROKE
        p.blendMode = BlendMode.SRC
    }

    private var fillPaintColor5: Int = 0xfffff32f.toInt()
    private val customFillPaint5 = Paint(Paint.ANTI_ALIAS_FLAG).also { p ->
        p.color = fillPaintColor5
        p.alpha = 110
        p.isDither = true
        p.strokeWidth = 0f
        p.style = Paint.Style.FILL_AND_STROKE
        p.blendMode = BlendMode.SRC
    }

    private var fillPaintColor6: Int = 0xfffff32f.toInt()
    private val customFillPaint6 = Paint(Paint.ANTI_ALIAS_FLAG).also { p ->
        p.color = fillPaintColor6
        p.alpha = 110
        p.isDither = true
        p.strokeWidth = 0f
        p.style = Paint.Style.FILL_AND_STROKE
        p.blendMode = BlendMode.SRC
    }

    private var fillPaintColor7: Int = 0xff9aff00.toInt()
    private val customFillPaint7 = Paint(Paint.ANTI_ALIAS_FLAG).also { p ->
        p.color = fillPaintColor7
        p.alpha = 110
        p.isDither = true
        p.strokeWidth = 0f
        p.style = Paint.Style.FILL_AND_STROKE
        p.blendMode = BlendMode.SRC
    }

    private var fillPaintColor8: Int = 0xff9aff00.toInt()
    private val customFillPaint8 = Paint(Paint.ANTI_ALIAS_FLAG).also { p ->
        p.color = fillPaintColor8
        p.alpha = 110
        p.isDither = true
        p.strokeWidth = 0f
        p.style = Paint.Style.FILL_AND_STROKE
        p.blendMode = BlendMode.SRC
    }

    private var fillPaintColor9: Int = 0xff2ed200.toInt()
    private val customFillPaint9 = Paint(Paint.ANTI_ALIAS_FLAG).also { p ->
        p.color = fillPaintColor9
        p.alpha = 110
        p.isDither = true
        p.strokeWidth = 0f
        p.style = Paint.Style.FILL_AND_STROKE
        p.blendMode = BlendMode.SRC
    }

    private var fillPaintColor10: Int = 0xff2ed200.toInt()
    private val customFillPaint10 = Paint(Paint.ANTI_ALIAS_FLAG).also { p ->
        p.color = fillPaintColor10
        p.alpha = 110
        p.isDither = true
        p.strokeWidth = 0f
        p.style = Paint.Style.FILL_AND_STROKE
        p.blendMode = BlendMode.SRC
    }

    private val defaultFillPaint = Paint(Paint.ANTI_ALIAS_FLAG).also { p ->
        p.color = frameColor
        p.alpha = 255
        p.isDither = true
        p.strokeWidth = 0f
        p.style = Paint.Style.FILL_AND_STROKE
        p.blendMode = BlendMode.SRC
    }

    private val chargingPaint = Paint(Paint.ANTI_ALIAS_FLAG).also { p ->
        p.color = frameColor
    }

    private val customFillPaint = Paint(Paint.ANTI_ALIAS_


eats ';' as a line break, i.e. ignores it. This is the
;# reason why all comments need both symbols...
;# The source is written for GNU as, with intel syntax. When you use
;# NASM we redefine a couple of things. The false if-statement around
;# the following code is seen by GNU as, but NASM doesn't see it, so
;# the code inside is read by NASM but not gcc.

; .if 0    # block below only read by NASM
%define .section        section
%define .long           dd
%define .align          align
%define .globl          global
;# NASM only wants 'dword', not 'dword ptr'.
%define ptr
%macro .equiv 2
   %1 equ %2
%endmacro
; .endif                   # End of NASM-specific block
; .intel_syntax noprefix   # Line only read by gnu as

.section .text

.globl nb_kernel_x86_64_sse2_test_asm
.globl _nb_kernel_x86_64_sse2_test_asm
nb_kernel_x86_64_sse2_test_asm:
_nb_kernel_x86_64_sse2_test_asm:
	push  rbx		;# test 64-bit register
	emms
	xorpd xmm0, xmm0	;# test SSE2
	emms
	pop   rbx		;# test 64-bit register
	ret


/*
    #include <pthread.h>
    int pthread_detach(pthread_t thread);
        - 功能：分离一个线程。被分离的线程在终止的时候，会自动释放资源返回给系统。
          1.不能多次分离，会产生不可预料的行为。
          2.不能去连接一个已经分离的线程，会报错。
        - 参数：需要分离的线程的ID
        - 返回值：
            成功：0
            失败：返回错误号
*/
#include <stdio.h>
#include <pthread.h>
#include <string.h>
#include <unistd.h>

void * callback(void * arg) {
    printf("chid thread id : %ld\n", (unsigned long)pthread_self());
    return NULL;
}

int main() {

    // 创建一个子线程
    pthread_t tid;

    int ret = pthread_create(&tid, NULL, callback, NULL);
    if(ret != 0) {
        char * errstr = strerror(ret);
        printf("error1 : %s\n", errstr);
    }

    // 输出主线程和子线程的id
    printf("tid : %ld, main thread id : %ld\n", (unsigned long)tid, (unsigned long)pthread_self());

    // 设置子线程分离,子线程分离后，子线程结束时对应的资源就不需要主线程释放
    ret = pthread_detach(tid);
    if(ret != 0) {
        char * errstr = strerror(ret);
        printf("error2 : %s\n", errstr);
    }

    // 设置分离后，对分离的子线程进行连接 pthread_join()
    // ret = pthread_join(tid, NULL);
    // if(ret != 0) {
    //     char * errstr = strerror(ret);
    //     printf("error3 : %s\n", errstr);
    // }

    pthread_exit(NULL);

    return 0;
}


ifBodyIsValid, pickKeys } from './utils'

const requiredAttrs = ['functionName', 'language', 'gpuCapable', 'scope', 'imageName', 'functionVersion']

export class BaseFunctionHandler {
  public static handler = async (req: AuthenticatedReq, res: Response, next: NextFunction) => {
    try {
      const ops = new OneFunctionHandler(req)
      if (req.method === 'GET') {
        const fn = await ops.get()
        res.status(200).send(fn)
      } else if (req.method === 'DELETE') {
        const deletedFn = await ops.del()
        res.status(200).send(deletedFn)
      } else {
        res.status(400).send('This route only accepts GET and DELETE requests')
      }
    } catch (err) {
      next(err)
    }
  }

  protected req: AuthenticatedReq
  constructor(req: AuthenticatedReq) {
    this.req = req
  }

  public get = () => {
    const { functionName, functionVersion } = this.req.params
    return FunctionDatasource.getFunction(this.req.auth.user, { functionName, functionVersion }, this.req.auth.token)
  }

  public del = () => {
    const { functionName, functionVersion } = this.req.params
    return FunctionDatasource.deleteFunction(this.req.auth.user, { functionName, functionVersion }, this.req.auth.token)
  }
}

export class AllFunctionsHandler extends BaseFunctionHandler {
  public static handler = async (req: AuthenticatedReq, res: Response, next: NextFunction) => {
    try {
      const ops = new AllFunctionsHandler(req)
      if (req.method === 'GET') {
        const allFunctions = await ops.get()
        res.status(200).send(allFunctions)
      } else if (req.method === 'POST') {
        const newFunction = await ops.create()
        res.status(200).send(newFunction)
      } else {
        res.status(400).send('This route only accepts GET and POST requests')
      }
    } catch (err) {
      next(err)
    }
  }

  public create = () => {
    const req = this.req
    const filteredBody = pickKeys(requiredAttrs, req.body) as HermesFunctionProto
    checkifBodyIsValid(requiredAttrs, filteredBody)
    return FunctionDatasource.createFunction(req.auth.user, filteredBody, req.auth.token)
  }
}

export class OneFunctionHandler extends BaseFunctionHandler {
  public static handler = async (req: AuthenticatedReq, res: Response, next: NextFunction) => {
    try {
      const ops = new OneFunctionHandler(req)
      if (req.method === 'GET') {
        const fn = await ops.get()
        res.status(200).send(fn)
      } else if (req.method === 'DELETE') {
        const deletedFn = await ops.del()
        res.status(200).send(deletedFn)
      } else if (req.method === 'PUT') {
        const updatedFn = await ops.upd()
        res.status(200).send(updatedFn)
      } else {
        res.status(400).send('This route only accepts GET, DELETE and PUT requests')
      }
    } catch (err) {
      next(err)
    }
  }

  public upd = async () => {
    const req = this.req
    const { functionName, functionVersion } = req.params
    const filteredBody = pickKeys(requiredAttrs, req.body) as HermesFunctionProto
    return FunctionDatasource.updateFunction(
      req.auth.user,
      {
        functionName,
        functionVersion,
      },
      filteredBody,
      req.auth.token
    )
  }
}
export type Node<T> = {
  value: T,
  left: Node<T> | null,
  right: Node<T> | null
}

/**
 * 递归法
 * @param root
 */
export


;
}

article.modal .modal-body .modal-field input[type="date"],
article.modal .modal-body .modal-field textarea {
   width: 100%;
   margin: 0.5em 0;
}

article.modal .modal-body .modal-field input[type="checkbox"] {
   margin-top: 1em;
}

article.modal .modal-body .modal-field label {
   display: block;
   padding: 0.5em 0;
}

article.modal .modal-body .modal-field label strong {
   color: #444;
   font-size: 1.2em;
}

article.modal .modal-body .modal-field .button-submit {
   margin-top: 0.5em;
}

article.modal .modal-body .modal-field .modal-field-parameter {
   padding-top: 2em;
}

article.modal .modal-body .modal-field .modal-field-parameter h3.label {
   padding: 1em 0 0;
}

article.modal .modal-body .modal-field .modal-field-tabs-menu li {
   display: inline;
}

article.modal .modal-body .modal-field .modal-field-tabs-menu li a {
   display: inline-block;
   color: #888;
   padding: 0 1em 0.2em 0;
}

article.modal .modal-body .modal-field .modal-field-tabs-menu li.active a {
   color: #444;
   font-weight: bold;
   font-size: 1.1em;
}

article.modal .modal-body .modal-field .modal-field-tabs-window > div {
   display: none;
}

article.modal .modal-body .modal-field .modal-field-tabs-window > div.active {
   display: block;
}

article.modal div.modal-body.modal-containers {
   background: #f6f6f6;
}

article.modal div.modal-body.create-new {
   border-top: 1px solid #e5e5e5;
background-color: #f9f9f9;
background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(249, 249, 249)), to(rgb(255, 255, 255)));
background-image: -webkit-linear-gradient(top, rgb(249, 249, 249), rgb(255, 255, 255));
background-image: -moz-linear-gradient(top, rgb(249, 249, 249), rgb(255, 255, 255));
background-image: -o-linear-gradient(top, rgb(249, 249, 249), rgb(255, 255, 255));
background-image: -ms-linear-gradient(top, rgb(249, 249, 249), rgb(255, 255, 255));
background-image: linear-gradient(top, rgb(249, 249, 249), rgb(255, 255, 255));
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#f9f9f9', EndColorStr='#ffffff');
}

article.modal div.modal-body h2 {
   font-size: 1em;
   padding: 7px 0;
}

div.modal-window .modal.col_9 {margin: 0;}

/* ---- MODAL: DROP ZOOM */

article.modal .page-action,
article.modal #create-new.page-action {display: none;}

.visible article.modal .page-action {
   display: block;
   margin: 0 1.0416667%;
}

article.modal #create-new.page-action {
   margin-bottom: 1em;
}

#zoom-container article.drop-full {
   margin-top: 0;
   margin-bottom: 0;
}

/* ---- MODAL: DROP SUMMARY */

article.modal section.drop-summary {
   text-align: left;
   -webkit-border-bottom-left-radius: 3px;
   -webkit-


struct brdevice {
	short brds;
	short brer;
	union {
		short w;
		char c[2];
	} brcs;
	short brwc;
	caddr_t brba;
	short brca;
	short brda;
	short brae;
};

/* bits in brds */
#define	BRDS_SURDY	0100000		/* selected unit ready */
#define	BRDS_SUOL	0040000		/* selected unit on line */
#define	BRDS_TOE	0020000		/* selected unit BR */
#define	BRDS_HNF	0010000		/* header not found */
#define	BRDS_SUSI	0004000		/* selected unit seek incomplete */
#define	BRDS_SUFU	0001000		/* selected unit file unsafe */
#define	BRDS_SUWP	0000400		/* selected unit write protected */
/* bits 7-0 are attention bits */
#define	BRDS_BITS	"\10\20SURDY\17SUOL\16BR\15HNF\14SUSI\12SUFU\11SUWP"

/* bits in brer */
#define	BRER_WPV	0100000		/* write protect violation */
#define	BRER_FUV	0040000		/* file unsafe violation */
#define	BRER_NXC	0020000		/* nonexistent cylinder */
#define	BRER_NXT	0010000		/* nonexistent track */
#define	BRER_SUBUSY	0004000		/* selected unit busy */
#define	BRER_PROG	0002000		/* program error */
#define	BRER_FMTE	0001000		/* format error */
#define	BRER_BSE	0000400		/* bad sector */
#define	BRER_ATE	0000200		/* aborted transfer error */
#define	BRER_DCE	0000100		/* data check error */
#define	BRER_DSE	0000040		/* data sync error */
#define	BRER_SBPE	0000020		/* system bad parity error */
#define	BRER_WCE	0000010		/* write check error */
#define	BRER_NXME	0000004		/* nonexistent memory */
#define	BRER_EOP	0000002		/* end of pack */
#define	BRER_DSKERR	0000001		/* disk error */
#define	BRER_BITS	\
"\10\20WPV\17FUV\16NXC\15NXT\14SUBUSY\13PROG\12FMTE\11BSE\10ATE\
\7DCE\6DSE\5SBPE\4WCE\3NXME\2EOP\1DSKERR"

/* bits in brcs */
#define	BR_ERR		0100000		/* error */
#define	BR_HE		0040000		/* hard error */
#define	BR_AIE		0020000		/* attention interrupt enable */
#define	BR_HDB		0010000		/* hold drive busy */
#define	BR_HDR		0004000		/* header */
/* bits 10-8 are drive select */
#define	BR_RDY		0000200		/* ready */
#define	BR_IDE		0000100		/* interrupt on done (error) enable */
/* bits 5-4 are the UNIBUS extension bits */
/* bits 3-1 are the function */
#define	BR_GO		0000001		/* go */
#define	BR_BITS		"\10\20ERR\17HE\16AIE\15HDB\14HDR\10RDY\7IDE\1GO"

/* commands */
#define	BR_IDLE		0000000		/* idle */
#define	BR_WCOM		0000002		/* write */
#define	BR_RCOM		0000004		/* read */
#define	BR_WCHK		0000006		/* write check */
#define	BR_SEEK		0000010		/* seek */
#define	BR_WNS		0000012		/* write (no seek) */
#define	BR_HSEEK	0000014		/* home seek */
#define	BR_RNS		0000016		/* read (no seek) */

#define	STBE		0000100		/* Strobe early */
#define	STBL		0000200		/* Strobe late */
#define	OFFP		0140000		/* Positive offset */
#define	OFFM		0100000		/* Negative offset */

/* Bits in br_ae */
#define	AE_DTYP		0007400		/* Disk type */
#define	AE_T50		0000400		/* T-50  drive */
#define	AE_T80		0001000		/* T-80  drive */
#define	AE_T200		0002000		/* T-200 drive */
#define	AE_T300		0004000		/* T-300 drive */


//
//  NSArrayHelper.h
//  Enormego Cocoa Helpers
//
//  Created by Shaun Harrison on 10/28/08.
//  Copyright (c) 2008-2009 enormego
//
//  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.
//

#import <Foundation/Foundation.h>

@interface NSArray (Helper)

/*
 * Returns an array with A-Z and # to be used as section titles
 */
+ (NSArray*)arrayWithAlphaNumericTitles;

/*
 * Returns an array with the Search icon, A-Z and # to be used as section titles
 */
+ (NSArray*)arrayWithAlphaNumericTitlesWithSearch:(BOOL)search;

/*
 * Checks to see if the array is empty
 */
@property(nonatomic,readonly,getter=isEmpty) BOOL empty;

@end


r='#eeeeee', endColorstr='#ffffff', GradientType=0);}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0;}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb;}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px;}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none;}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px;}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px;}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555;}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right;}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto;}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto;}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb;}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0;}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0;}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;}.select2-container--classic .select2-dropdown{background-color:white;border:1px solid transparent;}.select2-container--classic .select2-dropdown--above{border-bottom:none;}.select2-container--classic .select2-dropdown--below{border-top:none;}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto;}.select2-container--classic .select2-results__option[role=group]{padding:0;}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey;}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:white;}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px;}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb;}.select2-container--default .select2-selection--single:focus, .select2-container--default .select2-selection--single:focus{border:1px solid #03a9f4;outline:none}/*! HTML5 Boilerplate v5.2.0 | MIT License | https://html5boilerplate.com/ */

/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher,


*
*			test du Chunky To Planar
*			~~~~~~~~~~~~~~~~~~~~~~~~

BITMAP_X=320
BITMAP_HEIGHT=117
BITMAP_WIDTH=BITMAP_X/8
BITMAP_SIZE=BITMAP_WIDTH*BITMAP_HEIGHT
SCREEN_DEPTH=8
SCREEN_SIZE=BITMAP_WIDTH*BITMAP_HEIGHT*SCREEN_DEPTH

	incdir "asm:Sources"
	incdir "asm:.s/Mapping"
	include "registers.i"

	OPT DEBUG
	OPT O+

	section toto,code

Entry_Point
	KILL_SYSTEM Main
	moveq #0,d0
	rts

Main
	lea custom_base,a6

	bsr Init_Coplist

	move.l #coplist,cop1lc(a6)
	clr.w copjmp1(a6)
	move.w #$83c0,dmacon(a6)

	lea Chunky,a0
	lea Bitmap,a1
	bsr _ChunkyToPlanar

	WAIT_LMB_DOWN
	RESTORE_SYSTEM

Init_Coplist
	move.l #Bitmap,d1
	moveq #SCREEN_DEPTH-1,d0
	lea bpl,a0
.loop
	move.w d1,4(a0)
	swap d1
	move.w d1,(a0)
	swap d1
	add.l #BITMAP_SIZE,d1
	addq.l #8,a0
	dbf d0,.