1, m2, lx, ly, d);
	}
	if (sgn(d) < 0)
	{
		lx.negate();
		ly.negate();
		d.negate();
	}
}

inline void implicitPoint3D_LPI::getExpansionLambda(expansion& lx, expansion& ly, expansion& lz, expansion& d) const
{
	if (ip.isExplicit3D() && iq.isExplicit3D() && ir.isExplicit3D() && is.isExplicit3D() && it.isExplicit3D()) {
		const explicitPoint3D& ep = ip.toExplicit3D(), & eq = iq.toExplicit3D(), & er = ir.toExplicit3D();
		const explicitPoint3D& es = is.toExplicit3D(), & et = it.toExplicit3D();
		const s_expansion p[4] = { ep.X(), ep.Y(), ep.Z(), 1 };
		const s_expansion q[4] = { eq.X(), eq.Y(), eq.Z(), 1 };
		const s_expansion r[4] = { er.X(), er.Y(), er.Z(), 1 };
		const s_expansion s[4] = { es.X(), es.Y(), es.Z(), 1 };
		const s_expansion t[4] = { et.X(), et.Y(), et.Z(), 1 };
		lambda3d_LPI<s_expansion, expansion>(p, q, r, s, t, lx, ly, lz, d);
	}
	else {
		expansion p[4], q[4], r[4], s[4], t[4];
		ip.getExpansionLambda(p[0], p[1], p[2], p[3]);
		iq.getExpansionLambda(q[0], q[1], q[2], q[3]);
		ir.getExpansionLambda(r[0], r[1], r[2], r[3]);
		is.getExpansionLambda(s[0], s[1], s[2], s[3]);
		it.getExpansionLambda(t[0], t[1], t[2], t[3]);
		lambda3d_LPI<expansion, expansion>(p, q, r, s, t, lx, ly, lz, d);
	}
	if (sgn(d) < 0)
	{
		lx.negate();
		ly.negate();
		lz.negate();
		d.negate();
	}
}

inline void implicitPoint3D_TPI::getExpansionLambda(expansion& lx, expansion& ly, expansion& lz, expansion& d) const
{
	if (iv1.isExplicit3D() && iv2.isExplicit3D() && iv3.isExplicit3D() &&
		iw1.isExplicit3D() && iw2.isExplicit3D() && iw3.isExplicit3D() &&
		iu1.isExplicit3D() && iu2.isExplicit3D() && iu3.isExplicit3D()) {
		const explicitPoint3D& ev1 = iv1.toExplicit3D(), & ev2 = iv2.toExplicit3D(), & ev3 = iv3.toExplicit3D();
		const explicitPoint3D& ew1 = iw1.toExplicit3D(), & ew2 = iw2.toExplicit3D(), & ew3 = iw3.toExplicit3D();
		const explicitPoint3D& eu1 = iu1.toExplicit3D(), & eu2 = iu2.toExplicit3D(), & eu3 = iu3.toExplicit3D();
		const s_expansion v1[4] = { ev1.X(), ev1.Y(), ev1.Z(), 1 };
		const s_expansion v2[4] = { ev2.X(),


/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */

#include "test_sve_acle.h"

/*
** qadd_s8_tied1:
**	sqadd	z0\.b, (z0\.b, z1\.b|z1\.b, z0\.b)
**	ret
*/
TEST_UNIFORM_Z (qadd_s8_tied1, svint8_t,
		z0 = svqadd_s8 (z0, z1),
		z0 = svqadd (z0, z1))

/*
** qadd_s8_tied2:
**	sqadd	z0\.b, (z0\.b, z1\.b|z1\.b, z0\.b)
**	ret
*/
TEST_UNIFORM_Z (qadd_s8_tied2, svint8_t,
		z0 = svqadd_s8 (z1, z0),
		z0 = svqadd (z1, z0))

/*
** qadd_s8_untied:
**	sqadd	z0\.b, (z1\.b, z2\.b|z2\.b, z1\.b)
**	ret
*/
TEST_UNIFORM_Z (qadd_s8_untied, svint8_t,
		z0 = svqadd_s8 (z1, z2),
		z0 = svqadd (z1, z2))

/*
** qadd_w0_s8_tied1:
**	mov	(z[0-9]+\.b), w0
**	sqadd	z0\.b, (z0\.b, \1|\1, z0\.b)
**	ret
*/
TEST_UNIFORM_ZX (qadd_w0_s8_tied1, svint8_t, int8_t,
		 z0 = svqadd_n_s8 (z0, x0),
		 z0 = svqadd (z0, x0))

/*
** qadd_w0_s8_untied:
**	mov	(z[0-9]+\.b), w0
**	sqadd	z0\.b, (z1\.b, \1|\1, z1\.b)
**	ret
*/
TEST_UNIFORM_ZX (qadd_w0_s8_untied, svint8_t, int8_t,
		 z0 = svqadd_n_s8 (z1, x0),
		 z0 = svqadd (z1, x0))

/*
** qadd_1_s8_tied1:
**	sqadd	z0\.b, z0\.b, #1
**	ret
*/
TEST_UNIFORM_Z (qadd_1_s8_tied1, svint8_t,
		z0 = svqadd_n_s8 (z0, 1),
		z0 = svqadd (z0, 1))

/*
** qadd_1_s8_untied:
**	movprfx	z0, z1
**	sqadd	z0\.b, z0\.b, #1
**	ret
*/
TEST_UNIFORM_Z (qadd_1_s8_untied, svint8_t,
		z0 = svqadd_n_s8 (z1, 1),
		z0 = svqadd (z1, 1))

/*
** qadd_127_s8:
**	sqadd	z0\.b, z0\.b, #127
**	ret
*/
TEST_UNIFORM_Z (qadd_127_s8, svint8_t,
		z0 = svqadd_n_s8 (z0, 127),
		z0 = svqadd (z0, 127))

/*
** qadd_128_s8:
**	sqsub	z0\.b, z0\.b, #128
**	ret
*/
TEST_UNIFORM_Z (qadd_128_s8, svint8_t,
		z0 = svqadd_n_s8 (z0, 128),
		z0 = svqadd (z0, 128))

/*
** qadd_255_s8:
**	sqsub	z0\.b, z0\.b, #1
**	ret
*/
TEST_UNIFORM_Z (qadd_255_s8, svint8_t,
		z0 = svqadd_n_s8 (z0, 255),
		z0 = svqadd (z0, 255))

/*
** qadd_m1_s8:
**	sqsub	z0\.b, z0\.b, #1
**	ret
*/
TEST_UNIFORM_Z (qadd_m1_s8, svint8_t,
		z0 = svqadd_n_s8 (z0, -1),
		z0 = svqadd (z0, -1))

/*
** qadd_m127_s8:
**	sqsub	z0\.b, z0\.b, #127
**	ret
*/
TEST_UNIFORM_Z (qadd_m127_s8, svint8_t,
		z0 = svqadd_n_s8 (z0, -127),
		z0 = svqadd (z0, -127))

/*
** qadd_m128_s8:
**	sqsub	z0\.b, z0\.b, #128
**	ret
*/
TEST_UNIFORM_Z (qadd_m128_s8, svint8_t,
		z0 = svqadd_n_s8 (z0, -128),
		z0 = svqadd (z0, -128))


_large_badge_text)

        companion object {
            fun create(parent: ViewGroup): TrackerBadgeViewHolder {
                val inflater = LayoutInflater.from(parent.context)
                val view = inflater.inflate(R.layout.view_device_shield_activity_tracker_badge, parent, false)
                return TrackerBadgeViewHolder(view)
            }
        }

        fun bind(trackerInfo: TrackerCompanyBadge) {
            when (trackerInfo) {
                is TrackerCompanyBadge.Company -> displayTrackerCompany(trackerInfo)
                is TrackerCompanyBadge.Extra -> displayExtraBadge(trackerInfo)
            }
        }

        private fun displayTrackerCompany(trackerInfo: TrackerCompanyBadge.Company) {
            val badge = badgeIcon(iconBadge.context, trackerInfo.companyName)
            val textColor = iconBadge.context.getColorFromAttr(com.duckduckgo.mobile.android.R.attr.daxColorPrimaryText)
            if (badge == null) {
                iconBadge.setImageDrawable(
                    TextDrawable.builder()
                        .beginConfig()
                        .fontSize(50)
                        .endConfig()
                        .buildRound(trackerInfo.companyName.take(1)),
                )
            } else {
                iconBadge.setImageResource(badge)
            }
            iconBadge.show()
            textBadge.hide()
            largeTextBadge.hide()
        }

        private fun badgeIcon(
            context: Context,
            networkName: String,
            prefix: String = "tracking_network_logo_",
        ): Int? {
            val drawable = "$prefix$networkName"
                .replace(" ", "_")
                .replace(".", "")
                .replace(",", "")
                .lowercase(Locale.ROOT)
            val resource = context.resources.getIdentifier(drawable, "drawable", context.packageName)
            return if (resource != 0) resource else null
        }

        private fun displayExtraBadge(trackerInfo: TrackerCompanyBadge.Extra) {
            iconBadge.hide()
            if (trackerInfo.amount > 9) {
                largeTextBadge.text = "+${trackerInfo.amount}"
                largeTextBadge.show()
                textBadge.hide()
            } else {
                textBadge.text = "+${trackerInfo.amount}"
                textBadge.show()
                largeTextBadge.hide()
            }
        }
    }

    private class DiffCallback(private val oldList: List<TrackerCompanyBadge>, private val newList: List<TrackerCompanyBadge>) : DiffUtil.Callback() {
        override fun getOldListSize() = oldList.size

        override fun getNewListSize() = newList.size

        override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
            val oldItem = oldList[oldItemPosition]
            val newItem = newList[newItemPosition]
            return if (oldItem is TrackerCompanyBadge.Company && newItem is TrackerCompanyBadge.Company) {
                oldItem.companyName == newItem.companyName
            } else {
                false
            }
        }

        override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
            return oldList[oldItemPosition] == newList[newItemPosition]
        }
    }
}
/*
 * Copyright (c) 2021 DuckDuckGo
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in wr


 buffer.
  ///
  /// Args:
  ///   text (String): The text to write.
  ///   x (int): The left pixel position to start the text. Defaults to 1.
  ///   y (int): The top pixel position to start the text. Defaults to 1.
  ///   maxWidth (int?): The maximum width for the text bounding box. Defaults to 640.
  ///   maxHeight (int?): The maximum height for the text bounding box.
  ///   color (PaletteColors?): The color of the text.
  ///   align (Alignment2D): The alignment of the text. Defaults to Alignment2D.topLeft.
  Future<void> writeText(String text,
      {int x = 1,
      int y = 1,
      int? maxWidth = 640,
      int? maxHeight,
      PaletteColors? color,
      Alignment2D align = Alignment2D.topLeft}) async {
    await _writeText(text, false,
        x: x,
        y: y,
        maxWidth: maxWidth,
        maxHeight: maxHeight,
        color: color,
        align: align);
  }

  /// Internal method to write text to the display buffer.
  ///
  /// Args:
  ///   text (String): The text to write.
  ///   show (bool): Whether to show the text immediately.
  ///   x (int): The left pixel position to start the text. Defaults to 1.
  ///   y (int): The top pixel position to start the text. Defaults to 1.
  ///   maxWidth (int?): The maximum width for the text bounding box. Defaults to 640.
  ///   maxHeight (int?): The maximum height for the text bounding box.
  ///   color (PaletteColors?): The color of the text.
  ///   align (Alignment2D): The alignment of the text. Defaults to Alignment2D.topLeft.
  Future<void> _writeText(
    String text,
    bool show, {
    int x = 1,
    int y = 1,
    int? maxWidth = 640,
    int? maxHeight,
    PaletteColors? color,
    Alignment2D align = Alignment2D.topLeft,
  }) async {
    if (maxWidth != null) {
      text = wrapText(text, maxWidth);
    }

    final totalHeightOfText = getTextHeight(text);
    int verticalOffset = 0;
    if (align.vertical == Alignment.center) {
      verticalOffset = (maxHeight ?? (400 - y)) ~/ 2 - totalHeightOfText ~/ 2;
    } else if (align.vertical == Alignment.trailing) {
      verticalOffset = (maxHeight ?? (400 - y)) - totalHeightOfText;
    }
    String luaToSend = '';
    for (final line in text.split("\n")) {
      int thisLineX = x;
      if (align.horizontal == Alignment.center) {
        thisLineX = x + (maxWidth ?? (640 - x)) ~/ 2 - getTextWidth(line) ~/ 2;
      } else if (align.horizontal == Alignment.trailing) {
        thisLineX = x + (maxWidth ?? (640 - x)) - getTextWidth(line);
      }
      luaToSend +=
          'frame.display.text("${frame.escapeLuaString(line)}",$thisLineX,${y + verticalOffset}';
      if (charSpacing != 4 || color != null) {
        luaToSend += ',{';
        if (charSpacing != 4) {
          luaToSend += 'spacing=$charSpacing';
        }
        if (charSpacing != 4 && color != null) {
          luaToSend += ',';
        }
        if (color != null) {
          luaToSend += 'color="${color.name}"';
        }
        luaToSend += '}';
      }
      luaToSend += ');';

      y += lineHeight;
      if (maxHeight != null && y > maxHeight || y + verticalOffset > 640) {
        break;
      }
    }
    if (show) {
      luaToSend += 'frame


 = FILETYPE_ICON .. " Python",
			python = FILETYPE_ICON .. " Python",
			r = FILETYPE_ICON .. " R",
			rb = FILETYPE_ICON .. " Ruby",
			ruby = FILETYPE_ICON .. " Ruby",
			solidity = FILETYPE_ICON .. " Solidity",
			swift = FILETYPE_ICON .. " Swift",

			-- Markup & Docs
			latex = FILETYPE_ICON .. " LaTeX",
			markdown = FILETYPE_ICON .. " Markdown",
			md = FILETYPE_ICON .. " Markdown",
			tex = FILETYPE_ICON .. " LaTeX",
			typst = FILETYPE_ICON .. " Typst",

			-- Config & Build
			dockerfile = FILETYPE_ICON .. " Dockerfile",
			hcl = FILETYPE_ICON .. " HCL",
			make = FILETYPE_ICON .. " Makefile",
			makefile = FILETYPE_ICON .. " Makefile",
			nix = FILETYPE_ICON .. " Nix",
			terraform = FILETYPE_ICON .. " Terraform",
			tf = FILETYPE_ICON .. " Terraform",

			-- Vim
			vim = FILETYPE_ICON .. " Vim",
			vimdoc = FILETYPE_ICON .. " VimDoc",

			-- Tools & Misc
			graphql = FILETYPE_ICON .. " GraphQL",
			http = FILETYPE_ICON .. " HTTP",
			regex = FILETYPE_ICON .. " Regex",
			sql = FILETYPE_ICON .. " SQL",
			ssh_config = FILETYPE_ICON .. " SSH Config",
			tmux = FILETYPE_ICON .. " Tmux",

			-- WM & System
			hyprlang = FILETYPE_ICON .. " Hyprlang",
			rasi = FILETYPE_ICON .. " Rasi",
			sxhkdrc = FILETYPE_ICON .. " SXHKD",
			yuck = FILETYPE_ICON .. " Yuck",
			zathurarc = FILETYPE_ICON .. " Zathura",

			-- Shell alternatives
			nu = FILETYPE_ICON .. " Nushell",
		}
		local ft = vim.bo[ev.buf].filetype
		if ft_names[ft] then
			require("which-key").add({
				{ ";", group = ft_names[ft], buffer = ev.buf },
			})
		end
	end,
})


 = event.getOutcomes().get(0);
        assertNotNull(blue);
        assertEquals(10, blue.getUsers());
        assertEquals(15000, blue.getChannelPoints());
        assertNotNull(blue.getTopPredictors());
        assertNotNull(blue.getTopPredictors().get(0));
        assertEquals("1234", blue.getTopPredictors().get(0).getUserId());
        assertNotNull(blue.getTopPredictors().get(1));
        assertEquals(200, blue.getTopPredictors().get(1).getChannelPointsUsed());

        PredictionOutcome pink = event.getOutcomes().get(1);
        assertNotNull(pink);
        assertNotNull(pink.getTopPredictors());
        assertEquals(1, pink.getTopPredictors().size());
        assertNotNull(pink.getTopPredictors().get(0));
        assertEquals("cooler_user", pink.getTopPredictors().get(0).getUserLogin());
        assertEquals("Cooler_User", pink.getTopPredictors().get(0).getUserName());
        assertNull(pink.getTopPredictors().get(0).getChannelPointsWon());

        assertNotNull(event.getLocksAt());
    }

    @Test
    @DisplayName("Deserialize ChannelPredictionEndEvent")
    @SuppressWarnings("ConstantConditions")
    public void deserializePredictionEndEvent() {
        ChannelPredictionEndEvent event = jsonToObject(
            "{\"id\":\"1243456\",\"broadcaster_user_id\":\"1337\",\"broadcaster_user_login\":\"cool_user\",\"broadcaster_user_name\":\"Cool_User\",\"title\":\"Aren’t shoes just really hard socks?\",\"winning_outcome_id\":\"12345\"," +
                "\"outcomes\":[{\"id\":\"12345\",\"title\":\"Yeah!\",\"color\":\"blue\",\"users\":2,\"channel_points\":15000,\"top_predictors\":[{\"user_name\":\"Cool_User\",\"user_login\":\"cool_user\",\"user_id\":1234,\"channel_points_won\":10000," +
                "\"channel_points_used\":500},{\"user_name\":\"Coolest_User\",\"user_login\":\"coolest_user\",\"user_id\":1236,\"channel_points_won\":5000,\"channel_points_used\":100}]},{\"id\":\"22435\",\"title\":\"No!\",\"users\":2," +
                "\"channel_points\":200,\"color\":\"pink\",\"top_predictors\":[{\"user_name\":\"Cooler_User\",\"user_login\":\"cooler_user\",\"user_id\":12345,\"channel_points_won\":null,\"channel_points_used\":100},{\"user_name\":\"Elite_User\"," +
                "\"user_login\":\"elite_user\",\"user_id\":1337,\"channel_points_won\":null,\"channel_points_used\":100}]}],\"status\":\"resolved\",\"started_at\":\"2020-07-15T17:16:03.17106713Z\",\"ended_at\":\"2020-07-15T17:16:11.17106713Z\"}",
            ChannelPredictionEndEvent.class
        );

        assertNotNull(event);
        assertEquals("12345", event.getWinningOutcomeId());
        assertTrue(event.getWinningOutcome().isPresent());
        assertNotNull(event.getOutcomes());
        assertEquals(2, event.getOutcomes().size());
        assertNotNull(event.getOutcomes().get(0));
        assertNotNull(event.getOutcomes().get(0).getTopPredictors());
        assertEquals(2, event.getOutcomes().get(0).getTopPredictors().size());
        assertNotNull(event.getOutcomes().get(0).getTopPredictors().get(0));
        assertEquals(10000, event.getOutcomes().get(0).getTopPredictors().get(0).getChannelPointsWon());
        assertEquals(PredictionStatus.RESOLVED, event.getStatus());
        assertEquals(Instant.parse("2020-07-15T17:16:11.17106713Z"), event.getEndedAt());
    }

    @Test
    @DisplayName("Deserialize ChannelSharedCh


using antflowcore.constant.enus;
using AntFlowCore.Entity;
using antflowcore.service.interf.repository;
using antflowcore.vo;

namespace antflowcore.service.repository;

public class BpmnNodeButtonConfService: AFBaseCurdRepositoryService<BpmnNodeButtonConf>,IBpmnNodeButtonConfService
{
    public BpmnNodeButtonConfService(IFreeSql freeSql) : base(freeSql)
    {
    }

    public void EditButtons(BpmnNodeVo bpmnNodeVo, long bpmnNodeId)
    {
        // Delete the old configs
        this.Frsql.DeleteDict(new Dictionary<string, object>
        {
            {"bpmn_node_id",bpmnNodeId}
        });

        // To check whether the start node is started by resubmitting the process
        bool isHaveCxtjButton = false;

        var buttons = bpmnNodeVo.Buttons;
        if (buttons == null || !buttons.StartPage.Any() && !buttons.ApprovalPage.Any())
        {
            buttons = new BpmnNodeButtonConfBaseVo
            {
                StartPage = new List<int>(),
                ApprovalPage = new List<int> { 2 }
            };
            // return; // todo for easy testing purposes
        }

        // Start page buttons
        var startPageButtons = buttons.StartPage;
        if (startPageButtons != null && startPageButtons.Any())
        {
            baseRepo.Insert(GetBpmnNodeButtonConfs(bpmnNodeId, buttons.StartPage, ButtonPageTypeEnum.INITIATE));
        }

        // Approval page buttons
        var approvalPageButtons = buttons.ApprovalPage;
        if (approvalPageButtons != null && approvalPageButtons.Any())
        {
            baseRepo.Insert(GetBpm


需重新调用初始化
      themeStatus: _themeStatus,
      //允许直接下载的网络状态集合 选填
      directDownloadNetworkType: [
        FlutterUnionadNetCode.NETWORK_STATE_2G,
        FlutterUnionadNetCode.NETWORK_STATE_3G,
        FlutterUnionadNetCode.NETWORK_STATE_4G,
        FlutterUnionadNetCode.NETWORK_STATE_WIFI
      ],
      androidPrivacy: AndroidPrivacy(
          //是否允许SDK主动使用地理位置信息 true可以获取，false禁止获取。默认为true
          isCanUseLocation: false,
          //当isCanUseLocation=false时，可传入地理位置信息，穿山甲sdk使用您传入的地理位置信息lat
          lat: 0.0,
          //当isCanUseLocation=false时，可传入地理位置信息，穿山甲sdk使用您传入的地理位置信息lon
          lon: 0.0,
          // 是否允许SDK主动使用手机硬件参数，如：imei
          isCanUsePhoneState: false,
          //当isCanUsePhoneState=false时，可传入imei信息，穿山甲sdk使用您传入的imei信息
          imei: "",
          // 是否允许SDK主动使用ACCESS_WIFI_STATE权限
          isCanUseWifiState: false,
          // 当isCanUseWifiState=false时，可传入Mac地址信息
          macAddress: "",
          // 是否允许SDK主动使用WRITE_EXTERNAL_STORAGE权限
          isCanUseWriteExternal: false,
          // 开发者可以传入oaid
          oaid: "b69cd3cf68900323",
          // 是否允许SDK主动获取设备上应用安装列表的采集权限
          alist: false,
          // 是否能获取android ID
          isCanUseAndroidId: false,
          // 开发者可以传入android ID
          androidId: "",
          // 是否允许SDK在申明和授权了的情况下使用录音权限
          isCanUsePermissionRecordAudio: false,
          // 是否限制个性化推荐接口
          isLimitPersonalAds: false,
          // 是否启用程序化广告推荐 true启用 false不启用
          isProgrammaticRecommend: false,
          userPrivacyConfig: {
            //控制QQ真g获取频率，"0"表示关闭，“1"或者其他值表示打开。
            "mcod": "0"
          }),
      iosPrivacy: IOSPrivacy(
        //允许个性化广告
        limitPersonalAds: false,
        //允许程序化广告
        limitProgrammaticAds: false,
        //允许CAID
        forbiddenCAID: false,
      ),
      //配置拉取失败时导入本地配置 https://www.csjplatform.com/supportcenter/5885
      //android导入/android/app/src/main/assets/下，文件必须为json文件，传入文件名
      //ios导入/ios/下，文件必须为json文件，传入文件名
      localConfig: "site_config_5098580",
    );
    print("sdk初始化 $_init");
    _version = await FlutterUnionad.getSDKVersion();
    _themeStatus = await FlutterUnionad.getThemeStatus();
    setState(() {});
  }

  @override
  Widget build(BuildContext context) {
    if (_init == null) {
      return Scaffold(
        body: Center(
          child: Text("正在进行穿山甲sdk初始化..."),
        ),
      );
    }
    return Scaffold(
      appBar: AppBar(
        title: const Text('FlutterUnionad example app'),
      ),
      body: SingleChildScrollView(
        scrollDirection: Axis.vertical,
        reverse: false,
        physics: BouncingScrollPhysics(),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Container(
              alignment: Alignment.center,
              height: 50,
              child: Text("穿山甲初始化>>>>>> ${_init! ? "成功" : "失败"}"),
            ),
            Container(


例如，投资者如果需要资金，可以在二级市场上卖出持有的股票或债券。二级市场还通过价格发现机制，反映了证券的市场价值。

#### 交易对象
1. **一级市场**
   - **交易对象是新发行的证券**：在一级市场中，投资者购买的是刚刚发行的证券，这些证券之前没有在市场上交易过。例如，公司首次发行股票时，投资者认购的是新股，这些股票是公司为了融资而新创造的权益凭证。
2. **二级市场**
   - **交易对象是已发行的证券**：在二级市场中，交易的证券是之前已经在一级市场发行过的。这些证券已经在市场上存在了一段时间，投资者之间进行买卖，而不是直接从发行者手中购买。

#### 交易方式
1. **一级市场**
   - **交易方式主要是认购**：在一级市场中，投资者通过认购的方式购买证券。例如，在公司IPO时，投资者需要通过券商提交认购申请，并按照发行价格支付资金。认购过程通常有一定的规则和限制，比如认购额度、中签率等。
2. **二级市场**
   - **交易方式主要是买卖**：在二级市场中，投资者通过证券交易所或场外交易平台进行买卖。例如，在证券交易所，投资者可以通过股票交易软件下单买入或卖出股票，交易价格由市场供求关系决定。

#### 价格形成机制
1. **一级市场**
   - **价格相对固定**：一级市场的证券发行价格通常是预先确定的，由发行者根据市场情况、自身估值等因素制定。例如，公司IPO时，会根据公司的财务状况、行业前景等因素确定新股的发行价格。投资者在认购时，基本按照这个固定价格购买。
2. **二级市场**
   - **价格由市场供求决定**：二级市场的证券价格是动态变化的，由市场供求关系决定。例如，股票价格会随着公司的业绩、宏观经济环境、市场情绪等因素不断波动。当市场上买方多于卖方时，价格上升；当卖方多于买方时，价格下降。

#### 参与主体
1. *


a_Feistel(s2, s3, s0, s1, k + 10);
        k += 12;

        if (k == kend)
            break;

        /*
         * This is the same function as the diffusion function D of the
         * accompanying documentation. See section 3.2 for properties of the
         * FLlayer function.
         */
        s1 ^= LeftRotate(s0 & k[0], 1);
        s2 ^= s3 | k[3];
        s0 ^= s1 | k[1];
        s3 ^= LeftRotate(s2 & k[2], 1);
        k += 4;
    }

    s2 ^= k[0], s3 ^= k[1], s0 ^= k[2], s1 ^= k[3];

    PUTU32(ciphertext, s2);
    PUTU32(ciphertext + 4, s3);
    PUTU32(ciphertext + 8, s0);
    PUTU32(ciphertext + 12, s1);
}

void Camellia_EncryptBlock(int keyBitLength, const u8 plaintext[],
                           const KEY_TABLE_TYPE keyTable, u8 ciphertext[])
{
    Camellia_EncryptBlock_Rounds(keyBitLength == 128 ? 3 : 4,
                                 plaintext, keyTable, ciphertext);
}

void Camellia_DecryptBlock_Rounds(int grandRounds, const u8 ciphertext[],
                                  const KEY_TABLE_TYPE keyTable,
                                  u8 plaintext[])
{
    u32 s0, s1, s2, s3;
    const u32 *k = keyTable + grandRounds * 16, *kend = keyTable + 4;

    s0 = GETU32(ciphertext) ^ k[0];
    s1 = GETU32(ciphertext + 4) ^ k[1];
    s2 = GETU32(ciphertext + 8) ^ k[2];
    s3 = GETU32(ciphertext + 12) ^ k[3];

    while (1) {
        /* Camellia makes 6 Feistel rounds */
        k -= 12;
        Camellia_Feistel(s0, s1, s2, s3, k + 10);
        Camellia_Feistel(s2, s3, s0, s1, k + 8);
        Camellia_Feistel(s0, s1, s2, s3, k + 6);
        Camellia_Feistel(s2, s3, s0, s1, k + 4);
        Camellia_Feistel(s0, s1, s2, s3, k + 2);
        Camellia_Feistel(s2, s3, s0, s1, k + 0);

        if (k == kend)
            break;

        /*
         * This is the same function as the diffusion function D of the
         * accompanying documentation. See section 3.2 for properties of the
         * FLlayer function.
         */
        k -= 4;
        s1 ^= LeftRotate(s0 & k[2], 1);
        s2 ^= s3 | k[1];
        s0 ^= s1 | k[3];
        s3 ^= LeftRotate(s2 & k[0], 1);
    }

    k -= 4;
    s2 ^= k[0], s3 ^= k[1], s0 ^= k[2], s1 ^= k[3];

    PUTU32(plaintext, s2);
    PUTU32(plaintext + 4, s3);
    PUTU32(plaintext + 8, s0);
    PUTU32(plaintext + 12, s1);
}

void Camellia_DecryptBlock(int keyBitLength, const u8 plaintext[],
                           const KEY_TABLE_TYPE keyTable, u8 ciphertext[])
{
    Camellia_DecryptBlock_Rounds(keyBitLength == 128 ? 3 : 4,
                                 plaintext, keyTable, ciphertext);
}


5.4-.5.4-28.4 20-22.7 53.7 3.4 19.6 15.8 34.2 37.2 43.6l53.6 23.5c11.6 5.1 15.2 13.3 12.2 21.2-3.7 9.1-13.2 13.6-36.5 13.6-24.3 0-44.7-8.9-58.4-19.1-2.1-1.4-4.4.2-4.4 2.3v34.4c0 10.4 4.9 17.3 14.6 20.7 15.6 5.5 31.6 8.2 48.2 8.2 12.7 0 25.8-1.2 36.3-4.3.7-.3 36-8.9 45.6-45.8 3.5-13.5 2.4-26.5-3.1-39.1zM376.2 149.8c-31.7 0-104.2 20.1-104.2 103.5v183.5c0 .8.6 2.7 2.7 2.7h40.9c1.9 0 2.8-.9 2.8-2.7V348c16.5 12.7 35.8 19.1 57.7 19.1 60.5 0 108.7-48.5 108.7-108.7.1-60.3-48.2-108.6-108.6-108.6zm0 170.9c-17.2 0-31.9-6.1-44-18.2-12.2-12.2-18.2-26.8-18.2-44 0-34.5 27.6-62.2 62.2-62.2 34.5 0 62.2 27.6 62.2 62.2.1 34.3-27.3 62.2-62.2 62.2zM228.3 72.5c-15.9 0-28.8 12.9-28.9 28.9 0 15.6 12.7 28.9 28.9 28.9s28.9-13.1 28.9-28.9c0-16.2-13-28.9-28.9-28.9z"],"hire-a-helper":[512,512,[],"f3b0","M443.1 0H71.9C67.9 37.3 37.4 67.8 0 71.7v371.5c37.4 4.9 66 32.4 71.9 68.8h372.2c3-36.4 32.5-65.8 67.9-69.8V71.7c-36.4-5.9-65-35.3-68.9-71.7zm-37 404.9c-36.3 0-18.8-2-55.1-2-35.8 0-21 2-56.1 2-5.9 0-4.9-8.2 0-9.8 22.8-7.6 22.9-10.2 24.6-12.8 10.4-15.6 5.9-83 5.9-113 0-5.3-6.4-12.8-13.8-12.8H200.4c-7.4 0-13.8 7.5-13.8 12.8 0 30-4.5 97.4 5.9 113 1.7 2.5 1.8 5.2 24.6 12.8 4.9 1.6 6 9.8 0 9.8-35.1 0-20.3-2-56.1-2-36.3 0-18.8 2-55.1 2-7.9 0-5.8-10.8 0-10.8 10.2-3.4 13.5-3.5 21.7-13.8 7.7-12.9 7.9-44.4 7.9-127.8V151.3c0-22.2-12.2-28.3-28.6-32.4-8.8-2.2-4-11.8 1-11.8 36.5 0 20.6 2 57.1 2 32.7 0 16.5-2 49.2-2 3.3 0 8.5 8.3 1 10.8-4.9 1.6-27.6 3.7-27.6 39


			}
		}
	}()

	return w, nil
}

func (w *websocketCaller) Close() (err error) {
	w.once.Do(func() {
		w.cancel()
		w.wg.Wait()
	})
	return
}

func (w websocketCaller) Call(method string, params, reply interface{}) (err error) {
	ctx, cancel := context.WithTimeout(context.Background(), w.timeout)
	defer cancel()
	select {
	case w.sendChan <- &sendRequest{cancel: cancel, request: &clientRequest{
		Version: "2.0",
		Method:  method,
		Params:  params,
		Id:      reqid(),
	}, reply: reply}:

	default:
		return errors.New("sending channel blocking")
	}

	select {
	case <-ctx.Done():
		if err := ctx.Err(); err == context.DeadlineExceeded {
			return err
		}
	}
	return
}

type sendRequest struct {
	cancel  context.CancelFunc
	request *clientRequest
	reply   interface{}
}

var reqid = func() func() uint64 {
	var id = uint64(time.Now().UnixNano())
	return func() uint64 {
		return atomic.AddUint64(&id, 1)
	}
}()
/*
Copyright 2024.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1

import (
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// EDIT THIS FILE!  THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required.  Any new fields you add must have json tags for the fields to be serialized.

// GPUNodeClassSpec defines the desired state of GPUNodeClass.
type GPUNodeClassSpec struct {
	// +optional
	// The launch template to use for VM instances, if set, all other fields could be skipped
	LaunchTemplate NodeClassItemSelectorTerms `json:"launchTemplate"`

	// +optional
	// Could be private or public, varies in different cloud vendor, define where to query the OSImageID
	// +kubebuilder:default="Private"
	OSImageType OSImageTypeEnum `json:"osImageType,omitempty"`

	// the OS image identifier string, default to use first one, if not found, fallback to others
	OSImageSelectorTerms []NodeClassItemSelectorTerms `json:"osImageSelectorTerms,omitempty"`

	// +optional
	// The instance profile to use, assign IAM role and permissions for EC2 instances
	InstanceProfile string `json:"instanceProfile,omitempty"`

	// +optional
	// for AWS only, IMDSv2 metadata service options
	MetadataOptions *NodeClassMetadataOptions `json:"metadataOptions,omitempty"`

	// +optional
	SecurityGroupSelectorTerms []NodeClassItemSelectorTerms `json:"securityGroupSelectorTerms,omitempty"`

	// +optional
	SubnetSelectorTerms []NodeClassItemSelectorTerms `json:"subnetSelectorTerms,omitempty"` // Terms to select subnets

	// +optional
	BlockDeviceMappings []NodeClassBlockDeviceMappings `json:"blockDeviceMappings,omitempty"` // Block device mappings for the instance

	// +optional
	Tags map[string]string `json:"tags,omitempty"` // Tags associated with the resource

	// +optional
	UserData string `json:"


eFeatures": true, "nBits": 2048}}'}.
[I 2024-10-02 18:18:17,659] Trial 13 finished with values: [-0.5361950698070445, 0.2356078652319563] and parameters: {'algorithm_name': 'PLSRegression', 'PLSRegression_algorithm_hash': '9f2f76e479633c0bf18cf2912fed9eda', 'n_components__9f2f76e479633c0bf18cf2912fed9eda': 2, 'descriptor': '{"name": "ECFP", "parameters": {"radius": 3, "nBits": 2048, "returnRdkit": false}}'}.
[I 2024-10-02 18:18:17,675] Trial 14 finished with values: [-0.5356113574175657, 0.5769721187181905] and parameters: {'algorithm_name': 'Ridge', 'Ridge_algorithm_hash': 'cfa1990d5153c8812982f034d788d7ee', 'alpha__cfa1990d5153c8812982f034d788d7ee': 1.4060379177903557, 'descriptor': '{"name": "ECFP_counts", "parameters": {"radius": 3, "useFeatures": true, "nBits": 2048}}'}.
[I 2024-10-02 18:18:17,741] Trial 15 finished with values: [-0.543430366921729, 0.514747412346662] and parameters: {'algorithm_name': 'RandomForestRegressor', 'RandomForestRegressor_algorithm_hash': 'f1ac01e1bba332215ccbd0c29c9ac3c3', 'max_depth__f1ac01e1bba332215ccbd0c29c9ac3c3': 20, 'n_estimators__f1ac01e1bba332215ccbd0c29c9ac3c3': 8, 'max_features__f1ac01e1bba332215ccbd0c29c9ac3c3': <RandomForestMaxFeatures.AUTO: 'auto'>, 'descriptor': '{"name": "MACCS_keys", "parameters": {}}'}.
[I 2024-10-02 18:18:17,759] Trial 16 finished with values: [-2.0072511048320134, 0.2786318125997387] and parameters: {'algorithm_name': 'Lasso', 'Lasso_algorithm_hash': '5457f609662e44f04dcc9423066d2f58', 'alpha__5457f609662e44f04dcc9423066d2f58': 1.344271094811757, 'descriptor': '{"name": "ECFP", "parameters": {"radius": 3, "nBits": 2048, "returnRdkit": false}}'}.
[I 2024-10-02 18:18:17,777] Trial 17 finished with values: [-0.5194661889628072, 0.401467445


import sys
import os
# プロジェクトルートを検索パスに追加
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import networkx as nx
import numpy as np
from stiffness_eigenvalue.max_eigenvalue_lib import max_p_eigenvalue_lib
from stiffness_eigenvalue.visualize import plot_eigen_vals_and_alpha, custom_visualize
import rigidpy as rp
from matplotlib import pyplot as plt
import concurrent.futures
from tqdm import tqdm
from dotenv import load_dotenv
from stiffness_eigenvalue.framework import framework

load_dotenv("stiffness-eigenvalue/config/.env")

# 完全グラフでテスト（ライブラリを用いたもの）（time: 200s~300s）=> Backtrackの更新回数を1回に、libraryを対称行列限定のものにするとと150s~170s程度に改善全体の1/4~1/2程度の時間をArmijo条件の反復に費やしていそう。
def test_lib():
  # np.random.seed(os.getenv("SEED"))
  # 各定数
  d = int(os.getenv("DIMENSION"))
  V = int(os.getenv("NODE_NUM"))
  k = int(os.getenv("REGULAR_DEGREE"))
  p = []; max_eigen = 0; eigen_val_box = []; alpha_box = []; multiplicity_box = [];eigen_record_box = []
  # 完全グラフの生成
  if os.getenv("GRAPH_TYPE") == "complete_graph":
    G = nx.complete_graph(V)
  elif os.getenv("GRAPH_TYPE") == "regular_graph":
    G = nx.random_regular_graph(k, V)
  else:
    print("Invalid graph type")
    return
  # 辺集合
  bonds = np.array(list(G.edges()))
  # MAX_EIGEN_TRIAL 回試行して一番いいやつを選ぶ
  for i in range(int(os.getenv("MAX_EIGEN_TRIAL"))):
    # position of sites
    max_previous = max_eigen
    p_init = 2*np.random.randn(d*V).reshape(-1,d)
    p_current, max_eigen_current, eigen_val_box_current, alpha_box_current, multiplicity_box_current = max_p_eigenvalue_lib(G_regular=G, p=p_init,visual_eigen=False)
    eigen_record_box.append(max_eigen_current)
    if i==0 or (i > 0 and max_eigen_current > max_previous) :
      p = p_current
      max_eigen = max_eigen_current
      eigen_val_box = eigen_val_box_current
      alpha_box = alpha_box_current
      multiplicity_box = multiplicity_box_current
  plot_eigen_vals_and_alpha(eigen_val_box, alpha_box, multiplicity_box)
  # サイズが大きいときにはmemory errorが出るので注意
  F = framework(p, bonds)
  custom_visualize(F, label=f"opt, index value")

# 完全グラフでテスト（ライブラリを用いたもの、処理を並列化）
def test_complete_lib_parallel():
  # np.random.seed(1)
  # 各定数
  d = 2
  V = 10
  p = []
  max_eigen = 0
  eigen_val_box = []
  alpha_box = []
  multiplicity_box = []
  eigen_record_box = []

  # 完全グラフの生成
  G_comp = nx.complete_graph(V)
  # 辺集合
  bonds = np.array(list(G_comp.edges()))

  def process_iteration(i, max_previous):
    # position of sites
    p_init = 2 * np.random.randn(d * V).reshape(-1, d)
    p_current, max_eigen_current, eigen_val_box_current, alpha_box_current, multiplicity_box_current = max_p_eigenvalue_lib(
      G_regular=G_comp, p=p_init, visual_eigen=False)
    return i, p_current, max_eigen_current, eigen_val_box_current, alpha_box_current, multiplicity_box_current

  # 並列処理と進捗バーの設定
  with concurrent.futures.ProcessPoolExecutor() as executor:
    futures = []
    max_previous = max_eigen
    for i in range(1000):
      futures.append(executor.submit(process_iteration, i, max_previous))

    for future in tqdm(concurrent.futures.as_completed(futures), total=1000):
      i, p_current, max_eigen_current, eigen_val_box_current, alpha_box_current, multiplicity_box_current = future.result()
      eigen_record_box.append(max_eigen_current)

      if i == 0 or (i > 0 and max_eigen_current > max_previous):
        p = p_current
        max_eigen = max_eigen_current
        eigen_val_box = eigen_val_box_current
        alpha_box = alpha_box_current
        multiplicity_box = multiplicity_box_current
        max_previous = max_eigen

  plt.plot(eigen_record_box)
  plot_eigen_vals_and_alpha(eigen_val_box, alpha_box, multiplicity_box)
  F = rp.framework(p, bonds)
  custom_visualize(F, label=f"opt, index value")

if __name__ == "__main__":
  test_lib()


=== ts.SyntaxKind.Identifier &&
            !isNodeFlagSet(node, ts.NodeFlags.Namespace) &&
            // augmenting global uses a special syntax that is allowed
            // see https://github.com/Microsoft/TypeScript/pull/6213
            !isNodeFlagSet(node, ts.NodeFlags.GlobalAugmentation)
        ) {
            const end = node.name.pos;
            const start = end - "module".length;
            this.addFailure(
                start,
                end,
                Rule.FAILURE_STRING,
                Lint.Replacement.replaceFromTo(start, end, "namespace"),
            );
        }
        if (node.body !== undefined) {
            switch (node.body.kind) {
                case ts.SyntaxKind.ModuleBlock:
                    return this.checkStatements(node.body.statements);
                case ts.SyntaxKind.ModuleDeclaration:
                    return this.checkModuleDeclaration(node.body, true);
            }
        }
    }
}
import { Equipment } from '../../domain/entity/equipment';

export class GetEquipmentsInteractorResponse {
  readonly nextPage: number | null;
  readonly equipments: GetEquipmentsEquipmentInteractorResponse[];

  constructor(
    page: number,
    elementsPerPage: number,
    totalRows: number,
    equipments: Equipment[],
  ) {
    const lastEquipmentRow = (page - 1) * elementsPerPage + equipments.length;
    this.nextPage =
      equipments.length < elementsPerPage
        ? null
        : lastEquipmentRow === totalRows
        ? null
        : page + 1;

    this.equipments = equipments.map(
      (e) =>
        new GetEquipmentsEquipmentInteractorResponse(
          e.id,
          e.name,
          e.equipmentStats.attack,
          e.equipmentStats.defense,
          e.imageUrl,
          e.description,
          e.equipmentStats.sellPrice,
        ),
    );
  }
}

export class GetEquipmentsEquipmentInteractorResponse {
  constructor(
    readonly id: string,
    readonly name: string,
    readonly attack: number,
    readonly defense: number,
    readonly imageUrl: string,
    readonly description: string,
    readonly sellPrice: number,
  ) {}
}
/* eslint-disable no-console */
import { PrismaClient } from '@prisma/client'
import dotenv from 'dotenv'

dotenv.config()
const db = new PrismaClient()

/*
 * Seed data is database data that needs to exist for your app to run.
 *
 * @see https://www.prisma.io/docs/reference/api-reference/command-reference#migrate-reset
 * @see https://www.prisma.io/docs/guides/prisma-guides/seed-database
 * @see https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#upsert
 * @see https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#createmany
 */
async function main(): Promise<void> {
  // // Change to match your data model and seeding needs
  // const data = [
  //   { name: 'alice', email: 'alice@example.com' },
  //   { name: 'mark', email: 'mark@example.com' },
  //   { name: 'jackie', email: 'jackie@example.com' },
  //   { name: 'bob', email: 'bob@example.com' },
  // ]
  // // Note: if using PostgreSQL, using `createMany` to insert multiple records is much faster
  // // @see: https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#createmany
  // return Promise.all(
  //   data.map(async (user) => {
  //     const record = await db.user.create({
  //       data: { name: user.name, email: user.email },
  //     })
  //     console.log(record)
  //   })
  // )
}

// main()
//   .catch((e) => console.error(e))
//   .finally(async () => {
//     await


u4e0a\u62a5\u544a\uff0c\u5982\u679c\u4e2d\u592e\u8ba4\u4e3a\u53ef\u884c\uff0c\u8bf7\u5373\u6279\u8f6c\u4e2d\u592e\u5404\u90e8\u515a\u7ec4\u548c\u5404\u7701\u3001\u5e02\u3001\u81ea\u6cbb\u533a\u515a\u59d4\u7814\u7a76\u6267\u884c\u3002", "type": "paragraph"}, {"text": "\u00a0\u56fd\u5bb6\u7ecf\u6d4e\u59d4\u5458\u4f1a\u515a\u7ec4\u4e00\u4e5d\u4e94\u516b\u5e74\u56db\u6708\u5341\u56db\u65e5", "type": "paragraph"}, {"text": "\u6765\u6e90\uff1a\u6839\u636e\u4e2d\u5171\u4e2d\u592e\u6587\u4ef6\u520a\u5370", "type": "paragraph"}]}
  </script>

    [返回索引页面]

   中共中央批转国家经委党组对一九五八年第二本帐的报告

   日期：1958-5-6 作者：[待确定]

    国务院各部委党组，各省、市、自治区党委：

   中央同意国家经济委员会党组《动员全民、全党为实现一九五八年计划的第二本帐而斗争》的报告，现转发你们，希共同努力，促其实现。还请注意以下两点：

   一、积极增产油料，十分重要。各省、自治区党委应当把增产棉花、增产粮食、增产糖料的劲头和办法，也用到增产油料方面，争取今年油料的生产超过第二本帐 规定的指标。责成农业部、粮食部切实督促检查油料会议的决议的贯彻执行情


#endif
			}
		}
		return true;
	}

	// if we aren't key catching, dump all the other events
	if( !forceAccept && !keyCatching )
	{
		return false;
	}

	// handle key and character events
	if( event->evType == SE_CHAR )
	{
		// never send the console key as a character
		if( event->evValue != '`' && event->evValue != '~' )
		{
			consoleField.CharEvent( event->evValue );
		}
		return true;
	}

	if( event->evType == SE_KEY )
	{
		// ignore up key events
		if( event->evValue2 == 0 )
		{
			return true;
		}

		KeyDownEvent( event->evValue );
		return true;
	}

	// we don't handle things like mouse, joystick, and network packets
	return false;
}

/*
==============================================================================

PRINTING

==============================================================================
*/

/*
===============
Linefeed
===============
*/
void idConsoleLocal::Linefeed()
{
	int		i;

	// mark time for transparent overlay
	if( current >= 0 )
	{
		times[current % NUM_CON_TIMES] = Sys_Milliseconds();
	}

	x = 0;
	if( display == current )
	{
		display++;
	}
	current++;
	for( i = 0; i < LINE_WIDTH; i++ )
	{
		int offset = ( ( unsigned int )current % TOTAL_LINES ) * LINE_WIDTH + i;
		text[offset] = ( idStr::ColorIndex( C_COLOR_WHITE ) << 8 ) | ' ';
	}
}

/*
================
Print

Handles cursor positioning, line wrapping, etc
================
*/
void idConsoleLocal::Print( const char* txt )
{
	int		y;
	int		c, l;
	int		color;

	if( TOTAL_LINES == 0 )
	{
		// not yet initialized
		return;
	}

	color = idStr::ColorIndex( C_COLOR_WHITE );

	while( ( c = *( const unsigned char* )txt ) != 0 )
	{
		if( idStr::IsColor( txt ) )
		{
			if( *( txt + 1 ) == C_COLOR_DEFAULT )
			{
				color = idStr::ColorIndex( C_COLOR_WHITE );
			}
			else
			{
				color = idStr::ColorIndex( *( txt + 1 ) );
			}
			txt += 2;
			continue;
		}

		y = current % TOTAL_LINES;

		// if we are about to print a new word, check to see
		// if we should wrap to the new line
		if( c > ' ' && ( x == 0 || text[y * LINE_WIDTH + x - 1] <= ' ' ) )
		{
			// count word length
			for( l = 0 ; l < LINE_WIDTH ; l++ )
			{
				if( txt[l] <= ' ' )
				{
					break;
				}
			}

			// word wrap
			if( l != LINE_WIDTH && ( x + l >= LINE_WIDTH ) )
			{
				Linefeed();
			}
		}

		txt++;

		switch( c )
		{
			case '\n':
				Linefeed();
				break;
			case '\t':
				do
				{
					text[y * LINE_WIDTH + x] = ( color << 8 ) | ' ';
					x++;
					if( x >= LINE_WIDTH )
					{
						Linefeed();
						x = 0;
					}
				}
				while( x & 3 );
				break;
			case '\r':
				x = 0;
				break;
			default:	// display character and advance
				text[y * LINE_WIDTH + x] = ( color << 8 ) | c;
				x++;
				if( x >= LINE_WIDTH )
				{
					Linefeed();
					x = 0;
				}
				break;
		}
	}

	// mark time for transparent overlay
	if( current >=


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

#pragma once
#include <pumex/Export.h>
#include <pumex/HPClock.h>

namespace pumex
{

class Viewer;

struct PUMEX_EXPORT InputEvent
{
  enum Type { INPUT_UNDEFINED, MOUSE_MOVE, MOUSE_KEY_PRESSED, MOUSE_KEY_RELEASED, MOUSE_KEY_DOUBLE_PRESSED, KEYBOARD_KEY_PRESSED, KEYBOARD_KEY_RELEASED };
  enum MouseButton { BUTTON_UNDEFINED, LEFT, MIDDLE, RIGHT };
  enum Key { KEY_UNDEFINED, ESCAPE, SPACE, TAB, SHIFT, N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12 };
  // mouse events
  InputEvent(HPClock::time_point t, Type mt, MouseButton b, float mx, float my)
    : time{ t }, type{ mt }, mouseButton{ b }, x{ mx }, y{ my }
  {
  }
  // keyboard events
  InputEvent(HPClock::time_point t, Type mt, Key k)
    : time{ t }, type{ mt }, key{ k }
  {
  }

  HPClock::time_point time;
  Type                type = INPUT_UNDEFINED;
  MouseButton         mouseButton = BUTTON_UNDEFINED;
  float               x = 0.0f;
  float               y = 0.0f;
  Key                 key = KEY_UNDEFINED;
};

class PUMEX_EXPORT InputEventHandler
{
public:
  virtual ~InputEventHandler();
  virtual bool handle(const InputEvent& iEvent, Viewer* viewer) = 0;
};

}


10-100 km. Measure
    the length of the ScaleLine. The result should be approximately the same
    as the distance printed on the ScaleLine.

Zoom out so the ScaleLine shows units in the range of 100-500 km. Drag
    the map to the South or North and see how the ScaleLine length changes.


panelRegister, 141, yPos + 8, "Choose a Password", 4, false);
      Client.choosePasswordInput =
          Panel.addInputTo(Client.panelRegister, 141, yPos + 25, 220, 40, 4, 20, true, false);
      Panel.addButtonBackTo(Client.panelRegister, 371, yPos + 17, 220, 34);
      Panel.addCenterTextTo(Client.panelRegister, 371, yPos + 8, "Confirm Password", 4, false);
      Client.chooseConfirmPassInput =
          Panel.addInputTo(Client.panelRegister, 371, yPos + 25, 220, 40, 4, 20, true, false);
      yPos += 40;
      yPos += 20;
      Client.acceptTermsCheckbox = Panel.addCheckboxTo(Client.panelRegister, 60, yPos, 14);
      Panel.addTextTo(
          Client.panelRegister,
          75,
          yPos,
          "I have read and agree to the terms+conditions listed at:",
          4,
          true);
      yPos += 15;
      Panel.addCenterTextTo(
          Client.panelRegister, 256, yPos, "http://www.runescape.com/runeterms.html", 4, true);
      yPos += 20;
      Panel.addButtonBackTo(Client.panelRegister, 156, yPos + 17, 150, 34);
      Panel.addCenterTextTo(Client.panelRegister, 156, yPos + 17, "Submit", 5, false);
      Client.chooseSubmitRegisterButton =
          Panel.addButtonTo(Client.panelRegister, 156, yPos + 17, 150, 34);
      Panel.addButtonBackTo(Client.panelRegister, 356, yPos + 17, 150, 34);
      Panel.addCenterTextTo(Client.panelRegister, 356, yPos + 17, "Cancel", 5, false);
      Client.chooseCancelRegisterButton =
          Panel.addButtonTo(Client.panelRegister, 356, yPos + 17, 150, 34);

      if (ServerExtensions.enabled(ServerExtensions.OPENRSC_OFFICIAL)) {
        // Set a custom welcome message
        Client.setCustomWelcomeMessage(OpenRSCOfficialUtils.getWelcomeMessage());
        // Remove the "need members account" message
        Client.setCustomServerTypeMessage("");
      } else {
        // Set the default welcome message
        Client.setCustomWelcomeMessage(null);
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  /**
   * Sets visibility of the "Signup" button from the welcome panel
   *
   * @param visible {@code boolean} value indicating desired visibility
   */
  public static void setSignupButtonVisibility(boolean visible) {
    if (Settings.SHOW_ACCOUNT_SECURITY_SETTINGS.get(Settings.currentProfile)) {
      Object panelWelcome = Client.panelWelcome;
      if (panelWelcome != null && Reflection.menuShown != null) {
        try {
          boolean[] shown = (boolean[]) Reflection.menuShown.get(panelWelcome);
          shown[2] = visible;
          shown[3] = visible;
          shown[4] = visible;
          Reflection.menuShown.set(panelWelcome, shown);
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
    }
  }

  public static void panel_login_hook(int n, int startingYPos) {
    try {
      if (Settings.SHOW_ACCOUNT_SECURITY_SETTINGS.get(Settings.currentProfile)) {
        int yPos = startingYPos + 30;
        Panel.addButtonBackTo(Client.panelLogin, 410, yPos, 160, 25);
        Panel.addCenterTextTo(Client.panelLogin, 410, yPos, "I've lost my password", 4, false);
        Client.loginLostPasswordButton = Panel.addButtonTo(Client.panelLogin, 410, yPos, 160, 25);
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  public static void create_account_recovery() {
    try {
      Client.panelRecovery = Panel.createPanel(100);
      int yPo


r_i32 s0, s1, 0.5
// GFX10: encoding: [0x01,0xf0,0x00,0x91]

s_ashr_i32 s0, s1, -4.0
// GFX10: encoding: [0x01,0xf7,0x00,0x91]

s_ashr_i32 s0, s1, 0x3f717273
// GFX10: encoding: [0x01,0xff,0x00,0x91,0x73,0x72,0x71,0x3f]

s_ashr_i32 s0, s1, 0xaf123456
// GFX10: encoding: [0x01,0xff,0x00,0x91,0x56,0x34,0x12,0xaf]

s_ashr_i64 s[0:1], s[2:3], s4
// GFX10: encoding: [0x02,0x04,0x80,0x91]

s_ashr_i64 s[104:105], s[102:103], s100
// GFX10: encoding: [0x66,0x64,0xe8,0x91]

s_ashr_i64 s[0:1], s[102:103], s100
// GFX10: encoding: [0x66,0x64,0x80,0x91]

s_ashr_i64 s[104:105], s[2:3], s100
// GFX10: encoding: [0x02,0x64,0xe8,0x91]

s_ashr_i64 s[104:105], s[102:103], s4
// GFX10: encoding: [0x66,0x04,0xe8,0x91]

s_ashr_i64 s[104:105], s[2:3], s4
// GFX10: encoding: [0x02,0x04,0xe8,0x91]

s_ashr_i64 s[0:1], s[102:103], s4
// GFX10: encoding: [0x66,0x04,0x80,0x91]

s_ashr_i64 s[0:1], s[2:3], s100
// GFX10: encoding: [0x02,0x64,0x80,0x91]

s_ashr_i64 exec, s[2:3], s4
// GFX10: encoding: [0x02,0x04,0xfe,0x91]

s_ashr_i64 vcc, s[2:3], s4
// GFX10: encoding: [0x02,0x04,0xea,0x91]

s_ashr_i64 s[0:1], exec, s4
// GFX10: encoding: [0x7e,0x04,0x80,0x91]

s_ashr_i64 s[0:1], vcc, s4
// GFX10: encoding: [0x6a,0x04,0x80,0x91]

s_ashr_i64 s[0:1], 0, s4
// GFX10: encoding: [0x80,0x04,0x80,0x91]

s_ashr_i64 s[0:1], -1, s4
// GFX10: encoding: [0xc1,0x04,0x80,0x91]

s_ashr_i64 s[0:1], 0.5, s4
// GFX10: encoding: [0xf0,0x04,0x80,0x91]

s_ashr_i64 s[0:1], -4.0, s4
// GFX10: encoding: [0xf7,0x04,0x80,0x91]

s_ashr_i64 s[0:1], 0x3f717273, s4
// GFX10: encoding: [0xff,0


.87f)
                curveTo(30.16f, 107.35f, 29.39f, 107.01f, 28.58f, 106.91f)
                close()
            }
            path(
                fill = SolidColor(Color(0xFFffffff)), stroke = null, strokeLineWidth =
                    0.0f, strokeLineCap = Butt, strokeLineJoin = Miter, strokeLineMiter =
                    4.0f, pathFillType = NonZero
            ) {
                moveTo(33.59f, 112.81f)
                curveTo(33.29f, 113.15f, 32.85f, 113.36f, 32.36f, 113.36f)
                curveTo(31.47f, 113.36f, 30.74f, 112.64f, 30.74f, 111.74f)
                curveTo(30.74f, 110.85f, 31.47f, 110.12f, 32.36f, 110.12f)
                curveTo(32.76f, 110.12f, 33.12f, 110.26f, 33.4f, 110.5f)
                curveTo(33.42f, 110.48f, 33.45f, 110.46f, 33.47f, 110.45f)
                lineTo(36.1f, 108.87f)
                curveTo(36.13f, 108.85f, 36.16f, 108.84f, 36.18f, 108.83f)
                curveTo(36.16f, 108.72f, 36.15f, 108.61f, 36.15f, 108.5f)
                curveTo(36.15f, 107.6f, 36.87f, 106.88f, 37.77f, 106.88f)
                curveTo(38.67f, 106.88f, 39.39f, 107.6f, 39.39f, 108.5f)
                curveTo(39.39f, 109.39f, 38.67f, 110.12f, 37.77f, 110.12f)
                curveTo(37.38f, 110.12f, 37.01f, 109.98f, 36.73f, 109.74f)
                curveTo(36.71f, 109.76f, 36.69f, 109.78f, 36.66f, 109.79f)
                lineTo(34.03f, 111.37f)
                curveTo(34.0f, 111.39f, 33.98f, 111.4f, 33.95f, 111.41f)
                curveTo(33.97f, 111.52f, 33.99f, 111.63f, 33.99f, 111.74f)
                curveTo(33.99f, 111.77f, 33.98f, 111.79f, 33.98f, 111.82f)
                curveTo(34.01f, 111.82f, 34.04f, 111.83f, 34.07f, 111.84f)
                lineTo(36.47f, 112.8f)
                curveTo(36.49f, 112.81f, 36.52f, 112.83f, 36.55f, 112.84f)
                curveTo(36.84f, 112.5f, 37.28f, 112.28f, 37.77f, 112.28f)
                curveTo(38.67f, 112.28f, 39.39f, 113.01f, 39.39f, 113.91f)
                curveTo(39.39f, 114.8f, 38.67f, 115.53f, 37.77f, 115.53f)
                curveTo(36.87f, 115.53f, 36.15f, 114.8f, 36.15f, 113.91f)
                curveTo(36.15f, 113.88f, 36.15f, 113.86f, 36.15f, 113.83f)
                curveTo(36.12f, 113.83f, 36.09f, 113.82f, 36.06f, 113.81f)
                lineTo(33.67f, 112.85f)
                curveTo(33.64f, 112.84f, 33.61f, 112.82f, 33.59f, 112.81f)
                close()


        timeToSpawnZombie += delta
        if (timeToSpawnZombie >= TIME_TO_SPAWN_ZOMBIE) {
            timeToSpawnZombie -= TIME_TO_SPAWN_ZOMBIE
            if (MathUtils.randomBoolean()) crearZombieMalo()
        }

        timeToSpawnItem += delta
        if (timeToSpawnItem >= TIME_TO_SPAWN_ITEM) {
            timeToSpawnItem -= TIME_TO_SPAWN_ITEM
            if (MathUtils.randomBoolean(.4f)) createItem()
        }

        timeToSpawnGems += delta
        if (timeToSpawnGems >= TIME_TO_SPAWN_GEMS) {
            timeToSpawnGems -= TIME_TO_SPAWN_GEMS
            createFiguraGema()
        }

        timeToSpawnSpike += delta
        if (timeToSpawnSpike >= TIME_TO_SPAWN_SPIKE) {
            timeToSpawnSpike -= TIME_TO_SPAWN_SPIKE
            if (MathUtils.randomBoolean(.5f)) createSpike()
        }

        timeToSpawnSaw += delta
        if (timeToSpawnSaw >= TIME_TO_SPAWN_SAW) {
            timeToSpawnSaw -= TIME_TO_SPAWN_SAW
            TIME_TO_SPAWN_SAW = MathUtils.random(1.3f, 20f)
            createSaw()
        }
    }

    private fun updateHeroPlayer(delta: Float, body: Body, didJump: Boolean, isJumpPressed: Boolean) {
        oHero!!.update(delta, body, didJump, isJumpPressed)

        if (oHero!!.position.y < -.5f || oHero!!.position.x < 0) {
            oHero!!.die()
        }
    }

    private fun updatePisable(delta: Float, body: Body) {
        val obj = body.userData as Pisable
        obj.update(delta, body)

        if (obj.position.x < -(obj.DRAW_WIDTH / 2f)) {
            obj.state = Pisable.STATE_DESTROY
        }
    }

    private fun updateZombie(delta: Float, body: Body) {
        val obj = body.userData as Zombie

        obj.update(delta, body)

        if (obj.position.y < -.75f) {
            obj.getHurt(999999)
        }
    }

    private fun updateBullet(delta: Float, body: Body) {
        val obj = body.userData as Bullet
        obj.update(delta, body)

        if (obj.position.x > WIDTH + 1) obj.state = Bullet.STATE_DESTROY
    }

    private fun updateSpike(delta: Float, body: Body) {
        val obj = body.userData as Spike
        obj.update(delta, body)

        if (obj.position.x < -.75) {
            obj.state = Spike.STATE_DESTROY
        }
    }

    private fun updateSaw(delta: Float, body: Body) {
        val obj = body.userData as Saw
        obj.update(delta, body, oHero!!)

        if (obj.position.x < -1) {
            obj.state = Saw.STATE_DESTROY
        }
    }

    private fun updateItems(delta: Float, body: Body) {
        val obj = body.userData as Items
        obj.update(delta, body)

        if (obj.position.x < -.75) {
            obj.state = Items.STATE_TAKEN
        }
    }

    private fun eliminarObjetos() {
        oWorldBox.getBodies(arrBodies)

        for (body in arrBodies) {
            if (!oWorldBox.isLocked) {
                if (body.userData is Zombie) {
                    val obj = body.userData as Zombie
                    if (obj.state == Zombie.STATE_DEAD && obj.stateTime >= Zombie.DURATION_DEAD || oHero!!.state == Hero.STATE_REVIVE) {
                        arrZombies.removeValue(obj, true)
                        oWorldBox.destroyBody(body)
                    }
                } else if (body.userData is Bullet) {


.1045695 356.104569,4 355,4 C353.895431,4 353,3.1045695 353,2 C353,0.8954305 353.895431,0 355,0 Z M382,0 C383.104569,0 384,0.8954305 384,2 C384,3.1045695 383.104569,4 382,4 C380.895431,4 380,3.1045695 380,2 C380,0.8954305 380.895431,0 382,0 Z M412,0 C413.104569,0 414,0.8954305 414,2 C414,3.1045695 413.104569,4 412,4 C410.895431,4 410,3.1045695 410,2 C410,0.8954305 410.895431,0 412,0 Z M442,0 C443.104569,0 444,0.8954305 444,2 C444,3.1045695 443.104569,4 442,4 C440.895431,4 440,3.1045695 440,2 C440,0.8954305 440.895431,0 442,0 Z M472,0 C473.104569,0 474,0.8954305 474,2 C474,3.1045695 473.104569,4 472,4 C470.895431,4 470,3.1045695 470,2 C470,0.8954305 470.895431,0 472,0 Z M499,0 C500.104569,0 501,0.8954305 501,2 C501,3.1045695 500.104569,4 499,4 C497.895431,4 497,3.1045695 497,2 C497,0.8954305 497.895431,0 499,0 Z' id='path-1'%3E%3C/path%3E%3C/defs%3E%3Cg id='📝-Pages' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='Login---V2' transform='translate(-822.000000, -197.000000)'%3E%3Cg id='top-illustration' transform='translate(469.000000, 197.000000)'%3E%3Cuse fill='currentColor' xlink:href='%23path-1'%3E%3C/use%3E%3Cuse fill-opacity='0.6' fill='%23FFFFFF' xlink:href='%23path-1'%3E%3C/use%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E";
$auth-basic-bottom-svg: "data:image/svg+xml,%3Csvg width='243px' height='240px' viewBox='0 0 243 240' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cdefs%3E%3Cpath d='M34.5,182 C35.8807119,182 37,183.119288 37,184.5 C37,185.880712 35.8807119,187 34.5,187 C33.1192881,187 32,185.880712 32,184.5 C32,183.119288 33.1192881,182 34.5,182 Z M61.5,182 C62.8807119,182 64,183.119288 64,184.5 C64,185.880712 62.8807119,187 61.5,187 C60.1192881,187 59,185.880712 59,184.5 C59,183.119288 60.1192881,182 61.5,182 Z M91.5,182 C92.8807119,182 94,183.119288 94,184.5 C94,185.880712 92.8807119,187 91.5,187 C90.1192881,187 89,185.880712 89,184.5 C89,183.119288 90.1192881,182 91.5,182 Z M123.5,182 C124.880712


 (min, max) => {
    return Math.floor(Math.random() * (max - min + 1) + min);
  }
  const randAmount = () => {
    return Number((rand(0, 10) + Math.random()).toFixed(8));
  }

  const orders = [];
  for (let i = 0; i < 5; i++) {
    const randomAsk = rand(minAsk, maxAsk);
    const randomBid = rand(minBid, maxBid);
    const randomAskAmount = randAmount();
    const randomBidAmount = randAmount();
    orders.push(
      placeAskOrder(randomAsk, randomAskAmount, askPrice),
      placeBidOrder(randomBid, randomBidAmount, bidPrice)
    );
  }
  await Promise.all(orders);
}

/**
 * Simply place an ask order: log the event and if the price is smaller than the best ask price - fill the order.
 *
 * @param price
 * @param amount
 * @param bestAskPrice
 */
async function placeAskOrder(price: number, amount: number, bestAskPrice: number): Promise<void> {
  console.log(`PLACE ASK @ ${price} (${amount})`);
  if (price < bestAskPrice) {
    await fillAskOrder(price, amount);
  }
}

/**
 * Simply place a bid order: log the event and if the price is higher than the best bid price - fill the order.
 *
 * @param price
 * @param amount
 * @param bestBidPrice
 */
async function placeBidOrder(price: number, amount: number, bestBidPrice): Promise<void> {
  console.log(`PLACE BID @ ${price} (${amount})`);
  if (price > bestBidPrice) {
    await fillBidOrder(price, -amount);
  }
}

/**
 * Fill the ask order. Use a global mutex instance to control the access to the global balances values.
 *
 * @param price
 * @param amount
 */
async function fillAskOrder(price: number, amount: number): Promise<void> {
  mutex = mutex.then(() => {
    if (usdBalance > price) {
      usdBalance -= price;
      ethBalance += amount;
      console.log(`FILLED ASK @ ${price} (${amount})`);
    }
  });
  return mutex;
}

/**
 * Fill the bid order. Use a global mutex instance to control the access to the global balances values.
 *
 * @param price
 * @param amount
 */
async function fillBidOrder(price: number, amount: number): Promise<void> {
  mutex = mutex.then(() => {
    if (ethBalance > amount) {
      usdBalance += price;
      ethBalance -= amount;
      console.log(`FILLED BID @ ${price} (${amount})`);
    }
  });
  return mutex;
}

/**
 * Log to console the global balances.
 * Use a global mutex instance to control the access to the global balances values.
 */
async function getBalances(): Promise<any> {
  mutex = mutex.then(() => {
    console.log('Overall market assets balance:', { ETH: ethBalance, USD: usdBalance });
  });
  return mutex;
}

console.log('Starting bot (5 sec initial interval)...');
setInterval(async () => {
  const orderbook = await requestOrderBook();
  const { askPrice, bidPrice } = findBestPrices(orderbook);
  await placeRandomOrders(askPrice, bidPrice);
  console.log('---');
}, 5000);

setInterval(async () => {
  await getBalances();
  console.log('---');
}, 30000);

export {
  ethBalance,
  usdBalance,
  requestOrderBook,
  findBestPrices,
  placeRandomOrders,
  placeAskOrder,
  placeBidOrder,
  fillAskOrder,
  fillBidOrder
}

var numbers = [ 3,1,5,2,4];

export interface Bug {
  id : number;
  name : string;
  isClosed : boolean;


dio_menu") );
	subtitlesMenuAct->setIcon( Images::icon("subtitles_menu") );
	browseMenuAct->setIcon( Images::icon("browse_menu") );
	optionsMenuAct->setIcon( Images::icon("options_menu") );
	helpMenuAct->setIcon( Images::icon("help_menu") );
	*/

	// Menu Open
	recentfiles_menu->menuAction()->setText( tr("&Recent files") );
	recentfiles_menu->menuAction()->setIcon( Images::icon("recents") );
	clearRecentsAct->change( Images::icon("delete"), tr("&Clear") );

	disc_menu->menuAction()->setText( tr("&Disc") );
	disc_menu->menuAction()->setIcon( Images::icon("open_disc") );

	/* favorites->menuAction()->setText( tr("&Favorites") ); */
	favorites->menuAction()->setText( tr("F&avorites") );
	favorites->menuAction()->setIcon( Images::icon("open_favorites") );

#ifdef TV_SUPPORT
	tvlist->menuAction()->setText( tr("&TV") );
	tvlist->menuAction()->setIcon( Images::icon("open_tv") );

	radiolist->menuAction()->setText( tr("Radi&o") );
	radiolist->menuAction()->setIcon( Images::icon("open_radio") );
#endif

	// Menu Play
	speed_menu->menuAction()->setText( tr("Sp&eed") );
	speed_menu->menuAction()->setIcon( Images::icon("speed") );

	ab_menu->menuAction()->setText( tr("&A-B section") );
	ab_menu->menuAction()->setIcon( Images::icon("ab_menu") );

	// Menu Video
	videotrack_menu->menuAction()->setText( tr("&Track", "video") );
	videotrack_menu->menuAction()->setIcon( Images::icon("video_track") );

	videosize_menu->menuAction()->setText( tr("Si&ze") );
	videosize_menu->menuAction()->setIcon( Images::icon("video_size") );

	/*
	panscan_menu->menuAction()->setText( tr("&Pan && scan") );
	panscan_menu->menuAction()->setIcon( Images::icon("panscan") );
	*/
	zoom_menu->menuAction()->setText( tr("Zoo&m") );
	zoom_menu->menuAction()->setIcon( Images::icon("zoom") );

	aspect_menu->menuAction()->setText( tr("&Aspect ratio") );
	aspect_menu->menuAction()->setIcon( Images::icon("aspect") );

	deinterlace_menu->menuAction()->setText( tr("&Deinterlace") );
	deinterlace_menu->menuAction()->setIcon( Images::icon("deinterlace") );

	videofilter_menu->menuAction()->setText( tr("F&ilters") );
	videofilter_menu->menuAction()->setIcon( Images::icon("video_filters") );

	rotate_menu->menuAction()->setText( tr("&Rotate") );
	rotate_menu->menuAction()->setIcon( Images::icon("rotate") );

	ontop_menu->menuAction()->setText( tr("S&tay on top") );
	ontop_menu->menuAction()->setIcon( Images::icon("ontop") );

#if USE_ADAPTER
	screen_menu->menuAction()->setText( tr("Scree&n") );
	screen_menu->menuAction()->setIcon( Images::icon("screen") );
#endif

	denoise_menu->menuAction()->setText( tr("De&noise") );
	denoise_menu->menuAction()->setIcon( Images::icon("denoise") );

	unsharp_menu->menuAction()->setText( tr("Blur/S&harp") );
	unsharp_menu->menuAction()->setIcon( Images::icon("unsharp") );

	aspectDetectAct->change( tr("&Auto") );
	aspect11Act->change( "1&:1" );
	aspect32Act->change( "&3:2" );
	aspect43Act->change( "&4:3" );
	aspect118Act->change( "11:&8


/***************************************************************************
 *   Copyright (C) 2005-2022 by the Quassel Project                        *
 *   devel@quassel-irc.org                                                 *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) version 3.                                           *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
 ***************************************************************************/

#pragma once

#include "client-export.h"

#include <QObject>

#include "types.h"

class BufferViewConfig;
class ClientBufferViewConfig;

class CLIENT_EXPORT BufferViewOverlay : public QObject
{
    Q_OBJECT

public:
    BufferViewOverlay(QObject* parent = nullptr);

    inline const QSet<int>& bufferViewIds() { return _bufferViewIds; }
    bool allNetworks();

    const QSet<NetworkId>& networkIds();
    const QSet<BufferId>& bufferIds();
    const QSet<BufferId>& removedBufferIds();
    const QSet<BufferId>& tempRemovedBufferIds();

    int allowedBufferTypes();
    int minimumActivity();

    inline bool isInitialized() { return _uninitializedViewCount == 0; }

public slots:
    void addView(int viewId);
    void removeView(int viewId);

    void reset();
    void save();
    void restore();

    // updates propagated from the actual views
    void update();

signals:
    void hasChanged();
    void initDone();

protected:
    void customEvent(QEvent* event) override;

private slots:
    void viewInitialized();
    void viewInitialized(BufferViewConfig* config);

private:
    void updateHelper();
    QSet<BufferId> filterBuffersByConfig(const QList<BufferId>& buffers, const BufferViewConfig* config);

    bool _aboutToUpdate{false};

    QSet<int> _bufferViewIds;
    int _uninitializedViewCount{0};

    QSet<NetworkId> _networkIds;
    int _allowedBufferTypes{0};
    int _minimumActivity{0};

    QSet<BufferId> _buffers;
    QSet<BufferId> _removedBuffers;
    QSet<BufferId> _tempRemovedBuffers;

    static const int _updateEventId;
};


      }
                }
            }
        }
        v
    }

    pub fn get_applicators(&self, machine: &str, energy: f64) -> Vec<String> {
        let mut v = vec![];
        for cd in &self.data {
            if cd.machine.as_str() == machine
                && cd.get_energies_as_ref().contains(&energy)
                && !v.contains(&cd.applicator)
            {
                v.push(cd.applicator.clone());
            }
        }
        v
    }

    pub fn get_applicator_fitments(
        &self,
        machine: &str,
        energy: f64,
        applicator: &str,
    ) -> Vec<String> {
        let mut v = vec![];
        for cd in &self.data {
            if cd.machine.as_str() == machine
                && cd.get_energies_as_ref().contains(&energy)
                && cd.applicator.as_str() == applicator
            {
                for app_fit in &cd.fda.names {
                    if !v.contains(app_fit) {
                        v.push(app_fit.clone());
                    }
                }
            }
        }
        v
    }

    // Get zref in function of the machine, applicator and energy.
    pub fn get_zref<S: AsRef<str> + ?Sized>(
        &self,
        machine: &S,
        applicator: &S,
        energy: &S,
    ) -> Option<f64> {
        if let Ok(energy_) = energy.as_ref().parse::<f64>() {
            for cd in self.data.iter() {
                if cd.machine.as_str() == machine.as_ref()
                    && cd.get_energies().contains(&energy_)
                    && cd.applicator.as_str() == applicator.as_ref()
                {
                    return cd.get_zref(energy_);
                }
            }
        }
        None
    }

    pub fn calc<S: AsRef<str> + ?Sized>(
        machine: &S,
        applicator: &S,
        applicator_fitment: &S,
        energy: &S,
        ssd: &S,
        planned_beam_mu: &S,
        dose_zref: &S
    ) {
        //
    }
}

#[derive(Debug, Clone)]
pub struct Computed {}

/// Load the configuration data (outputfactors and field defining apertures)
/// and process the data into a CorrectionDataSet.
pub async fn correction_data_set_load_data(dirname: &str) -> Result<CorrectionDataSet, EmuError> {
    let res = load_data(dirname).await?;
    Ok(CorrectionDataSet::from(res))
}
use super::address_transform::AddressTransform;
use super::expression::{compile_expression, CompiledExpression, FunctionFrameInfo};
use super::range_info_builder::RangeInfoBuilder;
use super::refs::{PendingDebugInfoRefs, PendingUnitRefs};
use super::{DebugInputContext, Reader, TransformError};
use anyhow::{bail, Error};
use cranelift_codegen::isa::TargetIsa;
use gimli::{
    write, AttributeValue, DebugLineOffset, DebugLineStr, DebugStr, DebugStrOffsets,
    DebuggingInformationEntry, Unit,
};

#[derive(Debug)]
pub(crate) enum FileAttributeContext<'a> {
    Root(Option<DebugLineOffset>),
    Children {
        file_map: &'a [write::FileId],
        file_index_base: u64,
        frame_base: Option<&'a CompiledExpression>,
    },
}

fn is_exprloc_to_loclist_allowed(attr_name


dark green bags contain 2 dark blue bags.
dark blue bags contain 2 dark violet bags.
dark violet bags contain no other bags.`;

test("buildBagGraph", () => {
  const graph = buildBagGraph(input);

  expect(graph.canContain.get("light red")).toEqual(
    new Map([
      ["bright white", 1],
      ["muted yellow", 2],
    ])
  );
  expect(graph.canBeContainedBy.get("light red")).toEqual(new Map());

  expect(graph.canContain.get("shiny gold")).toEqual(
    new Map([
      ["dark olive", 1],
      ["vibrant plum", 2],
    ])
  );
  expect(graph.canBeContainedBy.get("shiny gold")).toEqual(
    new Map([
      ["bright white", 1],
      ["muted yellow", 2],
    ])
  );
});

test("getValidOutermostBags", () => {
  const graph = buildBagGraph(input);
  expect(getValidOutermostBags("shiny gold", graph)).toEqual(
    new Set(["bright white", "muted yellow", "dark orange", "light red"])
  );
});

test("getNumberOfBagsInside", () => {
  const graph = buildBagGraph(input);
  expect(getNumberOfBagsInside("faded blue", graph)).toBe(0);
  expect(getNumberOfBagsInside("dotted black", graph)).toBe(0);
  expect(getNumberOfBagsInside("vibrant plum", graph)).toBe(11);
  expect(getNumberOfBagsInside("dark olive", graph)).toBe(7);
  expect(getNumberOfBagsInside("shiny gold", graph)).toBe(32);

  const graph2 = buildBagGraph(input2);
  expect(getNumberOfBagsInside("shiny gold", graph2)).toBe(126);
});
import { ErrorCode } from 'utils/enums'

const fixtures = {
  'Should throw an error when amount is 0': {
    params: {
      amount: '0',
      extraSize: 0,
    },
    exception: ErrorCode.AmountTooSmall,
  },
  'Should throw an error when amount is less than61': {
    params: {
      amount: '60.99999999',
      extraSize: 0,
    },
    exception: ErrorCode.AmountTooSmall,
  },
  'Should pass when amount is 61': {
    params: {
      amount: '61',
      extraSize: 0,
    },
    exception: null,
  },
  'Should pass when amount is greater than 61': {
    params: {
      amount: '61.00000001',
      extraSize: 0,
    },
    exception: null,
  },
  'Should throw an error when amount is 61 amount and extraSize is 1': {
    params: {
      amount: '61',
      extraSize: 1,
    },
    exception: ErrorCode.AmountTooSmall,
  },
  'Should pass when amount is 62 and extraSize is 1': {
    params: {
      amount: '62',
      extraSize: 1,
    },
    exception: null,
  },
}

export default fixtures
import { ERROR } from '../ERROR';
import { find, insert, update ,deleteData} from '../queryTool';

export interface Courier{
    courierId:string,
    name:string,
}

export class CourierModel{

    static tableName = 'courier';

    static async addCourier(courierDetails: Courier):Promise<[ERROR, Courier[]]>{
        const [error, data] = await insert(this.tableName, courierDetails);
        return [error as ERROR, data as Courier[]];
    }

    static async getCourier(CourierId: string):Promise<[ERROR, Courier[]]>{
        const [error, data] = await find(this.tableName,["*"], "order_id", CourierId);
        return [error


 1.0, 1.0), Point3::new(5.0, 5.0, 5.0));
    let ray_x = Ray::new(
        Point3::new(0.0f32, 2.0, 2.0),
        Vector3::new(-1.0, 0.01, 0.01),
    );
    let ray_y = Ray::new(
        Point3::new(2.0f32, 0.0, 2.0),
        Vector3::new(0.01, -1.0, 0.01),
    );
    let ray_z = Ray::new(
        Point3::new(2.0f32, 2.0, 0.0),
        Vector3::new(0.01, 0.01, -1.0),
    );

    let ray_x2 = Ray::new(Point3::new(6.0f32, 2.0, 2.0), Vector3::new(1.0, 0.0, 0.0));
    let ray_y2 = Ray::new(Point3::new(2.0f32, 6.0, 2.0), Vector3::new(0.0, 1.0, 0.0));
    let ray_z2 = Ray::new(Point3::new(2.0f32, 2.0, 6.0), Vector3::new(0.0, 0.0, 1.0));

    assert_eq!(ray_x.intersection(&aabb), None);
    assert!(!ray_x.intersects(&aabb));
    assert_eq!(ray_y.intersection(&aabb), None);
    assert!(!ray_y.intersects(&aabb));
    assert_eq!(ray_z.intersection(&aabb), None);
    assert!(!ray_z.intersects(&aabb));

    assert_eq!(ray_x2.intersection(&aabb), None);
    assert!(!ray_x2.intersects(&aabb));
    assert_eq!(ray_y2.intersection(&aabb), None);
    assert!(!ray_y2.intersects(&aabb));
    assert_eq!(ray_z2.intersection(&aabb), None);
    assert!(!ray_z2.intersects(&aabb));
}

#[test]
fn test_pointing_to_box_dir_ray3_should_intersect() {
    let aabb = Aabb3::<f32>::new(Point3::new(1.0, 1.0, 1.0), Point3::new(5.0, 5.0, 5.0));
    let ray_x = Ray::new(Point3::new(0.0f32, 2.0, 2.0), Vector3::new(1.0, 0.0, 0.0));
    let ray_y = Ray::new(Point3::new(2.0f32, 0.0, 2.0), Vector3::new(0.0, 1.0, 0.0));
    let ray_z = Ray::new(Point3::new(2.0f32, 2.0, 0.0), Vector3::new(0.0, 0.0, 1.0));

    let ray_x2 = Ray::new(Point3::new(6.0f32, 2.0, 2.0), Vector3::new(-1.0, 0.0, 0.0));
    let ray_y2 = Ray::new(Point3::new(2.0f32, 6.0, 2.0), Vector3::new(0.0, -1.0, 0.0));
    let ray_z2 = Ray::new(Point3::new(2.0f32, 2.0, 6.0), Vector3::new(0.0, 0.0, -1.0));

    assert_eq!(ray_x.intersection(&aabb), Some(Point3::new(1.0, 2.0, 2.0)));
    assert!(ray_x.intersects(&aabb));
    assert_eq!(ray_y.intersection(&aabb), Some(Point3::new(2.0, 1.0, 2.0)));
    assert!(ray_y.intersects(&aabb));
    assert_eq!(ray_z.intersection(&aabb), Some(Point3::new(2.0


import streamlit as st
from moviepy.editor import AudioFileClip

def main():
    st.title("Promotoria de Justiça de Piracicaba")
    st.subheader('Audiências  >>>  mp3')
    st.text("by Pimentel - 2024")

    # Upload do arquivo de vídeo
    uploaded_file = st.file_uploader("Carregue o arquivo da audiência:", type=['mp4', 'mov', 'avi', 'mkv', 'webm', 'asf'])
    if uploaded_file is not None:
        # Configurações para o arquivo de saída
        audio_file_name = "audio_output.mp3"

        if st.button("Extrair Áudio"):
            video_path = uploaded_file.name
            st.text('Por favor, aguarde...')
            # Grava o arquivo de vídeo temporário
            with open(video_path, "wb") as f:
                f.write(uploaded_file.getvalue())

            audio = AudioFileClip(video_path)
            # Especificar que o formato de saída é mp3
            audio.write_audiofile(audio_file_name, codec='mp3', bitrate="192k")
            audio.close()

            # Disponibilizar o download do arquivo de áudio
            with open(audio_file_name, "rb") as f:
                btn = st.download_button(
                    label="Baixar arquivo de áudio",
                    data=f,
                    file_name=audio_file_name,
                    mime='audio/mpeg'
                )

if __name__ == '__main__':
    main()


LL;
	if (py_heap && py_heap != Py_None)
	{
		int ret = PyObject_IsInstance(py_heap, (PyObject *)&d3d12_Heap_Type);
		if (ret < 0)
		{
			return NULL;
		}
		else if (ret == 0)
		{
			return PyErr_Format(PyExc_ValueError, "Expected a Heap object");
		}

		d3d12_Heap *py_d3d12_heap = (d3d12_Heap *)py_heap;

		if (py_d3d12_heap->py_device != self->py_device)
		{
			return PyErr_Format(PyExc_ValueError, "Cannot use heap from a different device");
		}

		if (py_d3d12_heap->heap_type != self->heap_type)
		{
			return PyErr_Format(Compushady_BufferError, "Unsupported heap type");
		}

		if (heap_offset >= py_d3d12_heap->size)
		{
			return PyErr_Format(Compushady_BufferError,
								"Invalid heap offset (%llu) "
								"(heap size %llu)",
								heap_offset, py_d3d12_heap->size);
		}

		heap = py_d3d12_heap->heap;
	}

	Py_XDECREF(self->py_heap);
	self->py_heap = heap ? (d3d12_Heap *)py_heap : NULL;
	Py_XINCREF(self->py_heap);

	D3D12_TILED_RESOURCE_COORDINATE tile_coordinate = {};
	tile_coordinate.X = x;
	tile_coordinate.Y = y;
	tile_coordinate.Z = z;
	tile_coordinate.Subresource = slice;

	D3D12_TILE_REGION_SIZE tile_region_size = {};
	tile_region_size.NumTiles = 1;

	const D3D12_TILE_RANGE_FLAGS tile_range_flags = heap ? D3D12_TILE_RANGE_FLAG_NONE : D3D12_TILE_RANGE_FLAG_NULL;

	const UINT tile_counts = 1;
	const UINT offset = heap ? (UINT)heap_offset : 0;

	self->py_device->queue->UpdateTileMappings(self->resource, 1, &tile_coordinate, &tile_region_size, heap, 1, &tile_range_flags, &offset, &tile_counts, D3D12_TILE_MAPPING_FLAG_NONE);
	self->py_device->queue->Signal(self->py_device->fence, ++self->py_device->fence_value);
	self->py_device->fence->SetEventOnCompletion(self->py_device->fence_value, self->py_device->fence_event);
	Py_BEGIN_ALLOW_THREADS;
	WaitForSingleObject(self->py_device->fence_event, INFINITE);
	Py_END_ALLOW_THREADS;

	Py_RETURN_NONE;
}

static PyMethodDef d3d12_Resource_methods[] = {
	{"upload", (PyCFunction)d3d12_Resource_upload, METH_VARARGS, "Upload bytes to a GPU Resource"},
	{"upload2d", (PyCFunction)d3d12_Resource_upload2d, METH_VARARGS, "Upload bytes to a GPU Resource given pitch, width, height and pixel size"},
	{"upload_chunked", (PyCFunction)d3d12_Resource_upload_chunked, METH_VARARGS, "Upload bytes to a GPU Resource with the given stride and a filler"},
	{"readback", (PyCFunction)d3d12_Resource_readback, METH_VARARGS, "Readback bytes from a GPU Resource"},
	{"readback_to_buffer", (PyCFunction)d3d12_Resource_readback_to_buffer, METH_VARARGS, "Readback into a buffer from a GPU Resource"},
	{"readback2d", (


eTimer.Enabled = false;
                    int seFlag = 0;
                    for(int i = 0;i < ScanResLisv.Items.Count;i++)
                    {
                        if(ScanResLisv.Items[i].Checked == true)
                        {
                            seFlag = 1;
                            break;
                        }
                    }

                    if (seFlag == 0)
                    {
                        MessageBox.Show("清理前，您至少选择一个需要清理的垃圾文件", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                    else
                    {
                        if (rbDelete.Checked == true)
                        {
                            if (MessageBox.Show("您选择了直接删除，垃圾文件将不再进入回收站，确定直接删除吗？", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
                            {
                                int FailCount = 0, SucessCount = 0;
                                for (int i = 0; i < ScanResLisv.Items.Count; i++)
                                {
                                    if (ScanResLisv.Items[i].Checked == true)
                                    {
                                        File.Delete(ScanResLisv.Items[i].SubItems[0].Text);
                                        if (File.Exists(ScanResLisv.Items[i].SubItems[0].Text))
                                            FailCount++;
                                        else
                                        {
                                            ScanResLisv.Items[i].Remove();
                                            i--;
                                            SucessCount++;
                                        }
                                    }
                                }

                                if (FailCount != 0)
                                    MessageBox.Show("成功删除 " + SucessCount + " 个垃圾文件\r" + "还有 " + FailCount + " 个垃圾文件未清除成功，这些文件可能在使用中\r" + "建议使用文件粉碎机将其粉碎", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                                else
                                    MessageBox.Show("所选垃圾文件已成功直接删除", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            }
                        }
                        if (rbRecycle.Checked == true)
                        {
                            if (MessageBox.Show("您选择了将垃圾文件移入回收站，确定不直接删除吗？", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
                            {
                                int FailCount = 0, SucessCount = 0;
                                for (int i = 0; i < ScanResLisv.Items.Count; i++)
                                {
                                    if (ScanResLisv.Items[i].Checked == true)
                                    {
                                        recycleDelFile(ScanResLisv.Items[i].SubItems[0].Text);
                                        if (File.Exists(ScanResLisv.Items[i].SubItems[0].Text))
                                            FailCount++;
                                        else
                                        {
                                            ScanResLisv.Items[i].Remove();
                                            i--;
                                            SucessCount++;
                                        }
                                    }
                                }

                                if (FailCount != 0)
                                    MessageBox.Show("成功将 " + SucessCount + " 个垃圾文件移至回收站\r" + "还有 " + FailCount + " 个垃圾文件未移动成功，这些文件可能在使用中\r" + "建议“打开文件位置”手动将其移除", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                                else
                                    MessageBox.Show("所选垃圾文件已成功移至回收站", "


>

module Bounded_Join_Semilattice : functor (BJS : Bastet.Interface.BOUNDED_JOIN_SEMILATTICE) -> functor (A : ARBITRARY with type t := BJS.t and type 'a arbitrary := 'a Q.arbitrary) -> sig ... end

module Bounded_Meet_Semilattice : functor (BMS : Bastet.Interface.BOUNDED_MEET_SEMILATTICE) -> functor (A : ARBITRARY with type t := BMS.t and type 'a arbitrary := 'a Q.arbitrary) -> sig ... end

module Lattice : functor (


ptable.`);
  }
};
import { Action } from 'redux';

/* ------------- Define Actions and State ------------- */
export interface SessionPersistDataState {
	sessionDataExample: string;
}

export enum TypesNames {
	SET_SESSION_DATA_EXAMPLE = 'SET_SESSION_DATA_EXAMPLE'
}

export interface ActionCreator {
	setSessionDataExample: (SessionDataExample: string) => any;
}

export interface SetSessionDataExampleAction extends Action<TypesNames.SET_SESSION_DATA_EXAMPLE> {
	sessionDataExample: string;
}

/* ------------- Define Any Interfaces ------------- */
export interface ResponseExample {
	name: string;
}
import * as proto3 from '@grpc/proto-loader'
import * as grpc from '@grpc/grpc-js'
import * as call from './call';
import Exception from './ex';
export class Server{
  #server:grpc.Server
  constructor(
    readonly _proto:proto3.PackageDefinition,
    opt?:grpc.ChannelOptions
  ) {
    this.#server = new grpc.Server(opt)
  }

  handle<Request extends object,Response extends object>(serviceName:string,methodName:string,...handlers:handler<Request, Response>[]){
    if(!(handlers.length > 0)){
      throw Exception('Invalid handlers', {handlers})
    }
    const serviceDef = this._proto[serviceName] as proto3.ServiceDefinition
    if (!serviceDef){
      throw new Error(`Service "${serviceName}" is not exist in proto.`)
    }
    const methodDef = serviceDef[methodName]
    if (!methodDef){
      throw new Error(`Method "${methodName}" is not exist in service "${serviceName}".`)
    }
    let methodType:call.Type
    if (methodDef.requestStream) {
      if (methodDef.responseStream) {
        methodType = call.Type.Bidi;
      } else {
        methodType = call.Type.ClientStream;
      }
    } else {
      if (methodDef.responseStream) {
        methodType = call.Type.ServerStream;
      } else {
        methodType = call.Type.Unary;
      }
    }
    const handler = async (anyCall:call.untyped<Request, Response>,cb?:grpc.sendUnaryData<Response>)=>{
      let normalizedCall = call.Call.from(anyCall,cb)
      if (call.Typeof(anyCall,cb) !== methodType){
          normalizedCall.close(new Error('MISMATCH_CALL_TYPE'))
      }
      try{
        for (const handler of handlers){
          await handler(normalizedCall)
        }
        normalizedCall.close()
      }catch (error){
        try {
          normalizedCall.close(error)
        }catch (_){}
        throw error
      }
    }

    const success = this.#server.register(
      methodDef.path,
      handler,
      methodDef.responseSerialize,
      //@ts-ignore
      methodDef.requestDeserialize,
      methodType
    );

    if (success === false) {
      throw new Error(`Method handler for ${methodDef.path} already provided.`);
    }
  }
  listen(addr:string,cred?:grpc.ServerCredentials){
    return new Promise<void>((resolve, reject) => {
      if (!cred){
        cred = grpc.ServerCredentials.createInsecure()
      }
      this.#server.bindAsync(addr,cred,(err)=>{
        if (err){
          reject(err)
          return
        }
        resolve()
      })
    })

  }
}

export type handler<I,O> = (call:call.Call<call.untyped<I, O>>)=>Promise<void>
export default Serverexport class String


ackground:url(/web/20180320120103im_/https://light.co/assets/images/flags/flag-sweden.jpg);background-size:cover;background-position:50% 50%}#main-button.region.uk-flag{background:url(/web/20180320120103im_/https://light.co/assets/images/flags/flag-uk.jpg);background-size:cover;background-position:50% 50%}#main-button.region.us-flag{background:url(/web/20180320120103im_/https://light.co/assets/images/flags/flag-us.jpg);background-size:cover;background-position:50% 50%}#main-button.region.eu-flag{background:url(/web/20180320120103im_/https://light.co/assets/images/flags/flag-eu.jpg);background-size:cover;background-position:50% 50%}#video-modal .slideshow{background:rgba(0,0,0,.5);max-width:100%;max-height:100%;right:0;top:0;margin:0 auto;overflow-y:hidden;z-index:99999!important}#video-modal .slideshow li{top:15%;background:#f5f5f5;max-width:1200px;padding:.5em;text-align:center;box-shadow:0 0 3px 3px rgba(0,0,0,.1);margin:-20% 0 0 -24%;left:0;right:0;margin:0 auto;top:15%}#footer .img-overlay{margin:5px;display:none}#footer #video-modal .slideshow li figure{padding:0 0 9em}#footer .country{position:absolute;width:auto;left:0;right:0;top:43%;z-index:999}#footer .flag img{max-width:100%;padding:5px}#footer #video-modal .medium-6.columns{width:100%;padding:0}#footer #video-modal .slideshow{overflow-y:scroll}#footer .slideshow li a{position:relative;float:left;width:33.3%;font-size:30px;text-align:center;line-height:1em;padding:0;color:#fff;overflow:hidden}#footer .slideshow li a:hover{color:#888}#footer .slideshow li a:hover img{opacity:.15}#footer .close.hairline{border:2px solid #888;border-radius:50%;width:50px;height:50px;right:5px;top:5px;transition:.3s;-webkit-transition:.3s}#footer .close.hairline:hover{border:2px solid #00b0ed}#footer .close::before,#footer .close::after{top:23px;background:#888;right:0;margin:0 auto;max-width:80px;width:34px}#footer .close:hover::before,#footer .close:hover::after{background:#00b0ed;transition:.3s;-webkit-transition:.3s}#footer #video-modal .slideshow li figure{padding:1em 0}#footer #video-modal{float:none;width:auto;clear:left}#footer #video-modal .grid{padding-top:0;max-width:200px;float:left}#video-modal .slideshow .close.hairline{float:right;cursor:pointer}#footer #main-button{float:left;text-shadow:0 0 20px #000}#footer #mc-form #main-button{text-shadow:none}span#country{font-size:.7em;color:#a6a6a6;font-family:HarmoniaSansStd-Light,Helvetica,Arial,sans-serif;margin-right:10px;display:none}#copyright p{font-size:12px}#copyright{width:100%;text-align:center;padding-top:3.5em}#copyright p{margin-top:.9em}#social{padding-left:1.5em;float:left;margin:0;line-height:1em}#social li{padding:.7em .6em}#social li a{


  - 通用：
    - 修复@时显示QQ号的问题（这次是真的）
    - 修复release ci没有正确设置版本的问题
    - 支持重定义特定命令的前缀，可以设置无需前缀的自定义命令，参考完整配置的`customCommandPrefix`
    - 支持定义`cronjob`定时消息模板，详细介绍请看[模板介绍](/TEMPLATE.md)
    - 增加b站下播的准确检查，现在不会再发生`错误下播->马上开播`的情况了
  - 模板：
    - 现在支持自定义命令传入文字参数，在模板中可以通过{{.cmd}}和{{.args}}变量获取命令名字和参数
    - 增加`trigger.private.new_friend_added.tmpl`事件模板
    - 增加`trigger.private.group_invited.tmpl`事件模板
    - 增加`hour minute second month year day yearday`等时间函数
    - 新增私聊命令`/ping`支持模板
    - 模板函数`pic`默认不再对url图片进行缓存，这意味着会返回随机图片的url可以正常工作了
- 2022-04-14 v1.0.6
  - 通用：
    - 更换自定义miraigo，可能减少消息发送失败
    - 增加定时监测新版本，并会通知Admin
    - 使用新的推送限流方式，现在更多地考虑账号稳定
    - 支持Concern启动失败，没有启动成功的Concern无法再使用相关命令
    - 支持B站不配置帐号使用，仅推荐订阅**不超过5个**时使用（用于初次部署时快速验证），**配置帐号仍旧是最佳方案**
    - 修复@时显示QQ号的问题
    - 增加推送消息的并发配置，默认为1以优先保证账号稳定，当出现推送堆积的时候可以尝试调高
    - 支持配置不推送BOT离线期间的B站动态和直播
    - 现在当BOT设置为私人模式时，被私自拉进群聊时无法再使用了（当群聊人数较少时，系统会直接同意，无法拒绝）
  - 模板：
    - 模板函数pic支持本地gif
    - 新增模板函数用于@成员
    - 新增模板函数显示成员头像
    - 增加更多消息模板上下文，主要是群命令和私聊命令的member_code/member_name
    - 现在模板消息会自动去掉模板末尾的EOL，一些editor可能会自动添加EOL（eg. V


+ L_OBJC_SELECTOR_REFERENCES_2668dedcc69bf8fb-L6$pb]
	mov	dword ptr [eax], ecx
	mov	dword ptr [eax + 4], ecx
	pop	ebp
	ret	4

	.globl	_fn8_use_in_loop
	.p2align	4
_fn8_use_in_loop:
	push	ebp
	mov	ebp, esp
	pop	ebp
	ret

	.section	__TEXT,__objc_methname,cstring_literals
	.globl	L_OBJC_METH_VAR_NAME_2668dedcc69bf8fb
L_OBJC_METH_VAR_NAME_2668dedcc69bf8fb:
	.asciz	"simple"

	.globl	L_OBJC_METH_VAR_NAME_29d0234b9445d447
L_OBJC_METH_VAR_NAME_29d0234b9445d447:
	.asciz	"unused"

	.globl	L_OBJC_METH_VAR_NAME_9303807037ba4f9f
L_OBJC_METH_VAR_NAME_9303807037ba4f9f:
	.asciz	"simple"

	.globl	L_OBJC_METH_VAR_NAME_a23daf114eba1518
L_OBJC_METH_VAR_NAME_a23daf114eba1518:
	.asciz	"loopedSelector"

	.globl	L_OBJC_METH_VAR_NAME_e91a5376ddae3cfc
L_OBJC_METH_VAR_NAME_e91a5376ddae3cfc:
	.asciz	"fourthSel"

	.globl	L_OBJC_METH_VAR_NAME_ff60dae1998e0c85
L_OBJC_METH_VAR_NAME_ff60dae1998e0c85:
	.asciz	"i:am:different:"

	.section	__DATA,__objc_selrefs,literal_pointers
	.globl	L_OBJC_SELECTOR_REFERENCES_2668dedcc69bf8fb
	.p2align	2, 0x0
L_OBJC_SELECTOR_REFERENCES_2668dedcc69bf8fb:
	.long	L_OBJC_METH_VAR_NAME_2668dedcc69bf8fb

	.globl	L_OBJC_SELECTOR_REFERENCES_29d0234b9445d447
	.p2align	2, 0x0
L_OBJC_SELECTOR_REFERENCES_29d0234b9445d447:
	.long	L_OBJC_METH_VAR_NAME_29d0234b9445d447

	.globl	L_OBJC_SELECTOR_REFERENCES_9303807037ba4f9f
	.p2align	2, 0x0
L_OBJC_SELECTOR_REFERENCES_9303807037ba4f9f:
	.long	L_OBJC_METH_VAR_NAME_9303807037ba4f9f

	.globl	L_OBJC_SELECTOR_REFERENCES_a23daf114eba1518
	.p2align	2, 0x0
L_OBJC_SELECTOR_REFERENCES_a23daf114eba1518:
	.long	L_OBJC_METH_VAR_NAME_a23daf114eba1518

	.globl	L_OBJC_SELECTOR_REFERENCES_e91a5376ddae3cfc
	.p2align	2, 0x0
L_OBJC_SELECTOR_REFERENCES_e91a5376ddae3cfc:
	.long	L_OBJC_METH_VAR_NAME_e91a5376ddae3cfc

	.globl	L_OBJC_SELECTOR_REFERENCES_ff60dae1998e0c


import mock
import sqlalchemy
import sqlalchemy.dialects.postgresql.psycopg2 as sqlalchemy_dialect_psycopg2
import sqlalchemy.orm as sqlalchemy_orm

SERVER_VERSION_INFO = (123, 45, 67, 89)
SERVER_VERSION = ".".join(map(str, SERVER_VERSION_INFO))

@mock.patch.object(sqlalchemy_dialect_psycopg2.PGDialect_psycopg2, "_get_server_version_info")
def test_server_version_default(patched_server_version: mock.Mock, sa_session: sqlalchemy_orm.Session):
    patched_server_version.return_value = SERVER_VERSION_INFO

    sa_session.scalar("select 1")

    assert sa_session.get_bind().dialect.server_version_info == SERVER_VERSION_INFO
    patched_server_version.assert_called_once()

@mock.patch.object(sqlalchemy_dialect_psycopg2.PGDialect_psycopg2, "_get_server_version_info")
def test_server_version_error(patched_server_version: mock.Mock, sa_session: sqlalchemy_orm.Session):
    patched_server_version.side_effect = AssertionError

    sa_session.scalar("select 1")

    assert sa_session.get_bind().dialect.server_version_info == (9, 3)
    patched_server_version.assert_called_once()

@mock.patch.object(sqlalchemy_dialect_psycopg2.PGDialect_psycopg2, "_get_server_version_info")
def test_server_version_overwritten(patched_server_version: mock.Mock, engine_url: str):
    sa_engine = sqlalchemy.create_engine(engine_url, connect_args=dict(server_version=SERVER_VERSION))
    sa_session_maker = sqlalchemy_orm.sessionmaker(bind=sa_engine)
    sa_session = sa_session_maker()

    sa_session.scalar("select 1")

    assert sa_session.get_bind().dialect.server_version_info == SERVER_VERSION_INFO
    patched_server_version.assert_not_called()


adius-topleft:0.366em;-webkit-border-top-left-radius:0.366em;border-top-left-radius:0.366em;-moz-border-radius-topright:0.366em;-webkit-border-top-right-radius:0.366em;border-top-right-radius:0.366em}ul.tabs li a:hover{background:#ccc}ul.tabs li.active,ul.tabs li.active a:hover{background:#fff;border-bottom:1px solid #fff;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.tab-container{background:#fff;border:1px solid #999;clear:both;-webkit-border-radius:0.366em;-moz-border-radius:0.366em;-ms-border-radius:0.366em;-o-border-radius:0.366em;border-radius:0.366em}.tab-content{padding:1.3em 0 0.458em}.tab-content h3,.tab-content h4{background:#2F5163;border:1px solid #1f3540;color:#fff;font-size:1.25em;left:-30px;position:relative;padding:0.366em 1em;float:left;text-shadow:0 1px 1px #000;text-transform:capitalize;-moz-border-radius-topright:0.458em;-webkit-border-top-right-radius:0.458em;border-top-right-radius:0.458em;-moz-border-radius-bottomright:0.458em;-webkit-border-bottom-right-radius:0.458em;border-bottom-right-radius:0.458em;-moz-border-radius-topleft:0.458em;-webkit-border-top-left-radius:0.458em;border-top-left-radius:0.458em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.25),1px 1px 0.275em #ccc;-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.25),1px 1px 0.275em #ccc;box-shadow:inset 0 1px 0 rgba(255,255,255,0.25),1px 1px 0.275em #ccc}.tab-content h3:after,.tab-content h4:after{content:' ';position:absolute;width:0;height:0;left:0;top:100%;border-width:0.366em 0.366em;border-style:solid;border-color:#000 #000 transparent transparent}.tab-content img{float:left;margin:0 1.3em 1.3em 0;padding:0.366em}.mail-templates .mail-template{display:block;margin:1em;padding:1em;background:#ededed;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0.366em rgba(150,150,150,0.5);-moz-box-shadow:inset 0 1px 0 #fff,0 1px 0.366em rgba(150,150,150,0.5);box-shadow:inset 0 1px 0 #fff,0 1px 0.366em rgba(150,150,150,0.5);border:1px solid #aaa;border-color:#aaa #999 #888;-webkit-border-radius:0.458em;-moz-border-radius:0.458em;-ms-border-radius:0.458em;-o-border-radius:0.458em;border-radius:0.458em}.mail-templates .mail-template .mail-subject{font-style:italic}.mail-templates .mail-template .mail-body{word-wrap:break-word}.form-item{border-top:1px solid #d9d9d9;clear:both;margin:1.3em 0;padding:0.458em 0 0}.field-settings>.form-item{display:inline-block;vertical-align:top;padding:.5em}.fieldset-fields{clear:both;margin-bottom:1em}label{display:-moz-inline-stack;display:inline-block;vertical-align:middle;*


/*
     * Long integer shift, 2addr version.  vA is 64-bit value/result, vB is
     * 32-bit shift distance.
     */
    /* ushr-long/2addr vA, vB */
    GET_OPA4(t3)                           #  t3 <- A+
    GET_OPB(a3)                            #  a3 <- B
    GET_VREG(a2, a3)                       #  a2 <- vB
    EAS2(t0, rFP, t3)                      #  t0 <- &fp[A]
    LOAD64(a0, a1, t0)                     #  a0/a1 <- vAA/vAA+1

    FETCH_ADVANCE_INST(1)                  #  advance rPC, load rINST
    GET_INST_OPCODE(t0)                    #  extract opcode from rINST

    andi      v0, a2,


//
// KeyPressEventArgs.cs
//
// Copyright (C) 2018 OpenTK
//
// This software may be modified and distributed under the terms
// of the MIT license. See the LICENSE file for details.
//

namespace OpenTK.Windowing.Common
{
    /// <summary>
    ///     Raised when a single unicode code point is input.
    /// </summary>
    public readonly struct TextInputEventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TextInputEventArgs"/> struct.
        /// </summary>


"
- Az az érzés, mintha egy "irreális" vagy hiányzó éned lenne: "Nincs énem"
- A világ megtapasztalása távoli, álomszerű, ködös, élettelen, színtelen, mesterséges, mint egy mélység nélküli, vagy egy kevésbé valóságos kép.
- Önmagába merül, és kényszeres önvizsgálatot vagy szélsőséges rágódást tapasztal.
- Folyamatos és összefüggő párbeszéd önmagaddal
- Úgy érzi, mintha egy fátyol vagy üvegfal választaná el a világtól.
- Érzelmi vagy fizikai zsibbadtság, például olyan érzés, mintha a fejed vattával lenne tele.
- A cselekvőképesség érzésének hiánya - laposnak, robotszerűnek, halottnak vagy "zombinak" érzi magát.
- Képtelenség a dolgok elképzelésére
- Képes tisztán gondolkodni, de úgy érzi, mintha valami lényeges tulajdonság hiányzik a gondolataiból vagy a világ megtapasztalásából.
- Az élettől való elszakítottság érzése, ami akadályozza a világgal való kreatív és nyílt kapcsolatteremtésben.

Lehet, hogy kevés gondot fordítasz a fizikai megjelenésedre, és csak az alapvető használati szükségletekhez nyúlsz a ruházat és a személyes higiénia terén. Alternatív megoldásként előfordulhat, hogy túlságosan is a megjelenésedre koncentrálsz, és megpróbálsz valamiféle örömet, a büszkeség bármilyen érzését kiváltani a saját testeddel kapcsolatban, de csak még több ürességgel találkozol.

Lehet, hogy nem törődsz a tested állapotával, talán még a haláltól sem félsz, mert olyan kevés kötődést érzel az életedhez.

{!{
{{import '~/tweet' ids=[
  '1215716438972993536'
  '1215736608055537670'
  '1215738145473474560'
  '1215740224325783553'
] tweets=meta.tweets className="oneblock" }}
 }!}

A **derealizáció** a körülötted lévő világtól való elszakadás, egy mentális érzés, hogy minden, amit érzékelsz, hamis.

- A környezeted idegennek vagy ismeretlennek tűnik, még akkor is, ha mindig is ott voltál, mintha valaki kicserélte volna a házadat egy színpadi másolatra.
- A világban való mozgás olyan, mintha egy futópadon járnál, ahol az épületek körülötted mozognak, nem pedig te rajtuk keresztül.
- Úgy érzed, hogy érzelmileg elszakadtál azoktól az emberektől, akik fontosak neked, mintha üvegfal választana el, vagy mintha ők csak színészek lennének, akik ú