ounter, 1tick=31uS.
     */
voltage_shift_c:
	ldr	r10, omap243x_srs_prcm_voltctrl	@ get addr of volt ctrl
	ldr	r8, [r10]		@ get value
	ldr	r7, ddr_prcm_mask_val	@ get value of mask
	and	r8, r8, r7		@ apply mask to clear bits
	orr	r8, r8, r9		@ bulld value for L0/L1-volt operation.
	str	r8, [r10]		@ set up for change.
	mov	r7, #0x4000		@ get val for force
	orr	r8, r8, r7		@ build value for force
	str	r8, [r10]		@ Force transition to L1

	ldr	r10, omap243x_srs_timer_32ksynct	@ get addr of counter
	ldr	r8, [r10]		@ get value
	add	r8, r8, #0x2		@ give it at most 62uS (min 31+)
volt_delay_c:
	ldr	r7, [r10]		@ get timer value
	cmp	r8, r7			@ time up?
	bhi	volt_delay_c		@ not yet->branch
	ret	lr			@ back to caller

omap243x_srs_cm_clksel2_pll:
	.word OMAP2430_CM_REGADDR(PLL_MOD, CM_CLKSEL2)
omap243x_srs_sdrc_dlla_ctrl:
	.word OMAP243X_SDRC_REGADDR(SDRC_DLLA_CTRL)
omap243x_srs_sdrc_rfr_ctrl:
	.word OMAP243X_SDRC_REGADDR(SDRC_RFR_CTRL_0)
omap243x_srs_prcm_voltctrl:
	.word OMAP2430_PRCM_VOLTCTRL
ddr_prcm_mask_val:
	.word 0xFFFF3FFC
omap243x_srs_timer_32ksynct:
	.word OMAP2_L4_IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010)

ENTRY(omap243x_sram_reprogram_sdrc_sz)
	.word	. - omap243x_sram_reprogram_sdrc

/*
 * Set dividers and pll. Also recalculate DLL value for DDR and unlock mode.
 */
	.align	3
ENTRY(omap243x_sram_set_prcm)
	stmfd	sp!, {r0-r12, lr}	@ regs to stack
	adr	r4, pbegin		@ addr of preload start
	adr	r8, pend		@ addr of preload end
	mcrr	p15, 1, r8, r4, c12	@ preload into icache
pbegin:
	/* move into fast relock bypass */
	ldr	r8, omap243x_ssp_pll_ctl	@ get addr
	ldr	r5, [r8]		@ get val
	mvn	r6, #0x3		@ clear mask
	and	r5, r5, r6		@ clear field
	orr	r7, r5, #0x2		@ fast relock val
	str	r7, [r8]		@ go to fast relock
	ldr	r4, omap243x_ssp_pll_stat	@ addr of stat
block:
	/* wait for bypass */
	ldr	r8, [r4]		@ stat value
	and	r8, r8, #0x3		@ mask for stat
	cmp	r8, #0x1		@ there yet
	bne	block			@ loop if not

	/* set new dpll dividers _after_ in bypass */
	ldr	r4, omap243x_ssp_pll_div	@ get addr
	str	r0, [


 _assetManager:createjs.LoadQueue;

    private _plane:objects.Plane;
    private _ocean:objects.Ocean;

    // PUBLIC PROPERTIES

    // CONSTRUCTORS
    constructor(assetManager:createjs.LoadQueue, currentScene:number) {
      super();
      this._assetManager = assetManager;
      this._currentScene = currentScene;
      this.Start();
    }
    // PRIVATE METHODS

    // PUBLIC METHODS
    public Start():void {
      this._plane = new objects.Plane(this._assetManager);
      this._ocean = new objects.Ocean(this._assetManager);
      this.Main();
    }

    public Update():number {
      this._plane.update();
      this._ocean.Update();
      console.log(this.parent.stage.mouseX);
      return this._currentScene;

    }

    public Main():void {

      this.addChild(this._ocean);
      this.addChild(this._plane);

    }
  }
}
import { getServiceLabel } from "server/components/lists";
import { ServiceType } from "server/models/types";
import { sitemapController } from "../controllers";

describe("SiteMap", () => {
  let mockReq: any;
  let mockRes: any;

  beforeEach(() => {
    mockReq = {};

    mockRes = {
      render: jest.fn(),
    };
  });

  test("a section is rendered for each service type", () => {
    sitemapController(mockReq, mockRes);

    expect(mockRes.render.mock.calls[0][0]).toBe("sitemap.html");
    expect(mockRes.render.mock.calls[0][1].sections).toBeArrayOfSize(
      Object.keys(ServiceType).length
    );
  });

  test("section titles are correct", () => {
    const serviceTypes = Object.keys(ServiceType);

    sitemapController(mockReq, mockRes);

    const sections = mockRes.render.mock.calls[0][1].sections;
    sections.forEach((section: any, index: any) => {
      const serviceType = serviceTypes[index];
      expect(section.title).toBe(`Find ${getServiceLabel(serviceType)} per country`);
    });
  });

  test("section links are correct", () => {
    const serviceTypes = Object.keys(ServiceType);

    sitemapController(mockReq, mockRes);

    const sections = mockRes.render.mock.calls[0][1].sections;
    sections.forEach((section: any, index: any) => {
      const serviceType = serviceTypes[index];
      expect(section.links[0].href).toBe(`/find?country=Afghanistan&serviceType=${serviceType}`);
    });
  });
});
/**
 *
 * This module contains the data interface for nodes in tree components.
 *
 * @module treenode
 *
 */
import { IconType } from '../utils';

/**
 * Defines model of TreeNode API.
 * @group Model
 */
export interface TreeNode {
    /**
     * Unique identifier of the element.
     */
    id?: string | undefined;
    /**
     * Unique key of the node.
     */
    key?: string | number | undefined;
    /**
     * Label of the node.
     */
    label?: string | undefined;
    /**
     * Data represented by the node.
     */
    data?: any | undefined;
    /**
     * Icon of the node to display next to content.
     */
    icon?: IconType<TreeNode> | undefined;
    /**
     * Used to get the child elements of the component.
     * @readonly
     */
    children?: TreeNode[] | undefined;
    /**
     * Inline style of the node.
     */
    style?: React.CSSProperties | undefined;
    /**
     * Style class of the node.
     */
    className?: string | undefined;
    /**
     * Whether the node is droppable when dragdrop is enabled.
     * @defaultValue true
     */
    droppable?: boolean | undefined;
    /**
     * Whether the node is draggable when dragdrop is enabled.
     * @d


e_sa5_daily/daily_build/bmetc/sa5/middleware-soc/bm_opencv/modules/core/src/cv_bmcpu.cpp:226->getLocationPath]bmcpu full path: /home/bitmain/sophonsdk_vMaster/scripts/../lib/opencv/pcie/bmcpu/
[/home/jenkins/workspace/all_in_one_sa5_daily/daily_build/bmetc/sa5/middleware-soc/bm_opencv/modules/core/src/cv_bmcpu.cpp:95->InternalBMCpuRegister]0/4 devices finished
[/home/jenkins/workspace/all_in_one_sa5_daily/daily_build/bmetc/sa5/middleware-soc/bm_opencv/modules/core/src/cv_bmcpu.cpp:95->InternalBMCpuRegister]1/4 devices finished
[/home/jenkins/workspace/all_in_one_sa5_daily/daily_build/bmetc/sa5/middleware-soc/bm_opencv/modules/core/src/cv_bmcpu.cpp:95->InternalBMCpuRegister]2/4 devices finished
[/home/jenkins/workspace/all_in_one_sa5_daily/daily_build/bmetc/sa5/middleware-soc/bm_opencv/modules/core/src/cv_bmcpu.cpp:95->InternalBMCpuRegister]3/4 devices finished
[/home/jenkins/workspace/all_in_one_sa5_daily/daily_build/bmetc/sa5/middleware-soc/bm_opencv/modules/core/src/cv_bmcpu.cpp:104->InternalBMCpuRegister]device 0 failed to enable on-chip CPU! If not using bmcpu_opencv function, please ignore it.
[/home/jenkins/workspace/all_in_one_sa5_daily/daily_build/bmetc/sa5/middleware-soc/bm_opencv/modules/core/src/cv_bmcpu.cpp:104->InternalBMCpuRegister]device 1 failed to enable on-chip CPU! If not using bmcpu_opencv function, please ignore it.
[/home/jenkins/workspace/all_in_one_sa5_daily/daily_build/bmetc/sa5/middleware-soc/bm_opencv/modules/core/src/cv_bmcpu.cpp:104->InternalBMCpuRegister]device 2 failed to enable on-chip CPU! If not using bmcpu_opencv function, please ignore it.
[/home/jenkins/workspace/all_in_one_sa5_daily/daily_build/bmetc/sa5/middleware-soc/bm_opencv/modules/core/src/cv_bmcpu.cpp:104->InternalBMCpuRegister]device 3 failed to enable on-chip CPU! If not using bmcpu_opencv function, please ignore it.
test type: 3   1-only dec  2-only enc  3-mix
input bitstream file: /home/bitmain/multimedia_files/1088test1_420.jpg
 thread input : /home/bitmain/multimedia_files/1088test1_420.jpg, test times = 5
 thread input : /home/bitmain/multimedia_files/1088test1_420.jpg, test times = 5
 thread input : /home/bitmain/multimedia_files/1088test1_420.jpg, test times = 5
 thread input : /home/bitmain/multimedia_files/1088test1_420.jpg, test times = 5
Open /dev/bm-sophon0 successfully, device index = 0, jpu fd = 6, vpp fd = 6
Decoder0 time(second): 0.033328
Decoder2 time(second): 0.033635
Encoder1 time(second): 0.028


rked as deprecated in enums.proto.
	StatusCode_DEPLOY_TRANSFORM_MANIFEST_ERR StatusCode = 1018
	// Error setting user specified additional labels.
	//
	// Deprecated: Marked as deprecated in enums.proto.
	StatusCode_DEPLOY_SET_LABEL_ERR StatusCode = 1019
	// Error writing hydrated kubernetes manifests.
	//
	// Deprecated: Marked as deprecated in enums.proto.
	StatusCode_DEPLOY_MANIFEST_WRITE_ERR StatusCode = 1020
	// Error getting images from a kubernetes manifest.
	//
	// Deprecated: Marked as deprecated in enums.proto.
	StatusCode_DEPLOY_PARSE_MANIFEST_IMAGES_ERR StatusCode = 1021
	// Helm config `createNamespace` not available
	StatusCode_DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE StatusCode = 1022
	// Kubernetes cluster reported an internal system error
	StatusCode_DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR StatusCode = 1023
	// The Kptfile cannot be created via `kpt live init`.
	StatusCode_DEPLOY_KPTFILE_INIT_ERR StatusCode = 1024
	// The `kpt fn source` cannot read the given manifests.
	StatusCode_DEPLOY_KPT_SOURCE_ERR StatusCode = 1025
	// The Kptfile exists but cannot be opened or parsed.
	StatusCode_DEPLOY_KPTFILE_INVALID_YAML_ERR StatusCode = 1026
	// kpt fails to live apply the manifests to the cluster.
	StatusCode_DEPLOY_KPT_APPLY_ERR StatusCode = 1027
	// The Cloud Run Client could not be created
	StatusCode_DEPLOY_GET_CLOUD_RUN_CLIENT_ERR StatusCode = 1028
	// The Cloud Run Client could not get details about the service.
	StatusCode_DEPLOY_CLOUD_RUN_GET_SERVICE_ERR StatusCode = 1029
	// The Cloud Run Client was unable to update the service.
	StatusCode_DEPLOY_CLOUD_RUN_UPDATE_SERVICE_ERR StatusCode = 1030
	// The Cloud Run Client was unable to delete the service.
	StatusCode_DEPLOY_CLOUD_RUN_DELETE_SERVICE_ERR StatusCode = 1031
	// The Cloud Run Client could not get details about the workerpool.
	StatusCode_DEPLOY_CLOUD_RUN_GET_WORKER_POOL_ERR StatusCode = 1032
	// The Cloud Run Client was unable to update the workerpool.
	StatusCode_DEPLOY_CLOUD_RUN_UPDATE_WORKER_POOL_ERR StatusCode = 1033
	// The Cloud Run Client was unable to delete the workerpool.
	StatusCode_DEPLOY_CLOUD_RUN_DELETE_WORKER_POOL_ERR StatusCode = 1034
	// Error expanding paths
	StatusCode_TEST_USER_CONFIG_ERR StatusCode = 1101
	// Error running container-structure-test
	StatusCode_TEST_CST_USER_ERR StatusCode = 1102
	// Unable to docker pull image
	StatusCode_TEST_IMG_PULL_ERR StatusCode = 1103
	// Unable to parse test command
	StatusCode_TEST_CUSTOM_CMD_PARSE_ERR StatusCode = 1104
	// Command returned non-zero exit code
	StatusCode_TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR StatusCode = 1105
	// command cancelled or timed out
	StatusCode_TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR StatusCode = 1106
	// command cancelled or timed out
	StatusCode_TEST_CUSTOM_CMD_RUN_CANCELLED_ERR StatusCode = 1107
	// command context error
	StatusCode_TEST_CUSTOM_CMD_RUN_EXECUTION_ERR StatusCode = 1108
	// command exited
	StatusCode_TEST_CUSTOM_CMD_RUN_EXITED_ERR StatusCode = 1110
	// error running cmd
	StatusCode_TEST_CUSTOM_CMD_RUN_ERR StatusCode = 1111
	// Error getting dependencies from command
	StatusCode_TEST_CUSTOM_DEPENDENCIES_CMD_ERR


) {
          property.value = property.value;
          // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
          // @ts-expect-error
          property.valueRange.endLine = lineNumber;
          // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
          // @ts-expect-error
          property.valueRange.endColumn = column;
          property.range.endLine = lineNumber;
          property.range.endColumn = tokenValue === ';' ? newColumn : column;
          rule.properties.push(property);
          if (tokenValue === '}') {
            rule.styleRange.endLine = lineNumber;
            rule.styleRange.endColumn = column;
            rules.push(rule);
            state = CSSParserStates.Initial;
          } else {
            state = CSSParserStates.Style;
          }
        } else if (!tokenType.has('comment')) {
          property.value += tokenValue;
        }
        break;
      default:
        console.assert(false, 'Unknown CSS parser state.');
    }
    processedChunkCharacters += newColumn - column;
    if (processedChunkCharacters > chunkSize) {
      chunkCallback({chunk: rules, isLastChunk: false});
      rules = [];
      processedChunkCharacters = 0;
    }
  }
  const tokenizer = createTokenizer('text/css');
  let lineNumber: number;
  for (lineNumber = 0; lineNumber < lines.length; ++lineNumber) {
    const line = lines[lineNumber];
    tokenizer(line, processToken);
    processToken('\n', null, line.length, line.length + 1);
  }
  chunkCallback({chunk: rules, isLastChunk: true});

  function createRange(lineNumber: number, columnNumber: number): Range {
    return {startLine: lineNumber, startColumn: columnNumber, endLine: lineNumber, endColumn: columnNumber};
  }
}
//Change value of property with a certain name and keeps old value for unexecute
class ChangePropertyCommand implements Command{
    private name: string;
    private value: string;
    private oldValue: string;

    constructor(name: string, value: string) {
        this.name = name;
        this.value = value;
    }

    public reversible(model: Model) {
        this.oldValue = model.getCurrentElement().getProperties()[this.name].value;
        return this.oldValue !== this.value;
    }

    public execute(model: Model) {
        model.changePropertyValue(this.name, this.value);
    }

    public unexecute(model: Model) {
        model.changePropertyValue(this.name, this.oldValue);
    }
}import { InterestDateType } from 'app/common/interestDateType'
import { MomentFactory } from 'common/momentFactory'
import { Moment } from 'moment'
import { InterestType } from 'claim/form/models/interest'
import { calculateInterest } from 'app/common/calculateInterest'
import { Claim } from 'claims/models/claim'

export async function getInterestDetails (claim: Claim): Promise<object> {
  if (claim.claimData.interest.type === InterestType.NO_INTEREST) {
    return undefined
  }

  let interestDate: Moment

  if (claim.claimData.interestDate.type === InterestDateType.CUSTOM) {
    interestDate = claim.claimData.interestDate.date
  } else {
    interestDate = claim.createdAt
  }

  const todayDate: Moment = MomentFactory.currentDate()
  const noOfDays: number = todayDate.diff(interestDate, 'days')
  const rate: number = claim.claimData.interest.rate

  return {
    numberOfDays: noOfDays,
    interest: await calculateInterest(claim.claimData.amount.totalAmount(), claim.claimData.


);
    expect(matchKind, same(expectMatch));
  }
}

@reflectiveTest
class IncrementalResolverTest extends ResolverTestCase {
  Source source;
  String code;
  LibraryElement library;
  CompilationUnit unit;

  void setUp() {
    super.setUp();
    test_resolveApiChanges = true;
    log.logger = log.NULL_LOGGER;
  }

  void test_classMemberAccessor_body() {
    _resolveUnit(r'''
class A {
  int get test {
    return 1 + 2;
  }
}''');
    _resolve(_editString('+', '*'), _isFunctionBody);
  }

  void test_constructor_body() {
    _resolveUnit(r'''
class A {
  int f;
  A(int a, int b) {
    f = a + b;
  }
}''');
    _resolve(_editString('+', '*'), _isFunctionBody);
  }

  void test_constructor_fieldFormalParameter() {
    _resolveUnit(r'''
class A {
  int xy;
  A(this.x);
}''');
    _resolve(_editString('this.x', 'this.xy'), _isDeclaration);
  }

  void test_constructor_fieldInitializer_add() {
    _resolveUnit(r'''
class A {
  int f;
  A(int a, int b);
}''');
    _resolve(_editString(');', ') : f = a + b;'), _isClassMember);
  }

  void test_constructor_fieldInitializer_edit() {
    _resolveUnit(r'''
class A {
  int f;
  A(int a, int b) : f = a + b {
    int a = 42;
  }
}''');
    _resolve(_editString('+', '*'), _isExpression);
  }

  void test_constructor_label_add() {
    _resolveUnit(r'''
class A {
  A() {
    return 42;
  }
}
''');
    _resolve(_editString('return', 'label: return'), _isBlock);
  }

  void test_constructor_localVariable_add() {
    _resolveUnit(r'''
class A {
  A() {
    42;
  }
}
''');
    _resolve(_editString('42;', 'var res = 42;'), _isBlock);
  }

  void test_constructor_superConstructorInvocation() {
    _resolveUnit(r'''
class A {
  A(int p);
}
class B extends A {
  B(int a, int b) : super(a + b);
}
''');
    _resolve(_editString('+', '*'), _isExpression);
  }

  void test_function_localFunction_add() {
    _resolveUnit(r'''
int main() {
  return 0;
}
callIt(f) {}
''');
    _resolve(_editString('return 0;', 'callIt((p) {});'), _isBlock);
  }

  void test_functionBody_body() {
    _resolveUnit(r'''
main(int a, int b) {
  return a + b;
}''');
    _resolve(_editString('+', '*'), _isFunctionBody);
  }

  void test_functionBody_expression() {
    _resolveUnit(r'''
main(int a, int b) => a + b;
''');
    _resolve(_editString('+', '*'), _isExpression);
  }

  void test_functionBody_statement() {
    _resolveUnit(r'''
main(int a, int b) {
  return a + b;
}''');
    _resolve(_editString('+', '*'), _isStatement);
  }

  void test_method_body() {
    _resolveUnit(r'''
class A {
  m(int a, int b) {
    return a + b;
  }
}''');
    _resolve(_editString('+', '*'), _isFunctionBody);
  }

  void t


killingPartRepository.saveAll(secondSong.getKillingParts());
        killingPartRepository.saveAll(thirdSong.getKillingParts());
        killingPartRepository.saveAll(fourthSong.getKillingParts());
        killingPartRepository.saveAll(fifthSong.getKillingParts());
        killingPartRepository.saveAll(standardSong.getKillingParts());

        addLikeToKillingPart(firstSong.getKillingParts().get(0), member);
        addLikeToKillingPart(firstSong.getKillingParts().get(1), member);
        addLikeToKillingPart(firstSong.getKillingParts().get(2), member);

        addLikeToKillingPart(secondSong.getKillingParts().get(0), member);
        addLikeToKillingPart(secondSong.getKillingParts().get(1), member);
        addLikeToKillingPart(secondSong.getKillingParts().get(2), member);

        addLikeToKillingPart(thirdSong.getKillingParts().get(0), member);
        addLikeToKillingPart(thirdSong.getKillingParts().get(1), member);
        addLikeToKillingPart(thirdSong.getKillingParts().get(2), member);

        addLikeToKillingPart(fourthSong.getKillingParts().get(0), member);
        addLikeToKillingPart(fourthSong.getKillingParts().get(1), member);

        addLikeToKillingPart(fifthSong.getKillingParts().get(0), member);
        addLikeToKillingPart(fifthSong.getKillingParts().get(1), member);

        // when
        saveAndClearEntityManager();
        final List<Song> songs = songRepository.findSongsWithMoreLikeCountThanSongWithId(
            standardSong.getId(),
            PageRequest.of(0, 10)
        );

        // then
        assertThat(songs).usingRecursiveComparison()
            .ignoringFieldsOfTypes(LocalDateTime.class)
            .isEqualTo(List.of(
                findSavedSong(fourthSong),
                findSavedSong(fifthSong),
                findSavedSong(firstSong),
                findSavedSong(secondSong),
                findSavedSong(thirdSong))
            );
    }

    @DisplayName("Artist 의 모든 노래를 좋아요 개수와 함께 조회한다.")
    @Test
    void findAllSongsWithTotalLikeCountByArtist() {
        // given
        final Member firstMember = createAndSaveMember("first@naver.com", "first");
        final Member secondMember = createAndSaveMember("second@naver.com", "second");
        final Song firstSong = saveSong(createNewSongWithKillingParts());
        final Song secondSong = saveSong(createNewSongWithKillingParts());
        final Song thirdSong = saveSong(createNewSongWithKillingParts());

        killingPartRepository.saveAll(firstSong.getKillingParts());
        killingPartRepository.saveAll(secondSong.getKillingParts());
        killingPartRepository.saveAll(thirdSong.getKillingParts());

        addLikeToKillingPart(firstSong.getKillingParts().get(0), firstMember);
        addLikeToKillingPart(firstSong.getKillingParts().get(0), secondMember);
        addLikeToKillingPart(firstSong.getKillingParts().get(1), firstMember);
        addLikeToKillingPart(firstSong.getKillingParts().get(2), firstMember);

        saveAndClearEntityManager();

        // when
        final Song songToFind = songRepository.findById(firstSong.getId()).get();
        final Artist artistToFind = songToFind.getArtist();
        final List<SongTotalLikeCountDto> result = songRepository.findAllSongsWithTotalLikeCountByArtist(
            artistToFind);

        // then
        assertAll(
            () -> assertThat(result).hasSize(1),
            () ->


using PostgreSQL.TestInfrastructure;
using TestCommon.TestInfrastructure;

namespace PostgreSQL.Running_MigrationScripts;

[Collection(nameof(PostgreSqlGrateTestContext))]
// ReSharper disable once InconsistentNaming
public class Failing_Scripts(PostgreSqlGrateTestContext testContext, ITestOutputHelper testOutput)
    : TestCommon.Generic.Running_MigrationScripts.Failing_Scripts(testContext, testOutput)
{

    protected override string ExpectedStartOfErrorMessageForInvalidSql =>
        """
        Update ("up"):
        --------------------------------------------------------------------------------
        2_failing.sql: 427


ST: file already exists, mkdir 'G:\Git\lsp-sample\node_modules.staging'
                npm ERR! File exists: G:\Git\lsp-sample\node_modules.staging
                npm ERR! Remove the existing file and try again, or run npm
                npm ERR! with --force to overwrite files recklessly.
            """.trimIndent()

            output.lines().groupLines("npm ERR! ") shouldBe listOf(
                "EEXIST: file already exists, mkdir 'G:\\Git\\lsp-sample\\node_modules.staging' " +
                    "File exists: G:\\Git\\lsp-sample\\node_modules.staging " +
                    "Remove the existing file and try again, or run npm " +
                    "with --force to overwrite files recklessly."
            )
        }
    }
})
/*
 * Copyright (C) 2017 The ORT Project Authors (see <https://github.com/oss-review-toolkit/ort/blob/main/NOTICE>)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * SPDX-License-Identifier: Apache-2.0
 * License-Filename: LICENSE
 */

package org.ossreviewtoolkit.plugins.packagemanagers.node

import java.io.File
import java.util.LinkedList

import org.ossreviewtoolkit.analyzer.PackageManager.Companion.processPackageVcs
import org.ossreviewtoolkit.analyzer.parseAuthorString
import org.ossreviewtoolkit.downloader.VcsHost
import org.ossreviewtoolkit.model.Hash
import org.ossreviewtoolkit.model.Identifier
import org.ossreviewtoolkit.model.Package
import org.ossreviewtoolkit.model.RemoteArtifact
import org.ossreviewtoolkit.model.VcsInfo
import org.ossreviewtoolkit.model.VcsType
import org.ossreviewtoolkit.utils.common.realFile
import org.ossreviewtoolkit.utils.common.toUri
import org.ossreviewtoolkit.utils.spdx.SpdxConstants

private const val NON_EXISTING_SEMVER = "0.0.0"

/**
 * Expand an NPM shortcut [url] to a regular URL as used for dependencies, see
 * https://docs.npmjs.com/cli/v7/configuring-npm/package-json#urls-as-dependencies.
 */
internal fun expandShortcutUrl(url: String): String {
    // A hierarchical URI looks like
    //     [scheme:][//authority][path][?query][#fragment]
    // where a server-based "authority" has the syntax
    //     [user-info@]host[:port]
    val uri = url.toUri().getOrElse {
        // Fall back to returning the original URL.
        return url
    }

    val path = uri.schemeSpecificPart

    // Do not mess with crazy URLs.
    if (path.startsWith("git@") || path.startsWith("github.com") || path.startsWith("gitlab.com")) return url

    return if (!path.isNullOrEmpty() && listOf(uri.authority, uri.query).all { it == null }) {
        // See https://docs.npmjs.com/cli/v7/configuring-npm/package-json#github-urls.
        val revision = uri.fragment?.let { "#$it" }.orEmpty()

        // See https://docs.npmjs.com/cli/v7/configuring-npm/package-json#repository.
        when (uri.scheme) {
            null, "github" -> "https://github.com/$path.git$revision"
            "gist" -> "https://gist.github.com/$path$revision"
            "bitbucket" -> "https://bitbucket.org/$path.git$revision"
            "gitlab" -> "https://gitlab.com/$path.git$revision"
            else -> url
        }
    } else {
        url
    }
}

/**


fromLTWH(playedPart - handleHeight, baseOffset - barHeight, 10, 20),
        Radius.circular(12.0),
      ),
      colors.handlePaint,
    );
  }
}
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'user_care_program_controller.dart';

// **************************************************************************
// RiverpodGenerator
// **************************************************************************

String _$userCareProgramForDateRangeHash() =>
    r'5b20172d23a2415869ad0c88ef5876b9792f0e4c';

/// Copied from Dart SDK
class _SystemHash {
  _SystemHash._();

  static int combine(int hash, int value) {
    // ignore: parameter_assignments
    hash = 0x1fffffff & (hash + value);
    // ignore: parameter_assignments
    hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
    return hash ^ (hash >> 6);
  }

  static int finish(int hash) {
    // ignore: parameter_assignments
    hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
    // ignore: parameter_assignments
    hash = hash ^ (hash >> 11);
    return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
  }
}

typedef UserCareProgramForDateRangeRef
    = FutureProviderRef<List<UserCareProgram>?>;

/// See also [userCareProgramForDateRange].
@ProviderFor(userCareProgramForDateRange)
const userCareProgramForDateRangeProvider = UserCareProgramForDateRangeFamily();

/// See also [userCareProgramForDateRange].
class UserCareProgramForDateRangeFamily
    extends Family<AsyncValue<List<UserCareProgram>?>> {
  /// See also [userCareProgramForDateRange].
  const UserCareProgramForDateRangeFamily();

  /// See also [userCareProgramForDateRange].
  UserCareProgramForDateRangeProvider call(
    String startDate,
    String endDate,
  ) {
    return UserCareProgramForDateRangeProvider(
      startDate,
      endDate,
    );
  }

  @override
  UserCareProgramForDateRangeProvider getProviderOverride(
    covariant UserCareProgramForDateRangeProvider provider,
  ) {
    return call(
      provider.startDate,
      provider.endDate,
    );
  }

  static const Iterable<ProviderOrFamily>? _dependencies = null;

  @override
  Iterable<ProviderOrFamily>? get dependencies => _dependencies;

  static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;

  @override
  Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
      _allTransitiveDependencies;

  @override
  String? get name => r'userCareProgramForDateRangeProvider';
}

/// See also [userCareProgramForDateRange].
class UserCareProgramForDateRangeProvider
    extends FutureProvider<List<UserCareProgram>?> {
  /// See also [userCareProgramForDateRange].
  UserCareProgramForDateRangeProvider(
    this.startDate,
    this.endDate,
  ) : super.internal(
          (ref) => userCareProgramForDateRange(
            ref,
            startDate,
            endDate,
          ),
          from: userCareProgramForDateRangeProvider,
          name: r'userCareProgramForDateRangeProvider',
          debugGetCreateSourceHash:
              const bool.fromEnvironment('dart.vm.product')
                  ? null
                  : _$userCareProgramForDateRangeHash,
          dependencies: UserCareProgramForDateRangeFamily._dependencies,
          allTransitiveDependencies:
              UserCareProgramForDateRangeFamily._allTransitiveDependencies,
        );

  final String star


 have any
 * questions.
 */

import static org.testng.Assert.assertEquals;

import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalTime;
import java.time.ZonedDateTime;
import java.time.ZoneId;
import java.util.Date;
import java.util.TimeZone;

import org.testng.annotations.Test;
import org.testng.annotations.DataProvider;
import static org.testng.Assert.assertEquals;

/**
 * @test
 * @bug 8212970 8324065
 * @summary Test whether the savings are positive in time zones that have
 *      negative savings in the source TZ files.
 * @run testng NegativeDSTTest
 */
@Test
public class NegativeDSTTest {

    private static final TimeZone DUBLIN = TimeZone.getTimeZone("Europe/Dublin");
    private static final TimeZone PRAGUE = TimeZone.getTimeZone("Europe/Prague");
    private static final TimeZone WINDHOEK = TimeZone.getTimeZone("Africa/Windhoek");
    private static final TimeZone CASABLANCA = TimeZone.getTimeZone("Africa/Casablanca");
    private static final int ONE_HOUR = 3600_000;

    @DataProvider
    private Object[][] negativeDST () {
        return new Object[][] {
            // TimeZone, localDate, offset, isDaylightSavings
            // Europe/Dublin for the Rule "Eire"
            {DUBLIN, LocalDate.of(1970, 6, 23), ONE_HOUR, true},
            {DUBLIN, LocalDate.of(1971, 6, 23), ONE_HOUR, true},
            {DUBLIN, LocalDate.of(1971, 11, 1), 0, false},
            {DUBLIN, LocalDate.of(2019, 6, 23), ONE_HOUR, true},
            {DUBLIN, LocalDate.of(2019, 12, 23), 0, false},

            // Europe/Prague which contains fixed negative savings (not a named Rule)
            {PRAGUE, LocalDate.of(1946, 9, 30), 2 * ONE_HOUR, true},
            {PRAGUE, LocalDate.of(1946, 10, 10), ONE_HOUR, false},
            {PRAGUE, LocalDate.of(1946, 12, 3), 0, false},
            {PRAGUE, LocalDate.of(1947, 2, 25), ONE_HOUR, false},
            {PRAGUE, LocalDate.of(1947, 4, 30), 2 * ONE_HOUR, true},

            // Africa/Windhoek for the Rule "Namibia"
            {WINDHOEK, LocalDate.of(1994, 3, 23), ONE_HOUR, false},
            {WINDHOEK, LocalDate.of(2016, 9, 23), 2 * ONE_HOUR, true},

            // Africa/Casablanca for the Rule "Morocco" Defines negative DST till 2037 as of 2019a.
            {CASABLANCA, LocalDate.of(1939, 9, 13), ONE_HOUR, true},
            {CASABLANCA, LocalDate.of(1939, 11, 20), 0, false},
            {CASABLANCA, LocalDate.of(2018, 6, 18), ONE_HOUR, true},
            {CASABLANCA, LocalDate.of(2019, 1, 1), ONE_HOUR, true},
            {CASABLANCA, LocalDate.of(2019, 5, 6), 0, false},
            {CASABLANCA, LocalDate.of(2037, 10, 5), 0, false},
            {CASABLANCA, LocalDate.of(2037, 11, 16), ONE_HOUR, true},
            {CASABLANCA, LocalDate.of(2038, 9, 27), 0, false},
            {CASABLANCA, LocalDate.of(2038, 11, 1), ONE_HOUR, true},
            {CASABLANCA, LocalDate.of(2087, 3, 31), 0, false},
            {CASABLANCA, LocalDate.of(2087, 5, 12), ONE_HOUR, true},
        };
    }

    @Test(dataProvider="negativeDST")
    public void test_NegativeDST(TimeZone tz, LocalDate ld, int offset, boolean isDST) {
        Date d = Date.from(Instant.from(ZonedDateTime.of(ld, LocalTime.MIN, tz.toZoneId())));
        assertEqua


cart_vec.y.approx_eq_ulps(&test_y, 2));
    }
    #[test]
    fn test_logpolar2cartesian() {
        let logpol_vec: Vector2<f64> = Vector2::new(3.0, 4.0);
        let cart_vec = logpolar2cartesian(&logpol_vec);

        let test_x = -13.128783081462156;
        let test_y = -15.20078446306795;
        assert!(cart_vec.x.approx_eq_ulps(&test_x, 2));
        assert!(cart_vec.y.approx_eq_ulps(&test_y, 2));
    }
    #[test]
    fn test_bipolar2cartesian() {
        let bipol_vec: Vector2<f64> = Vector2::new(3.0, 4.0);
        let cart_vec = bipolar2cartesian(&bipol_vec, 1.0);

        let test_x = 0.9643685028429331;
        let test_y = 0.004986885446035738;
        assert!(cart_vec.x.approx_eq_ulps(&test_x, 2));
        assert!(cart_vec.y.approx_eq_ulps(&test_y, 2));
    }
    #[test]
    fn test_cartesian2polar() {
        let cart_vec: Vector2<f64> = Vector2::new(3.0, 4.0);
        let polar_vec = cartesian2polar(&cart_vec);

        let test_x = 5.0;
        let test_y = 0.9272952180016122;
        assert!(polar_vec.x.approx_eq_ulps(&test_x, 2));
        assert!(polar_vec.y.approx_eq_ulps(&test_y, 2));
    }
	#[test]
    fn test_cartesian2logpolar() {
        let cart_vec: Vector2<f64> = Vector2::new(3.0, 4.0);
        let logpolar_vec = cartesian2logpolar(&cart_vec);

        let test_x = 1.6094379124341003;
        let test_y = 0.9272952180016122;
        assert!(logpolar_vec.x.approx_eq_ulps(&test_x, 2));
        assert!(logpolar_vec.y.approx_eq_ulps(&test_y, 2));
    }
}
// Author: <NAME> <<EMAIL>>
// Copyright © 2019, Embark Studios, all rights reserved.
// Created: 10 April 2019

#![warn(clippy::all)]
#![warn(rust_2018_idioms)]

/*!
Utility for handle-based usage
*/

/// Handle for a whole body
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct BodyHandle(pub usize);

/// Handle for a link inside a body
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct PartHandle(pub usize, pub usize);

/// Extract the body handle from the parthandle
impl Into<BodyHandle> for PartHandle {
    fn into(self) -> BodyHandle {
        BodyHandle(self.0)
    }
}

/// Trait for a body
trait Body {
    fn handle(&self) -> BodyHandle;
    fn root(&self) -> PartHandle;
}

/// Trait for a body part, e.g. link
trait BodyPart {
    fn body(&self) -> BodyHandle;
    fn handle(&self) -> PartHandle;
}
<filename>src/client.rs<gh_stars>0
#[macro_use]
extern crate log;

use ipd::ipd_client::IpdClient;
use ipd::{Action, ActionRequest, NewGameRequest};

mod ipd;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    env_logger::init();
    let player_name: String = "noname".to_string();
    let addr = "http://[::1]:50051";

    info!("connecting to {}", addr);
    let channel = tonic::transpo


ble})
	if err != nil {
		log.Fatal(err)
	}
	id := 37
	_, execErr := tx.ExecContext(ctx, "UPDATE users SET status = ? WHERE id = ?", "paid", id)
	if execErr != nil {
		if rollbackErr := tx.Rollback(); rollbackErr != nil {
			log.Fatalf("update failed: %v, unable to rollback: %v\n", execErr, rollbackErr)
		}
		log.Fatalf("update failed: %v", execErr)
	}
	if err := tx.Commit(); err != nil {
		log.Fatal(err)
	}
}

func ExampleTx_Rollback() {
	tx, err := db.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable})
	if err != nil {
		log.Fatal(err)
	}
	id := 53
	_, err = tx.ExecContext(ctx, "UPDATE drivers SET status = ? WHERE id = ?;", "assigned", id)
	if err != nil {
		if rollbackErr := tx.Rollback(); rollbackErr != nil {
			log.Fatalf("update drivers: unable to rollback: %v", rollbackErr)
		}
		log.Fatal(err)
	}
	_, err = tx.ExecContext(ctx, "UPDATE pickups SET driver_id = $1;", id)
	if err != nil {
		if rollbackErr := tx.Rollback(); rollbackErr != nil {
			log.Fatalf("update failed: %v, unable to back: %v", err, rollbackErr)
		}
		log.Fatal(err)
	}
	if err := tx.Commit(); err != nil {
		log.Fatal(err)
	}
}

func ExampleStmt() {
	// In normal use, create one Stmt when your process starts.
	stmt, err := db.PrepareContext(ctx, "SELECT username FROM users WHERE id = ?")
	if err != nil {
		log.Fatal(err)
	}
	defer stmt.Close()

	// Then reuse it each time you need to issue the query.
	id := 43
	var username string
	err = stmt.QueryRowContext(ctx, id).Scan(&username)
	switch {
	case err == sql.ErrNoRows:
		log.Fatalf("no user with id %d", id)
	case err != nil:
		log.Fatal(err)
	default:
		log.Printf("username is %s\n", username)
	}
}

func ExampleStmt_QueryRowContext() {
	// In normal use, create one Stmt when your process starts.
	stmt, err := db.PrepareContext(ctx, "SELECT username FROM users WHERE id = ?")
	if err != nil {
		log.Fatal(err)
	}
	defer stmt.Close()

	// Then reuse it each time you need to issue the query.
	id := 43
	var username string
	err = stmt.QueryRowContext(ctx, id).Scan(&username)
	switch {
	case err == sql.ErrNoRows:
		log.Fatalf("no user with id %d", id)
	case err != nil:
		log.Fatal(err)
	default:
		log.Printf("username is %s\n", username)
	}
}

func ExampleRows() {
	age := 27
	rows, err := db.QueryContext(ctx, "SELECT name FROM users WHERE age=?", age)
	if err != nil {
		log.Fatal(err)
	}
	defer rows.Close()

	names := make([]string, 0)
	for rows.Next() {
		var name string
		if err := rows.Scan(&name); err != nil {
			log.Fatal(err)
		}
		names = append(names, name)
	}
	// Check for errors from iterating over rows.
	if err := rows.Err(); err != nil {
		log.Fatal(err)
	}
	log.Printf("%s are %d years old", strings.Join(names, ", "), age)
}
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source


;

const BASEPATH: string = '/api/products';

export const GET_ALL = (request: IncomingMessage): boolean => {
	return request.url === BASEPATH && request.method === 'GET';
};

export const GET_ONE = (request: IncomingMessage): boolean => {
	return (
		Boolean(request.url?.match(/\/api\/products\/([a-z0-9-]+)/)) &&
		request.method === 'GET'
	);
};

export const POST = (request: IncomingMessage): boolean => {
	return request.url === BASEPATH && request.method === 'POST';
};

export const PUT = (request: IncomingMessage): boolean => {
	return (
		Boolean(request.url?.match(/\/api\/products\/([a-z0-9-]+)/)) &&
		request.method === 'PUT'
	);
};

export const DELETE = (request: IncomingMessage): boolean => {
	return (
		Boolean(request.url?.match(/\/api\/products\/([a-z0-9-]+)/)) &&
		request.method === 'DELETE'
	);
};

const RouteTo = {
	GET_ALL,
	GET_ONE,
	POST,
	PUT,
	DELETE,
};

export default RouteTo;
import {Action} from "redux";
import {Address} from "../../domain/model/address";

export enum AddressListActionType {
  REQUEST_GET_ADDRESS = "ADDRESS_LIST_REQUEST_GET_ADDRESS",
  CALLBACK_GET_ADDRESS = "ADDRESS_LIST_CALLBACK_GET_ADDRESS",
  REQUEST_DELETE_ADDRESS = "ADDRESS_LIST_REQUEST_DELETE_ADDRESS",
  CALLBACK_DELETE_ADDRESS = "ADDRESS_LIST_CALLBACK_DELETE_ADDRESS",
}

export interface IRequestGetAddressAction extends Action {
  type: AddressListActionType.REQUEST_GET_ADDRESS;
}

export interface ICallbackGetAddressAction extends Action {
  type: AddressListActionType.CALLBACK_GET_ADDRESS;
  isSuccess: boolean;
  items: Address[];
}

export interface IRequestDeleteAddressAction extends Action {
  type: AddressListActionType.REQUEST_DELETE_ADDRESS;
  item: Address;
}

export interface ICallbackDeleteAddressAction extends Action {
  type: AddressListActionType.CALLBACK_DELETE_ADDRESS;
  isSuccess: boolean;
}

export type AddressListAction =
  IRequestGetAddressAction |
  ICallbackGetAddressAction |
  IRequestDeleteAddressAction |
  ICallbackDeleteAddressAction;

export interface IAddressListActionCreator {
  requestGetAddressAction(): IRequestGetAddressAction;

  callbackGetAddressAction(isSuccess: boolean, items: Address[]): ICallbackGetAddressAction;

  requestDeleteAddressAction(item: Address): IRequestDeleteAddressAction;

  callbackDeleteAddressAction(isSuccess: boolean): ICallbackDeleteAddressAction;
}

class ActionCreator implements IAddressListActionCreator {
  public requestGetAddressAction(): IRequestGetAddressAction {
    return {
      type: AddressListActionType.REQUEST_GET_ADDRESS,
    };
  }

  public callbackGetAddressAction = (isSuccess: boolean, items: Address[]): ICallbackGetAddressAction => {
    return {
      type: AddressListActionType.CALLBACK_GET_ADDRESS,
      isSuccess,
      items,
    };
  }

  public requestDeleteAddressAction = (item: Address): IRequestDeleteAddressAction => {
    return {
      type:


[clap(name = "ID", help = "ID of the target conversation", required = true)]
        id: u64,
        #[clap(name = "MESSAGE", help = "Message to be sent", required = true)]
        message: String,
    },
    #[clap(name = "open")]
    Open {
        #[clap(name = "ID", help = "ID of the target conversation", required = true)]
        id: u64,
    },
}

const DIFFICULTIES: &[&str] = &["easy", "medium", "hard", "insane"];
const OSES: &[&str] = &["windows", "linux", "freebsd", "android", "solaris", "other"];
const FIELDS: &[&str] = &["id", "name", "rating", "release"];

#[derive(Debug, Clap)]
pub struct MachineListArgs {
    #[clap(long, name = "DIFFICULTY", possible_values = DIFFICULTIES, help = "Only show machines from this level of difficulty")]
    pub difficulty: Option<String>,
    #[clap(long, help = "Only show spawned machines")]
    pub spawned: bool,
    #[clap(long, group = "group_active", help = "Only show active machines")]
    pub active: bool,
    #[clap(long, group = "group_active", help = "Only show retired machines")]
    pub retired: bool,
    #[clap(
        long,
        group = "group_owned",
        help = "Only show machines you completely onwned"
    )]
    pub owned: bool,
    #[clap(
        long,
        group = "group_owned",
        help = "Only show machines you did not complete"
    )]
    pub unowned: bool,
    #[clap(long, name="os", possible_values = OSES, help = "Only show machines running a specific operating system")]
    pub os: Option<String>,
    #[clap(long, help = "Show machines from your to-do list")]
    pub todo: bool,
    #[clap(long, help = "Show machines assigned to you")]
    pub assigned: bool,
    #[clap(long, short = "x")]
    pub desc: bool,
    #[clap(long, short = "s", name = "FIELD", possible_values = FIELDS, help = "Sort the filtered machines according to one field", default_value="id")]
    pub sort: String,
    #[clap(
        long,
        name = "NAME",
        help = "Search for machine containing this substring"
    )]
    pub name: Option<String>,
}

fn parse_difficulty(value: &str) -> Result<u8, &'static str> {
    match value.parse::<u8>() {
        Ok(value) => {
            if value > 0 && value <= 10 {
                Ok(value)
            } else {
                Err("should be an integer between 1 and 10")
            }
        }

        Err(_) => Err("should be an integer between 1 and 10"),
    }
}
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions


YRW02 class.

TEST(TestHaierACYRW02Class, Button) {
  IRHaierACYRW02 ac(kGpioUnused);
  ac.begin();

  ac.setButton(kHaierAcYrw02ButtonPower);
  EXPECT_EQ(kHaierAcYrw02ButtonPower, ac.getButton());
  ac.setButton(kHaierAcYrw02ButtonMode);
  EXPECT_EQ(kHaierAcYrw02ButtonMode, ac.getButton());
  ac.setButton(kHaierAcYrw02ButtonSleep);
  EXPECT_EQ(kHaierAcYrw02ButtonSleep, ac.getButton());
  ac.setButton(kHaierAcYrw02ButtonFan);

  // Test unexpected values.
  ac.setButton(0xFF);
  EXPECT_EQ(kHaierAcYrw02ButtonFan, ac.getButton());
  ac.setButton(0x10);
  EXPECT_EQ(kHaierAcYrw02ButtonFan, ac.getButton());
}

TEST(TestHaierACYRW02Class, OperatingMode) {
  IRHaierACYRW02 ac(kGpioUnused);
  ac.begin();

  ac.setButton(kHaierAcYrw02ButtonPower);
  ac.setMode(kHaierAcYrw02Auto);
  EXPECT_EQ(kHaierAcYrw02Auto, ac.getMode());
  EXPECT_EQ(kHaierAcYrw02ButtonMode, ac.getButton());

  ac.setMode(kHaierAcYrw02Cool);
  EXPECT_EQ(kHaierAcYrw02Cool, ac.getMode());

  ac.setMode(kHaierAcYrw02Heat);
  EXPECT_EQ(kHaierAcYrw02Heat, ac.getMode());

  ac.setMode(kHaierAcYrw02Fan);
  EXPECT_EQ(kHaierAcYrw02Fan, ac.getMode());

  ac.setMode(kHaierAcYrw02Dry);
  EXPECT_EQ(kHaierAcYrw02Dry, ac.getMode());

  ac.setMode(kHaierAcYrw02Auto - 1);
  EXPECT_EQ(kHaierAcYrw02Auto, ac.getMode());

  ac.setMode(kHaierAcYrw02Cool);
  EXPECT_EQ(kHaierAcYrw02Cool, ac.getMode());

  ac.setMode(kHaierAcYrw02Fan + 1);
  EXPECT_EQ(kHaierAcYrw02Auto, ac.getMode());

  ac.setMode(255);
  EXPECT_EQ(kHaierAcYrw02Auto, ac.getMode());
}

TEST(TestHaierACYRW02Class, Temperature) {
  IRHaierACYRW02 ac(kGpioUnused);
  ac.begin();

  ac.setTemp(kHaierAcYrw02MinTempC);
  EXPECT_EQ(kHaierAcYrw02MinTempC, ac.getTemp());

  ac.setButton(kHaierAcYrw02ButtonPower);
  ac.setTemp(kHaierAcYrw02MinTempC + 1);
  EXPECT_EQ(kHaierAcYrw02MinTempC + 1, ac.getTemp());
  EXPECT_EQ(kHaierAcYrw02ButtonTempUp, ac.getButton());

  ac.setTemp(kHaierAcYrw02MaxTempC);
  EXPECT_EQ(kHaierAcYrw02MaxTempC, ac.getTemp());
  EXPECT_EQ(kHaierAcYrw02ButtonTempUp, ac.getButton());

  ac.setTemp(kHaierAcYrw02MinTempC - 1);
  EXPECT_EQ(kHaierAcYrw02MinTempC, ac.getTemp());
  EXPECT_EQ(kHaierAcYrw02ButtonTempDown, ac.getButton());

  ac.setTemp(kHaierAcYrw02MaxTempC + 1);
  EXPECT_EQ(kHaierAcYrw02MaxTempC, ac.getTemp());
  EXPECT_EQ(kHaierAcYrw02ButtonTe


icon.pink-emoticon {
  background-color: #ff8fd4;
  background-image: -webkit-gradient(
    linear,
    right top,
    left top,
    color-stop(0.41, rgb(255,143,212)),
    color-stop(0.56, rgb(255,153,216)),
    color-stop(1,    rgb(255,173,225))
  );
  background-image: -moz-linear-gradient(
    center right,
    rgb(255,143,212) 41%,
    rgb(255,153,216) 56%,
    rgb(255,173,225) 100%
  );
}

/* styles for emoticons that need no rotation, like O_o */
span.css-emoticon.no-rotate {
  transform: rotate(0deg);
  -webkit-transform: rotate(0deg);
  -moz-transform: rotate(0deg);
  -o-transform: rotate(0deg);
  -moz-box-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  -webkit-box-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  box-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  font-size: 0.45em;
  width: 2.2em;
  height: 2.2em;
  line-height: 1.9em;
  -moz-border-radius: 2.2em;
  -webkit-border-radius: 2.2em;
  border-radius: 2.2em;
  background-image: -webkit-gradient(
    linear,
    right bottom,
    right top,
    color-stop(0.41, rgb(255,204,0)),
    color-stop(0.56, rgb(255,221,85)),
    color-stop(1, rgb(255,238,170))
  );
  background-image: -moz-linear-gradient(
    center bottom,
    rgb(255,204,0) 41%,
    rgb(255,221,85) 56%,
    rgb(255,238,170) 100%
  );
}

span.css-emoticon.no-rotate.red-emoticon {
  background-image: -webkit-gradient(
    linear,
    right bottom,
    right top,
    color-stop(0.41, rgb(235,5,66)),
    color-stop(0.56, rgb(235,38,90)),
    color-stop(1, rgb(250,55,110))
  );
  background-image: -moz-linear-gradient(
    center bottom,
    rgb(235,5,66) 41%,
    rgb(235,38,90) 56%,
    rgb(250,55,110) 100%
  );
}

span.css-emoticon.no-rotate.pink-emoticon {
  background-image: -webkit-gradient(
    linear,
    right bottom,
    right top,
    color-stop(0.41, rgb(255,143,212)),
    color-stop(0.56, rgb(255,153,216)),
    color-stop(1,    rgb(255,173,225))
  );
  background-image: -moz-linear-gradient(
    center bottom,
    rgb(255,143,212) 41%,
    rgb(255,153,216) 56%,
    rgb(255,173,225) 100%
  );
}

/* Styles for emoticons that need to be rotated counter-clockwise, like <3 */
span.css-emoticon.counter-rotated {
  transform: rotate(-90deg);
  -webkit-transform: rotate(-90deg);
  -moz-transform: rotate(-90deg);
  -o-transform: rotate(-90deg);
  -moz-box-shadow: -1px 1px 2px rgba(0,0,0,0.5);
  -webkit-box-shadow: -1px 1px 2px rgba(0,0,0,0.5);
  box-shadow: -1px 1px 2px rgba(0,0,0,0.5);
  background-image: -webkit-gradient(
    linear,
    left top,
    right top,
    color-stop(0.41, rgb(255,204,0)),
    color-stop(0.56, rgb(255,221,85)


OCUS_OUT = "focusOut"

--- Button: Click Event
UIEvent.CLICK = "click"

--- Button: Click Event
UIEvent.CANCEL = "cancel"

--- Button: Selected changed Event
UIEvent.SELECTED_CHANGED = "selectedChanged"

--- Button: down Event
UIEvent.DOWN = "down"

--- Button: up Event
UIEvent.UP = "up"

--- Slider: value changed Event
UIEvent.VALUE_CHANGED = "valueChanged"

--- Joystick: Event type when you change the position of the stick
UIEvent.STICK_CHANGED = "stickChanged"

--- MsgBox: msgShow Event
UIEvent.MSG_SHOW = "msgShow"

--- MsgBox: msgHide Event
UIEvent.MSG_HIDE = "msgHide"

--- MsgBox: msgEnd Event
UIEvent.MSG_END = "msgEnd"

--- MsgBox: spoolStop Event
UIEvent.SPOOL_STOP = "spoolStop"

--- ListBox: selectedChanged
UIEvent.ITEM_CHANGED = "itemChanged"

--- ListBox: enter
UIEvent.ITEM_ENTER = "itemEnter"

--- ListBox: itemClick
UIEvent.ITEM_CLICK = "itemClick"

--- ScrollGroup: scroll
UIEvent.SCROLL = "scroll"

return UIEvent


--[[
Copyright (c) 2023, Vsevolod Stakhov <vsevolod@rspamd.com>

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.
]] --

--[[[
-- @module lua_util
-- This module contains utility functions for working with Lua and/or Rspamd
--]]

local exports = {}
local lpeg = require 'lpeg'
local rspamd_util = require "rspamd_util"
local fun = require "fun"
local lupa = require "lupa"

local split_grammar = {}
local spaces_split_grammar
local space = lpeg.S ' \t\n\v\f\r'
local nospace = 1 - space
local ptrim = space ^ 0 * lpeg.C((space ^ 0 * nospace ^ 1) ^ 0)
local match = lpeg.match

local function shallowcopy(orig)
  local orig_type = type(orig)
  local copy
  if orig_type == 'table' then
    copy = {}
    for orig_key, orig_value in pairs(orig) do
      copy[orig_key] = orig_value
    end
  else
    copy = orig
  end
  return copy
end
local function deepcopy(orig)
  local orig_type = type(orig)
  local copy
  if orig_type == 'table' then
    copy = {}
    for orig_key, orig_value in next, orig, nil do
      copy[deepcopy(orig_key)] = deepcopy(orig_value)
    end
    if getmetatable(orig) then
      setmetatable(copy, deepcopy(getmetatable(orig)))
    end
  else
    -- number, string, boolean, etc
    copy = orig
  end
  return copy
end

lupa.configure('{%', '%}', '{=', '=}', '{#', '#}', {
  keep_trailing_newline = true,
  autoescape = false,
})

lupa.filters.pbkdf = function(s)
  local cr = require "rspamd_cryptobox"
  return cr.pbkdf(s)
end

-- Dirty hacks to avoid shared state
package.loaded['lupa'] = nil
local lupa_orig = require "lupa"

local function rspamd_str_split(s, sep)
  local gr
  if not sep then
    if not spaces_split_grammar then
      local _sep = space
      local elem = lpeg.C((1 - _sep) ^ 0)
      local p = lpeg.Ct(elem * (_sep * elem) ^ 0)
      spaces_split_grammar = p
    end

    gr = spaces_split_grammar
  else
    gr = split_grammar[sep]

    if not gr then
      local _sep
      if type(sep) == 'string' then
        _sep = lpeg.S(sep) -- Assume set
      else
        _sep = sep         -- Assume lpeg object
      end
      local elem = lpeg.C((1 - _sep) ^ 0)
      local p = lpeg.Ct(elem * (_sep * elem) ^ 0)
      gr = p
      split_grammar[sep] = gr
    end
  end

  return gr:match(s)
end

--[[[
-- @function lua_util.str_split(text, delimiter)
-- Splits text into a numeric table by delimiter
-- @param {string} text delimited text
-- @param {string} delimiter the delimiter
-- @return {table} numeric table containing string parts
--]]

exports.rspamd_str_split = rspamd_str_split
exports.str_split = rspam


.getName());
		if (source.getOperator().getUserFunction() instanceof InputFormatSourceFunction) {
			InputFormatSourceFunction<T> fs = (InputFormatSourceFunction<T>) source.getOperator().getUserFunction();
			streamGraph.setInputFormat(source.getId(), fs.getFormat());
		}
		// 给 StreamGraph 源节点设置并行度
		streamGraph.setParallelism(source.getId(), source.getParallelism());
		// 给 StreamGraph 源节点设置最大并行度
		streamGraph.setMaxParallelism(source.getId(), source.getMaxParallelism());
		return Collections.singleton(source.getId());
	}

	/**
	 * Transforms a {@code SinkTransformation}.
	 */
	/**
	 * 转换一个 SinkTransformation
	 */
	private <T> Collection<Integer> transformSink(SinkTransformation<T> sink) {

		Collection<Integer> inputIds = transform(sink.getInput());

		String slotSharingGroup = determineSlotSharingGroup(sink.getSlotSharingGroup(), inputIds);

		streamGraph.addSink(sink.getId(),
				slotSharingGroup,
				sink.getCoLocationGroupKey(),
				sink.getOperator(),
				sink.getInput().getOutputType(),
				null,
				"Sink: " + sink.getName());

		// 给 StreamGraph sink 节点设置并行度，sink.getParallelism() 由流入的 DataStream 决定
		streamGraph.setParallelism(sink.getId(), sink.getParallelism());
		// 给 StreamGraph sink 节点设置最大并行度
		streamGraph.setMaxParallelism(sink.getId(), sink.getMaxParallelism());

		// 在图中为 sink 节点和 inputs 中的每个节点加上边
		for (Integer inputId: inputIds) {
			streamGraph.addEdge(inputId,
					sink.getId(),
					0
			);
		}

		if (sink.getStateKeySelector() != null) {
			TypeSerializer<?> keySerializer = sink.getStateKeyType().createSerializer(env.getConfig());
			streamGraph.setOneInputStateKey(sink.getId(), sink.getStateKeySelector(), keySerializer);
		}

		return Collections.emptyList();
	}

	/**
	 * Transforms a {@code OneInputTransformation}.
	 *
	 * <p>This recursively transforms the inputs, creates a new {@code StreamNode} in the graph and
	 * wired the inputs to this new node.
	 */
	/**
	 * 转换一个 OneInputTransformation
	 * 这将递归地转换输入，在图中创建新的streamnode，并将输入连接到此新节点，节点之间连接 StreamEdge
	 */
	private <IN, OUT> Collection<Integer> transformOneInputTransform(OneInputTransformation<IN, OUT> transform) {

		Collection<Integer> inputIds = transform(transform.getInput());

		// the recursive call might have already transformed this
		// 递归的调用可能已经转换了这个
		if (alreadyTransformed.containsKey(transform)) {
			return alreadyTransformed.get(transform);
		}

		// 根据输入 transform 来决定 slotSharingGroup
		String slotSharingGroup = determineSlotSharingGroup(transform.getSlotSharingGroup(), inputIds);

		// 在 StreamGraph 中添加一个操作符
		streamGraph.addOperator(transform.getId(),
				slotSharingGroup,
				transform.getCoLocationGroupKey(),
				transform.getOperator(),
				transform.getInputType(),
				transform.getOutputType(),
				transform.getName());

		if (transform.getStateKeySelector() != null) {
			TypeSerializer<?> keySerializer = transform.getStateKeyType().createSerializer(env.getConfig());
			streamGraph.setOneInputStateKey(transform.getId(), transform.getStateKeySelector(), keySerializer);
		}

		// 设置并行度，默认情况下是环境的并发


       this.id = id;
        this.names = names;
        this.asset = asset;
	}
}
// eslint-disable-next-line spaced-comment
/// <reference lib="dom" />

import { SerializerError, SerializerReason } from './errors/SerializerError';
import { BinaryPrimitives, BinaryTokens, TypedArray } from './util/constants';
import { BigIntegers, Numbers, RegExps, TypedArrays } from './util/util';

// Immutable
const MIN_INT8 = -0b0111_1111;
const MAX_INT8 = 0b1111_1111;
const MIN_INT32 = -0b0111_1111_1111_1111_1111_1111_1111_1111;
const MAX_INT32 = 0b1111_1111_1111_1111_1111_1111_1111_1111;

// Mutable
const float64Array = new Float64Array(1);
const uInt8Float64Array = new Uint8Array(float64Array.buffer);

export interface OnUnsupported {
	(value: unknown): unknown;
}

export class Serializer {
	public onUnsupported: OnUnsupported | null;
	private _buffer: Uint8Array | null = new Uint8Array(16);
	private _offset = 0;
	private _objectIDs = new Map() as Map<Record<any, any>, number>;
	private _data: any;
	private _handlingUnsupported = false;

	public constructor(data: any, onUnsupported: OnUnsupported | null = null) {
		this._data = data;
		this.onUnsupported = onUnsupported;
	}

	public process() {
		this.parse(this._data);
		const temp = this._buffer!.subarray(0, this._offset);

		this._data = null;
		this._offset = 0;
		this._objectIDs.clear();
		this._buffer = null;
		return temp;
	}

	public parse(value: any, hint = typeof value) {
		switch (hint) {
			case BinaryPrimitives.BigInt:
				return this.parseBigInt(value);
			case BinaryPrimitives.Boolean:
				return this.parseBoolean(value);
			case BinaryPrimitives.Number:
				return this.parseNumber(value);
			case BinaryPrimitives.Object:
				return this.parseObject(value);
			case BinaryPrimitives.String:
				return this.parseString(value);
			case BinaryPrimitives.Undefined:
				return this.parseUndefined();
			default:
				return this.handleUnsupported(value, hint);
		}
	}

	protected handleUnsupported(value: unknown, hint: string) {
		// If there's an onUnsupported handler, try to call it
		if (this.onUnsupported) {
			// If the serializer was handling an unsupported type, abort the serialization
			// as it's most likely an error in the return type of the handler.
			if (this._handlingUnsupported) {
				throw new SerializerError('The modified value was not serializable.', SerializerReason.UnsupportedSerializedType);
			}

			// Set the serializer to handling unsupported, parse, and once it's done
			// serializing the output of unSupported, set it back to false.
			this._handlingUnsupported = true;
			this.parse(this.onUnsupported(value));
			this._handlingUnsupported = false;
			return;
		}

		// If no handler is available, throw TypeError
		throw new SerializerError(`Unsupported type '${hint}'.`, SerializerReason.UnsupportedType);
	}

	private parseBigInt(value: bigint) {
		const sign = value >= BigIntegers.ZERO! ? 0 : 1;
		this.ensureAlloc(5);
		this.write8(sign ? BinaryTokens.NBigInt : BinaryTokens.PBigInt);

		const headerOffset = this._offset;
		this._offset += 4;

		let unsignedBigInt = sign === 1 ? -value : value;
		let byteCount = 0;
		while (unsignedBigInt > 0) {
			++byteCount;
			this.write8(Number(unsignedBigInt & BigIntegers.BYTE!));
			unsignedBigInt >>= BigIntegers.EIGHT!;
		}

		this.write32At(byteCount, headerOffset);
	}

	private parseBoolean(value: boolean) {
		this.write8(BinaryTokens.Boolean


 the Name field.
func (o *ModelsAddOrganization) SetName(v string) {
	o.Name = &v
}

func (o ModelsAddOrganization) MarshalJSON() ([]byte, error) {
	toSerialize, err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o ModelsAddOrganization) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Description) {
		toSerialize["description"] = o.Description
	}
	if !IsNil(o.Name) {
		toSerialize["name"] = o.Name
	}
	return toSerialize, nil
}

type NullableModelsAddOrganization struct {
	value *ModelsAddOrganization
	isSet bool
}

func (v NullableModelsAddOrganization) Get() *ModelsAddOrganization {
	return v.value
}

func (v *NullableModelsAddOrganization) Set(val *ModelsAddOrganization) {
	v.value = val
	v.isSet = true
}

func (v NullableModelsAddOrganization) IsSet() bool {
	return v.isSet
}

func (v *NullableModelsAddOrganization) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableModelsAddOrganization(val *ModelsAddOrganization) *NullableModelsAddOrganization {
	return &NullableModelsAddOrganization{value: val, isSet: true}
}

func (v NullableModelsAddOrganization) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableModelsAddOrganization) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}
/*
Nexodus API

This is the Nexodus API Server.

API version: 1.0
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package client

import (
	"encoding/json"
)

// checks if the ModelsSecurityRule type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ModelsSecurityRule{}

// ModelsSecurityRule struct for ModelsSecurityRule
type ModelsSecurityRule struct {
	FromPort   *int32   `json:"from_port,omitempty"`
	IpProtocol *string  `json:"ip_protocol,omitempty"`
	IpRanges   []string `json:"ip_ranges,omitempty"`
	ToPort     *int32   `json:"to_port,omitempty"`
}

// NewModelsSecurityRule instantiates a new ModelsSecurityRule object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewModelsSecurityRule() *ModelsSecurityRule {
	this := ModelsSecurityRule{}
	return &this
}

// NewModelsSecurityRuleWithDefaults instantiates a new ModelsSecurityRule object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewModelsSecurityRuleWithDefaults() *ModelsSecurityRule {
	this := ModelsSecurityRule{}
	return &this
}

// GetFromPort returns the FromPort field value if set, zero value otherwise.
func (o *ModelsSecurityRule) GetFromPort() int32 {
	if o == nil || IsNil(o.FromPort) {
		var ret int32
		return ret
	}
	return *o.FromPort
}

// GetFromPortOk returns a tuple with the FromPort field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelsSecurityRule) GetFro


//Copyright  2014 Sony Computer Entertainment America LLC. See License.txt.

namespace Sce.Atf.Applications
{
    ///
    /// Interface for contexts where items can be shown and hidden
    public interface IVisibilityContext
    {
        ///
        /// Returns whether the item is visible
        /// <param name="item">Item</param>
        /// <returns>True iff the item is visible</returns>
        bool IsVisible(object item);

        ///
        /// Retur


3',
  0x0007005c: 'VK_NUMPAD4',
  0x0007005d: 'VK_NUMPAD5',
  0x0007005e: 'VK_NUMPAD6',
  0x0007005f: 'VK_NUMPAD7',
  0x00070060: 'VK_NUMPAD8',
  0x00070061: 'VK_NUMPAD9',
  0x00070062: 'VK_NUMPAD0',
  0x00070063: 'VK_DECIMAL',
  0x00070075: 'VK_HELP',
  0x00070077: 'VK_SELECT',
  0x00070088: 'VK_KANA',
  0x0007008a: 'VK_CONVERT',
  0x000700e0: 'VK_CONTROL',
  0x000700e1: 'VK_SHIFT',
  0x000700e2: 'VK_MENU',
  0x000700e3: 'Meta',
  0x000700e4: 'RControl',
  0x000700e5: 'RShift',
  0x000700e6: 'RAlt',
  0x000700e7: 'RWin',
  0x000c00b1: 'VK_PAUSE',
  0x000c00cd: 'VK_PAUSE',
  0x000c019e: 'LOCK_SCREEN',
  0x000c0208: 'VK_PRINT',
};

/// The windows targets in the publish time order.
enum WindowsTarget {
  naw, // not a windows target
  xp,
  vista,
  w7,
  w8,
  w8_1,
  w10,
  w11
}

/// A convenient method to transform a build number to the corresponding windows version.
extension WindowsTargetExt on int {
  WindowsTarget get windowsVersion => getWindowsTarget(this);
}

const kCheckSoftwareUpdateFinish = 'check_software_update_finish';
import 'package:flutter_custom_cursor/cursor_manager.dart'
    as custom_cursor_manager;
import 'package:flutter_custom_cursor/flutter_custom_cursor.dart';

import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'package:flutter_hbb/models/model.dart';

deleteCustomCursor(String key) =>
    custom_cursor_manager.CursorManager.instance.deleteCursor(key);
resetSystemCursor() {}

MouseCursor buildCursorOfCache(
    CursorModel cursor, double scale, CursorData? cache) {
  if (cache == null) {
    return MouseCursor.defer;
  } else {
    final key = cache.updateGetKey(scale);
    if (!cursor.cachedKeys.contains(key)) {
      // data should be checked here, because it may be changed after `updateGetKey()`
      final data = cache.data;
      if (data == null) {
        return MouseCursor.defer;
      }
      debugPrint(
          "Register custom cursor with key $key (${cache.hotx},${cache.hoty})");
      // [Safety]
      // It's ok to call async registerCursor in current synchronous context,
      // because activating the cursor is also an async call and will always
      // be executed after this.
      custom_cursor_manager.CursorManager.instance
          .registerCursor(custom_cursor_manager.CursorData()
            ..name = key
            ..buffer = data
            ..width = (cache.width * cache.scale).toInt()
            ..height = (cache.height * cache.scale).toInt()
            ..hotX = cache.hotx
            ..hotY = cache.hoty);
      cursor.addKey(key);
    }
    return FlutterCustomMemoryImageCursor(key: key);
  }
}
import 'package:flutter_hbb/common.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/models/platform_model.dart';

class PrinterOptions {
  String action;
  List<String> printerNames;
  String printerName;

  PrinterOptions(
      {required this.action,
      required this.printerNames,
      required this.printerName});

  static PrinterOptions load() {
    var action = bind.mainGetLocalOption(key: kKeyPrinterIncomingJobAction);


[] { 1, 3 }, Is.EqualTo(arr));
        Assert.That(new[] { 3, 1 }, Is.EqualTo(reversedArr));
    }

    [Test]
    public static void TestFind()
    {
        var dll = new DoublyLinkedList<int>(new[] { 0, 1, 2, 3, 4 });

        var one = dll.Find(1);
        var three = dll.Find(3);

        Assert.That(one.Data, Is.EqualTo(1));
        Assert.That(three.Data, Is.EqualTo(3));
    }

    [Test]
    public static void TestIndexOf()
    {
        var dll = new DoublyLinkedList<int>(new[] { 0, 1, 2, 3, 4 });

        var one = dll.IndexOf(1);
        var three = dll.IndexOf(3);

        Assert.That(one, Is.EqualTo(1));
        Assert.That(three, Is.EqualTo(3));
    }

    [Test]
    public static void TestContains()
    {
        var dll = new DoublyLinkedList<int>(new[] { 0, 1, 2, 3, 4 });

        var one = dll.Contains(1);
        var six = dll.Contains(6);

        Assert.That(one, Is.True);
        Assert.That(six, Is.False);
    }

    [Test]
    public static void TestReverse()
    {
        var dll = new DoublyLinkedList<int>(new[] { 0, 1, 2, 3, 4 });
        dll.Reverse();
        var arr = dll.GetData().ToArray();

        var empty = new DoublyLinkedList<int>(new int[] { });
        empty.Reverse();
        var emptyArr = empty.GetData().ToArray();

        Assert.That(arr, Is.EqualTo(new[] { 4, 3, 2, 1, 0 }));
        Assert.That(emptyArr, Is.EqualTo(new int[] { }));
    }

    [Test]
    public static void TestGetDataReversed()
    {
        var dll = new DoublyLinkedList<int>(new[] { 0, 1, 2, 3, 4 });
        var arr = dll.GetData().ToArray();
        var reversedArr = dll.GetDataReversed().ToArray();

        Assert.That(arr, Is.EqualTo(new[] { 0, 1, 2, 3, 4 }));
        Assert.That(reversedArr, Is.EqualTo(new[] { 4, 3, 2, 1, 0 }));
    }
}


4956] = "Elementarherz",
[34957] = "Motorkernkristall",
[34958] = "Magisches Gyroskop",
[34959] = "Geißelsteuerungsstein",
[34960] = "Die Legende des Horns",
[34961] = "Burbelgobbels Schlüssel",
[34962] = "Gurgelboggels Schlüssel",
[34963] = "Untere Hornhälfte",
[34964] = "Obere Hornhälfte",
[34965] = "Test Copy Unwavering Legguards",
[34966] = "Test Two Unwavering Legguards",
[34967] = "Junos Testjuwel",
[34968] = "Das Horn des Elementarfurors",
[34969] = "Plate Helmet D3 (test) Two",
[34970] = "Plate Helmet D3 (test) Three",
[34971] = "Leuchtpistole des Kriegshymnenklans",
[34972] = "Ersatzteile von Kurbelzisch",
[34973] = "Fluchrekursive Transmaterieinjektion",
[34974] = "Blutsporenfruchtblatt",
[34975] = "Tragbarer Ölsammler",
[34976] = "Pollen von Blutsporenmotten",
[34977] = "Dicker Mammutbalg",
[34978] = "Bestäubte Blutsporenblume",
[34979] = "Beutel mit zerdrückten Blutsporen",
[34980] = "Kopf von Gammutra",
[34981] = "Schüttlo-Rüttlo 5000 Steuerungseinheit",
[34982] = "Schweres leuchtendes Ei",
[34983] = "Gewürzbeutel der Gorloc",
[34984] = "Der Ultraüberschallschrauber",
[34985] = "Lichterfüllter Baton des brutalen Gladiators",
[34986] = "Barriere des brutalen Gladiators",
[34987] = "Kampfstab des brutalen Gladiators",
[34988] = "Knochenknacker des brutalen Gladiators",
[34989] = "Knochenschinder des brutalen Gladiators",
[34990] = "Kettenrüstung des brutalen Gladiators",
[34991] = "Kettenstulpen des brutalen Gladiators",
[34992] = "Kettenhelm des brutalen Gladiators",
[34993] = "Kettengamaschen des brutalen Gladiators",
[34994] = "Kettenschiftung des brutalen Gladiators",
[34995] = "Hackbeil des brutalen Gladiators",
[34996] = "Spaltbeil des brutalen Gladiators",
[34997] = "Enthaupter des brutalen Gladiators",
[34998] = "Drachenlederhandschuhe des brutalen Gladiators",
[34999] = "Drachenlederhelm des brutalen Gladiators",
[35000] = "Drachenlederbeinschützer des brutalen Gladiators",
[35001] = "Drachenlederschiftung des brutalen Gladiators",
[35002] = "Drachenledertunika des brutalen Gladiators",
[35003] = "Schreckenszwirnhandschuhe des brutalen Gladiators",
[35004] = "Schreckenszwirnkapuze des brutalen Gladiators",
[35005] = "Schreckenszwirngamaschen des brutalen Gladiators",
[35006] = "Schreckenszwirnmantelung des brutalen Gladiators",
[35007] = "Schreckenszwirnrobe des brutalen Gladiators",
[35008] = "Endspiel des brutalen Gladiators",
[35009


1. 以下哪个是线性回归模型的假设？

                                类型: 选择题
                                熟练度: ★★★★☆
                                上次答题: 正确 (2024-05-10)

                            <button class="p-2 rounded-full hover:bg-gray-100 text-text-gray" title="查看题目" onclick="event.stopPropagation(); openQuestionReview('1')">visibility</button>
                            <button class="p-2 rounded-full hover:bg-gray-100 text-text-gray" title="编辑题目" onclick="event.stopPropagation()">edit</button>
                            <button class="p-2 rounded-full hover:bg-gray-100 text-text-gray" title="收藏题目" onclick="event.stopPropagation()">star_border</button>

2. 请简述线性回归的损失函数是什么？

                                类型: 简答题
                                熟练度: ★★★☆☆
                                上次答题: 错误 (2024-05-08)

                            <button class="p-2 rounded-full hover:bg-gray-100 text-text-gray" title="查看题目" onclick="event.stopPropagation(); openQuestionReview('2')">visibility</button>
                            <button class="p-2 rounded-full hover:bg-gray-100 text-text-gray" title="编辑题目" onclick="event.stopPropagation()">edit</button>
                            <button class="p-2 rounded-full hover:bg-gray-100 text-yellow-500" title="已收藏" onclick="event.stopPropagation()">star</button>

3. 线性回归中，用来评估模型拟合优度的指标是____。

                                类型: 填空题
                                熟练度: ★★★★★
                                上次答题: 正确 (2024-05-11)

                            <button class="p-2 rounded-full hover:bg-gray-100 text-text-gray" title="查看题目" onclick="event.stopPropagation(); openQuestionReview('3')">visibility</button>
                            <button class="p-2 rounded-full hover:bg-gray-100 text-text-gray" title="编辑题目" onclick="event.stopPropagation()">edit</spa


}
    source.skip(beginIndex + BEGIN_BYTES.size)

    val beginLineEndIndex = source.indexOf(NEW_LINE_BYTE)
    if (beginLineEndIndex == -1L) throwPemMissingNewLineAfterBeginLabel()
    val beginSuffixIndex = source.indexOf(SUFFIX_BYTES)
    if (beginSuffixIndex == -1L || beginSuffixIndex > beginLineEndIndex) throwPemMissingBeginLabelSuffix()

    val beginLabel = source.readByteString(beginSuffixIndex.toInt())
    source.skip(beginLineEndIndex + 1 - beginSuffixIndex) // skip suffix & new line

    val endIndex = source.indexOf(END_BYTES)
    if (endIndex == -1L) throwPemMissingEndLabel()

    val base64Content = source.readByteString(endIndex.toInt())
    source.skip(END_BYTES.size.toLong())

    val endLineEndIndex = source.indexOf(NEW_LINE_BYTE)
    val endSuffixIndex = source.indexOf(SUFFIX_BYTES)
    if (endSuffixIndex == -1L || (endLineEndIndex != -1L && endSuffixIndex > endLineEndIndex)) throwPemMissingEndLabelSuffix()

    val endLabel = source.readByteString(endSuffixIndex.toInt())
    if (endLineEndIndex == -1L) {
        source.skip(SUFFIX_BYTES.size.toLong())
    } else {
        source.skip(endLineEndIndex + 1 - endSuffixIndex)
    }

    if (endLabel != beginLabel) throwPemBeginEndLabelMismatch(beginLabel.decodeToString(), endLabel.decodeToString())

    return PemDocument(
        label = PemLabel(beginLabel.decodeToString()),
        content = Base64.Pem.decodeToByteString(base64Content)
    )
}

private fun throwPemInvalid(message: String): Nothing = throw IllegalArgumentException("Invalid PEM format: $message")
private fun throwPemMissingBeginLabel(): Nothing = throwPemInvalid("missing BEGIN label")
private fun throwPemMissingNewLineAfterBeginLabel(): Nothing = throwPemInvalid("missing new line after BEGIN label")
private fun throwPemMissingBeginLabelSuffix(): Nothing = throwPemInvalid("missing BEGIN label suffix")
private fun throwPemMissingEndLabel(): Nothing = throwPemInvalid("missing END label")
private fun throwPemMissingEndLabelSuffix(): Nothing = throwPemInvalid("missing END label suffix")
private fun throwPemBeginEndLabelMismatch(beginLabel: String, endLabel: String): Nothing =
    throwPemInvalid("BEGIN($beginLabel) and END($endLabel) labels mismatch")
/*
 * Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
 */

package dev.whyoleg.cryptography.providers.jdk.algorithms

import dev.whyoleg.cryptography.*
import dev.whyoleg.cryptography.BinarySize.Companion.bytes
import dev.whyoleg.cryptography.algorithms.*
import dev.whyoleg.cryptography.bigint.*
import dev.whyoleg.cryptography.materials.key.*
import dev.whyoleg.cryptography.operations.*
import dev.whyoleg.cryptography.providers.jdk.*
import dev.whyoleg.cryptography.providers.jdk.materials.*
import dev.whyoleg.cryptography.providers.jdk.operations.*
import java.security.spec.*

internal class JdkRsaPss(
    private val state: JdkCryptographyState,
) : RSA.PSS {

    override fun publicKeyDecoder(digest: CryptographyAlgorithmId<Digest>): KeyDecoder<RSA.PublicKey.Format, RSA.PSS.PublicKey> =
        RsaPssPublicKeyDecoder(state, digest.rsaHashAlgorithmName())

    override fun privateKeyDecoder(digest: CryptographyAlgorithmId<Digest>): KeyDecoder<RSA.PrivateKey.Format, RSA.PSS.PrivateKey> =
        RsaPssPrivateKeyDecoder(state, digest.rsaHashAlgorithmName())

    override fun keyPairGenerator(
        keySize: BinarySize,
        diges


local CollectionMainViewModel = Class("CollectionMainViewModel", UIViewModel)
local CollectionSimpleMainViewModel = require("Feature/Activity/CollectionSimpleMode/CollectionSimpleMainViewModel")

function CollectionMainViewModel:LoadData(actId)
  if actId == nil then
    return
  end

  local suc, actData = CS.Torappu.ActivityDB.data.activity.defaultCollectionData:TryGetValue(actId)
  if not suc or actData.consts == nil then
    return
  end
  local constData = actData.consts
  self.isSimpleMode = constData.isSimpleMode

  if self.isSimpleMode then
    self:_LoadSimpleModeData(actId)
  end


width:26px;height:26px}#wpadminbar #wp-admin-bar-user-actions.ab-submenu{padding:0}#wpadminbar #wp-admin-bar-user-info .display-name{height:auto;font-size:16px;line-height:24px;color:#eee}#wpadminbar #wp-admin-bar-user-info a{padding-top:4px}#wpadminbar #wp-admin-bar-user-info .username{line-height:.8!important;margin-bottom:-2px}#wpadminbar li#wp-admin-bar-comments,#wpadminbar li#wp-admin-bar-customize,#wpadminbar li#wp-admin-bar-edit,#wpadminbar li#wp-admin-bar-menu-toggle,#wpadminbar li#wp-admin-bar-my-account,#wpadminbar li#wp-admin-bar-my-sites,#wpadminbar li#wp-admin-bar-new-content,#wpadminbar li#wp-admin-bar-site-name,#wpadminbar li#wp-admin-bar-updates,#wpadminbar li#wp-admin-bar-wp-logo{display:block}#wpadminbar li.hover ul li,#wpadminbar li:hover ul li,#wpadminbar li:hover ul li:hover ul li{display:list-item}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}#wpadminbar #wp-admin-bar-comments,#wpadminbar #wp-admin-bar-edit,#wpadminbar #wp-admin-bar-my-account,#wpadminbar #wp-admin-bar-my-sites,#wpadminbar #wp-admin-bar-new-content,#wpadminbar #wp-admin-bar-site-name,#wpadminbar #wp-admin-bar-updates,#wpadminbar #wp-admin-bar-wp-logo,#wpadminbar .ab-top-menu,#wpadminbar .ab-top-secondary{position:static}#wpadminbar #wp-admin-bar-my-account{float:left}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before{top:10px;right:0}}@media screen and (max-width:600px){#wpadminbar{position:absolute}#wp-responsive-overlay{position:fixed;top:0;right:0;width:100%;height:100%;z-index:400}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{width:100%;right:0}#wpadminbar .menupop .menupop>.ab-item:before{display:none}#wpadminbar #wp-admin-bar-wp-logo.menupop .ab-sub-wrapper{margin-right:0}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper{margin:0;width:100%;top:auto;right:auto;position:static;-webkit-box-shadow:none;box-shadow:none}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper .ab-item{font-size:16px;padding:6px 30px 19px 15px}#wpadminbar li:hover ul li ul li{display:list-item}#wpadminbar li#wp-admin-bar-updates,#wpadminbar li#wp-admin-bar-wp-logo{display:none}}@media sc


Sequential)]
        struct MIB_TCPROW_OWNER_PID
        {
            public MibTcpState state;
            public uint localAddr;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
            public byte[] localPort;
            public uint remoteAddr;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
            public byte[] remotePort;
            public int owningPid;
        }

        /// <summary>
        /// The structure contains a table of process IDs (PIDs) and the IPv4 TCP links that
        /// are context bound to these PIDs.
        /// </summary>
        [StructLayout(LayoutKind.Sequential)]
        struct MIB_TCPTABLE_OWNER_PID
        {
            public uint dwNumEntries;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
            public MIB_TCPROW_OWNER_PID[] table;
        }

        // Enum to define the set of values used to indicate the type of table returned by
        // calls made to the function 'GetExtendedTcpTable'.
        enum TcpTableClass
        {
            TCP_TABLE_BASIC_LISTENER,
            TCP_TABLE_BASIC_CONNECTIONS,
            TCP_TABLE_BASIC_ALL,
            TCP_TABLE_OWNER_PID_LISTENER,
            TCP_TABLE_OWNER_PID_CONNECTIONS,
            TCP_TABLE_OWNER_PID_ALL,
            TCP_TABLE_OWNER_MODULE_LISTENER,
            TCP_TABLE_OWNER_MODULE_CONNECTIONS,
            TCP_TABLE_OWNER_MODULE_ALL
        }
    }

    /// <summary>
    /// This class provides access an IPv4 TCP connection addresses and ports and its
    /// associated Process IDs and names.
    /// </summary>
    [StructLayout(LayoutKind.Sequential)]
    public sealed class TcpProcessRecord
    {
        [DisplayName("Local Address")]
        public IPAddress LocalAddress { get; set; }

        [DisplayName("Local Port")]


 start time: {}:{}",
            start_hour,
            start_minute
        );
        utils::check_duration(&length)?;

        // Chop length at week boundary. Any seconds past Sunday end are carried into
        // remaining length.
        let remaining_len = {
            let start = utils::time_as_weekly_minute(start_day, start_hour, start_minute);
            let end_of_timespan_secs = u64::from(start)
                .saturating_mul(60)
                .saturating_add(length.as_secs());
            let remaining_secs = end_of_timespan_secs.saturating_sub(MAX_WEEKLY_SECS);
            Duration::from_secs(remaining_secs)
        };
        let chopped_len = length - remaining_len;

        // There is always at least one window for any non-zero timespan.
        utils::check_duration(&chopped_len)?;
        let win1 = Self {
            start_day,
            start_hour,
            start_minute,
            length: chopped_len,
        };
        let mut windows = vec![win1];

        // Remaining length (if any) is wrapped back to Monday start.
        if remaining_len.as_secs() > 0 {
            utils::check_duration(&remaining_len)?;
            let win2 = Self {
                start_day: chrono::Weekday::Mon,
                start_hour: 0,
                start_minute: 0,
                length: remaining_len,
            };
            windows.push(win2);
        }

        Ok(windows)
    }

    /// Return window length, in minutes.
    pub fn length_minutes(&self) -> u32 {
        // SAFETY: invariant `length < MAX_WEEKLY_MINS < u32::MAX`
        (self.length.as_secs() / 60) as u32
    }

    /// Return the weekly range covered by this window, in weekly minutes.
    pub fn range_weekly_minutes(&self) -> Range<MinuteInWeek> {
        // NOTE(lucab): Range in Rust does not include the upper limit, so
        // this accounts for a +1 on the end value.
        Range {
            start: self.start_minutes(),
            end: self.end_minutes().saturating_add(1),
        }
    }

    /// Window start, in minutes since beginning of week.
    fn start_minutes(&self) -> MinuteInWeek {
        let minutes = u32::from(self.start_minute);
        let hours = u32::from(self.start_hour).saturating_mul(60);
        let days = self
            .start_day
            .num_days_from_monday()
            .saturating_mul(24)
            .saturating_mul(60);
        days.saturating_add(hours).saturating_add(minutes)
    }

    /// Window end, in minutes since beginning of week.
    fn end_minutes(&self) -> MinuteInWeek {
        let start = self.start_minutes();
        let length = self.length_minutes();
        start.saturating_add(length)
    }

    /// Return whether datetime is contained in this window.
    #[cfg(test)]
    pub fn contains_datetime(&self, datetime: &DateTime<Utc>) -> bool {
        let instant = utils::datetime_as_weekly_minute(datetime);
        self.start_minutes() <= instant && instant <= self.end_minutes()
    }
}

impl Ord for WeeklyWindow {
    fn cmp(&self, other: &Self) -> Ordering {
        match self.start_minutes().cmp(&other.start_minutes()) {
            Ordering::Equal => self.end_minutes().cmp(&other.end_minutes()),
            cmp => cmp,
        }
    }
}

impl P


uit::GPR src_shifted = rec.flag(X86_REF_ZF);

            as.ANDI(masked, address, -4);
            as.SLLI(address, address, 3);
            as.LI(mask, 0xFFFF);
            as.SLLW(rax_shifted, rax, address);
            as.SLLW(mask_shifted, mask, address);
            as.SLLW(src_shifted, src, address);

            as.Bind(&loop);
            as.LR_W(Ordering::AQRL, dst, masked);
            as.AND(temp, dst, mask_shifted);
            as.BNE(temp, rax_shifted, &not_equal);
            as.XOR(temp, dst, src_shifted);
            as.AND(temp, temp, mask_shifted);
            as.XOR(temp, temp, dst);
            as.SC_W(Ordering::AQRL, temp, temp, masked);
            as.BNEZ(temp, &loop);
            as.Bind(&not_equal);
            as.SRLW(dst, dst, address);
            as.AND(dst, dst, mask);

            rec.popScratch();
            rec.popScratch();
            rec.popScratch();
        }
        rec.setLockHandled();
        break;
    }
    case X86_SIZE_DWORD: {
        if (Extensions::Zacas) {
            as.MV(dst, rax);
            as.AMOCAS_W(Ordering::AQRL, dst, src, address);
            rec.zext(dst, dst, X86_SIZE_DWORD);
            WARN_ONCE("Zacas & CMPXCHG, untested");
        } else {
            biscuit::Label not_equal;
            biscuit::Label start;
            biscuit::Label end;
            biscuit::GPR masked = rec.scratch();
            biscuit::GPR scratch = rec.scratch();
            as.ANDI(masked, address, 0b11);
            as.BEQZ(masked, &start);

            // If the address is not aligned, we can't use LR.D
            // Which means we also can't be technically correct atomically
            // Use LR.D/SC.D on the aligned address anyway to at least have a little bit of guarantee
            biscuit::Label loop_unaligned;
            as.ANDI(masked, address, ~0b11);
            as.Bind(&loop_unaligned);
            as.FENCETSO();
            as.LWU(dst, 0, address);
            as.LR_W(Ordering::AQRL, scratch, masked);
            // We do the comparison on the load from the unaligned address, obviously
            as.BNE(dst, rax, &end);
            // If any of the bytes we can see with the aligned address are changed we retry
            // Of course this isn't actually atomic (we'd need hardware unaligned atomics support for that)
            // but it's better than nothing
            as.SC_W(Ordering::AQRL, scratch, scratch, masked); // Write the same thing we just loaded in scratch
            as.BNEZ(scratch, &loop_unaligned);
            as.SW(src, 0, address);
            as.FENCETSO();

            as.J(&end);

            as.Bind(&start);
            as.LR_W(Ordering::AQRL, dst, address);
            rec.zext(dst, dst, X86_SIZE_DWORD); // LR sign extends
            as.BNE(dst, rax, &not_equal);
            as.SC_W(Ordering::AQRL, scratch, src, address);
            as.BNEZ(scratch, &start);
            as.Bind(&not_equal);
            rec.popScratch();
            rec.popScratch();

            as.Bind(&end);
        }
        rec.setLockHandled();
        break;
    }
    case X86_SIZE_QWORD: {


string = "Page Up";
    public static  PAGE_DOWN: string = "Page Down";

    public static  LEFT: string = "Left";
    public static  RIGHT: string = "Right";
    public static  UP: string = "Up";
    public static  DOWN: string = "Down";

    public static  PAUSE_BREAK: string = "Pause Break";
    public static  NUM_LOCK: string = "Num Lock";
    public static  SCROLL_LOCK: string = "Scroll Lock";

    public static  WINDOWS: string = "Windows";

    public static init():void
    {
        KeyboardManager.keyDownDict = {};
        KeyboardManager.keyUpDict = {};
        document.addEventListener("keydown", KeyboardManager.onKeyDonwHander);
        document.addEventListener("keyup", KeyboardManager.onKeyUpHander);
    }

    private static onKeyDonwHander(event:KeyboardEvent):void
    {
        console.log("onKeyDonwHander");
        if(!KeyboardManager.keyDownDict) return;
        var key:string = KeyboardManager.keyCodeToString(event.keyCode);
        var o:Object = KeyboardManager.keyDownDict[key];
        if (o)
        {
            var fun:Function = o["fun"];
            var thisObj:any = o["thisObj"];
            var args:any = o["args"];
            fun.apply(thisObj, args);
        }
    }

    private static onKeyUpHander(event:KeyboardEvent):void
    {
        console.log("onKeyUpHander");
        if(!KeyboardManager.keyUpDict) return;
        var key:string = KeyboardManager.keyCodeToString(event.keyCode);
        var o:Object = KeyboardManager.keyUpDict[key];
        if (o)
        {
            var fun:Function = o["fun"];
            var thisObj:any = o["thisObj"];
            var args:any = o["args"];
            fun.apply(thisObj, args);
        }
    }

    /**
     * 注册按键
     * @param	key		键值
     * @param	fun		回调方法
     * @param	type	按键类型 TYPE_KEY_DOWN、TYPE_KEY_UP
     */
    public static registerKey(key:string, fun:Function, thisObj:any, type:number = 0, ...args):void
    {
        var keyDict:Object = type ? KeyboardManager.keyUpDict : KeyboardManager.keyDownDict;
        keyDict[key] = { "fun":fun, args:args, "thisObj":thisObj };
    }

    /**
     * 注销按键
     * @param	key		键值
     * @param	type	注销的类型
     */
    public static unregisterKey(key:string, type:number = 0):void
    {
        var keyDict:Object = type ? KeyboardManager.keyUpDict : KeyboardManager.keyDownDict;
        delete keyDict[key];
    }

    /**
     * 根据keyCode或charCode获取相应的字符串代号
     * @param	keyCode
     * @return	键盘所指字符串代号
     */
    private static keyCodeToString(keyCode:number):string
    {
        switch (keyCode)
        {
            case 8 :
                return KeyboardManager.BACK_SPACE;
            case 9 :
                return KeyboardManager.TAB;
            case 13 :
                return KeyboardManager.ENTER;
            case 16 :
                return KeyboardManager.SHIFT;
            case 17 :
                return KeyboardManager.CTRL;
            case 19 :
                return KeyboardManager.PAUSE_BREAK;
            case 20 :
                return KeyboardManager.CAPS_LOCK;
            case 27 :


ject authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// WARNING: Do not edit - generated code.

@DocsEditable()
@DomName('CSSPageRule')
class CssPageRule extends CssRule {
  // To suppress missing implicit constructor warnings.
  factory CssPageRule._() { throw new UnsupportedError("Not supported"); }

  @DomName('CSSPageRule.selectorText')
  @DocsEditable()
  String get selectorText native "CSSPageRule_selectorText_Getter";

  @DomName('CSSPageRule.selectorText')
  @DocsEditable()
  void set selectorText(String value) native "CSSPageRule_selectorText_Setter";

  @DomName('CSSPageRule.style')
  @DocsEditable()
  CssStyleDeclaration get style native "CSSPageRule_style_Getter";

}
// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// WARNING: Do not edit - generated code.

@DocsEditable()
@DomName('WebKitCSSRegionRule')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental()
// http://dev.w3.org/csswg/css-regions/#region-style-rule-interface
class CssRegionRule extends CssRule {
  // To suppress missing implicit constructor warnings.
  factory CssRegionRule._() { throw new UnsupportedError("Not supported"); }

  @DomName('WebKitCSSRegionRule.cssRules')
  @DocsEditable()
  List<CssRule> get cssRules native "WebKitCSSRegionRule_cssRules_Getter";

}
// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// WARNING: Do not edit - generated code.

@DocsEditable()
@DomName('CSSRule')
class CssRule extends NativeFieldWrapperClass2 {
  // To suppress missing implicit constructor warnings.
  factory CssRule._() { throw new UnsupportedError("Not supported"); }

  @DomName('CSSRule.CHARSET_RULE')
  @DocsEditable()
  static const int CHARSET_RULE = 2;

  @DomName('CSSRule.FONT_FACE_RULE')
  @DocsEditable()
  static const int FONT_FACE_RULE = 5;

  @DomName('CSSRule.HOST_RULE')
  @DocsEditable()
  // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#api-css-rule-host-rule
  @Experimental()
  static const int HOST_RULE = 1001;

  @DomName('CSSRule.IMPORT_RULE')
  @DocsEditable()
  static const int IMPORT_RULE = 3;

  @DomName('CSSRule.KEYFRAMES_RULE')
  @DocsEditable()
  @Experimental() // untriaged
  static const int KEYFRAMES_RULE = 7;

  @DomName('CSSRule.KEYFRAME_RULE')
  @DocsEditable()
  @Experimental() // untriaged
  static const int KEYFRAME_RULE = 8;

  @DomName('CSSRule.MEDIA_RULE')
  @DocsEditable()
  static const int MEDIA_RULE = 4;

  @DomName('CSSRule.PAGE_RULE')
  @DocsEditable()
  static const int PAGE_RULE = 6;

  @DomName('CSSRule.STYLE_RULE')
  @DocsEditable()
  static const int STYLE_RULE = 1;

  @DomName('CSSRule.SUPPORTS_RULE')
  @DocsEditable()
  static const int SUPPORTS_RULE = 12;

  @DomName


;\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; ++ i ) {\n\t\tvec4 plane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t\t\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; ++ i ) {\n\t\t\tvec4 plane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t\n\t#endif\n#endif\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color,


is.GetStructure("ORDER");
	   } catch(HL7Exception e) {
	      HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
	      throw new System.Exception("An unexpected error ocurred",e);
	   }
	   return ret;
	}

	///
	///Returns a specific repetition of ORN_O08_ORDER
	/// * (a Group object) - creates it if necessary
	/// throws HL7Exception if the repetition requested is more than one
	///     greater than the number of existing repetitions.
	///
	public ORN_O08_ORDER GetORDER(int rep) {
	   return (ORN_O08_ORDER)this.GetStructure("ORDER", rep);
	}

	/**
	 * Returns the number of existing repetitions of ORN_O08_ORDER
	 */
	public int ORDERRepetitionsUsed {
get{
	    int reps = -1;
	    try {
	        reps = this.GetAll("ORDER").Length;
	    } catch (HL7Exception e) {
	        string message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
	        HapiLogFactory.GetHapiLog(GetType()).Error(message, e);
	        throw new System.Exception(message);
	    }
	    return reps;
	}
	}

	/**
	 * Enumerate over the ORN_O08_ORDER results
	 */
	public IEnumerable<ORN_O08_ORDER> ORDERs
	{
		get
		{
			for (int rep = 0; rep < ORDERRepetitionsUsed; rep++)
			{
				yield return (ORN_O08_ORDER)this.GetStructure("ORDER", rep);
			}
		}
	}

	///
	///Adds a new ORN_O08_ORDER
	///
	public ORN_O08_ORDER AddORDER()
	{
		return this.AddStructure("ORDER") as ORN_O08_ORDER;
	}

	///
	///Removes the given ORN_O08_ORDER
	///
	public void RemoveORDER(ORN_O08_ORDER toRemove)
	{
		this.RemoveStructure("ORDER", toRemove);
	}

	///
	///Removes the ORN_O08_ORDER at the given index
	///
	public void RemoveORDERAt(int index)
	{
		this.RemoveRepetition("ORDER", index);
	}

}
}


; }

/* translation of terminal (cli) ansi color output sequences */
/* Partly based on 3/4 bit colors from the "theme" at https://github.com/mintty/mintty/blob/master/themes/helmholtz */

.AnsiTerminalBlackForeNormal { color: #000000; }
.AnsiTerminalBlackBackNormal { color: #606060; }
.AnsiTerminalBlackForeBold { color: #404040; }
.AnsiTerminalBlackBackBold { color: #404040; }

.AnsiTerminalRedForeNormal { color: #d3000B; }
.AnsiTerminalRedBackNormal { color: #ffc8c8; }
.AnsiTerminalRedBackNormal.colorblind { color: #94cbff; }
.AnsiTerminalRedForeBold { color: #ff5e5e; }
.AnsiTerminalRedBackBold { color: #ffa5a5; }
.AnsiTerminalRedBackBold.colorblind { color: #4da6ff; }

.AnsiTerminalGreenForeNormal { color: #189100; }
.AnsiTerminalGreenBackNormal { color: #c8ffc8; }
.AnsiTerminalGreenForeBold { color: #21c800; }
.AnsiTerminalGreenBackBold { color: #87ff87; }

.AnsiTerminalYellowForeNormal { color: #c0a000; }
.AnsiTerminalYellowBackNormal { color: #f2f293; }
.AnsiTerminalYellowForeBold { color: #e2c73f; }
.AnsiTerminalYellowBackBold { color: #ffff00; }

.AnsiTerminalBlueForeNormal { color: #005dff; }
.AnsiTerminalBlueBackNormal { color: #c8d0f4; }
.AnsiTerminalBlueForeBold { color: #6080ff; }
.AnsiTerminalBlueBackBold { color: #93abff; }

.AnsiTerminalMagentaForeNormal { color: #b148c6; }
.AnsiTerminalMagentaBackNormal { color: #f6ceff; }
.AnsiTerminalMagentaForeBold { color: #ff6bff; }
.AnsiTerminalMagentaBackBold { color: #eb9bff; }

.AnsiTerminalCyanForeNormal { color: #00a89a; }
.AnsiTerminalCyanBackNormal { color: #c9fff9; }
.AnsiTerminalCyanForeBold { color: #00e0e0; }
.AnsiTerminalCyanBackBold { color: #8cffef; }

.AnsiTerminalWhiteForeNormal { color: #bfbfbf; }
.AnsiTerminalWhiteBackNormal { color: #e0e0e0; }
.AnsiTerminalWhiteForeBold { color: #ffffff; }
.AnsiTerminalWhiteBackBold { color: #ffffff; }
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */

/* ==========================================================================
   HTML5 display definitions
   ========================================================================== */

/**
 * Correct `block` display not defined in IE 8/9.
 */

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
    display: block;
}

/**
 * Correct `inline-block` display not defined in IE 8/9.
 */

audio,
canvas,
video {
    display: inline-block;
}

/**
 * Prevent modern browsers from displaying `audio` without controls.
 * Remove excess height in iOS 5 devices.
 */

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

/**
 * Address `[hidden]` styling not present in IE 8/9.
 * Hide the `template` element in IE, Safari, and Firefox < 22.
 */

[hidden],
template {
    display: none;
}

/* ==========================================================================
   Base
   ========================================================================== */

/**
 * 1.


org/wikipedia/commons/thumb/d/dc/High_Capacity_Color_Barcode_Tag.svg/256px-High_Capacity_Color_Barcode_Tag.svg.png 2x">	\n' +
    'High Capacity Color Barcode	\n' +
    'HCCB was developed by Microsoft; licensed by ISAN-IA.\n' +
    '
\n' +
    '
\n' +
    '	\n' +
    'HueCode	\n' +
    'From Robot Design Associates. Uses greyscale or colour.[64]\n' +
    '
\n' +
    '
\n' +
    '	\n' +
    'InterCode	\n' +
    'From Iconlab, Inc. The standard 2D barcode in South Korea. All 3 South Korean mobile carriers put the scanner program of this code into their handsets to access mobile internet, as a default embedded program.\n' +
    '
\n' +
    '
\n' +
    '\n' +
    '
\n' +
    '
\n' +
    '	\n' +
    'JAB Code\n' +
    '	\n' +
    'Just Another Bar Code is a colored 2D barcode. Square or rectangle. License free\n' +
    '
\n' +
    '
\n' +
    '	\n' +
    '<a href="https: