lass MountPhaseException(lifecycle: LifecycleStep) :
      RuntimeException("Crashed on ${lifecycle.name}")
}
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.facebook.litho.widget

import com.facebook.litho.Component
import com.facebook.litho.ComponentContext
import com.facebook.litho.annotations.LayoutSpec
import com.facebook.litho.annotations.OnCreateLayout
import com.facebook.litho.annotations.OnCreateTreeProp
import com.facebook.litho.annotations.Prop
import com.facebook.litho.annotations.State
import com.facebook.litho.widget.treeprops.SimpleTreeProp

@LayoutSpec
object ComponentWithTreePropParentSpec {

  @JvmStatic
  @OnCreateTreeProp
  fun onCreateTreePropA(c: ComponentContext, @Prop propA: SimpleTreeProp): SimpleTreeProp = propA

  @JvmStatic
  @OnCreateLayout
  fun onCreateLayout(c: ComponentContext, @State isChecked: Boolean): Component =
      MountSpecWithTreeProp.create(c).viewWidth(100).viewHeight(100).build()
}
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.facebook.litho.testing.treeprop

class TreePropNumberType(val value: Int) {

  override fun equals(obj: Any?): Boolean {
    if (this === obj) {
      return true
    }
    if (obj == null || javaClass != obj.javaClass) {
      return false
    }
    val other = obj as TreePropNumberType
    return other.value == value
  }

  override fun hashCode(): Int = value

  override fun toString(): String = "TreePropNumberType{mValue=${value}${'}'}"
}
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.facebook.litho.testing.error

import com.facebook.litho.Component
import com.facebook.litho.ComponentContext
import com.facebook.litho.annotations.Layout


Tty;
}

declare var Tty: {
}
import * as Oli from '../src/oli';

describe('Oli Module', () => {

  describe('almostEqual', () => {
    test('should return true for numbers within difference allowance', () => {
      expect(Oli.almostEqual(4.123, 4.126, 10 ** -2)).toBe(true);
    });

    test('should return false for numbers outside difference allowance', () => {
      expect(Oli.almostEqual(4.123, 4.126, 10 ** -3)).toBe(false);
    });
  });

  describe('gcd', () => {
    test('should calculate greatest common divisor of 220 and 8', () => {
      expect(Oli.gcd(220, 8)).toBe(4);
    });
  });

  describe('toRadians', () => {
    test('should convert 120 deg to 2.0944 rads (to 5 significant figures)', () => {
      expect(Oli.toRadians(120).toPrecision(5)).toBe('2.0944');
    });
  });

  describe('round', () => {
    test('should round Math.PI to 5 decimal places', () => {
      expect(Oli.round(Math.PI, 5)).toEqual(3.14159);
    });

    test('should round Math.PI to default 1 decimal places', () => {
      expect(Oli.round(Math.PI)).toEqual(3.1);
    });
  });

  describe('randomArrayItem', () => {
    test('should return a random item from the array [1, 3, 5, 9]', () => {
      const testArray = [1, 3, 5, 9];
      const randomItem = Oli.randomArrayItem([1, 3, 5, 9]);
      expect(testArray.includes(randomItem)).toBe(true);
    });

    test('should return undefined for empty array', () => {
      expect(Oli.randomArrayItem([])).toBe(undefined);
    });
  });

  describe('randomInt', () => {
    test('should return a random integer within the specified range - run 20x', () => {
      Array(0, 20).forEach(() => {
        const randomInt = Oli.randomInt(45, 47);
        expect(Number.isInteger(randomInt)).toBe(true);
        expect(randomInt >= 45 && randomInt <= 47).toBe(true);
      });
    });
  });

  describe('random', () => {
    test('should return a random number within the specified range - run 20x', () => {
      Array(0, 20).forEach(() => {
        const random = Oli.random(45, 47);
        expect(Number.isInteger(random)).toBe(true);
        expect(random >= 45 && random <= 47).toEqual(true);
      });
    });
  });
});
export interface Product {
  Id:number;
  Name:string;
  Description:string;
  InitialPrice:number;
}
export class DateType {
  public static Hijri = 1;
  public static Gregorian  = 2;
}
/**
 * LCS模板.Naive的实现.
 * {@link https://leetcode.cn/problems/longest-common-subsequence/}
 */
function longestCommonSubsequence1<T>(arr1: ArrayLike<T>, arr2: ArrayLike<T>): number {
  const n1 = arr1.length
  const n2 = arr2.length
  const dp: Uint32Array[] = Array(n1 + 1)
  for (let i = 0; i < n1 + 1; i++) dp[i] = new Uint32Array(n2 + 1)
  for (let i = 1; i < n1 + 1; i++) {
    const curRow = dp[i]
    const preRow = dp[i - 1]
    for


space:nowrap}.NDPrototype.NarrowForm td.PBeforeParameters,.NDPrototype.NarrowForm td.PAfterParameters,.NDPrototype.NarrowForm td.PDefaultValue{white-space:normal}.NarrowForm table.PParameters td.last{width:100%}.NarrowForm table.PParameters td.first,.NarrowForm.CStyle td.PAfterParameters{padding-left:3.5ex}.WideForm td.PAfterParameters{vertical-align:bottom}.CStyle .PPostPrototypeLine{padding-left:3.5ex}.CDLParameterType{font:8pt Consolas,"Courier New",monospace;white-space:nowrap}.NDPrototype a:link,.NDPrototype a:visited,.NDPrototype a:hover,.NDPrototype a:active,.CDLParameterType a:link,.CDLParameterType a:visited,.CDLParameterType a:hover,.CDLParameterType a:active{color:#000000}.NDPrototype:hover a:link,.NDPrototype:hover a:visited,.NDPrototype:hover a:hover,.NDPrototype:hover a:active,.CDLEntry:hover .CDLParameterType a:link,.CDLEntry:hover .CDLParameterType a:visited,.CDLEntry:hover .CDLParameterType a:hover,.CDLEntry:hover .CDLParameterType a:active{text-decoration:underline}.PNameModifier,.CStyle .PModifierQualifier,.PDefaultValue,.PDefaultValueSeparator{opacity:0.45}.PNameModifier,.CStyle .PModifierQualifier,.CStyle .PNamePrefix{text-align:right}.NDClassPrototype{margin:0 4ex 1em 4ex}.CPEntry{border-width:1px 2px 2px 1px;border-style:solid;border-color:#000000;padding:.5ex 1ex;margin-bottom:4px;-moz-border-radius:1ex;border-radius:1ex;background-color:#FFFFFF;overflow:auto}a.CPEntry,a.CPAdditionalChildrenNotice{display:block}a.CPEntry:link,a.CPEntry:hover,a.CPEntry:visited,a.CPEntry:active{color:#000000;text-decoration:none}a.CPEntry:hover .CPName,a.CPEntry:active .CPName{text-decoration:underline}.NDClassPrototype .CPEntry.Parent{margin-right:3.5ex}.NDClassPrototype.HasChildren .CPEntry.Parent{margin-right:7ex}.NDClassPrototype.HasParents .CPEntry.Current{margin-left:3.5ex}.NDClassPrototype.HasChildren .CPEntry.Current{margin-right:3.5ex}.NDClassPrototype .CPEntry.Child,.NDClassPrototype .CPAdditionalChildrenNotice{margin-left:3.5ex}.NDClassPrototype.HasParents .CPEntry.Child,.NDClassPrototype.HasParents .CPAdditionalChildrenNotice{margin-left:7ex}.CPName{font:bold 11pt "Trebuchet MS",Tahoma,Geneva,sans-serif;line-height:110%}.CPName .Qualifier,.CPName .TemplateSignature{font-weight:normal;color:#282828}.CPEntry.Parent .CPName,.CPEntry.Child .CPName{font-size:10pt}.CPEntry.Parent,.CPEntry.Child{opacity:.5}.CPEntry .CPPrePrototypeLine,.CPEntry .CPModifiers,.CPEntry .CPPostPrototypeLine{font:8pt Consolas,"Courier New",monospace;opacity:.5}.CPEntry.Parent .CPModifiers,.CPEntry.Child .CPModifiers{opacity:.75}.CPEntry .CPPostPrototypeLine{margin-left:4ex}a.CPAdditionalChildrenNotice:link,a.CPAdditionalChildrenNotice:visited,a.CPAdditionalChildrenNotice:hover,a.CPAdditionalChildrenNotice:active{color:#949494;font:i


f4 {
        return Half4(get(index1), get(index2), get(index3), get(index4))
    }

    operator fun get(index: Int) = when (index) {
        0 -> x
        1 -> y
        2 -> z
        3 -> w
        else -> throw IllegalArgumentException("index must be in 0..3")
    }

    operator fun get(index1: Int, index2: Int) = Half2(get(index1), get(index2))
    operator fun get(index1: Int, index2: Int, index3: Int): Half3 {
        return Half3(get(index1), get(index2), get(index3))
    }
    operator fun get(index1: Int, index2: Int, index3: Int, index4: Int): Half4 {
        return Half4(get(index1), get(index2), get(index3), get(index4))
    }

    inline operator fun invoke(index: Int) = get(index - 1)

    operator fun set(index: Int, v: Half) = when (index) {
        0 -> x = v
        1 -> y = v
        2 -> z = v
        3 -> w = v
        else -> throw IllegalArgumentException("index must be in 0..3")
    }

    operator fun set(index1: Int, index2: Int, v: Half) {
        set(index1, v)
        set(index2, v)
    }

    operator fun set(index1: Int, index2: Int, index3: Int, v: Half) {
        set(index1, v)
        set(index2, v)
        set(index3, v)
    }

    operator fun set(index1: Int, index2: Int, index3: Int, index4: Int, v: Half) {
        set(index1, v)
        set(index2, v)
        set(index3, v)
        set(index4, v)
    }

    operator fun set(index: VectorComponent, v: Half) = when (index) {
        VectorComponent.X, VectorComponent.R, VectorComponent.S -> x = v
        VectorComponent.Y, VectorComponent.G, VectorComponent.T -> y = v
        VectorComponent.Z, VectorComponent.B, VectorComponent.P -> z = v
        VectorComponent.W, VectorComponent.A, VectorComponent.Q -> w = v
    }

    operator fun set(index1: VectorComponent, index2: VectorComponent, v: Half) {
        set(index1, v)
        set(index2, v)
    }

    operator fun set(
        index1: VectorComponent, index2: VectorComponent, index3: VectorComponent, v: Half) {
        set(index1, v)
        set(index2, v)
        set(index3, v)
    }

    operator fun set(
        index1: VectorComponent, index2: VectorComponent,
        index3: VectorComponent, index4: VectorComponent, v: Half) {
        set(index1, v)
        set(index2, v)
        set(index3, v)
        set(index4, v)
    }

    operator fun unaryMinus() = Half4(-x, -y, -z, -w)
    operator fun inc() = Half4(x++, y++, z++, w++)
    operator fun dec() = Half4(x--, y--, z--, w--)

    inline operator fun plus(v: Half) = Half4(x + v, y + v, z + v, w + v)
    inline operator fun minus(v: Half) = Half4(x - v, y - v, z - v, w - v)
    inline operator fun times(v: Half) = Half4(x * v, y * v, z * v, w * v)
    inline operator fun div(v: Half) = Half4(x / v, y / v, z / v, w / v)

    inline operator fun plus(v: Half2) = Half4(x + v.x, y + v.y, z, w)
    inline operator fun minus(v: Half2) = Half4(x - v.x, y - v.y, z, w)
    inline operator fun times(v: Half2) = Half4(x * v.x, y * v.y, z, w)
    inline operator fun div(v: Half2) = Half4(x /


l  $a0, $zero, .L801E1B5C_ovl16
/* 217DEC 801E1B3C 3C040001 */   lui   $a0, 1
/* 217DF0 801E1B40 10810010 */  beq   $a0, $at, .L801E1B84_ovl16
/* 217DF4 801E1B44 24010002 */   li    $at, 2
/* 217DF8 801E1B48 5081001A */  beql  $a0, $at, .L801E1BB4_ovl16
/* 217DFC 801E1B4C 3C040001 */   lui   $a0, 1
/* 217E00 801E1B50 10000022 */  b     .L801E1BDC_ovl16
/* 217E04 801E1B54 44803000 */   mtc1  $zero, $f6
/* 217E08 801E1B58 3C040001 */  lui   $a0, (0x0001047D >> 16) # lui $a0, 1
.L801E1B5C_ovl16:
/* 217E0C 801E1B5C 0C02A806 */  jal   func_800AA018
/* 217E10 801E1B60 3484047D */   ori   $a0, (0x0001047D & 0xFFFF) # ori $a0, $a0, 0x47d
/* 217E14 801E1B64 3C040001 */  lui   $a0, (0x0001047C >> 16) # lui $a0, 1
/* 217E18 801E1B68 0C02A855 */  jal   func_800AA154
/* 217E1C 801E1B6C 3484047C */   ori   $a0, (0x0001047C & 0xFFFF) # ori $a0, $a0, 0x47c
/* 217E20 801E1B70 3C038005 */  lui   $v1, %hi(D_8004A7C4) # $v1, 0x8005
/* 217E24 801E1B74 8C63A7C4 */  lw    $v1, %lo(D_8004A7C4)($v1)
/* 217E28 801E1B78 8C620000 */  lw    $v0, ($v1)
/* 217E2C 801E1B7C 10000016 */  b     .L801E1BD8_ovl16
/* 217E30 801E1B80 00021080 */   sll   $v0, $v0, 2
.L801E1B84_ovl16:
/* 217E34 801E1B84 3C040001 */  lui   $a0, (0x00010477 >> 16) # lui $a0, 1
/* 217E38 801E1B88 0C02A806 */  jal   func_800AA018
/* 217E3C 801E1B8C 34840477 */   ori   $a0, (0x00010477 & 0xFFFF) # ori $a0, $a0, 0x477
/* 217E40 801E1B90 3C040001 */  lui   $a0, (0x00010476 >> 16) # lui $a0, 1
/* 217E44 801E1B94 0C02A855 */  jal   func_800AA154
/* 217E48 801E1B98 34840476 */   ori   $a0, (0x00010476 & 0xFFFF) # ori $a0, $a0, 0x476
/* 217E4C 801E1B9C 3C038005 */  lui   $v1, %hi(D_8004A7C4) # $v1, 0x8005
/* 217E50 801E1BA0 8C63A7C4 */  lw    $v1, %lo(D_8004A7C4)($v1)
/* 217E54 801E1BA4 8C620000 */  lw    $v0, ($v1)
/* 217E58 801E1BA8 1000000B */  b     .L801E1BD8_ovl16
/*


ManagedInstanceGroupModuleSummary>(
                response => response.OpcNextPage,
                input =>
                {
                    if (!string.IsNullOrEmpty(input))
                    {
                        request.Page = input;
                    }
                    return request;
                },
                request => client.ListManagedInstanceGroupModules(request, retryConfiguration, cancellationToken),
                response => response.ManagedInstanceGroupModuleCollection.Items
            );
        }

        /// <summary>
        /// Creates a new enumerable which will iterate over the responses received from the ListManagedInstanceGroups operation. This enumerable
        /// will fetch more data from the server as needed.
        /// </summary>
        /// <param name="request">The request object containing the details to send</param>
        /// <param name="retryConfiguration">The configuration for retrying, may be null</param>
        /// <param name="cancellationToken">The cancellation token object</param>
        /// <returns>The enumerator, which supports a simple iteration over a collection of a specified type</returns>
        public IEnumerable<ListManagedInstanceGroupsResponse> ListManagedInstanceGroupsResponseEnumerator(ListManagedInstanceGroupsRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
        {
            return new Common.Utils.ResponseEnumerable<ListManagedInstanceGroupsRequest, ListManagedInstanceGroupsResponse>(
                response => response.OpcNextPage,
                input =>
                {
                    if (!string.IsNullOrEmpty(input))
                    {
                        request.Page = input;


iv>
  260     }

  261

  262     CUTLASS_HOST_DEVICE

  263     T &operator*() const {

  264       return *(ptr_ - 1);

  265     }

  266

  267     CUTLASS_HOST_DEVICE

  268     bool operator==(reverse_iterator const &other) const {

  269       return ptr_ == other.ptr_;

  270     }

  271

  272     CUTLASS_HOST_DEVICE

  273     bool</


	ofs.close();

	std::cout << "                    | Info : write consumes: " << (std::chrono::high_resolution_clock::now() - INSERT_T) << "\n";

	std::cout << "                    | Info : Current pid   : " << getpid() << std::endl;
	std::cout << "                    | Info : Time consumes : " << (std::chrono::high_resolution_clock::now() - start_point) << "\n";
	std::cout << "                    | Info : Memory usage  : " << getPeakRSS() << " B" << std::endl;
	std::cout << "                    | Info : HAlign4 END!" << std::endl;
	return 0;
}
#pragma once

#include "Pseudo.hpp"

#include <iterator>
#include <vector>
#include <algorithm>

namespace utils
{

    class NucleicAcidColumn
    {
    public:
        template <typename MatrixType>
        NucleicAcidColumn(const MatrixType& matrix, size_t num_row, size_t col)
        {
            unsigned int cnt[_number] = {};
            for (size_t i = 0; i != num_row; ++i)
                ++cnt[matrix[i][col]];

            double relative_frequencies[_number] = {};
            for (size_t i = 0; i != _number; ++i)
                relative_frequencies[i] = static_cast<double>(cnt[i]) / num_row;

            _split_unknown(relative_frequencies);

            _feature[nucleic_acid_pseudo::GAP] = nucleic_acid_pseudo::GAP;
            _feature[nucleic_acid_pseudo::C  ] = nucleic_acid_pseudo::C;
            _feature[nucleic_acid_pseudo::G  ] = nucleic_acid_pseudo::G;
            _feature[nucleic_acid_pseudo::A  ] = nucleic_acid_pseudo::A;
            _feature[nucleic_acid_pseudo::T  ] = nucleic_acid_pseudo::T;
            std::sort(_feature, _feature + (_number - 1),
                    [&relative_frequencies](unsigned char lhs, unsigned char rhs)
                    { return relative_frequencies[lhs] > relative_frequencies[rhs]; });

            double sum = 0;
            for (size_t i = 0; ; ++i)
            {
                sum += relative_frequencies[_feature[i]];
                if (sum > _thresholds[i])
                {
                    _available_count = i + 1;
                    break;
                }
            }
        }

        operator unsigned char() const noexcept;

    private:
        static void _split_unknown(double* relative_frequencies) noexcept;

        static constexpr size_t _number = nucleic_acid_pseudo::NUMBER;
        static constexpr double _thresholds[]{ 0.9, 0.99, 0.999, 0 };

        size_t _available_count;
        unsigned char _feature[_number - 1];
    };

}
#pragma once

#include "Fasta.hpp"
#include "Pseudo.hpp"
#include "Insertion.hpp"

#include <string>
#include <vector>
#include <algorithm>
#include <chrono>
#include <iostream>

#if defined(_WIN32)
#include <windows.h>
#include <psapi.h>
#include <process.h>
#include <io.h>
inline void EmptySet()
{
    EmptyWorkingSet(GetCurrentProcess());
}
void getFiles_win(std::string path, std::vector<std::string>& files);
#elif defined(__unix__) || defined(__unix) || defined(unix) || (defined(__APPLE__) && defined(__MACH__))
#include <sys/types.h>
#include <dirent.h>
#include <malloc.h>
#include <unistd.h>
#include <sys/resource.h>
#


<!DOCTYPE html>

<meta charset="utf-8">
<title>WebGL Uniform Buffers Conformance Tests</title>
<link rel="stylesheet" href="../../resources/js-test-style.css"/>

<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>

<!DOCTYPE html>

<meta charset="utf-8">
<title>WebGL draw with uniform blocks conformance tests</title>
<link rel="stylesheet" href="../../resources/js-test-style.css"/>


roposal
			expectedProposal        *pb.Proposal
			targetDefinition        *ccprovider.ChaincodeData
			fakePeerLedger          *mock.PeerLedger
			newTxSimulator          *mock.TxSimulator
			newHistoryQueryExecutor *mock.HistoryQueryExecutor
			request                 *pb.ChaincodeSpec
			incomingMessage         *pb.ChaincodeMessage
			responseMessage         *pb.ChaincodeMessage
		)

		BeforeEach(func() {
			expectedProposal = &pb.Proposal{
				Header:  []byte("proposal-header"),
				Payload: []byte("proposal-payload"),
			}
			expectedSignedProp = &pb.SignedProposal{
				ProposalBytes: []byte("signed-proposal-bytes"),
				Signature:     []byte("signature"),
			}
			txContext.Proposal = expectedProposal
			txContext.SignedProp = expectedSignedProp

			newTxSimulator = &mock.TxSimulator{}
			newHistoryQueryExecutor = &mock.HistoryQueryExecutor{}
			fakePeerLedger = &mock.PeerLedger{}
			fakePeerLedger.NewTxSimulatorReturns(newTxSimulator, nil)
			fakeLedgerGetter.GetLedgerReturns(fakePeerLedger)
			fakePeerLedger.NewHistoryQueryExecutorReturns(newHistoryQueryExecutor, nil)

			targetDefinition = &ccprovider.ChaincodeData{
				Name:    "target-chaincode-data-name",
				Version: "target-chaincode-version",
			}
			fakeDefinitionGetter.ChaincodeDefinitionReturns(targetDefinition, nil)

			request = &pb.ChaincodeSpec{
				ChaincodeId: &pb.ChaincodeID{
					Name: "target-chaincode-name:target-version",
				},
			}
			payload, err := proto.Marshal(request)
			Expect(err).NotTo(HaveOccurred())

			incomingMessage = &pb.ChaincodeMessage{
				Type:      pb.ChaincodeMessage_INVOKE_CHAINCODE,
				Payload:   payload,
				Txid:      "tx-id",
				ChannelId: "channel-id",
			}

			responseMessage = &pb.ChaincodeMessage{}
			fakeInvoker.InvokeReturns(responseMessage, nil)
		})

		It("checks if the target is not invokable", func() {
			_, err := handler.HandleInvokeChaincode(incomingMessage, txContext)
			Expect(err).NotTo(HaveOccurred())

			Expect(fakeSystemCCProvider.IsSysCCAndNotInvokableCC2CCCallCount()).To(Equal(1))
			name := fakeSystemCCProvider.IsSysCCAndNotInvokableCC2CCArgsForCall(0)
			Expect(name).To(Equal("target-chaincode-name"))
		})

		It("checks if the target is a system chaincode", func() {
			_, err := handler.HandleInvokeChaincode(incomingMessage, txContext)
			Expect(err).NotTo(HaveOccurred())

			Expect(fakeSystemCCProvider.IsSysCCCallCount() >= 1).To(BeTrue())
			name := fakeSystemCCProvider.IsSysCCArgsForCall(0)
			Expect(name).To(Equal("target-chaincode-name"))
		})

		It("evaluates the access control policy", func() {
			_, err := handler.HandleInvokeChaincode(incomingMessage, txContext)
			Expect(err).NotTo(HaveOccurred())

			Expect(fakeACLProvider.CheckACLCallCount()).To(Equal(1))
			resource, chainID, proposal := fakeACLProvider.CheckACLArgsForCall(0)
			Expect(resource).To(Equal(resources.Peer_ChaincodeToChaincode))
			Expect(chainID).To(Equal("channel-id"))
			Expect(proposal).To(Equal(expectedSignedProp))
		})

		Context("when the target channel is different from the context", func() {
			BeforeEach(func() {
				request = &pb.ChaincodeSpec{
					ChaincodeId: &pb.ChaincodeID{
						Name: "target-chaincode-name:target-version/target-channel-id",
					},
				}
				payload, err


�少出工，以致减少了收入。也有的合作化后失去了雇工、放债、出租小土地和做生意的剥削收入，因而生活降低。

   （四）新上中农：合作化前的三户新上中农，现在的收入和生活仍然是新上中农水平。他们共同的特点是：劳力多；家庭副业也搞得好，平均占每户总收入的30%以上。

   （五）老下中农，合作化前的十一户老下中农，现在有三户的收入和生活水平相当于上中农，一户生活下降，相当于贫农，其余的保持原来水平。

   （六）新下中农：合作化前的十五户新下中农，现在的收入和生活，有五户相当于上中农，有三户相当于贫农，其余的仍然是原来的水平。

   （七）贫农：合作化前的二十二户贫农，现在的收入和生活，有五户相当于上中农，有五户相当于上中农，有五户略有提高，相当于下中农，其余的仍然是原来的水平。

   合作化前的新、老下中农和贫农，现在相当于上中农的十三户。上升的主要原因是：劳力多，劳力强；家庭副业收入多。而下中农下降到贫农水平或一直保持贫、下中农水平没有上升的三十五户，主要原因是：人口增多，劳力负担的非劳动人口增加，或者家人死亡，只剩孤身一人。这些户的家庭副业收入也少，平均只占每户总收入的20%左右。

   把以上各阶层各户的收入和生活水平变化情况综合起来，除地主、富农外，和合作化前比较是：

   合作化前、新、老上中农四十三户，占当时总户数的44.9%，平均每人纯收入八十七元；现在，中农社员相当于上中农生活水平的有四十七户，占现在总户数的47%，平均每人纯收入九十九元。

   合作化前，新、老下中农二十六户，占当时总户数26。6%强，平均每人纯收入五十元；现在生活水平相当于中农的社员有三十户，占总数30%，平均每人纯收入五十七元。

   合作化前，贫农二十二户，占当时总户数22.6%强，平均每人纯收入也是50元；现在生活水平相当于贫农的剩十六户，占总户数16%，平均每人纯收入却有七十三元。

   生活水平相当于贫农的十六户社员，从收入看，比生活水平相当于下中农的社员高，这是因为身强力壮的单身社员收入高，再加上大队、生产队的照顾等，把平均收入扯高了。其实，他们的生活很苦：四户身强力壮的单身社员平均每人收入一百三十八元，但是他们“一口人的日子要用两个人的钱”，柴、米、油、盐并不省；五户年纪原男女孤老，每人收入五十四元多，生活更苦；其余的是家大口阔的户，这些户加上照顾，收入不少，除去照顾收入就差了。

   这十六户生活水平相当于贫农的社员，都是全作化前的贫、下中农，他们和地主、富农现在的生活相比，地主、富农在“天堂”，他们在“地下”！

   来源：根据1963年


0) boolean arg0) {
        if (super.aClass19_Sub3_42.anInt8008 > 0) {
            @Pc(15) float local15 = -0.5F / (float) super.aClass19_Sub3_42.anInt8008;
            super.aClass19_Sub3_42.method7014(1);
            Static512.aFloatArray49[3] = super.aClass19_Sub3_42.aFloat132 * local15 + 0.25F;
            Static512.aFloatArray49[0] = 0.0F;
            Static512.aFloatArray49[1] = 0.0F;
            Static512.aFloatArray49[2] = local15;
            OpenGL.glPushMatrix();
            OpenGL.glLoadIdentity();
            OpenGL.glTexGenfv(OpenGL.GL_S, OpenGL.GL_EYE_PLANE, Static512.aFloatArray49, 0);
            OpenGL.glPopMatrix();
            super.aClass19_Sub3_42.method6995(0.5F, (float) super.aClass19_Sub3_42.anInt8008);
            super.aClass19_Sub3_42.method7001(this.aClass93_Sub4_1);
            super.aClass19_Sub3_42.method7014(0);
        }
        this.aClass36_2.method1005('\u0000');
        OpenGL.glMatrixMode(OpenGL.GL_TEXTURE);
        OpenGL.glPushMatrix();
        OpenGL.glScalef(0.25F, 0.25F, 1.0F);
        OpenGL.glMatrixMode(OpenGL.GL_MODELVIEW);
    }

    @OriginalMember(owner = "client!fe", name = "a", descriptor = "(III)V")
    @Override
    public void method9428(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) {
        if ((arg1 & 0x1) == 1) {
            if (this.aClass329_2.aBoolean655) {
                super.aClass19_Sub3_42.method7001(this.aClass329_2.aClass93_Sub3_2);
                Static512.aFloatArray49[3] = (float) (super.aClass19_Sub3_42.anInt7987 % 4000) / 4000.0F;
                Static512.aFloatArray49[0] = 0.0F;
                Static512.aFloatArray49[2] = 0.0F;
                Static512.aFloatArray49[1] = 0.0F;
                OpenGL.glTexGenfv(OpenGL.GL_R, OpenGL.GL_OBJECT_PLANE, Static512.aFloatArray49, 0);
            } else {
                @Pc(24) int local24 = super.aClass19_Sub3_42.anInt7987 % 4000 * 16 / 4000;
                super.aClass19_Sub3_42.method7001(this.aClass329_2.aClass93_Sub2Array3[local24]);
            }
        } else if (this.aClass329_2.aBoolean655) {
            super.aClass19_Sub3_42.method7001(this.aClass329_2.aClass93_Sub3_2);
            Static512.aFloatArray49[3] = 0.0F;
            Static512.aFloatArray49[0] = 0.0F;
            Static512.aFloatArray49[2] = 0.0F;
            Static512.aFloatArray49[1] = 0.0F;
            OpenGL.glTexGenfv(OpenGL.GL_R, OpenGL.GL_OBJECT_PLANE, Static512.aFloatArray49, 0);
        } else {
            super.aClass19_Sub3_42.method7001(this.aClass329_2.aClass93_Sub2Array3[0]);
        }
    }

    @OriginalMember(owner = "client!fe", name = "a", descriptor = "(I)V")
    @Ov


442Q345 442 383 396T422 280Q422 169 343 79T173 -11Q123 -11 82 27T40 150V159Q40 180 48 217T97 414Q147 611 147 623T109 637Q104 637 101 637H96Q86 637 83 637T76 640T73 647ZM336 325V331Q336 405 275 405Q258 405 240 397T207 376T181 352T163 330L157 322L136 236Q114 150 114 114Q114 66 138 42Q154 26 178 26Q211 26 245 58Q270 81 285 114T318 219Q336 291 336 325Z\" style=\"visibility: visible;\"></path></g><g data-mml-node=\"mn\" transform=\"translate(429, 413) scale(0.707)\" style=\"visibility: visible;\"><path data-c=\"32\" d=\"M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z\" style=\"visibility: visible;\"></path></g><g data-mml-node=\"mi\" transform=\"translate(429, -247) scale(0.707)\" style=\"visibility: visible;\"><path data-c=\"6E\" d=\"M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z\" style=\"visibility: visible;\"></path></g></g><g data-mml-node=\"mo\" transform=\"translate(11986.2, 0)\" style=\"visibility: visible;\"><path data-c=\"29\" d=\"M60 749L64 750Q69 750 74 750H86L114 726Q208 641 251 514T294 250Q294 182 284 119T261 12T224 -76T186 -143T145 -194T113 -227T90 -246Q87 -249 86 -250H74Q66 -250 63 -250T58 -247T55 -238Q56 -237 66 -225Q221 -64 221 250T66 725Q56 737 55 738Q55 746 60 749Z\" style=\"visibility: visible;\"></path></g><g data-mml-node=\"mo\" transform=\"translate(12375.2, 0)\" style=\"visibility: visible;\"><path data-c=\"2E\" d=\"M78 60Q78 84 95 102T138 120Q162 120 180 104T199 61Q199 36 182 18T139 0T96 17T78 60Z\" style=\"visibility: visible;\"></path></g></g></g></g></g></g><g style=\"visibility: visible;\"></g></svg>

",


"""Link Covers."""

from pathlib import Path

from codex.librarian.scribe.importer.const import (
    CLASS_CUSTOM_COVER_GROUP_MAP,
    LINK_COVER_PKS,
)
from codex.librarian.scribe.importer.failed.failed import FailedImportsImporter
from codex.librarian.scribe.importer.statii.link import ImporterLinkCoversStatus
from codex.models import CustomCover, Folder

class LinkCoversImporter(FailedImportsImporter):
    """Link Covers methods."""

    def _link_custom_cover_prepare(self, cover, model_map):
        """Prepare one cover in the model map for bulk update."""
        if cover.library and cover.library.covers_only:
            model = CLASS_CUSTOM_COVER_GROUP_MAP.inverse.get(cover.group)
            if not model:
                self.log.warning(f"Custom Cover model not found for {cover.path}")
                return
            group_filter = {"sort_name": cover.sort_name}
        else:
            model = Folder
            path = str(Path(cover.path).parent)
            group_filter = {"path": path}
        qs = model.objects.filter(**group_filter).exclude(custom_cover=cover)
        if not qs.exists():
            return

        if model not in model_map:
            model_map[model] = []

        for obj in qs.iterator():
            obj.custom_cover = cover
            model_map[model].append(obj)

    def _link_custom_cover_group(self, model, objs, status):
        """Bulk link a group to it's custom covers."""
        if not objs:
            return
        model.objects.bulk_update(objs, ["custom_cover"])
        status.complete += len(objs)
        self.status_controller.update(status)

    def link_custom_covers(self):
        """Link Custom Covers to Groups."""
        link_cover_pks = self.metadata.get(LINK_COVER_PKS, {})
        num_link_cover_pks = len(link_cover_pks)
        status = ImporterLinkCoversStatus(0, num_link_cover_pks)
        try:
            if not num_link_cover_pks:
                return 0
            self.status_controller.start(status)
            # Aggregate objs to update for each group model.
            model_map = {}
            covers = CustomCover.objects.filter(pk__in=link_cover_pks).only(
                "library", "path"
            )
            for cover in covers:
                self._link_custom_cover_prepare(cover, model_map)

            # Bulk update each model type
            for model, objs in model_map.items():
                self._link_custom_cover_group(model, objs, status)
        finally:
            self.status_controller.finish(status)
        return status.complete


ings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  -o-tab-size: 4;
     tab-size: 4;
  /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr:where(:not(.no-tw,.no-tw *,.no-tw-2,.no-tw-2 *)),
hr:where(.tw,.tw *) {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]):where(:not(.no-tw,.no-tw *,.no-tw-2,.no-tw-2 *)),
abbr:where([title]):where(.tw,.tw *) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1:where(:not(.no-tw,.no-tw *,.no-tw-2,.no-tw-2 *)),
h1:where(.tw,.tw *),
h2:where(:not(.no-tw,.no-tw *,.no-tw-2,.no-tw-2 *)),
h2:where(.tw,.tw *),
h3:where(:not(.no-tw,.no-tw *,.no-tw-2,.no-tw-2 *)),
h3:where(.tw,.tw *),
h4:where(:not(.no-tw,.no-tw *,.no-tw-2,.no-tw-2 *)),
h4:where(.tw,.tw *),
h5:where(:not(.no-tw,.no-tw *,.no-tw-2,.no-tw-2 *)),
h5:where(.tw,.tw *),
h6:where(:not(.no-tw,.no-tw *,.no-tw-2,.no-tw-2 *)),
h6:where(.tw,.tw *) {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a:where(:not(.no-tw,.no-tw *,.no-tw-2,.no-tw-2 *)),
a:where(.tw,.tw *) {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b:where(:not(.no-tw,.no-tw *,.no-tw-2,.no-tw-2 *)),
b:where(.tw,.tw *),
strong:where(:not(.no-tw,.no-tw *,.no-tw-2,.no-tw-2 *)),
strong:where(.tw,.tw *) {
  font-weight: bolder;
}

/*
1. Use the user


ows, nCols] = Dimensions(data[0])
    let nData = 0;
    //Mean
    let meanAcc = CreateMatrix(nRows, nCols);
    for (let i = 0; i < data.length; i++) {
        if (labels[i] == tag) {
            AddInPlace(meanAcc, data[i]);
            nData++;
        }
    }

    let mean = Scale(1 / nData, meanAcc);

    //Covariance
    let side = Math.max(nRows, nCols);
    let covAcc = CreateMatrix(side, side);

    for (let i = 0; i < data.length; i++) {
        if (labels[i] == tag) {
            let diff = Sub(data[i], mean);
            let diffTransposed = Transpose(diff);
            let add = Mul(diff, diffTransposed);
            AddInPlace(covAcc, add);
        }
    }
    let covariance = Scale(1 / nData, covAcc);

    return { mean: mean, covariance: covariance } as MeanAndCov;
}

//Determinant of an NxN matrix
export function Determinant(m: Matrix): number {
    let square: boolean = IsSquare(m);
    if (!square) {
        let [nRows, nCols] = Dimensions(m);
        throw new Error(`Determinant: parameter is a non square matrix - rows:${nRows} colums:${nCols}`);
    }

    let size = Rows(m);
    switch (size) {
        case 1: {
            return m[0][0];
        }
        case 2: {
            return m[0][0] * m[1][1] - m[0][1] * m[1][0];
        }
        case 3: {
            let det1 = m[1][1] * m[2][2] - m[1][2] * m[2][1];
            let det2 = m[1][0] * m[2][2] - m[1][2] * m[2][0];
            let det3 = m[1][0] * m[2][1] - m[1][1] * m[2][0];
            return m[0][0] * det1 - m[0][1] * det2 + m[0][2] * det3;
        }
        default: {
            let acc = 0;
            let even = true;

            for (let i = 0; i < size; i++) {
                let minor = SubMatrix(m, 0, i);
                acc += (even ? 1 : -1) * m[0][i] * Determinant(minor);
                even = !even;
            }
            return acc;
        }
    }
}

export function SubMatrix(m1: Matrix, row: number, col: Number): Matrix {
    let [nRows, nCols] = Dimensions(m1);
    let sub: number[][] = [];
    for (let r = 0; r < nRows; r++) {
        if (r == row) continue;
        let newRow = [];
        for (let c = 0; c < nCols; c++) {
            if (c == col) continue;
            newRow.push(m1[r][c]);
        }
        sub.push(newRow);
    }
    return FromArray(sub);
}

export function Cofactors(m1: Matrix): Matrix {
    let [nRows, nCols] = Dimensions(m1);
    let minors = CreateMatrix(nRows, nCols);
    for (let r = 0; r < nRows; r++) {
        //Rows alternate between starting pos & neg, first row is pos.
        let even = ((r & 1) == 0);
        for (let c = 0; c < nCols; c++) {
            let sub = SubMatrix(m1, r, c);
            let sign = even ? 1 : -1;
            even = !even;
            minors[r][c] = sign * Determinant(sub);
        }


     "reg-names");

	if (!drvdata->nr_hmux)
		return -ENODEV;

	if (drvdata->nr_hmux > 0) {
		drvdata->hmux = devm_kzalloc(dev, drvdata->nr_hmux *
					     sizeof(*drvdata->hmux),
					     GFP_KERNEL);
		if (!drvdata->hmux)
			return -ENOMEM;
		for (i = 0; i < drvdata->nr_hmux; i++) {
			ret = of_property_read_string_index(pdev->dev.of_node,
							    "reg-names", i,
							    &hmux_name);
			if (ret)
				return ret;
			res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
							   hmux_name);
			if (!res)
				return -ENODEV;
			drvdata->hmux[i].start = res->start;
			drvdata->hmux[i].end = res->end;
		}
	} else {
		return drvdata->nr_hmux;
	}

	mutex_init(&drvdata->mutex);

	drvdata->clk = devm_clk_get(dev, "core_clk");
	if (IS_ERR(drvdata->clk))
		return PTR_ERR(drvdata->clk);

	ret = clk_set_rate(drvdata->clk, CORESIGHT_CLK_RATE_TRACE);
	if (ret)
		return ret;

	drvdata->nr_hclk = of_property_count_strings(pdev->dev.of_node,
						     "qcom,hwevent-clks");
	drvdata->nr_hreg = of_property_count_strings(pdev->dev.of_node,
						     "qcom,hwevent-regs");

	if (drvdata->nr_hclk > 0) {
		drvdata->hclk = devm_kzalloc(dev, drvdata->nr_hclk *
					     sizeof(*drvdata->hclk),
					     GFP_KERNEL);
		if (!drvdata->hclk)
			return -ENOMEM;

		for (i = 0; i < drvdata->nr_hclk; i++) {
			ret = of_property_read_string_index(pdev->dev.of_node,
							    "qcom,hwevent-clks",
							    i, &hclk_name);
			if (ret)
				return ret;

			drvdata->hclk[i] = devm_clk_get(dev, hclk_name);
			if (IS_ERR(drvdata->hclk[i]))
				return PTR_ERR(drvdata->hclk[i]);
		}
	}
	if (drvdata->nr_hreg > 0) {
		drvdata->hreg = devm_kzalloc(dev, drvdata->nr_hreg *
					     sizeof(*drvdata->hreg),
					     GFP_KERNEL);
		if (!drvdata->hreg)
			return -ENOMEM;

		for (i = 0; i < drvdata->nr_hreg; i++) {
			ret = of_property_read_string_index(pdev->dev.of_node,
							    "qcom,hwevent-regs",
							    i, &hreg_name);
			if (ret)
				return ret;

			drvdata->hreg[i] = devm_regulator_get(dev, hreg_name);
			if (IS_ERR(drvdata->hreg[i]))
				return PTR_ERR(drvdata->hreg[i]);
		}
	}
	desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL);
	if (!desc)
		return -ENOMEM;

	desc->type = CORESIGHT_DEV_TYPE_NONE;
	desc->pdata = pdev->dev.platform_data;
	desc->dev = &pdev->dev;
	desc->groups = hwevent_attr_grps;
	drvdata->csdev = coresight_register(desc);
	if (IS_ERR(drvdata->csdev))
		return PTR_ERR(drvdata->csdev);

	dev_info(dev, "Hardware Event driver initialized\n");
	return 0;
}

static int hwevent_remove(struct platform_device *pdev)
{
	struct hwevent_drvdata *drvdata = platform_get_drvdata(pdev);

	coresight_unregister(drvdata->csdev);
	return 0;
}

static const struct of_device_id hwevent_match[] = {
	{.compatible = "qcom,coresight-hwevent"},
	{}
};

static struct platform_driver hwevent_driver = {
	.probe		= hwevent_probe,
	.remove		= hwevent_remove,
	.driver		= {
		.name	= "coresight-hwevent",
		.owner	= THIS_MODULE,
		.of_match_table	= hwevent_match,
	},
};

static int __init hwevent_init(void)
{
	return platform_driver_register(&hwevent_driver);
}
module_init(hwevent_init);

static void __exit hwevent_exit(void)
{
	platform_driver_unregister(&hwevent_driver);
}
module_exit(hwevent_exit);

MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("CoreSight Hardware Event driver");


EQUEST,
  ERROR_PENDING_REQUEST_MISMATCH,
} from '../../src';
import {UdpResponseData, UdpResponse} from '../../src/radio';
import {createUdpDeviceCommand} from '../example/fixtures';

const EXECUTE_REQUEST_ID = 'execute-request-id';
const DEVICE_ID = 'test-device-id';
const COMMAND_REQUEST = createUdpDeviceCommand(
  Buffer.from('test-execute-buffer'),
  EXECUTE_REQUEST_ID,
  DEVICE_ID,
  12345
);

/**
 * Creates a simple execute request used for testing.
 * @param command  A command to set in the sample request.
 * @param params  The `params` field for the command.
 * @returns a simple execute request with the supplied parameters.
 */
function createExecuteRequest(
  command: string,
  params: Record<string, unknown>
) {
  return {
    requestId: EXECUTE_REQUEST_ID,
    inputs: [
      {
        intent: smarthome.Intents.EXECUTE,
        payload: {
          commands: [
            {
              execution: [
                {
                  command,
                  params,
                },
              ],
              devices: [
                {
                  id: DEVICE_ID,
                },
              ],
            },
          ],
          structureData: {},
        },
      },
    ],
  };
}

/**
 * Tests that `markPending()` matches two identical requests.
 */
test('device-manager-expected-mark-pending', async t => {
  const deviceManager = new MockDeviceManager();
  const executeRequest = createExecuteRequest('action.devices.commands.OnOff', {
    on: true,
  });
  const doesNextPendingRequestMatch = deviceManager.doesNextPendingRequestMatch(
    executeRequest
  );
  deviceManager.markPending(executeRequest);
  t.is(await doesNextPendingRequestMatch, true);
});

/**
 * Tests that `markPending()` differentiates two different requests.
 */
test('device-manager-unexpected-mark-pending', async t => {
  const deviceManager = new MockDeviceManager();
  const executeRequest = createExecuteRequest('action.devices.commands.OnOff', {
    on: true,
  });
  const differentExecuteRequest = createExecuteRequest(
    'action.devices.commands.OnOff',
    {on: true}
  );
  const doesNextPendingRequestMatch = deviceManager.doesNextPendingRequestMatch(
    executeRequest
  );
  deviceManager.markPending(differentExecuteRequest);
  await t.throwsAsync(
    async () => {
      t.is(await doesNextPendingRequestMatch, false);
    },
    {
      instanceOf: Error,
      message: ERROR_PENDING_REQUEST_MISMATCH,
    }
  );
});

/**
 * Tests that an unexpected Execute request throws a `HandlerError`.
 */
test('test-unexpected-command-request', async t => {
  const deviceManager = new MockDeviceManager();
  await t.throwsAsync(
    async () => {
      await deviceManager.send(COMMAND_REQUEST);
    },
    {
      instanceOf: smarthome.IntentFlow.HandlerError,
      message: ERROR_UNEXPECTED_COMMAND_REQUEST,
    }
  );
});

/**
 * Tests that `DeviceManagerStub` keeps track of sent requests
 * and resets them properly.
 */
test('test-sent-requests', async t => {
  const deviceManager = new MockDeviceManager();
  const commandResponse = new UdpResponseData(
    EXECUTE_REQUEST_ID,
    DEVICE_ID,
    new UdpResponse()
  );
  deviceManager.


 210 40% 98%;
    --ring: 216 34% 17%;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply font-sans antialiased bg-background text-foreground;
  }

  /* 隐藏滚动条样式 */
  ::-webkit-scrollbar {
    display: none;
  }

  * {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
  }
}
.fancybox-wrap,.fancybox-skin,.fancybox-outer,.fancybox-inner,.fancybox-image,.fancybox-wrap iframe,.fancybox-wrap object,.fancybox-nav,.fancybox-nav span,.fancybox-tmp{padding:0;margin:0;border:0;outline:none;vertical-align:top}.fancybox-wrap{position:absolute;top:0;left:0;z-index:8020}.fancybox-skin{position:relative;background:#f9f9f9;color:#444;text-shadow:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.fancybox-opened{z-index:8030}.fancybox-opened .fancybox-skin{-webkit-box-shadow:0 10px 25px rgba(0,0,0,0.5);-moz-box-shadow:0 10px 25px rgba(0,0,0,0.5);box-shadow:0 10px 25px rgba(0,0,0,0.5)}.fancybox-outer,.fancybox-inner{position:relative}.fancybox-inner{overflow:hidden}.fancybox-type-iframe .fancybox-inner{-webkit-overflow-scrolling:touch}.fancybox-error{color:#444;font:14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;margin:0;padding:15px;white-space:nowrap}.fancybox-image,.fancybox-iframe{display:block;width:100%;height:100%}.fancybox-image{max-width:100%;max-height:100%}#fancybox-loading,.fancybox-close,.fancybox-prev span,.fancybox-next span{background-image:url(fancybox_sprite.png)}#fancybox-loading{position:fixed;top:50%;left:50%;margin-top:-22px;margin-left:-22px;background-position:0 -108px;opacity:.8;cursor:pointer;z-index:8060}#fancybox-loading div{width:44px;height:44px;background:url(fancybox_loading.gif) center center no-repeat}.fancybox-close{position:absolute;top:-18px;right:-18px;width:36px;height:36px;cursor:pointer;z-index:8040}.fancybox-nav{position:absolute;top:0;width:40%;height:100%;cursor:pointer;text-decoration:none;background:transparent url(blank.gif);-webkit-tap-highlight-color:rgba(0,0,0,0);z-index:8040}.fancybox-prev{left:0}.fancybox-next{right:0}.fancybox-nav span{position:absolute;top:50%;width:36px;height:34px;margin-top:-18px;cursor:pointer;z-index:8040;visibility:hidden}.fancybox-prev span{left:10px;background-position:0 -36px}.fancybox-next span{right:10px;background-position:0 -72px}.fancybox-nav:hover span{visibility:visible}.fancybox-tmp{position:absolute;top:-99999px;left:-99999px;max-width:99999px;max-height:99999px;overflow:visible!important}.fancybox-lock{overflow:visible!important;width:auto}.fancybox-lock body{overflow:hidden!important}.fancybox-lock-test{overfl


vpternlogq	$0x96,%zmm18,%zmm12,%zmm7
	vmovdqu64	128(%rsp),%zmm19
.byte	98,179,93,72,68,203,17
.byte	98,51,93,72,68,203,0
.byte	98,51,93,72,68,211,1
.byte	98,51,93,72,68,227,16
	vmovdqu64	192(%rsp),%zmm19
.byte	98,51,85,72,68,235,17
.byte	98,51,85,72,68,251,0
.byte	98,163,85,72,68,203,1
.byte	98,163,85,72,68,211,16

	vpternlogq	$0x96,%zmm17,%zmm10,%zmm7
	vpternlogq	$0x96,%zmm13,%zmm1,%zmm6
	vpternlogq	$0x96,%zmm15,%zmm9,%zmm8
	vpternlogq	$0x96,%zmm18,%zmm12,%zmm7
	vmovdqu64	256(%r10),%zmm11
	vmovdqu64	320(%r10),%zmm3
	vmovdqu64	384(%r10),%zmm4
	vmovdqu64	448(%r10),%zmm5
	vpshufb	%zmm16,%zmm11,%zmm11
	vpshufb	%zmm16,%zmm3,%zmm3
	vpshufb	%zmm16,%zmm4,%zmm4
	vpshufb	%zmm16,%zmm5,%zmm5
	vmovdqu64	256(%rsp),%zmm19
.byte	98,179,37,72,68,203,17
.byte	98,51,37,72,68,203,0
.byte	98,51,37,72,68,211,1
.byte	98,51,37,72,68,227,16
	vmovdqu64	320(%rsp),%zmm19
.byte	98,51,101,72,68,235,17
.byte	98,51,101,72,68,251,0
.byte	98,163,101,72,68,203,1
.byte	98,163,101,72,68,211,16
	vpternlogq	$0x96,%zmm17,%zmm10,%zmm7
	vpternlogq	$0x96,%zmm13,%zmm1,%zmm6
	vpternlogq	$0x96,%zmm15,%zmm9,%zmm8
	vpternlogq	$0x96,%zmm18,%zmm12,%zmm7
	vmovdqu64	384(%rsp),%zmm19
.byte	98,179,93,72,68,203,17
.byte	98,51,93,72,68,203,0
.byte	98,51,93,72,68,211,1
.byte	98,51,93,72,68,227,16
	vmovdqu64	448(%rsp),%zmm19
.byte	98,51,85,72,68,235,17
.byte	98,51,85,72,68,251,0
.byte	98,163,85,72,68,203,1
.byte	98,163,85,72,68,211,16

	vpternlogq	$0x96,%zmm17,%zmm10,%zmm7
	vpternlogq	$0x96,%zmm13,%zmm1,%zmm6
	vpternlogq	$0x96,%zmm15,%zmm9,%zmm8
	vpternlogq	$0x96,%zmm18,%zmm12,%zmm7
	vmovdqu64	512(%r10),%zmm11
	vmovdqu64	576(%r10),%zmm3


 	ori	t0,t0,0x6d44
bfc09590:	3c03d591 	lui	v1,0xd591
bfc09594:	34636d44 	ori	v1,v1,0x6d44
bfc09598:	00081002 	srl	v0,t0,0x0
bfc0959c:	14430173 	bne	v0,v1,bfc09b6c <inst_error>
bfc095a0:	00000000 	nop
/home/ghj/Desktop/func/inst/n35_srl.S:244
bfc095a4:	3c0829d5 	lui	t0,0x29d5
bfc095a8:	350842b4 	ori	t0,t0,0x42b4
bfc095ac:	3c0329d5 	lui	v1,0x29d5
bfc095b0:	346342b4 	ori	v1,v1,0x42b4
bfc095b4:	00081002 	srl	v0,t0,0x0
bfc095b8:	1443016c 	bne	v0,v1,bfc09b6c <inst_error>
bfc095bc:	00000000 	nop
/home/ghj/Desktop/func/inst/n35_srl.S:245
bfc095c0:	3c086273 	lui	t0,0x6273
bfc095c4:	35088600 	ori	t0,t0,0x8600
bfc095c8:	3c036273 	lui	v1,0x6273
bfc095cc:	34638600 	ori	v1,v1,0x8600
bfc095d0:	00081002 	srl	v0,t0,0x0
bfc095d4:	14430165 	bne	v0,v1,bfc09b6c <inst_error>
bfc095d8:	00000000 	nop
/home/ghj/Desktop/func/inst/n35_srl.S:246
bfc095dc:	3c08ce75 	lui	t0,0xce75
bfc095e0:	35083aa8 	ori	t0,t0,0x3aa8
bfc095e4:	3c03ce75 	lui	v1,0xce75
bfc095e8:	34633aa8 	ori	v1,v1,0x3aa8
bfc095ec:	00081002 	srl	v0,t0,0x0
bfc095f0:	1443015e 	bne	v0,v1,bfc09b6c <inst_error>
bfc095f4:	00000000 	nop
/home/ghj/Desktop/func/inst/n35_srl.S:247
bfc095f8:	3c08b145 	lui	t0,0xb145
bfc095fc:	3508be00 	ori	t0,t0,0xbe00
bfc09600:	3c03b145 	lui	v1,0xb145
bfc09604:	3463be00 	ori	v1,v1,0xbe00
bfc09608:	00081002 	srl	v0,t0,0x0
bfc0960c:	14430157 	bne	v0,v1,bfc09b6c <inst_error>
bfc09610:	00000000 	nop
/home/ghj/Desktop/func/inst/n35_srl.S:248
bfc09614:	3c08b56d 	lui	t0,0xb56d
bfc09618:	35089f5e 	ori	t0,t0,0x9f5e
bfc0961c:	3c03b56d 	lui	v1,0xb56d
bfc096


el\'s Command <TXT>",
  },
  [10371] = {
    ["D"] = "A dwarven warrior known as Yorus Barleybrew has issued a challenge to all skilled Alliance warriors.$B$BHe waits at the Lakeshire Inn, in a place known as the Redridge Mountains in the Eastern Kingdoms.  The journey will be long, but it\'ll be worth it for you to test yourself, $N.",
    ["O"] = "Speak with Yorus Barleybrew.",
    ["T"] = "Yorus Barleybrew",
  },
  [10372] = {
    ["D"] = "Eralan, an associate of mine in Tranquillien, has made an inquiry about securing some help for an urgent job.$B$BNow, I don\'t know what she has in mind because I don\'t ask questions, but you\'ve proven yourself more than capable. I want you to travel to Tranquillien in the Ghostlands and have a word with Eralan.$B$BShe may be a bit gruff, but she\'s trustworthy.",
    ["O"] = "Speak with Eralan in Tranquillien.",
    ["T"] = "A Discreet Inquiry",
  },
  [10373] = {
    ["D"] = "Hear ye, hear ye!  All heroes are called upon to heed these words!$B$BA call to arms has been issued by the Kingdom of Stormwind!  All able bodied individuals are entreated to take up arms against the dark threat of the Scourge in the northern lands of the Eastern Kingdoms!  Rumors fly of new threats rising from the ruins of the Plaguelands!$B$BHeroes of the realm - seek out Commander Ashlam Valorfist who has set up his base camp in Chillwind Camp, north of the Alterac Mountains!",
    ["O"] = "Seek out Commander Ashlam Valorfist.  His base camp is located at Chillwind Camp, north of the Alterac Mountains.",
    ["T"] = "A Call to Arms: The Plaguelands!",
  },
  [10374] = {
    ["D"] = "Heroes of the realm, hear me - the Horde calls upon you for swift action!$B$BA call to arms has been issued for all able bodied individuals to take up arms against the Scourge!  Rumors fly of new threats rising from the ruins of the Eastern Kingdoms.  They loom to the east of the Undercity, in the northern reaches of the lands now known as the Plaguelands!$B$BHeroes of the realm - seek out High Executor Derrington, who has set up his base camp at the Bulwark, east of Tirisfal Glade!",
    ["O"] = "Seek out High Executor Derrington.  His base camp is located at the Bulwark, east of Tirisfal Glade and the Undercity.",
    ["T"] = "A Call to Arms: The Plaguelands!",
  },
  [10375] = {
    ["D"] = "You\'ve proven yourself to our people, $N.  Now is time for you to show us that you\'re willing to stand by us, even in the face of the strongest enemy.$B$BThe ogres of Outland are ",
    ["O"] = "",
    ["T"] = "BETA Obsidian Warbeads",
  },
  [10377] = {
    ["D"] = "",
    ["O"] = "",
    ["T"] = "OLD Nothing to Fear",
  },
  [10379] = {
    ["D"] = "",
    ["O"] = "",
    ["T"] = "Touch of Weakness",
  },
  [10380] = {
    ["D"] = "We\'ve been so blind, $N, that the alliance of two of our most dangerous enemies went completely unnoticed.$B$BI wouldn\'t be surprised if the Scryers had something to do with hiding this information from us, but we must now face the reality.  The Burning Legion and Kael\'thas\' Sunfury army serve under the same banner.$B$BThese demons are the only reason Kael\'thas was ever able to utilize the technology in Tempest Keep.  Under Orelis\'s orders I must command you to destroy them.",
    ["O"]


Polynomials;
		}
		if (((GeoConic) inputPath).isEllipse()
				|| ((GeoConic) inputPath).isHyperbola()) {

			if (botanaVars == null
					&& inputPoint.getParentAlgorithm() != null) {
				botanaVars = new PVariable[4];
				botanaVars = ((SymbolicParametersBotanaAlgo) inputPoint
						.getParentAlgorithm()).getBotanaVars(inputPoint);
			}
			// botana variables of input point
			PVariable[] fv1 = inputPoint.getBotanaVars(inputPoint);
			// botana variables of input path
			PVariable[] fv2 = ((GeoConic) inputPath).getBotanaVars(inputPath);

			botanaPolynomials = new PPolynomial[1][3];

			PPolynomial e_1 = new PPolynomial();
			PPolynomial e_2 = new PPolynomial();
			AlgoElement algoParent = inputPoint
					.getParentAlgorithm();
			// case input point is point on ellipse/hyperbola
			if (algoParent instanceof AlgoPointOnPath
					&& (((GeoConic) ((AlgoPointOnPath) algoParent).getPath())
							.isEllipse() || ((GeoConic) ((AlgoPointOnPath) algoParent)
							.getPath()).isHyperbola())) {
				e_1 = new PPolynomial(botanaVars[2]);
				e_2 = new PPolynomial(botanaVars[3]);
			}
			// case input point is point from ellipses definition
			else if (fv1[0].equals(fv2[10]) && fv1[1].equals(fv2[11])) {
				e_1 = new PPolynomial(fv2[2]);
				e_2 = new PPolynomial(fv2[3]);
			} else {
				e_1 = new PPolynomial(new PVariable(kernel));
				e_2 = new PPolynomial(new PVariable(kernel));
			}
			PPolynomial d1 = new PPolynomial(fv2[2]);
			PPolynomial d2 = new PPolynomial(fv2[3]);

			// d1+d2 = e1'+e2'
			botanaPolynomials[0][0] = d1.add(d2).subtract(e_1).subtract(e_2);

			// e1'^2=Polynomial.sqrDistance(a1,a2,p1,p2)
			botanaPolynomials[0][1] = PPolynomial.sqrDistance(fv2[6], fv2[7],
					fv1[0], fv1[1]).subtract(e_1.multiply(e_1));

			// e2'^2=Polynomial.sqrDistance(b1,b2,p1,p2)
			botanaPolynomials[0][2] = PPolynomial.sqrDistance(fv2[8], fv2[9],
					fv1[0], fv1[1]).subtract(e_2.multiply(e_2));

			return botanaPolynomials;
		}
		throw new NoSymbolicParametersException();
	}

}
package org.geogebra.common.kernel.prover;

import java.math.BigInteger;
import java.util.HashMap;
import java.util.HashSet;

import org.geogebra.common.kernel.Construction;
import org.geogebra.common.kernel.algos.AlgoAnglePoints;
import org.geogebra.common.kernel.algos.AlgoElement;
import org.geogebra.common.kernel.algos.SymbolicParameters;
import org.geogebra.common.kernel.algos.SymbolicParametersAlgo;
import org.geogebra.common.kernel.algos.SymbolicParametersBotanaAlgoAre;
import org.geogebra.common.kernel.commands.Commands;
import org.geogebra.common.kernel.geos.GeoAngle;
import org.geogebra.common.


="index.THREE.Int16Attribute.html#array" class="tsd-index-link deprecated tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg>array
<svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>count
<svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>is<wbr/>Buffer<wbr/>Attribute
<svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>item<wbr/>Size
<svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>name
<svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>normalized
<a href="index.THREE.Int16Attribute.html#onUploadCallback" class="tsd-index-link deprecated tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-


/*
 * line2wid.c -- Convert a ref or hyp line (word string sequence) to an array of
 * 		word ids.
 *
 * **********************************************
 * CMU ARPA Speech Project
 *
 * Copyright (c) 1997 Carnegie Mellon University.
 * ALL RIGHTS RESERVED.
 * **********************************************
 *
 * HISTORY
 *
 * 27-Feb-1997	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
 * 		Started.
 */

#include <libutil/libutil.h>
#include <main/dict.h>

int32 is_uttid (char *word, char *uttid)
{
    int32 k;

    k = strlen(word);
    if ((word[0] == '(') && (word[k-1] == ')')) {
	word[k-1] = '\0';
	strcpy (uttid, word+1);
	word[k-1] = ')';
	return 1;
    }
    return 0;
}

int32 line2wid (dict_t *dict, char *line, s3wid_t *wid, int32 max_n_wid, int32 add_oov,
		char *uttid)
{
    char *lp, word[1024];
    int32 n, k;
    s3wid_t w;
    s3cipid_t ci[1];

    uttid[0] = '\0';
    ci[0] = (s3cipid_t) 0;

    lp = line;
    n = 0;
    while (sscanf (lp, "%s%n", word, &k) == 1) {
	lp += k;

	if (n >= max_n_wid)
	    return -n;

	if (is_uttid (word, uttid))
	    break;

	wid[n] = dict_wordid (dict, word);	/* Up to caller to handle BAD_WIDs */
	if (NOT_WID(wid[n])) {
	    /* OOV word */
	    if (add_oov) {
		E_INFO("Adding %s to dictionary\n", word);
		wid[n] = dict_add_word (dict, word, NULL, 0);
		if (NOT_WID(wid[n]))
		    E_FATAL("dict_add_word(%s) failed for line: %s\n", word, line);
	    } else
		E_FATAL("Unknown word (%s) in line: %s\n", word, line);
	}

	n++;
    }

    if (sscanf (lp, "%s", word) == 1)	/* Check that line really ended */
	E_WARN("Nonempty data ignored after uttid(%s) in line: %s\n", uttid, line);

    return n;
}


/ static
bool nsContentUtils::IsInPrivateBrowsing(nsILoadGroup* aLoadGroup) {
  if (!aLoadGroup) {
    return false;
  }
  bool isPrivate = false;
  nsCOMPtr<nsIInterfaceRequestor> callbacks;
  aLoadGroup->GetNotificationCallbacks(getter_AddRefs(callbacks));
  if (callbacks) {
    nsCOMPtr<nsILoadContext> loadContext = do_GetInterface(callbacks);
    isPrivate = loadContext && loadContext->UsePrivateBrowsing();
  }
  return isPrivate;
}

bool nsContentUtils::DocumentInactiveForImageLoads(Document* aDocument) {
  if (aDocument && !IsChromeDoc(aDocument) && !aDocument->IsResourceDoc()) {
    nsCOMPtr<nsPIDOMWindowInner> win =
        do_QueryInterface(aDocument->GetScopeObject());
    return !win || !win->GetDocShell();
  }
  return false;
}

imgLoader* nsContentUtils::GetImgLoaderForDocument(Document* aDoc) {
  NS_ENSURE_TRUE(!DocumentInactiveForImageLoads(aDoc), nullptr);

  if (!aDoc) {
    return imgLoader::NormalLoader();
  }
  bool isPrivate = IsInPrivateBrowsing(aDoc);
  return isPrivate ? imgLoader::PrivateBrowsingLoader()
                   : imgLoader::NormalLoader();
}

// static
imgLoader* nsContentUtils::GetImgLoaderForChannel(nsIChannel* aChannel,
                                                  Document* aContext) {
  NS_ENSURE_TRUE(!DocumentInactiveForImageLoads(aContext), nullptr);

  if (!aChannel) {
    return imgLoader::NormalLoader();
  }
  nsCOMPtr<nsILoadContext> context;
  NS_QueryNotificationCallbacks(aChannel, context);
  return context && context->UsePrivateBrowsing()
             ? imgLoader::PrivateBrowsingLoader()
             : imgLoader::NormalLoader();
}

// static
bool nsContentUtils::IsImageInCache(nsIURI* aURI, Document* aDocument) {
  imgILoader* loader = GetImgLoaderForDocument(aDocument);
  nsCOMPtr<imgICache> cache = do_QueryInterface(loader);

  // If something unexpected happened we return false, otherwise if props
  // is set, the image is cached and we return true
  nsCOMPtr<nsIProperties> props;
  nsresult rv =
      cache->FindEntryProperties(aURI, aDocument, getter_AddRefs(props));
  return (NS_SUCCEEDED(rv) && props);
}

// static
int32_t nsContentUtils::CORSModeToLoadImageFlags(mozilla::CORSMode aMode) {
  switch (aMode) {
    case CORS_ANONYMOUS:
      return imgILoader::LOAD_CORS_ANONYMOUS;
    case CORS_USE_CREDENTIALS:
      return imgILoader::LOAD_CORS_USE_CREDENTIALS;
    default:
      return 0;
  }
}

// static
nsresult nsContentUtils::LoadImage(
    nsIURI* aURI, nsINode* aContext, Document* aLoadingDocument,
    nsIPrincipal* aLoadingPrincipal, uint64_t aRequestContextID,
    nsIReferrerInfo* aReferrerInfo, imgINotificationObserver* aObserver,
    int32_t aLoadFlags, const nsAString& initiatorType,
    imgRequestProxy** aRequest, uint32_t aContentPolicyType,
    bool aUseUrgentStartForChannel, bool aLinkPreload) {
  MOZ_ASSERT(aURI, "Must have a URI");
  MOZ_ASSERT(aContext, "Must have a context");
  MOZ_ASSERT(aLoadingDocument, "Must have a document");
  MOZ_ASSERT(aLoadingPrincipal, "Must have a principal");
  MOZ_ASSERT(aRequest, "Null out param");

  imgLoader* imgLoader = GetImgLoaderForDocument(aLoadingDocument);
  if (!imgLoader) {
    // nothing we


DELLINE_SYNC_DET_A>;
impl DEMOD_CTRL_EN_DELLINE_SYNC_DET_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<bool, DEMOD_CTRL_EN_DELLINE_SYNC_DET_A> {
        use crate::Variant::*;
        match self.bits {
            false => Val(DEMOD_CTRL_EN_DELLINE_SYNC_DET_A::DEMOD_CTRL_EN_DELLINE_SYNC_DET_DEFAULT),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `DEMOD_CTRL_EN_DELLINE_SYNC_DET_DEFAULT`"]
    #[inline(always)]
    pub fn is_demod_ctrl_en_delline_sync_det_default(&self) -> bool {
        *self == DEMOD_CTRL_EN_DELLINE_SYNC_DET_A::DEMOD_CTRL_EN_DELLINE_SYNC_DET_DEFAULT
    }
}
#[doc = "Write proxy for field `DEMOD_CTRL_EN_DELLINE_SYNC_DET`"]
pub struct DEMOD_CTRL_EN_DELLINE_SYNC_DET_W<'a> {
    w: &'a mut W,
}
impl<'a> DEMOD_CTRL_EN_DELLINE_SYNC_DET_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DEMOD_CTRL_EN_DELLINE_SYNC_DET_A) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "`0`"]
    #[inline(always)]
    pub fn demod_ctrl_en_delline_sync_det_default(self) -> &'a mut W {
        self.variant(DEMOD_CTRL_EN_DELLINE_SYNC_DET_A::DEMOD_CTRL_EN_DELLINE_SYNC_DET_DEFAULT)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
        self.w
    }
}
#[doc = "Add an additional filtering on the RSSI value\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEMOD_CTRL_RSSI_DET_FILT_A {
    #[doc = "0: `0`"]
    DEMOD_CTRL_RSSI_DET_FILT_DEFAULT = 0,
}
impl From<DEMOD_CTRL_RSSI_DET_FILT_A> for bool {
    #[inline(always)]
    fn from(variant: DEMOD_CTRL_RSSI_DET_FILT_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `DEMOD_CTRL_RSSI_DET_FILT`"]
pub type DEMOD_CTRL_RSSI_DET_FILT_R = crate::R<bool, DEMOD_CTRL_RSSI_DET_FILT_A>;
impl DEMOD_CTRL_RSSI_DET_FILT_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn varian


#!/usr/bin/env python
# Copyright (C) 2009-2014:
#    Gabes Jean, naparuba@gmail.com
#    Gerhard Lausser, Gerhard.Lausser@consol.de
#
# This file is part of Shinken.
#
# Shinken is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Shinken is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Shinken.  If not, see <http://www.gnu.org/licenses/>.

#
# This test checks that sslv3 is disabled when SSL is used with a cherrypy backend to secure against the Poodle vulnerability (https://poodlebleed.com)

from __future__ import absolute_import, division, print_function, unicode_literals

import subprocess
from time import sleep

import requests
import ssl
try:
    import OpenSSL
except ImportError:
    OpenSSL = None
from shinken_test import *

import shinken.log as shinken_log

from shinken.daemons.schedulerdaemon import Shinken
from shinken.daemons.arbiterdaemon import Arbiter

daemons_config = {
    Shinken:      "etc/test_sslv3_disabled/schedulerd.ini",
    Arbiter:    ["etc/test_sslv3_disabled/shinken.cfg"]
}

class testSchedulerInit(ShinkenTest):
    def setUp(self):
        time_hacker.set_real_time()

    def create_daemon(self):
        cls = Shinken
        return cls(daemons_config[cls], False, True, False, None, '')

    @unittest.skipIf(OpenSSL is None, "Test requires OpenSSL")
    def test_scheduler_init(self):
        if not hasattr(ssl, 'SSLContext'):
            print('BAD ssl version for testing, bailing out')
            return

        if not hasattr(ssl, 'PROTOCOL_SSLv3'):
            print('BAD ssl version for testing, no PROTOCOL_SSLv3 support')
            return

        shinken_log.local_log = None  # otherwise get some "trashs" logs..
        d = self.create_daemon()

        d.load_config_file()

        d.http_backend = 'cherrypy'
        d.do_daemon_init_and_start(fake=True)
        d.load_modules_manager()

        # Launch an arbiter so that the scheduler get a conf and init
        subprocess.Popen(["../bin/shinken-arbiter.py", "-c", daemons_config[Arbiter][0], "-d"])

<target>
        ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv3)
</target>
        ctx.check_hostname=False
        ctx.verify_mode=ssl.CERT_NONE

        def connect():
            with socket.create_connection(("localhost", 9998)) as sock:
                with ctx.wrap_socket(sock, server_hostname="localhost") as ssock:
                    pass

        self.assertRaises(ssl.SSLError, connect)
        try:
            connect()
        except ssl.SSLError as e:
            self.assertEqual(e.reason, 'SSLV3_ALERT_HANDSHAKE_FAILURE')
        sleep(2)
        pid = int(file("tmp/arbiterd.pid").read())
        print ("KILLING %d" % pid)*50
        os.kill(int(file("tmp/arbiterd.pid").read()), 2)
        d.do_stop()

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


que Tortheldrin – un « vilain » elfe qui se fait appeler prince – l’a volé à l’un des rois gordok."}},
[7704] = {"Regardez un peu la taille !", {"Tiens, tiens, tiens... Quelle surprise. La Femme de chambre avait un oreiller brodé géant et il est maintenant en votre possession. Evonice Sootsmoker va sûrement vouloir mettre ses petites mains poisseuses dessus. Apportez-le-lui et voyez si elle a quelque chose à vous offrir pour votre peine."}, {"Apportez l'Oreiller de la Femme de chambre Pillaclencher à Evonice Sootsmoker dans la Gorge des Vents brûlants."}},
[7721] = {"Du carburant pour la zappette", {"Si je dois rester ici à gérer cette boutique en pleine Côte oubliée, j’aurais besoin que l’on s’occupe de ces fichus élémentaires. La puissance déchaînée des éléments, quelle plaie !","Heureusement pour moi, et aussi pour vous, mon cher et nouvel agent provocateur, les élémentaires représentent une source d’énergie idéale pour mon Ultra-réducteur perfectionné ! Donnez-leur ce qu’ils méritent ! Sans oublier de me garder leurs noyaux élémentaires, bien sûr !"}, {"Récupérez 10 Noyaux élémentaires d'eau sur les Elémentaires marins et les Embruns le long de la Côte oubliée de Feralas, et rapportez-les à Zorbin Fandazzle, près du quai là-bas."}},
[7722] = {"Le Flux embrasé", {"Quand ce bâtard de Maltorius a quitté notre clan, il a emporté avec lui quelque chose de plus précieux qu'un cristal des arcanes en parfait état : notre recette du Flux embrasé ! Je mettrais ma main à couper que la recette faisait partie de son marché avec les Sombrefer pour sa promotion.","Je veux que vous nous rapportiez nos plans secrets, <nom>. Je suis certain qu'ils se trouvent près de Maltorius, loin dans les profondeurs de la Fosse aux scories."}, {"Quelque part dans la Fosse aux scories du Chaudron, vous trouverez les Plans secrets : Flux embrasé dérobés par le surveillant Maltorius. Trouvez ces plans et rapportez-les au Maître forgeron Burninate dans la gorge des Vents brûlants."}},
[7723] = {"Maudits gros doigts", {"Malheureusement, je ne peux plus tabasser les bêtes comme avant, à cause de mon problème de gros doigts. Vous voyez, le climat d'ici en plus de la basse pression fait se dilater mes doigts. On dirait des boudins de Thelsamar...","Va falloir que vous fassiez mon travail.","Pour commencer : flanquez une raclée aux golems de guerre lourds d'la Gorge. Et qu'ça saute."}, {"Hansel Heavyhands veut que vous tuiez 20 Golems de guerre lourds.","Les golems de guerre lourds errent dans les régions qui entourent le Chaudron dans la Gorge des Vents brûlants. Quand vous en aurez tué assez, revenez voir Hansel dans la Gorge des Vents brûlants."}},
[7724] = {"Une menace incandescente", {"J'vous dis pas, chaque fois que le vieil Hansel veut se reposer un moment et réfléchir au sens de la vie, les puissances supérieures lui donnent un nouveau travail.","Alors je me dis, franchement ! Vous voyez ce que je veux dire ? Franchement.","Il y a ces grandes araign


hat can be found in the LICENSE file.

import 'dart:async' show FutureOr;

import 'dart:collection' show LinkedHashMap, LinkedHashSet;

main() async {
  Map<int, bool> m = {};
  Set<int> s = {};
  Iterable<int> i = {};
  LinkedHashSet<int> lhs = {};
  LinkedHashMap<int, bool> lhm = {};

  Map<int, bool> fm = await mapfun();
  Set<int> fs = await setfun();
  Iterable<int> fi = await iterablefun();
  LinkedHashSet<int> flhs = await lhsfun();
  LinkedHashMap<int, bool> flhm = await lhmfun();

  Map<int, bool> fm2 = await mapfun2();
  Set<int> fs2 = await setfun2();
  Iterable<int> fi2 = await iterablefun2();
  LinkedHashSet<int> flhs2 = await lhsfun2();
  LinkedHashMap<int, bool> flhm2 = await lhmfun2();
}

Future<Map<int, bool>> mapfun() async => {};
Future<Set<int>> setfun() async => {};
Future<Iterable<int>> iterablefun() async => {};
Future<LinkedHashSet<int>> lhsfun() async => {};
Future<LinkedHashMap<int, bool>> lhmfun() async => {};

FutureOr<Map<int, bool>> mapfun2() => {};
FutureOr<Set<int>> setfun2() => {};
FutureOr<Iterable<int>> iterablefun2() => {};
FutureOr<LinkedHashSet<int>> lhsfun2() => {};
FutureOr<LinkedHashMap<int, bool>> lhmfun2() => {};
// Copyright (c) 2021, 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.

final bool inSoundMode = <int?>[] is! List<int>;

main() {
  print('inSoundMode: $inSoundMode');
  testInferred();
}

class Class1 {
  int field;

  Class1(this.field);
}

abstract class Interface2 {
  int get field;
}

class Class2 implements Interface2 {
  final field;

  Class2(this.field);
}

var Class1_new = Class1.new;
var Class2_new = Class2.new;

testInferred() {
  var f1a = Class1.new;
  expect(true, f1a is Class1 Function(int));
  expect(false, f1a is Class1 Function(String));
  var c1a = f1a(0);
  expect(true, c1a is Class1);
  () {
    f1a(''); // error
  };

  dynamic f1b = Class1.new;
  var c1b = f1b(0);
  expect(true, c1b is Class1);
  throws(() => f1b(''));

  var f2a = Class2.new;
  expect(true, f2a is Class2 Function(int));
  expect(false, f2a is Class2 Function(String));
  var c2a = f2a(0);
  expect(true, c2a is Class2);
  () {
    f2a(''); // error
  };

  dynamic f2b = Class2.new;
  var c2b = f2b(0);
  expect(true, c2b is Class2);
  throws(() => f2b(''));
}

expect(expected, actual) {
  if (expected != actual) throw 'Expected $expected, actual $actual';
}

throws(Function() f, {bool inSoundModeOnly = false}) {
  try {
    f();
  } catch (e) {
    print('Thrown: $e');
    return;
  }
  if (!inSoundMode && inSoundModeOnly) {
    return;
  }
  throw 'Expected exception';
}
// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by


 code == KEY_ENTER then
			if not self.save:GetDisabled( ) then
				self.save:DoClick( )
			end
		end
	end

	self.pointsPanel = panel

	self.buttons = vgui.Create( "DPanel", self )
	self.buttons:Dock( BOTTOM )
	self.buttons:SetTall( 30 )
	self.buttons.Paint = function( ) end
	--self.buttons:DockPadding( 5, 5, 5, 5 )
	--Derma_Hook( self.buttons, "Paint", "Paint", "InnerPanel" )

	self.save = vgui.Create( "DButton", self.buttons )
	self.save:SetText( "Save" )
	self.save:SetImage( "pointshop2/floppy1.png" )
	self.save:SetWide( 100 )
	self.save.m_Image:SetSize( 16, 16 )
	self.save:Dock( RIGHT )
	function self.save.DoClick( )
		self:OnSaved( self.selectedRank, self.pointsPanel.control:GetValue( ) )
	end
end

function PANEL:ApplySchemeSettings( )
	self.rankPanel.label:SetFont( self:GetSkin( ).fontName or "DermaDefault" )
	self.pointsPanel.label:SetFont( self:GetSkin( ).fontName or "DermaDefault" )
	self.save:SetFont( self:GetSkin( ).fontName )
end

function PANEL:EditRank( rank, multiplier )
	self.rankPanel.control:SetDisabled( true )
	self.rankPanel.control:SetText( rank.title )
	self.selectedRank = rank
	self.pointsPanel.control:SetValue( multiplier )
	self.pointsPanel.control:RequestFocus( )
end

function PANEL:OnSaved( rank, multiplier )
	--for overwrites
end

vgui.Register( "DPointsOverTimeConfigurator_AddRank", PANEL, "DFrame" )


}package org.jetbrains.r.run

import com.intellij.openapi.ui.DialogWrapper
import junit.framework.TestCase
import org.jetbrains.concurrency.AsyncPromise
import org.jetbrains.r.interpreter.LocalOrRemotePath
import org.jetbrains.r.run.visualize.RImportBaseDataDialog
import java.nio.file.Paths
import kotlin.io.path.exists

class RImportDataDialogTest : RProcessHandlerBaseTestCase() {

  override fun setUp() {
    super.setUp()
    addLibraries()
  }

  fun testDatasetName() {
    checkDatasetName(CSV_FILE_NAME, "sins")
  }

  fun testDatasetSpaceName() {
    checkDatasetName(SPACE_NAME, "example_space")
  }

  fun testDatasetRestrictedCharsName() {
    checkDatasetName(RESTRICTED_CHARS_NAME, "dataset")
  }

  fun testDatasetIncludeRestrictedCharsName() {
    checkDatasetName(INCLUDE_RESTRICTED_CHARS_NAME, "example")
  }

  fun testDatasetUnderscoreFirstName() {
    checkDatasetName(UNDERSCORE_FIRST_NAME, "dataset_space")
  }

  fun testDatasetUnderscoreName() {
    checkDatasetName(UNDERSCORE_NAME, "dataset")
  }

  fun testDatasetNumFirstName() {
    checkDatasetName(NUM_FIRST_NAME, "dataset_1exm")
  }

  fun testDatasetDotNumFirstName() {
    checkDatasetName(DOT_NUM_FIRST_NAME, "dataset_1exm")
  }

  fun testDatasetEmptyName() {
    checkDatasetName(EMPTY_NAME, "dataset")
  }

  private fun checkDatasetName(fileName: String, expected: String) {
    val path = Paths.get(testDataPath, "datasets", fileName)
    TestCase.assertTrue("Test file missing: ${path}", path.exists())
    val lorPath = LocalOrRemotePath(path.toString(), false)
    val promise = AsyncPromise<Boolean>()
    RImportBaseDataDialog(myFixture.project, rInterop, lorPath).runAndClose(promise) {
      dialog ->
      dialog.onUpdateAdditional = {
        promise.setResult(true)
      }
      TestCase.assertEquals(dialog.variableName(), expected)
    }
  }

  companion object {
    private const val TIMEOUT = 5000
    private const val CSV_FILE_NAME = "sins.csv"
    private const val SPACE_NAME = "example space.csv"
    private const val RESTRICTED_CHARS_NAME = "--.csv"
    private const val INCLUDE_RESTRICTED_CHARS_NAME = "example--.csv"
    private const val UNDERSCORE_FIRST_NAME = "_space.csv"
    private const val UNDERSCORE_NAME = "_.csv"
    private const val NUM_FIRST_NAME = "1exm.csv"
    private const val DOT_NUM_FIRST_NAME = ".1exm.csv"
    private const val EMPTY_NAME = ".csv"

    fun <T: DialogWrapper> T.runAndClose(promise: AsyncPromise<Boolean>, block: (T) -> Unit) {
      try {
        block(this)
      }
      finally {
        promise.blockingGet(TIMEOUT)
        close(0)
      }
    }
  }
}package org.jetbrains.r.editor

import com.intellij.lang.Language
import com.intellij.openapi.actionSystem.IdeActions
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.editor.impl.EditorImpl
import com.intellij.openapi.fileTypes.PlainTextLanguage
import com.intellij.testFramework.common.ThreadLeakTracker
import com.jetbrains.python.PythonLanguage
import org.


 i, n = f.upvalues.length;
		ps.print("upvalues (" + n + ") for " + id(f) + ":\n");
		for (i = 0; i < n; i++) {
			ps.print("  " + i + "  " + f.upvalues[i] + "\n");
		}
	}

	/** Pretty-prints contents of a Prototype.
	 *
	 * @param prototype Prototype to print.
	 */
	public static void print(Prototype prototype) {
		printFunction(prototype, true);
	}

	/** Pretty-prints contents of a Prototype in short or long form.
	 *
	 * @param prototype Prototype to print.
	 * @param full true to print all fields, false to print short form.
	 */
	public static void printFunction(Prototype prototype, boolean full) {
		int i, n = prototype.p.length;
		printHeader(prototype);
		printCode(prototype);
		if (full) {
			printConstants(prototype);
			printLocals(prototype);
			printUpValues(prototype);
		}
		for (i = 0; i < n; i++)
			printFunction(prototype.p[i], full);
	}

	private static void format( String s, int maxcols ) {
		int n = s.length();
		if ( n > maxcols )
			ps.print( s.substring(0,maxcols) );
		else {
			ps.print( s );
			for ( int i=maxcols-n; --i>=0; )
				ps.print( ' ' );
		}
	}

	private static String id(Prototype f) {
		return "Proto";
	}
	private void _assert(boolean b) {
		if ( !b )
			throw new NullPointerException("_assert failed");
	}

	/**
	 * Print the state of a {@link LuaClosure} that is being executed
	 * @param cl the {@link LuaClosure}
	 * @param pc the program counter
	 * @param stack the stack of {@link LuaValue}
	 * @param top the top of the stack
	 * @param varargs any {@link Varargs} value that may apply
	 */
	public static void printState(LuaClosure cl, int pc, LuaValue[] stack, int top, Varargs varargs) {
		// print opcode into buffer
		PrintStream previous = ps;
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		ps = new PrintStream( baos );
		printOpCode( cl.p, pc );
		ps.flush();
		ps.close();
		ps = previous;
		format( baos.toString(), 50 );
		printStack(stack, top, varargs);
		ps.println();
	}

	public static void printStack(LuaValue[] stack, int top, Varargs varargs) {
		// print stack
		ps.print('[');
		for ( int i=0; i<stack.length; i++ ) {
			LuaValue v = stack[i];
			if ( v == null )
				ps.print(STRING_FOR_NULL);
			else switch ( v.type() ) {
			case LuaValue.TSTRING:
				LuaString s = v.checkstring();
				ps.print( s.length() < 48?
						s.tojstring():
						s.substring(0, 32).tojstring()+"...+"+(s.length()-32)+"b");
				break;
			case LuaValue.TFUNCTION:
				ps.print( v.tojstring() );
				break;
			case LuaValue.TUSERDATA:
				Object o = v.touserdata();
				if ( o != null ) {
					String n = o.getClass().getName();
					n = n.substring(n.lastIndexOf('.')+1);
					ps.print( n+": "+Integer.toHexString(o.hashCode()) );
				} else {
					ps.print( v.toString() );
				}
				break;
			default:
				ps.print(v.tojstring());
			}
			if ( i+1 == top )
				ps.print(']');
			ps.print( " | " );
		}
		ps.print(varargs);
	}

}
/*******************************************************************************
 * Copyright (c) 2009 Luaj.org. All rights reserved.
 * <p>
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and as


ool_function_name}' is not decorated with @tool."

        # Add to agents if not already present
        added_to = []
        if tool_func not in dev_agent.tools:
            dev_agent.tools.append(tool_func)
            added_to.append("dev_agent")

        if tool_func not in tool_creation_agent.tools:
            tool_creation_agent.tools.append(tool_func)
            added_to.append("tool_creation_agent")

        if added_to:
            return f"✅ Tool '{tool_function_name}' added to: {', '.join(added_to)}"
        else:
            return f"ℹ Tool '{tool_function_name}' was already available in all agents."

    except Exception as e:
        return f"❌ Error adding tool to agents: {str(e)}"

# --- Knowledge Base Tools with Optimization ---
@tool
@lru_cache(maxsize=16)  # Cache template retrievals
def retrieve_similar_templates(task_description: str, top_k: int = 3, user_id: str = "default") -> str:
    """Retrieve similar problem-solving templates from the knowledge base.

    Optimized with caching and reduced output.

    Args:
        task_description: Description of the current task
        top_k: Number of similar templates to retrieve (default: 3)
        user_id: User ID for personalized memory retrieval (default: "default")

    Returns:
        List of similar templates with reasoning approaches
    """
    global global_memory_manager, use_templates

    if not use_templates:
        return "📋 Template usage is disabled. Use --use_template to enable."

    if global_memory_manager is None:
        return "❌ Memory manager not initialized."

    try:
        # 使用新的知识记忆组件
        result = global_memory_manager.knowledge.search_templates(task_description, top_k, user_id)
        if result["success"]:
            similar_templates = result["templates"]
        else:
            similar_templates = []

        if not similar_templates:
            return "📚 No similar templates found in knowledge base."

        # Optimized output - more concise
        result = f"📚 Found {len(similar_templates)} templates:\n"

        for i, template in enumerate(similar_templates, 1):
            similarity = template.get('similarity', 0.0)
            task = template.get('task', '')[:80]  # Reduced from 150
            result += f"{i}. {task}... (Sim: {similarity:.2f})\n"

        return result

    except Exception as e:
        return f"❌ Error retrieving templates: {str(e)}"

@tool
def save_successful_template(task_description: str, reasoning_process: str, solution_outcome: str, domain: str = "general", user_id: str = "default") -> str:
    """Save a successful problem-solving approach to the knowledge base.

    Args:
        task_description: Description of the solved task
        reasoning_process: The reasoning process that led to success
        solution_outcome: The successful outcome achieved
        domain: Domain category (default: "general")
        user_id: User ID for personalized memory storage (default: "default")

    Returns:
        Status of the save operation
    """
    global global_memory_manager, use_templates

    if not use_templates:
        return "📋 Template usage is disabled. Use --use_template to enable."

    if global_memory_manager is None:
        return "❌ Memory manager not initialized."

    try:
        # 使用新的知识记忆组件保存模板
        result = global_memory_manager.knowledge.add_template(task_description, reasoning_process, solution_outcome, domain, user_id)

        if result.get("success", False):
            # 获取统计信息
            stats = global_memory_manager.knowledge.get_stats(user_id)
            total_templates = stats.get('total_templates', 0)
            return f"✅ Template saved! Total: {total_templates}"
        else:
            return f"❌ Failed to save template: {result.get('message', 'Unknown error')}"

    except Exception as e:
        return f"❌ Error saving template: {str(e)}"

@tool
def list_knowledge_base_status(user_id: str = "default") -> str:
    """Get status and statistics of the knowledge base.

    Optimized to return concise information.

    Args:
        user_id: User ID for personalized memory statistics (default: "default")

    Returns:
        Knowledge base status and statistics
    """
    global global_memory_manager, use_templates

    if not use_templates:
        return "📋 Template usage


::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for InsightStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InsightStatus::from(s))
    }
}
impl InsightStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InsightStatus::Closed => "CLOSED",
            InsightStatus::Ongoing => "ONGOING",
            InsightStatus::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["CLOSED", "ONGOING"]
    }
}
impl AsRef<str> for InsightStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum InsightSeverity {
    #[allow(missing_docs)] // documentation missing in model
    High,
    #[allow(missing_docs)] // documentation missing in model
    Low,
    #[allow(missing_docs)] // documentation missing in model
    Medium,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for InsightSeverity {
    fn from(s: &str) -> Self {
        match s {
            "HIGH" => InsightSeverity::High,
            "LOW" => InsightSeverity::Low,
            "MEDIUM" => InsightSeverity::Medium,
            other => InsightSeverity::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for InsightSeverity {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InsightSeverity::from(s))
    }
}
impl InsightSeverity {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InsightSeverity::High => "HIGH",
            InsightSeverity::Low => "LOW",
            InsightSeverity::Medium => "MEDIUM",
            InsightSeverity::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["HIGH", "LOW", "MEDIUM"]
    }
}
impl AsRef<str> for InsightSeverity {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

///
Details about a proactive insight. This object is returned by
/// DescribeInsight.
///

#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ProactiveInsightSummary {
    ///
The ID of the proactive insight.

    pub id: std::option::Option<std::string::String>,
    ///
The name of the proactive insight.

    pub name: std::option::Option<std::string::String>,
    ///
The severity of the proactive insight.

    pub severity: std::option::Option<crate::model::InsightSeverity>,
    ///
The status of the proactive insight.

    pub status: std::option::Option<crate::model::InsightStatus>,
    ///
 A time ranged that


 either **_http://_** or **_https://_**.
     * - `([^)|\s]+\.[a-z]{2,})`: Capture only the domain name (excluding paths).
     * - `(?:\/[^)]*)?`: This is a non-capturing group that matches any path after the domain, but doesn’t capture it in the results.
     */
    internal val DOMAIN_NO_PATH_REGEX = Regex( "\\(https?://([^)|\\s]+\\.[a-z]{2,})(?:/[^)]*)?\\)" )

    var useUnofficialInstances: Boolean = true      // TODO: implement a setting toggle
        set(value) {
            if( field == value )
                return
            else
                field = value

            // Re-fetch instances when boolean is flipped
            CoroutineScope( Dispatchers.IO ).launch {
                this@Invidious.fetchInstances()
            }
        }

    override suspend fun fetchInstances() {
        super.fetchInstances()

        val url = if( useUnofficialInstances ) UNOFFICIAL_PUBLIC_INSTANCES else VERIFIED_PUBLIC_INSTANCES

        try {
            val response = HttpFetcher.CLIENT
                                      .get( url )
                                      .bodyAsText()
                                      .substringAfter( SECTION_START )
                                      .substringBefore( SECTION_END )

            instances = getDistinctFirstGroup( response, DOMAIN_NO_PATH_REGEX )
        } catch ( e: HttpRequestTimeoutException ) {
            println( "Failed to fetch Invidious instances: ${e.message}" )
        }
    }
}package it.fast4x.innertube.models

import kotlinx.serialization.Serializable

@Serializable
data class MusicTwoRowItemRenderer(
    val navigationEndpoint: NavigationEndpoint?,
    val thumbnailRenderer: ThumbnailRenderer?,
    val title: Runs?,
    val subtitle: Runs?,
    val thumbnailOverlay: ThumbnailOverlay?,
    val aspectRatio: String? = null,
    val subtitleBadges: List<Badges>?,
    val menu: Menu?,
){
    val isPlaylist: Boolean
        get() = navigationEndpoint?.browseEndpoint?.browseEndpointContextSupportedConfigs?.browseEndpointContextMusicConfig?.pageType == "MUSIC_PAGE_TYPE_PLAYLIST"
    val isAlbum: Boolean
        get() = navigationEndpoint?.browseEndpoint?.browseEndpointContextSupportedConfigs?.browseEndpointContextMusicConfig?.pageType == "MUSIC_PAGE_TYPE_ALBUM" ||
                navigationEndpoint?.browseEndpoint?.browseEndpointContextSupportedConfigs?.browseEndpointContextMusicConfig?.pageType == "MUSIC_PAGE_TYPE_AUDIOBOOK"
    val isArtist: Boolean
        get() = navigationEndpoint?.browseEndpoint?.browseEndpointContextSupportedConfigs?.browseEndpointContextMusicConfig?.pageType == "MUSIC_PAGE_TYPE_ARTIST"
    val isVideo: Boolean
        get() = navigationEndpoint?.watchEndpoint?.watchEndpointMusicSupportedConfigs
            ?.watchEndpointMusicConfig
            ?.musicVideoType in listOf("MUSIC_VIDEO_TYPE_ATV", "MUSIC_VIDEO_TYPE_UGC", "MUSIC_VIDEO_TYPE_OMV")
    val isSong: Boolean
        get() =
            navigationEndpoint?.watchEndpoint != null &&
                    (
                            if (aspectRatio != null) {
                                aspectRatio != "MUSIC_TWO_ROW_ITEM_THUMBNAIL_ASPECT_RATIO_RECTANGLE_16_9"
                            } else {
                                val thumbnail =
                                    thumbnailRenderer?.musicThumbnailRenderer
                                        ?.thumbnail
                                        ?.thumbnails
                                        ?.firstOrNull()
                                thumbnail != null && thumbnail.height == thumbnail.width
                            }
                            )

//    val isVideo: Boolean
//        get() = navigationEndpoint?.watchEndpoint?.watchEndpointMusicSupportedConfigs
//            ?.watchEndpointMusicConfig
//            ?.musicVideoType in listOf("MUSIC_VIDEO_TYPE_ATV", "MUSIC_VIDEO_TYPE_UGC", "MUSIC_VIDEO_TYPE_OMV")
//                && (if (aspectRatio


0, r0, r1
	lsls r0, r0, #2
	adds r0, r0, r1
	lsls r0, r0, #4
	ldr r1, _08014B6C @ =gPlayers
	adds r6, r0, r1
	ldr r3, _08014B70 @ =gStageData
	ldrb r4, [r3, #3]
	cmp r4, #7
	beq _08014BBC
	movs r1, #0x1c
	ldrsh r0, [r2, r1]
	cmp r0, #0
	bne _08014BB2
	adds r0, r2, #0
	adds r0, #0x26
	ldrb r0, [r0]
	adds r0, #0x20
	movs r1, #0xc0
	ands r0, r1
	cmp r0, #0
	bne _08014BB2
	ldrh r1, [r2, #0x1e]
	ldrh r0, [r3, #0x18]
	ands r0, r1
	cmp r0, #0
	bne _08014BB2
	ldr r0, [r2, #4]
	ldr r1, _08014B74 @ =0x08820046
	ands r0, r1
	cmp r0, #0
	bne _08014BB2
	adds r1, r2, #0
	adds r1, #0x52
	ldrh r3, [r1]
	movs r7, #0
	ldrsh r0, [r1, r7]
	cmp r0, #0
	ble _08014B78
	subs r0, r3, #1
	b _08014BBA
	.align 2, 0
_08014B68: .4byte gCurTask
_08014B6C: .4byte gPlayers
_08014B70: .4byte gStageData
_08014B74: .4byte 0x08820046
_08014B78:
	movs r1, #4
	ldrsh r0, [r5, r1]
	cmp r0, #0
	bne _08014B84
	movs r0, #6
	b _08014BAC
_08014B84:
	cmp r4, #4
	bhi _08014BAA
	adds r0, r2, #0
	adds r0, #0x2a
	ldrb r1, [r0]
	movs r3, #0xf
	adds r0, r3, #0
	ands r0, r1
	cmp r0, #4
	bne _08014BAA
	adds r0, r6, #0
	adds r0, #0x2a
	ldrb r1, [r0]
	adds r0, r3, #0
	ands r0, r1
	cmp r0, #0
	bne _08014BAA
	movs r0, #0xfb
	b _08014BAC
_08014BAA:
	movs r0, #7
_08014BAC:
	strh r0, [r2, #0x30]
	movs r0, #1
	b _08014BBE
_08014BB2:
	adds r1, r2, #0
	adds r1, #0x52
	movs r0, #0xb4
	lsls r0, r0, #1
_08014BBA:
	strh r0, [r1]
_08014BBC:
	movs r0, #0
_08014BBE:
	pop {r4, r5, r6, r7}
	pop {r1}
	bx r1

	thumb_func_start sub_8014BC4
sub_8014BC4: @ 0x08014BC4
	push {r4, r5, r6, lr}
	adds r5, r0, #


clicks">支持: Win, macOS, Linux | 进程: Main

        </button>

            <button class="demo-button" id="process-crash">查看示例</button>

在这个示例中我们创建一个新窗口 (通过 remote 模块) 并提供了一个使用 process.crash() 方法强制崩溃的链接.

当前窗体正在监听崩溃事件, 当此事件发生时, 它提供用户两个选项: 重新加载或关闭.

渲染器进程

        <button id="new-window-hangs-demo-toggle" class="js-container-target demo-toggle-button">进程挂起后重载窗体

支持: Win, macOS, Linux | 进程: Main

        </button>

            <button class="demo-button" id="process-hang">查看示例</button>

在这个示例中我们创建一个新窗口 (通过 remote 模块) 并提供了一个使用 process.hang() 方法强制挂起进程的链接.

当前窗体正在监听进程是否真正无响应 (这可能需要长达30秒). 当此事件发生时, 它提供用户两个选项: 重新加载或关闭.

渲染器进程

高级技巧

            等待进程再次响应.

在进程挂起的的情况下, 第三个选择是等待并查看问题是否解决, 允许进程再次响应. 为此, 请使用 BrowserWindow 的 "responsive" 事件, 如下所示:

win.on('responsive', function () {
  // 当窗口再次响应时做些什么
})

</template>
<template class="task-template">

          <svg class="section-icon"><use xlink:href="assets/img/icons.svg#icon-windows"></use></svg>
          创建


-ad-cs-vulnerability/

欢迎收藏并分享朋友圈，让五邑人网络更安全

![](https://mmbiz.qpic.cn/mmbiz_jpg/1N39PtINn8tD9ic928O6vIrMg4fuib48e1TsRj9K9Cz7RZBD2jjVZcKm1N4QrZ4bwBKZic5crOdItOcdDicPd3yBSg/640?wx_fmt=jpeg "")

欢迎扫描关注我们，及时了解最新安全动态、学习最潮流的安全姿势！

推荐文章

1

[新永恒之蓝？微软SMBv3高危漏洞（CVE-2020-0796）分析复现](http://mp.weixin.qq.com/s?__biz=MzUyMzczNzUyNQ==&mid=2247488913&idx=1&sn=acbf595a4a80dcaba647c7a32fe5e06b&chksm=fa39554bcd4edc5dc90019f33746404ab7593dd9d90109b1076a4a73f2be0cb6fa90e8743b50&scene=21#wechat_redirect)

2

[重大漏洞预警：ubuntu最新版本存在本地提权漏洞（已有EXP）　](http://mp.weixin.qq.com/s?__biz=MzUyMzczNzUyNQ==&mid=2247483652&idx=1&sn=b2f2ec90db499e23cfa252e9ee743265&chksm=fa3941decd4ec8c83a268c3480c354a621d515262bcbb5f35e1a2dde8c828bdc7b9011cb5072&scene=21#wechat_redirect)

#  漏洞预警 | Apache IoTDB远程代码执行漏洞
浅安  浅安安全   2025-05-19 00:00

**0x00 漏洞编号**
- # CVE-2024-24780

**0x01 危险等级**
- 高危

**0x02 漏洞概述**

Apache IoTDB是一个专为物联网数据存储和处理设计的高效时序数据库。

![](https://mmbiz.qpic.cn/sz_mmbiz_png/7stTqD182SVwWibtHtFlZ66q8fNxV24O0qLWbNkFjxjZ4mGp3yqJB1mbwibkKYJr1dHwyv80wzFr2ib7gMb29dlvw/640?wx_fmt=png&from=appmsg "")

**0x03 漏洞详情**
###

**CVE-2024-24780**

**漏洞类型：**
代码执行

**影响：**
执行任意代码

**简述：**
Apache IoTDB存在远程代码执行漏洞，攻击者可以通过不可信的URI注册恶意的用户定义函数，进而执行任意代码。

**0x04 影响版本**
- 1.0.0 <= Apache IoTDB < 1.3.4

**0x05****POC状态**
- 未公开

****
**0x06****修复建议**

**目前官方已发布漏洞修复版本，建议用户升级到安全版本****：**

https://iotdb.apache.org/

<p align="center">
  <img s


open = v;
            if (!v) {
              logs = [];
            }
          });
        });

    List<Widget> children = [
      const Row(
        children: [
          Flexible(child: Divider()),
          Padding(
            padding: EdgeInsets.only(left: 5, right: 5),
            child: Text("Log"),
          ),
          Flexible(child: Divider()),
        ],
      ),
      Row(
        children: [
          Expanded(child: clearBtn),
          Expanded(child: autoScrollBtn),
          Expanded(child: swi),
        ],
      ),
    ];
    if (open) {
      children.add(Flexible(child: view));
    }
    return Column(children: children);
  }
}
import "dart:convert";
import "dart:math";
import "package:flutter/services.dart" show rootBundle;
import "package:flutter/foundation.dart";
import "package:hifumi/abstractions/abstractions_barrel.dart";
import "package:yaml/yaml.dart";

/// Everything dataset-related is handled here.
class DSInterface {
  /* ---------------------------------- Setup --------------------------------- */
  late final Map<String, dynamic> dataset;

  /// These won't change throughout this class' lifetime, so might as well cache them once and for all.
  /// Memory footprint seems to be of a few kb at most anyway.
  late final List<String> _allLessonKeys;
  late final List<LessonNumber> _allLessonNumbers;
  late final List<WordID> _allWordIDs;
  late final List<WordYAML> _allWords;

  /// User-selected editions at load time.
  final Edition bookOneEdition;
  final Edition bookTwoEdition;

  DSInterface({
    required this.bookOneEdition,
    required this.bookTwoEdition,
  });

  /// Wake it up gently.
  Future<void> init() async {
    final yamlString = await rootBundle.loadString('assets/dataset/minna-no-ds.yaml');
    // https://github.com/dart-lang/yaml/issues/147
    // Doing this because working on a [Map] with thousands of objects seems to be much faster than on a [YamlMap] (10 to 20 times on my hardware !!)
    this.dataset = json.decode(json.encode(loadYaml(yamlString)));
    this._allLessonKeys = this._getAllLessonKeys;
    this._allLessonNumbers = this._getLessonNumbers;
    this._allWordIDs = this._getAllWordIDs;
    this._allWords = this._getAllWords;
    print("[Loading] Dataset initialized with ${this._allWordIDs.length} words (1: ${this.bookOneEdition}, 2: ${this.bookTwoEdition}).");
  }

  /* ------------------------------------ . ----------------------------------- */

  /// Get the list of YAML keys for lessons.
  /// Something like `["lesson-01", "lesson-02", ...]`.
  List<String> get _getAllLessonKeys => List<String>.from(
    (this.dataset[DSKeyring.LESSONS] as List<dynamic>).map(
      (lesson) => lesson[DSKeyring.LESSON_KEY] as String,
    ),
  );

  /// Fetches all available lessons from the dataset, and returns their [LessonNumber] as a list.
  List<LessonNumber> get _getLessonNumbers {
    final List<dynamic> lessons = this.dataset[DSKeyring.LESSONS];
    return lessons.map<LessonNumber>((lesson) => lesson[DSKeyring.LESSON_NUMBER] as LessonNumber).toList();
  }

  /// Returns all available lessons from the dataset as a list of [LessonNumber].
  List<LessonNumber> get lessonNumbers => this._allLessonNumbers;

  /// One hour ! A whole hour has gone into getting this type cast to work =(
  List<WordID> get _getAllWordIDs => this._allLessonKeys
      .expand(
        (key) => (this.dataset[key] as