fsdmClockSrc,
    /// Sampling frequency. Used to adjust clock divider. Defaults to 48kHz. (48_000_000)
    pub sampling_freq: u32,
    /// Sample as one-shot, continuous, or continuous fast-mode. Defaults to continuous fast mode.
    pub continuous: Continuous,
    /// Sinc filter order. Defaults to Sinc4.
    pub filter_order: FilterOrder,
    /// Sinc filter oversampling ratio. Also known as decimation ratio
    pub filter_oversampling_ratio: u16,
    /// Integrator oversampling ratio. Also known as averaging (?) ratio
    pub integrator_oversampling_ratio: u8,
    /// To have the result aligned to a 24-bit value, each channel defines a number of right bit shifts
    /// which will be applied on each conversion result (injected or regular) from a given channel.
    /// The data bit shift number is stored in DTRBS[4:0] bits in DFSDM_CHyCFGR2 register.
    /// The right bit-shift is rounding the result to nearest integer value. The sign of shifted result is
    /// maintained, in order to have valid 24-bit signed format of result data.
    pub right_shift_bits: u8,
    /// The offset correction allows to calibrate the external sigma-delta modulator offset error. The
    /// user configures the offset register with a signed 24-bit correction, and this register is
    /// automatically added to the output result. The offset correction value is usually the result of a
    /// calibration routine embedded within the microcontroller software that performs the offset
    /// calibration calculation and stores the correction into the offset register. Defaults to 0.
    /// This  must be a 24 bit signed integer, which Rust doesn't support. So, to make it negative, you might
    /// use something like this: `offset:(1<<24) - 1_000;`
    pub offset: u32,
    /// SPI clock select for channel y. Ie internal or external.
    pub spi_clock: SpiClock,
}

impl Default for DfsdmConfig {
    fn default() -> Self {
        Self {
            clock_src: DfsdmClockSrc::AudioClk,
            sampling_freq: 48_000,
            continuous: Continuous::ContinuousFastMode,
            filter_order: FilterOrder::Sinc4, // From the PDM mic AN
            filter_oversampling_ratio: 64,    // From the PDM mic AN
            integrator_oversampling_ratio: 1, // From the PDM mic AN
            right_shift_bits: 0, // PDM mic AN uses 0x02. 8 seems right to get to 24 bit signed?
            offset: 0,
            spi_clock: SpiClock::Internal,
        }
    }
}

/// Represents the Digital filter for sigma delta modulators (DFSDM) peripheral, for
/// interfacing with external Σ∆ modulators.
pub struct Dfsdm<R> {
    pub regs: R,
    config: DfsdmConfig,
}

impl<R> Dfsdm<R>
where
    R: Deref<Target = dfsdm_p::RegisterBlock>,
    R: Deref<Target = dfsdm_p::RegisterBlock>,
{
    /// Initialize a DFSDM peripheral, including  enabling and resetting
    /// its RCC peripheral clock.
    pub fn new(regs: R, config: DfsdmConfig, clock_cfg: &Clocks) -> Self {
        free(|_| {
            let rcc = unsafe { &(*RCC::ptr()) };
            #[cfg(not(feature = "l4"))]
            rcc_en_reset!(apb2, dfsdm1, rcc);
            #[cfg(feature = "l4")]
            rcc_en_reset!(apb2, dfsdm, rcc);
        });

        // The frequency of this CKOUT signal is derived from DFSDM clock or from audio clock (see
        // CKOUTSRC bit in CH0CFGR1 register) divided by a predivider (see CKOUTDIV
        // bits in CH0CFGR1 register). If the output clock is stopped, then CKOUT signal is
        // set to low state (output clock can be stopped by CKOUTDIV=0 in CHyCFGR1
        // register or by DFSDMEN=0 in CH0CFGR1 reg


f, U+3d12-3d13, U+3d1d, U+3d32, U+3d3b, U+3d46, U+3d4c, U+3d4e, U+3d51, U+3d5f, U+3d62, U+3d68-3d6a, U+3d6f, U+3d75, U+3d7d, U+3d85, U+3d88, U+3d8a, U+3d8f, U+3d91, U+3da5, U+3dad, U+3db4, U+3dbf, U+3dc6-3dc7, U+3dc9, U+3dcc-3dcd, U+3dd3, U+3ddb, U+3de7-3de8, U+3deb, U+3df3-3df4, U+3df7, U+3dfc-3dfd, U+3e03, U+3e06, U+3e40, U+3e43, U+3e48, U+3e55, U+3e74, U+3ea8-3eaa, U+3ead, U+3eb1, U+3eb8, U+3ebf, U+3ec2, U+3ec7, U+3eca, U+3ecc, U+3ed0-3ed1, U+3ed6-3ed7, U+3eda-3edb, U+3ede, U+3ee1-3ee2, U+3ee7, U+3ee9, U+3eeb-3eec, U+3ef0, U+3ef3-3ef4, U+3efa, U+3efc, U+3eff-3f00, U+3f04, U+3f06-3f08, U+3f0e, U+3f21, U+3f53, U+3f58-3f59, U+3f63, U+3f7c, U+3f93, U+3f97, U+3fc0, U+3fc8, U+3fd7, U+3fdc, U+3fe5, U+3fed, U+3ff9-3ffa, U+4004, U+4009, U+401d, U+4039, U+4045, U+4053, U+4057, U+4062, U+4065, U+406a, U+406f, U+4071, U+40a8, U+40b4, U+40bb, U+40bf, U+40c8, U+40d8, U+40df, U+40f8, U+40fa, U+4102-4104, U+4109, U+410e, U+411b, U+4131-4132, U+4167, U+416c, U+416e, U+417c, U+417f, U+4181, U+4190, U+41b2, U+41c4, U+41ca, U+41cf;
}
/* [G_87] */
@font-face {
  font-family: 'Chiron Hei HK WS';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/chiron-hei-hk/woff2/chironheihkvf.G_87.woff2') format('woff2-variations'), url('/chiron-hei-hk/woff2/chironheihkvf.G_87.woff2') format('woff2 supports variations');
  unicode-range: U+3572, U+3577-3578, U+3584, U+3597-3598, U+35a1, U+35a5, U+35ad, U+35bf, U+35c1, U+35c5, U+35c7, U+35ca, U+35ce, U+35d2, U+35d6, U+35db, U+35dd, U+35f1-35f3, U+35fb, U+35fe, U+3609, U+3618,


订单的同时，根据订单中包含的userId查询出用户信息，一起返回。

![image-20210713213312278](assets/image-20210713213312278.png)

因此，我们需要在order-service中 向user-service发起一个http的请求，调用http://localhost:8081/user/{userId}这个接口。

大概的步骤是这样的：

- 注册一个RestTemplate的实例到Spring容器
- 修改order-service服务中的OrderService类中的queryOrderById方法，根据Order对象中的userId查询User
- 将查询的User填充到Order对象，一起返回

### 2.3.2.注册RestTemplate

首先，我们在order-service服务中的OrderApplication启动类中，注册RestTemplate实例：

```java
package cn.itcast.order;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@MapperScan("cn.itcast.order.mapper")
@SpringBootApplication
public class OrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
    }

    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
```

### 2.3.3.实现远程调用

修改order-service服务中的cn.itcast.order.service包下的OrderService类中的queryOrderById方法：

![image-20210713213959569](assets/image-20210713213959569.png)

## 2.4.提供者与消费者

在服务调用关系中，会有两个不同的角色：

**服务提供者**：一次业务中，被其它微服务调用的服务。（提供接口给其它微服务）

**服务消费者**：一次业务中，调用其它微服务的服务。（调用其它微服务提供的接口）

![image-20210713214404481](assets/image-20210713214404481.png)

但是，服务提供者与服务消费者的角色并不是绝对的，而是相对于业务而言。

如果服务A调用了服务B，而服务B又调用了服务C，服务B的角色是什么？

- 对于A调用B的业务而言：A是服务消费者，B是服务提供者
- 对于B调用C的业务而言：B是服务消费者，C是服务提供者

因此，服务B既可以是服务提供者，也可以是服务消费者。

# 3.Eureka注册中心

假如我们的服务提供者user-service部署了多个实例，如图：

![image-20210713214925388](assets/image-202107132


::string> poly_names;
  std::cout << "Loading viewer...\n";
  while (!viewer->wasStopped ())
  {
    if (show_supervoxels)
    {
      if (!viewer->updatePointCloud ((show_refined)?refined_labeled_voxel_cloud:labeled_voxel_cloud, "colored voxels"))
      {
        viewer->addPointCloud ((show_refined)?refined_labeled_voxel_cloud:labeled_voxel_cloud, "colored voxels");
        viewer->setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE,3.0, "colored voxels");
      }
    }
    else
    {
      viewer->removePointCloud ("colored voxels");
    }

    if (show_voxel_centroids)
    {
      if (!viewer->updatePointCloud (voxel_centroid_cloud, "voxel centroids"))
      {
        viewer->addPointCloud (voxel_centroid_cloud, "voxel centroids");
        viewer->setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE,2.0, "voxel centroids");
      }
    }
    else
    {
      viewer->removePointCloud ("voxel centroids");
    }

    if (show_supervoxel_normals)
    {
      if (refined_sv_normal_shown != show_refined || !sv_added)
      {
        viewer->removePointCloud ("supervoxel_normals");
        viewer->addPointCloudNormals<PointNormal> ((show_refined)?refined_sv_normal_cloud:sv_normal_cloud,1,0.05f, "supervoxel_normals");
        sv_added = true;
      }
      refined_sv_normal_shown = show_refined;
    }
    else if (!show_supervoxel_normals)
    {
      viewer->removePointCloud ("supervoxel_normals");
    }

    if (show_normals)
    {
      auto sv_itr = ((show_refined) ? refined_supervoxel_clusters.begin () : supervoxel_clusters.begin ());
      auto sv_itr_end = ((show_refined) ? refined_supervoxel_clusters.end () : supervoxel_clusters.end ());
      for (; sv_itr != sv_itr_end; ++sv_itr)
      {
        std::stringstream ss;
        ss << sv_itr->first <<"_normal";
        if (refined_normal_shown != show_refined || !normals_added)
        {
          viewer->removePointCloud (ss.str ());
          viewer->addPointCloudNormals<PointT,Normal> ((sv_itr->second)->voxels_,(sv_itr->second)->normals_,10,0.02f,ss.str ());
        //  std::cout << (sv_itr->second)->normals_[0]<<"\n";

        }

      }
      normals_added = true;
      refined_normal_shown = show_refined;
    }
    else if (!show_normals)
    {
      auto sv_itr = ((show_refined) ? refined_supervoxel_clusters.begin () : supervoxel_clusters.begin ());
      auto sv_itr_end = ((show_refined) ? refined_supervoxel_clusters.end () : supervoxel_clusters.end ());
      for (; sv_itr != sv_itr_end; ++sv_itr)
      {
        std::stringstream ss;
        ss << sv_itr->first << "_normal";
        viewer->removePointCloud (ss.str ());
      }
    }

    if (show_graph && !graph_added)
    {
      poly_names.clear ();
      for (auto label_itr = label_adjacency.begin (); label_itr != label_adjacency.end (); )
      {
        //First get the label
        std::uint32_t supervoxel_la


import esphome.codegen as cg
import esphome.config_validation as cv
from esphome import automation
from esphome.automation import maybe_simple_id
from esphome.components import esp32_ble_tracker
from esphome.components import time
from esphome.const import (
    CONF_ID,
    CONF_TIME_ID,
    CONF_MAC_ADDRESS
)

CODEOWNERS = ["@buglloc"]
DEPENDENCIES = ["esp32_ble_tracker"]
MULTI_CONF = True

CONF_SECRET = "secret"
CONF_MAX_TS_DRIFT = "max_ts_drift"

pinky_winky_ns = cg.esphome_ns.namespace("pinky_winky")
PinkyWinky = pinky_winky_ns.class_(
    "PinkyWinky", esp32_ble_tracker.ESPBTDeviceListener, cg.Component
)

CONFIG_SCHEMA = (
    cv.Schema(
        {
            cv.GenerateID(): cv.declare_id(PinkyWinky),
            cv.GenerateID(CONF_TIME_ID): cv.use_id(time.RealTimeClock),
            cv.Required(CONF_SECRET): cv.templatable(
                cv.All(cv.string, cv.Length(min=8, max=32))
            ),
            cv.Required(CONF_MAC_ADDRESS): cv.mac_address,
            cv.Optional(CONF_MAX_TS_DRIFT, default="60"): cv.All(
              cv.positive_int,
            ),
        }
    )
    .extend(esp32_ble_tracker.ESP_BLE_DEVICE_SCHEMA)
    .extend(cv.COMPONENT_SCHEMA)
)

async def to_code(config):
    var = cg.new_Pvariable(config[CONF_ID])
    await cg.register_component(var, config)
    await esp32_ble_tracker.register_ble_device(var, config)

    time_ = await cg.get_variable(config[CONF_TIME_ID])
    cg.add(var.set_time(time_))
    cg.add(var.set_address(config[CONF_MAC_ADDRESS].as_hex))
    cg.add(var.set_secret(config[CONF_SECRET]))
    cg.add(var.set_max_ts_drift(config[CONF_MAX_TS_DRIFT]))

PinkyWinkyResetAction = pinky_winky_ns.class_(
    "PinkyWinkyResetAction", automation.Action
)

ACTION_SCHEMA = maybe_simple_id(
    {
        cv.Required(CONF_ID): cv.use_id(PinkyWinky),
    }
)

@automation.register_action(
    "pinky_winky.reset", PinkyWinkyResetAction, ACTION_SCHEMA
)
async def pinky_winky_reset_to_code(config, action_id, template_arg, args):
    var = cg.new_Pvariable(action_id, template_arg)
    await cg.register_parented(var, config[CONF_ID])
    return var


-block-caption span.caption-text {
}

div.literal-block-wrapper {
    margin: 1em 0;
}

code.xref, a code {
    background-color: transparent;
    font-weight: bold;
}

h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
    background-color: transparent;
}

.viewcode-link {
    float: right;
}

.viewcode-back {
    float: right;
    font-family: sans-serif;
}

div.viewcode-block:target {
    margin: -1px -10px;
    padding: 0 10px;
}

/* -- math display ---------------------------------------------------------- */

img.math {
    vertical-align: middle;
}

div.body div.math p {
    text-align: center;
}

span.eqno {
    float: right;
}

span.eqno a.headerlink {
    position: absolute;
    z-index: 1;
}

div.math:hover a.headerlink {
    visibility: visible;
}

/* -- printout stylesheet --------------------------------------------------- */

@media print {
    div.document,
    div.documentwrapper,
    div.bodywrapper {
        margin: 0 !important;
        width: 100%;
    }

    div.sphinxsidebar,
    div.related,
    div.footer,
    #top-link {
        display: none;
    }
}@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins" , sans-serif;
}
.sidebar{
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 78px;
  background: var(--dark-color);
  padding: 6px 14px;
  z-index: 99;
  transition: all 0.5s ease;
}
.sidebar.open{
  width: 250px;
}
.sidebar .logo-details{
  height: 60px;
  display: flex;
  align-items: center;
  position: relative;
}
.sidebar .logo-details .icon{
  opacity: 0;
  transition: all 0.5s ease;
}
.sidebar .logo-details .logo_name{
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  opacity: 0;
  transition: all 0.5s ease;
}
.sidebar.open .logo-details .icon,
.sidebar.open .logo-details .logo_name{
  opacity: 1;
}
.sidebar .logo-details #btn{
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  font-size: 22px;
  transition: all 0.4s ease;
  font-size: 23px;
  text-align: center;
  cursor: pointer;
  transition: all 0.5s ease;
}
.sidebar.open .logo-details #btn{
  text-align: right;
}
.sidebar i{
  color: #fff;
  height: 60px;
  min-width: 50px;
  font-size: 28px;
  text-align: center;
  line-height: 60px;
}
.sidebar .nav-list{
  margin-top: 20px;
  height: 100%;
}
.sidebar li{
  position: relative;
  margin: 8px 0;
  list-style: none;
}
.sidebar li .tooltip{
  position: absolute;
  top: -20px;
  left: calc(100% + 15px);
  z-index: 3;
  background: #fff;
  bo


getNextSibling(rowId).id).index);

    this.logger.debug("Moving nodes from " + fromIdx + " to " + toIdx + " to the place of " + targetIdx);

    // Build a new data array
    var _data = tableManager.getTableModel().getData();
    var _tmp = _data.splice(fromIdx, toIdx - fromIdx + 1);

    Array().splice.apply(_data, [targetIdx - toIdx + fromIdx, 0].concat(_tmp));
    //_data = _data.slice(0,targetIdx-toIdx+fromIdx).concat(_tmp).concat(_data.slice(targetIdx-toIdx+fromIdx));
    tableManager.getTableModel().setData(_data);

    // Now do the same on the UI

    // move rows id: fromIdx -> toIdx to targetIdx
    for(var i = 0; i <= toIdx - fromIdx; i++) {
      $('#' + tableManager.getTableId() + " > tbody > tr:eq(" + (targetIdx) + ")").after(
          $('#' + tableManager.getTableId() + " > tbody > tr:eq(" + (fromIdx) + ")")
      );
    }

    tableManager.setSelectedCell([targetIdx - toIdx + fromIdx, colIdx]);
    tableManager.updateOperations();

    var a = [];
    $.each(_data, function(i, row) {
      a.push(row.id);
    })
    this.logger.debug("Result: " + a.join(', '));

  }

});
CellOperations.registerOperation(new MoveDownOperation());

var DeleteOperation = BaseOperation.extend({

  id: "Delete",
  types: ["GenericDelete"],
  name: "Delete",
  description: "Delete",

  constructor: function() {
    this.logger = new Logger("DeleteOperation");
  },

  canExecute: function(tableManager) {
    return tableManager.isSelectedCell;
  },

  execute: function(tableManager) {

    // Move up: move the selected node and all children
    // up to the previous item

    var rowIdx = tableManager.getSelectedCell()[0];
    var colIdx = tableManager.getSelectedCell()[1];
    var rowId = tableManager.getTableModel().getEvaluatedId(rowIdx);

    var fromIdx = rowIdx;
    var toIdx = -1;

    var indexManager = tableManager.getTableModel().getIndexManager();
    var nextSibling = indexManager.getNextSibling(rowId);
    if(typeof nextSibling == 'undefined') {
      toIdx = indexManager.getLastChild(rowId).index;
    } else {
      toIdx = nextSibling.index - 1;
    }

    // Store the parent to update the table
    var _parentId = indexManager.getIndex()[rowId].parent;

    //check if last in group, except in layout
    var deleteParent = tableManager.id != LayoutPanel.TREE &&
        _parentId != IndexManager.ROOTID &&
        indexManager.isFirstChild(rowId) &&
        indexManager.isLastChild(rowId);
    if(deleteParent) {
      //start deleting in parent
      fromIdx = indexManager.getIndex()[_parentId].index;
      //update grandpa
      _parentId = indexManager.getIndex()[_parentId].parent;
    }

    this.logger.debug("Deleting nodes from " + fromIdx + " to " + toIdx);

    // Build a new data array
    tableManager.getTableModel().getData().splice(fromIdx, toIdx - fromIdx + 1);
    indexManager.updateIndex();

    // Now do the same on the UI

    // move rows id: fromIdx -> toIdx to targetIdx
    for(var i = 0; i <= toIdx - fromIdx; i++) {
      $('#' + tableManager.getTableId() + " > tbody > tr:eq(" + (fromIdx) + ")").remove();
    }

    tableManager.cellUnselected();

    var a = [];
    $.each(tableManager.getTableModel().getData(), function(i, row) {
      a.push(row.id);
    });
    this.logger.debug("Result: " + a.join(', '));

    // Update treeTable:
    tableManager.updateTreeTable(_parentId);
  }
});
CellOperations.registerOperation(new Del


 Member = Discord.GuildMember | Discord.PartialGuildMember

export function hasRole(member: Member, roleId: string): boolean {
	return member.roles.cache.has(roleId)
}

export function isEpicWebDev(member: Member) {
	return hasRole(member, process.env.ROLE_ID_EPIC_WEB)
}

export function isEpicReactDev(member: Member) {
	return hasRole(member, process.env.ROLE_ID_EPIC_REACT)
}

export function isTestingJs(member: Member) {
	return hasRole(member, process.env.ROLE_ID_TESTING_JS)
}

export function isModerator(member: Member) {
	return hasRole(member, process.env.ROLE_ID_MODERATORS)
}

export function isMember(member: Member) {
	return hasRole(member, process.env.ROLE_ID_MEMBER)
}

export function getMemberTeam(member: Member) {
	if (hasRole(member, process.env.ROLE_ID_BLUE)) return 'BLUE'
	if (hasRole(member, process.env.ROLE_ID_RED)) return 'RED'
	if (hasRole(member, process.env.ROLE_ID_YELLOW)) return 'YELLOW'
	return 'UNASSIGNED'
}
import WebSocket = require("ws");

const listeners = new Map();

type eventCallback = (data?: any) => any;

export default class DomEventHandler {

    public static addListener(context: any, obj: HTMLElement | WebSocket, event: string, callback: eventCallback) {
        const listenerKey = {
            context,
            obj,
            event,
            callback,
        };
        if (!listeners.has(listenerKey)) {
            const boundCallback = callback.bind(context);
            (obj as any).addEventListener(event, boundCallback);
            listeners.set(listenerKey, boundCallback);
        }
    }

    public static removeListener(context: any, obj: HTMLElement | WebSocket, event: string, callback: eventCallback) {
        const listenerKey = {
            context,
            obj,
            event,
            callback,
        };
        const key = getListener(listenerKey);
        if (key) {
            const boundCallback = listeners.get(key);
            (obj as any).removeEventListener(event, boundCallback);
            listeners.delete(key);
        } else {
            console.warn("Attempt to remove DOM event listener was unsuccessful.");
        }
    }
}

const getListener = (listenerKey: any) => {
    const keys = listeners.keys();
    let next = keys.next();
    while (!next.done) {
        const key = next.value;
        if (key.context === listenerKey.context && key.obj === listenerKey.obj && key.event === listenerKey.event && key.callback === listenerKey.callback) {
            return key;
        }
        next = keys.next();
    }
    return undefined;
};
/*--------------------------------------------------------------------------

@sinclair/typebox/value

The MIT License (MIT)

Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN


if not specifying TARGET_CPU, these toolchains will set some default. The format must be TARGET_CPU=cortex-mXX, see examples below.
Clone Arm Ethos-U Core Platform project and build, for example:

```
cd </path/to/CMSIS_5>/CMSIS/NN
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=</path/to/ethos-u-core-platform>/cmake/toolchain/arm-none-eabi-gcc.cmake -DTARGET_CPU=cortex-m55
make
```

Some more examples, assuming Ethos-u-core-platform is cloned into your home directory:

```
cmake .. -DCMAKE_TOOLCHAIN_FILE=~/ethos-u-core-platform/cmake/toolchain/arm-none-eabi-gcc.cmake -DTARGET_CPU=cortex-m55
cmake .. -DCMAKE_TOOLCHAIN_FILE=~/ethos-u-core-platform/cmake/toolchain/arm-none-eabi-gcc.cmake -DTARGET_CPU=cortex-m7
cmake .. -DCMAKE_TOOLCHAIN_FILE=~/ethos-u-core-platform/cmake/toolchain/armclang.cmake -DTARGET_CPU=cortex-m3
```

### Compiler options
Default optimization level is Ofast. Please change according to project needs. Just bear in mind it will impact performance.

The compiler option '-fomit-frame-pointer' is enabled by default at -O and higher. With no optimization level you may need to specifiy '-fomit-frame-pointer' as a minimum.

The compiler option '-fno-builtin' does not utilize optimized implementations of e.g. memcpy and memset, which are heavily used by CMSIS-NN. It can significantly downgrade performance. So this should be avoided.
The compiler option '-ffreestanding' should also be avoided as it enables '-fno-builtin' implicitly.

## Reference
[1] Legacy CMSIS-NN and how to use it https://developer.arm.com/solutions/machine-learning-on-arm/developer-material/how-to-guides/converting-a-neural-network-for-arm-cortex-m-with-cmsis-nn/single-page
# STM32CubeF0 CMSIS Device MCU Component

![latest tag](https://img.shields.io/github/v/tag/STMicroelectronics/cmsis_device_f0.svg?color=brightgreen)

## Overview

**STM32Cube** is an STMicroelectronics original initiative to ease the developers life by reducing efforts, time and cost.

**STM32Cube** covers the overall STM32 products portfolio. It includes a comprehensive embedded software platform, delivered for each STM32 series.
   * The CMSIS modules (core and device) corresponding to the ARM(tm) core implemented in this STM32 product
   * The STM32 HAL-LL drivers : an abstraction drivers layer, the API ensuring maximized portability across the STM32 portfolio
   * The BSP Drivers of each evaluation or demonstration board provided by this STM32 series
   * A consistent set of middlewares components such as RTOS, USB, FatFS, Graphics, STM32_TouchSensing_Library ...
   * A full set of software projects (basic examples, applications or demonstrations) for each board provided by this STM32 series

Two models of publication are proposed for the STM32Cube embedded software :
   * The monolithic **MCU Package** : all STM32Cube software modules of one STM32 series are present (Drivers, Middlewares, Projects, Utilities) in the repo (usual name **STM32Cubexx**, xx corresponding to the STM32 series)


Chance);
            PositionLightning.createRange(b, collidesAir, collidesGround, b, b.team, linkRange, maxHit, backColor, Mathf.chanceDelta(randomLightningChance), lightningDamage, lightningLength, PositionLightning.WIDTH, boltNum, p -> {
                liHitEffect.at(p.getX(), p.getY(), hitColor);
            });
            PositionLightning.setHitChanceDef();
        }

        if(randomGenerateRange > 0f && Mathf.chance(Time.delta * randomGenerateChance) && b.lifetime - b.time > PositionLightning.lifetime)
            PositionLightning.createRandomRange(b, b.team, b, randomGenerateRange, backColor, Mathf.chanceDelta(randomLightningChance), 0, 0, boltWidth, boltNum, randomLightningNum, hitPos -> {
            randomGenerateSound.at(hitPos, Mathf.random(0.9f, 1.1f));
            Damage.damage(b.team, hitPos.getX(), hitPos.getY(), splashDamageRadius / 8, splashDamage * b.damageMultiplier() / 8, collidesAir, collidesGround);
            ExoFx.hitMeltColor.at(hitPos.getX(), hitPos.getY(), lightningColor);

            hitModifier.get(hitPos);
        });
    }

    @Override
    public void init(Bullet b) {
        super.init(b);

        b.vel.scl(1 + b.lifetime * drag * 28 / lifetime);
    }

    @Override
    public void draw(Bullet b) {
        drawTrail(b);

        if(drawCircle){
            color(backColor);
            Fill.circle(b.x, b.y, size);
            color(frontColor);
            Fill.circle(b.x, b.y, size / 7f + size / 3 * Mathf.curve(b.fout(), 0.1f, 0.35f));
        }else{
            super.draw(b);
        }

        Drawf.light(b.x, b.y, size * 1.85f, backColor, 0.7f);
    }

    @Override
    public void despawned(Bullet b) {
        PositionLightning.createRandomRange(b, b.team, b, randomGenerateRange, backColor, Mathf.chanceDelta(randomLightningChance), 0, 0, boltWidth, boltNum, randomLightningNum, hitPos -> {
            Damage.damage(b.team, hitPos.getX(), hitPos.getY(), splashDamageRadius, splashDamage * b.damageMultiplier(), collidesAir, collidesGround);
            ExoFx.singleSpark.at(hitPos.getX(), hitPos.getY(), lightningColor);
            liHitEffect.at(hitPos);
            for (int j = 0; j < lightning; j++) {
                Lightning.create(b, lightningColor, lightningDamage < 0.0F ? damage : lightningDamage, b.x, b.y, b.rotation() + Mathf.range(lightningCone / 2.0F) + lightningAngle, lightningLength + Mathf.random(lightningLengthRand));
            }
            hitSound.at(hitPos, Mathf.random(0.9f, 1.1f));

            hitModifier.get(hitPos);
        });

        super.despawned(b);
    }
}package exogenesis.type.bullet;

import arc.math.*;
import arc.math.geom.*;
import arc.util.*;
import arc.util.pooling.*;
import exogenesis.content.ExoFx;
import exogenesis.content.effects.Pseudo3DFx;
import mindustry.content.*;
import mindustry.entities.bullet.*;
import mindustry.gen.*;
import exogenesis.util.*;

public class ArcMissileBulletType extends ArcBasicBulletType{
    public float accel = 0.1f;

    public ArcMissileBulletType(float damage, String sprite){
        super(


>

 Field Name
 Value
 Meaning

 [[AgentSignifier]]
 A value that admits equality testing
 The <emu-xref href=#agent id=_ref_8417>agent</emu-xref> whose evaluation resulted in this ordering.

 [[EventList]]
 A <emu-xref href=#sec-list-and-record-specification-type id=_ref_8418>List</emu-xref> of events
 Events are appended to the list during evaluation.

 [[AgentSynchronizesWith]]
 A <emu-xref href=#sec-list-and-record-specification-type id=_ref_8419>List</emu-xref> of pairs of <emu-xref href=#sec-memory-model-fundamentals id=_ref_8420>Synchronize</emu-xref> events
 <emu-xref href=#sec-memory-model-fundamentals id=_ref_8421>Synchronize</emu-xref> relationships introduced by the operational semantics.

</emu-table>
 </emu-clause>
 <emu-clause id=sec-chosen-value-records>

27.3Chosen Value Records

A <dfn>Chosen Value Record</dfn> is a <emu-xref href=#sec-list-and-record-specification-type id=_ref_8422>Record</emu-xref> with the following fields.

 <emu-table id=table-chosen-value-records caption="Chosen Value Record Fields">

Table 81: <emu-xref href=#sec-chosen-value-records id=_ref_8423>Chosen Value Record</emu-xref> Fields

 Field Name
 Value
 Meaning

 [[Event]]
 A <emu-xref href=#sec-memory-model-fundamentals id=_ref_8424>Shared Data Block event</emu-xref>
 The <emu-xref href=#sec-memory-model-fundamentals id=_ref_8425>ReadSharedMemory</emu-xref> or <emu-xref href=#sec-memory-model-fundamentals id=_ref_8426>ReadModifyWriteSharedMemory</emu-xref> event that was introduced for this chosen value.

 [[ChosenValue]]
 A <emu-xref href=#sec-list-and-record-specification-type id=_ref_8427>List</emu-xref> of byte values
 The bytes that were nondeterministically chosen during evaluation.

</emu-table>
 </e


" r2d2 2.200.110.233 63482 2.200.107.169 53 UDP DNS banking.techpool.org "ek nuclear (malicious)" (static)\n' +
    '"2024-01-11 04:38:36.491634" r2d2 2.200.107.146 22692 173.201.73.26 53 UDP DNS banking.techpool.org "ek nuclear (malicious)" (static)\n' +
    '"2024-01-11 04:38:46.224503" r2d2 2.200.110.233 63862 2.200.107.169 53 UDP DNS 7tno4hib47vlep5o.tor2web.blutmagie.de "teslacrypt (malware)" (static)\n' +
    '"2024-01-11 04:38:55.865988" r2d2 10.3.160.42 19571 8.8.8.8 53 UDP DNS checkip.dyndns.org "ipinfo (suspicious)" (static)\n' +
    '"2024-01-11 04:39:46.474505" r2d2 2.200.110.233 63568 2.200.107.169 53 UDP DNS recenthosts.ru "generic (malware)" (static)\n' +
    '"2024-01-11 04:40:37.531256" r2d2 2.200.110.232 49374 2.200.107.169 53 UDP DNS j0mla.sytes.net "generic (malware)" (static)\n' +
    '"2024-01-11 04:41:23.328255" r2d2 178.17.174.14 37128 2.200.109.24 80 TCP UA "FunWebProducts (Mozilla/4.0 \\(compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; FunWebProducts; GTB7.3; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; BRI/2\\))" "user agent (suspicious)" (heuristic)\n' +
    '"2024-01-11 04:41:47.065658" r2d2 2.200.107.146 10084 52.57.28.60 53 UDP DNS 7tno4hib47vlep5o.tor2web.blutmagie.de "teslacrypt (malware)" (static)\n' +
    '"2024-01-11 04:41:52.266501" r2d2 2.200.110.232 64309 2.200.107.169 53 UDP DNS supervision.sactown.us "ek nuclear (malicious)" (static)\n' +
    '"2024-01-11 04:41:58.714302" r2d2 2.200.105.140 11584 13.107.4.50 80 TCP UA "Windows-Update-Agent/10.0.10011.16384 Client-Protocol/1.40" "user agent (suspicious)" (heuristic)\n' +
    '"2024-01-11 04:41:59.620019" r2d2 2.200.110.232 65006 2.200.107.169 53 UDP DNS (www.2td6).xyz "domain (suspicious)" (static)\n' +
    '"2024-01-11 04:42:49.195386" r2d2 2.200.110.232 64717 2.200.107.169 53 UDP DNS cdnrep.reimage.com "pua (suspicious)" (static)\n' +
    '"2024-01-11 04:42:59.676588" r2d2 178.17.174.14 46354 2.200.109.24 80 TCP UA "FunWebProducts (Mozilla/4.0 \\(compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; FunWebProducts; BTRS7646; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5


import sqlite3

def connect():
    conn=sqlite3.connect("books.db")
    cur=conn.cursor()
    cur.execute("CREATE TABLE IF NOT EXISTS book (id title author year isbn


of an array', () => {

    expect(NervousArray.mean(a)).to.equal(5);

  });

  it ('should compute the root mean square of an array', () => {

    expect(Math.floor(100 * NervousArray.rootMeanSquare(a)) / 100).to.equal(16.88);

  });

  it ('should sum several arrays', () => {

    let res = NervousArray.add(a, b, NervousArray.zeros(9));

    expect(res).to.be.an('array');
    for (let i = 0; i < res.length; i++) {
      expect(res[i]).to.equal(2*(i + 1) + 1);
    }

  });

  it ('should add a scalar to an array', () => {

    let res = NervousArray.addScalar(a, 10);

    expect(res).to.be.an('array');
    for (let i = 0; i < res.length; i++) {
      expect(res[i]).to.equal(i + 1 + 10);
    }

  });

  it ('should substract several arrays to the first', () => {

    let res = NervousArray.sub(a, b, NervousArray.zeros(9));

    expect(res).to.be.an('array');
    for (let i = 0; i < res.length; i++) {
      expect(res[i]).to.equal(-1);
    }

  });

  it ('should multiply several arrays', () => {

    let res = NervousArray.multiply(a, b),
        res2 = NervousArray.multiply(a, b, NervousArray.zeros(9));

    expect(res).to.be.an('array');
    for (let i = 0; i < res.length; i++) {
      expect(res[i]).to.equal((i+1) * (i+2));
    }
    expect(res2).to.be.an('array');
    for (let i = 0; i < res2.length; i++) {
      expect(res2[i]).to.equal(0);
    }

  });

  it ('should multiply a scalar to an array', () => {

    let res = NervousArray.multiplyByScalar(a, 10);

    expect(res).to.be.an('array');
    for (let i = 0; i < res.length; i++) {
      expect(res[i]).to.equal((i + 1) * 10);
    }

  });

});import { Promise } from 'bluebird'
import * as _ from 'lodash'
import * as stream from 'stream'
import Stock from '../stock/Stock'
import * as db from '../util/db'
import log from '../util/log'
import * as math from '../util/math'
const idField = 'symbol'

export interface Options {
  query?: object
  projection?: object
  sort?: object
  limit?: number
}

export function fromStock (stock: Stock) {
  return {
    _id: stock[idField],
    ..._.toPlainObject(stock)
  }
}

export function toStock (entry: any) {
  delete entry._id
  let builder = Stock.builder(entry.symbol)
  builder = _.isNil(entry.name) ? builder : builder.name(entry.name)
  builder = _.isNil(entry.returns) ? builder : builder.returns(entry.returns)
  builder = _.isNil(entry.asof) ? builder : builder.asof(entry.asof)
  builder = _.isNil(entry.indicators) ? builder : builder.indicators(


License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/

part of '../../huawei_map.dart';

/// Defines a circle on a map.
@immutable
class Circle {
  /// Unique circle ID.
  final CircleId circleId;

  /// Indicates whether a circle is tappable.
  final bool clickable;

  /// Fill color.
  final Color fillColor;

  /// [Longitude] and [latitude] of the center of a circle.
  final LatLng center;

  /// Radius of a circle.
  final double radius;

  /// Stroke color.
  final Color strokeColor;

  /// Stroke width of a circle's outline.
  final int strokeWidth;

  /// Visibility of a circle.
  final bool visible;

  /// Z-index of a circle, which indicates the overlapping order of the circle.
  final int zIndex;

  /// Stroke pattern of a circle's outline.
  final List<PatternItem> strokePattern;

  /// Function to be executed when a circle is tapped.
  final VoidCallback? onClick;

  /// Animation for a circle.
  ///
  /// Only [HmsTranslateAnimation] is supported.
  final HmsAnimation? animation;

  /// Creates a [Circle] object.
  const Circle({
    required this.circleId,
    required this.center,
    this.radius = 0,
    this.strokeColor = Colors.white,
    this.strokeWidth = 1,
    this.fillColor = Colors.transparent,
    this.visible = true,
    this.zIndex = 0,
    this.clickable = false,
    this.onClick,
    this.strokePattern = const <PatternItem>[],
    this.animation,
  });

  /// Copies a [Circle] object and updates the specified attributes
  Circle updateCopy({
    LatLng? center,
    double? radius,
    Color? strokeColor,
    int? strokeWidth,
    Color? fillColor,
    bool? visible,
    int? zIndex,
    bool? clickable,
    VoidCallback? onClick,
    List<PatternItem>? strokePattern,
    List<dynamic>? animations,
  }) {
    return Circle(
      circleId: circleId,
      center: center ?? this.center,
      radius: radius ?? this.radius,
      strokeColor: strokeColor ?? this.strokeColor,
      strokeWidth: strokeWidth ?? this.strokeWidth,
      fillColor: fillColor ?? this.fillColor,
      visible: visible ?? this.visible,
      zIndex: zIndex ?? this.zIndex,
      clickable: clickable ?? this.clickable,
      onClick: onClick ?? this.onClick,
      strokePattern: strokePattern ?? this.strokePattern,
      animation: animation ?? this.animation,
    );
  }

  /// Clones a [Circle] object.
  Circle clone() {
    return updateCopy(
      strokePattern: List<PatternItem>.of(strokePattern),
    );
  }

  @override
  bool operator ==(Object other) {
    if (identical(this, other)) {
      return true;
    }
    if (runtimeType != other.runtimeType) {
      return false;
    }
    return other is Circle &&
        circleId == other.circleId &&
        center == other.center &&
        radius == other.radius &&
        strokeColor == other.strokeColor &&
        strokeWidth == other.strokeWidth &&
        fillColor == other.fillColor &&
        visible == other.visible &&
        clickable == other.clickable &&
        zIndex == other.zIndex &&
        listEquals(strokePattern, other.strokePattern) &&
        animation == other.animation;
  }

  @override
  int get hashCode => circleId.hashCode;
}
/*
    Copyright 2020-2024. Huawei Technologies Co., Ltd. All rights reserved.

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


import json
from time import sleep

from jovian.utils.logger import log
from jovian.utils.api import get_current_user
from jovian.utils.credentials import read_cred, WEBAPP_URL_KEY
from jovian.utils.constants import DEFAULT_WEBAPP_URL

def perform_kaggle_commit(message,
                          files,
                          outputs,
                          environment,
                          privacy,
                          project,
                          new_project):
    """ Retreive all cells and writes it to a file called project-name.ipynb, then returns the filename"""
    from IPython import get_ipython

    # Get user profile
    user = get_current_user()['username']

    # Construct and print URL
    url = read_cred(WEBAPP_URL_KEY, DEFAULT_WEBAPP_URL) + user + "/" + project
    log("Uploading notebook to " + url)

    # Construct filename
    filename = "{}.ipynb".format(project.split('/')[1] if '/' in project else project)

    # Handle str, None accordingly
    message = "'{}'".format(message) if isinstance(message, str) else None
    environment = "'{}'".format(environment) if isinstance(environment, str) else None

    # Construct jovian.commit w/ parameters
    jovian_commit = """jovian.commit(message={}, files={}, outputs={}, environment={}, privacy='{}', filename='{}', project='{}', new_project={})""".format(
        message, files, outputs, environment, privacy, filename, project, new_project)

    # Construct javascript code
    js_code = '''
    require(["base/js/namespace"],function(Jupyter) {
        var nbJson = JSON.stringify(Jupyter.notebook.toJSON());

        console.log("[jovian] Extracted notebook JSON:");
        console.log(nbJson);

        function jvnLog (data) {
          console.log("Result from jovian.commit:");
          if (data.content.text) {
              var result = JSON.parse(data.content.text.trim());
              var msg = result['msg'];
              var err = result['err'];
              if (msg) {
                  element.text("Committed successfully: " + msg)
              } else {
                  alert("Notebook commit failed. Error: " + (err || "Unknown"))
              }
          }

        };

        var pythonCode = `
from contextlib import redirect_stdout, redirect_stderr
from io import StringIO
import json

with open("'''+filename+'''", 'w') as f:
    f.write(r"""${nbJson}""")

jvn_update = StringIO()
jvn_update_err = StringIO()
with redirect_stdout(jvn_update), redirect_stderr(jvn_update_err):
    from jovian import commit

jvn_f_out = StringIO()
jvn_f_err = StringIO()
with redirect_stdout(jvn_f_out), redirect_stderr(jvn_f_err):
    jvn_msg = '''+jovian_commit+'''

print(json.dumps({'msg': jvn_msg, 'err': jvn_f_err.getvalue(), 'update': jvn_update.getvalue()}))
        `;

        console.log("Invoking jovian.commit")
        // console.log(pythonCode)

        Jupyter.notebook.kernel.execute(pythonCode, { iopub: { output: jvnLog }});
    });'''

    get_ipython().run_cell_magic('javascript', '', js_code)


Material.None	,	Market.Jeweler	),
			new ItemSalesInfo( typeof(	Lajatang	),	108	,	15	,	0	,	false	,	false	,	World.Orient	,	Category.Weapon	,	Material.Metal	,	Market.Monk	),
			new ItemSalesInfo( typeof(	LambLeg	),	8	,	15	,	0	,	false	,	false	,	World.None	,	Category.Supply	,	Material.None	,	Market.Cook	),
			new ItemSalesInfo( typeof(	Lance	),	34	,	15	,	0	,	false	,	false	,	World.None	,	Category.Weapon	,	Material.Metal	,	Market.Smith	),
			new ItemSalesInfo( typeof(	LandmineSetup	),	600	,	0	,	0	,	false	,	false	,	World.None	,	Category.None	,	Material.None	,	Market.Tinker	),
			new ItemSalesInfo( typeof(	Lantern	),	2	,	15	,	0	,	false	,	false	,	World.None	,	Category.None	,	Material.None	,	Market.Provisions	),
			new ItemSalesInfo( typeof(	LapHarp	),	21	,	15	,	0	,	false	,	false	,	World.None	,	Category.None	,	Material.None	,	Market.Bard	),
			new ItemSalesInfo( typeof(	LargeBackpack	),	10	,	5	,	0	,	false	,	false	,	World.None	,	Category.None	,	Material.None	,	Market.Provisions	),
			new ItemSalesInfo( typeof(	LargeBag	),	10	,	5	,	0	,	false	,	false	,	World.None	,	Category.None	,	Material.None	,	Market.Provisions	),
			new ItemSalesInfo( typeof(	LargeBagBall	),	3	,	15	,	95	,	false	,	false	,	World.None	,	Category.None	,	Material.None	,	Market.Provisions	),
			new ItemSalesInfo( typeof(	LargeBattleAxe	),	33	,	15	,	0	,	false	,	false	,	World.None	,	Category.Weapon	,	Material.Metal	,	Market.Smith	),
			new ItemSalesInfo( typeof(	LargeBedEastDeed	),	638	,	0	,	0	,	false	,	false	,	World.None	,	Category.None	,	Material.None	,	Market.Carpenter	),
			new ItemSalesInfo( typeof(	LargeBedSouthDeed	),	638	,	0	,	0	,	false	,	false	,	World.None	,	Category.None	,	Material.None	,	Market.Carpenter	),
			new ItemSalesInfo( typeof(	LargeBoatDeed	),	14000	,	5	,	0	,	false	,	false	,	World.None	,	Category.None	,	Material.None	,	Market.Sailor	),
			new ItemSalesInfo( typeof(	LargeCrate	),	14	,	5	,	0	,	false	,	false	,	World.None	,	Category.None	,	Material.None	,	Market.Carpenter	),
			new ItemSalesInfo( typeof(	LargeCrystal	),	2000	,	0	,	0	,	false	,	false	,	World.None	,	Category.Rare	,	Material.None	,	Market.Jeweler	),
			new ItemSalesInfo( typeof(	LargeDragonBoatDeed	),	15000	,	5	,	0	,	false	,	false	,	World.None	,	Category.None	,	Material.None	,	Market.Sailor	),
			new ItemSalesInfo( typeof(


			    April 3
			    VisionProject 7.1 has been released!

			    VisionProject 7.1 was released on the 3rd of April

Read more...

    -->

Phone:
                            +46 (0)771 105000
            |

Email: info@visionproject.se

    <wa-color id="WA-color-0" bg="#33CCFF" fg="#000000" class="WebAnnotator_ORG" type="ORG"></wa-color><wa-color id="WA-color-1" bg="#FF0000" fg="#000000" class="WebAnnotator_PER" type="PER"></wa-color><wa-color id="WA-color-2" bg="#33FF33" fg="#000000" class="WebAnnotator_FUNC" type="FUNC"></wa-color><wa-color id="WA-color-3" bg="#CC66CC" fg="#000000" class="WebAnnotator_TEL" type="TEL"></wa-color><wa-color id="WA-color-4" bg="#FF9900" fg="#000000" class="WebAnnotator_FAX" type="FAX"></wa-color><wa-color id="WA-color-5" bg="#99FFFF" fg="#000000" class="WebAnnotator_HOURS" type="HOURS"></wa-color><wa-color id="WA-color-6" bg="#FF6666" fg="#000000" class="WebAnnotator_SUBJ" type="SUBJ"></wa-color><wa-color id="WA-color-7" bg="#66FF99" fg="#000000" class="WebAnnotator_STREET" type="STREET"></wa-color><wa-color id="WA-color-8" bg="#3333FF" fg="#FFFFFF" class="WebAnnotator_CITY" type="CITY"></wa-color><wa-color id="WA-color-9" bg="#660000" fg="#FFFFFF" class="WebAnnotator_STATE" type="STATE"></wa-color><wa-color id="WA-color-10" bg="#006600" fg="#FFFFFF" class="Web


before even attempting to acquire|r |T133815:0|t[Engrave Chest - Overload]
    .train 410094,1
    .xp >3,1
step
    #completewith IconS
    .zone Mulgore >> Travel to Mulgore
    .train 410094,1
    .xp <3,1
step << Tauren skip
    .goto Mulgore,45.01,75.95
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Meela|r
    .accept 77652 >>Accept Icons of Power
    .target Meela Dawnstrider
    .xp <3,1
step
    #label IconS
    .goto Mulgore,63.74,81.18,50,0
    .goto Mulgore,63.86,79.97,50,0
    .goto Mulgore,65.00,78.60,50,0
    .goto Mulgore,66.05,77.83,50,0
    .goto Mulgore,65.93,77.10,50,0
    .goto Mulgore,63.57,76.25,50,0
    .goto Mulgore,63.86,80.14
    >>Kill |cRXP_ENEMY_Bristleback Shamans|r. Loot them for the |T134918:0|t[|cRXP_FRIENDLY_Dyadic Icon|r]
    .collect 206381,1 --Dyadic Icon (1)
    .mob Bristleback Shaman
    .train 410094,1
    .xp <3,1
step
    .equip 18,206381 >> |cRXP_WARN_Equip the|r |T134918:0|t|cRXP_LOOT_[Dyadic Icon]|r
    .use 206381
    .itemcount 206381,1 --Dyadic Icon (1)
    .train 410094,1
    .xp <3,1
step
    .goto Mulgore,63.74,81.18,50,0
    .goto Mulgore,63.86,79.97,50,0
    .goto Mulgore,65.00,78.60,50,0
    .goto Mulgore,66.05,77.83,50,0
    .goto Mulgore,65.93,77.10,50,0
    .goto Mulgore,63.57,76.25,50,0
    .goto Mulgore,63.86,80.14
    .aura 408828 >>|cRXP_WARN_Let |cRXP_ENEMY_Bristleback Shamans|r cast|r |T136048:0|t[Lightning Bolt] |cRXP_WARN_on you and take damage from it 10 times to gain the|r |T136116:0|t[Inspired] |cRXP_WARN_buff|r
    .mob Bristleback Shaman
    .itemStat 18,QUALITY,2
    .train 410094,1
    .xp <3,1
--XX Loop needs to be added
step
    .cast 402265 >>|cRXP_WARN_Use the|r |T134918:0|t|cRXP_LOOT_[Dyadic Icon]|r |cRXP_WARN_to learn|r |T133815:0|t[Engrave Chest - Overload]
    .use 206381
    .aura -408828
    .itemStat 18,QUALITY,2
    .train 410094,1
    .xp <3,1
step << Tauren skip
    .goto Mulgore,45.01,75.95
    >>|Tinterface/worldmap/chatbubble_64grey.blp:20|tTalk to |cRXP_FRIENDLY_Meela|r
    .turnin 77652 >>Turn in Icons of Power
    .target Meela Dawnstrider
    .xp <3,1
]])

RXPGuides.RegisterGuide([[
#classic
<< Horde Shaman SoD
#group RestedXP Rune & Books Guide
#subgroup Chest
#name Shield Mastery - 6 (Durotar)
#ti


  });

  test("add", () {
    // 1) Adding a new element
    ISet<int> baseSet = ISet<int>([1]);
    ISet<int> iset = baseSet.add(2);

    expect(iset.unlock, <int>{1, 2});

    // 2) Adding a repeated element
    baseSet = ISet<int>([1]);
    iset = baseSet.add(1);

    expect(iset.unlock, <int>{1});

    // 3) Null checks

    // 3.1) Regular usage
    expect(<int>{}.lock.add(1), {1});
    expect(<int?>{null}.lock.add(1), {null, 1});
    expect(<int>{1}.lock.add(10), {1, 10});
    expect(<int?>{null}.lock.add(10), {null, 10});
    expect(<int?>{null, 1, 3}.lock.add(10), {null, 1, 3, 10});
    expect({1, 2, 3}.lock.add(4), {1, 2, 3, 4});

    // 3.2) Adding a null
    expect(<int?>{null}.lock.add(null), {null});
    expect(<int?>{null, 1, 3}.lock.add(null), {null, 1, 3});

    // 4) With sort
    iset = <int>{}.lock.withConfig(ConfigSet(sort: true)).add(1).add(20).add(3).add(20);

    expect(iset.config, ConfigSet(sort: true));

    expect(iset.elementAt(0), 1);
    expect(iset.elementAt(1), 3);
    expect(iset.elementAt(2), 20);
    expect(() => iset.elementAt(-1), throwsRangeError);
    expect(() => iset.elementAt(3), throwsRangeError);

    expect(iset[0], 1);
    expect(iset[1], 3);
    expect(iset[2], 20);
    expect(() => iset[-1], throwsRangeError);
    expect(() => iset[3], throwsRangeError);
  });

  test("addAll", () {
    // 1) Adding a repeated element
    ISet<int> iset = ISet<int>({1, 2, 3}).addAll({1});

    expect(iset.length, 3);
    expect(iset.unlock, {1, 2, 3});

    // 2) Adding a repeated and a new element
    iset = ISet<int>({1, 2, 3}).addAll({1, 2});

    expect(iset.length, 3);
    expect(iset.unlock, {1, 2, 3});

    // 3) Adding some repeated and some new elements
    iset = ISet<int>({1, 2, 3}).addAll({1, 2, 5, 7, 11, 13});

    expect(iset.length, 7);
    expect(iset.unlock, {1, 2, 3, 5, 7, 11, 13});

    // 4) Null checks

    // 4.1) Regular Usage
    expect(<int>{}.lock.addAll({1, 2}), {1, 2});
    expect(<int?>{null}.lock.addAll({1, 2}), {null, 1, 2});
    expect(<int>{1}.lock.addAll({2, 3}), {1, 2, 3});
    expect(<int?>{null}.lock.addAll({1, 2}), {null, 1, 2});
    expect(<int?>{null, 1, 3}.lock.addAll({10, 11}), {null, 1, 3, 10, 11});
    expect({1, 2, 3, 4}.lock.addAll({5, 6}), {1, 2, 3, 4, 5, 6});

    // 4.2) Adding nulls
    expect(<int?>{null}.lock.addAll({null}), {null});
    expect(<int?>{null, 1, 3}.lock.addAll({null}), {null, 1, 3});

    // 4.3) Adding null and an item
    expect(<int?>{null}.lock.addAll({null, 1}), {null, 1});
    expect(<int?>{null, 1, 3}.lock.addAll({null,


alse).GetAwaiter().GetResult();
        }

        /// <summary>
        /// 获取单台主机漏洞防御插件信息
        /// </summary>
        /// <param name="req"><see cref="DescribeVulDefencePluginDetailRequest"/></param>
        /// <returns><see cref="DescribeVulDefencePluginDetailResponse"/></returns>
        public Task<DescribeVulDefencePluginDetailResponse> DescribeVulDefencePluginDetail(DescribeVulDefencePluginDetailRequest req)
        {
            return InternalRequestAsync<DescribeVulDefencePluginDetailResponse>(req, "DescribeVulDefencePluginDetail");
        }

        /// <summary>
        /// 获取单台主机漏洞防御插件信息
        /// </summary>
        /// <param name="req"><see cref="DescribeVulDefencePluginDetailRequest"/></param>
        /// <returns><see cref="DescribeVulDefencePluginDetailResponse"/></returns>
        public DescribeVulDefencePluginDetailResponse DescribeVulDefencePluginDetailSync(DescribeVulDefencePluginDetailRequest req)
        {
            return InternalRequestAsync<DescribeVulDefencePluginDetailResponse>(req, "DescribeVulDefencePluginDetail")
                .ConfigureAwait(false).GetAwaiter().GetResult();
        }

        /// <summary>
        /// 获取当前异常插件数
        /// </summary>
        /// <param name="req"><see cref="DescribeVulDefencePluginExceptionCountRequest"/></param>
        /// <returns><see cref="DescribeVulDefencePluginExceptionCountResponse"/></returns>
        public Task<DescribeVulDefencePluginExceptionCountResponse> DescribeVulDefencePluginExceptionCount(DescribeVulDefencePluginExceptionCountRequest req)
        {
            return InternalRequestAsync<DescribeVulDefencePluginExceptionCountResponse>(req, "DescribeVulDefencePluginExceptionCount");
        }

        /// <summary>
        /// 获取当前异常插件数
        /// </summary>
        /// <param name="req"><see cref="DescribeVulDefencePluginExceptionCountRequest"/></param>
        /// <returns><see cref="DescribeVulDefencePluginExceptionCountResponse"/></returns>
        public DescribeVulDefencePluginExceptionCountResponse DescribeVulDefencePluginExceptionCountSync(DescribeVulDefencePluginExceptionCountRequest req)
        {
            return InternalRequestAsync<DescribeVulDefencePluginExceptionCountResponse>(req, "DescribeVulDefencePluginExceptionCount")
                .ConfigureAwait(false).GetAwaiter().GetResult();
        }

        /// <summary>
        /// 获取各主机漏洞防御插件状态
        /// </summary>
        /// <param name="req"><see cref="DescribeVulDefencePluginStatusRequest"/></param>
        /// <returns><see cref="DescribeVulDefencePluginStatusResponse"/></returns>
        public Task<DescribeVulDefencePluginStatusResponse> DescribeVulDefencePluginStatus(DescribeVulDefencePluginStatusRequest req)
        {
            return InternalRequestAsync<DescribeVulDefencePluginStatusResponse>(req, "DescribeVulDefencePluginStatus");
        }

        /// <summary>
        /// 获取各主机漏洞防御插件状态
        /// </summary>
        /// <param name="req"><see cref="DescribeVulDefencePluginStatusRequest"/></param>
        /// <returns><see cref="DescribeVulDefencePluginStatusResponse"/></returns>
        public DescribeVulDefencePluginStatusResponse DescribeVulDefencePluginStatusSync(DescribeVulDefencePluginStatusRequest req)
        {
            return InternalRequestAsync<DescribeVulDefencePluginStatusResponse>(req, "DescribeVulDefencePluginStatus


}

func TestLeaderAppResp(t *testing.T) {
	// initial progress: match = 0; next = 3
	tests := []struct {
		index  uint64
		reject bool
		// progress
		wmatch uint64
		wnext  uint64
		// message
		wmsgNum    int
		windex     uint64
		wcommitted uint64
	}{
		{3, true, 0, 3, 0, 0, 0},  // stale resp; no replies
		{2, true, 0, 2, 1, 1, 0},  // denied resp; leader does not commit; decrease next and send probing msg
		{2, false, 2, 4, 2, 2, 2}, // accept resp; leader commits; broadcast with commit index
		// Follower is StateProbing at 0, it sends MsgAppResp for 0 (which
		// matches the pr.Match) so it is moved to StateReplicate and as many
		// entries as possible are sent to it (1, 2, and 3). Correspondingly the
		// Next is then 4 (an Entry at 4 does not exist, indicating the follower
		// will be up to date should it process the emitted MsgApp).
		{0, false, 0, 4, 1, 0, 0},
	}

	for _, tt := range tests {
		t.Run("", func(t *testing.T) {
			// sm term is 1 after it becomes the leader.
			// thus the last log term must be 1 to be committed.
			sm := newTestRaft(1, 10, 1, newTestMemoryStorage(withPeers(1, 2, 3)))
			sm.raftLog = newLog(&MemoryStorage{ents: index(0).terms(0, 1, 1)}, nil)
			sm.becomeCandidate()
			sm.becomeLeader()
			sm.readMessages()
			require.NoError(t, sm.Step(
				pb.Message{
					From:       2,
					Type:       pb.MsgAppResp,
					Index:      tt.index,
					Term:       sm.Term,
					Reject:     tt.reject,
					RejectHint: tt.index,
				},
			))

			p := sm.trk.Progress[2]
			require.Equal(t, tt.wmatch, p.Match)
			require.Equal(t, tt.wnext, p.Next)

			msgs := sm.readMessages()

			require.Len(t, msgs, tt.wmsgNum)
			for _, msg := range msgs {
				require.Equal(t, tt.windex, msg.Index, "%v", DescribeMessage(msg, nil))
				require.Equal(t, tt.wcommitted, msg.Commit, "%v", DescribeMessage(msg, nil))
			}
		})
	}
}

// TestBcastBeat is when the leader receives a heartbeat tick, it should
// send a MsgHeartbeat with m.Index = 0, m.LogTerm=0 and empty entries.
func TestBcastBeat(t *testing.T) {
	offset := uint64(1000)
	// make a state machine with log.offset = 1000
	s := pb.Snapshot{
		Metadata: pb.SnapshotMetadata{
			Index:     offset,
			Term:      1,
			ConfState: pb.ConfState{Voters: []uint64{1, 2, 3}},
		},
	}
	storage := NewMemoryStorage()
	storage.ApplySnapshot(s)
	sm := newTestRaft(1, 10, 1, storage)
	sm.Term = 1

	sm.becomeCandidate()
	sm.becomeLeader()
	for i := 0; i < 10; i++ {
		mustAppendEntry(sm, pb.Entry{Index: uint64(i) + 1})
	}
	sm.advanceMessagesAfterAppend()

	// slow follower
	sm.trk.Progress[2].Match, sm.trk.Progress[2].Next = 5, 6


# -*- coding: utf-8 -*- #
# Copyright 2015 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Cloud Pub/Sub subscription delete command."""

from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals

from apitools.base.py import exceptions as api_ex

from googlecloudsdk.api_lib.pubsub import subscriptions
from googlecloudsdk.api_lib.util import exceptions
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.pubsub import resource_args
from googlecloudsdk.command_lib.pubsub import util
from googlecloudsdk.core import log
from googlecloudsdk.core import properties

def _Run(args, legacy_output=False):
  """Deletes one or more subscriptions."""
  client = subscriptions.SubscriptionsClient()

  failed = []
  for subscription_ref in args.CONCEPTS.subscription.Parse():

    try:
      result = client.Delete(subscription_ref)
    except api_ex.HttpError as error:
      exc = exceptions.HttpException(error)
      log.DeletedResource(
          subscription_ref.RelativeName(),
          kind='subscription',
          failed=util.CreateFailureErrorMessage(exc.payload.status_message),
      )
      failed.append(subscription_ref.subscriptionsId)
      continue

    subscription = client.messages.Subscription(
        name=subscription_ref.RelativeName())

    if legacy_output:
      result = util.SubscriptionDisplayDict(subscription)

    log.DeletedResource(subscription_ref.RelativeName(), kind='subscription')
    yield result

  if failed:
    raise util.RequestsFailedError(failed, 'delete')

@base.ReleaseTracks(base.ReleaseTrack.GA)
class Delete(base.DeleteCommand):
  """Deletes one or more Cloud Pub/Sub subscriptions."""

  @staticmethod
  def Args(parser):
    resource_args.AddSubscriptionResourceArg(parser, 'to delete.', plural=True)

  def Run(self, args):
    return _Run(args)

@base.ReleaseTracks(base.ReleaseTrack.BETA, base.ReleaseTrack.ALPHA)
class DeleteBeta(Delete):
  """Deletes one or more Cloud Pub/Sub subscriptions."""

  def Run(self, args):
    legacy_output = properties.VALUES.pubsub.legacy_output.GetBool()
    return _Run(args, legacy_output=legacy_output)


namespace OggVorbisEncoder.Setup.Templates.BookBlocks.Stereo16.Coupled.Chapter1;

public class Page9_1 : IStaticCodeBook
{
    public int Dimensions { get; } = 2;

    public byte[] LengthList { get; } = {
         1, 4, 4, 4, 4, 8, 8,12,13,14,14,14,14,14,14, 6,
         6, 6, 6, 6,10, 9,14,14,14,14,14,14,14,14, 7, 6,
         5, 6, 6,10, 9,12,13,13,13,13,13,13,13,13, 7, 7,
         9, 9,11,11,12,13,13,13,13,13,13,13,13, 7, 7, 8,
         8,11,12,13,13,13,13,13,13,13,13,13,12,12,10,10,
        13,12,13,13,13,13,13,13,13,13,13,12,12,10,10,13,
        13,13,13,13,13,13,13,13,13,13,13,13,13,12,13,12,
        13,13,13,13,13,13,13,13,13,13,13,13,12,13,13,13,
        13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
        13,13,13,13,13,


199599688408A4AD364069090E833B237 (int32_t ___instanceID0, const RuntimeMethod* method)
{
	static bool s_Il2CppMethodInitialized;
	if (!s_Il2CppMethodInitialized)
	{
		il2cpp_codegen_initialize_method (GUILayoutUtility_Begin_m6876A33199599688408A4AD364069090E833B237_MetadataUsageId);
		s_Il2CppMethodInitialized = true;
	}
	LayoutCache_t0D14FE6139444D164ECA5D31E39E625D80077468 * V_0 = NULL;
	bool V_1 = false;
	GUILayoutGroup_tCC791055AD03074C1257B699304E4B45C97DE601 * V_2 = NULL;
	{
		int32_t L_0 = ___instanceID0;
		IL2CPP_RUNTIME_CLASS_INIT(GUILayoutUtility_tFBB1F6AB7CF109D40F923B9AB1F5D7CDF8EEB62E_il2cpp_TypeInfo_var);
		LayoutCache_t0D14FE6139444D164ECA5D31E39E625D80077468 * L_1 = GUILayoutUtility_SelectIDList_m230ED9206897C92C5B090B3BBFC9B408603E56FD(L_0, (bool)0, /*hidden argument*/NULL);
		V_0 = L_1;
		Event_t187FF6A6B357447B83EC2064823EE0AEC5263210 * L_2 = Event_get_current_m072CEE599D11B8A9A916697E57C0F561188CDB2B(/*hidden argument*/NULL);
		NullCheck(L_2);
		int32_t L_3 = Event_get_type_mAABE4A35E5658E0079A1518D318AF2592F51D6FA(L_2, /*hidden argument*/NULL);
		V_1 = (bool)((((int32_t)L_3) == ((int32_t)8))? 1 : 0);
		bool L_4 = V_1;
		if (!L_4)
		{
			goto IL_0078;
		}
	}
	{
		IL2CPP_RUNTIME_CLASS_INIT(GUILayoutUtility_tFBB1F6AB7CF109D40F923B9AB1F5D7CDF8EEB62E_il2cpp_TypeInfo_var);
		LayoutCache_t0D14FE6139444D164ECA5D31E39E625D80077468 * L_5 = ((GUILayoutUtility_tFBB1F6AB7CF109D40F923B9AB1F5D7CDF8EEB62E_StaticFields*)il2cpp_codegen_static_fields_for(GUILayoutUtility_tFBB1F6AB7CF109D40F923B9AB1F5D7CDF8EEB62E_il2cpp_TypeInfo_var))->get_current_2();
		LayoutCache_t0D14FE6139444D164ECA5D31E39E625D80077468 * L_6 = V_0;
		GUILayoutGroup_tCC791055AD03074C1257B699304E4B45C97DE601 * L_7 = (GUILayoutGroup_tCC791055AD03074C1257B699304E4B45C97DE601 *)il2cpp_codegen_object_new(GUILayoutGroup_tCC791055AD03074C1257B699304E4B45C97DE601_il2cpp_TypeInfo_var);
		GUILayoutGroup__ctor_m14D8B35B4A89F6688D354A534ED871860905BA3B(L_7, /*hidden argument*/NULL);
		GUILayoutGroup_tCC791055AD03074C1257B699304E4B45C


      {
              SequenceType RESULT = null;
		 RESULT = new SequenceType(SequenceType.EMPTY, null);
              CUP$XPathCup$result = new java_cup.runtime.Symbol(39/*SequenceType*/, ((java_cup.runtime.Symbol)CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-2)).left, ((java_cup.runtime.Symbol)CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-0)).right, RESULT);
            }
          return CUP$XPathCup$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 130: // SequenceType ::= ItemType OccurrenceIndicator
            {
              SequenceType RESULT = null;
		int tleft = ((java_cup.runtime.Symbol)CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-1)).left;
		int tright = ((java_cup.runtime.Symbol)CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-1)).right;
		ItemType t = (ItemType)((java_cup.runtime.Symbol) CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-1)).value;
		int ileft = ((java_cup.runtime.Symbol)CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-0)).left;
		int iright = ((java_cup.runtime.Symbol)CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-0)).right;
		Integer i = (Integer)((java_cup.runtime.Symbol) CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-0)).value;
		 RESULT = new SequenceType(i.intValue(), t);
              CUP$XPathCup$result = new java_cup.runtime.Symbol(39/*SequenceType*/, ((java_cup.runtime.Symbol)CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-1)).left, ((java_cup.runtime.Symbol)CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-0)).right, RESULT);
            }
          return CUP$XPathCup$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 129: // SequenceType ::= ItemType
            {
              SequenceType RESULT = null;
		int tleft = ((java_cup.runtime.Symbol)CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-0)).left;
		int tright = ((java_cup.runtime.Symbol)CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-0)).right;
		ItemType t = (ItemType)((java_cup.runtime.Symbol) CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-0)).value;
		 RESULT = new SequenceType(SequenceType.NONE, t);
              CUP$XPathCup$result = new java_cup.runtime.Symbol(39/*SequenceType*/, ((java_cup.runtime.Symbol)CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-0)).right, RESULT);
            }
          return CUP$XPathCup$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 128: // SingleType ::= AtomicType QUESTIONMARK
            {
              SingleType RESULT = null;
		int tleft = ((java_cup.runtime.Symbol)CUP$XPathCup$stack.elementAt(CUP$XPathCup$top-1)).left;
		int tright = ((java_cup.runtime.Symbol)CUP$


]", "^[a-zA-Z0-9][a-zA-Z0-9\\-\\._]{0,78}[a-zA-Z0-9_]$", true, "parent"},
	"azurerm_private_dns_txt_record":                                   {"azurerm_private_dns_txt_record", "pdnsrec", 1, 80, false, "[^a-zA-Z0-9\\-\\._]", "^[a-zA-Z0-9][a-zA-Z0-9\\-\\._]{0,78}[a-zA-Z0-9_]$", true, "parent"},
	"azurerm_private_dns_zone":                                         {"azurerm_private_dns_zone", "pdns", 1, 63, false, "[^0-9A-Za-z_.-]", "^[a-zA-Z0-9][a-zA-Z0-9-._]{0,61}[a-zA-Z0-9_]$", true, "resourceGroup"},
	"azurerm_private_dns_zone_group":                                   {"azurerm_private_dns_zone_group", "pdnszg", 1, 80, false, "[^a-zA-Z0-9\\-\\._]", "^[a-zA-Z0-9][a-zA-Z0-9\\-\\._]{0,78}[a-zA-Z0-9_]$", true, "resourceGroup"},
	"azurerm_private_dns_zone_virtual_network_link":                    {"azurerm_private_dns_zone_virtual_network_link", "pnetlk", 1, 80, false, "[^0-9A-Za-z_.-]", "^[a-zA-Z0-9][a-zA-Z0-9-._]{0,78}[a-zA-Z0-9_]$", true, "parent"},
	"azurerm_private_endpoint":                                         {"azurerm_private_endpoint", "pe", 2, 64, false, "[^0-9A-Za-z_.-]", "^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,62}[a-zA-Z0-9_]$", true, "resourceGroup"},
	"azurerm_private_link_service":                                     {"azurerm_private_link_service", "pls", 1, 80, false, "[^a-zA-Z0-9\\-\\._]", "^[a-zA-Z0-9][a-zA-Z0-9\\-\\._]{0,78}[a-zA-Z0-9_]$", true, "resourceGroup"},
	"azurerm_private_service_connection":                               {"azurerm_private_service_connection", "psc", 1, 80, false, "[^a-zA-Z0-9\\-\\._]", "^[a-zA-Z0-9][a-zA-Z0-9\\-\\._]{0,78}[a-zA-Z0-9_]$", true, "resourceGroup"},
	"azurerm_proximity_placement_group":                                {"azurerm_proximity_placement_group", "ppg", 1, 80, false, "[^a-zA-Z0-9\\-\\._]", "^[a-zA-Z0-9][a-zA-Z0-9\\-\\._]{0,78}[a-zA-Z0-9_]$", true, "resourceGroup"},
	"azurerm_public_ip":                                                {"azurerm_public_ip", "pip", 1, 80, false, "[^0-9A-Za-z_.-]", "^[a-zA-Z0-9][a-zA-Z0-9-._]{0,78}[a-zA-Z0-9_]$", true, "parent"},
	"azurerm_public_ip_prefix":                                         {"azurerm_public_ip_prefix", "pippf", 1, 80, false, "[^0-9A-Za-z_.-]", "^[a-zA-Z0-9][a-zA-Z0-9-._]{0,78}[a-zA-Z0-9_]$", true, "parent"},
	"azurerm_purview_account":                                          {"azurerm_purview_account", "purv", 3, 63, false, "[^0-9A-Za-z-]", "^[a-zA-Z0-9][a-z


        this.scene.addEventHandler(TrajectoryEvent.TIMELINE_SHOW_CALLOUT, e -> {
            anchorCallout.setVisible((boolean) e.eventObject);
        });
        this.scene.addEventHandler(TrajectoryEvent.NEW_TRAJECTORY_OBJECT, e -> {
            Platform.runLater(() -> updateTrajectory3D(false));
        });
        this.scene.addEventHandler(TrajectoryEvent.CLEAR_ALL_TRAJECTORIES, e -> {
            Platform.runLater(() -> updateTrajectory3D(true));
        });
        this.scene.addEventHandler(TrajectoryEvent.TRAJECTORY_VISIBILITY_CHANGED, e -> {
            Trajectory trajectory = (Trajectory) e.eventObject;
            Trajectory3D traj3D = trajToTraj3DMap.get(trajectory);
            if (null != traj3D) {
                traj3D.setVisible(trajectory.getVisible());
            }
        });
        this.scene.addEventHandler(TrajectoryEvent.TRAJECTORY_COLOR_CHANGED, e -> {
            Platform.runLater(() -> updateTrajectory3D(false));
        });
        //Add 3D subscene stuff to 3D scene root object
        sceneRoot.getChildren().addAll(cameraTransform, highlightedPoint, nodeGroup,
            manifoldGroup, debugGroup, cubeWorld, dataXForm, extrasGroup, anchorTSM);

        projectionOpticon = new Opticon(Color.CYAN, 100);
        extrasGroup.getChildren().add(projectionOpticon);
        projectionOpticon.visibleProperty().bind(autoProjectionProperty);
        projectionOpticon.setScanning(false);

        highlightedPoint.setMaterial(new PhongMaterial(Color.ALICEBLUE));
        highlightedPoint.setDrawMode(DrawMode.LINE);
        subScene.setCamera(camera);
        //add a Point Light for better viewing of the grid coordinate system
        PointLight light = new PointLight(Color.WHITE);
        cameraTransform.getChildren().add(light);
        light.setTranslateX(camera.getTranslateX());
        light.setTranslateY(camera.getTranslateY());
        light.setTranslateZ(camera.getTranslateZ() + 500.0);

        //Some camera controls...
        subScene.setOnMouseEntered(event -> subScene.requestFocus());
        setOnMouseEntered(event -> subScene.requestFocus());
        subScene.setOnZoom(event -> {
            double modifier = 50.0;
            double modifierFactor = 0.1;
            double z = camera.getTranslateZ();
            double newZ = z + event.getZoomFactor() * modifierFactor * modifier;
            camera.setTranslateZ(newZ);
            updateLabels();
        });
        subScene.setOnSwipeUp(e -> {
            e.consume();
            Platform.runLater(() -> {
                cubeWorld.animateOut(1000, 20000);
            });
        });
        subScene.setOnSwipeDown(e -> {
            e.consume();
            Platform.runLater(() -> {
                cubeWorld.animateIn(1000, cubeSize);
            });
        });

        subScene.setOnKeyPressed(event -> {
            //What key did the user press?
            KeyCode keycode = event.getCode();
            if (keycode == KeyCode.OPEN_BRACKET && event.isControlDown()) {
                Platform.runLater(() -> {
                    cubeWorld.animateOut(1000, 20000);
                });
            } else if (keycode == KeyCode.CLOSE_BRACKET && event.isControlDown()) {
                Platform.runLater(() -> {
                    cubeWorld.animateIn(1000, cubeSize);
                });
            }
            if ((keycode == KeyCode.NUMPAD0 && event.isControlDown())
                || (keycode == KeyCode.DIGIT0 && event.isControlDown())) {
                resetView(1000, false);
            } else if ((keycode == KeyCode.NUMPAD0 && event.isShiftDown())
                || (keycode == KeyCode.DIGIT0 && event.isShiftDown())) {
                resetView(0, true);
            }
            double


://pan.timero.xyz/d/onedrive/img_lib_001/%E7%A5%9E%E5%BE%85%E3%81%A1%E3%82%B5%E3%83%8A%E3%81%A1%E3%82%83%E3%82%93_Screenshot_2.avif)

![Screenshot 3](https://pan.timero.xyz/d/onedrive/img_lib_001/%E7%A5%9E%E5%BE%85%E3%81%A1%E3%82%B5%E3%83%8A%E3%81%A1%E3%82%83%E3%82%93_Screenshot_3.avif)

![Screenshot 4](https://pan.timero.xyz/d/onedrive/img_lib_001/%E7%A5%9E%E5%BE%85%E3%81%A1%E3%82%B5%E3%83%8A%E3%81%A1%E3%82%83%E3%82%93_Screenshot_4.avif)

![Screenshot 5](https://pan.timero.xyz/d/onedrive/img_lib_001/%E7%A5%9E%E5%BE%85%E3%81%A1%E3%82%B5%E3%83%8A%E3%81%A1%E3%82%83%E3%82%93_Screenshot_5.avif)

---
title: Sakura Knight 2
abbrlink: 4d0200bb
date: 2020-06-01 00:00:00
---
[编辑此页面](https://github.com/ACG-3/ADV3-source/blob/main/source/_posts/games/Sakura%20Knight%202.md)

## 游戏封面

![Sakura Knight 2](https://pan.timero.xyz/d/onedrive/img_lib_001/Sakura%20Knight%202_cover.avif)

## 游戏名称

- 日文：None
- 英文：Sakura Knight 2
- 中文：None

- 别名：

## 游戏信息

- 时长：3.6 h
- 开发者：Winged Cloud
- 发售日期：2020-06-01
- 游戏平台：win
- 相关作品：
   - 前作：Sakura Knight
   - 续作：Sakura Knight 3

- 相关链接：[vndb](https://vndb.org/v28560)

## 游戏简介

故事发生在《樱花骑士》之后，艾丝黛尔继续追求成为像她母亲克蕾西达一样著名的骑士。

她拿回了母亲的剑，并有一群漂亮能干的女人支持她，我们勇敢的年轻女主角试图在雷姆利亚最大的城市格里莫尔扬名立万。艾丝黛尔与呆萌的精灵菲莉西娅、调皮的猫女塔特和深情的狼女鲁恩一起，在格里莫尔的公会中接受任务，与成群的邪恶植物和粘液怪物搏斗，并磨练自己的剑术。

虽然她的旅程起步坎坷，但埃斯特尔的情况终于开始好转。也许她终究能实现自己的梦想


:normal;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#cfd1cf));background-image:-moz-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-webkit-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-o-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:-ms-linear-gradient(top,#f5f5f5,#cfd1cf);background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#f5f5f5',endColorstr='#cfd1cf')}.cke_float .cke_top{border:1px solid #b6b6b6;border-bottom-color:#999}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #bfbfbf;-moz-box-shadow:0 1px 0 #fff inset;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#cfd1cf));background-image:-moz-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-webkit-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-o-linear-gradient(top,#ebebeb,#cfd1cf);background-image:-ms-linear-gradient(top,#ebebeb,#cfd1cf);background-image:linear-gradient(top,#ebebeb,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#ebebeb',endColorstr='#cfd1cf')}.cke_browser_ios .cke_contents{overflow-y:auto;-webkit-overflow-scrolling:touch}.cke_resizer{width:0;height:0;overflow:hidden;width:0;height:0;overflow:hidden;border-width:10px 10px 0 0;border-color:transparent #666 transparent transparent;border-style:dashed solid dashed dashed;font-size:0;vertical-align:bottom;margin-top:6px;margin-bottom:2px;-moz-box-shadow:0 1px 0 rgba(255,255,255,.3);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.3);box-shadow:0 1px 0 rgba(255,255,255,.3)}.cke_hc .cke_resizer{font-size:15px;width:auto;height:auto;border-width:0}.cke_resizer_ltr{cursor:se-resize;float:right;margin-right:-4px}.cke_resizer_rtl{border-width:10px 0 0 10px;border-color:transparent transparent transparent #a5a5a5;border-style:dashed dashed dashed solid;cursor:sw-resize;float:left;margin-left:-4px;right:auto}.cke_wysiwyg_div{display:block;height:100%;overflow:auto;padding:0 8px;outline-style:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.cke_panel{visibility:visible;width:120px;height:100px;overflow:hidden;background-color:#fff;border:1px solid #b6b6b6;border-bottom-color:#999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-mo


OrNull(0)?.name == "C") {
        handle3Tracking += 1
      }
      launch { signalChannel.send(Unit) }
    }
    handle1.dispatchStore(Person("A"))
    signalChannel.receive()
    assertWithMessage("Expected handle1 to include A").that(handle1Tracking).isEqualTo(1)
    assertWithMessage("Expected handle2 to not equal B").that(handle2Tracking).isEqualTo(0)
    assertWithMessage("Expected handle3 to not include C").that(handle3Tracking).isEqualTo(0)

    handle2.dispatchStore(Person("B"))
    signalChannel.receive()
    assertWithMessage("Expected handle1 to include A").that(handle1Tracking).isEqualTo(2)
    assertWithMessage("Expected handle2 to equal B").that(handle2Tracking).isEqualTo(1)
    assertWithMessage("Expected handle3 to not include C").that(handle3Tracking).isEqualTo(0)

    handle3.dispatchStore(Person("C"))
    signalChannel.receive()
    assertWithMessage("Expected handle1 to include A").that(handle1Tracking).isEqualTo(3)
    assertWithMessage("Expected handle2 to equal B").that(handle2Tracking).isEqualTo(2)
    assertWithMessage("Expected handle3 to include C").that(handle3Tracking).isEqualTo(1)
  }

  @Test
  fun handleUtils_combineFourUpdatesTest() = runBlocking {
    val handle1 = createCollectionHandle(STORAGE_KEY_ONE)
    val handle2 = createSingletonHandle(STORAGE_KEY_TWO)
    val handle3 = createCollectionHandle(STORAGE_KEY_THREE)
    val handle4 = createSingletonHandle(STORAGE_KEY_FOUR)
    log("Handles ready")

    var handle1Tracking = 0
    var handle2Tracking = 0
    var handle3Tracking = 0
    var handle4Tracking = 0

    val signalChannel = Channel<Unit>()
    combineUpdates(handle1, handle2, handle3, handle4) { e1, e2, e3, e4 ->
      if (e1.elementAtOrNull(0)?.name == "A") {
        handle1Tracking += 1
      }
      if (e2?.name == "B") {
        handle2Tracking += 1
      }
      if (e3.elementAtOrNull(0)?.name == "C") {
        handle3Tracking += 1
      }
      if (e4?.name == "D") {
        handle4Tracking += 1
      }
      launch { signalChannel.send(Unit) }
    }
    handle1.dispatchStore(Person("A"))
    signalChannel.receive()
    assertWithMessage("Expected handle1 to include A").that(handle1Tracking).isEqualTo(1)
    assertWithMessage("Expected handle2 to not equal B").that(handle2Tracking).isEqualTo(0)
    assertWithMessage("Expected handle3 to not include C").that(handle3Tracking).isEqualTo(0)
    assertWithMessage("Expected handle4 to not equal D").that(handle4Tracking).isEqualTo(0)

    handle2.dispatchStore(Person("B"))
    signalChannel.receive()
    assertWithMessage("Expected handle1 to include A").that(handle1Tracking).isEqualTo(2)
    assertWithMessage("Expected handle2 to equal B").that(handle2Tracking).isEqualTo(1)
    assertWithMessage("Expected handle3 to not include C").that(handle3Tracking).isEqualTo(0)
    assertWithMessage("Expected handle4 to not equal D").that(handle4Tracking).isEqualTo(0)

    handle3.dispatchStore(Person("C"))
    signalChannel.receive()
    assertWithMessage("Expected handle1 to include A").that(handle1Tracking).isEqualTo(3)
    assertWithMessage("Expected handle2 to equal B").that(handle2Tracking).isEqualTo(2)
    assertWithMessage("Expected handle3 t


ng (subId:${subId}) to:`, path)
// 		this.subs[subId] = { cb, extraArgs }

// 		// Get value tree for this subscription.
// 		let resultTree = {}
// 		let values: any[] = []
// 		this.getValueTree(path, resultTree, values)
// 		//process.nextTick(() => { cb(resultTree, subId, extraArgs) }) // Call cb in next tick to allow propagation of the subId!
// 		cb(values[0], resultTree, extraArgs, subId)

// 		// Add this subscription to subscription tree
// 		this.addToSubTree(path, subId)

// 		return subId
// 	}
// 	/**
// 	 * Delete tree branch from and including end of specified path!
// 	 * @param path
// 	 */
// 	delete(path: string | string[]) {

// 	}
// 	/**
// 	 * Call function
// 	 * @param path
// 	 * @param args
// 	 */
// 	async call(path: string[], args: any = null): Promise<any> {
// 		return null
// 	}
// 	/**
// 	 * Define and register callback for function call
// 	 */
// 	onCall(){

// 	}
// 	//-------------------------------------------------------------------------
// 	// Helpers
// 	/**
// 	 * Apply Patch Tree to Value Tree
// 	 * @param pTree Patch Tree
// 	 * @param vTree Value Tree
// 	 * @returns
// 	 * @param rTree Concrete "Result Tree"
// 	 */
// 	private setValueTree(path: string[], value: any, resultTree: any = {}) {
// 		let node = this.vTree
// 		let pathId = 0
// 		let name = path[pathId++]
// 		while (name !== undefined) {
// 			if (!node[name]) {
// 				node[name] = {} // Create path if not existing.
// 				resultTree[name] = {}
// 				resultTree = resultTree[name]
// 			}
// 			if (pathId == path.length) {
// 				// Create or overwrite value
// 				node[name] = value
// 				resultTree[name] = value
// 				return true
// 			} else {
// 				// Move along path
// 				node = node[name]
// 				resultTree[name] = {}
// 				resultTree = resultTree[name]
// 			}
// 			name = path[pathId++]
// 		}
// 	}
// 	getValueTree(path: string[], resultNode: any, values: any[], pathId: number = 0, vTree: any = this.vTree) {
// 		//TODO: Support **
// 		let pName = path[pathId]
// 		for (let vProp in vTree) {
// 			if (!vProp.startsWith('__')) {
// 				if (pName == vProp) {
// 					pathId++
// 					if (pathId < path.length) {
// 						let subResult = {}
// 						if (this.getValueTree(path, subResult, values, pathId, vTree[vProp])) {
// 							resultNode[vProp] = subResult
// 							return true
// 						} else return false
// 					} else {
// 						resultNode[vProp] = vTree[vProp]
// 						values.push(vTree[vProp])
// 						return true
// 					}

// 					if (path[pathId] == "**") {
// 						if (path[pathId + 1]) {
// 							if(path[pathId + 1] in vTree[vProp]) pathId++
// 						}
// 					} else pathId++
// 				}


��", "ttan"],
    ["딵", "ttant"],
    ["딶", "ttant"],
    ["딷", "ttat"],
    ["딸", "ttal"],
    ["딹", "ttalk"],
    ["딺", "ttalm"],
    ["딻", "ttalp"],
    ["딼", "ttalt"],
    ["딽", "ttalt"],
    ["딾", "ttalp"],
    ["딿", "ttalt"],
    ["땀", "ttam"],
    ["땁", "ttap"],
    ["땂", "ttapt"],
    ["땃", "ttat"],
    ["땄", "ttat"],
    ["땅", "ttang"],
    ["땆", "ttat"],
    ["땇", "ttat"],
    ["땈", "ttak"],
    ["땉", "ttat"],
    ["땊", "ttap"],
    ["땋", "ttat"],
    ["때", "ttae"],
    ["땍", "ttaek"],
    ["땎", "ttaek"],
    ["땏", "ttaekt"],
    ["땐", "ttaen"],
    ["땑", "ttaent"],
    ["땒", "ttaent"],
    ["땓", "ttaet"],
    ["땔", "ttael"],
    ["땕", "ttaelk"],
    ["땖", "ttaelm"],
    ["땗", "ttaelp"],
    ["땘", "ttaelt"],
    ["땙", "ttaelt"],
    ["땚", "ttaelp"],
    ["땛", "ttaelt"],
    ["땜", "ttaem"],
    ["땝", "ttaep"],
    ["땞", "ttaept"],
    ["땟", "ttaet"],
    ["땠", "ttaet"],
    ["땡", "ttaeng"],
    ["땢", "ttaet"],
    ["땣", "ttaet"],
    ["땤", "ttaek"],
    ["땥", "ttaet"],
    ["땦", "ttaep"],
    ["땧", "ttaet"],
    ["땨", "ttya"],
    ["땩", "ttyak"],
    ["땪", "ttyak"],
    ["땫", "ttyakt"],
    ["땬", "ttyan"],
    ["땭", "ttyant"],
    ["땮", "ttyant"],
    ["땯", "ttyat"],
    ["땰", "ttyal"],
    ["땱", "ttyalk"],
    ["땲", "ttyalm"],
    ["땳", "ttyalp"],
    ["땴", "ttyalt"],
    ["땵", "ttyalt"],
    ["땶", "ttyalp"],
    ["땷", "ttyalt"],
    ["땸", "ttyam"],
    ["땹", "ttyap"],
    ["땺", "ttyapt"],
    ["땻", "ttyat"],
    ["땼", "ttyat"],
    ["땽", "ttyang"],
    ["땾", "ttyat"],
    ["땿", "ttyat"],
    ["떀", "ttyak"],
    ["떁", "ttyat"],
    ["떂", "ttyap"],
    ["떃", "ttyat"],
    ["떄", "ttyae"],
    ["떅", "ttyaek"],
    ["떆", "ttyaek"],
    ["떇", "ttyaekt"],
    ["떈", "ttyaen"],
    ["떉", "ttyaent"],
    ["떊", "ttyaent"],
    ["떋", "ttyaet"],
    [


    @GET("/v6/search?showAnonymous=-1")
    fun getSearchTopic(
        @Query("type") type: String,
        @Query("searchValue") keyWord: String,
        @Query("page") page: Int
    ): Call<SearchTopicResponse>

    @GET("/v6/feed/replyList?listType=&discussMode=0&feedType=feed_reply&blockStatus=0&fromFeedAuthor=0")
    fun getReply2Reply(
        @Query("id") id: String,
        @Query("page") page: Int
    ): Call<HomeFeedResponse>

    @GET("/v6/page/dataList?url=%2Fpage%3Furl%3DV11_VERTICAL_TOPIC&title=%E8%AF%9D%E9%A2%98&subTitle=&page=1")
    fun getHomeTopicTitle(
    ): Call<HomeFeedResponse>

    @GET("/v6/page/dataList?url=%2Fpage%3Furl%3DV9_HOME_TAB_RANKING&title=%E7%83%AD%E6%A6%9C&subTitle=")
    fun getHomeRanking(
        @Query("page") page: Int,
        @Query("lastItem") lastItem: String
    ): Call<HomeFeedResponse>

    @GET("/v6/user/space")
    fun getUserSpace(
        @Query("uid") uid: String,
    ): Call<UserResponse>

    @GET("/v6/user/feedList?showAnonymous=0&isIncludeTop=1&showDoing=0")
    fun getUserFeed(
        @Query("uid") uid: String,
        @Query("page") page: Int,
    ): Call<HomeFeedResponse>

    @GET("/v6/apk/detail?installed=1")
    fun getAppInfo(
        @Query("id") id: String,
    ): Call<AppResponse>

    @GET("/v6/page/dataList?title=%E7%82%B9%E8%AF%84&subTitle=")
    fun getAppComment(
        @Query("url") url: String,
        @Query("page") page: Int
    ): Call<HomeFeedResponse>

    @GET("/v6/topic/newTagDetail")
    fun getTopicLayout(
        @Query("tag") tag: String
        //@Path("TAG") TAG: String
    ): Call<TopicLayoutResponse>

    @GET("/v6/page/dataList")
    fun getTopicData(
        @Query("url") url: String,
        @Query("title") title: String,
        @Query("subTitle") subTitle: String?,
        @Query("page") page: Int
    ): Call<HomeFeedResponse>

    @GET("/v6/user/profile")
    fun getProfile(
        @Query("uid") uid: String
    ): Call<ProfileResponse>

    @GET("/v6/page/dataList?/page?subTitle=")
    fun getFollowFeed(
        @Query("url") url: String,
        @Query("title") title: String,
        @Query("page") page: Int
    ): Call<HomeFeedResponse>

}package com.jzbrooks.vgo.core.transformation

import assertk.assertThat
import assertk.assertions.containsNone
import assertk.assertions.hasSize
import com.jzbrooks.vgo.core.graphic.command.ClosePath
import com.jzbrooks.vgo.core.graphic.command.CommandVariant
import com.jzbrooks.vgo.core.graphic.command.LineTo
import com.jzbrooks.vgo.core.graphic.command.MoveTo
import com.jzbrooks.vgo.core.util.element.createPath
import com.jzbrooks.vgo.core.util.math.Point
import org.junit.jupiter.api.Test

class RemoveRedundantCommandsTests {
    @Test
    fun testRedundantLineToIsRemoved() {
        val path =
            createPath(
                listOf(
                    MoveTo(CommandVariant.RELATIVE, listOf(Point(100f, 1f))),
                    LineTo(CommandVariant.RELATIVE, listOf(Point(0f, 0f))),
                    LineTo(CommandVa


{
    val scope = CoroutineScope(EmptyCoroutineContext)
    val flow1 = flow {
        repeat(5) {
            delay(100)
            println("emit: $it")
            emit(it)
        }
    }

    val shareFlow = flow1.shareIn(scope, SharingStarted.Eagerly)
    scope.launch {
        delay(150)
        flow1.collect {
            println("collect1: $it")
        }
    }

    scope.launch {
        delay(200)
        flow1.collect {
            println("collect2: $it")
        }
    }

    scope.launch {
        delay(400)
        flow1.collect {
            println("collect3: $it")
        }
    }
}
package com.hsicen.a02_concurrency

import kotlinx.coroutines.*
import kotlin.coroutines.EmptyCoroutineContext

/******====== 23.async 对异常的处理 ======******/
/**
 * async：
 *  1.block 代码块的执行是并行的
 *  2.await 的执行是串行的
 *  3.async作为子协程，block代码块中异常会有双重影响，会导致父协程的取消 和 调用await的地方发生异常
 *  4.async作为最外层的父协程，block代码块中异常，不会抛给线程世界，而是抛给调用await的地方
 *  5.async的block代码块不是协程的终点，调用await的地方才是
 *  6.async设置CoroutineExceptionHandler没有作用
 */
fun main(): Unit = runBlocking {
  val scope = CoroutineScope(EmptyCoroutineContext)
  val exHandler = CoroutineExceptionHandler { _, throwable ->
    println("root catch error: $throwable")
  }

  scope.async/*(exHandler)*/ {
    println("parent run.")

    val deferred = async {
      println("child1 run.")
      delay(1000)
      throw RuntimeException("run error")
    }

    launch {
      try {
        deferred.await()
      } catch (e: CancellationException) { // 父协程取消异常
        println("catch error1: $e")
      } catch (e: RuntimeException) { // 直接传递
        println("catch error2: $e")
      }

      println("child2 run.")
    }
  }

  delay(3000)
}
package com.hsicen.a02_concurrency

import kotlinx.coroutines.*
import kotlin.coroutines.EmptyCoroutineContext
import kotlin.time.measureTime

/******====== 18.线程的结构化取消 ======******/
/**
 * 父子协程具有关联关系，当父协程被取消时，子协程也会被取消。
 * ·如果协程内部有挂起函数(delay,await)，协程取消时会抛异常 CancellationException
 * ·cancel时会将 isActive 置为 false
 * ·会依次调用子协程的 cancel
 * ·如果没有挂起函数或检查点，父协程 cancel 时，子协程可能会一直执行
 *
 * 协程的取消：
 *  1.父协程调用cancel
 *  2.自己内部抛出CancellationException
 *
 * 协程取消的工作：
 *  1.cancel 时将 isActive 置为 false
 *  2.调用子协程的 cancel
 *  3.代码里的检查点 isActive，发现取消时抛出 CancellationException
 *
 * 子协程如何拒绝取消
 *  1.只能从取消工作的第三点开始
 *  2.所以子协程不能拒绝取


	jnz	.Lloop

	movq	64(%rsp),%rsi
.cfi_def_cfa	%rsi,8
	movq	-40(%rsi),%r14
.cfi_restore	%r14
	movq	-32(%rsi),%r13
.cfi_restore	%r13
	movq	-24(%rsi),%r12
.cfi_restore	%r12
	movq	-16(%rsi),%rbp
.cfi_restore	%rbp
	movq	-8(%rsi),%rbx
.cfi_restore	%rbx
	leaq	(%rsi),%rsp
.cfi_def_cfa_register	%rsp
.Lepilogue:
	.byte	0xf3,0xc3
.cfi_endproc
.size	sha1_block_data_order_nohw,.-sha1_block_data_order_nohw
.globl	sha1_block_data_order_hw
.hidden sha1_block_data_order_hw
.type	sha1_block_data_order_hw,@function
.align	32
sha1_block_data_order_hw:
.cfi_startproc
_CET_ENDBR
	movdqu	(%rdi),%xmm0
	movd	16(%rdi),%xmm1
	movdqa	K_XX_XX+160(%rip),%xmm3

	movdqu	(%rsi),%xmm4
	pshufd	$27,%xmm0,%xmm0
	movdqu	16(%rsi),%xmm5
	pshufd	$27,%xmm1,%xmm1
	movdqu	32(%rsi),%xmm6
.byte	102,15,56,0,227
	movdqu	48(%rsi),%xmm7
.byte	102,15,56,0,235
.byte	102,15,56,0,243
	movdqa	%xmm1,%xmm9
.byte	102,15,56,0,251
	jmp	.Loop_shaext

.align	16
.Loop_shaext:
	decq	%rdx
	leaq	64(%rsi),%r8
	paddd	%xmm4,%xmm1
	cmovneq	%r8,%rsi
	prefetcht0	512(%rsi)
	movdqa	%xmm0,%xmm8
.byte	15,56,201,229
	movdqa	%xmm0,%xmm2
.byte	15,58,204,193,0
.byte	15,56,200,213
	pxor	%xmm6,%xmm4
.byte	15,56,201,238
.byte	15,56,202,231

	movdqa	%xmm0,%xmm1
.byte	15,58,204,194,0
.byte	15,56,200,206
	pxor	%xmm7,%xmm5
.byte	15,56,202,236
.byte	15,56,201,247
	movdqa	%xmm0,%xmm2
.byte	15,58,204,193,0
.byte	15,56,200,215
	pxor	%xmm4,%xmm6
.byte	15,56,201,252
.byte	15,56,202,245

	movdqa	%xmm0,%xmm1
.byte	15,58,204,194,0
.byte	15,56,200,204
	pxor	%xmm5,%xmm7
.byte	15,56,202,254
.byte	15,56,201,229
	movdqa	%xmm0,%xmm2
.byte	15,58,204,193,0
.byte	15,56,200,213
	pxor	%xmm6,%xmm4
.byte	15,56


which share the same path).
func MergeDiffs(a, b []*Change) ([]*Change, []Conflict) {
	var out []*Change
	var conflicts []Conflict
	paths := make(map[string]*Change)
	for _, c := range a {
		paths[c.Path] = c
	}

	for _, c := range b {
		if ca, ok := paths[c.Path]; ok {
			conflicts = append(conflicts, Conflict{
				A: ca,
				B: c,
			})
		} else {
			out = append(out, c)
		}
	}
	for _, c := range paths {
		out = append(out, c)
	}
	return out, conflicts
}
// Code generated by protoc-gen-gogo.
// source: unixfs.proto
// DO NOT EDIT!

/*
Package unixfs_pb is a generated protocol buffer package.

It is generated from these files:
	unixfs.proto

It has these top-level messages:
	Data
	Metadata
*/
package unixfs_pb

import proto "github.com/ipfs/fs-repo-migrations/fs-repo-6-to-7/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
import fmt "fmt"
import math "math"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

type Data_DataType int32

const (
	Data_Raw       Data_DataType = 0
	Data_Directory Data_DataType = 1
	Data_File      Data_DataType = 2
	Data_Metadata  Data_DataType = 3
	Data_Symlink   Data_DataType = 4
	Data_HAMTShard Data_DataType = 5
)

var Data_DataType_name = map[int32]string{
	0: "Raw",
	1: "Directory",
	2: "File",
	3: "Metadata",
	4: "Symlink",
	5: "HAMTShard",
}
var Data_DataType_value = map[string]int32{
	"Raw":       0,
	"Directory": 1,
	"File":      2,
	"Metadata":  3,
	"Symlink":   4,
	"HAMTShard": 5,
}

func (x Data_DataType) Enum() *Data_DataType {
	p := new(Data_DataType)
	*p = x
	return p
}
func (x Data_DataType) String() string {
	return proto.EnumName(Data_DataType_name, int32(x))
}
func (x *Data_DataType) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Data_DataType_value, data, "Data_DataType")
	if err != nil {
		return err
	}
	*x = Data_DataType(value)
	return nil
}

type Data struct {
	Type             *Data_DataType `protobuf:"varint,1,req,name=Type,enum=unixfs.pb.Data_DataType" json:"Type,omitempty"`
	Data             []byte         `protobuf:"bytes,2,opt,name=Data" json:"Data,omitempty"`
	Filesize         *uint64        `protobuf:"varint,3,opt,name=filesize" json:"filesize,omitempty"`
	Blocksizes       []uint64       `protobuf:"varint,4,rep,name=blocksizes" json:"blocksizes,omitempty"`
	HashType         *uint64        `protobuf:"varint,5,opt,name=hashType" json:"hashType,omitempty"`
	Fanout           *ui


using NUnit.Framework;
using PluginCore.Utilities;

namespace PluginCore.PluginCore.Utilities
{
    [TestFixture]
    class SemVerTests
    {
        [Test]
        public void IsEqualTo()
        {
            var ver = new SemVer("3.3.0");
            Assert.IsFalse(ver == "3.2.1");
            Assert.IsTrue(ver == "3.3.0");
        }

        [Test]
        public void IsNotEqualTo()
        {
            var ver = new SemVer("3.3.0");
            Assert.IsTrue(ver != "3.2.1");
            Assert.IsFalse(ver != "3.3.0");
        }

        [Test]
        public void IsLessThan()
        {
            var ver = new SemVer("3.2.1");
            Assert.IsFalse(ver < "3.0.0");
            Assert.IsTrue(ver < "3.3.0


REGISTERED = 18;

    private static final int AUDIO_MODE_SOURCE = 1;

    // Delay for debouncing USB disconnects.
    // We often get rapid connect/disconnect events when enabling USB functions,
    // which need debouncing.
    private static final int UPDATE_DELAY = 1000;

    // Timeout for entering USB request mode.
    // Request is cancelled if host does not configure device within 10 seconds.
    private static final int ACCESSORY_REQUEST_TIMEOUT = 10 * 1000;

    private static final String BOOT_MODE_PROPERTY = "ro.bootmode";

    private static final String ADB_NOTIFICATION_CHANNEL_ID_TV = "usbdevicemanager.adb.tv";
    private UsbHandler mHandler;

    private final Object mLock = new Object();

    private final Context mContext;
    private final ContentResolver mContentResolver;
    @GuardedBy("mLock")
    private UsbProfileGroupSettingsManager mCurrentSettings;
    private final boolean mHasUsbAccessory;
    @GuardedBy("mLock")
    private String[] mAccessoryStrings;
    private final UEventObserver mUEventObserver;

    private static Set<Integer> sBlackListedInterfaces;
    private HashMap<Long, FileDescriptor> mControlFds;

    static {
        sBlackListedInterfaces = new HashSet<>();
        sBlackListedInterfaces.add(UsbConstants.USB_CLASS_AUDIO);
        sBlackListedInterfaces.add(UsbConstants.USB_CLASS_COMM);
        sBlackListedInterfaces.add(UsbConstants.USB_CLASS_HID);
        sBlackListedInterfaces.add(UsbConstants.USB_CLASS_PRINTER);
        sBlackListedInterfaces.add(UsbConstants.USB_CLASS_MASS_STORAGE);
        sBlackListedInterfaces.add(UsbConstants.USB_CLASS_HUB);
        sBlackListedInterfaces.add(UsbConstants.USB_CLASS_CDC_DATA);
        sBlackListedInterfaces.add(UsbConstants.USB_CLASS_CSCID);
        sBlackListedInterfaces.add(UsbConstants.USB_CLASS_CONTENT_SEC);
        sBlackListedInterfaces.add(UsbConstants.USB_CLASS_VIDEO);
        sBlackListedInterfaces.add(UsbConstants.USB_CLASS_WIRELESS_CONTROLLER);
    }

    /*
     * Listens for uevent messages from the kernel to monitor the USB state
     */
    private final class UsbUEventObserver extends UEventObserver {
        @Override
        public void onUEvent(UEventObserver.UEvent event) {
            if (DEBUG) Slog.v(TAG, "USB UEVENT: " + event.toString());

            String state = event.get("USB_STATE");
            String accessory = event.get("ACCESSORY");
            if (state != null) {
                mHandler.updateState(state);
            } else if ("START".equals(accessory)) {
                if (DEBUG) Slog.d(TAG, "got accessory start");
                startAccessoryMode();
            }
        }
    }

    @Override
    public void onKeyguardStateChanged(boolean isShowing) {
        int userHandle = ActivityManager.getCurrentUser();
        boolean secure = mContext.getSystemService(KeyguardManager.class)
                .isDeviceSecure(userHandle);
        if (DEBUG) {
            Slog.v(TAG, "onKeyguardStateChanged: isShowing:" + isShowing + " secure:" + secure
                    + " user:" + userHandle);
        }
        // We are unlocked when the keyguard is down or non-secure.
        mHandler.sendMessage(MSG_UPDATE_SCREEN_LOCK, (isShowing && secure));
    }

    @Override
    public void onAwakeStateChanged(boolean isAwake) {
        // ignore
    }

    /** Called when a user is unlocked. */
    public void onUnlockUser(int userHandle) {
        onKeyguardStateChanged(false);
    }

    public UsbDeviceManager(Context context, UsbAlsaManager alsaManager,
            UsbSettingsManager settingsManager) {
        mContext = context;
        mContentResolver = context.getContentResolver();
        PackageManager pm = mContext.


#!/usr/bin/env python
from vtkmodules.vtkCommonCore import vtkLookupTable
from vtkmodules.vtkFiltersCore import vtkCleanPolyData
from vtkmodules.vtkFiltersGeneral import vtkCurvatures
from vtkmodules.vtkFiltersSources import vtkSuperquadricSource
from vtkmodules.vtkRenderingCore import (
    vtkActor,
    vtkCamera,
    vtkPolyDataMapper,
    vtkRenderWindow,
    vtkRenderWindowInteractor,
    vtkRenderer,
)
import vtkmodules.vtkInteractionStyle
import vtkmodules.vtkRenderingFreeType
import vtkmodules.vtkRenderingOpenGL2
from vtkmodules.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()

# Create renderer stuff
#
ren1 = vtkRenderer()
renWin = vtkRenderWindow()
renWin.AddRenderer(ren1)
iren = vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
# Pipeline stuff
#
torus = vtkSuperquadricSource()
torus.SetCenter(0.0,0.0,0.0)
torus.SetScale(1.0,1.0,1.0)
torus.SetPhiResolution(64)
torus.SetThetaResolution(64)
torus.SetPhiRoundness(1.0)
torus.SetThetaRoundness(1.0)
torus.SetThickness(0.5)
torus.SetSize(0.5)
torus.SetToroidal(1)
# The quadric has nasty discontinuities from the way the edges are generated
# so let's pass it though a CleanPolyDataFilter and merge any points which
# are coincident, or very close
cleaner = vtkCleanPolyData()
cleaner.SetInputConnection(torus.GetOutputPort())
cleaner.SetTolerance(0.005)
curve1 = vtkCurvatures()
curve1.SetInputConnection(cleaner.GetOutputPort())
curve1.SetCurvatureTypeToGaussian()
curve2 = vtkCurvatures()
curve2.SetInputConnection(cleaner.GetOutputPort())
curve2.SetCurvatureTypeToMean()
lut1 = vtkLookupTable()
lut1.SetNumberOfColors(256)
lut1.SetHueRange(0.15,1.0)
lut1.SetSaturationRange(1.0,1.0)
lut1.SetValueRange(1.0,1.0)
lut1.SetAlphaRange(1.0,1.0)
lut1.SetRange(-20,20)
lut2 = vtkLookupTable()
lut2.SetNumberOfColors(256)
lut2.SetHueRange(0.15,1.0)
lut2.SetSaturationRange(1.0,1.0)
lut2.SetValueRange(1.0,1.0)
lut2.SetAlphaRange(1.0,1.0)
lut2.SetRange(0,4)
cmapper1 = vtkPolyDataMapper()
cmapper1.SetInputConnection(curve1.GetOutputPort())
cmapper1.SetLookupTable(lut1)
cmapper1.SetUseLookupTableScalarRange(1)
cmapper2 = vtkPolyDataMapper()
cmapper2.SetInputConnection(curve2.GetOutputPort())
cmapper2.SetLookupTable(lut2)
cmapper2.SetUseLookupTableScalarRange(1)
cActor1 = vtkActor()
cActor1.SetMapper(cmapper1)
cActor1.SetPosition(-0.5,0.0,0.0)
cActor2 = vtkActor()
cActor2.SetMapper(cmapper2)
cActor2.SetPosition(0.5,0.0,0.0)
# Add the actors to the renderer
#
ren1.AddActor(cActor1)
ren1.AddActor(cActor2)
ren1.SetBackground(0.5,0.5,0.5)
renWin.SetSize(300,200)
camera = vtkCamera()
ren1.SetActiveCamera(camera)
camera.SetPosition(0.0,2.0,2.1)
camera.SetFocalPoint(0.0,0.0,0.0)
camera.SetViewAngle(30)
ren1.ResetCameraClippingRange()
iren.Initialize()
# render the image
#
# prevent the tk window from showing up then start the event loop
renWin.Render()
# --- end of script --


,(hl)
	jp playSound

@sounds:
	.db SND_TUNE_OF_ECHOES
	.db SND_TUNE_OF_CURRENTS
	.db SND_TUNE_OF_AGES

; Facing left
@state2:
@state4:
	ld a,(wFrameCounter)
	and $1f
	jr nz,@stateCommon
	xor a
	ld bc,$f8f8
	call objectCreateFloatingMusicNote

@stateCommon:
	push de
	ld de,w1Link
	callab specialObjectAnimate
	pop de
	call interactionDecCounter1
	ret nz
	ld (hl),52 ; [counter1]
	jp interactionIncState

; Facing right
@state3:
@state5:
	ld a,(wFrameCounter)
	and $1f
	jr nz,@stateCommon

	ld a,$01
	ld bc,$f808
	call objectCreateFloatingMusicNote
	jr @stateCommon

; Signal to a "cutscene handler" that we're done, then delete self
@state6:
	ld hl,wTmpcfc0.genericCutscene.state
	set 7,(hl)
	ld a,LINK_ANIM_MODE_WALK
	ld (wcc50),a
	jp interactionDelete


//  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
  //  Mountain View, CA 94043, or:
  //
  //  http://www.sgi.com
  //
  //  For further information regarding this notice, see:
  //
  //  http://oss.sgi.com/projects/GenInfo/NoticeExplan
  //
  //

#include <asm/errno.h>

	.section .sdata, "a", "progbits"
	.align	8
	.text

	.global errno

	.proc	__rint
	.global	__rint
	.weak	rint
	rint = __rint

	// double __rint(double x)

 // LEAF(__rint)

__rint:
	fcmp.unord.unc.s0 p6,p7=f8,f8
	;;
 (p6)	br.cond.dptk	nanarg		// return if arg is a NaN
	fabs	f9=farg0
	addl    r16=@gprel(twop52),gp
	;;
 	ldfd	f10=[r16]	// load 2**52
	;;
	fcmp.ge.unc.s0	p6,p7=f9,f10
	;;
 (p6)	br.ret.sptk	rp		// return if |x| >= 2**52
	fcvt.fx.s0 f9=f8	// convert to an integer
	;;
	fcvt.xf	f8=f9		// convert back to floating point
	br.ret.sptk	rp

nanarg: // arg is a NaN

	// set errno to EDOM

	addl	r16=@ltoff(errno#),gp
	mov	r14=EDOM
	;;
	ld8	r15=[r16]
	;;
	st4	[r15]=r14	// store into errno

	addl    r16=@gprel(qnan),gp
	;;
 	ldfd	f8=[r16]	// return quiet Nan
	br.ret.sptk  rp
	.endp

	.section .sdata

	.align 8
twop52:	data8	0x4330000000000000
qnan:	data8	0x7ff8000000000000