dx,<mulr31=%r14
adc %rdx,%r14

# qhasm:   mulredmask = *(uint64 *) &CONST_REDMASK51
# asm 1: movq CONST_REDMASK51,>mulredmask=int64#2
# asm 2: movq CONST_REDMASK51,>mulredmask=%rsi
movq CONST_REDMASK51,%rsi

# qhasm:   mulr01 = (mulr01.rz0) << 13
# asm 1: shld $13,<rz0=int64#4,<mulr01=int64#5
# asm 2: shld $13,<rz0=%rcx,<mulr01=%r8
shld $13,%rcx,%r8

# qhasm:   rz0 &= mulredmask
# asm 1: and  <mulredmask=int64#2,<rz0=int64#4
# asm 2: and  <mulredmask=%rsi,<rz0=%rcx
and  %rsi,%rcx

# qhasm:   mulr11 = (mulr11.rz1) << 13
# asm 1: shld $13,<rz1=int64#6,<mulr11=int64#8
# asm 2: shld $13,<rz1=%r9,<mulr11=%r10
shld $13,%r9,%r10

# qhasm:   rz1 &= mulredmask
# asm 1: and  <mulredmask=int64#2,<rz1=int64#6
# asm 2: and  <mulredmask=%rsi,<rz1=%r9
and  %rsi,%r9

# qhasm:   rz1 += mulr01
# asm 1: add  <mulr01=int64#5,<rz1=int64#6
# asm 2: add  <mulr01=%r8,<rz1=%r9
add  %r8,%r9

# qhasm:   mulr21 = (mulr21.rz2) << 13
# asm 1: shld $13,<rz2=int64#9,<mulr21=int64#10
# asm 2: shld $13,<rz2=%r11,<mulr21=%r12
shld $13,%r11,%r12

# qhasm:   rz2 &= mulredmask
# asm 1: and  <mulredmask=int64#2,<rz2=int64#9
# asm 2: and  <mulredmask=%rsi,<rz2=%r11
and  %rsi,%r11

# qhasm:   rz2 += mulr11
# asm 1: add  <mulr11=int64#8,<rz2=int64#9
# asm 2: add  <mulr11=%r10,<rz2=%r11
add  %r10,%r11

# qhasm:   mulr31 = (mulr31.rz3) << 13
# asm 1: shld $13,<rz3=int64#11,<mulr31=int64#12
# asm 2: shld $13,<rz3=%r13,<mulr31=%r14
shld $13,%r13,%r14

# qhasm:   rz3 &= mulredmask
# asm 1: and  <mulredmask=int64#2,<rz3=int64#11
# asm 2: and  <mulredmask=%rsi,<rz3=%r13
and  %rsi,%r13

# qhasm:   rz3 += mulr21
# asm 1: add  <mulr21=int64#10,<rz3=int64#11
# asm 2: add  <mulr21=%r12,<rz3=%r13
add  %r12,%r13

# qhasm:   mulr41 = (mulr41.rz4) << 13
# asm 1: shld $13,<rz4=int64#13,<mulr41=int64#14
# asm 2: shld $13,<rz4=%r15,<mulr41=%rbx
shld $13,%r15,%rbx

# q


bytes::Bytes,
    /// Integrity verification field. A CRC32C checksum of the returned
    /// \[AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext\].
    /// An integrity check of
    /// \[AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext\]
    /// can be performed by computing the CRC32C checksum of
    /// \[AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext\]
    /// and comparing your results to this field. Discard the response in case of
    /// non-matching checksum values, and perform a limited number of retries. A
    /// persistent mismatch may indicate an issue in your computation of the CRC32C
    /// checksum. Note: This field is defined as int64 for reasons of compatibility
    /// across different languages. However, it is a non-negative integer, which
    /// will never exceed 2^32-1, and can be safely downconverted to uint32 in
    /// languages that support this type.
    #[prost(message, optional, tag="2")]
    pub plaintext_crc32c: ::core::option::Option<i64>,
    /// Integrity verification field. A flag indicating whether
    /// \[AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c\]
    /// was received by
    /// \[KeyManagementService][google.cloud.kms.v1.KeyManagementService\] and used
    /// for the integrity verification of the
    /// \[ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext\]. A
    /// false value of this field indicates either that
    /// \[AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c\]
    /// was left unset or that it was not delivered to
    /// \[KeyManagementService][google.cloud.kms.v1.KeyManagementService\]. If you've
    /// set
    /// \[AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c\]
    /// but this field is still false, discard the response and perform a limited
    /// number of retries.
    #[prost(bool, tag="3")]
    pub verified_ciphertext_crc32c: bool,
    /// The \[ProtectionLevel][google.cloud.kms.v1.ProtectionLevel\] of the
    /// \[CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion\] used in
    /// decryption.
    #[prost(enumeration="ProtectionLevel", tag="4")]
    pub protection_level: i32,
}
/// Response message for
/// \[KeyManagementService.MacSign][google.cloud.kms.v1.KeyManagementService.MacSign\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MacSignResponse {
    /// The resource name of the
    /// \[CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion\] used for signing.
    /// Check this field to verify that the intended resource was used for signing.
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// The created signature.
    #[prost(bytes="bytes", tag="2")]
    pub mac: ::prost::bytes::Bytes,
    /// Integrity verification field. A CRC32C checksum of the returned
    /// \[MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac\]. An
    /// integrity check of
    /// \[MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac\] can be
    /// performed by computing the CRC32C checksum of
    /// \[MacSignResponse.mac][google.cloud.kms.v1.MacSignR


554004BA392CC554D97893BC6DF55153F197CC425121B5FD1C20B9BE21DD998E303EA23D600C0",
            "message": "A2B78CC4A1D4D2149BB4BF1170B94657367F602547012CF026D364F32AAC3E6848F7A345DFECE34466CEE3E45B303ED2CC43CC178ED8FA46FC6CB0851939E27F991A41AF8C139A0296EFFD4148295DD6587D2C0C2BD8828AA630587AEF7A33640F2B0DB8069750F950F8EF1162A07655E79FFF4C9EF2AAA6D24846DC0CEBFA86",
            "testPassed": false
          },
          {
            "tcId": 285,
            "qx": "012128717872498A61F4C165019E94C70CF8869201150F983ACAED461B8B60CEFA2F9F4753147AAB6AB7A8C889413E5528106D3FCF6BE58E4EB0944AD20A8B36F86A",
            "qy": "01540D77FC9C1513B5F39723560D3DE46C071F878CCE2026F3C5CD291E1D652F803CC3B91F3E5E1AAF888CDB2CBA3AC87628761011557E2CEDA711203AF7E05130FB",
            "r": "003DB0E90D8B954FBCDCC008035B5C35F815CF9459E3B3048B46898ED920BE56C420A789FB0FA613C7888B3A06A037BEFE7A49F866AFC84C3DCC3EA6FB1B35CBDCA7",
            "s": "00C7E50EDBACB02456A24C48C740355DC54AE02612A32280F7CDBC5942CD9E39045891DC1384EAC748013DEAEA6A86F3D20D5879C9643D10EA677386F0A30679C992",
            "message": "2BD5B71FE0E9BB7A02E8A33C3812B25315418DFE8F884782B53308CF24F4B0123610F81AA4B73098199D0FFD83915EFA7375D88172FFE223F05BD71182D41712E626CE960C26C8EEC200FD71AC37DE8C448BA33B06963804A604406DA5F398170FBC35611EA28517B1DE18AB04892831C97C041BEC26CE1B88ED39923E7ACCDB",
            "testPassed": true
          }
        ]
      },
      {
        "tgId": 20,
        "hashAlg": "SHA2-512",
        "curve": "P-521",
        "tests": [
          {
            "tcId": 286,
            "qx": "004A5A9B670D577A524AFA338653BA393EE79431D11621DCD0F5C205EA01C7A62E85F8B6F7E5EEE88D3AD5F653DE4FCD33738880E88803F1A9B105EC2AFCD0A45C41",
            "qy": "015F037F5834792D162194163FE6B51EC8704A245878FE3173D6F7C09D63739300BC4A449D5A8A3FC67DE9E7DCDEB0676D2508726FC6B7EE4A41250CE823A86D15F1",
            "r": "018EF78319B77DE0C7D898A3775C


#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/ioctl.h>
#if EMSCRIPTEN
#include <emscripten.h>
#endif

#include "websockets_bigdata.h"

#define EXPECTED_BYTES DATA_SIZE

int SocketFD;

unsigned int get_all_buf(int sock, char* output, unsigned int maxsize)
{
  int bytes;
  if (ioctl(sock, FIONREAD, &bytes)) return 0;
  if (bytes == 0) return 0;

  char buffer[EXPECTED_BYTES];
  int n;
  unsigned int offset = 0;
  while((errno = 0, (n = recv(sock, buffer, sizeof(buffer), 0))>0) ||
    errno == EINTR) {
    if(n>0)
    {
      if (((unsigned int) n)+offset > maxsize) { fprintf(stderr, "too much data!"); exit(EXIT_FAILURE); }
      memcpy(output+offset, buffer, n);
      offset += n;
    }
  }

  if(n < 0 && errno != EAGAIN && errno != EWOULDBLOCK) {
    fprintf(stderr, "error in get_all_buf!");
    exit(EXIT_FAILURE);
  }
  return offset;
}

int done = 0;

void iter(void *arg) {
  /* perform read write operations ... */
  static char out[EXPECTED_BYTES];
  static int pos = 0;
  printf("so far %d, expecting up to %d\n", pos, EXPECTED_BYTES-pos);
  int n = get_all_buf(SocketFD, out+pos, EXPECTED_BYTES-pos);
  if (n) printf("read! %d\n", n);
  pos += n;
  if (pos >= EXPECTED_BYTES) {
    shutdown(SocketFD, SHUT_RDWR);

    close(SocketFD);

    done = 1;

    emscripten_cancel_main_loop();

#if EMSCRIPTEN
    char *comp = generateData();
    int result = strcmp(comp, out);
    if (result != 0) {
      for (int i = 0; i < DATA_SIZE; i++) {
        printf("%d:%d\n", comp[i], out[i]);
      }
    }
    REPORT_RESULT();
#endif
  }
}

int main(void)
{
  printf("hello from main page\n");

  struct sockaddr_in stSockAddr;
  int Res;
  SocketFD = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);

  if (-1 == SocketFD)
  {
    perror("cannot create socket");
    exit(EXIT_FAILURE);
  }

  memset(&stSockAddr, 0, sizeof(stSockAddr));

  stSockAddr.sin_family = AF_INET;
  stSockAddr.sin_port = htons(
#if EMSCRIPTEN
    3993
#else
    3992
#endif
  );
  Res = inet_pton(AF_INET, "127.0.0.1", &stSockAddr.sin_addr);

  if (0 > Res) {
    perror("error: first parameter is not a valid address family");
    close(SocketFD);
    exit(EXIT_FAILURE);
  } else if (0 == Res) {
    perror("char string (second parameter does not contain valid ipaddress)");
    close(SocketFD);
    exit(EXIT_FAILURE);
  }

  if (-1 == connect(SocketFD, (struct sockaddr *)&stSockAddr, sizeof(stSockAddr))) {
    perror("connect failed");
    close(SocketFD);
    exit(EXIT_FAILURE);

  }

#if EMSCRIPTEN
  emscripten_run_script("console.log('adding iframe');"
                        "var iframe = document.createElement('iframe');"
                        "iframe.src = 'side.html';"
                        "iframe.width = '100%';"
                        "iframe.width = '40%';"
                        "document.body.appendChild(iframe);"
                        "console.log('added.');");
  emscripten_set_main_loop(iter, 3, 0);
#else
  while (!done) iter(NULL);
#endif

  return EXIT_SUCCESS;
}


addressing
SetupPointers:
         MOV   W8, CORCON               ; set PSV and saturation options

         MOV  [w3+oTapsEnd],w8
         MOV  w8, XMODEND	        ; XMODEND = end address of filter coefficients
         MOV  [w3+oTapsBase],w8    ; w8 = base address of taps/filter coefficients
         MOV  w8, XMODSRT		; XMODSRT = base address of filter coefficients

         MOV  [w3+oDelayEnd],w10
         MOV  w10, YMODEND		; YMODEND = end address of delay line
         MOV  [w3+oDelayBase],w10
         MOV  w10, YMODSRT		; YMODSRT = base address of delay line

         MOV  [w3+oNumTaps],w4

         SUB  w4,#3, w4                 ; w4 = numTaps-3 (for repeat control)

		 MOV   #0xC0A8, w10             ; set XMD = W8 and YMD = W10
         MOV   w10, MODCON	        ; enable X & Y Modulus

         MOV  [w3+oDelayPtr],w10	   ; w10 = pointer to current delay sample
;..............................................................................
; Perform FIR filtering for one sample
         MOV  [w14--],[w10]              ; store new sample into delay line

; clear a, prefetch tap and sample pair, update ptrs
         CLR   A, [w8]+=2, w5, [w10]+=2, w6

         REPEAT w4                      ; perform macs (except for last two)
         MAC  w5*w6, A, [w8]+=2, w5, [w10]+=2, w6

         MAC  w5*w6, A, [w8]+=2, w5, [w10], w6	; perform second-to-last MAC
         MAC  w5*w6, A				; perform last MAC

		; round, multiply by 2 and store result in AccA to data stack
         SAC.R  A, #-1, [++W14]

         MOV  w10,[w3+oDelayPtr]    ; update delay line pointer
                                    ; note: that the delay line pointer can have multiple
                                    ; wraps depending on the number of input samples
;---------------------------------------------------------------------------------

; ..............................................................................
; Cleanup(Context restore of selected registers)
         CLR MODCON                 ; disable modulo addressing
         POP  w10                   ; restore context of w10
         POP  w8                    ; restore context of w8
         RETURN                     ; exit
.endif

; sum[16] ( addr -- x ) Sum a word array of size 16
        .pword  paddr(9b)+PFLASH
9:
        .byte   NFA|INLINE|7
        .ascii  "sum[16]"
        .align  2
        mov     [W14--], W2
        clr     W1
        repeat  #15
        add     W1, [W2++], W1
        mov     W1, [++W14]
        return

.include "registers.inc"

        .pword  paddr(9b)+PFLASH
9:
        .byte   NFA|INLINE|3
        .ascii  "p2+"
        .align  2
PPLUS2:
        inc2    W13, W13
        return

.equ kernellink, 9b

;        .pword  paddr(TRUE_L)+PFLASH
DOTBASE_L:
;        .byte   NFA|2
;        .ascii  "b?"
        .align  2
DOTBASE:
        rcall   BASE
        rcall   FETCH
        mov     [W14], W0
        sub     W0, #0x10, W1
        bra     nz, DOTBASE1
        mov     #'$', W0
        bra     DOTBASEEND
DOTBASE1:
        sub     W0, #0xa, W1
        bra     nz, DOT


json);

    /// Deserializes the date from a JSON number.
    /// <param name="json">
    /// The JSON number to deserialize.
    /// </param>
    /// <returns>
    /// The deserialized date.
    /// </returns>
    [Pure]
    public static Id<TIdentifier> FromJson(long json) => new(behavior.FromJson(json));

    /// Creates the identfier for the <see cref="byte" /> array.
    /// <param name="bytes">
    /// The <see cref="byte" /> array that represents the underlying value.
    /// </param>
    [Pure]
    public static Id<TIdentifier> FromBytes(byte[]? bytes)
    {
        return bytes is not { Length: > 0 }
            ? Empty
            : new Id<TIdentifier>(behavior.FromBytes(bytes));
    }

    /// Creates an identifier from an <see cref="object" />.
    /// <param name="obj">
    /// The <see cref="object" /> to create an indentifier from.
    /// </param>
    /// <exception cref="InvalidCastException">
    /// if the identifier could not be created from the <see cref="object" />.


�를 이용하여 햄버거를 포장합니다. 즉, 2개의 햄버거를 포장하게 됩니다.

상수에게 전해지는 재료의 정보를 나타내는 정수 배열 ingredient가 주어졌을 때, 상수가 포장하는 햄버거의 개수를 return 하도록 solution 함수를 완성하시오.

제한사항

1 ≤ ingredient의 길이 ≤ 1,000,000

ingredient의 원소는 1, 2, 3 중 하나의 값이며, 순서대로 빵, 야채, 고기를 의미합니다.

입출력 예

ingredient
result

[2, 1, 1, 2, 3, 1, 2, 3, 1]
2

[1, 3, 2, 1, 2, 1, 3, 1, 2]
0

입출력 예 설명

입출력 예 #1

문제 예시와 같습니다.

입출력 예 #2

상수가 포장할 수 있는 햄버거가 없습니다.

> 출처: 프로그래머스 코딩 테스트 연습, https://school.programmers.co.kr/learn/challenges# [level 2] 전화번호 목록 - 42577

[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/42577)

### 성능 요약

메모리: 50.1 MB, 시간: 202.22 ms

### 구분

코딩테스트 연습 > 해시

### 채점결과

정확성: 83.3
효율성: 16.7
합계: 100.0 / 100.0

### 제출 일자

2024년 03월 22일 14:31:15

### 문제 설명

전화번


# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
"""Unit tests for the "list_rules" module."""

import unittest
from unittest import mock

from google.auth.transport import requests

from . import list_rules

class ListRulesTest(unittest.TestCase):

  @mock.patch.object(requests, "AuthorizedSession", autospec=True)
  @mock.patch.object(requests.requests, "Response", autospec=True)
  def test_http_error(self, mock_response, mock_session):
    mock_session.request.return_value = mock_response
    type(mock_response).status_code = mock.PropertyMock(return_value=400)
    mock_response.raise_for_status.side_effect = (
        requests.requests.exceptions.HTTPError())

    with self.assertRaises(requests.requests.exceptions.HTTPError):
      list_rules.list_rules(mock_session)

  @mock.patch.object(requests, "AuthorizedSession", autospec=True)
  @mock.patch.object(requests.requests, "Response", autospec=True)
  def test_happy_path_without_page_size(self, mock_response, mock_session):
    mock_session.request.return_value = mock_response
    type(mock_response).status_code = mock.PropertyMock(return_value=200)
    expected_rule = {
        "ruleId": "ru_12345678-1234-1234-1234-1234567890ab",
        "rule": "rule content",
        "metadata": {
            "author": "first_author",
            "contributor": "first_contributor",
        },
    }
    expected_page_token = "page token here"
    mock_response.json.return_value = {
        "rules": [expected_rule],
        "nextPageToken": expected_page_token,
    }

    rules, next_page_token = list_rules.list_rules(mock_session)
    self.assertEqual(len(rules), 1)
    self.assertEqual(rules[0], expected_rule)
    self.assertEqual(next_page_token, expected_page_token)

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


//ds-snippet-start:Rooms8Step4
            var formGroups = formGroupsApi.GetFormGroups(accountId);
            //ds-snippet-end:Rooms8Step4

            return (offices, formGroups);
        }

        /// <summary>
        /// Grants office access to a form group
        /// </summary>
        /// <param name="basePath">BasePath for API calls (URI)</param>
        /// <param name="accessToken">Access Token for API call (OAuth)</param>
        /// <param name="accountId">The DocuSign Account ID (GUID or short version) for which the APIs call would be made</param>
        /// <param name="formGroupId">The Id of the specified form group</param>
        /// <param name="officeId">The Id of the specified office</param>
        /// <returns></returns>
        public static void GrantAccess(
            string basePath,
            string accessToken,
            string accountId,
            string formGroupId,
            int? officeId)
        {
            // Construct your API headers
            //ds-snippet-start:Rooms8Step2
            var apiClient = new DocuSignClient(basePath);
            apiClient.Configuration.DefaultHeader.Add("Authorization", $"Bearer {accessToken}");
            var formGroupsApi = new FormGroupsApi(apiClient);
            //ds-snippet-end:Rooms8Step2

            // Call the Rooms API to grant office access to a form group
            //ds-snippet-start:Rooms8Step5
            formGroupsApi.GrantOfficeAccessToFormGroup(accountId, new Guid(formGroupId), officeId);
            //ds-snippet-end:Rooms8Step5
        }
    }
}


CompressedRgbaS3TCDxt1Ext = 0x83F1,
        [NativeName("Name", "GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE")]
        CompressedRgbaS3TCDxt3Angle = 0x83F2,
        [NativeName("Name", "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT")]
        CompressedRgbaS3TCDxt3Ext = 0x83F2,
        [NativeName("Name", "GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE")]
        CompressedRgbaS3TCDxt5Angle = 0x83F3,
        [NativeName("Name", "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT")]
        CompressedRgbaS3TCDxt5Ext = 0x83F3,
        [NativeName("Name", "GL_RGBA32F")]
        Rgba32f = 0x8814,
        [NativeName("Name", "GL_RGBA32F_ARB")]
        Rgba32fArb = 0x8814,
        [NativeName("Name", "GL_RGBA32F_EXT")]
        Rgba32fExt = 0x8814,
        [NativeName("Name", "GL_RGB32F")]
        Rgb32f = 0x8815,
        [NativeName("Name", "GL_RGB32F_ARB")]
        Rgb32fArb = 0x8815,
        [NativeName("Name", "GL_RGB32F_EXT")]
        Rgb32fExt = 0x8815,
        [NativeName("Name", "GL_RGBA16F")]
        Rgba16f = 0x881A,
        [NativeName("Name", "GL_RGBA16F_ARB")]
        Rgba16fArb = 0x881A,
        [NativeName("Name", "GL_RGBA16F_EXT")]
        Rgba16fExt = 0x881A,
        [NativeName("Name", "GL_RGB16F")]
        Rgb16f = 0x881B,
        [NativeName("Name", "GL_RGB16F_ARB")]
        Rgb16fArb = 0x881B,
        [NativeName("Name", "GL_RGB16F_EXT")]
        Rgb16fExt = 0x881B,
        [NativeName("Name", "GL_DEPTH24_STENCIL8")]
        Depth24Stencil8 = 0x88F0,
        [NativeName("Name", "GL_DEPTH24_STENCIL8_EXT")]
        Depth24Stencil8Ext = 0x88F0,
        [NativeName("Name", "GL_DEPTH24_STENCIL8_OES")]
        Depth24Stencil8Oes = 0x88F0,
        [NativeName("Name", "GL_R11F_G11F_B10F")]
        R11fG11fB10f = 0x8C3A,
        [NativeName("Name", "GL_R11F_G11F_B10F_APPLE")]
        R11fG11fB10fApple = 0x8C3A,
        [NativeName("Name", "GL_R11F_G11F_B10F_EXT")]
        R11fG11fB10fExt = 0x8C3A,
        [NativeName("Name", "GL_RGB9_E5")]
        Rgb9E5 = 0x8C3D,
        [NativeName("Name", "GL_RGB9_E5_APPLE")]
        Rgb9E5Apple = 0x8C3D,
        [NativeName("Name", "GL_RGB9_E5_EXT")]
        Rgb9E5Ext = 0x8C3D,
        [NativeName("Name", "GL_SRGB8")]
        Srgb8 = 0x8C41,
        [NativeName("Name", "GL_SRGB8_EXT")]
        Srgb8Ext = 0x8C41,
        [NativeName("Name", "GL_SRGB8_NV")]
        Srgb8NV = 0x8C41,
        [NativeName("Name", "GL_SRGB


dding:0;display:block;position:absolute;left:'+parseInt(v[0])+'px;top:'+parseInt(v[1])+'px;width:'+parseInt(v[2]-v[0])+'px;height:'+parseInt(v[3]-v[1])+'px;"><v:fill color="#'+c+'" opacity="'+o+'" /></v:rect>';
			}else if(obj.shape.toLowerCase()=='circle') {
				t += '<v:oval strokeweight="1" filled="t" stroked="'+(n<1?"t":"f")+'" strokecolor="#'+b+'" style="zoom:1;margin:0;padding:0;display:block;position:absolute;left:'+parseInt(v[0]-v[2])+'px;top:'+parseInt(v[1]-v[2])+'px;width:'+(parseInt(v[2])*2)+'px;height:'+(parseInt(v[2])*2)+'px;"><v:fill color="#'+c+'" opacity="'+o+'" /></v:oval>';
			}else {
				for(j=2;j<v.length;j+=2) {p += parseInt(v[j])+','+parseInt(v[j+1])+',';}
				t += '<v:shape strokeweight="1" filled="t" stroked="'+(n<1?"t":"f")+'" strokecolor="#'+b+'" coordorigin="0,0" coordsize="'+canvas.width+','+canvas.height+'" path="m '+parseInt(v[0])+','+parseInt(v[1])+' l '+p+' x e" style="zoom:1;margin:0;padding:0;display:block;position:absolute;top:0px;left:0px;width:'+canvas.width+'px;height:'+canvas.height+'px;"><v:fill color="#'+c+'" opacity="'+o+'" /></v:shape>';
			}}
		} canvas.innerHTML = t;
	}else if(isCV) {
		if(f<1) {canvas.fading = 0; canvas.style.opacity = 0;}
		context = canvas.getContext("2d");
		for(a=0;a<d.length;a++) {
			obj = document.getElementById(d[a]); if(obj) {
			l = obj.className, u = l.split(" "), v = obj.coords.split(",");
			if(k==0) {setAttr();} context.beginPath();
			if(obj.shape.toLowerCase()=='rect') {
				context.rect(0.5+parseInt(v[0]),0.5+parseInt(v[1]),parseInt(v[2]-v[0]),parseInt(v[3]-v[1])); context.closePath();
			}else if(obj.shape.toLowerCase()=='circle') {
				context.arc(0.5+parseInt(v[0]),0.5+parseInt(v[1]),parseInt(v[2]),0,(Math.PI/180)*360,false);
			}else {
				context.moveTo(parseInt(v[0]),parseInt(v[1])); for(j=2;j<v.length;j+=2) {context.lineTo(parseInt(v[j]),parseInt(v[j+1]));} context.closePath();
			} context.fillStyle = 'rgba('+c+','+o+')'; context.strokeStyle = 'rgba('+b+',1)'; context.fill(); if(n<1) {context.stroke();}}
		} if(f<1) {canvas.fading = 1; fadeCanvas(id,0);}
	}else {
		o = op; l = obj.className; u = l.split(" ");
		if(l.indexOf('forcegroup')!=-1) { k = getClassAttribute(u,"forcegroup");
		if(k!=0) {if(l.indexOf('iopacity')!=-1) {o = getClassValue(u,"iopacity")/100; k=0;}}}
		if(isIE) {canvas.style.filter = "Alpha(opacity="+(o*100)+")";
		}


  Err(Error::library_go_away(Reason::PROTOCOL_ERROR))
                }
            }
        } else {
            // We always ACK before reading more frames, so `remote` should
            // always be none!
            assert!(self.remote.is_none());
            self.remote = Some(frame);
            Ok(())
        }
    }

    pub(crate) fn send_settings(&mut self, frame: frame::Settings) -> Result<(), UserError> {
        assert!(!frame.is_ack());
        match &self.local {
            Local::ToSend(..) | Local::WaitingAck(..) => Err(UserError::SendSettingsWhilePending),
            Local::Synced => {
                tracing::trace!("queue to send local settings: {:?}", frame);
                self.local = Local::ToSend(frame);
                Ok(())
            }
        }
    }

    pub(crate) fn poll_send<T, B, C, P>(
        &mut self,
        cx: &mut Context,
        dst: &mut Codec<T, B>,
        streams: &mut Streams<C, P>,
    ) -> Poll<Result<(), Error>>
    where
        T: AsyncWrite + Unpin,
        B: Buf,
        C: Buf,
        P: Peer,
    {
        if let Some(settings) = &self.remote {
            if !dst.poll_ready(cx)?.is_ready() {
                return Poll::Pending;
            }

            // Create an ACK settings frame
            let frame = frame::Settings::ack();

            // Buffer the settings frame
            dst.buffer(frame.into()).expect("invalid settings frame");

            tracing::trace!("ACK sent; applying settings");

            streams.apply_remote_settings(settings)?;

            if let Some(val) = settings.header_table_size() {
                dst.set_send_header_table_size(val as usize);
            }

            if let Some(val) = settings.max_frame_size() {
                dst.set_max_send_frame_size(val as usize);
            }
        }

        self.remote = None;

        match &self.local {
            Local::ToSend(settings) => {
                if !dst.poll_ready(cx)?.is_ready() {
                    return Poll::Pending;
                }

                // Buffer the settings frame
                dst.buffer(settings.clone().into())
                    .expect("invalid settings frame");
                tracing::trace!("local settings sent; waiting for ack: {:?}", settings);

                self.local = Local::WaitingAck(settings.clone());
            }
            Local::WaitingAck(..) | Local::Synced => {}
        }

        Poll::Ready(Ok(()))
    }
}
use std::{cell::RefCell, collections::HashMap, convert::TryFrom, fmt};

use log::info;
use termion::clear;

use crate::model::{AreaId, Game, Suit};

use super::{
    blank::BlankWidget, card::CARD_SIZE, geometry, help::HelpWidget, stack::StackWidget,
    win::WinWidget, DisplayState, Widget,
};

lazy_static! {
    static ref STOCK_COORDS: geometry::Point2D<u16> = geometry::point2(2, 0);
    static ref TALON_COORDS: geometry::Point2D<u16> = geometry::point2(13, 0);
    static ref FOUNDATION_COORDS: geometry::Point2D<u16> = geometry::point2(35, 0);
    static ref TABLEAUX_COORDS: geometry::Point2D<u16> = geometry::point2(2, 5);
    static ref COLUMN_OFFSET: geometry::Vector2D<u16> = geometry::vec2(3, 0);
}

#[derive(Debug, Default)]
pub struct GameWidgetStateValue {
    bounds_cache: HashMap<AreaId, geometry::Rect<u16>>,
    prev_display_state: Option<DisplayState>,
    prev_bounds: Option<geometry::Rect<u16>>,
}

#[derive(Debug, Default)]
pub struct GameWidgetState {
    cell: RefCell<GameWidgetStateValue>,
}

#[derive(Debug)]
pub struct GameWidget<'a> {
    pub area_ids: &


(Brasil)",
          "locale_name_ru_RU": "Ruso",
          "locale_name_nl": "Holandés",
          "sections_0": "Apelando a la mente",
          "sections_1": "Apelando a las emociones",
          "sections_2": "Deduciendo falsamente",
          "sections_3": "Distorsionando causa y efecto",
          "sections_4": "Manipulando el contenido",
          "sections_5": "Atacando",
          "fallacies_titles_0_0": "Apelando a una autoridad anónima",
          "fallacies_titles_0_1": "Apelando a una autoridad",
          "fallacies_titles_0_2": "Apelando a una práctica sistemática",
          "fallacies_titles_0_3": "Apelando a la ignorancia",
          "fallacies_titles_0_4": "Apelando a la incredulidad",
          "fallacies_titles_0_5": "Apelando al dinero",
          "fallacies_titles_0_6": "Apelando a la novedad",
          "fallacies_titles_0_7": "Apelando a la creencia popular",
          "fallacies_titles_0_8": "Apelando a la probabilidad",
          "fallacies_titles_0_9": "Apelando a la tradición",
          "fallacies_descs_0_0":
              "Utilizar pruebas de un supuesto experto o estudio sin dar datos o nombres, o apelando a un grupo generalizado (como «científicos») con la intención de aportar solidez o hacerlo más de fiar.",
          "fallacies_descs_0_1":
              "Reivindicar que algo es cierto porque lo dice un «experto» no cualificado (o que en temas en los que no es de fiar).",
          "fallacies_descs_0_2":
              "Reivindicar que algo es cierto porque suceda o se practique de forma habitual.",
          "fallacies_descs_0_3":
              "Reivindicar que algo es cierto porque no se ha probado que sea falso, o al revés.",
          "fallacies_descs_0_4":
              "Si algo parece increíble, fuera de lo normal o inverosímil no puede ser verdad.",
          "fallacies_descs_0_5":
              "Suponer que por ser rico o caro altera la verdad de lo dicho.",
          "fallacies_descs_0_6":
              "Suponer que algo es mejor porque es nuevo o más reciente.",
          "fallacies_descs_0_7":
              "Reivindicar que algo es cierto porque la mayoría de la gente crea en ello.",
          "fallacies_descs_0_8":
              "Asumir que porque algo pueda pasar tenga que pasar de forma inevitable, sí o sí.",
          "fallacies_descs_0_9":
              "Reivindicar que algo es cierto porque (por lo visto) siempre haya sido así.",
          "fallacies_examples_0_0":
              "«Han hecho estudios y dicen que se tarda siete años en digerir un chicle»",
          "fallacies_examples_0_1":
              "«Más de cuatro mil prominentes científicos e ingenieros cuestionan la existencia del cambio climático.»",
          "fallacies_examples_0_2":
              "«Este banco tiene problemas de corrupción, no se salva ni uno.»",
          "fallacies_examples_0_3":
              "«Sé que no existe Dios porque nadie ha probado de forma fehaciente que exista.»",


(tok::annot_pragma_openmp_end))
      ConsumeAnyToken();
  }
  // Skip the last annot_pragma_openmp_end.
  SourceLocation EndLoc = ConsumeAnnotationToken();
  if (IsError)
    return Ptr;
  return Actions.ActOnOpenMPDeclareSimdDirective(
      Ptr, BS, Simdlen.get(), Uniforms, Aligneds, Alignments, Linears,
      LinModifiers, Steps, SourceRange(Loc, EndLoc));
}

Parser::DeclGroupPtrTy Parser::ParseOMPDeclareTargetClauses() {
  // OpenMP 4.5 syntax with list of entities.
  Sema::NamedDeclSetType SameDirectiveDecls;
  while (Tok.isNot(tok::annot_pragma_openmp_end)) {
    OMPDeclareTargetDeclAttr::MapTypeTy MT = OMPDeclareTargetDeclAttr::MT_To;
    if (Tok.is(tok::identifier)) {
      IdentifierInfo *II = Tok.getIdentifierInfo();
      StringRef ClauseName = II->getName();
      // Parse 'to|link' clauses.
      if (!OMPDeclareTargetDeclAttr::ConvertStrToMapTypeTy(ClauseName, MT)) {
        Diag(Tok, diag::err_omp_declare_target_unexpected_clause) << ClauseName;
        break;
      }
      ConsumeToken();
    }
    auto &&Callback = [this, MT, &SameDirectiveDecls](
        CXXScopeSpec &SS, DeclarationNameInfo NameInfo) {
      Actions.ActOnOpenMPDeclareTargetName(getCurScope(), SS, NameInfo, MT,
                                           SameDirectiveDecls);
    };
    if (ParseOpenMPSimpleVarList(OMPD_declare_target, Callback,
                                 /*AllowScopeSpecifier=*/true))
      break;

    // Consume optional ','.
    if (Tok.is(tok::comma))
      ConsumeToken();
  }
  SkipUntil(tok::annot_pragma_openmp_end, StopBeforeMatch);
  ConsumeAnyToken();
  SmallVector<Decl *, 4> Decls(SameDirectiveDecls.begin(),
                               SameDirectiveDecls.end());
  if (Decls.empty())
    return DeclGroupPtrTy();
  return Actions.BuildDeclaratorGroup(Decls);
}

void Parser::ParseOMPEndDeclareTargetDirective(OpenMPDirectiveKind DKind,
                                               SourceLocation DTLoc) {
  if (DKind != OMPD_end_declare_target) {
    Diag(Tok, diag::err_expected_end_declare_target);
    Diag(DTLoc, diag::note_matching) << "'#pragma omp declare target'";
    return;
  }
  ConsumeAnyToken();
  if (Tok.isNot(tok::annot_pragma_openmp_end)) {
    Diag(Tok, diag::warn_omp_extra_tokens_at_eol)
        << getOpenMPDirectiveName(OMPD_end_declare_target);
    SkipUntil(tok::annot_pragma_openmp_end, StopBeforeMatch);
  }
  // Skip the last annot_pragma_openmp_end.
  ConsumeAnyToken();
}

/// Parsing of declarative OpenMP directives.
///
///       threadprivate-directive:
///         annot_pragma_openmp 'threadprivate' simple-variable-list
///         annot_pragma_openmp_end
///
///       allocate-directive:
///         annot_pragma_openmp 'allocate' simple-variable-list [<clause>]
///         annot_pragma_openmp_end
///
///       declare-reduction-directive:
///        annot_pragma_openmp 'declare' 'reduction' [...]
///        annot_pragma_openmp_end
///
///       declare-mapper-directive:
///         annot_pragma_openmp 'declare' 'mapper' '(' [<mapper-identifer> ':']
///         <type> <var> ')' [<clause>[[,] <clause>] ... ]
///         annot_pragma_


tiansoftware.jsap">ParseException

Description copied from class: StringParser

Parses the specified argument into an Object of the appropriate type.
 If
 the specified argument cannot be converted into the desired Object, a
 ParseException
 should be thrown.

 Note: this method MAY BE CALLED with a null argument.
 Take this
 into consideration when subclassing!

Specified by:
parse in class StringParser

Parameters:
arg - the argument to convert to an Object of class appropriate to
 the StringParser subclass.

Returns:
the Object resulting from the parsed argument.

Throws:

ParseException - if the specified argument cannot be parsed.

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

<TD BGCOLOR="white" CLASS="NavBarCell


<input onmousemove="this.value=event.clientX+':'+event.clientY" value="حرك الماوس فوقي">
```
````

## منع الإختيار في الماوس

النقر المزدوج بزر الماوس له تأثير جانبي قد يكون غير ملائم في بعض الواجهات: فهو يحدد النص.

For instance, double-clicking on the text below selects it in addition to our handler:

```html autorun height=50
<span ondblclick="alert('dblclick')">أنقر مرتين علي</span>
```

إذا قمت بالضغط مع الإستمرار على زر الماوس الأيسر,  ودون تحرير الزر ,  "إضغط مع الإستمرار على الماوس",فسيكون هناك أيضًا تحديد , وقد يكون على غير ما تريد.

هناك عدة طرق لمنع التحديد , بإمكانك أن تقرأ عنها في فصل <info:selection-range>.

 في هذه الحالة  ، فإن الطريقة الأكثر منطقية هي منع إجراء المتصفح من   `mousedown`. وسيؤدي هذا الى الغاء كل هذه التحديدات:

```html autorun height=50
قبل...
<b ondblclick="alert('Click!')" *!*onmousedown="return false"*/!*>
  أنقر مرتين علي
</b>
...بعد
```

الآن لم يتم تحديد العنصر بالخط العريض  بنقرات مزدوجة ، ولن يؤدي الضغط على الزر الأيسر عليه إلى بدء التحديد.

يرجى ملاحظة أن النص الموجود بداخله لا يزال قابلاً للتحديد. ومع ذلك ، يجب ألا يبدأ التحديد في النص نفسه ، ولكن قبله أو بعده. عادة هذا جيد للمستخدمين.

````smart header="منع النسخ"
إذا أردنا تعطيل التحديد لحماية محتوى صفحتنا من لصق النسخ ، فيمكننا استخدام حدث آخر
: `oncopy`.

```html autorun height=80 no-beautify
<div *!*oncopy="alert('Copying forbidden!');return false"*/!*>
عزيزي المستخدم،
 النسخ ممنوع لك.
 إذا كنت تعرف JS أو HTML ، فيمكنك الحصول على كل شيء من مصدر الصفحة.
</div>
```
إذا حاولت نسخ جزء من النص في `<div>`, فلن ينجح ذلك, لأن الإجراء الافتراضي  `oncopy` ممنوع.

من المؤكد أن المستخدم لديه حق الوصول إلى مصدر HTML-للصفحة, ويمكنه


 number = 3): string {
    const re = z.re.toFixed(dp);
    const im = Math.abs(z.im).toFixed(dp);
    const imsign = z.im < 0 ? '-' : '+';
    return `${re} ${imsign} ${im}i`;
  }
}
import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {
  //LOS PIPES SON HERRAMIENTAS PARA PODER TRANSFORMAR NUESTROS DATOS EN EL MOMENTO DE MOSTRARLOS DENTRO DE NUESTRA PLANTILLA

  //CURRENCY PIPE
  precio: number;

  //DECIMAL PIPE
  numero: number

  //DATE PIPE
  fechaActual: Date;

  //PERCENT PIPE
  numAleatorio: number;

  //JSON PIPE
  estudiante: any;

  //LOWER, UPPER, TITLE CASE PIPE
  texto: string;

  //SLICE PIPE
  animales: string[];
  minimo: number;
  maximo:number;

  //ASYNC PIPE
  prom: Promise<string>;

  constructor(){
    this.precio = 198.87;
    this.numero = 3.88118129;
    this.fechaActual = new Date();
    this.numAleatorio = Math.random();
    this.estudiante = {
      nombre: 'Roberto',
      apellidos: 'López',
      notas: [3, 4, 7, 10]
    }
    this.texto = 'En un lugar de la Mancha';
    this.animales = ['perro', 'gato', 'pájaro', 'tortuga'];
    this.minimo = 0;
    this.maximo = this.animales.length;
    this.prom = new Promise((resolve, reject) => {
      setTimeout(() => resolve('Se resuelve la promesa pasados 4 segundos'), 4000)
    });
  }

  ngOnInit(){
    setInterval(() => this.fechaActual = new Date(), 1000);
  }
}
import {
  TemplateInstance,
  TemplateInstanceChild,
  updateTemplateInstance,
  createTemplateInstance,
  isTemplateInstance,
  runTemplateInstanceDestructors,
} from './template-instance';
import { TEMPLATE_RESULT, STRING, HOOKED } from './constants';
import { isTemplateResult } from './template-result';
import { isHookedResult } from './hooks';

export function isDOMNode(value: any): value is HTMLElement | Text {
  return value.nodeType;
}

export function isElementNode(node: any): node is HTMLElement {
  return node.nodeType === Node.ELEMENT_NODE;
}

export function isCommentNode(node: any): node is Comment {
  return node.nodeType === Node.COMMENT_NODE;
}

export function updateChild(
  value: any,
  oldValue: any,
  child: TemplateInstanceChild
) {
  value = prepareNodeValue(value);
  oldValue = prepareNodeValue(oldValue);

  if (value === oldValue) return child;

  switch (hasSameType(value, oldValue)) {
    case STRING:
      (child as Text).textContent = value;
      return child;
    case TEMPLATE_RESULT:
    case HOOKED:
      return updateTemplateInstance(child as TemplateInstance, value);
    default:
      const newNode = insertBefore(value, child);
      removeChild(child);
      return newNode;
  }
}

export function removeNodes(start: Node, end: Node) {


 FunctionConstructor {
	return NewRedact
}
//  Copyright 2023-Present Couchbase, Inc.
//
//  Use of this software is governed by the Business Source License included
//  in the file licenses/BSL-Couchbase.txt.  As of the Change Date specified
//  in that file, in accordance with the Business Source License, use of this
//  software will be governed by the Apache License, Version 2.0, included in
//  the file licenses/APL2.txt.

package expression

import (
	"github.com/couchbase/query/value"
)

type With interface {
	Alias() string
	Expression() Expression
	SetExpression(expr Expression)
	SetRecursiveExpression(rexpr Expression)
	IsRecursive() bool
	SetUnion()
	IsUnion() bool
	RecursiveExpression() Expression
	Config() value.Value
	CycleFields() Expressions
	SplitRecursive() error
	ErrorContext() string
	SetErrorContext(line int, column int)
	GetErrorContext() (int, int)
	String() string
}

type Withs []With

func (this Withs) Expressions() Expressions {
	exprs := make(Expressions, 0, len(this))
	for _, with := range this {
		exprs = append(exprs, with.Expression())
		if with.IsRecursive() {
			exprs = append(exprs, with.RecursiveExpression())
		}
	}

	return exprs
}

func (this Withs) MapExpressions(mapper Mapper) (err error) {
	for _, b := range this {
		expr, err := mapper.Map(b.Expression())
		if err != nil {
			return err
		}

		b.SetExpression(expr)

		if b.IsRecursive() {
			rexpr, err := mapper.Map(b.RecursiveExpression())
			if err != nil {
				return err
			}
			b.SetRecursiveExpression(rexpr)
		}
	}

	return
}
//  Copyright 2014-Present Couchbase, Inc.
//
//  Use of this software is governed by the Business Source License included
//  in the file licenses/BSL-Couchbase.txt.  As of the Change Date specified
//  in that file, in accordance with the Business Source License, use of this
//  software will be governed by the Apache License, Version 2.0, included in
//  the file licenses/APL2.txt.

package expression

import (
	"math"
	"regexp"

	"github.com/couchbase/query/value"
)

type LikeFunction interface {
	BinaryFunction
	Regexp() *regexp.Regexp
}

var _DEFAULT_ESCAPE = NewConstant("\\")

///////////////////////////////////////////////////
//
// LikePrefix
//
///////////////////////////////////////////////////

/*
This represents the pattern matching function LIKE_PREFIX(expr).
*/
type LikePrefix struct {
	BinaryFunctionBase
}

func NewLikePrefix(operands ...Expression) Function {
	if len(operands) == 1 {
		operands = append(operands, _DEFAULT_ESCAPE)
	}
	rv := &LikePrefix{}
	rv.Init("like_prefix", operands[0], operands[1])

	rv.expr = rv
	return rv
}

/*
Visitor pattern.
*/
func (this *LikePrefix) Accept(visitor Visitor) (interface{}, error) {
	return visitor.VisitFunction(this)
}

func (this *LikePrefix) Type() value.Type { return value.STRING }

func (this *LikePrefix) Evaluate(item value.Value, context Context) (value.Value, error) {
	null := false
	arg, err := this.operands[0].Evaluate(item, context)
	if err != nil {
		return nil, err
	} else if arg.Type() == value.MISSING {
		return value.MISSING_VALUE, nil
	} else if arg.Type() != value.STRI


FF ED 89 */	bl gsiLargeIntAdd
/* 8033AC3C 0033689C  7F 23 CB 78 */	mr r3, r25
/* 8033AC40 003368A0  7F E4 FB 78 */	mr r4, r31
/* 8033AC44 003368A4  7E C5 B3 78 */	mr r5, r22
/* 8033AC48 003368A8  7F E6 FB 78 */	mr r6, r31
/* 8033AC4C 003368AC  38 E1 01 10 */	addi r7, r1, 0x110
/* 8033AC50 003368B0  39 01 01 0C */	addi r8, r1, 0x10c
/* 8033AC54 003368B4  39 20 00 40 */	li r9, 0x40
/* 8033AC58 003368B8  4B FF ED 69 */	bl gsiLargeIntAdd
/* 8033AC5C 003368BC  38 61 00 08 */	addi r3, r1, 8
/* 8033AC60 003368C0  38 80 00 00 */	li r4, 0
/* 8033AC64 003368C4  38 A0 01 04 */	li r5, 0x104
/* 8033AC68 003368C8  4B CC 94 9D */	bl memset
/* 8033AC6C 003368CC  80 81 02 10 */	lwz r4, 0x210(r1)
/* 8033AC70 003368D0  7C 04 F8 40 */	cmplw r4, r31
/* 8033AC74 003368D4  41 81 00 10 */	bgt lbl_8033AC84
/* 8033AC78 003368D8  80 01 01 0C */	lwz r0, 0x10c(r1)
/* 8033AC7C 003368DC  7C 00 F8 40 */	cmplw r0, r31
/* 8033AC80 003368E0  40 81 00 28 */	ble lbl_8033ACA8
lbl_8033AC84:
/* 8033AC84 003368E4  38 E1 00 0C */	addi r7, r1, 0xc
/* 8033AC88 003368E8  80 C1 01 0C */	lwz r6, 0x10c(r1)
/* 8033AC8C 003368EC  38 61 02 14 */	addi r3, r1, 0x214
/* 8033AC90 003368F0  38 A1 01 10 */	addi r5, r1, 0x110
/* 8033AC94 003368F4  7C E7 BA 14 */	add r7, r7, r23
/* 8033AC98 003368F8  39 01 00 08 */	addi r8, r1, 8
/* 8033AC9C 003368FC  21 3F 00 40 */	subfic r9, r31, 0x40
/* 8033ACA0 00336900  4B FF F2 F5 */	bl gsiLargeIntMult
/* 8033ACA4 00336904  48 00 00 5C */	b lbl_8033AD00
lbl_8033ACA8:
/* 8033ACA8 00336908  7F A5 EB 78 */	mr r5, r29
/* 8033ACAC 0033690C  38 61 02 10 */	addi r3, r1, 0x210
/* 8033ACB0 00336910  38 81 01 0C */	addi r4, r1, 0x10c
/* 8033ACB4 00336914  4B FF EB B5 */	bl gsiLargeIntSizePower2
/* 8033ACB8 00336918  2C 03 00 00 */	cmpwi r3, 0
/* 8033ACBC 0033691C  40 82 00 0C */	bne lbl_8033ACC8
/* 8033ACC0 00336920  38 60 00 00 */	li r3, 0
/* 8033ACC4 00336924  48 00 01 0C */	b lbl_8033ADD0
lbl_8033ACC8:
/* 8033ACC8


package org.openehealth.ipf.commons.ihe.xds.core.requests.query;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.openehealth.ipf.commons.ihe.xds.core.metadata.ReferenceId;
import org.openehealth.ipf.commons.ihe.xds.core.transform.requests.query.QuerySlotHelper;

import jakarta.xml.bind.annotation.*;

import java.io.Serial;

/**
 * Represents a stored query for FindDocumentsByReferenceIdQuery.
 * @author Dmytro Rud
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FindDocumentsByReferenceIdQuery", propOrder = {"referenceIds"})
@XmlRootElement(name = "findDocumentsByReferenceIdQuery")
@EqualsAndHashCode(callSuper = true, doNotUseGetters = true)
@ToString(callSuper = true, doNotUseGetters = true)
public class FindDocumentsByReferenceIdQuery extends FindDocumentsQuery {
    @Serial
    private static final long serialVersionUID = 8898792914033157098L;

    @XmlElement(name = "referenceId")
    @Getter @Setter private QueryList<String> referenceIds;

    /**
     * Constructs the query.
     */
    public FindDocumentsByReferenceIdQuery() {
        super(QueryType.FIND_DOCUMENTS_BY_REFERENCE_ID);
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);
    }

    /**
     * Allows to use a collection of {@link ReferenceId} instead of a collection of {@link String}
     * for specifying the query parameter "$XDSDocumentEntryReferenceIdList".
     *
     * @param referenceIds a collection of {@link ReferenceId} objects with AND/OR semantics.
     */
    public void setTypedReferenceIds(QueryList<ReferenceId> referenceIds) {
        this.referenceIds = QuerySlotHelper.render(referenceIds);
    }

    /**
     * Tries to return the query parameter "$XDSDocumentEntryReferenceIdList"
     * as a collection of {@link ReferenceId} instead of a collection of {@link String}.
     * This may fail if SQL LIKE wildcards ("%", "_", etc.) are used in one or more elements.
     *
     * @return a collection of {@link ReferenceId} objects with AND/OR semantics.
     */
    public QueryList<ReferenceId> getTypedReferenceIds() {
        return QuerySlotHelper.parse(this.referenceIds, ReferenceId.class);
    }

}
/*
 * Copyright 2013 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.openehealth.ipf.commons.core.config;

import java.util.Properties;

import org.codehaus.groovy.runtime.m12n.ExtensionModule;
import org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule;
import org.codehaus.groovy.runtime.m12n.PropertiesModuleFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Extension module that wraps the registration inside logging
 * statements so that the extension process can be observed if necessary.
 *
 * In order to load the extensions with this class,
 * the extension module descriptor must contain a corresponding line:
 * <p>
 * moduleFactory=org.openehealth.ipf.commons.core.config.ExtensionModuleFactory
 * </p>
 */
public class ExtensionModuleFactory extends PropertiesModuleFactory {

    private static final Logger log = LoggerFactory.getLogger(ExtensionModuleFactory.class);
    private static final String MODULE_NAME_INITIALIZER_CLASS = "moduleInitializerClass";


.insert("`");
    m_keyCodes.insert("-");
    m_keyCodes.insert("*");
    m_keyCodes.insert("=");
    m_keyCodes.insert("BACK");
    m_keyCodes.insert("TAB");
    m_keyCodes.insert("[");
    m_keyCodes.insert("]");
    m_keyCodes.insert("ENTER");
    m_keyCodes.insert("CAPITAL");
    m_keyCodes.insert("SCROLL_LOCK");
    m_keyCodes.insert("PAUSE");
    m_keyCodes.insert(";");
    m_keyCodes.insert("'");
    m_keyCodes.insert("\\");
    m_keyCodes.insert(",");
    m_keyCodes.insert(".");
    m_keyCodes.insert("/");
    m_keyCodes.insert("SPACE");
    m_keyCodes.insert("INS");
    m_keyCodes.insert("HOME");
    m_keyCodes.insert("PGUP");
    m_keyCodes.insert("PGDN");
    m_keyCodes.insert("DEL");
    m_keyCodes.insert("END");
    m_keyCodes.insert("UP");
    m_keyCodes.insert("DOWN");
    m_keyCodes.insert("RIGHT");
    m_keyCodes.insert("LEFT");
    m_keyCodes.insert("F1");
    m_keyCodes.insert("F2");
    m_keyCodes.insert("F3");
    m_keyCodes.insert("F4");
    m_keyCodes.insert("F5");
    m_keyCodes.insert("F6");
    m_keyCodes.insert("F7");
    m_keyCodes.insert("F8");
    m_keyCodes.insert("F9");
    m_keyCodes.insert("F10");
    m_keyCodes.insert("F11");
    m_keyCodes.insert("F12");

    // There can be the following options:
    // Ctrl-Alt-Shift
    // Ctrl-Alt
    // Ctrl-Shift
    // Ctrl
    // Alt-Shift
    // Alt
    // Shift
    for (const wxString& keyCode : m_keyCodes) {
        m_allShortcuts.insert("Ctrl-Alt-Shift-" + keyCode);
        m_allShortcuts.insert("Ctrl-Alt-" + keyCode);
        m_allShortcuts.insert("Ctrl-Shift-" + keyCode);
        m_allShortcuts.insert("Ctrl-" + keyCode);
        m_allShortcuts.insert("Alt-Shift-" + keyCode);
        m_allShortcuts.insert("Alt-" + keyCode);
        m_allShortcuts.insert("Shift-" + keyCode);
    }
}

clKeyboardManager::~clKeyboardManager()
{
    Save();
    EventNotifier::Get()->Unbind(wxEVT_INIT_DONE, &clKeyboardManager::OnStartupCompleted, this);
}

static clKeyboardManager* m_mgr = NULL;
clKeyboardManager* clKeyboardManager::Get()
{
    if (NULL == m_mgr) {
        m_mgr = new clKeyboardManager();
    }
    return m_mgr;
}

void clKeyboardManager::Release()
{
    if (m_mgr) {
        delete m_mgr;
    }
    m_mgr = NULL;
}

void clKeyboardManager::DoGetFrames(wxFrame* parent, clKeyboardManager::FrameList_t& frames)
{
    frames.push_back(parent);
    for (auto* child : parent->GetChildren()) {
        wxFrame* frameChild = dynamic_cast<wxFrame*>(child);
        if (frameChild) {
            if (std::find(frames.begin(), frames.end(), frameChild) == frames.end()) {
                frames.push_back(frameChild);
                DoGetFrames(frameChild, frames);
            }
        }
    }
}

void clKeyboardManager::DoUpdateMenu(wxMenu* menu, MenuItemDataIntMap_t& accels, std::vector<wxAcceleratorEntry>& table)
{
    wxMenuItemList items = menu->GetMenuItems();
    for (wxMenuItem* item : items) {
        if (item->Get


private map_state: Map<string, () => void> = new Map()

    /**
     * 更改当前状态
     * @param new_state
     */
    change_state(new_state: string) {
        if (!this.map_state.has(new_state)) {
            FMLog.error(`@FTSimpleFSM: 获取了一个不存在的状态, state=${new_state}`)
            return
        }
        this.state = new_state
        this.map_state.get(this.state)()
    }

}import { SegmentTree } from './segment-tree';

describe('Segment Tree:', () => {
  const array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];

  it('should calculate ranged sum', () => {
    const calcSum = (a: number, b: number): number => a + b;
    const segmentTree = new SegmentTree(calcSum);
    segmentTree.buildTree(array);

    // check initial ranged sum
    expect(segmentTree.queryRangedAggregation(0, 2)).toBe(0 + 1 + 2);
    expect(segmentTree.queryRangedAggregation(1, 5)).toBe(1 + 2 + 3 + 4 + 5);
    expect(segmentTree.queryRangedAggregation(3, 4)).toBe(3 + 4);
    expect(segmentTree.queryRangedAggregation(5, 9)).toBe(5 + 6 + 7 + 8 + 9);
    expect(segmentTree.queryRangedAggregation(9, 9)).toBe(9);

    // update index 3 to 13
    segmentTree.update(3, 13);
    expect(segmentTree.queryRangedAggregation(3, 3)).toBe(13);
    expect(segmentTree.queryRangedAggregation(0, 2)).toBe(0 + 1 + 2);
    expect(segmentTree.queryRangedAggregation(1, 5)).toBe(1 + 2 + 13 + 4 + 5);
    expect(segmentTree.queryRangedAggregation(3, 4)).toBe(13 + 4);

    // update index 8 to 18
    segmentTree.update(8, 18);
    expect(segmentTree.queryRangedAggregation(8, 8)).toBe(18);
    expect(segmentTree.queryRangedAggregation(0, 2)).toBe(0 + 1 + 2);
    expect(segmentTree.queryRangedAggregation(7, 9)).toBe(7 + 18 + 9);
  });

  it('should calculate ranged minimum', () => {
    const calcMin = (a: number, b: number): number => Math.min(a, b);
    const segmentTree = new SegmentTree(calcMin);
    segmentTree.buildTree(array);

    // check initial ranged sum
    expect(segmentTree.queryRangedAggregation(0, 2)).toBe(0);
    expect(segmentTree.queryRangedAggregation(1, 5)).toBe(1);
    expect(segmentTree.queryRangedAggregation(3, 4)).toBe(3);
    expect(segmentTree.queryRangedAggregation(5, 9)).toBe(5);
    expect(segmentTree.queryRangedAggregation(9, 9)).toBe(9);

    // update index 3 to 13
    segmentTree.update(3, 13);
    expect(segmentTree.queryRangedAggregation(3, 3)).toBe(13);
    expect(segmentTree.queryRangedAggregation(0, 2)).toBe(0);
    expect(segmentTree.queryRangedAggregation(1, 5)).toBe(1);
    expect(segmentTree.queryRangedAggregation(3, 4)).toBe(4);
    expect(segmentTree.queryRangedAggregation(3, 9)).toBe(4);

    // update index 8 to 18
    segmentTree.update(8, 18);
    expect(segmentTree.queryRangedAggregation(8, 8)).toBe(18);
    expect(segmentTree.queryRangedAggregation(0, 2)).toBe(0);
    expect(segmentTree.queryRangedAggregation(3, 9)).toBe(4);
    expect(segmentTree.queryRangedAggregation(8, 9)).toBe(9);
  });

  it('should calculate ranged maximum', () => {
    const c


Than')
  }

  getExample() {
    return '5'
  }

  getInputComponent() {
    return ViewFilterTypeNumber
  }

  getCompatibleFieldTypes() {
    return [
      'text',
      'long_text',
      'url',
      'email',
      'phone_number',
      FormulaFieldType.compatibleWithFormulaTypes('url'),
    ]
  }

  matches(rowValue, filterValue, field, fieldType) {
    return (
      isNaN(filterValue) ||
      rowValue === null ||
      filterValue === 0 ||
      rowValue.toString().length < filterValue
    )
  }
}

export class BaseDateMultiStepViewFilterType extends ViewFilterType {
  getExample() {
    return 'UTC??today'
  }

  getInputComponent() {
    return ViewFilterTypeMultiStepDate
  }

  getDefaultTimezone(field) {
    return field.date_force_timezone || moment.tz.guess()
  }

  getFilterDate(operatorValue, filterValue, timezone) {
    const filterDate = moment.utc()
    if (timezone) {
      filterDate.tz(timezone)
    }
    if (DATE_FILTER_OPERATOR_DELTA_MAP[operatorValue] !== undefined) {
      return DATE_FILTER_OPERATOR_DELTA_MAP[operatorValue](
        filterDate,
        filterValue,
        timezone
      )
    } else {
      return filterDate
    }
  }

  getCompatibleOperators() {
    const incompatibleOprs = this.getIncompatibleOperators()
    return Object.values(DateFilterOperators).filter(
      (opr) => !incompatibleOprs.includes(opr.value)
    )
  }

  getIncompatibleOperators() {
    return []
  }

  prepareValue(value, field, filterChanged = false) {
    const sep = DATE_FILTER_VALUE_SEPARATOR
    const [, filterValue, operator] = splitMultiStepDateValue(value, sep)
    const timezone = this.getDefaultTimezone(field)
    return value && !filterChanged
      ? value
      : `${timezone}${sep}${filterValue}${sep}${operator}`
  }

  localizeRowValue(rowValue, timezone) {
    const localizedRowValue = moment.utc(rowValue)
    if (timezone !== null) {
      localizedRowValue.tz(timezone)
    }
    return localizedRowValue
  }

  rowMatches(rowDate, lowerBound, upperBound) {
    throw new Error(
      'The rowMatches method must be implemented for every filter.'
    )
  }

  matches(rowValue, filterValue, field, fieldType) {
    if (rowValue === null) {
      return false
    }

    const sep = DATE_FILTER_VALUE_SEPARATOR
    const [timezone, value, operatorValue] = splitMultiStepDateValue(
      filterValue,
      sep
    )

    // Check if the operator is compatible with the filter type.
    const operator = this.getCompatibleOperators().find(
      (opr) => opr.value === operatorValue
    )
    if (!operator) {
      return false
    } else if (operator.hasNrInputValue && value === '') {
      return true // return all the rows if a proper value has not been set yet.
    }

    let filterDate
    try {
      filterDate = this.getFilterDate(operatorValue, value, timezone)
    } catch {
      return false
    }

    // Localize the filter date and the row date.
    const rowDate = this.localizeRowValue(rowValue, timezone)
    const [lowerBound, upperBound] =
      DATE_FILTER_OPERATOR_BOUNDS[operatorValue](filterDate)

    return this.rowMatches(rowDate, lowerBound, upperBound


 condition wherein the media query matches the queried value
 * matchMediaMock({ ...matchMediaReturnValue, matches: true })
 *
 * // Subsequent calls to window.matchMedia in the code will return { matches: true, ...rest }
 *
 * ```
 *
 * @param returnValue
 * @returns
 */
export const matchMediaMock = (
	returnValue: typeof matchMediaReturnValue
): (() => typeof matchMediaReturnValue) => replace(window, 'matchMedia', fake.returns(returnValue))
import {Router} from 'express';
import {Batch, Teacher, TeacherBatch} from '../db'
const route: Router = Router();

route.get('/', (req: any, res: any)=>{
    Teacher.findAll({
        attributes: ["id", "name"]
    }).then((list)=> res.json(list))
    .catch((err)=> res.json({error: err.message}))

});

route.post('/', (req: any, res: any)=>{
    Teacher.create({
        name: req.body.name
    }).then((obj)=> res.json(obj))
    .catch((err)=> res.json({error: err.message}))
})

route.get('/:id', (req: any, res: any)=>{
    Teacher.findOne({
        attributes: ["id", "name"],
        where: {
            id: req.params.id
        }
    }).then((teacher)=> res.json(teacher))
    .catch((err)=> res.json({error: err.message}))

});

route.put('/:id', (req: any, res: any)=>{
    Teacher.update({
        name: req.body.name
    }, {
        where: {
            id: req.params.id
        }
    }).then((row)=> res.json(row))
    .catch((err)=> res.json({error: err.message}))
});

route.delete('/:id', (req: any, res: any)=>{
    Teacher.destroy({
        where: {
            id: req.params.id
        }
    }).then((row)=> res.json(row))
    .catch((err)=> res.json({error: err.message}))
})

route.get('/:id/batches', (req, res)  =>  {
    TeacherBatch.findAll({
        where: {
            teacherId: req.params.id
        }
    })
    .then((teacherBatch:  any[])  =>  {
        let  batchIdArray:  number[]  =  [];
        for  (let  obj  of  teacherBatch) {
            batchIdArray.push(obj.batchId);
        }
        Batch.findAll({
            attributes: ['id',  'name'],
            where: {
                id: { $in: batchIdArray }
            }
        })
        .then((list) => res.json(list))
        .catch((err)=> res.json({error: err.message}))
    })
})

route.post('/:id/batches', (req, res) => {
    TeacherBatch.create({
        batchId: req.body.batchId,
        teacherId: req.params.id
    })
    .then((obj) => res.json(obj))
    .catch((err) => res.json({error: err.message}))
})

export default route;import {movieData} from "./data";
import * as $ from "jquery";
import { Review } from "./interfaces";

function renderMovie(data: Review){
  ui.title.text(data.title);
  ui.review.text(data.review);
  ui.poster.attr("src", data.imgUrl);

  ui.actors.empty();
  for(let i=0; i<data.actors.length; i++){
    ui.actors.append("<li>" + data.actors[i] + "</li>");
  }
}

function changeStarRating(rating){
  $(".filled").removeClass("filled");


P3 FMNMX b11, s11, RZ, !PT;

--:-:-:-:1  @P0 FMNMX x00, s00, RZ, PT;
--:-:-:-:1  @P1 FMNMX x01, s01, RZ, PT;
--:-:-:-:1  @P2 FMNMX x10, s10, RZ, PT;
--:-:-:-:1  @P3 FMNMX x11, s11, RZ, PT;

--:-:-:-:1  @P0 FFMA s00, x00, param_beta, b00;
--:-:-:-:1  @P1 FFMA s01, x01, param_beta, b01;
--:-:-:-:1  @P2 FFMA s10, x10, param_beta, b10;
--:-:-:-:1  @P3 FFMA s11, x11, param_beta, b11;
    } : '';
+]
</SCHEDULE_BLOCK>

<SCHEDULE_BLOCK>
[+
    our ($beta, $brelu, $bprelu, $convert_in);
    return $convert_in && ($beta || $brelu || $bprelu) ? qq{
10:-:1:-:1  \@P0 $convert_in b00, b00;
--:-:2:-:1  \@P1 $convert_in b01, b01;
20:-:3:-:1  \@P2 $convert_in b10, b10;
--:-:4:-:1  \@P3 $convert_in b11, b11;
    } : '';
+]
[+
    our $beta; return $beta ? q{
11:-:-:-:1  @P0 FFMA s00, b00, param_beta, s00;
02:-:-:-:1  @P1 FFMA s01, b01, param_beta, s01;
24:-:-:-:1  @P2 FFMA s10, b10, param_beta, s10;
08:-:-:-:1  @P3 FFMA s11, b11, param_beta, s11;
    } : '';
+]
[+
    our $brelu; return $brelu ? q{
//delta *= x > 0
11:-:-:-:1      FSETP.GT.AND P0, PT, b00, RZ, PT;
02:-:-:-:1      FSETP.GT.AND P1, PT, b01, RZ, PT;
24:-:-:-:1      FSETP.GT.AND P2, PT, b10, RZ, PT;
08:-:-:-:1      FSETP.GT.AND P3, PT, b11, RZ, PT;
--:-:-:-:1 @!P0 MOV s00, RZ;
--:-:-:-:1 @!P1 MOV s01, RZ;
--:-:-:-:1 @!P2 MOV s10, RZ;
--:-:-:-:1 @!P3 MOV s11, RZ;
--:-:-:-:1  @P4 R2P PR, preds, 0x0f;
--:-:-:-:5 @!P4 R2P PR, RZ, 0x0f;
    } : '';
+]
[+
    our $bprelu; return $bprelu ? q{
//delta *= ((x > 0) + slope * (x < 0))
11:-:-:-:1      FSETP.GT.AND P0, PT, b00, RZ, PT;
02:-:-:-:1      FSETP.GT.AND P1, PT, b01, RZ, PT;
24:-:-:-:1      FSETP.GT.AND P2, PT, b10, RZ, PT;
08:-:-:-:1      FSETP.GT.AND P3, PT, b11, RZ, PT;
--:-:-:-:1      SEL x00, one, RZ, P0;
--:-:-:-:1      SEL x01, one, RZ, P1;
--:-:-:-:1      SEL x10, one, RZ, P2;
--:-:-:-:1      SEL x11,


l_vented"):key()] = {
					base_gradient = "units/payday2_cash/safes/smosh/base_gradient/base_smosh_003_d_df"
				}
			},
			wpn_fps_pis_1911_o_standard = {
				[Idstring("sights"):key()] = {
					base_gradient = "units/payday2_cash/safes/smosh/base_gradient/base_smosh_003_c_df"
				}
			}
		},
		types = {
			slide = {
				base_gradient = "units/payday2_cash/safes/smosh/base_gradient/base_smosh_003_b_df"
			},
			lower_reciever = {
				base_gradient = "units/payday2_cash/safes/smosh/base_gradient/base_smosh_003_df"
			},
			magazine = {
				base_gradient = "units/payday2_cash/safes/smosh/base_gradient/base_smosh_003_c_df"
			}
		}
	}
	self.weapon_skins.scorpion_smosh = {
		name_id = "bm_wskn_scorpion_smosh",
		desc_id = "bm_wskn_scorpion_smosh_desc",
		weapon_id = "scorpion",
		rarity = "common",
		bonus = "spread_p1",
		reserve_quality = true,
		texture_bundle_folder = "cash/safes/smosh",
		base_gradient = "units/payday2_cash/safes/smosh/base_gradient/base_smosh_006_b_df",
		parts = {
			wpn_fps_upg_ass_ns_linear = {
				[Idstring("mtr_linear"):key()] = {
					sticker = "units/payday2_cash/safes/smosh/sticker/smosh_sticker_006_df",
					uv_offset_rot = Vector3(0.340091, 0.998331, 0),
					uv_scale = Vector3(2.72746, 2.72746, 0)
				}
			},
			wpn_fps_upg_ns_ass_smg_small = {
				[Idstring("small"):key()] = {
					pattern = "units/payday2_cash/safes/smosh/pattern/smosh_pattern_006_df",
					sticker = "units/payday2_cash/safes/smosh/sticker/smosh_sticker_006_df",
					pattern_gradient = "units/payday2_cash/safes/smosh/pattern_gradient/gradient_smosh_006_df",
					pattern_tweak = Vector3(3.92559, 1.56293, 0),
					uv_offset_rot = Vector3(0.365, 1.399, 0),
					pattern_pos = Vector3(0, -0.251371, 0),
					uv_scale = Vector3(4.06235, 4.06235, 0)
				}
			},
			wpn_fps_smg_scorpion_b_suppressed = {
				[Idstring("mtr_supp"):key()] = {
					pattern = "units/payday2_cash/safes/smosh/pattern/smosh_pattern_006_df",
					sticker = "units/payday2_cash/safes/smosh/sticker/smosh_sticker_006_df",
					pattern_gradient = "units/payday2_cash/safes/smosh/pattern_gradient/gradient_smosh_006_df",
					pattern_tweak = Vector3(5.92893, 1.59, 0),
					uv_offset_rot = Vector3(0.417, 0.725, 0),
					pattern_pos = Vector3(0.0538995, 0.196995, 0),
					uv_scale = Vector3


    type Push<'v> = ();
    type Arg = ModuleSlotId;

    fn run_with_args<'v>(
        eval: &mut Evaluator<'v, '_>,
        _stack: &mut BcStackPtr<'v, '_>,
        _ip: BcPtrAddr,
        slot: &ModuleSlotId,
        v: Value<'v>,
    ) -> anyhow::Result<()> {
        eval.set_slot_module(*slot, v);
        Ok(())
    }
}

impl InstrNoFlowImpl for InstrUnpackImpl {
    type Pop<'v> = Value<'v>;
    type Push<'v> = ();
    type Arg = ArgPushesStack;

    #[inline(always)]
    fn run_with_args<'v>(
        eval: &mut Evaluator<'v, '_>,
        stack: &mut BcStackPtr<'v, '_>,
        _ip: BcPtrAddr,
        arg: &Self::Arg,
        v: Value<'v>,
    ) -> anyhow::Result<()> {
        let nvl = v.length()?;
        if nvl != arg.0 as i32 {
            return Err(AssignError::IncorrectNumberOfValueToUnpack(arg.0 as i32, nvl).into());
        }
        let places = stack.push_slice_placeholder(*arg);
        v.with_iterator(eval.heap(), |items| {
            let mut i = 0;
            for item in items {
                // Use unconditional assertion here because we cannot trust
                // user defined `length` and `with_iterator` consistently.
                assert!(i != arg.0 as usize);
                unsafe {
                    (*places.get_unchecked_mut(places.len() - i - 1)).write(item);
                }
                i += 1;
            }
            assert!(i == arg.0 as usize);
        })?;
        Ok(())
    }
}

impl InstrNoFlowImpl for InstrArrayIndexImpl {
    type Pop<'v> = [Value<'v>; 2];
    type Push<'v> = Value<'v>;
    type Arg = ();

    #[inline(always)]
    fn run_with_args<'v>(
        eval: &mut Evaluator<'v, '_>,
        _stack: &mut BcStackPtr<'v, '_>,
        _ip: BcPtrAddr,
        (): &(),
        [array, index]: [Value<'v>; 2],
    ) -> anyhow::Result<Value<'v>> {
        array.at(index, eval.heap())
    }
}

impl InstrNoFlowImpl for InstrArrayIndexNoPopImpl {
    type Pop<'v> = [Value<'v>; 2];
    type Push<'v> = [Value<'v>; 3];
    type Arg = ();

    #[inline(always)]
    fn run_with_args<'v>(
        eval: &mut Evaluator<'v, '_>,
        _stack: &mut BcStackPtr<'v, '_>,
        _ip: BcPtrAddr,
        (): &(),
        [array, index]: [Value<'v>; 2],
    ) -> anyhow::Result<[Value<'v>; 3]> {
        let value = array.at(index, eval.heap())?;
        Ok([array, index, value])
    }
}

impl InstrNoFlowImpl for InstrSetArrayIndexImpl {
    type Pop<'v> = [Value<'v>; 3];
    type Push<'v> = ();
    type Arg = ();

    #[inline(always)]
    fn run_with_args<'v>(
        _eval: &mut Evaluator<'v, '_>,
        _stack: &mut BcStackPtr<'v, '_>,
        _ip: BcPtrAddr,
        (): &(),
        [value, array, index]: [Value<'


.85,-5.89 -5.05,-8.27 -0.98,-5.88 -3.48,-11.64 -2.5,-17.69 -1.86,-0.01 -4.25,2.69 -6.47,3.63 -2.21,0.18 -4.52,-3.09 -4.1,-5.31 1.19,-5.37 4.07,-10.37 5.88,-15.6 1.95,-2.64 1.12,-5.57 -2.41,-5.62 -1.55,-3.37 -4.92,-5.66 -5.61,-9.53 -1.31,-2.63 -1.42,-6.47 -5.06,-6.76 -0.99,-1.85 -3.18,-4.47 -1.91,-6.73 2.09,-2.98 -0.34,-5.7 -1.53,-8.5 -2.13,-3.05 0.55,-6.68 0.67,-10.01 0.9,-4.35 1.8,-8.69 2.69,-13.04 -4.18,-0.78 -8.35,-1.56 -12.53,-2.34 -4.5,20.92 -9,41.83 -13.5,62.75z","name":"Idaho"},"ut":{"path":"m176.34,297.78c27.57,3.92 55.15,7.83 82.72,11.75 4.04,-29.08 8.08,-58.17 12.13,-87.25 -10.83,-1.14 -21.65,-2.33 -32.47,-3.59 1.43,-7.93 2.82,-15.85 3.84,-23.84 -15.27,-2.85 -30.54,-5.71 -45.81,-8.56 -6.8,37.17 -13.6,74.33 -20.41,111.5z","name":"Utah"},"az":{"path":"m173.19,314.66c-2.49,-0.06 -3.05,4.43 -6.38,2.94 -0.74,-2.87 -3.59,-2.82 -5.59,-4.22 -3.74,0.74 -2.37,4.58 -2.68,7.41 -0.52,5.04 -0.42,10.21 -0.89,15.22 -2.19,2.33 -2.44,5.78 -0.24,8.19 2.32,2.62 0.58,7.52 4.09,9.09 0.98,3.59 -2.89,4.83 -5.41,6.09 -3.29,2.46 -3.28,6.86 -3.88,10.47 -1.25,2.44 -4.81,2.39 -4.92,4.97 0.47,2.18 6.18,0.38 3.42,4.54 -0.65,2.75 -3.14,3.45 -5.62,3.78 -3.6,1.45 -2.69,4.7 0.77,5.44 14.69,7.84 28.52,17.13 43.01,25.32 5.79,3.19 11.27,7.21 17.27,9.88 11.71,2.83 23.75,3.45 35.68,4.87 5.71,-39.38 11.42,-78.75 17.13,-118.13 -27.58,-3.93 -55.17,-7.85 -82.75,-11.78 -1,5.31 -2,10.63 -3,15.94z","name":"Arizona"},"nv":{"path":"m84.84,232.41c22.96,34.61 45.92,69.23 68.88,103.84 3.66,2.65 3.19,-3.47 3.27,-5.71 0.37,-5.43 0.36,-11.24 1.08,-16.44 2.05,-


.e-menu-wrapper ul.e-vertical .e-menu-item .e-menu-icon,
.e-ribbon-menu.e-menu-wrapper ul.e-ul .e-menu-item .e-menu-icon {
  width: auto;
}

.e-ribbon-menu.e-menu-wrapper ul.e-vertical .e-menu-item.e-blankicon,
.e-ribbon-menu.e-menu-wrapper ul.e-ul .e-menu-item.e-blankicon {
  padding-left: 38px !important;
  /* stylelint-disable-line declaration-no-important */
}

.e-ribbon-control.e-dropdown-popup ul .e-item {
  font-size: 12px;
  height: 24px;
  -ms-flex-align: center;
  align-items: center;
}

.e-ribbon-control.e-dropdown-popup ul .e-item .e-menu-icon {
  font-size: 16px;
  line-height: 16px;
}

.e-ribbon-tooltip .e-tip-content {
  padding: 4px;
}

.e-ribbon-tooltip .e-tip-content .e-ribbon-tooltip-title {
  font-size: 12px;
  line-height: 18px;
  padding: 4px 4px 0;
}

.e-ribbon-tooltip .e-tip-content .e-ribbon-text-container {
  padding: 4px;
  display: -ms-flexbox;
  display: flex;
}

.e-ribbon-tooltip .e-tip-content .e-ribbon-text-container .e-ribbon-tooltip-content {
  font-size: 10px;
  line-height: 15px;
}

.e-ribbon-tooltip .e-tip-content .e-ribbon-text-container .e-ribbon-tooltip-icon {
  font-size: 32px;
  line-height: 32px;
  padding-right: 8px;
}

.e-bigger.e-ribbon.e-rbn .e-ribbon-group,
.e-bigger .e-ribbon.e-rbn .e-ribbon-group {
  height: 150px;
}

.e-bigger.e-ribbon.e-rbn .e-ribbon-tab .e-ribbon-file-menu,
.e-bigger.e-ribbon.e-rbn .e-ribbon-tab .e-ribbon-backstage,
.e-bigger .e-ribbon.e-rbn .e-ribbon-tab .e-ribbon-file-menu,
.e-bigger .e-ribbon.e-rbn .e-ribbon-tab .e-ribbon-backstage {
  line-height: 24px;
  padding: 12px 12px;
  font-size: 16px;
}

.e-bigger.e-ribbon.e-rbn .e-ribbon-tab .e-ribbon-help-template,
.e-bigger .e-ribbon.e-rbn .e-ribbon-tab .e-ribbon-help-template {
  padding-right: 16px;
  height: 48px;
}

.e-bigger.e-ribbon.e-rbn .e-ribbon-tab .e-hscroll,
.e-bigger .e-ribbon.e-rbn .e-ribbon-tab .e-hscroll {
  min-height: auto;
}

.e-bigger.e-ribbon.e-rbn .e-ribbon-tab .e-tab-header .e-hor-nav,
.e-bigger .e-ribbon.e-rbn .e-ribbon-tab .e-tab-header .e-hor-nav {
  height: 48px;
  min-height: 48px;
}

.e-bigge


19 1px 0 0px 0 inset;
    -moz-box-shadow: #191919 0 1px 0px 0 inset, #191919 0 -1px 0px 0 inset, #191919 -1px 0 0px 0 inset, #191919 1px 0 0px 0 inset;
    box-shadow: #191919 0 1px 0px 0 inset, #191919 0 -1px 0px 0 inset, #191919 -1px 0 0px 0 inset, #191919 1px 0 0px 0 inset;
}

.x-keyboard-mode .x-btn-focus.x-btn-nx-plain-small .x-btn-inner {
    color: #070707;
}

.x-btn-nx-plain-small .x-btn-arrow-el {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 23px;
    pointer-events: none;
}

.x-btn-nx-plain-small .x-btn-arrow-el.x-rtl {
    right: inherit;
    left: 0;
}

.x-keyboard-mode .x-btn-nx-plain-small.x-arrow-focus .x-btn-arrow-el {
    border: 1px solid #191919;
}

.x-btn-over.x-btn-nx-plain-small {
    border-color: #575757;
    background-image: none;
    background-color: #f5f5f5;
    background-image: -webkit-gradient(linear, top, bottom, color-stop(0%, #f5f5f5), color-stop(0%, #f5f5f5));
    background-image: -webkit-linear-gradient(top, #f5f5f5, #f5f5f5);
    background-image: -moz-linear-gradient(top, #f5f5f5, #f5f5f5);
    background-image: -o-linear-gradient(top, #f5f5f5, #f5f5f5);
    background-image: -ms-linear-gradient(top, #f5f5f5, #f5f5f5);
    background-image: linear-gradient(top, #f5f5f5, #f5f5f5);
}

.x-keyboard-mode .x-btn-focus.x-btn-over.x-btn-nx-plain-small {
    background-image: none;
    background-color: #f5f5f5;
    background-image: -webkit-gradient(linear, top, bottom, color-stop(0%, #f6f6f6), color-stop(50%, #f5f5f5), color-stop(51%, #e9e9e9), color-stop(0%, #f5f5f5));
    background-image: -webkit-linear-gradient(top, #f6f6f6, #f5f5f5 50%, #e9e9e9 51%, #f5f5f5);
    background-image: -moz-linear-gradient(top, #f6f6f6, #f5f5f5 50%, #e9e9e9 51%, #f5f5f5);
    background-image: -o-linear-gradient(top, #f6f6f6, #f5f5f5 50%, #e9e9e9 51%, #f5f5f5);
    background-image: -ms-linear-gradient(top, #f6f6f6, #f5f5f5 50%, #e9e9e9 51%, #f5f5f5);
    background-image: linear-gradient(top, #f6f6f6, #f5f5f5 50%, #e9e9e9 51%, #f5f5f5);
    -webkit-box-shadow: #575757 0 1px 0px 0 inset, #575757 0 -1px 0px 0 inset, #575757 -1px 0 0px 0 inset, #575757 1px 0 0px 0 inset;
    -moz-box-shadow: #575757 0 1px 0px 0


/* Copyright (c) 2000, 2024, Oracle and/or its affiliates.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License, version 2.0,
   as published by the Free Software Foundation.

   This program is designed to work with certain software (including
   but not limited to OpenSSL) that is licensed under separate terms,
   as designated in a particular file or component or in included license
   documentation.  The authors of MySQL hereby grant you an additional
   permission to link the program and your derivative works with the
   separately licensed software that they have either included with
   the program or referenced in the documentation.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License, version 2.0, for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */

#ifndef QUEUES_INCLUDED
#define QUEUES_INCLUDED

/**
  @file storage/myisam/queues.h
  Code for handling of priority queues.
  Implementation of queues from "Algorithms in C" by Robert Sedgewick.
*/

#include <stddef.h>
#include <sys/types.h>

#include "my_inttypes.h"
#include "mysql/psi/psi_memory.h"

#ifdef __cplusplus
extern "C" {
#endif

struct QUEUE {
  uchar **root;
  void *first_cmp_arg;
  uint elements;
  uint max_elements;
  uint offset_to_key; /* compare is done on element+offset */
  int max_at_top;     /* Normally 1, set to -1 if queue_top gives max */
  int (*compare)(void *, uchar *, uchar *);
  uint auto_extent;
};

void _downheap(QUEUE *queue, uint idx);
void queue_fix(QUEUE *queue);

#define queue_top(queue) ((queue)->root[1])
#define queue_element(queue, index) ((queue)->root[index + 1])
#define queue_end(queue) ((queue)->root[(queue)->elements])

static inline void queue_replaced(QUEUE *queue) { _downheap(queue, 1); }

static inline void queue_set_max_at_top(QUEUE *queue, int set_arg) {
  queue->max_at_top = set_arg ? -1 : 1;
}

typedef int (*queue_compare)(void *, uchar *, uchar *);

int init_queue(QUEUE *queue, PSI_memory_key psi_key, uint max_elements,
               uint offset_to_key, bool max_at_top, queue_compare compare,
               void *first_cmp_arg);
int reinit_queue(QUEUE *queue, PSI_memory_key psi_key, uint max_elements,
                 uint offset_to_key, bool max_at_top, queue_compare compare,
                 void *first_cmp_arg);
void delete_queue(QUEUE *queue);
void queue_insert(QUEUE *queue, uchar *element);
uchar *queue_remove(QUEUE *queue, uint idx);

static inline void queue_remove_all(QUEUE *queue) { queue->elements = 0; }

static inline bool queue_is_full(QUEUE *queue) {
  return queue->elements == queue->max_elements;
}

static inline bool is_queue_inited(QUEUE *queue) {
  return queue->root != nullptr;
}

#ifdef __cplusplus
}
#endif

#endif  // QUEUES_INCLUDED


i-Hot-wallet-Rust","src","network","mod.rs"],"content":"pub mod node_manager;\npub mod rate_limit;\n","traces":[],"covered":0,"coverable":0},{"path":["C:","\\","Users","plant","Desktop","Rust区块链","Defi-Hot-wallet-Rust","src","network","node_manager.rs"],"content":"use anyhow::{anyhow, Result};\nuse hex;\nuse reqwest::Client;\nuse serde_json::json;\n\nuse crate::core::domain::Tx;\n\n/// Return a default RPC node URL (can be replaced by configuration later).\npub fn select_node() -\u003e Option\u003cString\u003e {\n    // Keep simple for now — could read env var or config in future.\n    Some(\"https://mainnet.infura.io/v3/\".to_string())\n}\n\npub struct NodeManager {\n    client: Client,\n    rpc_url: String,\n}\n\nimpl NodeManager {\n    /// Create a NodeManager pointing at a given RPC URL.\n    pub fn new(rpc_url: \u0026str) -\u003e Self {\n        Self { client: Client::new(), rpc_url: rpc_url.to_string() }\n    }\n\n    /// Convenience constructor for Infura (requires a project id).\n    pub fn new_infura(project_id: \u0026str) -\u003e Self {\n        let rpc_url = format!(\"https://mainnet.infura.io/v3/{}\", project_id);\n        Self { client: Client::new(), rpc_url }\n    }\n\n    /// Send a raw transaction via JSON-RPC eth_sendRawTransaction.\n    /// Expects Tx::serialize() to return raw bytes of the signed transaction.\n    pub async fn send_tx(\u0026self, tx: Tx) -\u003e Result\u003cString\u003e {\n        let raw_hex = format!(\"0x{}\", hex::encode(tx.serialize()));\n        let payload = json!({\n            \"jsonrpc\": \"2.0\",\n            \"method\": \"eth_sendRawTransaction\",\n            \"params\": [ raw_hex ],\n            \"id\": 1\n        });\n\n        let resp =\n            self.client.post(\u0026self.rpc_url).json(\u0026payload).send().await.map_err(|e| anyhow!(e))?;\n        let status = resp.status();\n        let body: serde_json::Value = resp.json().await.map_err(|e| anyhow!(e))?;\n\n        if !status.is_success() {\n            return Err(anyhow!(\"rpc error status: {} body: {:?}\", status, body));\n        }\n        if let Some(result) = body.get(\"result\").and_then(|v| v.as_str()) {\n            Ok(result.to_string())\n        } else if let Some(err) = body.get(\"error\") {\n            Err(anyhow!(\"rpc returned error: {:?}\", err))\n        } else {\n            Err(anyhow!(\"unexpected rpc response: {:?}\", body))\n        }\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    #[test]\n    fn test_select_node_and_infura_url() {\n        // select_node returns a default base\n        let node = select_node();\n        assert!(node.is_some());\n        // Infura constructor produces expected URL format\n        let nm = NodeManager::new_infura(\"my-project-id\");\n        assert!(nm.rpc_url.contains(\"infura.io\"));\n        assert!(nm.rpc_url.ends_with(\"my-project-id\"));\n    }\n}\n","traces":[{"line":9,"address":[],"length":0,"stats":{"Line":288230376151711744}},{"line":11,"address":[],"


 time.Minute,
			max:      time.Hour,
			last:     0,
			retries:  0,
			expected: true,
		},
		{
			name:     "Second try, not ready",
			initial:  time.Minute,
			max:      time.Hour,
			last:     59 * time.Second,
			retries:  1,
			expected: false,
		},
		{
			name:     "Second try, ready",
			initial:  time.Minute,
			max:      time.Hour,
			last:     61 * time.Second, // Last try was over a minute ago
			retries:  1,
			expected: true,
		},
		{
			name:     "Third try, not ready",
			initial:  time.Minute,
			max:      time.Hour,
			last:     77 * time.Second, // Slightly less than backoffFactor * initial
			retries:  2,
			expected: false,
		},
		{
			name:     "Third try, ready",
			initial:  time.Minute,
			max:      time.Hour,
			last:     79 * time.Second, // Slightly more than backoffFactor * initial
			retries:  2,
			expected: true,
		},
		{
			name:     "Max, not ready",
			initial:  time.Minute,
			max:      time.Hour,
			last:     59 * time.Minute, // Slightly less than max
			retries:  900,
			expected: false,
		},
		{
			name:     "Max, ready",
			initial:  time.Minute,
			max:      time.Hour,
			last:     61 * time.Minute, // Slightly more than max
			retries:  900,
			expected: true,
		},
	}

	for _, test := range tests {
		t.Run(test.name, func(t *testing.T) {
			lsn := &listenerV2{job: job.Job{
				VRFSpec: &job.VRFSpec{
					BackoffInitialDelay: test.initial,
					BackoffMaxDelay:     test.max,
				},
			}}

			req := pendingRequest{
				confirmedAtBlock: 5,
				attempts:         test.retries,
				lastTry:          time.Now().Add(-test.last),
			}

			require.Equal(t, test.expected, lsn.ready(req, 10))
		})
	}
}
package validate_test

import (
	"encoding/json"
	"testing"
	"time"

	"github.com/ethereum/go-ethereum/common/hexutil"
	"github.com/manyminds/api2go/jsonapi"
	"github.com/pelletier/go-toml"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"

	commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config"

	"github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
	"github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest"
	"github.com/smartcontractkit/chainlink/v2/core/services/chainlink"
	"github.com/smartcontractkit/chainlink/v2/core/services/job"
	medianconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/median/config"
	"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/validate"
)

func TestValidateOracleSpec(t *testing.T) {
	var tt = []struct {
		name      string
		toml      string
		overrides func(c *chainlink.Config, s *chainlink.Secrets)
		assertion func(t *testing.T, os job.Job, err error)
	}{
		{
			name: "minimal OCR2 oracle spec",
			toml: `
type               = "offchain


y>
        /// Initializes a new instance of the <see cref="CategoryManager"/> class.
        /// </summary>
        public CategoryManager()
        {
            _dict = new Dictionary<int, Category>();
        }

        /// <summary>
        /// If the specified ID has been bound to a <see cref="Category"/> instance, returns the <see cref="Category"/>.
        /// Otherwise, initializes a <see cref="Category"/> with the specified ID and label, and binds it with the ID.
        /// </summary>
        /// <returns>The <see cref="Category"/> with the specified ID and label.</returns>
        /// <param name="id">The ID of the <see cref="Category"/>.</param>
        /// <param name="label">The label of the <see cref="Category"/>.</param>
        public Category GetOrCreate(int id, string label)
        {
            if (_dict.TryGetValue(id, out var result))
            {
                return result;
            }

            result = new Category(id, label);
            _dict.Add(id, result);
            return result;
        }
    }
}


;
		}

		private void Characteristics_Validated(object sender, EventArgs e)
		{
			if (Item == null)
				return;

			Item.Characteristics = 0;
			for (var i = 1; i < Characteristics.Items.Count; i++)
				if (Characteristics.CheckBoxItems[i].Checked)
					Item.Characteristics += (int)Characteristics.Items[i];
		}

		private void Attributes_Validated(object sender, EventArgs e)
		{
			if (Item == null)
				return;

			Item.Attributes = 0;
			for (var i = 1; i < Attributes.Items.Count; i++)
				if (Attributes.CheckBoxItems[i].Checked)
					Item.Attributes += (int)Attributes.Items[i];
		}

		public ModuleDefinitionControl()
		{
			InitializeComponent();
			Kind.DataSource = Enum.GetValues(typeof(ModuleKind));
			TargetRuntime.DataSource = Enum.GetValues(typeof(TargetRuntime));
			Architecture.DataSource = Enum.GetValues(typeof(TargetArchitecture));

			foreach (var mc in Enum.GetValues(typeof(ModuleCharacteristics)))
				Characteristics.Items.Add(mc);

			foreach (var mc in Enum.GetValues(typeof(ModuleAttributes)))
				Attributes.Items.Add(mc);
		}

		public virtual void Bind(ModuleDefinition item)
		{
			Item = item;

			if (item != null)
			{
				Kind.SelectedItem = item.Kind;
				TargetRuntime.SelectedItem = item.Runtime;
				Architecture.SelectedItem = item.Architecture;

				for (var i = 1; i < Characteristics.Items.Count; i++)
					Characteristics.CheckBoxItems[i].Checked = ((int)item.Characteristics & (int)Characteristics.Items[i]) != 0;

				for (var i = 1; i < Attributes.Items.Count; i++)
					Attributes.CheckBoxItems[i].Checked = ((int)item.Attributes & (int)Attributes.Items[i]) != 0;
			}
			else
			{
				Kind.SelectedIndex = -1;
				TargetRuntime.SelectedIndex = -1;
				Architecture.SelectedIndex = -1;
				Characteristics.SelectedIndex = -1;
				Attributes.SelectedIndex = -1;
			}

			if (!ReadOnly)
			{
				Enabled = (item != null);
			}
		}
	}
}


2.angularVelocity);
  expectValuesToBeClose(p1.invMomentOfInertia, p2.invMomentOfInertia);
  expect(p1.density).toEqual(p2.density);
  expect(p1.hue).toEqual(p2.hue);
  expect(p1.size).toEqual(p2.size);
  p1.fields.forEach((f1: Field) => {
    const f2 = p2.fields.get(f1.id);
    if (f2) {
      compareFields(f1, f2);
    } else {
      expect("second field").toEqual("doesn't exist");
    }
  });
  expect(p1.adjacentFields.size).toEqual(p2.adjacentFields.size);
  p1.adjacentFields.forEach((f1: Field) => {
    const f2 = p2.adjacentFields.get(f1.id);
    if (f2) {
      compareFields(f1, f2);
    } else {
      expect("second field").toEqual("doesn't exist");
    }
  });
  compareSubplates(p1.subplate, p2.subplate);
}

export function compareSubplates(p1: Subplate, p2: Subplate) {
  expect(p1.id).toEqual(p2.id);
  expectValuesToBeClose(p1.quaternion, p2.quaternion);
  expectValuesToBeClose(p1.angularVelocity, p2.angularVelocity);
  expect(p1.size).toEqual(p2.size);
  p1.fields.forEach((f1: Field) => {
    const f2 = p2.fields.get(f1.id);
    if (f2) {
      compareFields(f1, f2);
    } else {
      expect("second field").toEqual("doesn't exist");
    }
  });
}

export function compareFields(f1: Field, f2: Field) {
  expect(f1.elevation).not.toBeNaN();
  expect(f2.elevation).not.toBeNaN();
  expect(f1.elevation).toBeCloseTo(f2.elevation);
  expect(f1.crustThickness).toBeCloseTo(f2.crustThickness);
  expectValuesToBeClose(f1.absolutePos, f2.absolutePos);
  expectValuesToBeClose(f1.force, f2.force);
  expect(f1.age).toBeCloseTo(f2.age);
  expect(f1.mass).toEqual(f2.mass);
  expect(f1.boundary).toEqual(f2.boundary);
  expect(f1.noCollisionDist).toBeCloseTo(f2.noCollisionDist);
  expect(f1.subduction?.progress || 0).toBeCloseTo(f2.subduction?.progress || 0);
  expect(f1.draggingPlate?.id).toEqual(f2.draggingPlate?.id);
  expectValuesToBeClose(f1.subduction, f2.subduction);
  expectValuesToBeClose(f1.volcanicAct, f2.volcanicAct);
  expectValuesToBeClose(f1.earthquake, f2.earthquake);
  expectValuesToBeClose(f1.volcanicEruption, f2.volcanicEruption);
  expectValuesToBeClose(f1.crust, f2.crust);
}
import { Task } from './../../models/task';
import { Action } from '@ngrx/store';
import { type } from "../util";

export const TaskActionTypes = {
    LOAD:             type('[Task] -LOAD Requested-'),
    LOAD_COMPLETED:   type('[Task] -LOAD Completed-'),

    CREATE:           type('[Task] -CREATE Requested-'),
    CREATE_COMPLETED: type('[Task] -CREATE Completed-'),

    UPDATE:           type('[Task] -UPDATE Requested-'),
    UPDATE_COMPLETED: type('[Task] -UPDATE Completed-'),

    REMOVE:           type('[Task] -REMOVE Requested-'),
    REMOVE_COMPLETED: type('[Task] -REMOVE Completed-'),

    TASK_ERROR:       type('[Task] -Error-')
};

export class TaskPayload {
    constructor(public task: Task


'''
Inter-coder agreement statistic Fleiss' Kappa.

.. moduleauthor:: Chris Fournier <chris.m.fournier@gmail.com>
'''
from __future__ import absolute_import, division
from decimal import Decimal
from segeval.agreement import __fnc_metric__, __actual_agreement_linear__

def __fleiss_kappa_linear__(dataset, **kwargs):
    '''
    Calculates Fleiss' :math:`\kappa` (or multi-:math:`\kappa`), originally proposed in
    [DaviesFleiss1982]_.  For 2 coders, this is equivalent to Cohen's :math:`\kappa`
    [Cohen1960]_.
    '''
    metric_kwargs = dict(kwargs)
    metric_kwargs['return_parts'] = True
    # Arguments
    return_parts = kwargs['return_parts']
    # Check that there are more than 2 coders
    if len([True for coder_segs in dataset.values()
            if len(coder_segs.keys()) < 2]) > 0:
        raise Exception('Less than 2 coders specified.')
    # Check that there are an identical number of items
    if len(set([len(coder_segs.values()) for coder_segs in dataset.values()])) != 1:
        raise Exception('Unequal number of items contained.')
    # Initialize totals
    all_numerators, all_denominators, _, coders_boundaries = \
        __actual_agreement_linear__(dataset, **metric_kwargs)
    # Calculate Aa
    A_a = Decimal(sum(all_numerators)) / sum(all_denominators)
    # Calculate Ae
    coders = list(coders_boundaries.keys())
    P_segs = list()
    for m in range(0, len(coders) - 1):
        for n in range(m + 1, len(coders)):
            boundaries_m = sum(info[0] for info in
                               coders_boundaries[coders[m]])
            total_boundaries_m = sum(info[1] for info in
                                     coders_boundaries[coders[m]])
            boundaries_n = sum(info[0] for info in
                               coders_boundaries[coders[n]])
            total_boundaries_n = sum(info[1] for info in
                                     coders_boundaries[coders[n]])
            P_segs.append((Decimal(boundaries_m) / total_boundaries_m) *
                          (Decimal(boundaries_n) / total_boundaries_n))
    P_seg = Decimal(sum(P_segs)) / len(P_segs)
    A_e = P_seg
    # Calculate pi
    kappa = (A_a - A_e) / (Decimal('1') - A_e)
    # Return
    if return_parts:
        return A_a, A_e
    else:
        return kappa

def fleiss_kappa_linear(dataset, **kwargs):
    '''
    Calculates Fleiss' :math:`\kappa` (or multi-:math:`\kappa`), originally proposed in
    [DaviesFleiss1982]_.  For 2 coders, this is equivalent to Cohen's :math:`\kappa`
    [Cohen1960]_.
    '''
    return __fnc_metric__(__fleiss_kappa_linear__, dataset, **kwargs)


k-fab-solid-inverse:disabled{box-shadow:0 6px 10px rgba(0,0,0,.1744),0 1px 18px rgba(0,0,0,.1552),0 3px 5px rgba(0,0,0,.232);background-color:#8d8d8d;color:#000;opacity:1}.k-fab-item-text{border-color:rgba(255,255,255,.08);color:#fff;background-color:#101010;box-shadow:0 6px 10px rgba(0,0,0,.14),0 1px 18px rgba(0,0,0,.12),0 3px 5px rgba(0,0,0,.2)}.k-fab-item-icon{border-color:rgba(0,0,0,.08);color:#fff;background-color:#404040;box-shadow:0 6px 10px rgba(0,0,0,.14),0 1px 18px rgba(0,0,0,.12),0 3px 5px rgba(0,0,0,.2);outline:1px solid rgba(0,0,0,.08);outline-offset:-1px}.k-fab-item.k-hover .k-fab-item-icon,.k-fab-item:hover .k-fab-item-icon{border-color:rgba(128,128,128,.1168);background-color:#484848}.k-fab-item.k-focus .k-fab-item-icon,.k-fab-item.k-focus .k-fab-item-text,.k-fab-item:focus .k-fab-item-icon,.k-fab-item:focus .k-fab-item-text{outline-style:solid;outline-width:2px;outline-color:rgba(0,0,0,.08)}.k-fab-item.k-active .k-fab-item-icon,.k-fab-item:active .k-fab-item-icon{border-color:rgba(172,172,172,.1536);background-color:#4f4f4f}.k-fab-item.k-disabled,.k-fab-item:disabled{opacity:1}.k-fab-item.k-disabled .k-fab-item-icon,.k-fab-item.k-disabled .k-fab-item-text,.k-fab-item:disabled .k-fab-item-icon,.k-fab-item:disabled .k-fab-item-text{box-shadow:0 6px 10px rgba(0,0,0,.1744),0 1px 18px rgba(0,0,0,.1552),0 3px 5px rgba(0,0,0,.232);background-color:#0a0a0a;color:#999}.k-animation-container>.k-fab-popup{box-shadow:none}.k-actionsheet-container{width:100%;height:100%;max-width:clamp(100vw,100%,100%);max-height:clamp(100vh,100%,100%);position:fixed;top:0;left:0;z-index:9999;overflow:hidden;-webkit-transform:translateZ(0);transform:translateZ(0)}.k-actionsheet-container>.k-overlay{position:absolute;z-index:1}.k-actionsheet-container>.k-animation-container{width:100%;height:100%;border-radius:0;overflow:hidden;position:absolute;z-index:2;top:0;left:0;pointer-events:none}.k-actionsheet-container>.k-animation-container>.k-child-animation-container{position:absolute}.k-actionsheet-container>.k-actionsheet{position:absolute;z-index:2}.k-actionsheet-container .k-actionsheet{pointer-events:all}.k-actionsheet{width:var(--kendo-actionsheet-width,360px);height:var(--kendo-actionsheet-height,60vh);max-width:var(--kendo-actionsheet-max-width,100%);max-height:var(--kendo-actionsheet-max-height,60vh);border-width:0;border-style:solid;border-color:trans


.expected.Status, resp.UserSetting.Status)
		})
	}

	(&Cleanup[*generated.UserDeleteOne]{client: suite.client.db.User, ID: user2.ID}).MustDelete(reqCtx, t)
}

func TestQueryUserSettings(t *testing.T) {
	// setup user context
	reqCtx := testUser1.UserCtx

	user1 := (&UserBuilder{client: suite.client}).MustNew(reqCtx, t)
	user1Setting, err := user1.Setting(reqCtx)
	assert.NilError(t, err)

	// create another user to make sure we don't get their settings back
	_ = (&UserBuilder{client: suite.client}).MustNew(reqCtx, t)

	t.Run("Get User Settings", func(t *testing.T) {
		resp, err := suite.client.api.GetAllUserSettings(reqCtx)

		assert.NilError(t, err)
		assert.Assert(t, resp != nil)
		assert.Assert(t, resp.UserSettings.Edges != nil)

		// make sure only the current user settings are returned
		assert.Check(t, is.Equal(len(resp.UserSettings.Edges), 1))

		// setup valid user context
		reqCtx := auth.NewTestContextWithValidUser(user1.ID)

		resp, err = suite.client.api.GetAllUserSettings(reqCtx)

		assert.NilError(t, err)
		assert.Assert(t, resp != nil)
		assert.Assert(t, resp.UserSettings.Edges != nil)
		assert.Equal(t, user1Setting.ID, resp.UserSettings.Edges[0].Node.ID)
	})
}

func TestMutationUpdateUserSetting(t *testing.T) {
	org := (&OrganizationBuilder{client: suite.client}).MustNew(testUser1.UserCtx, t)

	om := (&OrgMemberBuilder{client: suite.client, UserID: viewOnlyUser.ID}).MustNew(testUser1.UserCtx, t)

	// create another user to make sure we don't get their settings back
	(&UserBuilder{client: suite.client}).MustNew(testUser1.UserCtx, t)
	org2 := (&OrganizationBuilder{client: suite.client}).MustNew(testUser2.UserCtx, t)

	testCases := []struct {
		name          string
		userSettingID string
		updateInput   testclient.UpdateUserSettingInput
		client        *testclient.TestClient
		ctx           context.Context
		expectedRes   testclient.UpdateUserSetting_UpdateUserSetting_UserSetting
		errorMsg      string
	}{
		{
			name:          "update default org and tags",
			userSettingID: testUser1.UserInfo.Edges.Setting.ID,
			updateInput: testclient.UpdateUserSettingInput{
				DefaultOrgID: &org.ID,
				Tags:         []string{"mitb", "funk"},
			},
			client: suite.client.api,
			ctx:    testUser1.UserCtx,
			expectedRes: testclient.UpdateUserSetting_UpdateUserSetting_UserSetting{
				Status: enums.UserStatusActive,
				Tags:   []string{"mitb", "funk"},
				DefaultOrg: &testclient.UpdateUserSetting_UpdateUserSetting_UserSetting_DefaultOrg{
					ID: org.ID,
				},
			},
		},
		{
			name:          "update default org and tags for view only user",
			userSettingID: viewOnlyUser.UserInfo.Edges.Setting.ID,
			updateInput: testclient.UpdateUserSettingInput{
				DefaultOrgID: &om.OrganizationID,
				Tags:         []string{"mitb", "funk"},
			},
			client: suite.client.api,
			ctx:    viewOnlyUser.UserCtx,
			expectedRes: testclient.UpdateUserSetting_UpdateUserSetting_UserSetting{
				Status: enums.UserStatusActive,
				Tags:   []string{"mitb", "funk"},
				Def


_02237406:
	ldr r0, [sp, #0x14]
	cmp r4, r0
	bne _022373BC
_0223740C:
	bl LCRandom
	lsr r1, r0, #0x1f
	lsl r2, r0, #0x1d
	sub r2, r2, r1
	mov r0, #0x1d
	ror r2, r0
	add r0, r1, r2
	lsl r0, r0, #0x10
	lsr r0, r0, #0xf
	ldrh r2, [r7, r0]
	cmp r6, r2
	beq _0223740C
	ldr r1, [sp, #0x34]
	ldr r0, [sp, #0x18]
	strh r2, [r1, r0]
	b _022373BC
_0223742E:
	add r1, r0, #0
	ldr r0, [sp]
	cmp r1, r0
	blt _02237398
	add sp, #0x1c
	pop {r4, r5, r6, r7, pc}
	nop
_0223743C: .word 0x00000133
_02237440: .word ov80_0223C698
_02237444: .word ov80_0223C738
	thumb_func_end ov80_02237334

	thumb_func_start ov80_02237448
ov80_02237448: ; 0x02237448
	push {r4, r5, r6, r7, lr}
	sub sp, #0x14
	str r0, [sp]
	str r1, [sp, #4]
	ldr r0, [sp, #0x28]
	mov r7, #0
	str r0, [sp, #0x28]
	ldr r0, [sp, #0x30]
	ldr r6, [sp, #0x2c]
	str r0, [sp, #0x30]
	lsl r0, r3, #0x19
	lsr r4, r0, #0x18
	add r0, r2, #0
	str r7, [sp, #0xc]
	bl ov80_022379C0
	lsl r0, r0, #0x18
	lsr r2, r0, #0x18
	ldr r0, [sp, #0x30]
	cmp r0, #0
	beq _022374CE
	ldr r3, _022375B8 ; =ov80_0223C990
	add r2, r7, #0
_02237476:
	lsl r0, r2, #1
	ldrh r1, [r3, r0]
	ldr r0, [sp, #0x28]
	cmp r0, r1
	bne _02237484
	add r5, r2, #0
	b _02237490
_02237484:
	add r0, r2, #1
	lsl r0, r0, #0x10
	lsr r2, r0, #0x10
	ldr r0, _022375BC ; =0x000001DD
	cmp r2, r0
	blo _02237476
_02237490:
	ldr r0, _022375BC ; =0x000001DD
	cmp r2, r0
	bne _0223749A
	add r5, r0, #0
	sub r5, #0x65
_0223749A:
	ldr r0, _022375C0 ; =ov80_0223C5A8
	mov r1, #0
_0223749E:
	lsl r2, r1, #2
	add r2, r0, r2
	ldrh r2, [r2, #2]
	cmp r5, r2


x00,0x76,0x00,0x77,0x00,0xea,0x00,0x78,0x00,0x7a,0x00,0x79,0x00,0x7b,0x00,
  0x7d,0x00,0x7c,0x00,0xb8,0x00,0xa1,0x00,0x7f,0x00,0x7e,0x00,0x80,0x00,0x81,0x00,
  0xec,0x00,0xee,0x00,0xba,0x0b,0x61,0x73,0x63,0x69,0x69,0x63,0x69,0x72,0x63,0x75,
  0x6d,0x06,0x65,0x6e,0x64,0x61,0x73,0x68,0x06,0x65,0x6d,0x64,0x61,0x73,0x68,0xb8,
  0x01,0xff,0x85,0xb0,0x00,0x8d,0x00,0xb8,0x02,0x7a,0x4b,0x20,0x60,0x20,0x60,0x20,
  0x60,0x20,0x60,0x53,0xb0,0x08,0x23,0x42,0xb0,0x00,0x16,0xb0,0x4a,0x76,0xb0,0x02,
  0xb0,0x0c,0x3f,0x18,0xb0,0x00,0xb0,0x0a,0xb0,0x0b,0x60,0x3f,0xb0,0x0c,0x12,0xb0,
  0x00,0xb0,0x0e,0x3e,0xb0,0x01,0x11,0xb0,0x00,0x39,0xb0,0x0e,0xb0,0x00,0x46,0x44,
  0xb0,0x00,0xb0,0x10,0x3e,0xb0,0x01,0x11,0xb0,0x00,0x39,0xb0,0x10,0xb0,0x00,0x46,
  0x44,0xb0,0x00,0xb0,0x12,0x3e,0xb0,0x01,0x11,0xb0,0x00,0x39,0xb0,0x12,0xb0,0x00,
  0x46,0x44,0xb0,0x00,0xb0,0x14,0x3e,0xb0,0x01,0x11,0xb0,0x00,0x39,0xb0,0x14,0xb0,
  0x00,0x46,0x44,0xb0,0x00,0xb0,0x16,0x3e,0xb0,0x01,0x11,0xb0,0x00,0x39,0xb0,0x16,
  0xb0,0x00,0x46,0x44,0xb0,0x0c,0xb0,0x05,0x2b,0xb0,0x0e,0xb0,0x05,0x2b,0xb0,0x10,
  0xb0,0x05,0x2b,0xb0,0x12,0xb0,0x05,0x2b,0xb0,0x14,0xb0,0x05,0x2b,0xb0,0x16,0xb0,
  0x05,0x2b,0xb0,0x0a,0xb0,0x0e,0x2b,0xb0,0x18,0xb0,0x0e,0x2b,0xb0,0x1a,0xb0,0x0e,
  0x2b,0xb0,0x1c,0xb0,0x0e,0x2b,0xb0,0x1e,0xb0,0x0e,0x2b,0xb0,0x20,0xb0,0x0e,0x2b,
  0xb0,0x01,0x16,0x18
  };

}
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
// *       Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// *       Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// *       Neither the name of Industrial Light & Magic nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NO