, err)

			noop, mappedExpr, err := rvm.Parse(syntax.MustParseExpr(tc.expr))
			require.NoError(t, err)

			require.Equal(t, removeWhiteSpace(tc.expected), removeWhiteSpace(mappedExpr.String()))
			require.Equal(t, tc.expectedSplitQueries, mapperStats.GetSplitQueries())
			require.False(t, noop)
		})
	}
}

func Test_SplitRangeVectorMapping_Noop(t *testing.T) {
	for _, tc := range []struct {
		expr     string
		expected string
	}{
		// Non-splittable range vector aggregators
		{
			`quantile_over_time(0.95, {app="foo"} | unwrap bar[3m])`,
			`quantile_over_time(0.95, {app="foo"} | unwrap bar[3m])`,
		},
		{
			`sum(avg_over_time({app="foo"} | unwrap bar[3m]))`,
			`sum(avg_over_time({app="foo"} | unwrap bar[3m]))`,
		},

		// should be noop if range interval is lower or equal to split interval (1m)
		{
			`bytes_over_time({app="foo"}[1m])`,
			`bytes_over_time({app="foo"}[1m])`,
		},

		// should be noop if inner range aggregation includes a stage for label extraction such as `| json` or `| logfmt`
		// because otherwise the downstream queries would result in too many series
		{
			`bytes_over_time({app="foo"} | logfmt [3m])`,
			`bytes_over_time({app="foo"} | logfmt [3m])`,
		},
		{
			`count_over_time({app="foo"} | json [3m])`,
			`count_over_time({app="foo"} | json [3m])`,
		},
		{
			`sum_over_time({app="foo"} | logfmt | unwrap bar [3m])`,
			`sum_over_time({app="foo"} | logfmt | unwrap bar [3m])`,
		},
		{
			`max_over_time({app="foo"} | json | unwrap bar [3m])`,
			`max_over_time({app="foo"} | json | unwrap bar [3m])`,
		},
		{
			`min_over_time({app="foo"} | logfmt | unwrap bar [3m])`,
			`min_over_time({app="foo"} | logfmt | unwrap bar [3m])`,
		},
		{
			`rate({app="foo"} | json [3m])`,
			`rate({app="foo"} | json [3m])`,
		},
		{
			`bytes_rate({app="foo"} | logfmt [3m])`,
			`bytes_rate({app="foo"} | logfmt [3m])`,
		},
		// should be noop if inner range aggregation includes a stage for label extraction
		// and the vector aggregator is count
		{
			`count(bytes_over_time({app="foo"} | logfmt [3m]))`,
			`count(bytes_over_time({app="foo"} | logfmt [3m]))`,
		},
		{
			`count by (foo) (bytes_over_time({app="foo"} | json [3m]))`,
			`count by (foo) (bytes_over_time({app="foo"} | json [3m]))`,
		},
		{
			`count(count_over_time({app="foo"} | logfmt [3m]))`,
			`count(count_over_time({app="foo"} | logfmt [3m]))`,
		},
		{
			`count by (foo) (count_over_time({app="foo"} | json [3m]))`,
			`count by (foo) (count_over_time({app="foo"} | json [3


 value
	// is UNKNOWN. This enables enum values to be added
	// in a backwards-compatible way. See: MESOS-4997.
	Volume_Source_UNKNOWN Volume_Source_Type = 0
	// TODO(gyliu513): Add HOST_PATH and IMAGE as volume source type.
	Volume_Source_DOCKER_VOLUME Volume_Source_Type = 1
	Volume_Source_SANDBOX_PATH  Volume_Source_Type = 2
)

var Volume_Source_Type_name = map[int32]string{
	0: "UNKNOWN",
	1: "DOCKER_VOLUME",
	2: "SANDBOX_PATH",
}
var Volume_Source_Type_value = map[string]int32{
	"UNKNOWN":       0,
	"DOCKER_VOLUME": 1,
	"SANDBOX_PATH":  2,
}

func (x Volume_Source_Type) Enum() *Volume_Source_Type {
	p := new(Volume_Source_Type)
	*p = x
	return p
}
func (x Volume_Source_Type) String() string {
	return proto.EnumName(Volume_Source_Type_name, int32(x))
}
func (x *Volume_Source_Type) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Volume_Source_Type_value, data, "Volume_Source_Type")
	if err != nil {
		return err
	}
	*x = Volume_Source_Type(value)
	return nil
}
func (Volume_Source_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{48, 0, 0} }

type Volume_Source_SandboxPath_Type int32

const (
	Volume_Source_SandboxPath_UNKNOWN Volume_Source_SandboxPath_Type = 0
	Volume_Source_SandboxPath_SELF    Volume_Source_SandboxPath_Type = 1
	Volume_Source_SandboxPath_PARENT  Volume_Source_SandboxPath_Type = 2
)

var Volume_Source_SandboxPath_Type_name = map[int32]string{
	0: "UNKNOWN",
	1: "SELF",
	2: "PARENT",
}
var Volume_Source_SandboxPath_Type_value = map[string]int32{
	"UNKNOWN": 0,
	"SELF":    1,
	"PARENT":  2,
}

func (x Volume_Source_SandboxPath_Type) Enum() *Volume_Source_SandboxPath_Type {
	p := new(Volume_Source_SandboxPath_Type)
	*p = x
	return p
}
func (x Volume_Source_SandboxPath_Type) String() string {
	return proto.EnumName(Volume_Source_SandboxPath_Type_name, int32(x))
}
func (x *Volume_Source_SandboxPath_Type) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Volume_Source_SandboxPath_Type_value, data, "Volume_Source_SandboxPath_Type")
	if err != nil {
		return err
	}
	*x = Volume_Source_SandboxPath_Type(value)
	return nil
}
func (Volume_Source_SandboxPath_Type) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor0, []int{48, 0, 1, 0}
}

type NetworkInfo_Protocol int32

const (
	NetworkInfo_IPv4 NetworkInfo_Protocol = 1
	NetworkInfo_IPv6 NetworkInfo_Protocol = 2
)

var NetworkInfo_Protocol_name = map[int32]string{
	1: "IPv4",
	2: "IPv6",
}
var NetworkInfo_Protocol_value = map[string]int32{
	"IPv4": 1,
	"IPv6": 2,
}

func (x NetworkInfo_Protocol) Enum() *NetworkInfo_Protocol {
	p := new(NetworkInfo_Protocol)
	*p = x
	return p
}
func (x NetworkInfo_Protocol) String() string {
	return proto.EnumName(NetworkInfo_Protocol_name, int32(x))
}
func (x *NetworkInfo_Protocol) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(NetworkInfo_Protocol_value, data, "NetworkInfo_Protocol")
	if err != nil {
		return err
	}
	*x = NetworkInfo_Protocol


to auto 0 0;
  cursor: nesw-resize;
}

.floating-splitter-corner-bottomright {
  inset: auto 0 0 auto;
  cursor: nwse-resize;
}

/* Icons */
#panel-sidebar-add {
  list-style-image: url("chrome://global/skin/icons/plus.svg");
}
#panel-sidebar-back {
  list-style-image: url("chrome://browser/skin/back.svg");
}
#panel-sidebar-forward {
  list-style-image: url("chrome://browser/skin/forward.svg");
}
#panel-sidebar-reload {
  list-style-image: url("chrome://global/skin/icons/reload.svg");
}
#panel-sidebar-go-index {
  list-style-image: url("chrome://browser/skin/home.svg");
}
#panel-sidebar-open-in-main-window {
  list-style-image: url("chrome://browser/skin/open.svg");
}
#panel-sidebar-close {
  list-style-image: url("chrome://global/skin/icons/close.svg");
}
#panel-sidebar-addons-icon {
  list-style-image: url("chrome://mozapps/skin/extensions/extension.svg");
}

#panel-sidebar-passwords-icon {
  list-style-image: url("chrome://browser/skin/login.svg");
}
#panel-sidebar-preferences-icon {
  list-style-image: url("chrome://global/skin/icons/settings.svg");
}

/* Child Windows */
#browser[data-is-child] > #panel-sidebar-select-box,
#browser[data-is-child] > #panel-sidebar-box,
#browser[data-is-child] > #sidebar-main,
#browser[data-is-child] > #sidebar-wrapper {
  display: none;
}

:root[chromehidden~="menubar"] .chromeclass-menubar,
:root[chromehidden~="directories"] .chromeclass-directories,
:root[chromehidden~="status"] .chromeclass-status,
:root[chromehidden~="extrachrome"] .chromeclass-extrachrome,
:root[chromehidden~="location"] .chromeclass-location,
:root[chromehidden~="location"][chromehidden~="toolbar"] .chromeclass-toolbar,
:root[chromehidden~="toolbar"] .chromeclass-toolbar-additional {
  display: none !important;
}

#after-splitter {
  max-width: var(--panel-sidebar-splitter-width);
}
.notification {
  padding: 150px 0;
  position: relative;
}
.notification-icon {
  text-align: center;
  margin-bottom: 20px;
}
.notification-close {
  position: absolute;
  right: 30px;
  top: 30px;
  width: 30px;
  height: 30px;
  cursor: pointer;
}
.notification-close:before,
.notification-close:after {
  width: 2px;
  height: 30px;
  position: absolute;
  display: block;
  content: '';
  background-color: #808488;
  top: 0;
  left: 13px;
}
.notification-close:before {
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
}
.notification-close:after {
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
}
.notification-title {
  font-size: 2.375em;
  text-align: center;


ScoringDelay = Units.Milliseconds.of(40);

	public static final Time kReefLookaheadTime = Units.Seconds.of(0.16);
	public static final Time kProcessorAlgaeLookaheadTime = Units.Seconds.of(0.16);
	public static final Time kL1LookaheadTime = Units.Seconds.of(0.16);
	public static final Time kL2LookaheadTime = Units.Seconds.of(0.16);
	public static final Time kL3LookaheadTime = Units.Seconds.of(0.16);
	public static final Time kL4LookaheadTime = Units.Seconds.of(0.16);

	public static final Distance kElevatorCenterOffset = Units.Inches.of(12.5);

	public static final Distance kAlgaeOffsetFactor = Units.Centimeters.of(10.0);
	public static final Distance kAlgaeReadyOffsetFactor = Units.Centimeters.of(20.0);
	public static final Distance kL4CoralOffsetFactor = Units.Centimeters.of(34.25);
	public static final Distance kL3CoralOffsetFactor = Units.Centimeters.of(30.25);
	public static final Distance kL2CoralOffsetFactor = Units.Centimeters.of(30.25);
	public static final Distance kL1CoralOffsetFactor = Units.Centimeters.of(60.0);

	public static final Distance kL1CoralHorizontalOffsetFactor = Units.Inches.of(6.469);

	public static final Time kClimberDebounce = Units.Seconds.of(0.04);
	public static final Time kEndEffectorCoralDebounce = Units.Seconds.of(0.04);
	public static final Time kIndexerDebounce = Units.Seconds.of(0.04);
	public static final Time kCoralRollersCurrentSpikeDebounce = Units.Seconds.of(0.4);
	public static final Time kEndEffectorAlgaeDebounce = Units.Seconds.of(0.09);
	public static final Time kCoralRollersVelocityDebounce = Units.Seconds.of(0.04);

	public static final AngularVelocity kPivotStableThresholdVelocity = Units.DegreesPerSecond.of(20.0);

	public static final AngularVelocity kEndEffectorVelocityDip = Units.DegreesPerSecond.of(2000);

	public static final Distance kAlgaeStowReefDistance = Units.Meters.of(2.0);

	public static final Time kRecentUpdateTime = Units.Seconds.of(0.1);
	public static final Distance kNearUpdateDistance = Units.Centimeters.of(2.0);

	public static Distance getAutoAlignScoringDistanceEpsilon(Level level) {
		return switch (level) {
			case L1 -> kL1ScoringDistanceEpsilon;
			case L2 -> kL2ScoringDistanceEpsilon;
			case L3 -> kL3ScoringDistanceEpsilon;
			case L4 -> kL4ScoringDistanceEpsilon;
			case PROCESSOR_ALGAE -> kProcessorAlgaeScoringDistanceEpsilon;
			case NET -> kNetScoringDistanceEpsilon;
			default -> kReefScoringDistanceEpsilon;
		};
	}

	public static Angle getAutoAlignScoringAngleEpsilon(Level level) {
		return switch (level) {
			case L1 -> kL1ScoringAngleEpsilon;
			case L2 -> kL2ScoringAngleEpsilon;
			case L3 -> kL3ScoringAngleEpsilon;
			case L4 -> kL4ScoringAngleEpsilon;
			case PROCESSOR_ALGAE -> kProcessorAlgaeScoringAngleEpsilon;
			case NET -> kNetScoringAngleEpsilon;
			default -> kReefScoringAngleEpsilon;
		};
	}

	public static Time getAutoAlignScoringDelay(Level level) {
		return switch (level) {
			case L1 -> kL1ScoringDelay;
			case L2 -> kL2ScoringDelay;
			case L3 -> kL3ScoringDelay;
			case L4 -> kL4ScoringDelay;
			case PROCESSOR_ALGAE -> kProcessorAlgaeScoringDelay;
			case NET -> kNetScoringDelay;


 Alternatively, the contents of this file may be used under the terms of
 * either of the GNU General Public License Version 2 or later (the "GPL"),
 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

/* ===== primaryToolbar.css =============================================
  == Images for the Mail primary toolbar.
  ======================================================================= */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

/* ::::: primary toolbar buttons ::::: */

.toolbarbutton-1 {
  list-style-image: url("chrome://messenger/skin/icons/btn1.gif");
}

#button-getmsg {
  -moz-image-region: rect(105px 23px 126px 0px);
}

#button-getmsg:hover {
  -moz-image-region: rect(105px 46px 126px 23px);
}

#button-getmsg:hover:active {
  -moz-image-region: rect(105px 69px 126px 46px);
}

#button-getmsg[disabled] {
  -moz-image-region: rect(105px 92px 126px 69px) !important;
}

#button-newmsg {
  -moz-image-region: rect(126px 23px 147px 0px);
}

#button-newmsg:hover {
  -moz-image-region: rect(126px 46px 147px 23px);
}

#button-newmsg:hover:active {
  -moz-image-region: rect(126px 69px 147px 46px);
}

#button-newmsg[disabled] {
  -moz-image-region: rect(126px 92px 147px 69px) !important;
}

#button-reply {
  -moz-image-region: rect(168px 23px 189px 0px);
}

#button-reply:hover {
  -moz-image-region: rect(168px 46px 189px 23px);
}

#button-reply:hover:active {
  -moz-image-region: rect(168px 69px 189px 46px);
}

#button-reply[disabled] {
  -moz-image-region: rect(168px 92px 189px 69px) !important;
}

#button-replyall {
  -moz-image-region: rect(189px 23px 210px 0px);
}

#button-replyall:hover {
  -moz-image-region: rect(189px 46px 210px 23px);
}

#button-replyall:hover:active {
  -moz-image-region: rect(189px 69px 210px 46px);
}

#button-replyall[disabled] {
  -moz-image-region: rect(189px 92px 210px 69px) !important;
}

#button-forward {
  -moz-image-region: rect(84px 23px 105px 0px);
}

#button-forward:hover {
  -moz-image-region: rect(84px 46px 105px 23px);
}

#button-forwa


, savePoseDirectory + "/without_optimized_pose.txt");

    //  save optimize data
    for(int i = 0; i  < cloudKeyPoses6D->size(); i++){
        pose_optimized.t =  Eigen::Vector3d(cloudKeyPoses6D->points[i].x, cloudKeyPoses6D->points[i].y, cloudKeyPoses6D->points[i].z  );
        pose_optimized.R = Exp(double(cloudKeyPoses6D->points[i].roll), double(cloudKeyPoses6D->points[i].pitch), double(cloudKeyPoses6D->points[i].yaw) );
        WriteText(file_pose_optimized, pose_optimized);
    }
    cout << "Sucess global optimized  poses to pose files ..." << endl;

    for(int i = 0; i  < fastlio_unoptimized_cloudKeyPoses6D->size(); i++){
        pose_without_optimized.t =  Eigen::Vector3d(fastlio_unoptimized_cloudKeyPoses6D->points[i].x, fastlio_unoptimized_cloudKeyPoses6D->points[i].y, fastlio_unoptimized_cloudKeyPoses6D->points[i].z  );
        pose_without_optimized.R = Exp(double(fastlio_unoptimized_cloudKeyPoses6D->points[i].roll), double(fastlio_unoptimized_cloudKeyPoses6D->points[i].pitch), double(fastlio_unoptimized_cloudKeyPoses6D->points[i].yaw) );
        WriteText(file_pose_without_optimized, pose_without_optimized);
    }
    cout << "Sucess unoptimized  poses to pose files ..." << endl;

    for(int i = 0; i  < gnss_cloudKeyPoses6D->size(); i++){
        pose_gnss.t =  Eigen::Vector3d(gnss_cloudKeyPoses6D->points[i].x, gnss_cloudKeyPoses6D->points[i].y, gnss_cloudKeyPoses6D->points[i].z  );
        pose_gnss.R = Exp(double(gnss_cloudKeyPoses6D->points[i].roll), double(gnss_cloudKeyPoses6D->points[i].pitch), double(gnss_cloudKeyPoses6D->points[i].yaw) );
        WriteText(file_pose_gnss, pose_gnss);
    }
    cout << "Sucess gnss  poses to pose files ..." << endl;

    file_pose_gnss.close();
    file_pose_optimized.close();
    file_pose_without_optimized.close();
    return true  ;
}

/**
 * 保存全局关键帧特征点集合
*/
bool saveMapService(fast_lio_sam::save_mapRequest& req, fast_lio_sam::save_mapResponse& res)
{
      string saveMapDirectory;

      cout << "****************************************************" << endl;
      cout << "Saving map to pcd files ..." << endl;
      if(req.destination.empty()) saveMapDirectory = std::getenv("HOME") + savePCDDirectory;
      else saveMapDirectory = std::getenv("HOME") + req.destination;
      cout << "Save destination: " << saveMapDirectory << endl;
      // 这个代码太坑了！！注释掉
    //   int unused = system((std::string("exec rm -r ") + saveMapDirectory).c_str());
    //   unused = system((std::string("mkdir -p ") + saveMapDirectory).c_str());
      // 保存历史关键帧位姿
      pcl::io::savePCDFileBinary(saveMapDirectory + "/trajectory.pcd", *cloudKeyPoses3D);                    // 关键帧位置
      pcl::io::savePCDFileBinary(saveMapDirectory + "/transformations.pcd", *cloudKeyPoses6


#pragma once

#include <c10/macros/Macros.h>
#include <c10/util/intrusive_ptr.h>

namespace c10 {
struct StorageImpl;
class DataPtr;
}; // namespace c10

namespace c10::impl::cow {

// Creates a Copy-on-write (COW) clone of the given storage. This will also
// convert the given storage into a COW storage if it is not COW already.
//
// Converting the storage into a COW storage will not be successful if the
// storage's DataPtr has some context (`DataPtr::get_context()`) which is not
// equal to the data pointer (`DataPtr::get()`). In this case, a nullptr is
// returned.
C10_API c10::intrusive_ptr<StorageImpl> lazy_clone_storage(
    StorageImpl& storage);

// Check if a storage has a simple DataPtr with no abnormal context
C10_API bool has_simple_data_ptr(const c10::StorageImpl& storage);

// Check if a DataPtr is COW
C10_API bool is_cow_data_ptr(const c10::DataPtr& data_ptr);

// Eagerly copies a COW storage's data, turning it into a non-COW storage.
C10_API void materialize_cow_storage(StorageImpl& storage);

} // namespace c10::impl::cow


   await expect(tree.rootHash()).resolves.toBe(
      '<<<<a|b-0>|<c|c-0>-1>|<<a|b-0>|<c|c-0>-1>-2>|<<<a|b-0>|<c|c-0>-1>|<<a|b-0>|<c|c-0>-1>-2>-3>',
    )
    await expect(tree.pastRoot(1)).resolves.toBe(
      '<<<<a|a-0>|<a|a-0>-1>|<<a|a-0>|<a|a-0>-1>-2>|<<<a|a-0>|<a|a-0>-1>|<<a|a-0>|<a|a-0>-1>-2>-3>',
    )
    await expect(tree.pastRoot(2)).resolves.toBe(
      '<<<<a|b-0>|<a|b-0>-1>|<<a|b-0>|<a|b-0>-1>-2>|<<<a|b-0>|<a|b-0>-1>|<<a|b-0>|<a|b-0>-1>-2>-3>',
    )
    await expect(tree.pastRoot(3)).resolves.toBe(
      '<<<<a|b-0>|<c|c-0>-1>|<<a|b-0>|<c|c-0>-1>-2>|<<<a|b-0>|<c|c-0>-1>|<<a|b-0>|<c|c-0>-1>-2>-3>',
    )
    await expect(tree.pastRoot(4)).rejects.toMatchInlineSnapshot(
      `[Error: Unable to get past size 4 for tree with 3 nodes]`,
    )
    await tree.add('d')
    await expect(tree.rootHash()).resolves.toBe(
      '<<<<a|b-0>|<c|d-0>-1>|<<a|b-0>|<c|d-0>-1>-2>|<<<a|b-0>|<c|d-0>-1>|<<a|b-0>|<c|d-0>-1>-2>-3>',
    )
    await expect(tree.pastRoot(1)).resolves.toBe(
      '<<<<a|a-0>|<a|a-0>-1>|<<a|a-0>|<a|a-0>-1>-2>|<<<a|a-0>|<a|a-0>-1>|<<a|a-0>|<a|a-0>-1>-2>-3>',
    )
    await expect(tree.pastRoot(2)).resolves.toBe(
      '<<<<a|b-0>|<a|b-0>-1>|<<a|b-0>|<a|b-0>-1>-2>|<<<a|b-0>|<a|b-0>-1>|<<a|b-0>|<a|b-0>-1>-2>-3>',
    )
    await expect(tree.pastRoot(3)).resolves.toBe(
      '<<<<a|b-0>|<c|c-0>-1>|<<a|b-0>|<c|c-0>-1>-2>|<<<a|b-0>|<c|c-0>-1>|<<a|b-0>|<c|c-0>-1>-2>-3>',
    )
    await expect(tree.pastRoot(4)).resolves.toBe(
      '<<<<a|b-0>|<c|d-0>-1>|<<a|b-0>|<c|d-0>-1>-2>|<<<a|b-0>|<c|d-0>-1>|<<a|b-0>|<c|d-0>-1>-2>-3>',
    )
    await expect(tree.pastRoot(5)).rejects.toMatchInlineSnapshot(
      `[Error: Unable to get past size 5 for tree with 4 nodes]`,
    )
    for (let i = 0; i < 12; i++) {
      await tree.add(String(i))
    }
    await expect(tree.rootHash()).resolves.toBe(
      '<<<<a|b-0>|<c|d-0>-1>|<<0|1-0>|<2|3-0>-1>-2>|<<<4|5-0>|<6|7-0>-1>|<<8|9-0>|<10|11-0>-1>-2>-3>',
    )
    await expect


ct with no applets installed
	 */
	public MockCard() {
		aid2applet = new Hashtable<AID,Applet>();
		reset();
	} // constructor

	public byte[] getATR(){ return ATR; }

	/**
	 * installs an applet with a given AID
	 *
	 * @param aidBytes
	 * @param applet
	 */
	public void installApplet(byte[] aidBytes, Applet applet) {
		//if (LOG_VERBOSE)
		//	Log.v(TAG, "MockCard: install: AID="+Util.bytesToHexString(aidBytes)+" --> "+
		//			   "Applet \""+applet.getClass().getName()+"\"");

		AID aid = new AID(aidBytes);
		if (aid2applet.containsKey(aid))
			throw new Error("Tried to install with same AID more than once");
		aid2applet.put(aid, applet);
	} // installApplet

	/**
	 * handles logical channels (MANAGE_CHANNEL)
	 * and applet selection (SELECT)
	 *
	 * @param iChannel
	 * @param command
	 * @return
	 *   1..19 (new) channel number after MANAGE_CHANNEL, open, P2=0
	 *   0                          after MANAGE_CHANNEL, close
	 *                              or    MANAGE_CHANNEL, open with P2>0
	 *  -1                          after SELECT
	 *  -2                          after any other C-APDU
	 * @throws MockCardException
	 */
	protected int cardManager(int iChannel, byte[] command) throws MockCardException {
		int ins = 0xff & command[1];
		int p1  = 0xff & command[2];
		int p2  = 0xff & command[3];
		int p3  = command.length>4? 0xff & command[4]: 0;

		switch (ins) {
			case INS_SELECT: {
				// command SELECT:
				Applet a = aid2applet.get(new AID(command, 5, p3));
				if (a == null)
					throw new MockCardException(MockCardException.SW_FILE_NOT_FOUND);
				isChannelOpen[iChannel] = true;
				selectedApplet[iChannel] = a;
				return -1; // indicate that command is SELECT
			}

			case INS_MANAGE_CHANNEL: {
				// command MANAGE_CHANNEL:
				switch (p1) {
					case 0x00:
						// open logical channel:
						if (p2 == 0) {
							if (p3 != 1)
								throw new MockCardException(MockCardException.SW_WRONG_LENGTH);
							for (iChannel = 1; iChannel < N_CHANNELS; iChannel++)
								if (!isChannelOpen[iChannel]) break;
							if (iChannel >= N_CHANNELS)
								throw new MockCardException(MockCardException.SW_FUNC_NOT_SUPPORTED);
							isChannelOpen[iChannel] = true;
							selectedApplet[iChannel] = null;
							return iChannel;
						}
						if (p2<N_CHANNELS) {
							if (isChannelOpen[p2])
								throw new MockCardException(MockCardException.SW_WARNING_STATE_UNCHANGED);
							isChannelOpen[p2] = true;
							selectedApplet[p2] = null;
							return 0;
						}
						throw new MockCardException(MockCardException.SW_INCORRECT_P1P2);

					case 0x80:
						// close logical channel:
						if (p2 != iChannel || p2 >= N_CHANNELS)
							throw new MockCardException(MockCardException.SW_INCORRECT_P1P2);
						if (p2 == 0)
							return 0; // basic channel can't be closed; nevertheless return 9000
						if (!isChannelOpen[p2])
							throw new MockCardException(MockCardException.SW_WARNING_STATE_UNCHANGED);
						isChannelOpen[p2] = false;
						selectedApplet[p2] = null;
						return 0;

					default:
						throw new MockCardException(MockCardException.SW_INCORRECT_P1P2);
				}


lgLight::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgLight)
	m_strPathName = _T("");
	m_strLightObjName = _T("");
	//}}AFX_DATA_INIT

	m_pRefLightObjMgr = nullptr;
	m_pSelLO = nullptr;
}

void CDlgLight::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgLight)
	DDX_Control(pDX, IDC_STC_COLOR, m_stcColor);
	DDX_Control(pDX, IDC_SLD_ATTEN, m_sld_Atten);
	DDX_Control(pDX, IDC_SLD_RANGE, m_sld_Range);
	DDX_Control(pDX, IDC_LIST_LIGHTS, m_ListLO);
	DDX_Text(pDX, IDC_PATHNAME, m_strPathName);
	DDX_Text(pDX, IDC_EDT_NAME, m_strLightObjName);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CDlgLight, CDialog)
	//{{AFX_MSG_MAP(CDlgLight)
	ON_BN_CLICKED(IDC_BTN_EXPORT, OnBtnExport)
	ON_BN_CLICKED(IDC_BTN_IMPORT, OnBtnImport)
	ON_BN_CLICKED(IDC_BTN_UPLOAD, OnBtnUpload)
	ON_BN_CLICKED(IDC_BTN_DOWNLOAD, OnBtnDownload)
	ON_BN_CLICKED(IDC_BTN_DELETE, OnBtnDelete)
	ON_LBN_SELCHANGE(IDC_LIST_LIGHTS, OnSelchangeListLights)
	ON_NOTIFY(NM_RELEASEDCAPTURE, IDC_SLD_ATTEN, OnReleasedcaptureSldAtten)
	ON_NOTIFY(NM_RELEASEDCAPTURE, IDC_SLD_RANGE, OnReleasedcaptureSldRange)
	ON_WM_PAINT()
	ON_WM_LBUTTONUP()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgLight message handlers

BOOL CDlgLight::OnInitDialog()
{
	CDialog::OnInitDialog();

	m_sld_Atten.SetRange(0, 100, TRUE);
	m_sld_Atten.SetPos(100);

	m_sld_Range.SetRange(0, 500, TRUE);
	m_sld_Range.SetPos(0);

	m_ListLO.ResetContent();
	m_strPathName.Empty();
	m_strLightObjName.Empty();

	m_pLOColor = (COLORREF)(0x00ffffff);
	m_pSelLO = nullptr;

	UpdateData(FALSE);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CDlgLight::OnOK()
{
	return;
	//CDialog::OnOK();
}

void CDlgLight::OnBtnExport()
{
	if(m_strPathName.IsEmpty())
	{
		CFileDialog dlg(FALSE, "LightObjs", "Noname", OFN_EXPLORER | OFN_LONGNAMES | OFN_OVERWRITEPROMPT, "Light Obejct Data File(*.LightObjs)|*.LightObjs||");

		if(dlg.DoModal()==IDOK)
		{
			m_strPathName = dlg.GetPathName();
			m_pRefLightObjMgr->SaveToFile((LPCTSTR)m_strPathName);
			UpdateData(FALSE);


00000000 Cap:  3 Hit:  0 Rate:  60.84% code:     0 msg:
shell% ▌

An example that prints the number of times that a compiled regular expression was not in the cache per second:

shell% sudo dtrace -Z -q -n 'RegexKitLite*:::compiledRegexCache /arg4 == 0/ { @miss[pid, execname] = count(); }' -n 'tick-1sec { printa("%-8d %-40s %@d/sec\n", @miss); trunc(@miss); }'↵
67003    RegexKitLite_tests                       16/sec
67008    RegexKitLite_tests                       50/sec
^C

shell% ▌

See Also

RegexKitLite:::compiledRegexCache

Solaris Dynamic Tracing Guide (as .PDF)

The following is available in examples/utf16ConversionCache.d and demonstrates the use of all the arguments available via the RegexKitLite:::utf16ConversionCache probe point.

File name:utf16ConversionCache.d
#!/usr/sbin/dtrace -s

enum {
  RKLCacheHitLookupFlag           = 1 << 0,
  RKLConversionRequiredLookupFlag = 1 << 1,
  RKLSetTextLookupFlag            = 1 << 2,
  RKLDynamicBufferLookupFlag      = 1 << 3,
  RKLErrorLookupFlag              = 1 << 4
};

RegexKitLite*:::utf16ConversionCache {
  this->eventID           = (unsigned long)arg0;
  this->lookupResultFlags = (unsigned int)arg1;
  this->hitRate           = (double *)copyin(arg2, sizeof(double));
  this->stringPtr         = (void *)arg3;
  this->NSRange_location  = (unsigned long)arg4;
  this->NSRange_length    = (unsigned long)arg5;
  this->length            = (long)arg6;

  printf("%5lu: flags: %#8.8x {Hit: %d Conv: %d SetText: %d Dyn: %d Error: %d} rate: %6.2f%% string: %#8.8p NSRange {%6lu, %6lu} length: %ld\n",
	 this->eventID,
	 this->lookupResultFlags,
	 (this->lookupResultFlags & RKLCacheHitLookupFlag)           != 0,
	 (this->lookupResultFlags & RKLConversionRequiredLookupFlag) != 0,
	 (this->lookupResultFlags & RKLSetTextLookupFlag)


 the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/*
 * This file was converted from the PROJ.4 source.
 */
package org.locationtech.proj4j.proj;

import org.locationtech.proj4j.ProjCoordinate;
import org.locationtech.proj4j.ProjectionException;
import org.locationtech.proj4j.datum.Ellipsoid;
import org.locationtech.proj4j.util.ProjectionMath;

/**
* Swiss Oblique Mercator Projection algorithm is taken from the USGS PROJ.4 package.
*/
public class SwissObliqueMercatorProjection extends Projection {

  private static final int NITER = 6;

	private double  K, c, hlf_e, kR, cosp0, sinp0;
  private double phi0;

	public SwissObliqueMercatorProjection() {
		//initialize();
	}

	public void initialize() {
		super.initialize();
	  double cp, phip0, sp;

    phi0 = projectionLatitude;

	  hlf_e = 0.5 * e;
	  cp = Math.cos(phi0);
	  cp *= cp;
	  c = Math.sqrt(1 + es * cp * cp * rone_es);
	  sp = Math.sin(phi0);
	  cosp0 = Math.cos( phip0 = Math.asin(sinp0 = sp / c) );
	  sp *= e;
	  K = Math.log(Math.tan(ProjectionMath.FORTPI + 0.5 * phip0)) - c * (
	      Math.log(Math.tan(ProjectionMath.FORTPI + 0.5 * phi0)) - hlf_e *
	      Math.log((1. + sp) / (1. - sp)));
	  kR = scaleFactor * Math.sqrt(one_es) / (1. - sp * sp);
	}

	public ProjCoordinate project(double lplam, double lpphi, ProjCoordinate xy) {
	  double phip, lamp, phipp, lampp, sp, cp;

	  sp = e * Math.sin(lpphi);
	  phip = 2.* Math.atan( Math.exp( c * (
	      Math.log(Math.tan(ProjectionMath.FORTPI + 0.5 * lpphi)) - hlf_e * Math.log((1. + sp)/(1. - sp)))
	    + K)) - ProjectionMath.HALFPI;
	  lamp = c * lplam;
	  cp = Math.cos(phip);
	  phipp = Math.asin(cosp0 * Math.sin(phip) - sinp0 * cp * Math.cos(lamp));
	  lampp = Math.asin(cp * Math.sin(lamp) / Math.cos(phipp));
	  xy.x = kR * lampp;
	  xy.y = kR * Math.log(Math.tan(ProjectionMath.FORTPI + 0.5 * phipp));
	  return xy;
	}

	public ProjCoordinate projectInverse(double xyx, double xyy, ProjCoordinate lp) {
	  double phip, lamp, phipp, lampp, cp, esp, con, delp;
	  int i;
	  double lplam, lpphi;

	  phipp = 2. * (Math.atan(Math.exp(xyy / kR)) - ProjectionMath.FORTPI);
	  lampp = xyx / kR;
	  cp = Math.cos(phipp);
	  phip = Math.asin(cosp0 * Math.sin(phipp) + sinp0 * cp * Math.cos(lampp));
	  lamp = Math.asin(cp * Math.sin(lampp) / Math.cos(phip));
	  con = (K - Math.log(Math.tan(ProjectionMath.FORTPI + 0.5 * phip)))/c;
	  for (i = NITER; i != 0 ; --i) {
	    esp = e * Math.sin(phip);
	    delp = (con + Math.log(Math.tan(ProjectionMath.FORTPI + 0.5 * phip)) - hlf_e *
	        Math.log((1. + esp)/(1. - esp)) ) *


 false,
    stopCallback: noop,
    timeout: 30,
  }

  private handleError: (err: any, ctx: TContext) => void = (err) => {
    console.error()
    console.error((err.stack ?? err.toString()).replace(/^/gm, '  '))
    console.error()
    throw err
  }

  constructor(token: string, options?: Partial<Telegraf.Options<TContext>>) {
    super()
    // @ts-expect-error
    this.options = {
      ...DEFAULT_OPTIONS,
      ...compactOptions(options),
    }
    this.telegram = new Telegram(token, this.options.telegram)
  }

  get token() {
    return this.telegram.token
  }

  set webhookReply(webhookReply: boolean) {
    this.telegram.webhookReply = webhookReply
  }

  get webhookReply() {
    return this.telegram.webhookReply
  }

  catch(handler: (err: any, ctx: TContext) => void) {
    this.handleError = handler
    return this
  }

  webhookCallback(path = '/') {
    return generateCallback(
      path,
      (update: tt.Update, res: http.ServerResponse) =>
        this.handleUpdate(update, res),
      debug
    )
  }

  private startPolling(
    timeout = 30,
    limit = 100,
    allowedUpdates: tt.UpdateType[] = [],
    stopCallback = noop
  ) {
    this.polling.timeout = timeout
    this.polling.limit = limit
    this.polling.allowedUpdates = allowedUpdates
    this.polling.stopCallback = stopCallback
    if (!this.polling.started) {
      this.polling.started = true
      this.fetchUpdates()
    }
    return this
  }

  private startWebhook(
    hookPath: string,
    tlsOptions?: TlsOptions,
    port?: number,
    host?: string,
    cb?: http.RequestListener
  ) {
    const webhookCb = this.webhookCallback(hookPath)
    const callback: http.RequestListener =
      cb && typeof cb === 'function'
        ? (req, res) => webhookCb(req, res, () => cb(req, res))
        : webhookCb
    this.webhookServer = tlsOptions
      ? https.createServer(tlsOptions, callback)
      : http.createServer(callback)
    this.webhookServer.listen(port, host, () => {
      debug('Webhook listening on port: %s', port)
    })
    return this
  }

  async launch(config: Telegraf.LaunchOptions = {}) {
    debug('Connecting to Telegram')
    this.botInfo ??= await this.telegram.getMe()
    debug(`Launching @${this.botInfo.username}`)
    if (!config.webhook) {
      const { timeout, limit, allowedUpdates, stopCallback } =
        config.polling ?? {}
      await this.telegram.deleteWebhook()
      this.startPolling(timeout, limit, allowedUpdates, stopCallback)
      debug('Bot started with long-polling')
      return
    }
    if (
      typeof config.webhook.domain !== 'string' &&
      typeof config.webhook.hookPath !== 'string'
    ) {
      throw new Error('Webhook domain or webhook path is required')
    }
    let domain = config.webhook.domain ?? ''
    if (domain.startsWith('https://') || domain.startsWith('http://')) {
      domain = new URL(domain).host
    }
    const hookPath =
      config.webhook.hookPath ??
      `/telegraf/${crypto.randomBytes(32).toString('hex')}`
    const { port, host, tlsOptions, cb } = config.webhook
    this.startWebhook(hookPath, tlsOptions, port, host, cb)
    if (!domain) {
      debug('Bot started with webhook')
      return
    }
    await this.telegram.setWebhook(`https:/


sactionBounceNoFunds.deserialize(slice);
    }
    return TransactionBounceNegativeFunds();
  }
  factory TransactionBouncePhase.fromJson(Map<String, dynamic> json) {
    final type = TransactionBouncePhaseType.fromValue(json['type']);
    switch (type) {
      case TransactionBouncePhaseType.ok:
        return TransactionBounceOk.fromJson(json);
      case TransactionBouncePhaseType.noFounds:
        return TransactionBounceNoFunds.fromJson(json);
      default:
        return TransactionBounceNegativeFunds();
    }
  }
}

/// Source: https://github.com/ton-blockchain/ton/blob/24dc184a2ea67f9c47042b4104bbb4d82289fac1/crypto/block/block.tlb#L318
/// tr_phase_bounce_negfunds$00 = TrBouncePhase;
/// tr_phase_bounce_nofunds$01 msg_size:StorageUsedShort req_fwd_fees:Grams = TrBouncePhase;
/// tr_phase_bounce_ok$1 msg_size:StorageUsedShort msg_fees:Grams fwd_fees:Grams = TrBouncePhase;
class TransactionBounceNegativeFunds extends TransactionBouncePhase {
  @override
  void store(Builder builder) {
    builder.storeBitBolean(false);
    builder.storeBitBolean(false);
  }

  @override
  TransactionBouncePhaseType get type =>
      TransactionBouncePhaseType.negativeFounds;

  @override
  Map<String, dynamic> toJson() {
    return {'type': type.name};
  }
}

class TransactionBounceOk extends TransactionBouncePhase {
  final StorageUsedShort messageSize;
  final BigInt messageFees;
  final BigInt forwardFees;

  const TransactionBounceOk(
      {required this.messageSize,
      required this.messageFees,
      required this.forwardFees});
  factory TransactionBounceOk.deserialize(Slice slice) {
    return TransactionBounceOk(
        messageSize: StorageUsedShort.deserialize(slice),
        messageFees: slice.loadCoins(),
        forwardFees: slice.loadCoins());
  }
  factory TransactionBounceOk.fromJson(Map<String, dynamic> json) {
    return TransactionBounceOk(
        messageSize: StorageUsedShort.fromJson(json['message_size']),
        messageFees: BigintUtils.parse(json['message_fee']),
        forwardFees: BigintUtils.parse(json['forward_fees']));
  }
  @override
  void store(Builder builder) {
    builder.storeBitBolean(true);
    messageSize.store(builder);
    builder.storeCoins(messageFees);
    builder.storeCoins(forwardFees);
  }

  @override
  TransactionBouncePhaseType get type => TransactionBouncePhaseType.ok;

  @override
  Map<String, dynamic> toJson() {
    return {
      'type': type.name,
      'message_size': messageSize.toJson(),
      'message_fee': messageFees.toString(),
      'forward_fees': forwardFees.toString()
    };
  }
}

class TransactionBounceNoFunds extends TransactionBouncePhase {
  final StorageUsedShort messageSize;
  final BigInt requiredForwardFees;

  const TransactionBounceNoFunds(
      {required this.messageSize, required this.requiredForwardFees});
  factory TransactionBounceNoFunds.deserialize(Slice slice) {
    return TransactionBounceNoFunds(
        messageSize: StorageUsedShort.deserialize(slice),
        requiredForwardFees: slice.loadCoins());
  }
  factory TransactionBounceNoFunds.fromJson(Map<String, dynamic> json) {
    return TransactionBounceNoFunds(
        messageSize: StorageUsedShort.fromJson(json['message_size']),
        requiredForwardFees: BigintUtils.parse(json['required_forward_fees']));
  }
  @override
  void store(Builder builder) {
    builder.storeBitB


bkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
/*# sourceMappingURL=bootstrap-theme.min.css.map */body
 {
  margin-top:1em;
  margin-bottom:1em;
  margin-left:2.5em;
  margin-right:2.5em;
  font-family:sans-serif;
 }

/*
a:link
 {
  color:#00FF00;
 }

a:visited
 {
  color:#003333;
 }

a:active
 {
  color:#FF00FF;
 }
*/

p, form
 {
  font-family:sans-serif;
  font-size:12pt;
 }

/*
p
 {
  text-align:justify;
 }
*/

b, strong, i, em, cite, var, tt, code, kbd, samp, img
 {
  display:inline;
 }

ul
 {
  margin-top:1em;
  margin-bottom:1em;
  list-style-type:disc;
  display:block;
 }

li
 {
  margin-bottom:0.2em;
 }

b, strong
 {
  font-variant:small-caps;
  font-weight:bold;
 }

i, cite, em, var, address


# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -instruction-tables < %s | FileCheck %s

vfmaddpd    %xmm0, %xmm1, %xmm2, %xmm3
vfmaddpd    (%rax), %xmm1, %xmm2, %xmm3
vfmaddpd    %xmm0, (%rax), %xmm2, %xmm3

vfmaddpd    %ymm0, %ymm1, %ymm2, %ymm3
vfmaddpd    (%rax), %ymm1, %ymm2, %ymm3
vfmaddpd    %ymm0, (%rax), %ymm2, %ymm3

vfmaddps    %xmm0, %xmm1, %xmm2, %xmm3
vfmaddps    (%rax), %xmm1, %xmm2, %xmm3
vfmaddps    %xmm0, (%rax), %xmm2, %xmm3

vfmaddps    %ymm0, %ymm1, %ymm2, %ymm3
vfmaddps    (%rax), %ymm1, %ymm2, %ymm3
vfmaddps    %ymm0, (%rax), %ymm2, %ymm3

vfmaddsd    %xmm0, %xmm1, %xmm2, %xmm3
vfmaddsd    (%rax), %xmm1, %xmm2, %xmm3
vfmaddsd    %xmm0, (%rax), %xmm2, %xmm3

vfmaddss    %xmm0, %xmm1, %xmm2, %xmm3
vfmaddss    (%rax), %xmm1, %xmm2, %xmm3
vfmaddss    %xmm0, (%rax), %xmm2, %xmm3

vfmaddsubpd %xmm0, %xmm1, %xmm2, %xmm3
vfmaddsubpd (%rax), %xmm1, %xmm2, %xmm3
vfmaddsubpd %xmm0, (%rax), %xmm2, %xmm3

vfmaddsubpd %ymm0, %ymm1, %ymm2, %ymm3
vfmaddsubpd (%rax), %ymm1, %ymm2, %ymm3
vfmaddsubpd %ymm0, (%rax), %ymm2, %ymm3

vfmaddsubps %xmm0, %xmm1, %xmm2, %xmm3
vfmaddsubps (%rax), %xmm1, %xmm2, %xmm3
vfmaddsubps %xmm0, (%rax), %xmm2, %xmm3

vfmaddsubps %ymm0, %ymm1, %ymm2, %ymm3
vfmaddsubps (%rax), %ymm1, %ymm2, %ymm3
vfmaddsubps %ymm0, (%rax), %ymm2, %ymm3

vfmsubaddpd %xmm0, %xmm1, %xmm2, %xmm3
vfmsubaddpd (%rax), %xmm1, %xmm2, %xmm3
vfmsubaddpd %xmm0, (%rax), %xmm2, %xmm3

vfmsubaddpd %ymm0, %ymm1, %ymm2, %ymm3
vfmsubaddpd (%rax), %ymm1, %ymm2, %ymm3
vfmsubaddpd %ymm0, (%rax), %ymm2, %ymm3

vfmsubaddps %xmm0, %xmm1, %xmm2, %xmm3
vfmsubaddps (%rax), %xmm1, %xmm2, %xmm3
vfmsubaddps %xmm0, (%rax), %xmm2, %xmm3

vfmsubaddps %ymm0, %ymm1, %ymm2, %ymm3
vfmsubaddps (%rax), %ymm1, %ymm2,


()
        {
            // TODO
        };

        public void OnSpellPreCast(ObjAIBase owner, Spell spell, AttackableUnit target, Vector2 start, Vector2 end)
        {
            AddParticleTarget(owner, target, "Global_SS_Smite", target);
            var damage = new float[] {390, 410, 430, 450, 480, 510, 540, 570, 600, 640, 680, 420,
                760, 800, 850, 900, 950, 1000}[owner.Stats.Level - 1];
            target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_TRUE, DamageSource.DAMAGE_SOURCE_SPELL, false);
        }
    }
}


 top in each thread.
	safeRolesList := make([]*lib.Role, 0)
	for _, thread := range node.GetThreads() {
		frames := thread.Stack.RawArray()
		if len(frames) <= 1 {
			continue
		}
		topFrame := frames[len(frames)-1]
		for _, frame := range frames[0 : len(frames)-1] {
			role := frame.obj
			if role == nil || role == topFrame.obj {
				continue
			}
			safeRolesList = append(safeRolesList, role)
		}
	}
	roleMap := make(map[string]int)
	for i, role := range p.Files[0].Roles {
		roleMap[role.Name] = i
	}
	failedNode := p.crashRoles(node, slices.Clone(safeRolesList))
	if failedNode != nil {
		return failedNode
	}
	//for _, role := range node.Roles {
	//	if !slices.Contains(safeRolesList, role) {
	//		failedNode := p.crashRoles(node, role, slices.Clone(safeRolesList))
	//		if failedNode != nil {
	//			return failedNode
	//		}
	//	}
	//}
	return nil
}

func (p *Processor) crashRoles(node *Node, safeRolesList []*lib.Role) *Node {
	var failedNode *Node
	var crashNode *Node
	for _, role := range node.Roles {
		if !slices.Contains(safeRolesList, role) {
			crashNode, failedNode = p.crashRole(node, role)
			if failedNode != nil {
				return failedNode
			}
			if crashNode == nil {
				continue
			}
			failedNode = p.crashRoles(crashNode, slices.Clone(append(safeRolesList, role)))
			if failedNode != nil {
				return failedNode
			}
		}
	}
	return failedNode
}

func (p *Processor) crashRole(node *Node, role *lib.Role) (*Node, *Node) {
	if role == nil || !p.durabilitySpec.HasDurabilitySpec(role.Name) {
		return nil, nil
	}
	crashFork := node.Process.Fork()
	crashFork.Name = "crash"
	crashFork.Labels = append(crashFork.Labels, fmt.Sprintf("crash-%s", role.RefString()))
	crashNode := node.ForkForAlternatePaths(crashFork, fmt.Sprintf("crash-%s", role.RefString()))

	for i, thread := range crashNode.Threads {
		if thread == nil || thread.currentFrame().obj == nil || thread.currentFrame().obj.Name != role.Name {
			continue
		}
		crashNode.removeThread(i)
	}
	// Reset ephemeral variables
	p.ResetEphemeralVariables(crashNode, role)
	crashNode.Enable()

	failedInvariants := CheckInvariants(crashFork)
	if len(failedInvariants[0]) > 0 {
		crashNode.Process.FailedInvariants = failedInvariants
		if !p.config.ContinuePathOnInvariantFailures {
			return crashNode, crashNode
		}
	}
	if node.Process.Enabled {
		crashNode.Enable()
	}
	if other, ok := p.visited[crashNode.HashCode()]; ok {
		crashNode.Duplicate(other, true)
		return nil, nil
	}
	crashNode.Attach()
	p.visited[crashNode.HashCode()] = crashNode

	p.YieldNode(crashNode)
	return crashNode, nil
}

func (p *Processor) crashThread(node *Node) {
	crashFork := node.Process.Fork()
	crashFork.Name = "crash"
	crashFork.removeCurrentThread


implicit operator Handle(EventDefinitionHandle handle) => new Handle((byte) 20, handle._rowId);

    public static implicit operator EntityHandle(EventDefinitionHandle handle) => new EntityHandle((uint) (335544320UL | (ulong) handle._rowId));

    public static explicit operator EventDefinitionHandle(Handle handle)
    {
      if (handle.VType != (byte) 20)
        Throw.InvalidCast();
      return new EventDefinitionHandle(handle.RowId);
    }

    public static explicit operator EventDefinitionHandle(EntityHandle handle)
    {
      if (handle.VType != 335544320U)
        Throw.InvalidCast();
      return new EventDefinitionHandle(handle.RowId);
    }

    public bool IsNil => this.RowId == 0;

    internal int RowId => this._rowId;

    public static bool operator ==(EventDefinitionHandle left, EventDefinitionHandle right) => left._rowId == right._rowId;

    public override bool Equals(object? obj) => obj is EventDefinitionHandle definitionHandle && definitionHandle._rowId == this._rowId;

    public bool Equals(EventDefinitionHandle other) => this._rowId == other._rowId;

    public override int GetHashCode() => this._rowId.GetHashCode();

    public static bool operator !=(EventDefinitionHandle left, EventDefinitionHandle right) => left._rowId != right._rowId;
  }
}


za-ZV-Series-42-42ZV635-HD-1080p-Freeview-LCD-TV/Product.html" class="arrow" title="Price: £899.99 Free Delivery">Toshiba Regza ZV Series 42" 42ZV635 HD 1080p / Freeview / LCD TV

Samsung Series 5 530 32" LE32B530 / HD 1080p / Freeview LCD TV

more titles »

Secure Shopping

<a href="/HOME/HOME/6-/GiftVouch


self.x_tec9.spread = {
		standing = self.new_m4.spread.standing,
		crouching = self.new_m4.spread.crouching,
		steelsight = self.new_m4.spread.steelsight,
		moving_standing = self.new_m4.spread.moving_standing,
		moving_crouching = self.new_m4.spread.moving_crouching,
		moving_steelsight = self.new_m4.spread.moving_steelsight
	}
	self.x_tec9.kick = {
		standing = {
			0.8,
			1,
			-0.5,
			0.5
		}
	}
	self.x_tec9.kick.crouching = self.x_tec9.kick.standing
	self.x_tec9.kick.steelsight = self.x_tec9.kick.standing
	self.x_tec9.crosshair = {
		standing = {},
		crouching = {},
		steelsight = {}
	}
	self.x_tec9.crosshair.standing.offset = 0.2
	self.x_tec9.crosshair.standing.moving_offset = 0.6
	self.x_tec9.crosshair.standing.kick_offset = 0.4
	self.x_tec9.crosshair.crouching.offset = 0.1
	self.x_tec9.crosshair.crouching.moving_offset = 0.6
	self.x_tec9.crosshair.crouching.kick_offset = 0.3
	self.x_tec9.crosshair.steelsight.hidden = true
	self.x_tec9.crosshair.steelsight.offset = 0
	self.x_tec9.crosshair.steelsight.moving_offset = 0
	self.x_tec9.crosshair.steelsight.kick_offset = 0.1
	self.x_tec9.shake = {
		fire_multiplier = 1,
		fire_steelsight_multiplier = -1
	}
	self.x_tec9.autohit = weapon_data.autohit_smg_default
	self.x_tec9.aim_assist = weapon_data.aim_assist_smg_default
	self.x_tec9.weapon_hold = "x_akmsu"
	self.x_tec9.animations = {
		has_steelsight_stance = true,
		recoil_steelsight = true
	}
	self.x_tec9.panic_suppression_chance = 0.2
	self.x_tec9.stats = {
		zoom = 3,
		total_ammo_mod = 21,
		damage = 44,
		alert_size = 7,
		spread = 8,
		spread_moving = 8,
		recoil = 20,
		value = 7,
		extra_ammo = 51,
		reload = 11,
		suppression = 12,
		concealment = 27
	}
end

function WeaponTweakData:_init_x_uzi(weapon_data)
	self.x_uzi = {
		categories = {
			"akimbo",
			"smg"
		},
		allow_akimbo_autofire = true,
		damage_melee = weapon_data.damage_melee_default,
		damage_melee_effect_mul = weapon_data.damage_melee_effect_multiplier_default,
		sounds = {}
	}
	self.x_uzi.sounds.fire = "uzi_x_fire"
	self.x_uzi.sounds.fire_single = "uzi_x_fire_single"
	self.x_uzi.sounds.fire_auto = "uzi_x_fire"
	self.x_uzi.sounds.stop_fire = "uzi_x_stop"


https://heroicons.com)
 * License: https://github.com/tailwindlabs/heroicons/blob/master/LICENSE
 */
object HeroIcons {
    val academic_cap = """
		<path d="M12 14L21 9L12 4L3 9L12 14Z"/>
		<path d="M12 14L18.1591 10.5783C18.7017 11.9466 19 13.4384 19 14.9999C19 15.7013 18.9398 16.3885 18.8244 17.0569C16.2143 17.3106 13.849 18.4006 12 20.0555C10.151 18.4006 7.78571 17.3106 5.17562 17.0569C5.06017 16.3885 5 15.7012 5 14.9999C5 13.4384 5.29824 11.9466 5.84088 10.5782L12 14Z"/>
		<path d="M12 14L21 9L12 4L3 9L12 14ZM12 14L18.1591 10.5783C18.7017 11.9466 19 13.4384 19 14.9999C19 15.7013 18.9398 16.3885 18.8244 17.0569C16.2143 17.3106 13.849 18.4006 12 20.0555C10.151 18.4006 7.78571 17.3106 5.17562 17.0569C5.06017 16.3885 5 15.7012 5 14.9999C5 13.4384 5.29824 11.9466 5.84088 10.5782L12 14ZM8 19.9999V12.5L12 10.2778" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
	""".trimIndent()

    val adjustments = """
		<path d="M12 6V4M12 6C10.8954 6 10 6.89543 10 8C10 9.10457 10.8954 10 12 10M12 6C13.1046 6 14 6.89543 14 8C14 9.10457 13.1046 10 12 10M6 18C7.10457 18 8 17.1046 8 16C8 14.8954 7.10457 14 6 14M6 18C4.89543 18 4 17.1046 4 16C4 14.8954 4.89543 14 6 14M6 18V20M6 14V4M12 10V20M18 18C19.1046 18 20 17.1046 20 16C20 14.8954 19.1046 14 18 14M18 18C16.8954 18 16 17.1046 16 16C16 14.8954 16.8954 14 18 14M18 18V20M18 14V4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
	""".trimIndent()

    val `annotation` = """
		<path d="M7 8H17M7 12H11M12 20L8 16H5C3.89543 16 3 15.1046 3 14V6C3 4.89543 3.89543 4 5 4H19C20.1046 4 21 4.89543 21 6V14C21 15.1046 20.1046 16 19 16H16L12 20Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
	""".trimIndent()

    val archive = """
		<path d="M5 8H19M5 8C3.89543 8 3 7.10457 3 6C3 4.89543 3.89543 4 5 4H19C20.1046 4 21 4.89543 21 6C21 7.10457 20.1046 8 19 8M5 8L5 18C5 19.1046 5.89543 20 7 20H17C18.1046 20 19 19.1046 19 18V8M10 12H14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
	""".trimIndent()

    val arrow_circle_down = """
		<path d="M15 13L12 16M12 16L9 13M12 16L12 8M12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21Z" stroke="currentColor" stroke-width="2" stroke-linecap="rou


n be exposed
/// to the outside world, with the consideration as to how that can
/// be done securely up to the implementor.
///
/// Methods in both APIs are intended to be 'single use', that is to say each
/// method will 'open' the wallet (load the keychain with its master seed), perform
/// its operation, then 'close' the wallet (unloading references to the keychain and master
/// seed).

pub struct Foreign<'a, L, C, K>
where
	L: WalletLCProvider<'a, C, K>,
	C: NodeClient + 'a,
	K: Keychain + 'a,
{
	/// Wallet instance
	pub wallet_inst: Arc<Mutex<Box<dyn WalletInst<'a, L, C, K>>>>,
	/// Flag to normalize some output during testing. Can mostly be ignored.
	pub doctest_mode: bool,
	/// foreign check middleware
	middleware: Option<ForeignCheckMiddleware>,
	/// Stored keychain mask (in case the stored wallet seed is tokenized)
	keychain_mask: Option<SecretKey>,
	/// Optional TOR configuration, holding address of sender and
	/// data directory
	tor_config: Mutex<Option<TorConfig>>,
}

impl<'a, L, C, K> Foreign<'a, L, C, K>
where
	L: WalletLCProvider<'a, C, K>,
	C: NodeClient + 'a,
	K: Keychain + 'a,
{
	/// Create a new API instance with the given wallet instance. All subsequent
	/// API calls will operate on this instance of the wallet.
	///
	/// Each method will call the [`WalletBackend`](../grin_wallet_libwallet/types/trait.WalletBackend.html)'s
	/// [`open_with_credentials`](../grin_wallet_libwallet/types/trait.WalletBackend.html#tymethod.open_with_credentials)
	/// (initialising a keychain with the master seed), perform its operation, then close the keychain
	/// with a call to [`close`](../grin_wallet_libwallet/types/trait.WalletBackend.html#tymethod.close)
	///
	/// # Arguments
	/// * `wallet_in` - A reference-counted mutex containing an implementation of the
	/// [`WalletBackend`](../grin_wallet_libwallet/types/trait.WalletBackend.html) trait.
	/// * `keychain_mask` - Mask value stored internally to use when calling a wallet
	/// whose seed has been XORed with a token value (such as when running the foreign
	/// and owner listeners in the same instance)
	/// * middleware - Option middleware which containts the NodeVersionInfo and can call
	/// a predefined function with the slate to check if the operation should continue
	///
	/// # Returns
	/// * An instance of the ForeignApi holding a reference to the provided wallet
	///
	/// # Example
	/// ```
	/// use grin_wallet_util::grin_keychain as keychain;
	/// use grin_wallet_util::grin_util as util;
	/// use grin_wallet_util::grin_core;
	/// use grin_wallet_api as api;
	/// use grin_wallet_config as config;
	/// use grin_wallet_impls as impls;
	/// use grin_wallet_libwallet as libwallet;
	///
	/// use keychain::ExtKeychain;
	/// use tempfile::tempdir;
	///
	/// use std::sync::Arc;
	/// use util::{Mutex, ZeroingString};
	///
	/// use grin_core::global;
	///
	/// use api::Foreign;
	/// use config::WalletConfig;
	/// use impls::{DefaultWalletImpl, DefaultLCProvider, HTTPNodeClient};
	/// use libwallet::WalletInst;
	///
	/// global::set_local_chain_type(global::ChainTypes::AutomatedTesting);
	///
	/// let mut wallet_config = WalletConfig::default();
	/// # let dir = tempdir().map_err(|e| format!("{:#?}", e)).unwrap();
	/// # let dir = dir
	/// #   .path()
	/// #


import os
import requests
import json
import pandas as pd

def get_data(county_series_ids, df):
    url = 'https://api.bls.gov/publicAPI/v2/timeseries/data/'
    registration_key = os.getenv('BLS_API_KEY')
    with open('state_abbreviations.json', 'r') as file:
        state_abbreviations = json.load(file)

    payload = {
        "seriesid": county_series_ids,
        "startyear": "2025",
        "endyear": "2025",
        "annualaverage": True,
        "catalog": True,
        "registrationkey": registration_key
    }

    json_payload = json.dumps(payload)
    headers = {'Content-Type': 'application/json'}

    response = requests.post(url, data=json_payload, headers=headers)
    json_data = json.loads(response.text)
    data_list = []

    if 'Results' in json_data and 'series' in json_data['Results']:
        for series in json_data['Results']['series']:
            series_id = series['seriesID']

            # Extract geoid from series_id
            geoid = str(int(series_id[-15:-10]))

            if 'catalog' in series:
                city_name_with_state = series['catalog']['series_title'].replace("Unemployment Rate: ", "").replace(" (U)","")
                county_name, state_abbrev = map(str, city_name_with_state.split(', '))
                state_name = state_abbreviations.get(state_abbrev, state_abbrev)
                city_name = f"{county_name}, {state_name}"

            for data_point in series['data']:
                year = data_point['year']
                month = data_point['periodName']
                value = data_point['value']
                data_list.append([geoid, series_id, city_name, year, month, value])

    df_chunk = pd.DataFrame(data_list, columns=["GeoID", "Series ID", "Place", "Year", "Month", "Unemployment Rate"])
    df = pd.concat([df, df_chunk], ignore_index=True)
    return df

full_df = pd.DataFrame(columns=["GeoID", "Series ID", "Place", "Year", "Month", "Unemployment Rate"])

with open('series_ids_county_master.json', 'r') as file:
    series_ids_data = json.load(file)

all_series_ids = series_ids_data.get('series_ids', [])
chunk_size = 50

for i in range(0, len(all_series_ids), chunk_size):
#for i in range(0, 100, chunk_size):
    county_series_ids = all_series_ids[i:i + chunk_size]

    print(f'Fetching data from {i} to {i+chunk_size} ids')
    full_df = get_data(county_series_ids, full_df)

    print('-' * 50)

csv_file_path = '/app/output/countyUnemployment.csv'
full_df.to_csv(csv_file_path, index=False)
print(f"Data saved to {csv_file_path}")


Cellipse cx='12' cy='5' rx='4' ry='4'%3E%3Canimate attributeName='cy' values='5;20;20.5;20;5' keyTimes='0;0.469;0.5;0.531;1' dur='.8s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1'/%3E%3Canimate attributeName='rx' values='4;4;4.8;4;4' keyTimes='0;0.469;0.5;0.531;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='ry' values='4;4;3;4;4' keyTimes='0;0.469;0.5;0.531;1' dur='.8s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3C/svg%3E")}.loading-bars{mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='1' width='6' height='22'%3E%3Canimate attributeName='y' values='1;5;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='height' values='22;14;22' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='1;0.2;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='9' y='1' width='6' height='22'%3E%3Canimate attributeName='y' values='1;5;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.65s'/%3E%3Canimate attributeName='height' values='22;14;22' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.65s'/%3E%3Canimate attributeName='opacity' values='1;0.2;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.65s'/%3E%3C/rect%3E%3Crect x='17' y='1' width='6' height='22'%3E%3Canimate attributeName='y' values='1;5;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.5s'/%3E%3Canimate attributeName='height' values='22;14;22' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.5s'/%3E%3Canimate attributeName='opacity' values='1;0.2;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.5s'/%3E%3C/rect%3E%3C/svg%3E")}.loading-infinity{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' style='shape-rendering:auto;' width='200px' height='200px' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid'%3E%3Cpath fill='none' stroke='black' stroke-width='10' stroke-dasharray='205.271 51.318' d='M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z' stroke-linecap='round' style='transform:scale(0.8);transform-origin:50px 50px'%3E%3Canimate attributeName='stroke-dashoffset' repeatCount='indefinite' dur='2s' keyTimes='


AddCSLuaFile()

SWEP.PrintName = "'Blareduct' Zip Gun"
SWEP.Slot = 3
SWEP.SlotPos = 0

if CLIENT then
	SWEP.HUD3DBone = "ValveBiped.Gun"
	SWEP.HUD3DPos = Vector(1.65, 0, -8)
	SWEP.HUD3DScale = 0.025

	SWEP.ViewModelFlip = false

	SWEP.VElements = {
		["pipe++"] = { type = "Model", model = "models/props_vehicles/carparts_axel01a.mdl", bone = "ValveBiped.Gun", rel = "pipe", pos = Vector(0.699, 0, 0), angle = Angle(0, 0, 90), size = Vector(0.15, 0.4, 0.2), color = Color(105, 115, 130, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} },
		["pipe+"] = { type = "Model", model = "models/props_vehicles/carparts_muffler01a.mdl", bone = "ValveBiped.Gun", rel = "pipe", pos = Vector(1, -0.201, -15), angle = Angle(90, -90, 0), size = Vector(0.2, 0.3, 0.25), color = Color(105, 115, 130, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} },
		["pipe+++"] = { type = "Model", model = "models/props_vehicles/carparts_axel01a.mdl", bone = "ValveBiped.Gun", rel = "pipe", pos = Vector(0, 0, -10), angle = Angle(0, 0, 90), size = Vector(0.25, 0.3, 0.15), color = Color(77, 77, 82, 255), surpresslightning = false, material = "models/props_lab/ravendoor_sheet", skin = 0, bodygroup = {} },
		["pipe"] = { type = "Model", model = "models/props_canal/mattpipe.mdl", bone = "ValveBiped.Gun", rel = "", pos = Vector(0, 0.5, 7), angle = Angle(0, -90, 0), size = Vector(1, 1, 0.899), color = Color(65, 69, 84, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} }
	}

	SWEP.WElements = {
		["pipe++"] = { type = "Model", model = "models/props_vehicles/carparts_axel01a.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "pipe", pos = Vector(0.699, 0, 0), angle = Angle(0, 0, 90), size = Vector(0.15, 0.4, 0.2), color = Color(105, 115, 130, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} },
		["pipe+"] = { type = "Model", model = "models/props_vehicles/carparts_muffler01a.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "pipe", pos = Vector(1, -0.201, -15), angle = Angle(90, -90, 0), size = Vector(0.2, 0.3, 0.25), color = Color(105, 115, 130, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} },
		["pipe+++"] = { type = "Model", model = "models/props_vehicles/


/=============================================================================//
#include "hlfaceposer.h"
#include "StudioModel.h"
#include "faceposer_models.h"
#include "filesystem.h"
#include "ifaceposerworkspace.h"
#include <mxtk/mx.h>
#include "mdlviewer.h"
#include "mxexpressiontray.h"
#include "ControlPanel.h"
#include "checksum_crc.h"
#include "ViewerSettings.h"
#include "matsyswin.h"
#include "KeyValues.h"
#include "utlbuffer.h"
#include "expression.h"
#include "ProgressDialog.h"
#include "tier1/UtlString.h"
#include "tier1/FmtStr.h"
#include "tier1/KeyValues.h"

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

void SetupModelFlexcontrollerLinks( StudioModel *model );

IFaceposerModels::CFacePoserModel::CFacePoserModel( char const *modelfile, StudioModel *model )
{
	m_pModel = model;
	m_szActorName[ 0 ] = 0;
	m_szShortName[ 0 ] = 0;
	strcpy( m_szModelFileName, modelfile );
	Q_FixSlashes( m_szModelFileName );

	CStudioHdr *hdr = model->GetStudioHdr();
	if ( hdr )
	{
		Q_StripExtension( hdr->pszName(), m_szShortName, sizeof( m_szShortName ) );
	}

	m_bVisibileIn3DView = false;
	m_bFirstBitmapLoad = true;

	LoadBitmaps();
}

IFaceposerModels::CFacePoserModel::~CFacePoserModel()
{
	FreeBitmaps();
}

void IFaceposerModels::CFacePoserModel::LoadBitmaps()
{
	CStudioHdr *hdr = m_pModel ? m_pModel->GetStudioHdr() : NULL;
	if ( hdr )
	{
		for ( int i = 0 ;i < hdr->GetNumSeq(); i++ )
		{
			mxbitmapdata_t *bm = new mxbitmapdata_t();

			AnimBitmap *entry = new AnimBitmap();
			entry->needsload = true;
			entry->bitmap = bm;

			// Need to load bitmap from disk image via crc, etc.
			//Assert( 0 );

			m_AnimationBitmaps.AddToTail( entry );
		}
	}
}

CRC32_t IFaceposerModels::CFacePoserModel::GetBitmapCRC( int sequence )
{
	CStudioHdr *hdr = m_pModel ? m_pModel->GetStudioHdr() : NULL;
	if ( !hdr )
		return (CRC32_t)-1;

	if ( sequence < 0 || sequence >= hdr->GetNumSeq() )
		return (CRC32_t)-1;

	mstudioseqdesc_t &seqdesc = hdr->pSeqdesc( sequence );

	CRC32_t crc;
	CRC32_Init( &crc );

	// For sequences, we'll checsum a bit of data

	CRC32_ProcessBuffer( &crc, (void *)seqdesc.pszLabel(), Q_strlen( seqdesc.pszLabel() ) );
	CRC32_ProcessBuffer( &crc, (void *)seqdesc.pszActivityName(), Q_strlen( seqdesc.pszActivityName() ) );
	CRC32_ProcessBuffer( &crc, (void *)&seqdesc.flags, sizeof( seqdesc.flags ) );
	//CRC32_ProcessBuffer( &crc, (void *)&seqdesc.numevents, sizeof( seqdesc.numevents ) );
	CRC32_ProcessBuffer( &crc, (void *)&seqdesc.numblends, sizeof( seqdesc.numblends ) );
	CRC32_ProcessBuffer( &crc, (void *)seqdesc.groupsize, sizeof( seqdesc.groupsize ) );

	KeyValues *seqKeyValues = new KeyValues("");
	if ( seqKeyValues->LoadFromBuffer( m_pModel->GetFileName( ), m_pModel->GetKeyValueText( sequence ) ) )
	{
		// Yuck, but I need it in a contiguous block of memory... oh well...
		CUtlBuffer buf;
		seqKeyValues->RecursiveSaveToFile( buf, 0 );
		CRC32_ProcessBuffer( &crc, ( void * )buf.Base(), buf.TellPut() );
	}

	seqKeyValues->deleteThis();

	CRC32_Final( &crc );

	return crc;
}

const char *IFaceposerModels::CF


rgumentos de las RequestOptions,
	     * esta incluye los Headers, parametros
	     * Puede recibir desde la llamada o se puede implementar
	     * para que todas las llamadas en general, o de cada uno de los tipos de Requests, tengan los mismos headers.
	     * @param options
	     * @returns {RequestOptionsArgs}
	     */
	    protected abstract requestOptions(options?: RequestOptionsArgs): RequestOptionsArgs;
	    protected requestOptionsGET(options?: RequestOptionsArgs): RequestOptionsArgs;
	    protected requestOptionsPOST(options?: RequestOptionsArgs): RequestOptionsArgs;
	    protected requestOptionsPUT(options?: RequestOptionsArgs): RequestOptionsArgs;
	    protected requestOptionsDELETE(options?: RequestOptionsArgs): RequestOptionsArgs;
	    /**
	     * Intercepta la llamada, muestra preloader
	     */
	    protected abstract requestInterceptor(): void;
	    protected requestInterceptorGET(): void;
	    protected requestInterceptorPOST(): void;
	    protected requestInterceptorPUT(): void;
	    protected requestInterceptorDELETE(): void;

	}

}
import { expect } from 'chai';
import { hot, cold, expectObservable, expectSubscriptions } from '../helpers/marble-testing';
import { scan, mergeMap, finalize, reduce } from 'rxjs/operators';
import { of, Observable } from 'rxjs';

declare const type: Function;
declare const asDiagram: Function;

/** @test {scan} */
describe('scan operator', () => {
  asDiagram('scan((acc, curr) => acc + curr, 0)')('should scan', () => {
    const values = {
      a: 1, b: 3, c: 5,
      x: 1, y: 4, z: 9
    };
    const e1 =     hot('--a--b--c--|', values);
    const e1subs =     '^          !';
    const expected =   '--x--y--z--|';

    const scanFunction = function (o: number, x: number) {
      return o + x;
    };

    expectObservable(e1.pipe(scan(scanFunction, 0))).toBe(expected, values);
    expectSubscriptions(e1.subscriptions).toBe(e1subs);
  });

  it('should scan things', () => {
    const e1 = hot('--a--^--b--c--d--e--f--g--|');
    const e1subs =      '^                    !';
    const expected =    '---u--v--w--x--y--z--|';

    const values = {
      u: ['b'],
      v: ['b', 'c'],
      w: ['b', 'c', 'd'],
      x: ['b', 'c', 'd', 'e'],
      y: ['b', 'c', 'd', 'e', 'f'],
      z: ['b', 'c', 'd', 'e', 'f', 'g']
    };

    const source = e1.pipe(scan((acc: any, x: string) => [].concat(acc, x), []));

    expectObservable(source).toBe(expected, values);
    expectSubscriptions(e1.subscriptions).toBe(e1subs);
  });

  it('should scan with a seed of undefined', () => {
    const e1 = hot('--a--^--b--c--d--e--f--g--|');
    const e1subs =      '^                    !';
    const expected =    '---u--v--w--x--y--z--|';

    const values = {
      u: 'undefined b',
      v: 'undefined b c',
      w: 'undefined b c d',
      x: 'undefined b c d e',
      y: 'undefined b c d e f',
      z: 'undefined b c d e f g'
    };

    const source = e1.pipe(scan((acc: any, x: string) => acc + ' ' + x, undefined));

    expectObservable(source).toBe(expected, values);
    expectSubscriptions(e1.subscriptions).toBe(e1subs);
  });

  it('should scan without seed', () => {
    const e1 = hot('--a--^--b--c--d--|');
    const e1subs =      '^           !';
    const expected =    '---x--y--z--|';

    const values = {
      x: 'b',
      y: 'bc',
      z: 'bcd'
    };


r('12')));
        });

    });
    describe('bin: base 0, 2 or > 11; oct: base 0, 8 or > 24; hex: base 0, 16 or > 33; ', () => {
        test("int('0711', 8)", () => expect(int('711', 8)).toEqual(457));
        // 11 == b (base must be higher)
        test("int('0b11', 11) ValueError", () => expect(() => int('0b11', 11)).toThrow(valerr('0b11', 11)));
        test("int('0b11', 12)", () => expect(int('0b11', 12)).toEqual(1597));
        test("int('0b19', 12)", () => expect(int('0b19', 12)).toEqual(1605));

        // octal == 8
        test("int('0o11', 8)", () => expect(int('0o11', 8)).toEqual(9));
        // 24 == o (base must be higher)
        test("int('0o11', 24) ValueError", () => expect(() => int('0o11', 24)).toThrow(valerr('0o11', 24)));
        test("int('0o11', 25)", () => expect(int('0o11', 25)).toEqual(15026));
        test("int('0o19', 25)", () => expect(int('0o19', 25)).toEqual(15034));

        // hex == 16
        test("int('0x11', 16)", () => expect(int('0x11', 16)).toEqual(17));
        // 33 == x (base must be higher)
        test("int('0x11', 33) ValueError", () => expect(() => int('0x11', 33)).toThrow(valerr('0x11', 33)));
        test("int('0x11', 34)", () => expect(int('0x11', 34)).toEqual(38183));
        test("int('0c11', 13)", () => expect(int('0c11', 13)).toEqual(2042));
        test("int('0d11', 14)", () => expect(int('0d11', 14)).toEqual(2563));
        let base = chance.integer({min: 2, max: 36});
        test(`int('11', ${base})`, () => expect(int('11', base)).toEqual(parseInt('11', base)));
    });
    describe('binary numbers', () => {
        test('int(0b11)', () => expect(int(0b11)).toEqual(3));
        test('int(0b11, 0), TypeError', () => expect(() => int(0b11, 0)).toThrow(new TypeError(`int() can't convert non-string with explicit base`)));
        test('int(0b11, 1), ValueError', () => expect(() => int(0b11, 1)).toThrow(new ValueError("int() base must be >= 2 and <= 36, or 0")));

        for (let i = 2; i <= 36; i++)
            test(`int(0b11, ${i}) TypeError`, () => expect(() => int(0b11, i)).toThrow(new TypeError(`int() can't convert non-string with explicit base`)));

        //int('07111101', 0) throws, int('0b11', 0) doesn't. int('0c111101', 0) throws, int('7111101', 0) doesn't.
        test("int('0b11', 0)", () => expect(int('0b11', 0)).toEqual(3));
        test("int('0b11', 1) ValueError", () => expect(() => int('0b11', 1)).toThrow(new ValueError("int() base must be >= 2 and <= 36, or 0")));
        test("int('  0b11', 1) ValueError", () => expect(() => int('  0b11', 1)).toThrow(new ValueError("int() base must be >= 2 and <= 36, or 0")));
        test("int('0b11', 2)", () => expect(int('0b11', 2)).toEqual(3));
        test("int('  0b11', 2)", () => expect(int('  0b11', 2)).toEqual(3));


((string: string) => {
  return string.charAt(0).toUpperCase() + string.slice(1);
});

const titleMaxLength = 40;

export const getCardTitle = (title?: string) => {
  if (!title) return "Unknown";
  return title.length > titleMaxLength
    ? title.substr(0, titleMaxLength) + "..."
    : title;
};

export const addSpacesToString = (str : string) => str.replace(/([A-Z])/g, ' $1').trim()
import * as Lib from './lib';
import { Button } from './button';
import { Board } from './board';
import { Sound } from './sound';

(function() {
  const processSound = new Sound('media/Reel_Spin.mp3');
  const stopSound = new Sound('media/Landing_1.mp3');

  const main = document.querySelector('.place');
  const refreshBtn = document.querySelector('#refresh');
  const but = new Button('button');
  const board = new Board(5, 4, main);

  refreshBtn.addEventListener('click', () => {
    board.refresh();
  });

  but.clickHandler = () => {
    but.setDisable();
    refreshBtn.setAttribute('disabled', 'disabled');
    (refreshBtn as HTMLButtonElement).style.cursor = 'not-allowed';
    processSound.play();

    const count = Lib.randomInt(5, 20);
    console.info(`Кол-во символов прокрутки: ${count}`);

    board.run(count)
      .then(res => {
        processSound.stop();
        setTimeout(() => {
          stopSound.play();
          but.removeDisable();
          refreshBtn.removeAttribute('disabled');
          (refreshBtn as HTMLButtonElement).style.cursor = 'pointer';
        }, 50);
      });
  };

})();export class LocationApi {
  public street: string;
  public postalCode: number;
  public city: string;
  public country: string;
  public geoCoordinate: GeoCoordinateApi;
}

export class GeoCoordinateApi {
  public latitude: number = 0;
  public longitude: number = 0;
}
import { splitIntoFibonacci } from '../src/842.split-array-into-fibonacci-sequence';

describe( 'Split Array into Fibonacci Sequence', () => {

  it( '123456579', () => {
    const num = '123456579';
    expect( splitIntoFibonacci( num ) ).toStrictEqual( [123,456,579] );
  } );

  it( '11235813', () => {
    const num = '11235813';
    expect( splitIntoFibonacci( num ) ).toStrictEqual( [1,1,2,3,5,8,13] );
  } );

  it( '112358130', () => {
    const num = '112358130';
    expect( splitIntoFibonacci( num ) ).toStrictEqual( [] );
  } );

  it( '0123', () => {
    const num = '0123';
    expect( splitIntoFibonacci( num ) ).toStrictEqual( [] );
  } );

  it( '1101111', () => {
    const num = '1101111';
    expect( splitIntoFibonacci( num ) ).toStrictEqual( [11,0,11,11] );
  } );

} );

import { getRepository, Repository } from "typeorm";

import { IPostRepository } from "@modules/Posts/repositories/IPostRepository";
import { Post } from "../entities/Post";
import { ICreatePostDTO } from "@modules/Posts/dtos/ICreatePostDTO";
import { IListPostDTO } from "@modules/Posts/dtos/IListPostDTO";

class PostRepository implements IPostRepository {
  private ormRepository: Repository<Post>;

  constructor() {
    this.ormRepository = getRepository(Post);
  }

  public async list(): Promise<IListPostDTO[]> {
    const posts: IListPostDTO[] = [];

    const postsQuerry = await this.ormRepository
      .createQueryBuilder("posts")
      .innerJoinAndSelect("posts.user", "users")
      .orderBy("posts.created_at", "DESC")
      .getMany();

    for await (let i of postsQuerry) {


File).c_str(), "r");
		if (bamFile == nullptr) {
			std::cerr << "Error: Failed to open file: " <<P2In->InFile <<endl;
			return 1;
		}
		hts_set_opt(bamFile, HTS_OPT_NTHREADS, P2In->n_thread);
		hts_set_log_level(HTS_LOG_OFF);

		bam_hdr_t *bamHeader = sam_hdr_read(bamFile);
		bam1_t *bamRecord = bam_init1();

        while (sam_read1(bamFile, bamHeader, bamRecord) >= 0) {
			string name = bam_get_qname(bamRecord);
			uint8_t *seqChar = bam_get_seq(bamRecord);
			uint8_t *qualChar = bam_get_qual(bamRecord);
			int seqLen = bamRecord->core.l_qseq;

			if (seqNames.find(name) != seqNames.end()) {
				string seq;
				string qual;

				for (int i = 0; i < seqLen; ++i) {
					char b = Base[bam_seqi(seqChar, i)];
					char q = qualChar[i] + 33;
					seq += b;
					qual += q;
				}

				input_queue.enqueue(std::make_tuple(name, seq, qual));
				inQueueSize++;
				readNum++;
				if (inQueueSize >= 2 * worker_count){
					this_thread::sleep_for(chrono::milliseconds(1));
				}
			}
		}
        read_done = true;
        bam_destroy1(bamRecord);
        bam_hdr_destroy(bamHeader);
        hts_close(bamFile);
        return 0;
    }

    //
    void filter_sequence(int tid) {
        while (!(read_done && inQueueSize == 0 && readNum == filterNum)) {
			string downName;
            string downSeq;
            string downQual;
            int downQualLen=0;
			int downSeqLen = 0;

			std::tuple<std::string, std::string, std::string> info;
			if (input_queue.try_dequeue(info)) {
				inQueueSize--;
				outNum++;
				downName = std::get<0>(info);
				downSeq = std::get<1>(info);
				downQual = std::get<2>(info);
				downSeqLen = downSeq.length();
				downQualLen = downQual.length();
			} else {
				this_thread::sleep_for(chrono::milliseconds(1));
			}

			if (downSeqLen > 0){
				if (downQualLen > 0){
					double downQuality;
                    downQuality=CalcAvgQuality(downSeq, downQual, downBaseQual[tid], downBaseCounts[tid]);
					downDiffQualReadsBases[tid][int(downQuality)]+=downSeqLen;
					Get_5p_base_qual(P2In, downSeq, downQual, down5pBaseQual[tid], down5pBaseCounts[tid]);
					Get_3p_base_qual(P2In, downSeq, downQual, down3pBaseQual[tid], down3pBaseCounts[tid]);
                }else{
                    Get_base_counts(downSeq, downBaseCounts[tid]);
					Get_5p_base_counts(P2In, downSeq, down5pBaseCounts[tid]);
					Get_3p_base_counts(P2In, downSeq, down3pBaseCounts[tid]);
                }

				string downOut;
				if ((P2In->Outfq)==1){
					downOut = "@" + downName +"\n" + downSeq + "\n+\n" + downQual + "\n";
					if (P2In->OUTGZ){
						uint8_t *ComData;
						size_t ComSize;
						DeflateCompress GZData;
						if (GZData.compressData(downOut.c_str(), ComData, ComSize)) {
							outputGz_queue.enqueue({ComData, ComSize});
							outQueueSize++;
						} else {
							free(ComData);
						}
					} else


7),0.2);--subtle-shadow:0 6px 20px 2px hsla(var(--b7),0.2);--noise:url(https://katelyynn.github.io/bleh/fm/noise.png);--gloss-image:url(https://katelyynn.github.io/bleh/fm/gloss.svg);--gloss:0;--interactable-inset:inset hsl(var(--b3)) 0 -1px 0;--interactable-outer:0 2px 4px hsla(var(--b7),0.15);--interactable-active-outer:hsla(var(--c1),0.03) 0 2px 25px 0;--interact-shadow:var(--interactable-outer);--active-shadow:var(--interactable-outer),var(--interactable-active-outer);--chartlist-fill:var(--hue-gradient,hsl(var(--h3)));--button-list-gap:6px;--chartlist-inner-gap:8px;--item-list-gap:10px;--cover-size-20:14px;--cover-size-32:20px;--cover-size-50:24px;--cover-size-100:40px;--cover-size-200:72px;--cover-size-300:96px;@media (max-width:600px){--card-padding:15px;--cards-width:100vw;--cards-main-width:100vw;--cards-sidebar-width:100vw;--card-shadow:unset}--blur-saturate:180%;--blur-brightness:0.6;--blur-contrast:1;--modal-bg:hsl(var(--b6),0.6);--view-buttons:hsl(var(--b6),70%);--view-buttons-shadow:var(--group-shadow);--view-buttons-hov:hsl(var(--b4),40%);--view-buttons-atv:hsl(var(--b4),60%);--menu-bg:var(--b6);--shout-actions-opacity:0.45;--rain:0,0%,100%;--solarium:var(--card-blur) url(#solarium);&[data-bleh--theme_type=light],[data-bleh--theme_type=light]>&{--card-shadow:hsla(var(--b7),0.05) 0 2px 4px 0;--card-shadow:0 1.5px 4px 0 hsla(var(--b7),0.05);--card-border:inset 0 0 0 1px hsla(var(--b4),0.7)!important;--menu-shadow:2px 2px 24px 0 hsla(var(--b7),0.15),3px 6px 48px 16px hsla(var(--b7),0.03);--overlay-shadow:2px 2px 24px 0 hsla(var(--b7),0.15),3px 6px 48px 16px hsla(var(--b7),0.03);--menu-shadow:0 12px 36px 0 hsla(var(--b7),0.15);--standout-shadow:3px 6px 20px 7px hsla(var(--b7),0.06);--subtle-shadow:0 5px 12px 4px hsla(var(--b7),0.08);--interactable-outer:0 2px 3px hsl(var(--b7),10%);--interactable-active-outer:transparent 0 0 0;color-scheme:l


P"), comma_separated_sequence),
        pair(tag("Sq"), comma_separated_sequence),
        pair(tag("M"), space_separated_sequence),
    ))(i)
    {
        let result = match elt {
            ("P", x) | ("Sq", x) | ("M", x) => AlgebraBasisElt::PList(x),
            _ => unreachable!(),
        };
        return Ok((rest, AlgebraParseNode::BasisElt(result)));
    }
    let (rest, elt) = pair(tag("A"), space_separated_bockstein_or_sq_sequence)(i)?;
    {
        let result = match elt {
            ("A", x) => AlgebraBasisElt::AList(x),
            _ => unreachable!(),
        };
        Ok((rest, AlgebraParseNode::BasisElt(result)))
    }
}

fn scalar(i: &str) -> IResult<&str, AlgebraParseNode> {
    let (rest, c) = pair(opt(alt((char('-'), char('+')))), digits)(i)?;
    let result: i32 = match c {
        (Some('+'), coeff) | (None, coeff) => coeff,
        (Some('-'), coeff) => -coeff,
        _ => unreachable!(),
    };
    Ok((rest, AlgebraParseNode::Scalar(result)))
}

fn algebra_parens(i: &str) -> IResult<&str, AlgebraParseNode> {
    delimited(space, delimited(tag("("), algebra_expr, tag(")")), space)(i)
}

fn algebra_factor(i: &str) -> IResult<&str, AlgebraParseNode> {
    alt((
        delimited(space, algebra_generator, space),
        scalar,
        algebra_parens,
    ))(i)
}

// We read an initial factor and for each time we find
// a * or / operator followed by another factor, we do
// the math by folding everything
fn algebra_term(i: &str) -> IResult<&str, AlgebraParseNode> {
    let (i, init) = pair(opt(alt((char('+'), char('-')))), algebra_factor)(i)?;
    let first_factor = || match &init {
        (Some('+'), fact) | (None, fact) => fact.clone(),
        (Some('-'), fact) => AlgebraParseNode::Product(
            Box::new(AlgebraParseNode::Scalar(-1)),
            Box::new(fact.clone()),
        ),
        _ => unreachable!(),
    };
    // This is necessary for lifetime reasons.
    #[allow(clippy::let_and_return)]
    let result = fold_many0(
        pair(alt((char('*'), char(' '))), algebra_factor),
        first_factor,
        |acc, (_op, val): (char, AlgebraParseNode)| {
            AlgebraParseNode::Product(Box::new(acc), Box::new(val))
        },
    )(i);
    result
}

fn algebra_expr(i: &str) -> IResult<&str, AlgebraParseNode> {
    let (i, init) = algebra_term(i)?;

    // This is necessary for lifetime reasons.
    #[allow(clippy::let_and_return)]
    let result = fold_many0(
        pair(alt((char('+'), char('-'))), algebra_term),
        || init.clone(),
        |acc, (_op, val): (char, AlgebraParseNode)| {
            AlgebraParseNode::Sum(Box::new(acc), Box::new(val))
        },
    )(i);
    result
}

fn module_generator(i: &str) -> IResult<&str, ModuleParseNode> {
    let (rest, (a, more_str)) = pair(alpha1, alphanumeric0)(i)?;
    if a.starts_with("Sq") || a.starts_with('P') || a.starts_with('Q') {


evel,i=n.dataLevel,o=n.schema[e],s=n.schemaPath+n.util.getProperty(e),l=n.errSchemaPath+"/"+e,u=!n.opts.allErrors,c="data"+(i||"");if(!1===n.opts.format)return u&&(a+=" if (true) { "),a;var p,d=n.opts.$data&&o&&o.$data;p=d?(a+=" var schema"+r+" = "+n.util.getData(o.$data,i,n.dataPathArr)+"; ","schema"+r):o;var f=n.opts.unknownFormats,m=Array.isArray(f);if(d){a+=" var "+(h="format"+r)+" = formats["+p+"]; var "+(g="isObject"+r)+" = typeof "+h+" == 'object' && !("+h+" instanceof RegExp) && "+h+".validate; var "+(b="formatType"+r)+" = "+g+" && "+h+".type || 'string'; if ("+g+") { ",n.async&&(a+=" var async"+r+" = "+h+".async; "),a+=" "+h+" = "+h+".validate; } if (  ",d&&(a+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "),a+=" (","ignore"!=f&&(a+=" ("+p+" && !"+h+" ",m&&(a+=" && self._opts.unknownFormats.indexOf("+p+") == -1 "),a+=") || "),a+=" ("+h+" && "+b+" == '"+t+"' && !(typeof "+h+" == 'function' ? ",n.async?a+=" (async"+r+" ? await "+h+"("+c+") : "+h+"("+c+")) ":a+=" "+h+"("+c+") ",a+=" : "+h+".test("+c+"))))) {"}else{var h;if(!(h=n.formats[o])){if("ignore"==f)return n.logger.warn('unknown format "'+o+'" ignored in schema at path "'+n.errSchemaPath+'"'),u&&(a+=" if (true) { "),a;if(m&&0<=f.indexOf(o))return u&&(a+=" if (true) { "),a;throw new Error('unknown format "'+o+'" is used in schema at path "'+n.errSchemaPath+'"')}var g,b=(g="object"==typeof h&&!(h instanceof RegExp)&&h.validate)&&h.type||"string";if(g){var v=!0===h.async;h=h.validate}if(b!=t)return u&&(a+=" if (true) { "),a;if(v){if(!n.async)throw new Error("async format in sync schema");a+=" if (!(await "+(y="formats"+n.util.getProperty(o)+".validate")+"("+c+"))) { "}else{a+=" if (! ";var y="formats"+n.util.getProperty(o);g&&(y+=".validate"),a+="function"==typeof h?" "+y+"("+c+") ":" "+y+".test("+c+") ",a+=") { "}}var w=w||[];w.push(a),a="",!1!==n.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+n.errorPath+" , schemaPath: "+n.util.toQuotedString(l)+" , params: { format:  ",a+=d?""+p:""+n.util.toQuotedString(o),a+="  } ",!1!==n.opts.messages&&(a+=" , message: 'should match format \"",a+=d?"' + "+p+" + '":""+n.util.escapeQuotes(o),a+="\"' "),n.opts.verbose&&(a+=" , schema:  ",a+=d?"validate.schema"+s:""+n.util.toQuotedString(o),a+="         , parentSchema: validate.schema"+n.schemaPath+"


ne fun <reified Status : ChannelState> Peer.expectState(
    id: ByteVector32? = null,
    noinline waitCondition: (suspend Status.() -> Boolean)? = null,
): Pair<ByteVector32, Status> =
    channelsFlow
        .mapNotNull { map ->
            map.entries.find {
                (id == null || it.key == id) &&
                        it.value is Status &&
                        waitCondition?.invoke(it.value as Status) ?: true
            }
        }
        .map { it.key to it.value as Status }
        .first()
package fr.acinq.lightning.channel.states

import fr.acinq.bitcoin.Block
import fr.acinq.bitcoin.ByteVector32
import fr.acinq.lightning.*
import fr.acinq.lightning.channel.*
import fr.acinq.lightning.tests.TestConstants
import fr.acinq.lightning.tests.utils.LightningTestSuite
import fr.acinq.lightning.tests.utils.runSuspendTest
import fr.acinq.lightning.transactions.Transactions
import fr.acinq.lightning.utils.sat
import fr.acinq.lightning.wire.AcceptDualFundedChannel
import fr.acinq.lightning.wire.ChannelTlv
import fr.acinq.lightning.wire.Error
import fr.acinq.lightning.wire.TlvStream
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertIs
import kotlin.test.assertTrue

class WaitForOpenChannelTestsCommon : LightningTestSuite() {

    @Test
    fun `recv OpenChannel -- without wumbo`() {
        val (_, bob, open) = TestsHelper.init(aliceFeatures = TestConstants.Alice.nodeParams.features.remove(Feature.Wumbo))
        assertEquals(open.tlvStream.get(), ChannelTlv.ChannelTypeTlv(ChannelType.SupportedChannelType.SimpleTaprootChannels))
        val (bob1, actions) = bob.process(ChannelCommand.MessageReceived(open))
        assertIs<LNChannel<WaitForFundingCreated>>(bob1)
        assertEquals(3, actions.size)
        assertTrue(bob1.state.channelConfig.hasOption(ChannelConfigOption.FundingPubKeyBasedChannelKeyPath))
        assertEquals(bob1.state.channelFeatures, ChannelFeatures(setOf(Feature.DualFunding, Feature.ZeroReserveChannels)))
        assertEquals(Transactions.CommitmentFormat.SimpleTaprootChannels, bob1.state.interactiveTxSession.fundingParams.commitmentFormat)
        actions.hasOutgoingMessage<AcceptDualFundedChannel>()
        actions.has<ChannelAction.ChannelId.IdAssigned>()
        assertEquals(ChannelEvents.Creating(bob1.state), actions.find<ChannelAction.EmitEvent>().event)
    }

    @Test
    fun `recv OpenChannel -- wumbo`() {
        val (_, bob, open) = TestsHelper.init(aliceFundingAmount = 20_000_000.sat)
        val (bob1, actions) = bob.process(ChannelCommand.MessageReceived(open))
        assertIs<LNChannel<WaitForFundingCreated>>(bob1)
        assertEquals(3, actions.size)
        assertEquals(bob1.state.channelFeatures, ChannelFeatures(setOf(Feature.DualFunding, Feature.ZeroReserveChannels)))
        assertEquals(Transactions.CommitmentFormat.SimpleTaprootChannels, bob1.state.interactiveTxSession.fundingParams.commitmentFormat)
        actions.hasOutgoingMessage<AcceptDualFundedChannel>()
        actions.has<ChannelAction.ChannelId.IdAssigned>()
        assertEquals(ChannelEvents.Creating(bob1.state), actions.find<ChannelAction.EmitEvent>().event)
    }

    @Test
    fun `recv OpenChannel -- zero conf -- zero reserve`() {
        val (_, bob, open) = TestsHelper.init(zeroConf = true)
        val (bob1, actions) = bob.process(


7446, 121.53312440446707",
        "Comments": ""
    },
    {
        "Restaurant": "何太守港式菠蘿包",
        "Location": "Gongguan",
        "Genre": "Light",
        "Price": "1",
        "OnePerson": "O",
        "Dating": "",
        "Gathering": "",
        "FastServe": "",
        "SlowEat": "",
        "Coordinates": "25.015221200320166, 121.5322599458017",
        "Comments": ""
    },
    {
        "Restaurant": "公館阿姨滷味",
        "Location": "Gongguan",
        "Genre": "LouMei",
        "Price": "2",
        "OnePerson": "O",
        "Dating": "",
        "Gathering": "",
        "FastServe": "",
        "SlowEat": "",
        "Coordinates": "25.01628937994413, 121.53230059467121",
        "Comments": ""
    },
    {
        "Restaurant": "劉記川味牛肉麵",
        "Location": "Gongguan",
        "Genre": "Noodles",
        "Price": "3",
        "OnePerson": "O",
        "Dating": "",
        "Gathering": "",
        "FastServe": "",
        "SlowEat": "",
        "Coordinates": "25.01569864817059, 121.53251003544734",
        "Comments": ""
    },
    {
        "Restaurant": "好想見麵",
        "Location": "Gongguan",
        "Genre": "Noodles",
        "Price": "",
        "OnePerson": "O",
        "Dating": "",
        "Gathering": "",
        "FastServe": "",
        "SlowEat": "",
        "Coordinates": "25.01707898335809, 121.5321829462751",
        "Comments": ""
    },
    {
        "Restaurant": "一川鍋燒麵",
        "Location": "Gongguan",
        "Genre": "Noodles",
        "Price": "1",
        "OnePerson": "O",
        "Dating": "",
        "Gathering": "",
        "FastServe": "",
        "SlowEat": "",
        "Coordinates": "25.012859354837598, 121.53565114854356",
        "Comments": ""
    },
    {
        "Restaurant": "公館麵線",
        "Location": "Gongguan",
        "Genre": "Noodles",
        "Price": "1",
        "OnePerson": "O",
        "Dating": "",
        "Gathering": "",
        "FastServe": "",
        "SlowEat": "",
        "Coordinates": "25.012814387760024, 121.53585566698123",
        "Comments": ""
    },
    {
        "Restaurant": "道楽製麵所",
        "Location": "Gongguan",
        "Genre": "Ramen",
        "Price": "3",
        "OnePerson": "O",
        "Dating": "",
        "Gathering": "",
        "FastServe": "",
        "SlowEat": "",
        "Coordinates": "25.01329750789052, 121.53410177850562",
        "Comments": ""
    },
    {
        "Restaurant": "隱家拉麵",
        "Location": "Gongguan",
        "Genre": "Ramen",
        "Price": "4",
        "OnePerson": "O",
        "Dating": "",
        "Gathering": "",
        "FastServe": "",
        "SlowEat": "",
        "Coordinates": "25.01651631940149, 121.53314328019799",


else {
				str = Math.floor(num / 10000).toString() + "万";
			}
			return str;
		}
		// public static toNonExponential(num) {
		// 	let m = num.toExponential().match(/\d(?:\.(\d*))?e([+-]\d+)/);
		// 	return num.toFixed(Math.max(0, (m[1] || '').length - m[2]));
		// }
		/**
		 * 格式化数字 999,999,999,999,999
		 */
		public static toThousands(n: number): string {
			// let nm = this.toNonExponential(n);
			let num = (n || 0).toString(), result = '';
			while (num.length > 3) {
				result = ',' + num.slice(-3) + result;
				num = num.slice(0, num.length - 3);
			}
			if (num) { result = num + result; }
			return result;
		}
	}
}import { Argument, parseSync, Variadic } from '../../../../src';

class Args {
  @Argument() named!: string;
  @Variadic() args!: string[];
}

it('README - Features - Structured Syntax Model - Variadic Arguments', () => {
  const args = new Args();
  parseSync(args, ['foo', 'bar', 'baz']);
  expect(args.named).toEqual('foo');
  expect(args.args).toEqual(['bar', 'baz']);
});
import {Boolean} from './Boolean'

/** Transform a **`boolean`** to **`true`** or **`false`**
 * @param B to transform
 * @returns **`'true'`** or **`'false'`**
 * @example
 * ```ts
 * import {B} from 'ts-toolbelt'
 *
 * type test0 = B.StringOf<true>    // 'true'
 * type test1 = B.StringOf<false>   // 'false'
 * type test2 = B.StringOf<boolean> // 'false' | 'true'
 * ```
 */
export type StringOf<B extends Boolean> = {
    0: 'false'
    1: 'true'
}[B]

import { DispatchError, IPropagationStatus, PromiseDispatcherBase } from "ste-core";
import { IPromiseSimpleEventHandler } from "./IPromiseSimpleEventHandler";
import { IPromiseSimpleEvent } from "./IPromiseSimpleEvent";

/**
 * The dispatcher handles the storage of subsciptions and facilitates
 * subscription, unsubscription and dispatching of a simple event
 *
 * @export
 * @class PromiseSimpleEventDispatcher
 * @extends {PromiseDispatcherBase<IPromiseSimpleEventHandler<TArgs>>}
 * @implements {IPromiseSimpleEvent<TArgs>}
 * @template TArgs
 */
export class PromiseSimpleEventDispatcher<TArgs>
    extends PromiseDispatcherBase<IPromiseSimpleEventHandler<TArgs>>
    implements IPromiseSimpleEvent<TArgs> {
    /**
     * Creates a new SimpleEventDispatcher instance.
     */
    constructor() {
        super();
    }

    /**
     * Dispatches the event.
     * @param args The arguments object.
     * @returns {IPropagationStatus} The status of the dispatch.
     * @memberOf PromiseSimpleEventDispatcher
     */
    async dispatch(args: TArgs): Promise<IPropagationStatus> {
        const result = await this._dispatchAsPromise(false, this, arguments);
        if (result == null) {
            throw new DispatchError("Got `null` back from dispatch.");
        }

        return result;
    }

    /**
     * Dispatches the event without waiting for it to complete.
     * @param args The argument object.
     * @memberOf PromiseSimpleEventDispatcher
     */
    public dispatchAsync(args: TArgs): void {
        this._dispatchAs


:auto;text-align:center;width:100%;height:110px;line-height:100px}.loading-text span[data-v-902659b3]{display:inline-block;margin:0 5px;color:#fff;font-family:Quattrocento Sans,sans-serif}.loading-text span[data-v-902659b3]:nth-child(1){filter:blur(0px);animation:blur-text-902659b3 1.5s 0s infinite linear alternate}.loading-text span[data-v-902659b3]:nth-child(2){filter:blur(0px);animation:blur-text-902659b3 1.5s .2s infinite linear alternate}.loading-text span[data-v-902659b3]:nth-child(3){filter:blur(0px);animation:blur-text-902659b3 1.5s .4s infinite linear alternate}.loading-text span[data-v-902659b3]:nth-child(4){filter:blur(0px);animation:blur-text-902659b3 1.5s .6s infinite linear alternate}.loading-text span[data-v-902659b3]:nth-child(5){filter:blur(0px);animation:blur-text-902659b3 1.5s .8s infinite linear alternate}.loading-text span[data-v-902659b3]:nth-child(6){filter:blur(0px);animation:blur-text-902659b3 1.5s 1s infinite linear alternate}.loading-text span[data-v-902659b3]:nth-child(7){filter:blur(0px);animation:blur-text-902659b3 1.5s 1.2s infinite linear alternate}@keyframes blur-text-902659b3{0%{filter:blur(0px)}to{filter:blur(4px)}}.dialog[data-v-00479b60]{width:60%;border-radius:24px;position:relative;padding:16px}.dialog .input_card[data-v-00479b60]{padding:0 50px;font-size:12px}.dialog .input_card .n-input[data-v-00479b60]{background-color:transparent;font-size:12px;color:silver;border-radius:12px;width:350px;--n-border: 0px solid #e0e0e6 !important}.dialog .n-button[data-v-00479b60]{color:silver;border-radius:5px;font-size:12px;padding:0 40px}.dialog .send_code[data-v-00479b60]{position:absolute;right:-20px;width:131px;height:40px;border-radius:5px;line-height:40px;text-align:center;font-size:12px;margin-left:10px;cursor:pointer}.dialog .close_btn[data-v-00479b60]{cursor:pointer}.dialog .close_btn img[data-v-00479b60]{width:20px;height:20px}.n-data-table[data-v-00479b60]{--n-merged-th-color: transparent;--n-td-color-hover-modal: #86CFB5 !important}.kamil_activate_dialog[data-v-5ee54cf0]{width:466px;border-radius:24px;position:relative;padding:16px}.kamil_activate_dialog .kami_input[data-v-5ee54cf0]{padding:0 50px;font-size:12px}.kamil_activate_dialog .kami_input .n-input[data-v-5ee54cf0]{background-color:transparent;font-size:12px;color:silver;border-radius:12px;width:350px;--n-border: 0px solid #e0e0e6 !important}.kamil_activate_dialog .n-button[data-v-5ee54cf0]{color:silver;border-radius:5px;font-size:12px;padding:0 40px}.kami


new ChangedTitle("Updated", "FIRST"));
		assertEquals("FIRST", mTerminal.getTitle());
		assertEquals(expectedTitleChanges, mOutput.titleChanges);

		enterString("\033[22;0t");
		enterString("\033]0;SECOND\007");
		assertEquals("SECOND", mTerminal.getTitle());

		expectedTitleChanges.add(new ChangedTitle("FIRST", "SECOND"));
		assertEquals(expectedTitleChanges, mOutput.titleChanges);

		enterString("\033[23;0t");
		assertEquals("FIRST", mTerminal.getTitle());

		expectedTitleChanges.add(new ChangedTitle("SECOND", "FIRST"));
		assertEquals(expectedTitleChanges, mOutput.titleChanges);

		enterString("\033[23;0t");
		expectedTitleChanges.add(new ChangedTitle("FIRST", "Updated"));
		assertEquals(expectedTitleChanges, mOutput.titleChanges);

		enterString("\033[22;0t");
		enterString("\033[22;0t");
		enterString("\033[22;0t");
		// Popping to same title should not cause changes.
		enterString("\033[23;0t");
		enterString("\033[23;0t");
		enterString("\033[23;0t");
		assertEquals(expectedTitleChanges, mOutput.titleChanges);
	}

	public void testTitleStack() throws Exception {
		// echo -ne '\e]0;BEFORE\007' # set title
		// echo -ne '\e[22t' # push to stack
		// echo -ne '\e]0;AFTER\007' # set new title
		// echo -ne '\e[23t' # retrieve from stack

		withTerminalSized(10, 10);
		enterString("\033]0;InitialTitle\007");
		assertEquals("InitialTitle", mTerminal.getTitle());
		enterString("\033[22t");
		assertEquals("InitialTitle", mTerminal.getTitle());
		enterString("\033]0;UpdatedTitle\007");
		assertEquals("UpdatedTitle", mTerminal.getTitle());
		enterString("\033[23t");
		assertEquals("InitialTitle", mTerminal.getTitle());
		enterString("\033[23t\033[23t\033[23t");
		assertEquals("InitialTitle", mTerminal.getTitle());
	}

	public void testSetColor() throws Exception {
		// "OSC 4; $INDEX; $COLORSPEC BEL" => Change color $INDEX to the color specified by $COLORSPEC.
		withTerminalSized(4, 4).enterString("\033]4;5;#00FF00\007");
		assertEquals(Integer.toHexString(0xFF00FF00), Integer.toHexString(mTerminal.mColors.mCurrentColors[5]));
		enterString("\033]4;5;#00FFAB\007");
		assertEquals(mTerminal.mColors.mCurrentColors[5], 0xFF00FFAB);
		enterString("\033]4;255;#ABFFAB\007");
		assertEquals(mTerminal.mColors.mCurrentColors[255], 0xFFABFFAB);
		// Two indexed colors at once:
		enterString("\033]4;7;#00FF00;8;#0000FF\007");
		assertEquals(mTerminal.mColors.mCurrentColors[7], 0xFF00FF00);
		assertEquals(mTerminal.mColors.mCurrentColors[8], 0xFF0000FF);
	}

	void assertIndexColorsMatch(int[] expected) {
		for (int i = 0; i < 255; i++)
			assertEquals("index=" + i, expected[i], mTerminal.mColors.mCurrentColors[i]);
	}

	public void testResetColor() throws Exception {
		withTerminalSized(4, 4);
		int[] initialColors = new int[TextStyle.NUM_INDEXED_COLORS];
		System.arraycopy(mTerminal.mColors.mCurrentColors, 0, initialColors, 0, initialColors.length);
		int[] expectedColors = new int[initialColors.length];
		System.arraycopy(mTerminal.mColors.mCurrentColors, 0, expectedColors, 0, expectedColors.length);
		Random rand = new Random();
		for (int endType = 0; endType < 3; endType++) {
			// Both BEL (7) and ST (ESC \) can end an OSC sequence.
			String ender = (endType == 0) ? "\007" : "\033\\";
			for (int i = 0