 0 0 repeat-x;
}

.cnn_stryspcvh1 {
height: 96px;
overflow: hidden;
}

.cnn_stryspcvh2 {
font: bold 10px/12px arial;
color: #666;
padding: 0 0 2px;
}

.cnn_stryspcvh3 {
font: bold 18px/21px arial;
}

.cnn_stryspcvh4 {
float: left;
margin: 30px 0 0 10px;
display: inline;
}

.cnn_stryspcvh5 {
float: right;
margin: 30px 10px 0 0;
display: inline;
text-align: right;
}

.cnn_stryspcvh20 {
padding: 0 0 2px;
}

.cnn_stryspcvh2 .cnn_adspc155x31 {
padding: 8px 0 0;
}

.cnn_adspcggl607 {
border: 1px solid #e6e6e6;
margin-bottom: 20px;
}

.cnn_adspcggl607 .cnnTextAdTitle {
font: bold 12px/15px arial;
height: 26px;
}

.cnn_adspcggl607 .cnn585AdHolder {
height: 93px;
font: normal 11px/13px arial;
}

.cnn_adspcggl607 .cnnHtAdvertTitle {
font-weight: 700;
}

.cnn_adspcggl607 .cnnTextAd1,
.cnn_adspcggl607 .cnnTextAd2,
.cnn_adspcggl607 .cnnTextAd3 {
float: left;
display: inline;
margin: 7px 0 0;
width: 186px;
overflow: hidden;
}

.cnn_adspcggl607 .cnnTextAd1 {
margin: 7px 12px 0 10px;
}

.cnn_adspcggl607 .cnnTextAd2 {
margin: 7px 12px 0 0;
}

.cnn_adspcggl607 .cnnTextAd2 .cnnTextAdPad,
.cnn_adspcggl607 .cnnTextAd3 .cnnTextAdPad {
padding: 26px 0 0;
}

.cnn_stryvalnbtn,
.cnn_strymrebtn {
background: transparent url(http://i.cdn.turner.com/cnn/.e/img/3.0/mosaic/SPRITE_story_bt.gif) 0 -106px no-repeat;
}

.cnn_stryvalnbtn {
display: block;
height: 17px;
width: 126px;
}

.cnn_stryvalnbtn img {
height: 17px;
width: 126px;
}

.cnn_stryvalnbtn:hover {
background-position: 0 -143px;
}

.cnn_strymrebtn {
display: block;
height: 23px;
width: 284px;
background-position: 0 -20px;
}

.cnn_strymrebtn img {
height: 23px;
width: 284px;
}

.cnn_strymrebtn:hover {
background-position: 0 -63px;
}

.cnn_stryspcvh6 {
padding: 0 0 0 20px;
height: 70px;
overflow: hidden;
}

.cnn_stryspcvh6 .cnn_stryspcvh2 {
padding-top: 12px;
}

.cnn_stryspcvbx {
position: relative;
border-top: 1px solid #e6e6e6;
margin: 0 20px;
}

.cnn_stryspcvbx_on {
background: #d4d4d4 url(http://i.cdn.turner.com/cnn/.e/img/3.0/mosaic/


tor="voltage" }
Number Phase1RealPower { openenergymonitor="phase1RealPower" }
Number Phase1ApparentPower { openenergymonitor="phase1ApparentPower" }
Number Phase1Current { openenergymonitor="phase1Current:JS(divideby100.js)" }
Number Phase1PowerFactor { openenergymonitor="phase1PowerFactor" }
Number Phase2RealPower { openenergymonitor="phase2RealPower" }
Number Phase2ApparentPower { openenergymonitor="phase2ApparentPower" }
Number Phase2Current { openenergymonitor="phase2Current:JS(divideby100.js)" }
Number Phase2PowerFactor { openenergymonitor="phase2PowerFactor" }
Number Phase3RealPower { openenergymonitor="phase3RealPower" }
Number Phase3ApparentPower { openenergymonitor="phase3ApparentPower" }
Number Phase3Current { openenergymonitor="phase3Current / 100" }
Number Phase3PowerFactor { openenergymonitor="phase3PowerFactor" }
Number PulseEnergy { openenergymonitor="cumulative(pulseCount):JS(divideby5000.js)" }
Number PulsePower { openenergymonitor="pulsePower" }
Number Phase123RealPower { openenergymonitor="phase1RealPower+phase2RealPower+phase3RealPower" }
Number Phase123Current { openenergymonitor="phase1Current+phase2Current+phase3Current:JS(divideby100.js)" }
```
## HDanywhere Binding

[HDanywhere](http://www.hdanywhere.co.uk) is a manufacturer of multiroom/distributed audio/video equipment. This binding supports their V3 of the Multiroom+ HDMI matrix running firmware V1.2(20131222). These matrices support the highest HD resolutions, including 1080p 3D & 4K, use a single Cat5e/6/7 wiring structure with reliable performance up to 100m, have IR passback to allow you to select and control what you watch from every room and are fully compatible with universal remote controls.

The matrixes can be controlled by either UDP/IP and/or Serial connections, but due to the lack of feedback on the actual state of the HDMI matrix when using those methods, this binding operates by controlling the built-in webserver of the matrix.

## Binding Configuration

This binding can be configured in the file `services/hdanywhere.cfg`.

A binding configuration with multiple configuration parts would typically be used to control multiple output ports at the same time, e.g. have the switch together to the same HDMI source port.

Furthermore, in openhab.cfg the

| Property | Default | Required | Description |
|----------|---------|:--------:|-------------|
| ports    | 4       |    No    | number of input ports/output ports if different from 4 (e.g. 8 for the 8x8 matrix) |

## Item Configuration

The format of the binding configuration is simple and looks like this:

```
hdanywhere="[<IP address>:<port number>:<polling interval>], [<IP address>:<port number>:<polling interval>], ..."
```

Where:

* `<IP address>` corresponds with the IP address of the HDMI matrix
* `<port number>` corresponds with the output port number on the matrix
* `<polling Interval>` is the interval in seconds to poll state of the given port

## HDanywhere Items

The HDanywhere matrix is very simple device. Since it is all about assigning a source HDMI port to an output port only Number Items are used/allowed to control the matrix. You feed it the source port number you want it


ateSingleton()
    {
        if (MSettings.Instance?.AddRealTimeClock == true)
        {
            lastEnabled = true;

            var format = MSettings.Instance.Clock24 ? "HH:mm" : "hh:mmtt";
            lblRealTime.text = DateTime.Now.ToString(format);

            lblRealTime.ToggleDisplayStyle(true);
            icon.ToggleDisplayStyle(false);
        }
        else if (lastEnabled)
        {
            lastEnabled = false;
            lblRealTime.ToggleDisplayStyle(false);
            icon.ToggleDisplayStyle(true);
        }
    }

}


 bug in the line/column number tracking for Mac OS 9 linebreaks

## 1.18.0 (2021-06-19)

- Fixes a bug in the line/column number tracking when parsing optional newlines

## 1.17.0 (2021-04-18)

- Improves the performance of line/column number tracking (contributed by @brendo-m)

## 1.16.0 (2020-08-25)

- Fixes a crash in MS Edge 15-18 when using `Parsimmon.regexp` (thanks @ekilah)

## 1.15.0 (2020-07-27)

- Adds support for the `s` (`dotAll`) flag in `Parsimmon.regexp`

## 1.14.0 (2020-07-08)

- Improves peformance of `parser.mark`, `parser.node`, and `Parsimmon.index`
- Improves performance of `many` and `times`

## 1.13.0 (2019-07-25)

- Adds `parser.assert(condition, message)`

## 1.12.1 (2019-07-07)

- Adds links within documentation
- Fixes standalone browser version to not crash on load because Buffer is not defined

## 1.12.0 (2018-07-12)

- Adds `Parsimmon.Binary.buffer(length)`
- Adds `Parsimmon.Binary.encodedString(encoding, length)`
- Adds `Parsimmon.Binary.uintBE(length)`
- Adds `Parsimmon.Binary.intBE(length)`
- Adds `Parsimmon.Binary.uintLE(length)`
- Adds `Parsimmon.Binary.intLE(length)`
- Adds `Parsimmon.Binary.uint8`
- Adds `Parsimmon.Binary.int8`
- Adds `Parsimmon.Binary.uint16BE`
- Adds `Parsimmon.Binary.uint16LE`
- Adds `Parsimmon.Binary.int16LE`
- Adds `Parsimmon.Binary.int16BE`
- Adds `Parsimmon.Binary.uint32BE`
- Adds `Parsimmon.Binary.uint32LE`
- Adds `Parsimmon.Binary.int32LE`
- Adds `Parsimmon.Binary.int32BE`
- Adds `Parsimmon.Binary.floatBE`
- Adds `Parsimmon.Binary.floatLE`
- Adds `Parsimmon.Binary.doubleBE`
- Adds `Parsimmon.Binary.doubleLE`

## 1.11.1 (2018-06-27)

- Fixes a bug where the error indicator (`^^`) was misaligned on the fifth byte
  in a given visual line for a binary parse error message

## 1.11.0 (2018-06-23)

- Drastically improves error message formatting for `.tryParse` and
  `.formatError` by showing a full preview of the input with surrounding
  context, pointing directly at the error (works for both string and Buffer
  parsers)

## 1.10.0 (2018-06-17)

- Adds `parser.contramap(fn)` and `parser.promap(fn)`

## 1.9.0 (2018-06-15)

- Adds `parser.desc(array)` signature and `Parsimmon.makeFailure(index, array)`
  signature to support starting with an array of expectations

## 1.8.0 (2018-06-04)

- Adds `parser.tieWith(separator)`, a generalized version of `parser.tie()`

## 1.7.3 (2018-04-22)

- Shrinks UMD build from ~33 kb to ~11 kb

## 1.7.2 (2018-04-05)

- Fixes a bug where `seqObj` and `bitSeqObj` wouldn't work with keys that were
  already part of `Object.prototype`

## 1.7.1 (2018-03-22)

- Fixes a bug where `bitSeq` consumed the wrong input

## 1.7.0 (2018-03-10)

- Adds support for bina


pt.json');
const LogNoteEventProp = require('../fixtures/LogNoteEventProp.json');
const TransactionReceipt = require('../fixtures/TransactionReceipt.json');
const AmalfiDepositTransaction = require('../fixtures/AmalfiDepositTransaction.json');
const AmalfiContract = require('../fixtures/AmalfiContract.json');
const TransactionTransfer = require('../fixtures/TransactionTransfer.json');
const SyncEvent = require('../fixtures/SyncEvent.json');

describe('getV2PoolReserves', () => {
    it('Should return the reserves', () => {
        expect(getV2PoolReserves(SyncEvent)).toEqual({ reserve0: '999671367819237062401644', reserve1: '20247201855330962943989954' });
    });
});

describe('findAbiForFunction', () => {
    it('Should return erc721 abi if the signature matches one of its function', () => {
        expect(findAbiForFunction('0xe985e9c5')).toEqual(ERC_721_ABI);
    });

    it('Should return erc20 abi if the signature matches one of its function', () => {
        expect(findAbiForFunction('0x18160ddd')).toEqual(ERC_20_ABI);
    });

    it('Should not return anything if it does not match', () => {
        expect(findAbiForFunction('0x1')).toEqual(undefined);
    });
});

describe('decodeLog', () => {
    it('Should decode the event if it is not anonymous', () => {
        expect(decodeLog(LogProp, ABIProp)).toMatchSnapshot();
    });

    it('Should decode the event if it is anonymous', () => {
        expect(decodeLog(LogNoteEventProp, DSProxyContract.abi)).toMatchSnapshot();
    });
});

describe('getTokenTransfer', () => {
    it('Should return decoded erc721 transfer', () => {
        expect(getTokenTransfer(ERC721TransferReceipt.logs[1])).toMatchSnapshot();
    });

    it('Should return decoded erc20 transfer', () => {
        expect(getTokenTransfer(TransactionReceipt.logs[0])).toMatchSnapshot();
    });

    it('Should return null', () => {
        expect(getTokenTransfer(AmalfiDepositTransaction.receipt.logs[0])).toEqual(null);
    });
});

describe('getTransactionMethodDetails', () => {
    it('Should return a sighash if there is data but no contract abi', () => {
        expect(getTransactionMethodDetails({ data: '0x12345678910' }, null)).toEqual({
            sighash: '0x12345678'
        });
    });

    it('Should return erc20 abi if the tx called one', () => {
        expect(getTransactionMethodDetails(TransactionTransfer)).toEqual({
            label: `transfer(\n\taddress dst: 0x0f71271b3611f99B6867B95eDA4d203F0a913972,\n\tuint256 rawAmount: 2274999999652000020000\n)`,
            name: 'transfer',
            signature: 'transfer(address dst, uint256 rawAmount)'
        });
    });

    it('Should return an object with formatted data about the tx', () => {
        expect(getTransactionMethodDetails(AmalfiDepositTransaction, AmalfiContract.artifact.abi)).toEqual({
            label: 'deposit(address payee: 0x1291Be112d480055DaFd8a610b7d1e203891C274)',
            name: 'deposit',
            signature: 'deposit(address payee)'
        });
    });
});require('../mocks/lib/firebase');
require('../mocks/models');
require('../mocks/lib/rpc');
require('../mocks/lib/queue');
jest.mock('axios');

const axios = require('axios');
const { ERC721Connector } = require('../../lib/rpc');
const db = require('../../lib/firebase');

const reloadErc721Token = require('../../jobs/reloadErc721Token');

beforeEach(() => jest.clearAllMocks());

describe('reloadErc721Token', () => {


NoInline
  private void start(GenerationContext context) {
    gc = context;
    // To use the following you need to change the declarations
    // above the constructor
    if (DBG_SELECTIVE) {
      VM.sysWrite("Whoops! you need to uncomment the assignment to DBG_SELECTED");
//      DBG_SELECTED = gc.methodIsSelectedForDebuggingWithMethodToPrint();
    }

    if (context.getMethod().isForOsrSpecialization()) {
      bcodes = context.getMethod().getOsrSynthesizedBytecodes();
    } else {
      bcodes = context.getMethod().getBytecodes();
    }

    // initialize the local state from context.arguments
    _localState = new Operand[context.getMethod().getLocalWords()];

    if (context.getMethod().isForOsrSpecialization()) {
      this.bciAdjustment = context.getMethod().getOsrPrologueLength();
    } else {
      this.bciAdjustment = 0;
    }

    this.osrGuardedInline = VM.runningVM &&
       context.getOptions().OSR_GUARDED_INLINING &&
       !context.getMethod().isForOsrSpecialization() &&
       OptimizingCompiler.getAppStarted() &&
       (Controller.options != null) &&
       Controller.options.ENABLE_RECOMPILATION;
  }

  private void finish(GenerationContext context) {
    // Initialize simulated stack.
    stack = new OperandStack(context.getMethod().getOperandWords());
    // Initialize BBSet.
    blocks = new BBSet(context, bcodes, _localState);
    // Finish preparing to generate from bytecode 0
    currentBBLE = blocks.getEntry();
    gc.getPrologue().insertOut(currentBBLE.block);
    if (DBG_CFG || DBG_SELECTED) {
      db("Added CFG edge from " + gc.getPrologue() + " to " + currentBBLE.block);
    }
    runoff = currentBBLE.max;
  }

  /**
   * Main generation loop.
   */
  private void generateHIR() {
    // Constructor initialized generation state to start
    // generating from bytecode 0, so get the ball rolling.
    if (DBG_BB || DBG_SELECTED) db("bbl: " + printBlocks());
    generateFrom(0);
    // While there are more blocks that need it, pick one and generate it.
    for (currentBBLE = blocks.getNextEmptyBlock(currentBBLE); currentBBLE != null; currentBBLE =
        blocks.getNextEmptyBlock(currentBBLE)) {
      // Found a block. Set the generation state appropriately.
      currentBBLE.clearSelfRegen();
      runoff = Math.min(blocks.getNextBlockBytecodeIndex(currentBBLE), currentBBLE.max);
      if (currentBBLE.stackState == null) {
        stack.clear();
      } else {
        stack = currentBBLE.stackState.deepCopy();
      }
      _localState = currentBBLE.copyLocalState();
      if (DBG_BB || DBG_SELECTED) db("bbl: " + printBlocks());
      // Generate it!
      generateFrom(currentBBLE.low);
    }
    // Construct initial code order, commit to recursive inlines,
    // insert any synthetic blocks.
    if (DBG_BB || DBG_SELECTED) db("doing final pass over basic blocks: " + printBlocks());
    blocks.finalPass(inlinedSomething);
  }

  // pops the length off the stack
  //
  public Instruction generateAnewarray(TypeReference arrayTypeRef, TypeReference elementTypeRef) {
    if (arrayTypeRef == null) {
      if (VM.VerifyAssertions) opt_assert(elementTypeRef != null);
      arrayTypeRef = elementTypeRef.getArrayTypeForElementType();
    }
    if (elementTypeRef == null) {
      elementTypeRef = arrayTypeRef.getArrayElementType();
    }

    RegisterOperand


     {
                    ProcessThreadInfo info = new ProcessThreadInfo();
                    info.PID = PID;

                    try{info.ID = thread.Id;}catch{}
                    try {info.WaitReason = thread.WaitReason.ToString(); }catch { }
                    try {info.Pritioity = (thread.PriorityBoostEnabled ? (byte)1 : (byte)0); }catch { }
                    try {info.PrivilegedProcessorTime = thread.PrivilegedProcessorTime.ToString(); }catch { }
                    try { info.StartTime = thread.StartTime.ToString();}catch { }
                    try { info.Threadstate = thread.ThreadState.ToString(); }catch { }

                    Client.SendPacket(new S_GetProcessThreads(Client, info));
                }
            }catch{}
        }
    }
}


/*=========================================================================
  *
  * Program:      Sen2agri-Processors
  * Language:     C++
  * Copyright:    2015-2016, CS Romania, office@c-s.ro
  * See COPYRIGHT file for details.
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.

 =========================================================================*/

/*=========================================================================
  Program:   otb-bv
  Language:  C++

  Copyright (c) CESBIO. All rights reserved.

  See otb-bv-copyright.txt for details.

  This software is distributed WITHOUT ANY WARRANTY; without even
  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
#ifndef __OTBBVTYPES_H
#define __OTBBVTYPES_H

#include <map>

namespace otb
{
namespace Wrapper
{
namespace Tags
{
static const std::string BV="Biophysical Variables";
}
}

enum class IVNames {MLAI, ALA, CrownCover, HsD, N, Cab, Car, Cdm, CwRel, Cbp,
                    Bs, IVNamesEnd};
enum AcquisitionParameters {TTS, TTO, PSI, TTS_FAPAR, AcquisitionParametersEnd};

using AcquisitionParsType = std::map< AcquisitionParameters, double >;
using PrecisionType = double;
using BVType = std::map< IVNames, PrecisionType >;

using NormalizationVectorType =
  std::vector<std::pair<PrecisionType, PrecisionType>>;
}
#endif


 = struct(Module.VULKAN, "VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM", alias = _VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT) {
    Expression("#STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT")..VkStructureType("sType")
    nullable..opaque_p("pNext")
    VkBool32("rasterizationOrderColorAttachmentAccess")
    VkBool32("rasterizationOrderDepthAttachmentAccess")
    VkBool32("rasterizationOrderStencilAttachmentAccess")
}

val VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT = struct(Module.VULKAN, "VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT") {
    Expression("#STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT")..VkStructureType("sType")
    nullable..opaque_p("pNext")
    VkBool32("formatRgba10x6WithoutYCbCrSampler")
}

val VkDirectFBSurfaceCreateInfoEXT = struct(Module.VULKAN, "VkDirectFBSurfaceCreateInfoEXT") {
    Expression("#STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT")..VkStructureType("sType")
    nullable..opaque_const_p("pNext")
    VkDirectFBSurfaceCreateFlagsEXT("flags")
    nullable..IDirectFB.p("dfb")
    nullable..IDirectFBSurface.p("surface")
}

val _VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT = struct(Module.VULKAN, "VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT")
val VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE = struct(Module.VULKAN, "VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE", alias = _VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT) {
    Expression("#STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT")..VkStructureType("sType")
    nullable..opaque_p("pNext")
    VkBool32("mutableDescriptorType")
}

val _VkMutableDescriptorTypeListEXT = struct(Module.VULKAN, "VkMutableDescriptorTypeListEXT")
val VkMutableDescriptorTypeListVALVE = struct(Module.VULKAN, "VkMutableDescriptorTypeListVALVE", alias = _VkMutableDescriptorTypeListEXT) {
    AutoSize("pDescriptorTypes", optional = true)..uint32_t("descriptorTypeCount")
    VkDescriptorType.const.p("pDescriptorTypes")
}

val VkMutableDescriptorTypeListEXT = struct(Module.VULKAN, "VkMutableDescriptorTypeListEXT") {
    AutoSize("pDescriptorTypes", optional = true)..uint32_t("descriptorTypeCount")
    VkDescriptorType.const.p("pDescriptorTypes")
}

val _VkMutableDescriptorTypeCreateInfoEXT = struct(Module.VULKAN, "VkMutableDescriptorTypeCreateInfoEXT")
val VkMutableDescriptorTypeCreateInfoVALVE = struct(Module.VULKAN, "VkMutableDescriptorTypeCreateInfoVALVE", alias = _VkMutableDescriptorTypeCreateInfoEXT) {
    Expression("#STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT")..VkStructureType("sType")
    nullable..opaque_const_p("pNext")
    AutoSize("pMutableDescriptorTypeLists", optional = true)..uint32_t("mutableDescriptorTypeListCount")
    VkMutableDescriptorTypeListEXT.const.p("pMutableDescriptorTypeLists")
}

val VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT = struct(Module.VULKAN, "VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT") {
    Expression("#STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAM


//! Adapted from https://wiki.osdev.org/8259_PIC

use crate::cpu::{inb, outb, io_wait};

const PIC1: u16 = 0x20; // IO base address for master PIC
const PIC2: u16 = 0xA0; // IO base address for slave PIC
const PIC1_COMMAND: u16 = PIC1;
const PIC1_DATA: u16 = PIC1 + 1;
const PIC2_COMMAND: u16 = PIC2;
const PIC2_DATA: u16 = PIC2 + 1;
const PIC_EOI: u8 = 0x20; // End-of-interrupt command code

const ICW1_ICW4: u8 = 0x01; // ICW4 (not) needed
const ICW1_SINGLE: u8 = 0x02; // Single (cascade) mode
const ICW1_INTERVAL4: u8 = 0x04; // Call address interval 4 (8)
const ICW1_LEVEL: u8 = 0x08; // Level triggered (edge) mode
const ICW1_INIT: u8 = 0x10; // Initialization - required!

const ICW4_8086: u8 = 0x01; // 8086/88 (MCS-80/85) mode
const ICW4_AUTO: u8 = 0x02; // Auto (normal) EOI
const ICW4_BUF_SLAVE: u8 = 0x08; // Buffered mode/slave
const ICW4_BUF_MASTER: u8 = 0x0C; // Buffered mode/master
const ICW4_SFNM: u8 = 0x10; // Special fully nested (not)

/// End of input command for PIC1
pub fn pic1_eoi() {
    outb(PIC1_COMMAND, PIC_EOI);
}

/// End of input command for PIC1
pub fn pic2_eoi() {
    outb(PIC2_COMMAND, PIC_EOI);
}

/// Remap interrupt vectors
pub fn remap_int(offset1: u8, offset2: u8) {
    unsafe {
        // Save interrupt masks
        let pic1_mask = inb(PIC1_DATA);
        let pic2_mask = inb(PIC2_DATA);

        // starts the initialization sequence (in cascade mode)
        outb(PIC1_COMMAND, ICW1_INIT | ICW1_ICW4);
        io_wait();
        outb(PIC2_COMMAND, ICW1_INIT | ICW1_ICW4);
        io_wait();

        // ICW2: Master PIC vector offset
        outb(PIC1_DATA, offset1);
        io_wait();

        // ICW2: Slave PIC vector offset
        outb(PIC2_DATA, offset2);
        io_wait();

        // ICW3: tell Master PIC that there is a slave PIC at IRQ2 (0000 0100)
        outb(PIC1_DATA, 4);
        io_wait();
        // ICW3: tell Slave PIC its cascade identity (0000 0010)
        outb(PIC2_DATA, 2);
        io_wait();

        outb(PIC1_DATA, ICW4_8086);
        io_wait();
        outb(PIC2_DATA, ICW4_8086);
        io_wait();

        // Restore saved masks
        outb(PIC1_DATA, pic1_mask);
        outb(PIC2_DATA, pic2_mask);
    }
}
<reponame>DWiechert/rvm
pub mod reader;
pub mod classfile;
pub mod cp_info;
#[macro_use]
extern crate log;

use std::error::Error;
use std::fs::{self, File, create_dir_all, metadata};
use std::io::{Read, BufWriter, Write};
use std::path::Path;
use std::env::{current_dir, split_paths};
use std::collections::HashMap;

// Прочитать данные файла в буфер
pub fn read_file(path: &str) -> Result<Vec<u8>, String> {

    // Open the path in read-only mode
    let mut file = match File::open(&path) {
        Err(why) => {
            return Err(format!("Couldn't open: {}", Error::description(&why)));
        }
        Ok(file) => file,
    };

    let mut buffer: Vec<u8> = Vec::new();

    match file.read_to_end(&mut buffer) {
        Err


op, #5bc0de, #2f96b4);background-image:-ms-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-ms-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);filter:progid:dximagetransform.microsoft.gradient(enabled=false);}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4;}
.btn-info:active,.btn-info.active{background-color:#24748c \9;}
.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4;}
.btn-info:active,.btn-info.active{background-color:#24748c \9;}
.btn-inverse{background-color:#414141;background-image:-moz-linear-gradient(top, #555555, #222222);background-image:-ms-linear-gradient(top, #555555, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#222222));background-image:-webkit-linear-gradient(top, #555555, #222222);background-image:-o-linear-gradient(top, #555555, #222222);background-image:linear-gradient(top, #555555, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#555555', endColorstr='#222222', GradientType=0);background-color:#414141;background-image:-moz-linear-gradient(top, #555555, #222222);background-image:-ms-linear-gradient(top, #555555, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#222222));background-image:-webkit-linear-gradient(top, #555555, #222222);background-image:-o-linear-gradient(top, #555555, #222222);background-image:linear-gradient(top, #555555, #222222);background-repeat:repeat-x;filter:pro


b69d: 0x6ddce220, 0x3b69e: 0x6df4a620, 0x3b69f: 0x6df4a820,
	0x3b6a0: 0x6e08a020, 0x3b6a1: 0x6e08a220, 0x3b6a2: 0x6e08a420, 0x3b6a3: 0x6e08a620,
	0x3b6a4: 0x6e08a820, 0x3b6a5: 0x6e18ac20, 0x3b6a6: 0x6e18ae20, 0x3b6a7: 0x6e256620,
	0x3b6a8: 0x6e2efa20, 0x3b6a9: 0x6e2efc20, 0x3b6aa: 0x6e2efe20, 0x3b6ab: 0x6e365020,
	0x3b6ac: 0x6e365220, 0x3b6ad: 0x6e3b8020, 0x3b6ae: 0x6e3f2c20, 0x3b6af: 0x6e3f2e20,
	0x3b6b0: 0x6e41ba20, 0x3b6b1: 0x6e41bc20, 0x3b6b2: 0x6e438e20, 0x3b6b3: 0x6e45f020,
	0x3b6b4: 0x6ce84820, 0x3b6b5: 0x6ce84a20, 0x3b6b6: 0x6ce84c20, 0x3b6b7: 0x6ce84e20,
	0x3b6b8: 0x6ce85020, 0x3b6b9: 0x6d177c20, 0x3b6ba: 0x6d177e20, 0x3b6bb: 0x6d178020,
	0x3b6bc: 0x6d178220, 0x3b6bd: 0x6d178420, 0x3b6be: 0x6d178620, 0x3b6bf: 0x6d461620,
	// Block 0xedb, offset 0x3b6c0
	0x3b6c0: 0x6d461820, 0x3b6c1: 0x6d461a20, 0x3b6c2: 0x6d461c20, 0x3b6c3: 0x6d461e20,
	0x3b6c4: 0x6d462020, 0x3b6c5: 0x6d462220, 0x3b6c6: 0x6d462420, 0x3b6c7: 0x6d462620,
	0x3b6c8: 0x6d462820, 0x3b6c9: 0x6d462a20, 0x3b6ca: 0x6d462c20, 0x3b6cb: 0x6d462e20,
	0x3b6cc: 0x6d463020, 0x3b6cd: 0x6d463220, 0x3b6ce: 0x6d463420, 0x3b6cf: 0x6d463620,
	0x3b6d0: 0x6d463820, 0x3b6d1: 0x6d730420, 0x3b6d2: 0x6d730620, 0x3b6d3: 0x6d730820,
	0x3b6d4: 0x6d730a20, 0x3b6d5: 0x6d730c20, 0x3b6d6: 0x6d730e20, 0x3b6d7: 0x6d731020,
	0x3b6d8: 0x6d731220, 0x3b6d9: 0x6d731420, 0x3b6d


幻胧月睨(Lunatic_Red_Eyes)」.md" class="mw-redirect" title="「幻胧月睨(Lunatic Red Eyes)」">「幻胧月睨(Lunatic Red Eyes)」

东方花映塚

波符「月面波纹(Luna Wave)」 • 散符「荣华之梦(Luna Megalopolis)」

东方文花帖

散符「胧月花栞(Rocket in Mist)」 • 波符「幻之月(Invisible Half Moon)」 • 狂梦「疯狂的梦(Dream World)」

东方绀珠传

「障壁波动(Evil Undulation)」

	<img alt="铃仙（Q版立绘）.png" src="https://upload.thwiki.cc/thumb/e/ea/%E9%93%83%E4%BB%99%EF%BC%88Q%E7%89%88%E7%AB%8B%E7%BB%98%EF%BC%89.png/160px-%E9%93%83%E4%BB%99%EF%BC%88Q%E7%89%88%E7%AB%8B%E7%BB%98%EF%BC%89.png" decoding="async" loading="lazy" width="160" height="160" srcset="https://upload.thwiki.cc/thumb/e/ea/%E9%93%83%E4%BB%99%


map[int32][]RouteDescriptor),
			expectedReconcileQueue:  map[string]bool{},
		},
		{
			name:                    "filter only allows http route",
			acceptedKinds:           sets.New[RouteKind](HTTPRouteKind),
			expectedPreMappedRoutes: preLoadHTTPRoutes,
			expectedPreloadMap: map[int][]preLoadRouteDescriptor{
				80: preLoadHTTPRoutes,
			},
			expectedMap: map[int32][]RouteDescriptor{
				80: loadedHTTPRoutes,
			},
			expectedReconcileQueue: map[string]bool{
				"http1-http1-ns-HTTPRoute-gw-gw-ns": true,
				"http2-http2-ns-HTTPRoute-gw-gw-ns": true,
				"http3-http3-ns-HTTPRoute-gw-gw-ns": true,
			},
		},
		{
			name:                    "filter only allows http route, multiple ports",
			acceptedKinds:           sets.New[RouteKind](HTTPRouteKind),
			expectedPreMappedRoutes: preLoadHTTPRoutes,
			expectedPreloadMap: map[int][]preLoadRouteDescriptor{
				80:  preLoadHTTPRoutes,
				443: preLoadHTTPRoutes,
			},
			expectedMap: map[int32][]RouteDescriptor{
				80:  loadedHTTPRoutes,
				443: loadedHTTPRoutes,
			},
			expectedReconcileQueue: map[string]bool{
				"http1-http1-ns-HTTPRoute-gw-gw-ns": true,
				"http2-http2-ns-HTTPRoute-gw-gw-ns": true,
				"http3-http3-ns-HTTPRoute-gw-gw-ns": true,
			},
		},
		{
			name:                    "filter only allows tcp route",
			acceptedKinds:           sets.New[RouteKind](TCPRouteKind),
			expectedPreMappedRoutes: preLoadTCPRoutes,
			expectedPreloadMap: map[int][]preLoadRouteDescriptor{
				80: preLoadTCPRoutes,
			},
			expectedMap: map[int32][]RouteDescriptor{
				80: loadedTCPRoutes,
			},
			expectedReconcileQueue: map[string]bool{
				"tcp1-tcp1-ns-TCPRoute-gw-gw-ns": true,
				"tcp2-tcp2-ns-TCPRoute-gw-gw-ns": true,
				"tcp3-tcp3-ns-TCPRoute-gw-gw-ns": true,
			},
		},
		{
			name:                    "filter allows both route kinds",
			acceptedKinds:           sets.New[RouteKind](TCPRouteKind, HTTPRouteKind),
			expectedPreMappedRoutes: append(preLoadHTTPRoutes, preLoadTCPRoutes...),
			expectedPreloadMap: map[int][]preLoadRouteDescriptor{
				80:  preLoadTCPRoutes,
				443: preLoadHTTPRoutes,
			},
			expectedMap: map[int32][]RouteDescriptor{
				80:  loadedTCPRoutes,
				443: loadedHTTPRoutes,
			},
			expectedReconcileQueue: map[string]bool{
				"http1-http1-ns-HTTPRoute-gw-gw-ns": true,
				"http2-http2-ns-HTTPRoute-gw-gw-ns": true,
				"http3-http3-ns-HTTPRoute-gw-gw-ns": true,
				"tcp1-tcp1-ns-TCPRoute-gw-gw-ns":    true,
				"tcp2-tcp2-ns-TCPRoute-gw-gw-ns":    true,
				"tcp3-tcp3-ns-TCPRoute-gw-gw-ns":    true,
			},
		},
		{
			name:                    "failed route should lead


;
  border: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
}

div.wpforms-container .wpforms-form .choices__button:focus {
  outline: none;
}

div.wpforms-container .wpforms-form .choices__input {
  display: inline-block;
  background-color: transparent;
  margin: 0 0 2px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  min-height: 20px !important;
  padding: 2px 4px !important;
  height: auto !important;
  min-width: 1ch;
  width: 1ch;
  vertical-align: middle;
}

div.wpforms-container .wpforms-form .choices__input::-webkit-search-cancel-button {
  display: none;
}

div.wpforms-container .wpforms-form .choices__input--hidden {
  clip: rect(1px, 1px, 1px, 1px) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  width: 1px !important;
  min-width: auto !important;
  word-wrap: normal !important;
}

div.wpforms-container .wpforms-form .choices .choices__inner input.choices__input:focus {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

div.wpforms-container .wpforms-form .choices__placeholder {
  opacity: .5;
}

div.wpforms-container .wpforms-form #wpforms-admin-form-embed-wizard .choices.is-open.is-flipped .choices__inner {
  border-radius: 4px 4px 0 0;
}

div.wpforms-container .wpforms-form #wpforms-admin-form-embed-wizard .is-flipped .choices__list--dropdown {
  border-radius: inherit;
}

div.wpforms-container .wpforms-form #wpforms-admin-form-embed-wizard .choices[data-type*="select-one"]:after {
  border: none;
  background: #fff url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23777%22%2F%3E%3C%2Fsvg%3E) no-repeat center;
  background-size: 16px 16px;
  cursor: pointer;
  width: 16px;
  height: 16px;
  top: 13px;
  right: 8px;
  margin-top: 0;
}

div.wpforms-container .wpforms-form #wpforms-admin-form-embed-wizard .choices[data-type*="select-one"].is-flipped:after {
  transform: rotate(180deg);
}

div.wpforms-container .wpforms-form .choices__list--dropdown {
  min-width: 250px;
}

div.wpforms-container .wpforms-form .choices.is-disabled[data-type*="select-multiple"] .choices__button, div.wpforms-container .wpforms-form .choices.is-disabled[data-type*="text"] .choices__button {
  border-left: 1px solid rgba(0, 0, 0, 0.25);
  cursor: not-allowed;
}

div.wpforms


	"一二三四五",
		"二三四五六七八",
	}, keywords)
	assert.True(t, ok)
	assert.Equal(t, "零########九十", output)
}

func TestTrieNested(t *testing.T) {
	trie := NewTrie([]string{
		"一二三",
		"一二三四五",
		"一二三四五六七八",
	}, WithMask('#'))
	output, keywords, ok := trie.Filter("零一二三四五六七八九十")
	assert.ElementsMatch(t, []string{
		"一二三",
		"一二三四五",
		"一二三四五六七八",
	}, keywords)
	assert.True(t, ok)
	assert.Equal(t, "零########九十", output)
}

func BenchmarkTrie(b *testing.B) {
	b.ReportAllocs()

	trie := NewTrie([]string{
		"A",
		"AV",
		"AV演员",
		"苍井空",
		"AV演员色情",
		"日本AV女优",
	})

	for i := 0; i < b.N; i++ {
		trie.Filter("日本AV演员兼电视、电影演员。苍井空AV女优是xx出道, 日本AV女优们最精彩的表演是AV演员色情表演")
	}
}
package stat

import (
	"os"
	"sync"
	"time"

	"github.com/tal-tech/go-zero/core/executors"
	"github.com/tal-tech/go-zero/core/logx"
	"github.com/tal-tech/go-zero/core/syncx"
)

var (
	logInterval  = time.Minute
	writerLock   sync.Mutex
	reportWriter Writer = nil
	logEnabled          = syncx.ForAtomicBool(true)
)

type (
	// Writer interface wraps the Write method.
	Writer interface {
		Write(report *StatReport) error
	}

	// A StatReport is a stat report entry.
	StatReport struct {
		Name          string  `json:"name"`
		Timestamp     int64   `json:"tm"`
		Pid           int     `json:"pid"`
		ReqsPerSecond float32 `json:"qps"`
		Drops         int     `json:"drops"`
		Average       float32 `json:"avg"`
		Median        float32 `json:"med"`
		Top90th       float32 `json:"t90"`
		Top99th       float32 `json:"t99"`
		Top99p9th     float32 `json:"t99p9"`
	}

	// A Metrics is used to log and report stat reports.
	Metrics struct {
		executor  *executors.PeriodicalExecutor
		container *metricsContainer
	}
)

// DisableLog disables logs of stats.
func DisableLog() {
	logEnabled.Set(false)
}

// SetReportWriter sets the report writer.
func SetReportWriter(writer Writer) {
	writerLock.Lock()
	reportWriter = writer
	writerLock.Unlock()
}

// NewMetrics returns a Metrics.
func NewMetrics(name string) *Metrics {
	container := &metricsContainer{
		name: name,
		pid:  os.Getpid(),
	}

	return &Metrics{
		executor:  executors.NewPeriodicalExecutor(logInterval, container),
		container: container,
	}
}


namespace Ardalis.Specification.EntityFramework6;

public class OrderEvaluator : IEvaluator, IInMemoryEvaluator
{
    private OrderEvaluator() { }
    public static OrderEvaluator Instance { get; } = new OrderEvaluator();

    public bool IsCriteriaEvaluator { get; } = false;

    public IQueryable<T> GetQuery<T>(IQueryable<T> query, ISpecification<T> specification) where T : class
    {
        if (specification.OrderExpressions != null)
        {
            if (specification.OrderExpressions.Count(x => x.OrderType == OrderTypeEnum.OrderBy
                    || x.OrderType == OrderTypeEnum.OrderByDescending) > 1)
            {
                throw new DuplicateOrderChainException();
            }

            IOrderedQueryable<T> orderedQuery = null;
            foreach (var orderExpression in specification.OrderExpressions)
            {
                if (orderExpression.OrderType == OrderTypeEnum.OrderBy)
                {
                    orderedQuery = Queryable.OrderBy((dynamic)query, (dynamic)RemoveConvert(orderExpression.KeySelector));
                }
                else if (orderExpression.OrderType == OrderTypeEnum.OrderByDescending)
                {
                    orderedQuery = Queryable.OrderByDescending((dynamic)query, (dynamic)RemoveConvert(orderExpression.KeySelector));
                }
                else if (orderExpression.OrderType == OrderTypeEnum.ThenBy)
                {
                    orderedQuery = Queryable.ThenBy((dynamic)orderedQuery, (dynamic)RemoveConvert(orderExpression.KeySelector));
                }
                else if (orderExpression.OrderType == OrderTypeEnum.ThenByDescending)
                {
                    orderedQuery = Queryable.ThenByDescending((dynamic)orderedQuery, (dynamic)RemoveConvert(orderExpression.KeySelector));
                }
            }

            if (orderedQuery != null)
            {
                query = orderedQuery;
            }
        }

        return query;


void QCPFinancial::setBrushPositive(const QBrush &brush)
{
  mBrushPositive = brush;
}

/*!
  If \ref setTwoColored is set to true, this function controls the brush that is used to draw fills
  of data points with a negative trend (i.e. bars/candlesticks with close < open).

  If \a twoColored is false, the normal plottable's pen and brush are used (\ref setPen, \ref
  setBrush).

  \see setBrushPositive, setPenNegative, setPenPositive
*/
void QCPFinancial::setBrushNegative(const QBrush &brush)
{
  mBrushNegative = brush;
}

/*!
  If \ref setTwoColored is set to true, this function controls the pen that is used to draw
  outlines of data points with a positive trend (i.e. bars/candlesticks with close >= open).

  If \a twoColored is false, the normal plottable's pen and brush are used (\ref setPen, \ref
  setBrush).

  \see setPenNegative, setBrushPositive, setBrushNegative
*/
void QCPFinancial::setPenPositive(const QPen &pen)
{
  mPenPositive = pen;
}

/*!
  If \ref setTwoColored is set to true, this function controls the pen that is used to draw
  outlines of data points with a negative trend (i.e. bars/candlesticks with close < open).

  If \a twoColored is false, the normal plottable's pen and brush are used (\ref setPen, \ref
  setBrush).

  \see setPenPositive, setBrushNegative, setBrushPositive
*/
void QCPFinancial::setPenNegative(const QPen &pen)
{
  mPenNegative = pen;
}

/*! \overload

  Adds the provided points in \a keys, \a open, \a high, \a low and \a close to the current data.
  The provided vectors should have equal length. Else, the number of added points will be the size
  of the smallest vector.

  If you can guarantee that the passed data points are sorted by \a keys in ascending order, you
  can set \a alreadySorted to true, to improve performance by saving a sorting run.

  Alternatively, you can also access and modify the data directly via the \ref data method, which
  returns a pointer to the internal data container.

  \see timeSeriesToOhlc
*/
void QCPFinancial::addData(const QVector<double> &keys, const QVector<double> &open, const QVector<double> &high, const QVector<double> &low, const QVector<double> &close, bool alreadySorted)
{
  if (keys.size() != open.size() || open.size() != high.size() || high.size() != low.size() || low.size() != close.size() || close.size() != keys.size())
    qDebug() << Q_FUNC_INFO << "keys, open, high, low, close have different sizes:" << keys.size() << open.size() << high.size() << low.size() << close.size();
  const int n = qMin(keys.size(), qMin(open.size(), qMin(high.size(), qMin(low.size(), close.size()))));
  QVector<QCPFinancialData> tempData(n);
  QVector<QCPFinancialData>::iterator it = tempData.begin();
  const QVector<QCPFinancialData>::iterator itEnd = tempData.end();
  int i = 0;
  while (it != itEnd)
  {
    it->key = keys[i];
    it->open = open[i];
    it->high = high[i];
    it->low = low[i];
    it->close = close[i];
    ++it;
    ++i;
  }
  mDataContainer->add(tempData, alreadySorted); // don't modify tempData beyond this to prevent copy on write
}

/*! \overload

  Adds the provided data point as \a key, \a open, \a high, \a low and \a close to the current
  data.

  Alternative


*
 * @author Christian Laireiter
 */
public final class GUID
{

    /**
     * This constant defines the GUID for stream chunks describing audio
     * streams, indicating the the audio stream has no error concealment.

     */
    public final static GUID GUID_AUDIO_ERROR_CONCEALEMENT_ABSENT = new GUID(new int[]{0x40, 0xA4, 0xF1, 0x49, 0xCE, 0x4E, 0xD0, 0x11, 0xA3, 0xAC, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0xF6}, "Audio error concealment absent.");

    /**
     * This constant defines the GUID for stream chunks describing audio
     * streams, indicating the the audio stream has interleaved error
     * concealment.

     */
    public final static GUID GUID_AUDIO_ERROR_CONCEALEMENT_INTERLEAVED = new GUID(new int[]{0x40, 0xA4, 0xF1, 0x49, 0xCE, 0x4E, 0xD0, 0x11, 0xA3, 0xAC, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0xF6}, "Interleaved audio error concealment.");

    /**
     * This constant stores the GUID indicating that stream type is audio.
     */
    public final static GUID GUID_AUDIOSTREAM = new GUID(new int[]{0x40, 0x9E, 0x69, 0xF8, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B}, " Audio stream");

    /**
     * This constant stores the GUID indicating a content branding object.
     */
    public final static GUID GUID_CONTENT_BRANDING = new GUID(new int[]{0xFA, 0xB3, 0x11, 0x22, 0x23, 0xBD, 0xD2, 0x11, 0xB4, 0xB7, 0x00, 0xA0, 0xC9, 0x55, 0xFC, 0x6E}, "Content Branding");

    /**
     * This is for the Content Encryption Object
     * 2211B3FB-BD23-11D2-B4B7-00A0C955FC6E, needs to be little-endian.
     */
    public final static GUID GUID_CONTENT_ENCRYPTION = new GUID(new int[]{0xfb, 0xb3, 0x11, 0x22, 0x23, 0xbd, 0xd2, 0x11, 0xb4, 0xb7, 0x00, 0xa0, 0xc9, 0x55, 0xfc, 0x6e}, "Content Encryption Object");

    /**
     * This constant represents the guidData for a chunk which contains Title,
     * author, copyright, description and rating.
     */
    public final static GUID GUID_CONTENTDESCRIPTION = new GUID(new int[]{0x33, 0x26, 0xB2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C}, "Content Description");

    /**
     * This constant stores the GUID for Encoding-Info chunks.
     */
    public final static GUID GUID_ENCODING = new GUID(new int[]{0x40, 0x52, 0xD1, 0x86, 0x1D, 0x31, 0xD0, 0x11, 0xA3, 0xA4, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0xF6}, "Encoding description");

    /**
     * This constant defines the GUID for a WMA "Extended Content Description"
     * chunk.


άγ.",
    "άρθρ.",
    "αι.",
    "αν.",
    "απ.",
    "αρ.",
    "αριθ.",
    "αριθμ.",
    "β'",
    "βλ.",
    "γ.γ.",
    "γεν.",
    "γραμμ.",
    "δ.δ.",
    "δ.σ.",
    "δηλ.",
    "δισ.",
    "δολ.",
    "δρχ.",
    "εκ.",
    "εκατ.",
    "ελ.",
    "θιν'",
    "κ.",
    "κ.ά.",
    "κ.α.",
    "κ.κ.",
    "κ.λπ.",
    "κ.ο.κ.",
    "κ.τ.λ.",
    "κλπ.",
    "κτλ.",
    "κυβ.",
    "λ.χ.",
    "μ.",
    "μ.Χ.",
    "μ.μ.",
    "μιλ.",
    "ντ'",
    "π.Χ.",
    "π.β.",
    "π.δ.",
    "π.μ.",
    "π.χ.",
    "σ.",
    "σ.α.λ.",
    "σ.σ.",
    "σελ.",
    "στρ.",
    "τ'ς",
    "τ.μ.",
    "τετ.",
    "τετρ.",
    "τηλ.",
    "τρισ.",
    "τόν.",
    "υπ.",
    "χ.μ.",
    "χγρ.",
    "χιλ.",
    "χλμ.",
]:
    _exc[orth] = [{ORTH: orth}]

TOKENIZER_EXCEPTIONS = _exc


lineWrapping)
      this.display.wrapper.className += " CodeMirror-wrap";
    if (options.autofocus && !mobile) display.input.focus();
    initScrollbars(this);

    this.state = {
      keyMaps: [],  // stores maps added by addKeyMap
      overlays: [], // highlighting overlays, as added by addOverlay
      modeGen: 0,   // bumped when mode/overlay changes, used to invalidate highlighting info
      overwrite: false, focused: false,
      suppressEdits: false, // used to disable editing during key handlers when in readOnly mode
      pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in input.poll
      draggingText: false,
      highlight: new Delayed(), // stores highlight worker timeout
      keySeq: null  // Unfinished key sequence
    };

    var cm = this;

    // Override magic textarea content restore that IE sometimes does
    // on our hidden textarea on reload
    if (ie && ie_version < 11) setTimeout(function() { cm.display.input.reset(true); }, 20);

    registerEventHandlers(this);
    ensureGlobalHandlers();

    startOperation(this);
    this.curOp.forceUpdate = true;
    attachDoc(this, doc);

    if ((options.autofocus && !mobile) || cm.hasFocus())
      setTimeout(bind(onFocus, this), 20);
    else
      onBlur(this);

    for (var opt in optionHandlers) if (optionHandlers.hasOwnProperty(opt))
      optionHandlers[opt](this, options[opt], Init);
    maybeUpdateLineNumberWidth(this);
    if (options.finishInit) options.finishInit(this);
    for (var i = 0; i < initHooks.length; ++i) initHooks[i](this);
    endOperation(this);
    // Suppress optimizelegibility in Webkit, since it breaks text
    // measuring on line wrapping boundaries.
    if (webkit && options.lineWrapping &&
        getComputedStyle(display.lineDiv).textRendering == "optimizelegibility")
      display.lineDiv.style.textRendering = "auto";
  }

  // DISPLAY CONSTRUCTOR

  // The display handles the DOM integration, both for input reading
  // and content drawing. It holds references to DOM nodes and
  // display-related state.

  function Display(place, doc, input) {
    var d = this;
    this.input = input;

    // Covers bottom-right square when both scrollbars are present.
    d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
    d.scrollbarFiller.setAttribute("cm-not-content", "true");
    // Covers bottom of gutter when coverGutterNextToScrollbar is on
    // and h scrollbar is present.
    d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
    d.gutterFiller.setAttribute("cm-not-content", "true");
    // Will contain the actual code, positioned to cover the viewport.
    d.lineDiv = elt("div", null, "CodeMirror-code");
    // Elements are added to these to represent selection and cursors.
    d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
    d.cursorDiv = elt("div", null, "CodeMirror-cursors");
    // A visibility: hidden element used to find the size of things.
    d.measure = elt("div", null, "CodeMirror-measure");
    // When lines outside of the viewport are measured, they are drawn in this.
    d.lineMeasure = elt("div", null, "CodeMirror-measure");
    // Wraps everything that needs to exist inside the vertically-padded coordinate system
    d.lineSpace = elt("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDi


部变量表的存储空间。

max_locals的单位为slot，slot是虚拟机为局部变量分配内存的最小单元，在运行时，对于不超过32位类型的数据类型，比如 byte,char,int等占用1个slot，而double和Long这种64位的数据类型则需要分配2个slot，另外max_locals的值并 不是所有局部变量所需要的内存数量之和，因为slot是可以重用的，当局部变量超过了它的作用域以后，局部变量所占用的slot就会被重用。

code_length代表了字节码指令的数量，而code表示的时候字节码指令，从上图可以知道code的类型为u1,一个u1类型的取值为0x00-0xFF,对应的十进制为0-255，目前虚拟机规范已经定义了200多条指令。

exception_table_length以及exception_table分别代表方法对应的异常信息。

attributes_count和attribute_info分别表示了Code属性中的属性数量和属性表，从这里可以看出Class的文件结构中，属性表是很灵活的，它可以存在于Class文件，方法表，字段表以及Code属性中。

接下来我们继续以上面的例子来分析一下，从上面init方法的Code属性的截图中可以看出，属性表的长度为0x00000026,max_stack的 值为0x0002,max_locals的取值为0x0001,code_length的长度为0x0000000A，那么00000149h- 00000152h为字节码，接下来exception_table_length的长度为0x0000，而attribute_count的值为 0x0001，00000157h-00000158h的值为0x000E,它表示常量池中属性的名称，查看常量池得知第14个常量的值为 LineNumberTable，LineNumberTable用于描述java源代码的行号和字节码行号的对应关系，它不是运行时必需的属性，如果通 过-g:none的编译器参数来取消生成这项信息的话，最大的影响就是异常发生的时候，堆栈中不能显示出出错的行号，调试的时候也不能按照源代码来设置断 点，接下来我们再看一下LineNumberTable的结构如下图所示：

其中attribute_name_index上面已经提到过，表示常量池的索引，attribute_length表示属性长度，而start_pc和 line_number分表表示字节码的行号和源代码的行号。本例中LineNumberTable属性的字节流如下图所示：

上面分析完了TestClass的第一个方法，通过同样的方式我们可以分析出TestClass的第二个方法，截图如下：

<img alt="" class="aligncenter" height="395" src="../wp-


`constraints` is passed, `fillX` will be not applied - add it explicitly if need).
 * At least one component need to have a [Row.grow] constraint for it to fill the container.
 *
 * Check `Tools -> Internal Actions -> UI -> UI DSL Debug Mode` to turn on debug painting.
 *
 * `JTextComponent`, `TextFieldWithHistory` (use [Row.textFieldWithBrowseButton]), `SeparatorComponent` and `ComponentWithBrowseButton` components automatically have [Row.growX].
 *
 * `ToolbarDecorator` and `JBScrollPane` (use [Row.scrollPane]) components automatically have [Row.grow] and [Row.push].
 */
inline fun panel(
    vararg constraints: LCFlags,
    @NlsContexts.DialogTitle title: String? = null,
    init: LayoutBuilder.() -> Unit
): DialogPanel {
    val builder = createLayoutBuilder()
    builder.init()

    val panel = DialogPanel(title, layout = null)
//    UIUtil.applyDeprecatedBackground(panel)
    builder.builder.build(panel, constraints)
    initPanel(builder, panel)
    return panel
}

fun DialogPanel(title: @NlsContexts.BorderTitle String? = null, layout: LayoutManager2? = BorderLayout()): DialogPanel {
    val panel = DialogPanel(layout)
    title?.let { setTitledBorder(it, panel, hasSeparator = true) }
    return panel
}
private fun setTitledBorder(@NlsContexts.BorderTitle title: String, panel: JPanel, hasSeparator: Boolean) {
    val border = when {
        hasSeparator -> IdeBorderFactory.createTitledBorder(title, false)
        else -> IdeBorderFactory.createTitledBorder(title, false, JBUI.insetsTop(8)).setShowLine(false)
    }
    panel.border = border
    border.acceptMinimumSize(panel)
}

fun initPanel(builder: LayoutBuilder, panel: DialogPanel) {
    panel.preferredFocusedComponent = builder.builder.preferredFocusedComponent
    panel.validateCallbacks = builder.builder.validateCallbacks
    panel.componentValidateCallbacks = builder.builder.componentValidateCallbacks
    panel.customValidationRequestors = builder.builder.customValidationRequestors
    panel.applyCallbacks = builder.builder.applyCallbacks
    panel.resetCallbacks = builder.builder.resetCallbacks
    panel.isModifiedCallbacks = builder.builder.isModifiedCallbacks
}/*
 * Copyright 2024 XIN LIN HOU<hxl49508@gmail.com>
 * MigLayoutBuilder.kt is part of Cool Request
 *
 * License: GPL-3.0+
 *
 * Cool Request is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Cool Request is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Cool Request.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.cool.request.ui.dsl.layout.migLayout

import com.cool.request.ui.dsl.layout.LayoutBuilderImpl
import com.cool.request.ui.dsl.layout.SpacingConfiguration
import com.cool.request.ui.dsl.layout.migLayout.patched.MigLayout
import com.intellij.openapi.ui.DialogWrapper
import com.intellij.openapi.ui.DialogWrapper.IS_VISUAL_PADDING_COMPENSATED_ON_COMPONENT_LEVEL_KEY
import com.intellij.openapi.ui.ValidationInfo
import com.intellij.ui.scale.JBUIScale
import com.intellij.util.SmartList
import net.miginfocom.layout.*
import java.awt.Component
import


     var green = UnityEngine.Random.Range(0f, 1f);
        var blue = UnityEngine.Random.Range(0f, 1f);

        red = (red + mix.r) / 2;
        green = (green + mix.g) / 2;
        blue = (blue + mix.b) / 2;

        return new Color(red, green, blue, 1f);
    }

    public static Color[] GetRandomPastelColors(int size)
    {
        var randomColours = GetRandomBrightColours(size);

        var colors = new Color[size];
        var returnColors = new Color[size];

        for (int index = 0; index < colors.Length; index++)
        {
            var rc = randomColours[index];
            colors = Enumerable.Range(0, colors.Length)
            .Select(i => rc.WithSaturation((float)i / (colors.Length - 1)))
            .ToArray();

            returnColors[index] = colors[index];
        }

        return returnColors;
    }

    public static Color[] GetRandomPastelColors(int size, int seed)
    {
        var seededRnd = new System.Random(seed);

        var randomColours = GetRandomBrightColours(size, seed);
        var colors = new Color[size];
        var returnColors = new Color[size];

        for (int index = 0; index < colors.Length; index++)
        {
            var rc = randomColours[index];
            colors = Enumerable.Range(0, colors.Length)
            .Select(i => rc.WithSaturation((float)i / (colors.Length - 1)))
            .ToArray();

            returnColors[index] = colors[index];
        }

        return returnColors;
    }

    public static Color InvertColor(Color color)
    {
        return new Color(1f - color.r, 1f - color.g, 1f - color.b, 1f);
    }

    public static Color[] GetRandomThreeSetColours()
    {
        var rcs = GetRandomBrightColours(20);
        var rc = rcs[10];
        var colors = new Color[13];

        colors = Enumerable.Range(0, colors.Length)
            .Select(i => rc.WithSaturation((float)i / (colors.Length - 1)))
            .ToArray();

        var colorSet = new Color[4];

        var colorSetCount = 0;

        for (int index = 0; index < colors.Length - 1; index++)
        {
            var c = colors[index];
            if (index % 3 == 0)
            {
                colorSet[colorSetCount] = c;
                colorSetCount++;
            }
        }

        return colorSet;
    }

    static void HsvToRgb(double h, double S, double V, out float r, out float g, out float b)
    {
        double H = h;
        while (H < 0) { H += 360; };
        while (H >= 360) { H -= 360; };
        double R, G, B;
        if (V <= 0)
        { R = G = B = 0; }
        else if (S <= 0)
        {
            R = G = B = V;
        }
        else
        {
            double hf = H / 60.0;
            int i = (int)Math.Floor(hf);
            double f = hf - i;
            double pv = V * (1 - S);
            double qv = V * (1 - S * f);
            double tv = V * (1 - S * (1 - f));
            switch (i)
            {

                case 0:
                    R = V;
                    G = tv;
                    B = pv;
                    break;

                case 1:
                    R = qv;
                    G = V;
                    B = pv;
                    break;
                case 2:
                    R = pv;
                    G = V;
                    B = tv;
                    break;


font = beautiful.icon_font2 .. " 14",
                align = "center",
                valign = "center",
                widget = wibox.widget.textbox(),
  },
  slider,
  layout = wibox.layout.fixed.horizontal,
  spacing = 0,
}

awful.spawn.easy_async_with_shell(
	"brightnessctl | grep -i  'current' | awk '{ print $4}' | tr -d \"(%)\"",
	function(stdout)
		local value = string.gsub(stdout, "^%s*(.-)%s*$", "%1")
		bri_slider.value = tonumber(value)
	end
)

slider:connect_signal("property::value", function(_, new_value)
	slider.value = new_value
	awful.spawn("brightnessctl set " .. new_value .. "%", false)
end)

return bri_slider


lang">[C#]

publicoverridevoidDispose();

Implements

        IDisposable.Dispose

See Also

        ISoundSource Class | IrrKlang Namespace

      <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;">
        <param name="Keyword" value="Dispose method">
        </param>
        <param name="Keyword" value="Dispose method, ISoundSource class">
        </param>
        <param name="Keyword" value="ISoundSource.Dispose method">
        </param>
      </object>

          The irrKlang Sound Engine Documentation  2003-2010 by Nikolaus Gebhardt.

    <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
    <title>ISoundDeviceList Constructor (SoundDeviceListType, SoundOutputDriver)</title>
    <xml>
    </xml>
    <link rel="stylesheet" type="text/css" href="MSDN.css" />

            IrrKlang.NET

ISoundDeviceListConstructor(SoundDeviceListType, SoundOutputDriver)

        [VisualBasic]

OverloadsPublicSubNew( _
ByVal typeAsSoundDeviceListType,_
ByVal driverAsSoundOutputDriver_
)

        [C#]

publicISoundDeviceList(
SoundDeviceListTypetype,
SoundOutputDriverdriver
);

See Also

        ISoundDeviceList Class | IrrKlang Namespace | ISoun


lue) {
    if (value is Map) {
      final json = value.cast<String, dynamic>();

      // Ensure that the map contains the required keys.
      // Note 1: the values aren't checked for validity beyond being non-null.
      // Note 2: this code is stripped in release mode!
      assert(() {
        requiredKeys.forEach((key) {
          assert(json.containsKey(key),
              'Required key "IoK8sApiNetworkingV1alpha1ClusterCIDRSpec[$key]" is missing from JSON.');
          assert(json[key] != null,
              'Required key "IoK8sApiNetworkingV1alpha1ClusterCIDRSpec[$key]" has a null value in JSON.');
        });
        return true;
      }());

      return IoK8sApiNetworkingV1alpha1ClusterCIDRSpec(
        ipv4: mapValueOfType<String>(json, r'ipv4'),
        ipv6: mapValueOfType<String>(json, r'ipv6'),
        nodeSelector:
            IoK8sApiCoreV1NodeSelector.fromJson(json[r'nodeSelector']),
        perNodeHostBits: mapValueOfType<int>(json, r'perNodeHostBits')!,
      );
    }
    return null;
  }

  static List<IoK8sApiNetworkingV1alpha1ClusterCIDRSpec>? listFromJson(
    dynamic json, {
    bool growable = false,
  }) {
    final result = <IoK8sApiNetworkingV1alpha1ClusterCIDRSpec>[];
    if (json is List && json.isNotEmpty) {
      for (final row in json) {
        final value = IoK8sApiNetworkingV1alpha1ClusterCIDRSpec.fromJson(row);
        if (value != null) {
          result.add(value);
        }
      }
    }
    return result.toList(growable: growable);
  }

  static Map<String, IoK8sApiNetworkingV1alpha1ClusterCIDRSpec> mapFromJson(
      dynamic json) {
    final map = <String, IoK8sApiNetworkingV1alpha1ClusterCIDRSpec>{};
    if (json is Map && json.isNotEmpty) {
      json = json.cast<String, dynamic>(); // ignore: parameter_assignments
      for (final entry in json.entries) {
        final value =
            IoK8sApiNetworkingV1alpha1ClusterCIDRSpec.fromJson(entry.value);
        if (value != null) {
          map[entry.key] = value;
        }
      }
    }
    return map;
  }

  // maps a json object with a list of IoK8sApiNetworkingV1alpha1ClusterCIDRSpec-objects as value to a dart map
  static Map<String, List<IoK8sApiNetworkingV1alpha1ClusterCIDRSpec>>
      mapListFromJson(
    dynamic json, {
    bool growable = false,
  }) {
    final map = <String, List<IoK8sApiNetworkingV1alpha1ClusterCIDRSpec>>{};
    if (json is Map && json.isNotEmpty) {
      json = json.cast<String, dynamic>(); // ignore: parameter_assignments
      for (final entry in json.entries) {
        final value = IoK8sApiNetworkingV1alpha1ClusterCIDRSpec.listFromJson(
          entry.value,
          growable: growable,
        );
        if (value != null) {
          map[entry.key] = value;
        }
      }
    }
    return map;
  }

  /// The list of required keys that must be present in a JSON.
  static const requiredKeys = <String>{
    'perNodeHostBits',
  };
}
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12

// ignore_for_file: require_trailing_commas
// ignore_for_file: unused_element
// ignore_for_file: unnecessary_this
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_


from django.test import SimpleTestCase

from ..utils import setup

class SafeTests(SimpleTestCase):
    @setup({"safe01": "{{ a }} -- {{ a|safe }}"})
    def test_safe01(self):
        output = self.engine.render_to_string("safe01", {"a": "hello"})
        self.assertEqual(output, "<b>hello</b> -- hello")

    @setup({"safe02": "{% autoescape off %}{{ a }} -- {{ a|safe }}{% endautoescape %}"})
    def test_safe02(self):
        output = self.engine.render_to_string("safe02", {"a": "hello"})
        self.assertEqual(output, "hello -- hello")


 textEnd: Int = text.strlen(), flags: TextFlags = none) {

        val window = currentWindow
        if (window.skipItems)
            return

        // Accept null ranges
        if (textEnd == 0) // ~text == text_end
            if (text.isNotEmpty())
                text[0] = 0 // ~text_end = "";

        // Calculate length

        val textPos = Vec2(window.dc.cursorPos.x, window.dc.cursorPos.y + window.dc.currLineTextBaseOffset)
        val wrapPosX = window.dc.textWrapPos
        val wrapEnabled = wrapPosX >= 0f
        if (textEnd <= 2000 || wrapEnabled) {
            // Common case
            val wrapWidth = if (wrapEnabled) calcWrapWidthForPos(window.dc.cursorPos, wrapPosX) else 0f
            val textSize = calcTextSize(text, 0, textEnd, false, wrapWidth)

            val bb = Rect(textPos, textPos + textSize)
            itemSize(textSize, 0f)
            if (!itemAdd(bb, 0))
                return

            // Render (we don't hide text after ## in this end-user function)
            renderTextWrapped(bb.min, text, textEnd, wrapWidth)
        } else {
            // Long text!
            // Perform manual coarse clipping to optimize for long multi-line text
            // - From this point we will only compute the width of lines that are visible. Optimization only available when word-wrapping is disabled.
            // - We also don't vertically center the text within the line full height, which is unlikely to matter because we are likely the biggest and only item on the line.
            // - We use memchr(), pay attention that well optimized versions of those str/mem functions are much faster than a casually written loop.
            var line = 0
            val lineHeight = ImGui.textLineHeight
            val textSize = Vec2()

            // Lines to skip (can't skip when logging text)
            val pos = Vec2(textPos)
            if (!g.logEnabled) {
                val linesSkippable = ((window.clipRect.min.y - textPos.y) / lineHeight).i
                if (linesSkippable > 0) {
                    var linesSkipped = 0
                    while (line < textEnd && linesSkipped < linesSkippable) {
                        var lineEnd = text.memchr(line, '\n', textEnd - line)
                        if (lineEnd == -1)
                            lineEnd = textEnd
                        if (flags hasnt TextFlag.NoWidthForLargeClippedText)
                            textSize.x = textSize.x max calcTextSize(text, line, lineEnd).x
                        line = lineEnd + 1
                        linesSkipped++
                    }
                    pos.y += linesSkipped * lineHeight
                }
            }

            // Lines to render
            if (line < textEnd) {
                val lineRect = Rect(pos, pos + Vec2(Float.MAX_VALUE, lineHeight))
                while (line < textEnd) {
                    if (isClippedEx(lineRect, 0))
                        break

                    var lineEnd = text.memchr(line, '\n', textEnd - line)
                    if (lineEnd == -1)
                        lineEnd = textEnd
                    textSize.x = textSize.x max calcTextSize(text, line, lineEnd).x
                    renderText(pos, text, line, lineEnd, false)
                    line = lineEnd + 1
                    lineRect.min.y += lineHeight
                    lineRect.max.y += lineHeight
                    pos.y += lineHeight
                }

                // Count remaining lines
                var linesSkipped = 0
                while (line < textEnd) {
                    var lineEnd = text.memchr(line, '\n', textEnd - line)
                    i


brane, metal, Skylites)
    orderType: OrderType; // (Delivery or Pickup)
    orderDate: Date;
    pickupDate: Date;
    city: string;
    orderPlaced: boolean;
    orderConfirmations: OrderConfirmation[];
    isPickedOrShipped: boolean;
    note?: string;
    // orderStatus: string; // ordered, confirmed 4 days prior, confirmed 1 day prior, shipped
    // shippedDate: Date;
    // orderStatus:string;

    /*public orderStatus():string {

        if (this.isPickedOrShipped)
            return "Shipped";
        else if (!this.orderPlaced)
            return "Not-Ordered";
        else if (this.orderConfirmations.length == 0 && this.orderPlaced)
            return "Ordered";

        return "Confirmed " + this.orderConfirmations[0].priorDays +
            (this.orderConfirmations[0].priorDays > 1 ? "day " : "days " + "prior");

    };*/

    public toString = () => {
        return `Order = (${
        "\nPurchase order number = " + this.purchOrderNum
        + "\nLicense # = " + this.licenseNum
        + "\nJob name = " + this.jobName
        + "\nMaterial type = " + this.materialType
        + "\nSales Order Number = " + this.salesOrderNum
        + "\nOrder date = " + this.orderDate
        + "\nPickup date = " + this.pickupDate
        + "\nCity = " + this.city
        + "\nOrder Placed = " + this.orderPlaced
        + "\nOrder Confirmations = " + this.orderConfirmations
        + "\nOrder Shipped = " + this.isPickedOrShipped
        + "\nNote = " + this.note
            })`
    }

}
import { Injectable } from '@angular/core';
import { Expense } from './expense';

@Injectable()
export class ExpenseService {

	private expenses:Expense[] = [];

    constructor() { }

    getExpenses():Expense[]{
    	console.log('expenses returning');
    	return this.expenses;
    }

    create(expense:Expense){
  		this.expenses.push(expense);
  		console.log(this.expenses.length);
  	}

  	delete(index:number){
  		this.expenses.splice(index,1);
  	}
}
import { createAsyncAction, ActionType } from "typesafe-actions"
import {
  IBaseItem,
  IBaseState,
  init,
  model,
  IMeta,
  IModelState,
  createReducer,
} from "./../model"

export const key = "LOCATIONS_STATE"

export interface ICountry {
  id: number
  name: string
  short_name: string
  dial_code: string
  flag: string
}

export interface ICountryState {
  id: number
  name: string
  country_id: number
}

export interface ICity {
  id: number
  name: string
  state_id: number
}

export interface ILocation extends IBaseItem {
  id: number
  name: string
  short_name: string
  city_id: number
  state_id: number
  country_id: number
  city?: ICity
  state?: ICountryState
  country?: ICountry
  latitude: string
  longitude: string
}

export interface ILocations extends IBaseState<ILocation> {}

export interface IState extends IModelState<ILocation> {}

export interface IStateWithKey {
  readonly [key]: IState
}

const INITIAL_STATE: IState = {
  isFetching: true,
  state: init<ILocation>(),
}

export const actions = {
  list: createAsyncAction(
    "@


/* ///////////////////////////////////////////////////////////////////////////
// Name:        win_gtk.h
// Purpose:     wxWidgets's GTK base widget = GtkPizza
// Author:      Robert Roebling
// Id:          $Id: win_gtk.h 42143 2006-10-20 05:47:15Z PC $
// Copyright:   (c) 1998 Robert Roebling
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////// */

#ifndef __GTK_PIZZA_H__
#define __GTK_PIZZA_H__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#include <gtk/gtkcontainer.h>

#include "wx/dlimpexp.h"

#define GTK_PIZZA(obj)          GTK_CHECK_CAST (obj, gtk_pizza_get_type (), GtkPizza)
#define GTK_IS_PIZZA(obj)       GTK_CHECK_TYPE (obj, gtk_pizza_get_type ())

typedef struct _GtkPizza        GtkPizza;

struct _GtkPizza
{
    GtkContainer container;
    GList *children;

    guint m_xoffset;
    guint m_yoffset;

    GdkWindow *bin_window;
};

WXDLLIMPEXP_CORE
GtkType    gtk_pizza_get_type        (void);
WXDLLIMPEXP_CORE
GtkWidget* gtk_pizza_new             (void);

/* accessors */

WXDLLIMPEXP_CORE
gint       gtk_pizza_get_xoffset     (GtkPizza          *pizza);
WXDLLIMPEXP_CORE
gint       gtk_pizza_get_yoffset     (GtkPizza          *pizza);
WXDLLIMPEXP_CORE
void       gtk_pizza_set_xoffset     (GtkPizza          *pizza, gint xoffset);
WXDLLIMPEXP_CORE
void       gtk_pizza_set_yoffset     (GtkPizza          *pizza, gint yoffset);

WXDLLIMPEXP_CORE
gint       gtk_pizza_get_rtl_offset  (GtkPizza          *pizza);

WXDLLIMPEXP_CORE
void       gtk_pizza_scroll          (GtkPizza          *pizza,
                                      gint               dx,
                                      gint               dy);

WXDLLIMPEXP_CORE
void       gtk_pizza_put             (GtkPizza          *pizza,
                                      GtkWidget         *widget,
                                      gint               x,
                                      gint               y,
                                      gint               width,
                                      gint               height);

WXDLLIMPEXP_CORE
void       gtk_pizza_set_size        (GtkPizza          *pizza,
                                      GtkWidget         *widget,
                                      gint               x,
                                      gint               y,
                                      gint               width,
                                      gint               height);
#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __GTK_PIZZA_H__ */


fn new(base_handle: BodyHandle, link_id: usize, origin: f32) -> Self {
        ServoModel {
            base_handle,
            link_id,

            target: Cell::new(0.0),
            origin
        }
    }

    pub fn set_target(&self, v: f32) {
        self.target.set(v);
    }

    pub fn with_target(mut self, v: f32) -> Self {
        self.set_target(v);

        self
    }
}

impl Simulate for ServoModel {
    fn simulation_step(&self, world: &mut World<f32>) {
        const K_TQ: f32 = 25.0;
        const K_SPEED: f32 = 4.0;
        const MAX_TQ: f32 = 100.0;
        const MAX_SPEED: f32 = TWO_PI; // 60 rpm
        const DEADZONE: f32 = 0.01;

        let base = world.multibody_mut(self.base_handle).unwrap();
        let joint = base
            .link_mut(self.link_id)
            .unwrap()
            .joint_mut()
            .downcast_mut::<RevoluteJoint<f32>>()
            .unwrap();

        let target = self.target.get();
        let raw_angle_diff = (target + self.origin) - joint.angle();

        // normalize angle diff
        let mut norm_angle_diff = raw_angle_diff;
        while norm_angle_diff < 0.0 {
            norm_angle_diff += TWO_PI;
        }
        while norm_angle_diff > TWO_PI {
            norm_angle_diff -= TWO_PI;
        }

        // flip direction if diff is over half rotation
        let mut angle_diff = if norm_angle_diff > PI {
            norm_angle_diff - TWO_PI
        } else {
            norm_angle_diff
        };

        //deadzone
        if norm_angle_diff.abs() < DEADZONE {
            angle_diff = 0.0;
        }

        joint.set_desired_angular_motor_velocity(MAX_SPEED.min(angle_diff)*K_SPEED);
        joint.set_max_angular_motor_torque(MAX_TQ.min(angle_diff.abs()*K_TQ));
        joint.enable_angular_motor();
    }
}<filename>src/arraystring/traits.rs
mod as_mut;
mod as_ref;
mod borrow;
mod clone;
mod debug;
mod default;
mod deref;
mod display;
mod eq;
mod fmt_write;
mod from_str;
mod hash;
mod ord;
mod try_from;
<reponame>jamcleod/gdbstub<gh_stars>0
//! Implementations for the MIPS architecture.

use crate::arch::Arch;

pub mod reg;

/// Implements `Arch` for 32-bit MIPS.
#[derive(Eq, PartialEq)]
pub struct Mips;

/// Implements `Arch` for 64-bit MIPS.
#[derive(Eq, PartialEq)]
pub struct Mips64;

impl Arch for Mips {
    type Usize = u32;
    type Registers = reg::MipsCoreRegs<u32>;

    fn target_description_xml() -> Option<&'static str> {
        Some(r#"<target version="1.0"><architecture>mips</architecture></target>"#)
    }
}

impl Arch for Mips64 {
    type Usize = u64;
    type Registers = reg::MipsCoreRegs<u64>;

    fn target_description_xml() -> Option<&'static str> {
        Some(r#"<target version="1.0"><architecture>mips64</architecture></target>"#)
    }
}
use std::path::Path;

use sdl2::event::Event;
use sdl2::keyboard::Scancode;
use sdl2::rect::Rect;
use std::time::Instant;
use std::collections::VecDeque;
use rand::Rng;

#[derive(Clone, Copy, Debug, Eq, PartialEq)]
enum Direction {
    Up,
    Right,
    Down,
    Left,
}

impl From<u32> for Direction {


# scripts/graph_data_prep.py

import torch
import networkx as nx
from torch_geometric.data import Data
import pandas as pd # Needed for context if mapping node IDs to something else

def networkx_to_pyg_data(G_nx, entity_to_id_map=None):
    """
    Converts a NetworkX graph to a PyTorch Geometric Data object.

    Args:
        G_nx (nx.Graph or nx.DiGraph): The NetworkX graph.
        entity_to_id_map (dict, optional): A dictionary mapping entity names (nodes in G_nx)
                                           to unique integer IDs. If None, it will create one.

    Returns:
        torch_geometric.data.Data: The PyG Data object.
        dict: The created or passed entity_to_id_map.
    """
    print("Converting NetworkX graph to PyTorch Geometric Data object...")

    if not G_nx.number_of_nodes():
        print("Warning: NetworkX graph is empty. Returning empty PyG Data object.")
        return Data(edge_index=torch.empty((2, 0), dtype=torch.long), num_nodes=0), {}

    if entity_to_id_map is None:
        # Create a mapping from original node labels (entity names) to contiguous integers
        entity_to_id_map = {node: i for i, node in enumerate(G_nx.nodes())}

    # Map edges to new integer IDs
    edge_index = []
    for u, v in G_nx.edges():
        if u in entity_to_id_map and v in entity_to_id_map: # Ensure entities exist in map
            edge_index.append([entity_to_id_map[u], entity_to_id_map[v]])

    if not edge_index:
        print("Warning: No valid edges found after mapping to integer IDs. Returning empty PyG Data object.")
        return Data(edge_index=torch.empty((2, 0), dtype=torch.long), num_nodes=len(entity_to_id_map)), entity_to_id_map

    edge_index = torch.tensor(edge_index, dtype=torch.long).t().contiguous()

    # You can add node features (x) here if you have any, e.g., BERT embeddings of entities themselves.
    # For now, we'll create a dummy node feature tensor if no features are available.
    # Later, you might use pre-trained entity embeddings or BERT embeddings of entity names.
    num_nodes = len(entity_to_id_map)
    x = torch.eye(num_nodes) # Identity matrix as initial node features (one-hot encoding)
                             # In more advanced models, this would be meaningful embeddings.

    data = Data(x=x, edge_index=edge_index, num_nodes=num_nodes)
    print(f"PyG Data object created with {data.num_nodes} nodes and {data.num_edges} edges.")
    return data, entity_to_id_map

# This script will primarily be imported by main.py


_count; id_index++)
	{
		slim_objectid_t id = SLiMCastToObjectidTypeOrRaise(ids_data[id_index]);
		InteractionType *object = InteractionTypeWithID(id);

		if (!object)
			EIDOS_TERMINATION << "ERROR (Community::ExecuteMethod_interactionTypesWithIDs): interactionTypesWithIDs() did not find an interaction type with id " << id << "." << EidosTerminate();

		vec->set_object_element_no_check_NORR(object, id_index);
	}

	return EidosValue_SP(vec);
}

//	*********************	– (object<MutationType>)mutationTypesWithIDs(integer ids)
//
EidosValue_SP Community::ExecuteMethod_mutationTypesWithIDs(EidosGlobalStringID p_method_id, const std::vector<EidosValue_SP> &p_arguments, EidosInterpreter &p_interpreter)
{
#pragma unused (p_method_id, p_interpreter)
	EidosValue *ids_value = p_arguments[0].get();
	int ids_count = ids_value->Count();
	const int64_t *ids_data = ids_value->IntData();
	EidosValue_Object *vec = (new (gEidosValuePool->AllocateChunk()) EidosValue_Object(gSLiM_MutationType_Class))->resize_no_initialize_RR(ids_count);

	for (int id_index = 0; id_index < ids_count; id_index++)
	{
		slim_objectid_t id = SLiMCastToObjectidTypeOrRaise(ids_data[id_index]);
		MutationType *object = MutationTypeWithID(id);

		if (!object)
			EIDOS_TERMINATION << "ERROR (Community::ExecuteMethod_mutationTypesWithIDs): mutationTypesWithIDs() did not find a mutation type with id " << id << "." << EidosTerminate();

		vec->set_object_element_no_check_NORR(object, id_index);
	}

	return EidosValue_SP(vec);
}

//	*********************	– (object<SLiMEidosBlock>)scriptBlocksWithIDs(integer ids)
//
EidosValue_SP Community::ExecuteMethod_scriptBlocksWithIDs(EidosGlobalStringID p_method_id, const std::vector<EidosValue_SP> &p_arguments, EidosInterpreter &p_interpreter)
{
#pragma unused (p_method_id, p_interpreter)
	EidosValue *ids_value = p_arguments[0].get();
	int ids_count = ids_value->Count();
	const int64_t *ids_data = ids_value->IntData();
	EidosValue_Object *vec = (new (gEidosValuePool->AllocateChunk()) EidosValue_Object(gSLiM_SLiMEidosBlock_Class))->resize_no_initialize_RR(ids_count);

	for (int id_index = 0; id_index < ids_count; id_index++)
	{
		slim_objectid_t id = SLiMCastToObjectidTypeOrRaise(ids_data[id_index]);
		SLiMEidosBlock *object = ScriptBlockWithID(id);

		if (!object)
			EIDOS_TERMINATION << "ERROR (Community::ExecuteMethod_scriptBlocksWithIDs): scriptBlocksWithIDs() did not find a script block with id " << id << "." << EidosTerminate();

		vec->set_object_element_no_check_NORR(object, id_index);
	}

	return EidosValue_SP(vec);
}

//	*********************	– (object<Species>)speciesWithIDs(integer ids)
//
EidosValue_SP Community::ExecuteMethod_speciesWithIDs(EidosGlobalStringID p_method_id, const std::vector<EidosValue_SP> &p_arguments, EidosInterpreter &p_interpreter)
{
#pragma unused (p_method_id, p_interpreter)
	EidosValue *ids_value = p_arguments[0].get();
	int ids_count = ids_value->Coun


>;
    }

    mkpath(path: string) {
        return this.client.filesCreateFolder({ path }) as Promise<undefined>;
    }
}
interface PaymentManager{
    doPayment(payeename:string,paymentcreds:number,paymentMode:string,payeeIFSCcode:any):string;
    getPaymentStatus(refId: string):string;
}
class UPIPaymentManagerImpl implements PaymentManager{
    public doPayment(payeename:string,paymentcreds:number,paymentMode:string,payeeIFSCcode:any):string
    {
        return `Payee name:${payeename} amount: ${paymentcreds} payment mode: ${paymentMode} IFSC code:${payeeIFSCcode} `;
    }
    public getPaymentStatus(refId: string): string {
       return `Payment successful with this id ${refId} `;
    }
}
class CreditCardPaymentManagerImpl implements PaymentManager{
    public doPayment(payeename:string,paymentcreds:number,paymentMode:string,payeeIFSCcode:any):string
    {
        return `Payee name:${payeename} amount: ${paymentcreds} payment mode: ${paymentMode} IFSC code:${payeeIFSCcode} `;
    }
    public getPaymentStatus(refId: string): string {
       return `Payment successful with this id ${refId} `;
    }
}
let upi:UPIPaymentManagerImpl=new UPIPaymentManagerImpl();
console.log(upi.doPayment('gayathri',10000,'gpay','ABCD123'));
console.log(upi.getPaymentStatus('8484848484'));
let ccp:CreditCardPaymentManagerImpl=new CreditCardPaymentManagerImpl();
console.log(ccp.doPayment('keerthi',20000,'phonepay','EFGH456'));
console.log(ccp.getPaymentStatus('4848484848'));import { AuthGuard } from './auth.guard';
import * as moment from 'moment';

describe('AuthGuard', () => {

    let router;
    let authService;
    let notificationService;

    beforeEach(() => {
        router = jasmine.createSpyObj(['navigate']);
        authService = jasmine.createSpyObj(['getCurrentUser']);
        notificationService = jasmine.createSpyObj(['openSnackBar']);
    });

    it('create an instance', () => {
        const guard = new AuthGuard(router, notificationService, authService);
        expect(guard).toBeTruthy();
    });

    it('returns false if user is null', () => {
        authService.getCurrentUser.and.returnValue(null);
        const guard = new AuthGuard(router, notificationService, authService);

        const result = guard.canActivate();

        expect(result).toBe(false);
    });

    it('redirects to login if user is null', () => {
        authService.getCurrentUser.and.returnValue(null);
        const guard = new AuthGuard(router, notificationService, authService);

        guard.canActivate();

        expect(router.navigate).toHaveBeenCalledWith(['auth/login']);
    });

    it('does not display expired notification if user is null', () => {
        authService.getCurrentUser.and.returnValue(null);
        const guard = new AuthGuard(router, notificationService, authService);

        guard.canActivate();

        expect(notificationService.openSnackBar).toHaveBeenCalledTimes(0);
    });

    it('redirects to login if user session has expired', () => {
        const user = { expiration: moment().add(-1, 'minutes') };
        authService.getCurrentUser.and.returnValue(user);
        const guard = new AuthGuard(router, notificationService, authService);

        guard.canActivate();

        expect(router.navigate).toHaveBeenCalledWith(['auth/login']);
    });

    it('displays notification if user session has expired', () => {
        const user = { expiration:


ige-super-admin') || hasPermission(returnObject, 'READ')")
    fun findByCatalog_IdentifierAndUuid(catalog_identifier: String, uuid: String): DocumentWrapper

    @PostAuthorize("hasAnyAuthority('ROLE_cat-admin', 'ROLE_ige-super-admin') || hasPermission(returnObject, 'READ')")
    fun findAllByCatalog_IdentifierAndResponsibleUser_Id(catalog_identifier: String, responsibleUser_id: Int): List<DocumentWrapper>

    @PostAuthorize("hasAnyAuthority('ROLE_cat-admin', 'ROLE_ige-super-admin') || hasPermission(returnObject, 'READ')")
    @Query("SELECT dw.*, 0 as countChildren FROM document_wrapper dw JOIN catalog cat ON dw.catalog_id = cat.id WHERE cat.identifier = ?1 AND dw.uuid = ?2", nativeQuery = true)
    fun findByCatalogAndUuidIncludingDeleted(catalogIdentifier: String, uuid: String): DocumentWrapper

    @Deprecated("Is not secured")
    @Query("SELECT d.parent FROM DocumentWrapper d WHERE d.id = ?1")
    fun getParentWrapper(id: Int): DocumentWrapper?

    // TODO: add permission check
    @Deprecated("Is not secured")
    @Query("SELECT d, dw.id as wrapperId FROM DocumentWrapper dw JOIN Document d ON dw.uuid = d.uuid WHERE dw.deleted = 0 AND d.catalog.identifier = ?1 AND dw.catalog.identifier = ?1 AND d.uuid = ?2 AND d.state = ?3")
    fun getDocumentByState(catalogIdentifier: String, uuid: String, state: DocumentState): Array<Any>

    @PostFilter("hasAnyAuthority('ROLE_cat-admin', 'ROLE_ige-super-admin') || hasPermission(filterObject, 'READ')")
    fun findAllByCatalog_IdentifierAndParent_IdAndCategory(
        catalog_identifier: String,
        parentUuid: Int?,
        category: String,
    ): List<DocumentWrapper>

    @PostFilter("hasAnyAuthority('ROLE_cat-admin', 'ROLE_ige-super-admin') || hasPermission(filterObject, 'READ')")
    fun findByParent_id(parent_id: Int): List<DocumentWrapper>

    @Query(
        "SELECT dw.id FROM document_wrapper dw, document doc WHERE dw.uuid = doc.uuid AND dw.parent_id = ?1 AND dw.deleted = 0 AND (doc.state = 'PUBLISHED' OR doc.type = 'FOLDER')",
        nativeQuery = true,
    )
    fun findByParentIdAndPublished(parentId: Int): List<Int>

    @Deprecated("Is not secured")
    @Query("SELECT d FROM DocumentWrapper d WHERE d.catalog.identifier = ?1 AND d.category = 'data' AND d.type != 'FOLDER' AND d.deleted != 1")
    fun findAllDataDocumentsByCatalog_Identifier(catalog_identifier: String): List<DocumentWrapper>

    @Deprecated("Is not secured")
    @Query("SELECT d FROM DocumentWrapper d WHERE d.catalog.identifier = ?1 AND d.category = 'data' AND d.deleted != 1")
    fun findAllDataDocumentsAndFoldersByCatalog_Identifier(catalog_identifier: String): List<DocumentWrapper>

    @PostFilter("hasAnyAuthority('ROLE_cat-admin', 'ROLE_ige-super-admin') || hasPermission(filterObject, 'READ')")
    @Query("SELECT dw FROM DocumentWrapper dw JOIN Document doc ON dw.uuid = doc.uuid WHERE dw.catalog.identifier = ?1 AND doc.state = 'PENDING' AND dw.type != 'FOLDER' AND dw.deleted = 0")
    fun findAllPending(catalogId: String): List<DocumentWrapper>

    @PreAuthorize("hasPermission(#id, 'de.ingrid.igeserver.persistence.postgresql.jpa.model.ige.DocumentWrapper', 'WRITE')")
    override fun deleteById(id: Int)

    @Modifying
    @PreAuthorize("hasPermission(#wrapperId, 'de.ingrid.igeserver.persistence.postgresql.jpa.model.ige.DocumentWrapper', 'WRITE')")
    @Query(


ews(newsId, callback) {
        console.log('its running');
        newsId = newsId.split(" ").join("");
        var xhttp = new XMLHttpRequest();
        xhttp.open("POST", "/news/ajaxGetMztNews?t=" + newsId, true);
        xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xhttp.onreadystatechange = function () {
            if (this.readyState == 4 && this.status == 200) {
                try {
                    var news = JSON.parse(this.responseText);
                    if ("result" in news) {
                        console.log('wrongresponse');
                    } else {
                        callback(news, newsId);
                    }
                } catch (e) {
                    console.log(e);
                }
            }
        };
        xhttp.send("nid=" + newsId);
    }

    function addMztBlock(news, idString) {
        var element = document.body.querySelector('.mztBlock[data-id="' + idString + '"]');
        if (typeof element !== 'undefined') {
            element.innerHTML = getMztBlock(news);
        }
    }

    function getMztBlock(news) {
        var mztStart =
            '\n
\n
\n
MEHR ZUM THEMA
\n
';
        var mztEnd = "
";
        var blockContent = "\n              "
            .concat(mztStart, "\n              ")
            .concat(news.map(newsTemplate).join(""), "\n              ")
            .concat(mztEnd, "\n            ");
        return blockContent;
    }

    function newsTemplate(news) {
        return '
\n                        \n                            \n\n
\n                            '
            )
            .concat(news.ort, '\n                            \n
')
            .concat(
                news.headline,
                "
\n                            \n
"
            )
            .concat(
                news.antext,
                "
\n
\n                        \n
\n            "
            );
    }

    $(document).ready(function () {
        var ref = document.referrer;
        var data = new FormData();
        data.append('ref', ref);
        data.append('nid', 23578);

        var xhr = new XMLHttpRequest();
        xhr.open('POST', 'https://kinzig.news/api/storeStats?rand=' + getRndInteger(1, 99999999), true);
        xhr.onload = function () {
        };
        xhr.send(data);

        console.log(ref);

        var mztBlocks = document.getElementsByClassName('mztBlock');
        Array.prototype.forEach.call(mztBlocks, function (el) {
            getMztNews(el.dataset.id, addMztBlock)
        });

    });
    /*
        var request = new XMLHttpRequest();
        var url = 'https://kinzig.news' + ref;
        request.open('POST', 'https://osthessen-news-dev.appspot.com/?nid=11640270&source=desktop&ref=' +


 fn parse_hex_as_bignum(mut val: String) -> Result<BigNum, SerzDeserzError> {
        // Logic almost copied from AMCL but with error handling and constant time execution.
        // Constant time is important as hex is used during serialization and deserialization.
        // A seemingly effortless solution is to filter string for errors and pad with 0s before
        // passing to AMCL but that would be expensive as the string is scanned twice

        // Given hex cannot be bigger than max byte size
        if val.len() > FieldElement_SIZE * 2 {
            return Err(SerzDeserzError::FieldElementBytesIncorrectSize(
                val.len(),
                FieldElement_SIZE,
            ));
        }

        // Pad the string for constant time parsing.
        while val.len() < FieldElement_SIZE * 2 {
            val.insert(0, '0');
        }

        let mut res = BigNum::new();
        for i in 0..val.len() {
            match u8::from_str_radix(&val[i..i + 1], 16) {
                Ok(n) => res.w[0] += n as Limb,
                Err(_) => return Err(SerzDeserzError::RequiredHexChar),
            }
            if i == (val.len() - 1) {
                break;
            }
            res.shl(4);
        }
        return Ok(res);
    }
}

impl Serialize for FieldElement {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: Serializer,
    {
        serializer.serialize_newtype_struct("FieldElement", &self.to_hex())
    }
}
impl<'a> Deserialize<'a> for FieldElement {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: Deserializer<'a>,
    {
        struct FieldElementVisitor;

        impl<'a> Visitor<'a> for FieldElementVisitor {
            type Value = FieldElement;

            fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
                formatter.write_str("expected FieldElement")
            }

            fn visit_str<E>(self, value: &str) -> Result<FieldElement, E>
            where
                E: DError,
            {
                Ok(FieldElement::from_hex(value.to_string()).map_err(DError::custom)?)
            }
        }

        deserializer.deserialize_str(FieldElementVisitor)
    }
}

impl From<u8> for FieldElement {
    fn from(x: u8) -> Self {
        Self {
            value: BigNum::new_int(x as isize),
        }
    }
}

impl From<u32> for FieldElement {
    fn from(x: u32) -> Self {
        Self {
            value: BigNum::new_int(x as isize),
        }
    }
}

impl From<u64> for FieldElement {
    fn from(x: u64) -> Self {
        Self {
            value: BigNum::new_int(x as isize),
        }
    }
}

impl From<i32> for FieldElement {
    fn from(x: i32) -> Self {
        Self {
            value: BigNum::new_int(x as isize),
        }
    }
}

impl From<BigNum> for FieldElement {
    fn from(x: BigNum) -> Self {
        Self { value: x }
    }
}

impl From<&[u8; FieldElement_SIZE]> for FieldElement {
    fn from(x: &[u8; FieldElement_SIZE]) -> Self {
        let mut n = BigNum::frombytes(x);
        n.rmod(&CurveOrder);
        Self { value: n }
    }
}

impl Parti


ED_OUT_FEDERATED_TOKENS_INVALID,
  SIGNED_OUT_USER_POOLS_TOKENS_INVALID,
  SIGNED_OUT,
  UNKNOWN,
}

enum SignInState {
  /// Next challenge is to supply an SMS_MFA_CODE, delivered via SMS.
  SMS_MFA,

  /// Next challenge is to supply PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after the client-side SRP calculations.
  PASSWORD_VERIFIER,

  /// This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued.
  CUSTOM_CHALLENGE,

  /// If device tracking was enabled on your user pool and the previous challenges were passed, this challenge is returned so that Amazon Cognito can start tracking this device.
  DEVICE_SRP_AUTH,

  /// Similar to PASSWORD_VERIFIER, but for devices only.
  DEVICE_PASSWORD_VERIFIER,

  /// This is returned if you need to authenticate with USERNAME and PASSWORD directly. An app client must be enabled to use this flow.
  ADMIN_NO_SRP_AUTH,

  /// For users which are required to change their passwords after successful first login. This challenge should be passed with NEW_PASSWORD and any other required attributes.
  NEW_PASSWORD_REQUIRED,

  /// The flow is completed and no further steps are possible.
  DONE,

  /// Unknown sign-in state, potentially unsupported state
  UNKNOWN
}

enum ForgotPasswordState { CONFIRMATION_CODE, DONE, UNKNOWN }

/// Determines where the confirmation code was sent.
class UserCodeDeliveryDetails {
  final String attributeName, destination, deliveryMedium;

  UserCodeDeliveryDetails._internal(List msg)
      : attributeName = msg[0],
        destination = msg[1],
        deliveryMedium = msg[2];

  factory UserCodeDeliveryDetails.fromMsg(List msg) {
    if (msg.length < 3) return null;
    return UserCodeDeliveryDetails._internal(msg);
  }

  @override
  String toString() {
    return "UserCodeDeliveryDetails { attributeName: $attributeName, "
        "destination: $destination, deliveryMedium: $deliveryMedium }";
  }
}

/// The result from signing-in. Check the state to determine the next step.
class SignInResult {
  final SignInState signInState;

  /// Used to determine the type of challenge that is being present from the service
  final Map<String, String> parameters;
  final UserCodeDeliveryDetails userCodeDeliveryDetails;

  @override
  String toString() {
    return "SignInResult { signInState: $signInState, parameters: $parameters, "
        "userCodeDeliveryDetails: $userCodeDeliveryDetails }";
  }

  SignInResult.fromMsg(List msg)
      : signInState = SignInState.values[msg[0]],
        parameters = (msg[1] == null) ? null : Map<String, String>.from(msg[1]),
        userCodeDeliveryDetails =
            UserCodeDeliveryDetails.fromMsg(msg.sublist(2));
}

/// The result of a sign up action. Check the confirmation state and delivery details to proceed.
class SignUpResult {
  /// - [true] -> user is confirmed, no further action is necessary.
  /// - [false] -> check delivery


d exits early when it is an empty array [#9024](https://github.com/pnpm/pnpm/pull/9024).
- a2a4509: Sort the package names in the "pnpm.onlyBuiltDependencies" list saved by `pnpm approve-builds`.
- Updated dependencies [1e229d7]
  - @pnpm/read-project-manifest@1000.0.5
  - @pnpm/plugin-commands-rebuild@1001.1.5
  - @pnpm/config@1002.2.1

## 1000.0.0

### Major Changes

- 961dc5d: Added a new command for printing the list of dependencies with ignored build scripts: `pnpm ignored-builds` [#8963](https://github.com/pnpm/pnpm/pull/8963).
- 961dc5d: Added a new command for approving dependencies for running scripts during installation: `pnpm approve-builds` [#8963](https://github.com/pnpm/pnpm/pull/8963).

### Patch Changes

- Updated dependencies [f3ffaed]
- Updated dependencies [c96eb2b]
  - @pnpm/config@1002.2.0
  - @pnpm/plugin-commands-rebuild@1001.1.4
  - @pnpm/modules-yaml@1000.1.2
  - @pnpm/read-project-manifest@1000.0.4
# @pnpm/plugin-commands-script-runners

## 1001.0.12

### Patch Changes

- 2b6100d: `pnpm dlx` should request the full metadata of packages, when `minimumReleaseAge` is set [#9963](https://github.com/pnpm/pnpm/issues/9963).
  - @pnpm/plugin-commands-installation@1004.6.7
  - @pnpm/client@1001.1.1
  - @pnpm/plugin-commands-env@1000.0.41
  - @pnpm/cli-utils@1001.2.5
  - @pnpm/deps.status@1003.0.12

## 1001.0.11

### Patch Changes

- @pnpm/plugin-commands-installation@1004.6.6

## 1001.0.10

### Patch Changes

- fddd85b: `pnpm dlx` should not fail when `minimumReleaseAge` is set [#10037](https://github.com/pnpm/pnpm/issues/10037).
  - @pnpm/plugin-commands-installation@1004.6.5

## 1001.0.9

### Patch Changes

- Updated dependencies [fb4da0c]
- Updated dependencies [93fdc73]
- Updated dependencies [a514bc0]
  - @pnpm/client@1001.1.0
  - @pnpm/config@1004.4.0
  - @pnpm/plugin-commands-installation@1004.6.4
  - @pnpm/lifecycle@1001.0.23
  - @pnpm/crypto.hash@1000.2.1
  - @pnpm/read-project-manifest@1001.1.3
  - @pnpm/cli-utils@1001.2.4
  - @pnpm/deps.status@1003.0.11
  - @pnpm/plugin-commands-env@1000.0.40
  - @pnpm/workspace.injected-deps-syncer@1000.0.14

## 1001.0.8

### Patch Changes

- @pnpm/cli-utils@1001.2.3
- @pnpm/plugin-commands-installation@1004.6.3
- @pnpm/client@1001.0.7
- @pnpm/plugin-commands-env@1000.0.39
- @pnpm/deps.status@1003.0.10

## 1001.0.7

### Patch Changes

- @pnpm/cli-utils@1001.2.2
- @pnpm/plugin-commands-installation@1004.6.2
- @pnpm/client@1001.0.6
- @pnpm/plugin-commands-env@1000.0.38
- @pnpm/deps.status@1003.0.9

## 1001.0.6

### Patch Changes

- @pnpm/config@1004.3.