个类型动态地创建出对应的 `TaskGroup`。

#### **如何实现一个新的聚合器？**

1.  **实现并注册工厂**：在你的实现包（例如 `internal/engine/impl/hll`）中，实现 `model.Task` 接口，并在包的 `init()` 函数中调用 `factory.RegisterAggregator()`。这个工厂函数现在必须返回一个 `*factory.TaskGroup`，其中包含了为这个聚合器创建的所有 `Task` 和 `Writer`。

    ```go
    // internal/engine/impl/hll/task.go
    package hll

    import (
        "Go2NetSpectra/internal/factory"
        // ...
    )

    func init() {
        factory.RegisterAggregator("hll", func(cfg *config.Config) (*factory.TaskGroup, error) {
            // ... 创建 tasks 和 writers
            return &factory.TaskGroup{Tasks: tasks, Writers: writers}, nil
        })
    }
    ```

2.  **激活包的初始化**：为了让 Go 编译器在程序启动时执行上述的 `init()` 函数，只需在 `manager` 包中匿名导入（blank import）你的实现包即可。

    ```go
    // internal/engine/manager/manager.go
    import (
        _ "Go2NetSpectra/internal/engine/impl/exact"
        _ "Go2NetSpectra/internal/engine/impl/sketch"
        _ "Go2NetSpectra/internal/engine/impl/hll" // <-- 新增匿名导入
    )
    ```

通过这个机制，`Manager` 与具体的 `Task` 实现完全解耦，任何开发者都可以独立开发自己的聚合器插件并轻松集成到 Go2NetSpectra 框架中。

---

## 3. API 服务架构：智能查询路由

随着引擎支持并发聚合，`ns-api` 服务也演进为一个能够处理多个异构数据源的智能查询网关。

- **多查询器实例 (Multi-Querier)**: `ns-api` 在启动时，不再创建一个单一的 `Querier`。相反，它会检查配置文件中的 `aggregator.types` 列表。如果 `exact` 被启用并且配置了 ClickHouse `Writer`，它就会创建一个 `exactQuerier`。同理，如果 `sketch` 被启用，它会创建 `sketchQuerier`。

- **基于 RPC 的路由**: `QueryServiceServer` 的 gRPC 方法实现现在包含了路由逻


 verbose flag and will only be shown if --verbose is
    // processed.
    expect(result.stdout, contains('vm_name'));
    expect(result.exitCode, 0);

    // Verify non-help options work.
    //
    // Regression test for https://github.com/dart-lang/sdk/issues/55767
    result = Process.runSync(
      outFile,
      [],
      environment: <String, String>{
        'DART_VM_OPTIONS': '--random_seed=42',
      },
    );

    expect(result.stderr, isEmpty);
    // This value should be consistent as long as --random_seed is processed.
    expect(result.stdout, contains('21'));
    expect(result.exitCode, 0);
  }, skip: isRunningOnIA32);

  test('Compile exe without info', () async {
    final p = project(mainSrc: '''void main() {}''');
    final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath));
    final outFile = path.canonicalize(path.join(p.dirPath, 'myexe'));

    final result = await p.run(
      [
        'compile',
        'exe',
        '--verbosity=warning',
        '-o',
        outFile,
        inFile,
      ],
    );

    // Only printed when -v/--verbose is used, not --verbosity.
    expect(result.stdout, isNot(contains(targetingHostOSMessage)));
    expect(result.stdout, isNot(contains(soundNullSafetyMessage)));
    expect(result.stderr, isEmpty);
    expect(result.exitCode, 0);
    expect(File(outFile).existsSync(), true,
        reason: 'File not found: $outFile');
  }, skip: isRunningOnIA32);

  test('Compile exe without warnings', () async {
    final p = project(mainSrc: '''
void main() {
  int i = 0;
  i?.isEven;
}
''');
    final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath));
    final outFile = path.canonicalize(path.join(p.dirPath, 'myexe'));

    final result = await p.run(
      [
        'compile',
        'exe',
        '--verbosity=error',
        '-o',
        outFile,
        inFile,
      ],
    );

    // Only printed when -v/--verbose is used, not --verbosity.
    expect(result.stdout, isNot(contains(targetingHostOSMessage)));
    expect(result.stdout, isNot(contains(soundNullSafetyMessage)));
    expect(result.stderr, isEmpty);
    expect(result.exitCode, 0);
  }, skip: isRunningOnIA32);

  test('Compile exe with asserts', () async {
    final p = project(mainSrc: '''
void main() {
  assert(int.parse('1') == 2);
}
''');
    final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath));
    final outFile = path.canonicalize(path.join(p.dirPath, 'myexe'));

    final result = await p.run(
      [
        'compile',
        'exe',
        '--enable-asserts',
        '-o',
        outFile,
        inFile,
      ],
    );

    // Only printed when -v/--verbose is used, not --verbosity.
    expect(result.stdout, isNot(contains(targetingHostOSMessage)));
    expect(result.stdout, isNot(contains(soundNullSafetyMessage)));
    expect(result.stderr, isEmpty);
    expect(result.exitCode, 0);

    final runResult = await Process.run(outFile, []);
    expect(runResult.stdout, isEmpty);
    expect(runResult.stderr, contains(failedAssertionError));
  }, skip: isRunningOnIA32);

  test('Compile exe from kernel', () async {
    final p = project(mainSrc: '''
void main() {}


://github.com/flame-engine/flame/commit/ea29929cd86ed00407f2d2aa69dcf6f34ffc5bbd))
 - **FEAT**: Adding priority to layout components ([#3639](https://github.com/flame-engine/flame/issues/3639)). ([2eff267d](https://github.com/flame-engine/flame/commit/2eff267d795fbfbf9f5b3215b6dca4a2da9864e1))

#### `flame_lint` - `v1.4.1`

 - **FIX**: Remove unnecessary breaks ([#3638](https://github.com/flame-engine/flame/issues/3638)). ([ea29929c](https://github.com/flame-engine/flame/commit/ea29929cd86ed00407f2d2aa69dcf6f34ffc5bbd))

#### `jenny` - `v1.5.0`

 - **FEAT**: Expose additional flame_jenny Command classes ([#3641](https://github.com/flame-engine/flame/issues/3641)). ([8ef2587d](https://github.com/flame-engine/flame/commit/8ef2587de4a1bef1d745cc1f5a626a7e84c6230c))

## 2025-06-30

### Changes

---

Packages with breaking changes:

 - [`flame` - `v1.30.0`](#flame---v1300)
 - [`flame_sprite_fusion` - `v0.2.0`](#flame_sprite_fusion---v020)
 - [`flame_test` - `v2.0.0`](#flame_test---v200)

Packages with other changes:

 - [`flame_svg` - `v1.11.13`](#flame_svg---v11113)
 - [`flame_texturepacker` - `v4.4.0`](#flame_texturepacker---v440)
 - [`flame_tiled` - `v3.0.4`](#flame_tiled---v304)
 - [`flame_behavior_tree` - `v0.1.3+13`](#flame_behavior_tree---v01313)
 - [`flame_oxygen` - `v0.2.3+13`](#flame_oxygen---v02313)
 - [`flame_isolate` - `v0.6.2+13`](#flame_isolate---v06213)
 - [`flame_fire_atlas` - `v1.8.8`](#flame_fire_atlas---v188)
 - [`flame_audio` - `v2.11.7`](#flame_audio---v2117)
 - [`flame_spine` - `v0.2.2+13`](#flame_spine---v02213)
 - [`flame_bloc` - `v1.12.14`](#flame_bloc---v11214)
 - [`flame_kenney_xml` - `v0.1.1+13`](#flame_kenney_xml---v01113)
 - [`flame_lottie` - `v0.4.2+13`](#flame_lottie---v04213)
 - [`flame_markdown` - `v0.2.4+6`](#flame_markdown---v0246)
 - [`flame_console` - `v0.1.2+9`](#flame_console---v0129)
 - [`flame_rive` - `v1.10.16`](#flame_rive---v11016)
 - [`flame_forge2d` - `v0.19.0+3`](#flame_forge2d---v01903)
 - [`flame_noise` - `v0.3.2+13`](#flame_noise---v03213)
 - [`flame_riverpod` - `v5.4.16`](#flame_riverpod---v5416)
 - [`flame_network_assets` - `v0.3.3+13`](#flame_network_assets---v03313)
 - [`flame_3d` - `v0.1.0-dev.13`](#flame_3d---v010-dev13)

Packages with


warnings.warn("parameter `Operator` is deprecated", DeprecationWarning)

        return self._Operator

    @Operator.setter
    def Operator(self, Operator):
        warnings.warn("parameter `Operator` is deprecated", DeprecationWarning)

        self._Operator = Operator

    def _deserialize(self, params):
        if params.get("Agent") is not None:
            self._Agent = Agent()
            self._Agent._deserialize(params.get("Agent"))
        self._RoleIds = params.get("RoleIds")
        self._UserIds = params.get("UserIds")
        self._OpenIds = params.get("OpenIds")
        if params.get("Operator") is not None:
            self._Operator = UserInfo()
            self._Operator._deserialize(params.get("Operator"))
        memeber_set = set(params.keys())
        for name, value in vars(self).items():
            property_name = name[1:]
            if property_name in memeber_set:
                memeber_set.remove(property_name)
        if len(memeber_set) > 0:
            warnings.warn("%s fileds are useless." % ",".join(memeber_set))

class ChannelCreateUserRolesResponse(AbstractModel):
    """ChannelCreateUserRoles返回参数结构体

    """

    def __init__(self):
        r"""
        :param _FailedCreateRoleData: 绑定失败的用户角色列表
        :type FailedCreateRoleData: list of FailedCreateRoleData
        :param _RequestId: 唯一请求 ID，由服务端生成，每次请求都会返回（若请求因其他原因未能抵达服务端，则该次请求不会获得 RequestId）。定位问题时需要提供该次请求的 RequestId。
        :type RequestId: str
        """
        self._FailedCreateRoleData = None
        self._RequestId = None

    @property
    def FailedCreateRoleData(self):
        return self._FailedCreateRoleData

    @FailedCreateRoleData.setter
    def FailedCreateRoleData(self, FailedCreateRoleData):
        self._FailedCreateRoleData = FailedCreateRoleData

    @property
    def RequestId(self):
        return self._RequestId

    @RequestId.setter
    def RequestId(self, RequestId):
        self._RequestId = RequestId

    def _deserialize(self, params):
        if params.get("FailedCreateRoleData") is not None:
            self._FailedCreateRoleData = []
            for item in params.get("FailedCreateRoleData"):
                obj = FailedCreateRoleData()
                obj._deserialize(item)
                self._FailedCreateRoleData.append(obj)
        self._RequestId = params.get("RequestId")

class ChannelCreateWebThemeConfigRequest(AbstractModel):
    """ChannelCreateWebThemeConfig请求参数结构体

    """

    def __init__(self):
        r"""
        :param _Agent: 应用相关信息。 此接口Agent.ProxyOrganizationOpenId、Agent. ProxyOperator.OpenId、Agent.AppId 必填。
        :type Agent: :class:`tencentcloud.essbasic.v20210526.models.Agent`
        :param _ThemeType: 主题类型
EMBED_WEB_THEME：嵌入式主题

EMBED_WEB_THEME，web页面嵌入的主题风格配置

COMPANY_AUTHENTICATE，子客认证主题配置， 对当前第三方应用号生效，
目前支持的有，背景图替换，隐藏企业认证页面导航栏和隐藏企业认证顶部logo

        :type ThemeType: str
        :param _WebThemeConfig: 主题配置
        :type WebThemeConfig: :class:`tencentcloud.essbasic.v20210526.models.WebThemeConfig`
        """
        self._Agent = None
        self._ThemeType = None
        self._WebThemeConfig = None

    @property
    def Agent(self):
        return self._Agent

    @Agent.setter
    def Agent(self, Agent):
        self._Agent = Agent

    @property
    def ThemeType(self):
        return self._ThemeType

    @ThemeType.setter
    def ThemeType(self, ThemeType):
        self._ThemeType = ThemeType

    @property
    def WebThemeConfig(self):
        return self._WebThemeConfig

    @WebThemeConfig.setter
    def WebThemeConfig(self, WebThemeConfig):
        self._WebThemeConfig = WebThemeConfig

    def _deserialize(self, params):
        if params.get("Agent") is not None:
            self._Agent = Agent()
            self._Agent._deserialize(params.get("Agent"))
        self._ThemeType = params.get("ThemeType")
        if params.get("WebThemeConfig") is not None:
            self._WebThemeConfig = WebThemeConfig()
            self._WebThemeConfig._deserialize(params.get("WebThemeConfig"))
        memeber_set = set(params.keys())
        for name, value in vars(self).items():
            property_name = name[1:]
            if property_name in memeber_set:
                memeber_set.remove(property_name)
        if len(memeber_set) > 0:
            warnings.warn("%s fileds are useless." % ",".join(memeber_set))

class ChannelCreateWebThemeConfigResponse(AbstractModel):
    """ChannelCreateWebThemeConf


acyDlpV2BucketingConfig clone() {
    return (GooglePrivacyDlpV2BucketingConfig) super.clone();
  }

}
/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.dlp.v2.model;

/**
 * Replaces an identifier with a surrogate using Format Preserving Encryption (FPE) with the FFX
 * mode of operation; however when used in the `ReidentifyContent` API method, it serves the
 * opposite function by reversing the surrogate back into the original identifier. The identifier
 * must be encoded as ASCII. For a given crypto key and context, the same identifier will be
 * replaced with the same surrogate. Identifiers must be at least two characters long. In the case
 * that the identifier is the empty string, it will be skipped. See
 * https://cloud.google.com/dlp/docs/pseudonymization to learn more. Note: We recommend using
 * CryptoDeterministicConfig for all use cases which do not require preserving the input alphabet
 * space and size, plus warrant referential integrity.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Cloud Data Loss Prevention (DLP) API. For a detailed
 * explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig extends com.google.api.client.json.GenericJson {

  /**
   * Common alphabets.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String commonAlphabet;

  /**
   * The 'tweak', a context may be used for higher security since the same identifier in two
   * different contexts won't be given the same surrogate. If the context is not set, a default
   * tweak will be used. If the context is set but: 1. there is no record present when transforming
   * a given value or 1. the field is not present when transforming a given value, a default tweak
   * will be used. Note that case (1) is expected when an `InfoTypeTransformation` is applied to
   * both structured and non-structured `ContentItem`s. Currently, the referenced field may be of
   * value type integer or string. The tweak is constructed as a sequence of bytes in big endian
   * byte order such that: - a 64 bit integer is encoded followed by a single byte of value 1 - a
   * string is encoded in UTF-8 format followed by a single byte of value 2
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GooglePrivacyDlpV2FieldId context;

  /**
   * Required. The key used by the encryption algorithm.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GooglePrivacyDlpV2CryptoKey cryptoKey;

  /**
   * This is supported by mapping these to


Map<crtc::Handle, Weak<LegacyDrmSurfaceInternal<A>>>>>,
    logger: ::slog::Logger,
}

impl<A: AsRawFd + 'static> AsSessionObserver<LegacyDrmDeviceObserver<A>> for LegacyDrmDevice<A> {
    fn observer(&mut self) -> LegacyDrmDeviceObserver<A> {
        LegacyDrmDeviceObserver {
            dev: Rc::downgrade(&self.dev),
            dev_id: self.dev_id,
            active: self.active.clone(),
            priviledged: self.dev.priviledged,
            backends: Rc::downgrade(&self.backends),
            logger: self.logger.clone(),
        }
    }
}

impl<A: AsRawFd + 'static> SessionObserver for LegacyDrmDeviceObserver<A> {
    fn pause(&mut self, devnum: Option<(u32, u32)>) {
        if let Some((major, minor)) = devnum {
            if major as u64 != stat::major(self.dev_id) || minor as u64 != stat::minor(self.dev_id) {
                return;
            }
        }
        if let Some(device) = self.dev.upgrade() {
            if let Some(backends) = self.backends.upgrade() {
                for surface in backends.borrow().values().filter_map(Weak::upgrade) {
                    // other ttys that use no cursor, might not clear it themselves.
                    // This makes sure our cursor won't stay visible.
                    let _ = crtc::clear_cursor(&*device, surface.crtc);
                }
            }
        }
        self.active.store(false, Ordering::SeqCst);
        if self.priviledged {
            if let Some(device) = self.dev.upgrade() {
                if let Err(err) = device.drop_master() {
                    error!(self.logger, "Failed to drop drm master state. Error: {}", err);
                }
            }
        }
    }

    fn activate(&mut self, devnum: Option<(u32, u32, Option<RawFd>)>) {
        if let Some((major, minor, fd)) = devnum {
            if major as u64 != stat::major(self.dev_id) || minor as u64 != stat::minor(self.dev_id) {
                return;
            } else if let Some(fd) = fd {
                info!(self.logger, "Replacing fd");
                if let Some(device) = self.dev.upgrade() {
                    ::nix::unistd::dup2(device.as_raw_fd(), fd)
                        .expect("Failed to replace file descriptor of drm device");
                }
            }
        }
        self.active.store(true, Ordering::SeqCst);
        if self.priviledged {
            if let Some(device) = self.dev.upgrade() {
                if let Err(err) = device.set_master() {
                    crit!(self.logger, "Failed to acquire drm master again. Error: {}", err);
                }
            }
        }
    }
}
<filename>zellij-server/src/ui/overlay/mod.rs
//! This module handles the overlay's over the [`Screen`]
//!
//! They consist of:
//!
//! prompt's:
//!
//! notification's:

pub mod prompt;

use crate::ServerInstruction;
use zellij_utils::pane_size::Size;

#[derive(Clone, Debug)]
pub struct Overlay {
    pub overlay_type: OverlayType,
}

pub trait Overlayable {
    /// Generates vte_output that can be passed into
    /// the `render()` function
    fn generate_overlay(&self, size: Size) -> String;
}

#[derive(Clone, Debug)]
struct P


tml,#chart{height: 100%;width: 100%;margin: 0px;}div {-webkit-tap-highlight-color:rgba(255,255,255,0);}</style>

/// 'data:text/html;base64,' + base64Encode(const Utf8Encoder().convert( /* STRING ABOVE */ ))
const htmlBase64 = 'data:text/html;base64,PCFET0NUWVBFIGh0bWw+PGh0bWw+PGhlYWQ+PG1ldGEgY2hhcnNldD0idXRmLTgiPjxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsIGluaXRpYWwtc2NhbGU9MS4wLCBtYXhpbXVtLXNjYWxlPTEuMCwgbWluaW11bS1zY2FsZT0xLjAsIHVzZXItc2NhbGFibGU9MCwgdGFyZ2V0LWRlbnNpdHlkcGk9ZGV2aWNlLWRwaSIgLz48c3R5bGUgdHlwZT0idGV4dC9jc3MiPmJvZHksaHRtbCwjY2hhcnR7aGVpZ2h0OiAxMDAlO3dpZHRoOiAxMDAlO21hcmdpbjogMHB4O31kaXYgey13ZWJraXQtdGFwLWhpZ2hsaWdodC1jb2xvcjpyZ2JhKDI1NSwyNTUsMjU1LDApO308L3N0eWxlPjwvaGVhZD48Ym9keT48ZGl2IGlkPSJjaGFydCIgLz48L2JvZHk+PC9odG1sPg==';

class InappEcharts extends StatefulWidget {
  InappEcharts({
    Key? key,
    required this.option,
    this.extraScript = '',
    this.onMessage,
    this.extensions = const [],
    this.theme,
    this.captureAllGestures = false,
    this.onLoad,
  }) : super(key: key);

  final String option;

  final String extraScript;

  final void Function(String message)? onMessage;

  final List<String> extensions;

  final String? theme;

  final bool captureAllGestures;

  final void Function()? onLoad;

  @override
  InappEchartsState createState() => InappEchartsState();
}

class InappEchartsState extends State<InappEcharts> {
  InAppWebViewController? webviewController;

  String? _currentOption;

  // --- FIX_BLINK ---
  double _opacity = Platform.isAndroid ? 0.0 : 1.0;
  // --- FIX_BLINK ---

  @override
  void initState() {
    super.initState();
    _currentOption = widget.option;
  }

  void init() async {
    final extensionsStr = this.widget.extensions.length > 0
        ? this.widget.extensions.reduce(
            (value, element) => (value) + '\n' + (element)
    )
        : '';
    final themeStr = this.widget.theme != null ? '\'${this.widget.theme}\'' : 'null';
    await webviewController?.evaluateJavascript(source: '''
      $echartsScript
      $extensionsStr
      var chart = echarts.init(document.getElementById('chart'), $themeStr);
      ${this.widget.extraScript}
      chart.setOption($_currentOption, true);
    ''');
    if (widget.onLoad != null) {
      widget.onLoad!();
    }
  }

  void update(String preOption) async {
    _currentOption = widget.option;
    if (_currentOption != preOption) {
      await webviewController?.evaluateJavascript(source: '''
        try {
          chart.setOption($_currentOption, true);
        } catch(e) {
        }
      ''');
    }
  }

  @override
  void didUpdateWidget(InappEcharts oldWidget) {
    super.didUpdateWidget(oldWidget);
    update(oldWidget.option);
  }

  // --- FIX_IOS_LEAK ---
  @override
  void dispose() {
    if (Platform.isIOS) {
      webviewController?.clearCache();
    }
    super.dispose();
  }
  // --- FIX_IOS_


mmatize(count - 1)
            cp := commatize(p)
            fmt.Printf("%7s untouchable numbers were found  <= %9s\n", cc, cp)
            p = p * 10
            if p == limit {
                break
            }
        }
    }
    cu := commatize(len(untouchable))
    cl := commatize(limit)
    fmt.Printf("%7s untouchable numbers were found  <= %s\n", cu, cl)
}
PACKAGE MAIN

IMPORT (
    "FMT"
    "TIME"
)

CONST PAGEWIDTH = 80

FUNC MAIN() {
    PRINTCAL(1969)
}

FUNC PRINTCAL(YEAR INT) {
    THISDATE := TIME.DATE(YEAR, 1, 1, 1, 1, 1, 1, TIME.UTC)
    VAR (
        DAYARR                  [12][7][6]INT // MONTH, WEEKDAY, WEEK
        MONTH, LASTMONTH        TIME.MONTH
        WEEKINMONTH, DAYINMONTH INT
    )
    FOR THISDATE.YEAR() == YEAR {
        IF MONTH = THISDATE.MONTH(); MONTH != LASTMONTH {
            WEEKINMONTH = 0
            DAYINMONTH = 1
        }
        WEEKDAY := THISDATE.WEEKDAY()
        IF WEEKDAY == 0 && DAYINMONTH > 1 {
            WEEKINMONTH++
        }
        DAYARR[INT(MONTH)-1][WEEKDAY][WEEKINMONTH] = THISDATE.DAY()
        LASTMONTH = MONTH
        DAYINMONTH++
        THISDATE = THISDATE.ADD(TIME.HOUR * 24)
    }
    CENTRE := FMT.SPRINTF("%D", PAGEWIDTH/2)
    FMT.PRINTF("%"+CENTRE+"S\N\N", "[SNOOPY]")
    CENTRE = FMT.SPRINTF("%D", PAGEWIDTH/2-2)
    FMT.PRINTF("%"+CENTRE+"D\N\N", YEAR)
    MONTHS := [12]STRING{
        " JANUARY ", " FEBRUARY", "  MARCH  ", "  APRIL  ",
        "   MAY   ", "   JUNE  ", "   JULY  ", "  AUGUST ",
        "SEPTEMBER", " OCTOBER ", " NOVEMBER", " DECEMBER"}
    DAYS := [7]STRING{"SU", "MO", "TU", "WE", "TH", "FR", "SA"}
    FOR QTR := 0; QTR < 4; QTR++ {
        FOR MONTHINQTR := 0; MONTHINQTR < 3; MONTHINQTR++ { // MONTH NAMES
            FMT.PRINTF("      %S           ", MONTHS[QTR*3+MONTHINQTR])
        }
        FMT.PRINTLN()
        FOR MONTHINQTR := 0; MONTHINQTR < 3; MONTHINQTR++ { // DAY NAMES
            FOR DAY := 0; DAY < 7; DAY++ {
                FMT.PRINTF(" %S", DAYS[DAY])
            }
            FMT.PRINTF("     ")
        }
        FMT.PRINTLN()
        FOR WEEKINMONTH = 0; WEEKINMONTH < 6; WEEKINMONTH++ {
            FOR MONTHINQTR := 0; MONTHINQTR < 3; MONTHINQTR++ {
                FOR DAY := 0; DAY < 7; DAY++ {
                    IF DAYARR[QTR*3+MONTHINQTR][DAY][WEEKINMONTH] == 0 {
                        FMT.PRINTF("   ")
                    } ELSE {
                        FMT.PRINTF("%3D", DAYARR[QTR*3+MONTHINQTR][DAY][WEEKINMONTH])
                    }
                }
                FMT.PRINTF("     ")
            }
            FMT.PRINTLN()
        }
        FMT.PRINTLN()
    }
}
package main

import (
    "fmt"
    "github.com/jbarham/primegen"
    "math"
    "math/big"
    "math/rand"
    "sort"
    "


  {
			DsaParameters dsaParams = param.Parameters;

			BigInteger x = GeneratePrivateKey(dsaParams.Q, param.Random);
			BigInteger y = CalculatePublicKey(dsaParams.P, dsaParams.G, x);

			return new AsymmetricCipherKeyPair(
				new DsaPublicKeyParameters(y, dsaParams),
				new DsaPrivateKeyParameters(x, dsaParams));
        }

		private static BigInteger GeneratePrivateKey(BigInteger q, SecureRandom random)
		{
			// TODO Prefer this method? (change test cases that used fixed random)
			// B.1.1 Key Pair Generation Using Extra Random Bits
//	        BigInteger c = new BigInteger(q.BitLength + 64, random);
//	        return c.Mod(q.Subtract(BigInteger.One)).Add(BigInteger.One);

			// B.1.2 Key Pair Generation by Testing Candidates
			return BigIntegers.CreateRandomInRange(BigInteger.One, q.Subtract(BigInteger.One), random);
		}

		private static BigInteger CalculatePublicKey(BigInteger p, BigInteger g, BigInteger x)
		{
			return g.ModPow(x, p);
		}
	}
}


is.whoAmI].chest = num42;
            Recipe.FindRecipes(true);
            NetMessage.TrySendData(80, -1, this.whoAmI, (NetworkText) null, this.whoAmI, (float) num42, 0.0f, 0.0f, 0, 0, 0);
            break;
          case 34:
            byte num44 = this.reader.ReadByte();
            int index15 = (int) this.reader.ReadInt16();
            int index16 = (int) this.reader.ReadInt16();
            int style1 = (int) this.reader.ReadInt16();
            int id = (int) this.reader.ReadInt16();
            if (Main.netMode == 2)
              id = 0;
            if (Main.netMode == 2)
            {
              if (num44 == (byte) 0)
              {
                int number5_1 = WorldGen.PlaceChest(index15, index16, (ushort) 21, false, style1);
                if (number5_1 == -1)
                {
                  NetMessage.TrySendData(34, this.whoAmI, -1, (NetworkText) null, (int) num44, (float) index15, (float) index16, (float) style1, number5_1, 0, 0);
                  Item.NewItem(index15 * 16, index16 * 16, 32, 32, Chest.chestItemSpawn[style1], 1, true, 0, false, false);
                  break;
                }
                NetMessage.TrySendData(34, -1, -1, (NetworkText) null, (int) num44, (float) index15, (float) index16, (float) style1, number5_1, 0, 0);
                break;
              }
              if (num44 == (byte) 1 && Main.tile[index15, index16].type == (ushort) 21)
              {
                Tile tile = Main.tile[index15, index16];
                if ((int) tile.frameX % 36 != 0)
                  --index15;
                if ((int) tile.frameY % 36 != 0)
                  --index16;
                int chest2 = Chest.FindChest(index15, index16);
                WorldGen.KillTile(index15, index16, false, false, false);
                if (tile.active())
                  break;
                NetMessage.TrySendData(34, -1, -1, (NetworkText) null, (int) num44, (float) index15, (float) index16, 0.0f, chest2, 0, 0);
                break;
              }
              if (num44 == (byte) 2)
              {
                int number5_1 = WorldGen.PlaceChest(index15, index16, (ushort) 88, false, style1);
                if (number5_1 == -1)
                {
                  NetMessage.TrySendData(34, this.whoAmI, -1, (NetworkText) null, (int) num44, (float) index15, (float) index16, (float) style1, number5_1, 0, 0);
                  Item.NewItem(index15 * 16, index16 * 16, 32, 32, Chest.dresserItemSpawn[style1], 1, true, 0, false, false);
                  break;
                }
                NetMessage.TrySendData(34, -1, -1, (NetworkText) null, (int) num44, (float) index15, (float) index16, (float) style1, number5_1, 0, 0);
                break;
              }
              if (num44 == (byte) 3 && Main.tile[index15, index16].type == (ushort) 88)
              {
                Tile tile = Main.tile[index15, index16];
                int num2 = index15 - (int) tile.frameX % 54 / 18;
                if ((int) tile.frameY % 36 != 0)
                  --index16;
                int chest2 = Chest.FindChest(num2, index16);
                WorldGen.KillTile(num2, index16, false, false, false);
                if (tile.active())


image.pornhub.phncdn.com/m=ecuK8daaaa/videos/201208/19/5343299/original/2.jpg"
				data-mediabook="http://i1.cdn2a.image.pornhub.phncdn.com/m=KbTbhnaqap0YhZGLyzWa/videos/201208/19/5343299/vl_240P_288.0k_5343299.mp4"
				class="js-videoThumb js-videoThumbFlip thumb"
				width="150"

			 class="rotating" id="70007004575343299"data-video-id="5343299" data-prefix-id="70007004575343299" data-thumbs="16" data-path="http://i1.cdn2a.image.pornhub.phncdn.com/m=eWdT8daaaa/videos/201208/19/5343299/original/{index}.jpg" data-end="70007004575343299"			title="Contessa Vivalia Black Azz Redbones Scene 4" />

				<button type="button" data-title="Add to a Playlist" class="tooltipTrig open-playlist-link playlist-trigger" onclick="return false;" data-rel="480154487" >+</button>

																		Contessa Vivalia Black Azz Redbones Scene 4

				<var>700,336</var> views

76%

								<var class="added">1 year ago</var>

					+More Videos

						Recommended Category For You						 - Hentai

				<var class="duration">18:24</var>

						<img
				src="http://cdn1b.static.pornhub.phncdn.com/www-static/images/blank.gif"
				alt="Employees Fucked By The Boss"
				data-smallthumb="http://i1.cdn2b.image.pornhub.phncdn.com/m=ePZG8daaaa/v


 guard against the unlikely case of an infinite value...
        if result.is_infinite() || result.is_nan() {
            result = 0.0;
        }

        Self(result.abs())
    }
}

impl From<f32> for DecimalFloatingPoint {
    fn from(value: f32) -> Self { f64::from(value).into() }
}

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

    macro_rules! test_from {
        ( $($input:expr),* ) => {
            use ::core::convert::From;

            #[test]
            fn test_from() {
                $(
                    assert_eq!(
                        DecimalFloatingPoint::from($input),
                        DecimalFloatingPoint::new(1.0).unwrap(),
                    );
                )*
            }
        }
    }

    test_from![1_u8, 1_u16, 1_u32, 1.0_f32, -1.0_f32, 1.0_f64, -1.0_f64];

    #[test]
    pub fn test_display() {
        let decimal_floating_point = DecimalFloatingPoint::new(22.0).unwrap();
        assert_eq!(decimal_floating_point.to_string(), "22".to_string());

        let decimal_floating_point = DecimalFloatingPoint::new(4.1).unwrap();
        assert_eq!(decimal_floating_point.to_string(), "4.1".to_string());
    }

    #[test]
    pub fn test_parser() {
        let decimal_floating_point = DecimalFloatingPoint::new(22.0).unwrap();
        assert_eq!(
            decimal_floating_point,
            "22".parse::<DecimalFloatingPoint>().unwrap()
        );

        let decimal_floating_point = DecimalFloatingPoint::new(4.1).unwrap();
        assert_eq!(
            decimal_floating_point,
            "4.1".parse::<DecimalFloatingPoint>().unwrap()
        );

        assert!("1#".parse::<DecimalFloatingPoint>().is_err());
        assert!("-1.0".parse::<DecimalFloatingPoint>().is_err());
    }

    #[test]
    fn test_new() {
        assert!(DecimalFloatingPoint::new(::std::f64::INFINITY).is_err());
        assert!(DecimalFloatingPoint::new(-1.0).is_err());
    }

    #[test]
    fn test_as_f64() {
        assert_eq!(DecimalFloatingPoint::new(1.0).unwrap().as_f64(), 1.0);
    }

    #[test]
    fn test_from_inf() {
        assert_eq!(
            DecimalFloatingPoint::from(::std::f64::INFINITY),
            DecimalFloatingPoint::new(0.0).unwrap()
        );
    }

    #[test]
    fn test_deref() {
        assert_eq!(DecimalFloatingPoint::from(0.1).floor(), 0.0);
    }
}
#[doc = "Register `CTRL1` reader"]
pub struct R(crate::R<CTRL1_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<CTRL1_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<CTRL1_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::


#ifndef HGL_GUI_PROGRESS_BAR_INCLUDE
#define HGL_GUI_PROGRESS_BAR_INCLUDE

#include<hgl/type/Color4f.h>
#include<hgl/gui/GuiObject.h>
#include<hgl/VectorMath.h>
namespace hgl
{
    namespace graph
    {
        class Renderable;
        class Material;

        namespace gui
        {
            /**
            * 进度条控件
            */
            class ProgressBar:public GUIObject
            {
            protected:

                Matrix4f edge_mat;
                Matrix4f bar_mat;

            protected:

                int min_value,max_value;
                int progress;

                bool refresh_matrix;

                void InitPrivate();

                void SetViewScope(const RectScope2i &rs){GUIObject::SetViewScope(rs);refresh_matrix=true;}

            protected:

                virtual bool Proc_MouseButton(int,bool);

            public: //属性

                Color4f BackColor;                                                                      ///<底色
                Color4f ProgressBarColor;                                                               ///<进度条色

            public: //事件

                DefEvent(void,OnProgressClick,(ProgressBar *,int));                                     ///<点击事件

            public:

                ProgressBar();
                ProgressBar(int,int,int,int,int=0,int=99,int=0);
                virtual ~ProgressBar();

                void Draw(const Matrix4f *);

                int GetMinValue()const{return min_value;}
                int GetMaxValue()const{return max_value;}
                int GetProgress()const{return progress;}

                void SetMinValue(int);
                void SetMaxValue(int);
                void SetProgress(int);
            };//class ProgressBar
        }//namespace gui
    }//namespace graph
}//namespace hgl
#endif//HGL_GUI_PROGRESS_BAR_INCLUDE


-xl-17-24{width:70.8333%}.pure-u-xl-18-24,.pure-u-xl-3-4{width:75%}.pure-u-xl-19-24{width:79.1667%}.pure-u-xl-4-5{width:80%}.pure-u-xl-20-24,.pure-u-xl-5-6{width:83.3333%}.pure-u-xl-21-24,.pure-u-xl-7-8{width:87.5%}.pure-u-xl-11-12,.pure-u-xl-22-24{width:91.6667%}.pure-u-xl-23-24{width:95.8333%}.pure-u-xl-1,.pure-u-xl-1-1,.pure-u-xl-24-24,.pure-u-xl-5-5{width:100%}}/*! Editor.md v1.5.0 | editormd.min.css | Open source online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-06-09 */
@charset "UTF-8";/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */.fa-ul,.markdown-body .task-list-item,li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}.editormd-form br,.markdown-body hr:after{clear:both}.editormd{width:90%;height:640px;margin:0 auto 15px;text-align:left;overflow:hidden;position:relative;border:1px solid #ddd;font-family:"Meiryo UI","Microsoft YaHei","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif}.editormd *,.editormd :after,.editormd :before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.editormd a{text-decoration:none}.editormd img{border:none;vertical-align:middle}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea,.editormd>textarea{width:0;height:0;outline:0;resize:none}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea{display:none}.editormd button,.editormd input[type=text],.editormd input[type=button],.editormd input[type=submit],.editormd select,.editormd textarea{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none}.editormd ::-webkit-scrollbar{height:10px;width:7px;background:rgba(0,0,0,.1)}.editormd ::-webkit-scrollbar:hover{background:rgba(0,0,0,.2)}.editormd ::-webkit-scrollbar-thumb{background:rgba(0,0,0,.3);-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;border-radius:6px}.editormd ::-webkit-scrollbar-thumb:hover{-webkit-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-moz-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-ms-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-o-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);background-color:rgba(0,0


## 声明

本作品采用 署名-非商业性使用-禁止演绎 4.0 国际 进行许可。
#  .NET WebShell 绕过 EDR 监控，不调用 cmd.exe 也能实现命令执行
专攻.NET安全的  dotNet安全矩阵   2025-05-23 00:30

![图片](https://mmbiz.qpic.cn/mmbiz_gif/NO8Q9ApS1YibJO9SDRBvE01T4A1oYJXlTBTMvb7KbAf7z9hY3VQUeayWI61XqQ0ricUQ8G1FykKHBNwCqpV792qg/640?wx_fmt=gif&from=appmsg&wxfrom=5&wx_lazy=1&tp=webp "")

在红队渗透环境中，
攻防对抗的深度不断升级，安全厂商纷纷将注意力从传统病毒特征识别，转向对行为链的监控和阻断。
红队常用的 cmd.exe
 指令执行方式在越来越多的场景中被标记为高危操作。即便你伪装得再好，只要触发了这一调用链，如EDR、HIDS就可能进行阻断、弹窗、甚至自动封禁进程。

WebShell
 场景下，系统命令执行成为重点监控对象，w3wp.exe
 进程直接调用 cmd.exe
、powershell.exe
、regsvr32.exe
 等系统工具，几乎都逃不过终端检测与告警。

**01. 工具基本介绍**

Sharp4WebCmd
 是一款用 .NET 编写的 不依赖 cmd.exe 的 Web 指令执行工具
。本质上是一个 .aspx
 页面，但其内部并不调用传统的 cmd.exe
 进行命令执行，而是**通过底层 Windows API 函数自行实现命令解释、创建子进程、重定向输出等核心功能**
。

![](https://mmbiz.qpic.cn/mmbiz_jpg/NO8Q9ApS1Y8rowxwfhPPkrny0DyicicyZpvia7B5yOIdWaaJYIa3X2OCxyf1eLibjp8VBZorlhNfQLh48IU42pBosw/640?wx_fmt=jpeg&from=appmsg "")

这种方式从行为上规避了 cmd.exe
 的调用路径，使得工具在某些 EDR 环境中具有极强的低特征执行能力，适合部署于目标服务器的 IIS 环境中，以实现更加隐蔽的命令控制。

**02. 工具实战用法**

其核心绕过点在于：让防护软件看不到cmd.exe，而又能完成相同的执行任务。
## 2.1 核心原理

传统 WebShell 调用命令的方式通常如下，
该调用路径非常直接，因此在行为树中极易被安全软件识别：

```
Process.Start("cmd.exe","/c whoami");
```

Sharp4WebCmd 的策略是：利用 Windows 等底层 API 自行构造执行环境；实现类似 cmd 的参数解析与子进程管理；避免创建 cmd.exe 进程，直接执行系�


, out long totalBytesRead)
		{
			totalBytesRead = 0;
			const int BytesToRead = 4096;
			byte[] buf = new byte[BytesToRead];
			int bytesReadThisTime = 0;
			do
			{
				bytesReadThisTime = input.Read(buf, 0, BytesToRead);
				totalBytesRead += bytesReadThisTime;
				output.Write(buf, 0, bytesReadThisTime);
			} while (bytesReadThisTime != 0);
			return output;
		}

		/// <summary>
		/// Read stream into a new MemoryStream. Useful for chaining together expressions.
		/// </summary>
		/// <param name="input">Stream to read from.</param>
		/// <returns>memory stream that contains the stream contents.</returns>
		public static MemoryStream ReadIntoMemoryStream(this Stream input)
		{
			MemoryStream data = new MemoryStream(4096);
			data.ReadFrom(input);
			return data;
		}

		/// <summary>
		/// Writes the entire contents of a byte array to the stream.
		/// </summary>
		/// <param name="stream"></param>
		/// <param name="arr"></param>
		/// <returns></returns>
		public static Stream Write(this Stream stream, byte[] arr)
		{
			stream.Write(arr, 0, arr.Length);
			return stream;
		}
	}
}


 the price property
   * @param {IProduct[]} products
   * @returns {IProductp}
   */
  private _sortByHighestPrice(products: IProduct[]): IProduct[] {
    return [...products].sort((a: any, b: any) =>  <any>(a.price === null) - <any>(b.price === null) || parseFloat(b.price) - parseFloat(a.price));
  };

  private _getTime(date: Date) {
    let dateInstance = new Date(date)
    return dateInstance != null ? dateInstance.getTime() : 0;
  }

  /**
   * utility function for sorting products by date
   * @param {IProduct[] }products
   * @returns {IProduct[]}
   */
  private _sortByDate(products: IProduct[]): IProduct[] {
    let sorted =  [...products].sort((a: any, b: any) => {
      return this._getTime(a.created_at) - this._getTime(b.created_at);
    });
    return sorted;
  }

  /**
   * utility function for forming url for caching or retrieving observables from the cache
   * @param {string} url
   * @param {any} params
   * @returns {string}
   */
  private _formUrl(url: string, params: any): string {
    return params  ? `${url}?${params.toString()}`: `${url}?`;
  }

  /**
   * return side nav filters observable for controlling side nav filter
   * @returns {Observable<boolean>}
   */
  public getFiltersSideNavSubject(): Observable<boolean> {
    return this._filterSideNavSubject.asObservable();
  }

  /**
   * updates sideNav filters observable
   * @param {boolean} isFilterSideNavOpened
   * @returns {void}
   */
  public setFilterSideNavOpened(isFilterSideNavOpened: boolean): void {
    this._filterSideNavSubject.next(isFilterSideNavOpened);
  }
}
document.body.innerHTML += "HELLO";

interface App {
    name: string;
    volume: number;
}

var evtSource = new EventSource("/events");

evtSource.addEventListener("vol_update", function(e) {
        decode_payload(e).forEach(function(element){
                console.log(element);
                update_vol(element);
            });
    }, false);

function decode_payload(stin: string): App[]
{
    return JSON.parse(stin.data) as App[];
}

function update_vol(info: App)
{
    let volDiv  = document.getElementById('volume-container');
    let volBoxes = volDiv.children;
    for(let i = 0; i < volBoxes.length; i++)
    {
        let box = volBoxes[i];
        if(box.id == info.name)
        {
            set_volume(box, info.volume);
            return;
        }
    }
    console.log(info.name + " not found. Creating...");
    create_div(info);
}

function set_volume(volBox, volume: number)
{
    $("#slider" + volBox.id).slider("setValue", volume);
    //console.log("ID:" + volBox.id)
    //console.log("#slider" + volBox.id);
    //console.log($("#slider" + volBox.id).slider);
}

function create_div(info: App)
{
    let volDiv  = document.getElementById('volume-container');
    let sliderElement = make_slider(info);
    let sliderDiv = document.createElement("div");
    sliderDiv.id = info.name;
    sliderDiv.appendChild(sliderElement);
    volDiv.appendChild(sliderDiv);

    $("#" + sliderElement.id).slider({
        reversed : true
    });

    $("#" + sliderElement.id).slider('setValue', String(info.volume));

    $("#" + sliderElement.id).slider().on("change", slider_slid);
}

function slider_slid(ev)
{
    console.log(ev.target.id + " " + ev.target.value);
    $.post("setVol", {name: ev.target.id, number: e


(years: Years, months: Months = 0.months, days: Days = 0.days): Period {
    return Period.create(years, months, days)
}

/**
 * Creates a [Period].
 */
fun periodOf(years: Years, days: Days): Period = Period.create(years = years, days = days)

/**
 * Creates a [Period].
 */
fun periodOf(months: Months, days: Days = 0.days): Period = Period.create(months = months, days = days)

/**
 * Creates a [Period].
 * @throws ArithmeticException if overflow occurs
 */
fun periodOf(weeks: Weeks): Period = Period.create(days = weeks.inDays)

/**
 * Creates a [Period].
 */
fun periodOf(days: Days): Period = Period.create(days = days)

/**
 * Converts this duration into a [Period] with the same number of years.
 */
fun Years.asPeriod(): Period = Period.create(years = this)

/**
 * Converts this duration into a [Period] with the same number of months.
 */
fun Months.asPeriod(): Period = Period.create(months = this)

/**
 * Converts this duration into a [Period] with the same number of weeks.
 * @throws ArithmeticException if the resulting [Period] would overflow
 */
fun Weeks.asPeriod(): Period = Period.create(days = this.inDays)

/**
 * Converts this duration into a [Period] with the same number of days.
 */
fun Days.asPeriod(): Period = Period.create(days = this)

operator fun Years.plus(period: Period): Period = period.copy(years = this + period.years)
operator fun Months.plus(period: Period): Period = period.copy(months = this + period.months)
operator fun Weeks.plus(period: Period): Period = this.inDays + period
operator fun Days.plus(period: Period): Period = period.copy(days = this + period.days)

operator fun Years.minus(period: Period): Period = Period.create(
    this - period.years,
    -period.months,
    -period.days
)

operator fun Months.minus(period: Period): Period = Period.create(
    -period.years,
    this - period.months,
    -period.days
)

operator fun Weeks.minus(period: Period): Period = this.inDays - period

operator fun Days.minus(period: Period): Period = Period.create(
    -period.years,
    -period.months,
    this - period.days
)

operator fun Int.times(period: Period): Period = period * this
operator fun Long.times(period: Period): Period = period * this

fun String.toPeriod(): Period = toPeriod(DateTimeParsers.Iso.PERIOD)

fun String.toPeriod(
    parser: DateTimeParser,
    settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT
): Period {
    val result = parser.parse(this, settings)
    return result.toPeriod() ?: throwParserFieldResolutionException<Period>(this)
}

internal fun DateTimeParseResult.toPeriod(): Period? {
    val sign = fields[DateTimeField.PERIOD_SIGN]?.toInt() ?: 1
    val yearsValue = fields[DateTimeField.PERIOD_OF_YEARS]
    val monthsValue = fields[DateTimeField.PERIOD_OF_MONTHS]
    val weeksValue = fields[DateTimeField.PERIOD_OF_WEEKS]
    val daysValue = fields[DateTimeField.PERIOD_OF_DAYS]

    // Make sure we got at least one supported field out of the parser
    return if (yearsValue == null && monthsValue == null && weeksValue == null && daysValue == null) {
        null
    } else {
        val years = yearsValue?.timesExact(sign)?.years ?: 0.years
        val months = monthsValue?.timesExact(sign)?.months ?: 0


require "gestionDate.lua"
require "gestionDebug.lua"

local boxImgDay, boxImgWeek, boxImgMonth, boxImgParametre, boxImgAdd
local menu
local currentMode
local winDay, winWeek, winMonth, winNewEvent, winConfig
local oldWin

local affichageTop = 60

-- Parametrage du calendrier
local config = {}

-- liste d'event du calendrier
local PATH_DATA = "/data"
local data = {}

-- ---------------------------------------
-- FONCTIONS DU CALENDRIER
-- ---------------------------------------

-- Lancement de l'appication
function run()

    -- récupération de la date courante
    local today = getToday()
    year  = today[1]
    month = today[2]
    day   = today[3]

    -- chargement de la config de l'application
    loadConfig()

    -- lancement de la vue par défaut de l'application
    if (config.defaultView == "day") then
        displayDay (year, month, day)
    elseif config.defaultView == "week" then
        displayWeek(year, month, day)
    else
        displayMonth(year, month)
    end
end -- run

-- chargement du fichier de configuration de l'application
function loadConfig()

    -- A remplacer par une lecture du fichier JSON
    -- Gererles erreurs Json et les valeurs par défaut
    local strFilename ="config.json"
    local fileConfig = storage:file (strFilename, READ)
    local configStr

    if fileConfig and storage:isFile(strFilename) then
        fileConfig:open()
        configStr = fileConfig:readAll()
        fileConfig:close()
        fileConfig = nil
    else
            configStr = '{"defaultView":"day","displayBusinessWeek":false,"displayWeekNum":false,"day":{"heureDebut":8, "heureFin":17}}'
        end
    local json_obj = Json:new(configStr)

    if json_obj:has_key("defaultView") then
        config.defaultView = json_obj:get_string("defaultView")
    else
        config.defaultView = "day"
    end

    if json_obj:has_key("displayBusinessWeek") then
        config.displayBusinessWeek = json_obj:get_bool("displayBusinessWeek")
    else
        config.displayBusinessWeek = false
    end

    if json_obj:has_key("displayWeekNum") then
        config.displayWeekNum = json_obj:get_bool("displayWeekNum")
    else
        config.displayWeekNum = true
    end

    config.day = {}
    if (json_obj:has_key("day") and json_obj["day"]:has_key("heureDebut")) then
        config.day.heureDebut = json_obj["day"]:get_int("heureDebut")
    else
        config.day.heureDebut = 8
    end

    if (json_obj:has_key("day") and json_obj["day"]:has_key("heureFin")) then
            config.day.heureFin = json_obj["day"]:get_int("heureFin")
    else
        config.day.heureFin = 17
    end

    --debugPrint(config)

end

-- ---------------------------------------
-- AFFICHAGE ECRAN CONFIG
-- ----------------------

function displayConfig()

--    winConfig = gui:window()
  --  gui:setWindow (winConfig)
  print("displayConfig")

  winConfig = manageWindow()

    print("on a notre wonConfig")
    print(winConfig)
    local title=gui:label(winConfig, 50, 28, 144, 28)
    print("Affichage label OK")


Layer = expectedStrongLayers[index];
    List<List<String>> strongLayer = strongTopologicalResult.layers[index];
    Expect.equals(
        expectedStrongLayer.length,
        strongLayer.length,
        "Unexpected strong topological layer $index count. "
        "Expected ${expectedStrongLayers}, "
        "actual ${strongTopologicalResult.layers}");

    for (int subIndex = 0; subIndex < expectedStrongLayer.length; subIndex++) {
      Expect.listEquals(
          expectedStrongLayer[subIndex],
          strongLayer[subIndex],
          "Unexpected strong topological layer $index. "
          "Expected $expectedStrongLayer, "
          "actual $strongLayer.");
    }
    for (List<String> vertex in strongTopologicalResult.layers[index]) {
      int actualIndex = strongTopologicalResult.indexMap[vertex]!;
      Expect.equals(
          index,
          actualIndex,
          "Unexpected strong topological index for $vertex. "
          "Expected $index, found $actualIndex.");
    }
  }
}

void main() {
  test(graphData: {
    A: [B],
    B: [A],
    C: [A],
    D: [C],
  }, expectedStrongComponents: [
    [B, A],
    [C],
    [D]
  ], expectedCyclicVertices: [
    B,
    A,
    C,
    D
  ], expectedStrongLayers: [
    [
      [B, A]
    ],
    [
      [C]
    ],
    [
      [D]
    ]
  ]);

  test(graphData: {}, expectedStrongComponents: []);

  test(graphData: {
    A: [],
    B: [],
    C: [],
    D: [],
  }, expectedStrongComponents: [
    [A],
    [B],
    [C],
    [D]
  ], expectedSortedVertices: [
    A,
    B,
    C,
    D
  ], expectedLayers: [
    [A, B, C, D]
  ], expectedStrongLayers: [
    [
      [A],
      [B],
      [C],
      [D]
    ]
  ]);

  test(graphData: {
    D: [C],
    C: [A],
    B: [A],
    A: [B],
  }, expectedStrongComponents: [
    [B, A],
    [C],
    [D]
  ], expectedCyclicVertices: [
    B,
    A,
    C,
    D
  ], expectedStrongLayers: [
    [
      [B, A]
    ],
    [
      [C]
    ],
    [
      [D]
    ]
  ]);

  test(graphData: {
    A: [B],
    B: [C],
    C: [D],
    D: [],
  }, expectedStrongComponents: [
    [D],
    [C],
    [B],
    [A]
  ], expectedSortedVertices: [
    D,
    C,
    B,
    A
  ], expectedLayers: [
    [D],
    [C],
    [B],
    [A]
  ], expectedStrongLayers: [
    [
      [D]
    ],
    [
      [C]
    ],
    [
      [B]
    ],
    [
      [A]
    ]
  ]);

  test(graphData: {
    D: [],
    C: [D],
    B: [C],
    A: [B],
  }, expectedStrongComponents: [
    [D],
    [C],
    [B],
    [A]
  ], expectedSortedVertices: [
    D,
    C,
    B,


,
			wantError: false,
		},
		{
			name:      "Mono fallback",
			variant:   FallbackMono,
			wantError: false,
		},
	}

	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			font, err := GetFallback(tt.variant)
			if (err != nil) != tt.wantError {
				t.Errorf("GetFallback() error = %v, wantError %v", err, tt.wantError)
				return
			}
			if !tt.wantError && font == nil {
				t.Error("GetFallback() returned nil font when error not expected")
			}
		})
	}
}

func TestIsFontAvailable(t *testing.T) {
	tests := []struct {
		name     string
		fontName string
		want     bool
	}{
		{
			name:     "Available font",
			fontName: "Cantarell",
			want:     true,
		},
		{
			name:     "Available font with weight",
			fontName: "Inter",
			want:     true,
		},
		{
			name:     "Unavailable font",
			fontName: "NonExistentFont",
			want:     false,
		},
	}

	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			if got := IsFontAvailable(tt.fontName); got != tt.want {
				t.Errorf("IsFontAvailable() = %v, want %v", got, tt.want)
			}
		})
	}
}

func TestGetFontVariants(t *testing.T) {
	tests := []struct {
		name      string
		fontName  string
		wantError bool
	}{
		{
			name:      "Get JetBrains variants",
			fontName:  "JetBrainsMonoNerdFont",
			wantError: false,
		},
		{
			name:      "Non-existent font variants",
			fontName:  "NonExistentFont",
			wantError: true,
		},
	}

	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			variants, err := GetFontVariants(tt.fontName)
			if (err != nil) != tt.wantError {
				t.Errorf("GetFontVariants() error = %v, wantError %v", err, tt.wantError)
				return
			}
			if !tt.wantError && len(variants) == 0 {
				t.Error("GetFontVariants() returned empty variants when some were expected")
			}
		})
	}
}

func TestListFonts(t *testing.T) {
	fonts := ListFonts()
	if len(fonts) == 0 {
		t.Error("ListFonts() returned empty list, expected at least fallback fonts")
	}

	// Check if our embedded fonts are in the list
	expectedFonts := []string{"Cantarell", "JetBrainsMonoNerdFont", "Inter"}
	for _, expected := range expectedFonts {
		found := false
		for _, font := range fonts {
			if font == expected {
				found = true
				break
			}
		}
		if !found {
			t.Errorf("ListFonts() did not include embedded font %s", expected)
		}
	}
}

func TestMonospaceDetection(t *testing.T) {
	tests := []struct {
		name     string
		fontName string
		wantMono bool
	}{
		{
			name:     "JetBrains (should be mono)",
			fontName: "JetBrainsMonoNerdFont",
			wantMono: true,
		},
		{
			name:     "Inter (should not be mono)",
			fontName: "Inter",
			wantMono: false,
		},
	}

	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			font, err := GetFont(tt.fontName, nil)
			if err != nil {
				t


from pymongo.mongo_client import MongoClient

uri = "mongodb+srv://writetoanithalidiya:<password>@cluster0.5ztpm.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0"

from pymongo.mongo_client import MongoClient
import certifi  # Import certifi for SSL certificates

# Create a new client and connect to the server with certifi certificate
client = MongoClient(uri, tlsCAFile=certifi.where())

# Send a ping to confirm a successful connection
try:
    client.admin.command("ping")
    print("Pinged your deployment. You successfully connected to MongoDB!")
except Exception as e:
    print(f"Error: {e}")


 3], 4]`
        ); // @todo: unclear what the right answer is... (and it's invalid Latex)
        expect(expression('2^{3^4}')).toMatchInlineSnapshot(
            `['Power', 2, ['Power', 3, 4]]`
        );
        expect(expression('12^34.5')).toMatchInlineSnapshot(
            `['Multiply', 4.5, ['Power', 12, 3]]`
        );
        expect(expression('x^2')).toMatchInlineSnapshot(`['Power', 'x', 2]`);
        expect(expression('x^{x+1}')).toMatchInlineSnapshot(
            `['Power', 'x', ['Add', 'x', 1]]`
        );
    });
    test('Subscript', () => {
        expect(expression('x_0')).toMatchInlineSnapshot(
            `['Subscript', 'x', 0]`
        ); // @todo: nope...
        expect(expression('x^2_0')).toMatchInlineSnapshot(
            `['Subscript', ['Power', 'x', 2], 0]`
        ); // @todo: nope...
        expect(expression('x_0^2')).toMatchInlineSnapshot(
            `['Power', ['Subscript', 'x', 0], 2]`
        ); // @todo: nope...
        expect(expression('x_{n+1}')).toMatchInlineSnapshot(
            `['Subscript', 'x', ['Add', 'n', 1]]`
        ); // @todo: nope...
        expect(expression('x_n_{+1}')).toMatchInlineSnapshot(
            `['Subscript', ['Subscript', 'x', 'n'], 1]`
        ); // @todo: nope...
    });
    test('Pre-sup, pre-sub', () => {
        expect(expression('_p^qx')).toMatchInlineSnapshot(
            `['', 'syntax-error']`
        ); // @todo: nope...
        expect(expression('_p^qx_r^s')).toMatchInlineSnapshot(
            `['', 'syntax-error']`
        ); // @todo: nope...
        expect(expression('_{p+1}^{q+1}x_{r+1}^{s+1}')).toMatchInlineSnapshot(
            `['', 'syntax-error']`
        ); // @todo: nope...
        expect(
            expression('x{}_{p+1}^{q+1}x_{r+1}^{s+1}')
        ).toMatchInlineSnapshot(`['x', 'syntax-error']`); // @todo: nope...
    });
    test('Sup/Sub groups', () => {
        expect(expression('(x+1)^{n-1}')).toMatchInlineSnapshot(
            `['Power', ['Subsequence', ['Add', 'x', 1]], ['Add', 'n', -1]]`
        );
        expect(expression('(x+1)_{n-1}')).toMatchInlineSnapshot(
            `['Subscript', ['Group', ['Subsequence', ['Add', 'x', 1]]], ['Add', 'n', -1]]`
        ); // @todo: nope...
        expect(expression('(x+1)^n_0')).toMatchInlineSnapshot(
            `['Subscript', ['Power', ['Subsequence', ['Add', 'x', 1]], 'n'], 0]`
        ); // @todo: nope...
        expect(expression('^p_q{x+1}^n_0')).toMatchInlineSnapshot(
            `['', 'expected-operand', 'syntax-error']`
        ); // @todo: nope...
        expect(expression('^{12}_{34}(x+1)^n_0')).toMatchInlineSnapshot(
            `['', 'expected-operand', 'syntax-error']`
        ); // @todo: nope...
    });
    test('Accents', () => {
        expect(expression('\\vec{x}')).toMatchInlineSnapshot(
            `['OverVector', 'x']`
        ); // @todo: nope...
        expect(expression('\\vec{AB}')).toMatchInlineSnapshot(
            `['OverVector',


) \n"
    "{\n"
    "  int tid = get_global_id(0);\n"
    "  int a;\n"
    "  dst[tid] = 1;\n"
    "  for (a=0; a<times; a++)\n"
    "    test_kernel_to_call(dst, src, tid);\n"
    "}\n"
    "void test_function_to_call(__global int *output, __global int *input, int where) \n"
    "{\n"
    "  int b;\n"
    "  if (where == 0) {\n"
    "    output[get_global_id(0)] = 0;\n"
    "  }\n"
    "  for (b=0; b<where; b++)\n"
    "    output[get_global_id(0)] += input[b];  \n"
    "}\n"
    "\n"
    "__kernel void test_call_function(__global int *src, __global int *dst, int times) \n"
    "{\n"
    "  int tid = get_global_id(0);\n"
    "  int a;\n"
    "  dst[tid] = 1;\n"
    "  for (a=0; a<times; a++)\n"
    "    test_function_to_call(dst, src, tid);\n"
    "}\n"
};

REGISTER_TEST(kernel_call_kernel_function)
{
    num_elements = 256;

    int error, errors = 0;
    clProgramWrapper program;
    clKernelWrapper kernel1, kernel2, kernel_to_call;
    clMemWrapper    streams[2];

    size_t threads[] = { static_cast<size_t>(num_elements), 1, 1 };
    cl_int *input, *output, *expected;
    cl_int times = 4;
    int pass = 0;

    input = (cl_int*)malloc(sizeof(cl_int)*num_elements);
    output = (cl_int*)malloc(sizeof(cl_int)*num_elements);
    expected = (cl_int*)malloc(sizeof(cl_int)*num_elements);

    for (int i=0; i<num_elements; i++) {
        input[i] = i;
        output[i] = i;
        expected[i] = output[i];
    }
    // Calculate the expected results
    for (int tid=0; tid<num_elements; tid++) {
        expected[tid] = 1;
        for (int a=0; a<times; a++) {
            int where = tid;
            if (where == 0)
                expected[tid] = 0;
            for (int b=0; b<where; b++) {
                expected[tid] += input[b];
            }
        }
    }

    // Test kernel calling a kernel
    log_info("Testing kernel calling kernel...\n");
    // Create the kernel
    if( create_single_kernel_helper( context, &program, &kernel1, 1, kernel_call_kernel_code, "test_call_kernel" ) != 0 )
    {
        return -1;
    }

    kernel_to_call = clCreateKernel(program, "test_kernel_to_call", &error);
    test_error(error, "clCreateKernel failed");

    /* Create some I/O streams */
    streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR,  sizeof(cl_int)*num_elements, input, &error);
    test_error( error, "clCreateBuffer failed" );
    streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR,  sizeof(cl_int)*num_elements, output, &error);
    test_error( error, "clCreateBuffer failed" );

    error = clSetKernelArg(kernel1, 0, sizeof( streams[0] ), &streams[0]);
    test_error( error, "clSetKernelArg failed" );
    error = clSetKernelArg(kernel1, 1, sizeof( streams[1] ), &streams[1]);
    test_error( error, "clSetKernelArg failed" );
    error = clSetKernelArg(kernel1, 2, sizeof( times ), &times);
    test_error( error, "clSetKernelArg failed" );

    error = clEnqueu


""audio_channels"": ""6.1"",
                    ""3d"": false
                  }
                },
                {
                  ""collected_at"": ""2014-09-01T09:10:11.000Z"",
                  ""movie"": {
                    ""title"": ""Star Wars: The Force Awakens"",
                    ""year"": 2015,
                    ""ids"": {
                      ""trakt"": 94024,
                      ""slug"": ""star-wars-the-force-awakens-2015"",
                      ""imdb"": ""tt2488496"",
                      ""tmdb"": 140607
                    }
                  },
                  ""metadata"": {
                    ""media_type"": ""bluray"",
                    ""resolution"": ""hd_1080p"",
                    ""audio"": ""dts"",
                    ""audio_channels"": ""6.1"",
                    ""3d"": false
                  }
                }
              ]";

        private const string JSON_NOT_VALID_3 =
            @"[
                {
                  ""ca"": ""2014-09-01T09:10:11.000Z"",
                  ""movie"": {
                    ""title"": ""Star Wars: The Force Awakens"",
                    ""year"": 2015,
                    ""ids"": {
                      ""trakt"": 94024,
                      "


_name,
					     CGEN_ENDIAN_BIG);
    for (i = 0; i < MAX_NR_PROCESSORS; ++i)
      {
	SIM_CPU *cpu = STATE_CPU (sd, i);
	CPU_CPU_DESC (cpu) = cd;
	CPU_DISASSEMBLER (cpu) = sim_cgen_disassemble_insn;
      }
    m32r_cgen_init_dis (cd);
  }

  /* Initialize various cgen things not done by common framework.
     Must be done after m32r_cgen_cpu_open.  */
  cgen_init (sd);

  for (c = 0; c < MAX_NR_PROCESSORS; ++c)
    {
      /* Only needed for profiling, but the structure member is small.  */
      memset (CPU_M32R_MISC_PROFILE (STATE_CPU (sd, i)), 0,
	      sizeof (* CPU_M32R_MISC_PROFILE (STATE_CPU (sd, i))));
      /* Hook in callback for reporting these stats */
      PROFILE_INFO_CPU_CALLBACK (CPU_PROFILE_DATA (STATE_CPU (sd, i)))
	= print_m32r_misc_cpu;
    }

  /* Store in a global so things like sparc32_dump_regs can be invoked
     from the gdb command line.  */
  current_state = sd;

  return sd;
}

void
sim_close (sd, quitting)
     SIM_DESC sd;
     int quitting;
{
  m32r_cgen_cpu_close (CPU_CPU_DESC (STATE_CPU (sd, 0)));
  sim_module_uninstall (sd);
}

SIM_RC
sim_create_inferior (sd, abfd, argv, envp)
     SIM_DESC sd;
     struct _bfd *abfd;
     char **argv;
     char **envp;
{
  SIM_CPU *current_cpu = STATE_CPU (sd, 0);
  SIM_ADDR addr;

  if (abfd != NULL)
    addr = bfd_get_start_address (abfd);
  else
    addr = 0;
  sim_pc_set (current_cpu, addr);

#if 0
  STATE_ARGV (sd) = sim_copy_argv (argv);
  STATE_ENVP (sd) = sim_copy_argv (envp);
#endif

  return SIM_RC_OK;
}

/* PROFILE_CPU_CALLBACK */

static void
print_m32r_misc_cpu (SIM_CPU *cpu, int verbose)
{
  SIM_DESC sd = CPU_STATE (cpu);
  char buf[20];

  if (CPU_PROFILE_FLAGS (cpu) [PROFILE_INSN_IDX])
    {
      sim_io_printf (sd, "Miscellaneous Statistics\n\n");
      sim_io_printf (sd, "  %-*s %s\n\n",
		     PROFILE_LABEL_WIDTH, "Fill nops:",
		     sim_add_commas (buf, sizeof (buf),
				     CPU_M32R_MISC_PROFILE (cpu)->fillnop_count));
      if (STATE_ARCHITECTURE (sd)->mach == bfd_mach_m32rx)
	sim_io_printf (sd, "  %-*s %s\n\n",
		       PROFILE_LABEL_WIDTH, "Parallel insns:",
		       sim_add_commas (buf, sizeof (buf),
				       CPU_M32R_MISC_PROFILE (cpu)->parallel_count));
    }
}

void
sim_do_command (sd, cmd)
     SIM_DESC sd;
     char *cmd;
{
  char **argv;

  if (cmd == NULL)
    return;

  argv = buildargv (cmd);

  if (argv[0] != NULL
      && strcasecmp (argv[0], "info") == 0
      && argv[1] != NULL
      && strncasecmp (argv[1], "reg", 3) == 0)
    {
      SI val;

      /* We only support printing bbpsw,bbpc here as there is no equivalent
	 functionality in gdb.  */
      if (argv[2] == NULL)
	sim_io_eprintf (sd, "Missing register in `%s'\n", cmd);
      else if (argv[3] != NULL)
	sim_io_eprintf (sd, "Too many arguments in `%s'\n", cmd);
      else if (strcasecmp (argv[2], "bbpsw") == 0)
	{
	  val = a_m32r_h_cr_get (STATE_CPU (sd, 0), H_CR_BBPSW);
	  sim_io_printf (sd, "bbpsw 0x%x %d\n", val, val);
	}
      else if (strcasecmp (argv[2], "bbpc") == 0)
	{
	  val = a_m32r_h_cr_get (STATE_CPU (sd, 0), H_CR_BBPC);
	  sim_io_printf (sd, "bbpc 0x%x %d\n", val, val);
	}
      else
	sim_io_eprintf (sd, "Printing of register `%s' not supported with `sim info'\n",
			argv[2]);
    }
  else
    {
      if (sim_args_command (sd, cmd) != SIM_RC_OK)
	sim_io_eprintf (sd, "Unknown sim command `%s'\n", cmd);
    }

  freeargv (argv);
}


import requests

base_url = 'https://new.hypatiacatalog.com/hypatia/api/planets/'

all_params = ['pl_mass', 'pl_radius']

def get_planet_data(pl_mass_min: float = None, pl_mass_max: float = None,
                    pl_radius_min: float = None, pl_radius_max: float = None):
    params = {}
    for param in all_params:
        value = locals()[param + '_min']
        if value is not None:
            params[param + '_min'] = value
        value = locals()[param + '_max']
        if value is not None:
            params[param + '_max'] = value
    response = requests.get(base_url, params=params)
    return response.json()

if __name__ == '__main__':
    planet_data = get_planet_data(pl_mass_min=0.3, pl_mass_max=2.0, pl_radius_min=0.5, pl_radius_max=2.0)
    for planet in planet_data:
        simbad_name = planet['_id']
        nea_name = planet['nea_name']
        planets_list = planet['planets_list']
        print(f"Star {simbad_name} (NEA name: {nea_name}) has {len(planets_list)} planets")
        for planet in planets_list:
            planet_letter = planet['letter']
            planet_mass = planet['pl_mass']
            planet_radius = planet['pl_radius']
            print(f"  Planet {planet_letter} has mass {planet_mass} and radius {planet_radius}")


TNESS FOR A PARTICULAR PURPOSE
  ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/*jslint bitwise:true plusplus:true */
/*global esprima:true, define:true, exports:true, window: true,
throwError: true, createLiteral: true, generateStatement: true,
parseAssignmentExpression: true, parseBlock: true, parseExpression: true,
parseFunctionDeclaration: true, parseFunctionExpression: true,
parseFunctionSourceElements: true, parseVariableIdentifier: true,
parseLeftHandSideExpression: true,
parseStatement: true, parseSourceElement: true */

(function (root, factory) {
    'use strict';

    // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js,
    // Rhino, and plain browser loading.
    if (typeof define === 'function' && define.amd) {
        define(['exports'], factory);
    } else if (typeof exports !== 'undefined') {
        factory(exports);
    } else {
        factory((root.esprima = {}));
    }
}(this, function (exports) {
    'use strict';

    var Token,
        TokenName,
        Syntax,
        PropertyKind,
        Messages,
        Regex,
        source,
        strict,
        index,
        lineNumber,
        lineStart,
        length,
        buffer,
        state,
        extra;

    Token = {
        BooleanLiteral: 1,
        EOF: 2,
        Identifier: 3,
        Keyword: 4,
        NullLiteral: 5,
        NumericLiteral: 6,
        Punctuator: 7,
        StringLiteral: 8
    };

    TokenName = {};
    TokenName[Token.BooleanLiteral] = 'Boolean';
    TokenName[Token.EOF] = '<end>';
    TokenName[Token.Identifier] = 'Identifier';
    TokenName[Token.Keyword] = 'Keyword';
    TokenName[Token.NullLiteral] = 'Null';
    TokenName[Token.NumericLiteral] = 'Numeric';
    TokenName[Token.Punctuator] = 'Punctuator';
    TokenName[Token.StringLiteral] = 'String';

    Syntax = {
        AssignmentExpression: 'AssignmentExpression',
        ArrayExpression: 'ArrayExpression',
        BlockStatement: 'BlockStatement',
        BinaryExpression: 'BinaryExpression',
        BreakStatement: 'BreakStatement',
        CallExpression: 'CallExpression',
        CatchClause: 'CatchClause',
        ConditionalExpression: 'ConditionalExpression',
        ContinueStatement: 'ContinueStatement',
        DoWhileStatement: 'DoWhileStatement',
        DebuggerStatement: 'DebuggerStatement',
        EmptyStatement: 'EmptyStatement',
        ExpressionStatement: 'ExpressionStatement',
        ForStatement: 'ForStatement',
        ForInStatement: 'ForInStatement',
        FunctionDeclaration: 'FunctionDeclaration',
        FunctionExpression: 'FunctionExpression',
        Identifier: 'Identifier',
        IfStatement: 'IfStatement',
        Literal: 'Literal',
        LabeledStatement: 'LabeledStatement',
        LogicalExpression: 'LogicalExpression',
        MemberExpression: 'MemberExpression',
        NewExpression: 'NewExpression',
        ObjectExpression: 'ObjectExpression',
        Program: 'Program',
        Property: 'Property',
        ReturnStatement: 'ReturnStatement',
        SequenceExpression: 'SequenceExpression',
        SwitchStatement: 'SwitchStatement',
        SwitchCase: 'SwitchCase',
        ThisExpression: 'ThisExpression',


				Authority:        authority,
				StartBlockHeight: 100000,
				EndBlockHeight:   120000,
			},
			err: sdkerrors.ErrKeyNotFound,
		},
	} {
		t.Run(tc.desc, func(t *testing.T) {
			k, ctx := keepertest.TokenomicsKeeper(t)
			srv := keeper.NewMsgServerImpl(*k)

			_, err := srv.CreateTimeBasedInflation(ctx, &types.MsgCreateTimeBasedInflation{
				Description:      "Test create time based inflation",
				Authority:        authority,
				StartBlockHeight: 10,
				EndBlockHeight:   100,
				Inflation: &types.InflationEntry{
					LmRewards:         10,
					IcsStakingRewards: 10,
					CommunityFund:     10,
					StrategicReserve:  10,
					TeamTokensVested:  10,
				},
			})
			require.NoError(t, err)
			_, err = srv.DeleteTimeBasedInflation(ctx, tc.request)
			if tc.err != nil {
				require.ErrorContains(t, err, tc.err.Error())
			} else {
				require.NoError(t, err)
				_, found := k.GetTimeBasedInflation(ctx,
					tc.request.StartBlockHeight,
					tc.request.EndBlockHeight,
				)
				require.False(t, found)
			}
		})
	}
}
package types

import (
	"testing"

	sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
	"github.com/elys-network/elys/v7/testutil/sample"
	"github.com/stretchr/testify/require"
)

func TestMsgSetPriceFeeder_ValidateBasic(t *testing.T) {
	tests := []struct {
		name string
		msg  MsgSetPriceFeeder
		err  error
	}{
		{
			name: "invalid address",
			msg: MsgSetPriceFeeder{
				Feeder: "invalid_address",
			},
			err: sdkerrors.ErrInvalidAddress,
		}, {
			name: "valid address",
			msg: MsgSetPriceFeeder{
				Feeder: sample.AccAddress(),
			},
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			err := tt.msg.ValidateBasic()
			if tt.err != nil {
				require.ErrorIs(t, err, tt.err)
				return
			}
			require.NoError(t, err)
		})
	}
}

func TestMsgDeletePriceFeeder_ValidateBasic(t *testing.T) {
	tests := []struct {
		name string
		msg  MsgDeletePriceFeeder
		err  error
	}{
		{
			name: "invalid address",
			msg: MsgDeletePriceFeeder{
				Feeder: "invalid_address",
			},
			err: sdkerrors.ErrInvalidAddress,
		}, {
			name: "valid address",
			msg: MsgDeletePriceFeeder{
				Feeder: sample.AccAddress(),
			},
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			err := tt.msg.ValidateBasic()
			if tt.err != nil {
				require.ErrorIs(t, err, tt.err)
				return
			}
			require.NoError(t, err)
		})
	}
}
package types

import (
	errorsmod "cosmossdk.io/errors"
	sdkmath "cosmossdk.io/math"
	sdk "github.com/cosmos/cosmos-sdk/types"
	sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)

var _ sdk.Msg = &MsgFeedPrice{}

func NewMsgFeedPrice(
	creator string,
	asset string,
	price sdkmath.LegacyDec,
	source string,
) *MsgFeedPrice {
	return &MsgFeedPrice{
		Provider: creator,
		FeedPrice: FeedPrice{
			Asset:  asset,
			Price:


-.893-.151-.035.338-.052.682-.052 1.03 0 5.277 4.04 9.61 9.2 10.073.144.013.287.024.428.032v-.911a1.46 1.46 0 010-2.746v-5.998a3.9 3.9 0 010-7.738V9.82h-5.272a1 1 0 01-.334.447ZM16.5 28.442c.129-.008.26-.018.391-.03 5.16-.464 9.2-4.796 9.2-10.074 0-.344-.016-.685-.05-1.02a2.767 2.767 0 01-.873.152c-1.46 0-2.64-1.18-2.64-2.64 0-1.102.672-2.045 1.63-2.44a10.135 10.135 0 00-2.088-2.123 1 1 0 01-.334-.447H16.5v1.232a3.9 3.9 0 010 7.736v6a1.46 1.46 0 010 2.743v.911Z"/></g></svg>';
  static const String laptop =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path fill="currentColor" stroke="currentColor" stroke-width="2" d="m28.388 21.336 1.397 6.597h-.007l-1.39-6.597Zm-2.542 2.654H6.154l.443-2h18.806l.443 2ZM26 17.75V4.25v13.5ZM7 5h18v12H7V5Z"/></svg>';
  static const String large_blue_diamond =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path fill="currentColor" d="M2.565 18.121a3 3 0 010-4.242L13.879 2.565a3 3 0 014.242 0l11.314 11.314a3 3 0 010 4.242L18.12 29.435a3 3 0 01-4.242 0L2.565 18.121Zm1.414-2.828a1 1 0 000 1.414l11.314 11.314a1 1 0 001.414 0l11.314-11.314a1 1 0 000-1.414L16.707 3.979a1 1 0 00-1.414 0L3.979 15.293Z"/></svg>';
  static const String large_orange_diamond =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path fill="currentColor" d="M2.565 18.121a3 3 0 010-4.242L13.879 2.565a3 3 0 014.242 0l11.314 11.314a3 3 0 010 4.242L18.121 29.435a3 3 0 01-4.242 0L2.565 18.121Zm1.414-2.828a1 1 0 000 1.414l11.314 11.314a1 1 0 001.414 0l11.314-11.314a1 1 0 000-1.414L16.707 3.979a1 1 0 00-1.414 0L3.979 15.293Z"/></svg>';


[`${type}BgGradAngle`]? 1:0) ;

  if (pseudoXOR > 0 && pseudoXOR <3) {
    argv[`${type}BgGradColor1`] = null;
    argv[`${type}BgGradColor2`] = null;
    argv[`${type}BgGradAngle`] = null;
    console.warn(`⚠ Incomplete gradient values for ${type} background. Will be ignored.\n`);
  }
  return argv;
}

export function createCmd(iconImage, iconBg, iconRatio, splashImage, splashBg, splashRatio, projectPath, android, ios): string {

  const cmd = [];
  cmd.push(SCRIPT_NAME);
  cmd.push(`--project-path=${projectPath}`);

  cmd.push(`--icon-image=${iconImage}`);
  cmd.push(`--icon-ratio=${iconRatio}`);
  if (isGradient(iconBg)) {
    cmd.push(`--icon-bg-grad-color1=#${iconBg.color1}`);
    cmd.push(`--icon-bg-grad-color2=#${iconBg.color2}`);
    cmd.push(`--icon-bg-grad-angle=${iconBg.angle}`);
  } else {
    cmd.push(`--icon-bgcolor=#${rgbHex(`rgb(${Object.values(iconBg).join(', ')})`)}`);
  }

  cmd.push(`--splash-image=${splashImage}`);
  cmd.push(`--splash-ratio=${splashRatio}`);
  if (isGradient(splashBg)) {
    cmd.push(`--splash-bg-grad-color1=#${splashBg.color1}`);
    cmd.push(`--splash-bg-grad-color2=#${splashBg.color2}`);
    cmd.push(`--splash-bg-grad-angle=${splashBg.angle}`);
  } else {
    cmd.push(`--splash-bgcolor=#${rgbHex(`rgb(${Object.values(splashBg).join(', ')})`)}`);
  }

  cmd.push(`--ios=${ios}`);
  cmd.push(`--android=${android}`);

  return cmd.join(' ');

}import * as vscode from "vscode";

export const isEnclosedWithinCodeBlock: (
  document: vscode.TextDocument,
  rangeOrPosition: vscode.Range | vscode.Position
) => boolean = (document, rangeOrPosition) => {
  const isWithinCodeBlock: (
    startPosition: vscode.Position,
    direction: "asc" | "desc",
    lookupChar: "{" | "}",
    stopChar: "{" | "}"
  ) => boolean = (startPosition, direction, lookupChar, stopChar) => {
    const increment = direction === "desc" ? -1 : 1;
    let characterPosition: number | undefined = startPosition.character;
    let lineNumber = startPosition.line;
    while (lineNumber >= 0) {
      const line = document.lineAt(lineNumber).text;
      if (characterPosition === undefined) {
        characterPosition = direction === "desc" ? line.length - 1 : 0;
      }
      while (
        direction === "desc"
          ? characterPosition >= 0
          : characterPosition <= line.length - 1
      ) {
        if (["#", "%", stopChar].includes(line[characterPosition])) {
          if (
            characterPosition + increment >= 0 &&
            line[characterPosition + increment] === stopChar
          ) {
            return false;
          }
        }

        if (["#", "%", lookupChar].includes(line[characterPosition])) {
          if (
            characterPosition + increment >= 0 &&
            line[characterPosition + increment] === lookupChar
          ) {
            return true;
          }
        }
        characterPosition += increment;
      }
      lineNumber += increment;
      characterPosition = undefined;
    }
    return false;
  };
  const { start, end } =


s);

    var aliases = alias(directs, ListOpenJavaDevelopmentKits::generateEarlyAccessAliasKeys);
    print("Early-Access Releases (Alias)", aliases);
  }

  static List<String> generateEarlyAccessAliasKeys(String[] components) {
    var release = components[0];
    var version = components[1];
    try {
      // extract named project or take version as-is
      var from = version.indexOf('-');
      var till = version.indexOf('+');
      var project = from >= 0 && from < till ? version.substring(from + 1, till) : version;
      if (project.equals("ea") || project.equals(EA_STABLE)) {
        var earlyAccessAliases = new ArrayList<String>();
        components[0] = release; // "23", "24", ...
        components[1] = "latest";
        earlyAccessAliases.add(String.join(",", components));
        components[0] = "ea";
        if (release.equals(EA_LATEST)) {
          components[1] = "latest";
          earlyAccessAliases.add(String.join(",", components));
        }
        if (release.equals(EA_STABLE)) {
          components[1] = "stable";
          earlyAccessAliases.add(String.join(",", components));
        }
        return earlyAccessAliases;
      }
      components[0] = project; // "loom", "valhalla", ...
      components[1] = "latest";
      return List.of(String.join(",", components));
    } catch (IndexOutOfBoundsException exception) {
      System.err.println("Early-Access version without `-` and `+`: " + version);
      return List.of();
    }
  }

  static void listArchivedReleases() {
    var html = browse("https://jdk.java.net/archive/");
    var directs = parse(html);
    print("Archived Releases", directs);

    var aliases = alias(directs, ListOpenJavaDevelopmentKits::generateArchivedAliasKeys);
    print("Archived Releases (Alias)", aliases);
  }

  static List<String> generateArchivedAliasKeys(String[] components) {
    if (components[0].equals(GA)) return List.of(); // "latest" is covered by GA
    if (components[0].equals(SA)) return List.of(); // "latest" is covered by SA
    components[1] = "latest";
    var alias = String.join(",", components);
    return List.of(alias);
  }

  static String browse(String uri) {
    try {
      var request = HttpRequest.newBuilder(URI.create(uri)).build();
      return HTTP_CLIENT.send(request, HttpResponse.BodyHandlers.ofString()).body();
    } catch (Exception exception) {
      return exception.toString();
    }
  }

  static TreeMap<String, String> parse(String html) {
    var map = new TreeMap<String, String>();

    for (var line : html.lines().toList()) {
      var uriMatcher = URI_PATTERN.matcher(line);
      if (uriMatcher.matches()) {
        var uri = uriMatcher.group(1);
        var keyMatcher = KEY_PATTERN.matcher(uri);
        if (!keyMatcher.matches()) {
          System.err.println("// no match -> " + uri);
          continue;
        }
        var version = Runtime.Version.parse(keyMatcher.group("version"));
        var os = keyMatcher.group("os");
        var joiner =
            new StringJoiner(",")
                .add(Integer.toString(version.feature()))
                .add(version.toString())
                .add(os.equals("osx") ? "macos" : os)
                .add(keyMatcher.group("arch"));
        var key = joiner.toString();
        map.put(key, uri);
      }
    }
    return map;
  }

  static TreeMap<String, String> alias(
      TreeMap<String, String> map, Function<String[], List


 is
        /// hosted. See CefRequestContext::LoadExtension for details.
        /// </summary>
        public CefExtension GetExtension()
        {
            var nExtension = cef_browser_host_t.get_extension(_self);
            return CefExtension.FromNativeOrNull(nExtension);
        }

        /// <summary>
        /// Returns true if this browser is hosting an extension background script.
        /// Background hosts do not have a window and are not displayable. See
        /// CefRequestContext::LoadExtension for details.
        /// </summary>
        public bool IsBackgroundHost
        {
            get
            {
                return cef_browser_host_t.is_background_host(_self) != 0;
            }
        }

        /// <summary>
        /// Set whether the browser's audio is muted.
        /// </summary>
        public void SetAudioMuted(bool value)
        {
            cef_browser_host_t.set_audio_muted(_self, value ? 1 : 0);
        }

        /// <summary>
        /// Returns true if the browser's audio is muted.  This method can only be
        /// called on the UI thread.
        /// </summary>
        public bool IsAudioMuted
        {
            get
            {
                return cef_browser_host_t.is_audio_muted(_self) != 0;
            }
        }

        /// <summary>
        /// Returns true if the renderer is currently in browser fullscreen. This
        /// differs from window fullscreen in that browser fullscreen is entered using
        /// the JavaScript Fullscreen API and modifies CSS attributes such as the
        /// ::backdrop pseudo-element and :fullscreen pseudo-class. This method can
        /// only be called on the UI thread.
        /// </summary>
        public bool IsFullscreen()
        {
            return cef_browser_host_t.is_fullscreen(_self) != 0;
        }

        /// <summary>
        /// Returns true if the renderer is currently in browser fullscreen. This
        /// differs from window fullscreen in that browser fullscreen is entered using
        /// the JavaScript Fullscreen API and modifies CSS attributes such as the
        /// ::backdrop pseudo-element and :fullscreen pseudo-class. This method can
        /// only be called on the UI thread.
        /// </summary>
        public void ExitFullscreen(bool willCauseResize)
        {
            cef_browser_host_t.exit_fullscreen(_self, willCauseResize ? 1 : 0);
        }

        /// <summary>
        /// Returns true if a Chrome command is supported and enabled. Values for
        /// |command_id| can be found in the cef_command_ids.h file. This method can
        /// only be called on the UI thread. Only used with the Chrome runtime.
        /// </summary>
        public bool CanExecuteChromeCommand(int commandId)
        {
            return cef_browser_host_t.can_execute_chrome_command(_self, commandId) != 0;
        }

        /// <summary>
        /// Execute a Chrome command. Values for |command_id| can be found in the
        /// cef_command_ids.h file. |disposition| provides information about the
        /// intended command target. Only used with the Chrome runtime.
        /// </summary>
        public void ExecuteChromeCommand(int commandId, CefWindowOpenDisposition disposition)
        {
            cef_browser_host_t.execute_chrome_command(_self, commandId, disposition);
        }
    }
}


eChartSegment> segments;

  @override
  BoxPainter createBoxPainter([VoidCallback? onChanged]) {
    return _RallyPieChartOutlineBoxPainter(
      maxFraction: maxFraction,
      wholeAmount: total,
      segments: segments,
    );
  }
}

class _RallyPieChartOutlineBoxPainter extends BoxPainter {
  _RallyPieChartOutlineBoxPainter({
    required this.maxFraction,
    required this.wholeAmount,
    required this.segments,
  });

  final double maxFraction;
  final double wholeAmount;
  final List<RallyPieChartSegment> segments;
  static const double wholeRadians = 2 * math.pi;
  static const double spaceRadians = wholeRadians / 180;

  @override
  void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) {
    // Create two padded reacts to draw arcs in: one for colored arcs and one for
    // inner bg arc.
    const strokeWidth = 4.0;
    final outerRadius = math.min(
          configuration.size!.width,
          configuration.size!.height,
        ) /
        2;
    final outerRect = Rect.fromCircle(
      center: configuration.size!.center(offset),
      radius: outerRadius - strokeWidth * 3,
    );
    final innerRect = Rect.fromCircle(
      center: configuration.size!.center(offset),
      radius: outerRadius - strokeWidth * 4,
    );

    // Paint each arc with spacing.
    var cumulativeSpace = 0.0;
    var cumulativeTotal = 0.0;
    for (final segment in segments) {
      final paint = Paint()..color = segment.color;
      final startAngle = _calculateStartAngle(cumulativeTotal, cumulativeSpace);
      final sweepAngle = _calculateSweepAngle(segment.value, 0);
      canvas.drawArc(outerRect, startAngle, sweepAngle, true, paint);
      cumulativeTotal += segment.value;
      cumulativeSpace += spaceRadians;
    }

    // Paint any remaining space black (e.g. budget amount remaining).
    final remaining = wholeAmount - cumulativeTotal;
    if (remaining > 0) {
      final paint = Paint()..color = Colors.black;
      final startAngle =
          _calculateStartAngle(cumulativeTotal, spaceRadians * segments.length);
      final sweepAngle = _calculateSweepAngle(remaining, -spaceRadians);
      canvas.drawArc(outerRect, startAngle, sweepAngle, true, paint);
    }

    // Paint a smaller inner circle to cover the painted arcs, so they are
    // display as segments.
    final bgPaint = Paint()..color = RallyColors.primaryBackground;
    canvas.drawArc(innerRect, 0, 2 * math.pi, true, bgPaint);
  }

  double _calculateAngle(double amount, double offset) {
    final wholeMinusSpacesRadians =
        wholeRadians - (segments.length * spaceRadians);
    return maxFraction *
        (amount / wholeAmount * wholeMinusSpacesRadians + offset);
  }

  double _calculateStartAngle(double total, double offset) =>
      _calculateAngle(total, offset) - math.pi / 2;

  double _calculateSweepAngle(double total, double offset) =>
      _calculateAngle(total, offset);
}
// Copyright 2020 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:animations/src/misc/expand_card.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

Widget createExpandCardScreen() => const MaterialApp(
      home: ExpandCardDemo(),
    );

void main() {
  group('ExpandCard Tests', () {
    testWidgets('ExpandCard changes size on tap', (tester) async {
      await tester.pumpWidget(createExpandCardScreen());

      // Get the initial size of ExpandCard.
      var initialSize = tester.getSize(find.


matrix[x][y +  4] > 0 and
                matrix[x][y +  5] < 0 and
                matrix[x][y +  6] > 0 and
                ((y + 10 < size and
                    matrix[x][y +  7] < 0 and
                    matrix[x][y +  8] < 0 and
                    matrix[x][y +  9] < 0 and
                    matrix[x][y + 10] < 0) or
                 (y - 4 >= 1 and
                    matrix[x][y -  1] < 0 and
                    matrix[x][y -  2] < 0 and
                    matrix[x][y -  3] < 0 and
                    matrix[x][y -  4] < 0))) then penalty3 = penalty3 + 40 end
            if (x + 6 <= size and
                matrix[x][y] > 0 and
                matrix[x +  1][y] < 0 and
                matrix[x +  2][y] > 0 and
                matrix[x +  3][y] > 0 and
                matrix[x +  4][y] > 0 and
                matrix[x +  5][y] < 0 and
                matrix[x +  6][y] > 0 and
                ((x + 10 <= size and
                    matrix[x +  7][y] < 0 and
                    matrix[x +  8][y] < 0 and
                    matrix[x +  9][y] < 0 and
                    matrix[x + 10][y] < 0) or
                 (x - 4 >= 1 and
                    matrix[x -  1][y] < 0 and
                    matrix[x -  2][y] < 0 and
                    matrix[x -  3][y] < 0 and
                    matrix[x -  4][y] < 0))) then penalty3 = penalty3 + 40 end
        end
    end
    -- 4: Proportion of dark modules in entire symbol
    -- ----------------------------------------------
    -- 50 ± (5 × k)% to 50 ± (5 × (k + 1))% -> 10 × k
    local dark_ratio = number_of_dark_cells / ( size * size )
    penalty4 = math.floor(math.abs(dark_ratio * 100 - 50)) * 2
    return penalty1 + penalty2 + penalty3 + penalty4
end

-- Create a matrix for the given parameters and calculate the penalty score.
-- Return both (matrix and penalty)
local function get_matrix_and_penalty(version,ec_level,data,mask)
    local tab = prepare_matrix_with_mask(version,ec_level,mask)
    add_data_to


-- activate bpmn parse listener as process engine plugin -->
<property name="processEnginePlugins">
  <list>
    <bean class="org.camunda.bpm.example.parselistener.InformAssigneeParseListenerPlugin" />
  </list>
</property>
```

It is also possible to define the BPMN Parse Listener as `postParseListeners`.

## How does it work?

If you are impatient, just have a look at the [unit test][5].

In this example, the unit test triggers the process engine to deploy and parse the BPMN Process Model.
The Process Engine BPMN Parser parses the process definition. The BPMN Parse Listener additionally parses the user task
to the BPMN Parser and adds the Task Listener to the given user task.

After that, the process engine starts the process instance and as soon as user task is entered it invokes the `notify`
implementation of the Task Listener. We then complete the user task and the `notify` method from the Task Listener
is executed once again. Afterwards, we change the assignee manually and the Task Listener is called a third time.

## How to use it?

1. Checkout the project with Git
2. Import the project into your IDE
3. Inspect the sources and run the unit test, or run it with Maven: `mvn clean verify`
4. Check the console if you can find: `Hello Kermit! Please start to work on your task User Task 1`

[4]: docs/bpmnParseListenerOnUserTask.png
[5]: src/test/java/org/camunda/bpm/example/test/BpmnParseListenerOnUserTaskTest.java
# The Camunda Invoice example in a Spring Boot Web Application

The Invoice example is provided in all of the pre-packaged distros that Camunda provides.
This Camunda example provides the Invoice application inside a Spring Boot application together with all
the necessary adjustments needed to run it out of the box. This includes:

* The Camunda EE Webapps
* The Camunda Rest API

You will need:

* credentials to access the enterprise repo in your `settings.xml`
* a valid camunda-license key file in your classpath in the file `camunda-license.txt`

## Prerequisites
* Java 17/21

## How is it done

1. To embed the Camunda Engine with the Enterprise webapps and Rest API you must add the following maven coordinates
to your `pom.xml`:

```xml
...
  <properties>
    <camunda.version>7.23.0-ee</camunda.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      ...
      <dependency>
        <groupId>org.camunda.bpm</groupId>
        <artifactId>camunda-bom</artifactId>
        <version>${camunda.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.camunda.bpm.springboot</groupId>
      <artifactId>camunda-bpm-spring-boot-starter-webapp-ee</artifactId>
    </dependency>
    <dependency>
      <groupId>org.camunda.bpm.springboot</groupId>
      <artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
    </dependency>
    ...
  </dependencies>
...
```

2. For the example Invoice application, the following dependency needs to be added in your `pom.xml` file:

```xml
<dependency>
  <groupId>org.camunda.bpm.example</groupId>
  <artifactId>camunda-example-invoice-jakarta</artifactId>
  <version>${camunda.version}</version>
  <classifier>classes</classifier>
  <scope>compile</scope>
</dependency>
```

3. An "application" class annotated with `@SpringBootApplication` needs to be created. In order to have the Invoice
process application registered, add the annotation `@EnableProcessApplication` to the same class, as well as include
an empty `processes.xml` file to your `META-INF` folder. To ensure that all of necessary BPMN and DMN files are


local I18N = require("core.I18N")

I18N.add {
   autopick = {
      modifier = {
         all = "all",
         unknown = "unknown",
         identify_stage1 = "identify stage1",
         identify_stage2 = "identify stage2",
         identify_stage3 = "identify stage3",
         worthless = "worthless",
         rotten = "rotten",
         empty = "empty",
         bad = "bad",
         good = "good",
         great = "great",
         miracle = "miracle",
         godly = "godly",
         special = "special",
         precious = "precious",
         blessed = "blessed",
         cursed = "cursed",
         doomed = "doomed",
         alive = "alive",
      },
      category = {
         item = "item",
         equipment = "equipment",
         melee_weapon = "melee weapon",
         helm = "helm",
         shield


DDb56SR45LH" aria-describedby="content-P89dD-NVIRDDb56SR45LH" class="flex shrink items-center gap-1 overflow-hidden rounded-md bg-black/5 p-1" style="--melt-invoker-width: 0px; --melt-invoker-height: 0px; --melt-invoker-x: 0px; --melt-invoker-y: 0px;">Saamke Fode <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-message-circle-more size-[1em]"><path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z"></path><path d="M8 12h.01"></path><path d="M12 12h.01"></path><path d="M16 12h.01"></path></svg>

Saamke Fode

	209

203	🇺🇳
kolmisilma <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-message-circle-more size-[1em]"><path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z"></path><path d="M8 12h.01"></path><path d="M12 12h.01"></path><path d="M16 12h.01"></path></svg>
 <div class="max-w-full rounded-xl bg-neutral-100 p-4 text-neutral-950 shadow-lg/30" data-melt-tooltip-content="" id="content-xlk61EsYmXOIvkHTc4poM" popover="manual" role="tooltip" tabindex="-1" inert="" style="--mel


    {
        case KMER_SOLIDITY_MIN:     return "min";
        case KMER_SOLIDITY_MAX:     return "max";
        case KMER_SOLIDITY_ONE:     return "one";
		case	KMER_SOLIDITY_CUSTOM: return "custom";
        case KMER_SOLIDITY_ALL:     return "all";
        case KMER_SOLIDITY_SUM:     return "sum";
        case KMER_SOLIDITY_DEFAULT: return "sum";
        default:    throw system::Exception ("bad kmer solidity kind %d", kind);
    }
}

/********************************************************************************/

/** Enumeration of different kinds of graph traversal. */
enum TraversalKind
{
    /** Undefined */
    TRAVERSAL_NONE=0,
    /** Path are unitigs */
    TRAVERSAL_UNITIG=1,
    /** Path are contigs */
    TRAVERSAL_CONTIG=2
};

/** Get the enum from a string.
 * \param[in] s : string to be parsed
 * \param[out] kind : enum to be set from the string parsing. */
static void parse (const std::string& s, TraversalKind& kind)
{
         if (s == "none")      { kind = TRAVERSAL_NONE;  }
    else if (s == "unitig")    { kind = TRAVERSAL_UNITIG;  }
    else if (s == "contig")    { kind = TRAVERSAL_CONTIG;  }
    else   { throw system::Exception ("bad traversal kind '%s'", s.c_str()); }
}

/** Get the string associated to an enum
 * \param[in] kind : the enum value
 * \return the associated string */
static std::string toString (TraversalKind kind)
{
    switch (kind)
    {
        case TRAVERSAL_NONE:    return "none";
        case TRAVERSAL_UNITIG:  return "unitig";
        case TRAVERSAL_CONTIG:  return "contig";
        default:    throw system::Exception ("bad traversal kind %d", kind);
    }
}

/********************************************************************************/

/** Provide different modes for graph traversal stop criteria. */
enum ExtendStopMode_e
{
    /** Stop traversal after the first unitig/contig. */
    ExtendStopMode_after_first_contig,
    /** Stop traversal when the maximum depth is reached. */
    ExtendStopMode_until_max_depth
};

/********************************************************************************/

/** Provide different modes of graph traversal for building extensions. */
enum SearchMode_e
{
    /** Breadth first traversal. */
    SearchMode_Breadth,
    /** Depth first traversal. */
    SearchMode_Depth
};

/********************************************************************************/
} } } } /* end of namespaces. */
/********************************************************************************/

#endif /* _GATB_CORE_TOOLS_MISC_ENUMS_HPP_ */
/*****************************************************************************
 *   GATB : Genome Assembly Tool Box
 *   Copyright (C) 2014  INRIA
 *   Authors: R.Chikhi, G.Rizk, E.Drezen
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as
 *  published by the Free Software Foundation, either version 3 of the
 *  License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/

/** \file IProperty.hpp
 *  \date 01/03/2013
 *  \author edrezen
 *  \brief Interface for properties, ie. list of tag values with hierarchical feature
 */

#ifndef _GATB_CORE_TOOLS_MISC_IPROPERTY_HPP_
#define _GATB_CORE_TOOLS_MISC_