,
  edit,
  delete,
}

extension CoreTypeActionX on CoreTypeAction {
  String localized(BuildContext context) {
    switch (this) {
      case CoreTypeAction.addCore:
        return context.loc.add_core;
      case CoreTypeAction.edit:
        return context.loc.edit;
      case CoreTypeAction.delete:
        return context.loc.delete;
    }
  }
}

class _CoresScreenState extends State<CoresScreen> {
  var _highlightCoresPopupMenuButton = false;

  void setHighlightCoresPopupMenuButton() async {
    for (var i = 0; i < 5; ++i) {
      if (mounted) {
        setState(() {
          _highlightCoresPopupMenuButton = true;
        });
        await Future.delayed(const Duration(milliseconds: 1500));
      } else {
        return;
      }
    }
  }

  void handleCoresAction(CoresAction action) {
    switch (action) {
      case CoresAction.addCore:
        _addCore();
      case CoresAction.addCoreType:
        _addCoreType();
    }
  }

  void _addCore({int? coreTypeId}) {
    Navigator.push(
      context,
      MaterialPageRoute(
        builder: (context) => CoreScreen(coreTypeId: coreTypeId),
      ),
    ).then((res) {
      if (res != null) {
        if (res['ok'] == true) {
          _loadCores();
        }
        if (res['status'] == EditStatus.inserted) {
          final coreTypeId = res['coreTypeId'];
          final coreId = res['coreId'];
          setCoreTypeIdCoreId(coreTypeId, coreId);
        }
      }
    });
  }

  void _addCoreType() {
    Navigator.push(
      context,
      MaterialPageRoute(builder: (context) => const CoreTypeScreen()),
    ).then((res) {
      if (res != null && res['ok'] == true) {
        _loadCores();
      }
    });
  }

  void _editCore(TypedResult core) {
    Navigator.push(
      context,
      MaterialPageRoute(
        builder: (context) => CoreScreen(
          core: core,
        ),
      ),
    ).then((res) {
      if (res != null && res['ok'] == true) {
        _loadCores();
      }
    });
  }

  void _editCoreType(int coreTypeId) async {
    final coreType = await (db.select(
      db.coreType,
    )..where((p) => p.id.equals(coreTypeId))).getSingle();
    if (mounted) {
      Navigator.push(
        context,
        MaterialPageRoute(
          builder: (context) => CoreTypeScreen(
            coreType: coreType,
          ),
        ),
      ).then((res) {
        if (res != null && res['ok'] == true) {
          _loadCores();
        }
      });
    }
  }

  Map<int, List<TypedResult>> _groupedCores = {};
  Map<int, TypedResult> _cores = {};
  Map<int, TypedResult> _coreTypes = {};
  Map<int, int> _coreTypeSeclectedId = {};

  final TreeNode _root = TreeNode.root();

  Future<void> _loadCores() async {
    final cores = await db.select(db.core).join([
      leftOuterJoin(db.coreExec, db.core.id.equalsExp(db.coreExec.coreId)),
      leftOuterJoin(db.coreLib, db.core.id.equalsExp(db.coreLib.coreId)),
      leftOuterJoin(
        db.coreTypeSelected,
        db.core.id.equalsExp(db.coreTypeSelected.coreId),
      ),
      leftOuterJoin(db.coreType, db.core.coreTypeId.equalsExp(db.coreType


TextStyle(
      fontFamily: "HormonySans",
      fontSize: defaultCommonConfig.fontSizeSubHead,
      fontWeight: FontWeight.w600,
      color: defaultCommonConfig.colorLink,
    ),
    itemTitleStyleAlert: BrnTextStyle(
      fontFamily: "HormonySans",
      color: defaultCommonConfig.brandError,
      fontSize: defaultCommonConfig.fontSizeSubHead,
      fontWeight: FontWeight.w600,
    ),
    itemDescStyle: BrnTextStyle(
      fontFamily: "HormonySans",
      color: defaultCommonConfig.colorTextBase,
      fontSize: defaultCommonConfig.fontSizeCaption,
      fontWeight: FontWeight.w600,
    ),
    itemDescStyleLink: BrnTextStyle(
      fontFamily: "HormonySans",
      color: defaultCommonConfig.colorLink,
      fontSize: defaultCommonConfig.fontSizeCaption,
      fontWeight: FontWeight.w600,
    ),
    itemDescStyleAlert: BrnTextStyle(
      fontFamily: "HormonySans",
      color: defaultCommonConfig.brandError,
      fontSize: defaultCommonConfig.fontSizeCaption,
      fontWeight: FontWeight.w600,
    ),
    cancelStyle: BrnTextStyle(
      fontFamily: "HormonySans",
      color: defaultCommonConfig.colorTextBase,
      fontSize: defaultCommonConfig.fontSizeSubHead,
      fontWeight: FontWeight.w600,
    ),
    titlePadding: const EdgeInsets.symmetric(horizontal: 60.0, vertical: 16.0),
    contentPadding:
        const EdgeInsets.symmetric(horizontal: 60.0, vertical: 12.0),
  );

  static BrnPickerConfig defaultPickerConfig = BrnPickerConfig(
    backgroundColor: pickerBackgroundColor,
    cancelTextStyle: BrnTextStyle(
      fontFamily: "HormonySans",
      color: defaultCommonConfig.colorTextBase,
      fontSize: defaultCommonConfig.fontSizeSubHead,
    ),
    confirmTextStyle: BrnTextStyle(
      fontFamily: "HormonySans",
      color: defaultCommonConfig.brandPrimary,
      fontSize: defaultCommonConfig.fontSizeSubHead,
    ),
    titleTextStyle: BrnTextStyle(
      fontFamily: "HormonySans",
      color: defaultCommonConfig.colorTextBase,
      fontSize: defaultCommonConfig.fontSizeSubHead,
      fontWeight: FontWeight.w600,
      decoration: TextDecoration.none,
    ),
    pickerHeight: pickerHeight,
    titleHeight: pickerTitleHeight,
    itemHeight: pickerItemHeight,
    dividerColor: const Color(0xFFF0F0F0),
    itemTextStyle: BrnTextStyle(
      fontFamily: "HormonySans",
      color: defaultCommonConfig.colorTextBase,
      fontSize: defaultCommonConfig.fontSizeHead,
    ),
    itemTextSelectedStyle: BrnTextStyle(
      fontFamily: "HormonySans",
      color: defaultCommonConfig.brandPrimary,
      fontSize: defaultCommonConfig.fontSizeHead,
      fontWeight: FontWeight.w600,
    ),
    cornerRadius: 8,
  );

  /// 数字增强信息配置
  static BrnEnhanceNumberCardConfig defaultEnhanceNumberInfoConfig =
      BrnEnhanceNumberCardConfig(
    runningSpace: 16.0,
    itemRunningSpace: 8.0,
    titleTextStyle: BrnTextStyle(
        fontFamily: "HormonySans", fontSize: 28.0, fontWeight: FontWeight.w500),
    descTextStyle: BrnTextStyle(
      fontFamily: "HormonySans",
      fontSize: 12.0,
      color: defaultCommonConfig.colorTextSecondary,
    ),
    dividerWidth: 0.5,
  );

  /// TabBar配置
  static BrnTabBarConfig defaultTabBarConfig = Br


            .collect(),
    })
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn d5_ex1() {
        let (input, sink) = channel();
        input.send(42).unwrap();
        let output = exec(&vec![3, 0, 4, 0, 99], sink, None);
        assert_eq!(output.recv().unwrap(), 42);
    }

    #[test]
    fn d5_ex2() {
        let (_, sink) = channel();
        let output = exec(&vec![1102, 11, 22, 7, 4, 7, 99, 0], sink, None);
        assert_eq!(output.recv().unwrap(), 242);
    }

    #[test]
    fn d5_ex3() {
        let (input, sink) = channel();
        input.send(8).unwrap();
        let output = exec(&vec![3, 9, 8, 9, 10, 9, 4, 9, 99, -1, 8], sink, None);
        assert_eq!(output.recv().unwrap(), 1);
    }

    #[test]
    fn d5_ex4() {
        let (input, sink) = channel();
        input.send(7).unwrap();
        let output = exec(&vec![3, 9, 8, 9, 10, 9, 4, 9, 99, -1, 8], sink, None);
        assert_eq!(output.recv().unwrap(), 0);
    }

    #[test]
    fn d5_ex5() {
        let (input, sink) = channel();
        input.send(8).unwrap();
        let output = exec(&vec![3, 9, 7, 9, 10, 9, 4, 9, 99, -1, 8], sink, None);
        assert_eq!(output.recv().unwrap(), 0);
    }

    #[test]
    fn d5_ex6() {
        let (input, sink) = channel();
        input.send(7).unwrap();
        let output = exec(&vec![3, 9, 7, 9, 10, 9, 4, 9, 99, -1, 8], sink, None);
        assert_eq!(output.recv().unwrap(), 1);
    }

    #[test]
    fn d5_ex7() {
        let (input, sink) = channel();
        input.send(8).unwrap();
        let output = exec(&vec![3, 3, 1108, -1, 8, 3, 4, 3, 99], sink, None);
        assert_eq!(output.recv().unwrap(), 1);
    }

    #[test]
    fn d5_ex8() {
        let (input, sink) = channel();
        input.send(7).unwrap();
        let output = exec(&vec![3, 3, 1108, -1, 8, 3, 4, 3, 99], sink, None);
        assert_eq!(output.recv().unwrap(), 0);
    }

    #[test]
    fn d5_ex9() {
        let (input, sink) = channel();
        input.send(8).unwrap();
        let output = exec(&vec![3, 3, 1107, -1, 8, 3, 4, 3, 99], sink, None);
        assert_eq!(output.recv().unwrap(), 0);
    }

    #[test]
    fn d5_ex10() {
        let (input, sink) = channel();
        input.send(7).unwrap();
        let output = exec(&vec![3, 3, 1107, -1, 8, 3, 4, 3, 99], sink, None);
        assert_eq!(output.recv().unwrap(), 1);
    }

    #[test]
    fn d5_ex11() {
        let (input, sink) = channel();
        input.send(0).unwrap();
        let output = exec(
            &vec![3, 12, 6, 12, 15, 1, 13, 14, 13, 4, 13, 99, -1, 0,


eceive_packets_total{cluster=\"$cluster\",namespace=~\"$namespace\"}[$__rate_interval])\n  * on (cluster,namespace,pod) group_left ()\n    topk by (cluster,namespace,pod) (\n      1,\n      max by (cluster,namespace,pod) (kube_pod_info{host_network=\"false\"})\n    )\n)\n",
						labelMatchers,
					),
					dashboards.AddQueryDataSource(datasourceName),
					query.SeriesNameFormat("{{pod}}"),
				),
			),
		}
	case "namespace-workload-networking":
		description = "Shows the rate of received packets by top pods in a workload in a namespace in a cluster."
		queries = []panel.Option{
			panel.AddQuery(
				query.PromQL(
					promql.SetLabelMatchers(
						"sort_desc(sum(rate(container_network_receive_packets_total{cluster=\"$cluster\",namespace=\"$namespace\"}[$__rate_interval])\n* on (cluster,namespace,pod) group_left ()\n    topk by (cluster,namespace,pod) (\n      1,\n      max by (cluster,namespace,pod) (kube_pod_info{host_network=\"false\"})\n    )\n* on (cluster,namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\", workload_type=~\"$type\"}) by (workload))\n",
						labelMatchers,
					),
					dashboards.AddQueryDataSource(datasourceName),
					query.SeriesNameFormat("{{workload}}"),
				),
			),
		}
	case "workload-networking":
		description = "Shows the rate of received packets by top pods in a workload in a cluster."
		queries = []panel.Option{
			panel.AddQuery(
				query.PromQL(
					promql.SetLabelMatchers(
						"sort_desc(sum(rate(container_network_receive_packets_total{"+GetCAdvisorMatcher()+", cluster=\"$cluster\",namespace=~\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\", workload_type=~\"$type\"}) by (pod))\n",
						labelMatchers,
					),
					dashboards.AddQueryDataSource(datasourceName),
					query.SeriesNameFormat("{{pod}}"),
				),
			),
		}
	case "pod-networking":
		description = "Shows the rate of received packets by a pod in a cluster."
		queries = []panel.Option{
			panel.AddQuery(
				query.PromQL(
					promql.SetLabelMatchers(
						"sum(rate(container_network_receive_packets_total{cluster=\"$cluster\",namespace=~\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)",
						labelMatchers,
					),
					dashboards.AddQueryDataSource(datasourceName),
					query.SeriesNameFormat("{{pod}}"),
				),
			),
		}
	}

	panelOpts := []panel.Option{
		panel.Description(description),
		timeSeriesPanel.Chart(
			timeSeriesPanel.WithYAxis(timeSeriesPanel.YAxis{
				Format: &commonSdk.Format{
					Unit: &dashboards.PacketsPerSecondsUnit,
				},
			}),
			timeSeriesPanel.WithLegend(timeSeriesPanel.Legend{
				Position: timeSeriesPanel.BottomPosition,
				Mode:     timeSeriesPanel.ListMode,
				Size:     timeSeriesPanel.SmallSize,
			}),
			timeSeriesPanel.WithVisual(timeSeriesPanel.Visual{
				Display:      timeSeriesPanel.LineDisplay,
				ConnectNulls: false,
				LineWidth:    0.25,
				AreaOpacity:  0.75,
				Palette:


.ChildrenList.ReadOnly = locked;
            fView.EventsList.ReadOnly = locked;
            fView.NotesList.ReadOnly = locked;
            fView.MediaList.ReadOnly = locked;
            fView.SourcesList.ReadOnly = locked;
            fView.UserRefList.ReadOnly = locked;
        }

        public void SetHusband(string value)
        {
            bool res = !string.IsNullOrEmpty(value);
            fView.Husband.Text = (res) ? value : LangMan.LS(LSID.UnkMale);

            GetControl<IButton>("btnHusbandAdd").Enabled = !res;
            GetControl<IButton>("btnHusbandDelete").Enabled = res;
            GetControl<IButton>("btnHusbandSel").Enabled = res;
        }

        public void SetWife(string value)
        {
            bool res = !string.IsNullOrEmpty(value);
            fView.Wife.Text = (res) ? value : LangMan.LS(LSID.UnkFemale);

            GetControl<IButton>("btnWifeAdd").Enabled = !res;
            GetControl<IButton>("btnWifeDelete").Enabled = res;
            GetControl<IButton>("btnWifeSel").Enabled = res;
        }

        public async void AddHusband()
        {
            if (await BaseController.AddFamilyHusband(fView, fBase, fLocalUndoman, fFamilyRecord)) {
                UpdateControls();
            }
        }

        public async void DeleteHusband()
        {
            if (await BaseController.DeleteFamilyHusband(fBase, fLocalUndoman, fFamilyRecord)) {
                UpdateControls();
            }
        }

        public async void AddWife()
        {
            if (await BaseController.AddFamilyWife(fView, fBase, fLocalUndoman, fFamilyRecord)) {
                UpdateControls();
            }
        }

        public async void DeleteWife()
        {
            if (await BaseController.DeleteFamilyWife(fBase, fLocalUndoman, fFamilyRecord)) {
                UpdateControls();
            }
        }

        public void JumpToHusband()
        {
            JumpToRecord(fFamilyRecord.Husband);
        }

        public void JumpToWife()
        {
            JumpToRecord(fFamilyRecord.Wife);
        }

        public override void SetLocale()
        {
            GetControl<IButton>("btnAccept").Text = LangMan.LS(LSID.DlgAccept);
            GetControl<IButton>("btnCancel").Text = LangMan.LS(LSID.DlgCancel);
            GetControl<ILabel>("lblHusband").Te


     let env = {xx:3};
        let dr = d.resolve(env);
        this.areIdentical('xx', dr.unit);
        this.areIdentical(1000, dr.number);
    }
    testDimensionResolvedNegHasIdentity() {
        let d = dimension('1000').resolve({});
        let dn = d.neg();
        this.areIdentical(d, dn.neg(), 'neg of neg should be original');
        this.areIdentical(dn, d.neg(), 'neg should return only one object');
    }
    testDimensionResolvedPlusNegHasIdentity() {
        let d = dimension('1000').plus(1).resolve({});
        let dn = d.neg();
        this.areIdentical(d, dn.neg(), 'neg of neg should be original');
        this.areIdentical(dn, d.neg(), 'neg should return only one object');
    }
    testDimensionResolvedPlus() {
        let d = dimension('1000xx');
        let dr = d.resolve({xx:3, xy:4});
        let dp = dr.plus('10xy');
        this.areIdentical(3000+40, dp.value());
    }
    testDimensionResolvedMinus() {
        let d = dimension('1000xx');
        let dr = d.resolve({xx:3, xy:4});
        let dm = dr.minus('10xy');
        this.areIdentical(3000-40, dm.value());
    }

    testDimensionFCanInterpolate() {
        let d1 = dimension('1000xx');
        let d2 = dimension('1000xy');
        let d = dimensionF(d1,d2, (a,b) => ((a+b)/2));
        let dr = d.resolve({xx:3, xy:4});
        this.areIdentical((-1000+2000)/2, d.value({xx:-1, xy:2}));
        this.areIdentical((3000+4000)/2, dr.value());
    }

    testDimensionFHasNeitherUnitNorNumber() {
        let d1 = dimension('1000xx');
        let d2 = dimension('1000xy');
        let d = dimensionF(d1,d2, (a,b) => ((a+b)/2));
        this.areIdentical(undefined, d.unit);
        this.areIdentical(undefined, d.number);
    }

    testDimensionProxyWorksForDestructuring() {
        let { a, b } = dimensionProxy({ a: '12pc', b: '400grad'});
        this.areIdentical(12*96/6, a.value());
        this.areIdentical((2*Math.PI).toFixed(6), b.value().toFixed(6));
    }
    testDimensionProxyAllowsDefaultValue() {
        let dp = dimensionProxy({ a: '12pc', b: '400grad'}, { c: '360deg' }, () => ({ pc: 3 }));
        let { a } = dp;
        this.areIdentical(12*3, a.value());
        this.areIdentical(a, dp.a);
    }
    testDimensionProxyReturnsSameInstance() {
        let dp = dimensionProxy({ a: '12pc', b: '400grad'}, {}, () => ({ pc: 3 }));
        let { a } = dp;
        this.areIdentical(12*3, a.value());
        this.areIdentical(a, dp.a);
    }
}
import { NextFunction, Request, Response, Router } from "express";
import cocktailController from "../../controllers/cocktailController";
const { authorize } = require("../../controllers/authMiddleware");

class cocktailRouter {
  private _router = Router();
  private _controller = cocktailController;

  get router() {
    return this._router;
  }

  constructor() {
    this._configure();
  }

  /**
   * Connect routes to their matching controller endpoints.
   */
  private _configure() {
    this._router.get(
      "/",
      async (req: Request, res: Response, next: NextFunction) => {
        try {
          const result = await this._controller.getRandomCocktails();

          res.status(200).json(


c0	$3, $5
	mtc0	$5, $9, 0
	mtc0	$7, $13, 3
	mtc0	$17, $15, 1
	mtc0	$2, $17, 7
	mtc0	$6, $21


/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>

  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
  arising from the use of this software.

  Permission is granted to anyone to use this software for any purpose,
  including commercial applications, and to alter it and redistribute it
  freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not
     claim that you wrote the original software. If you use this software
     in a product, an acknowledgment in the product documentation would be
     appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be
     misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"

#if defined(SDL_TIMER_DUMMY) || defined(SDL_TIMERS_DISABLED)

#include "SDL_timer.h"

static SDL_bool ticks_started = SDL_FALSE;

void
SDL_TicksInit(void)
{
    if (ticks_started) {
        return;
    }
    ticks_started = SDL_TRUE;
}

void
SDL_TicksQuit(void)
{
    ticks_started = SDL_FALSE;
}

Uint32
SDL_GetTicks(void)
{
    if (!ticks_started) {
        SDL_TicksInit();
    }

    SDL_Unsupported();
    return 0;
}

Uint64
SDL_GetPerformanceCounter(void)
{
    return SDL_GetTicks();
}

Uint64
SDL_GetPerformanceFrequency(void)
{
    return 1000;
}

void
SDL_Delay(Uint32 ms)
{
    SDL_Unsupported();
}

#endif /* SDL_TIMER_DUMMY || SDL_TIMERS_DISABLED */

/* vi: set ts=4 sw=4 expandtab: */


 = -0x7fff_ffff;
    let max = 0x7fff_ffff;
    let values: Vec<&str> =
        Category::all().iter().map(Category::as_str).collect();
    vec![
        Column::build("Table").primary_key().id_string(32),
        Column::build("Column").primary_key().id_string(32),
        Column::build("Nullable").enum_values(&["Y", "N"]).string(4),
        Column::build("MinValue").nullable().range(min, max).int32(),
        Column::build("MaxValue").nullable().range(min, max).int32(),
        Column::build("KeyTable").nullable().id_string(255),
        Column::build("KeyColumn").nullable().range(1, 32).int16(),
        Column::build("Category").nullable().enum_values(&values).string(32),
        Column::build("Set").nullable().text_string(255),
        Column::build("Description").nullable().text_string(255),
    ]
}

fn make_validation_table(long_string_refs: bool) -> Rc<Table> {
    Table::new(
        VALIDATION_TABLE_NAME.to_string(),
        make_validation_columns(),
        long_string_refs,
    )
}

fn is_reserved_table_name(table_name: &str) -> bool {
    table_name == COLUMNS_TABLE_NAME
        || table_name == TABLES_TABLE_NAME
        || table_name == VALIDATION_TABLE_NAME
}

// ========================================================================= //

/// The type of MSI package (e.g. installer or patch).
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PackageType {
    /// An installer package, which installs a new application.
    Installer,
    /// A patch package, which provides an update to an application.
    Patch,
    /// A transform, which is a collection of changes applied to an
    /// installation.
    Transform,
}

impl PackageType {
    fn from_clsid(clsid: &Uuid) -> Option<PackageType> {
        if *clsid == PackageType::Installer.clsid() {
            Some(PackageType::Installer)
        } else if *clsid == PackageType::Patch.clsid() {
            Some(PackageType::Patch)
        } else if *clsid == PackageType::Transform.clsid() {
            Some(PackageType::Transform)
        } else {
            None
        }
    }

    fn clsid(&self) -> Uuid {
        match *self {
            PackageType::Installer => {
                Uuid::parse_str(INSTALLER_PACKAGE_CLSID).unwrap()
            }
            PackageType::Patch => {
                Uuid::parse_str(PATCH_PACKAGE_CLSID).unwrap()
            }
            PackageType::Transform => {
                Uuid::parse_str(TRANSFORM_PACKAGE_CLSID).unwrap()
            }
        }
    }

    fn default_title(&self) -> &str {
        match *self {
            PackageType::Installer => "Installation Database",
            PackageType::Patch => "Patch",
            PackageType::Transform => "Transform",
        }
    }
}

// ========================================================================= //

/// An MSI package file, backed by an underlying reader/writer (such as a
/// [`File`](https://doc.rust-lang.org/std/fs/struct.File.html) or
/// [`Cursor`](https://doc.rust-lang.org/std/io/struct.Cursor.html)).
///
/// # Examples
///
/// ```
/// use msi::{Column, Expr, Insert, Package, PackageType, Select, Value};
/// use


%xmm6
	unpcklps %xmm4, %xmm0
	unpckhps %xmm4, %xmm6

	movlps	%xmm1, 0 * SIZE(CO1)
	movhps	%xmm1, 2 * SIZE(CO1)
	movlps	%xmm2, 0 * SIZE(CO1, LDC, 1)
	movhps	%xmm2, 2 * SIZE(CO1, LDC, 1)
	movlps	%xmm0, 0 * SIZE(CO1, LDC, 2)
	movhps	%xmm0, 2 * SIZE(CO1, LDC, 2)
	movlps	%xmm6, 0 * SIZE(CO1, %eax, 1)
	movhps	%xmm6, 2 * SIZE(CO1, %eax, 1)
#else
	movlps	%xmm0, 0 * SIZE(CO1)
	movhps	%xmm0, 2 * SIZE(CO1)
	movlps	%xmm1, 0 * SIZE(CO1, LDC, 1)
	movhps	%xmm1, 2 * SIZE(CO1, LDC, 1)
	movlps	%xmm2, 0 * SIZE(CO1, LDC, 2)
	movhps	%xmm2, 2 * SIZE(CO1, LDC, 2)
	movlps	%xmm3, 0 * SIZE(CO1, %eax, 1)
	movhps	%xmm3, 2 * SIZE(CO1, %eax, 1)
#endif

#ifndef LN
	addl	$4 * SIZE, CO1
#endif

#if defined(LT) || defined(RN)
	movl	K,  %eax
	subl	KK, %eax
	leal	(,%eax, SIZE), %eax
	leal	(AA, %eax, 4), AA
	leal	(BB, %eax, 4), BB
#endif

#ifdef LN
	subl	$4, KK
#endif

#ifdef LT
	addl	$4, KK
#endif

#ifdef RT
	movl	K, %eax
	sall	$2 + BASE_SHIFT, %eax
	addl	%eax, AORIG
#endif

	decl	%ebx			# i --
	jg	.L11
	ALIGN_4

.L20:
	testl	$2, M
	je	.L30

#ifdef LN
       movl	K, %eax
       sall	$1 + BASE_SHIFT, %eax
       subl	%eax, AORIG
#endif

#if defined(LN) || defined(RT)
	movl	KK, %eax
	movl	AORIG, AA
	leal	(, %eax, SIZE), %eax
	leal	(AA, %eax, 2), AA
#endif

	movl	B, BB

#if defined(LN) || defined(RT)
	movl	KK, %eax
	sall	$2 + BASE_SHIFT, %eax
	addl	%eax, BB
#endif

	pxor	%xmm4, %xmm4
	movaps	-32 * SIZE(AA), %xmm0
	pxor	%xmm5, %xmm5
	movaps	-32 * SIZE(BB), %xmm1
	pxor	%xmm6, %xmm6
	pxor	%xmm7, %xmm7

#if defined(LT) || defined(RN)
	movl	KK, %eax
#else
	movl	K, %eax
	subl	KK, %eax
#endif
	sarl	$3, %eax
	je	.L25
	ALIGN_4

.L22:
	PREFETCH (PREFETCHSIZE +  0) * SIZE(AA)

	pshufd	$0x44, %xmm0, %xmm2
	pshufd	$0x50, %xmm1, %xmm3
	mulps	%xmm2, %xmm3
	addps	%xmm3, %xmm4
	pshufd	$0xfa, %


from ollama import chat
from ollama import ChatResponse
import pandas as pd

def custom_evaluate_speech(student_results, rubric, transcript, interactive_mode=False):
    rubric = pd.read_csv(rubric)
    rubric_str = rubric.to_string()

    # Initialize conversation history
    messages = [
        {
            'role': 'system',
            'content': f"""You're evaluating a student's presentation. Here's the rubric: {rubric_str}
            presentation transcript: {transcript}
            our analysis results: {student_results}
            Briefly grade the generated transcript of the person presenting using the rubric
            (give a number score for each criteria, per the rubric).
            Talk in the 3rd person
            If mentions visual aid, give it NA because you're not meant for analyzing that
            Dont explicitly mention the transcript or analysis results
            Dont give an overall grade
            """
        },
        {
            'role': 'user',
            'content': "How did I do?"
        }
    ]

    # Get initial AI feedback
    response: ChatResponse = chat(model='llama3.2', messages=messages)
    print(transcript)
    return response['message']['content']


> {
        let mut result = {
            use std::vector::push_back;
            use std::option::{Option, some, none};

            let mut v = vector[];
            push_back(&mut v, some(0));
            v
        };
        push_back(&mut result, std::option::none());
        // ^^^^^^ ERROR! unbound function 'push_back'
        result
    }
```

Any `use` must be the first item in the block. If the `use` comes after any expression or `let`, it
will result in a parsing error

```move
{
    let mut v = vector[];
    use std::vector; // ERROR!
}
```

This allows you to shorten your import blocks in many situations. Note that these imports, as the
previous ones, are all subject to the naming and uniqueness rules described in the following
sections.

## Naming rules

Aliases must follow the same rules as other module members. This means that aliases to structs (and
constants) must start with `A` to `Z`

```move
module a::data {
    public struct S {}
    const FLAG: bool = false;
    public fun foo() {}
}
module a::example {
    use a::data::{
        S as s, // ERROR!
        FLAG as fLAG, // ERROR!
        foo as FOO,  // valid
        foo as bar, // valid
    };
}
```

## Uniqueness

Inside a given scope, all aliases introduced by `use` declarations must be unique.

For a module, this means aliases introduced by `use` cannot overlap

```move
module a::example {
    use std::option::{none as foo, some as foo}; // ERROR!
    //                                     ^^^ duplicate 'foo'

    use std::option::none as bar;

    use std::option::some as bar; // ERROR!
    //                       ^^^ duplicate 'bar'

}
```

And, they cannot overlap with any of the module's other members

```move
module a::data {
    public struct S {}
}
module example {
    use a::data::S;

    public struct S { value: u64 } // ERROR!
    //            ^ conflicts with alias 'S' above
}
}
```

Inside of an expression block, they cannot overlap with each other, but they can
[shadow](#shadowing) other aliases or names from an outer scope

## Shadowing

`use` aliases inside of an expression block can shadow names (module members or aliases) from the
outer scope. As with shadowing of locals, the shadowing ends at the end of the expression block;

```move
module a::example {

    public struct WrappedVector { vec: vector<u64> }

    public fun empty(): WrappedVector {
        WrappedVector { vec: std::vector::empty() }
    }

    public fun push_back(v: &mut WrappedVector, value: u64) {
        std::vector::push_back(&mut v.vec, value);
    }

    fun example1(): WrappedVector {
        use std::vector::push_back;
        // 'push_back' now refers to std::vector::push_back
        let mut vec = vector[];
        push_back(&mut vec, 0);
        push_back(&mut vec, 1);
        push_back(&mut vec, 10);
        WrappedVector { vec }
    }

    fun example2(): WrappedVector {
        let vec = {
            use std::vector::push_back;
            // 'push_back' now refers to std::vector::push_back

            let mut v = vector[];
            push_back(&mut v, 0);
            push_back(&mut v, 1);
            v
        };
        // 'push_back' now refers to Self::push_back
        let mut res = WrappedVector { vec };
        push_back(&mut res, 10);
        res
    }
}
```

## Unused Use or Ali


TER, 0);
	}

	@Override
	protected void initEntityAI(){

		this.tasks.addTask(0, new EntityAISwimming(this));
		// Why would you go to the effort of making the IMerchant interface and then have the AI classes only accept
		// EntityVillager?
		this.tasks.addTask(1, new EntityAITradePlayer(this));
		this.tasks.addTask(1, new EntityAILookAtTradePlayer(this));
		this.tasks.addTask(4, new EntityAIRestrictOpenDoor(this));
		this.tasks.addTask(5, new EntityAIOpenDoor(this, true));
		this.tasks.addTask(6, new EntityAIMoveTowardsRestriction(this, 0.6D));
		this.tasks.addTask(7, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
		this.tasks.addTask(7, new EntityAIWatchClosest2(this, EntityWizard.class, 5.0F, 0.02F));
		this.tasks.addTask(7, new EntityAIWander(this, 0.6D));
		this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));

		this.targetSelector = entity -> {

			// If the target is valid and not invisible...
			if(entity != null && !entity.isInvisible()
					&& AllyDesignationSystem.isValidTarget(EntityWizard.this, entity)){

				// ... and is a non summoned creature mob ...
				if((entity instanceof IMob && !(entity instanceof ISummonedCreature)

						// or is a summoned creature with a mob owner or an owner who has attacked the wizard ...
						|| entity instanceof ISummonedCreature && (((ISummonedCreature)entity).getOwner() instanceof IMob || ((ISummonedCreature)entity).getOwner() == this.getRevengeTarget() || ((ISummonedCreature) entity).getOwner() == this.getAttackTarget())

						// ... or in the whitelist ...
						|| Arrays.asList(Wizardry.settings.summonedCreatureTargetsWhitelist)
								.contains(EntityList.getKey(entity.getClass())))
						// ... and isn't in the blacklist ...
						&& !Arrays.asList(Wizardry.settings.summonedCreatureTargetsBlacklist)
								.contains(EntityList.getKey(entity.getClass()))){
					// ... it can be attacked.
					return true;
				}
			}

			return false;
		};

		this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
		// By default, wizards don't attack players unless the player has attacked them.
		this.targetTasks.addTask(0, new EntityAINearestAttackableTarget<EntityLiving>(this, EntityLiving.class, 0,
				false, true, this.targetSelector));
	}

	@Override
	protected void applyEntityAttributes(){
		super.applyEntityAttributes();
		this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.5);
		this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(30);
	}

	private int getHealCooldown(){
		return this.dataManager.get(HEAL_COOLDOWN);
	}

	private void setHealCooldown(int cooldown){
		this.dataManager.set(HEAL_COOLDOWN, cooldown);
	}

	public Element getElement(){
		return Element.values()[this.dataManager.get(ELEMENT)];
	}

	public void setElement(Element element){
		this.dataManager.set(ELEMENT, element.ordinal());
	}

	@Override
	public List<Spell> getSpells(){
		return this.spells;
	}

	@Override
	public SpellModifiers getModifiers(){
		return new SpellModifiers();
	}

	@Override
	public void setContinuousSpell(Spell spell) {
		this.dataManager.set(CONTINU


klebriger Teer",
		[19069] = "Malkors Schädel",
		[5809] = "Steilhanggiftbeutel",
		[5825] = "Treshalas Anhänger",
		[5841] = "Sengendes Herz",
		[18335] = "Makelloser schwarzer Diamant",
		[1528] = "Hand voll Hafer",
		[5101] = "Ishamuhales Fangzahn",
		[2728] = "Die Grünen Hügel des Schlingendorntals - Seite 4",
		[3855] = "Massive Eisenaxt",
		[2006] = "Die zweite Trolllegende",
		[19709] = "Gelbes Schmuckstück der Hakkari",
		[7268] = "Wasserprobe von Xavian",
		[12622] = "Splitterzahnfleisch",
		[10467] = "Händlerranzen",
		[12060] = "Shindrells Notiz",
		[3017] = "Sevrens Befehle",
		[11752] = "Schwarzes Blut der Gequälten",
		[6065] = "Khadgars Abhandlungen über dimensionale Konvergenz",
		[6081] = "Morastlordfungus",
		[12192] = "Schließkassette der Nebelschleier",
		[2639] = "Merrins Brief",
		[12435] = "E'ko eines Eisdistelyetis",
		[6145] = "Clarice' Anhänger",
		[3081] = "Netheredelstein",
		[20605] = "Faule Eier",
		[6193] = "Artefaktbündel der Atal'ai",
		[6479] = "Malems Anhänger",
		[16702] = "Gürtel der Furcht",
		[20861] = "Bronzeskarabäus",
		[6257] = "Muskelmagen eines Roc",
		[10466] = "Steinkreis der Atal'ai",
		[9738] = "Edelstein von Kobrahn",
		[4893] = "Savannenlöwenhauer",
		[8545] = "Schwerer Magiestoffverband",
		[21245] = "Taktischer Einsatz I",
		[8932] = "Alteraclochkäse",
		[12736] = "Frostraunens Balsamierungsflüssigkeit",
		[12768] = "Geheimnotiz Nr.3",
		[12800] = "Azerothischer Diamant",
		[4265] = "Schweres Rüstungsset",
		[13327] = "Eisblauer Roboschreiter Mod. A",
		[12896] = "Erstes Reliktfragment",
		[17662] = "Gestohlene Leckereien",
		[9579] = "Besudeltes Pergament",
		[23184] = "Flamme von Darnassus",
		[3257] = "Seekrabblermoos",
		[3265] = "Aasfressertatze",
		[2868] = "Gemusterte bronzene Armschienen",
		[20939] = "Logistikeinsatz II",
		[5868] = "Gefüllte geätzte Phiole",
		[3297] = "Teufelsmoos",
		[12330] = "Horn des roten Wolfs",
		[9153] = "Maschinenblaupausen",
		[12336] = "Edelstein der Felsspitzoger",
		[22525] = "Teile einer Gruftbestie",
		[3337] = "Kriegsflagge des Drachenmals",
		[19608] = "Vision von Voodress",
		[18622] = "Reine Teufelsessenz (Ja


ect(cursor_start, cursor_end);
	}
}

void KforthDialog::DDX_machine_registers(CDataExchange* pDX)
{
	char buf[1000];
	CString str;

	sprintf(buf, "%I64d", kfm->R[0]);
	str = buf;
	DDX_Text(pDX, IDC_KI_R0, str);

	sprintf(buf, "%I64d", kfm->R[1]);
	str = buf;
	DDX_Text(pDX, IDC_KI_R1, str);

	sprintf(buf, "%I64d", kfm->R[2]);
	str = buf;
	DDX_Text(pDX, IDC_KI_R2, str);

	sprintf(buf, "%I64d", kfm->R[3]);
	str = buf;
	DDX_Text(pDX, IDC_KI_R3, str);

	sprintf(buf, "%I64d", kfm->R[4]);
	str = buf;
	DDX_Text(pDX, IDC_KI_R4, str);

	sprintf(buf, "%I64d", kfm->R[5]);
	str = buf;
	DDX_Text(pDX, IDC_KI_R5, str);

	sprintf(buf, "%I64d", kfm->R[6]);
	str = buf;
	DDX_Text(pDX, IDC_KI_R6, str);

	sprintf(buf, "%I64d", kfm->R[7]);
	str = buf;
	DDX_Text(pDX, IDC_KI_R7, str);

	sprintf(buf, "%I64d", kfm->R[8]);
	str = buf;
	DDX_Text(pDX, IDC_KI_R8, str);

	sprintf(buf, "%I64d", kfm->R[9]);
	str = buf;
	DDX_Text(pDX, IDC_KI_R9, str);

	if( kfm->terminated ) {
		str = "TERMINATED";
		DDX_Text(pDX, IDC_KI_PC, str);
		DDX_Text(pDX, IDC_KI_CB, str);
	} else {
		sprintf(buf, "%d", kfm->pc);
		str = buf;
		DDX_Text(pDX, IDC_KI_PC, str);

		sprintf(buf, "%d", kfm->cb);
		str = buf;
		DDX_Text(pDX, IDC_KI_CB, str);
	}
}

void KforthDialog::DDX_data_stack(CDataExchange* pDX)
{
	KFORTH_STACK_NODE *curr;
	int i;
	CString str;
	char buf[1000];

	CListBox *pLB = (CListBox*) GetDlgItem(IDC_KI_DATA_STACK);

	pLB->ResetContent();

	i = 0;
	for(curr=kfm->data_sp; curr; curr=curr->prev) {
		sprintf(buf, "%I64d", curr->u.data.value);

		str = buf;

		pLB->InsertString(i, str);

		i++;
	}
}

void KforthDialog::DDX_call_stack(CDataExchange* pDX)
{
	KFORTH_STACK_NODE *curr;
	int i;
	CString str;
	char buf[1000];

	CListBox *pLB = (CListBox*) GetDlgItem(IDC_KI_CALL_STACK);

	pLB->ResetContent();

	i = 0;
	for(curr=kfm->call_sp; curr; curr=curr->prev) {
		sprintf(buf, "cb=%d pc=%d",
			 curr->u.call.cb,
			 curr->u.call.pc);

		str = buf;

		pLB->InsertString(i, str);

		i++;
	}
}

void KforthDialog::DoDataExchange(CDataExchange* pDX)
{
	CEdit *pED;
	BOOL flag;


4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[102, 15, 56, 3, 224], OperandSize::Qword)
}

fn phaddsw_8() {
    run_test(&Instruction { mnemonic: Mnemonic::PHADDSW, operand1: Some(Direct(XMM2)), operand2: Some(IndirectDisplaced(RAX, 1490875986, Some(OperandSize::Xmmword), None)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[102, 15, 56, 3, 144, 82, 246, 220, 88], OperandSize::Qword)
}

use mmrbi::*;

use std::env::Args;

fn main() {
    let mut args = std::env::args();
    let _exe = args.next();
    let cmd = args.next().unwrap_or_else(|| fatal!("expected subcommand for xtask"));
    match &*cmd {
        "b" | "build"   => build(args),
        "c" | "check"   => check(args),
        "clean"         => clean(args),
        "d" | "doc"     => doc(args),
        "r" | "run"     => run(args),
        "i" | "install" => install(args),
        other           => fatal!("unrecognized subcommand `{}`", other),
    }
}

fn build(args: Args) {
    pre_build();

    let mut args = args.peekable();
    if args.peek().is_some() {
        let mut cmd = Command::new("cargo");
        cmd.arg("build");
        cmd.args(args);
        status!("Running", "{}", cmd);
        std::process::exit(cmd.status().ok().and_then(|s| s.code()).unwrap_or(1));
    } else {
       // common
       exec("cargo fetch");
       exec("cargo fetch --manifest-path examples/Cargo.toml");

       // debug
       exec("cargo build --frozen --workspace --all-targets");
       exec("cargo test  --frozen --workspace --all-targets");
       exec("cargo run -p cargo-html -- html --manifest-path examples/Cargo.toml");

       // release
       exec("cargo build --frozen --workspace --all-targets --release");
       exec("cargo test  --frozen --workspace --all-targets --release");
    }
}

fn doc(args: Args) {
    pre_build();
    let mut cmd = Command::new("cargo");
    if has_nightly() { cmd.arg("+nightly"); }
    cmd.arg("doc");
    cmd.args(args);
    status!("Running", "{}", cmd);
    cmd.status0().unwrap_or_else(|err| fatal!("{:?} failed: {}", cmd, err));
}

fn check(_args: Args) {
    pre_build();
    exec("cargo check --workspace --all-targets");
}

fn clean(_args: Args) {
    exec("cargo clean");
    exec("cargo clean --manifest-path examples/Cargo.toml");
    // we can't clean ourselves while running, so spawn an extra term
    exec("cmd /C start \"cargo clean xtask\" /MIN cmd /C \"ping localhost -n 2 >NUL 2>NUL && cargo clean --manifest-path xtask/Cargo.toml\"");
}

fn run(args: Args) {
    pre_build();
    let mut cmd = Command::new("cargo");
    cmd.arg("run").args(args);
    status!("Running", "{}", cmd);
    std::process::exit(cmd.status().ok().and_then(|s| s.code()).unwrap_or(1));


处理样式文件，可以通过 `modifyStylesOptions` 方式修改插件的配置。

```js
import PostcssPluginRpxToVw from 'postcss-plugin-rpx2vw';

const plugin = (api) => {
  const { onGetConfig } = api;
  onGetConfig('bundle-es5', (config) => {
    config.modifyStylesOptions ??= [];
    config.modifyStylesOptions.push((stylesOptions) => {
      stylesOptions.plugins ||= [];
      (stylesOptions.plugins).push(PostcssPluginRpxToVw());
      return stylesOptions;
    })
    return config;
  });
};
```

#### extensions

> 仅对 Bundle 模式生效

+ 类型 `string[]`
+ 默认值：`['.mjs', '.js', '.json', '.node', '.jsx', '.ts', '.tsx', '.mts', '.cjs', '.cts']`

配置解析的文件后缀名，这样在引入模块时不需要带后缀名，配置后会与默认值合并。

```js
const plugin = (api) => {
  const { onGetConfig } = api;
  onGetConfig('bundle-es5', (config) => {
    config.extensions = ['.xtpl'];
    return config;
  });
};
```

#### name

> 仅对 Bundle 模式生效

+ 类型：`string`
+ 默认值：`package.name`

Bundle 导出名称。一般用于 umd 产物中通过 `window[name]` 拿到产物模块内容。

```js
const plugin = (api) => {
  const { onGetConfig } = api;
  onGetConfig('bundle-es5', (config) => {
    config.name = "ICEPKG";
    return config;
  });
};
```

#### modes

> 仅对 Bundle 模式生效

+ 类型：`Array<'development' | 'production' | string>`
+ 默认值：`['production']`

指定输出的产物是否经过压缩。默认情况下输出的产物是压缩过的（也就是开启了 `production`）。

```js
const plugin = (api) => {
  const { onGetConfig } = api;
  onGetConfig('bundle-es5', (config) => {
    // 同时生成一份未压缩的产物和一份压缩产物
    config.modes = ['development', 'production'];
    return config;
  });
};
```

#### externals

> 仅对 Bundle 模式生效

+ 类型：`boolean | Record<string, string>`
+ 默认值：`{}`

设置哪些模块不打包，转而通过 `<script>` 或其他方式引入。

```js
const plugin = (api) => {
  const { onGetConfig } = api;
  onGetConfig('bundle-es5', (config) => {
    return {
      ...config,
      externals: {
        react: 'React',
        'react-dom': 'ReactDOM',
      },
    };
  });
};
```
#### minify

> 仅对 Bundle 模式生效

+ 类型：`boolean`
+ 默认值：start 阶段为 `false`，build 阶段为 `true`

是否压缩 JS 和 CSS 产物。

```js
const plugin = (api) => {
  const { onGetConfig } = api;
  onGetConfig('bundle-es5', (config) => {
    return {
      ...config,
      minify: false,
    };
  });
};
```

#### development（已废弃，请使用 modes）

> 仅对 Bundle 模式生效

+ 类型：`boolean`
+ 默认值：`fal


// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
// Implementation of _CONTEXT_CaptureContext for the ARM platform.
// This function is processor dependent.  It is used by exception handling,
// and is always apply to the current thread.
//

#include "unixasmmacros.inc"
#include "asmconstants.h"

// Incoming:
//  x0: Context*
//
LEAF_ENTRY CONTEXT_CaptureContext, _TEXT
    PROLOG_STACK_ALLOC 32
    .cfi_adjust_cfa_offset 32

    // save x1, x2 and x3 on stack so we can use them as scratch
    stp x1, x2, [sp]
    str x3, [sp, 16]
    // save the current flags on the stack
    mrs x1, nzcv
    str x1, [sp, 24]

    ldr w1, [x0, CONTEXT_ContextFlags]
    // clangs assembler doesn't seem to support the mov Wx, imm32 yet
    movz w2, #0x40, lsl #16
    movk w2, #0x1
    mov w3, w2
    and w2, w1, w2
    cmp w2, w3
    b.ne LOCAL_LABEL(Done_CONTEXT_CONTROL)

    // save the cpsr
    ldr x2, [sp, 24]
    str w2, [x0, CONTEXT_Cpsr]
    stp fp, lr, [x0, CONTEXT_Fp]
    add x2, sp, #32
    stp x2, lr, [x0, CONTEXT_Sp]

LOCAL_LABEL(Done_CONTEXT_CONTROL):
    // we dont clobber x1 in the CONTEXT_CONTROL case
    // ldr w1, [x0, CONTEXT_ContextFlags]
    // clangs assembler doesn't seem to support the mov Wx, imm32 yet
    movz w2, #0x40, lsl #16
    movk w2, #0x2
    mov w3, w2
    and w2, w1, w2
    cmp w2, w3
    b.ne LOCAL_LABEL(Done_CONTEXT_INTEGER)

    ldp x1, x2,   [sp]
    ldr x3,       [sp, 16]

    stp x0, x1,   [x0, CONTEXT_X0]
    stp x2, x3,   [x0, CONTEXT_X2]
    stp x4, x5,   [x0, CONTEXT_X4]
    stp x6, x7,   [x0, CONTEXT_X6]
    stp x8, x9,   [x0, CONTEXT_X8]
    stp x10, x11, [x0, CONTEXT_X10]
    stp x12, x13, [x0, CONTEXT_X12]
    stp x14, x15, [x0, CONTEXT_X14]
    stp x16, x17, [x0, CONTEXT_X16]
    stp x18, x19, [x0, CONTEXT_X18]
    stp x20, x21, [x0, CONTEXT_X20]
    stp x22, x23, [x0, CONTEXT_X22]
    stp x24, x25, [x0, CONTEXT_X24]
    stp x26, x27, [x0, CONTEXT_X26]
    str x28,      [x0, CONTEXT_X28]

LOCAL_LABEL(Done_CONTEXT_INTEGER):
    ldr w1, [x0, CONTEXT_ContextFlags]
    // clangs assembler doesn't seem to support the mov Wx, imm32 yet
    movz w2, #0x40, lsl #16
    movk w2, #0x4
    mov w3, w2
    and w2, w1, w2
    cmp w2, w3


ers.current!);
        }

        final maxScreenHeight = (0.6 * MediaQuery.of(context).size.height).ceil();
        final maxSnapPoint = min(
          maxScreenHeight,
          bottomSheetSnapPoint(
            registeredServers.current!.length,
            SERVER_ITEM_HEIGHT,
            bottom,
          ) +
              TITLE_HEIGHT +
              BUTTON_HEIGHT +
              (registeredServers.current!
                      .where((s) => s.lastActiveAt != null)
                      .length *
                  PUSH_ALERT_TEXT_HEIGHT),
        );

        final snapPoints = [
          1,
          maxSnapPoint,
        ];
        if (maxSnapPoint == maxScreenHeight) {
          snapPoints.add('80%');
        }

        bottomSheet(
          context: context,
          closeButtonId: 'close-your-servers',
          renderContent: renderContent,
          footerComponent: AddServerButton(),
          snapPoints: snapPoints,
          theme: theme,
          title: intl.formatMessage(id: 'your.servers', defaultMessage: 'Your servers'),
        );
      }
    }

    useEffect(() {
      final subscription = subscribeAllServers(serversObserver);

      return () {
        subscription?.cancel();
        subscriptions.values.forEach((unreads) => unreads.subscription?.cancel());
        subscriptions.clear();
      };
    }, []);

    return ServerIcon(
      hasUnreads: total.value.unread,
      mentionCount: total.value.mentions,
      onPress: onPress,
      style: styles.icon,
      testID: 'channel_list.servers.server_icon',
      badgeBorderColor: theme.sidebarBg,
      badgeBackgroundColor: theme.mentionBg,
      badgeColor: theme.mentionColor,
    );
  }
}

const styles = {
  'icon': {
    'alignItems': 'center',
    'justifyContent': 'center',
    'position': 'absolute',
    'zIndex': 10,
    'top': 10,
    'left': 16,
    'width': 40.0,
    'height': 40.0,
  },
};
// Converted Dart code from React Native TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:mattermost_flutter/types/theme.dart';

class SvgComponent extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final theme = useTheme(context);

    return SvgPicture.string(
      '''
      <svg width="140" height="140" viewBox="0 0 140 140" fill="none" xmlns="http://www.w3.org/2000/svg">
        <ellipse cx="70" cy="114" rx="45" ry="3" fill="#000" fill-opacity="0.08"/>
        <path d="M107.838 26.436h-75.65a10.577 10.577 0 00-7.475 3.06 10.533 10.533 0 00-3.117 7.44v47.977a10.516 10.516 0 003.117 7.44 10.56 10.56 0 007.475 3.06h11.165v17.959l16.746-17.96h47.712a10.576 10.576 0 007.476-3.06 10.52 10.52 0 003.117-7.439V36.937a10.521 10.521 0 00-3.108-7.43 10.567 10.567 0 00-7.458-3.07z" fill="#FFBC1F"/>
        <path d="M60.1 95.413h47.711a10.576 10.576 0 007.476-3.06 10.52 10.52 0 003.117-7.439V55.785s-3.331 26.935-3.93 29.306c-.598 2.37-1.786 5.918-7.413 6.506-5.627.588-46.962 3.815-46.962 3.815z" fill="#CC8F00"/>
        <path d="M29.447 46.526


he without looking forced or inauthentic",
            relatable: "Create relatable content ideas using 'When you...', 'That feeling when...', 'Nobody talks about...' formats that my audience will connect with",
            transformation: "Help me plan before/after or transformation content that showcases dramatic results or changes in my field"
        };

        document.getElementById('messageInput').value = templates[template];
        document.getElementById('messageInput').focus();
    }

    function useTrend(trend) {
        const trends = {
            dance: "How can I create a dance challenge or participate in #DanceChallenge2024 while incorporating my niche? Give me creative variations that will stand out.",
            cooking: "Generate #QuickRecipes content ideas that are visually appealing, easy to follow, and likely to go viral. Include unique twists or presentation styles.",
            motivation: "Create motivational content for #MorningMotivation that's authentic, actionable, and resonates with my target audience. Include powerful quotes and practical tips.",
            fashion: "#OutfitTransition trends - help me create outfit transformation videos that showcase style evolution, seasonal changes, or event-specific looks."
        };

        addMessage(trends[trend], 'user');
        sendMessage();
    }

    // Tool functions
    function runTool(tool) {
        const tools = {
            hashtags: () => {
                addMessage('🏷 Generating optimal hashtag strategy: Mix 3-5 trending hashtags (high competition), 5-8 niche hashtags (medium competition), and 2-3 branded hashtags (low competition). Current recommendations: #fyp #viral #trending + your niche-specific tags', 'ai', {
                    strategy: 'Balanced hashtag mix for maximum reach',
                    tactics: '30% trending, 60% niche, 10% branded hashtags',
                    timing: 'Update hashtag sets every 2-3 days based on performance'
                });
            },
            captions: () => {
                addMessage('✍ Caption optimization tips: Start with a hook question, use line breaks for readability, include a clear CTA, add relevant emojis, keep it conversational. Length: 100-150 characters for TikTok, 125-150 for Instagram Reels.', 'ai', {
                    strategy: 'Engagement-focused caption structure',
                    tactics: 'Hook + Value + CTA + Hashtags format',
                    timing: 'Test different caption styles weekly'
                });
            },
            timing: () => {
                const timingData = getPlatformTiming(currentPlatform);
                addMessage(`⏰ Optimal posting times for ${currentPlatform}: ${timingData}. Also consider your audience timezone, post consistently, and analyze your personal analytics for the best performing times.`, 'ai', {
                    strategy: `${currentPlatform} timing optimization`,
                    tactics: 'Consistent posting schedule with peak time focus',
                    timing: 'Track performance and adjust based on analytics'
                });
            },
            audio: () => {
                addMessage('🎵 Trending audio strategy: Use audio that\'s 1-3 days old for maximum reach, check trending sounds daily, save audio from viral videos in your niche, create original audio for brand building. Current hot genres: upbeat pop, nostalgic hits, comedy sounds.', 'ai', {
                    strategy: 'Strategic audio selection for virality',
                    tactics: 'Mix trending and original audio content',
                    timing: 'Check trending audio 2x daily for opportunities'
                });
            },
            engagement: () => {
                addMessage('💬 Boost engagement: Respond to comments within first hour, ask questions in captions, create content that encourages saves/shares, use trending audio, post at peak times, collaborate with others in your niche.', 'ai', {
                    strategy: 'Multi-faceted engagement optimization',
                    tactics: 'Quick response + interactive content + collaborations',
                    timing: 'Active community management in first 2 hours after posting'


NT("entity.tropical_fish.ambient"),
    ENTITY_TROPICAL_FISH_DEATH("entity.tropical_fish.death"),
    ENTITY_TROPICAL_FISH_FLOP("entity.tropical_fish.flop"),
    ENTITY_TROPICAL_FISH_HURT("entity.tropical_fish.hurt"),
    ENTITY_TURTLE_AMBIENT_LAND("entity.turtle.ambient_land"),
    ENTITY_TURTLE_DEATH("entity.turtle.death"),
    ENTITY_TURTLE_DEATH_BABY("entity.turtle.death_baby"),
    ENTITY_TURTLE_EGG_BREAK("entity.turtle.egg_break"),
    ENTITY_TURTLE_EGG_CRACK("entity.turtle.egg_crack"),
    ENTITY_TURTLE_EGG_HATCH("entity.turtle.egg_hatch"),
    ENTITY_TURTLE_HURT("entity.turtle.hurt"),
    ENTITY_TURTLE_HURT_BABY("entity.turtle.hurt_baby"),
    ENTITY_TURTLE_LAY_EGG("entity.turtle.lay_egg"),
    ENTITY_TURTLE_SHAMBLE("entity.turtle.shamble"),
    ENTITY_TURTLE_SHAMBLE_BABY("entity.turtle.shamble_baby"),
    ENTITY_TURTLE_SWIM("entity.turtle.swim"),
    ENTITY_VEX_AMBIENT("entity.vex.ambient"),
    ENTITY_VEX_CHARGE("entity.vex.charge"),
    ENTITY_VEX_DEATH("entity.vex.death"),
    ENTITY_VEX_HURT("entity.vex.hurt"),
    ENTITY_VILLAGER_AMBIENT("entity.villager.ambient"),
    ENTITY_VILLAGER_CELEBRATE("entity.villager.celebrate"),
    ENTITY_VILLAGER_DEATH("entity.villager.death"),
    ENTITY_VILLAGER_HURT("entity.villager.hurt"),
    ENTITY_VILLAGER_NO("entity.villager.no"),
    ENTITY_VILLAGER_TRADE("entity.villager.trade"),
    ENTITY_VILLAGER_WORK_ARMORER("entity.villager.work_armorer"),
    ENTITY_VILLAGER_WORK_BUTCHER("entity.villager.work_butcher"),
    ENTITY_VILLAGER_WORK_CARTOGRAPHER("entity.villager.work_cartographer"),
    ENTITY_VILLAGER_WORK_CLERIC("entity.villager.work_cleric"),
    ENTITY_VILLAGER_WORK_FARMER("entity.villager.work_farmer"),
    ENTITY_VILLAGER_WORK_FISHERMAN("entity.villager.work_fisherman"),
    ENTITY_VILLAGER_WORK_FLETCHER("entity.villager.work_fletcher"),
    ENTITY_VILLAGER_WORK_LEATHERWORKER("entity.villager.work_leatherworker"),
    ENTITY_VILLAGER_WORK_LIBRARIAN("entity.villager.work_librarian"),
    ENTITY_VILLAGER_WORK_MASON("entity.villager.work_mason"),
    ENTITY_VILLAGER_WORK_SHEPHERD("entity.villager.work_shepherd"),
    ENTITY_VILLAGER_WORK_TOOLSMITH("entity.villager.work_toolsmith"),
    ENTITY_VILLAGER_WORK_WEAPONSMITH("entity.villager.work_weaponsmith"),
    ENTITY_VILLAGER_YES("entity.villager.yes"),
    ENTITY_VINDICATOR_AMBIENT("entity.vindicator.ambient"),
    ENTITY_VINDICATOR_CELEBR


erShares := balancerPool.GetTotalShares()
	// check balancer pool liquidity using the bank module
	balancerBalances := s.App.BankKeeper.GetAllBalances(ctx, balancerPool.GetAddress())

	// test migrating the balancer pool to a stable pool
	v15.MigrateBalancerPoolToSolidlyStable(ctx, gammKeeper, s.App.BankKeeper, poolID)

	// check that the pool is now a stable pool
	stablepool, err := gammKeeper.GetCFMMPool(ctx, poolID)
	s.Require().NoError(err)
	s.Require().Equal(stablepool.GetType(), poolmanagertypes.Stableswap)

	// check that the number of stableswap LP shares is the same as the number of balancer LP shares
	s.Require().Equal(balancerShares.String(), stablepool.GetTotalShares().String())
	// check that the pool liquidity is the same
	stableLiquidity, err := gammKeeper.GetTotalPoolLiquidity(s.Ctx, balancerPool.GetId())
	s.Require().NoError(err)
	s.Require().Equal(balancerLiquidity.String(), stableLiquidity.String())
	// check pool liquidity using the bank module
	stableBalances := s.App.BankKeeper.GetAllBalances(ctx, stablepool.GetAddress())
	s.Require().Equal(balancerBalances, stableBalances)

	// exit the pool
	exitCoins, err := s.App.GAMMKeeper.ExitPool(s.Ctx, testAccount, poolID, sharesOut, sdk.NewCoins())
	s.Require().NoError(err)

	s.validateCons(exitCoins, tokenIn)

	// join again
	tokenInStable, _, err := s.App.GAMMKeeper.JoinPoolNoSwap(s.Ctx, testAccount, poolID, shareOutAmount, tokenInMaxs)
	s.Require().NoError(err)

	s.validateCons(tokenInStable, tokenIn)
}

func (s *UpgradeTestSuite) TestRegisterOsmoIonMetadata() {
	s.SetupTest() // reset

	expectedUosmodenom := appparams.BaseCoinUnit
	expectedUiondenom := "uion"

	ctx := s.Ctx
	bankKeeper := s.App.BankKeeper

	// meta data should not be found pre-registration of meta data
	_, found := s.App.BankKeeper.GetDenomMetaData(ctx, appparams.BaseCoinUnit)
	s.Require().False(found)

	_, found = s.App.BankKeeper.GetDenomMetaData(ctx, "uion")
	s.Require().False(found)

	// system under test.
	v15.RegisterOsmoIonMetadata(ctx, bankKeeper)

	uosmoMetadata, found := s.App.BankKeeper.GetDenomMetaData(ctx, appparams.BaseCoinUnit)
	s.Require().True(found)

	uionMetadata, found := s.App.BankKeeper.GetDenomMetaData(ctx, "uion")
	s.Require().True(found)

	s.Require().Equal(expectedUosmodenom, uosmoMetadata.Base)
	s.Require().Equal(expectedUiondenom, uionMetadata.Base)
}

func (s *UpgradeTestSuite) TestSetICQParams() {
	s.SetupTest() // reset

	// system under test.
	v15.SetICQParams(s.Ctx, s.App.ICQKeeper)

	s.Require().True(s.App.ICQKeeper.IsHostEnabled(s.Ctx))
	// commented out for historical reasons since v15 upgrade is now over.
	// s.Require().Len(s.App.ICQKeeper.GetAllowQueries(s.Ctx), 65)
}

func (s *UpgradeTestSuite) TestSetRateLimits() {
	s.SetupTest() // reset
	accountKeeper := s.App.Account


，龙门贸易组马世禄、五山贸易组黄秋香，硕龙营业所卢宗相，桃城中山街朱宣等7人。被逼死的有梁桂义等23人。1983年，在处理“文革”遗留问题中对上述案件进行了复查，对那些被乱批乱斗和被逼死的人，在政治上给予平反，恢复名誉；经济上，对不属于贪污盗窃的，一律给予赔退。如财贸系统原定贪污盗窃62起，金额52887元，复查后，退款11309元，占总数的20.3％。（《大新县志》第三卷“文革”700页）。

   1971年

   召开大新县第四届党代会

   1971年4月19日至24日，在县城召开“中国共产党大新县第四届代表大会”，出席这次大会的代表有485名。22日下午，大会举行投票选举产生中共大新县第四届委员会，选举结果：阎凤奎等27名当选为委员，许有坤等3名为候补委员。23日、24日，召开中共大新县委员会第四届第一次会议，全体委员通过，由阎凤奎、陆有文、黄友德、黎应元、尹天辉、程远锡、黄金焕、李安、吴恩孝、李茂英等10人组成中共大新县常务委员会。阎凤奎任书记，陆有文、黄友德任副书记。（县委永久第65卷）。

   批陈整风运动

   6月11日至25日，县委开办批陈整风学习班。县委和县革委的领导成员、公社党委书记和革委主任、大队党支书、生产队指导员等348人参加。主要学习毛主席《我的一点意见》和有关陈伯达反党反社会主义的材料。批判陈伯达企图篡党夺权，乱军夺权，复辟资本主义的罪恶阴谋，提高阶级斗争和路线斗争的觉悟。学习班结束后，在全县范围内，以毛主席《我的一点意见》为武器，批判和清算陈伯达一贯反党反社会主义、反马列主义、毛泽东思想、破坏无产阶级专政等的滔天罪行


cbr/\u003e$Db.dty()\"]\n        RD[\"Record Data\u003cbr/\u003eHRecordSet\"]\n    end\n    \n    MR --\u003e HE\n    HE --\u003e EI\n    EI --\u003e FT\n    HE --\u003e FG\n    HE --\u003e VL\n    EI --\u003e DV\n    \n    HE --\u003e RS\n    EI --\u003e DT\n    MR --\u003e RD\n```\n\nSources: [hclient/widgets/editing/editing_input.js:48-396](), [hclient/widgets/entity/manageRecords.js:41-119](), [hclient/widgets/editing/editing2.js:1-57]()\n\n## Form Widget System\n\nThe `editing_input` widget is the fundamental building block of the record editing system. Each field in a record form is rendered using this widget, which adapts its behavior based on the field type and configuration.\n\n### editing_input Widget Configuration\n\n```mermaid\ngraph LR\n    subgraph \"Widget Options\"\n        DI[\"dtID\u003cbr/\u003efield identifier\"]\n        RTI[\"rectypeID\u003cbr/\u003erecord type\"]\n        DF[\"dtFields\u003cbr/\u003efield configuration\"]\n        VL[\"values\u003cbr/\u003ecurrent data\"]\n    end\n    \n    subgraph \"Widget State\"\n        DT[\"detailType\u003cbr/\u003eeffective field type\"]\n        CM[\"configMode\u003cbr/\u003efield settings\"]\n        NV[\"newvalues\u003cbr/\u003ecomplex type values\"]\n        RO[\"readonly\u003cbr/\u003eedit state\"]\n    end\n    \n    subgraph \"Rendered Components\"\n        HD[\"header\u003cbr/\u003efield label\"]\n        IC[\"input_cell\u003cbr/\u003einput container\"]\n        BA[\"btn_add\u003cbr/\u003erepeat button\"]\n        EM[\"error_message\u003cbr/\u003evalidation errors\"]\n    end\n    \n    DI --\u003e DT\n    RTI --\u003e DF\n    DF --\u003e CM\n    VL --\u003e NV\n    \n    DT --\u003e HD\n    CM --\u003e IC\n    DF --\u003e BA\n    VL --\u003e EM\n```\n\nThe widget initialization process loads field definitions from the database structure and creates appropriate input controls:\n\n```javascript\n// Key initialization from editing_input.js\n_create: function() {\n    if(this.options.dtFields==null \u0026\u0026 this.options.dtID\u003e0 \u0026\u0026 this.options.rectypeID\u003e0) {\n        this.options.dtFields = window.hWin.HEURIST4.util.cloneJSON($Db.rst(this.options.rectypeID, this.options.dtID));\n    }\n    \n    this.detailType = this.options.detailtype ? this.options.detailtype : this.f('dty_Type');\n    this.configMode = this.f('rst_FieldConfig');\n}\n```\n\nSources: [hclient/widgets/editing/editing_input.js:396-481](), [hclient/widgets/editing/editing_input.js:48-228]()\n\n## Field Types and Data Handling\n\nThe editing system supports multiple field types, each with specialized input controls and validation logic. The system maps database field type definitions to appropriate UI widgets.\n\n### Field Type Mapping\n\n| Field Type | Widget | Description |\n|------------|--------|-------------|\n| `freetext` | Text input | Single-line text


  test("empty", () => {
    const result = new Balance();

    expect(result instanceof Balance).toBeTruthy();
    expect(result).toMatchObject({
      address: "",
      net: "NoNet",
      assetSymbols: [],
      tokenSymbols: [],
      assets: {},
      tokens: {},
    });
  });

  test("BalanceLike", () => {
    const testObject = {
      address: "address",
      net: "UnitTestNet",
      assetSymbols: ["ASS"],
      tokenSymbols: ["TOK"],
      assets: {
        ASS: {} as AssetBalanceLike,
      },
      tokens: { TOK: 1 },
    } as BalanceLike;

    const result = new Balance(testObject);
    expect(result instanceof Balance).toBeTruthy();
    expect(result.address).toBe(testObject.address);
    expect(result.net).toBe(testObject.net);
    expect(result.assetSymbols).toEqual(testObject.assetSymbols);
    expect(result.tokenSymbols).toEqual(testObject.tokenSymbols);
    expect(Object.keys(result.tokens)).toEqual(Object.keys(testObject.tokens));
    expect(Object.keys(result.assets)).toEqual(Object.keys(testObject.assets));
    expect(result.assets.ASS instanceof AssetBalance).toBeTruthy();
  });

  test("Balance", () => {
    const testObject = new Balance({
      address: "address",
      net: "UnitTestNet",
      assetSymbols: ["ASS"],
      tokenSymbols: ["TOK"],
      assets: {
        ASS: {
          balance: 1,
          unspent: [{ index: 0, txid: "coin1", value: 1 }],
        } as Partial<AssetBalanceLike>,
      },
      tokens: { TOK: 1 },
    });

    const result = new Balance(testObject);
    expect(result).not.toBe(testObject);
    expect(result.assets).not.toBe(testObject.assets);
    expect(result.tokens).not.toBe(testObject.tokens);
  });
});

describe("export", () => {
  test("export to BalanceLike", () => {
    const expected = {
      address: "address",
      net: "UnitTestNet",
      assetSymbols: ["ASS"],
      tokenSymbols: ["TOK"],
      assets: {
        ASS: {
          balance: 1,
          unspent: [{ index: 0, txid: "a", value: 1 }],
          spent: [],
          unconfirmed: [],
        } as AssetBalanceLike,
      },
      tokens: { TOK: 1 },
    };

    const balanceObj = new Balance(expected);
    const result = balanceObj.export();
    expect(result).toEqual(expected);
  });
});
/**
 * @Author: Leopold Kamp <develop@leopold-kamp.de>
 * @Date: 2020-01-19 14:16:41
 */
import * as _ from 'lodash'
import {
  IMappingConfig,
  EMappingType,
  IMappingConfigItem
} from './IMappingConfig'

export abstract class AbstractModel {

  public static fromApi (Type: any, data: any) {
    const c = new Type()
    c.fill(data)
    return c
  }

  public static toApiArray (models: AbstractModel[] | any[], toSnakeCase = false) {
    const array: any[] = []
    _.forEach(models, (model) => {
      if (_.isArray(model)) {
        model = this.toApiArray(model, toSnakeCase)
      } else if (_.isObject(model)) {
        model = this.toApi(model, toSnakeCase)
      }
      array.push(model)
    })
    return array
  }

  public static toApi (model: AbstractModel | any, toSn


 encoding: [0xc4,0xe2,0x7e,0x72,0x14,0x6d,0x00,0xfc,0xff,0xff]
               {vex} vcvtneps2bf16 xmm2, ymmword ptr [2*rbp - 1024]

// CHECK:      {vex} vcvtneps2bf16 xmm2, ymmword ptr [rcx + 4064]
// CHECK: encoding: [0xc4,0xe2,0x7e,0x72,0x91,0xe0,0x0f,0x00,0x00]
               {vex} vcvtneps2bf16 xmm2, ymmword ptr [rcx + 4064]

// CHECK:      {vex} vcvtneps2bf16 xmm2, ymmword ptr [rdx - 4096]
// CHECK: encoding: [0xc4,0xe2,0x7e,0x72,0x92,0x00,0xf0,0xff,0xff]
               {vex} vcvtneps2bf16 xmm2, ymmword ptr [rdx - 4096]


using System;
using System.Buffers;
using System.Collections.Generic;

namespace WaaS.Runtime
{
    /// <summary>
    ///     Represents a stack frame used to invoke an external function.
    /// </summary>
    public class ExternalStackFrame : IStackFrameCore
    {
        [ThreadStatic] private static Stack<ExternalStackFrame> pool;
        private ExecutionContext context;

        private ExternalFunction function;
        private Memory<StackValueItem> inputValues;
        private StackValueItem[] inputValuesArray;
        private bool invoked;
        private Memory<StackValueItem> outputValues;
        private StackValueItem[] outputValuesArray;

        public void Dispose(ushort version)
        {
            if (version != Version) return;
            if (inputValuesArray != default) ArrayPool<StackValueItem>.Shared.Return(inputValuesArray);

            if (outputValuesArray != default) ArrayPool<StackValueItem>.Shared.Return(outputValuesArray);

            function = default;
            inputValues = default;
            outputValues = default;
            inputValuesArray = default;
            outputValuesArray = default;
            invoked = default;
            context = default;

            if (++Version != ushort.MaxValue)
            {
                pool ??= new Stack<ExternalStackFrame>();
                pool.Push(this);
            }
        }

        public ushort Version { get; private set; }

        public int GetResultLength(ushort version)
        {
            ThrowIfOutdated(version);
            return function.Type.ResultTypes.Length;
        }

        public StackFrameState MoveNext(ushort version, Waker waker)
        {
            ThrowIfOutdated(version);
            if (invoked) throw new InvalidOperationException();
            invoked = true;
            function.Invoke(context, inputValues.Span, outputValues.Span);


i]?.contains('<key>CFBundleName</key>') ?? false) {
        var match = RegExp(r'<string>(.*?)</string>')
            .firstMatch(contentLineByLine[i + 1]!);
        return match?.group(1)?.trim();
      }
    }
    return null;
  }

  /// Fetches the bundle ID from the iOS project.pbxproj file.
  ///
  /// Returns: Future<String?>, the bundle ID if found, null otherwise.
  @override
  Future<String?> getBundleId() async {
    final filePath = iosProjectPbxprojPath;
    var contentLineByLine = await readFileAsLineByline(
      filePath: filePath,
    );
    for (var i = 0; i < contentLineByLine.length; i++) {
      if (contentLineByLine[i]?.contains('PRODUCT_BUNDLE_IDENTIFIER') ??
          false) {
        return (contentLineByLine[i] as String).split('=').last.trim();
      }
    }
    return null;
  }

  /// Sets the app name in the iOS Info.plist file.
  ///
  /// Parameters:
  /// - `appName`: The new app name to be set for the application.
  ///
  /// Returns: Future<String?>, a success message indicating the change in app name.
  @override
  Future<String?> setAppName({required String appName}) async {
    final filePath = iosInfoPlistPath;
    List? contentLineByLine = await readFileAsLineByline(
      filePath: filePath,
    );
    for (var i = 0; i < contentLineByLine.length; i++) {
      if (contentLineByLine[i].contains('<key>CFBundleName</key>')) {
        contentLineByLine[i + 1] = '\t<string>$appName</string>\r';
        break;
      }
    }

    for (var i = 0; i < contentLineByLine.length; i++) {
      if (contentLineByLine[i].contains('<key>CFBundleDisplayName</key>')) {
        contentLineByLine[i + 1] = '\t<string>$appName</string>\r';
        break;
      }
    }

    final message = await super.setAppName(appName: appName);
    var writtenFile = await writeFile(
      filePath: filePath,
      content: contentLineByLine.join('\n'),
    );
    return message;
  }

  /// Sets the bundle ID in the iOS project.pbxproj file.
  ///
  /// Parameters:
  /// - `bundleId`: The new Bundle ID to be set for the application.
  ///
  /// Returns: Future<String?>, a success message indicating the change in Bundle ID.
  @override
  Future<String?> setBundleId({required String bundleId}) async {
    final filePath = iosProjectPbxprojPath;
    List? contentLineByLine = await readFileAsLineByline(
      filePath: filePath,
    );
    for (var i = 0; i < contentLineByLine.length; i++) {
      if (contentLineByLine[i].contains('PRODUCT_BUNDLE_IDENTIFIER')) {
        contentLineByLine[i] = '				PRODUCT_BUNDLE_IDENTIFIER = $bundleId;';
      }
    }
    final message = await super.setBundleId(bundleId: bundleId);
    var writtenFile = await writeFile(
      filePath: filePath,
      content: contentLineByLine.join('\n'),
    );
    return message;
  }
}
import 'package:json_annotation/json_annotation.dart';

part 'windows_config.g.dart';

/// The flutter_launcher_icons configuration set for Windows
@JsonSerializable(
  anyMap: true,
  checked: true,
)
class WindowsConfig {
  /// Specifies weather to generate icons for web
  final bool generate;

  /// Image path for web
  @JsonKey(name: 'image_path')
  final String? imagePath;

  /// Size of the icon to generate
  @JsonKey(name: 'icon_size')
  final int? iconSize;

  /// Creates a instance of [Windows


 path entries:\n");
  for( int i = nav->npath - 4; i < nav->npath; i++ )
  {
    printf("%.3f, %.3f\n", nav->pathx[ i ], nav->pathy[ i ]);
  }
  printf("potential field neighborhood of last entry:\n");
  int xf = nav->pathx[ nav->npath-1 ];
  int yf = nav->pathy[ nav->npath-1 ];

  printf( "   " );
  for( int x = xf - 2; x <= xf + 2; x++ )
  {
    printf( " %6d", x );
  }
  printf( "\n" );

  for( int y = yf - 2; y <= yf + 2; y++ )
  {
    printf( "%5d:", y );
    for( int x = xf - 2; x <= xf + 2; x++ )
    {
      printf( " %5.1f", nav->potarr[ y * nav->nx + x ] );
    }
    printf( "\n" );
  }

  printf("gradient neighborhood of last entry:\n");
  printf( "     " );
  for( int x = xf - 2; x <= xf + 2; x++ )
  {
    printf( " %6d", x );
  }
  printf( "\n" );

  for( int y = yf - 2; y <= yf + 2; y++ )
  {
    printf( "%5d x:", y );
    for( int x = xf - 2; x <= xf + 2; x++ )
    {
      printf( " %5.1f", nav->gradx[ y * nav->nx + x ] );
    }
    printf( "\n" );

    printf( "      y:" );
    for( int x = xf - 2; x <= xf + 2; x++ )
    {
      printf( " %5.1f", nav->grady[ y * nav->nx + x ] );
    }
    printf( "\n" );
  }
}

TEST(PathCalc, oscillate_in_pinch_point)
{
  navfn::NavFn* nav = make_willow_nav();
  ASSERT_TRUE( nav != NULL );

  int goal[2];
  int start[2];

  start[0] = 428;
  start[1] = 746;

  goal[0] = 350;
  goal[1] = 450;

  nav->setGoal( goal );
  nav->setStart( start );

  bool plan_success = nav->calcNavFnDijkstra( true );
  EXPECT_TRUE( plan_success );
  if( !plan_success )
  {
    print_neighborhood_of_last_path_entry( nav );
  }
}

TEST(PathCalc, easy_nav_should_always_work)
{
  navfn::NavFn* nav = make_willow_nav();
  ASSERT_TRUE( nav != NULL );

  int goal[2];
  int start[2];

  start[0] = 350;
  start[1] = 400;

  goal[0] = 350;
  goal[1] = 450;

  nav->setGoal( goal );
  nav->setStart( start );

  EXPECT_TRUE( nav->calcNavFnDijkstra( true ));
}

int main(int argc, char **argv)
{
  testing::InitGoogleTest(&argc, argv);
  return RUN_ALL_TESTS();
}
//
// simple timing test of the nav fn planner
// expects a cost map in maps/willow-full-0.05.pgm
//

#include <navfn/navfn.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

#include <string>
#include <fstream>

#include "navwin.h"

using namespace navfn;

#ifdef __APPLE__
# include <netpbm/pgm.h>
#else
extern "C" {
#include <stdio.h>
// pgm.h is not very friendly with system headers... need to undef max() and min() afterwards
#include <pgm.h>
#undef max
#undef min
}
#endif

int goal[2];
int start[2];

double get_ms()
{
  struct timeval t0;
  gettimeofday(&t0,NULL);
  double ret = t0.tv_sec * 1000.0;
  ret += ((double)t0.tv_usec)*0.001;
  return ret;
}

NavWin *nwin;

void
dispPot(NavFn *nav)
{


 {
                GAServiceManager.Current.SendPayload(payload);
            }
        }

        public string UserAgent
        {
            get { return GAServiceManager.Current.UserAgent; }
            set { GAServiceManager.Current.UserAgent = value; }
        }

        public Tracker GetTracker(string propertyId)
        {
            propertyId = propertyId ?? string.Empty;
            if(!trackers.ContainsKey(propertyId))
            {
                var tracker = new Tracker(propertyId, PlatformTrackingInfo, this);
                trackers.Add(propertyId, tracker);
                if(DefaultTracker == null)
                {
                    DefaultTracker = tracker;
                }
                return tracker;
            }
            return trackers[propertyId];
        }

        public void CloseTracker(Tracker tracker)
        {
            trackers.Remove(tracker.TrackingId);
            if(DefaultTracker == tracker)
            {
                DefaultTracker = null;
            }
        }
    }
}


ghten things up?</p>
" data-tippy-allowHtml><svg class="icon icon-inline mr-1"><use xlink:href="/static/assets/symbols.svg#icon-book-open"></use>
<title>book-open</title>
</svg></button>

<button class="btn btn-link text-muted py-0 pl-0"><svg class="icon mr-1 icon-inline"><use xlink:href="/static/assets/symbols.svg#icon-message-square"></use>
<title>message-square</title>
</svg>32 Comments</button>

@concrete_baby@sh.itjust.works

•

www.npr.org

•

4d

Why the galactic barrier and transporters don’t match real science, and why warp drive might

<button class="btn btn-link text-muted py-0 pl-0"><svg class="icon mr-1 icon-inline"><use xlink:href="/static/assets/symbols.svg#icon-message-square"></use>
<title>message-square</title>
</svg>67 Comments</button><svg class="icon icon-inline"><use xlink:href="/static/assets/symbols.svg#icon-fedilink"></use>
<title>fedilink</title>
</svg>
<button class="btn-animate btn py-0 px-1 text-muted" data-tippy-content="55 points • 58 Upvotes • 3 Downvotes" aria-label="Upvote"><svg class="icon icon-inline small"><use xlink:href="/static/assets/symbols.svg#icon-arrow-up1"></use>
<title>arrow-up1</title>
</svg>58</button><button class="ml-2 btn-animate btn py


-- SEE plugins.noice.lua BEFORE EDITING

-- Set up terminal
vim.api.nvim_create_autocmd('TermOpen', {
  desc = 'Set formatting for built-in terminal emulator',
  group = vim.api.nvim_create_augroup('custom-term-open', { clear = true }),
  callback = function()
    vim.opt.number = false
    vim.opt.relativenumber = false
    vim.api.nvim_buf_set_keymap(0, 't', '<Esc><Esc>', '<C-\\><C-n>', { noremap = true, silent = true })
  end,
})

local state = {
  floating = {
    buf = -1,
    win = -1,
  }
}

local function create_floating_window(opts)
  opts = opts or {}

  local scale = opts.scale or 0.8

  -- Default width and height are 80% of the screen dimensions
  local width = opts.width or math.floor(vim.o.columns * scale)
  local height = opts.height or math.floor(vim.o.lines * scale)

  -- Centered position
  local row = math.floor((vim.o.lines - height) / 2)
  local col = math.floor((vim.o.columns - width) / 2)

  -- Create a buffer
  local buf = opts.buf
  if not buf or not vim.api.nvim_buf_is_valid(buf) then
    buf = vim.api.nvim_create_buf(false, true) -- No file, scratch buffer
  end

  -- Open the floating window
  local win_config = {
    relative = "editor",
    width = width,
    height = height,
    row = row,
    col = col,
    style = "minimal", -- Optionally, use "minimal" to remove window decorations
    border = "rounded",
  }

  -- Create the floating window
  local win = vim.api.nvim_open_win(buf, true, win_config)

  return { buf = buf, win = win }
end

local is_hidden = function(win)
  if not vim.api.nvim_win_is_valid(win) then
    return true -- If the window is invalid, consider it hidden or non-existent
  end

  -- Check the config for the window
  local config = vim.api.nvim_win_get_config(win)
  return config.relative == "" -- If relative config is empty then the window is hidden
end

local toggle_terminal = function()
  if not vim.api.nvim_win_is_valid(state.floating.win) then
    state.floating = create_floating_window { buf = state.floating.buf }
    if vim.bo[state.floating.buf].buftype ~= "terminal" then
      vim.cmd.termin


ck */
  BLOCK = 'block',

  /** Return after DeliverTx() */
  SYNC = 'sync',

  /** Return after CheckTx() */
  ASYNC = 'async',
}

export interface BlockTxBroadcastResult {
  height: number;
  txhash: string;
  raw_log: string;
  logs: TxLog[];
  gas_wanted: number;
  gas_used: number;
  events: Event;
  code?: number;
}

export namespace BlockTxBroadcastResult {
  export interface Data {
    height: string;
    txhash: string;
    raw_log: string;
    logs: TxLog[];
    gas_wanted: string;
    gas_used: string;
    events: Event;
    code?: number;
  }
}

export type AsyncTxBroadcastResult = Pick<
  BlockTxBroadcastResult,
  'height' | 'txhash'
>;
export namespace AsyncTxBroadcastResult {
  export type Data = Pick<BlockTxBroadcastResult.Data, 'height' | 'txhash'>;
}

export type SyncTxBroadcastResult = Pick<
  BlockTxBroadcastResult,
  'height' | 'txhash' | 'raw_log' | 'logs' | 'code'
>;
export namespace SyncTxBroadcastResult {
  export type Data = Pick<
    BlockTxBroadcastResult.Data,
    'height' | 'txhash' | 'raw_log' | 'logs' | 'code'
  >;
}

export class TxAPI extends BaseAPI {
  constructor(public lcd: LCDClient) {
    super(lcd.apiRequester);
  }

  /**
   * Looks up a transaction on the blockchain, addressed by its hash
   * @param txHash transaction's hash
   */
  public async txInfo(txHash: string): Promise<TxInfo> {
    return this.c.getRaw<TxInfo.Data>(`/txs/${txHash}`).then(TxInfo.fromData);
  }

  /**
   * Looks up transactions on the blockchain for the block height. If height is undefined,
   * gets the transactions for the latest block.
   * @param height block height
   */
  public async txInfosByHeight(height: number | undefined): Promise<TxInfo[]> {
    const blockInfo = await this.lcd.tendermint.blockInfo(height);
    const { txs } = blockInfo.block.data;
    if (!txs) {
      return [];
    } else {
      const txhashes = txs.map(txdata => hashAmino(txdata));
      return Promise.all(txhashes.map(txhash => this.txInfo(txhash)));
    }
  }

  /**
   * Estimates the transaction's fee by simulating it within the node
   * @param tx transaction for which to estimate fee
   * @param options options for fee estimation
   */
  public async estimateFee(
    tx: StdTx | StdSignMsg,
    options?: { gasPrices?: Coins.Input; gasAdjustment?: Numeric.Input }
  ): Promise<StdFee> {
    const gasPrices = options?.gasPrices || this.lcd.config.gasPrices;
    const gasAdjustment =
      options?.gasAdjustment || this.lcd.config.gasAdjustment;

    const txValue = {
      ...(tx instanceof StdSignMsg
        ? tx.toStdTx().toData().value
        : tx.toData().value),
    };

    txValue.fee.gas = '0';

    const data = {
      tx: txValue,
      gas_prices: gasPrices && new Coins(gasPrices).toData(),
      gas_adjustment: gasAdjustment && gasAdjustment.toString(),
    };

    return this.c
      .post<EstimateFeeResponse>(`/txs/estimate_fee`, data)
      .then(d => d.result)
      .then(d => new StdFee(Number.parseInt(d.gas), Coins.fromData(d.fees)));
  }

  /**
   * Encode a transaction to Amino-encoding
   * @param tx transaction to encode
   */
  public async encode(tx: StdTx): Promise<string> {


  int status;
}
class TimeStampReq {
  int ASN1;
  int encoding;
  int extensions;
  int certReq;
  int nonce;
  int reqPolicy;
  int messageImprint;
  int version;
}
class TSTInfo {
  int ASN1;
  int ACCURACY;
  int extensions;
  int tsa;
  int nonce;
  int ordering;
  int accuracy;
  int genTime;
  int serialNumber;
  int messageImprint;
  int policy;
  int version;
}
class PKIStatusInfo {
  int ASN1;
  int failInfo;
  int statusString;
  int status;
}
class PKIStatus {
  int REVOCATION_NOTIFICATION;
  int REVOCATION_WARNING;
  int WAITING;
  int REJECTION;
  int GRANTED_WITH_MODS;
  int GRANTED;
  int status;
}
class PKIFailureInfo {
  int SYSTEM_FAILURE;
  int ADD_INFO_NOT_AVAILABLE;
  int UNACCEPTED_EXTENSION;
  int UNACCEPTED_POLICY;
  int TIME_NOT_AVAILABLE;
  int BAD_DATA_FORMAT;
  int BAD_REQUEST;
  int BAD_ALG;
  int maxValue;
  int value;
}
class MessageImprint {
  int ASN1;
  int hashedMessage;
  int algId;
}
package android.webkit;
class ZoomManagerTest {
  int zoomManager;
}
class ZoomManager {
  class PostScale {
    int mInPortraitMode;
    int mInZoomOverviewBeforeSizeChange;
    int mUpdateTextWrap;
  }
  class ScaleDetectorListener {
    int mAccumulatedSpan;
  }
  class FocusMovementQueue {
    int mIndex;
    int mSize;
    int mSum;
    int mQueue;
    int QUEUE_CAPACITY;
  }
  int mInHWAcceleratedZoom;
  int mHardwareAccelerated;
  int mPinchToZoomAnimating;
  int mScaleDetector;
  int mAllowPanAndScale;
  int mSupportMultiTouch;
  int ZOOM_ANIMATION_LENGTH;
  int mZoomStart;
  int mInitialScrollY;
  int mInitialScrollX;
  int mInvFinalZoomScale;
  int mInvInitialZoomScale;
  int mZoomScale;
  int MINIMUM_SCALE_WITHOUT_JITTER;
  int MINIMUM_SCALE_INCREMENT;
  int mInitialScale;
  int mInvActualScale;
  int mActualScale;
  int MIN_DOUBLE_TAP_SCALE_INCREMENT;
  int mDoubleTapZoomFactor;
  int mDisplayDensity;
  int mInvDefaultScale;
  int mDefaultScale;
  int mTextWrapScale;
  int mAnchorY;
  int mAnchorX;
  int mFocusMovementQueue;
  int mFocusY;
  int mFocusX;
  int mZoomCenterY;
  int mZoomCenterX;
  int mInvZoomOverviewWidth;
  int mZoomOverviewWidth;
  int mInZoomOverview;
  int mInitialZoomOverview;
  int mMinZoomScaleFixed;
  int mMinZoomScale;
  int mMaxZoomScale;
  int mDefaultMinZoomScale;
  int mDefaultMaxZoomScale;
  int DEFAULT_MIN_ZOOM_SCALE_FACTOR;
  int DEFAULT_MAX_ZOOM_SCALE_FACTOR;
  int mExternalZoomControl;
  int mEmbeddedZoomControl;
  int mCallbackProxy;
  int mWebView;
  int LOGTAG;
}
class ZoomControlExternal {
  class ExtendedZoomControls {
    int mPlusMinusZoomControls;
  }
  int mWebView;
  int mPrivateHandler;
  int mZoomControlRunnable;
  int mZoomC


]];

        var polyPnts = new Array();
        polyPnts.push(point4);
        polyPnts.push(point);
        polyPnts.push(point5);
        polyPnts.push(point4);

        var linPnts = new Array();
        linPnts.push(point3);
        linPnts.push(point4);

        locPnts.push(polyPnts);
        locPnts.push(linPnts);
    }
    return locPnts;
};

/**
* Method: GetRectFlagDots
* 根据控制点数组，获取组成矩形旗帜的二维点数组
* Parameters:
* arg-{Array.<ol_coordinate>:控制点数组}
* Returns:
* locPnts-{Array.<ol_coordinate>：组成矩形旗的几何点数组}
*/
MilStd.Flag.GetRectFlagDots = function (arg) {
    MilStd.commonFun.CreateNewVertices(arg);
    var locPnts = new Array();
    var num = arg.length;
    if ((num >= 2) && (!MilStd.commonFun.geomEquals(arg[num - 1], arg[num - 2]))) {
        var point = arg[0];
        var point2 = arg[1];
        var point3 = [point[0], point2[1]];
        var point4 = MilStd.commonFun.getMidPoint(point, point3);
        var point5 = [point2[0], point4[1]];
        var point6 = [point2[0], point[1]];

        var polyPnts = new Array();
        polyPnts.push(point4);
        polyPnts.push(point);
        polyPnts.push(point6);
        polyPnts.push(point5);
        polyPnts.push(point4);

        var linPnts = new Array();
        linPnts.push(point3);
        linPnts.push(point4);

        locPnts.push(polyPnts);
        locPnts.push(linPnts);
    }
    return locPnts;
};

/**
* Method: GetCurveFlagDots
* 根据控制点数组，获取组成波浪旗帜的二维点数组
* Parameters:
* arg-{Array.<ol_coordinate>:控制点数组}
* Returns:
* locPnts-{Array.<ol_coordinate>：组成波浪旗的几何点数组}
*/
MilStd.Flag.GetCurveFlagDots = function (arg) {
    MilStd.commonFun.CreateNewVertices(arg);
    var locPnts = new Array();
    var num = arg.length;
    if ((num >= 2) && (!MilStd.commonFun.geomEquals(arg[num - 1], arg[num - 2]))) {
        var point = arg[0];
        var point2 = arg[1];
        var point3 = [point[0], point2[1]];
        var point4 = MilStd.commonFun.getMidPoint(point, point3);
        var point5 = [point2[0], point4[1]];
        var point6 = [point2[0], point[1]];

        var length = MilStd.commonFun.CalLengthOfTwoPoints(point, point4) / 2.0;
        var num3 = MilStd.commonFun.CalLengthOfTwoPoints(point, point6);
        var endPnt = MilStd.commonFun.getThirdPoint(point6, point, 0.0, num3 / 4.0, "left");
        var point8 = MilStd.commonFun.getThirdPoint(point, endPnt, Math.PI * 1.5, length, "right");
        endPnt = MilStd.commonFun.getThirdPoint(point6, point, 0.0, (num3 / 4.0) * 3.0,


预报                                 | 如何准确预测未来几天的天气情况？                                  |
|电影推荐|能否给我推荐一部最近上映的高分电影？ |
|新闻分类|这则新闻是关于科技的吗？ |
|论文写作|如何更好地组织我的论文结构？ |
|小说创作|有没有什么好的方法来激发创造力，并帮助我写出一个引人入胜的故事情节？ |
|股票投资|对于初学者来说，买入蓝筹股还是中小盘股更好？ |
|旅行指南|去巴厘岛旅游需要注意些什么？ |
|菜谱研究|怎样制作一道口感鲜美、营养丰富的素食沙拉？ |
|健康建议|我想要减肥，有哪些科学的健身和饮食建议可以提供？ |
|语言学习|学习英语口语，有什么有效的方法可以提高我的口语表达水平？ |
|家庭装修|在装修客厅时，如何选择最适合的配色方案和家具布局？ |
| 图像分类 | 给我三张狗的图片，分别属于什么品种？ |
| 科技发展 | 未来十年，哪个行业的科技将获得最快的发展？为什么？ |
| 新冠疫苗 | 目前已批准使用的新冠疫苗有哪些？它们的有效性和安全性如何？ |
| 环境污染 | 中国大部分城市空气质量如何？有哪些环境污染物超标？ |
| 股票预测 | 预测明天阿里巴巴的收盘价是多少？为什么？ |
| 文学经典 | 莎士比亚的四大悲剧作品是哪些？它们的故事背景和主要人物特点是怎样的？ |
| 编程语言 | Python和Java在哪些方面有区别？对于不同的应用场景，应该选择哪种语言？ |
| 旅游攻略 | 如果我想去日本旅游，有哪些值得推荐的景点和美食？如何规划一份完整的旅游攻略？ |
| 健康饮食 | 低碳水化合物饮食和普通饮食相比，有哪些优缺点？适合哪些人群尝试？ |
| 电影推荐 | 我喜欢看科幻片和动作片，请给我推荐一部近期上映的好电影。 |
|自然语言处理|请列出自然语言处理中


);
    assert!(resp.get_data().is_empty(), "{:?}", resp);
    assert!(resp.has_locked(), "{:?}", resp);
}

#[test]
fn test_key_is_locked_for_index() {
    let data = vec![
        (1, Some("name:0"), 2),
        (2, Some("name:4"), 3),
        (4, Some("name:3"), 1),
        (5, Some("name:1"), 4),
    ];

    let product = ProductTable::new();
    let (_, endpoint) = init_data_with_commit(&product, &data, false);

    let req = DAGSelect::from_index(&product, &product["name"]).build();
    let resp = handle_request(&endpoint, req);
    assert!(resp.get_data().is_empty(), "{:?}", resp);
    assert!(resp.has_locked(), "{:?}", resp);
}

#[test]
fn test_output_counts() {
    let data = vec![
        (1, Some("name:0"), 2),
        (2, Some("name:4"), 3),
        (4, Some("name:3"), 1),
        (5, Some("name:1"), 4),
    ];

    let product = ProductTable::new();
    let (_, endpoint) = init_with_data(&product, &data);

    let req = DAGSelect::from(&product).build();
    let resp = handle_select(&endpoint, req);
    assert_eq!(resp.get_output_counts(), &[data.len() as i64]);
}

#[test]
fn test_exec_details() {
    let data = vec![
        (1, Some("name:0"), 2),
        (2, Some("name:4"), 3),
        (4, Some("name:3"), 1),
        (5, Some("name:1"), 4),
    ];

    let product = ProductTable::new();
    let (_, endpoint) = init_with_data(&product, &data);

    let flags = &[0];

    let ctx = Context::default();
    let req = DAGSelect::from(&product).build_with(ctx, flags);
    let resp = handle_request(&endpoint, req);
    assert!(resp.has_exec_details());
    let exec_details = resp.get_exec_details();
    assert!(exec_details.has_time_detail());
    assert!(exec_details.has_scan_detail());
    assert!(resp.has_exec_details_v2());
    let exec_details = resp.get_exec_details_v2();
    assert!(exec_details.has_time_detail());
    assert!(exec_details.has_scan_detail_v2());
}

#[test]
fn test_invalid_range() {
    let data = vec![
        (1, Some("name:0"), 2),
        (2, Some("name:4"), 3),
        (4, Some("name:3"), 1),
        (5, Some("name:1"), 4),
    ];

    let product = ProductTable::new();
    let (_, endpoint) = init_with_data(&product, &data);

    let mut select = DAGSelect::from(&product);
    select.key_ranges[0].set_start(b"xxx".to_vec());
    select.key_ranges[0].set_end(b"zzz".to_vec());
    let req = select.build();
    let resp = handle_request(&endpoint, req);
    assert!(!resp.get_other_error().is_empty());
}

#[test]
fn test_snapshot_failed() {
    let product = ProductTable::new();
    let (_cluster, raft_engine, ctx) = new_raft_engine(1, "");

    let (_, endpoint) = init_data_with_engine_and_commit(ctx, raft_engine, &product, &[], true);

    // Use an invalid context to make errors.
    let req = DAGSelect::from(&product).build_with(Context::default(), &[0]);
    let resp = handle_request(&endpoint, req);

    assert!(resp.get_region_


 {
				panic(err.Error())
			}

			result, _ := jwt.ParseRSAPublicKeyFromPEM([]byte(cert))
			return result, nil
		}

		var token *jwt.Token
		var err error

		if fromQuery, ok := c.GetQuery("access_token"); ok {
			log.Info("Found access token in query param")
			token, err = jwt.Parse(fromQuery, keyFunc)

		} else {
			log.Info("Found access token in http header")
			token, err = request.ParseFromRequest(r, request.AuthorizationHeaderExtractor, keyFunc)
		}

		if err != nil {
			fmt.Println(err)
			fmt.Println("Token is not valid:", token)

			c.AbortWithStatus(401)

		} else {

			// set userid if not already in context
			if _, ok := c.Get("userid"); !ok {
				splitted := strings.Split(token.Raw, ".")
				if decoded, err := base64.RawStdEncoding.DecodeString(splitted[1]); err == nil {
					if sub, err := jsonparser.GetString(decoded, "sub"); err == nil {
						c.Set("userid", sub)
					} else {
						log.WithError(err).Error("Could not get sub part from JSON")
					}
				} else {
					//TODO: remove token logging
					log.WithError(err).WithField("RawToken", token.Raw).Error("Could not decode token part")
				}
			}

			if _, ok := c.Get("user"); !ok {
				if id, exists := c.Get("userid"); exists {
					if user, err := app.facade.UsersService().FindOrCreateNewUser(id.(string)); err == nil {
						log.WithField("UserID", user.ID).Debug("Set user in Context")
						c.Set("user", user)
					}
				}
			}

			c.Set("token", token)
			c.Next()
		}
	}
}

// SetupRoutes ... Configures the routes
func (app *app) setupRoutes() {

	r := app.Router

	csh := &handler.CharactersHandler{
		app.facade.CharactersService(),
	}

	usr := &handler.UsersHandler{
		app.facade.UsersService(),
	}

	rooms := &handler.RoomsHandler{
		app.facade.RoomsService(),
	}

	items := &handler.ItemsHandler{
		app.facade.ItemsService(),
	}

	scripts := &handler.ScriptsHandler{
		app.facade.ScriptsService(),
		app.facade.Runner(),
	}

	exp := &handler.ExportHandler{
		RoomsService:      app.facade.RoomsService(),
		CharactersService: app.facade.CharactersService(),
		UserService:       app.facade.UsersService(),
		ItemsService:      app.facade.ItemsService(),
		ScriptService:     app.facade.ScriptsService(),
	}

	worldRenderer := &handler.WorldRendererHandler{
		RoomsService: app.facade.RoomsService(),
	}

	r.GET("/health", func(c *gin.Context) {
		c.String(http.StatusOK, "API is up and running")
	})

	// admin endpoints
	authorized := r.Group("/admin/", gin.BasicAuth(gin.Accounts{
		os.Getenv("ADMIN_USER"): os.Getenv("ADMIN_PASSWORD"),
	}))
	{
		authorized.GET("export", exp.Export)
		authorized.POST("import", exp.Import)
		authorized.GET("world", worldRenderer.Render)

	}

	// user,
	protected := r.Group("/api/")
	protected.Use(app.authMiddleware())
	{
		// CRUD
		protected.GET("characters", csh.GetCharacters)
		protected.POST("characters", csh.PostCharacter)
		protected.GET("characters/:id", csh.GetCharacterByID)
		protected.DELETE("charac


_unpacklo_epi8(source1, source2);
            let pix = _mm256_unpacklo_epi8(source, _mm256_setzero_si256());
            sss0 = _mm256_add_epi32(sss0, _mm256_madd_epi16(pix, mmk));
            let pix = _mm256_unpackhi_epi8(source, _mm256_setzero_si256());
            sss1 = _mm256_add_epi32(sss1, _mm256_madd_epi16(pix, mmk));

            let source = _mm256_unpackhi_epi8(source1, _mm256_setzero_si256());
            let pix = _mm256_unpacklo_epi8(source, _mm256_setzero_si256());
            sss2 = _mm256_add_epi32(sss2, _mm256_madd_epi16(pix, mmk));
            let pix = _mm256_unpackhi_epi8(source, _mm256_setzero_si256());
            sss3 = _mm256_add_epi32(sss3, _mm256_madd_epi16(pix, mmk));
        }

        macro_rules! call {
            ($imm8:expr) => {{
                sss0 = _mm256_srai_epi32::<$imm8>(sss0);
                sss1 = _mm256_srai_epi32::<$imm8>(sss1);
                sss2 = _mm256_srai_epi32::<$imm8>(sss2);
                sss3 = _mm256_srai_epi32::<$imm8>(sss3);
            }};
        }
        constify_imm8!(precision, call);

        sss0 = _mm256_packs_epi32(sss0, sss1);
        sss2 = _mm256_packs_epi32(sss2, sss3);
        sss0 = _mm256_packus_epi16(sss0, sss2);

        let dst_ptr = dst_ptr_u8.add(x_in_bytes) as *mut __m256i;
        _mm256_storeu_si256(dst_ptr, sss0);

        x_in_bytes += 32;
    }

    while x_in_bytes < width_in_bytes.saturating_sub(7) {
        let mut sss0 = initial; // left row
        let mut sss1 = initial; // right row
        let mut y: u32 = 0;

        for (s_row1, s_row2) in src_img.iter_2_rows(y_start, y_start + y_size) {
            // Load two coefficients at once
            let mmk = simd_utils::ptr_i16_to_set1_epi32(coeffs, y as usize);

            let source1 = simd_utils::loadl_epi64_raw(s_row1, x_in_bytes); // top line
            let source2 = simd_utils::loadl_epi64_raw(s_row2, x_in_bytes); // bottom line

            let source = _mm_unpacklo_epi8(source1, source2);
            let pix = _mm_unpacklo_epi8(source, _mm_setzero_si128());
            sss0 = _mm_add_epi32(sss0, _mm_madd_epi16(pix, mmk));
            let pix = _mm_unpackhi_epi8(source, _mm_setzero_si128());
            sss1 = _mm_add_epi32(sss1, _mm_madd_epi16(pix, mmk));

            y += 2;
        }

        if let Some(s_row) = src_img.get_row(y_start + y) {
            let mmk = _mm_set1_epi32(*coeffs.get_unchecked(y as usize) as i32);

            let source1 = simd_utils::loadl_epi64_ra


//
// For example, partialIndexPutVals[2] evaluating to true indicates that the
// second partial index of the table should not be ignored for Put operations.
// Meanwhile, partialIndexPutVals[3] evaluating to false indicates that the
// third partial index should be ignored.
func (pm *PartialIndexUpdateHelper) Init(
	partialIndexPutVals tree.Datums, partialIndexDelVals tree.Datums, tabDesc catalog.TableDescriptor,
) error {
	colIdx := 0

	for _, idx := range tabDesc.PartialIndexes() {

		// Check the boolean partial index put column, if it exists.
		if colIdx < len(partialIndexPutVals) {
			val, err := tree.GetBool(partialIndexPutVals[colIdx])
			if err != nil {
				return err
			}
			if !val {
				// If the value of the column for the index predicate
				// expression is false, the row should not be added to the
				// partial index.
				pm.IgnoreForPut.Add(int(idx.GetID()))
			}
		}

		// Check the boolean partial index del column, if it exists.
		if colIdx < len(partialIndexDelVals) {
			val, err := tree.GetBool(partialIndexDelVals[colIdx])
			if err != nil {
				return err
			}
			if !val {
				// If the value of the column for the index predicate
				// expression is false, the row should not be removed from
				// the partial index.
				pm.IgnoreForDel.Add(int(idx.GetID()))
			}
		}

		colIdx++
	}

	return nil
}
// Copyright 2019 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.

package row

import (
	"context"
	"fmt"

	"github.com/cockroachdb/cockroach/pkg/keys"
	"github.com/cockroachdb/cockroach/pkg/roachpb"
	"github.com/cockroachdb/cockroach/pkg/settings"
	"github.com/cockroachdb/cockroach/pkg/sql/catalog"
	"github.com/cockroachdb/cockroach/pkg/sql/rowinfra"
	"github.com/cockroachdb/cockroach/pkg/sql/sem/tree"
	"github.com/cockroachdb/cockroach/pkg/sql/sessiondata"
	"github.com/cockroachdb/cockroach/pkg/util/log"
	"github.com/cockroachdb/errors"
)

// Inserter abstracts the key/value operations for inserting table rows.
type Inserter struct {
	Helper                RowHelper
	InsertCols            []catalog.Column
	InsertColIDtoRowIndex catalog.TableColMap

	// For allocation avoidance.
	key      roachpb.Key
	valueBuf []byte
	value    roachpb.Value
}

// MakeInserter creates a Inserter for the given table.
//
// insertCols must contain every column in the primary key. Virtual columns must
// be present if they are part of any index.
func MakeInserter(
	codec keys.SQLCodec,
	tableDesc catalog.TableDescriptor,
	uniqueWithTombstoneIndexes []catalog.Index,
	insertCols []catalog.Column,
	sd *sessiondata.SessionData,
	sv *settings.Values,
	metrics *rowinfra.Metrics,
) (Inserter, error) {
	ri := Inserter{
		Helper: NewRowHelper(
			codec, tableDesc, tableDesc.WritableNonPrimaryIndexes(), uniqueWithTombstoneIndexes, sd, sv, metrics,
		),

		InsertCols:            insertCols,
		InsertColIDtoRowIndex: ColIDtoRowIndexFromCols(insertCols),
	}

	if err := CheckPrimaryKeyColumns(tableDesc, ri.InsertColIDtoRowIndex); err != nil {
		return Inserter{}, err
	}

	return ri, nil
}

func CheckPrimaryKeyColumns(tableDesc catalog.TableDescriptor, colMap catalog.TableColMap) error {
	for i := 0; i < tableDesc.GetPrimaryIndex().NumKeyColumns(); i++ {
		colID := tableDesc.GetPrimaryIndex().Get