long-lambda
  repeat = 10

  def _npTypeToStr(self, t):
    if t == np.float32:
      return "fp32"
    if t == np.float64:
      return "fp64"

  def _runGraph(self, op_functor, outer_dim, ratio, inner_dim, dtype):
    output_outer_dim = int(outer_dim / ratio)
    const = np.random.randint(5, size=(outer_dim, inner_dim))
    seg_ids = np.sort(np.random.randint(output_outer_dim, size=outer_dim))
    vs = variables.Variable(seg_ids.astype(np.int32))
    with ops.device("/gpu:0"):
      vc = variables.Variable(const.astype(dtype))
    name, op = op_functor(vc, vs, seg_ids)
    with session.Session() as sess:
      variables.global_variables_initializer().run()
      r = self.run_op_benchmark(
          sess,
          op,
          min_iters=self.repeat,
          name="_".join(
              map(str,
                  [name, outer_dim, ratio, inner_dim,
                   self._npTypeToStr(dtype)])))
    return name, r["wall_time"]

  def benchmarkSegmentSumGPU(self):
    if not test.is_gpu_available(cuda_only=True):
      return
    for outer_dim, ratio, inner_dim, dtype in itertools.product(*self.options):
      op_functor = self.op_functors[0]
      with ops.Graph().as_default():
        self._runGraph(op_functor, outer_dim, ratio, inner_dim, dtype)

  def benchmarkUnsortedSegmentSumGPU(self):
    if not test.is_gpu_available(cuda_only=True):
      return
    for outer_dim, ratio, inner_dim, dtype in itertools.product(*self.options):
      op_functor = self.op_functors[1]
      with ops.Graph().as_default():
        self._runGraph(op_functor, outer_dim, ratio, inner_dim, dtype)

if __name__ == "__main__":
  test.main()


mGuzO5QDb0cvLj1au42oW9kwXxIDdAAQTPOwK91cVa5B/SPAbHqR8VQOMLZMHeDtNyQT3EheaDxlyn3i6x5NN/imGrYrxlc02aBba4+XzUrIyFzgIBuImQek+qjwFOWw6I00F4tIt1HRWKtRpGUaN0PKRp3TsoqhjKjJGQdnpMi3w5hTUa72uAaJGhva+14+wrFCi0S7K1wIm2oI6T9wlB4kyJuDoCNSI7lRFicMXjMx0G5giFiWufmLXjTnaQBpC2l72NOaDEXi9+7lt5KDE4VlRoBtF5tbx2U0xheGY4srMfB65R13XUuF8Xa9msRA9Aubt4aWOu2QYvynmrmHAY+HOcG6gDQ6TdbnTF5dPpYhp3C+lywGAptgOYSOkyOayb69rrUrNjn/4q4kRl/aybTIkwRbvB8FyPBvElpNnecwR5w5w7yF0L2/4gx9R8G7W+6bZmjWD5jmJ6rmtVkHpqDzB0K6cudeXNgkHay8qxXOYB+5s7vG/iPgVXWmRERAREQS1jJzfuv47+t/EKJSNMgt8R37+Y+AUaAiIgIiICIiDf2MdlBNi2TPS6+YWsW5qjhY6xqJmD3fRRYyo6WNGkTHMaR/2UlTENaC33pABNri0HpGi4O7Ikh+SLXBAnUSc3pZfWZQyP1HQ/AGN1imh7oe42bdvIa+WiGsT2YI2kdDYx81MXWYJLGZM3uCes7j0PkvmGxLRDsrpvmMbaRCxld5tYyd+g5d/zVsMcQC2RmMH+RFj38wpi6yVPEsdcuNuUzHKR1Cp4hxa4BplpJvqdNO/TzUQp5LnWIHiZnp9QrbHszw4HQ6jQ287IqajxEGx00H9+WilfGYPDiLd4g2Omv1UVOow2IbDiBJtHepWYWSYIkTF793IhTDVk1S05Xk5IImALLzj2y1uV0t2UTzIDTFget/DXwUraPZOU35Tb+6DZeCSGCVJxjEFrHQbx96rEcL4rAyuBHI84+CxXtNxdj2QHTtH3Hkt8xjpzn2jxed5bEOaTy0OoEfDvWIZ2hl32P8A+e47de9esXWLnkyTBgTrA2PNViu0calYdjvbuOx++qiUjnTrrz5/3UZKqCIiAiIgIURAREQEREBERBvJ99v8fkqtT3/+P0RFwd2R2P8AEfFVz757j8SiIL1T36f8Pqvbd+5nzRFGlh//AKg/l9V8xmo/ifkiKCOl7ngP+qynCtR3/JEVHmvt4/NeKXvnwX1FIJR7p/kVqXF9X/fJEW+WOmnVdT3leERdnEREQEREBERAREQEREBERAREQf/Z'),
        // ),
        title: Text(
          'Sleep',
          style: TextStyles.bold_18,
        ),
        trailing: Text(
          '09.00',
          style: TextStyles.bold_16,
        ),
      ),
    );
  }
}
import 'package:app_flowy/startup/startup.dart';
import 'package:app_flowy/user/domain/i_splash.dart';
import 'package:app_flowy/user/presentation/sign_up_screen.dart';
import 'package:app_flowy/workspace/presentation/home/home_screen.dart';
import 'package:dartz/dartz.dart';
import 'package:flowy_infra/time/duration.dart';
import 'package:flowy_infra_ui/widget/route/animation.dart';
import 'package:flowy_sdk/protobuf/flowy-user/protobuf.dart';
import 'package:app_flowy/user/domain/i_auth.dart';
import 'package:app_flowy/user/infrastructure/repos/auth_repo.dart';
import 'package:flowy_sdk/protobuf/flowy-workspace-infra/protobuf.dart';
import 'package:flutter/material.dart';

class AuthImpl extends IAuth {
  AuthRepository repo;
  AuthImpl({
    required this.repo,


StageParameter/type/#/PointingToDeclaration/">

type<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M21.2496 5.3C20.3496 4.5 19.2496 4 18.0496 4C16.8496 4 15.6496 4.5 14.8496 5.3L10.3496 9.8L11.7496 11.2L16.2496 6.7C17.2496 5.7 18.8496 5.7 19.8496 6.7C20.8496 7.7 20.8496 9.3 19.8496 10.3L15.3496 14.8L16.7496 16.2L21.2496 11.7C22.1496 10.8 22.5496 9.7 22.5496 8.5C22.5496 7.3 22.1496 6.2 21.2496 5.3Z"/>
    <path d="M8.35 16.7998C7.35 17.7998 5.75 17.7998 4.75 16.7998C3.75 15.7998 3.75 14.1998 4.75 13.1998L9.25 8.6998L7.85 7.2998L3.35 11.7998C1.55 13.5998 1.55 16.3998 3.35 18.1998C4.25 19.0998 5.35 19.4998 6.55 19.4998C7.75 19.4998 8.85 19.0998 9.75 18.1998L14.25 13.6998L12.85 12.2998L8.35 16.7998Z"/>
</svg>

<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M18 9C18 14 14 18 9 18C4 18 0 14 0 9C0 4 4 0 9 0C14 0 18 4 18 9ZM14.2 6.2L12.8 4.8L7.5 10.1L5.3 7.8L3.8 9.2L7.5 13L14.2 6.2Z" fill="#4DBB5F"/>
</svg>Link copied to clipboard

Data Type of the parameter.

private  PreconfiguredStageParameter.ParameterType type<svg width="24" height="24" viewBox="0 0 24 24"


hat we can start with a complete new cool step register value
  // And simply set the values in the register
  cool_step_register_value = ((uint32_t)lower_SG_threshold)
                          | (((uint32_t)SG_hysteresis) << 8)
                          | (((uint32_t)current_decrement_step_size) << 5)
                          | (((uint32_t)current_increment_step_size) << 13)
                          | (((uint32_t)lower_current_limit) << 15)
                          | COOL_STEP_REGISTER; // Register signature

  if (started) send262(cool_step_register_value);
}

void TMC26XStepper::setCoolStepEnabled(boolean enabled) {
  // Simply delete the lower limit to disable the cool step
  cool_step_register_value &= ~SE_MIN_PATTERN;
  // And set it to the proper value if cool step is to be enabled
  if (enabled)
    cool_step_register_value |= this->cool_step_lower_threshold;
  // And save the enabled status
  this->cool_step_enabled = enabled;
  // Save the register value
  if (started) send262(cool_step_register_value);
}

boolean TMC26XStepper::isCoolStepEnabled() { return this->cool_step_enabled; }

uint16_t TMC26XStepper::getCoolStepLowerSgThreshold() {
  // We return our internally stored value - in order to provide the correct setting even if cool step is not enabled
  return this->cool_step_lower_threshold<<5;
}

uint16_t TMC26XStepper::getCoolStepUpperSgThreshold() {
  return uint8_t((cool_step_register_value & SE_MAX_PATTERN) >> 8) << 5;
}

uint8_t TMC26XStepper::getCoolStepCurrentIncrementSize() {
  return uint8_t((cool_step_register_value & CURRENT_DOWN_STEP_SPEED_PATTERN) >> 13);
}

uint8_t TMC26XStepper::getCoolStepNumberOfSGReadings() {
  return uint8_t((cool_step_register_value & SE_CURRENT_STEP_WIDTH_PATTERN) >> 5);
}

uint8_t TMC26XStepper::getCoolStepLowerCurrentLimit() {
  return uint8_t((cool_step_register_value & MINIMUM_CURRENT_FOURTH) >> 15);
}

void TMC26XStepper::setEnabled(boolean enabled) {
  //delete the t_off in the chopper config to get sure
  chopper_config_register &= ~(T_OFF_PATTERN);
  if (enabled) {
    //and set the t_off time
    chopper_config_register |= this->constant_off_time;
  }
  //if not enabled we don't have to do anything since we already delete t_off from the register
  if (started) send262(chopper_config_register);
}

boolean TMC26XStepper::isEnabled() { return !!(chopper_config_register & T_OFF_PATTERN); }

/**
 * reads a value from the TMC26X status register. The value is not obtained directly but can then
 * be read by the various status routines.
 */
void TMC26XStepper::readStatus(char read_value) {
  uint32_t old_driver_configuration_register_value = driver_configuration_register_value;
  //reset the readout configuration
  driver_configuration_register_value &= ~(READ_SELECTION_PATTERN);
  //this now equals TMC26X_READOUT_POSITION - so we just have to check the other two options
  if (read_value == TMC26X_READOUT_STALLGUARD)
    driver_configuration_register_value |= READ_STALL_GUARD_READING;
  else if (read_value == TMC26X_READOUT_CURRENT)
    driver_configuration_register_value |= READ_STALL_GUARD_AND_COOL_STEP;

  //all other cases are ignored to prevent funny values
  //check if the readout is configured for the value we are interested in
  if (driver


larını geri almalarını isterdi.

Oysa bir uygulamanın kanunla düzenlenmiş olması ne onun evrensel hukuka uygun olduğunu garantiler ne de kamu vicdanına (meşruiyet) uygun olduğunu garantiler.

Mesela Süleyman Demirel de bir kanunla siyasetten men edilmişti 12 Eylül’den sonra... Fakat bu yasak ne hukukiydi ne de meşrudu.

Keza herşeyi “yasallık” çerçevesinde değerlendirdiğimizde, söz gelimi her biri birer “kanun devleti” olan diktatörlüklere de söyleyecek lafımız olmaz.

“Bu evler Devletten izin alınmadan yapıldı! Suç budur!”

“Bu evler Devletten izin almadan yapıldı! Suç budur!”

Bu cümleyi, Şirince’de yaptığı evlerin yıkım kararının kesinleşmesinden hemen sonra Sevan Nişanyan’ın yazdığı metinden aldım. Gördüğünüz üzere Nişanyan, Demirel gibi bir “kanuncu”yu çıldırtacak tarzda konuşuyor. Demirel için “Devletten izin alınmadan” cümlesi, sözün bittiği noktadır. Çünkü devletin iznine tâbi olan bir işlemde devletten izinsiz bir şey yapılmışsa, bir “kanuncu” başka hiçbir şeye bakmaz, o işlemin failinin en büyük gazaplara lâyık olduğuna kanaat getirir.

Oysa Nişanyan, görüyorsunuz, bunu suç olarak bile kabul etmiyor. Tam tersine, cümlenin önünü arkasını da okuduğumuzda, çok büyük bir haklılık duygusuna sahip olduğunu anlıyoruz... Okuyalım:

“İlk partide ana binamız olan Köşk’ü, ilk göz ağrımız Kerevetli Ev’i, bir de Nesin Vakfı’nın malı olan Hamamlı Ev’i yıkacaklarmış. İl Özel İdaresi ihale şartnamesine bilhassa not düşmüş, bunlar tamamen yıkılacak, yarım iş yapılmayacak, molozu da kaldırılacak diye. Yanısıra köyde başkalarına ait birkaç çardak, müştemilat vs. yıkılacakmış. Bunlar ilk raunt. Daha sırada İlyastepe’deki bağevleri, mermer havuz, kule, kümesler, personel evi ve kendi evim var. Yaza kalmaz onlara da sıra gelir.

“Yok canım daha neler diyor insan tabii. Biz de hep öyle dedik. Bu kadar manasız vahşet olmaz, bunlar BİLE bu kadar mantıksız iş yapamaz diye kendimizi inandırdık. Ortada başkasının hakkına tecavüz yok. Bu evler bana zarar verdi diyen kimse yok.


    Map arguments = {
      "chatRoomId": chatRoomId,
      "chatRoomEntryMap": chatRoomEntryMap,
      "autoRemove": autoRemove,
      "overWrite": overWrite,
    };
    Map<dynamic, dynamic>? result = await _channel.invokeMapMethod(RCMethodKey.SetChatRoomEntries, arguments);
    if (result != null) {
      int code = result['code'];
      Map<dynamic, dynamic>? errors = result['errors'];
      if (errors != null) {
        finished(code, Map<String, int>.from(errors));
      } else {
        finished(code, null);
      }
    } else {
      finished(-1, null);
    }
  }

  /// 批量删除聊天室自定义属性
  /// [chatRoomId] 聊天室 ID
  /// [chatRoomEntryList] 聊天室属性
  ///                     1. chatRoomEntryMap集合大小最大限制为 10,超过限制返回错误码 23429
  ///                     2. key 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式，最大长度 128 个字符
  ///                        value 聊天室属性对应的值，最大长度 4096 个字符
  /// [force] 是否强制覆盖
  /// [finished] 设置聊天室属性的回调
  ///            当 code 为 23428 的时候，errors 才会有值（key标识设置失败的 key,value 标识该 key 对应的错误码）
  static Future<void> removeChatRoomEntries(
    String chatRoomId,
    List<String> chatRoomEntryList,
    bool force,
    Function(int code, Map<String, int>? errors) finished,
  ) async {
    Map arguments = {
      "chatRoomId": chatRoomId,
      "chatRoomEntryList": chatRoomEntryList,
      "force": force,
    };
    Map<String, dynamic>? result = await _channel.invokeMapMethod(RCMethodKey.RemoveChatRoomEntries, arguments);
    if (result != null) {
      int code = result['code'];
      Map<dynamic, dynamic>? errors = result['errors'];
      if (errors != null) {
        finished(code, Map<String, int>.from(errors));
      } else {
        finished(code, null);
      }
    } else {
      finished(-1, null);
    }
  }

  ///撤回消息
  ///
  ///
  /// 当接收方离线并允许远程推送时，会收到远程推送。
  /// 远程推送中包含两部分内容，一是[pushContent]，用于显示；二是[pushData]，用于携带不显示的数据。
  ///
  /// SDK内置的消息类型，如果您将[pushContent]和[pushData]置为空或者为null，会使用默认的推送格式进行远程推送。
  /// 自定义类型的消息，需要您自己设置pushContent和pushData来定义推送内容，否则将不会进行远程推送。
  static Future<RecallNotificationMessage?> recallMessage(Message? message, String? pushContent) async {
    if (message == null) {
      developer.log("send message fail: conversationType or targetId or content is null", name: "RongIMClient");
      return null;
    }
    if (pushContent == null) {
      pushContent = "";
    }
    Map msgMap = MessageFactory.instance!.message2Map(message);
    Map map = {"message": msgMap, "pushContent": pushContent};
    Map? resultMap = await _channel.invokeMethod(RCMethodKey.RecallMessage, map);
    if (resultMap == null) {
      return null;
    }
    String? messageString = resultMap["recallNotificationMessage"];
    if (messageString == null || messageString.isEmpty) {


     * @param response Response
     * @returns JSON file containing the user to which the email was sent
     */
    async execute(request: Request, response: Response) {
        const { email, survey_id } = request.body;

        const usersRepository = getCustomRepository(UsersRepository);
        const surveysRepository = getCustomRepository(SurveysRepository);
        const surveyUsersRepository = getCustomRepository(SurveyUsersRepository);

        const user = await usersRepository.findOne({email});

        // Throw an error in case the user ins't found on the db
        if (!user) {
            throw new AppError({
                message: "User does not exist",
                statusCode: 400
            })
        };

        // Throw an error in case the survey ins't found on the db
        const survey = await surveysRepository.findOne({id: survey_id})

        if (!survey) {
            throw new AppError({
                message: "Survey does not exist.",
                statusCode: 400
            })
        };

        // Build the path to the handlebars file used to customize the email design
        const npsPath = resolve(__dirname, "..", "views", "emails", "npsMail.hbs");

        // Build a JSON file with the user info to be used in the email body
        const variables = {
            name: user.name,
            title: survey.title,
            description: survey.description,
            link: process.env.URL_MAIL,
            id: ""  // Created empty because the value depends
                    // whether the user already exists or not
        }

        // Check if the user already answered the survey
        const surveyUserExists = await surveyUsersRepository.findOne({
            where: { user_id: user.id, value: null },
            relations: ["user", "survey"],
        })

        // If the user exists, send another email without re-adding
        // the same user to the survey_users db table
        if (surveyUserExists) {
            variables.id = surveyUserExists.id;
            await SendMailService.execute({
                to: email,
                subject: survey.title,
                variables,
                path: npsPath
            });

            return response.json(surveyUserExists);
        }

        // In case it's a new user, create the entry on the db
        const surveyUser = surveyUsersRepository.create({
            user_id: user.id,
            survey_id,
        });
        await surveyUsersRepository.save(surveyUser);
        // Update the variables with the user id with the newly created entry
        variables.id = surveyUser.id;

        // Request SendMailService to send a service with
        // the appropriate parameters
        await SendMailService.execute({
            to: email,
            subject: survey.title,
            variables,
            path: npsPath
        });

        // Return a JSON file containing the target user for the email
        return response.json(surveyUser);
    }
}

export { SendMailController };import { ResourceData, ResourceCacheData, ResourceInfo } from "../base/Defines";
import { Manager } from "../Framework";

export enum ResourceLoaderError {
    /**@description 加载中 */
    LOADING,
    /** @description 未找到或设置加载资源*/
    NO_FOUND_LOAD_RESOURCE,
    /**@description 完美加载 */
    SUCCESS,
}

/**
 * @description 资源加载器
 */
export default class ResourceLoader {

    /** @description 加载资源数据 */
    private _resou


CHECK: vsqrtsd xmm6, xmm2, qword ptr [rdx - 1024]
// CHECK:  encoding: [0xc5,0xeb,0x51,0xb2,0x00,0xfc,0xff,0xff]
          vsqrtsd xmm6, xmm2, qword ptr [rdx - 1024]

// CHECK: vsqrtsd xmm6, xmm2, qword ptr [rdx - 1032]
// CHECK:  encoding: [0xc5,0xeb,0x51,0xb2,0xf8,0xfb,0xff,0xff]
          vsqrtsd xmm6, xmm2, qword ptr [rdx - 1032]

// CHECK: vsqrtss xmm22, xmm19, xmm8
// CHECK:  encoding: [0x62,0xc1,0x66,0x00,0x51,0xf0]
          vsqrtss xmm22, xmm19, xmm8

// CHECK: vsqrtss xmm22 {k1}, xmm19, xmm8
// CHECK:  encoding: [0x62,0xc1,0x66,0x01,0x51,0xf0]
          vsqrtss xmm22 {k1}, xmm19, xmm8

// CHECK: vsqrtss xmm22 {k1} {z}, xmm19, xmm8
// CHECK:  encoding: [0x62,0xc1,0x66,0x81,0x51,0xf0]
          vsqrtss xmm22 {k1} {z}, xmm19, xmm8

// CHECK: vsqrtss xmm22, xmm19, xmm8, {rn-sae}
// CHECK:  encoding: [0x62,0xc1,0x66,0x10,0x51,0xf0]
          vsqrtss xmm22, xmm19, xmm8, {rn-sae}

// CHECK: vsqrtss xmm22, xmm19, xmm8, {ru-sae}
// CHECK:  encoding: [0x62,0xc1,0x66,0x50,0x51,0xf0]
          vsqrtss xmm22, xmm19, xmm8, {ru-sae}

// CHECK: vsqrtss xmm22, xmm19, xmm8, {rd-sae}
// CHECK:  encoding: [0x62,0xc1,0x66,0x30,0x51,0xf0]
          vsqrtss xmm22, xmm19, xmm8, {rd-sae}

// CHECK: vsqrtss xmm22, xmm19, xmm8, {rz-sae}
// CHECK:  encoding: [0x62,0xc1,0x66,0x70,0x51,0xf0]
          vsqrtss xmm22, xmm19, xmm8, {rz-sae}

// CHECK: vsqrtss xmm22, xmm19, dword ptr [rcx]
// CHECK:  encoding: [0x62,0xe1,0x66,0x00,0x51,0x31]
          vsqrtss xmm22, xmm19, dword ptr [rcx]

// CHECK: vsqrtss xmm22, xmm19, dword ptr [rax + 8*r14 + 291]
// CHECK:  encoding: [0x62,0xa1,0x66,0x00,0x51,0xb4,0xf0,0x23,0x01,0x00,0x00]
          vsqrtss xmm22, xmm19, dword ptr [rax + 8*r14 + 291]

// CHECK: vsqrtss xmm22, xmm19, dword ptr [rdx + 508]
// CHECK:  encoding: [0x62,0xe1,0x66,0x00,0x51,0x72,0x7f]
          vsqrtss xmm22, xmm19, dword ptr [rdx + 508]


IP_TEMPLATE_FIELD = slot0.FieldDescriptor(),
	VISITOR_SHIP_SKIN_FIELD = slot0.FieldDescriptor()
}
SC_19001 = slot0.Descriptor()
CS_19002 = slot0.Descriptor()
SC_19003 = slot0.Descriptor()
CS_19004 = slot0.Descriptor()
SC_19005 = slot0.Descriptor()
CS_19006 = slot0.Descriptor()
SC_19007 = slot0.Descriptor()
CS_19008 = slot0.Descriptor()
SC_19009 = slot0.Descriptor()
SC_19010 = slot0.Descriptor()
CS_19011 = slot0.Descriptor()
SC_19012 = slot0.Descriptor()
CS_19013 = slot0.Descriptor()
SC_19014 = slot0.Descriptor()
CS_19015 = slot0.Descriptor()
CS_19016 = slot0.Descriptor()
SC_19017 = slot0.Descriptor()
CS_19018 = slot0.Descriptor()
SC_19019 = slot0.Descriptor()
CS_19020 = slot0.Descriptor()
SC_19021 = slot0.Descriptor()
CS_19022 = slot0.Descriptor()
SC_19023 = slot0.Descriptor()
CS_19024 = slot0.Descriptor()
SC_19025 = slot0.Descriptor()
CS_19101 = slot0.Descriptor()
SC_19102 = slot0.Descriptor()
CS_19103 = slot0.Descriptor()
SC_19104 = slot0.Descriptor()
CS_19105 = slot0.Descriptor()
SC_19106 = slot0.Descriptor()
CS_19107 = slot0.Descriptor()
SC_19108 = slot0.Descriptor()
CS_19109 = slot0.Descriptor()
SC_19110 = slot0.Descriptor()
CS_19111 = slot0.Descriptor()
SC_19112 = slot0.Descriptor()
CS_19113 = slot0.Descriptor()
SC_19114 = slot0.Descriptor()
CS_19115 = slot0.Descriptor()
SC_19116 = slot0.Descriptor()
CS_19117 = slot0.Descriptor()
SC_19118 = slot0.Descriptor()
CS_19119 = slot0.Descriptor()
SC_19120 = slot0.Descriptor()
CS_19121 = slot0.Descriptor()
SC_19122 = slot0.Descriptor()
CS_19123 = slot0.Descriptor()
SC_19124 = slot0.Descriptor()
CS_19125 = slot0.Descriptor()
SC_19126 = slot0.Descriptor()
CS_19127 = slot0.Descriptor()
SC_19128 = slot0.Descriptor()
CS_19129 = slot0.Descriptor()
SC_19130 = slot0.Descriptor()
CS_19131 = slot0.Descriptor()
SC_19132 = slot0.Descriptor()
THEME_MD5 = slot0.Descriptor()
POP_INFO = slot0.Descriptor()
FURFLOORPUTINFO = slot0.Descriptor()
FURNITUREPUTINFO = slot0.Descriptor()
FURNITUREINFO = slot0.Descriptor()
CHILDINFO = slot0.Descriptor()
SHIP_IN_DROM = slot0.Descriptor()
DORMTHEME = slot0.Descriptor()
DORMTHEME_PROFILE = slot0.Descriptor()
VISITOR = slot0.Descriptor()
slot1.SC_19001_LV_FIELD.name = "lv"
slot1.SC_19001_LV_FIELD.full_name = "p19.sc_19001.lv"
slot1.SC_19001_LV_FIELD.number = 1
slot1.SC_19001_LV_FIELD.index = 0
slot1.SC_19001_LV_FIELD.label = 2
slot1.SC_19001_LV_FIELD.has_default_value = false
slot1.SC_19001_LV_FIELD.default_value = 0
slot1.SC_19001_LV_FIELD.type = 13
slot1.SC_19001_LV_FIELD.cpp_type = 3
slot1.SC_19001_FOOD_FIELD.name = "food"
slot1.SC_19001_FOOD_FIELD.full_name = "p19.sc_19001.food"
slot1.SC_19001_FOOD_FIELD.number = 2
slot1.SC


# Problem: Segments with Small Spread - https://codeforces.com/edu/course/2/lesson/9/2/practice/contest/307093/problem/F

import sys
import os
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right

def inp(): return sys.stdin.readline().strip()
def inps(): return sys.stdin.readline().split()
def inpi(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

def printl(arr, sep=" "):
    sys.stdout.write(sep.join(map(str, arr)) + "\n")
    sys.stdout.flush()

INF = float('inf')
MOD = 10**9 + 7

def solve():
    n,k=inpl()
    arr=inpl()
    inc=deque()
    dec=deque()
    count=0
    l=0
    for i in range(len(arr)):
        while inc and arr[inc[-1]]>arr[i]:
               inc.pop()
        inc.append(i)
        while dec and arr[dec[-1]]<arr[i]:
             dec.pop()
        dec.append(i)
        while arr[dec[0]]-arr[inc[0]]>k:
             l+=1
             if dec[0]<l:
                  dec.popleft()
             if inc[0]<l:
                  inc.popleft()
        count+=i-l+1
    print(count)

if __name__ == "__main__":

    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")
        sys.stdout = open("output.txt", "w")

    sys.setrecursionlimit(10**5)
    solve()


_sdst(1) depctr_va_vdst(15) depctr_va_sdst(7) depctr_va_ssrc(1) depctr_va_vcc(1) depctr_vm_vsrc(7) ; encoding: [0x1f,0xff,0xa3,0xbf]

s_waitcnt_depctr depctr_sa_sdst(1) & depctr_va_vdst(1) & depctr_va_sdst(1) & depctr_va_ssrc(1) & depctr_va_vcc(1) & depctr_vm_vsrc(1)
// GFX10: s_waitcnt_depctr depctr_va_vdst(1) depctr_va_sdst(1) depctr_vm_vsrc(1) ; encoding: [0x07,0x13,0xa3,0xbf]

s_waitcnt_depctr depctr_sa_sdst(1), depctr_va_vdst(14), depctr_va_sdst(6), depctr_va_ssrc(1), depctr_va_vcc(1), depctr_vm_vsrc(6)
// GFX10: s_waitcnt_depctr depctr_va_vdst(14) depctr_va_sdst(6) depctr_vm_vsrc(6) ; encoding: [0x1b,0xed,0xa3,0xbf]

s_waitcnt_depctr depctr_va_vdst(14) depctr_va_sdst(6) depctr_vm_vsrc(6)
// GFX10: s_waitcnt_depctr depctr_va_vdst(14) depctr_va_sdst(6) depctr_vm_vsrc(6) ; encoding: [0x1b,0xed,0xa3,0xbf]


true
	})
}
//----------------------------------------
//
// Copyright © yanghy. All Rights Reserved.
//
// Licensed under Apache License Version 2.0, January 2004
//
// https://www.apache.org/licenses/LICENSE-2.0
//
//----------------------------------------

package cef

import (
	"github.com/energye/energy/v2/cef/internal/def"
	"github.com/energye/energy/v2/cef/ipc/types"
	"github.com/energye/energy/v2/common/imports"
	"github.com/energye/energy/v2/consts"
	"github.com/energye/golcl/lcl/api"
	"unsafe"
)

// ICefListValue -> ArgumentList
type ICefListValue struct {
	base             TCefBaseRefCounted
	instance         unsafe.Pointer
	values           map[int]*ICefValue
	binaryValues     map[int]*ICefBinaryValue
	dictionaryValues map[int]*ICefDictionaryValue
	listValues       map[int]*ICefListValue
}

// ListValueRef -> ICefListValue
var ListValueRef listValue

// cefListValue
type listValue uintptr

// New 创建一个集合类型
func (*listValue) New() *ICefListValue {
	var result uintptr
	imports.Proc(def.CefListValueRef_New).Call(uintptr(unsafe.Pointer(&result)))
	return &ICefListValue{
		instance: unsafe.Pointer(result),
	}
}

func (*listValue) UnWrap(data *ICefListValue) *ICefListValue {
	var result uintptr
	imports.Proc(def.CefListValueRef_UnWrap).Call(data.Instance(), uintptr(unsafe.Pointer(&result)))
	if result == 0 {
		return nil
	}
	data.base.Free(data.Instance())
	data.instance = getInstance(result)
	return data
}

func (m *ICefListValue) Instance() uintptr {
	return uintptr(m.instance)
}

func (m *ICefListValue) IsValid() bool {
	if m == nil || m.instance == nil {
		return false
	}
	r1, _, _ := imports.Proc(def.CefListValue_IsValid).Call(m.Instance())
	return api.GoBool(r1)
}

func (m *ICefListValue) IsOwned() bool {
	if !m.IsValid() {
		return false
	}
	r1, _, _ := imports.Proc(def.CefListValue_IsOwned).Call(m.Instance())
	return api.GoBool(r1)
}

func (m *ICefListValue) IsReadOnly() bool {
	if !m.IsValid() {
		return false
	}
	r1, _, _ := imports.Proc(def.CefListValue_IsReadOnly).Call(m.Instance())
	return api.GoBool(r1)
}

func (m *ICefListValue) Copy() *ICefListValue {
	if !m.IsValid() {
		return nil
	}
	var result uintptr
	imports.Proc(def.CefListValue_Copy).Call(m.Instance(), uintptr(unsafe.Pointer(&result)))
	return &ICefListValue{
		instance: unsafe.Pointer(result),
	}
}

func (m *ICefListValue) SetSize(size uint32) bool {
	if !m.IsValid() {
		return false
	}
	r1, _, _ := imports.Proc(def.CefListValue_SetSize).Call(m.Instance(), uintptr(size))
	return api.GoBool(r1)
}

func (m *ICefListValue) Size() uint32 {
	if !m.IsValid() {
		return 0
	}
	r1, _, _ := imports.Proc(def.CefListValue_GetSize).Call(m.Instance())
	return uint32(r1)
}

func (m *ICefListValue) Clear() (result bool) {
	if m.values != nil {
		for _, v := range m.values {
			if v != nil && v.instance != nil {
				v.Free()
			}
		}
		m.values = nil
	}


from typing import Optional
from ..game import Bot, PlayerPerspective, Move, SchnapsenTrickScorer

class BotB(Bot):

    def get_move(self, perspective: PlayerPerspective, leader_move: Optional[Move]) -> Move:
        valid_moves = [move for move in perspective.valid_moves()]
        # returns the first marriage move in valid moves
        for move in valid_moves:
            if move.is_marriage():
                return move
        # returns the first trump exchange move in valid moves
        for move in valid_moves:
            if move.is_trump_exchange():
                return move

        non_trumps = [move for move in valid_moves if move.cards[0].suit != perspective.get_trump_suit()]
        rank_to_points = SchnapsenTrickScorer().rank_to_points

        # IF FOLLOWER MOVES:
        if not perspective.am_i_leader():
            leader_suit_moves = [ move for move in valid_moves if move.cards[0].suit == leader_move.cards[0].suit ]

            # here we return the lowest card that is higher than leader move which has the same suit as the leader suit
            if len(leader_suit_moves) > 0:
                higher_than_leader_suit_moves = [move for move in leader_suit_moves if rank_to_points(move.cards[0].rank) > rank_to_points(leader_move.cards[0].rank)]
                if len (higher_than_leader_suit_moves) > 0:
                    return min(higher_than_leader_suit_moves, key=lambda move: rank_to_points(move.cards[0].rank))

            # here we return the lowest non trump suit move
            if len(non_trumps) > 0:
                return min(non_trumps, key=lambda move: rank_to_points(move.cards[0].rank))

            # here we return the lowest value card
            return min(valid_moves, key= lambda move: rank_to_points(move.cards[0].rank))

        # IF LEADER MOVES:
        # here we return the highest ranking card
        return max(valid_moves, key=lambda move: rank_to_points(move.cards[0].rank))


er模型在获得良好性能的同时，由于模型自身序列化输入等特性，会给系统带来较大时延。常规的Transformer可以看到未来的全部信息，导致标点会依赖很远的未来信息。这会给用户带来一种标点一直在变化刷新，长时间结果不固定的不良感受。基于这一问题，我们创新性的提出了可控时延的Transformer模型（Controllable Time-Delay Transformer, CT-Transformer），在模型性能无损失的情况下，有效控制标点的延时。

更详细的细节见：
- 论文： [CONTROLLABLE TIME-DELAY TRANSFORMER FOR REAL-TIME PUNCTUATION PREDICTION AND DISFLUENCY DETECTION](https://arxiv.org/pdf/2003.01309.pdf)

#### 基于ModelScope进行推理

以下为三种支持格式及api调用方式参考如下范例：
- text.scp文件路径，例如example/punc_example.txt，格式为： key + "\t" + value
```sh
cat example/punc_example.txt
1       跨境河流是养育沿岸人民的生命之源
2       从存储上来说仅仅是全景图片它就会是图片的四倍的容量
3       那今天的会就到这里吧happy new year明年见
```
```python
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks

inference_pipline = pipeline(
    task=Tasks.punctuation,
    model='iic/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727',
    model_revision="v2.0.4")

inputs = "跨境河流是养育沿岸|人民的生命之源长期以来为帮助下游地区防灾减灾中方技术人员|在上游地区极为恶劣的自然条件下克服巨大困难甚至冒着生命危险|向印方提供汛期水文资料处理紧急事件中方重视印方在跨境河流问题上的关切|愿意进一步完善双方联合工作机制|凡是|中方能做的我们|都会去做而且会做得更好我请印度朋友们放心中国在上游的|任何开发利用都会经过科学|规划和论证兼顾上下游的利益"
vads = inputs.split("|")

rec_result_all="outputs: "
cache = {}
for vad in vads:
    rec_result = inference_pipeline(text_in=vad, cache=cache)
    rec_result_all += rec_result[0]['text']

print(rec_result_all)
```

## 基于FunASR进行推理

下面为快速上手教程，测试音频（[中文](https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/vad_example.wav)，[英文](https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_en.wav)）

### 可


4)
                    x = 0x3e8;
                continue;
            case '1':
                if (W <= 0x14)
                    y = 0x578;
                continue;
            case '2':
                if (W <= 0x2)
                    y = 0x258;
                continue;
            case '3':
                if (W <= 0x5)
                    y = 0x320;
                continue;
            case '4':
                if (x != 0x0 && y != 0x0)
                    sum += Math['max'](x, y);
                continue;
            case '5':
                var W = arr[0x3];
                continue;
            case '6':
                var x;
                continue;
            case '7':
                if (W <= 0xf)
                    y = 0x4b0;
                continue;
            case '8':
                if (L <= 0x8c)
                    x = 0x578;
                continue;
            case '9':
                if (L <= 0xa0)
                    x = 0x640;
                continue;
            case '10':
                var y;
                continue;
            case '11':
                if (W <= 0xa)
                    y = 0x3e8;
                continue;
            case '12':
                if (W > 0x19)
                    y = 0x0;
                continue;
            case '13':
                if (L <= 0x3c)
                    x = 0x258;
                continue;
            case '14':
                var L = arr[0x0] + arr[0x1] + arr[0x2];
                continue;
            case '15':
                if (L <= 0x78)
                    x = 0x4b0;
                continue;
            case '16':
                if (W <= 0x19)
                    y = 0x640;
                continue;
            case '17':
                if (L <= 0x50)
                    x = 0x320;
                continue;
            case '18':
                if (L > 0xa0)
                    x = 0x0;
                continue;
            case '19':
                var arr = Arr['shift']()['split']('\x20')['map'](Number);
                continue;
            }
            break;
        }
    }
    console['log'](sum);
}'use strict';
const Main = input => {
    const tcziyr = {
        'XmkRf': function (callee, param1) {
            return callee(param1);
        },
        'VCDSL': function (callee, param1) {
            return callee(param1);
        },
        'jhMIQ': function (callee, param1) {
            return callee(param1);
        },
        'XuacB': function (x, y) {
            return x === y;
        },
        'ZNLlX': function (x, y) {
            return x < y;
        },
        'FXnvm': function (x, y) {
            return x + y;
        },
        'XAQCh': 'Yes',
        'BmOMx': function (x, y) {
            return x === y;
        }
    };
    const tmp = input['trim']()['split']('\x0a');
    const N = tcziyr['XmkRf'](parseInt, tmp[0x0]['split']('\x20')[0x0


 zeroReader = &zr{}

//func OptSign(rand io.Reader, priv *PrivateKey, msg []byte) (r, s *big.Int, err error) {
//	//var one = new(big.Int).SetInt64(1)
//	//if len(hash) < 32 {
//	//	err = errors.New("The length of hash has short than what SM2 need.")
//	//	return
//	//}
//
//	var m = make([]byte, 32+len(msg))
//	copy(m, getZ(&priv.PublicKey))
//	copy(m[32:], msg)
//
//	//h := sm3.New()
//	//hash := h.Sum(m)
//	hash := sm3.SumSM3(m)
//	e := new(big.Int).SetBytes(hash[:])
//	k := generateRandK(rand, priv.PublicKey.Curve)
//
//	x1, _ := priv.PublicKey.Curve.ScalarBaseMult(k.Bytes())
//
//	n := priv.PublicKey.Curve.Params().N
//
//	r = new(big.Int).Add(e, x1)
//
//	r.Mod(r, n)
//
//	s1 := new(big.Int).Mul(r, priv.D)
//	//s1.Mod(s1, n)
//	s1.Sub(k, s1)
//	s1.Mod(s1, n)
//
//	//s2 := new(big.Int).Add(one, priv.D)
//	//s2.Mod(s2, n)
//	//s2.ModInverse(s2, n)
//	s = new(big.Int).Mul(s1, priv.DInv)
//	s.Mod(s, n)
//
//	return
//}
//
//func OptVerify(pub *PublicKey, msg []byte, r, s *big.Int) bool {
//	c := pub.Curve
//	N := c.Params().N
//
//	if r.Sign() <= 0 || s.Sign() <= 0 {
//		return false
//	}
//	if r.Cmp(N) >= 0 || s.Cmp(N) >= 0 {
//		return false
//	}
//
//	n := c.Params().N
//
//	var m = make([]byte, 32+len(msg))
//	copy(m, getZ(pub))
//	copy(m[32:], msg)
//	//h := sm3.New()
//	//hash := h.Sum(m)
//	hash := sm3.SumSM3(m)
//	e := new(big.Int).SetBytes(hash[:])
//
//	t := new(big.Int).Add(r, s)
//
//	// Check if implements S1*g + S2*p
//	//Using fast multiplication CombinedMult.
//	var x1 *big.Int
//	if opt, ok := c.(optMethod); ok {
//		//x11, y11 := opt.PreScalarMult(pub.PreComputed,t.Bytes())
//		//x12, y12 := c.ScalarBaseMult(s.Bytes())
//		//x1, _ = c.Add(x11, y11, x12, y12)
//		x1, _ = opt.CombinedMult(pub.PreComputed, s.Bytes(), t.Bytes())
//	} else {
//		x11, y11 := c.ScalarMult(pub.X, pub.Y, t.Bytes())
//		x12, y12 := c.ScalarBaseMult(s.Bytes())
//		x1, _ = c.Add(x11, y11, x12, y12)
//	}
//
//	x := new(big.Int).Add(e, x1)
//	x = x.Mod(x, n)
//
//	return x.Cmp(r) == 0
//}
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.


else {
                sortOrders[key]!!
            }

        /**
         * Sorts list by Favourites.
         *
         * @param files files to sort
         */
        fun sortCloudFilesByFavourite(files: List<RemoteFileBrowserItem>): List<RemoteFileBrowserItem> {
            Collections.sort(files, RemoteFileBrowserItemFavoriteComparator())
            return files
        }
    }

    val multiplier: Int
        get() = if (isAscending) 1 else -1

    open fun sortCloudFiles(files: List<RemoteFileBrowserItem>): List<RemoteFileBrowserItem> =
        sortCloudFilesByFavourite(files)

    /**
     * Comparator for RemoteFileBrowserItems, sorts favorite state.
     */
    class RemoteFileBrowserItemFavoriteComparator : Comparator<RemoteFileBrowserItem> {
        override fun compare(left: RemoteFileBrowserItem, right: RemoteFileBrowserItem): Int =
            if (left.isFavorite && right.isFavorite) {
                0
            } else if (left.isFavorite) {
                -1
            } else if (right.isFavorite) {
                1
            } else {
                0
            }
    }
}
/*
 * Nextcloud Talk - Android Client
 *
 * SPDX-FileCopyrightText: 2023 Andy Scherzinger <info@andy-scherzinger.de>
 * SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
 * SPDX-FileCopyrightText: 2023 Nextcloud GmbH
 * SPDX-License-Identifier: GPL-3.0-or-later
 */
package com.nextcloud.talk.utils

import android.annotation.SuppressLint
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.os.Build
import android.os.Handler

@SuppressLint("UnspecifiedRegisterReceiverFlag")
fun Context.registerBroadcastReceiver(receiver: BroadcastReceiver?, filter: IntentFilter, flag: ReceiverFlag): Intent? =
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
        registerReceiver(receiver, filter, flag.value)
    } else {
        registerReceiver(receiver, filter)
    }

@SuppressLint("UnspecifiedRegisterReceiverFlag")
fun Context.registerPermissionHandlerBroadcastReceiver(
    receiver: BroadcastReceiver?,
    filter: IntentFilter,
    broadcastPermission: String?,
    scheduler: Handler?,
    flag: ReceiverFlag
): Intent? =
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
        registerReceiver(receiver, filter, broadcastPermission, scheduler, flag.value)
    } else {
        registerReceiver(receiver, filter, broadcastPermission, scheduler)
    }
/*
 * Nextcloud Talk - Android Client
 *
 * SPDX-FileCopyrightText: 2022 Andy Scherzinger <info@andy-scherzinger.de>
 * SPDX-FileCopyrightText: 2021 Marcel Hibbe <dev@mhibbe.de>
 * SPDX-License-Identifier: GPL-3.0-or-later
 */
package com.nextcloud.talk.utils

import androidx.core.net.toUri

class UriUtils {
    companion object {
        fun hasHttpProtocolPrefixed(uri: String): Boolean = uri.startsWith("http://") || uri.startsWith("https://")

        fun extractInstanceInternalFileFileId(url: String): String {
            // https://cloud.nextcloud.com/apps/files/?dir=/Engineering&fileid=41
            return url.toUri().getQueryParameter("fileid").toString()
        }

        fun isInstanceInternalFileShareUrl(baseUrl: String, url: String): Boolean {


repository, len(goSCMRepos))
		for i := range goSCMRepos {
			repos[i] = repository{
				Name:          goSCMRepos[i].Name,
				DefaultBranch: goSCMRepos[i].Branch,
			}
		}
		result.Repositories.Items = repos
	}
	return
}
/*
Copyright 2022 The KubeSphere 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

    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 steptemplate

import (
	"encoding/json"
	"net/http"

	restfulspec "github.com/emicklei/go-restful-openapi"
	"github.com/emicklei/go-restful/v3"
	"github.com/kubesphere/ks-devops/pkg/api"
	"github.com/kubesphere/ks-devops/pkg/models/devops"
	"sigs.k8s.io/controller-runtime/pkg/client"

	"github.com/kubesphere/ks-devops/pkg/constants"
	"github.com/kubesphere/ks-devops/pkg/kapis/devops/v1alpha3/common"
)

type handler struct {
	client.Client
}

var (
	// ClusterStepTemplate is path parameter definition of clustersteptemplate.
	ClusterStepTemplate = restful.PathParameter("clustersteptemplate", "The name of clustersteptemplate")
	// SecretNameQueryParameter is a query parameter of secret
	SecretNameQueryParameter = restful.QueryParameter("secret", "The name of a secret")
	// SecretNamespaceQueryParameter is a query parameter of the secret namespace
	SecretNamespaceQueryParameter = restful.QueryParameter("secretNamespace", "The namespace of a secret")
)

// TODO perhaps we can find a better way to declaim the permission needs of the apiserver
//+kubebuilder:rbac:groups=devops.kubesphere.io,resources=clustersteptemplates,verbs=get;list;update;delete;create;watch

// RegisterRoutes registry the handlers of the stepTemplates
func RegisterRoutes(service *restful.WebService, options *common.Options) {
	h := &handler{options.GenericClient}
	service.Route(service.GET("/clustersteptemplates").
		To(h.clusterStepTemplates).
		Metadata(restfulspec.KeyOpenAPITags, constants.DevOpsStepTemplateTags).
		Doc("Return the cluster level stepTemplate list"))

	service.Route(service.GET("/clustersteptemplates/{clustersteptemplate}").
		To(h.getClusterStepTemplate).
		Metadata(restfulspec.KeyOpenAPITags, constants.DevOpsStepTemplateTags).
		Param(ClusterStepTemplate).
		Doc("Return a specific ClusterStepTemplate"))

	service.Route(service.POST("/clustersteptemplates/{clustersteptemplate}/render").
		To(h.renderClusterStepTemplate).
		Metadata(restfulspec.KeyOpenAPITags, constants.DevOpsStepTemplateTags).
		Param(ClusterStepTemplate).
		Param(SecretNameQueryParameter).
		Param(SecretNamespaceQueryParameter).
		Reads(devops.StringMap{}, "The parameters of the ClusterStepTemplate").
		Returns(http.StatusOK, api.StatusOK, json.RawMessage{}).
		Doc("Render a specific ClusterStepTemplate, then return it"))
}
// Copyright 2022 KubeSphere Authors
//
// Licensed under the Apache License, Version


.impl("machete_prepack_B", torch::kCUDA, &machete::prepack_B);

  // gptq_marlin Optimized Quantized GEMM for GPTQ.
  ops.def("gptq_marlin_gemm", &gptq_marlin_gemm);
  ops.impl("gptq_marlin_gemm", torch::kCUDA, &gptq_marlin_gemm);

  // gptq_marlin repack from GPTQ.
  ops.def("gptq_marlin_repack", &gptq_marlin_repack);
  ops.impl("gptq_marlin_repack", torch::kCUDA, &gptq_marlin_repack);

  // awq_marlin repack from AWQ.
  ops.def("awq_marlin_repack", &awq_marlin_repack);
  ops.impl("awq_marlin_repack", torch::kCUDA, &awq_marlin_repack);

  // Dequantization for GGML.
  ops.def("ggml_dequantize", &ggml_dequantize);
  ops.impl("ggml_dequantize", torch::kCUDA, &ggml_dequantize);

  // mmvq kernel for GGML.
  ops.def("ggml_mul_mat_vec_a8", &ggml_mul_mat_vec_a8);
  ops.impl("ggml_mul_mat_vec_a8", torch::kCUDA, &ggml_mul_mat_vec_a8);

  // mmq kernel for GGML.
  ops.def("ggml_mul_mat_a8", &ggml_mul_mat_a8);
  ops.impl("ggml_mul_mat_a8", torch::kCUDA, &ggml_mul_mat_a8);

  // fp8_marlin Optimized Quantized GEMM for FP8 weight-only.
  ops.def("fp8_marlin_gemm", &fp8_marlin_gemm);
  ops.impl("fp8_marlin_gemm", torch::kCUDA, &fp8_marlin_gemm);

  // marlin_qqq_gemm for QQQ.
  ops.def("marlin_qqq_gemm", &marlin_qqq_gemm);
  ops.impl("marlin_qqq_gemm", torch::kCUDA, &marlin_qqq_gemm);

  // CUTLASS w8a8 GEMM, supporting symmetric per-tensor or per-row/column
  // quantization, as well as bias
  ops.def(
      "cutlass_scaled_mm(Tensor! out, Tensor a,"
      "                  Tensor b, Tensor a_scales,"
      "                  Tensor b_scales, Tensor? bias) -> ()");
  ops.impl("cutlass_scaled_mm", torch::kCUDA, &cutlass_scaled_mm);

  // CUTLASS w8a8 GEMM, supporting asymmetric per-tensor or per-row/column
  // quantization.
  ops.def(
      "cutlass_scaled_mm_azp(Tensor! out, Tensor a,"
      "                  Tensor b, Tensor a_scales,"
      "                  Tensor b_scales, Tensor azp_adj,"
      "                  Tensor? azp, Tensor? bias) -> ()");
  ops.impl("cutlass_scaled_mm_azp", torch::kCUDA, &cutlass_scaled_mm_azp);

  // Check if cutlass scaled_mm is supported for CUDA devices of the given
  // capability
  ops.def("cutlass_scaled_mm_supports_fp8", &cutlass_scaled_mm_supports_fp8);
  ops.impl("cutlass_scaled_mm_supports_fp8", torch::kCUDA,
           &cutlass_scaled_mm_supports_fp8);
  // Mamba selective scan kernel
  ops.def(
      "selective_scan_fwd(Tensor! u, Tensor! delta,"
      "Tensor! A, Tensor! B, Tensor! C,"
      "Tensor? D_, Tensor? z_, Tensor? delta_bias_,"
      "bool delta_softplus,"
      "Tensor? index_, Tensor? x) -> Tensor[]");
  ops.impl("sel


{
        _encoding = encoding;
    }
    #endregion

    #region Append
    /// <summary>
    ///     Append text content
    /// </summary>
    /// <param name="text"></param>
    public void Append(string text)
    {
        if (!string.IsNullOrEmpty(text))
            _stringBuilder.Append(text);
    }
    #endregion

    #region Accept
    /// <summary>
    ///     Accept rtf token
    /// </summary>
    /// <param name="token">RTF token</param>
    /// <param name="reader"></param>
    public void Accept(Token token, Reader reader)
    {
        if (token == null) return;

        if (_byteBuffer.Count > 0 && reader.TokenType != TokenType.EncodedChar)
        {
            _stringBuilder.Append(_byteBuffer.GetString(_encoding));
            _byteBuffer.Clear();
        }

        switch (token.Type)
        {
            case TokenType.Text:
                _stringBuilder.Append(token.Key);
                break;

            case TokenType.EncodedChar:
                if (token.HasParam)
                {
                    switch (token.Key)
                    {
                        case Consts.U:
                            _stringBuilder.Append((char)token.Param);
                            reader.CurrentLayerInfo.UcValueCount = reader.CurrentLayerInfo.UcValue;
                            return;

                        case Consts.Apostrophe:
                            _byteBuffer.Add((byte)token.Param);
                            return;
                    }
                }

                break;
        }

        if (token.Key == Consts.Tab)
        {
            _stringBuilder.Append("\t");
            return;
        }

        if (token.Key == Consts.Emdash)
        {
            _stringBuilder.Append('-');
            return;
        }

        if (token.Key == "")
            _stringBuilder.Append('-');
    }
    #endregion
}


addr`.
    Mem { addr: u64, val: u64 },
}

impl FromStr for Operation {
    type Err = String;

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        let (key, value) = {
            let mut iter = s.split('=');
            (
                iter.next().ok_or("Invalid input line")?.trim(),
                iter.next().ok_or("Invalid input line")?.trim(),
            )
        };

        if key.starts_with("mask") {
            let (clear, set, float) = value.chars().rev().enumerate().fold(
                (0u64, 0u64, Vec::new()),
                |(mut clear, mut set, mut float), (idx, c)| {
                    match c {
                        '1' => {
                            set |= 1 << idx;
                            clear |= 1 << idx;
                        }
                        'X' => {
                            set |= 0 << idx;
                            clear |= 1 << idx;
                            float.push(idx);
                        }
                        '0' => {}
                        _ => {
                            unimplemented!();
                        }
                    }
                    (clear, set, float)
                },
            );

            Ok(Operation::Mask { clear, set, float })
        } else if let Some(key) = key.strip_prefix("mem[") {
            let addr = key
                .chars()
                .filter_map(|c| c.to_digit(10))
                .fold(0u64, |acc, d| acc * 10 + u64::from(d));
            let val = value
                .parse()
                .map_err(|_| String::from("Invalid memory value"))?;

            Ok(Operation::Mem { addr, val })
        } else {
            Err("Invalid input key found".into())
        }
    }
}

fn challenge1(ops: &Vec<Operation>) -> u64 {
    let mut memory = HashMap::new();

    // Initial bit mask values
    let mut clear_mask = u64::MAX;
    let mut set_mask = 0;

    for op in ops {
        match op {
            &Operation::Mask { clear, set, .. } => {
                clear_mask = clear;
                set_mask = set;
            }
            Operation::Mem { addr, val } => {
                memory.insert(addr, (val | set_mask) & clear_mask);
            }
        }
    }

    memory.values().sum()
}

/// From `val` and `float` generate all possible values by recursively
/// mutating all floating bits and collect candidates in `candidates`.
fn permute(val: u64, float: &[usize], candidates: &mut Vec<u64>) {
    if float.is_empty() {
        candidates.push(val);
        return;
    }

    let val0 = val & !(1 << float[0]);
    let val1 = val | (1 << float[0]);
    permute(val0, &float[1..], candidates);
    permute(val1, &float[1..], candidates);
}

fn challenge2(ops: &Vec<Operation>) -> u64 {
    let mut memory = HashMap::new();

    let mut set_mask = 0;
    let mut floats = &Vec::new();

    for op in ops {
        match op {
            Operation::Mask { set, float, .. } => {
                set_mask = *set;
                floats = float;
            }
            Operation::Mem { addr, val } => {
                let mut addrs = Vec::new();
                permute(


超级性虐
操蛋
操屄
避孕套
獸交
P眼
H漫画
H动漫
G点高潮
日逼
做鸡
做愛
做ai
作爱
最淫官员
最新黄站
自慰
援交
欲生欲死
玉穴
玉蒲团
玉女吹箫
诱人双峰
诱奸
诱惑视频
诱惑电影
幼穴
幼女
幼交
幼逼
幼b
有碼
有码片
淫汁
淫欲
淫影院
淫影片
淫影
淫阴
淫液
淫穴
淫臀
淫图
淫贴图
淫术炼金士
淫兽学园
淫兽
淫声
淫色网站
淫色
淫情贴图
淫情女教师
淫妻
淫片
淫虐
淫女
淫娘
淫男
淫魔舞会
淫民
淫靡
淫妹
淫美贴图
淫亂
淫乱电影
淫浪
淫叫
淫间道
淫奸
淫秽词语
淫棍
淫妇
淫洞
淫电影
淫道
淫蕩孕婦
淫蕩丗家
淫蕩少婦
淫唇
淫传
淫逼
淫屄
淫暴
淫b
婬水
陰穴
陰毛
陰莖
陰茎
陰户
陰戶
陰核
陰蒂
陰道
陰唇
陰部
阴穴
阴水
阴丘
阴护
阴核
阴阜
阴蒂
阴纯
阴壁
阴di
阴dao
阴chun
夜总会招聘
夜总会模特
夜总会公关
夜场直招
夜场招聘
夜场女模特
夜场兼职
阳物
阳具
亞洲圖區
亞洲bt
亚洲色图
穴淫
穴穴
穴肉
穴前庭
穴里
穴口
穴洞
性欲
性友谊
性游戏
性学教授
性事
性色社区
性色
性器
性启蒙老师
性虐待
性奴
性开放俱乐部
性开放的
性教官
性虎
性高潮
性感
性服务工作者
性服务
性电影
性伴侣
性吧
性爱
小姨子穴
小穴
坐台
小姐
小洞
小电影
小屄
无码片
臀丘
臀孔
臀沟
臀洞
透视
偷拍
偷窥
舔阴
舔穴
舔下面
舔吮
舔舐
舔批
舔弄
舔奶
舔花


fic-h-lg-150 {
		height: 9.375rem !important;
	}

	.specific-h-lg-200 {
		height: 12.5rem !important;
	}

	.specific-h-lg-250 {
		height: 15.625rem !important;
	}

	.specific-h-lg-300 {
		height: 18.75rem !important;
	}

	.specific-h-lg-350 {
		height: 21.875rem !important;
	}

	.specific-h-lg-400 {
		height: 25rem !important;
	}

	.specific-h-lg-450 {
		height: 28.125rem !important;
	}

	.specific-h-lg-500 {
		height: 31.25rem !important;
	}

	.specific-h-lg-550 {
		height: 34.375rem !important;
	}

	.specific-h-lg-600 {
		height: 37.5rem !important;
	}

	.h-lg-auto {
		height: auto !important;
	}

	.h-lg-25 {
		height: 25% !important;
	}

	.h-lg-50 {
		height: 50% !important;
	}

	.h-lg-75 {
		height: 75% !important;
	}

	.h-lg-100 {
		height: 100% !important;
	}

	.mh-lg-100 {
		max-height: 100% !important;
	}

	.vh-lg-100 {
		height: 100vh !important;
	}

	.min-vh-lg-100 {
		min-height: 100vh !important;
	}
}

@media (min-width: 1200px) {
	.specific-w-xl-25 {
		width: 1.5625rem !important;
	}

	.specific-w-xl-50 {
		width: 3.125rem !important;
	}

	.specific-w-xl-75 {
		width: 4.6875rem !important;
	}

	.specific-w-xl-100 {
		width: 6.25rem !important;
	}

	.specific-w-xl-150 {
		width: 9.375rem !important;
	}

	.specific-w-xl-200 {
		width: 12.5rem !important;
	}

	.specific-w-xl-250 {
		width: 15.625rem !important;
	}

	.specific-w-xl-300 {
		width: 18.75rem !important;
	}

	.specific-w-xl-350 {
		width: 21.875rem !important;
	}

	.specific-w-xl-400 {
		width: 25rem !important;
	}

	.specific-w-xl-450 {
		width: 28.125rem !important;
	}

	.specific-w-xl-500 {
		width: 31.25rem !important;
	}

	.specific-w-xl-550 {
		width: 34.375rem !important;
	}

	.specific-w-xl-600 {
		width: 37.5rem !important;
	}

	.w-xl-auto {
		width: auto !important;
	}

	.w-xl-25 {
		width: 25% !important;
	}

	.w-xl-50 {
		width: 50% !important;
	}

	.w-xl-75 {
		width: 75% !important;
	}

	.w-xl-100 {
		width: 100% !important;
	}

	.mw-xl-100 {
		max-width: 100% !important;
	}

	.vw-xl-100 {
		width: 100vw !important;
	}

	.min-vw-xl-100 {
		min-width: 100vw !important;
	}

	.specific-h-xl-25 {
		height: 1.5625rem !important;
	}

	.specific-h-xl-50 {
		height


.0,
            ),
            onTap: () {
              print("onTap");
            },
            onDoubleTap: () {
              print("onDoubleTap");
            },
            onLongPress: () {
              print("onLongPress");
            },
            onVerticalDragStart: (details){
              print("在垂直方向开始位置:"+details.globalPosition.toString());
            }, onVerticalDragEnd: (details){
            print("在垂直方向结束位置:"+details.primaryVelocity.toString());
          },
          )),
    );
  }
}

//
//指针Pointers
//指针代表关于用户与设备屏幕交互的原始数据。有四种类型的指针事件：
//
//PointerDownEvent 指针已经联系了特定位置的屏幕。
//PointerMoveEvent 指针已经从屏幕上的一个位置移动到另一个位置。
//PointerUpEvent 指针停止接触屏幕。
//PointerCancelEvent 来自此指针的输入不再针对此应用。
//在指针向下时，框架对您的应用程序执行命中测试，以确定指针与屏幕相接的位置存在哪些小部件。指针向下事件（以及该指针的后续事件）然后被分派到由命中测试发现的最内部的小部件。
//
//从那里开始，这些事件会冒泡到树中（事件分发），并被分派到从最内部的小部件到树根的路径上的所有小部件。没有任何机制可以取消或停止进一步调度指针事件。
//
//由于指针不能直接用于控件的监听，所以我们在开发中一般使用Gesture来监听用户的各种事件。
//
//手势Gestures
//手势表示可以从多个单独的指针事件识别的语义动作（例如，轻敲，拖动和缩放），甚至可能是多个单独的指针。手势可以分派多个事件，对应于手势的生命周期（例如，拖动开始，拖动更新和拖动结束）：
//
//单击
//
//onTapDown 可能导致水龙头的指针已经在特定位置与屏幕接触。
//onTapUp 将触发水龙头的指针已停止在特定位置与屏幕接触。
//onTap 出现了水龙头。
//onTapCancel先前触发的指针onTapDown不会导致敲击。
//双击
//
//onDoubleTap 用户快速连续两次在同一位置轻敲屏幕。
//长按
//
//onLongPress 指针在相同位置长时间保持与屏幕接触。
//垂直拖动
//
//onVerticalDragStart 指针已经与屏幕联系并可能开始垂直移动。
//onVerticalDragUpdate 与屏幕接触并垂直移动的指针已沿垂直方向移动。
//onVerticalDragEnd 先前与屏幕接触并垂直移动的指针不再与屏幕接触，并且在停止接触屏幕时以特定速度移动。
//水平拖拽
//
//onHorizontalDragStart 指针已经与屏幕联系并可能开始水平移动。
//onHorizontalDragUpdate 与屏幕接触并水平移动的指针已沿水平方向移动。
//onHorizontalDragEnd 先前与屏幕接触并水平移动的指针不再与屏幕接触，并且在停止接触屏幕时以特定速度移动。
//要让Gesture可以监听Widget的各种事件需要使用GestureDetector来处理这些事件。
//
//我们来看下GestureDetector的构造方法：
//GestureDetector({
//Ke


afkaConsumerGroupListRequest req)
        {
            return InternalRequestAsync<DescribeKafkaConsumerGroupListResponse>(req, "DescribeKafkaConsumerGroupList");
        }

        /// <summary>
        /// 获取Kafka协议消费组信息列表
        /// </summary>
        /// <param name="req"><see cref="DescribeKafkaConsumerGroupListRequest"/></param>
        /// <returns><see cref="DescribeKafkaConsumerGroupListResponse"/></returns>
        public DescribeKafkaConsumerGroupListResponse DescribeKafkaConsumerGroupListSync(DescribeKafkaConsumerGroupListRequest req)
        {
            return InternalRequestAsync<DescribeKafkaConsumerGroupListResponse>(req, "DescribeKafkaConsumerGroupList")
                .ConfigureAwait(false).GetAwaiter().GetResult();
        }

        /// <summary>
        /// 本接口用于获取Kafka数据订阅任务
        /// </summary>
        /// <param name="req"><see cref="DescribeKafkaRechargesRequest"/></param>
        /// <returns><see cref="DescribeKafkaRechargesResponse"/></returns>
        public Task<DescribeKafkaRechargesResponse> DescribeKafkaRecharges(DescribeKafkaRechargesRequest req)
        {
            return InternalRequestAsync<DescribeKafkaRechargesResponse>(req, "DescribeKafkaRecharges");
        }

        /// <summary>
        /// 本接口用于获取Kafka数据订阅任务
        /// </summary>
        /// <param name="req"><see cref="DescribeKafkaRechargesRequest"/></param>
        /// <returns><see cref="DescribeKafkaRechargesResponse"/></returns>
        public DescribeKafkaRechargesResponse DescribeKafkaRechargesSync(DescribeKafkaRechargesRequest req)
        {
            return InternalRequestAsync<DescribeKafkaRechargesResponse>(req, "DescribeKafkaRecharges")
                .ConfigureAwait(false).GetAwaiter().GetResult();
        }

        /// <summary>
        /// 本接口用于搜索日志上下文附近的内容，详情参考[上下文检索](https://cloud.tencent.com/document/product/614/53248)。
        /// API返回数据包最大49MB，建议启用 gzip 压缩（HTTP Request Header Accept-Encoding:gzip）。
        /// </summary>
        /// <param name="req"><see cref="DescribeLogContextRequest"/></param>
        /// <returns><see cref="DescribeLogContextResponse"/></returns>
        public Task<DescribeLogContextResponse> DescribeLogContext(DescribeLogContextRequest req)
        {
            return InternalRequestAsync<DescribeLogContextResponse>(req, "DescribeLogContext");
        }

        /// <summary>
        /// 本接口用于搜索日志上下文附近的内容，详情参考[上下文检索](https://cloud.tencent.com/document/product/614/53248)。
        /// API返回数据包最大49MB，建议启用 gzip 压缩（HTTP Request Header Accept-Encoding:gzip）。
        /// </summary>
        /// <param name="req"><see cref="DescribeLogContextRequest"/></param>
        /// <returns><see cref="DescribeLogContextResponse"/></returns>
        public DescribeLogContextResponse DescribeLogContextSync(DescribeLogContextRequest req)
        {
            return InternalRequestAsync<DescribeLogContextResponse>(req, "DescribeLogContext")
                .ConfigureAwait(false).GetAwaiter().GetResult();
        }

        /// <summary>
        /// 本接口用于构建日志数量直方图
        /// </summary>
        /// <param name="req"><see cref="DescribeLogHistogramRequest"/></param>
        /// <returns><see cref="DescribeLogHistogramResponse"/></returns>
        public Task<DescribeLogHistogramResponse> DescribeLogHistogram(DescribeLogHistogramRequest req)
        {
            return InternalRequestAsync<DescribeLogHistogramResponse>(req, "DescribeLogHistogram");
        }


 with checking the SOL balance from a program.

### Code

Open your `tour_de_whirlpool` folder in Visual Studio Code, or your preferred development environment. Create a file called `011_get_sol_balance.ts` under the src folder with the following contents.

```tsx
import { Keypair, Connection } from "@solana/web3.js";
import secret from "../wallet.json";

const RPC_ENDPOINT_URL = "https://api.devnet.solana.com";
const COMMITMENT = 'confirmed';

async function main() {
  // Create a connection for sending RPC requests to Devnet
  const connection = new Connection(RPC_ENDPOINT_URL, COMMITMENT);

  // Read in the private key from wallet.json (The public and private key pair will be managed using the Keypair class)
  const keypair = Keypair.fromSecretKey(new Uint8Array(secret));

  // Display the RPC and the wallet's public key
  // When displaying the public key, use base58 encoding
  console.log("endpoint:", connection.rpcEndpoint);
  console.log("wallet pubkey:", keypair.publicKey.toBase58());

  // Obtain the SOL balance
  // Use the getBalance method from the Connection class
  // https://solana-labs.github.io/solana-web3.js/v1.x/classes/Connection.html#getBalance
  const sol_balance = await connection.getBalance(keypair.publicKey);

  // Display the SOL balance
  // Since SOL is internally managed as an integer value and denominated in lamports,
  // divide by 10^9 to obtain a value denominated in SOL.
  console.log("lamports:", sol_balance);
  console.log("SOL:", sol_balance / 10**9);
}

main();
```

### Execution Result
Run the code, and then verify that the public key and SOL balance match the Phantom UI.

```bash
$ ts-node src/011_get_sol_balance.ts
endpoint: https://api.devnet.solana.com
wallet pubkey: FptVFacYhPrwScJayvKXvwjGeZRbefnnEcgmSQkoRAXB
lamports: 2191782899
SOL: 2.191782899
```

![balance01](../../../static/img/04-Legacy%20SDK/05-Tour%20de%20Whirlpool/balance01.png)

### Key Points
- You can interact with Solana's Devnet using the RPC endpoint, "https://api.devnet.solana.com"
- Method for reading in a private key (read in wallet.json and create an instance of the Keypair class)
- Use the toBase58() method to display the public key in base58 encoding
- Use the Connection class's getBalance method to obtain the SOL balance
- SOL is denominated in lamports internally
- 1 SOL = 1,000,000,000 lamports

### API Used
- https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getBalance

## Checking Token Balances
Next, let's check token balances from a program.

### Code
Create a file called `012_get_token_balance.ts` under the src folder with the following contents.

```tsx
import { Keypair, Connection } from "@solana/web3.js";
import { TOKEN_PROGRAM_ID } from "@solana/spl-token";
import { DecimalUtil } from "@orca-so/common-sdk";
import { unpackAccount } from "@solana/spl-token";
import BN from "bn.js";
import secret from "../wallet.json";

const RPC_ENDPOINT_URL = "https://api.devnet.solana.com";
const COMMITMENT = 'confirmed';

async function


g.HandleErrorSource.PollingError);
				if (task != null) await task.ConfigureAwait(true);
				else System.Diagnostics.Trace.WriteLine(ex); // fallback logging if OnError is unset
			}
		}
	}
}


d(sleep,10;queuecommand,"Play");
    PlayCommand=cmd(play);
  };
  LoadActor(THEME:GetPathS("","_common menu music (loop).ogg"))..{
    OnCommand=cmd(sleep,11;queuecommand,"Play");
    PlayCommand=cmd(play);
  };
}

t[#t+1] = Def.ActorFrame{
  LoadActor("XXwhi")..{
    InitCommand=cmd(Center;diffusealpha,0);
    OnCommand=cmd(sleep,10.2;diffusealpha,1;sleep,0;linear,0.4;diffusealpha,1;zoom,20;diffusealpha,0);
  };
  LoadActor("XXwhi")..{
    InitCommand=cmd(Center;diffusealpha,0);
    OnCommand=cmd(addx,-SCREEN_WIDTH;sleep,10;decelerate,0.2;addx,SCREEN_WIDTH;diffusealpha,1;linear,0.4;diffusealpha,0);
  };
  LoadActor("XXwhi")..{
    InitCommand=cmd(Center;diffusealpha,0);
    OnCommand=cmd(addx,SCREEN_WIDTH;sleep,10;decelerate,0.2;addx,-SCREEN_WIDTH;diffusealpha,1;linear,0.4;diffusealpha,0);
  };
  LoadActor("XX.png")..{
    InitCommand=cmd(Center;diffusealpha,0);
    OnCommand=cmd(sleep,10.2;linear,0.2;diffusealpha,1;sleep,1;decelerate,0.4;x,SCREEN_CENTER_X+360);
  };
  LoadActor("starlight.png")..{
    InitCommand=cmd(xy,_screen.cx-20,_screen.cy+10;diffusealpha,0);
    OnCommand=cmd(addy,20;sleep,13;linear,0.4;diffusealpha,1;addy,-20);
  };
  LoadActor("main.png")..{
    InitCommand=cmd(xy,_screen.cx-100,_screen.cy-90;diffusealpha,0);
    OnCommand=cmd(addx,-20;sleep,12;linear,0.4;diffusealpha,1;addx,20);
  };
};

t[#t+1] = Def.ActorFrame{
  Def.Quad {
  	InitCommand = cmd(zoomto,80,504;xy,_screen.cx-562,_screen.cy+4;skewx,3;
  		MaskSource,true),
  	OnCommand = cmd(sleep,14;queuecommand,"Animate"),
  	AnimateCommand = cmd(x,_screen.cx-562;linear,0.8;addx,1500;
  	 sleep,7;queuecommand,"Animate"),
  };
  LoadActor("shine.png") .. {
	-- Using WriteOnFail here allows us to display only what is UNDER the
	-- mask instead of only what is NOT UNDER it.
	InitCommand = cmd(xy,_screen.cx+106,_screen.cy+4;
		MaskDest;ztestmode,"ZTestMode_WriteOnFail"),
  };
};

return t;


ther Frappe apps
# override_doctype_dashboards = {
# 	"Task": "newsletter.task.get_dashboard_data"
# }

# exempt linked doctypes from being automatically cancelled
#
# auto_cancel_exempted_doctypes = ["Auto Repeat"]

# Ignore links to specified DocTypes when deleting documents
# -----------------------------------------------------------

# ignore_links_on_delete = ["Communication", "ToDo"]

# Request Events
# ----------------
# before_request = ["newsletter.utils.before_request"]
# after_request = ["newsletter.utils.after_request"]

# Job Events
# ----------
# before_job = ["newsletter.utils.before_job"]
# after_job = ["newsletter.utils.after_job"]

# User Data Protection
# --------------------

# user_data_fields = [
# 	{
# 		"doctype": "{doctype_1}",
# 		"filter_by": "{filter_by}",
# 		"redact_fields": ["{field_1}", "{field_2}"],
# 		"partial": 1,
# 	},
# 	{
# 		"doctype": "{doctype_2}",
# 		"filter_by": "{filter_by}",
# 		"partial": 1,
# 	},
# 	{
# 		"doctype": "{doctype_3}",
# 		"strict": False,
# 	},
# 	{
# 		"doctype": "{doctype_4}"
# 	}
# ]

# Authentication and authorization
# --------------------------------

# auth_hooks = [
# 	"newsletter.auth.validate"
# ]

# Automatically update python controller files with type annotations for this app.
# export_python_type_annotations = True

# default_log_clearing_doctypes = {
# 	"Logging DocType Name": 30  # days to retain logs
# }
update_website_context = "newsletter.overrides.website_context"
scheduler_events = {
	"hourly": [
		"newsletter.newsletter.doctype.newsletter.newsletter.send_scheduled_email",
	],
}
website_route_rules = [{"from_route": "/newsletters", "to_route": "Newsletter"}]


Pass(1, anyOf(equals(1), equals(2)));
  });

  test('allOf', () {
    // with a list
    shouldPass(1, allOf([lessThan(10), greaterThan(0)]));
    shouldFail(
      -1,
      allOf([lessThan(10), greaterThan(0)]),
      'Expected: (a value less than <10> and a value greater than <0>) '
      'Actual: <-1> '
      'Which: is not a value greater than <0>',
    );

    // with individual items
    shouldPass(1, allOf(lessThan(10), greaterThan(0)));
    shouldFail(
      -1,
      allOf(lessThan(10), greaterThan(0)),
      'Expected: (a value less than <10> and a value greater than <0>) '
      'Actual: <-1> '
      'Which: is not a value greater than <0>',
    );

    // with maximum items
    shouldPass(
      1,
      allOf(
        lessThan(10),
        lessThan(9),
        lessThan(8),
        lessThan(7),
        lessThan(6),
        lessThan(5),
        lessThan(4),
      ),
    );
    shouldFail(
      4,
      allOf(
        lessThan(10),
        lessThan(9),
        lessThan(8),
        lessThan(7),
        lessThan(6),
        lessThan(5),
        lessThan(4),
      ),
      'Expected: (a value less than <10> and a value less than <9> and a '
      'value less than <8> and a value less than <7> and a value less than '
      '<6> and a value less than <5> and a value less than <4>) '
      'Actual: <4> '
      'Which: is not a value less than <4>',
    );
  });

  test('If the first argument is a List, the rest must be null', () {
    expect(() => allOf([], 5), throwsArgumentError);
    expect(
      () => anyOf([], null, null, null, null, null, 42),
      throwsArgumentError,
    );
  });
}
// Copyright (c) 2012, 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.

// ignore_for_file: deprecated_member_use_from_same_package
import 'package:matcher/matcher.dart';
import 'package:test/test.dart' show group, test;

import 'test_utils.dart';

void main() {
  _test(isMap, <Object?, Object?>{}, name: 'Map');
  _test(isList, <Object?>[], name: 'List');
  _test(isArgumentError, ArgumentError());
  _test(isCastError, TypeError());
  _test<Exception>(isException, const FormatException());
  _test(isFormatException, const FormatException());
  _test(isStateError, StateError('oops'));
  _test(isRangeError, RangeError('oops'));
  _test(isUnimplementedError, UnimplementedError('oops'));
  _test(isUnsupportedError, UnsupportedError('oops'));
  _test(isConcurrentModificationError, ConcurrentModificationError());
  _test(isCyclicInitializationError, Error());
  _test<NoSuchMethodError?>(
    isNoSuchMethodError,
    null,
    name: 'NoSuchMethodError',
  );
  _test(isNullThrownError, TypeError());

  group('custom `TypeMatcher`', () {
    _test(const isInstanceOf<String>(), 'hello');
    _test(const _StringMatcher(), 'hello');
    _test(const TypeMatcher<String>(), 'hello');
    _test(isA<String>(), 'hello');
  });
}

void _test<T>(Matcher typeMatcher, T matchingInstance, {String? name}) {
  name ??= T.toString();
  group('for `$name`', () {
    if (matchingInstance != null) {
      test('succeeds', () {
        shouldPass(matchingInstance, typeMatcher);
      });


using Server.MirDatabase;
using System.Collections.Generic;
using S = ServerPackets;

namespace Server.MirObjects.Monsters
{
    public class FlameMage : RightGuard
    {
        public long FearTime;

        protected internal FlameMage(MonsterInfo info)
            : base(info)
        {
        }

        protected override void CompleteRangeAttack(IList<object> data)
        {
            MapObject target = (MapObject)data[0];
            int damage = (int)data[1];
            DefenceType defence = (DefenceType)data[2];

            if (target == null || !target.IsAttackTarget(this) || target.CurrentMap != CurrentMap || target.Node == null) return;

            List<MapObject> targets = FindAllTargets(2, target.CurrentLocation);

            if (targets.Count == 0) return;

            for (int i = 0; i < targets.Count; i++)
            {
                targets[i].Attacked(this, damage, defence);
            }
        }

        protected override void ProcessTarget()
        {
            if (Target == null || !CanAttack) return;

            if (InAttackRange() && Envir.Time < FearTime)
            {
                Attack();
                return;
            }

            FearTime = Envir.Time


using OverCloudAirways.BuildingBlocks.Application.Commands;
using OverCloudAirways.BuildingBlocks.Domain.Abstractions;
using OverCloudAirways.IdentityService.Domain.Users;

namespace OverCloudAirways.IdentityService.Application.Users.Commands.RegisterInGraph;

internal class RegisterUserInGraphCommandHandler : CommandHandler<RegisterUserInGraphCommand>
{
    private readonly IAggregateRepository _repository;
    private readonly IGraphAPIUserRegistrationService _registrationService;

    public RegisterUserI


count := 0
	responseHandler, _ := evtBusTest.RequestOnce(evtbusTestChannelName, "who is a pretty baby?")
	responseHandler.Handle(
		func(msg *model.Message) {
			assert.Equal(t, "why melody is of course", msg.Payload.(string))
			count++
		},
		func(err error) {})

	responseHandler.Fire()
	evtbusTestManager.WaitForChannel(evtbusTestChannelName)
	assert.Equal(t, 1, count)
	destroyTestChannel()
}

func TestEventBus_RequestOnceForDestination(t *testing.T) {
	createTestChannel()
	dest := uuid.New()
	handler, _ := evtBusTest.ListenRequestStream(evtbusTestChannelName)
	handler.Handle(
		func(msg *model.Message) {
			assert.Equal(t, "who is a pretty baby?", msg.Payload.(string))
			evtBusTest.SendResponseMessage(evtbusTestChannelName, "why melody is of course", msg.DestinationId)
		},
		func(err error) {})

	count := 0
	responseHandler, _ := evtBusTest.RequestOnceForDestination(evtbusTestChannelName, "who is a pretty baby?", &dest)
	responseHandler.Handle(
		func(msg *model.Message) {
			assert.Equal(t, "why melody is of course", msg.Payload.(string))
			count++
		},
		func(err error) {})

	responseHandler.Fire()
	assert.Equal(t, 1, count)
	destroyTestChannel()
}

func TestEventBus_RequestOnceForDesintationNoChannel(t *testing.T) {
	_, err := evtBusTest.RequestOnceForDestination("some-chan", nil, nil)
	assert.NotNil(t, err)
}

func TestEventBus_RequestOnceForDesintationNoDestination(t *testing.T) {
	createTestChannel()
	_, err := evtBusTest.RequestOnceForDestination(evtbusTestChannelName, nil, nil)
	assert.NotNil(t, err)
	destroyTestChannel()
}

func TestEventBus_RequestStream(t *testing.T) {
	channel := createTestChannel()
	handler := func(message *model.Message) {
		if message.Direction == model.RequestDir {
			assert.Equal(t, "who has the cutest laugh?", message.Payload.(string))
			config := buildConfig(channel.Name, "why melody does of course", message.DestinationId)

			// fire a few times, ensure that the handler only ever picks up a single response.
			for i := 0; i < 5; i++ {
				channel.Send(model.GenerateResponse(config))
			}
		}
	}
	id := uuid.New()
	channel.subscribeHandler(&channelEventHandler{callBackFunction: handler, runOnce: false, uuid: &id})

	var count int32 = 0
	responseHandler, _ := evtBusTest.RequestStream(evtbusTestChannelName, "who has the cutest laugh?")
	responseHandler.Handle(
		func(msg *model.Message) {
			assert.Equal(t, "why melody does of course", msg.Payload.(string))
			inc(&count)
		},
		func(err error) {})

	responseHandler.Fire()
	assert.Equal(t, int32(5), count)
	destroyTestChannel()
}

func TestEventBus_RequestStreamForDesintation(t *testing.T) {
	channel := createTestChannel()
	dest := uuid.New()
	handler := func(message *model.Message) {
		if message.Direction == model.RequestDir {
			assert.Equal(t, "who has the cutest laugh?", message.Payload.(string))
			config := buildConfig(channel.Name, "why melody does of course", message.DestinationId)

			// fire a few times, ensure that the handler only ever picks up a single response.
			for i := 0; i < 5; i++ {
				ch


 ByteReadChannelAllocator.asMultipartFile
 *
 * @see fromInput
 * @see fromFile
 * @see fromId
 * @see fromUrl
 */
@Serializable(InputFileSerializer::class)
sealed class InputFile {
    abstract val fileId: String

    companion object {
        operator fun invoke(file: MPPFile) = file.asMultipartFile()

        /**
         * Creates [MultipartFile] based on incoming [filename] and [inputSource]
         */
        fun fromInput(filename: String, inputSource: () -> Input) = MultipartFile(filename, inputSource)

        /**
         * Creates [MultipartFile] based on incoming [MPPFile] (common File in java, for example)
         */
        fun fromFile(file: MPPFile) = invoke(file)

        /**
         * Creates [FileId] from the incomming [id] [String] with believe that it is [FileId]
         */
        fun fromId(id: String) = FileId(id)

        /**
         * Creates [FileUrl] from the incomming [url] [String]
         */
        fun fromUrl(url: String) = FileUrl(url)
    }
}

internal const val attachPrefix = "attach://"

internal inline val InputFile.attachFileId
    get() = "$attachPrefix$fileId"
internal inline val InputFile.fileIdToSend
    get() = when (this) {
        is FileId -> fileId
        is MultipartFile -> attachFileId
    }

// TODO:: add checks for file url/file id regex
/**
 * Contains file id or file url
 */
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
@Serializable(InputFileSerializer::class)
data class FileId(
    override val fileId: String
) : InputFile()

typealias FileUrl = FileId

fun String.toInputFile() = FileId(this)

@RiskFeature
object InputFileSerializer : KSerializer<InputFile> {
    override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor(FileId::class.toString(), PrimitiveKind.STRING)
    override fun serialize(encoder: Encoder, value: InputFile) = encoder.encodeString(value.fileIdToSend)
    override fun deserialize(decoder: Decoder): FileId = FileId(decoder.decodeString().removePrefix(attachPrefix))
}

// TODO:: add checks for files size
/**
 * Contains info about file for sending
 *
 * @see asMultipartFile
 */
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
@Serializable(InputFileSerializer::class)
data class MultipartFile (
    val filename: String,
    private val inputSource: () -> Input
) : InputFile() {
    @Required
    @EncodeDefault
    override val fileId: String = "${uuid4()}.${filename.fileExtension}"
    val input: Input
        get() = inputSource()
}

@Suppress("NOTHING_TO_INLINE", "unused")
suspend inline fun ByteReadChannel.asMultipartFile(
    fileName: String
) = MultipartFile(
    fileName,
    inputSource = asInput().let { { it } }
)

@Suppress("NOTHING_TO_INLINE", "unused")
inline fun ByteArray.asMultipartFile(
    fileName: String
) = MultipartFile(
    fileName,
    inputSource = { ByteReadPacket(this) }
)

@Suppress("NOTHING_TO_INLINE", "unused")
suspend inline fun ByteReadChannelAllocator.asMultipartFile(
    fileName: String
) = this.invoke().asMultipartFile(fileName)

expect fun MPPFile.asMultipartFile(): MultipartFile
@Suppress("NOTHING_TO_INLINE", "unused")
inline fun MPPFile.multipartFile() = asMultipartFile()
package dev.inmo.tgbotapi.requests.send.polls

import dev.inmo.tgbotapi.abstracts.TextedInput
import korlibs.time.DateTime
import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest
import dev.inmo.tgbotapi.requests


, handler)
}

func _Retrieve_Backup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BackupRetrieve)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RetrieveServer).Backup(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/types.retrieve/Backup",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RetrieveServer).Backup(ctx, req.(*BackupRetrieve))
	}
	return interceptor(ctx, in, info, handler)
}

func _Retrieve_Cancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CancelRetrieve)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RetrieveServer).Cancel(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/types.retrieve/Cancel",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RetrieveServer).Cancel(ctx, req.(*CancelRetrieve))
	}
	return interceptor(ctx, in, info, handler)
}

var _Retrieve_serviceDesc = grpc.ServiceDesc{
	ServiceName: "types.retrieve",
	HandlerType: (*RetrieveServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Prepare",
			Handler:    _Retrieve_Prepare_Handler,
		},
		{
			MethodName: "Perform",
			Handler:    _Retrieve_Perform_Handler,
		},
		{
			MethodName: "Backup",
			Handler:    _Retrieve_Backup_Handler,
		},
		{
			MethodName: "Cancel",
			Handler:    _Retrieve_Cancel_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "retrieve.proto",
}
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package executor

import (
	"github.com/33cn/chain33/types"
	pkt "github.com/33cn/plugin/plugin/dapp/pokerbull/types"
)

// Query_QueryGameListByIDs 根据id列表查询游戏
func (g *PokerBull) Query_QueryGameListByIDs(in *pkt.QueryPBGameInfos) (types.Message, error) {
	return Infos(g.GetStateDB(), in)
}

// Query_QueryGameByID 根据id查询游戏
func (g *PokerBull) Query_QueryGameByID(in *pkt.QueryPBGameInfo) (types.Message, error) {
	game, err := readGame(g.GetStateDB(), in.GetGameId())
	if err != nil {
		return nil, err
	}
	return &pkt.ReplyPBGame{Game: game}, nil
}

// Query_QueryGameByAddr 根据地址查询游戏
func (g *PokerBull) Query_QueryGameByAddr(in *pkt.QueryPBGameInfo) (types.Me


16667% {
    -webkit-transform: matrix3d(
      0.99983,
      0,
      0,
      0,
      0,
      0.99984,
      0,
      0,
      0,
      0,
      1,
      0,
      0,
      0,
      0,
      1
    );
    transform: matrix3d(
      0.99983,
      0,
      0,
      0,
      0,
      0.99984,
      0,
      0,
      0,
      0,
      1,
      0,
      0,
      0,
      0,
      1
    );
  }
  100% {
    -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
    transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
}
html {
  line-height: 1.15;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

article,
aside,
footer,
header,
nav,
section {
  display: block;
}

section{
  margin-bottom: 80px;
}

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

figcaption,
figure,
main {
  display: block;
}

figure {
  margin: 1em 40px;
}

hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
}

pre {
  font-family: monospace, monospace;
  font-size: 1em;
}

a {
  background-color: transparent;
  -webkit-text-decoration-skip: objects;
}

abbr[title] {
  border-bottom: none;
  text-decoration: underline;
  text-decoration: underline dotted;
}

b,
strong {
  font-weight: inherit;
}

b,
strong {
  font-weight: bolder;
}

code,
kbd,
samp {
  font-family: monospace, monospace;
  font-size: 1em;
}

dfn {
  font-style: italic;
}

mark {
  background-color: #ff0;
  color: #000;
}

small {
  font-size: 80%;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

audio,
video {
  display: inline-block;
}

audio:not([controls]) {
  display: none;
  height: 0;
}

img {
  border-style: none;
}

svg:not(:root) {
  overflow: hidden;
}

button,
input,
optgroup,
select,
textarea {
  font-family: sans-serif;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

button,
input {
  overflow: visible;
}

button,
select {
  text-transform: none;
}

button,
html [type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner


f.per_htlc.len());
		let our_htlc_key = derive_private_key(secp_ctx, &self.local_keys.per_commitment_point, htlc_base_key).map_err(|_| ())?;

		for this_htlc in self.per_htlc.iter() {
			if this_htlc.0.transaction_output_index.is_some() {
				let htlc_tx = build_htlc_transaction(&txid, self.feerate_per_kw, local_csv, &this_htlc.0, &self.local_keys.a_delayed_payment_key, &self.local_keys.revocation_key);

				let htlc_redeemscript = get_htlc_redeemscript_with_explicit_keys(&this_htlc.0, &self.local_keys.a_htlc_key, &self.local_keys.b_htlc_key, &self.local_keys.revocation_key);

				let sighash = hash_to_message!(&bip143::SighashComponents::new(&htlc_tx).sighash_all(&htlc_tx.input[0], &htlc_redeemscript, this_htlc.0.amount_msat / 1000)[..]);
				ret.push(Some(secp_ctx.sign(&sighash, &our_htlc_key)));
			} else {
				ret.push(None);
			}
		}
		Ok(ret)
	}

	/// Gets a signed HTLC transaction given a preimage (for !htlc.offered) and the local HTLC transaction signature.
	pub(crate) fn get_signed_htlc_tx(&self, htlc_index: usize, signature: &Signature, preimage: &Option<PaymentPreimage>, local_csv: u16) -> Transaction {
		let txid = self.txid();
		let this_htlc = &self.per_htlc[htlc_index];
		assert!(this_htlc.0.transaction_output_index.is_some());
		// if we don't have preimage for an HTLC-Success, we can't generate an HTLC transaction.
		if !this_htlc.0.offered && preimage.is_none() { unreachable!(); }
		// Further, we should never be provided the preimage for an HTLC-Timeout transaction.
		if  this_htlc.0.offered && preimage.is_some() { unreachable!(); }

		let mut htlc_tx = build_htlc_transaction(&txid, self.feerate_per_kw, local_csv, &this_htlc.0, &self.local_keys.a_delayed_payment_key, &self.local_keys.revocation_key);
		// Channel should have checked that we have a remote signature for this HTLC at
		// creation, and we should have a sensible htlc transaction:
		assert!(this_htlc.1.is_some());

		let htlc_redeemscript = get_htlc_redeemscript_with_explicit_keys(&this_htlc.0, &self.local_keys.a_htlc_key, &self.local_keys.b_htlc_key, &self.local_keys.revocation_key);

		// First push the multisig dummy, note that due to BIP147 (NULLDUMMY) it must be a zero-length element.
		htlc_tx.input[0].witness.push(Vec::new());

		htlc_tx.input[0].witness.push(this_htlc.1.unwrap().serialize_der().to_vec());
		htlc_tx.input[0].witness.push(signature.serialize_der().to_vec());
		htlc_tx.input[0].witness[1].push(SigHashType::All as u8);
		htlc_tx.input[0].witness[2].push(SigHashType::All as u8);

		if this_htlc.0.offered {
			// Due to BIP146 (MINIMALIF) this must be a zero-length element to relay.
			htlc_tx.input[0].witness.push(Vec::new());
		} else {
			htlc_tx.input[0].witness.push(preimage.unwrap().0.to_vec());
		}

		htlc_tx.input[0].witness.push(


.emittedEventsCh = make(chan *inter.EventPayload, 4)
		h.emittedEventsSub = h.notifier.SubscribeNewEmitted(h.emittedEventsCh)
		// epoch changes
		h.newEpochsCh = make(chan idx.Epoch, 4)
		h.newEpochsSub = h.notifier.SubscribeNewEpoch(h.newEpochsCh)

		h.loopsWg.Add(3)
		go h.emittedBroadcastLoop()
		go h.progressBroadcastLoop()
		go h.onNewEpochLoop()
	}

	// start sync handlers
	go h.txsyncLoop()
	h.loopsWg.Add(2)
	go h.snapsyncStateLoop()
	go h.snapsyncStageLoop()
	h.dagFetcher.Start()
	h.txFetcher.Start()
	h.checkers.Heavycheck.Start()

	h.epProcessor.Start()
	h.epSeeder.Start()
	h.epLeecher.Start()

	h.dagProcessor.Start()
	h.dagSeeder.Start()
	h.dagLeecher.Start()

	h.bvProcessor.Start()
	h.bvSeeder.Start()
	h.bvLeecher.Start()

	h.brProcessor.Start()
	h.brSeeder.Start()
	h.brLeecher.Start()
	h.started.Done()
}

func (h *handler) Stop() {
	log.Info("Stopping Fantom protocol")

	h.brLeecher.Stop()
	h.brSeeder.Stop()
	h.brProcessor.Stop()

	h.bvLeecher.Stop()
	h.bvSeeder.Stop()
	h.bvProcessor.Stop()

	h.dagLeecher.Stop()
	h.dagSeeder.Stop()
	h.dagProcessor.Stop()

	h.epLeecher.Stop()
	h.epSeeder.Stop()
	h.epProcessor.Stop()

	h.checkers.Heavycheck.Stop()
	h.txFetcher.Stop()
	h.dagFetcher.Stop()

	close(h.quitProgressBradcast)
	close(h.snapState.quit)
	h.txsSub.Unsubscribe() // quits txBroadcastLoop
	if h.notifier != nil {
		h.emittedEventsSub.Unsubscribe() // quits eventBroadcastLoop
		h.newEpochsSub.Unsubscribe()     // quits onNewEpochLoop
	}

	// Wait for the subscription loops to come down.
	h.loopsWg.Wait()

	h.msgSemaphore.Terminate()
	// Quit the sync loop.
	// After this send has completed, no new peers will be accepted.
	close(h.quitSync)

	// Disconnect existing sessions.
	// This also closes the gate for any new registrations on the peer set.
	// sessions which are already established but not added to h.peers yet
	// will exit when they try to register.
	h.peers.Close()

	// Wait for all peer handler goroutines to come down.
	h.wg.Wait()
	h.peerWG.Wait()

	log.Info("Fantom protocol stopped")
}

func (h *handler) myProgress() PeerProgress {
	bs := h.store.GetBlockState()
	epoch := h.store.GetEpoch()
	return PeerProgress{
		Epoch:            epoch,
		LastBlockIdx:     bs.LastBlock.Idx,
		LastBlockAtropos: bs.LastBlock.Atropos,
	}
}

func (h *handler) highestPeerProgress() PeerProgress {
	peers := h.peers.List()
	max := h.myProgress()
	for _, peer := range peers {
		if max.LastBlockIdx < peer.progress.LastBlockIdx {
			max = peer.progress
		}
	}
	return max
}

// handle is the callback invoked to manage the life cycle of a peer. When
// this function terminates, the peer is disconnected.
func (h *handler) handle(p *peer) error {
	// If


F ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.cloud.websecurityscanner.v1.samples;

// [START websecurityscanner_v1_generated_WebSecurityScanner_ListCrawledUrls_Paged_async]
import com.google.cloud.websecurityscanner.v1.CrawledUrl;
import com.google.cloud.websecurityscanner.v1.ListCrawledUrlsRequest;
import com.google.cloud.websecurityscanner.v1.ListCrawledUrlsResponse;
import com.google.cloud.websecurityscanner.v1.WebSecurityScannerClient;
import com.google.common.base.Strings;

public class AsyncListCrawledUrlsPaged {

  public static void main(String[] args) throws Exception {
    asyncListCrawledUrlsPaged();
  }

  public static void asyncListCrawledUrlsPaged() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (WebSecurityScannerClient webSecurityScannerClient = WebSecurityScannerClient.create()) {
      ListCrawledUrlsRequest request =
          ListCrawledUrlsRequest.newBuilder()
              .setParent("parent-995424086")
              .setPageToken("pageToken873572522")
              .setPageSize(883849137)
              .build();
      while (true) {
        ListCrawledUrlsResponse response =
            webSecurityScannerClient.listCrawledUrlsCallable().call(request);
        for (CrawledUrl element : response.getCrawledUrlsList()) {
          // doThingsWith(element);
        }
        String nextPageToken = response.getNextPageToken();
        if (!Strings.isNullOrEmpty(nextPageToken)) {
          request = request.toBuilder().setPageToken(nextPageToken).build();
        } else {
          break;
        }
      }
    }
  }
}
// [END websecurityscanner_v1_generated_WebSecurityScanner_ListCrawledUrls_Paged_async]
/*
 * Copyright 2025 Google LLC
 *
 * 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 com.google.cloud.websecurityscanner.v1.samples;

// [START websecurityscanner_v1_generated_WebSecurityScanner_ListScanRuns_async]
import com.google.api.core.ApiFuture;
import com.google.cloud.websecurityscanner.v1.ListScanRunsRequest;
import com.google.cloud.websecurityscanner.v1.ScanRun;
import com.google.cloud.websecurityscanner.v1.WebSecurityScannerClient;

public class AsyncListScanRuns {

  public static void main(String[] args) throws Exception {
    asyncListScanRuns();
  }

  public static void asyncListScanRuns() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (WebSecurityScannerClient webSecurityScannerClient = WebSecurityScanner


return this.lift(new TakeUntilOperator(notifier));
}

class TakeUntilOperator<T> implements Operator<T, T> {
  constructor(private notifier: Observable<any>) {
  }

  call(subscriber: Subscriber<T>, source: any): TeardownLogic {
    return source.subscribe(new TakeUntilSubscriber(subscriber, this.notifier));
  }
}

/**
 * We need this JSDoc comment for affecting ESDoc.
 * @ignore
 * @extends {Ignored}
 */
class TakeUntilSubscriber<T, R> extends OuterSubscriber<T, R> {

  constructor(destination: Subscriber<any>,
              private notifier: Observable<any>) {
    super(destination);
    this.add(subscribeToResult(this, notifier));
  }

  notifyNext(outerValue: T, innerValue: R,
             outerIndex: number, innerIndex: number,
             innerSub: InnerSubscriber<T, R>): void {
    this.complete();
  }

  notifyComplete(): void {
    // noop
  }
}
type RootReducer = (
  state: {},
  action: {type: string}
) => {}

export function createStore(rootReducer: RootReducer, initialState: Record<string, any> = {}) {
  let state = rootReducer({ ...initialState }, { type: "__INIT__" });
  let listeners: any[] = [];
  return {
    dispatch(action: {type : string}) {
      state = rootReducer(state, action);
      listeners.forEach((listener) => listener(state));
    },
    subscribe(fn: object) {
      listeners.push(fn);
      // return () => {
      //   listeners.filter((el) => el !== fn);
      // };
      return {
        unsubscribe: () => {
          listeners = listeners.filter((el) => el !== fn);
        },
      };
    },
    getState() {
      return state;
    },
  };
}
function displayPrice(event: Event) {
    event.preventDefault();

    let price: Number = 0;

    const priceMap = new Map();
    priceMap.set("kind-1", new Map([["length-1", "4500"], ["length-2", "6500"], ["length-3", "7000"], ["length-4", "7000"]]));
    priceMap.set("kind-2", new Map([["length-1", "3500"], ["length-2", "3500"], ["length-3", "3500"], ["length-4", "3500"]]));
    priceMap.set("kind-3", new Map([["length-1", "6500"], ["length-2", "7000"], ["length-3", "7000"], ["length-4", "7500"]]));

    const priceDOM = document.getElementById("calc__display")!;
    const checkedLength = <HTMLInputElement>document.querySelector('input[name="length"]:checked')!;
    const checkedKind = <HTMLInputElement>document.querySelector('input[name="kind"]:checked')!;

    if (checkedLength && !checkedKind) {
        priceDOM.innerText = "Пожалуйста, выберите вид косичек!"
    }
    if (checkedKind && !checkedLength) {
        priceDOM.innerText = "Пожалуйста, выберите длину волос!"
    }
    if (!checkedKind && !checkedLength) {
        priceDOM.innerText = "Пожалуйста, выберите длину волос и вид косичек!"
    }
    if (checkedLength && checkedKind) {
        switch (checkedKind.id) {
            case "kind-1":
                const classic = priceMap.get("kind-1");
                price = classic.get(checkedLength.id);
                break;
            case "kind-2":
                const ghana = priceMap.get("kind-2");
                price = ghana.get(checkedLength.id);
                break;
            case "kind-3":
                const zi


BSD-style
// license that can be found in the LICENSE file.

package main

import (
	"bytes"
	"fmt"
	"go/token"
	"os"
	"os/exec"
	"slices"
)

// run runs the command argv, feeding in stdin on standard input.
// It returns the output to standard output and standard error.
// ok indicates whether the command exited successfully.
func run(stdin []byte, argv []string) (stdout, stderr []byte, ok bool) {
	if i := slices.Index(argv, "-xc"); i >= 0 && argv[len(argv)-1] == "-" {
		// Some compilers have trouble with standard input.
		// Others have trouble with -xc.
		// Avoid both problems by writing a file with a .c extension.
		f, err := os.CreateTemp("", "cgo-gcc-input-")
		if err != nil {
			fatalf("%s", err)
		}
		name := f.Name()
		f.Close()
		if err := os.WriteFile(name+".c", stdin, 0666); err != nil {
			os.Remove(name)
			fatalf("%s", err)
		}
		defer os.Remove(name)
		defer os.Remove(name + ".c")

		// Build new argument list without -xc and trailing -.
		new := append(argv[:i:i], argv[i+1:len(argv)-1]...)

		// Since we are going to write the file to a temporary directory,
		// we will need to add -I . explicitly to the command line:
		// any #include "foo" before would have looked in the current
		// directory as the directory "holding" standard input, but now
		// the temporary directory holds the input.
		// We've also run into compilers that reject "-I." but allow "-I", ".",
		// so be sure to use two arguments.
		// This matters mainly for people invoking cgo -godefs by hand.
		new = append(new, "-I", ".")

		// Finish argument list with path to C file.
		new = append(new, name+".c")

		argv = new
		stdin = nil
	}

	p := exec.Command(argv[0], argv[1:]...)
	p.Stdin = bytes.NewReader(stdin)
	var bout, berr bytes.Buffer
	p.Stdout = &bout
	p.Stderr = &berr
	// Disable escape codes in clang error messages.
	p.Env = append(os.Environ(), "TERM=dumb")
	err := p.Run()
	if _, ok := err.(*exec.ExitError); err != nil && !ok {
		fatalf("exec %s: %s", argv[0], err)
	}
	ok = p.ProcessState.Success()
	stdout, stderr = bout.Bytes(), berr.Bytes()
	return
}

func lineno(pos token.Pos) string {
	return fset.Position(pos).String()
}

// Die with an error message.
func fatalf(msg string, args ...interface{}) {
	// If we've already printed other errors, they might have
	// caused the fatal condition. Assume they're enough.
	if nerrors == 0 {
		fmt.Fprintf(os.Stderr, "cgo: "+msg+"\n", args...)
	}
	os.Exit(2)
}

var nerrors int

func error_(pos token.Pos, msg string, args ...interface{}) {
	nerrors++
	if pos.IsValid() {
		fmt.Fprintf(os.Stderr, "%s: ", fset.Position(pos).String())
	} else {
		fmt.Fprintf(os.Stderr, "cgo: ")
	}
	fmt.Fprintf(os.Stderr, msg, args...)
	fmt.Fprintf(os.Stderr, "\n")
}

func creat(name string) *os.File {
	f, err := os.Create(name)
	if err != nil {
		fatalf("%s", err


c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32l-116.7 0c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0l-176.6 0c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0L18.6 160C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192l123.1 0c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64L8.1 320C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6l176.6 0c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352l116.7 0zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6l116.7 0z"],
    "synagogue": [640, 512, [128333], "f69b", "M309.8 3.7c5.9-4.9 14.6-4.9 20.5 0l121 100.8C469.5 119.7 480 142.2 480 166l0 114.1L480 512l-16 0-112 0 0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96-112 0-16 0 0-231.9L160 166c0-23.7 10.5-46.3 28.8-61.5L309.8 3.7zM512 512l0-267.5 28.1-31.2c3-3.4 7.4-5.3 11.9-5.3s8.9 1.9 11.9 5.3l63.8 70.9c7.9 8.8 12.3 20.3 12.3 32.1L640 448c0 35.3-28.7 64-64 64l-64 0zM128 244.5L128 512l-64 0c-35.3 0-64-28.7-64-64L0 316.3c0-11.9 4.4-23.3 12.3-32.1l63.8-70.9c3-3.4 7.4-5.3 11.9-5.3s8.9 1.9 11.9 5.3L128 244.5zM327 124.3c-3.1-5.4-10.9-5.4-13.9 0l-15.9 28.1-32.3-.3c-6.2-.1-10.1 6.7-7 12.1L274.3 192l-16.4 27.8c-3.2 5.4 .7 12.1 7 12.1l32.3-.3L313 259.7c3.1 5.4 10.9 5.4 13.9 0l15.9-28.1 32.3 .3c6


	[ PATH_LIBZIP + "/zip_stat_index.c"                   , "", false, [] ],
	[ PATH_LIBZIP + "/zip_stat_init.c"                    , "", false, [] ],
	[ PATH_LIBZIP + "/zip_strerror.c"                     , "", false, [] ],
	[ PATH_LIBZIP + "/zip_string.c"                       , "", false, [] ],
	[ PATH_LIBZIP + "/zip_unchange.c"                     , "", false, [] ],
	[ PATH_LIBZIP + "/zip_unchange_all.c"                 , "", false, [] ],
	[ PATH_LIBZIP + "/zip_unchange_archive.c"             , "", false, [] ],
	[ PATH_LIBZIP + "/zip_unchange_data.c"                , "", false, [] ],
	[ PATH_LIBZIP + "/zip_utf-8.c"                        , "", false, [] ],
	// [ PATH_LIBZIP + "/zip_winzip_aes.c"                   , "", false, [] ],
];

let linkerArgsLibZip =
[
	"/NOLOGO",
	"/MACHINE:X64",
];

// #endregion

// #region Loader

let compilerArgsLoader_x86_64 = [];

compilerArgsLoader_x86_64 = AddFront
(
	compilerArgsLoader_x86_64,
	compilerArgs_x86_64
);

let itemsLoader_x86_64 =
[
	[ "dinput8.cpp", "", false, [] ],
];

let linkerArgsLoader_x86_64 =
[
	"/NOLOGO",
	"/DLL",
	"/MACHINE:X64",
	"/DYNAMICBASE",
	"/DEBUG:FULL",
	"/OPT:REF",
	"/OPT:ICF",
	"/NODEFAULTLIB",
];

let libsLoader_x86_64 =
[
	"msvcrt.lib",
	"vcruntime.lib",
	"ucrt.lib",
	"kernel32.lib",
	"user32.lib",
	"shell32.lib",
	"imm32.lib",
	"advapi32.lib",
	"d3d10.lib",
	"d3dcompiler.lib",
	"dinput8.lib",
	"dxguid.lib",
	"xinput.lib",
];

let compilerArgsLoader_x86_32 = [];

compilerArgsLoader_x86_32 = AddFront
(
	compilerArgsLoader_x86_32,
	compilerArgs_x86_32
);

let itemsLoader_x86_32 =
[
	[ "dinput8.cpp", "", false, [] ],
];

let linkerArgsLoader_x86_32 =
[
	"/NOLOGO",
	"/DLL",
	"/MACHINE:X86",
	"/DYNAMICBASE",
	"/DEBUG:FULL",
	"/OPT:REF",
	"/OPT:ICF",
	"/NODEFAULTLIB",
];

let libsLoader_x86_32 =
[
	"msvcrt.lib",
	"vcruntime.lib",
	"ucrt.lib",
	"kernel32.lib",
	"user32.lib",
	"shell32.lib",
	"imm32.lib",
	"advapi32.lib",
	"d3d10.lib",
	"d3dcompiler.lib",
	"dinput8.lib",
	"dxguid.lib",
	"xinput.lib",
];

// #endregion

// #region Eva

let compilerArgsEva = [];

compilerArgsEva = AddFront
(
	compilerArgsEva,
	compilerArgs_x86_64
);

let helpersEva =
[

["IntroduceMainActorData", (args) =>
{
	// IntroduceMainActorData(actorDataName, return);
	// IntroduceMainActorData(actorBaseAddrName, actorDataName, return);

	if (PrepHelper_Check(2, 3))
	{
		return true;
	}

	let funcName  = PrepHelper_funcName;
	let lineIndex = PrepHelper_lineIndex;
	let argCount  = PrepHelper_argCount;

	let poolName = "pool_" + lineIndex