)) == -1) return -1;
   patch = atoi(tkn.c_str());

   return 0;
}

//
// Manager

//______________________________________________________________________________
XrdROOTMgr::XrdROOTMgr(XrdProofdManager *mgr,
                       XrdProtocol_Config *pi, XrdSysError *e)
          : XrdProofdConfig(pi->ConfigFN, e)
{
   // Constructor
   fMgr = mgr;
   fLogger = pi->eDest->logger();
   fROOT.clear();

   // Configuration directives
   RegisterDirectives();
}

//__________________________________________________________________________
void XrdROOTMgr::SetLogDir(const char *dir)
{
   // Set the log dir
   XPDLOC(SMGR, "ROOTMgr::SetLogDir")

   if (fMgr && dir && strlen(dir)) {
      // MAke sure that the directory to store logs from validation exists
      XPDFORM(fLogDir, "%s/rootsysvalidation", dir);
      XrdProofUI ui;
      XrdProofdAux::GetUserInfo(fMgr->EffectiveUser(), ui);
      if (XrdProofdAux::AssertDir(fLogDir.c_str(), ui, fMgr->ChangeOwn()) != 0) {
         XPDERR("unable to assert the rootsys log validation path: "<<fLogDir);
         fLogDir = "";
      } else {
         TRACE(ALL,"rootsys log validation path: "<<fLogDir);
      }
   }
}

//__________________________________________________________________________
int XrdROOTMgr::Config(bool rcf)
{
   // Run configuration and parse the entered config directives.
   // Return 0 on success, -1 on error
   XPDLOC(SMGR, "ROOTMgr::Config")

   // Run first the configurator
   if (XrdProofdConfig::Config(rcf) != 0) {
      TRACE(XERR, "problems parsing file ");
      return -1;
   }

   XrdOucString msg;
   msg = (rcf) ? "re-configuring" : "configuring";
   TRACE(ALL, msg);

   // ROOT dirs
   if (rcf) {
      // Remove parked ROOT sys entries
      std::list<XrdROOT *>::iterator tri;
      if (fROOT.size() > 0) {
         for (tri = fROOT.begin(); tri != fROOT.end();) {
            if ((*tri)->IsParked()) {
               delete (*tri);
               tri = fROOT.erase(tri);
            } else {
               tri++;
            }
         }
      }
   } else {
      // Check the ROOT dirs
      if (fROOT.size() <= 0) {
#ifdef R__HAVE_CONFIG
         XrdOucString dir(ROOTPREFIX), bd(ROOTBINDIR), ld(ROOTLIBDIR),
                      id(ROOTINCDIR), dd(ROOTDATADIR);
#else
         XrdOucString dir(getenv("ROOTSYS")), bd, ld, id, dd;
#endif
         // None defined: use ROOTSYS as default, if any; otherwise we fail
         if (dir.length() > 0) {
            XrdROOT *rootc = new XrdROOT(dir.c_str(), "",
                                         bd.c_str(), id.c_str(), ld.c_str(), dd.c_str());
            if (Validate(rootc, fMgr->Sched()) == 0) {
               XPDFORM(msg, "ROOT dist: '%s' validated", rootc->Export());
               fROOT.push_back(rootc);
               TRACE(ALL, msg);
               XrdOucString mnp;
               XPDFORM(mnp, "ROOT version details: svn: %d, code: %d, {mnp} = {%d,%d,%d}",
                            rootc->SvnRevision(), rootc->VersionCode(), rootc->VrsMajor(),
                            rootc->VrsMinor(), rootc->VrsPatch());
               TRACE(ALL, mnp);
            } else {
               XPDFORM(msg, "ROOT dist: '%s' could not be validate


be.eq(1);
        });
        it('标签解析', () => {
            const bold = Bold.parse('\\b1');
            expect(bold.weight).to.be.eq(1);
        });
    });
    describe('边框宽度 (\\bord)', () => {
        it('整数宽度', () => {
            const bord = new Border();
            expect(bord.size).to.be.eq(0);
        });
        it('小数宽度', () => {
            const bord = new Border(3.7);
            expect(bord.size).to.be.eq(3.7);
        });
        it('标签解析', () => {
            const bord = Border.parse('\\bord3');
            expect(bord.size).to.be.eq(3);
        });
    });

    describe('绘图模式标签 (\\p)', () => {
        it('开启绘图模式', () => {
            const p = new DrawingMode(true);
            expect(p.enable).to.be.eq(true);
        });
        it('关闭绘图模式', () => {
            const p = new DrawingMode(false);
            expect(p.enable).to.be.eq(false);
        });
        it('标签解析', () => {
            const p = DrawingMode.parse('\\p1');
            expect(p.enable).to.be.eq(true);
        });
    });

    describe('淡入淡出 (\\fad)', () => {
        it('应用淡入淡出', () => {
            const fad1 = new Fade(200, 200);
            expect(fad1.fadeIn).to.be.eq(200);
            expect(fad1.fadeOut).to.be.eq(200);
            const fad2 = new Fade(200);
            expect(fad2.fadeIn).to.be.eq(200);
            expect(fad2.fadeOut).to.be.eq(0);
        });
        it('标签解析', () => {
            const fad = Fade.parse('\\fad(200, 200)');
            expect(fad.fadeIn).to.be.eq(200);
            expect(fad.fadeOut).to.be.eq(200);
        });
    });

    describe('绕X轴旋转 (\\frx)', () => {
        it('应用绕X轴旋转', () => {
            const frx = new FontRotateX(200);
            expect(frx.amount).to.be.eq(200);
        });
        it('标签解析', () => {
            const frx = FontRotateX.parse('\\frx200');
            expect(frx.amount).to.be.eq(200);
        });
    });

    describe('绕Y轴旋转 (\\fry)', () => {
        it('应用绕Y轴旋转', () => {
            const fry = new FontRotateY(200);
            expect(fry.amount).to.be.eq(200);
        });
        it('标签解析', () => {
            const fry = FontRotateY.parse('\\fry200');
            expect(fry.amount).to.be.eq(200);
        });
    });

    describe('绕Z轴旋转 (\\frz)', () => {
        it('应用绕Z轴旋转', () => {
            const frz = new FontRotateZ(200);
            expect(frz.amount).to.be.eq(200);
        });
        it('标签解析', () => {
            const frz = FontRotateZ.parse('\\frz200');
            expect(frz.amount).to.be.eq(200);
            const frz2 = FontRotateZ.parse('\\fr200');
            expect(frz2.amount).to.be.eq(200);
        });
    });
    describe('字体缩放 (\\fsc)',


C
#endif
	arm_func_end ov29_022FA02C

	arm_func_start BoostIQ
BoostIQ: ; 0x022FA144
	stmdb sp!, {r3, r4, r5, r6, r7, lr}
	mov r7, r0
	ldr r5, [r7, #0xb4]
	ldr r0, _022FA1CC ; =0x000003E7
	ldrsh r4, [r5, #0xe]
	mov r6, r2
	add r1, r4, r1
	strh r1, [r5, #0xe]
	ldrsh r1, [r5, #0xe]
	cmp r1, r0
	strgth r0, [r5, #0xe]
	cmp r6, #0
	bne _022FA1B0
	mov r0, #0
	mov r1, r7
	mov r2, r0
	bl SubstitutePlaceholderStringTags
	ldrsh r0, [r5, #0xe]
	cmp r4, r0
	bne _022FA1A4
	ldr r1, _022FA1D0 ; =0x00000C27
	mov r0, r7
	bl LogMessageByIdWithPopupCheckUser
	b _022FA1B0
_022FA1A4:
	ldr r1, _022FA1D4 ; =0x00000C26
	mov r0, r7
	bl LogMessageByIdWithPopupCheckUser
_022FA1B0:
	mov r0, r5
	mov r1, r4
	mov r2, r6
	bl ov29_022FA02C
	mov r0, r7
	bl ov29_023021F0
	ldmia sp!, {r3, r4, r5, r6, r7, pc}
	.align 2, 0
_022FA1CC: .word 0x000003E7
#ifdef JAPAN
_022FA1D0: .word 0x00000966
_022FA1D4: .word 0x00000965
#else
_022FA1D0: .word 0x00000C27
_022FA1D4: .word 0x00000C26
#endif
	arm_func_end BoostIQ

	arm_func_start ov29_022FA1D8
ov29_022FA1D8: ; 0x022FA1D8
#ifdef JAPAN
#define OV29_022FA1D8_OFFSET -4
#else
#define OV29_022FA1D8_OFFSET 0
#endif
	stmdb sp!, {r4, r5, r6, lr}
	mov r6, r0
	ldr r4, [r6, #0xb4]
	mov r5, r1
	ldrb r1, [r4, #7]
	cmp r1, #0
	beq _022FA210
	ldrsh r1, [r6, #4]
	add r0, r4, #0x100
	strh r1, [r0, #0x7e + OV29_022FA1D8_OFFSET]
	ldrsh r1, [r6, #6]
	add r1, r1, #1
	strh r1, [r0, #0x80 + OV29_022FA1D8_OFFSET]
	b _022FA27C
_022FA210:
	ldrb r1, [r4, #0x16a + OV29_022FA1D8_OFFSET]
	cmp r1, #0xff
	beq _022FA274
	ldrsh r1, [r4, #2]
	add r0, r4, #0x4a
	bl SetActionPassTurnOrWalk
	ldrb r2, [r4, #0x16a + OV29_022FA1D8_OFFSET]
	ldr r1, _022FA2E8 ; =DIRECTIONS_XY
	add


Hozzáadás a könyvtárhoz", "Remove album": "Album eltávolítása", "Album removed": "Album eltávolítva", "Remove from favorites": "Eltávolítás a kedvencek közül", "Artist removed from library": "Előadó eltávolítva a könyvtárból", "Add to favorites": "Hozzáadás a kedvencekhez", "Remove from library": "Eltávolítás a könyvtárból", "Add playlist to library": "Lejátszási lista hozzáadása a könyvtárhoz", "Added playlist to library": "Lejátszási lista hozzáadva a könyvtárhoz", "Make playlist offline": "Lejátszási lista offline módba tétele", "Download playlist": "Lejátszási lista letöltése", "Create playlist": "Lejátszási lista létrehozása", "Title": "Cím", "Description": "Leírás", "Private": "Privát", "Collaborative": "Együttműködés", "Create": "Létrehozás", "Playlist created!": "Lejátszási lista létrehozva!", "Playing from:": "Lejátszás:", "Queue": "Várólista", "Offline search": "Offline keresés", "Search Results": "Találatok", "No results!": "Nincs találat!", "Show all tracks": "Összes dal megjelenítése", "Show all playlists": "Összes lejátszási lista megjelenítése", "Settings": "Beállítások", "General": "Általános", "Appearance": "Megjelenés", "Quality": "Minőség", "Deezer": "Deezer", "Theme": "Kinézet", "Currently": "Jelenlegi", "Select theme": "Kinézet választása", "Dark": "Sötét", "Black (AMOLED)": "Fekete (AMOLED)", "Deezer (Dark)": "Deezer (Sötét)", "Primary color": "Elsődleges szín", "Selected color": "Kiválasztott szín", "Use album art primary color": "Használja az albumborító elsődleges színét", "Warning: might be buggy": "Figyelmeztetés: hibák előfordulhatnak", "Mobile streaming": "Mobil streaming", "Wifi streaming": "Wifi streaming", "External downloads": "Külső letöltések", "Content language": "Tartalom nyelve", "Not app language, used in headers. Now": "Nem az alkalmazás nyelve, fejléceknél használt. Jelenleg", "Select language": "Válasszon nyelvet", "Content country": "Tartalom országa", "Country used in headers. Now": "Ország a fejléceknél van használva. Jelenleg", "Log tracks": "Dalok naplózása", "Send track listen logs to Deezer, enable it for features like Flow to work properly": "Elküldi a zenehallgatási naplókat a Deezer-nek, engedélyezze ezt, hogy megfelelően működjenek az olyan szolgáltatások, mint a Flow", "Offline mode": "Offline mód", "Will be overwritten on start.": "Induláskor felül lesz írva.", "Error logging in, check your internet connections.": "Hiba a bejelentkezéskor, ellenőrizd az internetkapcsolatot.", "Logging in...": "Bejelentkezés...", "Download path": "Letöltési útvonal", "Downloads naming": "Letöltések címezése", "Downloaded tracks filename"


GuildFeature.monetization_enabled`.
- Add `GuildFeature.more_sticker`.
- Add `GuildFeature.thread_archive_3_day`.
- Add `GuildFeature.thread_archive_7_day`.
- Add `GuildFeature.private_threads`.
- Add `UserBase._set_default_attributes`.
- Move `ClientUserBase._create_empty` up to `UserBase`.
- Add `WebhookBase._set_default_attributes`.
- Add `Webhook._set_default_attributes`.
- Move `Webhook.type` and `WebhookRepr.type` up to `WebhookBase`.
- Add `WebhookSourceGuild`.
- Add `WebhookSourceChannel`.
- Add `Webhook.source_channel`.
- Add `Webhook.source_guild`.
- Add `ComponentBase.copy_with` (and to sub classes).
- `StickerPack.cover_sticker_id` is optional.
- Add `RATE_LIMIT_GROUPS.client_guild_profile_edit`.
- Add `DiscordHTTPClient.client_guild_profile_edit`.
- Add `UserBase.banner` and related attributes, properties and methods.
- Add `Client.client_guild_profile_edit`.
- Add `banner` parameters to `Client`'s constructor.
- Add `banner` parameters to `User.precreate`.
- Add `banner` parameters to `Webhook.precreate`.
- Add `Sticker._create_partial`.
- Use `sticker_items` field instead of `sticker` in message data.

#### Bug Fixes

- `int` had higher priority, than `bool` query parameter conversion causing badly generated url.
- Fix `NameError` in `cr_pg_channel_object`.
- Fix `TypeError` in a few channel `__repr__` methods. (Pichu#0357)
- `Emoji.partial` could return bad value.
- `Emoji.__new__` could not set `.user` even if received.
- `Sticker.user` is now set correctly.
- `instance_or_id_to_instance`, `instance_or_id_to_snowflake` and `maybe_snowflake` had bad string max length check.
- `ClientUserBase._from_client` was not setting `avatar`.
- Fix a `NameError` in `Client.thread_create`.
- Fix a conversion error in `Client.thread_create`. (Gilgamesh#8939)

##### ext.slash
- Component commands regex parsers could be generated with bad parameter index.
- Fix an `AttributeError` in `Slasher._add_component_command`.
- Fix an `AttributeError` in `Slasher._remove_component_command`.
- Fif a `TypeError` in `Slasher._add_component_command`.

#### Renames, Deprecation & Removals

- Rename `ActivityTypes` to `ACTIVITY_TYPES`.
- Deprecate `ActivityTypes`.
- Rename `Permission.manage_emojis` to `.manage_emojis_and_stickers`.
- Deprecate `Permission.can_manage_emojis`.
- Deprecate `Permission.allow_manage_emojis`.
- Deprecate `Permission.deny_manage_emojis`.
- Rename `RATE_LIMIT_GROUPS.client_edit_nick` to `.client_guild_profile_nick_edit`.
- Rename `DiscordHTTPClient.client_edit_nick` to `.client_guild_profile_nick_edit`.
- Deprecate `Client.client_edit_nick`.
- Rename `RATE_LIMIT_GROUPS.user_edit` to `.user_guild_profile_edit`.
- Rename `DiscordHTTPClient.user_edit` to `.user_guild_profile_edit`.
- Rename `Client.user_edit` to `.user_guild_profile_edit`.
- Deprecate `Client.user_edit`.

## 1.1.86 *\[2021-06-20\]*

#### Summary

Add sticke


xc]
	add r0, r0, #1
	str r0, [sp, #0xc]
	cmp r0, #5
	blo _021E8EE0
	add sp, #0x48
	pop {r3, r4, r5, r6, r7, pc}
	.balign 4, 0
	thumb_func_end ov99_021E8EBC

	thumb_func_start ov99_021E8F50
ov99_021E8F50: ; 0x021E8F50
	push {r3, r4, r5, r6, r7, lr}
	sub sp, #0x18
	mov r7, #0
	add r5, r0, #0
	str r7, [sp, #8]
_021E8F5A:
	mov r1, #0xac
	add r3, r5, #0
	add r3, #0xb0
	lsl r2, r7, #0x18
	ldrsb r1, [r5, r1]
	ldr r0, [r5]
	ldr r3, [r3]
	lsr r2, r2, #0x18
	bl ov99_021E94CC
	ldr r1, _021E8FE8 ; =0x0000FFFF
	cmp r0, r1
	beq _021E8FD6
	mov r4, #0
_021E8F76:
	mov r1, #0
	add r0, sp, #0xc
	str r1, [r0]
	str r1, [r0, #4]
	str r1, [r0, #8]
	ldr r0, [sp, #8]
	str r4, [sp]
	add r6, r4, r0
	add r0, r5, #0
	add r0, #0xb0
	ldr r0, [r0]
	mov r2, #0xac
	str r0, [sp, #4]
	ldrsb r2, [r5, r2]
	ldr r0, [r5]
	add r1, sp, #0xc
	add r3, r7, #0
	add r6, #0x16
	bl ov99_021E9464
	ldr r0, [sp, #0xc]
	lsl r0, r0, #0x17
	lsr r0, r0, #0x17
	beq _021E8FD0
	lsl r0, r6, #2
	add r6, r5, r0
	mov r0, #1
	str r0, [sp]
	ldr r0, [r5, #0x14]
	ldr r1, [r6, #0x18]
	add r2, sp, #0xc
	mov r3, #0
	bl ov98_0221E970
	ldr r0, [r6, #0x18]
	mov r1, #1
	bl ManagedSprite_SetDrawFlag
	cmp r7, #0
	bne _021E8FD0
	mov r1, #6
	ldr r0, [r6, #0x18]
	lsl r1, r1, #0xa
	bl ManagedSprite_SetAnimSpeed
_021E8FD0:
	add r4, r4, #1
	cmp r4, #3
	blt _021E8F76
_021E8FD6:
	ldr r0, [sp, #8]
	add r7, r7, #1
	add r0, r0, #3
	str r0, [sp, #8]
	cmp r7, #5
	blt _021E8F5A
	add sp, #0x18
	pop {r3, r4, r5, r6, r7, pc}
	nop
_021E8FE8: .word 0x0000FFFF
	thumb_func_end ov99_021E8F50

	thumb_func_


 1 : 0);
  }
}

class LibUSBException implements Exception {
  String _message;
  int code;

  LibUSBException([this._message = 'Unknown LibUSB error', this.code = 0]);

  @override
  String toString() {
    return _message;
  }
}

const int LIBUSB_SUCCESS = 0;
const int LIBUSB_ERROR_IO = -1;
const int LIBUSB_ERROR_INVALID_PARAM = -2;
const int LIBUSB_ERROR_ACCESS = -3;
const int LIBUSB_ERROR_NO_DEVICE = -4;
const int LIBUSB_ERROR_NOT_FOUND = -5;
const int LIBUSB_ERROR_BUSY = -6;
const int LIBUSB_ERROR_TIMEOUT = -7;
const int LIBUSB_ERROR_OVERFLOW = -8;
const int LIBUSB_ERROR_PIPE = -9;
const int LIBUSB_ERROR_INTERRUPTED = -10;
const int LIBUSB_ERROR_NO_MEM = -11;
const int LIBUSB_ERROR_NOT_SUPPORTED = -12;
const int LIBUSB_ERROR_OTHER = -99;

class _LibUSB {
  late final DynamicLibrary _dyLib;
  late final int Function(Pointer<Pointer<_LibUSBContext>> ctx) _init;
  late final int Function(Pointer<_LibUSBContext> ctx,
      Pointer<Pointer<Pointer<_LibUSBDevice>>> list) _get_device_list;
  late final void Function(
          Pointer<Pointer<_LibUSBDevice>> list, int unref_devices)
      _free_device_list;
  late final int Function(Pointer<_LibUSBDevice> device,
      Pointer<_LibUSBDeviceDescriptor> descriptor) _get_device_descriptor;
  late final int Function(Pointer<_LibUSBDevice> device,
      Pointer<Pointer<_LibUSBDeviceHandle>> deviceHandle) _open;
  late final int Function(Pointer<_LibUSBDeviceHandle> deviceHandle) _close;
  late final Pointer<_LibUSBContext> _context;
  bool _initialized = false;
  bool get initialized => _initialized;

  void init() {
    if (Platform.isWindows) {
      _dyLib = DynamicLibrary.open('${Directory.current.path}/libusb-1.0.dll');
    } else if (Platform.isMacOS) {
      _dyLib = DynamicLibrary.open('libusb-1.0.0.dylib');
    }
    _init = _dyLib
        .lookup<NativeFunction<_libusb_init_t>>('libusb_init')
        .asFunction();
    _get_device_list = _dyLib
        .lookup<NativeFunction<_libusb_get_device_list_t>>(
            'libusb_get_device_list')
        .asFunction();
    _free_device_list = _dyLib
        .lookup<NativeFunction<_libusb_free_device_list_t>>(
            'libusb_free_device_list')
        .asFunction();
    _get_device_descriptor = _dyLib
        .lookup<NativeFunction<_libusb_get_device_descriptor_t>>(
            'libusb_get_device_descriptor')
        .asFunction();
    _open = _dyLib
        .lookup<NativeFunction<_libusb_open_t>>('libusb_open')
        .asFunction();
    _close = _dyLib
        .lookup<NativeFunction<_libusb_close_t>>('libusb_close')
        .asFunction();

    Pointer<Pointer<_LibUSBContext>> ctx = calloc();
    int err = _init(ctx);
    _context = ctx.value;
    calloc.free(ctx);
    if (err < 0) {
      throw LibUSBException('LibUSB init failed', err);
    }
    _initialized = true;
  }

  LibUSBDeviceList getDevicesList() {
    Pointer<Pointer<Pointer<_LibUSBDevice>>> list = calloc();
    int count = _get_device_list(_context, list);
    if (count < 0) {
      throw LibUSBException('LibUSB get device list failed', count);
    }
    final final


//===----------------------------------------------------------------------===//
// Common Event Loop Base for OxCo Batch Processing Examples
// Provides a shared event loop implementation that can be inherited
//===----------------------------------------------------------------------===//

#pragma once

#include <atomic>
#include <functional>
#include <iostream>
#include <queue>

#include <Oxygen/OxCo/EventLoop.h>

//===----------------------------------------------------------------------===//
// Base Event Loop Implementation
//===----------------------------------------------------------------------===//

namespace oxygen::scene::testing {

class SimpleEventLoop {
public:
  void Run()
  {
    running_ = true;

    while (!should_stop_ || !tasks_.empty()) {
      if (!tasks_.empty()) {
        auto task = std::move(tasks_.front());
        tasks_.pop();
        task();
      }
    }

    running_ = false;
    std::cout << "Batch Execution EventLoop: Stopped\n";
  }

  void Stop() { should_stop_ = true; }
  bool IsRunning() const noexcept { return running_; }
  void Schedule(std::function<void()> task) { tasks_.push(std::move(task)); }

private:
  std::atomic<bool> running_ { false };
  std::atomic<bool> should_stop_ { false };
  std::queue<std::function<void()>> tasks_;
};

} // namespace oxygen::scene::testing

//===----------------------------------------------------------------------===//
// EventLoopTraits Specializations
//===----------------------------------------------------------------------===//

template <>
struct oxygen::co::EventLoopTraits<oxygen::scene::testing::SimpleEventLoop> {
  static EventLoopID EventLoopId(oxygen::scene::testing::SimpleEventLoop& loop)
  {
    return EventLoopID(&loop);
  }
  static void Run(oxygen::scene::testing::SimpleEventLoop& loop) { loop.Run(); }
  static void Stop(oxygen::scene::testing::SimpleEventLoop& loop)
  {
    loop.Stop();
  }
  static bool IsRunning(
    const oxygen::scene::testing::SimpleEventLoop& loop) noexcept
  {
    return loop.IsRunning();
  }
};


"}},
[30816] = {"Tudo bem, primo?", nil, {"Fale com o Sábio Liao na Praia Zaochin, que fica no Monte Kun-Lai. Uma"}},
[30817] = {"A cura de Shen-zin Su", nil, {"Resgate e defenda os curadores até que a ferida de Shen-zin Su esteja curada. Uma"}},
[30818] = {"Um novo destino", nil, {"Volte ao Templo das Cinco Auroras. Há uma carroça à sua espera perto do Local da Queda do Celesfogo para levá-l<o/a> até lá. Premia ."}},
[30819] = {"Funeral para amigos", nil, {"Fale novamente com Li Hai e conte a ele sobre o funeral. Uma"}},
[30820] = {"Um funeral", nil, {"Compareça ao funeral e acenda o Incenso da Vida. Uma"}},
[30821] = {"Moedor de juta", nil, {"Fale com Kota Kon no Acampamento Kota, e então mate 100 Hozens ao longo da Trilha da Juta. Uma"}},
[30823] = {"Sobre bodas e caca", nil, {"Mate 12 Cabritos Monteses Doidos de Kafa no Monte Kota. Uma"}},
[30824] = {"Kafa gourmet", nil, {"Marque 15 \"Depósitos\" de Kafa'boda no Monte Kota. Uma"}},
[30825] = {"Blend do Kota", nil, {"Colete 100 Frutinhas Kafa'kota no Monte Kota. Eles podem ser encontrados em arbustos na montanha ou amontoados em cavernas de yetis. Premia ."}},
[30826] = {"Efeito de um kafazinho", nil, {"Mate 5 Yetis semiloucos nas cavernas do Monte Kota. Uma"}},
[30827] = {"O que está por trás", nil, {"Fale com Yalia Sábio Sussurro para começar a cerimônia.Então, acione o Totem da Bondade, o Totem da Tranquilidade e o Totem da Serenidade."}},
[30828] = {"Despoluindo a Lagoa", nil, {"Indique Poças de Corrupção na Lagoa Guelra-pintada ao Parlágua Gorai, mostrando-lhe que você está pront<o/a> para defendê-lo enquanto ele termina o ritual de limpeza."}},
[30829] = {"A Língua de Ba-Shon", nil, {"Ajude o Andarilho das Lendas Cho a executar a Vinculação de Ba-Shon. Uma"}},
[30834] = {"Encontro de pai e filho", nil, {"Fale novamente com Wu-Peng e o Mercador Shi na margem a sudeste da Lagoa Guelra-pintada, que fica no Monte Kun-Lai. Uma"}},
[30854] = {"Missão de rastrear Lha-Po", nil, nil},
[30855] = {"A queda de Shai Hu", nil, {"Derrote Shai Hu. Ele pode ser encontrado no Santuário do Parlágua, a ilha no centro da Lagoa Guelra-pintada, no Monte Kun-Lai. Uma"}},
[30879] = {"Round 1: Mestre Cervejeira Chani", nil, {"Derrote a Mestre Cervejeira Chani. Uma"}},
[30880] = {"Round 1: Mestre Bizon", nil, {"Derrote o Mestre Bizon. Uma"}},
[30881] = {"Round 2: Ashyo, o Esperto, e Ken-Ken", nil, {"Derrote Ashyo, o Esperto, e Ken-Ken. Uma"}},
[30882] = {"Round 2: Kang Cajado Espinhoso", nil, {


import vampytest

from ..constants import MAX_STAGE_CHANNEL_VIDEO_USERS_DEFAULT
from ..fields import validate_max_stage_channel_video_users

def test__validate_max_stage_channel_video_users__0():
    """
    Tests whether `validate_max_stage_channel_video_users` works as intended.

    Case: passing.
    """
    for input_value, expected_output in (
        (None, MAX_STAGE_CHANNEL_VIDEO_USERS_DEFAULT),
        (0, 0),
        (1, 1),
    ):
        output = validate_max_stage_channel_video_users(input_value)
        vampytest.assert_eq(output, expected_output)

def test__validate_max_stage_channel_video_users__1():
    """
    Tests whether `validate_max_stage_channel_video_users` works as intended.

    Case: `ValueError`.
    """
    for input_value in (
        -1,
    ):
        with vampytest.assert_raises(ValueError):
            validate_max_stage_channel_video_users(input_value)

def test__validate_max_stage_channel_video_users__2():
    """
    Tests whether `validate_max_stage_channel_video_users` works as intended.

    Case: `TypeError`.
    """
    for input_value in (
        12.6,
    ):
        with vampytest.assert_raises(TypeError):
            validate_max_stage_channel_video_users(input_value)


// CHECK: [0x0a,0x00,0x5c,0xd0,0x65,0x04,0x02,0x00]

v_cmpx_nle_f32_e64 s[10:11], flat_scratch_lo, v2
// CHECK: [0x0a,0x00,0x5c,0xd0,0x66,0x04,0x02,0x00]

v_cmpx_nle_f32_e64 s[10:11], flat_scratch_hi, v2
// CHECK: [0x0a,0x00,0x5c,0xd0,0x67,0x04,0x02,0x00]

v_cmpx_nle_f32_e64 s[10:11], vcc_lo, v2
// CHECK: [0x0a,0x00,0x5c,0xd0,0x6a,0x04,0x02,0x00]

v_cmpx_nle_f32_e64 s[10:11], vcc_hi, v2
// CHECK: [0x0a,0x00,0x5c,0xd0,0x6b,0x04,0x02,0x00]

v_cmpx_nle_f32_e64 s[10:11], tba_lo, v2
// CHECK: [0x0a,0x00,0x5c,0xd0,0x6c,0x04,0x02,0x00]

v_cmpx_nle_f32_e64 s[10:11], tba_hi, v2
// CHECK: [0x0a,0x00,0x5c,0xd0,0x6d,0x04,0x02,0x00]

v_cmpx_nle_f32_e64 s[10:11], tma_lo, v2
// CHECK: [0x0a,0x00,0x5c,0xd0,0x6e,0x04,0x02,0x00]

v_cmpx_nle_f32_e64 s[10:11], tma_hi, v2
// CHECK: [0x0a,0x00,0x5c,0xd0,0x6f,0x04,0x02,0x00]

v_cmpx_nle_f32_e64 s[10:11], ttmp11, v2
// CHECK: [0x0a,0x00,0x5c,0xd0,0x7b,0x04,0x02,0x00]

v_cmpx_nle_f32_e64 s[10:11], m0, v2
// CHECK: [0x0a,0x00,0x5c,0xd0,0x7c,0x04,0x02,0x00]

v_cmpx_nle_f32_e64 s[10:11], exec_lo, v2
// CHECK: [0x0a,0x00,0x5c,0xd0,0x7e,0x04,0x02,0x00]

v_cmpx_nle_f32_e64 s[10:11], exec_hi, v2
// CHECK: [0x0a,0x00,0x5c,0xd0,0x7f,0x04,0x02,0x00]

v_cmpx_nle_f32_e64 s[10:11], 0, v2
// CHECK: [0x0a,0x00,0x5c,0xd0,0x80,0x04,0x02,0x00]

v_cmpx_nle_f32_e64 s[10:11], -1, v2
// CHECK: [0x0a,0x00,0x5c,0xd0,0xc1,0x04,0x02,0x00]

v_cmpx_nle_f32_e64 s[10:11], 0.5


 a literal in a regular
/// expression.
#[must_use]
pub fn escape(text: &str) -> String {
    let mut quoted = String::with_capacity(text.len());
    escape_into(text, &mut quoted);
    quoted
}

/// Escapes all meta characters in `text` and writes the result into `buf`.
///
/// This will append escape characters into the given buffer. The characters
/// that are appended are safe to use as a literal in a regular expression.
pub fn escape_into(text: &str, buf: &mut String) {
    for c in text.chars() {
        if is_meta_character(c) {
            buf.push('\\');
            buf.push(c);
        } else if let Some(escape) = is_non_supported_non_printable_character(c) {
            buf.push_str(escape.as_str());
        } else if is_non_printable_character(c) {
            for c in c.escape_default() {
                buf.push(c);
            }
        } else if c == ' ' {
            buf.push('\\');
            buf.push(' ');
        } else {
            buf.push(c);
        }
    }
}

/// Returns true if the given character has significance in a regex.
///
/// These are the only characters that are allowed to be escaped, with one
/// exception: an ASCII space character may be escaped when extended mode (with
/// the `x` flag) is enabld. In particular, `is_meta_character(' ')` returns
/// `false`.
///
/// Note that the set of characters for which this function returns `true` or
/// `false` is fixed and won't change in a semver compatible release.
#[must_use]
pub fn is_meta_character(c: char) -> bool {
    match c {
        '\\' | '/' | '.' | '+' | '*' | '?' | '(' | ')' | '|' | '[' | ']' | '{' | '}' | '^'
        | '$' | '#' | '&' | '-' | '~' => true,
        _ => false,
    }
}

/// Returns true if the given character is non-printable and needs to be quoted.
#[must_use]
pub fn is_non_printable_character(c: char) -> bool {
    let form_feed = 0x0C as char; // "\f"
    match c {
        '\n' | '\r' | '\t' => true,
        c if c == form_feed => true,
        _ => false,
    }
}

/// Returns true if the given character is non-printable and Rust does not support
/// the escape sequence.
#[must_use]
pub fn is_non_supported_non_printable_character(c: char) -> Option<String> {
    let form_feed = 0x0C as char; // "\f"
    match c {
        c if c == form_feed => Some("\\f".to_owned()),
        _ => None,
    }
}
mod protocols;
pub use self::protocols::*;

mod sys;
pub use self::sys::*;

#[cfg(feature = "mio_support")]
extern crate mio as mio_crate;
#[cfg(feature = "mio_support")]
mod mio;

#[cfg(feature = "tokio_support")]
#[macro_use]
extern crate log;

#[cfg(feature = "tokio_support")]
#[macro_use]
extern crate futures;

#[cfg(feature = "tokio_support")]
mod tokio;
#[cfg(feature = "tokio_support")]
pub use self::tokio::*;

pub mod constants;
// https://leetcode-cn.com/problems/merge-k-sorted-lists/
// Runtime: 4 ms
// Memory Usage: 3.3 MB
pub fn merge_k_lists(mut lists: Vec


26 ["new"]
  DUPCLOSURE R15 K27 [PROTO_1]
  CAPTURE VAL R1
  SETTABLEKS R15 R5 K28 ["_getSetting"]
  DUPCLOSURE R15 K29 [PROTO_2]
  CAPTURE VAL R1
  SETTABLEKS R15 R5 K30 ["_setSetting"]
  DUPCLOSURE R15 K31 [PROTO_3]
  CAPTURE VAL R9
  CAPTURE VAL R2
  SETTABLEKS R15 R5 K32 ["getSelectedCategoryName"]
  DUPCLOSURE R15 K33 [PROTO_4]
  CAPTURE VAL R9
  SETTABLEKS R15 R5 K34 ["setSelectedCategoryName"]
  DUPCLOSURE R15 K35 [PROTO_5]
  CAPTURE VAL R10
  SETTABLEKS R15 R5 K36 ["getSelectedSearchTerm"]
  DUPCLOSURE R15 K37 [PROTO_6]
  CAPTURE VAL R10
  SETTABLEKS R15 R5 K38 ["setSelectedSearchTerm"]
  DUPCLOSURE R15 K39 [PROTO_7]
  CAPTURE VAL R11
  SETTABLEKS R15 R5 K40 ["getSelectedSortIndex"]
  DUPCLOSURE R15 K41 [PROTO_8]
  CAPTURE VAL R11
  SETTABLEKS R15 R5 K42 ["setSelectedSortIndex"]
  DUPCLOSURE R15 K43 [PROTO_9]
  CAPTURE VAL R12
  SETTABLEKS R15 R5


0 0 24 24"><path fill="currentColor" d="M11.432 8.635c-1.77-3.15-3.666-5.716-3.803-5.904A10.263 10.263 0 001.97 9.887c.27.004 4.54.056 9.46-1.252Zm1.278 3.443c.135-.041.27-.083.404-.122a34.204 34.204 0 00-.832-1.741c-5.278 1.58-10.342 1.464-10.521 1.46-.003.107-.008.215-.008.325a10.2 10.2 0 002.63 6.852l-.007-.01s2.804-4.976 8.334-6.764ZM5.701 20.08l.003-.005c-.076-.058-.157-.115-.233-.176.137.11.23.181.23.181ZM9.62 2.076c-.036.01-.063.02-.1.03a.535.535 0 01.1-.03Zm9.15 2.234A10.198 10.198 0 0012 1.751c-.833 0-1.64.103-2.415.289.157.206 2.08 2.762 3.83 5.978 3.865-1.447 5.327-3.666 5.354-3.708ZM12 24C5.373 24 0 18.627 0 12S5.373 0 12 0s12 5.373 12 12-5.373 12-12 12Zm1.744-10.322c-6.015 2.096-8.001 6.31-8.04 6.396A10.2 10.2 0 0012 22.247c1.42 0 2.772-.29 4.002-.811-.152-.899-.747-4.038-2.19-7.783-.024.01-.046.015-.068.025Zm.46-4.132a30.12 30.12 0 01.901 2.016c3.54-.446 7.024.31 7.14.335a10.206 10.206 0 00-2.332-6.406c-.02.029-1.663 2.405-5.709 4.055Zm1.528 3.634c1.347 3.698 1.89 6.708 1.994 7.32a10.242 10.242 0 004.39-6.874c-.203-.066-3.07-.977-6.384-.446Z"/></svg>';
  static const String drive_cage =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" stroke="currentColor" stroke-width="2" d="M1 23V2h22v21M1 8h22H1Zm0 6h22H1Zm0 6h22H1ZM4 5h12H4Zm14 0h2-2Zm0 6h2-2Zm0 6h2-2ZM4 11h12H4Zm0 6h12H4Z"/></svg>';
  static const String dropbox =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M7.06 1 0 5.61l4.882 3.908L12 5.123 7.06 1ZM0 13.428l7.06 4.61L12 13.914 4.882 9.52 0 13.43Zm12 .486 4.94 4.124 7.06-4.61-4.882-3.91L12 13.914ZM24 5.61 16.94 1 12 5.124l7.118 4.395L24 5.609ZM12.014 14.8 7.06 18.913l-2.12-1.385v1.552l7.074 4.243 7.075-4.243v-1.552l-2.12 1.385-4.955-4.112Z"/></svg>';
  static cons


(day, addCalories);
    }
  }

  Future<void> updateDayMacroGoal(DateTime day,
      {double? carbGoal, double? fatGoal, double? proteinGoal}) async {
    _trackedDayDataSource.updateDayMacroGoals(day,
        carbsGoal: carbGoal, fatGoal: fatGoal, proteinGoal: proteinGoal);
  }

  Future<void> increaseDayMacroGoal(DateTime day,
      {double? carbGoal, double? fatGoal, double? proteinGoal}) async {
    _trackedDayDataSource.increaseDayMacroGoal(day,
        carbsAmount: carbGoal, fatAmount: fatGoal, proteinAmount: proteinGoal);
  }

  Future<void> reduceDayMacroGoal(DateTime day,
      {double? carbGoal, double? fatGoal, double? proteinGoal}) async {
    _trackedDayDataSource.reduceDayMacroGoal(day,
        carbsAmount: carbGoal, fatAmount: fatGoal, proteinAmount: proteinGoal);
  }

  Future<void> addDayMacrosTracked(DateTime day,
      {double? carbsTracked,
      double? fatTracked,
      double? proteinTracked}) async {
    _trackedDayDataSource.addDayMacroTracked(day,
        carbsAmount: carbsTracked,
        fatAmount: fatTracked,
        proteinAmount: proteinTracked);
  }

  Future<void> removeDayMacrosTracked(DateTime day,
      {double? carbsTracked,
      double? fatTracked,
      double? proteinTracked}) async {
    _trackedDayDataSource.removeDayMacroTracked(day,
        carbsAmount: carbsTracked,
        fatAmount: fatTracked,
        proteinAmount: proteinTracked);
  }
}
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'user_gender_dbo.dart';

// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************

class UserGenderDBOAdapter extends TypeAdapter<UserGenderDBO> {
  @override
  final int typeId = 6;

  @override
  UserGenderDBO read(BinaryReader reader) {
    switch (reader.readByte()) {
      case 0:
        return UserGenderDBO.male;
      case 1:
        return UserGenderDBO.female;
      default:
        return UserGenderDBO.male;
    }
  }

  @override
  void write(BinaryWriter writer, UserGenderDBO obj) {
    switch (obj) {
      case UserGenderDBO.male:
        writer.writeByte(0);
        break;
      case UserGenderDBO.female:
        writer.writeByte(1);
        break;
    }
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is UserGenderDBOAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}
import 'package:hive/hive.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:opennutritracker/core/data/dbo/intake_type_dbo.dart';
import 'package:opennutritracker/core/data/dbo/meal_dbo.dart';
import 'package:opennutritracker/core/domain/entity/intake_entity.dart';

part 'intake_dbo.g.dart';

@HiveType(typeId: 0)
@JsonSerializable()
class IntakeDBO extends HiveObject {
  @HiveField(0)
  String id;
  @HiveField(1)
  String unit;
  @HiveField(2)
  double amount;
  @HiveField(3)
  IntakeTypeDBO type;

  @HiveField(4)
  MealDBO meal;

  @HiveField(5)
  DateTime date


获取封面图片
                    cover_path = st.session_state.search_engine.get_resource_pack_cover(pack_id)
                    if cover_path:
                        st.image(cover_path, width=64)

                    st.write(f"**{pack_info['name']}** v{pack_info['version']}")
                    st.caption(f"作者: {pack_info['author']}")
                    if pack_info.get('description'):
                        st.caption(pack_info['description'])

                    # 显示缓存状态
                    cache_generated = st.session_state.search_engine.resource_pack_manager.is_pack_cache_generated(
                        pack_id,
                        st.session_state.search_engine.embedding_service.selected_embedding_model
                    )
                    if cache_generated:
                        st.success("缓存已生成", icon="✅")
                    else:
                        st.warning("缓存未生成", icon="⚠")

                with col2:
                    if pack_info['enabled']:
                        if not pack_info.get('is_default', False):
                            st.button(
                                "禁用",
                                key=f"disable_{pack_id}",
                                on_click=on_disable_resource_pack,
                                args=(pack_id,),
                                use_container_width=True
                            )
                        else:
                            st.write("默认资源包")
                    else:
                        st.button(
                            "启用",
                            key=f"enable_{pack_id}",
                            on_click=on_enable_resource_pack,
                            args=(pack_id,),
                            use_container_width=True
                        )

                st.divider()

with right_col:
    st.header("社区资源包组")
    if st.button("更新社区资源包组"):
        CommunityService().update_local_manifests()
    urls_config = Config().community.manifest_urls
    for k, v in urls_config.items():
        col1, col2, col3 = st.columns([3, 1, 1])
        with col1:
            st.write(f"**{k}**")
            st.write(f"enabled: {v}")
            def check_url_access(url, status_container):
                try:
                    response = requests.head(url, timeout=3)
                    if response.status_code == 200:
                        status_container.success("可访问", icon="✅")
                    else:
                        status_container.warning(f"状态码: {response.status_code}", icon="⚠")
                except Exception:
                    status_container.error("无法访问", icon="❌")

            status_container = st.empty()
            check_url_access(
                k,
                status_container)
            # threading.Thread(target=check_url_access, args=(k, status_container)).start()

        with col2:
            btn_label = "禁用" if v else "启用"

            if st.button(btn_label, key=f"community_toggle_{k}", use_container_width=True):
                with Config() as config:
                    config.community.manifest_urls[k] = not v
                st.rerun()
        with col3:
            if st.button("删除", key=f"community_delete_{k}", use_container_width=True):
                with Config() as config:
                    del config.community.manifest_urls[k]
                st.rerun()
    with st.expander("添加社区资源包组URL"):
        new_url = st.text_input("请输入新的社区资源包组URL", key="new_community_url")
        if st.button("添加URL", key="add_community_url_btn", use_container_width=True):
            if new_url:
                with Config() as config:
                    config.community.manifest_urls[new_url] = True
                st.success("添加成功")
                st.rerun()
            else:
                st.warning("请输入有效的URL")


"/dbm key: Performs M+ keystone and rating checks on party/guild and shortcuts to dungeon teleports. (alias: key, keys, keystone)",
	"/dbm lag: Performs a raid-wide latency check.",
	"/dbm durability: Performs a raid-wide durability check.",
	"/dbm help2: Shows additional slash commands"
}
--Less used slash commands
L.SLASHCMD_HELP2						= {
	"Available slash commands:",
	"-----------------",
	"/dbm version: Performs a boss mod version check (alias: ver).",
	"/dbm version2: Performs a boss mod version check that also whispers out of date users (alias: ver2).",
	"/range <number> or /distance <number>: Shows range frame. /rrange or /rdistance to reverse colors.",
	"/hudar <number>: Shows HUD based range finder.",
	"/dbm arrow: Shows the " .. L.DBM .. " arrow, see '/dbm arrow help' for details.",
	"/dbm hud: Shows the " .. L.DBM .. " hud, see '/dbm hud' for details."
}
L.TIMER_USAGE							= {
	L.DBM .. " timer commands:",
	"-----------------",
	"/dbm timer <sec> <text>: Starts a <sec> second timer with your <text>.",
	"/dbm ltimer <sec> <text>: Starts a timer that also automatically loops until canceled.",
	"('Broadcast' in front of the 'timer' or 'ltimer' also shares it with raid if leader/promoted)",
	"/dbm timer endloop: Stops any looping ltimer."
}

L.ERROR_NO_PERMISSION					= "You don't have the required permission to send pull/break timer."
L.ERROR_NO_PERMISSION_COMBAT			= "Pull/Break timer cannot be sent while encounter in progress"
L.PULL_TIME_TOO_SHORT					= "Pull timer must be longer than 3 seconds."
L.PULL_TIME_TOO_LONG					= "Pull timer cannot be longer than 60 seconds. Consider using a /break timer instead."

L.BREAK_USAGE							= "Break timer cannot be longer than 60 minutes. Make sure you're inputting time in minutes and not seconds."
L.BREAK_START							= "Break starting now -- you have %s! (Sent by %s)"
L.BREAK_MIN								= "Break ends in %s minute(s)!"
L.BREAK_SEC								= "Break ends in %s seconds!"
L.TIMER_BREAK							= "Break time!"
L.ANNOUNCE_BREAK_OVER					= "Break has ended at %s"

L.TIMER_PULL							= "Pull in"
L.ANNOUNCE_PULL							= "Pull in %d sec. (Sent by %s)"
L.ANNOUNCE_PULL_NOW						= "Pull now!"
L.ANNOUNCE_PULL_TARGET					= "Pulling %s in %d sec. (Sent by %s)"
L.ANNOUNCE_PULL_NOW_TARGET				= "Pulling %s now!"
L.GEAR_WARNING							= "Warning: Check gear. Your equipped ilvl is %d lower than bag ilvl"
L.GEAR_WARNING_WEAPON					= "Warning: Check if your weapon is correctly equipped."
L.GEAR_FISHING_POLE						= "Fishing Pole"

L.ACHIEVEMENT_TIMER_SPEED_KILL			= "Achievement"--BATTLE_PET_SOURCE_6

-- Auto-generated Warning Localizations
L.AUTO_ANNOUNCE_TEXTS = {
	you									= "%s on YOU",
	target								= "%s on >%%s<",
	targetsource						= ">%%s< cast %s on >%%s<",
	targetcount							=


wolves/csskit")
        .setting(AppSettings::SubcommandRequiredElseHelp)
        .setting(AppSettings::ColoredHelp)
        .subcommand(
            App::new("selectors")
                .about("Work with CSS selectors")
                .setting(AppSettings::SubcommandRequiredElseHelp)
                .setting(AppSettings::ColoredHelp)
                .subcommand(
                    App::new("search")
                        .about("Searches target for CSS selectors")
                        .setting(AppSettings::ArgRequiredElseHelp)
                        .setting(AppSettings::ColoredHelp)
                        .arg(
                            Arg::new("query")
                                .required(true)
                                .about("The selector query string"),
                        )
                        .arg(
                            Arg::new("target")
                                .required(true)
                                .about("The target file/s to search"),
                        ),
                ),
        )
        .get_matches();

    match matches.subcommand() {
        Some(("selectors", selector_matches)) => match selector_matches.subcommand() {
            Some(("search", search_matches)) => {
                selectors::search_target(
                    search_matches.value_of("query").unwrap(),
                    search_matches.value_of("target").unwrap(),
                );
            }
            _ => unreachable!(),
        },
        None => println!("No subcommand was used"),
        _ => unreachable!(),
    }
}
<reponame>yoshuawuyts/playground-rust-ncurses
extern crate ncurses as nc;

use std::char;

fn main() {
  nc::initscr();
  nc::raw();

  // allow for extended keyboard
  nc::keypad(nc::stdscr(), true);
  nc::noecho();

  // prompt
  nc::printw("Enter a char: ");
  let ch = nc::getch();

  if ch == nc::KEY_F1 {
    nc::attron(nc::A_BOLD() | nc::A_BLINK());
    nc::printw("\nF1");
    nc::attroff(nc::A_BOLD() | nc::A_BLINK());
    nc::printw(" pressed");
  } else {
    nc::printw("\nKey pressed: ");
    nc::attron(nc::A_BOLD() | nc::A_BLINK());
    nc::printw(format!("{}\n", char::from_u32(ch as u32)
      .expect("Invalid char"))
      .as_ref());
    nc::attroff(nc::A_BOLD() | nc::A_BLINK());
  }

  // ueh, get the last input or something
  nc::refresh();

  // end
  nc::getch();
  nc::endwin();
}
use super::*;

/// Instruct lair to generate a new seed from cryptographically secure
/// random data with given tag.
#[derive(Debug, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct LairApiReqNewSeed {
    /// msg id to relate request / response.
    pub msg_id: Arc<str>,
    /// user-defined tag to associate with the new seed.
    pub tag: Arc<str>,
    /// if this new seed is to be deep_locked, the passphrase for that.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub deep_lock_passphrase: Option<DeepLockPassphrase>,
}

impl LairApiReqNewSeed {
    /// Make a new_seed request
    pub fn new(
        tag: Arc<str>,
        deep_lock_passphrase: Option<DeepLockPassphrase


文本生成技术生成一篇有关人工智能的文章。主题可包括但不限于人工智能发展历程、应用场景及未来趋势等。|
|推荐系统|如何设计一款个性化推荐系统？请提供详细思路和技术实现方法。|
|知识图谱|请简要描述一下知识图谱的概念、作用以及实现方法。|
|情感分析|请对以下文字进行情感分析："这款手机很好用，操作简单，功能齐全。"|
|数据挖掘|如何利用数据挖掘技术对用户行为进行分析，从而优化产品设计？|
|机器翻译|请使用机器翻译技术将以下英文句子翻译成中文："I love to eat sushi."|
|文本分类|请对以下文本进行分类：“Python是一种高级编程语言，具有开源、跨平台、易学易用等特点。”|
| 菜谱分类 | 提供一些适合素食主义者的菜谱有哪些？|
| 疾病预防 | 哪些食物有助于降低血压？ |
| 旅游推荐 | 在巴厘岛，有哪些值得去的景点？ |
| 电影推荐 | 可以推荐一部最近上映的好看的科幻电影吗？ |
| 学业帮助 | 如何提高写作能力？有什么有效的方法和技巧？ |
| 职场技能 | 如何提高团队合作能力？有哪些实践经验可以分享？ |
| 智力训练 | 有哪些能够提高智力的游戏或活动？ |
| 宠物饲养 | 养宠物需要什么条件？如何训练宠物的基本技能？ |
| 手工制作 | 如何做一件漂亮的手工编织物？有什么需要注意的事项？ |
| 投资理财 | 哪些投资方式比较稳妥？如何规避投资风险？ |
| 编辑图片 | 请把这张照片中的背景改成红色。 |
| 购物建议 | 我想买一双舒适的跑鞋，你有什么推荐吗？ |
| 竞争对手分析 | 可以帮我分析一下我们主要竞争对手的市场营销策略吗？ |
| 写作指导 | 我正在写一篇关于环境保护的文章，请给我一些写作技巧。 |
| 制定计划 | 我想在未来6个月内减轻20磅体重，请为我制定一个健康的饮食和锻炼计划。 |
| 产品介绍 | 能否对我介绍一下你们公司最新推出的产品？ |
| 情感支持 | 最近我感到很孤单，你有任何建议来帮助我克服这种情况吗？ |
| 新闻报道 | 最近有哪些重大新闻值得我们关注？ |
| 学术论文编辑 | 我写了一篇心理学论文，请帮我修改语法和格式错误。 |
| 社交聚会建议 | 我要举办一个生日派对，请给我一些关于场地和食品选择的建议。 |
|电影推荐|你能否推荐一部最近上�


 break;
      }
    }
  }

  @override
  TunnelServiceUpdateDNSFilteringEnabledRequest deserialize(
    Serializers serializers,
    Object serialized, {
    FullType specifiedType = FullType.unspecified,
  }) {
    final result = TunnelServiceUpdateDNSFilteringEnabledRequestBuilder();
    final serializedList = (serialized as Iterable<Object?>).toList();
    final unhandled = <Object?>[];
    _deserializeProperties(
      serializers,
      serialized,
      specifiedType: specifiedType,
      serializedList: serializedList,
      unhandled: unhandled,
      result: result,
    );
    return result.build();
  }
}

// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'v1_wire_guard_interface.dart';

// **************************************************************************
// BuiltValueGenerator
// **************************************************************************

class _$V1WireGuardInterface extends V1WireGuardInterface {
  @override
  final String? privateKey;
  @override
  final int? listenPort;
  @override
  final int? ingressPort;
  @override
  final int? firewallMark;
  @override
  final BuiltList<String>? address;
  @override
  final BuiltList<String>? dns;
  @override
  final int? mtu;
  @override
  final int? table;
  @override
  final String? preUp;
  @override
  final String? postUp;
  @override
  final String? preDown;
  @override
  final String? postDown;

  factory _$V1WireGuardInterface(
          [void Function(V1WireGuardInterfaceBuilder)? updates]) =>
      (new V1WireGuardInterfaceBuilder()..update(updates))._build();

  _$V1WireGuardInterface._(
      {this.privateKey,
      this.listenPort,
      this.ingressPort,
      this.firewallMark,
      this.address,
      this.dns,
      this.mtu,
      this.table,
      this.preUp,
      this.postUp,
      this.preDown,
      this.postDown})
      : super._();

  @override
  V1WireGuardInterface rebuild(
          void Function(V1WireGuardInterfaceBuilder) updates) =>
      (toBuilder()..update(updates)).build();

  @override
  V1WireGuardInterfaceBuilder toBuilder() =>
      new V1WireGuardInterfaceBuilder()..replace(this);

  @override
  bool operator ==(Object other) {
    if (identical(other, this)) return true;
    return other is V1WireGuardInterface &&
        privateKey == other.privateKey &&
        listenPort == other.listenPort &&
        ingressPort == other.ingressPort &&
        firewallMark == other.firewallMark &&
        address == other.address &&
        dns == other.dns &&
        mtu == other.mtu &&
        table == other.table &&
        preUp == other.preUp &&
        postUp == other.postUp &&
        preDown == other.preDown &&
        postDown == other.postDown;
  }

  @override
  int get hashCode {
    var _$hash = 0;
    _$hash = $jc(_$hash, privateKey.hashCode);
    _$hash = $jc(_$hash, listenPort.hashCode);
    _$hash = $jc(_$hash, ingressPort.hashCode);
    _$hash = $jc(_$hash, firewallMark.hashCode);
    _$hash = $jc(_$hash, address.hashCode);
    _$hash = $jc(_$hash, dns.hashCode);
    _$hash = $jc(_$hash, mtu.hashCode);
    _$hash = $jc(_$hash, table.hashCode);
    _$hash = $jc(_$hash, preUp.hashCode);
    _$hash = $jc(_$hash, postUp.hashCode);
    _$hash = $jc(_$hash, preDown.hashCode);
    _$hash = $jc(_$hash, postDown.hashCode);
    _$hash = $jf(_$hash);
    return _$hash;
  }

  @override
  String toString() {
    return (newBuiltValueToStringHelper(r'V1WireGuardInterface')


	Port:     pointer.To[uint32](9000),
						Protocol: api.ProtocolType("http2"),
					},
					{
						Type:     api.MatchType("Domain"),
						Value:    "grpc.com",
						Port:     pointer.To[uint32](9001),
						Protocol: api.ProtocolType("grpc"),
					},
					{
						Type:     api.MatchType("Domain"),
						Value:    "*.example.com",
						Protocol: api.ProtocolType("http"),
					},
					{
						Type:     api.MatchType("Domain"),
						Value:    "*.example.com",
						Protocol: api.ProtocolType("tls"),
					},
					{
						Type:     api.MatchType("IP"),
						Value:    "10.42.0.8",
						Protocol: api.ProtocolType("http"),
					},
					{
						Type:     api.MatchType("IP"),
						Value:    "192.168.19.1",
						Protocol: api.ProtocolType("tls"),
					},
					{
						Type:     api.MatchType("IP"),
						Value:    "192.168.0.1",
						Port:     pointer.To[uint32](9091),
						Protocol: api.ProtocolType("tcp"),
					},
					{
						Type:     api.MatchType("Domain"),
						Value:    "otherexample.com",
						Protocol: api.ProtocolType("http"),
					},
					{
						Type:     api.MatchType("CIDR"),
						Value:    "192.168.0.1/24",
						Protocol: api.ProtocolType("tcp"),
					},
					{
						Type:     api.MatchType("CIDR"),
						Value:    "192.168.0.1/30",
						Protocol: api.ProtocolType("tcp"),
					},
					{
						Type:     api.MatchType("CIDR"),
						Value:    "240.0.0.0/4",
						Protocol: api.ProtocolType("http"),
					},
					{
						Type:     api.MatchType("CIDR"),
						Value:    "172.18.0.0/16",
						Protocol: api.ProtocolType("http"),
					},
					{
						Type:     api.MatchType("IP"),
						Value:    "b6e5:a45e:70ae:e77f:d24e:5023:375d:20a6",
						Protocol: api.ProtocolType("tls"),
					},
					{
						Type:     api.MatchType("IP"),
						Value:    "9942:9abf:d0e0:f2da:2290:333b:e590:f497",
						Port:     pointer.To[uint32](9091),
						Protocol: api.ProtocolType("tcp"),
					},
					{
						Type:     api.MatchType("CIDR"),
						Value:    "b0ce:f616:4e74:28f7:427c:b969:8016:6344/64",
						Protocol: api.ProtocolType("tcp"),
					},
					{
						Type:     api.MatchType("CIDR"),
						Value:    "b0ce:f616:4e74:28f7:427c:b969:8016:6344/96",
						Protocol: api.ProtocolType("tcp"),
					},
				},
			},
			orderedGolden: "ordered.golden.yaml",
		}),
		Entry("different protocols on the same port but only one L7", validTestCase{
			conf: api.Conf{
				AppendMatch: &[]api.Match{
					{
						Type:     api.MatchType("Domain"),
						Value:    "api.example.com",
						Port:     pointer.To[uint32](443),
						Protocol: api.ProtocolType("tls"),
					},
					{
						Type:     api.MatchType("Domain"),
						Value:    "api.example.com",
						Port:     pointer.To[uint32](443),
						Protocol: api.ProtocolType("http"),
					},
					{
						Type:     api.MatchType("IP"),
						Value:    "127.0.0.1",
						Port:     pointer.To[uint32](443),
						Protocol: api.ProtocolType("tc


> .page-prefooter .subscribe-form .btn.dropdown-toggle:hover,
      .open > .page-prefooter .subscribe-form .btn.dropdown-toggle:focus,
      .open > .page-prefooter .subscribe-form .btn.dropdown-toggle.focus {
        color: #fff;
        background-color: #26a1ac;
        border-color: #26a1ac; }
    .page-prefooter .subscribe-form .btn:active,
    .page-prefooter .subscribe-form .btn.active,
    .open > .page-prefooter .subscribe-form .btn.dropdown-toggle {
      background-image: none; }
    .page-prefooter .subscribe-form .btn.disabled,
    .page-prefooter .subscribe-form .btn.disabled:hover,
    .page-prefooter .subscribe-form .btn.disabled:focus,
    .page-prefooter .subscribe-form .btn.disabled.focus,
    .page-prefooter .subscribe-form .btn.disabled:active,
    .page-prefooter .subscribe-form .btn.disabled.active,
    .page-prefooter .subscribe-form .btn[disabled],
    .page-prefooter .subscribe-form .btn[disabled]:hover,
    .page-prefooter .subscribe-form .btn[disabled]:focus,
    .page-prefooter .subscribe-form .btn[disabled].focus,
    .page-prefooter .subscribe-form .btn[disabled]:active,
    .page-prefooter .subscribe-form .btn[disabled].active,
    fieldset[disabled] .page-prefooter .subscribe-form .btn,
    fieldset[disabled] .page-prefooter .subscribe-form .btn:hover,
    fieldset[disabled] .page-prefooter .subscribe-form .btn:focus,
    fieldset[disabled] .page-prefooter .subscribe-form .btn.focus,
    fieldset[disabled] .page-prefooter .subscribe-form .btn:active,
    fieldset[disabled] .page-prefooter .subscribe-form .btn.active {
      background-color: #3fc9d5;
      border-color: #3fc9d5; }
    .page-prefooter .subscribe-form .btn .badge {
      color: #3fc9d5;
      background-color: #fff; }

.page-footer {
  background: #3b434c;
  color: #a2abb7; }

/* Scroll Top */
.scroll-to-top > i {
  color: #657383;
  font-size: 32px;
  opacity: 0.7 ;
  filter: alpha(opacity=70) ; }

@media (min-width: 992px) {
  /* 992px */
  .page-header {
    /* Page Header Menu */ }
    .page-header .page-header-menu.fixed {
      width: 100%;
      position: fixed;
      top: 0;
      left: 0;
      z-index: 9995; } }

@media (max-width: 991px) {
  /* 991px */
  .page-header .page-header-menu {
    background: #eff3f8;
    /* Horizontal mega menu */ }
    .page-header .page-header-menu .hor-menu .navbar-nav {
      background: #fff !important;
      /* Mega menu content */
      /* Classic menu */ }
      .page-header .page-header-menu .hor-menu .navbar-nav > li.mega-menu-dropdown > .dropdown-menu {
        box-shadow: none; }
        .page-header .page-header-menu .hor-menu .navbar-nav > li.mega-menu-dropdown > .dropdown-menu .mega-menu-content .mega-menu-submenu {
          border-right: none !important; }
          .page-header .page-header-menu .hor-menu .navbar-nav > li.mega-menu-dropdown > .dropdown-menu .mega-menu-content .mega-menu-submenu li > h3 {
            color: #72


import matplotlib.pyplot as plt
import numpy as np

# 加载数据
temperature = np.loadtxt('temp_sro_ptcofe.csv', delimiter=',')[:,0]
sro_ptcofe = np.loadtxt('temp_sro_ptcofe.csv', delimiter=',')[:,1]
sro_ptcomn = np.loadtxt('temp_sro_ptcomn.csv', delimiter=',')[:,1]
sro_ptcocr = np.loadtxt('temp_sro_ptcocr.csv', delimiter=',')[:,1]

# 创建 3 个子图，按 1 行 3 列排列
fig, axs = plt.subplots(1, 4, figsize=(15, 3))  # 设置图表大小
plt.rc('font', family='Arial')  # 设置字体为 Arial

# 设置 y 轴范围为 -0.4 到 0
y_min, y_max = -0.4, 0.10

# 设置统一的刻度线样式：朝内
for ax in axs:
    ax.tick_params(direction='in', labelsize=10, length=6)

# 绘制第一个子图
axs[0].plot(temperature, sro_ptcocr, marker='o', markersize=3, color='#276BB3')
axs[0].set_xlabel('Temperature (K)',fontsize=12)  # 设置x轴标签
axs[0].set_ylabel(r'$\rm \alpha^{Pt-CoCr}$',fontsize=12)  # 设置y轴标签
axs[0].set_ylim(y_min, y_max)  # 设置 y 轴范围

# 绘制第二个子图
axs[1].plot(temperature, sro_ptcomn, marker='o', markersize=3, color='#276BB3')
axs[1].set_xlabel('Temperature (K)',fontsize=12)  # 设置x轴标签
axs[1].set_ylabel(r'$\rm \alpha^{Pt-CoMn}$',fontsize=12)  # 设置y轴标签
axs[1].set_ylim(y_min, y_max)

# 绘制第三个子图
axs[2].plot(temperature, sro_ptcofe, marker='o', markersize=3, color='#276BB3')
axs[2].set_xlabel('Temperature (K)',fontsize=12)  # 设置x轴标签
axs[2].set_ylabel(r'$\rm \alpha^{Pt-CoFe}$',fontsize=12)  # 设置y轴标签
axs[2].set_ylim(y_min, y_max)

# 调整子图之间的间隙为 0.3
plt.subplots_adjust(wspace=0.3)  # 设置子图之间的垂直间隙为 0
plt.savefig('temperature_sro_crmnfe.eps',bbox_inches='tight')
# 显示图形
plt.show()


/* crypto/pkcs7/pk7_enc.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
 * This library is free for commercial and non-commercial use as long as
 * the following conditions are aheared to.  The following conditions
 * apply to all code found in this distribution, be it the RC4, RSA,
 * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
 * included with this distribution is covered by the same copyright terms
 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
 *
 * Copyright remains Eric Young's, and as such any Copyright notices in
 * the code are not to be removed.
 * If this package is used in a product, Eric Young should be given attribution
 * as the author of the parts of the library used.
 * This can be in the form of a textual message at program startup or
 * in documentation (online or textual) provided with the package.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *    "This product includes cryptographic software written by
 *     Eric Young (eay@cryptsoft.com)"
 *    The word 'cryptographic' can be left out if the rouines from the library
 *    being used are not cryptographic related :-).
 * 4. If you include any Windows specific code (or a derivative thereof) from
 *    the apps directory (application code) you must include an acknowledgement:
 *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
 *
 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 * The licence and distribution terms for any publically available version or
 * derivative of this code cannot be changed.  i.e. this code cannot simply be
 * copied and put under another distribution licence
 * [including the GNU Public Licence.]
 */

#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
#include <openssl/rand.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/pkcs7.h>

PKCS7_in_bio(PKCS7 *p7,BIO *in);
PKCS7_out_bio(PKCS7 *p7,BIO *out);

PKCS7_add_signer(PKCS7 *p7,X509 *cert,EVP_PKEY *key);
PKCS7_cipher(PKCS7 *p7,EVP_CIPHER *cipher);

PKCS7_Init(PKCS7 *p7);
PKCS7_Update(PKCS7 *p7);
PKCS7_Finish(PKCS7 *p7);


Key, s.timeUntil(next.Data))
			s.scheduleLk.Unlock()
			return
		}
		if timeSinceTimerUntilNext < timeSinceTimerRunning {
			// next is scheduled in the past. While next is in the past, add next to
			// failedRegions and take nextLeaf as next.
			count := 0
			scheduleSize := s.schedule.Size()
			for timeSinceTimerUntilNext < timeSinceTimerRunning && count < scheduleSize {
				prefix := next.Key
				s.reprovideQueue.Enqueue(prefix)
				next = keyspace.NextNonEmptyLeaf(s.schedule, next.Key, s.order)
				timeSinceTimerUntilNext = s.timeBetween(s.timeOffset(s.scheduleTimerStartedAt), next.Data)
				count++
			}
		}

		// next is in the future
		nextPrefix = next.Key
		timeUntilNextReprovide = s.timeUntil(next.Data)
	}

	s.scheduleNextReprovideNoLock(nextPrefix, timeUntilNextReprovide)
	s.scheduleLk.Unlock()

	// If we are offline, don't try to reprovide region.
	if !s.connectivity.IsOnline() {
		s.reprovideQueue.Enqueue(currentPrefix)
		return
	}

	// Remove prefix that is about to be reprovided from the reprovide queue if
	// present.
	s.reprovideQueue.Remove(currentPrefix)

	s.wg.Add(1)
	go func() {
		if err := s.workerPool.Acquire(periodicWorker); err == nil {
			s.batchReprovide(currentPrefix, true)
			s.workerPool.Release(periodicWorker)
		}
		s.wg.Done()
	}()
}

// handleProvide provides supplied keys to the network if needed and schedules
// the keys to be reprovided if needed.
func (s *SweepingProvider) handleProvide(force, reprovide bool, keys ...mh.Multihash) error {
	if len(keys) == 0 {
		return nil
	}
	if reprovide {
		// Add keys to list of keys to be reprovided. Returned keys are deduplicated
		// newly added keys.
		newKeys, err := s.keystore.Put(s.ctx, keys...)
		if err != nil {
			return fmt.Errorf("couldn't add keys to keystore: %w", err)
		}
		if !force {
			keys = newKeys
		}
	}

	if s.isOffline() {
		return ErrOffline
	}
	prefixes, err := s.groupAndScheduleKeysByPrefix(keys, reprovide)
	if err != nil {
		return err
	}
	if len(prefixes) == 0 {
		return nil
	}
	// Sort prefixes by number of keys.
	sortedPrefixesAndKeys := keyspace.SortPrefixesBySize(prefixes)
	// Add keys to the provide queue.
	for _, prefixAndKeys := range sortedPrefixesAndKeys {
		s.provideQueue.Enqueue(prefixAndKeys.Prefix, prefixAndKeys.Keys...)
	}

	s.wg.Add(1)
	go s.provideLoop()
	return nil
}

// groupAndScheduleKeysByPrefix groups the supplied keys by their prefixes as
// present in the schedule, and if `schedule` is set to true, add these
// prefixes to the schedule to be reprovided.
func (s *SweepingProvider) groupAndScheduleKeysByPrefix(keys []mh.Multihash, schedule bool) (map[bitstr.Key][]mh.Multihash, error) {
	seen := make(map[string]struct{})
	prefixTrie := trie.New[bitstr.Key, struct{}]()
	prefixes := make(map[bitstr.Key][]mh.Multihash)
	avgPrefixLen := -1

	s.scheduleLk.Lock()
	defer s.scheduleLk.Unlock()
	for _, h := range keys {
		k := keyspace.MhToBit256(h)
		kStr := string(keyspace.KeyToBytes(k))
		// Don't add duplicates
		if _


ADVM\n"
                        + "b3JnL2VjbGlwc2UvY29sbGVjdGlvbnMvYXBpL2Jsb2NrL2Z1bmN0aW9uL0Z1bmN0aW9uO3hwcHA=\n",
                Functions.bind((Procedure2<Object, Object>) null, null));
    }

    @Test
    public void bind_object_int_procedure()
    {
        Verify.assertSerializedForm(
                1L,
                "rO0ABXNyAEtvcmcuZWNsaXBzZS5jb2xsZWN0aW9ucy5pbXBsLmJsb2NrLmZhY3RvcnkuRnVuY3Rp\n"
                        + "b25zJEJpbmRPYmplY3RJbnRQcm9jZWR1cmUAAAAAAAAAAQIAAkwACGRlbGVnYXRldABKTG9yZy9l\n"
                        + "Y2xpcHNlL2NvbGxlY3Rpb25zL2FwaS9ibG9jay9wcm9jZWR1cmUvcHJpbWl0aXZlL09iamVjdElu\n"
                        + "dFByb2NlZHVyZTtMAAhmdW5jdGlvbnQANUxvcmcvZWNsaXBzZS9jb2xsZWN0aW9ucy9hcGkvYmxv\n"
                        + "Y2svZnVuY3Rpb24vRnVuY3Rpb247eHBwcA==",
                Functions.bind((ObjectIntProcedure<Object>) null, null));
    }

    @Test
    public void bind_function2_parameter()
    {
        Verify.assertSerializedForm(
                1L,
                "rO0ABXNyAEJvcmcuZWNsaXBzZS5jb2xsZWN0aW9ucy5pbXBsLmJsb2NrLmZhY3RvcnkuRnVuY3Rp\n"
                        + "b25zJEJpbmRGdW5jdGlvbjIAAAAAAAAAAQIAAkwACGRlbGVnYXRldAA2TG9yZy9lY2xpcHNlL2Nv\n"
                        + "bGxlY3Rpb25zL2FwaS9ibG9jay9mdW5jdGlvbi9GdW5jdGlvbjI7TAAJcGFyYW1ldGVydAASTGph\n"
                        + "dmEvbGFuZy9PYmplY3Q7eHBwcA==",
                Functions.bind((Function2<Object, Object, Object>) null, null));
    }

    @Test
    public void getKeyFunction()
    {
        Verify.assertSerializedForm(
                1L,
                "rO0ABXNyAENvcmcuZWNsaXBzZS5jb2xsZWN0aW9ucy5pbXBsLmJsb2NrLmZhY3RvcnkuRnVuY3Rp\n"
                        + "b25zJE1hcEtleUZ1bmN0aW9uAAAAAAAAAAECAAB4cA==",
                Functions.getKeyFunction());
    }

    @Test
    public void getValueFunction()
    {
        Verify.assertSerializedForm(
                1L,
                "rO0ABXNyAEVvcmcuZWNsaXBzZS5jb2xsZWN0aW9ucy5pbXBsLmJsb2NrLmZhY3RvcnkuRnVuY3Rp\n"
                        + "b25zJE1hcFZhbHVlRnVuY3Rpb24AAAAAAAAAAQIAAHhw",
                Functions.getValueFunction(


.
     * Notes        :
     * Created      : @author Neil Smith <Neil.Smith@WebTarget.co.uk>
     * Created Date : 28 Feb 2017
     * -----------------------------------------------------------------------------
     * Date?        Whom?           Notes
     * _____________________________________________________________________________
     */
    public parseResults(_results: string[]): string[] {
        let _columns: string[] = [];
        try {
            for (var column of _results) {
                _columns.push(column["column_name"]);
            }
        } catch (error) {
            console.log(`Error in parseResults :: ${error}`);
        }
        console.log("Have returned these columns::" + JSON.stringify(_columns));
        return _columns;

    }

    /**
    * -----------------------------------------------------------------------------
    * Method       : @method getQuery
    * Description  : @description The query that gets the column names
    * Notes        :
    * Created      : @author Neil Smith <Neil.Smith@WebTarget.co.uk>
    * Created Date : 28 Feb 2017
    * -----------------------------------------------------------------------------
    * Date?        Whom?           Notes
    * _____________________________________________________________________________
    */
    private getQuery(_tableName?: string): string {
        return `select column_name from information_schema.columns where table_name='${this._cs.getTable()}';`;
    }

}
export const makeRequestsLatencyRequest = ({
    name,
    alignmentPeriod = 60,
    lastHours = 1,
    serviceNames,
    projectId,
    nowTimestamp,
}) => {
    // 1 hours -> 60s
    // 6 hours -> 60s
    // 1 day -> 300
    // 7 day -> 3600s
    // 30 day -> 10800s
    const filter = `metric.type="run.googleapis.com/request_latencies" AND resource.type="cloud_run_revision" ${makeServicesFilter(
        serviceNames,
    )} AND resource.labels.project_id="${projectId}"`
    return {
        name,
        filter: filter,
        interval: {
            startTime: {
                // Limit results to the last 20 minutes
                seconds: nowTimestamp / 1000 - 60 * 60 * lastHours,
            },
            endTime: {
                seconds: nowTimestamp / 1000,
            },
        },
        aggregation: {
            groupByFields: [`resource.labels.service_name`],
            crossSeriesReducer: `REDUCE_SUM`,
            alignmentPeriod: { seconds: alignmentPeriod },
            perSeriesAligner: `ALIGN_PERCENTILE_99`,
        },
        secondaryAggregation: { crossSeriesReducer: `REDUCE_NONE` },
    }
}

export const makeRequestsCountRequest = ({
    name,
    alignmentPeriod = 60,
    lastHours = 1,
    serviceNames,
    projectId,
    nowTimestamp,
}) => {
    const filter = `metric.type="run.googleapis.com/request_count" AND resource.type="cloud_run_revision" ${makeServicesFilter(
        serviceNames,
    )} AND resource.labels.project_id="${projectId}"`
    // console.log({ filter })
    return {
        name,
        filter,
        interval: {
            startTime: {
                // Limit results to the last 20 minutes
                seconds: nowTimestamp / 1000 - 60 * 60 * lastHours,
            },
            endTime: {
                seconds: nowTimestamp / 1000,
            },
        },
        aggregation: {
            groupByFields: [`resource.labels.service_name`],
            crossSeriesReducer: `REDUCE_SUM`,
            alignmentPeriod: { seconds: alignmentPeriod },
            perSeriesAligner: `ALIGN_RATE`,
        },
        secondaryAggregation: { crossSeriesReducer: `REDUCE_NONE` },


mm0=rinv
	movapd xmm6, xmm0
	addpd  xmm6, xmm7	;# xmm6=rinv+ krsq
	movapd xmm1, xmm4
	subpd  xmm6, [rsp + nb230nf_crf]
	mulpd  xmm6, xmm3

	addpd  xmm6, [rsp + nb230nf_vctot]
	movapd [rsp + nb230nf_vctot], xmm6

	;# LJ table interaction. xmm0=rinv, xmm4=rsq

	mulpd xmm4, xmm0	;# xmm4=r
	mulpd xmm4, [rsp + nb230nf_tsc]

	cvttpd2pi mm6, xmm4	;# mm6 = lu idx
	cvtpi2pd xmm5, mm6
	subpd xmm4, xmm5
	movapd xmm1, xmm4	;# xmm1=eps
	movapd xmm2, xmm1
	mulpd  xmm2, xmm2	;# xmm2=eps2

	pslld mm6, 3		;# idx *= 8

	mov  rsi, [rbp + nb230nf_VFtab]
	movd eax, mm6
	psrlq mm6, 32
	movd ebx, mm6

	;# dispersion
	movlpd xmm4, [rsi + rax*8]	;# Y1
	movlpd xmm3, [rsi + rbx*8]	;# Y2
	movhpd xmm4, [rsi + rax*8 + 8]	;# Y1 F1
	movhpd xmm3, [rsi + rbx*8 + 8]	;# Y2 F2
	movapd xmm5, xmm4
	unpcklpd xmm4, xmm3	;# Y1 Y2
	unpckhpd xmm5, xmm3	;# F1 F2

	movlpd xmm6, [rsi + rax*8 + 16]	;# G1
	movlpd xmm3, [rsi + rbx*8 + 16]	;# G2
	movhpd xmm6, [rsi + rax*8 + 24]	;# G1 H1
	movhpd xmm3, [rsi + rbx*8 + 24]	;# G2 H2
	movapd xmm7, xmm6
	unpcklpd xmm6, xmm3	;# G1 G2
	unpckhpd xmm7, xmm3	;# H1 H2
	;# dispersion table ready, in xmm4-xmm7
	mulpd  xmm6, xmm1	;# xmm6=Geps
	mulpd  xmm7, xmm2	;# xmm7=Heps2
	addpd  xmm5, xmm6
	addpd  xmm5, xmm7	;# xmm5=Fp
	mulpd  xmm5, xmm1 ;# xmm5=eps*Fp
	addpd  xmm5, xmm4 ;# xmm5=VV

	movapd xmm4, [rsp + nb230nf_c6]
	mulpd  xmm5, xmm4	 ;# Vvdw6

	;#Update Vvdwtot directly
	addpd  xmm5, [rsp + nb230nf_Vvdwtot]
	movapd [rsp + nb230nf_Vvdwtot], xmm5

	;# repulsion
	movlpd xmm4, [rsi + rax*8 + 32]	;# Y1
	movlpd xmm3, [rsi + rbx*8 + 32]	;# Y2
	movhpd xmm4, [rsi + rax*8 + 40]	;# Y1 F1
	movhpd xmm3, [rsi + rbx*8 + 40]	;# Y2 F2

	movapd xmm5, xmm4


-3.534-1.464L1.882,15.183c-.65-.649-.964-1.542-.864-2.453l.765-6.916c.051-.456,.404-.819,.858-.881l6.889-.942c.932-.124,1.87,.193,2.528,.851l7.475,7.412c.387,.387,.697,.823,.931,1.288,.812-1.166,.698-2.795-.342-3.835L12.531,2.302c-.229-.229-.545-.335-.851-.292l-6.889,.942c-.549,.074-1.052-.309-1.127-.855-.074-.547,.309-1.051,.855-1.126L11.409,.028c.921-.131,1.869,.191,2.528,.852l7.589,7.405c1.946,1.945,1.957,5.107,.032,7.057Zm-3.438-1.67l-7.475-7.412c-.223-.223-.536-.326-.847-.287l-6.115,.837-.679,6.14c-.033,.303,.071,.601,.287,.816l7.416,7.353c.569,.57,1.322,.881,2.123,.881h.01c.806-.002,1.561-.319,2.126-.893l3.167-3.208c1.155-1.17,1.149-3.067-.014-4.229Z'/%3E%3C/svg%3E");
}

svg.lucide-terminal {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' id='Layer_1' data-name='Layer 1' viewBox='0 0 24 24' width='100%25' height='100%25'%3E%3Cpath d='M5.374,18.455c-.256,0-.512-.098-.707-.293-.391-.391-.391-1.023,0-1.414l4.041-4.041c.39-.39,.39-1.024,0-1.414L4.667,7.252c-.391-.391-.391-1.023,0-1.414s1.023-.391,1.414,0l4.041,4.041c1.17,1.17,1.17,3.072,0,4.242l-4.041,4.041c-.195,.195-.451,.293-.707,.293Zm18.626,.545V5c0-2.757-2.243-5-5-5H5C2.243,0,0,2.243,0,5v14c0,2.757,2.243,5,5,5h14c2.757,0,5-2.243,5-5ZM19,2c1.654,0,3,1.346,3,3v14c0,1.654-1.346,3-3,3H5c-1.654,0-3-1.346-3-3V5c0-1.654,1.346-3,3-3h14Zm1,15c0-.553-.447-1-1-1h-7c-.552,0-1,.447-1,1s.448,1,1,1h7c.553,0,1-.447,1-1Z'/%3E%3C/svg%3E");
}

svg.lucide-text {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' id='Outline' viewBox='0 0 24 24'


EmptyKey(keyAndValueMap, key, getString(sourceObj, key, ""))
        }
        return keyAndValueMap
    }

    /**
     * parse key-value pairs to map. ignore empty key, if getValue exception, put empty value
     *
     * @param source key-value pairs json
     * @return
     *  * if source is null or source's length is 0, return empty map
     *  * if source [JSONObject.JSONObject] exception, return null
     *
     */
    fun parseKeyAndValueToMap(source: String?): Map<String?, String?>? {
        return if (isEmpty(source)) {
            null
        } else try {
            val jsonObject = JSONObject(source)
            parseKeyAndValueToMap(jsonObject)
        } catch (e: JSONException) {
            if (isPrintException) {
                e.printStackTrace()
            }
            null
        }
    }

    /**
     *
     *
     * 根据json文件读取json
     * @return
     */
    fun getJson(context: Context, fileName: String?): String {
        val stringBuilder = StringBuilder()
        try {
            val assetManager: AssetManager = context.getAssets()
            val bf = BufferedReader(InputStreamReader(assetManager.open(fileName!!)))
            var line: String?
            while (bf.readLine().also { line = it } != null) {
                stringBuilder.append(line)
            }
        } catch (e: IOException) {
            e.printStackTrace()
        }
        return stringBuilder.toString()
    }

}package com.core.library_base.util

import android.app.Activity
import android.app.Application
import android.os.Bundle
import android.util.ArrayMap

/**
 * Author:Knight
 * Time:2021/12/20 15:15
 * Description:ActivityManagerUtils
 */
class ActivityManagerUtils : Application.ActivityLifecycleCallbacks {

    companion object {
        @Volatile
        private var instance: ActivityManagerUtils? = null
        /**
         * 单例模式
         * 双重校验锁
         * @return
         */
        fun getInstance(): ActivityManagerUtils {
            if (instance == null) {
                synchronized(ActivityManagerUtils::class.java) {
                    if (instance == null) {
                        instance = ActivityManagerUtils()
                    }
                }
            }
            return instance!!
        }
    }

    private val mActivityArrayMap: ArrayMap<String, Activity> = ArrayMap()
    private  var mCurrentTag:String? = null

    /**
     *
     * 获取栈顶的Activity
     */
    fun getTopActivity():Activity? {
        return mActivityArrayMap[mCurrentTag]
    }

    /**
     * 销毁所有界面
     *
     *
     */
    fun finishAllActivity() {
        val keys: Array<String> = mActivityArrayMap.keys.toTypedArray()
        for (key in keys) {
            val activity = mActivityArrayMap[key]
            activity?.finish()
            mActivityArrayMap.remove(key)
        }
    }

    /**
     * 销毁所有(除了特定的界面)的界面
     * @param classArray
     */
    @Suppress("unused")
    @SafeVarargs
    fun finishAllActivities(vararg classArray: Class<out Activity?>) {
        val keys: Array<String> = mActivityArrayMap.keys.toTypedArray()
        for (key in keys) {
            val activity = mActivityArrayMap[key]
            if (activity != null && !activity.isFinishing) {
                var whiteClazz = false
                for (clazz in classArray) {
                    if (activity.javaClass == clazz) {
                        whiteClazz = true
                    }


/ <summary>
    /// Explode the object.
    /// </summary>
    Explode = 3,

    /// <summary>
    /// Delete the object.
    /// </summary>
    Delete = 4,

    /// <summary>
    /// Reset the target objects
    /// </summary>
    Reset = 5,

    /// <summary>
    /// Start clipping all objects
    /// </summary>
    ClipBar = 6,
    ClipHands = 7,

    /// <summary>
    /// Change the material of the object
    /// </summary>
    Material = 8,

    /// <summary>
    /// Turn on the draw tool
    /// </summary>
    Draw = 9,

    //
    // Add new values above "Count" and "Invalid"
    //

    /// <summary>
    /// Used for iterating over all action type. Keep at end, before 'Invalid'
    /// </summary>
    Count,

    /// <summary>
    /// And invalid pointer mode
    /// </summary>
    Invalid,
}


ata-line-number="536">
        <g id="eye-slash" transform="scale(1.7777777777777777 1.7777777777777777)"><path d="M286.693 391.984l32.579 46.542A333.958 333.958 0 0 1 288 440C168.19 440 63.031 376.051 6.646 280.369a47.999 47.999 0 0 1 0-48.739c24.023-40.766 56.913-75.775 96.024-102.537l57.077 81.539C154.736 224.82 152 240.087 152 256c0 74.736 60.135 135.282 134.693 135.984zm282.661-111.615c-31.667 53.737-78.747 97.46-135.175 125.475l.011.015 41.47 59.2c7.6 10.86 4.96 25.82-5.9 33.42l-13.11 9.18c-10.86 7.6-25.82 4.96-33.42-5.9L100.34 46.94c-7.6-10.86-4.96-25.82 5.9-33.42l13.11-9.18c10.86-7.6 25.82-4.96 33.42 5.9l51.038 72.617C230.68 75.776 258.905 72 288 72c119.81 0 224.969 63.949 281.354 159.631a48.002 48.002 0 0 1 0 48.738zM424 256c0-75.174-60.838-136-136-136-17.939 0-35.056 3.473-50.729 9.772l19.299 27.058c25.869-8.171 55.044-6.163 80.4 7.41h-.03c-23.65 0-42.82 19.17-42.82 42.82 0 23.626 19.147 42.82 42.82 42.82 23.65 0 42.82-19.17 42.82-42.82v-.03c18.462 34.49 16.312 77.914-8.25 110.95v.01l19.314 27.061C411.496 321.2 424 290.074 424 256zM262.014 356.727l-77.53-110.757c-5.014 52.387 29.314 98.354 77.53 110.757z"/></g>

        <g id="candy-cane" transform="scale(2.0 2.0)"><path d="M497.5 92C469.6 33.1 411.8 0 352.4 0c-27.9 0-56.2 7.3-81.8 22.6L243.1 39c-15.2 9.1-20.1 28.7-11 43.9l32.8 54.9c6


    columnId?: string

}

export default Taskimport { Readability } from "@mozilla/readability";
import { JSDOM } from "jsdom";
import fetch from "node-fetch";

interface ReadableFeedItem {
  article: ReturnType<Readability["parse"]>;
}

export async function getReadableFeedItem(
  url: string
): Promise<ReadableFeedItem> {
  try {
    let res = await fetch(url, {
      method: "GET",
    });
    let html = await res.text();
    let document = new JSDOM(html);
    let reader = new Readability(document.window.document);
    let article = reader.parse();
    if (article) {
      return {
        article,
      };
    }
  } catch (err) {
    console.error("Error getting readable feed item:", err);
  }
  return {
    article: null,
  };
}
import { HTTP_HEADER_CONTENT_TYPE } from '../enum/HTTP_HEADER_CONTENT_TYPE';

export interface IR2CurlOptions {
  /**
   * Determines the type of quota around the body and uri.
   * @default 'single'
   */
  quote: 'single' | 'double';
  /**
   * Determines the default Content-Type header value for POST, PATCH and PUT requests.
   * @default HTTP_HEADER_CONTENT_TYPE.JSON_UTF8 (appplication/json; charset=utf-8)
   */
  defaultContentType: HTTP_HEADER_CONTENT_TYPE | string | false;
  /**
   * Accept Body all HTTP Method.(Including GET and DELETE methods)
   * @default false
   */
  forceBody: boolean;
}

export const defaultR2CurlOptions: IR2CurlOptions = {
  quote: 'single',
  defaultContentType: HTTP_HEADER_CONTENT_TYPE.JSON_UTF8,
  forceBody: false,
};
import {
  Helpers,
  Instances,
  Options,
  ParserField,
  TypeDefinition,
  TypeExtension,
  TypeSystemDefinition,
  Value,
  ValueDefinition,
} from '@/Models';
import { ArgumentTemplate } from './ArgumentTemplate';
import { CommentTemplate } from './CommentTemplate';
import { DirectiveTemplate } from './DirectiveTemplate';
import { EnumValueDefinitionTemplate } from './EnumValueDefinitionTemplate';
import { ExtendTemplate } from './ExtendTemplate';
import { FieldTemplate } from './FieldTemplate';
import { InputValueTemplate } from './InputValueTemplate';
import { TypeDefinitionsTemplates } from './TypeDefinitionsTemplates';
import { UnionMemberTemplate } from './UnionMemberTemplate';
import { ValueTemplate } from './ValueTemplate';

const dedent = new RegExp('\n([\t ]*)', 'gm');

/**
 * Class for solving GraphQL Types and directing them to a right resolver
 *
 * @export
 * @class TemplateUtils
 */
export class TemplateUtils {
  /**
   * Check if type is ListType from graphql and array in zeus
   *
   * @static
   * @param f field to check
   * @param type type of field to resolve
   * @returns {string} the real type
   * @memberof TemplateUtils
   */
  static isArray = (f: ParserField, type: string): string =>
    f.type.options && f.type.options.find((o) => o === Options.array) ? `[${type}]` : type;
  /**
   * Check if type is NonNullType from graphql and required in zeus
   *
   * @static
   * @param f field to check
   * @param type type of field to resolve
   * @returns {string} the real type
   * @memberof TemplateUtils
   */
  static isRequired = (f: ParserField, type: string): string =>
    f.type.options && f.type.options.find((o) => o === Options.required) ? `${type}!` : type;
  /**
   * Check if type is NonNullType and ListType from graphql


    // for channel.isClosedForSend - need to be replaced by testing via turbine or optIn in place
                // and GlobalScope - need to be dropped
                optIn(OptIns.DelicateCoroutinesApi)

                // rsocket related
                optIn(OptIns.RSocketTransportApi)
                optIn(OptIns.ExperimentalMetadataApi)
                optIn(OptIns.ExperimentalStreamsApi)
                optIn(OptIns.RSocketLoggingApi)
            }
        }
    }

    targets.withType<KotlinJvmTarget>().configureEach {
        compilerOptions {
            freeCompilerArgs.add("-Xjvm-default=all")
        }
    }

    // revisit JS block after WASM support
    targets.withType<KotlinJsIrTarget>().configureEach {
        whenBrowserConfigured {
            testTask {
                useKarma {
                    useConfigDirectory(rootDir.resolve("gradle/js/karma.config.d"))
                    useChromeHeadless()
                }
            }
        }
        whenNodejsConfigured {
            testTask {
                useMocha {
                    timeout = "600s"
                }
            }
        }
    }

    //setup tests running in RELEASE mode
    targets.withType<KotlinNativeTarget>().configureEach {
        binaries.test(listOf(NativeBuildType.RELEASE))
    }
    targets.withType<KotlinNativeTargetWithTests<*>>().configureEach {
        testRuns.create("releaseTest") {
            setExecutionSourceFrom(binaries.getTest(NativeBuildType.RELEASE))
        }
    }
}

// for CI mainly

registerTestAggregationTask(
    name = "jvmAllTest",
    taskDependencies = { tasks.withType<KotlinJvmTest>() },
    targetFilter = { it.platformType == KotlinPlatformType.jvm }
)

registerTestAggregationTask(
    name = "webTest",
    taskDependencies = { tasks.withType<KotlinJsTest>() },
    targetFilter = { it.platformType == KotlinPlatformType.js || it.platformType == KotlinPlatformType.wasm }
)

registerTestAggregationTask(
    name = "nativeTest",
    taskDependencies = { tasks.withType<KotlinNativeTest>().matching { it.enabled } },
    targetFilter = { it.platformType == KotlinPlatformType.native }
)

listOf("ios", "watchos", "tvos", "macos").forEach { targetGroup ->
    registerTestAggregationTask(
        name = "${targetGroup}Test",
        taskDependencies = {
            tasks.withType<KotlinNativeTest>().matching {
                it.enabled && it.name.startsWith(targetGroup, ignoreCase = true)
            }
        },
        targetFilter = {
            it.platformType == KotlinPlatformType.native && it.name.startsWith(targetGroup, ignoreCase = true)
        }
    )
}

tasks.register("linkAll") {
    dependsOn(tasks.withType<KotlinNativeLink>())
}

if (providers.gradleProperty("rsocketbuild.skipTestTasks").map(String::toBoolean).getOrElse(false)) {
    tasks.withType<AbstractTestTask>().configureEach { onlyIf { false } }
}

if (providers.gradleProperty("rsocketbuild.skipLinkTasks").map(String::toBoolean).getOrElse(false)) {
    tasks.withType<KotlinNativeLink>().configureEach { onlyIf { false } }
}
/*
 * Copyright 2015-2025 the original author or 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


            		for(CigarElement ce: newSelection.getCigar())
            			{
            			final CigarOperator op= ce.getOperator();

            			switch(op)
            				{
            				case H: case D: case N:
            					{
            					M.add(new CigarAndBase(newSelection.getReferenceName(), op, null, posInRef,ce.getLength(),null));
            					posInRef+=ce.getLength();
            					break;
            					}
            				case P:
            					{
            					M.add(new CigarAndBase(newSelection.getReferenceName(), op, null, null,ce.getLength(),null));
            					break;
            					}
            				case I:
            					{
            					for(int i=0;i< ce.getLength();++i)
    	                			{
                					M.add(new CigarAndBase(null, op, posInRead, null,1,
                							readString==null || posInRead>=readString.length?null:readString[posInRead]
                							));
                					posInRead++;
    	                			}
            					break;
            					}
            				case M: case X: case EQ: case S:
            					{
            					for(int i=0;i< ce.getLength();++i)
    	                			{
                					M.add(new CigarAndBase(newSelection.getReferenceName(), op, posInRead, posInRef,1,
                							readString==null || posInRead>=readString.length?null:readString[posInRead]
                							));
                					posInRead++;
                					posInRef++;
    	                			}
            					break;
            					}
            				}
                		}

            		cigarTable.getItems().setAll(M);
            		}
            	else
            		{
            		cigarTable.getItems().clear();
            		cigarElementTable.getItems().clear();
            		}
            	}
        });

        split2.setDividerPositions(0.1f, 0.6f, 0.9f);
        tab.setContent(split1);

        this.pileupTable = createPileupTable();
        tab=new Tab("Pileup",this.pileupTable);
        tab.setClosable(false);
        tabbedPane.getTabs().add(tab);

        tab=new Tab("Header");
        tab.setClosable(false);
        tabbedPane.getTabs().add(tab);
        final StringWriter headerTextBuffer = new StringWriter();
        new SAMTextHeaderCodec().encode(headerTextBuffer, bamFile.getHeader());
        final TextArea textAreaHeader =new TextArea(headerTextBuffer.toString());
        textAreaHeader.setEditable(false);

        ScrollPane scroll = new ScrollPane(textAreaHeader);
        scroll.setFitToHeight(true);
        scroll.setFitToWidth(true);
        tab.setContent(scroll);

        tabbedPane.getTabs().add(buildDictTab(  bamFile.getHeader().getSequenceDictionary()));
        tabbedPane.getTabs().add(createReadGroupPane(bamFile.getHeader()));
        tabbedPane.getTabs().add(createProgramRecordPane(bamFile.getHeader()));
        tabbedPane.getTabs().add(buildJavascriptPane());

        /* CANVAS STUFFF */
        this.canvas = new ResizableCanvas(900, 300)
			{
			public void repaintCanvas()
				{
				BamStage.this.repaintCanvas();
				}
			};
        final BorderPane canvasPane = new BorderPane(this.canvas);
        canvasPane.setPadding(new Insets(10));
        this.canvasScrollHGenomicLoc.setOrientation(Orientation.HORIZONTAL);
        canvasPan


 the
   * inserted stuff would be before the replace range. But, if you
   * add tokens in front of a method body '{' and then delete the method
   * body, I think the stuff before the '{' you added should disappear too.
   *
   * Return a map from token index to operation.
   */
  protected fun reduceToSingleOperationPerIndex(rewrites: MutableList<RewriteOperation?>): MutableMap<Int, RewriteOperation> {
    // WALK REPLACES
    for (i in rewrites.indices) {
      val op = rewrites[i]

      if (op !is ReplaceOp) {
        continue
      }

      // TODO(Edoardo): why are we picking again from the list? Just use 'op'
      val rop = rewrites[i] as ReplaceOp

      // Wipe prior inserts within range
      val inserts = getKindOfOps<InsertBeforeOp>(rewrites, InsertBeforeOp::class, i)

      for (iop in inserts) {
        if (iop.index == rop.index) {
          // E.g., insert before 2, delete 2..2; update replace
          // text to include insert before, kill insert
          rewrites[iop.instructionIndex] = null
          rop.text = iop.text!!.toString() + if (rop.text != null) rop.text!!.toString() else ""
        } else if (iop.index > rop.index && iop.index <= rop.lastIndex) {
          // Delete insert as it's a no-op
          rewrites[iop.instructionIndex] = null
        }
      }

      // Drop any prior replaces contained within
      val prevReplaces = getKindOfOps<ReplaceOp>(rewrites, ReplaceOp::class, i)

      for (prevRop in prevReplaces) {
        if (prevRop.index >= rop.index && prevRop.lastIndex <= rop.lastIndex) {
          // Delete replace as it's a no-op
          rewrites[prevRop.instructionIndex] = null
          continue
        }

        // Throw exception unless disjoint or identical
        val disjoint = prevRop.lastIndex < rop.index || prevRop.index > rop.lastIndex

        // Delete special case of replace (text==null):
        // D.i-j.u D.x-y.v	| boundaries overlap	combine to max(min)..max(right)
        if (prevRop.text == null && rop.text == null && !disjoint) {
          // Kill first delete
          rewrites[prevRop.instructionIndex] = null
          rop.index = min(prevRop.index, rop.index)
          rop.lastIndex = max(prevRop.lastIndex, rop.lastIndex)
          System.out.println("new rop $rop")
        } else if (!disjoint) {
          throw IllegalArgumentException("replace op boundaries of $rop overlap with previous $prevRop")
        }
      }
    }

    // WALK INSERTS
    for (i in rewrites.indices) {
      val op = rewrites[i]

      if (op !is InsertBeforeOp) {
        continue
      }

      // TODO(Edoardo): why are we picking again from the list? Just use 'op'
      val iop = rewrites[i] as InsertBeforeOp

      // Combine current insert with prior if any at same index
      val prevInserts = getKindOfOps<InsertBeforeOp>(rewrites, InsertBeforeOp::class, i)

      for (prevIop in prevInserts) {
        if (prevIop.index == iop.index) {
          @Suppress("USELESS_IS_CHECK")
          if (prevIop is InsertAfterOp) {
            iop.text = catOpText(prevIop.text, iop.text)
            rewrites[prevIop.instructionIndex] = null
          } else if (prevIop is InsertBeforeOp) {
            // Combine objects.
            // Convert to strings... We're in process of toString'ing
            // whole token bu


ex2].ClearEverything();
          }
        }
      }
    }

    public class ScatterCustom : GenPass
    {
      private GenBase.CustomPerUnitAction _perUnit;
      private int _count;

      public ScatterCustom(
        string name,
        float loadWeight,
        int count,
        GenBase.CustomPerUnitAction perUnit = null)
        : base(name, loadWeight)
      {
        this._perUnit = perUnit;
        this._count = count;
      }

      public void SetCustomAction(GenBase.CustomPerUnitAction perUnit)
      {
        this._perUnit = perUnit;
      }

      protected override void ApplyPass(
        GenerationProgress progress,
        GameConfiguration configuration)
      {
        int count = this._count;
        while (count > 0)
        {
          if (this._perUnit(GenBase._random.Next(1, GenBase._worldWidth), GenBase._random.Next(1, GenBase._worldHeight), new object[0]))
            --count;
        }
      }
    }
  }
}


	/* phandle fixup test */
	subtree = dt_new_root("subtree");
	ev1 = dt_new(subtree, "ev@1");
	ev1_ph = ev1->phandle;
	dt_new(ev1,"a@1");
	dt_new(ev1,"a@2");
	dt_new(ev1,"a@3");
	ut1 = dt_new(subtree, "ut@1");
	dt_add_property(ut1, "something", (const void *)&ev1->phandle, 4);
	ut2 = dt_new(subtree, "ut@2");
	dt_add_property(ut2, "something", (const void *)&ev1->phandle, 4);

	dt_adjust_subtree_phandle(subtree, props_to_fix);
	assert(!(ev1->phandle == ev1_ph));
	new_prop_ph = dt_prop_get_u32(ut1, "something");
	assert(!(new_prop_ph == ev1_ph));
	new_prop_ph = dt_prop_get_u32(ut2, "something");
	assert(!(new_prop_ph == ev1_ph));
	dt_free(subtree);
	return 0;
}


) => {
//     const input: any = target;
//     let className: string;
//     if ("prototype" in input) {
//       className = input.prototype.constructor.name;
//     } else {
//       className = input.constructor.name;
//     }
//     let metadata = Reflect.getMetadata(METADATAKEY, target);
//     if (!metadata) {
//       metadata = [];
//     }
//     metadata.push({
//       property: className,
//       type: "UseMongoCollection",
//       value: collection });
//     Reflect.defineMetadata(METADATAKEY, metadata, target);
//   };
// }

export const METADATAKEY = "tsvalidate:validators";

export function ValidateType(objectType?: any|any[]) {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.IS_TYPED, objectType);
  };
}

export function IsInt() {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.IS_INT);
  };
}

export function IsFloat() {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.IS_FLOAT);
  };
}

export function IsDecimal() {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.IS_DECIMAL);
  };
}

export function MaxLen(value: number) {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.MAX_LEN, value);
  };
}

export function MinLen(value: number) {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.MIN_LEN, value);
  };
}

export function MaxByteLen(value: number) {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.MAX_BYTE_LEN, value);
  };
}

export function MinByteLen(value: number) {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.MIN_BYTE_LEN, value);
  };
}

export function MaxValue(value: number) {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.MAX_VALUE, value);
  };
}

export function MinValue(value: number) {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.MIN_VALUE, value);
  };
}

export function DateBefore(value) {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.DATE_BEFORE, value);
  };
}

export function DateAfter(value) {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.DATE_AFTER, value);
  };
}

export function Equals(value) {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.EQUALS, value);
  };
}

export function Uppercase() {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.UPPERCASE);
  };
}

export function Lowercase() {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.LOWERCASE);
  };
}

export function MultipleOf(value: number) {
  return (target: any, propertyName: string) => {
    BasicDecorator(target, propertyName, DecoratorTypes.MULTIPLE_OF, value);
  };
}


()

		buffer := provider.buffer.(*logBuffer)

		for i := 0; i < 100; i++ {
			buffer.Enqueue(big.NewInt(1), logpoller.Log{BlockNumber: int64(i + 1), TxHash: common.HexToHash(fmt.Sprintf("0x1%d", i+1)), LogIndex: 0})
			buffer.Enqueue(big.NewInt(2), logpoller.Log{BlockNumber: int64(i + 1), TxHash: common.HexToHash(fmt.Sprintf("0x2%d", i+1)), LogIndex: 0})
		}

		assert.Equal(t, 100, countRemainingLogs(buffer.queues["1"].logs))
		assert.Equal(t, 100, countRemainingLogs(buffer.queues["2"].logs))

		payloads, err := provider.GetLatestPayloads(ctx)
		assert.NoError(t, err)
		assert.Len(t, payloads, 100)

		assert.Equal(t, 50, countRemainingLogs(buffer.queues["1"].logs))
		assert.Equal(t, 50, countRemainingLogs(buffer.queues["2"].logs))

		windowCount := remainingBlockWindowCounts(buffer.queues, 4)

		assert.Equal(t, 2, windowCount[0])
		assert.Equal(t, 4, windowCount[48])
		assert.Equal(t, 4, windowCount[96])

		// the second dequeue call will retrieve the remaining 100 logs and exhaust the queues
		payloads, err = provider.GetLatestPayloads(ctx)
		assert.NoError(t, err)
		assert.Len(t, payloads, 100)

		assert.Equal(t, 0, countRemainingLogs(buffer.queues["1"].logs))
		assert.Equal(t, 0, countRemainingLogs(buffer.queues["2"].logs))

		windowCount = remainingBlockWindowCounts(buffer.queues, 4)

		assert.Equal(t, 0, windowCount[0])
		assert.Equal(t, 0, windowCount[48])
		assert.Equal(t, 0, windowCount[96])
	})

	t.Run("minimum guaranteed for all windows including an incomplete window followed by best effort", func(t *testing.T) {
		opts := NewOptions(200, big.NewInt(42161))

		logPoller := &mockLogPoller{
			LatestBlockFn: func(ctx context.Context) (int64, error) {
				return 102, nil
			},
		}

		provider := NewLogProvider(logger.TestLogger(t), logPoller, big.NewInt(42161), &mockedPacker{}, nil, opts)

		ctx := context.Background()

		buffer := provider.buffer.(*logBuffer)

		for i := 0; i < 102; i++ {
			buffer.Enqueue(big.NewInt(1), logpoller.Log{BlockNumber: int64(i + 1), TxHash: common.HexToHash(fmt.Sprintf("0x1%d", i+1)), LogIndex: 0})
			buffer.Enqueue(big.NewInt(2), logpoller.Log{BlockNumber: int64(i + 1), TxHash: common.HexToHash(fmt.Sprintf("0x2%d", i+1)), LogIndex: 0})
		}

		assert.Equal(t, 102, countRemainingLogs(buffer.queues["1"].logs))
		assert.Equal(t, 102, countRemainingLogs(buffer.queues["2"].logs))

		payloads, err := provider.GetLatestPayloads(ctx)
		assert.NoError(t, err)
		assert.Len(t, payloads, 100)

		windowCount := remainingBlockWindowCounts(buffer.queues, 4)

		assert.Equal(t, 6, windowCount[100])

		payloads, err = provider.GetLatestPayloads(ctx)
		assert.NoError(t, err)
		assert.Len(t, payloads, 100)

		// upkeep 1 has had the minimum number of logs dequeued on the latest (incomplete) window
		assert.Equal(t,