_time = ?
      where id == ? and type == ?;
    """, [
      updateTime,
      hasNewUpdate ? 1 : 0,
      DateTime.now().millisecondsSinceEpoch,
      id,
      type.value,
    ]);
  }

  void updateCheckTime(
    String folder,
    String id,
    ComicType type,
  ) {
    _db.execute("""
      update "$folder"
      set last_check_time = ?
      where id == ? and type == ?;
    """, [DateTime.now().millisecondsSinceEpoch, id, type.value]);
  }

  int countUpdates(String folder) {
    return _db.select("""
      select count(*) as c from "$folder"
      where has_new_update == 1;
    """).first['c'];
  }

  List<FavoriteItemWithUpdateInfo> getUpdates(String folder) {
    if (!existsFolder(folder)) {
      return [];
    }
    var res = _db.select("""
      select * from "$folder"
      where has_new_update == 1;
    """);
    return res
        .map(
          (e) => FavoriteItemWithUpdateInfo(
            FavoriteItem.fromRow(e),
            e['last_update_time'],
            e['has_new_update'] == 1,
            e['last_check_time'],
          ),
        )
        .toList();
  }

  List<FavoriteItemWithUpdateInfo> getComicsWithUpdatesInfo(String folder) {
    if (!existsFolder(folder)) {
      return [];
    }
    var res = _db.select("""
      select * from "$folder";
    """);
    return res
        .map(
          (e) => FavoriteItemWithUpdateInfo(
            FavoriteItem.fromRow(e),
            e['last_update_time'],
            e['has_new_update'] == 1,
            e['last_check_time'],
          ),
        )
        .toList();
  }

  void markAsRead(String id, ComicType type) {
    var folder = appdata.settings['followUpdatesFolder'];
    if (!existsFolder(folder)) {
      return;
    }
    _db.execute("""
      update "$folder"
      set has_new_update = 0
      where id == ? and type == ?;
    """, [id, type.value]);
  }

  void close() {
    _db.dispose();
  }

  void notifyChanges() {
    notifyListeners();
  }
}
part of 'components.dart';

class SliverGridViewWithFixedItemHeight extends StatelessWidget {
  const SliverGridViewWithFixedItemHeight(
      {required this.delegate,
      required this.maxCrossAxisExtent,
      required this.itemHeight,
      super.key});

  final SliverChildDelegate delegate;

  final double maxCrossAxisExtent;

  final double itemHeight;

  @override
  Widget build(BuildContext context) {
    return SliverLayoutBuilder(
      builder: (context, constraints) => SliverGrid(
        delegate: delegate,
        gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
          maxCrossAxisExtent: maxCrossAxisExtent,
          childAspectRatio: calcChildAspectRatio(constraints.crossAxisExtent),
        ),
      ),
    );
  }

  double calcChildAspectRatio(double width) {
    var crossItems = width ~/ maxCrossAxisExtent;
    if (width % maxCrossAxisExtent != 0) {
      crossItems += 1;
    }
    final itemWidth = width / crossItems;
    return itemWidth / itemHeight;
  }
}

class SliverGridDelegateWithFixedHeight extends SliverGridDelegate {
  const SliverGridDelegateWithFixedHeight({
    required this.maxCrossAxisExtent,
    required this.itemHeight,
  });

  final double maxCrossAxisExtent;

  final


 ROS.
   * @param config the parameters as XML.
   * @return true if successful.
   */
  bool readParameters() override;

  /*!
   * Initialization.
   */
  bool initialize() override;

  /*!
   * Generates the visualization.
   * @param map the grid map to visualize.
   * @return true if successful.
   */
  bool visualize(const grid_map::GridMap & map) override;

private:
  //! Type that is transformed to the occupancy grid.
  std::string layer_;

  //! Values that are between lower and upper threshold are shown.
  float lowerThreshold_, upperThreshold_;

  //! ROS publisher.
  rclcpp::Publisher<nav_msgs::msg::GridCells>::SharedPtr publisher_;
};

}  // namespace grid_map_visualization
#endif  // GRID_MAP_VISUALIZATION__VISUALIZATIONS__GRIDCELLSVISUALIZATION_HPP_
/*
 * FlatGroundTest.cpp
 *
 *  Created on: Nov 4, 2019
 *      Author: Edo Jelavic
 *      Institute: ETH Zurich, Robotic Systems Lab
 */

#include <gtest/gtest.h>
#include <rclcpp/rclcpp.hpp>
#include <rcutils/error_handling.h>

#include <cstdlib>
#include <memory>
#include <string>

#include "grid_map_pcl/GridMapPclLoader.hpp"
#include "PointcloudCreator.hpp"
#include "test_helpers.hpp"

namespace grid_map
{
namespace grid_map_pcl_test
{
class GridMapPclLoaderTest : public ::testing::Test
{
protected:
  void SetUp() override
  {
    // Changing the logging verbosity to WARN
    auto ret = rcutils_logging_set_logger_level(
      test_logger_.get_name(), RCUTILS_LOG_SEVERITY_WARN);
    if (ret != RCUTILS_RET_OK) {
      RCLCPP_ERROR(
        test_logger_, "Failed to change logging severity: %s",
        rcutils_get_error_string().str);
      rcutils_reset_error();
    }
  }

  rclcpp::Logger test_logger_ = rclcpp::get_logger("GridMapPclLoaderTest");
};

// cppcheck-suppress syntaxError
TEST_F(GridMapPclLoaderTest, FlatGroundRealDataset)
{
  grid_map::GridMapPclLoader gridMapPclLoader(test_logger_);
  gridMapPclLoader.loadParameters(grid_map_pcl_test::getConfigFilePath());
  gridMapPclLoader.loadCloudFromPcdFile(grid_map_pcl_test::getTestPcdFilePath());
  gridMapPclLoader.preProcessInputCloud();
  gridMapPclLoader.initializeGridMapGeometryFromInputCloud();
  gridMapPclLoader.addLayerFromInputCloud(grid_map_pcl_test::layerName);

  const auto & gridMap = gridMapPclLoader.getGridMap();
  const auto elevationValues = grid_map_pcl_test::getNonNanElevationValues(gridMap);

  EXPECT_GT(elevationValues.size(), 0ul);

  // test that all the elevation values are equal
  // allow for some difference (2cm) since the input cloud is noisy (real dataset)
  double referenceElevation = elevationValues.front();
  for (const auto & elevation : elevationValues) {
    EXPECT_NEAR(elevation, referenceElevation, 2e-2);
  }
}

TEST_F(GridMapPclLoaderTest, PerfectPlane)
{
  const auto seed = std::rand();
  grid_map_pcl_test::rndGenerator.seed(seed);

  const int numTests = 10;
  for (int i = 0; i < numTests; ++i) {
    double height;
    auto cloud = grid_map_pcl_test::PointcloudCreator::createPerfectPlane(&heigh


 config = new AuthingRequestConfig();
		config.setUrl("/api/v3/batch-create-dnef");
		config.setBody(reqDto);
		config.setMethod("POST");
		String response = request(config);
		return deserialize(response, IsSuccessRespDto.class);
	}

	/**
	 * @summary 删除数据资源扩展字段
	 */
	public IsSuccessRespDto deleteDnef(DeleteDenfDto reqDto) {
		AuthingRequestConfig config = new AuthingRequestConfig();
		config.setUrl("/api/v3/delete-dnef");
		config.setBody(reqDto);
		config.setMethod("POST");
		String response = request(config);
		return deserialize(response, IsSuccessRespDto.class);
	}

	/**
	 * @summary 修改数据资源扩展字段
	 */
	public IsSuccessRespDto updateDnef(UpdateDenfDto reqDto) {
		AuthingRequestConfig config = new AuthingRequestConfig();
		config.setUrl("/api/v3/update-dnef");
		config.setBody(reqDto);
		config.setMethod("POST");
		String response = request(config);
		return deserialize(response, IsSuccessRespDto.class);
	}

	/**
	 * @summary 获取数据资源扩展字段列表
	 */
	public GetDenfListResponseDto getDnefList(GetDenfListDto reqDto) {
		AuthingRequestConfig config = new AuthingRequestConfig();
		config.setUrl("/api/v3/list-dnef");
		config.setBody(reqDto);
		config.setMethod("GET");
		String response = request(config);
		return deserialize(response, GetDenfListResponseDto.class);
	}

	/**
	 * @summary 创建数据策略（重点）
	 * @description
 * ## 描述
 * 该接口用于创建数据策略，通过数据策略你可以将一组数据资源及其指定的操作进行绑定到一起，共同授权给主体。
 * ## 注意
 * 为了方便使用，`permissions` 字段我们基于路径的方式提供了快捷的写法，如：
 * - 数组、字符串资源：权限空间 code/数据资源 code/数据资源某一 action（如果表示所有操作，则使用`*`替代action）
 * - 树类型资源：权限空间 code/数据资源 code/node code 1/node code 1_1/.../数据资源某一 action
 *
 * ## 请求示例
 * 假设我们要对一名研发人员进行授权，首先创建 3 个数据资源如下：
 * ```json
 * {
 * "namespaceCode": "examplePermissionNamespace",
 * "resourceName": "服务器",
 * "resourceCode": "server_2023",
 * "type": "STRING",
 * "struct": "server_2023",
 * "actions": ["read", "write"]
 * }
 * ```
 * ```json
 * {
 * "namespaceCode": "examplePermissionNamespace",
 * "resourceName": "研发知识库",
 * "description": "",
 * "resourceCode": "rd_document",
 * "type": "STRING",
 * "struct": "https://www.authing.com/rd_document",
 * "actions": ["read", "write", "share"]
 * }
 * ```
 * ```json
 * {
 * "namespaceCode": "examplePermissionNamespace",
 * "resourceName": "研发内部平台菜单",
 * "description": "这是研发使用的内


n-right: auto;
  vertical-align: 10%;
  filter: saturate(0%);
  margin-bottom: -0.07em;
  margin-top: -20%;
  mix-blend-mode: normal;
  cursor: text;

  // Don't pollute copied text with favicon
  user-select: none;

  // Make favicons align properly with headings
  h1 &,
  h2 &,
  h3 &,
  h4 &,
  h5 &,
  h6 & {
    vertical-align: 65%;
  }

  &.close-text {
    margin-left: 0.05rem;
  }

  &[src$="cladlab_nd_edu.avif"] {
    filter: invert(90%);
  }

  // These are really dark by default so we make them match var(--foreground)
  &[src$="mail.svg"],
  &[src$="readthesequences_com.avif"] {
    // Computed to match var(--foreground) using https://codepen.io/sosuke/pen/Pjoqqp
    filter: invert(27%);

    :root[data-theme="dark"] & {
      filter: invert(91%) sepia(6%) hue-rotate(185deg) contrast(92%);
    }
  }

  &[src$="mail.svg"] {
    margin-left: 0.05rem;
  }

  &[src$="forum_effectivealtruism_org.avif"] {
    filter: saturate(0%) invert(100%) sepia(100%) hue-rotate(185deg) contrast(100%);
  }

  :root[data-theme="dark"] &[src$="opentimestamps_org.avif"] {
    filter: saturate(0%) invert(80%) sepia(6%) hue-rotate(185deg) contrast(92%);
  }

  // Make the anchor icon less bright on dark mode
  &[src$="anchor.svg"] {
    // Rotate the anchor so that it resembles the trout within-site icon
    // also flip it horizontally
    transform: rotate(-90deg) scaleX(-1) scale(1.2);
    filter: invert(27%);

    :root[data-theme="dark"] & {
      filter: invert(80%) sepia(6%) hue-rotate(185deg) contrast(92%);
    }
  }

  &[src$="gwern_net.avif"] {
    :root[data-theme="light"] & {
      filter: invert(100%);
      mix-blend-mode: multiply;
    }
  }

  // Make it less searingly bright on dark mode
  &[src$="wikipedia_org.avif"] {
    :root[data-theme="dark"] & {
      filter: contrast(75%);
    }
  }

  // Very dark by default
  &[src$="github_com.avif"] {
    :root[data-theme="light"] & {
      filter: invert(25%);
    }

    :root[data-theme="dark"] & {
      filter: invert(75%) sepia(6%) hue-rotate(185deg) contrast(92%);
    }
  }

  // Make logos white on dark mode
  &[src$="nips_cc.avif"],
  &[src$="matsprogram_org.avif"],
  &[src$="proceedings_mlr_press.avif"] {
    :root[data-theme="dark"] & {
      filter: invert(100%) grayscale(100%);
    }
  }

  &[src$="arbital_com.avif"],
  &[src$="aaai_org.avif"] {
    :root[data-theme="light"] & {
      filter: brightness(0.3);
    }
  }

  // Gray logos made white on dark mode
  &[src$="alignmentforum_org.avif"],
  &[src$="ai-alignment_com.avif"] {
    :root[data-theme="dark"] &


//******************************************************************************
//  Copyright (c) 2005-2013 by Jan Van hijfte
//
//  See the included file COPYING.TXT for details about the copyright.
//
//  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.
//******************************************************************************

#ifndef QTEXTEDIT_HOOK_C_H
#define QTEXTEDIT_HOOK_C_H

#include "qtextedit_hook.h"

C_EXPORT QTextEdit_hookH QTextEdit_hook_Create(QObjectH handle);
C_EXPORT void QTextEdit_hook_Destroy(QTextEdit_hookH handle);
C_EXPORT void QTextEdit_hook_hook_textChanged(QTextEdit_hookH handle, QHookH hook);
C_EXPORT void QTextEdit_hook_hook_undoAvailable(QTextEdit_hookH handle, QHookH hook);
C_EXPORT void QTextEdit_hook_hook_redoAvailable(QTextEdit_hookH handle, QHookH hook);
C_EXPORT void QTextEdit_hook_hook_currentCharFormatChanged(QTextEdit_hookH handle, QHookH hook);
C_EXPORT void QTextEdit_hook_hook_copyAvailable(QTextEdit_hookH handle, QHookH hook);
C_EXPORT void QTextEdit_hook_hook_selectionChanged(QTextEdit_hookH handle, QHookH hook);
C_EXPORT void QTextEdit_hook_hook_cursorPositionChanged(QTextEdit_hookH handle, QHookH hook);

#endif


ROW_COPIED);
        }

		if (!owner.updateOK())
        {
			throw StandardException.newException(
                    SQLState.DATA_CONTAINER_READ_ONLY);
        }

		if ((src_slot < 0) || ((src_slot + num_rows) > recordCount))
        {
			throw StandardException.newException(
                    SQLState.DATA_SLOT_NOT_ON_PAGE);
        }

		if (SanityManager.DEBUG) {
			// first copy into the destination page, let it do the work
			// if no problem, then purge from this page
			SanityManager.ASSERT((destPage instanceof BasePage), "must copy from BasePage to BasePage");
		}

		BasePage dpage = (BasePage)destPage;

		// make sure they are from the same container - this means they are of
		// the same size and have the same page and record format.

		PageKey pageId = getPageId(); // RESOLVE: MT problem ?

		if (!pageId.getContainerId().equals(dpage.getPageId().getContainerId()))
        {
			throw StandardException.newException(
                    SQLState.DATA_DIFFERENT_CONTAINER,
                    pageId.getContainerId(),
                    dpage.getPageId().getContainerId());
        }

		int[] recordIds = new int[num_rows];

		RawTransaction t = owner.getTransaction();

		// lock the records to be purged and calculate total space needed
		for (int i = 0; i < num_rows; i++)
		{
			RecordHandle handle = getRecordHandleAtSlot(src_slot+i);
			owner.getLockingPolicy().lockRecordForWrite(t, handle, false, true);

			recordIds[i] = getHeaderAtSlot(src_slot + i).getId();
		}

		// first copy num_rows into destination page
		dpage.copyInto(this, src_slot, num_rows, dest_slot);

		// Now purge num_rows from this page
		// Do NOT purge overflow rows, if it has such a thing.  This operation
		// is called by split and if the key has overflow, spliting the head
		// page does not copy over the remaining pieces, i.e.,the new head page
		// still points to those pieces.

		owner.getActionSet().actionPurge(
            t, this, src_slot, num_rows, recordIds, true);
	}

	/**
		Unlatch the page.
		@see Page#unlatch
	*/
	public void unlatch() {
		if (SanityManager.DEBUG) {
			SanityManager.ASSERT(isLatched(),
                "unlatch() attempted on page that is not latched.");
		}

        releaseExclusive();
	}

	/**
	 * Check whether the page is latched.
	 *
	 * @return true if the page is latched, false
	 * otherwise
	 * @see Page#isLatched
	 */
	public final synchronized boolean isLatched() {
		if (SanityManager.DEBUG) {
			SanityManager.ASSERT(identity != null);
		}

		return owner != null;
	}

	/** @see Page#recordCount */
	public final int recordCount() {
		if (SanityManager.DEBUG) {
			SanityManager.ASSERT(
                isLatched(), "page not latched on call to recordCount()");
		}

		return recordCount;
	}

	/**
		get record count without checking for latch
	*/
	protected abstract int internalDeletedRecordCount();

	/**
		get record count without checking for latch
	*/
	protected int internalNonDeletedRecordCount()
	{
		// deallocated or freed page, don't count
		if (pageStatus != VALID_PAGE)
			return 0;

		int deletedCount = internalDeletedRecordCount();

		if (deletedCount == -1) {
			int count = 0;
			int	maxSlot = recordCount;
			for (int slot = FIRST_SLOT_NUMBER ; slot < maxSlot; slot++) {
				if (!isDeletedOnPage(slot))
					count++;
			}
			return count;

		} else  {

			if (SanityManager.DEBUG) {
				int delCount = 0;
				int	maxSlot = recordCount;
				for (int slot = FIRST_SLOT_NUMBER ; slot < maxSlot; slot++) {
					if (recordHeaderOnDemand(slot).isDeleted())
						delCount++;


ors.add(c);
          }
        }
      });
    }

    if (didInputText && modifiedBlocks != null) {
      for (final a in d.history.actions) {
        if (!modifiedBlocks.contains(a.block)) {
          modifiedBlocks.add(a.block!);
        }
      }
    }

    if (doScroll) {
      scrollToLine(d.cursor().block?.line ?? -1);
      // if (d.largeDoc) {
      //   touch();
      // }
    }
  }

  void scrollToLine(int line) {
    if (line != scrollTo) {
      scrollTo = line;
      if (line - 4 < visibleStart || line + 4 > visibleEnd) {
        notifyListeners();
      }
    }
  }
}

class DocumentProvider extends CodeEditingController {}
import 'dart:io';
import 'dart:async';
import 'dart:convert';
import 'package:path/path.dart' as _path;
import 'package:editor/services/explorer/filesystem.dart';

class LocalFs extends ExplorerBackend {
  List<ExplorerListener> listeners = [];
  List<FileSystemEntity> files = [];
  String rootPath = '';

  void addListener(ExplorerListener listener) {
    listeners.add(listener);
  }

  void setRootPath(String path) {
    rootPath = _path.normalize(path);
  }

  int _depth(String path) {
    String ll = path.replaceAll('/', '');
    ll = ll.replaceAll('\\', '');
    return (path.length - ll.length);
  }

  void _loadPath(String path, {bool recursive: false}) {
    files = <FileSystemEntity>[];
    Directory dir = Directory(path);
    int depthRoot = _depth(dir.absolute.path);
    var lister = dir.list(recursive: recursive, followLinks: false);

    final _sendTheFiles = () {
      Map<String, dynamic> dirs = {};
      dirs[_path.normalize(dir.absolute.path)] = {
        'path': _path.normalize(dir.absolute.path),
        'isDirectory': true,
        'items': []
      };
      List<dynamic> items = [];
      for (final i in files) {
        String p = _path.normalize(i.path);
        if (i is Directory) {
          dirs[p] = {
            'path': p,
            'isDirectory': true,
            'items': [],
          };
        }

        final d = dirs[_path.dirname(p)] ?? {};
        d['items']?.add({'path': p, 'isDirectory': (i is Directory)});
      }

      files.clear();

      listeners.forEach((l) {
        for (final k in dirs.keys) {
          final json = jsonEncode(dirs[k]);
          Future.delayed(Duration(milliseconds: 0), () {
            l.onLoad(json);
          });
        }
      });
    };

    lister.listen((file) {
      files.add(file);
    }, onError: (err) {
      listeners.forEach((l) {
        l.onError(jsonEncode({'path': path, 'operation': 'load'}));
      });
    }, onDone: () {
      _sendTheFiles();
    });
  }

  void loadPath(String path) {
    _loadPath(path);
  }

  // void preload() {
  //   _loadPath(rootPath, recursive: true);
  // }

  void openFile(String path) {}

  void createDirectory(String path) {
    final d = Directory(path);
    d.create().then((res) {
      final json = jsonEncode({'path': _path.normalize(path)});
      listeners.forEach((l) {
        l.onCreate(json);
      });
    }).catchError((err) {
      listeners.forEach((l) {
        l.onError(jsonEncode({


using Falko.Talkie.Bridges.Telegram.Models;
using Falko.Talkie.Models.Profiles;
using Falko.Talkie.Platforms;

namespace Falko.Talkie.Connections;

internal readonly ref struct TelegramMessageBuildContext
{
    public readonly long MessageIdentifier;

    public readonly string? ConnectionIdentifier;

    public readonly TelegramPlatform Platform;

    public readonly TelegramMessage? Reply;

    public readonly IProfile EnvironmentProfile;

    public readonly IProfile PublisherProfile;

    public readonly IProfile ReceiverProfile;

    public readonly DateTime PublishedDate;

    public readonly DateTime ReceivedDate;

    public TelegramMessageBuildContext
    (
        long messageIdentifier,
        TelegramPlatform platform,
        IProfile environmentProfile,
        IProfile publisherProfile,
        DateTime? publishedDate,
        string? connectionIdentifier = null,


untV2("v2/account", params: [ApiParam.accountId]),
  postAccountV2("v2/account", type: "POST"),
  getDeviceV2("v2/device", params: [ApiParam.accountId]),
  putDeviceV2("v2/device", type: "PUT", params: [ApiParam.accountId]),
  getListsV2("v2/list", params: [ApiParam.accountId]),
  getJournalV2("v2/activity", params: [
    ApiParam.accountId,
  ]),
  getStatsV2("v2/stats", params: [
    ApiParam.accountId,
    ApiParam.statsSince,
    ApiParam.statsDownsample,
  ]),
  getToplistV2("v2/activity/toplist", params: [
    ApiParam.accountId,
    ApiParam.toplistAction,
    ApiParam.statsDeviceName,
  ]),
  getCustomListV2("v2/customlist", params: [
    ApiParam.accountId,
  ]),
  getLeaseV2("v2/lease", params: [ApiParam.accountId]),
  postLeaseV2("v2/lease", type: "POST", params: [ApiParam.accountId]),
  deleteLeaseV2("v2/lease", type: "DELETE", params: [ApiParam.accountId]),
  postCustomListV2("v2/customlist", type: "POST", params: [ApiParam.accountId]),
  deleteCustomListV2("v2/customlist",
      type: "DELETE", params: [ApiParam.accountId]),
  postNotificationToken("v2/apple/device",
      type: "POST", params: [ApiParam.accountId]),
  postCheckoutGplayV2("v2/gplay/checkout",
      type: "POST", params: [ApiParam.accountId]),
  postCheckoutAppleV2("v2/apple/checkout",
      type: "POST", params: [ApiParam.accountId]),
  ;

  const ApiEndpoint(
    this.endpoint, {
    this.type = "GET",
    this.params = const [],
  });

  final String endpoint;
  final String type;
  final List<ApiParam> params;

  String get template => endpoint + getParams;

  String get getParams {
    if (params.isEmpty) return "";
    if (type != "GET") return "";
    final p = params.map((e) => "${e.name}=${e.placeholder}").join("&");
    return "?$p";
  }
}

enum ApiParam {
  userAgent("user_agent"),
  accountId("account_id"),
  deviceTag("device_tag"),
  profileId("profile_id"),
  statsSince("since"),
  statsDownsample("downsample"),
  toplistAction("action"),
  statsDeviceName("device_name"),
  sessionId("session_id");

  const ApiParam(this.name) : placeholder = "($name)";

  final String name;
  final String placeholder;
}
part of 'support.dart';

class SupportUnreadActor with Logging, Actor {
  late final _unread = Core.get<SupportUnread>();
  late final _notification = Core.get<NotificationActor>();
  late final _stage = Core.get<StageStore>();

  bool isForeground = true;
  bool isOnSupportScreen = false;

  @override
  onStart(Marker m) async {
    Navigation.onNavigated = (path) {
      _update(Markers.support, isOnSupportScreen: path == Paths.support);
    };
    _stage.addOnValue(routeChanged, onRouteChanged);
    await _unread.fetch(m);
  }

  Future<void> onRouteChanged(StageRouteState route, Marker m) async {
    if (route.isBecameForeground()) {
      _update(m, isForeground: true);
    } else if (!route.isForeground()) {
      _update(m, isForeground: false);
    }
  }

  newMessage(Marker m, String content) async {
    log(m).t("New chat message");
    if (!isOnSupportScreen) {
      log(m).i("Setting chat unread flag");
      await _unread.change(m, true);
      if (!isForeground) {
        await _notification.showWith


fixtures.h"

#include <enclave/outside/attestation/AttestationServiceClient.h>

namespace tests {
// 13/04/2025: TODO: this test has stopped working as we have moved to
// a self-hosted attestation service

/*
 * Fixture to set up an Azure Attestation Service client for each test.
 */
class AASClientTestFixture
{
  public:
    AASClientTestFixture()
      : client("https://localhost:8443"){};

  protected:
    sgx::AttestationServiceClient client;
    std::string correctQuoteFilePath =
      "./tests/test/attestation/files/example_correct_sgx_quote.json";
    std::string rogueQuoteFilePath =
      "./tests/test/attestation/files/example_rogue_sgx_quote.json";
    std::string rogueJwtPath =
      "./tests/test/attestation/files/example_rogue_jwt.json";
};

TEST_CASE_METHOD(AASClientTestFixture,
                 "Test obtaining JWT from enclave quote",
                 "[attestation][.]")
{
    std::string quoteFilePath;
    bool expectedSuccess;

    SECTION("Valid quote")
    {
        quoteFilePath = correctQuoteFilePath;
        expectedSuccess = true;
    }

    SECTION("Rogue quote")
    {
        quoteFilePath = rogueQuoteFilePath;
        expectedSuccess = false;
    }

    sgx::EnclaveInfo enclaveInfo(quoteFilePath);

    if (expectedSuccess) {
        std::string jwtResponse = client.attestEnclave(enclaveInfo);
    } else {
        REQUIRE_THROWS(client.attestEnclave(enclaveInfo));
    }
}

TEST_CASE_METHOD(AASClientTestFixture,
                 "Test validating JWT from Azure Attestation Service",
                 "[attestation][.]")
{
    std::string jwtResponse;
    // bool expectedSuccess;

    // Re-generate the JWT everytime in case it expires
    SECTION("Correct JWT token")
    {
        sgx::EnclaveInfo enclaveInfo(correctQuoteFilePath);
        jwtResponse = client.attestEnclave(enclaveInfo);
        // expectedSuccess = true;
    }

    SECTION("Rogue JWT token")
    {
        std::ifstream jwtFile(rogueJwtPath);
        jwtFile >> jwtResponse;
        // expectedSuccess = false;
    }

    /*
    if (expectedSuccess) {
        REQUIRE_NOTHROW(client.validateJwtToken(jwtResponse));
    } else {
        REQUIRE_THROWS(client.validateJwtToken(jwtResponse));
    }
    */
}
}
#include <catch2/catch.hpp>

#include <enclave/outside/EnclaveInterface.h>
#include <enclave/outside/ecalls.h>
#include <enclave/outside/system.h>

#include "faasm_fixtures.h"

namespace tests {
class SgxInternalTestFixture : public MultiRuntimeFunctionExecTestFixture
{
  public:
    SgxInternalTestFixture()
    {
        faasmConf.wasmVm = "sgx";

        auto req = setUpContext("demo", "hello");
        faabric::Message& call = req->mutable_messages()->at(0);

        enclaveInterface.bindToFunction(call);
    }

    ~SgxInternalTestFixture() {}

    void doSgxInternalTest(const std::string& testName)
    {
        faasm_sgx_status_t returnValue;
        sgx_status_t sgxReturnValue = ecallRunInternalTest(
          enclaveInterface.getEnclaveId(), &returnValue, testName.c_str());
        sgx::processECallErrors("Error running internal test: hello-world",
                                sgxReturnValue,
                                returnValue);
        REQUIRE(returnValue == FAASM_SGX_SUCCESS);
    }

  protected:
    wa


        with open(f'{SAVE_DIR}/verified_prog={PROGRAM_NUMBER}_{num_verified}_{num_errors}_' + f'{select_uuid}_{_}' + '.rs', 'w') as f:
                f.write(extract_code(response.choices[_].message.content))
            # print(err)
        num_verifies.append(num_verified)

        # Do a regex search for <number> verified
        if num_verified>0 and num_errors==0:

            # Let's verify triviality,
            if check_pairs(extracted_code_uncommented):
                print('Trivially verified')
                num_verifies[-1] = -1
                continue
            if check_pairs_loop(extracted_code_uncommented):
                print('Trivially verified')
                num_verifies[-1] = -1
                continue
            solved_programs.append((PROGRAM_NUMBER, program, extracted_code))

        all_errs.append(err)
        all_outs.append(output)
        # print(output, err)
        # print('\n'*5)
    print(len(good_indexes), [num_verifies[_] for _ in good_indexes])
    # Delete the file_name
    try: os.system(f'rm -f {file_name}')
    except: ...
    if returnAllResponses:
        return solved_programs, all_responses
    else:
        return solved_programs


lse if(node instanceof AST.UnaryPlusAST) {
      return this.visitUnaryPlus(node);
    } else if(node instanceof AST.VariableAST) {
      return this.visitVariable(node);
    } else if(node instanceof AST.VariableDeclarationAST) {
      return this.visitVariableDeclaration(node);
    } else if(node instanceof AST.ModAST) {
      return this.visitMod(node);
    } else if(node instanceof AST.TrueAST) {
      return this.visitTrue(node);
    } else if(node instanceof AST.FalseAST) {
      return this.visitFalse(node);
    } else if(node instanceof AST.EqualsAST) {
      return this.visitEquals(node);
    } else if(node instanceof AST.NotEqualsAST) {
      return this.visitNotEquals(node);
    } else if(node instanceof AST.GreaterThanAST) {
      return this.visitGreaterThan(node);
    } else if(node instanceof AST.LessThanAST) {
      return this.visitLessThan(node);
    } else if(node instanceof AST.GreaterEqualsAST) {
      return this.visitGreaterEquals(node);
    } else if(node instanceof AST.LessEqualsAST) {
      return this.visitLessEquals(node);
    } else if(node instanceof AST.IfAST) {
      return this.visitIf(node);
    } else if(node instanceof AST.CharAST) {
      return this.visitChar(node);
    } else if(node instanceof AST.CharConstantAST) {
      return this.visitCharConstant(node);
    } else if(node instanceof AST.AndAST) {
      return this.visitAnd(node);
    } else if(node instanceof AST.OrAST) {
      return this.visitOr(node);
    } else if(node instanceof AST.NotAST) {
      return this.visitNot(node);
    } else if(node instanceof AST.CallAST) {
      return this.visitCall(node);
    } else if(node instanceof AST.ForAST) {
      return this.visitFor(node);
    } else if(node instanceof AST.WhileAST) {
      return this.visitWhile(node);
    } else if(node instanceof AST.RepeatAST) {
      return this.visitRepeat(node);
    } else {
      throw new Error('Unknown node type on visitor');
    }
  }

  public run() {
    return this.visit(this.ast);
  }
}
import { isHorizontalPanel } from '../is-horizontal';
import { AddonState } from '../../../../typings';

describe('isHorizontalPanel', () => {
  it('should be false if placement prop of  AddonState not set', () => {
    expect(isHorizontalPanel({} as AddonState, 'bottom')).toBe(false);
  });

  it('should be true', () => {
    expect(
      isHorizontalPanel({ placement: 'bottom' } as AddonState, 'bottom'),
    ).toBe(true);
  });

  it('should return false placement is defined but the value is not bottom', () => {
    expect(
      isHorizontalPanel({ placement: 'right' } as AddonState, 'bottom'),
    ).toBe(false);
  });

  it('should use storybookPanelPosition if addon state placement prop set to auto', () => {
    expect(
      isHorizontalPanel({ placement: 'auto' } as AddonState, 'bottom'),
    ).toBe(false);

    expect(
      isHorizontalPanel({ placement: 'auto' } as AddonState, 'right'),
    ).toBe(true);
  });
});
import {Vector3} from 'three';
import {COLOR_ID} from './reducer';

const positionFacesMap: ({ value: number[], position: [number, number, number] }[]) = [
    {value: [27, 34, 48], position: [-1, -1, -1]},
    {value: [31, 52], position: [-1, -1, 0]},
    {value: [24, 35, 45], position: [-1, -1, 1]},
    {value: [15, 22], position: [-1, 0, -1]},
    {value: [19], position: [-1, 0, 0


810044,
			810045,
			810046,
			810047,
			810048,
			810049,
			810050
		},
		barrage_ID = {
			760129,
			760130,
			760131,
			760132,
			760133,
			760134,
			760135,
			760136,
			760137,
			760138,
			760139,
			760140,
			760141,
			760142,
			760143,
			760144,
			760145,
			760146,
			760147,
			760148,
			760149,
			760150
		}
	}
	uv0.weapon_property_334[763104] = {
		range = 120,
		damage = 16,
		base = 1000,
		name = "【2020德系活动D2】BOSS 欧根亲王 第三波 紫色子母弹",
		fire


tion-group-wrapper .wpd-custom-option-group .wpd-custom-option-label{width: 28%;}
#wpd-setbox .wpd-setcon .wpd-opt-row.wpd-custom-option-group-wrapper .wpd-custom-option-group .wpd-custom-option-value{width: 68%;}
#wpd-setbox .wpd-setcon .wpd-opt-row.wpd-custom-option-group-wrapper .wpd-custom-option-group .dashicons.dashicons-trash{color:#e51c23;cursor:pointer;}
#wpd-setbox .wpd-setcon .wpd-opt-row.wpd-custom-option-group-wrapper .wpd-custom-option-group-add{display:flex;align-items:center;justify-content:center;color:#07B290;background-color:#f5f5f5;margin:10px 0;height: 20px;font-size:23px;padding:15px;cursor:pointer;}
#wpd-setbox .wpd-setcon .wpd-opt-row.wpd-custom-option-group-wrapper .wpd-custom-option-group-add:hover{color:#f5f5f5;background-color:#07B290;}
#wpd-setbox .wpd-setcon .wpd-opt-row.wpd-custom-option-group-wrapper .wpd-custom-option-group-add .dashicons.dashicons-plus{font-size:40px;width:40px;height:35px;}
#wpd-setbox .wpd-setbar .wpd-box.wpd-menu-group{width: 100%; }
#wpd-setbox .wpd-setbar .wpd-box.wpd-menu-group:first-child{margin-bottom: 20px;}
#wpd-setbox .wpd-setbar ul{width: 100%; margin: 0px; padding: 0px; box-sizing: border-box;}
#wpd-setbox .wpd-setbar ul[dir=rtl]{border-right: 1px solid #07B290;}
#wpd-setbox .wpd-setbar li{width: 100%; padding: 8px 10px; margin: 0px; font-size: 13px; font-weight: 600; box-sizing: border-box; border-top: 1px solid #ddd; }
#wpd-setbox .wpd-setbar li:nth-child(2){border-top: none;}
#wpd-setbox .wpd-setbar li .dashicons-arrow-left-alt2{visibility: hidden; font-size: 16px; line-height: 23px;}
#wpd-setbox .wpd-setbar li:hover .dashicons-arrow-left-alt2{visibility: visible;}
#wpd-setbox .wpd-setbar li a{color: #666666; display: block; line-height: 20px; outline: 0;}
#wpd-setbox .wpd-setbar li a:hover{color: #07B290; text-decoration: none;}
#wpd-setbox .wpd-setbar li a:visited, #wpd-setbox .wpd-setbar li a:focus{outline: 0; box-shadow: none!important;}
#wpd-setbox .wpd-setbar li.wpd-active{margin-left: 0;color: #fff;background-color: #07B290; font-size: 14px;width: calc(100% + 1px); }
#wpd-setbox .wpd-setbar li.wpd-active a{color: #ffffff;}
#wpd-setbox .wpd-setbar li.wpd-active .dashicons-arrow-left-alt2{visibility: visible; font-size: 20px;}
#wpd-setbox .wpd-setbar li.wpd-active[dir=rtl]{margin-right: -1px;}
#wpd-setbox .wpd-setbar li.wpd


"""
Development resources for local development
"""

from workspace.settings import ws_settings
import uvicorn
import logging

logger = logging.getLogger(__name__)

def serve_api(
    app_file: str = "api.main:app",
    host: str = "0.0.0.0",
    port: int = 8000,
    reload: bool = True
):
    """Serve the FastAPI application"""
    print(f"🚀 Starting FastAPI server on http://{host}:{port}")
    print(f"📚 API docs available at http://{host}:{port}/docs")

    uvicorn.run(
        app_file,
        host=host,
        port=port,
        reload=reload,
        log_level="info"
    )

def serve_ui(
    app_file: str = "ui/agent_chat.py",
    host: str = "0.0.0.0",
    port: int = 8501
):
    """Serve the Streamlit application"""
    import subprocess
    import sys

    print(f"🎨 Starting Streamlit UI on http://{host}:{port}")

    cmd = [
        sys.executable, "-m", "streamlit", "run",
        app_file,
        "--server.address", host,
        "--server.port", str(port),
        "--server.headless", "true"
    ]

    subprocess.run(cmd)

def serve_both():
    """Serve both API and UI (for development)"""
    import subprocess
    import sys
    import time

    print("🚀 Starting both API and UI services...")
    print("💡 Note: Use 'make run-api' and 'make run-ui' in separate terminals for development with reload")

    # Start API in background process (no reload to avoid thread issues)
    api_process = subprocess.Popen([
        sys.executable, "-m", "uvicorn",
        "api.main:app",
        "--host", ws_settings.api_host,
        "--port", str(ws_settings.api_port),
        "--log-level", "info"
    ])

    print(f"🌐 API started on http://{ws_settings.api_host}:{ws_settings.api_port}")

    # Give API time to start
    time.sleep(3)

    try:
        # Start Streamlit (this will block)
        serve_ui(
            host=ws_settings.streamlit_host,
            port=ws_settings.streamlit_port
        )
    finally:
        # Clean up API process
        print("🛑 Stopping API...")
        api_process.terminate()
        api_process.wait()

if __name__ == "__main__":
    import sys

    if len(sys.argv) > 1:
        if sys.argv[1] == "api":
            serve_api()
        elif sys.argv[1] == "ui":
            serve_ui()
        elif sys.argv[1] == "both":
            serve_both()
        else:
            print("Usage: python dev_resources.py [api|ui|both]")
    else:
        serve_both()


nter */
	CCALL(commpage_is_in_pfz64)
	testl	%eax, %eax
	je	2f			/* not in the PFZ... go service AST */
	movl	%eax, R64_RBX(%r15)	/* let the PFZ know we've pended an AST */
	jmp	EXT(return_to_user)
2:

	xorq	%rbp, %rbp		/* clear framepointer */
	CCALL(ast_taken_user)		/* handle all ASTs (enables interrupts, may return via continuation) */

	cli
	mov	%rsp, %r15		/* AST changes stack, saved state */
	xorl	%ecx, %ecx		/* don't check if we're in the PFZ */
	jmp	EXT(return_from_trap)	/* and check again (rare) */

/*
 * Trap from kernel mode.  No need to switch stacks.
 * Interrupts must be off here - we will set them to state at time of trap
 * as soon as it's safe for us to do so and not recurse doing preemption
 *
 */
trap_from_kernel:
	movq	%r15, %rdi		/* saved state addr */
	pushq   R64_RIP(%r15)           /* Simulate a CALL from fault point */
	pushq   %rbp                    /* Extend framepointer chain */
	movq    %rsp, %rbp
	CCALLWITHSP(kernel_trap)	/* to kernel trap routine */
	popq    %rbp
	addq    $8, %rsp
	mov	%rsp, %r15		/* DTrace slides stack/saved-state */
	cli

	movl	%gs:CPU_PENDING_AST,%eax	/* get pending asts */
	testl	$(AST_URGENT),%eax		/* any urgent preemption? */
	je	ret_to_kernel			/* no, nothing to do */
	cmpl	$(T_PREEMPT),R64_TRAPNO(%r15)
	je	ret_to_kernel			/* T_PREEMPT handled in kernel_trap() */
	testl	$(EFL_IF),R64_RFLAGS(%r15)	/* interrupts disabled? */
	je	ret_to_kernel
	cmpl	$0,%gs:CPU_PREEMPTION_LEVEL	/* preemption disabled? */
	jne	ret_to_kernel
	movq	%gs:CPU_KERNEL_STACK,%rax
	movq	%rsp,%rcx
	xorq	%rax,%rcx
	andq	EXT(kernel_stack_mask)(%rip),%rcx
	testq	%rcx,%rcx		/* are we on the kernel stack? */
	jne	ret_to_kernel		/* no, skip it */

	CCALL(ast_taken_kernel)         /* take the AST */

	mov	%rsp, %r15		/* AST changes stack, saved state */
	jmp	ret_to_kernel

/*
 * All interrupts on all tasks enter here with:
 *	r15	 x86_saved_state_t
 *	rsp	 kernel or interrupt stack
 *	esi	 cs at trap
 *
 *	both rsp and r15 are 16-byte aligned
 *	interrupts disabled
 *	direction flag cleared
 */
Entry(hndl_allintrs)
	/*
	 * test whether already on interrupt stack
	 */
	movq	%gs:CPU_INT_STACK_TOP,%rcx
	cmpq	%rsp,%rcx
	jb	1f
	leaq	-INTSTACK_SIZE(%rcx),%rdx
	cmpq	%rsp,%rdx
	jb	int_from_intstack
1:
	xchgq	%rcx,%rsp		/* switch to interrupt stack */

	mov	%cr0,%rax		/* get cr0 */
	orl	$(CR0_TS


-NEXT:  -      -     0.50   0.50    -      -      -      -      -      -      -      -     vpshrdw	$1, %ymm16, %ymm17, %ymm19 {%k1} {z}
# CHECK-NEXT:  -      -     0.50   0.50   0.50   0.50    -      -      -      -      -      -     vpshrdw	$1, (%rax), %ymm17, %ymm19 {%k1} {z}


 hit for the cast.
   *
   *  @return A MapFactory that makes an TreeMap.
   */
  @SuppressWarnings("unchecked")
  public static <K,V> MapFactory<K,V> treeMapFactory() {
    return TREE_MAP_FACTORY;
  }

  /** Return a MapFactory that returns an LinkedHashMap.
   *  <i>Implementation note: This method uses the same trick as the methods
   *  like emptyMap() introduced in the Collections class in JDK1.5 where
   *  callers can call this method with apparent type safety because this
   *  method takes the hit for the cast.
   *
   *  @return A MapFactory that makes an LinkedHashMap.
   */
  @SuppressWarnings("unchecked")
  public static <K,V> MapFactory<K,V> linkedHashMapFactory() {
    return LINKED_HASH_MAP_FACTORY;
  }

  /** Return a MapFactory that returns an ArrayMap.
   *  <i>Implementation note: This method uses the same trick as the methods
   *  like emptyMap() introduced in the Collections class in JDK1.5 where
   *  callers can call this method with apparent type safety because this
   *  method takes the hit for the cast.
   *
   *  @return A MapFactory that makes an ArrayMap.
   */
  @SuppressWarnings("unchecked")
  public static <K,V> MapFactory<K,V> arrayMapFactory() {
    return ARRAY_MAP_FACTORY;
  }

  private static class HashMapFactory<K,V> extends MapFactory<K,V> {

    private static final long serialVersionUID = -9222344631596580863L;

    @Override
    public Map<K,V> newMap() {
      return new HashMap<K,V>();
    }

    @Override
    public Map<K,V> newMap(int initCapacity) {
      return new HashMap<K,V>(initCapacity);
    }

    @Override
    public <K1, V1> Map<K1, V1> setMap(Map<K1,V1> map) {
      map = new HashMap<K1,V1>();
      return map;
    }

    @Override
    public <K1, V1> Map<K1, V1> setMap(Map<K1,V1> map, int initCapacity) {
      map = new HashMap<K1,V1>(initCapacity);
      return map;
    }

  } // end class HashMapFactory

  private static class IdentityHashMapFactory<K,V> extends MapFactory<K,V> {

    private static final long serialVersionUID = -9222344631596580863L;

    @Override
    public Map<K,V> newMap() {
      return new IdentityHashMap<K,V>();
    }

    @Override
    public Map<K,V> newMap(int initCapacity) {
      return new IdentityHashMap<K,V>(initCapacity);
    }

    @Override
    public <K1, V1> Map<K1, V1> setMap(Map<K1,V1> map) {
      map = new IdentityHashMap<K1,V1>();
      return map;
    }

    @Override
    public <K1, V1> Map<K1, V1> setMap(Map<K1,V1> map, int initCapacity) {
      map = new IdentityHashMap<K1,V1>(initCapacity);
      return map;
    }

  } // end class IdentityHashMapFactory

  private static class WeakHashMapFactory<K,V> extends MapFactory<K,V> {

    private static final long serialVersionUID = 4790014244304941000L;

    @Override
    public Map<K,V> newMap() {
      return new WeakHashMap<K,V>();
    }

    @Override
    public Map<K,V> newMap(int initCapacity) {
      return new WeakHashMap<K,V>(initCapacity);
    }

    @Override
    public <K1, V1> Map<K1, V1> setMap(Map<K1,V1> map) {
      map = new WeakHashMap<K1,V1>();
      return map;
    }

    @Override
    public <K1, V1> Map


}
div.dataTables_scrollBody table thead .sorting:after,
div.dataTables_scrollBody table thead .sorting_asc:after,
div.dataTables_scrollBody table thead .sorting_desc:after {
  display: none;
}
div.dataTables_scrollBody table tbody tr:first-child th,
div.dataTables_scrollBody table tbody tr:first-child td {
  border-top: none;
}

div.dataTables_scrollFoot table {
  margin-top: 0 !important;
  border-top: none;
}

@media screen and (max-width: 767px) {
  div.dataTables_wrapper div.dataTables_length,
  div.dataTables_wrapper div.dataTables_filter,
  div.dataTables_wrapper div.dataTables_info,
  div.dataTables_wrapper div.dataTables_paginate {
    text-align: center;
  }
}
table.dataTable.table-condensed > thead > tr > th {
  padding-right: 20px;
}
table.dataTable.table-condensed .sorting:after,
table.dataTable.table-condensed .sorting_asc:after,
table.dataTable.table-condensed .sorting_desc:after {
  top: 6px;
  right: 6px;
}

table.table-bordered.dataTable th,
table.table-bordered.dataTable td {
  border-left-width: 0;
}
table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable th:last-child,
table.table-bordered.dataTable td:last-child,
table.table-bordered.dataTable td:last-child {
  border-right-width: 0;
}
table.table-bordered.dataTable tbody th,
table.table-bordered.dataTable tbody td {
  border-bottom-width: 0;
}

div.dataTables_scrollHead table.table-bordered {
  border-bottom-width: 0;
}

div.table-responsive > div.dataTables_wrapper > div.row {
  margin: 0;
}
div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:first-child {
  padding-left: 0;
}
div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:last-child {
  padding-right: 0;
}
/* Ion.RangeSlider, Simple Skin
// css version 2.0.3
// © Denis Ineshin, 2014    https://github.com/IonDen
// ===================================================================================================================*/

/* =====================================================================================================================
// Skin details */

.irs-line-mid,
.irs-line-left,
.irs-line-right,
.irs-bar,
.irs-bar-edge,
.irs-slider {
    background: url(../img/sprite-skin-simple.png) repeat-x;
}

.irs {
    height: 40px;
}
.irs-with-grid {
    height: 60px;
}
.irs-line {
    height: 6px; top: 25px;
}
    .irs-line-left {
        height: 6px;
        background-position: 0 -30px;
    }
    .irs-line-mid {
        height: 6px;
        background-position: 0 0;
    }
    .irs-line-right {
        height: 6px;
        background-position: 100% -30px;
    }

.irs-bar {
    height: 6px; top: 25px;
    background-position: 0 -60px;
}
    .irs-bar-edge {
        top: 25px;
        height: 6px; width: 7px;


color-primary);

  background-color: var(--ifm-badge-background-color);
  border-color: var(--ifm-badge-background-color);
}
.badge.badge--secondary {
  --ifm-badge-background-color: var(--ifm-color-secondary);

  background-color: var(--ifm-badge-background-color);
  border-color: var(--ifm-badge-background-color);
}
.badge.badge--success {
  --ifm-badge-background-color: var(--ifm-color-success);

  background-color: var(--ifm-badge-background-color);
  border-color: var(--ifm-badge-background-color);
}
.badge.badge--info {
  --ifm-badge-background-color: var(--ifm-color-info);

  background-color: var(--ifm-badge-background-color);
  border-color: var(--ifm-badge-background-color);
}
.badge.badge--warning {
  --ifm-badge-background-color: var(--ifm-color-warning);

  background-color: var(--ifm-badge-background-color);
  border-color: var(--ifm-badge-background-color);
}
.badge.badge--danger {
  --ifm-badge-background-color: var(--ifm-color-danger);

  background-color: var(--ifm-badge-background-color);
  border-color: var(--ifm-badge-background-color);
}
.badge.badge--secondary {
  color: var(--ifm-color-black);
}
:root {
  --ifm-breadcrumb-border-radius: 1.5rem;
  --ifm-breadcrumb-spacing: 0.0625rem;
  --ifm-breadcrumb-color-active: var(--ifm-color-primary);
  --ifm-breadcrumb-item-background-active: var(--ifm-hover-overlay);
  --ifm-breadcrumb-padding-horizontal: 1rem;
  --ifm-breadcrumb-padding-vertical: 0.5rem;
  --ifm-breadcrumb-size-multiplier: 1;
  --ifm-breadcrumb-separator: url('data:image/svg+xml;utf8,<svg alt="Chevron Right" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 256 256" style="enable-background:new 0 0 256 256;" xml:space="preserve"><g><g><polygon points="79.093,0 48.907,30.187 146.72,128 48.907,225.813 79.093,256 207.093,128"/></g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></svg>');
  --ifm-breadcrumb-separator-size: 0.5rem;
  --ifm-breadcrumb-separator-size-multiplier: 1.25;
}
.breadcrumbs {
  margin-bottom: 0;
  padding-left: 0;
}
.breadcrumbs > .breadcrumb__item {
  display: inline-block;
  list-style-type: none;
}
.breadcrumbs > .breadcrumb__item:not(:first-child) {
  margin-left: var(--ifm-breadcrumb-spacing);
}
.breadcrumbs > .breadcrumb__item:not(:last-child) {
  margin-right: var(--ifm-breadcrumb-spacing);
}
.breadcrumbs > .breadcrumb__item:not(:last-child):after {
  background-image: var(--ifm-breadcrumb-separa


64 0v-66.347a32 32 0 0 1 32-32zm0 199.083a32 32 0 0 1 32 32v33.152c0 10.453-1.365 20.65-3.968 30.378a32 32 0 1 1-61.867-16.554c1.195-4.352 1.835-8.96 1.835-13.824v-33.195a32 32 0 0 1 32-32zm-768 0a32 32 0 0 1 32 32v33.152c0 4.821.64 9.472 1.792 13.824a32 32 0 0 1-61.824 16.512A117.461 117.461 0 0 1 96 810.667v-33.195a32 32 0 0 1 32-32zm32.341 139.392a32 32 0 0 1 39.168-22.656 53.814 53.814 0 0 0 13.824 1.792h33.195a32 32 0 0 1 0 64h-33.195c-10.453 0-20.65-1.366-30.378-3.968a32 32 0 0 1-22.614-39.168zm703.318 0a32 32 0 0 1-22.614 39.168c-9.728 2.56-19.925 3.968-30.378 3.968h-33.195a32 32 0 0 1 0-64h33.195c4.821 0 9.472-.64 13.824-1.792a32 32 0 0 1 39.168 22.613zM347.307 896a32 32 0 0 1 32-32h66.346a32 32 0 1 1 0 64h-66.346a32 32 0 0 1-32-32zm199.125 0a32 32 0 0 1 32-32h66.347a32 32 0 0 1 0 64h-66.347a32 32 0 0 1-32-32zM341.333 352a32 32 0 0 0 0 64H480v266.667a32 32 0 0 0 64 0V416h138.667a32 32 0 0 0 0-64H341.333z" /></symbol><symbol class="icon" viewBox="0 0 1024 1024"  id="icon-sub-form"><path d="M512 106.667H112a5.333 5.333 0 0 0-5.333 5.333v800a5.333 5.333 0 0 0 5.333 5.333h800a5.333 5.333 0 0 0 5.333-5.333V112a5.333 5.333 0 0 0-5.333-5.333zm0 74.666h325.333a5.333 5.333 0 0 1 5.334 5.334v160a5.333 5.333 0 0 1-5.334 5.333H186.667a5.333 5.333 0 0 1-5.334-5.333v-160a5.333 5.333 0 0 1 5.334-5.334zM597.333 432v405.333a5.333 5.333 0 0 1-5.333 5.334H432a5.333 5.333 0 0 1-5.333-5.334V432a5.333 5.333 0 0 1 5.333-5.333h160a5.333 5.333 0 0 1 5.333 5.333zm-410.666-5.333h160A5.333 5.333 0 0 1 352 432v405.333a5.333 5.333 0 0 1-5.333 5.334h-160a5.333 5.333 0 0 1-5.334-5.334V432a5.333 5.333 0 0 1 5.334-5.333zM672 837.333V432a5.333 5.333 0 0 1 5.333-5.333h160a5.333 5.333 0 0 1 5.334 5.333v405.333a5.333 5.333 0 0 1-5.334 5.334h-160a5.333 5.333 0 0 1-5.333-5.334z" /></symbol><symbol class="icon" viewBox="0 0 1024 1024"  id="icon-switch-field"><path d="M692 792H332C182 792 62 672 62 522s120-270 270-270h360c150 0 270 120 270 270 0 147-120 270-270 270zM332 312c-117 0-210 93-210 210s93 210


using Barotrauma.Networking;
using System;
using System.Xml.Linq;

namespace Barotrauma.Items.Components
{
    partial class MemoryComponent : ItemComponent, IServerSerializable
    {
        private int maxValueLength;
        [Editable, Serialize(200, IsPropertySaveable.No, description: "The maximum length of the stored value. Warning: Large values can lead to large memory usage or networking issues.")]
        public int MaxValueLength
        {
            get { return maxValueLength; }
            set
            {
                maxValueLength = Math.Max(value, 0);
            }
        }

        private string value;

        [InGameEditable, Serialize("", IsPropertySaveable.Yes, description: "The currently stored signal the item outputs.", alwaysUseInstanceValues: true)]
        public string Value
        {
            get { return value; }
            set
            {
                if (value == null) { return; }
                this.value = value;
                if (this.value.Length > MaxValueLength && (item.Submarine == null || !item.Submarine.Loading))
                {
                    this.value = this.value.Substring(0, MaxValueLength);
                }
            }
        }

        [Editable, Serialize(true, IsProper


�。故一切基于本项目训练的 AI 模型和合成的音频都与本项目贡献者无关。一切由此造成的问题由使用者自行承担。

此项目完全离线运行，不能收集任何用户信息或获取用户输入数据。因此，这个项目的贡献者不知道所有的用户输入和模型，因此不负责任何用户输入。

本项目只是一个框架项目，本身并没有语音合成的功能，所有的功能都需要用户自己训练模型。同时，这个项目没有任何模型，任何二次分发的项目都与这个项目的贡献者无关。

## 📏 使用规约

# Warning：请自行解决数据集授权问题，禁止使用非授权数据集进行训练！任何由于使用非授权数据集进行训练造成的问题，需自行承担全部责任和后果！与仓库、仓库维护者、svc develop team 无关！

1. 本项目是基于学术交流目的建立，仅供交流与学习使用，并非为生产环境准备。
2. 任何发布到视频平台的基于 sovits 制作的视频，都必须要在简介明确指明用于变声器转换的输入源歌声、音频，例如：使用他人发布的视频 / 音频，通过分离的人声作为输入源进行转换的，必须要给出明确的原视频、音乐链接；若使用是自己的人声，或是使用其他歌声合成引擎合成的声音作为输入源进行转换的，也必须在简介加以说明。
3. 由输入源造成的侵权问题需自行承担全部责任和一切后果。使用其他商用歌声合成软件作为输入源时，请确保遵守该软件的使用条例，注意，许多歌声合成引擎使用条例中明确指明不可用于输入源进行转换！
4. 禁止使用该项目从事违法行为与宗教、政治等活动，该项目维护者坚决抵制上述行为，不同意此条则禁止使用该项目。
5. 继续使用视为已同意本仓库 README 所述相关条例，本仓库 README 已进行劝导义务，不对后续可能存在问题负责。
6. 如果将此项目用于任何其他企划，请提前联系并告知本仓库作者，十分感谢。

## 📝 模型简介

歌声音色转换模型，通过 SoftVC 内容编码器提取源音频语音特征，与 F0 同时输入 VITS 替换原本的文本输入达到歌声转换的效果。同时，更换声码器为 [NSF HiFiGAN](https://github.com/openvpi/DiffSinger/tree/refactor/modules/nsf_hifigan) 解决断音问题。

### 🆕 4.1-Stable 版本更新内容

+ 特征输入更换为 [Content Vec](https://github.com/auspicious3000/contentvec) 的第 12 层 Transformer 输出，并兼容 4.0 分支
+ 更新浅层扩散，可以使用浅层扩散模型提升音质
+ 增加 whisper 语音编码器的支持
+ 增加静态/动态声线融合
+ 增加响度嵌入
+ 增加特征检索，来自于 [RVC](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebU


326,
   ["text"]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW",
  },
  {
   ["center"]=6.893,
   ["edges"]=1.848,
   ["left"]=1


6357](https://github.com/hyperf/hyperf/pull/6357) Support symfony 7.x for some components such as `command` `config` `devtool` `di` and `server`.
- [#6373](https://github.com/hyperf/hyperf/pull/6373) Support `ping` method for `grpc client`.
- [#6379](https://github.com/hyperf/hyperf/pull/6379) Support to read custom attribute for validation when using swagger.
- [#6380](https://github.com/hyperf/hyperf/pull/6380) Support collect swagger validation rules and attribute for mediaType request body.

## Optimized

- [#6376](https://github.com/hyperf/hyperf/pull/6376) Don't need to close swoole short name when don't use swoole or don't require `hyperf/polyfill-coroutine` component.

# v3.1.1 - 2023-12-08

## Fixed

- [#6347](https://github.com/hyperf/hyperf/pull/6347) Fixed bug that the view function may add redundant content-type to header.
- [#6352](https://github.com/hyperf/hyperf/pull/6352) Fixed bug that nacos config center cannot work when using grpc protocol.
- [#6350](https://github.com/hyperf/hyperf/pull/6350) Fixed bug that the recv channel cannot be found, because `GrpcClient::runReceiveCoroutine` will unset streamId before recv method.
- [#6361](https://github.com/hyperf/hyperf/pull/6361) Fixed bug that `Hyperf\SocketIOServer\Emitter\Future` cannot be resolved.
- [#6369](https://github.com/hyperf/hyperf/pull/6369) Fixed bug that the main process did not handle the abnormal exit of the fork process.

## Added

- [#6342](https://github.com/hyperf/hyperf/pull/6342) Added `Coroutine::fork()` method and `Coroutine::pid()` method.
- [#6360](https://github.com/hyperf/hyperf/pull/6360) Added response `content-type` header for swagger server.
- [#6363](https://github.com/hyperf/hyperf/pull/6363) Added callable type support to the fallback property of CircuitBreaker Attribute.

# v3.1.0 - 2023-12-01

## Dependencies Upgrade

- Upgrade the php version to `>=8.1`
- Upgrade the swoole version to `>=5.0`
- Upgrade `hyperf/engine` to `^2.0`
- Upgrade `phpunit/phpunit` to `^10.0`

## Swow Supported

- [#5843](https://github.com/hyperf/hyperf/pull/5843) Support `Swow` for `reactive-x`.
- [#5844](https://github.com/hyperf/hyperf/pull/5844) Support `Swow` for `socketio-server`.

## Added

- [x] Support [Psr7Plus](https://github.com/swow/psr7-plus).
    - [#5828](https://github.com/hyperf/hyperf/pull/5828) Support swow psr7-plus interface for `http-message`.
    - [#5839](https://github.com/hyperf/hyperf/pull/5839) Support swow psr7-plus interface for all components.
- [x] Support [pest](https://github.com/pestphp/pest).
- [x] Added `hyperf/helper` component.
- [x] Added `hyperf/polyfill-coroutine` component.
- [#5815](https://github.com/hyperf/hyperf/pull/5815) Added alias as `mysql` for `pdo` in `hyperf/db`.
- [#5849](https://github.com/hyperf/hyperf/pull/5849) Support for insert update and select using enums.
- [#5894](https://github.com/hyperf/hyperf/pull/5894) [#5897](https://github.com/hyper


thContext(context.Background())
}

func (i GeoMatchSetGeoMatchConstraintArray) ToGeoMatchSetGeoMatchConstraintArrayOutputWithContext(ctx context.Context) GeoMatchSetGeoMatchConstraintArrayOutput {
	return pulumi.ToOutputWithContext(ctx, i).(GeoMatchSetGeoMatchConstraintArrayOutput)
}

type GeoMatchSetGeoMatchConstraintOutput struct{ *pulumi.OutputState }

func (GeoMatchSetGeoMatchConstraintOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*GeoMatchSetGeoMatchConstraint)(nil)).Elem()
}

func (o GeoMatchSetGeoMatchConstraintOutput) ToGeoMatchSetGeoMatchConstraintOutput() GeoMatchSetGeoMatchConstraintOutput {
	return o
}

func (o GeoMatchSetGeoMatchConstraintOutput) ToGeoMatchSetGeoMatchConstraintOutputWithContext(ctx context.Context) GeoMatchSetGeoMatchConstraintOutput {
	return o
}

// The type of geographical area you want AWS WAF to search for. Currently Country is the only valid value.
func (o GeoMatchSetGeoMatchConstraintOutput) Type() pulumi.StringOutput {
	return o.ApplyT(func(v GeoMatchSetGeoMatchConstraint) string { return v.Type }).(pulumi.StringOutput)
}

// The country that you want AWS WAF to search for.
// This is the two-letter country code, e.g., `US`, `CA`, `RU`, `CN`, etc.
// See [docs](https://docs.aws.amazon.com/waf/latest/APIReference/API_GeoMatchConstraint.html) for all supported values.
func (o GeoMatchSetGeoMatchConstraintOutput) Value() pulumi.StringOutput {
	return o.ApplyT(func(v GeoMatchSetGeoMatchConstraint) string { return v.Value }).(pulumi.StringOutput)
}

type GeoMatchSetGeoMatchConstraintArrayOutput struct{ *pulumi.OutputState }

func (GeoMatchSetGeoMatchConstraintArrayOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*[]GeoMatchSetGeoMatchConstraint)(nil)).Elem()
}

func (o GeoMatchSetGeoMatchConstraintArrayOutput) ToGeoMatchSetGeoMatchConstraintArrayOutput() GeoMatchSetGeoMatchConstraintArrayOutput {
	return o
}

func (o GeoMatchSetGeoMatchConstraintArrayOutput) ToGeoMatchSetGeoMatchConstraintArrayOutputWithContext(ctx context.Context) GeoMatchSetGeoMatchConstraintArrayOutput {
	return o
}

func (o GeoMatchSetGeoMatchConstraintArrayOutput) Index(i pulumi.IntInput) GeoMatchSetGeoMatchConstraintOutput {
	return pulumi.All(o, i).ApplyT(func(vs []interface{}) GeoMatchSetGeoMatchConstraint {
		return vs[0].([]GeoMatchSetGeoMatchConstraint)[vs[1].(int)]
	}).(GeoMatchSetGeoMatchConstraintOutput)
}

type IpSetIpSetDescriptor struct {
	// Type of the IP address - `IPV4` or `IPV6`.
	Type string `pulumi:"type"`
	// An IPv4 or IPv6 address specified via CIDR notationE.g., `192.0.2.44/32` or `1111:0000:0000:0000:0000:0000:0000:0000/64`
	Value string `pulumi:"value"`
}

// IpSetIpSetDescriptorInput is an input type that accepts IpSetIpSetDescriptorArgs and IpSetIpSetDescriptorOutput values.
// You can construct a concrete instance of `IpSetIpSetDescriptorInput` via:
//
//	IpSetIpSetDescriptorArgs{...}
type IpSetIpSetDescriptorInput interface {
	pulumi.Input

	ToIpSetIpSetDescriptorOutput() IpSetIpSetDescriptorOutput
	ToIpSetIpSetDescriptorOutputWithContext(context.Context) IpSetIpSetDescriptorOutput
}

type IpSetIpSetDescriptorArgs struct {
	// Type of the IP address - `IPV4` or `IPV6`.
	Type pulumi.StringInput `pulumi:"type"`
	// An IPv4 or IPv6 address specified via CIDR notationE.g., `192.0.2.44/32` or `1111:0000:0000:0000


Name:"face-kiss-wink-heart",icon:[512,512,[128536,"kiss-wink-heart"],"f598","M498 339.7c9.1-26.2 14-54.4 14-83.7C512 114.6 397.4 0 256 0S0 114.6 0 256S114.6 512 256 512c35.4 0 69.1-7.2 99.7-20.2c-4.8-5.5-8.5-12.2-10.4-19.7l-22.9-89.3c-10-39 11.8-80.9 51.8-92.1c37.2-10.4 73.8 10.1 87.5 44c12.7-1.6 25.1 .4 36.2 5zM296 332c0 6.9-3.1 13.2-7.3 18.3c-4.3 5.2-10.1 9.7-16.7 13.4c-2.7 1.5-5.7 3-8.7 4.3c3.1 1.3 6 2.7 8.7 4.3c6.6 3.7 12.5 8.2 16.7 13.4c4.3 5.1 7.3 11.4 7.3 18.3s-3.1 13.2-7.3 18.3c-4.3 5.2-10.1 9.7-16.7 13.4C258.7 443.1 241.4 448 224 448c-3.6 0-6.8-2.5-7.7-6s.6-7.2 3.8-9l0 0 0 0 0 0 0 0 .2-.1c.2-.1 .5-.3 .9-.5c.8-.5 2-1.2 3.4-2.1c2.8-1.9 6.5-4.5 10.2-7.6c3.7-3.1 7.2-6.6 9.6-10.1c2.5-3.5 3.5-6.4 3.5-8.6s-1-5-3.5-8.6c-2.5-3.5-5.9-6.9-9.6-10.1c-3.7-3.1-7.4-5.7-10.2-7.6c-1.4-.9-2.6-1.6-3.4-2.1l-.6-.4-.3-.2-.2-.1 0 0 0 0 0 0c-2.5-1.4-4.1-4.1-4.1-7s1.6-5.6 4.1-7l0 0 0 0 0 0 0 0 0 0 .2-.1c.2-.1 .5-.3 .9-.5c.8-.5 2-1.2 3.4-2.1c2.8-1.9 6.5-4.5 10.2-7.6c3.7-3.1 7.2-6.6 9.6-10.1c2.5-3.5 3.5-6.4 3.5-8.6s-1-5-3.5-8.6c-2.5-3.5-5.9-6.9-9.6-10.1c-3.7-3.1-7.4-5.7-10.2-7.6c-1.4-.9-2.6-1.6-3.4-2.1c-.4-.2-.7-.4-.9-.5l-.2-.1 0 0 0 0 0 0c-3.2-1.8-4.7-5.5-3.8-9s4.1-6 7.7-6c17.4 0 34.7 4.9 47.9 12.3c6.6 3.7 12.5 8.2 16.7 13.4c4.3 5.1 7.3 11.4 7.3 18.3zM176.4 240c-17.7 0-32-14.3-32-32s14.3-32 32-32s32 14.3 32 32s-14.3 32-32 32zm194.8-6.4c-17.6-23.5-52.8-23.5-70.4 0c-5.3 7.1-15.3 8.5-22.4 3.2s-8.5-15.3-3.2-22.


oblin: "\u{1F47A}",

	/**
	* Unicode: 1F480 1F480
	*
	* Qualified: True
	*
	* Description: skull
	*
	* 💀
	*/
	skull: "\u{1F480}",

	/**
	* Unicode: 2620 2620 FE0F
	*
	* Qualified: True
	*
	* Description: skull and crossbones
	*
	* ☠
	*/
	skull_and_crossbones_var: "\u{2620}\u{FE0F}",

	/**
	* Unicode: 2620 2620
	*
	* Qualified: False
	*
	* Description: skull and crossbones
	*
	* ☠
	*/
	skull_and_crossbones: "\u{2620}",

	/**
	* Unicode: 1F47B 1F47B
	*
	* Qualified: True
	*
	* Description: ghost
	*
	* 👻
	*/
	ghost: "\u{1F47B}",

	/**
	* Unicode: 1F47D 1F47D
	*
	* Qualified: True
	*
	* Description: alien
	*
	* 👽
	*/
	alien: "\u{1F47D}",

	/**
	* Unicode: 1F47E 1F47E
	*
	* Qualified: True
	*
	* Description: alien monster
	*
	* 👾
	*/
	alien_monster: "\u{1F47E}",

	/**
	* Unicode: 1F916 1F916
	*
	* Qualified: True
	*
	* Description: robot face
	*
	* 🤖
	*/
	robot_face: "\u{1F916}",

	/**
	* Unicode: 1F4A9 1F4A9
	*
	* Qualified: True
	*
	* Description: pile of poo
	*
	* 💩
	*/
	pile_of_poo: "\u{1F4A9}",

	// subgroup: cat-face

	/**
	* Unicode: 1F63A 1F63A
	*
	* Qualified: True
	*
	* Description: grinning cat face
	*
	* 😺
	*/
	grinning_cat_face: "\u{1F63A}",

	/**
	* Unicode: 1F638 1F638
	*
	* Qualified: True
	*
	* Description: grinning cat face with smiling eyes
	*
	* 😸
	*/
	grinning_cat_face_with_smiling_eyes: "\u{1F638}",

	/**
	* Unicode: 1F639 1F639
	*
	* Qualified: True
	*
	* Description: cat face with tears of joy
	*
	* 😹
	*/
	cat_face_with_tears_of_joy: "\u{1F639}",

	/**
	* Unicode: 1F63B 1F63B
	*
	* Qualified: True
	*
	* Description: smiling cat face with heart-eyes
	*
	* 😻
	*/
	smiling_cat_face_with_heart_eyes: "\u{1F63B}",

	/**
	* Unicode: 1F63C 1F63C
	*
	* Qualified: True
	*
	* Description: cat face with wry smile
	*
	* 😼
	*/
	cat_face_with_wry_smile: "\u{1F63C}",

	/**
	* Unicode: 1F63D 1F63D
	*
	* Qualified: True
	*
	* Description: kissing cat face
	*
	* 😽
	*/
	kissing_cat_face: "\u{1F63D}",

	/**
	* Unicode: 1F640 1F640
	*
	* Qualified: True
	*
	* Description: weary cat face
	*


ion_since(UNIX_EPOCH)
                    .unwrap()
                    .as_nanos();
                match pinger.send(dst, &mut buffer) {
                    Ok(rtt) => {
                        ping_response = Some(rtt as u16);
                    }
                    Err(_err) => {
                        ping_response = None;
                    }
                };
                if let Err(_err) = sender.send((dst, timestamp, ping_response)) {
                    break; // stop the loop if there is an error.
                }
                #[allow(deprecated)]
                thread::sleep_ms(delay_millis);
            }
        });
        Ok(handle)
    }
}

fn main() -> Result<()> {
    nwg::init().context("Failed to init app")?;
    nwg::Font::set_global_family("Segoe UI").context("Failed to set default font")?;
    let app = App::build_ui(Default::default()).context("Failed to build UI")?;
    let _pingers = vec![
        app.spawn_pinger("172.16.31.10", MIN_PING_TIME_MILLIS)?, // CloudFlare
        app.spawn_pinger("8.8.8.8", MIN_PING_TIME_MILLIS)?, // Google
        app.spawn_pinger("208.67.222.222", MIN_PING_TIME_MILLIS)?, // Cisco OpenDNS
        app.spawn_pinger("9.9.9.9", MIN_PING_TIME_MILLIS)?, // Quad9
    ];
    nwg::dispatch_thread_events();
    Ok(())
}
<gh_stars>0
use super::super::dcel::EdgeEntry;
use super::super::math;
use super::handle_defs::*;
use super::iterators::CircularIterator;
use super::iterators::NextBackFn;
use super::public_handles::*;
use crate::{HasPosition, LineSideInfo, Point2};
use num_traits::{Float, One, Signed};
use std::cmp::Ordering;
use std::fmt::Debug;
use std::hash::{Hash, Hasher};

// Debug implementations
impl<'a, V, DE, UE, F> std::fmt::Debug for VertexHandle<'a, V, DE, UE, F> {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "VertexHandle({:?})", self.handle.index())
    }
}

impl<'a, V, DE, UE, F> Debug for DirectedEdgeHandle<'a, V, DE, UE, F> {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(
            f,
            "DirectedEdgeHandle - id: {:?} ({:?} -> {:?})",
            self.handle.index(),
            self.from().fix(),
            self.to().fix()
        )
    }
}

impl<'a, V, DE, UE, F> std::fmt::Debug for UndirectedEdgeHandle<'a, V, DE, UE, F> {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> ::std::fmt::Result {
        let [v0, v1] = self.vertices();
        write!(
            f,
            "UndirectedEdgeHandle - id: {:?} ({:?} <-> {:?})",
            self.handle.index(),
            v0.fix(),
            v1.fix(),
        )
    }
}

impl<'a, V, DE, UE, F> std::fmt::Debug for FaceHandle<'a, PossiblyOuterTag, V, DE, UE, F> {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> ::std::fmt::Result {
        if let Some(inner) = self.as_inner() {
            inner.fmt(f)
        } else {
            write!(f, "OuterFace")
        }
    }
}

impl<'a, V, DE, UE, F> std::fmt::Debug for FaceHandle<'a, InnerTag, V, DE, UE, F> {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> ::std::fmt::Result {
        let [v0, v1, v2] = self.vertices();
        write!(
            f,
            "FaceHandle - id: {:?} ({:?}, {:?}, {:?})",
            self.handle.index(),
            v0.fix().index(),
            v1.fix().index(),
            v2.


ate(&in, output, false);
  Eigen::MatrixXd diff = *output - out;
  Eigen::MatrixXd* e = &diff;
  layer.backpropagate(e, e, true);
  Eigen::VectorXd derivs(dimension());
  std::vector<double*>::const_iterator it = derivatives.begin();
  for(int i = 0; i < dimension(); i++, it++)
    derivs(i) = **it;
  return derivs;
}

Eigen::VectorXd LayerAdapter::gradient(std::vector<int>::const_iterator startN,
                                       std::vector<int>::const_iterator endN)
{
  // Assumes that we want to comput the gradient of the whole training set
  OPENANN_CHECK_EQUALS(*startN, 0);
  OPENANN_CHECK_EQUALS(endN-startN, input.rows());
  Eigen::MatrixXd* output;
  layer.forwardPropagate(&input, output, false);
  Eigen::MatrixXd diff = *output - desired;
  Eigen::MatrixXd* e = &diff;
  layer.backpropagate(e, e, true);
  Eigen::VectorXd derivs(dimension());
  std::vector<double*>::const_iterator it = derivatives.begin();
  for(int i = 0; i < dimension(); i++, it++)
    derivs(i) = **it;
  return derivs;
}

Eigen::MatrixXd LayerAdapter::inputGradient()
{
  Eigen::MatrixXd* output;
  layer.forwardPropagate(&input, output, false);
  Eigen::MatrixXd diff = *output - desired;
  Eigen::MatrixXd* e = &diff;
  layer.backpropagate(e, e, true);
  return *e;
}

Eigen::VectorXd LayerAdapter::operator()(const Eigen::VectorXd& x)
{
  this->input = x;
  Eigen::MatrixXd* output;
  layer.forwardPropagate(&input, output, false);
  return *output;
}

Eigen::MatrixXd LayerAdapter::operator()(const Eigen::MatrixXd& X)
{
  this->input = X;
  Eigen::MatrixXd* output;
  layer.forwardPropagate(&input, output, false);
  return *output;
}

OpenANN::Learner& LayerAdapter::trainingSet(Eigen::MatrixXd& trainingInput,
                                            Eigen::MatrixXd& trainingOutput)
{
  input = trainingInput;
  desired = trainingOutput;
  return *this;
}

OpenANN::Learner& LayerAdapter::trainingSet(OpenANN::DataSet& trainingSet)
{
  throw OpenANN::OpenANNException("trainingSet is not implemented in "
                                  "LayerAdapter");
}
//  (C) Copyright Gennadiy Rozental 2001.
//  Distributed under the Boost Software License, Version 1.0.
//  (See accompanying file LICENSE_1_0.txt or copy at
//  http://www.boost.org/LICENSE_1_0.txt)

//  See http://www.boost.org/libs/test for the library home page.
//
/// @file
/// @brief Defines unit test log formatter interface
///
/// You can define a class with implements this interface and use an instance of it
/// as a Unit Test Framework log formatter
// ***************************************************************************

#ifndef BOOST_TEST_UNIT_TEST_LOG_FORMATTER_HPP_071894GER
#define BOOST_TEST_UNIT_TEST_LOG_FORMATTER_HPP_071894GER

// Boost.Test
#include <boost/test/detail/global_typedef.hpp>
#include <boost/test/detail/log_level.hpp>
#include <boost/test/detail/fwd_decl.hpp>

// STL
#include <iosfwd>
#include <string> // for std::string
#include <iostream>

#include <boost/test/detail/suppress_warnings.hpp>

//____________________________________________________________________________


 1 - 16-bit timer.  Channels 1,2,3
        const RGB_LED_PWM_FREQUENCY: u32 = 1_u32; // kHz

        // TIM1 CH1
        let red_pin = gpioa
            .pa8
            .into_push_pull_output(&mut gpioa.moder, &mut gpioa.otyper)
            .into_af1(&mut gpioa.moder, &mut gpioa.afrh);

        // TIM1 CH2
        let green_pin = gpioa
            .pa9
            .into_push_pull_output(&mut gpioa.moder, &mut gpioa.otyper)
            .into_af1(&mut gpioa.moder, &mut gpioa.afrh);

        // TIM1 CH3
        let blue_pin = gpioa
            .pa10
            .into_push_pull_output(&mut gpioa.moder, &mut gpioa.otyper)
            .into_af1(&mut gpioa.moder, &mut gpioa.afrh);

        // TIM1 PWM Initialization.
        let (r, g, b) = dp.TIM1.pwm(
            (red_pin, green_pin, blue_pin),
            RGB_LED_PWM_FREQUENCY.khz(),
            clocks,
            &mut rcc.apb2,
        );

        let mut light_controller = RgbController(r, g, b);
        light_controller.enable();

        // Design Decision:  PA1/PA0 assigned to drive servo motors.
        // TIM2 CH3/CH4 conflict with Usart2 TX/RX pin assignments on PA2/PA3,
        // and for this reason may not be used.  The servo controls require only
        // two channels.

        // TIM2 CH1
        let left_wheel_pin = gpioa
            .pa0
            .into_push_pull_output(&mut gpioa.moder, &mut gpioa.otyper)
            .into_af1(&mut gpioa.moder, &mut gpioa.afrl);

        // TIM2 CH2
        let right_wheel_pin = gpioa
            .pa1
            .into_push_pull_output(&mut gpioa.moder, &mut gpioa.otyper)
            .into_af1(&mut gpioa.moder, &mut gpioa.afrl);

        let _wheel_pins = dp.TIM2.pwm(
            (left_wheel_pin, right_wheel_pin),
            RGB_LED_PWM_FREQUENCY.hz(),
            clocks,
            &mut rcc.apb1r1,
        );

        // we need an edge-triggered interrupt that measures how long it was held high.
        let mut echo = gpiob
            .pb6
            .into_pull_down_input(&mut gpiob.moder, &mut gpiob.pupdr);
        echo.make_interrupt_source(&mut dp.SYSCFG, &mut rcc.apb2);
        echo.trigger_on_edge(&mut dp.EXTI, Edge::RISING_FALLING);
        echo.enable_interrupt(&mut dp.EXTI);

        // and we need a pin to trigger the ping, pulse 10us every 60ms
        let mut ping_pong_pin = gpiob
            .pb1
            .into_push_pull_output(&mut gpiob.moder, &mut gpiob.otyper);

        ping_pong_pin.set_low().unwrap();

        rtic::pend(interrupt::EXTI9_5);
        heartbeat::spawn_after(1.secs()).unwrap();
        set_light_from_range::spawn_after(1.secs()).unwrap();
        print_status::spawn_at(monotonics::now()).unwrap();
        ping::spawn_at(monotonics::now()).unwrap();

        (
            SharedResources {
                ping_pong_pin,
                range: 0.0,
            },
            LocalResources {
                tx,
                led,
                echo


vers.Size())
	{
		if (fileListReceivers[i]->downloadHandler->Update()==false)
		{
			fileListReceivers[i]->downloadHandler->OnDereference();
			if (fileListReceivers[i]->deleteDownloadHandler)
				RakNet::OP_DELETE(fileListReceivers[i]->downloadHandler, _FILE_AND_LINE_);
			RakNet::OP_DELETE(fileListReceivers[i], _FILE_AND_LINE_);
			fileListReceivers.RemoveAtIndex(i);
		}
		else
			i++;
	}
}
void FileListTransfer::OnReferencePush(Packet *packet, bool isTheFullFile)
{
	RakNet::BitStream refPushAck;
	if (isTheFullFile==false)
	{
		// 12/23/09 Why do I care about ID_DOWNLOAD_PROGRESS for reference pushes?
		// 2/16/2012 I care because a reference push is 16 megabytes by default. Also, if it is the last file "if (ftpr->filesToPush.Size()<2)" or total file size exceeds smallFileTotalSize it always sends a reference push.
//		return;
	}

	FileListTransferCBInterface::OnFileStruct onFileStruct;
	RakNet::BitStream inBitStream(packet->data, packet->length, false);
	inBitStream.IgnoreBits(8);

	unsigned int partCount=0;
	unsigned int partTotal=1;
	unsigned int partLength=0;
	onFileStruct.fileData=0;
	if (isTheFullFile==false)
	{
		// Disable endian swapping on reading this, as it's generated locally in ReliabilityLayer.cpp
		inBitStream.ReadBits( (unsigned char* ) &partCount, BYTES_TO_BITS(sizeof(partCount)), true );
		inBitStream.ReadBits( (unsigned char* ) &partTotal, BYTES_TO_BITS(sizeof(partTotal)), true );
		inBitStream.ReadBits( (unsigned char* ) &partLength, BYTES_TO_BITS(sizeof(partLength)), true );
		inBitStream.IgnoreBits(8);
		// The header is appended to every chunk, which we continue to read after this statement flrMemoryBlock
	}

	inBitStream >> onFileStruct.context;
	inBitStream.Read(onFileStruct.setID);

	// This is not a progress notification, it is actually the entire packet
	if (isTheFullFile==true)
	{
		refPushAck.Write((MessageID)ID_FILE_LIST_REFERENCE_PUSH_ACK);
		refPushAck.Write(onFileStruct.setID);
		SendUnified(&refPushAck,HIGH_PRIORITY, RELIABLE, 0, packet->systemAddress, false);
	}

	// inBitStream.Read(onFileStruct.context);
	FileListReceiver *fileListReceiver;
	if (fileListReceivers.Has(onFileStruct.setID)==false)
	{
		return;
	}
	fileListReceiver=fileListReceivers.Get(onFileStruct.setID);
	if (fileListReceiver->allowedSender!=packet->systemAddress)
	{
#ifdef _DEBUG
		RakAssert(0);
#endif
		return;
	}

#ifdef _DEBUG
	RakAssert(fileListReceiver->gotSetHeader==true);
#endif

	if (StringCompressor::Instance()->DecodeString(onFileStruct.fileName, 512, &inBitStream)==false)
	{
#ifdef _DEBUG
		RakAssert(0);
#endif
		return;
	}

	inBitStream.ReadCompressed(onFileStruct.fileIndex);
	inBitStream.ReadCompressed(onFileStruct.byteLengthOfThisFile);
	unsigned int offset;
	unsigned int chunkLength;
	inBitStream.ReadCompressed(offset);
	inBitStream.ReadCompressed(chunkLength);

	bool lastChunk=false;
	inBitStream.Read(lastChunk);
	bool finished = lastChunk && isTheFullFile;

	if (isTheFullFile


r: #C792EA;
}

.cm-s-material .cm-property {
  color: #C792EA;
}

.cm-s-material .cm-qualifier {
  color: #DECB6B;
}

.cm-s-material .cm-variable-3,
.cm-s-material .cm-type {
  color: #DECB6B;
}

.cm-s-material .cm-error {
  color: rgba(255, 255, 255, 1.0);
  background-color: #FF5370;
}

.cm-s-material .CodeMirror-matchingbracket {
  text-decoration: underline;
  color: white !important;
}
/* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */

/*<!--activeline-->*/
.cm-s-midnight .CodeMirror-activeline-background { background: #253540; }

.cm-s-midnight.CodeMirror {
    background: #0F192A;
    color: #D1EDFF;
}

.cm-s-midnight div.CodeMirror-selected { background: #314D67; }
.cm-s-midnight .CodeMirror-line::selection, .cm-s-midnight .CodeMirror-line > span::selection, .cm-s-midnight .CodeMirror-line > span > span::selection { background: rgba(49, 77, 103, .99); }
.cm-s-midnight .CodeMirror-line::-moz-selection, .cm-s-midnight .CodeMirror-line > span::-moz-selection, .cm-s-midnight .CodeMirror-line > span > span::-moz-selection { background: rgba(49, 77, 103, .99); }
.cm-s-midnight .CodeMirror-gutters { background: #0F192A; border-right: 1px solid; }
.cm-s-midnight .CodeMirror-guttermarker { color: white; }
.cm-s-midnight .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
.cm-s-midnight .CodeMirror-linenumber { color: #D0D0D0; }
.cm-s-midnight .CodeMirror-cursor { border-left: 1px solid #F8F8F0; }

.cm-s-midnight span.cm-comment { color: #428BDD; }
.cm-s-midnight span.cm-atom { color: #AE81FF; }
.cm-s-midnight span.cm-number { color: #D1EDFF; }

.cm-s-midnight span.cm-property, .cm-s-midnight span.cm-attribute { color: #A6E22E; }
.cm-s-midnight span.cm-keyword { color: #E83737; }
.cm-s-midnight span.cm-string { color: #1DC116; }

.cm-s-midnight span.cm-variable { color: #FFAA3E; }
.cm-s-midnight span.cm-variable-2 { color: #FFAA3E; }
.cm-s-midnight span.cm-def { color: #4DD; }
.cm-s-midnight span.cm-bracket { color: #D1EDFF; }
.cm-s-midnight span.cm-tag { color: #449; }
.cm-s-midnight span.cm-link { color: #AE81FF; }
.cm-s-midnight span.cm-error { background: #F92672; color: #F8F8F0; }

.cm-s-midnight .CodeMirror-matchingbracket {
  text-decoration: underline;
  color: white !important;
}
/*

    Name:       oceanic-next
    Author:     Filype Pereira (https://github.com/fpereira1)

    Original oceanic-next color scheme by Dmit


| No. | Topic                                                                   |
| --- | ----------------------------------------------------------------------- |
| 1   | [**User information**](#user-information)                               |
| 2   | [**File and directory commands**](#file-and-directory-commands)         |
| 3   | [**File permissions**](#file-permissions)                               |
| 4   | [**Networking**](#networking)                                           |
| 5   | [**Installing packages**](#installing-packages)                         |
| 6   | [**Disk usage**](#disk-usage)                                           |
| 7   | [**System and Hardware information**](#system-and-hardware-information) |
| 8   | [**Search Files**](#search-files)                                       |
| 9   | [**SSH**](#ssh)                                                         |
| 10  | [**Vi/Vim-commands**](#vi/vim-commands)                                 |

### User Information

1. **who** It is used to get information about currently logged in user on to system. If you don't provide any option or arguments, the command displays the following information for each logged-in user.

    1. Login name of the user
    2. User terminal
    3. Date & Time of login
    4. Remote host name of the user

   ```bash
   $ who
   pavankumar :0 2024-01-01 01:21 (:0)
   ```

2. **whoami:** It display the system’s username

   ```bash
   $ whoami
   pavankumar
   ```

3. **id:** It display the user identification(the real and effective user and group IDs) information

   ```bash
   $ id
   uid=1000(sj) gid=1000(sj) groups=1000(sj),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),131(lxd),132(sambashare)
   ```
4. **groups:** This command is used to display all the groups for which the user belongs to.

   ```bash
   $ group
   pavankumar: pavankumar, adm, cdrom, sudo, dip, plugdev, lpadmin, lxd, sambashare
   ```

5. **finger:**  Used to check the information of any currently logged in users. i.e, It displays users login time, tty (name), idle time, home directory, shell name etc.

   ```bash
   $ finger
   Login               Name            Tty         Idle  Login Time   Office     Office Phone
   pavankumar        pavankumar        *:0             Mar 29 01:27 (:0)
   ```

   This may not be available by default in many linux machines. In this case, you need to install it manually.

   ```bash
   $ sudo apt install finger
   ```
6. **users:** Displays usernames of all users currently logged on the system.

   ```bash
   $ users
   pavankumar
   ```

7. **grep:** It  is a powerful pattern searching tool to find information about a specific user from the system accounts file: /etc/passwd.

    ```bash
    $ grep -i sj /etc/passwd
    sj:x:1000:1000:sj,,,:/home/sj:/bin/bash
    ```

8. **W Command:** It(W) is a command-line utility that displays information about currently logged in users and what each user is doing.

    ```bash
    w [OPTIONS] [USER]

    Example:
    w
     18:45:04 up  2:09,  1 user,  load average: 0.09, 0.07, 0.02
    USER            TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
    pavankumar       :0       :0               01:27   ?xdm?   1:14   0.01s /usr/lib/gdm3/g
    ```

9. **last or lastb:** Displays a list of last logged in users on the system. You can pass user names to display their login and hostname details.

    ```bash
    last [options] [username...] [tty...]

    Example:

    last
    pavankumar       :0           :0               Fri Aug 28 01:27    gone - no logout


�险",
"pluvioviscid":"遇湿而粘的",
"plvmetal":"包铝层板",
"ply":"n. 厚度, 板层\\nvt. 使用, 使劲挥舞, 从事, 折, 弯\\nvi. 辛勤工作, 定期航行",
"ply between":"v. 定期往返于",
"ply sb with sth":"不断地提供, 不断提出问题",
"ply stress":"[化] 层应力",
"ply with":"v. 纠缠,骚扰",
"plyalectasis":"[医] 涎管扩张",
"plyboard":"层压板",
"plycast":"熔模壳型",
"plyed":"(ply 的过去分词) n. 厚度, 板层\\nvt. 使用, 使劲挥舞, 从事, 折, 弯\\nvi. 辛勤工作, 定期航行",
"plyer":"n. <主英>从事职业的人",
"plyers":"[复] n.= pliers",
"plyglass":"胶合玻璃",
"plying":"v. 使用（工具）( ply的现在分词 ); 经常供应（食物、饮料）; 固定往来; 经营生意",
"plying for hire":"[法] 招租",
"plyler":" [人名] 普莱勒",
"plymax":"镶铝装饰用胶合板",
"plymouth":"n. 普利茅斯（英国一座城市）",
"plymouth brethren":"n. 普利茅斯教友会",
"Plymouth Colony":"[网络] 普利茅斯殖民地；普利茅斯植民地；普里茅斯殖民地",
"Plymouth Rock":"na. 传说中美国第一批移民至美洲登陆处；普利茅斯品种鸡\\n[网络] 普利茅斯岩石；茅斯之岩；普利茅斯岩石城",
"plyometric":"a. 增强式的",
"plyometrics":"n. 肌肉增强训练",
"plys":"(ply 的第三人称 -s形式) n. 厚度, 板层\\nvt. 使用, 使劲挥舞, 从事, 折, 弯\\nvi. 辛勤工作, 定期航行",
"plytropic process":"[化] 多变过程",
"plywood":"n. 夹板, 合板\\n[机] 层板, 木夹板, 三夹板",
"plywoods":"(plywood 的复数) n. 夹板, 合板\\n[机] 层板, 木夹板, 三夹板",
"plz":"abbr. 伊丽莎白港（位于南非）；波兰兹罗提（波兰官方货币）",
"Plzen":"[网络] 皮尔森；比尔森；皮耳森",
"PLZJ":"[化] 掺镧锆钛酸铅",
"PM":"出纳员, 军需官\\n[计] 调相, 性能管理, 处理模块, 程序存储器",
"pm erasing head":"[电] 永磁式抹音头",
"pm speaker":"[电] 永磁话筒",
"PM2I":"[计] 加减2I网络",
"PMA":"[化] 均苯四酸",
"PMA.":"[医] 龈炎发病率(P为乳头,M为龈缘,A为龈附丽)",
"pmb":" [医][=papillomacular bundle]乳头黄斑束",
"pmbl":" [医]原发性纵隔B细胞淋巴瘤",
"pmc":


}

.quick-command-container,
.quick-commands>div {
    width: 50vw !important;
}

.quick-commands>div>div {
    max-width: 50vw !important;
}

.quick-command-container .quick-commands .quick-command[data-selected] {
    background-color: var(--colorHighlightBgAlpha) !important;
}input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  margin: 2.5px 0;
}
input[type=range]:focus {
  outline: none;
}

.singlegradrange[type=range]::-webkit-slider-runnable-track {
 background: linear-gradient(to left, black, white);
}

.singlegradrange[type=range]::-moz-range-track {
 background: linear-gradient(to left, black, white);
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  box-shadow: 0.5px 0.5px 0.7px rgba(0, 0, 0, 0.48), 0px 0px 0.5px rgba(13, 13, 13, 0.48);
  background: linear-gradient(to left, black , white 50%, red);
  border-radius: 2.3px;
  border: 0.2px solid black;
}
input[type=range]::-webkit-slider-thumb {
  box-shadow: 0px 0px 2.2px rgba(0, 0, 0, 0.61), 0px 0px 0px rgba(13, 13, 13, 0.61);
  border: 1px solid #000000;
  height: 11px;
  width: 5px;
  border-radius: 2px;
  background: #000000;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -2.7px;
}
input[type=range]::-moz-range-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  box-shadow: 0.5px 0.5px 0.7px rgba(0, 0, 0, 0.48), 0px 0px 0.5px rgba(13, 13, 13, 0.48);
  background: linear-gradient(to left, black , white 50%, red);;
  border-radius: 2.3px;
  border: 0.2px solid black;
}
input[type=range]::-moz-range-thumb {
  box-shadow: 0px 0px 2.2px rgba(0, 0, 0, 0.61), 0px 0px 0px rgba(13, 13, 13, 0.61);
  border: 1px solid #000000;
  height: 11px;
  width: 5px;
  border-radius: 2px;
  background: #000000;
  cursor: pointer;
}

input[type=range]::-ms-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: transparent;
  border-color: transparent;
  color: transparent;
}
input[type=range]::-ms-fill-lower {
  background: #90ee90;
  border: 0.2px solid black;
  border-radius: 4.6px;
  box-shadow: 0.5px 0.5px 0.7px rgba(0, 0, 0, 0.48), 0px 0px 0.5px rgba(13, 13, 13, 0.48);
}
input[type=range]::-ms-fill-upper {
  background: #90ee90;
  border: 0.2px solid black;
  border-radius: 4.6px;
  box-shadow: 0.5px 0.5px 0.7px rgba(0, 0, 0, 0.48), 0px 0px 0.5px rgba(13, 13, 13, 0.48);
}

input[type=range]::-ms-thumb {
  box-shadow: 0px 0px 2.2px rgba(0, 0, 0, 0.61), 0px 0px 0px rgba(13, 13,


iSection_kr3hcptz .sADNSDo.oFmBHH3--wired.sDKQiIz .s__4kJyL_{background-color:#FFFFFF}.TPAMultiSection_kr3hcptz .sADNSDo.oFmBHH3--wired.sDKQiIz .sCa1UfG.o_lRRWi--disabled.sW0Cgk_ .sYm8bRk svg:not([fill=currentColor]) path{stroke:#909090}.TPAMultiSection_kr3hcptz .sADNSDo.oFmBHH3--wired.sDKQiIz .sCa1UfG.o_lRRWi--disabled.sRZmCqz .sYm8bRk svg:not([fill=currentColor]) path{fill:#909090;stroke:#909090}.TPAMultiSection_kr3hcptz .sADNSDo.oFmBHH3--wired.sDKQiIz .sCa1UfG .sW0Cgk_ .sYm8bRk svg:not([fill=currentColor]) path,.TPAMultiSection_kr3hcptz .sADNSDo.oFmBHH3--wired.sDKQiIz .sCa1UfG.o_lRRWi---skin-4-line .sYm8bRk svg:not([fill=currentColor]) path{stroke:#303030}.TPAMultiSection_kr3hcptz .sADNSDo.oFmBHH3--wired.sDKQiIz .sCa1UfG .sRZmCqz .sYm8bRk svg:not([fill=currentColor]) path,.TPAMultiSection_kr3hcptz .sADNSDo.oFmBHH3--wired.sDKQiIz .sCa1UfG.o_lRRWi---skin-4-full .sYm8bRk svg:not([fill=currentColor]) path{fill:#303030;stroke:#303030}.TPAMultiSection_kr3hcptz .sADNSDo.oFmBHH3--wired.sDKQiIz .sCa1UfG .sYm8bRk svg[fill=currentColor]{color:#303030}.TPAMultiSection_kr3hcptz .sADNSDo.oFmBHH3--wired.sDKQiIz .sCa1UfG.o_lRRWi--disabled .sYm8bRk svg[fill=currentColor]{color:#909090}.TPAMultiSection_kr3hcptz .sADNSDo.oFmBHH3--wired.sDKQiIz .sCa1UfG.o_lRRWi---theme-3-box{background-color:#FFFFFF}.TPAMultiSection_kr3hcptz .s__0mqsjd{font:var(--wcButtonFont, normal normal normal 16px/1.4em wfont_23c8a5_bfdf700093d54e959dae6ed4781255a7,wf_bfdf700093d54e959dae6ed47,orig_inter_regular)}.TPAMultiSection_kr3hcptz .sp27XYD{border-color:#666666;border-radius:var(--wcCornerRadius, 0)}.TPAMultiSection_kr3hcptz .sp27XYD,.TPAMultiSection_kr3hcptz .sp27XYD.o__3zQn9i---priority-5-basic{color:#FFFFFF;background-color:#303030;border-width:0px}.TPAMultiSection_kr3hcptz .sp27XYD:active,.TPAMultiSection_kr3hcptz .sp27XYD.o__3zQn9i---priority-5-basic:active,.TPAMultiSection_kr3hcptz .sp27XYD.o_YLhlO--focus,.TPAMultiSection_kr3hcptz .sp27XYD.o__3zQn9i---priority-5-basic.o_YLhlO--focus,.TPAMultiSection_kr3hcptz .sp27XYD:hover,.TPAMultiSection_kr3hcptz .sp27XY


        content:getMyVar('ej_content',''),
                                        tabs:getMyVar('ej_tabs',''),
                                        tab_text:getMyVar('ej_tab_text',''),
                                        // ej_lists:"二级选集列表(#id是线路替换,必然包含)",
                                        lists:getMyVar('ej_lists',''),
                                        list_text:getMyVar('ej_list_text',''),
                                        tab_id:getMyVar('ej_tab_id',''),
                                    };
                                    二级(p);
                                }
                                // 自动二级(lazy);
                            });
                            return it
                        });
                        setResult(result);
                    }

                }
            },key,p)
        })
    });
    d.push({
        title:'测试一二级',
        col_type:'text_3',
        url:$('#noLoading#').lazyRule(()=>{
            let url=getMyVar('url','').trim();
            let homeUrl=url.replace('hiker://empty##','');
            if(!url||!/^http/.test(homeUrl)){
                return 'toast://请输入正确的网页地址'
            }
            var ua = getMyVar('ua','');
            initConfig({
                指定ua:ua,
                // 模板:'http://hiker.nokia.press/hikerule/rulelist.json?id=2505'
            });
            if(ua) {
                log('测试一级指定ua:' + ua);
            }
            return $(homeUrl).rule(()=>{
                setPageTitle('测试');
                require(config.自动匹配);
                if(!getMyVar('find_rule','')){
                    自动一级(null,null,null,true);
                }else{
                    依赖检测();
                    let p = getMyVar('find_rule','');
                    let cates = [];
                    设置(cates);
                    var result = 一级(p, true, cates, null,null,true);
                    if(Array.isArray(result)&&result.length>0){
                        result = result.filter(it=>it.url);//筛选正常url的
                        result = result.map((it)=>{
                            it.url = $(it.url).rule(()=>{
                                require(config.自动匹配);
                                // requireCache('https://hikerfans.com/lmysdm/lazy.js',24);
                                if(!getMyVar('ej_tabs','')||!getMyVar('ej_lists','')){
                                    自动二级();
                                }else{
                                    let p = {
                                        title:getMyVar('ej_title',''),
                                        img:getMyVar('ej_img',''),
                                        url:getMyVar('ej_url',''),
                                        desc:getMyVar('ej_desc',''),
                                        content:getMyVar('ej_content',''),
                                        tabs:getMyVar('ej_tabs',''),
                                        tab_text:getMyVar('ej_tab_text',''),
                                        // ej_lists:"二级选集列表(#id是线路替换,必然包含)",
                                        lists:getMyVar('ej_lists',''),
                                        list_text:getMyVar('ej_list_text',''),
                                        tab_id:


        }
                else -> event
            },
            beat_key,
            position
        )?.let { start_event ->
            val merge_key_array = PlaybackFrameMap.generate_merge_keys(beat_key.channel, beat_key.line_offset)
            this._add_handles(start_frame, end_frame, start_event, next_event_frame, merge_key_array)
        }

        return when (event) {
            is RelativeNoteEvent -> event.offset + bkp_note_value
            is AbsoluteNoteEvent -> event.note
            is PercussionEvent -> bkp_note_value
            else -> 0 // Should be unreachable
        }
    }

    private fun _gen_midi_event(event: InstrumentEvent, beat_key: BeatKey, position: List<Int>): GeneralMIDIEvent? {
        val velocity = min((this.opus_manager.get_current_velocity(beat_key, position) * 100F).toInt(), 127)
        // Assume event is *not* relative as it is modified in map_tree() before _gen_midi_event is called
        val (note, bend) = when (event) {
            is PercussionEvent -> {
                Pair(27 + this.opus_manager.get_percussion_instrument(beat_key.channel, beat_key.line_offset), 0)
            }
            is AbsoluteNoteEvent -> {
                // Can happen since we convert RelativeNotes to Absolute ones before passing them to this function
                if (event.note < 0) {
                    return null
                }
                val radix = this.opus_manager.tuning_map.size
                val octave = event.note / radix
                val offset = this.opus_manager.tuning_map[event.note % radix]

                // This offset is calculated so the tuning map always reflects correctly
                val transpose_offset = 12F * this.opus_manager.transpose.first.toFloat() / this.opus_manager.transpose.second.toFloat()
                val std_offset = (offset.first.toFloat() * 12F / offset.second.toFloat())

                Pair(
                    21 + (octave * 12) + std_offset.toInt() + transpose_offset.toInt(),
                    (((std_offset - floor(std_offset)) + (transpose_offset - floor(transpose_offset))) * 512F).toInt()
                )
            }
            else -> Pair(0, 0) // Should be unreachable
        }

        return NoteOn79(
            index = 0, // Set index as note is applied
            channel = this.opus_manager.get_channel(beat_key.channel).get_midi_channel(),
            velocity = velocity shl 8,
            note = note,
            bend = bend
        )
    }
}
package com.qfs.pagan.structure.opusmanager

import com.qfs.json.JSONBoolean
import com.qfs.json.JSONFloat
import com.qfs.json.JSONHashMap
import com.qfs.json.JSONInteger
import com.qfs.json.JSONList
import com.qfs.json.JSONString
import com.qfs.pagan.CH_ADD
import com.qfs.pagan.CH_CLOSE
import com.qfs.pagan.CH_DOWN
import com.qfs.pagan.CH_HOLD
import com.qfs.pagan.CH_NEXT
import com.qfs.pagan.CH_OPEN
import com.qfs.pagan.CH_SUBTRACT
import com.qfs.pagan.CH_UP
import com.qfs.pagan.REL_CHARS
import com.qfs.pagan.SPECIAL_CHARS
import com.qfs.pagan.char_to_int
import com.qfs.pagan.jsoninterfaces.ExpectedCharacterException
import com.qfs.pagan.jsoninterfaces.OpusTreeJSONInterface
import com.qfs.pagan.jsoninterfaces.UnknownChannelTypeException
import com.qfs.pagan.structure.opusmanager.base.OpusChannel
import com.qfs.pagan.structure.opusmanager.base.OpusChannelAbstract
import com.qfs.pagan.structure.opusmanager.base.OpusPercussionChannel
import com.qfs.pagan.structure.rationaltree.ReducibleTree

class OpusChannelJSONInterface {
    companion object {


": "BRT",
        "NST": "NST",
        "AST": "AST",
        "EST": "EST",
        "CST": "CST",
        "MST": "MST",
        "PST": "PST",
        "AKST": "AKST",
        "MIT": "MIT",
        "HST": "HST",
        "SST": "SST",
        "BIT": "BIT",
        "CHADT": "CHADT",
        "NZDT": "NZDT",
        "AEDT": "AEDT",
        "ACDT": "ACDT",
        "AZST": "AZST",
        "IRDT": "IRDT",
        "EEST": "EEST",
        "CEST": "CEST",
        "BST": "BST",
        "PMDT": "PMDT",
        "ADT": "ADT",
        "NDT": "NDT",
        "EDT": "EDT",
        "CDT": "CDT",
        "MDT": "MDT",
        "PDT": "PDT",
        "AKDT": "AKDT",
        "HADT": "HADT"
};
Date.CultureStrings.lang = "uz-Latn-UZ";

/**
 * @overview datejs
 * @version 1.0.0-rc3
 * @author Gregory Wild-Smith <gregory@wild-smith.com>
 * @copyright 2014 Gregory Wild-Smith
 * @license MIT
 * @homepage https://github.com/abritinthebay/datejs
 */(function () {
	var $D = Date;
	var lang = Date.CultureStrings ? Date.CultureStrings.lang : null;
	var loggedKeys = {}; // for debug purposes.
	var getText = {
		getFromKey: function (key, countryCode) {
			var output;
			if (Date.CultureStrings && Date.CultureStrings[countryCode] && Date.CultureStrings[countryCode][key]) {
				output = Date.CultureStrings[countryCode][key];
			} else {
				output = getText.buildFromDefault(key);
			}
			if (key.charAt(0) === "/") { // Assume it's a regex
				output = getText.buildFromRegex(key, countryCode);
			}
			return output;
		},
		getFromObjectValues: function (obj, countryCode) {
			var key, output = {};
			for(key in obj) {
				if (obj.hasOwnProperty(key)) {
					output[key] = getText.getFromKey(obj[key], countryCode);
				}
			}
			return output;
		},
		getFromObjectKeys: function (obj, countryCode) {
			var key, output = {};
			for(key in obj) {
				if (obj.hasOwnProperty(key)) {
					output[getText.getFromKey(key, countryCode)] = obj[key];
				}
			}
			return output;
		},
		getFromArray: function (arr, countryCode) {
			var output = [];
			for (var i=0; i < arr.length; i++){
				if (i in arr) {
					output[i] = getText.getFromKey(arr[i], countryCode);
				}
			}
			return output;
		},
		buildFromDefault: function (key) {
			var output, length, split, last;
			switch(key) {
				case "name":
					output = "en-US";
					break;
				case "englishName":
					output = "English (United States)";
					break;
				case "nativeName":
					output = "English (United States)";
					break;
				case "twoDigitYearMax":
					output = 2049;
					break;
				case "firstDayOfWeek":
					output = 0;
					break;
				default:
					output = key;
					split = key.split("_");
					length = split.length;
					if (length > 1 && key.charAt(0) !== "/") {
						// if the key isn't a regex and it


re,pr_sto,pr_idcob):
  print ("Ingresar nombre del Producto")
  nom=imput("Nombre; ")
  print("Ingrese Precio del produco en Peso Argentino")
  pre=imput("Precio en AR$; ")
  print("Ingrese Stock comprado")
  sto=imput("Unidades en stock; ")
  print("Ingresar ID de código de barras")
  idc=imput("ID Código de barras; ")
  print("Ingresar Dia de vencimiento")
  dfv=imput("Dia de vencimiento; ")
  print("Ingresar Mes de vencimiento")
  mfv=imput("Mes de vencimiento; ")
  print("Ingresar Año de vencimiento")
  afv=imput("Año de vencimiento; ")
  print("Ingrese volumen del producto en ml")
  vol=imput("Volumen")
  alt_prod_val(nom,pre,sto,idc)
  alt_com_val(nom,pre,sto,idc,dfv,mfv,afv)
  alt_beb_val(nom,pre,sto,idc,dfv,mfv,afv,vol)
  print ("Registros ingresados")
#Métodos de retorno___________________________________________________________________________________________________________________________________________________
def traer_cliente(nom_c):

#_____________________________________________________________________________________________________________________________________________________________________


mVolume.mCurrentValue;
		if (mVolumeMode == 0) {
			vol *= vol;
		}
		if (mIsMuted) {
			vol = 0.0f;
		}
		if (mExtBuffer && mExtBuffer->checkOuterSwitch(OUTERPARAM_Volume)) {
			vol *= mExtBuffer->mVolume;
		}
		if (mIsPaused && mPauseStatus & 0x1) {
			vol *= mTimedParam.mInnerParam._100.mCurrentValue;
		}
	}

	u32 isPitch = flag & OUTERPARAM_Pitch;
	if (isPitch) {
		pitch = JASPlayer::pitchToCent(mTimedParam.mInnerParam.mPitch.mCurrentValue, f32(mRegisterParam._0E));
		pitch *= mVibrate.getValue();
		if (mExtBuffer && mExtBuffer->checkOuterSwitch(OUTERPARAM_Pitch)) {
			pitch *= mExtBuffer->mPitch;
		}
	}

	u32 isPan = flag & OUTERPARAM_Pan;
	if (isPan) {
		pan = mTimedParam.mInnerParam.mPan.mCurrentValue;
		if (mExtBuffer && mExtBuffer->checkOuterSwitch(OUTERPARAM_Pan)) {
			pan = panCalc(pan, mExtBuffer->mPan, panWeight, mPanCalcType);
		}
	}

	u32 isFxmix = flag & OUTERPARAM_Fxmix;
	if (isFxmix) {
		fxmix = mTimedParam.mInnerParam.mFxmix.mCurrentValue;
		if (mExtBuffer && mExtBuffer->checkOuterSwitch(OUTERPARAM_Fxmix)) {
			fxmix = panCalc(fxmix, mExtBuffer->mFxmix, panWeight, mFxmixCalcType);
		}
	}

	u32 isDolby = flag & OUTERPARAM_Dolby;
	if (isDolby) {
		dolby = mTimedParam.mInnerParam.mDolby.mCurrentValue;
		if (mExtBuffer && mExtBuffer->checkOuterSwitch(OUTERPARAM_Dolby)) {
			dolby = panCalc(dolby, mExtBuffer->mDolby, panWeight, mDolbyCalcType);
		}
	}

	if (flag & OUTERPARAM_IIRFilter) {
		for (int i = 0; i < 4; i++) {
			mChannelUpdater.mIIRFilterParams[i] = (SHORT_FLOAT_MAX - 1.0f) * mTimedParam.mInnerParam.mIIRs[i].mCurrentValue;
		}

		mChannelUpdater.mFilterMode |= 0x20;
	}

	if (mExtBuffer && flag & OUTERPARAM_FIR8Filter && mExtBuffer->checkOuterSwitch(OUTERPARAM_FIR8Filter)) {
		for (u8 i = 0; i < 8; i++) {
			mChannelUpdater.mFIR8FilterParams[i] = mExtBuffer->getIntFirFilter(i);
		}
		mChannelUpdater.mFilterMode = (mChannelUpdater.mFilterMode & 0x20) + 8;
	}

	if (flag & OUTERPARAM_Unk6) {
		mChannelUpdater._34 = (SHORT_FLOAT_MAX - 1.0f) * mTimedParam.mInnerParam._50.mCurrentValue;
	}

	if (!mParentTrack || _357 & 0x1) {
		if (isVol) {
			mChannelUpdater.mVolume = vol;
		}
		if (isPitch) {
			mChannelUpdater.mPitch = pitch;
		}
		if (isPan) {
			mChannelUpdater.mPan = pan;
		}
		if (isFxmix) {
			mChannelUpdater.mFxMix