SER.check_arrays(y, x)
        x_constant, name_x, warn = USER.check_constant(x, name_x, True)
        set_warn(self, warn)
        bigy, bigx, name_y, name_x, warn = check_panel(y, x_constant, w, name_y, name_x)
        set_warn(self, warn)
        w = USER.check_weights(w, bigy, w_required=True, time=True)

        BasePanel_FE_Error.__init__(self, bigy, bigx, w, epsilon=epsilon)
        self.title = "MAXIMUM LIKELIHOOD SPATIAL ERROR PANEL" + " - FIXED EFFECTS"
        self.name_ds = USER.set_name_ds(name_ds)
        self.name_y = USER.set_name_y(name_y)
        self.name_x = USER.set_name_x(name_x, bigx, constant=True)
        self.name_x.append("lambda")
        self.name_w = USER.set_name_w(name_w, w)
        self.aic = DIAG.akaike(reg=self)
        self.schwarz = DIAG.schwarz(reg=self)
        SUMMARY.Panel_FE_Error(reg=self, w=w, vm=vm)

def lag_c_loglik_sp(rho, n, t, e0, e1, I, Wsp):
    # concentrated log-lik for lag model, sparse algebra
    if isinstance(rho, np.ndarray):
        if rho.shape == (1, 1):
            rho = rho[0][0]
    er = e0 - rho * e1
    sig2 = spdot(er.T, er)
    nlsig2 = (n * t / 2.0) * np.log(sig2)
    a = I - rho * Wsp
    LU = SuperLU(a.tocsc())
    jacob = t * np.sum(np.log(np.abs(LU.U.diagonal())))
    clike = nlsig2 - jacob
    return clike

def err_c_loglik_sp(lam, n, t, y, ylag, x, xlag, I, Wsp):
    # concentrated log-lik for error model, no constants, LU
    if isinstance(lam, np.ndarray):
        if lam.shape == (1, 1):
            lam = lam[0][0]
    ys = y - lam * ylag
    xs = x - lam * xlag
    ysys = np.dot(ys.T, ys)
    xsxs = np.dot(xs.T, xs)
    xsxsi = la.inv(xsxs)
    xsys = np.dot(xs.T, ys)
    x1 = np.dot(xsxsi, xsys)
    x2 = np.dot(xsys.T, x1)
    ee = ysys - x2
    sig2 = ee[0][0]
    nlsig2 = (n * t / 2.0) * np.log(sig2)
    a = I - lam * Wsp
    LU = SuperLU(a.tocsc())
    jacob = t * np.sum(np.log(np.abs(LU.U.diagonal())))
    # this is the negative of the concentrated log lik for minimization
    clik = nlsig2 - jacob
    return clik

def _test():
    import doctest

    start_suppress = np.get_printoptions()["suppress"]
    np.set_printoptions(suppress=True)
    doctest.testmod()
    np.set_printoptions(suppress=start_suppress)


  defineElement(PRE, (context) => PreElement(context));
  defineElement(PARAGRAPH, (context) => ParagraphElement(context));
  defineElement(DIV, (context) => DivElement(context));
  defineElement(UL, (context) => UListElement(context));
  defineElement(OL, (context) => OListElement(context));
  defineElement(LI, (context) => LIElement(context));
  defineElement(DL, (context) => DListElement(context));
  defineElement(DT, (context) => DTElement(context));
  defineElement(DD, (context) => DDElement(context));
  defineElement(FIGURE, (context) => FigureElement(context));
  defineElement(FIGCAPTION, (context) => FigureCaptionElement(context));
  defineElement(BLOCKQUOTE, (context) => BlockQuotationElement(context));
  defineElement(TEMPLATE, (context) => TemplateElement(context));
  // Sections
  defineElement(ADDRESS, (context) => AddressElement(context));
  defineElement(ARTICLE, (context) => ArticleElement(context));
  defineElement(ASIDE, (context) => AsideElement(context));
  defineElement(FOOTER, (context) => FooterElement(context));
  defineElement(HEADER, (context) => HeaderElement(context));
  defineElement(MAIN, (context) => MainElement(context));
  defineElement(NAV, (context) => NavElement(context));
  defineElement(SECTION, (context) => SectionElement(context));
  // Headings
  defineElement(H1, (context) => H1Element(context));
  defineElement(H2, (context) => H2Element(context));
  defineElement(H3, (context) => H3Element(context));
  defineElement(H4, (context) => H4Element(context));
  defineElement(H5, (context) => H5Element(context));
  defineElement(H6, (context) => H6Element(context));
  // Forms
  defineElement(LABEL, (context) => LabelElement(context));
  defineElement(BUTTON, (context) => ButtonElement(context));
  defineElement(INPUT, (context) => InputElement(context));
  defineElement(TEXTAREA, (context) => TextareaElement(context));
  // Edits
  defineElement(DEL, (context) => DelElement(context));
  defineElement(INS, (context) => InsElement(context));
  // Head
  defineElement(HEAD, (context) => HeadElement(context));
  defineElement(TITLE, (context) => TitleElement(context));
  defineElement(META, (context) => MetaElement(context));
  defineElement(LINK, (context) => LinkElement(context));
  defineElement(STYLE, (context) => StyleElement(context));
  defineElement(NOSCRIPT, (context) => NoScriptElement(context));
  defineElement(SCRIPT, (context) => ScriptElement(context));
  // Object
  defineElement(OBJECT, (context) => ObjectElement(context));
  defineElement(PARAM, (context) => ParamElement(context));
  // Others
  defineElement(HTML, (context) => HTMLElement(context));
  defineElement(BODY, (context) => BodyElement(context));
  defineElement(IMAGE, (context) => ImageElement(context));
  defineElement(CANVAS, (context) => CanvasElement(context));
}

/*
 * Copyright (C) 2021-present The Kraken authors. All rights reserved.
 */

import 'package:flutter/foundation.dart';
import 'package:flutter/rendering.dart';
import 'package:kraken/css.dart';
import 'package:kraken/dom.dart';
import 'package:kraken/rendering.dart';

// CSS Positioned Layout: https://drafts.csswg.org/css-position/

// RenderPositionHolder may be affected by overflow: scroller offset.
// We need to reset these offset to keep positioned elements render at their original position.
// @NOTE: Attention that renderObjects in tree may not all subtype of RenderBoxModel, use `is` to identify.
Offset? _getRenderPositionHolderScrollOffset(RenderPositionPlaceholder holder, RenderObject root) {
  AbstractNode? current = holder.pare


		packer.PackExtendedTypeValue(21, data);
						}
						return;

					case Vector4 vec4:
						unsafe
						{
							byte[] data = new byte[4 * sizeof(float)];
							fixed (byte* ptr = data)
							{
								*((float*)ptr) = vec4.X;
								*((float*)ptr + 1) = vec4.Y;
								*((float*)ptr + 2) = vec4.Z;
								*((float*)ptr + 3) = vec4.W;
							}
							packer.PackExtendedTypeValue(22, data);
						}
						return;

					case Quaternion quat:
						unsafe
						{
							byte[] data = new byte[4 * sizeof(float)];
							fixed (byte* ptr = data)
							{
								*((float*)ptr) = quat.X;
								*((float*)ptr + 1) = quat.Y;
								*((float*)ptr + 2) = quat.Z;
								*((float*)ptr + 3) = quat.W;
							}
							packer.PackExtendedTypeValue(23, data);
						}
						return;
				}
			}
			else if(obj is IEnumerable enumerable) // this includes any container like, arrays and generic ones (ICollection)
			{
				switch (enumerable)
				{
					case byte[] bytes:
						Pack(packer, bytes);
						return;

					case IDictionary<string, object> dictStringObject: // more common than below, also faster iteration
						{
							packer.PackMapHeader(dictStringObject.Count);
							foreach (var kvp in dictStringObject)
							{
								Serialize(kvp.Key, packer);
								Serialize(kvp.Value, packer);
							}
						}
						return;

					case IDictionary dict: // less common than above, will handle all types of dictionaries. 1.3 (30%) times slower than above
						{
							packer.PackMapHeader(dict.Count);
							foreach (DictionaryEntry kvp in dict)
							{
								Serialize(kvp.Key, packer);
								Serialize(kvp.Value, packer);
							}
						}
						return;

					case IList array: // any array like, including T[] and List<T>
						{
							packer.PackArrayHeader(array.Count);
							for (int i = 0; i < array.Count; ++i)
							{
								Serialize(array[i], packer);
							}
						}
						return;

					default: // unknown/undefined size, so go through them
						{
							var list = new List<object>();
							foreach (var item in enumerable)
							{
								list.Add(item);
							}

							packer.PackArrayHeader(list.Count);
							for (int i = 0; i < list.Count; ++i)
							{
								Serialize(list[i], packer);
							}
						}
						return;
				}
			}

			switch (obj)
			{
				case IPackable packable:
					packable.PackToMessage(packer, null);
					return;

				case Delegate deleg:
					PackDelegate(packer, deleg);
					return;
			}

			// no suitable conversion found, serialize all public properties into a dictionary
			// TODO: check if this is really what we want
			var dictionary = new Dictionary<string, object>();

			var properties = type.GetProperties();
			for (int i = 0; i < properties.Length; ++i)
			{
				var property = properties[i];
				dictionary[property.Name] = property.GetValue(obj, null);
			}

			/*
			// fields as well?
			var fields = type.GetFields();
			for (int i = 0; i < fields.Length; ++i)
			{
				var field = fields[i];
				dictionary[field.Name] = field.GetValue(obj);
			}*/

			Serialize(dictionary, packer);
		}

		[SecuritySafeCritical]
		private static void PackDelegate(Packer packer, in Delegate deleg)
		{
			/*if (deleg is Callback)


ea"}, {title:"Attachment", field:"attachment", width:"20%", formatter:"link", formatterParams:{ labelField:"llink", urlField:'lurl', urlPrefix:"", target:"_blank" }}];

	tab_sms			=	new Tabulator(table_sms, {
		layout:"fitColumns",
		height: height_str,
		responsiveLayout:"true",
		columns: xcolumns,
		printAsHtml:true,
		printCopyStyle:true,

	});

	var t_values 	= [{ id:0, date:0, direction:0, party:0, status:0, subject:0, body:0, attachment:0 }];

	for (i = 0; i < db.length; i++) {
		var entry 				= 		 db[i];

		var  NONE 				=		"n/a";
		var _subject			=		(entry["subject"] 			!= null? entry["subject"]:NONE);
		var _body				=		(entry["text"] 				!= null? entry["text"]:NONE);
		var _sender				=		(entry["sender"] 			!= null? entry["sender"]:NONE);
		var _date				=		(entry["date"] 				!= null? entry["date"]:NONE);

		var _att				=		(entry["attachment_file"] 				!= null? entry["attachment_file"]:NONE);
		var _att_new			=		(entry["attachment_file_new"] 			!= null? entry["attachment_file_new"]:NONE);
		var _direction			=		(entry["is_from_me"] 		== 1? "Outgoing":"Incoming");
		var _is_read			=		(entry["is_read"]			== 0? "NOT READ": "READ");

		var local_fpath			=		GetLinkPath(_att, _att_new);
		var _party				=		_sender;

		if (_att != 0)
		{
			// with media
			t_values[i] 	= { id:i+1, date:_date, direction: _direction, party:_party, status: _is_read, subject:_subject, body:_body, attachment:_att, llink:_att, url:local_fpath, lurl:local_fpath };

			AddContactStats(_party, 0, 1, 0);
			total_mms		=	total_mms + 1;
			//console.log("   total_mms = " + total_mms);

		}
		else
		{
			// without media
			t_values[i] 	= { id:i+1, date:_date, direction: _direction, party:_party, status: _is_read, subject:_subject, body:_body, attachment:_att };

			AddContactStats(_party, 1, 0, 0);
			total_sms		=	total_sms + 1;

		}

	}

	//tab_sms.addData(t_values, true);
	tab_sms.setData(t_values);

	//
	//
	// cookies
	//
	//
	//   "Cookie", "CookieFlags", "Domain", "Expires", "Path", "Value":

	var 	i 					= 	0;
	var 	db 					= 	json_cookies_db;
	var 	height_str			=	CalcTableHeight(db.length);

	xcolumns 			= 	[{title:"ID", field:"id", width:"5%"}, {title:"Domain", field:"domain", width:"15%"}, {title:"Path", field:"path", width:"8%"}, {title:"Cookie", field:"name", width:"15%"}, {title:"Value", field:"value", formatter:"textarea", width:"35%"}, {title:"Expires", field:"date_exp"}];

	tab_cookies			=	new Tabulator(table_cookies, {
		layout:"fitColumns",
		height: height_str,
		responsiveLayout:"true",


HEADER;
typedef struct tagVIDEOINFO {
    RECT rcSource;
    RECT rcTarget;
    DWORD dwBitRate;
    DWORD dwBitErrorRate;
    REFERENCE_TIME AvgTimePerFrame;
    BITMAPINFOHEADER bmiHeader;
    __C89_NAMELESS union {
        RGBQUAD bmiColors[256];
        DWORD dwBitMasks[3];
        TRUECOLORINFO TrueColorInfo;
    } __C89_NAMELESSUNIONNAME;
} VIDEOINFO;
typedef struct tagMPEG1VIDEOINFO {
    VIDEOINFOHEADER hdr;
    DWORD dwStartTimeCode;
    DWORD cbSequenceHeader;
    BYTE bSequenceHeader[1];
} MPEG1VIDEOINFO;
#define MAX_SIZE_MPEG1_SEQUENCE_INFO 140
#define MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)
typedef struct tagAnalogVideoInfo {
    RECT rcSource;
    RECT rcTarget;
    DWORD dwActiveWidth;
    DWORD dwActiveHeight;
    REFERENCE_TIME AvgTimePerFrame;
} ANALOGVIDEOINFO;
typedef enum __WIDL_amvideo_generated_name_0000000F {
    AM_PROPERTY_FRAMESTEP_STEP = 0x1,
    AM_PROPERTY_FRAMESTEP_CANCEL = 0x2,
    AM_PROPERTY_FRAMESTEP_CANSTEP = 0x3,
    AM_PROPERTY_FRAMESTEP_CANSTEPMULTIPLE = 0x4
} AM_PROPERTY_FRAMESTEP;
typedef struct _AM_FRAMESTEP_STEP {
    DWORD dwFramesToStep;
} AM_FRAMESTEP_STEP;
/* Begin additional prototypes for all interfaces */

ULONG           __RPC_USER HWND_UserSize     (ULONG *, ULONG, HWND *);
unsigned char * __RPC_USER HWND_UserMarshal  (ULONG *, unsigned char *, HWND *);
unsigned char * __RPC_USER HWND_UserUnmarshal(ULONG *, unsigned char *, HWND *);
void            __RPC_USER HWND_UserFree     (ULONG *, HWND *);
ULONG           __RPC_USER BSTR_UserSize     (ULONG *, ULONG, BSTR *);
unsigned char * __RPC_USER BSTR_UserMarshal  (ULONG *, unsigned char *, BSTR *);
unsigned char * __RPC_USER BSTR_UserUnmarshal(ULONG *, unsigned char *, BSTR *);
void            __RPC_USER BSTR_UserFree     (ULONG *, BSTR *);

/* End additional prototypes */

#ifdef __cplusplus
}
#endif

#endif /* __amvideo_h__ */


            "  ?,\n" +
            "  ?,\n" +
            "  ?,\n" +
            "  ?\n" +
            "FROM TF_F_MERCHANT T\n" +
            "WHERE T.MERCHANT_ID = ? ";

    HashSet<String> securetFields = Sets.newHashSet("TF_B_ORDER.ORDER_ID",
            "TF_B_ORDER_NETIN.PSPT_ADDR", "TF_F_MERCHANT.MERCHANT_ID", "TF_B_ORDER_GOODSINS_ATVAL.ORDER_ID",
            "TF_B_ORDER_NETIN.PSPT_NO", "TF_B_ORDER_POST.POST_ADDR", "TF_B_ORDER_POST.RECEIVER_PSPT_NO");

    @Test
    public void testInsertSelect() {
        val parser = parseSql(sql, securetFields);

        Assert.assertEquals(Sets.newHashSet(1, 35), parser.getSecureBindIndices());
    }

    String insertAllSql = "INSERT ALL           INTO TF_B_ORDER_GOODSINS_ATVAL              (ORDER_ID,PARTITION_ID,GOODS_INST_ID,GOODS_ID,ATTR_CODE,ATTR_NAME,ATTR_VAL_CODE,ATTR_VAL_NAME,ATTR_VAL_DESC,EOP_ATTR_CODE,EOP_ATTR_VAL_CODE)          VALUES              (?,MOD(?,100),?,?,?,?,?,?,?,?,?)                    INTO TF_B_ORDER_GOODSINS_ATVAL              (ORDER_ID,PARTITION_ID,GOODS_INST_ID,GOODS_ID,ATTR_CODE,ATTR_NAME,ATTR_VAL_CODE,ATTR_VAL_NAME,ATTR_VAL_DESC,EOP_ATTR_CODE,EOP_ATTR_VAL_CODE)          VALUES              (?,MOD(?,100),?,?,?,?,?,?,?,?,?)                    INTO TF_B_ORDER_GOODSINS_ATVAL              (ORDER_ID,PARTITION_ID,GOODS_INST_ID,GOODS_ID,ATTR_CODE,ATTR_NAME,ATTR_VAL_CODE,ATTR_VAL_NAME,ATTR_VAL_DESC,EOP_ATTR_CODE,EOP_ATTR_VAL_CODE)          VALUES              (?,MOD(?,100),?,?,?,?,?,?,?,?,?)                    INTO TF_B_ORDER_GOODSINS_ATVAL              (ORDER_ID,PARTITION_ID,GOODS_INST_ID,GOODS_ID,ATTR_CODE,ATTR_NAME,ATTR_VAL_CODE,ATTR_VAL_NAME,ATTR_VAL_DESC,EOP_ATTR_CODE,EOP_ATTR_VAL_CODE)          VALUES              (?,MOD(?,100),?,?,?,?,?,?,?,?,?)                    INTO TF_B_ORDER_GOODSINS_ATVAL              (ORDER_ID,PARTITION_ID,GOODS_INST_ID,GOODS_ID,ATTR_CODE,ATTR_NAME,ATTR_VAL_CODE,ATTR_VAL_NAME,ATTR_VAL_DESC,EOP_ATTR_CODE,EOP_ATTR_VAL_CODE)          VALUES              (?,MOD(?,100),?,?,?,?,?,?,?,?,?)                    INTO TF_B_ORDER_GOODSINS_ATVAL              (ORDER_ID,PARTITION_ID,GOODS_INST_ID,GOODS_ID,ATTR_CODE,ATTR_NAME,ATTR_VAL_CODE,ATTR_VAL_NAME,ATTR_VAL_DESC,EOP_ATTR_CODE,EOP_ATTR_VAL_CODE)          VALUES              (?,MOD(?,100),?,?,?,?,?,?,?,?,?)                    INTO TF_B_ORDER_GOODSINS_ATVAL              (ORDER_ID,PARTITION_ID,GOODS_INST_ID,GOODS_ID,ATTR_CODE,ATTR_NAME,ATTR_VAL_CODE,ATTR_VAL_NAME,ATTR_VAL_DESC,EOP_ATTR_CODE,EOP_ATTR_VAL_CODE)          VALUES              (?,MOD(?,100),?,?,?,?,?,?,?,?,?)                    INTO TF_B_ORDER_GOODSINS_ATVAL              (ORDER_ID,PARTITION_ID,GOODS_INST_ID,GOODS_ID,ATTR_CODE,ATTR_NAME,ATTR_VAL_CODE,ATTR_VAL_NAME,ATTR_VAL_DESC,E


endencies?.loadBalancerNames!!)
          that(usEastServerGroup.dependencies.securityGroupNames)
            .contains(spec.defaults.dependencies?.securityGroupNames!!)
            .contains(spec.overrides["us-east-1"]?.dependencies?.securityGroupNames!!)
        }
      }

      test("override health settings are merged with cluster-wide defaults") {
        expect {
          that(usEastServerGroup.health.warmup)
            .isEqualTo(spec.defaults.health?.warmup)
          that(usEastServerGroup.health.healthCheckType)
            .isEqualTo(spec.overrides["us-east-1"]?.health?.healthCheckType)
        }
      }

      derivedContext<Pair<ClusterSpec?, SubnetAwareLocations>>("a spec with location specified at the environment level") {
        deriveFixture {
          with(configuredTestObjectMapper().registerKeelEc2ApiModule()) {
            val tree = valueToTree<ObjectNode>(spec)
              .without<ObjectNode>("locations")
            val text = writeValueAsString(tree)
            copy().run {
              injectableValues = InjectableValues.Std(mapOf("locations" to spec.locations))
              readValue<ClusterSpec>(text)
            }
          } to spec.locations
        }

        test("locations from the surrounding context are applied to the spec") {
          expectThat(first)
            .isNotNull()
            .get(ClusterSpec::locations)
            .isEqualTo(second)
        }
      }
    }
  }
}

data class Fixture(
  val appVersion: String = "fnord-1.0.0",
  val baseImageName: String = "bionicbase-x86_64-202103092356-ebs",
  val usEastImageId: String = "ami-6874986",
  val usWestImageId: String = "ami-6271051",

  val spec: ClusterSpec = ClusterSpec(
    moniker = Moniker(
      app = "fnord",
      stack = "test"
    ),
    artifactReference = "fnord-deb",
    locations = SubnetAwareLocations(
      account = "test",
      vpc = "vpc0",
      subnet = "internal (vpc0)",
      regions = setOf(
        SubnetAwareRegionSpec(
          name = "us-east-1",
          availabilityZones = setOf("us-east-1c", "us-east-1d", "us-east-1e")
        ),
        SubnetAwareRegionSpec(
          name = "us-west-2",
          availabilityZones = setOf("us-west-2a", "us-west-2b", "us-west-2c")
        )
      )
    ),
    _defaults = ServerGroupSpec(
      launchConfiguration = LaunchConfigurationSpec(
        instanceType = "m5.large",
        ebsOptimized = true,
        iamRole = "fnordInstanceProfile",
        instanceMonitoring = false
      ),
      capacity = ClusterSpec.CapacitySpec(2, 2, 2),
      dependencies = ClusterDependencies(
        loadBalancerNames = setOf("fnord-internal"),
        securityGroupNames = setOf("fnord", "fnord-elb")
      ),
      health = HealthSpec(
        warmup = Duration.ofSeconds(120)
      )
    ),
    overrides = mapOf(
      "us-east-1" to ServerGroupSpec(
        launchConfiguration = LaunchConfigurationSpec(
          image = VirtualMachineImage(
            appVersion = appVersion,
            baseImageName = baseImageName,
            id = usEastImageId
          ),
          iamRole = "fnordEastInstanceProfile",
          keyPair = "fnord-keypair-325719997469-us-east-1"
        ),
        capacity = ClusterSpec.CapacitySpec(5, 5, 5),
        dependencies = ClusterDependencies(
          loadBalancerNames = setOf("fnord-external"),
          securityGroupNames = setOf("fnord-ext")
        ),
        health = HealthSpec(
          healthCheckType = ELB
        )
      ),
      "us-west-2" to ServerGroupSpec


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

#ifndef MEDIAPIPE_UTIL_FILTERING_RELATIVE_VELOCITY_FILTER_H_
#define MEDIAPIPE_UTIL_FILTERING_RELATIVE_VELOCITY_FILTER_H_

#include <deque>
#include <memory>

#include "absl/time/time.h"
#include "mediapipe/util/filtering/low_pass_filter.h"

namespace mediapipe {

// This filter keeps track (on a window of specified size) of
// value changes over time, which as result gives us velocity of how value
// changes over time. With higher velocity it weights new values higher.
//
// Use @window_size and @velocity_scale to tweak this filter for your use case.
//
// - higher @window_size adds to lag and to stability
// - lower @velocity_scale adds to lag and to stability
class RelativeVelocityFilter {
 public:
  enum class DistanceEstimationMode {
    // When the value scale changes, uses a heuristic
    // that is not translation invariant (see the implementation for details).
    kLegacyTransition,
    // The current (i.e. last) value scale is always used for scale estimation.
    // When using this mode, the filter is translation invariant, i.e.
    //     Filter(Data + Offset) = Filter(Data) + Offset.
    kForceCurrentScale,

    kDefault = kLegacyTransition
  };

 public:
  RelativeVelocityFilter(size_t window_size, float velocity_scale,
                         DistanceEstimationMode distance_mode)
      : max_window_size_{window_size},
        window_{window_size},
        velocity_scale_{velocity_scale},
        distance_mode_{distance_mode} {}

  RelativeVelocityFilter(size_t window_size, float velocity_scale)
      : RelativeVelocityFilter{window_size, velocity_scale,
                               DistanceEstimationMode::kDefault} {}

  // Applies filter to the value.
  // @timestamp - timestamp associated with the value (for instance,
  //              timestamp of the frame where you got value from)
  // @value_scale - value scale (for instance, if your value is a distance
  //                detected on a frame, it can look same on different
  //                devices but have quite different absolute values due
  //                to different resolution, you should come up with an
  //                appropriate parameter for your particular use case)
  // @value - value to filter
  float Apply(absl::Duration timestamp, float value_scale, float value);

 private:
  struct WindowElement {
    float distance;
    int64_t duration;
  };

  float last_value_{0.0};
  float last_value_scale_{1.0};
  int64_t last_timestamp_{-1};

  size_t max_window_size_;
  std::deque<WindowElement> window_;
  LowPassFilter low_pass_filter_{1.0f};
  float velocity_scale_;
  DistanceEstimationMode distance_mode_;
};

}  // namespace mediapipe

#endif  // MEDIAPIPE_UTIL_FILTERING_RELATIVE_VELOCITY_FILTER_H_


deps.api.addr_humanize(&config.spectrum_gov)?.to_string(),
                amount,
                msg: to_binary(&GovCw20HookMsg::stake_tokens { staker_addr: None, days })?,
            })?,
            funds: vec![],
        })]))
}

fn unstake(deps: DepsMut, info: MessageInfo, amount: Option<Uint128>, days: Option<u64>) -> StdResult<Response> {
    let sender_addr = deps.api.addr_canonicalize(info.sender.as_str())?;
    let found = reward_store(deps.storage).may_load(&sender_addr)?.is_some();
    if !found {
        return Err(StdError::generic_err("unauthorized"));
    }

    let config = read_config(deps.storage)?;
    Ok(Response::new()
        .add_messages(vec![CosmosMsg::Wasm(WasmMsg::Execute {
            contract_addr: deps.api.addr_humanize(&config.spectrum_gov)?.to_string(),
            msg: to_binary(&GovExecuteMsg::withdraw {
                amount,
                days,
            })?,
            funds: vec![],
        })]))
}

fn harvest(deps: DepsMut, info: MessageInfo, aust_amount: Option<Uint128>, days: Option<u64>) -> StdResult<Response> {
    let sender_addr = deps.api.addr_canonicalize(info.sender.as_str())?;
    let found = reward_store(deps.storage).may_load(&sender_addr)?.is_some();
    if !found {
        return Err(StdError::generic_err("unauthorized"));
    }

    let config = read_config(deps.storage)?;
    Ok(Response::new()
        .add_messages(vec![CosmosMsg::Wasm(WasmMsg::Execute {
            contract_addr: deps.api.addr_humanize(&config.spectrum_gov)?.to_string(),
            msg: to_binary(&GovExecuteMsg::harvest {
                aust_amount,
                days,
            })?,
            funds: vec![],
        })]))
}

fn update_stake(
    deps: DepsMut,
    info: MessageInfo,
    amount: Uint128,
    from_days: u64,
    to_days: u64,
) -> StdResult<Response> {
    let sender_addr = deps.api.addr_canonicalize(info.sender.as_str())?;
    let found = reward_store(deps.storage).may_load(&sender_addr)?.is_some();
    if !found {
        return Err(StdError::generic_err("unauthorized"));
    }

    let config = read_config(deps.storage)?;
    Ok(Response::new()
        .add_messages(vec![CosmosMsg::Wasm(WasmMsg::Execute {
            contract_addr: deps.api.addr_humanize(&config.spectrum_gov)?.to_string(),
            msg: to_binary(&GovExecuteMsg::update_stake {
                amount,
                from_days,
                to_days
            })?,
            funds: vec![],
        })]))
}

fn withdraw(
    deps: DepsMut,
    env: Env,
    info: MessageInfo,
    spec_amount: Option<Uint128>,
    aust_amount: Option<Uint128>,
) -> StdResult<Response> {
    let sender_addr = deps.api.addr_canonicalize(info.sender.as_str())?;
    let reward_info = read_reward(deps.storage, &sender_addr)?;
    if reward_info.disable_withdraw {
        return Err(StdError::generic_err("unauthorized"));
    }

    let config = read_config(deps.storage)?;

    let spectrum_token = deps.api.addr_humanize(&config.spectrum_token)?;
    let spec_onhand = query_token_balance(&deps.querier, spectrum_token.clone(), env.contract.address.clone())?;


entityIn.motionX *= 0.20000000298023224D;
                                entityIn.motionZ *= 0.20000000298023224D;
                                entityIn.addVelocity(d7 + d0, 0.0D, d8 + d1);
                            }
                        }
                        else
                        {
                            this.addVelocity(-d0, 0.0D, -d1);
                            entityIn.addVelocity(d0 / 4.0D, 0.0D, d1 / 4.0D);
                        }
                    }
                }
            }
        }
    }

    public void setPositionAndRotation2(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean p_180426_10_)
    {
        this.minecartX = x;
        this.minecartY = y;
        this.minecartZ = z;
        this.minecartYaw = (double)yaw;
        this.minecartPitch = (double)pitch;
        this.turnProgress = posRotationIncrements + 2;
        this.motionX = this.velocityX;
        this.motionY = this.velocityY;
        this.motionZ = this.velocityZ;
    }

    public void setVelocity(double x, double y, double z)
    {
        this.velocityX = this.motionX = x;
        this.velocityY = this.motionY = y;
        this.velocityZ = this.motionZ = z;
    }

    public void setDamage(float p_70492_1_)
    {
        this.dataWatcher.updateObject(19, Float.valueOf(p_70492_1_));
    }

    public float getDamage()
    {
        return this.dataWatcher.getWatchableObjectFloat(19);
    }

    public void setRollingAmplitude(int p_70497_1_)
    {
        this.dataWatcher.updateObject(17, Integer.valueOf(p_70497_1_));
    }

    public int getRollingAmplitude()
    {
        return this.dataWatcher.getWatchableObjectInt(17);
    }

    public void setRollingDirection(int p_70494_1_)
    {
        this.dataWatcher.updateObject(18, Integer.valueOf(p_70494_1_));
    }

    public int getRollingDirection()
    {
        return this.dataWatcher.getWatchableObjectInt(18);
    }

    public abstract EntityMinecart.EnumMinecartType getMinecartType();

    public IBlockState getDisplayTile()
    {
        return !this.hasDisplayTile() ? this.getDefaultDisplayTile() : Block.getStateById(this.getDataWatcher().getWatchableObjectInt(20));
    }

    public IBlockState getDefaultDisplayTile()
    {
        return Blocks.air.getDefaultState();
    }

    public int getDisplayTileOffset()
    {
        return !this.hasDisplayTile() ? this.getDefaultDisplayTileOffset() : this.getDataWatcher().getWatchableObjectInt(21);
    }

    public int getDefaultDisplayTileOffset()
    {
        return 6;
    }

    public void func_174899_a(IBlockState p_174899_1_)
    {
        this.getDataWatcher().updateObject(20, Integer.valueOf(Block.getStateId(p_174899_1_)));
        this.setHasDisplayTile(true);
    }

    public void setDisplayTileOffset(int p_94086_1_)
    {
        this.getDataWatcher().updateObject(21, Integer.valueOf(p_94086_1_));
        this.setHasDisplayTile(true);
    }

    public boolean hasDisplayTile()
    {
        return this.getDataWatcher().getWatchableObjectByte(22) == 1;
    }

    public void setHasDisplayTile(boolean p_94096_1_)
    {
        this.getDataWatcher().updateObject(22, Byte.valueOf((byte)(p_94096_1_ ? 1 : 0)));
    }

    public void setCustomNameTag(String name)
    {
        this.entityName = name;
    }

    public String getName()
    {
        return this.enti


_cell<T: for<'de> Deserialize<'de>>(
        tree: &Tree,
        row: usize,
        col: usize,
    ) -> Result<Option<T>> {
        load_value(tree, make_cell_key(row, col))
    }

    pub fn remove_cell<T: for<'de> Deserialize<'de>>(
        tree: &Tree,
        row: usize,
        col: usize,
    ) -> Result<Option<T>> {
        remove_value(tree, make_cell_key(row, col))
    }

    pub fn load_value<T: for<'de> Deserialize<'de>>(
        tree: &Tree,
        key: impl AsRef<[u8]>,
    ) -> Result<Option<T>> {
        let value = tree.get(key)?.map(bytes_to_value).transpose()?;
        Ok(value)
    }

    pub fn swap_value<T: Serialize + for<'de> Deserialize<'de>>(
        tree: &Tree,
        key: impl AsRef<[u8]>,
        value: &T,
    ) -> Result<Option<T>> {
        let bytes = value_to_bytes(value)?;
        tree.insert(key, bytes)?.map(bytes_to_value).transpose()
    }

    pub fn remove_value<T: for<'de> Deserialize<'de>>(
        tree: &Tree,
        key: impl AsRef<[u8]>,
    ) -> Result<Option<T>> {
        tree.remove(key)?.map(bytes_to_value).transpose()
    }

    fn value_to_bytes<T: Serialize>(value: &T) -> Result<Vec<u8>> {
        bincode::serialize(value).map_err(Error::FailedToSerialize)
    }

    fn bytes_to_value<T: for<'de> Deserialize<'de>>(bytes: impl AsRef<[u8]>) -> Result<T> {
        let value = bincode::deserialize(bytes.as_ref()).map_err(Error::FailedToDeserialize)?;
        Ok(value)
    }

    fn make_cell_key(row: usize, col: usize) -> Vec<u8> {
        let mut buf = Vec::with_capacity((2 * mem::size_of::<usize>()) as usize);
        buf.extend(&row.to_be_bytes());
        buf.extend(&col.to_be_bytes());

        buf
    }
}

#[cfg(test)]
mod tests {
    use super::*;
    use crate::DynamicTable;
    use sled::Config;

    #[test]
    fn should_persist_across_creations() {
        let db = Config::default()
            .temporary(true)
            .open()
            .expect("Failed to create sled db");

        // NOTE: Will be deleted once dropped; uses Arc<...> to track internally,
        //       so we can clone this without issue
        let tree = db
            .open_tree("test_table")
            .expect("Failed to create test_table tree");

        // First, load a clean table and populate it
        {
            let mut table = SledTable::<
                _,
                DynamicList<usize>,
                DynamicList<usize>,
                DynamicTable<usize>,
            >::try_from(tree.clone())
            .expect("Failed to load table");
            assert!(table.is_empty(), "Table populated unexpectedly");

            table.push_row(vec![1, 2, 3, 4]);
            table.push_row(vec![5, 6, 7, 8]);
            table.flush(false).expect("Failed to persist to disk");

            // There should not have been errors
            if table.has_errors() {
                panic!(
                    "[1] Encountered errors with table: {}",
                    table
                        .take_errors()
                        .iter()
                        .map(ToString::to_string)
                        .collect::<Vec<String>>()
                        .join("\n")
                );
            }
        }

        // Second, reload the table, which sled should populate
        {
            let mut table = SledTable::<
                _,
                DynamicList<usize>,
                DynamicList<usize>,
                DynamicTable<usize>,
            >::try_from(tree)
            .expect("Failed to load table");
            assert!(!table.is_empty(),


 code must fall back to having a nullable type.
  /// Consider adding a "default:" property in the specification file to hide this note.
  ///
  DateTime? time;

  /// Gets or sets the quote asset ID of the exchange rate.
  String? assetIdQuote;

  /// Gets or sets the exchange rate value.
  ///
  /// Please note: This property should have been non-nullable! Since the specification file
  /// does not include a default value (using the "default:" property), however, the generated
  /// source code must fall back to having a nullable type.
  /// Consider adding a "default:" property in the specification file to hide this note.
  ///
  double? rate;

  @override
  bool operator ==(Object other) => identical(this, other) || other is V1ExchangeRatesRate &&
    other.time == time &&
    other.assetIdQuote == assetIdQuote &&
    other.rate == rate;

  @override
  int get hashCode =>
    // ignore: unnecessary_parenthesis
    (time == null ? 0 : time!.hashCode) +
    (assetIdQuote == null ? 0 : assetIdQuote!.hashCode) +
    (rate == null ? 0 : rate!.hashCode);

  @override
  String toString() => 'V1ExchangeRatesRate[time=$time, assetIdQuote=$assetIdQuote, rate=$rate]';

  Map<String, dynamic> toJson() {
    final json = <String, dynamic>{};
    if (this.time != null) {
      json[r'time'] = this.time!.toUtc().toIso8601String();
    } else {
      json[r'time'] = null;
    }
    if (this.assetIdQuote != null) {
      json[r'asset_id_quote'] = this.assetIdQuote;
    } else {
      json[r'asset_id_quote'] = null;
    }
    if (this.rate != null) {
      json[r'rate'] = this.rate;
    } else {
      json[r'rate'] = null;
    }
    return json;
  }

  /// Returns a new [V1ExchangeRatesRate] instance and imports its values from
  /// [value] if it's a [Map], null otherwise.
  // ignore: prefer_constructors_over_static_methods
  static V1ExchangeRatesRate? fromJson(dynamic value) {
    if (value is Map) {
      final json = value.cast<String, dynamic>();

      // Ensure that the map contains the required keys.
      // Note 1: the values aren't checked for validity beyond being non-null.
      // Note 2: this code is stripped in release mode!
      assert(() {
        requiredKeys.forEach((key) {
          assert(json.containsKey(key), 'Required key "V1ExchangeRatesRate[$key]" is missing from JSON.');
          assert(json[key] != null, 'Required key "V1ExchangeRatesRate[$key]" has a null value in JSON.');
        });
        return true;
      }());

      return V1ExchangeRatesRate(
        time: mapDateTime(json, r'time', r''),
        assetIdQuote: mapValueOfType<String>(json, r'asset_id_quote'),
        rate: mapValueOfType<double>(json, r'rate'),
      );
    }
    return null;
  }

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

  static Map<String, V1ExchangeRatesRate> mapFromJson(dynamic json) {
    final map = <String, V1ExchangeRatesRate>{};
    if (js


0 0-2-2h-16a2 2 0 0 0-2 2V3a3 3 0 0 1 3-3h14z",wc,.5)+Y("M.001 9V8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1h-7a3 3 0 0 1-6 0h-7z")+Y("M18.001 3a2 2 0 0 1 2 2v3l-.005-.15A2 2 0 0 0 18 6h-16a2 2 0 0 0-2 2V5a2 2 0 0 1 2-2h16z",wc,.75))+Z(fm+_d,Y("M12.5 19a.5.5 0 1 1 0 1h-5a.5.5 0 1 1 0-1h5zm3.014-19l.35.01A1.2 1.2 0 0 1 17 1.21v12.123a1.5 1.5 0 0 1-1.504 1.497h-.01a6.119 6.119 0 0 0-2.794.621 9.371 9.371 0 0 0-2.192 1.475v.046H18a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1v-1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2h-7.5V18h-.998l-.002-.001H2a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5.5c.813 0 1.55.324 2.09.849L9.5 4c.582-1.023 1.31-1.927 2.7-2.85C13.167.51 14.472-.004 15.514 0zM7.5 4H2a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h7.5V6a2 2 0 0 0-2-2zm7.978-3c-.887 0-2.04.49-2.865 1.062-1.028.712-1.508 1.397-2.001 2.062l-.112.16v11.344l.098-.074c.407-.301.841-.575 1.302-.821l.351-.18a7.118 7.118 0 0 1 3.244-.723.5.5 0 0 0 .505-.497V1.208a.2.2 0 0 0-.19-.2L15.479 1zM8 14v1H3v-1h5zm0-2v1H3v-1h5zM6 6v3H3V6h3z"))+Z(fm+Jd,Y("M18 2.973a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2l-7.5-.001V18H2a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5.5a3 3 0 0 1 2.745 1.787A2.998 2.998 0 0 1 13 2.973h5z",wc,.3)+Y("M15.863.01A1.2 1.2 0 0 1 17 1.21v12.123a1.5 1.5 0 0 1-1.504 1.497h-.01a6.119 6.119 0 0 0-2.794.621c-1.291.633-2.355 1.483-3.192 2.55v-14c.582-1.023 1.31-1.927 2.7-2.85C13.167.51 14.472-.004 15.514 0l.35.01zM7.5 19h5a.5.5 0 1 1 0 1h-5a.5.5 0 0 1 0-1z")+Y("M3 6h3v3H3zm0 6h5v1H3zm0 2h5v1H3z"))+Z(dm+_d,Y("M17 0a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3h14zm1 15H2v1h16v-1zm0-2H2v1h16v-1zm-8-4H2v2h8V9zm7.4-7h-3.6a.6.6 0 0 0 0 1.2h2.15l-3.774 3


data)
{
  unsigned short int crc = static_cast<unsigned short int>(init_val);
  while (size--)
  {
    crc = (crc << 8) ^ table[((crc >> 8) ^ *data++) & 0xFF];
  }
  return crc;
}
/**
*      _____
*     /  _  \
*    / _/ \  \
*   / / \_/   \
*  /  \_/  _   \  ___  _    ___   ___   ____   ____   ___   _____  _   _
*  \  / \_/ \  / /  _\| |  | __| / _ \ | ++ \ | ++ \ / _ \ |_   _|| | | |
*   \ \_/ \_/ /  | |  | |  | ++ | |_| || ++ / | ++_/| |_| |  | |  | +-+ |
*    \  \_/  /   | |_ | |_ | ++ |  _  || |\ \ | |   |  _  |  | |  | +-+ |
*     \_____/    \___/|___||___||_| |_||_| \_\|_|   |_| |_|  |_|  |_| |_|
*             ROBOTICS™
*
*  File: Logger.cpp
*  Desc: Provides the Logger singleton which is used within the Clearpath API
*        for log / trace message control
*  Auth: Iain Peet
*
*  Copyright (c) 2010, Clearpath Robotics, Inc.
*  All Rights Reserved
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*     * Redistributions of source code must retain the above copyright
*       notice, this list of conditions and the following disclaimer.
*     * Redistributions in binary form must reproduce the above copyright
*       notice, this list of conditions and the following disclaimer in the
*       documentation and/or other materials provided with the distribution.
*     * Neither the name of Clearpath Robotics, Inc. nor the
*       names of its contributors may be used to endorse or promote products
*       derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL CLEARPATH ROBOTICS, INC. BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Please send comments, questions, or patches to skynet@clearpathrobotics.com
*
*/

#include <iostream>
#include <fstream>
#include <signal.h>
#include <unistd.h>

using namespace std;

#include "husky_base/horizon_legacy/Logger.h"

namespace clearpath
{

  const char *Logger::levelNames[] = {"ERROR", "EXCEPTION", "WARNING", "INFO", "DETAIL"};

  void loggerTermHandler(int signum)
  {
    Logger::instance().close();

    if ((signum == SIGABRT) || (signum == SIGSEGV))
    {
      /* We need to catch these so we can flush out any last messages.
       * having done this, probably the most consistent thing to do
       * is re-raise the signal.  (We certainly don't want to just
       * ignore these) */
      signal(signum, SIG_DFL);
      kill(getpid(), signum);
    }
  }

  Logger &Logger::instance()
  {
    static Logger instance;
    return instance;
  }

  Logger::Logger()


 pika",divide:"Shenja ndarëse",oslash:"Shkronja e vogël latine o me vizë në mes",
ugrave:"Shkronja e vogë latine u me theks të rëndë",uacute:"Shkronja e vogë latine u me theks të mprehtë",ucirc:"Shkronja e vogël latine u me theks lakor",uuml:"Shkronja e vogël latine u me dy pika",yacute:"Shkronja e vogë latine y me theks të mprehtë",thorn:"Shkronja e vogël latine thorn",yuml:"Shkronja e vogël latine y me dy pika",OElig:"Shkronja e madhe e bashkuar latine OE",oelig:"Shkronja e vogël e bashkuar latine oe",372:"Shkronja e madhe latine W me theks lakor",374:"Shkronja e madhe latine Y me theks lakor",
373:"Shkronja e vogël latine w me theks lakor",375:"Shkronja e vogël latine y me theks lakor",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis",trade:"Shenja e Simbolit Tregtarë",9658:"Black right-pointing pointer",bull:"Pulla",rarr:"Shigjeta djathtas",rArr:"Shenja të dyfishta djathtas",hArr:"Shigjeta e dyfishë majtas-djathtas",diams:"Black diamond suit",asymp:"Gati e barabar me"});/*
 Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("specialchar","vi",{euro:"Ký hiệu Euro",lsquo:"Dấu ngoặc đơn trái",rsquo:"Dấu ngoặc đơn phải",ldquo:"Dấu ngoặc đôi trái",rdquo:"Dấu ngoặc đôi phải",ndash:"Gạch ngang tiếng anh",mdash:"Gạch ngang Em",iexcl:"Chuyển đổi dấu chấm than",cent:"Ký tự tiền Mỹ",pound:"Ký tự tiền Anh",curren:"Ký tự tiền tệ",yen:"Ký tự tiền Yên Nhật",brvbar:"Thanh hỏng",sect:"Ký tự khu vực",uml:"Dấu tách đôi",copy:"Ký tự bản quyền",ordf:"Phần chỉ thị giống cái",laquo:"Chọn dấu ngoặc đôi trái",not:"Không có ký tự",
reg:"Ký tự đăng ký",macr:"Dấu nguyên âm dài",deg:"Ký tự độ",sup2:"


: vcmpeqpd 4096(%rdx), %zmm19, %k2
// CHECK: encoding: [0x62,0xf1,0xe5,0x40,0xc2,0x52,0x40,0x00]
vcmpeqpd 4096(%rdx), %zmm19, %k2

// CHECK: vcmpeqpd 4096(%rdx), %zmm19, %k2 {%k2}
// CHECK: encoding: [0x62,0xf1,0xe5,0x42,0xc2,0x52,0x40,0x00]
vcmpeqpd 4096(%rdx), %zmm19, %k2 {%k2}

// CHECK: vcmpeqpd 485498096{1to8}, %zmm19, %k2
// CHECK: encoding: [0x62,0xf1,0xe5,0x50,0xc2,0x14,0x25,0xf0,0x1c,0xf0,0x1c,0x00]
vcmpeqpd 485498096{1to8}, %zmm19, %k2

// CHECK: vcmpeqpd 485498096{1to8}, %zmm19, %k2 {%k2}
// CHECK: encoding: [0x62,0xf1,0xe5,0x52,0xc2,0x14,0x25,0xf0,0x1c,0xf0,0x1c,0x00]
vcmpeqpd 485498096{1to8}, %zmm19, %k2 {%k2}

// CHECK: vcmpeqpd 485498096, %zmm19, %k2
// CHECK: encoding: [0x62,0xf1,0xe5,0x40,0xc2,0x14,0x25,0xf0,0x1c,0xf0,0x1c,0x00]
vcmpeqpd 485498096, %zmm19, %k2

// CHECK: vcmpeqpd 485498096, %zmm19, %k2 {%k2}
// CHECK: encoding: [0x62,0xf1,0xe5,0x42,0xc2,0x14,0x25,0xf0,0x1c,0xf0,0x1c,0x00]
vcmpeqpd 485498096, %zmm19, %k2 {%k2}

// CHECK: vcmpeqpd 512(%rdx){1to8}, %zmm19, %k2
// CHECK: encoding: [0x62,0xf1,0xe5,0x50,0xc2,0x52,0x40,0x00]
vcmpeqpd 512(%rdx){1to8}, %zmm19, %k2

// CHECK: vcmpeqpd 512(%rdx){1to8}, %zmm19, %k2 {%k2}
// CHECK: encoding: [0x62,0xf1,0xe5,0x52,0xc2,0x52,0x40,0x00]
vcmpeqpd 512(%rdx){1to8}, %zmm19, %k2 {%k2}

// CHECK: vcmpeqpd 512(%rdx,%rax){1to8}, %zmm19, %k2
// CHECK: encoding: [0x62,0xf1,0xe5,0x50,0xc2,0x54,0x02,0x40,0x00]
vcmpeqpd 512(%rdx,%rax){1to8}, %zmm19, %k2

// CHECK: vcmpeqpd 512(%rdx,%rax){1to8}, %zmm19, %k2 {%k2}
// CHECK: encoding: [0x62,0xf1,0xe5,0x52,0xc2,0x54,0x02,0x40,0x00]
vcmpeqpd 512(%rdx,%rax){1to8}, %zmm19, %k2 {%k2}

// CHECK: vcmpeqpd 512(%rdx,%rax,4){1to8},


op(6)
            mock.op(5)
        }
    }

    @Test
    fun checkVerifyInverse1() {
        doCalls()

        verify(inverse = true) {
            mock.op(6)
            mock.op(8)
        }
    }

    @Test
    fun checkVerifyInverse2() {
        doCalls()

        verify(inverse = true) {
            mock.op(4)
            mock.op(8)
        }
    }

    @Test
    fun checkVerifyOrder1() {
        doCalls()

        verifyOrder {
            mock.op(5)
            mock.op(7)
        }
    }

    @Test
    fun checkVerifyOrder2() {
        doCalls()

        verifyOrder {
            mock.op(5)
            mock.op(6)
        }
    }

    @Test
    fun checkVerifyOrder3() {
        doCalls()

        verifyOrder {
            mock.op(6)
            mock.op(7)
        }
    }

    @Test
    fun checkVerifyOrderInverse1() {
        doCalls()

        verifyOrder(inverse = true) {
            mock.op(7)
            mock.op(5)
        }
    }

    @Test
    fun checkVerifyOrderInverse2() {
        doCalls()

        verifyOrder(inverse = true) {
            mock.op(5)
            mock.op(4)
        }
    }

    @Test
    fun checkVerifyOrderInverse3() {
        doCalls()

        verifyOrder(inverse = true) {
            mock.op(4)
            mock.op(8)
        }
    }

    @Test
    fun verifySequence() {
        doCalls()

        verifySequence {
            mock.op(5)
            mock.op(6)
            mock.op(7)
        }
    }

    @Test
    fun verifySequenceInverse1() {
        doCalls()

        verifySequence(inverse = true) {
            mock.op(6)
            mock.op(7)
        }
    }

    @Test
    fun verifySequenceInverse2() {
        doCalls()

        verifySequence(inverse = true) {
            mock.op(7)
            mock.op(6)
            mock.op(5)
        }
    }

    @Test
    fun verifySequenceInverse3() {
        doCalls()

        verifySequence(inverse = true) {
            mock.op(6)
            mock.op(5)
            mock.op(7)
        }
    }

    @Test
    fun verifyCount() {
        doCalls()

        verifyCount {
            0 * { mock.op(4) } // not called
            1 * { mock.op(5) } // called
            (0..Int.MAX_VALUE) * { mock.op(6) } // called
            (1..1) * { mock.op(7) } // called
            (0..0) * { mock.op(8) } // not called
            (0..1) * { mock.op(9) } // not called
        }
    }

    /**
     * See issue #109
     */
    @Test
    fun verifyWithToString() {
        val foo = mockk<Foo>()
        val bar = mockk<Bar>()

        every { bar.baz("$foo") } just runs

        bar.baz("$foo")

        verify(exactly = 1) { bar.baz("$foo") }

    }

    class Bar {
        fun baz(foo: String) {
            println(foo)
        }
    }

    class Foo {
        override fun toString(): String {
            return "foo"
        }
    }

    class MockCls {
        fun op(a: Int) = a + 1
    }
}
package io.mockk.it

import io.mockk.Called
import io.mockk.clearAllMocks
import io.mockk.every
import io.mockk.mockk
import io.mockk.verify
import io.mockk.verifyCount
import io.mockk.verifyOrder
import io.mockk.verifySequence
import kotlin.test.Test
import kotlin.


class="permalink"> final  def notifyAll(): Unit

Definition Classes

AnyRef

Annotations

@native()

  final  def synchronized[T0](arg0: => T0): T0

Definition Classes

AnyRef

   def toString(): String

Definition Classes

Command → AnyRef → Any

  final  def wait()<span class


) {
		showBanner()
		gologger.Info().Msgf("RiverPass Engine Version: v%s", Version)
		gologger.Info().Msgf("RiverPass Config Directory: %s", DefaultConfig)
		os.Exit(0)
	}
}
package core

import (
	"fmt"
	"github.com/fatih/color"
)

func Logo() {
	logo := "                                                      ,,                              \n" +
		"`7MM\"\"\"Yb.            mm            `7MMM.     ,MMF'  db                              \n" +
		"  MM    `Yb.          MM              MMMb    dPMM                                    \n" +
		"  MM     `Mb  ,6\"Yb.mmMMmm  ,6\"Yb.    M YM   ,M MM  `7MM  `7MMpMMMb.  .gP\"Ya `7Mb,od8 \n" +
		"  MM      MM 8)   MM  MM   8)   MM    M  Mb  M' MM    MM    MM    MM ,M'   Yb  MM' \"' \n" +
		"  MM     ,MP  ,pm9MM  MM    ,pm9MM    M  YM.P'  MM    MM    MM    MM 8M\"\"\"\"\"\"  MM     \n" +
		"  MM    ,dP' 8M   MM  MM   8M   MM    M  `YM'   MM    MM    MM    MM YM.    ,  MM     \n" +
		".JMMmmmdP'   `Moo9^Yo.`Mbmo`Moo9^Yo..JML. `'  .JMML..JMML..JMML  JMML.`Mbmmd'.JMML.  "

	magenta := color.New(color.FgMagenta)
	hiMagenta := color.New(color.FgHiMagenta)
	cyan := color.New(color.FgCyan)

	colorIndex := 0
	for _, line := range splitLines(logo) {
		switch colorIndex {
		case 0, 3, 5, 6:
			magenta.Println(line)
		case 2:
			hiMagenta.Println(line)
		default:
			cyan.Println(line)
		}
		colorIndex++
	}
	color.Unset()
	fmt.Println()
}

// splitLines splits a string into lines and returns a slice of lines
func splitLines(s string) []string {
	var lines []string
	start := 0
	for i, c := range s {
		if c == '\n' {
			lines = append(lines, s[start:i])
			start = i + 1
		}
	}
	if start < len(s) {
		lines = append(lines, s[start:])
	}
	return lines
}package core

import (
	"fmt"
	"log"
	"reflect"
	"regexp"
	"strings"
	"sync"
	"database/sql"
	"dataMiner/models"
	"dataMiner/utils"
	"dataMiner/dblib"
	"github.com/dlclark/regexp2"
	"go.mongodb.org/mongo-driver/bson"
	"go.mongodb.org/mongo-driver/mongo"
)

// Turn tables into iterator struct
type  Alltables struct {
	tables []string
}

func (i Alltables) Iterator() *Iterator {
	return &Iterator{
		data:  i,
		index: 0,
	}
}

type Iterator struct {
	data Alltables
	index int
}

func (i *Iterator) HasNext() bool {
	return i.index < len(i.data.tables)
}

func (i *Iterator) Next() string {
	tbl := i.data.tables[i.index]
	i.index++
	return tbl
}

var passwdTable []string   //store the table which has pass,passwd or password column

/*
  Look for sensitive data in the database,such as email address,phone number,ID card number and password
  @Param  db (database handle)
  @Param  client (mongo database handle)
  @Param


r this
    // battery should have a value of 0, where zero indicates not supported (note,
    // this is different than for the voltages field and allows empty byte truncation).
    // If the measured value is 0 then 1 should be sent instead.
    uint16_t voltages_ext[4] = { 0 };
    virtual std::string toJSon();

protected:
    virtual int pack(char* buffer) const;
    virtual int unpack(const char* buffer);
};

// Version and capability of autopilot software. This should be emitted in response
// to a request with MAV_CMD_REQUEST_MESSAGE.
class MavLinkAutopilotVersion : public MavLinkMessageBase
{
public:
    const static uint8_t kMessageId = 148;
    MavLinkAutopilotVersion() { msgid = kMessageId; }
    // Bitmap of capabilities
    uint64_t capabilities = 0;
    // Firmware version number
    uint32_t flight_sw_version = 0;
    // Middleware version number
    uint32_t middleware_sw_version = 0;
    // Operating system version number
    uint32_t os_sw_version = 0;
    // HW / board version (last 8 bytes should be silicon ID, if any)
    uint32_t board_version = 0;
    // Custom version field, commonly the first 8 bytes of the git hash. This is not
    // an unique identifier, but should allow to identify the commit using the main
    // version number even for very large code bases.
    uint8_t flight_custom_version[8] = { 0 };
    // Custom version field, commonly the first 8 bytes of the git hash. This is not
    // an unique identifier, but should allow to identify the commit using the main
    // version number even for very large code bases.
    uint8_t middleware_custom_version[8] = { 0 };
    // Custom version field, commonly the first 8 bytes of the git hash. This is not
    // an unique identifier, but should allow to identify the commit using the main
    // version number even for very large code bases.
    uint8_t os_custom_version[8] = { 0 };
    // ID of the board vendor
    uint16_t vendor_id = 0;
    // ID of the product
    uint16_t product_id = 0;
    // UID if provided by hardware (see uid2)
    uint64_t uid = 0;
    // UID if provided by hardware (supersedes the uid field. If this is non-zero,
    // use this field, otherwise use uid)
    uint8_t uid2[18] = { 0 };
    virtual std::string toJSon();

protected:
    virtual int pack(char* buffer) const;
    virtual int unpack(const char* buffer);
};

// The location of a landing target. See: https://mavlink.io/en/services/landing_target.html
class MavLinkLandingTarget : public MavLinkMessageBase
{
public:
    const static uint8_t kMessageId = 149;
    MavLinkLandingTarget() { msgid = kMessageId; }
    // Timestamp (UNIX Epoch time or time since system boot). The receiving end can
    // infer timestamp format (since 1.1.1970 or since system boot) by checking for
    // the magnitude of the number.
    uint64_t time_usec = 0;
    // The ID of the target if multiple targets are present
    uint8_t target_num = 0;
    // Coordinate frame used for following fields.
    uint8_t frame = 0;
    // X-axis angular offset of the target from the center of the image
    float angle_x = 0;
    // Y-axis angular offset of the target from the center of the image
    float angle_y = 0;
    // Distance to the target from the vehicle
    float distance = 0;
    // Size of target along x-axis
    float size_x = 0;
    // Size of target along y-axis
    float size_y = 0;
    // X Position of the landing target in MAV_FRAME
    float x = 0;
    // Y Position of the landing target in MAV_FRAME


dows",
		"Control",
		"Shift",
		"Alt",
		"Super",
	],
	"vs/base/common/severity": [
        "错误",//Error
        "警告",//Warning
        "信息",//Info
	],
	"vs/base/parts/quickopen/browser/quickOpenModel": [
		"{0}, picker",
		"picker",
	],
	"vs/base/parts/quickopen/browser/quickOpenWidget": [
		"Quick picker. Type to narrow down results.",
		"Quick Picker",
        "{0} 个结果",//Results
	],
	"vs/editor/browser/controller/coreCommands": [
        "&&全选",//Select All
        "&&撤消",//Undo
        "&&重做",//Redo
	],
	"vs/editor/browser/widget/codeEditorWidget": [
        "光标数量被限制在 {0} 个。",//The number of cursors has been limited to {0}.
	],
	"vs/editor/browser/widget/diffEditorWidget": [
        "因为一个文件太大，无法比较文件。",//Cannot compare files because one file is too large.
	],
	"vs/editor/browser/widget/diffReview": [
        "关闭",//Close
        "没有行",//no lines
        "1 行",//1 line
        "{0} 行",//lines
		"Difference {0} of {1}: original {2}, {3}, modified {4}, {5}",//
        "空白",//blank
		"original {0}, modified {1}: {2}",//
		"+ modified {0}: {1}",//
		"- original {0}: {1}",//
        "转到下一处差异",//Go to Next Difference
        "转到上一处差异",//Go to Previous Difference
	],
	"vs/editor/common/config/commonEditorConfig": [
        "编辑器",//Editor
		"Controls the font family.",
		"Controls the font weight.",
		"Controls the font size in pixels.",
		"Controls the line height. Use 0 to compute the line height from the font size.",
		"Controls the letter spacing in pixels.",
		"Line numbers are not rendered.",
		"Line numbers are rendered as absolute number.",
		"Line numbers are rendered as distance in lines to cursor position.",
		"Line numbers are rendered every 10 lines.",
		"Controls the display of line numbers.",
		"Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.",
		"Characters that will be used as word separators when doing word related navigations or operations.",
		"The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.",
		"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.",
		"Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.",
		"Controls whether selections should have rounded corners.",
		"Controls whether the editor will scroll beyond the last line.",
		"Controls the number of extra characters beyond which the editor will scroll horizontally.",
		"Controls whether the editor will scroll using


e dimgap) {
    checkModified(dimgap, DIMGAP, $DIMGAP);
    DIMGAP = dimgap;
}

void LC_DimStyle::DimensionLine::setColor(RS_Color dimclrd) {
    checkModified(dimclrd, DIMCLRD, $DIMCLRD);
    DIMCLRD = dimclrd;
}

void LC_DimStyle::DimensionLine::setLineWidth(RS2::LineWidth dimlwd) {
    checkModified(dimlwd, DIMLWD, $DIMLWD);
    DIMLWD = dimlwd;
}

void LC_DimStyle::DimensionLine::setDistanceBeyondExtLinesForObliqueStroke(double dimdle) {
    checkModified(dimdle, DIMDLE, $DIMDLE);
    DIMDLE = dimdle;
}

void LC_DimStyle::DimensionLine::setBaselineDimLinesSpacing(double dimdli) {
    checkModified(dimdli, DIMDLI, $DIMDLI);
    DIMDLI = dimdli;
}

void LC_DimStyle::DimensionLine::setSuppressFirstLine(DimLineAndArrowSuppressionPolicy dimsd1) {
    checkModified(dimsd1, DIMSD1, $DIMSD1);
    DIMSD1 = dimsd1;
}

void LC_DimStyle::DimensionLine::setSuppressSecondLine(DimLineAndArrowSuppressionPolicy dimsd2) {
    checkModified(dimsd2, DIMSD2, $DIMSD2);
    DIMSD2 = dimsd2;
}

void LC_DimStyle::DimensionLine::setDrawPolicyForOutsideText(DrawPolicyForOutsideText dimtofl) {
    checkModified(dimtofl, DIMTOFL, $DIMTOFL);
    DIMTOFL = dimtofl;
}

void LC_DimStyle::DimensionLine::setLineType(QString dimltype) {
    checkModified(dimltype, DIMLTYPE, $DIMLTYPE);
    DIMLTYPE = dimltype;
    DIMLTYPE_LineType = RS_FilterDXFRW::nameToLineType(dimltype);
}

void LC_DimStyle::DimensionLine::setLineType(RS2::LineType lineType) {
    checkModified(lineType, DIMLTYPE_LineType, $DIMLTYPE);
    DIMLTYPE_LineType = lineType;
    DIMLTYPE = RS_FilterDXFRW::lineTypeToName(lineType);
}

void LC_DimStyle::ExtensionLine::fillByDefaults() {
    DIMCLRE = RS2::FlagByBlock;
    DIMEXE = 1.2500;
    DIMEXO = 0.625;
    DIMFXL = 1.0;
    DIMFXLON = false;
    DIMLTEX1 = "ByBlock";
    DIMLTEX2 = "ByBlock";
    DIMLTEX1_linetype = RS2::LineByBlock;
    DIMLTEX2_linetype = RS2::LineByBlock;
    DIMLWE =  RS2::WidthByBlock;
    DIMSE1 = DONT_SUPPRESS;
    DIMSE2 = DONT_SUPPRESS;
}

void LC_DimStyle::ExtensionLine::copyTo(ExtensionLine* c) {
    copyFlags(c);
    c->DIMCLRE = DIMCLRE;
    c->DIMEXE = DIMEXE;
    c->DIMEXO = DIMEXO;
    c->DIMFXL = DIMFXL;
    c->DIMFXLON = DIMFXLON;
    c->DIMLTEX1 = DIMLTEX1;
    c->DIMLTEX2 = DIMLTEX2;
    c->DIMLTEX1_linetype = DIMLTEX1_linetype;
    c->DIMLTEX2_linetype = DIMLTEX2_linetype;
    c->DIMLWE = DIML


opacity: 0.5; /* Safari, Opera and Mozilla */
}

.cke_skin_office2003 .cke_hc .cke_rcombo .cke_disabled .cke_text,
.cke_skin_office2003 .cke_hc .cke_rcombo .cke_disabled .cke_openbutton
{
	filter: alpha(opacity=80);
	opacity: 0.8;
}

.cke_skin_office2003 .cke_rcombo .cke_disabled .cke_text
{
	color: #fff;
}

/* Firefox 2 & WebKit Section */

.cke_skin_office2003 .cke_browser_gecko18 .cke_rcombo,
.cke_skin_office2003 .cke_browser_gecko18 .cke_rcombo .cke_label,
.cke_skin_office2003 .cke_browser_gecko18 .cke_rcombo .cke_text,
.cke_skin_office2003 .cke_browser_gecko18 .cke_rcombo .cke_openbutton,
.cke_skin_office2003 .cke_browser_webkit .cke_rcombo .cke_label,
.cke_skin_office2003 .cke_browser_webkit .cke_rcombo .cke_text,
.cke_skin_office2003 .cke_browser_webkit .cke_rcombo .cke_openbutton
{
	display: block;
	float: left;
}

.cke_skin_office2003 .cke_browser_gecko18 .cke_rtl .cke_rcombo,
.cke_skin_office2003 .cke_browser_gecko18 .cke_rtl .cke_rcombo .cke_label,
.cke_skin_office2003 .cke_browser_gecko18 .cke_rtl .cke_rcombo .cke_text,
.cke_skin_office2003 .cke_browser_gecko18 .cke_rtl .cke_rcombo .cke_openbutton,
.cke_skin_office2003 .cke_browser_webkit .cke_rtl .cke_rcombo .cke_label,
.cke_skin_office2003 .cke_browser_webkit .cke_rtl .cke_rcombo .cke_text,
.cke_skin_office2003 .cke_browser_webkit .cke_rtl .cke_rcombo .cke_openbutton
{
	float: right;
}

/*** IE ***/

.cke_skin_office2003 .cke_browser_ie .cke_rtl .cke_rcombo,
.cke_skin_office2003 .cke_browser_ie .cke_rtl .cke_rcombo a,
.cke_skin_office2003 .cke_browser_ie .cke_rtl .cke_rcombo .cke_label
{
	float: none;
}
@font-face {
    font-family: "TitilliumWeb-Regular";
    src: url(../fonts/TitilliumWeb-Regular.ttf);
}

@font-face {
    font-family: "TitilliumWeb-SemiBold";
    src: url(../fonts/TitilliumWeb-SemiBold.ttf);
}

h1 {
    font-family: "TitilliumWeb-SemiBold";
}

h2 {
    font-family: "TitilliumWeb-SemiBold";
}

:root > * {
    --md-primary-fg-color: #292929;
    --md-primary-fg-color--light: #292929;
    --md-primary-fg-color--dark: #3C3C3C;
    --md-primary-bg-color: hsla(0, 0%, 100%, 1);
    --md-primary-bg-color--light: hsla(0, 0%, 100%, 0.7);
    --md-typeset-a-color: #009345;
    --md-text-font: "TitilliumWeb-Regular";
}

[data-md-color-scheme="slate"] {
    --md-hue: 232;
    --md-d


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

from cusignal.bsplines.bsplines import cubic, gauss_spline, quadratic


hbours[1])!!;

            if (
                n.neighbours.length == 2 &&
                ((nA.pos.x == n.pos.x && nB.pos.x == n.pos.x) ||
                    (nA.pos.z == n.pos.z && nB.pos.z == n.pos.z))
            ) {
                const nAPos = n.neighbours[0];
                const nA = reduced.get(nAPos)!!;
                const nBPos = n.neighbours[1];
                const nB = reduced.get(nBPos)!!;

                nA.neighbours = nA.neighbours.filter((it) => it != id);
                nB.neighbours = nB.neighbours.filter((it) => it != id);
                nA.neighbours.push(nBPos);
                nB.neighbours.push(nAPos);
                reduced.set(nAPos, nA);
                reduced.set(nBPos, nB);
                reduced.delete(id);
                print("Reduced: " + id + ` (x: ${n.pos.x}, z: ${n.pos.z})`);
            } else {
                nonReducedCount++;
            }
        });
    }
    return reduced;
}

/**
 * Returns the manhattan-distance in blocks of two {@link Pos2D | positions}
 * @remark The manhattan-distance is the shortest path in a grid (not diagonally)
 * @param a
 * @param b
 */
export function manhattanDistance(a: Pos2D, b: Pos2D): number {
    return Math.abs(a.x - b.x) + Math.abs(a.z - b.z);
}

/**
 * Cost function that determines the distance between two nodes.
 * @param a
 * @param b
 * @param graph
 */
export function cost(a: NodeID, b: NodeID, graph: NodeGraph): number {
    return manhattanDistance(graph.get(a)!!.pos, graph.get(b)!!.pos);
}

/**
 * Implementation of dijkstras shortest-path
 *
 * @returns An array of {@link NodeID | Node-Ids}
 *
 * @param start Starting-Node
 * @param end End-Node
 * @param graph Node-Graph
 */
export function russianMan(
    start: NodeID,
    end: NodeID,
    graph: NodeGraph
): Path | null | undefined {
    const finished: number[] = [];
    const costs: Map<NodeID, Cost> = new Map();
    const paths: Map<NodeID, Path> = new Map();

    costs.set(start, 0);
    paths.set(start, [start]);

    let runs = 0;

    while (runs < 20) {
        0;
        const cheapestCostEntry = [...costs]
            .filter(([n, c]) => finished.includes(n) == false)
            .sort((a, b) => b[1] - a[1])[0];

        if (cheapestCostEntry == null || cheapestCostEntry == undefined) break;
        const cheapestCost = cheapestCostEntry[0];
        const current = cheapestCost;

        if (current == end) return paths.get(end);

        const n = graph.get(current)!!.neighbours;

        n.forEach((id) => {
            const edgeCost = cost(current, id, graph);
            const newCost = edgeCost + costs.get(current)!!;
            const oldCost = costs.get(id);
            const newPath = [...paths.get(current)!!, id];

            if (oldCost == null) {
                // Hasnt been visited yet
                costs.set(id, newCost);
                paths.set(id, newPath);
            } else {
                if (newCost < oldCost) {
                    // Cheaper?
                    costs.set(id, newCost);
                    paths.set(id, newPath);
                }
            }
        });

        runs++;
        finished.push(current);
    }

    return null;


 #RED +
k = '\033[93m' # KUNING +
h = '\x1b[1;92m' # HIJAU +
hh = '\033[32m' # HIJAU -
u = '\033[95m' # UNGU
kk = '\033[33m' # KUNING -
b = '\33[1;96m' # BIRU -
p = '\x1b[0;34m' # BIRU +
asu = random.choice([m,k,h,u,b])
#--------------------[ CONVERTER-BULAN ]--------------#
dic = {'1':'January','2':'February','3':'March','4':'April','5':'May','6':'June','7':'July','8':'August','9':'September','10':'October','11':'November','12':'December'}
dic2 = {'01':'January','02':'February','03':'March','04':'April','05':'May','06':'June','07':'July','08':'August','09':'September','10':'October','11':'November','12':'Devember'}
tgl = datetime.datetime.now().day
bln = dic[(str(datetime.datetime.now().month))]
thn = datetime.datetime.now().year
okc = 'OK-'+str(tgl)+'-'+str(bln)+'-'+str(thn)+'.txt'
cpc = 'CP-'+str(tgl)+'-'+str(bln)+'-'+str(thn)+'.txt'
#------------------[ MACHINE-SUPPORT ]---------------#
def by_1551(u):
        for e in u + "\n":sys.stdout.write(e);sys.stdout.flush();time.sleep(0.05)
def clear():
	os.system('clear')
def back():
	login()
#------------------[ LOGO-LAKNAT ]-----------------#
def by_MR_KALARY(u):
        for e in u + "\n":sys.stdout.write(e);sys.stdout.flush();time.sleep(0.005)
def clear():
	os.system('clear')
def back():
	login()
logo='\x1b[38;5;220m' """
 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 ┃ [➤] AUTHOR      𝑹𝑼𝑺𝑺𝑰  𝑹𝑨𝑾𝑨
 ┃ [➤] TOOL         𝙵𝙸𝙻𝙴 𝙲𝙻𝙾𝙽𝙴
 ┃ [➤] STATUS      𝑷𝑨𝑰𝑫
 ┃ [➤] SYSTEM     𝑾𝑰𝑭𝑰 𝑫𝒂𝒕𝒂
 ┃ [➤] GITHUB    @𝑻𝑶𝑶𝑳𝑺_𝑻𝑬𝑹𝑴𝑼𝑿1
 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

                               """
#--------------------[ BAGIAN-MASUK ]--------------#
def login():
	try:
		token = open('.token.txt','r').read()
		cok = open('.cok.txt','r').read()
		tokenku.append(token)
		try:
			sy = requests.get('https://graph.facebook.com/me?fields=id,name&access_token='+tokenku[0], cookies={'cookie':cok})
			menu()
		except KeyError:
			login_lagi334()
	except IOError:
		login_lagi334()

def login_lagi334():
	try:
		os.system('clear')
		cookie=input(f'COOKIE: ')
		open(".cok.txt", "w").write(cookie)
		with requests.Session() as rsn:
			try:
				rsn.headers.update({
                    'Accept-Language': 'id,en;q=0.9',
                    'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.163 Mobile/15E148 Safari/604.1',
                    'Referer': 'https://www.instagram.com/',
                    'Host': 'www.facebook.com',
                    'Sec-Fetch-Mode': 'cors',
                    'Accept': '*/*',
                    'Connection': 'keep-alive',
                    'Sec-Fetch-Site': 'cross-site',
                    'Sec-Fetch-Dest': 'empty',
                    'Origin': 'https://www.instagram.com',
                    'Accept-Encoding': 'gzip, deflate',
                })
				response = rsn.get('https://www.facebook.com/x/oauth/status?client_id=124024574287414&wants_cookie_data=true&origin=1&input_token=&sdk=joey&blueirect_uri=https://www.instagram.com/brutalid_/', cookies={'cookie':cookie})
				if '"access_token":' in str(response.headers):
					token = re.search('"access_token":"(.*?)"', str(response.headers)).group(1)
					open(".token.txt", "w").write(token)
					print('DONE')
				else:
					print("bad cookies")
			except:
				print('wrong')
		exit()
	except Exception as e:
		os.system("rm -f .token.txt")
		os.system("rm -f .cok.txt")
		exit()
#------------------[ BAGIAN-MENU ]----------------#
def menu():
    print(logo)
    print('')
    print('\x1b[38;5;166m1. \x1b[38;5;166m Crack Public')
    print('\x1b[38;5;136m2. \x1b[38;5;136m Crack File')
    print('\x1b[38;5;7m3. \x1b[38;5;7m Result')
    print('\x1b[1;37m0. \x1b[1;31m Exit cookies')
    RUSSI=input('\x1b[1;30m . HALBZHERA :\x1b[1;30m ')
    if RUSSI =='1':
        dump_massal()
    elif RUSSI =='2':
        crack_file()
    elif RUSSI =='3':
       result()
    elif RUSSI =='0':
        os.system("rm -f .token.txt")
#-----------------[ HASIL-CRACK ]-----------------#
def result():
	print(f'1. Hasil {h}OK{x} ')
	print(f'2. Hasil {k}CP{x} ')
	print('3. Exit	')
	kz = input(f'\n Choose : ')
	if kz in ['2']:
		try:vin = os.listdir('CP')
		except FileNotFoundError:
			print('<•> File Tidak Di Temukan ')
			time.sleep(3)
			back()
		if len(vin)==0:
			print('<•> Anda Tidak Memiliki Hasil CP ')
			time.sleep(2)
			back()
		else:
			cih = 0
			lol = {}
			for isi


)

# Start Index
start_index_var = tk.IntVar(value=0)
start_label = tk.Label(root, text="Start Index:")
start_label.grid(row=2, column=0, sticky="w", pady=5)
start_entry = tk.Entry(root, textvariable=start_index_var, width=5)
start_entry.grid(row=2, column=1, pady=5)

# End Index
end_index_var = tk.IntVar(value=0)
end_label = tk.Label(root, text="End Index:")
end_label.grid(row=3, column=0, sticky="w", pady=5)
end_entry = tk.Entry(root, textvariable=end_index_var, width=5)
end_entry.grid(row=3, column=1, pady=5)

# Save Folder
save_folder_var = tk.StringVar()
save_folder_label = tk.Label(root, text="Save Folder:")
save_folder_label.grid(row=4, column=0, sticky="w", pady=5)
save_folder_entry = tk.Entry(root, textvariable=save_folder_var, width=40)
save_folder_entry.grid(row=4, column=1, columnspan=2, pady=5)
browse_button = tk.Button(root, text="Browse", command=browse_folder)
browse_button.grid(row=4, column=3, padx=5, pady=5)

# Download Method Dropdown
method_label = tk.Label(root, text="Download Method:")
method_label.grid(row=5, column=0, sticky="w", pady=5)
method_var = tk.StringVar(value="yt-dlpy")
method_dropdown = ttk.Combobox(root, textvariable=method_var, values=["yt-dlpy", "old"], state="readonly")
method_dropdown.grid(row=5, column=1, columnspan=2, pady=5)

# Format Dropdown
format_label = tk.Label(root, text="Select Format:")
format_label.grid(row=6, column=0, sticky="w", pady=5)
format_var = tk.StringVar(value="default")
format_dropdown = ttk.Combobox(root, textvariable=format_var, values=["default", "mp3", "m4a"], state="readonly")
format_dropdown.grid(row=6, column=1, columnspan=2, pady=5)

# Embed Thumbnail Checkbox
embed_thumbnail_var = tk.BooleanVar(value=True)  # Default value is True (checked)
embed_thumbnail_checkbox = tk.Checkbutton(root, text="Embed Thumbnail", variable=embed_thumbnail_var)
embed_thumbnail_checkbox.grid(row=7, column=1, columnspan=2, pady=5)

# Download Button
download_button = tk.Button(root, text="Download", command=start_download, bg="green", fg="white")
download_button.grid(row=8, column=1, columnspan=2, pady=10)

root.mainloop()


// *************************************************************
// project:  graphql-aspnet
// --
// repo: https://github.com/graphql-aspnet
// docs: https://graphql-aspnet.github.io
// --
// License:  MIT
// *************************************************************

namespace GraphQL.AspNet.Execution
{
    using System;
    using System.Threading;
    using System.Threading.Tasks;
    using GraphQL.AspNet.Common;
    using GraphQL.AspNet.Configuration;
    using GraphQL.AspNet.Interfaces.Execution;
    using GraphQL.AspNet.Interfaces.Schema;
    using GraphQL.AspNet.Internal.TypeTemplates;

    /// <summary>
    /// A default implementation of the resolver isolation manager, wrapping a simple
    /// <see cref="SemaphoreSlim"/>.
    /// </summary>
    public class GraphQLFieldResolverIsolationManager : IGraphQLFieldResolverIsolationManager, IDisposable
    {
        private readonly SemaphoreSlim _semaphore;
        private bool _disposedValue;

        /// <summary>
        /// Initializes a new instance of the <see cref="GraphQLFieldResolverIsolationManager" /> class.
        /// </summary>
        public GraphQLFieldResolverIsolationManager()
        {
            _semaphore = new SemaphoreSlim(1);
        }

        /// <inheritdoc />
        public async Task WaitAsync()
        {
            await _semaphore.WaitAsync();
        }


a)
{
	ssize_t ret;
	int before = rdma->nr_sge;

	switch (iov_iter_type(iter)) {
	case ITER_BVEC:
		ret = smb_extract_bvec_to_rdma(iter, rdma, len);
		break;
	case ITER_KVEC:
		ret = smb_extract_kvec_to_rdma(iter, rdma, len);
		break;
	case ITER_FOLIOQ:
		ret = smb_extract_folioq_to_rdma(iter, rdma, len);
		break;
	default:
		WARN_ON_ONCE(1);
		return -EIO;
	}

	if (ret < 0) {
		while (rdma->nr_sge > before) {
			struct ib_sge *sge = &rdma->sge[rdma->nr_sge--];

			ib_dma_unmap_single(rdma->device, sge->addr, sge->length,
					    rdma->direction);
			sge->addr = 0;
		}
	}

	return ret;
}


/components/image-uploader/utils';

describe('getTip', () => {
  test('当无参数时，应返回 undefined', () => {
    expect(getTip({})).toBeUndefined();
  });

  test('当 max 大于 1 时，应提示', () => {
    expect(getTip({ max: 1 })).toBeUndefined();
    expect(getTip({ max: 2 })).toBe('最多上传 2 张图片。');
  });

  test('当 maxSize 有值时，应提示', () => {
    expect(getTip({ maxSize: 100 })).toBe('大小不超过 100KB。');
  });

  test('当 accept 有值时，应提示', () => {
    expect(getTip({ accept: '.jpg,.png' })).toBe('仅支持 .jpg,.png 类型格式图片。');
  });

  test('当 limit.aspectRatio 有值时，应提示', () => {
    expect(getTip({ limit: { aspectRatio: 1 / 2 } })).toBe('比例应为 0.5。');
  });
  test('当 limit.width 有值时，应提示', () => {
    expect(getTip({ limit: { width: 200 } })).toBe('宽度为 200 像素。');
  });
  test('当 limit.height 有值时，应提示', () => {
    expect(getTip({ limit: { height: 200 } })).toBe('高度为 200 像素。');
  });
  test('当 limit.minWidth 有值时，应提示', () => {
    expect(getTip({ limit: { minWidth: 200 } })).toBe('最小宽度为 200 像素。');
  });
  test('当 limit.maxWidth 有值时，应提示', () => {
    expect(getTip({ limit: { maxWidth: 200 } })).toBe('最大宽度为 200 像素。');
  });
  test('当 limit.minHeight 有值时，应提示', () => {
    expect(getTip({ limit: { minHeight: 200 } })).toBe('最小高度为 200 像素。');
  });
  test('当 limit.maxHeight 有值时，应提示', () => {
    expect(getTip({ limit: { maxHeight: 200 } })).toBe('最大高度为 200 像素。');
  });
  test('多种提示，应有[，]拼接', () => {
    expect(getTip({ limit: { minWidth: 200, maxHeight: 200 } })).toBe('最小宽度为 200 像素，最大高度为 200 像素。');
  });
});

describe('checkImageType', () => {
  test('当 file.type 不存在时，应返回错误信息', () => {
    expect(checkImageType({ name: 'test.json' } as any)).toBe('test.json 不是图片类型');
  });

  test('当 file.type 不包含 image 时，应返回错误信息', () => {
    expect(checkImageType({ name: 'test.json', type: 'application/json' } as any)).toBe('test.json 不是图片类型');
  });

  test('当 file.type 包含 image 时，应返回 undefined', () => {
    expect(checkImageType({ name: 'test.png', type: 'image/png' } as any)).toBeUndefined();
  });
});

describe('checkImageSize', () => {
  test('当没有设置 maxSize 时，应返回 undefined', () => {
    expect(checkImageSize({} as any)).toBeUndefined();
  });

  test('当 file.size 小于 maxSize 时，应返回 undefined', () => {
    expect(checkImageSize({ size: 10 * 1024 } as any, 100)).toBeUndefined();
  });

  test('当 file.size 大于 maxSize 时，应返回错误信息', () => {
    expect(checkImageSize({ size: 100 * 1024, name: 'test.png' } as any, 99)).toBe('test.png 超出 99KB 限制');
  });
});

describe('chec


                }`
            )
            .setDescription(
                `**Channel:** \`#${
                    nS.channelID ? `${nS.channel.name}` : `${oS.channel.name}`
                }\``
            )
            .setThumbnail(avatar)
            .setColor(`${nS.channelID ? GREEN : `RED`}`);
        return logChannel.send(embed);
    }

    if ((!oS.streaming && nS.streaming) || (oS.streaming && !nS.streaming)) {

        embed
            .setAuthor(u, avatar)
            .setTitle(
                `${nS.streaming ? "🖥 Started" : "🖥 Stopped"} streaming!`
            )
            .setDescription(
                `**Channel:** \`#${
                    nS.channelID ? `${nS.channel.name}` : `${oS.channel.name}`
                }\``
            )
            .setThumbnail(avatar)
            .setColor(nS.streaming ? GREEN : `RED`);
        return logChannel.send(embed);
    }

    if (
        (!oS.serverDeaf && nS.serverDeaf) ||
        (oS.serverDeaf && !nS.serverDeaf)
    ) {
        embed
            .setAuthor(u, avatar)
            .setTitle(
                `${
                    nS.serverDeaf
                        ? "🔇 User Server-Deafened"
                        : "🎧 User Server-Undeafened"
                }`
            )
            .setDescription(
                `**Channel:** \`${
                    nS.channelID ? `${nS.channel.name}` : `${oS.channel.name}`
                }\``
            )
            .setThumbnail(avatar)
            .setColor(nS.serverDeaf ? "RED" : GREEN);
        return logChannel.send(embed);
    }

    //User was muted/unmuted by an Moderator
    if (
        (!oS.serverMute && nS.serverMute) ||
        (oS.serverMute && !nS.serverMute)
    ) {
        embed
            .setAuthor(u, avatar)
            .setTitle(
                `${
                    nS.serverMute
                        ? "🔇 User Server-Muted"
                        : "🔊 User Server-Unmuted"
                }`
            )
            .setDescription(
                `**Channel:** \`${
                    nS.channelID ? `${nS.channel.name}` : `${oS.channel.name}`
                }\``
            )
            .setThumbnail(avatar)
            .setColor(nS.serverMute ? "RED" : GREEN);
        return logChannel.send(embed);
    }

    //User switched channels
    if (oS.channelID !== nS.channelID && oS.channelID && nS.channelID) {
        embed
            .setColor("YELLOW")
            .setAuthor(u, avatar)
            .setThumbnail(avatar)
            .setTitle("🔀 Voice Channel Changed")
            .setDescription(
                `**From:** \`#${oS.channel.name}\`\n**To:** \`#${nS.channel.name}\``
            );
        return logChannel.send(embed);
    }

};

export const name: string = "voiceStateUpdate";import { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios'
import * as apiEndpoints from './endpoints'

const getToken = () => {
  return 'token_demo_12345'
}

const requestInterceptor = (config: AxiosRequestConfig) => {
  config.headers.Authorization = `Bearer ${getToken()}`
  return config
}

const responseSuccessInterceptor = (response: AxiosResponse) => {
  // Do something with response data
  return response
}

// Any status codes that falls outside the range of 2xx cause this function to trigger
const responseErrorInterceptor = (error: AxiosError) => {
  // Do something with response error
  return Promise.reject


2 * SIZE
	FMA	f67   = f35, f48, f67	// A4 * B1
	}
	{ .mfb
	(p5) LDFD	f6  = [C1 ], SIZE
	FMA	f75   = f35, f49, f75	// A4 * B2
	nop	__LINE__
	}

	{ .mfb
	(p4) LDFPD	f48, f49 = [BOFFSET],   2 * SIZE
	FMA	f83   = f35, f50, f83	// A4 * B3
	nop	__LINE__
	}
	{ .mfb
	(p5) LDFD	f7  = [C9 ], SIZE
	FMA	f91   = f35, f51, f91	// A4 * B4
	nop	__LINE__
	}
	;;
	{ .mfb
	(p4) LDFPD	f50, f51 = [BOFFSET],  2 * SIZE
	(p3) FMA	f64   = f40, f56, f64	// A1 * B1
	nop	__LINE__
	}
	{ .mfb
	(p5) LDFD	f10 = [C1 ], SIZE
	(p3) FMA	f72   = f40, f57, f72	// A1 * B2
	nop	__LINE__
	}
	;;
	{ .mfb
	(p4) LDFPD	f34, f35 = [AOFFSET], 2 * SIZE
	(p3) FMA	f80   = f40, f58, f80	// A1 * B3
	nop	__LINE__
	}
	{ .mfb
	(p5) LDFD	f11 = [C9 ], SIZE
	(p3) FMA	f88   = f40, f59, f88	// A1 * B4
	nop	__LINE__
	}
	;;
	{ .mfb
	(p5) LDFD	f12 = [C1 ], SIZE
	(p3) FMA	f65   = f41, f56, f65	// A2 * B1
	nop	__LINE__
	}
	{ .mfb
	(p5) LDFD	f13 = [C9], SIZE
	(p3) FMA	f73   = f41, f57, f73	// A2 * B2
	nop	__LINE__
	}
	;;
	{ .mfb
	(p5) LDFD	f14 = [C1 ], - 3 * SIZE
	(p3) FMA	f81   = f41, f58, f81	// A2 * B3
	nop	__LINE__
	}
	{ .mfb
	(p5) LDFD	f15 = [C9], - 3 * SIZE
	(p3) FMA	f89   = f41, f59, f89	// A2 * B4
	nop	__LINE__
	}
	;;
	{ .mfb
	(p5) LDFD	f16  = [C2 ], SIZE
	(p3) FMA	f66   = f42, f56, f66	// A3 * B1
	nop	__LINE__
	}
	{ .mfb
	(p5) LDFD	f17  = [C10], SIZE
	(p3) FMA	f74   = f42, f57, f74	// A3 * B2
	nop	__LINE__
	}
	;;
	{ .mfb
	(p5) LDFD	f18 = [C2 ], SIZE
	(p3) FMA	f82   = f42, f58, f82	// A3 * B3
	nop	__LINE__
	}
	{ .mfb
	(p5) LDFD	f19 = [C10], SIZE
	(p3) FMA	f90   = f42, f59, f90	// A3 * B4
	nop	__LINE__
	}
	;;
	{ .mfb
	(p5) LDFD	f20 =


  magic?: number;
};

/**
 * The address type specifies the kind of spending data (Some data that are bound to an address).
 * It’s an extensible object with payload which identifies one of the three elements:
 *
 *  - A Public Key (Payload is thereby a PublicKey)
 *  - A Script (Payload is thereby a script and its version)
 *  - A Redeem Key (Payload is thereby a RedeemPublicKey)
 */
export enum ByronAddressType {
  PubKey = 0,
  Script = 1,
  Redeem = 2
}

/**
 * Byron address internal structure:
 *
 * ┌────────┬──────────────┬────────┐
 * │  root  │  attributes  │  type  │
 * └────────┴──────────────┴────────┘
 *   ╎        ╎              ╎
 *   ╎        ╎              ╰╌╌ PubKey
 *   ╎        ╎              ╰╌╌ Script
 *   ╎        ╎              ╰╌╌ Redeem
 *   ╎        ╰╌╌ Derivation Path
 *   ╎        ╰╌╌ Network Tag
 *   ╎
 *   ╎                   ┌────────┬─────────────────┬──────────────┐
 *   ╰╌╌╌╌ double-hash ( │  type  │  spending data  │  attributes  │ )
 *                       └────────┴─────────────────┴──────────────┘
 *                                  ╎
 *                                  ╰╌╌ Verification Key
 *                                  ╰╌╌ Redemption Key
 */
export type ByronAddressContent = {
  root: Hash28ByteBase16;
  attrs: ByronAttributes;
  type: ByronAddressType;
};

/**
 * Legacy Byron addresses.
 */
export class ByronAddress {
  readonly #type: AddressType;
  readonly #content: ByronAddressContent;

  /**
   * Initializes a new instance of the ByronAddress class.
   *
   * @param props The address properties.
   * @private
   */
  private constructor(props: AddressProps) {
    this.#content = props.byronAddressContent!;
    this.#type = props.type;
  }

  /**
   * Creates a new instance of the ByronAddress from its credentials.
   *
   * @param root The hash of the keys and attributes.
   * @param attrs The byron attributes.
   * @param type The byron address type.
   */
  static fromCredentials(root: Hash28ByteBase16, attrs: ByronAttributes, type: ByronAddressType): ByronAddress {
    return new ByronAddress({
      byronAddressContent: {
        attrs,
        root,
        type
      },
      type: AddressType.Byron
    });
  }

  /**
   * Gets the attributes of the address (derivation path and network magic).
   */
  getAttributes(): ByronAttributes {
    return this.#content.attrs;
  }

  /**
   * Gets the root hash of the attributes and credentials.
   */
  getRoot(): Hash28ByteBase16 {
    return this.#content.root;
  }

  /**
   * Gets the Byron address type.
   */
  getByronAddressType(): ByronAddressType {
    return this.#content.type;
  }

  /**
   * Converts from ByronAddress instance to Address.
   */
  toAddress(): Address {
    return new Address({
      byronAddressContent: this.#content,
      type: this.#type
    });
  }

  /**
   * Creates a ByronAddress address from an Address instance.
   *
   * @param addr The address instance to be converted.
   * @returns The ByronAddress instance or undefined if Address is not a valid ByronAddress.
   */
  static fromAddress(addr: Address): ByronAddress | undefined {
    return addr.getProps().type === AddressType.Byron ? new ByronAddress(addr.getProps()) : undefined;
  }

  /**
   * Packs the byron address into its raw binary format.
   *
   * @param props The add


domcat-a-domain-categorization-tool/)
- 安全研究GoSSIP
  - [ ] [G.O.S.S.I.P 阅读推荐 2025-09-24 海妖之歌](https://mp.weixin.qq.com/s?__biz=Mzg5ODUxMzg0Ng==&mid=2247500757&idx=1&sn=f61b4ee726c9718ded7783dd6e59ad61)
- 安全圈
  - [ ] [【安全圈】无人机闯入空域致哥本哈根与奥斯陆机场大规模停飞](https://mp.weixin.qq.com/s?__biz=MzIzMzE4NDU1OQ==&mid=2652071867&idx=1&sn=1836487172f751dc49c0670fa4ecfefd)
  - [ ] [【安全圈】Stellantis确认客户数据泄露，汽车制造业再陷供应链攻击阴影](https://mp.weixin.qq.com/s?__biz=MzIzMzE4NDU1OQ==&mid=2652071867&idx=2&sn=a4bc92070b4816fc9cc115a5db95fbb2)
  - [ ] [【安全圈】黑客利用Pandoc SSRF漏洞瞄准AWS EC2凭证](https://mp.weixin.qq.com/s?__biz=MzIzMzE4NDU1OQ==&mid=2652071867&idx=3&sn=2fba1a44420525dcfd6f3b3ff6cca2fc)
  - [ ] [【安全圈】CISA警告：Chrome零日漏洞CVE-2025-10585遭在野利用](https://mp.weixin.qq.com/s?__biz=MzIzMzE4NDU1OQ==&mid=2652071867&idx=4&sn=a8c18afabd3ccd7093dcb2d004048ea8)
- 信息安全国家工程研究中心
  - [ ] [欧洲多地机场遭网络攻击，数百航班延误取消，供应链安全警钟再鸣](https://mp.weixin.qq.com/s?__biz=MzU5OTQ0NzY3Ng==&mid=2247501127&idx=1&sn=f9c704d9eeb3c79ba3a8d80fac824ed3)
  - [ ] [吴世忠院士 | 深入实施“人工智能+”行动 探索网络安全行业新发展](https://mp.weixin.qq.com/s?__biz=MzU5OTQ0NzY3Ng==&mid=2247501127&idx=2&sn=e07b34cd9669776313312a8fada1e009)
- 丁爸 情报分析师的工具箱
  - [ ] [【转载】美国网络安全智库的“反华合唱团”](https://mp.weixin.qq.com/s?__biz=MzI2MTE0NTE3Mw==&mid=2651152164&idx=1&sn=0142b1fa36ab9a11daaf36ed9b864109)
- dotNet安全矩阵
  - [ ] [延迟执行对抗，基于 ping 的休眠技术实战剖析](https://mp.weixin.qq.com/s?__biz


   display: -ms-flexbox;
    display: flex;
    width: auto
}

.eVRfAv7Xj87dGVuu3RZ8i {
    background-color: transparent
}

._3dkNckTVR4VPImWXsThMLq {
    background: rgba(255, 255, 255, 0.8)
}

._2fDy3KzGIsY8FHMg74ib-V {
    display: inline-block;
    font-weight: normal;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border: 1px solid transparent;
    padding: .375rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    -webkit-transition: all 0.1s ease-in-out;
    transition: all 0.1s ease-in-out;
    font-family: "Oxygen", "Oxygen", "Segoe UI", "Helvetica Neue", sans-serif, "Helvetica", arial
}

._2fDy3KzGIsY8FHMg74ib-V:focus, ._2fDy3KzGIsY8FHMg74ib-V.wvFn2mctR11TDhTIS1Chx, ._2fDy3KzGIsY8FHMg74ib-V:active:focus, ._2fDy3KzGIsY8FHMg74ib-V:active.wvFn2mctR11TDhTIS1Chx, ._2fDy3KzGIsY8FHMg74ib-V._26AKNFr5OlsVlK3zeNSkya:focus, ._2fDy3KzGIsY8FHMg74ib-V._26AKNFr5OlsVlK3zeNSkya.wvFn2mctR11TDhTIS1Chx {
    outline: none
}

._2fDy3KzGIsY8FHMg74ib-V:hover:focus {
    text-decoration: none
}

._2fDy3KzGIsY8FHMg74ib-V.wvFn2mctR11TDhTIS1Chx, ._2fDy3KzGIsY8FHMg74ib-V:focus {
    text-decoration: none
}

._2fDy3KzGIsY8FHMg74ib-V:active, ._2fDy3KzGIsY8FHMg74ib-V._26AKNFr5OlsVlK3zeNSkya {
    background-image: none;
    outline: 0
}

._2fDy3KzGIsY8FHMg74ib-V._3JhIcVa8SAUiC1_ZETEt6G, ._2fDy3KzGIsY8FHMg74ib-V:disabled {
    cursor: not-allowed;
    opacity: 0.65
}

a._2fDy3KzGIsY8FHMg74ib-V._3JhIcVa8SAUiC1_ZETEt6G, fieldset[disabled] a._2fDy3KzGIsY8FHMg74ib-V {
    pointer-events: none
}

._2bwYMUTOYpw6i1TbVOJS4A {
    color: #fff;
    background-color: #34B3A0;
    border-color: transparent
}

._2bwYMUTOYpw6i1TbVOJS4A:hover {
    color: #fff;
    background-color: #46c9b6;
    border-color: transparent;
    text-decoration: none
}

._2bwYMUTOYpw6i1TbVOJS4A:focus, ._2bw


 &sc->jme_stats;
	ostat = &sc->jme_ostats;
	stat->tx_good_frames = CSR_READ_4(sc, JME_STAT_TXGOOD);
	stat->rx_good_frames = CSR_READ_4(sc, JME_STAT_RXGOOD);
	reg = CSR_READ_4(sc, JME_STAT_CRCMII);
	stat->rx_crc_errs = (reg & STAT_RX_CRC_ERR_MASK) >>
	    STAT_RX_CRC_ERR_SHIFT;
	stat->rx_mii_errs = (reg & STAT_RX_MII_ERR_MASK) >>
	    STAT_RX_MII_ERR_SHIFT;
	reg = CSR_READ_4(sc, JME_STAT_RXERR);
	stat->rx_fifo_oflows = (reg & STAT_RXERR_OFLOW_MASK) >>
	    STAT_RXERR_OFLOW_SHIFT;
	stat->rx_desc_empty = (reg & STAT_RXERR_MPTY_MASK) >>
	    STAT_RXERR_MPTY_SHIFT;
	reg = CSR_READ_4(sc, JME_STAT_FAIL);
	stat->rx_bad_frames = (reg & STAT_FAIL_RX_MASK) >> STAT_FAIL_RX_SHIFT;
	stat->tx_bad_frames = (reg & STAT_FAIL_TX_MASK) >> STAT_FAIL_TX_SHIFT;

	/* Account for previous counters. */
	stat->rx_good_frames += ostat->rx_good_frames;
	stat->rx_crc_errs += ostat->rx_crc_errs;
	stat->rx_mii_errs += ostat->rx_mii_errs;
	stat->rx_fifo_oflows += ostat->rx_fifo_oflows;
	stat->rx_desc_empty += ostat->rx_desc_empty;
	stat->rx_bad_frames += ostat->rx_bad_frames;
	stat->tx_good_frames += ostat->tx_good_frames;
	stat->tx_bad_frames += ostat->tx_bad_frames;
}

static void
jme_phy_down(struct jme_softc *sc)
{
	uint32_t reg;

	jme_miibus_writereg(sc->jme_dev, sc->jme_phyaddr, MII_BMCR, BMCR_PDOWN);
	if (CHIPMODE_REVFM(sc->jme_chip_rev) >= 5) {
		reg = CSR_READ_4(sc, JME_PHYPOWDN);
		reg |= 0x0000000F;
		CSR_WRITE_4(sc, JME_PHYPOWDN, reg);
		reg = pci_read_config(sc->jme_dev, JME_PCI_PE1, 4);
		reg &= ~PE1_GIGA_PDOWN_MASK;
		reg |= PE1_GIGA_PDOWN_D3;
		pci_write_config(sc->jme_dev, JME_PCI_PE1, reg, 4);
	}
}

static void
jme_phy_up(struct jme_softc *sc)
{
	uint32_t reg;
	uint16_t bmcr;

	bmcr = jme_miibus_readreg(sc->jme_dev, sc->jme_phyaddr, MII_BMCR);
	bmcr &= ~BMCR_PDOWN;
	jme_miibus_writereg(sc->jme_dev, sc->jme_phyaddr, MII_BMCR, bmcr);
	if (CHIPMODE_REVFM(sc->jme_chip_rev) >= 5) {
		reg = CSR_READ_4(sc, JME_PHYPOWDN);
		reg &= ~0x0000000F;
		CSR_WRITE_4(sc, JME_PHYPOWDN, reg);
		reg = pci_read_config(sc->jme_dev, JME_PCI_PE1, 4);
		reg &= ~PE1_GIGA_PDOWN_MASK;
		reg |= PE1_GIGA_PDOWN_DIS;
		pci_write_config(sc->jme_dev, JME_PCI_PE1, reg, 4);
	}
}

static int
sysctl_int_range(SYSCTL_HANDLER_ARGS, int low, int high)
{
	int error, value;

	if (arg1 == NULL)
		return (EINVAL);
	value = *(int *)arg1;
	error = sysctl_handle_int(oidp, &value, 0, req);
	if (error || req->newptr == NULL)
		return (error);
	if (value < low || value > high)
		return (EINVAL);
        *(int *)arg1 = value;

        return (0);
}

static int
sysctl_hw_jme_tx_coal_to(SYSCTL_HANDLER_ARGS)
{
	return (sysctl_int_range(oidp, arg1, arg2, req,
	    PCCTX_COAL_TO_MIN, PCCTX_COAL_TO_MAX));
}

static int
sysctl_hw_jme_tx_coal_pkt(SYSCTL_HANDLER_ARGS)
{
	return (sysctl_int_range(oidp, arg1, arg2, req,
	    PCCTX_COAL_PKT_MIN, PCCTX_COAL_PKT_MAX));
}

static int
sysctl_hw_jme_rx_coal_to(SYSCTL_HANDLER_ARGS)
{
	return (sysctl_int_range(oidp, arg1, arg2, req,
	    PCCRX_COAL_TO_MIN, PCCRX_COAL_TO_MAX));
}

static int
sysctl_hw_jme_rx_coal_pkt(SYSCTL_HANDLER_ARGS)
{
	return (sysctl_int_range(oidp, arg1, arg2, req,
	    PCCRX_COAL_PKT_MIN, PCCRX_COAL_PKT_MAX));
}

static int
sysctl_hw_jme_proc_limit(SYSCTL_HANDLER_ARGS)
{
	return (sysctl_int_range(oidp, arg1, arg2, req,
	    JME_PROC_MIN, JME_PROC_MAX));
}


 if (_currentState != State.Closed && disposing)
                Close();
        }

        /// <summary>
        /// Changes the <see cref="State"/> to Closed.
        /// </summary>
        public virtual void Close()
        {
            _currentState = State.Closed;
            _tokenType = JsonToken.None;
            _value = null;
        }
    }
}


ion);
      if (char == PLUS || char == MINUS) {
        position++;
        if (position == length) _fail(position, "Missing expected digit");
        char = _source.codeUnitAt(position);
      }
      if (char < CHAR_0 || char > CHAR_9) {
        _fail(position, "Missing expected digit");
      }
      do {
        position++;
        if (position == length) return _handleLiteral(start, position, true);
        char = _source.codeUnitAt(position);
      } while (CHAR_0 <= char && char <= CHAR_9);
    }
    return _handleLiteral(start, position, isDouble);
  }

  void _fail(int position, [String message]) {
    _failSpan(new Span(position, position + 20), message);
  }

  void _failSpan(Span span, [String message]) {
    if (message == null) message = "Unexpected character";
    _listener.fail(_source, span, message);
    // If the listener didn't throw, do it here.
    int position = span.start;
    int sliceEnd = span.end;
    String slice;
    if (sliceEnd > _source.length) {
      slice = "'${_source.substring(position)}'";
    } else {
      slice = "'${_source.substring(position, sliceEnd)}...'";
    }
    throw new FormatException("Unexpected character at $position: $slice");
  }
}
// Copyright (c) 2013, Google Inc. Please see the AUTHORS file for details.
// All rights reserved. Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

library spark.ui.widgets.treeview_cell;

import 'dart:html';
import 'dart:convert' show JSON;

import 'listview_cell.dart';
import 'treeview.dart';
import 'treeview_row.dart';

Expando<TreeViewCell> treeViewCellExpando = new Expando<TreeViewCell>();

class TreeViewCell implements ListViewCell {
  // HTML element of the view.
  Element _element;
  // Cell returned by the delegate of the treeview.
  ListViewCell _embeddedCell;
  // <div> element that will contain _embeddedCell element.
  DivElement _embeddedCellContainer;
  // The disclosure arrow.
  DivElement _arrow;
  // Highlighted state of the node.
  bool _highlighted;
  // The TreeView that owns this node.
  TreeView _treeView;
  // Information about the displayed node.
  TreeViewRow _row;
  // Whether the disclosure arrow is animating.
  bool _animating;
  // When the user is dragging an item over the _embeddedCell, we show a
  // "drag over" highlight.
  DivElement _dragOverlay;
  // Whether the "drag over" highlight is visible.
  bool _dragOverlayVisible;

  static TreeViewCell TreeViewCellForElement(DivElement element) {
    return treeViewCellExpando[element];
  }

  TreeViewCell(this._treeView, this._embeddedCell, this._row,
               bool hasChildren, bool draggable, int disclosurePosition) {
    DocumentFragment template =
        (querySelector('#treeview-cell-template') as TemplateElement).content;
    DocumentFragment templateClone = template.clone(true);
    _element = templateClone.querySelector('.treeviewcell');

    _embeddedCellContainer = _element.querySelector('.treeviewcell-content');
    int margin = _row.level == 0 ? 0 : _row.level * 25;
    _embeddedCellContainer.classes.add('treeviewcell-content');
    int offsetX = margin + 15;
    _embeddedCellContainer.style.left = '${offsetX}px';
    _embeddedCellContainer.style.width = 'calc(100% - ${offsetX}px)';
    if (draggable) {
      _embeddedCellContainer.setAttribute('draggable', 'true');
    }
    _embeddedCellContainer.children.add(_embeddedCell.element);

    _dragOver


 software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/

///create 125 (5x5x5) dynamic object
#define ARRAY_SIZE_X 1
#define ARRAY_SIZE_Y 2
#define ARRAY_SIZE_Z 1

//maximum number of objects (and allow user to shoot additional boxes)
#define MAX_PROXIES (ARRAY_SIZE_X*ARRAY_SIZE_Y*ARRAY_SIZE_Z + 1024)

///scaling of the objects (0.1 = 20 centimeter boxes )
#define SCALING 1.
#define START_POS_X -5
#define START_POS_Y -5
#define START_POS_Z -3

#include "BasicDemo.h"
#include "GlutStuff.h"
///btBulletDynamicsCommon.h is the main Bullet include file, contains most common include files.
#include "btBulletDynamicsCommon.h"
#include "BulletCollision/Gimpact/btGImpactShape.h"
#include "BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h"

#include "BulletCollision/CollisionShapes/btConvexPolyhedron.h"

#include <stdio.h> //printf debugging
#include "GLDebugDrawer.h"

static GLDebugDrawer gDebugDraw;

BasicDemo::BasicDemo()
{

	m_cameraTargetPosition.setValue(0,20,-15);
}

void BasicDemo::clientMoveAndDisplay()
{
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

	//simple dynamics world doesn't handle fixed-time-stepping
	float ms = getDeltaTimeMicroseconds();

	///step the simulation
	if (m_dynamicsWorld)
	{
		m_dynamicsWorld->stepSimulation(1./10000.f,0);//ms / 1000000.f);
		//optional but useful: debug drawing
		m_dynamicsWorld->debugDrawWorld();
	}

	renderme();

	glFlush();

	swapBuffers();

}

void BasicDemo::displayCallback(void) {

	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

	renderme();

	//optional but useful: debug drawing to detect problems
	if (m_dynamicsWorld)
		m_dynamicsWorld->debugDrawWorld();

	glFlush();
	swapBuffers();
}

btAlignedObjectArray<int> indices;
btAlignedObjectArray<btVector3> vertices;

void	BasicDemo::initPhysics()
{
	indices.clear();
	vertices.clear();

	setTexturing(true);
	setShadows(true);

	///collision configuration contains default setup for memory, collision setup
	m_collisionConfiguration = new btDefaultCollisionConfiguration();
	//m_collisionConfiguration->setConvexConvexMultipointIterations();

	///use the default collision dispatcher. For parallel processing you can use a diffent dispatcher (see Extras/BulletMultiThreaded)
	m_dispatcher = new	btCollisionDispatcher(m_collisionConfiguration);
	btGImpactCollisionAlgorithm::registerAlgorithm(m_dispatcher);

	m_broadphase = new btDbvtBroadphase();

	///the default constraint solver. For parallel processing you can use a different solver (see Extras/BulletMultiThreaded)
	btSequentialImpulseConstraintSolver* sol = new btSequentialImpulseConstraintSolver;
	m_solver = sol;

	m_dynamicsWorld = new btDiscreteDynamicsWorld(m_dispatcher,m_broadphase,m_solver,m_collisionConfiguration);
	m_dynamic