win.id,
      pluginId: plugin.id,
      viewId,
      win,
      url,
      viewUrl,
      isDev,
      fatherId,
      fatherViewId: utils.safeGet(this.getPluginWinItemByWindowId(fatherId), 'viewId', null)
    });

    return win;
  }

  /**
   * 根据windowId获取BrowserWindow
   * @param {number} windowId
   * @returns {BrowserWindow}
   */
  getWindowById(windowId: number): BrowserWindow {
    if (windowId === 1) {
      return this.mainWindow;
    } else {
      return this.getPluginWinItemByWindowId(windowId).win;
    }
  }

  /**
   * 根据窗体ID获取插件窗体
   * @param windowId
   * @returns
   */
  getPluginWinItemByWindowId(windowId: number): PluginWinItem | null {
    return this.pluginWinItems[windowId];
  }

  /**
   * 根据插件ID寻找插件窗体
   * @param pluginId
   * @returns
   */
  getPluginWinItemByPluginId(pluginId: string): Array<PluginWinItem> {
    const pluginWinItemArr = Object.values(this.pluginWinItems).filter((pluginWinItem: PluginWinItem) => {
      const isTarget = pluginWinItem.pluginId === pluginId;

      if (pluginWinItem.win.isDestroyed()) {
        //  移除内存中的窗体对象
        this.deleteWindow(pluginWinItem.id);
        return false;
      } else {
        return isTarget;
      }
    });

    return pluginWinItemArr;
  }

  /**
   * 根据视图id获取插件窗体
   * @param id
   * @returns
   */
  getPluginWinItemByViewId(id: number): PluginWinItem | null {
    if (this.viewWins[id]) {
      //  视图所属的插件窗体ID
      const { pluginWinId } = this.viewWins[id];
      //  插件窗体
      return this.getPluginWinItemByWindowId(pluginWinId);
    } else {
      return null;
    }
  }

  /**
   * 从窗体对象中删除窗体
   * @param id
   */
  deleteWindow(id: number): void {
    delete this.pluginWinItems[id];
  }

  /**
   * 根据windowId来关闭窗体
   * @param windowId 窗体ID
   */
  closeWindow(windowId: number): void {
    let win: BrowserWindow;

    //  关闭的为主面板
    if (windowId === 1) {
      win = this.mainWindow;
    }
    //  关闭的窗体为插件窗体
    else {
      const pluginWinItem = this.getPluginWinItemByWindowId(windowId);
      win = pluginWinItem.win;

      //  执行窗体关闭后的某些回调
      pluginService.clipboardOff(pluginWinItem.pluginId);
    }

    //  摧毁窗体（塔塔开，塔塔开！）
    if (!win.isDestroyed()) {
      win.destroy();
    }
    //  移除内存中的窗体对象
    this.deleteWindow(windowId);
  }

  /**
   * 关闭插件的全部子窗体
   * @param pluginWinId
   */
  closePluginAllChildWindow(pluginWinId: number) {
    const pluginWinItems = this.pluginWinItems;

    for (const winId in pluginWinItems) {
      const pluginWinItem = pluginWinItems[winId];
      //  如插件窗体的fatherId为本次关闭窗体ID
      const isHisFatherWin = pluginWinItem.fatherId === pluginWin


8888 : SDL_PIXELFORMAT_XRGB8888,
        SDL_PIXELFORMAT_BGRX32        = ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN ? SDL_PIXELFORMAT_XRGB8888 : SDL_PIXELFORMAT_BGRX8888,
        SDL_PIXELFORMAT_XBGR32        = ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN ? SDL_PIXELFORMAT_RGBX8888 : SDL_PIXELFORMAT_XBGR8888;

    public static final int
        SDL_COLOR_TYPE_UNKNOWN = 0,
        SDL_COLOR_TYPE_RGB     = 1,
        SDL_COLOR_TYPE_YCBCR   = 2;

    public static final int
        SDL_COLOR_RANGE_UNKNOWN = 0,
        SDL_COLOR_RANGE_LIMITED = 1,
        SDL_COLOR_RANGE_FULL    = 2;

    public static final int
        SDL_COLOR_PRIMARIES_UNKNOWN      = 0,
        SDL_COLOR_PRIMARIES_BT709        = 1,
        SDL_COLOR_PRIMARIES_UNSPECIFIED  = 2,
        SDL_COLOR_PRIMARIES_BT470M       = 4,
        SDL_COLOR_PRIMARIES_BT470BG      = 5,
        SDL_COLOR_PRIMARIES_BT601        = 6,
        SDL_COLOR_PRIMARIES_SMPTE240     = 7,
        SDL_COLOR_PRIMARIES_GENERIC_FILM = 8,
        SDL_COLOR_PRIMARIES_BT2020       = 9,
        SDL_COLOR_PRIMARIES_XYZ          = 10,
        SDL_COLOR_PRIMARIES_SMPTE431     = 11,
        SDL_COLOR_PRIMARIES_SMPTE432     = 12,
        SDL_COLOR_PRIMARIES_EBU3213      = 22,
        SDL_COLOR_PRIMARIES_CUSTOM       = 31;

    public static final int
        SDL_TRANSFER_CHARACTERISTICS_UNKNOWN       = 0,
        SDL_TRANSFER_CHARACTERISTICS_BT709         = 1,
        SDL_TRANSFER_CHARACTERISTICS_UNSPECIFIED   = 2,
        SDL_TRANSFER_CHARACTERISTICS_GAMMA22       = 4,
        SDL_TRANSFER_CHARACTERISTICS_GAMMA28       = 5,
        SDL_TRANSFER_CHARACTERISTICS_BT601         = 6,
        SDL_TRANSFER_CHARACTERISTICS_SMPTE240      = 7,
        SDL_TRANSFER_CHARACTERISTICS_LINEAR        = 8,
        SDL_TRANSFER_CHARACTERISTICS_LOG100        = 9,
        SDL_TRANSFER_CHARACTERISTICS_LOG100_SQRT10 = 10,
        SDL_TRANSFER_CHARACTERISTICS_IEC61966      = 11,
        SDL_TRANSFER_CHARACTERISTICS_BT1361        = 12,
        SDL_TRANSFER_CHARACTERISTICS_SRGB          = 13,
        SDL_TRANSFER_CHARACTERISTICS_BT2020_10BIT  = 14,
        SDL_TRANSFER_CHARACTERISTICS_BT2020_12BIT  = 15,
        SDL_TRANSFER_CHARACTERISTICS_PQ            = 16,
        SDL_TRANSFER_CHARACTERISTICS_SMPTE428      = 17,
        SDL_TRANSFER_CHARACTERISTICS_HLG           = 18,
        SDL_TRANSFER_CHARACTERISTICS_CUSTOM        = 31;

    public static final int
        SDL_MATRIX_COEFFICIENTS_IDENTITY           = 0,
        SDL_MATRIX_COEFFICIENTS_BT709              = 1,
        SDL_MATRIX_COEFFICIENTS_UNSPECIFIED        = 2,
        SDL_MATRIX_COEFFICIENTS_FCC                = 4,
        SDL_MATRIX_COEFFICIENTS_BT470BG            = 5,
        SDL_MATRIX_COEFFICIENTS_BT601              = 6,
        SDL_MATRIX_COEFFICIENTS_SMPTE


�依据各自职责，做好相关保护和监督管理工作。

第七条 市、区县（自治县）人民政府应当将本行政区域历史文化名城、名镇、名村、街区，传统风貌区，历史建筑和传统风貌建筑的保护工作纳入国民经济和社会发展规划，将保护资金列入本级财政预算，专项用于保护和管理。

第八条 鼓励、支持单位和个人以捐赠、资助、投资、提供保护线索、志愿服务、技术培训等方式，依法参与历史文化名城、名镇、名村、街区，传统风貌区，历史建筑和传统风貌建筑的保护和利用。

第九条 各级人民政府和有关部门应当组织开展历史文化名城、名镇、名村、街区，传统风貌区，历史建筑和传统风貌建筑保护的宣传教育活动，普及保护知识，增强全社会保护意识。

第十条 任何单位和个人有权对破坏、损害历史文化资源的行为进行劝阻和举报。

区县（自治县）人民政府及城乡规划、文物等部门应当公布举报方式，接受举报、投诉，并及时核实、处理。

## 第二章 保护名录

第十一条 本市历史文化名城、名镇、名村、街区，传统风貌区和历史建筑保护实行保护名录制度。

第十二条 国家级历史文化名城、名镇、名村、街区的申报，依照《历史文化名城名镇名村保护条例》等相关规定执行。

市级历史文化名城、名镇、名村、街区，传统风貌区和历史建筑，由区县（自治县）人民政府提出申请，经市城乡规划主管部门会同市文物主管部门组织有关部门、专家进行论证，提出审查意见，报市人民政府批准。

第十三条 符合下列条件的区县（自治县）、镇、村、街区，可以申报市级历史文化名城、名镇、名村、街区：

（一）保存文物较为丰富；

（二）历史建筑和传统风貌建筑集中成片；

（三）保留着传统格局和历史风貌；

（四）历史上曾经作为政治、经济、文化、交通中


的认识水平较差，以及个别领导上对婚姻法的重视不够，因而在工作中还存在着许多缺点，我们针对着目前存在的问题，决定今后应该努力的方向。兹将三年来贯彻执行婚姻法的情况报告于后：

   一、封建婚姻形式

   封建残余的旧社会，遗留下不合理的各种婚姻制度约有下列几种：

   （1）早婚发现有三百二十八对，秦安县较多五十五对，经检查出，只解放后就有二百九十八对。其年龄的悬殊女的一般是十四至十七；男的由十七岁到四十五岁的老夫少妻。

   （2）包办买卖，发现三百七十一对。在检查婚姻法后，稍有减少，但多数却是由公开转为秘密，买卖身份价亦降低了。

   （3）重婚只发现一百三十八家，天水市就有一百三十四家。（解放前一百三十一家，解放后三家）。

   （4）童养媳、在各县（市）比较是普遍存在的问题，土改当中，在重点检查婚姻法执行情况时，共发现有一百零九个（八个县（市）的材料），武山较多四十个。经过干部说服教育后，有一部分已送回娘家，或因娘家无人无家可归者，由男方具结，认为义女，侯成年后自由择配，但未被检查到的地方，仍然存在着。

   （5）其他如站门汉、招头亲、子午破夫、舍上舍下、二人共妻（天水店东乡郭家坪兄弟二人占一个女人），干涉寡妇再嫁等。根据各县材料，是少数的，个别的，偏僻的山沟村庄还有。

   这些不合理的婚姻类型，完全是封建制度加在妇女身上的枷锁。虽然早婚，买卖婚姻等不法现象仍然存在，但逐渐觉悟了的妇女，在新婚姻法和政府的保障与支持下，会加强斗争彻底根除的。

   二、贯彻执行婚姻法的情况

   （1）婚姻登记工作，在组织形式上，已经完全建立起来了，而且有专门干部负责此一工作，但实质上，一般作的不够，尤其在一些县部分区乡，由于婚姻法没有彻底贯彻下去，群众对新婚姻法的认识是很模糊的，同时干部思想上对于婚姻登记工作重视的不够，因而发生不合法的婚姻登记和骗领结婚证书，以及干部包庇等现象，在土改前较严重的，如秦安一个乡由五一年�


using System;
using System.Collections.Generic;
using System.Linq;
using ArcCreate.Compose.Components;
using ArcCreate.Compose.History;
using ArcCreate.Compose.Navigation;
using ArcCreate.Gameplay;
using ArcCreate.Gameplay.Chart;
using ArcCreate.Gameplay.Data;
using UnityEngine;
using UnityEngine.UI;

namespace ArcCreate.Compose.EventsEditor
{
    [EditorScope("Groups")]
    public class GroupTable : Table<TimingGroup>
    {
        [SerializeField] private GameplayData gameplayData;
        [SerializeField] private Button addButton;
        [SerializeField] private Button removeButton;
        [SerializeField] private Button selectButton;
        [SerializeField] private TimingGroupField editingTimingGroupField;

        public override TimingGroup Selected
        {
            get => base.Selected;
            set
            {
                base.Selected = value;
                removeButton.interactable = Selected?.GroupProperties.Editable ?? false
                                         && Selected?.GroupNumber > 0;
                selectButton.interactable = Selected?.GroupProperties.Editable ?? false;
            }
        }

        [EditorAction("ChangeGroup", false, "<c-g>")]
        [KeybindHint(Exclude = true)]
        public void OpenPicker()
        {
            editingTimingGroupField.Open(I18n.S("Compose.Dialog.GroupPicker.SelectEditingGroup"));
        }

        public void UpdateEditingGroupField()
        {
            editingTimingGroupField.SetValueWithoutNotify(Selected);
        }

        protected override void Update()
        {
            base.Update();
        }

        protected override void Awake()
        {
            base.Awake();
            gameplayData.OnChartEdit += OnChartEdit;
            gameplayData.OnChartFileLoad += OnChart;
            Values.EditingTimingGroup.OnValueChange += OnEdittingTimingGroup;
            addButton.onClick.AddListener(OnAddButton);
            removeButton.onClick.AddListener(OnRemoveButton);
            selectButton.onClick.AddListener(OnSelectButton);
            editingTimingGroupField.OnValueChanged += OnEditingTimingGroupField;
        }

        protected override void OnDestroy()
        {
            base.OnDestroy();
            gameplayData.OnChartEdit -= OnChartEdit;
            gameplayData.OnChartFileLoad -= OnChart;
            Values.EditingTimingGroup.OnValueChange -= OnEdittingTimingGroup;
            addButton.onClick.RemoveListener(OnAddButton);
            removeButton.onClick.RemoveListener(OnRemoveButton);
            selectButton.onClick.RemoveListener(OnSelectButton);
            editingTimingGroupField.OnValueChanged -= OnEditingTimingGroupField;
        }

        private void OnEditingTimingGroupField(TimingGroup obj)
        {
            Values.EditingTimingGroup.Value = obj.GroupNumber;
        }

        private void OnEdittingTimingGroup(int group)
        {
            Selected = Services.Gameplay.Chart.GetTimingGroup(group);
            UpdateTable(Services.Gameplay.Chart.TimingGroups);


  N_{alpha, beta) (xi, eta) = N_alpha(xi) * N_beta(eta).

        let phi_1d = quad9_phi_1d;
        let phi = |alpha, beta, xi: &Vector2<T>| {
            let x = xi[0];
            let y = xi[1];
            phi_1d(alpha, x) * phi_1d(beta, y)
        };

        MatrixMN::<T, U1, U9>::from_row_slice(&[
            phi(-1.0, -1.0, xi),
            phi( 1.0, -1.0, xi),
            phi( 1.0,  1.0, xi),
            phi(-1.0,  1.0, xi),
            phi( 0.0, -1.0, xi),
            phi( 1.0,  0.0, xi),
            phi( 0.0,  1.0, xi),
            phi(-1.0,  0.0, xi),
            phi( 0.0,  0.0, xi)
        ])
    }

    #[rustfmt::skip]
    #[replace_float_literals(T::from_f64(literal).expect("Literal must fit in T"))]
    fn gradients(&self, xi: &Vector2<T>) -> MatrixMN<T, U2, U9> {
        // See the implementation of `evaluate_basis` for a definition of the basis functions.
        let phi_1d = quad9_phi_1d::<T>;
        let phi_grad_1d = |alpha, xi| {
            let alpha2 = alpha * alpha;
            let a = (3.0 / 2.0) * alpha2 - 1.0;
            let b = alpha / 2.0;
            2.0 * a * xi + b
        };

        let phi_grad = |alpha, beta, xi: &Vector2<T>| {
            let x = xi[0];
            let y = xi[1];
            Vector2::new(
                phi_1d(beta, y) * phi_grad_1d(alpha, x),
                phi_1d(alpha, x) * phi_grad_1d(beta, y)
            )
        };

        MatrixMN::<T, U2, U9>::from_columns(&[
            phi_grad(-1.0, -1.0, xi),
            phi_grad( 1.0, -1.0, xi),
            phi_grad( 1.0,  1.0, xi),
            phi_grad(-1.0,  1.0, xi),
            phi_grad( 0.0, -1.0, xi),
            phi_grad( 1.0,  0.0, xi),
            phi_grad( 0.0,  1.0, xi),
            phi_grad(-1.0,  0.0, xi),
            phi_grad( 0.0,  0.0, xi)
        ])
    }
}

impl<T> FiniteElement<T> for Quad9d2Element<T>
where
    T: RealField,
{
    type GeometryDim = U2;

    #[allow(non_snake_case)]
    fn reference_jacobian(&self, xi: &Vector2<T>) -> Matrix2<T> {
        self.quad.reference_jacobian(xi)
    }

    #[allow(non_snake_case)]
    fn map_reference_coords(&self, xi: &Vector2<T>) -> Vector2<T> {
        self.quad.map_reference_coords(xi)
    }

    // TODO: Write tests for diameter
    fn diameter(&self) -> T {
        self.quad.diameter()
    }
}

impl<T> ElementConnectivity<T> for Quad9d2Connectivity
where
    T: RealField,
{
    type Element = Quad9d2Element<T>;
    type NodalDim = U9;
    type ReferenceDim = U2;
    type GeometryDim = U2;

    fn element(&self


ov r0, r8
	bl ov66_0223F7E8
	mov r2, #0
	add r1, sp, #0x18
	mov r0, r8
	str r2, [sp, #0x18]
	bl ov66_0223F944
	cmp r4, #0
	beq _0223F50C
	mov r7, #0x400
	mov sl, #0
	add sb, sp, #0x14
_0223F4C8:
	mov r0, r7
	bl ov66_02246290
	ldr r3, [r8, #4]
	ldr r2, [r8, #8]
	ldr r1, [r8, #0xc]
	add r2, r3, r2
	mov r6, r0
	sub r0, r2, #1
	bl _u32_div_f
	ldr r2, [r8]
	mov r0, r8
	str r6, [r2, r1, lsl #2]
	mov r1, sb
	str sl, [sp, #0x14]
	bl ov66_0223F944
	subs r4, r4, #1
	bne _0223F4C8
_0223F50C:
	ldr r0, [r5, #0x10]
	cmp r0, #0
	beq _0223F5FC
	ldr r1, [r5, #0x14]
	cmp r1, #0
	moveq r1, #0
	beq _0223F538
	ldr r2, [r5, #0xc]
	ldr r0, [r5, #0x10]
	add r0, r2, r0
	bl _u32_div_f
_0223F538:
	ldr r4, [r5, #8]
	ldr r2, [r5, #0xc]
	ldr r0, [r5, #0x14]
	add r3, r4, r2, lsl #2
	add r2, r4, r0, lsl #2
	add r1, r4, r1, lsl #2
	str r1, [sp, #0x64]
	add r0, sp, #0x64
	str r4, [sp, #0x68]
	str r3, [sp, #0x6c]
	str r2, [sp, #0x70]
	mvn r1, #0
	bl ov66_02240C80
	ldr r0, [r5, #8]
	ldr r2, [r5, #0xc]
	ldr r1, [r5, #0x14]
	add sb, r0, r2, lsl #2
	mov r6, #0
	ldr r7, [r8]
	ldr r2, [r8, #0xc]
	ldr r3, [r8, #4]
	add r2, r7, r2, lsl #2
	add r4, r7, r3, lsl #2
	ldr r3, [sp, #0x64]
	str r2, [sp, #0x38]
	ldr r2, [sp, #0x68]
	str r3, [sp, #0x50]
	ldr r3, [sp, #0x6c]
	str r2, [sp, #0x54]
	ldr r2, [sp, #0x70]
	str r7, [sp, #0x30]
	add r7, r0, r1, lsl #2
	str r3, [sp, #0x58]
	str r2, [sp, #0x5c]
	str r0, [sp, #0x40]
	add r1, sp, #0x2c
	add r2, sp, #0x3c
	add r3, sp, #0x50
	str r7, [sp, #


 o is CarouselRecord;
}
import 'dart:async';

import 'package:collection/collection.dart';

import '/backend/schema/util/firestore_util.dart';
import '/backend/schema/util/schema_util.dart';

import 'index.dart';
import '/flutter_flow/flutter_flow_util.dart';

class BrandsRecord extends FirestoreRecord {
  BrandsRecord._(
    DocumentReference reference,
    Map<String, dynamic> data,
  ) : super(reference, data) {
    _initializeFields();
  }

  // "name" field.
  String? _name;
  String get name => _name ?? '';
  bool hasName() => _name != null;

  // "description" field.
  String? _description;
  String get description => _description ?? '';
  bool hasDescription() => _description != null;

  // "image" field.
  ImageStruct? _image;
  ImageStruct get image => _image ?? ImageStruct();
  bool hasImage() => _image != null;

  // "featured" field.
  bool? _featured;
  bool get featured => _featured ?? false;
  bool hasFeatured() => _featured != null;

  void _initializeFields() {
    _name = snapshotData['name'] as String?;
    _description = snapshotData['description'] as String?;
    _image = ImageStruct.maybeFromMap(snapshotData['image']);
    _featured = snapshotData['featured'] as bool?;
  }

  static CollectionReference get collection =>
      FirebaseFirestore.instance.collection('brands');

  static Stream<BrandsRecord> getDocument(DocumentReference ref) =>
      ref.snapshots().map((s) => BrandsRecord.fromSnapshot(s));

  static Future<BrandsRecord> getDocumentOnce(DocumentReference ref) =>
      ref.get().then((s) => BrandsRecord.fromSnapshot(s));

  static BrandsRecord fromSnapshot(DocumentSnapshot snapshot) => BrandsRecord._(
        snapshot.reference,
        mapFromFirestore(snapshot.data() as Map<String, dynamic>),
      );

  static BrandsRecord getDocumentFromData(
    Map<String, dynamic> data,
    DocumentReference reference,
  ) =>
      BrandsRecord._(reference, mapFromFirestore(data));

  @override
  String toString() =>
      'BrandsRecord(reference: ${reference.path}, data: $snapshotData)';

  @override
  int get hashCode => reference.path.hashCode;

  @override
  bool operator ==(other) =>
      other is BrandsRecord &&
      reference.path.hashCode == other.reference.path.hashCode;
}

Map<String, dynamic> createBrandsRecordData({
  String? name,
  String? description,
  ImageStruct? image,
  bool? featured,
}) {
  final firestoreData = mapToFirestore(
    <String, dynamic>{
      'name': name,
      'description': description,
      'image': ImageStruct().toMap(),
      'featured': featured,
    }.withoutNulls,
  );

  // Handle nested data for "image" field.
  addImageStructData(firestoreData, image, 'image');

  return firestoreData;
}

class BrandsRecordDocumentEquality implements Equality<BrandsRecord> {
  const BrandsRecordDocumentEquality();

  @override
  bool equals(BrandsRecord? e1, BrandsRecord? e2) {
    return e1?.name == e2?.name &&
        e1?.description == e2?.description &&
        e1?.image == e2?.image &&
        e1?.featured == e2?.featured;
  }

  @override
  int hash(BrandsRecord? e) => const ListEquality()
      .hash([e?.name, e?.description, e?.image, e?.featured]);

  @override
  bool isValidKey(Object? o) => o is BrandsRecord;
}
import 'dart:convert';
import 'dart:


svg>');--md-admonition-icon--question:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m15.07 11.25-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 0 0-2-2 2 2 0 0 0-2 2H8a4 4 0 0 1 4-4 4 4 0 0 1 4 4 3.2 3.2 0 0 1-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10c0-5.53-4.5-10-10-10Z"/></svg>');--md-admonition-icon--warning:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2V9h2m0 9h-2v-2h2M1 21h22L12 2 1 21Z"/></svg>');--md-admonition-icon--failure:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"/></svg>');--md-admonition-icon--danger:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m11.5 20 4.86-9.73H13V4l-5 9.73h3.5V20M12 2c2.75 0 5.1 1 7.05 2.95C21 6.9 22 9.25 22 12s-1 5.1-2.95 7.05C17.1 21 14.75 22 12 22s-5.1-1-7.05-2.95C3 17.1 2 14.75 2 12s1-5.1 2.95-7.05C6.9 3 9.25 2 12 2Z"/></svg>');--md-admonition-icon--bug:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 13h2v1h-2v-1m10-8v6c0 5.5-3.8 10.7-9 12-5.2-1.3-9-6.5-9-12V5l9-4 9 4m-4 5h-2.2c-.2-.6-.6-1.1-1.1-1.5l1.2-1.2-.7-.7L12.8 8H12c-.2 0-.5 0-.7.1L9.9 6.6l-.8.8 1.2 1.2c-.5.3-.9.8-1.1 1.4H7v1h2v1H7v1h2v1H7v1h2.2c.4 1.2 1.5 2 2.8 2s2.4-.8 2.8-2H17v-1h-2v-1h2v-1h-2v-1h2v-1m-6 2h2v-1h-2v1Z"/></svg>');--md-admonition-icon--example:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 2v2h1v14a4 4 0 0 0 4 4 4 4 0 0 0 4-4V4h1V2H7m4 14c-.6 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.4 1-1 1m2-4c-.6 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.4 1-1 1m1-5h-4V4h4v3Z"/></svg>');--md-admonition-icon--quote:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 17h3l2-4V7h-6v6h3M6 17h3


时：
- **快速用户搜索**: 侧边栏顶部将出现一个搜索框，提示"搜索当前用户推文..."。在此输入关键词并点击"搜索"，即可查找该用户发布的包含这些关键词的推文。
- **通用搜索框**: 下方的通用搜索框也会自动显示"搜索 Elon Musk 的推文..."，所有通过"简单搜索"或"高级搜索"进行的查询都将默认限定在该用户的内容范围内。
- 可以搜索该用户关于特定话题的推文
- 支持按时间筛选该用户的历史推文

### 场景2: 高级内容发现
- **热门话题**: 搜索特定话题下的高互动推文
- **新闻追踪**: 查找来自认证媒体账号的相关新闻
- **趋势分析**: 按时间范围分析话题发展趋势
- **用户互动**: 查找用户之间的对话和互动

### 场景3: 专业研究
- **舆情监控**: 监控品牌或产品的提及情况
- **竞品分析**: 分析竞争对手的社交媒体活动
- **市场研究**: 收集特定行业或话题的用户观点
- **学术研究**: 收集和分析社交媒体数据

## 技术架构

### 搜索引擎核心
```javascript
// 搜索条件构建器
class SearchQueryBuilder {
    constructor() {
        this.conditions = [];
        this.currentUser = null;
    }

    // 添加用户条件
    addUserCondition(username, type = 'from') {
        this.conditions.push(`${type}:${username}`);
        return this;
    }

    // 添加内容条件
    addContentCondition(keywords, exact = false) {
        if (exact) {
            this.conditions.push(`"${keywords}"`);
        } else {
            this.conditions.push(keywords);
        }
        return this;
    }

    // 生成最终搜索语法
    build() {
        return this.conditions.join(' ');
    }
}
```

### 用户感知


	absLimit64 := int64(absLimit)
	var f int64
	switch maxSize {
	case 0:
		f = absLimit64
	case 1:
		f = -absLimit64
	default:
		f = int64(mrand.Uint64()%(2*uint64(absLimit64)+1)) - absLimit64 //#nosec G404 weak rng is fine here
	}

	if f > 1<<31 {
		return 1 << 31
	} else if f < -1<<31+1 {
		return -1<<31 + 1
	}

	return f
}

func abs64T32(f int64) uint32 {
	if f >= 1<<32 || f < -1<<32 {
		panic("f out of range")
	}

	if f < 0 {
		return uint32(-f)
	}
	return uint32(f)
}

func randomizeUpdateFactors() (int64, int64) {
	var f [2]int64
	b := mrand.Int() % 2 //#nosec G404 weak rng is fine here

	f[b] = randomizeUpdateFactor(1 << 31)

	//As per the paper, |f| + |g| \le 2³¹.
	f[1-b] = randomizeUpdateFactor(1<<31 - abs64T32(f[b]))

	//Patching another edge case
	if f[0]+f[1] == -1<<31 {
		b = mrand.Int() % 2 //#nosec G404 weak rng is fine here
		f[b]++
	}

	return f[0], f[1]
}

func testLinearComb(t *testing.T, x *Element, xC int64, y *Element, yC int64) {

	var p1 big.Int
	x.toBigInt(&p1)
	p1.Mul(&p1, big.NewInt(xC))

	var p2 big.Int
	y.toBigInt(&p2)
	p2.Mul(&p2, big.NewInt(yC))

	p1.Add(&p1, &p2)
	p1.Mod(&p1, Modulus())
	montReduce(&p1, &p1)

	var z Element
	z.linearComb(x, xC, y, yC)
	z.assertMatchVeryBigInt(t, 0, &p1)
}

func testBigNumWMul(t *testing.T, a *Element, c int64) {
	var aHi uint64
	var aTimes Element
	aHi = aTimes.mulWNonModular(a, c)

	assertMulProduct(t, a, c, &aTimes, aHi)
}

func updateFactorsCompose(f int64, g int64) int64 {
	return f + g<<32
}

var rInv big.Int

func montReduce(res *big.Int, x *big.Int) {
	if rInv.BitLen() == 0 { // initialization
		rInv.SetUint64(1)
		rInv.Lsh(&rInv, Limbs*64)
		rInv.ModInverse(&rInv, Modulus())
	}
	res.Mul(x, &rInv)
	res.Mod(res, Modulus())
}

func (z *Element) toVeryBigIntUnsigned(i *big.Int, xHi uint64) {
	z.toBigInt(i)
	var upperWord big.Int
	upperWord.SetUint64(xHi)
	upperWord.Lsh(&upperWord, Limbs*64)
	i.Add(&upperWord, i)
}

func (z *Element) toVeryBigIntSigned(i *big.Int, xHi uint64) {
	z.toVeryBigIntUnsigned(i, xHi)
	if signBitSelector&xHi != 0 {
		twosCompModulus := big.NewInt(1)
		twosCompModulus.Lsh(twosCompModulus, (Limbs+1)*64)
		i.Sub(i, twosCompModulus)
	}
}

func assertMulProduct(t *testing.T, x *Element, c int64, result *Element, resultHi uint64) big.Int {
	var xInt big.Int
	x.toBigInt(&xInt)

	xInt


retrieve the Raven Claw Talisman, Black Feather Quill, Sapphire of Sky, and Rune of Nesting. The druids store them in sacred chests.  Return them to me and I will prepare the awakening ritual.",
    ["O"] = "Retrieve the Relics of Wakening and bring them to Athridas Bearmantle in Dolanaar.",
    ["T"] = "깨움의 의식을 위한 재료",
  },
  [484] = {
    ["D"] = "저는 무두장이 제임스 할로란이라고 합니다. 제가 가공한 악어 껍질은 인기가 많아 여기저기서 주문이 들어오고 있답니다. 제 제품들은 배에 실려 전 세계로 배달되기도 하지요.$B$B아이나르를 만나셨죠? 아이나르도 저한테 악어 껍질을 납품하는 사냥꾼 중 하나랍니다.$B$B그런데 요즘 새끼 악어의 부드러운 껍질이 좀 부족합니다. 그러니 새끼 악어 껍질을 구해 주신다면 값을 후하게 쳐 드리겠습니다. 마을 바로 바깥쪽에 있는 습지에 가면 새끼 악어를 찾을 수 있을 겁니다.",
    ["O"] = "메네실 항구의 제임스 할로란이 새끼 악어 껍질 4장을 가져와 달라고 했습니다.",
    ["T"] = "새끼 악어 가죽",
  },
  [485] = {
    ["D"] = "금속으로 만들어진 이상한 알 모양의 장치를 찾았습니다. 손잡이 하나를 만지작거리다 보니 작동이 시작되면서 노움 로봇 장치로 변합니다! 로봇 속에서 소음과 함께 목소리가 들려옵니다.$B$B\"나는 오글소프 오브노티쿠스라고 하는데, 불시착한 내 유도 로봇을 찾아주면 사례를 하겠소. 이 탐지기를 로봇이 있는 곳으로 가져가시오!\"$B$B\"방금 로봇의 현재 위치를 산출해 봤는데 굼벵이 바위굴 근처, 동부 내륙지의 강이 시작되는 곳에 추락한 것 같소!\"",
    ["O"] = "굼벵이 바위굴 근처, 동부 내륙지의 강이 시작되는 곳에 추락한 오글소프의 유도 로봇에게 조난 탐지기를 가져가야 합니다.",
    ["T"] = "OOX-09/HL 수색",
  },
  [486] = {
    ["D"] = "Now the time has come to save the Druids of the Talon. If we fail now, $N, they will be forever lost in sleep.$b$bI shall prepare the Relics of Wakening and perform the ritual. For my work to take effect, the cursed beast responsible for this horrible situation must be slain.  Only then will the ritual be complete.$b$bIt was Ursal the Mauler who meddled with our brethren\'s calling and it is Ursal the Mauler who must now pay so they can be freed.  Travel to Gnarlpine Hold in the southwest and slay him.",


78a4 4 0 0 1-3.6 5.73zM12 21V3.23c-.72 0-1.44.37-1.8 1.13L3.57 18.13A2 2 0 0 0 5.37 21z"
          />
        </svg>

        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
          <path
            d="M5.37 23a4 4 0 0 1-3.6-5.73L8.4 3.49a4 4 0 0 1 7.2 0l6.63 13.78a4 4 0 0 1-3.6 5.73zM12 21V3.23c-.72 0-1.44.37-1.8 1.13L3.57 18.13A2 2 0 0 0 5.37 21z"
          />
        </svg>

          <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
            <path
              d="M5.37 23a4 4 0 0 1-3.6-5.73L8.4 3.49a4 4 0 0 1 7.2 0l6.63 13.78a4 4 0 0 1-3.6 5.73zM12 21V3.23c-.72 0-1.44.37-1.8 1.13L3.57 18.13A2 2 0 0 0 5.37 21z"
            />
          </svg>

          <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
            <path
              d="M5.37 23a4 4 0 0 1-3.6-5.73L8.4 3.49a4 4 0 0 1 7.2 0l6.63 13.78a4 4 0 0 1-3.6 5.73zM12 21V3.23c-.72 0-1.44.37-1.8 1.13L3.57 18.13A2 2 0 0 0 5.37 21z"
            />
          </svg>

Orig 229

New 229

Diff 0.00%

flip-vertical.svg

        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
          <path
            d="M1 5.37a4 4 0 0 1 5.73-3.6l13.78 6.62a4 4 0 0 1 0 7.21L6.73 22.23A4 4 0 0 1 1 18.63zM3 12h17.77c0-.72-.37-1.44-1.13-1.8L5.87 3.57A2 2 0 0 0 3 5.37z"
          />
        </svg>

        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
          <path
            d="M1 5.37a4 4 0 0 1 5.73-3.6l13.78 6.62a4 4 0 0 1 0 7.21L6.73 22.23A4 4 0 0 1 1 18.63zM3 12h17.77c0-.72-.37-1.44-1.13-1.8L5.87 3.57A2 2 0 0 0 3 5.37z"
          />
        </svg>

      <div
        class="icon icon-overlay"
        title="Orig: White, New: Red, Overlap: Blue"


    var wellKnown: BytesRules.WellKnown<*>? = null

    val unknownFields = u.readMessage(this) { _fieldNumber, _fieldValue ->
        when (_fieldNumber) {
            1 -> const = _fieldValue as pbandk.ByteArr
            2 -> minLen = _fieldValue as Long
            3 -> maxLen = _fieldValue as Long
            4 -> pattern = _fieldValue as String
            5 -> prefix = _fieldValue as pbandk.ByteArr
            6 -> suffix = _fieldValue as pbandk.ByteArr
            7 -> contains = _fieldValue as pbandk.ByteArr
            8 -> `in` = (`in` ?: pbandk.ListWithSize.Builder()).apply { this += _fieldValue as kotlin.sequences.Sequence<pbandk.ByteArr> }
            9 -> notIn = (notIn ?: pbandk.ListWithSize.Builder()).apply { this += _fieldValue as kotlin.sequences.Sequence<pbandk.ByteArr> }
            10 -> wellKnown = BytesRules.WellKnown.Ip(_fieldValue as Boolean)
            11 -> wellKnown = BytesRules.WellKnown.Ipv4(_fieldValue as Boolean)
            12 -> wellKnown = BytesRules.WellKnown.Ipv6(_fieldValue as Boolean)
            13 -> len = _fieldValue as Long
        }
    }

    return BytesRules(const, len, minLen, maxLen,
        pattern, prefix, suffix, contains,
        pbandk.ListWithSize.Builder.fixed(`in`), pbandk.ListWithSize.Builder.fixed(notIn), wellKnown, unknownFields)
}

@pbandk.Export
@pbandk.JsName("orDefaultForEnumRules")
public fun EnumRules?.orDefault(): pbandk.testpb.EnumRules = this ?: EnumRules.defaultInstance

private fun EnumRules.protoMergeImpl(plus: pbandk.Message?): EnumRules = (plus as? EnumRules)?.let {
    it.copy(
        const = plus.const ?: const,
        definedOnly = plus.definedOnly ?: definedOnly,
        `in` = `in` + plus.`in`,
        notIn = notIn + plus.notIn,
        unknownFields = unknownFields + plus.unknownFields
    )
} ?: this

@Suppress("UNCHECKED_CAST")
private fun EnumRules.Companion.decodeWithImpl(u: pbandk.MessageDecoder): EnumRules {
    var const: Int? = null
    var definedOnly: Boolean? = null
    var `in`: pbandk.ListWithSize.Builder<Int>? = null
    var notIn: pbandk.ListWithSize.Builder<Int>? = null

    val unknownFields = u.readMessage(this) { _fieldNumber, _fieldValue ->
        when (_fieldNumber) {
            1 -> const = _fieldValue as Int
            2 -> definedOnly = _fieldValue as Boolean
            3 -> `in` = (`in` ?: pbandk.ListWithSize.Builder()).apply { this += _fieldValue as kotlin.sequences.Sequence<Int> }
            4 -> notIn = (notIn ?: pbandk.ListWithSize.Builder()).apply { this += _fieldValue as kotlin.sequences.Sequence<Int> }
        }
    }

    return EnumRules(const, definedOnly, pbandk.ListWithSize.Builder.fixed(`in`), pbandk.ListWithSize.Builder.fixed(notIn), unknownFields)
}

@pbandk.Export
@pbandk.JsName("orDefaultForMessageRules")
public fun MessageRules?.orDefault(): pbandk.testpb.MessageRules = this ?: MessageRules.defaultInstance

private fun MessageRules.protoMergeImpl(plus: pbandk.Message?): MessageRules = (plus as? MessageRules)?.let {
    it.copy(
        skip = plus.skip ?: skip,
        required = plus.required ?: required,
        unknownFields = unknownFields + plus.unknownFields
    )
} ?: this

@Suppress("UNCHECKED_CAST")
private fun MessageRules.Companion.decodeWithImpl(u: pbandk


				session.Persist(item);
				session.Flush();
			}
		}

		protected override void OnTearDown()
		{
			using (ISession session = Sfi.OpenSession())
			{
				session.CreateQuery("delete from Item").ExecuteUpdate();
				session.Flush();
			}
			base.OnTearDown();
		}

		public static Expression<Func<Item, bool>> GetExpression(DateTime startTime)
		{
			return item => item.Details.StartTime == startTime;
		}

		[Test]
		public async Task CanUseExpressionForWhereAsync()
		{
			using (ISession session = Sfi.OpenSession())
			{
				IQueryOver<Item, Item> query = session.QueryOver(() => Item);

				var start = DateTime.UtcNow;

				query
					.Where(GetExpression(start));

				await (query.ListAsync());
			}
		}
	}
}


_path)
    }

    fn get_request(&self, f: &Functionality, payload: HashMap<&str, String>) -> Result<ApiRequest>
    {
        let fp = self.api.get_function_params(f)?;

        match fp.access_type {
            AccessType::Public => {
                return Ok(
                    self.http_client.get(self.get_url(fp))
                        );
            },
            AccessType::Private => {
                Err(Error::ApiFunctionNotSupported("Private secure functions"))
            }
        }
    }
}

#[derive(Deserialize, Debug)]
pub struct Time {
    iso: DateTime,
    epoch: u64,
}

#[derive(Deserialize, Debug)]
#[serde(rename(deserialize = "data"), rename_all = "camelCase")]
pub struct Data<D> {
    data: D
}

#[async_trait]
impl ServerTime for Coinbase {
    async fn get_time(&self) -> Result<DateTime> {

        let rb = self.get_request(&Functionality::Time, HashMap::<&str, String>::new())?;
        let r = rb.send().await?;

        let res: Data<Time> = r.json::<Data<Time>>().await?;
        println!("{:?}", res);
        Ok(res.data.iso)
    }
}<reponame>nsarlin/bevy
use crate as bevy_reflect;
use crate::ReflectDeserialize;
use bevy_reflect_derive::{impl_from_reflect_value, impl_reflect_value};
use glam::*;

impl_reflect_value!(IVec2(PartialEq, Serialize, Deserialize));
impl_reflect_value!(IVec3(PartialEq, Serialize, Deserialize));
impl_reflect_value!(IVec4(PartialEq, Serialize, Deserialize));
impl_reflect_value!(UVec2(PartialEq, Serialize, Deserialize));
impl_reflect_value!(UVec3(PartialEq, Serialize, Deserialize));
impl_reflect_value!(UVec4(PartialEq, Serialize, Deserialize));
impl_reflect_value!(Vec2(PartialEq, Serialize, Deserialize));
impl_reflect_value!(Vec3(PartialEq, Serialize, Deserialize));
impl_reflect_value!(Vec3A(PartialEq, Serialize, Deserialize));
impl_reflect_value!(Vec4(PartialEq, Serialize, Deserialize));
impl_reflect_value!(DVec2(PartialEq, Serialize, Deserialize));
impl_reflect_value!(DVec3(PartialEq, Serialize, Deserialize));
impl_reflect_value!(DVec4(PartialEq, Serialize, Deserialize));
impl_reflect_value!(Mat3(PartialEq, Serialize, Deserialize));
impl_reflect_value!(Mat4(PartialEq, Serialize, Deserialize));
impl_reflect_value!(Quat(PartialEq, Serialize, Deserialize));

impl_from_reflect_value!(IVec2);
impl_from_reflect_value!(IVec3);
impl_from_reflect_value!(IVec4);
impl_from_reflect_value!(UVec2);
impl_from_reflect_value!(UVec3);
impl_from_reflect_value!(UVec4);
impl_from_reflect_value!(Vec2);
impl_from_reflect_value!(Vec3);
impl_from_reflect_value!(Vec4);
impl_from_reflect_value!(Vec3A);
impl_from_reflect_value!(DVec2);
impl_from_reflect_value!(DVec3);
impl_from_reflect_value!(DVec4);
impl_from_reflect_value!(Mat3);
impl_from_reflect_value!(Mat4);
impl_from_reflect_value!(Quat);
use super::{AccountID, AccountStatus, FailedBalanceAssertion, Transaction};
use commodity::exchange_rate::ExchangeRateError;
use commodity::{Commodity, CommodityError, CommodityTypeID};
use thiserror::Error;

/// An error associated with functionality in the [accounting](./index.html) module.
///
/// TODO: add context for the error for where it occurred within the [Program](super::Program)
#[derive(Error, Debug)]
pub enum AccountingError {
    #[error("error relati


local QBCore = exports['qb-core']:GetCoreObject()

local PlayerRobbedItemRecent = {}
local PlayerRobbedCashRecent = {}

local function sendToDiscord(title, message)

    local embeds = {
        {
            ["title"] = title,
            ["type"] = "rich",
            ["description"] = message,
            ["color"] = 16711680,  -- Red color
        }
    }
    if Config.WebhookUrl ~= "YOUR_DISCORD_WEBHOOK_URL_HERE" then
        PerformHttpRequest(Config.WebhookUrl, function(statusCode, response, headers)
            if statusCode ~= 204 then
                print("Failed to send log to Discord. Status code: " .. statusCode)
                print("Response:", response)
            end
        end, 'POST', json.encode({embeds = embeds}), {['Content-Type'] = 'application/json'})
    else
        print("Config.WebhookUrl Has Not Been Configured")
    end
end

QBCore.Functions.CreateUseableItem(Config.RobbingKit, function(source, item)
    local src = source
	local Player = QBCore.Functions.GetPlayer(src)
	if not Player.Functions.GetItemByName(item.name) then
        return
    end

    TriggerClientEvent("Cyb3r-robitem:openmenu", src)
end)

if Config.EnableRobbingCommand then
    QBCore.Commands.Add(Config.RobbingCommand, "Will start robbing the closest player near you", {}, false, function(source)
        TriggerClientEvent("Cyb3r-robitem:openmenu", source)
    end, Config.RobbingCommandPerms)
end

QBCore.Functions.CreateCallback('Cyb3r-robitem:isplayerdead', function(source, cb, PlayerId)
    local Player = QBCore.Functions.GetPlayer(tonumber(PlayerId))
    local StealingPlayer = QBCore.Functions.GetPlayer(source)
    if Player and StealingPlayer then
        local bool = Player.PlayerData.metadata['isdead']
        if Config.EnableAlivePlayerRob then
            if Config.CheckPlayerHandCuffed then
                if Player.PlayerData.metadata['ishandcuffed'] then
                    bool = true
                else
                    bool = "notcuffed"
                end
            else
                bool = true
            end
        end
        if bool then
            if Config.EnableRobbingCommand then
                if Config.Logs and bool then
                    local StealingPlayerName =  StealingPlayer.PlayerData.charinfo.firstname .. " " .. StealingPlayer.PlayerData.charinfo.lastname
                    local RobbedPlayerName =  Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname
                    sendToDiscord("[Cyber-Robbing]",'**ID:** ``'..source..'`` **|** ``'..StealingPlayerName..' ('..GetPlayerName(source)..')`` **Is Robbing The Player ID:** ``'..PlayerId..'`` **|** ``'..RobbedPlayerName..' ('..GetPlayerName(PlayerId)..')``')
                end
                cb(bool)
            else
                local Item = StealingPlayer.Functions.GetItemByName(Config.RobbingKit)
                local ItemSlot = StealingPlayer.PlayerData.items[Item.slot]

                if ItemSlot.info.quality > 0 then
                    ItemSlot.info.quality = ItemSlot.info.quality - (100 / tonumber(Config.RobbingKitUses))
                    StealingPlayer.Functions.SetInventory(StealingPlayer.PlayerData.items, true)
                    if Config.Logs and bool then
                        local StealingPlayerName =  StealingPlayer.PlayerData.charinfo.firstname .. " " .. StealingPlayer.PlayerData.charinfo.lastname
                        local RobbedPlayerName =  Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname
                        sendToDiscord("[Cyber-Robbing]",'**ID:** ``'..source..'`` **|** ``'..StealingPlayerName..' ('..GetPlayerName(source)..')`` **Is Robbing The Player ID


    terminal::Frame,
    widgets::{Block, Paragraph, Text},
};

pub trait NetworkBasicWidget {
    fn draw_basic_network<B: Backend>(
        &self, f: &mut Frame<'_, B>, app_state: &mut App, draw_loc: Rect, widget_id: u64,
    );
}

impl NetworkBasicWidget for Painter {
    fn draw_basic_network<B: Backend>(
        &self, f: &mut Frame<'_, B>, app_state: &mut App, draw_loc: Rect, widget_id: u64,
    ) {
        let divided_loc = Layout::default()
            .direction(Direction::Horizontal)
            .constraints([Constraint::Percentage(50), Constraint::Percentage(50)].as_ref())
            .split(draw_loc);

        let net_loc = Layout::default()
            .direction(Direction::Horizontal)
            .constraints([Constraint::Percentage(100)].as_ref())
            .horizontal_margin(1)
            .split(divided_loc[0]);

        let total_loc = Layout::default()
            .direction(Direction::Horizontal)
            .constraints([Constraint::Percentage(100)].as_ref())
            .horizontal_margin(1)
            .split(divided_loc[1]);

        if app_state.current_widget.widget_id == widget_id {
            f.render_widget(
                Block::default()
                    .borders(*SIDE_BORDERS)
                    .border_style(self.colours.highlighted_border_style),
                draw_loc,
            );
        }

        let rx_label = format!("RX: {}\n", &app_state.canvas_data.rx_display);
        let tx_label = format!("TX: {}", &app_state.canvas_data.tx_display);
        let total_rx_label = format!("Total RX: {}\n", &app_state.canvas_data.total_rx_display);
        let total_tx_label = format!("Total TX: {}", &app_state.canvas_data.total_tx_display);

        let net_text = vec![
            Text::Styled(rx_label.into(), self.colours.rx_style),
            Text::Styled(tx_label.into(), self.colours.tx_style),
        ];

        let total_net_text = vec![
            Text::Styled(total_rx_label.into(), self.colours.total_rx_style),
            Text::Styled(total_tx_label.into(), self.colours.total_tx_style),
        ];

        f.render_widget(
            Paragraph::new(net_text.iter()).block(Block::default()),
            net_loc[0],
        );

        f.render_widget(
            Paragraph::new(total_net_text.iter()).block(Block::default()),
            total_loc[0],
        );
    }
}
#[macro_use]
extern crate criterion;

use criterion::{Benchmark, Criterion, Throughput};

fn criterion_benchmark(c: &mut Criterion) {
    let input = r#"
    {
        "key1": "value1",
        "key2": "value2",
        "key3": "value3"
    }
    "#;
    c.bench(
        "lex",
        Benchmark::new("lex_small", move |b| b.iter(|| input == ""))
            .throughput(Throughput::Bytes(input.as_bytes().len() as u32)),
    );

    let input = r#"
    {
        "key1": "value1",
        "key2": "value2",
        "key3": "value3",
        "nested": {
            "nested_key1":"nested_value1",
            "nested_key2": "nested_value2",
            "nested_key3": "n


e termIterator = Integrand.FirstTermIterator();
	nmrBernsteinPolynomial::TermConstIteratorType termEndIterator = Integrand.EndTermIterator();
	while (termIterator != termEndIterator) {

		// Evaluate the line integral for the current term, and add it to the total.
        const CoefficientType coefficient = (coefficients != NULL)
            ? *coefficients
            : Integrand.GetCoefficient(termIterator);
		ValueType termIntegral = IntegrateSingleTerm(
			coefficient,
			gradientNorm,
			Integrand.GetTermPowerIndex(termIterator),
#if CACHE_POWER_BASIS
            PowersAtP0, PowersAtP1,
#else
			powersAtP0, powersAtP1,
#endif
			roundoffTolerance);

		// Accumulate the term integral for the result.
		result += termIntegral;

		// go to the next term
		termIterator++;

        if (coefficients != NULL)
            ++coefficients;
	}
#endif
	return result;
}

nmrBernsteinPolynomialLineIntegral::ValueType
nmrBernsteinPolynomialLineIntegral::IntegrateSingleTerm(const CoefficientType termCoefficient,
														const CoefficientType gradientNorm,
														const nmrPolynomialTermPowerIndex & termIndex,
                                                        const nmrMultiVariablePowerBasis & powersAtP0,
                                                        const nmrMultiVariablePowerBasis & powersAtP1,
														const double roundoffTolerance)
{
	const VariableIndexType numVariables = termIndex.GetNumVariables();

	// These are the multi-index counters of the summation : the counter index a_k
	// goes from 0 to p_k==termIndex.GetPower(k)
	// may be cached later to save allocation/deallocation overhead
	nmrMultiIndexCounter p0Counter( numVariables );
	nmrMultiIndexCounter p1Counter( numVariables );

	// A vector of zeros used to initialize the mutli-index counters as the lower
	// bounds.
	// may be cached later to save allocation/deallocation overhead
	const std::vector<nmrMultiIndexCounter::IndexType> zeros( p0Counter.GetSize(), 0 );

	// We use explicit cast to convert 'unsigned int *' to 'int *'. Make sure
	// that IndexType and PowerType are compatible in size.
	p0Counter.SetBounds( &zeros[0], termIndex.GetPowersAsSigned() );
	p1Counter.SetBounds( &zeros[0], termIndex.GetPowersAsSigned() );

	// If any of the variables is zero, we want to factor its counterpart out of
	// the summation.  See Russ Taylor's simplification of the line integral
	// for the case of a ray intersecting a face of a tetrahedron, and a barycentric
	// coordinate at the intersection point is zero.
	//
	// After the factoring out, we reduce the number of iterations.  We could have
	// done better by completely factoring out the product of the degenerate variables,
	// and not evaluating it in the inner loop.  But I suspect that the required
	// tests are too complicated, and don't gain as much performance as the reduction
	// in interation count.
	nmrPolynomialBase::VariableIndexType variableIndex;
	for (variableIndex = 0; variableIndex < numVariables; variableIndex++) {
		// We test both endpoints of the segment in the same loop to avoid conflicts
		// related to degenerate cases, where more the same coordinate is zero in both
		// endpoints.
		if ( fabs(powersAtP0.GetVariable(variableIndex)) <= roundoffTolerance) {
			p0Counter.SetHighBound(variableIndex, 0);
			const nmrPolynomialTermPowerIndex::PowerType p1Power = termIndex.GetPower(variableIndex);
			p1Counter.SetLowBound(variableIndex, p1Power);
			continue;
		}

		if ( fabs(powersAtP1.GetVariable(variableIndex)) <= round


#define QUARTERROUND4(x0,x1,x2,x3,shuf_rol8,shuf_rol16,tmp1,shuf_x1,\
		      shuf_x2,shuf_x3) \
	PLUS(x0, x1); XOR(x3, x0); ROTATE_SHUF(x3, shuf_rol16); \
	PLUS(x2, x3); XOR(x1, x2); ROTATE(x1, 12, tmp1); \
	PLUS(x0, x1); XOR(x3, x0); ROTATE_SHUF(x3, shuf_rol8); \
	PLUS(x2, x3); \
	  WORD_SHUF(x3, shuf_x3); \
		      XOR(x1, x2); \
	  WORD_SHUF(x2, shuf_x2); \
				   ROTATE(x1, 7, tmp1); \
	  WORD_SHUF(x1, shuf_x1);

.align 16
.globl _gcry_chacha20_amd64_ssse3_blocks1
ELF(.type _gcry_chacha20_amd64_ssse3_blocks1,@function;)

_gcry_chacha20_amd64_ssse3_blocks1:
	/* input:
	 *	%rdi: input
	 *	%rsi: dst
	 *	%rdx: src
	 *	%rcx: nblks
	 */
	CFI_STARTPROC();

	/* Load constants */
	movdqa .Lcounter1 rRIP, X4;
	movdqa .Lshuf_rol8 rRIP, X5;
	movdqa .Lshuf_rol16 rRIP, X6;

	/* Load state */
	movdqu (0 * 4)(INPUT), X10;
	movdqu (4 * 4)(INPUT), X11;
	movdqu (8 * 4)(INPUT), X12;
	movdqu (12 * 4)(INPUT), X13;

	cmp $2, NBLKS;
	jb .Loop1;

	mov $20, ROUND;

	movdqa X10, X0;
	movdqa X11, X1;
	movdqa X12, X2;
	movdqa X13, X3;

	movdqa X10, X8;
	movdqa X11, X9;
	movdqa X12, X14;
	movdqa X13, X15;
	paddq X4, X15;

.Lround2_2:
	QUARTERROUND4(X0, X1, X2,  X3,  X5, X6, X7, 0x39, 0x4e, 0x93);
	QUARTERROUND4(X8, X9, X14, X15, X5, X6, X7, 0x39, 0x4e, 0x93);
	QUARTERROUND4(X0, X1, X2,  X3,  X5, X6, X7, 0x93, 0x4e, 0x39);
	QUARTERROUND4(X8, X9, X14, X15, X5, X6, X7, 0x93, 0x4e, 0x39);
	sub $2, ROUND;
	jnz .Lround2_2;

	PLUS(X0, X10);
	PLUS(X1, X11);
	PLUS(X2, X12);
	PLUS(X3, X13);

	/* Update counter */
	paddq X4, X13;

	PLUS(X8, X10);
	PLUS(X9, X11);
	PLUS(X14, X12);
	PLUS(X15, X13);

	/* Update counter */
	paddq X4, X13;

	xor_src_dst(DST, SRC, 0 * 4, X0, X7);
	xor_src_dst(DST, SRC, 4 * 4, X1, X7);
	xor_src_dst(DST, SRC, 8 * 4, X2, X7);
	xor_src_dst(DST, SRC, 12 * 4, X3, X7);
	xor


turn metric;
	}

	/**
	 * 重设counter与histogram
	 */
	public void reset(){
		counter.reset();
		histogram.reset();
	}

	@Override
	public String toString() {
		return "Timer [latestMetric=" + latestMetric + ", counter=" + counter + ", histogram=" + histogram + "]";
	}

	/**
	 * 保存某一次请求的初始时间与Timer实例.
	 */
	public static class TimerContext {
		private final Timer timer;
		private final long startTime;

		private TimerContext(Timer timer, long startTime) {
			this.timer = timer;
			this.startTime = startTime;
		}

		public void stop() {
			timer.update(startTime);
		}
	}
}
package org.springside.modules.utils.time;

import static org.assertj.core.api.Assertions.*;

import java.util.Date;

import org.junit.Test;

public class DateUtilTest {

	@Test
	public void isSameDay() {
		Date date1 = new Date(106, 10, 1);
		Date date2 = new Date(106, 10, 1, 12, 23, 44);
		assertThat(DateUtil.isSameDay(date1, date2)).isTrue();

		Date date3 = new Date(106, 10, 1);
		assertThat(DateUtil.isSameTime(date1, date3)).isTrue();

		Date date5 = new Date(106, 10, 2);
		assertThat(DateUtil.isSameTime(date1, date5)).isFalse();

		Date date4 = new Date(106, 10, 1, 12, 23, 43);
		assertThat(DateUtil.isBetween(date3, date1, date2)).isTrue();
		assertThat(DateUtil.isBetween(date4, date1, date2)).isTrue();

		try {
			DateUtil.isBetween(null, date1, date2);
			fail("should fail before");
		} catch (Exception e) {

		}

		try {
			DateUtil.isBetween(date3, date2, date1);
			fail("should fail before");
		} catch (Exception e) {

		}

		assertThat(DateUtil.isBetween(date5, date1, date2)).isFalse();
	}

	@Test
	public void truncateAndCelling() {
		// Sat Jan 21 12:12:12 CST 2017
		Date date = new Date(117, 0, 21, 12, 12, 12);

		Date beginYear = new Date(117, 0, 1, 0, 0, 0);
		Date endYear = new Date(new Date(117, 11, 31, 23, 59, 59).getTime() + 999);
		Date nextYear = new Date(118, 0, 1, 0, 0, 0);

		Date beginMonth = new Date(117, 0, 1);
		Date endMonth = new Date(new Date(117, 0, 31, 23, 59, 59).getTime() + 999);
		Date nextMonth = new Date(117, 1, 1);

		Date beginWeek = new Date(117, 0, 16);
		Date endWeek = new Date(new Date(117, 0, 22, 23, 59, 59).getTime() + 999);
		Date nextWeek = new Date(117, 0, 23);

		Date beginDate = new Date(117, 0, 21);
		Date endDate = new Date(new Date(117, 0, 21, 23, 59, 59).getTime() + 999);
		Date nextDate = new Date(117, 0, 22);

		Date beginHour = new Date(117, 0, 21, 12, 0, 0);
		Date endHour = new Date(new Date(117, 0, 21, 12, 59, 59).getTime() + 999);
		Date nextHour = new Date(117, 0, 21, 13, 0, 0);

		Date beginMinute = new Date(117, 0, 21, 12, 12, 0);
		Date endMinute = new Date(new Date(117, 0, 21, 12, 12, 59).getTime() + 999);
		Date nextMinute = new Date(117, 0, 21, 12, 13, 0);

		assertThat(DateUtil.isSameTime(DateUtil.beginOfYear(date), beginYear)).isTrue();
		assertThat(DateUtil.isSameTime(DateUtil.end


id = 304044,
		equip_1 = {
			4
		},
		equip_2 = {
			1,
			2
		},
		equip_3 = {
			6
		},
		equip_4 = {
			10
		},
		equip_5 = {
			10
		},
		airassist_time = {},
		buff_list = {
			11270
		},
		buff_list_display = {
			11270
		},
		hide_buff_list = {
			2
		}
	},
	[304051] = {
		oil_at_start = 1,
		max_level = 70,
		equip_id_3 = 0,
		oil_at_end = 9,
		type = 4,
		energy = 150,
		can_get_proficency = 0,
		star = 3,
		star_max = 6,
		strengthen_id = 30405,
		equip_id_2 = 32000,
		equip_id_1 = 34100,
		group_type = 30405,
		id = 304051,
		equip_1 = {
			4
		},
		equip_2 = {
			1,
			2
		},
		equip_3 = {
			6
		},
		equip_4 = {
			10
		},
		equip_5 = {
			10
		},
		airassist_time = {},
		buff_list = {
			11780,
			11790,
			11800
		},
		buff_list_display = {
			11780,
			11790,
			11800
		},
		hide_buff_list = {}
	},
	[304052] = {
		oil_at_start = 1,
		max_level = 80,
		equip_id_3 = 0,
		oil_at_end = 11,
		type = 4,
		energy = 150,
		can_get_proficency = 0,
		star = 4,
		star_max = 6,
		strengthen_id = 30405,
		equip_id_2 = 0,
		equip_id_1 = 0,
		group_type = 30405,
		id = 304052,
		equip_1 = {
			4
		},
		equip_2 = {
			1,
			2
		},
		equip_3 = {
			6
		},
		equip_4 = {
			10
		},
		equip_5 = {
			10
		},
		airassist_time = {},
		buff_list = {
			11780,
			11790,
			11800
		},
		buff_list_display = {
			11780,
			11790,
			11800
		},
		hide_buff_list = {
			1
		}
	},
	[304053] = {
		oil_at_start = 1,
		max_level = 90,
		equip_id_3 = 0,
		oil_at_end = 13,
		type = 4,
		energy = 150,
		can_get_proficency = 0,
		star = 5,
		star_max = 6,
		strengthen_id = 30405,
		equip_id_2 = 0,
		equip_id_1 = 0,
		group_type = 30405,
		id = 304053,
		equip_1 = {
			4
		},
		equip_2 = {
			1,
			2
		},
		equip_3 = {
			6
		},
		equip_4 = {
			10
		},
		equip_5 = {
			10
		},
		airassist_time = {},
		buff_list = {
			11780,
			11790,
			11800
		},
		buff_list_display = {
			11780,
			11790,
			11800
		},
		hide_buff_list = {
			1
		}
	},
	[3040


FC 00 00 50 */	fneg f0, f0
lbl_8034975C:
/* 8034975C 0034655C  FC 20 00 50 */	fneg f1, f0
/* 80349760 00346560  4E 80 00 20 */	blr
lbl_80349764:
/* 80349764 00346564  C8 02 DE C8 */	lfd f0, lbl_805E45C8@sda21(r2)
/* 80349768 00346568  48 00 00 0C */	b lbl_80349774
lbl_8034976C:
/* 8034976C 0034656C  FC 21 00 28 */	fsub f1, f1, f0
/* 80349770 00346570  FC 20 08 18 */	frsp f1, f1
lbl_80349774:
/* 80349774 00346574  FC 01 00 40 */	fcmpo cr0, f1, f0
/* 80349778 00346578  41 81 FF F4 */	bgt lbl_8034976C
/* 8034977C 0034657C  C8 02 DF 08 */	lfd f0, lbl_805E4608@sda21(r2)
/* 80349780 00346580  FC 01 00 40 */	fcmpo cr0, f1, f0
/* 80349784 00346584  4C 40 13 82 */	cror 2, 0, 2
/* 80349788 00346588  40 82 00 F4 */	bne lbl_8034987C
/* 8034978C 0034658C  C8 42 DF 10 */	lfd f2, lbl_805E4610@sda21(r2)
/* 80349790 00346590  FC 01 10 40 */	fcmpo cr0, f1, f2
/* 80349794 00346594  4C 40 13 82 */	cror 2, 0, 2
/* 80349798 00346598  40 82 00 70 */	bne lbl_80349808
/* 8034979C 0034659C  C8 02 DF 38 */	lfd f0, lbl_805E4638@sda21(r2)
/* 803497A0 003465A0  FC 01 00 40 */	fcmpo cr0, f1, f0
/* 803497A4 003465A4  4C 40 13 82 */	cror 2, 0, 2
/* 803497A8 003465A8  40 82 00 30 */	bne lbl_803497D8
/* 803497AC 003465AC  EC 81 00 72 */	fmuls f4, f1, f1
/* 803497B0 003465B0  C0 62 DF 20 */	lfs f3, lbl_805E4620@sda21(r2)
/* 803497B4 003465B4  C0 42 DF 1C */	lfs f2, lbl_805E461C@sda21(r2)
/* 803497B8 003465B8  C0 02 DF 18 */	lfs f0, lbl_805E4618@sda21(r2)
/* 803497BC 003465BC  EC 43 11 3C */	fnmsubs f2, f3, f4, f2
/* 803497C0 003465C0  C0 62 DE 68 */	lfs f3, lbl_805E4568@sda21(r2)
/* 803497C4 003465C4  EC 04 00 BC */	fnmsubs f0, f4, f2, f0
/* 803497C8 003465C8  EC 04 00 32 */	fmuls f0, f4, f0
/* 803497CC 003465CC  EC 03 00 28 */	fsubs f0, f3, f0
/* 803497D0 003465D0  EC 21 00 32 */	fmuls f1, f1, f0
/* 803497D4 003465D4  4E 80 00 20 */	blr
lbl_803497D8:
/* 803497D8 003465D8  FC 62


s this species.</returns>
    private static bool IsPartialMatchHidden(this IEncounterMatch _, ushort species)
    {
        return species is (int)Metapod or (int)Kakuna
            or (int)Pupitar
            or (int)Silcoon or (int)Cascoon
            or (int)Vibrava or (int)Flygon;
    }

    /// <summary>
    /// Some species do not have a Hidden Ability, but can be altered to have the HA slot via pre-evolution.
    /// </summary>
    /// <param name="_">Match object</param>
    /// <param name="current">Current Species ID</param>
    /// <param name="original">Original Species ID</param>
    /// <returns>True if it should not originate as this species.</returns>
    public static bool IsPartialMatchHidden(this IEncounterMatch _, ushort current, ushort original)
    {
        if (current == original)
            return false;
        if (!_.IsPartialMatchHidden(original))
            return false;
        return _.IsPartialMatchHidden(current);
    }
}


// This program has been developed by students from the bachelor Computer Science at Utrecht
// University within the Software Project course.
// Copyright Utrecht University (Department of Information and Computing Sciences)

using Aplib.Core.Belief.Beliefs;
using System.Linq;

namespace Aplib.Core.Belief.BeliefSets
{
    ///
    /// This class can be inherited to define a set of beliefs for an agent.
    /// All public fields defined in the inheriting class that implement <see cref="IBelief" />
    /// are automatically updated when calling <see cref="UpdateBeliefs" />.
    ///
    public class BeliefSet : IBeliefSet
    {
        ///
        /// An array storing all public fields of type <see cref="IBelief" /> that are defined in the inheriting
        /// class.
        ///
        private readonly IBelief[] _beliefs;

        ///
        /// Initializes a new instanc


#include <gui/canvas.h>
#include <gui/icon_i.h>
#include "Metronome_icons.h"

//lib can only do bottom left/right
void elements_button_top_left(Canvas* canvas, const char* str) {
    const uint8_t button_height = 12;
    const uint8_t vertical_offset = 3;
    const uint8_t horizontal_offset = 3;
    const uint8_t string_width = canvas_string_width(canvas, str);
    const Icon* icon = &I_ButtonUp_7x4;
    const uint8_t icon_h_offset = 3;
    const uint8_t icon_width_with_offset = icon->width + icon_h_offset;
    const uint8_t icon_v_offset = icon->height + vertical_offset;
    const uint8_t button_width = string_width + horizontal_offset * 2 + icon_width_with_offset;

    const uint8_t x = 0;
    const uint8_t y = 0 + button_height;

    canvas_draw_box(canvas, x, y - button_height, button_width, button_height);
    canvas_draw_line(canvas, x + button_width + 0, y - button_height, x + button_width + 0, y - 1);
    canvas_draw_line(canvas, x + button_width + 1, y - button_height, x + button_width + 1, y - 2);
    canvas_draw_line(canvas, x + button_width + 2, y - button_height, x + button_width + 2, y - 3);

    canvas_invert_color(canvas);
    canvas_draw_icon(canvas, x + horizontal_offset, y - icon_v_offset, &I_ButtonUp_7x4);
    canvas_draw_str(
        canvas, x + horizontal_offset + icon_width_with_offset, y - vertical_offset, str);
    canvas_invert_color(canvas);
}

void elements_button_top_right(Canvas* canvas, const char* str) {
    const uint8_t button_height = 12;
    const uint8_t vertical_offset = 3;
    const uint8_t horizontal_offset = 3;
    const uint8_t string_width = canvas_string_width(canvas, str);
    const Icon* icon = &I_ButtonUp_7x4;
    const uint8_t icon_h_offset = 3;
    const uint8_t icon_width_with_offset = icon->width + icon_h_offset;
    const uint8_t icon_v_offset = icon->height + vertical_offset;
    const uint8_t button_width = string_width + horizontal_offset * 2 + icon_width_with_offset;

    const uint8_t x = canvas_width(canvas);
    const uint8_t y = 0 + button_height;

    canvas_draw_box(canvas, x - button_width, y - button_height, button_width, button_height);
    canvas_draw_line(canvas, x - button_width - 1, y - button_height, x - button_width - 1, y - 1);
    canvas_draw_line(canvas, x - button_width - 2, y - button_height, x - button_width - 2, y - 2);
    canvas_draw_line(canvas, x - button_width - 3, y - button_height, x - button_width - 3, y - 3);

    canvas_invert_color(canvas);
    canvas_draw_str(canvas, x - button_width + horizontal_offset, y - vertical_offset, str);
    canvas_draw_icon(
        canvas, x - horizontal_offset - icon->width, y - icon_v_offset, &I_ButtonUp_7x4);
    canvas_invert_color(canvas);
}


)** |
| :------------------: | :----------: | :--------------------: | :-----------------: | :----------------: | :---------------: |
|   sam2.1_hiera_tiny
 ([config](sam2/configs/sam2.1/sam2.1_hiera_t.yaml), [checkpoint](https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_tiny.pt))    |     38.9     |          91.2          |        76.5         |        71.8        |       77.3        |
|   sam2.1_hiera_small
 ([config](sam2/configs/sam2.1/sam2.1_hiera_s.yaml), [checkpoint](https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_small.pt))   |      46      |          84.8          |        76.6         |        73.5        |       78.3        |
| sam2.1_hiera_base_plus
 ([config](sam2/configs/sam2.1/sam2.1_hiera_b+.yaml), [checkpoint](https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_base_plus.pt)) |     80.8     |        64.1          |        78.2         |        73.7        |       78.2        |
|   sam2.1_hiera_large
 ([config](sam2/configs/sam2.1/sam2.1_hiera_l.yaml), [checkpoint](https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_large.pt))   |    224.4     |          39.5          |        79.5         |        74.6        |       80.6        |

### SAM 2 checkpoints

The previous SAM 2 checkpoints released on July 29, 2024 can be found as follows:

|      **Model**       | **Size (M)** |    **Speed (FPS)**     | **SA-V test (J&F)** | **MOSE val (J&F)** | **LVOS v2 (J&F)** |
| :------------------: | :----------: | :--------------------: | :-----------------: | :----------------: | :---------------: |
|   sam2_hiera_tiny
 ([config](sam2/configs/sam2/sam2_hiera_t.yaml), [checkpoint](https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_tiny.pt))   |     38.9     |          91.5          |        75.0         |        70.9        |       75.3        |
|   sam2_hiera_small
 ([config](sam2/configs/sam2/sam2_hiera_s.yaml), [checkpoint](https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_small.pt))   |      46      |          85.6          |        74.9         |        71.5        |       76.4        |
| sam2_hiera_base_plus
 ([config](sam2/configs/sam2/sam2_hiera_b+.yaml), [checkpoint](https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_base_plus.pt)) |     80.8     |     64.8    |        74.7         |        72.8        |       75.8        |
|   sam2_hiera_large
 ([config](sam2/configs/sam2/sam2_hiera_l.yaml), [checkpoint](https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_large.pt))   |    224.4     | 39.7 |        76.0         |        74.6        |       79.8        |

Speed measured on an A100 with `torch 2.5.1, cuda 12.4`. See `benchmark.py` for an example on benchmarking (compiling all the model components). Compiling only the image encoder can be more flexible and also provide (a smaller) speed-up (set `compile_image_encoder: True` in the config).
## Segment Anything Video Dataset


one, Copy)]
pub enum SlaveMode {
    /// Slave mode disabled - if CEN = ‘1’ then the prescaler is clocked directly by the internal
    /// clock.
    Disable = 0b0000,

    /// Counter counts up/down on TI2FP1 edge depending on TI1FP2 level.
    EncoderMode1 = 0b0001,

    /// Encoder mode 2 - Counter counts up/down on TI1FP2 edge depending on TI2FP1 level.
    EncoderMode2 = 0b0010,

    /// Encoder mode 3 - Counter counts up/down on both TI1FP1 and TI2FP2 edges depending on the
    /// level of the other input.
    EncoderMode3 = 0b0011,

    /// Reset Mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter and
    /// generates an update of the registers.
    ResetMode = 0b0100,

    /// Gated Mode - The counter clock is enabled when the trigger input (TRGI) is high. The
    /// counter stops (but is not reset) as soon as the trigger becomes low. Both start and stop of
    /// the counter are controlled.
    GatedMode = 0b0101,

    /// Trigger Mode - The counter starts at a rising edge of the trigger TRGI (but it is not
    /// reset). Only the start of the counter is controlled.
    TriggerMode = 0b0110,

    /// External Clock Mode 1 - Rising edges of the selected trigger (TRGI) clock the counter.
    ExternalClockMode1 = 0b0111,

    /// Combined reset + trigger mode - Rising edge of the selected trigger input (TRGI)
    /// reinitializes the counter, generates an update of the registers and starts the counter.
    Combined = 0b1000,
}

/// Quadrature Encoder Interface (QEI) options
#[derive(Debug, Clone, Copy)]
pub struct QeiOptions {
    /// Encoder slave mode
    pub slave_mode: SlaveMode,

    /// Autoreload value
    ///
    /// This value allows the maximum count to be configured. Setting a lower value
    /// will overflow the counter to 0 sooner.
    pub auto_reload_value: u32,
}

impl Default for QeiOptions {
    fn default() -> Self {
        Self {
            slave_mode: SlaveMode::EncoderMode3,
            auto_reload_value: core::u32::MAX,
        }
    }
}

///
/// Make sure that pin_ch1 and pin_ch2 are used in the corresponding alternative mode.
/// ----------------------------------
///   TIMx | PIN_CH1  | PIN_CH2  |
/// -------|----------|----------|
///   TIM2 | PA0 \ 1  | PB3 \ 1  |
///   TIM2 | PA0 \ 1  | PA1 \ 1  |
///   TIM2 | PA5 \ 1  | PB3 \ 1  |
///   TIM2 | PA5 \ 1  | PA1 \ 1  |
///   TIM2 | PA15 \ 1 | PB3 \ 1  |
///   TIM2 | PA15 \ 1 | PA1 \ 1  |
///   TIM3 | PA6 \ 2  | PA7 \ 2  |
///   TIM3 | PA6 \ 2  | PB5 \ 2  |
///   TIM3 | PA6 \ 2  | PC7 \ 2  |
///   TIM3 | PB4 \ 2  | PA7 \ 2  |
///   TIM3 | PB4 \ 2  | PB5 \ 2  |
///   TIM3 | PB4 \ 2  | PC7 \ 2  |
///   TIM3 | PC6 \ 2  | PA7 \ 2  |
///   TIM3 | PC6 \ 2  | PB5 \ 2  |
///   TIM3 | PC6 \ 2  | PC7 \ 2  |
///   TIM4 | PB6 \ 2  | PB7 \ 2  |
///   TIM4 | PB6 \ 2  | PD13 \ 2 |
///   TIM4 | PD12 \ 2 | PB7 \ 2  |
///   TIM4 | PD12 \ 2 | PD13 \ 2 |
///   TIM4 | PD12 \ 2 | PD13 \ 2 |
///   TIM5 | PA0 \ 2  | PA1 \ 2  |
pub st


art';

import 'package:pull_to_refresh/pull_to_refresh.dart';

import '../../common/api/index.dart';
import '../../common/models/index.dart';
import '../../common/services/index.dart';
import '../../common/widgets/snack_bar.dart';

class EditMusicInfoController extends GetxController {
  EditMusicInfoController({this.oldSongWithSource});
  SongWithSource? oldSongWithSource;
  final TextEditingController titleController = TextEditingController();
  final TextEditingController artistController = TextEditingController();
  final TextEditingController albumController = TextEditingController();
  final TextEditingController searchController = TextEditingController();
  int currentSourceIndex = 0;
  final RefreshController refreshController =
      RefreshController(initialRefresh: true);
  List<SearchProvider> get allSources => SearchProvider.providers;

  String? title;
  String? artist;
  String? album;
  List<SourceItem> audioSources = [];
  List<SourceItem> musicInfos = [];
  List<SongWithSource> searchResult = [];
  int page = 1;

  _initData() {
    update();
  }

  Future<bool> save() async {
    final basicInfo = BasicMusicInfo(
      title: titleController.text,
      artist: artistController.text,
      album: albumController.text,
    );
    final songWithSource = SongWithSource(
      basicInfo: basicInfo,
      audioSources: audioSources,
      musicInfos: musicInfos,
    );
    bool res = false;
    if (oldSongWithSource == null) {
      res = await DatabaseService.to.addSong(songWithSource);
    } else {
      if (oldSongWithSource!.basicInfo != basicInfo) {
        res = await DatabaseService.to
            .updateBasicSongInfo(oldSongWithSource!.basicInfo, basicInfo);
      } else {
        res = true;
      }
      if (oldSongWithSource!.audioSources != audioSources && res) {
        res = await DatabaseService.to.updateAudioSources(songWithSource);
      } else {
        res = false;
      }
      if (oldSongWithSource!.musicInfos != musicInfos && res) {
        res = await DatabaseService.to.updateMusicInfos(songWithSource);
      } else {
        res = false;
      }
    }
    if (!res) {
      MyToast.show(message: '保存失败');
      return false;
    }
    return true;
  }

  @override
  void onInit() {
    super.onInit();
    if (oldSongWithSource != null) {
      title = oldSongWithSource!.basicInfo.title;
      titleController.text = oldSongWithSource!.basicInfo.title;
      searchController.text = oldSongWithSource!.basicInfo.title;
      artist = oldSongWithSource!.basicInfo.artist;
      artistController.text = oldSongWithSource!.basicInfo.artist;
      album = oldSongWithSource!.basicInfo.album;
      albumController.text = oldSongWithSource!.basicInfo.album;
      audioSources = oldSongWithSource!.audioSources.map((e) => e).toList();
      musicInfos = oldSongWithSource!.musicInfos.map((e) => e).toList();
    }
  }

  @override
  void onReady() {
    super.onReady();
    _initData();
  }

  void removeAudioSource(SourceItem sourceItem) {
    audioSources.remove(sourceItem);
    update();
  }

  void removeMusicInfo(SourceItem sourceItem) {
    musicInfos.remove(sourceItem);
    update();
  }

  void addAudio


/
export function validateOptionalAddressParameter(
  this: string,
  request: Request,
  response: Response,
  next: NextFunction,
) {
  if (!request.params[this]) next();
  else validateAddressParameter.call(this, request, response, next);
}

/**
 * Checks an error is an InvalidParameter error
 *
 * @param error - Error to test
 * @returns True if error is one of InvalidParameter errors
 */
export function isInvalidParameterError(error: unknown): error is RaidenError {
  return [
    ErrorCodes.DTA_NEGATIVE_NUMBER,
    ErrorCodes.DTA_NUMBER_TOO_LARGE,
    ErrorCodes.DTA_ARRAY_LENGTH_DIFFERENCE,
    ErrorCodes.DTA_UNENCODABLE_DATA,
    ErrorCodes.DTA_NON_POSITIVE_NUMBER,
    ErrorCodes.DTA_INVALID_ADDRESS,
    ErrorCodes.DTA_INVALID_TIMEOUT,
    ErrorCodes.DTA_INVALID_PAYMENT_ID,
    ErrorCodes.DTA_INVALID_PATH,
    ErrorCodes.DTA_INVALID_PFS,
    ErrorCodes.DTA_INVALID_DEPOSIT,
    ErrorCodes.DTA_INVALID_AMOUNT,
  ].includes((error as Error).message);
}

/**
 * This checks for a typical error message pattern that gets thrown by EthersJS.
 * It occurs while trying to estimate the amount of gas for a transaction.
 * For the use-case here this usually means that the parameter for the contracts
 * function call lead to a failing require statement. An example would be
 * insufficient tokens funds for depositing.
 *
 * @param error - Error to test
 * @returns True if error is a TransactionWoulfFail error
 */
export function isTransactionWouldFailError(error: unknown): error is RaidenError {
  return /always failing transaction/.test((error as Error).message);
}

/**
 * Checks if error is related to a failed transfer
 *
 * @param error - Error to test
 * @returns True if error signals failed transfer
 */
export function isTransferFailedError(error: unknown): error is RaidenError {
  return [
    ErrorCodes.XFER_ALREADY_COMPLETED,
    ErrorCodes.XFER_CHANNEL_CLOSED_PREMATURELY,
    ErrorCodes.XFER_EXPIRED,
    ErrorCodes.XFER_INVALID_SECRETREQUEST,
    ErrorCodes.XFER_REFUNDED,
    ErrorCodes.XFER_REGISTERSECRET_TX_FAILED,
  ].includes((error as Error).message);
}

/**
 * @param error - Error to test
 * @returns True if error is a Conflict error
 */
export function isConflictError(error: unknown): error is RaidenError {
  return (
    [
      ErrorCodes.RDN_UNKNOWN_TOKEN_NETWORK,
      ErrorCodes.CNL_INVALID_STATE,
      ErrorCodes.CNL_NO_OPEN_CHANNEL_FOUND,
      ErrorCodes.DTA_INVALID_DEPOSIT,
      ErrorCodes.DTA_INVALID_AMOUNT,
      ErrorCodes.UDC_WITHDRAW_NO_BALANCE,
      ErrorCodes.UDC_PLAN_WITHDRAW_EXCEEDS_AVAILABLE,
      ErrorCodes.UDC_WITHDRAW_NO_PLAN,
      ErrorCodes.UDC_WITHDRAW_TOO_LARGE,
    ].includes((error as Error).message) || isTransactionWouldFailError(error)
  );
}

/**
 * @param error - Error to test
 * @param error.message - Error message
 * @param error.code - Error code
 * @returns True if error is an InsufficientFunds error
 */
export function isInsuficientFundsError(error: any): error is RaidenError {
  return (
    error.code === 'INSUFFICIENT_FUNDS' ||
    [
      ErrorCodes.RDN_INSUFFICIENT_BALANCE,
      ErrorCodes.CNL_WITHDRAW_AMOUNT_TOO_LOW,
      ErrorCodes.CNL_WITHDRAW_AMOUNT_TOO_


 12)
  @override
  final int month;

  /// Gregorian day of the month (1 to 28/29/30/31)
  @override
  final int day;

  @override
  final int hour;

  @override
  final int minute;

  @override
  final int second;

  @override
  final int millisecond;

  @override
  int get dayOfYear {
    return _Algo.getDayOfYear(isLeapYear(), month, day);
  }

  /// Week day number
  /// [monday] = 1
  /// [sunday] = 7
  @override
  int get weekDay {
    return julianDayNumber % 7 + 1;
  }

  /// Computes number of days in a given month in a Gregorian year.
  @override
  int get monthLength {
    return _Algo.getMonthLength(year, month);
  }

  /// Formatter for this date object
  @override
  GregorianFormatter get formatter {
    return GregorianFormatter(this);
  }

  /// Create a Gregorian date by using [year], [month] and [day]
  ///
  /// year and month default to 1
  factory Gregorian(
    final int year, [
    final int month = 1,
    final int day = 1,
    final int hour = 0,
    final int minute = 0,
    final int second = 0,
    final int millisecond = 0,
  ]) {
    return _Algo.createFromYearMonthDay(
      year,
      month,
      day,
      hour,
      minute,
      second,
      millisecond,
    );
  }

  /// Calculates Gregorian and Julian calendar dates from the Julian Day number
  /// [julianDayNumber] for the period since jdn=-34839655
  /// (i.e. the year -100100 of both calendars)
  /// to some millions years ahead of the present.
  factory Gregorian.fromJulianDayNumber(
    final int julianDayNumber, [
    final int hour = 0,
    final int minute = 0,
    final int second = 0,
    final int millisecond = 0,
  ]) {
    return _Algo.createFromJulianDayNumber(
      julianDayNumber,
      hour,
      minute,
      second,
      millisecond,
    );
  }

  /// Create a Gregorian date by using [DateTime] object
  factory Gregorian.fromDateTime(DateTime dateTime) {
    return Gregorian(
      dateTime.year,
      dateTime.month,
      dateTime.day,
      dateTime.hour,
      dateTime.minute,
      dateTime.second,
      dateTime.millisecond,
    );
  }

  /// Create a Gregorian date from Jalali date
  factory Gregorian.fromJalali(Jalali date) {
    return Gregorian.fromJulianDayNumber(
      date.julianDayNumber,
      date.hour,
      date.minute,
      date.second,
      date.millisecond,
    );
  }

  /// Create a Gregorian date from milliseconds since epoch
  ///
  /// If [isUtc] is false then the date is in the local time zone
  factory Gregorian.fromMillisecondsSinceEpoch(
    int milliseconds, {
    bool isUtc = false,
  }) {
    return Gregorian.fromDateTime(
      DateTime.fromMillisecondsSinceEpoch(
        milliseconds,
        isUtc: isUtc,
      ),
    );
  }

  /// Get Gregorian date for now
  factory Gregorian.now() {
    return Gregorian.fromDateTime(DateTime.now());
  }

  /// Copy this date object with some fields changed
  ///
  /// Original date object remains unchanged
  ///
  /// You can leave out items for not changing them
  ///
  /// This method is NOT safe
  ///
  /// This method does change all fields at once,
  /// Not individually in a order
  ///
  /// Throws DateException on problems
  ///
  /// Note: For ordering use with*() methods
  @override
  Gregorian copy({
    int? year,
    int? month,
    int? day


y #$21
EntTur1:
	dey
	bne EntTur1
	jsr Hst_RecvByte_3
EntTur2:
	bbsf 7, cia2base, EntTur2
	jsr DoneWithIO
	ldx curDrive
	lda _turboFlags,x
	ora #%01000000
	sta _turboFlags,x
EntTur3:
	ldx #0
	beq EntTur5
EntTur4:
	jsr DoneWithIO
EntTur5:
	txa
	rts

EnterCommand:
	.byte "M-E"
	.word DriveStart

SendExitTurbo:
	jsr InitForIO
	ldx #>Drv_ExitTurbo
	lda #<Drv_ExitTurbo
	jsr DUNK4
	ldx #>E0457
	lda #<E0457
	jsr DUNK4
	jsr GetSync
E9685:
	lda curDrive
	jsr $ffb1
	lda #$ef
	jsr $ff93
	jsr $ffae
	ldx #0
	jmp DoneWithIO

SendCODE:
	jsr InitForIO
	lda #>DriveCode
	sta z8e
	lda #<DriveCode
	sta z8d
	lda #>DriveAddy
	sta WriteAddy+1
	lda #<DriveAddy
	sta WriteAddy
	LoadB z8f, $0f
SndCDE0:
	jsr SendCHUNK
	bnex SndCDE1
	clc
	lda #$20
	adc z8d
	sta z8d
	bcc *+4
	inc z8e
	clc
	lda #$20
	adc WriteAddy
	sta WriteAddy
	bcc *+5
	inc WriteAddy+1
	dec z8f
	bpl SndCDE0
SndCDE1:
	jmp DoneWithIO

SendCHUNK:
	ldx #>WriteCommand
	lda #<WriteCommand
	jsr SendDOSCmd
	bnex SndCHNK2
	lda #$20
	jsr $ffa8
	ldy #0
SndCHNK0:
	lda (z8d),y
	jsr $ffa8
	iny
	cpy #$20
	bcc SndCHNK0
	jsr $ffae
	ldx #0
SndCHNK2:
	rts

WriteCommand:
	.byte "M-W"
WriteAddy:
	.word $0300

__ExitTurbo:
	txa
	pha
	ldx curDrive
	lda _turboFlags,x
	and #%01000000
	beq ExiTur0
	jsr SendExitTurbo
	ldx curDrive
	lda _turboFlags,x
	and #%10111111
	sta _turboFlags,x
	bbrf 6, sysRAMFlg, ExiTur0
	jsr E9C4A
	ldx curDrive
	lda E9746-8, x
	sta r1L
	lda E974A-8, x
	sta r1H
	LoadW r0, dir3Head
	ldy #0
	sty r3L
	sty r2L
	iny
	sty r2H
	jsr StashRAM
	jsr DoClrCache2
ExiTur0:
	pla
	tax
	rts

E9746:
	.byte $80, $00, $80, $00 ;!!!
E974A:
	.byte $8f, $9d, $aa, $b8

__PurgeTurbo:
	jsr ClearCache
	jsr ExitTurbo
	ldy curDrive
	lda #0
	sta _turboFlags,y
	rts

DUNK4:
	stx z8c
	sta z8b
	l


_byte((value & 0xff) as u8)
    }

    fn encode_literals<R: DataOutput + ?Sized>(
        bytes: &[u8],
        token: i32,
        anchor: usize,
        literal_len: usize,
        out: &mut R,
    ) -> Result<()> {
        out.write_byte(token as u8)?;

        // encode literal length
        if literal_len >= 0x0f {
            LZ4::encode_len(literal_len as i32 - 0x0f, out)?;
        }

        // encode literals
        out.write_bytes(bytes, anchor, literal_len)
    }

    fn encode_last_literals<R: DataOutput + ?Sized>(
        bytes: &[u8],
        anchor: usize,
        literal_len: usize,
        out: &mut R,
    ) -> Result<()> {
        let token: i32 = min(literal_len as i32, 0x0fi32) << 4;
        LZ4::encode_literals(bytes, token, anchor, literal_len, out)
    }

    fn encode_sequence<R: DataOutput + ?Sized>(
        bytes: &[u8],
        anchor: usize,
        match_ref: usize,
        match_off: usize,
        match_len: usize,
        out: &mut R,
    ) -> Result<()> {
        let literal_len = match_off - anchor;
        debug_assert!(match_len >= 4);
        // encode token
        let token: i32 = (0x0f.min(literal_len as i32) << 4) | 0x0f.min(match_len as i32 - 4);
        LZ4::encode_literals(bytes, token, anchor, literal_len, out)?;

        // encode match dec
        let match_dec = match_off - match_ref;
        debug_assert!(match_dec < 1 << 16);
        out.write_byte(match_dec as u8)?;
        out.write_byte((match_dec >> 8) as u8)?;
        // encode match len
        if match_len >= (MIN_MATCH + 0x0f) as usize {
            LZ4::encode_len(match_len as i32 - 0x0f - MIN_MATCH, out)?;
        }

        Ok(())
    }

    /// Compress bytes[off:off+len] into out using
    /// at most 16KB of memory. ht shouldn't be shared across threads
    /// but can safely be reused.
    fn compress<R: DataOutput + ?Sized>(
        bytes: &[u8],
        off: usize,
        len: usize,
        out: &mut R,
        ht: &mut LZ4HashTable,
    ) -> Result<()> {
        let mut off_cur = off;
        let mut anchor = off;
        let end = off + len;

        off_cur += 1;

        if len > (LAST_LITERALS + MIN_MATCH) as usize {
            let limit = end - LAST_LITERALS as usize;
            let match_limit = limit - MIN_MATCH as usize;
            ht.reset(len as i32);
            let hash_log = ht.hash_log;
            let hash_table = ht.hash_table.as_mut().unwrap();
            'main: while off_cur <= limit {
                let mut refer: usize;
                loop {
                    if off_cur >= match_limit {
                        break 'main;
                    }
                    let v = LZ4::read_int(bytes, off_cur);
                    let h = LZ4::hash(v, hash_log) as usize;
                    refer = off + hash_table.get(h) as usize;
                    debug_assert!(
                        (off_cur - off).bits_required() as i32 <= hash_table.get_bits_per_value()
                    );
                    hash_table.set(h, (off_cur - off) as i64);
                    if


	0xAD97: 0xCDBB, //HANGUL SYLLABLE CHIEUCH WEO RIEULPIEUP
		0xAD98: 0xCDBC, //HANGUL SYLLABLE CHIEUCH WEO RIEULSIOS
		0xAD99: 0xCDBD, //HANGUL SYLLABLE CHIEUCH WEO RIEULTHIEUTH
		0xAD9A: 0xCDBE, //HANGUL SYLLABLE CHIEUCH WEO RIEULPHIEUPH
		0xAD9B: 0xCDBF, //HANGUL SYLLABLE CHIEUCH WEO RIEULHIEUH
		0xAD9C: 0xCDC0, //HANGUL SYLLABLE CHIEUCH WEO MIEUM
		0xAD9D: 0xCDC1, //HANGUL SYLLABLE CHIEUCH WEO PIEUP
		0xAD9E: 0xCDC2, //HANGUL SYLLABLE CHIEUCH WEO PIEUPSIOS
		0xAD9F: 0xCDC3, //HANGUL SYLLABLE CHIEUCH WEO SIOS
		0xADA0: 0xCDC5, //HANGUL SYLLABLE CHIEUCH WEO IEUNG
		0xAE41: 0xCDC6, //HANGUL SYLLABLE CHIEUCH WEO CIEUC
		0xAE42: 0xCDC7, //HANGUL SYLLABLE CHIEUCH WEO CHIEUCH
		0xAE43: 0xCDC8, //HANGUL SYLLABLE CHIEUCH WEO KHIEUKH
		0xAE44: 0xCDC9, //HANGUL SYLLABLE CHIEUCH WEO THIEUTH
		0xAE45: 0xCDCA, //HANGUL SYLLABLE CHIEUCH WEO PHIEUPH
		0xAE46: 0xCDCB, //HANGUL SYLLABLE CHIEUCH WEO HIEUH
		0xAE47: 0xCDCD, //HANGUL SYLLABLE CHIEUCH WE KIYEOK
		0xAE48: 0xCDCE, //HANGUL SYLLABLE CHIEUCH WE SSANGKIYEOK
		0xAE49: 0xCDCF, //HANGUL SYLLABLE CHIEUCH WE KIYEOKSIOS
		0xAE4A: 0xCDD1, //HANGUL SYLLABLE CHIEUCH WE NIEUNCIEUC
		0xAE4B: 0xCDD2, //HANGUL SYLLABLE CHIEUCH WE NIEUNHIEUH
		0xAE4C: 0xCDD3, //HANGUL SYLLABLE CHIEUCH WE TIKEUT
		0xAE4D: 0xCDD4, //HANGUL SYLLABLE CHIEUCH WE RIEUL
		0xAE4E: 0xCDD5, //HANGUL SYLLABLE CHIEUCH WE RIEULKIYEOK
		0xAE4F: 0xCDD6, //HANGUL SYLLABLE CHIEUCH WE RIEULMIEUM
		0xAE50: 0xCDD7, //HANGUL SYLLABLE CHIEUCH WE RIEULPIEUP
		0xAE51: 0xCDD8, //HANGUL SYLLABLE CHIEUCH WE RIEULSIOS
		0xAE52: 0xCDD9, //HANGUL SYLLABLE CHIEUCH WE RIEULTHIEUTH
		0xAE53: 0xCDDA, //HANGUL SYLLABLE CHIEUCH WE RIEULPHIEUPH
		0xAE54: 0xCDDB, //HANGUL SYLLABLE CHIEUCH WE RIEULHIEUH
		0xAE55: 0xCDDC, //HANGUL SYLLABLE CHIEUCH WE MIEUM
		0xAE56: 0xCDDD, //HANGUL SYLLABLE CHIEUCH WE PIEUP
		0xAE57: 0xCDDE, //HANGUL SYLLABLE CHIEUCH WE PIEUPSIOS
		0xAE58: 0xCDDF


odalityType.AUDIO](
                    **{ModalityType.AUDIO: modality_value}
                )
                trunk_inputs = modality_value["trunk"] # modality_value["trunk"]['tokens'].shape: torch.Size([6, 229, 768])
                head_inputs = modality_value["head"] # this is empty
                modality_value = model.modality_trunks[ModalityType.AUDIO](**trunk_inputs) # the raw feature, which after the self-attention shape: torch.Size([6, 229, 768])
                modality_value = model.modality_heads[ModalityType.AUDIO](
                    modality_value, **head_inputs
                ) # layernorm -> select the first element -> linear layer: torch.Size([6, 229, 768]) -> torch.Size([6, 1024])
                modality_value = model.modality_postprocessors[ModalityType.AUDIO](
                    modality_value
                ) # normalization layer -> scaling: torch.Size([6, 1024])

            # ipdb.set_trace() # check the end feature shape
            assert B == 1
            # if reduce_list:
                # modality_value = modality_value.reshape(B*S, -1) # torch.Size([2, 3, 1024])
                # modality_value = modality_value.mean(dim=1) # torch.Size([2, 1024])
            # every 2s become a clips, in here we generate 1 tokens for 2 second

        # save the result
        torch.save(modality_value.detach().cpu().to(torch.bfloat16), curr_saving_path)
        print('total: ', len(extract_dataset), ' curr:', count_i)

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='extract image feature from image backebon')
    parser.add_argument('--data-root', dest='data_root', type=str, default=None)
    parser.add_argument('--feature-saving-root', dest='feature_saving_root', type=str, default=None)
    parser.add_argument('--annotation-path', dest='annotation_path', type=str, default=None)
    parser.add_argument('--reverse-dataset', dest='reverse_dataset', action='store_true')
    parser.add_argument('--num-workers', dest='num_workers', type=int, default=2)
    parser.add_argument('--not-skip-the-first', dest='not_skip_the_first', action='store_false')
    # parser.add_argument('--dataset-filter-key', dest='dataset_filter_key', type=str, default=None)
    args = parser.parse_args()
    main(args)

# Sample usage:
# CUDA_VISIBLE_DEVICES=0 python tools/Audio/extract_imagebind_audio_feature.py \
# --data-root ./MUCIS-AVQA-videos-Synthetic_audio \
# --feature-saving-root ./MUCIS-AVQA-videos-Synthetic_audio_imagebind_feat \
# --num-workers 0

# CUDA_VISIBLE_DEVICES=0 python  tools/Audio/extract_imagebind_audio_feature.py \
# --data-root ./MUSIC-AVQA-videos-Real_audio \
# --feature-saving-root ./MUSIC-AVQA-videos-Real_audio_image_feat \

# CUDA_VISIBLE_DEVICES=1 python tools/Audio/extract_imagebind_audio_feature.py \
# --data-root ./Charades_v1_audio \
# --feature-saving-root ./Charades_v1_audio_imagebind_feat \

# CUDA_VISIBLE_DEVICES=1 python tools/Audio/extract_imagebind_audio_feature.py \
# --data-root ./Charades_vu17_test_audio \
# --feature-saving-root ./Charades_vu17_test_audio_imagebind_feat \


class_name('fr66n').click() # click the like button
                driver.find_element_by_class_name('Ypffh').click() # click the field to insert comment
                field = driver.find_element_by_class_name('Ypffh')
                field.clear()
                typephrase(comment, field) # insert comment typing each letter
                sleep(delay)

                # the 'publish' button name changes according to your instagram language

                driver.find_element_by_xpath('//button[contains(text(), "Publicar")]').click() # click the post 'comment' button element
                sleep(random.randint(380, 420)) # break time between likes and comment due to instagram policy against bots
                driver.find_element_by_class_name('coreSpriteRightPaginationArrow').click() # click on next photo button
                item = item + 1

            except:
                sleep(60) # if connection errors occur

        print(f'Number of photos liked and commented: \033[0;33m{item - 1}\033[m')

    # running function for login
    try:
        botlogin(username, password)

    except KeyboardInterrupt:
        print('\033[0;33mProgram terminated by the user!\033[m')

    except:
        print('\033[0;31mUNEXPECTED ERROR ON LOGIN\033[m, please try again and verify your connection!')

    # executing function search hastag
    try:
        findhashtag(hashtag)

    except KeyboardInterrupt:
        print('\033[0;33mProgram terminated by the user!\033[m')

    except:
        print('\033[0;31mUNEXPECTED ERROR ON HASHTAG PAGE\033[m, please try again and verify your connection!')

    # executing function to enjoy and comment
    try:
        likecomment(likes, comment)

    except KeyboardInterrupt:
        print('\033[0;33mProgram terminated by the user!\033[m')

    except:
        print('\033[0;31mUNEXPECTED ERROR ON COMMENT\033[m, please try again and verify your connection!')

    print('')
    print('Finish!')
    print('')

    press = input('\033[0;34mpress "enter" to continue\033[m ')
    os.system(mySystem)


rt)
		for _, k := range opts.Keys() {
			if k == "strict" {
				strict = opts.Get(k).ToBoolean()
			}
		}
	}

	return strict
}
package common

import (
	"testing"
	"time"

	"github.com/grafana/xk6-browser/k6ext/k6test"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

func TestFrameGotoOptionsParse(t *testing.T) {
	t.Parallel()

	t.Run("ok", func(t *testing.T) {
		t.Parallel()

		vu := k6test.NewVU(t)
		opts := vu.ToSobekValue(map[string]any{
			"timeout":   "1000",
			"waitUntil": "networkidle",
		})
		gotoOpts := NewFrameGotoOptions("https://example.com/", 0)
		err := gotoOpts.Parse(vu.Context(), opts)
		require.NoError(t, err)

		assert.Equal(t, "https://example.com/", gotoOpts.Referer)
		assert.Equal(t, time.Second, gotoOpts.Timeout)
		assert.Equal(t, LifecycleEventNetworkIdle, gotoOpts.WaitUntil)
	})

	t.Run("err/invalid_waitUntil", func(t *testing.T) {
		t.Parallel()

		vu := k6test.NewVU(t)
		opts := vu.ToSobekValue(map[string]any{
			"waitUntil": "none",
		})
		navOpts := NewFrameGotoOptions("", 0)
		err := navOpts.Parse(vu.Context(), opts)

		assert.EqualError(t, err,
			`parsing goto options: `+
				`invalid lifecycle event: "none"; must be one of: `+
				`load, domcontentloaded, networkidle`)
	})
}

func TestFrameSetContentOptionsParse(t *testing.T) {
	t.Parallel()

	t.Run("ok", func(t *testing.T) {
		t.Parallel()

		vu := k6test.NewVU(t)
		opts := vu.ToSobekValue(map[string]any{
			"waitUntil": "networkidle",
		})
		scOpts := NewFrameSetContentOptions(30 * time.Second)
		err := scOpts.Parse(vu.Context(), opts)
		require.NoError(t, err)

		assert.Equal(t, 30*time.Second, scOpts.Timeout)
		assert.Equal(t, LifecycleEventNetworkIdle, scOpts.WaitUntil)
	})

	t.Run("err/invalid_waitUntil", func(t *testing.T) {
		t.Parallel()

		vu := k6test.NewVU(t)
		opts := vu.ToSobekValue(map[string]any{
			"waitUntil": "none",
		})
		navOpts := NewFrameSetContentOptions(0)
		err := navOpts.Parse(vu.Context(), opts)

		assert.EqualError(t, err,
			`parsing setContent options: `+
				`invalid lifecycle event: "none"; must be one of: `+
				`load, domcontentloaded, networkidle`)
	})
}

func TestFrameWaitForNavigationOptionsParse(t *testing.T) {
	t.Parallel()

	t.Run("ok", func(t *testing.T) {
		t.Parallel()

		vu := k6test.NewVU(t)
		opts := vu.ToSobekValue(map[string]any{
			"url":       "https://example.com/",
			"timeout":   "1000",
			"waitUntil": "networkidle",
		})
		navOpts := NewFrameWaitForNavigationOptions(0)
		err := navOpts.Parse(vu.Context(), opts)
		re


pp",
			},
			k8sclient:    fake.NewClientBuilder().WithScheme(schema).WithObjects(fluxApp.DeepCopy()).Build(),
			responseCode: http.StatusOK,
			verify: func(t *testing.T, body []byte) {
				app := &unstructured.Unstructured{}
				err := yaml.Unmarshal(body, app)
				assert.Nil(t, err)

				name, _, err := unstructured.NestedString(app.Object, "metadata", "name")
				assert.Equal(t, "app", name)
				assert.Nil(t, err)
			},
		},
		{
			name: "create a flux application",
			request: request{
				method: http.MethodPost,
				uri:    "/namespaces/ns/applications",
				body: func() io.Reader {
					return bytes.NewBuffer([]byte(`{
  "apiVersion": "gitops.kubesphere.io/v1alpha1",
  "kind": "Application",
  "metadata": {
    "name": "app",
    "labels": {
        "gitops.kubesphere.io/save-helm-template": "true"
    }
  },
  "spec": {
    "kind": "fluxcd",
    "fluxApp": {
      "spec": {
        "source": {
          "sourceRef": {
            "kind": "GitRepository",
            "name": "fluxcd-github-repo",
            "namespace": "fake-ns"
          }
        },
        "config": {
          "helmRelease": {
            "chart": {
              "chart": "./helm-chart",
              "version": "0.1.0",
              "interval": "5m0s",
              "reconcileStrategy": "Revision",
              "valuesFiles": [
                "./helm-chart/values.yaml",
                "./helm-chart/aliyun-values.yaml"
              ]
            },
            "deploy": [
              {
                "destination": {
                  "targetNamespace": "helm-app"
                },
                "interval": "1m0s",
                "install": {
                  "createNamespace": true
                },
                "upgrade": {
                  "remediation": {
                    "remediateLastFailure": true
                  },
                  "force": true
                }
              },
              {
                "destination": {
                  "targetNamespace": "another-helm-app"
                },
                "interval": "1m0s",
                "install": {
                  "createNamespace": true
                },
                "upgrade": {
                  "remediation": {
                    "remediateLastFailure": true
                  },
                  "force": true
                }
              }
            ]
          }
        }
      }
    }
  }
}`))
				},
			},
			k8sclient:    fake.NewClientBuilder().WithScheme(schema).Build(),
			responseCode: http.StatusOK,
			verify: func(t *testing.T, body []byte) {
				app := &unstructured.Unstructured{}
				err := yaml.Unmarshal(body, app)
				assert.Nil(t, err)

				name, _, err := unstructured.NestedString(app.Object, "metadata", "name")
				assert.Equal(t, "app", name)
				assert.Nil(t, err)
			},
		},
		{
			name: "update a flux application",
			request: request{
				method: http.MethodPut,
				uri:    "/namespaces/ns/applications/app",
				body: func() io.Reader {
					return bytes.NewBuffer([]byte(`{


k Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
$font-family-monospace:       SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
$font-family-base:            $font-family-sans-serif !default;
// stylelint-enable value-keyword-case

$font-size-base:              1rem !default; // Assumes the browser default, typically `16px`
$font-size-lg:                ($font-size-base * 1.25) !default;
$font-size-sm:                ($font-size-base * .875) !default;

$font-weight-light:           300 !default;
$font-weight-normal:          400 !default;
$font-weight-bold:            700 !default;

$font-weight-base:            $font-weight-normal !default;
$line-height-base:            1.5 !default;

$h1-font-size:                $font-size-base * 2.5 !default;
$h2-font-size:                $font-size-base * 2 !default;
$h3-font-size:                $font-size-base * 1.75 !default;
$h4-font-size:                $font-size-base * 1.5 !default;
$h5-font-size:                $font-size-base * 1.25 !default;
$h6-font-size:                $font-size-base !default;

$headings-margin-bottom:      ($spacer / 2) !default;
$headings-font-family:        inherit !default;
$headings-font-weight:        500 !default;
$headings-line-height:        1.2 !default;
$headings-color:              inherit !default;

$display1-size:               6rem !default;
$display2-size:               5.5rem !default;
$display3-size:               4.5rem !default;
$display4-size:               3.5rem !default;

$display1-weight:             300 !default;
$display2-weight:             300 !default;
$display3-weight:             300 !default;
$display4-weight:             300 !default;
$display-line-height:         $headings-line-height !default;

$lead-font-size:              ($font-size-base * 1.25) !default;
$lead-font-weight:            300 !default;

$small-font-size:             80% !default;

$text-muted:                  $gray-600 !default;

$blockquote-small-color:      $gray-600 !default;
$blockquote-font-size:        ($font-size-base * 1.25) !default;

$hr-border-color:             rgba($black, .1) !default;
$hr-border-width:             $border-width !default;

$mark-padding:                .2em !default;

$dt-font-weight:              $font-weight-bold !default;

$kbd-box-shadow:              inset 0 -.1rem 0 rgba($black, .25) !default;
$nested-kbd-font-weight:      $font-weight-bold !default;

$list-inline-padding:         .5rem !default;

$mark-bg:                     #fcf8e3 !default;

$hr-margin-y:                 $spacer !default;

// Tables
//
// Customizes the `.table` component with basic values, each used across all table variations.

$table-cell-padding:          .75rem !default;
$table-cell-padding-sm:       .3rem !default;

$table-bg:                    transparent !default;
$table-accent-bg:             rgba($black, .05) !default;
$table-hover-bg:              rgba($black


スまたは自身を表すノードAPIリソースのみを変更するように制限します。
また、kubeletが`node-restriction.kubernetes.io/`アノテーションを使用するのを防ぎます。このアノテーションは、kubeletの認証情報にアクセスできる攻撃者が、制御対象ノードへのPodの配置に影響を与えるために使用する可能性があります。

3番目のグループには、デフォルトでは有効になっていませんが、特定のユースケースで検討できるプラグインが含まれます:

[`AlwaysPullImages`](/ja/docs/reference/access-authn-authz/admission-controllers/#alwayspullimages)
: タグ付けされたイメージの最新バージョンの使用を強制し、デプロイヤーがイメージを使用する権限を持っていることを確認します。

[`ImagePolicyWebhook`](/ja/docs/reference/access-authn-authz/admission-controllers/#imagepolicywebhook)
: Webhookを通じてイメージの追加制御を強制できるようにします。

<!-- 4番目のグループには、デフォルトでは有効になっていないプラグインが含まれます。まだアルファ状態ですが、特定のユースケースで検討できます:

[`EventRateLimit`](/ja/docs/reference/access-authn-authz/admission-controllers/#eventratelimit)
: APIサーバーに新しいイベントを追加するレートを制限します。

[`PodNodeSelector`](/ja/docs/reference/access-authn-authz/admission-controllers/#Podnodeselector)
: Namespace内およびクラスター全体でノードセレクターを制御できます。

[`PodTolerationRestriction`](/ja/docs/reference/access-authn-authz/admission-controllers/#Podtolerationrestriction)
: Namespace内のPodに許可されるPodの許容範囲を制御できます。 -->

## 次のステップ

- [Pod作成による権限昇格](/ja/docs/reference/access-authn-authz/authorization/#privilege-escalation-via-Pod-creation)は、特定のアクセス制御リスクについて警告しますので、その脅威をどのように管理しているかを確認してください。
  - Kubernetes RBACを使用する場合は、認可に関する詳細について、[RBACのベストプラクティス](/ja/docs/concepts/security/rbac-good-practices/)をお読みください。
- 偶発的または悪意のあるアクセスからクラスターを保護する方法については、[クラスターのセキュリティ保護](/ja/docs/tasks/administer-cluster/securing-a-cluster/)を参照してください。
- マルチテナンシーに関する構成オプションの推奨事項とベストプラクティスについては、[クラスターマルチテナンシーガイド](/ja/docs/concepts/security/multi-tenancy/)を参照してください。
- Kubernetesクラスターの強化に関する補足リソースについては、[ブログ投稿「NSA/CISA Kubernetes 強化ガイダンスの詳細」](/blog/2021/10/05/nsa-cisa-kubernetes-hardening-guidance/#building-secure-container-images)を参照してください。
---
title: コントローラー
content_type: concept
weight


.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;

import com.chs.androiddailytext.R;

/**
 * 作者：chs on 2018-04-04 14:00
 * 邮箱：657083984@qq.com
 */
public class WorkStatisticView extends View {
    private Paint mPaint;
    private int sum,yes,no,hand;
    private int mWidth,mHeight;
    private RectF mRectF;
    private Context mContext;
    public WorkStatisticView(Context context) {
        super(context);
        init(context);
    }

    public WorkStatisticView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        init(context);
    }

    public WorkStatisticView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init(context);
    }

    private void init(Context context) {
        mContext = context;
        mPaint = new Paint();
        mPaint.setAntiAlias(true);
        mPaint.setStyle(Paint.Style.FILL);

        mRectF = new RectF();
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }

    @Override
    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
        mWidth = w - getPaddingLeft() - getPaddingRight();
        mHeight = h - getPaddingTop() - getPaddingBottom();
        Log.i("zhixing","onSizeChanged");
    }
    public void setData(int yes,int no,int hand,int sum){
        this.yes = yes;
        this.no = no;
        this.hand = hand;
        this.sum = sum;
        Log.i("zhixing","setData");
    }
    @Override
    protected void onDraw(Canvas canvas) {
        Log.i("zhixing","onDraw");

        mRectF.left = 0; mRectF.top = 0; mRectF.right = ((float)yes/sum)* mWidth; mRectF.bottom = mHeight;
        mPaint.setColor(ContextCompat.getColor(mContext, R.color.statistic_yes));
        canvas.drawRect(mRectF,mPaint);

        mRectF.left = mRectF.right; mRectF.top = 0; mRectF.right = mRectF.right+((float)no/sum)*mWidth; mRectF.bottom = mHeight;
        mPaint.setColor(ContextCompat.getColor(mContext, R.color.statistic_no));
        canvas.drawRect(mRectF,mPaint);

        mRectF.left = mRectF.right; mRectF.top = 0; mRectF.right = mRectF.right+((float)hand/sum)*mWidth; mRectF.bottom = mHeight;
        mPaint.setColor(ContextCompat.getColor(mContext, R.color.statistic_hand));
        canvas.drawRect(mRectF,mPaint);
    }
}
package com.chs.androiddailytext.widget;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import android.util.AttributeSet;
import android.view.View;

import com.chs.androiddailytext.R;
import com.chs.androiddailytext.utils.DensityUtil;

/**
 * 作者：chs
 * 时间：2018-05-23 10:38
 * 描述：
 */
public class PlaceStatisticView extends View {
    private RectF mRect;
    private int mWidth;
    private Paint mPaint;
    public PlaceStatisticView(Context conte


터가 오른쪽 포인터보다 작거나 같다면 계속 탐색
        while (left <= right) {
            // 중앙의 위치 계산 개선
            val mid = left + (right - left) / 2
            // 중앙의 위치를 피벗의 위치만큼 이동하여 계산
            val midPivot = (mid + pivot) % nums.size

            when {
                // 만약 피벗 중앙값이 타깃보다 작으면, 왼쪽 포인터를 중앙으로 이동
                nums[midPivot] < target -> left = mid + 1
                // 만약 피벗 중앙값이 타깃보다 크다면, 오른쪽 포인터를 중앙으로 이동
                nums[midPivot] > target -> right = mid - 1
                // 정답을 찾은 경우이므로 결과 리턴
                else -> return midPivot
            }
        }
        // 모두 탐색했으나 정답을 찾지 못한 경우로 -1 리턴
        return -1
    }
}package ch11

class P30_2 {
    // 노드 클래스
    class Node(var key: Int, var `val`: Int) {
        var next: Node? = null
    }

    val nodes: Array<Node?> = arrayOfNulls(1000000)

    // 삽입
    fun put(key: Int, value: Int) {
        // 해싱 결과를 인덱스로 지정
        val index = key % nodes.size
        // 해당 인덱스에 노드가 없다면 신규 생성 후 종료
        if (nodes[index] == null) {
            nodes[index] = Node(key, value)
            return
        }
        // 인덱스에 노드가 존재한다면 연결 리스트로 처리
        var node = nodes[index]
        while (node != null) {
            // 동일한 키가 있다면 값을 업데이트하고 종료
            if (node.key == key) {
                node.`val` = value
                return
            }
            // 다음 노드가 없다면 종료
            if (node.next == null)
                break
            // 다음 노드로 진행
            node = node.next
        }
        // 마지막 노드 다음으로 연결
        node!!.next = Node(key, value)
    }

    // 조회
    fun get(key: Int): Int {
        // 해싱 결과를 인덱스로 지정
        val index = key % nodes.size
        // 인덱스에 노드가 존재하지 않으면 -1
        if (nodes[index] == null)
            return -1
        // 인덱스에 노드가 존재한다면 일치하는 키 탐색
        var node = nodes[index]
        while (node != null) {
            // 동일한 키가 있다면 값을 리턴
            if (node.key == key) {
                return node.`val`
            }
            // 다음 노드로 진행
            node = node.next
        }
        // 인덱스를 모두 순회해도 일치하는 키가 없다면