rger or equal to the given token.
     *
     * @param token The token to match against.
     * @return A {@link BackendKeyFilter} matching if a key is larger or equal to the given token.
     */
    data class GTEToken(val token: Long): Start

    /**
     * Match keys strictly smaller than the given key.
     *
     * @param key Key to match against.
     * @return A {@link BackendKeyFilter} matching if a key is strictly smaller than the given key.
     */
    data class LT(val key: BackendKey): End

    /**
     * Match keys smaller than the given percentage.
     *
     * @param percentage The percentage to match against, should be a value between {@code [0, 1]}
     * @return A {@link BackendKeyFilter} matching if a key is smaller than a given percentage.
     */
    data class LTPercentage(val percentage: Float): End

    /**
     * Match keys smaller than the given token.
     *
     * @param token The token to match against.
     * @return A {@link BackendKeyFilter} matching if a key is smaller than the given token.
     */
    data class LTToken(val token: Long): End
}/*
 * Copyright (c) 2019 Spotify AB.
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License") you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package com.spotify.heroic.grammar

import java.lang.IllegalArgumentException
import java.time.DateTimeException
import java.time.LocalDateTime
import java.time.ZoneOffset
import java.time.format.DateTimeFormatter
import java.time.temporal.ChronoField
import java.time.temporal.TemporalAccessor

data class DateTimeExpression(
    @JvmField val context: Context,
    val dateTime: LocalDateTime
): Expression {
    override fun getContext() = context

    override fun <R : Any?> visit(visitor: Expression.Visitor<R>): R {
        return visitor.visitDateTime(this)
    }

    // TODO: support other time-zones fetched from the scope.
    override fun eval(scope: Expression.Scope): Expression {
        return InstantExpression(context, dateTime.toInstant(ZoneOffset.UTC))
    }

    override fun toRepr() = "{${STRING_FORMAT.format(dateTime)}}"

    companion object {
        private val STRING_FORMAT = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS")
        private val FORMATTERS = listOf(
            DateTimeFormatter.ofPattern("yyyy-MM-dd"),
            DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"),
            DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"),
            DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS")
        )

        @JvmStatic
        fun parse(c: Context, input: String): DateTimeExpression =
            DateTimeExpression(c, parseLocalDateTime(input))

        @JvmStatic
        fun parseLocalDateTime(input: String): LocalDateTime {
            val errors = mutableListOf<Throwable>()

            val accessor = FORMATTERS.asSequence().mapNotNull {
                try {
                    it.parse(input)
                } catch (e: DateTimeException) {
                    errors.add(e)


 }
    };
}

macro_rules! test_prec {
    ($name:ident: $expected:expr, $actual:expr, $digits:expr $(,)?) => {
        #[test]
        fn $name() {
            prec!($expected, $actual, $digits);
        }
    };
}

macro_rules! test_near {
    ($name:ident: $expected:expr, $actual:expr $(,)?) => {
        #[test]
        fn $name() {
            near!($expected, $actual);
        }
    };
}

macro_rules! test_exact {
    ($name:ident: $expected:expr, $actual:expr $(,)?) => {
        #[test]
        fn $name() {
            exact!($expected, $actual);
        }
    };
}

macro_rules! test_all {
    ($($name:ident: { $($tt:tt)* })*) => {
        $(#[test] fn $name() { $($tt)* })*
    };
}

macro_rules! test_all_eq {
    ($($name:ident: $expected:expr, $actual:expr);* $(;)?) => {
        $(#[test] fn $name() { assert_eq!($expected, $actual); })*
    };
}

macro_rules! test_all_assert {
    ($($name:ident: $assert:expr);* $(;)?) => {
        $(#[test] fn $name() { assert!($assert); })*
    };
}

macro_rules! test_all_prec {
    ($($name:ident: $expected:expr, $actual:expr, $digits:expr);* $(;)?) => {
        $(test_prec!($name: $expected, $actual, $digits);)*
    };
}

macro_rules! test_all_near {
    ($($name:ident: $expected:expr, $actual:expr);* $(;)?) => {
        $(test_near!($name: $expected, $actual);)*
    }
}

macro_rules! test_all_exact {
    ($($name:ident: $expected:expr, $actual:expr);* $(;)? )=> {
        $(test_exact!($name: $expected, $actual);)*
    };
}
<reponame>piotr-cla/ockam<filename>implementations/rs/ffi/src/kex_types.rs
#![allow(conflicting_repr_hints)]

#[derive(Clone, Copy, Debug)]
#[repr(C, u8)]
pub enum FfiKexType {
    XxInitiator = 1,
    XxResponder = 2,
}

#[derive(Clone, Copy, Debug)]
#[repr(C)]
pub struct FfiKexFatPointer {
    pub(crate) handle: u64,
    pub(crate) kex_type: FfiKexType,
}

/// A Completed Key Exchange elements
#[derive(Clone, Copy, Debug)]
#[repr(C)]
pub struct FfiCompletedKeyExchange {
    /// The state hash
    pub h: [u8; 32],
    /// The derived encryption key handle
    pub encrypt_key: u64,
    /// The derived decryption key handle
    pub decrypt_key: u64,
    /// The long term static public key from remote party
    pub remote_static_public_key: [u8; 65],
    /// The long term static public key len
    pub remote_static_public_key_len: usize,
}
<reponame>Verdex/TNH

use std::ffi::CString;
use std::os::raw::c_char;

#[link( name = "ncurses" )]
extern {
    pub fn initscr();
    pub fn refresh();
    pub fn endwin();
    pub fn getch() -> i32;
    pub fn printw( format : *const c_char, ... );
}

extern {
    pub static error : i32;
}

// Towers of Hanoi: In the classic problem of the Towers of Hanoi, you have 3 towers and N disks of
// different sizes which can slide onto any tower. The puzzle starts with disks sorted in ascending order
// of size from top to bottom (i.e., each disk sits on top of an even larger one). You have the following
// constraints:


d>(reader: &mut R) -> Result<Vec<Airspace>, String> {
    let mut airspaces = vec![];

    let mut builder = AirspaceBuilder::new();
    let mut buf: Vec<u8> = vec![];
    loop {
        // Read next line
        buf.clear();
        let bytes_read = reader.read_until(0x0a/*\n*/, &mut buf)
            .map_err(|e| format!("Could not read line: {}", e))?;
        if bytes_read == 0 {
            // EOF
            trace!("Reached EOF");
            airspaces.push(builder.finish()?);
            return Ok(airspaces);
        }
        let line = String::from_utf8_lossy(&buf);

        // Trim BOM and whitespace
        let trimmed_line = line.trim_start_matches('\u{feff}').trim();

        // Determine whether we reached the start of a new airspace
        let start_of_airspace = starts_airspace(trimmed_line);

        // A new airspace starts, collect the old one first
        if start_of_airspace && !builder.new {
            let old_builder = mem::replace(&mut builder, AirspaceBuilder::new());
            airspaces.push(old_builder.finish()?);
        }

        // Process current line
        process(&mut builder, trimmed_line)?;
    }
}

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

    use indoc::indoc;

    mod coord {
        use super::*;

        #[test]
        #[allow(clippy::unreadable_literal)]
        fn parse_valid() {
            // With spaces
            assert_eq!(
                Coord::parse("46:51:44 N 009:19:42 E"),
                Ok(Coord { lat: 46.86222222222222, lng: 9.328333333333333 })
            );

            // Without spaces
            assert_eq!(
                Coord::parse("46:51:44N 009:19:42E"),
                Ok(Coord { lat: 46.86222222222222, lng: 9.328333333333333 })
            );

            // Dot between min and sec
            assert_eq!(
                Coord::parse("46:51.44 N 009:19.42 E"),
                Ok(Coord { lat: 46.86222222222222, lng: 9.328333333333333 })
            );

            // South / west
            assert_eq!(
                Coord::parse("46:51:44 S 009:19:42 W"),
                Ok(Coord { lat: -46.86222222222222, lng: -9.328333333333333 })
            );

            // Fractional part
            assert_eq!(
                Coord::parse("1:0:0.123 N 2:0:1.2 E"),
                Ok(Coord { lat: 1.0 + 0.123 / 3600.0, lng: 2.0 + 1.2 / 3600.0 })
            );

            // Comma in between
            assert!(Coord::parse("45:42:21 N, 000:38:41 W").is_ok());

            // Lowercase letters
            assert!(Coord::parse("49:33:8 n 5:47:37 e").is_ok());
        }

        #[test]
        fn parse_invalid() {
            assert_eq!(
                Coord::parse("46:51:44 Q 009:19:42 R"),
                Err("Invalid coord: \"46:51:44 Q 009:19:42 R\"".to_string())
            );
            assert_eq!(
                Coord::parse("46x51x44 S 009x19x42 W"),
                Err("Invalid coord: \"46x51x44 S 009x19x42 W\"".to_string())
            );
        }
    }

    mod altitude {
        use super::*;

        #[test]
        fn m2ft() {
            assert_eq!(Altitude::m2ft(0).unwrap(), 0);
            assert_eq!(Altitude::m2ft(1).unwrap(), 3);
            assert_eq!(Altitude::m2ft(2


vec.begin(), vec.end());

  //   cout << "============="
  //        << "\n";
  cout << (int)arithmetic << "\n";
  cout << middle << "\n";
  cout << mode << "\n";
  cout << range << "\n";
  return 0;
}

int ModeN(vector<int> varr) {
  int answer = 0;
  int maxNum = 0;
  bool isduplication = false;
  vector<int> duplivec;
  // 정수와 해당 정수의 등장 횟수를 저장하기 위한 unordered_map
  unordered_map<int, int> um;

  // 배열을 순회하며 각 숫자의 등장 횟수를 세는 과정
  for (const auto a : varr) {
    um[a]++;
  }

  // unordered_map을 순회하며 최빈값을 찾는 과정
  for (const auto& b : um) {
    if (b.second > maxNum) {  // 현재 등장 횟수가 최빈값보다 큰 경우
      maxNum = b.second;      // 최빈값을 업데이트
      answer = b.first;       // 해당 숫자를 정답으로 설정
      isduplication = false;
    } else if (b.second == maxNum) {  // 현재 등장 횟수가 최빈값과 같은 경우
      isduplication = true;
    }
  }

  if (isduplication) {
    for (auto a : um) {
      if (maxNum == a.second) {
        duplivec.push_back(a.first);
      }
    }
    sort(duplivec.begin(), duplivec.end());
    answer = duplivec[1];
  }

  return answer;
}

// 1 2 3 "4"->중앙값 5 6 7
// 7 / 2 = 3, 3+1 4번째 근데 인덱스니까 3이 맞을듯#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int H, W; // H , W
    cin >> H >> W;

    int arr[W]; // W  迭

    // arr ʱȭ
    for (int i = 0; i < W; i++) {
        cin >> arr[i];
    }

    int cnt = 0;

    // left, right

    int pointer = 0;

    //  (start)   (end)  ʿ䰡
    // ׷ for  1 ~ W-1
    for (int i = 1; i < W - 1; i++) {
        int left = 0, right = 0;
        pointer = i;

        for (int j = 0; j < pointer; j++) {
            left = max(left, arr[j]);
        }

        for (int j = W - 1; j > pointer; j--) {
            right = max(right, arr[j]);
        }

        cnt += max(0, min(left, right) - arr[pointer]);
        //   ٴ 0 ̾ Ѵ.
        //  left right min  ,  Ͱ Ű  ũٸ,  ״ϱ
        // Ѽ 0 ϱ max .
    }

    cout << cnt;

    return 0;
}
#include <


.nlp.front.shared.config.ApplicationDefinition
import ai.tock.translator.I18nLabel
import org.litote.kmongo.Id

interface FaqDefinitionDAO {

    fun deleteFaqDefinitionById(id: Id<FaqDefinition>)

    /**
     * Delete the FaqDefinition by filtering on the application [id][ApplicationDefinition]
     * @param id the application name [ApplicationDefinition]
     */
    fun deleteFaqDefinitionByBotIdAndNamespace(id: String, namespace: String)

    fun save(faqDefinition: FaqDefinition)

    fun getFaqDefinitionById(id: Id<FaqDefinition>): FaqDefinition?

    /**
     * Retrieve faqDefinition by filtering on the application name [id][ApplicationDefinition]
     * @param botId the application name
     * @param namespace the namespace
     */
    fun getFaqDefinitionByBotIdAndNamespace(botId: String, namespace: String): List<FaqDefinition>

    fun listenFaqDefinitionChanges(listener: () -> Unit)

    fun getFaqDefinitionByI18nId(id: Id<I18nLabel>): FaqDefinition?

    fun getFaqDefinitionByI18nIds(ids: Set<Id<I18nLabel>>): List<FaqDefinition>?

    fun getFaqDefinitionByIntentId(id: Id<IntentDefinition>): FaqDefinition?

    fun getFaqDefinitionByIntentIds(intentIds: Set<Id<IntentDefinition>>): List<FaqDefinition>?

    fun getFaqDefinitionByTags(tags: Set<String>): List<FaqDefinition>

    /**
     * Retrieve faqDefinition by filtering on intent id [intentId][IntentDefinition] and the application name[botId][ApplicationDefinition]
     * @param intentId intent id
     * @param botId the application name
     * @param namespace the namespace
     */
    fun getFaqDefinitionByIntentIdAndBotIdAndNamespace(intentId: Id<IntentDefinition>, botId: String, namespace: String): FaqDefinition?

    /**
     * Retrieve faq details with total count numbers according to the filter present un [FaqQuery]
     * @param query [FaqQuery] the query search
     * @param applicationDefinition the current [ApplicationDefinition]
     * @param i18nIds optional to request eventually on i18nIds
     */
    fun getFaqDetailsWithCount(
        query: FaqQuery,
        applicationDefinition: ApplicationDefinition,
        i18nIds: List<Id<I18nLabel>>? = null
    ): Pair<List<FaqQueryResult>, Long>

    fun getTags(botId: String, namespace: String): List<String>

    /**
     * Make migration
     * @param intentIdSupplier : function that return a namespace with a given Id<>
     */
    fun makeMigration(intentIdSupplier: (Id<IntentDefinition>) -> String?)
}
/*
 * Copyright (C) 2017/2025 SNCF Connect & Tech
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ai.tock.nlp.front.shared.config

import org.junit.jupiter.api.Test
import kotlin.test.assertFalse
import kotlin.test.assertTrue

/**
 *
 */
class IntentDefinitionTest {

    @Test
    fun `supportStates is not case sensitive`() {
        val intent = IntentDefinition("a", "b", emptySet(), emptySet(), mandatoryStates = setOf("state"))
        assertTrue(intent.supportStates(setOf("state")))
        assertTrue(intent.supportStates(setOf("State")))
        assertFalse(intent.supportStates(setOf("states")))
        assertFalse(intent.supportStates(setOf("States")))
    }
}
/*
 * Copyright (C) 2017/2025 SNCF Connect & Tech
 *
 * Licensed under the Apache License, Version 2.0 (the "


62,
		0,
		-0.303145,
		0.81761,
		-0.489507,
		0,
		-0.20526,
		0.084519,
		-0.641856,
		1,
	},
	[0.616666666667] = {
		0.968576,
		-0.164661,
		-0.186404,
		0,
		0.06532,
		0.891565,
		-0.448157,
		0,
		0.239985,
		0.421899,
		0.874305,
		0,
		-0.022022,
		-0.091424,
		-0.592459,
		1,
	},
	[0.633333333333] = {
		0.96537,
		-0.211372,
		-0.152913,
		0,
		0.150027,
		0.929314,
		-0.337441,
		0,
		0.21343,
		0.302815,
		0.928844,
		0,
		-0.002027,
		-0.106334,
		-0.586304,
		1,
	},
	[0.65] = {
		0.964041,
		-0.236686,
		-0.120847,
		0,
		0.194742,
		0.938604,
		-0.284777,
		0,
		0.18083,
		0.251003,
		0.950946,
		0,
		0.01173,
		-0.116734,
		-0.58079,
		1,
	},
	[0.666666666667] = {
		0.967555,
		-0.234796,
		-0.09332,
		0,
		0.195875,
		0.930357,
		-0.309949,
		0,
		0.159596,
		0.281613,
		0.946162,
		0,
		0.017737,
		-0.121839,
		-0.57596,
		1,
	},
	[0.6] = {
		0.970078,
		-0.103691,
		-0.219537,
		0,
		-0.048045,
		0.804352,
		-0.592207,
		0,
		0.237991,
		0.585035,
		0.775303,
		0,
		-0.046718,
		-0.072733,
		-0.599167,
		1,
	},
}

return spline_matrices


  }
  final next = nextDwdsVersion ?? '';
  final current = currentDwdsVersion ?? '';
  if (next.isNotEmpty && current.isNotEmpty) {
    _logInfo('Changing DWDS pin from $current to $next');
    _replaceInFile(
      File('../$package/pubspec.yaml'),
      query: current,
      replaceWith: next,
    );
    return nextDwdsVersion;
  }
  _logWarning('Unable to determine DWDS version to pin.');
  return null;
}

void _logInfo(String message) {
  stdout.writeln(message);
}

void _logWarning(String warning) {
  stderr.writeln(warning);
}

extension JoinExtension on List<String> {
  String joinWithNewLine() {
    return '${join('\n')}\n';
  }
}
// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:async';
import 'dart:io' show Directory;

import 'package:args/args.dart';
import 'package:args/command_runner.dart';
import 'package:build_daemon/client.dart';
import 'package:build_daemon/data/build_status.dart';
import 'package:build_daemon/data/build_target.dart';
import 'package:build_daemon/data/server_log.dart';
import 'package:collection/collection.dart' show IterableExtension;
import 'package:logging/logging.dart' as logging;

import '../daemon_client.dart';
import '../logging.dart';
import '../pubspec.dart';
import 'configuration.dart';
import 'shared.dart';

/// Command to execute pub run build_runner build.
class BuildCommand extends Command<int> {
  @override
  final argParser = ArgParser(usageLineLength: lineLength);

  @override
  final name = 'build';

  @override
  final description = 'Run builders to build a package.';

  BuildCommand() {
    addSharedArgs(argParser, outputDefault: 'web:build');
  }

  @override
  Future<int> run() async {
    final extraArgs = argResults?.rest ?? [];
    final unsupported = extraArgs.where((arg) => !arg.startsWith('-')).toList();
    if (unsupported.isNotEmpty) {
      throw UsageException(
        'Arguments were provided that are not supported: '
        '"${unsupported.join(' ')}".',
        argParser.usage,
      );
    }
    final validExtraArgs = extraArgs
        .where((arg) => arg.startsWith('-'))
        .toList();

    final configuration = Configuration.fromArgs(argResults);
    configureLogWriter(configuration.verbose);

    List<String> arguments;
    try {
      await validatePubspecLock(configuration);
      arguments = buildRunnerArgs(configuration)..addAll(validExtraArgs);
    } on PackageException catch (e) {
      logWriter(
        logging.Level.SEVERE,
        'Pubspec errors: ',
        error: '${e.details}',
      );
      rethrow;
    }

    try {
      logWriter(logging.Level.INFO, 'Connecting to the build daemon...');
      final client = await connectClient(Directory.current.path, arguments, (
        serverLog,
      ) {
        logWriter(
          toLoggingLevel(serverLog.level),
          serverLog.message,
          error: serverLog.error,
          loggerName: serverLog.loggerName,
          stackTrace: serverLog.stackTrace,
        );
      });
      OutputLocation? outputLocation;
      final outputInput = configuration.outputInput;
      if (configuration.outputPath != null) {
        outputLocation = OutputLocation(
          (b) => b
            ..output = configuration.outputPath
            ..useSymlinks = false
            ..hoist = outputInput != null && outputInput.isNotEmpty,
        );
      }
      client.regi


rls", []))
                })

    def generate_summary_csv(self, logs):
        """ Gera um CSV de resumo, agrupando por domínio da URL e host """
        summary_data = defaultdict(int)

        for log in logs:
            url = log.get("url", "")
            host = log.get("host", "")

            domain = urlparse(url).netloc

            key = (domain, host)

            summary_data[key] += 1

        with open(self.summary_csv, "w", newline="", encoding="utf-8") as csvfile:
            fieldnames = ["Domínio da URL", "Host", "Quantidade de Ocorrências"]
            writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
            writer.writeheader()

            for (domain, host), count in summary_data.items():
                writer.writerow({
                    "Domínio da URL": domain,
                    "Host": host,
                    "Quantidade de Ocorrências": count
                })

        print(f"Resumo salvo em '{self.summary_csv}'.")

    def fetch_and_save_logs(self):
        """ Busca e salva os logs do Page Shield para as zonas (ou apenas a zona específica, se fornecida) """
        zones = []

        if self.specific_zone:
            zones.append({"id": self.specific_zone, "name": self.specific_zone})
        else:
            zones = self.cloudflare_api.get_zones()

        if not zones:
            print("Nenhuma zona disponível. Encerrando.")
            return

        all_logs = []
        for zone in zones:
            print(f"Buscando logs do Page Shield para a zona {zone['name']} (ID: {zone['id']})...")
            logs = self.cloudflare_api.fetch_page_shield_logs(zone["id"])
            if logs:
                print(f"{len(logs)} registros encontrados para a zona {zone['name']}.")
                all_logs.extend(logs)
            else:
                print(f"Nenhum log encontrado para a zona {zone['name']}.")

        if not all_logs:
            print("Nenhum dado de Page Shield coletado.")
            return

        self.save_logs_to_csv(all_logs)
        self.generate_summary_csv(all_logs) # monta um resumo
        print(f"{len(all_logs)} registros salvos em '{self.output_csv}'.")

if __name__ == "__main__":
    API_TOKEN = os.getenv("API_TOKEN")
    SPECIFIC_ZONE = os.getenv("SPECIFIC_ZONE")

    if not API_TOKEN:
        print("API_TOKEN não encontrado no arquivo .env.")
    else:
        # event_manager = FirewallEventManager(API_TOKEN)
        # event_manager.fetch_and_save_events()

        shield_manager = PageShieldManager(API_TOKEN, specific_zone=SPECIFIC_ZONE)
        shield_manager.fetch_and_save_logs()


shots/range.dart';
import 'package:ardrive/utils/snapshots/snapshot_item_to_be_created.dart';
import 'package:flutter_test/flutter_test.dart';

import 'snapshot_test_helpers.dart';

void main() {
  group('SnapshotItemToBeCreated class', () {
    group('getSnapshotData method', () {
      test('returns the correct data for an empty set', () async {
        final snapshotItem = SnapshotItemToBeCreated(
          driveId: 'DRIVE_ID',
          blockStart: 0,
          blockEnd: 10,
          subRanges: HeightRange(rangeSegments: [Range(start: 0, end: 10)]),
          source: const Stream.empty(),
          jsonMetadataOfTxId: (txId) async => Uint8List.fromList(
            utf8.encode('{"name":"$txId"}'),
          ),
        );

        final snapshotData = (await snapshotItem
                .getSnapshotData()
                .map(utf8.decoder.convert)
                .toList())
            .join();

        expect(snapshotData, '{"txSnapshots":[]}');
      });

      test('returns the correct data for a single transaction', () async {
        final snapshotItem = SnapshotItemToBeCreated(
          driveId: 'DRIVE_ID',
          blockStart: 0,
          blockEnd: 10,
          subRanges: HeightRange(rangeSegments: [Range(start: 0, end: 10)]),
          source: fakeNodesStream(Range(start: 8, end: 8)),
          jsonMetadataOfTxId: (txId) async => Uint8List.fromList(
            utf8.encode('{"name":"$txId"}'),
          ),
        );

        final snapshotData = (await snapshotItem
                .getSnapshotData()
                .map(utf8.decoder.convert)
                .toList())
            .join();

        expect(
          snapshotData,
          '{"txSnapshots":[{"gqlNode":{"id":"tx-8","owner":{"address":"1234567890"},"bundledIn":{"id":"ASDASDASDASDASDASD"},"block":{"height":8,"timestamp":800},"tags":[]},"jsonMetadata":"{\\"name\\":\\"tx-8\\"}"}]}',
        );
      });

      test(
          'the returned data won\'t contain the json metadata of other snapshots, but only the gql node',
          () async {
        final snapshotItem = SnapshotItemToBeCreated(
          driveId: 'DRIVE_ID',
          blockStart: 0,
          blockEnd: 10,
          subRanges: HeightRange(rangeSegments: [Range(start: 0, end: 10)]),
          source: Stream.fromIterable(
            [
              DriveEntityHistoryTransactionModel(
                transactionCommonMixin:
                    DriveEntityHistory$Query$TransactionConnection$TransactionEdge$Transaction
                        .fromJson(
                  {
                    'id': 'tx-7',
                    'bundledIn': {'id': 'ASDASDASDASDASDASD'},
                    'owner': {'address': '1234567890'},
                    'tags': [
                      {'name': 'Entity-Type', 'value': 'snapshot'},
                    ],
                    'block': {
                      'height': 7,
                      'timestamp': 700,
                    }
                  },
                ),
              ),
            ],
          ),
          jsonMetadataOfTxId: (txId) async => Uint8List.fromList(
            utf8.encode('{"name":"tx-$txId"}'),
          ),
        );

        final snapshotData = (await snapshotItem
                .getSnapshotData()
                .map(utf8.decoder.convert)
                .toList())
            .join();

        expect(
          snapshotData


[52228] = "Stechender Traumsmaragd",
[52229] = "Polierter Gluttopas",
[52230] = "Präziser Infernorubin",
[52231] = "Imposanter Traumsmaragd",
[52232] = "Spiegelnder Heliodor",
[52233] = "Majestätischer Traumsmaragd",
[52234] = "Fixierendes Dämonenauge",
[52235] = "Massiver Ozeansaphir",
[52236] = "Geläutertes Dämonenauge",
[52237] = "Traumsmaragd des Mentors",
[52238] = "Veränderliches Dämonenauge",
[52239] = "Machtvoller Gluttopas",
[52240] = "Fachkundiger Gluttopas",
[52241] = "Glatter Heliodor",
[52242] = "Gediegener Ozeansaphir",
[52243] = "Stattliches Dämonenauge",
[52244] = "Funkelnder Ozeansaphir",
[52245] = "Beständiger Traumsmaragd",
[52246] = "Stürmischer Ozeansaphir",
[52247] = "Fragiler Heliodor",
[52248] = "Zeitloses Dämonenauge",
[52249] = "Resoluter Gluttopas",
[52250] = "Meditativer Traumsmaragd",
[52251] = "Jainas Medaillon",
[52252] = "Wappenrock des Lichtbringers",
[52253] = "Sylvanas' Spieluhr",
[52255] = "Klobiges Schimärenauge",
[52256] = "Helles Schimärenauge",
[52257] = "Glänzendes Schimärenauge",
[52258] = "Feingeschliffenes Schimärenauge",
[52259] = "Scheinendes Schimärenauge",
[52260] = "Präzises Schimärenauge",
[52261] = "Gediegenes Schimärenauge",
[52262] = "Funkelndes Schimärenauge",
[52263] = "Stürmisches Schimärenauge",
[52264] = "Massives Schimärenauge",
[52265] = "Fragiles Schimärenauge",
[52266] = "Glattes Schimärenauge",
[52267] = "Mystisches Schimärenauge",
[52268] = "Spiegelndes Schimärenauge",
[52269] = "Frakturiertes Schimärenauge",
[52270] = "Balg eines verseuchten Braunbären",
[52271] = "Handschellen von Nordwacht",
[52272] = "Totem der Läuterung",
[52274] = "Vorräte des Irdenen Rings",
[52275] = "Tafeln der Erde",
[52276] = "Tafeln des Feuers",
[52277] = "Geheiminformationen aus Taurajo",
[52278] = "Monster - Mace, 1H Gnomish",
[52279] = "Salzverkrustetes Tagebuch",
[52280] = "Granatensäckchen",
[52281] = "Hackvisages verschlossene Truhe",
[52282] = "Von einer Schildkröte verdauter Schlüssel",
[52283] = "Blutkrallenpfeife",
[52284] = "Juwel eines Irdenen",
[52285] = "Belagerungsmaschinenschrott",
[52286] = "Zähmerrute",
[52287] = "Zähmerrute",
[52288] = "Zähmerrute",
[52289] = "Graziler Irrlichtdiamant",
[


Function(PrintDetailsOnExit, 0);

    PIN_StartProgram();  // Never returns

    return 0;
}
/*BEGIN_LEGAL
Intel Open Source License

Copyright (c) 2002-2015 Intel Corporation. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.  Redistributions
in binary form must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.  Neither the name of
the Intel Corporation nor the names of its contributors may be used to
endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR
ITS CONTRIBUTORS 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.
END_LEGAL */
/* ===================================================================== */
/*
  @ORIGINAL_AUTHOR: Robert Cohn
*/

/* ===================================================================== */
/*! @file
 *  This file contains an ISA-portable PIN tool for tracing memory accesses.
 */

#include "pin.H"
#include <iostream>
#include <fstream>
#include <iomanip>
/* ===================================================================== */
/* Global Variables */
/* ===================================================================== */

std::ofstream TraceFile;

/* ===================================================================== */
/* Commandline Switches */
/* ===================================================================== */

KNOB<string> KnobOutputFile(KNOB_MODE_WRITEONCE, "pintool",
    "o", "pinatrace.out", "specify trace file name");
KNOB<BOOL> KnobValues(KNOB_MODE_WRITEONCE, "pintool",
    "values", "1", "Output memory values reads and written");

/* ===================================================================== */
/* Print Help Message                                                    */
/* ===================================================================== */

static INT32 Usage()
{
    cerr <<
        "This tool produces a memory address trace.\n"
        "For each (dynamic) instruction reading or writing to memory the the ip and ea are recorded\n"
        "\n";

    cerr << KNOB_BASE::StringKnobSummary();

    cerr << endl;

    return -1;
}

static VOID EmitMem(VOID * ea, INT32 size)
{
    if (!KnobValues)
        return;

    switch(size)
    {
      case 0:
        TraceFile << setw(1);
        break;

      case 1:
        TraceFile << static_cast<UINT32>(*static_cast<UINT8*>(ea));
        break;

      case 2:
        TraceFile << *static_cast<UINT16*>(ea);
        break;

      case 4:
        TraceFile << *static_cast<UINT32*>(ea);
        break;

      case 8:
        TraceFile << *static_cast<UINT64*>(ea);
        break;

      default:
        TraceFile.unsetf(ios::showbas


形肩甲",
[39231] = "古舊絲綢指環",
[39232] = "失落使命墜飾",
[39233] = "災罰聖禦盾",
[39234] = "瘟疫阻絕長靴",
[39235] = "骨架護腕",
[39236] = "侵入者長靴",
[39237] = "重返戰鬥肩甲",
[39238] = "指揮權杖",
[39239] = "復活士兵胸鎧",
[39240] = "諾斯的詛咒",
[39241] = "天譴黑暗裹屍布",
[39242] = "嘶啞氣息長袍",
[39243] = "注定纏手",
[39244] = "命定戒指",
[39245] = "終止",
[39246] = "解剖護符",
[39247] = "黑暗陰影腕輪",
[39248] = "失落狼群外套",
[39249] = "血戮重肩甲",
[39250] = "神聖淨化戒指",
[39251] = "死靈基因腰帶",
[39252] = "訓誡束腕",
[39253] = "收割者的禮物",
[39254] = "薩爾塔列歐輕鞋",
[39255] = "瘟疫野獸法杖",
[39256] = "薩弗護杖",
[39257] = "憎恨者之影",
[39258] = "難逃一死腿鎧",
[39259] = "菌類玷污罩袍",
[39260] = "腐敗心靈頭盔",
[39261] = "受污染修補束腰",
[39262] = "聯合力量護手",
[39263] = "離散護腿",
[39264] = "維克的鑰匙串",
[39265] = "神諭者之血",
[39266] = "受污染的水晶",
[39267] = "憎惡肩刃",
[39268] = "瑪姆托司勳章",
[39269] = "瓦拉納爾親王的報告",
[39270] = "仇恨之擊",
[39271] = "潛在記憶之刃",
[39272] = "手術披氅",
[39273] = "慍怒布甲長靴",
[39274] = "反胃者肩墊",
[39275] = "接觸性傳染原手套",
[39276] = "毀壞之顱",
[39277] = "葛羅巴斯封印戒指",
[39278] = "焦慮手環",
[39279] = "衰敗水泡腰帶",
[39280] = "無數倒刺護腿",
[39281] = "感染擊退者",
[39282] = "骨鍊護符",
[39283] = "腐敗手環",
[39284] = "沼氣披肩",
[39285] = "騷動纏手",
[39


let iter = Box::new(Iter { put: 0, deleted: 0 });
    let iter2 = batch.iterate(iter);
    assert_eq!(iter2.put, 2);
    assert_eq!(iter2.deleted, 1);
}
<gh_stars>1-10
use crate::ordinal::{Ordinal, OrdinalSet};
use crate::time_unit::TimeUnitField;
use once_cell::sync::Lazy;
use std::borrow::Cow;

static ALL: Lazy<OrdinalSet> = Lazy::new(Years::supported_ordinals);

#[derive(Debug, Clone, Hash, Eq)]
pub struct Years {
    ordinals: Option<OrdinalSet>,
}

impl TimeUnitField for Years {
    fn from_optional_ordinal_set(ordinal_set: Option<OrdinalSet>) -> Self {
        Years {
            ordinals: ordinal_set,
        }
    }
    fn name() -> Cow<'static, str> {
        Cow::from("Years")
    }

    // TODO: Using the default impl, this will make a set w/100+ items each time "*" is used.
    // This is obviously suboptimal.
    fn inclusive_min() -> Ordinal {
        1970
    }
    fn inclusive_max() -> Ordinal {
        2100
    }
    fn ordinals(&self) -> &OrdinalSet {
        match &self.ordinals {
            Some(ordinal_set) => ordinal_set,
            None => &ALL,
        }
    }
}

impl PartialEq for Years {
    fn eq(&self, other: &Years) -> bool {
        self.ordinals() == other.ordinals()
    }
}
pub mod filters {
    use super::handlers;
    use crate::utils;
    use pipebuilder_common::{
        api::models, grpc::schedule::scheduler_client::SchedulerClient, Register,
    };
    use tonic::transport::Channel;
    use warp::Filter;

    // build api
    pub fn v1_build(
        scheduler_client: SchedulerClient<Channel>,
        register: Register,
        lease_id: i64,
    ) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
        v1_build_post(scheduler_client, register.clone())
            .or(v1_build_snapshot_list(register.clone()))
            .or(v1_build_snapshot_delete(register.clone()))
            .or(v1_build_metadata_get(register.clone(), lease_id))
            .or(v1_build_metadata_list(register.clone()))
            .or(v1_build_cancel(register.clone(), lease_id))
            .or(v1_build_log_get(register.clone(), lease_id))
            .or(v1_build_delete(register.clone(), lease_id))
            .or(v1_build_scan(register.clone(), lease_id))
            .or(v1_build_cache_scan(register.clone(), lease_id))
            .or(v1_build_cache_delete(register, lease_id))
    }

    pub fn v1_build_post(
        scheduler_client: SchedulerClient<Channel>,
        register: Register,
    ) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
        warp::path!("api" / "v1" / "build")
            .and(warp::post())
            .and(utils::filters::with_scheduler_client(scheduler_client))
            .and(utils::filters::with_register(register))
            .and(utils::filters::json_request::<models::BuildRequest>())
            .and_then(handlers::build)
    }

    pub fn v1_build_snapshot_list(
        register: Register,
    ) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
        warp::path!("api" / "v1" / "build" / "snapshot")
            .and(warp::get(


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.
 */

#include <machine/asmacros.h>

	.text

/* int rdrand_rng(uint8_t *out, long limit) */
ENTRY(rdrand_rng)
	movq	%rsi,	%rcx
	shrq	$3,	%rcx	/* Divide by 8 to get 64-bit word count */

	xorq	%r11, 	%r11
1:
	/*
	 * rdx: (output)	entropy
	 */
	rdrand	%rdx		/* rdrand64 */

	/*
	 * The carry flag (CF) determines if the instruction was
	 * successful or not.
	 *
	 * CF = 0: Random value not available at time of execution.
	 */
	jae	2f

	/*
	 * The operation was successful, so store the random data
	 * from the register into our buffer.
	 */
	movq	%rdx,	(%rdi)

	/*
	 * Increment the count of stored random words as well as the
	 * buffer pointer in rdi.
	 */
	addq	$1, 	%r11
	addq	$8,	%rdi

	/*
	 * If we haven't already read enough random words,
	 * loop again.
	 */
	cmpq	%rcx, 	%r11
	jl	1b
2:
	/* return the number of stored random bytes (random words * 8) */
	shlq	$3,	%r11
	movq	%r11, 	%rax
	ret
END(rdrand_rng)


    (function(selectors) {
        return selectors.map(function(selector) {
            var el = document.querySelector(selector);
            if (!el) return { selector: selector, exists: false };
            var tag = el.tagName.toLowerCase();
            var writable =
                (tag === 'input' || tag === 'textarea') &&
                !el.disabled &&
                !el.readOnly;
            var style = window.getComputedStyle(el);
            var hidden =
                style.display === 'none' ||
                style.visibility === 'hidden' ||
                el.offsetParent === null;
            var focusable = !el.disabled && !hidden &&
                (
                    ['input', 'select', 'textarea', 'button', 'a'].includes(tag) ||
                    el.hasAttribute('tabindex')
                );
            return {
                selector: selector,
                exists: true,
                writable: writable,
                hidden: hidden,
                focusable: focusable
            };
        });
    })(%s)
    `
	// Encode Go array as JSON for injection into JS
	selectorsJSON, _ := json.Marshal(selectors)
	js = fmt.Sprintf(js, string(selectorsJSON))

	var results []map[string]interface{}
	err := chromedp.Run(ctx,
		chromedp.Navigate(url),
		chromedp.WaitReady("body"),
		chromedp.Evaluate(js, &results),
	)
	if err != nil {
		return "", fmt.Errorf("js error: %w", err)
	}

	// Parse and print the result
	for _, res := range results {
		fmt.Println(res)
	}

	var secret string

	// Run tasks
	err = chromedp.Run(ctx,
		network.Enable(),
		network.SetExtraHTTPHeaders(network.Headers{
			"Authorization": "Bearer " + token,
		}),
		chromedp.Navigate(url), // Navigate to the URL
		chromedp.Sleep(3*time.Second),
		chromedp.CaptureScreenshot(&buf),
		chromedp.Click(`//button[normalize-space()='LOGIN WITH Open Edge IAM']`, chromedp.BySearch),
		chromedp.CaptureScreenshot(&buf),
		chromedp.WaitReady("body"),
		chromedp.SendKeys(`#username`, username, chromedp.ByID),
		chromedp.SendKeys(`#password`, password, chromedp.ByID),
		chromedp.Click(`#kc-login`, chromedp.ByID),
		chromedp.Sleep(3*time.Second),
		chromedp.CaptureScreenshot(&buf),
		chromedp.WaitVisible(`//button[span[contains(text(), "sample-project-edge-mgr")]]`, chromedp.BySearch),
		// Click the button
		chromedp.Click(`//button[span[contains(text(), "sample-project-edge-mgr")]]`, chromedp.BySearch),
		chromedp.Sleep(500*time.Millisecond), // Wait for menu animation/render
		chromedp.CaptureScreenshot(&buf),
		chromedp.WaitVisible(`//a[contains(text(), "User Profile")]`, chromedp.BySearch),
		chromedp.Click(`//a[contains(text(), "User Profile")]`, chromedp.BySearch),
		chromedp.Sleep(500*time.Millisecond), // Wait for menu animation/render
		chromedp.CaptureScreenshot(&buf),
		// Wait for the modal and textarea to appear
		chromedp.WaitVisible(`textarea.inputTarget`, chromedp.ByQuery),
		// Get the value of the textarea


def is_increasing(n:int)-> bool:
    """
    Devuelve si un numero es creciente de izquierda a derecha o no
    """
    if n < 10:
        return True
    elif n%10<(n//10)%10:
        return False
    return is_increasing(n//10)


 1.0f)
    lineTo(45.100002f, 1.0f)
    close()
}
shape = Outline.Generic(generalPath!!)
brush = Brush.linearGradient(0.0f to Color(200, 212, 219, 255), 0.139f to Color(216, 225, 230, 255), 0.359f to Color(235, 240, 243, 255), 0.617f to Color(249, 250, 251, 255), 1.0f to Color(255, 255, 255, 255), start = Offset(36.108f, 98.997f), end = Offset(36.108f, 0.99900055f), tileMode = TileMode.Clamp)
drawOutline(outline = shape!!, style=Fill, brush=brush!!, alpha=alpha, blendMode = blendMode)
alpha = alphaStack.removeAt(0)
blendMode = blendModeStack.removeAt(0)
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
// _0_1
brush = SolidColor(Color(113, 145, 161, 255))
stroke = Stroke(width=2.0f, cap=StrokeCap.Butt, join=StrokeJoin.Miter, miter=4.0f)
if (generalPath == null) {
   generalPath = Path()
} else {
   generalPath!!.reset()
}
generalPath?.run {
    moveTo(45.1f, 1.0f)
    lineTo(72.0f, 27.7f)
    lineTo(72.0f, 99.0f)
    lineTo(0.2f, 99.0f)
    lineTo(0.2f, 1.0f)
    lineTo(45.100002f, 1.0f)
    close()
}
shape = Outline.Generic(generalPath!!)
drawOutline(outline = shape!!, style = stroke!!, brush=brush!!, alpha = alpha, blendMode = blendMode)
alpha = alphaStack.removeAt(0)
blendMode = blendModeStack.removeAt(0)
alphaStack.add(0, alpha)
alpha *= 1.0f
blendModeStack.add(0, BlendMode.SrcOver)
blendMode = BlendMode.SrcOver
// _0_2
if (generalPath == null) {
   generalPath = Path()
} else {
   generalPath!!.reset()
}
generalPath?.run {
    moveTo(40.5f, 83.8f)
    lineTo(44.4f, 85.0f)
    cubicTo(43.800003f, 87.2f, 42.800003f, 88.8f, 41.4f, 89.8f)
    cubicTo(40.0f, 90.9f, 38.2f, 91.4f, 36.100002f, 91.4f)
    cubicTo(33.4f, 91.4f, 31.300003f, 90.5f, 29.600002f, 88.700005f)
    cubicTo(27.900002f, 86.90001f, 27.0f, 84.4f, 27.0f, 81.3f)
    cubicTo(27.0f, 78.0f, 27.9f, 75.4f, 29.6f, 73.600006f)
    cubicTo(31.300001f, 71.80001f, 33.6f, 70.90001f, 36.4f, 70.90001f)
    cubicTo(38.800003f, 70.90001f, 40.800003f, 71.600006f, 42.4f, 73.100006f)
    cubicTo(43.300003f, 73.90001f, 44.0f, 75.200005f, 44.4f, 76.8f)
    lineTo(40.4f, 77.700005f)
    cubicTo(40.2f, 76.700005f, 39.7f, 75.9f, 38.9f, 75.3f)
    cubicTo(38.2f, 74.700005f, 37.2f, 74.4f, 36.2f, 74.4f)
    cubicTo(34.7f, 74.4f, 33.5f, 74.9f, 32.600002f, 76.0f)
    cubicTo(31.700005f, 77.1f, 31.


OptIn(DokkaPluginApiPreview::class)
@Suppress("FunctionName")
internal fun ProjectKotlinAnalysis(
    sourceSets: List<DokkaSourceSet>,
    context: DokkaContext,
    analysisConfiguration: DokkaAnalysisConfiguration = DokkaAnalysisConfiguration()
): KotlinAnalysis {
    val environments = sourceSets.associateWith { sourceSet ->
        createAnalysisContext(
            context = context,
            sourceSets = sourceSets,
            sourceSet = sourceSet,
            analysisConfiguration = analysisConfiguration
        )
    }
    return EnvironmentKotlinAnalysis(environments)
}

/**
 * [projectKotlinAnalysis] needs to be closed separately
 *  Usually the analysis created for samples is short-lived and can be closed right after
 *  it's been used, there's no need to wait for [projectKotlinAnalysis] to be closed as it must be handled separately.
 */
@OptIn(DokkaPluginApiPreview::class)
@Suppress("FunctionName")
internal fun SamplesKotlinAnalysis(
    sourceSets: List<DokkaSourceSet>,
    context: DokkaContext,
    projectKotlinAnalysis: KotlinAnalysis,
    analysisConfiguration: DokkaAnalysisConfiguration = DokkaAnalysisConfiguration()
): KotlinAnalysis {
    val environments = sourceSets
        .filter { it.samples.isNotEmpty() }
        .associateWith { sourceSet ->
            createAnalysisContext(
                context = context,
                classpath = sourceSet.classpath,
                sourceRoots = sourceSet.samples,
                sourceSet = sourceSet,
                analysisConfiguration = analysisConfiguration
            )
        }

    return EnvironmentKotlinAnalysis(environments, projectKotlinAnalysis)
}
@DokkaPluginApiPreview
public data class DokkaAnalysisConfiguration(
    /**
     * Only for common platform ignore BuiltIns for StdLib since it can cause a conflict
     * between BuiltIns from a compiler and ones from source code.
     */
    val ignoreCommonBuiltIns: Boolean = DEFAULT_IGNORE_COMMON_BUILT_INS
): ConfigurableBlock {
    public companion object {
        public const val DEFAULT_IGNORE_COMMON_BUILT_INS: Boolean = false
    }
}

/**
 * First child delegation. It does not close [parent].
 */
@InternalDokkaApi
public abstract class KotlinAnalysis(
    private val parent: KotlinAnalysis? = null
) : Closeable {

    public operator fun get(key: DokkaSourceSet): AnalysisContext {
        return get(key.sourceSetID)
    }

    internal operator fun get(key: DokkaSourceSetID): AnalysisContext {
        return find(key)
            ?: parent?.get(key)
            ?: throw IllegalStateException("Missing EnvironmentAndFacade for sourceSet $key")
    }

    internal abstract fun find(sourceSetID: DokkaSourceSetID): AnalysisContext?
}

internal open class EnvironmentKotlinAnalysis(
    private val environments: SourceSetDependent<AnalysisContext>,
    parent: KotlinAnalysis? = null,
) : KotlinAnalysis(parent = parent) {

    override fun find(sourceSetID: DokkaSourceSetID): AnalysisContext? =
        environments.entries.firstOrNull { (sourceSet, _) -> sourceSet.sourceSetID == sourceSetID }?.value

    override fun close() {
        environments.values.forEach(AnalysisContext::close)


PXM_Plant	"res/Stage/Plant.cpxm"
BIN PXM_Pole	"res/Stage/Pole.cpxm"
BIN PXM_Pool	"res/Stage/Pool.cpxm"
BIN PXM_Prefa1	"res/Stage/Prefa1.cpxm"
BIN PXM_Prefa2	"res/Stage/Prefa2.cpxm"
BIN PXM_Priso1	"res/Stage/Priso1.cpxm"
BIN PXM_Priso2	"res/Stage/Priso2.cpxm"
BIN PXM_Ring1	"res/Stage/Ring1.cpxm"
BIN PXM_Ring2	"res/Stage/Ring2.cpxm"
BIN PXM_Ring3	"res/Stage/Ring3.cpxm"
BIN PXM_River	"res/Stage/River.cpxm"
BIN PXM_Sand	"res/Stage/Sand.cpxm"
BIN PXM_SandE	"res/Stage/SandE.cpxm"
BIN PXM_Santa	"res/Stage/Santa.cpxm"
BIN PXM_Shelt	"res/Stage/Shelt.cpxm"
BIN PXM_Start	"res/Stage/Start.cpxm"
BIN PXM_Statue	"res/Stage/Statue.cpxm"
BIN PXM_Stream	"res/Stage/Stream.cpxm"
BIN PXM_Weed	"res/Stage/Weed.cpxm"
BIN PXM_WeedB	"res/Stage/WeedB.cpxm"
BIN PXM_WeedD	"res/Stage/WeedD.cpxm"
BIN PXM_WeedS	"res/Stage/WeedS.cpxm"

# Stage Entity Lists (PXE)
BIN PXE_0       "res/Stage/0.cke"
BIN PXE_Almond	"res/Stage/Almond.cke"
BIN PXE_Ballo1	"res/Stage/Ballo1.cke"
BIN PXE_Ballo2	"res/Stage/Ballo2.cke"
BIN PXE_Barr	"res/Stage/Barr.cke"
BIN PXE_Blcny1	"res/Stage/Blcny1.cke"
BIN PXE_Blcny2	"res/Stage/Blcny2.cke"
BIN PXE_Cave	"res/Stage/Cave.cke"
BIN PXE_Cemet	"res/Stage/Cemet.cke"
BIN PXE_Cent	"res/Stage/Cent.cke"
BIN PXE_CentW	"res/Stage/CentW.cke"
BIN PXE_Chako	"res/Stage/Chako.cke"
BIN PXE_Clock	"res/Stage/Clock.cke"
BIN PXE_Comu	"res/Stage/Comu.cke"
BIN PXE_Cthu	"res/Stage/Cthu.cke"
BIN PXE_Cthu2	"res/Stage/Cthu2.cke"
BIN PXE_Curly	"res/Stage/Curly.cke"
BIN PXE_CurlyS	"res/Stage/CurlyS.cke"
BIN PXE_Dark	"res/Stage/Dark.cke"
BIN PXE_Drain	"res/Stage/Drain.cke"
BIN PXE_e_Blcn	"res/Stage/e_Blcn.cke"
BIN PXE_e_Ceme	"res/Stage/e_Ceme.cke"
BIN PXE_e_Jenk	"res/Stage/e_Jenk.cke"
BIN PXE_e_Labo	"res/Stage/e_Labo.cke"
BIN PXE_e_Malc	"res/Stage/e_Malc.cke"
BIN PXE_e_Maze	"


]?.length ?? 0} 个结果');
          return data;
        } else {
          debugPrint('弹弹play API未能精确匹配');
          return {};
        }
      } else {
        debugPrint('弹弹play匹配API请求失败: ${response.statusCode}');
        return {};
      }
    } catch (e) {
      debugPrint('调用弹弹play匹配API时出错: $e');
      return {};
    }
  }

  /// 通过DandanPlay搜索动画
  Future<List<Map<String, dynamic>>> _searchAnime(String title) async {
    if (title.isEmpty) {
      debugPrint('搜索动画的标题为空');
      return [];
    }

    try {
      debugPrint('开始搜索动画: "$title"');

      // 获取DandanPlay的appSecret
      final appSecret = await DandanplayService.getAppSecret();
      final timestamp = (DateTime.now().toUtc().millisecondsSinceEpoch / 1000).round();
      const apiPath = '/api/v2/search/anime';

      final url = 'https://api.dandanplay.net/api/v2/search/anime?keyword=${Uri.encodeComponent(title)}';
      debugPrint('请求URL: $url');

      final response = await http.get(
        Uri.parse(url),
        headers: {
          'Accept': 'application/json',
          'X-AppId': DandanplayService.appId,
          'X-Signature': DandanplayService.generateSignature(
            DandanplayService.appId,
            timestamp,
            apiPath,
            appSecret
          ),
          'X-Timestamp': '$timestamp',
        },
      );

      debugPrint('搜索结果状态码: ${response.statusCode}');

      if (response.statusCode == 200) {
        final data = json.decode(response.body);

        // 打印前100个字符，避免日志过长
        final previewText = response.body.length > 100 ?
            '${response.body.substring(0, 100)}...(总长度: ${response.body.length})' :
            response.body;
        debugPrint('搜索结果预览: $previewText');

        // 检查是否有'animes'字段且不为空
        if (data['animes'] != null && data['animes'] is List && data['animes'].isNotEmpty) {
          final results = List<Map<String, dynamic>>.from(data['animes']);
          debugPrint('找到 ${results.length} 个匹配动画');

          // 检查返回的结果是否包含所需字段
          bool hasValidResults = false;
          for (var anime in results) {
            if (anime['animeId'] != null && anime['animeTitle'] != null) {
              hasValidResults = true;
              break;
            }
          }

          if (!hasValidResults) {
            debugPrint('警告: 所有结果都不包含必要的animeId或animeTitle字段');
          } else {
            // 打印第一个结果的基本信息
            if (results.isNotEmpty) {
              final first = results.first;
              debugPrint('第一个结果: ID=${first['animeId']}, 标题=${first['animeTitle']}, 类型=${first['typeDescription']}');
            }
          }

          return results;
        } else {
          debugPrint('没有匹配的动画: animes=${data['animes'] ?? "null"}');

          // 检查是否有错误信息
          if (data.containsKey('errorMessage') && data


// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#nullable enable

using System;
using System.Collections.Generic;
using System.Net;
using System.Net.WebSockets;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using IAsyncDisposable = System.IAsyncDisposable;

namespace Aspire.Tools.Service;

/// <summary>
/// Implementation of the AspireServerService. A new instance of this service will be created for each
/// each call to IServiceBroker.CreateProxy()
/// </summary>
internal partial class AspireServerService : IAsyncDisposable
{
    public const string DebugSessionPortEnvVar = "DEBUG_SESSION_PORT";
    public const string DebugSessionTokenEnvVar = "DEBUG_SESSION_TOKEN";
    public const string DebugSessionServerCertEnvVar = "DEBUG_SESSION_SERVER_CERTIFICATE";

    public const int PingIntervalInSeconds = 5;

    private readonly IAspireServerEvents _aspireServerEvents;

    private readonly Action<string>? _reporter;

    private readonly string _currentSecret;
    private readonly string _displayName;

    private readonly CancellationTokenSource _shutdownCancellationTokenSource = new();
    private readonly int _port;
    private readonly X509Certificate2 _certificate;
    private readonly string _certificateEncodedBytes;

    private readonly SemaphoreSlim _webSocketAccess = new(1);

    private readonly SocketConnectionManager _socketConnectionManager = new();

    private volatile bool _isDisposed;

    private static readonly char[] s_charSeparator = { ' ' };

    private readonly Task _requestListener;

    public static readonly JsonSerializerOptions JsonSerializerOptions = new()
    {
        DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
        PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
        Converters =
        {
            new JsonStringEnumConverter(JsonNamingPolicy.CamelCase, allowIntegerValues: false)
        }
    };

    public AspireServerService(IAspireServerEvents aspireServerEvents, string displayName, Action<string>? reporter)
    {
        _aspireServerEvents = aspireServerEvents;
        _reporter = reporter;
        _displayName = displayName;

        _port = SocketUtilities.GetNextAvailablePort();

        // Set up the encryption so we can use it to generate our secret.
        var aes = Aes.Create();
        aes.Mode = CipherMode.CBC;
        aes.KeySize = 128;
        aes.Padding = PaddingMode.PKCS7;
        aes.GenerateKey();
        _currentSecret = Convert.ToBase64String(aes.Key);

        _certificate = CertGenerator.GenerateCert();
        var certBytes = _certificate.Export(X509ContentType.Cert);
        _certificateEncodedBytes = Convert.ToBase64String(certBytes);

        // Kick of the web server.
        _requestListener = StartListeningAsync();
    }

    public async ValueTask DisposeAsync()
    {
        // Shutdown the service:
        _shutdownCancellationTokenSource.Cancel();

        Log("Waiting for server to shutdown ...");

        try
        {
            await _requestListener;
        }
        catch (OperationCanceledException)
        {
            // nop
        }

        _isDisposed = true;

        _socketConnectionManager.Dispose();
        _certificate.Dispose();
        _shutdownCancellationTokenSource.Dispose();
    }

    /// <inheritdoc/>
    public List<KeyValuePair<string, string>> GetServerConnectionEnvironment()
        =>
        [
            new(DebugSessionPortEnvVar, $"localhost:{_port}"),
            new(DebugSessionTokenEnvVar, _currentSecret),
            new(DebugSessionServerCertEnvVar, _certificateEncodedBytes),
        ]


            test: [[x => Array.isArray(x), [undefined, f2]]]
        }
        const tm = compileTypemap(tmc)
        const result = resolve([], tm)
        expect(result[0]).toBe(f1)
        expect(result[1]).toBe(f2)
    })
})// ===== Crypto Utilities ======================================================

/**
 * This module contains various functions that aid in the decryption of sticker
 * pack data from Signal. Browser detection for browser support of the
 * SubtleCrypto API should probably be added at some point.
 *
 * See: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto
 */
import ErrorWithCode from 'lib/error';

/**
 * [private]
 *
 * Converts the provided string to a Uint8Array.
 */
function hexToArrayBuffer(hexString: string) {
  const result = [];
  let tmpHexString = hexString;

  while (tmpHexString.length >= 2) {
    result.push(parseInt(tmpHexString.substring(0, 2), 16));
    tmpHexString = tmpHexString.substring(2, tmpHexString.length);
  }

  return new Uint8Array(result);
}

/**
 * [private]
 *
 * See: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/deriveKey
 */
async function deriveKeys(encodedKey: string) {
  const masterKey = await window.crypto.subtle.importKey('raw', hexToArrayBuffer(encodedKey), 'HKDF', false, ['deriveKey']);

  const algorithm: HkdfParams = {
    name: 'HKDF',
    hash: 'SHA-256',
    salt: new ArrayBuffer(32),
    info: new TextEncoder().encode('Sticker Pack')
  };

  const derivedKeyAlgorithm = {
    name: 'HMAC',
    hash: 'SHA-256',
    length: 512
  };

  // @ts-ignore (The typedef for the SubtleCrypto API incorrectly states that
  // we need an HkdfCtrParams object as our first param when in fact we need a
  // HkdfParams object.)
  const derivedKeys = await window.crypto.subtle.deriveKey(algorithm, masterKey, derivedKeyAlgorithm, true, ['verify']);

  const derivedKeyBytes = await window.crypto.subtle.exportKey('raw', derivedKeys);
  return [derivedKeyBytes.slice(0, 32), derivedKeyBytes.slice(32, 64)];
}

/**
 * Decrypts a manifest returned from the Signal API using a sticker pack's
 * pack key, provided from stickers.json.
 */
export async function decryptManifest(encodedKey: string, rawManifest: any) {
  try {
    const keys = await deriveKeys(encodedKey);
    const encryptedManifest = new Uint8Array(rawManifest);
    const theirIv = encryptedManifest.slice(0, 16);
    const cipherTextBody = encryptedManifest.slice(16, encryptedManifest.byteLength - 32);
    const theirMac = encryptedManifest.slice(encryptedManifest.byteLength - 32, encryptedManifest.byteLength);
    const combinedCipherText = encryptedManifest.slice(0, encryptedManifest.byteLength - 32);
    const macKey = await window.crypto.subtle.importKey('raw', keys[1], {name: 'HMAC', hash: {name: 'SHA-256'}}, false, ['verify', 'sign']);
    const isValid = await window.crypto.subtle.verify('HMAC', macKey, theirMac, combinedCipherText);

    if (!isValid) {
      throw new Error('MAC verification failed.');
    }

    const cipherKey = await window.crypto.subtle.importKey('raw', keys[0], 'AES-CBC', false, ['decrypt']);
    return window.crypto.subtle.decrypt({name: 'AES-CBC', iv: theirIv}, cipherKey, cipherTextBody);
  } catch (err) {
    throw


/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/

#ifndef QMULTIMEDIA_H
#define QMULTIMEDIA_H

#include <QtCore/qpair.h>
#include <QtCore/qmetatype.h>
#include <QtCore/qstring.h>

#include <QtMultimedia/qtmultimediadefs.h>

QT_BEGIN_NAMESPACE

namespace QMultimedia
{
    enum SupportEstimate
    {
        NotSupported,
        MaybeSupported,
        ProbablySupported,
        PreferredService
    };

    enum EncodingQuality
    {
        VeryLowQuality,
        LowQuality,
        NormalQuality,
        HighQuality,
        VeryHighQuality
    };

    enum EncodingMode
    {
        ConstantQualityEncoding,
        ConstantBitRateEncoding,
        AverageBitRateEncoding,
        TwoPassEncoding
    };

    enum AvailabilityStatus
    {
        Available,
        ServiceMissing,
        Busy,
        ResourceError
    };

}

QT_END_NAMESPACE

Q_DECLARE_METATYPE(QMultimedia::AvailabilityStatus)
Q_DECLARE_METATYPE(QMultimedia::SupportEstimate)
Q_DECLARE_METATYPE(QMultimedia::EncodingMode)
Q_DECLARE_METATYPE(QMultimedia::EncodingQuality)

#endif


  pub fn destroy_context(handle: ContextHandle) {
        Self::contexts().contexts.remove(&handle);
    }

    pub fn required_context(context: ContextHandle) -> ClientResult<Arc<ClientContext>> {
        Ok(Arc::clone(
            Self::contexts()
                .contexts
                .get(&context)
                .ok_or(Error::invalid_context_handle(context))?,
        ))
    }
}
<filename>bitcoinsuite-core/src/tx.rs<gh_stars>0
use crate::{
    get_merkle_root_and_height, BitcoinCode, Bytes, BytesMut, Hashed, MerkleMode, Result, Script,
    SequenceNo, Sha256d, SignData,
};

#[derive(Debug, Clone, PartialEq, Eq, Default)]
pub struct UnhashedTx {
    pub version: i32,
    pub inputs: Vec<TxInput>,
    pub outputs: Vec<TxOutput>,
    pub lock_time: u32,
}

#[derive(Debug, Clone, PartialEq, Eq, Default)]
pub struct Tx {
    unhashed_tx: UnhashedTx,
    hash: Sha256d,
    raw: Bytes,
}

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Default, Hash)]
pub struct OutPoint {
    pub txid: Sha256d,
    pub out_idx: u32,
}

#[derive(Debug, Clone, PartialEq, Eq, Default)]
pub struct TxInput {
    pub prev_out: OutPoint,
    pub script: Script,
    pub sequence: SequenceNo,
    pub sign_data: Option<SignData>,
}

#[derive(Debug, Clone, PartialEq, Eq, Default)]
pub struct TxOutput {
    pub value: i64,
    pub script: Script,
}

#[derive(Debug, Clone, PartialEq, Eq, Default)]
pub struct Coin {
    pub tx_output: TxOutput,
    pub height: Option<i32>,
    pub is_coinbase: bool,
}

impl UnhashedTx {
    pub fn hashed(self) -> Tx {
        let mut data = BytesMut::new();
        self.ser_to(&mut data);
        let raw = data.freeze();
        let hash = Sha256d::digest(raw.clone());
        Tx {
            unhashed_tx: self,
            hash,
            raw,
        }
    }
}

pub fn lotus_txid(tx: &UnhashedTx) -> Sha256d {
    let mut data = BytesMut::new();
    tx.version.ser_to(&mut data);
    let (inputs_hash, inputs_height) = lotus_tx_inputs_merkle_root(&tx.inputs);
    inputs_hash.ser_to(&mut data);
    (inputs_height as u8).ser_to(&mut data);
    let (outputs_hash, outputs_height) = lotus_tx_outputs_merkle_root(&tx.outputs);
    outputs_hash.ser_to(&mut data);
    (outputs_height as u8).ser_to(&mut data);
    tx.lock_time.ser_to(&mut data);
    Sha256d::digest(data.freeze())
}

fn lotus_tx_inputs_merkle_root(inputs: &[TxInput]) -> (Sha256d, usize) {
    let leaves = inputs
        .iter()
        .map(|input| {
            let mut data = BytesMut::new();
            input.prev_out.ser_to(&mut data);
            input.sequence.ser_to(&mut data);
            Sha256d::digest(data.freeze())
        })
        .collect::<Vec<_>>();
    get_merkle_root_and_height(leaves, MerkleMode::Lotus)
}

fn lotus_tx_outputs_merkle_root(outputs: &[TxOutput]) -> (Sha256d, usize) {
    let leaves = outputs
        .iter()
        .map(|output| Sha256d::digest(output.ser()))
        .collect::<Vec<_>>();
    get_merkle_root_and_height(leaves, MerkleMode::Lotus)
}

impl Tx {
    pub fn hash(&self) -> &Sha256d {
        &self.hash
    }


ut of the bathroom)

Chandler: (hysterical)Don't touch the phone! I'll get it, I'll
get it, I'll get it!! (picks up the phone)

Ross: (to Monica)Think he washed his hands?

Chandler: (into receiver)Hello? Hey Charlie, what do you know?

Rachel: (to Monica)What's going on?

Monica: Chandler is supposed to find out if he's getting an
assistent job at his ad agency. But out of the 15 interns, they are
only hiring three.

Joey: Ooh! Tough odds!

Ross: (mockingly)Yeah if only it were a sure thing like your
24 state lottery!

Joey: (smiling)Look who's coming around!

Chandler: (still on the phone)Damnit. Alright call me when
you know more.

Joey: (excited)Did you get it?

Chandler: One of the slots got filled.

Joey: (Still excited)By you!?

Chandler: Sense the tone! No that kid Nate got it.

Monica: Oh! I hate that guy! I mean come on kid! Pull up your
pants!

Chandler: Yeah I know.

Rachel: Well, there's two spots left right?

Chandler: Yeah...I mean I want this so much! I mean, I wanna
get one, I want my friend Charlie to get one...Except I don't care
about Charlie.

(Phoebe enters)

Phoebe: (excited)Hey you guys! Ok, you're not going to
believe this! I just saw my psychic and she said I was definitely gonna
win the lottery tonight!

Monica: Hey that reminds me, I thought we could use some extra
luck so I brought a wishbone home from work.

Ross: (mockingly)A psychic AND a wishbone? Guys! Give someone
else a chance!

Monica: Alright, who wants to do it?

Phoebe: Oh can I? Vegetarians never get to do the wishbone.
It's really not fair either! You know, just because we don't eat the
meat doesn't mean we don't like to play with the carcasses!

Monica: Ok, hey Rach?

Rachel: Oh no, I'm good, I don't wanna get that turkey smell
all over my hands.

Joey: I'll do it!! It'll get the casserole stink off of mine.

(Phoebe and Joey both grab one side of the wishbone)

Phoebe: I hope I win!

Monica: Well, it doesn't really matter ... you're both wishing
for the same thing, right?

Joey: I can't tell you what I'm wishing for! Else...you
know...won't come true!

Monica: Right! .. but we "know" what you're wishing for!

Joey: Can't really say!

Monica: I understand, but you're wishing for what we think
you're wishing for, aren't you?</


67-1.5-1.5-1.5h-16c-.83 0-1.5.67-1.5 1.5S2.67 22 3.5 22M16 11.5v4c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5M10.57 1.49l-7.9 4.16c-.41.21-.67.64-.67 1.1C2 7.44 2.56 8 3.25 8h16.51C20.44 8 21 7.44 21 6.75c0-.46-.26-.89-.67-1.1l-7.9-4.16c-.58-.31-1.28-.31-1.86 0"}),"AccountBalanceRounded"),d1=h(c.jsx("path",{d:"M4 10v7h3v-7zm6 0v7h3v-7zM2 22h19v-3H2zm14-12v7h3v-7zm-4.5-9L2 6v2h19V6z"}),"AccountBalanceSharp"),z1=h([c.jsx("path",{d:"m6.29 6 5.21-2.74L16.71 6z",opacity:".3"},"0"),c.jsx("path",{d:"M6.5 10h-2v7h2zm6 0h-2v7h2zm8.5 9H2v2h19zm-2.5-9h-2v7h2zm-7-9L2 6v2h19V6zM6.29 6l5.21-2.74L16.71 6z"},"1")],"AccountBalanceTwoTone"),m1=h(c.jsx("path",{d:"M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2zm-9-2h10V8H12zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"AccountBalanceWallet"),p1=h([c.jsx("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),c.jsx("circle",{cx:"16",cy:"12",r:"1.5"},"1")],"AccountBalanceWalletOutlined"),H1=h(c.jsx("path",{d:"M10 16V8c0-1.1.89-2 2-2h9V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-1h-9c-1.11 0-2-.9-2-2m3-8c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h9V8zm3 5.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1


Title":"Formati i Paragrafit","tag_address":"Adresa","tag_div":"Normal (DIV)","tag_h1":"Titulli 1","tag_h2":"Titulli 2","tag_h3":"Titulli 3","tag_h4":"Titulli 4","tag_h5":"Titulli 5","tag_h6":"Titulli 6","tag_p":"Normal","tag_pre":"Formatuar"},"horizontalrule":{"toolbar":"Vendos Vijë Horizontale"},"iframe":{"border":"Shfaq kufirin e kornizës","noUrl":"Ju lutemi shkruani URL-në e iframe-it","scrolling":"Lejo shiritët zvarritës","title":"Karakteristikat e IFrame","toolbar":"IFrame"},"image":{"alertUrl":"Please type the image URL","alt":"Tekst Alternativ","border":"Korniza","btnUpload":"Dërgo në server","button2Img":"Do you want to transform the selected image button on a simple image?","hSpace":"HSpace","img2Button":"Do you want to transform the selected image on a image button?","infoTab":"Informacione mbi Fotografinë","linkTab":"Nyja","lockRatio":"Mbyll Racionin","menu":"Karakteristikat e Fotografisë","resetSize":"Rikthe Madhësinë","title":"Karakteristikat e Fotografisë","titleButton":"Karakteristikat e Pullës së Fotografisë","upload":"Ngarko","urlMissing":"Mungon URL e burimit të fotografisë.","vSpace":"Hapësira Vertikale","validateBorder":"Korniza duhet të jetë numër i plotë.","validateHSpace":"Hapësira horizontale duhet të jetë numër i plotë.","validateVSpace":"Hapësira vertikale duhet të jetë numër i plotë."},"indent":{"indent":"Rrite Identin","outdent":"Zvogëlo Identin"},"smiley":{"options":"Opsionet e Ikonave","title":"Vendos Ikonë","toolbar":"Ikona"},"justify":{"block":"Zgjero","center":"Qendër","left":"Rreshto majtas","right":"Rreshto Djathtas"},"link":{"acccessKey":"Sipas ID-së së Elementit","advanced":"Të përparuara","advisoryContentType":"Advisory Content Type","advisoryTitle":"Titull","anchor":{"toolbar":"Spirancë","menu":"Redakto Spirancën","title":"Anchor Properties","name":"Emri i Spirancës","errorName":"Ju lutemi shkruani emrin e spirancës","remove":"Largo Spirancën"},"anchorId":"Sipas ID-së së Elementit","anchorName":"Sipas Emrit të Spirancës","charset":"Linked Resource Charset","cssClasses":"Klasa stili CSS","emailAddress":"Posta Elektronike","emailBody":"Trupi i Porosisë","emailSubject":"Titulli i Porosisë","id":"Id","info":"Informacione të Nyjes","langCode":"Kod gjuhe","langDir":"Drejtim teksti","langDirLTR":"Nga e majta në të djathë (LTR)","langDirRTL":"Nga e djathta në të majtë (RTL)","menu":"Redakto Nyjen","name":"Emër","noAnchors":"(Nuk ka asnjë spirancë në dokument)","noEmail":"Ju lutemi shkruani postën elektronike","noUrl":"Ju lutemi shkruani URL-në e nyjes","other":"<tjetër>","popupDependent":"E Varur (Netscape)","popupFeatures":"Popup Window Features","popupFullScreen":"Ekran i Plotë  (IE)","popupLeft":"Pozita Majtas","popupLocationBar":"Shiriti i


= 26)
      "rjmp .+0"                "\n\t" // 2    nop nop       (T = 28)
      "rjmp head30"             "\n\t" // 2    -> head30 (next bit out)
     "nextbyte30:"              "\n\t" //                    (T = 22)
      "nop"                     "\n\t" // 1    nop           (T = 23)
      "ldi  %[bit]  , 8"        "\n\t" // 1    bit = 8       (T = 24)
      "ld   %[byte] , %a[ptr]+" "\n\t" // 2    b = *ptr++    (T = 26)
      "sbiw %[count], 1"        "\n\t" // 2    i--           (T = 28)
      "brne head30"             "\n"   // 1-2  if(i != 0) -> (next byte)
      : [port]  "+e" (port),
        [byte]  "+r" (b),
        [bit]   "+r" (bit),
        [next]  "+r" (next),
        [count] "+w" (i)
      : [hi]     "r" (hi),
        [lo]     "r" (lo),
        [lo]     "r" (lo),
        [ptr]    "e" (ptr));
  }
#endif // NEO_KHZ400

// 16 MHz(ish) AVR --------------------------------------------------------
#elif (F_CPU >= 15400000UL) && (F_CPU <= 19000000L)

#ifdef NEO_KHZ400 // 800 KHz check needed only if 400 KHz support enabled
  if(is800KHz) {
#endif

    // WS2811 and WS2812 have different hi/lo duty cycles; this is
    // similar but NOT an exact copy of the prior 400-on-8 code.

    // 20 inst. clocks per bit: HHHHHxxxxxxxxLLLLLLL
    // ST instructions:         ^   ^        ^       (T=0,5,13)

    volatile uint8_t next, bit;

    hi   = *port |  pinMask;
    lo   = *port & ~pinMask;
    next = lo;
    bit  = 8;

    asm volatile(
     "head20:"                   "\n\t" // Clk  Pseudocode    (T =  0)
      "st   %a[port],  %[hi]"    "\n\t" // 2    PORT = hi     (T =  2)
      "sbrc %[byte],  7"         "\n\t" // 1-2  if(b & 128)
       "mov  %[next], %[hi]"     "\n\t" // 0-1   next = hi    (T =  4)
      "dec  %[bit]"              "\n\t" // 1    bit--         (T =  5)
      "st   %a[port],  %[next]"  "\n\t" // 2    PORT = next   (T =  7)
      "mov  %[next] ,  %[lo]"    "\n\t" // 1    next = lo     (T =  8)
      "breq nextbyte20"          "\n\t" // 1-2  if(bit == 0) (from dec above)
      "rol  %[byte]"             "\n\t" // 1    b <<= 1       (T = 10)
      "rjmp .+0"                 "\n\t" // 2    nop nop       (T = 12)
      "nop"                      "\n\t" // 1    nop           (T = 13)
      "st   %a[port],  %[lo]"    "\n\t" // 2    PORT = lo     (T = 15)
      "nop"                      "\n\t" // 1    nop           (T = 16)
      "rjmp .+0"                 "\n\t" // 2    nop nop       (T = 18)
      "rjmp head20"              "\n\t" // 2    -> head20 (next


e;
import io.github.kiryu1223.drink.core.api.Result;
import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Inject;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.annotation.Path;

import java.util.List;

@Controller
public class MyController
{
    @Inject
    MyService myService;

    @Mapping("/test1")
    public long test1()
    {
        return myService.showCount();
    }

    @Mapping("/test2")
    public List<? extends Result> test2()
    {
        return myService.showList();
    }

    @Mapping("/test3")
    public long test3()
    {
        return myService.insertTest();
    }

    @Mapping("/test4")
    public long test4()
    {
        return myService.dataBaseTest();
    }

    @Inject
    EmployeeService employeeService;

    @Mapping("/employeeData/{empId}")
    public Result employeeData(@Path int empId)
    {
        return employeeService.getEmployeeDataByEmployeeNumber(empId);
    }

    @Mapping("/findEmployee/{departmentId}")
    public List<? extends Result> findEmployee(@Path String departmentId)
    {
        return employeeService.findEmployeesDataByDepartmentNumber(departmentId);
    }

    @Mapping("/employeeSalary/{empId}")
    public List<? extends Result> employeeSalary(@Path int empId)
    {
        return employeeService.findEmployeeSalaryHistoryByEmployeeNumber(empId);
    }

    @Mapping("/deptManagerEmployee/{departmentId}")
    public Result deptManagerEmployee(@Path String departmentId)
    {
        return employeeService.getDeptManagerEmployeeByDepartmentNumber(departmentId);
    }

    @Mapping("/employeeWorkedTime/{empId}")
    public Result employeeWorkedTime(@Path int empId)
    {
        return employeeService.getEmployeeWorkedTimeByEmployeeId(empId);
    }

    @Mapping("/averageSalary/{departmentId}")
    public Result averageSalary(@Path String departmentId)
    {
        return employeeService.getAverageSalaryByDepartmentId(departmentId);
    }
}
/*
 * Copyright 2017-2024 noear.org and authors
 *
 * 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
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.github.kiryu1223.drink.core;

import io.github.kiryu1223.drink.base.*;
import io.github.kiryu1223.drink.base.converter.NameConverter;
import io.github.kiryu1223.drink.base.dataSource.DataSourceManager;
import io.github.kiryu1223.drink.base.expression.SqlExpressionFactory;
import io.github.kiryu1223.drink.base.log.ISqlLogger;
import io.github.kiryu1223.drink.base.metaData.MetaData;
import io.github.kiryu1223.drink.base.page.Pager;
import io.github.kiryu1223.drink.base.toBean.beancreator.BeanCreatorFactory;
import io.github.kiryu1223.drink.base.transaction.TransactionManager;
import io.github.kiryu1223.drink.base.transform.Transformer;
import io.github.kiryu1223.drink.core.log.DefaultSqlLogger;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author


進。

#### 6. **GWASの発見**
この変異に関する特定のGWASの発見はありませんが、癌や過成長症候群における役割は臨床研究で十分に文書化されています。

#### 参考文献
- TogoVar: [rs121913279](https://togovar.org/variant/rs121913279)
- ClinVar: [VCV000013652](https://www.ncbi.nlm.nih.gov/clinvar/variation/13652), [VCV000013653](https://www.ncbi.nlm.nih.gov/clinvar/variation/13653)### English
The rs587782044 variant is located in the **CDH1 gene**, which encodes **E-cadherin**, a protein critical for cell-cell adhesion and maintaining epithelial integrity. This variant has two alternate alleles: **G>A** and **G>T**, both of which result in missense mutations that alter the amino acid sequence of the protein. Below is a detailed analysis of the structural and functional impact:

---

#### 1. **Variant Identification**
- **Gene Name**: CDH1
- **HGVS Notation**:
  - For G>A: **NM_004360.5:c.1687G>A (p.Ala563Thr)**
  - For G>T: **NM_004360.5:c.1687G>T (p.Ala563Ser)**
- **rs Number**: [rs587782044](https://identifiers.org/dbsnp/rs587782044)
- **TogoVar Link**: [TogoVar rs587782044](https://togovar.org/variant/16-68819401-G-A)

---

#### 2. **Disease Associations**
- Both alleles are associated with **Hereditary cancer-predisposing syndrome** and **Hereditary diffuse gastric adenocarcinoma (HDGC)**, as reported in ClinVar:
  - **ClinVar Links**:
    - [VCV000481681 (G>A)](https://www.ncbi.nlm.nih.gov/clinvar/variation/481681)
    - [VCV000141834 (G>T)](https://www.ncbi.nlm.nih.gov/clinvar/variation/141834)

---

#### 3. **Functional Impact**
- **G>A (p.Ala563Thr)**:
  - **SIFT Score**: 0.0 (deleterious)
  - **PolyPhen Score**: 0.887 (possibly damaging)
  - **AlphaMissense Score**: 0.136 (low pathogenicity prediction)
- **G>T (p.Ala563Ser)**:
  - **SIFT Score**: 0.01 (deleterious)
  - **PolyPhen Score**: 0.936 (possibly damaging)
  - **AlphaMissense Score**: 0.1621 (low pathogenicity prediction)

Both mutations occur in the extracellular domain of E-cadherin, which is essential for calcium-dependent adhesion. Alterations in this domain can disrupt protein folding, stability, and its ability to mediate cell-cell adhesion, leading to increased cellular motility and invasiveness—a hallmark of cancer pro


ist-persons .profile-mail .email-general ul {
    padding-left: 0;
  }
  html[dir=rtl] .product-wrapper.sidebaron .product-grid .product-wrapper-grid {
    margin-right: 0;
  }
  html[dir=rtl] .product-sidebar {
    transform: translateX(300px) scaleX(1);
  }
  html[dir=rtl] .product-sidebar.open {
    transform: translateX(0px) scaleX(1);
  }
  html[dir=rtl] .feature-products .filter-toggle {
    margin-right: 10px;
    margin-left: unset;
  }
  html[dir=rtl] .user-profile .hovercard .user-image .share-icons {
    left: 25px !important;
  }
  html[dir=rtl] .ecommerce-widget .text-md-right {
    text-align: left !important;
  }
  html[dir=rtl] .bar-chart-widget .earning-details i {
    left: -147px !important;
  }
}
@media (min-width: 576px) {
  html[dir=rtl] .offset-sm-3 {
    margin-right: 25%;
    margin-left: unset;
  }
  html[dir=rtl] .text-sm-end {
    text-align: left !important;
  }
  html[dir=rtl] .float-sm-end {
    float: left !important;
  }
  html[dir=rtl] .me-sm-2 {
    margin-left: 0.5rem !important;
    margin-right: unset !important;
  }
}
@media only screen and (max-width: 575.98px) {
  html[dir=rtl] .todo .todo-list-wrapper .mark-all-tasks {
    left: 15px;
  }
  html[dir=rtl] .list-persons .nav-pills .nav-link .media .media-body {
    text-align: right;
  }
  html[dir=rtl] .mega-menu {
    padding-left: unset;
    padding-right: 15px;
  }
  html[dir=rtl] .page-wrapper .page-header .header-wrapper .nav-right > ul li {
    margin-right: unset;
    margin-left: 1px;
  }
  html[dir=rtl] .page-wrapper .page-header .header-wrapper .search-full .form-group .close-search {
    left: 0;
  }
  html[dir=rtl] .page-wrapper.compact-wrapper .page-header .header-wrapper .toggle-sidebar, html[dir=rtl] .page-wrapper.compact-sidebar .page-header .header-wrapper .toggle-sidebar {
    margin-left: 8px;
    padding-left: 8px;
    margin-right: unset;
    padding-right: unset;
    border-right: unset;
    border-left: 1px solid #ddd;
  }
  html[dir=rtl] .translate_wrapper.active .more_lang.active {
    left: unset;
    right: 12px;
  }
  html[dir=rtl] .page-header .header-wrapper .nav-right > ul > li:last-child {
    padding-right: 10px;
  }
  html[dir=rtl] .page-header .header-wrapper .nav-right.right-header ul.notification-dropdown {
    left: unset !important;
    right: 15px !important;
  }
  html[dir=rtl] .faq-accordion .faq-header svg {
    left: 15px;
  }
  html[dir=rtl] .user-profile .hovercard .user-image .share-icons {
    left: 15px !important;
  }
  html[dir=rtl] .user-profile .hovercard .user-image .share-icons li {
    margin-left: 0px;
  }
  html[dir=rtl] .main .langChoice {


)
  - [一 什么是消息队列](#一-什么是消息队列)
  - [二 为什么要用消息队列](#二-为什么要用消息队列)
    - [\(1\) 通过异步处理提高系统性能（削峰、减少响应所需时间）](#1-通过异步处理提高系统性能削峰减少响应所需时间)
    - [\(2\) 降低系统耦合性](#2-降低系统耦合性)
  - [三 使用消息队列带来的一些问题](#三-使用消息队列带来的一些问题)
  - [四 JMS VS AMQP](#四-jms-vs-amqp)
    - [4.1 JMS](#41-jms)
      - [4.1.1 JMS 简介](#411-jms-简介)
      - [4.1.2 JMS两种消息模型](#412-jms两种消息模型)
      - [4.1.3 JMS 五种不同的消息正文格式](#413-jms-五种不同的消息正文格式)
    - [4.2 AMQP](#42-amqp)
    - [4.3 JMS vs AMQP](#43-jms-vs-amqp)
  - [五 常见的消息队列对比](#五-常见的消息队列对比)

<!-- /MarkdownTOC -->

# 消息队列其实很简单

　　“RabbitMQ？”“Kafka？”“RocketMQ？”...在日常学习与开发过程中，我们常常听到消息队列这个关键词。我也在我的多篇文章中提到了这个概念。可能你是熟练使用消息队列的老手，又或者你是不懂消息队列的新手，不论你了不了解消息队列，本文都将带你搞懂消息队列的一些基本理论。如果你是老手，你可能从本文学到你之前不曾注意的一些关于消息队列的重要概念，如果你是新手，相信本文将是你打开消息队列大门的一板砖。

## 一 什么是消息队列

　　我们可以把消息队列比作是一个存放消息的容器，当我们需要使用消息的时候可以取出消息供自己使用。消息队列是分布式系统中重要的组件，使用消息队列主要是为了通过异步处理提高系统性能和削峰、降低系统耦合性。目前使用较多的消息队列有ActiveMQ，RabbitMQ，Kafka，RocketMQ，我们后面会一一对比这些消息队列。

　　另外，我们知道队列 Queue 是一种先进先出的数据结构


IND11_MODULE(batch_mcts, m) {
  py::class_<mcts::Batch_MCTS>(m, "Batch_MCTS")
      .def(py::init<int>())
      .def("reset", &mcts::Batch_MCTS::reset)
      .def("clear", &mcts::Batch_MCTS::clear)
      .def("batch_traverse", &mcts::Batch_MCTS::batch_traverse)
      .def("batch_back_propagate", &mcts::Batch_MCTS::batch_back_propagate)
      .def("batch_get_distribution", &mcts::Batch_MCTS::batch_get_distribution)
      .def("batch_get_value", &mcts::Batch_MCTS::batch_get_value)
      .def("print_all_trees", &mcts::Batch_MCTS::print_all_trees);

  py::class_<mcts::Multithread_Batch_MCTS>(m, "Multithread_Batch_MCTS")
      .def(py::init<int>())
      .def("reset", &mcts::Multithread_Batch_MCTS::reset)
      .def("clear", &mcts::Multithread_Batch_MCTS::clear)
      .def("batch_traverse", &mcts::Multithread_Batch_MCTS::batch_traverse)
      .def("batch_back_propagate",
           &mcts::Multithread_Batch_MCTS::batch_back_propagate)
      .def("batch_get_distribution",
           &mcts::Multithread_Batch_MCTS::batch_get_distribution)
      .def("batch_get_value", &mcts::Multithread_Batch_MCTS::batch_get_value)
      .def("print_all_trees", &mcts::Multithread_Batch_MCTS::print_all_trees);
}
#ifndef _BAYES_FILTER_UNSCENTED
#define _BAYES_FILTER_UNSCENTED

/*
 * Bayes++ the Bayesian Filtering Library
 * Copyright (c) 2002 Michael Stevens
 * See accompanying Bayes++.htm for terms and conditions of use.
 *
 * $Id: unsFlt.hpp 634 2010-08-15 16:39:44Z mistevens $
 */

/*
 * Unscented Filter Scheme.
 *  A Julier-Uhlmann Unscented non-linear Kalman filter
 *  Uses the classic implementation of the Duplex Unscented transform.
 * The Unscented transform is used for non-linear state and observation predictions
 *
 * Observations are fused using innovation gain equations from a Covariance filter
 *
 * Predictions of state and state covariance (and observation) use
 * Unscented transformations to interpolate the non-linear predict and observe
 * models. Unscented transforms can be further optimised by vary the Kappa
 * parameter from its usual value of 1.
 * Discontinuous observe models require that a normalisation function.
 *
 * The predict model is represented by the state prediction function and a
 * separate prediction noise matrix.
 * The observe model is represented by the observation prediction function and
 * a function to normalise observations.
 *
 * The filter is operated by performing a
 *  predict, observe
 * cycle defined by the base class
 */
#include "bayesFlt.hpp"

/* Filter namespace */
namespace Bayesian_filter
{

class Unscented_predict_model : public Predict_model_base
/* Specific Unscented prediction model for Additive noise
 *  x(k|k-1) = f(x(k-1|k-1)) + w(x(k))
 *
 * Unscented filter requires
 *  f the function part of the non-linear model
 *  Q the covariance of the additive w(x(k)), w is specifically allow to be a function of state
 */
{
public:
	Unscented_predict_model (std::size_t q_size)
	{
		q_unscented = q_size;
	}

	virtual const FM::Vec& f(const FM::Vec& x) const = 0;
	// Functional part of additive model
	// Note: Reference return value as a speed optimisation, MUST be


        offsetManager,
                schemaHistoryManager,
            )

        // Usually sourceStateIterator requires airbyteStream as input. For DBZ iterator, stream is
        // not used
        // at all thus we will pass in null.
        val iterator: SourceStateIterator<ChangeEventWithMetadata> =
            SourceStateIterator(
                eventIterator,
                null,
                messageProducer,
                StateEmitFrequency(syncCheckpointRecords, syncCheckpointDuration),
            )
        return AutoCloseableIterators.fromIterator(iterator)
    }

    companion object {

        private val REPORT_DURATION: Duration = Duration.of(10, ChronoUnit.SECONDS)

        /**
         * We use 10000 as capacity cause the default queue size and batch size of debezium is :
         * [io.debezium.config.CommonConnectorConfig.DEFAULT_MAX_BATCH_SIZE]is 2048
         * [io.debezium.config.CommonConnectorConfig.DEFAULT_MAX_QUEUE_SIZE] is 8192
         */
        const val QUEUE_CAPACITY: Int = 10000

        @JvmStatic
        fun isAnyStreamIncrementalSyncMode(catalog: ConfiguredAirbyteCatalog): Boolean {
            return catalog.streams
                .map { obj: ConfiguredAirbyteStream -> obj.syncMode }
                .any { syncMode: SyncMode -> syncMode == SyncMode.INCREMENTAL }
        }
    }
}
/*
 * Copyright (c) 2023 Airbyte, Inc., all rights reserved.
 */
package io.airbyte.cdk.integrations.source.jdbc.dto

import com.google.common.base.Objects

/** The class to store values from privileges table */
class JdbcPrivilegeDto(
    val grantee: String?,
    val tableName: String?,
    val schemaName: String?,
    val privilege: String?
) {
    class JdbcPrivilegeDtoBuilder {
        private var grantee: String? = null
        private var tableName: String? = null
        private var schemaName: String? = null
        private var privilege: String? = null

        fun grantee(grantee: String?): JdbcPrivilegeDtoBuilder {
            this.grantee = grantee
            return this
        }

        fun tableName(tableName: String?): JdbcPrivilegeDtoBuilder {
            this.tableName = tableName
            return this
        }

        fun schemaName(schemaName: String?): JdbcPrivilegeDtoBuilder {
            this.schemaName = schemaName
            return this
        }

        fun privilege(privilege: String?): JdbcPrivilegeDtoBuilder {
            this.privilege = privilege
            return this
        }

        fun build(): JdbcPrivilegeDto {
            return JdbcPrivilegeDto(grantee, tableName, schemaName, privilege)
        }
    }

    override fun equals(other: Any?): Boolean {
        if (this === other) {
            return true
        }
        if (other == null || javaClass != other.javaClass) {
            return false
        }
        val that = other as JdbcPrivilegeDto
        return (Objects.equal(grantee, that.grantee) &&
            Objects.equal(tableName, that.tableName) &&
            Objects.equal(schemaName, that.schemaName) &&
            Objects.equal(privilege, that.privilege))
    }

    override fun hashCode(): Int {
        return Objects.hashCode(grantee, tableName, schemaName, privilege)
    }

    override fun toString(): String {
        return "JdbcPrivilegeDto{" +
            "grantee='" +
            grantee +
            '\'' +
            ", columnName='" +
            tableName +
            '\'' +
            ", schemaName='" +
            schemaName +
            '\'' +
            ", privilege='" +
            privilege +
            '\'' +
            '}'
    }

    companion object {
        @JvmStatic
        fun builder(): JdbcPrivilegeDtoBuilder {
            return JdbcPrivilegeDtoBuilder()
        }
    }
}
/*
 * Copyright (c) 2023 Airbyte, Inc., all rights reserved.
 */
package


deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-root-font-size: 17px;--bs-body-font-family: Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--bs-body-font-size:1rem;--bs-body-font-weight: 400;--bs-body-line-height: 1.5;--bs-body-color: #7b8ab8;--bs-body-color-rgb: 123, 138, 184;--bs-body-bg: #d9e3f1;--bs-body-bg-rgb: 217, 227, 241;--bs-emphasis-color: #000;--bs-emphasis-color-rgb: 0, 0, 0;--bs-secondary-color: rgba(123, 138, 184, 0.75);--bs-secondary-color-rgb: 123, 138, 184;--bs-secondary-bg: #d9e3f1;--bs-secondary-bg-rgb: 217, 227, 241;--bs-tertiary-color: rgba(123, 138, 184, 0.5);--bs-tertiary-color-rgb: 123, 138, 184;--bs-tertiary-bg: #f0f5fa;--bs-tertiary-bg-rgb: 240, 245, 250;--bs-heading-color: #485785;--bs-link-color: #485785;--bs-link-color-rgb: 72, 87, 133;--bs-link-decoration: underline;--bs-link-hover-color: #3a466a;--bs-link-hover-color-rgb: 58, 70, 106;--bs-code-color: #7d12ba;--bs-highlight-bg: #fff3cd;--bs-border-width: 0;--bs-border-style: solid;--bs-border-color: #dee2e6;--bs-border-color-translucent: rgba(0, 0, 0, 0.175);--bs-border-radius: 0.25rem;--bs-border-radius-sm: 0.2em;--bs-border-radius-lg: 0.5rem;--bs-border-radius-xl: 1rem;--bs-border-radius-xxl: 2rem;--bs-border-radius-2xl: var(--bs-border-radius-xxl);--bs-border-radius-pill: 50rem;--bs-box-shadow: 5px 5px 10px rgba(55, 94, 148, 0.2), -5px -5px 10px rgba(255, 255, 255, 0.4);--bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(55, 94, 148, 0.2);--bs-box-shadow-lg: 8px 8px 40px rgba(0, 0, 0, 0.15);--bs-box-shadow-inset: inset 2px 2px 8px rgba(55, 94, 148, 0.3), inset -3px -2px 5px rgba(255, 255, 255, 0.8);--bs-focus-ring-width: 0.25rem;--bs-focus-ring-opacity: 0.25;--bs-focus-ring-color: rgba(55, 141, 252, 0.25);--bs-form-valid-color: #43cc29;--bs-form-valid-border-color: #43cc29;--bs-form-invalid-color: #e52527;--bs-form-invalid-border-color: #e52527}[data-bs-theme=dark]{color-scheme:dark;--bs-body-color: #dee2e6;--bs-body-color-rgb: 222, 226, 230;--bs-body-bg: #212529;--bs-body-bg-rgb: 33, 37, 41;--bs-emphasis-color: #fff;--bs-emphasis-color-rgb: 255, 255, 255;--bs-secondary-color: rgba(222, 226, 230, 0.75);


            </Tabs>
        </Card>
    );
}

```

### 卡片操作区

`actions` 接收 ReactNode 数组，元素间将以 12px 的水平间距展示于内容区底部。

```jsx live=true dir="column"
import React from 'react';
import { Card, Rating } from '@douyinfe/semi-ui';

function Demo() {
    const { Meta } = Card;

    return (
        <Card
            style={{ maxWidth: 300 }}
            actions={[
                // eslint-disable-next-line react/jsx-key
                <Rating size='small' defaultValue={4}/>
            ]}
            headerLine={ false }
            cover={
                <img
                    alt="example"
                    src="https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/card-cover-docs-demo.jpeg"
                />
            }
        >
            <Meta
                title="Semi Doc"
                description="全面、易用、优质"
            />
        </Card>
    );
}

```

### 卡片组

`CardGroup` 中的卡片将呈现为等间距排列，利用 `spacing` 属性可以设置卡片间距大小。

```jsx live=true dir="column"
import React, { useState } from 'react';
import { Card, CardGroup, Typography, Slider } from '@douyinfe/semi-ui';

function Demo() {
    const { Text } = Typography;
    const [ spacing, setSpacing ] = useState(12);

    return (
        <>
            <Text>滑动调节 Card 间距</Text>
            <Slider
                defaultValue={12}
                max={40}
                min={10}
                style={{ width: 360 }}
                onChange={v=> setSpacing(v)}
            />
            <br />
            <CardGroup spacing={spacing}>
                {
                    new Array(8).fill(null).map((v, idx)=>(
                        <Card
                            key={idx}
                            shadows='hover'
                            title='Card title'
                            headerLine={false}
                            style={{ width: 260 }}
                            headerExtraContent={
                                <Text link>
                                    More
                                </Text>
                            }
                        >
                            <Text>Card content</Text>
                        </Card>
                    ))
                }
            </CardGroup>
        </>
    );
}

```

### 网格型卡片组

使用 `CardGroup` 的 `type` 属性，可以将卡片组设置为网格型。

```jsx live=true dir="column"
import React from 'react';
import { Card, CardGroup, Typography } from '@douyinfe/semi-ui';

function Demo() {
    const { Text } = Typography;

    return (
        <CardGroup type='grid'>
            {
                new Array(7).fill(null).map((v, idx)=>(
                    <Card
                        key={idx}
                        shadows='hover'
                        title='Card title'
                        headerLine={false}
                        style={{ width: 260 }}
                        headerExtraContent={
                            <Text link>
                                More
                            </Text>
                        }
                    >
                        <Text>Card content</Text>


 | 33|
| 安全视安 | None | 【翻译】完整技术分析：伊朗国家支持的黑客组织针对丹麦、瑞典、葡萄牙和以色列的电信、航空航天和国防公司的网络间谍活动。 | https://mp.weixin.qq.com/s?__biz=Mzg4NzgzMjUzOA==&mid=2247486132&idx=1&sn=30b37b8ec7ad1bfa526c1d501018b75e | 72|
| 微众安全应急响应中心 | None | 【紧急通知｜微众银行SRC限时返场】最高6倍+首杀奖+中秋礼！最后7天，错过等一年！ | https://mp.weixin.qq.com/s?__biz=Mzg4NjAyODc1NQ==&mid=2247487156&idx=1&sn=201596bf87c96298a47a8a1bee19c1ba | 5|
| 攻城狮成长日记 | None | 不会命令行？yt-dlp Web UI 一键帮你下载全网视频！ | https://mp.weixin.qq.com/s?__biz=MjM5OTc5MjM4Nw==&mid=2457389392&idx=1&sn=8c7c42ada88b1470833bd2ee28d2d77d | 91|
| 方桥安全漏洞防治中心 | None | 关于开展「安全漏洞防治SOP征集活动」通知 | https://mp.weixin.qq.com/s?__biz=Mzk0OTQzMDI4Mg==&mid=2247485110&idx=1&sn=d9af6f4b2ff0ca98493effd0e9a51b2c | 70|
| 春秋伽玛 | None | NewStar CTF 2025 携手春秋杯重磅来袭！ | https://mp.weixin.qq.com/s?__biz=MzkyNDA5NjgyMg==&mid=2247502300&idx=1&sn=0afdef27fb3bef89dce1f271067e8a10 | 31|
| 泽鹿安全 | None | 泽鹿安全护航山东省“铸网-2025 ”车联网攻防赛成功举办 | https://mp.weixin.qq.com/s?__biz=Mzg5MjE1NzgzMw==&mid=2247490517&idx=1&sn=15f2b0bbe68313aa7e7a97d44c3eed05 | 37|
| 漫漫安全路 | None | 移动应用逆向分析：从APK到内网访问权限获取 | https://mp.weixin.qq.com/s?__biz=Mzk0NTQyMjk4Ng==&mid=2247484503&idx=1&sn=6156e3c7038369fa5f48c8e120a58dde | 4|
| 电信云堤 | None | 欧洲机场遭遇重大网络攻击暴露供应链安全漏洞 电信安全呼吁构建关键基础设施韧性防线 | https://mp.weixin.qq.com/s?__biz=Mzk2NDIzNTYwOA==&mid=2247490286&idx=1&sn=d139dbb530555a6dd8bbb6ceb0


:ActionQueue_UseAbilityOnEntity(ElectricVortex, ElectricVortexTarget)
				bot:ActionQueue_Delay(0.3 + 0.77)
				bot:ActionQueue_UseAbility(StaticRemnant)
				return
			else
				bot:Action_UseAbilityOnEntity(ElectricVortex, ElectricVortexTarget)
				return
			end
		end
	end

	StaticRemnantDesire, StaticRemnantLocation = X.ConsiderStaticRemnant()
	if StaticRemnantDesire > 0
	then
		J.SetQueuePtToINT(bot, true)
		bot:ActionQueue_UseAbilityOnLocation(StaticRemnant, StaticRemnantLocation)
		return
	end

	OverloadDesire = X.ConsiderOverload()
	if OverloadDesire > 0
	then
		bot:Action_UseAbility(Overload)
		return
	end
end

function X.ConsiderStaticRemnant()
	if not J.CanCastAbility(StaticRemnant)
	then
		return BOT_ACTION_DESIRE_NONE, 0
	end

	local nCastRange = 800
	local nRadius = StaticRemnant:GetSpecialValueInt('static_remnant_radius')
	local nAbilityLevel = StaticRemnant:GetLevel()
	local nManaAfter = J.GetManaAfter(StaticRemnant:GetManaCost())
	local nDamage = StaticRemnant:GetSpecialValueInt('static_remnant_damage')
	local nAttackRange = bot:GetAttackRange()

	local nAllyHeroes = bot:GetNearbyHeroes(1600, false, BOT_MODE_NONE)
	local nEnemyHeroes = bot:GetNearbyHeroes(1600, true, BOT_MODE_NONE)

	for _, enemyHero in pairs(nEnemyHeroes)
	do
		if  J.IsValidHero(enemyHero)
		and J.CanCastOnNonMagicImmune(enemyHero)
		and J.IsInRange(bot, enemyHero, nCastRange)
		and J.CanKillTarget(enemyHero, nDamage, DAMAGE_TYPE_MAGICAL)
		and not enemyHero:HasModifier('modifier_abaddon_aphotic_shield')
		and not enemyHero:HasModifier('modifier_abaddon_borrowed_time')
		and not enemyHero:HasModifier('modifier_dazzle_shallow_grave')
		and not enemyHero:HasModifier('modifier_oracle_false_promise')
		and not enemyHero:HasModifier('modifier_templar_assassin_refraction_absorb')
		then
			local bChasingTarget = J.IsChasingTarget(bot, enemyHero)
			if not bChasingTarget or (bChasingTarget and J.IsInRange(bot, enemyHero, nAttackRange)) then
				return BOT_ACTION_DESIRE_HIGH, enemyHero:GetLocation()
			end
		end
	end

	if J.IsGoingOnSomeone(bot)
	then
		if  J.IsValidTarget(botTarget)
		and J.CanCastOnNonMagicImmune(botTarget)
		and J.IsInRange(bot, botTarget, nCastRange)
		and not J.IsSuspiciousIllusion(botTarget)
		and not botTarget:HasModifier('modifier_abaddon_borrowed_time')
		and not botTarget:HasModifier('modifier_dazzle_shallow_grave')
		and not botTarget:HasModifier('modifier_necrolyte_reapers_scythe')
		and not botTarget:HasModifier('modifier_oracle_false_promise_timer')
		and not botTarget:HasModifier('modifier_templar_assassin_refraction_absorb')
		then
			local bChasingTarget = J.IsChasingTarget(bot, botTarget)
			if not bChasingTarget